PageSourceSearch

https://spedy.ai/_next/static/chunks/5016-3940c77c043c0957.js

js spedy.ai collected 2026-09-24 14:08:12 UTC 12,364 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="6fd92762-2c52-4067-9919-ad10ebe41a8f",e._sentryDebugIdIdentifier="sentry-dbid-6fd92762-2c52-4067-9919-ad10ebe41a8f")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5016],{6805:(e,t,r)=>{r.d(t,{$9:()=>a,hk:()=>s});let n="/search";function s(e,t){let r=(function(e,t){var r,n;let s=new URLSearchParams;return e&&s.set("q",e),(null==(r=t.boardIds)?void 0:r.length)&&s.set("boards",t.boardIds.join(",")),(null==(n=t.statusIds)?void 0:n.length)&&s.set("statuses",t.statusIds.join(",")),t.assigneeId&&s.set("assignee",t.assigneeId),t.onlyBlocked&&s.set("blocked","1"),t.onlyApprovalRequired&&s.set("approval","1"),s})(e,t).toString();return r?"".concat(n,"?").concat(r):n}function l(e){if(!e)return;let t=e.split(",").map(e=>e.trim()).filter(Boolean);return t.length>0?t:void 0}function a(e){var t;let r={},n=l(e.get("boards"));n&&(r.boardIds=n);let s=l(e.get("statuses"));s&&(r.statusIds=s);let a=e.get("assignee");return a&&(r.assigneeId=a),"1"===e.get("blocked")&&(r.onlyBlocked=!0),"1"===e.get("approval")&&(r.onlyApprovalRequired=!0),{query:null!=(t=e.get("q"))?t:"",filters:r}}},13614:(e,t,r)=>{r.d(t,{i:()=>x});var n=r(53430),s=r(59968),l=r(9719),a=r(25007),o=r(42553),i=r(4542),d=r(72133),u=r(69810);function c(e){let{label:t,active:r,onClick:s,onClear:l,dotColor:a}=e;return(0,n.jsxs)(d.$,{type:"button",variant:"ghost",size:"sm",onClick:s,className:(0,i.cn)("inline-flex items-center gap-1 px-2.5 py-1 rounded-md text-[11px] font-medium transition-colors duration-150 h-auto",r?"bg-foreground
1/[0.08] text-foreground/80 border border-foreground/10":"bg-foreground/[0.03] text-foreground/50 hover:bg-foreground/[0.06] hover:text-foreground/70 border border-transparent"),children:[a&&(0,n.jsx)("span",{className:"h-1.5 w-1.5 rounded-full shrink-0",style:{backgroundColor:a}}),t,r&&l&&(0,n.jsx)("span",{role:"button",onClick:e=>{e.stopPropagation(),l()},className:"ml-0.5 hover:text-foreground/50",children:"\xd7"})]})}function g(e){let{selectedBoardIds:t,onChange:r}=e,{data:l=[]}=(0,s.b)({fetchAll:!0});return 0===l.length?null:(0,n.jsx)("div",{className:"flex flex-wrap gap-1",children:l.map(e=>(0,n.jsx)(c,{label:e.name,active:t.includes(e.id),onClick:()=>{var n;return n=e.id,void(t.includes(n)?r(t.filter(e=>e!==n)):r([...t,n]))},onClear:()=>r(t.filter(t=>t!==e.id))},e.id))})}function p(e){let{selectedStatusIds:t,onChange:r}=e,{data:s=[]}=(0,l.s)();return 0===s.length?null:(0,n.jsx)("div",{className:"flex flex-wrap gap-1",children:s.map(e=>(0,n.jsx)(c,{label:e.name,dotColor:e.color,active:t.includes(e.id),onClick:()=>{var n;return n=e.id,void(t.includes(n)?r(t.filter(e=>e!==n)):r([...t,n]))},onClear:()=>r(t.filter(t=>t!==e.id))},e.id))})}function m(e){let{label:t,count:r,children:s}=e;return(0,n.jsxs)("details",{className:"group",children:[(0,n.jsxs)("summary",{className:"text-[11px] text-foreground/35 cursor-pointer hover:text-foreground/60 transition-colors duration-150 list-none flex items-center gap-1 font-medium",children:[(0,n.jsx)("svg",{className:"w-3 h-3 transition-transform group-open:rotate-90",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})}),t,r>0&&(0,n.jsx)("span",{className:"ml-1 px-1.5 py-0.5 rounded-md bg-foreground
1/[0.08] text-foreground/60 text-[10px] font-medium",children:r})]}),(0,n.jsx)("div",{className:"pt-2",children:s})]})}function f(e){let{filters:t,onFilterChange:r}=e,{t:s}=(0,u.WD)(),{user:l}=(0,a.i)();return(0,n.jsxs)("div",{className:"flex flex-wrap gap-1.5",children:[l&&(0,n.jsx)(c,{label:s("search.my_tickets"),active:"me"===t.assigneeId,onClick:()=>{"me"===t.assigneeId?r({...t,assigneeId:void 0}):r({...t,assigneeId:"me"})},onClear:()=>r({...t,assigneeId:void 0})}),(0,n.jsx)(c,{label:s("search.blocked"),active:!!t.onlyBlocked,onClick:()=>{r({...t,onlyBlocked:!t.onlyBlocked})},onClear:()=>r({...t,onlyBlocked:!1})}),(0,n.jsx)(c,{label:s("search.approval_required"),active:!!t.onlyApprovalRequired,onClick:()=>{r({...t,onlyApprovalRequired:!t.onlyApprovalRequired})},onClear:()=>r({...t,onlyApprovalRequired:!1})})]})}function x(e){var t,r,s,l,a,c;let{filters:x,onFilterChange:h,className:b}=e,{t:v}=(0,u.WD)(),k=(0,o.m)(x);return(0,n.jsxs)("div",{className:(0,i.cn)("space-y-2 px-4 py-2.5 border-b border-border/60",b),children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("span",{className:"text-[11px] text-foreground/35 shrink-0 font-medium",children:v("search.filter_label")}),(0,n.jsx)(f,{filters:x,onFilterChange:h}),k&&(0,n.jsx)(d.$,{type:"button",variant:"ghost",size:"sm",onClick:()=>{h({})},className:"ml-auto text-[11px] text-foreground/35 hover:text-foreground/60 transition-colors duration-150 h-auto px-2 py-1",children:v("search.clear_all")})]}),(0,n.jsx)(m,{label:v("search.boards_label"),count:null!=(s=null==(t=x.boardIds)?void 0:t.length)?s:0,children:(0,n.jsx)(g,{selectedBoardIds:null!=(l=x.boardIds)?l:[],onChange:e=>h({...x,boardIds:e.length>0?e:void 0})})}),(0,n.jsx)(m,{label:v("search.statuses_label"),count:null!=(a=null==(r=x.statusIds)?void 0:r.length)?a:0,children:(0,n.jsx)(p,{selectedStatusIds:null!=(c=x.statusIds)?c:[],onChange:e=>h({...x,statusIds:e.length>0?e:void 0})})})]})}},42553:(e,t,r)=>{r.d(t,{E:()=>l,m:()=>a});var n=r(26682),s=r(23935);let l=(0,n.v)()((0,s.Zr)(e=>({filters:{},setFilters:t=>e({filters:t}),clearFilters:()=>e({filters:{}})}),{name:"search-filters-storage",storage:(0,s.KU)(()=>localStorage)}));function a(e){var t,r,n,s;return(null!=(n=null==(t=e.boardIds)?void 0:t.length)?n:0)>0||(null!=(s=null==(r=e.statusIds)?void 0:r.length)?s:0)>0||!!e.assigneeId||!!e.onlyBlocked||!!e.onlyApprovalRequired}},70239:(e,t,r)=>{r.d(t,{r:()=>g});var n=r(53430),s=r(76927),l=r(85843),a=r(4542);let o=["mark","strong","em","del","code","a"],i=["href","target","rel"];function d(e){let{html:t}=e,r=t.replace(/```[\s\S]*?```/g,"").replace(/!\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/^#{1,6}\s+/gm,"").replace(/^>\s+/gm,"").replace(/^[-*+]\s+/gm,"").replace(/^\d+\.\s+/gm,"").replace(/^[-*_]{3,}\s*$/gm,"");r=l.xI.parseInline(r);let a=s.A.sanitize(r,{ALLOWED_TAGS:o,ALLOWED_ATTR:i});return(0,n.jsx)("span",{dangerouslySetInnerHTML:{__html:a},className:"[&>
1mark]:bg-foreground/[0.07] [&>mark]:text-foreground [&>mark]:px-0.5 [&>mark]:py-[1px] [&>mark]:rounded-sm [&>mark]:font-medium [&_strong]:font-semibold [&_em]:italic [&_del]:line-through [&_code]:text-[10px] [&_code]:bg-foreground/[0.05] [&_code]:px-1 [&_code]:py-0.5 [&_code]:rounded [&_a]:text-foreground/60 [&_a]:underline [&_a]:underline-offset-2"})}function u(e){let{name:t,color:r}=e;return(0,n.jsxs)("span",{className:"inline-flex items-center gap-1.5 rounded-md px-2 py-0.5 text-[11px] font-medium bg-foreground/[0.04] text-foreground/70",children:[(0,n.jsx)("span",{className:"h-1.5 w-1.5 rounded-full shrink-0",style:{backgroundColor:r}}),t]})}function c(e){let{name:t,color:r}=e;return(0,n.jsxs)("span",{className:"inline-flex items-center gap-1.5 rounded-md px-1.5 py-0.5 text-[11px] font-medium bg-foreground/[0.04] text-foreground/60",children:[(0,n.jsx)("span",{className:"h-1.5 w-1.5 rounded-full shrink-0",style:{backgroundColor:r}}),t]})}function g(e){let{result:t,isSelected:r,onSelect:s}=e,l=t.title.includes("<mark>");return(0,n.jsxs)("div",{role:"option","aria-selected":r,onClick:s,"data-testid":"search-result-item",className:(0,a.cn)("px-4 py-3 cursor-pointer transition-colors duration-150","border-b border-border/60 last:border-b-0",r?"bg-foreground
1/[0.04]":"hover:bg-foreground/[0.02]"),children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("span",{className:"text-xs font-mono text-foreground/35 shrink-0",children:t.displayId}),(0,n.jsx)("span",{className:"text-sm font-medium text-foreground/80 flex-1 min-w-0 truncate",children:l?(0,n.jsx)(d,{html:t.title}):t.title}),(0,n.jsx)(u,{name:t.status.name,color:t.status.color})]}),t.isSubticket&&t.parent&&(0,n.jsxs)("div",{className:"mt-1 flex items-center gap-1 text-[11px] text-foreground/35","data-testid":"subticket-indicator",children:[(0,n.jsx)("span",{className:"text-foreground/25",children:"↳"}),(0,n.jsx)("span",{className:"font-mono",children:t.parent.displayId}),(0,n.jsx)("span",{className:"truncate",children:t.parent.title})]}),t.snippet&&(0,n.jsx)("div",{className:"mt-1 text-[11px] text-foreground/40 line-clamp-2 leading-relaxed",children:(0,n.jsx)(d,{html:t.snippet})}),(0,n.jsxs)("div",{className:"mt-2 flex items-center gap-2.5 text-[11px] text-foreground/40",children:[(0,n.jsxs)("span",{className:"flex items-center gap-1",children:[(0,n.jsx)("svg",{className:"w-3 h-3 text-foreground/30",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M9 17V7m0 10a2 2 0 01-2 2H5a2 2 0 01-2-2V7a2 2 0 012-2h2a2 2 0 012 2m0 10a2 2 0 002 2h2a2 2 0 002-2M9 7a2 2 0 012-2h2a2 2 0 012 2m0 10V7m0 10a2 2 0 002 2h2a2 2 0 002-2V7a2 2 0 00-2-2h-2a2 2 0 00-2 2"})}),t.boardName]}),t.ticketType&&(0,n.jsx)(c,{name:t.ticketType.name,color:t.ticketType.color}),t.assignee&&(0,n.jsxs)("span",{className:"flex items-center gap-1",children:[(0,n.jsx)("svg",{className:"w-3 h-3 text-foreground/30",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"})}),t.assignee.name]})]})]})}},70437:(e,t,r)=>{r.d(t,{S:()=>c});var n=r(78492),s=r(25238),l=r(61003);async function a(e){let t=function(e){var t,r;let n=new URLSearchParams;return n.set("q",e.q),(null==(t=e.boardIds)?void 0:t.length)&&e.boardIds.forEach(e=>n.append("boardIds",e)),(null==(r=e.statusIds)?void 0:r.length)&&e.statusIds.forEach(e=>n.append("statusIds",e)),e.assigneeId&&n.set("assigneeId",e.assigneeId),e.onlyBlocked&&n.set("onlyBlocked","true"),e.onlyApprovalRequired&&n.set("onlyApprovalRequired","true"),e.cursor&&n.set("cursor",e.cursor),e.limit&&n.set("limit",String(e.limit)),n.toString()}(e);return(0,l.v$)("/search?".concat(t))}function o(e){return"error"in e&&"search_unavailable"===e.error}var i=r(23751),d=r(42553);let u={all:["search"],query:e=>[...u.all,e]};function c(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{debounceMs:t=300,maxQueryLength:r=500,minQueryLength:l=1,limit:c=20,enabled:g=!0,initialQuery:p=""}
1=e,[m,f]=(0,s.useState)(p),[x,h]=(0,s.useState)(p),[b,v]=(0,s.useState)(null),k=(0,d.E)(e=>e.filters),y=(0,d.E)(e=>e.setFilters),j=(0,s.useCallback)(e=>{f(e.slice(0,r)),v(null)},[r]);(0,s.useEffect)(()=>{let e=setTimeout(()=>{h(m)},t);return()=>clearTimeout(e)},[m,t]),(0,s.useEffect)(()=>{v(null)},[k]);let I=(0,s.useMemo)(()=>x.length<l?null:{q:x,...k,cursor:b||void 0,limit:c},[x,k,b,c,l]),{data:N,isLoading:C,isFetching:_,error:w}=(0,n.useQuery)({queryKey:u.query(null!=I?I:{q:""}),queryFn:async()=>{if(!I)return null;let{data:e,error:t}=await a(I);if(t)throw t;return e},enabled:g&&null!==I,staleTime:3e4,gcTime:3e5}),q=(0,s.useRef)(null);(0,s.useEffect)(()=>{N&&!o(N)&&x&&x!==q.current&&((0,i.v3)(x.length,N.meta.total),q.current=x)},[N,x]);let L=!!N&&o(N),A=L&&N&&"message"in N?N.message:null,S=N&&!L?N.items:[],B=!!N&&!L&&N.pagination.hasMore,E=N&&!L?N.pagination.cursor:null,R=N&&!L?N.meta.total:0,T=N&&!L?N.meta.took:0,M=(0,s.useCallback)(()=>{B&&E&&v(E)},[B,E]),D=(0,s.useCallback)(()=>{f(""),h(""),v(null)},[]);return{query:m,setQuery:j,debouncedQuery:x,results:S,isLoading:C&&x.length>=l,isInitialLoading:C&&!N,isFetching:_,error:w,isUnavailable:L,unavailableMessage:A,hasMore:B,total:R,took:T,loadNextPage:M,cursor:b,clear:D,filters:k,setFilters:y}}},86957:(e,t,r)=>{r.d(t,{d:()=>l});var n=r(25238),s=r(59968);function l(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,{data:r}=(0,s.b)({fetchAll:!0});return(0,n.useMemo)(()=>{let n=e.trim().toLowerCase();return n?(null!=r?r:[]).filter(e=>{var t;if(e.isArchived)return!1;let r=e.name.toLowerCase(),s=(null!=(t=e.prefix)?t:"").toLowerCase();return r.includes(n)||""!==s&&s.startsWith(n)}).slice(0,t):[]},[r,e,t])}}}]);

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.