1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,39835,e=>{"use strict";var s=e.i(76350),t=e.i(73576),i=e.i(80376),r=e.i(59684),a=e.i(16156);let l=e=>(0,s.jsxs)("svg",{viewBox:"0 0 78 80",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,s.jsx)("path",{stroke:"currentColor",strokeWidth:"1.5",opacity:"0.3",d:"M28.5 60.5h21m-37-5.5-1 4.5M65 55l1 4.5"}),(0,s.jsx)("path",{stroke:"currentColor",strokeWidth:"1.5",opacity:"0.6",d:"M10.4 9.11A10 10 0 0 1 20.22 1h37.56a10 10 0 0 1 9.82 8.11l8.11 42.2a10 10 0 0 1-9.82 11.9H54.7a6.36 6.36 0 0 0-5.65 3.45 6.36 6.36 0 0 1-5.66 3.45H34.6a6.36 6.36 0 0 1-5.66-3.45 6.36 6.36 0 0 0-5.65-3.46H12.1a10 10 0 0 1-9.8-11.89l8.11-42.2Z"}),(0,s.jsx)("path",{stroke:"currentColor",strokeWidth:"1.5",opacity:"0.9",d:"M14.3 9.03a5 5 0 0 1 4.91-4.08H58.8a5 5 0 0 1 4.91 4.08l8.07 43.22a6 6 0 0 1-5.9 7.1H52.76a5.72 5.72 0 0 0-5.24 3.41 5.72 5.72 0 0 1-5.23 3.42h-6.58a5.72 5.72 0 0 1-5.23-3.42 5.72 5.72 0 0 0-5.24-3.4h-13.1a6 6 0 0 1-5.9-7.1L14.3 9.02Z"}),(0,s.jsx)("path",{stroke:"currentColor",strokeWidth:"1.5",opacity:"0.6",d:"m2.36 55.6 3.2 14.06A12 12 0 0 0 17.26 79h43.48a12 12 0 0 0 11.7-9.34l3.2-14.06"}),(0,s.jsx)("path",{stroke:"currentColor",strokeWidth:"1.5",opacity:"0.3",d:"M18.21 10.59a2.25 2.25 0 0 1 2.22-1.84h37.14c1.09 0 2.02.77 2.22 1.84l7.6 40.82c.36 2-1.17 3.84-3.2 3.84H13.8a3.25 3.25 0 0 1-3.2-3.84l7.6-40.82Z"}),(0,s.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",opacity:"0.6",d:"M24.85 19h27.28m-28.26 7H53.1m-31.18 7h33.13M20 40h20"})]});var n=e.i(99676),o=e.i(19455),d=e.i(81033),c=e.i(60457),u=e.i(35931);function x({item:e,onUnsubscribe:t,onReply:i}){let r=(0,c.usePeopleStore)(e=>e.byIds)(e.issue.subscriberIds);return(0,s.jsxs)("div",{className:"p-4",children:[(0,s.jsxs)("div",{className:"mb-3 flex items-center justify-between",children:[(0,s.jsx)("h3",{className:"text-foreground text-sm font-semibold",children:"Activity"}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(o.Button,{variant:"ghost",className:"text-muted-foreground text-xs",onClick:t,children:"Unsubscribe"}),(0,s.jsx)("div",{className:"flex -space-x-1.5",children:r.slice(0,4).map(e=>(0,s.jsxs)(n.Avatar,{className:"border-background size-6 border-2",children:[e.avatar&&(0,s.jsx)(n.AvatarImage,{src:e.avatar,alt:e.name}),(0,s.jsx)(n.AvatarFallback,{className:"text-xs",children:(0,u.getInitialsFromName)(e.name)})]},e.id))})]})]}),(0,s.jsx)(d.ActivityFeed,{activity:e.issue.activity,onReply:i})]})}var m=e.i(13903),h=e.i(69931),p=e.i(72436),g=e.i(21780),j=e.i(75157);function f({item:e}){let[i,r]=(0,t.useState)([]),a=e.issue.activity.at(-1),l=a?(0,m.formatDistanceToNow)(new Date(a.timestamp),{addSuffix:!0}):(0,m.formatDistanceToNow)(new Date(e.createdAt),{addSuffix:!0}),n=e=>{r(s=>{let t=s[e]?.url;return t&&URL.revokeObjectURL(t),s.filter((s,t)=>t!==e)})};return(0,s.jsxs)("div",{className:"p-4",children:[(0,s.jsxs)("div",{className:(0,j.cn)("mb-5 flex items-center gap-2.5 rounded-lg border px-3 py-2.5","border-border bg-muted/50 text-muted-foreground text-sm"),children:[(0,s.jsx)(h.RiNotificationLine,{className:"text-foreground/60 size-4 shrink-0"}),(0,s.jsxs)("span",{className:"min-w-0 truncate",children:[(0,s.jsx)("span",{className:"text-foreground font-medium",children:e.triggerText}),(0,s.jsx)("span",{className:"mx-1.5",children:"·"}),(0,s.jsx)("span",{children:l})]})]}),(0,s.jsx)("h2",{className:"text-foreground mb-3 text-2xl font-bold",children:e.issue.title}),e.issue.description&&(0,s.jsx)("p",{className:"text-foreground/80 mb-4 text-sm leading-relaxed",children:e.issue.description}),i.length>0&&(0,s.jsx)("div",{className:"mb-4 flex flex-wrap gap-2",children:i.map((e,t)=>e.url?(0,s.jsxs)("div",{className:"relative size-20 overflow-hidden rounded-lg border",children:[(0,s.jsx)("img",{src:e.url,alt:e.file.name,className:"size-full object-cover"}),(0,s.jsx)(o.Button,{type:"button",variant:"ghost",size:"icon",className:"bg-background/80 hover:bg-background absolute top-0.5 right-0.5 size-4 rounded-full p-0",onClick:()=>n(t),"aria-label":"Remove attachment",children:(0,s.jsx)(h.RiCloseLine,{className:"size-3"})})]},t):(0,s.jsxs)("div",{className:"flex max-w-45 items-center gap-1.5 rounded-md border px-2.5 py-1.5 text-xs",children:[(0,s.jsx)(h.RiFileTextLine,{className:"text-muted-foreground size-3.5 shrink-0"}),(0,s.jsx)("span",{className:"flex-1 truncate",children:e.file.name}),(0,s.jsx)(o.Button,{type:"button",variant:"ghost",size:"icon",className:"text-muted-foreground hover:text-foreground size-4 shrink-0 p-0",onClick:()=>n(t),"aria-label":"Remove attachment",children:(0,s.jsx)(h.RiCloseLine,{className:"size-3"})})]},t))}),(0,s.jsx)("div",{className:"mb-4",children:(0,s.jsx)(g.SubIssuesSection,{issue:e.issue})}),(0,s.jsx)(p.Separator,{})]})}var v=e.i(55146),b=e.i(46798);function S({item:e,isSubscribed:t,onOpenProperties:i,onToggleStar:r,onToggleSnooze:a,onArchive:l,onToggleSubscription:n,onDelete:d,onBack:c}){return(0,s.jsxs)("div",{className:"border-border flex shrink-0 items-center gap-2 border-b px-3 py-3",children:[c&&(0,s.jsx)(o.Button,{variant:"ghost",size:"icon","aria-label":"Back to inbox",onClick:c,className:"lg:hidden",children:(0,s.jsx)(h.RiArrowLeftSLine,{className:"size-5"})}),(0,s.jsxs)("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:["issue"===e.kind&&(0,s.jsx)("span",{className:"text-muted-foreground shrink-0 text-sm font-medium",children:e.issue.identifier}),(0,s.jsx)("h1",{className:"text-foreground truncate text-sm font-semibold",children:"issue"===e.kind?e.issue.title:e.project.name}),(0,s.jsxs)(b.Tooltip,{children:[(0,s.jsx)(b.TooltipTrigger,{render:(0,s.jsx)(o.Button,{variant:"ghost",size:"icon","aria-label":e.starred?"Remove from favourites":"Add to favourites",onClick:r,children:e.starred?(0,s.jsx)(h.RiStarFill,{className:"size-4 text-yellow-500"}):(0,s.jsx)(h.RiStarLine,{className:"size-4"})})}),(0,s.jsx)(b.TooltipContent,{children:e.starred?"Remove from favourites":"Add to favourites"})]})]}),(0,s.jsxs)("div",{className:"hidden items-center gap-1 lg:flex",children:["issue"===e.kind&&(0,s.jsxs)(b.Tooltip,{children:[(0,s.jsx)(b.TooltipTrigger,{render:(0,s.jsx)(o.Button,{variant:"ghost",size:"icon","aria-label":t?"Unsubscribe":"Subscribe",onClick:n,children:t?(0,s.jsx)(h.RiNotificationLine,{className:"size-4"}):(0,s.jsx)(h.RiNotificationOffLine,{className:"size-4"})})}),(0,s.jsx)(b.TooltipContent,{children:t?"Unsubscribe":"Subscribe"})]}),(0,s.jsxs)(b.Tooltip,{children:[(0,s.jsx)(b.TooltipTrigger,{render:(0,s.jsx)(o.Button,{variant:"ghost",size:"icon","aria-label":e.snoozed?"Unsnooze":"Snooze",onClick:a,children:e.snoozed?(0,s.jsx)(h.RiAlarmLine,{className:"size-4"}):(0,s.jsx)(h.RiTimeLine,{className:"size-4"})})}),(0,s.jsx)(b.TooltipContent,{children:e.snoozed?"Unsnooze":"Snooze"})]}),(0,s.jsxs)(b.Tooltip,{children:[(0,s.jsx)(b.TooltipTrigger,{render:(0,s.jsx)(o.Button,{variant:"ghost",size:"icon","aria-label":e.archived?"Unarchive":"Archive",onClick:l,children:e.archived?(0,s.jsx)(h.RiInboxUnarchiveLine,{className:"size-4"}):(0,s.jsx)(h.RiInboxArchiveLine,{className:"size-4"})})}),(0,s.jsx)(b.TooltipContent,{children:e.archived?"Unarchive":"Archive"})]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-1",children:[(0,s.jsxs)(v.DropdownMenu,{children:[(0,s.jsx)(v.DropdownMenuTrigger,{render:(0,s.jsx)(o.Button,{variant:"ghost",size:"icon","aria-label":"More options",children:(0,s.jsx)(h.RiMoreLine,{className:"size-4"})})}),(0,s.jsxs)(v.DropdownMenuContent,{align:"end",className:"w-full",children:[(0,s.jsxs)(v.DropdownMenuGroup,{children:[(0,s.jsx)(v.DropdownMenuItem,{onClick:r,children:e.starred?"Remove from favourites":"Add to favourites"}),"issue"===e.kind&&(0,s.jsx)(v.DropdownMenuItem,{onClick:n,children:t?"Unsubscribe":"Subscribe"}),(0,s.jsx)(v.DropdownMenuItem,{onClick:a,children:e.snoozed?"Unsnooze":"Snooze"})]}),(0,s.jsx)(v.DropdownMenuSeparator,{}),(0,s.jsxs)(v.DropdownMenuGroup,{children:[(0,s.jsx)(v.DropdownMenuItem,{onClick:l,children:e.archived?"Unarchive":"Archive"}),(0,s.jsx)(v.DropdownMenuItem,{variant:"destructive",onClick:d,children:"Delete notification"})]})]})]}),"issue"===e.kind&&(0,s.jsxs)(b.Tooltip,{children:[(0,s.jsx)(b.TooltipTrigger,{render:(0,s.jsx)(o.Button,{variant:"ghost",size:"icon","aria-label":"Properties",onClick:i,children:(0,s.jsx)(h.RiLayoutRight2Line,{className:"size-4"})})}),(0,s.jsx)(b.TooltipContent,{children:"Properties"})]})]})]})}var N=e.i(55367),k=e.i(95870),I=e.i(6193);function w({item:e}){let t=e.project,i=I.PROJECT_STATUS_CONFIG[t.status],r=(0,m.formatDistanceToNow)(new Date(e.createdAt),{addSuffix:!0});return(0,s.jsx)("div",{className:"p-4",children:(0,s.jsxs)("div",{className:"bg-card ring-foreground
1/10 flex flex-col gap-3 rounded-xl p-4 ring-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,s.jsx)(k.ProjectIconDisplay,{icon:t.icon,size:"lg"}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("h2",{className:"text-foreground truncate text-lg font-semibold",children:t.name}),(0,s.jsxs)("span",{className:(0,j.cn)("flex items-center gap-1 text-xs",i.color),children:[(0,s.jsx)("span",{className:"size-1.5 shrink-0 rounded-full bg-current"}),i.label]})]})]}),(t.summary||t.description)&&(0,s.jsx)("p",{className:"text-muted-foreground text-sm leading-relaxed",children:t.summary||t.description}),(0,s.jsxs)("p",{className:"text-muted-foreground text-xs",children:[e.actor?.name??"Someone"," added you to this project · ",r]}),(0,s.jsxs)(o.Button,{size:"sm",className:"w-fit gap-1.5",render:(0,s.jsx)(N.default,{href:`/workspace/projects/${t.slug}/overview`}),nativeButton:!1,children:["Go to project",(0,s.jsx)(h.RiArrowRightLine,{className:"size-3.5"})]})]})})}function C({item:e,isSubscribed:i,onOpenProperties:n,onToggleStar:o,onToggleSnooze:d,onArchive:c,onToggleSubscription:u,onDelete:m,onAddComment:h,onBack:p}){let[g,j]=(0,t.useState)(null),v=(0,t.useRef)(null);return e?(0,s.jsxs)("div",{className:"flex flex-1 flex-col overflow-hidden",children:[(0,s.jsx)(S,{item:e,isSubscribed:i,onOpenProperties:n,onToggleStar:()=>o(e.id),onToggleSnooze:()=>d(e.id),onArchive:()=>c(e.id),onToggleSubscription:()=>"issue"===e.kind&&u(e.issue.id),onDelete:()=>m(e.id),onBack:p}),"project"===e.kind?(0,s.jsx)(r.ScrollArea,{className:"min-h-0 flex-1",children:(0,s.jsx)(w,{item:e})}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(r.ScrollArea,{className:"min-h-0 flex-1",children:[(0,s.jsx)(f,{item:e}),(0,s.jsx)(x,{item:e,onUnsubscribe:()=>u(e.issue.id),onReply:(e,s)=>{j({id:e,name:s}),v.current?.focus()}})]}),(0,s.jsx)(a.CommentComposer,{ref:v,className:"mx-4 mb-4 shrink-0",replyingTo:g?.name??null,onCancelReply:()=>j(null),onSubmit:e=>{h(e,g?.id),j(null)}})]})]}):(0,s.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center gap-6 px-6 text-center",children:[(0,s.jsx)(l,{className:"h-auto w-30"}),(0,s.jsxs)("div",{className:"flex flex-col items-center gap-2",children:[(0,s.jsx)("p",{className:"text-foreground text-3xl font-semibold",children:"Select a notification"}),(0,s.jsx)("p",{className:"text-muted-foreground max-w-sm",children:"Choose an item from your inbox to view the complete conversation, activity history, and related issue details."})]})]})}var A=e.i(67489),T=e.i(25202);let y="mb-4",z="text-muted-foreground mb-2 flex items-center gap-1 text-xs font-semibold",R=I.MY_ISSUES_STATUS_ITEMS.map(e=>({label:e.label,value:e.value})),M=I.PRIORITY_ITEMS.map(e=>({label:e.label,value:e.value}));function D({item:e,onClose:t,onUpdateStatus:i,onUpdatePriority:a,onAddLabel:l,onRemoveLabel:n,onUpdateProject:d}){let c=(0,T.useProjectsStore)(e=>e.projects),u=e?.kind==="issue"?e.issue:null,x=u?I.MY_ISSUES_STATUS_ITEMS.find(e=>e.value===u.status):null,m=u?I.PRIORITY_ITEMS.find(e=>e.value===u.priority):null,g=u?I.AVAILABLE_LABELS.filter(e=>!u.labels.includes(e)):[],j=u?.projectId?c.find(e=>e.id===u.projectId)??null:null,f=[{label:"Select label...",value:"__placeholder__"},...g.map(e=>({label:e,value:e}))],v=[{value:"__none__",label:"No project"},...c.map(e=>({value:e.id,label:e.name}))];return(0,s.jsxs)("div",{className:"flex h-full flex-col",children:[(0,s.jsxs)("div",{className:"flex shrink-0 items-center justify-between border-b px-4 py-3",children:[(0,s.jsx)("p",{className:"text-foreground text-sm font-semibold",children:"Properties"}),(0,s.jsx)(o.Button,{variant:"ghost",size:"icon","aria-label":"Close properties",onClick:t,children:(0,s.jsx)(h.RiCloseLine,{className:"size-4"})})]}),u?(0,s.jsx)(r.ScrollArea,{className:"min-h-0 flex-1",children:(0,s.jsxs)("div",{className:"p-4",children:[(0,s.jsxs)("div",{className:y,children:[(0,s.jsx)("p",{className:z,children:"Status & Priority"}),(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsxs)(A.Select,{items:R,value:u.status,onValueChange:e=>e&&i(e),children:[(0,s.jsx)(A.SelectTrigger,{className:"w-full",children:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[x?.icon,(0,s.jsx)(A.SelectValue,{})]})}),(0,s.jsx)(A.SelectContent,{alignItemWithTrigger:!1,children:(0,s.jsx)(A.SelectGroup,{children:I.MY_ISSUES_STATUS_ITEMS.map(e=>(0,s.jsx)(A.SelectItem,{value:e.value,className:"not-data-[variant=destructive]:focus:**:text-[revert-rule]",children:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[e.icon,e.label]})},e.value))})})]}),(0,s.jsxs)(A.Select,{items:M,value:u.priority,onValueChange:e=>e&&a(e),children:[(0,s.jsx)(A.SelectTrigger,{className:"w-full",children:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[m?.icon,(0,s.jsx)(A.SelectValue,{})]})}),(0,s.jsx)(A.SelectContent,{alignItemWithTrigger:!1,children:(0,s.jsx)(A.SelectGroup,{children:I.PRIORITY_ITEMS.map(e=>(0,s.jsx)(A.SelectItem,{value:e.value,className:"not-data-[variant=destructive]:focus:**:text-[revert-rule]",children:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[e.icon,e.label]})},e.value))})})]})]})]}),(0,s.jsx)(p.Separator,{className:"mb-4"}),(0,s.jsxs)("div",{className:y,children:[(0,s.jsxs)("p",{className:z,children:[(0,s.jsx)(h.RiPriceTag3Line,{className:"size-3.5"}),"Labels"]}),(0,s.jsx)("div",{className:"mb-2 flex flex-wrap gap-1",children:u.labels.map(e=>(0,s.jsxs)(o.Button,{variant:"ghost",className:"bg-muted hover:bg-muted/60 text-foreground h-auto rounded-full px-2 py-0.5 text-xs font-normal",onClick:()=>n(e),title:`Remove ${e}
1`,children:[(0,s.jsx)("span",{className:"bg-primary size-2 rounded-full"}),e,(0,s.jsx)("span",{className:"text-muted-foreground ml-0.5",children:"Ã"})]},e))}),g.length>0&&(0,s.jsxs)(A.Select,{items:f,value:"__placeholder__",onValueChange:e=>{e&&"__placeholder__"!==e&&l(e)},children:[(0,s.jsx)(A.SelectTrigger,{className:"w-full",children:(0,s.jsx)(A.SelectValue,{placeholder:"Add label..."})}),(0,s.jsx)(A.SelectContent,{alignItemWithTrigger:!1,children:(0,s.jsx)(A.SelectGroup,{children:g.map(e=>(0,s.jsx)(A.SelectItem,{className:"not-data-[variant=destructive]:focus:**:text-[revert-rule]",value:e,children:e},e))})})]})]}),(0,s.jsx)(p.Separator,{className:"mb-4"}),(0,s.jsxs)("div",{className:y,children:[(0,s.jsxs)("p",{className:z,children:[(0,s.jsx)(h.RiProjectorLine,{className:"size-3.5"}),"Project"]}),(0,s.jsxs)(A.Select,{items:v,value:j?.id??"__none__",onValueChange:e=>{"__none__"===e?d(null):d(e)},children:[(0,s.jsx)(A.SelectTrigger,{className:"w-full",children:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[j&&(0,s.jsx)(h.RiProjectorLine,{className:"text-primary size-3.5 shrink-0"}),(0,s.jsx)(A.SelectValue,{})]})}),(0,s.jsx)(A.SelectContent,{alignItemWithTrigger:!1,children:(0,s.jsx)(A.SelectGroup,{children:v.map(e=>(0,s.jsx)(A.SelectItem,{className:"not-data-[variant=destructive]:focus:**:text-[revert-rule]",value:e.value,children:e.label},e.value))})})]})]})]})}):(0,s.jsx)("div",{className:"flex flex-1 items-center justify-center",children:(0,s.jsx)("p",{className:"text-muted-foreground text-xs",children:e?"This notification has no properties":"Select a notification"})})]})}var U=e.i(87812);let L={backlog:"text-foreground",todo:"text-foreground","in-progress":"text-amber-500","in-review":"text-sky-500",paused:"text-foreground",draft:"text-foreground",done:"text-green-500",cancelled:"text-foreground/60"},_={backlog:"Backlog",todo:"Todo","in-progress":"In Progress","in-review":"In Review",paused:"Paused",draft:"Draft",done:"Done",cancelled:"Cancelled"};function P({item:e,isActive:t,displayProperties:i,onSelect:r,onMarkAsUnread:a,onDelete:l,onSnooze:o,onArchive:d}){let c=(0,T.useProjectsStore)(e=>e.projects),x="issue"===e.kind?e.issue.activity.at(-1):void 0,p="issue"===e.kind?c.find(s=>s.id===e.issue.projectId)??null:null,g=x?.kind==="comment"?x.author:x?.kind==="event"?x.actor:null,f=i.includes("id"),v=i.includes("status-and-icon"),b="issue"===e.kind?e.issue.title:e.project.name,S=x?(0,m.formatDistanceToNow)(new Date(x.timestamp),{addSuffix:!1}).replace("about ","").replace(" ago",""):(0,m.formatDistanceToNow)(new Date(e.createdAt),{addSuffix:!1}).replace("about ","").replace(" ago",""),N=e.actor?.avatar??null;return(0,s.jsxs)(U.ContextMenu,{children:[(0,s.jsxs)(U.ContextMenuTrigger,{render:(0,s.jsx)("button",{type:"button",className:(0,j.cn)("hover:bg-muted/60 flex w-full items-start gap-3 border-b border-l-2 border-l-transparent px-4 py-3 text-left transition-colors",t&&"bg-muted/60 border-l-primary"),onClick:()=>r(e.id)}),children:[(0,s.jsxs)("div",{className:"relative mt-0.5 shrink-0",children:[(0,s.jsxs)(n.Avatar,{className:"size-8",children:[g&&g.avatar&&(0,s.jsx)(n.AvatarImage,{src:g.avatar,alt:g.name}),!g&&N&&(0,s.jsx)(n.AvatarImage,{src:N,alt:e.actor?.name??""}),(0,s.jsx)(n.AvatarFallback,{children:g?(0,u.getInitialsFromName)(g.name):e.actor?(0,u.getInitialsFromName)(e.actor.name):"?"})]}),!e.read&&(0,s.jsx)("span",{className:"bg-primary border-background absolute -top-0.5 -right-0.5 size-2.5 rounded-full border-2"})]}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("p",{className:"text-muted-foreground mb-0.5 truncate text-xs",children:e.triggerText}),(0,s.jsx)("p",{className:(0,j.cn)("truncate text-sm font-medium",e.read?"text-foreground/80":"text-foreground"),children:b}),(0,s.jsxs)("div",{className:"mt-0.5 flex items-center gap-1.5 overflow-hidden",children:["issue"===e.kind?(0,s.jsxs)(s.Fragment,{children:[f&&(0,s.jsx)("span",{className:"text-muted-foreground shrink-0 text-xs",children:e.issue.identifier}),v&&_[e.issue.status]&&(0,s.jsxs)("span",{className:(0,j.cn)("flex shrink-0 items-center gap-1 text-xs",L[e.issue.status]),children:[(0,s.jsx)("span",{className:"size-1.5 shrink-0 rounded-full bg-current"}),_[e.issue.status]]}),p&&(0,s.jsx)("span",{className:"text-muted-foreground min-w-0 truncate text-xs",children:p.name})]}):v&&(0,s.jsxs)("span",{className:(0,j.cn)("flex shrink-0 items-center gap-1 text-xs",I.PROJECT_STATUS_CONFIG[e.project.status].color),children:[(0,s.jsx)("span",{className:"size-1.5 shrink-0 rounded-full bg-current"}),I.PROJECT_STATUS_CONFIG[e.project.status].label]}),e.archived&&(0,s.jsx)(h.RiInboxArchiveLine,{className:"text-muted-foreground size-3.5 shrink-0"}),(0,s.jsx)("span",{className:"text-muted-foreground ml-auto shrink-0 text-xs",children:S})]})]})]}),(0,s.jsxs)(U.ContextMenuContent,{className:"w-52",children:[(0,s.jsxs)(U.ContextMenuItem,{onClick:()=>a(e.id),children:[(0,s.jsx)(h.RiCheckDoubleLine,{className:"size-4"}),"Mark as unread"]}),(0,s.jsxs)(U.ContextMenuItem,{onClick:()=>d(e.id),children:[e.archived?(0,s.jsx)(h.RiInboxUnarchiveLine,{className:"size-4"}):(0,s.jsx)(h.RiInboxArchiveLine,{className:"size-4"}),e.archived?"Unarchive":"Archive"]}),(0,s.jsxs)(U.ContextMenuItem,{onClick:()=>l(e.id),variant:"destructive",children:[(0,s.jsx)(h.RiDeleteBinLine,{className:"size-4"}),"Delete notification"]}),(0,s.jsx)(U.ContextMenuSeparator,{}),(0,s.jsxs)(U.ContextMenuSub,{children:[(0,s.jsxs)(U.ContextMenuSubTrigger,{children:[(0,s.jsx)(h.RiTimeLine,{className:"size-4"}),"Snooze"]}),(0,s.jsxs)(U.ContextMenuSubContent,{children:[(0,s.jsx)(U.ContextMenuItem,{onClick:()=>o(e.id),children:"For 1 hour"}),(0,s.jsx)(U.ContextMenuItem,{onClick:()=>o(e.id),children:"Until tomorrow"}),(0,s.jsx)(U.ContextMenuItem,{onClick:()=>o(e.id),children:"Until next week"})]})]})]})]})}function B({tab:e,items:t,groupedItems:i,activeId:a,displayProperties:l,onSelect:n,onMarkAsUnread:o,onDelete:d,onSnooze:c,onArchive:u}){let x={displayProperties:l,onSelect:n,onMarkAsUnread:o,onDelete:d,onSnooze:c,onArchive:u};return 0===t.length?(0,s.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 py-16",children:[(0,s.jsx)(h.RiInboxLine,{className:"text-muted-foreground size-10"}),(0,s.jsx)("p",{className:"text-muted-foreground text-sm",children:"No unread notifications"})]}):"groups"===e?(0,s.jsx)(r.ScrollArea,{className:"min-h-0 flex-1",children:Object.entries(i).map(([e,t])=>(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"bg-muted/40 border-border border-b px-4 py-1.5",children:(0,s.jsx)("span",{className:"text-muted-foreground text-xs font-semibold tracking-wider up
1percase",children:e})}),t.map(e=>(0,s.jsx)(P,{item:e,isActive:e.id===a,...x},e.id))]},e))}):(0,s.jsx)(r.ScrollArea,{className:"min-h-0 flex-1",children:t.map(e=>(0,s.jsx)(P,{item:e,isActive:e.id===a,...x},e.id))})}var F=e.i(37822),O=e.i(99375);function E({filterState:e,onMarkAllAsRead:t,onArchiveAllRead:i,onDeleteAll:r,onDeleteAllRead:a,onDeleteAllReadForCompletedIssues:l,onSetOrdering:n,onToggleShowSnoozed:d,onToggleShowRead:c,onToggleShowArchived:u,onToggleShowUnreadFirst:x,onToggleDisplayProperty:m}){return(0,s.jsxs)("div",{className:"flex items-center justify-between border-b px-4 py-3",children:[(0,s.jsx)("h2",{className:"text-foreground text-sm font-semibold",children:"Inbox"}),(0,s.jsxs)("div",{className:"flex items-center gap-1",children:[(0,s.jsxs)(v.DropdownMenu,{children:[(0,s.jsx)(v.DropdownMenuTrigger,{render:(0,s.jsx)(o.Button,{variant:"ghost",size:"icon","aria-label":"Inbox options",children:(0,s.jsx)(h.RiMoreLine,{className:"size-4"})})}),(0,s.jsxs)(v.DropdownMenuContent,{align:"end",className:"w-full",children:[(0,s.jsx)(v.DropdownMenuGroup,{children:(0,s.jsxs)(v.DropdownMenuItem,{onClick:i,children:[(0,s.jsx)(h.RiInboxArchiveLine,{className:"size-4"}),"Archive all read"]})}),(0,s.jsx)(v.DropdownMenuSeparator,{}),(0,s.jsxs)(v.DropdownMenuGroup,{children:[(0,s.jsxs)(v.DropdownMenuItem,{onClick:r,children:[(0,s.jsx)(h.RiDeleteBinLine,{className:"size-4"}),"Delete all"]}),(0,s.jsxs)(v.DropdownMenuItem,{onClick:a,children:[(0,s.jsx)(h.RiDeleteBinLine,{className:"size-4"}),"Delete all read"]}),(0,s.jsxs)(v.DropdownMenuItem,{onClick:l,children:[(0,s.jsx)(h.RiDeleteBinLine,{className:"size-4"}),"Delete all read for completed issues"]})]})]})]}),(0,s.jsxs)(b.Tooltip,{children:[(0,s.jsx)(b.TooltipTrigger,{render:(0,s.jsx)(o.Button,{variant:"ghost",size:"icon","aria-label":"Mark all as read",onClick:t,children:(0,s.jsx)(h.RiCheckDoubleLine,{className:"size-4"})})}),(0,s.jsx)(b.TooltipContent,{children:"Mark all as read"})]}),(0,s.jsxs)(F.Popover,{children:[(0,s.jsx)(F.PopoverTrigger,{render:(0,s.jsx)(o.Button,{variant:"ghost",size:"icon","aria-label":"Filter",children:(0,s.jsx)(h.RiFilter3Line,{className:"size-4"})})}),(0,s.jsx)(F.PopoverContent,{align:"end",className:"w-64 p-0",children:(0,s.jsxs)("div",{className:"space-y-4 p-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-muted-foreground mb-2 text-xs font-semibold tracking-widest uppercase",children:"Display"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-1.5",children:[{prop:"id",label:"ID"},{prop:"status-and-icon",label:"Status"}].map(({prop:t,label:i})=>{let r=e.displayProperties.includes(t);return(0,s.jsx)(o.Button,{variant:r?"default":"outline",className:"h-6 rounded-full px-2.5 text-xs",onClick:()=>m(t),children:i},t)})})]}),(0,s.jsxs)("div",{className:"border-border border-t pt-3",children:[(0,s.jsx)("p",{className:"text-muted-foreground mb-2 text-xs font-semibold tracking-widest uppercase",children:"Order"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-1.5",children:["newest","oldest","priority"].map(t=>(0,s.jsx)(o.Button,{variant:e.ordering===t?"default":"outline",className:"h-6 rounded-full px-2.5 text-xs capitalize",onClick:()=>n(t),children:t},t))})]}),(0,s.jsxs)("div",{className:"border-border border-t pt-3",children:[(0,s.jsx)("p",{className:"text-muted-foreground mb-2 text-xs font-semibold tracking-widest uppercase",children:"Visibility"}),(0,s.jsx)("div",{className:"flex flex-col gap-0",children:[{label:"Show snoozed",value:e.showSnoozed,action:d},{label:"Show read",value:e.showRead,action:c},{label:"Show archived",value:e.showArchived,action:u},{label:"Unread first",value:e.showUnreadFirst,action:x}].map(({label:e,value:t,action:i})=>(0,s.jsxs)("div",{className:"flex items-center justify-between py-1.5",children:[(0,s.jsx)("span",{className:"text-foreground text-sm",children:e}),(0,s.jsx)(O.Switch,{checked:t,onCheckedChange:i})]},e))})]})]})})]})]})]})}var G=e.i(87486),V=e.i(77572);function W({tab:e,onTabChange:t,totalCount:i,unreadCount:r,groupsCount:a,favouritesCount:l}){return(0,s.jsx)(V.Tabs,{value:e,onValueChange:e=>t(e),children:(0,s.jsxs)(V.TabsList,{variant:"line",className:"h-auto w-full gap-0 rounded-none border-b p-0",children:[(0,s.jsxs)(V.TabsTrigger,{value:"all",className:"gap-1.5 border-0 group-data-horizontal/tabs:after:-bottom-[0.5px]",children:["All",i>0&&(0,s.jsx)(G.Badge,{variant:"secondary",children:i})]}),(0,s.jsxs)(V.TabsTrigger,{value:"unread",className:"gap-1.5 border-0 group-data-horizontal/tabs:after:-bottom-[0.5px]",children:["Unread",r>0&&(0,s.jsx)(G.Badge,{variant:"secondary",children:r})]}),(0,s.jsxs)(V.TabsTrigger,{value:"groups",className:"gap-1.5 border-0 group-data-horizontal/tabs:after:-bottom-[0.5px]",children:["Teams",a>0&&(0,s.jsx)(G.Badge,{variant:"secondary",children:a})]}),(0,s.jsxs)(V.TabsTrigger,{value:"favourites",className:"gap-1.5 border-0 group-data-horizontal/tabs:after:-bottom-[0.5px]",children:["Starred",l>0&&(0,s.jsx)(G.Badge,{variant:"secondary",children:l})]})]})})}function $({tab:e,items:t,groupedItems:i,activeId:r,filterState:a,totalCount:l,unreadCount:n,groupsCount:o,favouritesCount:d,onTabChange:c,onSelect:u,onMarkAllAsRead:x,onMarkAsUnread:m,onDelete:h,onSnooze:p,onArchive:g,onArchiveAllRead:j,onDeleteAll:f,onDeleteAllRead:v,onDeleteAllReadForCompletedIssues:b,onSetOrdering:S,onToggleShowSnoozed:N,onToggleShowRead:k,onToggleShowArchived:I,onToggleShowUnreadFirst:w,onToggleDisplayProperty:C}){return(0,s.jsxs)("aside",{className:"flex h-full min-h-0 flex-col",children:[(0,s.jsx)(E,{filterState:a,onMarkAllAsRead:x,onArchiveAllRead:j,onDeleteAll:f,onDeleteAllRead:v,onDeleteAllReadForCompletedIssues:b,onSetOrdering:S,onToggleShowSnoozed:N,onToggleShowRead:k,onToggleShowArchived:I,onToggleShowUnreadFirst:w,onToggleDisplayProperty:C}),(0,s.jsx)(W,{tab:e,onTabChange:c,totalCount:l,unreadCount:n,groupsCount:o,favouritesCount:d}),(0,s.jsx)(B,{tab:e,items:t,groupedItems:i,activeId:r,displayProperties:a.displayProperties,onSelect:u,onMarkAsUnread:m,onDelete:h,onSnooze:p,onArchive:g})]})}var H=e.i(61817),Y=e.i(12239),J=e.i(16977),Z=e.i(5067);let K=["all","unread","favourites","groups"],Q="user-1",q={urgent:0,high:1,medium:2,low:3,none:4};var X=e.i(73194);e.i(75966);var ee=e.i(60399);e.s(["InboxApp",0,function(){let[e,r]=(0,t.useState)(!1),[a,l]=(0,t.useState)("list"),n=(0,X.useIsMobile)(1280),o=(()=>{let e=(0,J.useInboxStore)(),s=(0,H.useIssuesStore)(e=>e.issues),i=(0,H.useIssuesStore)(e=>e.getById),r=(0,c.usePeopleStore)(e=>e.getById),a=(0,H.useIssuesStore)(e=>e.updateStatus),l=(0,H.useIssuesStore)(e=>e.updatePriority),n=(0,H.useIssuesStore)(e=>e.updateLabels),o=(0,H.useIssuesStore)(e=>e.updateProject),d=(0,Z.useTeamsStore)(e=>e.teams),u=(0,T.useProjectsStore)(e=>e.projects),[x,m]=(0,Y.useQueryState)("tab",(0,Y.parseAsStringLiteral)(K).withDefault("all")),h=(0,t.useCallback)(e=>d.find(s=>s.id===e),[d]),p=(0,t.useMemo)(()=>e.notifications.filter(e=>e.recipientId===Q).flatMap(e=>{let t=r(e.actorId),i=t?.name??"Someone";if("project"===e.target.kind){let s=u.find(s=>
1s.id===e.target.id);return s?[{id:e.id,kind:"project",project:s,actor:t,type:e.type,triggerText:`${i} added you to ${s.name}`,read:e.read,starred:e.starred,snoozed:e.snoozed,archived:e.archived,createdAt:e.createdAt}]:[]}let a=s.find(s=>s.id===e.target.id);if(!a)return[];let l=(()=>{switch(e.type){case"assigned":return`${i} assigned this to you`;case"added-to-project":return`${i} added you to a project`;case"comment-reply":return`${i} replied to your comment`;case"activity":return`${i} commented on this issue`;default:return`${i} updated this issue`}})();return[{id:e.id,kind:"issue",issue:a,actor:t,type:e.type,triggerText:l,read:e.read,starred:e.starred,snoozed:e.snoozed,archived:e.archived,createdAt:e.createdAt}]}),[e.notifications,s,u,r]),g=(0,t.useMemo)(()=>p.filter(s=>(e.filterState.showArchived||!s.archived)&&(e.filterState.showSnoozed||!s.snoozed)&&(e.filterState.showRead||!s.read)),[p,e.filterState.showArchived,e.filterState.showSnoozed,e.filterState.showRead]),j=(0,t.useMemo)(()=>{let s=g;if("unread"===x?s=s.filter(e=>!e.read):"favourites"===x&&(s=s.filter(e=>e.starred)),"newest"===e.filterState.ordering)s=[...s].sort((e,s)=>s.createdAt.localeCompare(e.createdAt));else if("oldest"===e.filterState.ordering)s=[...s].sort((e,s)=>e.createdAt.localeCompare(s.createdAt));else if("priority"===e.filterState.ordering){let e=e=>q["issue"===e.kind?e.issue.priority:e.project.priority];s=[...s].sort((s,t)=>e(s)-e(t))}return e.filterState.showUnreadFirst&&"all"!==x&&(s=[...s].sort((e,s)=>!!e.read-!!s.read)),s},[g,e.filterState.ordering,e.filterState.showUnreadFirst,x]),f=(0,t.useMemo)(()=>{let e={};return j.forEach(s=>{let t="issue"===s.kind?s.issue.teamId:s.project.teamId,i=h(t),r=i?.name??t;e[r]||(e[r]=[]),e[r].push(s)}),e},[j,h]),v=(0,t.useMemo)(()=>j.find(s=>s.id===e.activeId)??p.find(s=>s.id===e.activeId)??null,[j,p,e.activeId]),b=(0,t.useMemo)(()=>!!v&&"issue"===v.kind&&v.issue.subscriberIds.includes(Q),[v]),S=(0,t.useMemo)(()=>g.length,[g]),N=(0,t.useMemo)(()=>g.filter(e=>!e.read).length,[g]),k=(0,t.useMemo)(()=>g.filter(e=>e.starred).length,[g]),I=(0,t.useMemo)(()=>new Set(g.map(e=>"issue"===e.kind?e.issue.teamId:e.project.teamId)).size,[g]),w=(0,t.useCallback)(s=>{e.setActive(s),e.markAsRead(s)},[e]),C=(0,t.useCallback)((s,t)=>{v&&"issue"===v.kind&&e.reply(v.issue.id,s,t)},[e,v]),A=(0,t.useCallback)((e,s)=>{a(e,s)},[a]),y=(0,t.useCallback)((e,s)=>{l(e,s)},[l]),z=(0,t.useCallback)((e,s)=>{let t=i(e);t&&n(e,[...t.labels,s])},[i,n]),R=(0,t.useCallback)((e,s)=>{let t=i(e);t&&n(e,t.labels.filter(e=>e!==s))},[i,n]),M=(0,t.useCallback)((e,s)=>{o(e,s)},[o]);return{tab:x,setTab:m,filteredItems:j,groupedItems:f,activeItem:v,totalCount:S,unreadCount:N,favouritesCount:k,groupsCount:I,isSubscribed:b,filterState:e.filterState,activeId:e.activeId,handleSelectItem:w,handleAddComment:C,handleUpdateStatus:A,handleUpdatePriority:y,handleAddLabel:z,handleRemoveLabel:R,handleUpdateProject:M,markAsUnread:e.markAsUnread,markAllAsRead:e.markAllAsRead,toggleStarred:e.toggleStarred,toggleSnoozed:e.toggleSnoozed,toggleArchived:e.toggleArchived,deleteNotification:e.deleteNotification,deleteAll:e.deleteAll,deleteAllRead:e.deleteAllRead,deleteAllReadForCompletedIssues:e.deleteAllReadForCompletedIssues,archiveAllRead:e.archiveAllRead,setOrdering:e.setOrdering,toggleShowSnoozed:e.toggleShowSnoozed,toggleShowRead:e.toggleShowRead,toggleShowArchived:e.toggleShowArchived,toggleShowUnreadFirst:e.toggleShowUnreadFirst,toggleDisplayProperty:e.toggleDisplayProperty}})(),d=e&&o.activeItem?.kind==="issue";return(0,s.jsxs)("div",{className:"flex h-full flex-col",children:[(0,s.jsxs)("div",{className:"bg-background grid h-full min-h-0 min-w-0 flex-1 grid-cols-1 overflow-hidden transition-[grid-template-columns] duration-300 ease-out *:min-h-0 *:min-w-0 lg:grid-cols-[23rem_minmax(0,1fr)] lg:*:first:border-r xl:grid-cols-[23rem_minmax(0,1fr)_var(--props-width)]",style:{"--props-width":d?"18rem":"0rem"},children:[(0,s.jsx)("div",{className:(0,j.cn)("flex-col lg:flex","list"===a?"flex":"hidden"),children:(0,s.jsx)($,{tab:o.tab,items:o.filteredItems,groupedItems:o.groupedItems,activeId:o.activeId,filterState:o.filterState,totalCount:o.totalCount,unreadCount:o.unreadCount,groupsCount:o.groupsCount,favouritesCount:o.favouritesCount,onTabChange:o.setTab,onSelect:function(e){o.handleSelectItem(e),l("detail")},onMarkAllAsRead:o.markAllAsRead,onMarkAsUnread:o.markAsUnread,onDelete:o.deleteNotification,onSnooze:o.toggleSnoozed,onArchive:o.toggleArchived,onArchiveAllRead:o.ar
1chiveAllRead,onDeleteAll:o.deleteAll,onDeleteAllRead:o.deleteAllRead,onDeleteAllReadForCompletedIssues:o.deleteAllReadForCompletedIssues,onSetOrdering:o.setOrdering,onToggleShowSnoozed:o.toggleShowSnoozed,onToggleShowRead:o.toggleShowRead,onToggleShowArchived:o.toggleShowArchived,onToggleShowUnreadFirst:o.toggleShowUnreadFirst,onToggleDisplayProperty:o.toggleDisplayProperty})}),(0,s.jsx)("div",{className:(0,j.cn)("bg-background min-h-0 flex-col lg:flex","detail"===a?"flex":"hidden"),children:(0,s.jsx)(C,{item:o.activeItem,isSubscribed:o.isSubscribed,onOpenProperties:()=>r(!0),onToggleStar:o.toggleStarred,onToggleSnooze:o.toggleSnoozed,onArchive:()=>o.activeItem&&o.toggleArchived(o.activeItem.id),onToggleSubscription:()=>o.activeItem?.kind==="issue"&&H.useIssuesStore.getState().toggleSubscriber(o.activeItem.issue.id,ee.CURRENT_USER_ID),onDelete:o.deleteNotification,onAddComment:o.handleAddComment,onBack:()=>l("list")})}),(0,s.jsx)("div",{"aria-hidden":!d,className:(0,j.cn)("hidden overflow-hidden border-l transition-colors duration-300 xl:block",!d&&"pointer-events-none border-l-transparent"),children:(0,s.jsx)("div",{className:(0,j.cn)("size-full transition-[opacity,transform] duration-300 ease-out",d?"translate-x-0 opacity-100":"translate-x-full opacity-0"),children:(0,s.jsx)(D,{item:o.activeItem,onClose:()=>r(!1),onUpdateStatus:e=>o.activeItem?.kind==="issue"&&o.handleUpdateStatus(o.activeItem.issue.id,e),onUpdatePriority:e=>o.activeItem?.kind==="issue"&&o.handleUpdatePriority(o.activeItem.issue.id,e),onAddLabel:e=>o.activeItem?.kind==="issue"&&o.handleAddLabel(o.activeItem.issue.id,e),onRemoveLabel:e=>o.activeItem?.kind==="issue"&&o.handleRemoveLabel(o.activeItem.issue.id,e),onUpdateProject:e=>o.activeItem?.kind==="issue"&&o.handleUpdateProject(o.activeItem.issue.id,e)})})})]}),n&&(0,s.jsx)(i.Sheet,{open:d,onOpenChange:e=>!e&&r(!1),children:(0,s.jsx)(i.SheetContent,{side:"right",showCloseButton:!1,className:"w-72 p-0",children:(0,s.jsx)(D,{item:o.activeItem,onClose:()=>r(!1),onUpdateStatus:e=>o.activeItem?.kind==="issue"&&o.handleUpdateStatus(o.activeItem.issue.id,e),onUpdatePriority:e=>o.activeItem?.kind==="issue"&&o.handleUpdatePriority(o.activeItem.issue.id,e),onAddLabel:e=>o.activeItem?.kind==="issue"&&o.handleAddLabel(o.activeItem.issue.id,e),onRemoveLabel:e=>o.activeItem?.kind==="issue"&&o.handleRemoveLabel(o.activeItem.issue.id,e),onUpdateProject:e=>o.activeItem?.kind==="issue"&&o.handleUpdateProject(o.activeItem.issue.id,e)})})})]})}],39835)}]);
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.