@preventive/triage 1.0.0-alpha.39 → 1.0.0-alpha.40

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.
@@ -66,7 +66,7 @@ export function parseReviewNotes(comment) {
66
66
  }
67
67
 
68
68
  function auditNotes(comment, prefix = '') {
69
- return parseReviewNotes(comment).map(note => `* ${prefix}${markdownText(note.text)}`)
69
+ return parseReviewNotes(comment).map(note => `* ${prefix}${note.text.replaceAll('\n', '\n ')}`)
70
70
  }
71
71
 
72
72
  export function auditMarkdown(review) {
@@ -37,7 +37,7 @@ function findingPath(id) {
37
37
  export function managedRoutePath(route) {
38
38
  if (!route) return null
39
39
  if (route.view === 'home') return '/'
40
- if (route.view === 'reviews') return '/reviews'
40
+ if (route.view === 'reviews') return '/my/reviews'
41
41
  if (route.view === 'npm') return npmPackagePath(route)
42
42
  if (route.view === 'workspace-reports' || route.view === 'workspace-bundles') {
43
43
  return /^[A-Za-z0-9_-]+$/u.test(route.teamSlug ?? '') ? `/team/${route.teamSlug}/${route.view.slice(10)}` : null
@@ -143,7 +143,7 @@ function codeLines(hash) {
143
143
  export function parseManagedRoute(url) {
144
144
  const path = url.pathname.replace(/\/$/u, '') || '/'
145
145
  if (path === '/' || path === '/index.html') return { view: 'home' }
146
- if (path === '/reviews') return { view: 'reviews' }
146
+ if (path === '/my/reviews') return { view: 'reviews' }
147
147
  const view = Object.keys(MANAGED_PAGES).find(key => MANAGED_PAGES[key] === path)
148
148
  if (view) {
149
149
  const createRepoId = Number(url.searchParams.get('createRepo'))
@@ -1,3 +1,3 @@
1
- import{b as w,c as f,j as m,l as k}from"./chunk-HIV7SVI7.js";import{a as h}from"./chunk-TUII34K2.js";var x=3,y=4,H=/^[\w-]{4}$/u,_=/^[\w-]{8}$/u,u="AAAA",R={report:`deepview/finding-link/report/v1
1
+ import{b as w,c as f,j as m,l as k}from"./chunk-WZDTZE64.js";import{a as h}from"./chunk-TUII34K2.js";var x=3,y=4,H=/^[\w-]{4}$/u,_=/^[\w-]{8}$/u,u="AAAA",R={report:`deepview/finding-link/report/v1
2
2
  `,workspace:`deepview/finding-link/workspace/v1
3
3
  `},p=new Map;function $(t,e){return`${t}\0${e}`}function I(t){return typeof t=="string"&&H.test(t)}async function T(t,e){let n=R[t];if(!n||typeof e!="string"||!e)return null;let i=$(t,e),o=p.get(i);if(o!==void 0)return o;let r;try{let s=await crypto.subtle.digest("SHA-256",h(n+e));r=new Uint8Array(s).slice(0,x).toBase64({alphabet:"base64url",omitPadding:!0})}catch{return null}return p.set(i,r),r}function E(t,e){return typeof e!="string"||!e?null:p.get($(t,e))??null}function N(t,e){let n=[];for(let[i,o]of[["report",t],["workspace",e]]){if(o==null||o===""){n.push(u);continue}if(!I(o))throw new TypeError(`encodeFindingRef: ${i} must be a link hint token, not a name`);n.push(o)}return n.every(i=>i===u)?null:n[0]===u?`w${n[1]}`:n.join("")}function b(t){let e=[t.slice(0,y),t.slice(y)].map(n=>n===u?null:n);return{report:e[0],workspace:e[1]}}function a({id:t,report:e,workspace:n}={}){if(!f(t))throw new TypeError("encodeFindingRef: a persistent finding id is required");let i=[`finding=${encodeURIComponent(t)}`],o=N(e,n);return o&&i.push(`v=${o}`),i.join("&")}function O(t,e){let n=a(t);return typeof location>"u"?`${e??""}#${n}`:`${location.origin}${e??location.pathname}#${n}`}function A(t){let e=typeof t=="string"?t:typeof location>"u"?"":location.hash;if(!e)return null;let n=e.replace(/^#/u,"");if(!n)return null;let i={id:null,report:null,workspace:null};for(let o of n.split("&")){let r=o.indexOf("=");if(r<0)continue;let s=o.slice(0,r),c=o.slice(r+1);if(!c)continue;if(s==="v"){if(c.length===5&&c[0]==="w"&&I(c.slice(1))){let g=c.slice(1);Object.assign(i,{report:null,workspace:g===u?null:g});continue}if(!_.test(c))continue;Object.assign(i,b(c));continue}if(s!=="finding"||c.length>w*3)continue;let d;try{d=decodeURIComponent(c)}catch{continue}f(d)&&(i.id=d)}return i.id?i:null}function U(t,{managed:e=!1}={}){if(typeof location>"u")return null;let n;try{n=new URL(t)}catch{return null}if(n.href!==t||n.protocol!==location.protocol||n.host!==location.host||n.username||n.password)return null;let i=k(n);if(i?.finding)return{id:i.finding.id,fragment:a(i.finding),path:m(i)};if(e&&i?.view!=="home"&&!/\/(?:index|view)\.html$/u.test(n.pathname))return null;let o=A(n.hash);if(!o)return null;let r=a(o);return{id:o.id,fragment:r,path:`/#${r}`}}function l(t,e){if(typeof t!="string")return!1;let n=t.replaceAll("\\","/");return n.startsWith(`${e}/`)||n.includes(`/${e}/`)}function C(t){let e=!1;for(let n of t){for(let i of n.groups??[])for(let o of i){if(l(o.file,"node_modules"))return"node_modules";l(o.file,"vendor")&&(e=!0)}for(let i of Object.keys(n.tree??{})){if(l(i,"node_modules"))return"node_modules";l(i,"vendor")&&(e=!0)}}return e?"vendor":"dependencies"}export{l as a,C as b,T as c,E as d,a as e,O as f,A as g,U as h};
@@ -0,0 +1 @@
1
+ import{nd as a,od as b,pd as c,qd as d,rd as e}from"./chunk-MYDDTA7W.js";import"./chunk-K3X5EJBQ.js";import"./chunk-CVVJAXVY.js";import"./chunk-VIHGO77Y.js";import"./chunk-RFZQQXSG.js";import"./chunk-RSHMVYNS.js";import"./chunk-XYDGU6BM.js";import"./chunk-UYAXVRVL.js";import"./chunk-NRPC74AM.js";import"./chunk-VQJCXGIY.js";import"./chunk-W4J3MGLB.js";import"./chunk-GJ4IUCNS.js";import"./chunk-PNHBZGDD.js";import"./chunk-UXNUAIIC.js";import"./chunk-R5O6FAW4.js";import"./chunk-CMQA4DM6.js";import"./chunk-4F6JSF57.js";import"./chunk-YVZH5SHP.js";import"./chunk-4XCDFGDP.js";import"./chunk-3BZ7JERB.js";import"./chunk-TZ5KB2Y5.js";import"./chunk-XYFXXB2G.js";import"./chunk-DIJJNTRH.js";import"./chunk-WZDTZE64.js";import"./chunk-GNXOKIGP.js";import"./chunk-C4Z6ZBXV.js";import"./chunk-2XUEZHIP.js";import"./chunk-TUII34K2.js";import"./chunk-V5O7M2YT.js";import"./chunk-OOJM4CTU.js";export{e as configureReportRevalidation,a as refreshGraph2Sidebar,b as refreshGraph2TopPkgs,c as render,d as renderEmptyWorkspace};
@@ -1,2 +1,2 @@
1
- import{a as E}from"./chunk-KEX2ATEW.js";import{gb as y,h as a,hb as o,ib as x,jb as m,kb as C,lb as $,mb as w,nb as k,ob as S}from"./chunk-QSLWGJBQ.js";import{a as v}from"./chunk-2KBF5TZ7.js";import{a as f,b as _}from"./chunk-K3X5EJBQ.js";import{g as c,h as b}from"./chunk-CVVJAXVY.js";import"./chunk-VIHGO77Y.js";import"./chunk-RFZQQXSG.js";import"./chunk-F4OMDNEY.js";import"./chunk-XYDGU6BM.js";import"./chunk-UYAXVRVL.js";import"./chunk-NRPC74AM.js";import"./chunk-XRWAV3DX.js";import"./chunk-W4J3MGLB.js";import"./chunk-GJ4IUCNS.js";import"./chunk-PNHBZGDD.js";import"./chunk-TINZZKP5.js";import"./chunk-R5O6FAW4.js";import"./chunk-CMQA4DM6.js";import"./chunk-ZPD5R5RP.js";import"./chunk-YVZH5SHP.js";import"./chunk-4XCDFGDP.js";import"./chunk-3BZ7JERB.js";import"./chunk-TZ5KB2Y5.js";import"./chunk-XYFXXB2G.js";import{a as l}from"./chunk-DIJJNTRH.js";import"./chunk-HIV7SVI7.js";import"./chunk-GNXOKIGP.js";import"./chunk-C4Z6ZBXV.js";import{a as d,c as i,g as s}from"./chunk-2XUEZHIP.js";import"./chunk-TUII34K2.js";import{s as g,t as p}from"./chunk-V5O7M2YT.js";import"./chunk-OOJM4CTU.js";var T=`dialog{width:min(94vw,800px);max-width:800px;max-height:calc(100dvh - 4rem);margin-block:2rem;padding:0}dialog[open]{display:flex;flex-direction:column}.discussion-header{display:flex;align-items:start;gap:1rem;padding:1rem 1.25rem;border-bottom:1px solid var(--border)}.discussion-heading{flex:1;min-width:0}header h3{display:flex;align-items:center;gap:.5rem;margin:0;line-height:1.5}.comment-count{padding:.05rem .4rem;border-radius:1rem;background:rgb(from var(--muted) r g b / .12);color:var(--muted);font-size:.72rem;font-weight:400}.discussion-finding{margin-top:.4rem;font-size:.85rem;overflow-wrap:anywhere}.loc{margin-top:.25rem;color:var(--muted)}.header-actions{display:flex;flex:none;align-items:center;gap:.7rem}.header-actions button{display:inline-flex;flex:none;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;padding:0;border:0;background:transparent;color:var(--muted);line-height:0;& svg{display:block;width:1rem;height:1rem}&:hover:not(:disabled){color:var(--text)}&:disabled{opacity:.5}}.comment-action{display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;padding:.2rem;border:1px solid transparent;border-radius:var(--ui-radius, 4px);background:transparent;color:var(--muted);cursor:default;& svg{width:.9rem;height:.9rem}&:hover:not(:disabled),&[aria-pressed=true]{border-color:var(--border);background:rgb(from var(--muted) r g b / .08);color:var(--text)}&.danger:hover:not(:disabled),&[aria-expanded=true]{color:var(--critical, #f87171)}&:disabled{opacity:.5}}button:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:var(--ui-radius, 3px)}.discussion-log{min-height:0;max-height:50dvh;overflow-y:auto;overscroll-behavior:contain;padding:.5rem;scrollbar-gutter:stable}.comments{display:flex;flex-direction:column;gap:.15rem;list-style:none}.comment{padding:.6rem .75rem;border-radius:var(--ui-radius, 6px);font-size:.84rem}.comment:hover{background:rgb(from var(--muted) r g b / .035)}.comment.editing{background:rgb(from var(--accent) r g b / .08);box-shadow:inset 0 0 0 1px rgb(from var(--accent) r g b / .2)}.delete-confirm{display:flex;align-items:center;justify-content:end;flex-wrap:wrap;gap:.5rem;margin-top:.6rem;color:var(--muted);font-size:.75rem;& button{padding:.25rem .55rem;border:1px solid var(--border);border-radius:var(--ui-radius, 4px);background:transparent;color:var(--text);font:inherit;&:hover:not(:disabled){background:rgb(from var(--muted) r g b / .08)}&.danger{color:var(--critical, #f87171)}&:disabled{opacity:.5}}}.empty-discussion{padding:2.5rem 0;color:var(--muted);text-align:center;font-size:.85rem}.composer{padding:1rem 1.25rem;border-top:1px solid var(--border)}.composer-label{display:flex;align-items:center;gap:.45rem;margin-bottom:.6rem;font-size:.78rem}.composer-label strong{font-weight:600}textarea{min-height:4.5rem;max-height:25dvh;font-size:.84rem}.nwd-actions{border:0;padding-top:0;margin-top:.65rem}.shortcut{color:var(--muted);font-size:.7rem}.error{padding:.65rem 1.25rem;color:var(--danger, #c44);font-size:.8rem}.read-only{padding:1rem 1.25rem;border-top:1px solid var(--border);color:var(--muted);font-size:.8rem}@media(width<=480px){.discussion-header,.composer{padding:.8rem}.discussion-log{padding-inline:.3rem}.comment{padding-inline:.5rem}.shortcut{max-width:8rem}}
1
+ import{a as E}from"./chunk-KEX2ATEW.js";import{gb as y,h as a,hb as o,ib as x,jb as m,kb as C,lb as $,mb as w,nb as k,ob as S}from"./chunk-MYDDTA7W.js";import{a as v}from"./chunk-2KBF5TZ7.js";import{a as f,b as _}from"./chunk-K3X5EJBQ.js";import{g as c,h as b}from"./chunk-CVVJAXVY.js";import"./chunk-VIHGO77Y.js";import"./chunk-RFZQQXSG.js";import"./chunk-RSHMVYNS.js";import"./chunk-XYDGU6BM.js";import"./chunk-UYAXVRVL.js";import"./chunk-NRPC74AM.js";import"./chunk-VQJCXGIY.js";import"./chunk-W4J3MGLB.js";import"./chunk-GJ4IUCNS.js";import"./chunk-PNHBZGDD.js";import"./chunk-UXNUAIIC.js";import"./chunk-R5O6FAW4.js";import"./chunk-CMQA4DM6.js";import"./chunk-4F6JSF57.js";import"./chunk-YVZH5SHP.js";import"./chunk-4XCDFGDP.js";import"./chunk-3BZ7JERB.js";import"./chunk-TZ5KB2Y5.js";import"./chunk-XYFXXB2G.js";import{a as l}from"./chunk-DIJJNTRH.js";import"./chunk-WZDTZE64.js";import"./chunk-GNXOKIGP.js";import"./chunk-C4Z6ZBXV.js";import{a as d,c as i,g as s}from"./chunk-2XUEZHIP.js";import"./chunk-TUII34K2.js";import{s as g,t as p}from"./chunk-V5O7M2YT.js";import"./chunk-OOJM4CTU.js";var T=`dialog{width:min(94vw,800px);max-width:800px;max-height:calc(100dvh - 4rem);margin-block:2rem;padding:0}dialog[open]{display:flex;flex-direction:column}.discussion-header{display:flex;align-items:start;gap:1rem;padding:1rem 1.25rem;border-bottom:1px solid var(--border)}.discussion-heading{flex:1;min-width:0}header h3{display:flex;align-items:center;gap:.5rem;margin:0;line-height:1.5}.comment-count{padding:.05rem .4rem;border-radius:1rem;background:rgb(from var(--muted) r g b / .12);color:var(--muted);font-size:.72rem;font-weight:400}.discussion-finding{margin-top:.4rem;font-size:.85rem;overflow-wrap:anywhere}.loc{margin-top:.25rem;color:var(--muted)}.header-actions{display:flex;flex:none;align-items:center;gap:.7rem}.header-actions button{display:inline-flex;flex:none;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;padding:0;border:0;background:transparent;color:var(--muted);line-height:0;& svg{display:block;width:1rem;height:1rem}&:hover:not(:disabled){color:var(--text)}&:disabled{opacity:.5}}.comment-action{display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;padding:.2rem;border:1px solid transparent;border-radius:var(--ui-radius, 4px);background:transparent;color:var(--muted);cursor:default;& svg{width:.9rem;height:.9rem}&:hover:not(:disabled),&[aria-pressed=true]{border-color:var(--border);background:rgb(from var(--muted) r g b / .08);color:var(--text)}&.danger:hover:not(:disabled),&[aria-expanded=true]{color:var(--critical, #f87171)}&:disabled{opacity:.5}}button:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:var(--ui-radius, 3px)}.discussion-log{min-height:0;max-height:50dvh;overflow-y:auto;overscroll-behavior:contain;padding:.5rem;scrollbar-gutter:stable}.comments{display:flex;flex-direction:column;gap:.15rem;list-style:none}.comment{padding:.6rem .75rem;border-radius:var(--ui-radius, 6px);font-size:.84rem}.comment:hover{background:rgb(from var(--muted) r g b / .035)}.comment.editing{background:rgb(from var(--accent) r g b / .08);box-shadow:inset 0 0 0 1px rgb(from var(--accent) r g b / .2)}.delete-confirm{display:flex;align-items:center;justify-content:end;flex-wrap:wrap;gap:.5rem;margin-top:.6rem;color:var(--muted);font-size:.75rem;& button{padding:.25rem .55rem;border:1px solid var(--border);border-radius:var(--ui-radius, 4px);background:transparent;color:var(--text);font:inherit;&:hover:not(:disabled){background:rgb(from var(--muted) r g b / .08)}&.danger{color:var(--critical, #f87171)}&:disabled{opacity:.5}}}.empty-discussion{padding:2.5rem 0;color:var(--muted);text-align:center;font-size:.85rem}.composer{padding:1rem 1.25rem;border-top:1px solid var(--border)}.composer-label{display:flex;align-items:center;gap:.45rem;margin-bottom:.6rem;font-size:.78rem}.composer-label strong{font-weight:600}textarea{min-height:4.5rem;max-height:25dvh;font-size:.84rem}.nwd-actions{border:0;padding-top:0;margin-top:.65rem}.shortcut{color:var(--muted);font-size:.7rem}.error{padding:.65rem 1.25rem;color:var(--danger, #c44);font-size:.8rem}.read-only{padding:1rem 1.25rem;border-top:1px solid var(--border);color:var(--muted);font-size:.8rem}@media(width<=480px){.discussion-header,.composer{padding:.8rem}.discussion-log{padding-inline:.3rem}.comment{padding-inline:.5rem}.shortcut{max-width:8rem}}
2
2
  `;var h=class extends c{static styles=[...c.styles,d(E),d(v),d(T)];static properties={finding:{attribute:!1},changed:{attribute:!1},_comments:{state:!0},_value:{state:!0},_editing:{state:!0},_busy:{state:!0},_error:{state:!0},_deleting:{state:!0}};constructor(){super(),this.finding=null,this.changed=null,this._comments=[],this._value="",this._editing=null,this._busy=!1,this._error="",this._deleting=null}connectedCallback(){super.connectedCallback(),document.addEventListener("managed-comments-reset",this._close)}disconnectedCallback(){this._unsubscribeComments?.(),this._unsubscribeComments=null,document.removeEventListener("managed-comments-reset",this._close),super.disconnectedCallback()}beforeOpen(){this._current=C(this.finding?._managedReportId),this._comments=o(this.finding),this._unsubscribeComments?.(),this._unsubscribeComments=y(this.finding.id,this._commentsChanged),this._refresh({scroll:!0})}_commentsChanged=()=>{if(!this.isConnected)return;if(!this._current()){this._close();return}let e=this.renderRoot.querySelector(".discussion-log"),t=e&&e.scrollHeight-e.scrollTop-e.clientHeight<32;this._comments=o(this.finding),t&&this._scrollToLatest()};_close=()=>this._finish(null);_scrollToLatest=async()=>{await this.updateComplete;let e=this.renderRoot.querySelector(".discussion-log");e&&(e.scrollTop=e.scrollHeight)};_refresh=async({scroll:e=!1}={})=>{if(!this._current()){this._close();return}let t=this.renderRoot.querySelector(".discussion-log"),r=t&&t.scrollHeight-t.scrollTop-t.clientHeight<32;this._busy=!0,this._error="";let n=await $(this.finding._managedReportId);if(this.isConnected){if(!this._current()){this._close();return}if(this._busy=!1,!n){this._error="Could not load comments. Please retry.";return}this._comments=o(this.finding),this.changed?.(),(e||r)&&this._scrollToLatest()}};_edit(e){this._deleting=null,this._editing=e,this._value=e.body,this._error="",this.updateComplete.then(()=>this.renderRoot.querySelector("textarea")?.focus())}_cancelEdit=()=>{this._editing=null,this._value="",this._error=""};_delete=async e=>{if(this._busy||!this._current())return;this._busy=!0,this._error="";let t=await k(this.finding,e);if(!this.isConnected){t===204&&this._current()&&this.changed?.();return}if(!this._current()){this._close();return}if(this._busy=!1,this._deleting=null,t===409){await this._refresh(),this.isConnected&&(this._error="This comment changed elsewhere. Review the latest version before deleting it.");return}if(t!==204){this._error=t===403||t===404?"This comment is unavailable or you no longer have permission to delete it.":"Could not delete the comment. Please retry.";return}this._comments=o(this.finding),this._editing?.id===e.id&&this._cancelEdit(),this.changed?.()};_save=async()=>{let e=this._value.trim();if(this._busy||!e||e.length>1e4||!this._current())return;this._busy=!0,this._error="";let t=await w(this.finding,e,this._editing);if(!this.isConnected)return;if(!this._current()){this._close();return}if(this._busy=!1,t.status===409){if(await this._refresh(),!this.isConnected)return;this._editing=this._comments.find(n=>n.id===this._editing?.id)??this._editing,this._error="This comment changed elsewhere. Your draft is kept. Review the latest version above before saving again.";return}if(!t.comment){this._error=t.status===403||t.status===404?"You no longer have permission to save this comment.":"Could not save the comment. Your draft is kept; please retry.";return}let r=this._editing!=null;this._comments=o(this.finding),this._cancelEdit(),this.changed?.(),r||await this._scrollToLatest(),await this.updateComplete,this.renderRoot.querySelector("textarea")?.focus()};_keydown=e=>{e.key==="Enter"&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),this._save())};_commentActions(e,t){let r=t&&e.authorId===a.managedSession?.id,n=m(e);return!r&&!n?s:i`${r?i`<button type="button" class="comment-action" aria-label="Edit comment" aria-pressed="${this._editing?.id===e.id}" ?disabled="${this._busy}" @click="${()=>this._edit(e)}">${l(g)}</button>`:s} ${n?i`<button type="button" class="comment-action danger" aria-label="Delete comment" aria-expanded="${this._deleting===e.id}" ?disabled="${this._busy}" @click="${()=>{this._deleting=this._deleting===e.id?null:e.id}}">${l(p)}</button>`:s}`}_deleteConfirmation(e){return this._deleting!==e.id||!m(e)?s:i`<div class="delete-confirm" role="group" aria-label="Confirm comment deletion"><span>Delete this comment?</span> <button type="button" ?disabled="${this._busy}" @click="${()=>{this._deleting=null}}">Cancel</button> <button type="button" class="danger" ?disabled="${this._busy}" @click="${()=>this._delete(e)}">Delete</button></div>`}render(){let e=x();return i`<dialog aria-labelledby="comments-title" @close="${this._onClose}"><header class="discussion-header"><div class="discussion-heading"><h3 id="comments-title">Discussion <span class="comment-count">${this._comments.length}</span></h3>${this.finding?.title?i`<p class="discussion-finding">${this.finding.title}</p>`:s}<p class="loc">${this.finding?.file??""}</p></div><div class="header-actions"><button type="button" class="refresh" aria-label="Refresh discussion" ?disabled="${this._busy}" @click="${()=>this._refresh()}"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8M21 3v5h-5"/></svg></button> <button type="button" class="close" aria-label="Close discussion" @click="${this._close}"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="m6 6 12 12M6 18 18 6"/></svg></button></div></header><section class="discussion-log" role="log" aria-label="Discussion" aria-relevant="additions text" aria-busy="${this._busy}"><ol class="comments">${this._comments.map(t=>i`<li class="${`comment${this._editing?.id===t.id?" editing":""}`}">${_(t,S(t.body),this._commentActions(t,e))} ${this._deleteConfirmation(t)}</li>`)}</ol>${this._comments.length===0?i`<p class="empty-discussion">${this._busy?"Loading discussion\u2026":e?"No comments yet. Start the discussion below.":"No comments yet."}</p>`:s}</section>${this._error?i`<p class="error" role="alert">${this._error}</p>`:s} ${e?i`<form class="composer" @submit="${t=>{t.preventDefault(),this._save()}}"><label class="composer-label" for="comment-body">${f(a.managedSession.id,a.managedSession.login)} ${this._editing?"Edit your comment":i`Reply as <strong>${a.managedSession.login}</strong>`}</label> <textarea id="comment-body" rows="3" maxlength="${1e4}" .value="${this._value}" placeholder="Write a comment…" aria-describedby="comment-shortcut" ?disabled="${this._busy}" @input="${t=>{this._value=t.target.value}}" @keydown="${this._keydown}"></textarea><footer class="nwd-actions"><span id="comment-shortcut" class="shortcut">Ctrl / ⌘ + Enter to send</span><span class="nwd-spacer"></span> ${this._editing?i`<button type="button" class="quiet" ?disabled="${this._busy}" @click="${this._cancelEdit}">Cancel edit</button>`:s} <button type="submit" class="primary" ?disabled="${this._busy||!this._value.trim()}">${this._editing?"Save changes":"Comment"}</button></footer></form>`:i`<p class="read-only">You have read-only access to this discussion.</p>`}</dialog>`}};customElements.define("managed-comments-dialog",h);function G(u,e){return b("managed-comments-dialog",{finding:u,changed:e})}export{G as openManagedCommentsDialog};
@@ -0,0 +1 @@
1
+ import{c as a,d as b}from"./chunk-UN5ZSYLE.js";import"./chunk-MYDDTA7W.js";import"./chunk-K3X5EJBQ.js";import"./chunk-CVVJAXVY.js";import"./chunk-VIHGO77Y.js";import"./chunk-RFZQQXSG.js";import"./chunk-RSHMVYNS.js";import"./chunk-XYDGU6BM.js";import"./chunk-UYAXVRVL.js";import"./chunk-NRPC74AM.js";import"./chunk-VQJCXGIY.js";import"./chunk-W4J3MGLB.js";import"./chunk-GJ4IUCNS.js";import"./chunk-PNHBZGDD.js";import"./chunk-UXNUAIIC.js";import"./chunk-R5O6FAW4.js";import"./chunk-CMQA4DM6.js";import"./chunk-4F6JSF57.js";import"./chunk-YVZH5SHP.js";import"./chunk-4XCDFGDP.js";import"./chunk-3BZ7JERB.js";import"./chunk-TZ5KB2Y5.js";import"./chunk-XYFXXB2G.js";import"./chunk-DIJJNTRH.js";import"./chunk-WZDTZE64.js";import"./chunk-GNXOKIGP.js";import"./chunk-C4Z6ZBXV.js";import"./chunk-2XUEZHIP.js";import"./chunk-TUII34K2.js";import"./chunk-V5O7M2YT.js";import"./chunk-OOJM4CTU.js";export{a as revealFinding,b as revealFindingInReport};