PageSourceSearch

https://thetool.company/_next/static/chunks/3k7akjk9avrsi.js

js thetool.company collected 2026-09-24 14:59:25 UTC 41,313 bytes, 10 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,520423,e=>{"use strict";var t=e.i(843476),n=e.i(571930),a=e.i(664659),r=e.i(373264),s=e.i(370956),i=e.i(555436),l=e.i(649582),o=e.i(647163);function c({className:e}){return(0,t.jsxs)("div",{className:(0,o.cn)("inline-flex h-8 shrink-0 items-center rounded-full border border-input bg-background px-3 text-xs text-muted-foreground whitespace-nowrap",e),children:[(0,t.jsx)(l.SlidersHorizontal,{className:"mr-1.5 size-3.5 shrink-0"}),(0,t.jsx)("span",{className:"hidden sm:inline",children:"Filters"})]})}e.i(611423),e.i(524657),e.s(["DynamicFilterBarSkeleton",0,function({searchPlaceholder:e,className:n,afterSearch:a,afterFilters:r,rightSlot:s}){return(0,t.jsxs)("div",{className:(0,o.cn)("flex flex-nowrap sm:flex-wrap items-center gap-2 min-w-0 w-full",n),children:[(0,t.jsxs)("div",{className:"relative flex-1 min-w-0 sm:flex-initial sm:max-w-none sm:w-[180px]",children:[(0,t.jsx)(i.Search,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground"}),(0,t.jsx)("div",{className:"search-pill flex w-full items-center rounded-full border bg-white border-[oklch(0.85_0.01_60)] dark:bg-black dark:border-transparent pl-8 pr-3 h-8 text-[11px] sm:text-xs text-muted-foreground",children:(0,t.jsx)("span",{className:"truncate",children:e})})]}),(0,t.jsx)(c,{}),a,r,s&&(0,t.jsx)("div",{className:"ml-auto flex items-center gap-2 shrink-0",children:s})]})},"SavedViewsButtonSkeleton",0,function({className:e}){return(0,t.jsxs)("div",{className:(0,o.cn)("flex items-center gap-1.5 rounded-full border border-input bg-white dark:bg-zinc-950 px-2 sm:px-3 h-8 text-xs max-w-[220px] whitespace-nowrap shrink-0 text-muted-foreground",e),children:[(0,t.jsx)(n.Bookmark,{className:"h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"hidden sm:inline truncate",children:"All"}),(0,t.jsx)(a.ChevronDown,{className:"h-3 w-3 opacity-60 shrink-0"})]})},"ViewToggleSkeleton",0,function({active:e="table",className:n}){let a="inline-flex items-center justify-center rounded-full px-2.5 py-1.5 bg-white dark:bg-background text-foreground font-medium",i="inline-flex items-center justify-center rounded-full px-2.5 py-1.5 text-muted-foreground";return(0,t.jsxs)("div",{className:(0,o.cn)("inline-flex items-center rounded-full bg-muted p-1 shrink-0",n),children:[(0,t.jsx)("span",{className:"table"===e?a:i,children:(0,t.jsx)(s.List,{className:"h-3.5 w-3.5"})}),(0,t.jsx)("span",{className:"kanban"===e?a:i,children:(0,t.jsx)(r.LayoutGrid,{className:"h-3.5 w-3.5"})})]})}])},604246,e=>{"use strict";var t=e.i(843476),n=e.i(271645),a=e.i(751975),r=e.i(167881),s=e.i(59377),i=e.i(23031),l=e.i(342884),o=e.i(846696);e.s(["EntityTagManager",0,function({entityType:e,selectedIds:c,onTagged:u,compact:d,resolveIds:m,count:f,tooltip:p="Tag"}){let[h,x]=(0,n.useState)([]),[g,b]=(0,n.useState)(!1),[w,y]=(0,n.useState)(!1),v=f??c.length;async function j(){let e=await fetch("/api/tags");e.ok&&x((await e.json()).tags||[])}async function k(e,t){y(!0);try{let n=await fetch("/api/tags",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e,color:t})});if(!n.ok)throw Error();let a=await n.json();x(e=>e.some(e=>e.id===a.tag.id)?e:[...e,a.tag]),v>0&&await N(a.tag.id)}catch{o.toast.error("Failed to create tag")}finally{y(!1)}}async function N(t){if(0!==v){y(!0);try{let n=m?await m():c;if(0===n.length)return;if(!(await fetch("/api/tags/entities",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({entity_type:e,entity_ids:n,tag_id:t})})).ok)throw Error();o.toast.success(`Tag applied to ${n.length.toLocaleString()} ${1===n.length?"item":"items"}`),b(!1),u?.()}catch{o.toast.error("Failed to apply tag")}finally{y(!1)}}}async function S(e){try{await fetch(`/api/tags?id=${e}`,{method:"DELETE"}),x(t=>t.filter(t=>t.id!==e))}catch{o.toast.error("Failed to delete tag")}}return(0,n.useEffect)(()=>{g&&j()},[g]),(0,t.jsxs)(s.Popover,{open:g,onOpenChange:b,children:[d?(0,t.jsx)(l.ToolbarTip,{label:p,children:(0,t.jsx)(s.PopoverTrigger,{asChild:!0,children:(0,t.jsx)(r.Button,{variant:"ghost",size:"sm",className:"h-8 w-8 rounded-md p-0","aria-label":p,disabled:0===v,children:(0,t.jsx)(a.Tag,{className:"h-4 w-4"})})})}):(0,t.jsx)(s.PopoverTrigger,{asChild:!0,children:(0,t.jsxs)(r.Button,{variant:"outline",size:"sm",className:"gap-1.5",disabled:0===v,children:[(0,t.jsx)(a.Tag,{className:"h-4 w-4"}),"Tag"]})}),(0,t.jsx)(s.PopoverContent,{className:"w-64 p-0 overflow-hidden",align:"start",children:(0,t.jsx)(i.TagPickerPanel,{tags:h,onSelect:e=>N(e.id),onCreate:k,onDelete:S,busy:w})})]})}])},132193,e=>{"use strict";var t=e.i(843476),n=e.i(271645),a=e.i(647163);e.s(["InlineEdit",0,function({value:e,onSave:r,validate:s,className:i,inputClassName:l,placeholder:o,type:c="text",sizeToContent:u=!1,animateChanges:d=!1,readOnly:m=!1,wrap:f=!1,display:p,prefix:h,title:x,required:g=!1,inputMode:b,onEditingChange:w}
1){let[y,v]=(0,n.useState)(!1),[j,k]=(0,n.useState)(e),[N,S]=(0,n.useState)(!1),C=(0,n.useRef)(null),_=(0,n.useRef)(!1),E=(0,n.useRef)(e),[T,P]=(0,n.useState)(!1),[O,D]=(0,n.useState)(null);(0,n.useEffect)(()=>{if(k(e),d&&E.current&&E.current!==e&&e){D(E.current),P(!0);let t=setTimeout(()=>{P(!1),D(null)},300);return E.current=e,()=>clearTimeout(t)}E.current=e},[e,d]);let R=(0,n.useRef)(null),L=(0,n.useRef)(!1);(0,n.useEffect)(()=>{if(y){L.current=!0,C.current?.focus({preventScroll:!0}),C.current?.select();return}if(!L.current)return;let e=R.current?.parentElement??null;for(let t=0;e&&t<6;t+=1)e.scrollLeft>0&&"hidden"===getComputedStyle(e).overflowX&&(e.scrollLeft=0),e=e.parentElement},[y]);let M=(0,n.useRef)(w);(0,n.useEffect)(()=>{M.current=w},[w]);let A=(0,n.useRef)(!1);(0,n.useEffect)(()=>{if(!A.current){A.current=!0;return}M.current?.(y)},[y]);let I=(0,n.useCallback)(async()=>{if(_.current)return;let t=j.trim();if(t===e||g&&!t){k(e),v(!1);return}if(!(s&&s(t))){_.current=!0,S(!0);try{await r(t),v(!1)}finally{S(!1),_.current=!1}}},[j,e,s,r,g]),F=(0,n.useCallback)(()=>{k(e),v(!1)},[e]),B=u?"whitespace-nowrap":f?"whitespace-normal break-words line-clamp-3":"truncate",V=u?"":a.haloMaxWidth,z=e?p??e:(0,t.jsx)("span",{className:"text-muted-foreground",children:o});return m?(0,t.jsxs)("span",{className:(0,a.cn)("inline-block px-1 -mx-1",B,V,i),title:x??(e||void 0),children:[h,z]}):y?(0,t.jsx)("input",{ref:C,type:c,inputMode:b,value:j,onChange:e=>k(e.target.value),onKeyDown:e=>{"Enter"===e.key&&I(),"Escape"===e.key&&F()},onBlur:I,onClick:e=>e.stopPropagation(),disabled:N,placeholder:o,className:(0,a.cn)("bg-transparent px-1 -mx-1 py-0 text-inherit outline-none caret-foreground min-w-0",u?"[field-sizing:content] min-w-[6ch] max-w-[calc(100%+0.5rem)]":"w-[calc(100%+0.5rem)]",l)}):T&&O?(0,t.jsxs)("span",{className:(0,a.cn)("relative inline-flex flex-col overflow-hidden whitespace-nowrap rounded-sm px-1 -mx-1",i),style:{height:"1.5em"},children:[(0,t.jsx)("span",{className:"inline-block",style:{animation:"inline-edit-slide-out 300ms ease-in forwards"},children:O}),(0,t.jsx)("span",{className:"inline-block",style:{animation:"inline-edit-slide-in 300ms ease-out forwards"},children:e}),(0,t.jsx)("style",{children:`
2            @keyframes inline-edit-slide-out {
3              from { transform: translateY(0); opacity: 1; }
4              to   { transform: translateY(-100%); opacity: 0; }
5            }
6            @keyframes inline-edit-slide-in {
7              from { transform: translateY(0); opacity: 0; }
8              to   { transform: translateY(-100%); opacity: 1; }
9            }
10          `})]}):(0,t.jsxs)("button",{ref:R,type:"button",onClick:e=>{e.stopPropagation(),v(!0)},className:(0,a.cn)("text-left rounded-sm px-1 -mx-1 transition-colors cursor-text hover:underline underline-offset-2 decoration-foreground/30",h?(0,a.cn)("inline-flex items-center gap-1.5 min-w-0 align-middle",a.haloMaxWidth):(0,a.cn)(B,V),i),title:x??(e||void 0),children:[h,h?(0,t.jsx)("span",{className:(0,a.cn)("min-w-0 max-w-full",B),children:z}):z]})}])},289086,627763,206263,e=>{"use strict";var t=e.i(843476),n=e.i(887993),n=n,a=e.i(632636),a=a,r=e.i(750570),s=e.i(88081),i=e.i(447170);let l=[{value:"default",label:"Manual"},{value:"count_desc",label:"Count ↓"},{value:"count_asc",label:"Count ↑"},{value:"name_asc",label:"Name A–Z"},{value:"name_desc",label:"Name Z–A"}];e.s(["KANBAN_SORT_OPTIONS",0,l,"applyKanbanBucketSort",0,function(e,t,n){if("default"===t)return[...e];let a=[...e];return a.sort((e,a)=>{switch(t){case"count_desc":case"count_asc":{let r=n?.[e.value]??0,s=n?.[a.value]??0;return"count_desc"===t?s-r:r-s}case"name_asc":return(e.label||"").localeCompare(a.label||"");case"name_desc":return(a.label||"").localeCompare(e.label||"");default:return 0}}),a}],627763);let o={default:(0,t.jsx)(r.GripVertical,{className:"h-3 w-3 shrink-0"}),count_desc:(0,t.jsx)(s.Hash,{className:"h-3 w-3 shrink-0"}),count_asc:(0,t.jsx)(s.Hash,{className:"h-3 w-3 shrink-0"}),name_asc:(0,t.jsx)(n.default,{className:"h-3 w-3 shrink-0"}),name_desc:(0,t.jsx)(a.default,{className:"h-3 w-3 shrink-0"})};e.s(["KanbanViewOptions",0,function({sortBy:e,onSortByChange:n,className:a}){return(0,t.jsx)(i.SearchableSelect,{size:"sm",value:e,onValueChange:e=>n(e),options:l.map(e=>({value:e.value,label:e.label})),triggerIcon:(0,t.jsx)("span",{className:"text-muted-foreground shrink-0",children:o[e]}),className:a})}],289086);var c=e.i(271645);let u=["default","count_desc","count_asc","name_asc","name_desc"];e.s(["useKanbanSort",0,function(e){let t=`kanban-sort:${e}`,[n,a]=(0,c.useState)(()=>(function(e){try{let t=localStorage.getItem(e);if(t&&u.includes(t))return t}catch{}return"default"})(t));return[n,(0,c.useCallback)(e=>{a(e);try{localStorage.setItem(t,e)}catch{}},[t])]}],206263)},923017,e=>{"use strict";var t=e.i(843476),n=e.i(271645),a=e.i(477183),r=e.i(76590),s=e.i(807311),i=e.i(786350),l=e.i(463415),o=e.i(994179),c=e.i(23750),u=e.i(626250),d=e.i(127491),m=e.i(363178),f=e.i(647163),p=e.i(783618),h=e.i(476765),x=e.i(524657),g=e.i(750570),b=e.i(788699),w=e.i(37727),y=e.i(846696),v=e.i(341256);function j({color:e,className:n}){let{resolvedTheme:a}=(0,m.useTheme)();return(0,t.jsx)("span",{className:(0,f.cn)("rounded-full shrink-0",(0,x.dotClassForColor)(e),n),style:(0,x.dotStyleForColor)(e,"dark"===a)})}function k({initialLabel:e,initialColor:a,onSubmit:r,onCancel:s,submitLabel:i}
10){let[l,o]=(0,n.useState)(e),[d,m]=(0,n.useState)(a);async function f(){l.trim()&&await r(l.trim(),d)}return(0,t.jsxs)("div",{className:"p-2 space-y-2.5",onClick:e=>e.stopPropagation(),onKeyDown:e=>{"Enter"===e.key&&f(),"Escape"===e.key&&s()},children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)(c.Input,{autoFocus:!0,variant:"on-white",placeholder:"Status name",value:l,onChange:e=>o(e.target.value),className:"h-7 text-xs flex-1"}),(0,t.jsx)("button",{type:"button",onClick:s,className:"shrink-0 p-1 text-muted-foreground hover:text-foreground transition-colors",children:(0,t.jsx)(w.X,{className:"size-3"})})]}),(0,t.jsx)(u.StatusColorField,{value:d,onChange:m}),(0,t.jsx)("button",{type:"button",onClick:f,disabled:!l.trim(),className:"w-full h-7 text-xs font-medium rounded-md bg-foreground text-background hover:bg-foreground/90 disabled:opacity-40 disabled:cursor-not-allowed transition-colors",children:i})]})}function N({option:e,navProps:n,isActive:a,isEditing:i,draggable:l,onSelect:o,onStartEdit:c,onCancelEdit:u,onSaveEdit:m,onDelete:p}){let{attributes:h,listeners:x,setNodeRef:w,transform:y,transition:S,isDragging:C}=(0,r.useSortable)({id:e.id,disabled:!l}),_={transform:s.CSS.Translate.toString(y),transition:S,opacity:C?.5:1,zIndex:C?50:void 0,position:"relative"};return i?(0,t.jsx)("div",{ref:w,style:_,children:(0,t.jsx)(k,{initialLabel:e.label,initialColor:e.color,onSubmit:async(e,t)=>{await m({label:e,color:t})},onCancel:u,submitLabel:"Save"})}):(0,t.jsxs)("div",{ref:w,style:_,"data-slot":"dropdown-row",...n,className:(0,f.cn)(d.DROPDOWN_ROW_CLASS,"gap-1 group/status",a&&"font-medium"),children:[l&&(0,t.jsx)("span",{className:"opacity-0 group-hover/status:opacity-100 cursor-grab active:cursor-grabbing transition-opacity shrink-0 touch-none",...h,...x,children:(0,t.jsx)(g.GripVertical,{className:"size-3 text-muted-foreground"})}),(0,t.jsxs)("button",{type:"button",onClick:o,className:"flex items-center gap-2 flex-1 min-w-0 cursor-pointer text-start",children:[(0,t.jsx)(j,{color:e.color,className:"size-2"}),(0,t.jsx)("span",{className:"truncate",children:e.label})]}),(0,t.jsx)(d.EnterHint,{}),(0,t.jsxs)("div",{className:"flex items-center gap-0.5 opacity-0 group-hover/status:opacity-100 transition-opacity shrink-0",children:[(0,t.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),c()},className:"p-0.5 text-muted-foreground hover:text-foreground transition-colors rounded",children:(0,t.jsx)(b.Pencil,{className:"size-3"})}),(0,t.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),p()},className:"p-0.5 text-muted-foreground hover:text-destructive transition-colors rounded",children:(0,t.jsx)(v.TrashIcon,{className:"size-3"})})]})]})}e.s(["RecordStatusBadge",0,function({status:e,onChange:s,className:c,pillClassName:u}){let{statuses:m,getLabel:x,getRawColor:g,addStatus:b,updateStatus:w,removeStatus:v,reorderStatuses:S}
10=(0,h.useRecordStatuses)(),[C,_]=(0,n.useState)(!1),[E,T]=(0,n.useState)(!1),[P,O]=(0,n.useState)(null),[D,R]=(0,n.useState)(""),L=g(e),M=x(e),A=(0,n.useMemo)(()=>{if(!D.trim())return m;let e=D.toLowerCase();return m.filter(t=>t.label.toLowerCase().includes(e))},[m,D]),I=D.trim().length>0,F=(0,n.useMemo)(()=>A.map(e=>e.id),[A]),B=(0,a.useSensors)((0,a.useSensor)(a.MouseSensor,{activationConstraint:{distance:5}}),(0,a.useSensor)(a.TouchSensor,{activationConstraint:{delay:250,tolerance:5}})),V=(0,n.useCallback)(e=>{let{active:t,over:n}=e;if(!n||t.id===n.id)return;let a=m.findIndex(e=>e.id===t.id),s=m.findIndex(e=>e.id===n.id);-1!==a&&-1!==s&&S((0,r.arrayMove)(m,a,s))},[m,S]),z=(0,d.useRowNavigation)(A.length,e=>{let t=A[e];t&&s&&(s(t.value),T(!1))});if(!s)return(0,t.jsxs)(o.Badge,{variant:"outline",className:(0,f.cn)((0,p.pillClass)(),u,c),children:[(0,t.jsx)(j,{color:L,className:"size-2"}),M]});async function $(e){await v(e)}async function J(e,t){await w(e,t),O(null)}return(0,t.jsxs)(l.DropdownMenu,{open:E,onOpenChange:e=>{T(e),e||(_(!1),O(null),R(""))},children:[(0,t.jsx)(l.DropdownMenuTrigger,{asChild:!0,children:(0,t.jsx)("button",{type:"button",className:(0,f.cn)("focus:outline-none",c),children:(0,t.jsxs)(o.Badge,{variant:"outline",className:(0,f.cn)((0,p.pillClass)(),"cursor-pointer",u),children:[(0,t.jsx)(j,{color:L,className:"size-2"}),M]})})}),(0,t.jsxs)(l.DropdownMenuContent,{className:"w-64 min-w-0 p-0",align:"start",side:"bottom",children:[(0,t.jsx)(d.DropdownSearchRow,{autoFocus:!0,value:D,onValueChange:e=>{R(e),z.setActive(0)},onKeyDown:z.onKeyDown,placeholder:"Search statuses…",addAction:{label:C?"Cancel":"Add status",active:C,onClick:()=>_(e=>!e)}}),C&&(0,t.jsx)("div",{className:"border-b",children:(0,t.jsx)(k,{initialLabel:D.trim(),initialColor:"#DCE8F0",onSubmit:async(e,t)=>{await U(e,t)},onCancel:()=>_(!1),submitLabel:"Create"})}),(0,t.jsxs)("div",{className:d.DROPDOWN_LIST_CLASS,children:[(0,t.jsx)(a.DndContext,{sensors:B,collisionDetection:a.closestCenter,onDragEnd:V,modifiers:[i.restrictToVerticalAxis],children:(0,t.jsx)(r.SortableContext,{items:F,strategy:r.verticalListSortingStrategy,children:A.map((n,a)=>(0,t.jsx)(N,{option:n,navProps:z.rowProps(a),isActive:e===n.value,isEditing:P===n.id,draggable:!I,onSelect:()=>{s(n.value),T(!1)},onStartEdit:()=>O(n.id),onCancelEdit:()=>O(null),onSaveEdit:e=>J(n.id,e),onDelete:()=>$(n.id)},n.id))})}),0===A.length&&(0,t.jsx)("p",{className:d.DROPDOWN_EMPTY_CLASS,children:"No matches"})]})]})]});async function U(e,t){try{let n=await b(e,t);s(n.value),_(!1),T(!1)}catch(e){y.toast.error(e instanceof Error?e.message:"Failed to create status")}}}])},653589,e=>{"use strict";var t=e.i(843476),n=e.i(271645),a=e.i(571930),r=e.i(643531),s=e.i(664659),i=e.i(373375),l=e.i(248256),o=e.i(270756),c=e.i(541071),u=e.i(788699),d=e.i(941388),m=e.i(870273),f=e.i(416788),p=e.i(59377),h=e.i(167881),x=e.i(23750),g=e.i(647163),b=e.i(920755),w=e.i(313098),y=e.i(341256);function v({label:e,subtitle:n,isActive:s,isDefault:i,visibility:l,renaming:o,renameValue:c,onRenameChange:u,onRenameCommit:d,onClick:p,actions:h}){return(0,t.jsxs)("div",{onClick:p,className:(0,g.cn)("group flex items-center gap-2 px-2.5 py-2 text-xs cursor-pointer hover:bg-accent/70 transition-colors",s&&"bg-accent/50"),children:[(0,t.jsx)(a.Bookmark,{className:(0,g.cn)("h-3.5 w-3.5 shrink-0",s?"text-foreground":"text-muted-foreground/70")}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[o?(0,t.jsx)("input",{autoFocus:!0,value:c??"",onChange:e=>u?.(e.target.value),onKeyDown:e=>{"Enter"===e.key&&d?.()},onClick:e=>e.stopPropagation(),onBlur:d,className:"w-full bg-transparent outline-none border-b border-border text-xs"}):(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("span",{className:"truncate",children:e}),"public"===l&&(0,t.jsx)(f.PeopleGroupIcon,{className:"h-2.5 w-2.5 text-muted-foreground shrink-0"}),i&&(0,t.jsx)(m.Star,{className:"h-2.5 w-2.5 fill-amber-500 text-amber-500 shrink-0"})]}),n&&(0,t.jsx)("p",{className:"text-[10px] text-muted-foreground truncate",children:n})]}),s&&(0,t.jsx)(r.Check,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),h]})}function j({isDefault:e,isOwner:a,visibility:r,onSetDefault:s,onRename:i,onToggleVisibility:d,onDelete:f}
10){let[h,x]=(0,n.useState)(!1);return(0,t.jsxs)(p.Popover,{open:h,onOpenChange:x,children:[(0,t.jsx)(p.PopoverTrigger,{asChild:!0,children:(0,t.jsx)("button",{onClick:e=>e.stopPropagation(),className:"opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100 p-1 rounded-md hover:bg-foreground/10 transition-opacity shrink-0","aria-label":"View actions",children:(0,t.jsx)(c.MoreHorizontal,{className:"h-3 w-3 text-muted-foreground"})})}),(0,t.jsxs)(p.PopoverContent,{align:"end",sideOffset:4,className:"w-[180px] p-1 rounded-lg shadow-lg",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("button",{onClick:()=>{s(),x(!1)},className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-xs outline-none cursor-pointer hover:bg-accent transition-colors text-left",children:[(0,t.jsx)(m.Star,{className:(0,g.cn)("h-3 w-3",e?"fill-amber-500 text-amber-500":"text-muted-foreground")}),e?"Remove default":"Set as default"]}),a&&i&&(0,t.jsxs)("button",{onClick:()=>{i(),x(!1)},className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-xs outline-none cursor-pointer hover:bg-accent transition-colors text-left",children:[(0,t.jsx)(u.Pencil,{className:"h-3 w-3 text-muted-foreground"}),"Rename"]}),a&&d&&(0,t.jsxs)("button",{onClick:()=>{d(),x(!1)},className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-xs outline-none cursor-pointer hover:bg-accent transition-colors text-left",children:["public"===r?(0,t.jsx)(o.Lock,{className:"h-3 w-3 text-muted-foreground"}):(0,t.jsx)(l.Globe,{className:"h-3 w-3 text-muted-foreground"}),"Make ","public"===r?"private":"shared"]}),a&&f&&(0,t.jsxs)("button",{onClick:()=>{f(),x(!1)},className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-xs outline-none cursor-pointer hover:bg-accent transition-colors text-left text-red-600",children:[(0,t.jsx)(y.TrashIcon,{className:"h-3 w-3"}),"Delete"]})]})]})}e.s(["SavedViewsDropdown",0,function({entityType:e,currentConfig:c,activeViewId:u,onActiveViewChange:m,onApply:f,onDefaultLoaded:y,className:k}){let{views:N,defaultViewId:S,loading:C,currentUserId:_,createView:E,updateView:T,deleteView:P,setDefaultView:O}=function(e){let t=(0,n.useRef)((0,b.createClient)()).current,[a,r]=(0,n.useState)([]),[s,i]=(0,n.useState)(null),[l,o]=(0,n.useState)(!0),[c,u]=(0,n.use
10State)(null),d=(0,n.useCallback)(async()=>{let{data:n}=await t.auth.getUser(),a=n.user?.id??null;if(u(a),!a){r([]),i(null),o(!1);return}let[{data:s},{data:l}]=await Promise.all([t.from("saved_views").select("*").eq("entity_type",e).order("position",{ascending:!0}).order("created_at",{ascending:!0}),t.from("user_default_views").select("view_id").eq("entity_type",e).eq("user_id",a).maybeSingle()]),c=Array.from(new Set((s??[]).map(e=>e.user_id))),d={};if(c.length>0){let{data:e}=await t.from("profiles").select("id, full_name, email").in("id",c);d=Object.fromEntries((e??[]).map(e=>[e.id,e.full_name||e.email||"Unknown"]))}r((s??[]).map(e=>({...e,owner_name:d[e.user_id]??null}))),i(l?.view_id??null),o(!1)},[t,e]);(0,n.useEffect)(()=>{o(!0),d()},[d]);let m=(0,n.useCallback)(async(n,s,i="private")=>{if(!c)return null;let l=a.filter(e=>e.user_id===c).reduce((e,t)=>Math.max(e,t.position),-1),{data:o,error:u}=await t.from("saved_views").insert({user_id:c,entity_type:e,name:n.trim(),config:s,visibility:i,position:l+1}).select("*").single();return u||!o?null:(r(e=>[...e,o]),o)},[t,e,c,a]),f=(0,n.useCallback)(async(e,n)=>{let{data:a}=await t.from("saved_views").update({...n,updated_at:new Date().toISOString()}).eq("id",e).select("*").single();a&&r(t=>t.map(t=>t.id===e?{...a,owner_name:t.owner_name}:t))},[t]),p=(0,n.useCallback)(async e=>{await t.from("saved_views").delete().eq("id",e),r(t=>t.filter(t=>t.id!==e)),s===e&&i(null)},[t,s]),h=(0,n.useCallback)(async n=>{if(c){if(null===n){await t.from("user_default_views").delete().eq("user_id",c).eq("entity_type",e),i(null);return}await t.from("user_default_views").upsert({user_id:c,entity_type:e,view_id:n,updated_at:new Date().toISOString()},{onConflict:"user_id,entity_type"}),i(n)}},[t,e,c]);return{views:a,defaultViewId:s,loading:l,currentUserId:c,createView:m,updateView:f,deleteView:p,setDefaultView:h,refresh:d}}(e),[D,R]=(0,n.useState)(!1),[L,M]=(0,n.useState)("list"),[A,I]=(0,n.useState)(""),[F,B]=(0,n.useState)("private"),[V,z]=(0,n.useState)(null),[$,J]=(0,n.useState)(""),[U,K]=(0,n.useState)(!1),[H]=(0,n.useState)(()=>(0,w.urlHasViewInstruction)()),q=(0,n.useMemo)(()=>N.find(e=>e.id===u)??null,[N,u]),G=!!q&&!function(e,t){try{return JSON.stringify(e)===JSON.stringify(t)}catch{return!1}}(q.config,c);(0,w.useUrlViewApply)({onApply:f,views:N,viewsLoading:C,onActiveViewChange:m}),(0,n.useEffect)(()=>{if(U||C)return;if(H||!S||null!==u)return void K(!0);let e=N.find(e=>e.id===S);e&&y&&y(e),K(!0)},[U,C,H,S,u,N,y]);let W=N.filter(e=>e.user_id===_),Y=N.filter(e=>e.user_id!==_);async function X(){let e=A.trim();if(!e)return;let t=await E(e,c,F);t&&m(t.id),I(""),B("private"),M("list"),R(!1)}async function Z(){q&&q.user_id===_&&(await T(q.id,{config:c}),R(!1))}async function Q(e){await P(e),u===e&&m(null)}async function ee(e){let t=$.trim();t&&(await T(e,{name:t}),z(null),J(""))}async function et(e){await T(e.id,{visibility:"public"===e.visibility?"private":"public"})}let en=q?q.name:"All";return(0,t.jsxs)(p.Popover,{open:D,onOpenChange:e=>{R(e),e||(M("list"),z(null))},children:[(0,t.jsx)(p.PopoverTrigger,{asChild:!0,children:(0,t.jsxs)("button",{"aria-label":`Saved views - current: ${en}`,className:(0,g.cn)("flex items-center gap-1.5 rounded-full border border-input bg-white dark:bg-zinc-950 px-2 sm:px-3 h-8 text-xs max-w-[220px]","hover:bg-accent transition-colors whitespace-nowrap cursor-pointer",q&&"border-foreground
10/20",k),children:[(0,t.jsx)(a.Bookmark,{className:"h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"hidden sm:inline truncate",children:en}),G&&(0,t.jsx)("span",{className:"hidden sm:inline text-[10px] text-muted-foreground",children:"(modified)"}),(0,t.jsx)(s.ChevronDown,{className:"h-3 w-3 opacity-60 shrink-0"})]})}),(0,t.jsxs)(p.PopoverContent,{align:"start",sideOffset:6,className:"w-[280px] p-0 overflow-hidden rounded-xl shadow-lg border-border/80",children:["list"===L&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"max-h-80 overflow-y-auto",children:[(0,t.jsx)(v,{label:"All",isActive:null===u,isDefault:null===S,onClick:()=>{m(null),R(!1)}}),W.length>0&&(0,t.jsx)("div",{className:"px-2.5 pt-2 pb-1 text-[10px] font-medium uppercase tracking-wider text-muted-foreground",children:"My views"}),W.map(e=>(0,t.jsx)(v,{label:e.name,isActive:u===e.id,isDefault:S===e.id,visibility:e.visibility,renaming:V===e.id,renameValue:$,onRenameChange:J,onRenameCommit:()=>ee(e.id),onClick:()=>{V!==e.id&&(m(e.id),f(e.config),R(!1))},actions:(0,t.jsx)(j,{isDefault:S===e.id,isOwner:!0,visibility:e.visibility,onSetDefault:()=>O(S===e.id?null:e.id),onRename:()=>{z(e.id),J(e.name)},onToggleVisibility:()=>et(e),onDelete:()=>Q(e.id)})},e.id)),Y.length>0&&(0,t.jsx)("div",{className:"px-2.5 pt-2 pb-1 text-[10px] font-medium uppercase tracking-wider text-muted-foreground",children:"Shared views"}),Y.map(e=>(0,t.jsx)(v,{label:e.name,isActive:u===e.id,isDefault:S===e.id,visibility:e.visibility,subtitle:e.owner_name?`by ${e.owner_name}`:void 0,onClick:()=>{m(e.id),f(e.config),R(!1)},actions:(0,t.jsx)(j,{isDefault:S===e.id,isOwner:!1,visibility:e.visibility,onSetDefault:()=>O(S===e.id?null:e.id)})},e.id)),!C&&0===N.length&&(0,t.jsx)("p",{className:"px-3 py-3 text-xs text-muted-foreground",children:"No saved views yet."})]}),(0,t.jsxs)("div",{className:"border-t border-border/60 p-1.5 flex flex-col gap-0.5",children:[q&&q.user_id===_&&G&&(0,t.jsxs)("button",{onClick:Z,className:"flex items-center gap-2 rounded-md px-2 py-2 text-xs hover:bg-accent/70 transition-colors cursor-pointer text-left",children:[(0,t.jsx)(r.Check,{className:"h-3.5 w-3.5 text-muted-foreground"}),"Update current view"]}),(0,t.jsxs)("button",{onClick:()=>M("save"),className:"flex items-center gap-2 rounded-md px-2 py-2 text-xs hover:bg-accent/70 transition-colors cursor-pointer text-left",children:[(0,t.jsx)(d.Plus,{className:"h-3.5 w-3.5 text-muted-foreground"}),"Save current as new view…"]})]})]}),"save"===L&&(0,t.jsxs)("div",{className:"p-2.5 space-y-2.5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 pb-1 border-b border-border/60 -mx-2.5 px-2.5 pb-2",children:[(0,t.jsx)("button",{onClick:()=>M("list"),className:"p-1 rounded-md hover:bg-muted transition-colors shrink-0","aria-label":"Back",children:(0,t.jsx)(i.ChevronLeft,{className:"h-3.5 w-3.5 text-muted-foreground"})}),(0,t.jsx)("span",{className:"text-xs font-medium",children:"New saved view"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-[11px] font-medium text-muted-foreground",children:"Name"}),(0,t.jsx)(x.Input,{variant:"on-white",value:A,onChange:e=>I(e.target.value),placeholder:"e.g. My open deals",autoFocus:!0,onKeyDown:e=>{"Enter"===e.key&&X()},className:"h-8 mt-1 text-xs"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-[11px] font-medium text-muted-foreground",children:"Visibility"}),(0,t.jsx)("div",{className:"mt-1 grid grid-cols-2 gap-1.5",children:[{value:"private",label:"Private",Icon:o.Lock},{value:"public",label:"Shared",Icon:l.Globe}].map(({value:e,label:n,Icon:a})=>(0,t.jsxs)("button",{type:"button",onClick:()=>B(e),"aria-pressed":F===e,className:(0,g.cn)("flex items-center justify-center gap-1.5 rounded-full border h-8 px-2 text-xs font-medium transition-colors cursor-pointer",F===e?"border-foreground
10/20 bg-[#EDEDE9] dark:bg-white/15 text-foreground":"border-border bg-card text-muted-foreground hover:bg-[#F0EEE6] dark:hover:bg-white/10"),children:[(0,t.jsx)(a,{className:"h-3 w-3"}),n]},e))})]}),(0,t.jsxs)("div",{className:"flex items-center justify-end gap-1.5 pt-1",children:[(0,t.jsx)(h.Button,{size:"sm",variant:"ghost",className:"h-7 px-2 text-[11px]",onClick:()=>{M("list"),I("")},children:"Cancel"}),(0,t.jsx)(h.Button,{size:"sm",className:"h-7 px-3 text-[11px]",disabled:!A.trim(),onClick:X,children:"Save"})]})]})]})]})}],653589)},195898,e=>{"use strict";var t=e.i(843476),n=e.i(370956),a=e.i(373264),r=e.i(647163);e.s(["ViewToggle",0,function({view:e,onChange:s,className:i}){return(0,t.jsxs)("div",{className:(0,r.cn)("inline-flex items-center rounded-full bg-[#F5F4ED] dark:bg-muted p-1",i),children:[(0,t.jsx)("button",{type:"button",onClick:()=>s("table"),className:(0,r.cn)("inline-flex items-center justify-center rounded-full px-2.5 py-1.5 transition-colors","table"===e?"bg-white dark:bg-background text-foreground font-medium":"text-muted-foreground hover:text-foreground"),"aria-label":"Table view",children:(0,t.jsx)(n.List,{className:"h-3.5 w-3.5"})}),(0,t.jsx)("button",{type:"button",onClick:()=>s("kanban"),className:(0,r.cn)("inline-flex items-center justify-center rounded-full px-2.5 py-1.5 transition-colors","kanban"===e?"bg-white dark:bg-background text-foreground font-medium":"text-muted-foreground hover:text-foreground"),"aria-label":"Board view",children:(0,t.jsx)(a.LayoutGrid,{className:"h-3.5 w-3.5"})})]})}])},634143,e=>{"use strict";var t=e.i(271645);let n="__default__",a=new Map,r=new Map,s=new Map;function i(e,t){a.set(e,t),s.get(e)?.forEach(e=>e(t))}function l(e){for(let t of Array.from(s.keys()))t!==e&&(a.delete(t),r.delete(t),o(t===n?void 0:t).then(e=>i(t,e)))}async function o(e){let t=e?`?pipelineId=${encodeURIComponent(e)}`:"",n=await fetch(`/api/deal-stages${t}`);return n.ok?n.json():[]}e.s(["useDealStages",0,function(e){let c=e??n,[u,d]=(0,t.useState)(()=>a.get(c)??[]),[m,f]=(0,t.useState)(()=>!a.has(c)),[p,h]=(0,t.useState)(c);p!==c&&(h(c),d(a.get(c)??[]),f(!a.has(c))),(0,t.useEffect)(()=>{var t;let n,l=(t=e=>{d(e),f(!1)},(n=s.get(c))||(n=new Set,s.set(c,n)),n.add(t),()=>{n.delete(t),0===n.size&&s.delete(c)});if(!a.has(c)){let t=r.get(c);t||(t=o(e),r.set(c,t)),t.then(e=>{r.delete(c),i(c,e)})}return l},[c,e]);let x=(0,t.useCallback)(async()=>{r.delete(c),a.delete(c);let t=await o(e);return i(c,t),t},[c,e]),g=(0,t.useCallback)(async(t,n)=>{let r=await fetch("/api/deal-stages",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({label:t,color:n,pipelineId:e})});if(!r.ok)throw Error((await r.json()).error||"Failed to create stage");let s=await r.json();return i(c,[...a.get(c)??[],s]),l(c),s},[c,e]),b=(0,t.useCallback)(async(e,t)=>{let n=await fetch("/api/deal-stages",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e,...t})});if(!n.ok)throw Error((await n.json()).error||"Failed to update stage");let r=await n.json();return i(c,(a.get(c)??[]).map(t=>t.id===e?r:t)),l(c),r},[c]),w=(0,t.useCallback)(async e=>{let t=await fetch(`/api/deal-stages?id=${e}`,{method:"DELETE"});if(!t.ok)throw Error((await t.json().catch(()=>({}))).error||"Failed to delete stage");i(c,(a.get(c)??[]).filter(t=>t.id!==e)),l(c)},[c]),y=(0,t.useCallback)(async e=>{let t=a.get(c)??[];i(c,e);let n=e.map(e=>e.id);if(!(await fetch("/api/deal-stages/reorder",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({orderedIds:n})})).ok)throw i(c,t),Error("Failed to reorder stages");l(c)},[c]),v=(0,t.useCallback)(e=>(u.find(t=>t.value===e)?.label??e)||"No stage",[u]),j=(0,t.useCallback)(e=>u.find(t=>t.value===e)?.color??"gray",[u]);return{stages:u,loading:m,addStage:g,updateStage:b,removeStage:w,reorderStages:y,refetch:x,getLabel:v,getRawColor:j}}])},720141,e=>{"use strict";var t=e.i(271645),n=e.i(524657);let a={gray:"bg-muted-foreground/40",darkgray:"bg-muted-foreground/60",blue:"bg-blue-500",green:"bg-emerald-500",yellow:"bg-amber-500",orange:"bg-orange-500",red:"bg-red-500",violet:"bg-violet-500",pink:"bg-pink-500",teal:"bg-teal-500",indigo:"bg-indigo-500"};function r(e){return e.startsWith("#")}Object.keys(a);let s=null,i=null;async function l(){let e=await fetch("/api/departments");return e.ok?e.json():[]}e.s(["departmentDotClass",0,function(e){return r(e)?"":a[e]??"bg-muted-foreground
10/40"},"departmentDotStyle",0,function(e,t=!1){if(r(e))return(0,n.dotStyleForStatusColor)(e,t)},"useDepartments",0,function(){let[e,n]=(0,t.useState)(s??[]),[a,r]=(0,t.useState)(!s),o=(0,t.useRef)(!0);(0,t.useEffect)(()=>{if(o.current=!0,s){n(s),r(!1);return}return i||(i=l()),i.then(e=>{s=e,i=null,o.current&&(n(e),r(!1))}),()=>{o.current=!1}},[]);let c=(0,t.useCallback)(async()=>{i=null,s=null;let e=await l();return s=e,o.current&&n(e),e},[]),u=(0,t.useCallback)(async(e,t)=>{let a=await fetch("/api/departments",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({label:e,color:t})});if(!a.ok)throw Error((await a.json()).error||"Failed to create department");let r=await a.json();return s=s?[...s,r]:[r],o.current&&n(s),r},[]),d=(0,t.useCallback)(async(e,t)=>{let a=await fetch("/api/departments",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e,...t})});if(!a.ok)throw Error((await a.json()).error||"Failed to update department");let r=await a.json();return s=s?.map(t=>t.id===e?r:t)??[],o.current&&n(s),r},[]),m=(0,t.useCallback)(async e=>{await fetch(`/api/departments?id=${e}`,{method:"DELETE"}),s=s?.filter(t=>t.id!==e)??[],o.current&&n(s)},[]),f=(0,t.useCallback)(async e=>{s=e,o.current&&n(e);let t=e.map(e=>e.id);await fetch("/api/departments/reorder",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({orderedIds:t})})},[]),p=(0,t.useCallback)(t=>{if(!t)return"No department";let n=e.find(e=>e.value.toLowerCase()===t.toLowerCase());return n?.label??t},[e]),h=(0,t.useCallback)(t=>t?e.find(e=>e.value.toLowerCase()===t.toLowerCase())?.color??"gray":"gray",[e]);return{departments:e,loading:a,addDepartment:u,updateDepartment:d,removeDepartment:m,reorderDepartments:f,refetch:c,getLabel:p,getRawColor:h}}])},564312,922111,e=>{"use strict";var t=e.i(271645);e.s(["useInfiniteRows",0,function(e,n={}){let{pageSize:a=100,resetKey:r}=n,[s,i]=(0,t.useState)(a),[l,o]=(0,t.useState)(!1),c=(0,t.useRef)(null),u=(0,t.useRef)(null);(0,t.useEffect)(()=>{i(a)},[a,r,e.length]);let d=e.length,m=s<d,f=(0,t.useMemo)(()=>s>=d?e:e.slice(0,s),[e,s,d]),p=(0,t.useCallback)(()=>{o(!0),requestAnimationFrame(()=>{i(t=>Math.min(t+a,e.length)),requestAnimationFrame(()=>o(!1))})},[a,e.length]),h=(0,t.useCallback)(e=>{if(c.current&&(c.current.disconnect(),c.current=null),u.current=e,!e)return;let t=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&p()},{rootMargin:"400px 0px"});t.observe(e),c.current=t},[p]);return(0,t.useEffect)(()=>{if(!m||l)return;let e=u.current;!e||e.getBoundingClientRect().top<(window.innerHeight||0)+400&&p()},[m,l,s,p]),{visibleItems:f,hasMore:m,loadingMore:l,sentinelRef:h,showAll:(0,t.useCallback)(()=>i(e.length),[e.length])}}],564312);var n=e.i(843476),a=e.i(947627),r=e.i(611423);e.s(["InfiniteScrollSentinel",0,function({colSpan:e,hasMore:s,sentinelRef:i,rows:l,renderRow:o,rowKeyStart:c=0,minRows:u=0}){let d=(0,t.useRef)(null),[m,f]=(0,t.useState)(0);if((0,t.useEffect)(()=>{if(null!=l||!s)return;let e=d.current,t=e?.closest('[data-slot="table-container"]');if(!e||!t)return;let n=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&f(e=>e>=64?e:Math.min(64,e+16))},{root:t,rootMargin:"1600px 0px"});return n.observe(e),()=>n.disconnect()},[l,s,m,u]),!s&&u<=0)return null;let p=l??Math.max(u,s?24+m:u);return(0,n.jsxs)(n.Fragment,{children:[s&&(0,n.jsx)(a.TableRow,{className:"hover:bg-transparent border-0","aria-hidden":!0,children:(0,n.jsx)(a.TableCell,{colSpan:e,className:"p-0",children:(0,n.jsx)("div",{ref:i,className:"h-px"})})}),Array.from({length:p}).map((s,i)=>o?(0,n.jsx)(t.Fragment,{children:o(i)},c+i):(0,n.jsx)(a.TableRow,{className:"hover:bg-transparent border-0",children:(0,n.jsx)(a.TableCell,{colSpan:e,className:"py-2.5",children:(0,n.jsxs)("div",{className:"flex items-center gap-3",children:[(0,n.jsx)(r.Skeleton,{className:"h-7 w-7 rounded-full shrink-0"}),(0,n.jsxs)("div",{className:"flex-1 space-y-1.5 min-w-0",children:[(0,n.jsx)(r.Skeleton,{className:"h-3 w-1/3 rounded-full"}),(0,n.jsx)(r.Skeleton,{className:"h-3 w-1/2 rounded-full"})]})]})})},c+i)),s&&null==l&&(0,n.jsx)(a.TableRow,{ref:d,className:"hover:bg-transparent border-0","aria-hidden":!0,
10children:(0,n.jsx)(a.TableCell,{colSpan:e,className:"p-0",children:(0,n.jsx)("div",{className:"h-px"})})})]})}],922111)},542356,e=>{"use strict";var t=e.i(271645),n=e.i(618566),a=e.i(287751);let r=new Map;function s(){let e=navigator.connection;return!!e?.saveData}function i(e,t){t&&function(e){if(s())return!1;let t=Date.now(),n=r.get(e);if(void 0!==n&&t-n<24e4)return!1;let a=0;for(let[e,n]of r)t-n>=24e4?r.delete(e):a++;return!(a>=40)&&(r.set(e,t),!0)}(t)&&e.prefetch(t)}e.s(["createIntentPrefetcher",0,function(e){let t=null;return{enter(n,r){t&&clearTimeout(t),t=setTimeout(()=>{if(i(e,n),!s())for(let e of r??[])(0,a.prefetch)(e)},100)},leave(){t&&(clearTimeout(t),t=null)}}},"prefetchRoute",0,i,"useIntentPrefetch",0,function(e){let r=(0,n.useRouter)(),l=(0,t.useRef)(null),o=(0,t.useRef)(e);o.current=e;let c=(0,t.useCallback)(()=>{let{href:e,jsonKeys:t,disabled:n}=o.current;if(!n&&(i(r,e),!s()))for(let e of t??[])e&&(0,a.prefetch)(e)},[r]),u=(0,t.useCallback)(()=>{l.current&&clearTimeout(l.current),l.current=setTimeout(c,100)},[c]);return{onMouseEnter:u,onMouseLeave:(0,t.useCallback)(()=>{l.current&&(clearTimeout(l.current),l.current=null)},[]),onFocus:u}}])},5832,e=>{"use strict";var t=e.i(271645);let n=["table","kanban"],a="list-view-change",r=new Map;function s(e,n,s){let i=(0,t.useCallback)(t=>{let n=n=>{n.key===e&&t()};return window.addEventListener(a,t),window.addEventListener("storage",n),()=>{window.removeEventListener(a,t),window.removeEventListener("storage",n)}},[e]),l=(0,t.useSyncExternalStore)(i,()=>(function(e){try{let t=localStorage.getItem(e);if(null!==t)return t}catch{}return r.get(e)??null})(e),()=>null);return[null!==l&&s.includes(l)?l:n,(0,t.useCallback)(t=>(function(e,t){r.set(e,t);try{localStorage.setItem(e,t)}catch{}try{window.dispatchEvent(new Event(a))}catch{}})(e,t),[e])]}e.s(["usePersistedChoice",0,s,"usePersistedView",0,function(e,t="table"){return s(`list-view:${e}`,t,n)}])},436648,e=>{"use strict";var t=e.i(271645);e.s(["useSyncedState",0,function(e){let[n,a]=(0,t.useState)(e),r=(0,t.useRef)(JSON.stringify(e));return(0,t.useEffect)(()=>{let t=JSON.stringify(e);t!==r.current&&(r.current=t,a(e))},[e]),[n,a]}])},313098,e=>{"use strict";var t=e.i(271645),n=e.i(618566),a=e.i(185480);let r="apply",s="view";function i(){let e=new URLSearchParams(window.location.search);if(!e.has(r)&&!e.has(s))return;e.delete(r),e.delete(s);let t=e.toString();window.history.replaceState(window.history.state,"",window.location.pathname+(t?`?${t}`:""))}e.s(["urlHasViewInstruction",0,function(){let e=new URLSearchParams(window.location.search);return e.has(r)||e.has(s)},"useUrlViewApply",0,function({onApply:e,views:l,viewsLoading:o=!1,onActiveViewChange:c}){let u=(0,n.useSearchParams)(),d=u.get(r),m=u.get(s),f=(0,a.useEventCallback)(t=>e(t)),p=(0,a.useEventCallback)(e=>c?.(e)),h=(0,t.useRef)(null);(0,t.useEffect)(()=>{if(!d)return;let e=`apply:${d}`;if(h.current!==e){h.current=e;try{let e=JSON.parse(d);e&&"object"==typeof e&&!Array.isArray(e)&&(p(null),f(e))}catch{}i()}},[d,f,p]),(0,t.useEffect)(()=>{if(!m||d)return;let e=`view:${m}`;if(h.current===e)return;if(void 0===l){h.current=e,i();return}if(o)return;h.current=e;let t=l.find(e=>e.id===m);t&&(p(t.id),f(t.config)),i()},[m,d,l,o,f,p])}])},856436,e=>{"use strict";e.s(["exportToCsv",0,function(e,t,n){if(0===e.length)return;let a=e=>{if(null==e)return"";let t=String(e);return t.includes(",")||t.includes('"')||t.includes("\n")||t.includes("\r")?`"${t.replace(/"/g,'""')}"`:t},r=new Blob([[t.map(e=>a(e.header)).join(","),...e.map(e=>t.map(t=>a(e[t.key])).join(","))].join("\r\n")],{type:"text/csv;charset=utf-8;"}),s=URL.createObjectURL(r),i=document.createElement("a");i.href=s,i.download=`${n}.csv`,i.click(),URL.revokeObjectURL(s),function(e,t){try{let n=JSON.stringify({event:"data_export",path:window.location.pathname,properties:{entity:e,rows:t}});"u">typeof navigator&&navigator.sendBeacon?navigator.sendBeacon("/api/internal/track",new Blob([n],{type:"application/json"})):"u">typeof fetch&&fetch("/api/internal/track",{method:"POST",body:n,headers:{"Content-Type":"application/json"},keepalive:!0}
10).catch(()=>{})}catch{}}(n,e.length)}])},887993,632636,e=>{"use strict";var t=e.i(475254);let n=(0,t.default)("arrow-down-a-z",[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"M20 8h-5",key:"1vsyxs"}],["path",{d:"M15 10V6.5a2.5 2.5 0 0 1 5 0V10",key:"ag13bf"}],["path",{d:"M15 14h5l-5 6h5",key:"ur5jdg"}]]);e.s(["default",0,n],887993);let a=(0,t.default)("arrow-up-a-z",[["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}],["path",{d:"M20 8h-5",key:"1vsyxs"}],["path",{d:"M15 10V6.5a2.5 2.5 0 0 1 5 0V10",key:"ag13bf"}],["path",{d:"M15 14h5l-5 6h5",key:"ur5jdg"}]]);e.s(["default",0,a],632636)},423594,e=>{"use strict";let t=(0,e.i(475254).default)("layout-grid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);e.s(["default",0,t])},373264,e=>{"use strict";var t=e.i(423594);e.s(["LayoutGrid",()=>t.default])},517302,e=>{"use strict";let t=(0,e.i(475254).default)("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);e.s(["default",0,t])},270756,e=>{"use strict";var t=e.i(517302);e.s(["Lock",()=>t.default])}]);

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.