@preventive/triage 1.0.0-alpha.67 → 1.0.0-alpha.68
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/common/managed/routes.js +19 -12
- package/out/activity.js +1 -1
- package/out/{chunk-LBJVV6UB.js → chunk-2F3CYNPZ.js} +1 -1
- package/out/{chunk-U5C2TNNQ.js → chunk-2HGKTQ5Q.js} +1 -1
- package/out/chunk-4RS3NDOG.js +1 -0
- package/out/{chunk-VR3NRE5V.js → chunk-D37M7J4B.js} +1 -1
- package/out/{chunk-LDO42LAC.js → chunk-GZ46SSTF.js} +1 -1
- package/out/{chunk-R3WUYD4F.js → chunk-HETCVNO4.js} +1 -1
- package/out/{chunk-5F5FPI75.js → chunk-MPXVKVPF.js} +1 -1
- package/out/{chunk-A5A3LEMV.js → chunk-OAWY4T6R.js} +1 -1
- package/out/{chunk-6YGH7BJG.js → chunk-QPGM3DTI.js} +1 -1
- package/out/{chunk-FUHRMY7R.js → chunk-SCN2TBP2.js} +5 -5
- package/out/client-managed-import.js +1 -1
- package/out/client-managed.js +2 -2
- package/out/compare.js +8 -8
- package/out/dialogs.js +2 -2
- package/out/graph.js +1 -1
- package/out/index.html +7 -7
- package/out/scan.js +1 -1
- package/out/view.css +1 -1
- package/out/view.js +1 -1
- package/package.json +1 -1
- package/server-managed/bundle-build-worker.js +59 -7
- package/server-managed/bundle-build.ts +9 -4
- package/server-managed/db-neon.ts +4 -1
- package/server-managed/dependency-review-comments.ts +13 -10
- package/server-managed/dependency-reviews.ts +17 -14
- package/server-managed/http.ts +65 -25
- package/server-managed/npm-patch.ts +101 -43
- package/server-managed/pull-dependencies.ts +9 -6
- package/server-managed/pull-dependency-reviews.ts +20 -11
- package/server-managed/repository-dependency-reviews.ts +4 -2
- package/server-managed/repository-issues.ts +3 -3
- package/server-managed/stasis-dependencies.ts +29 -12
- package/out/chunk-6ATPGDDI.js +0 -1
package/out/dialogs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as e,b as t,d as n,e as r,i,j as a}from"./chunk-
|
|
1
|
+
import{a as e,b as t,d as n,e as r,i,j as a}from"./chunk-OAWY4T6R.js";import{b as o,c as s,d as c,e as l,g as u}from"./chunk-D37M7J4B.js";import{A as d,d as f,e as p,z as m}from"./chunk-MPXVKVPF.js";import"./chunk-6CCSTJWB.js";import{$a as h,A as g,Aa as ee,Ab as te,Ac as ne,Ba as re,Bb as ie,Bc as _,Cc as ae,Ce as oe,Dc as se,E as ce,Ec as le,F as ue,Fc as de,Gc as fe,Ha as pe,Hc as me,Ic as he,J as ge,Jc as _e,Kc as ve,Ke as ye,L as v,Lc as be,Le as xe,M as Se,Mc as Ce,Me as we,Nc as Te,Ne as Ee,O as De,Oe,Pe as ke,Qb as Ae,Se as je,Te as Me,U as Ne,Uc as Pe,Ue as Fe,Ve as Ie,W as Le,We as Re,Xb as ze,Ya as Be,Ye as y,Za as Ve,Ze as He,_e as Ue,aa as We,af as Ge,b,ba as Ke,bf as qe,ca as Je,cf as x,d as Ye,da as Xe,db as Ze,df as Qe,ea as $e,eb as et,f as tt,fa as nt,fb as S,g as rt,ga as it,gb as C,h as at,ha as ot,hb as w,hf as st,ib as T,if as ct,j as lt,jb as ut,k as dt,kb as E,kf as ft,lb as D,le as O,lf as pt,mb as mt,n as ht,nb as gt,nf as _t,ob as vt,oc as yt,oe as bt,of as xt,pc as St,pe as Ct,pf as wt,sa as k,tc as Tt,ua as Et,w as A,wb as Dt,x as Ot,xb as kt,xf as At,y as jt,yb as Mt,z as Nt,zb as Pt}from"./chunk-SCN2TBP2.js";import"./chunk-JCIIBLKR.js";import"./chunk-E3LFSUDJ.js";import"./chunk-JMG5DXII.js";import{h as Ft,i as It}from"./chunk-2F3CYNPZ.js";import{Ma as Lt,j as Rt,k as zt}from"./chunk-2HGKTQ5Q.js";import{c as Bt}from"./chunk-WFDXHPT2.js";import"./chunk-NRPC74AM.js";import"./chunk-7BKKYVWR.js";import"./chunk-7C7DWL7I.js";import"./chunk-PNHBZGDD.js";import{a as j}from"./chunk-R5O6FAW4.js";import{$ as M,Ba as Vt,U as Ht,aa as Ut,e as Wt,ja as Gt}from"./chunk-QPGM3DTI.js";import"./chunk-HETCVNO4.js";import"./chunk-D6NVKGGG.js";import{e as Kt}from"./chunk-IYPY47MC.js";import{a as N,d as qt}from"./chunk-PWFUOLZK.js";import{r as P}from"./chunk-4RS3NDOG.js";import{B as Jt,J as Yt,L as Xt,b as Zt,k as Qt,m as $t,p as en,v as F}from"./chunk-QRKFPLA4.js";import{C as tn,D as nn,d as I}from"./chunk-74AEKRES.js";import"./chunk-C4Z6ZBXV.js";import{a as L,c as R,d as rn,g as z}from"./chunk-2XUEZHIP.js";import"./chunk-TUII34K2.js";import"./chunk-OOJM4CTU.js";var an=`.inline-quote{background:rgb(from var(--accent) r g b / .1);padding:1px;border-radius:3px;color:var(--text)}.inline-code{background:var(--surface-active);border-radius:3px;border:1px solid var(--border);padding:0 .25em;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.9em;color:var(--text)}.para+.para{margin-top:.5lh}.md-list{margin:0;padding-inline-start:1.2em}.md-list li+li{margin-top:.25lh}.para+.md-list,.md-list+.para,.md-list+.md-list{margin-top:.5lh}.md-list li::marker{color:rgb(from currentcolor r g b / .45)}.md-list li.md-task{list-style:none;position:relative}.md-task>input{position:absolute;inset-inline-start:-1.2em;top:calc((1lh - .9em)/2);width:.9em;height:.9em;margin:0;font:inherit}.md-heading{font-weight:600}.md-heading:is([aria-level="1"],[aria-level="2"]){font-size:1.15em}.md-heading:not(:first-child){margin-top:.75lh}.md-heading+*{margin-top:.25lh}.md-rule{margin:.75lh 0;border:0;border-top:1px solid var(--border)}.code-block:not(.token){white-space:normal;margin:.4rem 0;border:1px solid var(--border);border-radius:var(--ui-radius, 4px);background:rgb(from var(--text) r g b / .05);overflow:hidden;width:fit-content;max-width:100%;.code-block-lang{padding:.15rem .5rem;border-bottom:1px solid var(--border);color:var(--muted);font-size:.62rem;font-weight:600;text-transform:uppercase;letter-spacing:.06em}& pre{margin:0;padding:.4rem .55rem;overflow-x:auto;white-space:pre;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.95em;line-height:1.5;color:var(--text)}& code{font:inherit}}
|
|
2
2
|
`,on=`dialog{width:min(94vw,80rem);max-width:none;max-height:90dvh;margin:auto;padding:0;overflow:hidden}dialog[open]{display:flex;flex-direction:column}header{display:flex;align-items:start;gap:1rem;flex-shrink:0;padding:.8rem 1rem;border-bottom:1px solid var(--border)}header h3{display:flex;align-items:baseline;gap:.6rem;flex:1;min-width:0;margin:0;overflow-wrap:anywhere}header h3>span:last-child{min-width:0}header button{flex-shrink:0;border:0;background:transparent;color:var(--muted);font-family:inherit;font-size:1.4rem;line-height:1;padding:0 .25rem}header button:hover{color:var(--text)}.advisory-description{min-height:0;padding:1rem;overflow:auto;overscroll-behavior:contain;white-space:pre-wrap;overflow-wrap:anywhere;font-size:.85rem;line-height:1.6}a{color:var(--accent)}button:focus-visible,.advisory-description:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
|
|
3
3
|
`,sn=class extends S{static styles=[...S.styles,L(an),L(e),L(t),L(T),L(on)];static properties={heading:{attribute:!1},severity:{attribute:!1},_body:{state:!0}};connectedCallback(){super.connectedCallback(),this._dispose=b(()=>{this.isCurrent()?this._body=Pe(Ht(this.markdown)):(this._body=z,queueMicrotask(this._onClose))})}disconnectedCallback(){this._dispose?.(),super.disconnectedCallback()}render(){return R`<dialog aria-labelledby="advisory-title" @close="${this._onClose}"><header><h3 id="advisory-title">${E(this.severity===`unknown`?`unrated`:this.severity)}<span>${this.heading}</span></h3><button type="button" aria-label="Close advisory details" @click="${this._onClose}">×</button></header><div class="advisory-description" tabindex="0">${this._body}</div></dialog>`}};customElements.define(`advisory-details-dialog`,sn);function cn(e){return C(`advisory-details-dialog`,e)}var ln=`dialog{max-width:640px;width:min(94vw,640px)}header h3{margin:0 0 .4rem}.finding{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap;margin-bottom:.35rem}.loc{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.76rem;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;flex:1}.desc{font-size:.78rem;color:var(--muted);margin:0 0 .7rem;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}textarea{display:block;width:100%;box-sizing:border-box;min-height:9rem;max-height:50vh;resize:vertical;padding:.55rem .65rem;border:1px solid var(--border);border-radius:var(--ui-radius, 6px);background:var(--bg, var(--surface));color:var(--text);font:inherit;font-size:.88rem;line-height:1.4;&:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px rgb(from var(--accent) r g b / .18)}&::placeholder{color:var(--muted)}}
|
|
4
4
|
`,un=class extends S{static styles=[...S.styles,L(T),L(ln)];static properties={initial:{attribute:!1},finding:{attribute:!1},_value:{state:!0}};constructor(){super(),this.initial=``,this.finding=null,this._value=``}beforeOpen(){this._value=this.initial??``}focusInitial(){let e=this.renderRoot.querySelector(`textarea`);if(!e)return;e.focus();let t=e.value.length;try{e.setSelectionRange(t,t)}catch{}}_onInput=e=>{this._value=e.target.value};_onSave=()=>{let e=(this._value??``).trim();e===(this.initial??``).trim()?this._finish(null):this._finish(e)};_onClear=()=>this._finish(``);_onCancel=()=>this._finish(null);_onKeydown=e=>{e.key===`Enter`&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),this._onSave())};render(){let e=this.finding??{},t=e.file?e.line?`${e.file}:${e.line}`:e.file:``,n=(this.initial??``).length>0;return R`<dialog @close="${this._onClose}"><header><h3>${n?`Edit comment`:`Add comment`}</h3><div class="finding">${E($t(e,A.severityMode))} ${t?R`<span class="loc" data-tooltip-truncated data-tooltip="${t}">${t}</span>`:z}</div>${e.description?R`<div class="desc" data-tooltip-truncated data-tooltip="${e.description}">${e.description}</div>`:z}</header><textarea rows="6" placeholder="Write your notes here. Markdown is not rendered. Ctrl/⌘+Enter to save, Esc to cancel." .value="${this._value}" @input="${this._onInput}" @keydown="${this._onKeydown}"></textarea><footer class="nwd-actions">${n?R`<button type="button" class="danger" @click="${this._onClear}">Clear</button>`:z} <span class="nwd-spacer"></span> <button type="button" @click="${this._onCancel}">Cancel</button> <button type="button" class="primary" @click="${this._onSave}">Save</button></footer></dialog>`}};customElements.define(`comment-dialog`,un);function dn({initial:e=``,finding:t=null}={}){return C(`comment-dialog`,{initial:e,finding:t})}var B=`.lwd-body{margin:.2rem 0 .55rem;color:var(--text);font-size:.86rem;line-height:1.5}.lwd-empty{margin:.2rem 0 .55rem;color:var(--muted);font-size:.78rem}.lwd-note{margin:.2rem 0 .65rem;padding:.55rem .7rem;border:1px solid var(--border);border-radius:var(--ui-radius, 6px);background:rgb(from var(--text) r g b / .03);color:var(--muted);font-size:.78rem;line-height:1.45}.lwd-choice{margin:.2rem 0 .65rem;padding:.55rem .7rem .6rem;border:1px solid var(--border);border-radius:var(--ui-radius, 6px);background:rgb(from var(--text) r g b / .03);& legend{padding:0 .35rem;color:var(--text);font-size:.78rem;font-weight:500;& strong{font-weight:600}}}.lwd-option{display:flex;align-items:flex-start;gap:.5rem;padding:.3rem .15rem;& input[type=radio]{margin:.15rem 0 0;accent-color:var(--accent)}.lwd-option-text{display:flex;flex-direction:column;gap:.1rem;min-width:0}.lwd-option-title{color:var(--text);font-size:.82rem;line-height:1.35}.lwd-option-hint{color:var(--muted);font-size:.72rem;line-height:1.4}}.lwd-list{margin:0;padding-left:1.1rem;color:var(--muted);font-size:.76rem;line-height:1.5;& li+li{margin-top:.2rem}& strong{color:var(--text);font-weight:600}}.lwd-kind-tag{display:inline-block;vertical-align:middle;margin-left:.3rem;padding:0 .35rem;border:1px solid var(--border);border-radius:3px;background:rgb(from var(--text) r g b / .04);color:var(--muted);font-size:.62rem;font-weight:600;text-transform:uppercase;letter-spacing:.06em}.lwd-rename-input{margin-top:.2rem}.lwd-rename-error{margin:.25rem 0 0;color:var(--critical, #f87171);font-size:.72rem;line-height:1.35}
|
|
@@ -26,7 +26,7 @@ import{a as e,b as t,d as n,e as r,i,j as a}from"./chunk-A5A3LEMV.js";import{b a
|
|
|
26
26
|
${e.detail}`:t}_heldLocally(e){return e.identifier?e.kind===`bundle`?this.localBundles.includes(e.identifier):this.localFileNames.includes(e.identifier):!1}_choice(e){if(e.status!==`differs`)return z;let t=this._running||this._bulk||this._resolving.has(e.resourceTag);return R`<span class="rec-choice"><button type="button" data-role="keep-cloud" data-tooltip="Replace your copy with the cloud copy" @click="${()=>this._onResolve(e,`cloud`)}" ?disabled="${t}">Use cloud copy</button> <button type="button" data-role="keep-local" data-tooltip="Upload your copy, replacing the cloud copy" @click="${()=>this._onResolve(e,`local`)}" ?disabled="${t}">Upload mine</button></span>`}_rowsSection(){return this._rows.length===0?this._running?R`<p class="lwd-body">Fetching remote listing…</p>`:z:R`<ul class="rec-list">${this._rows.map(e=>R`<li class="rec-row"><span class="rec-label">${e.label}${e.kind===`bundle`?R`<span class="lwd-kind-tag">bundle</span>`:z}</span> ${this._choice(e)} <span class="${`rec-status rec-status-${e.status}`}" data-tooltip="${this._statusHint(e)}">${Pr[e.status]?.label??e.status}</span></li>`)}</ul>`}_summarySection(){if(!this._ran||this._rows.length===0)return z;let e=this._counts(),t=[];return e.good&&t.push(`${e.good} available`),e.updated&&t.push(`${e.updated} local ${Ir(e.updated)} updated from the cloud`),e.uploaded&&t.push(`${e.uploaded} cloud ${Ir(e.uploaded)} updated from yours`),e.differs&&t.push(`${e.differs} ${e.differs===1?`differs`:`differ`} \u2014 choose which copy to keep`),e.reuploaded&&t.push(`${e.reuploaded} re-uploaded`),e.failed&&t.push(`${e.failed} failed`),e[`check-failed`]&&t.push(`${e[`check-failed`]} check failed`),e.missing&&t.push(`${e.missing} missing`),t.length>0?R`<p class="rec-summary" role="status" aria-live="polite">${t.join(` · `)}</p>`:z}render(){let e=this.cloudCount===1?``:`s`,t=this.cloudCount>0?R`the <strong>${this.cloudCount}</strong> remote`:`remote`,n=this._ran?z:R`<p class="lwd-body">Re-check ${t} object${e} for this workspace. Each is re-fetched from the relay and compared with your copy. When one copy is provably newer, the other is updated to match; when it isn't clear, you choose which to keep. Any whose bytes are missing are re-uploaded from a matching local copy.</p>`,r=this._ran&&this._rows.length===0&&!this._error?R`<p class="lwd-empty">No remote objects to check.</p>`:z,i=this._ran?this._downloadableItems().length:0,a=this._differingRows().length>1||this._bulk;return R`<dialog @close="${this._onClose}"><button type="button" class="detail-action rec-close" data-role="close" aria-label="Close" @click="${this._onCancel}">×</button><header><h3>Re-check cloud storage</h3></header>${n} ${this._rowsSection()} ${r} ${this._summarySection()} ${this._error?R`<p class="rec-error" role="alert">${this._error}</p>`:z}<footer class="nwd-actions"><span class="nwd-spacer"></span> ${a?R`<button type="button" data-role="use-cloud-all" data-tooltip="Replace your copy of every report that differs with its cloud copy" @click="${this._onUseCloudForAll}" ?disabled="${this._running||this._bulk}">${this._bulk?`Using cloud copies…`:`Use cloud for all ${this._differingRows().length} conflicts`}</button>`:z} ${!a&&i>0?R`<button type="button" data-role="download" @click="${this._onDownload}" ?disabled="${this._running}">Download ${i} not stored locally</button>`:z} ${a?z:R`<button type="button" data-role="cancel" @click="${this._onCancel}" ?disabled="${this._running}">${this._ran?`Close`:`Cancel`}</button>`} <button type="button" data-role="recheck" @click="${this._onRecheck}" ?disabled="${this._running||this._bulk||this._resolving.size>0}">${this._running?`Re-checking…`:this._ran?`Re-check again`:`Re-check`}</button></footer></dialog>`}};customElements.define(`objstore-recovery-dialog`,Lr);function Rr({workspaceId:e,cloudCount:t,localFileNames:n,localBundles:r,autoRun:i}={}){return C(`objstore-recovery-dialog`,{workspaceId:e??``,cloudCount:typeof t==`number`?t:0,localFileNames:Array.isArray(n)?[...n]:[],localBundles:Array.isArray(r)?[...r]:[],autoRun:i===!0})}var zr=class extends S{static styles=[...S.styles,L(O)];static properties={_userName:{state:!0},_busy:{state:!0},_error:{state:!0},_phase:{state:!0},_success:{state:!0},_orphan:{state:!0},_orphanAck:{state:!0},_canCancel:{state:!0}};constructor(){super(),this._userName=``,this._busy=!1,this._error=``,this._phase=``,this._success=!1,this._orphan=!1,this._orphanAck=!1,this._canCancel=!0,this._abortController=null}updated(e){if(e.has(`_success`)&&this._success){let e=this.renderRoot.querySelector(`footer button.primary`);e&&e.focus()}}beforeOpen(){typeof location<`u`&&(this._userName=location.hostname||`DeepView`),this._orphan=rt(),this._vaultStateUnsub=at(()=>{if(this._settled)return;let e=rt();this._orphan&&!e&&Ye()?(this._error=`Encryption was just enabled in another tab. Close this dialog and reload to unlock.`,this._busy=!1,this._canCancel=!0):this._orphan!==e&&(this._orphan=e)})}async focusInitial(){await this.updateComplete;let e=this._orphan?`input[data-role="orphan-ack"]`:`input[data-role="name"]`;this.renderRoot.querySelector(e)?.focus()}disconnectedCallback(){if(super.disconnectedCallback(),this._vaultStateUnsub){try{this._vaultStateUnsub()}catch{}this._vaultStateUnsub=null}}_finish(e){if(!this._settled){if(this._abortController)try{this._abortController.abort()}catch{}super._finish(!!e)}}_onClose=()=>this._finish(this._success);_onCancel=()=>{this._busy&&!this._canCancel||this._finish(!1)};_onDialogCancel=e=>{this._busy&&!this._canCancel?e.preventDefault():this._finish(!1)};_onNameInput=e=>{this._userName=e.target.value};_onOrphanAckInput=e=>{this._orphanAck=e.target.checked};_onWipeOrphan=async()=>{if(!this._busy&&this._orphanAck){if(Ye()){this._error=`Encryption was just enabled in another tab. Reload this page to unlock.`;return}this._busy=!0,this._canCancel=!1,this._error=``,this._phase=`Clearing previous vault state…`;try{await dt({refuseIfEnabled:!0}),location.reload()}catch(e){this._error=`Could not clear previous vault state: ${e?.message??e}`,this._phase=``}finally{this._busy=!1,this._canCancel=!0}}};_onEnable=async()=>{if(!this._busy){if(!tt()){this._error=`Passkeys are not supported in this browser.`;return}this._busy=!0,this._canCancel=!0,this._error=``,this._phase=`Registering passkey…`,this._abortController=new AbortController;try{await lt({userName:this._userName.trim()||`DeepView user`,rpName:`DeepView`,signal:this._abortController.signal,migrate:async({seal:e})=>{this._canCancel=!1,this._phase=`Encrypting workspaces and metadata…`,await ht({seal:e}),this._phase=`Encrypting triage data…`,await Ne({seal:e}),this._phase=`Encrypting report files…`,await ce({seal:e}),this._phase=`Encrypting bundles…`,await ue({seal:e})}})&&(this._success=!0,this._phase=``)}catch(e){this._error=e?.name===`AbortError`?``:e?.message??String(e),this._phase=``}finally{this._busy=!1,this._canCancel=!0,this._abortController=null}}};_body(){if(this._orphan)return R`<p class="wsl-error">DeepView found an abandoned passkey setup on this device. The original passkey can no longer be accessed, so any local data still encrypted under it is <strong>unreadable</strong> and cannot be recovered.</p><p class="nwd-note ui-hint">To enable encryption, DeepView will <strong>permanently delete ALL local DeepView data on this device</strong> — including any plaintext workspaces or reports you may have added after the previous passkey was lost — and then register a fresh passkey. This is irreversible. There is no backup.</p><label class="wsl-ack"><input type="checkbox" data-role="orphan-ack" .checked="${this._orphanAck}" ?disabled="${this._busy}" @change="${this._onOrphanAckInput}"> <span>I understand all local DeepView data on this device will be deleted.</span></label> ${this._phase?R`<p class="nwd-note">${this._phase}</p>`:z} ${this._error?R`<p class="wsl-error">${this._error}</p>`:z}<footer class="nwd-actions"><span class="nwd-spacer"></span> <button type="button" ?disabled="${this._busy&&!this._canCancel}" @click="${this._onCancel}">Cancel</button> <button type="button" class="primary" ?disabled="${this._busy||!this._orphanAck}" @click="${this._onWipeOrphan}">${this._busy?`Working…`:`Wipe and continue`}</button></footer>`;if(this._success)return R`<p class="nwd-note ui-hint"><strong>Encryption is on.</strong> Your triage data and report files are now sealed under your passkey. You'll be asked to unlock with the passkey on every fresh load.</p><footer class="nwd-actions"><span class="nwd-spacer"></span> <button type="button" class="primary" @click="${()=>this._finish(!0)}">Close</button></footer>`;let e=tt();return R`<p class="nwd-note ui-hint">Passkey encryption protects your local triage and report data with a hardware-backed key (TouchID, Windows Hello, security key). Without the passkey, the data on disk is unreadable — even to scripts running on this origin.</p><p class="wsl-error"><strong>If you lose access to this passkey, your data CANNOT be recovered.</strong> DeepView has no backup key, no recovery code, and no escrow. Make sure your passkey is backed up (iCloud Keychain / Google Password Manager sync, or a second registered device) before relying on encryption for important data.</p><p class="nwd-note ui-hint"><strong>Opt-in.</strong> You can disable encryption later from the lock icon in the sidebar header — the data is rewritten as plaintext and DeepView signals your authenticator to remove the passkey (where supported).</p>${e?z:R`<p class="wsl-error">Your browser doesn't expose the WebAuthn passkey API. Try Chrome, Safari, Edge, or Firefox in a recent version on a device with a platform authenticator.</p>`} <label class="wsl-field"><span>Passkey label</span> <input type="text" class="nwd-input" data-role="name" placeholder="DeepView" maxlength="200" .value="${this._userName}" @input="${this._onNameInput}"></label> ${this._phase?R`<p class="nwd-note">${this._phase}</p>`:z} ${this._error?R`<p class="wsl-error">${this._error}</p>`:z}<footer class="nwd-actions"><span class="nwd-spacer"></span> <button type="button" ?disabled="${this._busy&&!this._canCancel}" @click="${this._onCancel}">Cancel</button> <button type="button" class="primary" ?disabled="${!e||this._busy}" @click="${this._onEnable}">${this._busy?`Working…`:`Enable encryption`}</button></footer>`}render(){return R`<dialog @close="${this._onClose}" @cancel="${this._onDialogCancel}"><header><h3>${this._success?`Encryption enabled`:this._orphan?`Previous passkey setup detected`:`Enable passkey encryption`}</h3></header>${this._body()}</dialog>`}};customElements.define(`passkey-setup-dialog`,zr);function Br(){return C(`passkey-setup-dialog`)}var Vr=class extends S{_onConfirm=()=>this._finish(!0);render(){return R`<dialog @close="${this._onClose}"><header><h3>Changes might not be saved</h3></header><p class="nwd-intro">Triage works in this tab, but this browser <strong>can't save its sync state right now</strong> — so changes that haven't reached the server could be lost if you reload the page.</p><p class="nwd-intro">This usually means the browser's storage is full, or another tab is running a newer version of the app (to avoid overwriting that newer version's data, this tab has paused saving).</p><p class="nwd-note ui-hint">Free up space if storage is full, and close or reload other tabs of this app to the same version. This notice clears on its own once saving works again.</p><footer class="nwd-actions"><span class="nwd-spacer"></span> <button type="button" class="primary" @click="${this._onConfirm}">Got it</button></footer></dialog>`}};customElements.define(`persistence-degraded-dialog`,Vr);function Hr(){return new Promise(e=>{let t=document.createElement(`persistence-degraded-dialog`);t.exclusive=!0;let n=n=>{t.remove(),e({shown:n})};t.addEventListener(`resolve`,()=>n(!0)),t.addEventListener(`modal-conflict`,()=>n(!1)),document.body.append(t)})}function Ur(e){if(It(e))throw Error(`This is a links file, not a report. Wrap report rows in a groups or findings object to compare them.`);let t=e;try{let n=JSON.parse(e);Array.isArray(n)&&(t=JSON.stringify({groups:n}))}catch{}let{data:n,reason:r}=Xt(t);if(!n)throw Error(r);let i=[],a=new Map,o=0;for(let e of Yt(n)){let t=new Set;for(let n of Array.isArray(e)?e:[e])if(n&&typeof n==`object`&&!Array.isArray(n)){if(typeof n.id!=`string`||!n.id){o++;continue}t.add(n.id),a.has(n.id)||a.set(n.id,[]),a.get(n.id).push(n)}i.push([...t].toSorted())}return{rows:i,byId:a,missingIds:o}}function Wr(e){let t=new Set;for(let n of e){let e=[...new Set(n)].toSorted();for(let n=0;n<e.length;n++)for(let r=n+1;r<e.length;r++)t.add(JSON.stringify([e[n],e[r]]))}return t}function Gr(e){let t=new Map,n=e=>{let n=e;for(;t.get(n)!==n;)t.set(n,t.get(t.get(n))),n=t.get(n);return n};for(let r of e){let[e,i]=JSON.parse(r);for(let n of[e,i])t.has(n)||t.set(n,n);t.set(n(e),n(i))}let r=new Map;for(let e of[...t.keys()].toSorted()){let t=n(e);r.has(t)||r.set(t,[]),r.get(t).push(e)}return[...r.values()].toSorted((e,t)=>e[0].localeCompare(t[0]))}function W(e,t,n){let r=(e.byId.get(t)??[]).map(e=>n===`verdict`?en(e)||null:n===`severity`?Qt(e)??null:n===`originalSeverity`?e.severity??null:n===`confidence`&&Number.isFinite(e.confidence)?e.confidence:null);return[...new Set(r)].toSorted((e,t)=>String(e).localeCompare(String(t),void 0,{numeric:!0}))}var Kr=(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n]),G=(e,t)=>[...e].filter(e=>!t.has(e)).toSorted();function qr(e,t){let n=new Set(e.byId.keys()),r=new Set(t.byId.keys()),i=[...n].filter(e=>r.has(e)).toSorted(),a=new Set(i),o=e=>Wr(e.rows.map(e=>e.filter(e=>a.has(e)))),s=o(e),c=o(t),l={confirmed:[],refuted:[],otherVerdicts:[],confidence:[],severity:[]};for(let n of i)for(let r of[`verdict`,`confidence`,`severity`]){let i=W(e,n,r),a=W(t,n,r),o={id:n,before:i,after:a};r===`severity`&&(o.originalBefore=W(e,n,`originalSeverity`),o.originalAfter=W(t,n,`originalSeverity`)),(!Kr(i,a)||r===`severity`&&!Kr(o.originalBefore,o.originalAfter))&&(r===`verdict`?l[a.length===1&&a[0]===`confirmed`?`confirmed`:a.length===1&&a[0]===`refuted`?`refuted`:`otherVerdicts`].push(o):l[r].push(o))}let u=Gr(G(c,s)),d=Gr(G(s,c)),f=G(r,n),p=G(n,r);return{before:e,after:t,added:f,removed:p,shared:i,joined:u,split:d,...l,unchanged:f.length===0&&p.length===0&&u.length===0&&d.length===0&&Object.values(l).every(e=>e.length===0)}}var Jr=`dialog{width:min(94vw,1180px);max-width:1180px;height:min(88dvh,960px);max-height:92dvh;margin-block:auto;padding:0;overflow:hidden;background:var(--theme-bar)}dialog[open]{display:flex;flex-direction:column}header{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1.1rem 1.3rem}header h3{margin-bottom:.25rem;font-size:1.1rem}header p,.muted,.note,.empty{color:var(--muted);font-size:.78rem;line-height:1.5}button,select,input{font:inherit;font-size:.8rem}button,select,.file-button,.search{color:var(--text);background:var(--surface);border:1px solid var(--border);border-radius:var(--ui-radius, 6px);padding:.45rem .65rem}button:not(:disabled):hover,.file-button:hover{background:var(--surface-active)}button:disabled{opacity:.45}button:focus-visible,select:focus-visible,.search:focus-visible,.file-button:focus-within{outline:2px solid var(--accent);outline-offset:2px}.pickers{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:start;gap:1rem;padding:0 1.3rem 1rem;border-bottom:1px solid var(--border)}.picker{min-width:0}.picker>label{display:block;font-size:.72rem;font-weight:600;margin-bottom:.4rem;color:var(--muted)}.picker select{width:100%;text-overflow:ellipsis}.file-picker{display:flex;align-items:center;flex-wrap:wrap;gap:.6rem;margin-top:.55rem}.file-button{position:relative;display:inline-block;font-size:.74rem;padding:.3rem .5rem;overflow:hidden}.file-button input{position:absolute;inset:0;opacity:0;width:100%}.swap{align-self:start;margin-top:1.5rem;font-size:1rem}.results{overflow:auto;min-height:0;padding:1.1rem 1.3rem 1.4rem}.summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.65rem}.summary>div{display:flex;flex-direction:column;gap:.35rem;padding:.8rem 1rem;background:var(--bg);border:1px solid var(--border);border-radius:var(--ui-radius, 7px)}.summary span{font-size:.72rem;color:var(--muted)}.summary strong{font-size:1.15rem;font-variant-numeric:tabular-nums}.positive h4{color:var(--green)}.negative h4,.verdict-confirmed h4,.summary .verdict-confirmed strong{color:var(--critical)}.verdict-refuted h4,.summary .verdict-refuted strong{color:var(--muted)}.change-counts{display:flex;flex-wrap:wrap;gap:.4rem;margin-top:.7rem}.change-counts span{font-size:.7rem;padding:.3rem .5rem;border-radius:5px;background:var(--bg);color:var(--muted)}.results-head{display:flex;align-items:center;flex-wrap:wrap;gap:.75rem;margin-block:1rem}.results-head p{flex:1;font-size:.78rem;color:var(--muted);overflow-wrap:anywhere}.search{width:min(100%,17rem)}.section-title{margin:1.2rem 0 .5rem;font-size:.87rem}.note{margin:-.15rem 0 .6rem}.columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.8rem}.change-section{border:1px solid var(--border);border-radius:var(--ui-radius, 7px);overflow:hidden;margin-bottom:.6rem}.change-section h4{display:flex;justify-content:space-between;align-items:center;gap:.5rem;font-size:.78rem;font-weight:600;padding:.65rem .8rem;background:var(--bg)}.count{font-variant-numeric:tabular-nums;font-size:.7rem}ul{list-style:none}li{border-top:1px solid var(--border);padding:.7rem .8rem}.change-row{display:flex;justify-content:space-between;align-items:start;gap:.8rem}.finding{display:flex;flex-direction:column;gap:.2rem;min-width:0;overflow-wrap:anywhere}.finding strong{font-size:.77rem;font-weight:500;line-height:1.4}.finding code,.finding small{color:var(--muted);font-size:.66rem;line-height:1.4}.change-value{display:flex;align-items:center;justify-content:end;flex-wrap:wrap;gap:.3rem;max-width:48%;flex-shrink:0;font-size:.73rem;text-align:end;overflow-wrap:anywhere}.from{color:var(--muted)}.change-value small{width:100%;color:var(--muted);font-size:.67rem}.group-members{display:flex;flex-direction:column;gap:.55rem}.group-shape{display:flex;flex-wrap:wrap;gap:.45rem;margin-top:.7rem;font:.66rem/1.5 monospace;overflow-wrap:anywhere}.group-shape>span{min-width:0}.empty{padding:.7rem .8rem}.more{margin:.5rem .8rem .7rem;font-size:.72rem}.placeholder{padding:4rem 1rem;text-align:center;color:var(--muted);font-size:.85rem}.identical{color:var(--green);font-size:.82rem;padding-block:.5rem}.error,.warning{font-size:.75rem;line-height:1.5;margin-top:.5rem;overflow-wrap:anywhere}.error{color:var(--critical)}.warning{color:var(--yellow)}dialog>.error{padding:0 1.3rem .6rem}@media(width<=650px){.pickers{gap:.5rem;padding-inline:.8rem}.columns{grid-template-columns:minmax(0,1fr);gap:0}.summary{grid-template-columns:repeat(2,minmax(0,1fr))}.summary>div{padding:.6rem}.results-head p{flex-basis:100%}.search{width:100%}header,.results{padding-inline:.8rem}.change-row{flex-wrap:wrap}.change-value{max-width:100%}}
|
|
27
27
|
`,K=()=>({key:``,name:``,report:null,error:``,loading:!1}),q=(e,t)=>e.map(e=>e===null?`Not supplied`:t===`confidence`?`${e}/10`:String(e).replaceAll(`_`,` `)).join(` / `),J=50,Yr=class extends S{static styles=[...S.styles,L(Jr)];static properties={_names:{state:!0},_sides:{state:!0},_catalogError:{state:!0},_catalogLoading:{state:!0},_diff:{state:!0},_query:{state:!0},_limits:{state:!0}};constructor(){super(),this._names=[],this._sides=[K(),K()],this._tokens=[0,0],this._catalogError=``,this._catalogLoading=!0,this._diff=null,this._query=``,this._limits={}}beforeOpen(){this._loadCatalog()}focusInitial(){this.renderRoot.querySelector(`select`)?.focus()}async _loadCatalog(){try{let e=await jt();if(this._settled)return;this._names=e.filter(e=>ge(e)!==Ft);let t=this._names.includes(A.currentFile)?A.currentFile:this._names[0];t&&!this._tokens[0]&&this._select(0,t);let n=this._names.find(e=>e!==t);n&&!this._tokens[1]&&this._select(1,n)}catch(e){this._settled||(this._catalogError=`Couldn't list saved reports: ${e.message}`)}finally{this._settled||(this._catalogLoading=!1)}}_setSide(e,t){this._sides=this._sides.map((n,r)=>r===e?t:n),this._limits={};let[n,r]=this._sides.map(e=>e.report);this._diff=n&&r?qr(n,r):null}async _select(e,t,n){let r=++this._tokens[e],i={...K(),key:n?``:t,name:t,loading:!!t};if(this._setSide(e,i),t)try{let a=n?await n.text():await Nt(t);if(this._settled||this._tokens[e]!==r)return;this._setSide(e,{...i,loading:!1,report:Ur(a)})}catch(n){!this._settled&&this._tokens[e]===r&&this._setSide(e,{...i,loading:!1,error:`Couldn't read ${t}: ${n.message}`})}}_file(e,t){let n=t.target.files?.[0];t.target.value=``,n&&this._select(e,n.name,n)}_swap(){this._sides.some(e=>e.loading)||(this._tokens=this._tokens.map(e=>e+1),this._sides=this._sides.toReversed(),this._setSide(0,this._sides[0]))}_picker(e){let t=this._sides[e],n=e===0?`Before`:`After`;return R`<section class="picker"><label for="${`report-${e}`}">${n}</label> <select id="${`report-${e}`}" @change="${t=>this._select(e,t.target.value)}"><option value="" .selected="${!t.key}">${t.name&&!t.key?t.name:`Choose a saved report…`}</option>${this._names.map(e=>R`<option value="${e}" .selected="${t.key===e}">${e}</option>`)}</select><div class="file-picker"><label class="file-button">Open file…<input type="file" accept=".json,.md,.markdown" aria-label="${`Open ${n.toLowerCase()} report file`}" @change="${t=>this._file(e,t)}"></label> <span class="muted">${t.loading?`Reading report…`:t.report?`${t.report.byId.size.toLocaleString()} unique findings`:`JSON or Markdown`}</span></div>${t.error?R`<p class="error" role="alert">${t.error}</p>`:z} ${t.report?.missingIds?R`<p class="warning">${t.report.missingIds} findings without an id excluded.</p>`:z}</section>`}_finding(e){let t=this._diff.after.byId.get(e)?.[0]??this._diff.before.byId.get(e)?.[0];return R`<span class="finding"><strong>${F(t)||e}</strong><code>${e}</code>${t.file?R`<small>${t.file}</small>`:z}</span>`}_matches(e){let t=this._query.trim().toLowerCase();return!t||[e,...[...this._diff.before.byId.get(e)??[],...this._diff.after.byId.get(e)??[]].flatMap(e=>[F(e),e.file])].filter(Boolean).some(e=>e.toLowerCase().includes(t))}_section(e,t,n,r,i=``){let a=n.filter(e=>(Array.isArray(e)?e:[e.id??e]).some(e=>this._matches(e))),o=this._limits[e]??J;return R`<section class="${`change-section ${i}`}" aria-label="${t}"><h4>${t}<span class="count">${this._query.trim()?`${a.length} / `:``}${n.length}</span></h4>${a.length>0?R`<ul>${a.slice(0,o).map(r)}</ul>`:R`<p class="empty">${n.length>0?`No matching findings.`:`No changes.`}</p>`} ${a.length>o?R`<button class="more" @click="${()=>{this._limits={...this._limits,[e]:o+J}}}">Show ${Math.min(J,a.length-o)} more (${a.length-o} remaining)</button>`:z}</section>`}_changeRow(e,t){let n=t===`severity`&&JSON.stringify(e.originalBefore)!==JSON.stringify(e.originalAfter);return R`<li class="change-row">${this._finding(e.id)}<span class="change-value"> <span class="from">${q(e.before,t)}</span><span aria-label="to">→</span><span>${q(e.after,t)}</span> ${n?R`<small>Original: ${q(e.originalBefore)} → ${q(e.originalAfter)}</small>`:z}</span></li>`}_presenceRow(e,t){let n=q(W(t,e,`verdict`));return R`<li class="change-row">${this._finding(e)}<span class="change-value"> <span>${q(W(t,e,`severity`))}</span><span>${q(W(t,e,`confidence`),`confidence`)}</span> ${n===`Not supplied`?z:R`<small>${n}</small>`}</span></li>`}_groupRow(e){let t=new Set(e),n=e=>e.rows.map(e=>e.filter(e=>t.has(e))).filter(e=>e.length).map(e=>e.join(`, `)).filter((e,t,n)=>n.indexOf(e)===t).join(` | `);return R`<li class="group-row"><div class="group-members">${e.map(e=>this._finding(e))}</div><div class="group-shape"><span class="from">${n(this._diff.before)}</span><span aria-label="to">→</span><span>${n(this._diff.after)}</span></div></li>`}_verdictCount(e,t){return[...e.byId.keys()].filter(n=>W(e,n,`verdict`).includes(t)).length}_results(){let e=this._diff;return e?R`<div class="summary" aria-label="Comparison summary"><div><span>Unique findings</span><strong>${e.before.byId.size} → ${e.after.byId.size}</strong></div><div><span>In common</span><strong>${e.shared.length}</strong></div><div class="verdict-confirmed"><span>Confirmed</span><strong>${this._verdictCount(e.before,`confirmed`)} → ${this._verdictCount(e.after,`confirmed`)}</strong></div><div class="verdict-refuted"><span>Refuted</span><strong>${this._verdictCount(e.before,`refuted`)} → ${this._verdictCount(e.after,`refuted`)}</strong></div></div><div class="change-counts" aria-label="Change counts"><span>${e.added.length} added</span><span>${e.removed.length} removed</span> <span>${e.joined.length} joined</span><span>${e.split.length} split</span> <span>${e.confidence.length} confidence</span><span>${e.severity.length} severity</span></div><div class="results-head"><p>Changes from <strong>${this._sides[0].name}</strong> to <strong>${this._sides[1].name}</strong>.</p><input class="search" type="search" aria-label="Filter comparison findings" placeholder="Filter by id, title or file…" .value="${this._query}" @input="${e=>{this._query=e.target.value,this._limits={}}}"></div>${e.shared.length===0&&(e.before.missingIds||e.after.missingIds)?R`<p class="warning" role="status">No shared ids to compare. Findings without ids cannot be matched.</p>`:e.unchanged?R`<p class="identical" role="status">No differences in finding ids, grouping, verdicts, confidence or severity.</p>`:z}<h3 class="section-title">Findings</h3><div class="columns">${this._section(`added`,`Added`,e.added,t=>this._presenceRow(t,e.after),`positive`)} ${this._section(`removed`,`Removed`,e.removed,t=>this._presenceRow(t,e.before),`negative`)}</div><h3 class="section-title">Revalidation</h3><p class="note">Changed verdicts for shared ids, grouped by the after report’s verdict.</p><div class="columns">${this._section(`confirmed`,`Confirmed`,e.confirmed,e=>this._changeRow(e,`verdict`),`verdict-confirmed`)} ${this._section(`refuted`,`Refuted`,e.refuted,e=>this._changeRow(e,`verdict`),`verdict-refuted`)}</div>${e.otherVerdicts.length>0?this._section(`other`,`Other verdict changes`,e.otherVerdicts,e=>this._changeRow(e,`verdict`)):z}<h3 class="section-title">Grouping</h3><p class="note">Only shared ids. Each cluster connects changed pairs; added or removed findings do not count as regrouping.</p><div class="columns">${this._section(`joined`,`Joined`,e.joined,e=>this._groupRow(e),`positive`)} ${this._section(`split`,`Split`,e.split,e=>this._groupRow(e),`negative`)}</div><h3 class="section-title">Ratings</h3><p class="note">Shared ids only. Severity includes report corrections; changes to original severity are also shown.</p><div class="columns">${this._section(`confidence`,`Confidence changes`,e.confidence,e=>this._changeRow(e,`confidence`))} ${this._section(`severity`,`Severity changes`,e.severity,e=>this._changeRow(e,`severity`))}</div>`:R`<p class="placeholder" role="status">${this._sides.some(e=>e.loading)||this._catalogLoading?`Loading reports…`:`Choose two saved reports or open two files to compare.`}</p>`}render(){return R`<dialog aria-labelledby="compare-title" @close="${this._onClose}"><header><div><h3 id="compare-title">Compare reports</h3><p>Compare findings, grouping and ratings between two reports.</p></div><button aria-label="Close report comparison" @click="${this._onClose}">Close</button></header><div class="pickers">${this._picker(0)}<button class="swap" aria-label="Swap before and after reports" ?disabled="${this._sides.some(e=>e.loading)}" @click="${this._swap}">⇄</button>${this._picker(1)}</div>${this._catalogError?R`<p class="error" role="alert">${this._catalogError} You can still open files directly.</p>`:z}<div class="results">${this._results()}</div></dialog>`}};customElements.define(`report-compare-dialog`,Yr);function Xr(){if(Ot())throw Error(`Report comparison is available in local/E2E mode.`);return C(`report-compare-dialog`)}var Zr=`dialog{--issue-open: var(--green);--issue-merged: #a371f7;--issue-closed: var(--critical);--issue-quiet: var(--muted);--claude: #d97757;width:min(94vw,52rem);max-width:none;max-height:calc(100dvh - 7rem);padding:0;overflow:hidden}dialog[open]{display:flex;flex-direction:column}header{display:flex;align-items:start;gap:.6rem;flex-shrink:0;padding:.8rem 1rem;border-bottom:1px solid var(--border)}header h3{display:flex;align-items:baseline;gap:.5rem;flex:1;min-width:0;margin:0;font-size:1rem;line-height:1.35;overflow-wrap:anywhere}header button{flex-shrink:0;border:0;background:transparent;color:var(--muted);font-family:inherit;font-size:1.4rem;line-height:1;padding:0 .25rem;&:hover{color:var(--text)}&.back{font-size:1.1rem}}.repo-item-body{display:flex;flex-direction:column;gap:.75rem;min-height:0;padding:.9rem 1rem 1rem;overflow:auto;overscroll-behavior:contain;font-size:.85rem}.repo-item-number{color:var(--muted);font-weight:400;font-variant-numeric:tabular-nums}.repo-item-meta{display:flex;flex-wrap:wrap;align-items:center;gap:.3rem .9rem;color:var(--muted)}.repo-item-meta strong{color:var(--text);font-weight:500}code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.9em;color:var(--text)}.repo-item-badge{--state: var(--issue-open);padding:.1rem .55rem;border-radius:999px;background:var(--state);color:var(--surface);font-weight:500;&.is-merged,&.is-completed{--state: var(--issue-merged)}&.is-closed{--state: var(--issue-closed)}&.is-draft,&.is-not-planned{--state: var(--issue-quiet)}}svg{flex:none;width:14px;height:14px;fill:none;stroke:currentcolor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}svg .fill{fill:currentcolor;stroke:none}svg .dotted{stroke-dasharray:1 2.2}.repo-item-state{--state: var(--issue-open);display:inline-flex;align-self:center;color:var(--state);&.is-merged,&.is-completed{--state: var(--issue-merged)}&.is-closed{--state: var(--issue-closed)}&.is-draft,&.is-not-planned{--state: var(--issue-quiet)}}.repo-item-mark{display:inline-flex;align-items:center;gap:.25rem;& svg{width:12px;height:12px}&.is-approved,&.is-success{color:var(--green)}&.is-changes,&.is-failure{color:var(--critical)}&.is-pending{color:var(--medium)}}.is-added{color:var(--green)}.is-deleted{color:var(--critical)}npm-delta{display:inline-block;flex:none;min-width:1px;min-height:1em}.npm-delta{flex:none;color:var(--muted);font-size:.7rem;white-space:nowrap;font-variant-numeric:tabular-nums}.npm-delta-typeless{margin-left:.35em;opacity:.8}.repo-item-labels{display:flex;flex-wrap:wrap;gap:.3rem}.repo-item-label{padding:0 .45rem;border:1px solid var(--border);border-radius:999px;font-size:.75rem;line-height:1.5;&:before{content:"";display:inline-block;width:.5rem;height:.5rem;margin-right:.3rem;border-radius:50%;background:var(--label, var(--muted));vertical-align:middle}}.repo-item-agents{display:inline-flex;align-items:center;align-self:start;gap:.25rem;height:1lh}.agent-mark{display:inline-flex}.agent-mark :is(svg,img){width:16px;height:16px}.agent-mark:is(.is-claude,.is-codex,.is-copilot) svg{fill:currentcolor;stroke:none}.agent-mark.is-claude svg{color:var(--claude)}.agent-logo{display:inline-flex}.agent-logo svg{flex:none}.agent-avatar{border-radius:3px}.repo-item-section{& h4{margin:0 0 .3rem;color:var(--muted);font-size:.72rem;font-weight:600;letter-spacing:.04em;text-transform:uppercase}& h4.repo-item-deps-heading{display:flex;align-items:center;justify-content:space-between;gap:.5rem;min-height:1.6rem}& ul{margin:0;padding:0;list-style:none;border:1px solid var(--border);border-radius:var(--ui-radius, 6px);overflow:hidden}& li+li{border-top:1px solid var(--border)}}.dependency-review-copy-button{display:inline-flex;align-items:center;justify-content:center;width:1.6rem;height:1.6rem;padding:0;border:0;border-radius:var(--ui-radius, 4px);background:transparent;color:var(--muted);&:hover{background:var(--surface-active);color:var(--text)}&.copied{color:var(--green)}& svg{width:.9rem;height:.9rem}}.repo-item-row{display:flex;align-items:center;gap:.5rem;width:100%;padding:.35rem .6rem;border:0;background:none;color:var(--text);font:inherit;text-align:left;text-decoration:none;&:hover{background:var(--surface-active)}&:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}}.repo-item-title{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.review-row{display:flex;flex-wrap:wrap;align-items:center;gap:.25rem .7rem;padding:.35rem .6rem;& time{margin-left:auto;color:var(--muted);font-variant-numeric:tabular-nums}}.review-state{display:inline-flex;align-items:center;gap:.25rem;& svg{width:12px;height:12px}&.is-approved>svg{color:var(--green)}&:is(.is-changes,.is-failed)>svg{color:var(--critical)}&.is-running>svg{color:var(--medium)}&:is(.is-commented,.is-dismissed,.is-requested){color:var(--muted)}}.review-on{color:var(--muted);& a{color:var(--text);text-decoration:none;&:hover{color:var(--accent)}}}.review-path{flex:none;max-width:45%;margin-left:auto;overflow:hidden;color:var(--muted);text-overflow:ellipsis;white-space:nowrap}.review-severity{flex:none;padding:0 .35rem;border-radius:999px;background:var(--low);color:#fff;font-size:.68rem;font-weight:600;line-height:1.5;&.is-p0{background:var(--critical)}&.is-p1{background:var(--high)}&.is-p2{background:var(--medium);color:#000}}.repo-item-lockfiles+.repo-item-lockfiles{margin-top:.6rem}.repo-item-lockfiles>p{margin:0 0 .3rem;overflow-wrap:anywhere}.repo-item-version{color:var(--muted)}.repo-item-was{flex:0 1000 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted)}span.repo-item-row:hover{background:none}.repo-item-review{display:inline-flex;align-items:center;gap:.2rem;flex:none;font-size:.75rem;font-variant-numeric:tabular-nums;&.is-passed{color:var(--green)}&.is-wanted{color:var(--medium)}&.is-failed{color:var(--critical)}& svg{width:12px;height:12px}}.repo-item-failed{margin-bottom:.6rem;>p{margin:0 0 .3rem;color:var(--critical)}}.repo-item-unreviewed{margin-top:.6rem;& summary{color:var(--medium);cursor:default}& ul{margin-top:.3rem}}.repo-item-tag{flex:none;padding:0 .4rem;border:1px solid var(--border);border-radius:999px;color:var(--muted);font-size:.72rem;line-height:1.5;&.is-new{border-color:currentcolor;color:var(--medium)}}.repo-item-description{padding-top:.75rem;border-top:1px solid var(--border);white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6}.repo-item-quiet{color:var(--muted)}.nwd-actions{margin:0;padding:.6rem 1rem}.nwd-actions a{border:1px solid var(--border);border-radius:var(--ui-radius, 5px);padding:.35rem .9rem;color:var(--text);font-size:.8rem;text-decoration:none;&:hover{border-color:var(--accent);color:var(--accent)}&.primary{background:var(--accent);border-color:var(--accent);color:var(--surface);&:hover{color:var(--surface);filter:brightness(1.08)}}&:focus-visible{outline:2px solid var(--accent);outline-offset:2px}}a,button{cursor:default}:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}.repo-item-body:focus{outline:none}
|
|
28
28
|
`,Qr=`.app-user{display:inline-flex;align-items:center;gap:.3em;min-width:0;max-width:100%;vertical-align:bottom}.app-user-avatar{position:relative;display:inline-flex;align-items:center;justify-content:center;flex:none;width:1.6em;height:1.6em;overflow:hidden;border-radius:50%;background:var(--surface-active);color:var(--muted);font-size:.7em;font-weight:600;line-height:1;& img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}}.app-user-mark{display:inline-flex;flex:none;width:1.15em;height:1.15em;& svg{flex:none;width:100%;height:100%;fill:currentcolor;stroke:none}& img{width:100%;height:100%;border-radius:3px;object-fit:cover}&.is-claude{color:var(--claude, #d97757)}&:is(.is-codex,.is-copilot){color:var(--text)}}.app-user-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.commit-avatars{display:inline-flex;flex:none;isolation:isolate}.commit-avatar{position:relative;display:inline-flex;align-items:center;justify-content:center;flex:none;width:1.6em;height:1.6em;overflow:hidden;border-radius:50%;box-shadow:0 0 0 1.5px var(--bg);background:var(--surface-active);color:var(--muted);font-size:.7em;font-weight:600;line-height:1;+.commit-avatar{margin-left:-.45em}&:nth-child(1){z-index:4}&:nth-child(2){z-index:3}&:nth-child(3){z-index:2}& img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}& svg{flex:none;width:62%;height:62%;fill:currentcolor;stroke:none}&.is-claude{background:#d97757;color:#fff}&.is-codex{background:#fff;color:#000}&.is-copilot{background:#0d1117;color:#fff}&:is(.is-codex,.is-copilot){box-shadow:0 0 0 1.5px var(--bg),inset 0 0 0 1px var(--border)}}
|
|
29
|
-
`,$r={open:[`open`,`Open`],merged:[`merged`,`Merged`],closed:[`closed`,`Closed`],branch:[`draft`,`A branch alone`]},Y=e=>e==null?``:new Date(e).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`}),X=(e,t)=>`${e.toLocaleString(`en-US`)} ${t}${e===1?``:`s`}`,Z=(e,t,n=!1)=>e?R`<a class="${n?`primary`:``}" href="${e}" target="_blank" rel="noopener noreferrer">${t}</a>`:z,ei={mirror:`mirror`,git:`git`,tarball:`tarball`,file:`file`},ti={"lockfile-unreadable":`A lockfile here couldn’t be read`,"lockfile-unsupported":`Bun’s lockfile here isn’t read`,"github-not-found":`GitHub has none of a lockfile here at a commit compared`},ni=6e4,Q=new Map,ri=(e,t)=>`${A.managedSession?.id}\0${A.managedSession?.role}\0${e}\0${t}`,ii=class extends S{static styles=[...S.styles,L(an),L(e),L(t),L(Qr),L(Zr)];static properties={repository:{attribute:!1},target:{attribute:!1},_trail:{state:!0},_items:{state:!0}};constructor(){super(),this._trail=[],this._items=new Map,this._controller=new AbortController}connectedCallback(){super.connectedCallback(),this._unsubscribe=je(e=>{(!e||e.repoId===this.repository?.repoId&&e.number===this._trail.at(-1)?.number)&&this.requestUpdate()}),this._unobserve=b(e=>{u(),e||this.requestUpdate()}),this._trail.length===0&&this.target&&this.open(this.target)}disconnectedCallback(){this._controller.abort(),this._unsubscribe?.(),this._unobserve?.(),super.disconnectedCallback()}focusInitial(){this.renderRoot.querySelector(`.repo-item-body`)?.focus()}open(e){if(this._trail=[...this._trail,e],e.number==null||this._items.has(e.number))return;let t=e.number,{repoId:n}=this.repository,r=Q.get(ri(n,t));r&&Date.now()-r.at<ni?this._items=new Map(this._items).set(t,{status:`ready`,item:r.item}):(this._items=new Map(this._items).set(t,{status:`loading`}),pe(n,t,{signal:this._controller.signal}).then(e=>{c(n,[e],s(e));for(let[e,{at:t}]of Q)Date.now()-t>=ni&&Q.delete(e);return Q.set(ri(n,t),{item:e,at:Date.now()}),{status:`ready`,item:e}},e=>e?.name===`AbortError`?null:{status:`error`,error:e?.message||`It could not be read.`}).then(e=>(e&&(this._items=new Map(this._items).set(t,e)),null)))}back(){this._trail=this._trail.slice(0,-1)}render(){let e=this._trail.at(-1);if(!e)return z;let[t,n,r]=e.session?this.renderSession(e.session):this.renderItem(e);return R`<dialog aria-labelledby="repo-item-title" @close="${this._onClose}" @click="${this._onBackdrop}"><header>${this._trail.length>1?R`<button type="button" class="back" aria-label="Back" @click="${()=>this.back()}">←</button>`:z}<h3 id="repo-item-title">${t}</h3><button type="button" aria-label="Close" @click="${this._onClose}">×</button></header><div class="repo-item-body" tabindex="-1">${n}</div><div class="nwd-actions"><span class="nwd-spacer"></span>${r}</div></dialog>`}renderItem({number:e,preview:t}){let n=this._items.get(e),r=l(this.repository.repoId,e)?.item,i=r?{...t,...n?.item,...r}:n?.item??t??null,a=i?.kind??`issues`,s=this.repository.repo,c=s?`https://github.com/${s}/${a===`pulls`?`pull`:`issues`}/${e}`:null,[u,d]=i?ct(a,i):[`open`,``],f=R`${i?R`<span class="${`repo-item-state is-${u}`}" role="img" aria-label="${d}">${Ge[a][u]}</span>`:z} <span>${i?.title||`(no title)`} <span class="repo-item-number">#${e}</span></span>`,p=n?.status===`ready`?n.item:null,m=a===`pulls`,h=([e,t],n)=>R`<span class="${`repo-item-mark is-${n}`}">${t}${e}</span>`;return[f,R`<p class="repo-item-meta">${i?R`<span class="${`repo-item-badge is-${u}`}">${d}</span>`:z} ${i?.author?R`<span><strong>${k(i.author)}</strong> opened ${Y(i.createdAt)}</span>`:i?.createdAt?R`<span>Opened ${Y(i.createdAt)}</span>`:z} ${i?.state===`merged`?R`<span>merged${p?.mergedBy?R` by <strong>${k(p.mergedBy)}</strong>`:z} ${Y(i.mergedAt??i.closedAt)}</span>`:i?.closedAt&&i.state!==`open`?R`<span>closed ${Y(i.closedAt)}</span>`:z} ${i?.comments>0?R`<span class="repo-item-mark">${qe}${X(i.comments,`comment`)}</span>`:z}</p>${i?.labels?.length>0?R`<p class="repo-item-labels">${i.labels.map(e=>R`<span class="repo-item-label" style="${N(e.color?{"--label":`#${e.color}`}:{})}">${e.name}</span>`)}${i.moreLabels>0?R`<span class="repo-item-label">+${i.moreLabels}</span>`:z}</p>`:z} ${m&&i?.head?R`<p class="repo-item-meta"><span><code>${i.head}</code>${i.base?R` → <code>${i.base}</code>`:z}</span> <span><span class="is-added">+${i.additions.toLocaleString(`en-US`)}</span> <span class="is-deleted">−${i.deletions.toLocaleString(`en-US`)}</span></span> ${p?R`<span>${X(p.commits,`commit`)}</span><span>${X(p.files,`file`)} changed</span>`:z} ${Qe[i.review]&&i.state===`open`?h(Qe[i.review],i.review):z} ${x[i.checks]?h(x[i.checks],i.checks):z}</p>`:z} ${m&&p?o(p.reviews,s):z} ${p?this.renderLinked(m?`Closes`:`Closed by`,m?`issues`:`pulls`,m?p.closes:p.closedBy,p.moreLinked):z} ${m&&Me(i)?this.renderDependencies(e,i.state===`open`):z} ${p?R`<div class="repo-item-description">${p.body?Pe(Ht(p.body)):R`<p class="repo-item-quiet">No description.</p>`}</div>${p.bodyShortened?R`<p class="repo-item-quiet">Shortened here; the rest of it is on GitHub.</p>`:z}`:n?.status===`error`?R`<p class="repo-item-quiet" role="alert">${n.error}</p>`:R`<p class="repo-item-quiet" role="status">Reading it…</p>`}`,Z(c,`Open on GitHub`,!0)]}renderDependencies(e,t){let n=Re(this.repository.repoId,e,t);if(n.status===`ready`&&n.lockfiles.length===0&&!n.cut)return z;let r=n.status===`loading`?R`<p class="repo-item-quiet" role="status">Reading its lockfiles…</p>`:n.status===`error`?R`<p class="repo-item-quiet" role="alert">${n.error}</p>`:this.renderAdded(n);return R`<section class="repo-item-section"><h4 class="repo-item-deps-heading">New dependency versions${n.formatted?R`<dependency-review-copy .text="${n.formatted}" .label="${`Copy your dependency reviews of its versions`}"></dependency-review-copy>`:z}</h4>${r}</section>`}renderAdded(e){let{lockfiles:t,cut:n,review:r}=e,i=t.filter(e=>e.error||e.added.length>0),a=r?He(e):null;return R`${r?R`${this.renderReviewTerms(r)}${this.renderFailures(Ue(e),r)}`:z} ${i.length===0&&t.length>0?R`<p class="repo-item-quiet">None: every version its lockfiles lock, they locked before.</p>`:z} ${i.map(t=>R`<div class="repo-item-lockfiles"><p>${t.paths.map((e,t)=>R`${t>0?`, `:``}<code>${e}</code>`)}</p>${Ie(t)?R`<p class="repo-item-quiet" role="status">Stasis is still working out what its entries reach, which can take a few minutes. It is asked again as it does.</p>`:t.error===`stasis-failed`?R`<p class="repo-item-quiet" role="alert">Stasis couldn’t work out what its entries reach (${t.detail??`build-failed`}).</p>`:t.error?R`<p class="repo-item-quiet" role="alert">${ti[t.error]??`These lockfiles couldn’t be read`}${t.detail?`: ${t.detail}`:`.`}</p>`:R`<ul>${t.added.toSorted((e,t)=>+!!e.was-!!t.was).map(t=>R`<li>${this.renderPackage(t,r,!1,e.head)}</li>`)}</ul>${t.more>0?R`<p class="repo-item-quiet">and ${t.more.toLocaleString(`en-US`)} more</p>`:z}`}</div>`)} ${a?.count>0?R`<details class="repo-item-unreviewed"><summary>${X(a.count,`other version`)} in its lockfiles ${a.count===1?`wants`:`want`} reviews</summary><ul>${a.versions.map(t=>R`<li>${this.renderPackage(t,r,!0,e.head)}</li>`)}</ul>${a.count>a.versions.length?R`<p class="repo-item-quiet">and ${(a.count-a.versions.length).toLocaleString(`en-US`)} more</p>`:z}</details>`:z} ${n?R`<p class="repo-item-quiet">It changes more files, or lockfiles in more directories, than are read; those past them aren’t told.</p>`:z}`}renderReviewTerms({required:e,since:t,reviewedDependencies:n,unasked:r,baselineError:i,baselineUnread:a=[],commentReviews:o,commentsFailed:s,lockfiles:c}){let l=a.slice(0,5);return R`<p class="repo-item-quiet">Each version needs ${X(e,`full, accepting review`)} by as many reviewers${n?`, or the server’s reviewed dependencies to pass it`:t?R`; those the repository’s lockfiles locked at <code>${t.slice(0,7)}</code> need none`:z}.</p>${i?R`<p class="repo-item-quiet" role="alert">The versions its lockfiles locked at that commit couldn’t be read (${i}), so every version wants its reviews.</p>`:z} ${l.length>0?R`<p class="repo-item-quiet" role="alert">At that commit, ${l.map((e,t)=>R`${t>0?`, `:``}<code>${e}</code>`)}${a.length>l.length?` and ${(a.length-l.length).toLocaleString(`en-US`)} more`:``} couldn’t be read, so the versions ${a.length===1?`it`:`they`} locked want reviews.</p>`:z} ${r?R`<p class="repo-item-quiet" role="alert">The server’s reviewed dependencies didn’t answer for ${X(r,`version`)}, so ${r===1?`it wants`:`they want`} reviews.</p>`:z} ${o?R`<p class="repo-item-quiet">Reviews in its comments by ${X(o,`reviewer`)} count too while it is open.</p>`:z} ${s?R`<p class="repo-item-quiet" role="alert">Its comments couldn’t be read for reviews, so none of theirs count.</p>`:z} ${c?R`<p class="repo-item-quiet">${c.mode===`include`?`Only these lockfiles are reviewed: `:`These lockfiles aren’t reviewed: `}${c.paths.length===0?`none`:c.paths.map((e,t)=>R`${t>0?`, `:``}<code>${e}</code>`)}.</p>`:z}`}renderFailures(e,t){if(!e)return z;let{versions:n,count:r,unread:i,unchecked:a,cut:o}=e;return R`<div class="repo-item-failed" role="alert">${r>0?R`<p>Its review fails: ${X(r,`version`)} its lockfiles lock can’t be reviewed, as only npm’s registry’s, locked with an integrity, are.</p><ul>${n.map(e=>R`<li>${this.renderPackage(e,t,!0)}</li>`)}</ul>${r>n.length?R`<p class="repo-item-quiet">and ${(r-n.length).toLocaleString(`en-US`)} more</p>`:z}`:z} ${i.length>0||a>0||o?R`<p>Its review fails: not every lockfile it changes was read${a>0?`, and they lock ${X(a,`version`)} past those checked`:``}.</p>`:z}</div>`}renderPackage(e,t=null,n=!1,r=null){let{name:i,version:a,source:o,from:s,dev:c,was:l}=e,u=(o===`registry`||o===`mirror`)&&a,d=n?void 0:l?.find(e=>e!==a),f=e.patch?.path&&r?{hash:e.patch.hash,repoId:this.repository.repoId,commit:r,path:e.patch.path}:null,p=f&&!n&&l?.includes(a)?a:d,m=u&&(!e.patch||f)&&t?.canReview&&y(e,t)!==`unsupported`?P({view:`npm`,packageName:i,packageSpec:a,bundleTab:`review`,...p?{reviewPackage:i,reviewSpec:p}:{},...f?{patch:f}:{}}):null,h=u?m||d&&P({view:`npm`,packageName:i,packageSpec:a,bundleTab:`compare`,compareSpec:d})||P({view:`npm`,packageName:i,packageSpec:a}):null,g=R`${st}<span class="repo-item-title">${i}${a?R`<span class="repo-item-version">@${a}</span>`:z}</span> ${n?z:l?R`<span class="repo-item-was" data-tooltip-truncated data-tooltip="${`Was ${l.join(`, `)}`}">from ${l.join(`, `)}</span>`:R`<span class="repo-item-tag is-new" data-tooltip="Its lockfiles locked no version of it before">new</span>`} ${this.renderReview(e,t)} ${o===`registry`&&a&&!e.patch&&y(e,t)===`wanted`?R`<npm-delta .name="${i}" .version="${a}" .base="${d??`(empty)`}"></npm-delta>`:z} ${c?R`<span class="repo-item-tag" data-tooltip="Only devDependencies need it">dev</span>`:z} ${e.patch?R`<span class="repo-item-tag" data-tooltip="${e.patch.path?`pnpm patches it as it installs it, by ${e.patch.path}, which its reviews are of`:`pnpm patches it as it installs it, by a patch whose file isn’t known, which reviews here can’t read`}">patched</span>`:z} ${ei[o]?R`<span class="repo-item-tag" data-tooltip="${s??z}">${ei[o]}</span>`:z}`;return h?R`<a class="repo-item-row" href="${h}" target="_blank" rel="noopener noreferrer">${g}</a>`:R`<span class="repo-item-row">${g}</span>`}renderReview(e,t){let n=y(e,t);if(n===`unsupported`)return R`<span class="repo-item-review is-failed" data-tooltip="${Fe[e.unsupported]}">can’t review</span>`;if(e.reviewed&&n===`passed`)return R`<span class="repo-item-review is-passed" data-tooltip="The server’s reviewed dependencies pass it">${x.success[1]}reviewed</span>`;if(e.rejected)return R`<span class="repo-item-review is-failed" data-tooltip="A reviewer rejects it: it wants their newer accepting review">rejected</span>`;if(n===`baseline`)return R`<span class="repo-item-tag" data-tooltip="Locked at the commit reviews are counted since: it needs none">baseline</span>`;if(!n)return z;let r=`${X(e.reviews,`full, accepting review`)} of ${t.required} required`;return R`<span class="${`repo-item-review is-${n}`}" data-tooltip="${r}">${n===`passed`?x.success[1]:z}${e.reviews}/${t.required}</span>`}renderLinked(e,t,n,r=0){return!n?.length&&!r?z:R`<section class="repo-item-section"><h4>${e}</h4>${n?.length?R`<ul>${n.map(e=>{let n={...e,kind:t,labels:[],comments:0},[r,i]=ct(t,n);return R`<li><button type="button" class="repo-item-row" @click="${()=>this.open({number:e.number,preview:n})}"><span class="${`repo-item-state is-${r}`}" role="img" aria-label="${i}">${Ge[t][r]}</span> <span class="repo-item-number">#${e.number}</span><span class="repo-item-title">${e.title||`(no title)`}</span></button></li>`})}</ul>`:z}${r>0?R`<p class="repo-item-quiet">${n?.length?`and `:``}${r.toLocaleString(`en-US`)} more, on GitHub</p>`:z}</section>`}renderSession(e){let t=this.repository.repo,[n,r]=$r[e.state]??$r.branch,i=e.pulls.length+e.commits.length,a=R`<span class="repo-item-agents">${e.agents.map(e=>R`<span class="${`agent-mark is-${e}`}" role="img" aria-label="${ft(e)}">${pt(e)}</span>`)}</span><span>${e.title||`(no title)`}</span>`,o=_t(e);return[a,R`<p class="repo-item-meta"><span class="${`repo-item-badge is-${n}`}">${r}</span> ${e.authors.length>0?R`<span><strong>${Et(e.authors).map((e,t)=>R`${t>0?`, `:``}${k(e)}`)}</strong></span>`:z} ${e.startedAt==null?z:R`<span>${Y(e.startedAt)}${e.updatedAt!=null&&Y(e.updatedAt)!==Y(e.startedAt)?` \u2013 ${Y(e.updatedAt)}`:``}</span>`} <span>${i>0?X(i,`task`):`no pull request`}</span> ${e.additions||e.deletions?R`<span><span class="is-added">+${e.additions.toLocaleString(`en-US`)}</span> <span class="is-deleted">−${e.deletions.toLocaleString(`en-US`)}</span></span>`:z}</p>${this.renderLinked(`Pull requests`,`pulls`,e.pulls)} ${e.commits.length>0?R`<section class="repo-item-section"><h4>Commits to the default branch</h4><ul>${e.commits.map(e=>R`<li><a class="repo-item-row" href="${t?`https://github.com/${t}/commit/${e.oid}`:z}" target="_blank" rel="noopener noreferrer"><code>${e.oid.slice(0,7)}</code><span class="repo-item-title">${e.title||`(no message)`}</span></a></li>`)}</ul></section>`:z} ${this.renderLinked(`Issues`,`issues`,e.issues.map(e=>({...e,reason:null})))} ${e.branches.length>0?R`<section class="repo-item-section"><h4>${e.branches.length===1?`Branch`:`Branches`}</h4><ul>${e.branches.map(e=>R`<li><a class="repo-item-row" href="${t?wt(t,e):z}" target="_blank" rel="noopener noreferrer"><code>${e}</code></a></li>`)}</ul></section>`:z}`,R`${Z(o,e.sessions[0]?`Open in Claude Code`:`Open the Codex task`)}${Z(xt(e,t),`Open on GitHub`,!0)}`]}};customElements.define(`repository-item-dialog`,ii);function ai(e){return C(`repository-item-dialog`,e)}var oi=`dialog{width:min(94vw,880px);max-width:880px}.conflicts-list{list-style:none;display:flex;flex-direction:column;gap:.6rem;max-height:65vh;overflow-y:auto;overscroll-behavior:contain}.conflict-card{padding:.6rem .7rem;border:1px solid var(--border);border-radius:var(--ui-radius, 6px)}.finding-meta{display:flex;flex-wrap:wrap;align-items:center;gap:.4rem;color:var(--muted);font-size:.72rem}.location,code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;overflow-wrap:anywhere}.location{flex:1}h4{margin:.4rem 0 .55rem;font-size:.88rem;font-weight:600;overflow-wrap:anywhere}dt{margin-top:.5rem;color:var(--muted);font-size:.72rem}.variant{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,15rem);gap:.65rem;padding:.4rem 0;font-size:.8rem;+&{border-top:1px solid var(--border)}}.value{white-space:pre-wrap;overflow-wrap:anywhere}.reports{display:flex;flex-wrap:wrap;place-content:start flex-end;gap:.3rem}.report-button{display:inline-flex;align-items:center;gap:.4rem;max-width:100%;min-height:22px;padding:0 .4rem 0 0;border:1px solid var(--border);border-radius:var(--ui-radius, 4px);overflow:hidden;background:var(--bg);color:var(--text);font:inherit;font-size:.72rem;cursor:default;text-align:left;>span:last-child{min-width:0;overflow-wrap:anywhere}&:hover{border-color:var(--accent)}}
|
|
29
|
+
`,$r={open:[`open`,`Open`],merged:[`merged`,`Merged`],closed:[`closed`,`Closed`],branch:[`draft`,`A branch alone`]},Y=e=>e==null?``:new Date(e).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`}),X=(e,t)=>`${e.toLocaleString(`en-US`)} ${t}${e===1?``:`s`}`,Z=(e,t,n=!1)=>e?R`<a class="${n?`primary`:``}" href="${e}" target="_blank" rel="noopener noreferrer">${t}</a>`:z,ei={mirror:`mirror`,git:`git`,tarball:`tarball`,file:`file`},ti={"lockfile-unreadable":`A lockfile here couldn’t be read`,"lockfile-unsupported":`Bun’s lockfile here isn’t read`,"github-not-found":`GitHub has none of a lockfile here at a commit compared`},ni=6e4,Q=new Map,ri=(e,t)=>`${A.managedSession?.id}\0${A.managedSession?.role}\0${e}\0${t}`,ii=class extends S{static styles=[...S.styles,L(an),L(e),L(t),L(Qr),L(Zr)];static properties={repository:{attribute:!1},target:{attribute:!1},_trail:{state:!0},_items:{state:!0}};constructor(){super(),this._trail=[],this._items=new Map,this._controller=new AbortController}connectedCallback(){super.connectedCallback(),this._unsubscribe=je(e=>{(!e||e.repoId===this.repository?.repoId&&e.number===this._trail.at(-1)?.number)&&this.requestUpdate()}),this._unobserve=b(e=>{u(),e||this.requestUpdate()}),this._trail.length===0&&this.target&&this.open(this.target)}disconnectedCallback(){this._controller.abort(),this._unsubscribe?.(),this._unobserve?.(),super.disconnectedCallback()}focusInitial(){this.renderRoot.querySelector(`.repo-item-body`)?.focus()}open(e){if(this._trail=[...this._trail,e],e.number==null||this._items.has(e.number))return;let t=e.number,{repoId:n}=this.repository,r=Q.get(ri(n,t));r&&Date.now()-r.at<ni?this._items=new Map(this._items).set(t,{status:`ready`,item:r.item}):(this._items=new Map(this._items).set(t,{status:`loading`}),pe(n,t,{signal:this._controller.signal}).then(e=>{c(n,[e],s(e));for(let[e,{at:t}]of Q)Date.now()-t>=ni&&Q.delete(e);return Q.set(ri(n,t),{item:e,at:Date.now()}),{status:`ready`,item:e}},e=>e?.name===`AbortError`?null:{status:`error`,error:e?.message||`It could not be read.`}).then(e=>(e&&(this._items=new Map(this._items).set(t,e)),null)))}back(){this._trail=this._trail.slice(0,-1)}render(){let e=this._trail.at(-1);if(!e)return z;let[t,n,r]=e.session?this.renderSession(e.session):this.renderItem(e);return R`<dialog aria-labelledby="repo-item-title" @close="${this._onClose}" @click="${this._onBackdrop}"><header>${this._trail.length>1?R`<button type="button" class="back" aria-label="Back" @click="${()=>this.back()}">←</button>`:z}<h3 id="repo-item-title">${t}</h3><button type="button" aria-label="Close" @click="${this._onClose}">×</button></header><div class="repo-item-body" tabindex="-1">${n}</div><div class="nwd-actions"><span class="nwd-spacer"></span>${r}</div></dialog>`}renderItem({number:e,preview:t}){let n=this._items.get(e),r=l(this.repository.repoId,e)?.item,i=r?{...t,...n?.item,...r}:n?.item??t??null,a=i?.kind??`issues`,s=this.repository.repo,c=s?`https://github.com/${s}/${a===`pulls`?`pull`:`issues`}/${e}`:null,[u,d]=i?ct(a,i):[`open`,``],f=R`${i?R`<span class="${`repo-item-state is-${u}`}" role="img" aria-label="${d}">${Ge[a][u]}</span>`:z} <span>${i?.title||`(no title)`} <span class="repo-item-number">#${e}</span></span>`,p=n?.status===`ready`?n.item:null,m=a===`pulls`,h=([e,t],n)=>R`<span class="${`repo-item-mark is-${n}`}">${t}${e}</span>`;return[f,R`<p class="repo-item-meta">${i?R`<span class="${`repo-item-badge is-${u}`}">${d}</span>`:z} ${i?.author?R`<span><strong>${k(i.author)}</strong> opened ${Y(i.createdAt)}</span>`:i?.createdAt?R`<span>Opened ${Y(i.createdAt)}</span>`:z} ${i?.state===`merged`?R`<span>merged${p?.mergedBy?R` by <strong>${k(p.mergedBy)}</strong>`:z} ${Y(i.mergedAt??i.closedAt)}</span>`:i?.closedAt&&i.state!==`open`?R`<span>closed ${Y(i.closedAt)}</span>`:z} ${i?.comments>0?R`<span class="repo-item-mark">${qe}${X(i.comments,`comment`)}</span>`:z}</p>${i?.labels?.length>0?R`<p class="repo-item-labels">${i.labels.map(e=>R`<span class="repo-item-label" style="${N(e.color?{"--label":`#${e.color}`}:{})}">${e.name}</span>`)}${i.moreLabels>0?R`<span class="repo-item-label">+${i.moreLabels}</span>`:z}</p>`:z} ${m&&i?.head?R`<p class="repo-item-meta"><span><code>${i.head}</code>${i.base?R` → <code>${i.base}</code>`:z}</span> <span><span class="is-added">+${i.additions.toLocaleString(`en-US`)}</span> <span class="is-deleted">−${i.deletions.toLocaleString(`en-US`)}</span></span> ${p?R`<span>${X(p.commits,`commit`)}</span><span>${X(p.files,`file`)} changed</span>`:z} ${Qe[i.review]&&i.state===`open`?h(Qe[i.review],i.review):z} ${x[i.checks]?h(x[i.checks],i.checks):z}</p>`:z} ${m&&p?o(p.reviews,s):z} ${p?this.renderLinked(m?`Closes`:`Closed by`,m?`issues`:`pulls`,m?p.closes:p.closedBy,p.moreLinked):z} ${m&&Me(i)?this.renderDependencies(e,i.state===`open`):z} ${p?R`<div class="repo-item-description">${p.body?Pe(Ht(p.body)):R`<p class="repo-item-quiet">No description.</p>`}</div>${p.bodyShortened?R`<p class="repo-item-quiet">Shortened here; the rest of it is on GitHub.</p>`:z}`:n?.status===`error`?R`<p class="repo-item-quiet" role="alert">${n.error}</p>`:R`<p class="repo-item-quiet" role="status">Reading it…</p>`}`,Z(c,`Open on GitHub`,!0)]}renderDependencies(e,t){let n=Re(this.repository.repoId,e,t);if(n.status===`ready`&&n.lockfiles.length===0&&!n.cut)return z;let r=n.status===`loading`?R`<p class="repo-item-quiet" role="status">Reading its lockfiles…</p>`:n.status===`error`?R`<p class="repo-item-quiet" role="alert">${n.error}</p>`:this.renderAdded(n);return R`<section class="repo-item-section"><h4 class="repo-item-deps-heading">New dependency versions${n.formatted?R`<dependency-review-copy .text="${n.formatted}" .label="${`Copy your dependency reviews of its versions`}"></dependency-review-copy>`:z}</h4>${r}</section>`}renderAdded(e){let{lockfiles:t,cut:n,review:r}=e,i=t.filter(e=>e.error||e.added.length>0),a=r?He(e):null;return R`${r?R`${this.renderReviewTerms(r)}${this.renderFailures(Ue(e),r)}`:z} ${i.length===0&&t.length>0?R`<p class="repo-item-quiet">None: every version its lockfiles lock, they locked before.</p>`:z} ${i.map(t=>R`<div class="repo-item-lockfiles"><p>${t.paths.map((e,t)=>R`${t>0?`, `:``}<code>${e}</code>`)}</p>${Ie(t)?R`<p class="repo-item-quiet" role="status">Stasis is still working out what its entries reach, which can take a few minutes. It is asked again as it does.</p>`:t.error===`stasis-failed`?R`<p class="repo-item-quiet" role="alert">Stasis couldn’t work out what its entries reach (${t.detail??`build-failed`}).</p>`:t.error?R`<p class="repo-item-quiet" role="alert">${ti[t.error]??`These lockfiles couldn’t be read`}${t.detail?`: ${t.detail}`:`.`}</p>`:R`<ul>${t.added.toSorted((e,t)=>+!!e.was-!!t.was).map(t=>R`<li>${this.renderPackage(t,r,!1,e.head)}</li>`)}</ul>${t.more>0?R`<p class="repo-item-quiet">and ${t.more.toLocaleString(`en-US`)} more</p>`:z}`}</div>`)} ${a?.count>0?R`<details class="repo-item-unreviewed"><summary>${X(a.count,`other version`)} in its lockfiles ${a.count===1?`wants`:`want`} reviews</summary><ul>${a.versions.map(t=>R`<li>${this.renderPackage(t,r,!0,e.head)}</li>`)}</ul>${a.count>a.versions.length?R`<p class="repo-item-quiet">and ${(a.count-a.versions.length).toLocaleString(`en-US`)} more</p>`:z}</details>`:z} ${n?R`<p class="repo-item-quiet">It changes more files, or lockfiles in more directories, than are read; those past them aren’t told.</p>`:z}`}renderReviewTerms({required:e,since:t,reviewedDependencies:n,unasked:r,baselineError:i,baselineUnread:a=[],commentReviews:o,commentsFailed:s,byComments:c,lockfiles:l}){let u=a.slice(0,5);return R`<p class="repo-item-quiet">Each version needs ${X(e,c?`accepting review`:`full, accepting review`)}${c?` in its comments`:``} by as many reviewers${n?`, or the server’s reviewed dependencies to pass it`:t?R`; those the repository’s lockfiles locked at <code>${t.slice(0,7)}</code> need none`:z}.</p>${i?R`<p class="repo-item-quiet" role="alert">The versions its lockfiles locked at that commit couldn’t be read (${i}), so every version wants its reviews.</p>`:z} ${u.length>0?R`<p class="repo-item-quiet" role="alert">At that commit, ${u.map((e,t)=>R`${t>0?`, `:``}<code>${e}</code>`)}${a.length>u.length?` and ${(a.length-u.length).toLocaleString(`en-US`)} more`:``} couldn’t be read, so the versions ${a.length===1?`it`:`they`} locked want reviews.</p>`:z} ${r?R`<p class="repo-item-quiet" role="alert">The server’s reviewed dependencies didn’t answer for ${X(r,`version`)}, so ${r===1?`it wants`:`they want`} reviews.</p>`:z} ${o&&!c?R`<p class="repo-item-quiet">Reviews in its comments by ${X(o,`reviewer`)} count too while it is open.</p>`:z} ${s?R`<p class="repo-item-quiet" role="alert">Its comments couldn’t be read for reviews, so none of theirs count.</p>`:z} ${l?R`<p class="repo-item-quiet">${l.mode===`include`?`Only these lockfiles are reviewed: `:`These lockfiles aren’t reviewed: `}${l.paths.length===0?`none`:l.paths.map((e,t)=>R`${t>0?`, `:``}<code>${e}</code>`)}.</p>`:z}`}renderFailures(e,t){if(!e)return z;let{versions:n,count:r,unread:i,unchecked:a,cut:o}=e;return R`<div class="repo-item-failed" role="alert">${r>0?R`<p>Its review fails: ${X(r,`version`)} its lockfiles lock can’t be reviewed, as only npm’s registry’s, locked with an integrity, are.</p><ul>${n.map(e=>R`<li>${this.renderPackage(e,t,!0)}</li>`)}</ul>${r>n.length?R`<p class="repo-item-quiet">and ${(r-n.length).toLocaleString(`en-US`)} more</p>`:z}`:z} ${i.length>0||a>0||o?R`<p>Its review fails: not every lockfile it changes was read${a>0?`, and they lock ${X(a,`version`)} past those checked`:``}.</p>`:z}</div>`}renderPackage(e,t=null,n=!1,r=null){let{name:i,version:a,source:o,from:s,dev:c,was:l}=e,u=(o===`registry`||o===`mirror`)&&a,d=n?void 0:l?.find(e=>e!==a),f=e.patch?.path&&r?{hash:e.patch.hash,repoId:this.repository.repoId,commit:r,path:e.patch.path}:null,p=f&&!n&&l?.includes(a)?a:d,m=u&&(!e.patch||f)&&t?.canReview&&y(e,t)!==`unsupported`?P({view:`npm`,packageName:i,packageSpec:a,bundleTab:`review`,...p?{reviewPackage:i,reviewSpec:p}:{},...f?{patch:f}:{}}):null,h=u?m||d&&P({view:`npm`,packageName:i,packageSpec:a,bundleTab:`compare`,compareSpec:d})||P({view:`npm`,packageName:i,packageSpec:a}):null,g=R`${st}<span class="repo-item-title">${i}${a?R`<span class="repo-item-version">@${a}</span>`:z}</span> ${n?z:l?R`<span class="repo-item-was" data-tooltip-truncated data-tooltip="${`Was ${l.join(`, `)}`}">from ${l.join(`, `)}</span>`:R`<span class="repo-item-tag is-new" data-tooltip="Its lockfiles locked no version of it before">new</span>`} ${this.renderReview(e,t)} ${o===`registry`&&a&&!e.patch&&y(e,t)===`wanted`?R`<npm-delta .name="${i}" .version="${a}" .base="${d??`(empty)`}"></npm-delta>`:z} ${c?R`<span class="repo-item-tag" data-tooltip="Only devDependencies need it">dev</span>`:z} ${e.patch?R`<span class="repo-item-tag" data-tooltip="${e.patch.path?`pnpm patches it as it installs it, by ${e.patch.path}, which its reviews are of`:`pnpm patches it as it installs it, by a patch whose file isn’t known, which reviews here can’t read`}">patched</span>`:z} ${ei[o]?R`<span class="repo-item-tag" data-tooltip="${s??z}">${ei[o]}</span>`:z}`;return h?R`<a class="repo-item-row" href="${h}" target="_blank" rel="noopener noreferrer">${g}</a>`:R`<span class="repo-item-row">${g}</span>`}renderReview(e,t){let n=y(e,t);if(n===`unsupported`)return R`<span class="repo-item-review is-failed" data-tooltip="${Fe[e.unsupported]}">can’t review</span>`;if(e.reviewed&&n===`passed`)return R`<span class="repo-item-review is-passed" data-tooltip="The server’s reviewed dependencies pass it">${x.success[1]}reviewed</span>`;if(e.rejected)return R`<span class="repo-item-review is-failed" data-tooltip="A reviewer rejects it: it wants their newer accepting review">rejected</span>`;if(n===`baseline`)return R`<span class="repo-item-tag" data-tooltip="Locked at the commit reviews are counted since: it needs none">baseline</span>`;if(!n)return z;let r=`${X(e.reviews,`full, accepting review`)} of ${t.required} required`;return R`<span class="${`repo-item-review is-${n}`}" data-tooltip="${r}">${n===`passed`?x.success[1]:z}${e.reviews}/${t.required}</span>`}renderLinked(e,t,n,r=0){return!n?.length&&!r?z:R`<section class="repo-item-section"><h4>${e}</h4>${n?.length?R`<ul>${n.map(e=>{let n={...e,kind:t,labels:[],comments:0},[r,i]=ct(t,n);return R`<li><button type="button" class="repo-item-row" @click="${()=>this.open({number:e.number,preview:n})}"><span class="${`repo-item-state is-${r}`}" role="img" aria-label="${i}">${Ge[t][r]}</span> <span class="repo-item-number">#${e.number}</span><span class="repo-item-title">${e.title||`(no title)`}</span></button></li>`})}</ul>`:z}${r>0?R`<p class="repo-item-quiet">${n?.length?`and `:``}${r.toLocaleString(`en-US`)} more, on GitHub</p>`:z}</section>`}renderSession(e){let t=this.repository.repo,[n,r]=$r[e.state]??$r.branch,i=e.pulls.length+e.commits.length,a=R`<span class="repo-item-agents">${e.agents.map(e=>R`<span class="${`agent-mark is-${e}`}" role="img" aria-label="${ft(e)}">${pt(e)}</span>`)}</span><span>${e.title||`(no title)`}</span>`,o=_t(e);return[a,R`<p class="repo-item-meta"><span class="${`repo-item-badge is-${n}`}">${r}</span> ${e.authors.length>0?R`<span><strong>${Et(e.authors).map((e,t)=>R`${t>0?`, `:``}${k(e)}`)}</strong></span>`:z} ${e.startedAt==null?z:R`<span>${Y(e.startedAt)}${e.updatedAt!=null&&Y(e.updatedAt)!==Y(e.startedAt)?` \u2013 ${Y(e.updatedAt)}`:``}</span>`} <span>${i>0?X(i,`task`):`no pull request`}</span> ${e.additions||e.deletions?R`<span><span class="is-added">+${e.additions.toLocaleString(`en-US`)}</span> <span class="is-deleted">−${e.deletions.toLocaleString(`en-US`)}</span></span>`:z}</p>${this.renderLinked(`Pull requests`,`pulls`,e.pulls)} ${e.commits.length>0?R`<section class="repo-item-section"><h4>Commits to the default branch</h4><ul>${e.commits.map(e=>R`<li><a class="repo-item-row" href="${t?`https://github.com/${t}/commit/${e.oid}`:z}" target="_blank" rel="noopener noreferrer"><code>${e.oid.slice(0,7)}</code><span class="repo-item-title">${e.title||`(no message)`}</span></a></li>`)}</ul></section>`:z} ${this.renderLinked(`Issues`,`issues`,e.issues.map(e=>({...e,reason:null})))} ${e.branches.length>0?R`<section class="repo-item-section"><h4>${e.branches.length===1?`Branch`:`Branches`}</h4><ul>${e.branches.map(e=>R`<li><a class="repo-item-row" href="${t?wt(t,e):z}" target="_blank" rel="noopener noreferrer"><code>${e}</code></a></li>`)}</ul></section>`:z}`,R`${Z(o,e.sessions[0]?`Open in Claude Code`:`Open the Codex task`)}${Z(xt(e,t),`Open on GitHub`,!0)}`]}};customElements.define(`repository-item-dialog`,ii);function ai(e){return C(`repository-item-dialog`,e)}var oi=`dialog{width:min(94vw,880px);max-width:880px}.conflicts-list{list-style:none;display:flex;flex-direction:column;gap:.6rem;max-height:65vh;overflow-y:auto;overscroll-behavior:contain}.conflict-card{padding:.6rem .7rem;border:1px solid var(--border);border-radius:var(--ui-radius, 6px)}.finding-meta{display:flex;flex-wrap:wrap;align-items:center;gap:.4rem;color:var(--muted);font-size:.72rem}.location,code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;overflow-wrap:anywhere}.location{flex:1}h4{margin:.4rem 0 .55rem;font-size:.88rem;font-weight:600;overflow-wrap:anywhere}dt{margin-top:.5rem;color:var(--muted);font-size:.72rem}.variant{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,15rem);gap:.65rem;padding:.4rem 0;font-size:.8rem;+&{border-top:1px solid var(--border)}}.value{white-space:pre-wrap;overflow-wrap:anywhere}.reports{display:flex;flex-wrap:wrap;place-content:start flex-end;gap:.3rem}.report-button{display:inline-flex;align-items:center;gap:.4rem;max-width:100%;min-height:22px;padding:0 .4rem 0 0;border:1px solid var(--border);border-radius:var(--ui-radius, 4px);overflow:hidden;background:var(--bg);color:var(--text);font:inherit;font-size:.72rem;cursor:default;text-align:left;>span:last-child{min-width:0;overflow-wrap:anywhere}&:hover{border-color:var(--accent)}}
|
|
30
30
|
`,si={revalidate:`Outcome`,revalidateVerdict:`Explanation`,revalidateRecommendation:`Recommendation`},ci=class extends S{static styles=[...S.styles,L(T),L(bt),L(oi)];static properties={conflicts:{attribute:!1}};constructor(){super(),this.conflicts=[]}render(){return R`<dialog aria-labelledby="revalidation-conflicts-title" @close="${this._onClose}"><header><h3 id="revalidation-conflicts-title">Revalidation conflicts</h3><p class="nwd-intro">Reports disagree about ${this.conflicts.length} finding${this.conflicts.length===1?``:`s`}. App view is unavailable until the conflicting reports are separated or updated.</p></header><ul class="conflicts-list">${this.conflicts.map(({finding:e,copies:t})=>R`<li class="conflict-card"><div class="finding-meta">${E(e.severity)} ${e.file?R`<span class="location">${e.file}${M(e.line)?`:${Ut(M(e.line))}`:``}</span>`:z} <code>${Gt(e.id)??e.id}</code></div><h4>${F(e)}</h4><dl>${Ae(t).map(({field:t,variants:n})=>R`<dt>${si[t]??t}</dt>${n.map(({value:t,reports:n})=>R`<dd class="variant"><div class="value">${t||R`<em>Empty</em>`}</div><div class="reports">${n.map(t=>t?R`<button type="button" class="report-button" aria-label="${`Open ${zt(t)} at this finding`}" @click="${()=>this._finish({id:e.id,reportName:t})}">${I(Rt[h(t)]??Rt.default)}<span>${zt(t)}</span></button>`:R`<span>Loaded report</span>`)}</div></dd>`)}`)}</dl></li>`)}</ul><footer class="nwd-actions"><span class="nwd-spacer"></span><button type="button" @click="${this._onClose}">Close</button></footer></dialog>`}};customElements.define(`revalidation-conflicts-dialog`,ci);function li(e){return C(`revalidation-conflicts-dialog`,{conflicts:[...e.values()]})}var ui=`.spd-list{margin:0 0 .8rem 1.15rem;color:var(--muted);font-size:.82rem;line-height:1.5;& li{margin:.3rem 0}& strong{color:var(--text);font-weight:600}}.spd-denied{color:light-dark(#b25b00,#f0a060);font-size:.78rem}code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.92em}
|
|
31
31
|
`,di=class extends S{static styles=[...S.styles,L(ui)];static properties={_retryDenied:{state:!0}};constructor(){super(),this._retryDenied=!1}_onConfirm=()=>this._finish(null);_onRetry=async()=>{await Le()?this._finish(`granted`):this._retryDenied=!0};_chromiumBody(){let e=location.hostname===`localhost`?R` Plain <code>localhost</code> can never qualify — for local testing open the app via <code>127.0.0.1</code> instead.`:z;return R`<p class="nwd-intro">Chromium-based browsers (Chrome, Edge, Brave, …) never show a prompt — persistence is granted silently, and only to sites the browser considers important. Any of these qualifies it:</p><ul class="spd-list"><li><strong>Install the app</strong> — the install icon at the right end of the address bar, or the browser menu's Install entry.</li><li><strong>Bookmark</strong> this page.</li><li>Keep using the site — regular visits raise its engagement score.</li></ul><p class="nwd-note ui-hint">The browser re-evaluates on every request, so after any of the above press <strong>Try again</strong>.${e}</p>`}_firefoxBody(){return R`<p class="nwd-intro">Firefox asks with a permission prompt. A dismissed or blocked prompt is remembered, and the site can't re-ask until the old answer is cleared:</p><ol class="spd-list"><li>Click the permissions icon next to the address bar.</li><li>Clear the <strong>Store Data in Persistent Storage</strong> entry if it's blocked.</li><li>Press <strong>Try again</strong> below and choose <strong>Allow</strong>.</li></ol>`}_webkitBody(){return R`<p class="nwd-intro">Safari — and every iOS browser — additionally deletes a site's storage after <strong>7 days</strong> of browser use without interacting with the site, and no permission exempts a normal tab. Installing the app is what does:</p><ul class="spd-list"><li>On iPhone / iPad: open the <strong>Share</strong> menu, choose <strong>Add to Home Screen</strong>, and use the app from that icon.</li><li>In Safari on macOS: choose <strong>File → Add to Dock…</strong> and use the app from the Dock.</li><li>Installed web apps are exempt from the 7-day cleanup. Otherwise, use the site at least once a week.</li></ul>`}render(){let e=Ct(),t=e===`webkit`?this._webkitBody():e===`firefox`?this._firefoxBody():this._chromiumBody();return R`<dialog @close="${this._onClose}"><header><h3>Protect stored data</h3></header><p class="nwd-intro">Reports, bundles and triage live in the browser's <strong>best-effort storage</strong> — the browser is allowed to delete all of it at once under disk pressure or after long inactivity, without asking. The persistent-storage request that would prevent this was just declined.</p>${t}<footer class="nwd-actions">${this._retryDenied?R`<span class="spd-denied" role="status">Still not granted.</span>`:z} <span class="nwd-spacer"></span> ${e===`webkit`?z:R`<button type="button" @click="${this._onRetry}">Try again</button>`} <button type="button" class="primary" @click="${this._onConfirm}">Got it</button></footer></dialog>`}};customElements.define(`storage-persist-dialog`,di);function fi(){return new Promise(e=>{let t=document.createElement(`storage-persist-dialog`),n=n=>{t.remove(),e(n)};t.addEventListener(`resolve`,e=>n(e.detail)),t.addEventListener(`modal-conflict`,()=>n(null)),document.body.append(t)})}var pi=`.ssd-close{position:absolute;top:6px;right:6px;z-index:1}header{padding-right:1.5rem}.lwd-list{margin:.5rem 0 0}
|
|
32
32
|
`,mi=10,hi=class extends S{static styles=[...S.styles,L(j),L(B),L(pi)];static properties={names:{type:Array}};constructor(){super(),this.names=[]}focusInitial(){this.renderRoot.querySelector(`button[data-role="sync"]`)?.focus()}_onSync=()=>this._finish(!0);_onDismiss=()=>this._finish(!1);_onClose=()=>this._finish(!1);_list(){if(this.names.length<2)return z;let e=this.names.slice(0,mi),t=this.names.length-e.length;return R`<ul class="lwd-list">${e.map(e=>R`<li><strong>${e}</strong></li>`)} ${t>0?R`<li>and ${t} more</li>`:z}</ul>`}render(){let e=this.names.length===1,t=e?R`Your copy of <strong>"${this.names[0]}"</strong> no longer matches its cloud copy, so other members may be seeing a different version.`:R`<strong>${this.names.length}</strong> reports no longer match their cloud copies, so other members may be seeing different versions.`;return R`<dialog @close="${this._onClose}"><button type="button" class="detail-action ssd-close" data-role="close" aria-label="Close" @click="${this._onDismiss}">×</button><header><h3>Reports out of sync</h3></header><p class="lwd-body">${t}</p>${this._list()}<p class="nwd-note ui-hint">Sync compares ${e?`it`:`each one`} with the cloud. Where it's clear which copy is newer, the other is updated; otherwise you choose which to keep.</p><footer class="nwd-actions"><span class="nwd-spacer"></span> <button type="button" data-role="dismiss" @click="${this._onDismiss}">Not now</button> <button type="button" class="primary" data-role="sync" @click="${this._onSync}">Sync</button></footer></dialog>`}};customElements.define(`sync-suggest-dialog`,hi);function gi({names:e}={}){return new Promise(t=>{let n=document.createElement(`sync-suggest-dialog`);n.exclusive=!0,n.names=Array.isArray(e)?[...e]:[];let r=(e,r)=>{n.remove(),t({shown:e,sync:r})};n.addEventListener(`resolve`,e=>r(!0,e.detail===!0)),n.addEventListener(`modal-conflict`,()=>r(!1,!1)),document.body.append(n)})}var _i=class extends S{static styles=[...S.styles,L(B)];static properties={workspaceId:{type:String},items:{type:Array},_uploading:{state:!0},_errors:{state:!0},_done:{state:!0},_settled:{state:!0}};constructor(){super(),this.workspaceId=``,this.items=[],this._uploading=!1,this._errors=[],this._done=!1,this._settled=!1}focusInitial(){this.renderRoot.querySelector(`button[data-role="upload"]`)?.focus()}_onClose=()=>this._finish({uploaded:[],failed:[]});_onCancel=()=>this._finish({uploaded:[],failed:[]});_onUpload=async()=>{if(this._uploading)return;this._uploading=!0,this._errors=[];let e=[],t=[];for(let n of this.items)try{let r;if(n.kind===`bundle`)r=await Pt(this.workspaceId,n.identifier);else{let e=await g(n.identifier);r=await Mt(this.workspaceId,n.identifier,e)}if(r.ok)e.push({kind:n.kind,identifier:n.identifier});else{let e=r.reason??`unknown`;t.push({kind:n.kind,identifier:n.identifier,reason:e}),this._errors=[...this._errors,{label:D(n),reason:e}]}}catch(e){let r=e?.message??String(e);t.push({kind:n.kind,identifier:n.identifier,reason:r}),this._errors=[...this._errors,{label:D(n),reason:r}]}this._uploading=!1,this._done=!0,t.length===0&&this._finish({uploaded:e,failed:t})};render(){let{count:e,singular:t,kindLabel:n}=mt(this.items),r=t?R`Upload <strong>"${D(this.items[0])}"</strong> to the workspace's remote inventory?`:R`Upload <strong>${e}</strong> local ${n} to the workspace's remote inventory?`,i=t?z:gt(this.items),a=this._uploading?t?`Uploading…`:`Uploading ${e} ${n}\u2026`:t?`Upload`:`Upload ${e}`;return R`<dialog @close="${this._onClose}"><header><h3>Upload to remote</h3></header><p class="lwd-body">${r}</p>${i}<p class="nwd-note ui-hint">End-to-end encrypted with the workspace key — only workspace members can decrypt the uploaded content.</p>${vt(this._errors)}<footer class="nwd-actions"><span class="nwd-spacer"></span> <button type="button" data-role="cancel" @click="${this._onCancel}" ?disabled="${this._uploading}">${this._done&&this._errors.length>0?`Close`:`Cancel`}</button> ${this._done&&this._errors.length>0?z:R`<button type="button" data-role="upload" @click="${this._onUpload}" ?disabled="${this._uploading||e===0}">${a}</button>`}</footer></dialog>`}};customElements.define(`sync-upload-dialog`,_i);function vi({workspaceId:e,items:t}={}){return C(`sync-upload-dialog`,{workspaceId:e??``,items:Array.isArray(t)?[...t]:[]})}var yi=`dialog{width:min(94vw,68rem);max-width:68rem;max-height:calc(100dvh - 7rem);display:flex;flex-direction:column}dialog:not([open]){display:none}.comparison-results{overflow:auto;min-height:0}.difference-counts{display:flex;flex-wrap:wrap;gap:.5rem 1rem;margin:.8rem 0;font-size:.8rem}.difference-counts span{border-inline-start:3px solid var(--difference);padding-inline-start:.5rem}.managed-only{--difference: var(--marker-blue, #559adf)}.local-only{--difference: var(--marker-green, #53a96a)}.mismatch{--difference: var(--high, #d69d37)}.finding{margin:.8rem 0 1.3rem}h4{font-size:.9rem;font-weight:600;overflow-wrap:anywhere}.location,.finding-id{margin-top:.3rem;color:var(--muted);font-size:.75rem;overflow-wrap:anywhere}.table-scroll{margin-top:.6rem;overflow-x:auto}table{width:100%;min-width:32rem;border-collapse:collapse;table-layout:fixed;font-size:.8rem}th,td{padding:.6rem .7rem;text-align:left;vertical-align:top;border:1px solid var(--border);overflow-wrap:anywhere}thead th{color:var(--muted);font-weight:500}th:first-child{width:8rem}tbody th{font-weight:500}td{white-space:pre-wrap}.difference-kind{display:block;margin-top:.3rem;color:var(--difference);font-size:.72rem}.highlight{background:rgb(from var(--difference) r g b / .08)}.unset{color:var(--muted);font-style:normal}.comment+.comment{margin-top:.6rem}.comment.changed{border-inline-start:3px solid var(--difference);padding-inline-start:.5rem}.skipped{color:var(--high, #d69d37);margin:.75rem 0;font-size:.8rem}.skipped ul{padding:.6rem 0 .6rem 1.2rem;overflow-wrap:anywhere}.empty{margin:1rem 0;color:var(--muted);font-size:.85rem}
|
package/out/graph.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./chunk-VFWMQ3LG.js";import{a as e}from"./chunk-R5O6FAW4.js";import{Ba as t,Da as n,Ea as r,Fa as i,Ga as a,Ha as o,Ia as s,K as c,a as l,g as u,h as d,na as f,oa as p,pa as m,wa as h,xa as g}from"./chunk-6YGH7BJG.js";import"./chunk-R3WUYD4F.js";import{e as _}from"./chunk-D6NVKGGG.js";import{e as v}from"./chunk-IYPY47MC.js";import{a as y,d as b}from"./chunk-PWFUOLZK.js";import"./chunk-6ATPGDDI.js";import{j as x}from"./chunk-QRKFPLA4.js";import{d as S,l as C,m as w,n as T,o as E,p as D}from"./chunk-74AEKRES.js";import"./chunk-C4Z6ZBXV.js";import{a as O,c as k,i as A,j}from"./chunk-2XUEZHIP.js";import"./chunk-TUII34K2.js";import"./chunk-OOJM4CTU.js";var M=`*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}:host{display:grid;grid-template-columns:1fr 300px;grid-template-rows:auto 1fr;grid-template-areas:"topbar right" "stage right";min-height:0;border:1px solid var(--border);border-radius:var(--ui-radius, 8px);overflow:hidden;background:var(--graph-canvas-bg);color:var(--text);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,sans-serif;font-size:12px}.graph2-layout{display:contents}:host([matrix]){grid-template-columns:minmax(0,1fr) 300px}.graph2-topbar{grid-area:topbar;display:flex;flex-direction:column;gap:.5rem;padding:var(--graph-topbar-padding, .6rem .75rem .6rem var(--graph-topbar-left-padding, .75rem));font-size:.825rem;background:var(--surface);backdrop-filter:var(--glass-blur);border-bottom:1px solid var(--graph-divider)}.graph2-topbar-row{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem;padding:0}.graph2-topbar .g2-spacer{flex:1}.graph2-topbar-row-pinned{flex-wrap:nowrap;align-items:flex-start}.graph2-topbar-row-pinned>#g2-fullscreen{margin-top:2px}.g2-topbar-controls{display:flex;flex:1;flex-wrap:wrap;align-items:center;gap:.75rem;min-width:0}.g2-topbar-controls>.g2-reason-scope,.g2-topbar-controls>.g2-issues-switch{margin-left:auto}.g2-topbar-controls>.g2-reason-scope+.g2-issues-switch{margin-left:0}.g2-topbar-controls .g2-path-filter-wrap{flex:1 1 8rem;min-width:0;max-width:12rem}.g2-matrix-controls{display:flex;align-items:center;flex-wrap:wrap;gap:8px;font-size:11px;& button{height:30px;padding:4px 7px;border:1px solid var(--border);border-radius:var(--ui-radius, 4px);background:var(--surface);color:var(--text);font:inherit}& button:hover,button[aria-pressed=true]{background:var(--graph-hover-bg);border-color:var(--muted)}}.graph2-topbar triage-selector{margin-left:auto}.g2-icon-btn{width:28px;height:28px;border-radius:var(--ui-radius, 5px);background:var(--graph-hover-bg);border:1px solid var(--border);color:var(--muted);display:grid;place-items:center;font-family:inherit;&:hover{color:var(--accent);border-color:var(--accent)}}.g2-path-filter-wrap{position:relative;flex:0 0 12rem;padding-right:22px}.g2-path-filter-wrap .g2-path-filter-clear{position:absolute;right:4px;top:50%;transform:translateY(-50%);display:grid;place-items:center;width:18px;height:18px;background:transparent;border:0;border-radius:var(--ui-radius, 50%);color:var(--muted);font:400 10px/1 inherit;font-family:inherit;&:hover{color:var(--text);background:var(--surface-active)}}.g2-path-filter:placeholder-shown~.g2-path-filter-clear{display:none}.g2-layout-tabs{display:inline-flex;flex-shrink:0;border:1px solid var(--border);border-radius:var(--ui-radius, 6px);padding:2px;gap:2px;& button{position:relative;display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:var(--ui-radius, 4px);background:transparent;color:var(--muted);font:inherit;font-size:11px;padding:5px 7px}& button[aria-pressed=true]{background:var(--graph-hover-bg);color:var(--text);box-shadow:var(--graph-layout-active-shadow, inset 0 0 0 1px var(--border))}}.g2-reason-scope{--scope-height: 30px}.graph2-right{grid-area:right;border-left:1px solid var(--graph-divider);background:var(--surface);backdrop-filter:var(--glass-blur);display:flex;flex-direction:column;overflow:hidden;padding:14px}.g2-panel-title{font-family:inherit;font-weight:600;font-size:11px;line-height:1;letter-spacing:.14em;text-transform:uppercase;color:var(--muted);opacity:.85;margin:14px 0 8px;display:flex;align-items:baseline;gap:6px;&:first-child{margin-top:0}}.g2-panel-title-row{justify-content:space-between;gap:8px}#g2-top-pkgs-block{margin-top:14px;flex:1 1 0;min-height:0;display:flex;flex-direction:column}.g2-mini-tabs{display:flex;gap:1px;background:var(--graph-mini-tabs-bg, var(--graph-divider));border-radius:var(--ui-radius, 4px);overflow:hidden}.g2-mini-tab{background:transparent;border:0;color:var(--muted);font-family:inherit;font-weight:500;font-size:11px;line-height:1.4;text-transform:none;letter-spacing:0;padding:2px 7px;&:hover{color:var(--text);background:var(--graph-hover-bg)}&.on{background:var(--surface-active);color:var(--accent);text-decoration:var(--graph-mini-tab-active-decoration, none);text-underline-offset:.2em}}.graph2-stage{grid-area:stage;position:relative;background:var(--graph-canvas-bg);overflow:hidden;cursor:default;&:active{cursor:default}& canvas{position:absolute;inset:0;width:100%;height:100%;display:block}}.g2-stage-overlay{position:absolute;top:12px;left:12px;z-index:3;display:flex;flex-direction:column;gap:4px;pointer-events:none;max-width:calc(100% - 60px)}.g2-stage-overlay>*{pointer-events:auto}.g2-stage-stats{position:absolute;bottom:10px;left:12px;z-index:2;display:flex;flex-wrap:wrap;gap:2px 14px;font:500 10px/1.4 ui-monospace,SFMono-Regular,Menlo,Monaco,monospace;color:var(--muted);opacity:.7;text-transform:uppercase;letter-spacing:.06em;pointer-events:none;max-width:calc(100% - 80px);& b{font-weight:600;color:var(--text);opacity:1}}.g2-stage-overlay-tr{position:absolute;top:12px;right:12px;z-index:3;pointer-events:auto}.g2-focus-pkg-btn{width:28px;height:28px;display:grid;place-items:center;background:var(--surface);backdrop-filter:var(--glass-blur);border:1px solid var(--border);border-radius:var(--ui-radius, 6px);color:var(--accent);box-shadow:var(--shadow-glass);&:hover{border-color:var(--accent);background:var(--surface-active)}& svg{display:block}}.g2-back-btn{display:inline-flex;align-items:center;gap:4px;padding:6px 11px;background:var(--surface);backdrop-filter:var(--glass-blur);border:1px solid var(--border);border-radius:var(--ui-radius, 6px);color:var(--accent);font:500 11px/1 inherit;font-family:inherit;box-shadow:var(--shadow-glass);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;align-self:flex-start;&:hover{border-color:var(--accent);background:var(--surface-active)}}.g2-tooltip{position:absolute;background:var(--surface);backdrop-filter:var(--glass-blur);border:1px solid var(--border);border-radius:var(--ui-radius, 7px);padding:9px 11px;pointer-events:none;min-width:170px;max-width:260px;opacity:0;transition:opacity .12s;z-index:10;box-shadow:var(--shadow-glass);&.show{opacity:1}}.g2-tt-path{font:500 11px/1.3 ui-monospace,monospace;color:var(--text);word-break:break-all;margin-bottom:4px}.g2-tt-head{display:flex;align-items:center;gap:6px;margin-bottom:6px;flex-wrap:wrap}.g2-tt-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0}.g2-tt-pkg{font-size:10px;color:var(--muted);word-break:break-all}.g2-tooltip .tree-count-chips{margin-top:6px}:host-context(body.theme-light) .graph2-right .tree-count-chip.medium,:host-context(body.theme-light) .g2-tooltip .tree-count-chip.medium{color:#fff}.g2-selection-card{background:var(--graph-hover-bg);border:1px solid var(--border);border-radius:var(--ui-radius, 8px);overflow:hidden}.g2-sel-head{padding:11px 13px;border-bottom:1px solid var(--graph-divider);display:flex;align-items:center;gap:8px}.g2-sel-file-head{padding:11px 13px;border-bottom:1px solid var(--graph-divider);display:flex;flex-direction:column;gap:6px}.g2-sel-path{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,monospace;font-weight:600;font-size:12px;line-height:1.3;color:var(--text);word-break:break-all}.g2-sel-pkg-row{display:flex;align-items:center;gap:6px;min-width:0}.g2-sel-pkg{font-size:11px;color:var(--muted);word-break:break-all;min-width:0}.g2-sel-fullpath{padding:7px 13px;border-bottom:1px solid var(--graph-divider);font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,monospace;font-size:10px;line-height:1.3;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.g2-sel-size{padding:5px 13px 7px;border-bottom:1px solid var(--graph-divider);font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,monospace;font-size:10px;line-height:1.3;color:var(--muted);font-variant-numeric:tabular-nums}.g2-sel-dot{width:11px;height:11px;border-radius:50%;box-shadow:0 0 0 3px color-mix(in srgb,var(--dot) 22%,transparent);flex-shrink:0}.g2-sel-id{font:600 12px/1 ui-monospace,monospace;color:var(--text);word-break:break-all;flex:1;min-width:0}.g2-sel-grp{font:500 9px/1 ui-monospace,monospace;color:var(--muted);text-transform:uppercase;letter-spacing:.08em;flex-shrink:0}.g2-sel-body{padding:11px 13px}.g2-sel-row{display:flex;justify-content:space-between;gap:12px;font-size:11px;padding:5px 0;border-bottom:1px solid var(--graph-divider);&:last-child{border-bottom:0}.k{color:var(--muted);flex-shrink:0}.v{color:var(--text);font-family:ui-monospace,monospace;word-break:break-all;text-align:right;min-width:0}}.g2-sel-section{padding:9px 13px;border-top:1px solid var(--graph-divider)}.g2-sel-section-label{font-family:inherit;font-weight:600;font-size:11px;line-height:1;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);opacity:.85;margin-bottom:5px}.g2-sel-section-empty{color:var(--muted);opacity:.55;font-size:11px;font-style:italic}.g2-sel-versions{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,monospace;font-size:11px;line-height:1.4;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}.g2-sel-jumps{padding:11px 13px;display:flex;gap:5px;flex-wrap:wrap;border-top:1px solid var(--graph-divider)}.g2-sel-jump{background:var(--surface-active);border:1px solid var(--border);color:var(--accent);border-radius:var(--ui-radius, 4px);padding:2px 8px;font-family:inherit;font-weight:500;font-size:11px;line-height:1.3;&:hover{border-color:var(--accent)}}.g2-sel-file-list{list-style:none;margin:0;padding:0;max-height:110px;overflow:hidden auto;-webkit-app-region:no-drag;app-region:no-drag;&::-webkit-scrollbar{width:4px}&::-webkit-scrollbar-thumb{background:var(--border);border-radius:2px}& li{padding:0}}.g2-sel-file-link{display:flex;align-items:center;gap:6px;width:100%;background:transparent;border:0;border-radius:var(--ui-radius, 3px);padding:2px 6px;min-height:20.5px;font:400 11px/1.4 ui-monospace,SFMono-Regular,Menlo,Monaco,monospace;color:var(--accent);text-align:left;&:hover{background:var(--graph-hover-bg)}.g2-sel-file-dot{width:7px;height:7px;border-radius:50%;flex-shrink:0}.g2-sel-file-path{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}}.g2-empty-state,.g2-sel-section-empty,.g2-dist-empty{cursor:default;user-select:none;-webkit-user-select:none}.g2-empty-state{background:var(--graph-hover-bg);border:1px dashed var(--border);border-radius:var(--ui-radius, 8px);padding:18px 14px;text-align:center;color:var(--muted);font-size:11px;line-height:1.5;& strong{color:var(--text);display:block;margin-bottom:4px;font-weight:500}}.g2-dist-bar{width:100%;height:5px;border-radius:3px;overflow:hidden;display:flex;background:var(--surface-active);margin-bottom:8px;>span{display:block;height:100%}}.g2-dist-list{display:flex;flex-direction:column;gap:0;flex:1 1 0;min-height:0;overflow-y:auto;overscroll-behavior:none;-webkit-app-region:no-drag;app-region:no-drag;scrollbar-gutter:stable;scrollbar-width:thin;scrollbar-color:var(--border) transparent;&::-webkit-scrollbar{width:5px}&::-webkit-scrollbar-thumb{background:var(--border);border-radius:3px}}.g2-dist-empty{color:var(--muted);opacity:.55;font-size:10px;font-style:italic;padding:6px 0;text-align:center}@media print{:host{display:none!important}}
|
|
1
|
+
import"./chunk-VFWMQ3LG.js";import{a as e}from"./chunk-R5O6FAW4.js";import{Ba as t,Da as n,Ea as r,Fa as i,Ga as a,Ha as o,Ia as s,K as c,a as l,g as u,h as d,na as f,oa as p,pa as m,wa as h,xa as g}from"./chunk-QPGM3DTI.js";import"./chunk-HETCVNO4.js";import{e as _}from"./chunk-D6NVKGGG.js";import{e as v}from"./chunk-IYPY47MC.js";import{a as y,d as b}from"./chunk-PWFUOLZK.js";import"./chunk-4RS3NDOG.js";import{j as x}from"./chunk-QRKFPLA4.js";import{d as S,l as C,m as w,n as T,o as E,p as D}from"./chunk-74AEKRES.js";import"./chunk-C4Z6ZBXV.js";import{a as O,c as k,i as A,j}from"./chunk-2XUEZHIP.js";import"./chunk-TUII34K2.js";import"./chunk-OOJM4CTU.js";var M=`*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}:host{display:grid;grid-template-columns:1fr 300px;grid-template-rows:auto 1fr;grid-template-areas:"topbar right" "stage right";min-height:0;border:1px solid var(--border);border-radius:var(--ui-radius, 8px);overflow:hidden;background:var(--graph-canvas-bg);color:var(--text);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,sans-serif;font-size:12px}.graph2-layout{display:contents}:host([matrix]){grid-template-columns:minmax(0,1fr) 300px}.graph2-topbar{grid-area:topbar;display:flex;flex-direction:column;gap:.5rem;padding:var(--graph-topbar-padding, .6rem .75rem .6rem var(--graph-topbar-left-padding, .75rem));font-size:.825rem;background:var(--surface);backdrop-filter:var(--glass-blur);border-bottom:1px solid var(--graph-divider)}.graph2-topbar-row{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem;padding:0}.graph2-topbar .g2-spacer{flex:1}.graph2-topbar-row-pinned{flex-wrap:nowrap;align-items:flex-start}.graph2-topbar-row-pinned>#g2-fullscreen{margin-top:2px}.g2-topbar-controls{display:flex;flex:1;flex-wrap:wrap;align-items:center;gap:.75rem;min-width:0}.g2-topbar-controls>.g2-reason-scope,.g2-topbar-controls>.g2-issues-switch{margin-left:auto}.g2-topbar-controls>.g2-reason-scope+.g2-issues-switch{margin-left:0}.g2-topbar-controls .g2-path-filter-wrap{flex:1 1 8rem;min-width:0;max-width:12rem}.g2-matrix-controls{display:flex;align-items:center;flex-wrap:wrap;gap:8px;font-size:11px;& button{height:30px;padding:4px 7px;border:1px solid var(--border);border-radius:var(--ui-radius, 4px);background:var(--surface);color:var(--text);font:inherit}& button:hover,button[aria-pressed=true]{background:var(--graph-hover-bg);border-color:var(--muted)}}.graph2-topbar triage-selector{margin-left:auto}.g2-icon-btn{width:28px;height:28px;border-radius:var(--ui-radius, 5px);background:var(--graph-hover-bg);border:1px solid var(--border);color:var(--muted);display:grid;place-items:center;font-family:inherit;&:hover{color:var(--accent);border-color:var(--accent)}}.g2-path-filter-wrap{position:relative;flex:0 0 12rem;padding-right:22px}.g2-path-filter-wrap .g2-path-filter-clear{position:absolute;right:4px;top:50%;transform:translateY(-50%);display:grid;place-items:center;width:18px;height:18px;background:transparent;border:0;border-radius:var(--ui-radius, 50%);color:var(--muted);font:400 10px/1 inherit;font-family:inherit;&:hover{color:var(--text);background:var(--surface-active)}}.g2-path-filter:placeholder-shown~.g2-path-filter-clear{display:none}.g2-layout-tabs{display:inline-flex;flex-shrink:0;border:1px solid var(--border);border-radius:var(--ui-radius, 6px);padding:2px;gap:2px;& button{position:relative;display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:var(--ui-radius, 4px);background:transparent;color:var(--muted);font:inherit;font-size:11px;padding:5px 7px}& button[aria-pressed=true]{background:var(--graph-hover-bg);color:var(--text);box-shadow:var(--graph-layout-active-shadow, inset 0 0 0 1px var(--border))}}.g2-reason-scope{--scope-height: 30px}.graph2-right{grid-area:right;border-left:1px solid var(--graph-divider);background:var(--surface);backdrop-filter:var(--glass-blur);display:flex;flex-direction:column;overflow:hidden;padding:14px}.g2-panel-title{font-family:inherit;font-weight:600;font-size:11px;line-height:1;letter-spacing:.14em;text-transform:uppercase;color:var(--muted);opacity:.85;margin:14px 0 8px;display:flex;align-items:baseline;gap:6px;&:first-child{margin-top:0}}.g2-panel-title-row{justify-content:space-between;gap:8px}#g2-top-pkgs-block{margin-top:14px;flex:1 1 0;min-height:0;display:flex;flex-direction:column}.g2-mini-tabs{display:flex;gap:1px;background:var(--graph-mini-tabs-bg, var(--graph-divider));border-radius:var(--ui-radius, 4px);overflow:hidden}.g2-mini-tab{background:transparent;border:0;color:var(--muted);font-family:inherit;font-weight:500;font-size:11px;line-height:1.4;text-transform:none;letter-spacing:0;padding:2px 7px;&:hover{color:var(--text);background:var(--graph-hover-bg)}&.on{background:var(--surface-active);color:var(--accent);text-decoration:var(--graph-mini-tab-active-decoration, none);text-underline-offset:.2em}}.graph2-stage{grid-area:stage;position:relative;background:var(--graph-canvas-bg);overflow:hidden;cursor:default;&:active{cursor:default}& canvas{position:absolute;inset:0;width:100%;height:100%;display:block}}.g2-stage-overlay{position:absolute;top:12px;left:12px;z-index:3;display:flex;flex-direction:column;gap:4px;pointer-events:none;max-width:calc(100% - 60px)}.g2-stage-overlay>*{pointer-events:auto}.g2-stage-stats{position:absolute;bottom:10px;left:12px;z-index:2;display:flex;flex-wrap:wrap;gap:2px 14px;font:500 10px/1.4 ui-monospace,SFMono-Regular,Menlo,Monaco,monospace;color:var(--muted);opacity:.7;text-transform:uppercase;letter-spacing:.06em;pointer-events:none;max-width:calc(100% - 80px);& b{font-weight:600;color:var(--text);opacity:1}}.g2-stage-overlay-tr{position:absolute;top:12px;right:12px;z-index:3;pointer-events:auto}.g2-focus-pkg-btn{width:28px;height:28px;display:grid;place-items:center;background:var(--surface);backdrop-filter:var(--glass-blur);border:1px solid var(--border);border-radius:var(--ui-radius, 6px);color:var(--accent);box-shadow:var(--shadow-glass);&:hover{border-color:var(--accent);background:var(--surface-active)}& svg{display:block}}.g2-back-btn{display:inline-flex;align-items:center;gap:4px;padding:6px 11px;background:var(--surface);backdrop-filter:var(--glass-blur);border:1px solid var(--border);border-radius:var(--ui-radius, 6px);color:var(--accent);font:500 11px/1 inherit;font-family:inherit;box-shadow:var(--shadow-glass);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;align-self:flex-start;&:hover{border-color:var(--accent);background:var(--surface-active)}}.g2-tooltip{position:absolute;background:var(--surface);backdrop-filter:var(--glass-blur);border:1px solid var(--border);border-radius:var(--ui-radius, 7px);padding:9px 11px;pointer-events:none;min-width:170px;max-width:260px;opacity:0;transition:opacity .12s;z-index:10;box-shadow:var(--shadow-glass);&.show{opacity:1}}.g2-tt-path{font:500 11px/1.3 ui-monospace,monospace;color:var(--text);word-break:break-all;margin-bottom:4px}.g2-tt-head{display:flex;align-items:center;gap:6px;margin-bottom:6px;flex-wrap:wrap}.g2-tt-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0}.g2-tt-pkg{font-size:10px;color:var(--muted);word-break:break-all}.g2-tooltip .tree-count-chips{margin-top:6px}:host-context(body.theme-light) .graph2-right .tree-count-chip.medium,:host-context(body.theme-light) .g2-tooltip .tree-count-chip.medium{color:#fff}.g2-selection-card{background:var(--graph-hover-bg);border:1px solid var(--border);border-radius:var(--ui-radius, 8px);overflow:hidden}.g2-sel-head{padding:11px 13px;border-bottom:1px solid var(--graph-divider);display:flex;align-items:center;gap:8px}.g2-sel-file-head{padding:11px 13px;border-bottom:1px solid var(--graph-divider);display:flex;flex-direction:column;gap:6px}.g2-sel-path{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,monospace;font-weight:600;font-size:12px;line-height:1.3;color:var(--text);word-break:break-all}.g2-sel-pkg-row{display:flex;align-items:center;gap:6px;min-width:0}.g2-sel-pkg{font-size:11px;color:var(--muted);word-break:break-all;min-width:0}.g2-sel-fullpath{padding:7px 13px;border-bottom:1px solid var(--graph-divider);font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,monospace;font-size:10px;line-height:1.3;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.g2-sel-size{padding:5px 13px 7px;border-bottom:1px solid var(--graph-divider);font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,monospace;font-size:10px;line-height:1.3;color:var(--muted);font-variant-numeric:tabular-nums}.g2-sel-dot{width:11px;height:11px;border-radius:50%;box-shadow:0 0 0 3px color-mix(in srgb,var(--dot) 22%,transparent);flex-shrink:0}.g2-sel-id{font:600 12px/1 ui-monospace,monospace;color:var(--text);word-break:break-all;flex:1;min-width:0}.g2-sel-grp{font:500 9px/1 ui-monospace,monospace;color:var(--muted);text-transform:uppercase;letter-spacing:.08em;flex-shrink:0}.g2-sel-body{padding:11px 13px}.g2-sel-row{display:flex;justify-content:space-between;gap:12px;font-size:11px;padding:5px 0;border-bottom:1px solid var(--graph-divider);&:last-child{border-bottom:0}.k{color:var(--muted);flex-shrink:0}.v{color:var(--text);font-family:ui-monospace,monospace;word-break:break-all;text-align:right;min-width:0}}.g2-sel-section{padding:9px 13px;border-top:1px solid var(--graph-divider)}.g2-sel-section-label{font-family:inherit;font-weight:600;font-size:11px;line-height:1;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);opacity:.85;margin-bottom:5px}.g2-sel-section-empty{color:var(--muted);opacity:.55;font-size:11px;font-style:italic}.g2-sel-versions{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,monospace;font-size:11px;line-height:1.4;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}.g2-sel-jumps{padding:11px 13px;display:flex;gap:5px;flex-wrap:wrap;border-top:1px solid var(--graph-divider)}.g2-sel-jump{background:var(--surface-active);border:1px solid var(--border);color:var(--accent);border-radius:var(--ui-radius, 4px);padding:2px 8px;font-family:inherit;font-weight:500;font-size:11px;line-height:1.3;&:hover{border-color:var(--accent)}}.g2-sel-file-list{list-style:none;margin:0;padding:0;max-height:110px;overflow:hidden auto;-webkit-app-region:no-drag;app-region:no-drag;&::-webkit-scrollbar{width:4px}&::-webkit-scrollbar-thumb{background:var(--border);border-radius:2px}& li{padding:0}}.g2-sel-file-link{display:flex;align-items:center;gap:6px;width:100%;background:transparent;border:0;border-radius:var(--ui-radius, 3px);padding:2px 6px;min-height:20.5px;font:400 11px/1.4 ui-monospace,SFMono-Regular,Menlo,Monaco,monospace;color:var(--accent);text-align:left;&:hover{background:var(--graph-hover-bg)}.g2-sel-file-dot{width:7px;height:7px;border-radius:50%;flex-shrink:0}.g2-sel-file-path{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}}.g2-empty-state,.g2-sel-section-empty,.g2-dist-empty{cursor:default;user-select:none;-webkit-user-select:none}.g2-empty-state{background:var(--graph-hover-bg);border:1px dashed var(--border);border-radius:var(--ui-radius, 8px);padding:18px 14px;text-align:center;color:var(--muted);font-size:11px;line-height:1.5;& strong{color:var(--text);display:block;margin-bottom:4px;font-weight:500}}.g2-dist-bar{width:100%;height:5px;border-radius:3px;overflow:hidden;display:flex;background:var(--surface-active);margin-bottom:8px;>span{display:block;height:100%}}.g2-dist-list{display:flex;flex-direction:column;gap:0;flex:1 1 0;min-height:0;overflow-y:auto;overscroll-behavior:none;-webkit-app-region:no-drag;app-region:no-drag;scrollbar-gutter:stable;scrollbar-width:thin;scrollbar-color:var(--border) transparent;&::-webkit-scrollbar{width:5px}&::-webkit-scrollbar-thumb{background:var(--border);border-radius:3px}}.g2-dist-empty{color:var(--muted);opacity:.55;font-size:10px;font-style:italic;padding:6px 0;text-align:center}@media print{:host{display:none!important}}
|
|
2
2
|
`,N=`.g2-dist-item{display:grid;grid-template-columns:8px 1fr auto auto;gap:8px;align-items:center;font-size:10px;padding:2px 6px;min-height:20.5px;margin:0 -6px;background:transparent;border:0;border-radius:var(--ui-radius, 4px);font-family:inherit;text-align:left;width:calc(100% + 12px);&:hover{background:var(--graph-hover-bg)}&.on{background:var(--surface-active);.g2-dist-name{color:var(--accent)}}.g2-dist-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0}.g2-dist-name{color:var(--muted);font-family:ui-monospace,monospace;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.g2-dist-count{font-family:ui-monospace,monospace;color:var(--text)}.g2-dist-pct{font-family:ui-monospace,monospace;color:var(--muted);width:36px;text-align:right;opacity:.85}}:host-context(body.theme-w95) *{overscroll-behavior:none}
|
|
3
3
|
`,P=`.g2-zoom-ctrl{position:absolute;right:12px;bottom:12px;display:flex;flex-direction:column;background:var(--surface);backdrop-filter:var(--glass-blur);border:1px solid var(--border);border-radius:var(--ui-radius, 6px);overflow:hidden;z-index:3;box-shadow:var(--shadow-glass);& button{width:28px;height:28px;margin:0;padding:0;background:transparent;border:0;border-radius:0;color:var(--muted);border-bottom:1px solid var(--graph-divider);display:grid;place-items:center;font-family:inherit;font-size:13px;&:last-child{border-bottom:0}&:hover:not(:disabled){color:var(--accent);background:var(--surface-active)}&:disabled{opacity:.35}}}.g2-zoom-pct{font:500 9px/1 ui-monospace,monospace;color:var(--muted);padding:5px 0;text-align:center;border-bottom:1px solid var(--graph-divider)}.g2-zoom-ctrl .g2-zoom-fit-btn{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,monospace;font-weight:600;font-size:9px;line-height:1;letter-spacing:-.02em;text-transform:lowercase}
|
|
4
4
|
`,F=`.tree-count-chips{display:inline-flex;gap:.25rem;flex-wrap:wrap}.tree-count-chip{display:inline-block;font-size:.65rem;font-weight:600;text-transform:uppercase;letter-spacing:.03em;padding:.1rem .4rem;border-radius:3px;line-height:1.3;&.critical{background:var(--critical);color:#fff}&.high{background:var(--high);color:#fff}&.medium{background:var(--medium);color:#000}&.low{background:var(--low);color:var(--badge-low-text)}&.high_bug{background:var(--high-bug);color:#fff}&.bug{background:var(--bug);color:#fff}&.informational{background:var(--info);color:#fff}}
|
package/out/index.html
CHANGED
|
@@ -31,25 +31,25 @@
|
|
|
31
31
|
<link rel="preload" href="./view.css" as="style" />
|
|
32
32
|
<link rel="modulepreload" href="./view.js" />
|
|
33
33
|
<link rel="modulepreload" href="./chunk-R3NZFXVR.js" />
|
|
34
|
-
<link rel="modulepreload" href="./chunk-
|
|
35
|
-
<link rel="modulepreload" href="./chunk-
|
|
34
|
+
<link rel="modulepreload" href="./chunk-OAWY4T6R.js" />
|
|
35
|
+
<link rel="modulepreload" href="./chunk-SCN2TBP2.js" />
|
|
36
36
|
<link rel="modulepreload" href="./chunk-JCIIBLKR.js" />
|
|
37
37
|
<link rel="modulepreload" href="./chunk-E3LFSUDJ.js" />
|
|
38
38
|
<link rel="modulepreload" href="./chunk-JMG5DXII.js" />
|
|
39
|
-
<link rel="modulepreload" href="./chunk-
|
|
40
|
-
<link rel="modulepreload" href="./chunk-
|
|
39
|
+
<link rel="modulepreload" href="./chunk-2F3CYNPZ.js" />
|
|
40
|
+
<link rel="modulepreload" href="./chunk-2HGKTQ5Q.js" />
|
|
41
41
|
<link rel="modulepreload" href="./chunk-WFDXHPT2.js" />
|
|
42
42
|
<link rel="modulepreload" href="./chunk-NRPC74AM.js" />
|
|
43
43
|
<link rel="modulepreload" href="./chunk-7BKKYVWR.js" />
|
|
44
44
|
<link rel="modulepreload" href="./chunk-7C7DWL7I.js" />
|
|
45
45
|
<link rel="modulepreload" href="./chunk-PNHBZGDD.js" />
|
|
46
46
|
<link rel="modulepreload" href="./chunk-VFWMQ3LG.js" />
|
|
47
|
-
<link rel="modulepreload" href="./chunk-
|
|
48
|
-
<link rel="modulepreload" href="./chunk-
|
|
47
|
+
<link rel="modulepreload" href="./chunk-QPGM3DTI.js" />
|
|
48
|
+
<link rel="modulepreload" href="./chunk-HETCVNO4.js" />
|
|
49
49
|
<link rel="modulepreload" href="./chunk-D6NVKGGG.js" />
|
|
50
50
|
<link rel="modulepreload" href="./chunk-IYPY47MC.js" />
|
|
51
51
|
<link rel="modulepreload" href="./chunk-PWFUOLZK.js" />
|
|
52
|
-
<link rel="modulepreload" href="./chunk-
|
|
52
|
+
<link rel="modulepreload" href="./chunk-4RS3NDOG.js" />
|
|
53
53
|
<link rel="modulepreload" href="./chunk-QRKFPLA4.js" />
|
|
54
54
|
<link rel="modulepreload" href="./chunk-74AEKRES.js" />
|
|
55
55
|
<link rel="modulepreload" href="./chunk-C4Z6ZBXV.js" />
|