spexcode 0.5.4 → 0.5.6
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/package.json +1 -1
- package/spec-cli/hooks/dispatch.sh +10 -0
- package/spec-cli/src/cli.ts +6 -5
- package/spec-cli/src/contract-filter.ts +73 -29
- package/spec-cli/src/git.ts +80 -40
- package/spec-cli/src/harness.ts +127 -8
- package/spec-cli/src/index.ts +9 -3
- package/spec-cli/src/materialize.ts +118 -49
- package/spec-cli/src/reviewSnapshot.ts +4 -0
- package/spec-cli/src/reviews.ts +10 -5
- package/spec-cli/src/sessions.ts +113 -9
- package/spec-cli/templates/spec/project/.plugins/core/session-fail/spec.md +3 -1
- package/spec-cli/templates/spec/project/.plugins/core/spec.md +2 -2
- package/spec-dashboard/dist/assets/{App-C5vbTw8Q.js → App-B72LuS5I.js} +2 -2
- package/spec-dashboard/dist/assets/Dashboard-C5X4Va3V.js +27 -0
- package/spec-dashboard/dist/assets/{EvalsPage-BS7ITcNo.js → EvalsPage-BTvJIW8Q.js} +2 -2
- package/spec-dashboard/dist/assets/IssuesPage-Bn94h_HQ.js +1 -0
- package/spec-dashboard/dist/assets/{MobileApp-DVLnk9hz.js → MobileApp-ClbtwZ1e.js} +2 -2
- package/spec-dashboard/dist/assets/{Modal-6mHq6fbZ.js → Modal-6l_QtCKF.js} +1 -1
- package/spec-dashboard/dist/assets/{PageScroll-CAY4S4g4.js → PageScroll-B2kxcqJJ.js} +1 -1
- package/spec-dashboard/dist/assets/{ProjectsPage-UQyzsTWN.js → ProjectsPage-C8IPsMKV.js} +1 -1
- package/spec-dashboard/dist/assets/{SessionInterface-DKU4c1Z-.js → SessionInterface-B5jf7dW7.js} +11 -11
- package/spec-dashboard/dist/assets/SessionWindow-Dag_GiJB.js +1 -0
- package/spec-dashboard/dist/assets/{Settings-igR17pns.js → Settings-J3aibcXo.js} +1 -1
- package/spec-dashboard/dist/assets/{Thread-B-ZUarN1.js → Thread-Dg35J-Pu.js} +3 -3
- package/spec-dashboard/dist/assets/{TimelineChat-sc49Qj5d.js → TimelineChat-f0UF9fXq.js} +1 -1
- package/spec-dashboard/dist/assets/{data-B1ot4PF0.js → data-SNi0AmVT.js} +1 -1
- package/spec-dashboard/dist/assets/{index-BqBNCa1V.js → index-BUKLPN_4.js} +10 -10
- package/spec-dashboard/dist/index.html +1 -1
- package/spec-dashboard/dist/assets/Dashboard-u8RIS3NY.js +0 -27
- package/spec-dashboard/dist/assets/IssuesPage-DXbqQFW_.js +0 -1
- package/spec-dashboard/dist/assets/SessionWindow-zGwJaGbR.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as n,u as p,r as h,I as j}from"./index-BUKLPN_4.js";import{W as S,s as N,K as k,a0 as v,Y as z}from"./Thread-Dg35J-Pu.js";function g(s){let e=2166136261;for(let o=0;o<(s||"").length;o++)e^=s.charCodeAt(o),e=Math.imul(e,16777619);return e>>>0}function m(s){return g(s)%360}function H(s){const e=m(s);return{bg:`hsl(${e} 55% 42%)`,fg:`hsl(${e} 70% 92%)`}}function C(s){return`hsl(${m(s)} 65% 50%)`}const x=["◆","▲","●","■","★","✦","⬟","⬢","❖","◈","✸","⟡","✚","❂","◐","◑","⬣","▰","✶","⬤","✹","◇","⊛","✺"],b=["circle","rounded","square","hex"];function T(s){const e=g(s);return{seed:s,glyph:x[(e>>>9)%x.length],shape:b[(e>>>17)%b.length],...H(s)}}function A({seed:s,status:e,title:o,size:l=16}){const a=T(s),t={width:l,height:l};return n.jsx("span",{className:`avatar av-st-${e||"none"}`,"data-tip":o,"aria-label":o,style:t,children:n.jsx("span",{className:`av-face av-gen av-${a.shape}`,style:{...t,background:a.bg,color:a.fg,fontSize:l*.62},children:a.glyph})})}const M={merged:{color:"#859900"},active:{color:"#cb4b16"},drift:{color:"#b58900"},pending:{color:"#93a1a1"}},F={added:"+",edited:"~",deleted:"✕",moved:"→"},L=({size:s=12})=>n.jsx(j,{name:"lock",size:s});function W(s){if(!(s!=null&&s.length))return null;const e={};return s.forEach(o=>{e[o.op]=(e[o.op]||0)+1}),Object.entries(e).map(([o,l])=>`${F[o]}${l}`).join(" ")}function E({guides:s=[],expandable:e,kin:o=0}){return n.jsxs("span",{className:"sess-lead",children:[s.map((l,a)=>{const t=a===s.length-1?l?"tee":"elbow":l?"rail":"gap";return n.jsx("span",{className:`sess-rail ${t}`,"aria-hidden":"true"},a)}),e&&n.jsx("span",{className:"sess-fold pod sess-fold-slot","aria-hidden":"true",children:o})]})}function O({expanded:s,rollup:e,kin:o,onToggle:l}){const a=`${s?"Hide":"Show"} ${o} nested session${o===1?"":"s"}`;return n.jsx("button",{type:"button",tabIndex:-1,className:`sess-fold pod sess-fold-control${s?" open":""}`,style:s?{color:e,borderColor:e}:{background:e,borderColor:e},"aria-expanded":s,"aria-label":a,"data-tip":a,onMouseDown:t=>t.preventDefault(),onClick:t=>{t.stopPropagation(),l()},children:o})}function P(){const[s,e]=h.useState(()=>new Set),o=a=>e(t=>{const c=new Set(t);return c.has(a)?c.delete(a):c.add(a),c}),l=h.useCallback(a=>e(t=>{const c=a.filter(u=>u&&!t.has(u));if(!c.length)return t;const d=new Set(t);return c.forEach(u=>d.add(u)),d}),[]);return{expanded:s,toggle:o,expand:l}}function D({s,locked:e,showAvatar:o=!0,lead:l=null}){const a=p(),t=W(s.ops),c=N(s),d=a(`status.${s.status}`);return n.jsxs(n.Fragment,{children:[l,o&&n.jsx(A,{seed:s.id,status:s.status,title:`${k(s)} · ${d} — ${s.id.slice(0,8)}`}),n.jsxs("span",{className:"sess-meta",children:[n.jsx("span",{className:"sess-glyph",style:{color:z[s.status]},"data-tip":d,"aria-label":d,children:v[s.status]}),t&&n.jsx("span",{className:"sess-ops",children:t})]}),n.jsx("span",{className:"sess-id","data-tip":c,children:c}),s.archiveHazard&&n.jsx("span",{className:"sess-hazard","data-tip":s.archiveHazard,"aria-label":s.archiveHazard,children:n.jsx(j,{name:"issue-opened",size:13})}),e&&n.jsx("span",{className:"sess-lock","data-tip":a("sessionWindow.lockedTitle"),children:n.jsx(L,{})})]})}function G({item:s,baseClass:e,onToggle:o}){const l=p(),a=`${e} ${e}-${s.zone}${s.zone==="offline"?` si-zone-fold${s.folded?"":" open"}`:""}`;if(s.zone!=="offline")return n.jsx("div",{className:a,children:l(`sessionZone.${s.zone}`)});const t=l(s.folded?"sessionZone.showHistory":"sessionZone.hideHistory",{n:s.count});return n.jsxs("div",{className:a,children:[s.count>0&&n.jsx("button",{type:"button",tabIndex:-1,className:"si-zone-count","aria-expanded":!s.folded,"aria-label":t,"data-tip":t,onMouseDown:c=>c.preventDefault(),onClick:o,children:s.count}),n.jsx("span",{className:"si-zone-label",children:l(`sessionZone.${s.zone}`)})]})}function Y({sessions:s,activeId:e,onPick:o,onOpenSession:l}){const a=p(),{expanded:t,toggle:c}=P(),[d,u]=h.useState(!1),w=h.useMemo(()=>S(s,r=>t.has(r),{zoneFolded:r=>r==="offline"&&!d,keepVisible:r=>r.source===e}),[s,t,d,e]);return n.jsx("div",{className:"sesswin",children:s.length===0?n.jsxs("div",{className:"sesswin-empty",children:[a("sessionWindow.emptyBefore"),n.jsx("kbd",{children:"⏎"}),a("sessionWindow.emptyAfter")]}):w.map(r=>{if(r.type==="zone")return n.jsx(G,{item:r,baseClass:"sesswin-zone",onToggle:()=>u(y=>!y)},`zone-${r.zone}`);const i=r.s,f=i.source===e,$=r.expandable||r.depth?n.jsx(E,{guides:r.guides,expandable:r.expandable,kin:r.kin}):null;return n.jsxs("div",{className:"sess-tree-row sesswin-tree-row",style:{"--sess-fold-indent":`${r.depth*14}px`},children:[n.jsx("button",{type:"button",className:f?"sess-row locked":"sess-row",style:{"--ov":C(i.id)},onClick:()=>o(i),onDoubleClick:()=>l(i.id),"data-tip":a("sessionWindow.rowTitle"),children:n.jsx(D,{s:i,locked:f,lead:$})}),r.expandable&&n.jsx(O,{expanded:r.expanded,rollup:r.rollup,kin:r.kin,onToggle:()=>c(i.id)})]},i.id)})})}export{A,O as F,F as G,L,E as R,G as S,D as a,M as b,Y as c,C as l,P as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as x,r as o,j as e,L as N}from"./index-
|
|
1
|
+
import{B as x,r as o,j as e,L as N}from"./index-BUKLPN_4.js";import{A as j,k as b,a as T,i as f,r as S,s as k}from"./bindings-BC9vqpYU.js";import{P as v}from"./PageScroll-B2kxcqJJ.js";import{g as E,T as y,a as C,b as A,s as F}from"./terminalFont-C6oGNKrf.js";const h="spexcode.theme",g=[{code:"minimal",label:"Minimal"},{code:"things",label:"Things"},{code:"tokyonight",label:"Tokyo Night"},{code:"catppuccin",label:"Catppuccin"},{code:"everforest",label:"Everforest"},{code:"gruvbox",label:"Gruvbox"},{code:"rosepine",label:"Rosé Pine Dawn"},{code:"dracula",label:"Dracula"}],u=new Set(g.map(s=>s.code)),p="minimal";function L(){try{const s=localStorage.getItem(h);if(u.has(s))return s}catch{}return p}function w(s){const i=u.has(s)?s:p;try{document.documentElement.setAttribute("data-theme",i)}catch{}try{localStorage.setItem(h,i)}catch{}return i}function M({t:s}){const[i,d]=o.useState(0),[c,l]=o.useState(null),r=()=>d(n=>n+1);return o.useEffect(()=>{if(!c)return;const n=a=>{if(a.preventDefault(),a.stopPropagation(),a.key==="Escape"){l(null);return}["Shift","Control","Alt","Meta"].includes(a.key)||(k(c,{keys:[a.key]}),l(null),r())};return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},[c]),e.jsxs("section",{className:"legend-sec",children:[e.jsx("div",{className:"legend-h",children:s("settings.secShortcuts")}),e.jsx("div",{className:"set-keys",children:j.map(n=>e.jsxs("div",{className:"set-key-row",children:[e.jsx("span",{className:"legend-desc",children:s(n.desc)}),e.jsx("button",{className:`bind-cell${c===n.id?" capturing":""}${n.rebind?"":" fixed"}${f(n.id)?" custom":""}`,disabled:!n.rebind,onClick:()=>n.rebind&&l(n.id),children:c===n.id?e.jsx("span",{className:"bind-hint",children:s("settings.bindPrompt")}):b(n.id).map((a,m)=>e.jsx("kbd",{children:T(a)},m))})]},n.id))}),e.jsxs("div",{className:"set-foot",children:[e.jsx("span",{className:"legend-desc set-hint",children:s("settings.shortcutsHint")}),e.jsx("button",{className:"set-reset",onClick:()=>{S(),l(null),r()},children:s("settings.reset")})]})]})}function D(){const{t:s,lang:i,setLang:d}=x(),[c,l]=o.useState(L),[r,n]=o.useState(E),a=t=>{w(t),l(t)},m=t=>n(F(t));return e.jsx(v,{className:"page-settings-scroll",children:e.jsxs("div",{className:"settings-body",children:[e.jsx("h1",{className:"page-title",children:s("settings.title")}),e.jsxs("section",{className:"legend-sec",children:[e.jsx("div",{className:"legend-h",children:s("settings.secLanguage")}),e.jsx("div",{className:"set-langs",children:N.map(t=>e.jsx("button",{className:t.code===i?"set-lang on":"set-lang",onClick:()=>d(t.code),"aria-pressed":t.code===i,children:t.label},t.code))})]}),e.jsxs("section",{className:"legend-sec",children:[e.jsx("div",{className:"legend-h",children:s("settings.secTheme")}),e.jsx("div",{className:"set-langs",children:g.map(t=>e.jsx("button",{className:t.code===c?"set-lang on":"set-lang",onClick:()=>a(t.code),"aria-pressed":t.code===c,children:s(t.label)},t.code))})]}),e.jsxs("section",{className:"legend-sec",children:[e.jsx("div",{className:"legend-h",children:s("settings.secTerminal")}),e.jsxs("label",{className:"set-terminal-font",children:[e.jsx("span",{children:s("settings.terminalFontSize")}),e.jsx("input",{type:"range",min:A,max:C,step:y,value:r,onChange:t=>m(t.target.value)}),e.jsxs("output",{children:[r,"px"]})]})]}),e.jsx(M,{t:s})]})})}export{D as default};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{r as x,j as n,I as R,u as D,e as he,o as ns,p as ts,d as pe,g as P,t as as,v as rs,n as ne,w as ls,E as is,s as ge}from"./index-BqBNCa1V.js";import{P as Z}from"./PageScroll-CAY4S4g4.js";import{g as cs,h as me,i as os,j as ds,k as us}from"./data-B1ot4PF0.js";const q={working:"var(--green)",parked:"var(--green)",asking:"var(--yellow)",review:"var(--yellow)",done:"var(--yellow)",error:"var(--red)",idle:"var(--muted)",starting:"var(--muted)",queued:"var(--muted)","close-pending":"var(--muted)",offline:"var(--muted)",unknown:"var(--yellow)",corrupt:"var(--red)",retired:"var(--muted)"},Vn={working:"●",parked:"‖",asking:"?",review:"◑",done:"✓",error:"✕",idle:"·",starting:"◌",queued:"⋯","close-pending":"⊘",offline:"○",unknown:"⁇",corrupt:"⚠",retired:"⚑"},Ve=new Set(["asking","review","done","close-pending","error","corrupt"]),ee=e=>(e==null?void 0:e.liveness)==="offline"||(e==null?void 0:e.status)==="offline"?"offline":Ve.has(e==null?void 0:e.status)?"need":"run",je=e=>!!(e!=null&&e.archived),Pn=(e=[])=>({live:e.filter(s=>!je(s)),archived:e.filter(je)}),fs=(e,s)=>{const a=s?(e||[]).find(t=>t.id===s):null;return a&&ee(a)!=="offline"?a:null},we=e=>(e==null?void 0:e.sortKey)!=null?e.sortKey:(e==null?void 0:e.created)??0,ye=e=>{const s={need:0,run:1,offline:2};return[...e].sort((a,t)=>s[ee(a)]-s[ee(t)]||we(t)-we(a))},Fn=e=>(e==null?void 0:e.label)||(e==null?void 0:e.name)||(e==null?void 0:e.node)||(e==null?void 0:e.title)||(e==null?void 0:e.branch)||(e==null?void 0:e.id),hs=e=>(e==null?void 0:e.headline)||(e==null?void 0:e.name)||(e==null?void 0:e.activity)||(e==null?void 0:e.promptPreview)||(e==null?void 0:e.node)||(e==null?void 0:e.title)||(e==null?void 0:e.branch)||(e==null?void 0:e.id);function ps(e){const s=new Set(e.map(r=>r==null?void 0:r.id)),a=new Map,t=[];for(const r of e){const i=r!=null&&r.parent&&r.parent!==r.id&&s.has(r.parent)?r.parent:null;if(i){const l=a.get(i)||[];l.push(r),a.set(i,l)}else t.push(r)}return{roots:t,childrenOf:a}}function qn(e,s){const a=new Map(e.map(l=>[l==null?void 0:l.id,l])),t=[],r=new Set([s]);let i=a.get(s);for(;i!=null&&i.parent&&!r.has(i.parent);){const l=a.get(i.parent);if(!l)break;t.push(l.id),r.add(l.id),i=l}return t}function ms(e,s){let a=!1,t=!1,r=0;const i=(l,c)=>{for(const o of s.get(l)||[])c.has(o.id)||(c.add(o.id),r++,Ve.has(o.status)?a=!0:q[o.status]===q.working&&(t=!0),i(o.id,c))};return i(e,new Set([e])),{color:a?q.asking:t?q.working:q.idle,count:r}}function vs(e,s,{zoneFolded:a=()=>!1,keepVisible:t=()=>!1}={}){const{roots:r,childrenOf:i}=ps(e),l=[],c=(d,j,p,g)=>{const f=i.get(d.id)||[],y=f.length>0,k=y&&!!s(d.id),S=y?ms(d.id,i):null;if(l.push({type:"row",s:d,depth:j,expandable:y,expanded:k,rollup:(S==null?void 0:S.color)??null,kin:(S==null?void 0:S.count)??0,guides:g}),k){const A=ye(f).filter(N=>!p.has(N.id));A.forEach((N,m)=>{p.add(N.id),c(N,j+1,p,[...g,m<A.length-1])})}},o=(d,j)=>{let p=1;for(const g of i.get(d.id)||[])j.has(g.id)||(j.add(g.id),p+=o(g,j));return p},u=new Set;let h=null,v=null;for(const d of ye(r)){if(u.has(d.id))continue;const j=ee(d);if(j!==h&&(v={type:"zone",zone:j,count:0,folded:!!a(j)},l.push(v),h=j),v.count+=o(d,new Set([...u,d.id])),v.folded){const p=[],g=(f,y)=>{t(f)&&!u.has(f.id)&&p.push(f);for(const k of i.get(f.id)||[])y.has(k.id)||(y.add(k.id),g(k,y))};g(d,new Set([d.id]));for(const f of p)u.add(f.id),l.push({type:"row",s:f,depth:0,expandable:!1,expanded:!1,rollup:null,kin:0,guides:[]});u.add(d.id);continue}u.add(d.id),c(d,0,u,[])}return l}const Mn=e=>vs(e,()=>!0).filter(s=>s.type==="row").map(s=>s.s),te=typeof window<"u"?window.__escStack||(window.__escStack=[]):[];typeof window<"u"&&!window.__escStackBound&&(window.__escStackBound=!0,window.addEventListener("keydown",e=>{const s=window.__escStack;e.key!=="Escape"||!s||s.length===0||(e.preventDefault(),e.stopImmediatePropagation(),s[s.length-1].close())},!0));function Pe(e,s){const a=x.useRef(s);a.current=s,x.useEffect(()=>{if(!e)return;const t={close:()=>{var r;return(r=a.current)==null?void 0:r.call(a)}};return te.push(t),()=>{const r=te.indexOf(t);r>=0&&te.splice(r,1)}},[e])}const W=new Map;async function xs(e){if(W.has(e))return W.get(e);const s=cs(e).then(async a=>{const t=await a.json().catch(()=>null);if(!a.ok)throw new Error((t==null?void 0:t.error)||`HTTP ${a.status}`);return t}).finally(()=>W.delete(e));return W.set(e,s),s}const Kn=e=>{const s=typeof e=="string"&&/^\d+$/.test(e)?Number(e):Number.NaN;return Number.isSafeInteger(s)&&s>0?s:1};function gs(e,s){return s<=0?[]:s<=10?Array.from({length:s},(a,t)=>t+1):e<=7?[...Array.from({length:8},(a,t)=>t+1),"gap",s-1,s]:e>=s-6||e>s?[1,2,"gap",...Array.from({length:8},(a,t)=>s-7+t)]:[1,2,"gap",e-2,e-1,e,e+1,e+2,"gap",s-1,s]}function Fe(e,s,a,{enabled:t=!0,refreshKey:r=null,pollMs:i=15e3,view:l=null}={}){const[c,o]=x.useState(null),[u,h]=x.useState(null),[v,d]=x.useState(t),j=x.useRef(0),p=x.useCallback(async({quiet:f=!1}={})=>{if(!t)return null;const y=++j.current;f||d(!0),h(null);const k=new URLSearchParams({q:String(s||""),page:String(a)});l&&k.set("view",l);try{const S=await xs(`/api/${e}?${k}`);return y===j.current&&o(A=>A&&S&&A.revision===S.revision?A:S),S}catch(S){return y===j.current&&h(S instanceof Error?S.message:String(S)),null}finally{y===j.current&&d(!1)}},[e,t,a,s,l]),g=x.useRef(null);return x.useEffect(()=>{if(!t){d(!1);return}const f=`${e}\0${s}\0${a}\0${l||""}`,y=f!==g.current;g.current=f,y&&o(null),p({quiet:!y});const k=i>0?setInterval(()=>p({quiet:!0}),i):null;return()=>{k&&clearInterval(k)}},[e,s,a,l,t,p,i,r]),{data:c,error:u,loading:v,reload:p}}const be={issue:{open:{icon:"issue-opened",tone:"open",label:"reviewState.issueOpen"},closed:{icon:"issue-closed",tone:"closed",label:"reviewState.issueClosed"}},eval:{pass:{icon:"circle-check",tone:"pass",label:"score.pass"},fail:{icon:"circle-x",tone:"fail",label:"score.fail"},stalePass:{icon:"circle-check",tone:"stale",label:"score.stalePass"},staleFail:{icon:"circle-x",tone:"stale",label:"score.staleFail"},review:{icon:"clock",tone:"review",label:"reviewList.needsReview"},empty:{icon:"circle-minus",tone:"empty",label:"score.empty"},missing:{icon:"circle-dashed",tone:"empty",label:"score.missing"},legacy:{icon:"circle-minus",tone:"empty",label:"score.empty"}}},js=(e,s)=>{var t;const a=e==="issue"?s==="open"?"open":"closed":s||"empty";return((t=be[e])==null?void 0:t[a])||be.eval.empty};function ve({kind:e,state:s,showLabel:a=!1,size:t=16,className:r="",title:i}){const l=D(),c=js(e,s),o=i||l(c.label);return n.jsxs("span",{className:`review-state ${e} ${c.tone} ${r}`,"data-tip":o,"aria-label":o,children:[n.jsx("span",{className:"review-state-icon",style:{width:t,height:t},children:n.jsx(R,{name:c.icon,size:t})}),a&&n.jsx("span",{className:"review-state-label",children:o})]})}function ws(e,s){const a={...e,...s};for(const[t,r]of Object.entries(a))(r==null||r==="")&&delete a[t];return a}const ys=e=>e&&typeof e=="object"?e.hasData?e.filtered:e.dataset:e,qe=(e,s,a)=>{const t=Array.isArray(e)?e:[];return!(s!=null&&String(s)!=="")||a==null||t.some(i=>String(i.value)==="")?t:[{value:"",label:a},...t]},bs=(e=[])=>e.reduce((s,a)=>((a.active??(a.value!=null&&String(a.value)!==""))&&(s.mobile+=1,a.mobileOnly||(s.desktop+=1)),s),{desktop:0,mobile:0}),xe=(e,s,a)=>s?a==="Home"?0:a==="End"?s-1:a==="ArrowDown"||a==="ArrowRight"?e<0?0:(e+1)%s:a==="ArrowUp"||a==="ArrowLeft"?e<0?s-1:(e-1+s)%s:e:-1,Ns=(e,s)=>{var t;const a=e==null?void 0:e.tagName;return a==="INPUT"||a==="TEXTAREA"||a==="SELECT"||a==="BUTTON"&&(s==="Enter"||s===" ")||s==="Enter"&&((t=e==null?void 0:e.closest)!=null&&t.call(e,"a[href]"))?!1:s==="j"||s==="k"||s==="Enter"},ae=e=>[...(e==null?void 0:e.querySelectorAll('[role="menuitemradio"]'))||[]].filter(s=>s.getClientRects().length>0),re=(e,s)=>{const a=e[s];if(a){for(const t of e)t.tabIndex=t===a?0:-1;a.focus()}};function Me(){const[e,s]=x.useState(!1),a=x.useRef(null),t=x.useRef(null),r=x.useRef(null),i=x.useRef("checked"),l=(d=!1)=>{var j;d&&((j=r.current)==null||j.focus()),s(!1)},c=(d,j="checked")=>{r.current=d,i.current=j,s(!0)},o=d=>{e?l(!1):c(d)};return Pe(e,()=>l(!0)),x.useEffect(()=>{if(!e)return;const d=j=>{var p;(p=a.current)!=null&&p.contains(j.target)||l(!1)};return window.addEventListener("pointerdown",d,!0),()=>window.removeEventListener("pointerdown",d,!0)},[e]),x.useEffect(()=>{if(!e)return;const d=requestAnimationFrame(()=>{const j=ae(t.current),p=j.findIndex(f=>f.getAttribute("aria-checked")==="true"),g=i.current==="last"?j.length-1:i.current==="first"?0:p>=0?p:0;re(j,g)});return()=>cancelAnimationFrame(d)},[e]),{open:e,ref:a,menuRef:t,close:l,toggle:o,onTriggerKeyDown:d=>{d.key!=="ArrowDown"&&d.key!=="ArrowUp"||(d.preventDefault(),d.stopPropagation(),c(d.currentTarget,d.key==="ArrowUp"?"last":"first"))},onMenuKeyDown:d=>{if(!["ArrowDown","ArrowUp","Home","End"].includes(d.key))return;const j=ae(t.current),p=j.indexOf(document.activeElement);d.preventDefault(),d.stopPropagation(),re(j,xe(p,j.length,d.key))},onItemFocus:d=>{const j=ae(t.current);re(j,j.indexOf(d.currentTarget))}}}function On({label:e,value:s="",options:a=[],onChange:t,mobile:r=!1,clearLabel:i}){const l=Me(),c=qe(a,s,i);if(!c.length)return null;const o=c.find(v=>String(v.value)===String(s)),u=s?(o==null?void 0:o.label)||String(s):"",h=u?`${e}: ${u}`:e;return n.jsxs("div",{className:`rl-facet-wrap ${r?"mobile-stay":""}`,ref:l.ref,children:[n.jsxs("button",{type:"button",className:`rl-facet ${s?"active":""}`,"aria-label":h,"aria-haspopup":"menu","aria-expanded":l.open,onClick:v=>l.toggle(v.currentTarget),onKeyDown:l.onTriggerKeyDown,children:[n.jsx("span",{className:"rl-facet-label",children:h}),r&&n.jsx("span",{className:"rl-facet-label-mobile","aria-hidden":"true",children:u||e}),n.jsx(R,{name:"chevron-down",size:12})]}),l.open&&n.jsx("div",{className:"rl-menu",role:"menu","aria-label":e,ref:l.menuRef,onKeyDown:l.onMenuKeyDown,children:c.map(v=>n.jsxs("button",{type:"button",role:"menuitemradio","aria-checked":String(v.value)===String(s),tabIndex:-1,className:"rl-menu-item",onFocus:l.onItemFocus,onClick:()=>{l.close(!0),t(v.value)},children:[n.jsx(R,{name:String(v.value)===String(s)?"check":"blank",size:13}),n.jsx("span",{children:v.label}),v.count!=null&&n.jsx("span",{className:"rl-menu-count",children:v.count})]},String(v.value)))})]})}function ks({label:e,groups:s=[],clearLabel:a,compact:t=!1,className:r=""}){const i=D(),l=x.useId(),c=s.map(d=>({...d,options:qe(d.options,d.value,d.clearLabel===null?null:d.clearLabel||a)})).filter(d=>d.options.length),o=c.some(d=>!d.mobileOnly),u=bs(c),h=Me();if(!c.length)return null;const v=(d,j)=>d>0&&n.jsxs("span",{className:`rl-secondary-filter-count ${j}`,children:[n.jsx("span",{"aria-hidden":"true",children:d}),n.jsx("span",{className:"sr-only",children:i("reviewList.activeFilters",{n:d})})]});return n.jsxs("div",{className:`rl-secondary-filters ${o?"":"mobile-only"} ${u.desktop?"active-desktop":""} ${u.mobile?"active-mobile":""} ${r}`,ref:h.ref,children:[t?n.jsx(he,{icon:"filter",size:16,className:"rl-secondary-filters-trigger compact",label:e,"aria-haspopup":"menu","aria-expanded":h.open,onClick:d=>h.toggle(d.currentTarget),onKeyDown:h.onTriggerKeyDown}):n.jsxs("button",{type:"button",className:"rl-secondary-filters-trigger","aria-haspopup":"menu","aria-expanded":h.open,onClick:d=>h.toggle(d.currentTarget),onKeyDown:h.onTriggerKeyDown,children:[n.jsx(R,{name:"filter",size:14}),n.jsx("span",{children:e}),v(u.desktop,"for-desktop"),v(u.mobile,"for-mobile"),n.jsx(R,{name:"chevron-down",size:12})]}),h.open&&n.jsx("div",{className:"rl-menu rl-secondary-filters-menu",role:"menu","aria-label":e,ref:h.menuRef,onKeyDown:h.onMenuKeyDown,children:c.map((d,j)=>n.jsxs("div",{role:"group","aria-labelledby":`${l}-group-${j}`,className:`rl-menu-group ${d.mobileOnly?"mobile-only":""}`,children:[n.jsx("div",{className:"rl-menu-label",id:`${l}-group-${j}`,children:d.label}),d.options.map(p=>n.jsxs("button",{type:"button",role:"menuitemradio","aria-checked":String(p.value)===String(d.value||""),tabIndex:-1,className:"rl-menu-item",onFocus:h.onItemFocus,onClick:()=>{h.close(!0),d.onChange(p.value)},children:[n.jsx(R,{name:String(p.value)===String(d.value||"")?"check":"blank",size:13}),n.jsx("span",{children:p.label}),p.count!=null&&n.jsx("span",{className:"rl-menu-count",children:p.count})]},String(p.value)))]},`${d.label}-${d.mobileOnly?"mobile":"all"}`))})]})}function _n({state:e,title:s,meta:a,aside:t}){return n.jsxs("div",{className:"rl-row-grid",children:[n.jsx("div",{className:"rl-row-state",children:e}),n.jsxs("div",{className:"rl-row-body",children:[n.jsx("div",{className:"rl-row-title",children:s}),a&&n.jsx("div",{className:"rl-row-meta",children:a})]}),t&&n.jsx("div",{className:"rl-row-aside",children:t})]})}const G=e=>{const s=String(e??"").trim();return s?`${s} `:""};function Ss({value:e="",onSubmit:s,placeholder:a,label:t,keys:r=[],suggest:i={}}){const[l,c]=x.useState(()=>G(e)),[o,u]=x.useState(-1),[h,v]=x.useState(-1),d=x.useRef(null),j=x.useRef(null),p=x.useId(),g=x.useRef(null),f=m=>requestAnimationFrame(()=>{const E=d.current;E&&(m&&E.focus(),E.setSelectionRange(E.value.length,E.value.length))});x.useEffect(()=>{c(G(e)),u(-1),v(-1),f(g.current!==null&&g.current!==e),g.current=e},[e]);const y=o>=0?ns(l,o,r,i):{start:0,end:0,items:[]},k=y.items.length>0;Pe(k,()=>u(-1));const S=()=>{j.current&&d.current&&(j.current.scrollLeft=d.current.scrollLeft)};x.useEffect(S);const A=m=>{u(-1),v(-1);const E=m.trim();c(G(E)||G(e)),f(!0),s(E)},N=m=>{const E=`${l.slice(0,y.start)}${m.insert}${l.slice(y.end)}`;if(c(E),m.type==="value"){A(E);return}const C=y.start+m.insert.length;u(C),v(-1),requestAnimationFrame(()=>{var w,$;(w=d.current)==null||w.focus(),($=d.current)==null||$.setSelectionRange(C,C)})};return n.jsxs("form",{className:"rl-query rq",role:"search",onSubmit:m=>{m.preventDefault(),A(l)},children:[n.jsxs("div",{className:"rq-wrap",children:[n.jsx("div",{className:"rq-hl","aria-hidden":"true",ref:j,children:ts(l).map((m,E)=>m.ws||m.key==null||!r.includes(m.key)?n.jsx("span",{children:m.raw},E):n.jsxs("span",{className:"rq-tok",children:[n.jsx("span",{className:"rq-tok-key",children:m.raw.slice(0,m.key.length+1)}),n.jsx("span",{className:"rq-tok-val",children:m.raw.slice(m.key.length+1)})]},E))}),n.jsx("input",{ref:d,role:"combobox","aria-expanded":k,"aria-controls":p,"aria-autocomplete":"list","aria-activedescendant":k&&h>=0?`${p}-o${h}`:void 0,value:l,spellCheck:!1,autoComplete:"off",placeholder:a,"aria-label":t,onChange:m=>{c(m.target.value),u(m.target.selectionStart??m.target.value.length),v(-1)},onScroll:S,onKeyDown:m=>{k&&(m.key==="ArrowDown"||m.key==="ArrowUp"?(m.preventDefault(),v(xe(h,y.items.length,m.key))):m.key==="Enter"&&h>=0&&(m.preventDefault(),N(y.items[h])))},onBlur:()=>u(-1)})]}),k&&n.jsx("div",{className:"rl-menu rq-list",role:"listbox",id:p,"aria-label":t,children:y.items.map((m,E)=>n.jsxs("div",{id:`${p}-o${E}`,role:"option","aria-selected":E===h,className:`rq-opt ${E===h?"active":""}`,onPointerDown:C=>{C.preventDefault(),N(m)},children:[n.jsx("span",{className:"rq-opt-token",children:m.insert.trim()}),m.label&&m.label!==m.value&&n.jsx("span",{className:"rq-opt-label",children:m.label})]},m.insert))}),n.jsx("button",{type:"submit",className:"rl-query-submit","data-tip":t,"aria-label":t,children:n.jsx(R,{name:"search",size:16})})]})}function Ke({value:e="",onChange:s,placeholder:a,searchLabel:t,filterLabel:r,groups:i,clearLabel:l,clearSearchLabel:c,summary:o}){const u=D(),h=n.jsxs("div",{className:"rf-compact",role:"search",children:[n.jsx("span",{className:"rf-search-icon",children:n.jsx(R,{name:"search",size:13})}),n.jsx("input",{value:e,onChange:d=>s(d.target.value),placeholder:a,"aria-label":t}),e&&n.jsx(he,{icon:"x",size:12,className:"rf-clear",label:c,onClick:()=>s("")}),n.jsx(ks,{label:r,clearLabel:l,groups:i,compact:!0,className:"rf-secondary-filters"})]});if(!o)return h;const v=u("reviewList.showing",{shown:o.shown,total:o.total});return n.jsxs("div",{className:"rf-row",children:[n.jsxs("span",{className:"rf-summary","data-tip":v,children:[n.jsx("span",{className:"sr-only",children:v}),n.jsx("span",{className:"rf-summary-full","aria-hidden":"true",children:v}),n.jsxs("span",{className:"rf-summary-compact","aria-hidden":"true",children:[o.shown,"/",o.total]})]}),h]})}function $s({page:e,pageCount:s,prev:a,next:t,hrefFor:r}){const i=D();if(s<=1&&e<=1)return null;const l=(c,o,u,h="")=>c==null?n.jsx("span",{className:`rl-page-link disabled ${h}`,"aria-disabled":"true",children:o}):n.jsx("a",{className:`rl-page-link ${h}`,href:r(c),rel:u,"aria-label":u?i(`reviewList.${u}Page`):i("reviewList.page",{n:c}),children:o});return n.jsxs("nav",{className:"rl-pagination","aria-label":i("reviewList.pagination"),children:[l(a,i("reviewList.previous"),"prev","direction"),gs(e,s).map((c,o)=>c==="gap"?n.jsx("span",{className:"rl-page-gap","aria-hidden":"true",children:"…"},`gap-${o}`):n.jsx("a",{className:"rl-page-link number",href:r(c),"aria-label":i("reviewList.page",{n:c}),"aria-current":c===e?"page":void 0,children:c},c)),l(t,i("reviewList.next"),"next","direction")]})}function Bn({notice:e,leading:s,error:a,loading:t=!1,title:r,action:i,search:l,sections:c=[],sectionMode:o="tabs",facets:u,secondaryFilters:h,rows:v,empty:d,pagination:j,children:p}){const g=D(),[f,y]=x.useState(null),k=x.useId(),S=x.useRef({});S.current={rows:v,cur:f},x.useEffect(()=>{const w=$=>{if($.metaKey||$.ctrlKey||$.altKey||!Ns($.target,$.key))return;const I=S.current.rows.filter(V=>V.href);if(!I.length)return;if($.key==="Enter"){const V=I.find(b=>b.key===S.current.cur);V&&($.preventDefault(),$.stopPropagation(),window.location.hash=V.href);return}$.preventDefault(),$.stopPropagation();const T=I.findIndex(V=>V.key===S.current.cur),_=T<0?$.key==="j"?0:I.length-1:Math.max(0,Math.min(I.length-1,T+($.key==="j"?1:-1)));y(I[_].key)};return window.addEventListener("keydown",w,!0),()=>window.removeEventListener("keydown",w,!0)},[]),x.useEffect(()=>{var w;(w=document.querySelector(".lp-row.cur"))==null||w.scrollIntoView({block:"nearest"})},[f]);const A=ys(d),N=Math.max(0,c.findIndex(w=>w.active)),m=o==="tabs",E=`${k}-panel`,C=w=>`${k}-tab-${w}`;return n.jsxs(Z,{className:"lp-page",children:[e&&n.jsx("div",{className:"fv-notice",children:e}),s,n.jsxs("div",{className:"rl-content",children:[n.jsxs("div",{className:"rl-titlebar",children:[n.jsx("h1",{children:r}),i]}),l&&n.jsx(Ss,{...l}),a&&n.jsx("div",{className:"fv-error lp-error",role:"alert",children:a}),n.jsxs("section",{className:"rl-list",children:[n.jsxs("header",{className:"lp-head",children:[n.jsx("div",{className:"rl-sections",role:m?"tablist":"group","aria-label":r,...m?{"aria-orientation":"horizontal"}:{},children:c.map((w,$)=>n.jsxs("button",{type:"button",role:m?"tab":void 0,"aria-selected":m?w.active:void 0,"aria-pressed":m?void 0:w.active,"aria-controls":m?E:void 0,id:m?C($):void 0,tabIndex:m?$===N?0:-1:void 0,className:`rl-section ${w.active?"active":""}`,onClick:w.onSelect,onKeyDown:I=>{var V,b;if(!m||!["ArrowLeft","ArrowRight","Home","End"].includes(I.key))return;const T=[...I.currentTarget.closest('[role="tablist"]').querySelectorAll('[role="tab"]')],_=xe(T.indexOf(I.currentTarget),T.length,I.key);I.preventDefault(),I.stopPropagation(),(V=T[_])==null||V.focus(),(b=T[_])==null||b.click()},children:[n.jsx("span",{children:w.label}),n.jsx("span",{className:"rl-section-count",children:w.count}),w.countSuffix&&n.jsxs("span",{className:"rl-section-suffix","data-tip":w.countSuffix.text,children:[n.jsx("span",{className:"sr-only",children:w.countSuffix.text}),n.jsx("span",{className:"rl-section-suffix-full","aria-hidden":"true",children:w.countSuffix.text}),n.jsx("span",{className:"rl-section-suffix-compact","aria-hidden":"true",children:w.countSuffix.compact})]})]},w.key))}),n.jsxs("div",{className:"rl-facets",children:[u,h]})]}),n.jsxs("div",{className:"lp-rows",role:m?"tabpanel":"region",id:E,"aria-busy":t||void 0,"aria-labelledby":m?C(N):void 0,"aria-label":m?void 0:r,children:[v.length===0&&n.jsx("div",{className:"lp-empty",children:t?g("common.loading"):A}),v.map(w=>w.href?n.jsx("a",{className:`lp-row ${w.cls||""} ${f===w.key?"cur":""}`,href:w.href,children:w.content},w.key):n.jsx("div",{className:`lp-row inert ${w.cls||""}`,children:w.content},w.key))]})]}),j&&n.jsx($s,{...j})]}),p]})}function zn({title:e,titleMeta:s,status:a,side:t,composer:r,missing:i,failure:l,listHref:c,listLabel:o,backHref:u,backLabel:h,children:v}){return l?n.jsxs(Z,{className:"ds-page ds-missing ds-failed",role:"alert",children:[n.jsx("div",{className:"ds-missing-note",children:l}),c&&n.jsx("a",{className:"ds-backlink",href:c,children:o})]}):i?n.jsxs(Z,{className:"ds-page ds-missing",children:[n.jsx("div",{className:"ds-missing-note",children:i}),c&&n.jsx("a",{className:"ds-backlink",href:c,children:o})]}):n.jsxs(Z,{className:"ds-page",children:[n.jsxs("header",{className:"ds-head",children:[u&&n.jsx("a",{className:"ds-back",href:u,"data-tip":h,"aria-label":h,children:n.jsx(R,{name:"arrow-left",size:16})}),n.jsxs("h1",{className:"ds-title",children:[e,s&&n.jsx("span",{className:"ds-title-meta",children:s})]})]}),a&&n.jsx("div",{className:"ds-status",children:a}),n.jsxs("div",{className:"ds-cols",children:[n.jsxs("div",{className:"ds-main",children:[v,r&&n.jsx("div",{className:"ds-compose",children:r})]}),n.jsx("aside",{className:"ds-side",children:t})]})]})}function Hn({label:e,children:s}){return n.jsxs("div",{className:"ds-side-sec",children:[n.jsx("span",{className:"ds-side-label",children:e}),n.jsx("div",{className:"ds-side-body",children:s})]})}function Es({text:e,tip:s,dim:a=!1,mono:t=!1,href:r=null,external:i=!1,onClick:l=null,className:c="",lead:o=null,trail:u=null,label:h=null}){const v=`ds-val${a?" dim":""}${t?" mono":""}${r||l?" link":""}${c?` ${c}`:""}`,d=s??(typeof e=="string"?e:void 0),j=h?{"aria-label":h}:{},p=n.jsxs(n.Fragment,{children:[o,n.jsx("span",{className:"ds-val-text",children:e}),u]});return r?n.jsx("a",{className:v,href:r,"data-tip":d,...j,...i?{target:"_blank",rel:"noreferrer"}:{},children:p}):l?n.jsx("button",{type:"button",className:v,onClick:l,"data-tip":d,...j,children:p}):n.jsx("span",{className:v,"data-tip":d,children:p})}const le=Object.freeze({RESULT:"result",BLIND:"blind",UNMEASURED:"unmeasured",DANGLING:"dangling"}),Oe=e=>{var s;return(s=e==null?void 0:e.evidence)!=null&&s.length?e.evidence:(e==null?void 0:e.blob)!=null?[{hash:e.blob,kind:e.blobKind||"image",state:e.blobState||"present"}]:[]},Un=e=>{const s=Oe(e);return s.length?["video","image","transcript","data"].filter(a=>s.some(t=>t.kind===a)):["note"]},Wn=e=>String(e||"").length>22?`${String(e).slice(0,8)}…`:e;function _e(e,s,a){return a.map(t=>t==="section"?e.section:e.facets[t]).filter(t=>{var r;return(t==null?void 0:t.meaningful)!==!1&&(((r=t==null?void 0:t.options)==null?void 0:r.length)>1||(t==null?void 0:t.value)!=null&&t.value!==""&&t.value!=="all")}).map(t=>({key:t.key,label:t.label,value:t.value,active:t.value!=null&&t.value!==""&&t.value!=="all",options:t.options,clearLabel:t.value==="all"?null:void 0,onChange:r=>s({[t.key]:r||null})}))}const z=e=>pe(`/api/evidence/${e}`);function Ls({src:e,alt:s,onClose:a}){return x.useEffect(()=>{const t=r=>{r.key==="Escape"&&(r.preventDefault(),r.stopPropagation(),a())};return window.addEventListener("keydown",t,!0),()=>window.removeEventListener("keydown",t,!0)},[a]),n.jsx("div",{className:"lightbox",onClick:a,children:n.jsx("img",{src:e,alt:s})})}function As({hash:e}){const s=D(),[a,t]=x.useState(null);return x.useEffect(()=>{let r=!0;return fetch(z(e)).then(i=>i.ok?i.text():Promise.reject(new Error("miss"))).then(i=>{r&&t(i)}).catch(()=>{r&&t("")}),()=>{r=!1}},[e]),a===null?n.jsx("pre",{className:"eval-transcript loading",children:s("nodeView.eval.loadingTranscript")}):n.jsx("pre",{className:"eval-transcript",children:a})}function Ds({hash:e,collapsed:s=!1}){const a=D(),[t,r]=x.useState(null);if(x.useEffect(()=>{let l=!0;return fetch(z(e)).then(c=>c.ok?c.text():Promise.reject(new Error("miss"))).then(c=>{let o=c,u=!0;try{o=JSON.stringify(JSON.parse(c),null,2)}catch{u=!1}l&&r({text:o,valid:u})}).catch(()=>{l&&r({text:"",valid:!1})}),()=>{l=!1}},[e]),t===null)return n.jsx("pre",{className:"eval-data loading",children:a("nodeView.eval.loadingData")});const i=t.valid?a("nodeView.eval.data"):a("nodeView.eval.dataInvalid");return s?n.jsxs("details",{className:"eval-datawrap eval-datafold",children:[n.jsx("summary",{className:"eval-datahead",children:i}),n.jsx("pre",{className:"eval-data",children:t.text})]}):n.jsxs("div",{className:"eval-datawrap",children:[n.jsx("div",{className:"eval-datahead",children:i}),n.jsx("pre",{className:"eval-data",children:t.text})]})}function Is({hash:e,alt:s}){const[a,t]=x.useState(!1);return n.jsxs(n.Fragment,{children:[n.jsx("img",{className:"an-image",src:z(e),alt:s,loading:"lazy",onClick:()=>t(!0)}),a&&n.jsx(Ls,{src:z(e),alt:s,onClose:()=>t(!1)})]})}function Cs({exit:e}){return n.jsx(R,{name:e?"minimize":"maximize",size:15})}function Gn({target:e,className:s=""}){const a=D(),[t,r]=x.useState(!1);x.useEffect(()=>{const l=()=>{const c=document.fullscreenElement,o=e==null?void 0:e.current;r(!!c&&!!o&&(c===o||o.contains(c)))};return document.addEventListener("fullscreenchange",l),()=>document.removeEventListener("fullscreenchange",l)},[e]);const i=()=>{var c,o;const l=e==null?void 0:e.current;l&&(document.fullscreenElement?(c=document.exitFullscreen||document.webkitExitFullscreen)==null||c.call(document):(o=l.requestFullscreen||l.webkitRequestFullscreen)==null||o.call(l))};return n.jsx("button",{type:"button",className:`an-fs ${s}`,onClick:i,"data-tip":a(t?"annotator.exitFullscreen":"annotator.fullscreen"),"aria-label":a(t?"annotator.exitFullscreen":"annotator.fullscreen"),children:n.jsx(Cs,{exit:t})})}function Be({e,alt:s="",collapsed:a=!1}){const t=D();return e.state==="miss"?n.jsx("div",{className:"eval-noimg",children:t("nodeView.eval.miss")}):e.kind==="transcript"?n.jsx(As,{hash:e.hash}):e.kind==="data"?n.jsx(Ds,{hash:e.hash,collapsed:a}):e.kind==="video"?n.jsx("video",{className:"eval-video",src:z(e.hash),controls:!0,preload:"metadata",playsInline:!0}):n.jsx(Is,{hash:e.hash,alt:s})}const Q=new Map;function Ts(e){const[s,a]=x.useState(()=>Q.get(e)??null);return x.useEffect(()=>{if(Q.has(e)){a(Q.get(e));return}let t=!0;return fetch(z(e),{headers:{Range:"bytes=0-0"}}).then(r=>{const i=r.headers.get("content-type")||"",l=r.ok?{kind:i.startsWith("video/")?"video":i.startsWith("image/")?"image":i.startsWith("application/json")?"data":"transcript",state:"present"}:{kind:"image",state:"miss"};Q.set(e,l),t&&a(l)}).catch(()=>{t&&a({kind:"image",state:"miss"})}),()=>{t=!1}},[e]),s}function ze({hash:e,alt:s=""}){const a=Ts(e);return a?n.jsx(Be,{e:{hash:e,...a},alt:s}):null}function Rs(e){var s,a;return((s=e==null?void 0:e.verdict)==null?void 0:s.status)==="pass"?"check":((a=e==null?void 0:e.verdict)==null?void 0:a.status)==="fail"?"cross":null}function He(e){const s=Rs(e);return s?e.fresh?s==="cross"?"fail":"pass":s==="cross"?"staleFail":"stalePass":"empty"}function Vs(e,s){if(!e)return[];const a=new Map;for(const t of s||[])a.has(t.scenario)||a.set(t.scenario,t);return e.map(t=>{const r=a.get(t.name)||null;return{...t,reading:r,state:r?He(r):"missing"}})}function Ps(e){return e.length?e.some(s=>s.state==="fail")?"fail":e.some(s=>s.state==="staleFail")?"staleFail":e.some(s=>s.state==="stalePass")?"stalePass":e.some(s=>s.state==="empty"||s.state==="missing")?"empty":"pass":null}const Fs=e=>e.fail>0?"fail":e.staleFail>0?"staleFail":e.stalePass>0?"stalePass":e.empty>0?"empty":"pass";function qs({scenarios:e,evals:s,summary:a=null,href:t}){const r=D(),i=a?null:Vs(e,s),l=(a==null?void 0:a.total)??i.length;if(!l)return null;const c=a?Fs(a):Ps(i),o=(a==null?void 0:a.pass)??i.filter(d=>d.state==="pass").length,u=r("score.count",{satisfied:o,total:l,outstanding:l-o}),h=n.jsxs(n.Fragment,{children:[n.jsx(R,{name:"check",size:11}),o,"/",l]});if(!t)return n.jsx("span",{className:`scenario-count ${c}`,"data-tip":u,"aria-label":u,children:h});const v=`${u} — ${r("score.openList")}`;return n.jsx("a",{className:`scenario-count ${c}`,href:t,"data-tip":v,"aria-label":v,children:h})}function J({kind:e,state:s,cls:a,n:t,label:r}){return n.jsxs("span",{className:`ovc ${a}`,"data-tip":r,children:[n.jsx(ve,{kind:e,state:s,title:r,size:11}),t]})}function Ms({tags:e}){return e!=null&&e.length?n.jsx("span",{className:"tag-chips",children:e.map(s=>n.jsx("span",{className:"tag-chip",children:s},s))}):null}function Ue({state:e,title:s}){return e?n.jsx(ve,{kind:"eval",state:e,title:s,className:`score-badge ${e}`,size:14}):null}const Qn=e=>({kind:"graph-node",nodeId:e}),Jn=e=>({kind:"session",sessionId:e}),Ks=e=>({kind:"issue",issueId:e}),We=(e,s)=>({kind:"review-list",page:e,query:s}),Ge=(e,s=null)=>({kind:"eval",nodeId:e,scenario:s}),Os=(e,s,a)=>({kind:"session-eval",sessionId:e,nodeId:s,scenario:a});function O(e){if(!e)return P("graph");if(e.kind==="graph-node")return P("graph");if(e.kind==="session")return P("sessions",e.sessionId);if(e.kind==="session-eval"){const s=e.nodeId&&e.scenario?`${e.nodeId}/${e.scenario}`:null;return P("evals",s,{q:s?`scope:${e.sessionId}`:as(e.sessionId)})}return e.kind==="issue"?P("issues",e.issueId):e.kind==="review-list"?P(e.page,null,e.query?{q:e.query}:null):e.kind==="eval"?e.scenario?P("evals",`${e.nodeId}/${e.scenario}`):P("evals",null,{q:rs(e.nodeId)}):P("graph")}function Yn(e,s=null){return e==="issues"?P("issues"):s?O(Os(s)):P("evals")}function Zn(e,{onFocusNode:s,onOpenSession:a}={}){if(e)if(e.kind==="graph-node")s==null||s(e.nodeId),ne("graph");else if(e.kind==="session")a?a(e.sessionId):ne("sessions",e.sessionId);else{const{page:t,param:r,query:i}=ls(O(e));ne(t,r,{query:i})}}function Ne({issue:e,onNavigateAddress:s}){const a=(e==null?void 0:e.store)||"local",t=(e==null?void 0:e.status)||"open",r=Ks(e.id);return n.jsxs("a",{className:"issue-card",href:O(r),"data-tip":e.concern||e.id,onClick:s?i=>{i.defaultPrevented||i.button!==0||i.metaKey||i.ctrlKey||i.shiftKey||i.altKey||(i.preventDefault(),s(r))}:void 0,children:[n.jsxs("span",{className:"issue-card-top",children:[n.jsx("span",{className:"issue-num",children:e.id}),n.jsx("span",{className:`fv-store fv-store-${a==="local"?"local":"forge"}`,children:a}),n.jsx(ve,{kind:"issue",state:t,showLabel:!0,size:12,className:"issue-card-state"})]}),n.jsx("span",{className:"issue-card-title",children:e.concern})]})}const ke=[{key:"spec",label:"spec"},{key:"history",label:"history"},{key:"issues",label:"issues"},{key:"eval",label:"eval"}];function _s(e){var s;return(s=e==null?void 0:e.overlays)!=null&&s.length?[{key:"edit",label:"edit"},...ke]:ke}const Qe=(e,s,a={})=>{let t=`${e==="issue"?"is:issue":is}${a.q?` ${String(a.q).trim()}`:""}`.trim();const r=e==="issue"?{state:"state",author:"author",store:"store",session:"session"}:{verdict:"verdict",review:"state",freshness:"freshness",kind:"evidence",filer:"filer",session:"session"};for(const[i,l]of Object.entries(r))a[i]&&(t=ge(t,l,a[i]));return ge(t,"node",s)},Bs={state:"reviewList.facetState",verdict:"reviewList.facetVerdict",author:"reviewList.facetAuthor",store:"reviewList.facetStore",review:"reviewList.facetReview",freshness:"reviewList.facetFreshness",kind:"reviewList.facetKind",filer:"reviewList.facetFiler",session:"reviewList.facetSession"},Je=(e,s)=>{const a=t=>t&&{...t,label:s(Bs[t.key]||t.label||t.key)};return{section:a(e==null?void 0:e.section),facets:Object.fromEntries(Object.entries((e==null?void 0:e.facets)||{}).map(([t,r])=>[t,a(r)]))}},zs={added:"+",edited:"~",deleted:"✕",moved:"→"};function U(e){const s=[],a=/`([^`]+)`|\*\*([^*]+)\*\*|\[\[([^\]]+)\]\]/g;let t=0,r,i=0;for(;r=a.exec(e);)r.index>t&&s.push(e.slice(t,r.index)),r[1]!=null?s.push(n.jsx("code",{children:r[1]},i++)):r[2]!=null?s.push(n.jsx("strong",{children:r[2]},i++)):s.push(n.jsx("span",{className:"doc-link",children:r[3]},i++)),t=a.lastIndex;return t<e.length&&s.push(e.slice(t)),s}function Se(e){const s=e.trim();return s.includes("|")&&/^\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/.test(s)}function ie(e){let s=e.trim();return s.startsWith("|")&&(s=s.slice(1)),s.endsWith("|")&&(s=s.slice(0,-1)),s.split("|").map(a=>a.trim())}function Hs(e){const s=e.startsWith(":"),a=e.endsWith(":");return s&&a?"center":a?"right":null}function se({body:e}){if(!e)return null;const s=e.replace(/^#\s+[^\n]*\n+/,"").split(`
|
|
1
|
+
import{r as x,j as n,I as R,u as D,e as he,p as ns,t as ts,d as pe,g as P,v as as,w as rs,n as ne,x as ls,E as is,s as ge}from"./index-BUKLPN_4.js";import{P as Z}from"./PageScroll-B2kxcqJJ.js";import{m as cs,n as me,o as os,q as ds,r as us}from"./data-SNi0AmVT.js";const q={working:"var(--green)",parked:"var(--green)",asking:"var(--yellow)",review:"var(--yellow)",done:"var(--yellow)",error:"var(--red)",idle:"var(--muted)",starting:"var(--muted)",queued:"var(--muted)","close-pending":"var(--muted)",offline:"var(--muted)",unknown:"var(--yellow)",corrupt:"var(--red)",retired:"var(--muted)"},Vn={working:"●",parked:"‖",asking:"?",review:"◑",done:"✓",error:"✕",idle:"·",starting:"◌",queued:"⋯","close-pending":"⊘",offline:"○",unknown:"⁇",corrupt:"⚠",retired:"⚑"},Ve=new Set(["asking","review","done","close-pending","error","corrupt"]),ee=e=>(e==null?void 0:e.liveness)==="offline"||(e==null?void 0:e.status)==="offline"?"offline":Ve.has(e==null?void 0:e.status)?"need":"run",je=e=>!!(e!=null&&e.archived),Pn=(e=[])=>({live:e.filter(s=>!je(s)),archived:e.filter(je)}),fs=(e,s)=>{const a=s?(e||[]).find(t=>t.id===s):null;return a&&ee(a)!=="offline"?a:null},we=e=>(e==null?void 0:e.sortKey)!=null?e.sortKey:(e==null?void 0:e.created)??0,ye=e=>{const s={need:0,run:1,offline:2};return[...e].sort((a,t)=>s[ee(a)]-s[ee(t)]||we(t)-we(a))},Fn=e=>(e==null?void 0:e.label)||(e==null?void 0:e.name)||(e==null?void 0:e.node)||(e==null?void 0:e.title)||(e==null?void 0:e.branch)||(e==null?void 0:e.id),hs=e=>(e==null?void 0:e.headline)||(e==null?void 0:e.name)||(e==null?void 0:e.activity)||(e==null?void 0:e.promptPreview)||(e==null?void 0:e.node)||(e==null?void 0:e.title)||(e==null?void 0:e.branch)||(e==null?void 0:e.id);function ps(e){const s=new Set(e.map(r=>r==null?void 0:r.id)),a=new Map,t=[];for(const r of e){const i=r!=null&&r.parent&&r.parent!==r.id&&s.has(r.parent)?r.parent:null;if(i){const l=a.get(i)||[];l.push(r),a.set(i,l)}else t.push(r)}return{roots:t,childrenOf:a}}function qn(e,s){const a=new Map(e.map(l=>[l==null?void 0:l.id,l])),t=[],r=new Set([s]);let i=a.get(s);for(;i!=null&&i.parent&&!r.has(i.parent);){const l=a.get(i.parent);if(!l)break;t.push(l.id),r.add(l.id),i=l}return t}function ms(e,s){let a=!1,t=!1,r=0;const i=(l,c)=>{for(const o of s.get(l)||[])c.has(o.id)||(c.add(o.id),r++,Ve.has(o.status)?a=!0:q[o.status]===q.working&&(t=!0),i(o.id,c))};return i(e,new Set([e])),{color:a?q.asking:t?q.working:q.idle,count:r}}function vs(e,s,{zoneFolded:a=()=>!1,keepVisible:t=()=>!1}={}){const{roots:r,childrenOf:i}=ps(e),l=[],c=(d,j,p,g)=>{const f=i.get(d.id)||[],y=f.length>0,k=y&&!!s(d.id),S=y?ms(d.id,i):null;if(l.push({type:"row",s:d,depth:j,expandable:y,expanded:k,rollup:(S==null?void 0:S.color)??null,kin:(S==null?void 0:S.count)??0,guides:g}),k){const A=ye(f).filter(N=>!p.has(N.id));A.forEach((N,m)=>{p.add(N.id),c(N,j+1,p,[...g,m<A.length-1])})}},o=(d,j)=>{let p=1;for(const g of i.get(d.id)||[])j.has(g.id)||(j.add(g.id),p+=o(g,j));return p},u=new Set;let h=null,v=null;for(const d of ye(r)){if(u.has(d.id))continue;const j=ee(d);if(j!==h&&(v={type:"zone",zone:j,count:0,folded:!!a(j)},l.push(v),h=j),v.count+=o(d,new Set([...u,d.id])),v.folded){const p=[],g=(f,y)=>{t(f)&&!u.has(f.id)&&p.push(f);for(const k of i.get(f.id)||[])y.has(k.id)||(y.add(k.id),g(k,y))};g(d,new Set([d.id]));for(const f of p)u.add(f.id),l.push({type:"row",s:f,depth:0,expandable:!1,expanded:!1,rollup:null,kin:0,guides:[]});u.add(d.id);continue}u.add(d.id),c(d,0,u,[])}return l}const Mn=e=>vs(e,()=>!0).filter(s=>s.type==="row").map(s=>s.s),te=typeof window<"u"?window.__escStack||(window.__escStack=[]):[];typeof window<"u"&&!window.__escStackBound&&(window.__escStackBound=!0,window.addEventListener("keydown",e=>{const s=window.__escStack;e.key!=="Escape"||!s||s.length===0||(e.preventDefault(),e.stopImmediatePropagation(),s[s.length-1].close())},!0));function Pe(e,s){const a=x.useRef(s);a.current=s,x.useEffect(()=>{if(!e)return;const t={close:()=>{var r;return(r=a.current)==null?void 0:r.call(a)}};return te.push(t),()=>{const r=te.indexOf(t);r>=0&&te.splice(r,1)}},[e])}const W=new Map;async function xs(e){if(W.has(e))return W.get(e);const s=cs(e).then(async a=>{const t=await a.json().catch(()=>null);if(!a.ok)throw new Error((t==null?void 0:t.error)||`HTTP ${a.status}`);return t}).finally(()=>W.delete(e));return W.set(e,s),s}const Kn=e=>{const s=typeof e=="string"&&/^\d+$/.test(e)?Number(e):Number.NaN;return Number.isSafeInteger(s)&&s>0?s:1};function gs(e,s){return s<=0?[]:s<=10?Array.from({length:s},(a,t)=>t+1):e<=7?[...Array.from({length:8},(a,t)=>t+1),"gap",s-1,s]:e>=s-6||e>s?[1,2,"gap",...Array.from({length:8},(a,t)=>s-7+t)]:[1,2,"gap",e-2,e-1,e,e+1,e+2,"gap",s-1,s]}function Fe(e,s,a,{enabled:t=!0,refreshKey:r=null,pollMs:i=15e3,view:l=null}={}){const[c,o]=x.useState(null),[u,h]=x.useState(null),[v,d]=x.useState(t),j=x.useRef(0),p=x.useCallback(async({quiet:f=!1}={})=>{if(!t)return null;const y=++j.current;f||d(!0),h(null);const k=new URLSearchParams({q:String(s||""),page:String(a)});l&&k.set("view",l);try{const S=await xs(`/api/${e}?${k}`);return y===j.current&&o(A=>A&&S&&A.revision===S.revision?A:S),S}catch(S){return y===j.current&&h(S instanceof Error?S.message:String(S)),null}finally{y===j.current&&d(!1)}},[e,t,a,s,l]),g=x.useRef(null);return x.useEffect(()=>{if(!t){d(!1);return}const f=`${e}\0${s}\0${a}\0${l||""}`,y=f!==g.current;g.current=f,y&&o(null),p({quiet:!y});const k=i>0?setInterval(()=>p({quiet:!0}),i):null;return()=>{k&&clearInterval(k)}},[e,s,a,l,t,p,i,r]),{data:c,error:u,loading:v,reload:p}}const be={issue:{open:{icon:"issue-opened",tone:"open",label:"reviewState.issueOpen"},closed:{icon:"issue-closed",tone:"closed",label:"reviewState.issueClosed"}},eval:{pass:{icon:"circle-check",tone:"pass",label:"score.pass"},fail:{icon:"circle-x",tone:"fail",label:"score.fail"},stalePass:{icon:"circle-check",tone:"stale",label:"score.stalePass"},staleFail:{icon:"circle-x",tone:"stale",label:"score.staleFail"},review:{icon:"clock",tone:"review",label:"reviewList.needsReview"},empty:{icon:"circle-minus",tone:"empty",label:"score.empty"},missing:{icon:"circle-dashed",tone:"empty",label:"score.missing"},legacy:{icon:"circle-minus",tone:"empty",label:"score.empty"}}},js=(e,s)=>{var t;const a=e==="issue"?s==="open"?"open":"closed":s||"empty";return((t=be[e])==null?void 0:t[a])||be.eval.empty};function ve({kind:e,state:s,showLabel:a=!1,size:t=16,className:r="",title:i}){const l=D(),c=js(e,s),o=i||l(c.label);return n.jsxs("span",{className:`review-state ${e} ${c.tone} ${r}`,"data-tip":o,"aria-label":o,children:[n.jsx("span",{className:"review-state-icon",style:{width:t,height:t},children:n.jsx(R,{name:c.icon,size:t})}),a&&n.jsx("span",{className:"review-state-label",children:o})]})}function ws(e,s){const a={...e,...s};for(const[t,r]of Object.entries(a))(r==null||r==="")&&delete a[t];return a}const ys=e=>e&&typeof e=="object"?e.hasData?e.filtered:e.dataset:e,qe=(e,s,a)=>{const t=Array.isArray(e)?e:[];return!(s!=null&&String(s)!=="")||a==null||t.some(i=>String(i.value)==="")?t:[{value:"",label:a},...t]},bs=(e=[])=>e.reduce((s,a)=>((a.active??(a.value!=null&&String(a.value)!==""))&&(s.mobile+=1,a.mobileOnly||(s.desktop+=1)),s),{desktop:0,mobile:0}),xe=(e,s,a)=>s?a==="Home"?0:a==="End"?s-1:a==="ArrowDown"||a==="ArrowRight"?e<0?0:(e+1)%s:a==="ArrowUp"||a==="ArrowLeft"?e<0?s-1:(e-1+s)%s:e:-1,Ns=(e,s)=>{var t;const a=e==null?void 0:e.tagName;return a==="INPUT"||a==="TEXTAREA"||a==="SELECT"||a==="BUTTON"&&(s==="Enter"||s===" ")||s==="Enter"&&((t=e==null?void 0:e.closest)!=null&&t.call(e,"a[href]"))?!1:s==="j"||s==="k"||s==="Enter"},ae=e=>[...(e==null?void 0:e.querySelectorAll('[role="menuitemradio"]'))||[]].filter(s=>s.getClientRects().length>0),re=(e,s)=>{const a=e[s];if(a){for(const t of e)t.tabIndex=t===a?0:-1;a.focus()}};function Me(){const[e,s]=x.useState(!1),a=x.useRef(null),t=x.useRef(null),r=x.useRef(null),i=x.useRef("checked"),l=(d=!1)=>{var j;d&&((j=r.current)==null||j.focus()),s(!1)},c=(d,j="checked")=>{r.current=d,i.current=j,s(!0)},o=d=>{e?l(!1):c(d)};return Pe(e,()=>l(!0)),x.useEffect(()=>{if(!e)return;const d=j=>{var p;(p=a.current)!=null&&p.contains(j.target)||l(!1)};return window.addEventListener("pointerdown",d,!0),()=>window.removeEventListener("pointerdown",d,!0)},[e]),x.useEffect(()=>{if(!e)return;const d=requestAnimationFrame(()=>{const j=ae(t.current),p=j.findIndex(f=>f.getAttribute("aria-checked")==="true"),g=i.current==="last"?j.length-1:i.current==="first"?0:p>=0?p:0;re(j,g)});return()=>cancelAnimationFrame(d)},[e]),{open:e,ref:a,menuRef:t,close:l,toggle:o,onTriggerKeyDown:d=>{d.key!=="ArrowDown"&&d.key!=="ArrowUp"||(d.preventDefault(),d.stopPropagation(),c(d.currentTarget,d.key==="ArrowUp"?"last":"first"))},onMenuKeyDown:d=>{if(!["ArrowDown","ArrowUp","Home","End"].includes(d.key))return;const j=ae(t.current),p=j.indexOf(document.activeElement);d.preventDefault(),d.stopPropagation(),re(j,xe(p,j.length,d.key))},onItemFocus:d=>{const j=ae(t.current);re(j,j.indexOf(d.currentTarget))}}}function On({label:e,value:s="",options:a=[],onChange:t,mobile:r=!1,clearLabel:i}){const l=Me(),c=qe(a,s,i);if(!c.length)return null;const o=c.find(v=>String(v.value)===String(s)),u=s?(o==null?void 0:o.label)||String(s):"",h=u?`${e}: ${u}`:e;return n.jsxs("div",{className:`rl-facet-wrap ${r?"mobile-stay":""}`,ref:l.ref,children:[n.jsxs("button",{type:"button",className:`rl-facet ${s?"active":""}`,"aria-label":h,"aria-haspopup":"menu","aria-expanded":l.open,onClick:v=>l.toggle(v.currentTarget),onKeyDown:l.onTriggerKeyDown,children:[n.jsx("span",{className:"rl-facet-label",children:h}),r&&n.jsx("span",{className:"rl-facet-label-mobile","aria-hidden":"true",children:u||e}),n.jsx(R,{name:"chevron-down",size:12})]}),l.open&&n.jsx("div",{className:"rl-menu",role:"menu","aria-label":e,ref:l.menuRef,onKeyDown:l.onMenuKeyDown,children:c.map(v=>n.jsxs("button",{type:"button",role:"menuitemradio","aria-checked":String(v.value)===String(s),tabIndex:-1,className:"rl-menu-item",onFocus:l.onItemFocus,onClick:()=>{l.close(!0),t(v.value)},children:[n.jsx(R,{name:String(v.value)===String(s)?"check":"blank",size:13}),n.jsx("span",{children:v.label}),v.count!=null&&n.jsx("span",{className:"rl-menu-count",children:v.count})]},String(v.value)))})]})}function ks({label:e,groups:s=[],clearLabel:a,compact:t=!1,className:r=""}){const i=D(),l=x.useId(),c=s.map(d=>({...d,options:qe(d.options,d.value,d.clearLabel===null?null:d.clearLabel||a)})).filter(d=>d.options.length),o=c.some(d=>!d.mobileOnly),u=bs(c),h=Me();if(!c.length)return null;const v=(d,j)=>d>0&&n.jsxs("span",{className:`rl-secondary-filter-count ${j}`,children:[n.jsx("span",{"aria-hidden":"true",children:d}),n.jsx("span",{className:"sr-only",children:i("reviewList.activeFilters",{n:d})})]});return n.jsxs("div",{className:`rl-secondary-filters ${o?"":"mobile-only"} ${u.desktop?"active-desktop":""} ${u.mobile?"active-mobile":""} ${r}`,ref:h.ref,children:[t?n.jsx(he,{icon:"filter",size:16,className:"rl-secondary-filters-trigger compact",label:e,"aria-haspopup":"menu","aria-expanded":h.open,onClick:d=>h.toggle(d.currentTarget),onKeyDown:h.onTriggerKeyDown}):n.jsxs("button",{type:"button",className:"rl-secondary-filters-trigger","aria-haspopup":"menu","aria-expanded":h.open,onClick:d=>h.toggle(d.currentTarget),onKeyDown:h.onTriggerKeyDown,children:[n.jsx(R,{name:"filter",size:14}),n.jsx("span",{children:e}),v(u.desktop,"for-desktop"),v(u.mobile,"for-mobile"),n.jsx(R,{name:"chevron-down",size:12})]}),h.open&&n.jsx("div",{className:"rl-menu rl-secondary-filters-menu",role:"menu","aria-label":e,ref:h.menuRef,onKeyDown:h.onMenuKeyDown,children:c.map((d,j)=>n.jsxs("div",{role:"group","aria-labelledby":`${l}-group-${j}`,className:`rl-menu-group ${d.mobileOnly?"mobile-only":""}`,children:[n.jsx("div",{className:"rl-menu-label",id:`${l}-group-${j}`,children:d.label}),d.options.map(p=>n.jsxs("button",{type:"button",role:"menuitemradio","aria-checked":String(p.value)===String(d.value||""),tabIndex:-1,className:"rl-menu-item",onFocus:h.onItemFocus,onClick:()=>{h.close(!0),d.onChange(p.value)},children:[n.jsx(R,{name:String(p.value)===String(d.value||"")?"check":"blank",size:13}),n.jsx("span",{children:p.label}),p.count!=null&&n.jsx("span",{className:"rl-menu-count",children:p.count})]},String(p.value)))]},`${d.label}-${d.mobileOnly?"mobile":"all"}`))})]})}function _n({state:e,title:s,meta:a,aside:t}){return n.jsxs("div",{className:"rl-row-grid",children:[n.jsx("div",{className:"rl-row-state",children:e}),n.jsxs("div",{className:"rl-row-body",children:[n.jsx("div",{className:"rl-row-title",children:s}),a&&n.jsx("div",{className:"rl-row-meta",children:a})]}),t&&n.jsx("div",{className:"rl-row-aside",children:t})]})}const G=e=>{const s=String(e??"").trim();return s?`${s} `:""};function Ss({value:e="",onSubmit:s,placeholder:a,label:t,keys:r=[],suggest:i={}}){const[l,c]=x.useState(()=>G(e)),[o,u]=x.useState(-1),[h,v]=x.useState(-1),d=x.useRef(null),j=x.useRef(null),p=x.useId(),g=x.useRef(null),f=m=>requestAnimationFrame(()=>{const E=d.current;E&&(m&&E.focus(),E.setSelectionRange(E.value.length,E.value.length))});x.useEffect(()=>{c(G(e)),u(-1),v(-1),f(g.current!==null&&g.current!==e),g.current=e},[e]);const y=o>=0?ns(l,o,r,i):{start:0,end:0,items:[]},k=y.items.length>0;Pe(k,()=>u(-1));const S=()=>{j.current&&d.current&&(j.current.scrollLeft=d.current.scrollLeft)};x.useEffect(S);const A=m=>{u(-1),v(-1);const E=m.trim();c(G(E)||G(e)),f(!0),s(E)},N=m=>{const E=`${l.slice(0,y.start)}${m.insert}${l.slice(y.end)}`;if(c(E),m.type==="value"){A(E);return}const C=y.start+m.insert.length;u(C),v(-1),requestAnimationFrame(()=>{var w,$;(w=d.current)==null||w.focus(),($=d.current)==null||$.setSelectionRange(C,C)})};return n.jsxs("form",{className:"rl-query rq",role:"search",onSubmit:m=>{m.preventDefault(),A(l)},children:[n.jsxs("div",{className:"rq-wrap",children:[n.jsx("div",{className:"rq-hl","aria-hidden":"true",ref:j,children:ts(l).map((m,E)=>m.ws||m.key==null||!r.includes(m.key)?n.jsx("span",{children:m.raw},E):n.jsxs("span",{className:"rq-tok",children:[n.jsx("span",{className:"rq-tok-key",children:m.raw.slice(0,m.key.length+1)}),n.jsx("span",{className:"rq-tok-val",children:m.raw.slice(m.key.length+1)})]},E))}),n.jsx("input",{ref:d,role:"combobox","aria-expanded":k,"aria-controls":p,"aria-autocomplete":"list","aria-activedescendant":k&&h>=0?`${p}-o${h}`:void 0,value:l,spellCheck:!1,autoComplete:"off",placeholder:a,"aria-label":t,onChange:m=>{c(m.target.value),u(m.target.selectionStart??m.target.value.length),v(-1)},onScroll:S,onKeyDown:m=>{k&&(m.key==="ArrowDown"||m.key==="ArrowUp"?(m.preventDefault(),v(xe(h,y.items.length,m.key))):m.key==="Enter"&&h>=0&&(m.preventDefault(),N(y.items[h])))},onBlur:()=>u(-1)})]}),k&&n.jsx("div",{className:"rl-menu rq-list",role:"listbox",id:p,"aria-label":t,children:y.items.map((m,E)=>n.jsxs("div",{id:`${p}-o${E}`,role:"option","aria-selected":E===h,className:`rq-opt ${E===h?"active":""}`,onPointerDown:C=>{C.preventDefault(),N(m)},children:[n.jsx("span",{className:"rq-opt-token",children:m.insert.trim()}),m.label&&m.label!==m.value&&n.jsx("span",{className:"rq-opt-label",children:m.label})]},m.insert))}),n.jsx("button",{type:"submit",className:"rl-query-submit","data-tip":t,"aria-label":t,children:n.jsx(R,{name:"search",size:16})})]})}function Ke({value:e="",onChange:s,placeholder:a,searchLabel:t,filterLabel:r,groups:i,clearLabel:l,clearSearchLabel:c,summary:o}){const u=D(),h=n.jsxs("div",{className:"rf-compact",role:"search",children:[n.jsx("span",{className:"rf-search-icon",children:n.jsx(R,{name:"search",size:13})}),n.jsx("input",{value:e,onChange:d=>s(d.target.value),placeholder:a,"aria-label":t}),e&&n.jsx(he,{icon:"x",size:12,className:"rf-clear",label:c,onClick:()=>s("")}),n.jsx(ks,{label:r,clearLabel:l,groups:i,compact:!0,className:"rf-secondary-filters"})]});if(!o)return h;const v=u("reviewList.showing",{shown:o.shown,total:o.total});return n.jsxs("div",{className:"rf-row",children:[n.jsxs("span",{className:"rf-summary","data-tip":v,children:[n.jsx("span",{className:"sr-only",children:v}),n.jsx("span",{className:"rf-summary-full","aria-hidden":"true",children:v}),n.jsxs("span",{className:"rf-summary-compact","aria-hidden":"true",children:[o.shown,"/",o.total]})]}),h]})}function $s({page:e,pageCount:s,prev:a,next:t,hrefFor:r}){const i=D();if(s<=1&&e<=1)return null;const l=(c,o,u,h="")=>c==null?n.jsx("span",{className:`rl-page-link disabled ${h}`,"aria-disabled":"true",children:o}):n.jsx("a",{className:`rl-page-link ${h}`,href:r(c),rel:u,"aria-label":u?i(`reviewList.${u}Page`):i("reviewList.page",{n:c}),children:o});return n.jsxs("nav",{className:"rl-pagination","aria-label":i("reviewList.pagination"),children:[l(a,i("reviewList.previous"),"prev","direction"),gs(e,s).map((c,o)=>c==="gap"?n.jsx("span",{className:"rl-page-gap","aria-hidden":"true",children:"…"},`gap-${o}`):n.jsx("a",{className:"rl-page-link number",href:r(c),"aria-label":i("reviewList.page",{n:c}),"aria-current":c===e?"page":void 0,children:c},c)),l(t,i("reviewList.next"),"next","direction")]})}function Bn({notice:e,leading:s,error:a,loading:t=!1,title:r,action:i,search:l,sections:c=[],sectionMode:o="tabs",facets:u,secondaryFilters:h,rows:v,empty:d,pagination:j,children:p}){const g=D(),[f,y]=x.useState(null),k=x.useId(),S=x.useRef({});S.current={rows:v,cur:f},x.useEffect(()=>{const w=$=>{if($.metaKey||$.ctrlKey||$.altKey||!Ns($.target,$.key))return;const I=S.current.rows.filter(V=>V.href);if(!I.length)return;if($.key==="Enter"){const V=I.find(b=>b.key===S.current.cur);V&&($.preventDefault(),$.stopPropagation(),window.location.hash=V.href);return}$.preventDefault(),$.stopPropagation();const T=I.findIndex(V=>V.key===S.current.cur),_=T<0?$.key==="j"?0:I.length-1:Math.max(0,Math.min(I.length-1,T+($.key==="j"?1:-1)));y(I[_].key)};return window.addEventListener("keydown",w,!0),()=>window.removeEventListener("keydown",w,!0)},[]),x.useEffect(()=>{var w;(w=document.querySelector(".lp-row.cur"))==null||w.scrollIntoView({block:"nearest"})},[f]);const A=ys(d),N=Math.max(0,c.findIndex(w=>w.active)),m=o==="tabs",E=`${k}-panel`,C=w=>`${k}-tab-${w}`;return n.jsxs(Z,{className:"lp-page",children:[e&&n.jsx("div",{className:"fv-notice",children:e}),s,n.jsxs("div",{className:"rl-content",children:[n.jsxs("div",{className:"rl-titlebar",children:[n.jsx("h1",{children:r}),i]}),l&&n.jsx(Ss,{...l}),a&&n.jsx("div",{className:"fv-error lp-error",role:"alert",children:a}),n.jsxs("section",{className:"rl-list",children:[n.jsxs("header",{className:"lp-head",children:[n.jsx("div",{className:"rl-sections",role:m?"tablist":"group","aria-label":r,...m?{"aria-orientation":"horizontal"}:{},children:c.map((w,$)=>n.jsxs("button",{type:"button",role:m?"tab":void 0,"aria-selected":m?w.active:void 0,"aria-pressed":m?void 0:w.active,"aria-controls":m?E:void 0,id:m?C($):void 0,tabIndex:m?$===N?0:-1:void 0,className:`rl-section ${w.active?"active":""}`,onClick:w.onSelect,onKeyDown:I=>{var V,b;if(!m||!["ArrowLeft","ArrowRight","Home","End"].includes(I.key))return;const T=[...I.currentTarget.closest('[role="tablist"]').querySelectorAll('[role="tab"]')],_=xe(T.indexOf(I.currentTarget),T.length,I.key);I.preventDefault(),I.stopPropagation(),(V=T[_])==null||V.focus(),(b=T[_])==null||b.click()},children:[n.jsx("span",{children:w.label}),n.jsx("span",{className:"rl-section-count",children:w.count}),w.countSuffix&&n.jsxs("span",{className:"rl-section-suffix","data-tip":w.countSuffix.text,children:[n.jsx("span",{className:"sr-only",children:w.countSuffix.text}),n.jsx("span",{className:"rl-section-suffix-full","aria-hidden":"true",children:w.countSuffix.text}),n.jsx("span",{className:"rl-section-suffix-compact","aria-hidden":"true",children:w.countSuffix.compact})]})]},w.key))}),n.jsxs("div",{className:"rl-facets",children:[u,h]})]}),n.jsxs("div",{className:"lp-rows",role:m?"tabpanel":"region",id:E,"aria-busy":t||void 0,"aria-labelledby":m?C(N):void 0,"aria-label":m?void 0:r,children:[v.length===0&&n.jsx("div",{className:"lp-empty",children:t?g("common.loading"):A}),v.map(w=>w.href?n.jsx("a",{className:`lp-row ${w.cls||""} ${f===w.key?"cur":""}`,href:w.href,children:w.content},w.key):n.jsx("div",{className:`lp-row inert ${w.cls||""}`,children:w.content},w.key))]})]}),j&&n.jsx($s,{...j})]}),p]})}function zn({title:e,titleMeta:s,status:a,side:t,composer:r,missing:i,failure:l,listHref:c,listLabel:o,backHref:u,backLabel:h,children:v}){return l?n.jsxs(Z,{className:"ds-page ds-missing ds-failed",role:"alert",children:[n.jsx("div",{className:"ds-missing-note",children:l}),c&&n.jsx("a",{className:"ds-backlink",href:c,children:o})]}):i?n.jsxs(Z,{className:"ds-page ds-missing",children:[n.jsx("div",{className:"ds-missing-note",children:i}),c&&n.jsx("a",{className:"ds-backlink",href:c,children:o})]}):n.jsxs(Z,{className:"ds-page",children:[n.jsxs("header",{className:"ds-head",children:[u&&n.jsx("a",{className:"ds-back",href:u,"data-tip":h,"aria-label":h,children:n.jsx(R,{name:"arrow-left",size:16})}),n.jsxs("h1",{className:"ds-title",children:[e,s&&n.jsx("span",{className:"ds-title-meta",children:s})]})]}),a&&n.jsx("div",{className:"ds-status",children:a}),n.jsxs("div",{className:"ds-cols",children:[n.jsxs("div",{className:"ds-main",children:[v,r&&n.jsx("div",{className:"ds-compose",children:r})]}),n.jsx("aside",{className:"ds-side",children:t})]})]})}function Hn({label:e,children:s}){return n.jsxs("div",{className:"ds-side-sec",children:[n.jsx("span",{className:"ds-side-label",children:e}),n.jsx("div",{className:"ds-side-body",children:s})]})}function Es({text:e,tip:s,dim:a=!1,mono:t=!1,href:r=null,external:i=!1,onClick:l=null,className:c="",lead:o=null,trail:u=null,label:h=null}){const v=`ds-val${a?" dim":""}${t?" mono":""}${r||l?" link":""}${c?` ${c}`:""}`,d=s??(typeof e=="string"?e:void 0),j=h?{"aria-label":h}:{},p=n.jsxs(n.Fragment,{children:[o,n.jsx("span",{className:"ds-val-text",children:e}),u]});return r?n.jsx("a",{className:v,href:r,"data-tip":d,...j,...i?{target:"_blank",rel:"noreferrer"}:{},children:p}):l?n.jsx("button",{type:"button",className:v,onClick:l,"data-tip":d,...j,children:p}):n.jsx("span",{className:v,"data-tip":d,children:p})}const le=Object.freeze({RESULT:"result",BLIND:"blind",UNMEASURED:"unmeasured",DANGLING:"dangling"}),Oe=e=>{var s;return(s=e==null?void 0:e.evidence)!=null&&s.length?e.evidence:(e==null?void 0:e.blob)!=null?[{hash:e.blob,kind:e.blobKind||"image",state:e.blobState||"present"}]:[]},Un=e=>{const s=Oe(e);return s.length?["video","image","transcript","data"].filter(a=>s.some(t=>t.kind===a)):["note"]},Wn=e=>String(e||"").length>22?`${String(e).slice(0,8)}…`:e;function _e(e,s,a){return a.map(t=>t==="section"?e.section:e.facets[t]).filter(t=>{var r;return(t==null?void 0:t.meaningful)!==!1&&(((r=t==null?void 0:t.options)==null?void 0:r.length)>1||(t==null?void 0:t.value)!=null&&t.value!==""&&t.value!=="all")}).map(t=>({key:t.key,label:t.label,value:t.value,active:t.value!=null&&t.value!==""&&t.value!=="all",options:t.options,clearLabel:t.value==="all"?null:void 0,onChange:r=>s({[t.key]:r||null})}))}const z=e=>pe(`/api/evidence/${e}`);function Ls({src:e,alt:s,onClose:a}){return x.useEffect(()=>{const t=r=>{r.key==="Escape"&&(r.preventDefault(),r.stopPropagation(),a())};return window.addEventListener("keydown",t,!0),()=>window.removeEventListener("keydown",t,!0)},[a]),n.jsx("div",{className:"lightbox",onClick:a,children:n.jsx("img",{src:e,alt:s})})}function As({hash:e}){const s=D(),[a,t]=x.useState(null);return x.useEffect(()=>{let r=!0;return fetch(z(e)).then(i=>i.ok?i.text():Promise.reject(new Error("miss"))).then(i=>{r&&t(i)}).catch(()=>{r&&t("")}),()=>{r=!1}},[e]),a===null?n.jsx("pre",{className:"eval-transcript loading",children:s("nodeView.eval.loadingTranscript")}):n.jsx("pre",{className:"eval-transcript",children:a})}function Ds({hash:e,collapsed:s=!1}){const a=D(),[t,r]=x.useState(null);if(x.useEffect(()=>{let l=!0;return fetch(z(e)).then(c=>c.ok?c.text():Promise.reject(new Error("miss"))).then(c=>{let o=c,u=!0;try{o=JSON.stringify(JSON.parse(c),null,2)}catch{u=!1}l&&r({text:o,valid:u})}).catch(()=>{l&&r({text:"",valid:!1})}),()=>{l=!1}},[e]),t===null)return n.jsx("pre",{className:"eval-data loading",children:a("nodeView.eval.loadingData")});const i=t.valid?a("nodeView.eval.data"):a("nodeView.eval.dataInvalid");return s?n.jsxs("details",{className:"eval-datawrap eval-datafold",children:[n.jsx("summary",{className:"eval-datahead",children:i}),n.jsx("pre",{className:"eval-data",children:t.text})]}):n.jsxs("div",{className:"eval-datawrap",children:[n.jsx("div",{className:"eval-datahead",children:i}),n.jsx("pre",{className:"eval-data",children:t.text})]})}function Is({hash:e,alt:s}){const[a,t]=x.useState(!1);return n.jsxs(n.Fragment,{children:[n.jsx("img",{className:"an-image",src:z(e),alt:s,loading:"lazy",onClick:()=>t(!0)}),a&&n.jsx(Ls,{src:z(e),alt:s,onClose:()=>t(!1)})]})}function Cs({exit:e}){return n.jsx(R,{name:e?"minimize":"maximize",size:15})}function Gn({target:e,className:s=""}){const a=D(),[t,r]=x.useState(!1);x.useEffect(()=>{const l=()=>{const c=document.fullscreenElement,o=e==null?void 0:e.current;r(!!c&&!!o&&(c===o||o.contains(c)))};return document.addEventListener("fullscreenchange",l),()=>document.removeEventListener("fullscreenchange",l)},[e]);const i=()=>{var c,o;const l=e==null?void 0:e.current;l&&(document.fullscreenElement?(c=document.exitFullscreen||document.webkitExitFullscreen)==null||c.call(document):(o=l.requestFullscreen||l.webkitRequestFullscreen)==null||o.call(l))};return n.jsx("button",{type:"button",className:`an-fs ${s}`,onClick:i,"data-tip":a(t?"annotator.exitFullscreen":"annotator.fullscreen"),"aria-label":a(t?"annotator.exitFullscreen":"annotator.fullscreen"),children:n.jsx(Cs,{exit:t})})}function Be({e,alt:s="",collapsed:a=!1}){const t=D();return e.state==="miss"?n.jsx("div",{className:"eval-noimg",children:t("nodeView.eval.miss")}):e.kind==="transcript"?n.jsx(As,{hash:e.hash}):e.kind==="data"?n.jsx(Ds,{hash:e.hash,collapsed:a}):e.kind==="video"?n.jsx("video",{className:"eval-video",src:z(e.hash),controls:!0,preload:"metadata",playsInline:!0}):n.jsx(Is,{hash:e.hash,alt:s})}const Q=new Map;function Ts(e){const[s,a]=x.useState(()=>Q.get(e)??null);return x.useEffect(()=>{if(Q.has(e)){a(Q.get(e));return}let t=!0;return fetch(z(e),{headers:{Range:"bytes=0-0"}}).then(r=>{const i=r.headers.get("content-type")||"",l=r.ok?{kind:i.startsWith("video/")?"video":i.startsWith("image/")?"image":i.startsWith("application/json")?"data":"transcript",state:"present"}:{kind:"image",state:"miss"};Q.set(e,l),t&&a(l)}).catch(()=>{t&&a({kind:"image",state:"miss"})}),()=>{t=!1}},[e]),s}function ze({hash:e,alt:s=""}){const a=Ts(e);return a?n.jsx(Be,{e:{hash:e,...a},alt:s}):null}function Rs(e){var s,a;return((s=e==null?void 0:e.verdict)==null?void 0:s.status)==="pass"?"check":((a=e==null?void 0:e.verdict)==null?void 0:a.status)==="fail"?"cross":null}function He(e){const s=Rs(e);return s?e.fresh?s==="cross"?"fail":"pass":s==="cross"?"staleFail":"stalePass":"empty"}function Vs(e,s){if(!e)return[];const a=new Map;for(const t of s||[])a.has(t.scenario)||a.set(t.scenario,t);return e.map(t=>{const r=a.get(t.name)||null;return{...t,reading:r,state:r?He(r):"missing"}})}function Ps(e){return e.length?e.some(s=>s.state==="fail")?"fail":e.some(s=>s.state==="staleFail")?"staleFail":e.some(s=>s.state==="stalePass")?"stalePass":e.some(s=>s.state==="empty"||s.state==="missing")?"empty":"pass":null}const Fs=e=>e.fail>0?"fail":e.staleFail>0?"staleFail":e.stalePass>0?"stalePass":e.empty>0?"empty":"pass";function qs({scenarios:e,evals:s,summary:a=null,href:t}){const r=D(),i=a?null:Vs(e,s),l=(a==null?void 0:a.total)??i.length;if(!l)return null;const c=a?Fs(a):Ps(i),o=(a==null?void 0:a.pass)??i.filter(d=>d.state==="pass").length,u=r("score.count",{satisfied:o,total:l,outstanding:l-o}),h=n.jsxs(n.Fragment,{children:[n.jsx(R,{name:"check",size:11}),o,"/",l]});if(!t)return n.jsx("span",{className:`scenario-count ${c}`,"data-tip":u,"aria-label":u,children:h});const v=`${u} — ${r("score.openList")}`;return n.jsx("a",{className:`scenario-count ${c}`,href:t,"data-tip":v,"aria-label":v,children:h})}function J({kind:e,state:s,cls:a,n:t,label:r}){return n.jsxs("span",{className:`ovc ${a}`,"data-tip":r,children:[n.jsx(ve,{kind:e,state:s,title:r,size:11}),t]})}function Ms({tags:e}){return e!=null&&e.length?n.jsx("span",{className:"tag-chips",children:e.map(s=>n.jsx("span",{className:"tag-chip",children:s},s))}):null}function Ue({state:e,title:s}){return e?n.jsx(ve,{kind:"eval",state:e,title:s,className:`score-badge ${e}`,size:14}):null}const Qn=e=>({kind:"graph-node",nodeId:e}),Jn=e=>({kind:"session",sessionId:e}),Ks=e=>({kind:"issue",issueId:e}),We=(e,s)=>({kind:"review-list",page:e,query:s}),Ge=(e,s=null)=>({kind:"eval",nodeId:e,scenario:s}),Os=(e,s,a)=>({kind:"session-eval",sessionId:e,nodeId:s,scenario:a});function O(e){if(!e)return P("graph");if(e.kind==="graph-node")return P("graph");if(e.kind==="session")return P("sessions",e.sessionId);if(e.kind==="session-eval"){const s=e.nodeId&&e.scenario?`${e.nodeId}/${e.scenario}`:null;return P("evals",s,{q:s?`scope:${e.sessionId}`:as(e.sessionId)})}return e.kind==="issue"?P("issues",e.issueId):e.kind==="review-list"?P(e.page,null,e.query?{q:e.query}:null):e.kind==="eval"?e.scenario?P("evals",`${e.nodeId}/${e.scenario}`):P("evals",null,{q:rs(e.nodeId)}):P("graph")}function Yn(e,s=null){return e==="issues"?P("issues"):s?O(Os(s)):P("evals")}function Zn(e,{onFocusNode:s,onOpenSession:a}={}){if(e)if(e.kind==="graph-node")s==null||s(e.nodeId),ne("graph");else if(e.kind==="session")a?a(e.sessionId):ne("sessions",e.sessionId);else{const{page:t,param:r,query:i}=ls(O(e));ne(t,r,{query:i})}}function Ne({issue:e,onNavigateAddress:s}){const a=(e==null?void 0:e.store)||"local",t=(e==null?void 0:e.status)||"open",r=Ks(e.id);return n.jsxs("a",{className:"issue-card",href:O(r),"data-tip":e.concern||e.id,onClick:s?i=>{i.defaultPrevented||i.button!==0||i.metaKey||i.ctrlKey||i.shiftKey||i.altKey||(i.preventDefault(),s(r))}:void 0,children:[n.jsxs("span",{className:"issue-card-top",children:[n.jsx("span",{className:"issue-num",children:e.id}),n.jsx("span",{className:`fv-store fv-store-${a==="local"?"local":"forge"}`,children:a}),n.jsx(ve,{kind:"issue",state:t,showLabel:!0,size:12,className:"issue-card-state"})]}),n.jsx("span",{className:"issue-card-title",children:e.concern})]})}const ke=[{key:"spec",label:"spec"},{key:"history",label:"history"},{key:"issues",label:"issues"},{key:"eval",label:"eval"}];function _s(e){var s;return(s=e==null?void 0:e.overlays)!=null&&s.length?[{key:"edit",label:"edit"},...ke]:ke}const Qe=(e,s,a={})=>{let t=`${e==="issue"?"is:issue":is}${a.q?` ${String(a.q).trim()}`:""}`.trim();const r=e==="issue"?{state:"state",author:"author",store:"store",session:"session"}:{verdict:"verdict",review:"state",freshness:"freshness",kind:"evidence",filer:"filer",session:"session"};for(const[i,l]of Object.entries(r))a[i]&&(t=ge(t,l,a[i]));return ge(t,"node",s)},Bs={state:"reviewList.facetState",verdict:"reviewList.facetVerdict",author:"reviewList.facetAuthor",store:"reviewList.facetStore",review:"reviewList.facetReview",freshness:"reviewList.facetFreshness",kind:"reviewList.facetKind",filer:"reviewList.facetFiler",session:"reviewList.facetSession"},Je=(e,s)=>{const a=t=>t&&{...t,label:s(Bs[t.key]||t.label||t.key)};return{section:a(e==null?void 0:e.section),facets:Object.fromEntries(Object.entries((e==null?void 0:e.facets)||{}).map(([t,r])=>[t,a(r)]))}},zs={added:"+",edited:"~",deleted:"✕",moved:"→"};function U(e){const s=[],a=/`([^`]+)`|\*\*([^*]+)\*\*|\[\[([^\]]+)\]\]/g;let t=0,r,i=0;for(;r=a.exec(e);)r.index>t&&s.push(e.slice(t,r.index)),r[1]!=null?s.push(n.jsx("code",{children:r[1]},i++)):r[2]!=null?s.push(n.jsx("strong",{children:r[2]},i++)):s.push(n.jsx("span",{className:"doc-link",children:r[3]},i++)),t=a.lastIndex;return t<e.length&&s.push(e.slice(t)),s}function Se(e){const s=e.trim();return s.includes("|")&&/^\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/.test(s)}function ie(e){let s=e.trim();return s.startsWith("|")&&(s=s.slice(1)),s.endsWith("|")&&(s=s.slice(0,-1)),s.split("|").map(a=>a.trim())}function Hs(e){const s=e.startsWith(":"),a=e.endsWith(":");return s&&a?"center":a?"right":null}function se({body:e}){if(!e)return null;const s=e.replace(/^#\s+[^\n]*\n+/,"").split(`
|
|
2
2
|
`),a=[];let t=0,r=0;for(;t<s.length;){const i=s[t].trim();if(/^```/.test(i)){const l=[];for(t++;t<s.length&&!/^```/.test(s[t].trim());)l.push(s[t++]);t++,a.push(n.jsx("pre",{className:"doc-pre",children:n.jsx("code",{children:l.join(`
|
|
3
3
|
`)})},r++))}else if(/^#{1,6}\s+/.test(s[t]))a.push(n.jsx("h4",{className:"doc-h",children:U(s[t].replace(/^#+\s+/,""))},r++)),t++;else if(i.includes("|")&&t+1<s.length&&Se(s[t+1])){const l=ie(s[t]),c=ie(s[t+1]).map(Hs);t+=2;const o=[];for(;t<s.length&&s[t].includes("|")&&s[t].trim()!==""&&!/^```/.test(s[t].trim());)o.push(ie(s[t])),t++;a.push(n.jsxs("table",{className:"doc-table",children:[n.jsx("thead",{children:n.jsx("tr",{children:l.map((u,h)=>n.jsx("th",{style:c[h]?{textAlign:c[h]}:void 0,children:U(u)},h))})}),n.jsx("tbody",{children:o.map((u,h)=>n.jsx("tr",{children:l.map((v,d)=>n.jsx("td",{style:c[d]?{textAlign:c[d]}:void 0,children:U(u[d]??"")},d))},h))})]},r++))}else if(/^-\s+/.test(i)){const l=[];for(;t<s.length&&/^-\s+/.test(s[t].trim());)l.push(s[t++].trim().replace(/^-\s+/,""));a.push(n.jsx("ul",{children:l.map((c,o)=>n.jsx("li",{children:U(c)},o))},r++))}else if(i==="")t++;else{const l=[];for(;t<s.length;){const c=s[t];if(c.trim()===""||/^```/.test(c.trim())||/^#{1,6}\s+/.test(c)||/^-\s+/.test(c.trim())||c.includes("|")&&t+1<s.length&&Se(s[t+1]))break;l.push(c),t++}a.push(n.jsx("p",{children:U(l.join(" "))},r++))}}return n.jsx("div",{className:"doc-body",children:a})}function $e({kind:e,title:s,owner:a,ownerLabel:t,note:r,children:i}){return n.jsxs("section",{className:`spec-part part-${e}`,children:[n.jsxs("header",{className:"part-head",children:[n.jsx("span",{className:"part-title",children:s}),n.jsx("span",{className:`part-owner owner-${a}`,children:t}),r&&n.jsx("span",{className:"part-note",children:r})]}),n.jsx("div",{className:"part-body",children:i})]})}function Us({parts:e}){const s=D();return n.jsxs("div",{className:"spec-parts",children:[n.jsx($e,{kind:"raw",title:s("nodeView.rawTitle"),owner:"human",ownerLabel:s("nodeView.rawOwner"),note:s("nodeView.rawNote"),children:n.jsx(se,{body:e.rawSource})}),n.jsx($e,{kind:"expanded",title:s("nodeView.expandedTitle"),owner:"agent",ownerLabel:s("nodeView.expandedOwner"),note:s("nodeView.expandedNote"),children:n.jsx(se,{body:e.expandedSpec})})]})}const ce=new Map;function Ws(e,s){const a=`${e}@${s??""}`,[t,r]=x.useState(()=>ce.get(a)??null);return x.useEffect(()=>{const i=ce.get(a);if(i){r(i);return}r(null);let l=!0;return fetch(me(e,"content")).then(c=>c.ok?c.json():Promise.reject(c.status)).then(c=>{ce.set(a,c),l&&r(c)}).catch(()=>{l&&r({body:"",parts:null})}),()=>{l=!1}},[e,s,a]),t}function Gs({node:e}){var r,i;const s=D(),a=Ws(e.id,e.version),t=(e.driftFiles||[]).map(l=>`${l.file}: ${s("specNode.driftAhead",{n:l.behind})}`).join(`
|
|
4
4
|
`);return n.jsxs("div",{className:"pane-doc",children:[n.jsxs("h1",{children:["# ",e.title]}),n.jsx("blockquote",{children:e.desc}),n.jsxs("div",{className:"doc-stat",children:[n.jsxs("span",{className:`stat-status st-${e.status}`,"data-tip":s("nodeView.statusLabel"),children:[n.jsx("i",{className:"stat-dot"}),s(`status.${e.status}`)]}),n.jsxs("span",{className:"stat-chip","data-tip":s("nodeView.versionLabel"),children:["v",e.version||0]}),n.jsx(qs,{summary:(r=e.reviewSummary)==null?void 0:r.evals,href:O(Ge(e.id))}),e.drift>0&&n.jsxs("span",{className:"stat-chip stat-drift","data-tip":t,children:["⚠",e.drift]}),n.jsxs("span",{className:"stat-sess","data-tip":s("nodeView.lastEditedBy"),children:["✎ ",n.jsx("b",{children:e.session||s("common.none")})]})]}),((i=e.code)==null?void 0:i.length)>0?n.jsxs("div",{className:"doc-gov",children:[n.jsxs("span",{className:"doc-gov-h",children:[s("nodeView.governs")," ",n.jsx("b",{children:e.code.length})]}),n.jsx("div",{className:"doc-gov-files",children:e.code.map(l=>n.jsx("code",{className:"gov-f",children:l},l))})]}):n.jsx("div",{className:"doc-gov prose",children:n.jsx("span",{className:"doc-gov-h",children:s("nodeView.proseNode")})}),(()=>{if(a===null&&e.body==null)return n.jsx("div",{className:"pane-loading",children:n.jsx("span",{className:"spinner","aria-label":s("common.loading")})});const l=e.body??(a==null?void 0:a.body)??"",c=e.parts??(a==null?void 0:a.parts)??null;return c?n.jsx(Us,{parts:c}):n.jsx(se,{body:l})})()]})}function Qs(e,s=!0){const[a,t]=x.useState(null);return x.useEffect(()=>{if(!s)return;let r=!0;return fetch(me(e,"history")).then(i=>i.json()).then(i=>{r&&t(i)}).catch(()=>r&&t([])),()=>{r=!1}},[e,s]),a}const oe=new Map;function Js(e,s,a){const t=`${e}/${s}`,[r,i]=x.useState(()=>oe.get(t)??null);return x.useEffect(()=>{const l=oe.get(t);if(l){i(l);return}let c=!0;return fetch(me(e,"diff",s)).then(o=>o.json()).then(o=>{oe.set(t,o),c&&i(o)}).catch(()=>c&&i({patch:""})),()=>{c=!1}},[e,s,a,t]),r}function Ys(e){const s=[];let a=!1;for(const t of e.split(`
|
|
5
|
-
`)){if(t.startsWith("@@")){a=!0,s.push({t:"hunk",s:t});continue}!a||t.startsWith("\\")||(t.startsWith("+")?s.push({t:"add",s:t.slice(1)}):t.startsWith("-")?s.push({t:"del",s:t.slice(1)}):s.push({t:"ctx",s:t.slice(1)}))}for(;s.length&&s[s.length-1].t==="ctx"&&s[s.length-1].s==="";)s.pop();return s}function Ye({diff:e}){const s=D();if(e==null)return n.jsx("figcaption",{className:"ev-note",children:s("nodeView.loadingChange")});const a=e.patch?Ys(e.patch):[];return a.length?n.jsxs(n.Fragment,{children:[n.jsx("figcaption",{className:"ev-difflabel",children:s("nodeView.diffLabel")}),n.jsx("pre",{className:"ev-diff",children:a.map((t,r)=>n.jsx("div",{className:`dl dl-${t.t}`,children:t.s||" "},r))})]}):n.jsx("figcaption",{className:"ev-note",children:s("nodeView.noChange")})}function Ze({items:e,itemKey:s,classes:a,rowClass:t,renderHeader:r,renderEvidence:i,renderAction:l,leading:c,trailing:o,resetKey:u}){const h=x.useRef(null),[v,d]=x.useState(()=>new Set([0]));x.useEffect(()=>{u!==void 0&&d(new Set([0]))},[u]);const j=x.useCallback(g=>d(f=>{const y=new Set(f);return y.has(g)?y.delete(g):y.add(g),y}),[]),p=x.useCallback(()=>d(g=>{const f=h.current;if(!f)return g;let y=-1;for(;g.has(y+1);)y++;if(y<0||y>=e.length-1)return g;const k=f.querySelector(`[data-i="${y}"]`);return!k||k.getBoundingClientRect().bottom-f.getBoundingClientRect().top>f.clientHeight+40?g:new Set(g).add(y+1)}),[e]);return x.useEffect(()=>{const g=h.current;if(!g)return;let f=g.scrollTop;const y=()=>{const S=g.scrollTop,A=S>f;f=S,A&&p()},k=S=>{S.key!=="j"&&S.key!=="ArrowDown"||g.scrollHeight-g.clientHeight-g.scrollTop>1||p()};return g.addEventListener("scroll",y,{passive:!0}),window.addEventListener("keydown",k,!0),()=>{g.removeEventListener("scroll",y),window.removeEventListener("keydown",k,!0)}},[p]),n.jsxs("div",{className:a.pane,ref:h,children:[c,e.map((g,f)=>{const y=v.has(f),k=t?t(g,f):"";return n.jsxs("div",{"data-i":f,className:`${a.row}${k?` ${k}`:""}${y?" open":""}`,children:[n.jsx("button",{className:a.head,onClick:()=>j(f),"aria-expanded":y,children:r(g,f,y)}),l==null?void 0:l(g,f),y&&n.jsx("figure",{className:a.evidence,children:i(g,f)})]},s(g,f))}),o]})}function Zs({node:e,r:s,latest:a}){const t=Js(e.id,s.hash,!0);return n.jsx(Ye,{diff:t})}function Xs({node:e,rows:s}){const a=D();return s?s.length?n.jsx(Ze,{items:s,itemKey:t=>t.hash,classes:{pane:"pane-hist",row:"ver-row",head:"rec-toggle",evidence:"rec-evidence"},rowClass:(t,r)=>r===0?"latest":"",renderHeader:(t,r,i)=>n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"rec-head",children:[n.jsx("span",{className:"rec-caret",children:i?"▾":"▸"}),n.jsxs("span",{className:"rec-v",children:["v",s.length-r]}),n.jsx("code",{className:"rec-hash",children:t.hash.slice(0,7)}),n.jsx("span",{className:"rec-date",children:(t.date||"").slice(0,10)}),n.jsxs("span",{className:"rec-diff",children:[n.jsxs("b",{className:"rec-add",children:["+",t.additions??0]}),n.jsxs("b",{className:"rec-del",children:["−",t.deletions??0]})]})]}),n.jsx("div",{className:"rec-msg",children:t.reason}),n.jsxs("div",{className:"rec-sub",children:[a("nodeView.filesChanged",{n:t.files??0})," · ",t.session||a("common.idle")]})]}),renderEvidence:(t,r)=>n.jsx(Zs,{node:e,r:t,latest:r===0})}):n.jsx("div",{className:"pane-hist empty",children:a("common.noVersions")}):n.jsx("div",{className:"pane-hist empty",children:a("nodeView.loadingHistory")})}function en({node:e,sessions:s=[],filter:a={},onFilter:t=()=>{}}){var j,p,g,f,y;const r=D(),i=Qe("issue",e.id,a),l=Fe("issues",i,1,{pollMs:0});if(l.loading)return n.jsx("div",{className:"pane-issues pane-loading",children:n.jsx("span",{className:"spinner","aria-label":r("common.loading")})});if(l.error)return n.jsx("div",{className:"pane-issues empty",children:l.error});const c=((j=l.data)==null?void 0:j.items)||[],o=(((g=(p=e.reviewSummary)==null?void 0:p.issues)==null?void 0:g.open)||0)+(((y=(f=e.reviewSummary)==null?void 0:f.issues)==null?void 0:y.closed)||0);if(!o)return n.jsx("div",{className:"pane-issues empty",children:r("nodeView.noIssues")});const u=Je(l.data,r),h=c.filter(k=>k.status==="open"),v=c.filter(k=>k.status!=="open"),d=_e(u,t,["section","author","store","session"]);return n.jsxs("div",{className:"pane-issues",children:[o>4&&n.jsx(Ke,{value:a.q||"",onChange:k=>t({q:k||null}),summary:{shown:c.length,total:l.data.total},placeholder:r("nodeView.filterIssues"),searchLabel:r("reviewList.searchIssues"),filterLabel:r("reviewList.filters"),clearLabel:r("reviewList.all"),clearSearchLabel:r("reviewList.clearSearch"),groups:d}),!c.length&&n.jsx("div",{className:"pane-filter-none",children:r("nodeView.filterNone")}),h.length>0&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"issue-group-head",children:r("nodeView.openIssues",{n:h.length})}),h.map(k=>n.jsx(Ne,{issue:k},k.id))]}),v.length>0&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"issue-group-head closed",children:r("nodeView.closedIssues",{n:v.length})}),v.map(k=>n.jsx(Ne,{issue:k},k.id))]}),l.data.total>c.length&&n.jsxs("a",{className:"pane-view-all",href:O(We("issues",i)),children:[r("reviewList.showing",{shown:c.length,total:l.data.total})," ",n.jsx(R,{name:"chevron-right",size:13})]})]})}const de=new Map;function sn(e,s,a){const t=`${e} ${s}`,[r,i]=x.useState(()=>de.get(t)??null);return x.useEffect(()=>{if(!e||!s)return;const l=de.get(t);l&&i(l);let c=!0;return fetch(pe(`/api/edit?source=${encodeURIComponent(e)}&path=${encodeURIComponent(s)}`)).then(o=>o.json()).then(o=>{de.set(t,o),c&&i(o)}).catch(()=>c&&i(o=>o??{patch:""})),()=>{c=!1}},[e,s,a,t]),r}function nn({node:e,ov:s}){const a=D(),t=sn(s.source,e.path,!0);return n.jsxs("figure",{className:"edit-rev",children:[n.jsxs("figcaption",{className:"edit-by",children:[n.jsx("span",{className:`ov-mark ov-${s.op}`,children:zs[s.op]||"•"}),n.jsx("span",{className:"edit-by-label",children:s.label}),n.jsx("span",{className:"edit-state",children:s.committed?a("nodeView.editCommitted"):a("nodeView.editDirty")})]}),n.jsx(Ye,{diff:t})]})}function tn({node:e}){const s=D(),a=e.overlays||[];return a.length?n.jsx("div",{className:"pane-edit",children:a.map((t,r)=>n.jsx(nn,{node:e,ov:t},r))}):n.jsx("div",{className:"pane-edit empty",children:s("nodeView.noEdit")})}function an({verdict:e}){const s=D();return e?e.status==="pass"?n.jsx("span",{className:"eval-verdict pass",children:s("nodeView.eval.pass")}):e.status==="fail"?n.jsx("span",{className:"eval-verdict fail",children:s("nodeView.eval.fail")}):n.jsx("span",{className:"eval-verdict note","data-tip":e.note,children:s("nodeView.eval.note")}):n.jsx("span",{className:"eval-verdict legacy",children:s("nodeView.eval.legacy")})}function rn({r:e}){var t;const s=D(),a=Oe(e);return n.jsxs(n.Fragment,{children:[e.expected&&n.jsxs("div",{className:"eval-expected",children:[n.jsx("span",{className:"eval-expected-label",children:s("nodeView.eval.expected")})," ",e.expected]}),((t=e.verdict)==null?void 0:t.note)&&n.jsxs("div",{className:"eval-note",children:[n.jsx("span",{className:"eval-expected-label",children:s("nodeView.eval.noteLabel")})," ",e.verdict.note]}),a.length>0?n.jsx("div",{className:"eval-gallery",style:{display:"flex",flexDirection:"column",gap:8},children:a.map((r,i)=>n.jsx(Be,{e:r,alt:s("nodeView.eval.shotAlt",{scenario:e.scenario})},`${r.hash}-${i}`))}):n.jsx("figcaption",{className:"eval-noimg",children:e.blobState==="miss"?s("nodeView.eval.miss"):s("nodeView.eval.noImage")})]})}function Ee({s:e}){var a;const s=D();return n.jsxs("div",{className:"eval-row eval-declared-row",children:[n.jsxs("span",{className:"eval-top",children:[n.jsx(Ue,{state:"empty",title:s("score.missing")}),n.jsx("span",{className:"eval-scenario",children:e.name}),n.jsx(Ms,{tags:e.tags}),((a=e.code)==null?void 0:a.length)>0&&n.jsx("code",{className:"eval-tracks",children:e.code.join(", ")})]}),e.expected&&n.jsxs("div",{className:"eval-expected",children:[n.jsx("span",{className:"eval-expected-label",children:s("nodeView.eval.expected")})," ",e.expected]})]})}function Le({track:e}){const s=D();return n.jsxs("div",{className:"eval-row eval-dangling-row",children:[n.jsxs("span",{className:"eval-top",children:[n.jsx("span",{className:"eval-dangling-badge","data-tip":s("nodeView.eval.danglingTitle"),children:"⚠"}),n.jsx("span",{className:"eval-scenario eval-dangling-name",children:e.scenario}),n.jsx("span",{className:"eval-dangling-tag",children:s("nodeView.eval.danglingGone")})]}),n.jsx("div",{className:"eval-dangling-remarks",children:n.jsx(Dn,{replies:e.remarks})})]})}function ln({node:e,sessions:s=[],filter:a={},onFilter:t=()=>{}}){var g;const r=D(),i=Qe("eval",e.id,a),l=Fe("evals",i,1,{pollMs:0,view:"timeline"});if(l.loading)return n.jsx("div",{className:"pane-eval pane-loading",children:n.jsx("span",{className:"spinner","aria-label":r("common.loading")})});if(l.error)return n.jsx("div",{className:"pane-eval empty",children:l.error});if(!((g=l.data)!=null&&g.hasEvalFile))return n.jsx("div",{className:"pane-eval empty",children:r("nodeView.eval.noScenarios")});const c=l.data.items||[],o=c.filter(f=>f.filterKind===le.RESULT),u=c.filter(f=>f.filterKind===le.UNMEASURED),h=c.filter(f=>f.filterKind===le.DANGLING),v=Je(l.data,r),d=_e(v,t,["section","review","freshness","kind","filer","session"]),j=l.data.sourceTotal>4?n.jsx(Ke,{value:a.q||"",onChange:f=>t({q:f||null}),summary:{shown:c.length,total:l.data.total},placeholder:r("nodeView.filterScenarios"),searchLabel:r("reviewList.searchEvals"),filterLabel:r("reviewList.filters"),clearLabel:r("reviewList.all"),clearSearchLabel:r("reviewList.clearSearch"),groups:d},"filter"):null,p=l.data.total>c.length?n.jsxs("a",{className:"pane-view-all",href:O(We("evals",i)),children:[r("reviewList.showing",{shown:c.length,total:l.data.total})," ",n.jsx(R,{name:"chevron-right",size:13})]}):null;return o.length?n.jsxs(n.Fragment,{children:[n.jsx(Ze,{items:o,resetKey:`${l.data.revision}:${JSON.stringify(a)}`,leading:[j,c.length?null:n.jsx("div",{className:"pane-filter-none",children:r("nodeView.filterNone")},"none"),...u.map(f=>n.jsx(Ee,{s:f},f.name))],trailing:h.map(f=>n.jsx(Le,{track:f},f.threadId)),itemKey:(f,y)=>`${f.scenario}-${f.ts}-${y}`,classes:{pane:"pane-eval",row:"eval-row",head:"eval-head",evidence:"eval-shot"},renderAction:f=>n.jsx("a",{className:"eval-open",href:O(Ge(e.id,f.scenario)),"data-tip":r("nodeView.eval.openDetail"),"aria-label":r("nodeView.eval.openDetail"),children:n.jsx(R,{name:"chevron-right",size:14})}),renderHeader:(f,y,k)=>n.jsxs(n.Fragment,{children:[n.jsxs("span",{className:"eval-top",children:[n.jsx("span",{className:"eval-caret",children:k?"▾":"▸"}),n.jsx("span",{className:"eval-scenario",children:f.scenario}),n.jsx(an,{verdict:f.verdict}),n.jsx(Ue,{state:He(f),title:f.fresh?void 0:r("nodeView.eval.staleAxes",{axes:f.staleAxes.join(", ")})})]}),n.jsxs("span",{className:"eval-meta",children:[f.evaluator&&n.jsx("span",{className:"eval-evaluator",children:f.evaluator}),n.jsx("code",{className:"eval-sha",children:f.codeSha.slice(0,7)}),n.jsx("span",{className:"eval-ts",children:f.ts.replace("T"," ").slice(0,16)})]})]}),renderEvidence:f=>n.jsx(rn,{r:f})}),p]}):n.jsxs("div",{className:"pane-eval pane-eval-declared",children:[j,n.jsx("div",{className:"eval-todo-note",children:c.length?r("nodeView.eval.noReadings"):r("nodeView.filterNone")}),u.map(f=>n.jsx(Ee,{s:f},f.name)),h.map(f=>n.jsx(Le,{track:f},f.threadId)),p]})}const cn={spec:"nodeView.paneSpec",history:"nodeView.paneHistory",issues:"nodeView.paneIssues",eval:"nodeView.paneEval",edit:"nodeView.paneEdit"};function Xn({node:e,pane:s,setPane:a,onClose:t,sessions:r=[]}){var y,k,S,A,N,m,E,C;const i=D(),[l,c]=x.useState({issues:{},eval:{}}),o=(w,$)=>c(I=>({...I,[w]:ws(I[w],$)})),u=((k=(y=e.reviewSummary)==null?void 0:y.issues)==null?void 0:k.open)||0,h=((A=(S=e.reviewSummary)==null?void 0:S.issues)==null?void 0:A.closed)||0,v=((m=(N=e.reviewSummary)==null?void 0:N.evals)==null?void 0:m.pass)||0,d=((C=(E=e.reviewSummary)==null?void 0:E.evals)==null?void 0:C.fail)||0,j=(e.overlays||[]).length,p=_s(e),g=p.some(w=>w.key===s)?s:p[0].key,f=Qs(e.id,g==="history");return n.jsx("div",{className:"ov-backdrop","data-focus-overlay":!0,onMouseDown:t,children:n.jsxs("div",{className:"ov-panel",onMouseDown:w=>w.stopPropagation(),children:[n.jsxs("div",{className:"ov-head",children:[n.jsx("span",{className:"ov-title",children:e.title}),n.jsx("div",{className:"ov-tabs",children:p.map(w=>n.jsxs("button",{className:w.key===g?"ov-tab on":"ov-tab",onClick:()=>a(w.key),children:[i(cn[w.key]),w.key==="issues"&&(u>0||h>0)&&n.jsxs("span",{className:"ov-tab-counts",children:[u>0&&n.jsx(J,{kind:"issue",state:"open",cls:"st-open",n:u,label:i("nodeView.openIssues",{n:u})}),h>0&&n.jsx(J,{kind:"issue",state:"closed",cls:"st-closed",n:h,label:i("nodeView.closedIssues",{n:h})})]}),w.key==="eval"&&(v>0||d>0)&&n.jsxs("span",{className:"ov-tab-counts",children:[v>0&&n.jsx(J,{kind:"eval",state:"pass",cls:"st-pass",n:v,label:i("nodeView.eval.passCount",{n:v})}),d>0&&n.jsx(J,{kind:"eval",state:"fail",cls:"st-fail",n:d,label:i("nodeView.eval.failCount",{n:d})})]}),w.key==="edit"&&j>0&&n.jsx("span",{className:"ov-tab-counts",children:n.jsx("span",{className:"ovc st-edit","data-tip":i("nodeView.pendingEdits",{n:j}),children:j})})]},w.key))}),n.jsx("span",{className:"ov-hint",children:i("nodeView.hint")})]}),n.jsxs("div",{className:"ov-body",children:[g==="spec"&&n.jsx("div",{className:"pane-solo",children:n.jsx(Gs,{node:e})}),g==="history"&&n.jsx(Xs,{node:e,rows:f}),g==="issues"&&n.jsx(en,{node:e,sessions:r,filter:l.issues,onFilter:w=>o("issues",w)}),g==="eval"&&n.jsx(ln,{node:e,sessions:r,filter:l.eval,onFilter:w=>o("eval",w)}),g==="edit"&&n.jsx(tn,{node:e})]})]})})}const et=/\[\[(\.?[\p{L}\p{N}_-]+)\]\]/gu,Xe=e=>(e||"").replace(/^\.spec\//,"").replace(/\/spec\.md$/,"");function on(e,s,a){const t=s.toLowerCase(),r=[];for(const i of e){const l=i.id.toLowerCase(),c=Xe(i.path).toLowerCase();let o;if(!t)o=3;else if(l.startsWith(t))o=0;else if(l.includes(t))o=1;else if(c.includes(t))o=2;else continue;i.id===a&&(o=-1),r.push({s:i,score:o})}return r.sort((i,l)=>i.score-l.score||i.s.id.length-l.s.id.length||i.s.id.localeCompare(l.s.id)),r.slice(0,8).map(i=>i.s)}function dn(e,s){const a=s.toLowerCase(),t=c=>hs(c)||(c.id||"").slice(0,8),r=[];for(const c of e||[]){if(c.liveness!=="online")continue;const o=(c.id||"").toLowerCase(),u=t(c).toLowerCase();let h;if(!a)h=3;else if(o===a||u===a)h=0;else if(o.startsWith(a)||u.startsWith(a))h=1;else if(o.includes(a)||u.includes(a))h=2;else continue;r.push({s:c,score:h})}r.sort((c,o)=>c.score-o.score||(o.s.created||0)-(c.s.created||0));const i=r.map(c=>({id:c.s.id,label:t(c.s),sub:c.s.node||c.s.status})),l=r.filter(c=>c.score===0).length;return i.splice(l,0,{id:"new",label:"new",sub:"choose a launcher"}),i.slice(0,8)}function un(e,s){const a=s.toLowerCase();return(e||[]).map(t=>{const r=(t.name||"").toLowerCase(),i=a?r.startsWith(a)?0:r.includes(a)?1:-1:1;return{l:t,score:i}}).filter(t=>t.score>=0).sort((t,r)=>t.score-r.score||t.l.name.localeCompare(r.l.name)).slice(0,8).map(({l:t})=>({id:t.name,label:t.name,sub:t.cmd||t.harness||""}))}function X(e,s){if(!s)return e;const a=e.toLowerCase().indexOf(s.toLowerCase());return a<0?e:n.jsxs(n.Fragment,{children:[e.slice(0,a),n.jsx("b",{className:"mention-hit",children:e.slice(a,a+s.length)}),e.slice(a+s.length)]})}function es(e,s){const a=s.toLowerCase(),t=[];for(const r of e){const i=r.name.toLowerCase();let l;if(!a)l=1;else if(i.startsWith(a))l=0;else if(i.includes(a))l=1;else continue;t.push({c:r,score:l})}return t.sort((r,i)=>r.score-i.score),t.slice(0,10).map(r=>r.c)}function st(e,s,a){let t=s;for(;t>0&&!/\s/.test(e[t-1]);)t--;if(e[t]!=="/")return null;const r=e.slice(t+1,s),i=es(a,r);return i.length?{items:i,index:0,start:t,end:s,query:r}:null}const fn=e=>e&&e[0].toUpperCase()+e.slice(1),hn={user:"(user)",project:"(project)",skill:"[skill]","built-in":"built-in",ui:"[ui]",preset:"[preset]",review:"[review]"};function pn({menu:e,up:s,head:a,onPick:t,onHover:r}){const i=D();return n.jsxs("ul",{className:s?"mention-menu up":"mention-menu",role:"listbox",children:[n.jsxs("li",{className:"mention-head",children:["// ",a," — ",i("session.menuHint")]}),e.items.map((l,c)=>{const o=l.ui?"ui":l.source??l.kind,u=l.ui?` sc-${l.color}`:"";return n.jsxs("li",{role:"option","aria-selected":c===e.index,className:`${c===e.index?"mention-item on":"mention-item"}${u}`,onMouseDown:h=>{h.preventDefault(),t(l)},onMouseEnter:()=>r(c),children:[n.jsxs("span",{className:l.ui?"slash-name ui":"slash-name",children:["/",X(l.name,e.query)]}),n.jsx("span",{className:"slash-desc",children:fn(l.description??l.desc)}),n.jsx("span",{className:`slash-src src-${o}`,children:hn[o]||o})]},`${o}:${l.name}`)})]})}function mn(e,s,a,t){let r=s-1;for(;r>=0&&/[\p{L}\p{N}_.\-]/u.test(e[r]);)r--;if(r>=1&&e[r-1]==="["&&e[r]==="["){const i=e.slice(r+1,s),l=on(a,i,t);return l.length?{kind:"mention",items:l,index:0,start:r-1,end:s,query:i}:null}return null}function Ae(e,s,a,t=[]){let r=s-1;for(;r>=0&&/[\p{L}\p{N}_.:\-]/u.test(e[r]);)r--;if(r>=0&&e[r]==="@"&&(r===0||/\s/.test(e[r-1]))){const i=e.slice(r+1,s);if(i.startsWith("new:")){const c=i.slice(4),o=un(t,c);return o.length?{kind:"launcher",items:o,index:0,start:r,end:s,query:c}:null}const l=dn(a,i);return l.length?{kind:"actor",items:l,index:0,start:r,end:s,query:i}:null}return null}function vn({menu:e,up:s,fixedStyle:a,onPick:t,onHover:r}){const i=D(),l=e.kind==="launcher",c=e.kind==="actor"||l,o=l?`@new:${e.query}`:e.query?c?`@${e.query}`:`[[${e.query}]]`:i(c?"session.menuSessions":"session.menuSpecNodes");return n.jsxs("ul",{className:`${s?"mention-menu up":"mention-menu"}${a?" fixed":""}`,style:a||void 0,role:"listbox",children:[n.jsxs("li",{className:"mention-head",children:["// ",o," — ",i("session.menuHint")]}),e.items.map((u,h)=>n.jsxs("li",{role:"option","aria-selected":h===e.index,className:`${h===e.index?"mention-item on":"mention-item"}${l||c&&u.id==="new"?" new":""}`,onMouseDown:v=>{v.preventDefault(),t(u)},onMouseEnter:()=>r(h),children:[!c&&n.jsx("span",{className:"mention-dot",style:{background:q[u.status]||q.offline}}),n.jsx("span",{className:"mention-id",children:l?n.jsxs(n.Fragment,{children:["@new:",X(u.label,e.query)]}):c?n.jsxs(n.Fragment,{children:["@",X(u.label,e.query)]}):X(u.id,e.query)}),n.jsx("span",{className:"mention-path",children:c?u.sub:Xe(u.path)})]},u.id))]})}function xn({inputRef:e,value:s,setValue:a,specs:t=[],sessions:r=[],launchers:i=[],focusId:l=null,up:c=!1,fixedAbove:o=null}){const[u,h]=x.useState(null),[v,d]=x.useState(null),j=x.useRef(null),p=N=>`${N.value}\0${N.selectionStart}`,g=N=>{var T;if(!N){h(null),d(null);return}const m=p(N);if(j.current===m){h(null),d(null);return}j.current=null;const E=N.selectionStart,C=mn(N.value,E,t,l)||Ae(N.value,E,r,i);if(h(C),!C||!o){d(null);return}const w=N.getBoundingClientRect(),$=(T=N.closest(o))==null?void 0:T.getBoundingClientRect(),I=($==null?void 0:$.top)??w.top;d({left:`${w.left}px`,width:`${w.width}px`,right:"auto",bottom:`${Math.max(8,window.innerHeight-I+8)}px`})};x.useEffect(()=>{const N=e.current;i.length&&N&&document.activeElement===N&&g(N)},[i]);const f=N=>h(m=>m&&{...m,index:(m.index+N+m.items.length)%m.items.length}),y=N=>{if(!N||!u)return;j.current=null;const m=s.slice(0,u.start);if(u.kind==="actor"&&N.id==="new"){const w="@new:",$=m+w+s.slice(u.end),I=m.length+w.length;a($),h(Ae($,I,r,i)),requestAnimationFrame(()=>{const T=e.current;T&&(T.focus(),T.setSelectionRange(I,I))});return}const E=u.kind==="actor"?`@${N.id} `:u.kind==="launcher"?`@new:${N.id} `:`[[${N.id}]] `;a(m+E+s.slice(u.end)),h(null),d(null);const C=m.length+E.length;requestAnimationFrame(()=>{const w=e.current;w&&(w.focus(),w.setSelectionRange(C,C))})};return{menu:u,sync:g,onKeyDown:N=>u?N.key==="ArrowDown"?(N.preventDefault(),N.stopPropagation(),f(1),!0):N.key==="ArrowUp"?(N.preventDefault(),N.stopPropagation(),f(-1),!0):N.key==="Enter"||N.key==="Tab"?(N.preventDefault(),N.stopPropagation(),y(u.items[u.index]),!0):N.key==="Escape"?(N.preventDefault(),N.stopPropagation(),e.current&&(j.current=p(e.current)),h(null),d(null),!0):!1:!1,close:()=>{j.current=null,h(null),d(null)},menuEl:u?n.jsx(vn,{menu:u,up:c,fixedStyle:v,onPick:y,onHover:N=>h(m=>m&&{...m,index:N})}):null}}function gn(e,s,a,t=null){if(!e)return;const r=e.selectionStart??e.value.length,i=e.selectionEnd??r;a(e.value.slice(0,r)+s+e.value.slice(i));const l=r+s.length;requestAnimationFrame(()=>{e.isConnected&&(e.focus(),e.setSelectionRange(l,l),t==null||t(e))})}function ue({label:e,onClick:s,disabled:a=!1,children:t}){return n.jsx("button",{type:"button",className:"fv-trigger-btn","data-tip":e,"aria-label":e,disabled:a,onMouseDown:r=>r.preventDefault(),onClick:s,children:t})}async function nt(e,s){try{const a=await fetch(pe("/api/sessions"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({prompt:e,...s?{launcher:s}:{}})}),t=await a.json().catch(()=>null);return{ok:a.ok,error:t==null?void 0:t.error}}catch{return{ok:!1}}}let K=null,Y=null;const jn=()=>K?Promise.resolve(K):(Y||(Y=ds().then(e=>(K=e,e)).catch(e=>{throw Y=null,e})),Y),De=e=>Array.isArray(e==null?void 0:e.launchers)?e.launchers:[],wn=()=>{try{return localStorage.getItem("si.launcher")||""}catch{return""}},Ie=(e,s,a=wn())=>{var t;return e.some(r=>r.name===a)?a:s&&e.some(r=>r.name===s)?s:((t=e[0])==null?void 0:t.name)||a};function yn(){const e=De(K),[s,a]=x.useState(e),[t,r]=x.useState(()=>Ie(e,K==null?void 0:K.default)),i=l=>{r(l);try{localStorage.setItem("si.launcher",l)}catch{}};return x.useEffect(()=>{jn().then(l=>{const c=De(l);c.length&&(a(c),r(o=>Ie(c,l.default,o)))}).catch(()=>{})},[]),{launchers:s,launcher:t,pickLauncher:i}}function tt(){const[e,s]=x.useState([]);return x.useEffect(()=>{os().then(a=>{Array.isArray(a)&&s(a)}).catch(()=>{})},[]),e}function bn(e,s,a=0,t){if(!e)return;const r=t||getComputedStyle(e),i=r.boxSizing==="border-box"?(parseFloat(r.borderTopWidth)||0)+(parseFloat(r.borderBottomWidth)||0):0,l=e.placeholder;!e.value&&l&&(e.placeholder=""),e.style.height="auto";const c=e.scrollHeight+i;e.style.overflowY=c>s?"auto":"hidden",e.style.height=`${Math.min(Math.max(c,a),s)}px`,e.placeholder!==l&&(e.placeholder=l)}function Nn(e){var s,a;return e.isComposing||((s=e.nativeEvent)==null?void 0:s.isComposing)||e.keyCode===229||((a=e.nativeEvent)==null?void 0:a.keyCode)===229}const kn=x.forwardRef(function({value:s,className:a="",...t},r){const i=x.useRef(null);return x.useImperativeHandle(r,()=>i.current),x.useLayoutEffect(()=>{const l=i.current;if(!l)return;const c=getComputedStyle(l);bn(l,parseFloat(c.maxHeight)||1/0,parseFloat(c.minHeight)||0,c)},[s]),n.jsx("textarea",{ref:i,value:s,className:`composer-textarea ${a}`.trim(),...t})});function Sn({className:e="",preview:s=null,editor:a,footer:t,...r}){return n.jsxs("div",{className:`composer-surface ${e}`.trim(),...r,children:[s,n.jsx("div",{className:"composer-editor",children:a}),n.jsx("div",{className:"composer-footer",children:t})]})}const $n=/^▶\s*(\d+):([0-5]?\d)(?:\s*·\s*([^\n]*))?/,Ce=/^!\[frame\]\(\/api\/(?:evidence|yatsu\/blob)\/[0-9a-f]{64}\)\n?/,En=/\/api\/(?:evidence|yatsu\/blob)\/([0-9a-f]{64})/g,Te=/!\[[^\]]*\]\(\/api\/(?:evidence|yatsu\/blob)\/([0-9a-f]{64})\)/g,Ln=e=>{const s=Math.floor(e/1e3);return`${Math.floor(s/60)}:${String(s%60).padStart(2,"0")}`};function fe(e){var i;const s=e||"",a=s.split(`
|
|
5
|
+
`)){if(t.startsWith("@@")){a=!0,s.push({t:"hunk",s:t});continue}!a||t.startsWith("\\")||(t.startsWith("+")?s.push({t:"add",s:t.slice(1)}):t.startsWith("-")?s.push({t:"del",s:t.slice(1)}):s.push({t:"ctx",s:t.slice(1)}))}for(;s.length&&s[s.length-1].t==="ctx"&&s[s.length-1].s==="";)s.pop();return s}function Ye({diff:e}){const s=D();if(e==null)return n.jsx("figcaption",{className:"ev-note",children:s("nodeView.loadingChange")});const a=e.patch?Ys(e.patch):[];return a.length?n.jsxs(n.Fragment,{children:[n.jsx("figcaption",{className:"ev-difflabel",children:s("nodeView.diffLabel")}),n.jsx("pre",{className:"ev-diff",children:a.map((t,r)=>n.jsx("div",{className:`dl dl-${t.t}`,children:t.s||" "},r))})]}):n.jsx("figcaption",{className:"ev-note",children:s("nodeView.noChange")})}function Ze({items:e,itemKey:s,classes:a,rowClass:t,renderHeader:r,renderEvidence:i,renderAction:l,leading:c,trailing:o,resetKey:u}){const h=x.useRef(null),[v,d]=x.useState(()=>new Set([0]));x.useEffect(()=>{u!==void 0&&d(new Set([0]))},[u]);const j=x.useCallback(g=>d(f=>{const y=new Set(f);return y.has(g)?y.delete(g):y.add(g),y}),[]),p=x.useCallback(()=>d(g=>{const f=h.current;if(!f)return g;let y=-1;for(;g.has(y+1);)y++;if(y<0||y>=e.length-1)return g;const k=f.querySelector(`[data-i="${y}"]`);return!k||k.getBoundingClientRect().bottom-f.getBoundingClientRect().top>f.clientHeight+40?g:new Set(g).add(y+1)}),[e]);return x.useEffect(()=>{const g=h.current;if(!g)return;let f=g.scrollTop;const y=()=>{const S=g.scrollTop,A=S>f;f=S,A&&p()},k=S=>{S.key!=="j"&&S.key!=="ArrowDown"||g.scrollHeight-g.clientHeight-g.scrollTop>1||p()};return g.addEventListener("scroll",y,{passive:!0}),window.addEventListener("keydown",k,!0),()=>{g.removeEventListener("scroll",y),window.removeEventListener("keydown",k,!0)}},[p]),n.jsxs("div",{className:a.pane,ref:h,children:[c,e.map((g,f)=>{const y=v.has(f),k=t?t(g,f):"";return n.jsxs("div",{"data-i":f,className:`${a.row}${k?` ${k}`:""}${y?" open":""}`,children:[n.jsx("button",{className:a.head,onClick:()=>j(f),"aria-expanded":y,children:r(g,f,y)}),l==null?void 0:l(g,f),y&&n.jsx("figure",{className:a.evidence,children:i(g,f)})]},s(g,f))}),o]})}function Zs({node:e,r:s,latest:a}){const t=Js(e.id,s.hash,!0);return n.jsx(Ye,{diff:t})}function Xs({node:e,rows:s}){const a=D();return s?s.length?n.jsx(Ze,{items:s,itemKey:t=>t.hash,classes:{pane:"pane-hist",row:"ver-row",head:"rec-toggle",evidence:"rec-evidence"},rowClass:(t,r)=>r===0?"latest":"",renderHeader:(t,r,i)=>n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"rec-head",children:[n.jsx("span",{className:"rec-caret",children:i?"▾":"▸"}),n.jsxs("span",{className:"rec-v",children:["v",s.length-r]}),n.jsx("code",{className:"rec-hash",children:t.hash.slice(0,7)}),n.jsx("span",{className:"rec-date",children:(t.date||"").slice(0,10)}),n.jsxs("span",{className:"rec-diff",children:[n.jsxs("b",{className:"rec-add",children:["+",t.additions??0]}),n.jsxs("b",{className:"rec-del",children:["−",t.deletions??0]})]})]}),n.jsx("div",{className:"rec-msg",children:t.reason}),n.jsxs("div",{className:"rec-sub",children:[a("nodeView.filesChanged",{n:t.files??0})," · ",t.session||a("common.idle")]})]}),renderEvidence:(t,r)=>n.jsx(Zs,{node:e,r:t,latest:r===0})}):n.jsx("div",{className:"pane-hist empty",children:a("common.noVersions")}):n.jsx("div",{className:"pane-hist empty",children:a("nodeView.loadingHistory")})}function en({node:e,sessions:s=[],filter:a={},onFilter:t=()=>{}}){var j,p,g,f,y;const r=D(),i=Qe("issue",e.id,a),l=Fe("issues",i,1,{pollMs:0});if(l.loading)return n.jsx("div",{className:"pane-issues pane-loading",children:n.jsx("span",{className:"spinner","aria-label":r("common.loading")})});if(l.error)return n.jsx("div",{className:"pane-issues empty",children:l.error});const c=((j=l.data)==null?void 0:j.items)||[],o=(((g=(p=e.reviewSummary)==null?void 0:p.issues)==null?void 0:g.open)||0)+(((y=(f=e.reviewSummary)==null?void 0:f.issues)==null?void 0:y.closed)||0);if(!o)return n.jsx("div",{className:"pane-issues empty",children:r("nodeView.noIssues")});const u=Je(l.data,r),h=c.filter(k=>k.status==="open"),v=c.filter(k=>k.status!=="open"),d=_e(u,t,["section","author","store","session"]);return n.jsxs("div",{className:"pane-issues",children:[o>4&&n.jsx(Ke,{value:a.q||"",onChange:k=>t({q:k||null}),summary:{shown:c.length,total:l.data.total},placeholder:r("nodeView.filterIssues"),searchLabel:r("reviewList.searchIssues"),filterLabel:r("reviewList.filters"),clearLabel:r("reviewList.all"),clearSearchLabel:r("reviewList.clearSearch"),groups:d}),!c.length&&n.jsx("div",{className:"pane-filter-none",children:r("nodeView.filterNone")}),h.length>0&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"issue-group-head",children:r("nodeView.openIssues",{n:h.length})}),h.map(k=>n.jsx(Ne,{issue:k},k.id))]}),v.length>0&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"issue-group-head closed",children:r("nodeView.closedIssues",{n:v.length})}),v.map(k=>n.jsx(Ne,{issue:k},k.id))]}),l.data.total>c.length&&n.jsxs("a",{className:"pane-view-all",href:O(We("issues",i)),children:[r("reviewList.showing",{shown:c.length,total:l.data.total})," ",n.jsx(R,{name:"chevron-right",size:13})]})]})}const de=new Map;function sn(e,s,a){const t=`${e} ${s}`,[r,i]=x.useState(()=>de.get(t)??null);return x.useEffect(()=>{if(!e||!s)return;const l=de.get(t);l&&i(l);let c=!0;return fetch(pe(`/api/edit?source=${encodeURIComponent(e)}&path=${encodeURIComponent(s)}`)).then(o=>o.json()).then(o=>{de.set(t,o),c&&i(o)}).catch(()=>c&&i(o=>o??{patch:""})),()=>{c=!1}},[e,s,a,t]),r}function nn({node:e,ov:s}){const a=D(),t=sn(s.source,e.path,!0);return n.jsxs("figure",{className:"edit-rev",children:[n.jsxs("figcaption",{className:"edit-by",children:[n.jsx("span",{className:`ov-mark ov-${s.op}`,children:zs[s.op]||"•"}),n.jsx("span",{className:"edit-by-label",children:s.label}),n.jsx("span",{className:"edit-state",children:s.committed?a("nodeView.editCommitted"):a("nodeView.editDirty")})]}),n.jsx(Ye,{diff:t})]})}function tn({node:e}){const s=D(),a=e.overlays||[];return a.length?n.jsx("div",{className:"pane-edit",children:a.map((t,r)=>n.jsx(nn,{node:e,ov:t},r))}):n.jsx("div",{className:"pane-edit empty",children:s("nodeView.noEdit")})}function an({verdict:e}){const s=D();return e?e.status==="pass"?n.jsx("span",{className:"eval-verdict pass",children:s("nodeView.eval.pass")}):e.status==="fail"?n.jsx("span",{className:"eval-verdict fail",children:s("nodeView.eval.fail")}):n.jsx("span",{className:"eval-verdict note","data-tip":e.note,children:s("nodeView.eval.note")}):n.jsx("span",{className:"eval-verdict legacy",children:s("nodeView.eval.legacy")})}function rn({r:e}){var t;const s=D(),a=Oe(e);return n.jsxs(n.Fragment,{children:[e.expected&&n.jsxs("div",{className:"eval-expected",children:[n.jsx("span",{className:"eval-expected-label",children:s("nodeView.eval.expected")})," ",e.expected]}),((t=e.verdict)==null?void 0:t.note)&&n.jsxs("div",{className:"eval-note",children:[n.jsx("span",{className:"eval-expected-label",children:s("nodeView.eval.noteLabel")})," ",e.verdict.note]}),a.length>0?n.jsx("div",{className:"eval-gallery",style:{display:"flex",flexDirection:"column",gap:8},children:a.map((r,i)=>n.jsx(Be,{e:r,alt:s("nodeView.eval.shotAlt",{scenario:e.scenario})},`${r.hash}-${i}`))}):n.jsx("figcaption",{className:"eval-noimg",children:e.blobState==="miss"?s("nodeView.eval.miss"):s("nodeView.eval.noImage")})]})}function Ee({s:e}){var a;const s=D();return n.jsxs("div",{className:"eval-row eval-declared-row",children:[n.jsxs("span",{className:"eval-top",children:[n.jsx(Ue,{state:"empty",title:s("score.missing")}),n.jsx("span",{className:"eval-scenario",children:e.name}),n.jsx(Ms,{tags:e.tags}),((a=e.code)==null?void 0:a.length)>0&&n.jsx("code",{className:"eval-tracks",children:e.code.join(", ")})]}),e.expected&&n.jsxs("div",{className:"eval-expected",children:[n.jsx("span",{className:"eval-expected-label",children:s("nodeView.eval.expected")})," ",e.expected]})]})}function Le({track:e}){const s=D();return n.jsxs("div",{className:"eval-row eval-dangling-row",children:[n.jsxs("span",{className:"eval-top",children:[n.jsx("span",{className:"eval-dangling-badge","data-tip":s("nodeView.eval.danglingTitle"),children:"⚠"}),n.jsx("span",{className:"eval-scenario eval-dangling-name",children:e.scenario}),n.jsx("span",{className:"eval-dangling-tag",children:s("nodeView.eval.danglingGone")})]}),n.jsx("div",{className:"eval-dangling-remarks",children:n.jsx(Dn,{replies:e.remarks})})]})}function ln({node:e,sessions:s=[],filter:a={},onFilter:t=()=>{}}){var g;const r=D(),i=Qe("eval",e.id,a),l=Fe("evals",i,1,{pollMs:0,view:"timeline"});if(l.loading)return n.jsx("div",{className:"pane-eval pane-loading",children:n.jsx("span",{className:"spinner","aria-label":r("common.loading")})});if(l.error)return n.jsx("div",{className:"pane-eval empty",children:l.error});if(!((g=l.data)!=null&&g.hasEvalFile))return n.jsx("div",{className:"pane-eval empty",children:r("nodeView.eval.noScenarios")});const c=l.data.items||[],o=c.filter(f=>f.filterKind===le.RESULT),u=c.filter(f=>f.filterKind===le.UNMEASURED),h=c.filter(f=>f.filterKind===le.DANGLING),v=Je(l.data,r),d=_e(v,t,["section","review","freshness","kind","filer","session"]),j=l.data.sourceTotal>4?n.jsx(Ke,{value:a.q||"",onChange:f=>t({q:f||null}),summary:{shown:c.length,total:l.data.total},placeholder:r("nodeView.filterScenarios"),searchLabel:r("reviewList.searchEvals"),filterLabel:r("reviewList.filters"),clearLabel:r("reviewList.all"),clearSearchLabel:r("reviewList.clearSearch"),groups:d},"filter"):null,p=l.data.total>c.length?n.jsxs("a",{className:"pane-view-all",href:O(We("evals",i)),children:[r("reviewList.showing",{shown:c.length,total:l.data.total})," ",n.jsx(R,{name:"chevron-right",size:13})]}):null;return o.length?n.jsxs(n.Fragment,{children:[n.jsx(Ze,{items:o,resetKey:`${l.data.revision}:${JSON.stringify(a)}`,leading:[j,c.length?null:n.jsx("div",{className:"pane-filter-none",children:r("nodeView.filterNone")},"none"),...u.map(f=>n.jsx(Ee,{s:f},f.name))],trailing:h.map(f=>n.jsx(Le,{track:f},f.threadId)),itemKey:(f,y)=>`${f.scenario}-${f.ts}-${y}`,classes:{pane:"pane-eval",row:"eval-row",head:"eval-head",evidence:"eval-shot"},renderAction:f=>n.jsx("a",{className:"eval-open",href:O(Ge(e.id,f.scenario)),"data-tip":r("nodeView.eval.openDetail"),"aria-label":r("nodeView.eval.openDetail"),children:n.jsx(R,{name:"chevron-right",size:14})}),renderHeader:(f,y,k)=>n.jsxs(n.Fragment,{children:[n.jsxs("span",{className:"eval-top",children:[n.jsx("span",{className:"eval-caret",children:k?"▾":"▸"}),n.jsx("span",{className:"eval-scenario",children:f.scenario}),n.jsx(an,{verdict:f.verdict}),n.jsx(Ue,{state:He(f),title:f.fresh?void 0:r("nodeView.eval.staleAxes",{axes:f.staleAxes.join(", ")})})]}),n.jsxs("span",{className:"eval-meta",children:[f.evaluator&&n.jsx("span",{className:"eval-evaluator",children:f.evaluator}),n.jsx("code",{className:"eval-sha",children:f.codeSha.slice(0,7)}),n.jsx("span",{className:"eval-ts",children:f.ts.replace("T"," ").slice(0,16)})]})]}),renderEvidence:f=>n.jsx(rn,{r:f})}),p]}):n.jsxs("div",{className:"pane-eval pane-eval-declared",children:[j,n.jsx("div",{className:"eval-todo-note",children:c.length?r("nodeView.eval.noReadings"):r("nodeView.filterNone")}),u.map(f=>n.jsx(Ee,{s:f},f.name)),h.map(f=>n.jsx(Le,{track:f},f.threadId)),p]})}const cn={spec:"nodeView.paneSpec",history:"nodeView.paneHistory",issues:"nodeView.paneIssues",eval:"nodeView.paneEval",edit:"nodeView.paneEdit"};function Xn({node:e,pane:s,setPane:a,onClose:t,sessions:r=[]}){var y,k,S,A,N,m,E,C;const i=D(),[l,c]=x.useState({issues:{},eval:{}}),o=(w,$)=>c(I=>({...I,[w]:ws(I[w],$)})),u=((k=(y=e.reviewSummary)==null?void 0:y.issues)==null?void 0:k.open)||0,h=((A=(S=e.reviewSummary)==null?void 0:S.issues)==null?void 0:A.closed)||0,v=((m=(N=e.reviewSummary)==null?void 0:N.evals)==null?void 0:m.pass)||0,d=((C=(E=e.reviewSummary)==null?void 0:E.evals)==null?void 0:C.fail)||0,j=(e.overlays||[]).length,p=_s(e),g=p.some(w=>w.key===s)?s:p[0].key,f=Qs(e.id,g==="history");return n.jsx("div",{className:"ov-backdrop","data-focus-overlay":!0,onMouseDown:t,children:n.jsxs("div",{className:"ov-panel",onMouseDown:w=>w.stopPropagation(),children:[n.jsxs("div",{className:"ov-head",children:[n.jsx("span",{className:"ov-title",children:e.title}),n.jsx("div",{className:"ov-tabs",children:p.map(w=>n.jsxs("button",{className:w.key===g?"ov-tab on":"ov-tab",onClick:()=>a(w.key),children:[i(cn[w.key]),w.key==="issues"&&(u>0||h>0)&&n.jsxs("span",{className:"ov-tab-counts",children:[u>0&&n.jsx(J,{kind:"issue",state:"open",cls:"st-open",n:u,label:i("nodeView.openIssues",{n:u})}),h>0&&n.jsx(J,{kind:"issue",state:"closed",cls:"st-closed",n:h,label:i("nodeView.closedIssues",{n:h})})]}),w.key==="eval"&&(v>0||d>0)&&n.jsxs("span",{className:"ov-tab-counts",children:[v>0&&n.jsx(J,{kind:"eval",state:"pass",cls:"st-pass",n:v,label:i("nodeView.eval.passCount",{n:v})}),d>0&&n.jsx(J,{kind:"eval",state:"fail",cls:"st-fail",n:d,label:i("nodeView.eval.failCount",{n:d})})]}),w.key==="edit"&&j>0&&n.jsx("span",{className:"ov-tab-counts",children:n.jsx("span",{className:"ovc st-edit","data-tip":i("nodeView.pendingEdits",{n:j}),children:j})})]},w.key))}),n.jsx("span",{className:"ov-hint",children:i("nodeView.hint")})]}),n.jsxs("div",{className:"ov-body",children:[g==="spec"&&n.jsx("div",{className:"pane-solo",children:n.jsx(Gs,{node:e})}),g==="history"&&n.jsx(Xs,{node:e,rows:f}),g==="issues"&&n.jsx(en,{node:e,sessions:r,filter:l.issues,onFilter:w=>o("issues",w)}),g==="eval"&&n.jsx(ln,{node:e,sessions:r,filter:l.eval,onFilter:w=>o("eval",w)}),g==="edit"&&n.jsx(tn,{node:e})]})]})})}const et=/\[\[(\.?[\p{L}\p{N}_-]+)\]\]/gu,Xe=e=>(e||"").replace(/^\.spec\//,"").replace(/\/spec\.md$/,"");function on(e,s,a){const t=s.toLowerCase(),r=[];for(const i of e){const l=i.id.toLowerCase(),c=Xe(i.path).toLowerCase();let o;if(!t)o=3;else if(l.startsWith(t))o=0;else if(l.includes(t))o=1;else if(c.includes(t))o=2;else continue;i.id===a&&(o=-1),r.push({s:i,score:o})}return r.sort((i,l)=>i.score-l.score||i.s.id.length-l.s.id.length||i.s.id.localeCompare(l.s.id)),r.slice(0,8).map(i=>i.s)}function dn(e,s){const a=s.toLowerCase(),t=c=>hs(c)||(c.id||"").slice(0,8),r=[];for(const c of e||[]){if(c.liveness!=="online")continue;const o=(c.id||"").toLowerCase(),u=t(c).toLowerCase();let h;if(!a)h=3;else if(o===a||u===a)h=0;else if(o.startsWith(a)||u.startsWith(a))h=1;else if(o.includes(a)||u.includes(a))h=2;else continue;r.push({s:c,score:h})}r.sort((c,o)=>c.score-o.score||(o.s.created||0)-(c.s.created||0));const i=r.map(c=>({id:c.s.id,label:t(c.s),sub:c.s.node||c.s.status})),l=r.filter(c=>c.score===0).length;return i.splice(l,0,{id:"new",label:"new",sub:"choose a launcher"}),i.slice(0,8)}function un(e,s){const a=s.toLowerCase();return(e||[]).map(t=>{const r=(t.name||"").toLowerCase(),i=a?r.startsWith(a)?0:r.includes(a)?1:-1:1;return{l:t,score:i}}).filter(t=>t.score>=0).sort((t,r)=>t.score-r.score||t.l.name.localeCompare(r.l.name)).slice(0,8).map(({l:t})=>({id:t.name,label:t.name,sub:t.cmd||t.harness||""}))}function X(e,s){if(!s)return e;const a=e.toLowerCase().indexOf(s.toLowerCase());return a<0?e:n.jsxs(n.Fragment,{children:[e.slice(0,a),n.jsx("b",{className:"mention-hit",children:e.slice(a,a+s.length)}),e.slice(a+s.length)]})}function es(e,s){const a=s.toLowerCase(),t=[];for(const r of e){const i=r.name.toLowerCase();let l;if(!a)l=1;else if(i.startsWith(a))l=0;else if(i.includes(a))l=1;else continue;t.push({c:r,score:l})}return t.sort((r,i)=>r.score-i.score),t.slice(0,10).map(r=>r.c)}function st(e,s,a){let t=s;for(;t>0&&!/\s/.test(e[t-1]);)t--;if(e[t]!=="/")return null;const r=e.slice(t+1,s),i=es(a,r);return i.length?{items:i,index:0,start:t,end:s,query:r}:null}const fn=e=>e&&e[0].toUpperCase()+e.slice(1),hn={user:"(user)",project:"(project)",skill:"[skill]","built-in":"built-in",ui:"[ui]",preset:"[preset]",review:"[review]"};function pn({menu:e,up:s,head:a,onPick:t,onHover:r}){const i=D();return n.jsxs("ul",{className:s?"mention-menu up":"mention-menu",role:"listbox",children:[n.jsxs("li",{className:"mention-head",children:["// ",a," — ",i("session.menuHint")]}),e.items.map((l,c)=>{const o=l.ui?"ui":l.source??l.kind,u=l.ui?` sc-${l.color}`:"";return n.jsxs("li",{role:"option","aria-selected":c===e.index,className:`${c===e.index?"mention-item on":"mention-item"}${u}`,onMouseDown:h=>{h.preventDefault(),t(l)},onMouseEnter:()=>r(c),children:[n.jsxs("span",{className:l.ui?"slash-name ui":"slash-name",children:["/",X(l.name,e.query)]}),n.jsx("span",{className:"slash-desc",children:fn(l.description??l.desc)}),n.jsx("span",{className:`slash-src src-${o}`,children:hn[o]||o})]},`${o}:${l.name}`)})]})}function mn(e,s,a,t){let r=s-1;for(;r>=0&&/[\p{L}\p{N}_.\-]/u.test(e[r]);)r--;if(r>=1&&e[r-1]==="["&&e[r]==="["){const i=e.slice(r+1,s),l=on(a,i,t);return l.length?{kind:"mention",items:l,index:0,start:r-1,end:s,query:i}:null}return null}function Ae(e,s,a,t=[]){let r=s-1;for(;r>=0&&/[\p{L}\p{N}_.:\-]/u.test(e[r]);)r--;if(r>=0&&e[r]==="@"&&(r===0||/\s/.test(e[r-1]))){const i=e.slice(r+1,s);if(i.startsWith("new:")){const c=i.slice(4),o=un(t,c);return o.length?{kind:"launcher",items:o,index:0,start:r,end:s,query:c}:null}const l=dn(a,i);return l.length?{kind:"actor",items:l,index:0,start:r,end:s,query:i}:null}return null}function vn({menu:e,up:s,fixedStyle:a,onPick:t,onHover:r}){const i=D(),l=e.kind==="launcher",c=e.kind==="actor"||l,o=l?`@new:${e.query}`:e.query?c?`@${e.query}`:`[[${e.query}]]`:i(c?"session.menuSessions":"session.menuSpecNodes");return n.jsxs("ul",{className:`${s?"mention-menu up":"mention-menu"}${a?" fixed":""}`,style:a||void 0,role:"listbox",children:[n.jsxs("li",{className:"mention-head",children:["// ",o," — ",i("session.menuHint")]}),e.items.map((u,h)=>n.jsxs("li",{role:"option","aria-selected":h===e.index,className:`${h===e.index?"mention-item on":"mention-item"}${l||c&&u.id==="new"?" new":""}`,onMouseDown:v=>{v.preventDefault(),t(u)},onMouseEnter:()=>r(h),children:[!c&&n.jsx("span",{className:"mention-dot",style:{background:q[u.status]||q.offline}}),n.jsx("span",{className:"mention-id",children:l?n.jsxs(n.Fragment,{children:["@new:",X(u.label,e.query)]}):c?n.jsxs(n.Fragment,{children:["@",X(u.label,e.query)]}):X(u.id,e.query)}),n.jsx("span",{className:"mention-path",children:c?u.sub:Xe(u.path)})]},u.id))]})}function xn({inputRef:e,value:s,setValue:a,specs:t=[],sessions:r=[],launchers:i=[],focusId:l=null,up:c=!1,fixedAbove:o=null}){const[u,h]=x.useState(null),[v,d]=x.useState(null),j=x.useRef(null),p=N=>`${N.value}\0${N.selectionStart}`,g=N=>{var T;if(!N){h(null),d(null);return}const m=p(N);if(j.current===m){h(null),d(null);return}j.current=null;const E=N.selectionStart,C=mn(N.value,E,t,l)||Ae(N.value,E,r,i);if(h(C),!C||!o){d(null);return}const w=N.getBoundingClientRect(),$=(T=N.closest(o))==null?void 0:T.getBoundingClientRect(),I=($==null?void 0:$.top)??w.top;d({left:`${w.left}px`,width:`${w.width}px`,right:"auto",bottom:`${Math.max(8,window.innerHeight-I+8)}px`})};x.useEffect(()=>{const N=e.current;i.length&&N&&document.activeElement===N&&g(N)},[i]);const f=N=>h(m=>m&&{...m,index:(m.index+N+m.items.length)%m.items.length}),y=N=>{if(!N||!u)return;j.current=null;const m=s.slice(0,u.start);if(u.kind==="actor"&&N.id==="new"){const w="@new:",$=m+w+s.slice(u.end),I=m.length+w.length;a($),h(Ae($,I,r,i)),requestAnimationFrame(()=>{const T=e.current;T&&(T.focus(),T.setSelectionRange(I,I))});return}const E=u.kind==="actor"?`@${N.id} `:u.kind==="launcher"?`@new:${N.id} `:`[[${N.id}]] `;a(m+E+s.slice(u.end)),h(null),d(null);const C=m.length+E.length;requestAnimationFrame(()=>{const w=e.current;w&&(w.focus(),w.setSelectionRange(C,C))})};return{menu:u,sync:g,onKeyDown:N=>u?N.key==="ArrowDown"?(N.preventDefault(),N.stopPropagation(),f(1),!0):N.key==="ArrowUp"?(N.preventDefault(),N.stopPropagation(),f(-1),!0):N.key==="Enter"||N.key==="Tab"?(N.preventDefault(),N.stopPropagation(),y(u.items[u.index]),!0):N.key==="Escape"?(N.preventDefault(),N.stopPropagation(),e.current&&(j.current=p(e.current)),h(null),d(null),!0):!1:!1,close:()=>{j.current=null,h(null),d(null)},menuEl:u?n.jsx(vn,{menu:u,up:c,fixedStyle:v,onPick:y,onHover:N=>h(m=>m&&{...m,index:N})}):null}}function gn(e,s,a,t=null){if(!e)return;const r=e.selectionStart??e.value.length,i=e.selectionEnd??r;a(e.value.slice(0,r)+s+e.value.slice(i));const l=r+s.length;requestAnimationFrame(()=>{e.isConnected&&(e.focus(),e.setSelectionRange(l,l),t==null||t(e))})}function ue({label:e,onClick:s,disabled:a=!1,children:t}){return n.jsx("button",{type:"button",className:"fv-trigger-btn","data-tip":e,"aria-label":e,disabled:a,onMouseDown:r=>r.preventDefault(),onClick:s,children:t})}async function nt(e,s){try{const a=await fetch(pe("/api/sessions"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({prompt:e,...s?{launcher:s}:{}})}),t=await a.json().catch(()=>null);return{ok:a.ok,error:t==null?void 0:t.error}}catch{return{ok:!1}}}let K=null,Y=null;const jn=()=>K?Promise.resolve(K):(Y||(Y=os().then(e=>(K=e,e)).catch(e=>{throw Y=null,e})),Y),De=e=>Array.isArray(e==null?void 0:e.launchers)?e.launchers:[],wn=()=>{try{return localStorage.getItem("si.launcher")||""}catch{return""}},Ie=(e,s,a=wn())=>{var t;return e.some(r=>r.name===a)?a:s&&e.some(r=>r.name===s)?s:((t=e[0])==null?void 0:t.name)||a};function yn(){const e=De(K),[s,a]=x.useState(e),[t,r]=x.useState(()=>Ie(e,K==null?void 0:K.default)),i=l=>{r(l);try{localStorage.setItem("si.launcher",l)}catch{}};return x.useEffect(()=>{jn().then(l=>{const c=De(l);c.length&&(a(c),r(o=>Ie(c,l.default,o)))}).catch(()=>{})},[]),{launchers:s,launcher:t,pickLauncher:i}}function tt(){const[e,s]=x.useState([]);return x.useEffect(()=>{ds().then(a=>{Array.isArray(a)&&s(a)}).catch(()=>{})},[]),e}function bn(e,s,a=0,t){if(!e)return;const r=t||getComputedStyle(e),i=r.boxSizing==="border-box"?(parseFloat(r.borderTopWidth)||0)+(parseFloat(r.borderBottomWidth)||0):0,l=e.placeholder;!e.value&&l&&(e.placeholder=""),e.style.height="auto";const c=e.scrollHeight+i;e.style.overflowY=c>s?"auto":"hidden",e.style.height=`${Math.min(Math.max(c,a),s)}px`,e.placeholder!==l&&(e.placeholder=l)}function Nn(e){var s,a;return e.isComposing||((s=e.nativeEvent)==null?void 0:s.isComposing)||e.keyCode===229||((a=e.nativeEvent)==null?void 0:a.keyCode)===229}const kn=x.forwardRef(function({value:s,className:a="",...t},r){const i=x.useRef(null);return x.useImperativeHandle(r,()=>i.current),x.useLayoutEffect(()=>{const l=i.current;if(!l)return;const c=getComputedStyle(l);bn(l,parseFloat(c.maxHeight)||1/0,parseFloat(c.minHeight)||0,c)},[s]),n.jsx("textarea",{ref:i,value:s,className:`composer-textarea ${a}`.trim(),...t})});function Sn({className:e="",preview:s=null,editor:a,footer:t,...r}){return n.jsxs("div",{className:`composer-surface ${e}`.trim(),...r,children:[s,n.jsx("div",{className:"composer-editor",children:a}),n.jsx("div",{className:"composer-footer",children:t})]})}const $n=/^▶\s*(\d+):([0-5]?\d)(?:\s*·\s*([^\n]*))?/,Ce=/^!\[frame\]\(\/api\/(?:evidence|yatsu\/blob)\/[0-9a-f]{64}\)\n?/,En=/\/api\/(?:evidence|yatsu\/blob)\/([0-9a-f]{64})/g,Te=/!\[[^\]]*\]\(\/api\/(?:evidence|yatsu\/blob)\/([0-9a-f]{64})\)/g,Ln=e=>{const s=Math.floor(e/1e3);return`${Math.floor(s/60)}:${String(s%60).padStart(2,"0")}`};function fe(e){var i;const s=e||"",a=s.split(`
|
|
6
6
|
`,1)[0],t=$n.exec(a);return t?{tMs:(parseInt(t[1],10)*60+parseInt(t[2],10))*1e3,step:((i=t[3])==null?void 0:i.trim())||null,label:a.trim(),rest:s.slice(a.length).replace(/^\n/,"")}:null}const ss=(e,s)=>`▶${Ln(e)}${s?` · ${s}`:""}`,Re=e=>[...(e||"").matchAll(En)].map(s=>s[1]);function An(e,s){if(!e)return null;if(e.step&&(s!=null&&s.length)){const a=s.find(t=>t.step===e.step);return a?{tMs:a.at,step:e.step,label:ss(a.at,e.step),seekable:!0,degraded:!1}:{tMs:e.tMs,step:e.step,label:e.label,seekable:!1,degraded:!0}}return{tMs:e.tMs,step:e.step,label:e.label,seekable:!0,degraded:!1}}function at({originator:e,sessions:s=[],kind:a="issue",onOpenSession:t=null}){const r=D();if(!e)return null;const i=fs(s,e),l=!!i,c=l?q[i.status]||q.working:q.offline,o=r(a==="eval"?"thread.originatorEval":"thread.originatorIssue",{by:e}),u=n.jsx("span",{className:"fv-originator-dot",style:{background:c},"aria-hidden":"true"});return n.jsx(Es,{text:e,tip:o,label:o,lead:u,className:`fv-originator ${l?"alive":"offline"}${l&&t?" openable":""}`,onClick:l&&t?()=>t(e):null})}function Dn({replies:e,onSeek:s,selIdx:a=null,activeIdx:t=null,onSelect:r=null,events:i=null,threadId:l=null,onRemarkChange:c=null}){const o=D(),[u,h]=x.useState(null),[v,d]=x.useState(null),j=async(p,g)=>{if(!u){h(g),d(null);try{const f=await us(p,g);f!=null&&f.ok?await(c==null?void 0:c()):d({ref:g,msg:(f==null?void 0:f.error)||`${p} failed`})}finally{h(null)}}};return e.map((p,g)=>{const f=fe(p.body),y=An(f,i),k=f?f.rest:p.body,S=[...k.matchAll(Te)].map($=>$[1]),A=(S.length?k.replace(Te,""):k).trim(),N=p.rid!==void 0,m=N?p.resolved?" remark resolved":" remark open":"",E=`fv-reply${a===g?" sel":""}${t===g?" active":""}${m}`,C=y&&y.seekable&&s?()=>r?r(g,y.tMs):s(y.tMs):null,w=N&&l?`${l}#${p.rid}`:null;return n.jsxs("div",{className:E,children:[n.jsxs("div",{className:"fv-reply-meta",children:[n.jsx("span",{className:"fv-reply-by",children:p.by}),p.at&&n.jsx("span",{className:"fv-reply-at",children:p.at}),y&&(C?n.jsx("button",{type:"button",className:"fv-anchor",onClick:C,"data-tip":"seek the clip to this moment",children:y.label}):n.jsxs("span",{className:`fv-anchor static${y.degraded?" degraded":""}`,"data-tip":y.degraded?o("thread.anchorDegraded"):void 0,children:[y.label,y.degraded?" ⚠":""]})),N&&(p.resolved?n.jsxs("span",{className:"fv-remark-state resolved","data-tip":p.resolvedBy?o("thread.resolvedBy",{by:p.resolvedBy}):o("thread.resolved"),children:["✓ ",o("thread.resolved")]}):n.jsxs("span",{className:"fv-remark-state open","data-tip":o("thread.openRemark"),children:["● ",o("thread.openRemark")]})),w&&c&&!p.resolved&&(p.by==="human"?n.jsx("button",{type:"button",className:"fv-remark-act retract",disabled:!!u,"data-tip":o("thread.retractTitle"),onClick:()=>j("retract",w),children:o("thread.retract")}):n.jsx("button",{type:"button",className:"fv-remark-act resolve",disabled:!!u,"data-tip":o("thread.resolveTitle"),onClick:()=>j("resolve",w),children:o("thread.resolve")}))]}),v&&v.ref===w&&n.jsx("div",{className:"fv-error",children:v.msg}),A&&n.jsx("div",{className:"fvd-body",children:n.jsx(se,{body:A})}),S.length>0&&n.jsx("div",{className:"fv-reply-media",children:S.map(($,I)=>n.jsx(ze,{hash:$,alt:"evidence"},`${$}-${I}`))})]},g)})}function In(e,s,a){const t=e.lastIndexOf(`
|
|
7
7
|
`,s-1)+1,r=/^\/(\S*)$/.exec(e.slice(t,s));if(!r)return null;const i=es(a,r[1]);return i.length?{items:i,index:0,start:t,end:s,query:r[1]}:null}function rt({onSend:e,specs:s=[],sessions:a=[],focusId:t=null,onDone:r,anchorNow:i=null,draft:l=null,actionsEnd:c=null,commands:o=null}){const u=D(),[h,v]=x.useState(""),[d,j]=x.useState(!1),[p,g]=x.useState(""),f=x.useRef(null),{launchers:y}=yn(),k=xn({inputRef:f,value:h,setValue:v,specs:s,sessions:a,launchers:y,focusId:t,up:!0}),[S,A]=x.useState(null),N=b=>A(b&&(o!=null&&o.length)?In(b.value,b.selectionStart,o):null),m=b=>{var H;if(!b||!S)return;const L=h.slice(0,S.start)+h.slice(S.end);if(A(null),b.run){v(L.trim()?L:""),b.run();return}const B=fe(L);let M="";if(B){const F=((H=Ce.exec(B.rest))==null?void 0:H[0])??"";M=`${B.label}
|
|
8
8
|
${F}`,M.endsWith(`
|
|
@@ -10,4 +10,4 @@ ${F}`,M.endsWith(`
|
|
|
10
10
|
`)}v(M+b.prefill()),requestAnimationFrame(()=>{const F=f.current;F&&(F.focus(),F.setSelectionRange(F.value.length,F.value.length))})},E=b=>S?b.key==="ArrowDown"?(b.preventDefault(),b.stopPropagation(),A(L=>({...L,index:(L.index+1)%L.items.length})),!0):b.key==="ArrowUp"?(b.preventDefault(),b.stopPropagation(),A(L=>({...L,index:(L.index-1+L.items.length)%L.items.length})),!0):b.key==="Enter"||b.key==="Tab"?(b.preventDefault(),b.stopPropagation(),m(S.items[S.index]),!0):b.key==="Escape"?(b.preventDefault(),b.stopPropagation(),A(null),!0):!1:!1,C=Re(h);x.useEffect(()=>{var b;if(!l){v("");return}v(l.body||""),(b=f.current)==null||b.focus()},[l==null?void 0:l.seq]);const w=async()=>{var B;const b=await(i==null?void 0:i());if(!b)return;const L=ss(b.tMs,b.step)+(b.frame?`
|
|
11
11
|
`:"");v(M=>{const H=fe(M),F=(H?H.rest:M).replace(Ce,"");return F?`${L}
|
|
12
12
|
${F}`:`${L}
|
|
13
|
-
`}),(B=f.current)==null||B.focus()},$=b=>gn(f.current,b,v,L=>{k.sync(L),N(L)}),I=async()=>{const b=h.trim();if(!(!b||d)){j(!0);try{const L=await e(b,Re(b));L!=null&&L.ok?(v(""),g(""),await(r==null?void 0:r(L.outcomes||""))):g((L==null?void 0:L.error)||"reply failed")}finally{j(!1)}}},T=C.length>0?n.jsx("div",{className:"fv-frames",children:C.map(b=>n.jsx(ze,{hash:b,alt:"frame"},b))}):null,_=n.jsxs("div",{className:"fv-tawrap",children:[n.jsx(kn,{ref:f,className:"fv-textarea",rows:1,value:h,placeholder:u("session.issuesReplyPlaceholder"),disabled:d,onChange:b=>{v(b.target.value),k.sync(b.target),N(b.target)},onSelect:b=>{k.sync(b.target),N(b.target)},onBlur:()=>{k.close(),A(null)},onKeyDown:b=>{Nn(b)||E(b)||k.onKeyDown(b)||b.key==="Enter"&&(b.metaKey||b.ctrlKey)&&(b.preventDefault(),I())}}),k.menuEl,S&&n.jsx(pn,{menu:S,up:!0,head:S.query?`/${S.query}`:u("annotator.menuReview"),onPick:m,onHover:b=>A(L=>L&&{...L,index:b})})]}),V=n.jsxs("div",{className:"fv-actions",children:[n.jsx(ue,{label:u("thread.mentionActor"),disabled:d,onClick:()=>$("@"),children:"@"}),n.jsx(ue,{label:u("thread.mentionNode"),disabled:d,onClick:()=>$("[["),children:"[["}),(o==null?void 0:o.length)>0&&n.jsx(ue,{label:u("thread.reviewCommands"),disabled:d,onClick:()=>$("/"),children:"/"}),i&&n.jsxs("button",{type:"button",className:"fv-anchor-btn","data-tip":u("thread.anchorTitle"),onMouseDown:b=>b.preventDefault(),onClick:w,children:[n.jsx(R,{name:"clock",size:11})," ",u("thread.anchorNow")]}),p&&n.jsx("span",{className:"fv-error",children:p}),n.jsxs("div",{className:"fv-actions-end",children:[c,n.jsx(he,{icon:"send",size:14,className:"fv-send",label:u(d?"session.issuesSending":"session.issuesSend"),disabled:d||!h.trim(),onMouseDown:b=>b.preventDefault(),onClick:I})]})]});return n.jsx(Sn,{className:"fv-compose",preview:T,editor:_,footer:V})}export{
|
|
13
|
+
`}),(B=f.current)==null||B.focus()},$=b=>gn(f.current,b,v,L=>{k.sync(L),N(L)}),I=async()=>{const b=h.trim();if(!(!b||d)){j(!0);try{const L=await e(b,Re(b));L!=null&&L.ok?(v(""),g(""),await(r==null?void 0:r(L.outcomes||""))):g((L==null?void 0:L.error)||"reply failed")}finally{j(!1)}}},T=C.length>0?n.jsx("div",{className:"fv-frames",children:C.map(b=>n.jsx(ze,{hash:b,alt:"frame"},b))}):null,_=n.jsxs("div",{className:"fv-tawrap",children:[n.jsx(kn,{ref:f,className:"fv-textarea",rows:1,value:h,placeholder:u("session.issuesReplyPlaceholder"),disabled:d,onChange:b=>{v(b.target.value),k.sync(b.target),N(b.target)},onSelect:b=>{k.sync(b.target),N(b.target)},onBlur:()=>{k.close(),A(null)},onKeyDown:b=>{Nn(b)||E(b)||k.onKeyDown(b)||b.key==="Enter"&&(b.metaKey||b.ctrlKey)&&(b.preventDefault(),I())}}),k.menuEl,S&&n.jsx(pn,{menu:S,up:!0,head:S.query?`/${S.query}`:u("annotator.menuReview"),onPick:m,onHover:b=>A(L=>L&&{...L,index:b})})]}),V=n.jsxs("div",{className:"fv-actions",children:[n.jsx(ue,{label:u("thread.mentionActor"),disabled:d,onClick:()=>$("@"),children:"@"}),n.jsx(ue,{label:u("thread.mentionNode"),disabled:d,onClick:()=>$("[["),children:"[["}),(o==null?void 0:o.length)>0&&n.jsx(ue,{label:u("thread.reviewCommands"),disabled:d,onClick:()=>$("/"),children:"/"}),i&&n.jsxs("button",{type:"button",className:"fv-anchor-btn","data-tip":u("thread.anchorTitle"),onMouseDown:b=>b.preventDefault(),onClick:w,children:[n.jsx(R,{name:"clock",size:11})," ",u("thread.anchorNow")]}),p&&n.jsx("span",{className:"fv-error",children:p}),n.jsxs("div",{className:"fv-actions-end",children:[c,n.jsx(he,{icon:"send",size:14,className:"fv-send",label:u(d?"session.issuesSending":"session.issuesSend"),disabled:d||!h.trim(),onMouseDown:b=>b.preventDefault(),onClick:I})]})]});return n.jsx(Sn,{className:"fv-compose",preview:T,editor:_,footer:V})}export{Pe as $,xn as A,Nn as B,Sn as C,zn as D,le as E,On as F,gn as G,kn as H,_s as I,Qs as J,Fn as K,Bn as L,et as M,Gs as N,at as O,Xs as P,en as Q,_n as R,ks as S,ue as T,ln as U,tn as V,vs as W,ws as X,q as Y,nt as Z,qs as _,ve as a,Vn as a0,Ms as a1,Qn as a2,Ks as a3,Mn as a4,Ue as a5,Zn as a6,Xn as a7,Pn as a8,qn as a9,tt as aa,pn as ab,vn as ac,J as ad,mn as ae,Ae as af,st as ag,es as ah,ss as b,He as c,Hn as d,Oe as e,Es as f,rt as g,Gn as h,Be as i,Dn as j,Un as k,Kn as l,Ln as m,Fe as n,O as o,fe as p,Yn as q,An as r,hs as s,Os as t,Me as u,Ge as v,Jn as w,se as x,Wn as y,yn as z};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as a0,u as Gn,a as Vn,j as X,
|
|
1
|
+
import{r as a0,u as Gn,a as Vn,j as X,m as Wn}from"./index-BUKLPN_4.js";import{a0 as Zn,Y as sr,H as Xn,B as Yn,s as Kn}from"./Thread-Dg35J-Pu.js";import{u as Jn,v as Qn,w as ea}from"./data-SNi0AmVT.js";const lr={};function ta(e){let t=lr[e];if(t)return t;t=lr[e]=[];for(let u=0;u<128;u++){const r=String.fromCharCode(u);t.push(r)}for(let u=0;u<e.length;u++){const r=e.charCodeAt(u);t[r]="%"+("0"+r.toString(16).toUpperCase()).slice(-2)}return t}function Ce(e,t){typeof t!="string"&&(t=Ce.defaultChars);const u=ta(t);return e.replace(/(%[a-f0-9]{2})+/gi,function(r){let n="";for(let a=0,i=r.length;a<i;a+=3){const s=parseInt(r.slice(a+1,a+3),16);if(s<128){n+=u[s];continue}if((s&224)===192&&a+3<i){const o=parseInt(r.slice(a+4,a+6),16);if((o&192)===128){const h=s<<6&1984|o&63;h<128?n+="��":n+=String.fromCharCode(h),a+=3;continue}}if((s&240)===224&&a+6<i){const o=parseInt(r.slice(a+4,a+6),16),h=parseInt(r.slice(a+7,a+9),16);if((o&192)===128&&(h&192)===128){const f=s<<12&61440|o<<6&4032|h&63;f<2048||f>=55296&&f<=57343?n+="���":n+=String.fromCharCode(f),a+=6;continue}}if((s&248)===240&&a+9<i){const o=parseInt(r.slice(a+4,a+6),16),h=parseInt(r.slice(a+7,a+9),16),f=parseInt(r.slice(a+10,a+12),16);if((o&192)===128&&(h&192)===128&&(f&192)===128){let p=s<<18&1835008|o<<12&258048|h<<6&4032|f&63;p<65536||p>1114111?n+="����":(p-=65536,n+=String.fromCharCode(55296+(p>>10),56320+(p&1023))),a+=9;continue}}n+="�"}return n})}Ce.defaultChars=";/?:@&=+$,#";Ce.componentChars="";const or={};function ua(e){let t=or[e];if(t)return t;t=or[e]=[];for(let u=0;u<128;u++){const r=String.fromCharCode(u);/^[0-9a-z]$/i.test(r)?t.push(r):t.push("%"+("0"+u.toString(16).toUpperCase()).slice(-2))}for(let u=0;u<e.length;u++)t[e.charCodeAt(u)]=e[u];return t}function Ge(e,t,u){typeof t!="string"&&(u=t,t=Ge.defaultChars),typeof u>"u"&&(u=!0);const r=ua(t);let n="";for(let a=0,i=e.length;a<i;a++){const s=e.charCodeAt(a);if(u&&s===37&&a+2<i&&/^[0-9a-f]{2}$/i.test(e.slice(a+1,a+3))){n+=e.slice(a,a+3),a+=2;continue}if(s<128){n+=r[s];continue}if(s>=55296&&s<=57343){if(s>=55296&&s<=56319&&a+1<i){const o=e.charCodeAt(a+1);if(o>=56320&&o<=57343){n+=encodeURIComponent(e[a]+e[a+1]),a++;continue}}n+="%EF%BF%BD";continue}n+=encodeURIComponent(e[a])}return n}Ge.defaultChars=";/?:@&=+$,-_.!~*'()#";Ge.componentChars="-_.!~*'()";function Fu(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function mt(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const ra=/^([a-z0-9.+-]+:)/i,na=/:[0-9]*$/,aa=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,ia=["<",">",'"',"`"," ","\r",`
|
|
2
2
|
`," "],sa=["{","}","|","\\","^","`"].concat(ia),la=["'"].concat(sa),cr=["%","/","?",";","#"].concat(la),hr=["/","?","#"],oa=255,dr=/^[+a-z0-9A-Z_-]{0,63}$/,ca=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,fr={javascript:!0,"javascript:":!0},mr={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Tu(e,t){if(e&&e instanceof mt)return e;const u=new mt;return u.parse(e,t),u}mt.prototype.parse=function(e,t){let u,r,n,a=e;if(a=a.trim(),!t&&e.split("#").length===1){const h=aa.exec(a);if(h)return this.pathname=h[1],h[2]&&(this.search=h[2]),this}let i=ra.exec(a);if(i&&(i=i[0],u=i.toLowerCase(),this.protocol=i,a=a.substr(i.length)),(t||i||a.match(/^\/\/[^@\/]+@[^@\/]+/))&&(n=a.substr(0,2)==="//",n&&!(i&&fr[i])&&(a=a.substr(2),this.slashes=!0)),!fr[i]&&(n||i&&!mr[i])){let h=-1;for(let y=0;y<hr.length;y++)r=a.indexOf(hr[y]),r!==-1&&(h===-1||r<h)&&(h=r);let f,p;h===-1?p=a.lastIndexOf("@"):p=a.lastIndexOf("@",h),p!==-1&&(f=a.slice(0,p),a=a.slice(p+1),this.auth=f),h=-1;for(let y=0;y<cr.length;y++)r=a.indexOf(cr[y]),r!==-1&&(h===-1||r<h)&&(h=r);h===-1&&(h=a.length),a[h-1]===":"&&h--;const x=a.slice(0,h);a=a.slice(h),this.parseHost(x),this.hostname=this.hostname||"";const b=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!b){const y=this.hostname.split(/\./);for(let k=0,A=y.length;k<A;k++){const S=y[k];if(S&&!S.match(dr)){let C="";for(let _=0,T=S.length;_<T;_++)S.charCodeAt(_)>127?C+="x":C+=S[_];if(!C.match(dr)){const _=y.slice(0,k),T=y.slice(k+1),B=S.match(ca);B&&(_.push(B[1]),T.unshift(B[2])),T.length&&(a=T.join(".")+a),this.hostname=_.join(".");break}}}}this.hostname.length>oa&&(this.hostname=""),b&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const s=a.indexOf("#");s!==-1&&(this.hash=a.substr(s),a=a.slice(0,s));const o=a.indexOf("?");return o!==-1&&(this.search=a.substr(o),a=a.slice(0,o)),a&&(this.pathname=a),mr[u]&&this.hostname&&!this.pathname&&(this.pathname=""),this};mt.prototype.parseHost=function(e){let t=na.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};const ha=Object.freeze(Object.defineProperty({__proto__:null,decode:Ce,encode:Ge,format:Fu,parse:Tu},Symbol.toStringTag,{value:"Module"})),x1=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,y1=/[\0-\x1F\x7F-\x9F]/,da=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,Mu=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,w1=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,k1=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,fa=Object.freeze(Object.defineProperty({__proto__:null,Any:x1,Cc:y1,Cf:da,P:Mu,S:w1,Z:k1},Symbol.toStringTag,{value:"Module"})),ma=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),pa=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var Ot;const ba=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),va=(Ot=String.fromCodePoint)!==null&&Ot!==void 0?Ot:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function ga(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=ba.get(e))!==null&&t!==void 0?t:e}var v0;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(v0||(v0={}));const xa=32;var le;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(le||(le={}));function ou(e){return e>=v0.ZERO&&e<=v0.NINE}function ya(e){return e>=v0.UPPER_A&&e<=v0.UPPER_F||e>=v0.LOWER_A&&e<=v0.LOWER_F}function wa(e){return e>=v0.UPPER_A&&e<=v0.UPPER_Z||e>=v0.LOWER_A&&e<=v0.LOWER_Z||ou(e)}function ka(e){return e===v0.EQUALS||wa(e)}var b0;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(b0||(b0={}));var Y0;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Y0||(Y0={}));class Aa{constructor(t,u,r){this.decodeTree=t,this.emitCodePoint=u,this.errors=r,this.state=b0.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Y0.Strict}startEntity(t){this.decodeMode=t,this.state=b0.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,u){switch(this.state){case b0.EntityStart:return t.charCodeAt(u)===v0.NUM?(this.state=b0.NumericStart,this.consumed+=1,this.stateNumericStart(t,u+1)):(this.state=b0.NamedEntity,this.stateNamedEntity(t,u));case b0.NumericStart:return this.stateNumericStart(t,u);case b0.NumericDecimal:return this.stateNumericDecimal(t,u);case b0.NumericHex:return this.stateNumericHex(t,u);case b0.NamedEntity:return this.stateNamedEntity(t,u)}}stateNumericStart(t,u){return u>=t.length?-1:(t.charCodeAt(u)|xa)===v0.LOWER_X?(this.state=b0.NumericHex,this.consumed+=1,this.stateNumericHex(t,u+1)):(this.state=b0.NumericDecimal,this.stateNumericDecimal(t,u))}addToNumericResult(t,u,r,n){if(u!==r){const a=r-u;this.result=this.result*Math.pow(n,a)+parseInt(t.substr(u,a),n),this.consumed+=a}}stateNumericHex(t,u){const r=u;for(;u<t.length;){const n=t.charCodeAt(u);if(ou(n)||ya(n))u+=1;else return this.addToNumericResult(t,r,u,16),this.emitNumericEntity(n,3)}return this.addToNumericResult(t,r,u,16),-1}stateNumericDecimal(t,u){const r=u;for(;u<t.length;){const n=t.charCodeAt(u);if(ou(n))u+=1;else return this.addToNumericResult(t,r,u,10),this.emitNumericEntity(n,2)}return this.addToNumericResult(t,r,u,10),-1}emitNumericEntity(t,u){var r;if(this.consumed<=u)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===v0.SEMI)this.consumed+=1;else if(this.decodeMode===Y0.Strict)return 0;return this.emitCodePoint(ga(this.result),this.consumed),this.errors&&(t!==v0.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,u){const{decodeTree:r}=this;let n=r[this.treeIndex],a=(n&le.VALUE_LENGTH)>>14;for(;u<t.length;u++,this.excess++){const i=t.charCodeAt(u);if(this.treeIndex=Da(r,n,this.treeIndex+Math.max(1,a),i),this.treeIndex<0)return this.result===0||this.decodeMode===Y0.Attribute&&(a===0||ka(i))?0:this.emitNotTerminatedNamedEntity();if(n=r[this.treeIndex],a=(n&le.VALUE_LENGTH)>>14,a!==0){if(i===v0.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==Y0.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:u,decodeTree:r}=this,n=(r[u]&le.VALUE_LENGTH)>>14;return this.emitNamedEntityData(u,n,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,u,r){const{decodeTree:n}=this;return this.emitCodePoint(u===1?n[t]&~le.VALUE_LENGTH:n[t+1],r),u===3&&this.emitCodePoint(n[t+2],r),r}end(){var t;switch(this.state){case b0.NamedEntity:return this.result!==0&&(this.decodeMode!==Y0.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case b0.NumericDecimal:return this.emitNumericEntity(0,2);case b0.NumericHex:return this.emitNumericEntity(0,3);case b0.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case b0.EntityStart:return 0}}}function A1(e){let t="";const u=new Aa(e,r=>t+=va(r));return function(n,a){let i=0,s=0;for(;(s=n.indexOf("&",s))>=0;){t+=n.slice(i,s),u.startEntity(a);const h=u.write(n,s+1);if(h<0){i=s+u.end();break}i=s+h,s=h===0?i+1:i}const o=t+n.slice(i);return t="",o}}function Da(e,t,u,r){const n=(t&le.BRANCH_LENGTH)>>7,a=t&le.JUMP_TABLE;if(n===0)return a!==0&&r===a?u:-1;if(a){const o=r-a;return o<0||o>=n?-1:e[u+o]-1}let i=u,s=i+n-1;for(;i<=s;){const o=i+s>>>1,h=e[o];if(h<r)i=o+1;else if(h>r)s=o-1;else return e[o+n]}return-1}const D1=A1(ma);A1(pa);function Ca(e,t=Y0.Legacy){return D1(e,t)}function Sa(e){return D1(e,Y0.Strict)}function Ea(e){return Object.prototype.toString.call(e)}function Bu(e){return Ea(e)==="[object String]"}const _a=Object.prototype.hasOwnProperty;function za(e,t){return _a.call(e,t)}function yt(e){return Array.prototype.slice.call(arguments,1).forEach(function(u){if(u){if(typeof u!="object")throw new TypeError(u+"must be object");Object.keys(u).forEach(function(r){e[r]=u[r]})}}),e}function C1(e,t,u){return[].concat(e.slice(0,t),u,e.slice(t+1))}function qu(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function Ie(e){if(e>65535){e-=65536;const t=55296+(e>>10),u=56320+(e&1023);return String.fromCharCode(t,u)}return String.fromCharCode(e)}const S1=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,Fa=/&([a-z#][a-z0-9]{1,31});/gi,Ta=new RegExp(S1.source+"|"+Fa.source,"gi"),Ma=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function Ba(e,t){if(t.charCodeAt(0)===35&&Ma.test(t)){const r=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return qu(r)?Ie(r):e}const u=Ca(e);return u!==e?u:e}function qa(e){return e.indexOf("\\")<0?e:e.replace(S1,"$1")}function Se(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(Ta,function(t,u,r){return u||Ba(t,r)})}const Ra=/[&<>"]/,Ia=/[&<>"]/g,Na={"&":"&","<":"<",">":">",'"':"""};function Oa(e){return Na[e]}function ce(e){return Ra.test(e)?e.replace(Ia,Oa):e}const La=/[.?*+^$[\]\\(){}|-]/g;function Pa(e){return e.replace(La,"\\$&")}function J(e){switch(e){case 9:case 32:return!0}return!1}function Ne(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function E1(e){return Mu.test(e)||w1.test(e)}function Oe(e){return E1(Ie(e))}function Le(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function wt(e){return e=e.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}function pr(e){return e===32||e===9||e===10||e===13}function kt(e){let t=0;for(;t<e.length&&pr(e.charCodeAt(t));t++);let u=e.length-1;for(;u>=t&&pr(e.charCodeAt(u));u--);return e.slice(t,u+1)}const Ha={mdurl:ha,ucmicro:fa},$a=Object.freeze(Object.defineProperty({__proto__:null,arrayReplaceAt:C1,asciiTrim:kt,assign:yt,escapeHtml:ce,escapeRE:Pa,fromCodePoint:Ie,has:za,isMdAsciiPunct:Le,isPunctChar:E1,isPunctCharCode:Oe,isSpace:J,isString:Bu,isValidEntityCode:qu,isWhiteSpace:Ne,lib:Ha,normalizeReference:wt,unescapeAll:Se,unescapeMd:qa},Symbol.toStringTag,{value:"Module"}));function ja(e,t,u){let r,n,a,i;const s=e.posMax,o=e.pos;for(e.pos=t+1,r=1;e.pos<s;){if(a=e.src.charCodeAt(e.pos),a===93&&(r--,r===0)){n=!0;break}if(i=e.pos,e.md.inline.skipToken(e),a===91){if(i===e.pos-1)r++;else if(u)return e.pos=o,-1}}let h=-1;return n&&(h=e.pos),e.pos=o,h}function Ua(e,t,u){let r,n=t;const a={ok:!1,pos:0,str:""};if(e.charCodeAt(n)===60){for(n++;n<u;){if(r=e.charCodeAt(n),r===10||r===60)return a;if(r===62)return a.pos=n+1,a.str=Se(e.slice(t+1,n)),a.ok=!0,a;if(r===92&&n+1<u){n+=2;continue}n++}return a}let i=0;for(;n<u&&(r=e.charCodeAt(n),!(r===32||r<32||r===127));){if(r===92&&n+1<u){if(e.charCodeAt(n+1)===32)break;n+=2;continue}if(r===40&&(i++,i>32))return a;if(r===41){if(i===0)break;i--}n++}return t===n||i!==0||(a.str=Se(e.slice(t,n)),a.pos=n,a.ok=!0),a}function Ga(e,t,u,r){let n,a=t;const i={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(r)i.str=r.str,i.marker=r.marker;else{if(a>=u)return i;let s=e.charCodeAt(a);if(s!==34&&s!==39&&s!==40)return i;t++,a++,s===40&&(s=41),i.marker=s}for(;a<u;){if(n=e.charCodeAt(a),n===i.marker)return i.pos=a+1,i.str+=Se(e.slice(t,a)),i.ok=!0,i;if(n===40&&i.marker===41)return i;n===92&&a+1<u&&a++,a++}return i.can_continue=!0,i.str+=Se(e.slice(t,a)),i}const Va=Object.freeze(Object.defineProperty({__proto__:null,parseLinkDestination:Ua,parseLinkLabel:ja,parseLinkTitle:Ga},Symbol.toStringTag,{value:"Module"})),j0={};j0.code_inline=function(e,t,u,r,n){const a=e[t];return"<code"+n.renderAttrs(a)+">"+ce(a.content)+"</code>"};j0.code_block=function(e,t,u,r,n){const a=e[t];return"<pre"+n.renderAttrs(a)+"><code>"+ce(e[t].content)+`</code></pre>
|
|
3
3
|
`};j0.fence=function(e,t,u,r,n){const a=e[t],i=a.info?Se(a.info).trim():"";let s="",o="";if(i){const f=i.split(/(\s+)/g);s=f[0],o=f.slice(2).join("")}let h;if(u.highlight?h=u.highlight(a.content,s,o)||ce(a.content):h=ce(a.content),h.indexOf("<pre")===0)return h+`
|
|
4
4
|
`;if(i){const f=a.attrIndex("class"),p=a.attrs?a.attrs.slice():[];f<0?p.push(["class",u.langPrefix+s]):(p[f]=p[f].slice(),p[f][1]+=" "+u.langPrefix+s);const x={attrs:p};return`<pre><code${n.renderAttrs(x)}>${h}</code></pre>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as O}from"./index-
|
|
1
|
+
import{d as O}from"./index-BUKLPN_4.js";const R=1e4,v=2.5*R;function N(e,{deadMs:t=v,setTimeoutImpl:s=setTimeout,clearTimeoutImpl:n=clearTimeout}={}){let r=0;const o=()=>{r&&(n(r),r=0)};return{arm:()=>{o(),r=s(()=>{r=0,e()},t)},disarm:o}}const $=280,E=54;function J(e,t){const s={};e.forEach(o=>{var a;o.parent&&(s[a=o.parent]??(s[a]=[])).push(o.id)});const n={},r=(o,a,l)=>{n[o]={x:a*$,y:l};const i=t.has(o)?s[o]||[]:[];if(!i.length)return;const h=l-(i.length-1)/2*E;i.forEach((j,f)=>r(j,a+1,h+f*E))};return e.filter(o=>!o.parent).forEach((o,a)=>r(o.id,0,a*E)),n}const I=[150,350,600,900];async function p(e,t){const s=typeof e=="string"?O(e):e;for(let n=0;;n++)try{return await fetch(s,t)}catch(r){if(n>=I.length)throw r;await new Promise(o=>setTimeout(o,I[n]))}}let T="";const P=()=>{T=""};async function C(){const e=await p("/api/graph",{cache:"no-store",headers:T?{"If-None-Match":T}:{}});if(e.status===304)return null;if(e.status===401||e.status===403){const n=await e.json().catch(()=>null);return{authRequired:(n==null?void 0:n.reason)||"project-login"}}const t=e.headers.get("etag")||"";return{board:await e.json(),seal:()=>{T=t}}}const S=(e,...t)=>O(`/api/specs/${encodeURIComponent(e)}${t.map(s=>"/"+s).join("")}`);function x({onBoard:e,onLegacyChange:t,onStatus:s}){let n=null,r=!1,o=null,a="";const l=u=>{const{nodes:c=[],sessions:m=[],...w}=u,g=new Map([["meta",w],["nodes#order",c.map(d=>d.id)],["sess#order",m.map(d=>d.id)]]);return c.forEach(d=>g.set("node:"+d.id,d)),m.forEach(d=>g.set("sess:"+d.id,d)),g},i=u=>{const c=(m,w)=>(u.get(w)||[]).map(g=>u.get(m+g));return{...u.get("meta")||{},nodes:c("node:","nodes#order"),sessions:c("sess:","sess#order")}},h=()=>{try{n==null||n.close()}catch{}o=null,a="",y()},j=N(()=>{!n||r||(s==null||s(!1),h(),j.arm(),t==null||t())}),f=()=>j.arm(),y=()=>{if(!r){try{n=new EventSource(O("/api/graph/stream?mode=delta"))}catch{n=null;return}n.addEventListener("graph-full",u=>{f();const{to:c,graph:m}=JSON.parse(u.data);o=l(m),a=c,P(),e(m,{authoritative:!0,tag:c}),s==null||s(!0)}),n.addEventListener("graph-delta",u=>{f();const c=JSON.parse(u.data);if(!o||a!==c.from){h();return}for(const m of c.del||[])o.delete(m);for(const[m,w]of Object.entries(c.set||{}))o.set(m,w);a=c.to,P(),e(i(o),{authoritative:!1,tag:c.to}),s==null||s(!0)}),n.addEventListener("graph-changed",()=>{f(),t==null||t()}),n.addEventListener("error",()=>s==null?void 0:s(!1)),n.addEventListener("ping",f),n.addEventListener("ready",f)}};return y(),s==null||s(!1),f(),()=>{r=!0,j.disarm();try{n==null||n.close()}catch{}}}function A(e,t,s=!1){if(!(e!=null&&e.sessions))return e;const n=new Set(e.sessions.map(a=>a.id));if(s)for(const a of t.keys())n.has(a)||t.delete(a);let r=!1;const o=e.sessions.map(a=>{var f,y;const l=a.evalSummary;if(!l||!Number.isInteger(l.generation)||!l.epoch)return a;const i=t.get(a.id),h=i&&i.epoch!==l.epoch;if(!i||(h?s:l.generation>=i.generation)){const u=((f=i==null?void 0:i.projection)==null?void 0:f.phase)==="ready"&&i.projection.value?{generation:i.projection.generation,revision:i.projection.revision,value:i.projection.value}:(y=i==null?void 0:i.projection)==null?void 0:y.lastKnown,c=h&&!l.value&&!l.lastKnown&&u?{...l,lastKnown:u}:l;return t.set(a.id,{epoch:c.epoch,generation:c.generation,projection:c}),c!==l?(r=!0,{...a,evalSummary:c}):a}return r=!0,{...a,evalSummary:i.projection}});return r?{...e,sessions:o}:e}const F=e=>{var t,s;return{title:((t=e==null?void 0:e.identity)==null?void 0:t.title)||(e==null?void 0:e.project)||"",icon:((s=e==null?void 0:e.identity)==null?void 0:s.icon)||(e==null?void 0:e.projectIcon)||"spexcode"}},k=(e,...t)=>O(`/api/sessions/${encodeURIComponent(e)}${t.map(s=>"/"+s).join("")}`);async function _(e){const t=await p(k(e,"timeline"),{cache:"no-store"});return t.ok?t.json():null}async function B(e){const t=await p(k(e));return t.ok?t.json():null}async function D(e,t,{replyVia:s}={}){const n=await p(k(e,"input"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({kind:"text",text:t,...s?{replyVia:s}:{}})}),r=await n.json().catch(()=>({}));return{ok:n.ok&&(r==null?void 0:r.ok)!==!1,error:r==null?void 0:r.error}}async function G(){return(await p("/api/plugins")).json()}async function K(){return(await p("/api/plugins?surface=review")).json()}async function M(){return(await p("/api/settings")).json()}async function q(e){const t=await p(`/api/issues/${encodeURIComponent(e)}`);if(t.status===404)return!1;if(!t.ok)throw new Error(`HTTP ${t.status}`);return t.json()}async function X(e,t,s){return(await p(`/api/issues/${encodeURIComponent(e)}/reply`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({body:t,...s!=null&&s.length?{evidence:s}:{}})})).json()}async function Y(e){return(await p(`/api/issues/${encodeURIComponent(e)}/close`,{method:"POST"})).json()}async function z(e){return(await p(`/api/issues/${encodeURIComponent(e)}/promote`,{method:"POST"})).json()}async function H(e,t){return(await p(`/api/remarks/${e}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ref:t})})).json()}async function Q({concern:e,body:t,evidence:s,store:n}){return(await p("/api/issues",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({concern:e,body:t,store:n,...s!=null&&s.length?{evidence:s}:{}})})).json()}async function V({node:e,scenario:t,issue:s,body:n,codeSha:r,evidence:o}){return(await p("/api/remarks",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({node:e,scenario:t,issue:s,body:n,...r?{codeSha:r}:{},...o!=null&&o.length?{evidence:o}:{}})})).json()}async function W(e,t){return(await p(`/api/specs/${encodeURIComponent(e)}/evals/ok`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({scenario:t})})).json()}async function Z(e){return(await p("/api/evidence",{method:"POST",headers:{"Content-Type":"image/png"},body:e})).json()}export{$ as X,E as Y,A as a,K as b,Z as c,V as d,W as e,z as f,Y as g,X as h,q as i,Q as j,J as k,C as l,p as m,S as n,M as o,F as p,G as q,H as r,x as s,N as t,_ as u,B as v,D as w};
|