import{t as e}from"./chunk-DD-I1_y5.js";import{f as t}from"./useSelectionMode-A5KItZ2T.js";var n=t(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),r=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ALL_GRAPH_LABELS=e.FALLBACK_LABEL_COLOUR=e.GRAPH_LABEL_COLOURS=void 0,e.pickDisplayLabel=t,e.colourForLabel=n,e.resolveNodeColour=r,e.formatRunTimestamp=o,e.formatMessageTimestamp=s,e.pickShortLabel=c,e.pickDisplayName=l,e.GRAPH_LABEL_COLOURS={LocalBusiness:`#4F6B8A`,Service:`#6B85A0`,PriceSpecification:`#8AA0B8`,OpeningHoursSpecification:`#A8BACE`,Listing:`#3F5670`,Property:`#5C7A99`,Viewing:`#D4A574`,Offer:`#B08850`,Organization:`#8A6B47`,Person:`#B86E4A`,UserProfile:`#D08960`,Preference:`#DFA67A`,AdminUser:`#8C5230`,AccessGrant:`#66381F`,KnowledgeDocument:`#6E8A5A`,ConversationArchive:`#4F6B3E`,Section:`#8AA876`,Chunk:`#A6C194`,DigitalDocument:`#5A7548`,CreativeWork:`#B5C9A2`,Question:`#C7D6B5`,FAQPage:`#95B385`,DefinedTerm:`#76906A`,Review:`#3F5A2E`,ImageObject:`#A0BB8C`,Conversation:`#6B5A85`,AdminConversation:`#4F4070`,PublicConversation:`#8A75A8`,Message:`#6B7280`,UserMessage:`#DFA67A`,AssistantMessage:`#C9A876`,ToolCall:`#B5ABCB`,Task:`#B0617A`,Project:`#8E4A60`,Event:`#C68095`,Workflow:`#3A6F77`,WorkflowStep:`#5A8E96`,WorkflowRun:`#7AAAB2`,StepResult:`#9CC4CB`,Email:`#6F7F4A`,EmailAccount:`#91A063`,Agent:`#B8893D`},e.FALLBACK_LABEL_COLOUR=`#94A3B8`,e.ALL_GRAPH_LABELS=Object.freeze(Object.keys(e.GRAPH_LABEL_COLOURS));function t(t){for(let n=1;n<t.length;n++)if(Object.prototype.hasOwnProperty.call(e.GRAPH_LABEL_COLOURS,t[n]))return t[n];return t[0]??null}function n(t){return e.GRAPH_LABEL_COLOURS[t]??e.FALLBACK_LABEL_COLOUR}function r(r){let i=t(r),a=i?n(i):e.FALLBACK_LABEL_COLOUR,o=0;for(let t=1;t<r.length;t++)Object.prototype.hasOwnProperty.call(e.GRAPH_LABEL_COLOURS,r[t])&&o++;return{displayLabel:i,colour:a,driftCandidates:o}}var i=/^(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2})/,a=/^\d{4}-\d{2}-\d{2}T(\d{2}:\d{2}:\d{2})/;function o(e){let t=e.match(i);return t?`${t[1]} ${t[2]}`:null}function s(e){let t=e.match(a);return t?t[1]:null}function c(e){let t=e.properties,n=e.labels[0];if(n===`ToolCall`){let e=t.toolName;if(typeof e==`string`&&e.length>0)return e.length>24?e.slice(0,24)+`…`:e}else if(n===`WorkflowRun`){let e=t.startedAt;if(typeof e==`string`&&e.length>0){let t=o(e);if(t)return t}}else if(n===`WorkflowStep`){let e=t.label;if(typeof e==`string`&&e.length>0)return e.length>24?e.slice(0,24)+`…`:e}else if(n===`Person`){let e=[typeof t.givenName==`string`?t.givenName:``,typeof t.familyName==`string`?t.familyName:``].filter(e=>e.length>0).join(` `);if(e.length>0)return e.length>24?e.slice(0,24)+`…`:e}else if(n===`Agent`){let e=typeof t.displayName==`string`?t.displayName:``,n=typeof t.slug==`string`?t.slug:``,r=e.length>0?e:n;if(r.length>0)return r.length>24?r.slice(0,24)+`…`:r}else if(n===`Message`){let e=typeof t.role==`string`?t.role:``,n=e===`user`?`user`:e===`assistant`?`asst`:e===`system`?`sys`:e===`tool`?`tool`:null,r=typeof t.createdAt==`string`?t.createdAt:``;if(n&&r){let e=s(r);if(e)return`${n} ${e}`}}for(let e of[`name`,`title`,`summary`,`givenName`,`subject`,`text`]){let n=t[e];if(typeof n==`string`&&n.length>0)return n.length>24?n.slice(0,24)+`…`:n}if(n===`Conversation`){let e=typeof t.sessionId==`string`?t.sessionId:null;if(e)return`Conv ${e.slice(0,8)}`}return n??`…`}function l(e){let t=e.properties,n=e.labels[0];if(n===`ToolCall`){let e=t.toolName;if(typeof e==`string`&&e.length>0)return e}else if(n===`WorkflowRun`){let e=t.startedAt;if(typeof e==`string`&&e.length>0){let t=o(e);if(t)return t}}else if(n===`WorkflowStep`){let e=t.label;if(typeof e==`string`&&e.length>0)return e}else if(n===`Person`){let e=[typeof t.givenName==`string`?t.givenName:``,typeof t.familyName==`string`?t.familyName:``].filter(e=>e.length>0).join(` `);if(e.length>0)return e}else if(n===`Agent`){let e=typeof t.displayName==`string`?t.displayName:``,n=typeof t.slug==`string`?t.slug:``,r=e.length>0?e:n;if(r.length>0)return r}for(let e of[`name`,`title`,`summary`,`givenName`,`subject`,`text`]){let n=t[e];if(typeof n==`string`&&n.length>0)return n}if(n===`Conversation`){let e=typeof t.sessionId==`string`?t.sessionId:null;if(e)return`Conv ${e.slice(0,8)}`}return n??`…`}})),i=r();Object.freeze(new Set([`Chunk`,`GraphPreference`]));var a=Object.freeze(new Set(`LocalBusiness.Service.PriceSpecification.OpeningHoursSpecification.Organization.Person.UserProfile.Preference.AdminUser.AccessGrant.KnowledgeDocument.DigitalDocument.CreativeWork.Question.FAQPage.DefinedTerm.Review.ImageObject.Listing.Property.Viewing.Offer.AdminConversation.PublicConversation.Task.Project.Event.Workflow.Email.EmailAccount.Agent`.split(`.`)));Object.freeze(new Set([`ToolCall`,`StepResult`,`WorkflowStep`,`WorkflowRun`])),Object.freeze(new Set([`HAS_TOOL_CALL`,`RUN_OF`,`HAS_STEP`,`HAS_RESULT`]));export{n as i,i as n,r,a as t};