@acemarke/diffloupe 0.2.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,12 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{n as t,r as n,t as r}from"./react-jlQz0HNM.js";import{a as i,i as a,n as o,o as s,r as c,s as l,t as u}from"./diffs-D52k9AsX.js";import{a as d,c as f,i as p,l as m,n as h,o as g,r as _,s as v,t as y,u as b}from"./router-DvNvfdSS.js";import{a as ee,c as te,i as ne,l as x,n as re,o as S,r as ie,s as ae,t as oe,u as se}from"./state-a-GRkbSP.js";import{t as C}from"./arktype-bg7F_Ihs.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var w=e(n(),1),T=r(),E=te.withTypes(),D=x.withTypes(),ce=se.withTypes(),le=`diffloupe:view`,ue={diffStyle:`split`,wrap:!1,theme:`system`,fileTreeLayout:`tree`,sidebar:!0,collapsedFiles:{},collapsedGroups:{}};function de(){try{let e=JSON.parse(localStorage.getItem(`diffloupe:view`)??`{}`);if(!e||typeof e!=`object`)return{};let t=e,n={};return(t.diffStyle===`split`||t.diffStyle===`unified`)&&(n.diffStyle=t.diffStyle),typeof t.wrap==`boolean`&&(n.wrap=t.wrap),(t.theme===`system`||t.theme===`light`||t.theme===`dark`)&&(n.theme=t.theme),(t.fileTreeLayout===`tree`||t.fileTreeLayout===`list`)&&(n.fileTreeLayout=t.fileTreeLayout),typeof t.sidebar==`boolean`&&(n.sidebar=t.sidebar),n}catch{return{}}}function fe(e,t){let n=e??[];return n.includes(t)?n.filter(e=>e!==t):[...n,t]}var O=ee({name:`view`,initialState:()=>({...ue,...de()}),reducers:{diffStyleSet(e,t){e.diffStyle=t.payload},wrapToggled(e){e.wrap=!e.wrap},themeSet(e,t){e.theme=t.payload},fileTreeLayoutSet(e,t){e.fileTreeLayout=t.payload},sidebarToggled(e){e.sidebar=!e.sidebar},filesCollapsedSet(e,t){e.collapsedFiles[t.payload.runId]=t.payload.paths},fileCollapseToggled(e,t){let{runId:n,path:r}=t.payload;e.collapsedFiles[n]=fe(e.collapsedFiles[n],r)},fileExpanded(e,t){let{runId:n,path:r}=t.payload,i=e.collapsedFiles[n];i?.includes(r)&&(e.collapsedFiles[n]=i.filter(e=>e!==r))},groupFoldToggled(e,t){let{runId:n,groupId:r}=t.payload;e.collapsedGroups[n]=fe(e.collapsedGroups[n],r)}},selectors:{selectSavedView:e=>({diffStyle:e.diffStyle,wrap:e.wrap,theme:e.theme,fileTreeLayout:e.fileTreeLayout,sidebar:e.sidebar}),selectDiffStyle:e=>e.diffStyle,selectWrap:e=>e.wrap,selectTheme:e=>e.theme,selectFileTreeLayout:e=>e.fileTreeLayout,selectSidebar:e=>e.sidebar,selectCollapsedFiles:(e,t)=>e.collapsedFiles[t],selectCollapsedGroups:(e,t)=>e.collapsedGroups[t]}}),{diffStyleSet:pe,wrapToggled:me,themeSet:he,fileTreeLayoutSet:ge,sidebarToggled:_e,filesCollapsedSet:ve,fileCollapseToggled:ye,fileExpanded:be,groupFoldToggled:xe}=O.actions,{selectSavedView:Se,selectDiffStyle:Ce,selectWrap:we,selectTheme:Te,selectFileTreeLayout:Ee,selectSidebar:De,selectCollapsedFiles:Oe,selectCollapsedGroups:ke}=O.selectors,Ae={message:`_message_1k4pr_1`,error:`_error_1k4pr_15`,actions:`_actions_1k4pr_26`,button:`_button_1k4pr_32`},k=t(),je=()=>null;function Me(){let e=D(Te);(0,w.useEffect)(()=>{let t=document.documentElement;e===`system`?delete t.dataset.theme:t.dataset.theme=e},[e])}function Ne(){return Me(),(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(_,{}),(0,k.jsx)(w.Suspense,{children:(0,k.jsx)(je,{position:`bottom-right`})})]})}function Pe(){return(0,k.jsxs)(`main`,{className:Ae.message,children:[(0,k.jsx)(`h1`,{children:`Not found`}),(0,k.jsx)(`p`,{children:`There is nothing at this address.`}),(0,k.jsx)(v,{to:`/`,children:`Back to runs`})]})}function Fe({error:e}){let t=m();return(0,k.jsxs)(`main`,{className:Ae.message,children:[(0,k.jsx)(`h1`,{children:`Something went wrong`}),(0,k.jsx)(`pre`,{className:Ae.error,children:Ie(e)}),(0,k.jsxs)(`div`,{className:Ae.actions,children:[(0,k.jsx)(`button`,{type:`button`,className:Ae.button,onClick:()=>void t.invalidate(),children:`Retry`}),(0,k.jsx)(v,{to:`/`,children:`Back to runs`})]})]})}function Ie(e){if(e instanceof Error)return e.message;if(e&&typeof e==`object`){let t=e;if(t.data&&typeof t.data==`object`&&`error`in t.data)return String(t.data.error);if(typeof t.error==`string`)return t.error;if(t.status!==void 0)return`Request failed (${String(t.status)})`}return String(e)}var Le=p()({component:Ne,notFoundComponent:Pe,errorComponent:Fe});function Re(e){let t=new Map;for(let n of s(e))for(let e of n.files)t.set(e.name,e);return t}var ze=new Map;function Be(e,t){let n=ze.get(e);if(n&&n.patch===t)return n.files;let r=Re(t);return ze.set(e,{patch:t,files:r}),r}var A={dialog:`_dialog_14w5c_1`,header:`_header_14w5c_16`,title:`_title_14w5c_20`,hint:`_hint_14w5c_26`,text:`_text_14w5c_31`,keys:`_keys_14w5c_43`,key:`_key_14w5c_43`,actions:`_actions_14w5c_70`,button:`_button_14w5c_76`};function Ve({text:e,onClose:t}){let n=(0,w.useRef)(null),r=(0,w.useRef)(null);return(0,w.useEffect)(()=>{n.current?.showModal(),r.current?.select()},[]),(0,k.jsxs)(`dialog`,{ref:n,className:A.dialog,"aria-labelledby":`copy-fallback-title`,onClose:t,children:[(0,k.jsx)(`header`,{className:A.header,children:(0,k.jsx)(`h2`,{id:`copy-fallback-title`,className:A.title,children:`Copy this text`})}),(0,k.jsx)(`p`,{className:A.hint,children:`The browser blocked clipboard access. The text is selected; press Ctrl+C or ⌘C.`}),(0,k.jsx)(`textarea`,{ref:r,className:A.text,readOnly:!0,value:e,rows:16}),(0,k.jsx)(`div`,{className:A.actions,children:(0,k.jsx)(`button`,{type:`button`,className:A.button,onClick:()=>n.current?.close(),children:`Close`})})]})}var He=(0,w.forwardRef)(({title:e,titleId:t,...n},r)=>(0,k.jsxs)(`svg`,{viewBox:`0 0 256 256`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,k.jsx)(`title`,{id:t,children:e}):null,(0,k.jsx)(`path`,{fill:`currentColor`,d:`m213.66 101.66l-80 80a8 8 0 0 1-11.32 0l-80-80a8 8 0 0 1 11.32-11.32L128 164.69l74.34-74.35a8 8 0 0 1 11.32 11.32`})]})),Ue=(0,w.forwardRef)(({title:e,titleId:t,...n},r)=>(0,k.jsxs)(`svg`,{viewBox:`0 0 256 256`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,k.jsx)(`title`,{id:t,children:e}):null,(0,k.jsx)(`path`,{fill:`currentColor`,d:`m181.66 133.66l-80 80a8 8 0 0 1-11.32-11.32L164.69 128L90.34 53.66a8 8 0 0 1 11.32-11.32l80 80a8 8 0 0 1 0 11.32`})]})),j={blocker:`Blocker`,"should-fix":`Should fix`,"nice-to-have":`Nice to have`,question:`Question`};function We(e){switch(e.kind){case`pr`:return`#${e.number} ${e.title}`;case`staged`:return e.branch?`Staged changes on ${e.branch}`:`Staged changes`;case`worktree`:return e.branch?`Working tree on ${e.branch}`:`Working tree`;default:return`${e.kind[0].toUpperCase()}${e.kind.slice(1)} ${e.spec}`}}function Ge(e){return e===0?`$0`:e<.01?`<$0.01`:`$${e.toFixed(2)}`}function Ke(e){let t=Math.round(e/1e3);return t<60?`${t}s`:`${Math.floor(t/60)}m ${String(t%60).padStart(2,`0`)}s`}var qe=new Intl.DateTimeFormat(void 0,{dateStyle:`medium`,timeStyle:`short`});function Je(e){let t=new Date(e);return Number.isNaN(t.getTime())?e:qe.format(t)}function Ye(e,t=Date.now()){let n=(t-new Date(e).getTime())/1e3;return Number.isFinite(n)?n<60?`just now`:n<3600?`${Math.floor(n/60)}m ago`:n<86400?`${Math.floor(n/3600)}h ago`:n<604800?`${Math.floor(n/86400)}d ago`:Je(e):e}function M(e,t,n=`${t}s`){return`${e} ${e===1?t:n}`}function Xe(e){return/^[0-9a-f]{40}$/i.test(e)?e.slice(0,12):e}function Ze(e,t,n){return e.filter(e=>e.bottom>t&&e.top<n).map(e=>e.id)}function Qe(e,t,n){if(e.length===0||t<=n)return null;let r=e[0];for(let t of e){if(t.top>n)break;r=t}return r.path}var $e={groups:[],files:{}},et=`[data-app-header]`,tt=`[data-group-section]`,nt=`[data-file-start]`;function rt(){let e=document.querySelector(et);return e?Math.max(0,e.getBoundingClientRect().bottom):0}function it(){let e=rt(),t=window.innerHeight,n=[...document.querySelectorAll(tt)].map(e=>{let t=e.getBoundingClientRect();return{id:e.dataset.groupSection??``,top:t.top,bottom:t.bottom,el:e}}),r=Ze(n,e,t),i={};for(let t of n){if(!r.includes(t.id))continue;let n=Qe([...t.el.querySelectorAll(nt)].map(e=>({path:e.dataset.path??``,top:e.getBoundingClientRect().top})),t.bottom,e);n!==null&&(i[t.id]=n)}return{groups:r,files:i}}var at=(e,t)=>e.groups.length===t.groups.length&&e.groups.every((e,n)=>e===t.groups[n])&&Object.keys(e.files).length===Object.keys(t.files).length&&Object.entries(e.files).every(([e,n])=>t.files[e]===n);function ot(e,t){let[n,r]=(0,w.useState)($e);return(0,w.useEffect)(()=>{if(!e)return;let t=0,n=()=>{t=0;let e=it();r(t=>at(t,e)?t:e)},i=()=>{t===0&&(t=requestAnimationFrame(n))};i(),document.addEventListener(`scroll`,i,{capture:!0,passive:!0}),window.addEventListener(`resize`,i);let a=new ResizeObserver(i);return a.observe(document.body),()=>{document.removeEventListener(`scroll`,i,{capture:!0}),window.removeEventListener(`resize`,i),a.disconnect(),t!==0&&cancelAnimationFrame(t)}},[e,t]),n}var st=e=>`group-${e}`;function ct(e){document.getElementById(st(e))?.scrollIntoView({behavior:`smooth`,block:`start`})}function lt(e,t,n=8){let r=e.getBoundingClientRect(),i=t.getBoundingClientRect();i.top<r.top+n?e.scrollTop-=r.top+n-i.top:i.bottom>r.bottom-n&&(e.scrollTop+=i.bottom-(r.bottom-n))}function ut(e,t){return document.getElementById(st(e))?.querySelector(`[data-file-start][data-path="${CSS.escape(t)}"]`)??null}function dt(e,t,n={}){let r=0,i=()=>{let a=ut(e,t);if(!a)return;let o=a.getBoundingClientRect().top-rt();Math.abs(o)>2&&window.scrollBy({top:o,behavior:`instant`}),++r<6&&(r<2||Math.abs(o)>2)?requestAnimationFrame(i):n.focus&&a.focus({preventScroll:!0})};requestAnimationFrame(i)}var ft=120;function pt(e,t,n){let r=0,i=0,a=!1,o=()=>{if(++r>90)return;let s=document.getElementById(n);if(s&&s.getClientRects().length>0){let e=s.getBoundingClientRect().top-rt()-ft;Math.abs(e)>2?(window.scrollBy({top:e,behavior:`instant`}),i=0):i++,i<2?requestAnimationFrame(o):s.focus({preventScroll:!0});return}let c=ut(e,t);if(c){if(!a)a=!0,window.scrollBy({top:c.getBoundingClientRect().top-rt(),behavior:`instant`});else if(r%3==0){if((c.nextElementSibling?.getBoundingClientRect().bottom??0)<=window.innerHeight)return;window.scrollBy({top:window.innerHeight*.8,behavior:`instant`})}requestAnimationFrame(o)}};requestAnimationFrame(o)}function mt(){let e=rt()+4,t=null;for(let n of document.querySelectorAll(`[data-file-start]`))if(n.getBoundingClientRect().top<=e)t=n;else break;let n=t?.closest(`[data-group-section]`),r=t?.dataset.path;return n?.dataset.groupSection&&r?{groupId:n.dataset.groupSection,path:r}:null}var ht={stats:`_stats_1audl_1`,add:`_add_1audl_9`,del:`_del_1audl_13`,binary:`_binary_1audl_17`};function N({additions:e,deletions:t,binary:n}){return n&&e===0&&t===0?(0,k.jsx)(`span`,{className:ht.binary,children:`binary`}):(0,k.jsxs)(`span`,{className:ht.stats,children:[(0,k.jsxs)(`span`,{className:ht.add,children:[`+`,e]}),(0,k.jsxs)(`span`,{className:ht.del,children:[`-`,t]})]})}var gt=`(max-width: 639.98px)`,_t=`(min-width: 1024px)`;function vt(e){return(0,w.useSyncExternalStore)(t=>{let n=window.matchMedia(e);return n.addEventListener(`change`,t),()=>n.removeEventListener(`change`,t)},()=>window.matchMedia(e).matches)}var yt={status:`_status_11pfu_1`},bt={added:`A`,removed:`D`,modified:`M`,renamed:`R`,copied:`C`};function xt({status:e}){return(0,k.jsx)(`span`,{className:yt.status,"data-status":e,title:e,children:bt[e]})}function St(e,t=``){let n=e.match(/`+/g)??[],r=Math.max(3,...n.map(e=>e.length+1)),i="`".repeat(r);return`${i}${t}\n${e.replace(/\n$/,``)}\n${i}`}function Ct(e){let t=e.match(/`+/g)??[],n=Math.max(1,...t.map(e=>e.length+1)),r="`".repeat(n),i=e.startsWith("`")||e.endsWith("`")?` `:``;return`${r}${i}${e}${i}${r}`}var wt=C(`'running' | 'complete' | 'failed' | 'cancelled'`),Tt=C({kind:`'pr'`,number:`number`,url:`string`,title:`string`,author:`string`,baseRef:`string`,headRef:`string`,state:`string`,isDraft:`boolean`}).or({kind:`'range' | 'branch' | 'commit'`,spec:`string`}).or({kind:`'staged' | 'worktree'`,"branch?":`string`}),Et=C(`'additions' | 'deletions'`),Dt=C(`'not-in-diff' | 'far-from-diff' | 'no-line' | 'deleted-file' | 'no-hunks'`),Ot=C({file:`string`,side:Et,kind:`'line' | 'nearby' | 'file'`,line:`number`,"endLine?":`number`,cited:{line:`number`,"endLine?":`number`},"text?":`string`,"reason?":Dt}),kt=C(`'added' | 'removed' | 'modified' | 'renamed' | 'copied'`),At=C(`'product' | 'deploy' | 'tooling'`),jt=C({path:`string`,"previousPath?":`string`,status:kt,additions:`number`,deletions:`number`,isBinary:`boolean`,"blob?":`string`,groupId:`string`,classification:`'code' | 'docs' | 'skip'`,"surface?":At}),Mt=C(`'bug' | 'wrench' | 'path' | 'flask' | 'doc' | 'gear'`),Nt=C({id:`string`,"parentId?":`string`,title:`string`,"summary?":`string`,"icon?":Mt,files:`string[]`,findingIds:`string[]`,stopIds:`string[]`,critical:`boolean`}),Pt=C({id:`string`,chapterId:`string`,index:`number`,title:`string`,"prose?":`string`,importance:`'critical' | 'normal' | 'context'`,locations:Ot.and({"label?":`string`}).array()}),Ft=C(`'blocker' | 'should-fix' | 'nice-to-have' | 'question'`),It=C({id:`string`,file:`string`,anchor:Ot,severity:Ft,category:`string`,title:`string`,explanation:`string`,evidence:`string`,"impact?":`string`,confidence:`'high' | 'medium' | 'low'`,"effort?":`'quick' | 'moderate' | 'involved'`,"suggestion?":`string`,"suggestedCode?":`string`,"crossFileRefs?":C({file:`string`,"line?":`number`}).array(),"repeatOf?":`number`,"carriedFrom?":`string`,"surface?":At}),Lt=C({unit:`string`,part:`number`,parts:`number`,status:`'ok' | 'failed'`,costUsd:`number`,wallMs:`number`}),Rt=C({root:`string`,"slug?":`string`,"remote?":`boolean`}),zt=C(`'review' | 'diff'`);function Bt(e){return e.meta.kind??`review`}var Vt=C({schemaVersion:`1`,id:`string`,status:wt,createdAt:`string`,repo:Rt,target:Tt,base:`string`,head:`string`,intent:{"stated?":`string`,"inferred?":`string`,"alignment?":`'aligned' | 'partial' | 'misaligned'`,"matches?":`string[]`,"mismatches?":`string[]`,"unstated?":`string[]`,"missing?":`string[]`},overview:{"focus?":`string`,"changeType?":`string`,startHere:C({file:`string`,why:`string`}).array()},files:jt.array(),groups:Nt.array(),stops:Pt.array(),findings:It.array(),overCapFindings:It.array(),resolved:C({id:`string`,"note?":`string`,"title?":`string`,"file?":`string`}).array(),unreviewed:{overCap:`string[]`,failed:`string[]`,"budget?":`string[]`},meta:{"model?":`string`,"effort?":`string`,"models?":{"review?":{model:`string`,"source?":`string`},"coordinator?":{model:`string`,"source?":`string`},"walkthrough?":{model:`string`,"source?":`string`}},"kind?":zt,wallMs:`number`,costUsd:`number`,slices:Lt.array(),rejectedCount:`number`,coreSource:`string`,"mergeMode?":`'coordinator' | 'nothing-to-merge' | 'deterministic-fallback'`,"budgetStopped?":`boolean`},untrackedSkipped:`string[]`,"priorRunId?":`string`,"error?":`string`});C({reviewedFiles:`string[]`,findingStatus:C.Record(`string`,`'open' | 'accepted' | 'dismissed'`),comments:C({id:`string`,file:`string`,side:Et,line:`number`,"endLine?":`number`,body:`string`}).array(),"submitted?":{at:`string`,"url?":`string`}});var Ht=C({id:`string`,status:wt,createdAt:`string`,target:Tt,repo:Rt,"kind?":zt,findingCounts:{blocker:`number`,"should-fix":`number`,"nice-to-have":`number`,question:`number`},costUsd:`number`,"invalid?":`string`});function Ut(e){return e.kind===`pr`?`PR #${e.number} ${e.title}`:`spec`in e?`${e.kind} ${e.spec}`:e.branch?`${e.kind} (${e.branch})`:e.kind}var P=[`blocker`,`should-fix`,`nice-to-have`,`question`],Wt={ts:`ts`,mts:`ts`,cts:`ts`,tsx:`tsx`,js:`js`,mjs:`js`,cjs:`js`,jsx:`jsx`,json:`json`,css:`css`,scss:`scss`,html:`html`,md:`md`,py:`python`,rs:`rust`,go:`go`,rb:`ruby`,java:`java`,kt:`kotlin`,swift:`swift`,c:`c`,h:`c`,cc:`cpp`,cpp:`cpp`,cxx:`cpp`,hpp:`cpp`,hh:`cpp`,sh:`sh`,bash:`sh`,yml:`yaml`,yaml:`yaml`,toml:`toml`,sql:`sql`};function Gt(e){let t=e.slice(e.lastIndexOf(`/`)+1),n=t.lastIndexOf(`.`);return n>0?Wt[t.slice(n+1).toLowerCase()]??``:``}function Kt(e,t){return t&&t!==e?`${e}-${t}`:`${e}`}function qt(e){let t=e.side===`deletions`?` (old)`:``;return e.kind===`file`?e.cited.line>0?`${e.file}:${Kt(e.cited.line,e.cited.endLine)}`:e.file:e.kind===`nearby`?`${e.file}:${Kt(e.cited.line,e.cited.endLine)}${t}`:`${e.file}:${Kt(e.line,e.endLine)}${t}`}function Jt(e){let t=[`### [${e.severity}] ${e.title}`,Ct(qt(e.anchor))],n=[e.carriedFrom&&`Open since run ${e.carriedFrom}.`,e.repeatOf!==void 0&&`Repeats PR comment #${e.repeatOf}.`].filter(Boolean);return n.length&&t.push(`_${n.join(` `)}_`),t.push(e.explanation.trim()),e.impact?.trim()&&t.push(`**Impact:** ${e.impact.trim()}`),e.evidence.trim()&&t.push(`**Evidence:** ${e.evidence.trim()}`),e.suggestedCode?(e.suggestion?.trim()&&t.push(`**Suggestion:** ${e.suggestion.trim()}`),t.push(St(e.suggestedCode,Gt(e.file)))):e.suggestion?.trim()&&t.push(`**Suggestion:** ${e.suggestion.trim()}`),t.join(`
2
-
3
- `)}function Yt(e){return[...e].sort((e,t)=>P.indexOf(e.severity)-P.indexOf(t.severity)||e.file.localeCompare(t.file)||e.anchor.line-t.anchor.line)}function Xt(e,t={}){let n=[`# Review findings: ${Ut(e.target)}`,`Base ${Ct(e.base.slice(0,12))}, head ${Ct(e.head.slice(0,12))}`];e.findings.length===0&&n.push(`No findings.`);for(let t of Yt(e.findings))n.push(Jt(t));if(t.includeOverCap&&e.overCapFindings.length){n.push(`## Over the posting cap (${e.overCapFindings.length})`);for(let t of Yt(e.overCapFindings))n.push(Jt(t))}return`${n.join(`
4
-
5
- `)}\n`}var Zt=e=>P.indexOf(e.severity);function Qt(e,t){if(e.lineNumber!==t.lineNumber)return e.lineNumber-t.lineNumber;if(e.side!==t.side)return e.side===`deletions`?-1:1;let n=e.metadata,r=t.metadata;return n.kind===r.kind?n.kind===`finding`&&r.kind===`finding`?n.overCap===r.overCap?Zt(n.finding)-Zt(r.finding):n.overCap?1:-1:0:n.kind===`finding`?-1:1}function $t(e,t={}){let n=new Map,r=(e,t)=>{let r=n.get(e.file),i={side:e.side,lineNumber:e.kind===`file`?0:e.line,metadata:t};r?r.push(i):n.set(e.file,[i])};for(let t of e.findings)r(t.anchor,{kind:`finding`,finding:t,overCap:!1});if(t.showOverCap)for(let t of e.overCapFindings)r(t.anchor,{kind:`finding`,finding:t,overCap:!0});for(let t of e.stops)t.locations.forEach((e,n)=>r(e,{kind:`stop`,stop:t,location:n}));for(let e of n.values())e.sort(Qt);return n}function en(e){return e.kind===`file`?null:{start:e.line,end:e.endLine??e.line,side:e.side}}function tn(e){let{line:t,endLine:n}=e.cited;return n!==void 0&&n!==t?`lines ${t}-${n}`:`line ${t}`}function nn(e){if(e.kind===`line`)return;if(e.kind===`nearby`)return`Cited ${tn(e)}, which the diff does not show. Placed at the nearest changed line.`;let t=e.cited.line>0?`Cited ${tn(e)}. `:``;switch(e.reason){case`not-in-diff`:return`${t}This file is not part of the diff.`;case`far-from-diff`:return`${t}That is too far from any changed line to place on the diff.`;case`deleted-file`:return`${t}The file was deleted.`;case`no-hunks`:return`${t}The file has no content changes to show.`;case`no-line`:return`About the whole file; no line cited.`;default:return t?t.trim():void 0}}var rn=(0,w.createContext)(null);function F(){let e=(0,w.useContext)(rn);if(!e)throw Error(`useRunNav needs a RunNavContext provider`);return e}var an={runId:null,file:null,finding:null,stop:null,stopLocation:0,sidebarMode:`groups`,showOverCap:!1,helpOpen:!1},on=ee({name:`focus`,initialState:an,reducers:{runEntered(e,t){if(e.runId!==t.payload)return{...an,runId:t.payload,sidebarMode:e.sidebarMode}},fileFocused(e,t){e.file=t.payload},findingFocused(e,t){e.finding=t.payload.id,t.payload.file&&(e.file=t.payload.file),t.payload.id&&(e.stop=null)},stopFocused(e,t){e.stop=t.payload.id,e.stopLocation=t.payload.location??0,t.payload.file&&(e.file=t.payload.file),t.payload.id&&(e.finding=null)},sidebarModeSet(e,t){e.sidebarMode=t.payload},overCapToggled(e){e.showOverCap=!e.showOverCap},helpSet(e,t){e.helpOpen=t.payload}},selectors:{selectFocusedFile:e=>e.file,selectFocusedFinding:e=>e.finding,selectFocusedStop:e=>e.stop,selectStopLocation:e=>e.stopLocation,selectSidebarMode:e=>e.sidebarMode,selectShowOverCap:e=>e.showOverCap,selectHelpOpen:e=>e.helpOpen}}),{runEntered:sn,fileFocused:cn,findingFocused:ln,stopFocused:un,sidebarModeSet:dn,overCapToggled:fn,helpSet:pn}=on.actions,{selectFocusedFile:mn,selectFocusedFinding:hn,selectFocusedStop:gn,selectStopLocation:_n,selectSidebarMode:vn,selectShowOverCap:yn,selectHelpOpen:bn}=on.selectors,xn=(0,w.forwardRef)(({title:e,titleId:t,...n},r)=>(0,k.jsxs)(`svg`,{viewBox:`0 0 256 256`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,k.jsx)(`title`,{id:t,children:e}):null,(0,k.jsx)(`path`,{fill:`currentColor`,d:`m229.66 77.66l-128 128a8 8 0 0 1-11.32 0l-56-56a8 8 0 0 1 11.32-11.32L96 188.69L218.34 66.34a8 8 0 0 1 11.32 11.32`})]})),Sn=(0,w.forwardRef)(({title:e,titleId:t,...n},r)=>(0,k.jsxs)(`svg`,{viewBox:`0 0 256 256`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,k.jsx)(`title`,{id:t,children:e}):null,(0,k.jsx)(`path`,{fill:`currentColor`,d:`M216 32H88a8 8 0 0 0-8 8v40H40a8 8 0 0 0-8 8v128a8 8 0 0 0 8 8h128a8 8 0 0 0 8-8v-40h40a8 8 0 0 0 8-8V40a8 8 0 0 0-8-8m-56 176H48V96h112Zm48-48h-32V88a8 8 0 0 0-8-8H96V48h112Z`})]})),Cn={button:`_button_12iod_1`};function wn({text:e,label:t,title:n}){let{copy:r}=F(),[i,a]=(0,w.useState)(!1);return(0,w.useEffect)(()=>{if(!i)return;let e=setTimeout(()=>a(!1),1500);return()=>clearTimeout(e)},[i]),(0,k.jsxs)(`button`,{type:`button`,className:Cn.button,title:n??t,onClick:async t=>{t.stopPropagation(),await r(e())&&a(!0)},children:[i?(0,k.jsx)(xn,{"aria-hidden":!0}):(0,k.jsx)(Sn,{"aria-hidden":!0}),(0,k.jsx)(`span`,{children:i?`Copied`:t})]})}var Tn={markdown:`_markdown_c7bef_1`,heading:`_heading_c7bef_42`},En=/^\s*(?:([-*+])|(\d+)[.)])\s+(.*)$/;function Dn(e){let t=[],n=e.replace(/\r\n/g,`
6
- `).split(`
7
- `),r=[],i=()=>{r.length>0&&t.push({kind:`p`,text:r.join(` `)}),r=[]};for(let e=0;e<n.length;e++){let a=n[e];if(a.trim()===``){i();continue}if(a.trimStart().startsWith("```")){i();let r=[];for(;++e<n.length&&!n[e].trimStart().startsWith("```");)r.push(n[e]);t.push({kind:`code`,text:r.join(`
8
- `)});continue}let o=/^(#{1,6})\s+(.*)$/.exec(a);if(o){i(),t.push({kind:`h`,level:o[1].length,text:o[2]});continue}let s=En.exec(a);if(s){i();let e=s[1]?`ul`:`ol`,n=t.at(-1);n&&n.kind===e?n.items.push(s[3]):t.push({kind:e,items:[s[3]]});continue}let c=t.at(-1);r.length===0&&c&&(c.kind===`ul`||c.kind===`ol`)&&/^\s+\S/.test(a)?c.items[c.items.length-1]+=` ${a.trim()}`:r.push(a.trim())}return i(),t}var On=/`([^`]+)`|\*\*([^*]+)\*\*|__([^_]+)__|\*([^*\s][^*]*)\*|_([^_\s][^_]*)_|\[([^\]]+)\]\(([^)\s]+)\)/g;function I(e){let t=[],n=0;for(let r of e.matchAll(On)){r.index>n&&t.push(e.slice(n,r.index));let i=r.index;if(r[1]!==void 0)t.push((0,k.jsx)(`code`,{children:r[1]},i));else if(r[2]!==void 0||r[3]!==void 0)t.push((0,k.jsx)(`strong`,{children:I(r[2]??r[3])},i));else if(r[4]!==void 0||r[5]!==void 0)t.push((0,k.jsx)(`em`,{children:I(r[4]??r[5])},i));else if(r[6]!==void 0&&r[7]!==void 0){let e=/^(https?:|\/|#)/.test(r[7]);t.push(e?(0,k.jsx)(`a`,{href:r[7],target:`_blank`,rel:`noreferrer`,children:I(r[6])},i):r[6])}n=r.index+r[0].length}return n<e.length&&t.push(e.slice(n)),t}function kn(e,t){switch(e.kind){case`p`:return(0,k.jsx)(`p`,{children:I(e.text)},t);case`h`:return(0,k.jsx)(`p`,{className:Tn.heading,children:I(e.text)},t);case`code`:return(0,k.jsx)(`pre`,{children:(0,k.jsx)(`code`,{children:e.text})},t);case`ul`:case`ol`:{let n=e.kind;return(0,k.jsx)(n,{children:e.items.map((e,t)=>(0,k.jsx)(`li`,{children:I(e)},t))},t)}}}function L({source:e,className:t}){return(0,k.jsx)(`div`,{className:[Tn.markdown,t].filter(Boolean).join(` `),children:Dn(e).map(kn)})}var R={card:`_card_e809x_1`,head:`_head_e809x_45`,severity:`_severity_e809x_51`,title:`_title_e809x_60`,meta:`_meta_e809x_68`,badge:`_badge_e809x_76`,note:`_note_e809x_89`,body:`_body_e809x_96`,details:`_details_e809x_100`,code:`_code_e809x_116`,more:`_more_e809x_125`},An=(0,w.memo)(function({finding:e,overCap:t}){let n=F(),r=a(),i=D(hn)===e.id,[o,s]=(0,w.useState)(!1),c=o||i;(0,w.useEffect)(()=>{r?.markDOMDirty()},[c,r]);let l=nn(e.anchor),u=!!(e.impact||e.evidence||e.suggestion||e.suggestedCode);return(0,k.jsxs)(`article`,{id:`finding-${e.id}`,tabIndex:-1,className:R.card,"data-severity":e.severity,"data-focused":i,"aria-label":`${j[e.severity]}: ${e.title}`,onClick:t=>{t.target.closest(`a, button`)||i||n.goToFinding(e.id,{scroll:!1})},children:[(0,k.jsxs)(`header`,{className:R.head,children:[(0,k.jsx)(`span`,{className:R.severity,children:j[e.severity]}),(0,k.jsx)(`h3`,{className:R.title,children:e.title}),(0,k.jsx)(wn,{label:`Copy`,title:`Copy this finding as Markdown`,text:()=>Jt(e)})]}),(0,k.jsxs)(`div`,{className:R.meta,children:[(0,k.jsx)(`span`,{children:e.category}),(0,k.jsxs)(`span`,{children:[e.confidence,` confidence`]}),t&&(0,k.jsx)(`span`,{className:R.badge,children:`over the posting cap`}),e.carriedFrom&&(0,k.jsx)(v,{to:`/runs/$runId`,params:{runId:e.carriedFrom},className:R.badge,children:`from earlier run`}),e.repeatOf!==void 0&&(0,k.jsxs)(`span`,{className:R.badge,children:[`repeats comment #`,e.repeatOf]})]}),l&&(0,k.jsx)(`p`,{className:R.note,children:l}),(0,k.jsx)(L,{source:e.explanation,className:R.body}),u&&c&&(0,k.jsxs)(`div`,{className:R.details,children:[e.impact&&(0,k.jsxs)(`section`,{children:[(0,k.jsx)(`h4`,{children:`Impact`}),(0,k.jsx)(L,{source:e.impact})]}),e.evidence&&(0,k.jsxs)(`section`,{children:[(0,k.jsx)(`h4`,{children:`Evidence`}),(0,k.jsx)(L,{source:e.evidence})]}),(e.suggestion||e.suggestedCode)&&(0,k.jsxs)(`section`,{children:[(0,k.jsx)(`h4`,{children:`Suggestion`}),e.suggestion&&(0,k.jsx)(L,{source:e.suggestion}),e.suggestedCode&&(0,k.jsx)(`pre`,{className:R.code,children:(0,k.jsx)(`code`,{children:e.suggestedCode})})]})]}),u&&!i&&(0,k.jsx)(`button`,{type:`button`,className:R.more,onClick:()=>s(!o),"aria-expanded":c,children:c?`Hide details`:`Show details`})]})}),jn=(0,w.forwardRef)(({title:e,titleId:t,...n},r)=>(0,k.jsxs)(`svg`,{viewBox:`0 0 256 256`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,k.jsx)(`title`,{id:t,children:e}):null,(0,k.jsx)(`path`,{fill:`currentColor`,d:`M224 128a8 8 0 0 1-8 8H59.31l58.35 58.34a8 8 0 0 1-11.32 11.32l-72-72a8 8 0 0 1 0-11.32l72-72a8 8 0 0 1 11.32 11.32L59.31 120H216a8 8 0 0 1 8 8`})]})),Mn=(0,w.forwardRef)(({title:e,titleId:t,...n},r)=>(0,k.jsxs)(`svg`,{viewBox:`0 0 256 256`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,k.jsx)(`title`,{id:t,children:e}):null,(0,k.jsx)(`path`,{fill:`currentColor`,d:`m221.66 133.66l-72 72a8 8 0 0 1-11.32-11.32L196.69 136H40a8 8 0 0 1 0-16h156.69l-58.35-58.34a8 8 0 0 1 11.32-11.32l72 72a8 8 0 0 1 0 11.32`})]})),Nn=(0,w.forwardRef)(({title:e,titleId:t,...n},r)=>(0,k.jsxs)(`svg`,{viewBox:`0 0 256 256`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,k.jsx)(`title`,{id:t,children:e}):null,(0,k.jsx)(`path`,{fill:`currentColor`,d:`M246 106.65L212.33 69.3a16 16 0 0 0-11.89-5.3H136V32a8 8 0 0 0-16 0v32H40a16 16 0 0 0-16 16v64a16 16 0 0 0 16 16h80v64a8 8 0 0 0 16 0v-64h64.44a16 16 0 0 0 11.89-5.3L246 117.35a8 8 0 0 0 0-10.7M200.44 144H40V80h160.44l28.8 32Z`})]})),z={card:`_card_se589_1`,head:`_head_se589_32`,icon:`_icon_se589_38`,kicker:`_kicker_se589_44`,title:`_title_se589_53`,importance:`_importance_se589_61`,label:`_label_se589_71`,note:`_note_se589_76`,body:`_body_se589_82`,nav:`_nav_se589_86`},Pn=(0,w.memo)(function({stop:e,location:t}){let n=F(),r=a(),i=D(n=>gn(n)===e.id&&_n(n)===t);(0,w.useEffect)(()=>{r?.markDOMDirty()},[i,r]);let o=n.stops.findIndex(t=>t.id===e.id),s=n.stops[o-1],c=n.stops[o+1],l=e.locations[t],u=l?nn(l):void 0,d=e.locations.length>1;return(0,k.jsxs)(`aside`,{id:`stop-${e.id}-${t}`,tabIndex:-1,className:z.card,"data-importance":e.importance,"data-focused":i,"aria-label":`Walkthrough stop ${o+1} of ${n.stops.length}: ${e.title}`,onClick:r=>{r.target.closest(`a, button`)||i||n.goToStop(e.id,t,{scroll:!1})},children:[(0,k.jsxs)(`header`,{className:z.head,children:[(0,k.jsx)(Nn,{"aria-hidden":!0,className:z.icon}),(0,k.jsxs)(`span`,{className:z.kicker,children:[`Stop `,o+1,` of `,n.stops.length]}),(0,k.jsx)(`h3`,{className:z.title,children:e.title}),e.importance!==`normal`&&(0,k.jsx)(`span`,{className:z.importance,children:e.importance})]}),l?.label&&(0,k.jsx)(`p`,{className:z.label,children:l.label}),u&&(0,k.jsx)(`p`,{className:z.note,children:u}),e.prose&&(0,k.jsx)(L,{source:e.prose,className:z.body}),(0,k.jsxs)(`nav`,{className:z.nav,"aria-label":`Walkthrough`,children:[(0,k.jsxs)(`button`,{type:`button`,disabled:!s,onClick:()=>s&&n.goToStop(s.id),children:[(0,k.jsx)(jn,{"aria-hidden":!0}),` Previous stop`]}),d&&(0,k.jsxs)(`button`,{type:`button`,onClick:()=>n.goToStop(e.id,(t+1)%e.locations.length),title:`Location ${t+1} of ${e.locations.length}`,children:[`Next location (`,t+1,`/`,e.locations.length,`)`]}),(0,k.jsxs)(`button`,{type:`button`,disabled:!c,onClick:()=>c&&n.goToStop(c.id),children:[`Next stop `,(0,k.jsx)(Mn,{"aria-hidden":!0})]})]})]})}),B={frame:`_frame_2p01a_1`,caret:`_caret_2p01a_8`,plainHeader:`_plainHeader_2p01a_20`,path:`_path_2p01a_29`,meta:`_meta_2p01a_39`,tag:`_tag_2p01a_45`,count:`_count_2p01a_50`,cards:`_cards_2p01a_59`,placeholder:`_placeholder_2p01a_64`},Fn=`[data-diffs-header][data-sticky] { top: calc(var(--header-height, 0px) - 1px); }
9
- [data-diffs-header] [data-additions-count], [data-diffs-header] [data-deletions-count] { display: none; }`,In=[];function Ln({meta:e}){return e.kind===`finding`?(0,k.jsx)(An,{finding:e.finding,overCap:e.overCap}):(0,k.jsx)(Pn,{stop:e.stop,location:e.location})}function Rn({annotations:e}){let t=e.filter(e=>e.metadata.kind===`finding`).length,n=e.length-t;if(!t&&!n)return null;let r=[t?`${t} finding${t===1?``:`s`}`:``,n?`${n} stop${n===1?``:`s`}`:``];return(0,k.jsx)(`span`,{className:B.count,children:r.filter(Boolean).join(`, `)})}var zn=(0,w.memo)(function({runId:e,file:t,diff:n,collapsed:r,annotations:i=In,selection:a}){let s=E(),c=D(Ce),l=D(we),u=D(Te),d=vt(gt),f=t.status===`added`||t.status===`removed`,p=c===`unified`||f||d?`unified`:`split`,m=(0,w.useMemo)(()=>({diffStyle:p,overflow:l?`wrap`:`scroll`,themeType:u,collapsed:r,stickyHeader:!0,unsafeCSS:Fn}),[p,l,u,r]),h=(0,w.useCallback)(e=>(0,k.jsx)(Ln,{meta:e.metadata}),[]),g=(0,k.jsx)(`button`,{type:`button`,className:B.caret,onClick:()=>s(ye({runId:e,path:t.path})),"aria-expanded":!r,title:r?`Expand file`:`Collapse file`,children:r?(0,k.jsx)(Ue,{"aria-hidden":!0}):(0,k.jsx)(He,{"aria-hidden":!0})}),_=n!==void 0&&n.hunks.length>0;return t.isBinary||!_?(0,k.jsxs)(`div`,{className:B.frame,"data-collapsed":r,children:[(0,k.jsxs)(`div`,{className:B.plainHeader,children:[g,(0,k.jsx)(`span`,{className:B.path,title:t.path,children:t.previousPath?`${t.previousPath} → ${t.path}`:t.path}),(0,k.jsxs)(`span`,{className:B.meta,children:[(0,k.jsx)(Rn,{annotations:i}),t.isBinary?(0,k.jsx)(`span`,{className:B.tag,children:`binary`}):(0,k.jsx)(N,{additions:t.additions,deletions:t.deletions}),(0,k.jsx)(xt,{status:t.status})]})]}),!r&&(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(`div`,{className:B.placeholder,children:t.isBinary?`Binary file not shown.`:n?`No content changes.`:`This file is not in the saved patch.`}),i.length>0&&(0,k.jsx)(`div`,{className:B.cards,children:i.map((e,t)=>(0,k.jsx)(Ln,{meta:e.metadata},t))})]})]}):(0,k.jsx)(`div`,{className:B.frame,"data-collapsed":r,children:(0,k.jsx)(o,{fileDiff:n,options:m,lineAnnotations:i,selectedLines:a,renderAnnotation:h,renderHeaderPrefix:()=>g,renderHeaderMetadata:()=>(0,k.jsxs)(`span`,{className:B.meta,children:[r&&(0,k.jsx)(Rn,{annotations:i}),(0,k.jsx)(N,{additions:t.additions,deletions:t.deletions}),(0,k.jsx)(xt,{status:t.status})]})})})}),Bn=(0,w.forwardRef)(({title:e,titleId:t,...n},r)=>(0,k.jsxs)(`svg`,{viewBox:`0 0 256 256`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,k.jsx)(`title`,{id:t,children:e}):null,(0,k.jsxs)(`g`,{fill:`currentColor`,children:[(0,k.jsx)(`path`,{d:`M224 88v112.89a7.11 7.11 0 0 1-7.11 7.11H40a8 8 0 0 1-8-8V64a8 8 0 0 1 8-8h53.33a8 8 0 0 1 4.8 1.6L128 80h88a8 8 0 0 1 8 8`,opacity:.2}),(0,k.jsx)(`path`,{d:`M216 72h-85.33l-27.74-20.8a16.12 16.12 0 0 0-9.6-3.2H40a16 16 0 0 0-16 16v136a16 16 0 0 0 16 16h176.89A15.13 15.13 0 0 0 232 200.89V88a16 16 0 0 0-16-16m0 128H40V64h53.33l29.87 22.4A8 8 0 0 0 128 88h88Z`})]})]}));function Vn(e){if(e.kind===`file`)return`file`;let t=e.kind===`line`?e.line:e.cited.line;return t?`L${t}`:`file`}function Hn(e){if(e.kind===`file`)return`whole file`;let t=e.kind===`line`?e.line:e.cited.line,n=e.kind===`line`?e.endLine:e.cited.endLine,r=n!==void 0&&n!==t?`lines ${t}-${n}`:`line ${t}`;return e.side===`deletions`?`old ${r}`:r}function Un(e,t){let n=new Map(t.map((e,t)=>[e.id,t+1]));return e.flatMap(e=>{let t=e.metadata;if(t.kind===`finding`){let e=t.finding,n=j[e.severity],r=Hn(e.anchor),i=nn(e.anchor);return[{kind:`finding`,key:`finding:${e.id}`,id:e.id,severity:e.severity,overCap:t.overCap,title:e.title,line:Vn(e.anchor),side:e.anchor.side,label:`${n} finding, ${r}: ${e.title}`,tooltip:[`${n}${t.overCap?` (over the posting cap)`:``}: ${e.title}`,r,i].filter(Boolean).join(`
10
- `)}]}let{stop:r,location:i}=t,a=r.locations[i];if(!a)return[];let o=n.get(r.id)??0,s=`${r.importance===`critical`?`Critical walkthrough stop`:`Walkthrough stop`} ${o}`,c=Hn(a),l=r.locations.length>1?` (location ${i+1} of ${r.locations.length})`:``;return[{kind:`stop`,key:`stop:${r.id}:${i}`,id:r.id,location:i,number:o,importance:r.importance,title:r.title,line:Vn(a),side:a.side,label:`${s}${l}, ${c}: ${r.title}`,tooltip:[`${s}${l}: ${r.title}`,a.label,c,nn(a)].filter(Boolean).join(`
11
- `)}]})}function Wn(e,t,n){let r=[...e.map(e=>({path:e.path,file:e})),...t.map(e=>({path:e,file:void 0}))];if(n===`list`)return r.map(({path:e,file:t})=>t?{key:`file:${e}`,depth:0,type:`file`,name:e,file:t}:{key:`missing:${e}`,depth:0,type:`missing`,name:e});let i={name:``,children:new Map};for(let{path:e,file:t}of r){let n=e.split(`/`),r=i;for(let e=0;e<n.length-1;e++){let t=n[e],i=r.children.get(t);i||(i={name:t,children:new Map},r.children.set(t,i)),r=i}r.children.set(`\0file:${e}`,{name:n[n.length-1],children:new Map,file:t,missing:!t})}function a(e){let t=[];for(let n of e.children.values())t.push(...n.file?[n.file]:a(n));return t}let o=[];function s(e,t,n){for(let[r,i]of e.children){if(i.file){o.push({key:`file:${i.file.path}`,depth:t,type:`file`,name:i.name,file:i.file});continue}if(i.missing){o.push({key:`missing:${n}${i.name}`,depth:t,type:`missing`,name:i.name});continue}let e=i.name,c=i,l=`${n}${r}/`;for(;c.children.size===1;){let[t,n]=[...c.children.entries()][0];if(n.file||n.missing)break;e+=`/${n.name}`,c=n,l+=`${t}/`}o.push({key:`folder:${l}`,depth:t,type:`folder`,name:e,files:a(c)}),s(c,t+1,l)}}return s(i,0,``),o}var V={tree:`_tree_syby3_1`,row:`_row_syby3_10`,folder:`_folder_syby3_26`,file:`_file_syby3_34`,name:`_name_syby3_44`,missing:`_missing_syby3_56`,notes:`_notes_syby3_61`,note:`_note_syby3_61`,noteTitle:`_noteTitle_syby3_104`,dot:`_dot_syby3_112`,signpost:`_signpost_syby3_121`,stopNumber:`_stopNumber_syby3_139`,line:`_line_syby3_150`};function Gn({files:e,activePath:t,annotations:n,onSelect:r}){let i=D(Ee),a=F(),o=(0,w.useMemo)(()=>Wn(e,[],i),[e,i]),s=(0,w.useMemo)(()=>{let t=new Map;for(let r of e){let e=n.get(r.path);e?.length&&t.set(r.path,Un(e,a.stops))}return t},[n,e,a.stops]),c=(0,w.useRef)(null);return(0,w.useEffect)(()=>{let e=c.current,t=e?.querySelector(`[data-active="true"]`);e&&t&&lt(e,t)},[t]),(0,k.jsx)(`ul`,{ref:c,className:V.tree,"data-layout":i,children:o.map(e=>{let n=e.file&&s.get(e.file.path);return(0,k.jsxs)(`li`,{children:[(0,k.jsx)(`div`,{className:V.row,"data-active":e.file?.path===t,style:{paddingLeft:`${.5+e.depth}em`},children:e.type===`folder`?(0,k.jsxs)(`span`,{className:V.folder,children:[(0,k.jsx)(Bn,{"aria-hidden":!0}),(0,k.jsx)(`span`,{className:V.name,children:e.name})]}):e.file?(0,k.jsxs)(`button`,{type:`button`,className:V.file,onClick:()=>r(e.file.path),title:e.file.path,children:[(0,k.jsx)(`span`,{className:V.name,children:e.name}),(0,k.jsx)(N,{additions:e.file.additions,deletions:e.file.deletions,binary:e.file.isBinary}),(0,k.jsx)(xt,{status:e.file.status})]}):(0,k.jsx)(`span`,{className:V.missing,children:e.name})}),n&&(0,k.jsx)(Kn,{notes:n,depth:e.depth,file:e.name})]},e.key)})})}function Kn({notes:e,depth:t,file:n}){let r=F(),i=D(hn),a=D(gn),o=D(_n);return(0,k.jsx)(`ul`,{className:V.notes,style:{marginLeft:`${.5+t+.45}em`},"aria-label":`Notes on ${n}`,children:e.map(e=>{let t=e.kind===`finding`?e.id===i:e.id===a&&e.location===o;return(0,k.jsx)(`li`,{children:(0,k.jsxs)(`button`,{type:`button`,className:V.note,"data-kind":e.kind,"data-severity":e.kind===`finding`?e.severity:void 0,"data-importance":e.kind===`stop`?e.importance:void 0,"data-over-cap":e.kind===`finding`&&e.overCap?`true`:void 0,"aria-current":t?`true`:void 0,"aria-label":e.label,title:e.tooltip,onClick:()=>e.kind===`finding`?r.goToFinding(e.id):r.goToStop(e.id,e.location),children:[e.kind===`finding`?(0,k.jsx)(`span`,{className:V.dot,"aria-hidden":!0}):(0,k.jsx)(Nn,{className:V.signpost,"aria-hidden":!0}),(0,k.jsx)(`span`,{className:V.noteTitle,children:e.title}),e.kind===`stop`&&e.number>0&&(0,k.jsxs)(`span`,{className:V.stopNumber,"aria-hidden":!0,children:[`(`,e.number,`)`]}),(0,k.jsx)(`span`,{className:V.line,"data-side":e.side,children:e.line})]})},e.key)})})}var qn=(0,w.forwardRef)(({title:e,titleId:t,...n},r)=>(0,k.jsxs)(`svg`,{viewBox:`0 0 256 256`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,k.jsx)(`title`,{id:t,children:e}):null,(0,k.jsxs)(`g`,{fill:`currentColor`,children:[(0,k.jsx)(`path`,{d:`M232 56v144h-72a32 32 0 0 0-32 32a32 32 0 0 0-32-32H24V56h72a32 32 0 0 1 32 32a32 32 0 0 1 32-32Z`,opacity:.2}),(0,k.jsx)(`path`,{d:`M232 48h-72a40 40 0 0 0-32 16a40 40 0 0 0-32-16H24a8 8 0 0 0-8 8v144a8 8 0 0 0 8 8h72a24 24 0 0 1 24 24a8 8 0 0 0 16 0a24 24 0 0 1 24-24h72a8 8 0 0 0 8-8V56a8 8 0 0 0-8-8M96 192H32V64h64a24 24 0 0 1 24 24v112a39.8 39.8 0 0 0-24-8m128 0h-64a39.8 39.8 0 0 0-24 8V88a24 24 0 0 1 24-24h64Z`})]})]})),Jn=(0,w.forwardRef)(({title:e,titleId:t,...n},r)=>(0,k.jsxs)(`svg`,{viewBox:`0 0 256 256`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,k.jsx)(`title`,{id:t,children:e}):null,(0,k.jsxs)(`g`,{fill:`currentColor`,children:[(0,k.jsx)(`path`,{d:`M208 128v16a80 80 0 0 1-160 0v-16Z`,opacity:.2}),(0,k.jsx)(`path`,{d:`M144 92a12 12 0 1 1 12 12a12 12 0 0 1-12-12m-44-12a12 12 0 1 0 12 12a12 12 0 0 0-12-12m116 64a87.8 87.8 0 0 1-3 23l22.24 9.72A8 8 0 0 1 232 192a7.9 7.9 0 0 1-3.2-.67L207.38 182a88 88 0 0 1-158.76 0l-21.42 9.33a7.9 7.9 0 0 1-3.2.67a8 8 0 0 1-3.2-15.33L43 167a87.8 87.8 0 0 1-3-23v-8H16a8 8 0 0 1 0-16h24v-8a87.8 87.8 0 0 1 3-23l-22.2-9.67a8 8 0 1 1 6.4-14.66L48.62 74a88 88 0 0 1 158.76 0l21.42-9.36a8 8 0 0 1 6.4 14.66L213 89.05a87.8 87.8 0 0 1 3 23v8h24a8 8 0 0 1 0 16h-24ZM56 120h144v-8a72 72 0 0 0-144 0Zm64 95.54V136H56v8a72.08 72.08 0 0 0 64 71.54M200 144v-8h-64v79.54A72.08 72.08 0 0 0 200 144`})]})]})),Yn=(0,w.forwardRef)(({title:e,titleId:t,...n},r)=>(0,k.jsxs)(`svg`,{viewBox:`0 0 256 256`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,k.jsx)(`title`,{id:t,children:e}):null,(0,k.jsx)(`path`,{fill:`currentColor`,d:`M232 128c0 12.5-17.8 22-22.7 33.7s1.4 30.6-7.8 39.8s-28.5 3.1-39.8 7.8S140.5 232 128 232s-22-17.8-33.7-22.7s-30.6 1.4-39.8-7.8s-3.1-28.5-7.8-39.8S24 140.5 24 128s17.8-22 22.7-33.7s-1.4-30.6 7.8-39.8s28.5-3.1 39.8-7.8S115.5 24 128 24s22 17.8 33.7 22.7s30.6-1.4 39.8 7.8s3.1 28.5 7.8 39.8S232 115.5 232 128Z`,opacity:.2}),(0,k.jsx)(`path`,{fill:`currentColor`,d:`M225.9 102.8c-3.8-3.9-7.7-8-9.2-11.5s-1.4-8.7-1.5-14c-.1-9.7-.3-20.8-8-28.5s-18.8-7.9-28.5-8c-5.3-.1-10.7-.2-14-1.5s-7.6-5.4-11.5-9.2C146.3 23.5 138.4 16 128 16s-18.3 7.5-25.2 14.1c-3.9 3.8-8 7.7-11.5 9.2s-8.7 1.4-14 1.5c-9.7.1-20.8.3-28.5 8s-7.9 18.8-8 28.5c-.1 5.3-.2 10.7-1.5 14s-5.4 7.6-9.2 11.5C23.5 109.7 16 117.6 16 128s7.5 18.3 14.1 25.2c3.8 3.9 7.7 8 9.2 11.5s1.4 8.7 1.5 14c.1 9.7.3 20.8 8 28.5s18.8 7.9 28.5 8c5.3.1 10.7.2 14 1.5s7.6 5.4 11.5 9.2c6.9 6.6 14.8 14.1 25.2 14.1s18.3-7.5 25.2-14.1c3.9-3.8 8-7.7 11.5-9.2s8.7-1.4 14-1.5c9.7-.1 20.8-.3 28.5-8s7.9-18.8 8-28.5c.1-5.3.2-10.7 1.5-14s5.4-7.6 9.2-11.5c6.6-6.9 14.1-14.8 14.1-25.2s-7.5-18.3-14.1-25.2Zm-11.6 39.3c-4.8 5-9.7 10.2-12.4 16.5s-2.6 13.1-2.7 19.8s-.2 14.4-3.3 17.5s-10.4 3.2-17.5 3.3s-13.7.2-19.8 2.7s-11.5 7.6-16.5 12.4S132 224 128 224s-9.1-4.9-14.1-9.7s-10.2-9.7-16.5-12.4s-13.1-2.6-19.8-2.7s-14.4-.2-17.5-3.3s-3.2-10.4-3.3-17.5s-.2-13.7-2.7-19.8s-7.6-11.5-12.4-16.5S32 132 32 128s4.9-9.1 9.7-14.1s9.7-10.2 12.4-16.5s2.6-13.1 2.7-19.8s.2-14.4 3.3-17.5s10.4-3.2 17.5-3.3s13.7-.2 19.8-2.7s11.5-7.6 16.5-12.4S124 32 128 32s9.1 4.9 14.1 9.7s10.2 9.7 16.5 12.4s13.1 2.6 19.8 2.7s14.4.2 17.5 3.3s3.2 10.4 3.3 17.5s.2 13.7 2.7 19.8s7.6 11.5 12.4 16.5S224 124 224 128s-4.9 9.1-9.7 14.1ZM120 136V80a8 8 0 0 1 16 0v56a8 8 0 0 1-16 0Zm20 36a12 12 0 1 1-12-12a12 12 0 0 1 12 12Z`})]})),Xn=(0,w.forwardRef)(({title:e,titleId:t,...n},r)=>(0,k.jsxs)(`svg`,{viewBox:`0 0 256 256`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,k.jsx)(`title`,{id:t,children:e}):null,(0,k.jsxs)(`g`,{fill:`currentColor`,children:[(0,k.jsx)(`path`,{d:`M224 128a96 96 0 1 1-96-96a96 96 0 0 1 96 96`,opacity:.2}),(0,k.jsx)(`path`,{d:`M128 24a104 104 0 1 0 104 104A104.11 104.11 0 0 0 128 24m0 192a88 88 0 1 1 88-88a88.1 88.1 0 0 1-88 88m56-88a12 12 0 1 1-12-12a12 12 0 0 1 12 12m-44 0a12 12 0 1 1-12-12a12 12 0 0 1 12 12m-44 0a12 12 0 1 1-12-12a12 12 0 0 1 12 12`})]})]})),Zn=(0,w.forwardRef)(({title:e,titleId:t,...n},r)=>(0,k.jsxs)(`svg`,{viewBox:`0 0 256 256`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,k.jsx)(`title`,{id:t,children:e}):null,(0,k.jsxs)(`g`,{fill:`currentColor`,children:[(0,k.jsx)(`path`,{d:`M208 216H48a8 8 0 0 1-6.86-12.12l30.48-50.8c13.23-2.48 32-1.41 56.37 10.92c32.25 16.33 54.75 12.91 67.5 7.65l19.34 32.23A8 8 0 0 1 208 216`,opacity:.2}),(0,k.jsx)(`path`,{d:`M221.69 199.77L160 96.92V40h8a8 8 0 0 0 0-16H88a8 8 0 0 0 0 16h8v56.92L34.31 199.77A16 16 0 0 0 48 224h160a16 16 0 0 0 13.72-24.23Zm-110.83-96.52a7.93 7.93 0 0 0 1.14-4.11V40h32v59.14a7.93 7.93 0 0 0 1.14 4.11L183.36 167c-12 2.37-29.07 1.37-51.75-10.11c-15.91-8.05-31.05-12.32-45.22-12.81ZM48 208l28.54-47.58c14.25-1.73 30.31 1.85 47.82 10.72c19 9.61 35 12.88 48 12.88a69.9 69.9 0 0 0 19.55-2.7L208 208Z`})]})]})),Qn=(0,w.forwardRef)(({title:e,titleId:t,...n},r)=>(0,k.jsxs)(`svg`,{viewBox:`0 0 256 256`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,k.jsx)(`title`,{id:t,children:e}):null,(0,k.jsxs)(`g`,{fill:`currentColor`,children:[(0,k.jsx)(`path`,{d:`m207.86 123.18l16.78-21a99 99 0 0 0-10.07-24.29l-26.7-3a81 81 0 0 0-6.81-6.81l-3-26.71a99.4 99.4 0 0 0-24.3-10l-21 16.77a82 82 0 0 0-9.64 0l-21-16.78a99 99 0 0 0-24.21 10.07l-3 26.7a81 81 0 0 0-6.81 6.81l-26.71 3a99.4 99.4 0 0 0-10 24.3l16.77 21a82 82 0 0 0 0 9.64l-16.78 21a99 99 0 0 0 10.07 24.29l26.7 3a81 81 0 0 0 6.81 6.81l3 26.71a99.4 99.4 0 0 0 24.3 10l21-16.77a82 82 0 0 0 9.64 0l21 16.78a99 99 0 0 0 24.29-10.07l3-26.7a81 81 0 0 0 6.81-6.81l26.71-3a99.4 99.4 0 0 0 10-24.3l-16.77-21a82 82 0 0 0-.08-9.64M128 168a40 40 0 1 1 40-40a40 40 0 0 1-40 40`,opacity:.2}),(0,k.jsx)(`path`,{d:`M128 80a48 48 0 1 0 48 48a48.05 48.05 0 0 0-48-48m0 80a32 32 0 1 1 32-32a32 32 0 0 1-32 32m88-29.84q.06-2.16 0-4.32l14.92-18.64a8 8 0 0 0 1.48-7.06a107.6 107.6 0 0 0-10.88-26.25a8 8 0 0 0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186 40.54a8 8 0 0 0-3.94-6a107.3 107.3 0 0 0-26.25-10.86a8 8 0 0 0-7.06 1.48L130.16 40h-4.32L107.2 25.11a8 8 0 0 0-7.06-1.48a107.6 107.6 0 0 0-26.25 10.88a8 8 0 0 0-3.93 6l-2.64 23.76q-1.56 1.49-3 3L40.54 70a8 8 0 0 0-6 3.94a107.7 107.7 0 0 0-10.87 26.25a8 8 0 0 0 1.49 7.06L40 125.84v4.32L25.11 148.8a8 8 0 0 0-1.48 7.06a107.6 107.6 0 0 0 10.88 26.25a8 8 0 0 0 6 3.93l23.72 2.64q1.49 1.56 3 3L70 215.46a8 8 0 0 0 3.94 6a107.7 107.7 0 0 0 26.25 10.87a8 8 0 0 0 7.06-1.49L125.84 216q2.16.06 4.32 0l18.64 14.92a8 8 0 0 0 7.06 1.48a107.2 107.2 0 0 0 26.25-10.88a8 8 0 0 0 3.93-6l2.64-23.72q1.56-1.48 3-3l23.78-2.8a8 8 0 0 0 6-3.94a107.7 107.7 0 0 0 10.87-26.25a8 8 0 0 0-1.49-7.06Zm-16.1-6.5a74 74 0 0 1 0 8.68a8 8 0 0 0 1.74 5.48l14.19 17.73a91.6 91.6 0 0 1-6.23 15l-22.6 2.56a8 8 0 0 0-5.1 2.64a74 74 0 0 1-6.14 6.14a8 8 0 0 0-2.64 5.1l-2.51 22.58a91.3 91.3 0 0 1-15 6.23l-17.74-14.19a8 8 0 0 0-5-1.75h-.48a74 74 0 0 1-8.68 0a8.06 8.06 0 0 0-5.48 1.74l-17.78 14.2a91.6 91.6 0 0 1-15-6.23L82.89 187a8 8 0 0 0-2.64-5.1a74 74 0 0 1-6.14-6.14a8 8 0 0 0-5.1-2.64l-22.58-2.52a91.3 91.3 0 0 1-6.23-15l14.19-17.74a8 8 0 0 0 1.74-5.48a74 74 0 0 1 0-8.68a8 8 0 0 0-1.74-5.48L40.2 100.45a91.6 91.6 0 0 1 6.23-15L69 82.89a8 8 0 0 0 5.1-2.64a74 74 0 0 1 6.14-6.14A8 8 0 0 0 82.89 69l2.51-22.57a91.3 91.3 0 0 1 15-6.23l17.74 14.19a8 8 0 0 0 5.48 1.74a74 74 0 0 1 8.68 0a8.06 8.06 0 0 0 5.48-1.74l17.77-14.19a91.6 91.6 0 0 1 15 6.23L173.11 69a8 8 0 0 0 2.64 5.1a74 74 0 0 1 6.14 6.14a8 8 0 0 0 5.1 2.64l22.58 2.51a91.3 91.3 0 0 1 6.23 15l-14.19 17.74a8 8 0 0 0-1.74 5.53Z`})]})]})),$n=(0,w.forwardRef)(({title:e,titleId:t,...n},r)=>(0,k.jsxs)(`svg`,{viewBox:`0 0 256 256`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,k.jsx)(`title`,{id:t,children:e}):null,(0,k.jsxs)(`g`,{fill:`currentColor`,children:[(0,k.jsx)(`path`,{d:`M224 200a24 24 0 1 1-24-24a24 24 0 0 1 24 24`,opacity:.2}),(0,k.jsx)(`path`,{d:`M200 168a32.06 32.06 0 0 0-31 24H72a32 32 0 0 1 0-64h96a40 40 0 0 0 0-80H72a8 8 0 0 0 0 16h96a24 24 0 0 1 0 48H72a48 48 0 0 0 0 96h97a32 32 0 1 0 31-40m0 48a16 16 0 1 1 16-16a16 16 0 0 1-16 16`})]})]})),er=(0,w.forwardRef)(({title:e,titleId:t,...n},r)=>(0,k.jsxs)(`svg`,{viewBox:`0 0 256 256`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,k.jsx)(`title`,{id:t,children:e}):null,(0,k.jsxs)(`g`,{fill:`currentColor`,children:[(0,k.jsx)(`path`,{d:`M224 96a64 64 0 0 1-94.94 56L73 217a24 24 0 0 1-34-34l65-56.06a64 64 0 0 1 80-90.29L144 80l5.66 26.34L176 112l43.35-40A63.8 63.8 0 0 1 224 96`,opacity:.2}),(0,k.jsx)(`path`,{d:`M226.76 69a8 8 0 0 0-12.84-2.88l-40.3 37.19l-17.23-3.7l-3.7-17.23l37.19-40.3A8 8 0 0 0 187 29.24A72 72 0 0 0 88 96a72.3 72.3 0 0 0 6 28.94L33.79 177c-.15.12-.29.26-.43.39a32 32 0 0 0 45.26 45.26c.13-.13.27-.28.39-.42L131.06 162A72 72 0 0 0 232 96a71.6 71.6 0 0 0-5.24-27M160 152a56.14 56.14 0 0 1-27.07-7a8 8 0 0 0-9.92 1.77l-55.9 64.74a16 16 0 0 1-22.62-22.62L109.18 133a8 8 0 0 0 1.77-9.93a56 56 0 0 1 58.36-82.31l-31.2 33.81a8 8 0 0 0-1.94 7.1l5.66 26.33a8 8 0 0 0 6.14 6.14l26.35 5.66a8 8 0 0 0 7.1-1.94l33.81-31.2A56.06 56.06 0 0 1 160 152`})]})]})),tr={icon:`_icon_144da_1`,critical:`_critical_144da_30`},nr={bug:Jn,wrench:er,path:$n,flask:Zn,doc:qn,gear:Qn};function rr({icon:e,className:t}){let n=e?nr[e]:Xn;return(0,k.jsx)(n,{className:[tr.icon,t].filter(Boolean).join(` `),"data-icon":e??`missing`,"aria-hidden":!0})}function ir({reason:e}){let t=e?`Needs close review: ${e}`:`Needs close review`;return(0,k.jsx)(`span`,{className:tr.critical,title:t,role:`img`,"aria-label":t,children:(0,k.jsx)(Yn,{"aria-hidden":!0})})}var H={panel:`_panel_oufx1_1`,head:`_head_oufx1_17`,crumb:`_crumb_oufx1_23`,titleRow:`_titleRow_oufx1_34`,caret:`_caret_oufx1_40`,icon:`_icon_oufx1_52`,title:`_title_oufx1_34`,stats:`_stats_oufx1_63`,summary:`_summary_oufx1_72`};function ar({group:e,parent:t,stats:n,files:r,allCollapsed:i,activePath:a,annotations:o,onToggleFiles:s,onSelectFile:c}){return(0,k.jsxs)(`aside`,{className:H.panel,children:[(0,k.jsxs)(`div`,{className:H.head,children:[t&&(0,k.jsxs)(`button`,{type:`button`,className:H.crumb,onClick:()=>ct(t.id),children:[t.title,` ›`]}),(0,k.jsxs)(`div`,{className:H.titleRow,children:[(0,k.jsx)(`button`,{type:`button`,className:H.caret,onClick:s,title:i?`Expand all files in this group`:`Collapse all files in this group`,children:i?(0,k.jsx)(Ue,{"aria-hidden":!0}):(0,k.jsx)(He,{"aria-hidden":!0})}),(0,k.jsx)(rr,{icon:e.icon,className:H.icon}),(0,k.jsx)(`h2`,{className:H.title,children:e.title}),n.critical&&(0,k.jsx)(ir,{reason:n.criticalReason})]}),(0,k.jsxs)(`div`,{className:H.stats,children:[(0,k.jsx)(N,{additions:n.additions,deletions:n.deletions,binary:n.binary===n.files}),(0,k.jsx)(`span`,{children:M(n.files,`file`)})]})]}),e.summary&&(0,k.jsx)(L,{source:e.summary,className:H.summary}),(0,k.jsx)(Gn,{files:r,activePath:a,annotations:o,onSelect:c})]})}var U={chapter:`_chapter_wsoz0_1`,unit:`_unit_wsoz0_2`,chapterTitle:`_chapterTitle_wsoz0_14`,caret:`_caret_wsoz0_27`,chapterIcon:`_chapterIcon_wsoz0_32`,chapterStats:`_chapterStats_wsoz0_36`,chapterSummary:`_chapterSummary_wsoz0_45`,files:`_files_wsoz0_67`,file:`_file_wsoz0_67`,marker:`_marker_wsoz0_78`,empty:`_empty_wsoz0_82`},or=(0,w.memo)(function({chapter:e,stats:t,unitCount:n,folded:r,onToggleFold:i}){return(0,k.jsxs)(`section`,{id:st(e.id),"data-group-section":e.id,className:U.chapter,children:[(0,k.jsxs)(`button`,{type:`button`,className:U.chapterTitle,onClick:i,"aria-expanded":!r,children:[r?(0,k.jsx)(Ue,{"aria-hidden":!0,className:U.caret}):(0,k.jsx)(He,{"aria-hidden":!0,className:U.caret}),(0,k.jsx)(rr,{icon:e.icon,className:U.chapterIcon}),(0,k.jsx)(`h2`,{children:e.title}),t.critical&&(0,k.jsx)(ir,{reason:t.criticalReason})]}),t.files>0?(0,k.jsxs)(`div`,{className:U.chapterStats,children:[(0,k.jsx)(N,{additions:t.additions,deletions:t.deletions,binary:t.binary===t.files}),(0,k.jsx)(`span`,{children:M(t.files,`file`)}),n>0&&(0,k.jsx)(`span`,{children:M(n,`unit`)})]}):e.stopIds.length>0&&(0,k.jsx)(`div`,{className:U.chapterStats,children:(0,k.jsx)(`span`,{children:`Walkthrough only: no files of its own. Its stops point at files in other groups.`})}),e.summary&&(0,k.jsx)(L,{source:e.summary,className:U.chapterSummary})]})}),sr=(0,w.memo)(function({runId:e,group:t,parent:n,stats:r,files:i,diffs:a,collapsed:o,activePath:s,annotations:c,selection:l}){let u=E(),d=i.length>0&&i.every(e=>o.has(e.path)),f=(0,w.useCallback)(()=>{let t=new Set(o);for(let e of i)d?t.delete(e.path):t.add(e.path);u(ve({runId:e,paths:[...t]}))},[d,o,u,i,e]),p=(0,w.useCallback)(n=>{u(be({runId:e,path:n})),dt(t.id,n)},[u,t.id,e]);return(0,k.jsxs)(`section`,{id:st(t.id),"data-group-section":t.id,className:U.unit,children:[(0,k.jsx)(ar,{group:t,parent:n,stats:r,files:i,allCollapsed:d,activePath:s,annotations:c,onToggleFiles:f,onSelectFile:p}),(0,k.jsxs)(`div`,{className:U.files,children:[i.map(t=>(0,k.jsxs)(`div`,{className:U.file,children:[(0,k.jsx)(`div`,{"data-file-start":!0,"data-path":t.path,className:U.marker,tabIndex:-1,"aria-label":`File ${t.path}`}),(0,k.jsx)(zn,{runId:e,file:t,diff:a.get(t.path),collapsed:o.has(t.path),annotations:c.get(t.path),selection:l?.path===t.path?l.range:null})]},t.path)),i.length===0&&(0,k.jsx)(`p`,{className:U.empty,children:`No files in this group.`})]})]})}),cr=(0,w.forwardRef)(({title:e,titleId:t,...n},r)=>(0,k.jsxs)(`svg`,{viewBox:`0 0 256 256`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,k.jsx)(`title`,{id:t,children:e}):null,(0,k.jsx)(`path`,{fill:`currentColor`,d:`M104 32H64a16 16 0 0 0-16 16v160a16 16 0 0 0 16 16h40a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16m0 176H64V48h40Zm88-176h-40a16 16 0 0 0-16 16v160a16 16 0 0 0 16 16h40a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16m0 176h-40V48h40Z`})]})),lr=(0,w.forwardRef)(({title:e,titleId:t,...n},r)=>(0,k.jsxs)(`svg`,{viewBox:`0 0 256 256`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,k.jsx)(`title`,{id:t,children:e}):null,(0,k.jsx)(`path`,{fill:`currentColor`,d:`M208 40H48a24 24 0 0 0-24 24v112a24 24 0 0 0 24 24h72v16H96a8 8 0 0 0 0 16h64a8 8 0 0 0 0-16h-24v-16h72a24 24 0 0 0 24-24V64a24 24 0 0 0-24-24M48 56h160a8 8 0 0 1 8 8v80H40V64a8 8 0 0 1 8-8m160 128H48a8 8 0 0 1-8-8v-16h176v16a8 8 0 0 1-8 8`})]})),ur=(0,w.forwardRef)(({title:e,titleId:t,...n},r)=>(0,k.jsxs)(`svg`,{viewBox:`0 0 256 256`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,k.jsx)(`title`,{id:t,children:e}):null,(0,k.jsx)(`path`,{fill:`currentColor`,d:`m219.31 108.68l-80-80a16 16 0 0 0-22.62 0l-80 80A15.87 15.87 0 0 0 32 120v96a8 8 0 0 0 8 8h64a8 8 0 0 0 8-8v-56h32v56a8 8 0 0 0 8 8h64a8 8 0 0 0 8-8v-96a15.87 15.87 0 0 0-4.69-11.32M208 208h-48v-56a8 8 0 0 0-8-8h-48a8 8 0 0 0-8 8v56H48v-88l80-80l80 80Z`})]})),dr=(0,w.forwardRef)(({title:e,titleId:t,...n},r)=>(0,k.jsxs)(`svg`,{viewBox:`0 0 256 256`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,k.jsx)(`title`,{id:t,children:e}):null,(0,k.jsx)(`path`,{fill:`currentColor`,d:`M80 64a8 8 0 0 1 8-8h128a8 8 0 0 1 0 16H88a8 8 0 0 1-8-8m136 56H88a8 8 0 0 0 0 16h128a8 8 0 0 0 0-16m0 64H88a8 8 0 0 0 0 16h128a8 8 0 0 0 0-16M44 52a12 12 0 1 0 12 12a12 12 0 0 0-12-12m0 64a12 12 0 1 0 12 12a12 12 0 0 0-12-12m0 64a12 12 0 1 0 12 12a12 12 0 0 0-12-12`})]})),fr=(0,w.forwardRef)(({title:e,titleId:t,...n},r)=>(0,k.jsxs)(`svg`,{viewBox:`0 0 256 256`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,k.jsx)(`title`,{id:t,children:e}):null,(0,k.jsx)(`path`,{fill:`currentColor`,d:`M233.54 142.23a8 8 0 0 0-8-2a88.08 88.08 0 0 1-109.8-109.8a8 8 0 0 0-10-10a104.84 104.84 0 0 0-52.91 37A104 104 0 0 0 136 224a103.1 103.1 0 0 0 62.52-20.88a104.84 104.84 0 0 0 37-52.91a8 8 0 0 0-1.98-7.98m-44.64 48.11A88 88 0 0 1 65.66 67.11a89 89 0 0 1 31.4-26A106 106 0 0 0 96 56a104.11 104.11 0 0 0 104 104a106 106 0 0 0 14.92-1.06a89 89 0 0 1-26.02 31.4`})]})),pr=(0,w.forwardRef)(({title:e,titleId:t,...n},r)=>(0,k.jsxs)(`svg`,{viewBox:`0 0 256 256`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,k.jsx)(`title`,{id:t,children:e}):null,(0,k.jsx)(`path`,{fill:`currentColor`,d:`M208 136H48a16 16 0 0 0-16 16v40a16 16 0 0 0 16 16h160a16 16 0 0 0 16-16v-40a16 16 0 0 0-16-16m0 56H48v-40h160zm0-144H48a16 16 0 0 0-16 16v40a16 16 0 0 0 16 16h160a16 16 0 0 0 16-16V64a16 16 0 0 0-16-16m0 56H48V64h160z`})]})),mr=(0,w.forwardRef)(({title:e,titleId:t,...n},r)=>(0,k.jsxs)(`svg`,{viewBox:`0 0 256 256`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,k.jsx)(`title`,{id:t,children:e}):null,(0,k.jsx)(`path`,{fill:`currentColor`,d:`M216 40H40a16 16 0 0 0-16 16v144a16 16 0 0 0 16 16h176a16 16 0 0 0 16-16V56a16 16 0 0 0-16-16M40 56h40v144H40Zm176 144H96V56h120z`})]})),hr=(0,w.forwardRef)(({title:e,titleId:t,...n},r)=>(0,k.jsxs)(`svg`,{viewBox:`0 0 256 256`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,k.jsx)(`title`,{id:t,children:e}):null,(0,k.jsx)(`path`,{fill:`currentColor`,d:`M120 40V16a8 8 0 0 1 16 0v24a8 8 0 0 1-16 0m72 88a64 64 0 1 1-64-64a64.07 64.07 0 0 1 64 64m-16 0a48 48 0 1 0-48 48a48.05 48.05 0 0 0 48-48M58.34 69.66a8 8 0 0 0 11.32-11.32l-16-16a8 8 0 0 0-11.32 11.32Zm0 116.68l-16 16a8 8 0 0 0 11.32 11.32l16-16a8 8 0 0 0-11.32-11.32M192 72a8 8 0 0 0 5.66-2.34l16-16a8 8 0 0 0-11.32-11.32l-16 16A8 8 0 0 0 192 72m5.66 114.34a8 8 0 0 0-11.32 11.32l16 16a8 8 0 0 0 11.32-11.32ZM48 128a8 8 0 0 0-8-8H16a8 8 0 0 0 0 16h24a8 8 0 0 0 8-8m80 80a8 8 0 0 0-8 8v24a8 8 0 0 0 16 0v-24a8 8 0 0 0-8-8m112-88h-24a8 8 0 0 0 0 16h24a8 8 0 0 0 0-16`})]})),gr=(0,w.forwardRef)(({title:e,titleId:t,...n},r)=>(0,k.jsxs)(`svg`,{viewBox:`0 0 256 256`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,k.jsx)(`title`,{id:t,children:e}):null,(0,k.jsx)(`path`,{fill:`currentColor`,d:`M32 64a8 8 0 0 1 8-8h176a8 8 0 0 1 0 16H40a8 8 0 0 1-8-8m8 48h128a8 8 0 0 0 0-16H40a8 8 0 0 0 0 16m176 24H40a8 8 0 0 0 0 16h176a8 8 0 0 0 0-16m-48 40H40a8 8 0 0 0 0 16h128a8 8 0 0 0 0-16`})]})),_r=(0,w.forwardRef)(({title:e,titleId:t,...n},r)=>(0,k.jsxs)(`svg`,{viewBox:`0 0 256 256`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,k.jsx)(`title`,{id:t,children:e}):null,(0,k.jsx)(`path`,{fill:`currentColor`,d:`M160 112h48a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16h-48a16 16 0 0 0-16 16v16h-16a24 24 0 0 0-24 24v32H72v-8a16 16 0 0 0-16-16H24a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h32a16 16 0 0 0 16-16v-8h32v32a24 24 0 0 0 24 24h16v16a16 16 0 0 0 16 16h48a16 16 0 0 0 16-16v-48a16 16 0 0 0-16-16h-48a16 16 0 0 0-16 16v16h-16a8 8 0 0 1-8-8V88a8 8 0 0 1 8-8h16v16a16 16 0 0 0 16 16M56 144H24v-32h32zm104 16h48v48h-48Zm0-112h48v48h-48Z`})]})),vr=(0,w.forwardRef)(({title:e,titleId:t,...n},r)=>(0,k.jsxs)(`svg`,{viewBox:`0 0 256 256`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,k.jsx)(`title`,{id:t,children:e}):null,(0,k.jsx)(`path`,{fill:`currentColor`,d:`M232 112a64.07 64.07 0 0 1-64 64H51.31l34.35 34.34a8 8 0 0 1-11.32 11.32l-48-48a8 8 0 0 1 0-11.32l48-48a8 8 0 0 1 11.32 11.32L51.31 160H168a48 48 0 0 0 0-96H80a8 8 0 0 1 0-16h88a64.07 64.07 0 0 1 64 64`})]})),yr=(0,w.forwardRef)(({title:e,titleId:t,...n},r)=>(0,k.jsxs)(`svg`,{viewBox:`0 0 256 256`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,k.jsx)(`title`,{id:t,children:e}):null,(0,k.jsx)(`path`,{fill:`currentColor`,d:`M205.66 138.34a8 8 0 0 1-11.32 11.32L136 91.31V224a8 8 0 0 1-16 0V91.31l-58.34 58.35a8 8 0 0 1-11.32-11.32l72-72a8 8 0 0 1 11.32 0ZM216 32H40a8 8 0 0 0 0 16h176a8 8 0 0 0 0-16`})]})),br=(0,w.forwardRef)(({title:e,titleId:t,...n},r)=>(0,k.jsxs)(`svg`,{viewBox:`0 0 256 256`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,k.jsx)(`title`,{id:t,children:e}):null,(0,k.jsx)(`path`,{fill:`currentColor`,d:`M224 48H32a16 16 0 0 0-16 16v128a16 16 0 0 0 16 16h192a16 16 0 0 0 16-16V64a16 16 0 0 0-16-16m0 144H32V64h192zm-16-64a8 8 0 0 1-8 8H56a8 8 0 0 1 0-16h144a8 8 0 0 1 8 8m0-32a8 8 0 0 1-8 8H56a8 8 0 0 1 0-16h144a8 8 0 0 1 8 8M72 160a8 8 0 0 1-8 8h-8a8 8 0 0 1 0-16h8a8 8 0 0 1 8 8m96 0a8 8 0 0 1-8 8H96a8 8 0 0 1 0-16h64a8 8 0 0 1 8 8m40 0a8 8 0 0 1-8 8h-8a8 8 0 0 1 0-16h8a8 8 0 0 1 8 8`})]}));C({"+":`reject`,"target?":`string`,"repo?":`string`,"base?":`string`,"intent?":`string`,"models?":{"+":`reject`,"review?":`string`,"coordinator?":`string`,"walkthrough?":`string`},"effort?":`string`,"maxCostUsd?":`number > 0`,"settingsFile?":`string`,"kind?":zt,"walkthrough?":`boolean`,"fromRun?":`string`});var xr=C({id:`string`,url:`string`}),Sr=C(`'resolving_target' | 'checking_registry' | 'building_map' | 'grouping' | 'reviewing' | 'coordinating' | 'walkthrough' | 'verifying' | 'writing'`),Cr=C({type:`'stage'`,stage:Sr}).or({type:`'slice'`,index:`number`,total:`number`,title:`string`,status:`'started' | 'ok' | 'failed'`,"costUsd?":`number`,"wallMs?":`number`,"findings?":`number`}).or({type:`'log'`,message:`string`}).or({type:`'cost'`,totalUsd:`number`}).or({type:`'budget'`,totalUsd:`number`,limitUsd:`number`,skippedSlices:`number`}),wr=C({type:`'groups'`,groups:Nt.array(),files:C({path:`string`,groupId:`string`,classification:`'code' | 'docs' | 'skip'`}).array()}),Tr=Cr.or(wr).or({type:`'done'`,status:`'complete'`,findings:`number`,"carriedOver?":`number`,costUsd:`number`,wallMs:`number`,"noChanges?":`boolean`,"kind?":zt,"files?":`number`}).or({type:`'cancelled'`}).or({type:`'error'`,message:`string`}).and({seq:`number`,at:`string`}),Er=C({app:`'diffloupe'`,version:`string`,pid:`number`,defaultRepo:`string | null`,activeRunId:`string | null`,gh:{available:`boolean`,authed:`boolean`,"message?":`string`},opencode:{path:`string | null`,version:`string | null`}});C({error:`string`,"activeRunId?":`string`});function Dr(e,t){let n=new Map(t.files.map(e=>[e.path,e]));return{...e,groups:t.groups,files:e.files.map(e=>{let t=n.get(e.path);return t?{...e,groupId:t.groupId,classification:t.classification}:e})}}var Or=[`stage`,`slice`,`log`,`cost`,`budget`,`done`,`cancelled`,`error`],kr=new Set([`done`,`cancelled`,`error`]);function Ar(e,t){let n=new EventSource(`/api/runs/${encodeURIComponent(e)}/events`),r=!1,i=()=>{r||(r=!0,n.close(),t.onEnd())},a=r=>{if(!(r instanceof MessageEvent)){n.readyState===EventSource.CLOSED&&i();return}let a;try{a=JSON.parse(String(r.data))}catch{console.warn(`[diffloupe] run ${e}: event is not JSON`,r.data);return}let o=Tr(a);o instanceof C.errors?console.warn(`[diffloupe] run ${e}: skipping malformed event: ${o.summary}`):(t.onEvent(o),kr.has(o.type)&&i())};for(let e of Or)n.addEventListener(e,a);return n.addEventListener(`end`,i),()=>{r=!0,n.close()}}var jr=C(`string > 0`),Mr=()=>({slicesTotal:0,slicesDone:0,slicesFailed:0,activeSlices:[],costUsd:0}),W=oe({reducerPath:`api`,baseQuery:re({baseUrl:`/api`}),tagTypes:[`Run`,`RunList`],onSchemaFailure:(e,t)=>{console.error(`[diffloupe] ${t.endpoint} ${e.schemaName} failed:`,e.issues)},catchSchemaFailure:(e,t)=>({status:`CUSTOM_ERROR`,error:`${t.endpoint} returned data that does not match the expected shape: ${e.message}`}),endpoints:e=>({getHealth:e.query({query:e=>`/health`,responseSchema:Er}),listRuns:e.query({query:e=>`/runs`,responseSchema:Ht.array(),providesTags:[`RunList`]}),getRun:e.query({query:e=>`/runs/${encodeURIComponent(e)}`,argSchema:jr,responseSchema:Vt,providesTags:(e,t,n)=>[{type:`Run`,id:n}],async onCacheEntryAdded(e,{cacheDataLoaded:t,cacheEntryRemoved:n,updateCachedData:r,dispatch:i,getCacheEntry:a}){try{await t}catch{return}if(a().data?.status!==`running`)return;let o=Ar(e,{onEvent(e){e.type===`groups`?r(t=>{let n=Dr(t,e);t.groups=n.groups,t.files=n.files}):r(t=>{let n=t.progress??=Mr();switch(e.type){case`stage`:n.stage=e.stage;break;case`slice`:n.slicesTotal=e.total,e.status===`started`?n.activeSlices.push(e.title):(n.activeSlices=n.activeSlices.filter(t=>t!==e.title),e.status===`ok`?n.slicesDone+=1:n.slicesFailed+=1),e.costUsd!==void 0&&(n.costUsd=Math.max(n.costUsd,e.costUsd));break;case`cost`:n.costUsd=e.totalUsd;break;case`log`:n.lastMessage=e.message;break;case`budget`:n.lastMessage=`Budget reached: $${e.totalUsd.toFixed(2)} of $${e.limitUsd.toFixed(2)}`}})},onEnd(){i(W.util.invalidateTags([{type:`Run`,id:e},`RunList`]))}});await n,o()}}),getRunPatch:e.query({query:e=>({url:`/runs/${encodeURIComponent(e)}/diff`,responseHandler:`text`}),argSchema:jr,providesTags:(e,t,n)=>[{type:`Run`,id:n}]}),startRun:e.mutation({query:e=>({url:`/runs`,method:`POST`,body:e}),responseSchema:xr,invalidatesTags:[`RunList`]}),deleteRun:e.mutation({query:e=>({url:`/runs/${encodeURIComponent(e)}`,method:`DELETE`}),argSchema:jr,invalidatesTags:[`RunList`]})})}),{useGetHealthQuery:Nr,useListRunsQuery:Pr,useGetRunQuery:Fr,useGetRunPatchQuery:Ir,useStartRunMutation:Lr,useDeleteRunMutation:Rr}=W,zr=(0,w.forwardRef)(({title:e,titleId:t,...n},r)=>(0,k.jsxs)(`svg`,{viewBox:`0 0 256 256`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,k.jsx)(`title`,{id:t,children:e}):null,(0,k.jsx)(`path`,{fill:`currentColor`,d:`M224 128a8 8 0 0 1-8 8H40a8 8 0 0 1 0-16h176a8 8 0 0 1 8 8m-101.66-26.34a8 8 0 0 0 11.32 0l32-32a8 8 0 0 0-11.32-11.32L136 76.69V16a8 8 0 0 0-16 0v60.69l-18.34-18.35a8 8 0 0 0-11.32 11.32Zm11.32 52.68a8 8 0 0 0-11.32 0l-32 32a8 8 0 0 0 11.32 11.32L120 179.31V240a8 8 0 0 0 16 0v-60.69l18.34 18.35a8 8 0 0 0 11.32-11.32Z`})]})),Br={wrap:`_wrap_18f2t_1`,trigger:`_trigger_18f2t_5`,small:`_small_18f2t_22`,menu:`_menu_18f2t_26`,item:`_item_18f2t_41`};function Vr({actions:e}){let[t,n]=(0,w.useState)(!1),r=(0,w.useRef)(null);return(0,w.useEffect)(()=>{if(!t)return;let e=e=>{r.current?.contains(e.target)||n(!1)},i=e=>{e.key===`Escape`&&n(!1)};return document.addEventListener(`pointerdown`,e),document.addEventListener(`keydown`,i),()=>{document.removeEventListener(`pointerdown`,e),document.removeEventListener(`keydown`,i)}},[t]),(0,k.jsxs)(`div`,{className:Br.wrap,ref:r,children:[(0,k.jsxs)(`button`,{type:`button`,className:Br.trigger,onClick:()=>n(e=>!e),"aria-haspopup":`menu`,"aria-expanded":t,title:`Expand or collapse files`,children:[(0,k.jsx)(zr,{"aria-hidden":!0}),(0,k.jsx)(He,{"aria-hidden":!0,className:Br.small})]}),t&&(0,k.jsx)(`div`,{className:Br.menu,role:`menu`,children:e.map(e=>(0,k.jsx)(`button`,{type:`button`,role:`menuitem`,className:Br.item,onClick:()=>{e.run(),n(!1)},children:e.label},e.label))})]})}var G={strip:`_strip_1qqee_1`,stage:`_stage_1qqee_12`,slices:`_slices_1qqee_17`,bar:`_bar_1qqee_25`,fill:`_fill_1qqee_34`,failed:`_failed_1qqee_41`,active:`_active_1qqee_45`,message:`_message_1qqee_46`,cost:`_cost_1qqee_62`},Hr={resolving_target:`Resolving target`,checking_registry:`Checking registry`,building_map:`Building repo map`,grouping:`Grouping files`,reviewing:`Reviewing`,coordinating:`Merging findings`,walkthrough:`Writing walkthrough`,verifying:`Verifying`,writing:`Writing results`};function Ur({progress:e}){let t=e,n=t?t.slicesDone+t.slicesFailed:0,r=t&&t.slicesTotal>0?Math.round(n/t.slicesTotal*100):null;return(0,k.jsxs)(`div`,{className:G.strip,role:`status`,"aria-live":`polite`,children:[(0,k.jsxs)(`span`,{className:G.stage,children:[t?.stage?Hr[t.stage]:`Starting`,`…`]}),t&&t.slicesTotal>0&&(0,k.jsxs)(`span`,{className:G.slices,children:[(0,k.jsx)(`span`,{className:G.bar,children:(0,k.jsx)(`span`,{className:G.fill,style:{width:`${r}%`}})}),n,`/`,t.slicesTotal,` slices`,t.slicesFailed>0&&(0,k.jsxs)(`span`,{className:G.failed,children:[` (`,t.slicesFailed,` failed)`]})]}),t&&t.activeSlices.length>0&&(0,k.jsx)(`span`,{className:G.active,title:t.activeSlices.join(`
12
- `),children:t.activeSlices.join(`, `)}),t?.lastMessage&&(0,k.jsx)(`span`,{className:G.message,title:t.lastMessage,children:t.lastMessage}),t&&t.costUsd>0&&(0,k.jsx)(`span`,{className:G.cost,children:Ge(t.costUsd)})]})}var Wr=(0,w.forwardRef)(({title:e,titleId:t,...n},r)=>(0,k.jsxs)(`svg`,{viewBox:`0 0 256 256`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,k.jsx)(`title`,{id:t,children:e}):null,(0,k.jsxs)(`g`,{fill:`currentColor`,children:[(0,k.jsx)(`path`,{d:`M224 128a96 96 0 1 1-96-96a96 96 0 0 1 96 96`,opacity:.2}),(0,k.jsx)(`path`,{d:`M173.66 98.34a8 8 0 0 1 0 11.32l-56 56a8 8 0 0 1-11.32 0l-24-24a8 8 0 0 1 11.32-11.32L112 148.69l50.34-50.35a8 8 0 0 1 11.32 0M232 128A104 104 0 1 1 128 24a104.11 104.11 0 0 1 104 104m-16 0a88 88 0 1 0-88 88a88.1 88.1 0 0 0 88-88`})]})]})),Gr=(0,w.forwardRef)(({title:e,titleId:t,...n},r)=>(0,k.jsxs)(`svg`,{viewBox:`0 0 256 256`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,k.jsx)(`title`,{id:t,children:e}):null,(0,k.jsx)(`path`,{fill:`currentColor`,d:`M232 128a104 104 0 0 1-208 0c0-41 23.81-78.36 60.66-95.27a8 8 0 0 1 6.68 14.54C60.15 61.59 40 93.27 40 128a88 88 0 0 0 176 0c0-34.73-20.15-66.41-51.34-80.73a8 8 0 0 1 6.68-14.54C208.19 49.64 232 87 232 128`})]})),Kr=(0,w.forwardRef)(({title:e,titleId:t,...n},r)=>(0,k.jsxs)(`svg`,{viewBox:`0 0 256 256`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,k.jsx)(`title`,{id:t,children:e}):null,(0,k.jsxs)(`g`,{fill:`currentColor`,children:[(0,k.jsx)(`path`,{d:`M224 128a96 96 0 1 1-96-96a96 96 0 0 1 96 96`,opacity:.2}),(0,k.jsx)(`path`,{d:`M128 24a104 104 0 1 0 104 104A104.11 104.11 0 0 0 128 24m88 104a87.56 87.56 0 0 1-20.41 56.28L71.72 60.4A88 88 0 0 1 216 128m-176 0a87.56 87.56 0 0 1 20.41-56.28L184.28 195.6A88 88 0 0 1 40 128`})]})]})),qr=(0,w.forwardRef)(({title:e,titleId:t,...n},r)=>(0,k.jsxs)(`svg`,{viewBox:`0 0 256 256`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,k.jsx)(`title`,{id:t,children:e}):null,(0,k.jsxs)(`g`,{fill:`currentColor`,children:[(0,k.jsx)(`path`,{d:`M224 128a96 96 0 1 1-96-96a96 96 0 0 1 96 96`,opacity:.2}),(0,k.jsx)(`path`,{d:`M128 24a104 104 0 1 0 104 104A104.11 104.11 0 0 0 128 24m0 192a88 88 0 1 1 88-88a88.1 88.1 0 0 1-88 88m-8-80V80a8 8 0 0 1 16 0v56a8 8 0 0 1-16 0m20 36a12 12 0 1 1-12-12a12 12 0 0 1 12 12`})]})]})),Jr={badge:`_badge_19nmu_1`,icon:`_icon_19nmu_23`,spin:`_spin_19nmu_1`},Yr={running:Gr,complete:Wr,failed:qr,cancelled:Kr};function Xr({status:e,compact:t=!1}){let n=Yr[e];return(0,k.jsxs)(`span`,{className:Jr.badge,"data-status":e,title:e,children:[(0,k.jsx)(n,{className:Jr.icon,"aria-hidden":!0}),!t&&(0,k.jsx)(`span`,{children:e})]})}var K={header:`_header_hages_1`,inner:`_inner_hages_22`,row:`_row_hages_30`,home:`_home_hages_36`,title:`_title_hages_49`,controls:`_controls_hages_67`,toggle:`_toggle_hages_74`,meta:`_meta_hages_94`,author:`_author_hages_103`,refs:`_refs_hages_108`,ref:`_ref_hages_108`,right:`_right_hages_128`,action:`_action_hages_134`,actionError:`_actionError_hages_150`,error:`_error_hages_154`,tabs:`_tabs_hages_163`,tab:`_tab_hages_163`,tabLabel:`_tabLabel_hages_196`},Zr={system:`light`,light:`dark`,dark:`system`},Qr={system:lr,light:hr,dark:fr};function $r(e){let t=(0,w.useRef)(null),[n,r]=(0,w.useState)(!1),[i,a]=(0,w.useState)(!1),[o,s]=(0,w.useState)(0);return(0,w.useEffect)(()=>{let e=t.current;if(!e)return;let n=new ResizeObserver(()=>s(e.offsetHeight));return n.observe(e),()=>n.disconnect()},[]),(0,w.useEffect)(()=>{document.documentElement.style.setProperty(`--header-height`,`${n?0:o}px`)},[o,n]),(0,w.useEffect)(()=>()=>{document.documentElement.style.removeProperty(`--header-height`)},[]),(0,w.useEffect)(()=>{let t=window.scrollY,n=t,i=()=>{let i=window.scrollY;i<t&&(n=i),t=i,a(i>20),r(!e&&i-n>300)};return i(),window.addEventListener(`scroll`,i,{passive:!0}),()=>window.removeEventListener(`scroll`,i)},[e]),{ref:t,hidden:n,scrolled:i}}function q({title:e,pressed:t,onClick:n,children:r}){return(0,k.jsx)(`button`,{type:`button`,className:K.toggle,title:e,"aria-pressed":t,onClick:n,children:r})}function ei({collapseActions:e,wide:t}){let n=E(),r=D(Ce),i=D(we),a=D(Te),o=D(Ee),s=D(De),c=Qr[a],l=F();return(0,k.jsxs)(`div`,{className:K.controls,children:[(0,k.jsx)(q,{title:`Back to the summary (t)`,onClick:()=>l.goToTop(),children:(0,k.jsx)(yr,{"aria-hidden":!0})}),(0,k.jsx)(Vr,{actions:e}),(0,k.jsx)(q,{title:r===`split`?`Split view (switch to unified)`:`Unified view (switch to split)`,onClick:()=>n(pe(r===`split`?`unified`:`split`)),children:r===`split`?(0,k.jsx)(cr,{"aria-hidden":!0}):(0,k.jsx)(pr,{"aria-hidden":!0})}),(0,k.jsx)(q,{title:i?`Wrap long lines: on`:`Wrap long lines: off`,pressed:i,onClick:()=>n(me()),children:i?(0,k.jsx)(vr,{"aria-hidden":!0}):(0,k.jsx)(gr,{"aria-hidden":!0})}),(0,k.jsx)(q,{title:o===`tree`?`File tree (switch to list)`:`File list (switch to tree)`,onClick:()=>n(ge(o===`tree`?`list`:`tree`)),children:o===`tree`?(0,k.jsx)(_r,{"aria-hidden":!0}):(0,k.jsx)(dr,{"aria-hidden":!0})}),t&&(0,k.jsx)(q,{title:s?`Hide sidebar (show group tabs)`:`Show sidebar`,pressed:s,onClick:()=>n(_e()),children:(0,k.jsx)(mr,{"aria-hidden":!0})}),(0,k.jsx)(q,{title:`Theme: ${a}`,onClick:()=>n(he(Zr[a])),children:(0,k.jsx)(c,{"aria-hidden":!0})}),(0,k.jsx)(q,{title:`Keyboard shortcuts (?)`,onClick:()=>n(pn(!0)),children:(0,k.jsx)(br,{"aria-hidden":!0})})]})}function ti({tree:e,visible:t}){let n=e.ordered.find(e=>t.has(e.id))?.id,r=(0,w.useRef)(null);return(0,w.useEffect)(()=>{n&&r.current?.querySelector(`[data-group-id="${CSS.escape(n)}"]`)?.scrollIntoView({block:`nearest`,inline:`nearest`})},[n]),(0,k.jsx)(`div`,{className:K.tabs,ref:r,children:e.ordered.map(t=>{let r=e.stats.get(t.id);return(0,k.jsxs)(`button`,{type:`button`,className:K.tab,"data-group-id":t.id,"data-active":t.id===n,"data-chapter":!t.parentId&&t.files.length===0,onClick:()=>ct(t.id),children:[(0,k.jsx)(rr,{icon:t.icon}),(0,k.jsx)(`span`,{className:K.tabLabel,children:t.title}),r?.critical&&(0,k.jsx)(ir,{reason:r.criticalReason}),r&&r.files>0&&(0,k.jsx)(N,{additions:r.additions,deletions:r.deletions,binary:r.binary===r.files})]},t.id)})})}function ni({run:e}){let[t,{isLoading:n,error:r}]=Lr(),i=f(),a=async()=>{let n=await t({kind:`review`,fromRun:e.id});`data`in n&&n.data&&i({to:`/runs/$runId`,params:{runId:n.data.id}})};return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(`button`,{type:`button`,className:K.action,disabled:n||e.status===`running`,onClick:()=>void a(),title:`Start a full review of this base and head`,children:n?`Starting review…`:`Review these changes`}),r&&(0,k.jsx)(`span`,{className:K.actionError,children:Ie(r)})]})}function ri({run:e,tree:t,visible:n,collapseActions:r}){let i=vt(_t),a=D(De),{ref:o,hidden:s,scrolled:c}=$r(i),l=e.target,u=e.files.reduce((e,t)=>({additions:e.additions+t.additions,deletions:e.deletions+t.deletions}),{additions:0,deletions:0}),d=l.kind===`pr`?l.baseRef:Xe(e.base),f=l.kind===`pr`?l.headRef:Xe(e.head),p=e.status===`running`?e.progress?.costUsd??0:e.meta.costUsd,m=Bt(e)===`diff`;return(0,k.jsx)(`header`,{ref:o,"data-app-header":!0,className:K.header,"data-hidden":s,"data-scrolled":c,children:(0,k.jsxs)(`div`,{className:K.inner,children:[(0,k.jsxs)(`div`,{className:K.row,children:[(0,k.jsx)(v,{to:`/`,className:K.home,title:`All runs`,children:(0,k.jsx)(ur,{"aria-hidden":!0})}),(0,k.jsx)(Xr,{status:e.status,compact:!0}),(0,k.jsx)(`h1`,{className:K.title,children:l.kind===`pr`?(0,k.jsx)(`a`,{href:l.url,target:`_blank`,rel:`noreferrer`,children:We(l)}):We(l)}),(0,k.jsx)(ei,{collapseActions:r,wide:i})]}),(0,k.jsxs)(`div`,{className:K.meta,children:[l.kind===`pr`&&(0,k.jsx)(`span`,{className:K.author,children:l.author}),(0,k.jsxs)(`span`,{className:K.refs,children:[(0,k.jsx)(`code`,{className:K.ref,title:e.base,children:d}),(0,k.jsx)(`span`,{"aria-label":`from`,children:`←`}),(0,k.jsx)(`code`,{className:K.ref,title:e.head,children:f})]}),(0,k.jsx)(`span`,{children:M(e.files.length,`file`)}),(0,k.jsx)(N,{additions:u.additions,deletions:u.deletions}),(0,k.jsxs)(`span`,{className:K.right,children:[m&&!e.repo.remote&&(0,k.jsx)(ni,{run:e}),(0,k.jsx)(`span`,{title:e.repo.root,children:e.repo.slug??e.repo.root}),(0,k.jsx)(`span`,{children:Ye(e.createdAt)}),(!m||p>0)&&(0,k.jsx)(`span`,{title:`Model cost`,children:Ge(p)})]})]}),e.status===`running`&&(0,k.jsx)(Ur,{progress:e.progress}),e.status===`failed`&&e.error&&(0,k.jsxs)(`p`,{className:K.error,children:[m?`Run`:`Review`,` failed: `,e.error]}),(!i||!a)&&(0,k.jsx)(ti,{tree:t,visible:n})]})})}var ii=[[`j / k`,`Next / previous file`],[`n / p`,`Next / previous finding`],[`] / [`,`Next / previous walkthrough stop`],[`x`,`Collapse or expand the current file`],[`t`,`Back to the summary (Back returns here)`],[`?`,`Show this list`]];function ai(){let e=D(bn),t=E(),n=(0,w.useRef)(null);return(0,w.useEffect)(()=>{let t=n.current;t&&(e&&!t.open&&t.showModal(),!e&&t.open&&t.close())},[e]),(0,k.jsxs)(`dialog`,{ref:n,className:A.dialog,"aria-labelledby":`keyboard-help-title`,onClose:()=>t(pn(!1)),onClick:e=>{e.target===e.currentTarget&&n.current?.close()},children:[(0,k.jsx)(`header`,{className:A.header,children:(0,k.jsx)(`h2`,{id:`keyboard-help-title`,className:A.title,children:`Keyboard shortcuts`})}),(0,k.jsx)(`dl`,{className:A.keys,children:ii.map(([e,t])=>(0,k.jsxs)(`div`,{className:A.key,children:[(0,k.jsx)(`dt`,{children:e.split(` / `).map((e,t)=>(0,k.jsxs)(`span`,{children:[t>0&&` / `,(0,k.jsx)(`kbd`,{children:e})]},e))}),(0,k.jsx)(`dd`,{children:t})]},e))}),(0,k.jsx)(`div`,{className:A.actions,children:(0,k.jsx)(`button`,{type:`button`,className:A.button,onClick:()=>n.current?.close(),children:`Close`})})]})}var J={files:`_files_16ufo_1`,findings:`_findings_16ufo_2`,empty:`_empty_16ufo_18`,file:`_file_16ufo_1`,finding:`_finding_16ufo_2`,title:`_title_16ufo_63`,dot:`_dot_16ufo_79`,line:`_line_16ufo_96`};function oi(e){let t=[];for(let n of e){let e=t.at(-1);e?.file===n.anchor.file?e.findings.push(n):t.push({file:n.anchor.file,findings:[n]})}return t}function si(e){let t=e.anchor,n=t.kind===`line`?t.line:t.cited.line;return n?`L${n}`:`file`}function ci(e){return e.slice(e.lastIndexOf(`/`)+1)}function li({findings:e,overCap:t}){let n=F(),r=D(hn),i=(0,w.useRef)(null);return(0,w.useEffect)(()=>{let e=i.current,t=e?.closest(`nav`)?.parentElement?.parentElement,n=e?.querySelector(`[aria-current="true"]`);t&&n&&lt(t,n)},[r]),e.length===0?(0,k.jsx)(`p`,{className:J.empty,children:`No findings in the changed files.`}):(0,k.jsx)(`ol`,{ref:i,className:J.files,children:oi(e).map((e,i)=>(0,k.jsxs)(`li`,{children:[(0,k.jsx)(`button`,{type:`button`,className:J.file,title:e.file,onClick:()=>n.goToFile(e.file),children:ci(e.file)}),(0,k.jsx)(`ol`,{className:J.findings,children:e.findings.map(e=>(0,k.jsx)(`li`,{children:(0,k.jsxs)(`button`,{type:`button`,className:J.finding,"data-severity":e.severity,"data-over-cap":t.has(e.id),"aria-current":e.id===r?`true`:void 0,title:`${j[e.severity]}: ${e.title}`,onClick:()=>n.goToFinding(e.id),children:[(0,k.jsx)(`span`,{className:J.dot,"aria-hidden":!0}),(0,k.jsx)(`span`,{className:J.title,children:e.title}),(0,k.jsx)(`span`,{className:J.line,children:si(e)})]})},e.id))})]},`${e.file}-${i}`))})}var Y={chapters:`_chapters_12sy8_1`,stops:`_stops_12sy8_2`,chapter:`_chapter_12sy8_1`,stop:`_stop_12sy8_2`,number:`_number_12sy8_49`,title:`_title_12sy8_62`};function ui(e,t){let n=new Map(e.filter(e=>!e.parentId).map(e=>[e.id,e.title])),r=[],i=new Map;for(let e of t){let t=n.has(e.chapterId)?e.chapterId:``,a=i.get(t);a||(a={id:t,title:n.get(t)??`Walkthrough`,stops:[]},i.set(t,a),r.push(a)),a.stops.push(e)}return r}function di({groups:e,stops:t}){let n=F(),r=D(gn),i=(0,w.useRef)(null),a=ui(e,t),o=0;return(0,w.useEffect)(()=>{let e=i.current,t=e?.closest(`nav`)?.parentElement?.parentElement,n=e?.querySelector(`[aria-current="step"]`);t&&n&&lt(t,n)},[r]),(0,k.jsx)(`ol`,{ref:i,className:Y.chapters,children:a.map(e=>(0,k.jsxs)(`li`,{children:[(0,k.jsx)(`h3`,{className:Y.chapter,children:e.title}),(0,k.jsx)(`ol`,{className:Y.stops,children:e.stops.map(e=>(o+=1,(0,k.jsx)(`li`,{children:(0,k.jsxs)(`button`,{type:`button`,className:Y.stop,"data-importance":e.importance,"aria-current":e.id===r?`step`:void 0,onClick:()=>n.goToStop(e.id),children:[(0,k.jsx)(`span`,{className:Y.number,children:o}),(0,k.jsx)(`span`,{className:Y.title,children:e.title})]})},e.id)))})]},e.id||`loose`))})}var X={sidebar:`_sidebar_1dwkw_1`,modes:`_modes_1dwkw_7`,mode:`_mode_1dwkw_7`,modeCount:`_modeCount_1dwkw_32`,nav:`_nav_1dwkw_38`,list:`_list_1dwkw_42`,row:`_row_1dwkw_51`,caret:`_caret_1dwkw_69`,caretSpace:`_caretSpace_1dwkw_70`,link:`_link_1dwkw_87`,label:`_label_1dwkw_101`,icon:`_icon_1dwkw_108`,title:`_title_1dwkw_116`,sub:`_sub_1dwkw_127`};function fi({group:e,stats:t,depth:n,visible:r,fold:i}){return(0,k.jsxs)(`li`,{className:X.row,"data-visible":r,"data-depth":n,children:[i?(0,k.jsx)(`button`,{type:`button`,className:X.caret,onClick:i.onToggle,title:i.folded?`Show units`:`Hide units`,"aria-expanded":!i.folded,children:i.folded?(0,k.jsx)(Ue,{"aria-hidden":!0}):(0,k.jsx)(He,{"aria-hidden":!0})}):(0,k.jsx)(`span`,{className:X.caretSpace}),(0,k.jsxs)(`button`,{type:`button`,className:X.link,onClick:()=>ct(e.id),children:[(0,k.jsxs)(`span`,{className:X.label,children:[(0,k.jsx)(rr,{icon:e.icon,className:X.icon}),(0,k.jsx)(`span`,{className:X.title,children:e.title}),t?.critical&&(0,k.jsx)(ir,{reason:t.criticalReason})]}),t&&t.files>0&&(0,k.jsxs)(`span`,{className:X.sub,children:[(0,k.jsx)(N,{additions:t.additions,deletions:t.deletions,binary:t.binary===t.files}),(0,k.jsxs)(`span`,{children:[`・`,M(t.files,`file`)]})]}),t?.files===0&&e.stopIds.length>0&&(0,k.jsx)(`span`,{className:X.sub,children:`Walkthrough only`})]})]})}var pi={groups:`Groups`,findings:`Findings`,guide:`Guide`};function mi({run:e,tree:t,visible:n,folded:r,onToggleFold:i,findings:a,overCap:o}){let s=E(),c=D(vn),l=[`groups`];e.findings.length+e.overCapFindings.length>0&&l.push(`findings`),e.stops.length>0&&l.push(`guide`);let u=l.includes(c)?c:`groups`;return(0,k.jsxs)(`div`,{className:X.sidebar,children:[l.length>1&&(0,k.jsx)(`div`,{className:X.modes,role:`group`,"aria-label":`Sidebar view`,children:l.map(e=>(0,k.jsxs)(`button`,{type:`button`,className:X.mode,"aria-pressed":u===e,onClick:()=>s(dn(e)),children:[pi[e],e===`findings`&&(0,k.jsx)(`span`,{className:X.modeCount,children:a.length})]},e))}),u===`guide`&&(0,k.jsx)(`nav`,{className:X.nav,"aria-label":`Walkthrough`,children:(0,k.jsx)(di,{groups:e.groups,stops:e.stops})}),u===`findings`&&(0,k.jsx)(`nav`,{className:X.nav,"aria-label":`Findings`,children:(0,k.jsx)(li,{findings:a,overCap:o})}),u===`groups`&&(0,k.jsx)(hi,{tree:t,visible:n,folded:r,onToggleFold:i})]})}function hi({tree:e,visible:t,folded:n,onToggleFold:r}){let i=(0,w.useRef)(null),a=e.ordered.find(e=>t.has(e.id))?.id;return(0,w.useEffect)(()=>{let e=i.current,t=e?.parentElement?.parentElement,n=e?.querySelector(`[data-visible="true"]`);t&&n&&lt(t,n)},[a]),(0,k.jsx)(`nav`,{ref:i,className:X.nav,"aria-label":`Groups`,children:(0,k.jsx)(`ul`,{className:X.list,children:e.chapters.flatMap(({chapter:i,units:a})=>{let o=[];if(i){let s=n.has(i.id);if(o.push((0,k.jsx)(fi,{group:i,stats:e.stats.get(i.id),depth:0,visible:t.has(i.id),fold:a.length>0?{folded:s,onToggle:()=>r(i.id)}:void 0},i.id)),s)return o}for(let n of a)o.push((0,k.jsx)(fi,{group:n,stats:e.stats.get(n.id),depth:+!!i,visible:t.has(n.id)},n.id));return o})})})}var gi={product:0,deploy:1,tooling:2},_i=[`product`,`deploy`,`tooling`],vi={product:`Prod risk`,deploy:`Deploy risk`,tooling:`Main findings — tooling`},yi=e=>e.severity===`blocker`||e.severity===`should-fix`;function bi(e){let t=e.filter(e=>e.severity===`blocker`).length,n=e.filter(e=>e.severity===`should-fix`).length;return t?{level:`high`,label:`Merge risk: high`,detail:`${t} ${t===1?`blocker`:`blockers`} open.`}:n?{level:`moderate`,label:`Merge risk: moderate`,detail:`${n} should-fix ${n===1?`finding`:`findings`} open.`}:{level:`low`,label:`Merge risk: low`,detail:`nothing found that should block this.`}}function xi(e){let t=e.filter(e=>e.surface===`product`),n=t.filter(yi).length;return t.length===0?{level:`low`,label:`Prod risk: none`,detail:`everything found is in tooling, deploy or test code.`}:n?{level:`high`,label:`Prod risk: ${n}`,detail:`${n===1?`finding`:`findings`} in production code worth acting on.`}:{level:`moderate`,label:`Prod risk: low`,detail:`${t.length} in production code, none above a question.`}}function Si(e){let t=new Set(e);return _i.find(e=>t.has(e))??`product`}function Ci(e,t){return gi[e]<=gi[t]}var wi=[`high`,`medium`,`low`];function Ti(e){let t=new Map;for(let n of e){let e=t.get(n.file);e?e.push(n):t.set(n.file,[n])}return[...t].map(([e,t])=>({file:e,findings:t}))}function Ei(e){let t=[...e.findings].sort((e,t)=>P.indexOf(e.severity)-P.indexOf(t.severity)||wi.indexOf(e.confidence)-wi.indexOf(t.confidence)),n=t.filter(e=>e.repeatOf===void 0),r=t.filter(e=>e.repeatOf!==void 0),i=P.map(e=>[e,n.filter(t=>t.severity===e).length]).filter(([,e])=>e>0),a=n.flatMap(e=>e.surface?[{finding:e,severity:e.severity,surface:e.surface}]:[]),o=a.length===n.length,s=e.files.flatMap(e=>e.surface?[e.surface]:[]),c=o?Si(s.length?s:a.map(e=>e.surface)):null,l=c?a.filter(e=>Ci(e.surface,c)).map(e=>e.finding):n,u=c?a.filter(e=>!Ci(e.surface,c)).map(e=>e.finding):[];return{merge:bi(n),...o?{prod:xi(a)}:{},counts:i,title:c?vi[c]:`Findings`,main:Ti(l),other:Ti(u),echoed:r}}var Di=new Set([`range`,`branch`,`commit`]);function Oi(e){if(e.target.kind===`pr`)return`the description`;let t=Di.has(e.target.kind);return e.intent.stated?t?`the stated intent and commit messages`:`the stated intent`:t?`the commit messages`:void 0}var Z={summary:`_summary_19fm7_1`,verdicts:`_verdicts_19fm7_22`,dot:`_dot_19fm7_28`,sep:`_sep_19fm7_64`,section:`_section_19fm7_68`,sectionHeader:`_sectionHeader_19fm7_74`,heading:`_heading_19fm7_81`,subheading:`_subheading_19fm7_87`,findings:`_findings_19fm7_94`,fileFindings:`_fileFindings_19fm7_95`,list:`_list_19fm7_96`,finding:`_finding_19fm7_94`,outside:`_outside_19fm7_113`,lineLink:`_lineLink_19fm7_120`,fileLink:`_fileLink_19fm7_121`,path:`_path_19fm7_133`,details:`_details_19fm7_141`,overCap:`_overCap_19fm7_150`,labelled:`_labelled_19fm7_157`,inline:`_inline_19fm7_161`,alignment:`_alignment_19fm7_169`,why:`_why_19fm7_185`,note:`_note_19fm7_190`,files:`_files_19fm7_194`,footer:`_footer_19fm7_203`},ki=`summary`,Ai={aligned:e=>`Matches ${e}`,partial:e=>`Partly matches ${e}`,misaligned:e=>`Does not match ${e}`},ji=[[`matches`,()=>`Holds up on`],[`mismatches`,()=>`Does not hold up on`],[`unstated`,e=>`In the diff but not in ${e}`],[`missing`,()=>`Stated but not accomplished`]];function Mi(e){let t=e.replace(/^the /,``);return t.charAt(0).toUpperCase()+t.slice(1)}var Ni=[[`overCap`,`More code files than the reviewers could read; these were left out.`],[`failed`,`The reviewer for these files failed.`],[`budget`,`The cost limit stopped the review before these files.`]];function Pi({path:e,known:t}){let n=F();return t?(0,k.jsx)(`button`,{type:`button`,className:Z.fileLink,onClick:()=>n.goToFile(e),children:(0,k.jsx)(`code`,{className:Z.path,children:e})}):(0,k.jsx)(`code`,{className:Z.path,children:e})}function Fi({verdict:e}){return(0,k.jsxs)(`p`,{className:Z.verdict,children:[(0,k.jsx)(`span`,{className:Z.dot,"data-level":e.level,"aria-hidden":!0}),(0,k.jsx)(`strong`,{children:e.label}),` — `,e.detail]})}function Ii(e){let t=e.anchor,n=t.kind===`line`?t.line:t.cited.line,r=t.kind===`line`?t.endLine:t.cited.endLine;return n?r&&r!==n?`L${n}-${r}`:`L${n}`:`whole file`}function Li({groups:e,files:t}){let n=F();return(0,k.jsx)(`ul`,{className:Z.findings,children:e.map(({file:e,findings:r})=>{let i=t.has(e);return(0,k.jsxs)(`li`,{children:[(0,k.jsx)(Pi,{path:e,known:i}),!i&&(0,k.jsx)(`span`,{className:Z.outside,children:`outside the diff`}),(0,k.jsx)(`ul`,{className:Z.fileFindings,children:r.map(e=>(0,k.jsxs)(`li`,{className:Z.finding,children:[(0,k.jsx)(`span`,{className:Z.dot,"data-severity":e.severity,"aria-hidden":!0}),(0,k.jsx)(`strong`,{children:j[e.severity]}),` `,e.title,` —`,` `,i?(0,k.jsx)(`button`,{type:`button`,className:Z.lineLink,onClick:()=>n.goToFinding(e.id),children:Ii(e)}):(0,k.jsx)(`span`,{children:Ii(e)})]},e.id))})]},e)})})}function Ri({label:e,children:t}){return(0,k.jsxs)(`div`,{className:Z.labelled,children:[(0,k.jsx)(`strong`,{children:e}),` `,t]})}function zi({run:e}){let t=E(),n=D(yn),r=new Set(e.files.map(e=>e.path)),i=Ei(e),{intent:a,overview:o,meta:s}=e,c=i.main.length+i.other.length,l=i.main.reduce((e,t)=>e+t.findings.length,0),u=i.other.reduce((e,t)=>e+t.findings.length,0),d=e.overCapFindings,f=Oi(e),p=f?a.alignment:void 0,m=f?ji.filter(([e])=>(a[e]?.length??0)>0):[],h=Ni.filter(([t])=>(e.unreviewed[t]?.length??0)>0),g=f?a.mismatches?.[0]:void 0,_=Bt(e)===`diff`,y=e.groups.filter(e=>e.files.length>0).length;return(0,k.jsxs)(`section`,{id:ki,tabIndex:-1,className:Z.summary,"aria-label":_?`Diff summary`:`Review summary`,children:[_?(0,k.jsxs)(`p`,{children:[M(e.files.length,`changed file`),` in `,M(y,`group`),e.status===`complete`&&e.stops.length===0&&!o.focus&&(0,k.jsxs)(`span`,{className:Z.note,children:[` · no walkthrough (add one with `,(0,k.jsx)(`code`,{children:`diffloupe diff --walkthrough`}),`)`]})]}):c===0?(0,k.jsx)(`p`,{children:e.status===`running`?`Reviewing the changed files. Findings appear here when the review finishes.`:e.status===`complete`?`No new issues found in the changed files.`:`The review ${e.status===`failed`?`failed`:`was cancelled`} before reporting any findings.`}):(0,k.jsxs)(`div`,{className:Z.verdicts,children:[(0,k.jsx)(Fi,{verdict:i.merge}),i.prod&&(0,k.jsx)(Fi,{verdict:i.prod}),(0,k.jsx)(`p`,{className:Z.counts,children:i.counts.map(([e,t],n)=>(0,k.jsxs)(`span`,{children:[n>0&&(0,k.jsx)(`span`,{className:Z.sep,children:` · `}),(0,k.jsx)(`span`,{className:Z.dot,"data-severity":e,"aria-hidden":!0}),(0,k.jsx)(`strong`,{children:j[e]}),`: `,t]},e))})]}),l>0&&(0,k.jsxs)(`section`,{className:Z.section,children:[(0,k.jsxs)(`div`,{className:Z.sectionHeader,children:[(0,k.jsxs)(`h3`,{className:Z.heading,children:[i.title,` (`,l,`)`]}),(0,k.jsx)(wn,{text:()=>Xt(e,{includeOverCap:n}),label:`Copy all`,title:`Copy all findings as markdown`})]}),(0,k.jsx)(Li,{groups:i.main,files:r})]}),u>0&&(0,k.jsxs)(`details`,{className:Z.details,children:[(0,k.jsxs)(`summary`,{children:[`Everything else (`,u,`) — lower-risk surfaces`]}),(0,k.jsx)(Li,{groups:i.other,files:r})]}),d.length>0&&(0,k.jsxs)(`div`,{className:Z.section,children:[(0,k.jsxs)(`label`,{className:Z.overCap,children:[(0,k.jsx)(`input`,{type:`checkbox`,checked:n,onChange:()=>t(fn())}),M(d.length,`more finding`),` past the posting cap. Show them here and in the diff.`]}),n&&(0,k.jsx)(Li,{groups:Ti(d),files:r})]}),i.echoed.length>0&&(0,k.jsxs)(`details`,{className:Z.details,children:[(0,k.jsxs)(`summary`,{children:[`Agreeing with `,M(i.echoed.length,`existing review comment`)]}),(0,k.jsx)(Li,{groups:Ti(i.echoed),files:r})]}),(p||a.inferred||a.stated||m.length>0)&&(0,k.jsxs)(`div`,{className:Z.section,children:[f&&(p||g)&&(0,k.jsxs)(Ri,{label:`Intent:`,children:[p&&(0,k.jsx)(`span`,{className:Z.alignment,"data-alignment":p,children:Ai[p](f)}),g&&(0,k.jsxs)(k.Fragment,{children:[` — `,g]})]}),a.inferred&&(0,k.jsx)(Ri,{label:`What it does:`,children:a.inferred}),f&&(a.stated||m.length>0)&&(0,k.jsxs)(`details`,{className:Z.details,children:[(0,k.jsxs)(`summary`,{children:[Mi(f),` compared with the code`]}),a.stated&&(0,k.jsx)(Ri,{label:`Stated:`,children:a.stated}),m.map(([e,t])=>(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`h4`,{className:Z.subheading,children:t(f)}),(0,k.jsx)(`ul`,{className:Z.list,children:(a[e]??[]).map(e=>(0,k.jsx)(`li`,{children:e},e))})]},e))]})]}),o.focus&&(0,k.jsxs)(`div`,{className:Z.labelled,children:[(0,k.jsx)(`strong`,{children:`What to focus on:`}),` `,(0,k.jsx)(L,{source:o.focus,className:Z.inline})]}),o.startHere.length>0&&(0,k.jsxs)(`section`,{className:Z.section,children:[(0,k.jsx)(`h3`,{className:Z.heading,children:`Start here`}),(0,k.jsx)(`ol`,{className:Z.list,children:o.startHere.map(e=>(0,k.jsxs)(`li`,{children:[(0,k.jsx)(Pi,{path:e.file,known:r.has(e.file)}),` — `,e.why]},e.file))})]}),e.resolved.length>0&&(0,k.jsxs)(`section`,{className:Z.section,children:[(0,k.jsx)(`h3`,{className:Z.heading,children:`Fixed since the last run`}),(0,k.jsx)(`ul`,{className:Z.list,children:e.resolved.map(t=>(0,k.jsxs)(`li`,{children:[e.priorRunId?(0,k.jsx)(v,{to:`/runs/$runId`,params:{runId:e.priorRunId},search:{finding:t.id},children:t.title??t.id}):t.title??t.id,t.file&&(0,k.jsxs)(`code`,{className:Z.path,children:[` `,t.file]}),t.note&&(0,k.jsx)(`span`,{className:Z.why,children:t.note})]},t.id))})]}),h.length>0&&(0,k.jsxs)(`section`,{className:Z.section,children:[(0,k.jsx)(`h3`,{className:Z.heading,children:`Not reviewed`}),h.map(([t,n])=>(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`p`,{className:Z.note,children:n}),(0,k.jsx)(`ul`,{className:Z.files,children:(e.unreviewed[t]??[]).map(e=>(0,k.jsx)(`li`,{children:(0,k.jsx)(Pi,{path:e,known:r.has(e)})},e))})]},t))]}),(0,k.jsxs)(`footer`,{className:Z.footer,children:[o.changeType&&(0,k.jsx)(`span`,{children:o.changeType}),s.costUsd>0||e.status===`running`&&!_?(0,k.jsx)(`span`,{children:Ge(s.costUsd)}):!_&&(0,k.jsx)(`span`,{children:`cost not reported`}),s.wallMs>0&&(0,k.jsx)(`span`,{children:Ke(s.wallMs)}),s.model&&(0,k.jsx)(`span`,{children:s.effort?`${s.model} (${s.effort})`:s.model}),(0,k.jsx)(`span`,{children:e.status})]})]})}function Bi(e,t){let n=new Map;for(let t of e){let e=n.get(t.groupId);e?e.push(t):n.set(t.groupId,[t])}return t.ordered.flatMap(e=>n.get(e.id)??[])}function Vi(e,t,n={}){let r=Bi(e.files,t),i=new Map(r.map((e,t)=>[e.path,t])),a=n.showOverCap?[...e.findings,...e.overCapFindings]:e.findings,o=e=>e.anchor.kind===`file`?0:e.anchor.line;return{files:r,findings:a.filter(e=>i.has(e.anchor.file)).map((e,t)=>({f:e,i:t})).sort((e,t)=>i.get(e.f.anchor.file)-i.get(t.f.anchor.file)||o(e.f)-o(t.f)||P.indexOf(e.f.severity)-P.indexOf(t.f.severity)||e.i-t.i).map(({f:e})=>e),stops:[...e.stops]}}function Hi(e,t,n){if(!e.length)return;let r=t===void 0?-1:e.indexOf(t);return r===-1?e[0]:e[r+n]}var Ui={j:`nextFile`,k:`prevFile`,n:`nextFinding`,p:`prevFinding`,"]":`nextStop`,"[":`prevStop`,x:`toggleFile`,t:`top`,"?":`help`};function Wi(e){if(!e||typeof e!=`object`)return!1;let t=e;return t.isContentEditable===!0||t.tagName===`INPUT`||t.tagName===`TEXTAREA`||t.tagName===`SELECT`}function Gi(e){return e.ctrlKey||e.metaKey||e.altKey||Wi(e.target)?null:Ui[e.key]??null}function Ki(e,t,n,r,i){let a=e.map(e=>e.id);return t&&a.includes(t)?Hi(a,t,n):i===void 0?n===1?a[0]:void 0:n===1?e.find(e=>r(e)>=i)?.id:e.filter(e=>r(e)<i).at(-1)?.id}function qi(e,t,n){let r=ce(),i=(0,w.useRef)({lists:e,nav:t});i.current={lists:e,nav:t},(0,w.useEffect)(()=>{function e(e){let t=Gi(e),{lists:a,nav:o}=i.current;if(!t||!a||document.querySelector(`dialog[open]`))return;e.preventDefault();let s=r.getState(),c=mt(),l=a.files.map(e=>e.path),u=c?l.indexOf(c.path):void 0,d=e=>l.indexOf(e),f=t.startsWith(`next`)?1:-1;switch(t){case`nextFile`:case`prevFile`:{let e=c?Hi(l,c.path,f):f===1?l[0]:void 0;e&&o.goToFile(e);return}case`nextFinding`:case`prevFinding`:{let e=Ki(a.findings,s.focus.finding,f,e=>d(e.anchor.file),u);e&&o.goToFinding(e);return}case`nextStop`:case`prevStop`:{let e=Ki(a.stops,s.focus.stop,f,()=>0,void 0);e&&o.goToStop(e);return}case`toggleFile`:{let e=c?.path??s.focus.file;if(!e)return;let t=Oe(s,n)?.includes(e)??!1;r.dispatch(ye({runId:n,path:e}));let i=c?.groupId??a.files.find(t=>t.path===e)?.groupId;!t&&i&&dt(i,e,{focus:!0});return}case`top`:o.goToTop();return;case`help`:r.dispatch(pn(!0));return}}return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[r,n])}async function Ji(e){if(typeof window>`u`||!window.isSecureContext||!navigator.clipboard)return!1;try{return await navigator.clipboard.writeText(e),!0}catch{return!1}}function Yi(e,t,n={findings:[],stops:[]}){let r=new Map(e.map(e=>[e.id,e])),i=new Map(t.map(e=>[e.path,e])),a=[],o=new Map;for(let t of e){let n=t.parentId===void 0?void 0:r.get(t.parentId);if(n){let e=o.get(n.id);e||(e={chapter:n,units:[]},o.set(n.id,e),a.push(e)),e.units.push(t)}else if($i(t,e)){if(!o.has(t.id)){let e={chapter:t,units:[]};o.set(t.id,e),a.push(e)}}else{let e=a.at(-1);e&&e.chapter===null?e.units.push(t):a.push({chapter:null,units:[t]})}}let s=new Map,c=e=>{let t={files:0,additions:0,deletions:0,binary:0,critical:e.critical};for(let n of e.files){let e=i.get(n);t.files+=1,t.additions+=e?.additions??0,t.deletions+=e?.deletions??0,e?.isBinary&&(t.binary+=1)}return t};for(let{chapter:e,units:t}of a){let n=e?c(e):{files:0,additions:0,deletions:0,binary:0,critical:!1};for(let e of t){let t=c(e);s.set(e.id,t),n.files+=t.files,n.additions+=t.additions,n.deletions+=t.deletions,n.binary+=t.binary,n.critical||=t.critical}e&&s.set(e.id,n)}let l=Qi(n);for(let{chapter:e,units:t}of a){for(let e of t)Xi(s.get(e.id),l([e]));e&&Xi(s.get(e.id),l([e,...t]))}return{chapters:a,stats:s,byId:r,ordered:a.flatMap(({chapter:e,units:t})=>e?[e,...t]:t)}}function Xi(e,t){e?.critical&&t&&(e.criticalReason=t)}var Zi=[`blocker`,`should-fix`];function Qi({findings:e,stops:t}){let n=new Map(e.map(e=>[e.id,e.severity])),r=new Set(t.filter(e=>e.importance===`critical`).map(e=>e.id));return e=>{let t=new Set(e.flatMap(e=>e.findingIds)),i=new Set(e.flatMap(e=>e.stopIds)),a=Zi.map(e=>({sev:e,n:[...t].filter(t=>n.get(t)===e).length})).filter(e=>e.n>0),o=[];if(a.length){let e=a.reduce((e,t)=>e+t.n,0);o.push(`${a.map(e=>`${e.n} ${e.sev}`).join(`, `)} ${e===1?`finding`:`findings`}`)}let s=[...i].filter(e=>r.has(e)).length;return s&&o.push(M(s,`critical walkthrough stop`)),o.length?o.join(`; `):void 0}}function $i(e,t){return e.parentId===void 0?e.files.length===0||t.some(t=>t.parentId===e.id):!1}var ea=new Map;function ta(){let e=history.state;if(e&&typeof e==`object`&&`__TSR_key`in e&&typeof e.__TSR_key==`string`)return e.__TSR_key}function na(){let e=ta();return e!==void 0&&ea.has(e)}function ra(){(0,w.useEffect)(()=>{let e=()=>{let e=ta();e&&ea.set(e,window.scrollY)},t=()=>{let e=ta(),t=e?ea.get(e):void 0;if(t===void 0)return;let n=0,r=()=>{window.scrollTo({top:t,behavior:`instant`}),++n<4&&requestAnimationFrame(r)};requestAnimationFrame(r)};return window.addEventListener(`scroll`,e,{passive:!0}),window.addEventListener(`popstate`,t),()=>{window.removeEventListener(`scroll`,e),window.removeEventListener(`popstate`,t)}},[])}var Q={page:`_page_iew0b_1`,body:`_body_iew0b_5`,aside:`_aside_iew0b_10`,asideInner:`_asideInner_iew0b_16`,main:`_main_iew0b_24`,chapter:`_chapter_iew0b_34`,end:`_end_iew0b_40`,skeleton:`_skeleton_iew0b_49`,skeletonHeader:`_skeletonHeader_iew0b_55`,skeletonBody:`_skeletonBody_iew0b_60`,skeletonAside:`_skeletonAside_iew0b_65`,skeletonMain:`_skeletonMain_iew0b_70`,pulse:`_pulse_iew0b_1`},ia=g(`/runs/$runId`),aa=[];function oa(e,t){let{finding:n,stop:r,file:i,...a}=e;return{...a,...t}}function sa(){let[e,t]=(0,w.useState)(null);return(0,w.useEffect)(()=>{let e=new i;return e.setup(document),t(e),()=>{e.cleanUp(),t(null)}},[]),e}function ca(){let{runId:e}=ia.useParams(),{file:t,finding:n,stop:r}=ia.useSearch(),i=ia.useNavigate(),a=ia.useLoaderData(),o=E(),{data:s}=Fr(e),{data:l}=Ir(e),u=l===void 0?a.files:Be(e,l),d=sa(),f=vt(_t),p=D(De),m=D(t=>Oe(t,e))??aa,h=D(t=>ke(t,e))??aa,g=(0,w.useMemo)(()=>new Set(m),[m]),_=(0,w.useMemo)(()=>new Set(h),[h]),v=D(yn),y=D(hn),b=D(gn),ee=D(_n),[te,ne]=(0,w.useState)(null);(0,w.useEffect)(()=>{o(sn(e))},[o,e]);let x=(0,w.useMemo)(()=>s?Yi(s.groups,s.files,s):null,[s]),re=(0,w.useMemo)(()=>{let e=new Map;for(let t of s?.files??[]){let n=e.get(t.groupId);n?n.push(t):e.set(t.groupId,[t])}return e},[s]),S=(0,w.useMemo)(()=>{let e=[...s?.findings??[],...s?.overCapFindings??[]];return{files:new Map((s?.files??[]).map(e=>[e.path,e])),findings:new Map(e.map(e=>[e.id,e])),overCap:new Set((s?.overCapFindings??[]).map(e=>e.id)),stops:new Map((s?.stops??[]).map(e=>[e.id,e]))}},[s]),ie=(0,w.useMemo)(()=>s?$t(s,{showOverCap:v}):new Map,[s,v]),ae=(0,w.useMemo)(()=>s&&x?Vi(s,x,{showOverCap:v}):null,[s,x,v]),oe=ot(d!==null,x),se=(0,w.useMemo)(()=>new Set(oe.groups),[oe.groups]),C=(0,w.useRef)({folded:_,showOverCap:v});C.current={folded:_,showOverCap:v};let T=(0,w.useCallback)((t,n)=>{let r=S.files.get(t);if(!r)return;o(be({runId:e,path:t}));let i=x?.byId.get(r.groupId)?.parentId;i&&C.current.folded.has(i)&&o(xe({runId:e,groupId:i})),n?pt(r.groupId,t,n):dt(r.groupId,t,{focus:!0})},[o,S,e,x]),ce=(0,w.useMemo)(()=>{let t=(e,t)=>{t?.fromUrl||i({search:t=>oa(t,e),replace:t?.scroll===!1,resetScroll:!1})};return{runId:e,stops:s?.stops??[],goToTop(){o(ln({id:null})),o(un({id:null})),i({search:e=>oa(e,null)}).then(()=>document.getElementById(ki)?.focus({preventScroll:!0}))},goToFile(e){o(cn(e)),T(e,null)},goToFinding(e,n){let r=S.findings.get(e);r&&(S.overCap.has(e)&&!C.current.showOverCap&&o(fn()),o(ln({id:e,file:r.anchor.file})),t({finding:e},n),n?.scroll!==!1&&T(r.anchor.file,`finding-${e}`))},goToStop(e,n=0,r){let i=S.stops.get(e);if(!i)return;let a=i.locations[n];o(un({id:e,location:n,...a?{file:a.file}:{}})),t({stop:e},n>0?{...r,scroll:!1}:r),a&&r?.scroll!==!1&&T(a.file,`stop-${e}-${n}`)},async copy(e){let t=await Ji(e);return t||ne(e),t}}},[o,S,i,T,s?.stops,e]);(0,w.useEffect)(()=>{if(!t||!s||!d)return;let n=s.files.find(e=>e.path===t);n&&(o(be({runId:e,path:n.path})),dt(n.groupId,n.path))},[t,s,d,o,e]);let le=s!==void 0&&d!==null;ra();let ue=()=>({fromUrl:!0,scroll:!na()});(0,w.useEffect)(()=>{le&&(n&&n!==y?ce.goToFinding(n,ue()):!n&&y&&o(ln({id:null})))},[le,n]),(0,w.useEffect)(()=>{le&&(r&&r!==b?ce.goToStop(r,0,ue()):!r&&b&&o(un({id:null})))},[le,r]),qi(ae,ce,e);let de=(0,w.useMemo)(()=>{if(y){let e=S.findings.get(y);return e?{path:e.anchor.file,range:en(e.anchor)}:null}let e=b?S.stops.get(b)?.locations[ee]:void 0;return e?{path:e.file,range:en(e)}:null},[y,b,S,ee]),fe=de?S.files.get(de.path)?.groupId:void 0,O=e=>fe===e?de:null,pe=(0,w.useMemo)(()=>{let t=s?.files.map(e=>e.path)??[],n=t=>()=>o(ve({runId:e,paths:t}));return[{label:`Expand all files`,run:n([])},{label:`Collapse all files`,run:n(t)},{label:`Collapse skipped files`,run:n(s?.files.filter(e=>e.classification===`skip`).map(e=>e.path)??[])}]},[o,s,e]),me=(0,w.useCallback)(t=>o(xe({runId:e,groupId:t})),[o,e]);if(!s||!x)return(0,k.jsx)(da,{});let he=f&&p;return(0,k.jsx)(rn.Provider,{value:ce,children:(0,k.jsxs)(`div`,{className:Q.page,children:[(0,k.jsx)(ri,{run:s,tree:x,visible:se,collapseActions:pe}),(0,k.jsxs)(`div`,{className:Q.body,children:[he&&(0,k.jsx)(`aside`,{className:Q.aside,children:(0,k.jsx)(`div`,{className:Q.asideInner,children:(0,k.jsx)(mi,{run:s,tree:x,visible:se,folded:_,onToggleFold:me,findings:ae?.findings??ua,overCap:S.overCap})})}),(0,k.jsxs)(`main`,{className:Q.main,children:[(0,k.jsx)(zi,{run:s}),d&&(0,k.jsx)(c.Provider,{value:d,children:x.chapters.map(({chapter:t,units:n},r)=>{let i=t!==null&&_.has(t.id),a=t?re.get(t.id)??[]:[];return(0,k.jsxs)(`div`,{className:Q.chapter,children:[t&&(a.length>0?(0,k.jsx)(sr,{runId:e,group:t,parent:void 0,stats:x.stats.get(t.id),files:a,diffs:u,collapsed:g,activePath:oe.files[t.id],annotations:ie,selection:O(t.id)}):(0,k.jsx)(or,{chapter:t,stats:x.stats.get(t.id),unitCount:n.length,folded:i,onToggleFold:()=>me(t.id)})),!i&&n.map(n=>(0,k.jsx)(sr,{runId:e,group:n,parent:t??void 0,stats:x.stats.get(n.id),files:re.get(n.id)??la,diffs:u,collapsed:g,activePath:oe.files[n.id],annotations:ie,selection:O(n.id)},n.id))]},t?.id??`loose-${r}`)})}),(0,k.jsx)(`p`,{className:Q.end,children:`End of diff`})]})]}),(0,k.jsx)(ai,{}),te!==null&&(0,k.jsx)(Ve,{text:te,onClose:()=>ne(null)})]})})}var la=[],ua=[];function da(){return(0,k.jsxs)(`div`,{className:Q.skeleton,"aria-busy":`true`,children:[(0,k.jsx)(`div`,{className:Q.skeletonHeader}),(0,k.jsxs)(`div`,{className:Q.skeletonBody,children:[(0,k.jsx)(`div`,{className:Q.skeletonAside}),(0,k.jsxs)(`div`,{className:Q.skeletonMain,children:[(0,k.jsx)(`div`,{}),(0,k.jsx)(`div`,{}),(0,k.jsx)(`div`,{})]})]})]})}var fa=C({"file?":`string`,"finding?":`string`,"stop?":`string`}),pa=e=>typeof e==`object`&&!!e&&`status`in e&&e.status===404,ma=d({getParentRoute:()=>Le,path:`/runs/$runId`,validateSearch:fa,loader:async({context:{store:e},params:{runId:t}})=>{let n=e.dispatch(W.endpoints.getRun.initiate(t)),r=e.dispatch(W.endpoints.getRunPatch.initiate(t));try{let[i,a]=await Promise.all([n.unwrap(),r.unwrap()]);if(Oe(e.getState(),t)===void 0){let n=i.files.filter(e=>e.classification===`skip`).map(e=>e.path);e.dispatch(ve({runId:t,paths:n}))}return{files:Be(t,a)}}catch(e){throw pa(e)?b():e}finally{n.unsubscribe(),r.unsubscribe()}},pendingComponent:da,errorComponent:Fe,component:ca}),ha=(0,w.forwardRef)(({title:e,titleId:t,...n},r)=>(0,k.jsxs)(`svg`,{viewBox:`0 0 256 256`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,k.jsx)(`title`,{id:t,children:e}):null,(0,k.jsx)(`path`,{fill:`currentColor`,d:`M216 48h-40v-8a24 24 0 0 0-24-24h-48a24 24 0 0 0-24 24v8H40a8 8 0 0 0 0 16h8v144a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16V64h8a8 8 0 0 0 0-16M96 40a8 8 0 0 1 8-8h48a8 8 0 0 1 8 8v8H96Zm96 168H64V64h128Zm-80-104v64a8 8 0 0 1-16 0v-64a8 8 0 0 1 16 0m48 0v64a8 8 0 0 1-16 0v-64a8 8 0 0 1 16 0`})]})),$={page:`_page_oa1c1_1`,header:`_header_oa1c1_10`,muted:`_muted_oa1c1_21`,error:`_error_oa1c1_27`,table:`_table_oa1c1_31`,row:`_row_oa1c1_52`,target:`_target_oa1c1_56`,link:`_link_oa1c1_62`,repo:`_repo_oa1c1_72`,invalid:`_invalid_oa1c1_78`,count:`_count_oa1c1_86`,kind:`_kind_oa1c1_111`,filters:`_filters_oa1c1_123`,filter:`_filter_oa1c1_123`,delete:`_delete_oa1c1_146`},ga=[{key:`blocker`,label:`Blockers`},{key:`should-fix`,label:`Should fix`},{key:`nice-to-have`,label:`Nice to have`},{key:`question`,label:`Questions`}],_a=[{key:`all`,label:`All`},{key:`review`,label:`Reviews`},{key:`diff`,label:`Diffs`}];function va({run:e}){let[t,{isLoading:n}]=Rr(),r=We(e.target),i=e.kind??`review`;return(0,k.jsxs)(`tr`,{className:$.row,children:[(0,k.jsx)(`td`,{children:(0,k.jsx)(Xr,{status:e.status})}),(0,k.jsx)(`td`,{children:(0,k.jsx)(`span`,{className:$.kind,"data-kind":i,children:i===`diff`?`Diff`:`Review`})}),(0,k.jsx)(`td`,{children:(0,k.jsxs)(`div`,{className:$.target,children:[e.invalid?(0,k.jsxs)(`span`,{title:e.invalid,children:[r,` `,(0,k.jsx)(`span`,{className:$.invalid,children:`invalid`})]}):(0,k.jsx)(v,{to:`/runs/$runId`,params:{runId:e.id},className:$.link,children:r}),(0,k.jsx)(`span`,{className:$.repo,children:e.repo.slug??e.repo.root})]})}),(0,k.jsx)(`td`,{title:Je(e.createdAt),className:$.muted,children:Ye(e.createdAt)}),ga.map(({key:t})=>i===`diff`?(0,k.jsx)(`td`,{className:$.count,"data-zero":!0},t):(0,k.jsx)(`td`,{className:$.count,"data-severity":t,"data-zero":e.findingCounts[t]===0,children:e.findingCounts[t]},t)),(0,k.jsx)(`td`,{className:$.count,children:i===`diff`&&e.costUsd===0?``:Ge(e.costUsd)}),(0,k.jsx)(`td`,{children:e.status!==`running`&&(0,k.jsx)(`button`,{type:`button`,className:$.delete,onClick:()=>{window.confirm(`Delete run ${e.id}?`)&&t(e.id)},disabled:n,title:`Delete run`,children:(0,k.jsx)(ha,{"aria-label":`Delete run`})})})]})}function ya(){let{data:e,error:t,isFetching:n}=Pr(),[r,i]=(0,w.useState)(`all`),a=r===`all`?e:e?.filter(e=>(e.kind??`review`)===r),o=e?.some(e=>e.kind===`diff`)??!1;return(0,k.jsxs)(`main`,{className:$.page,children:[(0,k.jsxs)(`header`,{className:$.header,children:[(0,k.jsx)(`h1`,{children:`DiffLoupe`}),(0,k.jsx)(`span`,{className:$.muted,children:n?`Refreshing…`:a?`${a.length} runs`:``}),o&&(0,k.jsx)(`div`,{className:$.filters,role:`group`,"aria-label":`Show`,children:_a.map(({key:e,label:t})=>(0,k.jsx)(`button`,{type:`button`,className:$.filter,"aria-pressed":r===e,onClick:()=>i(e),children:t},e))})]}),t?(0,k.jsx)(`p`,{className:$.error,children:Ie(t)}):e&&e.length===0?(0,k.jsxs)(`p`,{className:$.muted,children:[`No runs yet. Start one with `,(0,k.jsx)(`code`,{children:`diffloupe diff`}),` or `,(0,k.jsx)(`code`,{children:`diffloupe review`}),`.`]}):(0,k.jsxs)(`table`,{className:$.table,children:[(0,k.jsx)(`thead`,{children:(0,k.jsxs)(`tr`,{children:[(0,k.jsx)(`th`,{children:`Status`}),(0,k.jsx)(`th`,{children:`Kind`}),(0,k.jsx)(`th`,{children:`Target`}),(0,k.jsx)(`th`,{children:`Created`}),ga.map(({key:e,label:t})=>(0,k.jsx)(`th`,{className:$.count,"data-severity":e,children:t},e)),(0,k.jsx)(`th`,{className:$.count,children:`Cost`}),(0,k.jsx)(`th`,{"aria-label":`Actions`})]})}),(0,k.jsx)(`tbody`,{children:a?.map(e=>(0,k.jsx)(va,{run:e},e.id))})]})]})}var ba=d({getParentRoute:()=>Le,path:`/`,loader:async({context:{store:e}})=>{let t=e.dispatch(W.endpoints.listRuns.initiate());try{await t.unwrap()}finally{t.unsubscribe()}},component:ya}),xa=Le.addChildren([ba,ma]);function Sa(e){return h({routeTree:xa,context:{store:e},defaultPreload:`intent`,defaultPreloadStaleTime:0,scrollRestoration:!0})}var Ca=ne();function wa(){return ie({reducer:{[W.reducerPath]:W.reducer,[O.reducerPath]:O.reducer,[on.reducerPath]:on.reducer},middleware:e=>e().prepend(Ca.middleware).concat(W.middleware)})}Ca.startListening.withTypes()({matcher:S(pe,me,he,ge,_e),effect:(e,{getState:t})=>{localStorage.setItem(le,JSON.stringify(Se(t())))}});var Ta=document.getElementById(`root`);if(!Ta)throw Error(`Root element not found`);var Ea=wa(),Da=Sa(Ea),Oa={workerFactory:()=>new u,poolSize:Math.min(4,Math.max(1,navigator.hardwareConcurrency-1))};(0,T.createRoot)(Ta).render((0,k.jsx)(w.StrictMode,{children:(0,k.jsx)(l,{poolOptions:Oa,highlighterOptions:{},children:(0,k.jsx)(ae,{store:Ea,children:(0,k.jsx)(y,{router:Da})})})}));
@@ -1 +0,0 @@
1
- :root{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light dark;--bg:var(--lightningcss-light,#fff)var(--lightningcss-dark,#0d0d0f);--bg-raised:var(--lightningcss-light,#f7f7f8)var(--lightningcss-dark,#16161a);--bg-code:var(--lightningcss-light,#f2f2f4)var(--lightningcss-dark,#1c1c21);--bg-hover:#8881;--bg-active:#8882;--fg:var(--lightningcss-light,#1c1c1f)var(--lightningcss-dark,#e6e6e9);--fg-fade:var(--lightningcss-light,#1c1c1fb3)var(--lightningcss-dark,#e6e6e9b3);--fg-mute:var(--lightningcss-light,#1c1c1f80)var(--lightningcss-dark,#e6e6e980);--border:var(--lightningcss-light,#e2e2e6)var(--lightningcss-dark,#2a2a30);--accent:var(--lightningcss-light,#d9552a)var(--lightningcss-dark,#f57a4f);--teal:var(--lightningcss-light,#1f8f72)var(--lightningcss-dark,#5fc2a4);--magenta:var(--lightningcss-light,#9c3a95)var(--lightningcss-dark,#c65fbf);--success:var(--lightningcss-light,#1a7f37)var(--lightningcss-dark,#4ac26b);--error:var(--lightningcss-light,#cf222e)var(--lightningcss-dark,#f47067);--warning:var(--lightningcss-light,#9a6700)var(--lightningcss-dark,#d4a72c);--info:var(--lightningcss-light,#0969da)var(--lightningcss-dark,#6cb6ff);--critical:var(--lightningcss-light,#d97706)var(--lightningcss-dark,#fbbf24);--font-sans:"Inter", system-ui, -apple-system, "Segoe UI", sans-serif;--font-mono:ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;--radius:6px;--radius-lg:10px;--z-file-header:10;--z-nav:30;--z-dropdown:40;--z-tooltip:45;--z-toast:50;--z-drawer-backdrop:80;--z-drawer:90;--z-modal-backdrop:100;--z-modal:101;--z-modal-top:102;--header-height:0px}@media (prefers-color-scheme:dark){:root{--lightningcss-light: ;--lightningcss-dark:initial}}:root[data-theme=light]{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}:root[data-theme=dark]{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}*,:before,:after{box-sizing:border-box}body{font-family:var(--font-sans);background:var(--bg);color:var(--fg);-webkit-font-smoothing:antialiased;margin:0;font-size:14px;line-height:1.5}h1,h2,h3,p{margin:0}a{color:inherit}button{font:inherit;color:inherit;cursor:pointer;background:0 0;border:none;padding:0}code{font-family:var(--font-mono)}:focus-visible{outline:2px solid var(--accent);outline-offset:1px}._message_1k4pr_1{flex-direction:column;gap:.75rem;max-width:40rem;margin:4rem auto;padding:0 1rem;display:flex}._message_1k4pr_1 h1{font-size:1.25rem;font-weight:600}._error_1k4pr_15{border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-code);font-family:var(--font-mono);white-space:pre-wrap;margin:0;padding:.75rem;font-size:12px}._actions_1k4pr_26{align-items:center;gap:1rem;display:flex}._button_1k4pr_32{border:1px solid var(--border);border-radius:var(--radius);padding:.25rem .75rem}._button_1k4pr_32:hover{background:var(--bg-hover)}._dialog_14w5c_1{z-index:var(--z-modal);border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--bg);width:min(36rem,100vw - 2rem);color:var(--fg);padding:1rem 1.25rem;font-size:13px}._dialog_14w5c_1::backdrop{background:#0006}._header_14w5c_16{margin-bottom:.5rem}._title_14w5c_20{margin:0;font-size:15px;font-weight:600}._hint_14w5c_26{color:var(--fg-fade);margin:0 0 .5rem}._text_14w5c_31{border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-code);width:100%;color:var(--fg);font-family:var(--font-mono);resize:vertical;padding:.5rem;font-size:12px}._keys_14w5c_43{flex-direction:column;gap:.35rem;margin:0;display:flex}._key_14w5c_43{grid-template-columns:7rem 1fr;align-items:baseline;display:grid}._key_14w5c_43 dd{color:var(--fg-fade);margin:0}._key_14w5c_43 kbd{border:1px solid var(--border);background:var(--bg-raised);font-family:var(--font-mono);border-radius:4px;padding:0 .35rem;font-size:12px}._actions_14w5c_70{justify-content:flex-end;margin-top:.75rem;display:flex}._button_14w5c_76{border:1px solid var(--border);border-radius:var(--radius);padding:.25rem .75rem}._button_14w5c_76:hover{background:var(--bg-hover)}._stats_1audl_1{font-variant-numeric:tabular-nums;white-space:nowrap;gap:.25rem;font-size:12px;display:inline-flex}._add_1audl_9{color:var(--success)}._del_1audl_13{color:var(--error)}._binary_1audl_17{color:var(--fg-fade);white-space:nowrap;font-size:12px}._status_11pfu_1{--c:var(--warning);width:1rem;height:1rem;font-family:var(--font-mono);color:var(--c);background:color-mix(in srgb, var(--c) 12%, transparent);border-radius:3px;flex:none;justify-content:center;align-items:center;font-size:11px;font-weight:600;display:inline-flex}._status_11pfu_1[data-status=added]{--c:var(--success)}._status_11pfu_1[data-status=removed]{--c:var(--error)}._status_11pfu_1[data-status=renamed],._status_11pfu_1[data-status=copied]{--c:var(--info)}._button_12iod_1{border-radius:var(--radius);color:var(--fg-fade);flex:none;align-items:center;gap:.25rem;padding:.1rem .4rem;font-size:12px;display:inline-flex}._button_12iod_1:hover{background:var(--bg-hover);color:var(--fg)}._markdown_c7bef_1{overflow-wrap:anywhere;flex-direction:column;gap:.5em;display:flex}._markdown_c7bef_1 ul,._markdown_c7bef_1 ol{margin:0;padding-left:1.25em}._markdown_c7bef_1 li+li{margin-top:.15em}._markdown_c7bef_1 code{background:var(--bg-code);border-radius:4px;padding:.05em .3em;font-size:.9em}._markdown_c7bef_1 pre{border-radius:var(--radius);background:var(--bg-code);margin:0;padding:.5em .75em;overflow-x:auto}._markdown_c7bef_1 pre code{background:0 0;padding:0}._markdown_c7bef_1 a{color:var(--info)}._heading_c7bef_42{font-weight:600}._card_e809x_1{--sev:var(--info);border:1px solid var(--border);border-left:4px solid var(--sev);border-radius:var(--radius);background:var(--bg-raised);font-family:var(--font-sans);white-space:normal;color:var(--fg);margin:.35rem .5rem;padding:.5rem .75rem .6rem;font-size:13px;line-height:1.5}._card_e809x_1[data-severity=blocker]{--sev:var(--error)}._card_e809x_1[data-severity=should-fix]{--sev:var(--warning)}._card_e809x_1[data-severity=nice-to-have]{--sev:var(--info)}._card_e809x_1[data-severity=question]{--sev:var(--magenta)}._card_e809x_1[data-focused=true]{border-color:var(--sev);box-shadow:0 0 0 1px var(--sev)}._card_e809x_1:focus{outline:none}._card_e809x_1:focus-visible{outline:2px solid var(--accent)}._head_e809x_45{align-items:baseline;gap:.5rem;display:flex}._severity_e809x_51{color:var(--sev);text-transform:uppercase;letter-spacing:.03em;flex:none;font-size:11px;font-weight:600}._title_e809x_60{flex:auto;min-width:0;margin:0;font-size:13px;font-weight:600}._meta_e809x_68{color:var(--fg-mute);flex-wrap:wrap;gap:.25rem .75rem;font-size:12px;display:flex}._badge_e809x_76{border:1px solid var(--border);color:var(--fg-fade);border-radius:999px;padding:0 .35rem;text-decoration:none}a._badge_e809x_76:hover{color:var(--fg);text-decoration:underline}._note_e809x_89{color:var(--fg-fade);margin-top:.25rem;font-size:12px;font-style:italic}._body_e809x_96{margin-top:.35rem}._details_e809x_100{flex-direction:column;gap:.5rem;margin-top:.5rem;display:flex}._details_e809x_100 h4{color:var(--fg-fade);text-transform:uppercase;letter-spacing:.03em;margin:0 0 .15rem;font-size:11px;font-weight:600}._code_e809x_116{border-radius:var(--radius);background:var(--bg-code);margin:.35rem 0 0;padding:.5rem;font-size:12px;overflow-x:auto}._more_e809x_125{color:var(--fg-fade);margin-top:.35rem;font-size:12px}._more_e809x_125:hover{color:var(--fg);text-decoration:underline}._card_se589_1{border:1px dashed var(--teal);border-radius:var(--radius);font-family:var(--font-sans);white-space:normal;color:var(--fg);background:var(--lightningcss-light,#1f8f720d)var(--lightningcss-dark,#5fc2a412);margin:.35rem .5rem;padding:.5rem .75rem;font-size:13px;line-height:1.5}._card_se589_1[data-importance=critical]{border-color:var(--critical)}._card_se589_1[data-focused=true]{box-shadow:0 0 0 1px var(--teal);border-style:solid}._card_se589_1:focus{outline:none}._card_se589_1:focus-visible{outline:2px solid var(--teal);outline-offset:1px}._head_se589_32{align-items:baseline;gap:.5rem;display:flex}._icon_se589_38{color:var(--teal);flex:none;align-self:center}._kicker_se589_44{color:var(--teal);text-transform:uppercase;letter-spacing:.03em;flex:none;font-size:11px;font-weight:600}._title_se589_53{flex:auto;min-width:0;margin:0;font-size:13px;font-weight:600}._importance_se589_61{color:var(--fg-mute);flex:none;font-size:12px}._card_se589_1[data-importance=critical] ._importance_se589_61{color:var(--critical)}._label_se589_71{color:var(--fg-fade);font-size:12px}._note_se589_76{color:var(--fg-fade);font-size:12px;font-style:italic}._body_se589_82{margin-top:.25rem}._nav_se589_86{flex-wrap:wrap;justify-content:flex-end;gap:.5rem;margin-top:.35rem;display:flex}._nav_se589_86 button{border-radius:var(--radius);color:var(--fg-fade);align-items:center;gap:.25rem;padding:.1rem .4rem;font-size:12px;display:inline-flex}._nav_se589_86 button:hover:not(:disabled){background:var(--bg-hover);color:var(--fg)}._nav_se589_86 button:disabled{cursor:default;opacity:.4}._frame_2p01a_1{border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--bg);overflow:clip}._caret_2p01a_8{color:var(--fg-fade);border-radius:4px;padding:.2rem;display:inline-flex}._caret_2p01a_8:hover{background:var(--bg-hover);color:var(--fg)}._plainHeader_2p01a_20{align-items:center;gap:.5rem;min-height:2.5rem;padding:0 .75rem 0 .5rem;font-size:13px;display:flex}._path_2p01a_29{text-overflow:ellipsis;white-space:nowrap;text-align:left;direction:rtl;flex:auto;min-width:0;overflow:hidden}._meta_2p01a_39{align-items:center;gap:.5rem;display:inline-flex}._tag_2p01a_45{color:var(--fg-fade);font-size:12px}._count_2p01a_50{background:var(--bg-active);color:var(--fg-fade);white-space:nowrap;border-radius:999px;padding:0 .4rem;font-size:11px}._cards_2p01a_59{border-top:1px solid var(--border);padding:.25rem 0 .4rem}._placeholder_2p01a_64{border-top:1px solid var(--border);color:var(--fg-fade);padding:1rem;font-size:13px}._tree_syby3_1{min-height:0;margin:0;padding:0;font-size:13px;list-style:none;overflow-y:auto}._row_syby3_10{border-radius:4px;align-items:center;height:24px;padding-right:.25rem;display:flex}._row_syby3_10:hover{background:var(--bg-hover)}._row_syby3_10[data-active=true]{background:var(--bg-active)}._folder_syby3_26{min-width:0;color:var(--fg-fade);align-items:center;gap:.35rem;display:flex}._file_syby3_34{text-align:left;align-items:center;gap:.4rem;width:100%;min-width:0;height:100%;display:flex}._name_syby3_44{text-overflow:ellipsis;white-space:nowrap;flex:auto;min-width:0;overflow:hidden}._tree_syby3_1[data-layout=list] ._name_syby3_44{direction:rtl}._missing_syby3_56{color:var(--fg-mute);font-style:italic}._notes_syby3_61{border-left:1px solid var(--border);margin:0 0 .2rem;padding:0 0 0 .35rem;list-style:none}._note_syby3_61{--dot:var(--fg-mute);width:100%;height:22px;color:var(--fg-fade);text-align:left;border-radius:4px;align-items:center;gap:.4rem;padding:0 .25rem 0 .3rem;font-size:12px;display:flex}._note_syby3_61:hover{background:var(--bg-hover);color:var(--fg)}._note_syby3_61[aria-current=true]{background:var(--bg-active);color:var(--fg)}._note_syby3_61[data-severity=blocker]{--dot:var(--error)}._note_syby3_61[data-severity=should-fix]{--dot:var(--warning)}._note_syby3_61[data-severity=question]{--dot:var(--info)}._note_syby3_61[data-over-cap=true] ._noteTitle_syby3_104{font-style:italic}._note_syby3_61[data-importance=context] ._noteTitle_syby3_104{color:var(--fg-mute)}._dot_syby3_112{background:var(--dot);border-radius:50%;flex:none;width:.55rem;height:.55rem;margin:0 .1rem}._signpost_syby3_121{color:var(--teal);flex:none;font-size:.85rem}._note_syby3_61[data-importance=critical] ._signpost_syby3_121{color:var(--critical)}._noteTitle_syby3_104{text-overflow:ellipsis;white-space:nowrap;flex:auto;min-width:0;overflow:hidden}._stopNumber_syby3_139{color:var(--fg-mute);font-variant-numeric:tabular-nums;flex:none;margin-left:-.15rem}._note_syby3_61[data-importance=critical] ._stopNumber_syby3_139{color:var(--critical)}._line_syby3_150{color:var(--fg-mute);font-family:var(--font-mono);flex:none;font-size:11px}._line_syby3_150[data-side=deletions]{color:var(--error)}._icon_144da_1{flex:none}._icon_144da_1[data-icon=bug]{color:var(--error)}._icon_144da_1[data-icon=wrench]{color:var(--accent)}._icon_144da_1[data-icon=path]{color:var(--info)}._icon_144da_1[data-icon=flask]{color:var(--teal)}._icon_144da_1[data-icon=doc]{color:var(--magenta)}._icon_144da_1[data-icon=gear],._icon_144da_1[data-icon=missing]{color:var(--fg-fade)}._critical_144da_30{color:var(--critical);flex:none;display:inline-flex}._panel_oufx1_1{flex-direction:column;gap:.75rem;min-width:0;display:flex}@media (width>=1024px){._panel_oufx1_1{top:calc(var(--header-height) + 10px);max-height:calc(100vh - var(--header-height) - 20px);align-self:start;position:sticky}}._head_oufx1_17{flex-direction:column;gap:.25rem;display:flex}._crumb_oufx1_23{color:var(--fg-fade);align-self:flex-start;font-size:12px}._crumb_oufx1_23:hover{color:var(--fg);text-decoration:underline}._titleRow_oufx1_34{align-items:center;gap:.35rem;display:flex}._caret_oufx1_40{color:var(--fg-fade);border-radius:4px;padding:.15rem;display:inline-flex}._caret_oufx1_40:hover{background:var(--bg-hover);color:var(--fg)}._icon_oufx1_52{font-size:1.1rem}._title_oufx1_34{min-width:0;font-size:1.15rem;font-weight:500;line-height:1.3}._stats_oufx1_63{color:var(--fg-fade);align-items:center;gap:.6rem;padding-left:1.6rem;font-size:12px;display:flex}._summary_oufx1_72{border-bottom:1px solid var(--border);max-height:40vh;color:var(--fg-fade);flex:none;padding:0 0 .5rem .5rem;font-size:13px;overflow-y:auto}._chapter_wsoz0_1,._unit_wsoz0_2{scroll-margin-top:var(--header-height)}._chapter_wsoz0_1{border-bottom:1px solid var(--border);flex-direction:column;gap:.5rem;padding:1rem .75rem .75rem;display:flex}._chapterTitle_wsoz0_14{text-align:left;align-items:center;gap:.5rem;display:flex}._chapterTitle_wsoz0_14 h2{font-size:1.5rem;font-weight:500;line-height:1.25}._caret_wsoz0_27{color:var(--fg-fade);flex:none}._chapterIcon_wsoz0_32{font-size:1.35rem}._chapterStats_wsoz0_36{color:var(--fg-fade);align-items:center;gap:.75rem;padding-left:1.6rem;font-size:12px;display:flex}._chapterSummary_wsoz0_45{max-width:50rem;color:var(--fg-fade);padding:0 .5rem 0 1.6rem;font-size:14px}._unit_wsoz0_2{flex-direction:column;gap:1rem;padding:.75rem;display:flex}@media (width>=1024px){._unit_wsoz0_2{grid-template-columns:minmax(16rem,1fr) 4fr;align-items:start;display:grid}}._files_wsoz0_67{flex-direction:column;gap:.5rem;min-width:0;display:flex}._file_wsoz0_67{min-width:0}._marker_wsoz0_78{scroll-margin-top:var(--header-height)}._empty_wsoz0_82{color:var(--fg-fade);font-size:13px;font-style:italic}._wrap_18f2t_1{position:relative}._trigger_18f2t_5{border-radius:var(--radius);height:1.9rem;color:var(--fg-fade);align-items:center;gap:.1rem;padding:0 .4rem;font-size:1rem;display:inline-flex}._trigger_18f2t_5:hover,._trigger_18f2t_5[aria-expanded=true]{background:var(--bg-hover);color:var(--fg)}._small_18f2t_22{font-size:.65rem}._menu_18f2t_26{z-index:var(--z-dropdown);border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-raised);flex-direction:column;min-width:12rem;padding:.25rem;display:flex;position:absolute;top:calc(100% + 4px);right:0;box-shadow:0 6px 20px #00000026}._item_18f2t_41{text-align:left;white-space:nowrap;border-radius:4px;padding:.35rem .6rem;font-size:13px}._item_18f2t_41:hover{background:var(--bg-hover)}._strip_1qqee_1{border-radius:var(--radius);background:color-mix(in srgb, var(--info) 10%, transparent);align-items:center;gap:1rem;min-width:0;padding:.35rem .75rem;font-size:12px;display:flex}._stage_1qqee_12{white-space:nowrap;font-weight:600}._slices_1qqee_17{white-space:nowrap;font-variant-numeric:tabular-nums;align-items:center;gap:.5rem;display:inline-flex}._bar_1qqee_25{background:var(--bg-active);border-radius:3px;width:8rem;height:6px;position:relative;overflow:hidden}._fill_1qqee_34{background:var(--info);transition:width .3s;position:absolute;inset:0 auto 0 0}._failed_1qqee_41{color:var(--error)}._active_1qqee_45,._message_1qqee_46{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--fg-fade);overflow:hidden}._active_1qqee_45{flex:auto}._message_1qqee_46{flex:0 auto}._cost_1qqee_62{font-variant-numeric:tabular-nums;white-space:nowrap;margin-left:auto}._badge_19nmu_1{--c:var(--fg-fade);color:var(--c);white-space:nowrap;align-items:center;gap:.25rem;font-size:12px;display:inline-flex}._badge_19nmu_1[data-status=running]{--c:var(--info)}._badge_19nmu_1[data-status=complete]{--c:var(--success)}._badge_19nmu_1[data-status=failed]{--c:var(--error)}._icon_19nmu_23{flex:none;font-size:1.15em}._badge_19nmu_1[data-status=running] ._icon_19nmu_23{animation:1s linear infinite _spin_19nmu_1}@keyframes _spin_19nmu_1{to{transform:rotate(360deg)}}._header_hages_1{z-index:var(--z-nav);background:var(--bg);border-bottom:1px solid #0000;padding:.5rem 1rem;transition:transform .2s,box-shadow .2s;position:sticky;top:0}._header_hages_1[data-scrolled=true]{border-bottom-color:var(--border);box-shadow:0 1px 3px #0000000f}._header_hages_1[data-hidden=true]{transform:translateY(-100%)}._inner_hages_22{flex-direction:column;gap:.4rem;max-width:125rem;margin:0 auto;display:flex}._row_hages_30{align-items:center;gap:.5rem;display:flex}._home_hages_36{border-radius:var(--radius);color:var(--fg-fade);padding:.25rem;font-size:1.1rem;display:inline-flex}._home_hages_36:hover{background:var(--bg-hover);color:var(--fg)}._title_hages_49{text-overflow:ellipsis;white-space:nowrap;flex:auto;min-width:0;font-size:1.1rem;font-weight:600;overflow:hidden}._title_hages_49 a{text-decoration:none}._title_hages_49 a:hover{text-decoration:underline}._controls_hages_67{flex:none;align-items:center;gap:.15rem;display:flex}._toggle_hages_74{border-radius:var(--radius);width:1.9rem;height:1.9rem;color:var(--fg-fade);justify-content:center;align-items:center;font-size:1rem;display:inline-flex}._toggle_hages_74:hover{background:var(--bg-hover);color:var(--fg)}._toggle_hages_74[aria-pressed=true]{color:var(--fg)}._meta_hages_94{color:var(--fg-fade);flex-wrap:wrap;align-items:center;gap:.35rem .9rem;font-size:13px;display:flex}._author_hages_103{color:var(--fg);font-weight:500}._refs_hages_108{align-items:center;gap:.35rem;min-width:0;display:inline-flex}._ref_hages_108{border:1px solid var(--border);background:var(--bg-code);max-width:20rem;color:var(--fg);text-overflow:ellipsis;white-space:nowrap;border-radius:4px;padding:.1rem .45rem;font-size:12px;overflow:hidden}._right_hages_128{gap:.9rem;margin-left:auto;display:inline-flex}._action_hages_134{border:1px solid var(--border);border-radius:var(--radius);color:var(--fg);padding:.15rem .6rem;font-size:12px}._action_hages_134:hover:not(:disabled){background:var(--bg-hover)}._action_hages_134:disabled{opacity:.6}._actionError_hages_150{color:var(--error)}._error_hages_154{border-radius:var(--radius);background:color-mix(in srgb, var(--error) 12%, transparent);color:var(--error);white-space:pre-line;padding:.35rem .75rem;font-size:13px}._tabs_hages_163{scrollbar-width:thin;gap:.25rem;margin:0 -.25rem;display:flex;overflow-x:auto}._tab_hages_163{max-width:18rem;color:var(--fg-fade);border-bottom:2px solid #0000;flex:none;align-items:center;gap:.35rem;padding:.3rem .5rem;font-size:13px;display:inline-flex}._tab_hages_163:hover{background:var(--bg-hover)}._tab_hages_163[data-active=true]{border-bottom-color:var(--accent);color:var(--fg)}._tab_hages_163[data-chapter=true]{font-weight:600}._tabLabel_hages_196{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}._files_16ufo_1,._findings_16ufo_2{flex-direction:column;margin:0;padding:0;list-style:none;display:flex}._files_16ufo_1{gap:.6rem}._findings_16ufo_2{gap:2px}._empty_16ufo_18{color:var(--fg-mute);margin:0;padding:0 .5rem}._file_16ufo_1{max-width:100%;color:var(--fg-fade);font-family:var(--font-mono);text-align:left;text-overflow:ellipsis;white-space:nowrap;padding:0 .5rem .15rem;font-size:11.5px;overflow:hidden}._file_16ufo_1:hover{color:var(--fg);text-decoration:underline}._finding_16ufo_2{--dot:var(--fg-mute);border-radius:var(--radius);text-align:left;width:100%;color:var(--fg-fade);align-items:baseline;gap:.45rem;padding:.25rem .5rem;display:flex}._finding_16ufo_2:hover{background:var(--bg-hover);color:var(--fg)}._finding_16ufo_2[aria-current=true]{background:var(--bg-active);color:var(--fg)}._finding_16ufo_2[data-over-cap=true] ._title_16ufo_63{font-style:italic}._finding_16ufo_2[data-severity=blocker]{--dot:var(--error)}._finding_16ufo_2[data-severity=should-fix]{--dot:var(--warning)}._finding_16ufo_2[data-severity=question]{--dot:var(--info)}._dot_16ufo_79{background:var(--dot);border-radius:50%;flex:none;width:.6rem;height:.6rem}._title_16ufo_63{-webkit-line-clamp:2;-webkit-box-orient:vertical;flex:auto;min-width:0;display:-webkit-box;overflow:hidden}._line_16ufo_96{color:var(--fg-mute);font-family:var(--font-mono);flex:none;font-size:11px}._chapters_12sy8_1,._stops_12sy8_2{flex-direction:column;margin:0;padding:0;list-style:none;display:flex}._chapters_12sy8_1{gap:.75rem}._chapter_12sy8_1{color:var(--fg-fade);text-transform:uppercase;letter-spacing:.03em;margin:0 0 .25rem;padding:0 .5rem;font-size:11px;font-weight:600}._stops_12sy8_2{gap:2px}._stop_12sy8_2{border-radius:var(--radius);text-align:left;width:100%;color:var(--fg-fade);align-items:baseline;gap:.5rem;padding:.25rem .5rem;display:flex}._stop_12sy8_2:hover{background:var(--bg-hover);color:var(--fg)}._stop_12sy8_2[aria-current=step]{background:var(--bg-active);color:var(--fg)}._number_12sy8_49{min-width:1.25rem;color:var(--teal);font-variant-numeric:tabular-nums;text-align:right;flex:none;font-size:11px}._stop_12sy8_2[data-importance=critical] ._number_12sy8_49{color:var(--critical)}._stop_12sy8_2[data-importance=context] ._title_12sy8_62{color:var(--fg-mute)}._title_12sy8_62{min-width:0}._sidebar_1dwkw_1{flex-direction:column;gap:.75rem;display:flex}._modes_1dwkw_7{border:1px solid var(--border);border-radius:var(--radius);gap:2px;padding:2px;font-size:12px;display:flex}._mode_1dwkw_7{border-radius:calc(var(--radius) - 2px);color:var(--fg-fade);flex:1;padding:.2rem .5rem}._mode_1dwkw_7:hover{color:var(--fg)}._mode_1dwkw_7[aria-pressed=true]{background:var(--bg-active);color:var(--fg)}._modeCount_1dwkw_32{color:var(--fg-mute);font-variant-numeric:tabular-nums;margin-left:.3rem}._nav_1dwkw_38{font-size:13px}._list_1dwkw_42{flex-direction:column;gap:2px;margin:0;padding:0;list-style:none;display:flex}._row_1dwkw_51{border-radius:var(--radius);align-items:flex-start;display:flex}._row_1dwkw_51[data-depth="1"]{padding-left:1rem}._row_1dwkw_51:hover{background:var(--bg-hover)}._row_1dwkw_51[data-visible=true]{background:var(--bg-active)}._caret_1dwkw_69,._caretSpace_1dwkw_70{flex:none;width:1.25rem;height:1.75rem}._caret_1dwkw_69{color:var(--fg-fade);justify-content:center;align-items:center;display:inline-flex}._caret_1dwkw_69:hover{color:var(--fg)}._link_1dwkw_87{text-align:left;min-width:0;color:var(--fg-fade);flex-direction:column;flex:auto;padding:.25rem .5rem .25rem 0;display:flex}._row_1dwkw_51[data-visible=true] ._link_1dwkw_87{color:var(--fg)}._label_1dwkw_101{align-items:center;gap:.35rem;min-width:0;display:flex}._icon_1dwkw_108{filter:saturate(0)}._row_1dwkw_51[data-visible=true] ._icon_1dwkw_108{filter:none}._title_1dwkw_116{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}._row_1dwkw_51[data-depth="0"] ._title_1dwkw_116{font-weight:500}._sub_1dwkw_127{color:var(--fg-mute);align-items:center;margin-left:1.35rem;font-size:11px;display:flex}._summary_19fm7_1{border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--bg-raised);scroll-margin-top:calc(var(--header-height) + 1rem);flex-direction:column;gap:.85rem;padding:.85rem 1rem;font-size:14px;line-height:1.55;display:flex}._summary_19fm7_1:focus{outline:none}._summary_19fm7_1 p{margin:0}._verdicts_19fm7_22{flex-direction:column;gap:.35rem;display:flex}._dot_19fm7_28{--dot:var(--fg-mute);background:var(--dot);vertical-align:-.05em;border-radius:50%;width:.7em;height:.7em;margin-right:.4em;display:inline-block}._dot_19fm7_28[data-level=high],._dot_19fm7_28[data-severity=blocker]{--dot:var(--error)}._dot_19fm7_28[data-level=moderate]{--dot:var(--warning)}._dot_19fm7_28[data-level=low]{--dot:var(--success)}._dot_19fm7_28[data-severity=should-fix]{--dot:var(--warning)}._dot_19fm7_28[data-severity=nice-to-have]{--dot:var(--fg-mute)}._dot_19fm7_28[data-severity=question]{--dot:var(--info)}._sep_19fm7_64{color:var(--fg-mute)}._section_19fm7_68{flex-direction:column;gap:.35rem;display:flex}._sectionHeader_19fm7_74{justify-content:space-between;align-items:center;gap:1rem;display:flex}._heading_19fm7_81{margin:0;font-size:14px;font-weight:600}._subheading_19fm7_87{color:var(--fg-fade);margin:.4rem 0 0;font-size:13px;font-weight:600}._findings_19fm7_94,._fileFindings_19fm7_95,._list_19fm7_96{flex-direction:column;gap:.3rem;margin:0;padding-left:1.25rem;display:flex}._fileFindings_19fm7_95{margin-top:.25rem;list-style:circle}._finding_19fm7_94 strong{font-weight:600}._outside_19fm7_113{color:var(--fg-mute);margin-left:.5rem;font-size:12px;font-style:italic}._lineLink_19fm7_120,._fileLink_19fm7_121{color:var(--accent)}._lineLink_19fm7_120,._fileLink_19fm7_121:hover{text-decoration:underline}._path_19fm7_133{background:var(--bg-code);font-family:var(--font-mono);border-radius:4px;padding:.05rem .3rem;font-size:12.5px}._details_19fm7_141>summary{cursor:pointer;color:var(--fg-fade)}._details_19fm7_141[open]>summary{margin-bottom:.35rem}._overCap_19fm7_150{color:var(--fg-fade);align-items:center;gap:.45rem;display:flex}._labelled_19fm7_157 strong{font-weight:600}._inline_19fm7_161,._inline_19fm7_161>:first-child{display:inline}._alignment_19fm7_169{font-weight:500}._alignment_19fm7_169[data-alignment=aligned]{color:var(--success)}._alignment_19fm7_169[data-alignment=partial]{color:var(--warning)}._alignment_19fm7_169[data-alignment=misaligned]{color:var(--error)}._why_19fm7_185{color:var(--fg-fade);margin-left:.5rem}._note_19fm7_190{color:var(--fg-fade)}._files_19fm7_194{flex-flow:wrap;gap:.25rem .75rem;margin:0;padding:0;list-style:none;display:flex}._footer_19fm7_203{color:var(--fg-mute);flex-wrap:wrap;gap:.25rem 1rem;font-size:12px;display:flex}._page_iew0b_1{min-height:100vh}._body_iew0b_5{align-items:stretch;display:flex}._aside_iew0b_10{border-right:1px solid var(--border);flex:none;width:16rem}._asideInner_iew0b_16{top:calc(var(--header-height) + 10px);max-height:calc(100vh - var(--header-height) - 20px);padding:.75rem .5rem .75rem .75rem;position:sticky;overflow-y:auto}._main_iew0b_24{flex-direction:column;flex:auto;gap:1rem;min-width:0;max-width:125rem;margin:0 auto;display:flex}._chapter_iew0b_34{flex-direction:column;gap:1rem;display:flex}._end_iew0b_40{color:var(--fg-mute);text-align:center;margin-top:50vh;padding:.5rem;font-size:12px;font-style:italic}._skeleton_iew0b_49{flex-direction:column;min-height:100vh;display:flex}._skeletonHeader_iew0b_55{border-bottom:1px solid var(--border);height:4.5rem}._skeletonBody_iew0b_60{flex:auto;display:flex}._skeletonAside_iew0b_65{border-right:1px solid var(--border);width:16rem}._skeletonMain_iew0b_70{flex-direction:column;flex:auto;gap:1rem;padding:1rem;display:flex}._skeletonMain_iew0b_70 div{border-radius:var(--radius-lg);background:var(--bg-hover);height:12rem;animation:1.4s ease-in-out infinite _pulse_iew0b_1}@keyframes _pulse_iew0b_1{50%{opacity:.5}}@media (width<=1023.98px){._skeletonAside_iew0b_65{display:none}}._page_oa1c1_1{flex-direction:column;gap:1.25rem;max-width:72rem;margin:0 auto;padding:2rem 1rem;display:flex}._header_oa1c1_10{align-items:baseline;gap:1rem;display:flex}._header_oa1c1_10 h1{font-size:1.5rem;font-weight:600}._muted_oa1c1_21{color:var(--fg-fade);white-space:nowrap;font-size:13px}._error_oa1c1_27{color:var(--error)}._table_oa1c1_31{border-collapse:collapse;width:100%}._table_oa1c1_31 th{border-bottom:1px solid var(--border);color:var(--fg-fade);text-align:left;white-space:nowrap;padding:.4rem .6rem;font-size:12px;font-weight:500}._table_oa1c1_31 td{border-bottom:1px solid var(--border);vertical-align:middle;padding:.5rem .6rem}._row_oa1c1_52:hover{background:var(--bg-hover)}._target_oa1c1_56{flex-direction:column;gap:.1rem;display:flex}._link_oa1c1_62{font-weight:500;text-decoration:none}._link_oa1c1_62:hover{color:var(--accent);text-decoration:underline}._repo_oa1c1_72{color:var(--fg-mute);font-size:12px;font-family:var(--font-mono)}._invalid_oa1c1_78{background:color-mix(in srgb, var(--error) 15%, transparent);color:var(--error);border-radius:4px;padding:0 .3rem;font-size:11px}._table_oa1c1_31 ._count_oa1c1_86{text-align:right;font-variant-numeric:tabular-nums}._count_oa1c1_86[data-severity=blocker]{color:var(--error)}._count_oa1c1_86[data-severity=should-fix]{color:var(--accent)}._count_oa1c1_86[data-severity=nice-to-have]{color:var(--teal)}._count_oa1c1_86[data-severity=question]{color:var(--magenta)}._count_oa1c1_86[data-zero=true]{color:var(--fg-mute)}._kind_oa1c1_111{border:1px solid var(--border);color:var(--fg-fade);border-radius:4px;padding:.05rem .4rem;font-size:11px}._kind_oa1c1_111[data-kind=review]{color:var(--accent)}._filters_oa1c1_123{border:1px solid var(--border);border-radius:var(--radius);margin-left:auto;display:inline-flex;overflow:hidden}._filter_oa1c1_123{color:var(--fg-fade);padding:.2rem .65rem;font-size:12px}._filter_oa1c1_123+._filter_oa1c1_123{border-left:1px solid var(--border)}._filter_oa1c1_123[aria-pressed=true]{background:var(--bg-hover);color:var(--fg)}._delete_oa1c1_146{border-radius:var(--radius);color:var(--fg-fade);padding:.25rem;display:inline-flex}._delete_oa1c1_146:hover{background:var(--bg-hover);color:var(--error)}