@fnndsc/argus 0.30.0 → 0.30.1
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/{Settings-Bnhd20Eo.js → Settings-DZJXHi5a.js} +1 -1
- package/dist/assets/{Texture-B0FYHoig.js → Texture-hHU7M4-b.js} +1 -1
- package/dist/assets/{addVolumesToViewports-D-LXJAjB.js → addVolumesToViewports-BpUAdDVZ.js} +1 -1
- package/dist/assets/{cornerstoneEngine-BAQ0J1wm.js → cornerstoneEngine-BPxulDit.js} +2 -2
- package/dist/assets/{field-TqvO3HwF.js → field-B2jm52NE.js} +3 -3
- package/dist/assets/{index-YcTfjywK.css → index-6E9SNiNi.css} +1 -1
- package/dist/assets/{index-B7ucFrVI.js → index-B27JbPnj.js} +1 -1
- package/dist/assets/{index-19RzwJ2F.js → index-BVnBwTUD.js} +1 -1
- package/dist/assets/{index-D9oR-G_S.js → index-C1AAhmTp.js} +1 -1
- package/dist/assets/{index-DIZ8CkrS.js → index-C2RRboTz.js} +1 -1
- package/dist/assets/{index-Clk2iuq9.js → index-C2XryqUW.js} +1 -1
- package/dist/assets/{index-DK-9t_wc.js → index-CCkh-04D.js} +1 -1
- package/dist/assets/{index-CJwbCXPM.js → index-CGbC9Dox.js} +1 -1
- package/dist/assets/{index-CXUHQz6I.js → index-CSU7zd6s.js} +5 -5
- package/dist/assets/{index-Ca1vin77.js → index-CmoeC5YO.js} +1 -1
- package/dist/assets/{index-_CkyykBD.js → index-CtxOU_1m.js} +1 -1
- package/dist/assets/{index-DM-qt-uP.js → index-DMU5IH8y.js} +1 -1
- package/dist/assets/{index-9aq9rwFA.js → index-DSGx2J7O.js} +1 -1
- package/dist/assets/{index-nO90IJiz.js → index-EyBR5FJ9.js} +1 -1
- package/dist/assets/{index-C2sROxxy.js → index-LhVhLXHQ.js} +1 -1
- package/dist/assets/{niivueEngine-DLksea28.js → niivueEngine-oEALZER3.js} +2 -2
- package/dist/assets/{slabScene-DfSBmCCF.js → slabScene-CzxYFyCD.js} +1 -1
- package/dist/build.json +1 -1
- package/dist/index.html +2 -2
- package/dist/notes.json +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./cornerstoneEngine-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./cornerstoneEngine-BPxulDit.js","./refusal-DOpm8I8L.js","./_commonjsHelpers-CE1G-McA.js","./niivueEngine-oEALZER3.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))i(n);new MutationObserver(n=>{for(const r of n)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function t(n){const r={};return n.integrity&&(r.integrity=n.integrity),n.referrerPolicy&&(r.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?r.credentials="include":n.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(n){if(n.ep)return;n.ep=!0;const r=t(n);fetch(n.href,r)}})();const pz=450,cg=12;function ao(s,e,t=Date.now()){const i=Number(s.dataset.edgeAt??0);return s.dataset.edge===e&&t-i<pz?!1:(delete s.dataset.edge,s.offsetWidth,s.dataset.edge=e,s.dataset.edgeAt=String(t),!0)}function mz(s,e){return e?"▲ TOP":`▼ ${s} MORE`}function gz(s,e){const t=s.getBoundingClientRect().bottom;let i=0;for(const n of s.querySelectorAll(e)){const r=n.getBoundingClientRect();r.height>0&&r.top>=t-2&&(i+=1)}return i}function _z(s){const e=parseFloat(getComputedStyle(s).lineHeight)||16;return Math.max(0,Math.ceil((s.scrollHeight-s.scrollTop-s.clientHeight)/e))}function ai(s,e={}){s.dataset.more="wired",s.classList.add("holds-more");const t=document.createElement("button");t.type="button",t.className=`more-chip${e.className!==void 0?` ${e.className}`:""}`,t.hidden=!0;const i=e.label??mz,n=()=>s.scrollTop+s.clientHeight>=s.scrollHeight-2;t.addEventListener("click",l=>{if(l.stopPropagation(),e.press!==void 0){e.press();return}s.scrollBy({top:n()?-s.scrollHeight:Math.max(1,s.clientHeight-t.offsetHeight),behavior:"smooth"})});const r=e.mount??s;r.appendChild(t);let o=!1;const a=()=>{if(!o){o=!0;try{r===s&&s.lastElementChild!==t&&s.appendChild(t);const l=(e.scrolls?.()??!0)&&s.scrollHeight>s.clientHeight+2;if(t.hidden!==!l&&(t.hidden=!l),!l)return;const c=e.rows!==void 0?gz(s,e.rows):_z(s),h=i(c,n());t.textContent!==h&&(t.textContent=h)}finally{o=!1}}};return s.addEventListener("scroll",a,{passive:!0}),bz(s,n),typeof ResizeObserver<"u"&&new ResizeObserver(a).observe(s),new MutationObserver(a).observe(s,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["hidden","class","style"]}),a(),t}function bz(s,e){const t=()=>s.scrollHeight>s.clientHeight+2,i=()=>s.scrollTop<=0;let n=s.scrollTop;s.addEventListener("scrollend",()=>{const o=s.scrollTop!==n;n=s.scrollTop,!(!o||!t())&&(i()?ao(s,"top"):e()&&ao(s,"bottom"))}),s.addEventListener("wheel",o=>{!t()||o.deltaY===0||(o.deltaY<0&&i()?ao(s,"top"):o.deltaY>0&&e()&&ao(s,"bottom"))},{passive:!0});let r=null;s.addEventListener("touchstart",o=>{r=o.touches[0]?.clientY??null},{passive:!0}),s.addEventListener("touchmove",o=>{const a=o.touches[0]?.clientY;r===null||a===void 0||!t()||(a-r>cg&&i()?(ao(s,"top"),r=null):r-a>cg&&e()&&(ao(s,"bottom"),r=null))},{passive:!0}),s.addEventListener("animationend",o=>{o.target===s&&o.animationName.startsWith("edge-flare")&&delete s.dataset.edge})}function tt(s){const e=document.getElementById(s);if(e===null)throw new Error(`required element #${s} is missing`);return e}function Di(s){const e=tt(s);if(!(e instanceof HTMLTemplateElement))throw new Error(`#${s} is not a template`);const t=e.content.firstElementChild;if(!(t instanceof HTMLElement))throw new Error(`template #${s} is empty`);return t.cloneNode(!0)}function Ls(s,e){const t=s.querySelector(e);if(t===null)throw new Error(`pane template is missing ${e}`);return t}const S0=24,Eu="argus.dormant";class Mz{constructor(e=S0,t){this.cap=e,this.store=t,this.rehydrate()}cap;store;groups=new Map;add(e){for(this.groups.delete(e.id),this.groups.set(e.id,e);this.groups.size>this.cap;){const t=this.oldest_id();if(t===void 0)break;this.groups.delete(t)}this.persist()}list(){return[...this.groups.values()].sort((e,t)=>t.lastTouched-e.lastTouched)}get(e){return this.groups.get(e)}has(e){return this.groups.has(e)}dismiss(e){const t=this.groups.delete(e);return t&&this.persist(),t}oldest_id(){let e;for(const t of this.groups.values())(e===void 0||t.lastTouched<e.lastTouched)&&(e=t);return e?.id}persist(){if(this.store!==void 0)try{this.store.setItem(Eu,JSON.stringify([...this.groups.values()]))}catch{}}rehydrate(){if(this.store!==void 0)try{const e=this.store.getItem(Eu);if(e===null)return;const t=JSON.parse(e);if(!Array.isArray(t))return;for(const i of t)i!==null&&typeof i=="object"&&typeof i.id=="string"&&this.groups.set(i.id,i)}catch{}}}function x0(){try{const s=globalThis.localStorage;return s===void 0?void 0:(s.getItem(Eu),s)}catch{return}}function vz(s){if(!s.startsWith("#/"))return null;let e;try{e=decodeURI(s.slice(1))}catch{return null}e=e.replace(/\/+$/,"")||"/";const t=e.split("/").filter(o=>o!==""),i=t[t.length-1]??"";return!t.includes("data")&&(/^feed_\d+$/.test(i)||/^[\w.-]+_\d+$/.test(i)&&t.some(o=>/^feed_\d+$/.test(o)))?{kind:"runs",target:i}:{kind:"folder",path:/\.[A-Za-z0-9]{1,8}$/.test(i)&&!/_\d+$/.test(i)?`/${t.slice(0,-1).join("/")}`:e}}function O0(s,e){return`${s.replace(/\/+$/,"")}/#${encodeURI(e)}`}const wz=2500;function E0(s){const e=document.createElement("div");e.className="link-line";const t=document.createElement("button");t.type="button",t.className="link-pill",t.textContent="LINK";const i=document.createElement("span");i.className="link-address",e.append(t,i),$p(e,s);const n=r=>{r.stopPropagation(),A0(e)};return t.addEventListener("click",n),i.addEventListener("click",n),e}function $p(s,e){const t=O0(window.location.origin,e),i=s.querySelector(".link-address");i!==null&&i.textContent!==t&&(i.textContent=t),s.dataset.link=t,s.title=`a link that opens ARGUS at ${e} — press to copy`}async function A0(s,e=navigator.clipboard){const t=s.dataset.link??"",i=s.querySelector(".link-pill");let n=!1;try{if(e===void 0)throw new Error("no clipboard");await e.writeText(t),n=!0}catch{const o=s.querySelector(".link-address"),a=window.getSelection();if(o!==null&&a!==null){const l=document.createRange();l.selectNodeContents(o),a.removeAllRanges(),a.addRange(l)}}s.dataset.copied=n?"yes":"no",i!==null&&(i.textContent=n?"COPIED":"SELECT + COPY");const r=Date.now();return s.dataset.shown=String(r),setTimeout(()=>{s.dataset.shown===String(r)&&(delete s.dataset.copied,i!==null&&(i.textContent="LINK"))},wz),n}const yz="desktop clear";function D0(s){const e=s.split(`
|
|
3
3
|
`).map(t=>t.trim()).filter(t=>t!==""&&!t.startsWith("#"));return["# ARGUS view: run these lines in the ARGUS console to see what I see",yz,...e].join(`
|
|
4
4
|
`)}const hg=2500;function zz(s,e=navigator.clipboard){document.querySelector(".share-sheet")?.remove();const t=document.createElement("div");t.className="share-sheet",t.setAttribute("role","dialog"),t.setAttribute("aria-label","share this view");const i=document.createElement("div");i.className="share-head",i.textContent="SHARE VIEW · THESE LINES, OR THE LINK, PUT ANYONE WHERE YOU ARE";const n=document.createElement("pre");n.className="share-script",n.textContent=s;const r=document.createElement("button");r.type="button",r.className="share-copy share-lines",r.textContent="COPY";const o=document.createElement("button");o.type="button",o.className="share-copy share-link",o.textContent="COPY LINK";const a=document.createElement("button");a.type="button",a.className="share-close",a.textContent="CLOSE";const l=document.createElement("div");l.className="share-pills",l.append(o,r,a),t.append(i,n,l),document.body.appendChild(t),ai(n,{mount:t});let c=0;const h=async()=>{let d=!1;try{if(e===void 0)throw new Error("no clipboard");await e.writeText(s),d=!0}catch{const p=window.getSelection();if(p!==null){const f=document.createRange();f.selectNodeContents(n),p.removeAllRanges(),p.addRange(f)}}t.dataset.copied=d?"yes":"no",r.textContent=d?"COPIED":"SELECT + COPY";const u=++c;window.setTimeout(()=>{u===c&&(delete t.dataset.copied,r.textContent="COPY")},hg)};return r.addEventListener("click",()=>{h()}),o.addEventListener("click",()=>{const d=Sz(window.location.origin,s);(e===void 0?Promise.reject(new Error("no clipboard")):e.writeText(d)).then(()=>{o.textContent="LINK COPIED"},()=>{n.textContent=d,o.textContent="LINK SHOWN: SELECT + COPY"}).finally(()=>{window.setTimeout(()=>{o.textContent="COPY LINK"},hg)})}),a.addEventListener("click",()=>t.remove()),t.addEventListener("keydown",d=>{d.key==="Escape"&&t.remove()}),h(),a.focus(),t}const Au="view=";function Sz(s,e){return`${s.replace(/\/+$/,"")}/#${Au}${encodeURIComponent(e)}`}function xz(s){if(!s.startsWith(`#${Au}`))return null;try{const e=decodeURIComponent(s.slice(Au.length+1));return e.trim()===""?null:e}catch{return null}}function Oz(s,e,t){document.querySelector(".share-sheet")?.remove();const i=document.createElement("div");i.className="share-sheet view-ask",i.setAttribute("role","dialog");const n=document.createElement("div");n.className="share-head",n.textContent=e.size>0?`A VIEW FROM ${t.toUpperCase()} · IT ASKS FOR MORE THAN A VIEW, SO IT WILL NOT RUN`:`A VIEW FROM ${t.toUpperCase()} · RUN THESE LINES?`;const r=document.createElement("pre");r.className="share-script",s.forEach((c,h)=>{const d=document.createElement("div");d.textContent=c;const u=e.get(h);u!==void 0&&(d.className="view-refused",d.textContent=`${c} ← ${u}`),r.appendChild(d)});const o=document.createElement("button");o.type="button",o.className="share-copy view-run",o.textContent="RUN",o.disabled=e.size>0;const a=document.createElement("button");a.type="button",a.className="share-close",a.textContent="NOT NOW";const l=document.createElement("div");return l.className="share-pills",l.append(o,a),i.append(n,r,l),document.body.appendChild(i),ai(r,{mount:i}),(e.size>0?a:o).focus(),new Promise(c=>{const h=d=>{i.remove(),c(d)};o.addEventListener("click",()=>h(!0)),a.addEventListener("click",()=>h(!1)),i.addEventListener("keydown",d=>{d.key==="Escape"&&h(!1)})})}class Ez{constructor(e,t){this.host=t,this.grid=e.querySelector(".panes-grid"),this.empty=e.querySelector(".panes-empty"),this.grid.addEventListener("click",this.click_handle)}host;grid;empty;render(){const e=this.host.list();this.empty.hidden=e.length>0,this.grid.replaceChildren(...e.map(t=>this.card_build(t)))}card_build(e){const t=document.createElement("button");t.className="panes-card",t.dataset.restore=e.id,t.title=`restore ${e.label}`;const i=document.createElement("span");if(i.className="panes-card-figure",e.thumbnail!==void 0){const a=document.createElement("img");a.src=e.thumbnail,a.alt="",i.appendChild(a)}else i.classList.add("panes-card-glyph"),i.textContent=e.members.includes("files")&&!e.members.includes("viewer")?"▤":"▣";t.appendChild(i);const n=document.createElement("span");n.className="panes-card-label",n.textContent=e.label,t.appendChild(n);const r=document.createElement("span");r.className="panes-card-badges";for(const a of Az(e.members)){const l=document.createElement("span");l.className="panes-card-badge",l.textContent=a.toUpperCase(),r.appendChild(l)}t.appendChild(r);const o=document.createElement("button");return o.className="panes-card-dismiss",o.dataset.dismiss=e.id,o.title=`forget ${e.label}`,o.textContent="DISMISS",t.appendChild(o),t}click_handle=e=>{const t=e.target,i=t.closest("[data-dismiss]");if(i!==null){e.stopPropagation();const r=i.dataset.dismiss??"";this.host.dismiss(r),this.render();return}const n=t.closest("[data-restore]");n!==null&&this.host.restore(n.dataset.restore??"")}}function Az(s){return[...new Set(s)]}const Dz="G1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MTsxbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MTsxbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtChtbMzg7MjswOzA7MG0gG1swbRtbMzg7MjswOzA7MG0gG1swbRtbMzg7MjswOzA7MG0gG1swbRtbMzg7MjswOzA7MG0gG1swbRtbMzg7MjswOzA7MG0gG1swbRtbMzg7MjswOzA7MG0gG1swbRtbMzg7MjswOzA7MG0gG1swbRtbMzg7MjswOzA7MG0gG1swbRtbMzg7MjswOzA7MG0gG1swbRtbMzg7MjswOzA7MG0gG1swbRtbMzg7MjswOzA7MG0gG1swbRtbMzg7MjswOzA7MG0gG1swbRtbMzg7MjswOzA7MG0gG1swbRtbMzg7MjswOzA7MG0gG1swbRtbMzg7MjswOzA7MG0gG1swbRtbMzg7MjswOzA7MG0gG1swbRtbMzg7MjswOzA7MG0gG1swbRtbMzg7MjswOzA7MG0gG1swbRtbMzg7MjswOzA7MG0gG1swbRtbMzg7MjswOzA7MG0gG1swbRtbMzg7MjswOzA7MG0gG1swbRtbMzg7MjswOzA7MG0gG1swbRtbMzg7MjswOzA7MG0gG1swbRtbMzg7MjswOzA7MG0gG1swbRtbMzg7MjswOzA7MG0gG1swbRtbMzg7MjswOzA7MG0gG1swbRtbMzg7MjswOzA7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A7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MTsybSAbWzBtG1szODsyOzE7MjszbSAbWzBtG1szODsyOzA7MTsxbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzk7MTc7MjRtIBtbMG0bWzM4OzI7MjM7NDU7NjJtLhtbMG0bWzM4OzI7NDE7Nzk7MTA5bTobWzBtG1szODsyOzU5OzExMzsxNTVtPRtbMG0bWzM4OzI7NzU7MTQ0OzE5NW0rG1swbRtbMzg7Mjs3NjsxNDQ7MTkzbSsbWzBtG1szODsyOzE0OzI3OzM3bSAbWzBtG1szODsyOzc1OzE0MjsxODltKxtbMG0bWzM4OzI7Nzc7MTQ1OzE5Mm0rG1swbRtbMzg7Mjs2NzsxMjY7MTY1bT0bWzBtG1szODsyOzU1OzEwMjsxMzRtLRtbMG0bWzM4OzI7NDE7Nzc7M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I0bSobWzBtG1szODsyOzEwMTsxODM7MjI0bSobWzBtG1szODsyOzkzOzE2ODsyMDVtKxtbMG0bWzM4OzI7ODE7MTQ4OzE3OW0rG1swbRtbMzg7Mjs2ODsxMjM7MTQ4bT0bWzBtG1szODsyOzUxOzkzOzExMm0tG1swbRtbMzg7MjszNDs2MTs3M206G1swbRtbMzg7MjsyMjs0MDs0N20uG1swbRtbMzg7Mjs5OzE2OzE5bSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MTsxbSAbWzBtG1szODsyOzA7MTsxbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtChtbMzg7MjswOzA7MG0gG1swbRtbMzg7MjswOzA7MG0gG1swbRtbMzg7MjswOzA7MG0gG1swbRtbMzg7MjswOzA7MG0gG1swbRtbMzg7MjswOzA7MG0gG1swbRtbMzg7MjswOzA7MG0gG1swbRtbMzg7MjswOzA7MG0gG1swbRtbMzg7MjswOzA7MG0gG1swbRtbMzg7MjswOzA7MG0gG1swbRtbMzg7MjswOzA7MG0gG1swbRtbMzg7MjswOzA7MG0gG1swbRtbMzg7MjswOzA7MG0gG1swbRtbMzg7MjswOzA7MG0gG1swbRtbMzg7MjswOzA7MG0gG1swbRtbMzg7MjswOzA7MG0gG1swbRtbMzg7MjswOzA7MG0gG1swbRtbMzg7MjswOzA7MG0gG1swbRtbMzg7MjswOzA7MG0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zM4OzI7MDswOzBtIBtbMG0bWzM4OzI7MDswOzBtIBtbMG0bWzM4OzI7MDswOzBtIBtbMG0bWzM4OzI7MDswOzBtIBtbMG0bWzM4OzI7MDswOzBtIBtbMG0bWzM4OzI7MDswOzBtIBtbMG0bWzM4OzI7MDswOzBtIBtbMG0bWzM4OzI7MDswOzBtIBtbMG0bWzM4OzI7MDswOzBtIBtbMG0KG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MTsxbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzE7MjszbSAbWzBtG1szODsyOzE7MjszbSAbWzBtG1szODsyOzE7MjszbSAbWzBtG1szODsyOzE7MjszbSAbWzBtG1szODsyOzE7MjsybSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtChtbMzg7MjswOzA7MG0gG1swbRtbMzg7MjswOzA7MG0gG1swbRtbMzg7MjswOzA7MG0gG1swbRtbMzg7MjswOzA7MG0gG1swbRtbMzg7MjswOzA7MG0gG1swbRtbMzg7MjswOzA7MG0gG1swbRtbMzg7MjswOzA7MG0gG1swbRtbMzg7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tbMG0bWzM4OzI7MDswOzBtIBtbMG0bWzM4OzI7MDswOzBtIBtbMG0bWzM4OzI7MDswOzBtIBtbMG0bWzM4OzI7MDswOzBtIBtbMG0bWzM4OzI7MDswOzBtIBtbMG0bWzM4OzI7MDswOzBtIBtbMG0bWzM4OzI7MDswOzBtIBtbMG0bWzM4OzI7MDswOzBtIBtbMG0bWzM4OzI7MDswOzBtIBtbMG0bWzM4OzI7MDswOzBtIBtbMG0bWzM4OzI7MDswOzBtIBtbMG0bWzM4OzI7MDswOzBtIBtbMG0bWzM4OzI7MDswOzBtIBtbMG0bWzM4OzI7MDswOzBtIBtbMG0bWzM4OzI7MDswOzBtIBtbMG0bWzM4OzI7MDswOzBtIBtbMG0KG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtG1szODsyOzA7MDswbSAbWzBtCg==",Tz=/\x1b\[[0-9;]*m/g,dg="\x1B[0m",ug="\x1B[7m",T0=atob(Dz).trimEnd().split(`
|
|
@@ -4288,16 +4288,16 @@ void main() {
|
|
|
4288
4288
|
`),!1}return t.outcome_write(n),n.envelopes.length>0&&n.envelopes.every(r=>r.status==="ok")}function rN(s){for(const e of s.envelopes){if(e.model?.kind!=="fs.acl")continue;const t=e.model.data[0];return t===void 0?null:{users:t.usernames??[],groups:t.groups??[],public:t.public===!0}}return null}function oN(s,e){return s.split(`
|
|
4289
4289
|
`).map(t=>t.trim().split(":")).filter(t=>t.length>=4&&(t[3]??"").split(",").includes(e)).map(t=>t[0]??"").filter(t=>t!=="")}function aN(s){return/^(u|user|g|group|o|other):/.test(s)?s:`u:${s}:r`}function lN(s,e){return e.kind==="public"?`setfacl -m o::- feed_${s}`:`setfacl -x ${e.kind==="user"?"u":"g"}:${Zr(e.name)} feed_${s}`}function nc(s){return s.kind==="public"?"PUBLIC":s.kind==="group"?`group ${s.name}`:s.name}function cN(s,e){const t={silent:!0,observe:!1},i=async c=>{try{return rN(await s.client.line_execute(`getfacl feed_${c}`,t))}catch{return null}},n=async()=>{const c=e.promptUser();if(c===null)return[];try{const h=await s.client.line_execute("cat /etc/group",t);return oN(h.envelopes.map(d=>d.rendered).join(""),c)}catch{return[]}},r=async(c,h,d)=>{await e.ask_onPane(c,{kind:"confirm",message:`Stop sharing feed_${h} with ${nc(d)}? `})==="y"&&await $o(s,lN(h,d))&&e.changed(h)};return{holders_read:i,holders_build:(c,h,d)=>{const u=document.createElement("span");u.className="holder-marks";const p=[...d.users.map(f=>({kind:"user",name:f})),...d.groups.map(f=>({kind:"group",name:f})),...d.public?[{kind:"public"}]:[]];if(p.length===0)return u.textContent="SHARED WITH NOBODY",u;u.append("SHARED WITH ");for(const f of p){const _=document.createElement("span");_.className=`holder-mark holder-${f.kind}`,_.title=nc(f);const g=document.createElement("span");g.className="holder-mark-name",g.textContent=nc(f),_.append(g);const m=document.createElement("span");m.className="holder-mark-x",m.title=`stop sharing with ${nc(f)} (asks first)`,m.textContent="×",m.addEventListener("click",v=>{v.stopPropagation(),r(c,h,f)}),_.append(m),u.append(_)}return u},share_choose:async(c,h)=>{for(;;){const[d,u]=await Promise.all([i(h),n()]),p=d??{groups:[],public:!1},f=[{value:"o::r",label:"EVERYONE",held:p.public},...u.map(g=>({value:`g:${g}:r`,label:g,held:p.groups.includes(g)}))],_=(await e.ask_onPane(c,{kind:"choose",message:`Share feed_${h} with a group, everyone, or a user: `,choices:f,commit:"SHARE",close:"DONE"})??"").trim();if(_===""||!await $o(s,`setfacl -m ${aN(_)} feed_${h}`))return;e.changed(h)}},rename:async(c,h,d)=>{const u=(await e.ask_onPane(c,{kind:"text",message:`Rename feed_${h} to: `,suggest:d,commit:"RENAME"})??"").trim();u===""||u===d||await $o(s,Jw(`/proc/jobs/feed_${h}/title`,u))&&e.changed(h)}}}function hN(s){for(const e of s.envelopes){if(e.model?.kind!=="fs.listing")continue;return(e.model.data[0]?.items??[]).map(i=>String(i.name??"")).filter(i=>i!=="")}return[]}function dN(s,e,t){const i=`setfattr -n tag -v ${Zr(e)} feed_${s}`;return t.includes(e)?[i]:[`mkdir ${Zr(`/proc/tags/${e}`)}`,i]}function uN(s,e){const t=async()=>{try{return hN(await s.client.line_execute("ls /proc/tags",{silent:!0,observe:!1}))}catch{return[]}};return{tag_choose:async(r,o,a)=>{const l=new Set(a);for(;;){const c=await t(),h=c.map(_=>({value:_,held:l.has(_)})),d=c.filter(_=>!l.has(_)).join(", "),p=(await e.ask_onPane(r,{kind:"choose",message:`Tag feed_${o}${d===""?"":` (${d})`}, or a new tag: `,choices:h,commit:"TAG",close:"DONE"})??"").trim();if(p===""||p.includes("/"))return;if(l.has(p))continue;let f=!0;for(const _ of dN(o,p,c))if(f=await $o(s,_),!f)break;if(!f)return;l.add(p),e.tags_changed(o)}},tag_remove:async(r,o)=>{const a=await $o(s,`setfattr -x tag -v ${Zr(o)} feed_${r}`);return a&&e.tags_changed(r),a}}}function fN(s,e){return{tags:uN(s,{ask_onPane:e.ask_onPane,tags_changed:e.changed}),access:cN(s,e)}}function pN(s){for(const e of s.envelopes){if(e.model?.kind!=="fs.xattr")continue;return e.model.data[0]?.tags??[]}return[]}function ey(s,e,t){const{panels:i,subjects:n}=s,{tags:r,access:o}=t;return{feed_verbs:a=>{const l={feedId:a.id},c={note:()=>s.terminal.line_run(`edit /proc/jobs/feed_${a.id}/note`),tag:()=>{r.tag_choose(e,a.id,a.tags??[])},rename:()=>{o.rename(e,a.id,a.title)},share:()=>{o.share_choose(e,a.id)},delete:()=>s.terminal.line_run(`feed rm feed_${a.id}`)};return Nv.rules.filter(h=>h.offered(l)).map(h=>({label:h.label(l),run:()=>c[h.name]?.()}))},feed_indicated:a=>{n.regard_write(e,{address:`/proc/jobs/feed_${a.id}`,modelKind:"feed"}),o.holders_read(a.id).then(l=>{i.get("dag",e)?.rowReadout_show(a.id,l===null?"ACCESS UNREAD":o.holders_build(e,a.id,l))})},feed_untag:(a,l)=>{r.tag_remove(a,l)},feed_entered:a=>{const l={silent:!0,observe:!1},c=h=>h!==null&&h.envelopes.every(d=>d.status==="ok")?h.envelopes.map(d=>d.rendered).join("").replace(/\x1b\[[0-9;]*m/g,""):null;Promise.all([s.client.line_execute(`cat /proc/jobs/feed_${a}/note`,l).catch(()=>null),s.client.line_execute(`getfattr feed_${a}`,l).catch(()=>null),s.client.line_execute(`cat /proc/jobs/feed_${a}/title`,l).catch(()=>null)]).then(([h,d,u])=>{(i.get("dag",e)??i.get("universe",e))?.feedMarks_show(a,{note:c(h),tags:d===null?[]:pN(d),title:(c(u)??"").trim()})})},feed_note:a=>s.terminal.line_run(`edit /proc/jobs/feed_${a}/note`),feed_tag:(a,l)=>{r.tag_choose(e,a,l)},feed_rename:(a,l)=>{o.rename(e,a,l)}}}const mN=256*1024*1024;function gN(s,e){const t=e.split("/").filter(o=>o.length>0).pop()??"download";if(s===null)return t;const i=/filename\*\s*=\s*UTF-8''([^;]+)/i.exec(s);if(i!==null)try{const o=decodeURIComponent((i[1]??"").trim());if(o.length>0)return o}catch{}const r=/filename\s*=\s*"([^"]*)"/i.exec(s)?.[1]??"";return r.length>0?r:t}function Xb(s){return s.redirected?"the session asked to log in again — nothing was saved":s.status===410?"cancelled — nothing was saved":s.ok?s.headers.get("content-disposition")===null?"the session answered with something other than the file — nothing was saved":null:s.status===404?"the session could not read that file — nothing was saved":`the session refused the file (HTTP ${s.status}) — nothing was saved`}function Zb(s,e){const t=document.createElement("a");t.href=s,t.download=e,t.rel="noopener",document.body.append(t),t.click(),t.remove()}function ty(){return`dl-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`}async function _N(s,e,t=fetch,i=ty()){const n=`${s}&dl=${encodeURIComponent(i)}`;let r;try{r=await t(`${n}&probe=1`,{method:"HEAD",credentials:"same-origin"})}catch(p){return{ok:!1,reason:`the session did not answer (${p instanceof Error?p.message:String(p)}) — nothing was saved`}}const o=Xb(r);if(o!==null)return{ok:!1,reason:o};const a=gN(r.headers.get("content-disposition"),e),l=Number(r.headers.get("content-length")??NaN);if(!Number.isFinite(l)||l>mN)return Zb(n,a),{ok:!0,name:a,bytes:Number.isFinite(l)?l:null,streamed:!0};let c;try{c=await t(n,{credentials:"same-origin"})}catch(p){return{ok:!1,reason:`the session did not answer (${p instanceof Error?p.message:String(p)}) — nothing was saved`}}const h=Xb(c);if(h!==null)return{ok:!1,reason:h};const d=await c.blob(),u=URL.createObjectURL(d);return Zb(u,a),setTimeout(()=>URL.revokeObjectURL(u),6e4),{ok:!0,name:a,bytes:d.size,streamed:!1}}const bN=1e3,MN=5e3,vN=3,wN=2e4;function Aa(s){const e=["B","KB","MB","GB","TB"];let t=s,i=0;for(;t>=1e3&&i<e.length-1;)t/=1e3,i+=1;return`${i===0?t.toFixed(0):t.toFixed(1)} ${e[i]}`}function rc(s){const e=Math.max(0,Math.round(s/1e3)),t=Math.floor(e/3600),i=Math.floor(e%3600/60),n=String(e%60).padStart(2,"0");return t>0?`${t}:${String(i).padStart(2,"0")}:${n}`:`${i}:${n}`}function yN(s,e){switch(s.phase){case"opening":return`WAITING FOR CUBE · ${rc(s.elapsedMs)}`;case"ready":return"CUBE ANSWERED · HANDING TO THE BROWSER";case"streaming":{if(s.bytes===0)return`WAITING FOR CUBE'S FIRST BYTE · ${rc(s.elapsedMs)}`;const t=[s.size!==void 0?`${Aa(s.bytes)} OF ${Aa(s.size)}`:Aa(s.bytes)];return s.size!==void 0&&s.size>0&&t.push(`${Math.floor(100*s.bytes/s.size)}%`),e!==null&&e>0&&(t.push(`${Aa(e)}/S`),s.size!==void 0&&t.push(`${rc(1e3*(s.size-s.bytes)/e)} LEFT`)),t.join(" · ")}case"done":return`DONE · ${Aa(s.bytes)} IN ${rc(s.elapsedMs)}`;case"failed":return`FAILED · ${s.reason??"the session did not say why"}`;case"cancelled":return"CANCELLED"}}function Jb(s){return s==="done"||s==="failed"||s==="cancelled"}function Qb(s,e,t){const i=new URL(s,window.location.href),n=i.searchParams.get("token");return i.search="",i.searchParams.set(e,t),n!==null&&i.searchParams.set("token",n),i.toString()}function zN(){let s=document.querySelector(".transfer-stack");return s===null&&(s=document.createElement("div"),s.className="transfer-stack",s.setAttribute("role","status"),document.body.appendChild(s)),s}function SN(s,e,t,i=fetch){const n=document.createElement("div");n.className="transfer-row",n.dataset.download=t,n.dataset.phase="opening";const r=document.createElement("span");r.className="transfer-name",r.textContent=s,r.title=s;const o=document.createElement("span");o.className="transfer-bar";const a=document.createElement("span");a.className="transfer-fill",o.appendChild(a);const l=document.createElement("span");l.className="transfer-words",l.textContent="ASKING THE SESSION";const c=document.createElement("button");c.type="button",c.className="transfer-action",c.textContent="CANCEL",n.append(r,o,l,c),zN().appendChild(n);let h=null,d=null,u=!1,p=null;const f=[],_=()=>n.remove(),g=()=>{u=!0,h!==null&&clearTimeout(h),c.textContent="CLOSE",c.title="dismiss this row",d=setTimeout(_,wN)},m=O=>{const M=Date.now();for(f.push({at:M,bytes:O});f.length>1&&M-(f[0]?.at??M)>6e3;)f.shift();const S=f[0];return S===void 0||M-S.at<900?null:(O-S.bytes)*1e3/(M-S.at)};let v=!1,y=0;const b=O=>{n.dataset.phase=O.phase;const M=yN(O,O.phase==="streaming"?m(O.bytes):null);l.textContent=v&&!Jb(O.phase)?`CANCELLING · ${M}`:M;const S=O.phase==="done"?1:O.size!==void 0&&O.size>0?O.bytes/O.size:0;a.style.width=`${(100*S).toFixed(1)}%`,Jb(O.phase)&&g()},w=async O=>{const M=new AbortController,S=setTimeout(()=>M.abort(),MN);try{const D=await i(Qb(e,O,t),{credentials:"same-origin",cache:"no-store",signal:M.signal});return D.ok?await D.json():"unknown"}catch{return null}finally{clearTimeout(S)}},z=async()=>{if(u)return;const O=await w("progress");if(!u){if(O===null)y+=1,y>=vN&&(l.textContent="LOST TOUCH WITH THE SESSION · STILL ASKING");else if(O==="unknown"){if(y=0,p??=Date.now(),Date.now()-p>5e3){n.dataset.phase="handed",l.textContent="HANDED TO THE BROWSER · SEE ITS DOWNLOADS",g();return}}else y=0,p=null,b(O);u||(h=setTimeout(()=>{z()},bN))}};return c.addEventListener("click",()=>{if(u){_();return}c.disabled=!0,v=!0,l.textContent="CANCELLING",w("cancel").then(O=>{c.disabled=!1,!u&&(O===null?(v=!1,l.textContent="THE CANCEL GOT NO ANSWER FROM THE SESSION · PRESS CANCEL AGAIN"):O==="unknown"?(v=!1,n.dataset.phase="handed",l.textContent="THE SESSION DOES NOT KNOW THIS DOWNLOAD · CANCEL IT IN THE BROWSER'S DOWNLOADS",g()):b(O))})}),z(),{element:n,show:b,fail:O=>{u||i(Qb(e,"progress",t),{credentials:"same-origin",cache:"no-store"}).then(async M=>M.ok?await M.json():null).catch(()=>null).then(M=>{u||b(M!==null&&M.phase==="failed"?M:{phase:"failed",bytes:0,reason:O,elapsedMs:0})})},stop:()=>{u=!0,h!==null&&clearTimeout(h),d!==null&&clearTimeout(d)}}}const sy=/\.(csv|tsv)$/i;function eM(s){return s.replace(/\x1b\[[0-9;:]*[A-Za-z]/g,"")}function iy(s){return Hu.test(s)||Qc.test(s)}function Zf(s){const e=/_(\d+)\/data\/?$/.exec(s);return e===null?null:parseInt(e[1]??"",10)}function Za(s){const e=s.match(/\/(?:feeds|jobs)\/feed_(\d+)(?:\/|$)/);return e===null?null:Number(e[1])}function xN(s){return/^\/(proc|net|etc|usr)(\/|$)/.test(s)}function ON(s){for(const e of s.envelopes){const t=e.model;if(typeof t!="object"||t===null)continue;const i=t.data;if(t.kind!=="fs.acl"||!Array.isArray(i))continue;const n=[];for(const r of i)Array.isArray(r.usernames)&&n.push(...r.usernames.map(String)),Array.isArray(r.groups)&&n.push(...r.groups.map(o=>`group ${String(o)}`)),r.public===!0&&n.push("PUBLIC");return n.length===0?"SHARED WITH NOBODY":`SHARED WITH ${n.join(", ")}`}return"ACCESS UNREAD"}function EN(s,e){const{panels:t,subjects:i}=s,n=new Map,r=new Map,o=new Map,a=S=>{const D=e.downloadUrl_build(S),T=ty(),E=S.split("/").filter(C=>C.length>0).pop()??S,x=SN(E,D,T);s.terminal.line_note(`download: asking the session for ${E}`),_N(D,S,fetch,T).then(C=>{C.ok||x.fail(C.reason),s.terminal.line_note(C.ok?`download: ${C.name}${C.streamed?" — handed to the browser; its progress is on the transfer row":""}`:`download: ${S}: ${C.reason}`)})},l=S=>s.client.line_execute(`cat "${S}"`,{silent:!0,observe:!1}).then(D=>{if(!D.envelopes.some(x=>x.status==="error"))return{ok:!0,text:eM(D.envelopes.map(x=>x.rendered).join(`
|
|
4290
4290
|
`))};const E=D.envelopes.flatMap(x=>(x.errors??[]).map(C=>C.message)).concat(D.envelopes.map(x=>x.renderedErr??"")).map(x=>eM(x).trim()).filter(x=>x!=="").join(`
|
|
4291
|
-
`);return{ok:!1,text:E===""?"the session refused this read and said nothing further":E}}),c=async(S,D)=>{const T=await fetch(e.vfsUrl_build(S));if(!T.ok||T.body===null)return(await l(S)).text.slice(0,D);const E=T.body.getReader(),x=new TextDecoder;let C="";for(;C.length<D;){const{done:I,value:B}=await E.read();if(I)break;C+=x.decode(B,{stream:!0})}return E.cancel().catch(()=>{}),C.slice(0,D)},h=async S=>{const D=/_id(\d+)$/.exec(S)?.[1]??S.replace(/^.*\//,""),T=await s.client.line_execute(`pipeline diagram ${D}`,{silent:!0,observe:!1});for(const E of T.envelopes){if(E.model?.kind!==Jn.pipelineDiagram)continue;const x=Kp.safeParse(E.model.data);if(x.success)return x.data.nodes.map(C=>({id:C.id,parentIds:[...C.parentIds,...C.joinParentIds??[]]}))}return null},d={imageUrl:e.vfsUrl_build,download:a,textHead:c,pipelineGlimpse:h},u=(S,D,T)=>{const E=T==="~"?"ls ~":`ls "${T}"`;s.client.line_execute(E,{silent:!0,observe:!1}).then(x=>{for(const C of x.envelopes)D.envelope_observe(C);if(T!=="~"&&D.path_current()!==T.replace(/\/+$/,"")){const C=x.envelopes.find(B=>B.status==="error"),I=C!==void 0?zv(C):"the session answered no listing";D.listing_fail(I),s.terminal.line_note(`files: ${T}: ${I}`)}},x=>{const C=x instanceof Error?x.message:String(x);D.listing_fail(C),s.terminal.line_note(`files: ${T}: ${C}`)})},p=(S,D,T)=>{const E=D.path_current();E!==null&&n.get(S)?.push(E),u(S,D,T)},f=(S,D)=>{const T=n.get(S)?.pop();T!==void 0&&u(S,D,T)},_=S=>{o.get(S)?.()},g=(S,D)=>{r.set(S,D),_(S);const T=t.get("files",S);T?.follow_set(D),D&&T!==void 0&&s.client.line_execute("ls",{silent:!0,observe:!1}).then(E=>{for(const x of E.envelopes)T.envelope_observe(x)})},m=(S,D)=>{const T=t.get("files",S);T!==void 0&&(r.get(S)===!0?s.terminal.line_run("ls"):u(S,T,D))},v=(S,D)=>{e.ask_onPane(S,{message:`New directory in ${D}: `,kind:"text",commit:"MAKE IT"}).then(T=>{const E=(T??"").trim();E!==""&&(s.terminal.line_run(`mkdir "${D}/${E}"`),m(S,D))})},y=async(S,D,T)=>{for(const E of T){const x=`${D}/${E.name}`;s.terminal.line_note(`putting ${E.name} in ${D}…`);try{const C=await fetch(e.vfsUrl_build(x),{method:"POST",body:E});if(!C.ok){s.terminal.line_note(`upload: ${E.name}: ${(await C.text()).trim()||C.statusText}`);continue}s.terminal.line_note(`✓ ${x}`)}catch(C){s.terminal.line_note(`upload: ${E.name}: ${C instanceof Error?C.message:String(C)}`)}}m(S,D)},b=(S,D,T)=>{if(T.kind==="dir"){r.get(S)===!0?s.terminal.line_run(`cd "${T.path}"`):p(S,D,T.path);return}if(T.kind==="plugin"||T.kind==="pipeline"){e.binEntry_show(S,D,T.path,T.kind);return}if(iy(T.path)){e.image_open(S,T.path).then(E=>s.terminal.line_note(E));return}if(i.regard_write(S,{address:T.path,modelKind:"fs.file"}),!i.groupHasViewer(S)){if(Ch(T.path)){D.contentImage_show(T.path,e.vfsUrl_build(T.path));return}l(T.path).then(E=>{if(!E.ok){D.contentRefused_show(T.path,E.text);return}sy.test(T.path)?D.contentTable_show(T.path,E.text):D.content_show(T.path,E.text)})}},w=()=>{const S=e.template_stamp("tpl-pane-files").querySelector(".files-body");if(S===null)throw new Error("tpl-pane-files has no files-body");return S},z=(S,D,T)=>{const E=`"${T}"`,x=D.type==="dir"||D.type==="vfs"||D.type==="job",C=Za(T),I={kind:D.type==="plugin"||D.type==="pipeline"?"catalogue":x&&sd(T,D.name)?"seriesFolder":D.type==="file"?"file":"directory",feed:C,node:C===null?null:Zf(T),bound:e.catalogue_of(S)!==void 0,projection:xN(T),editable:D.type==="file"&&bS(T)},B={image:()=>{e.image_open(S,T).then(N=>s.terminal.line_note(N))},download:()=>a(T),link:()=>{const N=O0(window.location.origin,T);(t.get("files",S)?.link_copy(T)??navigator.clipboard.writeText(N).then(()=>!0,()=>!1)).then(F=>s.terminal.line_note(F?`link copied: ${N}`:`link (copy it): ${N}`))},process:()=>e.process_open(S,{input:T,feed:C,node:C===null?null:Zf(T)}),gather:()=>e.cohort_gather([{kind:x?"dir":"file",seriesUID:T,description:D.name,imagery:sd(T,D.name),modality:sd(T,D.name)?"MR":"—",patient:e.promptUser()??"",vfsPath:T,folderPath:T}]),run:()=>e.run_press(S,D.name,D.type==="pipeline"?"pipeline":"plugin"),edit:()=>{const N=Qw(T),P=nN(D.name,D.size,_S);if(P===null){e.verbLine_run(S,N);return}e.ask_onPane(S,{kind:"confirm",message:P}).then(F=>{F==="y"&&e.verbLine_run(S,N)})},move:()=>e.verbLine_run(S,`mv ${E}`),copy:()=>e.verbLine_run(S,`cp ${E}`),delete:()=>e.verbLine_run(S,`rm ${x?"-ri":"-i"} ${E}`),share:()=>e.verbLine_run(S,`setfacl ${E}`)};return Bv.rules.filter(N=>N.offered(I)).map(N=>({label:N.label(I),run:()=>B[N.name]?.()}))},O=(S,D)=>{const T=D.map(([B])=>B),E=T.map(B=>`"${B}"`).join(" "),x=[];for(const B of T){const N=Za(B);N!==null&&!x.includes(N)&&x.push(N)}const C={count:T.length,feeds:x},I={delete:()=>e.verbLine_run(S,`rm -rI ${E}`),move:()=>s.terminal.line_run(`mv -t ${E}`),copy:()=>s.terminal.line_run(`cp -t ${E}`),share:()=>s.terminal.line_run(`setfacl ${x.map(B=>`feed_${B}`).join(" ")}`)};return Gv.rules.filter(B=>B.offered(C)).map(B=>({label:B.label(C),run:()=>I[B.name]?.()}))};return{previewProvider:d,fileText_fetch:l,file_save:a,rootedListing_show:u,listing_refresh:m,directory_make:v,files_deliver:y,follows:S=>r.get(S)===!0,follow_set:g,cwdBind_sync_register:(S,D)=>{o.set(S,D)},cwdBind_sync:_,rooted_walk:p,rooted_back:f,filesBody_stamp:w,rowVerbs_of:z,instance_build:(S,D,T=!1)=>{const E=e.template_stamp("tpl-pane-files"),x=new xv(e.pane_find(E,".files-panel"),I=>b(S,x,I),d,{catalogue:T});x.selectionVerbs_declare(I=>O(S,I)),x.rowVerbs_declare((I,B)=>z(S,I,B),(I,B)=>{i.regard_write(S,{address:B,modelKind:"fs.file"}),Za(B)!==null&&s.client.line_execute(`getfacl "${B}"`,{silent:!0,observe:!1}).then(N=>{x.rowReadout_show(B,ON(N))}).catch(()=>{x.rowReadout_show(B,"ACCESS UNREAD")})}),t.set("files",S,x);const C=e.promptUser();return C!==null&&C!==""&&x.home_set(`/home/${C}`),n.set(S,[]),r.set(S,D),_(S),x.follow_set(D),{id:S,kind:"files",mount:E,dispose:()=>{t.delete(S),n.delete(S),i.pane_leave(S)}}}}}function AN(s,e){const t=Di("tpl-pane-universe"),i=new iN({canvas:Ls(t,".universe-canvas"),title:Ls(t,".universe-title"),state:t.querySelector(".pane-state"),empty:Ls(t,".universe-empty"),projectionPill:t.querySelector(".universe-projection"),refreshPill:t.querySelector(".universe-refresh"),replayPill:t.querySelector(".universe-replay"),scalePill:t.querySelector(".universe-scale"),viewPill:t.querySelector(".universe-view"),gravityPill:t.querySelector(".universe-gravity"),densityPill:t.querySelector(".universe-density"),drawPill:t.querySelector(".universe-draw"),captionsPill:t.querySelector(".universe-captions"),arrangementPill:t.querySelector(".universe-arrangement"),facts:t.querySelector(".universe-facts"),backPill:t.querySelector(".universe-back"),openPill:t.querySelector(".universe-open"),frame:t.querySelector(".mode-frame")},{watch_set:(n,r)=>{r?s.client().watch_send(n):s.client().unwatch_send(n)},...(({feed_entered:n,feed_note:r,feed_tag:o,feed_rename:a,feed_untag:l})=>({feed_entered:n,feed_note:r,feed_tag:o,feed_rename:a,feed_untag:l}))(ey(s.context(),e,s.feedVerbs())),command_run:n=>{s.client().line_execute(n,{silent:!0,observe:!1}).then(r=>{for(const o of r.envelopes)i.envelope_observe(o)})},feed_dag:async n=>{const r=await s.client().line_execute(`feed diagram feed_${n}`,{silent:!0,observe:!1});for(const o of r.envelopes){if(o.model?.kind!==Jn.feedDag)continue;const a=Yp.safeParse(o.model.data);if(a.success)return a.data}return null},node_enter:n=>{s.terminal().line_run(`cd "${n}"`)},node_dive:n=>{s.nodeOverlay_open(e,n.replace(/\/data$/,""))},node_process:n=>{const r=Za(n.vfsPath)??(/\/feed_(\d+)(?:\/|$)/.exec(n.vfsPath)===null?null:Number(/\/feed_(\d+)(?:\/|$)/.exec(n.vfsPath)[1])),o=s.promptUser()===null?n.vfsPath:n.vfsPath.replace(/^\/proc\/jobs\//,`/home/${s.promptUser()}/feeds/`);s.process_open(e,{input:o,feed:r,node:n.instanceId})},feed_open:n=>{s.runs_show(),s.dag_primary().feed_enter(n)},plugin_open:n=>{(async()=>{const r=await s.client().line_execute("ls /bin",{silent:!0,observe:!1}),o=[];for(const l of r.envelopes){if(l.model?.kind!=="fs.listing")continue;const c=l.model.data,h=Array.isArray(c)?c:[c];for(const d of h)for(const u of d.items??[])o.push(u.name)}const a=o.filter(l=>l.startsWith(`${n}-v`)).sort((l,c)=>l.localeCompare(c,void 0,{numeric:!0})).pop();if(a===void 0){s.terminal().line_note(`universe: ${n} is not in /bin`);return}tt("gutter-files").click(),s.binEntry_show("files",s.panels().get("files","files"),`/bin/${a}`,"plugin")})().catch(r=>{s.terminal().line_note(`universe: could not open ${n} in /bin: ${r instanceof Error?r.message:String(r)}`)})},note:n=>s.terminal().line_note(n)},x0());return s.panels().set("universe",e,i),{id:e,kind:"universe",mount:t,dispose:()=>{s.panels().delete(e),s.subjects().pane_leave(e),i.dispose()}}}function DN(s,e,t){const i=Di("tpl-pane-dag"),n=new IG(Ls(i,".dag-canvas"),Ls(i,".dag-title"),Ls(i,".dag-facts"),Ls(i,".dag-empty"),Ls(i,".dag-strategy"),Ls(i,".dag-feedlist"),{command_run:r=>{s.client().line_execute(r,{silent:!0,observe:!1}).then(o=>{for(const a of o.envelopes)n.envelope_observe(a)})},watch_set:(r,o)=>{o?s.client().watch_send(r):s.client().unwatch_send(r)},node_enter:r=>{s.terminal().line_run(`cd "${r}"`)},node_dive:r=>{s.nodeOverlay_open(e,r.replace(/\/data$/,""))},node_regard:r=>{s.subjects().regard_write(e,{address:r,modelKind:"feed.node"})},node_process:r=>{const o=Za(r.vfsPath)??(/\/feed_(\d+)(?:\/|$)/.exec(r.vfsPath)===null?null:Number(/\/feed_(\d+)(?:\/|$)/.exec(r.vfsPath)[1])),a=s.promptUser()===null?r.vfsPath:r.vfsPath.replace(/^\/proc\/jobs\//,`/home/${s.promptUser()}/feeds/`);s.process_open(e,{input:a,feed:o,node:r.instanceId})},feed_regard:r=>{s.subjects().regard_write(e,{address:r,modelKind:"feed"})},...ey(s.context(),e,s.feedVerbs()),...t?{feed_shown:()=>s.dag_summon()}:{}});return s.panels().set("dag",e,n),{id:e,kind:"dag",mount:i,dispose:()=>{s.nodeOverlay().dispose(e),s.panels().delete(e),s.subjects().pane_leave(e),n.dispose()}}}function TN(s){return{universe_build:e=>AN(s,e),dag_build:(e,t)=>DN(s,e,t)}}const ny=new Set(["files"]);function IN(s){ny.add(s)}function tM(s){return ny.has(s)}const ry=new Map,sa=new Map;let CN=0;function cn(s,e){ry.set(s,e)}function RN(s){const e=ry.get(s);if(e===void 0)throw new Error(`no pane factory registered for kind '${s}'`);const t=e(`${s}-${CN++}`);return sa.set(t.id,t),t}function oc(s){sa.set(s.id,s)}function Dc(s){return sa.get(s)}function Tc(){return[...sa.values()]}function xs(s){const e=sa.get(s);e!==void 0&&(sa.delete(s),e.dispose?.(),e.mount.remove())}class BN{byId=new Map;set(e,t,i){this.byId.set(t,{kind:e,panel:i})}get(e,t){const i=this.byId.get(t);return i!==void 0&&i.kind===e?i.panel:void 0}has(e,t){return this.byId.get(t)?.kind===e}delete(e){return this.byId.delete(e)}ids(e){return this.entries(e).map(([t])=>t)}entries(e){const t=[];for(const[i,n]of this.byId)n.kind===e&&t.push([i,n.panel]);return t}values(e){return this.entries(e).map(([,t])=>t)}idOf(e,t){for(const[i,n]of this.byId)if(n.kind===e&&n.panel===t)return i;return null}}const GN="modulepreload",NN=function(s,e){return new URL(s,e).href},sM={},Jf=function(e,t,i){let n=Promise.resolve();if(t&&t.length>0){let c=function(h){return Promise.all(h.map(d=>Promise.resolve(d).then(u=>({status:"fulfilled",value:u}),u=>({status:"rejected",reason:u}))))};const o=document.getElementsByTagName("link"),a=document.querySelector("meta[property=csp-nonce]"),l=a?.nonce||a?.getAttribute("nonce");n=c(t.map(h=>{if(h=NN(h,i),h in sM)return;sM[h]=!0;const d=h.endsWith(".css"),u=d?'[rel="stylesheet"]':"";if(i)for(let f=o.length-1;f>=0;f--){const _=o[f];if(_.href===h&&(!d||_.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${h}"]${u}`))return;const p=document.createElement("link");if(p.rel=d?"stylesheet":GN,d||(p.as="script"),p.crossOrigin="",p.href=h,l&&p.setAttribute("nonce",l),document.head.appendChild(p),d)return new Promise((f,_)=>{p.addEventListener("load",f),p.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${h}`)))})}))}function r(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return n.then(o=>{for(const a of o||[])a.status==="rejected"&&r(a.reason);return e().catch(r)})},kN=/Failed to fetch dynamically imported module|error loading dynamically imported module|Importing a module script failed/i;function km(s){const e=s instanceof Error?s.message:String(s??"");return kN.test(e)}const jo={before:"ARGUS has been updated in the background — ",refresh:"refresh",after:" this page"},PN=`${jo.before}${jo.refresh}${jo.after}`,ph="ARGUS UPDATED IN THE BACKGROUND · REFRESH THIS PAGE";function LN(s,e=document.body){let t=!1;const i=()=>{if(t)return;t=!0,s(`argus: ${PN} (what failed to load was part of the old build)`);const n=document.createElement("div");n.className="stale-page",n.setAttribute("role","alert");const r=document.createElement("span");r.className="stale-page-words";const o=document.createElement("button");o.type="button",o.className="stale-page-reload",o.textContent=jo.refresh,o.title="load the argus the server has now",o.addEventListener("click",()=>{window.location.reload()}),r.append(document.createTextNode(jo.before),o,document.createTextNode(jo.after)),n.append(r),e.appendChild(n)};window.addEventListener("vite:preloadError",()=>{i()}),window.addEventListener("unhandledrejection",n=>{km(n.reason)&&i()})}const WN=[{label:"",tag:"PatientName"},{label:"MRN",tag:"PatientID"},{label:"ACC",tag:"AccessionNumber"},{label:"",tag:"StudyDescription"},{label:"",tag:"SeriesDescription"},{label:"",tag:"StudyDate"},{label:"",tag:"PatientAge"},{label:"",tag:"PatientSex"}],FN=256*1024*1024;function ac(s){const e=["B","KB","MB","GB","TB"];let t=s,i=0;for(;t>=1024&&i<e.length-1;)t/=1024,i++;return i===0?`${s} B`:`${t.toFixed(1)} ${e[i]}`}function UN(s){const e=s.toUpperCase();return e==="MR"||e==="CT"||e==="PT"?e:"OT"}class $N{pane;field;title;modeSpan;stateSpan;layoutPills=new Map;overlayPill;colormapPill;savePill;loadPill;retryPill;presetPill;focusMark;guardBytes=FN;forced=!1;pendingLayout=null;progressNote=null;overlayNote=null;probeNote=null;overlay=!1;overlayLines=[];presetIndex=-1;toolPills=new Map;handlers;engine=null;series=null;siblings=[];colormap="gray";tool="wl";constructor(e,t){this.handlers=t,this.pane=e,this.field=ti(e,".image-field"),this.title=ti(e,".pane-title"),this.modeSpan=ti(e,".pane-mode"),this.stateSpan=ti(e,".pane-state");for(const i of e.querySelectorAll(".image-layout")){const n=i.dataset.layout??"single";this.layoutPills.set(n,i),i.addEventListener("click",()=>{this.layout_set(n)})}this.overlayPill=ti(e,".image-overlay"),this.overlayPill.addEventListener("click",()=>{this.overlay_set(!this.overlay)}),this.colormapPill=ti(e,".image-colormap"),this.savePill=ti(e,".image-save"),this.loadPill=ti(e,".image-load"),this.retryPill=ti(e,".image-retry"),this.presetPill=ti(e,".image-preset"),this.focusMark=ti(e,".image-focus"),this.field.tabIndex=0,this.colormapPill.addEventListener("click",()=>{this.colormap_cycle()}),this.savePill.addEventListener("click",()=>{this.annotations_save()}),this.loadPill.addEventListener("click",()=>{this.load_press()}),this.retryPill.addEventListener("click",()=>{this.retry_press()}),this.presetPill.addEventListener("click",()=>this.preset_cycle()),ti(e,".image-tags").addEventListener("click",()=>this.handlers.tags_open());for(const i of Tg){const n=ti(e,`.image-tool[data-tool="${i}"]`);this.toolPills.set(i,n),n.addEventListener("click",()=>{this.tool_set(i)})}this.toolPills_paint(),this.field.addEventListener("mousedown",()=>{this.field.focus(),this.focusMark_paint(!0)}),this.field.addEventListener("focusin",()=>this.focusMark_paint(!0)),this.field.addEventListener("focusout",i=>{(!(i.relatedTarget instanceof Node)||!this.field.contains(i.relatedTarget))&&this.focusMark_paint(!1)}),this.field.addEventListener("keydown",i=>{if(i.key==="Escape"){this.field_release(),i.stopPropagation();return}i.stopPropagation()})}field_hasFocus(){return document.activeElement instanceof Node&&this.field.contains(document.activeElement)}field_release(){return this.field_hasFocus()?(document.activeElement.blur(),this.focusMark_paint(!1),!0):!1}async series_show(e,t={}){if(this.engine_dispose(),this.series=e,this.forced=t.force===!0,this.pendingLayout=null,this.loadPill.hidden=!0,this.retryPill.hidden=!0,this.presets_paint(e.modality),this.siblings=t.siblings??[],this.pane.dataset.modality=UN(e.modality),this.title.textContent=`IMAGE ${e.modality.toUpperCase()} ${e.seriesDescription}`.trim(),this.title.title=this.title.textContent,this.siblings.length>1){const o=this.siblings.findIndex(a=>a.path===e.path)+1;this.handlers.note(`image: series ${o} of ${this.siblings.length} in this study; image series <n> switches`)}const i=await this.chunk_import(()=>Jf(()=>import("./cornerstoneEngine-BAQ0J1wm.js").then(o=>o.b2),__vite__mapDeps([0,1,2]),import.meta.url));if(i===null)return;const{CornerstoneEngine:n}=i,r=new n(this.engineHost_get(),e,t.startAt??1);await this.engine_open(r),this.engine===r&&(this.guard_trips()?(this.loadPill.hidden=!1,this.stateSpan.textContent=`SERIES ${ac(e.bytes)} · LOAD FOR STACK`,this.handlers.note(`image: ${ac(e.bytes)} to fetch before the stack scrolls; press LOAD, image load, or image --force <path>`)):r.slices_fill(),await this.annotations_reload(r,e))}async annotations_reload(e,t){let i=0;for(const n of t.annotations.filter(r=>/\.dcm$/i.test(r))){if(this.engine!==e)return;const r=n.split("/").pop()??n;try{const o=await fetch(this.handlers.source.url_of(n));if(!o.ok){this.handlers.note(`image: ${r}: HTTP ${o.status}`);continue}const a=await e.annotations_import(await o.arrayBuffer());i+=a,this.handlers.note(a>0?`image: ${a} measurement${a===1?"":"s"} from ${r}`:`image: ${r}: no measurements this engine can place`)}catch(o){this.handlers.note(`image: ${r}: ${o instanceof Error?o.message:String(o)}`)}}this.pane.dataset.annotations=String(i)}async volume_show(e){this.engine_dispose(),this.series=null,this.siblings=[],this.pane.dataset.modality="NIFTI",this.title.textContent=`IMAGE ${e.split("/").pop()??""}`,this.title.title=e,this.forced=!0,this.loadPill.hidden=!0,this.retryPill.hidden=!0,this.presets_paint("NIFTI");const t=await this.chunk_import(()=>Jf(()=>import("./niivueEngine-DLksea28.js"),__vite__mapDeps([3,1]),import.meta.url));if(t===null)return;const{NiivueEngine:i}=t;await this.engine_open(new i(this.engineHost_get(),e))}async chunk_import(e){try{const t=await e();if(t!==void 0)return t}catch(t){if(!km(t))throw t}return ws(this.stateSpan,"stale",ph),this.handlers.note(`image: ${ph.toLowerCase()} — the viewer's code is of an older build than the server has`),null}opening_show(e){const t=e.replace(/\/$/,"").split("/").pop()??e;this.stateSpan.textContent="OPENING",this.progress_show({label:`OPENING ${t}`,done:0,total:0})}opening_fail(e,t){this.stateSpan.textContent=t,this.progress_show({label:t,done:0,total:0});const i=this.progressNote;i!==null&&(i.classList.add("image-working-failed"),i.querySelector(".image-working-count").textContent=e)}siblings_get(){return this.siblings}series_get(){return this.series}state_get(){return this.engine===null?null:{...this.engine.state_get(),colormap:this.colormap,path:this.series?.path??null,guard:this.guardBytes,waiting:this.pendingLayout}}async layout_set(e){if(this.engine===null)return!1;if(e!=="single"&&this.guard_trips())return this.pendingLayout=e,this.loadPill.hidden=!1,this.stateSpan.textContent=`SERIES ${ac(this.series?.bytes??0)} · LOAD FOR ${e.toUpperCase()}`,this.handlers.note(`image: ${ac(this.series?.bytes??0)} to fetch for ${e}; press LOAD, image load, or image --force <path>`),!1;const t=this.engine.state_get().layout;return this.layoutPills_paint(e),this.modeSpan.textContent=e==="single"?"":e.toUpperCase(),this.overlay_hide(),await this.engine.layout_set(e)?(this.progress_show(null),this.overlay_paint(),this.toolPills_paint(),!0):(this.progress_show(null),this.layoutPills_paint(t),this.modeSpan.textContent=t==="single"?"":t.toUpperCase(),this.handlers.note(`image: layout ${e}: not offered by ${this.engine.name}`),!1)}layoutPills_paint(e){for(const[t,i]of this.layoutPills)i.classList.toggle("rail-off",t!==e)}guard_trips(){return this.guardBytes!==null&&!this.forced&&this.engine?.name==="cornerstone"&&(this.series?.bytes??0)>this.guardBytes}async load_press(){this.forced=!0,this.loadPill.hidden=!0,this.retryPill.hidden=!0;const e=this.pendingLayout;return this.pendingLayout=null,e!==null?this.layout_set(e):this.engine===null||this.engine.state_get().filled?!1:this.engine.slices_fill()}guard_set(e){this.guardBytes=e}guard_get(){return this.guardBytes}preset_cycle(){const e=this.presets_for(this.series?.modality??"NIFTI");if(e.length===0)return;this.presetIndex=(this.presetIndex+1)%e.length;const t=e[this.presetIndex];t!==void 0&&this.wl_set(t.lower,t.upper)&&(this.presetPill.textContent=t.name.toUpperCase())}presets_for(e){const t=e.toUpperCase();return iv.filter(i=>i.modalities.length===0||i.modalities.includes(t))}presets_paint(e){this.presetIndex=-1;const t=this.presets_for(e);this.presetPill.hidden=t.length===0,this.presetPill.textContent="PRESET"}slice_set(e){if(this.engine===null)return!1;const t=this.engine.slice_set(e);return t||this.handlers.note(`image: slice ${e}: not offered in ${this.engine.state_get().layout} layout by ${this.engine.name}`),t}wl_set(e,t){if(this.engine===null)return!1;const i=this.engine.wl_set(e,t);return i||this.handlers.note(`image: wl: not offered by ${this.engine.name}`),i}ghost_set(e){if(this.engine===null)return!1;const t=this.engine.ghost_set(e);return t||this.handlers.note("image: ghost applies to the SLAB layout"),t}wlPreset_set(e){const t=this.series?.modality??"NIFTI",i=wO(e,t);return i===void 0?(this.handlers.note(`image: wl preset ${e}: none for ${t}`),!1):this.wl_set(i.lower,i.upper)}colormap_set(e){return this.engine===null?!1:this.engine.colormap_set(e)?(this.colormap=e,this.colormapPill.textContent=e.toUpperCase(),!0):(this.handlers.note(`image: colormap ${e}: not offered by ${this.engine.name}`),!1)}tool_set(e){return this.engine===null?!1:this.engine.tool_set(e)?(this.tool=e,this.toolPills_paint(),!0):(this.handlers.note(`image: ${e}: not offered by ${this.engine.name}`),!1)}async annotations_save(){if(this.engine===null)return!1;const e=this.series?.seriesInstanceUID,t=/^(\/home\/[^/]+)\//.exec(this.series?.path??"")?.[1];if(e===void 0||t===void 0)return this.handlers.note("image: save: this series has no UID to file an annotation under"),!1;const i=await this.engine.annotations_export();if(i===null)return this.handlers.note(`image: save: nothing measured, or ${this.engine.name} writes no report`),!1;const n=`${t}/annotations/${e}/measurements.dcm`,r=await this.handlers.file_put(n,i);return this.handlers.note(r===200?`✓ ${n}`:`image: save: ${n}: HTTP ${r}`),r===200}dispose(){this.engine_dispose()}async colormap_cycle(){const e=_c[(_c.indexOf(this.colormap)+1)%_c.length]??"gray";this.colormap_set(e)}async engine_open(e){this.engine=e,this.field.replaceChildren(),this.progressNote=null,this.overlayNote=null,this.probeNote=null,this.layoutPills_paint("single"),this.modeSpan.textContent="",this.colormapPill.textContent=this.colormap.toUpperCase();try{await e.open(this.field)}catch(i){this.stateSpan.textContent="REFUSED",this.handlers.note(`image: ${i instanceof Error?i.message:String(i)}`);return}const t=e.state_get().layout;this.layoutPills_paint(t),this.modeSpan.textContent=t==="single"?"":t.toUpperCase(),e.tool_set(this.tool),this.toolPills_paint(),this.progress_show(null),this.overlay_fill()}engine_dispose(){this.engine?.dispose(),this.engine=null,this.progressNote=null,this.overlayNote=null,this.probeNote=null,this.field.replaceChildren(),this.stateSpan.textContent=""}retryPill_paint(){const e=this.engine===null?0:this.engine.state_get().refused,t=this.engine?.refused_retry!==void 0;this.retryPill.hidden=!t||e===0,this.retryPill.disabled||(this.retryPill.textContent=`RETRY ${e}`)}async retry_press(){if(!(this.engine?.refused_retry===void 0||this.retryPill.disabled)){this.retryPill.disabled=!0,this.retryPill.textContent="ASKING…";try{await this.engine.refused_retry()}finally{this.retryPill.disabled=!1,this.retryPill_paint()}}}engineHost_get(){return{source:this.handlers.source,readout_set:e=>{this.stateSpan.textContent=e,this.retryPill_paint()},progress_set:e=>this.progress_show(e),note:this.handlers.note,regard:e=>{this.handlers.regard(e),this.overlaySlice_paint()},probe_set:e=>this.probe_show(e)}}probe_show(e){if(e===null){this.probeNote?.remove(),this.probeNote=null;return}if(this.probeNote===null||this.probeNote.parentElement===null){const t=document.createElement("div");t.className="image-probe-note",this.field.appendChild(t),this.probeNote=t}this.probeNote.textContent=e}overlaySlice_paint(){const e=this.overlayNote?.querySelector(".image-overlay-slice")??null;if(e===null||this.engine===null)return;const t=this.engine.state_get();e.textContent=t.slices>1?`SLICE ${Math.max(1,t.slice)} OF ${t.slices}`:"",e.hidden=t.slices<=1}progress_show(e){if(e===null){this.progressNote?.remove(),this.progressNote=null;return}if(this.progressNote===null||this.progressNote.parentElement===null){const o=document.createElement("div");o.className="image-working",o.innerHTML='<span class="image-working-label"></span><span class="image-working-track"><span class="image-working-fill"></span></span><span class="image-working-count"></span>',this.field.appendChild(o),this.progressNote=o}const t=this.progressNote;t.classList.remove("image-working-failed");const i=e.total>0,n=i?Math.min(1,e.done/e.total):0;t.querySelector(".image-working-label").textContent=e.label,t.querySelector(".image-working-count").textContent=i?`${e.done} / ${e.total} · ${Math.round(n*100)}%`:"";const r=t.querySelector(".image-working-fill");r.classList.toggle("image-working-pacing",!i),r.style.width=i?`${Math.round(n*100)}%`:""}async overlay_set(e){if(this.overlay=e,this.overlayPill.textContent=e?"OVERLAY ON":"OVERLAY OFF",this.overlayPill.classList.toggle("rail-off",!e),!e){this.overlay_hide();return}await this.overlay_fill()}overlay_hide(){this.overlayNote?.remove(),this.overlayNote=null}async overlay_fill(){if(!this.overlay||this.series===null)return;const e=this.series.files[0]??this.series.path,t=await this.handlers.tags_read(e);if(t===null){this.handlers.note(`image: overlay: ${e}: no header to read`);return}this.overlayLines=WN.flatMap(i=>{const r=(t.constant.find(o=>o.name===i.tag)?.value??"").trim();return r===""?[]:[i.label===""?r:`${i.label} ${r}`]}),this.overlay_paint()}overlay_paint(){if(!this.overlay||this.overlayLines.length===0)return;this.overlay_hide();const e=document.createElement("div");e.className="image-overlay-note";const t=document.createElement("span");t.className="image-overlay-slice",e.appendChild(t);for(const i of this.overlayLines){const n=document.createElement("span");n.textContent=i,e.appendChild(n)}this.field.appendChild(e),this.overlayNote=e,this.overlaySlice_paint()}toolPills_paint(){const e=new Set(this.engine?.toolsOffered_get()??Tg),t=this.engine!==null?this.engine.state_get().primaryTool:this.tool;for(const[i,n]of this.toolPills){const r=e.has(i);n.classList.toggle("rail-na",!r),n.classList.toggle("rail-off",r&&i!==t),n.disabled=!r}}focusMark_paint(e){this.focusMark.hidden=!e,this.pane.classList.toggle("image-field-focused",e)}}function ti(s,e){const t=s.querySelector(e);if(t===null)throw new Error(`image pane: missing ${e}`);return t}const oy=["patient","study","series","image","equipment","meta","private","other","varying"],jN=new Set(["meta","private"]),iM="••••";class HN{pane;title;modeSpan;redactBlock;listing;handlers;redact=!0;model=null;groups=[];constructor(e,t){this.handlers=t,this.pane=e,this.title=lc(e,".pane-title"),this.modeSpan=lc(e,".pane-mode"),this.redactBlock=lc(e,".tags-redact"),this.redactBlock.addEventListener("click",()=>this.redact_set(!this.redact));const i=lc(e,".tags-panel");this.listing=new ar({mount:i,traits:this.groupTraits_declare(),key:n=>n.group,chrome:{root:e,prefix:"tags"},caps:"root",row:{className:()=>"tags-group-row",groupClassName:n=>`tags-group tags-group-${n.group}`,decorate:n=>{n.title="fold this group open or shut (it keeps its place)"}},child:Wo(n=>n.rows,{traits:this.tagTraits_declare(),key:n=>n.key,activatable:n=>n.items.length>0,row:{className:n=>`tags-row${n.phi?" tags-phi":""}`,groupClassName:()=>"tags-sequence",decorate:(n,r)=>{n.title=r.items.length>0?`${r.name}: fold the sequence open or shut`:`${r.tag} ${r.name}`}},child:Wo(n=>n.items,{traits:this.itemTraits_declare(),key:n=>n.key,row:{className:()=>"tags-item-row",groupClassName:()=>"tags-item"},child:Wo(n=>n.rows,{traits:this.tagTraits_declare(),key:n=>n.key,activatable:()=>!1,row:{className:n=>`tags-row tags-row-deep${n.phi?" tags-phi":""}`}})})}),state:n=>this.stateLine_compose(n),empty:()=>YN("NO TAGS")}),this.redactBlock_paint(),this.listing.rows_set([],{field:"tags"})}model_show(e){this.model=e,this.title.textContent=`TAGS ${qN(e)}`,this.pane.dataset.modality=KN(e),this.groups=VN(e),this.listing.rows_set([{key:e.path,rows:this.groups}],{field:e.path}),this.listing.open_set(0,this.groups.map(t=>t.group).filter(t=>!jN.has(t))),this.modeSpan.textContent=e.subject==="folder"?"FOLDER":""}path_get(){return this.model?.path??null}redact_get(){return this.redact}redact_set(e){this.redact=e,this.redactBlock_paint(),this.model!==null&&this.listing.rows_set([{key:this.model.path,rows:this.groups}],{field:this.model.path})}filter_set(e){if(e===null){this.listing.filter_toggle(!1);return}this.listing.filter_toggle(!0),this.listing.filter_set(e)}stateLine_compose(e){const t=this.groups.reduce((n,r)=>n+r.rows.length,0),i=[];return this.model!==null&&this.model.subject==="folder"&&(i.push(this.model.read===this.model.of?`${this.model.read} FILES`:`${this.model.read} OF ${this.model.of} FILES`),this.model.refused.length>0&&i.push(`REFUSED ${this.model.refused.length}`)),i.push(e.filter!==""?e.filter:`${t} TAGS`),this.redact&&i.push("REDACTED"),i.join(" · ")}redactBlock_paint(){this.redactBlock.textContent=this.redact?"REDACT ON":"REDACT OFF",this.redactBlock.classList.toggle("rail-off",!this.redact),this.pane.classList.toggle("tags-redacted",this.redact)}value_cell(e){const t=document.createElement("span");if(t.className="tags-value",e.phi&&this.redact)return t.textContent=iM,t.title="identifying value, redacted; the REDACT block on the frame reveals it",t;if(t.textContent=e.value,e.decoded!==void 0){const i=document.createElement("span");i.className="tags-decoded",i.textContent=` ${e.decoded}`,t.appendChild(i)}if(e.distinct!==void 0){const i=document.createElement("span");i.className="tags-decoded",i.textContent=` (${e.distinct} distinct)`,t.appendChild(i)}return t}groupTraits_declare(){return[eu(()=>!0),{key:"group",label:"GROUP",className:"tags-group-name",width:"minmax(12em, 1fr)",cell:e=>e.group.toUpperCase(),compare:e=>oy.indexOf(e.group)},{key:"count",label:"TAGS",className:"tags-group-count",width:"5em",cell:e=>String(e.rows.length),compare:e=>e.rows.length}]}tagTraits_declare(){return[eu(e=>e.items.length>0),{key:"tag",label:"TAG",className:"tags-tag",width:"7em",cell:e=>e.tag,compare:e=>e.tag},{key:"name",label:"NAME",className:"tags-name",width:"minmax(8em, 1.4fr)",cell:e=>e.name,compare:e=>e.name.toLowerCase()},{key:"vr",label:"VR",className:"tags-vr",width:"2.4em",cell:e=>e.vr,compare:e=>e.vr},{key:"value",label:"VALUE",className:"tags-value-cell",width:"minmax(6em, 2fr)",cell:e=>this.value_cell(e),compare:e=>(e.phi&&this.redact?iM:`${e.value} ${e.decoded??""}`).toLowerCase()}]}itemTraits_declare(){return[eu(()=>!0),{key:"item",label:"ITEM",className:"tags-item-name",width:"minmax(12em, 1fr)",cell:e=>`ITEM ${e.index}`,compare:e=>e.index},{key:"count",label:"TAGS",className:"tags-group-count",width:"5em",cell:e=>String(e.rows.length),compare:e=>e.rows.length}]}}function eu(s){return{key:"fold",label:"",className:"tags-fold",capped:!1,width:"1.4em",cell:e=>{const t=document.createElement("span");return t.className=s(e)?"tags-fold":"tags-fold tags-fold-none",t}}}function VN(s){const e=new Map;for(const t of s.constant){const i=t.group;e.has(i)||e.set(i,[]),e.get(i)?.push(ay(t,`${i}/${t.tag}`))}return s.varying.length>0&&e.set("varying",s.varying.map(t=>({tag:t.tag,name:t.name,vr:t.vr,value:t.distinct===1?t.first:`${t.first} .. ${t.last}`,phi:t.phi,items:[],distinct:t.distinct,key:`varying/${t.tag}`}))),oy.filter(t=>e.has(t)).map(t=>({group:t,rows:e.get(t)??[]}))}function ay(s,e){return{tag:s.tag,name:s.name,vr:s.vr,value:s.value,...s.decoded!==void 0?{decoded:s.decoded}:{},phi:s.phi,items:(s.items??[]).map((t,i)=>({index:i+1,key:`${e}/${i+1}`,rows:t.map(n=>ay(n,`${e}/${i+1}/${n.tag}`))})),key:e}}function qN(s){const e=s.path.replace(/\/$/,"").split("/").pop()??s.path;if(s.subject==="folder")return e.length>24?`${e.slice(0,22)}…`:e;const t=/^(\d+)-/.exec(e)?.[1];return t!==void 0?`INSTANCE ${Number(t)}`:e.length>24?`${e.slice(0,22)}…`:e}function KN(s){const e=(s.constant.find(t=>t.name==="Modality")?.value??"").toUpperCase();return e==="MR"||e==="CT"||e==="PT"?e:"OT"}function YN(s){const e=document.createElement("div");return e.className="tags-note",e.textContent=s,e}function lc(s,e){const t=s.querySelector(e);if(t===null)throw new Error(`tags pane: missing ${e}`);return t}function XN(s,e){const t=Di("tpl-pane-image"),i=new $N(t,{source:{url_of:n=>s.vfsUrl_build(n)},note:n=>s.terminal().line_note(n),regard:n=>s.subjects().regard_write(e,{address:n,modelKind:"dicom.instance"}),file_put:async(n,r)=>{try{return(await fetch(s.vfsUrl_build(n),{method:"POST",body:r})).status}catch{return 0}},tags_read:n=>Pm(s,n),tags_open:()=>{s.terminal().line_note(ly(s,e))}});return s.panels().set("image",e,i),{id:e,kind:"image",mount:t,dispose:()=>{i.dispose(),s.panels().delete(e),s.subjects().pane_leave(e)}}}function ZN(s,e){const t=Di("tpl-pane-tags"),i=new HN(t,{note:n=>s.terminal().line_note(n)});return s.panels().set("tags",e,i),{id:e,kind:"tags",mount:t,dispose:()=>{s.panels().delete(e),s.subjects().pane_leave(e)}}}async function Pm(s,e){try{const t=await s.client().line_execute(`dcm tags "${e}"`,{silent:!0,observe:!1});for(const i of t.envelopes){if(i.model?.kind!==ko.tags)continue;const n=K0.safeParse(i.model.data);if(n.success)return n.data}}catch{}return null}function JN(s,e,t){const i=s.panels().get("tags",e);i===void 0||i.path_get()===t||Pm(s,t).then(n=>{if(n===null){s.terminal().line_note(`tags: ${t}: not a readable DICOM file`);return}s.panels().get("tags",e)?.model_show(n)})}function ly(s,e){const t=new Set(s.layout().panes_shown()),i=s.subjects().group_of(e);for(const r of s.panels().ids("tags"))if(t.has(r)&&s.subjects().group_of(r)===i)return s.layout().focus_set(r),"image tags";if(!t.has(e))return"image tags: the image pane is not on stage";const n=s.instance_spawn("tags",e);return s.layout().leaf_split(e,s.desktop().replayPlace_get()?.dir??"col",n.id,s.desktop().replayPlace_get()?.before??!1)?(s.birth_record(n.id,e,s.desktop().replayPlace_get()?.dir??"col",s.desktop().replayPlace_get()?.before??!1),"image tags"):(xs(n.id),s.layout().mount_remove(n.id),"image tags: could not open beside the image pane")}async function Qf(s,e){try{const t=await s.client().line_execute(`dcm series "${e}"`,{silent:!0,observe:!1});for(const i of t.envelopes){if(i.model?.kind!==ko.series)continue;const n=Y0.safeParse(i.model.data);if(n.success)return n.data}}catch{}return null}async function cy(s,e){try{const t=await s.client().line_execute(`ls "${e}"`,{silent:!0,observe:!1});for(const i of t.envelopes){if(i.model?.kind!=="fs.listing")continue;const n=i.model.data,r=(Array.isArray(n)?n[0]:n)??{},o=(r.path??e).replace(/\/$/,"");return(r.items??[]).filter(a=>a.type==="dir").map(a=>`${o}/${a.name}`)}}catch{}return[]}function hy(s,e,t){const i=l=>{t!==void 0&&s.subjects().regard_write(l,t)};if(e!==null&&s.panels().has("image",e))return i(e),s.panels().get("image",e)??null;const n=new Set(s.layout().panes_shown());if(t!==void 0){for(const[l,c]of s.panels().entries("image"))if(n.has(l)&&s.subjects().regard_get(l)?.address===t.address)return i(l),c}const r=e!==null?s.subjects().group_of(e):null;for(const[l,c]of s.panels().entries("image"))if(n.has(l)&&r!==null&&s.subjects().group_of(l)===r)return c;const o=e!==null&&n.has(e)?e:s.errandHost_find();if(o===null)return null;const a=s.instance_spawn("image",e??void 0);return s.layout().leaf_split(o,s.desktop().replayPlace_get()?.dir??"col",a.id,s.desktop().replayPlace_get()?.before??!1)?(s.birth_record(a.id,o,s.desktop().replayPlace_get()?.dir??"col",s.desktop().replayPlace_get()?.before??!1),i(a.id),s.panels().get("image",a.id)??null):(xs(a.id),s.layout().mount_remove(a.id),null)}async function QN(s,e,t,i={},n){s.launcher_yield();const r=e!==null?void 0:Hu.test(t)?{address:t,modelKind:"image.volume"}:{address:Qc.test(t)?t.slice(0,t.lastIndexOf("/")):t.replace(/\/$/,""),modelKind:"dicom.series"},o=hy(s,e,r);if(o===null)return"image: no pane to open beside";const a=s.panels().idOf("image",o);if(a!==null&&n?.(a),Hu.test(t))return o.opening_show(t),o.volume_show(t),`image ${t}`;const l=Qc.test(t),c=l?t.slice(0,t.lastIndexOf("/")):t.replace(/\/$/,"");o.opening_show(c);let h=await Qf(s,c),d=[];if(h===null&&!l){const p=(await cy(s,c)).slice(0,32);for(const f of p){const _=await Qf(s,f);if(_!==null){d=p.map(g=>({path:g,label:g.split("/").pop()??g})),h=_;break}}}if(h===null)return o.opening_fail(t,"NOT A READABLE SERIES"),`image: ${t}: not a readable DICOM series, study, or volume`;const u=l?Math.max(1,h.files.indexOf(t)+1):1;return o.series_show(h,{siblings:d,startAt:u,...i.force===!0?{force:!0}:{}}),`image ${h.path}${d.length>1?` (1 of ${d.length} series)`:""}`}function ek(s){return{imageInstance_build:e=>XN(s,e),tagsInstance_build:e=>ZN(s,e),tags_ask:e=>Pm(s,e),tagsPane_follow:(e,t)=>JN(s,e,t),tagsPane_open:e=>ly(s,e),series_ask:e=>Qf(s,e),subfolders_ask:e=>cy(s,e),imagePane_for:(e,t)=>hy(s,e,t),image_open:(e,t,i={},n)=>QN(s,e,t,i,n)}}function tk(s){return{primaries:[s.panes.dag_build("dag",!0),s.panes.universe_build("universe"),{id:"pacs",kind:"pacs",mount:s.pacsMount}],domains:["dag","pacs"],presets:[["pacs",()=>({pane:"pacs"})],["dag",()=>({pane:"dag"})],["universe",()=>({pane:"universe"})]],factories:[["dag",e=>s.panes.dag_build(e,!1)],["universe",s.panes.universe_build],["image",s.dicom.imageInstance_build],["tags",s.dicom.tagsInstance_build],["gather",s.gather_build]]}}function sk(s){return async()=>{const e=await s.ask("proc feeds");let t=[];for(const d of e.envelopes){const u=d.model;if(u===void 0||u.kind!==Pu)continue;const p=ku.safeParse(u.data);p.success&&(t=p.data.feeds)}const n=t.length===0&&e.envelopes.some(d=>d.status==="error")?"INDEX WARMING":`${t.length} FEEDS`,r=t.filter(d=>/error/i.test(d.status)).length,o=t.filter(d=>/running|scheduled|created|started/i.test(d.status)).length,a={key:"universe",name:"UNIVERSE",hue:"--honey",numeral:"",figures:[{text:n}],rows:[],verb:"SEE THE SPACE",about:Kn.universe,enter:()=>s.universe_show()},l={key:"analyses",name:"ANALYSES",hue:"--october-sunset",numeral:"3",figures:[{text:n},...o>0?[{text:`${o} RUNNING`}]:[],...r>0?[{text:`${r} ERRORED`,errored:!0,open:()=>s.runs_show("status:error")}]:[]],rows:t.slice(0,6).map(d=>({text:`${d.id} ${d.title}`,errored:/error/i.test(d.status),open:()=>s.feed_enter(d.id)})),verb:"OPEN THE ROSTER",about:Kn.analyses,enter:()=>s.runs_show()},c=s.pacs_query(),h={key:"pacs",name:"PACS",hue:"--daybreak",numeral:"4",figures:[{text:c===""?"NO ANSWER":"ANSWERED"}],rows:c===""?[{text:"pacs query PatientID:…",open:()=>s.line_offer("pacs query PatientID:")},{text:"pacs query AccessionNumber:…",open:()=>s.line_offer("pacs query AccessionNumber:")}]:[{text:c.slice(0,48)}],verb:"ASK A PACS",about:Kn.pacs,enter:()=>s.pacs_open()};return{lead:{tile:l,weight:t.length},afterFiles:[h],afterPanes:[a],about:{files:{text:"Your ChRIS home: uploads, results and what others shared with you."}}}}}function ik(s){return s>=6e4?`${Math.max(1,Math.round(s/6e4))} MIN`:`${Math.max(1,Math.round(s/1e3))} S`}function ci(s){return s.toLocaleString("en-US")}class nk{mount;counts=null;context=null;msPerPage=null;walkSamples=new Map;clock;acts;state=void 0;constructor(e,t=()=>Date.now(),i={}){this.mount=e,this.clock=t,this.acts=i,this.render()}state_show(e){this.state=e,this.render()}pace_show(e){this.msPerPage=e,this.render()}eta_of(e,t,i){const n=this.clock(),r=this.walkSamples.get(e);let o=r?.rowsPerMs??null;r!==void 0&&t>r.loaded&&n>r.at&&(o=(t-r.loaded)/(n-r.at)),(r===void 0||t!==r.loaded)&&this.walkSamples.set(e,{loaded:t,at:n,rowsPerMs:o});const a=Math.max(0,i-t);return i<=0?null:o!==null&&o>0?a/o:this.msPerPage!==null&&this.msPerPage>0?Math.ceil(a/100/4)*this.msPerPage:null}counts_show(e){this.counts=e,this.render()}promptContext_show(e){this.context=e,e.procIndex!==void 0&&(this.counts={jobs:e.procIndex.jobs,feeds:e.procIndex.feeds}),this.render()}rows_compose(){const e=[],t=this.context?.procWarmup,i=this.context?.warmupFailures??[],n=t!==void 0&&t.sweeping!==!1,r=this.counts!==null?`${ci(this.counts.jobs)} JOBS · ${ci(this.counts.feeds)} FEEDS`:"";if(i.length>0)e.push({label:"INDEX",bar:null,value:`${r}${r?" · ":""}FAILED: ${i.map(l=>l.label.toUpperCase()).join(" ")}`,title:i.map(l=>`${l.label}: ${l.message}`).join(`
|
|
4291
|
+
`);return{ok:!1,text:E===""?"the session refused this read and said nothing further":E}}),c=async(S,D)=>{const T=await fetch(e.vfsUrl_build(S));if(!T.ok||T.body===null)return(await l(S)).text.slice(0,D);const E=T.body.getReader(),x=new TextDecoder;let C="";for(;C.length<D;){const{done:I,value:B}=await E.read();if(I)break;C+=x.decode(B,{stream:!0})}return E.cancel().catch(()=>{}),C.slice(0,D)},h=async S=>{const D=/_id(\d+)$/.exec(S)?.[1]??S.replace(/^.*\//,""),T=await s.client.line_execute(`pipeline diagram ${D}`,{silent:!0,observe:!1});for(const E of T.envelopes){if(E.model?.kind!==Jn.pipelineDiagram)continue;const x=Kp.safeParse(E.model.data);if(x.success)return x.data.nodes.map(C=>({id:C.id,parentIds:[...C.parentIds,...C.joinParentIds??[]]}))}return null},d={imageUrl:e.vfsUrl_build,download:a,textHead:c,pipelineGlimpse:h},u=(S,D,T)=>{const E=T==="~"?"ls ~":`ls "${T}"`;s.client.line_execute(E,{silent:!0,observe:!1}).then(x=>{for(const C of x.envelopes)D.envelope_observe(C);if(T!=="~"&&D.path_current()!==T.replace(/\/+$/,"")){const C=x.envelopes.find(B=>B.status==="error"),I=C!==void 0?zv(C):"the session answered no listing";D.listing_fail(I),s.terminal.line_note(`files: ${T}: ${I}`)}},x=>{const C=x instanceof Error?x.message:String(x);D.listing_fail(C),s.terminal.line_note(`files: ${T}: ${C}`)})},p=(S,D,T)=>{const E=D.path_current();E!==null&&n.get(S)?.push(E),u(S,D,T)},f=(S,D)=>{const T=n.get(S)?.pop();T!==void 0&&u(S,D,T)},_=S=>{o.get(S)?.()},g=(S,D)=>{r.set(S,D),_(S);const T=t.get("files",S);T?.follow_set(D),D&&T!==void 0&&s.client.line_execute("ls",{silent:!0,observe:!1}).then(E=>{for(const x of E.envelopes)T.envelope_observe(x)})},m=(S,D)=>{const T=t.get("files",S);T!==void 0&&(r.get(S)===!0?s.terminal.line_run("ls"):u(S,T,D))},v=(S,D)=>{e.ask_onPane(S,{message:`New directory in ${D}: `,kind:"text",commit:"MAKE IT"}).then(T=>{const E=(T??"").trim();E!==""&&(s.terminal.line_run(`mkdir "${D}/${E}"`),m(S,D))})},y=async(S,D,T)=>{for(const E of T){const x=`${D}/${E.name}`;s.terminal.line_note(`putting ${E.name} in ${D}…`);try{const C=await fetch(e.vfsUrl_build(x),{method:"POST",body:E});if(!C.ok){s.terminal.line_note(`upload: ${E.name}: ${(await C.text()).trim()||C.statusText}`);continue}s.terminal.line_note(`✓ ${x}`)}catch(C){s.terminal.line_note(`upload: ${E.name}: ${C instanceof Error?C.message:String(C)}`)}}m(S,D)},b=(S,D,T)=>{if(T.kind==="dir"){r.get(S)===!0?s.terminal.line_run(`cd "${T.path}"`):p(S,D,T.path);return}if(T.kind==="plugin"||T.kind==="pipeline"){e.binEntry_show(S,D,T.path,T.kind);return}if(iy(T.path)){e.image_open(S,T.path).then(E=>s.terminal.line_note(E));return}if(i.regard_write(S,{address:T.path,modelKind:"fs.file"}),!i.groupHasViewer(S)){if(Ch(T.path)){D.contentImage_show(T.path,e.vfsUrl_build(T.path));return}l(T.path).then(E=>{if(!E.ok){D.contentRefused_show(T.path,E.text);return}sy.test(T.path)?D.contentTable_show(T.path,E.text):D.content_show(T.path,E.text)})}},w=()=>{const S=e.template_stamp("tpl-pane-files").querySelector(".files-body");if(S===null)throw new Error("tpl-pane-files has no files-body");return S},z=(S,D,T)=>{const E=`"${T}"`,x=D.type==="dir"||D.type==="vfs"||D.type==="job",C=Za(T),I={kind:D.type==="plugin"||D.type==="pipeline"?"catalogue":x&&sd(T,D.name)?"seriesFolder":D.type==="file"?"file":"directory",feed:C,node:C===null?null:Zf(T),bound:e.catalogue_of(S)!==void 0,projection:xN(T),editable:D.type==="file"&&bS(T)},B={image:()=>{e.image_open(S,T).then(N=>s.terminal.line_note(N))},download:()=>a(T),link:()=>{const N=O0(window.location.origin,T);(t.get("files",S)?.link_copy(T)??navigator.clipboard.writeText(N).then(()=>!0,()=>!1)).then(F=>s.terminal.line_note(F?`link copied: ${N}`:`link (copy it): ${N}`))},process:()=>e.process_open(S,{input:T,feed:C,node:C===null?null:Zf(T)}),gather:()=>e.cohort_gather([{kind:x?"dir":"file",seriesUID:T,description:D.name,imagery:sd(T,D.name),modality:sd(T,D.name)?"MR":"—",patient:e.promptUser()??"",vfsPath:T,folderPath:T}]),run:()=>e.run_press(S,D.name,D.type==="pipeline"?"pipeline":"plugin"),edit:()=>{const N=Qw(T),P=nN(D.name,D.size,_S);if(P===null){e.verbLine_run(S,N);return}e.ask_onPane(S,{kind:"confirm",message:P}).then(F=>{F==="y"&&e.verbLine_run(S,N)})},move:()=>e.verbLine_run(S,`mv ${E}`),copy:()=>e.verbLine_run(S,`cp ${E}`),delete:()=>e.verbLine_run(S,`rm ${x?"-ri":"-i"} ${E}`),share:()=>e.verbLine_run(S,`setfacl ${E}`)};return Bv.rules.filter(N=>N.offered(I)).map(N=>({label:N.label(I),run:()=>B[N.name]?.()}))},O=(S,D)=>{const T=D.map(([B])=>B),E=T.map(B=>`"${B}"`).join(" "),x=[];for(const B of T){const N=Za(B);N!==null&&!x.includes(N)&&x.push(N)}const C={count:T.length,feeds:x},I={delete:()=>e.verbLine_run(S,`rm -rI ${E}`),move:()=>s.terminal.line_run(`mv -t ${E}`),copy:()=>s.terminal.line_run(`cp -t ${E}`),share:()=>s.terminal.line_run(`setfacl ${x.map(B=>`feed_${B}`).join(" ")}`)};return Gv.rules.filter(B=>B.offered(C)).map(B=>({label:B.label(C),run:()=>I[B.name]?.()}))};return{previewProvider:d,fileText_fetch:l,file_save:a,rootedListing_show:u,listing_refresh:m,directory_make:v,files_deliver:y,follows:S=>r.get(S)===!0,follow_set:g,cwdBind_sync_register:(S,D)=>{o.set(S,D)},cwdBind_sync:_,rooted_walk:p,rooted_back:f,filesBody_stamp:w,rowVerbs_of:z,instance_build:(S,D,T=!1)=>{const E=e.template_stamp("tpl-pane-files"),x=new xv(e.pane_find(E,".files-panel"),I=>b(S,x,I),d,{catalogue:T});x.selectionVerbs_declare(I=>O(S,I)),x.rowVerbs_declare((I,B)=>z(S,I,B),(I,B)=>{i.regard_write(S,{address:B,modelKind:"fs.file"}),Za(B)!==null&&s.client.line_execute(`getfacl "${B}"`,{silent:!0,observe:!1}).then(N=>{x.rowReadout_show(B,ON(N))}).catch(()=>{x.rowReadout_show(B,"ACCESS UNREAD")})}),t.set("files",S,x);const C=e.promptUser();return C!==null&&C!==""&&x.home_set(`/home/${C}`),n.set(S,[]),r.set(S,D),_(S),x.follow_set(D),{id:S,kind:"files",mount:E,dispose:()=>{t.delete(S),n.delete(S),i.pane_leave(S)}}}}}function AN(s,e){const t=Di("tpl-pane-universe"),i=new iN({canvas:Ls(t,".universe-canvas"),title:Ls(t,".universe-title"),state:t.querySelector(".pane-state"),empty:Ls(t,".universe-empty"),projectionPill:t.querySelector(".universe-projection"),refreshPill:t.querySelector(".universe-refresh"),replayPill:t.querySelector(".universe-replay"),scalePill:t.querySelector(".universe-scale"),viewPill:t.querySelector(".universe-view"),gravityPill:t.querySelector(".universe-gravity"),densityPill:t.querySelector(".universe-density"),drawPill:t.querySelector(".universe-draw"),captionsPill:t.querySelector(".universe-captions"),arrangementPill:t.querySelector(".universe-arrangement"),facts:t.querySelector(".universe-facts"),backPill:t.querySelector(".universe-back"),openPill:t.querySelector(".universe-open"),frame:t.querySelector(".mode-frame")},{watch_set:(n,r)=>{r?s.client().watch_send(n):s.client().unwatch_send(n)},...(({feed_entered:n,feed_note:r,feed_tag:o,feed_rename:a,feed_untag:l})=>({feed_entered:n,feed_note:r,feed_tag:o,feed_rename:a,feed_untag:l}))(ey(s.context(),e,s.feedVerbs())),command_run:n=>{s.client().line_execute(n,{silent:!0,observe:!1}).then(r=>{for(const o of r.envelopes)i.envelope_observe(o)})},feed_dag:async n=>{const r=await s.client().line_execute(`feed diagram feed_${n}`,{silent:!0,observe:!1});for(const o of r.envelopes){if(o.model?.kind!==Jn.feedDag)continue;const a=Yp.safeParse(o.model.data);if(a.success)return a.data}return null},node_enter:n=>{s.terminal().line_run(`cd "${n}"`)},node_dive:n=>{s.nodeOverlay_open(e,n.replace(/\/data$/,""))},node_process:n=>{const r=Za(n.vfsPath)??(/\/feed_(\d+)(?:\/|$)/.exec(n.vfsPath)===null?null:Number(/\/feed_(\d+)(?:\/|$)/.exec(n.vfsPath)[1])),o=s.promptUser()===null?n.vfsPath:n.vfsPath.replace(/^\/proc\/jobs\//,`/home/${s.promptUser()}/feeds/`);s.process_open(e,{input:o,feed:r,node:n.instanceId})},feed_open:n=>{s.runs_show(),s.dag_primary().feed_enter(n)},plugin_open:n=>{(async()=>{const r=await s.client().line_execute("ls /bin",{silent:!0,observe:!1}),o=[];for(const l of r.envelopes){if(l.model?.kind!=="fs.listing")continue;const c=l.model.data,h=Array.isArray(c)?c:[c];for(const d of h)for(const u of d.items??[])o.push(u.name)}const a=o.filter(l=>l.startsWith(`${n}-v`)).sort((l,c)=>l.localeCompare(c,void 0,{numeric:!0})).pop();if(a===void 0){s.terminal().line_note(`universe: ${n} is not in /bin`);return}tt("gutter-files").click(),s.binEntry_show("files",s.panels().get("files","files"),`/bin/${a}`,"plugin")})().catch(r=>{s.terminal().line_note(`universe: could not open ${n} in /bin: ${r instanceof Error?r.message:String(r)}`)})},note:n=>s.terminal().line_note(n)},x0());return s.panels().set("universe",e,i),{id:e,kind:"universe",mount:t,dispose:()=>{s.panels().delete(e),s.subjects().pane_leave(e),i.dispose()}}}function DN(s,e,t){const i=Di("tpl-pane-dag"),n=new IG(Ls(i,".dag-canvas"),Ls(i,".dag-title"),Ls(i,".dag-facts"),Ls(i,".dag-empty"),Ls(i,".dag-strategy"),Ls(i,".dag-feedlist"),{command_run:r=>{s.client().line_execute(r,{silent:!0,observe:!1}).then(o=>{for(const a of o.envelopes)n.envelope_observe(a)})},watch_set:(r,o)=>{o?s.client().watch_send(r):s.client().unwatch_send(r)},node_enter:r=>{s.terminal().line_run(`cd "${r}"`)},node_dive:r=>{s.nodeOverlay_open(e,r.replace(/\/data$/,""))},node_regard:r=>{s.subjects().regard_write(e,{address:r,modelKind:"feed.node"})},node_process:r=>{const o=Za(r.vfsPath)??(/\/feed_(\d+)(?:\/|$)/.exec(r.vfsPath)===null?null:Number(/\/feed_(\d+)(?:\/|$)/.exec(r.vfsPath)[1])),a=s.promptUser()===null?r.vfsPath:r.vfsPath.replace(/^\/proc\/jobs\//,`/home/${s.promptUser()}/feeds/`);s.process_open(e,{input:a,feed:o,node:r.instanceId})},feed_regard:r=>{s.subjects().regard_write(e,{address:r,modelKind:"feed"})},...ey(s.context(),e,s.feedVerbs()),...t?{feed_shown:()=>s.dag_summon()}:{}});return s.panels().set("dag",e,n),{id:e,kind:"dag",mount:i,dispose:()=>{s.nodeOverlay().dispose(e),s.panels().delete(e),s.subjects().pane_leave(e),n.dispose()}}}function TN(s){return{universe_build:e=>AN(s,e),dag_build:(e,t)=>DN(s,e,t)}}const ny=new Set(["files"]);function IN(s){ny.add(s)}function tM(s){return ny.has(s)}const ry=new Map,sa=new Map;let CN=0;function cn(s,e){ry.set(s,e)}function RN(s){const e=ry.get(s);if(e===void 0)throw new Error(`no pane factory registered for kind '${s}'`);const t=e(`${s}-${CN++}`);return sa.set(t.id,t),t}function oc(s){sa.set(s.id,s)}function Dc(s){return sa.get(s)}function Tc(){return[...sa.values()]}function xs(s){const e=sa.get(s);e!==void 0&&(sa.delete(s),e.dispose?.(),e.mount.remove())}class BN{byId=new Map;set(e,t,i){this.byId.set(t,{kind:e,panel:i})}get(e,t){const i=this.byId.get(t);return i!==void 0&&i.kind===e?i.panel:void 0}has(e,t){return this.byId.get(t)?.kind===e}delete(e){return this.byId.delete(e)}ids(e){return this.entries(e).map(([t])=>t)}entries(e){const t=[];for(const[i,n]of this.byId)n.kind===e&&t.push([i,n.panel]);return t}values(e){return this.entries(e).map(([,t])=>t)}idOf(e,t){for(const[i,n]of this.byId)if(n.kind===e&&n.panel===t)return i;return null}}const GN="modulepreload",NN=function(s,e){return new URL(s,e).href},sM={},Jf=function(e,t,i){let n=Promise.resolve();if(t&&t.length>0){let c=function(h){return Promise.all(h.map(d=>Promise.resolve(d).then(u=>({status:"fulfilled",value:u}),u=>({status:"rejected",reason:u}))))};const o=document.getElementsByTagName("link"),a=document.querySelector("meta[property=csp-nonce]"),l=a?.nonce||a?.getAttribute("nonce");n=c(t.map(h=>{if(h=NN(h,i),h in sM)return;sM[h]=!0;const d=h.endsWith(".css"),u=d?'[rel="stylesheet"]':"";if(i)for(let f=o.length-1;f>=0;f--){const _=o[f];if(_.href===h&&(!d||_.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${h}"]${u}`))return;const p=document.createElement("link");if(p.rel=d?"stylesheet":GN,d||(p.as="script"),p.crossOrigin="",p.href=h,l&&p.setAttribute("nonce",l),document.head.appendChild(p),d)return new Promise((f,_)=>{p.addEventListener("load",f),p.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${h}`)))})}))}function r(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return n.then(o=>{for(const a of o||[])a.status==="rejected"&&r(a.reason);return e().catch(r)})},kN=/Failed to fetch dynamically imported module|error loading dynamically imported module|Importing a module script failed/i;function km(s){const e=s instanceof Error?s.message:String(s??"");return kN.test(e)}const jo={before:"ARGUS has been updated in the background — ",refresh:"refresh",after:" this page"},PN=`${jo.before}${jo.refresh}${jo.after}`,ph="ARGUS UPDATED IN THE BACKGROUND · REFRESH THIS PAGE";function LN(s,e=document.body){let t=!1;const i=()=>{if(t)return;t=!0,s(`argus: ${PN} (what failed to load was part of the old build)`);const n=document.createElement("div");n.className="stale-page",n.setAttribute("role","alert");const r=document.createElement("span");r.className="stale-page-words";const o=document.createElement("button");o.type="button",o.className="stale-page-reload",o.textContent=jo.refresh,o.title="load the argus the server has now",o.addEventListener("click",()=>{window.location.reload()}),r.append(document.createTextNode(jo.before),o,document.createTextNode(jo.after)),n.append(r),e.appendChild(n)};window.addEventListener("vite:preloadError",()=>{i()}),window.addEventListener("unhandledrejection",n=>{km(n.reason)&&i()})}const WN=[{label:"",tag:"PatientName"},{label:"MRN",tag:"PatientID"},{label:"ACC",tag:"AccessionNumber"},{label:"",tag:"StudyDescription"},{label:"",tag:"SeriesDescription"},{label:"",tag:"StudyDate"},{label:"",tag:"PatientAge"},{label:"",tag:"PatientSex"}],FN=256*1024*1024;function ac(s){const e=["B","KB","MB","GB","TB"];let t=s,i=0;for(;t>=1024&&i<e.length-1;)t/=1024,i++;return i===0?`${s} B`:`${t.toFixed(1)} ${e[i]}`}function UN(s){const e=s.toUpperCase();return e==="MR"||e==="CT"||e==="PT"?e:"OT"}class $N{pane;field;title;modeSpan;stateSpan;layoutPills=new Map;overlayPill;colormapPill;savePill;loadPill;retryPill;presetPill;focusMark;guardBytes=FN;forced=!1;pendingLayout=null;progressNote=null;overlayNote=null;probeNote=null;overlay=!1;overlayLines=[];presetIndex=-1;toolPills=new Map;handlers;engine=null;series=null;siblings=[];colormap="gray";tool="wl";constructor(e,t){this.handlers=t,this.pane=e,this.field=ti(e,".image-field"),this.title=ti(e,".pane-title"),this.modeSpan=ti(e,".pane-mode"),this.stateSpan=ti(e,".pane-state");for(const i of e.querySelectorAll(".image-layout")){const n=i.dataset.layout??"single";this.layoutPills.set(n,i),i.addEventListener("click",()=>{this.layout_set(n)})}this.overlayPill=ti(e,".image-overlay"),this.overlayPill.addEventListener("click",()=>{this.overlay_set(!this.overlay)}),this.colormapPill=ti(e,".image-colormap"),this.savePill=ti(e,".image-save"),this.loadPill=ti(e,".image-load"),this.retryPill=ti(e,".image-retry"),this.presetPill=ti(e,".image-preset"),this.focusMark=ti(e,".image-focus"),this.field.tabIndex=0,this.colormapPill.addEventListener("click",()=>{this.colormap_cycle()}),this.savePill.addEventListener("click",()=>{this.annotations_save()}),this.loadPill.addEventListener("click",()=>{this.load_press()}),this.retryPill.addEventListener("click",()=>{this.retry_press()}),this.presetPill.addEventListener("click",()=>this.preset_cycle()),ti(e,".image-tags").addEventListener("click",()=>this.handlers.tags_open());for(const i of Tg){const n=ti(e,`.image-tool[data-tool="${i}"]`);this.toolPills.set(i,n),n.addEventListener("click",()=>{this.tool_set(i)})}this.toolPills_paint(),this.field.addEventListener("mousedown",()=>{this.field.focus(),this.focusMark_paint(!0)}),this.field.addEventListener("focusin",()=>this.focusMark_paint(!0)),this.field.addEventListener("focusout",i=>{(!(i.relatedTarget instanceof Node)||!this.field.contains(i.relatedTarget))&&this.focusMark_paint(!1)}),this.field.addEventListener("keydown",i=>{if(i.key==="Escape"){this.field_release(),i.stopPropagation();return}i.stopPropagation()})}field_hasFocus(){return document.activeElement instanceof Node&&this.field.contains(document.activeElement)}field_release(){return this.field_hasFocus()?(document.activeElement.blur(),this.focusMark_paint(!1),!0):!1}async series_show(e,t={}){if(this.engine_dispose(),this.series=e,this.forced=t.force===!0,this.pendingLayout=null,this.loadPill.hidden=!0,this.retryPill.hidden=!0,this.presets_paint(e.modality),this.siblings=t.siblings??[],this.pane.dataset.modality=UN(e.modality),this.title.textContent=`IMAGE ${e.modality.toUpperCase()} ${e.seriesDescription}`.trim(),this.title.title=this.title.textContent,this.siblings.length>1){const o=this.siblings.findIndex(a=>a.path===e.path)+1;this.handlers.note(`image: series ${o} of ${this.siblings.length} in this study; image series <n> switches`)}const i=await this.chunk_import(()=>Jf(()=>import("./cornerstoneEngine-BPxulDit.js").then(o=>o.b2),__vite__mapDeps([0,1,2]),import.meta.url));if(i===null)return;const{CornerstoneEngine:n}=i,r=new n(this.engineHost_get(),e,t.startAt??1);await this.engine_open(r),this.engine===r&&(this.guard_trips()?(this.loadPill.hidden=!1,this.stateSpan.textContent=`SERIES ${ac(e.bytes)} · LOAD FOR STACK`,this.handlers.note(`image: ${ac(e.bytes)} to fetch before the stack scrolls; press LOAD, image load, or image --force <path>`)):r.slices_fill(),await this.annotations_reload(r,e))}async annotations_reload(e,t){let i=0;for(const n of t.annotations.filter(r=>/\.dcm$/i.test(r))){if(this.engine!==e)return;const r=n.split("/").pop()??n;try{const o=await fetch(this.handlers.source.url_of(n));if(!o.ok){this.handlers.note(`image: ${r}: HTTP ${o.status}`);continue}const a=await e.annotations_import(await o.arrayBuffer());i+=a,this.handlers.note(a>0?`image: ${a} measurement${a===1?"":"s"} from ${r}`:`image: ${r}: no measurements this engine can place`)}catch(o){this.handlers.note(`image: ${r}: ${o instanceof Error?o.message:String(o)}`)}}this.pane.dataset.annotations=String(i)}async volume_show(e){this.engine_dispose(),this.series=null,this.siblings=[],this.pane.dataset.modality="NIFTI",this.title.textContent=`IMAGE ${e.split("/").pop()??""}`,this.title.title=e,this.forced=!0,this.loadPill.hidden=!0,this.retryPill.hidden=!0,this.presets_paint("NIFTI");const t=await this.chunk_import(()=>Jf(()=>import("./niivueEngine-oEALZER3.js"),__vite__mapDeps([3,1]),import.meta.url));if(t===null)return;const{NiivueEngine:i}=t;await this.engine_open(new i(this.engineHost_get(),e))}async chunk_import(e){try{const t=await e();if(t!==void 0)return t}catch(t){if(!km(t))throw t}return ws(this.stateSpan,"stale",ph),this.handlers.note(`image: ${ph.toLowerCase()} — the viewer's code is of an older build than the server has`),null}opening_show(e){const t=e.replace(/\/$/,"").split("/").pop()??e;this.stateSpan.textContent="OPENING",this.progress_show({label:`OPENING ${t}`,done:0,total:0})}opening_fail(e,t){this.stateSpan.textContent=t,this.progress_show({label:t,done:0,total:0});const i=this.progressNote;i!==null&&(i.classList.add("image-working-failed"),i.querySelector(".image-working-count").textContent=e)}siblings_get(){return this.siblings}series_get(){return this.series}state_get(){return this.engine===null?null:{...this.engine.state_get(),colormap:this.colormap,path:this.series?.path??null,guard:this.guardBytes,waiting:this.pendingLayout}}async layout_set(e){if(this.engine===null)return!1;if(e!=="single"&&this.guard_trips())return this.pendingLayout=e,this.loadPill.hidden=!1,this.stateSpan.textContent=`SERIES ${ac(this.series?.bytes??0)} · LOAD FOR ${e.toUpperCase()}`,this.handlers.note(`image: ${ac(this.series?.bytes??0)} to fetch for ${e}; press LOAD, image load, or image --force <path>`),!1;const t=this.engine.state_get().layout;return this.layoutPills_paint(e),this.modeSpan.textContent=e==="single"?"":e.toUpperCase(),this.overlay_hide(),await this.engine.layout_set(e)?(this.progress_show(null),this.overlay_paint(),this.toolPills_paint(),!0):(this.progress_show(null),this.layoutPills_paint(t),this.modeSpan.textContent=t==="single"?"":t.toUpperCase(),this.handlers.note(`image: layout ${e}: not offered by ${this.engine.name}`),!1)}layoutPills_paint(e){for(const[t,i]of this.layoutPills)i.classList.toggle("rail-off",t!==e)}guard_trips(){return this.guardBytes!==null&&!this.forced&&this.engine?.name==="cornerstone"&&(this.series?.bytes??0)>this.guardBytes}async load_press(){this.forced=!0,this.loadPill.hidden=!0,this.retryPill.hidden=!0;const e=this.pendingLayout;return this.pendingLayout=null,e!==null?this.layout_set(e):this.engine===null||this.engine.state_get().filled?!1:this.engine.slices_fill()}guard_set(e){this.guardBytes=e}guard_get(){return this.guardBytes}preset_cycle(){const e=this.presets_for(this.series?.modality??"NIFTI");if(e.length===0)return;this.presetIndex=(this.presetIndex+1)%e.length;const t=e[this.presetIndex];t!==void 0&&this.wl_set(t.lower,t.upper)&&(this.presetPill.textContent=t.name.toUpperCase())}presets_for(e){const t=e.toUpperCase();return iv.filter(i=>i.modalities.length===0||i.modalities.includes(t))}presets_paint(e){this.presetIndex=-1;const t=this.presets_for(e);this.presetPill.hidden=t.length===0,this.presetPill.textContent="PRESET"}slice_set(e){if(this.engine===null)return!1;const t=this.engine.slice_set(e);return t||this.handlers.note(`image: slice ${e}: not offered in ${this.engine.state_get().layout} layout by ${this.engine.name}`),t}wl_set(e,t){if(this.engine===null)return!1;const i=this.engine.wl_set(e,t);return i||this.handlers.note(`image: wl: not offered by ${this.engine.name}`),i}ghost_set(e){if(this.engine===null)return!1;const t=this.engine.ghost_set(e);return t||this.handlers.note("image: ghost applies to the SLAB layout"),t}wlPreset_set(e){const t=this.series?.modality??"NIFTI",i=wO(e,t);return i===void 0?(this.handlers.note(`image: wl preset ${e}: none for ${t}`),!1):this.wl_set(i.lower,i.upper)}colormap_set(e){return this.engine===null?!1:this.engine.colormap_set(e)?(this.colormap=e,this.colormapPill.textContent=e.toUpperCase(),!0):(this.handlers.note(`image: colormap ${e}: not offered by ${this.engine.name}`),!1)}tool_set(e){return this.engine===null?!1:this.engine.tool_set(e)?(this.tool=e,this.toolPills_paint(),!0):(this.handlers.note(`image: ${e}: not offered by ${this.engine.name}`),!1)}async annotations_save(){if(this.engine===null)return!1;const e=this.series?.seriesInstanceUID,t=/^(\/home\/[^/]+)\//.exec(this.series?.path??"")?.[1];if(e===void 0||t===void 0)return this.handlers.note("image: save: this series has no UID to file an annotation under"),!1;const i=await this.engine.annotations_export();if(i===null)return this.handlers.note(`image: save: nothing measured, or ${this.engine.name} writes no report`),!1;const n=`${t}/annotations/${e}/measurements.dcm`,r=await this.handlers.file_put(n,i);return this.handlers.note(r===200?`✓ ${n}`:`image: save: ${n}: HTTP ${r}`),r===200}dispose(){this.engine_dispose()}async colormap_cycle(){const e=_c[(_c.indexOf(this.colormap)+1)%_c.length]??"gray";this.colormap_set(e)}async engine_open(e){this.engine=e,this.field.replaceChildren(),this.progressNote=null,this.overlayNote=null,this.probeNote=null,this.layoutPills_paint("single"),this.modeSpan.textContent="",this.colormapPill.textContent=this.colormap.toUpperCase();try{await e.open(this.field)}catch(i){this.stateSpan.textContent="REFUSED",this.handlers.note(`image: ${i instanceof Error?i.message:String(i)}`);return}const t=e.state_get().layout;this.layoutPills_paint(t),this.modeSpan.textContent=t==="single"?"":t.toUpperCase(),e.tool_set(this.tool),this.toolPills_paint(),this.progress_show(null),this.overlay_fill()}engine_dispose(){this.engine?.dispose(),this.engine=null,this.progressNote=null,this.overlayNote=null,this.probeNote=null,this.field.replaceChildren(),this.stateSpan.textContent=""}retryPill_paint(){const e=this.engine===null?0:this.engine.state_get().refused,t=this.engine?.refused_retry!==void 0;this.retryPill.hidden=!t||e===0,this.retryPill.disabled||(this.retryPill.textContent=`RETRY ${e}`)}async retry_press(){if(!(this.engine?.refused_retry===void 0||this.retryPill.disabled)){this.retryPill.disabled=!0,this.retryPill.textContent="ASKING…";try{await this.engine.refused_retry()}finally{this.retryPill.disabled=!1,this.retryPill_paint()}}}engineHost_get(){return{source:this.handlers.source,readout_set:e=>{this.stateSpan.textContent=e,this.retryPill_paint()},progress_set:e=>this.progress_show(e),note:this.handlers.note,regard:e=>{this.handlers.regard(e),this.overlaySlice_paint()},probe_set:e=>this.probe_show(e)}}probe_show(e){if(e===null){this.probeNote?.remove(),this.probeNote=null;return}if(this.probeNote===null||this.probeNote.parentElement===null){const t=document.createElement("div");t.className="image-probe-note",this.field.appendChild(t),this.probeNote=t}this.probeNote.textContent=e}overlaySlice_paint(){const e=this.overlayNote?.querySelector(".image-overlay-slice")??null;if(e===null||this.engine===null)return;const t=this.engine.state_get();e.textContent=t.slices>1?`SLICE ${Math.max(1,t.slice)} OF ${t.slices}`:"",e.hidden=t.slices<=1}progress_show(e){if(e===null){this.progressNote?.remove(),this.progressNote=null;return}if(this.progressNote===null||this.progressNote.parentElement===null){const o=document.createElement("div");o.className="image-working",o.innerHTML='<span class="image-working-label"></span><span class="image-working-track"><span class="image-working-fill"></span></span><span class="image-working-count"></span>',this.field.appendChild(o),this.progressNote=o}const t=this.progressNote;t.classList.remove("image-working-failed");const i=e.total>0,n=i?Math.min(1,e.done/e.total):0;t.querySelector(".image-working-label").textContent=e.label,t.querySelector(".image-working-count").textContent=i?`${e.done} / ${e.total} · ${Math.round(n*100)}%`:"";const r=t.querySelector(".image-working-fill");r.classList.toggle("image-working-pacing",!i),r.style.width=i?`${Math.round(n*100)}%`:""}async overlay_set(e){if(this.overlay=e,this.overlayPill.textContent=e?"OVERLAY ON":"OVERLAY OFF",this.overlayPill.classList.toggle("rail-off",!e),!e){this.overlay_hide();return}await this.overlay_fill()}overlay_hide(){this.overlayNote?.remove(),this.overlayNote=null}async overlay_fill(){if(!this.overlay||this.series===null)return;const e=this.series.files[0]??this.series.path,t=await this.handlers.tags_read(e);if(t===null){this.handlers.note(`image: overlay: ${e}: no header to read`);return}this.overlayLines=WN.flatMap(i=>{const r=(t.constant.find(o=>o.name===i.tag)?.value??"").trim();return r===""?[]:[i.label===""?r:`${i.label} ${r}`]}),this.overlay_paint()}overlay_paint(){if(!this.overlay||this.overlayLines.length===0)return;this.overlay_hide();const e=document.createElement("div");e.className="image-overlay-note";const t=document.createElement("span");t.className="image-overlay-slice",e.appendChild(t);for(const i of this.overlayLines){const n=document.createElement("span");n.textContent=i,e.appendChild(n)}this.field.appendChild(e),this.overlayNote=e,this.overlaySlice_paint()}toolPills_paint(){const e=new Set(this.engine?.toolsOffered_get()??Tg),t=this.engine!==null?this.engine.state_get().primaryTool:this.tool;for(const[i,n]of this.toolPills){const r=e.has(i);n.classList.toggle("rail-na",!r),n.classList.toggle("rail-off",r&&i!==t),n.disabled=!r}}focusMark_paint(e){this.focusMark.hidden=!e,this.pane.classList.toggle("image-field-focused",e)}}function ti(s,e){const t=s.querySelector(e);if(t===null)throw new Error(`image pane: missing ${e}`);return t}const oy=["patient","study","series","image","equipment","meta","private","other","varying"],jN=new Set(["meta","private"]),iM="••••";class HN{pane;title;modeSpan;redactBlock;listing;handlers;redact=!0;model=null;groups=[];constructor(e,t){this.handlers=t,this.pane=e,this.title=lc(e,".pane-title"),this.modeSpan=lc(e,".pane-mode"),this.redactBlock=lc(e,".tags-redact"),this.redactBlock.addEventListener("click",()=>this.redact_set(!this.redact));const i=lc(e,".tags-panel");this.listing=new ar({mount:i,traits:this.groupTraits_declare(),key:n=>n.group,chrome:{root:e,prefix:"tags"},caps:"root",row:{className:()=>"tags-group-row",groupClassName:n=>`tags-group tags-group-${n.group}`,decorate:n=>{n.title="fold this group open or shut (it keeps its place)"}},child:Wo(n=>n.rows,{traits:this.tagTraits_declare(),key:n=>n.key,activatable:n=>n.items.length>0,row:{className:n=>`tags-row${n.phi?" tags-phi":""}`,groupClassName:()=>"tags-sequence",decorate:(n,r)=>{n.title=r.items.length>0?`${r.name}: fold the sequence open or shut`:`${r.tag} ${r.name}`}},child:Wo(n=>n.items,{traits:this.itemTraits_declare(),key:n=>n.key,row:{className:()=>"tags-item-row",groupClassName:()=>"tags-item"},child:Wo(n=>n.rows,{traits:this.tagTraits_declare(),key:n=>n.key,activatable:()=>!1,row:{className:n=>`tags-row tags-row-deep${n.phi?" tags-phi":""}`}})})}),state:n=>this.stateLine_compose(n),empty:()=>YN("NO TAGS")}),this.redactBlock_paint(),this.listing.rows_set([],{field:"tags"})}model_show(e){this.model=e,this.title.textContent=`TAGS ${qN(e)}`,this.pane.dataset.modality=KN(e),this.groups=VN(e),this.listing.rows_set([{key:e.path,rows:this.groups}],{field:e.path}),this.listing.open_set(0,this.groups.map(t=>t.group).filter(t=>!jN.has(t))),this.modeSpan.textContent=e.subject==="folder"?"FOLDER":""}path_get(){return this.model?.path??null}redact_get(){return this.redact}redact_set(e){this.redact=e,this.redactBlock_paint(),this.model!==null&&this.listing.rows_set([{key:this.model.path,rows:this.groups}],{field:this.model.path})}filter_set(e){if(e===null){this.listing.filter_toggle(!1);return}this.listing.filter_toggle(!0),this.listing.filter_set(e)}stateLine_compose(e){const t=this.groups.reduce((n,r)=>n+r.rows.length,0),i=[];return this.model!==null&&this.model.subject==="folder"&&(i.push(this.model.read===this.model.of?`${this.model.read} FILES`:`${this.model.read} OF ${this.model.of} FILES`),this.model.refused.length>0&&i.push(`REFUSED ${this.model.refused.length}`)),i.push(e.filter!==""?e.filter:`${t} TAGS`),this.redact&&i.push("REDACTED"),i.join(" · ")}redactBlock_paint(){this.redactBlock.textContent=this.redact?"REDACT ON":"REDACT OFF",this.redactBlock.classList.toggle("rail-off",!this.redact),this.pane.classList.toggle("tags-redacted",this.redact)}value_cell(e){const t=document.createElement("span");if(t.className="tags-value",e.phi&&this.redact)return t.textContent=iM,t.title="identifying value, redacted; the REDACT block on the frame reveals it",t;if(t.textContent=e.value,e.decoded!==void 0){const i=document.createElement("span");i.className="tags-decoded",i.textContent=` ${e.decoded}`,t.appendChild(i)}if(e.distinct!==void 0){const i=document.createElement("span");i.className="tags-decoded",i.textContent=` (${e.distinct} distinct)`,t.appendChild(i)}return t}groupTraits_declare(){return[eu(()=>!0),{key:"group",label:"GROUP",className:"tags-group-name",width:"minmax(12em, 1fr)",cell:e=>e.group.toUpperCase(),compare:e=>oy.indexOf(e.group)},{key:"count",label:"TAGS",className:"tags-group-count",width:"5em",cell:e=>String(e.rows.length),compare:e=>e.rows.length}]}tagTraits_declare(){return[eu(e=>e.items.length>0),{key:"tag",label:"TAG",className:"tags-tag",width:"7em",cell:e=>e.tag,compare:e=>e.tag},{key:"name",label:"NAME",className:"tags-name",width:"minmax(8em, 1.4fr)",cell:e=>e.name,compare:e=>e.name.toLowerCase()},{key:"vr",label:"VR",className:"tags-vr",width:"2.4em",cell:e=>e.vr,compare:e=>e.vr},{key:"value",label:"VALUE",className:"tags-value-cell",width:"minmax(6em, 2fr)",cell:e=>this.value_cell(e),compare:e=>(e.phi&&this.redact?iM:`${e.value} ${e.decoded??""}`).toLowerCase()}]}itemTraits_declare(){return[eu(()=>!0),{key:"item",label:"ITEM",className:"tags-item-name",width:"minmax(12em, 1fr)",cell:e=>`ITEM ${e.index}`,compare:e=>e.index},{key:"count",label:"TAGS",className:"tags-group-count",width:"5em",cell:e=>String(e.rows.length),compare:e=>e.rows.length}]}}function eu(s){return{key:"fold",label:"",className:"tags-fold",capped:!1,width:"1.4em",cell:e=>{const t=document.createElement("span");return t.className=s(e)?"tags-fold":"tags-fold tags-fold-none",t}}}function VN(s){const e=new Map;for(const t of s.constant){const i=t.group;e.has(i)||e.set(i,[]),e.get(i)?.push(ay(t,`${i}/${t.tag}`))}return s.varying.length>0&&e.set("varying",s.varying.map(t=>({tag:t.tag,name:t.name,vr:t.vr,value:t.distinct===1?t.first:`${t.first} .. ${t.last}`,phi:t.phi,items:[],distinct:t.distinct,key:`varying/${t.tag}`}))),oy.filter(t=>e.has(t)).map(t=>({group:t,rows:e.get(t)??[]}))}function ay(s,e){return{tag:s.tag,name:s.name,vr:s.vr,value:s.value,...s.decoded!==void 0?{decoded:s.decoded}:{},phi:s.phi,items:(s.items??[]).map((t,i)=>({index:i+1,key:`${e}/${i+1}`,rows:t.map(n=>ay(n,`${e}/${i+1}/${n.tag}`))})),key:e}}function qN(s){const e=s.path.replace(/\/$/,"").split("/").pop()??s.path;if(s.subject==="folder")return e.length>24?`${e.slice(0,22)}…`:e;const t=/^(\d+)-/.exec(e)?.[1];return t!==void 0?`INSTANCE ${Number(t)}`:e.length>24?`${e.slice(0,22)}…`:e}function KN(s){const e=(s.constant.find(t=>t.name==="Modality")?.value??"").toUpperCase();return e==="MR"||e==="CT"||e==="PT"?e:"OT"}function YN(s){const e=document.createElement("div");return e.className="tags-note",e.textContent=s,e}function lc(s,e){const t=s.querySelector(e);if(t===null)throw new Error(`tags pane: missing ${e}`);return t}function XN(s,e){const t=Di("tpl-pane-image"),i=new $N(t,{source:{url_of:n=>s.vfsUrl_build(n)},note:n=>s.terminal().line_note(n),regard:n=>s.subjects().regard_write(e,{address:n,modelKind:"dicom.instance"}),file_put:async(n,r)=>{try{return(await fetch(s.vfsUrl_build(n),{method:"POST",body:r})).status}catch{return 0}},tags_read:n=>Pm(s,n),tags_open:()=>{s.terminal().line_note(ly(s,e))}});return s.panels().set("image",e,i),{id:e,kind:"image",mount:t,dispose:()=>{i.dispose(),s.panels().delete(e),s.subjects().pane_leave(e)}}}function ZN(s,e){const t=Di("tpl-pane-tags"),i=new HN(t,{note:n=>s.terminal().line_note(n)});return s.panels().set("tags",e,i),{id:e,kind:"tags",mount:t,dispose:()=>{s.panels().delete(e),s.subjects().pane_leave(e)}}}async function Pm(s,e){try{const t=await s.client().line_execute(`dcm tags "${e}"`,{silent:!0,observe:!1});for(const i of t.envelopes){if(i.model?.kind!==ko.tags)continue;const n=K0.safeParse(i.model.data);if(n.success)return n.data}}catch{}return null}function JN(s,e,t){const i=s.panels().get("tags",e);i===void 0||i.path_get()===t||Pm(s,t).then(n=>{if(n===null){s.terminal().line_note(`tags: ${t}: not a readable DICOM file`);return}s.panels().get("tags",e)?.model_show(n)})}function ly(s,e){const t=new Set(s.layout().panes_shown()),i=s.subjects().group_of(e);for(const r of s.panels().ids("tags"))if(t.has(r)&&s.subjects().group_of(r)===i)return s.layout().focus_set(r),"image tags";if(!t.has(e))return"image tags: the image pane is not on stage";const n=s.instance_spawn("tags",e);return s.layout().leaf_split(e,s.desktop().replayPlace_get()?.dir??"col",n.id,s.desktop().replayPlace_get()?.before??!1)?(s.birth_record(n.id,e,s.desktop().replayPlace_get()?.dir??"col",s.desktop().replayPlace_get()?.before??!1),"image tags"):(xs(n.id),s.layout().mount_remove(n.id),"image tags: could not open beside the image pane")}async function Qf(s,e){try{const t=await s.client().line_execute(`dcm series "${e}"`,{silent:!0,observe:!1});for(const i of t.envelopes){if(i.model?.kind!==ko.series)continue;const n=Y0.safeParse(i.model.data);if(n.success)return n.data}}catch{}return null}async function cy(s,e){try{const t=await s.client().line_execute(`ls "${e}"`,{silent:!0,observe:!1});for(const i of t.envelopes){if(i.model?.kind!=="fs.listing")continue;const n=i.model.data,r=(Array.isArray(n)?n[0]:n)??{},o=(r.path??e).replace(/\/$/,"");return(r.items??[]).filter(a=>a.type==="dir").map(a=>`${o}/${a.name}`)}}catch{}return[]}function hy(s,e,t){const i=l=>{t!==void 0&&s.subjects().regard_write(l,t)};if(e!==null&&s.panels().has("image",e))return i(e),s.panels().get("image",e)??null;const n=new Set(s.layout().panes_shown());if(t!==void 0){for(const[l,c]of s.panels().entries("image"))if(n.has(l)&&s.subjects().regard_get(l)?.address===t.address)return i(l),c}const r=e!==null?s.subjects().group_of(e):null;for(const[l,c]of s.panels().entries("image"))if(n.has(l)&&r!==null&&s.subjects().group_of(l)===r)return c;const o=e!==null&&n.has(e)?e:s.errandHost_find();if(o===null)return null;const a=s.instance_spawn("image",e??void 0);return s.layout().leaf_split(o,s.desktop().replayPlace_get()?.dir??"col",a.id,s.desktop().replayPlace_get()?.before??!1)?(s.birth_record(a.id,o,s.desktop().replayPlace_get()?.dir??"col",s.desktop().replayPlace_get()?.before??!1),i(a.id),s.panels().get("image",a.id)??null):(xs(a.id),s.layout().mount_remove(a.id),null)}async function QN(s,e,t,i={},n){s.launcher_yield();const r=e!==null?void 0:Hu.test(t)?{address:t,modelKind:"image.volume"}:{address:Qc.test(t)?t.slice(0,t.lastIndexOf("/")):t.replace(/\/$/,""),modelKind:"dicom.series"},o=hy(s,e,r);if(o===null)return"image: no pane to open beside";const a=s.panels().idOf("image",o);if(a!==null&&n?.(a),Hu.test(t))return o.opening_show(t),o.volume_show(t),`image ${t}`;const l=Qc.test(t),c=l?t.slice(0,t.lastIndexOf("/")):t.replace(/\/$/,"");o.opening_show(c);let h=await Qf(s,c),d=[];if(h===null&&!l){const p=(await cy(s,c)).slice(0,32);for(const f of p){const _=await Qf(s,f);if(_!==null){d=p.map(g=>({path:g,label:g.split("/").pop()??g})),h=_;break}}}if(h===null)return o.opening_fail(t,"NOT A READABLE SERIES"),`image: ${t}: not a readable DICOM series, study, or volume`;const u=l?Math.max(1,h.files.indexOf(t)+1):1;return o.series_show(h,{siblings:d,startAt:u,...i.force===!0?{force:!0}:{}}),`image ${h.path}${d.length>1?` (1 of ${d.length} series)`:""}`}function ek(s){return{imageInstance_build:e=>XN(s,e),tagsInstance_build:e=>ZN(s,e),tags_ask:e=>Pm(s,e),tagsPane_follow:(e,t)=>JN(s,e,t),tagsPane_open:e=>ly(s,e),series_ask:e=>Qf(s,e),subfolders_ask:e=>cy(s,e),imagePane_for:(e,t)=>hy(s,e,t),image_open:(e,t,i={},n)=>QN(s,e,t,i,n)}}function tk(s){return{primaries:[s.panes.dag_build("dag",!0),s.panes.universe_build("universe"),{id:"pacs",kind:"pacs",mount:s.pacsMount}],domains:["dag","pacs"],presets:[["pacs",()=>({pane:"pacs"})],["dag",()=>({pane:"dag"})],["universe",()=>({pane:"universe"})]],factories:[["dag",e=>s.panes.dag_build(e,!1)],["universe",s.panes.universe_build],["image",s.dicom.imageInstance_build],["tags",s.dicom.tagsInstance_build],["gather",s.gather_build]]}}function sk(s){return async()=>{const e=await s.ask("proc feeds");let t=[];for(const d of e.envelopes){const u=d.model;if(u===void 0||u.kind!==Pu)continue;const p=ku.safeParse(u.data);p.success&&(t=p.data.feeds)}const n=t.length===0&&e.envelopes.some(d=>d.status==="error")?"INDEX WARMING":`${t.length} FEEDS`,r=t.filter(d=>/error/i.test(d.status)).length,o=t.filter(d=>/running|scheduled|created|started/i.test(d.status)).length,a={key:"universe",name:"UNIVERSE",hue:"--honey",numeral:"",figures:[{text:n}],rows:[],verb:"SEE THE SPACE",about:Kn.universe,enter:()=>s.universe_show()},l={key:"analyses",name:"ANALYSES",hue:"--october-sunset",numeral:"3",figures:[{text:n},...o>0?[{text:`${o} RUNNING`}]:[],...r>0?[{text:`${r} ERRORED`,errored:!0,open:()=>s.runs_show("status:error")}]:[]],rows:t.slice(0,6).map(d=>({text:`${d.id} ${d.title}`,errored:/error/i.test(d.status),open:()=>s.feed_enter(d.id)})),verb:"OPEN THE ROSTER",about:Kn.analyses,enter:()=>s.runs_show()},c=s.pacs_query(),h={key:"pacs",name:"PACS",hue:"--daybreak",numeral:"4",figures:[{text:c===""?"NO ANSWER":"ANSWERED"}],rows:c===""?[{text:"pacs query PatientID:…",open:()=>s.line_offer("pacs query PatientID:")},{text:"pacs query AccessionNumber:…",open:()=>s.line_offer("pacs query AccessionNumber:")}]:[{text:c.slice(0,48)}],verb:"ASK A PACS",about:Kn.pacs,enter:()=>s.pacs_open()};return{lead:{tile:l,weight:t.length},afterFiles:[h],afterPanes:[a],about:{files:{text:"Your ChRIS home: uploads, results and what others shared with you."}}}}}function ik(s){return s>=6e4?`${Math.max(1,Math.round(s/6e4))} MIN`:`${Math.max(1,Math.round(s/1e3))} S`}function ci(s){return s.toLocaleString("en-US")}class nk{mount;counts=null;context=null;msPerPage=null;walkSamples=new Map;clock;acts;state=void 0;constructor(e,t=()=>Date.now(),i={}){this.mount=e,this.clock=t,this.acts=i,this.render()}state_show(e){this.state=e,this.render()}pace_show(e){this.msPerPage=e,this.render()}eta_of(e,t,i){const n=this.clock(),r=this.walkSamples.get(e);let o=r?.rowsPerMs??null;r!==void 0&&t>r.loaded&&n>r.at&&(o=(t-r.loaded)/(n-r.at)),(r===void 0||t!==r.loaded)&&this.walkSamples.set(e,{loaded:t,at:n,rowsPerMs:o});const a=Math.max(0,i-t);return i<=0?null:o!==null&&o>0?a/o:this.msPerPage!==null&&this.msPerPage>0?Math.ceil(a/100/4)*this.msPerPage:null}counts_show(e){this.counts=e,this.render()}promptContext_show(e){this.context=e,e.procIndex!==void 0&&(this.counts={jobs:e.procIndex.jobs,feeds:e.procIndex.feeds}),this.render()}rows_compose(){const e=[],t=this.context?.procWarmup,i=this.context?.warmupFailures??[],n=t!==void 0&&t.sweeping!==!1,r=this.counts!==null?`${ci(this.counts.jobs)} JOBS · ${ci(this.counts.feeds)} FEEDS`:"";if(i.length>0)e.push({label:"INDEX",bar:null,value:`${r}${r?" · ":""}FAILED: ${i.map(l=>l.label.toUpperCase()).join(" ")}`,title:i.map(l=>`${l.label}: ${l.message}`).join(`
|
|
4292
4292
|
`),degraded:!0});else if(n&&t!==void 0){const l=(t.state??"cold").toUpperCase();e.push({label:"INDEX",bar:{loaded:t.loaded,total:t.total??0,state:t.state==="failed"?"failed":"running"},value:`SWEEP ${ci(t.loaded)} / ${t.total!==void 0?ci(t.total):"?"} · ${l}`,title:"The global topology sweep: every plugin instance CUBE holds, walked page by page.",degraded:t.state==="failed"})}else e.push({label:"INDEX",bar:null,value:r?`${r} · CURRENT`:"CURRENT",title:"Nothing is moving: the process index is whole and current.",degraded:!1});if(this.state!==void 0){const l=this.state;e.push({label:"RUNNING",bar:null,value:`${ci(l.running)} IN ${ci(l.runningFeeds)} FEEDS · SCHEDULED ${ci(l.scheduled)}`,title:"Jobs running and waiting across every feed the index holds, from the roster's own counters.",degraded:!1,verb:this.acts.errored_open!==void 0?{label:`ERRORED ${ci(l.errored)} IN ${ci(l.erroredFeeds)} FEEDS`,title:"Open the runs roster filtered to the feeds with errored jobs.",act:this.acts.errored_open}:null})}const o=t?.feeds??(t?.feed!==void 0?[t.feed]:[]);for(const l of Array.from(this.walkSamples.keys()))o.some(c=>c.id===l)||this.walkSamples.delete(l);for(const l of o){const c=l.total>0?ci(l.total):"?";if(l.failed!==void 0)e.push({label:`FEED ${l.id}`,bar:{loaded:l.loaded,total:l.total,state:"failed"},value:`FAILED AT ${ci(l.loaded)} / ${c} · ${l.failed.toUpperCase()}`,title:"The walk stopped; the next visit to the feed starts it again.",degraded:!0});else{const h=this.eta_of(l.id,l.loaded,l.total);e.push({label:`FEED ${l.id}`,bar:{loaded:l.loaded,total:l.total,state:"running"},value:`INDEXING ${ci(l.loaded)} / ${c}${h!==null?` · ETA ${ik(h)}`:""}`,title:"A feed is being indexed on its first visit; it opens when the walk lands.",degraded:!1})}}t?.roster!==void 0&&e.push({label:"ROSTER",bar:null,value:t.roster==="full"?"FULL WALK · every feed the identity can see":"DELTA · feeds newer than the roster knows",title:"The roster is being brought up to date; the listing answered from the cache and refreshes when arrivals land.",degraded:!1});const a=t?.arrived??[];return a.length>0&&e.push({label:"ARRIVED",bar:null,value:a.length<=3?a.map(l=>`FEED ${l}`).join(" · "):`${a.length} FEEDS`,title:"Feeds the roster gained: created here, or shared with this identity.",degraded:!1}),e}render(){const e=this.rows_compose();this.mount.replaceChildren();for(const t of e){const i=document.createElement("div");i.className="index-row telemetry-row",i.classList.toggle("status-degraded",t.degraded),i.title=t.title;const n=document.createElement("span");if(n.className="telemetry-label",n.textContent=t.label,i.appendChild(n),t.bar!==null){const o=document.createElement("span");o.className=`index-bar listing-progress listing-progress-${t.bar.state}`;const a=document.createElement("span");a.className="listing-progress-fill";const l=t.bar.total>0?Math.min(100,Math.round(t.bar.loaded/t.bar.total*100)):0;a.style.width=`${l}%`,o.appendChild(a),i.appendChild(o)}const r=document.createElement("span");if(r.className="telemetry-value",r.textContent=t.value,i.appendChild(r),t.verb!==void 0&&t.verb!==null){const o=document.createElement("button");o.type="button",o.className="index-verb pacs-capsule",o.textContent=t.verb.label,o.title=t.verb.title,o.addEventListener("click",t.verb.act),i.appendChild(o)}this.mount.appendChild(i)}}}function rk(s,e){const t=new nk(s,()=>Date.now(),{errored_open:()=>e.runs_show("status:error")});return{promptContext_take:i=>{t.promptContext_show(i),e.dag_primary().promptContext_observe(i);for(const n of e.universes())n.promptContext_observe(i)},telemetry_take:(i,n)=>{t.counts_show(i),n?.state!==void 0&&t.state_show(n.state),n?.cube!==void 0&&t.pace_show(n.cube.msPerPage)},progress_take:i=>{for(const n of e.dag_instances())n.progress_observe(i);e.pacs().progress_observe(i)}}}class ok{container;title;handlers;currentAddress=null;constructor(e,t,i){this.container=e,this.title=t,this.handlers=i,this.awaiting_render()}regard_show(e){if(this.currentAddress=e.address,this.title.textContent=`VIEWER — ${e.address}`.toUpperCase(),this.handlers.path_isImage(e.address)){this.container.replaceChildren();const t=document.createElement("img");t.className="files-image",t.src=this.handlers.imageUrl_build(e.address),t.alt=e.address,this.container.appendChild(t);return}this.handlers.content_fetch(e.address).then(t=>{if(this.currentAddress!==e.address)return;if(this.container.replaceChildren(),t.trim().length===0){const n=document.createElement("p");n.className="files-empty",n.textContent=`NO PREVIEW — ${e.address.toUpperCase()}`,this.container.appendChild(n);return}const i=document.createElement("pre");i.className="files-content",i.textContent=t,this.container.appendChild(i)})}awaiting_render(){this.container.replaceChildren();const e=document.createElement("p");e.className="files-empty",e.textContent="NO REGARD — INDICATE A FILE OR NODE IN THIS PANE’S GROUP",this.container.appendChild(e)}}class ak{groups=new Map;membership=new Map;writeObserver=null;writeObserver_set(e){this.writeObserver=e}pane_join(e,t){this.pane_leave(e),this.membership.set(e,t),this.groups.has(t)||this.groups.set(t,{value:null,subscribers:new Map,viewers:new Set})}pane_leave(e){const t=this.membership.get(e);if(t===void 0)return;this.membership.delete(e);const i=this.groups.get(t);if(i!==void 0){i.subscribers.delete(e),i.viewers.delete(e);for(const n of this.membership.values())if(n===t)return;this.groups.delete(t)}}group_of(e){const t=this.membership.get(e);return t!==void 0?t:(this.pane_join(e,e),e)}viewer_mark(e){this.groups.get(this.group_of(e))?.viewers.add(e)}groupHasViewer(e){const t=this.groups.get(this.group_of(e));return t!==void 0&&t.viewers.size>0}regard_write(e,t){const i=this.group_of(e),n=this.groups.get(i),r={...t,paneId:e};n.value=r;for(const o of n.subscribers.values())o(r);this.writeObserver?.(r,i)}regard_subscribe(e,t){const i=this.groups.get(this.group_of(e));i.subscribers.set(e,t),i.value!==null&&t(i.value)}regard_get(e){return this.groups.get(this.group_of(e))?.value??null}}const tu=["⣾","⣽","⣻","⢿","⡿","⣟","⣯","⣷"],lk=new Set(["done","error","unconfirmed","stalled","timeout"]);function ck(s,e){const t=`${e.operation}:${e.itemId??""}`;if(e.phase==="complete"||e.phase==="failed"){const i=`${e.operation}:`;for(const n of[...s])(n===t||n.startsWith(i))&&s.delete(n);return}if(e.itemId!==void 0&&e.status!==void 0&&lk.has(e.status)){s.delete(t);return}s.add(t)}const hk=100;class dk{fields;buildShown=!1;running=new Set;activityTimer=null;activityFrame=0;constructor(e){this.fields={identity:Ln(e,"status-identity"),jobs:Ln(e,"status-jobs"),activity:Ln(e,"status-activity"),latency:Ln(e,"status-latency"),mismatch:Ln(e,"status-mismatch"),lamp:Ln(e,"status-lamp"),host:Ln(e,"status-host"),questions:Ln(e,"status-questions")}}attach_show(e){if(e.protocolVersion!==Du){this.fields.mismatch.textContent=`WIRE V${e.protocolVersion} ≠ V${Du}`,this.fields.mismatch.title="This surface and the daemon speak different contract versions. Some messages may be dropped.",this.hostControl_show(e.hostControl??[]);return}this.fields.mismatch.textContent="",this.fields.mismatch.title=e.stack!==void 0?`chell ${e.stack.chell} · calypso ${e.stack.calypso} · build ${e.stack.build}`:"",this.hostControl_show(e.hostControl??[])}build_show(e,t=""){this.fields.mismatch.textContent!==""&&!this.buildShown||(this.buildShown=e!==null,this.fields.mismatch.textContent=e??"",this.fields.mismatch.title=t)}hostControl_show(e){this.fields.host.textContent=e.length>0?`HOST ${e.join(" ")}`:"",this.fields.host.title=e.length>0?"Calypso was started with --host-control: `!` and pipes run on its host, upload/download reach its disk.":""}questions_show(e){this.fields.questions.textContent=e.length>0?`? ${e.length} WAITING`:"",this.fields.questions.title=e.map(t=>`surface ${t.surface.slice(0,6)} asks "${t.message.trim()}" (${Math.round(t.sinceMs/1e3)} s); its command is paused until answered there`).join(`
|
|
4293
4293
|
`)}promptContext_show(e){const t=e.uri.replace(/^https?:\/\//,"");this.fields.identity.textContent=`${e.user}@${t}`.toUpperCase();const i=e.procWarmup,n=[];if(i!==void 0&&i.sweeping!==!1){const a=i.total!==void 0?`/${i.total}`:"",l=i.state!==void 0?` ${i.state.toUpperCase()}`:"";n.push(`JOBS ${i.loaded}${a}${l}`)}const r=i?.feeds??(i?.feed!==void 0?[i.feed]:[]);for(const a of r){const l=a.total>0?`/${a.total}`:"";n.push(a.failed!==void 0?`FEED ${a.id} FAILED ${a.loaded}${l}`:`FEED ${a.id} ${a.loaded}${l}`)}i?.roster!==void 0&&n.push(i.roster==="full"?"ROSTER WALK":"ROSTER DELTA"),i?.arrived!==void 0&&i.arrived.length>0&&n.push(i.arrived.length<=2?`+FEED ${i.arrived.join(" ")}`:`+${i.arrived.length} FEEDS`);const o=e.warmupFailures??[];o.length>0&&n.push(`WARM-UP FAILED: ${o.map(a=>a.label.toUpperCase()).join(" ")}`),this.fields.jobs.textContent=n.join(" · "),this.fields.jobs.classList.toggle("status-degraded",o.length>0),this.fields.jobs.title=o.length>0?o.map(a=>`${a.label}: ${a.message}`).join(`
|
|
4294
4294
|
`):r.length>0?"A feed is being indexed on its first visit; it opens when the walk completes.":"",this.fields.latency.textContent=e.lastCommandDurationMs>0?`${e.lastCommandDurationMs}MS`:""}progress_observe(e){ck(this.running,e),this.activity_paint()}activity_clear(){this.running.clear(),this.activity_paint()}connection_show(e){this.fields.lamp.textContent=e?"ONLINE":"OFFLINE",this.fields.lamp.classList.toggle("lamp-online",e),this.fields.lamp.classList.toggle("lamp-offline",!e),e||this.activity_clear()}activity_paint(){if(this.running.size===0){this.activityTimer!==null&&(clearInterval(this.activityTimer),this.activityTimer=null),this.fields.activity.textContent="";return}const e=()=>{const t=tu[this.activityFrame]??tu[0];this.fields.activity.textContent=`${t} ${this.running.size} RUNNING`};e(),this.activityTimer===null&&(this.activityTimer=window.setInterval(()=>{this.activityFrame=(this.activityFrame+1)%tu.length,e()},hk))}}function Ln(s,e){const t=s.getElementById(e);if(t===null)throw new Error(`status bar: no element with id '${e}'`);return t}const uk=3e3;class fk{mount;clock;lane=void 0;cube=void 0;beatAt=null;constructor(e,t=()=>Date.now()){this.mount=e,this.clock=t,this.render()}telemetry_show(e={}){this.beatAt=this.clock(),e.lane!==void 0&&(this.lane=e.lane),e.cube!==void 0&&(this.cube=e.cube),this.render()}tick(){this.render()}rows_compose(){const e=[],t=this.lane;if(t===void 0)e.push({label:"LANE",value:"—",title:"The daemon has not said what holds its lane (an older daemon).",degraded:!1});else if(t.running===null)e.push({label:"LANE",value:t.waiting>0?`IDLE · ${t.waiting} WAITING`:"IDLE",title:"The serialized command lane: nothing is executing.",degraded:!1});else{const r=(t.running.sinceMs/1e3).toFixed(1);e.push({label:"LANE",value:`${t.running.line} · ${r} S${t.waiting>0?` · ${t.waiting} WAITING`:""}`,title:`The command holding the lane${t.running.surface?`, from surface ${t.running.surface}`:""}; every other command waits behind it.`,degraded:t.running.sinceMs>=1e4})}const i=t?.questions??[];if(i.length>0){const r=i.reduce((o,a)=>o.sinceMs>=a.sinceMs?o:a);e.push({label:"ASKING",value:`${i.length} · ${r.message.trim()} · ${(r.sinceMs/1e3).toFixed(0)} S`,title:"Questions open in the session. A command waiting on one has stepped out of the lane; it resumes when answered on the surface that asked.",degraded:!1})}if(this.beatAt===null)e.push({label:"BEAT",value:"NONE YET",title:"No telemetry heartbeat has landed.",degraded:!1});else{const r=Math.max(0,this.clock()-this.beatAt);e.push({label:"BEAT",value:`${(r/1e3).toFixed(1)} S AGO`,title:"The age of the last telemetry heartbeat; the daemon beats once a second while a surface is attached.",degraded:r>=uk})}const n=this.cube;if(n===void 0)e.push({label:"CUBE",value:"NO PAGE TIMED",title:"CUBE's pace is known once a page of a list has been fetched.",degraded:!1});else{const r=n.msPerPage>0?Math.round(6e4/n.msPerPage):0;e.push({label:"CUBE",value:`${(n.msPerPage/1e3).toFixed(1)} S/PAGE · ${r} PAGES/MIN`,title:`The median of the last ${n.samples} page fetches (100 rows each).`,degraded:!1})}return e}render(){const e=this.rows_compose();this.mount.replaceChildren();for(const t of e){const i=document.createElement("div");i.className="lane-row telemetry-row",i.classList.toggle("status-degraded",t.degraded),i.title=t.title;const n=document.createElement("span");n.className="telemetry-label",n.textContent=t.label;const r=document.createElement("span");r.className="telemetry-value",r.textContent=t.value,i.append(n,r),this.mount.appendChild(i)}}}const pk=[2,3,3,2,2,11,2,2],mk=4,nM=300,gk=2600,_k=650;class bk{wrapper;cells=[];bootedAt=Date.now();telemetry={jobsLoaded:0,jobsTotal:0,feeds:0,lastLatencyMs:0,latencySumMs:0,lastExitCode:0,commandsRun:0,opsActive:0,opsDone:0,opsFailed:0,itemsCurrent:0,itemsTotal:0,connected:0};activeOperations=new Set;telemetryRows=[];constructor(e){if(this.wrapper=e,e===null){window.setInterval(()=>this.beat_paint(),nM);return}const t=this.narrowSources_list(),i=this.wideSources_list();let n=0,r=0;for(const o of pk){const a=document.createElement("div");a.className="data-column";for(let l=1;l<=mk;l++){const c=document.createElement("div");c.className=`dc-row-${l}`;let h;o>=6?(h=i[r%i.length],r++):(h=t[n%t.length],n++);const d={element:c,width:o,source:h??(()=>0)};c.textContent=rM(d.source(),o),a.appendChild(c),this.cells.push(d)}e.appendChild(a)}window.setInterval(()=>this.beat_paint(),nM),this.sweep_start()}promptContext_observe(e){const t=e.procWarmup;t!==void 0&&(this.telemetry.jobsLoaded=t.loaded,this.telemetry.jobsTotal=t.total??t.loaded);const i=e.procIndex;i!==void 0&&(t===void 0&&(this.telemetry.jobsLoaded=i.jobs,this.telemetry.jobsTotal=i.jobs),this.telemetry.feeds=i.feeds),e.lastCommandDurationMs>0&&(this.telemetry.lastLatencyMs=e.lastCommandDurationMs,this.telemetry.latencySumMs+=e.lastCommandDurationMs,this.telemetry.commandsRun++),this.telemetry.lastExitCode=e.lastExitCode}progress_observe(e){const t=`${e.operation}:${e.itemId??""}`;if(e.phase==="complete"||e.phase==="failed"){const i=`${e.operation}:`;for(const n of[...this.activeOperations])(n===t||n.startsWith(i))&&this.activeOperations.delete(n);e.status==="error"||e.phase==="failed"?this.telemetry.opsFailed++:this.telemetry.opsDone++}else e.itemId!==void 0&&e.status!==void 0&&["done","error","unconfirmed","stalled","timeout"].includes(e.status)?this.activeOperations.delete(t):this.activeOperations.add(t);this.telemetry.opsActive=this.activeOperations.size,e.current!==void 0&&(this.telemetry.itemsCurrent=e.current),e.total!==void 0&&(this.telemetry.itemsTotal=e.total)}index_observe(e){this.telemetry.jobsLoaded=e.jobs,this.telemetry.jobsTotal=e.jobs,this.telemetry.feeds=e.feeds}connection_show(e){this.telemetry.connected=e?1:0,this.wrapper?.classList.toggle("dc-stale",!e)}telemetryPanel_bind(e){const t=this.telemetry,i=[["LINK",()=>t.connected===1?"ONLINE":"OFFLINE"],["JOBS INDEXED",()=>`${t.jobsLoaded} / ${t.jobsTotal}`],["FEEDS VISIBLE",()=>String(t.feeds)],["OPS ACTIVE",()=>String(t.opsActive)],["OPS DONE",()=>String(t.opsDone)],["OPS FAILED",()=>String(t.opsFailed)],["ITEMS",()=>`${t.itemsCurrent} / ${t.itemsTotal}`],["LAST COMMAND",()=>`${t.lastLatencyMs} MS`],["LATENCY SUM",()=>`${t.latencySumMs} MS`],["COMMANDS RUN",()=>String(t.commandsRun)],["LAST EXIT",()=>String(t.lastExitCode)],["UPTIME",()=>`${this.uptimeSeconds_get()} S`]];for(const[n,r]of i){const o=document.createElement("div");o.className="telemetry-row";const a=document.createElement("span");a.className="telemetry-label",a.textContent=n;const l=document.createElement("span");l.className="telemetry-value",l.textContent=r(),o.append(a,l),e.appendChild(o),this.telemetryRows.push({element:l,source:r})}}narrowSources_list(){const e=this.telemetry;return[()=>e.jobsLoaded,()=>e.feeds,()=>e.lastLatencyMs,()=>e.opsActive,()=>e.opsDone,()=>e.jobsTotal,()=>e.itemsCurrent,()=>e.itemsTotal,()=>e.opsFailed,()=>e.commandsRun,()=>e.lastExitCode,()=>new Date().getSeconds(),()=>this.uptimeSeconds_get()]}wideSources_list(){return[()=>Math.floor(Date.now()/1e3),()=>this.uptimeSeconds_get(),()=>this.telemetry.latencySumMs,()=>Mk()]}uptimeSeconds_get(){return Math.floor((Date.now()-this.bootedAt)/1e3)}beat_paint(){for(const e of this.cells){const t=rM(e.source(),e.width);e.element.textContent!==t&&(e.element.textContent=t)}for(const e of this.telemetryRows){const t=e.source();e.element.textContent!==t&&(e.element.textContent=t)}}sweep_start(){if(this.wrapper===null)return;const e=Array.from(this.wrapper.querySelectorAll(".data-column"));window.setInterval(()=>{const t=e[Math.floor(Math.random()*e.length)];t!==void 0&&(t.classList.add("dc-sweep"),window.setTimeout(()=>t.classList.remove("dc-sweep"),_k))},gk)}}function rM(s,e){const t=String(Math.max(0,Math.floor(s)));return t.length>e?t.slice(t.length-e):t.padStart(e,"0")}function Mk(){const s=new Date;return s.getHours()*1e4+s.getMinutes()*100+s.getSeconds()}const vk=2e4;class wk{scene;nameplate;command_run;names=[];cursor=0;timer=null;seen=new Map;constructor(e,t,i){this.nameplate=t,this.command_run=i,this.scene=new $h(e,{},{ambient:!0}),new MutationObserver(()=>this.scene.palette_refresh()).observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),new MutationObserver(()=>{window.setTimeout(()=>this.scene.size_fit(),60)}).observe(document.body,{attributes:!0,attributeFilter:["data-header"]}),window.addEventListener("resize",()=>this.scene.size_fit())}names_set(e){this.names=e,this.cursor=0,this.timer!==null&&(window.clearInterval(this.timer),this.timer=null),e.length!==0&&(this.next_request(),e.length>1&&(this.timer=window.setInterval(()=>this.next_request(),vk)))}envelope_observe(e){if(e.model?.kind!==Jn.pipelineDiagram)return;const t=Kp.safeParse(e.model.data);if(!t.success)return;const i=t.data;this.seen.set(i.name,i),this.model_stage(i)}model_stage(e){this.nameplate.textContent=e.name,this.scene.graph_set({nodes:e.nodes.map(t=>({id:t.id,label:t.label,parentIds:t.parentIds,joinParentIds:t.joinParentIds}))}),this.scene.size_fit()}next_request(){const e=this.names[this.cursor%this.names.length];if(this.cursor++,e===void 0)return;const t=this.seen.get(e);if(t!==void 0){this.model_stage(t);return}this.command_run(`pipeline diagram ${e}`)}}function yk(s,e){s.line_execute("ls /bin",{silent:!0,observe:!1}).then(t=>{const r=(t.envelopes.find(o=>o.model?.kind==="fs.listing")?.model?.data??[]).flatMap(o=>o.items).filter(o=>o.type==="pipeline").map(o=>o.name);e.names_set(r)})}const oM=new Set(["layout","slice","series","wl","colormap","save","tags","load","guard","ghost","state"]);function zk(s,e,t,i,n){if(t==="layout")return xr(s,e,".dag-strategy",i.toUpperCase())?`layout ${i}`:"dag layout ranked|molecule";if(t==="projection")return xr(s,e,".dag-projection",i.toUpperCase())?`projection ${i}`:"dag projection 2d|3d";if(t==="scale")return xr(s,e,".dag-scale",i.toUpperCase())?`scale ${i}`:"dag scale time|size";if(t==="hue")return xr(s,e,".dag-hue",i.toUpperCase())?`hue ${i}`:"dag hue status|compute";const r=(o,a,l,c)=>{const h=i.toLowerCase();return h==="on"||h==="off"?xr(s,e,o,h==="on"?l:c)?`${a} ${h}`:`dag ${a}: no mode frame`:h!==""?`dag ${a} on|off`:mn(s,e,o)?`${a} toggled`:`dag ${a}: no mode frame`};if(t==="pulse")return r(".dag-pulse","pulse","PULSE ON","PULSE OFF");if(t==="census")return r(".dag-census","census","CENSUS","SHAPE");if(t==="gravity")return r(".dag-gravity","gravity","GRAVITY ON","GRAVITY OFF");if(t==="draw")return xr(s,e,".dag-draw",i.toUpperCase())?`draw ${i}`:"dag draw spheres|stars";if(t==="select")return i===""?"dag select <feed or job>":s.dag_jump(e,i)?`selecting ${i}`:"dag select: no RUNS pane (view runs)";if(t==="enter")return i===""?"dag enter <job>":s.dag_jump(e,i,!0)?`entering ${i}`:"dag enter: no RUNS pane (view runs)";if(t==="refresh")return Mc(s,e,"REFRESH")?"refreshing":"dag refresh: no DAG pane";if(t==="physics"){const o=i,a=s.paneMount_get(e),l=a?.querySelector(".pane-dag")??a;if(l===null)return"dag physics: no DAG pane";if(o==="reset")return l.dispatchEvent(new CustomEvent("argus:dag-physics",{detail:"reset"})),"physics reset";const c=(n[2]??"on").toLowerCase()!=="off";return["charge","link","collide","gravity"].includes(o)?(l.dispatchEvent(new CustomEvent("argus:dag-physics",{detail:{term:o,on:c}})),`physics ${o} ${c?"on":"off"}`):`dag physics: unknown term '${o}' (charge|link|collide|gravity|reset)`}return`dag: unknown verb '${t}' (layout|projection|scale|hue|draw|pulse|census|gravity|select|enter|physics|refresh)`}function Sk(s,e,t){return t==="enter"?Mc(s,e,"ENTER NODE")?"entering node":"node enter: no DAG drawer":t==="back"?Mc(s,e,"BACK")?"node back":"node back: no DAG drawer":t==="immerse"?s.node_immerse(e)?"immersing":"node immerse: nothing indicated":t==="clear"?Mc(s,e,"CLEAR DETAIL")?"detail cleared":"node clear: no DAG drawer":`node: unknown verb '${t}' (enter|immerse|back|clear)`}function xk(s){return{subjects:{runs:null,node:null,dag:null,universe:null,pacs:new Set(["sort","filter"]),tags:new Set(["redact","filter"]),image:oM},views:{runs:{button:"gutter-runs",primary:"dag"},pacs:{button:"gutter-tools",primary:"pacs"}},claims:{runs:".empty-go-dag",pacs:".empty-go-pacs"},listings:{runs:{selector:".pane-dag",named:"DAG"},pacs:{selector:"#pacs-workspace",named:"PACS"}},chords:[{after:"1",key:"2",topic:"claim",selector:".empty-go-dag",does:"claim an empty pane as RUNS"},{after:"1",key:"3",topic:"claim",selector:".empty-go-pacs",does:"claim an empty pane as PACS"}],lines:[{after:"view",line:"runs enter <feedId> · sort <col> [asc|desc] · filter <text>|off"},{after:"view",line:"node enter · immerse · back · clear (the indicated node)"},{after:"view",line:"dag [@id] layout ranked|molecule · projection 2d|3d · scale time|size · hue status|compute · draw spheres|stars · pulse [on|off] · census [on|off] · gravity [on|off] · select <feed or job> · enter <job> · physics charge|link|collide|gravity on|off · physics reset · refresh"},{after:"file",line:"pacs sort <col> [asc|desc] · filter <text>|off (the results listing; every other pacs verb is the session's)"},{after:"file",line:"image [@id] [--force] <path> · layout single|mpr|3d|slab · slice <n> · series <n> · wl <lo> <hi> · wl preset <name> · colormap gray|hot|jet|cool · save · tags · load · guard <bytes>|off · ghost <0..1>|off · state"},{after:"file",line:"tags [@id] redact on|off · filter <text>|off (the pane that follows an image pane's slice)"}],run:(e,t,i)=>{const n=s(),{subject:r,words:o}=t,a=(o[0]??"").toLowerCase(),l=(o[1]??"").toLowerCase();if(r==="runs"){if(a==="enter"){const h=parseInt(l.replace(/^feed_/,""),10);return Number.isNaN(h)?"runs enter <feedId>":(n.feed_enter(h),`entering feed_${h}`)}return`runs: unknown verb '${a}' (enter)`}if(!["dag","image","tags","universe","node"].includes(r))return;const c=i();if(c===null)return`${r}: no target pane (nothing focused?)`;if(r==="dag")return zk(n,c,a,l,o);if(r==="image"){const h=o.filter(d=>d!=="--force");return oM.has((h[0]??"").toLowerCase())?n.image_control(c,a,o.slice(1)):null}return r==="tags"?n.tags_control(c,a,o.slice(1)):r==="universe"?n.universe_control(c,a,o.slice(1)):Sk(n,c,a)}}}function ol(s,e){if("pane"in s)return s.pane===e?[]:null;const t=ol(s.first,e);if(t!==null)return[{node:s,side:"first"},...t];const i=ol(s.second,e);return i!==null?[{node:s,side:"second"},...i]:null}function al(s,e,t){if(s===e)return t;if("pane"in s)return null;const i=al(s.first,e,t);if(i!==null)return{...s,first:i};const n=al(s.second,e,t);return n!==null?{...s,second:n}:null}function aM(s,e,t){const i=ol(s,e);if(i===null||i.length===0)return"lone";const n=qs[t].axis,r=qs[t].place==="after"?"first":"second",o=i[i.length-1];let a=null;for(let d=i.length-1;d>=0;d-=1){const u=i[d];if(u.node.dir===n&&u.side===r){a=u.side==="first"?u.node.second:u.node.first;break}}if(a===null){if(o.node.dir===n)return"edge";a=o.side==="first"?o.node.second:o.node.first}const l=gh(s,e);if(l===null)return"lone";const c={pane:e};return al(l,a,r==="first"?{dir:n,ratio:.5,first:a,second:c}:{dir:n,ratio:.5,first:c,second:a})??"edge"}const lM="argus-layout";class Ok{root;mounts;presets=new Map;prefs={};activePreset="";tree=null;focusedPane=null;renderObserver=null;previousFocus=null;constructor(e,t){this.root=e,this.mounts=t;try{const i=window.localStorage.getItem(lM);this.prefs=i!==null?JSON.parse(i):{}}catch{this.prefs={}}}renderObserver_set(e){this.renderObserver=e}preset_register(e,t){this.presets.set(e,t)}mount_register(e,t){this.mounts.set(e,t)}mount_remove(e){this.mounts.delete(e),this.focusedPane===e&&(this.focusedPane=null)}leaf_split(e,t,i,n=!1){if(this.tree===null)return!1;const r=mh(this.tree,e,{dir:t,ratio:.5,first:n?{pane:i}:{pane:e},second:n?{pane:e}:{pane:i}});return r===null?!1:(this.tree=r,this.focus_move(i),this.render(),!0)}leaf_move(e,t){if(this.tree===null)return"lone";const i=aM(this.tree,e,t);return typeof i=="string"?i:(this.tree=i,this.focus_move(e),this.render(),!0)}focus_move(e){this.focusedPane!==null&&this.focusedPane!==e&&(this.previousFocus=this.focusedPane),this.focusedPane=e}focus_last(){const e=this.previousFocus;return e===null||!this.panes_shown().includes(e)?null:(this.focus_set(e),e)}leaf_flip(e){if(this.tree===null)return!1;const t=ol(this.tree,e);if(t===null||t.length===0)return!1;const i=t[t.length-1],n={...i.node,dir:i.node.dir==="col"?"row":"col"},r=al(this.tree,i.node,n);return r===null?!1:(this.tree=r,this.render(),!0)}leaf_resize(e,t,i=.05){if(this.tree===null)return!1;const n=ol(this.tree,e);if(n===null||n.length===0)return!1;const r=qs[t].axis;for(let o=n.length-1;o>=0;o-=1){const a=n[o];if(a.node.dir!==r)continue;const l=qs[t].place==="after",c=Math.min(.85,Math.max(.15,a.node.ratio+(l?i:-i))),h={...a.node,ratio:c},d=al(this.tree,a.node,h);return d===null?!1:(this.tree=d,this.ratio_remember(n.slice(0,o).map(u=>u.side==="first"?"0":"1").join(""),c),this.render(),!0)}return!1}move_possible(e,t){return this.tree!==null&&typeof aM(this.tree,e,t)!="string"}leaf_replace(e,t){if(this.tree===null)return!1;const i=mh(this.tree,e,{pane:t});return i===null?!1:(this.tree=i,this.focusedPane===e&&(this.focusedPane=t),this.render(),!0)}leaf_close(e){if(this.tree===null||"pane"in this.tree)return!1;const t=gh(this.tree,e);return t===null?!1:(this.tree=t,this.focusedPane===e&&(this.focusedPane=null),this.render(),!0)}focused_get(){return this.focusedPane}savedPreset_get(){return this.prefs.preset!==void 0&&this.presets.has(this.prefs.preset)?this.prefs.preset:null}activePreset_get(){return this.activePreset}preset_has(e){return this.presets.has(e)}preset_apply(e){const t=this.presets.get(e);t!==void 0&&(this.activePreset=e,this.prefs.preset=e,this.prefs_save(),this.tree=this.ratios_restore(t(),e,""),this.render(),this.root.classList.remove("layout-arrive"),this.root.offsetWidth,this.root.classList.add("layout-arrive"))}tree_get(){return this.tree===null?null:JSON.parse(JSON.stringify(this.tree))}tree_set(e){this.tree=this.ratios_restore(e,this.activePreset,""),this.render()}panes_shown(){const e=[],t=i=>{if(i!==null){if("pane"in i){e.push(i.pane);return}t(i.first),t(i.second)}};return t(this.tree),e}render(){if(this.tree!==null){for(const e of this.mounts.values())e.remove();this.root.replaceChildren(this.node_render(this.tree,"")),this.focus_reconcile(),this.renderObserver?.()}}focus_reconcile(){const e=this.panes_shown();if(this.focusedPane!==null&&e.includes(this.focusedPane))return;const t=e[0];if(t===void 0)return;const i=this.focusedPane;this.focusedPane=null,this.focus_set(t),i!==null&&(this.previousFocus=i)}node_render(e,t){if("pane"in e){const a=document.createElement("div");a.className="layout-leaf",a.dataset.leaf=e.pane;const l=this.mounts.get(e.pane);return l!==void 0&&(a.appendChild(l),l.style.display="",a.addEventListener("mousedown",()=>this.focus_set(e.pane),{capture:!0}),e.pane===this.focusedPane&&a.classList.add("pane-focused")),a}const i=document.createElement("div");i.className=`layout-split layout-${e.dir}`;const n=this.node_render(e.first,`${t}0`),r=this.node_render(e.second,`${t}1`);n.style.flex=`${e.ratio} 1 0`,r.style.flex=`${1-e.ratio} 1 0`;const o=document.createElement("div");return o.className="layout-divider",this.divider_wire(o,i,e,n,r,t),i.append(n,o,r),i}divider_wire(e,t,i,n,r,o){let a=!1;e.addEventListener("mousedown",l=>{a=!0,l.preventDefault()}),window.addEventListener("mousemove",l=>{if(!a)return;const c=t.getBoundingClientRect(),h=i.dir==="col"?(l.clientX-c.left)/c.width:(l.clientY-c.top)/c.height;i.ratio=Math.min(.85,Math.max(.15,h)),n.style.flex=`${i.ratio} 1 0`,r.style.flex=`${1-i.ratio} 1 0`}),window.addEventListener("mouseup",()=>{a&&(a=!1,this.ratio_remember(o,i.ratio),this.renderObserver?.())})}focus_set(e){if(this.focusedPane===e)return;this.focusedPane!==null&&(this.previousFocus=this.focusedPane),this.focusedPane=e,document.body.dataset.focus=e;for(const i of this.root.querySelectorAll(".layout-leaf"))i.classList.remove("pane-focused");this.mounts.get(e)?.parentElement?.classList.add("pane-focused")}ratios_restore(e,t,i){if("pane"in e)return e;const n=this.prefs.ratios?.[`${t}:${i}`];return{...e,ratio:n??e.ratio,first:this.ratios_restore(e.first,t,`${i}0`),second:this.ratios_restore(e.second,t,`${i}1`)}}ratio_remember(e,t){this.prefs.ratios={...this.prefs.ratios??{},[`${this.activePreset}:${e}`]:t},this.prefs_save()}prefs_save(){try{window.localStorage.setItem(lM,JSON.stringify(this.prefs))}catch{}}}function mh(s,e,t){if("pane"in s)return s.pane===e?t:null;const i=mh(s.first,e,t);if(i!==null)return{...s,first:i};const n=mh(s.second,e,t);return n!==null?{...s,second:n}:null}function gh(s,e){if("pane"in s)return null;if("pane"in s.first&&s.first.pane===e)return s.second;if("pane"in s.second&&s.second.pane===e)return s.first;const t=gh(s.first,e);if(t!==null)return{...s,first:t};const i=gh(s.second,e);return i!==null?{...s,second:i}:null}const Ek=4e3;function Ak(s){const e=new WeakMap,t=(a,l)=>{const c=s.paneInstance_get(a)?.mount.querySelector(".pane-state")??null;if(c===null)return;const h=e.get(c);h!==void 0&&clearTimeout(h);const d={text:c.textContent??"",className:c.className};ws(c,"note",l),e.set(c,setTimeout(()=>{e.delete(c),c.textContent===l&&(c.className=d.className,c.textContent=d.text)},Ek))};return{bar_note:t,move:(a,l)=>{const c=s.layout.leaf_move(a,l);return c==="lone"?"pane move: the only pane on stage":c==="edge"?`pane move ${l}: already ${qs[l].edge}`:(t(a,`MOVED ${l.toUpperCase()}`),s.sound("audio3"),`moved ${l}`)},flip:a=>s.layout.leaf_flip(a)?(t(a,"FLIPPED"),s.sound("audio3"),"flipped"):"pane flip: the only pane on stage",resize:(a,l,c)=>s.layout.leaf_resize(a,l,c)?`resized ${qs[l].focusWord}`:`pane resize ${qs[l].focusWord}: no boundary that way`,chordKeys_of:(a,l)=>{const c=qi.filter(h=>h.selector===a&&h.move===!0===l).map(h=>h.key);return c.length===0?"":` [keys ${c.join(" ")}]`}}}const Dk={image:"viewer",view:"viewer",dir:"files",fs:"files",tags:"tags",empty:"pane",domain:"dag",catalogue:"catalogue",graph:"dag",gather:"gather",edit:"editor"},su=240;function Tk(s,e){const{layout:t,panels:i,paneInstance_get:n,dormant:r}=s,o=new Map;let a=!1,l=null;const c=y=>n(y)?.kind??null,h=(y,b,w,z,O)=>{o.set(y,{parent:b,dir:w,before:z,...O!==void 0?{binding:O}:{}})},d=y=>{if(y==="pacs")return"⊞";if(y==="dag")return"⋔";const b=c(y);return b==="image"?"▣":b==="tags"?"≣":b==="edit"?"✎":"▤"},u=y=>{if(y.length===0)return;const b=[];for(const T of y){const E=n(T)?.mount;if(E===void 0)continue;const x=E.getBoundingClientRect();x.width>0&&x.height>0&&b.push({id:T,left:x.left,top:x.top,width:x.width,height:x.height})}if(b.length===0)return;const w=Math.min(...b.map(T=>T.left)),z=Math.min(...b.map(T=>T.top)),O=Math.max(...b.map(T=>T.left+T.width))-w,M=Math.max(...b.map(T=>T.top+T.height))-z;if(O<=0||M<=0)return;const S=su/O,D=Math.max(40,Math.min(260,Math.round(M*S)));try{const T=document.createElement("canvas");T.width=su,T.height=D;const E=T.getContext("2d");if(E===null)return;const C=getComputedStyle(document.documentElement).getPropertyValue("--harvestgold").trim()||"#c9a15a";E.fillStyle="#05070a",E.fillRect(0,0,su,D);for(const I of b){const B=Math.round((I.left-w)*S),N=Math.round((I.top-z)*S),P=Math.max(6,Math.round(I.width*S)),F=Math.max(6,Math.round(I.height*S)),J=n(I.id)?.mount.querySelector("canvas");if(J!=null&&J.width>0){const K=Math.min(P/J.width,F/J.height),re=Math.round(J.width*K),xe=Math.round(J.height*K);E.fillStyle="#000",E.fillRect(B,N,P,F),E.drawImage(J,B+Math.round((P-re)/2),N+Math.round((F-xe)/2),re,xe)}else E.fillStyle="rgba(255,255,255,0.05)",E.fillRect(B,N,P,F),E.fillStyle=C,E.font=`${Math.max(9,Math.min(28,Math.round(Math.min(P,F)*.5)))}px serif`,E.textAlign="center",E.textBaseline="middle",E.fillText(d(I.id),B+P/2,N+F/2+1);E.strokeStyle="rgba(255,255,255,0.22)",E.lineWidth=1,E.strokeRect(B+.5,N+.5,P-1,F-1)}return T.toDataURL("image/png")}catch{return}},p=(y,b,w)=>{const z=c(y),O=o.get(y),M={dir:O?.dir??"col",side:PA(O?.before??!1)};if(tM(y)){const D=b==="dag"?"runs":b,T=b==="pacs"?e.pacsQuery_get():null,E=b==="dag"?i.get("dag","dag"):void 0,x=E!==void 0&&E.graph_isShown()?E.feed_get():null,C=x!==null&&E!==void 0?E.view_lines():[],I=x!==null?E?.feedTitle_get():void 0;return{action:{op:"domain",domain:D,...T!==null?{query:T}:{},...x!==null?{feed:x}:{},...C.length>0?{view:C}:{}},...I!==void 0?{label:I}:{}}}if(O?.binding==="fs"||O?.binding==="view"||O?.binding==="empty")return{action:{op:O.binding,target:w,...M}};if(z==="image"){const D=i.get("image",y),T=D?.state_get()??null;if(D===void 0||T===null||T.path===null)return null;const E=[];T.layout!=="single"&&E.push(`image layout ${T.layout}`),T.colormap!==void 0&&T.colormap!=="gray"&&E.push(`image colormap ${T.colormap}`),T.voi!==void 0&&T.voi!==null&&E.push(`image wl ${T.voi.lower} ${T.voi.upper}`),T.slice>1&&E.push(`image slice ${T.slice}`),T.ghost!==void 0&&T.ghost!==null&&T.layout==="slab"&&E.push(`image ghost ${T.ghost}`);const x=D.series_get(),C=[x?.seriesDescription??"",x?.modality??""].filter(I=>I!=="");return{action:{op:"image",path:T.path,target:w,...M,...E.length>0?{view:E}:{}},anchor:T.path,...C.length>0?{label:C.join(" · ")}:{}}}const S=e.catalogue_of(y);if(S!==void 0){const D=i.get("files",y)?.commandLine_get()??"";return{action:{op:"catalogue",input:S.input,target:w,...M,...S.feed!==null?{feed:S.feed}:{},...S.node!==null?{node:S.node}:{},...D!==""?{line:D}:{}},label:`PROCESS ${S.input.split("/").filter(Boolean).pop()??S.input}`}}if(z==="files"){const D=i.get("files",y)?.path_current()??null;return typeof D!="string"||D.length===0?null:{action:{op:"dir",path:D,target:w,...M}}}if(z==="gather"){const D=i.get("gather",y);if(D===void 0)return null;const T=[...D.entries_get()],E=D.name_get(),x=D.feed_get();return{action:{op:"gather",series:T,target:w,...M,...E!==null?{name:E}:{},...x!==null?{feed:x.feedId,root:{instance:x.rootInstanceId,path:x.path}}:{}},label:E??`GATHER · ${T.length} series`}}if(z==="dag"){const D=i.get("dag",y)?.feed_get()??null;return D===null?null:{action:{op:"graph",feed:D,target:w,...M}}}if(z==="tags")return{action:{op:"tags",target:w,...M}};if(z==="edit"){const D=i.get("edit",y)?.path_get()??null;return D===null?null:{action:{op:"edit",path:D,target:w,...M},label:`EDIT ${D.split("/").pop()??D}`}}return null},f=()=>{if(a)return;const y=new Set(t.panes_shown()),b=t.activePreset_get();if(b==="panes"||b==="launcher")return;const w=Tc().map(F=>F.id).filter(F=>y.has(F)),z=new Map;let O,M;const S=[];for(const F of w){const J=z.get(o.get(F)?.parent??"")??0,K=p(F,b,J);K!==null&&(z.set(F,S.length),S.push(K.action),K.anchor!==void 0?O===void 0&&(O=K.anchor,K.label!==void 0&&(M=K.label)):K.label!==void 0&&M===void 0&&(M=K.label))}const D=S.filter(F=>F.op!=="domain"||F.feed!==void 0);if(D.length===0)return;const T=u(w),E=F=>{if("pane"in F){const re=z.get(F.pane);return re===void 0?null:{leaf:re}}const J=E(F.first),K=E(F.second);return J===null?K:K===null?J:{dir:F.dir,ratio:F.ratio,first:J,second:K}},x=t.tree_get(),C=x===null?null:E(x),I=[...new Set(D.map(F=>Dk[F.op]??"pane"))];let B,N,P;if(O!==void 0)B=O,N=M??O.split("/").pop()??O,P={address:O,modelKind:"dicom.series"};else{const F=D.map(re=>re.path).find(re=>re!==void 0),J=D.map(re=>re.path??(re.input!==void 0?`catalogue:${re.input}`:re.series!==void 0?`gather:${re.series.map(xe=>xe.seriesUID).join(",")}`:re.feed!==void 0?`feed:${re.feed}`:re.op)).sort().join("|"),K=b==="dag"?"RUNS":b.toUpperCase();B=`${b}:${J}`,N=M!==void 0&&M!==""?M:F!==void 0?F.split("/").pop()??F:`${K} · ${D.length+1} panes`,P={address:B,modelKind:"argus.desktop"}}r.add({id:B,label:N,regard:P,members:I,actions:S,...C===null?{}:{shape:C},...T===void 0?{}:{thumbnail:T},lastTouched:Date.now()})},_=()=>{const y=new Set(t.panes_shown());for(const b of Tc())y.has(b.id)||tM(b.id)||b.id==="panes"||b.id==="launcher"||b.id==="universe"||(xs(b.id),t.mount_remove(b.id));e.stage_relight()},g=y=>{f(),t.preset_apply(y),_()},m=(y,b)=>{const w=S=>Tc().filter(D=>t.panes_shown().includes(D.id)&&c(D.id)===S).map(D=>D.id),z={dir:y.dir??"col",before:y.side==="before"},O=S=>{l=z;try{return S()}finally{l=null}},M=(S,D)=>w(S).find(T=>!D.has(T))??null;if(y.op==="domain"){const S=y.domain==="runs"?"dag":y.domain==="pacs"?"pacs":"files";if(g(S),y.query!==void 0&&s.terminal.line_run(y.query),y.feed!==void 0){const D=y.feed,T=y.view??[],E=i.get("dag","dag");if(E?.feed_enter(D),T.length>0&&E!==void 0){const x=C=>{if(E.graph_isShown()&&E.feed_get()===D){for(const I of T)s.terminal.line_run(I);return}C>0&&window.setTimeout(()=>x(C-1),250)};x(240)}}return S}if(b!==null&&t.focus_set(b),y.op==="image"&&y.path!==void 0){let S=null;const D=y.path,T=O(()=>e.image_open(null,D,{},C=>{S=C})),E=y.view,x=S;return E!==void 0&&E.length>0&&x!==null&&T.then(()=>{for(const C of E)t.focus_set(x),s.terminal.line_run(C)}).catch(()=>{}),S}if(y.op==="dir"&&y.path!==void 0){const S=new Set(w("files")),D=y.path;return O(()=>e.dir_open(D)),M("files",S)}if(y.op==="tags"){const S=new Set(w("tags"));return O(()=>s.terminal.line_run("image tags")),M("tags",S)}if(y.op==="catalogue"&&y.input!==void 0){const S=()=>e.catalogueIds().filter(x=>t.panes_shown().includes(x)),D=new Set(S()),T=y.input;O(()=>e.process_open(b??"files",{input:T,feed:y.feed??null,node:y.node??null}));const E=S().find(x=>!D.has(x))??null;return E!==null&&y.line!==void 0&&i.get("files",E)?.commandLine_set(y.line),E}if(y.op==="gather"&&y.series!==void 0){const S=[...y.series],D=O(()=>e.gather_open(S,b??"pacs"));return D!==null&&y.name!==void 0&&i.get("gather",D)?.name_set(y.name),D!==null&&y.feed!==void 0&&y.root!==void 0&&i.get("gather",D)?.feed_set({feedId:y.feed,rootInstanceId:y.root.instance,path:y.root.path}),D}if(y.op==="graph"&&y.feed!==void 0){const S=new Set(w("dag")),D=y.feed;return O(()=>e.feed_open(b??"files",D)),M("dag",S)}if(y.op==="edit"&&y.path!==void 0){const S=y.path;return O(()=>e.edit_open(S))}return y.op==="fs"||y.op==="view"||y.op==="empty"?b===null?null:e.pillPane_spawn(b,y.op,z.dir,z.before):null};return{birth_record:h,replayPlace_get:()=>l,replaying:()=>a,strip_capture:u,capture:f,orphans_dispose:_,domain_enter:g,restore:async y=>{const b=r.get(y);if(!(b===void 0||b.actions===void 0)){r.dismiss(y),a=!0;try{const w=[];for(const z of b.actions){const O=w[z.target??0]??null;w.push(m(z,O))}if(b.shape!==void 0){const z=M=>{if("leaf"in M){const T=w[M.leaf]??null;return T===null?null:{pane:T}}const S=z(M.first),D=z(M.second);return S===null?D:D===null?S:{dir:M.dir,ratio:M.ratio,first:S,second:D}},O=z(b.shape);O!==null&&!("pane"in O)&&t.tree_set(O)}}finally{a=!1,e.stage_relight()}}}}}const Ik=2200;function Ck(s){return/\x1b\[/.test(s)?fn(s):ni(s).replace(/("[^&]*")/g,'<span class="man-str">$1</span>').replace(/(^|\s)(--?[a-zA-Z][\w-]*)/g,'$1<span class="man-flag">$2</span>').replace(/^(\s{0,2})([A-Za-z_ ]+):(\s)/gm,'$1<span class="man-key">$2:</span>$3').replace(/^([A-Z][A-Z ]{2,})$/gm,'<span class="man-head">$1</span>')}function Rk(s,e,t,i){if(s===void 0)return[];const n=s.arguments??[],r=[{label:"NODE",value:`${s.label} · @${s.id}`},{label:"PLUGIN",value:s.pluginName},...s.pluginVersion!==void 0?[{label:"VERSION",value:s.pluginVersion}]:[]];if(e){const o=nD(s.label,s.id,i);r.push(...n.length===0?[{label:"ARGUMENTS",value:"none — this node runs on the plugin's defaults"}]:n.map(a=>({label:a.name,value:String(a.value??""),...t?{edit:{flag:`--${o}.${a.name}`,type:typeof a.value=="boolean"?"boolean":"string",placeholder:String(a.value??"")}}:{}})))}else r.push({label:"ARGUMENTS",value:n.length===0?"none":`${n.length} — open the node to read them`});return r}function Bk(s,e,t){const i=[{label:"PLUGIN",value:s.name},{label:"VERSION",value:s.version},{label:"TYPE",value:s.type.toUpperCase()}],n=s.parameters;if(!e)return i.push({label:"PARAMETERS",value:n.length===0?"none":`${n.length} — open the node to read them`}),i;if(n.length===0)return i.push({label:"PARAMETERS",value:"none — this plugin takes no arguments"}),i;for(const r of n){const o=[r.type];r.optional||o.push("required");const a=r.default===void 0||r.default===null?"":String(r.default);a!==""&&o.push(`default ${a}`);const l=o.join(" · ");i.push({label:r.flag,value:r.help===void 0?l:`${l} — ${r.help}`,...t?{edit:{flag:r.flag,type:r.type,placeholder:a}}:{}})}return i}function cM(s,e,t,i){s.replaceChildren(),s.classList.toggle("dag-facts-immersed",t);for(const{label:n,value:r,edit:o}of e){const a=document.createElement("div");a.className="telemetry-row";const l=document.createElement("span");if(l.className="telemetry-label",l.textContent=n,a.appendChild(l),o===void 0||i===null){const c=document.createElement("span");c.className="telemetry-value",c.textContent=r,a.appendChild(c)}else{const c=tD(i.line_get(),o.flag),h=document.createElement("input");h.className="telemetry-input",h.spellcheck=!1,h.autocomplete="off",h.title=`${o.flag} — ${r}`,o.type==="boolean"?(h.type="checkbox",h.checked=c===!0,h.addEventListener("change",()=>{i.line_set(p_(i.line_get(),o.flag,h.checked?!0:null))})):(h.type="text",h.placeholder=o.placeholder,h.value=c===null||c===!0?"":c,h.addEventListener("input",()=>{i.line_set(p_(i.line_get(),o.flag,h.value))}));const d=document.createElement("span");d.className="telemetry-hint",d.textContent=r,a.append(h,d)}s.appendChild(a)}}function Gk(s,e,t,i){const n=s.closest(".files-body"),r=n?.querySelector(".diagram-strategy")??null,o=n?.querySelector(".diagram-projection")??null,a=n?.querySelector(".diagram-pulse")??null,l=i===void 0?null:n?.querySelector(".diagram-run")??null,c=()=>i?.(),h=()=>{const f=[];e.strategy_get()!=="ranked"&&f.push("MOLECULE"),e.projection_get()!=="3d"&&f.push("2D"),t.mode_annunciate(f.join(" · "))},d=()=>{e.strategy_set(e.strategy_get()==="ranked"?"molecule":"ranked"),r!==null&&(r.textContent=e.strategy_get().toUpperCase()),h()},u=()=>{e.projection_set(e.projection_get()==="3d"?"2d":"3d"),o!==null&&(o.textContent=e.projection_get().toUpperCase()),h()},p=()=>{e.wave_start(),a?.classList.add("pulse-running"),window.setTimeout(()=>a?.classList.remove("pulse-running"),Ik)};return r!==null&&(r.textContent=e.strategy_get().toUpperCase()),o!==null&&(o.textContent=e.projection_get().toUpperCase()),r?.addEventListener("click",d),o?.addEventListener("click",u),a?.addEventListener("click",p),l?.addEventListener("click",c),h(),()=>{r?.removeEventListener("click",d),o?.removeEventListener("click",u),a?.removeEventListener("click",p),l?.removeEventListener("click",c),a?.classList.remove("pulse-running")}}function Nk(s,e){let t=null;const i=(c,h,d,u)=>{let p=null,f=null;const _=c.contentHtml_show(h,"",{diagram:!0,release:()=>{t=null,f?.(),f=null,c.mode_annunciate(""),p?.dispose(),p=null}});_!==null&&d().then(g=>{if(!_.isConnected)return;if(g===null||g.nodes.length===0){_.textContent="NOTHING TO DRAW FOR THIS ENTRY",_.classList.add("files-diagram-empty");return}g.text!==""&&c.contentText_set(g.text);const m=document.createElement("div");m.className="dag-facts",ai(m),_.appendChild(m);const v=new $h(_,{select:w=>g.facts_show(m,w.id,!1,u),activate:w=>y(w),deselect:()=>m.replaceChildren()},{}),y=w=>{v.flight_into(w.id,()=>{t={scene:v,facts:m},g.facts_show(m,w.id,!0,u)})};p=v,v.graph_set({nodes:g.nodes},{wave:!1}),v.size_fit(),f=Gk(_,v,c,u===null?void 0:u.run);const b=g.nodes.length===1?g.nodes[0]:void 0;b!==void 0&&y(b)})},n=async c=>{const h=/_id(\d+)$/.exec(c)?.[1]??c.replace(/^.*\//,""),[d,u]=await Promise.all([s.client.line_execute(`cat "${c}"`,{silent:!0,observe:!1}),s.client.line_execute(`pipeline diagram ${h}`,{silent:!0,observe:!1})]),p=d.envelopes.map(f=>f.rendered).join(`
|
|
4295
4295
|
`);for(const f of u.envelopes){if(f.model?.kind!==Jn.pipelineDiagram)continue;const _=Kp.safeParse(f.model.data);if(!_.success)continue;const g=new Map(_.data.nodes.map(m=>[m.id,m]));return{text:Ck(p),nodes:_.data.nodes.map(m=>({id:m.id,label:m.label,parentIds:m.parentIds,joinParentIds:m.joinParentIds})),facts_show:(m,v,y,b)=>{const w=_.data.nodes.map(z=>z.label);cM(m,Rk(g.get(v),y,b!==null,w),y,b)}}}return null},r=async c=>{const h=c.replace(/^.*\//,""),d=await s.client.line_execute(`plugin info "${h}"`,{silent:!0,observe:!1});for(const u of d.envelopes){if(u.model?.kind!==ex)continue;const p=Q1.safeParse(u.model.data);if(!p.success)continue;const f=p.data;return{text:"",nodes:[{id:h,label:f.name,parentIds:[],joinParentIds:[]}],facts_show:(_,g,m,v)=>{cM(_,Bk(f,m,v!==null),m,v)}}}return null},o=(c,h,d,u)=>{const p=e.catalogue_of(c);if(p===void 0)return null;const f=d.replace(/^.*\//,"");return Rv(h.commandLine_get())!==f&&h.commandLine_set(Tv(p.input,f)),{line_get:()=>h.commandLine_get(),line_set:_=>h.commandLine_set(_),run:()=>e.run_press(c,f,u)}};return{entry_show:(c,h,d,u)=>{i(h,d,()=>u==="plugin"?r(d):n(d),o(c,h,d,u))},dive_leave:()=>{const c=t;return c===null?!1:(t=null,c.scene.flight_back(()=>{c.facts.classList.remove("dag-facts-immersed"),c.facts.replaceChildren()}),!0)}}}function kk(s,e){const{panels:t,paneInstance_get:i,subjects:n}=s,r=new Map,o=p=>t.get("dag",p)??t.get("universe",p),a=(p,f)=>{const _=r.get(p);if(_===void 0){f?.();return}r.delete(p),_.element.classList.remove("node-overlay-open");const g=()=>{_.element.remove(),f?.()},m=o(p);m!==void 0?m.flight_back(g):g()},l=(p,f,_,g,m)=>{if(m.kind==="dir"){const v=f.replace(/\/+$/,"");if(m.path!==v&&!m.path.startsWith(`${v}/`)){a(p),s.sound("audio3");return}const y=m.path.startsWith("/proc/jobs/")?(m.path.split("/").pop()??"").match(/_(\d+)$/):null;if(y!==null){const w=parseInt(y[1]??"",10);a(p,()=>{o(p)?.node_flyTo(w)!==!0&&c(p,m.path)});return}const b=_.path_current();b!==null&&g.push(b),e.rootedListing_show(p,_,m.path);return}if(n.regard_write(p,{address:m.path,modelKind:"fs.file"}),!n.groupHasViewer(p)){if(e.imagery_is(m.path)){e.image_open(p,m.path).then(v=>s.terminal.line_note(v));return}if(Ch(m.path)){_.contentImage_show(m.path,e.vfsUrl_build(m.path));return}e.fileText_fetch(m.path).then(v=>{if(!v.ok){_.contentRefused_show(m.path,v.text);return}e.tableFile_is(m.path)?_.contentTable_show(m.path,v.text):_.content_show(m.path,v.text)})}},c=(p,f)=>{const g=i(p)?.mount?.querySelector(".dag-canvas, .universe-canvas")??null,m=r.get(p);if(m!==void 0&&!m.element.isConnected&&r.delete(p),g===null||r.has(p)){s.terminal.line_note(`dag: ${f}: ${g===null?"this pane has no scene to fly in":"a node is already open here"} — flew back out`),o(p)?.flight_back(()=>{});return}const v=document.createElement("div");v.className="node-overlay",v.setAttribute("aria-label",`inside ${f}`);const y=e.filesBody_stamp();y.classList.add("node-overlay-body");const b=document.createElement("button");b.type="button",b.className="strategy-pill node-overlay-exit",b.title="leave the node (Esc)",b.textContent="EXIT NODE",y.querySelector(".mode-frame")?.prepend(b),v.append(y);const w=y.querySelector(".files-panel");if(w===null)throw new Error("pane template is missing .files-panel");const z=[],O=new xv(w,M=>l(p,f,O,z,M),e.previewProvider);O.rowVerbs_declare((M,S)=>e.rowVerbs_of(p,M,S),(M,S)=>{n.regard_write(p,{address:S,modelKind:"fs.file"})}),r.set(p,{element:v,panel:O,history:z}),O.ceiling_set(f,"EXIT NODE"),b.addEventListener("click",()=>{a(p),s.sound("audio3")}),g.appendChild(v),window.requestAnimationFrame(()=>v.classList.add("node-overlay-open")),e.rootedListing_show(p,O,f)};return{open:c,close:a,back:p=>{const f=r.get(p),_=f?.history.pop();f!==void 0&&_!==void 0&&e.rootedListing_show(p,f.panel,_)},escape:()=>{const p=[...r.keys()].pop();if(p===void 0)return!1;const f=r.get(p);return f!==void 0&&f.panel.content_isShown()?f.panel.listing_restore():a(p),!0},dispose:p=>{r.get(p)?.element.remove(),r.delete(p)}}}async function Lm(s,e,t){if(s.ask_isOpen()){const o=s.ask_note(t.message),a=await fh(e,t);return o(t.kind==="secret"&&a!==null?"••••••":a),a}const i=fh(e,t).then(o=>({from:"pane",answer:o})),n=s.ask_open({message:t.message,kind:t.kind==="choose"?"text":t.kind,focus:!1,...t.suggest===void 0?{}:{suggest:t.suggest}}).then(o=>({from:"console",answer:o})),r=await Promise.race([i,n]);return r.from==="console"?Kw():s.ask_settle(r.answer),r.answer}function Pk(s,e){const{panels:t,paneInstance_get:i}=s;let n=null,r=null;const o=()=>{const{layout:u}=s,p=u.tree_get();if(p===null)return null;const f=[],_=m=>{if("pane"in m){f.push(m.pane);return}_(m.first),_(m.second)};_(p);const g=u.focused_get();return g!==null&&f.includes(g)?g:f[0]??null};return{errandHost_find:o,errand_open:async u=>{const{layout:p,terminal:f}=s,_=o();if(_===null)return null;const g=e.instance_spawn("files"),m=e.replayPlace_get();if(!p.leaf_split(_,m?.dir??"col",g.id,m?.before??!1))return xs(g.id),p.mount_remove(g.id),null;e.birth_record(g.id,_,m?.dir??"col",m?.before??!1);const v=t.get("files",g.id),y=u.path?.anchor??"~";v!==void 0&&e.rootedListing_show(g.id,v,y);const b=g.mount.querySelector(".files-body");if(b===null)return xs(g.id),p.mount_remove(g.id),null;const w=document.createElement("div");w.className="errand-bar",b.insertBefore(w,b.firstChild);const z=document.createElement("span");z.className="errand-caption",z.textContent=u.message.trim();const O=document.createElement("input");O.className="errand-path",O.spellcheck=!1;const M=document.createElement("button");M.className="pacs-capsule errand-commit",M.textContent=u.commit??"USE THIS",w.append(z,O,M);const S=()=>{const E=v?.path_current()??y,x=u.path?.suggest;O.value=u.path?.wantsDirectory===!0||x===void 0?E:`${E.replace(/\/$/,"")}/${x}`};S();let D=!1;O.addEventListener("input",()=>{D=!0});const T=()=>{D||S()};return g.mount.addEventListener("click",T),f.question_set(!0),new Promise(E=>{const x=C=>{g.mount.removeEventListener("click",T),f.question_set(!1),n=null,p.leaf_close(g.id),xs(g.id),p.mount_remove(g.id),E(C)};n=()=>x(null),M.addEventListener("click",()=>x(O.value.trim()===""?null:O.value.trim())),O.addEventListener("keydown",C=>{C.key==="Enter"&&x(O.value.trim()===""?null:O.value.trim())})})},errand_abandon:()=>n===null?!1:(n(),!0),verbLine_run:(u,p)=>{r=u,s.terminal.line_run(p)},askingPane_take:()=>{const u=r;return r=null,u},ask_onPane:async(u,p)=>{const{terminal:f}=s,_=i(u)?.mount;if(_===void 0){const g=e.questionSheet_ask?.(p)??null;return g!==null?g:(e.console_expose(),f.ask_open({message:p.message,kind:p.kind==="choose"?"text":p.kind,...p.suggest===void 0?{}:{suggest:p.suggest}}))}return Lm(f,_,p)}}}class Lk{members=new Map;title=null;landed=null;watchers=new Set;watch(e){return this.watchers.add(e),()=>{this.watchers.delete(e)}}changed(){for(const e of[...this.watchers])e()}members_get(){return[...this.members.values()]}size(){return this.members.size}has(e){return this.members.has(e)}take(e){const t=this.members.get(e.seriesUID);this.members.set(e.seriesUID,t===void 0?e:{...t,...e}),this.changed()}drop(e){const t=this.members.delete(e);return t&&this.changed(),t}clear(){this.members.size!==0&&(this.members.clear(),this.changed())}name_get(){return this.title}name_set(e){this.title=e,this.changed()}feed_get(){return this.landed}feed_set(e){this.landed=e,this.changed()}}function hM(s){return(s.kind??"series")==="series"?void 0:s.vfsPath}const iu="cohort";function Wk(s){return/[",\n\r]/.test(s)?`"${s.split('"').join('""')}"`:s}function Fk(s){const e=document.createElement("p");return e.className="files-empty",e.textContent=s,e}class dM{handlers;title;cohort;greeted=!1;listing;cohortActions;seriesActions;constructor(e,t,i,n){this.handlers=i,this.cohort=n,n.watch(()=>{this.unsaved=!0,this.render()}),this.title=e.querySelector(".gather-title"),this.cohortActions=this.cohortActions_declare(),this.seriesActions=this.seriesActions_declare(),this.listing=new ar({mount:t,traits:this.cohortTraits_declare(),key:r=>r.key,chrome:{root:e,prefix:"gather"},control:"fold",actions:{of:()=>this.cohortActions},row:{className:()=>"gather-cohort-row",groupClassName:()=>"gather-cohort",decorate:r=>{r.title="the cohort: click for its verbs, the fold cell folds its series"}},child:Wo(()=>[...this.cohort.members_get()].map(r=>({entry:r})),{traits:this.seriesTraits_declare(),key:r=>r.entry.seriesUID,address:r=>r.entry.vfsPath,actions:{of:()=>this.seriesActions},row:{className:()=>"gather-series",decorate:(r,o)=>{r.dataset.seriesuid=o.entry.seriesUID}}}),state:r=>this.stateLine_compose(r),empty:()=>Fk("NOTHING GATHERED")}),this.pullBlock=e.querySelector(".gather-pull"),this.pullBlock?.addEventListener("click",()=>this.cohort_pull()),this.emptyBlock=e.querySelector(".gather-remove"),this.emptyBlock?.addEventListener("click",()=>{this.cohort_clear()}),this.processBlock=e.querySelector(".gather-process"),this.processBlock?.addEventListener("click",()=>{this.cohort_process()}),this.render()}pullBlock=null;emptyBlock=null;unsaved=!1;processBlock=null;cohort_empty(){this.cohort.size()!==0&&(this.cohort.clear(),this.handlers.changed(),this.render())}async cohort_clear(){if(this.cohort.size()!==0){if(this.unsaved){const e=await this.handlers.confirm_ask(`Save the cohort first? (${this.cohort.size()} ${this.cohort.size()===1?"member":"members"}, unsaved)`);if(e===null||e==="y"&&!await this.manifest_save())return}this.handlers.command_show("gather clear"),this.cohort_empty()}}away(){return[...this.cohort.members_get()].filter(e=>e.folderPath===void 0&&e.series?.pulled!==!0)}cohort_pull(){const e=this.away();if(e.length===0)return;const t=e.map(i=>`"${i.vfsPath}"`).join(" ");this.handlers.command_show(`pull ${t}`)}render_now(){this.render()}has(e){return this.cohort.has(e)}entries_get(){return[...this.cohort.members_get()]}name_get(){return this.cohort.name_get()}feed_get(){return this.cohort.feed_get()}feed_set(e){e!==null&&this.cohort.feed_set(e),this.render()}name_set(e){e!==null&&this.cohort.name_set(e),this.render()}series_add(e){this.cohort.take(e),this.render(),this.handlers.changed()}series_remove(e){this.cohort.drop(e)&&(this.render(),this.handlers.changed())}render(){if(this.title!==null&&(this.title.textContent=this.cohort.name_get()===null?"GATHER":`GATHER · ${this.cohort.name_get()??""}`.toUpperCase()),this.listing.rows_set([{key:"gather",rows:[{key:iu}]}],{field:"gather"}),this.cohort.size()>0&&this.listing.open_set(0,[iu]),this.pullBlock!==null){const e=this.away().length;this.pullBlock.hidden=e===0,this.pullBlock.textContent=`PULL ${e}`}this.emptyBlock!==null&&(this.emptyBlock.hidden=this.cohort.size()===0,this.emptyBlock.textContent=`CLEAR ${this.cohort.size()}`),this.processBlock!==null&&(this.processBlock.hidden=this.cohort.size()===0),this.greeted||(this.greeted=!0,this.listing.row_indicate(iu))}cohortTraits_declare(){return[{key:"fold",label:"",className:"pacs-fold",capped:!1,width:"5.2em",cell:()=>{const e=document.createElement("span");return e.className="pacs-fold",e}},{key:"name",label:"COHORT",className:"gather-cohort-name",width:"1fr",cell:()=>this.cohort.name_get()??"(unnamed — SAVE names it)"},{key:"series",label:"SERIES",className:"gather-cohort-count",width:"6em",cell:()=>String(this.series_count()),compare:()=>this.series_count()},{key:"patients",label:"PATIENTS",className:"gather-cohort-patients",width:"7em",cell:()=>String(this.patients_count()),compare:()=>this.patients_count()},{key:"feed",label:"FEED",className:"gather-cohort-feed",width:"7em",cell:()=>{if(this.cohort.feed_get()===null)return"—";const e=document.createElement("button");e.className="gather-feed listing-capsule listing-action-selected",e.textContent=`FEED ${this.cohort.feed_get()?.feedId??0}`,e.title="open the feed's graph beside the cohort";const t=this.cohort.feed_get()?.feedId??0;return e.addEventListener("click",i=>{i.stopPropagation(),this.handlers.feed_open(t)}),e},compare:()=>this.cohort.feed_get()?.feedId??-1}]}seriesTraits_declare(){const e=Uv(n=>n.entry.series??{seriesUID:n.entry.seriesUID,description:n.entry.description??n.entry.vfsPath??"",modality:n.entry.modality,...n.entry.files===void 0?{}:{fileCount:n.entry.files},...n.entry.folderPath===void 0?{}:{pulled:!0,folderPath:n.entry.folderPath}},fD),t={key:"patient",label:"MRN",className:"gather-series-patient",width:"8em",cell:n=>n.entry.patient||"—"},i={key:"study",label:"STUDY",className:"gather-series-study",width:"14em",cell:n=>n.entry.study??"—"};return[...e.slice(0,1),i,t,...e.slice(1)]}cohortActions_declare(){const e=()=>({count:this.cohort.size(),feed:this.cohort.feed_get()?.feedId??null}),t={save:()=>{this.manifest_save()},export:()=>{this.cohort_export()},feed:()=>{this.feed_ensure()},process:()=>{this.cohort_process()},dismiss:()=>this.handlers.dismiss()};return Pv.rules.map(i=>({label:i.label(e()),offered:()=>i.offered(e()),run:()=>t[i.name]?.()}))}seriesActions_declare(){const e=i=>({folderKnown:(i.entry.kind??"series")!=="series"||i.entry.folderPath!==void 0,imagery:(i.entry.kind??"series")==="series"||i.entry.imagery===!0,pullable:(i.entry.kind??"series")==="series"&&i.entry.folderPath===void 0&&i.entry.series?.pulled!==!0&&i.entry.vfsPath!==""}),t={remove:i=>this.series_remove(i.entry.seriesUID),pull:i=>this.handlers.command_show(`pull "${i.entry.vfsPath}"`),image:i=>{const n=i.entry.folderPath??hM(i.entry);n!==void 0&&this.handlers.image_open(n)},process:i=>{const n=i.entry.folderPath??hM(i.entry);if(n!==void 0){this.handlers.process_open(n);return}this.handlers.note(`gather: ${i.entry.description||i.entry.seriesUID} is not in CUBE yet — PULL it first, then PROCESS it.`)}};return kv.rules.map(i=>({label:i.label({folderKnown:!0,pullable:!0}),offered:n=>i.offered(e(n)),run:n=>t[i.name]?.(n)}))}patients_count(){return new Set(this.cohort.members_get().filter(e=>(e.kind??"series")==="series").map(e=>e.patient)).size}series_count(){return this.cohort.members_get().filter(e=>(e.kind??"series")==="series").length}stateLine_compose(e){const t=this.cohort.members_get(),i=t.filter(a=>(a.kind??"series")!=="series").length,n=t.length-i,r=[];(n>0||i===0)&&r.push(`${n} SERIES`),i>0&&r.push(`${i} ${i===1?"PLACE":"PLACES"}`),i===0&&r.push(`${this.patients_count()} PATIENTS`);const o=[r.join(" · ")];return e.filter!==""&&o.push(e.filter),o.join(" · ")}async name_ensure(){if(this.cohort.name_get()!==null)return this.cohort.name_get();const t=(await this.handlers.name_ask(`gather-${new Date().toISOString().slice(0,10)}`)??"").trim();return t===""?null:(this.cohort.name_set(t),this.render(),t)}async manifest_save(){if(this.cohort.size()===0)return!1;const e=await this.name_ensure();if(e===null)return!1;const t=JSON.stringify({name:e,gatheredAt:new Date().toISOString(),series:[...this.cohort.members_get()].map(i=>({seriesUID:i.seriesUID,description:i.description,modality:i.modality,patient:i.patient,vfsPath:i.vfsPath}))});return this.handlers.command_run("mkdir -p ~/gather"),this.handlers.command_show(`touch --withContents '${t}' ~/gather/${e}.json`),this.unsaved=!1,!0}async cohort_export(){if(this.cohort.size()===0)return;const e=await this.name_ensure();if(e===null)return;const t=[["patient","series","modality","seriesUID","path"].join(","),...[...this.cohort.members_get()].map(i=>[i.patient,i.description,i.modality,i.seriesUID,i.vfsPath].map(Wk).join(","))];this.handlers.command_run("mkdir -p ~/gather"),this.handlers.command_show(`touch --withContents '${t.join(`
|
|
4296
4296
|
`)}' ~/gather/${e}.csv`)}async feed_ensure(){const e=this.cohort.feed_get();if(e!==null)return e;if(this.cohort.size()===0)return null;const t=this.cohort.members_get().filter(o=>(o.kind??"series")!=="series");if(t.length>0)return this.handlers.note(`gather: this cohort holds ${t.length} ${t.length===1?"place":"places"} as well as series, and a feed is rooted by pulling its members — a place is already in ChRIS. PROCESS one place from its own row, or remove them to make a feed of the series. (Rooting a feed on the whole cohort, places included, is coming: CUBE takes the list.)`),null;const i=await this.name_ensure();if(i===null)return null;const n=[...this.cohort.members_get()].map(o=>o.vfsPath).join(" "),r=await this.handlers.feed_create(`pull --new-feed "${i}" ${n}`);return r!==null&&this.feed_set(r),r}async cohort_process(){const e=await this.feed_ensure();e!==null&&this.handlers.cohort_process({input:e.path,feed:e.feedId,node:e.rootInstanceId})}}const uM="~/gather/current.json",Uk=1200;function $k(s,e){const{panels:t,subjects:i}=s,n=new Lk;let r=null,o=!1,a=null;const l=async v=>{const{terminal:y,client:b}=s;y.line_echo(v);let w;try{w=await b.line_execute(v,{silent:!0})}catch(z){return y.output_write("err",`\x1B[31m${z instanceof Error?z.message:String(z)}\x1B[0m
|
|
4297
|
-
`),null}y.outcome_write(w);for(const z of w.envelopes){if(z.model?.kind!=="feed.created")continue;const O=z.model.data;if(typeof O.feedId=="number"&&typeof O.rootInstanceId=="number"&&typeof O.path=="string")return{feedId:O.feedId,rootInstanceId:O.rootInstanceId,path:O.path}}return null},c=(v,y,b)=>({command_run:w=>{s.client.line_execute(w,{silent:!0})},command_show:w=>s.terminal.line_run(w),note:w=>s.terminal.line_note(w),image_open:w=>{e.image_open(v(),w).then(z=>s.terminal.line_note(z))},process_open:w=>e.process_open(v(),{input:w,feed:null,node:null}),...y,...b,feed_create:l,cohort_process:w=>e.process_open(v(),w),feed_open:w=>e.feed_open(v(),w)}),h=()=>{a!==null&&window.clearTimeout(a),a=window.setTimeout(()=>{a=null;const v=r?.entries_get()??[],y=JSON.stringify({version:1,name:r?.name_get()??null,feed:r?.feed_get()??null,series:v});s.client.line_execute("mkdir -p ~/gather",{silent:!0,observe:!1}).then(()=>s.client.line_execute(`touch --withContents '${y.replace(/'/g,"'\\''")}' ${uM}`,{silent:!0,observe:!1}))},Uk)},d=()=>{const v=document.querySelector("#header-gather-pill");v!==null&&v.classList.toggle("panel-gather-empty",(r?.entries_get().length??0)===0)},u=()=>{const v=e.element_require("header-gather"),y=()=>e.errandHost_find()??"pacs",b=w=>Lm(s.terminal,e.element_require("header-gather"),w);return new dM(v,e.pane_find(v,".gather-rows"),c(y,{name_ask:w=>b({message:"Cohort name: ",kind:"text",suggest:w,commit:"NAME IT"}),confirm_ask:async w=>{const z=await b({message:w,kind:"confirm"});return z==="y"||z==="n"?z:null}},{changed:()=>{e.stage_relight(),d(),h()},dismiss:()=>{document.body.dataset.header="away",o=!0,d()}}),n)};return{cohort:n,instance_build:v=>{const y=e.template_stamp("tpl-pane-gather"),b=new dM(y,e.pane_find(y,".gather-rows"),c(()=>v,{name_ask:w=>e.ask_onPane(v,{message:"Cohort name: ",kind:"text",suggest:w,commit:"NAME IT"}),confirm_ask:async w=>{const z=await e.ask_onPane(v,{message:w,kind:"confirm"});return z==="y"||z==="n"?z:null}},{changed:()=>e.stage_relight(),dismiss:()=>{s.layout.leaf_close(v)||e.home_apply(),e.orphans_dispose(),e.stage_relight()}}),n);return t.set("gather",v,b),{id:v,kind:"gather",mount:y,dispose:()=>{t.delete(v),i.pane_leave(v)}}},has:v=>r?.has(v)===!0,gather:v=>{r===null&&(r=u());for(const b of v)r.series_add(b);const y=document.body.dataset.header==="away";(!o||!y)&&(document.body.dataset.header="gather",o=!1),d(),h()},open:(v,y="pacs")=>{const{layout:b}=s,w=new Set(b.panes_shown());let z=t.ids("gather").find(M=>w.has(M))??null;if(z===null){const M=w.has(y)?y:e.errandHost_find()??y,S=e.instance_spawn("gather","pacs"),D=e.replayPlace_get();if(!b.leaf_split(M,D?.dir??"row",S.id,D?.before??!1))return xs(S.id),b.mount_remove(S.id),null;e.birth_record(S.id,M,D?.dir??"row",D?.before??!1),z=S.id}const O=t.get("gather",z);if(O===void 0)return null;for(const M of v)O.series_add(M);return z},stage:()=>{const{layout:v}=s,y=new Set(v.panes_shown()),b=t.ids("gather").find(w=>y.has(w))??null;if(b!==null)v.focus_set(b);else{const w=e.errandHost_find()??"pacs",z=e.instance_spawn("gather","pacs");if(!v.leaf_split(w,"col",z.id,!1)){xs(z.id),v.mount_remove(z.id);return}e.birth_record(z.id,w,"col",!1),t.get("gather",z.id)?.render_now()}document.body.dataset.header="away",o=!0},annunciate:d,restore:async()=>{const v=await e.fileText_fetch(uM);if(v.ok)try{const y=JSON.parse(v.text);if(!Array.isArray(y.series)||y.series.length===0)return;r===null&&(r=u());for(const b of y.series)r.series_add(b);d(),e.stage_relight()}catch{}}}}class jk{mount;handlers;titleSpan;stateSpan;fieldSection;savePill;revertPill;focusMark;field=null;path=null;original="";saving=!1;fieldBuild=null;constructor(e,t){this.mount=e,this.handlers=t,this.titleSpan=e.querySelector(".pane-title"),this.stateSpan=e.querySelector(".pane-state"),this.fieldSection=this.element_require(".edit-field"),this.savePill=this.element_require(".edit-save"),this.revertPill=this.element_require(".edit-revert"),this.focusMark=e.querySelector(".edit-focus"),this.savePill.addEventListener("click",()=>{this.save()}),this.revertPill.addEventListener("click",()=>this.revert()),e.addEventListener("keydown",i=>{(i.ctrlKey||i.metaKey)&&!i.altKey&&i.key.toLowerCase()==="s"&&(i.preventDefault(),i.stopPropagation(),this.save())},{capture:!0}),this.fieldSection.addEventListener("mousedown",()=>this.focusMark_set(!0)),this.fieldSection.addEventListener("focusin",()=>this.focusMark_set(!0)),this.fieldSection.addEventListener("focusout",i=>{(!(i.relatedTarget instanceof Node)||!this.fieldSection.contains(i.relatedTarget))&&this.focusMark_set(!1)}),this.controls_sync()}opening_show(e){this.path=e,this.title_set(e),ws(this.stateSpan,"wait","OPENING")}async content_show(e){this.path=e.path,this.original=e.content,this.title_set(e.path),this.fieldBuild??=this.field_build(e);const t=await this.fieldBuild;t!==null&&(t.text_get()!==this.original&&t.text_set(this.original),this.controls_sync(),t.focus(),this.focusMark_set(!0))}async field_build(e){let t;try{t=await Jf(()=>import("./field-TqvO3HwF.js").then(i=>i.Q),[],import.meta.url)}catch(i){if(!km(i))throw i;return ws(this.stateSpan,"stale",ph),this.handlers.note(`edit: ${ph.toLowerCase()} — the editor's code is of an older build than the server has`),null}return this.field=await t.editField_create(this.fieldSection,e.content,e.extension,()=>this.controls_sync()),this.field}opening_fail(e){ws(this.stateSpan,"refused",`NOT OPENED · ${e.toUpperCase()}`)}async save(){if(this.field===null||this.path===null||this.saving)return!1;const e=this.field.text_get();if(e===this.original)return!0;this.saving=!0,this.controls_sync();let t=!1;try{t=await this.handlers.save(this.path,e)}finally{this.saving=!1}return t&&(this.original=e),this.controls_sync(),t||ws(this.stateSpan,"refused","NOT SAVED · THE CONSOLE SAYS WHY"),t}revert(){this.field===null||!this.dirty_is()||(this.field.text_set(this.original),this.controls_sync())}dirty_is(){return this.field!==null&&this.field.text_get()!==this.original}path_get(){return this.path}field_release(){return this.field===null||!this.field.hasFocus()?!1:(this.field.blur(),this.focusMark_set(!1),!0)}dispose(){this.field?.destroy(),this.field=null}controls_sync(){const e=this.dirty_is();this.savePill.disabled=!e||this.saving,this.revertPill.disabled=!e||this.saving,this.mount.dataset.dirty=e?"yes":"no",this.field!==null&&(this.saving?ws(this.stateSpan,"wait","SAVING"):e?ws(this.stateSpan,"note","DIRTY"):ws(this.stateSpan,"settled","SAVED"))}title_set(e){this.titleSpan!==null&&(this.titleSpan.textContent=`EDIT ${e.split("/").pop()??e}`.toUpperCase()),this.mount.title=e}focusMark_set(e){this.focusMark!==null&&(this.focusMark.hidden=!e)}element_require(e){const t=this.mount.querySelector(e);if(t===null)throw new Error(`edit pane: no ${e} in its template`);return t}}function Hk(s,e){const{layout:t,panels:i,subjects:n}=s,r=async(d,u)=>{const p=await $o(s,Jw(d,u));return p&&e.saved?.(d),p},o=d=>{const u=e.template_stamp("tpl-pane-edit"),p=new jk(u,{save:r,note:f=>s.terminal.line_note(f)});return i.set("edit",d,p),{id:d,kind:"edit",mount:u,dispose:()=>{p.dispose(),i.delete(d),n.pane_leave(d)}}},a=d=>{const u=new Set(t.panes_shown());for(const[p,f]of i.entries("edit"))if(u.has(p)&&f.path_get()===d)return p;return null},l=()=>{e.launcher_yield();const d=new Set(t.panes_shown()),u=t.focused_get(),p=u!==null&&d.has(u)?u:e.errandHost_find();if(p===null)return null;const f=e.instance_spawn("edit"),_=e.replayPlace_get();return t.leaf_split(p,_?.dir??"col",f.id,_?.before??!1)?(e.birth_record(f.id,p,_?.dir??"col",_?.before??!1),f.id):(xs(f.id),t.mount_remove(f.id),null)};return{instance_build:o,edit_receive:d=>{const u=d.path??"";if(u==="")throw new Error("the editor pane needs the file it edits, and the request named none");const p=a(u)??l();if(p===null)return!1;const f=i.get("edit",p);return f===void 0?!1:(t.focus_set(p),f.dirty_is()?(s.terminal.line_note(`edit: ${u}: its pane has unsaved changes; they stand (REVERT reads the file again)`),!0):(f.content_show({path:u,content:d.content,extension:d.extension??L0(u)}),!0))},edit_open:(d,u={})=>{const p=a(d)??l();if(p===null)return null;const f=i.get("edit",p);if(f===void 0)return null;t.focus_set(p),f.dirty_is()||f.opening_show(d);const _=Qw(d);return u.visible===!0?(s.terminal.line_run(_),p):(s.client.line_execute(_,{silent:!0,observe:!1}).then(g=>{const m=g.envelopes.find(v=>v.status!=="ok");m!==void 0&&f.opening_fail((m.renderedErr??"").replace(/\x1b\[[0-9;]*m/g,"").trim()||"the kernel refused")}).catch(g=>f.opening_fail(g instanceof Error?g.message:String(g))),p)}}}class Vk{listing;constructor(e){const t=e.querySelector(".help-panel");if(t===null)throw new Error("help pane: no .help-panel in its template");this.listing=new ar({mount:t,traits:this.traits_declare(),key:i=>i.key,chrome:{root:e,prefix:"help"},caps:"root",activatable:()=>!1,row:{className:i=>`help-row help-${i.topic}`}}),this.render()}traits_declare(){return[{key:"name",label:"KEY · VERB",className:"help-key",width:"minmax(9em, 12em)",cell:e=>e.name},{key:"does",label:"DOES",className:"help-does",width:"minmax(16em, 1fr)",cell:e=>e.does}]}render(){const e=o=>{const a=document.createElement("header");return a.className="files-path help-block-head",a.textContent=o,a},t=qi.map(o=>({key:`k:${o.key}`,name:o.key,does:o.does,topic:o.topic})),i=Xo.map((o,a)=>{const l=o.indexOf(" ");return{key:`v:${a}`,name:l<0?o:o.slice(0,l),does:l<0?"":o.slice(l+1).trim(),topic:"verb"}}),n=[{key:"g:games",name:"help games",does:"the /usr/games shelf — fortune, cal, weather and their kin, by category (type it in the console)",topic:"verb"}],r=[{key:"n:notes",name:"notes",does:"what the installed releases changed (notes pane opens it as a listing; the dashboard's WHAT'S NEW block too)",topic:"verb"}];this.listing.rows_set([{key:"keys",header:e("KEYS — Ctrl-B opens the focused pane's drawer; then one key presses one of its verbs"),rows:t},{key:"verbs",header:e("VERBS — the console language; the long form is docs/argus-lang.adoc"),rows:i},{key:"games",header:e("GAMES — the small pleasures, kept apart from the tools as BSD kept them"),rows:n},{key:"notes",header:e("NOTES — what changed, release by release"),rows:r}],{field:"help"})}}function qk(s,e){const{layout:t,panels:i,subjects:n}=s;return{instance_build:a=>{const l=e.template_stamp("tpl-pane-help");return i.set("help",a,new Vk(l)),{id:a,kind:"help",mount:l,dispose:()=>{i.delete(a),n.pane_leave(a)}}},open:()=>{const a=i.ids("help").find(d=>t.panes_shown().includes(d));if(a!==void 0)return t.focus_set(a),"help: on stage";const l=e.launcher_active();e.launcher_yield();const c=t.focused_get()??"files",h=e.instance_spawn("help");return l&&t.leaf_replace("files",h.id)?(t.focus_set(h.id),"help: the keys and the verbs, as a pane (help keys, help verbs print them here)"):t.leaf_split(c,"col",h.id,!1)?(e.birth_record(h.id,c,"col",!1),"help: the keys and the verbs, as a pane (help keys, help verbs print them here)"):(xs(h.id),t.mount_remove(h.id),"help: could not open a pane")}}}const nu=["___________________ _-_ ","\\__(==========/_=_/ ____.---'---`---.____"," \\_ \\ \\----._________.----/"," \\ \\ / / `-_-' "," __,--`.`-'..'-_ "," /____ || "," `--.____,-' "];function Kk(){const s=nu[0].length;let e=Number.NaN,t=0;return{title:"SL",tick:60,step:i=>{Number.isNaN(e)&&(e=-s),e+=1,t+=1,e>i.cols+6&&(e=-s)},draw:(i,n)=>{const r=Math.max(0,Math.floor((i.rows-nu.length)/2));nu.forEach((a,l)=>i.text(Math.round(e),r+l,a,n.lit));const o=t%2===0?"-~=":"-=~";i.text(Math.round(e)-o.length,r+1,o,n.cool)}}}const fM="ハミヒーウシナモニサワツオリアホテマケメエカキムユラセネスタヌヘ0123456789Z:・.=*+-<>¦|";function Yk(){const s=new Map;let e=0;return{title:"CMATRIX",tick:50,step:(t,i)=>{e+=1;for(let n=0;n<t.cols;n++){const r=s.get(n);if(r===void 0){i()<.02&&s.set(n,{row:-1,speed:1+Math.floor(i()*2),length:4+Math.floor(i()*12),glyphs:[]});continue}e%r.speed===0&&(r.row+=1,r.glyphs.unshift(fM[Math.floor(i()*fM.length)]),r.glyphs.length>r.length&&r.glyphs.pop(),r.row-r.length>t.rows&&s.delete(n))}},draw:(t,i)=>{for(const[n,r]of s)r.glyphs.forEach((o,a)=>{const l=a===0?"#ffffff":a<r.length/2?i.lit:i.dim;t.put(n,r.row-a,o,l)})}}}function Xk(){const s=[];return{title:"RAIN",tick:70,step:(e,t)=>{t()<.9&&s.push({col:Math.floor(t()*e.cols),row:0,splash:0});for(const i of s)i.row<e.rows-1?i.row+=1:i.splash+=1;for(let i=s.length-1;i>=0;i--)s[i].splash>3&&s.splice(i,1)},draw:(e,t)=>{for(const i of s){if(i.splash===0){e.put(i.col,i.row,"|",t.cool);continue}const n=["o","O","( )"][i.splash-1];e.text(i.col-(n.length>>1),e.rows-1,n,t.dim)}}}}function Zk(){const s=[],e=[];let t=0;return{title:"ASCIIQUARIUM",tick:90,step:(i,n)=>{if(t+=1,s.length<Math.max(3,i.cols/12)&&n()<.08){const r=n()<.5;s.push({col:r?-4:i.cols+1,row:2+Math.floor(n()*Math.max(1,i.rows-5)),right:r,speed:1+Math.floor(n()*2),hue:Math.floor(n()*3)})}for(const r of s)t%r.speed===0&&(r.col+=r.right?1:-1);for(let r=s.length-1;r>=0;r--){const o=s[r];(o.col<-5||o.col>i.cols+2)&&s.splice(r,1)}if(n()<.3){const r=s[Math.floor(n()*s.length)];r!==void 0&&e.push({col:r.col+(r.right?4:-1),row:r.row-1})}for(const r of e)r.row-=1;for(let r=e.length-1;r>=0;r--)e[r].row<1&&e.splice(r,1)},draw:(i,n)=>{const r=(t%4<2?"~^":"^~").repeat(i.cols>>1);i.text(0,0,r,n.cool);const o=[n.lit,n.cool,n.warn];for(const a of s)i.text(a.col,a.row,a.right?"><>":"<><",o[a.hue]);for(const a of e)i.put(a.col,a.row,a.row%2===0?"o":".",n.dim);for(let a=2;a<i.cols;a+=7){const l=(t>>2)%2===0?0:1;for(let c=0;c<3;c++)i.put(a+(c+l)%2,i.rows-2-c,c%2===0?"(":")",n.dim)}i.text(0,i.rows-1,"^".repeat(i.cols),n.dim)}}}const pM=[[[0,0],[1,0],[2,0],[3,0]],[[0,0],[1,0],[0,1],[1,1]],[[1,0],[0,1],[1,1],[2,1]],[[0,0],[1,0],[1,1],[2,1]],[[1,0],[2,0],[0,1],[1,1]],[[0,0],[0,1],[1,1],[2,1]],[[2,0],[0,1],[1,1],[2,1]]],Gr=10,Fr=20;function Jk(){return{well:Array.from({length:Fr},()=>Array(Gr).fill(0)),piece:null,score:0,lines:0,over:!1}}function Wm(s,e){return e.cells.every(([t,i])=>{const n=e.x+t,r=e.y+i;return n>=0&&n<Gr&&r<Fr&&(r<0||s[r][n]===0)})}function ru(s){const e=Math.max(...s.cells.flat())+1;return{...s,cells:s.cells.map(([t,i])=>[e-1-i,t])}}function Qk(s,e){const t=Math.floor(e()*pM.length),i={cells:pM[t].map(n=>[n[0],n[1]]),x:3,y:0,kind:t+1};if(!Wm(s.well,i)){s.over=!0;return}s.piece=i}function eP(s){const e=s.piece;if(e===null)return;e.cells.some(([,n])=>e.y+n<0)&&(s.over=!0);for(const[n,r]of e.cells){const o=e.y+r;o>=0&&(s.well[o][e.x+n]=e.kind)}const t=s.well.filter(n=>n.some(r=>r===0)),i=Fr-t.length;for(;t.length<Fr;)t.unshift(Array(Gr).fill(0));s.well=t,s.lines+=i,s.score+=[0,100,300,500,800][i]??800,s.piece=null}function ep(s,e){if(s.over)return;if(s.piece===null){Qk(s,e);return}const t={...s.piece,y:s.piece.y+1};Wm(s.well,t)?s.piece=t:eP(s)}function tP(s,e,t){if(s.over||s.piece===null)return!1;const i=s.piece,n=r=>Wm(s.well,r)?(s.piece=r,!0):!1;switch(e){case"ArrowLeft":case"h":case"a":return n({...i,x:i.x-1}),!0;case"ArrowRight":case"l":case"d":return n({...i,x:i.x+1}),!0;case"ArrowUp":case"k":case"w":return n(ru(i))||n({...ru(i),x:i.x-1})||n({...ru(i),x:i.x+1}),!0;case"ArrowDown":case"j":case"s":return ep(s,t),!0;case" ":{for(;s.piece!==null;)ep(s,t);return!0}default:return!1}}function sP(){const s=Jk();let e=Math.random;return{title:"TETRIS",tick:500,step:(t,i)=>{e=i,ep(s,i)},draw:(t,i)=>{const n=Math.max(0,Math.floor((t.cols-(Gr*2+2))/2)),r=Math.max(0,Math.floor((t.rows-Fr-1)/2)),o=["",i.cool,i.lit,i.warn,i.dim,i.lit,i.cool,i.warn];for(let a=0;a<Fr;a++){t.put(n,r+a,"|",i.dim),t.put(n+Gr*2+1,r+a,"|",i.dim);for(let l=0;l<Gr;l++){const c=s.well[a][l];c!==0&&t.text(n+1+l*2,r+a,"[]",o[c])}}if(t.text(n,r+Fr,"+"+"-".repeat(Gr*2)+"+",i.dim),s.piece!==null)for(const[a,l]of s.piece.cells){const c=s.piece.y+l;c>=0&&t.text(n+1+(s.piece.x+a)*2,r+c,"[]",o[s.piece.kind])}s.over&&t.text(n+2,r+9," GAME OVER ",i.warn)},key:t=>tP(s,t,e),status:()=>`${s.score} · ${s.lines} lines${s.over?" · OVER":""}`,over:()=>s.over}}function iP(s,e,t){const i=s>>1,n=e>>1,r={body:[[i,n],[i-1,n],[i-2,n]],food:[0,0],heading:"right",next:"right",score:0,over:!1,cols:s,rows:e};return dy(r,t),r}function dy(s,e){for(let t=0;t<1e3;t++){const i=[Math.floor(e()*s.cols),Math.floor(e()*s.rows)];if(!s.body.some(([n,r])=>n===i[0]&&r===i[1])){s.food=i;return}}}const nP={up:"down",down:"up",left:"right",right:"left"};function rP(s,e){nP[e]!==s.heading&&(s.next=e)}function oP(s,e){if(s.over)return;s.heading=s.next;const[t,i]=s.body[0],n=s.heading==="up"?[t,i-1]:s.heading==="down"?[t,i+1]:s.heading==="left"?[t-1,i]:[t+1,i],r=n[0]<0||n[1]<0||n[0]>=s.cols||n[1]>=s.rows,o=s.body.some(([a,l])=>a===n[0]&&l===n[1]);if(r||o){s.over=!0;return}s.body.unshift(n),n[0]===s.food[0]&&n[1]===s.food[1]?(s.score+=10,dy(s,e)):s.body.pop()}const aP={...Object.fromEntries(um.map(s=>[qs[s].arrow,qs[s].focusWord])),k:"up",w:"up",j:"down",s:"down",h:"left",a:"left",l:"right",d:"right"};function lP(){let s=null;return{title:"SNAKE",tick:140,step:(e,t)=>{s===null&&(s=iP(Math.max(8,e.cols>>1),Math.max(6,e.rows-1),t)),oP(s,t)},draw:(e,t)=>{s!==null&&(e.text(0,s.rows,"-".repeat(s.cols*2),t.dim),e.text(s.food[0]*2,s.food[1],"**",t.warn),s.body.forEach(([i,n],r)=>e.text(i*2,n,r===0?"@@":"oo",r===0?t.lit:t.cool)),s.over&&e.text(Math.max(0,s.cols-6),s.rows>>1," GAME OVER ",t.warn))},key:e=>{const t=aP[e];return t===void 0||s===null?!1:(rP(s,t),!0)},status:()=>s===null?"":`${s.score}${s.over?" · OVER":""}`,over:()=>s?.over??!1}}const uy={sl:Kk,cmatrix:Yk,rain:Xk,aquarium:Zk,tetris:sP,snake:lP};function cP(s){return s in uy}const hP=8,dP=26,ou=1.8,uP=100,mM=24;function gM(s,e){let t=Math.floor(s/uP);return e/(t*ou)<mM&&(t=Math.floor(e/mM/ou)),t=Math.max(hP,Math.min(dP,t)),{w:t,h:Math.round(t*ou)}}class fP{pane;field;canvas;state;focusMark;pausePill;program=null;name=null;paused=!1;timer=null;frame=null;observer;constructor(e){this.pane=e,this.field=Da(e,".games-field"),this.canvas=Da(e,".games-canvas"),this.state=e.querySelector(".pane-state"),this.focusMark=Da(e,".games-focus"),this.pausePill=Da(e,".games-pause"),this.field.tabIndex=0,this.pausePill.addEventListener("click",()=>this.pause_toggle()),Da(e,".games-restart").addEventListener("click",()=>{this.name!==null&&this.program_run(this.name)}),this.field.addEventListener("mousedown",()=>{this.field.focus(),this.focusMark_paint(!0)}),this.field.addEventListener("focusin",()=>this.focusMark_paint(!0)),this.field.addEventListener("focusout",t=>{(!(t.relatedTarget instanceof Node)||!this.field.contains(t.relatedTarget))&&this.focusMark_paint(!1)}),this.field.addEventListener("keydown",t=>this.key_handle(t)),this.observer=typeof ResizeObserver>"u"?null:new ResizeObserver(()=>this.draw()),this.observer?.observe(this.field)}program_run(e){this.name=e,this.program=uy[e](),this.paused=!1,this.pausePill.textContent="PAUSE",this.clock_start(),this.program.key!==void 0&&(this.field.focus(),this.focusMark_paint(!0)),this.draw()}program_name(){return this.name}paused_is(){return this.paused}pause_toggle(){this.program!==null&&(this.paused=!this.paused,this.pausePill.textContent=this.paused?"RESUME":"PAUSE",this.paused?this.clock_stop():this.clock_start(),this.state_paint())}field_hasFocus(){return document.activeElement instanceof Node&&this.field.contains(document.activeElement)}field_release(){return this.field_hasFocus()?(document.activeElement.blur(),this.focusMark_paint(!1),!0):!1}dispose(){this.clock_stop(),this.observer?.disconnect()}key_handle(e){if(e.key==="Escape"){this.field_release(),e.stopPropagation();return}if(this.program!==null){if(e.key===" "&&this.program.key===void 0){this.pause_toggle(),e.preventDefault(),e.stopPropagation();return}this.program.key?.(e.key)===!0&&(e.preventDefault(),this.draw()),e.stopPropagation()}}clock_start(){this.clock_stop();const e=this.program;e!==null&&(this.timer=setInterval(()=>{this.field.offsetParent!==null&&(e.step(this.size_of(),Math.random),this.draw(),e.over?.()===!0&&this.clock_stop())},e.tick))}clock_stop(){this.timer!==null&&clearInterval(this.timer),this.timer=null}size_of(){const e=this.field.getBoundingClientRect(),t=gM(e.width,e.height);return{cols:Math.max(10,Math.floor(e.width/t.w)),rows:Math.max(6,Math.floor(e.height/t.h))}}palette_read(){const e=getComputedStyle(this.pane),t=(i,n)=>e.getPropertyValue(i).trim()||n;return{lit:t("--harvestgold","#ffcc66"),dim:t("--butter","#ffff99"),warn:t("--tomato","#ff7766"),cool:t("--daybreak","#55aaff")}}draw(){this.frame===null&&(this.frame=requestAnimationFrame(()=>{this.frame=null,this.paint()}))}paint(){const e=this.program,t=this.canvas.getContext("2d");if(e===null||t===null)return;const i=this.field.getBoundingClientRect(),n=window.devicePixelRatio||1;(this.canvas.width!==Math.floor(i.width*n)||this.canvas.height!==Math.floor(i.height*n))&&(this.canvas.width=Math.floor(i.width*n),this.canvas.height=Math.floor(i.height*n)),t.setTransform(n,0,0,n,0,0),t.clearRect(0,0,i.width,i.height);const r=gM(i.width,i.height);t.font=`${r.h-2}px 'Share Tech Mono', monospace`,t.textBaseline="top";const o=this.size_of(),a=(c,h,d,u)=>{c<0||h<0||c>=o.cols||h>=o.rows||(t.fillStyle=u,t.fillText(d,c*r.w,h*r.h))},l={cols:o.cols,rows:o.rows,put:a,text:(c,h,d,u)=>{[...d].forEach((p,f)=>{p!==" "&&a(c+f,h,p,u)})}};e.draw(l,this.palette_read()),this.state_paint()}state_paint(){if(this.state===null||this.program===null)return;const e=this.program.status?.()??"";this.state.textContent=[this.program.title,e,this.paused?"PAUSED":""].filter(t=>t!=="").join(" · ")}focusMark_paint(e){this.focusMark.hidden=!e,this.pane.classList.toggle("games-field-focused",e)}}function Da(s,e){const t=s.querySelector(e);if(t===null)throw new Error(`games pane: missing ${e}`);return t}function pP(s,e){const{layout:t,panels:i,subjects:n}=s;return{instance_build:a=>{const l=e.template_stamp("tpl-pane-games"),c=new fP(l);return i.set("games",a,c),{id:a,kind:"games",mount:l,dispose:()=>{c.dispose(),i.delete(a),n.pane_leave(a)}}},show:a=>{const l=typeof a=="object"&&a!==null?a.program:void 0;if(typeof l!="string"||!cP(l))return`games: no program named ${String(l)}`;const c=i.ids("games").find(f=>t.panes_shown().includes(f));if(c!==void 0)return t.focus_set(c),i.get("games",c)?.program_run(l),`games: ${l} on the GAMES pane`;const h=e.launcher_active();e.launcher_yield();const d=t.focused_get()??"files",u=e.instance_spawn("games");return(h?t.leaf_replace("files",u.id):t.leaf_split(d,"col",u.id,!1))?(h?t.focus_set(u.id):e.birth_record(u.id,d,"col",!1),i.get("games",u.id)?.program_run(l),`games: ${l} in a GAMES pane (Esc gives the keyboard back; its PAUSE and RESTART pills on the frame)`):(xs(u.id),t.mount_remove(u.id),"games: could not open a pane")}}}function mP(s){return`${s.date??"undated"} · ${s.entries.map(e=>`${e.package} ${e.version}`).join(" · ")}`}function gP(s,e){return s.releases.map(t=>{const i=t.merge??t.date??"undated",n=[];for(const r of t.entries)r.changes.forEach((o,a)=>{const l=`${i}:${r.package}:${a}`,c=o.body!=="";n.push({key:l,tag:r.package,text:o.headline,body:!1,more:c,internal:o.internal,of:l}),c&&e.has(l)&&n.push({key:`${l}:body`,tag:"",text:o.body,body:!0,more:!1,internal:o.internal,of:l})});return{key:i,title:mP(t),rows:n}})}class _P{constructor(e,t){this.hooks=t;const i=e.querySelector(".notes-panel");if(i===null)throw new Error("notes pane: no .notes-panel in its template");this.state=e.querySelector(".pane-state"),this.sincePill=e.querySelector(".notes-since"),this.internalPill=e.querySelector(".notes-internal"),this.listing=new ar({mount:i,traits:this.traits_declare(),key:n=>n.key,chrome:{root:e,prefix:"notes"},caps:"root",activatable:n=>n.more,activate:n=>this.unfold_toggle(n.of),row:{className:n=>`notes-row${n.body?" notes-row-body":""}${n.internal?" notes-row-internal":""}${n.more?" notes-row-more":""}`}}),this.sincePill?.addEventListener("click",()=>{this.since_cycle()}),this.internalPill?.addEventListener("click",()=>{this.internal_toggle()}),this.pills_paint()}hooks;listing;state;sincePill;internalPill;model=null;unfolded=new Set;ask={since:1,all:!1};traits_declare(){return[{key:"tag",label:"PACKAGE",className:"notes-tag",width:"minmax(5em, 7em)",cell:e=>e.tag},{key:"text",label:"CHANGE",className:"notes-text",width:"minmax(16em, 1fr)",cell:e=>e.more&&!e.body?`${e.text} ▸`:e.text}]}model_show(e){this.model=e,this.ask={since:e.releases.length>1?e.releases.length>=e.total?"all":e.releases.length:1,all:e.all},this.render()}releases_shown(){return this.model?.releases.length??0}unfolded_is(e){return this.unfolded.has(e)}unfold_toggle(e){this.unfolded.has(e)?this.unfolded.delete(e):this.unfolded.add(e),this.render()}async since_cycle(){const e=this.ask.since===1?5:this.ask.since===5?"all":1;await this.ask_again({...this.ask,since:e})}async internal_toggle(){await this.ask_again({...this.ask,all:!this.ask.all})}async ask_again(e){const t=e.since==="all"?"9999":String(e.since),i=await this.hooks.ask(`notes --since ${t}${e.all?" --all":""}`);i!==null&&(this.ask=e,this.model_show(i))}pills_paint(){this.sincePill!==null&&(this.sincePill.textContent=this.ask.since==="all"?"ALL RELEASES":this.ask.since===1?"LATEST RELEASE":`LAST ${this.ask.since} RELEASES`),this.internalPill!==null&&(this.internalPill.textContent=this.ask.all?"INTERNAL ON":"INTERNAL OFF",this.internalPill.classList.toggle("rail-off",!this.ask.all))}render(){const e=this.model;if(e===null)return;const t=n=>{const r=document.createElement("header");return r.className="files-path notes-block-head",r.textContent=n,r},i=gP(e,this.unfolded).map(n=>({key:n.key,header:t(n.title),rows:n.rows}));if(this.listing.rows_set(i,{field:"notes"}),this.state!==null){const n=Object.entries(e.installed).map(([r,o])=>`${r} ${o}`).join(" · ");this.state.textContent=`${e.source.toUpperCase()} · ${n}`}this.pills_paint()}}function bP(s){for(const e of s.envelopes){if(e.model?.kind!==bx)continue;const t=yx.safeParse(e.model.data);if(t.success)return t.data}return null}function MP(s,e){const{layout:t,panels:i,subjects:n}=s,r=async c=>bP(await e.ask(c)),o=c=>{const h=e.template_stamp("tpl-pane-notes");return i.set("notes",c,new _P(h,{ask:r})),{id:c,kind:"notes",mount:h,dispose:()=>{i.delete(c),n.pane_leave(c)}}},a=c=>{r("notes").then(h=>{h!==null&&i.get("notes",c)?.model_show(h)})};return{instance_build:o,open:()=>{const c=i.ids("notes").find(f=>t.panes_shown().includes(f));if(c!==void 0)return t.focus_set(c),a(c),"notes: on stage";const h=e.launcher_active();e.launcher_yield();const d=t.focused_get()??"files",u=e.instance_spawn("notes");return(h?t.leaf_replace("files",u.id):t.leaf_split(d,"col",u.id,!1))?(h?t.focus_set(u.id):e.birth_record(u.id,d,"col",!1),a(u.id),"notes: what the installed releases changed, as a pane (notes in the console prints it)"):(xs(u.id),t.mount_remove(u.id),"notes: could not open a pane")},latest:()=>r("notes")}}function _M(s){return[...s.querySelectorAll(".mode-frame button")].filter(e=>!e.disabled&&!e.hidden&&e.offsetParent!==null)}function vP(s){return[...s.querySelectorAll(".listing-row")].filter(e=>e.offsetParent!==null)}function wP(s,e,t){if(e===0)return null;switch(t){case"ArrowDown":return s<0?0:Math.min(e-1,s+1);case"ArrowUp":return s<0?e-1:Math.max(0,s-1);case"Home":return 0;case"End":return e-1;default:return null}}function yP(s,e){const{layout:t,panels:i,paneInstance_get:n}=s,r=[()=>e.palette_isOpen()?(e.palette_close(),"claimed"):"passed",()=>s.terminal.ask_abandon()?"claimed":"passed",()=>Kw()?"claimed":"passed",()=>e.errand_abandon()?"claimed":"passed",()=>{const f=document.activeElement;return!(f instanceof HTMLInputElement||f instanceof HTMLTextAreaElement)||f.closest(".workspace-pane")===null||f.closest("#terminal")!==null?"passed":(f.blur(),"claimed")},()=>i.values("image").some(f=>f.field_release())?"claimed":"passed",()=>i.values("edit").some(f=>f.field_release())?"claimed":"passed",()=>i.values("games").some(f=>f.field_release())?"claimed":"passed",()=>{if(s.terminal.ask_isOpen())return"passed";let f=!1;for(const _ of i.values("files"))_.select_isOn()&&(_.select_toggle(!1),f=!0);return f?"claimed":"passed"},()=>{const f=e.drawers_close(),_=e.modeFrames_close();return f||_?"claimed":"passed"},()=>document.body.dataset.zoom!==void 0?"yielded":"passed",()=>e.dive_leave()?"claimed":"passed",()=>e.overlay_escape()?"claimed":"passed",()=>{const f=i.entries("dag").find(([,_])=>_.inside_isHeld());return f===void 0?"passed":(f[1].flight_back(()=>{}),"claimed")},()=>{const f=t.focused_get(),_=i.entries("files").filter(([,g])=>g.content_isShown()).sort(([g],[m])=>g===f?-1:m===f?1:0)[0];return _===void 0?"passed":(_[1].listing_restore(),"claimed")},()=>i.values("dag").some(f=>f.nav_pop())?"claimed":"passed"],o=f=>{if(document.body.dataset.zoom!=="launcher")for(const _ of r){const g=_();if(g==="yielded")return;if(g==="claimed"){f.stopImmediatePropagation(),_!==r[0]&&s.sound("audio3");return}}},a=(f,_)=>{const g=()=>{f.preventDefault(),f.stopImmediatePropagation()},m=kA(f.key);if(f.ctrlKey&&!f.metaKey&&!f.altKey&&m!==null){const w=t.focused_get();return w!==null&&e.verbs.resize(w,m,.05),g(),!0}if(f.ctrlKey||f.metaKey||f.altKey)return!1;const v=w=>(e.drawers_close(),w(),g(),!0);if(m!==null)return v(()=>{l(),Ov(e.host(),qs[m].focusWord)!==null&&s.sound("audio3")});switch(f.key){case"o":case"O":{const w=t.panes_shown(),z=w.indexOf(t.focused_get()??""),O=w[(z+(f.key==="o"?1:w.length-1))%w.length];return v(()=>{l(),O!==void 0&&(t.focus_set(O),s.sound("audio3"))})}case"?":return v(()=>s.terminal.line_run("argus keys"));case";":return v(()=>{l(),t.focus_last()!==null&&s.sound("audio3")});case"q":return v(()=>{for(const w of t.panes_shown())e.verbs.bar_note(w,`@${w}`)});case" ":{const w=t.focused_get();return v(()=>{w!==null&&e.verbs.flip(w)})}case"!":{const w=t.focused_get();return v(()=>{w!==null&&t.panes_shown().length>1&&(e.stage_alone(w),e.verbs.bar_note(w,"ALONE ON STAGE"),s.sound("audio3"))})}case"w":return v(()=>e.element_require("gutter-panes").click());case"r":return v(()=>{l();const w=c();w!==null&&h(w)});case"&":return v(()=>s.terminal.line_run("pane close all"));case"[":return v(()=>{const w=document.querySelector(".argus-output");w!==null&&(w.tabIndex=-1,w.focus())})}const y=qi.find(w=>w.key===f.key&&w.selector!==null);if(y===void 0||y.selector===null)return!1;y.move===!0&&_.querySelector('.drawer-mode[data-mode="move"]')?.click();const b=_.querySelector(y.selector);return b===null||b.disabled?y.move===!0&&_.querySelector('.drawer-mode[data-mode="split"]')?.click():b.click(),g(),!0},l=()=>{const f=document.activeElement;f instanceof HTMLElement&&f.closest("#drawer")!==null&&f.blur(),e.console_release()},c=()=>{const f=document.body.dataset.zoom;if(f==="console"||f==="launcher")return null;const _=f!==void 0?f:t.focused_get();if(_===null)return null;const g=n(_)?.mount??null;return g?.closest(".workspace-pane")??g},h=f=>{f.classList.contains("workspace-pane")&&(f.dataset.modes="open");let _=0;const g=()=>{_+=1;const m=document.activeElement;!(m instanceof HTMLButtonElement&&m.closest(".mode-frame")!==null&&f.contains(m))&&(m===null||m===document.body)&&_M(f)[0]?.focus(),_<30&&window.requestAnimationFrame(g)};return g(),s.sound("audio3"),!0},d=f=>{if(f.ctrlKey||f.metaKey||f.altKey||f.shiftKey)return!1;const _=c();if(_===null)return!1;const g=()=>(f.preventDefault(),f.stopImmediatePropagation(),!0),m=document.activeElement;if(m instanceof HTMLButtonElement&&m.closest(".mode-frame")!==null&&_.contains(m)){const O=_M(_),M=O.indexOf(m);return f.key==="ArrowLeft"?(m.blur(),g()):f.key==="ArrowDown"||f.key==="ArrowUp"?(O[f.key==="ArrowDown"?Math.min(O.length-1,M+1):Math.max(0,M-1)]?.focus(),g()):!1}if(m!==null&&m!==document.body&&!m.classList.contains("listing-row"))return!1;const v=vP(_);if(v.length===0)return!1;const y=v.findIndex(O=>O.classList.contains("listing-cursor")),b=y>=0?y:v.findIndex(O=>O.classList.contains("listing-indicated"));if(f.key==="ArrowRight")return h(_)&&g();if(f.key==="Enter"){const O=v[b];if(O===void 0)return!1;if(O.classList.contains("listing-indicated")){const M=O.querySelector(".listing-control");M!==null?M.click():O.dispatchEvent(new MouseEvent("dblclick",{bubbles:!0,cancelable:!0}))}else O.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0}));return g()}const w=wP(b,v.length,f.key);if(w===null)return!1;for(const O of v)O.classList.remove("listing-cursor");const z=v[w];return z?.classList.add("listing-cursor"),z?.scrollIntoView({block:"nearest"}),g()},u=f=>{const _=document.querySelector(".pane-drawer:not([hidden])")!==null;if(f.key===":"&&_){e.drawers_close(),e.palette_open(),f.preventDefault(),f.stopImmediatePropagation();return}if(!(f.key==="b"&&f.ctrlKey&&!f.altKey&&!f.metaKey))return;if(f.preventDefault(),_){e.drawers_close(),e.palette_open();return}const g=document.body.dataset.zoom,m=g==="console"||g===void 0&&e.consoleFocused(),v=g!==void 0&&g!=="console"?g:t.focused_get()??"files",y=m?e.element_require("console-drawer"):n(v)?.mount?.querySelector(".pane-drawer")??null;y!==null&&(y.hidden=!y.hidden,y.hidden||y.querySelector("button")?.focus(),s.sound("audio3"))},p=f=>{if(f.key==="Escape"){o(f);return}const _=document.querySelector(".pane-drawer:not([hidden])"),g=f.target instanceof HTMLInputElement||f.target instanceof HTMLTextAreaElement||f.target instanceof HTMLElement&&f.target.isContentEditable;_!==null&&!g&&a(f,_)||_===null&&!g&&!e.palette_isOpen()&&d(f)||u(f)};return window.addEventListener("keydown",p,{capture:!0}),()=>window.removeEventListener("keydown",p,{capture:!0})}function zP(s,e){const{layout:t,panels:i,subjects:n}=s,r=(l,c,h)=>{h.addEventListener("click",_=>{_.target instanceof Element&&_.target.closest("button")!==null||(c.hidden=!c.hidden,c.hidden||c.querySelector("button")?.focus(),s.sound("audio3"))});const d=c.querySelector(".drawer-zoom");d!==null&&(d.dataset.pane=l),h.addEventListener("dblclick",_=>{_.target instanceof Element&&_.target.closest("button")!==null||(window.getSelection()?.removeAllRanges(),d?.click())});for(const _ of c.querySelectorAll(".drawer-bind"))_.addEventListener("click",()=>{for(const g of c.querySelectorAll(".drawer-bind"))g.classList.remove("drawer-bind-selected");_.classList.add("drawer-bind-selected"),s.sound("audio3")});const u=[...c.querySelectorAll("[data-split]")],p=_=>GA(_.dataset.split,_.dataset.place)??"right",f=_=>{c.dataset.mode=_;for(const g of c.querySelectorAll(".drawer-mode"))g.classList.toggle("drawer-mode-selected",g.dataset.mode===_);for(const g of u){const m=p(g);g.disabled=_==="move"&&!t.move_possible(l,m);const v=ui(m);g.title=_==="move"?`this pane moves ${m}${e.verbs.chordKeys_of(v,!0)}`:`new pane opens ${m}${e.verbs.chordKeys_of(v,!1)}`}};for(const _ of c.querySelectorAll(".drawer-mode"))_.addEventListener("click",()=>{const g=_.dataset.mode==="move"?"move":"split";f(g==="move"&&c.dataset.mode==="move"?"split":g),s.sound("audio3")});for(const _ of u)_.addEventListener("click",()=>{if(c.dataset.mode==="move"){e.verbs.move(l,p(_)),f("split"),c.hidden=!0;return}const g=_.dataset.split==="row"?"row":"col",m=_.dataset.place==="before",v=c.querySelector(".drawer-bind-selected")?.dataset.bind??"unlinked",y=v==="viewer"?"view":v==="fs"?"fs":"empty";e.pillPane_spawn(l,y,g,m)!==null&&(c.hidden=!0,s.sound("audio3"))});for(const _ of new Set(qi.filter(g=>g.selector!==null&&g.move!==!0).map(g=>g.selector??""))){const g=c.querySelector(_);g!==null&&!g.title.includes("[keys ")&&(g.title=`${g.title}${e.verbs.chordKeys_of(_,!1)}`)}c.querySelector(".drawer-close")?.addEventListener("click",()=>{if(l==="dag"){e.dag_dismiss(),e.home_apply();return}t.leaf_close(l)||e.home_apply(),e.orphans_dispose(),s.sound("audio3")})},o=(l,c,h)=>{const{browser:d}=e,u=c.querySelector(".drawer-binding");if(u!==null){const g=document.createElement("span");g.className="drawer-label drawer-label-cwd",g.textContent="CWD",u.appendChild(g);const m=(v,y,b)=>{const w=document.createElement("button");w.className="pacs-capsule drawer-cwdbind",w.dataset.follow=y?"on":"off",w.textContent=v,w.title=b,w.addEventListener("click",()=>{d.follows(l)!==y&&d.follow_set(l,y),s.sound("audio3")}),u.appendChild(w)};m("FOLLOW CWD",!0,"bind this browser to the session cwd (the console's browser)"),m("ROOT HERE",!1,"unbind from the cwd: this browser keeps its own place"),d.cwdBind_sync_register(l,()=>{const v=d.follows(l);for(const y of u.querySelectorAll(".drawer-cwdbind"))y.classList.toggle("drawer-bind-selected",y.dataset.follow==="on"===v)}),d.cwdBind_sync(l)}const p=()=>i.get("files",l);h.querySelector(".files-home")?.addEventListener("click",()=>{if(d.follows(l)){s.terminal.line_run("cd ~");return}const g=p();g!==void 0&&d.rooted_walk(l,g,"~")}),h.querySelector(".files-back")?.addEventListener("click",()=>{if(d.follows(l)){s.terminal.line_run("cd -");return}const g=p();g!==void 0&&d.rooted_back(l,g)});const f=()=>p()?.path_current()??null;h.querySelector(".files-mkdir")?.addEventListener("click",()=>{const g=f();g!==null&&d.directory_make(l,g)}),h.querySelector(".files-refresh")?.addEventListener("click",()=>{const g=f();g!==null&&d.listing_refresh(l,g)});const _=h.querySelector(".files-upload-input");h.querySelector(".files-upload")?.addEventListener("click",()=>{f()!==null&&_?.click()}),_?.addEventListener("change",()=>{const g=f(),m=_.files;g===null||m===null||m.length===0||(d.files_deliver(l,g,Array.from(m)),_.value="")})},a=(l,c)=>{const h=d=>d.modelKind==="fs.file"?d.address.replace(/\/[^/]*$/,"")||"/":d.address;c("ENTER NODE","move the session into the indicated node (its data directory)",()=>{const d=n.regard_get(l),u=i.get("dag",l)?.feed_get()??null,p=d===null?u===null?null:`/proc/jobs/feed_${u}`:h(d);p!==null&&s.terminal.line_run(`cd "${p}"`)}),c("PROCESS NODE","run an executable on the indicated node's output (a catalogue opens beside)",()=>{const d=n.regard_get(l),u=i.get("dag",l)?.feed_get()??null;if(d===null||u===null)return;const p=h(d),f=Zf(p)??(/_(\d+)\/?$/.exec(p)===null?null:parseInt(/_(\d+)\/?$/.exec(p)?.[1]??"",10));f!==null&&e.process_open(l,{input:p.replace(/\/data\/?$/,"")+"/data",feed:u,node:f})}),c("ENTER FEED","move the session into the feed on stage (or the one picked in the roster)",()=>{const d=i.get("dag",l)?.feed_get()??null;d!==null&&s.terminal.line_run(`cd "/proc/jobs/feed_${d}"`)}),c("BACK","return to the previous listing inside the node",()=>e.overlay_back(l)),c("CLEAR DETAIL","dismiss the node facts (a click on empty space does too)",()=>{i.get("dag",l)?.detail_clear()}),c("REFRESH","revisit the feed now (a watch keeps sampling it while it runs)",()=>{i.get("dag",l)?.refresh()})};return(l,c,h)=>{const d=h.querySelector(".pane-drawer"),u=h.querySelector(".pane-handle");if(d===null||u===null)return;r(l,d,u);const p=d.querySelector(".drawer-children");if(p===null)return;const f=(_,g,m)=>{const v=document.createElement("button");v.className="pacs-capsule drawer-child",v.textContent=_,v.title=g,v.addEventListener("click",()=>{m(),d.hidden=!0,s.sound("audio3")}),p.appendChild(v)};(c==="files"||c==="catalogue")&&o(l,d,h),c==="dag"&&a(l,f)}}function SP(s,e){const{layout:t,panels:i,paneInstance_get:n,subjects:r}=s,o=d=>n(d)?.kind??null,a=(d,u)=>{const p=new Set(t.panes_shown()),f=r.group_of(u),_=i.entries(d).filter(([g])=>p.has(g));return i.get(d,u)??_.find(([g])=>r.group_of(g)===f)?.[1]??(_.length===1?_[0]?.[1]:void 0)},l=async(d,u,p)=>{if(u==="state"){const f=d.state_get();if(f===null)return"image state: no image on the field";const _=(f.viewports??[]).map(g=>`${g.id.replace(/^.*-/,"")} scale=${g.scale.toFixed(3)} focus=${g.focus.map(m=>m.toFixed(2)).join(",")} voi=${g.voi===null?"-":`${g.voi.lower.toFixed(1)}..${g.voi.upper.toFixed(1)}`}`).join(" | ");return`image: layout=${f.layout} tool=${f.tool} primary=${f.primaryTool??"-"} slice=${f.slice}/${f.slices} refused=${f.refused} annotations=${f.annotations} filled=${f.filled}
|
|
4297
|
+
`),null}y.outcome_write(w);for(const z of w.envelopes){if(z.model?.kind!=="feed.created")continue;const O=z.model.data;if(typeof O.feedId=="number"&&typeof O.rootInstanceId=="number"&&typeof O.path=="string")return{feedId:O.feedId,rootInstanceId:O.rootInstanceId,path:O.path}}return null},c=(v,y,b)=>({command_run:w=>{s.client.line_execute(w,{silent:!0})},command_show:w=>s.terminal.line_run(w),note:w=>s.terminal.line_note(w),image_open:w=>{e.image_open(v(),w).then(z=>s.terminal.line_note(z))},process_open:w=>e.process_open(v(),{input:w,feed:null,node:null}),...y,...b,feed_create:l,cohort_process:w=>e.process_open(v(),w),feed_open:w=>e.feed_open(v(),w)}),h=()=>{a!==null&&window.clearTimeout(a),a=window.setTimeout(()=>{a=null;const v=r?.entries_get()??[],y=JSON.stringify({version:1,name:r?.name_get()??null,feed:r?.feed_get()??null,series:v});s.client.line_execute("mkdir -p ~/gather",{silent:!0,observe:!1}).then(()=>s.client.line_execute(`touch --withContents '${y.replace(/'/g,"'\\''")}' ${uM}`,{silent:!0,observe:!1}))},Uk)},d=()=>{const v=document.querySelector("#header-gather-pill");v!==null&&v.classList.toggle("panel-gather-empty",(r?.entries_get().length??0)===0)},u=()=>{const v=e.element_require("header-gather"),y=()=>e.errandHost_find()??"pacs",b=w=>Lm(s.terminal,e.element_require("header-gather"),w);return new dM(v,e.pane_find(v,".gather-rows"),c(y,{name_ask:w=>b({message:"Cohort name: ",kind:"text",suggest:w,commit:"NAME IT"}),confirm_ask:async w=>{const z=await b({message:w,kind:"confirm"});return z==="y"||z==="n"?z:null}},{changed:()=>{e.stage_relight(),d(),h()},dismiss:()=>{document.body.dataset.header="away",o=!0,d()}}),n)};return{cohort:n,instance_build:v=>{const y=e.template_stamp("tpl-pane-gather"),b=new dM(y,e.pane_find(y,".gather-rows"),c(()=>v,{name_ask:w=>e.ask_onPane(v,{message:"Cohort name: ",kind:"text",suggest:w,commit:"NAME IT"}),confirm_ask:async w=>{const z=await e.ask_onPane(v,{message:w,kind:"confirm"});return z==="y"||z==="n"?z:null}},{changed:()=>e.stage_relight(),dismiss:()=>{s.layout.leaf_close(v)||e.home_apply(),e.orphans_dispose(),e.stage_relight()}}),n);return t.set("gather",v,b),{id:v,kind:"gather",mount:y,dispose:()=>{t.delete(v),i.pane_leave(v)}}},has:v=>r?.has(v)===!0,gather:v=>{r===null&&(r=u());for(const b of v)r.series_add(b);const y=document.body.dataset.header==="away";(!o||!y)&&(document.body.dataset.header="gather",o=!1),d(),h()},open:(v,y="pacs")=>{const{layout:b}=s,w=new Set(b.panes_shown());let z=t.ids("gather").find(M=>w.has(M))??null;if(z===null){const M=w.has(y)?y:e.errandHost_find()??y,S=e.instance_spawn("gather","pacs"),D=e.replayPlace_get();if(!b.leaf_split(M,D?.dir??"row",S.id,D?.before??!1))return xs(S.id),b.mount_remove(S.id),null;e.birth_record(S.id,M,D?.dir??"row",D?.before??!1),z=S.id}const O=t.get("gather",z);if(O===void 0)return null;for(const M of v)O.series_add(M);return z},stage:()=>{const{layout:v}=s,y=new Set(v.panes_shown()),b=t.ids("gather").find(w=>y.has(w))??null;if(b!==null)v.focus_set(b);else{const w=e.errandHost_find()??"pacs",z=e.instance_spawn("gather","pacs");if(!v.leaf_split(w,"col",z.id,!1)){xs(z.id),v.mount_remove(z.id);return}e.birth_record(z.id,w,"col",!1),t.get("gather",z.id)?.render_now()}document.body.dataset.header="away",o=!0},annunciate:d,restore:async()=>{const v=await e.fileText_fetch(uM);if(v.ok)try{const y=JSON.parse(v.text);if(!Array.isArray(y.series)||y.series.length===0)return;r===null&&(r=u());for(const b of y.series)r.series_add(b);d(),e.stage_relight()}catch{}}}}class jk{mount;handlers;titleSpan;stateSpan;fieldSection;savePill;revertPill;focusMark;field=null;path=null;original="";saving=!1;fieldBuild=null;constructor(e,t){this.mount=e,this.handlers=t,this.titleSpan=e.querySelector(".pane-title"),this.stateSpan=e.querySelector(".pane-state"),this.fieldSection=this.element_require(".edit-field"),this.savePill=this.element_require(".edit-save"),this.revertPill=this.element_require(".edit-revert"),this.focusMark=e.querySelector(".edit-focus"),this.savePill.addEventListener("click",()=>{this.save()}),this.revertPill.addEventListener("click",()=>this.revert()),e.addEventListener("keydown",i=>{(i.ctrlKey||i.metaKey)&&!i.altKey&&i.key.toLowerCase()==="s"&&(i.preventDefault(),i.stopPropagation(),this.save())},{capture:!0}),this.fieldSection.addEventListener("mousedown",()=>this.focusMark_set(!0)),this.fieldSection.addEventListener("focusin",()=>this.focusMark_set(!0)),this.fieldSection.addEventListener("focusout",i=>{(!(i.relatedTarget instanceof Node)||!this.fieldSection.contains(i.relatedTarget))&&this.focusMark_set(!1)}),this.controls_sync()}opening_show(e){this.path=e,this.title_set(e),ws(this.stateSpan,"wait","OPENING")}async content_show(e){this.path=e.path,this.original=e.content,this.title_set(e.path),this.fieldBuild??=this.field_build(e);const t=await this.fieldBuild;t!==null&&(t.text_get()!==this.original&&t.text_set(this.original),this.controls_sync(),t.focus(),this.focusMark_set(!0))}async field_build(e){let t;try{t=await Jf(()=>import("./field-B2jm52NE.js").then(i=>i.Q),[],import.meta.url)}catch(i){if(!km(i))throw i;return ws(this.stateSpan,"stale",ph),this.handlers.note(`edit: ${ph.toLowerCase()} — the editor's code is of an older build than the server has`),null}return this.field=await t.editField_create(this.fieldSection,e.content,e.extension,()=>this.controls_sync()),this.field}opening_fail(e){ws(this.stateSpan,"refused",`NOT OPENED · ${e.toUpperCase()}`)}async save(){if(this.field===null||this.path===null||this.saving)return!1;const e=this.field.text_get();if(e===this.original)return!0;this.saving=!0,this.controls_sync();let t=!1;try{t=await this.handlers.save(this.path,e)}finally{this.saving=!1}return t&&(this.original=e),this.controls_sync(),t||ws(this.stateSpan,"refused","NOT SAVED · THE CONSOLE SAYS WHY"),t}revert(){this.field===null||!this.dirty_is()||(this.field.text_set(this.original),this.controls_sync())}dirty_is(){return this.field!==null&&this.field.text_get()!==this.original}path_get(){return this.path}field_release(){return this.field===null||!this.field.hasFocus()?!1:(this.field.blur(),this.focusMark_set(!1),!0)}dispose(){this.field?.destroy(),this.field=null}controls_sync(){const e=this.dirty_is();this.savePill.disabled=!e||this.saving,this.revertPill.disabled=!e||this.saving,this.mount.dataset.dirty=e?"yes":"no",this.field!==null&&(this.saving?ws(this.stateSpan,"wait","SAVING"):e?ws(this.stateSpan,"note","DIRTY"):ws(this.stateSpan,"settled","SAVED"))}title_set(e){this.titleSpan!==null&&(this.titleSpan.textContent=`EDIT ${e.split("/").pop()??e}`.toUpperCase()),this.mount.title=e}focusMark_set(e){this.focusMark!==null&&(this.focusMark.hidden=!e)}element_require(e){const t=this.mount.querySelector(e);if(t===null)throw new Error(`edit pane: no ${e} in its template`);return t}}function Hk(s,e){const{layout:t,panels:i,subjects:n}=s,r=async(d,u)=>{const p=await $o(s,Jw(d,u));return p&&e.saved?.(d),p},o=d=>{const u=e.template_stamp("tpl-pane-edit"),p=new jk(u,{save:r,note:f=>s.terminal.line_note(f)});return i.set("edit",d,p),{id:d,kind:"edit",mount:u,dispose:()=>{p.dispose(),i.delete(d),n.pane_leave(d)}}},a=d=>{const u=new Set(t.panes_shown());for(const[p,f]of i.entries("edit"))if(u.has(p)&&f.path_get()===d)return p;return null},l=()=>{e.launcher_yield();const d=new Set(t.panes_shown()),u=t.focused_get(),p=u!==null&&d.has(u)?u:e.errandHost_find();if(p===null)return null;const f=e.instance_spawn("edit"),_=e.replayPlace_get();return t.leaf_split(p,_?.dir??"col",f.id,_?.before??!1)?(e.birth_record(f.id,p,_?.dir??"col",_?.before??!1),f.id):(xs(f.id),t.mount_remove(f.id),null)};return{instance_build:o,edit_receive:d=>{const u=d.path??"";if(u==="")throw new Error("the editor pane needs the file it edits, and the request named none");const p=a(u)??l();if(p===null)return!1;const f=i.get("edit",p);return f===void 0?!1:(t.focus_set(p),f.dirty_is()?(s.terminal.line_note(`edit: ${u}: its pane has unsaved changes; they stand (REVERT reads the file again)`),!0):(f.content_show({path:u,content:d.content,extension:d.extension??L0(u)}),!0))},edit_open:(d,u={})=>{const p=a(d)??l();if(p===null)return null;const f=i.get("edit",p);if(f===void 0)return null;t.focus_set(p),f.dirty_is()||f.opening_show(d);const _=Qw(d);return u.visible===!0?(s.terminal.line_run(_),p):(s.client.line_execute(_,{silent:!0,observe:!1}).then(g=>{const m=g.envelopes.find(v=>v.status!=="ok");m!==void 0&&f.opening_fail((m.renderedErr??"").replace(/\x1b\[[0-9;]*m/g,"").trim()||"the kernel refused")}).catch(g=>f.opening_fail(g instanceof Error?g.message:String(g))),p)}}}class Vk{listing;constructor(e){const t=e.querySelector(".help-panel");if(t===null)throw new Error("help pane: no .help-panel in its template");this.listing=new ar({mount:t,traits:this.traits_declare(),key:i=>i.key,chrome:{root:e,prefix:"help"},caps:"root",activatable:()=>!1,row:{className:i=>`help-row help-${i.topic}`}}),this.render()}traits_declare(){return[{key:"name",label:"KEY · VERB",className:"help-key",width:"minmax(9em, 12em)",cell:e=>e.name},{key:"does",label:"DOES",className:"help-does",width:"minmax(16em, 1fr)",cell:e=>e.does}]}render(){const e=o=>{const a=document.createElement("header");return a.className="files-path help-block-head",a.textContent=o,a},t=qi.map(o=>({key:`k:${o.key}`,name:o.key,does:o.does,topic:o.topic})),i=Xo.map((o,a)=>{const l=o.indexOf(" ");return{key:`v:${a}`,name:l<0?o:o.slice(0,l),does:l<0?"":o.slice(l+1).trim(),topic:"verb"}}),n=[{key:"g:games",name:"help games",does:"the /usr/games shelf — fortune, cal, weather and their kin, by category (type it in the console)",topic:"verb"}],r=[{key:"n:notes",name:"notes",does:"what the installed releases changed (notes pane opens it as a listing; the dashboard's WHAT'S NEW block too)",topic:"verb"}];this.listing.rows_set([{key:"keys",header:e("KEYS — Ctrl-B opens the focused pane's drawer; then one key presses one of its verbs"),rows:t},{key:"verbs",header:e("VERBS — the console language; the long form is docs/argus-lang.adoc"),rows:i},{key:"games",header:e("GAMES — the small pleasures, kept apart from the tools as BSD kept them"),rows:n},{key:"notes",header:e("NOTES — what changed, release by release"),rows:r}],{field:"help"})}}function qk(s,e){const{layout:t,panels:i,subjects:n}=s;return{instance_build:a=>{const l=e.template_stamp("tpl-pane-help");return i.set("help",a,new Vk(l)),{id:a,kind:"help",mount:l,dispose:()=>{i.delete(a),n.pane_leave(a)}}},open:()=>{const a=i.ids("help").find(d=>t.panes_shown().includes(d));if(a!==void 0)return t.focus_set(a),"help: on stage";const l=e.launcher_active();e.launcher_yield();const c=t.focused_get()??"files",h=e.instance_spawn("help");return l&&t.leaf_replace("files",h.id)?(t.focus_set(h.id),"help: the keys and the verbs, as a pane (help keys, help verbs print them here)"):t.leaf_split(c,"col",h.id,!1)?(e.birth_record(h.id,c,"col",!1),"help: the keys and the verbs, as a pane (help keys, help verbs print them here)"):(xs(h.id),t.mount_remove(h.id),"help: could not open a pane")}}}const nu=["___________________ _-_ ","\\__(==========/_=_/ ____.---'---`---.____"," \\_ \\ \\----._________.----/"," \\ \\ / / `-_-' "," __,--`.`-'..'-_ "," /____ || "," `--.____,-' "];function Kk(){const s=nu[0].length;let e=Number.NaN,t=0;return{title:"SL",tick:60,step:i=>{Number.isNaN(e)&&(e=-s),e+=1,t+=1,e>i.cols+6&&(e=-s)},draw:(i,n)=>{const r=Math.max(0,Math.floor((i.rows-nu.length)/2));nu.forEach((a,l)=>i.text(Math.round(e),r+l,a,n.lit));const o=t%2===0?"-~=":"-=~";i.text(Math.round(e)-o.length,r+1,o,n.cool)}}}const fM="ハミヒーウシナモニサワツオリアホテマケメエカキムユラセネスタヌヘ0123456789Z:・.=*+-<>¦|";function Yk(){const s=new Map;let e=0;return{title:"CMATRIX",tick:50,step:(t,i)=>{e+=1;for(let n=0;n<t.cols;n++){const r=s.get(n);if(r===void 0){i()<.02&&s.set(n,{row:-1,speed:1+Math.floor(i()*2),length:4+Math.floor(i()*12),glyphs:[]});continue}e%r.speed===0&&(r.row+=1,r.glyphs.unshift(fM[Math.floor(i()*fM.length)]),r.glyphs.length>r.length&&r.glyphs.pop(),r.row-r.length>t.rows&&s.delete(n))}},draw:(t,i)=>{for(const[n,r]of s)r.glyphs.forEach((o,a)=>{const l=a===0?"#ffffff":a<r.length/2?i.lit:i.dim;t.put(n,r.row-a,o,l)})}}}function Xk(){const s=[];return{title:"RAIN",tick:70,step:(e,t)=>{t()<.9&&s.push({col:Math.floor(t()*e.cols),row:0,splash:0});for(const i of s)i.row<e.rows-1?i.row+=1:i.splash+=1;for(let i=s.length-1;i>=0;i--)s[i].splash>3&&s.splice(i,1)},draw:(e,t)=>{for(const i of s){if(i.splash===0){e.put(i.col,i.row,"|",t.cool);continue}const n=["o","O","( )"][i.splash-1];e.text(i.col-(n.length>>1),e.rows-1,n,t.dim)}}}}function Zk(){const s=[],e=[];let t=0;return{title:"ASCIIQUARIUM",tick:90,step:(i,n)=>{if(t+=1,s.length<Math.max(3,i.cols/12)&&n()<.08){const r=n()<.5;s.push({col:r?-4:i.cols+1,row:2+Math.floor(n()*Math.max(1,i.rows-5)),right:r,speed:1+Math.floor(n()*2),hue:Math.floor(n()*3)})}for(const r of s)t%r.speed===0&&(r.col+=r.right?1:-1);for(let r=s.length-1;r>=0;r--){const o=s[r];(o.col<-5||o.col>i.cols+2)&&s.splice(r,1)}if(n()<.3){const r=s[Math.floor(n()*s.length)];r!==void 0&&e.push({col:r.col+(r.right?4:-1),row:r.row-1})}for(const r of e)r.row-=1;for(let r=e.length-1;r>=0;r--)e[r].row<1&&e.splice(r,1)},draw:(i,n)=>{const r=(t%4<2?"~^":"^~").repeat(i.cols>>1);i.text(0,0,r,n.cool);const o=[n.lit,n.cool,n.warn];for(const a of s)i.text(a.col,a.row,a.right?"><>":"<><",o[a.hue]);for(const a of e)i.put(a.col,a.row,a.row%2===0?"o":".",n.dim);for(let a=2;a<i.cols;a+=7){const l=(t>>2)%2===0?0:1;for(let c=0;c<3;c++)i.put(a+(c+l)%2,i.rows-2-c,c%2===0?"(":")",n.dim)}i.text(0,i.rows-1,"^".repeat(i.cols),n.dim)}}}const pM=[[[0,0],[1,0],[2,0],[3,0]],[[0,0],[1,0],[0,1],[1,1]],[[1,0],[0,1],[1,1],[2,1]],[[0,0],[1,0],[1,1],[2,1]],[[1,0],[2,0],[0,1],[1,1]],[[0,0],[0,1],[1,1],[2,1]],[[2,0],[0,1],[1,1],[2,1]]],Gr=10,Fr=20;function Jk(){return{well:Array.from({length:Fr},()=>Array(Gr).fill(0)),piece:null,score:0,lines:0,over:!1}}function Wm(s,e){return e.cells.every(([t,i])=>{const n=e.x+t,r=e.y+i;return n>=0&&n<Gr&&r<Fr&&(r<0||s[r][n]===0)})}function ru(s){const e=Math.max(...s.cells.flat())+1;return{...s,cells:s.cells.map(([t,i])=>[e-1-i,t])}}function Qk(s,e){const t=Math.floor(e()*pM.length),i={cells:pM[t].map(n=>[n[0],n[1]]),x:3,y:0,kind:t+1};if(!Wm(s.well,i)){s.over=!0;return}s.piece=i}function eP(s){const e=s.piece;if(e===null)return;e.cells.some(([,n])=>e.y+n<0)&&(s.over=!0);for(const[n,r]of e.cells){const o=e.y+r;o>=0&&(s.well[o][e.x+n]=e.kind)}const t=s.well.filter(n=>n.some(r=>r===0)),i=Fr-t.length;for(;t.length<Fr;)t.unshift(Array(Gr).fill(0));s.well=t,s.lines+=i,s.score+=[0,100,300,500,800][i]??800,s.piece=null}function ep(s,e){if(s.over)return;if(s.piece===null){Qk(s,e);return}const t={...s.piece,y:s.piece.y+1};Wm(s.well,t)?s.piece=t:eP(s)}function tP(s,e,t){if(s.over||s.piece===null)return!1;const i=s.piece,n=r=>Wm(s.well,r)?(s.piece=r,!0):!1;switch(e){case"ArrowLeft":case"h":case"a":return n({...i,x:i.x-1}),!0;case"ArrowRight":case"l":case"d":return n({...i,x:i.x+1}),!0;case"ArrowUp":case"k":case"w":return n(ru(i))||n({...ru(i),x:i.x-1})||n({...ru(i),x:i.x+1}),!0;case"ArrowDown":case"j":case"s":return ep(s,t),!0;case" ":{for(;s.piece!==null;)ep(s,t);return!0}default:return!1}}function sP(){const s=Jk();let e=Math.random;return{title:"TETRIS",tick:500,step:(t,i)=>{e=i,ep(s,i)},draw:(t,i)=>{const n=Math.max(0,Math.floor((t.cols-(Gr*2+2))/2)),r=Math.max(0,Math.floor((t.rows-Fr-1)/2)),o=["",i.cool,i.lit,i.warn,i.dim,i.lit,i.cool,i.warn];for(let a=0;a<Fr;a++){t.put(n,r+a,"|",i.dim),t.put(n+Gr*2+1,r+a,"|",i.dim);for(let l=0;l<Gr;l++){const c=s.well[a][l];c!==0&&t.text(n+1+l*2,r+a,"[]",o[c])}}if(t.text(n,r+Fr,"+"+"-".repeat(Gr*2)+"+",i.dim),s.piece!==null)for(const[a,l]of s.piece.cells){const c=s.piece.y+l;c>=0&&t.text(n+1+(s.piece.x+a)*2,r+c,"[]",o[s.piece.kind])}s.over&&t.text(n+2,r+9," GAME OVER ",i.warn)},key:t=>tP(s,t,e),status:()=>`${s.score} · ${s.lines} lines${s.over?" · OVER":""}`,over:()=>s.over}}function iP(s,e,t){const i=s>>1,n=e>>1,r={body:[[i,n],[i-1,n],[i-2,n]],food:[0,0],heading:"right",next:"right",score:0,over:!1,cols:s,rows:e};return dy(r,t),r}function dy(s,e){for(let t=0;t<1e3;t++){const i=[Math.floor(e()*s.cols),Math.floor(e()*s.rows)];if(!s.body.some(([n,r])=>n===i[0]&&r===i[1])){s.food=i;return}}}const nP={up:"down",down:"up",left:"right",right:"left"};function rP(s,e){nP[e]!==s.heading&&(s.next=e)}function oP(s,e){if(s.over)return;s.heading=s.next;const[t,i]=s.body[0],n=s.heading==="up"?[t,i-1]:s.heading==="down"?[t,i+1]:s.heading==="left"?[t-1,i]:[t+1,i],r=n[0]<0||n[1]<0||n[0]>=s.cols||n[1]>=s.rows,o=s.body.some(([a,l])=>a===n[0]&&l===n[1]);if(r||o){s.over=!0;return}s.body.unshift(n),n[0]===s.food[0]&&n[1]===s.food[1]?(s.score+=10,dy(s,e)):s.body.pop()}const aP={...Object.fromEntries(um.map(s=>[qs[s].arrow,qs[s].focusWord])),k:"up",w:"up",j:"down",s:"down",h:"left",a:"left",l:"right",d:"right"};function lP(){let s=null;return{title:"SNAKE",tick:140,step:(e,t)=>{s===null&&(s=iP(Math.max(8,e.cols>>1),Math.max(6,e.rows-1),t)),oP(s,t)},draw:(e,t)=>{s!==null&&(e.text(0,s.rows,"-".repeat(s.cols*2),t.dim),e.text(s.food[0]*2,s.food[1],"**",t.warn),s.body.forEach(([i,n],r)=>e.text(i*2,n,r===0?"@@":"oo",r===0?t.lit:t.cool)),s.over&&e.text(Math.max(0,s.cols-6),s.rows>>1," GAME OVER ",t.warn))},key:e=>{const t=aP[e];return t===void 0||s===null?!1:(rP(s,t),!0)},status:()=>s===null?"":`${s.score}${s.over?" · OVER":""}`,over:()=>s?.over??!1}}const uy={sl:Kk,cmatrix:Yk,rain:Xk,aquarium:Zk,tetris:sP,snake:lP};function cP(s){return s in uy}const hP=8,dP=26,ou=1.8,uP=100,mM=24;function gM(s,e){let t=Math.floor(s/uP);return e/(t*ou)<mM&&(t=Math.floor(e/mM/ou)),t=Math.max(hP,Math.min(dP,t)),{w:t,h:Math.round(t*ou)}}class fP{pane;field;canvas;state;focusMark;pausePill;program=null;name=null;paused=!1;timer=null;frame=null;observer;constructor(e){this.pane=e,this.field=Da(e,".games-field"),this.canvas=Da(e,".games-canvas"),this.state=e.querySelector(".pane-state"),this.focusMark=Da(e,".games-focus"),this.pausePill=Da(e,".games-pause"),this.field.tabIndex=0,this.pausePill.addEventListener("click",()=>this.pause_toggle()),Da(e,".games-restart").addEventListener("click",()=>{this.name!==null&&this.program_run(this.name)}),this.field.addEventListener("mousedown",()=>{this.field.focus(),this.focusMark_paint(!0)}),this.field.addEventListener("focusin",()=>this.focusMark_paint(!0)),this.field.addEventListener("focusout",t=>{(!(t.relatedTarget instanceof Node)||!this.field.contains(t.relatedTarget))&&this.focusMark_paint(!1)}),this.field.addEventListener("keydown",t=>this.key_handle(t)),this.observer=typeof ResizeObserver>"u"?null:new ResizeObserver(()=>this.draw()),this.observer?.observe(this.field)}program_run(e){this.name=e,this.program=uy[e](),this.paused=!1,this.pausePill.textContent="PAUSE",this.clock_start(),this.program.key!==void 0&&(this.field.focus(),this.focusMark_paint(!0)),this.draw()}program_name(){return this.name}paused_is(){return this.paused}pause_toggle(){this.program!==null&&(this.paused=!this.paused,this.pausePill.textContent=this.paused?"RESUME":"PAUSE",this.paused?this.clock_stop():this.clock_start(),this.state_paint())}field_hasFocus(){return document.activeElement instanceof Node&&this.field.contains(document.activeElement)}field_release(){return this.field_hasFocus()?(document.activeElement.blur(),this.focusMark_paint(!1),!0):!1}dispose(){this.clock_stop(),this.observer?.disconnect()}key_handle(e){if(e.key==="Escape"){this.field_release(),e.stopPropagation();return}if(this.program!==null){if(e.key===" "&&this.program.key===void 0){this.pause_toggle(),e.preventDefault(),e.stopPropagation();return}this.program.key?.(e.key)===!0&&(e.preventDefault(),this.draw()),e.stopPropagation()}}clock_start(){this.clock_stop();const e=this.program;e!==null&&(this.timer=setInterval(()=>{this.field.offsetParent!==null&&(e.step(this.size_of(),Math.random),this.draw(),e.over?.()===!0&&this.clock_stop())},e.tick))}clock_stop(){this.timer!==null&&clearInterval(this.timer),this.timer=null}size_of(){const e=this.field.getBoundingClientRect(),t=gM(e.width,e.height);return{cols:Math.max(10,Math.floor(e.width/t.w)),rows:Math.max(6,Math.floor(e.height/t.h))}}palette_read(){const e=getComputedStyle(this.pane),t=(i,n)=>e.getPropertyValue(i).trim()||n;return{lit:t("--harvestgold","#ffcc66"),dim:t("--butter","#ffff99"),warn:t("--tomato","#ff7766"),cool:t("--daybreak","#55aaff")}}draw(){this.frame===null&&(this.frame=requestAnimationFrame(()=>{this.frame=null,this.paint()}))}paint(){const e=this.program,t=this.canvas.getContext("2d");if(e===null||t===null)return;const i=this.field.getBoundingClientRect(),n=window.devicePixelRatio||1;(this.canvas.width!==Math.floor(i.width*n)||this.canvas.height!==Math.floor(i.height*n))&&(this.canvas.width=Math.floor(i.width*n),this.canvas.height=Math.floor(i.height*n)),t.setTransform(n,0,0,n,0,0),t.clearRect(0,0,i.width,i.height);const r=gM(i.width,i.height);t.font=`${r.h-2}px 'Share Tech Mono', monospace`,t.textBaseline="top";const o=this.size_of(),a=(c,h,d,u)=>{c<0||h<0||c>=o.cols||h>=o.rows||(t.fillStyle=u,t.fillText(d,c*r.w,h*r.h))},l={cols:o.cols,rows:o.rows,put:a,text:(c,h,d,u)=>{[...d].forEach((p,f)=>{p!==" "&&a(c+f,h,p,u)})}};e.draw(l,this.palette_read()),this.state_paint()}state_paint(){if(this.state===null||this.program===null)return;const e=this.program.status?.()??"";this.state.textContent=[this.program.title,e,this.paused?"PAUSED":""].filter(t=>t!=="").join(" · ")}focusMark_paint(e){this.focusMark.hidden=!e,this.pane.classList.toggle("games-field-focused",e)}}function Da(s,e){const t=s.querySelector(e);if(t===null)throw new Error(`games pane: missing ${e}`);return t}function pP(s,e){const{layout:t,panels:i,subjects:n}=s;return{instance_build:a=>{const l=e.template_stamp("tpl-pane-games"),c=new fP(l);return i.set("games",a,c),{id:a,kind:"games",mount:l,dispose:()=>{c.dispose(),i.delete(a),n.pane_leave(a)}}},show:a=>{const l=typeof a=="object"&&a!==null?a.program:void 0;if(typeof l!="string"||!cP(l))return`games: no program named ${String(l)}`;const c=i.ids("games").find(f=>t.panes_shown().includes(f));if(c!==void 0)return t.focus_set(c),i.get("games",c)?.program_run(l),`games: ${l} on the GAMES pane`;const h=e.launcher_active();e.launcher_yield();const d=t.focused_get()??"files",u=e.instance_spawn("games");return(h?t.leaf_replace("files",u.id):t.leaf_split(d,"col",u.id,!1))?(h?t.focus_set(u.id):e.birth_record(u.id,d,"col",!1),i.get("games",u.id)?.program_run(l),`games: ${l} in a GAMES pane (Esc gives the keyboard back; its PAUSE and RESTART pills on the frame)`):(xs(u.id),t.mount_remove(u.id),"games: could not open a pane")}}}function mP(s){return`${s.date??"undated"} · ${s.entries.map(e=>`${e.package} ${e.version}`).join(" · ")}`}function gP(s,e){return s.releases.map(t=>{const i=t.merge??t.date??"undated",n=[];for(const r of t.entries)r.changes.forEach((o,a)=>{const l=`${i}:${r.package}:${a}`,c=o.body!=="";n.push({key:l,tag:r.package,text:o.headline,body:!1,more:c,internal:o.internal,of:l}),c&&e.has(l)&&n.push({key:`${l}:body`,tag:"",text:o.body,body:!0,more:!1,internal:o.internal,of:l})});return{key:i,title:mP(t),rows:n}})}class _P{constructor(e,t){this.hooks=t;const i=e.querySelector(".notes-panel");if(i===null)throw new Error("notes pane: no .notes-panel in its template");this.state=e.querySelector(".pane-state"),this.sincePill=e.querySelector(".notes-since"),this.internalPill=e.querySelector(".notes-internal"),this.listing=new ar({mount:i,traits:this.traits_declare(),key:n=>n.key,chrome:{root:e,prefix:"notes"},caps:"root",activatable:n=>n.more,activate:n=>this.unfold_toggle(n.of),row:{className:n=>`notes-row${n.body?" notes-row-body":""}${n.internal?" notes-row-internal":""}${n.more?" notes-row-more":""}`}}),this.sincePill?.addEventListener("click",()=>{this.since_cycle()}),this.internalPill?.addEventListener("click",()=>{this.internal_toggle()}),this.pills_paint()}hooks;listing;state;sincePill;internalPill;model=null;unfolded=new Set;ask={since:1,all:!1};traits_declare(){return[{key:"tag",label:"PACKAGE",className:"notes-tag",width:"minmax(5em, 7em)",cell:e=>e.tag},{key:"text",label:"CHANGE",className:"notes-text",width:"minmax(16em, 1fr)",cell:e=>e.more&&!e.body?`${e.text} ▸`:e.text}]}model_show(e){this.model=e,this.ask={since:e.releases.length>1?e.releases.length>=e.total?"all":e.releases.length:1,all:e.all},this.render()}releases_shown(){return this.model?.releases.length??0}unfolded_is(e){return this.unfolded.has(e)}unfold_toggle(e){this.unfolded.has(e)?this.unfolded.delete(e):this.unfolded.add(e),this.render()}async since_cycle(){const e=this.ask.since===1?5:this.ask.since===5?"all":1;await this.ask_again({...this.ask,since:e})}async internal_toggle(){await this.ask_again({...this.ask,all:!this.ask.all})}async ask_again(e){const t=e.since==="all"?"9999":String(e.since),i=await this.hooks.ask(`notes --since ${t}${e.all?" --all":""}`);i!==null&&(this.ask=e,this.model_show(i))}pills_paint(){this.sincePill!==null&&(this.sincePill.textContent=this.ask.since==="all"?"ALL RELEASES":this.ask.since===1?"LATEST RELEASE":`LAST ${this.ask.since} RELEASES`),this.internalPill!==null&&(this.internalPill.textContent=this.ask.all?"INTERNAL ON":"INTERNAL OFF",this.internalPill.classList.toggle("rail-off",!this.ask.all))}render(){const e=this.model;if(e===null)return;const t=n=>{const r=document.createElement("header");return r.className="files-path notes-block-head",r.textContent=n,r},i=gP(e,this.unfolded).map(n=>({key:n.key,header:t(n.title),rows:n.rows}));if(this.listing.rows_set(i,{field:"notes"}),this.state!==null){const n=Object.entries(e.installed).map(([r,o])=>`${r} ${o}`).join(" · ");this.state.textContent=`${e.source.toUpperCase()} · ${n}`}this.pills_paint()}}function bP(s){for(const e of s.envelopes){if(e.model?.kind!==bx)continue;const t=yx.safeParse(e.model.data);if(t.success)return t.data}return null}function MP(s,e){const{layout:t,panels:i,subjects:n}=s,r=async c=>bP(await e.ask(c)),o=c=>{const h=e.template_stamp("tpl-pane-notes");return i.set("notes",c,new _P(h,{ask:r})),{id:c,kind:"notes",mount:h,dispose:()=>{i.delete(c),n.pane_leave(c)}}},a=c=>{r("notes").then(h=>{h!==null&&i.get("notes",c)?.model_show(h)})};return{instance_build:o,open:()=>{const c=i.ids("notes").find(f=>t.panes_shown().includes(f));if(c!==void 0)return t.focus_set(c),a(c),"notes: on stage";const h=e.launcher_active();e.launcher_yield();const d=t.focused_get()??"files",u=e.instance_spawn("notes");return(h?t.leaf_replace("files",u.id):t.leaf_split(d,"col",u.id,!1))?(h?t.focus_set(u.id):e.birth_record(u.id,d,"col",!1),a(u.id),"notes: what the installed releases changed, as a pane (notes in the console prints it)"):(xs(u.id),t.mount_remove(u.id),"notes: could not open a pane")},latest:()=>r("notes")}}function _M(s){return[...s.querySelectorAll(".mode-frame button")].filter(e=>!e.disabled&&!e.hidden&&e.offsetParent!==null)}function vP(s){return[...s.querySelectorAll(".listing-row")].filter(e=>e.offsetParent!==null)}function wP(s,e,t){if(e===0)return null;switch(t){case"ArrowDown":return s<0?0:Math.min(e-1,s+1);case"ArrowUp":return s<0?e-1:Math.max(0,s-1);case"Home":return 0;case"End":return e-1;default:return null}}function yP(s,e){const{layout:t,panels:i,paneInstance_get:n}=s,r=[()=>e.palette_isOpen()?(e.palette_close(),"claimed"):"passed",()=>s.terminal.ask_abandon()?"claimed":"passed",()=>Kw()?"claimed":"passed",()=>e.errand_abandon()?"claimed":"passed",()=>{const f=document.activeElement;return!(f instanceof HTMLInputElement||f instanceof HTMLTextAreaElement)||f.closest(".workspace-pane")===null||f.closest("#terminal")!==null?"passed":(f.blur(),"claimed")},()=>i.values("image").some(f=>f.field_release())?"claimed":"passed",()=>i.values("edit").some(f=>f.field_release())?"claimed":"passed",()=>i.values("games").some(f=>f.field_release())?"claimed":"passed",()=>{if(s.terminal.ask_isOpen())return"passed";let f=!1;for(const _ of i.values("files"))_.select_isOn()&&(_.select_toggle(!1),f=!0);return f?"claimed":"passed"},()=>{const f=e.drawers_close(),_=e.modeFrames_close();return f||_?"claimed":"passed"},()=>document.body.dataset.zoom!==void 0?"yielded":"passed",()=>e.dive_leave()?"claimed":"passed",()=>e.overlay_escape()?"claimed":"passed",()=>{const f=i.entries("dag").find(([,_])=>_.inside_isHeld());return f===void 0?"passed":(f[1].flight_back(()=>{}),"claimed")},()=>{const f=t.focused_get(),_=i.entries("files").filter(([,g])=>g.content_isShown()).sort(([g],[m])=>g===f?-1:m===f?1:0)[0];return _===void 0?"passed":(_[1].listing_restore(),"claimed")},()=>i.values("dag").some(f=>f.nav_pop())?"claimed":"passed"],o=f=>{if(document.body.dataset.zoom!=="launcher")for(const _ of r){const g=_();if(g==="yielded")return;if(g==="claimed"){f.stopImmediatePropagation(),_!==r[0]&&s.sound("audio3");return}}},a=(f,_)=>{const g=()=>{f.preventDefault(),f.stopImmediatePropagation()},m=kA(f.key);if(f.ctrlKey&&!f.metaKey&&!f.altKey&&m!==null){const w=t.focused_get();return w!==null&&e.verbs.resize(w,m,.05),g(),!0}if(f.ctrlKey||f.metaKey||f.altKey)return!1;const v=w=>(e.drawers_close(),w(),g(),!0);if(m!==null)return v(()=>{l(),Ov(e.host(),qs[m].focusWord)!==null&&s.sound("audio3")});switch(f.key){case"o":case"O":{const w=t.panes_shown(),z=w.indexOf(t.focused_get()??""),O=w[(z+(f.key==="o"?1:w.length-1))%w.length];return v(()=>{l(),O!==void 0&&(t.focus_set(O),s.sound("audio3"))})}case"?":return v(()=>s.terminal.line_run("argus keys"));case";":return v(()=>{l(),t.focus_last()!==null&&s.sound("audio3")});case"q":return v(()=>{for(const w of t.panes_shown())e.verbs.bar_note(w,`@${w}`)});case" ":{const w=t.focused_get();return v(()=>{w!==null&&e.verbs.flip(w)})}case"!":{const w=t.focused_get();return v(()=>{w!==null&&t.panes_shown().length>1&&(e.stage_alone(w),e.verbs.bar_note(w,"ALONE ON STAGE"),s.sound("audio3"))})}case"w":return v(()=>e.element_require("gutter-panes").click());case"r":return v(()=>{l();const w=c();w!==null&&h(w)});case"&":return v(()=>s.terminal.line_run("pane close all"));case"[":return v(()=>{const w=document.querySelector(".argus-output");w!==null&&(w.tabIndex=-1,w.focus())})}const y=qi.find(w=>w.key===f.key&&w.selector!==null);if(y===void 0||y.selector===null)return!1;y.move===!0&&_.querySelector('.drawer-mode[data-mode="move"]')?.click();const b=_.querySelector(y.selector);return b===null||b.disabled?y.move===!0&&_.querySelector('.drawer-mode[data-mode="split"]')?.click():b.click(),g(),!0},l=()=>{const f=document.activeElement;f instanceof HTMLElement&&f.closest("#drawer")!==null&&f.blur(),e.console_release()},c=()=>{const f=document.body.dataset.zoom;if(f==="console"||f==="launcher")return null;const _=f!==void 0?f:t.focused_get();if(_===null)return null;const g=n(_)?.mount??null;return g?.closest(".workspace-pane")??g},h=f=>{f.classList.contains("workspace-pane")&&(f.dataset.modes="open");let _=0;const g=()=>{_+=1;const m=document.activeElement;!(m instanceof HTMLButtonElement&&m.closest(".mode-frame")!==null&&f.contains(m))&&(m===null||m===document.body)&&_M(f)[0]?.focus(),_<30&&window.requestAnimationFrame(g)};return g(),s.sound("audio3"),!0},d=f=>{if(f.ctrlKey||f.metaKey||f.altKey||f.shiftKey)return!1;const _=c();if(_===null)return!1;const g=()=>(f.preventDefault(),f.stopImmediatePropagation(),!0),m=document.activeElement;if(m instanceof HTMLButtonElement&&m.closest(".mode-frame")!==null&&_.contains(m)){const O=_M(_),M=O.indexOf(m);return f.key==="ArrowLeft"?(m.blur(),g()):f.key==="ArrowDown"||f.key==="ArrowUp"?(O[f.key==="ArrowDown"?Math.min(O.length-1,M+1):Math.max(0,M-1)]?.focus(),g()):!1}if(m!==null&&m!==document.body&&!m.classList.contains("listing-row"))return!1;const v=vP(_);if(v.length===0)return!1;const y=v.findIndex(O=>O.classList.contains("listing-cursor")),b=y>=0?y:v.findIndex(O=>O.classList.contains("listing-indicated"));if(f.key==="ArrowRight")return h(_)&&g();if(f.key==="Enter"){const O=v[b];if(O===void 0)return!1;if(O.classList.contains("listing-indicated")){const M=O.querySelector(".listing-control");M!==null?M.click():O.dispatchEvent(new MouseEvent("dblclick",{bubbles:!0,cancelable:!0}))}else O.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0}));return g()}const w=wP(b,v.length,f.key);if(w===null)return!1;for(const O of v)O.classList.remove("listing-cursor");const z=v[w];return z?.classList.add("listing-cursor"),z?.scrollIntoView({block:"nearest"}),g()},u=f=>{const _=document.querySelector(".pane-drawer:not([hidden])")!==null;if(f.key===":"&&_){e.drawers_close(),e.palette_open(),f.preventDefault(),f.stopImmediatePropagation();return}if(!(f.key==="b"&&f.ctrlKey&&!f.altKey&&!f.metaKey))return;if(f.preventDefault(),_){e.drawers_close(),e.palette_open();return}const g=document.body.dataset.zoom,m=g==="console"||g===void 0&&e.consoleFocused(),v=g!==void 0&&g!=="console"?g:t.focused_get()??"files",y=m?e.element_require("console-drawer"):n(v)?.mount?.querySelector(".pane-drawer")??null;y!==null&&(y.hidden=!y.hidden,y.hidden||y.querySelector("button")?.focus(),s.sound("audio3"))},p=f=>{if(f.key==="Escape"){o(f);return}const _=document.querySelector(".pane-drawer:not([hidden])"),g=f.target instanceof HTMLInputElement||f.target instanceof HTMLTextAreaElement||f.target instanceof HTMLElement&&f.target.isContentEditable;_!==null&&!g&&a(f,_)||_===null&&!g&&!e.palette_isOpen()&&d(f)||u(f)};return window.addEventListener("keydown",p,{capture:!0}),()=>window.removeEventListener("keydown",p,{capture:!0})}function zP(s,e){const{layout:t,panels:i,subjects:n}=s,r=(l,c,h)=>{h.addEventListener("click",_=>{_.target instanceof Element&&_.target.closest("button")!==null||(c.hidden=!c.hidden,c.hidden||c.querySelector("button")?.focus(),s.sound("audio3"))});const d=c.querySelector(".drawer-zoom");d!==null&&(d.dataset.pane=l),h.addEventListener("dblclick",_=>{_.target instanceof Element&&_.target.closest("button")!==null||(window.getSelection()?.removeAllRanges(),d?.click())});for(const _ of c.querySelectorAll(".drawer-bind"))_.addEventListener("click",()=>{for(const g of c.querySelectorAll(".drawer-bind"))g.classList.remove("drawer-bind-selected");_.classList.add("drawer-bind-selected"),s.sound("audio3")});const u=[...c.querySelectorAll("[data-split]")],p=_=>GA(_.dataset.split,_.dataset.place)??"right",f=_=>{c.dataset.mode=_;for(const g of c.querySelectorAll(".drawer-mode"))g.classList.toggle("drawer-mode-selected",g.dataset.mode===_);for(const g of u){const m=p(g);g.disabled=_==="move"&&!t.move_possible(l,m);const v=ui(m);g.title=_==="move"?`this pane moves ${m}${e.verbs.chordKeys_of(v,!0)}`:`new pane opens ${m}${e.verbs.chordKeys_of(v,!1)}`}};for(const _ of c.querySelectorAll(".drawer-mode"))_.addEventListener("click",()=>{const g=_.dataset.mode==="move"?"move":"split";f(g==="move"&&c.dataset.mode==="move"?"split":g),s.sound("audio3")});for(const _ of u)_.addEventListener("click",()=>{if(c.dataset.mode==="move"){e.verbs.move(l,p(_)),f("split"),c.hidden=!0;return}const g=_.dataset.split==="row"?"row":"col",m=_.dataset.place==="before",v=c.querySelector(".drawer-bind-selected")?.dataset.bind??"unlinked",y=v==="viewer"?"view":v==="fs"?"fs":"empty";e.pillPane_spawn(l,y,g,m)!==null&&(c.hidden=!0,s.sound("audio3"))});for(const _ of new Set(qi.filter(g=>g.selector!==null&&g.move!==!0).map(g=>g.selector??""))){const g=c.querySelector(_);g!==null&&!g.title.includes("[keys ")&&(g.title=`${g.title}${e.verbs.chordKeys_of(_,!1)}`)}c.querySelector(".drawer-close")?.addEventListener("click",()=>{if(l==="dag"){e.dag_dismiss(),e.home_apply();return}t.leaf_close(l)||e.home_apply(),e.orphans_dispose(),s.sound("audio3")})},o=(l,c,h)=>{const{browser:d}=e,u=c.querySelector(".drawer-binding");if(u!==null){const g=document.createElement("span");g.className="drawer-label drawer-label-cwd",g.textContent="CWD",u.appendChild(g);const m=(v,y,b)=>{const w=document.createElement("button");w.className="pacs-capsule drawer-cwdbind",w.dataset.follow=y?"on":"off",w.textContent=v,w.title=b,w.addEventListener("click",()=>{d.follows(l)!==y&&d.follow_set(l,y),s.sound("audio3")}),u.appendChild(w)};m("FOLLOW CWD",!0,"bind this browser to the session cwd (the console's browser)"),m("ROOT HERE",!1,"unbind from the cwd: this browser keeps its own place"),d.cwdBind_sync_register(l,()=>{const v=d.follows(l);for(const y of u.querySelectorAll(".drawer-cwdbind"))y.classList.toggle("drawer-bind-selected",y.dataset.follow==="on"===v)}),d.cwdBind_sync(l)}const p=()=>i.get("files",l);h.querySelector(".files-home")?.addEventListener("click",()=>{if(d.follows(l)){s.terminal.line_run("cd ~");return}const g=p();g!==void 0&&d.rooted_walk(l,g,"~")}),h.querySelector(".files-back")?.addEventListener("click",()=>{if(d.follows(l)){s.terminal.line_run("cd -");return}const g=p();g!==void 0&&d.rooted_back(l,g)});const f=()=>p()?.path_current()??null;h.querySelector(".files-mkdir")?.addEventListener("click",()=>{const g=f();g!==null&&d.directory_make(l,g)}),h.querySelector(".files-refresh")?.addEventListener("click",()=>{const g=f();g!==null&&d.listing_refresh(l,g)});const _=h.querySelector(".files-upload-input");h.querySelector(".files-upload")?.addEventListener("click",()=>{f()!==null&&_?.click()}),_?.addEventListener("change",()=>{const g=f(),m=_.files;g===null||m===null||m.length===0||(d.files_deliver(l,g,Array.from(m)),_.value="")})},a=(l,c)=>{const h=d=>d.modelKind==="fs.file"?d.address.replace(/\/[^/]*$/,"")||"/":d.address;c("ENTER NODE","move the session into the indicated node (its data directory)",()=>{const d=n.regard_get(l),u=i.get("dag",l)?.feed_get()??null,p=d===null?u===null?null:`/proc/jobs/feed_${u}`:h(d);p!==null&&s.terminal.line_run(`cd "${p}"`)}),c("PROCESS NODE","run an executable on the indicated node's output (a catalogue opens beside)",()=>{const d=n.regard_get(l),u=i.get("dag",l)?.feed_get()??null;if(d===null||u===null)return;const p=h(d),f=Zf(p)??(/_(\d+)\/?$/.exec(p)===null?null:parseInt(/_(\d+)\/?$/.exec(p)?.[1]??"",10));f!==null&&e.process_open(l,{input:p.replace(/\/data\/?$/,"")+"/data",feed:u,node:f})}),c("ENTER FEED","move the session into the feed on stage (or the one picked in the roster)",()=>{const d=i.get("dag",l)?.feed_get()??null;d!==null&&s.terminal.line_run(`cd "/proc/jobs/feed_${d}"`)}),c("BACK","return to the previous listing inside the node",()=>e.overlay_back(l)),c("CLEAR DETAIL","dismiss the node facts (a click on empty space does too)",()=>{i.get("dag",l)?.detail_clear()}),c("REFRESH","revisit the feed now (a watch keeps sampling it while it runs)",()=>{i.get("dag",l)?.refresh()})};return(l,c,h)=>{const d=h.querySelector(".pane-drawer"),u=h.querySelector(".pane-handle");if(d===null||u===null)return;r(l,d,u);const p=d.querySelector(".drawer-children");if(p===null)return;const f=(_,g,m)=>{const v=document.createElement("button");v.className="pacs-capsule drawer-child",v.textContent=_,v.title=g,v.addEventListener("click",()=>{m(),d.hidden=!0,s.sound("audio3")}),p.appendChild(v)};(c==="files"||c==="catalogue")&&o(l,d,h),c==="dag"&&a(l,f)}}function SP(s,e){const{layout:t,panels:i,paneInstance_get:n,subjects:r}=s,o=d=>n(d)?.kind??null,a=(d,u)=>{const p=new Set(t.panes_shown()),f=r.group_of(u),_=i.entries(d).filter(([g])=>p.has(g));return i.get(d,u)??_.find(([g])=>r.group_of(g)===f)?.[1]??(_.length===1?_[0]?.[1]:void 0)},l=async(d,u,p)=>{if(u==="state"){const f=d.state_get();if(f===null)return"image state: no image on the field";const _=(f.viewports??[]).map(g=>`${g.id.replace(/^.*-/,"")} scale=${g.scale.toFixed(3)} focus=${g.focus.map(m=>m.toFixed(2)).join(",")} voi=${g.voi===null?"-":`${g.voi.lower.toFixed(1)}..${g.voi.upper.toFixed(1)}`}`).join(" | ");return`image: layout=${f.layout} tool=${f.tool} primary=${f.primaryTool??"-"} slice=${f.slice}/${f.slices} refused=${f.refused} annotations=${f.annotations} filled=${f.filled}
|
|
4298
4298
|
viewports: ${_||"(none)"}`}if(u==="layout"){const f=p[0]??"";return MO.includes(f)?await d.layout_set(f)?`image layout ${f}`:d.state_get()?.waiting===f?`image layout ${f}: waiting for LOAD`:`image layout ${f}: not offered`:"image layout single|mpr|3d|slab"}if(u==="slice"){const f=Number(p[0]);return!Number.isInteger(f)||f<1?"image slice <n>":d.slice_set(f)?`image slice ${f}`:`image slice ${f}: not offered`}if(u==="series"){const f=Number(p[0]),_=d.siblings_get();if(_.length===0)return"image series: this pane holds one series, not a study";const g=_[f-1];if(g===void 0)return`image series <1..${_.length}>: ${_.map((v,y)=>`${y+1} ${v.label}`).join(" · ")}`;const m=await e.series_ask(g.path);return m===null?`image series ${f}: ${g.path}: not a readable DICOM series`:(d.series_show(m,{siblings:[..._]}),`image series ${f} ${g.label}`)}if(u==="wl"){if((p[0]??"").toLowerCase()==="preset"){const g=p[1]??"";return g===""?"image wl preset <brain|bone|lung|soft|liver>":d.wlPreset_set(g)?`image wl preset ${g}`:`image wl preset ${g}: none for this modality`}const f=Number(p[0]),_=Number(p[1]);return!Number.isFinite(f)||!Number.isFinite(_)||f>=_?"image wl <lower> <upper> | image wl preset <name>":d.wl_set(f,_)?`image wl ${f} ${_}`:"image wl: not offered"}if(u==="colormap"){const f=(p[0]??"").toLowerCase();return _c.includes(f)?d.colormap_set(f)?`image colormap ${f}`:`image colormap ${f}: not offered`:"image colormap gray|hot|jet|cool"}if(u==="save")return await d.annotations_save()?"image save":"image save: nothing saved (the console says why)";if(u==="load")return await d.load_press()?"image load":"image load: nothing was waiting";if(u==="guard"){if((p[0]??"").toLowerCase()==="off")return d.guard_set(null),"image guard off";const _=Number(p[0]);return!Number.isFinite(_)||_<0?`image guard <bytes>|off (now ${d.guard_get()===null?"off":d.guard_get()})`:(d.guard_set(_),`image guard ${_}`)}if(u==="ghost"){const _=(p[0]??"").toLowerCase()==="off"?null:Number(p[0]);return _!==null&&(!Number.isFinite(_)||_<0||_>1)?"image ghost <0..1>|off (SLAB layout)":d.ghost_set(_)?`image ghost ${_===null?"off":_}`:"image ghost: SLAB layout only"}if(u==="tags"){const f=i.idOf("image",d);return f===null?"image tags: no image pane":e.tagsPane_open(f)}return"image <path> · layout single|mpr|3d · slice <n> · series <n> · wl <lo> <hi> | wl preset <name> · colormap <name> · save"},c=(d,u,p)=>{if(u==="redact"){const f=(p[0]??"").toLowerCase();return f!=="on"&&f!=="off"?"tags redact on|off":(d.redact_set(f==="on"),`tags redact ${f}`)}if(u==="filter"){const f=p.join(" ");return f===""||f.toLowerCase()==="off"?(d.filter_set(null),"tags filter off"):(d.filter_set(f),`tags filter ${f}`)}return"tags redact on|off · filter <text>|off"},h=()=>{const d=t.tree_get();if(d===null)return"# empty desktop";const u=[],p=w=>"pane"in w?w.pane:p(w.first),f=p(d),_=o(f);u.push(`view ${_==="dag"?"runs":_==="pacs"?"pacs":"files"}`);let g=1;const m=(w,z)=>{const O=o(w);O==="dag"&&w!==f&&u.push(`pane %${z} claim runs`),O==="files"&&w!==f&&r.group_of(w)===w&&u.push(`pane %${z} claim files`);const M=O==="files"?i.get("files",w)?.path_current()??null:null;M!==null&&u.push(`file %${z} open ${M}`);const S=O==="dag"?i.get("dag",w):void 0;if(S!==void 0&&S.graph_isShown())for(const D of S.view_lines())u.push(D.replace(/^dag /,`dag %${z} `));else if(O==="dag"){const D=n(w)?.mount,T=D?.querySelector(".dag-strategy")?.textContent?.toLowerCase()??"ranked",E=D?.querySelector(".dag-projection")?.textContent?.toLowerCase()??"3d",x=D?.querySelector(".dag-hue")?.textContent?.toLowerCase()??"status";T!=="ranked"&&u.push(`dag %${z} layout ${T}`),E!=="3d"&&u.push(`dag %${z} projection ${E}`),x!=="status"&&u.push(`dag %${z} hue ${x}`)}},v=(w,z)=>{if("pane"in w){m(w.pane,z);return}const O=p(w.second),M=o(O),S=M==="view"?"viewer":M==="files"&&r.group_of(O)!==O?"fs":"unlinked";u.push(`pane %${z} bind ${S}`),u.push(`pane %${z} split ${w.dir==="col"?"right":"below"}`);const D=++g;v(w.first,z),v(w.second,D)};v(d,g);const y=document.body.dataset.header;return y!==void 0&&u.push(`header ${y}`),document.getElementById("drawer")?.classList.contains("drawer-closed")&&u.push("console close"),u.join(`
|
|
4299
4299
|
`)};return{focused_get:()=>{const d=document.body.dataset.zoom;return d!==void 0&&d!=="console"?d:t.focused_get()??t.panes_shown()[0]??null},focus_set:d=>n(d)===void 0?!1:(t.focus_set(d),!0),panes_shown:()=>t.panes_shown(),pane_move:e.verbs.move,pane_flip:e.verbs.flip,pane_resize:e.verbs.resize,help_open:e.help_open,notes_open:e.notes_open,focus_last:()=>{const d=t.focus_last();return d!==null&&s.sound("audio3"),d===null?null:`focused ${d}`},paneRect_get:d=>document.querySelector(`.layout-leaf[data-leaf="${d}"]`)?.getBoundingClientRect()??null,paneMount_get:d=>n(d)?.mount??null,paneKind_get:o,paneLinked_get:d=>r.group_of(d)!==d,feed_enter:e.feed_enter,consoleZoom_toggle:e.consoleZoom_toggle,launcher_enter:e.launcher_enter,stage_keep:e.stage_keep,viewModes_hold:vG,identity_get:e.identity_get,dag_jump:(d,u,p=!1)=>{const f=i.get("dag",d)??i.values("dag")[0];return f===void 0?!1:(f.jump_to(u,p),!0)},node_immerse:d=>{const p=r.regard_get(d)?.address.match(/_(\d+)(?:\/data)?\/?$/)??null;return p===null?!1:i.get("dag",d)?.node_flyTo(parseInt(p[1]??"",10))??!1},files_open:e.files_open,file_download:d=>{const u=r.regard_get(d);return u===null||u.modelKind!=="fs.file"?!1:(e.file_save(u.address),!0)},image_open:(d,u,p)=>e.image_open(d,u,p??{}),image_control:async(d,u,p)=>{const f=a("image",d);return f===void 0?`image ${u}: no image pane on stage for '${d}'`:l(f,u,p)},universe_control:(d,u,p)=>{const f=new Set(t.panes_shown()),_=(d!==null?i.get("universe",d):void 0)??i.entries("universe").find(([g])=>f.has(g))?.[1];return _===void 0?"universe: no universe pane on stage (press the dashboard tile)":_.control(u,p)},tags_control:(d,u,p)=>{const f=a("tags",d);return f===void 0?`tags ${u}: no tags pane on stage for '${d}'`:c(f,u,p)},file_delete:d=>{const u=r.regard_get(d);return u===null||u.modelKind!=="fs.file"?!1:(s.terminal.line_run(`rm "${u.address}"`),!0)},session_run:async d=>{try{return(await s.client.line_execute(d,{silent:!0,observe:!1})).envelopes.map(p=>p.renderedErr??p.rendered).join(`
|
|
4300
|
-
`)}catch(u){return u instanceof Error?u.message:String(u)}},desktop_serialize:h}}function xP(s,e,t){if(t===!0)return"daemon-older";if(e===void 0)return null;const i=e.surface;return t===!1?i!==void 0&&s.built<i.built?"argus-older":null:i===void 0?"daemon-older":i.git===s.git&&i.built===s.built?null:s.built>=i.built?"daemon-older":"argus-older"}const Fm={"daemon-older":{readout:"CALYPSO DAEMON OUT OF DATE",before:"The calypso daemon has been updated and should be restarted; some controls may not work until then. ",cure:"Restart the calypso daemon",after:"."},"argus-older":{readout:"ARGUS OUT OF DATE",before:"ARGUS is older than the calypso daemon. ",cure:"Refresh",after:" to load the new ARGUS."}};function fy(s){const e=Fm[s];return`${e.before}${e.cure}${e.after}`}async function OP(s){try{const e=s??(typeof globalThis.fetch=="function"?globalThis.fetch.bind(globalThis):void 0);if(e===void 0)return null;const t=await e("notes.json",{cache:"no-store"});if(!t.ok)return null;const i=await t.json(),r=i.releases?.[0]?.changes?.find(o=>o.internal!==!0)?.headline;return typeof r!="string"||typeof i.version!="string"?null:{version:i.version,headline:r}}catch{return null}}const bM=96;function EP(s){const e=s.headline.length>bM?`${s.headline.slice(0,bM-1).trimEnd()}…`:s.headline;return`argus ${s.version} · ${e} — WHAT'S NEW after restart`}function AP(s,e,t,i,n=document.body,r){n.querySelector(".build-mismatch")?.remove();const o=t.surface!==void 0?`ARGUS ${t.surface.git} built ${t.surface.built}Z`:"an ARGUS too old to say its build";i(`argus: ${fy(s)}`);const a=t.surface!==void 0&&t.surface.git===e.git&&t.surface.built===e.built;i(a?`argus: the calypso daemon's own code on disk has changed since it started (ARGUS ${e.git} built ${e.built}Z)`:`argus: ARGUS ${e.git} built ${e.built}Z · calypso daemon started with ${o}`);const l=Fm[s],c=document.createElement("div");c.className="stale-page build-mismatch",c.dataset.mismatch=s,c.setAttribute("role","alert");const h=document.createElement("span");h.className="stale-page-words";let d=document.createTextNode(l.cure);if(s==="argus-older"){const p=document.createElement("button");p.type="button",p.className="stale-page-reload",p.textContent=l.cure,p.title="reload this tab to load the new ARGUS",p.addEventListener("click",()=>{window.location.reload()}),d=p}else if(r!==void 0){const p=document.createElement("button");p.type="button",p.className="stale-page-reload build-mismatch-restart",p.textContent=l.cure,p.title="restart the calypso daemon (asks first; you stay logged in)",p.addEventListener("click",r),d=p}h.append(document.createTextNode(l.before),d,document.createTextNode(l.after));const u=document.createElement("button");u.type="button",u.className="build-mismatch-dismiss",u.textContent="×",u.title="dismiss (the status strip keeps saying it)",u.addEventListener("click",()=>{c.remove()}),c.append(h,u),n.appendChild(c),s==="daemon-older"&&OP().then(p=>{if(p===null||!c.isConnected)return;const f=document.createElement("span");f.className="build-mismatch-news",f.textContent=EP(p),h.appendChild(f)})}function DP(s,e,t,i=document.body){const n={git:"
|
|
4300
|
+
`)}catch(u){return u instanceof Error?u.message:String(u)}},desktop_serialize:h}}function xP(s,e,t){if(t===!0)return"daemon-older";if(e===void 0)return null;const i=e.surface;return t===!1?i!==void 0&&s.built<i.built?"argus-older":null:i===void 0?"daemon-older":i.git===s.git&&i.built===s.built?null:s.built>=i.built?"daemon-older":"argus-older"}const Fm={"daemon-older":{readout:"CALYPSO DAEMON OUT OF DATE",before:"The calypso daemon has been updated and should be restarted; some controls may not work until then. ",cure:"Restart the calypso daemon",after:"."},"argus-older":{readout:"ARGUS OUT OF DATE",before:"ARGUS is older than the calypso daemon. ",cure:"Refresh",after:" to load the new ARGUS."}};function fy(s){const e=Fm[s];return`${e.before}${e.cure}${e.after}`}async function OP(s){try{const e=s??(typeof globalThis.fetch=="function"?globalThis.fetch.bind(globalThis):void 0);if(e===void 0)return null;const t=await e("notes.json",{cache:"no-store"});if(!t.ok)return null;const i=await t.json(),r=i.releases?.[0]?.changes?.find(o=>o.internal!==!0)?.headline;return typeof r!="string"||typeof i.version!="string"?null:{version:i.version,headline:r}}catch{return null}}const bM=96;function EP(s){const e=s.headline.length>bM?`${s.headline.slice(0,bM-1).trimEnd()}…`:s.headline;return`argus ${s.version} · ${e} — WHAT'S NEW after restart`}function AP(s,e,t,i,n=document.body,r){n.querySelector(".build-mismatch")?.remove();const o=t.surface!==void 0?`ARGUS ${t.surface.git} built ${t.surface.built}Z`:"an ARGUS too old to say its build";i(`argus: ${fy(s)}`);const a=t.surface!==void 0&&t.surface.git===e.git&&t.surface.built===e.built;i(a?`argus: the calypso daemon's own code on disk has changed since it started (ARGUS ${e.git} built ${e.built}Z)`:`argus: ARGUS ${e.git} built ${e.built}Z · calypso daemon started with ${o}`);const l=Fm[s],c=document.createElement("div");c.className="stale-page build-mismatch",c.dataset.mismatch=s,c.setAttribute("role","alert");const h=document.createElement("span");h.className="stale-page-words";let d=document.createTextNode(l.cure);if(s==="argus-older"){const p=document.createElement("button");p.type="button",p.className="stale-page-reload",p.textContent=l.cure,p.title="reload this tab to load the new ARGUS",p.addEventListener("click",()=>{window.location.reload()}),d=p}else if(r!==void 0){const p=document.createElement("button");p.type="button",p.className="stale-page-reload build-mismatch-restart",p.textContent=l.cure,p.title="restart the calypso daemon (asks first; you stay logged in)",p.addEventListener("click",r),d=p}h.append(document.createTextNode(l.before),d,document.createTextNode(l.after));const u=document.createElement("button");u.type="button",u.className="build-mismatch-dismiss",u.textContent="×",u.title="dismiss (the status strip keeps saying it)",u.addEventListener("click",()=>{c.remove()}),c.append(h,u),n.appendChild(c),s==="daemon-older"&&OP().then(p=>{if(p===null||!c.isConnected)return;const f=document.createElement("span");f.className="build-mismatch-news",f.textContent=EP(p),h.appendChild(f)})}function DP(s,e,t,i=document.body){const n={git:"86ecd214",built:"2026-10-17 02:25"};let r=[],o,a=null;const l=h=>{r!==null?r.push(h):e(h)},c=h=>{if(o===void 0)return;const d=xP(n,o,h);if(d!==a){if(a=d,d===null){s.build_show(null),i.querySelector(".build-mismatch")?.remove();return}s.build_show(Fm[d].readout,fy(d)),AP(d,n,o,l,i,Eh(window.location.search)?t:void 0)}};return{attach_take:h=>{o=h.stack,c(h.stale)},stale_take:h=>c(h),release:()=>{const h=r??[];r=null;for(const d of h)e(d)}}}function TP(s=document.getElementById("door-pill")){s===null||!Eh(window.location.search)||(s.hidden=!1,s.addEventListener("click",()=>{const e=Lc(window.location.pathname,"logout"),t=Lc(window.location.pathname,"login");fetch(e,{method:"POST",headers:{accept:"application/json"}}).catch(()=>{}).then(()=>{window.location.assign(t)})}))}const IP="Restart the calypso daemon? You'll stay logged in; the page reloads when the new daemon is up.";function CP(s){const e=[];s.running!==null&&e.push(`the running command: ${s.running}`);for(const r of s.unsaved)e.push(`an unsaved edit in ${r}`);const t=s.others.filter(r=>r.kind==="browser").length,i=s.others.length-t,n=[];return t>0&&n.push(t===1?"1 other browser":`${t} other browsers`),i>0&&n.push(i===1?"1 chell":`${i} chells`),n.length>0&&e.push(`${n.join(" and ")}, which will be disconnected`),e}function RP(s){return s==="restart"?"The calypso daemon is restarting (asked from another browser or surface). Following it…":s==="end"?"The calypso daemon was ended by an administrator.":"The calypso daemon stopped."}function BP(s,e){const t=document.createElement("div");t.className="stale-page restart-question",t.setAttribute("role","alertdialog");const i=document.createElement("div");i.className="stale-page-words";const n=document.createElement("div");if(n.textContent=IP,i.append(n),s.length>0){const h=document.createElement("ul");h.className="restart-cuts";const d=document.createElement("li");d.className="restart-cuts-lead",d.textContent="This will cut off:",h.append(d);for(const u of s){const p=document.createElement("li");p.textContent=u,h.append(p)}i.append(h)}const r=document.createElement("button");r.type="button",r.className="restart-yes",r.textContent="YES";const o=document.createElement("button");o.type="button",o.className="restart-no",o.textContent="NO";let a=!1;const l=h=>{a||(a=!0,t.remove(),e(h))};r.addEventListener("click",()=>l(!0)),o.addEventListener("click",()=>l(!1)),t.addEventListener("keydown",h=>{h.key!=="Enter"&&h.key!=="Escape"||(h.preventDefault(),h.stopPropagation(),l(h.key==="Enter"))});const c=document.createElement("div");return c.className="restart-answers",c.append(r,o),t.append(i,c),t}function GP(s,e=document.body){const t=Eh(window.location.search);let i=null,n=null,r=[],o=!1;const a=u=>{e.querySelector(".restart-said")?.remove();const p=document.createElement("div");p.className="stale-page restart-said",p.setAttribute("role","alert"),p.textContent=u,e.appendChild(p)},l=u=>{window.location.assign(`${Lc(window.location.pathname,"greet")}/${encodeURIComponent(u)}`)},c=async()=>{o=!0,a("Restarting the calypso daemon…");try{const u=await fetch(Lc(window.location.pathname,"restart"),{method:"POST",headers:{accept:"application/json"}}),p=await u.json();if(!u.ok||p.key===void 0)throw new Error(p.error??`the door answered ${u.status}`);l(p.key)}catch(u){o=!1,a(`The calypso daemon could not be restarted: ${u instanceof Error?u.message:String(u)}`)}},h=()=>{if(!t||e.querySelector(".restart-question")!==null)return;const u={running:n,unsaved:s.unsaved(),others:r.filter(f=>f.id!==i)},p=BP(CP(u),f=>{f&&c()});e.querySelector(".build-mismatch")?.remove(),e.appendChild(p),p.querySelector(".restart-yes")?.focus()},d=document.getElementById("restart-pill");return d!==null&&t&&(d.hidden=!1,d.addEventListener("click",h)),{ask:h,attach_take:u=>{i=u.surface??null},telemetry_take:u=>{u?.lane!==void 0&&(n=u.lane.running?.line??null),u?.surfaces!==void 0&&(r=u.surfaces)},closing_take:u=>{if(o||(a(RP(u)),u!=="restart"||!t))return;const p=window.location.pathname.split("/").filter(f=>f.length>0).at(-1);p!==void 0&&setTimeout(()=>l(p),1200)}}}function NP(s,e,t,i){s.line_execute(`motd ${t}`,{silent:!0,observe:!1}).then(n=>{const r=n.envelopes.filter(o=>o.status==="ok").map(o=>o.rendered).join("").trimEnd();r.length>0&&e.greeting_write(r.split(`
|
|
4301
4301
|
`))}).catch(()=>{}).finally(i)}var py=Object.defineProperty,kP=Object.getOwnPropertyDescriptor,PP=(s,e)=>{for(var t in e)py(s,t,{get:e[t],enumerable:!0})},Jt=(s,e,t,i)=>{for(var n=i>1?void 0:i?kP(e,t):e,r=s.length-1,o;r>=0;r--)(o=s[r])&&(n=(i?o(e,t,n):o(n))||n);return i&&n&&py(e,t,n),n},Re=(s,e)=>(t,i)=>e(t,i,s),MM="Terminal input",tp={get:()=>MM,set:s=>MM=s},vM="Too much output to announce, navigate to rows manually to read",sp={get:()=>vM,set:s=>vM=s};function LP(s){return s.replace(/\r?\n/g,"\r")}function WP(s,e){return e?"\x1B[200~"+s+"\x1B[201~":s}function FP(s,e){s.clipboardData&&s.clipboardData.setData("text/plain",e.selectionText),s.preventDefault()}function UP(s,e,t,i){if(s.stopPropagation(),s.clipboardData){let n=s.clipboardData.getData("text/plain");my(n,e,t,i)}}function my(s,e,t,i){s=LP(s),s=WP(s,t.decPrivateModes.bracketedPasteMode&&i.rawOptions.ignoreBracketedPasteMode!==!0),t.triggerDataEvent(s,!0),e.value=""}function gy(s,e,t){let i=t.getBoundingClientRect(),n=s.clientX-i.left-10,r=s.clientY-i.top-10;e.style.width="20px",e.style.height="20px",e.style.left=`${n}px`,e.style.top=`${r}px`,e.style.zIndex="1000",e.focus()}function wM(s,e,t,i,n){gy(s,e,t),n&&i.rightClickSelect(s),e.value=i.selectionText,e.select()}function qn(s){return s>65535?(s-=65536,String.fromCharCode((s>>10)+55296)+String.fromCharCode(s%1024+56320)):String.fromCharCode(s)}function jh(s,e=0,t=s.length){let i="";for(let n=e;n<t;++n){let r=s[n];r>65535?(r-=65536,i+=String.fromCharCode((r>>10)+55296)+String.fromCharCode(r%1024+56320)):i+=String.fromCharCode(r)}return i}var $P=class{constructor(){this._interim=0}clear(){this._interim=0}decode(s,e){let t=s.length;if(!t)return 0;let i=0,n=0;if(this._interim){let r=s.charCodeAt(n++);56320<=r&&r<=57343?e[i++]=(this._interim-55296)*1024+r-56320+65536:(e[i++]=this._interim,e[i++]=r),this._interim=0}for(let r=n;r<t;++r){let o=s.charCodeAt(r);if(55296<=o&&o<=56319){if(++r>=t)return this._interim=o,i;let a=s.charCodeAt(r);56320<=a&&a<=57343?e[i++]=(o-55296)*1024+a-56320+65536:(e[i++]=o,e[i++]=a);continue}o!==65279&&(e[i++]=o)}return i}},jP=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(s,e){let t=s.length;if(!t)return 0;let i=0,n,r,o,a,l=0,c=0;if(this.interim[0]){let u=!1,p=this.interim[0];p&=(p&224)===192?31:(p&240)===224?15:7;let f=0,_;for(;(_=this.interim[++f]&63)&&f<4;)p<<=6,p|=_;let g=(this.interim[0]&224)===192?2:(this.interim[0]&240)===224?3:4,m=g-f;for(;c<m;){if(c>=t)return 0;if(_=s[c++],(_&192)!==128){c--,u=!0;break}else this.interim[f++]=_,p<<=6,p|=_&63}u||(g===2?p<128?c--:e[i++]=p:g===3?p<2048||p>=55296&&p<=57343||p===65279||(e[i++]=p):p<65536||p>1114111||(e[i++]=p)),this.interim.fill(0)}let h=t-4,d=c;for(;d<t;){for(;d<h&&!((n=s[d])&128)&&!((r=s[d+1])&128)&&!((o=s[d+2])&128)&&!((a=s[d+3])&128);)e[i++]=n,e[i++]=r,e[i++]=o,e[i++]=a,d+=4;if(n=s[d++],n<128)e[i++]=n;else if((n&224)===192){if(d>=t)return this.interim[0]=n,i;if(r=s[d++],(r&192)!==128){d--;continue}if(l=(n&31)<<6|r&63,l<128){d--;continue}e[i++]=l}else if((n&240)===224){if(d>=t)return this.interim[0]=n,i;if(r=s[d++],(r&192)!==128){d--;continue}if(d>=t)return this.interim[0]=n,this.interim[1]=r,i;if(o=s[d++],(o&192)!==128){d--;continue}if(l=(n&15)<<12|(r&63)<<6|o&63,l<2048||l>=55296&&l<=57343||l===65279)continue;e[i++]=l}else if((n&248)===240){if(d>=t)return this.interim[0]=n,i;if(r=s[d++],(r&192)!==128){d--;continue}if(d>=t)return this.interim[0]=n,this.interim[1]=r,i;if(o=s[d++],(o&192)!==128){d--;continue}if(d>=t)return this.interim[0]=n,this.interim[1]=r,this.interim[2]=o,i;if(a=s[d++],(a&192)!==128){d--;continue}if(l=(n&7)<<18|(r&63)<<12|(o&63)<<6|a&63,l<65536||l>1114111)continue;e[i++]=l}}return i}},_y="",Zn=" ",fl=class by{constructor(){this.fg=0,this.bg=0,this.extended=new _h}static toColorRGB(e){return[e>>>16&255,e>>>8&255,e&255]}static fromColorRGB(e){return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255}clone(){let e=new by;return e.fg=this.fg,e.bg=this.bg,e.extended=this.extended.clone(),e}isInverse(){return this.fg&67108864}isBold(){return this.fg&134217728}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:this.fg&268435456}isBlink(){return this.fg&536870912}isInvisible(){return this.fg&1073741824}isItalic(){return this.bg&67108864}isDim(){return this.bg&134217728}isStrikethrough(){return this.fg&2147483648}isProtected(){return this.bg&536870912}isOverline(){return this.bg&1073741824}getFgColorMode(){return this.fg&50331648}getBgColorMode(){return this.bg&50331648}isFgRGB(){return(this.fg&50331648)===50331648}isBgRGB(){return(this.bg&50331648)===50331648}isFgPalette(){return(this.fg&50331648)===16777216||(this.fg&50331648)===33554432}isBgPalette(){return(this.bg&50331648)===16777216||(this.bg&50331648)===33554432}isFgDefault(){return(this.fg&50331648)===0}isBgDefault(){return(this.bg&50331648)===0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(this.fg&50331648){case 16777216:case 33554432:return this.fg&255;case 50331648:return this.fg&16777215;default:return-1}}getBgColor(){switch(this.bg&50331648){case 16777216:case 33554432:return this.bg&255;case 50331648:return this.bg&16777215;default:return-1}}hasExtendedAttrs(){return this.bg&268435456}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(this.bg&268435456&&~this.extended.underlineColor)switch(this.extended.underlineColor&50331648){case 16777216:case 33554432:return this.extended.underlineColor&255;case 50331648:return this.extended.underlineColor&16777215;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return this.bg&268435456&&~this.extended.underlineColor?this.extended.underlineColor&50331648:this.getFgColorMode()}isUnderlineColorRGB(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===50331648:this.isFgRGB()}isUnderlineColorPalette(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===16777216||(this.extended.underlineColor&50331648)===33554432:this.isFgPalette()}isUnderlineColorDefault(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===0:this.isFgDefault()}getUnderlineStyle(){return this.fg&268435456?this.bg&268435456?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}},_h=class My{constructor(e=0,t=0){this._ext=0,this._urlId=0,this._ext=e,this._urlId=t}get ext(){return this._urlId?this._ext&-469762049|this.underlineStyle<<26:this._ext}set ext(e){this._ext=e}get underlineStyle(){return this._urlId?5:(this._ext&469762048)>>26}set underlineStyle(e){this._ext&=-469762049,this._ext|=e<<26&469762048}get underlineColor(){return this._ext&67108863}set underlineColor(e){this._ext&=-67108864,this._ext|=e&67108863}get urlId(){return this._urlId}set urlId(e){this._urlId=e}get underlineVariantOffset(){let e=(this._ext&3758096384)>>29;return e<0?e^4294967288:e}set underlineVariantOffset(e){this._ext&=536870911,this._ext|=e<<29&3758096384}clone(){return new My(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}},Mi=class vy extends fl{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new _h,this.combinedData=""}static fromCharData(e){let t=new vy;return t.setFromCharData(e),t}isCombined(){return this.content&2097152}getWidth(){return this.content>>22}getChars(){return this.content&2097152?this.combinedData:this.content&2097151?qn(this.content&2097151):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):this.content&2097151}setFromCharData(e){this.fg=e[0],this.bg=0;let t=!1;if(e[1].length>2)t=!0;else if(e[1].length===2){let i=e[1].charCodeAt(0);if(55296<=i&&i<=56319){let n=e[1].charCodeAt(1);56320<=n&&n<=57343?this.content=(i-55296)*1024+n-56320+65536|e[2]<<22:t=!0}else t=!0}else this.content=e[1].charCodeAt(0)|e[2]<<22;t&&(this.combinedData=e[1],this.content=2097152|e[2]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},yM="di$target",ip="di$dependencies",au=new Map;function HP(s){return s[ip]||[]}function ys(s){if(au.has(s))return au.get(s);let e=function(t,i,n){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");VP(e,t,n)};return e._id=s,au.set(s,e),e}function VP(s,e,t){e[yM]===e?e[ip].push({id:s,index:t}):(e[ip]=[{id:s,index:t}],e[yM]=e)}var $s=ys("BufferService"),wy=ys("CoreMouseService"),no=ys("CoreService"),qP=ys("CharsetService"),Um=ys("InstantiationService"),yy=ys("LogService"),js=ys("OptionsService"),zy=ys("OscLinkService"),KP=ys("UnicodeService"),pl=ys("DecorationService"),np=class{constructor(s,e,t){this._bufferService=s,this._optionsService=e,this._oscLinkService=t}provideLinks(s,e){let t=this._bufferService.buffer.lines.get(s-1);if(!t){e(void 0);return}let i=[],n=this._optionsService.rawOptions.linkHandler,r=new Mi,o=t.getTrimmedLength(),a=-1,l=-1,c=!1;for(let h=0;h<o;h++)if(!(l===-1&&!t.hasContent(h))){if(t.loadCell(h,r),r.hasExtendedAttrs()&&r.extended.urlId)if(l===-1){l=h,a=r.extended.urlId;continue}else c=r.extended.urlId!==a;else l!==-1&&(c=!0);if(c||l!==-1&&h===o-1){let d=this._oscLinkService.getLinkData(a)?.uri;if(d){let u={start:{x:l+1,y:s},end:{x:h+(!c&&h===o-1?1:0),y:s}},p=!1;if(!n?.allowNonHttpProtocols)try{let f=new URL(d);["http:","https:"].includes(f.protocol)||(p=!0)}catch{p=!0}p||i.push({text:d,range:u,activate:(f,_)=>n?n.activate(f,_,u):YP(f,_),hover:(f,_)=>n?.hover?.(f,_,u),leave:(f,_)=>n?.leave?.(f,_,u)})}c=!1,r.hasExtendedAttrs()&&r.extended.urlId?(l=h,a=r.extended.urlId):(l=-1,a=-1)}}e(i)}};np=Jt([Re(0,$s),Re(1,js),Re(2,zy)],np);function YP(s,e){if(confirm(`Do you want to navigate to ${e}?
|
|
4302
4302
|
|
|
4303
4303
|
WARNING: This link could potentially be dangerous`)){let t=window.open();if(t){try{t.opener=null}catch{}t.location.href=e}else console.warn("Opening link blocked as opener could not be cleared")}}var Hh=ys("CharSizeService"),Tn=ys("CoreBrowserService"),$m=ys("MouseService"),In=ys("RenderService"),XP=ys("SelectionService"),Sy=ys("CharacterJoinerService"),ra=ys("ThemeService"),xy=ys("LinkProviderService"),ZP=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(s){setTimeout(()=>{throw s.stack?zM.isErrorNoTelemetry(s)?new zM(s.message+`
|
|
@@ -4321,7 +4321,7 @@ WARNING: This link could potentially be dangerous`)){let t=window.open();if(t){t
|
|
|
4321
4321
|
`).slice(2).join(`
|
|
4322
4322
|
`))}},uW=class extends Error{constructor(s,e){super(s),this.name="ListenerLeakError",this.stack=e}},fW=class extends Error{constructor(s,e){super(s),this.name="ListenerRefusalError",this.stack=e}},pW=0,yu=class{constructor(s){this.value=s,this.id=pW++}},mW=2,gW,$n=class{constructor(s){this._size=0,this._options=s,this._leakageMon=this._options?.leakWarningThreshold?new hW(s?.onListenerError??wu,this._options?.leakWarningThreshold??cW):void 0,this._perfMon=this._options?._profName?new lW(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){this._disposed||(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose())}get event(){return this._event??=(s,e,t)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let o=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(o);let a=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],l=new fW(`${o}. HINT: Stack shows most frequent listener (${a[1]}-times)`,a[0]);return(this._options?.onListenerError||wu)(l),zh.None}if(this._disposed)return zh.None;e&&(s=s.bind(e));let i=new yu(s),n;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(i.stack=dW.create(),n=this._leakageMon.check(i.stack,this._size+1)),this._listeners?this._listeners instanceof yu?(this._deliveryQueue??=new _W,this._listeners=[this._listeners,i]):this._listeners.push(i):(this._options?.onWillAddFirstListener?.(this),this._listeners=i,this._options?.onDidAddFirstListener?.(this)),this._size++;let r=oz(()=>{n?.(),this._removeListener(i)});return t instanceof Jm?t.add(r):Array.isArray(t)&&t.push(r),r},this._event}_removeListener(s){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let e=this._listeners,t=e.indexOf(s);if(t===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,e[t]=void 0;let i=this._deliveryQueue.current===this;if(this._size*mW<=e.length){let n=0;for(let r=0;r<e.length;r++)e[r]?e[n++]=e[r]:i&&(this._deliveryQueue.end--,n<this._deliveryQueue.i&&this._deliveryQueue.i--);e.length=n}}_deliver(s,e){if(!s)return;let t=this._options?.onListenerError||wu;if(!t){s.value(e);return}try{s.value(e)}catch(i){t(i)}}_deliverQueue(s){let e=s.current._listeners;for(;s.i<s.end;)this._deliver(e[s.i++],s.value);s.reset()}fire(s){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof yu)this._deliver(this._listeners,s);else{let e=this._deliveryQueue;e.enqueue(this,s,this._listeners.length),this._deliverQueue(e)}this._perfMon?.stop()}hasListeners(){return this._size>0}},_W=class{constructor(){this.i=-1,this.end=0}enqueue(s,e,t){this.i=0,this.end=t,this.current=s,this.value=e}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},Sh=class kc{constructor(){this._providers=Object.create(null),this._active="",this._onChange=new $n,this.onChange=this._onChange.event;let e=new Z4;this.register(e),this._active=e.version,this._activeProvider=e}static extractShouldJoin(e){return(e&1)!==0}static extractWidth(e){return e>>1&3}static extractCharKind(e){return e>>3}static createPropertyValue(e,t,i=!1){return(e&16777215)<<3|(t&3)<<1|(i?1:0)}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(e){if(!this._providers[e])throw new Error(`unknown Unicode version "${e}"`);this._active=e,this._activeProvider=this._providers[e],this._onChange.fire(e)}register(e){this._providers[e.version]=e}wcwidth(e){return this._activeProvider.wcwidth(e)}getStringCellWidth(e){let t=0,i=0,n=e.length;for(let r=0;r<n;++r){let o=e.charCodeAt(r);if(55296<=o&&o<=56319){if(++r>=n)return t+this.wcwidth(o);let c=e.charCodeAt(r);56320<=c&&c<=57343?o=(o-55296)*1024+c-56320+65536:t+=this.wcwidth(c)}let a=this.charProperties(o,i),l=kc.extractWidth(a);kc.extractShouldJoin(a)&&(l-=kc.extractWidth(i)),t+=l,i=a}return t}charProperties(e,t){return this._activeProvider.charProperties(e,t)}},zu=[[768,879],[1155,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1541],[1552,1562],[1564,1564],[1611,1631],[1648,1648],[1750,1757],[1759,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2045,2045],[2070,2073],[2075,2083],[2085,2087],[2089,2093],[2137,2139],[2259,2306],[2362,2362],[2364,2364],[2369,2376],[2381,2381],[2385,2391],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2558,2558],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2641,2641],[2672,2673],[2677,2677],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2810,2815],[2817,2817],[2876,2876],[2879,2879],[2881,2884],[2893,2893],[2902,2902],[2914,2915],[2946,2946],[3008,3008],[3021,3021],[3072,3072],[3076,3076],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3170,3171],[3201,3201],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3328,3329],[3387,3388],[3393,3396],[3405,3405],[3426,3427],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3981,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4151],[4153,4154],[4157,4158],[4184,4185],[4190,4192],[4209,4212],[4226,4226],[4229,4230],[4237,4237],[4253,4253],[4448,4607],[4957,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6158],[6277,6278],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6683,6683],[6742,6742],[6744,6750],[6752,6752],[6754,6754],[6757,6764],[6771,6780],[6783,6783],[6832,6846],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7040,7041],[7074,7077],[7080,7081],[7083,7085],[7142,7142],[7144,7145],[7149,7149],[7151,7153],[7212,7219],[7222,7223],[7376,7378],[7380,7392],[7394,7400],[7405,7405],[7412,7412],[7416,7417],[7616,7673],[7675,7679],[8203,8207],[8234,8238],[8288,8292],[8294,8303],[8400,8432],[11503,11505],[11647,11647],[11744,11775],[12330,12333],[12441,12442],[42607,42610],[42612,42621],[42654,42655],[42736,42737],[43010,43010],[43014,43014],[43019,43019],[43045,43046],[43204,43205],[43232,43249],[43263,43263],[43302,43309],[43335,43345],[43392,43394],[43443,43443],[43446,43449],[43452,43453],[43493,43493],[43561,43566],[43569,43570],[43573,43574],[43587,43587],[43596,43596],[43644,43644],[43696,43696],[43698,43700],[43703,43704],[43710,43711],[43713,43713],[43756,43757],[43766,43766],[44005,44005],[44008,44008],[44013,44013],[64286,64286],[65024,65039],[65056,65071],[65279,65279],[65529,65531]],bW=[[66045,66045],[66272,66272],[66422,66426],[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[68325,68326],[68900,68903],[69446,69456],[69633,69633],[69688,69702],[69759,69761],[69811,69814],[69817,69818],[69821,69821],[69837,69837],[69888,69890],[69927,69931],[69933,69940],[70003,70003],[70016,70017],[70070,70078],[70089,70092],[70191,70193],[70196,70196],[70198,70199],[70206,70206],[70367,70367],[70371,70378],[70400,70401],[70459,70460],[70464,70464],[70502,70508],[70512,70516],[70712,70719],[70722,70724],[70726,70726],[70750,70750],[70835,70840],[70842,70842],[70847,70848],[70850,70851],[71090,71093],[71100,71101],[71103,71104],[71132,71133],[71219,71226],[71229,71229],[71231,71232],[71339,71339],[71341,71341],[71344,71349],[71351,71351],[71453,71455],[71458,71461],[71463,71467],[71727,71735],[71737,71738],[72148,72151],[72154,72155],[72160,72160],[72193,72202],[72243,72248],[72251,72254],[72263,72263],[72273,72278],[72281,72283],[72330,72342],[72344,72345],[72752,72758],[72760,72765],[72767,72767],[72850,72871],[72874,72880],[72882,72883],[72885,72886],[73009,73014],[73018,73018],[73020,73021],[73023,73029],[73031,73031],[73104,73105],[73109,73109],[73111,73111],[73459,73460],[78896,78904],[92912,92916],[92976,92982],[94031,94031],[94095,94098],[113821,113822],[113824,113827],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[121344,121398],[121403,121452],[121461,121461],[121476,121476],[121499,121503],[121505,121519],[122880,122886],[122888,122904],[122907,122913],[122915,122916],[122918,122922],[123184,123190],[123628,123631],[125136,125142],[125252,125258],[917505,917505],[917536,917631],[917760,917999]],Su=[[4352,4447],[8986,8987],[9001,9002],[9193,9196],[9200,9200],[9203,9203],[9725,9726],[9748,9749],[9800,9811],[9855,9855],[9875,9875],[9889,9889],[9898,9899],[9917,9918],[9924,9925],[9934,9934],[9940,9940],[9962,9962],[9970,9971],[9973,9973],[9978,9978],[9981,9981],[9989,9989],[9994,9995],[10024,10024],[10060,10060],[10062,10062],[10067,10069],[10071,10071],[10133,10135],[10160,10160],[10175,10175],[11035,11036],[11088,11088],[11093,11093],[11904,11929],[11931,12019],[12032,12245],[12272,12283],[12288,12329],[12334,12350],[12353,12438],[12443,12543],[12549,12591],[12593,12686],[12688,12730],[12736,12771],[12784,12830],[12832,12871],[12880,19903],[19968,42124],[42128,42182],[43360,43388],[44032,55203],[63744,64255],[65040,65049],[65072,65106],[65108,65126],[65128,65131],[65281,65376],[65504,65510]],MW=[[94176,94179],[94208,100343],[100352,101106],[110592,110878],[110928,110930],[110948,110951],[110960,111355],[126980,126980],[127183,127183],[127374,127374],[127377,127386],[127488,127490],[127504,127547],[127552,127560],[127568,127569],[127584,127589],[127744,127776],[127789,127797],[127799,127868],[127870,127891],[127904,127946],[127951,127955],[127968,127984],[127988,127988],[127992,128062],[128064,128064],[128066,128252],[128255,128317],[128331,128334],[128336,128359],[128378,128378],[128405,128406],[128420,128420],[128507,128591],[128640,128709],[128716,128716],[128720,128722],[128725,128725],[128747,128748],[128756,128762],[128992,129003],[129293,129393],[129395,129398],[129402,129442],[129445,129450],[129454,129482],[129485,129535],[129648,129651],[129656,129658],[129664,129666],[129680,129685],[131072,196605],[196608,262141]],dn;function p0(s,e){let t=0,i=e.length-1,n;if(s<e[0][0]||s>e[i][1])return!1;for(;i>=t;)if(n=t+i>>1,s>e[n][1])t=n+1;else if(s<e[n][0])i=n-1;else return!0;return!1}var vW=class{constructor(){if(this.version="11",!dn){dn=new Uint8Array(65536),dn.fill(1),dn[0]=0,dn.fill(0,1,32),dn.fill(0,127,160);for(let s=0;s<zu.length;++s)dn.fill(0,zu[s][0],zu[s][1]+1);for(let s=0;s<Su.length;++s)dn.fill(2,Su[s][0],Su[s][1]+1)}}wcwidth(s){return s<32?0:s<127?1:s<65536?dn[s]:p0(s,bW)?0:p0(s,MW)?2:1}charProperties(s,e){let t=this.wcwidth(s),i=t===0&&e!==0;if(i){let n=Sh.extractWidth(e);n===0?i=!1:n>t&&(t=n)}return Sh.createPropertyValue(0,t,i)}},wW=class{activate(s){s.unicode.register(new vW)}dispose(){}};var yW=class{constructor(s,e,t,i={}){this._terminal=s,this._regex=e,this._handler=t,this._options=i}provideLinks(s,e){let t=SW.computeLink(s,this._regex,this._terminal,this._handler);e(this._addCallbacks(t))}_addCallbacks(s){return s.map(e=>(e.leave=this._options.leave,e.hover=(t,i)=>{if(this._options.hover){let{range:n}=e;this._options.hover(t,i,n)}},e))}};function zW(s){try{let e=new URL(s),t=e.password&&e.username?`${e.protocol}//${e.username}:${e.password}@${e.host}`:e.username?`${e.protocol}//${e.username}@${e.host}`:`${e.protocol}//${e.host}`;return s.toLocaleLowerCase().startsWith(t.toLocaleLowerCase())}catch{return!1}}var SW=class Pc{static computeLink(e,t,i,n){let r=new RegExp(t.source,(t.flags||"")+"g"),[o,a]=Pc._getWindowedLineStrings(e-1,i),l=o.join(""),c,h=[];for(;c=r.exec(l);){let d=c[0];if(!zW(d))continue;let[u,p]=Pc._mapStrIdx(i,a,0,c.index),[f,_]=Pc._mapStrIdx(i,u,p,d.length);if(u===-1||p===-1||f===-1||_===-1)continue;let g={start:{x:p+1,y:u+1},end:{x:_,y:f+1}};h.push({range:g,text:d,activate:n})}return h}static _getWindowedLineStrings(e,t){let i,n=e,r=e,o=0,a="",l=[];if(i=t.buffer.active.getLine(e)){let c=i.translateToString(!0);if(i.isWrapped&&c[0]!==" "){for(o=0;(i=t.buffer.active.getLine(--n))&&o<2048&&(a=i.translateToString(!0),o+=a.length,l.push(a),!(!i.isWrapped||a.indexOf(" ")!==-1)););l.reverse()}for(l.push(c),o=0;(i=t.buffer.active.getLine(++r))&&i.isWrapped&&o<2048&&(a=i.translateToString(!0),o+=a.length,l.push(a),a.indexOf(" ")===-1););}return[l,n]}static _mapStrIdx(e,t,i,n){let r=e.buffer.active,o=r.getNullCell(),a=i;for(;n;){let l=r.getLine(t);if(!l)return[-1,-1];for(let c=a;c<l.length;++c){l.getCell(c,o);let h=o.getChars();if(o.getWidth()&&(n-=h.length||1,c===l.length-1&&h==="")){let d=r.getLine(t+1);d&&d.isWrapped&&(d.getCell(0,o),o.getWidth()===2&&(n+=1))}if(n<0)return[t,c]}t++,a=0}return[t,a]}},xW=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function OW(s,e){let t=window.open();if(t){try{t.opener=null}catch{}t.location.href=e}else console.warn("Opening link blocked as opener could not be cleared")}var EW=class{constructor(s=OW,e={}){this._handler=s,this._options=e}activate(s){this._terminal=s;let e=this._options,t=e.urlRegex||xW;this._linkProvider=this._terminal.registerLinkProvider(new yW(this._terminal,t,this._handler,e))}dispose(){this._linkProvider?.dispose()}};const AW=6677;function DW(s){const e=/^state=(idle|busy|asking)$/.exec(s.trim());return e===null?null:e[1]}const Up="argus.terminalId",TW="'JetBrainsMono NF Mono', 'MesloLGS NF', monospace",IW=[{label:"ESC",data:"\x1B"},{label:"TAB",data:" "},{label:"CTRL",data:"ctrl"},{label:"←",data:"\x1B[D"},{label:"↑",data:"\x1B[A"},{label:"↓",data:"\x1B[B"},{label:"→",data:"\x1B[C"}];function CW(s){const[e,t,i,n,r,o,a,l,c,h,d,u,p,f,_,g]=Px;return{background:"#000000",foreground:s,cursor:s,cursorAccent:"#000000",selectionBackground:"#44556680",black:e,red:t,green:i,yellow:n,blue:r,magenta:o,cyan:a,white:l,brightBlack:c,brightRed:h,brightGreen:d,brightYellow:u,brightBlue:p,brightMagenta:f,brightCyan:_,brightWhite:g}}function RW(s){if(s.length!==1)return s;const e=s.toUpperCase().charCodeAt(0);return e>=64&&e<=95?String.fromCharCode(e-64):s}function BW(){try{return sessionStorage.getItem(Up)??void 0}catch{return}}function m0(s){try{s===null?sessionStorage.removeItem(Up):sessionStorage.setItem(Up,s)}catch{}}class GW{constructor(e,t,i,n=()=>{}){this.mount=e,this.wire=t,this.refused=i,this.state=n;const r=getComputedStyle(e).color||"#ffaa44";this.term=new H4({fontFamily:TW,fontSize:Math.max(10,Math.round(parseFloat(getComputedStyle(e).fontSize)||13)),theme:CW(r),cursorBlink:!0,scrollback:5e3,allowProposedApi:!0}),this.term.loadAddon(this.fit),this.term.loadAddon(new EW),this.term.loadAddon(new wW),this.term.unicode.activeVersion="11";const o=document.createElement("div");o.className="argus-xterm",e.appendChild(o),this.term.open(o),this.keyRow_build(),this.term.onData(a=>this.keys_send(a)),this.term.onLineFeed(()=>{this.feeds++}),this.term.parser.registerOscHandler(AW,a=>{const l=DW(a);return l!==null&&this.state(l),!0}),this.term.onResize(({cols:a,rows:l})=>{this.terminalId!==null&&this.wire.resize(this.terminalId,a,l)}),this.observer=typeof ResizeObserver>"u"?null:new ResizeObserver(()=>this.size_fit()),this.observer?.observe(e),this.size_fit(),this.wire.open(this.term.cols,this.term.rows,BW())}mount;wire;refused;state;term;fit=new K4;terminalId=null;ended=!1;ctrlHeld=!1;resizeFrame=null;feeds=0;observer;size_fit(){this.resizeFrame===null&&(this.resizeFrame=requestAnimationFrame(()=>{if(this.resizeFrame=null,this.mount.offsetParent!==null)try{this.fit.fit()}catch{}}))}terminalId_get(){return this.terminalId}focus(){this.term.focus()}opened(e,t,i){if(i!==void 0){this.refused(i);return}this.terminalId=e,this.ended=!1,m0(e),t!==""&&this.term.write(t),this.wire.resize(e,this.term.cols,this.term.rows)}data(e,t){e===this.terminalId&&this.term.write(t)}exited(e,t){e===this.terminalId&&(this.ended=!0,this.terminalId=null,m0(null),this.term.write(`\r
|
|
4323
4323
|
\x1B[90m[the console's shell exited${t===0?"":` (${t})`}; press a key for a new one]\x1B[0m\r
|
|
4324
|
-
`))}offer(e){this.terminalId!==null&&this.wire.input(this.terminalId,`${e}`),this.focus()}buffer_lines(){const e=this.term.buffer.active,t=[];for(let i=0;i<e.length;i++){const n=e.getLine(i),r=n?.translateToString(!0)??"";n?.isWrapped===!0&&t.length>0?t[t.length-1]+=r:t.push(r)}for(;t.length>0&&t[t.length-1]==="";)t.pop();return t}mark(){return this.feeds}lines_since(e){const t=this.buffer_lines(),i=Math.max(0,this.feeds-e)+1;return t.slice(Math.max(0,t.length-i))}type(e){this.keys_send(e)}dispose(){this.observer?.disconnect(),this.term.dispose()}keys_send(e){if(this.ended){this.ended=!1,this.term.reset(),this.wire.open(this.term.cols,this.term.rows);return}if(this.terminalId===null)return;let t=e;this.ctrlHeld&&(t=RW(e),this.ctrlHeld=!1,this.mount.querySelector(".argus-xterm-key.held")?.classList.remove("held")),this.wire.input(this.terminalId,t)}keyRow_build(){const e=document.createElement("div");e.className="argus-xterm-keys";for(const t of IW){const i=document.createElement("button");i.type="button",i.className="argus-xterm-key",i.textContent=t.label,i.addEventListener("pointerdown",n=>{n.preventDefault(),t.data==="ctrl"?(this.ctrlHeld=!this.ctrlHeld,i.classList.toggle("held",this.ctrlHeld)):this.keys_send(t.data),this.focus()}),e.appendChild(i)}this.mount.appendChild(e)}}const NW="argus.consoleMode",kW="console: the transcript, deprecated: this host offers no pseudo-terminal (node-pty did not build). Install python, make and g++ and reinstall for the terminal console.";function PW(){try{localStorage.removeItem(NW)}catch{}}function LW(s){const{client:e,terminal:t,offered:i}=s,n=document.getElementById("terminal");let r=null,o="transcript";const a=l=>{if(n!==null)if(l==="terminal"&&i){if(r===null){const h=document.createElement("div");h.className="argus-terminal-mount",n.appendChild(h),r=new GW(h,{open:(d,u,p)=>e.terminal_open(d,u,p),input:(d,u)=>e.terminal_input(d,u),resize:(d,u,p)=>e.terminal_resize(d,u,p)},d=>{a("transcript"),t.line_note(`console: ${d}`)},d=>{n.dataset.terminalState=d}),n.dataset.terminalState="busy",s.screen_set(r)}const c=r;n.classList.add("console-terminal"),e.mirror_set(!0),t.delegate_set({note:h=>e.note_send(h),offer:h=>c.offer(h),focus:()=>c.focus(),fit:()=>c.size_fit()}),c.size_fit(),o="terminal"}else n.classList.remove("console-terminal"),e.mirror_set(!1),t.delegate_set(null),o="transcript"};return PW(),a(i?"terminal":"transcript"),i||t.line_note(kW),Object.assign(globalThis,{__argusConsole:{mode:()=>o,state:()=>n?.dataset.terminalState??"busy",type:l=>r?.type(l),lines:()=>r?.buffer_lines()??[],mark:()=>r?.mark()??0,since:l=>r?.lines_since(l)??[]}}),{terminal_is:()=>o==="terminal",question_sheet:async l=>{document.querySelector(".question-sheet")?.remove();const c=document.createElement("div");c.className="share-sheet question-sheet",c.setAttribute("role","dialog");const h=document.createElement("div");h.className="share-head",h.textContent="THE SESSION ASKS",c.appendChild(h),document.body.appendChild(c);try{return await Lm(t,c,l)}finally{c.remove()}}}}let Ar=()=>{};function g0(){Ar(document.body.dataset.zoom==="console"?null:"console")}const WW=Cz(),FW=`data:image/svg+xml,${encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><rect width="64" height="64" fill="#000"/><rect x="6" y="14" width="52" height="36" rx="18" fill="#20bdef"/><rect x="34" y="14" width="24" height="36" fill="#20bdef"/></svg>')}`;function UW(s){for(const e of document.querySelectorAll('link[rel="icon"], link[rel="apple-touch-icon"]'))e.href=s}const $W="ARGUS",_0="argus-audio",jW=.4;let Dr=!1;function _i(s){if(Dr)return;const e=document.getElementById(s);e instanceof HTMLAudioElement&&(e.currentTime=0,e.volume=jW,e.play().catch(()=>{}))}function HW(){const s=tt("head-menu-pill"),e=t=>{t?document.body.dataset.headMenu="open":delete document.body.dataset.headMenu,s.setAttribute("aria-expanded",String(t))};s.addEventListener("click",t=>{t.stopPropagation(),e(document.body.dataset.headMenu!=="open")}),document.addEventListener("click",t=>{if(document.body.dataset.headMenu!=="open")return;t.target instanceof Element&&t.target.closest("#header-dag-info")!==null||e(!1)})}function VW(){const s=tt("audio-pill");try{Dr=window.localStorage.getItem(_0)==="off"}catch{Dr=!1}const e=()=>{s.classList.toggle("audio-off",Dr)};e(),s.addEventListener("click",()=>{Dr=!Dr;try{window.localStorage.setItem(_0,Dr?"off":"on")}catch{}e(),_i("audio2")})}function qW(){return Rz(window.location)}let xu=null,xh=0;function Qm(s,e){const t=()=>{e.dataset.zoom!==void 0||e.dataset.header==="away"||(xh=Math.ceil(s.offsetTop+s.offsetHeight),e.style.setProperty("--zoom-header-height",`${xh}px`))};t(),xu===null&&(xu=new ResizeObserver(t),xu.observe(s))}const b0=120,KW=96;function YW(s,e,t,i){let n="";const r=h=>{h?(n=s.style.height,s.style.height=""):n!==""&&(s.style.height=n),s.classList.toggle("drawer-closed",h),_i("audio3"),h||(i.size_fit(),i.focus_take())};t.addEventListener("click",()=>r(!s.classList.contains("drawer-closed")));let o=0,a=0,l=!1;e.addEventListener("pointerdown",h=>{l=!0,o=h.clientY,a=s.getBoundingClientRect().height,s.classList.add("drawer-dragging"),e.setPointerCapture(h.pointerId),h.preventDefault()}),e.addEventListener("pointermove",h=>{if(!l)return;const d=Math.max(b0,window.innerHeight-KW),u=a+(h.clientY-o),p=Math.min(Math.max(b0,u),d);s.style.height=`${p}px`,i.size_fit()});const c=()=>{l=!1,s.classList.remove("drawer-dragging")};return e.addEventListener("pointerup",c),e.addEventListener("pointercancel",c),r}function XW(s){const e=document.body,t=document.querySelector(".wrap:not(#gap)");let i;const n=r=>{for(const o of document.querySelectorAll(".pane-zoomed, .pane-zoomed-path"))o.classList.remove("pane-zoomed","pane-zoomed-path");if(r===null)delete e.dataset.zoom,i!==void 0&&(e.dataset.header=i,i=void 0);else{window.scrollTo(0,0),e.dataset.header==="away"?(i="away",delete e.dataset.header,xh>0&&e.style.setProperty("--zoom-header-height",`${xh}px`)):t!==null&&Qm(t,e),e.dataset.zoom=r;const a=Dc(r)?.mount?.parentElement??null;a?.classList.add("pane-zoomed");let l=a?.parentElement??null;for(;l!==null&&l.id!=="layout-root";)l.classList.add("pane-zoomed-path"),l=l.parentElement}for(const o of document.querySelectorAll(".drawer-zoom"))o.textContent=r!==null&&o.dataset.pane===r?"RESTORE":"ZOOM";_i("audio3")};return tt("header-restore").addEventListener("click",()=>{e.dataset.zoom!==void 0&&n(null)}),document.addEventListener("click",r=>{const o=r.target;if(!(o instanceof Element))return;const a=o.closest("[data-pane]");if(a===null)return;const l=a.dataset.pane??"";l!==""&&n(e.dataset.zoom===l?null:l)}),window.addEventListener("keydown",r=>{r.key==="Escape"&&e.dataset.zoom!==void 0&&(n(null),r.stopImmediatePropagation())}),tt("drawer").addEventListener("transitionend",r=>{r.propertyName==="height"&&s.size_fit()}),n}function ZW(){const s=new bk(document.getElementById("data-cascade")),e=document.getElementById("header-telemetry");return e!==null&&s.telemetryPanel_bind(e),s}const Ou=96,JW=220,M0="argus.headerBand.height",QW=52;function eF(){const s=document.documentElement,e=document.getElementById("header-strip"),t=document.querySelector(".wrap:not(#gap)");if(e===null||t===null)return;const i=h=>{const d=Math.max(Ou,window.innerHeight-JW),u=Math.min(Math.max(Ou,h),d);s.style.setProperty("--header-band-h",`${u}px`);try{window.localStorage.setItem(M0,String(u))}catch{}},n=(()=>{try{return window.localStorage.getItem(M0)}catch{return null}})();n!==null&&Number.isFinite(Number(n))&&i(Number(n));const r=()=>{const h=t.getBoundingClientRect();e.style.top=`${Math.max(0,h.bottom-QW)}px`};r(),window.addEventListener("resize",r),new MutationObserver(r).observe(document.body,{attributes:!0,attributeFilter:["data-header"]}),window.setInterval(r,500);let o=!1,a=0,l=0;e.addEventListener("pointerdown",h=>{const d=document.querySelector(".header-face");o=!0,a=h.clientY,l=d===null?Ou:d.getBoundingClientRect().height,e.setPointerCapture(h.pointerId),h.preventDefault()}),e.addEventListener("pointermove",h=>{o&&(i(l+(h.clientY-a)),r())});const c=()=>{o=!1,r()};e.addEventListener("pointerup",c),e.addEventListener("pointercancel",c)}let eg=null;function tF(s){const e=s.querySelector(".gather-rows");if(e===null)return;const t=ai(e,{rows:".listing-row",label:i=>`+${i} MORE · ON STAGE`,press:()=>{eg?.()},className:"strategy-pill gather-more",mount:s});t.title="the whole cohort as a pane on the main panel"}function v0(s){ai(s,{rows:".strategy-pill, .listing-action, .holder-mark",className:"frame-more"})}function sF(){const s=e=>{for(const t of e.querySelectorAll(".mode-frame:not([data-more])"))v0(t)};new MutationObserver(e=>{for(const t of e)for(const i of t.addedNodes)i instanceof HTMLElement&&(i.matches(".mode-frame")&&i.dataset.more===void 0&&v0(i),s(i))}).observe(document.body,{childList:!0,subtree:!0}),s(document)}function w0(s){const e=s?.text;if(typeof e!="string"||e.length===0||typeof window.speechSynthesis>"u")return;const t=new SpeechSynthesisUtterance(e);t.rate=1,window.speechSynthesis.speak(t)}function iF(){const s=document.body,e=document.querySelector(".wrap:not(#gap)"),t=r=>{s.dataset.header===r?(e!==null&&Qm(e,s),s.dataset.header="away"):s.dataset.header=r};document.querySelector(".panel-1")?.addEventListener("click",()=>t("stats")),document.querySelector(".panel-2")?.addEventListener("click",()=>t("dag")),document.querySelector(".panel-gather")?.addEventListener("click",()=>t("gather"));const i=document.querySelector(".header-gather-field");i?.querySelector(".gather-stage")?.addEventListener("click",r=>{r.stopPropagation(),eg?.()}),i!==null&&tF(i),sF();const n=()=>{s.dataset.zoom===void 0&&(delete s.dataset.header,_i("audio3"))};tt("header-restore").addEventListener("click",n),window.addEventListener("keydown",r=>{r.key==="Escape"&&s.dataset.header==="away"&&s.dataset.zoom===void 0&&s.dataset.gutter!=="away"&&n()})}const Bo=[{key:"lower-decks",label:"LOWER DECKS"},{key:"gold",label:"CERRITOS GOLD"},{key:"medical",label:"MEDICAL"},{key:"nemesis",label:"NEMESIS"},{key:"pharos",label:"PHAROS"}],fz="argus-landing",nF=15e3;function y0(){try{return(window.localStorage.getItem(fz)??"launcher")==="launcher"}catch{return!0}}function rF(s){try{window.localStorage.setItem(fz,s?"launcher":"last")}catch{}}const z0="argus-theme",oF="argus-lcars",aF="medical",lF={sickbay:"medical"};function cF(){const s=tt("theme-pill"),e=Math.max(Bo.findIndex(r=>r.key===aF),0);let t=e;try{const r=window.localStorage.getItem(z0)??window.localStorage.getItem(oF),o=r===null?null:lF[r]??r,a=Bo.findIndex(l=>l.key===o);t=a>=0?a:e}catch{t=e}const i=document.documentElement,n=()=>{const r=Bo[t]??Bo[0];r.key==="lower-decks"?delete i.dataset.theme:i.dataset.theme=r.key,s.textContent=r.label};n(),s.addEventListener("click",()=>{t=(t+1)%Bo.length,n();try{window.localStorage.setItem(z0,Bo[t]?.key??"lower-decks")}catch{}_i("audio2")})}function hF(s){const e=document.getElementById("about-rows");if(e===null)return;e.replaceChildren();const i={...kx(s)==="chris"?{cumin:s.stack?.cumin,salsa:s.stack?.salsa,chili:s.stack?.chili}:{},brasa:s.stack?.brasa,calypso:s.stack?.calypso,chell:s.stack?.chell},n=[];for(const[r,o]of Object.entries(i))o!==void 0&&n.push([r.toUpperCase(),o]);n.push(["MENU","0.24.0"],["ARGUS","f69eed94 · 2026-10-16 22:26Z"],["WIRE",`V${s.protocolVersion}`]),s.stack?.build!==void 0&&n.push(["BUILD",s.stack.build]);for(const[r,o]of n){const a=document.createElement("div");a.className="telemetry-row";const l=document.createElement("span");l.className="telemetry-label",l.textContent=r;const c=document.createElement("span");c.className="telemetry-value",c.textContent=o,c.title=o,a.append(l,c),e.appendChild(a)}}function dF(){for(const s of document.querySelectorAll(".left-frame button, .left-frame-top button"))s.addEventListener("click",()=>_i("audio2"))}let No=null;async function uF(s){let e=null;const t=await Gz(s),i=t==="chris";document.body.dataset.composition=t;const n=new dk(document),r=i?rk(tt("index-instrument"),{dag_primary:()=>Ot,dag_instances:()=>a.values("dag"),universes:()=>a.values("universe"),pacs:()=>A,runs_show:R=>Cn(R)}):{promptContext_take:()=>{},telemetry_take:()=>{},progress_take:()=>{}},o=new fk(tt("lane-instrument"));window.setInterval(()=>o.tick(),500);const a=new BN;i&&VA(xk(()=>G));const l=new ak;l.writeObserver_set((R,j)=>{pe.regard_send({address:R.address,...R.modelKind!==void 0?{modelKind:R.modelKind}:{},groupId:j,paneId:R.paneId}),q()});const c={get layout(){return U},panels:a,paneInstance_get:Dc,subjects:l,get dormant(){return se},sound:_i,get terminal(){return ve},get client(){return pe}},h=Nk(c,{catalogue_of:R=>D.get(R),run_press:(R,j,de)=>{re(R,j,de)}}),d=h.entry_show,u=R=>jp(R,s),p=EN(c,{vfsUrl_build:u,downloadUrl_build:R=>Nz(R,s),image_open:(R,j)=>B(R,j),process_open:(R,j)=>N(R,j),run_press:(R,j,de)=>{re(R,j,de)},cohort_gather:R=>Q(R),verbLine_run:(R,j)=>xt(R,j),ask_onPane:(R,j)=>k(R,j),binEntry_show:d,catalogue_of:R=>D.get(R),promptUser:()=>M,template_stamp:Di,pane_find:Ls}),{previewProvider:f,fileText_fetch:_,file_save:g,rootedListing_show:m,listing_refresh:v,directory_make:y,files_deliver:b,filesBody_stamp:w,rowVerbs_of:z}=p,O=p.instance_build;let M=null,S=null;const D=new Map,{imageInstance_build:T,tagsInstance_build:E,tagsPane_follow:x,tagsPane_open:C,series_ask:I,image_open:B}=ek({client:()=>pe,terminal:()=>ve,panels:()=>a,subjects:()=>l,layout:()=>U,desktop:()=>te,instance_spawn:(R,j)=>Te(R,j),errandHost_find:()=>H(),launcher_yield:()=>_e(),birth_record:(R,j,de,ue,Me)=>ge(R,j,de,ue,Me),vfsUrl_build:R=>u(R)}),N=(R,j)=>{_e();const de=new Set(U.panes_shown());for(const[Le,Xt]of D)if(de.has(Le)&&Xt.input===j.input){U.focus_set(Le);return}const ue=de.has(R)?R:H()??R,Me=Te("catalogue",R);if(!U.leaf_split(ue,te.replayPlace_get()?.dir??"col",Me.id,te.replayPlace_get()?.before??!1)){xs(Me.id),U.mount_remove(Me.id);return}ge(Me.id,ue,te.replayPlace_get()?.dir??"col",te.replayPlace_get()?.before??!1),D.set(Me.id,j);const lt=a.get("files",Me.id);lt!==void 0&&(lt.binding_set({input:j.input,place:j.feed===null?"new feed":`feed ${j.feed}${j.node===null?"":` · node ${j.node}`}`}),lt.feedOpen_declare(Le=>K(Me.id,Le)),m(Me.id,lt,"/bin"),J(lt),U.focus_set(Me.id))},P=5,F=40,J=R=>{pe.line_execute(`plugininstance list --limit ${F} --fields id,plugin_name,plugin_version,owner_username`,{silent:!0,observe:!1}).then(de=>{const ue=[];for(const Me of de.envelopes)if(!(Me.model?.kind!=="plugininstance.list"||!Array.isArray(Me.model.data)))for(const lt of Me.model.data){if(typeof lt.pluginName!="string"||typeof lt.pluginVersion!="string"||M!==null&&typeof lt.owner=="string"&<.owner!==M||lt.pluginName==="pl-dircopy")continue;const Le=`${lt.pluginName}-v${lt.pluginVersion}`;if(ue.includes(Le)||ue.push(Le),ue.length>=P)break}R.recent_set(ue.length===0?null:ue)}).catch(()=>{})},K=(R,j)=>{_e();const de=new Set(U.panes_shown());for(const[lt,Le]of a.entries("dag"))if(lt!=="dag"&&de.has(lt)&&Le.feed_get()===j){U.focus_set(lt);return}const ue=de.has(R)?R:H()??R,Me=Te("dag",R);if(!U.leaf_split(ue,te.replayPlace_get()?.dir??"col",Me.id,te.replayPlace_get()?.before??!1)){xs(Me.id),U.mount_remove(Me.id);return}ge(Me.id,ue,te.replayPlace_get()?.dir??"col",te.replayPlace_get()?.before??!1),a.get("dag",Me.id)?.feed_enter(j)},re=async(R,j,de)=>{const ue=D.get(R),Me=a.get("files",R);if(ue===void 0||Me===void 0)return;const lt=Hs=>{ve.output_write("err",`\x1B[31m${Hs}\x1B[0m
|
|
4324
|
+
`))}offer(e){this.terminalId!==null&&this.wire.input(this.terminalId,`${e}`),this.focus()}buffer_lines(){const e=this.term.buffer.active,t=[];for(let i=0;i<e.length;i++){const n=e.getLine(i),r=n?.translateToString(!0)??"";n?.isWrapped===!0&&t.length>0?t[t.length-1]+=r:t.push(r)}for(;t.length>0&&t[t.length-1]==="";)t.pop();return t}mark(){return this.feeds}lines_since(e){const t=this.buffer_lines(),i=Math.max(0,this.feeds-e)+1;return t.slice(Math.max(0,t.length-i))}type(e){this.keys_send(e)}dispose(){this.observer?.disconnect(),this.term.dispose()}keys_send(e){if(this.ended){this.ended=!1,this.term.reset(),this.wire.open(this.term.cols,this.term.rows);return}if(this.terminalId===null)return;let t=e;this.ctrlHeld&&(t=RW(e),this.ctrlHeld=!1,this.mount.querySelector(".argus-xterm-key.held")?.classList.remove("held")),this.wire.input(this.terminalId,t)}keyRow_build(){const e=document.createElement("div");e.className="argus-xterm-keys";for(const t of IW){const i=document.createElement("button");i.type="button",i.className="argus-xterm-key",i.textContent=t.label,i.addEventListener("pointerdown",n=>{n.preventDefault(),t.data==="ctrl"?(this.ctrlHeld=!this.ctrlHeld,i.classList.toggle("held",this.ctrlHeld)):this.keys_send(t.data),this.focus()}),e.appendChild(i)}this.mount.appendChild(e)}}const NW="argus.consoleMode",kW="console: the transcript, deprecated: this host offers no pseudo-terminal (node-pty did not build). Install python, make and g++ and reinstall for the terminal console.";function PW(){try{localStorage.removeItem(NW)}catch{}}function LW(s){const{client:e,terminal:t,offered:i}=s,n=document.getElementById("terminal");let r=null,o="transcript";const a=l=>{if(n!==null)if(l==="terminal"&&i){if(r===null){const h=document.createElement("div");h.className="argus-terminal-mount",n.appendChild(h),r=new GW(h,{open:(d,u,p)=>e.terminal_open(d,u,p),input:(d,u)=>e.terminal_input(d,u),resize:(d,u,p)=>e.terminal_resize(d,u,p)},d=>{a("transcript"),t.line_note(`console: ${d}`)},d=>{n.dataset.terminalState=d}),n.dataset.terminalState="busy",s.screen_set(r)}const c=r;n.classList.add("console-terminal"),e.mirror_set(!0),t.delegate_set({note:h=>e.note_send(h),offer:h=>c.offer(h),focus:()=>c.focus(),fit:()=>c.size_fit()}),c.size_fit(),o="terminal"}else n.classList.remove("console-terminal"),e.mirror_set(!1),t.delegate_set(null),o="transcript"};return PW(),a(i?"terminal":"transcript"),i||t.line_note(kW),Object.assign(globalThis,{__argusConsole:{mode:()=>o,state:()=>n?.dataset.terminalState??"busy",type:l=>r?.type(l),lines:()=>r?.buffer_lines()??[],mark:()=>r?.mark()??0,since:l=>r?.lines_since(l)??[]}}),{terminal_is:()=>o==="terminal",question_sheet:async l=>{document.querySelector(".question-sheet")?.remove();const c=document.createElement("div");c.className="share-sheet question-sheet",c.setAttribute("role","dialog");const h=document.createElement("div");h.className="share-head",h.textContent="THE SESSION ASKS",c.appendChild(h),document.body.appendChild(c);try{return await Lm(t,c,l)}finally{c.remove()}}}}let Ar=()=>{};function g0(){Ar(document.body.dataset.zoom==="console"?null:"console")}const WW=Cz(),FW=`data:image/svg+xml,${encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><rect width="64" height="64" fill="#000"/><rect x="6" y="14" width="52" height="36" rx="18" fill="#20bdef"/><rect x="34" y="14" width="24" height="36" fill="#20bdef"/></svg>')}`;function UW(s){for(const e of document.querySelectorAll('link[rel="icon"], link[rel="apple-touch-icon"]'))e.href=s}const $W="ARGUS",_0="argus-audio",jW=.4;let Dr=!1;function _i(s){if(Dr)return;const e=document.getElementById(s);e instanceof HTMLAudioElement&&(e.currentTime=0,e.volume=jW,e.play().catch(()=>{}))}function HW(){const s=tt("head-menu-pill"),e=t=>{t?document.body.dataset.headMenu="open":delete document.body.dataset.headMenu,s.setAttribute("aria-expanded",String(t))};s.addEventListener("click",t=>{t.stopPropagation(),e(document.body.dataset.headMenu!=="open")}),document.addEventListener("click",t=>{if(document.body.dataset.headMenu!=="open")return;t.target instanceof Element&&t.target.closest("#header-dag-info")!==null||e(!1)})}function VW(){const s=tt("audio-pill");try{Dr=window.localStorage.getItem(_0)==="off"}catch{Dr=!1}const e=()=>{s.classList.toggle("audio-off",Dr)};e(),s.addEventListener("click",()=>{Dr=!Dr;try{window.localStorage.setItem(_0,Dr?"off":"on")}catch{}e(),_i("audio2")})}function qW(){return Rz(window.location)}let xu=null,xh=0;function Qm(s,e){const t=()=>{e.dataset.zoom!==void 0||e.dataset.header==="away"||(xh=Math.ceil(s.offsetTop+s.offsetHeight),e.style.setProperty("--zoom-header-height",`${xh}px`))};t(),xu===null&&(xu=new ResizeObserver(t),xu.observe(s))}const b0=120,KW=96;function YW(s,e,t,i){let n="";const r=h=>{h?(n=s.style.height,s.style.height=""):n!==""&&(s.style.height=n),s.classList.toggle("drawer-closed",h),_i("audio3"),h||(i.size_fit(),i.focus_take())};t.addEventListener("click",()=>r(!s.classList.contains("drawer-closed")));let o=0,a=0,l=!1;e.addEventListener("pointerdown",h=>{l=!0,o=h.clientY,a=s.getBoundingClientRect().height,s.classList.add("drawer-dragging"),e.setPointerCapture(h.pointerId),h.preventDefault()}),e.addEventListener("pointermove",h=>{if(!l)return;const d=Math.max(b0,window.innerHeight-KW),u=a+(h.clientY-o),p=Math.min(Math.max(b0,u),d);s.style.height=`${p}px`,i.size_fit()});const c=()=>{l=!1,s.classList.remove("drawer-dragging")};return e.addEventListener("pointerup",c),e.addEventListener("pointercancel",c),r}function XW(s){const e=document.body,t=document.querySelector(".wrap:not(#gap)");let i;const n=r=>{for(const o of document.querySelectorAll(".pane-zoomed, .pane-zoomed-path"))o.classList.remove("pane-zoomed","pane-zoomed-path");if(r===null)delete e.dataset.zoom,i!==void 0&&(e.dataset.header=i,i=void 0);else{window.scrollTo(0,0),e.dataset.header==="away"?(i="away",delete e.dataset.header,xh>0&&e.style.setProperty("--zoom-header-height",`${xh}px`)):t!==null&&Qm(t,e),e.dataset.zoom=r;const a=Dc(r)?.mount?.parentElement??null;a?.classList.add("pane-zoomed");let l=a?.parentElement??null;for(;l!==null&&l.id!=="layout-root";)l.classList.add("pane-zoomed-path"),l=l.parentElement}for(const o of document.querySelectorAll(".drawer-zoom"))o.textContent=r!==null&&o.dataset.pane===r?"RESTORE":"ZOOM";_i("audio3")};return tt("header-restore").addEventListener("click",()=>{e.dataset.zoom!==void 0&&n(null)}),document.addEventListener("click",r=>{const o=r.target;if(!(o instanceof Element))return;const a=o.closest("[data-pane]");if(a===null)return;const l=a.dataset.pane??"";l!==""&&n(e.dataset.zoom===l?null:l)}),window.addEventListener("keydown",r=>{r.key==="Escape"&&e.dataset.zoom!==void 0&&(n(null),r.stopImmediatePropagation())}),tt("drawer").addEventListener("transitionend",r=>{r.propertyName==="height"&&s.size_fit()}),n}function ZW(){const s=new bk(document.getElementById("data-cascade")),e=document.getElementById("header-telemetry");return e!==null&&s.telemetryPanel_bind(e),s}const Ou=96,JW=220,M0="argus.headerBand.height",QW=52;function eF(){const s=document.documentElement,e=document.getElementById("header-strip"),t=document.querySelector(".wrap:not(#gap)");if(e===null||t===null)return;const i=h=>{const d=Math.max(Ou,window.innerHeight-JW),u=Math.min(Math.max(Ou,h),d);s.style.setProperty("--header-band-h",`${u}px`);try{window.localStorage.setItem(M0,String(u))}catch{}},n=(()=>{try{return window.localStorage.getItem(M0)}catch{return null}})();n!==null&&Number.isFinite(Number(n))&&i(Number(n));const r=()=>{const h=t.getBoundingClientRect();e.style.top=`${Math.max(0,h.bottom-QW)}px`};r(),window.addEventListener("resize",r),new MutationObserver(r).observe(document.body,{attributes:!0,attributeFilter:["data-header"]}),window.setInterval(r,500);let o=!1,a=0,l=0;e.addEventListener("pointerdown",h=>{const d=document.querySelector(".header-face");o=!0,a=h.clientY,l=d===null?Ou:d.getBoundingClientRect().height,e.setPointerCapture(h.pointerId),h.preventDefault()}),e.addEventListener("pointermove",h=>{o&&(i(l+(h.clientY-a)),r())});const c=()=>{o=!1,r()};e.addEventListener("pointerup",c),e.addEventListener("pointercancel",c)}let eg=null;function tF(s){const e=s.querySelector(".gather-rows");if(e===null)return;const t=ai(e,{rows:".listing-row",label:i=>`+${i} MORE · ON STAGE`,press:()=>{eg?.()},className:"strategy-pill gather-more",mount:s});t.title="the whole cohort as a pane on the main panel"}function v0(s){ai(s,{rows:".strategy-pill, .listing-action, .holder-mark",className:"frame-more"})}function sF(){const s=e=>{for(const t of e.querySelectorAll(".mode-frame:not([data-more])"))v0(t)};new MutationObserver(e=>{for(const t of e)for(const i of t.addedNodes)i instanceof HTMLElement&&(i.matches(".mode-frame")&&i.dataset.more===void 0&&v0(i),s(i))}).observe(document.body,{childList:!0,subtree:!0}),s(document)}function w0(s){const e=s?.text;if(typeof e!="string"||e.length===0||typeof window.speechSynthesis>"u")return;const t=new SpeechSynthesisUtterance(e);t.rate=1,window.speechSynthesis.speak(t)}function iF(){const s=document.body,e=document.querySelector(".wrap:not(#gap)"),t=r=>{s.dataset.header===r?(e!==null&&Qm(e,s),s.dataset.header="away"):s.dataset.header=r};document.querySelector(".panel-1")?.addEventListener("click",()=>t("stats")),document.querySelector(".panel-2")?.addEventListener("click",()=>t("dag")),document.querySelector(".panel-gather")?.addEventListener("click",()=>t("gather"));const i=document.querySelector(".header-gather-field");i?.querySelector(".gather-stage")?.addEventListener("click",r=>{r.stopPropagation(),eg?.()}),i!==null&&tF(i),sF();const n=()=>{s.dataset.zoom===void 0&&(delete s.dataset.header,_i("audio3"))};tt("header-restore").addEventListener("click",n),window.addEventListener("keydown",r=>{r.key==="Escape"&&s.dataset.header==="away"&&s.dataset.zoom===void 0&&s.dataset.gutter!=="away"&&n()})}const Bo=[{key:"lower-decks",label:"LOWER DECKS"},{key:"gold",label:"CERRITOS GOLD"},{key:"medical",label:"MEDICAL"},{key:"nemesis",label:"NEMESIS"},{key:"pharos",label:"PHAROS"}],fz="argus-landing",nF=15e3;function y0(){try{return(window.localStorage.getItem(fz)??"launcher")==="launcher"}catch{return!0}}function rF(s){try{window.localStorage.setItem(fz,s?"launcher":"last")}catch{}}const z0="argus-theme",oF="argus-lcars",aF="medical",lF={sickbay:"medical"};function cF(){const s=tt("theme-pill"),e=Math.max(Bo.findIndex(r=>r.key===aF),0);let t=e;try{const r=window.localStorage.getItem(z0)??window.localStorage.getItem(oF),o=r===null?null:lF[r]??r,a=Bo.findIndex(l=>l.key===o);t=a>=0?a:e}catch{t=e}const i=document.documentElement,n=()=>{const r=Bo[t]??Bo[0];r.key==="lower-decks"?delete i.dataset.theme:i.dataset.theme=r.key,s.textContent=r.label};n(),s.addEventListener("click",()=>{t=(t+1)%Bo.length,n();try{window.localStorage.setItem(z0,Bo[t]?.key??"lower-decks")}catch{}_i("audio2")})}function hF(s){const e=document.getElementById("about-rows");if(e===null)return;e.replaceChildren();const i={...kx(s)==="chris"?{cumin:s.stack?.cumin,salsa:s.stack?.salsa,chili:s.stack?.chili}:{},brasa:s.stack?.brasa,calypso:s.stack?.calypso,chell:s.stack?.chell},n=[];for(const[r,o]of Object.entries(i))o!==void 0&&n.push([r.toUpperCase(),o]);n.push(["MENU","0.24.0"],["ARGUS","86ecd214 · 2026-10-17 02:25Z"],["WIRE",`V${s.protocolVersion}`]),s.stack?.build!==void 0&&n.push(["BUILD",s.stack.build]);for(const[r,o]of n){const a=document.createElement("div");a.className="telemetry-row";const l=document.createElement("span");l.className="telemetry-label",l.textContent=r;const c=document.createElement("span");c.className="telemetry-value",c.textContent=o,c.title=o,a.append(l,c),e.appendChild(a)}}function dF(){for(const s of document.querySelectorAll(".left-frame button, .left-frame-top button"))s.addEventListener("click",()=>_i("audio2"))}let No=null;async function uF(s){let e=null;const t=await Gz(s),i=t==="chris";document.body.dataset.composition=t;const n=new dk(document),r=i?rk(tt("index-instrument"),{dag_primary:()=>Ot,dag_instances:()=>a.values("dag"),universes:()=>a.values("universe"),pacs:()=>A,runs_show:R=>Cn(R)}):{promptContext_take:()=>{},telemetry_take:()=>{},progress_take:()=>{}},o=new fk(tt("lane-instrument"));window.setInterval(()=>o.tick(),500);const a=new BN;i&&VA(xk(()=>G));const l=new ak;l.writeObserver_set((R,j)=>{pe.regard_send({address:R.address,...R.modelKind!==void 0?{modelKind:R.modelKind}:{},groupId:j,paneId:R.paneId}),q()});const c={get layout(){return U},panels:a,paneInstance_get:Dc,subjects:l,get dormant(){return se},sound:_i,get terminal(){return ve},get client(){return pe}},h=Nk(c,{catalogue_of:R=>D.get(R),run_press:(R,j,de)=>{re(R,j,de)}}),d=h.entry_show,u=R=>jp(R,s),p=EN(c,{vfsUrl_build:u,downloadUrl_build:R=>Nz(R,s),image_open:(R,j)=>B(R,j),process_open:(R,j)=>N(R,j),run_press:(R,j,de)=>{re(R,j,de)},cohort_gather:R=>Q(R),verbLine_run:(R,j)=>xt(R,j),ask_onPane:(R,j)=>k(R,j),binEntry_show:d,catalogue_of:R=>D.get(R),promptUser:()=>M,template_stamp:Di,pane_find:Ls}),{previewProvider:f,fileText_fetch:_,file_save:g,rootedListing_show:m,listing_refresh:v,directory_make:y,files_deliver:b,filesBody_stamp:w,rowVerbs_of:z}=p,O=p.instance_build;let M=null,S=null;const D=new Map,{imageInstance_build:T,tagsInstance_build:E,tagsPane_follow:x,tagsPane_open:C,series_ask:I,image_open:B}=ek({client:()=>pe,terminal:()=>ve,panels:()=>a,subjects:()=>l,layout:()=>U,desktop:()=>te,instance_spawn:(R,j)=>Te(R,j),errandHost_find:()=>H(),launcher_yield:()=>_e(),birth_record:(R,j,de,ue,Me)=>ge(R,j,de,ue,Me),vfsUrl_build:R=>u(R)}),N=(R,j)=>{_e();const de=new Set(U.panes_shown());for(const[Le,Xt]of D)if(de.has(Le)&&Xt.input===j.input){U.focus_set(Le);return}const ue=de.has(R)?R:H()??R,Me=Te("catalogue",R);if(!U.leaf_split(ue,te.replayPlace_get()?.dir??"col",Me.id,te.replayPlace_get()?.before??!1)){xs(Me.id),U.mount_remove(Me.id);return}ge(Me.id,ue,te.replayPlace_get()?.dir??"col",te.replayPlace_get()?.before??!1),D.set(Me.id,j);const lt=a.get("files",Me.id);lt!==void 0&&(lt.binding_set({input:j.input,place:j.feed===null?"new feed":`feed ${j.feed}${j.node===null?"":` · node ${j.node}`}`}),lt.feedOpen_declare(Le=>K(Me.id,Le)),m(Me.id,lt,"/bin"),J(lt),U.focus_set(Me.id))},P=5,F=40,J=R=>{pe.line_execute(`plugininstance list --limit ${F} --fields id,plugin_name,plugin_version,owner_username`,{silent:!0,observe:!1}).then(de=>{const ue=[];for(const Me of de.envelopes)if(!(Me.model?.kind!=="plugininstance.list"||!Array.isArray(Me.model.data)))for(const lt of Me.model.data){if(typeof lt.pluginName!="string"||typeof lt.pluginVersion!="string"||M!==null&&typeof lt.owner=="string"&<.owner!==M||lt.pluginName==="pl-dircopy")continue;const Le=`${lt.pluginName}-v${lt.pluginVersion}`;if(ue.includes(Le)||ue.push(Le),ue.length>=P)break}R.recent_set(ue.length===0?null:ue)}).catch(()=>{})},K=(R,j)=>{_e();const de=new Set(U.panes_shown());for(const[lt,Le]of a.entries("dag"))if(lt!=="dag"&&de.has(lt)&&Le.feed_get()===j){U.focus_set(lt);return}const ue=de.has(R)?R:H()??R,Me=Te("dag",R);if(!U.leaf_split(ue,te.replayPlace_get()?.dir??"col",Me.id,te.replayPlace_get()?.before??!1)){xs(Me.id),U.mount_remove(Me.id);return}ge(Me.id,ue,te.replayPlace_get()?.dir??"col",te.replayPlace_get()?.before??!1),a.get("dag",Me.id)?.feed_enter(j)},re=async(R,j,de)=>{const ue=D.get(R),Me=a.get("files",R);if(ue===void 0||Me===void 0)return;const lt=Hs=>{ve.output_write("err",`\x1B[31m${Hs}\x1B[0m
|
|
4325
4325
|
`);const Zh=Me.indicated_get();Zh!==null&&Me.rowReadout_show(Zh,Hs.toUpperCase().slice(0,80))};if(de==="pipeline"&&ue.node===null){lt(`${j}: a pipeline runs on a node — PROCESS a node of a feed`);return}let Le=Me.commandLine_get();if((Le===""||Rv(Le)!==j)&&(Le=Tv(ue.input,j)),ue.feed===null&&!sD(Le)){const Hs=ue.input.split("/").filter(Boolean).pop()??"feed",lg=(await k(R,{message:"Feed title: ",kind:"text",suggest:Hs,commit:"RUN"})??"").trim();if(lg==="")return;Le=iD(Le,lg)}Me.commandLine_set(Le),ve.line_echo(Le);let Xt;try{Xt=await pe.line_execute(Le,{silent:!0})}catch(Hs){lt(Hs instanceof Error?Hs.message:String(Hs));return}ve.outcome_write(Xt),Xt.envelopes.some(Hs=>Hs.model?.kind==="fs.cwd")&&pe.line_execute("ls",{silent:!0});const _r=Xt.envelopes.find(Hs=>Hs.model?.kind==="run.scheduled")?.model?.data;if(typeof _r?.feedId=="number"){Me.run_show(_r.feedId);return}const og=Xt.envelopes.map(Hs=>Hs.renderedErr??"").join(" ").replace(/\x1b\[[0-9;]*m/g,"").trim().split(`
|
|
4326
4326
|
`)[0]??"",ag=Me.indicated_get();ag!==null&&Me.rowReadout_show(ag,og===""?"NOT SCHEDULED":og.toUpperCase().slice(0,80))},xe=R=>{_e();const j=new Set(U.panes_shown());for(const[Le]of a.entries("files"))if(j.has(Le)&&l.regard_get(Le)?.address===R){U.focus_set(Le);return}let de;for(const[Le,Xt]of a.entries("image"))if(j.has(Le)&&(l.regard_get(Le)?.address===R||Xt.state_get()?.path===R)){de=Le;break}const ue=H();if(ue===null)return;const Me=Te("files",de);if(!U.leaf_split(ue,te.replayPlace_get()?.dir??"col",Me.id,te.replayPlace_get()?.before??!1)){xs(Me.id),U.mount_remove(Me.id);return}ge(Me.id,ue,te.replayPlace_get()?.dir??"col",te.replayPlace_get()?.before??!1),de===void 0&&l.regard_write(Me.id,{address:R,modelKind:"dicom.series"});const lt=a.get("files",Me.id);lt!==void 0&&m(Me.id,lt,R)},Be=$k(c,{image_open:(R,j)=>B(R,j),process_open:(R,j)=>N(R,j),feed_open:(R,j)=>K(R,j),ask_onPane:(R,j)=>k(R,j),errandHost_find:()=>H(),instance_spawn:(R,j)=>Te(R,j),birth_record:(R,j,de,ue)=>ge(R,j,de,ue),replayPlace_get:()=>te.replayPlace_get(),stage_relight:()=>q(),home_apply:()=>je(),orphans_dispose:()=>ye(),fileText_fetch:_,template_stamp:Di,pane_find:Ls,element_require:tt}),Ge=Be.instance_build,Q=Be.gather,ie=Be.open,ce=R=>{const j=Di("tpl-pane-view");ai(Ls(j,".view-body"));const de=new ok(Ls(j,".view-body"),Ls(j,".view-title"),{content_fetch:async ue=>(await _(ue)).text,imageUrl_build:u,path_isImage:Ch});return a.set("view",R,de),{id:R,kind:"view",mount:j,dispose:()=>{a.delete(R),l.pane_leave(R)}}},Fe=kk(c,{filesBody_stamp:w,rootedListing_show:m,rowVerbs_of:z,image_open:(R,j)=>B(R,j),imagery_is:iy,tableFile_is:R=>sy.test(R),vfsUrl_build:u,fileText_fetch:_,previewProvider:f}),Xe=Fe.open;Fe.close;const qe=fN(c,{ask_onPane:(R,j)=>k(R,j),promptUser:()=>M,changed:()=>{for(const R of a.values("dag"))R.roster_ask(),R.marks_refresh(),R.indicated_refresh()}}),zt=TN({client:()=>pe,terminal:()=>ve,panels:()=>a,subjects:()=>l,context:()=>c,feedVerbs:()=>qe,nodeOverlay:()=>Fe,nodeOverlay_open:(R,j)=>Xe(R,j),process_open:(R,j)=>N(R,j),promptUser:()=>M,runs_show:()=>Cn(),dag_primary:()=>Ot,binEntry_show:(R,j,de,ue)=>d(R,j,de,ue),dag_summon:()=>Ue()}),Ne=O("files",!0);oc(Ne);const vt=tk({panes:zt,dicom:{imageInstance_build:T,tagsInstance_build:E},gather_build:Ge,pacsMount:tt("pacs-workspace")}),pt=i?vt:{primaries:[],domains:[],presets:[],factories:[]};for(const R of pt.primaries)oc(R);for(const R of pt.domains)IN(R);const dt=Di("tpl-pane-launcher");oc({id:"launcher",kind:"launcher",mount:dt});const Pt=Di("tpl-pane-panes");oc({id:"panes",kind:"panes",mount:Pt});const Qt=a.get("files","files"),Ot=a.get("dag","dag"),ss=new wk(tt("pipeline-cycler"),tt("pipeline-cycler-name"),R=>{pe.line_execute(R,{silent:!0})});let Gt=null;const Ut=Pk(c,{instance_spawn:(R,j)=>Te(R,j),birth_record:(R,j,de,ue)=>ge(R,j,de,ue),replayPlace_get:()=>te.replayPlace_get(),rootedListing_show:m,console_expose:()=>Gt?.(!1),questionSheet_ask:R=>e!==null&&e.terminal_is()?e.question_sheet(R):null}),{errandHost_find:H,errand_open:Ds,verbLine_run:xt,ask_onPane:k}=Ut;ai(tt("pacs-workspace"),{rows:".listing-row"});const A=new pD(tt("pacs-workspace"),{command_run:R=>{const j=/^(pacs query|pull )/.test(R);j&&ve.line_echo(R),pe.line_execute(R,{silent:!0,operator:j}).then(de=>{for(const ue of de.envelopes)A.envelope_observe(ue)})},command_show:R=>{ve.line_run(R)},note:R=>ve.line_note(R),image_open:R=>{B(null,R).then(j=>ve.line_note(j))},dir_open:R=>xe(R),process_open:R=>N("pacs",{input:R,feed:null,node:null}),gather_add:R=>Q([R]),gathered_is:R=>Be.has(R),workspace_close:()=>je()}),q=()=>{const R=new Set(U.panes_shown()),j=new Map;for(const de of Tc()){if(!R.has(de.id))continue;const ue=l.regard_get(de.id)?.address;if(ue===void 0)continue;const Me=Xh(de.id);if(Me!=="image"&&Me!=="files")continue;const lt=ue.replace(/\/$/,""),Le=j.get(lt)??{viewer:!1,browser:!1};Me==="image"?Le.viewer=!0:Le.browser=!0,j.set(lt,Le)}A.stage_lit(j)},U=new Ok(tt("layout-root"),new Map([...pt.primaries.map(R=>[R.id,R.mount]),["files",Ne.mount],["launcher",dt],["panes",Pt]]));let ee=!1;const me=()=>ee?{dir:"col",ratio:.45,first:{pane:"files"},second:{pane:"dag"}}:{pane:"files"};U.preset_register("files",me);for(const[R,j]of pt.presets)U.preset_register(R,j);U.preset_register("panes",()=>({pane:"panes"})),U.preset_register("launcher",()=>({pane:"launcher"})),U.renderObserver_set(()=>{document.body.dataset.zoom==="launcher"&&!U.panes_shown().includes("launcher")&&Ar(null),window.requestAnimationFrame(()=>{for(const R of a.values("dag"))R.size_fit()})});const we=(R,j,de,ue)=>{const Me=j==="view"?Te("view",R):j==="fs"?Te("files",R):Te("empty");if(!U.leaf_split(R,de,Me.id,ue))return xs(Me.id),U.mount_remove(Me.id),null;if(ge(Me.id,R,de,ue,j),j==="fs"){const lt=Xt=>{const Bi=a.get("files",Me.id);if(Bi===void 0)return;const _r=Xt.modelKind==="fs.file"?Xt.address.replace(/\/[^/]*$/,"")||"/":Xt.address;m(Me.id,Bi,_r)};l.regard_subscribe(Me.id,lt);const Le=l.regard_get(R);Le!==null&<(Le)}return Me.id},se=new Mz(S0,x0());Object.assign(globalThis,{__argusDormant:{list:()=>se.list(),get:R=>se.get(R),dismiss:R=>se.dismiss(R)}});const te=Tk(c,{image_open:B,dir_open:xe,process_open:N,gather_open:ie,feed_open:K,edit_open:R=>ro.edit_open(R),pillPane_spawn:we,pacsQuery_get:()=>A.query_get(),catalogue_of:R=>D.get(R),catalogueIds:()=>[...D.keys()],stage_relight:()=>q()}),{birth_record:ge,domain_enter:ke,orphans_dispose:ye}=te,ze=te.capture,Ye=te.restore,je=()=>{ke("files"),Ot.size_fit()},ot=()=>{ke("launcher"),Oe.render(),U.focus_set("launcher"),Ar("launcher")},$=(R=!1)=>{if(document.body.dataset.zoom!=="launcher"||(Ar(null),!R))return;const j=document.querySelector(".wrap:not(#gap)");j!==null&&Qm(j,document.body),document.body.dataset.header="away",Gt?.(!0)},_e=()=>{$(),U.activePreset_get()==="launcher"&&(ee=!1,je())};let oe=!1;const Se=JA({ask:R=>pe.line_execute(R,{silent:!0,observe:!1}),home_open:()=>{ee=!1,je(),U.focus_set("files")},home_cd:R=>{ee=!1,je(),ve.line_run(`cd "${R}"`)},desktops:()=>se.list(),desktop_restore:R=>{Ye(R)},panes_open:()=>{ke("panes"),he.render(),U.focus_set("panes")},keys_open:()=>{mr()},notes_open:()=>{en.open()},notes_latest:()=>en.latest(),daemon_stale:()=>oe,console_open:()=>tt("gutter-console").click(),...i?{contribution:sk({ask:R=>pe.line_execute(R,{silent:!0,observe:!1}),universe_show:()=>Yh(),runs_show:R=>Cn(R),feed_enter:R=>{Cn(),a.get("dag","dag")?.feed_enter(R)},line_offer:R=>ve.line_offer(R),pacs_query:()=>A.query_get()??"",pacs_open:()=>{ke("pacs"),U.focus_set("pacs")}})}:{}}),Oe=new CA(dt,{tiles:Se,leave:()=>$(!0),startHere_get:y0,startHere_set:rF});setInterval(()=>{U.activePreset_get()==="launcher"&&(!dt.isConnected||document.visibilityState!=="visible"||Oe.render())},nF),ai(Ls(Pt,".panes-body"),{rows:".panes-card"});const he=new Ez(Pt,{list:()=>se.list(),restore:R=>{Ye(R)},dismiss:R=>{se.dismiss(R)}}),Ue=()=>{const R=U.activePreset_get();if(R==="pacs"||R==="dag"||R==="launcher"){ee=!0;return}ee&&R==="files"||(ee=!0,je())},Te=(R,j)=>{const de=RN(R);return l.pane_join(de.id,j!==void 0?l.group_of(j):de.id),R==="tags"&&l.regard_subscribe(de.id,ue=>{ue.modelKind==="dicom.instance"&&x(de.id,ue.address)}),R==="view"&&(l.viewer_mark(de.id),l.regard_subscribe(de.id,ue=>{ue.modelKind!=="dicom.instance"&&a.get("view",de.id)?.regard_show(ue)})),U.mount_register(de.id,de.mount),ur(de.id,R,de.mount),de},{bar_note:$t,move:Dt,flip:Zs,resize:Js,chordKeys_of:Kh}=Ak(c),ur=zP(c,{verbs:{move:Dt,chordKeys_of:Kh},browser:p,pillPane_spawn:we,process_open:(R,j)=>N(R,j),overlay_back:R=>Fe.back(R),home_apply:()=>je(),orphans_dispose:()=>ye(),dag_dismiss:()=>{ee=!1}});ur("files","files",Ne.mount);for(const R of pt.primaries)ur(R.id,R.kind,R.mount);ur("launcher","launcher",dt),ur("panes","panes",Pt);let fr=!1;const wi=R=>{fr=R};for(const R of["click","focusin"])document.addEventListener(R,j=>{j.target instanceof Element&&(j.target.closest("#drawer")!==null?fr=!0:j.target.closest("#layout-root")!==null&&(fr=!1))});const _l=()=>{let R=!1;for(const j of document.querySelectorAll(".pane-drawer:not([hidden])"))j.hidden=!0,R=!0;return R},aa=()=>{let R=!1;for(const j of document.querySelectorAll('.workspace-pane[data-modes="open"], [data-frame-host][data-modes="open"]'))delete j.dataset.modes,R=!0;return A.serverStrip_isOpen()&&(A.serverStrip_close(),R=!0),R};document.addEventListener("click",R=>{if(!(R.target instanceof Element)||R.target.closest(".mode-frame")!==null&&R.target.closest(".mode-fill")===null||R.target.closest("#pacs-server-strip")!==null||R.target.closest("#pacs-f-server")!==null||R.target.closest(".listing-framed .listing-row, .ask-bar")!==null)return;const j=R.target.closest(".mode-strip"),de=j?.closest(".workspace-pane, [data-frame-host]")??null,ue=de?.dataset.modes==="open",Me=aa();if(j!==null&&de!==null&&!ue){de.dataset.modes="open",_i("audio3");return}Me&&_i("audio3")}),yP(c,{palette_isOpen:()=>!V.hidden,palette_open:()=>Ee(),palette_close:()=>Ce(),errand_abandon:()=>Ut.errand_abandon(),dive_leave:()=>h.dive_leave(),overlay_escape:()=>Fe.escape(),drawers_close:_l,modeFrames_close:aa,consoleFocused:()=>fr,console_release:()=>wi(!1),verbs:{bar_note:$t,flip:Zs,resize:Js},host:()=>G,stage_alone:R=>{ze(),U.tree_set({pane:R}),ye()},element_require:tt});const yi=new MD,Ri=(R,j)=>{const de=Te(j);return U.leaf_replace(R,de.id),xs(R),U.mount_remove(R),de};yi.claim_add("fs.listing","files"),i&&vD(yi,{dag_target:()=>{const R=U.focused_get();return R!==null&&a.has("dag",R)?a.get("dag",R):Ot},dags:()=>[Ot,...a.values("dag")],universes:()=>a.values("universe"),pacs:()=>A,pacs_present:()=>{U.preset_apply("pacs"),ye()},image_open:(R,j)=>{B(U.focused_get(),R,j?{force:!0}:{}).then(de=>ve.line_note(de))},pane_replace:(R,j)=>Ri(R,j).id,dag_get:R=>a.get("dag",R),image_get:R=>a.get("image",R),tags_get:R=>a.get("tags",R)});const la=(R,j,de)=>{const ue=yi.claimer_get(j);if(ue!==void 0){ue(R,de);return}const Me=Ri(R,j),lt=a.get("files",Me.id);for(const Le of de)lt?.envelope_observe(Le)},pr={instance_spawn:Te,birth_record:ge,launcher_yield:_e,launcher_active:()=>U.activePreset_get()==="launcher",template_stamp:Di},ca=qk(c,pr),mr=ca.open,ha=pP(c,pr),en=MP(c,{...pr,ask:R=>pe.line_execute(R,{silent:!0})}),ro=Hk(c,{...pr,replayPlace_get:te.replayPlace_get,errandHost_find:H,saved:()=>{for(const R of a.values("dag"))R.marks_refresh()}});cn("files",R=>O(R,!1)),cn("catalogue",R=>O(R,!1,!0)),cn("view",ce),cn("help",ca.instance_build),cn("games",ha.instance_build),cn("notes",en.instance_build),cn("edit",ro.instance_build);for(const[R,j]of pt.factories)cn(R,j);cn("empty",R=>{const j=Di("tpl-pane-empty");return new _D(j,{execute:de=>pe.line_execute(de,{silent:!0,observe:!1}),claim:(de,ue)=>la(R,de,ue),claimKind_of:de=>yi.claimKind_of(de)}),{id:R,kind:"empty",mount:j}});const oo=R=>{R?document.body.dataset.gutter="away":delete document.body.dataset.gutter,_i("audio3")},gr=(R,j)=>{if(U.activePreset_get()===R&&U.panes_shown().includes(R)){oo(!0);return}document.body.dataset.gutter==="away"&&delete document.body.dataset.gutter,j()};tt("gutter-restore").addEventListener("click",()=>oo(!1)),window.addEventListener("keydown",R=>{R.key==="Escape"&&document.body.dataset.gutter==="away"&&document.body.dataset.zoom===void 0&&oo(!1)}),tt("gutter-files").addEventListener("click",()=>{gr("files",()=>{ee=!1,je(),U.focus_set("files"),wi(!1)})});const Cn=(R="")=>{ke("dag"),Ot.stage_returned(),Ot.list_reset(),Ot.roster_filter(R),Ot.feedsChooser_request(),U.focus_set("dag"),wi(!1)},Yh=()=>{ke("universe");const R=a.get("universe","universe");R!==void 0&&!R.shown_get()&&R.request(),R?.stage_returned(),U.focus_set("universe"),wi(!1)};tt("gutter-runs").addEventListener("click",()=>gr("dag",()=>Cn())),tt("gutter-console").addEventListener("click",()=>{tt("drawer").classList.contains("drawer-closed")&&tt("drawer-toggle").click(),ve.focus_take(),wi(!0)}),tt("gutter-tools").addEventListener("click",()=>{gr("pacs",()=>{ke("pacs"),U.focus_set("pacs"),wi(!1)})}),tt("gutter-dashboard").addEventListener("click",()=>{gr("launcher",ot)}),tt("gutter-panes").addEventListener("click",()=>{gr("panes",()=>{ke("panes"),he.render(),U.focus_set("panes"),wi(!1)})});const Xh=R=>Dc(R)?.kind??null,G=SP(c,{verbs:{move:Dt,flip:Zs,resize:Js},help_open:mr,notes_open:en.open,launcher_enter:ot,identity_get:()=>S,consoleZoom_toggle:g0,feed_enter:R=>Ot.feed_enter(R),file_save:g,stage_keep:()=>ze(),files_open:(R,j)=>{const de=a.get("files",R);return de===void 0?!1:(p.follow_set(R,!1),m(R,de,j),!0)},image_open:(R,j,de)=>B(R,j,de),series_ask:I,tagsPane_open:C}),V=tt("lang-palette"),Z=tt("lang-input"),Y=tt("lang-result"),X=tt("lang-pill"),Ee=()=>{_l(),V.hidden=!1,X.classList.add("lang-live"),Y.textContent="",Z.value="",Z.focus(),_i("audio3")},Ce=()=>{V.hidden=!0,X.classList.remove("lang-live"),Y.textContent=""};X.addEventListener("click",()=>{V.hidden?Ee():Ce()});const Ae=["pane","view","runs","node","dag","file","pacs","header","console","back","desktop","argus","help","notes"],We={pane:["split","zoom","close","bind","claim","focus","flip","resize"],resize:["left","right","up","down"],help:["keys","verbs"],notes:["pane"],focus:["left","right","up","down","last"],view:["files","runs","pacs"],runs:["enter","sort","filter"],node:["enter","immerse","back","clear"],dag:["layout","projection","scale","hue","draw","pulse","census","gravity","select","enter","physics","refresh"],draw:["spheres","stars"],pulse:["on","off"],census:["on","off"],gravity:["on","off"],physics:["charge","link","collide","gravity","reset"],file:["home","back","download","delete","sort","filter","follow","root","list","cards","preview"],pacs:["sort","filter","connect","disconnect","list","query","pull","status"],header:["stats","dag","away","restore"],console:["open","close","toggle","zoom","height"],desktop:["save","load","show","list","delete","clear","share"],split:["left","right","above","below"],bind:["unlinked","fs","viewer"],claim:["files","runs","pacs"],layout:["ranked","molecule"],projection:["2d","3d"],scale:["time","size"],hue:["status","compute"],argus:["verbs"]};if(Z.addEventListener("keydown",R=>{if(R.key==="Escape"){R.stopPropagation(),Ce();return}if(R.key==="Tab"){R.preventDefault();const j=Z.value.split(/\s+/),de=j[j.length-1]??"",ue=j.length<=1?"":j[j.length-2]??"",lt=(j.length<=1?Ae:We[ue]??We[j[0]??""]??[]).find(Le=>Le.startsWith(de.toLowerCase()));lt!==void 0&&(j[j.length-1]=lt,Z.value=`${j.join(" ")} `);return}if(R.key==="Enter"){const j=Z.value.trim();if(j.length===0){Ce();return}vc(G,j).then(de=>{de!==null?(Y.textContent=de,ve.output_write("data",`: ${j}
|
|
4327
4327
|
${de}
|