@aalis/plugin-webui-client 0.3.0 → 0.4.1

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.
Files changed (62) hide show
  1. package/dist/assets/AuthorityPage-C21ovg99.js +12 -0
  2. package/dist/assets/{DynamicPage-Btwp6tND.js → DynamicPage-BjVDU5B_.js} +1 -1
  3. package/dist/assets/{FilesPage-Co_hAqZL.js → FilesPage-BGZJtahO.js} +1 -1
  4. package/dist/assets/MarketplacePage-9fRwgBeV.js +18 -0
  5. package/dist/assets/{PlatformPage-BHvObjEh.js → PlatformPage-Cj0TiG1T.js} +1 -1
  6. package/dist/assets/{PluginConfigPage-BHKSlJpz.js → PluginConfigPage-C3ik4uHI.js} +1 -1
  7. package/dist/assets/{SessionsPage-BM_ZInO9.js → SessionsPage-MeiGuGtS.js} +1 -1
  8. package/dist/assets/{arc-D6pe4Hbz.js → arc-BwVjnPVb.js} +1 -1
  9. package/dist/assets/{architectureDiagram-3BPJPVTR-CwoqzY-x.js → architectureDiagram-3BPJPVTR-DEZLwiAK.js} +1 -1
  10. package/dist/assets/{blockDiagram-GPEHLZMM-Irsp4tTR.js → blockDiagram-GPEHLZMM-CZ-Ur4Do.js} +1 -1
  11. package/dist/assets/{c4Diagram-AAUBKEIU-CBEYi4cc.js → c4Diagram-AAUBKEIU-BrWPxX4f.js} +1 -1
  12. package/dist/assets/channel-C9SCdcK6.js +1 -0
  13. package/dist/assets/{chunk-2J33WTMH-C0BXcLLA.js → chunk-2J33WTMH-DX8VUhe0.js} +1 -1
  14. package/dist/assets/{chunk-4BX2VUAB-g2_kd4Jk.js → chunk-4BX2VUAB-O0Ahe-nx.js} +1 -1
  15. package/dist/assets/{chunk-55IACEB6-7Gvl0Bkc.js → chunk-55IACEB6-CBqrnhNz.js} +1 -1
  16. package/dist/assets/{chunk-727SXJPM-B6zCFbQ8.js → chunk-727SXJPM-Dooc2RYO.js} +1 -1
  17. package/dist/assets/{chunk-AQP2D5EJ-j5PrmMkv.js → chunk-AQP2D5EJ-DYpwwwje.js} +1 -1
  18. package/dist/assets/{chunk-FMBD7UC4-COJ16id3.js → chunk-FMBD7UC4-BGqxhWb0.js} +1 -1
  19. package/dist/assets/{chunk-ND2GUHAM-BuUYHFRS.js → chunk-ND2GUHAM-D277WP9X.js} +1 -1
  20. package/dist/assets/{chunk-QZHKN3VN-ZjgqnbA7.js → chunk-QZHKN3VN-CT8yoXC6.js} +1 -1
  21. package/dist/assets/classDiagram-4FO5ZUOK-DOVv21Jy.js +1 -0
  22. package/dist/assets/classDiagram-v2-Q7XG4LA2-DOVv21Jy.js +1 -0
  23. package/dist/assets/{clock-DwR8n9tr.js → clock-CM3-4qHr.js} +1 -1
  24. package/dist/assets/{cose-bilkent-S5V4N54A-cReoleHO.js → cose-bilkent-S5V4N54A-f2K2cI69.js} +1 -1
  25. package/dist/assets/{dagre-BM42HDAG-C5LVDRy-.js → dagre-BM42HDAG-DVM7tUDZ.js} +1 -1
  26. package/dist/assets/{diagram-2AECGRRQ-DJOINugO.js → diagram-2AECGRRQ-CnuaCaac.js} +1 -1
  27. package/dist/assets/{diagram-5GNKFQAL-C8TVmed8.js → diagram-5GNKFQAL-CnJvWU3Y.js} +1 -1
  28. package/dist/assets/{diagram-KO2AKTUF-DR6Lpt-U.js → diagram-KO2AKTUF-BLptaDQU.js} +1 -1
  29. package/dist/assets/{diagram-LMA3HP47-CAEsJvxV.js → diagram-LMA3HP47-DwMqgSJr.js} +1 -1
  30. package/dist/assets/{diagram-OG6HWLK6-DNlFytdX.js → diagram-OG6HWLK6-D3oRIeFt.js} +1 -1
  31. package/dist/assets/{erDiagram-TEJ5UH35-dTcBWcN8.js → erDiagram-TEJ5UH35-CNcQqYpF.js} +1 -1
  32. package/dist/assets/{flowDiagram-I6XJVG4X-SW6akebO.js → flowDiagram-I6XJVG4X-DjKDuqZi.js} +1 -1
  33. package/dist/assets/{ganttDiagram-6RSMTGT7-B71E4ziX.js → ganttDiagram-6RSMTGT7-D_SfkzXd.js} +1 -1
  34. package/dist/assets/{gitGraphDiagram-PVQCEYII-G5JbRXuE.js → gitGraphDiagram-PVQCEYII-DZXOY3n1.js} +1 -1
  35. package/dist/assets/{globe-Oit0H-sq.js → globe-ZjSUDGkM.js} +1 -1
  36. package/dist/assets/{index-BMsEuqd2.js → index-BtvzdAkg.js} +3 -3
  37. package/dist/assets/{infoDiagram-5YYISTIA-D7RpU2L_.js → infoDiagram-5YYISTIA-BtZu2HFx.js} +1 -1
  38. package/dist/assets/{ishikawaDiagram-YF4QCWOH-CLlHnGiA.js → ishikawaDiagram-YF4QCWOH-DE9OWNCV.js} +1 -1
  39. package/dist/assets/{journeyDiagram-JHISSGLW-BWXhFrMd.js → journeyDiagram-JHISSGLW-CxCNcl7b.js} +1 -1
  40. package/dist/assets/{kanban-definition-UN3LZRKU-DjLAo6uR.js → kanban-definition-UN3LZRKU-BffFNUsp.js} +1 -1
  41. package/dist/assets/{linear-DpLQBdv5.js → linear-DUpLrJcH.js} +1 -1
  42. package/dist/assets/{mermaid.core-CWJzgNYH.js → mermaid.core-C4yLb7RL.js} +4 -4
  43. package/dist/assets/{mindmap-definition-RKZ34NQL-CJ4SQsGL.js → mindmap-definition-RKZ34NQL-DksewSBD.js} +1 -1
  44. package/dist/assets/{pieDiagram-4H26LBE5-CboKAR99.js → pieDiagram-4H26LBE5-Ds7OlWF6.js} +1 -1
  45. package/dist/assets/{quadrantDiagram-W4KKPZXB-BTldUqBZ.js → quadrantDiagram-W4KKPZXB-UgAvx7yF.js} +1 -1
  46. package/dist/assets/{requirementDiagram-4Y6WPE33-C7aQ4LbM.js → requirementDiagram-4Y6WPE33-B5Sw7FP8.js} +1 -1
  47. package/dist/assets/{sankeyDiagram-5OEKKPKP-BMHf3LL5.js → sankeyDiagram-5OEKKPKP-DxGWLNGd.js} +1 -1
  48. package/dist/assets/{sequenceDiagram-3UESZ5HK-cfTljl81.js → sequenceDiagram-3UESZ5HK-CHqT38WG.js} +1 -1
  49. package/dist/assets/{stateDiagram-AJRCARHV-Cps0x7Iw.js → stateDiagram-AJRCARHV-DsYWHqWu.js} +1 -1
  50. package/dist/assets/{stateDiagram-v2-BHNVJYJU-BjG2G_-k.js → stateDiagram-v2-BHNVJYJU-21wlVsrt.js} +1 -1
  51. package/dist/assets/{timeline-definition-PNZ67QCA-Dp4N6YCQ.js → timeline-definition-PNZ67QCA-BKKFXrRi.js} +1 -1
  52. package/dist/assets/{vennDiagram-CIIHVFJN-DmrsUzs9.js → vennDiagram-CIIHVFJN-BzHfDvxM.js} +1 -1
  53. package/dist/assets/{wardley-L42UT6IY-DNaqJg7q.js → wardley-L42UT6IY-DYWHt89G.js} +1 -1
  54. package/dist/assets/{wardleyDiagram-YWT4CUSO-C8gGZC7a.js → wardleyDiagram-YWT4CUSO-CUhBHZtC.js} +1 -1
  55. package/dist/assets/{xychartDiagram-2RQKCTM6-C_FbZJcp.js → xychartDiagram-2RQKCTM6-D5YhbInB.js} +1 -1
  56. package/dist/index.html +1 -1
  57. package/package.json +9 -9
  58. package/dist/assets/AuthorityPage-BodQ2Fvh.js +0 -12
  59. package/dist/assets/MarketplacePage-B0lQ5lTU.js +0 -23
  60. package/dist/assets/channel-hakHuzxv.js +0 -1
  61. package/dist/assets/classDiagram-4FO5ZUOK-DroIm4A8.js +0 -1
  62. package/dist/assets/classDiagram-v2-Q7XG4LA2-DroIm4A8.js +0 -1
@@ -0,0 +1,12 @@
1
+ import{r as t,j as s}from"./react-vendor-BPQixOLZ.js";import{c as X,p as d,C as ms,W as ps}from"./index-BtvzdAkg.js";import{C as us}from"./clock-CM3-4qHr.js";import"./highlight-DJvvuuwd.js";import"./katex-Bq6vt64r.js";import"./markdown-BCywGHw2.js";/**
2
+ * @license lucide-react v1.7.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const xs=[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]],js=X("crown",xs);/**
7
+ * @license lucide-react v1.7.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */const gs=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],ys=X("user",gs),g=i=>i.split(",").map(N=>N.trim()).filter(Boolean),m=i=>i instanceof Error?i.message:String(i);function Cs(){var F,R,V;const[i,N]=t.useState(null),[I,E]=t.useState(!0),[T,B]=t.useState(""),[o,Y]=t.useState(new Set(["users"])),y=e=>{Y(a=>{const l=new Set(a);return l.has(e)?l.delete(e):l.add(e),l})},[h,v]=t.useState(null),[p,f]=t.useState(null),[$,G]=t.useState(null),[c,b]=t.useState({platform:"",userId:"",grant:"",deny:""}),[O,M]=t.useState(!1),[j,S]=t.useState({platform:"",userId:""}),[P,W]=t.useState(!1),[Z,U]=t.useState(!1),[w,L]=t.useState({restricted:"",denied:""}),[ss,z]=t.useState(!1),[k,D]=t.useState({allow:"",duration:0}),r=t.useCallback(async()=>{var e,a;E(!0);try{const l=await d("@aalis/plugin-authority","getOverview");N(l),L({restricted:(l.restrictedCapabilities??[]).join(", "),denied:(l.deniedCapabilities??[]).join(", ")}),D({allow:(((e=l.restrictedPolicy)==null?void 0:e.allow)??[]).join(", "),duration:((a=l.restrictedPolicy)==null?void 0:a.duration)??0})}catch{N(null)}E(!1)},[]);t.useEffect(()=>{r()},[r]);const n=e=>{B(e),setTimeout(()=>B(""),2e3)},es=async()=>{if(h)try{await d("@aalis/plugin-authority","setUserCapabilities",{platform:h.platform,userId:h.userId,grant:g(h.grant),deny:g(h.deny)}),n(`已更新 ${h.platform}:${h.userId} 的委托`),v(null),r()}catch(e){n(m(e))}},as=async()=>{if(p)try{await d("@aalis/plugin-authority","setPassword",{platform:p.platform,userId:p.userId,password:p.password}),n(`已更新 ${p.platform}:${p.userId} 的密码`),f(null),r()}catch(e){n(m(e))}},is=async(e,a)=>{try{await d("@aalis/plugin-authority","deleteUser",{platform:e,userId:a}),n(`已删除 ${e}:${a}`),r()}catch(l){n(m(l))}},ns=async()=>{if(!(!c.platform||!c.userId))try{await d("@aalis/plugin-authority","setUserCapabilities",{platform:c.platform,userId:c.userId,grant:g(c.grant),deny:g(c.deny)}),n(`已添加 ${c.platform}:${c.userId}`),b({platform:"",userId:"",grant:"",deny:""}),M(!1),r()}catch(e){n(m(e))}},ls=async()=>{try{const e=await d("@aalis/plugin-authority","createBindCode");G(e)}catch(e){n(m(e))}},ts=async(e,a)=>{try{await d("@aalis/plugin-authority","unlinkIdentity",{platform:e,userId:a}),n(`已解绑 ${e}:${a}`),r()}catch(l){n(m(l))}},cs=async()=>{if(!(!i||!j.platform||!j.userId))try{const e=[...i.owners,{platform:j.platform,userId:j.userId}];await d("@aalis/plugin-authority","setOwners",{owners:e}),S({platform:"",userId:""}),W(!1),n("Owner 已添加"),r()}catch(e){n(m(e))}},rs=async e=>{if(i)try{const a=i.owners.filter((l,C)=>C!==e);await d("@aalis/plugin-authority","setOwners",{owners:a}),n("Owner 已移除"),r()}catch(a){n(m(a))}},A=async(e,a)=>{try{await d("@aalis/plugin-authority","setVisibilityOverride",{name:e,visibility:a}),n(a?`${e} → ${a}`:`${e} 已恢复默认`),r()}catch(l){n(m(l))}},ds=async()=>{try{await d("@aalis/plugin-authority","setConfig",{restrictedCapabilities:g(w.restricted),deniedCapabilities:g(w.denied)}),U(!1),n("能力清单已保存"),r()}catch(e){n(m(e))}},os=async()=>{try{await d("@aalis/plugin-authority","setRestrictedPolicy",{policy:{allow:g(k.allow),duration:k.duration}}),z(!1),n("临时放行策略已保存"),r()}catch(e){n(m(e))}},hs=async e=>{try{await d("@aalis/plugin-authority","revokeTemporaryGrant",{id:e}),n("已撤销临时委托"),r()}catch(a){n(m(a))}};if(I&&!i)return s.jsx("div",{className:"page-content",children:s.jsx("div",{className:"empty-hint",children:"加载中..."})});if(!i)return s.jsx("div",{className:"page-content",children:s.jsx("div",{className:"empty-hint",children:"获取权限数据失败"})});const _=e=>{const a=Object.prototype.hasOwnProperty.call(i.visibilityOverrides,e.name);return s.jsxs("div",{className:`authority-cmd-row ${a?"overridden":""}`,children:[s.jsxs("span",{className:"authority-cmd-name",title:e.name,children:[e.displayName??e.name,a&&s.jsx("span",{style:{marginLeft:4,color:"#f59e0b",fontSize:11},title:"已被 owner 覆盖(非插件默认)",children:"●"})]}),s.jsx("span",{children:s.jsx("span",{className:`authority-safety-tag ${e.visibility}`,children:e.visibility})}),s.jsxs("span",{className:"authority-actions",children:[s.jsx("button",{className:`btn btn-sm ${e.visibility==="public"?"btn-primary":""}`,onClick:()=>A(e.name,"public"),title:"任何人默认可用",children:"public"}),s.jsx("button",{className:`btn btn-sm ${e.visibility==="restricted"?"btn-primary":""}`,onClick:()=>A(e.name,"restricted"),title:"默认禁用,需显式授予",children:"restricted"}),a&&s.jsx("button",{className:"btn btn-sm",onClick:()=>A(e.name,""),title:"恢复插件声明的默认可见性",children:"默认"})]})]},e.key)};return s.jsxs("div",{className:"page-content page-authority",children:[T&&s.jsx("div",{className:"toast",children:T}),s.jsx("datalist",{id:"authority-platforms",children:(i.platforms??[]).map(e=>s.jsx("option",{value:e},e))}),s.jsx("div",{className:"section-label",children:"概览"}),s.jsxs("div",{className:"overview-grid",children:[s.jsxs("div",{className:"overview-card",children:[s.jsx("div",{className:"overview-card-icon",children:s.jsx(ys,{size:20})}),s.jsxs("div",{className:"overview-card-body",children:[s.jsx("div",{className:"overview-card-label",children:"用户"}),s.jsx("div",{className:"overview-card-value",children:i.users.length})]})]}),s.jsxs("div",{className:"overview-card",children:[s.jsx("div",{className:"overview-card-icon",children:s.jsx(js,{size:20})}),s.jsxs("div",{className:"overview-card-body",children:[s.jsx("div",{className:"overview-card-label",children:"Owner"}),s.jsx("div",{className:"overview-card-value",children:i.owners.length})]})]}),s.jsxs("div",{className:"overview-card",children:[s.jsx("div",{className:"overview-card-icon",children:s.jsx(ms,{size:20})}),s.jsxs("div",{className:"overview-card-body",children:[s.jsx("div",{className:"overview-card-label",children:"指令"}),s.jsx("div",{className:"overview-card-value",children:i.commands.length})]})]}),s.jsxs("div",{className:"overview-card",children:[s.jsx("div",{className:"overview-card-icon",children:s.jsx(ps,{size:20})}),s.jsxs("div",{className:"overview-card-body",children:[s.jsx("div",{className:"overview-card-label",children:"工具"}),s.jsx("div",{className:"overview-card-value",children:i.tools.length})]})]}),s.jsxs("div",{className:"overview-card",children:[s.jsx("div",{className:"overview-card-icon",children:s.jsx(us,{size:20})}),s.jsxs("div",{className:"overview-card-body",children:[s.jsx("div",{className:"overview-card-label",children:"临时委托"}),s.jsx("div",{className:"overview-card-value",children:i.temporaryGrants.length})]})]})]}),s.jsxs("div",{className:"config-block",children:[s.jsxs("div",{className:"config-block-header",onClick:()=>y("users"),children:[s.jsx("span",{className:"config-block-title",children:"用户与委托"}),s.jsx("span",{className:"config-block-hint",children:"为用户授予受限能力或拒绝能力(glob);deny > owner(*) > public > grant"}),s.jsx("span",{className:`config-block-toggle ${o.has("users")?"open":""}`,children:"▶"})]}),o.has("users")&&s.jsxs("div",{className:"config-block-body",style:{padding:0},children:[s.jsxs("div",{style:{padding:"8px 12px",display:"flex",gap:6,flexWrap:"wrap"},children:[s.jsx("button",{className:"btn-sm",onClick:()=>M(!O),children:O?"取消":"+ 添加用户"}),s.jsx("button",{className:"btn-sm",title:"把某个平台账号(如 QQ)绑定到当前 WebUI 账户:绑定后该平台账号的权限并入本账户,相当于声明二者是同一个人,便于跨平台统一管理权限。",onClick:ls,children:"绑定平台账号"}),s.jsx("button",{className:"btn-sm",onClick:r,disabled:I,children:I?"刷新中...":"刷新"})]}),$&&s.jsxs("div",{className:"authority-user-expand",style:{borderTop:"1px solid var(--border)"},children:[s.jsx("label",{children:"绑定码(一次性,限时有效;重复生成会作废旧码)"}),s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[s.jsx("code",{style:{fontSize:18,letterSpacing:2},children:$.code}),s.jsx("button",{className:"btn-sm",onClick:()=>G(null),children:"关闭"})]}),s.jsx("label",{children:$.hint}),s.jsxs("p",{style:{margin:"6px 0 0",fontSize:12,color:"var(--text-muted)"},children:["用要绑定的平台账号",s.jsx("strong",{children:"私聊"}),"机器人发送该码(私聊防止码被他人冒用)。绑定后,该平台账号的请求按本账户的权限处理;其原有权限会并入本账户(拒绝项取并集,防「换账号洗白封禁」)。可随时在用户行点 × 解绑还原。"]})]}),O&&s.jsxs("div",{className:"authority-add-form",style:{padding:"0 12px 8px"},children:[s.jsx("input",{className:"config-edit-input",placeholder:"平台 (如 onebot / webui)",list:"authority-platforms",value:c.platform,onChange:e=>b(a=>({...a,platform:e.target.value}))}),s.jsx("input",{className:"config-edit-input",placeholder:"用户 ID",value:c.userId,onChange:e=>b(a=>({...a,userId:e.target.value}))}),s.jsx("input",{className:"config-edit-input",placeholder:"授予 grant(逗号分隔 glob,可空)",title:"如 tool:file.*, command:deploy",value:c.grant,onChange:e=>b(a=>({...a,grant:e.target.value}))}),s.jsx("input",{className:"config-edit-input",placeholder:"拒绝 deny(逗号分隔 glob,可空)",title:"如 tool:shell.*",value:c.deny,onChange:e=>b(a=>({...a,deny:e.target.value}))}),s.jsx("button",{className:"btn btn-primary btn-sm",onClick:ns,disabled:!c.platform||!c.userId,children:"确认"})]}),i.users.length===0?s.jsx("div",{className:"empty-hint",style:{padding:"0 12px 12px"},children:"暂无用户记录。public 能力对所有人默认开放,无需登记。"}):s.jsxs("div",{className:"authority-cmd-list",children:[s.jsxs("div",{className:"authority-cmd-header authority-user-header",children:[s.jsx("span",{children:"平台"}),s.jsx("span",{children:"身份 / 委托"}),s.jsx("span",{children:"操作"})]}),i.users.map(e=>{var q,J,K;const a=`${e.platform}:${e.userId}`,l=h&&h.platform===e.platform&&h.userId===e.userId,C=p&&p.platform===e.platform&&p.userId===e.userId,H=((q=e.grant)==null?void 0:q.length)??0,Q=((J=e.deny)==null?void 0:J.length)??0;return s.jsxs("div",{children:[s.jsxs("div",{className:"authority-cmd-row authority-user-row",children:[s.jsx("span",{className:"authority-cell-platform",children:e.platform}),s.jsxs("span",{className:"authority-cell-id",children:[e.userId,e.isOwner&&s.jsx("span",{className:"authority-user-flag owner",title:"Owner(拥有全部能力 *)",children:"owner"}),e.hasPassword&&s.jsx("span",{className:"authority-user-flag",title:"可登录账户(已设密码)",children:"账户"}),H||Q?s.jsxs("span",{className:"authority-user-flag",title:`授予: ${(e.grant??[]).join(", ")||"无"}
12
+ 拒绝: ${(e.deny??[]).join(", ")||"无"}`,children:["+",H," / −",Q]}):null,e.grantedBy&&s.jsxs("span",{className:"authority-user-flag",title:"委托来源(上级授予者),构成委托树",children:["委托自 ",e.grantedBy]}),e.linkedTo&&s.jsxs("span",{className:"authority-user-flag",title:`此平台身份已绑定到账户 ${e.linkedTo}:登录后按该账户的权限处理(解绑后恢复其原权限)`,children:["→ ",e.linkedTo]}),(K=e.links)==null?void 0:K.map(u=>s.jsxs("span",{className:"authority-user-flag",title:"本账户已绑定的平台身份:其请求都按本账户权限处理;点 × 解绑还原",children:["⇄ ",u,s.jsx("button",{className:"authority-unlink-btn",title:"解绑",onClick:()=>{const x=u.indexOf(":");ts(u.slice(0,x),u.slice(x+1))},children:"×"})]},u))]}),s.jsxs("span",{className:"authority-actions",children:[s.jsx("button",{className:"btn btn-sm",title:"设置该用户的授予 / 拒绝能力(委托)",onClick:()=>v(l?null:{platform:e.platform,userId:e.userId,grant:(e.grant??[]).join(", "),deny:(e.deny??[]).join(", ")}),children:"能力"}),s.jsx("button",{className:"btn btn-sm",title:e.hasPassword?"重置登录密码":"设置登录密码(platform=webui 时可登录 WebUI)",onClick:()=>f(C?null:{platform:e.platform,userId:e.userId,password:""}),children:"密码"}),s.jsx("button",{className:"btn btn-danger btn-sm",onClick:()=>is(e.platform,e.userId),children:"删除"})]})]}),l&&s.jsxs("div",{className:"authority-user-expand",children:[s.jsx("label",{children:"grant — 授予的受限能力(逗号分隔 glob)"}),s.jsx("input",{className:"config-edit-input",placeholder:"如 tool:file.*, action:@aalis/plugin-x:method, *",value:h.grant,onChange:u=>v(x=>x?{...x,grant:u.target.value}:null),autoFocus:!0}),s.jsx("label",{children:"deny — 拒绝的能力(压过 grant 与 owner)"}),s.jsx("input",{className:"config-edit-input",placeholder:"如 tool:shell.*, command:shutdown",value:h.deny,onChange:u=>v(x=>x?{...x,deny:u.target.value}:null)}),s.jsxs("div",{className:"config-edit-actions",children:[s.jsx("button",{className:"btn btn-primary btn-sm",onClick:es,children:"保存"}),s.jsx("button",{className:"btn btn-sm",onClick:()=>v(null),children:"取消"})]})]}),C&&s.jsxs("div",{className:"authority-user-expand",children:[s.jsx("label",{children:e.hasPassword?"重置密码(≥6 位)":"设置密码(≥6 位;platform=webui 时用户 ID 即登录用户名)"}),s.jsx("input",{className:"config-edit-input",type:"password",autoComplete:"new-password",value:p.password,onChange:u=>f(x=>x?{...x,password:u.target.value}:null),autoFocus:!0}),s.jsxs("div",{className:"config-edit-actions",children:[s.jsx("button",{className:"btn btn-primary btn-sm",onClick:as,disabled:p.password.length<6,children:"保存"}),s.jsx("button",{className:"btn btn-sm",onClick:()=>f(null),children:"取消"})]})]})]},a)})]})]})]}),s.jsxs("div",{className:"config-block",children:[s.jsxs("div",{className:"config-block-header",onClick:()=>y("owners"),children:[s.jsx("span",{className:"config-block-title",children:"Owner 管理"}),s.jsx("span",{className:"config-block-hint",children:"Owner 拥有全部能力(*);console(单 token 登录)恒为 Owner"}),s.jsx("span",{className:`config-block-toggle ${o.has("owners")?"open":""}`,children:"▶"})]}),o.has("owners")&&s.jsxs("div",{className:"config-block-body",style:{padding:0},children:[s.jsx("div",{style:{padding:"8px 12px"},children:s.jsx("button",{className:"btn-sm",onClick:()=>W(!P),children:P?"取消":"+ 添加 Owner"})}),P&&s.jsxs("div",{className:"authority-add-form",style:{padding:"0 12px 8px"},children:[s.jsx("input",{className:"config-edit-input",placeholder:"平台 (如 onebot)",list:"authority-platforms",value:j.platform,onChange:e=>S(a=>({...a,platform:e.target.value}))}),s.jsx("input",{className:"config-edit-input",placeholder:"用户 ID",value:j.userId,onChange:e=>S(a=>({...a,userId:e.target.value}))}),s.jsx("button",{className:"btn btn-primary btn-sm",onClick:cs,disabled:!j.platform||!j.userId,children:"确认"})]}),i.owners.length===0?s.jsx("div",{className:"empty-hint",style:{padding:"0 12px 12px"},children:"暂无显式 Owner。console(单 token 登录)始终拥有全部能力。"}):s.jsxs("div",{className:"authority-cmd-list",children:[s.jsxs("div",{className:"authority-cmd-header authority-owner-header",children:[s.jsx("span",{children:"平台"}),s.jsx("span",{children:"用户 ID"}),s.jsx("span",{children:"操作"})]}),i.owners.map((e,a)=>s.jsxs("div",{className:"authority-cmd-row authority-owner-row",children:[s.jsx("span",{className:"authority-cell-platform",children:e.platform}),s.jsx("span",{className:"authority-cell-id",children:e.userId}),s.jsx("span",{children:s.jsx("button",{className:"btn btn-danger btn-sm",onClick:()=>rs(a),children:"移除"})})]},`${e.platform}:${e.userId}`))]})]})]}),s.jsxs("div",{className:"config-block",children:[s.jsxs("div",{className:"config-block-header",onClick:()=>y("commands"),children:[s.jsx("span",{className:"config-block-title",children:"指令可见性"}),s.jsx("span",{className:"config-block-hint",children:"public = 默认任何人可用;restricted = 默认禁用需授予。Owner 可覆盖单条声明"}),s.jsx("span",{className:`config-block-toggle ${o.has("commands")?"open":""}`,children:"▶"})]}),o.has("commands")&&s.jsx("div",{className:"config-block-body",style:{padding:0},children:i.commands.length===0?s.jsx("div",{className:"empty-hint",style:{padding:12},children:"暂无已注册指令"}):s.jsxs("div",{className:"authority-cmd-list",children:[s.jsxs("div",{className:"authority-cmd-header",children:[s.jsx("span",{children:"指令"}),s.jsx("span",{children:"可见性"}),s.jsx("span",{children:"操作"})]}),i.commands.map(e=>_(e))]})})]}),s.jsxs("div",{className:"config-block",children:[s.jsxs("div",{className:"config-block-header",onClick:()=>y("tools"),children:[s.jsx("span",{className:"config-block-title",children:"工具可见性"}),s.jsx("span",{className:"config-block-hint",children:"AI 工具的默认可见性;Owner 可覆盖单个工具的声明"}),s.jsx("span",{className:`config-block-toggle ${o.has("tools")?"open":""}`,children:"▶"})]}),o.has("tools")&&s.jsx("div",{className:"config-block-body",style:{padding:0},children:i.tools.length===0?s.jsx("div",{className:"empty-hint",style:{padding:12},children:"暂无已注册工具"}):s.jsxs("div",{className:"authority-cmd-list",children:[s.jsxs("div",{className:"authority-cmd-header",children:[s.jsx("span",{children:"工具"}),s.jsx("span",{children:"可见性"}),s.jsx("span",{children:"操作"})]}),i.tools.map(e=>_(e))]})})]}),s.jsxs("div",{className:"config-block",children:[s.jsxs("div",{className:"config-block-header",onClick:()=>y("caps"),children:[s.jsx("span",{className:"config-block-title",children:"受限 / 禁用能力清单"}),s.jsx("span",{className:"config-block-hint",children:"在内置之外追加的能力 glob 规则"}),s.jsx("span",{className:`config-block-toggle ${o.has("caps")?"open":""}`,children:"▶"})]}),o.has("caps")&&s.jsx("div",{className:"config-block-body",children:Z?s.jsxs("div",{className:"config-edit-form",children:[s.jsxs("div",{className:"config-edit-row",children:[s.jsx("label",{className:"config-edit-label",children:"restricted"}),s.jsx("input",{className:"config-edit-input",value:w.restricted,onChange:e=>L(a=>({...a,restricted:e.target.value})),placeholder:"tool:shell.*, command:deploy"}),s.jsx("span",{className:"config-edit-hint",children:"额外按受限处理(默认禁,需授予)"})]}),s.jsxs("div",{className:"config-edit-row",children:[s.jsx("label",{className:"config-edit-label",children:"denied"}),s.jsx("input",{className:"config-edit-input",value:w.denied,onChange:e=>L(a=>({...a,denied:e.target.value})),placeholder:"tool:dangerous.*"}),s.jsx("span",{className:"config-edit-hint",children:"全局硬禁,连 owner 都压过;慎用"})]}),s.jsxs("div",{className:"config-edit-actions",children:[s.jsx("button",{className:"btn btn-primary btn-sm",onClick:ds,children:"保存"}),s.jsx("button",{className:"btn btn-sm",onClick:()=>U(!1),children:"取消"})]})]}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"config-item",title:"额外按受限处理:默认禁用,需显式授予",children:[s.jsx("span",{className:"key",children:"restrictedCapabilities"}),s.jsx("span",{className:"val",children:(i.restrictedCapabilities??[]).join(", ")||"(无)"})]}),s.jsxs("div",{className:"config-item",title:"全局硬禁:覆盖一切,连 owner 都压过;慎用",children:[s.jsx("span",{className:"key",children:"deniedCapabilities"}),s.jsx("span",{className:"val",children:(i.deniedCapabilities??[]).join(", ")||"(无)"})]}),s.jsx("div",{style:{padding:"6px 0 2px"},children:s.jsx("button",{className:"btn-sm",onClick:()=>U(!0),children:"编辑"})})]})})]}),s.jsxs("div",{className:"config-block",children:[s.jsxs("div",{className:"config-block-header",onClick:()=>y("policy"),children:[s.jsx("span",{className:"config-block-title",children:"临时放行策略"}),s.jsx("span",{className:"config-block-hint",children:"受限能力的临时自动放行白名单,及当前活跃的临时委托"}),s.jsx("span",{className:`config-block-toggle ${o.has("policy")?"open":""}`,children:"▶"})]}),o.has("policy")&&s.jsxs("div",{className:"config-block-body",children:[ss?s.jsxs("div",{className:"config-edit-form",children:[s.jsxs("div",{className:"config-edit-row",children:[s.jsx("label",{className:"config-edit-label",children:"allow"}),s.jsx("input",{className:"config-edit-input",value:k.allow,onChange:e=>D(a=>({...a,allow:e.target.value})),placeholder:"command:deploy, tool:file.* 或 *"}),s.jsx("span",{className:"config-edit-hint",children:"逗号分隔 glob,* 表示全部受限能力"})]}),s.jsxs("div",{className:"config-edit-row",children:[s.jsx("label",{className:"config-edit-label",children:"duration"}),s.jsx("input",{type:"number",className:"config-edit-input",min:0,value:k.duration,onChange:e=>D(a=>({...a,duration:parseInt(e.target.value)||0}))}),s.jsx("span",{className:"config-edit-hint",children:"有效期 (秒),0 = 永久"})]}),s.jsxs("div",{className:"config-edit-actions",children:[s.jsx("button",{className:"btn btn-primary btn-sm",onClick:os,children:"保存"}),s.jsx("button",{className:"btn btn-sm",onClick:()=>z(!1),children:"取消"})]})]}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"config-item",children:[s.jsx("span",{className:"key",children:"allow"}),s.jsx("span",{className:"val",children:(((F=i.restrictedPolicy)==null?void 0:F.allow)??[]).join(", ")||"(无)"})]}),s.jsxs("div",{className:"config-item",children:[s.jsx("span",{className:"key",children:"duration"}),s.jsx("span",{className:"val",children:((R=i.restrictedPolicy)==null?void 0:R.duration)===0?"(永久)":`${((V=i.restrictedPolicy)==null?void 0:V.duration)??0}s`})]}),s.jsx("div",{style:{padding:"6px 0 2px"},children:s.jsx("button",{className:"btn-sm",onClick:()=>z(!0),children:"编辑"})})]}),s.jsx("div",{className:"section-label",style:{marginTop:12},children:"当前临时委托"}),i.temporaryGrants.length===0?s.jsx("div",{className:"empty-hint",style:{padding:"4px 0"},children:"暂无活跃的临时委托。"}):s.jsxs("div",{className:"authority-cmd-list",children:[s.jsxs("div",{className:"authority-cmd-header",children:[s.jsx("span",{children:"能力 / 会话"}),s.jsx("span",{children:"用量"}),s.jsx("span",{children:"操作"})]}),i.temporaryGrants.map(e=>s.jsxs("div",{className:"authority-cmd-row",children:[s.jsxs("span",{className:"authority-cmd-name",title:`类型 ${e.type} · 平台 ${e.platform}${e.userId?":"+e.userId:""} · 到期 ${new Date(e.expiresAt).toLocaleString()}`,children:[e.capability,s.jsx("span",{className:"authority-cmd-plugin",style:{marginLeft:6},children:e.sessionId})]}),s.jsxs("span",{style:{fontSize:12,opacity:.8},children:[e.used,e.maxUses?` / ${e.maxUses}`:""]}),s.jsx("span",{className:"authority-actions",children:s.jsx("button",{className:"btn btn-danger btn-sm",onClick:()=>hs(e.id),children:"撤销"})})]},e.id))]})]})]})]})}export{Cs as AuthorityPage};
@@ -1,4 +1,4 @@
1
- import{r as d,j as e,R as W,a as tt}from"./react-vendor-BPQixOLZ.js";import{c as me,a as ge,p as D,S as nt,W as st}from"./index-BMsEuqd2.js";import{S as rt}from"./SchemaForm-YVQZ6Keg.js";import{c as $e}from"./cytoscape.esm-LDYqcvCF.js";import{f as at}from"./cytoscape-fcose-DXAQNCkb.js";import{G as ot}from"./globe-Oit0H-sq.js";import{C as it}from"./clock-DwR8n9tr.js";import{M as lt,r as dt,a as ct}from"./markdown-BCywGHw2.js";import"./highlight-DJvvuuwd.js";import"./katex-Bq6vt64r.js";/**
1
+ import{r as d,j as e,R as W,a as tt}from"./react-vendor-BPQixOLZ.js";import{c as me,a as ge,p as D,S as nt,W as st}from"./index-BtvzdAkg.js";import{S as rt}from"./SchemaForm-YVQZ6Keg.js";import{c as $e}from"./cytoscape.esm-LDYqcvCF.js";import{f as at}from"./cytoscape-fcose-DXAQNCkb.js";import{G as ot}from"./globe-ZjSUDGkM.js";import{C as it}from"./clock-CM3-4qHr.js";import{M as lt,r as dt,a as ct}from"./markdown-BCywGHw2.js";import"./highlight-DJvvuuwd.js";import"./katex-Bq6vt64r.js";/**
2
2
  * @license lucide-react v1.7.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{r as i,j as e}from"./react-vendor-BPQixOLZ.js";import{c as k,a as j,f as O,g as U,F as A,h as J,D as K,i as V,X as G}from"./index-BMsEuqd2.js";import"./highlight-DJvvuuwd.js";import"./katex-Bq6vt64r.js";import"./markdown-BCywGHw2.js";/**
1
+ import{r as i,j as e}from"./react-vendor-BPQixOLZ.js";import{c as k,a as j,f as O,g as U,F as A,h as J,D as K,i as V,X as G}from"./index-BtvzdAkg.js";import"./highlight-DJvvuuwd.js";import"./katex-Bq6vt64r.js";import"./markdown-BCywGHw2.js";/**
2
2
  * @license lucide-react v1.7.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -0,0 +1,18 @@
1
+ import{r as s,j as a}from"./react-vendor-BPQixOLZ.js";import{c as G,a as S,T as Y,D as H}from"./index-BtvzdAkg.js";import{C as K}from"./clock-CM3-4qHr.js";import"./highlight-DJvvuuwd.js";import"./katex-Bq6vt64r.js";import"./markdown-BCywGHw2.js";/**
2
+ * @license lucide-react v1.7.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const Q=[["path",{d:"M12 3v18",key:"108xh3"}],["path",{d:"m19 8 3 8a5 5 0 0 1-6 0zV7",key:"zcdpyk"}],["path",{d:"M3 7h1a17 17 0 0 0 8-2 17 17 0 0 0 8 2h1",key:"1yorad"}],["path",{d:"m5 8 3 8a5 5 0 0 1-6 0zV7",key:"eua70x"}],["path",{d:"M7 21h10",key:"1b0cd5"}]],X=G("scale",Q),I={relevance:"默认排序",downloads:"下载量",updated:"最近更新",score:"综合评分"},_={all:"全部来源",official:"仅官方",community:"仅社区"},R={all:"全部状态",installed:"已安装",available:"未安装"},k={all:"全部类型",plugin:"功能插件",api:"API 契约",client:"前端"};function Z(n){return n>=1e6?`${(n/1e6).toFixed(1)}M`:n>=1e3?`${(n/1e3).toFixed(1)}k`:String(n)}function ee(n){if(!n)return"";const f=Date.parse(n);if(Number.isNaN(f))return"";const r=Math.max(0,(Date.now()-f)/1e3),m=[[31536e3,"年"],[2592e3,"个月"],[86400,"天"],[3600,"小时"],[60,"分钟"]];for(const[p,j]of m)if(r>=p)return`${Math.floor(r/p)} ${j}前`;return"刚刚"}function re({plugins:n,onRefresh:f}){const[r,m]=s.useState(null),[p,j]=s.useState(null),[v,P]=s.useState([]),[N,A]=s.useState(!1),[$,q]=s.useState(!1),[C,E]=s.useState(null),[L,M]=s.useState(""),[u,B]=s.useState("relevance"),[g,U]=s.useState("all"),[b,W]=s.useState("all"),[w,F]=s.useState("plugin"),c=e=>{j(e),setTimeout(()=>j(null),2500)},T=s.useCallback(async()=>{A(!0),E(null);try{const e=await S("/api/marketplace?q=");P(e.packages??[]),e.warning&&E(e.warning)}catch{c("无法加载插件市场")}A(!1),q(!0)},[]);s.useEffect(()=>{T()},[T]);const D=s.useMemo(()=>new Set(n.map(e=>e.name)),[n]),O=s.useMemo(()=>{const e=L.trim().toLowerCase(),l=v.map(t=>({...t,installed:t.installed||D.has(t.name)})).filter(t=>!(w!=="all"&&(t.category??"plugin")!==w||g==="official"&&!t.official||g==="community"&&t.official||b==="installed"&&!t.installed||b==="available"&&t.installed||e&&!`${t.name} ${t.description} ${(t.keywords??[]).join(" ")} ${t.author??""}`.toLowerCase().includes(e)));return u==="relevance"?l:l.sort((t,i)=>u==="downloads"?(i.downloads??0)-(t.downloads??0):u==="score"?(i.score??0)-(t.score??0):u==="updated"?Date.parse(i.updated??"0")-Date.parse(t.updated??"0"):0)},[v,D,L,u,g,b,w]),J=async(e,l)=>{var x,o,z;let t="";try{const{manifest:h}=await S(`/api/marketplace/manifest?name=${encodeURIComponent(e)}`),d=h==null?void 0:h.service;if(d){const y=[];(x=d.required)!=null&&x.length&&y.push(`需要服务: ${d.required.join(", ")}`),(o=d.optional)!=null&&o.length&&y.push(`可选服务: ${d.optional.join(", ")}`),(z=d.provides)!=null&&z.length&&y.push(`提供服务: ${d.provides.join(", ")}`),y.length&&(t=`
7
+
8
+ 该插件声明:
9
+ ${y.join(`
10
+ `)}`)}}catch{}const i=l?"官方插件":"第三方社区插件";if(window.confirm(`将从 npm 安装${i}「${e}」。${t}
11
+
12
+ 安装后它会以你授予的能力运行(可在权限页查看其依赖与权限)。请确认来源可信。
13
+
14
+ 继续安装?`)){m(e);try{const h=await S("/api/marketplace/install",{method:"POST",body:JSON.stringify({name:e})});h.ok?(c(`${e} 安装成功,正在重启...`),f()):c(h.error??"安装失败")}catch{c("安装失败")}m(null)}},V=async e=>{if(window.confirm(`确定卸载「${e}」?
15
+
16
+ 将删除其代码目录并清除残留配置。不可恢复,但可从市场重新安装。
17
+
18
+ 继续卸载?`)){m(e);try{const l=await S("/api/marketplace/uninstall",{method:"POST",body:JSON.stringify({name:e})});l.ok?(c(l.message??`${e} 已卸载`),f()):c(l.error??"卸载失败")}catch{c("卸载失败")}m(null)}};return a.jsxs("div",{className:"page-content page-marketplace",children:[p&&a.jsx("div",{className:"toast",children:p}),a.jsxs("div",{className:"section-label",children:["插件市场",$&&a.jsxs("span",{className:"market-count",children:["显示 ",O.length," / 共 ",v.length]})]}),a.jsxs("div",{className:"market-filter-row",children:[a.jsx("input",{className:"config-edit-input",style:{flex:1,minWidth:180},placeholder:"搜索插件(名称 / 描述 / 关键词 / 作者)",value:L,onChange:e=>M(e.target.value)}),a.jsx("select",{className:"config-edit-input",value:w,onChange:e=>F(e.target.value),title:"组件类型",children:Object.keys(k).map(e=>a.jsx("option",{value:e,children:k[e]},e))}),a.jsx("select",{className:"config-edit-input",value:g,onChange:e=>U(e.target.value),children:Object.keys(_).map(e=>a.jsx("option",{value:e,children:_[e]},e))}),a.jsx("select",{className:"config-edit-input",value:b,onChange:e=>W(e.target.value),children:Object.keys(R).map(e=>a.jsx("option",{value:e,children:R[e]},e))}),a.jsx("select",{className:"config-edit-input",value:u,onChange:e=>B(e.target.value),title:"排序",children:Object.keys(I).map(e=>a.jsx("option",{value:e,children:I[e]},e))}),a.jsx("button",{className:"btn-sm",onClick:()=>T(),disabled:N,children:N?"加载中...":"刷新"})]}),!$&&N&&a.jsxs("div",{className:"empty-hint",style:{padding:16},children:["正在从 npm 加载带 ",a.jsx("code",{children:"aalis-plugin"})," 标签的插件…"]}),C&&a.jsx("div",{className:"empty-hint",style:{padding:12,color:"var(--warning, #ffb300)"},children:C}),$&&O.length===0&&!N&&!C&&a.jsx("div",{className:"empty-hint",style:{padding:16},children:v.length===0?"未找到任何插件":"无匹配项 —— 试试调整搜索词或筛选条件"}),a.jsx("div",{className:"marketplace-grid",children:O.map(e=>{var t,i,x;const l=((t=e.links)==null?void 0:t.homepage)||((i=e.links)==null?void 0:i.repository)||((x=e.links)==null?void 0:x.npm);return a.jsxs("div",{className:"marketplace-card",children:[a.jsxs("div",{className:"marketplace-card-info",children:[l?a.jsx("a",{className:"marketplace-card-name",href:l,target:"_blank",rel:"noreferrer",children:e.name}):a.jsx("span",{className:"marketplace-card-name",children:e.name}),a.jsxs("span",{className:"marketplace-card-version",children:["v",e.version]}),a.jsx("span",{className:`badge ${e.official?"official":"community"}`,children:e.official?"官方":"社区"}),e.category&&e.category!=="plugin"&&a.jsx("span",{className:"badge",title:"组件类别",children:e.category==="api"?"API 契约":"前端"}),e.insecure&&a.jsxs("span",{className:"badge",style:{background:"var(--danger)",color:"#fff",display:"inline-flex",alignItems:"center",gap:3},title:"npm 标记为不安全包,谨慎安装",children:[a.jsx(Y,{size:11})," 不安全"]}),e.author&&a.jsxs("span",{className:"marketplace-card-author",children:["by ",e.author]}),e.installed&&a.jsx("span",{className:"badge active",children:"已安装"})]}),a.jsx("div",{className:"marketplace-card-desc",children:e.description||"(无描述)"}),e.keywords&&e.keywords.length>0&&a.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:4,marginTop:4},children:e.keywords.slice(0,6).map(o=>a.jsx("button",{type:"button",className:"market-kw",title:`按 “${o}” 筛选`,onClick:()=>M(o),children:o},o))}),a.jsxs("div",{className:"market-meta",children:[e.downloads!=null&&a.jsxs("span",{className:"market-meta-item",title:"近一月下载量",children:[a.jsx(H,{size:12})," ",Z(e.downloads),"/月"]}),e.updated&&a.jsxs("span",{className:"market-meta-item",title:new Date(e.updated).toLocaleString(),children:[a.jsx(K,{size:12})," ",ee(e.updated)]}),e.license&&a.jsxs("span",{className:"market-meta-item",title:"许可证",children:[a.jsx(X,{size:12})," ",e.license]})]}),a.jsxs("div",{style:{marginTop:8},children:[!e.installed&&a.jsx("button",{className:"btn btn-primary btn-sm",onClick:()=>J(e.name,e.official),disabled:r===e.name,children:r===e.name?"安装中...":"安装"}),e.installed&&e.removable&&a.jsx("button",{className:"btn btn-sm",style:{color:"var(--danger)"},onClick:()=>V(e.name),disabled:r===e.name,title:"卸载插件(删包 + 清配置)",children:r===e.name?"处理中...":"卸载"})]})]},e.name)})})]})}export{re as MarketplacePage};
@@ -1,4 +1,4 @@
1
- import{r as c,j as e}from"./react-vendor-BPQixOLZ.js";import{c as p,a as h}from"./index-BMsEuqd2.js";import{G as x}from"./globe-Oit0H-sq.js";import"./highlight-DJvvuuwd.js";import"./katex-Bq6vt64r.js";import"./markdown-BCywGHw2.js";/**
1
+ import{r as c,j as e}from"./react-vendor-BPQixOLZ.js";import{c as p,a as h}from"./index-BtvzdAkg.js";import{G as x}from"./globe-ZjSUDGkM.js";import"./highlight-DJvvuuwd.js";import"./katex-Bq6vt64r.js";import"./markdown-BCywGHw2.js";/**
2
2
  * @license lucide-react v1.7.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{r as d,j as e}from"./react-vendor-BPQixOLZ.js";import{c as _,a as S,T as Ae}from"./index-BMsEuqd2.js";import{b as K,S as ye,f as Ne,u as Re}from"./SchemaForm-YVQZ6Keg.js";import"./highlight-DJvvuuwd.js";import"./katex-Bq6vt64r.js";import"./markdown-BCywGHw2.js";/**
1
+ import{r as d,j as e}from"./react-vendor-BPQixOLZ.js";import{c as _,a as S,T as Ae}from"./index-BtvzdAkg.js";import{b as K,S as ye,f as Ne,u as Re}from"./SchemaForm-YVQZ6Keg.js";import"./highlight-DJvvuuwd.js";import"./katex-Bq6vt64r.js";import"./markdown-BCywGHw2.js";/**
2
2
  * @license lucide-react v1.7.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{r as p,j as e}from"./react-vendor-BPQixOLZ.js";import{p as S,b as xe,B as V,M as R,R as z,d as B,e as M,W as pe}from"./index-BMsEuqd2.js";import{M as F}from"./markdown-BCywGHw2.js";import"./highlight-DJvvuuwd.js";import"./katex-Bq6vt64r.js";function ge(s,g){const[v,l]=p.useState({segments:[],isStreaming:!1,done:!1}),c=p.useRef(null),d=!!(s&&(g==="active"||g==="waiting"));p.useEffect(()=>{if(!d||!s){l({segments:[],isStreaming:!1,done:!1});return}const f=location.protocol==="https:"?"wss:":"ws:",h=new WebSocket(`${f}//${location.host}/ws`);return c.current=h,h.onopen=()=>{h.send(JSON.stringify({type:"subscribe_session",sessionId:s}))},h.onmessage=r=>{try{const i=JSON.parse(r.data);if(i.type==="stream_resume"){let j=[];if(Array.isArray(i.segments)&&i.segments.length>0)j=i.segments;else{const o=i.reasoningContent??"",u=i.content??"";o&&j.push({type:"reasoning_text",content:o}),u&&j.push({type:"text",content:u})}l({segments:j,isStreaming:!i.done,done:!!i.done})}else i.type==="stream"?i.done?l(j=>({...j,isStreaming:!1,done:!0})):l(j=>{const o=[...j.segments],u=(N,E)=>{const D=o[o.length-1];D&&D.type===N?o[o.length-1]={type:N,content:D.content+E}:o.push({type:N,content:E})};return i.reasoningDelta&&u("reasoning_text",i.reasoningDelta),i.contentDelta&&u("text",i.contentDelta),{...j,segments:o,isStreaming:!0}}):i.type==="tool_call"?l(j=>{const o=[...j.segments];if(i.toolPhase==="start")o.push({type:"tool_call",name:i.toolName,args:i.toolArgs??{},startTime:Date.now()});else if(i.toolPhase==="end"&&i.toolResult!==void 0){const u=o.findLastIndex(N=>N.type==="tool_call"&&N.name===i.toolName&&N.result==null);if(u>=0){const N=o[u];o[u]={...N,result:i.toolResult,endTime:Date.now()}}}return{...j,segments:o,isStreaming:!0}}):i.type==="message"&&l(j=>({...j,done:!0,isStreaming:!1}))}catch{}},h.onclose=()=>{c.current=null},()=>{h.close(),c.current=null}},[s,d]);const b=p.useCallback(()=>{l({segments:[],isStreaming:!1,done:!1})},[]);return[v,b]}const Y={active:"进行中",waiting:"等待中",completed:"已完成",error:"错误",archived:"已归档"},q={active:"#4caf50",waiting:"#ff9800",completed:"#2196f3",error:"#f44336",archived:"#888"};function X(s,g){return s?s.length>g?s.slice(0,g)+"…":s:""}function K(s){return new Date(s).toLocaleString("zh-CN",{month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit"})}function Q(s){const g=[];for(const v of s)g.push(v.session.id),g.push(...Q(v.children));return g}function je({config:s,resolvedConfig:g,inheritedConfig:v,options:l,onSave:c,onCancel:d}){var L,A,G;const b={...s},f=typeof s.model=="string"?s.model:void 0,h=typeof s.llmProvider=="string"?s.llmProvider:void 0;if(f){const t=h??((L=s.llm)==null?void 0:L.provider);t&&(b.llm={provider:t,model:f})}delete b.model,delete b.llmProvider;const[r,i]=p.useState(b),j=g||{},o=v||{},u=(t,x)=>{i(n=>({...n,[t]:x}))},N=t=>{var x,n;return(x=r.enabledToolGroups)!=null&&x.includes(t)?"explicit":(n=o.enabledToolGroups)!=null&&n.includes(t)&&!r.enabledToolGroups?"inherited":"off"},E=t=>{if(N(t)==="inherited"){const n=[...o.enabledToolGroups||[]];u("enabledToolGroups",n.filter(C=>C!==t))}else{const n=r.enabledToolGroups||o.enabledToolGroups||[],C=n.includes(t)?n.filter(_=>_!==t):[...n,t];u("enabledToolGroups",C.length>0?C:void 0)}},D=()=>{i(t=>{const{enabledToolGroups:x,...n}=t;return n})};if(!l)return e.jsx("div",{className:"session-config-editor",children:e.jsx("span",{className:"session-config-loading",children:"加载配置选项…"})});const k=(t,x)=>!r[t]&&x?` (继承: ${x})`:"",w=(A=r.llm)!=null&&A.provider&&((G=r.llm)!=null&&G.model)?`${r.llm.provider}/${r.llm.model}`:"",I=l.models.filter(t=>!!t.provider).map(t=>({key:`${t.provider}/${t.id}`,provider:t.provider,model:t.id,label:`${t.provider} / ${t.id}${t.capabilities.length>0?` [${t.capabilities.join(",")}]`:""}`}));w&&!I.some(t=>t.key===w)&&I.unshift({key:w,provider:r.llm.provider,model:r.llm.model,label:`${r.llm.provider} / ${r.llm.model} (已离线)`});const T=o.llm?`${o.llm.provider} / ${o.llm.model}`:void 0;return e.jsxs("div",{className:"session-config-editor",onClick:t=>t.stopPropagation(),children:[e.jsxs("label",{className:"session-config-field",children:[e.jsxs("span",{children:["模型",!r.llm&&T?` (继承: ${T})`:""]}),e.jsxs("select",{value:w,onChange:t=>{const x=t.target.value;if(!x){u("llm",void 0);return}const n=I.find(C=>C.key===x);n&&u("llm",{provider:n.provider,model:n.model})},children:[e.jsx("option",{value:"",children:T?`继承 (${T})`:"继承默认"}),I.map(t=>e.jsx("option",{value:t.key,children:t.label},t.key))]})]}),e.jsxs("label",{className:"session-config-field",children:[e.jsxs("span",{children:["人设",k("persona",o.persona)]}),e.jsxs("select",{value:r.persona||"",onChange:t=>u("persona",t.target.value||void 0),children:[e.jsx("option",{value:"",children:o.persona?`继承 (${o.persona})`:"继承默认"}),l.personas.map(t=>e.jsx("option",{value:t,children:t},t))]})]}),l.toolGroups.length>0&&e.jsxs("div",{className:"session-config-field",children:[e.jsxs("span",{children:["工具分组",r.enabledToolGroups?"":" (继承)"]}),e.jsxs("div",{className:"session-config-chips",children:[l.toolGroups.map(t=>{const x=N(t.name);return e.jsx("button",{className:`session-config-chip ${x==="explicit"?"active":x==="inherited"?"active inherited":""}`,onClick:()=>E(t.name),title:`${t.name}${x==="inherited"?" (继承)":x==="explicit"?" (已覆盖)":""}`,children:t.label||t.name},t.name)}),r.enabledToolGroups&&e.jsx("button",{className:"session-config-chip reset",onClick:D,title:"恢复为继承",children:"↺ 重置"})]})]}),e.jsxs("label",{className:"session-config-field",children:[e.jsx("span",{children:"额外提示"}),e.jsx("textarea",{rows:2,value:r.systemPromptExtra||"",onChange:t=>u("systemPromptExtra",t.target.value||void 0),placeholder:"追加到系统提示之后…"})]}),e.jsxs("label",{className:"session-config-field",children:[e.jsx("span",{children:"工具迭代上限"}),e.jsx("input",{type:"number",min:0,max:50,value:r.maxToolIterations??"",onChange:t=>u("maxToolIterations",t.target.value?Number(t.target.value):void 0),placeholder:o.maxToolIterations?`继承 (${o.maxToolIterations})`:"默认"})]}),e.jsxs("div",{className:"session-config-toggles",children:[e.jsxs("label",{children:[e.jsx("input",{type:"checkbox",checked:r.disableOutputFormat??j.disableOutputFormat??!1,onChange:t=>u("disableOutputFormat",t.target.checked||void 0)}),e.jsxs("span",{children:["禁用结构化输出",r.disableOutputFormat===void 0&&o.disableOutputFormat?" (继承)":""]})]}),e.jsxs("label",{children:[e.jsx("input",{type:"checkbox",checked:r.clientSideJsonRendering??j.clientSideJsonRendering??!1,onChange:t=>u("clientSideJsonRendering",t.target.checked||void 0)}),e.jsxs("span",{children:["客户端 JSON 渲染",r.clientSideJsonRendering===void 0&&o.clientSideJsonRendering?" (继承)":""]})]})]}),e.jsxs("div",{className:"session-config-actions",children:[e.jsx("button",{className:"session-config-btn save",onClick:()=>c(r),children:"保存"}),e.jsx("button",{className:"session-config-btn cancel",onClick:d,children:"取消"})]})]})}function Se({pluginName:s,activeSessionId:g,onSwitchSession:v,onStartNewChat:l,refreshSignal:c}){const[d,b]=p.useState([]),[f,h]=p.useState(null),[r,i]=p.useState(null),[j,o]=p.useState(!1),[u,N]=p.useState(null),[E,D]=p.useState(!1),[k,w]=p.useState(new Set),[I,T]=p.useState(null),[L,A]=p.useState(""),[G,t]=p.useState(null),[x,n]=p.useState(null),[C,_]=p.useState(null),[W,O]=p.useState(null),[U,m]=p.useState(null),$=p.useCallback(()=>{S(s,"getSessionTree").then(a=>{Array.isArray(a)&&b(a)}).catch(()=>N("无法加载会话树"))},[s]);p.useEffect(()=>{$();const a=setInterval($,3e4);return()=>clearInterval(a)},[$]),p.useEffect(()=>{c&&($(),x&&Promise.all([S(s,"getResolvedConfig",{sessionId:x,platform:"webui"}),S(s,"getInheritedDefaults",{sessionId:x,platform:"webui"})]).then(([a,y])=>{a&&O(a),y&&m(y)}).catch(()=>{}))},[c]);const H=p.useCallback(a=>{h(a),o(!0),S(s,"getSessionDetail",{id:a}).then(y=>i(y)).catch(()=>i(null)).finally(()=>o(!1))},[s]),se=async()=>{try{await S(s,"createSession",{}),$()}catch{}},te=async a=>{try{await S(s,"createSession",{parentId:a}),$()}catch{}},ne=async a=>{if(!L.trim()){T(null);return}try{await S(s,"renameSession",{id:a,title:L.trim()}),$()}catch{}T(null)},le=async a=>{try{await S(s,"archiveSession",{id:a}),$()}catch{}},ie=async a=>{try{const y=a===g;await S(s,"deleteSession",{id:a}),$(),f===a&&(h(null),i(null)),y&&l&&l()}catch{}t(null)},ae=async a=>{if(x===a){n(null),O(null),m(null);return}n(a),O(null),m(null);try{const[y,P,J]=await Promise.all([C?Promise.resolve(C):S(s,"getConfigOptions"),S(s,"getResolvedConfig",{sessionId:a,platform:"webui"}),S(s,"getInheritedDefaults",{sessionId:a,platform:"webui"})]);y&&!C&&_(y),P&&O(P),J&&m(J)}catch{}},re=async(a,y)=>{try{await S(s,"updateSessionConfig",{id:a,config:y}),$(),n(null)}catch(P){const J=P instanceof Error?P.message:String(P);alert(`保存会话配置失败:${J}`)}},oe=a=>{w(y=>{const P=new Set(y);return P.has(a)?P.delete(a):P.add(a),P})},ce=()=>{const a=Q(d);w(new Set(a))},de=()=>w(new Set),he=async()=>{if(k.size!==0)try{await S(s,"batchArchive",{ids:[...k]}),w(new Set),$()}catch{}},me=async()=>{if(k.size!==0&&confirm(`确认删除选中的 ${k.size} 个会话?此操作不可恢复。`))try{await S(s,"batchDelete",{ids:[...k]}),w(new Set),f&&k.has(f)&&(h(null),i(null)),$()}catch{}},ue=()=>{D(!1),w(new Set)};return u?e.jsx("div",{className:"tree-page-error",children:u}):e.jsxs("div",{className:"session-tree-page",children:[e.jsxs("div",{className:"tree-visual-panel",children:[e.jsxs("div",{className:"tree-visual-header",children:[e.jsx("h3",{children:"会话"}),e.jsx("div",{className:"tree-header-actions",children:E?e.jsxs(e.Fragment,{children:[e.jsx("button",{className:"tree-batch-btn",onClick:ce,title:"全选",children:"全选"}),e.jsx("button",{className:"tree-batch-btn",onClick:de,title:"取消全选",children:"取消"}),e.jsxs("button",{className:"tree-batch-btn archive",onClick:he,disabled:k.size===0,children:["归档 (",k.size,")"]}),e.jsxs("button",{className:"tree-batch-btn danger",onClick:me,disabled:k.size===0,children:["删除 (",k.size,")"]}),e.jsx("button",{className:"tree-batch-btn",onClick:ue,children:"退出批量"})]}):e.jsxs(e.Fragment,{children:[e.jsx("button",{className:"tree-action-btn",onClick:se,title:"新建会话",children:"+"}),e.jsx("button",{className:"tree-action-btn",onClick:()=>D(!0),title:"批量管理",children:"☐"}),e.jsx("button",{className:"tree-refresh-btn",onClick:$,children:"⟳"})]})})]}),e.jsx("div",{className:"tree-visual-body",children:d.length===0?e.jsx("div",{className:"tree-empty",children:"暂无会话"}):d.map(a=>e.jsx(Z,{node:a,selectedId:f,activeSessionId:g,onSelect:H,depth:0,batchMode:E,selected:k,onToggleSelect:oe,onCreateChild:te,onRename:(y,P)=>{T(y),A(P)},onArchive:le,onDelete:y=>t(y),onOpenConfig:ae,editingId:I,editTitle:L,onEditTitleChange:A,onCommitRename:ne,onCancelEdit:()=>T(null),configEditingId:x,configOptions:C,resolvedConfig:W,inheritedConfig:U,onSaveConfig:re,onCancelConfig:()=>n(null)},a.session.id))})]}),e.jsx("div",{className:"tree-detail-panel",children:f?j?e.jsx("div",{className:"tree-detail-placeholder",children:"加载中…"}):r?e.jsx(fe,{detail:r,onSwitchSession:v,onRefresh:()=>H(r.session.id)}):e.jsx("div",{className:"tree-detail-placeholder",children:"无法加载会话信息"}):e.jsx("div",{className:"tree-detail-placeholder",children:"点击左侧会话节点查看详情"})}),G&&e.jsx("div",{className:"delete-confirm-overlay",onClick:()=>t(null),children:e.jsxs("div",{className:"delete-confirm-dialog",onClick:a=>a.stopPropagation(),children:[e.jsx("p",{children:"确定要删除此会话吗?子会话也会被一并删除,此操作无法撤销。"}),e.jsxs("div",{className:"delete-confirm-actions",children:[e.jsx("button",{className:"btn btn-sm btn-danger",onClick:()=>ie(G),children:"删除"}),e.jsx("button",{className:"btn btn-sm",onClick:()=>t(null),children:"取消"})]})]})})]})}function Z({node:s,selectedId:g,activeSessionId:v,onSelect:l,depth:c,batchMode:d,selected:b,onToggleSelect:f,onCreateChild:h,onRename:r,onArchive:i,onDelete:j,onOpenConfig:o,editingId:u,editTitle:N,onEditTitleChange:E,onCommitRename:D,onCancelEdit:k,configEditingId:w,configOptions:I,resolvedConfig:T,inheritedConfig:L,onSaveConfig:A,onCancelConfig:G}){const[t,x]=p.useState(!0),n=s.session,C=s.children.length>0,_=n.id===g,W=n.id===v,O=u===n.id,U=b.has(n.id);return e.jsxs("div",{className:"tree-node-group",children:[e.jsxs("div",{className:`tree-node ${_?"selected":""} ${W?"active-chat":""} status-${n.status}`,style:{marginLeft:c*24},onClick:()=>d?f(n.id):l(n.id),children:[d&&e.jsx("input",{type:"checkbox",className:"tree-node-checkbox",checked:U,onChange:()=>f(n.id),onClick:m=>m.stopPropagation()}),e.jsx("button",{className:"tree-node-toggle",onClick:m=>{m.stopPropagation(),x(!t)},style:{visibility:C?"visible":"hidden"},children:t?"▾":"▸"}),e.jsx("span",{className:"tree-node-status",style:{background:q[n.status]||"#888"}}),e.jsx("div",{className:"tree-node-info",children:O?e.jsx("input",{className:"tree-node-rename-input",value:N,onChange:m=>E(m.target.value),onBlur:()=>D(n.id),onKeyDown:m=>{m.key==="Enter"&&D(n.id),m.key==="Escape"&&k()},onClick:m=>m.stopPropagation(),autoFocus:!0}):e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"tree-node-title",children:n.title||n.name}),e.jsxs("span",{className:"tree-node-meta",children:[Y[n.status]||n.status,n.createdBy&&n.createdBy!=="user"&&` · ${n.createdBy}`,` · ${K(n.createdAt)}`]})]})}),C&&e.jsx("span",{className:"tree-node-badge",children:s.children.length}),!d&&e.jsxs("div",{className:"tree-node-actions",onClick:m=>m.stopPropagation(),children:[e.jsx("button",{className:"tree-node-action-btn",title:"新建子会话",onClick:()=>h(n.id),children:"➕"}),e.jsx("button",{className:"tree-node-action-btn",title:"配置",onClick:()=>o(n.id),children:"⚙"}),e.jsx("button",{className:"tree-node-action-btn",title:"重命名",onClick:()=>r(n.id,n.title||n.name),children:"✎"}),n.status==="active"&&e.jsx("button",{className:"tree-node-action-btn",title:"归档",onClick:()=>i(n.id),children:"▪"}),e.jsx("button",{className:"tree-node-action-btn danger",title:"删除",onClick:()=>j(n.id),children:"✕"})]})]}),w===n.id&&e.jsx("div",{style:{marginLeft:c*24+24},children:e.jsx(je,{config:n.config||{},resolvedConfig:T,inheritedConfig:L,options:I,onSave:m=>A(n.id,m),onCancel:G})}),C&&t&&e.jsx("div",{className:"tree-node-children",children:s.children.map(m=>e.jsxs("div",{className:"tree-child-wrapper",children:[m.session.inputContext&&e.jsxs("div",{className:"tree-flow-label",style:{marginLeft:(c+1)*24},children:[e.jsx("span",{className:"tree-flow-arrow",children:"↓"}),e.jsx("span",{className:"tree-flow-text",children:X(m.session.inputContext,80)})]}),e.jsx(Z,{node:m,selectedId:g,activeSessionId:v,onSelect:l,depth:c+1,batchMode:d,selected:b,onToggleSelect:f,onCreateChild:h,onRename:r,onArchive:i,onDelete:j,onOpenConfig:o,editingId:u,editTitle:N,onEditTitleChange:E,onCommitRename:D,onCancelEdit:k,configEditingId:w,configOptions:I,resolvedConfig:T,inheritedConfig:L,onSaveConfig:A,onCancelConfig:G}),m.session.result&&e.jsxs("div",{className:"tree-flow-label result",style:{marginLeft:(c+1)*24},children:[e.jsx("span",{className:"tree-flow-arrow",children:"↑"}),e.jsx("span",{className:"tree-flow-text",children:X(m.session.result,80)})]})]},m.session.id))})]})}function fe({detail:s,onSwitchSession:g,onRefresh:v}){const l=s.session,c=xe(s.messages),[d,b]=ge(l.id,l.status);return p.useEffect(()=>{d.done&&(b(),v==null||v())},[d.done,b,v]),e.jsxs("div",{className:"session-detail",children:[e.jsxs("div",{className:"session-detail-header",children:[e.jsx("h3",{children:l.title||l.name}),e.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[g&&e.jsx("button",{className:"btn btn-sm btn-primary",onClick:()=>g(l.id),children:"进入对话"}),e.jsx("span",{className:"session-detail-status",style:{color:q[l.status]},children:Y[l.status]})]})]}),e.jsxs("div",{className:"session-detail-meta",children:[e.jsxs("div",{children:[e.jsx("strong",{children:"ID:"})," ",l.id]}),e.jsxs("div",{children:[e.jsx("strong",{children:"创建时间:"})," ",new Date(l.createdAt).toLocaleString("zh-CN")]}),l.parentId&&e.jsxs("div",{children:[e.jsx("strong",{children:"父会话:"})," ",l.parentId]}),l.createdBy&&e.jsxs("div",{children:[e.jsx("strong",{children:"创建者:"})," ",l.createdBy]}),l.children.length>0&&e.jsxs("div",{children:[e.jsx("strong",{children:"子会话数:"})," ",l.children.length]})]}),l.inputContext&&e.jsxs("div",{className:"session-detail-context",children:[e.jsx("div",{className:"context-label",children:"来自父会话的指令"}),e.jsx("div",{className:"context-content",children:l.inputContext})]}),l.result&&e.jsxs("div",{className:"session-detail-result",children:[e.jsx("div",{className:"context-label",children:"给父会话的结果"}),e.jsx("div",{className:"context-content",children:l.result})]}),e.jsxs("div",{className:"session-detail-messages",children:[e.jsxs("h4",{children:["消息记录 (",s.messages.length,")"]}),c.length===0&&!d.isStreaming?e.jsx("div",{className:"no-messages",children:"暂无消息记录"}):e.jsxs("div",{className:"message-list",children:[c.map((f,h)=>e.jsx(ve,{msg:f},h)),d.isStreaming&&d.segments.length>0&&e.jsxs("div",{className:"detail-message assistant streaming",children:[e.jsxs("div",{className:"detail-msg-role",children:["助手 ",e.jsx("span",{className:"streaming-indicator",children:"●"})]}),e.jsx("div",{className:"detail-msg-content detail-msg-md",children:(()=>{const f=[];let h=0;for(;h<d.segments.length;){const r=d.segments[h];if(r.type==="reasoning_text"){let i="";for(;h<d.segments.length&&d.segments[h].type==="reasoning_text";)i+=d.segments[h].content,h++;i&&f.push(e.jsxs("details",{className:"thinking-block",open:!0,children:[e.jsxs("summary",{className:"thinking-summary",children:[e.jsx(V,{size:14})," 思考过程"]}),e.jsx("div",{className:"thinking-content",children:e.jsx(F,{remarkPlugins:B,rehypePlugins:z,components:R,children:M(i)})})]},`r-${h}`));continue}f.push(e.jsx(ee,{seg:r},h)),h++}return f})()})]})]})]})]})}function ee({seg:s}){return s.type==="text"||s.type==="reasoning_text"?s.content?e.jsx("div",{className:"detail-text-segment",children:e.jsx(F,{remarkPlugins:B,rehypePlugins:z,components:R,children:M(s.content)})}):null:e.jsxs("details",{className:"tool-call-block",children:[e.jsxs("summary",{className:"tool-call-summary",children:[e.jsx(pe,{size:14})," ",s.name,s.result==null?" …":""]}),e.jsxs("div",{className:"tool-call-content",children:[e.jsxs("div",{className:"tool-call-args",children:[e.jsx("strong",{children:"参数"}),e.jsx("pre",{children:JSON.stringify(s.args,null,2)})]}),s.result!=null&&e.jsxs("div",{className:"tool-call-result",children:[e.jsx("strong",{children:"结果"}),e.jsx("pre",{children:s.result})]})]})]})}function ve({msg:s}){const g=s.role==="user"?"用户":"助手";if(s.role==="user")return e.jsxs("div",{className:`detail-message ${s.role}`,children:[e.jsx("div",{className:"detail-msg-role",children:g}),e.jsx("div",{className:"detail-msg-content",children:s.content}),s.timestamp>0&&e.jsx("div",{className:"detail-msg-time",children:K(s.timestamp)})]});if(s.role==="assistant"&&s.segments&&s.segments.length>0){const l=[];let c=0;for(;c<s.segments.length;){const d=s.segments[c];if(d.type==="reasoning_text"){let b="";for(;c<s.segments.length&&s.segments[c].type==="reasoning_text";)b+=s.segments[c].content,c++;b&&l.push(e.jsxs("details",{className:"thinking-block",children:[e.jsxs("summary",{className:"thinking-summary",children:[e.jsx(V,{size:14})," 思考过程"]}),e.jsx("div",{className:"thinking-content",children:e.jsx(F,{remarkPlugins:B,rehypePlugins:z,components:R,children:M(b)})})]},`r-${c}`));continue}l.push(e.jsx(ee,{seg:d},c)),c++}return e.jsxs("div",{className:`detail-message ${s.role}`,children:[e.jsx("div",{className:"detail-msg-role",children:g}),e.jsx("div",{className:"detail-msg-content detail-msg-md",children:l}),s.timestamp>0&&e.jsx("div",{className:"detail-msg-time",children:K(s.timestamp)})]})}const v=s.role==="assistant"&&s.reasoningContent?e.jsxs("details",{className:"thinking-block",children:[e.jsxs("summary",{className:"thinking-summary",children:[e.jsx(V,{size:14})," 思考过程"]}),e.jsx("div",{className:"thinking-content",children:e.jsx(F,{remarkPlugins:B,rehypePlugins:z,components:R,children:M(s.reasoningContent)})})]}):null;return e.jsxs("div",{className:`detail-message ${s.role}`,children:[e.jsx("div",{className:"detail-msg-role",children:g}),v,e.jsx("div",{className:"detail-msg-content detail-msg-md",children:e.jsx(F,{remarkPlugins:B,rehypePlugins:z,components:R,children:M(s.content)})}),s.timestamp>0&&e.jsx("div",{className:"detail-msg-time",children:K(s.timestamp)})]})}export{Se as SessionsPage};
1
+ import{r as p,j as e}from"./react-vendor-BPQixOLZ.js";import{p as S,b as xe,B as V,M as R,R as z,d as B,e as M,W as pe}from"./index-BtvzdAkg.js";import{M as F}from"./markdown-BCywGHw2.js";import"./highlight-DJvvuuwd.js";import"./katex-Bq6vt64r.js";function ge(s,g){const[v,l]=p.useState({segments:[],isStreaming:!1,done:!1}),c=p.useRef(null),d=!!(s&&(g==="active"||g==="waiting"));p.useEffect(()=>{if(!d||!s){l({segments:[],isStreaming:!1,done:!1});return}const f=location.protocol==="https:"?"wss:":"ws:",h=new WebSocket(`${f}//${location.host}/ws`);return c.current=h,h.onopen=()=>{h.send(JSON.stringify({type:"subscribe_session",sessionId:s}))},h.onmessage=r=>{try{const i=JSON.parse(r.data);if(i.type==="stream_resume"){let j=[];if(Array.isArray(i.segments)&&i.segments.length>0)j=i.segments;else{const o=i.reasoningContent??"",u=i.content??"";o&&j.push({type:"reasoning_text",content:o}),u&&j.push({type:"text",content:u})}l({segments:j,isStreaming:!i.done,done:!!i.done})}else i.type==="stream"?i.done?l(j=>({...j,isStreaming:!1,done:!0})):l(j=>{const o=[...j.segments],u=(N,E)=>{const D=o[o.length-1];D&&D.type===N?o[o.length-1]={type:N,content:D.content+E}:o.push({type:N,content:E})};return i.reasoningDelta&&u("reasoning_text",i.reasoningDelta),i.contentDelta&&u("text",i.contentDelta),{...j,segments:o,isStreaming:!0}}):i.type==="tool_call"?l(j=>{const o=[...j.segments];if(i.toolPhase==="start")o.push({type:"tool_call",name:i.toolName,args:i.toolArgs??{},startTime:Date.now()});else if(i.toolPhase==="end"&&i.toolResult!==void 0){const u=o.findLastIndex(N=>N.type==="tool_call"&&N.name===i.toolName&&N.result==null);if(u>=0){const N=o[u];o[u]={...N,result:i.toolResult,endTime:Date.now()}}}return{...j,segments:o,isStreaming:!0}}):i.type==="message"&&l(j=>({...j,done:!0,isStreaming:!1}))}catch{}},h.onclose=()=>{c.current=null},()=>{h.close(),c.current=null}},[s,d]);const b=p.useCallback(()=>{l({segments:[],isStreaming:!1,done:!1})},[]);return[v,b]}const Y={active:"进行中",waiting:"等待中",completed:"已完成",error:"错误",archived:"已归档"},q={active:"#4caf50",waiting:"#ff9800",completed:"#2196f3",error:"#f44336",archived:"#888"};function X(s,g){return s?s.length>g?s.slice(0,g)+"…":s:""}function K(s){return new Date(s).toLocaleString("zh-CN",{month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit"})}function Q(s){const g=[];for(const v of s)g.push(v.session.id),g.push(...Q(v.children));return g}function je({config:s,resolvedConfig:g,inheritedConfig:v,options:l,onSave:c,onCancel:d}){var L,A,G;const b={...s},f=typeof s.model=="string"?s.model:void 0,h=typeof s.llmProvider=="string"?s.llmProvider:void 0;if(f){const t=h??((L=s.llm)==null?void 0:L.provider);t&&(b.llm={provider:t,model:f})}delete b.model,delete b.llmProvider;const[r,i]=p.useState(b),j=g||{},o=v||{},u=(t,x)=>{i(n=>({...n,[t]:x}))},N=t=>{var x,n;return(x=r.enabledToolGroups)!=null&&x.includes(t)?"explicit":(n=o.enabledToolGroups)!=null&&n.includes(t)&&!r.enabledToolGroups?"inherited":"off"},E=t=>{if(N(t)==="inherited"){const n=[...o.enabledToolGroups||[]];u("enabledToolGroups",n.filter(C=>C!==t))}else{const n=r.enabledToolGroups||o.enabledToolGroups||[],C=n.includes(t)?n.filter(_=>_!==t):[...n,t];u("enabledToolGroups",C.length>0?C:void 0)}},D=()=>{i(t=>{const{enabledToolGroups:x,...n}=t;return n})};if(!l)return e.jsx("div",{className:"session-config-editor",children:e.jsx("span",{className:"session-config-loading",children:"加载配置选项…"})});const k=(t,x)=>!r[t]&&x?` (继承: ${x})`:"",w=(A=r.llm)!=null&&A.provider&&((G=r.llm)!=null&&G.model)?`${r.llm.provider}/${r.llm.model}`:"",I=l.models.filter(t=>!!t.provider).map(t=>({key:`${t.provider}/${t.id}`,provider:t.provider,model:t.id,label:`${t.provider} / ${t.id}${t.capabilities.length>0?` [${t.capabilities.join(",")}]`:""}`}));w&&!I.some(t=>t.key===w)&&I.unshift({key:w,provider:r.llm.provider,model:r.llm.model,label:`${r.llm.provider} / ${r.llm.model} (已离线)`});const T=o.llm?`${o.llm.provider} / ${o.llm.model}`:void 0;return e.jsxs("div",{className:"session-config-editor",onClick:t=>t.stopPropagation(),children:[e.jsxs("label",{className:"session-config-field",children:[e.jsxs("span",{children:["模型",!r.llm&&T?` (继承: ${T})`:""]}),e.jsxs("select",{value:w,onChange:t=>{const x=t.target.value;if(!x){u("llm",void 0);return}const n=I.find(C=>C.key===x);n&&u("llm",{provider:n.provider,model:n.model})},children:[e.jsx("option",{value:"",children:T?`继承 (${T})`:"继承默认"}),I.map(t=>e.jsx("option",{value:t.key,children:t.label},t.key))]})]}),e.jsxs("label",{className:"session-config-field",children:[e.jsxs("span",{children:["人设",k("persona",o.persona)]}),e.jsxs("select",{value:r.persona||"",onChange:t=>u("persona",t.target.value||void 0),children:[e.jsx("option",{value:"",children:o.persona?`继承 (${o.persona})`:"继承默认"}),l.personas.map(t=>e.jsx("option",{value:t,children:t},t))]})]}),l.toolGroups.length>0&&e.jsxs("div",{className:"session-config-field",children:[e.jsxs("span",{children:["工具分组",r.enabledToolGroups?"":" (继承)"]}),e.jsxs("div",{className:"session-config-chips",children:[l.toolGroups.map(t=>{const x=N(t.name);return e.jsx("button",{className:`session-config-chip ${x==="explicit"?"active":x==="inherited"?"active inherited":""}`,onClick:()=>E(t.name),title:`${t.name}${x==="inherited"?" (继承)":x==="explicit"?" (已覆盖)":""}`,children:t.label||t.name},t.name)}),r.enabledToolGroups&&e.jsx("button",{className:"session-config-chip reset",onClick:D,title:"恢复为继承",children:"↺ 重置"})]})]}),e.jsxs("label",{className:"session-config-field",children:[e.jsx("span",{children:"额外提示"}),e.jsx("textarea",{rows:2,value:r.systemPromptExtra||"",onChange:t=>u("systemPromptExtra",t.target.value||void 0),placeholder:"追加到系统提示之后…"})]}),e.jsxs("label",{className:"session-config-field",children:[e.jsx("span",{children:"工具迭代上限"}),e.jsx("input",{type:"number",min:0,max:50,value:r.maxToolIterations??"",onChange:t=>u("maxToolIterations",t.target.value?Number(t.target.value):void 0),placeholder:o.maxToolIterations?`继承 (${o.maxToolIterations})`:"默认"})]}),e.jsxs("div",{className:"session-config-toggles",children:[e.jsxs("label",{children:[e.jsx("input",{type:"checkbox",checked:r.disableOutputFormat??j.disableOutputFormat??!1,onChange:t=>u("disableOutputFormat",t.target.checked||void 0)}),e.jsxs("span",{children:["禁用结构化输出",r.disableOutputFormat===void 0&&o.disableOutputFormat?" (继承)":""]})]}),e.jsxs("label",{children:[e.jsx("input",{type:"checkbox",checked:r.clientSideJsonRendering??j.clientSideJsonRendering??!1,onChange:t=>u("clientSideJsonRendering",t.target.checked||void 0)}),e.jsxs("span",{children:["客户端 JSON 渲染",r.clientSideJsonRendering===void 0&&o.clientSideJsonRendering?" (继承)":""]})]})]}),e.jsxs("div",{className:"session-config-actions",children:[e.jsx("button",{className:"session-config-btn save",onClick:()=>c(r),children:"保存"}),e.jsx("button",{className:"session-config-btn cancel",onClick:d,children:"取消"})]})]})}function Se({pluginName:s,activeSessionId:g,onSwitchSession:v,onStartNewChat:l,refreshSignal:c}){const[d,b]=p.useState([]),[f,h]=p.useState(null),[r,i]=p.useState(null),[j,o]=p.useState(!1),[u,N]=p.useState(null),[E,D]=p.useState(!1),[k,w]=p.useState(new Set),[I,T]=p.useState(null),[L,A]=p.useState(""),[G,t]=p.useState(null),[x,n]=p.useState(null),[C,_]=p.useState(null),[W,O]=p.useState(null),[U,m]=p.useState(null),$=p.useCallback(()=>{S(s,"getSessionTree").then(a=>{Array.isArray(a)&&b(a)}).catch(()=>N("无法加载会话树"))},[s]);p.useEffect(()=>{$();const a=setInterval($,3e4);return()=>clearInterval(a)},[$]),p.useEffect(()=>{c&&($(),x&&Promise.all([S(s,"getResolvedConfig",{sessionId:x,platform:"webui"}),S(s,"getInheritedDefaults",{sessionId:x,platform:"webui"})]).then(([a,y])=>{a&&O(a),y&&m(y)}).catch(()=>{}))},[c]);const H=p.useCallback(a=>{h(a),o(!0),S(s,"getSessionDetail",{id:a}).then(y=>i(y)).catch(()=>i(null)).finally(()=>o(!1))},[s]),se=async()=>{try{await S(s,"createSession",{}),$()}catch{}},te=async a=>{try{await S(s,"createSession",{parentId:a}),$()}catch{}},ne=async a=>{if(!L.trim()){T(null);return}try{await S(s,"renameSession",{id:a,title:L.trim()}),$()}catch{}T(null)},le=async a=>{try{await S(s,"archiveSession",{id:a}),$()}catch{}},ie=async a=>{try{const y=a===g;await S(s,"deleteSession",{id:a}),$(),f===a&&(h(null),i(null)),y&&l&&l()}catch{}t(null)},ae=async a=>{if(x===a){n(null),O(null),m(null);return}n(a),O(null),m(null);try{const[y,P,J]=await Promise.all([C?Promise.resolve(C):S(s,"getConfigOptions"),S(s,"getResolvedConfig",{sessionId:a,platform:"webui"}),S(s,"getInheritedDefaults",{sessionId:a,platform:"webui"})]);y&&!C&&_(y),P&&O(P),J&&m(J)}catch{}},re=async(a,y)=>{try{await S(s,"updateSessionConfig",{id:a,config:y}),$(),n(null)}catch(P){const J=P instanceof Error?P.message:String(P);alert(`保存会话配置失败:${J}`)}},oe=a=>{w(y=>{const P=new Set(y);return P.has(a)?P.delete(a):P.add(a),P})},ce=()=>{const a=Q(d);w(new Set(a))},de=()=>w(new Set),he=async()=>{if(k.size!==0)try{await S(s,"batchArchive",{ids:[...k]}),w(new Set),$()}catch{}},me=async()=>{if(k.size!==0&&confirm(`确认删除选中的 ${k.size} 个会话?此操作不可恢复。`))try{await S(s,"batchDelete",{ids:[...k]}),w(new Set),f&&k.has(f)&&(h(null),i(null)),$()}catch{}},ue=()=>{D(!1),w(new Set)};return u?e.jsx("div",{className:"tree-page-error",children:u}):e.jsxs("div",{className:"session-tree-page",children:[e.jsxs("div",{className:"tree-visual-panel",children:[e.jsxs("div",{className:"tree-visual-header",children:[e.jsx("h3",{children:"会话"}),e.jsx("div",{className:"tree-header-actions",children:E?e.jsxs(e.Fragment,{children:[e.jsx("button",{className:"tree-batch-btn",onClick:ce,title:"全选",children:"全选"}),e.jsx("button",{className:"tree-batch-btn",onClick:de,title:"取消全选",children:"取消"}),e.jsxs("button",{className:"tree-batch-btn archive",onClick:he,disabled:k.size===0,children:["归档 (",k.size,")"]}),e.jsxs("button",{className:"tree-batch-btn danger",onClick:me,disabled:k.size===0,children:["删除 (",k.size,")"]}),e.jsx("button",{className:"tree-batch-btn",onClick:ue,children:"退出批量"})]}):e.jsxs(e.Fragment,{children:[e.jsx("button",{className:"tree-action-btn",onClick:se,title:"新建会话",children:"+"}),e.jsx("button",{className:"tree-action-btn",onClick:()=>D(!0),title:"批量管理",children:"☐"}),e.jsx("button",{className:"tree-refresh-btn",onClick:$,children:"⟳"})]})})]}),e.jsx("div",{className:"tree-visual-body",children:d.length===0?e.jsx("div",{className:"tree-empty",children:"暂无会话"}):d.map(a=>e.jsx(Z,{node:a,selectedId:f,activeSessionId:g,onSelect:H,depth:0,batchMode:E,selected:k,onToggleSelect:oe,onCreateChild:te,onRename:(y,P)=>{T(y),A(P)},onArchive:le,onDelete:y=>t(y),onOpenConfig:ae,editingId:I,editTitle:L,onEditTitleChange:A,onCommitRename:ne,onCancelEdit:()=>T(null),configEditingId:x,configOptions:C,resolvedConfig:W,inheritedConfig:U,onSaveConfig:re,onCancelConfig:()=>n(null)},a.session.id))})]}),e.jsx("div",{className:"tree-detail-panel",children:f?j?e.jsx("div",{className:"tree-detail-placeholder",children:"加载中…"}):r?e.jsx(fe,{detail:r,onSwitchSession:v,onRefresh:()=>H(r.session.id)}):e.jsx("div",{className:"tree-detail-placeholder",children:"无法加载会话信息"}):e.jsx("div",{className:"tree-detail-placeholder",children:"点击左侧会话节点查看详情"})}),G&&e.jsx("div",{className:"delete-confirm-overlay",onClick:()=>t(null),children:e.jsxs("div",{className:"delete-confirm-dialog",onClick:a=>a.stopPropagation(),children:[e.jsx("p",{children:"确定要删除此会话吗?子会话也会被一并删除,此操作无法撤销。"}),e.jsxs("div",{className:"delete-confirm-actions",children:[e.jsx("button",{className:"btn btn-sm btn-danger",onClick:()=>ie(G),children:"删除"}),e.jsx("button",{className:"btn btn-sm",onClick:()=>t(null),children:"取消"})]})]})})]})}function Z({node:s,selectedId:g,activeSessionId:v,onSelect:l,depth:c,batchMode:d,selected:b,onToggleSelect:f,onCreateChild:h,onRename:r,onArchive:i,onDelete:j,onOpenConfig:o,editingId:u,editTitle:N,onEditTitleChange:E,onCommitRename:D,onCancelEdit:k,configEditingId:w,configOptions:I,resolvedConfig:T,inheritedConfig:L,onSaveConfig:A,onCancelConfig:G}){const[t,x]=p.useState(!0),n=s.session,C=s.children.length>0,_=n.id===g,W=n.id===v,O=u===n.id,U=b.has(n.id);return e.jsxs("div",{className:"tree-node-group",children:[e.jsxs("div",{className:`tree-node ${_?"selected":""} ${W?"active-chat":""} status-${n.status}`,style:{marginLeft:c*24},onClick:()=>d?f(n.id):l(n.id),children:[d&&e.jsx("input",{type:"checkbox",className:"tree-node-checkbox",checked:U,onChange:()=>f(n.id),onClick:m=>m.stopPropagation()}),e.jsx("button",{className:"tree-node-toggle",onClick:m=>{m.stopPropagation(),x(!t)},style:{visibility:C?"visible":"hidden"},children:t?"▾":"▸"}),e.jsx("span",{className:"tree-node-status",style:{background:q[n.status]||"#888"}}),e.jsx("div",{className:"tree-node-info",children:O?e.jsx("input",{className:"tree-node-rename-input",value:N,onChange:m=>E(m.target.value),onBlur:()=>D(n.id),onKeyDown:m=>{m.key==="Enter"&&D(n.id),m.key==="Escape"&&k()},onClick:m=>m.stopPropagation(),autoFocus:!0}):e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"tree-node-title",children:n.title||n.name}),e.jsxs("span",{className:"tree-node-meta",children:[Y[n.status]||n.status,n.createdBy&&n.createdBy!=="user"&&` · ${n.createdBy}`,` · ${K(n.createdAt)}`]})]})}),C&&e.jsx("span",{className:"tree-node-badge",children:s.children.length}),!d&&e.jsxs("div",{className:"tree-node-actions",onClick:m=>m.stopPropagation(),children:[e.jsx("button",{className:"tree-node-action-btn",title:"新建子会话",onClick:()=>h(n.id),children:"➕"}),e.jsx("button",{className:"tree-node-action-btn",title:"配置",onClick:()=>o(n.id),children:"⚙"}),e.jsx("button",{className:"tree-node-action-btn",title:"重命名",onClick:()=>r(n.id,n.title||n.name),children:"✎"}),n.status==="active"&&e.jsx("button",{className:"tree-node-action-btn",title:"归档",onClick:()=>i(n.id),children:"▪"}),e.jsx("button",{className:"tree-node-action-btn danger",title:"删除",onClick:()=>j(n.id),children:"✕"})]})]}),w===n.id&&e.jsx("div",{style:{marginLeft:c*24+24},children:e.jsx(je,{config:n.config||{},resolvedConfig:T,inheritedConfig:L,options:I,onSave:m=>A(n.id,m),onCancel:G})}),C&&t&&e.jsx("div",{className:"tree-node-children",children:s.children.map(m=>e.jsxs("div",{className:"tree-child-wrapper",children:[m.session.inputContext&&e.jsxs("div",{className:"tree-flow-label",style:{marginLeft:(c+1)*24},children:[e.jsx("span",{className:"tree-flow-arrow",children:"↓"}),e.jsx("span",{className:"tree-flow-text",children:X(m.session.inputContext,80)})]}),e.jsx(Z,{node:m,selectedId:g,activeSessionId:v,onSelect:l,depth:c+1,batchMode:d,selected:b,onToggleSelect:f,onCreateChild:h,onRename:r,onArchive:i,onDelete:j,onOpenConfig:o,editingId:u,editTitle:N,onEditTitleChange:E,onCommitRename:D,onCancelEdit:k,configEditingId:w,configOptions:I,resolvedConfig:T,inheritedConfig:L,onSaveConfig:A,onCancelConfig:G}),m.session.result&&e.jsxs("div",{className:"tree-flow-label result",style:{marginLeft:(c+1)*24},children:[e.jsx("span",{className:"tree-flow-arrow",children:"↑"}),e.jsx("span",{className:"tree-flow-text",children:X(m.session.result,80)})]})]},m.session.id))})]})}function fe({detail:s,onSwitchSession:g,onRefresh:v}){const l=s.session,c=xe(s.messages),[d,b]=ge(l.id,l.status);return p.useEffect(()=>{d.done&&(b(),v==null||v())},[d.done,b,v]),e.jsxs("div",{className:"session-detail",children:[e.jsxs("div",{className:"session-detail-header",children:[e.jsx("h3",{children:l.title||l.name}),e.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[g&&e.jsx("button",{className:"btn btn-sm btn-primary",onClick:()=>g(l.id),children:"进入对话"}),e.jsx("span",{className:"session-detail-status",style:{color:q[l.status]},children:Y[l.status]})]})]}),e.jsxs("div",{className:"session-detail-meta",children:[e.jsxs("div",{children:[e.jsx("strong",{children:"ID:"})," ",l.id]}),e.jsxs("div",{children:[e.jsx("strong",{children:"创建时间:"})," ",new Date(l.createdAt).toLocaleString("zh-CN")]}),l.parentId&&e.jsxs("div",{children:[e.jsx("strong",{children:"父会话:"})," ",l.parentId]}),l.createdBy&&e.jsxs("div",{children:[e.jsx("strong",{children:"创建者:"})," ",l.createdBy]}),l.children.length>0&&e.jsxs("div",{children:[e.jsx("strong",{children:"子会话数:"})," ",l.children.length]})]}),l.inputContext&&e.jsxs("div",{className:"session-detail-context",children:[e.jsx("div",{className:"context-label",children:"来自父会话的指令"}),e.jsx("div",{className:"context-content",children:l.inputContext})]}),l.result&&e.jsxs("div",{className:"session-detail-result",children:[e.jsx("div",{className:"context-label",children:"给父会话的结果"}),e.jsx("div",{className:"context-content",children:l.result})]}),e.jsxs("div",{className:"session-detail-messages",children:[e.jsxs("h4",{children:["消息记录 (",s.messages.length,")"]}),c.length===0&&!d.isStreaming?e.jsx("div",{className:"no-messages",children:"暂无消息记录"}):e.jsxs("div",{className:"message-list",children:[c.map((f,h)=>e.jsx(ve,{msg:f},h)),d.isStreaming&&d.segments.length>0&&e.jsxs("div",{className:"detail-message assistant streaming",children:[e.jsxs("div",{className:"detail-msg-role",children:["助手 ",e.jsx("span",{className:"streaming-indicator",children:"●"})]}),e.jsx("div",{className:"detail-msg-content detail-msg-md",children:(()=>{const f=[];let h=0;for(;h<d.segments.length;){const r=d.segments[h];if(r.type==="reasoning_text"){let i="";for(;h<d.segments.length&&d.segments[h].type==="reasoning_text";)i+=d.segments[h].content,h++;i&&f.push(e.jsxs("details",{className:"thinking-block",open:!0,children:[e.jsxs("summary",{className:"thinking-summary",children:[e.jsx(V,{size:14})," 思考过程"]}),e.jsx("div",{className:"thinking-content",children:e.jsx(F,{remarkPlugins:B,rehypePlugins:z,components:R,children:M(i)})})]},`r-${h}`));continue}f.push(e.jsx(ee,{seg:r},h)),h++}return f})()})]})]})]})]})}function ee({seg:s}){return s.type==="text"||s.type==="reasoning_text"?s.content?e.jsx("div",{className:"detail-text-segment",children:e.jsx(F,{remarkPlugins:B,rehypePlugins:z,components:R,children:M(s.content)})}):null:e.jsxs("details",{className:"tool-call-block",children:[e.jsxs("summary",{className:"tool-call-summary",children:[e.jsx(pe,{size:14})," ",s.name,s.result==null?" …":""]}),e.jsxs("div",{className:"tool-call-content",children:[e.jsxs("div",{className:"tool-call-args",children:[e.jsx("strong",{children:"参数"}),e.jsx("pre",{children:JSON.stringify(s.args,null,2)})]}),s.result!=null&&e.jsxs("div",{className:"tool-call-result",children:[e.jsx("strong",{children:"结果"}),e.jsx("pre",{children:s.result})]})]})]})}function ve({msg:s}){const g=s.role==="user"?"用户":"助手";if(s.role==="user")return e.jsxs("div",{className:`detail-message ${s.role}`,children:[e.jsx("div",{className:"detail-msg-role",children:g}),e.jsx("div",{className:"detail-msg-content",children:s.content}),s.timestamp>0&&e.jsx("div",{className:"detail-msg-time",children:K(s.timestamp)})]});if(s.role==="assistant"&&s.segments&&s.segments.length>0){const l=[];let c=0;for(;c<s.segments.length;){const d=s.segments[c];if(d.type==="reasoning_text"){let b="";for(;c<s.segments.length&&s.segments[c].type==="reasoning_text";)b+=s.segments[c].content,c++;b&&l.push(e.jsxs("details",{className:"thinking-block",children:[e.jsxs("summary",{className:"thinking-summary",children:[e.jsx(V,{size:14})," 思考过程"]}),e.jsx("div",{className:"thinking-content",children:e.jsx(F,{remarkPlugins:B,rehypePlugins:z,components:R,children:M(b)})})]},`r-${c}`));continue}l.push(e.jsx(ee,{seg:d},c)),c++}return e.jsxs("div",{className:`detail-message ${s.role}`,children:[e.jsx("div",{className:"detail-msg-role",children:g}),e.jsx("div",{className:"detail-msg-content detail-msg-md",children:l}),s.timestamp>0&&e.jsx("div",{className:"detail-msg-time",children:K(s.timestamp)})]})}const v=s.role==="assistant"&&s.reasoningContent?e.jsxs("details",{className:"thinking-block",children:[e.jsxs("summary",{className:"thinking-summary",children:[e.jsx(V,{size:14})," 思考过程"]}),e.jsx("div",{className:"thinking-content",children:e.jsx(F,{remarkPlugins:B,rehypePlugins:z,components:R,children:M(s.reasoningContent)})})]}):null;return e.jsxs("div",{className:`detail-message ${s.role}`,children:[e.jsx("div",{className:"detail-msg-role",children:g}),v,e.jsx("div",{className:"detail-msg-content detail-msg-md",children:e.jsx(F,{remarkPlugins:B,rehypePlugins:z,components:R,children:M(s.content)})}),s.timestamp>0&&e.jsx("div",{className:"detail-msg-time",children:K(s.timestamp)})]})}export{Se as SessionsPage};
@@ -1 +1 @@
1
- import{a0 as ln,a1 as an,a2 as H,a3 as q,a4 as B,a5 as un,a6 as y,a7 as tn,a8 as L,a9 as _,aa as rn,ab as o,ac as on,ad as sn,ae as fn}from"./mermaid.core-CWJzgNYH.js";function cn(l){return l.innerRadius}function yn(l){return l.outerRadius}function gn(l){return l.startAngle}function dn(l){return l.endAngle}function mn(l){return l&&l.padAngle}function pn(l,h,I,D,v,A,C,a){var O=I-l,i=D-h,n=C-v,d=a-A,u=d*O-n*i;if(!(u*u<y))return u=(n*(h-A)-d*(l-v))/u,[l+u*O,h+u*i]}function W(l,h,I,D,v,A,C){var a=l-I,O=h-D,i=(C?A:-A)/L(a*a+O*O),n=i*O,d=-i*a,u=l+n,s=h+d,f=I+n,c=D+d,F=(u+f)/2,t=(s+c)/2,m=f-u,g=c-s,R=m*m+g*g,T=v-A,P=u*c-f*s,S=(g<0?-1:1)*L(on(0,T*T*R-P*P)),j=(P*g-m*S)/R,z=(-P*m-g*S)/R,w=(P*g+m*S)/R,p=(-P*m+g*S)/R,x=j-F,e=z-t,r=w-F,G=p-t;return x*x+e*e>r*r+G*G&&(j=w,z=p),{cx:j,cy:z,x01:-n,y01:-d,x11:j*(v/T-1),y11:z*(v/T-1)}}function hn(){var l=cn,h=yn,I=B(0),D=null,v=gn,A=dn,C=mn,a=null,O=ln(i);function i(){var n,d,u=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-un,c=A.apply(this,arguments)-un,F=rn(c-f),t=c>f;if(a||(a=n=O()),s<u&&(d=s,s=u,u=d),!(s>y))a.moveTo(0,0);else if(F>tn-y)a.moveTo(s*H(f),s*q(f)),a.arc(0,0,s,f,c,!t),u>y&&(a.moveTo(u*H(c),u*q(c)),a.arc(0,0,u,c,f,t));else{var m=f,g=c,R=f,T=c,P=F,S=F,j=C.apply(this,arguments)/2,z=j>y&&(D?+D.apply(this,arguments):L(u*u+s*s)),w=_(rn(s-u)/2,+I.apply(this,arguments)),p=w,x=w,e,r;if(z>y){var G=sn(z/u*q(j)),M=sn(z/s*q(j));(P-=G*2)>y?(G*=t?1:-1,R+=G,T-=G):(P=0,R=T=(f+c)/2),(S-=M*2)>y?(M*=t?1:-1,m+=M,g-=M):(S=0,m=g=(f+c)/2)}var J=s*H(m),K=s*q(m),N=u*H(T),Q=u*q(T);if(w>y){var U=s*H(g),V=s*q(g),X=u*H(R),Y=u*q(R),E;if(F<an)if(E=pn(J,K,X,Y,U,V,N,Q)){var Z=J-E[0],$=K-E[1],b=U-E[0],k=V-E[1],nn=1/q(fn((Z*b+$*k)/(L(Z*Z+$*$)*L(b*b+k*k)))/2),en=L(E[0]*E[0]+E[1]*E[1]);p=_(w,(u-en)/(nn-1)),x=_(w,(s-en)/(nn+1))}else p=x=0}S>y?x>y?(e=W(X,Y,J,K,s,x,t),r=W(U,V,N,Q,s,x,t),a.moveTo(e.cx+e.x01,e.cy+e.y01),x<w?a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,s,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),!t),a.arc(r.cx,r.cy,x,o(r.y11,r.x11),o(r.y01,r.x01),!t))):(a.moveTo(J,K),a.arc(0,0,s,m,g,!t)):a.moveTo(J,K),!(u>y)||!(P>y)?a.lineTo(N,Q):p>y?(e=W(N,Q,U,V,u,-p,t),r=W(J,K,X,Y,u,-p,t),a.lineTo(e.cx+e.x01,e.cy+e.y01),p<w?a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,u,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),t),a.arc(r.cx,r.cy,p,o(r.y11,r.x11),o(r.y01,r.x01),!t))):a.arc(0,0,u,T,R,t)}if(a.closePath(),n)return a=null,n+""||null}return i.centroid=function(){var n=(+l.apply(this,arguments)+ +h.apply(this,arguments))/2,d=(+v.apply(this,arguments)+ +A.apply(this,arguments))/2-an/2;return[H(d)*n,q(d)*n]},i.innerRadius=function(n){return arguments.length?(l=typeof n=="function"?n:B(+n),i):l},i.outerRadius=function(n){return arguments.length?(h=typeof n=="function"?n:B(+n),i):h},i.cornerRadius=function(n){return arguments.length?(I=typeof n=="function"?n:B(+n),i):I},i.padRadius=function(n){return arguments.length?(D=n==null?null:typeof n=="function"?n:B(+n),i):D},i.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:B(+n),i):v},i.endAngle=function(n){return arguments.length?(A=typeof n=="function"?n:B(+n),i):A},i.padAngle=function(n){return arguments.length?(C=typeof n=="function"?n:B(+n),i):C},i.context=function(n){return arguments.length?(a=n??null,i):a},i}export{hn as d};
1
+ import{a0 as ln,a1 as an,a2 as H,a3 as q,a4 as B,a5 as un,a6 as y,a7 as tn,a8 as L,a9 as _,aa as rn,ab as o,ac as on,ad as sn,ae as fn}from"./mermaid.core-C4yLb7RL.js";function cn(l){return l.innerRadius}function yn(l){return l.outerRadius}function gn(l){return l.startAngle}function dn(l){return l.endAngle}function mn(l){return l&&l.padAngle}function pn(l,h,I,D,v,A,C,a){var O=I-l,i=D-h,n=C-v,d=a-A,u=d*O-n*i;if(!(u*u<y))return u=(n*(h-A)-d*(l-v))/u,[l+u*O,h+u*i]}function W(l,h,I,D,v,A,C){var a=l-I,O=h-D,i=(C?A:-A)/L(a*a+O*O),n=i*O,d=-i*a,u=l+n,s=h+d,f=I+n,c=D+d,F=(u+f)/2,t=(s+c)/2,m=f-u,g=c-s,R=m*m+g*g,T=v-A,P=u*c-f*s,S=(g<0?-1:1)*L(on(0,T*T*R-P*P)),j=(P*g-m*S)/R,z=(-P*m-g*S)/R,w=(P*g+m*S)/R,p=(-P*m+g*S)/R,x=j-F,e=z-t,r=w-F,G=p-t;return x*x+e*e>r*r+G*G&&(j=w,z=p),{cx:j,cy:z,x01:-n,y01:-d,x11:j*(v/T-1),y11:z*(v/T-1)}}function hn(){var l=cn,h=yn,I=B(0),D=null,v=gn,A=dn,C=mn,a=null,O=ln(i);function i(){var n,d,u=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-un,c=A.apply(this,arguments)-un,F=rn(c-f),t=c>f;if(a||(a=n=O()),s<u&&(d=s,s=u,u=d),!(s>y))a.moveTo(0,0);else if(F>tn-y)a.moveTo(s*H(f),s*q(f)),a.arc(0,0,s,f,c,!t),u>y&&(a.moveTo(u*H(c),u*q(c)),a.arc(0,0,u,c,f,t));else{var m=f,g=c,R=f,T=c,P=F,S=F,j=C.apply(this,arguments)/2,z=j>y&&(D?+D.apply(this,arguments):L(u*u+s*s)),w=_(rn(s-u)/2,+I.apply(this,arguments)),p=w,x=w,e,r;if(z>y){var G=sn(z/u*q(j)),M=sn(z/s*q(j));(P-=G*2)>y?(G*=t?1:-1,R+=G,T-=G):(P=0,R=T=(f+c)/2),(S-=M*2)>y?(M*=t?1:-1,m+=M,g-=M):(S=0,m=g=(f+c)/2)}var J=s*H(m),K=s*q(m),N=u*H(T),Q=u*q(T);if(w>y){var U=s*H(g),V=s*q(g),X=u*H(R),Y=u*q(R),E;if(F<an)if(E=pn(J,K,X,Y,U,V,N,Q)){var Z=J-E[0],$=K-E[1],b=U-E[0],k=V-E[1],nn=1/q(fn((Z*b+$*k)/(L(Z*Z+$*$)*L(b*b+k*k)))/2),en=L(E[0]*E[0]+E[1]*E[1]);p=_(w,(u-en)/(nn-1)),x=_(w,(s-en)/(nn+1))}else p=x=0}S>y?x>y?(e=W(X,Y,J,K,s,x,t),r=W(U,V,N,Q,s,x,t),a.moveTo(e.cx+e.x01,e.cy+e.y01),x<w?a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,s,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),!t),a.arc(r.cx,r.cy,x,o(r.y11,r.x11),o(r.y01,r.x01),!t))):(a.moveTo(J,K),a.arc(0,0,s,m,g,!t)):a.moveTo(J,K),!(u>y)||!(P>y)?a.lineTo(N,Q):p>y?(e=W(N,Q,U,V,u,-p,t),r=W(J,K,X,Y,u,-p,t),a.lineTo(e.cx+e.x01,e.cy+e.y01),p<w?a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,u,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),t),a.arc(r.cx,r.cy,p,o(r.y11,r.x11),o(r.y01,r.x01),!t))):a.arc(0,0,u,T,R,t)}if(a.closePath(),n)return a=null,n+""||null}return i.centroid=function(){var n=(+l.apply(this,arguments)+ +h.apply(this,arguments))/2,d=(+v.apply(this,arguments)+ +A.apply(this,arguments))/2-an/2;return[H(d)*n,q(d)*n]},i.innerRadius=function(n){return arguments.length?(l=typeof n=="function"?n:B(+n),i):l},i.outerRadius=function(n){return arguments.length?(h=typeof n=="function"?n:B(+n),i):h},i.cornerRadius=function(n){return arguments.length?(I=typeof n=="function"?n:B(+n),i):I},i.padRadius=function(n){return arguments.length?(D=n==null?null:typeof n=="function"?n:B(+n),i):D},i.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:B(+n),i):v},i.endAngle=function(n){return arguments.length?(A=typeof n=="function"?n:B(+n),i):A},i.padAngle=function(n){return arguments.length?(C=typeof n=="function"?n:B(+n),i):C},i.context=function(n){return arguments.length?(a=n??null,i):a},i}export{hn as d};
@@ -1,4 +1,4 @@
1
- import{_ as f,I as ht,Y as gt,l as K,b as ut,a as pt,p as mt,q as yt,g as wt,s as kt,z as xt,F as bt,D as vt,G as $t,c as J,ak as Z,al as N,i as Et,d as St,x as Dt,am as Tt,an as At}from"./mermaid.core-CWJzgNYH.js";import{p as Ct}from"./chunk-4BX2VUAB-g2_kd4Jk.js";import{p as Bt}from"./wardley-L42UT6IY-DNaqJg7q.js";import{c as tt}from"./cytoscape.esm-LDYqcvCF.js";import{f as It}from"./cytoscape-fcose-DXAQNCkb.js";import"./index-BMsEuqd2.js";import"./react-vendor-BPQixOLZ.js";import"./highlight-DJvvuuwd.js";import"./katex-Bq6vt64r.js";import"./markdown-BCywGHw2.js";var W={L:"left",R:"right",T:"top",B:"bottom"},Q={L:f(e=>`${e},${e/2} 0,${e} 0,0`,"L"),R:f(e=>`0,${e/2} ${e},0 ${e},${e}`,"R"),T:f(e=>`0,0 ${e},0 ${e/2},${e}`,"T"),B:f(e=>`${e/2},0 ${e},${e} 0,${e}`,"B")},X={L:f((e,t)=>e-t+2,"L"),R:f((e,t)=>e-2,"R"),T:f((e,t)=>e-t+2,"T"),B:f((e,t)=>e-2,"B")},Lt=f(function(e){return T(e)?e==="L"?"R":"L":e==="T"?"B":"T"},"getOppositeArchitectureDirection"),U=f(function(e){const t=e;return t==="L"||t==="R"||t==="T"||t==="B"},"isArchitectureDirection"),T=f(function(e){const t=e;return t==="L"||t==="R"},"isArchitectureDirectionX"),z=f(function(e){const t=e;return t==="T"||t==="B"},"isArchitectureDirectionY"),V=f(function(e,t){const i=T(e)&&z(t),r=z(e)&&T(t);return i||r},"isArchitectureDirectionXY"),jt=f(function(e){const t=e[0],i=e[1],r=T(t)&&z(i),n=z(t)&&T(i);return r||n},"isArchitecturePairXY"),zt=f(function(e){return e!=="LL"&&e!=="RR"&&e!=="TT"&&e!=="BB"},"isValidArchitectureDirectionPair"),_=f(function(e,t){const i=`${e}${t}`;return zt(i)?i:void 0},"getArchitectureDirectionPair"),Ft=f(function([e,t],i){const r=i[0],n=i[1];return T(r)?z(n)?[e+(r==="L"?-1:1),t+(n==="T"?1:-1)]:[e+(r==="L"?-1:1),t]:T(n)?[e+(n==="L"?1:-1),t+(r==="T"?1:-1)]:[e,t+(r==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Pt=f(function(e){return e==="LT"||e==="TL"?[1,1]:e==="BL"||e==="LB"?[1,-1]:e==="BR"||e==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),Yt=f(function(e,t){return V(e,t)?"bend":T(e)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),Rt=f(function(e){return e.type==="service"},"isArchitectureService"),Xt=f(function(e){return e.type==="junction"},"isArchitectureJunction"),et=f(e=>e.data(),"edgeData"),P=f(e=>e.data(),"nodeData"),Ot=$t.architecture,Y,it=(Y=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.diagramId="",this.setAccTitle=ut,this.getAccTitle=pt,this.setDiagramTitle=mt,this.getDiagramTitle=yt,this.getAccDescription=wt,this.setAccDescription=kt,this.clear()}setDiagramId(t){this.diagramId=t}getDiagramId(){return this.diagramId}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},this.diagramId="",xt()}addService({id:t,icon:i,in:r,title:n,iconText:c}){if(this.registeredIds[t]!==void 0)throw new Error(`The service id [${t}] is already in use by another ${this.registeredIds[t]}`);if(r!==void 0){if(t===r)throw new Error(`The service [${t}] cannot be placed within itself`);if(this.registeredIds[r]===void 0)throw new Error(`The service [${t}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds[r]==="node")throw new Error(`The service [${t}]'s parent is not a group`)}this.registeredIds[t]="node",this.nodes[t]={id:t,type:"service",icon:i,iconText:c,title:n,edges:[],in:r}}getServices(){return Object.values(this.nodes).filter(Rt)}addJunction({id:t,in:i}){if(this.registeredIds[t]!==void 0)throw new Error(`The junction id [${t}] is already in use by another ${this.registeredIds[t]}`);if(i!==void 0){if(t===i)throw new Error(`The junction [${t}] cannot be placed within itself`);if(this.registeredIds[i]===void 0)throw new Error(`The junction [${t}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds[i]==="node")throw new Error(`The junction [${t}]'s parent is not a group`)}this.registeredIds[t]="node",this.nodes[t]={id:t,type:"junction",edges:[],in:i}}getJunctions(){return Object.values(this.nodes).filter(Xt)}getNodes(){return Object.values(this.nodes)}getNode(t){return this.nodes[t]??null}addGroup({id:t,icon:i,in:r,title:n}){var c,u,d;if(((c=this.registeredIds)==null?void 0:c[t])!==void 0)throw new Error(`The group id [${t}] is already in use by another ${this.registeredIds[t]}`);if(r!==void 0){if(t===r)throw new Error(`The group [${t}] cannot be placed within itself`);if(((u=this.registeredIds)==null?void 0:u[r])===void 0)throw new Error(`The group [${t}]'s parent does not exist. Please make sure the parent is created before this group`);if(((d=this.registeredIds)==null?void 0:d[r])==="node")throw new Error(`The group [${t}]'s parent is not a group`)}this.registeredIds[t]="group",this.groups[t]={id:t,icon:i,title:n,in:r}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:t,rhsId:i,lhsDir:r,rhsDir:n,lhsInto:c,rhsInto:u,lhsGroup:d,rhsGroup:l,title:s}){if(!U(r))throw new Error(`Invalid direction given for left hand side of edge ${t}--${i}. Expected (L,R,T,B) got ${String(r)}`);if(!U(n))throw new Error(`Invalid direction given for right hand side of edge ${t}--${i}. Expected (L,R,T,B) got ${String(n)}`);if(this.nodes[t]===void 0&&this.groups[t]===void 0)throw new Error(`The left-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(this.nodes[i]===void 0&&this.groups[i]===void 0)throw new Error(`The right-hand id [${i}] does not yet exist. Please create the service/group before declaring an edge to it.`);const o=this.nodes[t].in,a=this.nodes[i].in;if(d&&o&&a&&o==a)throw new Error(`The left-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(l&&o&&a&&o==a)throw new Error(`The right-hand id [${i}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const g={lhsId:t,lhsDir:r,lhsInto:c,lhsGroup:d,rhsId:i,rhsDir:n,rhsInto:u,rhsGroup:l,title:s};this.edges.push(g),this.nodes[t]&&this.nodes[i]&&(this.nodes[t].edges.push(this.edges[this.edges.length-1]),this.nodes[i].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(this.dataStructures===void 0){const t={},i=Object.entries(this.nodes).reduce((l,[s,o])=>(l[s]=o.edges.reduce((a,g)=>{var p,k;const h=(p=this.getNode(g.lhsId))==null?void 0:p.in,y=(k=this.getNode(g.rhsId))==null?void 0:k.in;if(h&&y&&h!==y){const w=Yt(g.lhsDir,g.rhsDir);w!=="bend"&&(t[h]??(t[h]={}),t[h][y]=w,t[y]??(t[y]={}),t[y][h]=w)}if(g.lhsId===s){const w=_(g.lhsDir,g.rhsDir);w&&(a[w]=g.rhsId)}else{const w=_(g.rhsDir,g.lhsDir);w&&(a[w]=g.lhsId)}return a},{}),l),{}),r=Object.keys(i)[0],n={[r]:1},c=Object.keys(i).reduce((l,s)=>s===r?l:{...l,[s]:1},{}),u=f(l=>{const s={[l]:[0,0]},o=[l];for(;o.length>0;){const a=o.shift();if(a){n[a]=1,delete c[a];const g=i[a],[h,y]=s[a];Object.entries(g).forEach(([p,k])=>{n[k]||(s[k]=Ft([h,y],p),o.push(k))})}}return s},"BFS"),d=[u(r)];for(;Object.keys(c).length>0;)d.push(u(Object.keys(c)[0]));this.dataStructures={adjList:i,spatialMaps:d,groupAlignments:t}}return this.dataStructures}setElementForId(t,i){this.elements[t]=i}getElementById(t){return this.elements[t]}getConfig(){return bt({...Ot,...vt().architecture})}getConfigField(t){return this.getConfig()[t]}},f(Y,"ArchitectureDB"),Y),Mt=f((e,t)=>{Ct(e,t),e.groups.map(i=>t.addGroup(i)),e.services.map(i=>t.addService({...i,type:"service"})),e.junctions.map(i=>t.addJunction({...i,type:"junction"})),e.edges.map(i=>t.addEdge(i))},"populateDb"),rt={parser:{yy:void 0},parse:f(async e=>{var r;const t=await Bt("architecture",e);K.debug(t);const i=(r=rt.parser)==null?void 0:r.yy;if(!(i instanceof it))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Mt(t,i)},"parse")},Gt=f(e=>`
1
+ import{_ as f,I as ht,Y as gt,l as K,b as ut,a as pt,p as mt,q as yt,g as wt,s as kt,z as xt,F as bt,D as vt,G as $t,c as J,ak as Z,al as N,i as Et,d as St,x as Dt,am as Tt,an as At}from"./mermaid.core-C4yLb7RL.js";import{p as Ct}from"./chunk-4BX2VUAB-O0Ahe-nx.js";import{p as Bt}from"./wardley-L42UT6IY-DYWHt89G.js";import{c as tt}from"./cytoscape.esm-LDYqcvCF.js";import{f as It}from"./cytoscape-fcose-DXAQNCkb.js";import"./index-BtvzdAkg.js";import"./react-vendor-BPQixOLZ.js";import"./highlight-DJvvuuwd.js";import"./katex-Bq6vt64r.js";import"./markdown-BCywGHw2.js";var W={L:"left",R:"right",T:"top",B:"bottom"},Q={L:f(e=>`${e},${e/2} 0,${e} 0,0`,"L"),R:f(e=>`0,${e/2} ${e},0 ${e},${e}`,"R"),T:f(e=>`0,0 ${e},0 ${e/2},${e}`,"T"),B:f(e=>`${e/2},0 ${e},${e} 0,${e}`,"B")},X={L:f((e,t)=>e-t+2,"L"),R:f((e,t)=>e-2,"R"),T:f((e,t)=>e-t+2,"T"),B:f((e,t)=>e-2,"B")},Lt=f(function(e){return T(e)?e==="L"?"R":"L":e==="T"?"B":"T"},"getOppositeArchitectureDirection"),U=f(function(e){const t=e;return t==="L"||t==="R"||t==="T"||t==="B"},"isArchitectureDirection"),T=f(function(e){const t=e;return t==="L"||t==="R"},"isArchitectureDirectionX"),z=f(function(e){const t=e;return t==="T"||t==="B"},"isArchitectureDirectionY"),V=f(function(e,t){const i=T(e)&&z(t),r=z(e)&&T(t);return i||r},"isArchitectureDirectionXY"),jt=f(function(e){const t=e[0],i=e[1],r=T(t)&&z(i),n=z(t)&&T(i);return r||n},"isArchitecturePairXY"),zt=f(function(e){return e!=="LL"&&e!=="RR"&&e!=="TT"&&e!=="BB"},"isValidArchitectureDirectionPair"),_=f(function(e,t){const i=`${e}${t}`;return zt(i)?i:void 0},"getArchitectureDirectionPair"),Ft=f(function([e,t],i){const r=i[0],n=i[1];return T(r)?z(n)?[e+(r==="L"?-1:1),t+(n==="T"?1:-1)]:[e+(r==="L"?-1:1),t]:T(n)?[e+(n==="L"?1:-1),t+(r==="T"?1:-1)]:[e,t+(r==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Pt=f(function(e){return e==="LT"||e==="TL"?[1,1]:e==="BL"||e==="LB"?[1,-1]:e==="BR"||e==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),Yt=f(function(e,t){return V(e,t)?"bend":T(e)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),Rt=f(function(e){return e.type==="service"},"isArchitectureService"),Xt=f(function(e){return e.type==="junction"},"isArchitectureJunction"),et=f(e=>e.data(),"edgeData"),P=f(e=>e.data(),"nodeData"),Ot=$t.architecture,Y,it=(Y=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.diagramId="",this.setAccTitle=ut,this.getAccTitle=pt,this.setDiagramTitle=mt,this.getDiagramTitle=yt,this.getAccDescription=wt,this.setAccDescription=kt,this.clear()}setDiagramId(t){this.diagramId=t}getDiagramId(){return this.diagramId}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},this.diagramId="",xt()}addService({id:t,icon:i,in:r,title:n,iconText:c}){if(this.registeredIds[t]!==void 0)throw new Error(`The service id [${t}] is already in use by another ${this.registeredIds[t]}`);if(r!==void 0){if(t===r)throw new Error(`The service [${t}] cannot be placed within itself`);if(this.registeredIds[r]===void 0)throw new Error(`The service [${t}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds[r]==="node")throw new Error(`The service [${t}]'s parent is not a group`)}this.registeredIds[t]="node",this.nodes[t]={id:t,type:"service",icon:i,iconText:c,title:n,edges:[],in:r}}getServices(){return Object.values(this.nodes).filter(Rt)}addJunction({id:t,in:i}){if(this.registeredIds[t]!==void 0)throw new Error(`The junction id [${t}] is already in use by another ${this.registeredIds[t]}`);if(i!==void 0){if(t===i)throw new Error(`The junction [${t}] cannot be placed within itself`);if(this.registeredIds[i]===void 0)throw new Error(`The junction [${t}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds[i]==="node")throw new Error(`The junction [${t}]'s parent is not a group`)}this.registeredIds[t]="node",this.nodes[t]={id:t,type:"junction",edges:[],in:i}}getJunctions(){return Object.values(this.nodes).filter(Xt)}getNodes(){return Object.values(this.nodes)}getNode(t){return this.nodes[t]??null}addGroup({id:t,icon:i,in:r,title:n}){var c,u,d;if(((c=this.registeredIds)==null?void 0:c[t])!==void 0)throw new Error(`The group id [${t}] is already in use by another ${this.registeredIds[t]}`);if(r!==void 0){if(t===r)throw new Error(`The group [${t}] cannot be placed within itself`);if(((u=this.registeredIds)==null?void 0:u[r])===void 0)throw new Error(`The group [${t}]'s parent does not exist. Please make sure the parent is created before this group`);if(((d=this.registeredIds)==null?void 0:d[r])==="node")throw new Error(`The group [${t}]'s parent is not a group`)}this.registeredIds[t]="group",this.groups[t]={id:t,icon:i,title:n,in:r}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:t,rhsId:i,lhsDir:r,rhsDir:n,lhsInto:c,rhsInto:u,lhsGroup:d,rhsGroup:l,title:s}){if(!U(r))throw new Error(`Invalid direction given for left hand side of edge ${t}--${i}. Expected (L,R,T,B) got ${String(r)}`);if(!U(n))throw new Error(`Invalid direction given for right hand side of edge ${t}--${i}. Expected (L,R,T,B) got ${String(n)}`);if(this.nodes[t]===void 0&&this.groups[t]===void 0)throw new Error(`The left-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(this.nodes[i]===void 0&&this.groups[i]===void 0)throw new Error(`The right-hand id [${i}] does not yet exist. Please create the service/group before declaring an edge to it.`);const o=this.nodes[t].in,a=this.nodes[i].in;if(d&&o&&a&&o==a)throw new Error(`The left-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(l&&o&&a&&o==a)throw new Error(`The right-hand id [${i}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const g={lhsId:t,lhsDir:r,lhsInto:c,lhsGroup:d,rhsId:i,rhsDir:n,rhsInto:u,rhsGroup:l,title:s};this.edges.push(g),this.nodes[t]&&this.nodes[i]&&(this.nodes[t].edges.push(this.edges[this.edges.length-1]),this.nodes[i].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(this.dataStructures===void 0){const t={},i=Object.entries(this.nodes).reduce((l,[s,o])=>(l[s]=o.edges.reduce((a,g)=>{var p,k;const h=(p=this.getNode(g.lhsId))==null?void 0:p.in,y=(k=this.getNode(g.rhsId))==null?void 0:k.in;if(h&&y&&h!==y){const w=Yt(g.lhsDir,g.rhsDir);w!=="bend"&&(t[h]??(t[h]={}),t[h][y]=w,t[y]??(t[y]={}),t[y][h]=w)}if(g.lhsId===s){const w=_(g.lhsDir,g.rhsDir);w&&(a[w]=g.rhsId)}else{const w=_(g.rhsDir,g.lhsDir);w&&(a[w]=g.lhsId)}return a},{}),l),{}),r=Object.keys(i)[0],n={[r]:1},c=Object.keys(i).reduce((l,s)=>s===r?l:{...l,[s]:1},{}),u=f(l=>{const s={[l]:[0,0]},o=[l];for(;o.length>0;){const a=o.shift();if(a){n[a]=1,delete c[a];const g=i[a],[h,y]=s[a];Object.entries(g).forEach(([p,k])=>{n[k]||(s[k]=Ft([h,y],p),o.push(k))})}}return s},"BFS"),d=[u(r)];for(;Object.keys(c).length>0;)d.push(u(Object.keys(c)[0]));this.dataStructures={adjList:i,spatialMaps:d,groupAlignments:t}}return this.dataStructures}setElementForId(t,i){this.elements[t]=i}getElementById(t){return this.elements[t]}getConfig(){return bt({...Ot,...vt().architecture})}getConfigField(t){return this.getConfig()[t]}},f(Y,"ArchitectureDB"),Y),Mt=f((e,t)=>{Ct(e,t),e.groups.map(i=>t.addGroup(i)),e.services.map(i=>t.addService({...i,type:"service"})),e.junctions.map(i=>t.addJunction({...i,type:"junction"})),e.edges.map(i=>t.addEdge(i))},"populateDb"),rt={parser:{yy:void 0},parse:f(async e=>{var r;const t=await Bt("architecture",e);K.debug(t);const i=(r=rt.parser)==null?void 0:r.yy;if(!(i instanceof it))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Mt(t,i)},"parse")},Gt=f(e=>`
2
2
  .edge {
3
3
  stroke-width: ${e.archEdgeWidth};
4
4
  stroke: ${e.archEdgeColor};
@@ -1,4 +1,4 @@
1
- import{g as Te}from"./chunk-FMBD7UC4-COJ16id3.js";import{ar as De,as as Gt,at as Ne,au as Zt,av as jt,aw as qt,ax as Jt,ay as wt,az as Qt,aA as $t,aB as te,aC as ee,aD as re,aE as ae,aF as Ie,aG as Ce,aH as Be,aI as Oe,aJ as Re,aK as Ae,aL as ze,aM as Me,aN as Pe,aO as Fe,aP as We,_ as d,D as ct,d as O,e as Ye,l as v,z as He,B as Ke,aQ as Ue,R as Xe,S as Ve,c as M,O as Ge,aR as H,ak as _t,aS as at,aT as Ze,u as st,k as je,aU as qe,i as Rt,aV as At,aW as Je}from"./mermaid.core-CWJzgNYH.js";import{G as Qe}from"./graph-CAnANduQ.js";import{c as $e}from"./channel-hakHuzxv.js";import"./index-BMsEuqd2.js";import"./react-vendor-BPQixOLZ.js";import"./highlight-DJvvuuwd.js";import"./katex-Bq6vt64r.js";import"./markdown-BCywGHw2.js";function tr(e){return Array.isArray(e)}function er(e){if(De(e))return e;const t=Gt(e);if(!rr(e))return{};if(tr(e)){const s=Array.from(e);return e.length>0&&typeof e[0]=="string"&&Object.hasOwn(e,"index")&&(s.index=e.index,s.input=e.input),s}if(Ne(e)){const s=e,i=s.constructor;return new i(s.buffer,s.byteOffset,s.length)}if(t===Zt)return new ArrayBuffer(e.byteLength);if(t===jt){const s=e,i=s.buffer,c=s.byteOffset,r=s.byteLength,n=new ArrayBuffer(r),l=new Uint8Array(i,c,r);return new Uint8Array(n).set(l),new DataView(n)}if(t===qt||t===Jt||t===wt){const s=e.constructor,i=new s(e.valueOf());return t===wt?sr(i,e):xt(i,e),i}if(t===Qt)return new Date(Number(e));if(t===$t){const s=e,i=new RegExp(s.source,s.flags);return i.lastIndex=s.lastIndex,i}if(t===te)return Object(Symbol.prototype.valueOf.call(e));if(t===ee){const s=e,i=new Map;return s.forEach((c,r)=>{i.set(r,c)}),i}if(t===re){const s=e,i=new Set;return s.forEach(c=>{i.add(c)}),i}if(t===ae){const s=e,i={};return xt(i,s),i.length=s.length,i[Symbol.iterator]=s[Symbol.iterator],i}const a={};return ir(a,e),xt(a,e),ar(a,e),a}function rr(e){switch(Gt(e)){case ae:case We:case Zt:case jt:case qt:case Qt:case Fe:case Pe:case Me:case ze:case Ae:case ee:case Jt:case Re:case $t:case re:case wt:case te:case Oe:case Be:case Ce:case Ie:return!0;default:return!1}}function xt(e,t){for(const a in t)Object.hasOwn(t,a)&&(e[a]=t[a])}function ar(e,t){const a=Object.getOwnPropertySymbols(t);for(let s=0;s<a.length;s++){const i=a[s];Object.prototype.propertyIsEnumerable.call(t,i)&&(e[i]=t[i])}}function sr(e,t){const a=t.valueOf().length;for(const s in t)Object.hasOwn(t,s)&&(Number.isNaN(Number(s))||Number(s)>=a)&&(e[s]=t[s])}function ir(e,t){const a=Object.getPrototypeOf(t);a!==null&&typeof t.constructor=="function"&&Object.setPrototypeOf(e,a)}var mt=(function(){var e=d(function(N,x,p,f){for(p=p||{},f=N.length;f--;p[N[f]]=x);return p},"o"),t=[1,15],a=[1,7],s=[1,13],i=[1,14],c=[1,19],r=[1,16],n=[1,17],l=[1,18],u=[8,30],g=[8,10,21,28,29,30,31,39,43,46],y=[1,23],w=[1,24],b=[8,10,15,16,21,28,29,30,31,39,43,46],m=[8,10,15,16,21,27,28,29,30,31,39,43,46],_=[1,49],L={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:d(function(x,p,f,S,E,o,k){var h=o.length-1;switch(E){case 4:S.getLogger().debug("Rule: separator (NL) ");break;case 5:S.getLogger().debug("Rule: separator (Space) ");break;case 6:S.getLogger().debug("Rule: separator (EOF) ");break;case 7:S.getLogger().debug("Rule: hierarchy: ",o[h-1]),S.setHierarchy(o[h-1]);break;case 8:S.getLogger().debug("Stop NL ");break;case 9:S.getLogger().debug("Stop EOF ");break;case 10:S.getLogger().debug("Stop NL2 ");break;case 11:S.getLogger().debug("Stop EOF2 ");break;case 12:S.getLogger().debug("Rule: statement: ",o[h]),typeof o[h].length=="number"?this.$=o[h]:this.$=[o[h]];break;case 13:S.getLogger().debug("Rule: statement #2: ",o[h-1]),this.$=[o[h-1]].concat(o[h]);break;case 14:S.getLogger().debug("Rule: link: ",o[h],x),this.$={edgeTypeStr:o[h],label:""};break;case 15:S.getLogger().debug("Rule: LABEL link: ",o[h-3],o[h-1],o[h]),this.$={edgeTypeStr:o[h],label:o[h-1]};break;case 18:const T=parseInt(o[h]),D=S.generateId();this.$={id:D,type:"space",label:"",width:T,children:[]};break;case 23:S.getLogger().debug("Rule: (nodeStatement link node) ",o[h-2],o[h-1],o[h]," typestr: ",o[h-1].edgeTypeStr);const U=S.edgeStrToEdgeData(o[h-1].edgeTypeStr),F=S.edgeStrToEdgeStartData(o[h-1].edgeTypeStr),J=S.edgeStrToThickness(o[h-1].edgeTypeStr),B=S.edgeStrToPattern(o[h-1].edgeTypeStr);this.$=[{id:o[h-2].id,label:o[h-2].label,type:o[h-2].type,directions:o[h-2].directions},{id:o[h-2].id+"-"+o[h].id,start:o[h-2].id,end:o[h].id,label:o[h-1].label,type:"edge",thickness:J,pattern:B,directions:o[h].directions,arrowTypeEnd:U,arrowTypeStart:F},{id:o[h].id,label:o[h].label,type:S.typeStr2Type(o[h].typeStr),directions:o[h].directions}];break;case 24:S.getLogger().debug("Rule: nodeStatement (abc88 node size) ",o[h-1],o[h]),this.$={id:o[h-1].id,label:o[h-1].label,type:S.typeStr2Type(o[h-1].typeStr),directions:o[h-1].directions,widthInColumns:parseInt(o[h],10)};break;case 25:S.getLogger().debug("Rule: nodeStatement (node) ",o[h]),this.$={id:o[h].id,label:o[h].label,type:S.typeStr2Type(o[h].typeStr),directions:o[h].directions,widthInColumns:1};break;case 26:S.getLogger().debug("APA123",this?this:"na"),S.getLogger().debug("COLUMNS: ",o[h]),this.$={type:"column-setting",columns:o[h]==="auto"?-1:parseInt(o[h])};break;case 27:S.getLogger().debug("Rule: id-block statement : ",o[h-2],o[h-1]),S.generateId(),this.$={...o[h-2],type:"composite",children:o[h-1]};break;case 28:S.getLogger().debug("Rule: blockStatement : ",o[h-2],o[h-1],o[h]);const Y=S.generateId();this.$={id:Y,type:"composite",label:"",children:o[h-1]};break;case 29:S.getLogger().debug("Rule: node (NODE_ID separator): ",o[h]),this.$={id:o[h]};break;case 30:S.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",o[h-1],o[h]),this.$={id:o[h-1],label:o[h].label,typeStr:o[h].typeStr,directions:o[h].directions};break;case 31:S.getLogger().debug("Rule: dirList: ",o[h]),this.$=[o[h]];break;case 32:S.getLogger().debug("Rule: dirList: ",o[h-1],o[h]),this.$=[o[h-1]].concat(o[h]);break;case 33:S.getLogger().debug("Rule: nodeShapeNLabel: ",o[h-2],o[h-1],o[h]),this.$={typeStr:o[h-2]+o[h],label:o[h-1]};break;case 34:S.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",o[h-3],o[h-2]," #3:",o[h-1],o[h]),this.$={typeStr:o[h-3]+o[h],label:o[h-2],directions:o[h-1]};break;case 35:case 36:this.$={type:"classDef",id:o[h-1].trim(),css:o[h].trim()};break;case 37:this.$={type:"applyClass",id:o[h-1].trim(),styleClass:o[h].trim()};break;case 38:this.$={type:"applyStyles",id:o[h-1].trim(),stylesStr:o[h].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:c,39:r,43:n,46:l},{8:[1,20]},e(u,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:a,28:s,29:i,31:c,39:r,43:n,46:l}),e(g,[2,16],{14:22,15:y,16:w}),e(g,[2,17]),e(g,[2,18]),e(g,[2,19]),e(g,[2,20]),e(g,[2,21]),e(g,[2,22]),e(b,[2,25],{27:[1,25]}),e(g,[2,26]),{19:26,26:12,31:c},{10:t,11:27,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:c,39:r,43:n,46:l},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(m,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(u,[2,13]),{26:35,31:c},{31:[2,14]},{17:[1,36]},e(b,[2,24]),{10:t,11:37,13:4,14:22,15:y,16:w,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:c,39:r,43:n,46:l},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(m,[2,30]),{18:[1,43]},{18:[1,44]},e(b,[2,23]),{18:[1,45]},{30:[1,46]},e(g,[2,28]),e(g,[2,35]),e(g,[2,36]),e(g,[2,37]),e(g,[2,38]),{36:[1,47]},{33:48,34:_},{15:[1,50]},e(g,[2,27]),e(m,[2,33]),{38:[1,51]},{33:52,34:_,38:[2,31]},{31:[2,15]},e(m,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:d(function(x,p){if(p.recoverable)this.trace(x);else{var f=new Error(x);throw f.hash=p,f}},"parseError"),parse:d(function(x){var p=this,f=[0],S=[],E=[null],o=[],k=this.table,h="",T=0,D=0,U=2,F=1,J=o.slice.call(arguments,1),B=Object.create(this.lexer),Y={yy:{}};for(var et in this.yy)Object.prototype.hasOwnProperty.call(this.yy,et)&&(Y.yy[et]=this.yy[et]);B.setInput(x,Y.yy),Y.yy.lexer=B,Y.yy.parser=this,typeof B.yylloc>"u"&&(B.yylloc={});var rt=B.yylloc;o.push(rt);var _e=B.options&&B.options.ranges;typeof Y.yy.parseError=="function"?this.parseError=Y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ke(X){f.length=f.length-2*X,E.length=E.length-X,o.length=o.length-X}d(ke,"popStack");function Bt(){var X;return X=S.pop()||B.lex()||F,typeof X!="number"&&(X instanceof Array&&(S=X,X=S.pop()),X=p.symbols_[X]||X),X}d(Bt,"lex");for(var K,$,G,ft,tt={},lt,Q,Ot,ot;;){if($=f[f.length-1],this.defaultActions[$]?G=this.defaultActions[$]:((K===null||typeof K>"u")&&(K=Bt()),G=k[$]&&k[$][K]),typeof G>"u"||!G.length||!G[0]){var yt="";ot=[];for(lt in k[$])this.terminals_[lt]&&lt>U&&ot.push("'"+this.terminals_[lt]+"'");B.showPosition?yt="Parse error on line "+(T+1)+`:
1
+ import{g as Te}from"./chunk-FMBD7UC4-BGqxhWb0.js";import{ar as De,as as Gt,at as Ne,au as Zt,av as jt,aw as qt,ax as Jt,ay as wt,az as Qt,aA as $t,aB as te,aC as ee,aD as re,aE as ae,aF as Ie,aG as Ce,aH as Be,aI as Oe,aJ as Re,aK as Ae,aL as ze,aM as Me,aN as Pe,aO as Fe,aP as We,_ as d,D as ct,d as O,e as Ye,l as v,z as He,B as Ke,aQ as Ue,R as Xe,S as Ve,c as M,O as Ge,aR as H,ak as _t,aS as at,aT as Ze,u as st,k as je,aU as qe,i as Rt,aV as At,aW as Je}from"./mermaid.core-C4yLb7RL.js";import{G as Qe}from"./graph-CAnANduQ.js";import{c as $e}from"./channel-C9SCdcK6.js";import"./index-BtvzdAkg.js";import"./react-vendor-BPQixOLZ.js";import"./highlight-DJvvuuwd.js";import"./katex-Bq6vt64r.js";import"./markdown-BCywGHw2.js";function tr(e){return Array.isArray(e)}function er(e){if(De(e))return e;const t=Gt(e);if(!rr(e))return{};if(tr(e)){const s=Array.from(e);return e.length>0&&typeof e[0]=="string"&&Object.hasOwn(e,"index")&&(s.index=e.index,s.input=e.input),s}if(Ne(e)){const s=e,i=s.constructor;return new i(s.buffer,s.byteOffset,s.length)}if(t===Zt)return new ArrayBuffer(e.byteLength);if(t===jt){const s=e,i=s.buffer,c=s.byteOffset,r=s.byteLength,n=new ArrayBuffer(r),l=new Uint8Array(i,c,r);return new Uint8Array(n).set(l),new DataView(n)}if(t===qt||t===Jt||t===wt){const s=e.constructor,i=new s(e.valueOf());return t===wt?sr(i,e):xt(i,e),i}if(t===Qt)return new Date(Number(e));if(t===$t){const s=e,i=new RegExp(s.source,s.flags);return i.lastIndex=s.lastIndex,i}if(t===te)return Object(Symbol.prototype.valueOf.call(e));if(t===ee){const s=e,i=new Map;return s.forEach((c,r)=>{i.set(r,c)}),i}if(t===re){const s=e,i=new Set;return s.forEach(c=>{i.add(c)}),i}if(t===ae){const s=e,i={};return xt(i,s),i.length=s.length,i[Symbol.iterator]=s[Symbol.iterator],i}const a={};return ir(a,e),xt(a,e),ar(a,e),a}function rr(e){switch(Gt(e)){case ae:case We:case Zt:case jt:case qt:case Qt:case Fe:case Pe:case Me:case ze:case Ae:case ee:case Jt:case Re:case $t:case re:case wt:case te:case Oe:case Be:case Ce:case Ie:return!0;default:return!1}}function xt(e,t){for(const a in t)Object.hasOwn(t,a)&&(e[a]=t[a])}function ar(e,t){const a=Object.getOwnPropertySymbols(t);for(let s=0;s<a.length;s++){const i=a[s];Object.prototype.propertyIsEnumerable.call(t,i)&&(e[i]=t[i])}}function sr(e,t){const a=t.valueOf().length;for(const s in t)Object.hasOwn(t,s)&&(Number.isNaN(Number(s))||Number(s)>=a)&&(e[s]=t[s])}function ir(e,t){const a=Object.getPrototypeOf(t);a!==null&&typeof t.constructor=="function"&&Object.setPrototypeOf(e,a)}var mt=(function(){var e=d(function(N,x,p,f){for(p=p||{},f=N.length;f--;p[N[f]]=x);return p},"o"),t=[1,15],a=[1,7],s=[1,13],i=[1,14],c=[1,19],r=[1,16],n=[1,17],l=[1,18],u=[8,30],g=[8,10,21,28,29,30,31,39,43,46],y=[1,23],w=[1,24],b=[8,10,15,16,21,28,29,30,31,39,43,46],m=[8,10,15,16,21,27,28,29,30,31,39,43,46],_=[1,49],L={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:d(function(x,p,f,S,E,o,k){var h=o.length-1;switch(E){case 4:S.getLogger().debug("Rule: separator (NL) ");break;case 5:S.getLogger().debug("Rule: separator (Space) ");break;case 6:S.getLogger().debug("Rule: separator (EOF) ");break;case 7:S.getLogger().debug("Rule: hierarchy: ",o[h-1]),S.setHierarchy(o[h-1]);break;case 8:S.getLogger().debug("Stop NL ");break;case 9:S.getLogger().debug("Stop EOF ");break;case 10:S.getLogger().debug("Stop NL2 ");break;case 11:S.getLogger().debug("Stop EOF2 ");break;case 12:S.getLogger().debug("Rule: statement: ",o[h]),typeof o[h].length=="number"?this.$=o[h]:this.$=[o[h]];break;case 13:S.getLogger().debug("Rule: statement #2: ",o[h-1]),this.$=[o[h-1]].concat(o[h]);break;case 14:S.getLogger().debug("Rule: link: ",o[h],x),this.$={edgeTypeStr:o[h],label:""};break;case 15:S.getLogger().debug("Rule: LABEL link: ",o[h-3],o[h-1],o[h]),this.$={edgeTypeStr:o[h],label:o[h-1]};break;case 18:const T=parseInt(o[h]),D=S.generateId();this.$={id:D,type:"space",label:"",width:T,children:[]};break;case 23:S.getLogger().debug("Rule: (nodeStatement link node) ",o[h-2],o[h-1],o[h]," typestr: ",o[h-1].edgeTypeStr);const U=S.edgeStrToEdgeData(o[h-1].edgeTypeStr),F=S.edgeStrToEdgeStartData(o[h-1].edgeTypeStr),J=S.edgeStrToThickness(o[h-1].edgeTypeStr),B=S.edgeStrToPattern(o[h-1].edgeTypeStr);this.$=[{id:o[h-2].id,label:o[h-2].label,type:o[h-2].type,directions:o[h-2].directions},{id:o[h-2].id+"-"+o[h].id,start:o[h-2].id,end:o[h].id,label:o[h-1].label,type:"edge",thickness:J,pattern:B,directions:o[h].directions,arrowTypeEnd:U,arrowTypeStart:F},{id:o[h].id,label:o[h].label,type:S.typeStr2Type(o[h].typeStr),directions:o[h].directions}];break;case 24:S.getLogger().debug("Rule: nodeStatement (abc88 node size) ",o[h-1],o[h]),this.$={id:o[h-1].id,label:o[h-1].label,type:S.typeStr2Type(o[h-1].typeStr),directions:o[h-1].directions,widthInColumns:parseInt(o[h],10)};break;case 25:S.getLogger().debug("Rule: nodeStatement (node) ",o[h]),this.$={id:o[h].id,label:o[h].label,type:S.typeStr2Type(o[h].typeStr),directions:o[h].directions,widthInColumns:1};break;case 26:S.getLogger().debug("APA123",this?this:"na"),S.getLogger().debug("COLUMNS: ",o[h]),this.$={type:"column-setting",columns:o[h]==="auto"?-1:parseInt(o[h])};break;case 27:S.getLogger().debug("Rule: id-block statement : ",o[h-2],o[h-1]),S.generateId(),this.$={...o[h-2],type:"composite",children:o[h-1]};break;case 28:S.getLogger().debug("Rule: blockStatement : ",o[h-2],o[h-1],o[h]);const Y=S.generateId();this.$={id:Y,type:"composite",label:"",children:o[h-1]};break;case 29:S.getLogger().debug("Rule: node (NODE_ID separator): ",o[h]),this.$={id:o[h]};break;case 30:S.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",o[h-1],o[h]),this.$={id:o[h-1],label:o[h].label,typeStr:o[h].typeStr,directions:o[h].directions};break;case 31:S.getLogger().debug("Rule: dirList: ",o[h]),this.$=[o[h]];break;case 32:S.getLogger().debug("Rule: dirList: ",o[h-1],o[h]),this.$=[o[h-1]].concat(o[h]);break;case 33:S.getLogger().debug("Rule: nodeShapeNLabel: ",o[h-2],o[h-1],o[h]),this.$={typeStr:o[h-2]+o[h],label:o[h-1]};break;case 34:S.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",o[h-3],o[h-2]," #3:",o[h-1],o[h]),this.$={typeStr:o[h-3]+o[h],label:o[h-2],directions:o[h-1]};break;case 35:case 36:this.$={type:"classDef",id:o[h-1].trim(),css:o[h].trim()};break;case 37:this.$={type:"applyClass",id:o[h-1].trim(),styleClass:o[h].trim()};break;case 38:this.$={type:"applyStyles",id:o[h-1].trim(),stylesStr:o[h].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:c,39:r,43:n,46:l},{8:[1,20]},e(u,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:a,28:s,29:i,31:c,39:r,43:n,46:l}),e(g,[2,16],{14:22,15:y,16:w}),e(g,[2,17]),e(g,[2,18]),e(g,[2,19]),e(g,[2,20]),e(g,[2,21]),e(g,[2,22]),e(b,[2,25],{27:[1,25]}),e(g,[2,26]),{19:26,26:12,31:c},{10:t,11:27,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:c,39:r,43:n,46:l},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(m,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(u,[2,13]),{26:35,31:c},{31:[2,14]},{17:[1,36]},e(b,[2,24]),{10:t,11:37,13:4,14:22,15:y,16:w,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:c,39:r,43:n,46:l},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(m,[2,30]),{18:[1,43]},{18:[1,44]},e(b,[2,23]),{18:[1,45]},{30:[1,46]},e(g,[2,28]),e(g,[2,35]),e(g,[2,36]),e(g,[2,37]),e(g,[2,38]),{36:[1,47]},{33:48,34:_},{15:[1,50]},e(g,[2,27]),e(m,[2,33]),{38:[1,51]},{33:52,34:_,38:[2,31]},{31:[2,15]},e(m,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:d(function(x,p){if(p.recoverable)this.trace(x);else{var f=new Error(x);throw f.hash=p,f}},"parseError"),parse:d(function(x){var p=this,f=[0],S=[],E=[null],o=[],k=this.table,h="",T=0,D=0,U=2,F=1,J=o.slice.call(arguments,1),B=Object.create(this.lexer),Y={yy:{}};for(var et in this.yy)Object.prototype.hasOwnProperty.call(this.yy,et)&&(Y.yy[et]=this.yy[et]);B.setInput(x,Y.yy),Y.yy.lexer=B,Y.yy.parser=this,typeof B.yylloc>"u"&&(B.yylloc={});var rt=B.yylloc;o.push(rt);var _e=B.options&&B.options.ranges;typeof Y.yy.parseError=="function"?this.parseError=Y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ke(X){f.length=f.length-2*X,E.length=E.length-X,o.length=o.length-X}d(ke,"popStack");function Bt(){var X;return X=S.pop()||B.lex()||F,typeof X!="number"&&(X instanceof Array&&(S=X,X=S.pop()),X=p.symbols_[X]||X),X}d(Bt,"lex");for(var K,$,G,ft,tt={},lt,Q,Ot,ot;;){if($=f[f.length-1],this.defaultActions[$]?G=this.defaultActions[$]:((K===null||typeof K>"u")&&(K=Bt()),G=k[$]&&k[$][K]),typeof G>"u"||!G.length||!G[0]){var yt="";ot=[];for(lt in k[$])this.terminals_[lt]&&lt>U&&ot.push("'"+this.terminals_[lt]+"'");B.showPosition?yt="Parse error on line "+(T+1)+`:
2
2
  `+B.showPosition()+`
3
3
  Expecting `+ot.join(", ")+", got '"+(this.terminals_[K]||K)+"'":yt="Parse error on line "+(T+1)+": Unexpected "+(K==F?"end of input":"'"+(this.terminals_[K]||K)+"'"),this.parseError(yt,{text:B.match,token:this.terminals_[K]||K,line:B.yylineno,loc:rt,expected:ot})}if(G[0]instanceof Array&&G.length>1)throw new Error("Parse Error: multiple actions possible at state: "+$+", token: "+K);switch(G[0]){case 1:f.push(K),E.push(B.yytext),o.push(B.yylloc),f.push(G[1]),K=null,D=B.yyleng,h=B.yytext,T=B.yylineno,rt=B.yylloc;break;case 2:if(Q=this.productions_[G[1]][1],tt.$=E[E.length-Q],tt._$={first_line:o[o.length-(Q||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(Q||1)].first_column,last_column:o[o.length-1].last_column},_e&&(tt._$.range=[o[o.length-(Q||1)].range[0],o[o.length-1].range[1]]),ft=this.performAction.apply(tt,[h,D,T,Y.yy,G[1],E,o].concat(J)),typeof ft<"u")return ft;Q&&(f=f.slice(0,-1*Q*2),E=E.slice(0,-1*Q),o=o.slice(0,-1*Q)),f.push(this.productions_[G[1]][0]),E.push(tt.$),o.push(tt._$),Ot=k[f[f.length-2]][f[f.length-1]],f.push(Ot);break;case 3:return!0}}return!0},"parse")},C=(function(){var N={EOF:1,parseError:d(function(p,f){if(this.yy.parser)this.yy.parser.parseError(p,f);else throw new Error(p)},"parseError"),setInput:d(function(x,p){return this.yy=p||this.yy||{},this._input=x,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:d(function(){var x=this._input[0];this.yytext+=x,this.yyleng++,this.offset++,this.match+=x,this.matched+=x;var p=x.match(/(?:\r\n?|\n).*/g);return p?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),x},"input"),unput:d(function(x){var p=x.length,f=x.split(/(?:\r\n?|\n)/g);this._input=x+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-p),this.offset-=p;var S=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),f.length-1&&(this.yylineno-=f.length-1);var E=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:f?(f.length===S.length?this.yylloc.first_column:0)+S[S.length-f.length].length-f[0].length:this.yylloc.first_column-p},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-p]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:d(function(x){this.unput(this.match.slice(x))},"less"),pastInput:d(function(){var x=this.matched.substr(0,this.matched.length-this.match.length);return(x.length>20?"...":"")+x.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var x=this.match;return x.length<20&&(x+=this._input.substr(0,20-x.length)),(x.substr(0,20)+(x.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var x=this.pastInput(),p=new Array(x.length+1).join("-");return x+this.upcomingInput()+`
@@ -1,4 +1,4 @@
1
- import{g as Se,d as De}from"./chunk-ND2GUHAM-BuUYHFRS.js";import{s as Pe,g as Be,a as Ie,b as Me,_ as y,c as Bt,d as jt,l as de,e as Le,f as Ne,h as Tt,i as ge,j as Ye,w as je,k as $t,m as fe}from"./mermaid.core-CWJzgNYH.js";import"./index-BMsEuqd2.js";import"./react-vendor-BPQixOLZ.js";import"./highlight-DJvvuuwd.js";import"./katex-Bq6vt64r.js";import"./markdown-BCywGHw2.js";var Ft=(function(){var a=y(function(_t,x,v,E){for(v=v||{},E=_t.length;E--;v[_t[E]]=x);return v},"o"),t=[1,24],s=[1,25],o=[1,26],r=[1,27],l=[1,28],e=[1,63],n=[1,64],i=[1,65],u=[1,66],d=[1,67],f=[1,68],g=[1,69],m=[1,29],O=[1,30],S=[1,31],P=[1,32],M=[1,33],U=[1,34],H=[1,35],q=[1,36],G=[1,37],K=[1,38],J=[1,39],Z=[1,40],$=[1,41],tt=[1,42],et=[1,43],at=[1,44],it=[1,45],nt=[1,46],st=[1,47],rt=[1,48],lt=[1,50],ot=[1,51],ct=[1,52],ht=[1,53],ut=[1,54],dt=[1,55],ft=[1,56],pt=[1,57],yt=[1,58],gt=[1,59],bt=[1,60],Ct=[14,42],Qt=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],St=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],A=[1,82],k=[1,83],C=[1,84],w=[1,85],T=[12,14,42],le=[12,14,33,42],Mt=[12,14,33,42,76,77,79,80],vt=[12,33],Ht=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],qt={trace:y(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:y(function(x,v,E,b,R,h,Dt){var p=h.length-1;switch(R){case 3:b.setDirection("TB");break;case 4:b.setDirection("BT");break;case 5:b.setDirection("RL");break;case 6:b.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:b.setC4Type(h[p-3]);break;case 19:b.setTitle(h[p].substring(6)),this.$=h[p].substring(6);break;case 20:b.setAccDescription(h[p].substring(15)),this.$=h[p].substring(15);break;case 21:this.$=h[p].trim(),b.setTitle(this.$);break;case 22:case 23:this.$=h[p].trim(),b.setAccDescription(this.$);break;case 28:h[p].splice(2,0,"ENTERPRISE"),b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 29:h[p].splice(2,0,"SYSTEM"),b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 30:b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 31:h[p].splice(2,0,"CONTAINER"),b.addContainerBoundary(...h[p]),this.$=h[p];break;case 32:b.addDeploymentNode("node",...h[p]),this.$=h[p];break;case 33:b.addDeploymentNode("nodeL",...h[p]),this.$=h[p];break;case 34:b.addDeploymentNode("nodeR",...h[p]),this.$=h[p];break;case 35:b.popBoundaryParseStack();break;case 39:b.addPersonOrSystem("person",...h[p]),this.$=h[p];break;case 40:b.addPersonOrSystem("external_person",...h[p]),this.$=h[p];break;case 41:b.addPersonOrSystem("system",...h[p]),this.$=h[p];break;case 42:b.addPersonOrSystem("system_db",...h[p]),this.$=h[p];break;case 43:b.addPersonOrSystem("system_queue",...h[p]),this.$=h[p];break;case 44:b.addPersonOrSystem("external_system",...h[p]),this.$=h[p];break;case 45:b.addPersonOrSystem("external_system_db",...h[p]),this.$=h[p];break;case 46:b.addPersonOrSystem("external_system_queue",...h[p]),this.$=h[p];break;case 47:b.addContainer("container",...h[p]),this.$=h[p];break;case 48:b.addContainer("container_db",...h[p]),this.$=h[p];break;case 49:b.addContainer("container_queue",...h[p]),this.$=h[p];break;case 50:b.addContainer("external_container",...h[p]),this.$=h[p];break;case 51:b.addContainer("external_container_db",...h[p]),this.$=h[p];break;case 52:b.addContainer("external_container_queue",...h[p]),this.$=h[p];break;case 53:b.addComponent("component",...h[p]),this.$=h[p];break;case 54:b.addComponent("component_db",...h[p]),this.$=h[p];break;case 55:b.addComponent("component_queue",...h[p]),this.$=h[p];break;case 56:b.addComponent("external_component",...h[p]),this.$=h[p];break;case 57:b.addComponent("external_component_db",...h[p]),this.$=h[p];break;case 58:b.addComponent("external_component_queue",...h[p]),this.$=h[p];break;case 60:b.addRel("rel",...h[p]),this.$=h[p];break;case 61:b.addRel("birel",...h[p]),this.$=h[p];break;case 62:b.addRel("rel_u",...h[p]),this.$=h[p];break;case 63:b.addRel("rel_d",...h[p]),this.$=h[p];break;case 64:b.addRel("rel_l",...h[p]),this.$=h[p];break;case 65:b.addRel("rel_r",...h[p]),this.$=h[p];break;case 66:b.addRel("rel_b",...h[p]),this.$=h[p];break;case 67:h[p].splice(0,1),b.addRel("rel",...h[p]),this.$=h[p];break;case 68:b.updateElStyle("update_el_style",...h[p]),this.$=h[p];break;case 69:b.updateRelStyle("update_rel_style",...h[p]),this.$=h[p];break;case 70:b.updateLayoutConfig("update_layout_config",...h[p]),this.$=h[p];break;case 71:this.$=[h[p]];break;case 72:h[p].unshift(h[p-1]),this.$=h[p];break;case 73:case 75:this.$=h[p].trim();break;case 74:let Et={};Et[h[p-1].trim()]=h[p].trim(),this.$=Et;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:s,24:o,26:r,28:l,29:49,30:61,32:62,34:e,36:n,37:i,38:u,39:d,40:f,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:70,19:20,20:21,21:22,22:t,23:s,24:o,26:r,28:l,29:49,30:61,32:62,34:e,36:n,37:i,38:u,39:d,40:f,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:71,19:20,20:21,21:22,22:t,23:s,24:o,26:r,28:l,29:49,30:61,32:62,34:e,36:n,37:i,38:u,39:d,40:f,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:72,19:20,20:21,21:22,22:t,23:s,24:o,26:r,28:l,29:49,30:61,32:62,34:e,36:n,37:i,38:u,39:d,40:f,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:73,19:20,20:21,21:22,22:t,23:s,24:o,26:r,28:l,29:49,30:61,32:62,34:e,36:n,37:i,38:u,39:d,40:f,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{14:[1,74]},a(Ct,[2,13],{43:23,29:49,30:61,32:62,20:75,34:e,36:n,37:i,38:u,39:d,40:f,41:g,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt}),a(Ct,[2,14]),a(Qt,[2,16],{12:[1,76]}),a(Ct,[2,36],{12:[1,77]}),a(St,[2,19]),a(St,[2,20]),{25:[1,78]},{27:[1,79]},a(St,[2,23]),{35:80,75:81,76:A,77:k,79:C,80:w},{35:86,75:81,76:A,77:k,79:C,80:w},{35:87,75:81,76:A,77:k,79:C,80:w},{35:88,75:81,76:A,77:k,79:C,80:w},{35:89,75:81,76:A,77:k,79:C,80:w},{35:90,75:81,76:A,77:k,79:C,80:w},{35:91,75:81,76:A,77:k,79:C,80:w},{35:92,75:81,76:A,77:k,79:C,80:w},{35:93,75:81,76:A,77:k,79:C,80:w},{35:94,75:81,76:A,77:k,79:C,80:w},{35:95,75:81,76:A,77:k,79:C,80:w},{35:96,75:81,76:A,77:k,79:C,80:w},{35:97,75:81,76:A,77:k,79:C,80:w},{35:98,75:81,76:A,77:k,79:C,80:w},{35:99,75:81,76:A,77:k,79:C,80:w},{35:100,75:81,76:A,77:k,79:C,80:w},{35:101,75:81,76:A,77:k,79:C,80:w},{35:102,75:81,76:A,77:k,79:C,80:w},{35:103,75:81,76:A,77:k,79:C,80:w},{35:104,75:81,76:A,77:k,79:C,80:w},a(T,[2,59]),{35:105,75:81,76:A,77:k,79:C,80:w},{35:106,75:81,76:A,77:k,79:C,80:w},{35:107,75:81,76:A,77:k,79:C,80:w},{35:108,75:81,76:A,77:k,79:C,80:w},{35:109,75:81,76:A,77:k,79:C,80:w},{35:110,75:81,76:A,77:k,79:C,80:w},{35:111,75:81,76:A,77:k,79:C,80:w},{35:112,75:81,76:A,77:k,79:C,80:w},{35:113,75:81,76:A,77:k,79:C,80:w},{35:114,75:81,76:A,77:k,79:C,80:w},{35:115,75:81,76:A,77:k,79:C,80:w},{20:116,29:49,30:61,32:62,34:e,36:n,37:i,38:u,39:d,40:f,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{12:[1,118],33:[1,117]},{35:119,75:81,76:A,77:k,79:C,80:w},{35:120,75:81,76:A,77:k,79:C,80:w},{35:121,75:81,76:A,77:k,79:C,80:w},{35:122,75:81,76:A,77:k,79:C,80:w},{35:123,75:81,76:A,77:k,79:C,80:w},{35:124,75:81,76:A,77:k,79:C,80:w},{35:125,75:81,76:A,77:k,79:C,80:w},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},a(Ct,[2,15]),a(Qt,[2,17],{21:22,19:130,22:t,23:s,24:o,26:r,28:l}),a(Ct,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:s,24:o,26:r,28:l,34:e,36:n,37:i,38:u,39:d,40:f,41:g,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt}),a(St,[2,21]),a(St,[2,22]),a(T,[2,39]),a(le,[2,71],{75:81,35:132,76:A,77:k,79:C,80:w}),a(Mt,[2,73]),{78:[1,133]},a(Mt,[2,75]),a(Mt,[2,76]),a(T,[2,40]),a(T,[2,41]),a(T,[2,42]),a(T,[2,43]),a(T,[2,44]),a(T,[2,45]),a(T,[2,46]),a(T,[2,47]),a(T,[2,48]),a(T,[2,49]),a(T,[2,50]),a(T,[2,51]),a(T,[2,52]),a(T,[2,53]),a(T,[2,54]),a(T,[2,55]),a(T,[2,56]),a(T,[2,57]),a(T,[2,58]),a(T,[2,60]),a(T,[2,61]),a(T,[2,62]),a(T,[2,63]),a(T,[2,64]),a(T,[2,65]),a(T,[2,66]),a(T,[2,67]),a(T,[2,68]),a(T,[2,69]),a(T,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},a(vt,[2,28]),a(vt,[2,29]),a(vt,[2,30]),a(vt,[2,31]),a(vt,[2,32]),a(vt,[2,33]),a(vt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},a(Qt,[2,18]),a(Ct,[2,38]),a(le,[2,72]),a(Mt,[2,74]),a(T,[2,24]),a(T,[2,35]),a(Ht,[2,25]),a(Ht,[2,26],{12:[1,138]}),a(Ht,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:y(function(x,v){if(v.recoverable)this.trace(x);else{var E=new Error(x);throw E.hash=v,E}},"parseError"),parse:y(function(x){var v=this,E=[0],b=[],R=[null],h=[],Dt=this.table,p="",Et=0,oe=0,we=2,ce=1,Te=h.slice.call(arguments,1),D=Object.create(this.lexer),At={yy:{}};for(var Gt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Gt)&&(At.yy[Gt]=this.yy[Gt]);D.setInput(x,At.yy),At.yy.lexer=D,At.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Kt=D.yylloc;h.push(Kt);var Oe=D.options&&D.options.ranges;typeof At.yy.parseError=="function"?this.parseError=At.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Re(L){E.length=E.length-2*L,R.length=R.length-L,h.length=h.length-L}y(Re,"popStack");function he(){var L;return L=b.pop()||D.lex()||ce,typeof L!="number"&&(L instanceof Array&&(b=L,L=b.pop()),L=v.symbols_[L]||L),L}y(he,"lex");for(var I,kt,N,Jt,wt={},Nt,W,ue,Yt;;){if(kt=E[E.length-1],this.defaultActions[kt]?N=this.defaultActions[kt]:((I===null||typeof I>"u")&&(I=he()),N=Dt[kt]&&Dt[kt][I]),typeof N>"u"||!N.length||!N[0]){var Zt="";Yt=[];for(Nt in Dt[kt])this.terminals_[Nt]&&Nt>we&&Yt.push("'"+this.terminals_[Nt]+"'");D.showPosition?Zt="Parse error on line "+(Et+1)+`:
1
+ import{g as Se,d as De}from"./chunk-ND2GUHAM-D277WP9X.js";import{s as Pe,g as Be,a as Ie,b as Me,_ as y,c as Bt,d as jt,l as de,e as Le,f as Ne,h as Tt,i as ge,j as Ye,w as je,k as $t,m as fe}from"./mermaid.core-C4yLb7RL.js";import"./index-BtvzdAkg.js";import"./react-vendor-BPQixOLZ.js";import"./highlight-DJvvuuwd.js";import"./katex-Bq6vt64r.js";import"./markdown-BCywGHw2.js";var Ft=(function(){var a=y(function(_t,x,v,E){for(v=v||{},E=_t.length;E--;v[_t[E]]=x);return v},"o"),t=[1,24],s=[1,25],o=[1,26],r=[1,27],l=[1,28],e=[1,63],n=[1,64],i=[1,65],u=[1,66],d=[1,67],f=[1,68],g=[1,69],m=[1,29],O=[1,30],S=[1,31],P=[1,32],M=[1,33],U=[1,34],H=[1,35],q=[1,36],G=[1,37],K=[1,38],J=[1,39],Z=[1,40],$=[1,41],tt=[1,42],et=[1,43],at=[1,44],it=[1,45],nt=[1,46],st=[1,47],rt=[1,48],lt=[1,50],ot=[1,51],ct=[1,52],ht=[1,53],ut=[1,54],dt=[1,55],ft=[1,56],pt=[1,57],yt=[1,58],gt=[1,59],bt=[1,60],Ct=[14,42],Qt=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],St=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],A=[1,82],k=[1,83],C=[1,84],w=[1,85],T=[12,14,42],le=[12,14,33,42],Mt=[12,14,33,42,76,77,79,80],vt=[12,33],Ht=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],qt={trace:y(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:y(function(x,v,E,b,R,h,Dt){var p=h.length-1;switch(R){case 3:b.setDirection("TB");break;case 4:b.setDirection("BT");break;case 5:b.setDirection("RL");break;case 6:b.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:b.setC4Type(h[p-3]);break;case 19:b.setTitle(h[p].substring(6)),this.$=h[p].substring(6);break;case 20:b.setAccDescription(h[p].substring(15)),this.$=h[p].substring(15);break;case 21:this.$=h[p].trim(),b.setTitle(this.$);break;case 22:case 23:this.$=h[p].trim(),b.setAccDescription(this.$);break;case 28:h[p].splice(2,0,"ENTERPRISE"),b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 29:h[p].splice(2,0,"SYSTEM"),b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 30:b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 31:h[p].splice(2,0,"CONTAINER"),b.addContainerBoundary(...h[p]),this.$=h[p];break;case 32:b.addDeploymentNode("node",...h[p]),this.$=h[p];break;case 33:b.addDeploymentNode("nodeL",...h[p]),this.$=h[p];break;case 34:b.addDeploymentNode("nodeR",...h[p]),this.$=h[p];break;case 35:b.popBoundaryParseStack();break;case 39:b.addPersonOrSystem("person",...h[p]),this.$=h[p];break;case 40:b.addPersonOrSystem("external_person",...h[p]),this.$=h[p];break;case 41:b.addPersonOrSystem("system",...h[p]),this.$=h[p];break;case 42:b.addPersonOrSystem("system_db",...h[p]),this.$=h[p];break;case 43:b.addPersonOrSystem("system_queue",...h[p]),this.$=h[p];break;case 44:b.addPersonOrSystem("external_system",...h[p]),this.$=h[p];break;case 45:b.addPersonOrSystem("external_system_db",...h[p]),this.$=h[p];break;case 46:b.addPersonOrSystem("external_system_queue",...h[p]),this.$=h[p];break;case 47:b.addContainer("container",...h[p]),this.$=h[p];break;case 48:b.addContainer("container_db",...h[p]),this.$=h[p];break;case 49:b.addContainer("container_queue",...h[p]),this.$=h[p];break;case 50:b.addContainer("external_container",...h[p]),this.$=h[p];break;case 51:b.addContainer("external_container_db",...h[p]),this.$=h[p];break;case 52:b.addContainer("external_container_queue",...h[p]),this.$=h[p];break;case 53:b.addComponent("component",...h[p]),this.$=h[p];break;case 54:b.addComponent("component_db",...h[p]),this.$=h[p];break;case 55:b.addComponent("component_queue",...h[p]),this.$=h[p];break;case 56:b.addComponent("external_component",...h[p]),this.$=h[p];break;case 57:b.addComponent("external_component_db",...h[p]),this.$=h[p];break;case 58:b.addComponent("external_component_queue",...h[p]),this.$=h[p];break;case 60:b.addRel("rel",...h[p]),this.$=h[p];break;case 61:b.addRel("birel",...h[p]),this.$=h[p];break;case 62:b.addRel("rel_u",...h[p]),this.$=h[p];break;case 63:b.addRel("rel_d",...h[p]),this.$=h[p];break;case 64:b.addRel("rel_l",...h[p]),this.$=h[p];break;case 65:b.addRel("rel_r",...h[p]),this.$=h[p];break;case 66:b.addRel("rel_b",...h[p]),this.$=h[p];break;case 67:h[p].splice(0,1),b.addRel("rel",...h[p]),this.$=h[p];break;case 68:b.updateElStyle("update_el_style",...h[p]),this.$=h[p];break;case 69:b.updateRelStyle("update_rel_style",...h[p]),this.$=h[p];break;case 70:b.updateLayoutConfig("update_layout_config",...h[p]),this.$=h[p];break;case 71:this.$=[h[p]];break;case 72:h[p].unshift(h[p-1]),this.$=h[p];break;case 73:case 75:this.$=h[p].trim();break;case 74:let Et={};Et[h[p-1].trim()]=h[p].trim(),this.$=Et;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:s,24:o,26:r,28:l,29:49,30:61,32:62,34:e,36:n,37:i,38:u,39:d,40:f,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:70,19:20,20:21,21:22,22:t,23:s,24:o,26:r,28:l,29:49,30:61,32:62,34:e,36:n,37:i,38:u,39:d,40:f,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:71,19:20,20:21,21:22,22:t,23:s,24:o,26:r,28:l,29:49,30:61,32:62,34:e,36:n,37:i,38:u,39:d,40:f,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:72,19:20,20:21,21:22,22:t,23:s,24:o,26:r,28:l,29:49,30:61,32:62,34:e,36:n,37:i,38:u,39:d,40:f,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:73,19:20,20:21,21:22,22:t,23:s,24:o,26:r,28:l,29:49,30:61,32:62,34:e,36:n,37:i,38:u,39:d,40:f,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{14:[1,74]},a(Ct,[2,13],{43:23,29:49,30:61,32:62,20:75,34:e,36:n,37:i,38:u,39:d,40:f,41:g,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt}),a(Ct,[2,14]),a(Qt,[2,16],{12:[1,76]}),a(Ct,[2,36],{12:[1,77]}),a(St,[2,19]),a(St,[2,20]),{25:[1,78]},{27:[1,79]},a(St,[2,23]),{35:80,75:81,76:A,77:k,79:C,80:w},{35:86,75:81,76:A,77:k,79:C,80:w},{35:87,75:81,76:A,77:k,79:C,80:w},{35:88,75:81,76:A,77:k,79:C,80:w},{35:89,75:81,76:A,77:k,79:C,80:w},{35:90,75:81,76:A,77:k,79:C,80:w},{35:91,75:81,76:A,77:k,79:C,80:w},{35:92,75:81,76:A,77:k,79:C,80:w},{35:93,75:81,76:A,77:k,79:C,80:w},{35:94,75:81,76:A,77:k,79:C,80:w},{35:95,75:81,76:A,77:k,79:C,80:w},{35:96,75:81,76:A,77:k,79:C,80:w},{35:97,75:81,76:A,77:k,79:C,80:w},{35:98,75:81,76:A,77:k,79:C,80:w},{35:99,75:81,76:A,77:k,79:C,80:w},{35:100,75:81,76:A,77:k,79:C,80:w},{35:101,75:81,76:A,77:k,79:C,80:w},{35:102,75:81,76:A,77:k,79:C,80:w},{35:103,75:81,76:A,77:k,79:C,80:w},{35:104,75:81,76:A,77:k,79:C,80:w},a(T,[2,59]),{35:105,75:81,76:A,77:k,79:C,80:w},{35:106,75:81,76:A,77:k,79:C,80:w},{35:107,75:81,76:A,77:k,79:C,80:w},{35:108,75:81,76:A,77:k,79:C,80:w},{35:109,75:81,76:A,77:k,79:C,80:w},{35:110,75:81,76:A,77:k,79:C,80:w},{35:111,75:81,76:A,77:k,79:C,80:w},{35:112,75:81,76:A,77:k,79:C,80:w},{35:113,75:81,76:A,77:k,79:C,80:w},{35:114,75:81,76:A,77:k,79:C,80:w},{35:115,75:81,76:A,77:k,79:C,80:w},{20:116,29:49,30:61,32:62,34:e,36:n,37:i,38:u,39:d,40:f,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{12:[1,118],33:[1,117]},{35:119,75:81,76:A,77:k,79:C,80:w},{35:120,75:81,76:A,77:k,79:C,80:w},{35:121,75:81,76:A,77:k,79:C,80:w},{35:122,75:81,76:A,77:k,79:C,80:w},{35:123,75:81,76:A,77:k,79:C,80:w},{35:124,75:81,76:A,77:k,79:C,80:w},{35:125,75:81,76:A,77:k,79:C,80:w},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},a(Ct,[2,15]),a(Qt,[2,17],{21:22,19:130,22:t,23:s,24:o,26:r,28:l}),a(Ct,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:s,24:o,26:r,28:l,34:e,36:n,37:i,38:u,39:d,40:f,41:g,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt}),a(St,[2,21]),a(St,[2,22]),a(T,[2,39]),a(le,[2,71],{75:81,35:132,76:A,77:k,79:C,80:w}),a(Mt,[2,73]),{78:[1,133]},a(Mt,[2,75]),a(Mt,[2,76]),a(T,[2,40]),a(T,[2,41]),a(T,[2,42]),a(T,[2,43]),a(T,[2,44]),a(T,[2,45]),a(T,[2,46]),a(T,[2,47]),a(T,[2,48]),a(T,[2,49]),a(T,[2,50]),a(T,[2,51]),a(T,[2,52]),a(T,[2,53]),a(T,[2,54]),a(T,[2,55]),a(T,[2,56]),a(T,[2,57]),a(T,[2,58]),a(T,[2,60]),a(T,[2,61]),a(T,[2,62]),a(T,[2,63]),a(T,[2,64]),a(T,[2,65]),a(T,[2,66]),a(T,[2,67]),a(T,[2,68]),a(T,[2,69]),a(T,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},a(vt,[2,28]),a(vt,[2,29]),a(vt,[2,30]),a(vt,[2,31]),a(vt,[2,32]),a(vt,[2,33]),a(vt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},a(Qt,[2,18]),a(Ct,[2,38]),a(le,[2,72]),a(Mt,[2,74]),a(T,[2,24]),a(T,[2,35]),a(Ht,[2,25]),a(Ht,[2,26],{12:[1,138]}),a(Ht,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:y(function(x,v){if(v.recoverable)this.trace(x);else{var E=new Error(x);throw E.hash=v,E}},"parseError"),parse:y(function(x){var v=this,E=[0],b=[],R=[null],h=[],Dt=this.table,p="",Et=0,oe=0,we=2,ce=1,Te=h.slice.call(arguments,1),D=Object.create(this.lexer),At={yy:{}};for(var Gt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Gt)&&(At.yy[Gt]=this.yy[Gt]);D.setInput(x,At.yy),At.yy.lexer=D,At.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Kt=D.yylloc;h.push(Kt);var Oe=D.options&&D.options.ranges;typeof At.yy.parseError=="function"?this.parseError=At.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Re(L){E.length=E.length-2*L,R.length=R.length-L,h.length=h.length-L}y(Re,"popStack");function he(){var L;return L=b.pop()||D.lex()||ce,typeof L!="number"&&(L instanceof Array&&(b=L,L=b.pop()),L=v.symbols_[L]||L),L}y(he,"lex");for(var I,kt,N,Jt,wt={},Nt,W,ue,Yt;;){if(kt=E[E.length-1],this.defaultActions[kt]?N=this.defaultActions[kt]:((I===null||typeof I>"u")&&(I=he()),N=Dt[kt]&&Dt[kt][I]),typeof N>"u"||!N.length||!N[0]){var Zt="";Yt=[];for(Nt in Dt[kt])this.terminals_[Nt]&&Nt>we&&Yt.push("'"+this.terminals_[Nt]+"'");D.showPosition?Zt="Parse error on line "+(Et+1)+`:
2
2
  `+D.showPosition()+`
3
3
  Expecting `+Yt.join(", ")+", got '"+(this.terminals_[I]||I)+"'":Zt="Parse error on line "+(Et+1)+": Unexpected "+(I==ce?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(Zt,{text:D.match,token:this.terminals_[I]||I,line:D.yylineno,loc:Kt,expected:Yt})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+kt+", token: "+I);switch(N[0]){case 1:E.push(I),R.push(D.yytext),h.push(D.yylloc),E.push(N[1]),I=null,oe=D.yyleng,p=D.yytext,Et=D.yylineno,Kt=D.yylloc;break;case 2:if(W=this.productions_[N[1]][1],wt.$=R[R.length-W],wt._$={first_line:h[h.length-(W||1)].first_line,last_line:h[h.length-1].last_line,first_column:h[h.length-(W||1)].first_column,last_column:h[h.length-1].last_column},Oe&&(wt._$.range=[h[h.length-(W||1)].range[0],h[h.length-1].range[1]]),Jt=this.performAction.apply(wt,[p,oe,Et,At.yy,N[1],R,h].concat(Te)),typeof Jt<"u")return Jt;W&&(E=E.slice(0,-1*W*2),R=R.slice(0,-1*W),h=h.slice(0,-1*W)),E.push(this.productions_[N[1]][0]),R.push(wt.$),h.push(wt._$),ue=Dt[E[E.length-2]][E[E.length-1]],E.push(ue);break;case 3:return!0}}return!0},"parse")},Ce=(function(){var _t={EOF:1,parseError:y(function(v,E){if(this.yy.parser)this.yy.parser.parseError(v,E);else throw new Error(v)},"parseError"),setInput:y(function(x,v){return this.yy=v||this.yy||{},this._input=x,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:y(function(){var x=this._input[0];this.yytext+=x,this.yyleng++,this.offset++,this.match+=x,this.matched+=x;var v=x.match(/(?:\r\n?|\n).*/g);return v?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),x},"input"),unput:y(function(x){var v=x.length,E=x.split(/(?:\r\n?|\n)/g);this._input=x+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-v),this.offset-=v;var b=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),E.length-1&&(this.yylineno-=E.length-1);var R=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:E?(E.length===b.length?this.yylloc.first_column:0)+b[b.length-E.length].length-E[0].length:this.yylloc.first_column-v},this.options.ranges&&(this.yylloc.range=[R[0],R[0]+this.yyleng-v]),this.yyleng=this.yytext.length,this},"unput"),more:y(function(){return this._more=!0,this},"more"),reject:y(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:y(function(x){this.unput(this.match.slice(x))},"less"),pastInput:y(function(){var x=this.matched.substr(0,this.matched.length-this.match.length);return(x.length>20?"...":"")+x.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:y(function(){var x=this.match;return x.length<20&&(x+=this._input.substr(0,20-x.length)),(x.substr(0,20)+(x.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:y(function(){var x=this.pastInput(),v=new Array(x.length+1).join("-");return x+this.upcomingInput()+`
@@ -0,0 +1 @@
1
+ import{ai as o,aj as n}from"./mermaid.core-C4yLb7RL.js";const t=(a,r)=>o.lang.round(n.parse(a)[r]);export{t as c};
@@ -1 +1 @@
1
- import{_ as a,e as w,l as x}from"./mermaid.core-CWJzgNYH.js";var d=a((e,t,i,o)=>{e.attr("class",i);const{width:r,height:h,x:n,y:c}=u(e,t);w(e,h,r,o);const s=l(n,c,r,h,t);e.attr("viewBox",s),x.debug(`viewBox configured: ${s} with padding: ${t}`)},"setupViewPortForSVG"),u=a((e,t)=>{var o;const i=((o=e.node())==null?void 0:o.getBBox())||{width:0,height:0,x:0,y:0};return{width:i.width+t*2,height:i.height+t*2,x:i.x,y:i.y}},"calculateDimensionsWithPadding"),l=a((e,t,i,o,r)=>`${e-r} ${t-r} ${i} ${o}`,"createViewBox");export{d as s};
1
+ import{_ as a,e as w,l as x}from"./mermaid.core-C4yLb7RL.js";var d=a((e,t,i,o)=>{e.attr("class",i);const{width:r,height:h,x:n,y:c}=u(e,t);w(e,h,r,o);const s=l(n,c,r,h,t);e.attr("viewBox",s),x.debug(`viewBox configured: ${s} with padding: ${t}`)},"setupViewPortForSVG"),u=a((e,t)=>{var o;const i=((o=e.node())==null?void 0:o.getBBox())||{width:0,height:0,x:0,y:0};return{width:i.width+t*2,height:i.height+t*2,x:i.x,y:i.y}},"calculateDimensionsWithPadding"),l=a((e,t,i,o,r)=>`${e-r} ${t-r} ${i} ${o}`,"createViewBox");export{d as s};
@@ -1 +1 @@
1
- import{_ as l}from"./mermaid.core-CWJzgNYH.js";function m(e,c){var i,t,o;e.accDescr&&((i=c.setAccDescription)==null||i.call(c,e.accDescr)),e.accTitle&&((t=c.setAccTitle)==null||t.call(c,e.accTitle)),e.title&&((o=c.setDiagramTitle)==null||o.call(c,e.title))}l(m,"populateCommonDb");export{m as p};
1
+ import{_ as l}from"./mermaid.core-C4yLb7RL.js";function m(e,c){var i,t,o;e.accDescr&&((i=c.setAccDescription)==null||i.call(c,e.accDescr)),e.accTitle&&((t=c.setAccTitle)==null||t.call(c,e.accTitle)),e.title&&((o=c.setDiagramTitle)==null||o.call(c,e.title))}l(m,"populateCommonDb");export{m as p};
@@ -1 +1 @@
1
- import{_ as a,d as o}from"./mermaid.core-CWJzgNYH.js";var d=a((t,e)=>{let n;return e==="sandbox"&&(n=o("#i"+t)),(e==="sandbox"?o(n.nodes()[0].contentDocument.body):o("body")).select(`[id="${t}"]`)},"getDiagramElement");export{d as g};
1
+ import{_ as a,d as o}from"./mermaid.core-C4yLb7RL.js";var d=a((t,e)=>{let n;return e==="sandbox"&&(n=o("#i"+t)),(e==="sandbox"?o(n.nodes()[0].contentDocument.body):o("body")).select(`[id="${t}"]`)},"getDiagramElement");export{d as g};