PageSourceSearch

https://www.gokanic.com/assets/_ticketId-CwwiNu9K.js

js gokanic.com collected 2026-10-02 01:31:48 UTC 20,350 bytes, 1 lines download raw bytes

1import{u as se,r as o,k as p,j as e,S as be,L as Le,B as h,x as jt,y as bt,z as De}from"./index-DSd_KA67.js";import{u as j}from"./useMutation-BYp1wGY4.js";import{a as m}from"./api-DEjVNANO.js";import{processServiceImage as vt}from"./useImageProcessor-CAGfRUnE.js";import{d as u,s as O}from"./toast-1q0BdJuf.js";import{A as ae}from"./arrow-left-gte9njEQ.js";import{C as ne}from"./index-BDCF4RGH.js";import{C as N}from"./index-BP54K2SS.js";import{I as je}from"./index-Bv02D27B.js";import{L as x}from"./index-D6zPwYlU.js";import{I as Nt}from"./image-LjlYVTLB.js";import{T as le}from"./index-CdThcWlI.js";import{X as V}from"./x-DEPUe6e3.js";import{A as Me}from"./arrow-right-DeQur32B.js";import{M as g}from"./index-BcV1WcSQ.js";import{L as Oe}from"./index-D1lzWRTp.js";import{P as wt}from"./plus-Bvubtalb.js";import"./createLucideIcon-BC48Drc1.js";import"./ListBox-a8Ty2P5Q.js";import"./Dialog-ChwbEPk_.js";import"./Label-DRpCpLvD.js";import"./surface-CXiMNM_t.js";import"./Modal-DNKE2hrT.js";const Ve=4;function ie(c){return new Date(c).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"})}function kt({ticketId:c,from:S}){const i=se(m.adminTickets.get,{ticketId:c}),f=se(m.adminTickets.listComments,{ticketId:c}),$=se(m.adminTickets.getViewerId,{}),w=se(m.adminReleases.list),[E,R]=o.useState(null),[re,T]=o.useState(null),[ve,Ne]=o.useState([]),[$e,G]=o.useState(!1),[ce,we]=o.useState(""),[de,ke]=o.useState(""),[A,Ce]=o.useState([]),[Ge,ye]=o.useState([]),[F,_]=o.useState([]),[He,H]=o.useState(!1),[Ie,K]=o.useState(""),[z,k]=o.useState([]),[me,Se]=o.useState(""),[B,U]=o.useState([]),Te=o.useRef(null),Pe=o.useRef(null),Ee=o.useRef(null),Ke=p(m.adminTickets.generateUploadUrl),{mutateAsync:Re,isPending:W}=j({mutationFn:p(m.adminTickets.toggleComplete),onSuccess:()=>{O("Ticket updated"),H(!1),K(""),k([])},onError:t=>u(t.message)}),{mutateAsync:We,isPending:X}=j({mutationFn:p(m.adminTickets.update),onSuccess:()=>{O("Ticket updated"),G(!1)},onError:t=>u(t.message)}),{mutateAsync:Xe,isPending:qe}=j({mutationFn:p(m.adminTickets.markStarted),onSuccess:()=>O("Ticket started"),onError:t=>u(t.message)}),{mutateAsync:Qe,isPending:Je}=j({mutationFn:p(m.adminTickets.markTesting),onSuccess:()=>O("Ticket marked for testing"),onError:t=>u(t.message)}),{mutateAsync:Ye,isPending:Ze}=j({mutationFn:p(m.adminTickets.setTag),onError:t=>u(t.message)}),{mutateAsync:et,isPending:tt}=j({mutationFn:p(m.adminTickets.setRelease),onError:t=>u(t.message)}),{mutateAsync:st,isPending:at}=j({mutationFn:p(m.adminTickets.setNotForRelease),onError:t=>u(t.message)}),{mutateAsync:nt,isPending:Ae}=j({mutationFn:p(m.adminTickets.addComment),onSuccess:()=>{O("Comment added"),Se(""),U([])},onError:t=>u(t.message)}),{mutateAsync:lt,isPending:xe}=j({mutationFn:p(m.adminTickets.updateComment),onSuccess:()=>{ge(null),Q(""),Y([]),Z([]),C([])},onError:t=>u(t.message)}),[q,ge]=o.useState(null),[ue,Q]=o.useState(""),[J,Y]=o.useState([]),[it,Z]=o.useState([]),[L,C]=o.useState([]),Fe=o.useRef(null),ee=async t=>{const{file:s,preview:l}=await vt(t,{maxDimension:1200,quality:.5}),n=await Ke({}),a=await fetch(n,{method:"POST",headers:{"Content-Type":s.type},body:s}),{storageId:d}=jt({storageId:bt()}).parse(await a.json());return{preview:l,storageId:d}},ot=async t=>{const s=t.target.files?.[0];if(t.target.value="",!s)return;const l={preview:URL.createObjectURL(s),storageId:null},n=F.length;_(a=>[...a,l]);try{const{preview:a,storageId:d}=await ee(s);_(r=>r.map((y,I)=>I===n?{preview:a,storageId:d}:y))}catch{u("Failed to upload image"),_(a=>a.filter((d,r)=>r!==n))}},rt=async t=>{const s=t.target.files?.[0];if(t.target.value="",!s)return;const l={preview:URL.createObjectURL(s),storageId:null},n=z.length;k(a=>[...a,l]);try{const{preview:a,storageId:d}=await ee(s);k(r=>r.map((y,I)=>I===n?{preview:a,storageId:d}:y))}catch{u("Failed to upload image"),k(a=>a.filter((d,r)=>r!==n))}},ct=async t=>{const s=t.target.files?.[0];if(t.target.value="",!s)return;const l={preview:URL.createObjectURL(s),storageId:null},n=B.length;U(a=>[...a,l]);try{const{preview:a,storageId:d}=await ee(s);U(r=>r.map((y,I)=>I===n?{preview:a,storageId:d}:y))}catch{u("Failed to upload image"),U(a=>a.filter((d,r)=>r!==n))}},dt=async t=>{const s=t.target.files?.[0];if(t.target.value="",!s)return;const l={preview:URL.createObjectURL(s),storageId:null},n=L.length;C(a=>[...a,l]);try{const{preview:a,storageId:d}=await ee(s);C(r=>r.map((y,I)=>I===n?{preview:a,storageId:d}:y))}catch{u("Failed to upload image"),C(a=>a.filter((d,r)=>r!==n))}},mt=()=>
1{i&&(we(i.title),ke(i.body),Ce([...i.images]),ye([...i.imageUrls]),_([]),G(!0))},xt=A.length+F.length,gt=F.some(t=>t.storageId===null),_e=ce.trim().length>=3&&de.trim().length>=10&&!gt&&!X,ut=async()=>{if(!_e)return;const t=[...A,...F.filter(s=>s.storageId!==null).map(s=>s.storageId)];await We({ticketId:c,title:ce.trim(),body:de.trim(),images:t})},ht=async()=>{await Re({ticketId:c,note:Ie.trim()||void 0,completionImages:z.filter(t=>t.storageId!==null).map(t=>t.storageId)})},pt=async()=>{await Re({ticketId:c})},ft=async()=>{await nt({ticketId:c,body:me.trim(),images:B.filter(t=>t.storageId!==null).map(t=>t.storageId)})};if(i===void 0)return e.jsx("div",{className:"min-h-dvh bg-background flex items-center justify-center",children:e.jsx(be,{size:"xl"})});const ze=S==="releases"?"/admin/releases":"/admin/tickets",Be=S==="releases"?"Back to Releases":"Back to Tickets";if(i===null)return e.jsxs("main",{className:"w-full flex flex-col gap-6 px-4 py-6 sm:px-6",children:[e.jsxs(Le,{to:ze,className:"flex items-center gap-1.5 text-sm text-muted hover:text-foreground transition-colors w-fit",children:[e.jsx(ae,{size:16}),Be]}),e.jsxs("div",{className:"flex flex-col items-center justify-center py-20 text-center gap-3",children:[e.jsx("div",{className:"text-4xl",children:"🎫"}),e.jsx("p",{className:"font-medium text-foreground",children:"Ticket not found"}),e.jsx("p",{className:"text-sm text-muted",children:"This ticket may have been deleted."})]})]});const he=i.status==="pending",pe=i.status==="started",Ue=i.status==="testing",fe=i.status==="completed",P=i.imageUrls.filter(Boolean),te=(i.completionImageUrls??[]).filter(Boolean),b=P.length,D=E!==null?Math.max(0,Math.min(E,b-1)):0,v=ve.length,M=re!==null?Math.max(0,Math.min(re,v-1)):0;return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"sticky top-0 z-10 bg-background border-b border-muted/20 px-4 sm:px-6 py-3",children:e.jsxs(Le,{to:ze,className:"flex items-center gap-1.5 text-sm text-muted hover:text-foreground transition-colors w-fit",children:[e.jsx(ae,{size:15}),Be]})}),e.jsxs("main",{className:"w-full flex flex-col gap-5 px-4 py-6 sm:px-6 max-w-3xl",children:[e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsxs("div",{className:"flex items-start gap-3 flex-wrap",children:[e.jsx("h1",{className:"text-2xl font-semibold text-foreground leading-tight flex-1",children:i.title}),he&&e.jsx(ne,{color:"warning",variant:"soft",children:"Pending"}),pe&&e.jsx(ne,{color:"accent",variant:"soft",children:"Started"}),Ue&&e.jsx(ne,{color:"default",variant:"soft",children:"Testing"}),fe&&e.jsx(ne,{color:"success",variant:"soft",children:"Completed"})]}),e.jsxs("p",{className:"text-xs text-muted",children:["Opened ",ie(i.createdAt)," · by ",i.createdByName]}),e.jsxs(N,{selectedKey:i.tag??null,onSelectionChange:t=>Ye({ticketId:c,tag:t||void 0}),className:"w-36",isDisabled:Ze,children:[e.jsxs(N.InputGroup,{children:[e.jsx(je,{placeholder:"No tag..."}),e.jsx(N.Trigger,{})]}),e.jsx(N.Popover,{children:e.jsxs(x,{children:[e.jsxs(x.Item,{id:"bug",textValue:"Bug",children:["Bug",e.jsx(x.ItemIndicator,{})]}),e.jsxs(x.Item,{id:"feature",textValue:"Feature",children:["Feature",e.jsx(x.ItemIndicator,{})]}),e.jsxs(x.Item,{id:"backlog",textValue:"Backlog",children:["Backlog",e.jsx(x.ItemIndicator,{})]}),e.jsxs(x.Item,{id:"admin",textValue:"Admin Work",children:["Admin Work",e.jsx(x.ItemIndicator,{})]})]})})]}),e.jsxs(N,{selectedKey:i.releaseId??null,onSelectionChange:t=>et({ticketId:c,releaseId:t==="__none__"||!t?void 0:t}),className:"w-48",isDisabled:tt||w===void 0,children:[e.jsxs(N.InputGroup,{children:[e.jsx(je,{placeholder:"No release..."}),e.jsx(N.Trigger,{})]}),e.jsx(N.Popover,{children:e.jsxs(x,{children:[e.jsxs(x.Item,{id:"__none__",textValue:"No release",children:["No release",e.jsx(x.ItemIndicator,{})]}),(w??[]).map(t=>e.jsxs(x.Item,{id:t._id,textValue:`v${t.version}`,children:["v",t.version,e.jsx(x.ItemIndicator,{})]},t._id))]})})]}),e.jsxs("label",{className:"flex items-center gap-2 text-sm cursor-pointer select-none",children:[e.jsx("input",{type:"checkbox",checked:!!i.notForRelease,disabled:at,onChange:t=>st({ticketId:c,notForRelease:t.target.checked}),className:"w-4 h-4"}),"Not for release"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(h,{size:"sm",variant:"ghost",onPress:mt,children:"Edit"}),he&&e.jsx(h,{size:"sm",variant:"secondary",onPress:()=>Xe({ticketId:c}),isPending:qe,children:"Start"}),pe&&e.jsx(h,{size:"sm",variant:"secondary",onPress:()=>Qe({ticketId:c}),isPending:Je,children:"Mark Testing"}),(he||pe||Ue)&&e.jsx(h,{size:"sm",variant:"secondary",onPress:()=>H(!0),children:"Mark Complete"}),fe&&e.jsx(h,{size:"sm",variant:"ghost",onPress:pt,isPending:W,children:"Reo
1pen"})]})]}),e.jsx("div",{className:"h-px bg-muted/20"}),e.jsx("div",{className:"p-4 rounded-xl bg-surface border border-muted/20",children:e.jsx("p",{className:"text-sm text-foreground whitespace-pre-wrap leading-relaxed",children:i.body})}),P.length>0&&e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Nt,{size:14,className:"text-muted"}),e.jsxs("h2",{className:"text-sm font-medium text-muted",children:[P.length," ",P.length===1?"Attachment":"Attachments"]})]}),e.jsx("div",{className:"flex flex-wrap gap-3",children:P.map((t,s)=>e.jsx("button",{onClick:()=>R(s),className:"block rounded-xl overflow-hidden border border-muted/20 hover:border-accent/50 transition-colors",children:e.jsx("img",{src:t,alt:`Attachment ${s+1}`,className:"max-h-40 w-auto block"})},s))})]}),fe&&(i.completionNote||te.length>0)&&e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("h2",{className:"text-sm font-medium text-muted",children:"Resolution"}),i.completionNote&&e.jsx("div",{className:"p-4 rounded-xl bg-surface border border-muted/20",children:e.jsx("p",{className:"text-sm text-foreground whitespace-pre-wrap leading-relaxed",children:i.completionNote})}),te.length>0&&e.jsx("div",{className:"flex flex-wrap gap-3",children:te.map((t,s)=>e.jsx("button",{onClick:()=>{Ne(te),T(s)},className:"block rounded-xl overflow-hidden border border-muted/20 hover:border-accent/50 transition-colors",children:e.jsx("img",{src:t,alt:`Resolution ${s+1}`,className:"max-h-40 w-auto block"})},s))}),i.completedAt&&e.jsxs("p",{className:"text-xs text-muted",children:["Closed ",ie(i.completedAt)," · by ",i.completedByName??"admin"]})]}),e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx("div",{className:"h-px bg-muted/20"}),e.jsxs("h2",{className:"text-sm font-medium text-muted",children:["Comments",f&&f.length>0?` (${f.length})`:""]}),f===void 0?e.jsx(be,{size:"sm"}):f.length===0?e.jsx("p",{className:"text-sm text-muted/60",children:"No comments yet."}):e.jsx("div",{className:"flex flex-col gap-3",children:f.map(t=>{const s=t.imageUrls.filter(Boolean);return e.jsxs("div",{className:"flex flex-col gap-3 p-4 rounded-xl bg-surface border border-muted/20",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-sm font-medium text-foreground",children:t.authorName}),e.jsx("span",{className:"text-xs text-muted",children:ie(t.createdAt)}),t.createdBy===$&&q!==t._id&&e.jsx("button",{className:"ml-auto text-xs text-muted hover:text-foreground transition-colors",onClick:()=>{ge(t._id),Q(t.body),Y([...t.images]),Z([...t.imageUrls]),C([])},children:"Edit"})]}),q===t._id?e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx(le,{value:ue,onChange:l=>Q(l.target.value),rows:3,autoFocus:!0}),J.length>0&&e.jsx("div",{className:"flex flex-wrap gap-2",children:J.map((l,n)=>e.jsxs("div",{className:"relative",children:[e.jsx("img",{src:it[n]??void 0,className:"max-h-[100px] w-auto rounded-lg bg-surface block"}),e.jsx("button",{onClick:()=>{Y(a=>a.filter((d,r)=>r!==n)),Z(a=>a.filter((d,r)=>r!==n))},className:"absolute -top-1.5 -right-1.5 text-danger",children:e.jsx(V,{size:18})})]},l))}),e.jsx(oe,{images:L,onRemove:l=>C(n=>n.filter((a,d)=>d!==l)),onAddClick:()=>Fe.current?.click(),total:J.length+L.length}),e.jsx("input",{ref:Fe,type:"file",accept:"image/*",className:"hidden",onChange:dt}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx(h,{size:"sm",variant:"ghost",onPress:()=>{ge(null),Q(""),Y([]),Z([]),C([])},isDisabled:xe,children:"Cancel"}),e.jsx(h,{size:"sm",onPress:()=>lt({commentId:t._id,body:ue,images:[...J,...L.filter(l=>l.storageId!==null).map(l=>l.storageId)]}),isDisabled:ue.trim().length<1||L.some(l=>l.storageId===null)||xe,isPending:xe,children:"Save"})]})]}):e.jsx("p",{className:"text-sm text-foreground whitespace-pre-wrap leading-relaxed",children:t.body}),q!==t._id&&s.length>0&&e.jsx("div",{className:"flex flex-wrap gap-2",children:s.map((l,n)=>e.jsx("button",{onClick:()=>{Ne(s),T(n)},className:"block rounded-xl overflow-hidden border border-muted/20 hover:border-accent/50 transition-colors",children:e.jsx("img",{src:l,alt:`Comment image ${n+1}`,className:"max-h-32 w-auto block"})},n))}),q!==t._id&&t.editedAt&&e.jsxs("p",{className:"text-xs text-muted/50 pt-1",children:["Edited ",ie(t.editedAt)]})]},t._id)})}),e.jsxs("div",{className:"flex flex-col gap-3 pt-1",children:[e.jsx(le,{value:me,onChange:t=>Se(t.target.value),placeholder:"Add a comment...",rows:3}),e.jsx(oe,{images:B,onRemove:t=>U(s=>s.filter((l,n)=>n!==t)),onAddClick:()=>Ee.current?.click(),total:B.length}),e.jsx("input",{ref:Ee,type:"file",accept:"image/*",className:"hidden",onChange:ct}),e.jsx("div",{className:"flex justify-end",children:e.jsx(h,{size:"sm",onPress:ft,isDisabled:me.trim().length<1||B.some(t=>t.storageId===null)||Ae,isPending:Ae,children:"Comment"})})]})]})]}),E!==null&&b>0&&e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/80 backdrop-blur-sm",onClick:()=>R(null),children:[e.jsx("button",{className:"absolute top-4 right-4 p-2 text-white/70 hover:text-white transition-colors",onClick:()=>R(null),children:e.jsx(V,{size:22})}),b>1&&e.jsxs("p",{className:"absolute top-5 left-1/2 -translate-x-1/2 text-xs text-white/60 tabular-nums pointer-events-none",children:[D+1," / ",b]}),e.jsx("img",{src:P[D],alt:`Attachment ${D+1}`,className:"max-h-[85vh] max-w-[90vw] rounded-xl object-contain shadow-2xl",onClick:t=>t.stopPropagation()}),b>1&&e.jsxs(e.Fragment,{children:[e.jsx("button",{className:"absolute left-2 sm:left-4 top-1/2 -translate-y-1/2 p-3 rounded-full bg-black/50 text-white/80 hover:text-white hover:bg-black/70 transition-colors",onClick:t=>{t.stopPropagation(),R((D-1+b)%b)},children:e.jsx(ae,{size:22})}),e.jsx("button",{className:"absolute right-2 sm:right-4 top-1/2 -translate-y-1/2 p-3 rounded-full bg-black/50 text-white/80 hover:text-white hover:bg-black/70 transition-colors",onClick:t=>{t.stopPropagation(),R((D+1)%b)},children:e.jsx(Me,{size:22})})]})]}),re!==null&&v>0&&e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/80 backdrop-blur-sm",onClick:()=>T(null),children:[e.jsx("button",{className:"absolute top-4 right-4 p-2 text-white/70 hover:text-white transition-colors",onClick:()=>T(null),children:e.jsx(V,{size:22})}),v>1&&e.jsxs("p",{className:"absolute top-5 left-1/2 -translate-x-1/2 text-xs text-white/60 tabular-nums pointer-events-none",children:[M+1," / ",v]}),e.jsx("img",{src:ve[M],alt:`Image ${M+1}`,className:"max-h-[85vh] max-w-[90vw] rounded-xl object-contain shadow-2xl",onClick:t=>t.stopPropagation()}),v>1&&e.jsxs(e.Fragment,{children:[e.jsx("button",{className:"absolute left-2 sm:left-4 top-1/2 -translate-y-1/2 p-3 rounded-full bg-black/50 text-white/80 hover:text-white hover:bg-black/70 transition-colors",onClick:t=>{t.stopPropagation(),T((M-1+v)%v)},children:e.jsx(ae,{size:22})}),e.jsx("button",{className:"absolute right-2 sm:right-4 top-1/2 -translate-y-1/2 p-3 rounded-full bg-black/50 text-white/80 hover:text-white hover:bg-black/70 transition-colors",onClick:t=>{t.stopPropagation(),T((M+1)%v)},children:e.jsx(Me,{size:22})})]})]}),e.jsx(g.Backdrop,{isOpen:$e,onOpenChange:t=>{!X&&!t&&G(!1)},children:e.jsx(g.Container,{children:e.jsxs(g.Dialog,{className:"sm:max-w-lg",children:[e.jsx(g.Header,{children:e.jsx(g.Heading,{children:"Edit Ticket"})}),e.jsxs(g.Body,{className:"space-y-4",children:[e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx(Oe,{htmlFor:"edit-title",className:"text-sm font-medium",children:"Title"}),e.jsx(je,{id:"edit-title",value:ce,onChange:t=>we(t.target.value),placeholder:"Brief summary of the issue"})]}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx(Oe,{htmlFor:"edit-body",className:"text-sm font-medium",children:"Description"}),e.jsx(le,{id:"edit-body",value:de,onChange:t=>ke(t.target.value),placeholder:"Describe the issue in detail...",rows:4})]}),A.length>0&&e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx("p",{className:"text-sm text-muted",children:"Current images"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:A.map((t,s)=>e.jsxs("div",{className:"relative",children:[e.jsx("img",{src:Ge[s]??void 0,className:"max-h-[100px] w-auto rounded-lg bg-surface block"}),e.jsx("button",{onClick:()=>{Ce(l=>l.filter((n,a)=>a!==s)),ye(l=>l.filter((n,a)=>a!==s))},className:"absolute -top-1.5 -right-1.5 text-danger",children:e.jsx(V,{size:18})})]},t))})]}),e.jsx(oe,{images:F,onRemove:t=>_(s=>s.filter((l,n)=>n!==t)),onAddClick:()=>Te.current?.click(),total:xt,label:A.length>0?"Add more images":void 0}),e.jsx("input",{ref:Te,type:"file",accept:"image/*",className:"hidden",onChange:ot})]}),e.jsxs(g.Footer,{children:[e.jsx(h,{variant:"ghost",onPress:()=>G(!1),isDisabled:X,children:"Cancel"}),e.jsx(h,{onPress:ut,isDisabled:!_e,isPending:X,children:"Save"})]})]})})}),e.jsx(g.Backdrop,{isOpen:He,onOpenChange:t=>{t||(H(!1),K(""),k([]))},children:e.jsx(g.Container,{children:e.jsxs(g.Dialog,{className:"sm:max-w-md",children:[e.jsx(g.Header,{children:e.jsx(g.Heading,{children:"Mark Complete"})}),e.jsxs(g.Body,{className:"space-y-3 p-1",children:[e.jsx("p",{className:"text-sm text-muted",children:"Optionally add a note about how this was resolved."}),e.jsx(le,{value:Ie,onChange:t=>K(t.target.value),placeholder:"Resolution notes (optional)...",rows:4,className:"w-full",autoFocus:!0}),e.jsx(oe,{images:z,onRemove:t=>k(s=>s.filter((l,n)=>n!==t)),onAddClick:()=>Pe.current?.click(),total:z.length,label:"Attach completion images (optional)"}),e.jsx("input",{ref:Pe,type:"file",accept:"image/*",className:"hidden",onChange:rt})]}),e.jsxs(g.Footer,{children:[e.jsx(h,{variant:"ghost",onPress:()=>{H(!1),K(""),k([])},isDisabled:W,children:"Cancel"}),e.jsx(h,{onPress:ht,isPending:W,isDisabled:W||z.some(t=>t.storageId===null),children:"Mark Complete"})]})]})})})]})}function oe({images:c,onRemove:S,onAddClick:i,total:f,label:$}){return c.length===0&&f>=Ve?null:e.jsxs("div",{className:"flex flex-col gap-1.5",children:[$&&e.jsx("p",{className:"text-sm text-muted",children:$}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[c.map((w,E)=>e.jsxs("div",{className:"relative",children:[e.jsx("img",{src:w.preview,className:"max-h-[100px] w-auto rounded-lg bg-surface block"}),w.storageId===null&&e.jsx("div",{className:"absolute inset-0 rounded-lg flex items-center justify-center bg-black/50",children:e.jsx(be,{size:"sm"})}),w.storageId!==null&&e.jsx("button",{onClick:()=>S(E),className:"absolute -top-1.5 -right-1.5 text-danger",children:e.jsx(V,{size:18})})]},w.preview)),f<Ve&&e.jsx("button",{onClick:i,className:"w-[72px] h-[72px] rounded-lg border border-dashed border-muted/40 flex items-center justify-center text-muted hover:border-muted hover:text-foreground transition-colors",children:e.jsx(wt,{size:20})})]})]})}function Wt(){const{ticketId:c}=De.useParams(),{from:S}=De.useSearch();return e.jsx(kt,{ticketId:c,from:S})}export{Wt as component};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.