@inkeep/agents-manage-ui 0.22.4 → 0.22.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/standalone/agents-manage-ui/.next/BUILD_ID +1 -1
- package/.next/standalone/agents-manage-ui/.next/app-build-manifest.json +179 -179
- package/.next/standalone/agents-manage-ui/.next/app-path-routes-manifest.json +6 -6
- package/.next/standalone/agents-manage-ui/.next/build-manifest.json +5 -5
- package/.next/standalone/agents-manage-ui/.next/prerender-manifest.json +3 -3
- package/.next/standalone/agents-manage-ui/.next/react-loadable-manifest.json +12 -12
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/page.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/agents/[agentId]/page.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/agents/[agentId]/page.js.nft.json +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/agents/[agentId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/agents/new/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/agents/new/page.js.nft.json +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/agents/new/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/agents/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/agents/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/api-keys/page.js +3 -3
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/api-keys/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/artifacts/[artifactComponentId]/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/artifacts/[artifactComponentId]/page.js.nft.json +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/artifacts/[artifactComponentId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/artifacts/new/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/artifacts/new/page.js.nft.json +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/artifacts/new/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/artifacts/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/artifacts/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/components/[dataComponentId]/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/components/[dataComponentId]/page.js.nft.json +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/components/[dataComponentId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/components/new/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/components/new/page.js.nft.json +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/components/new/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/components/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/components/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/[credentialId]/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/[credentialId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/bearer/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/bearer/page.js.nft.json +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/bearer/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/providers/[providerId]/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/providers/[providerId]/page.js.nft.json +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/providers/[providerId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/providers/page.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/providers/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/mcp-servers/[mcpServerId]/edit/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/mcp-servers/[mcpServerId]/edit/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/mcp-servers/[mcpServerId]/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/mcp-servers/[mcpServerId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/mcp-servers/new/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/mcp-servers/new/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/mcp-servers/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/mcp-servers/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/settings/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/settings/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/traces/ai-calls/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/traces/ai-calls/page.js.nft.json +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/traces/ai-calls/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/traces/conversations/[conversationId]/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/traces/conversations/[conversationId]/page.js.nft.json +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/traces/conversations/[conversationId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/traces/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/traces/page.js.nft.json +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/traces/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/page.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/_not-found/page.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/_not-found.rsc +8 -8
- package/.next/standalone/agents-manage-ui/.next/server/app/api/signoz/conversations/[conversationId]/route.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/api/signoz/conversations/[conversationId]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/api/signoz/route_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app-paths-manifest.json +6 -6
- package/.next/standalone/agents-manage-ui/.next/server/chunks/1670.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/chunks/175.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/chunks/2153.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/chunks/2297.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/server/chunks/2496.js +4 -4
- package/.next/standalone/agents-manage-ui/.next/server/chunks/3125.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/server/chunks/3547.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/chunks/4098.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/chunks/4759.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/server/chunks/6212.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/chunks/6409.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/server/chunks/7140.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/chunks/7457.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/chunks/8275.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/chunks/8982.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/middleware-build-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/middleware-manifest.json +5 -5
- package/.next/standalone/agents-manage-ui/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/pages/404.html +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/pages/500.html +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/12870-758ee91fe519b131.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/13162.49a473711bfc9106.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/2100.6da5ac53af6a50b9.js +93 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/{21078.a7d987aaf4965f33.js → 21078.db6a097e0944219f.js} +1 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/23624-2571fe5a16f780dc.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/26917.44af95c2220d2d7a.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/331.4164e5bbbf2109c5.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/47065.a2df61ae309c6b30.js +55 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/{48da6a00.6d972ca63d2c3e83.js → 48da6a00.4291466416c0a466.js} +1 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/49858-878d66300273a7dd.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/53779.d1ecdd05fd8620ac.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/54855.ac5c4000030e49f3.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/{71558-78422b7aaa85fd6c.js → 71558-9cced39a47fcba16.js} +1 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/7190-5e3e95554be44f9d.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/73974.c41c4a27e5a42554.js +62 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/{89814.587633678bc1263b.js → 89814.9c8e7e476bf1798d.js} +2 -2
- package/.next/standalone/agents-manage-ui/.next/static/chunks/93453.a61a7f6334280207.js +59 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/agents/{page-e003706d61e1eafe.js → page-f1a143c5949c1e89.js} +1 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/api-keys/page-4480183eb8e96ce3.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/artifacts/[artifactComponentId]/{page-afdaf855aec8af05.js → page-fc697a3a780f12b4.js} +1 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/artifacts/new/{page-afdaf855aec8af05.js → page-fc697a3a780f12b4.js} +1 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/artifacts/page-a3a02f332ce120a4.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/components/[dataComponentId]/{page-ef06eff512088fdf.js → page-93152030a35f29bf.js} +1 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/components/new/{page-ef06eff512088fdf.js → page-93152030a35f29bf.js} +1 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/components/page-648874c1201d9763.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/credentials/[credentialId]/page-1d660539971c8ff3.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/credentials/new/bearer/{page-4864c8674778ee06.js → page-eff85690c3fc72f5.js} +1 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/credentials/new/providers/[providerId]/page-e9784e5a6956bddb.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/credentials/page-930c2f2b7573fd60.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/mcp-servers/new/{page-89cef449fcf9ef7d.js → page-b68e0f5498480ef2.js} +1 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/mcp-servers/{page-069621ec5b0970e5.js → page-dec2682940d03a1f.js} +1 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/settings/{page-1273d3fada0586f8.js → page-9221e25310db3b49.js} +1 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/traces/page-814d2666e39799e8.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/page-9b3f94b4a1b8bb56.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/layout-95147669b9af917b.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/{webpack-59bf208cf832faea.js → webpack-eac97a6e1c9c9ceb.js} +1 -1
- package/.next/standalone/agents-manage-ui/package.json +1 -1
- package/.next/standalone/packages/agents-core/package.json +1 -1
- package/package.json +4 -4
- package/src/app/api/signoz/conversations/[conversationId]/route.ts +4 -1
- package/src/components/traces/timeline/render-panel-content.tsx +28 -0
- package/src/components/traces/timeline/types.ts +1 -0
- package/src/lib/api/signoz-stats.ts +33 -80
- package/.next/standalone/agents-manage-ui/.next/server/chunks/207.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/server/chunks/3205.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/server/chunks/6494.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/server/chunks/7641.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/13162.51bfeffa888e765d.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/2100.0cc29b56dc39a91c.js +0 -93
- package/.next/standalone/agents-manage-ui/.next/static/chunks/23624-24cf5c441db07bb8.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/26917.cd86a6e50adbcaf7.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/331.4a73e2854eaaf329.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/47065.981fe771a3ebbc89.js +0 -55
- package/.next/standalone/agents-manage-ui/.next/static/chunks/49858-b9850a9d521ad392.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/53779.3c6baf4968503ed4.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/54855.9990b0a1efe89008.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/7190-fd3c76249a4dd920.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/72963-d8f87b0ac91409cd.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/73974.646f6f06a0fb78fb.js +0 -62
- package/.next/standalone/agents-manage-ui/.next/static/chunks/93453.066f92e65561f306.js +0 -59
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/api-keys/page-ef99f039107dd345.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/artifacts/page-bc4833a45b33a47d.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/components/page-78b8833482d1f877.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/credentials/[credentialId]/page-a2772a4b6f4e0249.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/credentials/new/providers/[providerId]/page-b40d929333c3ce65.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/credentials/page-9d1905ada8938af6.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/traces/page-b23914a33d42bd42.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/page-c605715de4c89b47.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/layout-c0ecff8c2b6e0bcc.js +0 -1
- /package/.next/standalone/agents-manage-ui/.next/static/{D8h6pxVIqA0GQjbq_VQqo → 8gKKGa984_WVsnz1P7rVt}/_buildManifest.js +0 -0
- /package/.next/standalone/agents-manage-ui/.next/static/{D8h6pxVIqA0GQjbq_VQqo → 8gKKGa984_WVsnz1P7rVt}/_ssgManifest.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[82629],{8344:(t,e,a)=>{a.d(e,{DA:()=>$,IU:()=>B,U:()=>K,U7:()=>ec,U_:()=>ey,Zk:()=>c,aP:()=>eh,gh:()=>eg,lC:()=>y,on:()=>ed});var l=a(95952),r=a(3334),i=a(71409),n=a(98671),s=a(3386),h=a(36416),o=a(16222),d=a(90758),c=(0,h.K2)(async(t,e,a)=>{let l,r=e.useHtmlLabels||(0,s._3)((0,s.D7)()?.htmlLabels),d=t.insert("g").attr("class",a||"node default").attr("id",e.domId||e.id),c=d.insert("g").attr("class","label").attr("style",(0,n.KL)(e.labelStyle));l=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0];let g=await (0,i.GZ)(c,(0,s.jZ)((0,n.Sm)(l),(0,s.D7)()),{useHtmlLabels:r,width:e.width||(0,s.D7)().flowchart?.wrappingWidth,cssClasses:"markdown-node-label",style:e.labelStyle,addSvgBackground:!!e.icon||!!e.img}),y=g.getBBox(),f=(e?.padding??0)/2;if(r){let t=g.children[0],e=(0,o.Ltv)(g),a=t.getElementsByTagName("img");if(a){let t=""===l.replace(/<img[^>]*>/g,"").trim();await Promise.all([...a].map(e=>new Promise(a=>{function l(){if(e.style.display="flex",e.style.flexDirection="column",t){let t=(0,s.D7)().fontSize?(0,s.D7)().fontSize:window.getComputedStyle(document.body).fontSize,[a=s.UI.fontSize]=(0,n.I5)(t),l=5*a+"px";e.style.minWidth=l,e.style.maxWidth=l}else e.style.width="100%";a(e)}(0,h.K2)(l,"setupImage"),setTimeout(()=>{e.complete&&l()}),e.addEventListener("error",l),e.addEventListener("load",l)})))}y=t.getBoundingClientRect(),e.attr("width",y.width),e.attr("height",y.height)}return r?c.attr("transform","translate("+-y.width/2+", "+-y.height/2+")"):c.attr("transform","translate(0, "+-y.height/2+")"),e.centerLabel&&c.attr("transform","translate("+-y.width/2+", "+-y.height/2+")"),c.insert("rect",":first-child"),{shapeSvg:d,bbox:y,halfPadding:f,label:c}},"labelHelper"),g=(0,h.K2)(async(t,e,a)=>{let l=a.useHtmlLabels||(0,s._3)((0,s.D7)()?.flowchart?.htmlLabels),r=t.insert("g").attr("class","label").attr("style",a.labelStyle||""),h=await (0,i.GZ)(r,(0,s.jZ)((0,n.Sm)(e),(0,s.D7)()),{useHtmlLabels:l,width:a.width||(0,s.D7)()?.flowchart?.wrappingWidth,style:a.labelStyle,addSvgBackground:!!a.icon||!!a.img}),d=h.getBBox(),c=a.padding/2;if((0,s._3)((0,s.D7)()?.flowchart?.htmlLabels)){let t=h.children[0],e=(0,o.Ltv)(h);d=t.getBoundingClientRect(),e.attr("width",d.width),e.attr("height",d.height)}return l?r.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):r.attr("transform","translate(0, "+-d.height/2+")"),a.centerLabel&&r.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),r.insert("rect",":first-child"),{shapeSvg:t,bbox:d,halfPadding:c,label:r}},"insertLabel"),y=(0,h.K2)((t,e)=>{let a=e.node().getBBox();t.width=a.width,t.height=a.height},"updateNodeBounds"),f=(0,h.K2)((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");function p(t){let e=t.map((t,e)=>`${0===e?"M":"L"}${t.x},${t.y}`);return e.push("Z"),e.join(" ")}function u(t,e,a,l,r,i){let n=[],s=a-t,h=2*Math.PI/(s/i),o=e+(l-e)/2;for(let e=0;e<=50;e++){let a=t+e/50*s,l=o+r*Math.sin(h*(a-t));n.push({x:a,y:l})}return n}function m(t,e,a,l,r,i){let n=[],s=r*Math.PI/180,h=(i*Math.PI/180-s)/(l-1);for(let r=0;r<l;r++){let l=s+r*h,i=t+a*Math.cos(l),o=e+a*Math.sin(l);n.push({x:-i,y:-o})}return n}(0,h.K2)(p,"createPathFromPoints"),(0,h.K2)(u,"generateFullSineWavePoints"),(0,h.K2)(m,"generateCirclePoints");var x=(0,h.K2)((t,e)=>{var a,l,r=t.x,i=t.y,n=e.x-r,s=e.y-i,h=t.width/2,o=t.height/2;return Math.abs(s)*h>Math.abs(n)*o?(s<0&&(o=-o),a=0===s?0:o*n/s,l=o):(n<0&&(h=-h),a=h,l=0===n?0:h*s/n),{x:r+a,y:i+l}},"intersectRect");function w(t,e){e&&t.attr("style",e)}async function b(t){let e=(0,o.Ltv)(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),a=e.append("xhtml:div"),l=(0,s.D7)(),r=t.label;t.label&&(0,s.Wi)(t.label)&&(r=await (0,s.dj)(t.label.replace(s.Y2.lineBreakRegex,"\n"),l));let i='<span class="'+(t.isNode?"nodeLabel":"edgeLabel")+'" '+(t.labelStyle?'style="'+t.labelStyle+'"':"")+">"+r+"</span>";return a.html((0,s.jZ)(i,l)),w(a,t.labelStyle),a.style("display","inline-block"),a.style("padding-right","1px"),a.style("white-space","nowrap"),a.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}(0,h.K2)(w,"applyStyle"),(0,h.K2)(b,"addHtmlLabel");var $=(0,h.K2)(async(t,e,a,l)=>{let r=t||"";if("object"==typeof r&&(r=r[0]),(0,s._3)((0,s.D7)().flowchart.htmlLabels)){r=r.replace(/\\n|\n/g,"<br />"),h.Rm.info("vertexText"+r);let t={isNode:l,label:(0,n.Sm)(r).replace(/fa[blrs]?:fa-[\w-]+/g,t=>`<i class='${t.replace(":"," ")}'></i>`),labelStyle:e?e.replace("fill:","color:"):e};return await b(t)}{let t=document.createElementNS("http://www.w3.org/2000/svg","text");t.setAttribute("style",e.replace("color:","fill:"));for(let e of"string"==typeof r?r.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(r)?r:[]){let l=document.createElementNS("http://www.w3.org/2000/svg","tspan");l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),l.setAttribute("dy","1em"),l.setAttribute("x","0"),a?l.setAttribute("class","title-row"):l.setAttribute("class","row"),l.textContent=e.trim(),t.appendChild(l)}return t}},"createLabel"),k=(0,h.K2)((t,e,a,l,r)=>["M",t+r,e,"H",t+a-r,"A",r,r,"0 0 1",t+a,e+r,"V",e+l-r,"A",r,r,"0 0 1",t+a-r,e+l,"H",t+r,"A",r,r,"0 0 1",t,e+l-r,"V",e+r,"A",r,r,"0 0 1",t+r,e,"Z"].join(" "),"createRoundedRectPathD"),M=(0,h.K2)(async(t,e)=>{let a;h.Rm.info("Creating subgraph rect for ",e.id,e);let n=(0,s.D7)(),{themeVariables:c,handDrawnSeed:g}=n,{clusterBkg:y,clusterBorder:f}=c,{labelStyles:p,nodeStyles:u,borderStyles:m,backgroundStyles:w}=(0,r.GX)(e),b=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),$=(0,s._3)(n.flowchart.htmlLabels),M=b.insert("g").attr("class","cluster-label "),S=await (0,i.GZ)(M,e.label,{style:e.labelStyle,useHtmlLabels:$,isNode:!0}),D=S.getBBox();if((0,s._3)(n.flowchart.htmlLabels)){let t=S.children[0],e=(0,o.Ltv)(S);D=t.getBoundingClientRect(),e.attr("width",D.width),e.attr("height",D.height)}let A=e.width<=D.width+e.padding?D.width+e.padding:e.width;e.width<=D.width+e.padding?e.diff=(A-e.width)/2-e.padding:e.diff=-e.padding;let v=e.height,C=e.x-A/2,K=e.y-v/2;if(h.Rm.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){let t=d.A.svg(b),l=(0,r.Fr)(e,{roughness:.7,fill:y,stroke:f,fillWeight:3,seed:g}),i=t.path(k(C,K,A,v,0),l);(a=b.insert(()=>(h.Rm.debug("Rough node insert CXC",i),i),":first-child")).select("path:nth-child(2)").attr("style",m.join(";")),a.select("path").attr("style",w.join(";").replace("fill","stroke"))}else(a=b.insert("rect",":first-child")).attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",C).attr("y",K).attr("width",A).attr("height",v);let{subGraphTitleTopMargin:B}=(0,l.O)(n);if(M.attr("transform",`translate(${e.x-D.width/2}, ${e.y-e.height/2+B})`),p){let t=M.select("span");t&&t.attr("style",p)}let N=a.node().getBBox();return e.offsetX=0,e.width=N.width,e.height=N.height,e.offsetY=D.height-e.padding/2,e.intersect=function(t){return x(e,t)},{cluster:b,labelBBox:D}},"rect"),S=(0,h.K2)((t,e)=>{let a=t.insert("g").attr("class","note-cluster").attr("id",e.id),l=a.insert("rect",":first-child"),r=0*e.padding,i=r/2;l.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-i).attr("y",e.y-e.height/2-i).attr("width",e.width+r).attr("height",e.height+r).attr("fill","none");let n=l.node().getBBox();return e.width=n.width,e.height=n.height,e.intersect=function(t){return x(e,t)},{cluster:a,labelBBox:{width:0,height:0}}},"noteGroup"),D=(0,h.K2)(async(t,e)=>{let a,l=(0,s.D7)(),{themeVariables:r,handDrawnSeed:i}=l,{altBackground:n,compositeBackground:h,compositeTitleBackground:c,nodeBorder:g}=r,y=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-id",e.id).attr("data-look",e.look),f=y.insert("g",":first-child"),p=y.insert("g").attr("class","cluster-label"),u=y.append("rect"),m=p.node().appendChild(await $(e.label,e.labelStyle,void 0,!0)),w=m.getBBox();if((0,s._3)(l.flowchart.htmlLabels)){let t=m.children[0],e=(0,o.Ltv)(m);w=t.getBoundingClientRect(),e.attr("width",w.width),e.attr("height",w.height)}let b=0*e.padding,M=(e.width<=w.width+e.padding?w.width+e.padding:e.width)+b;e.width<=w.width+e.padding?e.diff=(M-e.width)/2-e.padding:e.diff=-e.padding;let S=e.height+b,D=e.height+b-w.height-6,A=e.x-M/2,v=e.y-S/2;e.width=M;let C=e.y-e.height/2-b/2+w.height+2;if("handDrawn"===e.look){let t=e.cssClasses.includes("statediagram-cluster-alt"),l=d.A.svg(y),r=e.rx||e.ry?l.path(k(A,v,M,S,10),{roughness:.7,fill:c,fillStyle:"solid",stroke:g,seed:i}):l.rectangle(A,v,M,S,{seed:i});a=y.insert(()=>r,":first-child");let s=l.rectangle(A,C,M,D,{fill:t?n:h,fillStyle:t?"hachure":"solid",stroke:g,seed:i});a=y.insert(()=>r,":first-child"),u=y.insert(()=>s)}else(a=f.insert("rect",":first-child")).attr("class","outer").attr("x",A).attr("y",v).attr("width",M).attr("height",S).attr("data-look",e.look),u.attr("class","inner").attr("x",A).attr("y",C).attr("width",M).attr("height",D);return p.attr("transform",`translate(${e.x-w.width/2}, ${v+1-3*!(0,s._3)(l.flowchart.htmlLabels)})`),e.height=a.node().getBBox().height,e.offsetX=0,e.offsetY=w.height-e.padding/2,e.labelBBox=w,e.intersect=function(t){return x(e,t)},{cluster:y,labelBBox:w}},"roundedWithTitle"),A=(0,h.K2)(async(t,e)=>{let a;h.Rm.info("Creating subgraph rect for ",e.id,e);let n=(0,s.D7)(),{themeVariables:c,handDrawnSeed:g}=n,{clusterBkg:y,clusterBorder:f}=c,{labelStyles:p,nodeStyles:u,borderStyles:m,backgroundStyles:w}=(0,r.GX)(e),b=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),$=(0,s._3)(n.flowchart.htmlLabels),M=b.insert("g").attr("class","cluster-label "),S=await (0,i.GZ)(M,e.label,{style:e.labelStyle,useHtmlLabels:$,isNode:!0,width:e.width}),D=S.getBBox();if((0,s._3)(n.flowchart.htmlLabels)){let t=S.children[0],e=(0,o.Ltv)(S);D=t.getBoundingClientRect(),e.attr("width",D.width),e.attr("height",D.height)}let A=e.width<=D.width+e.padding?D.width+e.padding:e.width;e.width<=D.width+e.padding?e.diff=(A-e.width)/2-e.padding:e.diff=-e.padding;let v=e.height,C=e.x-A/2,K=e.y-v/2;if(h.Rm.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){let t=d.A.svg(b),l=(0,r.Fr)(e,{roughness:.7,fill:y,stroke:f,fillWeight:4,seed:g}),i=t.path(k(C,K,A,v,e.rx),l);(a=b.insert(()=>(h.Rm.debug("Rough node insert CXC",i),i),":first-child")).select("path:nth-child(2)").attr("style",m.join(";")),a.select("path").attr("style",w.join(";").replace("fill","stroke"))}else(a=b.insert("rect",":first-child")).attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",C).attr("y",K).attr("width",A).attr("height",v);let{subGraphTitleTopMargin:B}=(0,l.O)(n);if(M.attr("transform",`translate(${e.x-D.width/2}, ${e.y-e.height/2+B})`),p){let t=M.select("span");t&&t.attr("style",p)}let N=a.node().getBBox();return e.offsetX=0,e.width=N.width,e.height=N.height,e.offsetY=D.height-e.padding/2,e.intersect=function(t){return x(e,t)},{cluster:b,labelBBox:D}},"kanbanSection"),v={rect:M,squareRect:M,roundedWithTitle:D,noteGroup:S,divider:(0,h.K2)((t,e)=>{let a,{themeVariables:l,handDrawnSeed:r}=(0,s.D7)(),{nodeBorder:i}=l,n=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-look",e.look),h=n.insert("g",":first-child"),o=0*e.padding,c=e.width+o;e.diff=-e.padding;let g=e.height+o,y=e.x-c/2,f=e.y-g/2;if(e.width=c,"handDrawn"===e.look){let t=d.A.svg(n).rectangle(y,f,c,g,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:i,seed:r});a=n.insert(()=>t,":first-child")}else(a=h.insert("rect",":first-child")).attr("class","divider").attr("x",y).attr("y",f).attr("width",c).attr("height",g).attr("data-look",e.look);return e.height=a.node().getBBox().height,e.offsetX=0,e.offsetY=0,e.intersect=function(t){return x(e,t)},{cluster:n,labelBBox:{}}},"divider"),kanbanSection:A},C=new Map,K=(0,h.K2)(async(t,e)=>{let a=e.shape||"rect",l=await v[a](t,e);return C.set(e.id,l),l},"insertCluster"),B=(0,h.K2)(()=>{C=new Map},"clear");function N(t,e,a,l){var r=t.x,i=t.y,n=r-l.x,s=i-l.y,h=Math.sqrt(e*e*s*s+a*a*n*n),o=Math.abs(e*a*n/h);l.x<r&&(o=-o);var d=Math.abs(e*a*s/h);return l.y<i&&(d=-d),{x:r+o,y:i+d}}function L(t,e,a){return N(t,e,e,a)}function R(t,e,a,l){{let r=e.y-t.y,i=t.x-e.x,n=e.x*t.y-t.x*e.y,s=r*a.x+i*a.y+n,h=r*l.x+i*l.y+n;if(0!==s&&0!==h&&F(s,h))return;let o=l.y-a.y,d=a.x-l.x,c=l.x*a.y-a.x*l.y,g=o*t.x+d*t.y+c,y=o*e.x+d*e.y+c;if(1e-6>Math.abs(g)&&1e-6>Math.abs(y)&&F(g,y))return;let f=r*d-o*i;if(0===f)return;let p=Math.abs(f/2),u=i*c-d*n;return{x:u<0?(u-p)/f:(u+p)/f,y:(u=o*n-r*c)<0?(u-p)/f:(u+p)/f}}}function F(t,e){return t*e>0}function P(t,e,a){let l=t.x,r=t.y,i=[],n=1/0,s=1/0;"function"==typeof e.forEach?e.forEach(function(t){n=Math.min(n,t.x),s=Math.min(s,t.y)}):(n=Math.min(n,e.x),s=Math.min(s,e.y));let h=l-t.width/2-n,o=r-t.height/2-s;for(let l=0;l<e.length;l++){let r=e[l],n=e[l<e.length-1?l+1:0],s=R(t,a,{x:h+r.x,y:o+r.y},{x:h+n.x,y:o+n.y});s&&i.push(s)}return i.length?(i.length>1&&i.sort(function(t,e){let l=t.x-a.x,r=t.y-a.y,i=Math.sqrt(l*l+r*r),n=e.x-a.x,s=e.y-a.y,h=Math.sqrt(n*n+s*s);return i<h?-1:+(i!==h)}),i[0]):t}(0,h.K2)(function(t,e){return t.intersect(e)},"intersectNode"),(0,h.K2)(N,"intersectEllipse"),(0,h.K2)(L,"intersectCircle"),(0,h.K2)(R,"intersectLine"),(0,h.K2)(F,"sameSign"),(0,h.K2)(P,"intersectPolygon");var X={circle:L,polygon:P,rect:x};function G(t,e){let{labelStyles:a}=(0,r.GX)(e);e.labelStyle=a;let l=f(e),i=l;l||(i="anchor");let s=t.insert("g").attr("class",i).attr("id",e.domId||e.id),{cssStyles:o}=e,c=d.A.svg(s),g=(0,r.Fr)(e,{fill:"black",stroke:"none",fillStyle:"solid"});"handDrawn"!==e.look&&(g.roughness=0);let p=c.circle(0,0,2,g),u=s.insert(()=>p,":first-child");return u.attr("class","anchor").attr("style",(0,n.KL)(o)),y(e,u),e.intersect=function(t){return h.Rm.info("Circle intersect",e,1,t),X.circle(e,1,t)},s}function I(t,e,a,l,r,i,n){let s=Math.atan2(l-e,a-t),h=Math.sqrt(((a-t)/2/r)**2+((l-e)/2/i)**2);if(h>1)throw Error("The given radii are too small to create an arc between the points.");let o=Math.sqrt(1-h**2),d=(t+a)/2+o*i*Math.sin(s)*(n?-1:1),c=(e+l)/2-o*r*Math.cos(s)*(n?-1:1),g=Math.atan2((e-c)/i,(t-d)/r),y=Math.atan2((l-c)/i,(a-d)/r)-g;n&&y<0&&(y+=2*Math.PI),!n&&y>0&&(y-=2*Math.PI);let f=[];for(let t=0;t<20;t++){let e=g+t/19*y,a=d+r*Math.cos(e),l=c+i*Math.sin(e);f.push({x:a,y:l})}return f}async function T(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await c(t,e,f(e)),s=n.width+e.padding+20,h=n.height+e.padding,o=h/2,g=o/(2.5+h/50),{cssStyles:u}=e,m=[{x:s/2,y:-h/2},{x:-s/2,y:-h/2},...I(-s/2,-h/2,-s/2,h/2,g,o,!1),{x:s/2,y:h/2},...I(s/2,h/2,s/2,-h/2,g,o,!0)],x=d.A.svg(i),w=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let b=p(m),$=x.path(b,w),k=i.insert(()=>$,":first-child");return k.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",u),l&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",l),k.attr("transform",`translate(${g/2}, 0)`),y(e,k),e.intersect=function(t){return X.polygon(e,m,t)},i}function W(t,e,a,l){return t.insert("polygon",":first-child").attr("points",l.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+a/2+")")}async function _(t,e){let a,{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:n,bbox:s}=await c(t,e,f(e)),h=s.height+e.padding,o=s.width+e.padding+12,g=-h,u=[{x:12,y:g},{x:o,y:g},{x:o,y:0},{x:0,y:0},{x:0,y:g+12},{x:12,y:g}],{cssStyles:m}=e;if("handDrawn"===e.look){let t=d.A.svg(n),l=(0,r.Fr)(e,{}),i=p(u),s=t.path(i,l);a=n.insert(()=>s,":first-child").attr("transform",`translate(${-o/2}, ${h/2})`),m&&a.attr("style",m)}else a=W(n,o,h,u);return i&&a.attr("style",i),y(e,a),e.intersect=function(t){return X.polygon(e,u,t)},n}function E(t,e){let{nodeStyles:a}=(0,r.GX)(e);e.label="";let l=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:i}=e,n=Math.max(28,e.width??0),s=[{x:0,y:n/2},{x:n/2,y:0},{x:0,y:-n/2},{x:-n/2,y:0}],h=d.A.svg(l),o=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(o.roughness=0,o.fillStyle="solid");let c=p(s),g=h.path(c,o),y=l.insert(()=>g,":first-child");return i&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",i),a&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",a),e.width=28,e.height=28,e.intersect=function(t){return X.polygon(e,s,t)},l}async function H(t,e,a){let l,{labelStyles:i,nodeStyles:s}=(0,r.GX)(e);e.labelStyle=i;let{shapeSvg:o,bbox:g,halfPadding:p}=await c(t,e,f(e)),u=a?.padding??p,m=g.width/2+u,{cssStyles:x}=e;if("handDrawn"===e.look){let t=d.A.svg(o),a=(0,r.Fr)(e,{}),i=t.circle(0,0,2*m,a);(l=o.insert(()=>i,":first-child")).attr("class","basic label-container").attr("style",(0,n.KL)(x))}else l=o.insert("circle",":first-child").attr("class","basic label-container").attr("style",s).attr("r",m).attr("cx",0).attr("cy",0);return y(e,l),e.calcIntersect=function(t,e){let a=t.width/2;return X.circle(t,a,e)},e.intersect=function(t){return h.Rm.info("Circle intersect",e,m,t),X.circle(e,m,t)},o}function j(t){let e=Math.cos(Math.PI/4),a=Math.sin(Math.PI/4),l=2*t,r={x:l/2*e,y:l/2*a},i={x:-(l/2)*e,y:l/2*a},n={x:-(l/2)*e,y:-(l/2)*a},s={x:l/2*e,y:-(l/2)*a};return`M ${i.x},${i.y} L ${s.x},${s.y}
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[82629],{85963:(t,e,a)=>{a.d(e,{DA:()=>$,IU:()=>B,U:()=>K,U7:()=>ec,U_:()=>ey,Zk:()=>c,aP:()=>eh,gh:()=>eg,lC:()=>y,on:()=>ed});var l=a(95952),r=a(3334),i=a(71409),n=a(98671),s=a(3386),h=a(36416),o=a(16222),d=a(90758),c=(0,h.K2)(async(t,e,a)=>{let l,r=e.useHtmlLabels||(0,s._3)((0,s.D7)()?.htmlLabels),d=t.insert("g").attr("class",a||"node default").attr("id",e.domId||e.id),c=d.insert("g").attr("class","label").attr("style",(0,n.KL)(e.labelStyle));l=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0];let g=await (0,i.GZ)(c,(0,s.jZ)((0,n.Sm)(l),(0,s.D7)()),{useHtmlLabels:r,width:e.width||(0,s.D7)().flowchart?.wrappingWidth,cssClasses:"markdown-node-label",style:e.labelStyle,addSvgBackground:!!e.icon||!!e.img}),y=g.getBBox(),f=(e?.padding??0)/2;if(r){let t=g.children[0],e=(0,o.Ltv)(g),a=t.getElementsByTagName("img");if(a){let t=""===l.replace(/<img[^>]*>/g,"").trim();await Promise.all([...a].map(e=>new Promise(a=>{function l(){if(e.style.display="flex",e.style.flexDirection="column",t){let t=(0,s.D7)().fontSize?(0,s.D7)().fontSize:window.getComputedStyle(document.body).fontSize,[a=s.UI.fontSize]=(0,n.I5)(t),l=5*a+"px";e.style.minWidth=l,e.style.maxWidth=l}else e.style.width="100%";a(e)}(0,h.K2)(l,"setupImage"),setTimeout(()=>{e.complete&&l()}),e.addEventListener("error",l),e.addEventListener("load",l)})))}y=t.getBoundingClientRect(),e.attr("width",y.width),e.attr("height",y.height)}return r?c.attr("transform","translate("+-y.width/2+", "+-y.height/2+")"):c.attr("transform","translate(0, "+-y.height/2+")"),e.centerLabel&&c.attr("transform","translate("+-y.width/2+", "+-y.height/2+")"),c.insert("rect",":first-child"),{shapeSvg:d,bbox:y,halfPadding:f,label:c}},"labelHelper"),g=(0,h.K2)(async(t,e,a)=>{let l=a.useHtmlLabels||(0,s._3)((0,s.D7)()?.flowchart?.htmlLabels),r=t.insert("g").attr("class","label").attr("style",a.labelStyle||""),h=await (0,i.GZ)(r,(0,s.jZ)((0,n.Sm)(e),(0,s.D7)()),{useHtmlLabels:l,width:a.width||(0,s.D7)()?.flowchart?.wrappingWidth,style:a.labelStyle,addSvgBackground:!!a.icon||!!a.img}),d=h.getBBox(),c=a.padding/2;if((0,s._3)((0,s.D7)()?.flowchart?.htmlLabels)){let t=h.children[0],e=(0,o.Ltv)(h);d=t.getBoundingClientRect(),e.attr("width",d.width),e.attr("height",d.height)}return l?r.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):r.attr("transform","translate(0, "+-d.height/2+")"),a.centerLabel&&r.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),r.insert("rect",":first-child"),{shapeSvg:t,bbox:d,halfPadding:c,label:r}},"insertLabel"),y=(0,h.K2)((t,e)=>{let a=e.node().getBBox();t.width=a.width,t.height=a.height},"updateNodeBounds"),f=(0,h.K2)((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");function p(t){let e=t.map((t,e)=>`${0===e?"M":"L"}${t.x},${t.y}`);return e.push("Z"),e.join(" ")}function u(t,e,a,l,r,i){let n=[],s=a-t,h=2*Math.PI/(s/i),o=e+(l-e)/2;for(let e=0;e<=50;e++){let a=t+e/50*s,l=o+r*Math.sin(h*(a-t));n.push({x:a,y:l})}return n}function m(t,e,a,l,r,i){let n=[],s=r*Math.PI/180,h=(i*Math.PI/180-s)/(l-1);for(let r=0;r<l;r++){let l=s+r*h,i=t+a*Math.cos(l),o=e+a*Math.sin(l);n.push({x:-i,y:-o})}return n}(0,h.K2)(p,"createPathFromPoints"),(0,h.K2)(u,"generateFullSineWavePoints"),(0,h.K2)(m,"generateCirclePoints");var x=(0,h.K2)((t,e)=>{var a,l,r=t.x,i=t.y,n=e.x-r,s=e.y-i,h=t.width/2,o=t.height/2;return Math.abs(s)*h>Math.abs(n)*o?(s<0&&(o=-o),a=0===s?0:o*n/s,l=o):(n<0&&(h=-h),a=h,l=0===n?0:h*s/n),{x:r+a,y:i+l}},"intersectRect");function w(t,e){e&&t.attr("style",e)}async function b(t){let e=(0,o.Ltv)(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),a=e.append("xhtml:div"),l=(0,s.D7)(),r=t.label;t.label&&(0,s.Wi)(t.label)&&(r=await (0,s.dj)(t.label.replace(s.Y2.lineBreakRegex,"\n"),l));let i='<span class="'+(t.isNode?"nodeLabel":"edgeLabel")+'" '+(t.labelStyle?'style="'+t.labelStyle+'"':"")+">"+r+"</span>";return a.html((0,s.jZ)(i,l)),w(a,t.labelStyle),a.style("display","inline-block"),a.style("padding-right","1px"),a.style("white-space","nowrap"),a.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}(0,h.K2)(w,"applyStyle"),(0,h.K2)(b,"addHtmlLabel");var $=(0,h.K2)(async(t,e,a,l)=>{let r=t||"";if("object"==typeof r&&(r=r[0]),(0,s._3)((0,s.D7)().flowchart.htmlLabels)){r=r.replace(/\\n|\n/g,"<br />"),h.Rm.info("vertexText"+r);let t={isNode:l,label:(0,n.Sm)(r).replace(/fa[blrs]?:fa-[\w-]+/g,t=>`<i class='${t.replace(":"," ")}'></i>`),labelStyle:e?e.replace("fill:","color:"):e};return await b(t)}{let t=document.createElementNS("http://www.w3.org/2000/svg","text");t.setAttribute("style",e.replace("color:","fill:"));for(let e of"string"==typeof r?r.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(r)?r:[]){let l=document.createElementNS("http://www.w3.org/2000/svg","tspan");l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),l.setAttribute("dy","1em"),l.setAttribute("x","0"),a?l.setAttribute("class","title-row"):l.setAttribute("class","row"),l.textContent=e.trim(),t.appendChild(l)}return t}},"createLabel"),k=(0,h.K2)((t,e,a,l,r)=>["M",t+r,e,"H",t+a-r,"A",r,r,"0 0 1",t+a,e+r,"V",e+l-r,"A",r,r,"0 0 1",t+a-r,e+l,"H",t+r,"A",r,r,"0 0 1",t,e+l-r,"V",e+r,"A",r,r,"0 0 1",t+r,e,"Z"].join(" "),"createRoundedRectPathD"),M=(0,h.K2)(async(t,e)=>{let a;h.Rm.info("Creating subgraph rect for ",e.id,e);let n=(0,s.D7)(),{themeVariables:c,handDrawnSeed:g}=n,{clusterBkg:y,clusterBorder:f}=c,{labelStyles:p,nodeStyles:u,borderStyles:m,backgroundStyles:w}=(0,r.GX)(e),b=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),$=(0,s._3)(n.flowchart.htmlLabels),M=b.insert("g").attr("class","cluster-label "),S=await (0,i.GZ)(M,e.label,{style:e.labelStyle,useHtmlLabels:$,isNode:!0}),D=S.getBBox();if((0,s._3)(n.flowchart.htmlLabels)){let t=S.children[0],e=(0,o.Ltv)(S);D=t.getBoundingClientRect(),e.attr("width",D.width),e.attr("height",D.height)}let A=e.width<=D.width+e.padding?D.width+e.padding:e.width;e.width<=D.width+e.padding?e.diff=(A-e.width)/2-e.padding:e.diff=-e.padding;let v=e.height,C=e.x-A/2,K=e.y-v/2;if(h.Rm.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){let t=d.A.svg(b),l=(0,r.Fr)(e,{roughness:.7,fill:y,stroke:f,fillWeight:3,seed:g}),i=t.path(k(C,K,A,v,0),l);(a=b.insert(()=>(h.Rm.debug("Rough node insert CXC",i),i),":first-child")).select("path:nth-child(2)").attr("style",m.join(";")),a.select("path").attr("style",w.join(";").replace("fill","stroke"))}else(a=b.insert("rect",":first-child")).attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",C).attr("y",K).attr("width",A).attr("height",v);let{subGraphTitleTopMargin:B}=(0,l.O)(n);if(M.attr("transform",`translate(${e.x-D.width/2}, ${e.y-e.height/2+B})`),p){let t=M.select("span");t&&t.attr("style",p)}let N=a.node().getBBox();return e.offsetX=0,e.width=N.width,e.height=N.height,e.offsetY=D.height-e.padding/2,e.intersect=function(t){return x(e,t)},{cluster:b,labelBBox:D}},"rect"),S=(0,h.K2)((t,e)=>{let a=t.insert("g").attr("class","note-cluster").attr("id",e.id),l=a.insert("rect",":first-child"),r=0*e.padding,i=r/2;l.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-i).attr("y",e.y-e.height/2-i).attr("width",e.width+r).attr("height",e.height+r).attr("fill","none");let n=l.node().getBBox();return e.width=n.width,e.height=n.height,e.intersect=function(t){return x(e,t)},{cluster:a,labelBBox:{width:0,height:0}}},"noteGroup"),D=(0,h.K2)(async(t,e)=>{let a,l=(0,s.D7)(),{themeVariables:r,handDrawnSeed:i}=l,{altBackground:n,compositeBackground:h,compositeTitleBackground:c,nodeBorder:g}=r,y=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-id",e.id).attr("data-look",e.look),f=y.insert("g",":first-child"),p=y.insert("g").attr("class","cluster-label"),u=y.append("rect"),m=p.node().appendChild(await $(e.label,e.labelStyle,void 0,!0)),w=m.getBBox();if((0,s._3)(l.flowchart.htmlLabels)){let t=m.children[0],e=(0,o.Ltv)(m);w=t.getBoundingClientRect(),e.attr("width",w.width),e.attr("height",w.height)}let b=0*e.padding,M=(e.width<=w.width+e.padding?w.width+e.padding:e.width)+b;e.width<=w.width+e.padding?e.diff=(M-e.width)/2-e.padding:e.diff=-e.padding;let S=e.height+b,D=e.height+b-w.height-6,A=e.x-M/2,v=e.y-S/2;e.width=M;let C=e.y-e.height/2-b/2+w.height+2;if("handDrawn"===e.look){let t=e.cssClasses.includes("statediagram-cluster-alt"),l=d.A.svg(y),r=e.rx||e.ry?l.path(k(A,v,M,S,10),{roughness:.7,fill:c,fillStyle:"solid",stroke:g,seed:i}):l.rectangle(A,v,M,S,{seed:i});a=y.insert(()=>r,":first-child");let s=l.rectangle(A,C,M,D,{fill:t?n:h,fillStyle:t?"hachure":"solid",stroke:g,seed:i});a=y.insert(()=>r,":first-child"),u=y.insert(()=>s)}else(a=f.insert("rect",":first-child")).attr("class","outer").attr("x",A).attr("y",v).attr("width",M).attr("height",S).attr("data-look",e.look),u.attr("class","inner").attr("x",A).attr("y",C).attr("width",M).attr("height",D);return p.attr("transform",`translate(${e.x-w.width/2}, ${v+1-3*!(0,s._3)(l.flowchart.htmlLabels)})`),e.height=a.node().getBBox().height,e.offsetX=0,e.offsetY=w.height-e.padding/2,e.labelBBox=w,e.intersect=function(t){return x(e,t)},{cluster:y,labelBBox:w}},"roundedWithTitle"),A=(0,h.K2)(async(t,e)=>{let a;h.Rm.info("Creating subgraph rect for ",e.id,e);let n=(0,s.D7)(),{themeVariables:c,handDrawnSeed:g}=n,{clusterBkg:y,clusterBorder:f}=c,{labelStyles:p,nodeStyles:u,borderStyles:m,backgroundStyles:w}=(0,r.GX)(e),b=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),$=(0,s._3)(n.flowchart.htmlLabels),M=b.insert("g").attr("class","cluster-label "),S=await (0,i.GZ)(M,e.label,{style:e.labelStyle,useHtmlLabels:$,isNode:!0,width:e.width}),D=S.getBBox();if((0,s._3)(n.flowchart.htmlLabels)){let t=S.children[0],e=(0,o.Ltv)(S);D=t.getBoundingClientRect(),e.attr("width",D.width),e.attr("height",D.height)}let A=e.width<=D.width+e.padding?D.width+e.padding:e.width;e.width<=D.width+e.padding?e.diff=(A-e.width)/2-e.padding:e.diff=-e.padding;let v=e.height,C=e.x-A/2,K=e.y-v/2;if(h.Rm.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){let t=d.A.svg(b),l=(0,r.Fr)(e,{roughness:.7,fill:y,stroke:f,fillWeight:4,seed:g}),i=t.path(k(C,K,A,v,e.rx),l);(a=b.insert(()=>(h.Rm.debug("Rough node insert CXC",i),i),":first-child")).select("path:nth-child(2)").attr("style",m.join(";")),a.select("path").attr("style",w.join(";").replace("fill","stroke"))}else(a=b.insert("rect",":first-child")).attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",C).attr("y",K).attr("width",A).attr("height",v);let{subGraphTitleTopMargin:B}=(0,l.O)(n);if(M.attr("transform",`translate(${e.x-D.width/2}, ${e.y-e.height/2+B})`),p){let t=M.select("span");t&&t.attr("style",p)}let N=a.node().getBBox();return e.offsetX=0,e.width=N.width,e.height=N.height,e.offsetY=D.height-e.padding/2,e.intersect=function(t){return x(e,t)},{cluster:b,labelBBox:D}},"kanbanSection"),v={rect:M,squareRect:M,roundedWithTitle:D,noteGroup:S,divider:(0,h.K2)((t,e)=>{let a,{themeVariables:l,handDrawnSeed:r}=(0,s.D7)(),{nodeBorder:i}=l,n=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-look",e.look),h=n.insert("g",":first-child"),o=0*e.padding,c=e.width+o;e.diff=-e.padding;let g=e.height+o,y=e.x-c/2,f=e.y-g/2;if(e.width=c,"handDrawn"===e.look){let t=d.A.svg(n).rectangle(y,f,c,g,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:i,seed:r});a=n.insert(()=>t,":first-child")}else(a=h.insert("rect",":first-child")).attr("class","divider").attr("x",y).attr("y",f).attr("width",c).attr("height",g).attr("data-look",e.look);return e.height=a.node().getBBox().height,e.offsetX=0,e.offsetY=0,e.intersect=function(t){return x(e,t)},{cluster:n,labelBBox:{}}},"divider"),kanbanSection:A},C=new Map,K=(0,h.K2)(async(t,e)=>{let a=e.shape||"rect",l=await v[a](t,e);return C.set(e.id,l),l},"insertCluster"),B=(0,h.K2)(()=>{C=new Map},"clear");function N(t,e,a,l){var r=t.x,i=t.y,n=r-l.x,s=i-l.y,h=Math.sqrt(e*e*s*s+a*a*n*n),o=Math.abs(e*a*n/h);l.x<r&&(o=-o);var d=Math.abs(e*a*s/h);return l.y<i&&(d=-d),{x:r+o,y:i+d}}function L(t,e,a){return N(t,e,e,a)}function R(t,e,a,l){{let r=e.y-t.y,i=t.x-e.x,n=e.x*t.y-t.x*e.y,s=r*a.x+i*a.y+n,h=r*l.x+i*l.y+n;if(0!==s&&0!==h&&F(s,h))return;let o=l.y-a.y,d=a.x-l.x,c=l.x*a.y-a.x*l.y,g=o*t.x+d*t.y+c,y=o*e.x+d*e.y+c;if(1e-6>Math.abs(g)&&1e-6>Math.abs(y)&&F(g,y))return;let f=r*d-o*i;if(0===f)return;let p=Math.abs(f/2),u=i*c-d*n;return{x:u<0?(u-p)/f:(u+p)/f,y:(u=o*n-r*c)<0?(u-p)/f:(u+p)/f}}}function F(t,e){return t*e>0}function P(t,e,a){let l=t.x,r=t.y,i=[],n=1/0,s=1/0;"function"==typeof e.forEach?e.forEach(function(t){n=Math.min(n,t.x),s=Math.min(s,t.y)}):(n=Math.min(n,e.x),s=Math.min(s,e.y));let h=l-t.width/2-n,o=r-t.height/2-s;for(let l=0;l<e.length;l++){let r=e[l],n=e[l<e.length-1?l+1:0],s=R(t,a,{x:h+r.x,y:o+r.y},{x:h+n.x,y:o+n.y});s&&i.push(s)}return i.length?(i.length>1&&i.sort(function(t,e){let l=t.x-a.x,r=t.y-a.y,i=Math.sqrt(l*l+r*r),n=e.x-a.x,s=e.y-a.y,h=Math.sqrt(n*n+s*s);return i<h?-1:+(i!==h)}),i[0]):t}(0,h.K2)(function(t,e){return t.intersect(e)},"intersectNode"),(0,h.K2)(N,"intersectEllipse"),(0,h.K2)(L,"intersectCircle"),(0,h.K2)(R,"intersectLine"),(0,h.K2)(F,"sameSign"),(0,h.K2)(P,"intersectPolygon");var X={circle:L,polygon:P,rect:x};function G(t,e){let{labelStyles:a}=(0,r.GX)(e);e.labelStyle=a;let l=f(e),i=l;l||(i="anchor");let s=t.insert("g").attr("class",i).attr("id",e.domId||e.id),{cssStyles:o}=e,c=d.A.svg(s),g=(0,r.Fr)(e,{fill:"black",stroke:"none",fillStyle:"solid"});"handDrawn"!==e.look&&(g.roughness=0);let p=c.circle(0,0,2,g),u=s.insert(()=>p,":first-child");return u.attr("class","anchor").attr("style",(0,n.KL)(o)),y(e,u),e.intersect=function(t){return h.Rm.info("Circle intersect",e,1,t),X.circle(e,1,t)},s}function I(t,e,a,l,r,i,n){let s=Math.atan2(l-e,a-t),h=Math.sqrt(((a-t)/2/r)**2+((l-e)/2/i)**2);if(h>1)throw Error("The given radii are too small to create an arc between the points.");let o=Math.sqrt(1-h**2),d=(t+a)/2+o*i*Math.sin(s)*(n?-1:1),c=(e+l)/2-o*r*Math.cos(s)*(n?-1:1),g=Math.atan2((e-c)/i,(t-d)/r),y=Math.atan2((l-c)/i,(a-d)/r)-g;n&&y<0&&(y+=2*Math.PI),!n&&y>0&&(y-=2*Math.PI);let f=[];for(let t=0;t<20;t++){let e=g+t/19*y,a=d+r*Math.cos(e),l=c+i*Math.sin(e);f.push({x:a,y:l})}return f}async function T(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await c(t,e,f(e)),s=n.width+e.padding+20,h=n.height+e.padding,o=h/2,g=o/(2.5+h/50),{cssStyles:u}=e,m=[{x:s/2,y:-h/2},{x:-s/2,y:-h/2},...I(-s/2,-h/2,-s/2,h/2,g,o,!1),{x:s/2,y:h/2},...I(s/2,h/2,s/2,-h/2,g,o,!0)],x=d.A.svg(i),w=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let b=p(m),$=x.path(b,w),k=i.insert(()=>$,":first-child");return k.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",u),l&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",l),k.attr("transform",`translate(${g/2}, 0)`),y(e,k),e.intersect=function(t){return X.polygon(e,m,t)},i}function W(t,e,a,l){return t.insert("polygon",":first-child").attr("points",l.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+a/2+")")}async function _(t,e){let a,{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:n,bbox:s}=await c(t,e,f(e)),h=s.height+e.padding,o=s.width+e.padding+12,g=-h,u=[{x:12,y:g},{x:o,y:g},{x:o,y:0},{x:0,y:0},{x:0,y:g+12},{x:12,y:g}],{cssStyles:m}=e;if("handDrawn"===e.look){let t=d.A.svg(n),l=(0,r.Fr)(e,{}),i=p(u),s=t.path(i,l);a=n.insert(()=>s,":first-child").attr("transform",`translate(${-o/2}, ${h/2})`),m&&a.attr("style",m)}else a=W(n,o,h,u);return i&&a.attr("style",i),y(e,a),e.intersect=function(t){return X.polygon(e,u,t)},n}function E(t,e){let{nodeStyles:a}=(0,r.GX)(e);e.label="";let l=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:i}=e,n=Math.max(28,e.width??0),s=[{x:0,y:n/2},{x:n/2,y:0},{x:0,y:-n/2},{x:-n/2,y:0}],h=d.A.svg(l),o=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(o.roughness=0,o.fillStyle="solid");let c=p(s),g=h.path(c,o),y=l.insert(()=>g,":first-child");return i&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",i),a&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",a),e.width=28,e.height=28,e.intersect=function(t){return X.polygon(e,s,t)},l}async function H(t,e,a){let l,{labelStyles:i,nodeStyles:s}=(0,r.GX)(e);e.labelStyle=i;let{shapeSvg:o,bbox:g,halfPadding:p}=await c(t,e,f(e)),u=a?.padding??p,m=g.width/2+u,{cssStyles:x}=e;if("handDrawn"===e.look){let t=d.A.svg(o),a=(0,r.Fr)(e,{}),i=t.circle(0,0,2*m,a);(l=o.insert(()=>i,":first-child")).attr("class","basic label-container").attr("style",(0,n.KL)(x))}else l=o.insert("circle",":first-child").attr("class","basic label-container").attr("style",s).attr("r",m).attr("cx",0).attr("cy",0);return y(e,l),e.calcIntersect=function(t,e){let a=t.width/2;return X.circle(t,a,e)},e.intersect=function(t){return h.Rm.info("Circle intersect",e,m,t),X.circle(e,m,t)},o}function j(t){let e=Math.cos(Math.PI/4),a=Math.sin(Math.PI/4),l=2*t,r={x:l/2*e,y:l/2*a},i={x:-(l/2)*e,y:l/2*a},n={x:-(l/2)*e,y:-(l/2)*a},s={x:l/2*e,y:-(l/2)*a};return`M ${i.x},${i.y} L ${s.x},${s.y}
|
|
2
2
|
M ${r.x},${r.y} L ${n.x},${n.y}`}function q(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a,e.label="";let i=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),n=Math.max(30,e?.width??0),{cssStyles:s}=e,o=d.A.svg(i),c=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(c.roughness=0,c.fillStyle="solid");let g=o.circle(0,0,2*n,c),p=j(n),u=o.path(p,c),m=i.insert(()=>g,":first-child");return m.insert(()=>u),s&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",s),l&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",l),y(e,m),e.intersect=function(t){return h.Rm.info("crossedCircle intersect",e,{radius:n,point:t}),X.circle(e,n,t)},i}function z(t,e,a,l=100,r=0,i=180){let n=[],s=r*Math.PI/180,h=(i*Math.PI/180-s)/(l-1);for(let r=0;r<l;r++){let l=s+r*h,i=t+a*Math.cos(l),o=e+a*Math.sin(l);n.push({x:-i,y:-o})}return n}async function Z(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=n.width+(e.padding??0),o=n.height+(e.padding??0),g=Math.max(5,.1*o),{cssStyles:u}=e,m=[...z(h/2,-o/2,g,30,-90,0),{x:-h/2-g,y:g},...z(h/2+2*g,-g,g,20,-180,-270),...z(h/2+2*g,g,g,20,-90,-180),{x:-h/2-g,y:-o/2},...z(h/2,o/2,g,20,0,90)],x=[{x:h/2,y:-o/2-g},{x:-h/2,y:-o/2-g},...z(h/2,-o/2,g,20,-90,0),{x:-h/2-g,y:-g},...z(h/2+.1*h,-g,g,20,-180,-270),...z(h/2+.1*h,g,g,20,-90,-180),{x:-h/2-g,y:o/2},...z(h/2,o/2,g,20,0,90),{x:-h/2,y:o/2+g},{x:h/2,y:o/2+g}],w=d.A.svg(i),b=(0,r.Fr)(e,{fill:"none"});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let $=p(m).replace("Z",""),k=w.path($,b),M=p(x),S=w.path(M,{...b}),D=i.insert("g",":first-child");return D.insert(()=>S,":first-child").attr("stroke-opacity",0),D.insert(()=>k,":first-child"),D.attr("class","text"),u&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",u),l&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",l),D.attr("transform",`translate(${g}, 0)`),s.attr("transform",`translate(${-h/2+g-(n.x-(n.left??0))},${-o/2+(e.padding??0)/2-(n.y-(n.top??0))})`),y(e,D),e.intersect=function(t){return X.polygon(e,x,t)},i}function O(t,e,a,l=100,r=0,i=180){let n=[],s=r*Math.PI/180,h=(i*Math.PI/180-s)/(l-1);for(let r=0;r<l;r++){let l=s+r*h,i=t+a*Math.cos(l),o=e+a*Math.sin(l);n.push({x:i,y:o})}return n}async function Y(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=n.width+(e.padding??0),o=n.height+(e.padding??0),g=Math.max(5,.1*o),{cssStyles:u}=e,m=[...O(h/2,-o/2,g,20,-90,0),{x:h/2+g,y:-g},...O(h/2+2*g,-g,g,20,-180,-270),...O(h/2+2*g,g,g,20,-90,-180),{x:h/2+g,y:o/2},...O(h/2,o/2,g,20,0,90)],x=[{x:-h/2,y:-o/2-g},{x:h/2,y:-o/2-g},...O(h/2,-o/2,g,20,-90,0),{x:h/2+g,y:-g},...O(h/2+2*g,-g,g,20,-180,-270),...O(h/2+2*g,g,g,20,-90,-180),{x:h/2+g,y:o/2},...O(h/2,o/2,g,20,0,90),{x:h/2,y:o/2+g},{x:-h/2,y:o/2+g}],w=d.A.svg(i),b=(0,r.Fr)(e,{fill:"none"});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let $=p(m).replace("Z",""),k=w.path($,b),M=p(x),S=w.path(M,{...b}),D=i.insert("g",":first-child");return D.insert(()=>S,":first-child").attr("stroke-opacity",0),D.insert(()=>k,":first-child"),D.attr("class","text"),u&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",u),l&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",l),D.attr("transform",`translate(${-g}, 0)`),s.attr("transform",`translate(${-h/2+(e.padding??0)/2-(n.x-(n.left??0))},${-o/2+(e.padding??0)/2-(n.y-(n.top??0))})`),y(e,D),e.intersect=function(t){return X.polygon(e,x,t)},i}function U(t,e,a,l=100,r=0,i=180){let n=[],s=r*Math.PI/180,h=(i*Math.PI/180-s)/(l-1);for(let r=0;r<l;r++){let l=s+r*h,i=t+a*Math.cos(l),o=e+a*Math.sin(l);n.push({x:-i,y:-o})}return n}async function V(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=n.width+(e.padding??0),o=n.height+(e.padding??0),g=Math.max(5,.1*o),{cssStyles:u}=e,m=[...U(h/2,-o/2,g,30,-90,0),{x:-h/2-g,y:g},...U(h/2+2*g,-g,g,20,-180,-270),...U(h/2+2*g,g,g,20,-90,-180),{x:-h/2-g,y:-o/2},...U(h/2,o/2,g,20,0,90)],x=[...U(-h/2+g+g/2,-o/2,g,20,-90,-180),{x:h/2-g/2,y:g},...U(-h/2-g/2,-g,g,20,0,90),...U(-h/2-g/2,g,g,20,-90,0),{x:h/2-g/2,y:-g},...U(-h/2+g+g/2,o/2,g,30,-180,-270)],w=[{x:h/2,y:-o/2-g},{x:-h/2,y:-o/2-g},...U(h/2,-o/2,g,20,-90,0),{x:-h/2-g,y:-g},...U(h/2+2*g,-g,g,20,-180,-270),...U(h/2+2*g,g,g,20,-90,-180),{x:-h/2-g,y:o/2},...U(h/2,o/2,g,20,0,90),{x:-h/2,y:o/2+g},{x:h/2-g-g/2,y:o/2+g},...U(-h/2+g+g/2,-o/2,g,20,-90,-180),{x:h/2-g/2,y:g},...U(-h/2-g/2,-g,g,20,0,90),...U(-h/2-g/2,g,g,20,-90,0),{x:h/2-g/2,y:-g},...U(-h/2+g+g/2,o/2,g,30,-180,-270)],b=d.A.svg(i),$=(0,r.Fr)(e,{fill:"none"});"handDrawn"!==e.look&&($.roughness=0,$.fillStyle="solid");let k=p(m).replace("Z",""),M=b.path(k,$),S=p(x).replace("Z",""),D=b.path(S,$),A=p(w),v=b.path(A,{...$}),C=i.insert("g",":first-child");return C.insert(()=>v,":first-child").attr("stroke-opacity",0),C.insert(()=>M,":first-child"),C.insert(()=>D,":first-child"),C.attr("class","text"),u&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",u),l&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",l),C.attr("transform",`translate(${g-g/4}, 0)`),s.attr("transform",`translate(${-h/2+(e.padding??0)/2-(n.x-(n.left??0))},${-o/2+(e.padding??0)/2-(n.y-(n.top??0))})`),y(e,C),e.intersect=function(t){return X.polygon(e,w,t)},i}async function J(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await c(t,e,f(e)),s=Math.max(80,(n.width+(e.padding??0)*2)*1.25,e?.width??0),h=Math.max(20,n.height+(e.padding??0)*2,e?.height??0),o=h/2,{cssStyles:g}=e,u=d.A.svg(i),x=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");let w=s-o,b=h/4,$=[{x:w,y:0},{x:b,y:0},{x:0,y:h/2},{x:b,y:h},{x:w,y:h},...m(-w,-h/2,o,50,270,90)],k=p($),M=u.path(k,x),S=i.insert(()=>M,":first-child");return S.attr("class","basic label-container"),g&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",g),l&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",l),S.attr("transform",`translate(${-s/2}, ${-h/2})`),y(e,S),e.intersect=function(t){return X.polygon(e,$,t)},i}(0,h.K2)(G,"anchor"),(0,h.K2)(I,"generateArcPoints"),(0,h.K2)(T,"bowTieRect"),(0,h.K2)(W,"insertPolygonShape"),(0,h.K2)(_,"card"),(0,h.K2)(E,"choice"),(0,h.K2)(H,"circle"),(0,h.K2)(j,"createLine"),(0,h.K2)(q,"crossedCircle"),(0,h.K2)(z,"generateCirclePoints"),(0,h.K2)(Z,"curlyBraceLeft"),(0,h.K2)(O,"generateCirclePoints"),(0,h.K2)(Y,"curlyBraceRight"),(0,h.K2)(U,"generateCirclePoints"),(0,h.K2)(V,"curlyBraces"),(0,h.K2)(J,"curvedTrapezoid");var Q=(0,h.K2)((t,e,a,l,r,i)=>`M${t},${e+i} a${r},${i} 0,0,0 ${a},0 a${r},${i} 0,0,0 ${-a},0 l0,${l} a${r},${i} 0,0,0 ${a},0 l0,${-l}`,"createCylinderPathD"),tt=(0,h.K2)((t,e,a,l,r,i)=>`M${t},${e+i} M${t+a},${e+i} a${r},${i} 0,0,0 ${-a},0 l0,${l} a${r},${i} 0,0,0 ${a},0 l0,${-l}`,"createOuterCylinderPathD"),te=(0,h.K2)((t,e,a,l,r,i)=>`M${t-a/2},${-l/2} a${r},${i} 0,0,0 ${a},0`,"createInnerCylinderPathD");async function ta(t,e){let a,{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:s,bbox:h,label:o}=await c(t,e,f(e)),g=Math.max(h.width+e.padding,e.width??0),p=g/2,u=p/(2.5+g/50),m=Math.max(h.height+u+e.padding,e.height??0),{cssStyles:x}=e;if("handDrawn"===e.look){let t=d.A.svg(s),l=tt(0,0,g,m,p,u),i=te(0,u,g,m,p,u),n=t.path(l,(0,r.Fr)(e,{})),h=t.path(i,(0,r.Fr)(e,{fill:"none"}));a=s.insert(()=>h,":first-child"),(a=s.insert(()=>n,":first-child")).attr("class","basic label-container"),x&&a.attr("style",x)}else{let t=Q(0,0,g,m,p,u);a=s.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,n.KL)(x)).attr("style",i)}return a.attr("label-offset-y",u),a.attr("transform",`translate(${-g/2}, ${-(m/2+u)})`),y(e,a),o.attr("transform",`translate(${-(h.width/2)-(h.x-(h.left??0))}, ${-(h.height/2)+(e.padding??0)/1.5-(h.y-(h.top??0))})`),e.intersect=function(t){let a=X.rect(e,t),l=a.x-(e.x??0);if(0!=p&&(Math.abs(l)<(e.width??0)/2||Math.abs(l)==(e.width??0)/2&&Math.abs(a.y-(e.y??0))>(e.height??0)/2-u)){let r=u*u*(1-l*l/(p*p));r>0&&(r=Math.sqrt(r)),r=u-r,t.y-(e.y??0)>0&&(r=-r),a.y+=r}return a},s}async function tl(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=n.width+e.padding,o=n.height+e.padding,g=.2*o,p=-h/2,u=-o/2-g/2,{cssStyles:m}=e,x=d.A.svg(i),w=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let b=x.polygon([{x:p,y:u+g},{x:-p,y:u+g},{x:-p,y:-u},{x:p,y:-u},{x:p,y:u},{x:-p,y:u},{x:-p,y:u+g}].map(t=>[t.x,t.y]),w),$=i.insert(()=>b,":first-child");return $.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&$.selectAll("path").attr("style",m),l&&"handDrawn"!==e.look&&$.selectAll("path").attr("style",l),s.attr("transform",`translate(${p+(e.padding??0)/2-(n.x-(n.left??0))}, ${u+g+(e.padding??0)/2-(n.y-(n.top??0))})`),y(e,$),e.intersect=function(t){return X.rect(e,t)},i}async function tr(t,e){let a,{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:s,bbox:o,halfPadding:g}=await c(t,e,f(e)),p=o.width/2+g+5,u=o.width/2+g,{cssStyles:m}=e;if("handDrawn"===e.look){let t=d.A.svg(s),l=(0,r.Fr)(e,{roughness:.2,strokeWidth:2.5}),i=(0,r.Fr)(e,{roughness:.2,strokeWidth:1.5}),h=t.circle(0,0,2*p,l),o=t.circle(0,0,2*u,i);(a=s.insert("g",":first-child")).attr("class",(0,n.KL)(e.cssClasses)).attr("style",(0,n.KL)(m)),a.node()?.appendChild(h),a.node()?.appendChild(o)}else{let t=(a=s.insert("g",":first-child")).insert("circle",":first-child"),e=a.insert("circle");a.attr("class","basic label-container").attr("style",i),t.attr("class","outer-circle").attr("style",i).attr("r",p).attr("cx",0).attr("cy",0),e.attr("class","inner-circle").attr("style",i).attr("r",u).attr("cx",0).attr("cy",0)}return y(e,a),e.intersect=function(t){return h.Rm.info("DoubleCircle intersect",e,p,t),X.circle(e,p,t)},s}function ti(t,e,{config:{themeVariables:a}}){let{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.label="",e.labelStyle=l;let n=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:s}=e,o=d.A.svg(n),{nodeBorder:c}=a,g=(0,r.Fr)(e,{fillStyle:"solid"});"handDrawn"!==e.look&&(g.roughness=0);let p=o.circle(0,0,14,g),u=n.insert(()=>p,":first-child");return u.selectAll("path").attr("style",`fill: ${c} !important;`),s&&s.length>0&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",s),i&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",i),y(e,u),e.intersect=function(t){return h.Rm.info("filledCircle intersect",e,{radius:7,point:t}),X.circle(e,7,t)},n}async function tn(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),o=n.width+(e.padding??0),g=o+n.height,u=o+n.height,m=[{x:0,y:-g},{x:u,y:-g},{x:u/2,y:0}],{cssStyles:x}=e,w=d.A.svg(i),b=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let $=p(m),k=w.path($,b),M=i.insert(()=>k,":first-child").attr("transform",`translate(${-g/2}, ${g/2})`);return x&&"handDrawn"!==e.look&&M.selectChildren("path").attr("style",x),l&&"handDrawn"!==e.look&&M.selectChildren("path").attr("style",l),e.width=o,e.height=g,y(e,M),s.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-g/2+(e.padding??0)/2+(n.y-(n.top??0))})`),e.intersect=function(t){return h.Rm.info("Triangle intersect",e,m,t),X.polygon(e,m,t)},i}function ts(t,e,{dir:a,config:{state:l,themeVariables:i}}){let{nodeStyles:n}=(0,r.GX)(e);e.label="";let s=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:h}=e,o=Math.max(70,e?.width??0),c=Math.max(10,e?.height??0);"LR"===a&&(o=Math.max(10,e?.width??0),c=Math.max(70,e?.height??0));let g=-1*o/2,p=-1*c/2,u=d.A.svg(s),m=(0,r.Fr)(e,{stroke:i.lineColor,fill:i.lineColor});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");let x=u.rectangle(g,p,o,c,m),w=s.insert(()=>x,":first-child");h&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",h),n&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",n),y(e,w);let b=l?.padding??0;return e.width&&e.height&&(e.width+=b/2||0,e.height+=b/2||0),e.intersect=function(t){return X.rect(e,t)},s}async function th(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await c(t,e,f(e)),s=Math.max(80,n.width+(e.padding??0)*2,e?.width??0),o=Math.max(50,n.height+(e.padding??0)*2,e?.height??0),g=o/2,{cssStyles:u}=e,x=d.A.svg(i),w=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let b=[{x:-s/2,y:-o/2},{x:s/2-g,y:-o/2},...m(-s/2+g,0,g,50,90,270),{x:s/2-g,y:o/2},{x:-s/2,y:o/2}],$=p(b),k=x.path($,w),M=i.insert(()=>k,":first-child");return M.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&M.selectChildren("path").attr("style",u),l&&"handDrawn"!==e.look&&M.selectChildren("path").attr("style",l),y(e,M),e.intersect=function(t){return h.Rm.info("Pill intersect",e,{radius:g,point:t}),X.polygon(e,b,t)},i}async function to(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await c(t,e,f(e)),s=n.height+(e.padding??0),h=n.width+(e.padding??0)*2.5,{cssStyles:o}=e,g=d.A.svg(i),u=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");let m=h/2,x=m/6,w=s/2,b=(m+=x)-w/2,$=[{x:-b,y:-w},{x:0,y:-w},{x:b,y:-w},{x:m,y:0},{x:b,y:w},{x:0,y:w},{x:-b,y:w},{x:-m,y:0}],k=p($),M=g.path(k,u),S=i.insert(()=>M,":first-child");return S.attr("class","basic label-container"),o&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",o),l&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",l),e.width=h,e.height=s,y(e,S),e.intersect=function(t){return X.polygon(e,$,t)},i}async function td(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.label="",e.labelStyle=a;let{shapeSvg:i}=await c(t,e,f(e)),n=Math.max(30,e?.width??0),s=Math.max(30,e?.height??0),{cssStyles:o}=e,g=d.A.svg(i),u=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");let m=[{x:0,y:0},{x:n,y:0},{x:0,y:s},{x:n,y:s}],x=p(m),w=g.path(x,u),b=i.insert(()=>w,":first-child");return b.attr("class","basic label-container"),o&&"handDrawn"!==e.look&&b.selectChildren("path").attr("style",o),l&&"handDrawn"!==e.look&&b.selectChildren("path").attr("style",l),b.attr("transform",`translate(${-n/2}, ${-s/2})`),y(e,b),e.intersect=function(t){return h.Rm.info("Pill intersect",e,{points:m}),X.polygon(e,m,t)},i}async function tc(t,e,{config:{themeVariables:a,flowchart:l}}){let{labelStyles:n}=(0,r.GX)(e);e.labelStyle=n;let s=Math.max(e.assetHeight??48,e.assetWidth??48);e.width=Math.max(s,l?.wrappingWidth??0);let{shapeSvg:o,bbox:g,label:f}=await c(t,e,"icon-shape default"),p="t"===e.pos,{nodeBorder:u}=a,{stylesMap:m}=(0,r.WW)(e),x=-s/2,w=-s/2,b=8*!!e.label,$=d.A.svg(o),k=(0,r.Fr)(e,{stroke:"none",fill:"none"});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=$.rectangle(x,w,s,s,k),S=Math.max(s,g.width),D=s+g.height+b,A=$.rectangle(-S/2,-D/2,S,D,{...k,fill:"transparent",stroke:"none"}),v=o.insert(()=>M,":first-child"),C=o.insert(()=>A);if(e.icon){let t=o.append("g");t.html(`<g>${await (0,i.WY)(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);let a=t.node().getBBox(),l=a.width,r=a.height,n=a.x,h=a.y;t.attr("transform",`translate(${-l/2-n},${p?g.height/2+b/2-r/2-h:-g.height/2-b/2-r/2-h})`),t.attr("style",`color: ${m.get("stroke")??u};`)}return f.attr("transform",`translate(${-g.width/2-(g.x-(g.left??0))},${p?-D/2:D/2-g.height})`),v.attr("transform",`translate(0,${p?g.height/2+b/2:-g.height/2-b/2})`),y(e,C),e.intersect=function(t){if(h.Rm.info("iconSquare intersect",e,t),!e.label)return X.rect(e,t);let a=e.x??0,l=e.y??0,r=e.height??0,i=[];return i=p?[{x:a-g.width/2,y:l-r/2},{x:a+g.width/2,y:l-r/2},{x:a+g.width/2,y:l-r/2+g.height+b},{x:a+s/2,y:l-r/2+g.height+b},{x:a+s/2,y:l+r/2},{x:a-s/2,y:l+r/2},{x:a-s/2,y:l-r/2+g.height+b},{x:a-g.width/2,y:l-r/2+g.height+b}]:[{x:a-s/2,y:l-r/2},{x:a+s/2,y:l-r/2},{x:a+s/2,y:l-r/2+s},{x:a+g.width/2,y:l-r/2+s},{x:a+g.width/2/2,y:l+r/2},{x:a-g.width/2,y:l+r/2},{x:a-g.width/2,y:l-r/2+s},{x:a-s/2,y:l-r/2+s}],X.polygon(e,i,t)},o}async function tg(t,e,{config:{themeVariables:a,flowchart:l}}){let{labelStyles:n}=(0,r.GX)(e);e.labelStyle=n;let s=Math.max(e.assetHeight??48,e.assetWidth??48);e.width=Math.max(s,l?.wrappingWidth??0);let{shapeSvg:o,bbox:g,label:f}=await c(t,e,"icon-shape default"),p=8*!!e.label,u="t"===e.pos,{nodeBorder:m,mainBkg:x}=a,{stylesMap:w}=(0,r.WW)(e),b=d.A.svg(o),$=(0,r.Fr)(e,{});"handDrawn"!==e.look&&($.roughness=0,$.fillStyle="solid"),$.stroke=w.get("fill")??x;let k=o.append("g");e.icon&&k.html(`<g>${await (0,i.WY)(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);let M=k.node().getBBox(),S=M.width,D=M.height,A=M.x,v=M.y,C=Math.max(S,D)*Math.SQRT2+40,K=b.circle(0,0,C,$),B=Math.max(C,g.width),N=C+g.height+p,L=b.rectangle(-B/2,-N/2,B,N,{...$,fill:"transparent",stroke:"none"}),R=o.insert(()=>K,":first-child"),F=o.insert(()=>L);return k.attr("transform",`translate(${-S/2-A},${u?g.height/2+p/2-D/2-v:-g.height/2-p/2-D/2-v})`),k.attr("style",`color: ${w.get("stroke")??m};`),f.attr("transform",`translate(${-g.width/2-(g.x-(g.left??0))},${u?-N/2:N/2-g.height})`),R.attr("transform",`translate(0,${u?g.height/2+p/2:-g.height/2-p/2})`),y(e,F),e.intersect=function(t){return h.Rm.info("iconSquare intersect",e,t),X.rect(e,t)},o}async function ty(t,e,{config:{themeVariables:a,flowchart:l}}){let{labelStyles:n}=(0,r.GX)(e);e.labelStyle=n;let s=Math.max(e.assetHeight??48,e.assetWidth??48);e.width=Math.max(s,l?.wrappingWidth??0);let{shapeSvg:o,bbox:g,halfPadding:f,label:p}=await c(t,e,"icon-shape default"),u="t"===e.pos,m=s+2*f,x=s+2*f,{nodeBorder:w,mainBkg:b}=a,{stylesMap:$}=(0,r.WW)(e),M=8*!!e.label,S=d.A.svg(o),D=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(D.roughness=0,D.fillStyle="solid"),D.stroke=$.get("fill")??b;let A=S.path(k(-x/2,-m/2,x,m,5),D),v=Math.max(x,g.width),C=m+g.height+M,K=S.rectangle(-v/2,-C/2,v,C,{...D,fill:"transparent",stroke:"none"}),B=o.insert(()=>A,":first-child").attr("class","icon-shape2"),N=o.insert(()=>K);if(e.icon){let t=o.append("g");t.html(`<g>${await (0,i.WY)(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);let a=t.node().getBBox(),l=a.width,r=a.height,n=a.x,h=a.y;t.attr("transform",`translate(${-l/2-n},${u?g.height/2+M/2-r/2-h:-g.height/2-M/2-r/2-h})`),t.attr("style",`color: ${$.get("stroke")??w};`)}return p.attr("transform",`translate(${-g.width/2-(g.x-(g.left??0))},${u?-C/2:C/2-g.height})`),B.attr("transform",`translate(0,${u?g.height/2+M/2:-g.height/2-M/2})`),y(e,N),e.intersect=function(t){if(h.Rm.info("iconSquare intersect",e,t),!e.label)return X.rect(e,t);let a=e.x??0,l=e.y??0,r=e.height??0,i=[];return i=u?[{x:a-g.width/2,y:l-r/2},{x:a+g.width/2,y:l-r/2},{x:a+g.width/2,y:l-r/2+g.height+M},{x:a+x/2,y:l-r/2+g.height+M},{x:a+x/2,y:l+r/2},{x:a-x/2,y:l+r/2},{x:a-x/2,y:l-r/2+g.height+M},{x:a-g.width/2,y:l-r/2+g.height+M}]:[{x:a-x/2,y:l-r/2},{x:a+x/2,y:l-r/2},{x:a+x/2,y:l-r/2+m},{x:a+g.width/2,y:l-r/2+m},{x:a+g.width/2/2,y:l+r/2},{x:a-g.width/2,y:l+r/2},{x:a-g.width/2,y:l-r/2+m},{x:a-x/2,y:l-r/2+m}],X.polygon(e,i,t)},o}async function tf(t,e,{config:{themeVariables:a,flowchart:l}}){let{labelStyles:n}=(0,r.GX)(e);e.labelStyle=n;let s=Math.max(e.assetHeight??48,e.assetWidth??48);e.width=Math.max(s,l?.wrappingWidth??0);let{shapeSvg:o,bbox:g,halfPadding:f,label:p}=await c(t,e,"icon-shape default"),u="t"===e.pos,m=s+2*f,x=s+2*f,{nodeBorder:w,mainBkg:b}=a,{stylesMap:$}=(0,r.WW)(e),M=8*!!e.label,S=d.A.svg(o),D=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(D.roughness=0,D.fillStyle="solid"),D.stroke=$.get("fill")??b;let A=S.path(k(-x/2,-m/2,x,m,.1),D),v=Math.max(x,g.width),C=m+g.height+M,K=S.rectangle(-v/2,-C/2,v,C,{...D,fill:"transparent",stroke:"none"}),B=o.insert(()=>A,":first-child"),N=o.insert(()=>K);if(e.icon){let t=o.append("g");t.html(`<g>${await (0,i.WY)(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);let a=t.node().getBBox(),l=a.width,r=a.height,n=a.x,h=a.y;t.attr("transform",`translate(${-l/2-n},${u?g.height/2+M/2-r/2-h:-g.height/2-M/2-r/2-h})`),t.attr("style",`color: ${$.get("stroke")??w};`)}return p.attr("transform",`translate(${-g.width/2-(g.x-(g.left??0))},${u?-C/2:C/2-g.height})`),B.attr("transform",`translate(0,${u?g.height/2+M/2:-g.height/2-M/2})`),y(e,N),e.intersect=function(t){if(h.Rm.info("iconSquare intersect",e,t),!e.label)return X.rect(e,t);let a=e.x??0,l=e.y??0,r=e.height??0,i=[];return i=u?[{x:a-g.width/2,y:l-r/2},{x:a+g.width/2,y:l-r/2},{x:a+g.width/2,y:l-r/2+g.height+M},{x:a+x/2,y:l-r/2+g.height+M},{x:a+x/2,y:l+r/2},{x:a-x/2,y:l+r/2},{x:a-x/2,y:l-r/2+g.height+M},{x:a-g.width/2,y:l-r/2+g.height+M}]:[{x:a-x/2,y:l-r/2},{x:a+x/2,y:l-r/2},{x:a+x/2,y:l-r/2+m},{x:a+g.width/2,y:l-r/2+m},{x:a+g.width/2/2,y:l+r/2},{x:a-g.width/2,y:l+r/2},{x:a-g.width/2,y:l-r/2+m},{x:a-x/2,y:l-r/2+m}],X.polygon(e,i,t)},o}async function tp(t,e,{config:{flowchart:a}}){let l=new Image;l.src=e?.img??"",await l.decode();let i=Number(l.naturalWidth.toString().replace("px","")),n=Number(l.naturalHeight.toString().replace("px",""));e.imageAspectRatio=i/n;let{labelStyles:s}=(0,r.GX)(e);e.labelStyle=s;let o=a?.wrappingWidth;e.defaultWidth=a?.wrappingWidth;let g=Math.max(e.label?o??0:0,e?.assetWidth??i),f="on"===e.constraint&&e?.assetHeight?e.assetHeight*e.imageAspectRatio:g,p="on"===e.constraint?f/e.imageAspectRatio:e?.assetHeight??n;e.width=Math.max(f,o??0);let{shapeSvg:u,bbox:m,label:x}=await c(t,e,"image-shape default"),w="t"===e.pos,b=-f/2,$=8*!!e.label,k=d.A.svg(u),M=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(M.roughness=0,M.fillStyle="solid");let S=k.rectangle(b,-p/2,f,p,M),D=Math.max(f,m.width),A=p+m.height+$,v=k.rectangle(-D/2,-A/2,D,A,{...M,fill:"none",stroke:"none"}),C=u.insert(()=>S,":first-child"),K=u.insert(()=>v);if(e.img){let t=u.append("image");t.attr("href",e.img),t.attr("width",f),t.attr("height",p),t.attr("preserveAspectRatio","none"),t.attr("transform",`translate(${-f/2},${w?A/2-p:-A/2})`)}return x.attr("transform",`translate(${-m.width/2-(m.x-(m.left??0))},${w?-p/2-m.height/2-$/2:p/2-m.height/2+$/2})`),C.attr("transform",`translate(0,${w?m.height/2+$/2:-m.height/2-$/2})`),y(e,K),e.intersect=function(t){if(h.Rm.info("iconSquare intersect",e,t),!e.label)return X.rect(e,t);let a=e.x??0,l=e.y??0,r=e.height??0,i=[];return i=w?[{x:a-m.width/2,y:l-r/2},{x:a+m.width/2,y:l-r/2},{x:a+m.width/2,y:l-r/2+m.height+$},{x:a+f/2,y:l-r/2+m.height+$},{x:a+f/2,y:l+r/2},{x:a-f/2,y:l+r/2},{x:a-f/2,y:l-r/2+m.height+$},{x:a-m.width/2,y:l-r/2+m.height+$}]:[{x:a-f/2,y:l-r/2},{x:a+f/2,y:l-r/2},{x:a+f/2,y:l-r/2+p},{x:a+m.width/2,y:l-r/2+p},{x:a+m.width/2/2,y:l+r/2},{x:a-m.width/2,y:l+r/2},{x:a-m.width/2,y:l-r/2+p},{x:a-f/2,y:l-r/2+p}],X.polygon(e,i,t)},u}async function tu(t,e){let a,{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:n,bbox:s}=await c(t,e,f(e)),h=Math.max(s.width+(e.padding??0)*2,e?.width??0),o=Math.max(s.height+(e.padding??0)*2,e?.height??0),g=[{x:0,y:0},{x:h,y:0},{x:h+3*o/6,y:-o},{x:-3*o/6,y:-o}],{cssStyles:u}=e;if("handDrawn"===e.look){let t=d.A.svg(n),l=(0,r.Fr)(e,{}),i=p(g),s=t.path(i,l);a=n.insert(()=>s,":first-child").attr("transform",`translate(${-h/2}, ${o/2})`),u&&a.attr("style",u)}else a=W(n,h,o,g);return i&&a.attr("style",i),e.width=h,e.height=o,y(e,a),e.intersect=function(t){return X.polygon(e,g,t)},n}async function tm(t,e,a){let l,{labelStyles:i,nodeStyles:s}=(0,r.GX)(e);e.labelStyle=i;let{shapeSvg:h,bbox:o}=await c(t,e,f(e)),g=Math.max(o.width+2*a.labelPaddingX,e?.width||0),p=Math.max(o.height+2*a.labelPaddingY,e?.height||0),u=-g/2,m=-p/2,{rx:x,ry:w}=e,{cssStyles:b}=e;if(a?.rx&&a.ry&&(x=a.rx,w=a.ry),"handDrawn"===e.look){let t=d.A.svg(h),a=(0,r.Fr)(e,{}),i=x||w?t.path(k(u,m,g,p,x||0),a):t.rectangle(u,m,g,p,a);(l=h.insert(()=>i,":first-child")).attr("class","basic label-container").attr("style",(0,n.KL)(b))}else(l=h.insert("rect",":first-child")).attr("class","basic label-container").attr("style",s).attr("rx",(0,n.KL)(x)).attr("ry",(0,n.KL)(w)).attr("x",u).attr("y",m).attr("width",g).attr("height",p);return y(e,l),e.calcIntersect=function(t,e){return X.rect(t,e)},e.intersect=function(t){return X.rect(e,t)},h}async function tx(t,e){let{shapeSvg:a,bbox:l,label:r}=await c(t,e,"label"),i=a.insert("rect",":first-child");return i.attr("width",.1).attr("height",.1),a.attr("class","label edgeLabel"),r.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),y(e,i),e.intersect=function(t){return X.rect(e,t)},a}async function tw(t,e){let a,{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:n,bbox:s}=await c(t,e,f(e)),h=Math.max(s.width+(e.padding??0),e?.width??0),o=Math.max(s.height+(e.padding??0),e?.height??0),g=[{x:0,y:0},{x:h+3*o/6,y:0},{x:h,y:-o},{x:-(3*o)/6,y:-o}],{cssStyles:u}=e;if("handDrawn"===e.look){let t=d.A.svg(n),l=(0,r.Fr)(e,{}),i=p(g),s=t.path(i,l);a=n.insert(()=>s,":first-child").attr("transform",`translate(${-h/2}, ${o/2})`),u&&a.attr("style",u)}else a=W(n,h,o,g);return i&&a.attr("style",i),e.width=h,e.height=o,y(e,a),e.intersect=function(t){return X.polygon(e,g,t)},n}async function tb(t,e){let a,{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:n,bbox:s}=await c(t,e,f(e)),h=Math.max(s.width+(e.padding??0),e?.width??0),o=Math.max(s.height+(e.padding??0),e?.height??0),g=[{x:-3*o/6,y:0},{x:h,y:0},{x:h+3*o/6,y:-o},{x:0,y:-o}],{cssStyles:u}=e;if("handDrawn"===e.look){let t=d.A.svg(n),l=(0,r.Fr)(e,{}),i=p(g),s=t.path(i,l);a=n.insert(()=>s,":first-child").attr("transform",`translate(${-h/2}, ${o/2})`),u&&a.attr("style",u)}else a=W(n,h,o,g);return i&&a.attr("style",i),e.width=h,e.height=o,y(e,a),e.intersect=function(t){return X.polygon(e,g,t)},n}function t$(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.label="",e.labelStyle=a;let i=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:n}=e,s=Math.max(35,e?.width??0),o=Math.max(35,e?.height??0),c=[{x:s,y:0},{x:0,y:o+3.5},{x:s-14,y:o+3.5},{x:0,y:2*o},{x:s,y:o-3.5},{x:14,y:o-3.5}],g=d.A.svg(i),u=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");let m=p(c),x=g.path(m,u),w=i.insert(()=>x,":first-child");return n&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",n),l&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",l),w.attr("transform",`translate(-${s/2},${-o})`),y(e,w),e.intersect=function(t){return h.Rm.info("lightningBolt intersect",e,t),X.polygon(e,c,t)},i}(0,h.K2)(ta,"cylinder"),(0,h.K2)(tl,"dividedRectangle"),(0,h.K2)(tr,"doublecircle"),(0,h.K2)(ti,"filledCircle"),(0,h.K2)(tn,"flippedTriangle"),(0,h.K2)(ts,"forkJoin"),(0,h.K2)(th,"halfRoundedRectangle"),(0,h.K2)(to,"hexagon"),(0,h.K2)(td,"hourglass"),(0,h.K2)(tc,"icon"),(0,h.K2)(tg,"iconCircle"),(0,h.K2)(ty,"iconRounded"),(0,h.K2)(tf,"iconSquare"),(0,h.K2)(tp,"imageSquare"),(0,h.K2)(tu,"inv_trapezoid"),(0,h.K2)(tm,"drawRect"),(0,h.K2)(tx,"labelRect"),(0,h.K2)(tw,"lean_left"),(0,h.K2)(tb,"lean_right"),(0,h.K2)(t$,"lightningBolt");var tk=(0,h.K2)((t,e,a,l,r,i,n)=>`M${t},${e+i} a${r},${i} 0,0,0 ${a},0 a${r},${i} 0,0,0 ${-a},0 l0,${l} a${r},${i} 0,0,0 ${a},0 l0,${-l} M${t},${e+i+n} a${r},${i} 0,0,0 ${a},0`,"createCylinderPathD"),tM=(0,h.K2)((t,e,a,l,r,i,n)=>`M${t},${e+i} M${t+a},${e+i} a${r},${i} 0,0,0 ${-a},0 l0,${l} a${r},${i} 0,0,0 ${a},0 l0,${-l} M${t},${e+i+n} a${r},${i} 0,0,0 ${a},0`,"createOuterCylinderPathD"),tS=(0,h.K2)((t,e,a,l,r,i)=>`M${t-a/2},${-l/2} a${r},${i} 0,0,0 ${a},0`,"createInnerCylinderPathD");async function tD(t,e){let a,{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:s,bbox:h,label:o}=await c(t,e,f(e)),g=Math.max(h.width+(e.padding??0),e.width??0),p=g/2,u=p/(2.5+g/50),m=Math.max(h.height+u+(e.padding??0),e.height??0),x=.1*m,{cssStyles:w}=e;if("handDrawn"===e.look){let t=d.A.svg(s),l=tM(0,0,g,m,p,u,x),i=tS(0,u,g,m,p,u),n=(0,r.Fr)(e,{}),h=t.path(l,n),o=t.path(i,n);s.insert(()=>o,":first-child").attr("class","line"),(a=s.insert(()=>h,":first-child")).attr("class","basic label-container"),w&&a.attr("style",w)}else{let t=tk(0,0,g,m,p,u,x);a=s.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,n.KL)(w)).attr("style",i)}return a.attr("label-offset-y",u),a.attr("transform",`translate(${-g/2}, ${-(m/2+u)})`),y(e,a),o.attr("transform",`translate(${-(h.width/2)-(h.x-(h.left??0))}, ${-(h.height/2)+u-(h.y-(h.top??0))})`),e.intersect=function(t){let a=X.rect(e,t),l=a.x-(e.x??0);if(0!=p&&(Math.abs(l)<(e.width??0)/2||Math.abs(l)==(e.width??0)/2&&Math.abs(a.y-(e.y??0))>(e.height??0)/2-u)){let r=u*u*(1-l*l/(p*p));r>0&&(r=Math.sqrt(r)),r=u-r,t.y-(e.y??0)>0&&(r=-r),a.y+=r}return a},s}async function tA(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=Math.max(n.width+(e.padding??0)*2,e?.width??0),o=Math.max(n.height+(e.padding??0)*2,e?.height??0),g=o/4,p=o+g,{cssStyles:m}=e,x=d.A.svg(i),w=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let b=[{x:-h/2-h/2*.1,y:-p/2},{x:-h/2-h/2*.1,y:p/2},...u(-h/2-h/2*.1,p/2,h/2+h/2*.1,p/2,g,.8),{x:h/2+h/2*.1,y:-p/2},{x:-h/2-h/2*.1,y:-p/2},{x:-h/2,y:-p/2},{x:-h/2,y:p/2*1.1},{x:-h/2,y:-p/2}],$=x.polygon(b.map(t=>[t.x,t.y]),w),k=i.insert(()=>$,":first-child");return k.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",m),l&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",l),k.attr("transform",`translate(0,${-g/2})`),s.attr("transform",`translate(${-h/2+(e.padding??0)+h/2*.1/2-(n.x-(n.left??0))},${-o/2+(e.padding??0)-g/2-(n.y-(n.top??0))})`),y(e,k),e.intersect=function(t){return X.polygon(e,b,t)},i}async function tv(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=Math.max(n.width+(e.padding??0)*2,e?.width??0),o=Math.max(n.height+(e.padding??0)*2,e?.height??0),g=-h/2,u=-o/2,{cssStyles:m}=e,x=d.A.svg(i),w=(0,r.Fr)(e,{}),b=[{x:g-5,y:u+5},{x:g-5,y:u+o+5},{x:g+h-5,y:u+o+5},{x:g+h-5,y:u+o},{x:g+h,y:u+o},{x:g+h,y:u+o-5},{x:g+h+5,y:u+o-5},{x:g+h+5,y:u-5},{x:g+5,y:u-5},{x:g+5,y:u},{x:g,y:u},{x:g,y:u+5}];"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let $=p(b),k=x.path($,w),M=p([{x:g,y:u+5},{x:g+h-5,y:u+5},{x:g+h-5,y:u+o},{x:g+h,y:u+o},{x:g+h,y:u},{x:g,y:u}]),S=x.path(M,{...w,fill:"none"}),D=i.insert(()=>S,":first-child");return D.insert(()=>k,":first-child"),D.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",m),l&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",l),s.attr("transform",`translate(${-(n.width/2)-5-(n.x-(n.left??0))}, ${-(n.height/2)+5-(n.y-(n.top??0))})`),y(e,D),e.intersect=function(t){return X.polygon(e,b,t)},i}async function tC(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=Math.max(n.width+(e.padding??0)*2,e?.width??0),o=Math.max(n.height+(e.padding??0)*2,e?.height??0),g=o/4,m=o+g,x=-h/2,w=-m/2,{cssStyles:b}=e,$=u(x-5,w+m+5,x+h-5,w+m+5,g,.8),k=$?.[$.length-1],M=[{x:x-5,y:w+5},{x:x-5,y:w+m+5},...$,{x:x+h-5,y:k.y-5},{x:x+h,y:k.y-5},{x:x+h,y:k.y-10},{x:x+h+5,y:k.y-10},{x:x+h+5,y:w-5},{x:x+5,y:w-5},{x:x+5,y:w},{x,y:w},{x,y:w+5}],S=[{x,y:w+5},{x:x+h-5,y:w+5},{x:x+h-5,y:k.y-5},{x:x+h,y:k.y-5},{x:x+h,y:w},{x,y:w}],D=d.A.svg(i),A=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(A.roughness=0,A.fillStyle="solid");let v=p(M),C=D.path(v,A),K=p(S),B=D.path(K,A),N=i.insert(()=>C,":first-child");return N.insert(()=>B),N.attr("class","basic label-container"),b&&"handDrawn"!==e.look&&N.selectAll("path").attr("style",b),l&&"handDrawn"!==e.look&&N.selectAll("path").attr("style",l),N.attr("transform",`translate(0,${-g/2})`),s.attr("transform",`translate(${-(n.width/2)-5-(n.x-(n.left??0))}, ${-(n.height/2)+5-g/2-(n.y-(n.top??0))})`),y(e,N),e.intersect=function(t){return X.polygon(e,M,t)},i}async function tK(t,e,{config:{themeVariables:a}}){let{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l,e.useHtmlLabels||(0,s.zj)().flowchart?.htmlLabels!==!1||(e.centerLabel=!0);let{shapeSvg:n,bbox:h,label:o}=await c(t,e,f(e)),g=Math.max(h.width+(e.padding??0)*2,e?.width??0),p=Math.max(h.height+(e.padding??0)*2,e?.height??0),{cssStyles:u}=e,m=d.A.svg(n),x=(0,r.Fr)(e,{fill:a.noteBkgColor,stroke:a.noteBorderColor});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");let w=m.rectangle(-g/2,-p/2,g,p,x),b=n.insert(()=>w,":first-child");return b.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",u),i&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",i),o.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),y(e,b),e.intersect=function(t){return X.rect(e,t)},n}(0,h.K2)(tD,"linedCylinder"),(0,h.K2)(tA,"linedWaveEdgedRect"),(0,h.K2)(tv,"multiRect"),(0,h.K2)(tC,"multiWaveEdgedRectangle"),(0,h.K2)(tK,"note");var tB=(0,h.K2)((t,e,a)=>`M${t+a/2},${e} L${t+a},${e-a/2} L${t+a/2},${e-a} L${t},${e-a/2} Z`,"createDecisionBoxPathD");async function tN(t,e){let a,{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:n,bbox:s}=await c(t,e,f(e)),h=s.width+e.padding+(s.height+e.padding),o=[{x:h/2,y:0},{x:h,y:-h/2},{x:h/2,y:-h},{x:0,y:-h/2}],{cssStyles:g}=e;if("handDrawn"===e.look){let t=d.A.svg(n),l=(0,r.Fr)(e,{}),i=tB(0,0,h),s=t.path(i,l);a=n.insert(()=>s,":first-child").attr("transform",`translate(${-h/2+.5}, ${h/2})`),g&&a.attr("style",g)}else(a=W(n,h,h,o)).attr("transform",`translate(${-h/2+.5}, ${h/2})`);return i&&a.attr("style",i),y(e,a),e.calcIntersect=function(t,e){let a=t.width,l=X.polygon(t,[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}],e);return{x:l.x-.5,y:l.y-.5}},e.intersect=function(t){return this.calcIntersect(e,t)},n}async function tL(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=Math.max(n.width+(e.padding??0),e?.width??0),o=Math.max(n.height+(e.padding??0),e?.height??0),g=-h/2,u=-o/2,m=u/2,x=[{x:g+m,y:u},{x:g,y:0},{x:g+m,y:-u},{x:-g,y:-u},{x:-g,y:u}],{cssStyles:w}=e,b=d.A.svg(i),$=(0,r.Fr)(e,{});"handDrawn"!==e.look&&($.roughness=0,$.fillStyle="solid");let k=p(x),M=b.path(k,$),S=i.insert(()=>M,":first-child");return S.attr("class","basic label-container"),w&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",w),l&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",l),S.attr("transform",`translate(${-m/2},0)`),s.attr("transform",`translate(${-m/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),y(e,S),e.intersect=function(t){return X.polygon(e,x,t)},i}async function tR(t,e){let a,l,i,{labelStyles:n,nodeStyles:c}=(0,r.GX)(e);e.labelStyle=n,a=e.cssClasses?"node "+e.cssClasses:"node default";let g=t.insert("g").attr("class",a).attr("id",e.domId||e.id),f=g.insert("g"),p=g.insert("g").attr("class","label").attr("style",c),u=e.description,m=e.label,x=p.node().appendChild(await $(m,e.labelStyle,!0,!0)),w={width:0,height:0};if((0,s._3)((0,s.D7)()?.flowchart?.htmlLabels)){let t=x.children[0],e=(0,o.Ltv)(x);w=t.getBoundingClientRect(),e.attr("width",w.width),e.attr("height",w.height)}h.Rm.info("Text 2",u);let b=u||[],M=x.getBBox(),S=p.node().appendChild(await $(b.join?b.join("<br/>"):b,e.labelStyle,!0,!0)),D=S.children[0],A=(0,o.Ltv)(S);w=D.getBoundingClientRect(),A.attr("width",w.width),A.attr("height",w.height);let v=(e.padding||0)/2;(0,o.Ltv)(S).attr("transform","translate( "+(w.width>M.width?0:(M.width-w.width)/2)+", "+(M.height+v+5)+")"),(0,o.Ltv)(x).attr("transform","translate( "+(w.width<M.width?0:-(M.width-w.width)/2)+", 0)"),w=p.node().getBBox(),p.attr("transform","translate("+-w.width/2+", "+(-w.height/2-v+3)+")");let C=w.width+(e.padding||0),K=w.height+(e.padding||0),B=-w.width/2-v,N=-w.height/2-v;if("handDrawn"===e.look){let t=d.A.svg(g),a=(0,r.Fr)(e,{}),n=t.path(k(B,N,C,K,e.rx||0),a),s=t.line(-w.width/2-v,-w.height/2-v+M.height+v,w.width/2+v,-w.height/2-v+M.height+v,a);i=g.insert(()=>(h.Rm.debug("Rough node insert CXC",n),s),":first-child"),l=g.insert(()=>(h.Rm.debug("Rough node insert CXC",n),n),":first-child")}else l=f.insert("rect",":first-child"),i=f.insert("line"),l.attr("class","outer title-state").attr("style",c).attr("x",-w.width/2-v).attr("y",-w.height/2-v).attr("width",w.width+(e.padding||0)).attr("height",w.height+(e.padding||0)),i.attr("class","divider").attr("x1",-w.width/2-v).attr("x2",w.width/2+v).attr("y1",-w.height/2-v+M.height+v).attr("y2",-w.height/2-v+M.height+v);return y(e,l),e.intersect=function(t){return X.rect(e,t)},g}function tF(t,e,a,l,r,i,n){let s=Math.atan2(l-e,a-t),h=Math.sqrt(((a-t)/2/r)**2+((l-e)/2/i)**2);if(h>1)throw Error("The given radii are too small to create an arc between the points.");let o=Math.sqrt(1-h**2),d=(t+a)/2+o*i*Math.sin(s)*(n?-1:1),c=(e+l)/2-o*r*Math.cos(s)*(n?-1:1),g=Math.atan2((e-c)/i,(t-d)/r),y=Math.atan2((l-c)/i,(a-d)/r)-g;n&&y<0&&(y+=2*Math.PI),!n&&y>0&&(y-=2*Math.PI);let f=[];for(let t=0;t<20;t++){let e=g+t/19*y,a=d+r*Math.cos(e),l=c+i*Math.sin(e);f.push({x:a,y:l})}return f}async function tP(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await c(t,e,f(e)),s=e?.padding??0,h=e?.padding??0,o=(e?.width?e?.width:n.width)+2*s,g=(e?.height?e?.height:n.height)+2*h,u=e.radius||5,m=e.taper||5,{cssStyles:x}=e,w=d.A.svg(i),b=(0,r.Fr)(e,{});e.stroke&&(b.stroke=e.stroke),"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let $=[{x:-o/2+m,y:-g/2},{x:o/2-m,y:-g/2},...tF(o/2-m,-g/2,o/2,-g/2+m,u,u,!0),{x:o/2,y:-g/2+m},{x:o/2,y:g/2-m},...tF(o/2,g/2-m,o/2-m,g/2,u,u,!0),{x:o/2-m,y:g/2},{x:-o/2+m,y:g/2},...tF(-o/2+m,g/2,-o/2,g/2-m,u,u,!0),{x:-o/2,y:g/2-m},{x:-o/2,y:-g/2+m},...tF(-o/2,-g/2+m,-o/2+m,-g/2,u,u,!0)],k=p($),M=w.path(k,b),S=i.insert(()=>M,":first-child");return S.attr("class","basic label-container outer-path"),x&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",x),l&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",l),y(e,S),e.intersect=function(t){return X.polygon(e,$,t)},i}async function tX(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:s,label:h}=await c(t,e,f(e)),o=e?.padding??0,g=Math.max(s.width+(e.padding??0)*2,e?.width??0),p=Math.max(s.height+(e.padding??0)*2,e?.height??0),u=-s.width/2-o,m=-s.height/2-o,{cssStyles:x}=e,w=d.A.svg(i),b=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let $=w.polygon([{x:u,y:m},{x:u+g+8,y:m},{x:u+g+8,y:m+p},{x:u-8,y:m+p},{x:u-8,y:m},{x:u,y:m},{x:u,y:m+p}].map(t=>[t.x,t.y]),b),k=i.insert(()=>$,":first-child");return k.attr("class","basic label-container").attr("style",(0,n.KL)(x)),l&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",l),x&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",l),h.attr("transform",`translate(${-g/2+4+(e.padding??0)-(s.x-(s.left??0))},${-p/2+(e.padding??0)-(s.y-(s.top??0))})`),y(e,k),e.intersect=function(t){return X.rect(e,t)},i}async function tG(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=Math.max(n.width+(e.padding??0)*2,e?.width??0),o=Math.max(n.height+(e.padding??0)*2,e?.height??0),g=-h/2,u=-o/2,{cssStyles:m}=e,x=d.A.svg(i),w=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let b=[{x:g,y:u},{x:g,y:u+o},{x:g+h,y:u+o},{x:g+h,y:u-o/2}],$=p(b),k=x.path($,w),M=i.insert(()=>k,":first-child");return M.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&M.selectChildren("path").attr("style",m),l&&"handDrawn"!==e.look&&M.selectChildren("path").attr("style",l),M.attr("transform",`translate(0, ${o/4})`),s.attr("transform",`translate(${-h/2+(e.padding??0)-(n.x-(n.left??0))}, ${-o/4+(e.padding??0)-(n.y-(n.top??0))})`),y(e,M),e.intersect=function(t){return X.polygon(e,b,t)},i}async function tI(t,e){let a={rx:0,ry:0,classes:"",labelPaddingX:e.labelPaddingX??2*(e?.padding||0),labelPaddingY:+(e?.padding||0)};return tm(t,e,a)}async function tT(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await c(t,e,f(e)),s=n.height+e.padding,h=n.width+s/4+e.padding,o=s/2,{cssStyles:g}=e,u=d.A.svg(i),x=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");let w=[{x:-h/2+o,y:-s/2},{x:h/2-o,y:-s/2},...m(-h/2+o,0,o,50,90,270),{x:h/2-o,y:s/2},...m(h/2-o,0,o,50,270,450)],b=p(w),$=u.path(b,x),k=i.insert(()=>$,":first-child");return k.attr("class","basic label-container outer-path"),g&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",g),l&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",l),y(e,k),e.intersect=function(t){return X.polygon(e,w,t)},i}async function tW(t,e){return tm(t,e,{rx:5,ry:5,classes:"flowchart-node"})}function t_(t,e,{config:{themeVariables:a}}){let{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{cssStyles:n}=e,{lineColor:s,stateBorder:h,nodeBorder:o}=a,c=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),g=d.A.svg(c),f=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");let p=g.circle(0,0,14,{...f,stroke:s,strokeWidth:2}),u=h??o,m=g.circle(0,0,5,{...f,fill:u,stroke:u,strokeWidth:2,fillStyle:"solid"}),x=c.insert(()=>p,":first-child");return x.insert(()=>m),n&&x.selectAll("path").attr("style",n),i&&x.selectAll("path").attr("style",i),y(e,x),e.intersect=function(t){return X.circle(e,7,t)},c}function tE(t,e,{config:{themeVariables:a}}){let l,{lineColor:i}=a,n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);if("handDrawn"===e.look){let t=d.A.svg(n).circle(0,0,14,(0,r.ue)(i));(l=n.insert(()=>t)).attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else(l=n.insert("circle",":first-child")).attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return y(e,l),e.intersect=function(t){return X.circle(e,7,t)},n}async function tH(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:s}=await c(t,e,f(e)),h=(e?.padding||0)/2,o=s.width+e.padding,g=s.height+e.padding,p=-s.width/2-h,u=-s.height/2-h,m=[{x:0,y:0},{x:o,y:0},{x:o,y:-g},{x:0,y:-g},{x:0,y:0},{x:-8,y:0},{x:o+8,y:0},{x:o+8,y:-g},{x:-8,y:-g},{x:-8,y:0}];if("handDrawn"===e.look){let t=d.A.svg(i),a=(0,r.Fr)(e,{}),l=t.rectangle(p-8,u,o+16,g,a),s=t.line(p,u,p,u+g,a),h=t.line(p+o,u,p+o,u+g,a);i.insert(()=>s,":first-child"),i.insert(()=>h,":first-child");let c=i.insert(()=>l,":first-child"),{cssStyles:f}=e;c.attr("class","basic label-container").attr("style",(0,n.KL)(f)),y(e,c)}else{let t=W(i,o,g,m);l&&t.attr("style",l),y(e,t)}return e.intersect=function(t){return X.polygon(e,m,t)},i}async function tj(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await c(t,e,f(e)),s=Math.max(n.width+(e.padding??0)*2,e?.width??0),h=Math.max(n.height+(e.padding??0)*2,e?.height??0),o=-s/2,g=-h/2,u=.2*h,{cssStyles:m}=e,x=d.A.svg(i),w=(0,r.Fr)(e,{}),b=[{x:o-u/2,y:g},{x:o+s+u/2,y:g},{x:o+s+u/2,y:g+h},{x:o-u/2,y:g+h}];"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let $=p(b),k=x.path($,w),M=p([{x:o+s-u/2,y:g+h},{x:o+s+u/2,y:g+h},{x:o+s+u/2,y:g+h-.2*h}]),S=x.path(M,{...w,fillStyle:"solid"}),D=i.insert(()=>S,":first-child");return D.insert(()=>k,":first-child"),D.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",m),l&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",l),y(e,D),e.intersect=function(t){return X.polygon(e,b,t)},i}async function tq(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=Math.max(n.width+(e.padding??0)*2,e?.width??0),o=Math.max(n.height+(e.padding??0)*2,e?.height??0),g=o/4,m=.2*h,x=.2*o,w=o+g,{cssStyles:b}=e,$=d.A.svg(i),k=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=[{x:-h/2-h/2*.1,y:w/2},...u(-h/2-h/2*.1,w/2,h/2+h/2*.1,w/2,g,.8),{x:h/2+h/2*.1,y:-w/2},{x:-h/2-h/2*.1,y:-w/2}],S=-h/2+h/2*.1,D=-w/2-.4*x,A=[{x:S+h-m,y:(D+o)*1.4},{x:S+h,y:D+o-x},{x:S+h,y:(D+o)*.9},...u(S+h,(D+o)*1.3,S+h-m,(D+o)*1.5,-(.03*o),.5)],v=p(M),C=$.path(v,k),K=p(A),B=$.path(K,{...k,fillStyle:"solid"}),N=i.insert(()=>B,":first-child");return N.insert(()=>C,":first-child"),N.attr("class","basic label-container"),b&&"handDrawn"!==e.look&&N.selectAll("path").attr("style",b),l&&"handDrawn"!==e.look&&N.selectAll("path").attr("style",l),N.attr("transform",`translate(0,${-g/2})`),s.attr("transform",`translate(${-h/2+(e.padding??0)-(n.x-(n.left??0))},${-o/2+(e.padding??0)-g/2-(n.y-(n.top??0))})`),y(e,N),e.intersect=function(t){return X.polygon(e,M,t)},i}async function tz(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await c(t,e,f(e)),s=Math.max(n.width+e.padding,e?.width||0),h=Math.max(n.height+e.padding,e?.height||0),o=i.insert("rect",":first-child");return o.attr("class","text").attr("style",l).attr("rx",0).attr("ry",0).attr("x",-s/2).attr("y",-h/2).attr("width",s).attr("height",h),y(e,o),e.intersect=function(t){return X.rect(e,t)},i}(0,h.K2)(tN,"question"),(0,h.K2)(tL,"rect_left_inv_arrow"),(0,h.K2)(tR,"rectWithTitle"),(0,h.K2)(tF,"generateArcPoints"),(0,h.K2)(tP,"roundedRect"),(0,h.K2)(tX,"shadedProcess"),(0,h.K2)(tG,"slopedRect"),(0,h.K2)(tI,"squareRect"),(0,h.K2)(tT,"stadium"),(0,h.K2)(tW,"state"),(0,h.K2)(t_,"stateEnd"),(0,h.K2)(tE,"stateStart"),(0,h.K2)(tH,"subroutine"),(0,h.K2)(tj,"taggedRect"),(0,h.K2)(tq,"taggedWaveEdgedRectangle"),(0,h.K2)(tz,"text");var tZ=(0,h.K2)((t,e,a,l,r,i)=>`M${t},${e}
|
|
3
3
|
a${r},${i} 0,0,1 0,${-l}
|
|
4
4
|
l${a},0
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[49858],{2971:(e,t,r)=>{r.d(t,{iO:()=>n});var a=r(60098),s=r(30712);let n="https://docs.inkeep.com";a.Fragment,s.G,a.Fragment,s.G,a.Fragment,s.G,a.Fragment,a.Fragment,a.Fragment,s.G},4679:(e,t,r)=>{r.d(t,{B:()=>Q});var a=r(60098),s=r(97755),n=r(34640),l=r(80626),o=r(28453),i=r(6826),d=r(5879),c=r(79178),u=r(32028),m=r(46e3),x=r(79719),g=r(31184),p=r(86714);function h(e){let{title:t,children:r,open:s,onClose:n}=e;return(0,a.jsxs)("div",{className:"bg-background h-full flex flex-col py-4 transform transition-transform duration-300 ease-out ".concat(s?"translate-x-0":"translate-x-full"),children:[(0,a.jsx)("div",{className:"flex-shrink-0",children:(0,a.jsxs)("div",{className:"text-foreground text-md font-medium px-6 pb-4 flex items-center justify-between",children:[(0,a.jsx)("h3",{className:"text-md font-medium text-foreground",children:t}),(0,a.jsx)(p.$,{variant:"ghost",size:"icon-sm",onClick:n,className:" p-0",children:(0,a.jsx)(g.A,{className:"h-4 w-4"})})]})}),(0,a.jsx)("div",{className:"pt-2 px-6 pb-6 flex-1 min-h-0 overflow-y-auto scrollbar-thin scrollbar-thumb-muted-foreground/30 scrollbar-track-transparent dark:scrollbar-thumb-muted-foreground/50",children:r})]})}var f=r(43551),b=r(62879),j=r(20994),v=r(97405),N=r(69989),y=r(4778),A=r(58954),k=r(991),S=r(38678),T=r(76636),w=r(21998),_=r(33329),C=r(51332),I=r(52681);function E(e){let{className:t,children:r}=e;return(0,a.jsx)("div",{className:(0,I.cn)("text-sm text-gray-600 dark:text-white/60 my-2",t),children:r})}function R(e){let{children:t,className:r}=e;return(0,a.jsx)("div",{className:(0,I.cn)("text-xs text-muted-foreground border bg-muted/80 dark:bg-muted/50 rounded-sm p-0.5 px-1.5 font-mono",r),children:t})}var O=r(39475);function L(e){let{from:t,to:r}=e;return(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm",children:[(0,a.jsx)(O.E,{variant:"code",className:" ",children:t}),(0,a.jsx)(A.A,{className:"h-4 w-4 "}),(0,a.jsx)(O.E,{variant:"code",className:" ",children:r})]})}let M={TOOL_CALL:"tool_call",AI_GENERATION:"ai_generation",USER_MESSAGE:"user_message",AI_ASSISTANT_MESSAGE:"ai_assistant_message",AI_MODEL_STREAMED_TEXT:"ai_model_streamed_text",AI_MODEL_STREAMED_OBJECT:"ai_model_streamed_object",ARTIFACT_PROCESSING:"artifact_processing"},D={TRANSFER:"transfer",MCP:"mcp",TOOL:"tool"},F=(0,w.default)(()=>Promise.all([r.e(13984),r.e(50815),r.e(86341),r.e(88766),r.e(89173),r.e(10947),r.e(23113),r.e(29440)]).then(r.bind(r,29440)).then(e=>e.JsonEditorWithCopy),{loadableGenerated:{webpack:()=>[29440]},ssr:!1});function J(e){try{return JSON.stringify(JSON.parse(e),null,2)}catch(t){return e}}function G(e){var t,r,s;let{activity:n,isLast:l,onSelect:o,isSelected:d=!1,isAiMessageCollapsed:c=!1,onToggleAiMessageCollapse:u}=e,{Icon:m,className:x}=function(e,t){let r={user_message:{Icon:f.A,cls:"text-primary"},ai_generation:{Icon:b.A,cls:"text-primary"},agent_generation:{Icon:j.A,cls:"text-purple-500"},ai_assistant_message:{Icon:b.A,cls:"text-primary"},ai_model_streamed_text:{Icon:b.A,cls:"text-primary"},ai_model_streamed_object:{Icon:b.A,cls:"text-primary"},context_fetch:{Icon:v.A,cls:"text-indigo-400"},context_resolution:{Icon:N.A,cls:"text-indigo-400"},tool_call:{Icon:y.A,cls:"text-muted-foreground"},delegation:{Icon:A.A,cls:"text-indigo-500"},transfer:{Icon:A.A,cls:"text-indigo-500"},generic_tool:{Icon:y.A,cls:"text-muted-foreground"},tool_purpose:{Icon:y.A,cls:"text-muted-foreground"},artifact_processing:{Icon:k.A,cls:"text-emerald-600"}},a=r[e]||r.tool_call,s="success"===t?a.cls:"error"===t?"text-red-500":"pending"===t?"text-yellow-500":a.cls;return{Icon:a.Icon,className:s}}(n.type===M.TOOL_CALL&&n.toolType===D.TRANSFER?"transfer":n.type===M.TOOL_CALL&&(null==(t=n.toolName)?void 0:t.includes("delegate"))?"delegation":n.type===M.TOOL_CALL&&n.toolPurpose?"tool_purpose":n.type===M.TOOL_CALL?"generic_tool":n.type,n.status),g=(0,C.r6)(n.timestamp),p=new Date(n.timestamp).toISOString(),h="error"===n.status?"text-red-500 hover:text-red-700":"text-foreground hover:text-primary";return(0,a.jsxs)("div",{className:"flex flex-col text-muted-foreground relative text-xs",children:[(0,a.jsxs)("div",{className:"flex items-start",children:[(0,a.jsx)("div",{className:"mr-2 py-2",children:(0,a.jsx)(m,{className:"w-4 h-4 ".concat(x)})}),(0,a.jsxs)("div",{className:"space-y-1.5 px-3 py-2 w-full transition-all duration-200 rounded-lg ".concat(d?"ring-1 ring-primary/50 bg-primary/5":""),children:[(0,a.jsx)("div",{className:"flex items-center gap-2",children:(0,a.jsxs)("button",{type:"button",onClick:o,className:"flex items-center gap-1 group cursor-pointer transition-colors duration-200 ".concat(h),title:"Click to view details",children:[(0,a.jsx)("span",{className:"font-medium",children:(0,a.jsx)(_.jH,{children:n.description})}),(0,a.jsx)(S.A,{className:"h-4 w-4 transition-colors ".concat("error"===n.status?"text-red-700 group-hover:text-red-800":"text-muted-foreground group-hover:text-primary"),"aria-hidden":"true"})]})}),n.type===M.USER_MESSAGE&&n.messageContent&&(0,a.jsx)(E,{children:(0,a.jsxs)("div",{className:"line-clamp-2",children:[" ",n.messageContent]})}),n.type===M.AI_ASSISTANT_MESSAGE&&n.aiResponseContent&&(0,a.jsxs)("div",{className:"space-y-2",children:[u&&(0,a.jsxs)("button",{type:"button",onClick:()=>u(n.id),className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",title:c?"Expand AI response":"Collapse AI response",children:[c?(0,a.jsx)(T.A,{className:"h-3 w-3"}):(0,a.jsx)(i.A,{className:"h-3 w-3"}),"AI Assistant Response"]}),!c&&(0,a.jsx)(E,{children:(0,a.jsx)(_.jH,{children:n.aiResponseContent})})]}),"ai_model_streamed_text"===n.type&&n.aiStreamTextContent&&(0,a.jsxs)("div",{className:"space-y-2",children:[u&&(0,a.jsxs)("button",{type:"button",onClick:()=>u(n.id),className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",title:c?"Expand AI streaming text":"Collapse AI streaming text",children:[c?(0,a.jsx)(T.A,{className:"h-3 w-3"}):(0,a.jsx)(i.A,{className:"h-3 w-3"}),"AI Streaming Text"]}),!c&&(0,a.jsx)(E,{children:function(e,t){let r=e.split(/\s+/);return r.length>100?"".concat(r.slice(0,100).join(" "),"..."):e}(n.aiStreamTextContent,100)})]}),"ai_model_streamed_object"===n.type&&n.aiStreamObjectContent&&(0,a.jsxs)("div",{className:"space-y-2",children:[u&&(0,a.jsxs)("button",{type:"button",onClick:()=>u(n.id),className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",title:c?"Expand AI streaming object":"Collapse AI streaming object",children:[c?(0,a.jsx)(T.A,{className:"h-3 w-3"}):(0,a.jsx)(i.A,{className:"h-3 w-3"}),"AI Streaming Object"]}),!c&&(0,a.jsx)("div",{className:"mt-2",children:(0,a.jsx)(F,{value:J(n.aiStreamObjectContent),title:"Structured object response",uri:"stream-object-".concat(n.id,".json")})})]}),"context_fetch"===n.type&&n.toolResult&&(0,a.jsx)("div",{className:"mb-1",children:(0,a.jsx)(O.E,{variant:"code",className:"break-all",children:n.toolResult})}),"context_resolution"===n.type&&n.contextUrl&&(0,a.jsx)("div",{className:"mb-1",children:(0,a.jsx)(O.E,{variant:"code",className:"break-all",children:n.contextUrl})}),n.type===M.TOOL_CALL&&(null==(r=n.toolName)?void 0:r.includes("delegate"))&&(0,a.jsx)(L,{from:n.delegationFromSubAgentId||"Unknown sub agent",to:n.delegationToSubAgentId||"Unknown sub agent"}),n.type===M.TOOL_CALL&&(n.toolType===D.TRANSFER||(null==(s=n.toolName)?void 0:s.includes("transfer")))&&(0,a.jsx)(L,{from:n.transferFromSubAgentId||"Unknown sub agent",to:n.transferToSubAgentId||"Unknown sub agent"}),n.type===M.TOOL_CALL&&(n.toolType===D.MCP||n.toolType===D.TOOL)&&n.toolPurpose&&(0,a.jsx)(E,{className:"line-clamp-2",children:n.toolPurpose}),n.type===M.ARTIFACT_PROCESSING&&(0,a.jsx)("div",{className:"mt-2 p-3 bg-emerald-50 border border-emerald-200 dark:bg-emerald-900/20 dark:border-emerald-800 rounded-lg max-w-4xl",children:(0,a.jsx)("div",{className:"flex flex-col gap-2 text-sm text-emerald-900 dark:text-emerald-300",children:(0,a.jsxs)("div",{className:"space-y-1",children:[n.artifactType&&function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"indigo",s="emerald"===r?{bg:"bg-emerald-100",text:"text-emerald-900"}:{bg:"bg-indigo-100",text:"text-indigo-800"};return(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsxs)("span",{className:"font-medium",children:[e,":"]}),(0,a.jsx)("span",{className:"".concat(s.bg," ").concat(s.text," px-2 py-1 rounded text-xs font-mono"),children:t})]})}("Type",n.artifactType,"emerald"),n.artifactName&&(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"font-medium",children:"Name:"}),(0,a.jsx)("span",{className:"text-emerald-900 dark:text-emerald-300",children:n.artifactName})]}),n.artifactDescription&&(0,a.jsxs)("div",{className:"flex items-start gap-2",children:[(0,a.jsx)("span",{className:"font-medium",children:"Description:"}),(0,a.jsx)("span",{className:"text-emerald-900 dark:text-emerald-300",children:n.artifactDescription})]}),n.artifactData&&(0,a.jsx)("div",{className:"mt-2",children:(0,a.jsx)(F,{value:J(n.artifactData),title:"Artifact data",uri:"artifact-data-".concat(n.id,".json")})})]})})}),n.type===M.AI_GENERATION&&n.subAgentName&&(0,a.jsx)("div",{className:"mb-1",children:(0,a.jsx)(O.E,{variant:"code",children:n.subAgentName})}),n.type===M.TOOL_CALL&&n.aiTelemetryFunctionId&&"delegation"!==n.toolType&&"transfer"!==n.toolType&&(0,a.jsx)("div",{className:"mb-1",children:(0,a.jsx)(O.E,{variant:"code",className:"text-xs",children:n.aiTelemetryFunctionId})}),n.hasError&&n.otelStatusDescription&&(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>null==u?void 0:u(n.id),className:"flex items-center gap-1 text-xs text-red-500 hover:text-red-600 transition-colors",title:c?"Expand error message":"Collapse error message",children:[c?(0,a.jsx)(T.A,{className:"h-3 w-3"}):(0,a.jsx)(i.A,{className:"h-3 w-3"}),"Error Details"]}),!c&&(0,a.jsx)(E,{className:"bg-red-50 border-red-200 text-red-800 dark:bg-red-900/20 dark:border-red-800 dark:text-red-300",children:n.otelStatusDescription})]}),(0,a.jsx)("time",{className:"text-xs mb-2 inline-block text-gray-500 dark:text-white/50",dateTime:p,title:g,children:g})]})]}),!l&&(0,a.jsx)("div",{className:"absolute top-8 left-[7px] border-l border-border h-full"})]})}function U(e){let{activities:t,onSelect:r,selectedActivityId:s,collapsedAiMessages:n,onToggleAiMessageCollapse:l}=e;return(0,a.jsx)("div",{className:"pt-2 px-6 pb-6",children:(0,a.jsx)("div",{className:"relative grid gap-8",children:t.map((e,o)=>(0,a.jsx)(G,{activity:e,isLast:o===t.length-1,onSelect:()=>r(e),isSelected:s===e.id,isAiMessageCollapsed:(null==n?void 0:n.has(e.id))||!1,onToggleAiMessageCollapse:l},"".concat(e.id,"-").concat(e.type,"-").concat(o)))})})}var W=r(76880);let z=(0,w.default)(()=>Promise.all([r.e(13984),r.e(50815),r.e(86341),r.e(88766),r.e(89173),r.e(10947),r.e(23113),r.e(29440)]).then(r.bind(r,29440)).then(e=>e.JsonEditorWithCopy),{loadableGenerated:{webpack:()=>[29440]},ssr:!1}),P=["host.","process.","signoz."],$=["name","spanID","parentSpanID","traceID","tenant.id","project.id","agent.id","conversation.id"];function B(e){let{span:t,className:r}=e,{processAttributes:s,otherAttributes:n,hasProcessAttributes:l}=function(e){let t={},r={};return Object.entries(e).forEach(e=>{let[a,s]=e;P.some(e=>a.startsWith(e))?t[a]=s:r[a]=s}),{processAttributes:t,otherAttributes:r,hasProcessAttributes:Object.keys(t).length>0}}(t),o=function(e){let t={},r={};return $.forEach(r=>{r in e&&(t[r]=e[r])}),Object.keys(e).filter(e=>!$.includes(e)).sort().forEach(t=>{r[t]=e[t]}),{...t,...r}}(n),i=Object.keys(s).sort().reduce((e,t)=>(e[t]=s[t],e),{}),d=Object.keys(n).length>0,c=d||l;return(0,a.jsxs)("div",{className:(0,I.cn)("space-y-3",r),children:[d&&(0,a.jsx)(z,{value:JSON.stringify(o,null,2),uri:"advanced-span-attributes.json",title:"Advanced Span Attributes"}),l&&(0,a.jsx)(z,{value:JSON.stringify(i,null,2),uri:"process-attributes.json",title:"Process Attributes"}),!c&&(0,a.jsx)("div",{className:"text-center py-4 text-xs text-muted-foreground",children:"No span attributes available"})]})}let V=(0,w.default)(()=>Promise.all([r.e(13984),r.e(50815),r.e(86341),r.e(88766),r.e(89173),r.e(10947),r.e(23113),r.e(29440)]).then(r.bind(r,29440)).then(e=>e.JsonEditorWithCopy),{loadableGenerated:{webpack:()=>[29440]},ssr:!1});function q(e){try{return JSON.stringify(JSON.parse(e),null,2)}catch(t){return e}}var H=r(47216),Z=r(30712),X=r(51433),Y=r(2971);function K(e){let{isPolling:t,error:r,retryConnection:o}=e;if(r){let e=r.includes("SIGNOZ_API_KEY is not configured");return(0,a.jsxs)("div",{className:"flex flex-col gap-4 h-full justify-center items-center px-6",children:[(0,a.jsxs)(H.Fc,{variant:"warning",className:"max-w-md",children:[(0,a.jsx)(s.A,{className:"h-4 w-4"}),(0,a.jsx)(H.XL,{children:e?"SigNoz Configuration Required":"Connection Error"}),(0,a.jsx)(H.TN,{children:e?(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{children:"The SIGNOZ_API_KEY environment variable is not configured. Please set this environment variable to the enable activity timeline."}),(0,a.jsx)(Z.G,{className:"text-amber-700 dark:text-amber-300 dark:hover:text-amber-200 ml-0 mt-1",iconClassName:"text-amber-700 dark:text-amber-300 dark:group-hover/link:text-amber-200",href:"".concat(Y.iO,"/visual-builder/agent"),children:"Learn more"})]}):(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{children:r}),(0,a.jsx)(Z.G,{className:"text-amber-700 dark:text-amber-300 dark:hover:text-amber-200 ml-0 mt-1",iconClassName:"text-amber-700 dark:text-amber-300 dark:group-hover/link:text-amber-200",href:"".concat(Y.iO,"/quick-start/traces"),children:"View traces setup guide"})]})})]}),o&&!e&&(0,a.jsxs)(p.$,{variant:"outline",size:"sm",onClick:o,className:"flex items-center gap-2",children:[(0,a.jsx)(n.A,{className:"h-4 w-4"}),"Retry Connection"]})]})}return(0,a.jsx)("div",{className:"flex flex-col gap-2 h-full justify-center items-center",children:t?(0,a.jsxs)("div",{className:"flex flex-row gap-2 items-center text-gray-400 dark:text-white/50",children:[(0,a.jsx)(l.A,{className:"w-4 h-4 animate-spin"}),(0,a.jsx)("p",{className:"text-sm ",children:"Waiting for activity..."})]}):(0,a.jsx)("p",{className:"text-sm text-gray-400 dark:text-white/50",children:"Start a conversation to see the activity timeline."})})}function Q(e){var t,r;let{conversation:s,enableAutoScroll:g=!1,isPolling:f=!1,error:b,retryConnection:j,refreshOnce:v,showConversationTracesLink:N=!1,conversationId:y,onCopyTrace:A,isCopying:k=!1}=e,[S,T]=(0,c.useState)(null),[w,_]=(0,c.useState)(!1),[I,L]=(0,c.useState)(!1),[F,J]=(0,c.useState)(new Set),[G,z]=(0,c.useState)(g);(0,c.useEffect)(()=>{if(S){_(!1);let e=setTimeout(()=>_(!0),10);return()=>clearTimeout(e)}_(!1)},[S]),(0,c.useEffect)(()=>{y&&T(null)},[y]);let P=(0,c.useMemo)(()=>{var e;return(null==s?void 0:s.activities)&&s.activities.length>0?s.activities:(null==s||null==(e=s.toolCalls)?void 0:e.map(e=>{var t,r,a;return{...e,id:null!=(t=e.id)?t:"tool-call-".concat(Date.now()),type:"tool_call",description:"Called ".concat(e.toolName," tool").concat(e.toolDescription?" - ".concat(e.toolDescription):""),timestamp:new Date(e.timestamp).toISOString(),subAgentName:e.subAgentName||"AI Agent",toolResult:null!=(a=null!=(r=e.result)?r:e.toolResult)?a:"Tool call completed"}}))||[]},[null==s?void 0:s.activities,null==s?void 0:s.toolCalls]),$=(0,c.useMemo)(()=>{let e=[...P];return e.sort((e,t)=>{let r=new Date(e.timestamp).getTime(),a=new Date(t.timestamp).getTime();return r!==a?r-a:String(e.id).localeCompare(String(t.id))}),e},[P]),H=(0,c.useMemo)(()=>$.filter(e=>e.type===M.AI_ASSISTANT_MESSAGE||e.type===M.AI_MODEL_STREAMED_TEXT||e.type===M.AI_MODEL_STREAMED_OBJECT||e.hasError&&e.otelStatusDescription).map(e=>e.id),[$]),Z=(0,c.useMemo)(()=>$.filter(e=>e.type===M.AI_MODEL_STREAMED_TEXT||e.type===M.AI_MODEL_STREAMED_OBJECT).map(e=>e.id),[$]),Y=(0,c.useRef)(new Set),Q=(0,c.useRef)(void 0);(0,c.useEffect)(()=>{y!==Q.current&&(Q.current=y,Y.current=new Set,J(new Set),z(!1));let e=g?H:Z,t=e.filter(e=>!Y.current.has(e));if(t.length>0){t.forEach(e=>{Y.current.add(e)}),J(e=>{let r=new Set(e);return t.forEach(e=>{r.add(e)}),r});let r=e.every(e=>Y.current.has(e));g?z(r&&H.length>0):z(r&&Z.length===H.length&&H.length>0)}},[y,H,Z,g]);let ee=(0,c.useCallback)(()=>{J(new Set),z(!1)},[]),et=(0,c.useCallback)(()=>{J(new Set(H)),z(!0)},[H]),er=e=>{let t=new Set(F);t.has(e)?t.delete(e):t.add(e),J(t),z($.filter(e=>e.type===M.AI_ASSISTANT_MESSAGE||e.type===M.AI_MODEL_STREAMED_TEXT||e.type===M.AI_MODEL_STREAMED_OBJECT||e.hasError&&e.otelStatusDescription).map(e=>e.id).every(e=>t.has(e)))},ea=e=>{var t;return e.type===M.TOOL_CALL&&e.toolType===D.TRANSFER?"transfer":e.type===M.TOOL_CALL&&(null==(t=e.toolName)?void 0:t.includes("delegate"))?"delegation":e.type===M.TOOL_CALL&&e.toolPurpose&&(e.toolType===D.MCP||e.toolType===D.TOOL)?"tool_purpose":e.type===M.TOOL_CALL?"generic_tool":e.type},es=async()=>{if(v&&!I){L(!0);try{(await v()).hasNewActivity||u.oR.info("No new activity found."),L(!1)}catch(e){u.oR.error("Failed to refresh activities."),L(!1)}}};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(X.wV,{id:"activity-timeline",order:2,children:(0,a.jsxs)("div",{className:"bg-background h-full flex flex-col py-4",children:[(0,a.jsx)("div",{className:"flex-shrink-0",children:(0,a.jsxs)("div",{className:"flex items-center justify-between px-6 pb-4",children:[(0,a.jsx)("div",{className:"text-foreground text-md font-medium",children:"Activity timeline"}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[A&&(0,a.jsxs)(p.$,{variant:"ghost",size:"sm",onClick:A,disabled:k,className:"h-7 px-2 text-xs text-muted-foreground hover:text-foreground",title:"Copy trace as JSON",children:[(0,a.jsx)(o.A,{className:"h-3 w-3 mr-1"}),k?"Copying...":"Copy Trace"]}),$.some(e=>e.type===M.AI_ASSISTANT_MESSAGE||e.type===M.AI_MODEL_STREAMED_TEXT||e.type===M.AI_MODEL_STREAMED_OBJECT||e.hasError&&e.otelStatusDescription)&&(0,a.jsx)("div",{className:"flex items-center gap-1",children:(0,a.jsx)(p.$,{variant:"ghost",size:"sm",onClick:G?ee:et,className:"h-7 px-2 text-xs text-muted-foreground hover:text-foreground",title:G?"Expand all AI messages":"Collapse all AI messages",children:G?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.A,{className:"h-3 w-3 mr-1"}),"Expand All"]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.A,{className:"h-3 w-3 mr-1"}),"Collapse All"]})})}),N&&(null==s?void 0:s.conversationId)&&(0,a.jsx)(x.CY,{conversationId:s.conversationId})]})]})}),(0,a.jsx)("div",{className:"p-0 flex-1 min-h-0",children:0===$.length?(0,a.jsx)(K,{isPolling:f,error:b,retryConnection:j}):g?(0,a.jsx)(m.z,{className:"h-full [&>div]:overflow-y-auto [&>div]:scrollbar-thin [&>div]:scrollbar-thumb-muted-foreground/30 [&>div]:scrollbar-track-transparent dark:[&>div]:scrollbar-thumb-muted-foreground/50",resize:"smooth",initial:"smooth",children:(0,a.jsxs)(m.z.Content,{children:[(0,a.jsx)(U,{activities:$,onSelect:e=>{T({type:ea(e),item:e})},selectedActivityId:null==S||null==(t=S.item)?void 0:t.id,collapsedAiMessages:F,onToggleAiMessageCollapse:er}),!f&&$.length>0&&!b&&v&&(0,a.jsx)("div",{className:"flex justify-center items-center z-10",children:(0,a.jsxs)(p.$,{variant:"outline",size:"sm",onClick:es,disabled:I,className:" text-xs bg-background/80 backdrop-blur-sm hover:bg-background/90 transition-all duration-200 opacity-70 hover:opacity-100",children:[I?(0,a.jsx)(l.A,{className:"h-3 w-3 animate-spin"}):(0,a.jsx)(n.A,{className:"h-3 w-3"}),I?"Refreshing...":"Refresh"]})})]})}):(0,a.jsx)("div",{className:"h-full overflow-y-auto scrollbar-thin scrollbar-thumb-muted-foreground/30 scrollbar-track-transparent dark:scrollbar-thumb-muted-foreground/50",children:(0,a.jsx)(U,{activities:$,onSelect:e=>{T({type:ea(e),item:e})},selectedActivityId:null==S||null==(r=S.item)?void 0:r.id,collapsedAiMessages:F,onToggleAiMessageCollapse:er})})})]})}),(0,a.jsx)(X.WM,{}),S&&(0,a.jsx)(X.wV,{id:"activity-details-sidepane",order:3,children:(0,a.jsx)(h,{title:function(e){switch(e.type){case"ai_generation":return"AI generation details";case"agent_generation":return"Agent generation details";case"user_message":return"User message details";case"ai_assistant_message":return"AI assistant message details";case"context_fetch":return"Context fetch details";case"context_resolution":return"Context resolution details";case"delegation":return"Delegation Details";case"transfer":return"Transfer details";case"tool_purpose":return"Tool purpose details";case"generic_tool":return"Tool call details";case"ai_model_streamed_text":return"AI Streaming text details";case"ai_model_streamed_object":return"AI Streaming object details";case"mcp_tool_error":return"MCP tool error details";case"artifact_processing":return"Artifact details";default:return"Details"}}(S),open:w,onClose:()=>{_(!1),setTimeout(()=>{T(null)},300)},children:function(e){var t,r,s,n,l,o;let{selected:i,findSpanById:d}=e;if("mcp_tool_error"===i.type){let e=i.item;return(0,a.jsxs)(W.wn,{children:[(0,a.jsx)(W.R2,{label:"Tool name",value:(0,a.jsx)(O.E,{variant:"code",children:e.toolName})}),(0,a.jsx)(W.$J,{label:"Error message",children:(0,a.jsx)(E,{className:"bg-red-50 border-red-200 text-red-800 dark:bg-red-900/20 dark:border-red-800 dark:text-red-300",children:e.error})}),(0,a.jsx)(W.$J,{label:"Failure reason",children:(0,a.jsx)(E,{className:"bg-orange-50 border-orange-200 text-orange-800 dark:bg-orange-900/20 dark:border-orange-800 dark:text-orange-300",children:e.failureReason})}),(0,a.jsx)(W.R2,{label:"Span ID",value:(0,a.jsx)(O.E,{variant:"code",children:e.spanId})}),(0,a.jsx)(W.R2,{label:"Timestamp",value:(0,C.r6)(e.timestamp)})]})}let c=i.item,u=d(c.id),m=u?(0,a.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,a.jsx)("h4",{className:"text-sm font-semibold text-foreground",children:"Advanced"}),(0,a.jsx)(x.xE,{traceId:u.traceId,spanId:u.spanId})]}):null,g=u?(0,a.jsx)(B,{span:u.data}):(0,a.jsx)("div",{className:"text-center py-4 text-xs text-muted-foreground",children:"Span not found."});switch(i.type){case"ai_generation":return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(W.wn,{children:[(0,a.jsx)(W.R2,{label:"Model",value:(0,a.jsx)(W.$D,{model:c.aiModel||"Unknown"})}),(0,a.jsx)(W.R2,{label:"Input tokens",value:(null==(t=c.inputTokens)?void 0:t.toLocaleString())||"0"}),(0,a.jsx)(W.R2,{label:"Output tokens",value:(null==(r=c.outputTokens)?void 0:r.toLocaleString())||"0"}),(0,a.jsx)(W.R2,{label:"Sub agent",value:c.subAgentName||"-"}),c.aiResponseText&&(0,a.jsx)(W.$J,{label:"Response text",children:(0,a.jsx)(E,{className:"whitespace-pre-wrap break-words max-h-96 overflow-y-auto",children:c.aiResponseText})}),c.aiPromptMessages&&(0,a.jsx)(V,{value:q(c.aiPromptMessages),title:"Prompt messages",uri:"prompt-messages.json"}),c.aiResponseToolCalls&&(0,a.jsx)(V,{value:q(c.aiResponseToolCalls),title:"Tool calls",uri:"tool-calls.json"}),c.hasError&&c.otelStatusDescription&&(0,a.jsx)(W.$J,{label:"Error",children:(0,a.jsx)(E,{className:"bg-red-50 border-red-200 text-red-800 dark:bg-red-900/20 dark:border-red-800 dark:text-red-300",children:c.otelStatusDescription})}),c.hasError&&c.otelStatusCode&&(0,a.jsx)(W.R2,{label:"Status code",value:c.otelStatusCode}),(0,a.jsx)(W.Wh,{status:c.status}),(0,a.jsx)(W.R2,{label:"Timestamp",value:(0,C.r6)(c.timestamp)})]}),(0,a.jsx)(W.cG,{}),m,g]});case"agent_generation":return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(W.wn,{children:[c.hasError&&c.otelStatusDescription&&(0,a.jsx)(W.$J,{label:"Error",children:(0,a.jsx)(E,{className:"bg-red-50 border-red-200 text-red-800 dark:bg-red-900/20 dark:border-red-800 dark:text-red-300",children:c.otelStatusDescription})}),c.hasError&&c.otelStatusCode&&(0,a.jsx)(W.R2,{label:"Status code",value:c.otelStatusCode}),(0,a.jsx)(W.Wh,{status:c.status}),(0,a.jsx)(W.R2,{label:"Timestamp",value:(0,C.r6)(c.timestamp)})]}),(0,a.jsx)(W.cG,{}),m,g]});case"user_message":return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(W.wn,{children:[(0,a.jsx)(W.R2,{label:"Message content",value:c.messageContent||"Message content not available"}),(0,a.jsx)(W.Wh,{status:c.status}),(0,a.jsx)(W.R2,{label:"Timestamp",value:(0,C.r6)(c.timestamp)})]}),(0,a.jsx)(W.cG,{}),m,g]});case"ai_assistant_message":return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(W.wn,{children:[(0,a.jsx)(W.$J,{label:"AI response content",children:(0,a.jsx)(E,{className:" whitespace-pre-wrap break-words",children:c.aiResponseContent||"Response content not available"})}),(0,a.jsx)(W.R2,{label:"Sub agent",value:c.subAgentName||"Unknown"}),(0,a.jsx)(W.Wh,{status:c.status}),(0,a.jsx)(W.R2,{label:"Activity timestamp",value:(0,C.r6)(c.timestamp)})]}),(0,a.jsx)(W.cG,{}),m,g]});case"context_fetch":return(0,a.jsxs)(W.wn,{children:[(0,a.jsx)(W.$J,{label:"URL",children:(0,a.jsx)(E,{className:" break-all",children:c.toolResult||"URL not available"})}),(0,a.jsx)(W.Wh,{status:c.status}),(0,a.jsx)(W.R2,{label:"Timestamp",value:(0,C.r6)(c.timestamp)})]});case"context_resolution":return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(W.wn,{children:[c.contextTrigger&&(0,a.jsx)(W.R2,{label:"Trigger",value:c.contextTrigger}),(0,a.jsx)(W.Wh,{status:c.status}),c.contextStatusDescription&&(0,a.jsx)(W.$J,{label:"Status description",children:(0,a.jsx)(E,{className:"bg-red-50 border-red-200 text-red-800 dark:bg-red-900/20 dark:border-red-800 dark:text-red-300",children:c.contextStatusDescription})}),c.contextUrl&&(0,a.jsx)(W.$J,{label:"Context URL",children:(0,a.jsx)(R,{className:"break-all",children:c.contextUrl})}),(0,a.jsx)(W.R2,{label:"Timestamp",value:(0,C.r6)(c.timestamp)})]}),(0,a.jsx)(W.cG,{}),m,g]});case"delegation":return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(W.wn,{children:[(0,a.jsx)(W.R2,{label:"From sub agent",value:c.delegationFromSubAgentId||"Unknown Agent"}),(0,a.jsx)(W.R2,{label:"To sub agent",value:c.delegationToSubAgentId||"Unknown Agent"}),(0,a.jsx)(W.R2,{label:"Tool name",value:(0,a.jsx)(O.E,{variant:"code",children:c.toolName||"Unknown Tool"})}),(0,a.jsx)(W.Wh,{status:c.status}),"error"===c.status&&c.toolStatusMessage&&(0,a.jsx)(W.$J,{label:"Status message",children:(0,a.jsx)(E,{className:"bg-red-50 border-red-200 text-red-800 dark:bg-red-900/20 dark:border-red-800 dark:text-red-300",children:c.toolStatusMessage})}),c.toolCallArgs&&(0,a.jsx)(V,{value:q(c.toolCallArgs),title:"Tool arguments",uri:"tool-arguments.json"}),c.toolCallResult&&(0,a.jsx)(V,{value:q(c.toolCallResult),title:"Tool result",uri:"tool-result.json"}),(0,a.jsx)(W.R2,{label:"Timestamp",value:(0,C.r6)(c.timestamp)})]}),(0,a.jsx)(W.cG,{}),m,g]});case"transfer":return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(W.wn,{children:[(0,a.jsx)(W.$J,{label:"From sub agent",children:(0,a.jsx)(O.E,{variant:"code",children:c.transferFromSubAgentId||"Unknown sub agent"})}),(0,a.jsx)(W.$J,{label:"To sub agent",children:(0,a.jsx)(O.E,{variant:"code",children:c.transferToSubAgentId||"Unknown target"})}),(0,a.jsx)(W.R2,{label:"Tool name",value:(0,a.jsx)(O.E,{variant:"code",children:c.toolName||"Unknown tool"})}),(0,a.jsx)(W.Wh,{status:c.status}),"error"===c.status&&c.toolStatusMessage&&(0,a.jsx)(W.$J,{label:"Status message",children:(0,a.jsx)(E,{className:"bg-red-50 border-red-200 text-red-800 dark:bg-red-900/20 dark:border-red-800 dark:text-red-300",children:c.toolStatusMessage})}),c.toolCallArgs&&(0,a.jsx)(V,{value:q(c.toolCallArgs),title:"Tool arguments",uri:"tool-arguments.json"}),c.toolCallResult&&(0,a.jsx)(V,{value:q(c.toolCallResult),title:"Tool result",uri:"tool-result.json"}),(0,a.jsx)(W.R2,{label:"Timestamp",value:(0,C.r6)(c.timestamp)})]}),(0,a.jsx)(W.cG,{}),m,g]});case"tool_purpose":return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(W.wn,{children:[(0,a.jsx)(W.R2,{label:"Tool name",value:(0,a.jsx)(O.E,{variant:"code",children:c.toolName||"Unknown tool"})}),c.toolType&&(0,a.jsx)(W.$J,{label:"Tool type",children:(0,a.jsx)(O.E,{variant:"code",className:"text-xs",children:c.toolType})}),(0,a.jsx)(W.R2,{label:"Purpose",value:c.toolPurpose||"No purpose information available"}),(0,a.jsx)(W.R2,{label:"Sub agent",value:c.subAgentName||"Unknown sub agent"}),(0,a.jsx)(W.Wh,{status:c.status}),"error"===c.status&&c.toolStatusMessage&&(0,a.jsx)(W.$J,{label:"Status message",children:(0,a.jsx)(E,{className:"bg-red-50 border-red-200 text-red-800 dark:bg-red-900/20 dark:border-red-800 dark:text-red-300",children:c.toolStatusMessage})}),c.toolCallArgs&&(0,a.jsx)(V,{value:q(c.toolCallArgs),title:"Tool arguments",uri:"tool-arguments.json"}),c.toolCallResult&&(0,a.jsx)(V,{value:q(c.toolCallResult),title:"Tool result",uri:"tool-result.json"}),(0,a.jsx)(W.R2,{label:"Timestamp",value:(0,C.r6)(c.timestamp)})]}),(0,a.jsx)(W.cG,{}),m,g]});case"generic_tool":return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(W.wn,{children:[(0,a.jsx)(W.R2,{label:"Tool name",value:(0,a.jsx)(O.E,{variant:"code",children:c.toolName||"Unknown Tool"})}),c.toolType&&(0,a.jsx)(W.$J,{label:"Tool type",children:(0,a.jsx)(O.E,{variant:"code",className:"text-xs",children:c.toolType})}),(0,a.jsx)(W.Wh,{status:c.status}),"error"===c.status&&c.toolStatusMessage&&(0,a.jsx)(W.$J,{label:"Status message",children:(0,a.jsx)(E,{className:"bg-red-50 border-red-200 text-red-800 dark:bg-red-900/20 dark:border-red-800 dark:text-red-300",children:c.toolStatusMessage})}),c.toolCallArgs&&(0,a.jsx)(V,{value:q(c.toolCallArgs),title:"Tool arguments",uri:"tool-arguments.json"}),c.toolCallResult&&(0,a.jsx)(V,{value:q(c.toolCallResult),title:"Tool result",uri:"tool-result.json"}),(0,a.jsx)(W.R2,{label:"Timestamp",value:(0,C.r6)(c.timestamp)})]}),(0,a.jsx)(W.cG,{}),m,g]});case"ai_model_streamed_text":return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(W.wn,{children:[(0,a.jsx)(W.R2,{label:"Model",value:(0,a.jsx)(W.$D,{model:c.aiStreamTextModel||"Unknown"})}),(0,a.jsx)(W.R2,{label:"Operation id",value:(0,a.jsx)(O.E,{variant:"code",children:c.aiStreamTextOperationId||"Unknown"})}),(0,a.jsx)(W.R2,{label:"Input tokens",value:(null==(s=c.inputTokens)?void 0:s.toLocaleString())||"0"}),(0,a.jsx)(W.R2,{label:"Output tokens",value:(null==(n=c.outputTokens)?void 0:n.toLocaleString())||"0"}),(0,a.jsx)(W.Wh,{status:c.status}),(0,a.jsx)(W.R2,{label:"Timestamp",value:(0,C.r6)(c.timestamp)})]}),(0,a.jsx)(W.cG,{}),m,g]});case"ai_model_streamed_object":return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(W.wn,{children:[(0,a.jsx)(W.R2,{label:"Model",value:(0,a.jsx)(W.$D,{model:c.aiStreamObjectModel||"Unknown"})}),(0,a.jsx)(W.R2,{label:"Input tokens",value:(null==(l=c.inputTokens)?void 0:l.toLocaleString())||"0"}),(0,a.jsx)(W.R2,{label:"Output tokens",value:(null==(o=c.outputTokens)?void 0:o.toLocaleString())||"0"}),c.aiStreamObjectContent&&(0,a.jsx)(W.$J,{label:"Structured object response",children:(0,a.jsx)(V,{value:q(c.aiStreamObjectContent),title:"Object content",uri:"stream-object-response.json"})}),(0,a.jsx)(W.Wh,{status:c.status}),(0,a.jsx)(W.R2,{label:"Timestamp",value:(0,C.r6)(c.timestamp)})]}),(0,a.jsx)(W.cG,{}),m,g]});case"artifact_processing":return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(W.wn,{children:[c.artifactName&&(0,a.jsx)(W.R2,{label:"Name",value:c.artifactName}),c.artifactType&&(0,a.jsx)(W.R2,{label:"Type",value:c.artifactType}),c.artifactDescription&&(0,a.jsx)(W.R2,{label:"Description",value:c.artifactDescription}),c.artifactData&&(0,a.jsx)(V,{value:q(c.artifactData),title:"Artifact data",uri:"artifact-data.json"}),(0,a.jsx)(W.Wh,{status:c.status}),c.artifactSubAgentId&&(0,a.jsx)(W.R2,{label:"Sub agent",value:c.artifactSubAgentId||"Unknown Sub Agent"}),c.artifactId&&(0,a.jsx)(W.R2,{label:"Artifact ID",value:(0,a.jsx)(O.E,{variant:"code",children:c.artifactId})}),c.artifactToolCallId&&(0,a.jsx)(W.R2,{label:"Tool call ID",value:(0,a.jsx)(O.E,{variant:"code",children:c.artifactToolCallId})}),(0,a.jsx)(W.R2,{label:"Timestamp",value:(0,C.r6)(c.timestamp)})]}),(0,a.jsx)(W.cG,{}),m,g]});default:return null}}({selected:S,findSpanById:e=>{var t;return null==s||null==(t=s.allSpanAttributes)?void 0:t.find(t=>t.spanId===e)}})},S.item.id)})]})}},15660:(e,t,r)=>{r.d(t,{RuntimeConfigProvider:()=>l,y:()=>o});var a=r(60098),s=r(79178);let n=(0,s.createContext)(null);function l(e){let{value:t,children:r}=e;return(0,a.jsx)(n.Provider,{value:t,children:r})}function o(){let e=(0,s.useContext)(n);if(!e)throw Error("useRuntimeConfig must be used within <RuntimeConfigProvider>");return e}},30712:(e,t,r)=>{r.d(t,{G:()=>i});var a=r(60098),s=r(38678),n=r(85276),l=r.n(n),o=r(52681);function i(e){let{href:t,children:r,className:n,iconClassName:i,...d}=e;return(0,a.jsxs)(l(),{href:t,target:"_blank",rel:"noreferrer noopener",className:(0,o.cn)("text-sm text-muted-foreground underline underline-offset-2 inline-flex items-center gap-1 hover:text-primary ml-1 group/link font-mono uppercase transition-colors",n),...d,children:[r,(0,a.jsx)(s.A,{className:(0,o.cn)("size-3.5 text-muted-foreground/60 group-hover/link:text-primary",i)})]})}},39475:(e,t,r)=>{r.d(t,{E:()=>i});var a=r(60098),s=r(97911),n=r(15625),l=r(52681);let o=(0,n.F)("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",primary:"border border-primary/50 text-primary bg-primary/5 rounded-sm p-0.5 px-1.5 font-mono",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",code:"text-xs text-muted-foreground border bg-muted/80 dark:bg-muted/50 rounded-sm p-0.5 px-1.5 font-mono",success:"text-xs text-muted-foreground border rounded-sm p-0.5 px-1.5 font-mono bg-emerald-50 border-emerald-200 text-emerald-800 dark:text-emerald-300 dark:bg-emerald-950/40 uppercase",error:"text-xs text-muted-foreground border rounded-sm p-0.5 px-1.5 font-mono bg-red-50 border-red-200 text-red-800 dark:border-red-700 dark:text-red-300 dark:bg-red-950/40 uppercase",warning:"text-xs text-muted-foreground border rounded-sm p-0.5 px-1.5 font-mono bg-amber-50 border-amber-200 text-amber-800 dark:border-amber-700 dark:text-amber-300 dark:bg-amber-950/40 uppercase",sky:"text-xs text-muted-foreground border rounded-sm p-0.5 px-1.5 font-mono bg-sky-50 border-sky-200 text-sky-800 dark:border-sky-700 dark:text-sky-300 dark:bg-sky-950/40",violet:"text-xs text-muted-foreground border rounded-sm p-0.5 px-1.5 font-mono bg-violet-50 border-violet-200 text-violet-800 dark:border-violet-700 dark:text-violet-300 dark:bg-violet-950/40",orange:"text-xs text-muted-foreground border rounded-sm p-0.5 px-1.5 font-mono bg-orange-50 border-orange-200 text-orange-800 dark:border-orange-700 dark:text-orange-300 dark:bg-orange-950/40"}},defaultVariants:{variant:"default"}});function i(e){let{className:t,variant:r,asChild:n=!1,...i}=e,d=n?s.DX:"span";return(0,a.jsx)(d,{"data-slot":"badge",className:(0,l.cn)(o({variant:r}),t),...i})}},47216:(e,t,r)=>{r.d(t,{Fc:()=>o,TN:()=>d,XL:()=>i});var a=r(60098),s=r(15625),n=r(52681);let l=(0,s.F)("relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90",warning:"text-amber-700 bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-amber-700/90 *:data-[slot=alert-description]:dark:text-amber-300/90 dark:text-amber-300 bg-amber-50 border-amber-200 dark:bg-amber-950/40 dark:border-amber-700"}},defaultVariants:{variant:"default"}});function o(e){let{className:t,variant:r,...s}=e;return(0,a.jsx)("div",{"data-slot":"alert",role:"alert",className:(0,n.cn)(l({variant:r}),t),...s})}function i(e){let{className:t,...r}=e;return(0,a.jsx)("div",{"data-slot":"alert-title",className:(0,n.cn)("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",t),...r})}function d(e){let{className:t,...r}=e;return(0,a.jsx)("div",{"data-slot":"alert-description",className:(0,n.cn)("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",t),...r})}},48851:(e,t,r)=>{r.d(t,{S:()=>l});var a=r(60098),s=r(79178),n=r(69962);let l=(0,s.forwardRef)((e,t)=>(0,a.jsxs)(n.A,{ref:t,...e,strokeWidth:0,children:[(0,a.jsx)("title",{children:"Anthropic icon"}),(0,a.jsx)("path",{d:"M17.3102 3.5H13.6399L20.3297 20.4197H24L17.3102 3.5ZM6.68981 3.5L0 20.4197H3.74837L5.12798 16.8796H12.1302L13.4837 20.4197H17.2321L10.5423 3.5H6.68981ZM6.32538 13.7299L8.61605 7.79501L10.9067 13.7299H6.32538Z",fill:"currentColor"})]}));l.displayName="AnthropicIcon"},51332:(e,t,r)=>{function a(e){let t=new Date(e);if(Number.isNaN(t.getTime()))return"Invalid date";try{return new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",year:"numeric"}).format(t)}catch(e){return console.error("Error formatting date:",e),"Invalid date"}}function s(e){let t=new Date(e);return Number.isNaN(t.getTime())?"Invalid date":new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit",hour12:!0}).format(t)}function n(e){try{let t=new Date(e);if(Number.isNaN(t.getTime()))return"Invalid date";let r=new Date,a=r.getTime()-t.getTime();if(a<0)return"In the future";let s=Math.floor(a/6e4),n=Math.floor(a/36e5),l=Math.floor(a/864e5);if(s<1)return"just now";if(s<60)return"".concat(s,"m ago");{if(n<24)return"".concat(n,"h ago");if(l<7)return"".concat(l,"d ago");if(!(l<30))return t.toLocaleDateString("en-US",{month:"short",day:"numeric",year:t.getFullYear()!==r.getFullYear()?"numeric":void 0});let e=Math.floor(l/7);return"".concat(e,"w ago")}}catch(t){return console.warn("Error formatting date:",e,t),"Invalid date"}}function l(e){let t=Math.round(e/1e3/60),r=Math.floor(t/60),a=t%60;return r>0?"".concat(r,"h ").concat(a,"m"):"".concat(a,"m")}r.d(t,{F7:()=>n,Yq:()=>a,a3:()=>l,r6:()=>s})},51433:(e,t,r)=>{r.d(t,{HK:()=>o,WM:()=>d,wV:()=>i});var a=r(60098),s=r(52597),n=r(46886),l=r(52681);function o(e){let{className:t,...r}=e;return(0,a.jsx)(n.YZ,{"data-slot":"resizable-panel-group",className:(0,l.cn)("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",t),...r})}function i(e){let{...t}=e;return(0,a.jsx)(n.Zk,{"data-slot":"resizable-panel",...t})}function d(e){let{withHandle:t,className:r,...o}=e;return(0,a.jsx)(n.TW,{"data-slot":"resizable-handle",className:(0,l.cn)("bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90",r),...o,children:t&&(0,a.jsx)("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:(0,a.jsx)(s.A,{className:"size-2.5"})})})}},64202:(e,t,r)=>{r.d(t,{I:()=>l});var a=r(60098),s=r(79178),n=r(69962);let l=(0,s.forwardRef)((e,t)=>(0,a.jsxs)(n.A,{ref:t,...e,strokeWidth:0,children:[(0,a.jsx)("title",{children:"OpenAI icon"}),(0,a.jsx)("path",{d:"M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z",fill:"currentColor"})]}));l.displayName="OpenAIIcon"},67696:(e,t,r)=>{r.d(t,{BT:()=>i,Wu:()=>d,ZB:()=>o,Zp:()=>n,aR:()=>l,wL:()=>c});var a=r(60098),s=r(52681);function n(e){let{className:t,...r}=e;return(0,a.jsx)("div",{"data-slot":"card",className:(0,s.cn)("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",t),...r})}function l(e){let{className:t,...r}=e;return(0,a.jsx)("div",{"data-slot":"card-header",className:(0,s.cn)("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",t),...r})}function o(e){let{className:t,...r}=e;return(0,a.jsx)("div",{"data-slot":"card-title",className:(0,s.cn)("leading-none font-semibold",t),...r})}function i(e){let{className:t,...r}=e;return(0,a.jsx)("div",{"data-slot":"card-description",className:(0,s.cn)("text-muted-foreground text-sm",t),...r})}function d(e){let{className:t,...r}=e;return(0,a.jsx)("div",{"data-slot":"card-content",className:(0,s.cn)("px-6",t),...r})}function c(e){let{className:t,...r}=e;return(0,a.jsx)("div",{"data-slot":"card-footer",className:(0,s.cn)("flex items-center px-6 [.border-t]:pt-6",t),...r})}},69962:(e,t,r)=>{r.d(t,{A:()=>l});var a=r(60098),s=r(79178);let n={fill:"none",height:24,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 24 24",width:24,xmlns:"http://www.w3.org/2000/svg"},l=(0,s.forwardRef)((e,t)=>{let{color:r="currentColor",size:s=24,strokeWidth:l=2,absoluteStrokeWidth:o,className:i="",children:d,...c}=e;return(0,a.jsx)("svg",{role:"img","aria-label":"SVG Icon",ref:t,...n,className:i,height:s,stroke:r,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:o?24*Number(l)/Number(s):l,width:s,...c,children:d})});l.displayName="SvgIcon"},76880:(e,t,r)=>{r.d(t,{$D:()=>g,$J:()=>i,Bb:()=>x,R2:()=>u,Wh:()=>m,cG:()=>c,wn:()=>d});var a=r(60098),s=r(48851),n=r(84654),l=r(64202),o=r(39475);function i(e){let{label:t,children:r}=e;return(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-sm font-medium text-foreground",children:t}),(0,a.jsx)("div",{className:"mt-1",children:r})]})}function d(e){let{children:t}=e;return(0,a.jsx)("div",{className:"space-y-6",children:t})}function c(){return(0,a.jsx)("div",{className:"mt-6 border-t border-border pt-4"})}function u(e){let{label:t,value:r}=e;return(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-sm font-medium text-foreground",children:t}),(0,a.jsx)("p",{className:"text-sm text-foreground mt-1",children:null!=r?r:"-"})]})}function m(e){let{status:t}=e;return(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Status"}),(0,a.jsx)("div",{className:"mt-1",children:(0,a.jsx)(o.E,{className:"uppercase",variant:"success"===t?"primary":"error",children:t})})]})}function x(e){let{label:t,value:r}=e;return(0,a.jsxs)("div",{className:"flex justify-between text-xs",children:[(0,a.jsxs)("span",{className:"text-muted-foreground",children:[t,":"]}),(0,a.jsx)("span",{className:"font-mono font-medium text-foreground",children:null!=r?r:"-"})]})}function g(e){let{model:t}=e;return(0,a.jsxs)(o.E,{className:"text-xs max-w-full flex-1",variant:"code",children:[(null==t?void 0:t.startsWith("gpt-"))||(null==t?void 0:t.startsWith("openai/"))?(0,a.jsx)(l.I,{className:"size-3 text-xs text-muted-foreground flex-shrink-0"}):(null==t?void 0:t.startsWith("claude-"))||(null==t?void 0:t.startsWith("anthropic/"))?(0,a.jsx)(s.S,{className:"size-3 text-xs flex-shrink-0"}):(null==t?void 0:t.startsWith("gemini-"))||(null==t?void 0:t.startsWith("google/"))?(0,a.jsx)(n.A,{className:"size-3 text-xs flex-shrink-0"}):null,(0,a.jsx)("span",{className:"truncate w-full",children:t})]})}},79719:(e,t,r)=>{r.d(t,{CY:()=>d,dc:()=>o,xE:()=>i});var a=r(60098),s=r(93137),n=r(15660),l=r(30712);function o(e){let{conversationId:t}=e,{PUBLIC_SIGNOZ_URL:r}=(0,n.y)();return(0,a.jsx)(l.G,{href:function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"2months",a={queryType:"builder",builder:{queryData:[{dataSource:"traces",queryName:"A",aggregateOperator:"noop",aggregateAttribute:{id:"false",dataType:"",key:"",isColumn:!1,type:"",isJSON:!1},timeAggregation:"rate",spaceAggregation:"sum",functions:[],filters:{op:"AND",items:[{key:{key:"conversation.id",dataType:"string",type:"tag",isColumn:!1,isJSON:!1,id:"false"},op:"=",value:t}]},expression:"A",disabled:!1,stepInterval:60,having:[],limit:null,orderBy:[{columnName:"timestamp",order:"desc"}],groupBy:[],legend:"",reduceTo:"avg"}],queryFormulas:[],promql:[{name:"A",query:"",legend:"",disabled:!1}],clickhouse_sql:[{name:"A",legend:"",disabled:!1,query:""}]}},s=new URLSearchParams;return s.set("compositeQuery",JSON.stringify(a)),s.set("options",JSON.stringify({selectColumns:[{key:"serviceName",dataType:"string",type:"tag",isColumn:!0,isJSON:!1,id:"serviceName--string--tag--true",isIndexed:!1},{key:"name",dataType:"string",type:"tag",isColumn:!0,isJSON:!1,id:"name--string--tag--true",isIndexed:!1},{key:"durationNano",dataType:"float64",type:"tag",isColumn:!0,isJSON:!1,id:"durationNano--float64--tag--true",isIndexed:!1},{key:"httpMethod",dataType:"string",type:"tag",isColumn:!0,isJSON:!1,id:"httpMethod--string--tag--true",isIndexed:!1},{key:"responseStatusCode",dataType:"string",type:"tag",isColumn:!0,isJSON:!1,id:"responseStatusCode--string--tag--true",isIndexed:!1}],maxLines:2,format:"raw",fontSize:"small"})),s.set("pagination",JSON.stringify({limit:10,offset:0})),s.set("panelTypes",'"trace"'),s.set("viewName",'""'),s.set("viewKey",'""'),s.set("relativeTime",r),"".concat(e,"/traces-explorer?").concat(s.toString())}(r,t),children:"View Conversation in SigNoz"})}function i(e){let{traceId:t,spanId:r}=e,{PUBLIC_SIGNOZ_URL:s}=(0,n.y)();return(0,a.jsx)(l.G,{href:"".concat(s,"/trace/").concat(t,"?spanId=").concat(r),children:"View span in SigNoz"})}function d(e){let{conversationId:t}=e,{tenantId:r,projectId:n}=(0,s.useParams)(),o="/".concat(r,"/projects/").concat(n,"/traces/conversations/").concat(t);return(0,a.jsx)(l.G,{href:o,children:"View Conversation Traces"})}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[53779],{53779:(t,e,a)=>{a.d(e,{diagram:()=>K});var i,r=a(63677);a(61052),a(37317),a(30944),a(17297),a(74303),a(85963),a(95952),a(3334),a(71409);var d=a(98671),n=a(3386),s=a(36416),o=a(16222),g=a(15309),l=a(43111),p=(0,s.K2)(t=>t.append("circle").attr("class","start-state").attr("r",(0,n.D7)().state.sizeUnit).attr("cx",(0,n.D7)().state.padding+(0,n.D7)().state.sizeUnit).attr("cy",(0,n.D7)().state.padding+(0,n.D7)().state.sizeUnit),"drawStartState"),h=(0,s.K2)(t=>t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",(0,n.D7)().state.textHeight).attr("class","divider").attr("x2",2*(0,n.D7)().state.textHeight).attr("y1",0).attr("y2",0),"drawDivider"),c=(0,s.K2)((t,e)=>{let a=t.append("text").attr("x",2*(0,n.D7)().state.padding).attr("y",(0,n.D7)().state.textHeight+2*(0,n.D7)().state.padding).attr("font-size",(0,n.D7)().state.fontSize).attr("class","state-title").text(e.id),i=a.node().getBBox();return t.insert("rect",":first-child").attr("x",(0,n.D7)().state.padding).attr("y",(0,n.D7)().state.padding).attr("width",i.width+2*(0,n.D7)().state.padding).attr("height",i.height+2*(0,n.D7)().state.padding).attr("rx",(0,n.D7)().state.radius),a},"drawSimpleState"),x=(0,s.K2)((t,e)=>{let a=(0,s.K2)(function(t,e,a){let i=t.append("tspan").attr("x",2*(0,n.D7)().state.padding).text(e);a||i.attr("dy",(0,n.D7)().state.textHeight)},"addTspan"),i=t.append("text").attr("x",2*(0,n.D7)().state.padding).attr("y",(0,n.D7)().state.textHeight+1.3*(0,n.D7)().state.padding).attr("font-size",(0,n.D7)().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),r=i.height,d=t.append("text").attr("x",(0,n.D7)().state.padding).attr("y",r+.4*(0,n.D7)().state.padding+(0,n.D7)().state.dividerMargin+(0,n.D7)().state.textHeight).attr("class","state-description"),o=!0,g=!0;e.descriptions.forEach(function(t){o||(a(d,t,g),g=!1),o=!1});let l=t.append("line").attr("x1",(0,n.D7)().state.padding).attr("y1",(0,n.D7)().state.padding+r+(0,n.D7)().state.dividerMargin/2).attr("y2",(0,n.D7)().state.padding+r+(0,n.D7)().state.dividerMargin/2).attr("class","descr-divider"),p=d.node().getBBox(),h=Math.max(p.width,i.width);return l.attr("x2",h+3*(0,n.D7)().state.padding),t.insert("rect",":first-child").attr("x",(0,n.D7)().state.padding).attr("y",(0,n.D7)().state.padding).attr("width",h+2*(0,n.D7)().state.padding).attr("height",p.height+r+2*(0,n.D7)().state.padding).attr("rx",(0,n.D7)().state.radius),t},"drawDescrState"),D=(0,s.K2)((t,e,a)=>{let i,r=(0,n.D7)().state.padding,d=2*(0,n.D7)().state.padding,s=t.node().getBBox(),o=s.width,g=s.x,l=t.append("text").attr("x",0).attr("y",(0,n.D7)().state.titleShift).attr("font-size",(0,n.D7)().state.fontSize).attr("class","state-title").text(e.id),p=l.node().getBBox().width+d,h=Math.max(p,o);h===o&&(h+=d);let c=t.node().getBBox();e.doc,i=g-r,p>o&&(i=(o-h)/2+r),Math.abs(g-c.x)<r&&p>o&&(i=g-(p-o)/2);let x=1-(0,n.D7)().state.textHeight;return t.insert("rect",":first-child").attr("x",i).attr("y",x).attr("class",a?"alt-composit":"composit").attr("width",h).attr("height",c.height+(0,n.D7)().state.textHeight+(0,n.D7)().state.titleShift+1).attr("rx","0"),l.attr("x",i+r),p<=o&&l.attr("x",g+(h-d)/2-p/2+r),t.insert("rect",":first-child").attr("x",i).attr("y",(0,n.D7)().state.titleShift-(0,n.D7)().state.textHeight-(0,n.D7)().state.padding).attr("width",h).attr("height",3*(0,n.D7)().state.textHeight).attr("rx",(0,n.D7)().state.radius),t.insert("rect",":first-child").attr("x",i).attr("y",(0,n.D7)().state.titleShift-(0,n.D7)().state.textHeight-(0,n.D7)().state.padding).attr("width",h).attr("height",c.height+3+2*(0,n.D7)().state.textHeight).attr("rx",(0,n.D7)().state.radius),t},"addTitleAndBox"),u=(0,s.K2)(t=>(t.append("circle").attr("class","end-state-outer").attr("r",(0,n.D7)().state.sizeUnit+(0,n.D7)().state.miniPadding).attr("cx",(0,n.D7)().state.padding+(0,n.D7)().state.sizeUnit+(0,n.D7)().state.miniPadding).attr("cy",(0,n.D7)().state.padding+(0,n.D7)().state.sizeUnit+(0,n.D7)().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",(0,n.D7)().state.sizeUnit).attr("cx",(0,n.D7)().state.padding+(0,n.D7)().state.sizeUnit+2).attr("cy",(0,n.D7)().state.padding+(0,n.D7)().state.sizeUnit+2)),"drawEndState"),f=(0,s.K2)((t,e)=>{let a=(0,n.D7)().state.forkWidth,i=(0,n.D7)().state.forkHeight;if(e.parentId){let t=a;a=i,i=t}return t.append("rect").style("stroke","black").style("fill","black").attr("width",a).attr("height",i).attr("x",(0,n.D7)().state.padding).attr("y",(0,n.D7)().state.padding)},"drawForkJoinState"),y=(0,s.K2)((t,e,a,i)=>{let r=0,d=i.append("text");d.style("text-anchor","start"),d.attr("class","noteText");let s=t.replace(/\r\n/g,"<br/>"),o=(s=s.replace(/\n/g,"<br/>")).split(n.Y2.lineBreakRegex),g=1.25*(0,n.D7)().state.noteMargin;for(let t of o){let i=t.trim();if(i.length>0){let t=d.append("tspan");t.text(i),0===g&&(g+=t.node().getBBox().height),r+=g,t.attr("x",e+(0,n.D7)().state.noteMargin),t.attr("y",a+r+1.25*(0,n.D7)().state.noteMargin)}}return{textWidth:d.node().getBBox().width,textHeight:r}},"_drawLongText"),w=(0,s.K2)((t,e)=>{e.attr("class","state-note");let a=e.append("rect").attr("x",0).attr("y",(0,n.D7)().state.padding),{textWidth:i,textHeight:r}=y(t,0,0,e.append("g"));return a.attr("height",r+2*(0,n.D7)().state.noteMargin),a.attr("width",i+2*(0,n.D7)().state.noteMargin),a},"drawNote"),m=(0,s.K2)(function(t,e){let a=e.id,i={id:a,label:e.id,width:0,height:0},r=t.append("g").attr("id",a).attr("class","stateGroup");"start"===e.type&&p(r),"end"===e.type&&u(r),("fork"===e.type||"join"===e.type)&&f(r,e),"note"===e.type&&w(e.note.text,r),"divider"===e.type&&h(r),"default"===e.type&&0===e.descriptions.length&&c(r,e),"default"===e.type&&e.descriptions.length>0&&x(r,e);let d=r.node().getBBox();return i.width=d.width+2*(0,n.D7)().state.padding,i.height=d.height+2*(0,n.D7)().state.padding,i},"drawState"),b=0,B=(0,s.K2)(function(t,e,a){let i=(0,s.K2)(function(t){switch(t){case r.u4.relationType.AGGREGATION:return"aggregation";case r.u4.relationType.EXTENSION:return"extension";case r.u4.relationType.COMPOSITION:return"composition";case r.u4.relationType.DEPENDENCY:return"dependency"}},"getRelationType");e.points=e.points.filter(t=>!Number.isNaN(t.y));let g=e.points,l=(0,o.n8j)().x(function(t){return t.x}).y(function(t){return t.y}).curve(o.qrM),p=t.append("path").attr("d",l(g)).attr("id","edge"+b).attr("class","transition"),h="";if((0,n.D7)().state.arrowMarkerAbsolute&&(h=(0,n.ID)(!0)),p.attr("marker-end","url("+h+"#"+i(r.u4.relationType.DEPENDENCY)+"End)"),void 0!==a.title){let i=t.append("g").attr("class","stateLabel"),{x:r,y:o}=d._K.calcLabelPosition(e.points),g=n.Y2.getRows(a.title),l=0,p=[],h=0,c=0;for(let t=0;t<=g.length;t++){let e=i.append("text").attr("text-anchor","middle").text(g[t]).attr("x",r).attr("y",o+l),a=e.node().getBBox();h=Math.max(h,a.width),c=Math.min(c,a.x),s.Rm.info(a.x,r,o+l),0===l&&(l=e.node().getBBox().height,s.Rm.info("Title height",l,o)),p.push(e)}let x=l*g.length;if(g.length>1){let t=(g.length-1)*l*.5;p.forEach((e,a)=>e.attr("y",o+a*l-t)),x=l*g.length}let D=i.node().getBBox();i.insert("rect",":first-child").attr("class","box").attr("x",r-h/2-(0,n.D7)().state.padding/2).attr("y",o-x/2-(0,n.D7)().state.padding/2-3.5).attr("width",h+(0,n.D7)().state.padding).attr("height",x+(0,n.D7)().state.padding),s.Rm.info(D)}b++},"drawEdge"),k={},N=(0,s.K2)(function(){},"setConf"),E=(0,s.K2)(function(t){t.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),S=(0,s.K2)(function(t,e,a,r){let d;i=(0,n.D7)().state;let g=(0,n.D7)().securityLevel;"sandbox"===g&&(d=(0,o.Ltv)("#i"+e));let l="sandbox"===g?(0,o.Ltv)(d.nodes()[0].contentDocument.body):(0,o.Ltv)("body"),p="sandbox"===g?d.nodes()[0].contentDocument:document;s.Rm.debug("Rendering diagram "+t);let h=l.select(`[id='${e}']`);E(h),v(r.db.getRootDoc(),h,void 0,!1,l,p,r);let c=i.padding,x=h.node().getBBox(),D=x.width+2*c,u=x.height+2*c;(0,n.a$)(h,u,1.75*D,i.useMaxWidth),h.attr("viewBox",`${x.x-i.padding} ${x.y-i.padding} `+D+" "+u)},"draw"),M=(0,s.K2)(t=>t?t.length*i.fontSizeFactor:1,"getLabelWidth"),v=(0,s.K2)((t,e,a,r,d,o,p)=>{let h,c=new l.T({compound:!0,multigraph:!0}),x=!0;for(h=0;h<t.length;h++)if("relation"===t[h].stmt){x=!1;break}a?c.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:x?1:i.edgeLengthFactor,nodeSep:x?1:50,isMultiGraph:!0}):c.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:x?1:i.edgeLengthFactor,nodeSep:x?1:50,ranker:"tight-tree",isMultiGraph:!0}),c.setDefaultEdgeLabel(function(){return{}});let u=p.db.getStates(),f=p.db.getRelations();for(let t of Object.keys(u)){let n,s=u[t];if(a&&(s.parentId=a),s.doc){let t=e.append("g").attr("id",s.id).attr("class","stateGroup");n=v(s.doc,t,s.id,!r,d,o,p);{let e=(t=D(t,s,r)).node().getBBox();n.width=e.width,n.height=e.height+i.padding/2,k[s.id]={y:i.compositTitleSize}}}else n=m(e,s,c);if(s.note){let t=m(e,{descriptions:[],id:s.id+"-note",note:s.note,type:"note"},c);"left of"===s.note.position?(c.setNode(n.id+"-note",t),c.setNode(n.id,n)):(c.setNode(n.id,n),c.setNode(n.id+"-note",t)),c.setParent(n.id,n.id+"-group"),c.setParent(n.id+"-note",n.id+"-group")}else c.setNode(n.id,n)}s.Rm.debug("Count=",c.nodeCount(),c);let y=0;f.forEach(function(t){y++,s.Rm.debug("Setting edge",t),c.setEdge(t.id1,t.id2,{relation:t,width:M(t.title),height:i.labelHeight*n.Y2.getRows(t.title).length,labelpos:"c"},"id"+y)}),(0,g.Zp)(c),s.Rm.debug("Graph after layout",c.nodes());let w=e.node();c.nodes().forEach(function(t){void 0!==t&&void 0!==c.node(t)?(s.Rm.warn("Node "+t+": "+JSON.stringify(c.node(t))),d.select("#"+w.id+" #"+t).attr("transform","translate("+(c.node(t).x-c.node(t).width/2)+","+(c.node(t).y+(k[t]?k[t].y:0)-c.node(t).height/2)+" )"),d.select("#"+w.id+" #"+t).attr("data-x-shift",c.node(t).x-c.node(t).width/2),o.querySelectorAll("#"+w.id+" #"+t+" .divider").forEach(t=>{let e=t.parentElement,a=0,i=0;e&&(e.parentElement&&(a=e.parentElement.getBBox().width),Number.isNaN(i=parseInt(e.getAttribute("data-x-shift"),10))&&(i=0)),t.setAttribute("x1",0-i+8),t.setAttribute("x2",a-i-8)})):s.Rm.debug("No Node "+t+": "+JSON.stringify(c.node(t)))});let b=w.getBBox();c.edges().forEach(function(t){void 0!==t&&void 0!==c.edge(t)&&(s.Rm.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(c.edge(t))),B(e,c.edge(t),c.edge(t).relation))});let N={id:a||"root",label:a||"root",width:0,height:0};return N.width=(b=w.getBBox()).width+2*i.padding,N.height=b.height+2*i.padding,s.Rm.debug("Doc rendered",N,c),N},"renderDoc"),K={parser:r.Zk,get db(){return new r.u4(1)},renderer:{setConf:N,draw:S},styles:r.tM,init:(0,s.K2)(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[54855],{54855:(e,r,t)=>{t.d(r,{diagram:()=>u});var a=t(63677);t(61052),t(37317),t(30944),t(17297),t(74303),t(85963),t(95952),t(3334),t(71409),t(98671),t(3386);var s=t(36416),u={parser:a.Zk,get db(){return new a.u4(2)},renderer:a.q7,styles:a.tM,init:(0,s.K2)(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[71558],{23574:(e,t,r)=>{r.d(t,{a:()=>l});var a=r(60098),s=r(34186),o=r(35613);function l(e){let{control:t,name:r,label:l,placeholder:n,type:i="text",min:d,max:c,disabled:u,description:m,isRequired:p=!1}=e;return(0,a.jsx)(o.u,{control:t,name:r,label:l,description:m,isRequired:p,children:e=>{var t;return(0,a.jsx)(s.p,{type:i,placeholder:n,min:d,max:c,disabled:u,...e,value:null!=(t=e.value)?t:"",onChange:t=>{let r=t.target.value;"number"===i?e.onChange(""===r?null:Number(r)):e.onChange(r)}})}})}},35613:(e,t,r)=>{r.d(t,{u:()=>o});var a=r(60098),s=r(86312);function o(e){let{control:t,name:r,label:o,children:l,description:n,rules:i,isRequired:d}=e;return(0,a.jsx)(s.zB,{control:t,name:r,rules:i,render:e=>{let{field:t}=e;return(0,a.jsxs)(s.eI,{className:"relative",children:[(0,a.jsx)(s.lR,{isRequired:d,children:o}),(0,a.jsx)(s.MJ,{children:l(t)}),n&&(0,a.jsx)(s.Rr,{children:n}),(0,a.jsx)(s.C5,{})]})}})}},35830:(e,t,r)=>{r.d(t,{Y:()=>s});var a=r(97555);let s=(0,a.createServerReference)("78c50a62b87997205a238fc8066e18a40524df95f4",a.callServer,void 0,a.findSourceMapURL,"updateMCPTool")},39475:(e,t,r)=>{r.d(t,{E:()=>i});var a=r(60098),s=r(97911),o=r(15625),l=r(52681);let n=(0,o.F)("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",primary:"border border-primary/50 text-primary bg-primary/5 rounded-sm p-0.5 px-1.5 font-mono",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",code:"text-xs text-muted-foreground border bg-muted/80 dark:bg-muted/50 rounded-sm p-0.5 px-1.5 font-mono",success:"text-xs text-muted-foreground border rounded-sm p-0.5 px-1.5 font-mono bg-emerald-50 border-emerald-200 text-emerald-800 dark:text-emerald-300 dark:bg-emerald-950/40 uppercase",error:"text-xs text-muted-foreground border rounded-sm p-0.5 px-1.5 font-mono bg-red-50 border-red-200 text-red-800 dark:border-red-700 dark:text-red-300 dark:bg-red-950/40 uppercase",warning:"text-xs text-muted-foreground border rounded-sm p-0.5 px-1.5 font-mono bg-amber-50 border-amber-200 text-amber-800 dark:border-amber-700 dark:text-amber-300 dark:bg-amber-950/40 uppercase",sky:"text-xs text-muted-foreground border rounded-sm p-0.5 px-1.5 font-mono bg-sky-50 border-sky-200 text-sky-800 dark:border-sky-700 dark:text-sky-300 dark:bg-sky-950/40",violet:"text-xs text-muted-foreground border rounded-sm p-0.5 px-1.5 font-mono bg-violet-50 border-violet-200 text-violet-800 dark:border-violet-700 dark:text-violet-300 dark:bg-violet-950/40",orange:"text-xs text-muted-foreground border rounded-sm p-0.5 px-1.5 font-mono bg-orange-50 border-orange-200 text-orange-800 dark:border-orange-700 dark:text-orange-300 dark:bg-orange-950/40"}},defaultVariants:{variant:"default"}});function i(e){let{className:t,variant:r,asChild:o=!1,...i}=e,d=o?s.DX:"span";return(0,a.jsx)(d,{"data-slot":"badge",className:(0,l.cn)(n({variant:r}),t),...i})}},57013:(e,t,r)=>{r.d(t,{X:()=>s});var a=r(97555);let s=(0,a.createServerReference)("7099d05438b84c1973f78521aa2784ea4599500a32",a.callServer,void 0,a.findSourceMapURL,"createMCPTool")},58514:(e,t,r)=>{r.d(t,{U:()=>l});var a=r(60098),s=r(96182),o=r(35613);function l(e){let{control:t,name:r,label:l,placeholder:n,options:i,disabled:d=!1,selectTriggerClassName:c,description:u,isRequired:m=!1}=e;return(0,a.jsx)(o.u,{control:t,name:r,label:l,description:u,isRequired:m,children:e=>(0,a.jsxs)(s.l6,{onValueChange:e.onChange,defaultValue:e.value,disabled:d,children:[(0,a.jsx)(s.bq,{disabled:d,className:c,children:(0,a.jsx)(s.yv,{placeholder:n})}),(0,a.jsx)(s.gC,{children:i.map(e=>(0,a.jsx)(s.eb,{value:e.value,disabled:e.disabled,children:e.label},e.value))})]})})}},71558:(e,t,r)=>{r.d(t,{MCPServerForm:()=>S});var a=r(60098),s=r(18979),o=r(36054),l=r(30953),n=r(93137),i=r(75983),d=r(32028),c=r(23574),u=r(58514),m=r(86714),p=r(86312),x=r(35830),b=r(57013),g=r(31184),f=r(27820),v=r(79178),h=r(39475),j=r(84661),y=r(31011);function k(e){let{control:t,name:r,label:s,availableTools:o=[],description:l,disabled:n=!1}=e,{field:{value:d,onChange:c},fieldState:{error:u}}=(0,i.as)({name:r,control:t}),x=(0,v.useMemo)(()=>"object"==typeof d&&null!==d&&"type"in d?"all"===d.type?{type:"all"}:"selective"===d.type&&Array.isArray(d.tools)?{type:"selective",tools:d.tools}:{type:"selective",tools:[]}:{type:"selective",tools:[]},[d]),b=()=>{c({type:"all"})},k=()=>{c({type:"selective",tools:[]})},N=(e,t)=>{if("all"===x.type){let r=o.map(e=>e.name).filter(t=>t!==e);c({type:"selective",tools:t?[...r,e]:r})}else c({type:"selective",tools:t?[...x.tools.filter(t=>t!==e),e]:x.tools.filter(t=>t!==e)})},w=()=>{switch(x.type){case"all":return o.length;case"selective":return x.tools.filter(e=>o.some(t=>t.name===e)).length;default:return 0}},C=w()===o.length;return(0,a.jsx)(p.zB,{control:t,name:r,render:()=>(0,a.jsxs)(p.eI,{children:[(0,a.jsxs)(p.lR,{children:[s,(0,a.jsx)(h.E,{variant:"code",className:"border-none px-2 text-[10px] text-muted-foreground",children:w()})]}),l&&(0,a.jsx)("p",{className:"text-sm text-muted-foreground",children:l}),(0,a.jsxs)("div",{className:"mt-2",children:[0===o.length&&(0,a.jsx)("div",{className:"text-sm text-muted-foreground border rounded-md p-3 py-2 bg-gray-100/80 dark:bg-sidebar",children:"No tools available from this server"}),o.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 justify-between py-3 px-6 rounded-t-lg border border-b-0",children:[(0,a.jsxs)("div",{className:"text-sm",children:[w()," ",(0,a.jsxs)("span",{className:"text-gray-400 dark:text-white/40",children:["/ ",o.length," tool",1===o.length?"":"s"]})]}),C?(0,a.jsxs)(m.$,{type:"button",variant:"outline",size:"sm",onClick:k,disabled:n,children:[(0,a.jsx)(g.A,{className:"w-4 h-4 text-muted-foreground"}),"Deselect all"]}):(0,a.jsxs)(m.$,{type:"button",variant:"outline",size:"sm",onClick:b,disabled:n,children:[(0,a.jsx)(f.A,{className:"w-4 h-4 text-muted-foreground"}),"Select all"]})]}),(0,a.jsx)("div",{className:"max-h-96 overflow-y-auto border rounded-lg rounded-t-none scrollbar-thin scrollbar-thumb-muted-foreground/30 dark:scrollbar-thumb-muted-foreground/50 scrollbar-track-transparent",children:o.map(e=>{let t=(e=>{switch(x.type){case"all":return o.some(t=>t.name===e);case"selective":return x.tools.includes(e)&&o.some(t=>t.name===e);default:return!1}})(e.name);return(0,a.jsxs)("div",{className:"space-y-2 flex items-start gap-6 border-b last:border-b-0 py-4 px-6 relative",children:[(0,a.jsx)("div",{className:"flex items-center h-[22px]",children:(0,a.jsx)(j.S,{checked:t,disabled:n,className:"mb-0",onClick:()=>!n&&N(e.name,!t)})}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)(h.E,{variant:t?"primary":"code",className:"font-mono font-medium text-xs cursor-pointer transition-colors ".concat(n?"opacity-50 cursor-not-allowed":""),onClick:()=>!n&&N(e.name,!t),children:e.name}),(0,a.jsxs)(y.Tooltip,{delayDuration:800,children:[(0,a.jsx)(y.TooltipTrigger,{asChild:!0,children:(0,a.jsx)("p",{className:"text-sm text-muted-foreground line-clamp-1",children:e.description})}),(0,a.jsx)(y.TooltipContent,{side:"bottom",align:"start",children:e.description})]})]})]},e.name)})})]})]}),(0,a.jsx)(p.C5,{children:null==u?void 0:u.message})]})})}var N=r(66030);let w=N.discriminatedUnion("type",[N.object({type:N.literal("all")}),N.object({type:N.literal("selective"),tools:N.array(N.string())})]),C=N.object({name:N.string().min(1,"Name is required."),config:N.object({type:N.literal("mcp"),mcp:N.object({server:N.object({url:N.string().url("Must be a valid URL.")}),transport:N.object({type:N.nativeEnum(o.o7)}),toolsConfig:w.default({type:"all"})})}),credentialReferenceId:N.string().nullish(),imageUrl:N.string().optional()}),R={name:"",config:{type:"mcp",mcp:{server:{url:""},transport:{type:o.o7.streamableHttp},toolsConfig:{type:"all"}}},imageUrl:"",credentialReferenceId:"none"};function S(e){let{initialData:t,mode:r="create",tool:g,credentials:f,tenantId:v,projectId:h}=e,j=(0,n.useRouter)(),y=(0,i.mN)({resolver:(0,s.u)(C),defaultValues:{...R,...t}}),{isSubmitting:N}=y.formState,w=async e=>{try{let t={...e,credentialReferenceId:"none"===e.credentialReferenceId?null:e.credentialReferenceId,config:{...e.config,mcp:{...e.config.mcp,activeTools:(e=>{var t;if("all"===e.type)return;let r=(null==g||null==(t=g.availableTools)?void 0:t.map(e=>e.name))||[];return e.tools.filter(e=>r.includes(e))})(e.config.mcp.toolsConfig)}}};if("update"===r&&g)await (0,x.Y)(v,h,g.id,t),d.oR.success("MCP server updated successfully"),j.push("/".concat(v,"/projects/").concat(h,"/mcp-servers/").concat(g.id));else{let e=await (0,b.X)(v,h,{...t,id:(0,l.Ak)()});d.oR.success("MCP server created successfully"),j.push("/".concat(v,"/projects/").concat(h,"/mcp-servers/").concat(e.id))}}catch(e){console.error("Failed to ".concat(r," MCP tool:"),e),d.oR.error("Failed to ".concat(r," MCP server. Please try again."))}};return(0,a.jsx)(p.lV,{...y,children:(0,a.jsxs)("form",{onSubmit:y.handleSubmit(w),className:"space-y-8",children:[(0,a.jsx)(c.a,{control:y.control,name:"name",label:"Name",placeholder:"MCP server",isRequired:!0}),(0,a.jsx)(c.a,{control:y.control,name:"config.mcp.server.url",label:"URL",placeholder:"https://api.example.com/mcp",isRequired:!0}),(0,a.jsx)(u.U,{control:y.control,selectTriggerClassName:"w-full",name:"config.mcp.transport.type",label:"Transport type",placeholder:"Select transport type",options:[{value:o.o7.streamableHttp,label:"Streamable HTTP"},{value:o.o7.sse,label:"Server-Sent Events (SSE)"}]}),(0,a.jsx)(c.a,{control:y.control,name:"imageUrl",label:"Image URL (optional)",placeholder:"https://example.com/icon.png or data:image/png;base64,..."}),(0,a.jsx)(u.U,{control:y.control,selectTriggerClassName:"w-full",name:"credentialReferenceId",label:"Credential",placeholder:"Select a credential",options:[{value:"none",label:"No Authentication"},...f.map(e=>({value:e.id,label:e.id}))]}),"update"===r&&(0,a.jsx)(k,{control:y.control,name:"config.mcp.toolsConfig",label:"Tools",availableTools:(null==g?void 0:g.availableTools)||[],description:"Select which tools should be enabled for this MCP server"}),(0,a.jsx)(m.$,{type:"submit",disabled:N,children:"update"===r?"Save":"Create"})]})})}},84661:(e,t,r)=>{r.d(t,{S:()=>n});var a=r(60098),s=r(11469),o=r(27820),l=r(52681);function n(e){let{className:t,...r}=e;return(0,a.jsx)(s.bL,{"data-slot":"checkbox",className:(0,l.cn)("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t),...r,children:(0,a.jsx)(s.C1,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:(0,a.jsx)(o.A,{className:"size-3.5"})})})}},86312:(e,t,r)=>{r.d(t,{C5:()=>v,MJ:()=>g,Rr:()=>f,eI:()=>x,lR:()=>b,lV:()=>d,zB:()=>u});var a=r(60098),s=r(97911),o=r(79178),l=r(75983),n=r(92752),i=r(52681);let d=l.Op,c=o.createContext({}),u=e=>{let{...t}=e;return(0,a.jsx)(c.Provider,{value:{name:t.name},children:(0,a.jsx)(l.xI,{...t})})},m=()=>{let e=o.useContext(c),t=o.useContext(p),{getFieldState:r}=(0,l.xW)(),a=(0,l.lN)({name:e.name}),s=r(e.name,a);if(!e)throw Error("useFormField should be used within <FormField>");let{id:n}=t;return{id:n,name:e.name,formItemId:"".concat(n,"-form-item"),formDescriptionId:"".concat(n,"-form-item-description"),formMessageId:"".concat(n,"-form-item-message"),...s}},p=o.createContext({});function x(e){let{className:t,...r}=e,s=o.useId();return(0,a.jsx)(p.Provider,{value:{id:s},children:(0,a.jsx)("div",{"data-slot":"form-item",className:(0,i.cn)("grid gap-2",t),...r})})}function b(e){let{className:t,isRequired:r,children:s,...o}=e,{error:l,formItemId:d}=m();return(0,a.jsxs)(n.J,{"data-slot":"form-label","data-error":!!l,className:(0,i.cn)("data-[error=true]:text-destructive gap-1",t),htmlFor:d,...o,children:[s,r&&(0,a.jsx)("span",{className:"text-red-500",children:"*"})]})}function g(e){let{...t}=e,{error:r,formItemId:o,formDescriptionId:l,formMessageId:n}=m();return(0,a.jsx)(s.DX,{"data-slot":"form-control",id:o,"aria-describedby":r?"".concat(l," ").concat(n):"".concat(l),"aria-invalid":!!r,...t})}function f(e){let{className:t,...r}=e,{formDescriptionId:s}=m();return(0,a.jsx)("p",{"data-slot":"form-description",id:s,className:(0,i.cn)("text-muted-foreground text-sm",t),...r})}function v(e){var t;let{className:r,...s}=e,{error:o,formMessageId:l}=m(),n=o?String(null!=(t=null==o?void 0:o.message)?t:""):s.children;return n?(0,a.jsx)("p",{"data-slot":"form-message",id:l,className:(0,i.cn)("text-destructive text-sm",r),...s,children:n}):null}},96182:(e,t,r)=>{r.d(t,{bq:()=>u,eb:()=>p,gC:()=>m,l6:()=>d,yv:()=>c});var a=r(60098),s=r(63436),o=r(6826),l=r(27820),n=r(5879),i=r(52681);function d(e){let{...t}=e;return(0,a.jsx)(s.bL,{"data-slot":"select",...t})}function c(e){let{...t}=e;return(0,a.jsx)(s.WT,{"data-slot":"select-value",...t})}function u(e){let{className:t,size:r="default",children:l,...n}=e;return(0,a.jsxs)(s.l9,{"data-slot":"select-trigger","data-size":r,className:(0,i.cn)("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 font-normal normal-case",t),...n,children:[l,(0,a.jsx)(s.In,{asChild:!0,children:(0,a.jsx)(o.A,{className:"size-4 opacity-50"})})]})}function m(e){let{className:t,children:r,position:o="popper",...l}=e;return(0,a.jsx)(s.ZL,{children:(0,a.jsxs)(s.UC,{"data-slot":"select-content",className:(0,i.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto scrollbar-thin scrollbar-thumb-muted-foreground/30 dark:scrollbar-thumb-muted-foreground/50 scrollbar-track-transparent rounded-md border shadow-md","popper"===o&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:o,...l,children:[(0,a.jsx)(x,{}),(0,a.jsx)(s.LM,{className:(0,i.cn)("p-1","popper"===o&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:r}),(0,a.jsx)(b,{})]})})}function p(e){let{className:t,children:r,...o}=e;return(0,a.jsxs)(s.q7,{"data-slot":"select-item",className:(0,i.cn)("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",t),...o,children:[(0,a.jsx)("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:(0,a.jsx)(s.VF,{children:(0,a.jsx)(l.A,{className:"size-4"})})}),(0,a.jsx)(s.p4,{children:r})]})}function x(e){let{className:t,...r}=e;return(0,a.jsx)(s.PP,{"data-slot":"select-scroll-up-button",className:(0,i.cn)("flex cursor-default items-center justify-center py-1",t),...r,children:(0,a.jsx)(n.A,{className:"size-4"})})}function b(e){let{className:t,...r}=e;return(0,a.jsx)(s.wn,{"data-slot":"select-scroll-down-button",className:(0,i.cn)("flex cursor-default items-center justify-center py-1",t),...r,children:(0,a.jsx)(o.A,{className:"size-4"})})}}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[71558],{23574:(e,t,r)=>{r.d(t,{a:()=>l});var a=r(60098),s=r(34186),o=r(35613);function l(e){let{control:t,name:r,label:l,placeholder:n,type:i="text",min:d,max:c,disabled:u,description:m,isRequired:p=!1}=e;return(0,a.jsx)(o.u,{control:t,name:r,label:l,description:m,isRequired:p,children:e=>{var t;return(0,a.jsx)(s.p,{type:i,placeholder:n,min:d,max:c,disabled:u,...e,value:null!=(t=e.value)?t:"",onChange:t=>{let r=t.target.value;"number"===i?e.onChange(""===r?null:Number(r)):e.onChange(r)}})}})}},28855:(e,t,r)=>{r.d(t,{X:()=>s});var a=r(97555);let s=(0,a.createServerReference)("700709510e0c6a43aec17f4fe57c1a85716207deb5",a.callServer,void 0,a.findSourceMapURL,"createMCPTool")},35613:(e,t,r)=>{r.d(t,{u:()=>o});var a=r(60098),s=r(86312);function o(e){let{control:t,name:r,label:o,children:l,description:n,rules:i,isRequired:d}=e;return(0,a.jsx)(s.zB,{control:t,name:r,rules:i,render:e=>{let{field:t}=e;return(0,a.jsxs)(s.eI,{className:"relative",children:[(0,a.jsx)(s.lR,{isRequired:d,children:o}),(0,a.jsx)(s.MJ,{children:l(t)}),n&&(0,a.jsx)(s.Rr,{children:n}),(0,a.jsx)(s.C5,{})]})}})}},39475:(e,t,r)=>{r.d(t,{E:()=>i});var a=r(60098),s=r(97911),o=r(15625),l=r(52681);let n=(0,o.F)("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",primary:"border border-primary/50 text-primary bg-primary/5 rounded-sm p-0.5 px-1.5 font-mono",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",code:"text-xs text-muted-foreground border bg-muted/80 dark:bg-muted/50 rounded-sm p-0.5 px-1.5 font-mono",success:"text-xs text-muted-foreground border rounded-sm p-0.5 px-1.5 font-mono bg-emerald-50 border-emerald-200 text-emerald-800 dark:text-emerald-300 dark:bg-emerald-950/40 uppercase",error:"text-xs text-muted-foreground border rounded-sm p-0.5 px-1.5 font-mono bg-red-50 border-red-200 text-red-800 dark:border-red-700 dark:text-red-300 dark:bg-red-950/40 uppercase",warning:"text-xs text-muted-foreground border rounded-sm p-0.5 px-1.5 font-mono bg-amber-50 border-amber-200 text-amber-800 dark:border-amber-700 dark:text-amber-300 dark:bg-amber-950/40 uppercase",sky:"text-xs text-muted-foreground border rounded-sm p-0.5 px-1.5 font-mono bg-sky-50 border-sky-200 text-sky-800 dark:border-sky-700 dark:text-sky-300 dark:bg-sky-950/40",violet:"text-xs text-muted-foreground border rounded-sm p-0.5 px-1.5 font-mono bg-violet-50 border-violet-200 text-violet-800 dark:border-violet-700 dark:text-violet-300 dark:bg-violet-950/40",orange:"text-xs text-muted-foreground border rounded-sm p-0.5 px-1.5 font-mono bg-orange-50 border-orange-200 text-orange-800 dark:border-orange-700 dark:text-orange-300 dark:bg-orange-950/40"}},defaultVariants:{variant:"default"}});function i(e){let{className:t,variant:r,asChild:o=!1,...i}=e,d=o?s.DX:"span";return(0,a.jsx)(d,{"data-slot":"badge",className:(0,l.cn)(n({variant:r}),t),...i})}},50657:(e,t,r)=>{r.d(t,{Y:()=>s});var a=r(97555);let s=(0,a.createServerReference)("78308080c1e3b5a711535b1ba2ee1e5a1a8ab3bef6",a.callServer,void 0,a.findSourceMapURL,"updateMCPTool")},58514:(e,t,r)=>{r.d(t,{U:()=>l});var a=r(60098),s=r(96182),o=r(35613);function l(e){let{control:t,name:r,label:l,placeholder:n,options:i,disabled:d=!1,selectTriggerClassName:c,description:u,isRequired:m=!1}=e;return(0,a.jsx)(o.u,{control:t,name:r,label:l,description:u,isRequired:m,children:e=>(0,a.jsxs)(s.l6,{onValueChange:e.onChange,defaultValue:e.value,disabled:d,children:[(0,a.jsx)(s.bq,{disabled:d,className:c,children:(0,a.jsx)(s.yv,{placeholder:n})}),(0,a.jsx)(s.gC,{children:i.map(e=>(0,a.jsx)(s.eb,{value:e.value,disabled:e.disabled,children:e.label},e.value))})]})})}},71558:(e,t,r)=>{r.d(t,{MCPServerForm:()=>S});var a=r(60098),s=r(18979),o=r(36054),l=r(30953),n=r(93137),i=r(75983),d=r(32028),c=r(23574),u=r(58514),m=r(86714),p=r(86312),x=r(50657),b=r(28855),g=r(31184),f=r(27820),v=r(79178),h=r(39475),j=r(84661),y=r(31011);function k(e){let{control:t,name:r,label:s,availableTools:o=[],description:l,disabled:n=!1}=e,{field:{value:d,onChange:c},fieldState:{error:u}}=(0,i.as)({name:r,control:t}),x=(0,v.useMemo)(()=>"object"==typeof d&&null!==d&&"type"in d?"all"===d.type?{type:"all"}:"selective"===d.type&&Array.isArray(d.tools)?{type:"selective",tools:d.tools}:{type:"selective",tools:[]}:{type:"selective",tools:[]},[d]),b=()=>{c({type:"all"})},k=()=>{c({type:"selective",tools:[]})},N=(e,t)=>{if("all"===x.type){let r=o.map(e=>e.name).filter(t=>t!==e);c({type:"selective",tools:t?[...r,e]:r})}else c({type:"selective",tools:t?[...x.tools.filter(t=>t!==e),e]:x.tools.filter(t=>t!==e)})},w=()=>{switch(x.type){case"all":return o.length;case"selective":return x.tools.filter(e=>o.some(t=>t.name===e)).length;default:return 0}},C=w()===o.length;return(0,a.jsx)(p.zB,{control:t,name:r,render:()=>(0,a.jsxs)(p.eI,{children:[(0,a.jsxs)(p.lR,{children:[s,(0,a.jsx)(h.E,{variant:"code",className:"border-none px-2 text-[10px] text-muted-foreground",children:w()})]}),l&&(0,a.jsx)("p",{className:"text-sm text-muted-foreground",children:l}),(0,a.jsxs)("div",{className:"mt-2",children:[0===o.length&&(0,a.jsx)("div",{className:"text-sm text-muted-foreground border rounded-md p-3 py-2 bg-gray-100/80 dark:bg-sidebar",children:"No tools available from this server"}),o.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 justify-between py-3 px-6 rounded-t-lg border border-b-0",children:[(0,a.jsxs)("div",{className:"text-sm",children:[w()," ",(0,a.jsxs)("span",{className:"text-gray-400 dark:text-white/40",children:["/ ",o.length," tool",1===o.length?"":"s"]})]}),C?(0,a.jsxs)(m.$,{type:"button",variant:"outline",size:"sm",onClick:k,disabled:n,children:[(0,a.jsx)(g.A,{className:"w-4 h-4 text-muted-foreground"}),"Deselect all"]}):(0,a.jsxs)(m.$,{type:"button",variant:"outline",size:"sm",onClick:b,disabled:n,children:[(0,a.jsx)(f.A,{className:"w-4 h-4 text-muted-foreground"}),"Select all"]})]}),(0,a.jsx)("div",{className:"max-h-96 overflow-y-auto border rounded-lg rounded-t-none scrollbar-thin scrollbar-thumb-muted-foreground/30 dark:scrollbar-thumb-muted-foreground/50 scrollbar-track-transparent",children:o.map(e=>{let t=(e=>{switch(x.type){case"all":return o.some(t=>t.name===e);case"selective":return x.tools.includes(e)&&o.some(t=>t.name===e);default:return!1}})(e.name);return(0,a.jsxs)("div",{className:"space-y-2 flex items-start gap-6 border-b last:border-b-0 py-4 px-6 relative",children:[(0,a.jsx)("div",{className:"flex items-center h-[22px]",children:(0,a.jsx)(j.S,{checked:t,disabled:n,className:"mb-0",onClick:()=>!n&&N(e.name,!t)})}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)(h.E,{variant:t?"primary":"code",className:"font-mono font-medium text-xs cursor-pointer transition-colors ".concat(n?"opacity-50 cursor-not-allowed":""),onClick:()=>!n&&N(e.name,!t),children:e.name}),(0,a.jsxs)(y.Tooltip,{delayDuration:800,children:[(0,a.jsx)(y.TooltipTrigger,{asChild:!0,children:(0,a.jsx)("p",{className:"text-sm text-muted-foreground line-clamp-1",children:e.description})}),(0,a.jsx)(y.TooltipContent,{side:"bottom",align:"start",children:e.description})]})]})]},e.name)})})]})]}),(0,a.jsx)(p.C5,{children:null==u?void 0:u.message})]})})}var N=r(66030);let w=N.discriminatedUnion("type",[N.object({type:N.literal("all")}),N.object({type:N.literal("selective"),tools:N.array(N.string())})]),C=N.object({name:N.string().min(1,"Name is required."),config:N.object({type:N.literal("mcp"),mcp:N.object({server:N.object({url:N.string().url("Must be a valid URL.")}),transport:N.object({type:N.nativeEnum(o.o7)}),toolsConfig:w.default({type:"all"})})}),credentialReferenceId:N.string().nullish(),imageUrl:N.string().optional()}),R={name:"",config:{type:"mcp",mcp:{server:{url:""},transport:{type:o.o7.streamableHttp},toolsConfig:{type:"all"}}},imageUrl:"",credentialReferenceId:"none"};function S(e){let{initialData:t,mode:r="create",tool:g,credentials:f,tenantId:v,projectId:h}=e,j=(0,n.useRouter)(),y=(0,i.mN)({resolver:(0,s.u)(C),defaultValues:{...R,...t}}),{isSubmitting:N}=y.formState,w=async e=>{try{let t={...e,credentialReferenceId:"none"===e.credentialReferenceId?null:e.credentialReferenceId,config:{...e.config,mcp:{...e.config.mcp,activeTools:(e=>{var t;if("all"===e.type)return;let r=(null==g||null==(t=g.availableTools)?void 0:t.map(e=>e.name))||[];return e.tools.filter(e=>r.includes(e))})(e.config.mcp.toolsConfig)}}};if("update"===r&&g)await (0,x.Y)(v,h,g.id,t),d.oR.success("MCP server updated successfully"),j.push("/".concat(v,"/projects/").concat(h,"/mcp-servers/").concat(g.id));else{let e=await (0,b.X)(v,h,{...t,id:(0,l.Ak)()});d.oR.success("MCP server created successfully"),j.push("/".concat(v,"/projects/").concat(h,"/mcp-servers/").concat(e.id))}}catch(e){console.error("Failed to ".concat(r," MCP tool:"),e),d.oR.error("Failed to ".concat(r," MCP server. Please try again."))}};return(0,a.jsx)(p.lV,{...y,children:(0,a.jsxs)("form",{onSubmit:y.handleSubmit(w),className:"space-y-8",children:[(0,a.jsx)(c.a,{control:y.control,name:"name",label:"Name",placeholder:"MCP server",isRequired:!0}),(0,a.jsx)(c.a,{control:y.control,name:"config.mcp.server.url",label:"URL",placeholder:"https://api.example.com/mcp",isRequired:!0}),(0,a.jsx)(u.U,{control:y.control,selectTriggerClassName:"w-full",name:"config.mcp.transport.type",label:"Transport type",placeholder:"Select transport type",options:[{value:o.o7.streamableHttp,label:"Streamable HTTP"},{value:o.o7.sse,label:"Server-Sent Events (SSE)"}]}),(0,a.jsx)(c.a,{control:y.control,name:"imageUrl",label:"Image URL (optional)",placeholder:"https://example.com/icon.png or data:image/png;base64,..."}),(0,a.jsx)(u.U,{control:y.control,selectTriggerClassName:"w-full",name:"credentialReferenceId",label:"Credential",placeholder:"Select a credential",options:[{value:"none",label:"No Authentication"},...f.map(e=>({value:e.id,label:e.id}))]}),"update"===r&&(0,a.jsx)(k,{control:y.control,name:"config.mcp.toolsConfig",label:"Tools",availableTools:(null==g?void 0:g.availableTools)||[],description:"Select which tools should be enabled for this MCP server"}),(0,a.jsx)(m.$,{type:"submit",disabled:N,children:"update"===r?"Save":"Create"})]})})}},84661:(e,t,r)=>{r.d(t,{S:()=>n});var a=r(60098),s=r(11469),o=r(27820),l=r(52681);function n(e){let{className:t,...r}=e;return(0,a.jsx)(s.bL,{"data-slot":"checkbox",className:(0,l.cn)("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t),...r,children:(0,a.jsx)(s.C1,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:(0,a.jsx)(o.A,{className:"size-3.5"})})})}},86312:(e,t,r)=>{r.d(t,{C5:()=>v,MJ:()=>g,Rr:()=>f,eI:()=>x,lR:()=>b,lV:()=>d,zB:()=>u});var a=r(60098),s=r(97911),o=r(79178),l=r(75983),n=r(92752),i=r(52681);let d=l.Op,c=o.createContext({}),u=e=>{let{...t}=e;return(0,a.jsx)(c.Provider,{value:{name:t.name},children:(0,a.jsx)(l.xI,{...t})})},m=()=>{let e=o.useContext(c),t=o.useContext(p),{getFieldState:r}=(0,l.xW)(),a=(0,l.lN)({name:e.name}),s=r(e.name,a);if(!e)throw Error("useFormField should be used within <FormField>");let{id:n}=t;return{id:n,name:e.name,formItemId:"".concat(n,"-form-item"),formDescriptionId:"".concat(n,"-form-item-description"),formMessageId:"".concat(n,"-form-item-message"),...s}},p=o.createContext({});function x(e){let{className:t,...r}=e,s=o.useId();return(0,a.jsx)(p.Provider,{value:{id:s},children:(0,a.jsx)("div",{"data-slot":"form-item",className:(0,i.cn)("grid gap-2",t),...r})})}function b(e){let{className:t,isRequired:r,children:s,...o}=e,{error:l,formItemId:d}=m();return(0,a.jsxs)(n.J,{"data-slot":"form-label","data-error":!!l,className:(0,i.cn)("data-[error=true]:text-destructive gap-1",t),htmlFor:d,...o,children:[s,r&&(0,a.jsx)("span",{className:"text-red-500",children:"*"})]})}function g(e){let{...t}=e,{error:r,formItemId:o,formDescriptionId:l,formMessageId:n}=m();return(0,a.jsx)(s.DX,{"data-slot":"form-control",id:o,"aria-describedby":r?"".concat(l," ").concat(n):"".concat(l),"aria-invalid":!!r,...t})}function f(e){let{className:t,...r}=e,{formDescriptionId:s}=m();return(0,a.jsx)("p",{"data-slot":"form-description",id:s,className:(0,i.cn)("text-muted-foreground text-sm",t),...r})}function v(e){var t;let{className:r,...s}=e,{error:o,formMessageId:l}=m(),n=o?String(null!=(t=null==o?void 0:o.message)?t:""):s.children;return n?(0,a.jsx)("p",{"data-slot":"form-message",id:l,className:(0,i.cn)("text-destructive text-sm",r),...s,children:n}):null}},96182:(e,t,r)=>{r.d(t,{bq:()=>u,eb:()=>p,gC:()=>m,l6:()=>d,yv:()=>c});var a=r(60098),s=r(63436),o=r(6826),l=r(27820),n=r(5879),i=r(52681);function d(e){let{...t}=e;return(0,a.jsx)(s.bL,{"data-slot":"select",...t})}function c(e){let{...t}=e;return(0,a.jsx)(s.WT,{"data-slot":"select-value",...t})}function u(e){let{className:t,size:r="default",children:l,...n}=e;return(0,a.jsxs)(s.l9,{"data-slot":"select-trigger","data-size":r,className:(0,i.cn)("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 font-normal normal-case",t),...n,children:[l,(0,a.jsx)(s.In,{asChild:!0,children:(0,a.jsx)(o.A,{className:"size-4 opacity-50"})})]})}function m(e){let{className:t,children:r,position:o="popper",...l}=e;return(0,a.jsx)(s.ZL,{children:(0,a.jsxs)(s.UC,{"data-slot":"select-content",className:(0,i.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto scrollbar-thin scrollbar-thumb-muted-foreground/30 dark:scrollbar-thumb-muted-foreground/50 scrollbar-track-transparent rounded-md border shadow-md","popper"===o&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:o,...l,children:[(0,a.jsx)(x,{}),(0,a.jsx)(s.LM,{className:(0,i.cn)("p-1","popper"===o&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:r}),(0,a.jsx)(b,{})]})})}function p(e){let{className:t,children:r,...o}=e;return(0,a.jsxs)(s.q7,{"data-slot":"select-item",className:(0,i.cn)("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",t),...o,children:[(0,a.jsx)("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:(0,a.jsx)(s.VF,{children:(0,a.jsx)(l.A,{className:"size-4"})})}),(0,a.jsx)(s.p4,{children:r})]})}function x(e){let{className:t,...r}=e;return(0,a.jsx)(s.PP,{"data-slot":"select-scroll-up-button",className:(0,i.cn)("flex cursor-default items-center justify-center py-1",t),...r,children:(0,a.jsx)(n.A,{className:"size-4"})})}function b(e){let{className:t,...r}=e;return(0,a.jsx)(s.wn,{"data-slot":"select-scroll-down-button",className:(0,i.cn)("flex cursor-default items-center justify-center py-1",t),...r,children:(0,a.jsx)(o.A,{className:"size-4"})})}}}]);
|