dimcode-web 0.1.0-alpha.13 → 0.1.0-alpha.15

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 (117) hide show
  1. package/package.json +1 -1
  2. package/release-manifest.json +89 -88
  3. package/web/assets/AccountSettings-BYorUwuh.js +1 -0
  4. package/web/assets/AccountSettings-DnfPPG7u.css +1 -0
  5. package/web/assets/AgentSettings-DtBv-BRp.js +1 -0
  6. package/web/assets/{AppearanceSettings-C6T82OEq.js → AppearanceSettings-DEqgcTrc.js} +2 -2
  7. package/web/assets/AppearanceSettings-WVGDYAhR.css +1 -0
  8. package/web/assets/ArchivedSettings-BO8xL_Zc.css +1 -0
  9. package/web/assets/ArchivedSettings-JOK9BkgM.js +1 -0
  10. package/web/assets/{CodeBlockNode-DsUHD3_k.js → CodeBlockNode-B-q0VibC.js} +2 -2
  11. package/web/assets/{ConfirmDialog.vue_vue_type_script_setup_true_lang-KPZUoxNU.js → ConfirmDialog.vue_vue_type_script_setup_true_lang-DXzDKu-F.js} +1 -1
  12. package/web/assets/DiagnosticsSettings-BCNu-XXw.js +1 -0
  13. package/web/assets/DiagnosticsSettings-Bf1nv4em.css +1 -0
  14. package/web/assets/GeneralSettingsStatus.vue_vue_type_script_setup_true_lang-C8QiMS-f.js +1 -0
  15. package/web/assets/McpSettings-16HG-xs-.css +1 -0
  16. package/web/assets/McpSettings-Dn0RWMCM.js +1 -0
  17. package/web/assets/ModalitySettings-Bvv1Lwxv.js +1 -0
  18. package/web/assets/ModalitySettings-CJUrNcH9.css +1 -0
  19. package/web/assets/PermissionsSettings-CGumt3Ix.css +1 -0
  20. package/web/assets/PermissionsSettings-Dm0J12is.js +1 -0
  21. package/web/assets/PluginSettings-BoAOaujm.js +1 -0
  22. package/web/assets/PluginSettings-rv5I0LON.css +1 -0
  23. package/web/assets/{PreCodeBlock-DXIuTGLt.js → PreCodeBlock-BsMGwEDD.js} +1 -1
  24. package/web/assets/ProviderAuthFlow.vue_vue_type_script_setup_true_lang-BYgXRhxo.js +11 -0
  25. package/web/assets/ProviderSettings-Cc10ophS.css +1 -0
  26. package/web/assets/ProviderSettings-DUe88cJE.js +2 -0
  27. package/web/assets/SettingsPage-CPj5Q6gZ.js +51 -0
  28. package/web/assets/SkillSettings-DlKAovks.css +1 -0
  29. package/web/assets/SkillSettings-UNo7gYVr.js +3 -0
  30. package/web/assets/{Tooltip-BJL7Jk33.js → Tooltip-C_hJwVPY.js} +1 -1
  31. package/web/assets/{arc-cA0USBj0.js → arc-BVOweOcj.js} +1 -1
  32. package/web/assets/{architectureDiagram-3BPJPVTR-D4GyRGsi.js → architectureDiagram-3BPJPVTR-Cdf75tkZ.js} +1 -1
  33. package/web/assets/arrow-left-1TY72dcB.js +6 -0
  34. package/web/assets/{blockDiagram-GPEHLZMM-CaMtk8X8.js → blockDiagram-GPEHLZMM-TXbT0vfn.js} +1 -1
  35. package/web/assets/{c4Diagram-AAUBKEIU-By4NO5z_.js → c4Diagram-AAUBKEIU-BLoIsxqI.js} +1 -1
  36. package/web/assets/channel-DWz3za3V.js +1 -0
  37. package/web/assets/{chunk-2J33WTMH-DVR8RXjF.js → chunk-2J33WTMH-Cez3LS0o.js} +1 -1
  38. package/web/assets/{chunk-4BX2VUAB-BOCw1xVb.js → chunk-4BX2VUAB-CejcY-GR.js} +1 -1
  39. package/web/assets/{chunk-55IACEB6-nIfgcEjn.js → chunk-55IACEB6-CGYGgVhA.js} +1 -1
  40. package/web/assets/{chunk-727SXJPM-RYvblIbW.js → chunk-727SXJPM-Bdsmh6uB.js} +1 -1
  41. package/web/assets/{chunk-AQP2D5EJ-BO5Su4MY.js → chunk-AQP2D5EJ-jbbaeWQU.js} +1 -1
  42. package/web/assets/{chunk-FMBD7UC4-Q206iq7t.js → chunk-FMBD7UC4-U6ynTxD7.js} +1 -1
  43. package/web/assets/{chunk-ND2GUHAM-BEHXSkEZ.js → chunk-ND2GUHAM-k_uQe5AO.js} +1 -1
  44. package/web/assets/{chunk-QZHKN3VN-B4wImiUI.js → chunk-QZHKN3VN-BFrJHgmx.js} +1 -1
  45. package/web/assets/classDiagram-4FO5ZUOK-B4wuSfve.js +1 -0
  46. package/web/assets/classDiagram-v2-Q7XG4LA2-B4wuSfve.js +1 -0
  47. package/web/assets/context-pPGuP7HE.js +1 -0
  48. package/web/assets/{cose-bilkent-S5V4N54A-BJj5g70v.js → cose-bilkent-S5V4N54A-hsvfUxVB.js} +1 -1
  49. package/web/assets/{cynefin-OW5HDTMX-C-fnPT_y.js → cynefin-OW5HDTMX-CyjwQKcB.js} +1 -1
  50. package/web/assets/{dagre-BM42HDAG-CpAodSX7.js → dagre-BM42HDAG-D5lNpMu2.js} +1 -1
  51. package/web/assets/{diagram-2AECGRRQ-C0jz5rBL.js → diagram-2AECGRRQ-BeSmAefh.js} +1 -1
  52. package/web/assets/{diagram-5GNKFQAL-CKvRsL1_.js → diagram-5GNKFQAL-_sGeIPj9.js} +1 -1
  53. package/web/assets/{diagram-KO2AKTUF-C9_QTnZb.js → diagram-KO2AKTUF-REl74x5P.js} +1 -1
  54. package/web/assets/{diagram-LMA3HP47-B0gvGn3Z.js → diagram-LMA3HP47-Bhs_3Eo6.js} +1 -1
  55. package/web/assets/{diagram-OG6HWLK6-CoW4sNwB.js → diagram-OG6HWLK6-Dw2rA647.js} +1 -1
  56. package/web/assets/{erDiagram-TEJ5UH35-B1YPrM8R.js → erDiagram-TEJ5UH35-dbuIXh5A.js} +1 -1
  57. package/web/assets/{flowDiagram-I6XJVG4X-DbSCyQ1o.js → flowDiagram-I6XJVG4X-3qE0OYWf.js} +1 -1
  58. package/web/assets/{ganttDiagram-6RSMTGT7-DCU_-HcU.js → ganttDiagram-6RSMTGT7-CVw3m5Iu.js} +1 -1
  59. package/web/assets/{gitGraphDiagram-PVQCEYII-BnwXK64G.js → gitGraphDiagram-PVQCEYII-DglWXa0u.js} +1 -1
  60. package/web/assets/{index-gSmHRsHg.js → index-6JHLj77z.js} +1 -1
  61. package/web/assets/{index-B9cemsjA.js → index-BGDKVH9t.js} +5 -5
  62. package/web/assets/{index-BKJW0i9Q.js → index-e9nl1Jp1.js} +3 -3
  63. package/web/assets/{index-GnV5W03u.css → index-o2anzdhl.css} +1 -1
  64. package/web/assets/{index10-B-_2OEd6.js → index10-lus9kB2r.js} +1 -1
  65. package/web/assets/{index5-CFV5-M95.js → index5-DWfUiYdq.js} +1 -1
  66. package/web/assets/{index6-C3q8vusa.js → index6-BbMO6Vxi.js} +1 -1
  67. package/web/assets/{index8-Cg5dteH_.js → index8-CXsZpc7h.js} +1 -1
  68. package/web/assets/{index9-DOQm5ENJ.js → index9-B1JrDH7n.js} +1 -1
  69. package/web/assets/{infoDiagram-5YYISTIA-B_F1M87B.js → infoDiagram-5YYISTIA-58pULHit.js} +1 -1
  70. package/web/assets/{ishikawaDiagram-YF4QCWOH-DXtU3ayb.js → ishikawaDiagram-YF4QCWOH-C8Nb_NHA.js} +1 -1
  71. package/web/assets/{journeyDiagram-JHISSGLW-DiP3bT6x.js → journeyDiagram-JHISSGLW-CJwk-St0.js} +1 -1
  72. package/web/assets/{kanban-definition-UN3LZRKU-8kyelCSQ.js → kanban-definition-UN3LZRKU-BBLDJozx.js} +1 -1
  73. package/web/assets/{linear-aMkA3ImE.js → linear-CABNrj_Q.js} +1 -1
  74. package/web/assets/{markstream-ybWMrpCV.js → markstream-CFccCe8b.js} +2 -2
  75. package/web/assets/{mermaid.core-BWfn-FFw.js → mermaid.core-CugqmqyM.js} +4 -4
  76. package/web/assets/{mindmap-definition-RKZ34NQL-Dge0FtvP.js → mindmap-definition-RKZ34NQL-fuVxBFG-.js} +1 -1
  77. package/web/assets/{pieDiagram-4H26LBE5-D7MzngYj.js → pieDiagram-4H26LBE5-CL9Z1u0K.js} +1 -1
  78. package/web/assets/{quadrantDiagram-W4KKPZXB-cjwaMhCa.js → quadrantDiagram-W4KKPZXB-NELi9P20.js} +1 -1
  79. package/web/assets/{requirementDiagram-4Y6WPE33-ACmBdhUc.js → requirementDiagram-4Y6WPE33-BNDQrgji.js} +1 -1
  80. package/web/assets/{sankeyDiagram-5OEKKPKP-Rva02Dvb.js → sankeyDiagram-5OEKKPKP-Chd2kgG8.js} +1 -1
  81. package/web/assets/{sequenceDiagram-3UESZ5HK-DzazUDns.js → sequenceDiagram-3UESZ5HK-KdCyxc6P.js} +1 -1
  82. package/web/assets/{stateDiagram-AJRCARHV-BODPWGjc.js → stateDiagram-AJRCARHV-B5sdehWP.js} +1 -1
  83. package/web/assets/stateDiagram-v2-BHNVJYJU-BlOe4lfA.js +1 -0
  84. package/web/assets/{timeline-definition-PNZ67QCA-D5UqFLNW.js → timeline-definition-PNZ67QCA-BJ3bS5mN.js} +1 -1
  85. package/web/assets/{vennDiagram-CIIHVFJN-CtcagJ7K.js → vennDiagram-CIIHVFJN-BvMK-uUx.js} +1 -1
  86. package/web/assets/{wardleyDiagram-YWT4CUSO-G86oBHE2.js → wardleyDiagram-YWT4CUSO-CYTyLJOU.js} +1 -1
  87. package/web/assets/{xychartDiagram-2RQKCTM6-BJ1nXYiQ.js → xychartDiagram-2RQKCTM6-sgA9ivsI.js} +1 -1
  88. package/web/dimcode-web.json +2 -2
  89. package/web/index.html +2 -2
  90. package/web/assets/AccountSettings-4uSrBroj.js +0 -1
  91. package/web/assets/AccountSettings-DuC-j6CL.css +0 -1
  92. package/web/assets/AgentSettings-BDiSW65Y.js +0 -1
  93. package/web/assets/AppearanceSettings-CX6_CvK6.css +0 -1
  94. package/web/assets/ArchivedSettings-DDK-qro_.js +0 -1
  95. package/web/assets/ArchivedSettings-De1WaCgP.css +0 -1
  96. package/web/assets/DiagnosticsSettings-BmWPEGHb.css +0 -1
  97. package/web/assets/DiagnosticsSettings-CiDVWqJz.js +0 -1
  98. package/web/assets/GeneralSettingsStatus.vue_vue_type_script_setup_true_lang-DY1_UG_g.js +0 -1
  99. package/web/assets/McpSettings-DCYV728D.css +0 -1
  100. package/web/assets/McpSettings-nYhoS35F.js +0 -1
  101. package/web/assets/ModalitySettings-BkeyOoQt.css +0 -1
  102. package/web/assets/ModalitySettings-mIAic7i5.js +0 -1
  103. package/web/assets/PermissionsSettings-DVv7C2io.css +0 -1
  104. package/web/assets/PermissionsSettings-Dh9gF7YF.js +0 -1
  105. package/web/assets/PluginSettings-BMQazfW6.js +0 -1
  106. package/web/assets/PluginSettings-EhulK7fw.css +0 -1
  107. package/web/assets/ProviderAuthFlow.vue_vue_type_script_setup_true_lang-DHd2sgtZ.js +0 -11
  108. package/web/assets/ProviderSettings-Dc3kVfiC.js +0 -2
  109. package/web/assets/ProviderSettings-O7kVWRtj.css +0 -1
  110. package/web/assets/SettingsPage-YJcDRLr9.js +0 -56
  111. package/web/assets/SkillSettings-C16em-eW.css +0 -1
  112. package/web/assets/SkillSettings-ovHdSPTe.js +0 -3
  113. package/web/assets/channel-rxJrCDWw.js +0 -1
  114. package/web/assets/classDiagram-4FO5ZUOK-BtU1pWhP.js +0 -1
  115. package/web/assets/classDiagram-v2-Q7XG4LA2-BtU1pWhP.js +0 -1
  116. package/web/assets/context-ChGKk1Cc.js +0 -1
  117. package/web/assets/stateDiagram-v2-BHNVJYJU-CJ6CdQEh.js +0 -1
@@ -1,4 +1,4 @@
1
- import{aU as Gt,s as Wt,g as Kt,t as Ht,q as Yt,a as Xt,b as Zt,_ as S,F as St,L as Jt,d as rt,al as Qt,ac as $t,ad as te,ae as ee,e as ne,A as se,H as ie,I as re}from"./mermaid.core-BWfn-FFw.js";import"./index-BKJW0i9Q.js";import"./vendor-vue-Ci9TYO_I.js";const kt=(t,n)=>Gt(t,"a",-n),_t=1e-10;function st(t,n){const s=ae(t),e=s.filter(c=>oe(c,t));let i=0,r=0;const o=[];if(e.length>1){const c=Et(e);for(let u=0;u<e.length;++u){const a=e[u];a.angle=Math.atan2(a.x-c.x,a.y-c.y)}e.sort((u,a)=>a.angle-u.angle);let f=e[e.length-1];for(let u=0;u<e.length;++u){const a=e[u];r+=(f.x+a.x)*(a.y-f.y);const y={x:(a.x+f.x)/2,y:(a.y+f.y)/2};let d=null;for(let m=0;m<a.parentIndex.length;++m)if(f.parentIndex.includes(a.parentIndex[m])){const x=t[a.parentIndex[m]],M=Math.atan2(a.x-x.x,a.y-x.y),E=Math.atan2(f.x-x.x,f.y-x.y);let _=E-M;_<0&&(_+=2*Math.PI);const w=E-_/2;let g=W(y,{x:x.x+x.radius*Math.sin(w),y:x.y+x.radius*Math.cos(w)});g>x.radius*2&&(g=x.radius*2),(d==null||d.width>g)&&(d={circle:x,width:g,p1:a,p2:f,large:g>x.radius,sweep:!0})}d!=null&&(o.push(d),i+=lt(d.circle.radius,d.width),f=a)}}else{let c=t[0];for(let u=1;u<t.length;++u)t[u].radius<c.radius&&(c=t[u]);let f=!1;for(let u=0;u<t.length;++u)if(W(t[u],c)>Math.abs(c.radius-t[u].radius)){f=!0;break}f?i=r=0:(i=c.radius*c.radius*Math.PI,o.push({circle:c,p1:{x:c.x,y:c.y+c.radius},p2:{x:c.x-_t,y:c.y+c.radius},width:c.radius*2,large:!0,sweep:!0}))}return r/=2,n&&(n.area=i+r,n.arcArea=i,n.polygonArea=r,n.arcs=o,n.innerPoints=e,n.intersectionPoints=s),i+r}function oe(t,n){return n.every(s=>W(t,s)<s.radius+_t)}function ae(t){const n=[];for(let s=0;s<t.length;++s)for(let e=s+1;e<t.length;++e){const i=Tt(t[s],t[e]);for(const r of i)r.parentIndex=[s,e],n.push(r)}return n}function lt(t,n){return t*t*Math.acos(1-n/t)-(t-n)*Math.sqrt(n*(2*t-n))}function W(t,n){return Math.sqrt((t.x-n.x)*(t.x-n.x)+(t.y-n.y)*(t.y-n.y))}function xt(t,n,s){if(s>=t+n)return 0;if(s<=Math.abs(t-n))return Math.PI*Math.min(t,n)*Math.min(t,n);const e=t-(s*s-n*n+t*t)/(2*s),i=n-(s*s-t*t+n*n)/(2*s);return lt(t,e)+lt(n,i)}function Tt(t,n){const s=W(t,n),e=t.radius,i=n.radius;if(s>=e+i||s<=Math.abs(e-i))return[];const r=(e*e-i*i+s*s)/(2*s),o=Math.sqrt(e*e-r*r),c=t.x+r*(n.x-t.x)/s,f=t.y+r*(n.y-t.y)/s,u=-(n.y-t.y)*(o/s),a=-(n.x-t.x)*(o/s);return[{x:c+u,y:f-a},{x:c-u,y:f+a}]}function Et(t){const n={x:0,y:0};for(const s of t)n.x+=s.x,n.y+=s.y;return n.x/=t.length,n.y/=t.length,n}function le(t,n,s,e){e=e||{};const i=e.maxIterations||100,r=e.tolerance||1e-10,o=t(n),c=t(s);let f=s-n;if(o*c>0)throw"Initial bisect points must have opposite signs";if(o===0)return n;if(c===0)return s;for(let u=0;u<i;++u){f/=2;const a=n+f,y=t(a);if(y*o>=0&&(n=a),Math.abs(f)<r||y===0)return a}return n+f}function ct(t){const n=new Array(t);for(let s=0;s<t;++s)n[s]=0;return n}function Mt(t,n){return ct(t).map(()=>ct(n))}function tt(t,n){let s=0;for(let e=0;e<t.length;++e)s+=t[e]*n[e];return s}function ut(t){return Math.sqrt(tt(t,t))}function ht(t,n,s){for(let e=0;e<n.length;++e)t[e]=n[e]*s}function Q(t,n,s,e,i){for(let r=0;r<t.length;++r)t[r]=n*s[r]+e*i[r]}function zt(t,n,s){s=s||{};const e=s.maxIterations||n.length*200,i=s.nonZeroDelta||1.05,r=s.zeroDelta||.001,o=s.minErrorDelta||1e-6,c=s.minErrorDelta||1e-5,f=s.rho!==void 0?s.rho:1,u=s.chi!==void 0?s.chi:2,a=s.psi!==void 0?s.psi:-.5,y=s.sigma!==void 0?s.sigma:.5;let d;const m=n.length,x=new Array(m+1);x[0]=n,x[0].fx=t(n),x[0].id=0;for(let v=0;v<m;++v){const l=n.slice();l[v]=l[v]?l[v]*i:r,x[v+1]=l,x[v+1].fx=t(l),x[v+1].id=v+1}function M(v){for(let l=0;l<v.length;l++)x[m][l]=v[l];x[m].fx=v.fx}const E=(v,l)=>v.fx-l.fx,_=n.slice(),w=n.slice(),g=n.slice(),b=n.slice();for(let v=0;v<e;++v){if(x.sort(E),s.history){const p=x.map(h=>{const j=h.slice();return j.fx=h.fx,j.id=h.id,j});p.sort((h,j)=>h.id-j.id),s.history.push({x:x[0].slice(),fx:x[0].fx,simplex:p})}d=0;for(let p=0;p<m;++p)d=Math.max(d,Math.abs(x[0][p]-x[1][p]));if(Math.abs(x[0].fx-x[m].fx)<o&&d<c)break;for(let p=0;p<m;++p){_[p]=0;for(let h=0;h<m;++h)_[p]+=x[h][p];_[p]/=m}const l=x[m];if(Q(w,1+f,_,-f,l),w.fx=t(w),w.fx<x[0].fx)Q(b,1+u,_,-u,l),b.fx=t(b),b.fx<w.fx?M(b):M(w);else if(w.fx>=x[m-1].fx){let p=!1;if(w.fx>l.fx?(Q(g,1+a,_,-a,l),g.fx=t(g),g.fx<l.fx?M(g):p=!0):(Q(g,1-a*f,_,a*f,l),g.fx=t(g),g.fx<w.fx?M(g):p=!0),p){if(y>=1)break;for(let h=1;h<x.length;++h)Q(x[h],1-y,x[0],y,x[h]),x[h].fx=t(x[h])}}else M(w)}return x.sort(E),{fx:x[0].fx,x:x[0]}}function ce(t,n,s,e,i,r,o){const c=s.fx,f=tt(s.fxprime,n);let u=c,a=c,y=f,d=0;i=i||1,r=r||1e-6,o=o||.1;function m(x,M,E){for(let _=0;_<16;++_)if(i=(x+M)/2,Q(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=tt(e.fxprime,n),u>c+r*i*f||u>=E)M=i;else{if(Math.abs(y)<=-o*f)return i;y*(M-x)>=0&&(M=x),x=i,E=u}return 0}for(let x=0;x<10;++x){if(Q(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=tt(e.fxprime,n),u>c+r*i*f||x&&u>=a)return m(d,i,a);if(Math.abs(y)<=-o*f)return i;if(y>=0)return m(i,d,u);a=u,d=i,i*=2}return i}function ue(t,n,s){let e={x:n.slice(),fx:0,fxprime:n.slice()},i={x:n.slice(),fx:0,fxprime:n.slice()};const r=n.slice();let o,c,f=1,u;s=s||{},u=s.maxIterations||n.length*20,e.fx=t(e.x,e.fxprime),o=e.fxprime.slice(),ht(o,e.fxprime,-1);for(let a=0;a<u;++a){if(f=ce(t,o,e,i,f),s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),!f)ht(o,e.fxprime,-1);else{Q(r,1,i.fxprime,-1,e.fxprime);const y=tt(e.fxprime,e.fxprime),d=Math.max(0,tt(r,i.fxprime)/y);Q(o,d,o,-1,i.fxprime),c=e,e=i,i=c}if(ut(e.fxprime)<=1e-5)break}return s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),e}function At(t,n={}){n.maxIterations=n.maxIterations||500;const s=n.initialLayout||ge,e=n.lossFunction||et,i=he(t,n),r=s(i,n),o=Object.keys(r),c=[];for(const a of o)c.push(r[a].x),c.push(r[a].y);const u=zt(a=>{const y={};for(let d=0;d<o.length;++d){const m=o[d];y[m]={x:a[2*d],y:a[2*d+1],radius:r[m].radius}}return e(y,i)},c,n).x;for(let a=0;a<o.length;++a){const y=o[a];r[y].x=u[2*a],r[y].y=u[2*a+1]}return r}const Rt=1e-10;function ft(t,n,s){return Math.min(t,n)*Math.min(t,n)*Math.PI<=s+Rt?Math.abs(t-n):le(e=>xt(t,n,e)-s,0,t+n)}function he(t,n={}){const s=n.distinct,e=t.map(c=>Object.assign({},c));function i(c){return c.join(";")}if(s){const c=new Map;for(const f of e)for(let u=0;u<f.sets.length;u++){const a=String(f.sets[u]);c.set(a,f.size+(c.get(a)||0));for(let y=u+1;y<f.sets.length;y++){const d=String(f.sets[y]),m=`${a};${d}`,x=`${d};${a}`;c.set(m,f.size+(c.get(m)||0)),c.set(x,f.size+(c.get(x)||0))}}for(const f of e)f.sets.length<3&&(f.size=c.get(i(f.sets)))}const r=[],o=new Set;for(const c of e)if(c.sets.length===1)r.push(c.sets[0]);else if(c.sets.length===2){const f=c.sets[0],u=c.sets[1];o.add(i(c.sets)),o.add(i([u,f]))}r.sort((c,f)=>c===f?0:c<f?-1:1);for(let c=0;c<r.length;++c){const f=r[c];for(let u=c+1;u<r.length;++u){const a=r[u];o.has(i([f,a]))||e.push({sets:[f,a],size:0})}}return e}function fe(t,n,s){const e=Mt(n.length,n.length),i=Mt(n.length,n.length);return t.filter(r=>r.sets.length===2).forEach(r=>{const o=s[r.sets[0]],c=s[r.sets[1]],f=Math.sqrt(n[o].size/Math.PI),u=Math.sqrt(n[c].size/Math.PI),a=ft(f,u,r.size);e[o][c]=e[c][o]=a;let y=0;r.size+1e-10>=Math.min(n[o].size,n[c].size)?y=1:r.size<=1e-10&&(y=-1),i[o][c]=i[c][o]=y}),{distances:e,constraints:i}}function de(t,n,s,e){for(let r=0;r<n.length;++r)n[r]=0;let i=0;for(let r=0;r<s.length;++r){const o=t[2*r],c=t[2*r+1];for(let f=r+1;f<s.length;++f){const u=t[2*f],a=t[2*f+1],y=s[r][f],d=e[r][f],m=(u-o)*(u-o)+(a-c)*(a-c),x=Math.sqrt(m),M=m-y*y;d>0&&x<=y||d<0&&x>=y||(i+=2*M*M,n[2*r]+=4*M*(o-u),n[2*r+1]+=4*M*(c-a),n[2*f]+=4*M*(u-o),n[2*f+1]+=4*M*(a-c))}}return i}function ge(t,n={}){let s=ye(t,n);const e=n.lossFunction||et;if(t.length>=8){const i=xe(t,n),r=e(i,t),o=e(s,t);r+1e-8<o&&(s=i)}return s}function xe(t,n={}){const s=n.restarts||10,e=[],i={};for(const d of t)d.sets.length===1&&(i[d.sets[0]]=e.length,e.push(d));let{distances:r,constraints:o}=fe(t,e,i);const c=ut(r.map(ut))/r.length;r=r.map(d=>d.map(m=>m/c));const f=(d,m)=>de(d,m,r,o);let u=null;for(let d=0;d<s;++d){const m=ct(r.length*2).map(Math.random),x=ue(f,m,n);(!u||x.fx<u.fx)&&(u=x)}const a=u.x,y={};for(let d=0;d<e.length;++d){const m=e[d];y[m.sets[0]]={x:a[2*d]*c,y:a[2*d+1]*c,radius:Math.sqrt(m.size/Math.PI)}}if(n.history)for(const d of n.history)ht(d.x,c);return y}function ye(t,n){const s=n&&n.lossFunction?n.lossFunction:et,e={},i={};for(const y of t)if(y.sets.length===1){const d=y.sets[0];e[d]={x:1e10,y:1e10,rowid:e.length,size:y.size,radius:Math.sqrt(y.size/Math.PI)},i[d]=[]}t=t.filter(y=>y.sets.length===2);for(const y of t){let d=y.weight!=null?y.weight:1;const m=y.sets[0],x=y.sets[1];y.size+Rt>=Math.min(e[m].size,e[x].size)&&(d=0),i[m].push({set:x,size:y.size,weight:d}),i[x].push({set:m,size:y.size,weight:d})}const r=[];Object.keys(i).forEach(y=>{let d=0;for(let m=0;m<i[y].length;++m)d+=i[y][m].size*i[y][m].weight;r.push({set:y,size:d})});function o(y,d){return d.size-y.size}r.sort(o);const c={};function f(y){return y.set in c}function u(y,d){e[d].x=y.x,e[d].y=y.y,c[d]=!0}u({x:0,y:0},r[0].set);for(let y=1;y<r.length;++y){const d=r[y].set,m=i[d].filter(f),x=e[d];if(m.sort(o),m.length===0)throw"ERROR: missing pairwise overlap information";const M=[];for(var a=0;a<m.length;++a){const w=e[m[a].set],g=ft(x.radius,w.radius,m[a].size);M.push({x:w.x+g,y:w.y}),M.push({x:w.x-g,y:w.y}),M.push({y:w.y+g,x:w.x}),M.push({y:w.y-g,x:w.x});for(let b=a+1;b<m.length;++b){const v=e[m[b].set],l=ft(x.radius,v.radius,m[b].size),p=Tt({x:w.x,y:w.y,radius:g},{x:v.x,y:v.y,radius:l});M.push(...p)}}let E=1e50,_=M[0];for(const w of M){e[d].x=w.x,e[d].y=w.y;const g=s(e,t);g<E&&(E=g,_=w)}u(_,d)}return e}function et(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const o=t[e.sets[0]],c=t[e.sets[1]];i=xt(o.radius,c.radius,W(o,c))}else i=st(e.sets.map(o=>t[o]));const r=e.weight!=null?e.weight:1;s+=r*(i-e.size)*(i-e.size)}return s}function Ct(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const c=t[e.sets[0]],f=t[e.sets[1]];i=xt(c.radius,f.radius,W(c,f))}else i=st(e.sets.map(c=>t[c]));const r=e.weight!=null?e.weight:1,o=Math.log((i+1)/(e.size+1));s+=r*o*o}return s}function pe(t,n,s){if(s==null?t.sort((i,r)=>r.radius-i.radius):t.sort(s),t.length>0){const i=t[0].x,r=t[0].y;for(const o of t)o.x-=i,o.y-=r}if(t.length===2&&W(t[0],t[1])<Math.abs(t[1].radius-t[0].radius)&&(t[1].x=t[0].x+t[0].radius-t[1].radius-1e-10,t[1].y=t[0].y),t.length>1){const i=Math.atan2(t[1].x,t[1].y)-n,r=Math.cos(i),o=Math.sin(i);for(const c of t){const f=c.x,u=c.y;c.x=r*f-o*u,c.y=o*f+r*u}}if(t.length>2){let i=Math.atan2(t[2].x,t[2].y)-n;for(;i<0;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI){const r=t[1].y/(1e-10+t[1].x);for(const o of t){var e=(o.x+r*o.y)/(1+r*r);o.x=2*e-o.x,o.y=2*e*r-o.y}}}}function me(t){t.forEach(i=>{i.parent=i});function n(i){return i.parent!==i&&(i.parent=n(i.parent)),i.parent}function s(i,r){const o=n(i),c=n(r);o.parent=c}for(let i=0;i<t.length;++i)for(let r=i+1;r<t.length;++r){const o=t[i].radius+t[r].radius;W(t[i],t[r])+1e-10<o&&s(t[r],t[i])}const e=new Map;for(let i=0;i<t.length;++i){const r=n(t[i]).parent.setid;e.has(r)||e.set(r,[]),e.get(r).push(t[i])}return t.forEach(i=>{delete i.parent}),Array.from(e.values())}function dt(t){const n=s=>{const e=t.reduce((r,o)=>Math.max(r,o[s]+o.radius),Number.NEGATIVE_INFINITY),i=t.reduce((r,o)=>Math.min(r,o[s]-o.radius),Number.POSITIVE_INFINITY);return{max:e,min:i}};return{xRange:n("x"),yRange:n("y")}}function Dt(t,n,s){n==null&&(n=Math.PI/2);let e=Ft(t).map(u=>Object.assign({},u));const i=me(e);for(const u of i){pe(u,n,s);const a=dt(u);u.size=(a.xRange.max-a.xRange.min)*(a.yRange.max-a.yRange.min),u.bounds=a}i.sort((u,a)=>a.size-u.size),e=i[0];let r=e.bounds;const o=(r.xRange.max-r.xRange.min)/50;function c(u,a,y){if(!u)return;const d=u.bounds;let m,x;if(a)m=r.xRange.max-d.xRange.min+o;else{m=r.xRange.max-d.xRange.max;const M=(d.xRange.max-d.xRange.min)/2-(r.xRange.max-r.xRange.min)/2;M<0&&(m+=M)}if(y)x=r.yRange.max-d.yRange.min+o;else{x=r.yRange.max-d.yRange.max;const M=(d.yRange.max-d.yRange.min)/2-(r.yRange.max-r.yRange.min)/2;M<0&&(x+=M)}for(const M of u)M.x+=m,M.y+=x,e.push(M)}let f=1;for(;f<i.length;)c(i[f],!0,!1),c(i[f+1],!1,!0),c(i[f+2],!0,!0),f+=3,r=dt(e);return Ot(e)}function Nt(t,n,s,e,i){const r=Ft(t);n-=2*e,s-=2*e;const{xRange:o,yRange:c}=dt(r);if(o.max===o.min||c.max===c.min)return console.log("not scaling solution: zero size detected"),t;let f,u;if(i){const m=Math.sqrt(i/Math.PI)*2;f=n/m,u=s/m}else f=n/(o.max-o.min),u=s/(c.max-c.min);const a=Math.min(u,f),y=(n-(o.max-o.min)*a)/2,d=(s-(c.max-c.min)*a)/2;return Ot(r.map(m=>({radius:a*m.radius,x:e+y+(m.x-o.min)*a,y:e+d+(m.y-c.min)*a,setid:m.setid})))}function Ot(t){const n={};for(const s of t)n[s.setid]=s;return n}function Ft(t){return Object.keys(t).map(s=>Object.assign(t[s],{setid:s}))}function be(t={}){let n=!1,s=600,e=350,i=15,r=1e3,o=Math.PI/2,c=!0,f=null,u=!0,a=!0,y=null,d=null,m=!1,x=null,M=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,E={},_=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],w=0,g=function(p){if(p in E)return E[p];var h=E[p]=_[w];return w+=1,w>=_.length&&(w=0),h},b=At,v=et;function l(p){let h=p.datum();const j=new Set;h.forEach(I=>{I.size==0&&I.sets.length==1&&j.add(I.sets[0])}),h=h.filter(I=>!I.sets.some(L=>j.has(L)));let k={},N={};if(h.length>0){let I=b(h,{lossFunction:v,distinct:m});c&&(I=Dt(I,o,d)),k=Nt(I,s,e,i,f),N=jt(k,h,M)}const Y={};h.forEach(I=>{I.label&&(Y[I.sets]=I.label)});function B(I){if(I.sets in Y)return Y[I.sets];if(I.sets.length==1)return""+I.sets[0]}p.selectAll("svg").data([k]).enter().append("svg");const U=p.select("svg");n?U.attr("viewBox",`0 0 ${s} ${e}`):U.attr("width",s).attr("height",e);const q={};let z=!1;U.selectAll(".venn-area path").each(function(I){const L=this.getAttribute("d");I.sets.length==1&&L&&!m&&(z=!0,q[I.sets[0]]=ke(L))});function A(I){return L=>{const G=I.sets.map(Z=>{let H=q[Z],J=k[Z];return H||(H={x:s/2,y:e/2,radius:1}),J||(J={x:s/2,y:e/2,radius:1}),{x:H.x*(1-L)+J.x*L,y:H.y*(1-L)+J.y*L,radius:H.radius*(1-L)+J.radius*L}});return wt(G,x)}}const C=U.selectAll(".venn-area").data(h,I=>I.sets),O=C.enter().append("g").attr("class",I=>`venn-area venn-${I.sets.length==1?"circle":"intersection"}${I.colour||I.color?" venn-coloured":""}`).attr("data-venn-sets",I=>I.sets.join("_")),P=O.append("path"),V=O.append("text").attr("class","label").text(I=>B(I)).attr("text-anchor","middle").attr("dy",".35em").attr("x",s/2).attr("y",e/2);a&&(P.style("fill-opacity","0").filter(I=>I.sets.length==1).style("fill",I=>I.colour?I.colour:I.color?I.color:g(I.sets)).style("fill-opacity",".25"),V.style("fill",I=>I.colour||I.color?"#FFF":t.textFill?t.textFill:I.sets.length==1?g(I.sets):"#444"));function R(I){return typeof I.transition=="function"?I.transition("venn").duration(r):I}let T=p;z&&typeof T.transition=="function"?(T=R(p),T.selectAll("path").attrTween("d",A)):T.selectAll("path").attr("d",I=>wt(I.sets.map(L=>k[L])),x);const F=T.selectAll("text").filter(I=>I.sets in N).text(I=>B(I)).attr("x",I=>Math.floor(N[I.sets].x)).attr("y",I=>Math.floor(N[I.sets].y));u&&(z?"on"in F?F.on("end",ot(k,B)):F.each("end",ot(k,B)):F.each(ot(k,B)));const D=R(C.exit()).remove();typeof C.transition=="function"&&D.selectAll("path").attrTween("d",A);const X=D.selectAll("text").attr("x",s/2).attr("y",e/2);return y!==null&&(V.style("font-size","0px"),F.style("font-size",y),X.style("font-size","0px")),{circles:k,textCentres:N,nodes:C,enter:O,update:T,exit:D}}return l.wrap=function(p){return arguments.length?(u=p,l):u},l.useViewBox=function(){return n=!0,l},l.width=function(p){return arguments.length?(s=p,l):s},l.height=function(p){return arguments.length?(e=p,l):e},l.padding=function(p){return arguments.length?(i=p,l):i},l.distinct=function(p){return arguments.length?(m=p,l):m},l.colours=function(p){return arguments.length?(g=p,l):g},l.colors=function(p){return arguments.length?(g=p,l):g},l.fontSize=function(p){return arguments.length?(y=p,l):y},l.round=function(p){return arguments.length?(x=p,l):x},l.duration=function(p){return arguments.length?(r=p,l):r},l.layoutFunction=function(p){return arguments.length?(b=p,l):b},l.normalize=function(p){return arguments.length?(c=p,l):c},l.scaleToFit=function(p){return arguments.length?(f=p,l):f},l.styled=function(p){return arguments.length?(a=p,l):a},l.orientation=function(p){return arguments.length?(o=p,l):o},l.orientationOrder=function(p){return arguments.length?(d=p,l):d},l.lossFunction=function(p){return arguments.length?(v=p==="default"?et:p==="logRatio"?Ct:p,l):v},l}function ot(t,n){return function(s){const e=this,i=t[s.sets[0]].radius||50,r=n(s)||"",o=r.split(/\s+/).reverse(),f=(r.length+o.length)/3;let u=o.pop(),a=[u],y=0;const d=1.1;e.textContent=null;const m=[];function x(g){const b=e.ownerDocument.createElementNS(e.namespaceURI,"tspan");return b.textContent=g,m.push(b),e.append(b),b}let M=x(u);for(;u=o.pop(),!!u;){a.push(u);const g=a.join(" ");M.textContent=g,g.length>f&&M.getComputedTextLength()>i&&(a.pop(),M.textContent=a.join(" "),a=[u],M=x(u),y++)}const E=.35-y*d/2,_=e.getAttribute("x"),w=e.getAttribute("y");m.forEach((g,b)=>{g.setAttribute("x",_),g.setAttribute("y",w),g.setAttribute("dy",`${E+b*d}em`)})}}function at(t,n,s){let e=n[0].radius-W(n[0],t);for(let i=1;i<n.length;++i){const r=n[i].radius-W(n[i],t);r<=e&&(e=r)}for(let i=0;i<s.length;++i){const r=W(s[i],t)-s[i].radius;r<=e&&(e=r)}return e}function Lt(t,n,s){const e=[];for(const a of t)e.push({x:a.x,y:a.y}),e.push({x:a.x+a.radius/2,y:a.y}),e.push({x:a.x-a.radius/2,y:a.y}),e.push({x:a.x,y:a.y+a.radius/2}),e.push({x:a.x,y:a.y-a.radius/2});let i=e[0],r=at(e[0],t,n);for(let a=1;a<e.length;++a){const y=at(e[a],t,n);y>=r&&(i=e[a],r=y)}const o=zt(a=>-1*at({x:a[0],y:a[1]},t,n),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,c={x:s?0:o[0],y:o[1]};let f=!0;for(const a of t)if(W(c,a)>a.radius){f=!1;break}for(const a of n)if(W(c,a)<a.radius){f=!1;break}if(f)return c;if(t.length==1)return{x:t[0].x,y:t[0].y};const u={};return st(t,u),u.arcs.length===0?{x:0,y:-1e3,disjoint:!0}:u.arcs.length==1?{x:u.arcs[0].circle.x,y:u.arcs[0].circle.y}:n.length?Lt(t,[]):Et(u.arcs.map(a=>a.p1))}function ve(t){const n={},s=Object.keys(t);for(const e of s)n[e]=[];for(let e=0;e<s.length;e++){const i=s[e],r=t[i];for(let o=e+1;o<s.length;++o){const c=s[o],f=t[c],u=W(r,f);u+f.radius<=r.radius+1e-10?n[c].push(i):u+r.radius<=f.radius+1e-10&&n[i].push(c)}}return n}function jt(t,n,s){const e={},i=ve(t);for(let r=0;r<n.length;++r){const o=n[r].sets,c={},f={};for(let d=0;d<o.length;++d){c[o[d]]=!0;const m=i[o[d]];for(let x=0;x<m.length;++x)f[m[x]]=!0}const u=[],a=[];for(let d in t)d in c?u.push(t[d]):d in f||a.push(t[d]);const y=Lt(u,a,s);e[o]=y,y.disjoint&&n[r].size>0&&console.log("WARNING: area "+o+" not represented on screen")}return e}function Ie(t,n,s){const e=[];return e.push(`
1
+ import{aU as Gt,s as Wt,g as Kt,t as Ht,q as Yt,a as Xt,b as Zt,_ as S,F as St,L as Jt,d as rt,al as Qt,ac as $t,ad as te,ae as ee,e as ne,A as se,H as ie,I as re}from"./mermaid.core-CugqmqyM.js";import"./index-e9nl1Jp1.js";import"./vendor-vue-Ci9TYO_I.js";const kt=(t,n)=>Gt(t,"a",-n),_t=1e-10;function st(t,n){const s=ae(t),e=s.filter(c=>oe(c,t));let i=0,r=0;const o=[];if(e.length>1){const c=Et(e);for(let u=0;u<e.length;++u){const a=e[u];a.angle=Math.atan2(a.x-c.x,a.y-c.y)}e.sort((u,a)=>a.angle-u.angle);let f=e[e.length-1];for(let u=0;u<e.length;++u){const a=e[u];r+=(f.x+a.x)*(a.y-f.y);const y={x:(a.x+f.x)/2,y:(a.y+f.y)/2};let d=null;for(let m=0;m<a.parentIndex.length;++m)if(f.parentIndex.includes(a.parentIndex[m])){const x=t[a.parentIndex[m]],M=Math.atan2(a.x-x.x,a.y-x.y),E=Math.atan2(f.x-x.x,f.y-x.y);let _=E-M;_<0&&(_+=2*Math.PI);const w=E-_/2;let g=W(y,{x:x.x+x.radius*Math.sin(w),y:x.y+x.radius*Math.cos(w)});g>x.radius*2&&(g=x.radius*2),(d==null||d.width>g)&&(d={circle:x,width:g,p1:a,p2:f,large:g>x.radius,sweep:!0})}d!=null&&(o.push(d),i+=lt(d.circle.radius,d.width),f=a)}}else{let c=t[0];for(let u=1;u<t.length;++u)t[u].radius<c.radius&&(c=t[u]);let f=!1;for(let u=0;u<t.length;++u)if(W(t[u],c)>Math.abs(c.radius-t[u].radius)){f=!0;break}f?i=r=0:(i=c.radius*c.radius*Math.PI,o.push({circle:c,p1:{x:c.x,y:c.y+c.radius},p2:{x:c.x-_t,y:c.y+c.radius},width:c.radius*2,large:!0,sweep:!0}))}return r/=2,n&&(n.area=i+r,n.arcArea=i,n.polygonArea=r,n.arcs=o,n.innerPoints=e,n.intersectionPoints=s),i+r}function oe(t,n){return n.every(s=>W(t,s)<s.radius+_t)}function ae(t){const n=[];for(let s=0;s<t.length;++s)for(let e=s+1;e<t.length;++e){const i=Tt(t[s],t[e]);for(const r of i)r.parentIndex=[s,e],n.push(r)}return n}function lt(t,n){return t*t*Math.acos(1-n/t)-(t-n)*Math.sqrt(n*(2*t-n))}function W(t,n){return Math.sqrt((t.x-n.x)*(t.x-n.x)+(t.y-n.y)*(t.y-n.y))}function xt(t,n,s){if(s>=t+n)return 0;if(s<=Math.abs(t-n))return Math.PI*Math.min(t,n)*Math.min(t,n);const e=t-(s*s-n*n+t*t)/(2*s),i=n-(s*s-t*t+n*n)/(2*s);return lt(t,e)+lt(n,i)}function Tt(t,n){const s=W(t,n),e=t.radius,i=n.radius;if(s>=e+i||s<=Math.abs(e-i))return[];const r=(e*e-i*i+s*s)/(2*s),o=Math.sqrt(e*e-r*r),c=t.x+r*(n.x-t.x)/s,f=t.y+r*(n.y-t.y)/s,u=-(n.y-t.y)*(o/s),a=-(n.x-t.x)*(o/s);return[{x:c+u,y:f-a},{x:c-u,y:f+a}]}function Et(t){const n={x:0,y:0};for(const s of t)n.x+=s.x,n.y+=s.y;return n.x/=t.length,n.y/=t.length,n}function le(t,n,s,e){e=e||{};const i=e.maxIterations||100,r=e.tolerance||1e-10,o=t(n),c=t(s);let f=s-n;if(o*c>0)throw"Initial bisect points must have opposite signs";if(o===0)return n;if(c===0)return s;for(let u=0;u<i;++u){f/=2;const a=n+f,y=t(a);if(y*o>=0&&(n=a),Math.abs(f)<r||y===0)return a}return n+f}function ct(t){const n=new Array(t);for(let s=0;s<t;++s)n[s]=0;return n}function Mt(t,n){return ct(t).map(()=>ct(n))}function tt(t,n){let s=0;for(let e=0;e<t.length;++e)s+=t[e]*n[e];return s}function ut(t){return Math.sqrt(tt(t,t))}function ht(t,n,s){for(let e=0;e<n.length;++e)t[e]=n[e]*s}function Q(t,n,s,e,i){for(let r=0;r<t.length;++r)t[r]=n*s[r]+e*i[r]}function zt(t,n,s){s=s||{};const e=s.maxIterations||n.length*200,i=s.nonZeroDelta||1.05,r=s.zeroDelta||.001,o=s.minErrorDelta||1e-6,c=s.minErrorDelta||1e-5,f=s.rho!==void 0?s.rho:1,u=s.chi!==void 0?s.chi:2,a=s.psi!==void 0?s.psi:-.5,y=s.sigma!==void 0?s.sigma:.5;let d;const m=n.length,x=new Array(m+1);x[0]=n,x[0].fx=t(n),x[0].id=0;for(let v=0;v<m;++v){const l=n.slice();l[v]=l[v]?l[v]*i:r,x[v+1]=l,x[v+1].fx=t(l),x[v+1].id=v+1}function M(v){for(let l=0;l<v.length;l++)x[m][l]=v[l];x[m].fx=v.fx}const E=(v,l)=>v.fx-l.fx,_=n.slice(),w=n.slice(),g=n.slice(),b=n.slice();for(let v=0;v<e;++v){if(x.sort(E),s.history){const p=x.map(h=>{const j=h.slice();return j.fx=h.fx,j.id=h.id,j});p.sort((h,j)=>h.id-j.id),s.history.push({x:x[0].slice(),fx:x[0].fx,simplex:p})}d=0;for(let p=0;p<m;++p)d=Math.max(d,Math.abs(x[0][p]-x[1][p]));if(Math.abs(x[0].fx-x[m].fx)<o&&d<c)break;for(let p=0;p<m;++p){_[p]=0;for(let h=0;h<m;++h)_[p]+=x[h][p];_[p]/=m}const l=x[m];if(Q(w,1+f,_,-f,l),w.fx=t(w),w.fx<x[0].fx)Q(b,1+u,_,-u,l),b.fx=t(b),b.fx<w.fx?M(b):M(w);else if(w.fx>=x[m-1].fx){let p=!1;if(w.fx>l.fx?(Q(g,1+a,_,-a,l),g.fx=t(g),g.fx<l.fx?M(g):p=!0):(Q(g,1-a*f,_,a*f,l),g.fx=t(g),g.fx<w.fx?M(g):p=!0),p){if(y>=1)break;for(let h=1;h<x.length;++h)Q(x[h],1-y,x[0],y,x[h]),x[h].fx=t(x[h])}}else M(w)}return x.sort(E),{fx:x[0].fx,x:x[0]}}function ce(t,n,s,e,i,r,o){const c=s.fx,f=tt(s.fxprime,n);let u=c,a=c,y=f,d=0;i=i||1,r=r||1e-6,o=o||.1;function m(x,M,E){for(let _=0;_<16;++_)if(i=(x+M)/2,Q(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=tt(e.fxprime,n),u>c+r*i*f||u>=E)M=i;else{if(Math.abs(y)<=-o*f)return i;y*(M-x)>=0&&(M=x),x=i,E=u}return 0}for(let x=0;x<10;++x){if(Q(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=tt(e.fxprime,n),u>c+r*i*f||x&&u>=a)return m(d,i,a);if(Math.abs(y)<=-o*f)return i;if(y>=0)return m(i,d,u);a=u,d=i,i*=2}return i}function ue(t,n,s){let e={x:n.slice(),fx:0,fxprime:n.slice()},i={x:n.slice(),fx:0,fxprime:n.slice()};const r=n.slice();let o,c,f=1,u;s=s||{},u=s.maxIterations||n.length*20,e.fx=t(e.x,e.fxprime),o=e.fxprime.slice(),ht(o,e.fxprime,-1);for(let a=0;a<u;++a){if(f=ce(t,o,e,i,f),s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),!f)ht(o,e.fxprime,-1);else{Q(r,1,i.fxprime,-1,e.fxprime);const y=tt(e.fxprime,e.fxprime),d=Math.max(0,tt(r,i.fxprime)/y);Q(o,d,o,-1,i.fxprime),c=e,e=i,i=c}if(ut(e.fxprime)<=1e-5)break}return s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),e}function At(t,n={}){n.maxIterations=n.maxIterations||500;const s=n.initialLayout||ge,e=n.lossFunction||et,i=he(t,n),r=s(i,n),o=Object.keys(r),c=[];for(const a of o)c.push(r[a].x),c.push(r[a].y);const u=zt(a=>{const y={};for(let d=0;d<o.length;++d){const m=o[d];y[m]={x:a[2*d],y:a[2*d+1],radius:r[m].radius}}return e(y,i)},c,n).x;for(let a=0;a<o.length;++a){const y=o[a];r[y].x=u[2*a],r[y].y=u[2*a+1]}return r}const Rt=1e-10;function ft(t,n,s){return Math.min(t,n)*Math.min(t,n)*Math.PI<=s+Rt?Math.abs(t-n):le(e=>xt(t,n,e)-s,0,t+n)}function he(t,n={}){const s=n.distinct,e=t.map(c=>Object.assign({},c));function i(c){return c.join(";")}if(s){const c=new Map;for(const f of e)for(let u=0;u<f.sets.length;u++){const a=String(f.sets[u]);c.set(a,f.size+(c.get(a)||0));for(let y=u+1;y<f.sets.length;y++){const d=String(f.sets[y]),m=`${a};${d}`,x=`${d};${a}`;c.set(m,f.size+(c.get(m)||0)),c.set(x,f.size+(c.get(x)||0))}}for(const f of e)f.sets.length<3&&(f.size=c.get(i(f.sets)))}const r=[],o=new Set;for(const c of e)if(c.sets.length===1)r.push(c.sets[0]);else if(c.sets.length===2){const f=c.sets[0],u=c.sets[1];o.add(i(c.sets)),o.add(i([u,f]))}r.sort((c,f)=>c===f?0:c<f?-1:1);for(let c=0;c<r.length;++c){const f=r[c];for(let u=c+1;u<r.length;++u){const a=r[u];o.has(i([f,a]))||e.push({sets:[f,a],size:0})}}return e}function fe(t,n,s){const e=Mt(n.length,n.length),i=Mt(n.length,n.length);return t.filter(r=>r.sets.length===2).forEach(r=>{const o=s[r.sets[0]],c=s[r.sets[1]],f=Math.sqrt(n[o].size/Math.PI),u=Math.sqrt(n[c].size/Math.PI),a=ft(f,u,r.size);e[o][c]=e[c][o]=a;let y=0;r.size+1e-10>=Math.min(n[o].size,n[c].size)?y=1:r.size<=1e-10&&(y=-1),i[o][c]=i[c][o]=y}),{distances:e,constraints:i}}function de(t,n,s,e){for(let r=0;r<n.length;++r)n[r]=0;let i=0;for(let r=0;r<s.length;++r){const o=t[2*r],c=t[2*r+1];for(let f=r+1;f<s.length;++f){const u=t[2*f],a=t[2*f+1],y=s[r][f],d=e[r][f],m=(u-o)*(u-o)+(a-c)*(a-c),x=Math.sqrt(m),M=m-y*y;d>0&&x<=y||d<0&&x>=y||(i+=2*M*M,n[2*r]+=4*M*(o-u),n[2*r+1]+=4*M*(c-a),n[2*f]+=4*M*(u-o),n[2*f+1]+=4*M*(a-c))}}return i}function ge(t,n={}){let s=ye(t,n);const e=n.lossFunction||et;if(t.length>=8){const i=xe(t,n),r=e(i,t),o=e(s,t);r+1e-8<o&&(s=i)}return s}function xe(t,n={}){const s=n.restarts||10,e=[],i={};for(const d of t)d.sets.length===1&&(i[d.sets[0]]=e.length,e.push(d));let{distances:r,constraints:o}=fe(t,e,i);const c=ut(r.map(ut))/r.length;r=r.map(d=>d.map(m=>m/c));const f=(d,m)=>de(d,m,r,o);let u=null;for(let d=0;d<s;++d){const m=ct(r.length*2).map(Math.random),x=ue(f,m,n);(!u||x.fx<u.fx)&&(u=x)}const a=u.x,y={};for(let d=0;d<e.length;++d){const m=e[d];y[m.sets[0]]={x:a[2*d]*c,y:a[2*d+1]*c,radius:Math.sqrt(m.size/Math.PI)}}if(n.history)for(const d of n.history)ht(d.x,c);return y}function ye(t,n){const s=n&&n.lossFunction?n.lossFunction:et,e={},i={};for(const y of t)if(y.sets.length===1){const d=y.sets[0];e[d]={x:1e10,y:1e10,rowid:e.length,size:y.size,radius:Math.sqrt(y.size/Math.PI)},i[d]=[]}t=t.filter(y=>y.sets.length===2);for(const y of t){let d=y.weight!=null?y.weight:1;const m=y.sets[0],x=y.sets[1];y.size+Rt>=Math.min(e[m].size,e[x].size)&&(d=0),i[m].push({set:x,size:y.size,weight:d}),i[x].push({set:m,size:y.size,weight:d})}const r=[];Object.keys(i).forEach(y=>{let d=0;for(let m=0;m<i[y].length;++m)d+=i[y][m].size*i[y][m].weight;r.push({set:y,size:d})});function o(y,d){return d.size-y.size}r.sort(o);const c={};function f(y){return y.set in c}function u(y,d){e[d].x=y.x,e[d].y=y.y,c[d]=!0}u({x:0,y:0},r[0].set);for(let y=1;y<r.length;++y){const d=r[y].set,m=i[d].filter(f),x=e[d];if(m.sort(o),m.length===0)throw"ERROR: missing pairwise overlap information";const M=[];for(var a=0;a<m.length;++a){const w=e[m[a].set],g=ft(x.radius,w.radius,m[a].size);M.push({x:w.x+g,y:w.y}),M.push({x:w.x-g,y:w.y}),M.push({y:w.y+g,x:w.x}),M.push({y:w.y-g,x:w.x});for(let b=a+1;b<m.length;++b){const v=e[m[b].set],l=ft(x.radius,v.radius,m[b].size),p=Tt({x:w.x,y:w.y,radius:g},{x:v.x,y:v.y,radius:l});M.push(...p)}}let E=1e50,_=M[0];for(const w of M){e[d].x=w.x,e[d].y=w.y;const g=s(e,t);g<E&&(E=g,_=w)}u(_,d)}return e}function et(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const o=t[e.sets[0]],c=t[e.sets[1]];i=xt(o.radius,c.radius,W(o,c))}else i=st(e.sets.map(o=>t[o]));const r=e.weight!=null?e.weight:1;s+=r*(i-e.size)*(i-e.size)}return s}function Ct(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const c=t[e.sets[0]],f=t[e.sets[1]];i=xt(c.radius,f.radius,W(c,f))}else i=st(e.sets.map(c=>t[c]));const r=e.weight!=null?e.weight:1,o=Math.log((i+1)/(e.size+1));s+=r*o*o}return s}function pe(t,n,s){if(s==null?t.sort((i,r)=>r.radius-i.radius):t.sort(s),t.length>0){const i=t[0].x,r=t[0].y;for(const o of t)o.x-=i,o.y-=r}if(t.length===2&&W(t[0],t[1])<Math.abs(t[1].radius-t[0].radius)&&(t[1].x=t[0].x+t[0].radius-t[1].radius-1e-10,t[1].y=t[0].y),t.length>1){const i=Math.atan2(t[1].x,t[1].y)-n,r=Math.cos(i),o=Math.sin(i);for(const c of t){const f=c.x,u=c.y;c.x=r*f-o*u,c.y=o*f+r*u}}if(t.length>2){let i=Math.atan2(t[2].x,t[2].y)-n;for(;i<0;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI){const r=t[1].y/(1e-10+t[1].x);for(const o of t){var e=(o.x+r*o.y)/(1+r*r);o.x=2*e-o.x,o.y=2*e*r-o.y}}}}function me(t){t.forEach(i=>{i.parent=i});function n(i){return i.parent!==i&&(i.parent=n(i.parent)),i.parent}function s(i,r){const o=n(i),c=n(r);o.parent=c}for(let i=0;i<t.length;++i)for(let r=i+1;r<t.length;++r){const o=t[i].radius+t[r].radius;W(t[i],t[r])+1e-10<o&&s(t[r],t[i])}const e=new Map;for(let i=0;i<t.length;++i){const r=n(t[i]).parent.setid;e.has(r)||e.set(r,[]),e.get(r).push(t[i])}return t.forEach(i=>{delete i.parent}),Array.from(e.values())}function dt(t){const n=s=>{const e=t.reduce((r,o)=>Math.max(r,o[s]+o.radius),Number.NEGATIVE_INFINITY),i=t.reduce((r,o)=>Math.min(r,o[s]-o.radius),Number.POSITIVE_INFINITY);return{max:e,min:i}};return{xRange:n("x"),yRange:n("y")}}function Dt(t,n,s){n==null&&(n=Math.PI/2);let e=Ft(t).map(u=>Object.assign({},u));const i=me(e);for(const u of i){pe(u,n,s);const a=dt(u);u.size=(a.xRange.max-a.xRange.min)*(a.yRange.max-a.yRange.min),u.bounds=a}i.sort((u,a)=>a.size-u.size),e=i[0];let r=e.bounds;const o=(r.xRange.max-r.xRange.min)/50;function c(u,a,y){if(!u)return;const d=u.bounds;let m,x;if(a)m=r.xRange.max-d.xRange.min+o;else{m=r.xRange.max-d.xRange.max;const M=(d.xRange.max-d.xRange.min)/2-(r.xRange.max-r.xRange.min)/2;M<0&&(m+=M)}if(y)x=r.yRange.max-d.yRange.min+o;else{x=r.yRange.max-d.yRange.max;const M=(d.yRange.max-d.yRange.min)/2-(r.yRange.max-r.yRange.min)/2;M<0&&(x+=M)}for(const M of u)M.x+=m,M.y+=x,e.push(M)}let f=1;for(;f<i.length;)c(i[f],!0,!1),c(i[f+1],!1,!0),c(i[f+2],!0,!0),f+=3,r=dt(e);return Ot(e)}function Nt(t,n,s,e,i){const r=Ft(t);n-=2*e,s-=2*e;const{xRange:o,yRange:c}=dt(r);if(o.max===o.min||c.max===c.min)return console.log("not scaling solution: zero size detected"),t;let f,u;if(i){const m=Math.sqrt(i/Math.PI)*2;f=n/m,u=s/m}else f=n/(o.max-o.min),u=s/(c.max-c.min);const a=Math.min(u,f),y=(n-(o.max-o.min)*a)/2,d=(s-(c.max-c.min)*a)/2;return Ot(r.map(m=>({radius:a*m.radius,x:e+y+(m.x-o.min)*a,y:e+d+(m.y-c.min)*a,setid:m.setid})))}function Ot(t){const n={};for(const s of t)n[s.setid]=s;return n}function Ft(t){return Object.keys(t).map(s=>Object.assign(t[s],{setid:s}))}function be(t={}){let n=!1,s=600,e=350,i=15,r=1e3,o=Math.PI/2,c=!0,f=null,u=!0,a=!0,y=null,d=null,m=!1,x=null,M=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,E={},_=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],w=0,g=function(p){if(p in E)return E[p];var h=E[p]=_[w];return w+=1,w>=_.length&&(w=0),h},b=At,v=et;function l(p){let h=p.datum();const j=new Set;h.forEach(I=>{I.size==0&&I.sets.length==1&&j.add(I.sets[0])}),h=h.filter(I=>!I.sets.some(L=>j.has(L)));let k={},N={};if(h.length>0){let I=b(h,{lossFunction:v,distinct:m});c&&(I=Dt(I,o,d)),k=Nt(I,s,e,i,f),N=jt(k,h,M)}const Y={};h.forEach(I=>{I.label&&(Y[I.sets]=I.label)});function B(I){if(I.sets in Y)return Y[I.sets];if(I.sets.length==1)return""+I.sets[0]}p.selectAll("svg").data([k]).enter().append("svg");const U=p.select("svg");n?U.attr("viewBox",`0 0 ${s} ${e}`):U.attr("width",s).attr("height",e);const q={};let z=!1;U.selectAll(".venn-area path").each(function(I){const L=this.getAttribute("d");I.sets.length==1&&L&&!m&&(z=!0,q[I.sets[0]]=ke(L))});function A(I){return L=>{const G=I.sets.map(Z=>{let H=q[Z],J=k[Z];return H||(H={x:s/2,y:e/2,radius:1}),J||(J={x:s/2,y:e/2,radius:1}),{x:H.x*(1-L)+J.x*L,y:H.y*(1-L)+J.y*L,radius:H.radius*(1-L)+J.radius*L}});return wt(G,x)}}const C=U.selectAll(".venn-area").data(h,I=>I.sets),O=C.enter().append("g").attr("class",I=>`venn-area venn-${I.sets.length==1?"circle":"intersection"}${I.colour||I.color?" venn-coloured":""}`).attr("data-venn-sets",I=>I.sets.join("_")),P=O.append("path"),V=O.append("text").attr("class","label").text(I=>B(I)).attr("text-anchor","middle").attr("dy",".35em").attr("x",s/2).attr("y",e/2);a&&(P.style("fill-opacity","0").filter(I=>I.sets.length==1).style("fill",I=>I.colour?I.colour:I.color?I.color:g(I.sets)).style("fill-opacity",".25"),V.style("fill",I=>I.colour||I.color?"#FFF":t.textFill?t.textFill:I.sets.length==1?g(I.sets):"#444"));function R(I){return typeof I.transition=="function"?I.transition("venn").duration(r):I}let T=p;z&&typeof T.transition=="function"?(T=R(p),T.selectAll("path").attrTween("d",A)):T.selectAll("path").attr("d",I=>wt(I.sets.map(L=>k[L])),x);const F=T.selectAll("text").filter(I=>I.sets in N).text(I=>B(I)).attr("x",I=>Math.floor(N[I.sets].x)).attr("y",I=>Math.floor(N[I.sets].y));u&&(z?"on"in F?F.on("end",ot(k,B)):F.each("end",ot(k,B)):F.each(ot(k,B)));const D=R(C.exit()).remove();typeof C.transition=="function"&&D.selectAll("path").attrTween("d",A);const X=D.selectAll("text").attr("x",s/2).attr("y",e/2);return y!==null&&(V.style("font-size","0px"),F.style("font-size",y),X.style("font-size","0px")),{circles:k,textCentres:N,nodes:C,enter:O,update:T,exit:D}}return l.wrap=function(p){return arguments.length?(u=p,l):u},l.useViewBox=function(){return n=!0,l},l.width=function(p){return arguments.length?(s=p,l):s},l.height=function(p){return arguments.length?(e=p,l):e},l.padding=function(p){return arguments.length?(i=p,l):i},l.distinct=function(p){return arguments.length?(m=p,l):m},l.colours=function(p){return arguments.length?(g=p,l):g},l.colors=function(p){return arguments.length?(g=p,l):g},l.fontSize=function(p){return arguments.length?(y=p,l):y},l.round=function(p){return arguments.length?(x=p,l):x},l.duration=function(p){return arguments.length?(r=p,l):r},l.layoutFunction=function(p){return arguments.length?(b=p,l):b},l.normalize=function(p){return arguments.length?(c=p,l):c},l.scaleToFit=function(p){return arguments.length?(f=p,l):f},l.styled=function(p){return arguments.length?(a=p,l):a},l.orientation=function(p){return arguments.length?(o=p,l):o},l.orientationOrder=function(p){return arguments.length?(d=p,l):d},l.lossFunction=function(p){return arguments.length?(v=p==="default"?et:p==="logRatio"?Ct:p,l):v},l}function ot(t,n){return function(s){const e=this,i=t[s.sets[0]].radius||50,r=n(s)||"",o=r.split(/\s+/).reverse(),f=(r.length+o.length)/3;let u=o.pop(),a=[u],y=0;const d=1.1;e.textContent=null;const m=[];function x(g){const b=e.ownerDocument.createElementNS(e.namespaceURI,"tspan");return b.textContent=g,m.push(b),e.append(b),b}let M=x(u);for(;u=o.pop(),!!u;){a.push(u);const g=a.join(" ");M.textContent=g,g.length>f&&M.getComputedTextLength()>i&&(a.pop(),M.textContent=a.join(" "),a=[u],M=x(u),y++)}const E=.35-y*d/2,_=e.getAttribute("x"),w=e.getAttribute("y");m.forEach((g,b)=>{g.setAttribute("x",_),g.setAttribute("y",w),g.setAttribute("dy",`${E+b*d}em`)})}}function at(t,n,s){let e=n[0].radius-W(n[0],t);for(let i=1;i<n.length;++i){const r=n[i].radius-W(n[i],t);r<=e&&(e=r)}for(let i=0;i<s.length;++i){const r=W(s[i],t)-s[i].radius;r<=e&&(e=r)}return e}function Lt(t,n,s){const e=[];for(const a of t)e.push({x:a.x,y:a.y}),e.push({x:a.x+a.radius/2,y:a.y}),e.push({x:a.x-a.radius/2,y:a.y}),e.push({x:a.x,y:a.y+a.radius/2}),e.push({x:a.x,y:a.y-a.radius/2});let i=e[0],r=at(e[0],t,n);for(let a=1;a<e.length;++a){const y=at(e[a],t,n);y>=r&&(i=e[a],r=y)}const o=zt(a=>-1*at({x:a[0],y:a[1]},t,n),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,c={x:s?0:o[0],y:o[1]};let f=!0;for(const a of t)if(W(c,a)>a.radius){f=!1;break}for(const a of n)if(W(c,a)<a.radius){f=!1;break}if(f)return c;if(t.length==1)return{x:t[0].x,y:t[0].y};const u={};return st(t,u),u.arcs.length===0?{x:0,y:-1e3,disjoint:!0}:u.arcs.length==1?{x:u.arcs[0].circle.x,y:u.arcs[0].circle.y}:n.length?Lt(t,[]):Et(u.arcs.map(a=>a.p1))}function ve(t){const n={},s=Object.keys(t);for(const e of s)n[e]=[];for(let e=0;e<s.length;e++){const i=s[e],r=t[i];for(let o=e+1;o<s.length;++o){const c=s[o],f=t[c],u=W(r,f);u+f.radius<=r.radius+1e-10?n[c].push(i):u+r.radius<=f.radius+1e-10&&n[i].push(c)}}return n}function jt(t,n,s){const e={},i=ve(t);for(let r=0;r<n.length;++r){const o=n[r].sets,c={},f={};for(let d=0;d<o.length;++d){c[o[d]]=!0;const m=i[o[d]];for(let x=0;x<m.length;++x)f[m[x]]=!0}const u=[],a=[];for(let d in t)d in c?u.push(t[d]):d in f||a.push(t[d]);const y=Lt(u,a,s);e[o]=y,y.disjoint&&n[r].size>0&&console.log("WARNING: area "+o+" not represented on screen")}return e}function Ie(t,n,s){const e=[];return e.push(`
2
2
  M`,t,n),e.push(`
3
3
  m`,-s,0),e.push(`
4
4
  a`,s,s,0,1,0,s*2,0),e.push(`
@@ -1,4 +1,4 @@
1
- import{s as Lt,g as zt,t as Tt,q as At,a as Xt,b as Et,_ as y,a1 as Yt,F as It,H as Q,l as et,L as Ft,e as Bt,A as Rt,c as V}from"./mermaid.core-BWfn-FFw.js";import{p as Ot}from"./chunk-4BX2VUAB-BOCw1xVb.js";import{p as Wt}from"./cynefin-OW5HDTMX-C-fnPT_y.js";import"./index-BKJW0i9Q.js";import"./vendor-vue-Ci9TYO_I.js";var G=y((a,o)=>{const e=a<=1?a*100:a;if(e<0||e>100)throw new Error(`${o} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${a}`);return e},"toPercent"),E=y((a,o,e)=>({x:G(o,`${e} evolution`),y:G(a,`${e} visibility`)}),"toCoordinates"),tt=y(a=>{if(a){if(a==="+<>")return"bidirectional";if(a==="+<")return"backward";if(a==="+>")return"forward"}},"getFlowFromPort"),Dt=y(a=>{if(!(a!=null&&a.startsWith("+")))return{};const o=/^\+'([^']*)'/.exec(a),e=o==null?void 0:o[1];return a.includes("<>")?{flow:"bidirectional",label:e}:a.includes("<")?{flow:"backward",label:e}:a.includes(">")?{flow:"forward",label:e}:{label:e}},"extractFlowFromArrow"),Gt=y((a,o)=>{if(Ot(a,o),a.size&&o.setSize(a.size.width,a.size.height),a.evolution){const e=a.evolution.stages.map(r=>r.secondName?`${r.name.trim()} / ${r.secondName.trim()}`:r.name.trim()),p=a.evolution.stages.filter(r=>r.boundary!==void 0).map(r=>r.boundary);o.updateAxes({stages:e,stageBoundaries:p})}if(a.anchors.forEach(e=>{const p=E(e.visibility,e.evolution,`Anchor "${e.name}"`);o.addNode(e.name,e.name,p.x,p.y,"anchor")}),a.components.forEach(e=>{var v;const p=E(e.visibility,e.evolution,`Component "${e.name}"`),r=e.label?(e.label.negX?-1:1)*e.label.offsetX:void 0,d=e.label?(e.label.negY?-1:1)*e.label.offsetY:void 0,m=(v=e.decorator)==null?void 0:v.strategy;o.addNode(e.name,e.name,p.x,p.y,"component",r,d,e.inertia,m)}),a.notes.forEach(e=>{const p=E(e.visibility,e.evolution,`Note "${e.text}"`);o.addNote(e.text,p.x,p.y)}),a.pipelines.forEach(e=>{const p=o.getNode(e.parent);if(!p||typeof p.y!="number")throw new Error(`Pipeline "${e.parent}" must reference an existing component with coordinates.`);const r=p.y;o.startPipeline(e.parent),e.components.forEach(d=>{const m=`${e.parent}_${d.name}`,v=d.label?(d.label.negX?-1:1)*d.label.offsetX:void 0,g=d.label?(d.label.negY?-1:1)*d.label.offsetY:void 0,z=G(d.evolution,`Pipeline component "${d.name}" evolution`);o.addNode(m,d.name,z,r,"pipeline-component",v,g),o.addPipelineComponent(e.parent,m)})}),a.links.forEach(e=>{const p=!!e.arrow&&(e.arrow.includes("-.->")||e.arrow.includes(".-."));let r=tt(e.fromPort)??tt(e.toPort);const{flow:d,label:m}=Dt(e.arrow);!r&&d&&(r=d);const v=e.linkLabel,g=m??v;o.addLink(o.resolveNodeId(e.from),o.resolveNodeId(e.to),p,g,r)}),a.evolves.forEach(e=>{const p=o.getNode(e.component);if((p==null?void 0:p.y)!==void 0){const r=G(e.target,`Evolve target for "${e.component}"`);o.addTrend(e.component,r,p.y)}}),a.annotations.length>0){const e=a.annotations[0],p=E(e.x,e.y,"Annotations box");o.setAnnotationsBox(p.x,p.y)}a.annotation.forEach(e=>{const p=E(e.x,e.y,`Annotation ${e.number}`);o.addAnnotation(e.number,[{x:p.x,y:p.y}],e.text)}),a.accelerators.forEach(e=>{const p=E(e.x,e.y,`Accelerator "${e.name}"`);o.addAccelerator(e.name,p.x,p.y)}),a.deaccelerators.forEach(e=>{const p=E(e.x,e.y,`Deaccelerator "${e.name}"`);o.addDeaccelerator(e.name,p.x,p.y)})},"populateDb"),at={parser:{yy:void 0},parse:y(async a=>{var p;const o=await Wt("wardley",a);et.debug(o);const e=(p=at.parser)==null?void 0:p.yy;if(!e||typeof e.addNode!="function")throw new Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Gt(o,e)},"parse")},I,qt=(I=class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}addNode(o){const e=this.nodes.get(o.id)??{id:o.id,label:o.label},p={...e,...o,className:o.className??e.className,labelOffsetX:o.labelOffsetX??e.labelOffsetX,labelOffsetY:o.labelOffsetY??e.labelOffsetY};this.nodes.set(o.id,p)}addLink(o){this.links.push(o)}addTrend(o){this.trends.set(o.nodeId,o)}startPipeline(o){this.pipelines.set(o,{nodeId:o,componentIds:[]});const e=this.nodes.get(o);e&&(e.isPipelineParent=!0)}addPipelineComponent(o,e){const p=this.pipelines.get(o);p&&p.componentIds.push(e);const r=this.nodes.get(e);r&&(r.inPipeline=!0)}addAnnotation(o){this.annotations.push(o)}addNote(o){this.notes.push(o)}addAccelerator(o){this.accelerators.push(o)}addDeaccelerator(o){this.deaccelerators.push(o)}setAnnotationsBox(o,e){this.annotationsBox={x:o,y:e}}setAxes(o){this.axes={...this.axes,...o}}setSize(o,e){this.size={width:o,height:e}}getNode(o){return this.nodes.get(o)}resolveNodeId(o){if(this.nodes.has(o))return o;for(const[e,p]of this.nodes)if(p.label===o)return e;return o}build(){const o=[];for(const e of this.nodes.values()){if(typeof e.x!="number"||typeof e.y!="number")throw new Error(`Node "${e.label}" is missing coordinates`);o.push(e)}return{nodes:o,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}},y(I,"WardleyBuilder"),I),b=new qt;function rt(){return V()["wardley-beta"]}y(rt,"getConfig");function ot(a,o,e,p,r,d,m,v,g){b.addNode({id:a,label:o,x:e,y:p,className:r,labelOffsetX:d,labelOffsetY:m,inertia:v,sourceStrategy:g})}y(ot,"addNode");function st(a,o,e=!1,p,r){b.addLink({source:a,target:o,dashed:e,label:p,flow:r})}y(st,"addLink");function nt(a,o,e){b.addTrend({nodeId:a,targetX:o,targetY:e})}y(nt,"addTrend");function it(a,o,e){b.addAnnotation({number:a,coordinates:o,text:e})}y(it,"addAnnotation");function dt(a,o,e){b.addNote({text:a,x:o,y:e})}y(dt,"addNote");function lt(a,o,e){b.addAccelerator({name:a,x:o,y:e})}y(lt,"addAccelerator");function ct(a,o,e){b.addDeaccelerator({name:a,x:o,y:e})}y(ct,"addDeaccelerator");function pt(a,o){b.setAnnotationsBox(a,o)}y(pt,"setAnnotationsBox");function ht(a,o){b.setSize(a,o)}y(ht,"setSize");function xt(a){b.startPipeline(a)}y(xt,"startPipeline");function ft(a,o){b.addPipelineComponent(a,o)}y(ft,"addPipelineComponent");function gt(a){b.setAxes(a)}y(gt,"updateAxes");function ut(a){return b.getNode(a)}y(ut,"getNode");function yt(a){return b.resolveNodeId(a)}y(yt,"resolveNodeId");function mt(){return b.build()}y(mt,"getWardleyData");function wt(){b.clear(),Rt()}y(wt,"clear");var Ht={getConfig:rt,addNode:ot,addLink:st,addTrend:nt,addAnnotation:it,addNote:dt,addAccelerator:lt,addDeaccelerator:ct,setAnnotationsBox:pt,setSize:ht,startPipeline:xt,addPipelineComponent:ft,updateAxes:gt,getNode:ut,resolveNodeId:yt,getWardleyData:mt,clear:wt,setAccTitle:Et,getAccTitle:Xt,setDiagramTitle:At,getDiagramTitle:Tt,getAccDescription:zt,setAccDescription:Lt},jt=["Genesis","Custom Built","Product","Commodity"],Vt=y(()=>{var o,e,p,r,d,m,v,g,z,M,k,N;const{themeVariables:a}=V();return{backgroundColor:((o=a.wardley)==null?void 0:o.backgroundColor)??a.background??"#fff",axisColor:((e=a.wardley)==null?void 0:e.axisColor)??"#000",axisTextColor:((p=a.wardley)==null?void 0:p.axisTextColor)??a.primaryTextColor??"#222",gridColor:((r=a.wardley)==null?void 0:r.gridColor)??"rgba(100, 100, 100, 0.2)",componentFill:((d=a.wardley)==null?void 0:d.componentFill)??"#fff",componentStroke:((m=a.wardley)==null?void 0:m.componentStroke)??"#000",componentLabelColor:((v=a.wardley)==null?void 0:v.componentLabelColor)??a.primaryTextColor??"#222",linkStroke:((g=a.wardley)==null?void 0:g.linkStroke)??"#000",evolutionStroke:((z=a.wardley)==null?void 0:z.evolutionStroke)??"#dc3545",annotationStroke:((M=a.wardley)==null?void 0:M.annotationStroke)??"#000",annotationTextColor:((k=a.wardley)==null?void 0:k.annotationTextColor)??a.primaryTextColor??"#222",annotationFill:((N=a.wardley)==null?void 0:N.annotationFill)??a.background??"#fff"}},"getTheme"),_t=y(()=>{const a=V()["wardley-beta"];return{width:(a==null?void 0:a.width)??900,height:(a==null?void 0:a.height)??600,padding:(a==null?void 0:a.padding)??48,nodeRadius:(a==null?void 0:a.nodeRadius)??6,nodeLabelOffset:(a==null?void 0:a.nodeLabelOffset)??8,axisFontSize:(a==null?void 0:a.axisFontSize)??12,labelFontSize:(a==null?void 0:a.labelFontSize)??10,showGrid:(a==null?void 0:a.showGrid)??!1,useMaxWidth:(a==null?void 0:a.useMaxWidth)??!0}},"getConfigValues"),Zt=y((a,o,e,p)=>{var J,K;et.debug(`Rendering Wardley map
1
+ import{s as Lt,g as zt,t as Tt,q as At,a as Xt,b as Et,_ as y,a1 as Yt,F as It,H as Q,l as et,L as Ft,e as Bt,A as Rt,c as V}from"./mermaid.core-CugqmqyM.js";import{p as Ot}from"./chunk-4BX2VUAB-CejcY-GR.js";import{p as Wt}from"./cynefin-OW5HDTMX-CyjwQKcB.js";import"./index-e9nl1Jp1.js";import"./vendor-vue-Ci9TYO_I.js";var G=y((a,o)=>{const e=a<=1?a*100:a;if(e<0||e>100)throw new Error(`${o} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${a}`);return e},"toPercent"),E=y((a,o,e)=>({x:G(o,`${e} evolution`),y:G(a,`${e} visibility`)}),"toCoordinates"),tt=y(a=>{if(a){if(a==="+<>")return"bidirectional";if(a==="+<")return"backward";if(a==="+>")return"forward"}},"getFlowFromPort"),Dt=y(a=>{if(!(a!=null&&a.startsWith("+")))return{};const o=/^\+'([^']*)'/.exec(a),e=o==null?void 0:o[1];return a.includes("<>")?{flow:"bidirectional",label:e}:a.includes("<")?{flow:"backward",label:e}:a.includes(">")?{flow:"forward",label:e}:{label:e}},"extractFlowFromArrow"),Gt=y((a,o)=>{if(Ot(a,o),a.size&&o.setSize(a.size.width,a.size.height),a.evolution){const e=a.evolution.stages.map(r=>r.secondName?`${r.name.trim()} / ${r.secondName.trim()}`:r.name.trim()),p=a.evolution.stages.filter(r=>r.boundary!==void 0).map(r=>r.boundary);o.updateAxes({stages:e,stageBoundaries:p})}if(a.anchors.forEach(e=>{const p=E(e.visibility,e.evolution,`Anchor "${e.name}"`);o.addNode(e.name,e.name,p.x,p.y,"anchor")}),a.components.forEach(e=>{var v;const p=E(e.visibility,e.evolution,`Component "${e.name}"`),r=e.label?(e.label.negX?-1:1)*e.label.offsetX:void 0,d=e.label?(e.label.negY?-1:1)*e.label.offsetY:void 0,m=(v=e.decorator)==null?void 0:v.strategy;o.addNode(e.name,e.name,p.x,p.y,"component",r,d,e.inertia,m)}),a.notes.forEach(e=>{const p=E(e.visibility,e.evolution,`Note "${e.text}"`);o.addNote(e.text,p.x,p.y)}),a.pipelines.forEach(e=>{const p=o.getNode(e.parent);if(!p||typeof p.y!="number")throw new Error(`Pipeline "${e.parent}" must reference an existing component with coordinates.`);const r=p.y;o.startPipeline(e.parent),e.components.forEach(d=>{const m=`${e.parent}_${d.name}`,v=d.label?(d.label.negX?-1:1)*d.label.offsetX:void 0,g=d.label?(d.label.negY?-1:1)*d.label.offsetY:void 0,z=G(d.evolution,`Pipeline component "${d.name}" evolution`);o.addNode(m,d.name,z,r,"pipeline-component",v,g),o.addPipelineComponent(e.parent,m)})}),a.links.forEach(e=>{const p=!!e.arrow&&(e.arrow.includes("-.->")||e.arrow.includes(".-."));let r=tt(e.fromPort)??tt(e.toPort);const{flow:d,label:m}=Dt(e.arrow);!r&&d&&(r=d);const v=e.linkLabel,g=m??v;o.addLink(o.resolveNodeId(e.from),o.resolveNodeId(e.to),p,g,r)}),a.evolves.forEach(e=>{const p=o.getNode(e.component);if((p==null?void 0:p.y)!==void 0){const r=G(e.target,`Evolve target for "${e.component}"`);o.addTrend(e.component,r,p.y)}}),a.annotations.length>0){const e=a.annotations[0],p=E(e.x,e.y,"Annotations box");o.setAnnotationsBox(p.x,p.y)}a.annotation.forEach(e=>{const p=E(e.x,e.y,`Annotation ${e.number}`);o.addAnnotation(e.number,[{x:p.x,y:p.y}],e.text)}),a.accelerators.forEach(e=>{const p=E(e.x,e.y,`Accelerator "${e.name}"`);o.addAccelerator(e.name,p.x,p.y)}),a.deaccelerators.forEach(e=>{const p=E(e.x,e.y,`Deaccelerator "${e.name}"`);o.addDeaccelerator(e.name,p.x,p.y)})},"populateDb"),at={parser:{yy:void 0},parse:y(async a=>{var p;const o=await Wt("wardley",a);et.debug(o);const e=(p=at.parser)==null?void 0:p.yy;if(!e||typeof e.addNode!="function")throw new Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Gt(o,e)},"parse")},I,qt=(I=class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}addNode(o){const e=this.nodes.get(o.id)??{id:o.id,label:o.label},p={...e,...o,className:o.className??e.className,labelOffsetX:o.labelOffsetX??e.labelOffsetX,labelOffsetY:o.labelOffsetY??e.labelOffsetY};this.nodes.set(o.id,p)}addLink(o){this.links.push(o)}addTrend(o){this.trends.set(o.nodeId,o)}startPipeline(o){this.pipelines.set(o,{nodeId:o,componentIds:[]});const e=this.nodes.get(o);e&&(e.isPipelineParent=!0)}addPipelineComponent(o,e){const p=this.pipelines.get(o);p&&p.componentIds.push(e);const r=this.nodes.get(e);r&&(r.inPipeline=!0)}addAnnotation(o){this.annotations.push(o)}addNote(o){this.notes.push(o)}addAccelerator(o){this.accelerators.push(o)}addDeaccelerator(o){this.deaccelerators.push(o)}setAnnotationsBox(o,e){this.annotationsBox={x:o,y:e}}setAxes(o){this.axes={...this.axes,...o}}setSize(o,e){this.size={width:o,height:e}}getNode(o){return this.nodes.get(o)}resolveNodeId(o){if(this.nodes.has(o))return o;for(const[e,p]of this.nodes)if(p.label===o)return e;return o}build(){const o=[];for(const e of this.nodes.values()){if(typeof e.x!="number"||typeof e.y!="number")throw new Error(`Node "${e.label}" is missing coordinates`);o.push(e)}return{nodes:o,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}},y(I,"WardleyBuilder"),I),b=new qt;function rt(){return V()["wardley-beta"]}y(rt,"getConfig");function ot(a,o,e,p,r,d,m,v,g){b.addNode({id:a,label:o,x:e,y:p,className:r,labelOffsetX:d,labelOffsetY:m,inertia:v,sourceStrategy:g})}y(ot,"addNode");function st(a,o,e=!1,p,r){b.addLink({source:a,target:o,dashed:e,label:p,flow:r})}y(st,"addLink");function nt(a,o,e){b.addTrend({nodeId:a,targetX:o,targetY:e})}y(nt,"addTrend");function it(a,o,e){b.addAnnotation({number:a,coordinates:o,text:e})}y(it,"addAnnotation");function dt(a,o,e){b.addNote({text:a,x:o,y:e})}y(dt,"addNote");function lt(a,o,e){b.addAccelerator({name:a,x:o,y:e})}y(lt,"addAccelerator");function ct(a,o,e){b.addDeaccelerator({name:a,x:o,y:e})}y(ct,"addDeaccelerator");function pt(a,o){b.setAnnotationsBox(a,o)}y(pt,"setAnnotationsBox");function ht(a,o){b.setSize(a,o)}y(ht,"setSize");function xt(a){b.startPipeline(a)}y(xt,"startPipeline");function ft(a,o){b.addPipelineComponent(a,o)}y(ft,"addPipelineComponent");function gt(a){b.setAxes(a)}y(gt,"updateAxes");function ut(a){return b.getNode(a)}y(ut,"getNode");function yt(a){return b.resolveNodeId(a)}y(yt,"resolveNodeId");function mt(){return b.build()}y(mt,"getWardleyData");function wt(){b.clear(),Rt()}y(wt,"clear");var Ht={getConfig:rt,addNode:ot,addLink:st,addTrend:nt,addAnnotation:it,addNote:dt,addAccelerator:lt,addDeaccelerator:ct,setAnnotationsBox:pt,setSize:ht,startPipeline:xt,addPipelineComponent:ft,updateAxes:gt,getNode:ut,resolveNodeId:yt,getWardleyData:mt,clear:wt,setAccTitle:Et,getAccTitle:Xt,setDiagramTitle:At,getDiagramTitle:Tt,getAccDescription:zt,setAccDescription:Lt},jt=["Genesis","Custom Built","Product","Commodity"],Vt=y(()=>{var o,e,p,r,d,m,v,g,z,M,k,N;const{themeVariables:a}=V();return{backgroundColor:((o=a.wardley)==null?void 0:o.backgroundColor)??a.background??"#fff",axisColor:((e=a.wardley)==null?void 0:e.axisColor)??"#000",axisTextColor:((p=a.wardley)==null?void 0:p.axisTextColor)??a.primaryTextColor??"#222",gridColor:((r=a.wardley)==null?void 0:r.gridColor)??"rgba(100, 100, 100, 0.2)",componentFill:((d=a.wardley)==null?void 0:d.componentFill)??"#fff",componentStroke:((m=a.wardley)==null?void 0:m.componentStroke)??"#000",componentLabelColor:((v=a.wardley)==null?void 0:v.componentLabelColor)??a.primaryTextColor??"#222",linkStroke:((g=a.wardley)==null?void 0:g.linkStroke)??"#000",evolutionStroke:((z=a.wardley)==null?void 0:z.evolutionStroke)??"#dc3545",annotationStroke:((M=a.wardley)==null?void 0:M.annotationStroke)??"#000",annotationTextColor:((k=a.wardley)==null?void 0:k.annotationTextColor)??a.primaryTextColor??"#222",annotationFill:((N=a.wardley)==null?void 0:N.annotationFill)??a.background??"#fff"}},"getTheme"),_t=y(()=>{const a=V()["wardley-beta"];return{width:(a==null?void 0:a.width)??900,height:(a==null?void 0:a.height)??600,padding:(a==null?void 0:a.padding)??48,nodeRadius:(a==null?void 0:a.nodeRadius)??6,nodeLabelOffset:(a==null?void 0:a.nodeLabelOffset)??8,axisFontSize:(a==null?void 0:a.axisFontSize)??12,labelFontSize:(a==null?void 0:a.labelFontSize)??10,showGrid:(a==null?void 0:a.showGrid)??!1,useMaxWidth:(a==null?void 0:a.useMaxWidth)??!0}},"getConfigValues"),Zt=y((a,o,e,p)=>{var J,K;et.debug(`Rendering Wardley map
2
2
  `+a);const r=_t(),d=Vt(),m=r.nodeRadius*1.6,v=p.db,g=v.getWardleyData(),z=v.getDiagramTitle(),M=((J=g.size)==null?void 0:J.width)??r.width,k=((K=g.size)==null?void 0:K.height)??r.height,N=Ft(o);N.selectAll("*").remove(),Bt(N,k,M,r.useMaxWidth),N.attr("viewBox",`0 0 ${M} ${k}`);const P=N.append("g").attr("class","wardley-map"),q=N.append("defs");q.append("marker").attr("id",`arrow-${o}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.evolutionStroke).attr("stroke","none"),q.append("marker").attr("id",`link-arrow-end-${o}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.linkStroke).attr("stroke","none"),q.append("marker").attr("id",`link-arrow-start-${o}`).attr("viewBox","0 0 10 10").attr("refX",1).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z").attr("fill",d.linkStroke).attr("stroke","none"),P.append("rect").attr("class","wardley-background").attr("width",M).attr("height",k).attr("fill",d.backgroundColor);const F=M-r.padding*2,B=k-r.padding*2;z&&P.append("text").attr("class","wardley-title").attr("x",M/2).attr("y",r.padding/2).attr("fill",d.axisTextColor).attr("font-size",r.axisFontSize*1.05).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(z);const T=y(t=>r.padding+t/100*F,"projectX"),A=y(t=>k-r.padding-t/100*B,"projectY"),O=P.append("g").attr("class","wardley-axes");O.append("line").attr("x1",r.padding).attr("x2",M-r.padding).attr("y1",k-r.padding).attr("y2",k-r.padding).attr("stroke",d.axisColor).attr("stroke-width",1),O.append("line").attr("x1",r.padding).attr("x2",r.padding).attr("y1",r.padding).attr("y2",k-r.padding).attr("stroke",d.axisColor).attr("stroke-width",1);const kt=g.axes.xLabel??"Evolution",bt=g.axes.yLabel??"Visibility";O.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",r.padding+F/2).attr("y",k-r.padding/4).attr("fill",d.axisTextColor).attr("font-size",r.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(kt),O.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",r.padding/3).attr("y",r.padding+B/2).attr("fill",d.axisTextColor).attr("font-size",r.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${r.padding/3} ${r.padding+B/2})`).text(bt);const R=g.axes.stages&&g.axes.stages.length>0?g.axes.stages:jt;if(R.length>0){const t=P.append("g").attr("class","wardley-stages"),n=g.axes.stageBoundaries,s=[];if(n&&n.length===R.length){let i=0;n.forEach(h=>{s.push({start:i,end:h}),i=h})}else{const i=1/R.length;R.forEach((h,l)=>{s.push({start:l*i,end:(l+1)*i})})}R.forEach((i,h)=>{const l=s[h],x=r.padding+l.start*F,f=r.padding+l.end*F,u=(x+f)/2;h>0&&t.append("line").attr("x1",x).attr("x2",x).attr("y1",r.padding).attr("y2",k-r.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",.8),t.append("text").attr("class","wardley-stage-label").attr("x",u).attr("y",k-r.padding/1.5).attr("fill",d.axisTextColor).attr("font-size",r.axisFontSize-2).attr("text-anchor","middle").text(i)})}if(r.showGrid){const t=P.append("g").attr("class","wardley-grid");for(let n=1;n<4;n++){const s=n/4,i=r.padding+F*s;t.append("line").attr("x1",i).attr("x2",i).attr("y1",r.padding).attr("y2",k-r.padding).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6"),t.append("line").attr("x1",r.padding).attr("x2",M-r.padding).attr("y1",k-r.padding-B*s).attr("y2",k-r.padding-B*s).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6")}}const c=new Map;if(g.nodes.forEach(t=>{c.set(t.id,{x:T(t.x),y:A(t.y),node:t})}),g.pipelines.length>0){const t=P.append("g").attr("class","wardley-pipelines"),n=P.append("g").attr("class","wardley-pipeline-links");g.pipelines.forEach(s=>{if(s.componentIds.length===0)return;const i=s.componentIds.map(f=>({id:f,pos:c.get(f),node:g.nodes.find(u=>u.id===f)})).filter(f=>f.pos&&f.node).sort((f,u)=>f.node.x-u.node.x);for(let f=0;f<i.length-1;f++){const u=i[f],w=i[f+1];n.append("line").attr("class","wardley-pipeline-evolution-link").attr("x1",u.pos.x).attr("y1",u.pos.y).attr("x2",w.pos.x).attr("y2",w.pos.y).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4")}let h=1/0,l=-1/0,x=0;if(s.componentIds.forEach(f=>{const u=c.get(f);u&&(h=Math.min(h,u.x),l=Math.max(l,u.x),x=u.y)}),h!==1/0&&l!==-1/0){const u=r.nodeRadius*4,w=x-u/2,S=c.get(s.nodeId);if(S){const L=(h+l)/2;S.x=L,S.y=w-m/6}t.append("rect").attr("class","wardley-pipeline-box").attr("x",h-15).attr("y",w).attr("width",l-h+30).attr("height",u).attr("fill","none").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}const _=P.append("g").attr("class","wardley-links"),Z=new Map;g.pipelines.forEach(t=>{Z.set(t.nodeId,new Set(t.componentIds))});const U=g.links.filter(t=>{if(!c.has(t.source)||!c.has(t.target))return!1;const n=Z.get(t.target);return!(n!=null&&n.has(t.source))});_.selectAll("line").data(U).enter().append("line").attr("class",t=>`wardley-link${t.dashed?" wardley-link--dashed":""}`).attr("x1",t=>{const n=c.get(t.source),s=c.get(t.target),h=g.nodes.find(u=>u.id===t.source).isPipelineParent?m/Math.sqrt(2):r.nodeRadius,l=s.x-n.x,x=s.y-n.y,f=Math.sqrt(l*l+x*x);return n.x+l/f*h}).attr("y1",t=>{const n=c.get(t.source),s=c.get(t.target),h=g.nodes.find(u=>u.id===t.source).isPipelineParent?m/Math.sqrt(2):r.nodeRadius,l=s.x-n.x,x=s.y-n.y,f=Math.sqrt(l*l+x*x);return n.y+x/f*h}).attr("x2",t=>{const n=c.get(t.source),s=c.get(t.target),h=g.nodes.find(u=>u.id===t.target).isPipelineParent?m/Math.sqrt(2):r.nodeRadius,l=n.x-s.x,x=n.y-s.y,f=Math.sqrt(l*l+x*x);return s.x+l/f*h}).attr("y2",t=>{const n=c.get(t.source),s=c.get(t.target),h=g.nodes.find(u=>u.id===t.target).isPipelineParent?m/Math.sqrt(2):r.nodeRadius,l=n.x-s.x,x=n.y-s.y,f=Math.sqrt(l*l+x*x);return s.y+x/f*h}).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",t=>t.dashed?"6 6":null).attr("marker-end",t=>t.flow==="forward"||t.flow==="bidirectional"?`url(#link-arrow-end-${o})`:null).attr("marker-start",t=>t.flow==="backward"||t.flow==="bidirectional"?`url(#link-arrow-start-${o})`:null),_.selectAll("text").data(U.filter(t=>t.label)).enter().append("text").attr("class","wardley-link-label").attr("x",t=>{const n=c.get(t.source),s=c.get(t.target),i=(n.x+s.x)/2,h=s.y-n.y,l=s.x-n.x,x=Math.sqrt(l*l+h*h),f=8,u=h/x;return i+u*f}).attr("y",t=>{const n=c.get(t.source),s=c.get(t.target),i=(n.y+s.y)/2,h=s.x-n.x,l=s.y-n.y,x=Math.sqrt(h*h+l*l),f=8,u=-h/x;return i+u*f}).attr("fill",d.axisTextColor).attr("font-size",r.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",t=>{const n=c.get(t.source),s=c.get(t.target),i=(n.x+s.x)/2,h=(n.y+s.y)/2,l=s.x-n.x,x=s.y-n.y,f=Math.sqrt(l*l+x*x),u=8,w=x/f,S=-l/f,L=i+w*u,W=h+S*u;let Y=Math.atan2(x,l)*180/Math.PI;return(Y>90||Y<-90)&&(Y+=180),`rotate(${Y} ${L} ${W})`}).text(t=>t.label);const $t=P.append("g").attr("class","wardley-trends"),vt=g.trends.map(t=>{const n=c.get(t.nodeId);if(!n)return null;const s=T(t.targetX),i=A(t.targetY),h=s-n.x,l=i-n.y,x=Math.sqrt(h*h+l*l),f=r.nodeRadius+2,u=x>f?s-h/x*f:s,w=x>f?i-l/x*f:i;return{origin:n,targetX:s,targetY:i,adjustedX2:u,adjustedY2:w}}).filter(t=>t!==null);$t.selectAll("line").data(vt).enter().append("line").attr("class","wardley-trend").attr("x1",t=>t.origin.x).attr("y1",t=>t.origin.y).attr("x2",t=>t.adjustedX2).attr("y2",t=>t.adjustedY2).attr("stroke",d.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${o})`);const C=P.append("g").attr("class","wardley-nodes").selectAll("g").data(g.nodes).enter().append("g").attr("class",t=>["wardley-node",t.className?`wardley-node--${t.className}`:""].filter(Boolean).join(" "));C.filter(t=>t.sourceStrategy==="outsource").append("circle").attr("class","wardley-outsource-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",r.nodeRadius*2).attr("fill","#666").attr("stroke",d.componentStroke).attr("stroke-width",1),C.filter(t=>t.sourceStrategy==="buy").append("circle").attr("class","wardley-buy-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",r.nodeRadius*2).attr("fill","#ccc").attr("stroke",d.componentStroke).attr("stroke-width",1),C.filter(t=>t.sourceStrategy==="build").append("circle").attr("class","wardley-build-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",r.nodeRadius*2).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);const X=C.filter(t=>t.sourceStrategy==="market");X.append("circle").attr("class","wardley-market-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",r.nodeRadius*2).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),C.filter(t=>!t.isPipelineParent&&t.sourceStrategy!=="market"&&t.className!=="anchor").append("circle").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",r.nodeRadius).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1);const H=r.nodeRadius*.7,$=r.nodeRadius*1.2;if(X.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x).attr("y1",t=>c.get(t.id).y-$).attr("x2",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),X.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),X.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x).attr("y2",t=>c.get(t.id).y-$).attr("stroke",d.componentStroke).attr("stroke-width",1),X.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y-$).attr("r",H).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),X.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("r",H).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),X.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("r",H).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),C.filter(t=>t.isPipelineParent===!0).append("rect").attr("x",t=>c.get(t.id).x-m/2).attr("y",t=>c.get(t.id).y-m/2).attr("width",m).attr("height",m).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1),C.filter(t=>t.inertia===!0).append("line").attr("class","wardley-inertia").attr("x1",t=>{const n=c.get(t.id);let s=t.isPipelineParent?m/2+15:r.nodeRadius+15;return t.sourceStrategy&&(s+=r.nodeRadius+10),n.x+s}).attr("y1",t=>{const n=c.get(t.id),s=t.isPipelineParent?m:r.nodeRadius*2;return n.y-s/2}).attr("x2",t=>{const n=c.get(t.id);let s=t.isPipelineParent?m/2+15:r.nodeRadius+15;return t.sourceStrategy&&(s+=r.nodeRadius+10),n.x+s}).attr("y2",t=>{const n=c.get(t.id),s=t.isPipelineParent?m:r.nodeRadius*2;return n.y+s/2}).attr("stroke",d.componentStroke).attr("stroke-width",6),C.append("text").attr("x",t=>{const n=c.get(t.id);if(t.className==="anchor")return t.labelOffsetX!==void 0?n.x+t.labelOffsetX:n.x;let s=r.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetX===void 0&&(s+=10);const i=t.labelOffsetX??s;return n.x+i}).attr("y",t=>{const n=c.get(t.id);if(t.className==="anchor")return t.labelOffsetY!==void 0?n.y+t.labelOffsetY:n.y-3;let s=-r.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetY===void 0&&(s-=10);const i=t.labelOffsetY??s;return n.y+i}).attr("class","wardley-node-label").attr("fill",t=>t.className==="evolved"?d.evolutionStroke:t.className==="anchor"?"#000":d.componentLabelColor).attr("font-size",r.labelFontSize).attr("font-weight",t=>t.className==="anchor"?"bold":"normal").attr("text-anchor",t=>t.className==="anchor"?"middle":"start").attr("dominant-baseline",t=>t.className==="anchor"?"middle":"auto").text(t=>t.label),g.annotations.length>0){const t=P.append("g").attr("class","wardley-annotations");if(g.annotations.forEach(n=>{const s=n.coordinates.map(i=>({x:T(i.x),y:A(i.y)}));if(s.length>1)for(let i=0;i<s.length-1;i++)t.append("line").attr("class","wardley-annotation-line").attr("x1",s[i].x).attr("y1",s[i].y).attr("x2",s[i+1].x).attr("y2",s[i+1].y).attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("stroke-dasharray","4 4");s.forEach(i=>{const h=t.append("g").attr("class","wardley-annotation");h.append("circle").attr("cx",i.x).attr("cy",i.y).attr("r",10).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5),h.append("text").attr("x",i.x).attr("y",i.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",d.axisTextColor).attr("font-weight","bold").text(n.number)})}),g.annotationsBox){let n=T(g.annotationsBox.x),s=A(g.annotationsBox.y);const i=10,h=16,l=11,x=t.append("g").attr("class","wardley-annotations-box"),f=[...g.annotations].filter(w=>w.text).sort((w,S)=>w.number-S.number),u=[];if(f.forEach((w,S)=>{const L=x.append("text").attr("x",n+i).attr("y",s+i+(S+1)*h).attr("font-size",l).attr("fill",d.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${w.number}. ${w.text}`);u.push(L)}),u.length>0){let w=0,S=0;u.forEach(j=>{const D=j.node(),Nt=D.getComputedTextLength();w=Math.max(w,Nt);const Ct=D.getBBox();S=Math.max(S,Ct.height)});const L=w+i*2+105,W=f.length*h+i*2+S/2,Y=r.padding,Pt=M-r.padding-L,St=r.padding,Mt=k-r.padding-W;n=Math.max(Y,Math.min(n,Pt)),s=Math.max(St,Math.min(s,Mt)),u.forEach((j,D)=>{j.attr("x",n+i).attr("y",s+i+(D+1)*h)}),x.insert("rect","text").attr("x",n).attr("y",s).attr("width",L).attr("height",W).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(g.notes.length>0){const t=P.append("g").attr("class","wardley-notes");g.notes.forEach(n=>{const s=T(n.x),i=A(n.y);t.append("text").attr("x",s).attr("y",i).attr("text-anchor","start").attr("font-size",11).attr("fill",d.axisTextColor).attr("font-weight","bold").text(n.text)})}if(g.accelerators.length>0){const t=P.append("g").attr("class","wardley-accelerators");g.accelerators.forEach(n=>{const s=T(n.x),i=A(n.y),h=60,l=30,x=20,f=`
3
3
  M ${s} ${i-l/2}
4
4
  L ${s+h-x} ${i-l/2}
@@ -1,4 +1,4 @@
1
- import{s as gi,g as xi,t as Xt,q as di,a as fi,b as pi,_ as a,l as Yt,L as mi,e as yi,A as bi,F as _t,i as Ai,H as Nt,I as wi,a1 as Ci,am as Si,a9 as Wt}from"./mermaid.core-BWfn-FFw.js";import{i as _i}from"./init-Gi6I4Gst.js";import{o as ki}from"./ordinal-Cboi1Yqb.js";import{l as zt}from"./linear-aMkA3ImE.js";import"./index-BKJW0i9Q.js";import"./vendor-vue-Ci9TYO_I.js";import"./defaultLocale-DX6XiGOO.js";function Ri(e,t,i){e=+e,t=+t,i=(n=arguments.length)<2?(t=e,e=0,1):n<3?1:+i;for(var s=-1,n=Math.max(0,Math.ceil((t-e)/i))|0,o=new Array(n);++s<n;)o[s]=e+s*i;return o}function bt(){var e=ki().unknown(void 0),t=e.domain,i=e.range,s=0,n=1,o,u,p=!1,f=0,T=0,P=.5;delete e.unknown;function _(){var y=t().length,E=n<s,v=E?n:s,L=E?s:n;o=(L-v)/Math.max(1,y-f+T*2),p&&(o=Math.floor(o)),v+=(L-v-o*(y-f))*P,u=o*(1-f),p&&(v=Math.round(v),u=Math.round(u));var I=Ri(y).map(function(m){return v+o*m});return i(E?I.reverse():I)}return e.domain=function(y){return arguments.length?(t(y),_()):t()},e.range=function(y){return arguments.length?([s,n]=y,s=+s,n=+n,_()):[s,n]},e.rangeRound=function(y){return[s,n]=y,s=+s,n=+n,p=!0,_()},e.bandwidth=function(){return u},e.step=function(){return o},e.round=function(y){return arguments.length?(p=!!y,_()):p},e.padding=function(y){return arguments.length?(f=Math.min(1,T=+y),_()):f},e.paddingInner=function(y){return arguments.length?(f=Math.min(1,y),_()):f},e.paddingOuter=function(y){return arguments.length?(T=+y,_()):T},e.align=function(y){return arguments.length?(P=Math.max(0,Math.min(1,y)),_()):P},e.copy=function(){return bt(t(),[s,n]).round(p).paddingInner(f).paddingOuter(T).align(P)},_i.apply(_(),arguments)}var At=(function(){var e=a(function(F,h,c,g){for(c=c||{},g=F.length;g--;c[F[g]]=h);return c},"o"),t=[1,10,12,14,16,18,19,21,23],i=[2,6],s=[1,3],n=[1,5],o=[1,6],u=[1,7],p=[1,5,10,12,14,16,18,19,21,23,34,35,36],f=[1,25],T=[1,26],P=[1,28],_=[1,29],y=[1,30],E=[1,31],v=[1,32],L=[1,33],I=[1,34],m=[1,35],R=[1,36],l=[1,37],W=[1,43],O=[1,42],X=[1,47],Y=[1,50],S=[1,10,12,14,16,18,19,21,23,34,35,36],U=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],b=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],w=[1,64],V={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:a(function(h,c,g,x,C,r,rt){var d=r.length-1;switch(C){case 5:x.setOrientation(r[d]);break;case 9:x.setDiagramTitle(r[d].text.trim());break;case 12:x.setLineData({text:"",type:"text"},r[d]);break;case 13:x.setLineData(r[d-1],r[d]);break;case 14:x.setBarData({text:"",type:"text"},r[d]);break;case 15:x.setBarData(r[d-1],r[d]);break;case 16:this.$=r[d].trim(),x.setAccTitle(this.$);break;case 17:case 18:this.$=r[d].trim(),x.setAccDescription(this.$);break;case 19:this.$=r[d-1];break;case 20:this.$=[Number(r[d-2]),...r[d]];break;case 21:this.$=[Number(r[d])];break;case 22:x.setXAxisTitle(r[d]);break;case 23:x.setXAxisTitle(r[d-1]);break;case 24:x.setXAxisTitle({type:"text",text:""});break;case 25:x.setXAxisBand(r[d]);break;case 26:x.setXAxisRangeData(Number(r[d-2]),Number(r[d]));break;case 27:this.$=r[d-1];break;case 28:this.$=[r[d-2],...r[d]];break;case 29:this.$=[r[d]];break;case 30:x.setYAxisTitle(r[d]);break;case 31:x.setYAxisTitle(r[d-1]);break;case 32:x.setYAxisTitle({type:"text",text:""});break;case 33:x.setYAxisRangeData(Number(r[d-2]),Number(r[d]));break;case 37:this.$={text:r[d],type:"text"};break;case 38:this.$={text:r[d],type:"text"};break;case 39:this.$={text:r[d],type:"markdown"};break;case 40:this.$=r[d];break;case 41:this.$=r[d-1]+""+r[d];break}},"anonymous"),table:[e(t,i,{3:1,4:2,7:4,5:s,34:n,35:o,36:u}),{1:[3]},e(t,i,{4:2,7:4,3:8,5:s,34:n,35:o,36:u}),e(t,i,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:n,35:o,36:u}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(p,[2,34]),e(p,[2,35]),e(p,[2,36]),{1:[2,1]},e(t,i,{4:2,7:4,3:21,5:s,34:n,35:o,36:u}),{1:[2,3]},e(p,[2,5]),e(t,[2,7],{4:22,34:n,35:o,36:u}),{11:23,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{11:39,13:38,24:W,27:O,29:40,30:41,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{11:45,15:44,27:X,33:46,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{11:49,17:48,24:Y,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{11:52,17:51,24:Y,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{20:[1,53]},{22:[1,54]},e(S,[2,18]),{1:[2,2]},e(S,[2,8]),e(S,[2,9]),e(U,[2,37],{40:55,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l}),e(U,[2,38]),e(U,[2,39]),e(b,[2,40]),e(b,[2,42]),e(b,[2,43]),e(b,[2,44]),e(b,[2,45]),e(b,[2,46]),e(b,[2,47]),e(b,[2,48]),e(b,[2,49]),e(b,[2,50]),e(b,[2,51]),e(S,[2,10]),e(S,[2,22],{30:41,29:56,24:W,27:O}),e(S,[2,24]),e(S,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},e(S,[2,11]),e(S,[2,30],{33:60,27:X}),e(S,[2,32]),{31:[1,61]},e(S,[2,12]),{17:62,24:Y},{25:63,27:w},e(S,[2,14]),{17:65,24:Y},e(S,[2,16]),e(S,[2,17]),e(b,[2,41]),e(S,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},e(S,[2,31]),{27:[1,69]},e(S,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},e(S,[2,15]),e(S,[2,26]),e(S,[2,27]),{11:59,32:72,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},e(S,[2,33]),e(S,[2,19]),{25:73,27:w},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:a(function(h,c){if(c.recoverable)this.trace(h);else{var g=new Error(h);throw g.hash=c,g}},"parseError"),parse:a(function(h){var c=this,g=[0],x=[],C=[null],r=[],rt=this.table,d="",ct=0,It=0,hi=2,Mt=1,li=r.slice.call(arguments,1),D=Object.create(this.lexer),$={yy:{}};for(var ft in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ft)&&($.yy[ft]=this.yy[ft]);D.setInput(h,$.yy),$.yy.lexer=D,$.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var pt=D.yylloc;r.push(pt);var ci=D.options&&D.options.ranges;typeof $.yy.parseError=="function"?this.parseError=$.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ui(B){g.length=g.length-2*B,C.length=C.length-B,r.length=r.length-B}a(ui,"popStack");function Vt(){var B;return B=x.pop()||D.lex()||Mt,typeof B!="number"&&(B instanceof Array&&(x=B,B=x.pop()),B=c.symbols_[B]||B),B}a(Vt,"lex");for(var M,q,z,mt,G={},ut,N,Bt,gt;;){if(q=g[g.length-1],this.defaultActions[q]?z=this.defaultActions[q]:((M===null||typeof M>"u")&&(M=Vt()),z=rt[q]&&rt[q][M]),typeof z>"u"||!z.length||!z[0]){var yt="";gt=[];for(ut in rt[q])this.terminals_[ut]&&ut>hi&&gt.push("'"+this.terminals_[ut]+"'");D.showPosition?yt="Parse error on line "+(ct+1)+`:
1
+ import{s as gi,g as xi,t as Xt,q as di,a as fi,b as pi,_ as a,l as Yt,L as mi,e as yi,A as bi,F as _t,i as Ai,H as Nt,I as wi,a1 as Ci,am as Si,a9 as Wt}from"./mermaid.core-CugqmqyM.js";import{i as _i}from"./init-Gi6I4Gst.js";import{o as ki}from"./ordinal-Cboi1Yqb.js";import{l as zt}from"./linear-CABNrj_Q.js";import"./index-e9nl1Jp1.js";import"./vendor-vue-Ci9TYO_I.js";import"./defaultLocale-DX6XiGOO.js";function Ri(e,t,i){e=+e,t=+t,i=(n=arguments.length)<2?(t=e,e=0,1):n<3?1:+i;for(var s=-1,n=Math.max(0,Math.ceil((t-e)/i))|0,o=new Array(n);++s<n;)o[s]=e+s*i;return o}function bt(){var e=ki().unknown(void 0),t=e.domain,i=e.range,s=0,n=1,o,u,p=!1,f=0,T=0,P=.5;delete e.unknown;function _(){var y=t().length,E=n<s,v=E?n:s,L=E?s:n;o=(L-v)/Math.max(1,y-f+T*2),p&&(o=Math.floor(o)),v+=(L-v-o*(y-f))*P,u=o*(1-f),p&&(v=Math.round(v),u=Math.round(u));var I=Ri(y).map(function(m){return v+o*m});return i(E?I.reverse():I)}return e.domain=function(y){return arguments.length?(t(y),_()):t()},e.range=function(y){return arguments.length?([s,n]=y,s=+s,n=+n,_()):[s,n]},e.rangeRound=function(y){return[s,n]=y,s=+s,n=+n,p=!0,_()},e.bandwidth=function(){return u},e.step=function(){return o},e.round=function(y){return arguments.length?(p=!!y,_()):p},e.padding=function(y){return arguments.length?(f=Math.min(1,T=+y),_()):f},e.paddingInner=function(y){return arguments.length?(f=Math.min(1,y),_()):f},e.paddingOuter=function(y){return arguments.length?(T=+y,_()):T},e.align=function(y){return arguments.length?(P=Math.max(0,Math.min(1,y)),_()):P},e.copy=function(){return bt(t(),[s,n]).round(p).paddingInner(f).paddingOuter(T).align(P)},_i.apply(_(),arguments)}var At=(function(){var e=a(function(F,h,c,g){for(c=c||{},g=F.length;g--;c[F[g]]=h);return c},"o"),t=[1,10,12,14,16,18,19,21,23],i=[2,6],s=[1,3],n=[1,5],o=[1,6],u=[1,7],p=[1,5,10,12,14,16,18,19,21,23,34,35,36],f=[1,25],T=[1,26],P=[1,28],_=[1,29],y=[1,30],E=[1,31],v=[1,32],L=[1,33],I=[1,34],m=[1,35],R=[1,36],l=[1,37],W=[1,43],O=[1,42],X=[1,47],Y=[1,50],S=[1,10,12,14,16,18,19,21,23,34,35,36],U=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],b=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],w=[1,64],V={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:a(function(h,c,g,x,C,r,rt){var d=r.length-1;switch(C){case 5:x.setOrientation(r[d]);break;case 9:x.setDiagramTitle(r[d].text.trim());break;case 12:x.setLineData({text:"",type:"text"},r[d]);break;case 13:x.setLineData(r[d-1],r[d]);break;case 14:x.setBarData({text:"",type:"text"},r[d]);break;case 15:x.setBarData(r[d-1],r[d]);break;case 16:this.$=r[d].trim(),x.setAccTitle(this.$);break;case 17:case 18:this.$=r[d].trim(),x.setAccDescription(this.$);break;case 19:this.$=r[d-1];break;case 20:this.$=[Number(r[d-2]),...r[d]];break;case 21:this.$=[Number(r[d])];break;case 22:x.setXAxisTitle(r[d]);break;case 23:x.setXAxisTitle(r[d-1]);break;case 24:x.setXAxisTitle({type:"text",text:""});break;case 25:x.setXAxisBand(r[d]);break;case 26:x.setXAxisRangeData(Number(r[d-2]),Number(r[d]));break;case 27:this.$=r[d-1];break;case 28:this.$=[r[d-2],...r[d]];break;case 29:this.$=[r[d]];break;case 30:x.setYAxisTitle(r[d]);break;case 31:x.setYAxisTitle(r[d-1]);break;case 32:x.setYAxisTitle({type:"text",text:""});break;case 33:x.setYAxisRangeData(Number(r[d-2]),Number(r[d]));break;case 37:this.$={text:r[d],type:"text"};break;case 38:this.$={text:r[d],type:"text"};break;case 39:this.$={text:r[d],type:"markdown"};break;case 40:this.$=r[d];break;case 41:this.$=r[d-1]+""+r[d];break}},"anonymous"),table:[e(t,i,{3:1,4:2,7:4,5:s,34:n,35:o,36:u}),{1:[3]},e(t,i,{4:2,7:4,3:8,5:s,34:n,35:o,36:u}),e(t,i,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:n,35:o,36:u}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(p,[2,34]),e(p,[2,35]),e(p,[2,36]),{1:[2,1]},e(t,i,{4:2,7:4,3:21,5:s,34:n,35:o,36:u}),{1:[2,3]},e(p,[2,5]),e(t,[2,7],{4:22,34:n,35:o,36:u}),{11:23,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{11:39,13:38,24:W,27:O,29:40,30:41,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{11:45,15:44,27:X,33:46,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{11:49,17:48,24:Y,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{11:52,17:51,24:Y,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{20:[1,53]},{22:[1,54]},e(S,[2,18]),{1:[2,2]},e(S,[2,8]),e(S,[2,9]),e(U,[2,37],{40:55,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l}),e(U,[2,38]),e(U,[2,39]),e(b,[2,40]),e(b,[2,42]),e(b,[2,43]),e(b,[2,44]),e(b,[2,45]),e(b,[2,46]),e(b,[2,47]),e(b,[2,48]),e(b,[2,49]),e(b,[2,50]),e(b,[2,51]),e(S,[2,10]),e(S,[2,22],{30:41,29:56,24:W,27:O}),e(S,[2,24]),e(S,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},e(S,[2,11]),e(S,[2,30],{33:60,27:X}),e(S,[2,32]),{31:[1,61]},e(S,[2,12]),{17:62,24:Y},{25:63,27:w},e(S,[2,14]),{17:65,24:Y},e(S,[2,16]),e(S,[2,17]),e(b,[2,41]),e(S,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},e(S,[2,31]),{27:[1,69]},e(S,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},e(S,[2,15]),e(S,[2,26]),e(S,[2,27]),{11:59,32:72,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},e(S,[2,33]),e(S,[2,19]),{25:73,27:w},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:a(function(h,c){if(c.recoverable)this.trace(h);else{var g=new Error(h);throw g.hash=c,g}},"parseError"),parse:a(function(h){var c=this,g=[0],x=[],C=[null],r=[],rt=this.table,d="",ct=0,It=0,hi=2,Mt=1,li=r.slice.call(arguments,1),D=Object.create(this.lexer),$={yy:{}};for(var ft in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ft)&&($.yy[ft]=this.yy[ft]);D.setInput(h,$.yy),$.yy.lexer=D,$.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var pt=D.yylloc;r.push(pt);var ci=D.options&&D.options.ranges;typeof $.yy.parseError=="function"?this.parseError=$.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ui(B){g.length=g.length-2*B,C.length=C.length-B,r.length=r.length-B}a(ui,"popStack");function Vt(){var B;return B=x.pop()||D.lex()||Mt,typeof B!="number"&&(B instanceof Array&&(x=B,B=x.pop()),B=c.symbols_[B]||B),B}a(Vt,"lex");for(var M,q,z,mt,G={},ut,N,Bt,gt;;){if(q=g[g.length-1],this.defaultActions[q]?z=this.defaultActions[q]:((M===null||typeof M>"u")&&(M=Vt()),z=rt[q]&&rt[q][M]),typeof z>"u"||!z.length||!z[0]){var yt="";gt=[];for(ut in rt[q])this.terminals_[ut]&&ut>hi&&gt.push("'"+this.terminals_[ut]+"'");D.showPosition?yt="Parse error on line "+(ct+1)+`:
2
2
  `+D.showPosition()+`
3
3
  Expecting `+gt.join(", ")+", got '"+(this.terminals_[M]||M)+"'":yt="Parse error on line "+(ct+1)+": Unexpected "+(M==Mt?"end of input":"'"+(this.terminals_[M]||M)+"'"),this.parseError(yt,{text:D.match,token:this.terminals_[M]||M,line:D.yylineno,loc:pt,expected:gt})}if(z[0]instanceof Array&&z.length>1)throw new Error("Parse Error: multiple actions possible at state: "+q+", token: "+M);switch(z[0]){case 1:g.push(M),C.push(D.yytext),r.push(D.yylloc),g.push(z[1]),M=null,It=D.yyleng,d=D.yytext,ct=D.yylineno,pt=D.yylloc;break;case 2:if(N=this.productions_[z[1]][1],G.$=C[C.length-N],G._$={first_line:r[r.length-(N||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(N||1)].first_column,last_column:r[r.length-1].last_column},ci&&(G._$.range=[r[r.length-(N||1)].range[0],r[r.length-1].range[1]]),mt=this.performAction.apply(G,[d,It,ct,$.yy,z[1],C,r].concat(li)),typeof mt<"u")return mt;N&&(g=g.slice(0,-1*N*2),C=C.slice(0,-1*N),r=r.slice(0,-1*N)),g.push(this.productions_[z[1]][0]),C.push(G.$),r.push(G._$),Bt=rt[g[g.length-2]][g[g.length-1]],g.push(Bt);break;case 3:return!0}}return!0},"parse")},k=(function(){var F={EOF:1,parseError:a(function(c,g){if(this.yy.parser)this.yy.parser.parseError(c,g);else throw new Error(c)},"parseError"),setInput:a(function(h,c){return this.yy=c||this.yy||{},this._input=h,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:a(function(){var h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var c=h.match(/(?:\r\n?|\n).*/g);return c?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),h},"input"),unput:a(function(h){var c=h.length,g=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var x=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),g.length-1&&(this.yylineno-=g.length-1);var C=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:g?(g.length===x.length?this.yylloc.first_column:0)+x[x.length-g.length].length-g[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[C[0],C[0]+this.yyleng-c]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(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:a(function(h){this.unput(this.match.slice(h))},"less"),pastInput:a(function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var h=this.match;return h.length<20&&(h+=this._input.substr(0,20-h.length)),(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var h=this.pastInput(),c=new Array(h.length+1).join("-");return h+this.upcomingInput()+`
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.1.0-alpha.13",
2
+ "version": "0.1.0-alpha.15",
3
3
  "protocolVersion": 3,
4
- "sourceCommit": "77d63eb95fdab1698fb72d5390862c45aaa3cda2"
4
+ "sourceCommit": "87a78f42f77b877238ac6e2567bf5c97abb7ac0c"
5
5
  }
package/web/index.html CHANGED
@@ -23,9 +23,9 @@
23
23
  @keyframes boot-orbit { 0% { opacity: .26; } 12% { opacity: 1; } 46% { opacity: .26; } 100% { opacity: .26; } }
24
24
  @media (prefers-reduced-motion: reduce) { .boot-splash path { opacity: 1; animation: none; } }
25
25
  </style>
26
- <script type="module" crossorigin src="/assets/index-BKJW0i9Q.js"></script>
26
+ <script type="module" crossorigin src="/assets/index-e9nl1Jp1.js"></script>
27
27
  <link rel="modulepreload" crossorigin href="/assets/vendor-vue-Ci9TYO_I.js">
28
- <link rel="stylesheet" crossorigin href="/assets/index-GnV5W03u.css">
28
+ <link rel="stylesheet" crossorigin href="/assets/index-o2anzdhl.css">
29
29
  </head>
30
30
  <body>
31
31
  <div id="app">
@@ -1 +0,0 @@
1
- import{d as ne,u as le,w as J,p as ie,q as s,e as T,b as n,t as e,A as t,h as w,x as u,F as m,c as oe,j as re,E as P,r as h,y as M,a}from"./vendor-vue-Ci9TYO_I.js";import{u as ue,B as ce,b as j,a as Q,d as de,s as ve,e as pe}from"./index-BKJW0i9Q.js";import{_ as _e}from"./ConfirmDialog.vue_vue_type_script_setup_true_lang-KPZUoxNU.js";import{u as he}from"./settings-general-d_R-CH6R.js";import{_ as ge,R as ye,E as V,r as fe,a as me,b as be,c as we}from"./ProviderAuthFlow.vue_vue_type_script_setup_true_lang-DHd2sgtZ.js";import{m as A}from"./context-ChGKk1Cc.js";const ke={class:"settings-page"},xe={"data-route-heading":"",tabindex:"-1"},Ie={key:0,class:"ui-banner settings-banner","data-tone":"danger",role:"alert"},Ce=["disabled"],Ue={key:2,class:"ui-banner",role:"status"},Se={key:3,class:"settings-card"},Ae={class:"settings-help"},Ee={class:"settings-card"},Le={key:0,class:"settings-identity"},Be={class:"settings-avatar"},Te={class:"settings-identity-text"},De={key:0},Fe={key:1},Re=["disabled"],$e={class:"account-login-heading"},Pe={key:0,class:"settings-card settings-usage"},Me={class:"settings-list-toolbar"},Ne=["aria-label","disabled"],Oe={key:0,class:"ui-banner","data-tone":"danger",role:"alert"},je={key:1,class:"settings-identity"},Ve={class:"settings-identity-text"},He={key:0},We={key:0},Ye={key:1},qe={key:2},ze={class:"settings-meter-label"},Ge={key:0},Ke={key:1},Je=["value","max","aria-label"],Qe={key:1,class:"settings-meta"},Xe={class:"settings-inline-actions"},Ze=["href"],et=["href"],tt={key:1,class:"settings-card settings-form"},at={key:0,class:"ui-banner","data-tone":"danger",role:"alert"},st={class:"settings-row-main"},nt={key:0},lt=["disabled","onClick"],it={key:0,class:"settings-help"},ot={key:2,class:"settings-card settings-form"},rt={key:0,class:"ui-banner","data-tone":"danger",role:"alert"},ut={class:"settings-help"},ct=["value"],dt={class:"settings-inline-actions"},vt=["href"],pt={key:1,class:"settings-help"},_t=ne({__name:"AccountSettings",setup(ht){const{t:c,locale:X}=le({messages:ve}),v=he(),k=ue(),p=h(),o=h(),_=h(),D=h(),L=h(""),B=h(""),b=h(),N=h(!1),H=h(!1),C=h(!0),g=h(!1),U=h(""),F=h(),R=h(""),O=h(),x=M(()=>{var l,r;return(r=(l=p.value)==null?void 0:l.account)==null?void 0:r.state.identity}),$=M(()=>{var l,r;return((r=(l=p.value)==null?void 0:l.account)==null?void 0:r.state.authenticated)===!0}),W=M(()=>{var l,r;return((l=x.value)==null?void 0:l.name)||((r=x.value)==null?void 0:r.email)||c("account")}),Z=M(()=>{const l=o.value;if(!l)return[];const r=[];l.credits&&r.push({id:"credits",label:c("credits"),used:l.credits.usedUnits,total:l.credits.totalUnits,remaining:l.credits.remainingUnits,unlimited:l.credits.unlimited,expires:l.credits.resetsAt});for(const d of l.windows)r.push({id:`window-${d.durationHours}`,label:`${d.durationHours} h`,used:d.tokenUsed,total:d.tokenCap,expires:d.expiresAt});for(const d of l.features)r.push({id:d.key,label:d.key,used:d.used,total:d.allowance,remaining:d.remaining,unlimited:d.unlimited,expires:d.periodEnd});return r});J(()=>x.value&&`${x.value.issuer}/${x.value.subject}`,()=>{b.value=void 0});async function S(){var l,r;C.value=!0,U.value="",F.value=void 0,R.value="";try{const d=await k.client.call("provider.management",{},fe);if(p.value=d.providers.find(y=>y.credentialAuthority==="account"),o.value=void 0,_.value=void 0,D.value=void 0,L.value="",(r=(l=p.value)==null?void 0:l.account)!=null&&r.state.authenticated){const y={providerId:p.value.providerId};await Promise.all([k.client.call("account.usage",y,me).then(f=>{o.value=f},f=>{R.value=A(f)}),k.client.call("account.referral",y,be).then(f=>{_.value=f},f=>{L.value=A(f)})])}const I=d.errors.find(y=>y.providerId==="dimcode-api-oauth");I&&(U.value=I.message,F.value=I.providerId)}catch(d){U.value=A(d)}finally{C.value=!1}}async function ee(){if(!(!F.value||g.value)){g.value=!0;try{await k.client.call("account.recover",{providerId:F.value},j),await Promise.all([S(),Q().load()])}catch(l){U.value=A(l)}finally{g.value=!1}}}async function te(){var r;const l=p.value;if(!(!l||g.value||!await((r=O.value)==null?void 0:r.open(c("signOutConfirm"),{confirmLabel:c("signOut")})))){g.value=!0;try{await k.client.call("account.logout",{providerId:l.providerId},j),b.value=void 0,await Promise.all([S(),Q().load()])}catch(d){U.value=A(d)}finally{g.value=!1}}}async function ae(){var l;if((l=_.value)!=null&&l.inviteUrl)try{await de(_.value.inviteUrl),H.value=!0}catch(r){L.value=A(r)}}async function Y(){if(p.value){B.value="";try{D.value=await k.client.call("account.reset_batches",{providerId:p.value.providerId},we)}catch(l){B.value=A(l)}}}async function se(l){var I,y;const r=(I=o.value)==null?void 0:I.subscriptionId;if(g.value||!p.value||r===void 0||b.value&&b.value.resetType!==l)return;const d=l==="window"?v("Use one credit to reset the current usage window?","使用一次额度重置当前用量窗口?"):v("Use one credit to reset this month's full usage?","使用一次额度重置本月全部用量?");if(await((y=O.value)==null?void 0:y.open(d,{confirmLabel:c("reset")}))){g.value=!0,B.value="",b.value??(b.value={providerId:p.value.providerId,subscriptionId:r,resetType:l,idempotencyKey:crypto.randomUUID()});try{await k.client.call("account.apply_reset",b.value,j),b.value=void 0,await S(),N.value&&await Y()}catch(f){B.value=`${A(f)} ${v("Retry the same reset to safely check its result; no second credit will be consumed.","请重试同一种重置以安全确认结果;不会重复消耗额度。")}`}finally{g.value=!1}}}return J(()=>k.phase,(l,r)=>{l==="connected"&&r!=="connected"&&S()}),ie(S),(l,r)=>{var d,I,y,f,q,z,G,K;return a(),s("article",ke,[T(_e,{ref_key:"confirm",ref:O},null,512),n("header",null,[n("h2",xe,e(t(c)("account")),1),n("p",null,e(t(c)("accountDescription")),1)]),U.value?(a(),s("p",Ie,[w(e(U.value)+" ",1),n("button",{class:"ui-button","data-variant":"ghost",onClick:S},e(t(c)("retry")),1)])):u("",!0),F.value&&t(k).supports("account.recover")?(a(),s("button",{key:1,class:"ui-button","data-variant":"secondary",disabled:g.value||C.value,onClick:ee},e(t(v)("Recover stored sign-in","恢复已保存的登录")),9,Ce)):u("",!0),C.value&&!p.value?(a(),s("p",Ue,e(t(c)("loading")),1)):!p.value&&!U.value?(a(),s("section",Se,[n("p",Ae,e(t(c)("accountUnavailable")),1)])):u("",!0),p.value?(a(),s(m,{key:4},[n("section",Ee,[$.value?(a(),s("div",Le,[n("span",Be,e(W.value.slice(0,2).toUpperCase()),1),n("div",Te,[n("strong",null,e(W.value),1),(d=x.value)!=null&&d.email?(a(),s("p",De,e(x.value.email),1)):u("",!0),(I=x.value)!=null&&I.subject?(a(),s("p",Fe,e(t(c)("uid"))+": "+e(x.value.subject),1)):u("",!0)]),n("button",{class:"ui-button","data-variant":"ghost",disabled:g.value||C.value,onClick:te},e(t(c)("signOut")),9,Re)])):(a(),s(m,{key:1},[n("div",$e,[T(ce,{"aria-hidden":"true"}),n("h3",null,e(t(c)("signIn")),1)]),(a(),oe(ge,{key:p.value.providerId,provider:p.value,onFinished:S},null,8,["provider"]))],64))]),$.value?(a(),s("section",Pe,[n("div",Me,[n("h3",null,e(t(c)("plan")),1),n("button",{class:"ui-icon-button","data-variant":"ghost","aria-label":t(c)("refresh"),disabled:C.value,onClick:S},[T(t(ye),{class:re({"account-refreshing":C.value}),"aria-hidden":"true"},null,8,["class"])],8,Ne)]),R.value?(a(),s("p",Oe,e(R.value),1)):u("",!0),(y=o.value)!=null&&y.plan?(a(),s("div",je,[n("div",Ve,[n("strong",null,e(o.value.plan.name),1),n("p",null,[w(e(o.value.plan.status),1),o.value.plan.expiresAt?(a(),s("span",He," · "+e(new Date(o.value.plan.expiresAt).toLocaleDateString()),1)):u("",!0)]),o.value.plan.priceAmount!==void 0?(a(),s("p",We,[w(e((o.value.plan.priceAmount/100).toLocaleString(t(X),{minimumFractionDigits:2}))+" "+e(o.value.plan.priceCurrency),1),o.value.plan.priceInterval?(a(),s(m,{key:0},[w(" / "+e(o.value.plan.priceInterval),1)],64)):u("",!0)])):u("",!0),o.value.plan.cancelAtPeriodEnd?(a(),s("p",Ye,e(t(v)("Cancels at the end of this term","将在本期结束后取消")),1)):u("",!0),o.value.plan.lastTermStatus?(a(),s("p",qe,e(t(v)("Previous term","上一周期"))+": "+e(o.value.plan.lastTermStatus)+" · "+e(o.value.plan.lastTermStart)+" — "+e(o.value.plan.lastTermEnd),1)):u("",!0)])])):u("",!0),(a(!0),s(m,null,P(Z.value,i=>(a(),s("div",{key:i.id,class:"settings-meter"},[n("div",ze,[n("span",null,e(i.label),1),i.unlimited?(a(),s("span",Ge,e(t(c)("unlimited")),1)):(a(),s("span",Ke,[i.used!==void 0?(a(),s(m,{key:0},[w(e(i.used.toLocaleString()),1)],64)):u("",!0),i.total!==void 0?(a(),s(m,{key:1},[w(" / "+e(i.total.toLocaleString()),1)],64)):u("",!0),i.remaining!==void 0?(a(),s(m,{key:2},[w(" · "+e(t(c)("remaining"))+" "+e(i.remaining.toLocaleString()),1)],64)):u("",!0)]))]),!i.unlimited&&i.total!==void 0&&i.total>0&&i.used!==void 0?(a(),s("progress",{key:0,value:i.used,max:i.total,"aria-label":i.label},null,8,Je)):u("",!0),i.expires?(a(),s("small",Qe,e(t(c)("expires"))+": "+e(new Date(i.expires).toLocaleString()),1)):u("",!0)]))),128)),n("div",Xe,[(f=o.value)!=null&&f.subscriptionUrl?(a(),s("a",{key:0,class:"ui-button","data-variant":"secondary",href:o.value.subscriptionUrl,target:"_blank",rel:"noopener noreferrer"},[w(e(t(c)("viewPlan")),1),T(t(V),{"aria-hidden":"true"})],8,Ze)):u("",!0),(q=o.value)!=null&&q.pricingUrl?(a(),s("a",{key:1,class:"ui-button","data-variant":"ghost",href:o.value.pricingUrl,target:"_blank",rel:"noopener noreferrer"},[w(e(t(c)("choosePlan")),1),T(t(V),{"aria-hidden":"true"})],8,et)):u("",!0)])])):u("",!0),$.value&&((z=o.value)!=null&&z.resets)?(a(),s("section",tt,[n("h3",null,e(t(c)("resetCredits")),1),B.value?(a(),s("p",at,e(B.value),1)):u("",!0),(a(),s(m,null,P(["window","monthlyFull"],i=>n("div",{key:i,class:"settings-row"},[n("div",st,[n("strong",null,e(i==="window"?t(v)("Window reset","窗口重置"):t(v)("Monthly full reset","每月全量重置"))+" · "+e(o.value.resets[i].availableCount),1),o.value.resets[i].nearestExpiresAt?(a(),s("small",nt,e(t(c)("expires"))+": "+e(new Date(o.value.resets[i].nearestExpiresAt).toLocaleString()),1)):u("",!0)]),n("button",{class:"ui-button","data-variant":"secondary",disabled:g.value||C.value||(b.value?b.value.resetType!==(i==="window"?"window":"monthly_full"):!o.value.resets[i].availableCount)||o.value.subscriptionId===void 0,onClick:E=>se(i==="window"?"window":"monthly_full")},e(t(c)("reset")),9,lt)])),64)),n("details",{onToggle:r[0]||(r[0]=i=>{N.value=i.target.open,N.value&&Y()})},[n("summary",null,e(t(v)("Credit batches and expiry","重置额度批次与有效期")),1),D.value?(a(),s(m,{key:0},P(["window","monthlyFull"],i=>n("div",{key:i},[n("h4",null,e(i==="window"?t(v)("Window","窗口"):t(v)("Monthly","每月")),1),(a(!0),s(m,null,P(D.value[i],E=>(a(),s("p",{key:E.grantId,class:"settings-help"},e(E.sourceType)+" · "+e(E.remaining)+" · "+e(E.scopeType)+" "+e(E.subscriptionId)+" · "+e(new Date(E.expiresAt).toLocaleString()),1))),128)),D.value[i].length?u("",!0):(a(),s("p",it,e(t(v)("No credits","暂无额度")),1))])),64)):u("",!0)],32)])):u("",!0),$.value&&((G=_.value)!=null&&G.enabled||L.value)?(a(),s("section",ot,[n("h3",null,e(t(c)("referral")),1),L.value?(a(),s("p",rt,e(L.value),1)):u("",!0),(K=_.value)!=null&&K.enabled?(a(),s(m,{key:1},[n("p",null,e(t(v)("Invited","已邀请"))+" "+e(_.value.invitedCount)+" · "+e(t(v)("Subscribed","已付费"))+" "+e(_.value.paidCount)+" · "+e(t(v)("Rewards","奖励额度"))+" "+e(_.value.rewardGrantedUnits??"—"),1),n("p",ut,e(t(v)("Your rebate","邀请人返利"))+" "+e(_.value.inviterRebateBp/100)+"% · "+e(t(v)("Friend's discount","受邀人优惠"))+" "+e(_.value.inviteeRebateBp/100)+"%",1),_.value.eligible&&_.value.inviteUrl?(a(),s(m,{key:0},[n("label",null,[n("span",null,e(t(v)("Invitation link","邀请链接")),1),n("input",{class:"ui-field",value:_.value.inviteUrl,readonly:""},null,8,ct)]),n("div",dt,[n("button",{class:"ui-button","data-variant":"secondary",onClick:ae},e(t(c)(H.value?"copied":"copy")),1),n("a",{class:"ui-button","data-variant":"ghost",href:_.value.inviteUrl,target:"_blank",rel:"noopener noreferrer"},[w(e(t(v)("Open","打开")),1),T(t(V),{"aria-hidden":"true"})],8,vt)])],64)):(a(),s("p",pt,e(t(v)("Your account is not eligible for invitations yet.","当前账户暂未获得邀请资格。")),1))],64)):u("",!0)])):u("",!0)],64)):u("",!0)])}}}),kt=pe(_t,[["__scopeId","data-v-9b1a0ed8"]]);export{kt as default};
@@ -1 +0,0 @@
1
- .account-login-heading[data-v-9b1a0ed8]{display:flex;align-items:center;gap:var(--space-3);margin-bottom:var(--space-6)}.account-login-heading svg[data-v-9b1a0ed8]{width:36px;height:26px}.account-login-heading h3[data-v-9b1a0ed8],.settings-list-toolbar h3[data-v-9b1a0ed8]{margin:0}.account-refreshing[data-v-9b1a0ed8]{animation:spin-9b1a0ed8 1s linear infinite}@keyframes spin-9b1a0ed8{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.account-refreshing[data-v-9b1a0ed8]{animation:none}}
@@ -1 +0,0 @@
1
- import{d as $,p as j,q as n,b as e,t as l,A as o,g as E,C as q,B as R,e as L,D as z,x as y,F as U,E as B,r as m,y as A,a as i}from"./vendor-vue-Ci9TYO_I.js";import{u as T}from"./settings-general-d_R-CH6R.js";import{_ as G,r as H,a as K,b as F,c as Q,d as W}from"./GeneralSettingsStatus.vue_vue_type_script_setup_true_lang-DY1_UG_g.js";import{u as X,a as Y}from"./index-BKJW0i9Q.js";import{b as Z,m as J}from"./context-ChGKk1Cc.js";const ee={class:"settings-page"},le={"data-route-heading":"",tabindex:"-1"},ae=["disabled"],te=["disabled"],se={class:"settings-card"},oe=["disabled"],ue={value:"",disabled:""},ne=["value"],ie=["value"],de={key:0},re={key:0,class:"settings-card"},ve=["disabled"],ce={value:"agent"},pe={value:"inherit"},me=["value"],fe=["value"],he={key:1,class:"settings-card"},be=["disabled"],_e={value:""},ye=["value"],ge=["value"],xe={key:0,class:"ui-banner","data-tone":"danger"},ke={class:"settings-actions"},we=["disabled"],Ae=$({__name:"AgentSettings",setup(Ie){const s=T(),v=X(),P=Y(),f=m(),h=m(),b=m("agent"),d=m(),c=m(""),D=m(!1),V=m(""),C=m(""),g=m(""),r=m(!1),I=m(""),M=m(!1),x=A(()=>{var u;return((u=P.providers)==null?void 0:u.flatMap(t=>t.models.map(p=>({key:JSON.stringify([t.providerId,p.id]),providerId:t.providerId,modelId:p.id,label:`${t.name} / ${p.name}`}))))??[]}),k=A(()=>f.value?JSON.stringify([f.value.providerId,f.value.modelId]):""),w=A(()=>{var u,t;return((u=h.value)==null?void 0:u.policy.mode)==="fixed"?JSON.stringify([h.value.policy.model.providerId,h.value.policy.model.modelId]):((t=h.value)==null?void 0:t.policy.mode)??"agent"}),S=A(()=>D.value&&(g.value!==k.value||b.value!==w.value||d.value!==void 0&&c.value!==(d.value.executablePath??"")));Z(S);async function N(){if(!r.value&&!(S.value&&!window.confirm(s("Discard unsaved defaults?","放弃未保存的默认设置?")))){r.value=!0,I.value="",M.value=!1;try{if(!v.supports("provider.selection"))throw new Error(s("Default model selection is not available on this server.","此服务器不支持默认模型选择。"));const u=V.value.trim(),[t,p,_]=await Promise.all([v.client.call("provider.selection",u?{cwd:u}:{},H),v.supports("collaboration.model_policy")?v.client.call("collaboration.model_policy",{},K):void 0,v.supports("host.exec_shell.get")?v.client.call("host.exec_shell.get",{},F):void 0,P.load()]);f.value=t,h.value=p,d.value=_,c.value=(_==null?void 0:_.executablePath)??"",b.value=w.value,C.value=u,g.value=k.value,D.value=!0,P.error&&(I.value=P.error)}catch(u){I.value=J(u)}finally{r.value=!1}}}async function O(){const u=x.value.find(t=>t.key===g.value);if(!(r.value||!S.value)){r.value=!0,I.value="",M.value=!1;try{if(g.value!==k.value&&u&&(f.value=await v.client.call("provider.select",{...C.value?{cwd:C.value}:{},providerId:u.providerId,modelId:u.modelId,...f.value?{expectedVersion:f.value.version}:{}},Q),g.value=k.value),h.value&&b.value!==w.value){const t=x.value.find(a=>a.key===b.value),p=b.value==="agent"||b.value==="inherit"?{mode:b.value}:t?{mode:"fixed",model:{providerId:t.providerId,modelId:t.modelId}}:void 0;if(!p)throw new Error(s("Choose an available subagent model.","请选择可用的子代理模型。"));const _=await v.client.call("collaboration.set_model_policy",{expectedRevision:h.value.revision,policy:p},W);h.value={revision:_,policy:p}}d.value&&c.value!==(d.value.executablePath??"")&&(d.value=await v.client.call("host.exec_shell.update",{expectedRevision:d.value.revision,...c.value?{executablePath:c.value}:{}},F),c.value=d.value.executablePath??""),M.value=!0}catch(t){I.value=J(t)}finally{r.value=!1}}}return j(N),(u,t)=>{var p,_;return i(),n("article",ee,[e("header",null,[e("h2",le,l(o(s)("Agent","代理")),1),e("p",null,l(o(s)("Choose the default model for new sessions. Existing sessions keep their selected model.","为新会话选择默认模型。现有会话保留其已选模型。")),1)]),e("form",{class:"settings-card settings-form",onSubmit:R(N,["prevent"])},[e("label",null,[e("span",null,l(o(s)("Project directory (blank for the global default)","项目目录(留空表示全局默认)")),1),E(e("input",{"onUpdate:modelValue":t[0]||(t[0]=a=>V.value=a),class:"ui-field","data-size":"md",disabled:r.value,placeholder:"/path/to/project"},null,8,ae),[[q,V.value]])]),e("button",{class:"ui-button","data-size":"md","data-variant":"secondary",disabled:r.value},l(o(s)("Load defaults","加载默认设置")),9,te)],32),L(G,{busy:r.value,error:I.value,saved:M.value&&!S.value,onReload:N},null,8,["busy","error","saved"]),D.value?(i(),n("form",{key:0,class:"settings-form",onSubmit:R(O,["prevent"])},[e("section",se,[e("h3",null,l(o(s)("Default model","默认模型")),1),e("p",null,l(C.value||o(s)("Global default","全局默认")),1),e("label",null,[e("span",null,l(o(s)("Model","模型")),1),E(e("select",{"onUpdate:modelValue":t[1]||(t[1]=a=>g.value=a),class:"ui-field","data-size":"md",disabled:r.value||!o(v).supports("provider.select")},[e("option",ue,l(o(s)("Automatic fallback — choose a model to pin a default","自动回退 — 选择模型以固定默认值")),1),k.value&&!x.value.some(a=>a.key===k.value)?(i(),n("option",{key:0,value:k.value,disabled:""},l((p=f.value)==null?void 0:p.providerId)+" / "+l((_=f.value)==null?void 0:_.modelId)+" ("+l(o(s)("unavailable","不可用"))+")",9,ne)):y("",!0),(i(!0),n(U,null,B(x.value,a=>(i(),n("option",{key:a.key,value:a.key},l(a.label),9,ie))),128))],8,oe),[[z,g.value]])]),x.value.length?y("",!0):(i(),n("p",de,l(o(s)("No selectable models. Configure a provider and its model limits first.","没有可选模型。请先配置提供商和模型限制。")),1))]),h.value?(i(),n("section",re,[e("h3",null,l(o(s)("Subagent models","子代理模型")),1),e("p",null,l(o(s)("Applies to every newly created native Collaboration member, including named agents. Existing members and external agents are unchanged.","适用于每个新建的原生协作成员,包括命名代理。现有成员和外部代理不受影响。")),1),e("label",null,[e("span",null,l(o(s)("Model policy","模型策略")),1),E(e("select",{"onUpdate:modelValue":t[2]||(t[2]=a=>b.value=a),class:"ui-field","data-size":"md",disabled:r.value||!o(v).supports("collaboration.set_model_policy")},[e("option",ce,l(o(s)("Agent decides (profile / workspace defaults)","由代理决定(配置 / 工作区默认值)")),1),e("option",pe,l(o(s)("Inherit requesting branch model","继承请求分支的模型")),1),w.value!=="agent"&&w.value!=="inherit"&&!x.value.some(a=>a.key===w.value)?(i(),n("option",{key:0,value:w.value,disabled:""},l(o(s)("Configured model unavailable","已配置模型不可用")),9,me)):y("",!0),(i(!0),n(U,null,B(x.value,a=>(i(),n("option",{key:a.key,value:a.key},l(a.label),9,fe))),128))],8,ve),[[z,b.value]])])])):y("",!0),d.value?(i(),n("section",he,[e("h3",null,l(o(s)("Command shell","命令 Shell")),1),e("p",null,l(o(s)("Used for new command invocations. Already running processes keep their shell.","用于新启动的命令。已运行的进程保留其原 Shell。")),1),e("label",null,[e("span",null,l(o(s)("Executable","可执行程序")),1),E(e("select",{"onUpdate:modelValue":t[3]||(t[3]=a=>c.value=a),class:"ui-field","data-size":"md",disabled:r.value||!o(v).supports("host.exec_shell.update")},[e("option",_e,l(o(s)("Automatic detection","自动检测")),1),c.value&&!d.value.shells.some(a=>a.executablePath===c.value)?(i(),n("option",{key:0,value:c.value,disabled:""},l(c.value)+" ("+l(o(s)("unavailable","不可用"))+")",9,ye)):y("",!0),(i(!0),n(U,null,B(d.value.shells,a=>(i(),n("option",{key:a.executablePath,value:a.executablePath},l(a.name)+" — "+l(a.executablePath),9,ge))),128))],8,be),[[z,c.value]])]),d.value.configError?(i(),n("p",xe,l(d.value.configError),1)):y("",!0)])):y("",!0),e("footer",ke,[e("button",{class:"ui-button","data-size":"md","data-variant":"primary",disabled:r.value||!S.value},l(o(s)("Save defaults","保存默认设置")),9,we)])],32)):y("",!0)])}}});export{Ae as default};
@@ -1 +0,0 @@
1
- .theme-options[data-v-93a5dc0f]{display:grid;grid-template-columns:repeat(3,1fr);gap:var(--space-3)}.theme-option[data-v-93a5dc0f]{display:flex;flex-direction:column;align-items:center;gap:var(--space-3);padding:var(--space-5);border:1px solid var(--border);border-radius:var(--radius-lg);background:transparent;color:var(--foreground);cursor:pointer}.theme-option.is-selected[data-v-93a5dc0f]{border-color:var(--primary);background:var(--primary-soft);color:var(--primary)}.theme-option[data-v-93a5dc0f]:focus-visible{outline:2px solid var(--primary);outline-offset:3px}label[data-v-93a5dc0f]{display:grid;gap:var(--space-2)}
@@ -1 +0,0 @@
1
- import{d as D,p as N,q as c,b as s,t as a,A as n,g as C,C as k,B as R,e as I,F as z,E as T,x as _,r as d,h as w,f as $,R as L,a as v}from"./vendor-vue-Ci9TYO_I.js";import{u as q}from"./settings-general-d_R-CH6R.js";import{_ as F,p as M}from"./GeneralSettingsStatus.vue_vue_type_script_setup_true_lang-DY1_UG_g.js";import{u as P,g as j,b as E,e as U}from"./index-BKJW0i9Q.js";import{m as A}from"./context-ChGKk1Cc.js";const O={class:"settings-page"},Q={"data-route-heading":"",tabindex:"-1"},G=["disabled"],H=["datetime"],J={class:"settings-actions"},K=["disabled","onClick"],W={key:0,role:"status"},X=["disabled"],Y=D({__name:"ArchivedSettings",setup(Z){const o=q(),g=P(),V=j(),l=d(),y=d(""),b=d(""),S=d(""),x=d(""),i=d(!1),m=d("");async function f(r=!1){var t,p;if(!i.value){i.value=!0,m.value="";try{const u=r?S.value:y.value.trim(),e=r?x.value:b.value.trim(),h=await g.client.call("session.catalog",{limit:50,withPreview:!0,...u?{query:u}:{},...e?{cwd:e}:{},...r&&((t=l.value)!=null&&t.nextCursor)?{cursor:l.value.nextCursor}:{}},M);l.value={sessions:r?[...((p=l.value)==null?void 0:p.sessions)??[],...h.sessions]:h.sessions,nextCursor:h.nextCursor},S.value=u,x.value=e}catch(u){m.value=A(u)}finally{i.value=!1}}}async function B(r){if(!(i.value||!window.confirm(o("Permanently delete this session and all its history? This cannot be undone.","永久删除此会话及其全部历史?此操作不可撤销。")))){i.value=!0,m.value="";try{await g.client.call("session.delete",{sessionId:r.sessionId},E),l.value&&(l.value.sessions=l.value.sessions.filter(t=>t.sessionId!==r.sessionId)),V.forget(r.sessionId)}catch(t){m.value=A(t)}finally{i.value=!1}}}return N(()=>f()),(r,t)=>{var p,u;return v(),c("article",O,[s("header",null,[s("h2",Q,a(n(o)("Saved sessions","已保存的会话")),1),s("p",null,a(n(o)("Browse persisted history, reopen sessions or permanently delete them. This runtime does not have a separate archived flag; closing a session keeps its saved history.","浏览持久化历史、重新打开会话或永久删除会话。当前运行时没有单独的归档标记;关闭会话会保留其已保存历史。")),1)]),s("form",{class:"settings-card settings-form",role:"search",onSubmit:t[2]||(t[2]=R(e=>f(),["prevent"]))},[s("label",null,[s("span",null,a(n(o)("Search history","搜索历史")),1),C(s("input",{"onUpdate:modelValue":t[0]||(t[0]=e=>y.value=e),class:"ui-field","data-size":"md",type:"search"},null,512),[[k,y.value]])]),s("label",null,[s("span",null,a(n(o)("Project directory (optional)","项目目录(可选)")),1),C(s("input",{"onUpdate:modelValue":t[1]||(t[1]=e=>b.value=e),class:"ui-field","data-size":"md",placeholder:"/path/to/project"},null,512),[[k,b.value]])]),s("button",{class:"ui-button","data-size":"md","data-variant":"secondary",disabled:i.value},a(n(o)("Search","搜索")),9,G)],32),I(F,{busy:i.value,error:m.value,onReload:t[3]||(t[3]=e=>f())},null,8,["busy","error"]),(v(!0),c(z,null,T((p=l.value)==null?void 0:p.sessions,e=>(v(),c("section",{key:e.sessionId,class:"settings-card"},[s("h3",null,a(e.preview||e.sessionId),1),s("p",null,[s("code",null,a(e.cwd),1)]),s("p",null,[s("time",{datetime:new Date(e.updatedAt).toISOString()},a(new Date(e.updatedAt).toLocaleString()),9,H),w(" · "+a(e.model.modelId),1),e.running?(v(),c(z,{key:0},[w(" · "+a(n(o)("Running","正在运行")),1)],64)):_("",!0)]),s("div",J,[I(n(L),{class:"ui-button","data-size":"md","data-variant":"secondary",to:{name:"chat-session",params:{sessionId:e.sessionId}}},{default:$(()=>[w(a(n(o)("Reopen","重新打开")),1)]),_:1},8,["to"]),s("button",{class:"ui-button","data-size":"md","data-variant":"danger-ghost",disabled:i.value||e.running||!n(g).supports("session.delete"),onClick:h=>B(e)},a(n(o)("Delete permanently","永久删除")),9,K)])]))),128)),l.value&&!l.value.sessions.length?(v(),c("p",W,a(n(o)("No matching saved sessions.","没有匹配的已保存会话。")),1)):_("",!0),(u=l.value)!=null&&u.nextCursor?(v(),c("button",{key:1,class:"ui-button","data-size":"md","data-variant":"secondary",disabled:i.value,onClick:t[4]||(t[4]=e=>f(!0))},a(n(o)("Load more","加载更多")),9,X)):_("",!0)])}}}),oe=U(Y,[["__scopeId","data-v-c4468e83"]]);export{oe as default};
@@ -1 +0,0 @@
1
- h3[data-v-c4468e83]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}code[data-v-c4468e83]{overflow-wrap:anywhere}
@@ -1 +0,0 @@
1
- dl div[data-v-1a86a8fd]{display:grid;grid-template-columns:minmax(120px,1fr) 2fr;gap:var(--space-3);margin-block:var(--space-3)}dd[data-v-1a86a8fd]{margin:0;overflow-wrap:anywhere}dt[data-v-1a86a8fd]{color:var(--muted-foreground)}.recording-toggle[data-v-1a86a8fd]{display:flex;align-items:center;gap:var(--space-2)}.feature-list[data-v-1a86a8fd]{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:var(--space-2);padding:0;list-style:none;font-size:var(--text-sm)}
@@ -1 +0,0 @@
1
- import{d as I,p as F,q as v,b as e,t as s,A as t,e as N,F as L,x as y,B as z,g as T,M as B,h as U,C as P,E as j,r,y as q,a as p}from"./vendor-vue-Ci9TYO_I.js";import{u as A}from"./settings-general-d_R-CH6R.js";import{_ as E,q as G,s as M}from"./GeneralSettingsStatus.vue_vue_type_script_setup_true_lang-DY1_UG_g.js";import{u as O,e as $}from"./index-BKJW0i9Q.js";import{b as H,m as V}from"./context-ChGKk1Cc.js";const J={class:"settings-page"},K={"data-route-heading":"",tabindex:"-1"},Q={class:"settings-card"},W=["disabled"],X={class:"recording-toggle"},Y=["disabled"],Z={class:"ui-banner settings-banner","data-tone":"warning"},ee={class:"settings-actions"},se=["disabled"],te={class:"settings-card"},ne={class:"settings-card"},ae={class:"feature-list"},oe={key:0},le=I({__name:"DiagnosticsSettings",setup(ie){const n=A(),a=O(),h=r(),w=r(),o=r(!1),m=r(""),_=r(""),l=r(),d=r(!1),f=r(!1),g=q(()=>l.value!==void 0&&d.value!==l.value.enabled);H(g);const C=q(()=>{var i;return((i=a.hello)==null?void 0:i.features.filter(u=>u.toLocaleLowerCase().includes(_.value.toLocaleLowerCase())).sort())??[]});async function b(){if(!o.value&&!(g.value&&!window.confirm(n("Discard unsaved recording settings?","放弃未保存的录制设置?")))){o.value=!0,m.value="",f.value=!1;try{const i=performance.now();h.value=await a.client.call("daemon.ping",{},G),w.value=Math.round(performance.now()-i),a.supports("settings.read")&&(l.value=await a.client.call("settings.read",{source:"model-log",scope:"user"},M),d.value=l.value.enabled)}catch(i){m.value=V(i)}finally{o.value=!1}}}async function D(){if(!(!l.value||!g.value||o.value)&&!(d.value&&!window.confirm(n("Record model requests and responses? Recordings include prompts, source code and tool output. Custom headers may contain secrets. The file has no automatic rotation.","录制模型请求和响应?录制包含提示词、源代码和工具输出。自定义请求头可能包含机密。文件不会自动轮换。")))){o.value=!0,m.value="",f.value=!1;try{l.value=await a.client.call("settings.update",{source:"model-log",scope:"user",expectedRevision:l.value.revision,document:{enabled:d.value}},M),d.value=l.value.enabled,f.value=!0}catch(i){m.value=V(i)}finally{o.value=!1}}}return F(b),(i,u)=>{var x,R,S,k;return p(),v("article",J,[e("header",null,[e("h2",K,s(t(n)("Diagnostics","诊断")),1),e("p",null,s(t(n)("Live connection and server information. This page never displays credentials or bootstrap tokens.","实时连接和服务器信息。此页面不会显示凭据或引导令牌。")),1)]),N(E,{busy:o.value,error:m.value,saved:f.value&&!g.value,onReload:b},null,8,["busy","error","saved"]),e("dl",Q,[e("div",null,[e("dt",null,s(t(n)("Server version","服务器版本")),1),e("dd",null,s(((x=t(a).hello)==null?void 0:x.serverVersion)??"—"),1)]),e("div",null,[e("dt",null,s(t(n)("Protocol","协议")),1),e("dd",null,s(((R=t(a).hello)==null?void 0:R.protocolVersion)??"—"),1)]),e("div",null,[e("dt",null,s(t(n)("Instance","实例")),1),e("dd",null,[e("code",null,s(((S=t(a).hello)==null?void 0:S.instanceId)??"—"),1)])]),e("div",null,[e("dt",null,s(t(n)("Connection","连接")),1),e("dd",null,s(t(a).phase),1)]),h.value?(p(),v(L,{key:0},[e("div",null,[e("dt",null,s(t(n)("Sessions","会话")),1),e("dd",null,s(h.value.sessions),1)]),e("div",null,[e("dt",null,s(t(n)("Connections","连接数")),1),e("dd",null,s(h.value.connections),1)]),e("div",null,[e("dt",null,s(t(n)("Round trip","往返延迟")),1),e("dd",null,s(w.value)+" ms",1)])],64)):y("",!0)]),e("button",{class:"ui-button","data-size":"md","data-variant":"secondary",disabled:o.value,onClick:b},s(t(n)("Refresh diagnostics","刷新诊断")),9,W),l.value?(p(),v("form",{key:0,class:"settings-card settings-form",onSubmit:z(D,["prevent"])},[e("h3",null,s(t(n)("Model request recording","模型请求录制")),1),e("p",null,s(t(n)("Changes apply to new model requests without restarting. In-flight requests finish with their existing recorder. Records are written to model-log/recordings.jsonl in the daemon execution home.","更改适用于新模型请求,无需重启。正在进行的请求继续使用原录制器。记录写入守护进程执行目录中的 model-log/recordings.jsonl。")),1),e("label",X,[T(e("input",{"onUpdate:modelValue":u[0]||(u[0]=c=>d.value=c),type:"checkbox",disabled:o.value||!t(a).supports("settings.update")},null,8,Y),[[B,d.value]]),U(s(t(n)("Record model requests and responses","录制模型请求和响应")),1)]),e("p",Z,s(t(n)("Recordings contain prompts, code and tool output. Custom headers may contain secrets. Files are private but have no automatic size limit or rotation.","录制包含提示词、代码和工具输出。自定义请求头可能包含机密。文件为私有文件,但没有自动大小限制或轮换。")),1),e("div",ee,[e("button",{class:"ui-button","data-size":"md","data-variant":"primary",disabled:o.value||!g.value||!t(a).supports("settings.update")},s(t(n)("Save recording settings","保存录制设置")),9,se)])],32)):y("",!0),e("section",te,[e("h3",null,s(t(n)("Process logs","进程日志")),1),e("p",null,s(t(n)("RUST_LOG controls process logging at daemon startup. CLI-started daemons write daemon.log. The Timeline remains the durable execution history; request recording above is an independent, opt-in diagnostic stream.","RUST_LOG 在守护进程启动时控制进程日志。CLI 启动的守护进程写入 daemon.log。时间线保留持久执行历史;上方的请求录制是独立且需主动启用的诊断流。")),1)]),e("section",ne,[e("h3",null,s(t(n)("Advertised methods","已声明的方法"))+" ("+s(((k=t(a).hello)==null?void 0:k.features.length)??0)+")",1),e("label",null,[e("span",null,s(t(n)("Filter methods","筛选方法")),1),T(e("input",{"onUpdate:modelValue":u[1]||(u[1]=c=>_.value=c),class:"ui-field","data-size":"md",type:"search"},null,512),[[P,_.value]])]),e("ul",ae,[(p(!0),v(L,null,j(C.value,c=>(p(),v("li",{key:c},[e("code",null,s(c),1)]))),128))]),C.value.length?y("",!0):(p(),v("p",oe,s(t(n)("No matching methods.","没有匹配的方法。")),1))])])}}}),pe=$(le,[["__scopeId","data-v-1a86a8fd"]]);export{pe as default};
@@ -1 +0,0 @@
1
- import{P as p,r as w}from"./index-BKJW0i9Q.js";import{u as k}from"./settings-general-d_R-CH6R.js";import{d as C,q as v,F as I,t as g,A as b,x as y,h as S,b as P,a as h}from"./vendor-vue-Ci9TYO_I.js";function s(n){if(n===null||typeof n!="object"||Array.isArray(n))throw new p("Invalid settings reply: expected object");return n}function r(n){if(typeof n!="string")throw new p("Invalid settings reply: expected string");return n}function d(n){if(typeof n!="boolean")throw new p("Invalid settings reply: expected boolean");return n}function l(n){if(typeof n!="number"||!Number.isSafeInteger(n)||n<0)throw new p("Invalid settings reply: expected nonnegative integer");return n}function a(n,e){if(!Array.isArray(n))throw new p("Invalid settings reply: expected array");return n.map(e)}function c(n){return n==null?void 0:r(n)}function f(n,e){const o=r(n);if(!e.includes(o))throw new p("Invalid settings reply: unknown option");return o}function V(n){const e=s(n);return e.selection===null?void 0:M(e.selection)}function M(n){const e=s(n);return{providerId:r(e.provider_id),modelId:r(e.model_id),version:l(e.version)}}function q(n){const e=s(n),o=s(e.policy),t=f(o.mode,["agent","inherit","fixed"]);if(t!=="fixed")return{revision:r(e.revision),policy:{mode:t}};const i=s(o.model);return{revision:r(e.revision),policy:{mode:t,model:{providerId:r(i.providerId),modelId:r(i.modelId)}}}}function z(n){const e=s(n);return{revision:r(e.revision),executablePath:c(e.executablePath),configError:c(e.configError),shells:a(e.shells,o=>{const t=s(o);return{executablePath:r(t.executablePath),name:r(t.name)}})}}function D(n){const e=s(n);return{revision:r(e.revision),commandRules:a(e.commandRules,o=>{const t=s(o);return{command:r(t.command),match:f(t.match,["exact","prefix"]),decision:f(t.decision,["allow","deny"])}})}}function F(n){return r(s(n).revision)}function L(n){const e=s(n);return{version:l(e.version),entries:a(e.entries,o=>{const t=s(o);return{id:r(t.id),name:r(t.name),description:r(t.description),filePath:r(t.filePath),allowedTools:a(t.allowedTools,r),enabled:d(t.enabled),shadowedBy:c(t.shadowedBy)}}),issues:a(e.issues,o=>{const t=s(o);return{path:r(t.path),message:r(t.message)}})}}function $(n){return a(n,e=>{const o=s(e);return{name:r(o.name),use:c(o.use),off:d(o.off),locked:d(o.locked),status:c(o.status),error:c(o.error),candidates:a(o.candidates,t=>{const i=s(t),u=i.source===void 0?void 0:s(i.source);return{id:r(i.id),kinds:a(i.kinds,r),git:u===void 0?void 0:c(u.git)}}),refused:o.refused===void 0?[]:a(o.refused,t=>{const i=s(t);return{kind:r(i.kind),error:r(i.error)}})}})}function G(n){const e=s(n);return{userRevision:r(e.userRevision),projectRevision:c(e.projectRevision),servers:a(e.servers,o=>{const t=s(o);return{id:r(t.id),source:f(t.source,["user","project","plugin"]),enabled:d(t.enabled),transport:r(t.transport),auth:t.auth===void 0?void 0:r(s(t.auth).status)}}),errors:[e.userApplication,e.pluginApplication,e.projectApplication].flatMap(o=>{if(o===null)return[];const t=s(o);return[c(t.error),c(t.cleanupError)].filter(i=>i!==void 0)})}}function R(n){const e=s(n),o=f(e.type,["stdio","http","sse"]);if(o==="stdio")return{type:o,command:r(e.command),argsCount:l(e.argsCount),cwd:c(e.cwd),envNames:a(e.envNames,r)};const t=e.oauth===null?void 0:s(e.oauth);return{type:o,endpoint:r(e.endpoint),headerNames:a(e.headerNames,r),authConfigured:d(e.authConfigured),oauthConfigured:d(e.oauthConfigured),oauth:t===void 0?void 0:{clientId:c(t.clientId),callbackPort:t.callbackPort===null?void 0:l(t.callbackPort),scopes:c(t.scopes),metadataConfigured:d(t.metadataConfigured)}}}function x(n){const e=s(n);return{name:r(e.name),description:c(e.description)}}function W(n){const e=s(n);return{enabled:d(e.enabled),configuration:R(e.configuration),connections:a(e.connections,o=>{const t=s(o),i=s(t.state),u=f(i.status,["disconnected","connecting","connected","failed","closed","auth_required"]);return{state:u,expired:u==="auth_required"?d(i.expired):void 0,tools:t.tools===null?void 0:a(t.tools,x)}})}}function H(n){return{tools:a(s(n).tools,x)}}function J(n){const e=s(n),o=r(e.authorizationUrl),t=new URL(o);if(!["https:","http:"].includes(t.protocol)||t.username||t.password)throw new p("Invalid MCP authorization URL");return{attemptId:r(e.attemptId),authorizationUrl:o,redirectUri:r(e.redirectUri),expiresAt:l(e.expiresAt)}}function K(n){const e=s(n);return{sessions:w(e.sessions),nextCursor:c(e.nextCursor)}}function O(n){const e=s(n);return{sessions:l(e.sessions),connections:l(e.connections),serverVersion:r(e.serverVersion)}}function Q(n){const e=s(n);return{revision:r(e.revision),enabled:d(s(e.document).enabled)}}function X(n){const e=s(n),o=s(e.document);return{revision:r(e.revision),sandbox:d(o.sandbox),network:d(o.network)}}function Y(n){const e=s(n);if(e.catalog!==null)return A(e.catalog)}function A(n){const e=s(n);return{version:l(e.version),models:a(e.models,o=>{const t=s(o),i=s(t.capabilities),u=t.metadata===null||t.metadata===void 0?void 0:s(t.metadata),m=(u==null?void 0:u.raw)===void 0?void 0:s(u.raw);return{id:r(t.id),name:r(t.name),vision:d(i.vision),toolCalling:d(i.toolCalling),modalities:(m==null?void 0:m.modalityCapabilities)===void 0?[]:a(m.modalityCapabilities,r)}})}}const j={key:0,class:"ui-banner settings-banner",role:"status"},E={key:1,class:"ui-banner settings-banner","data-tone":"danger",role:"alert"},N=["disabled"],B={key:2,class:"ui-banner settings-banner","data-tone":"success",role:"status"},Z=C({__name:"GeneralSettingsStatus",props:{busy:{type:Boolean},error:{},saved:{type:Boolean}},emits:["reload"],setup(n){const e=k();return(o,t)=>(h(),v(I,null,[n.busy?(h(),v("p",j,g(b(e)("Working…","正在处理…")),1)):y("",!0),n.error?(h(),v("p",E,[S(g(n.error)+" ",1),P("button",{class:"ui-button","data-size":"sm","data-variant":"secondary",type:"button",disabled:n.busy,onClick:t[0]||(t[0]=i=>o.$emit("reload"))},g(b(e)("Reload","重新加载")),9,N)])):y("",!0),n.saved&&!n.error?(h(),v("p",B,g(b(e)("Saved","已保存")),1)):y("",!0)],64))}});export{Z as _,q as a,z as b,M as c,F as d,Y as e,A as f,W as g,H as h,J as i,G as j,R as k,$ as l,L as m,D as n,X as o,K as p,O as q,V as r,Q as s};
@@ -1 +0,0 @@
1
- fieldset[data-v-911186f7]{display:grid;gap:var(--space-4);min-width:0;padding:0;border:0}label[data-v-911186f7]{display:grid;gap:var(--space-2)}.checkbox-label[data-v-911186f7],.argument-row[data-v-911186f7]{display:flex;align-items:center;gap:var(--space-2)}.argument-row[data-v-911186f7]{margin-block:var(--space-2)}.argument-row input[data-v-911186f7]{flex:1;min-width:0}.secret-row[data-v-911186f7]{display:grid;grid-template-columns:1fr auto 1fr auto;gap:var(--space-2);margin-block:var(--space-3)}.search-label[data-v-911186f7]{margin-block:var(--space-4)}.runtime-detail[data-v-911186f7]{border-top:1px solid var(--border);padding-top:var(--space-3)}code[data-v-911186f7],li p[data-v-911186f7]{overflow-wrap:anywhere}@media(max-width:700px){.secret-row[data-v-911186f7]{grid-template-columns:1fr 1fr}}
@@ -1 +0,0 @@
1
- import{d as me,w as be,p as he,o as fe,q as u,b as e,t as a,A as t,g as y,C as k,B as Q,e as ye,F as C,E as R,h as P,x as v,D as I,M as se,r as _,y as B,a as d}from"./vendor-vue-Ci9TYO_I.js";import{u as ge}from"./settings-general-d_R-CH6R.js";import{_ as ke,g as ie,h as _e,i as we,j as ue,k as Ce}from"./GeneralSettingsStatus.vue_vue_type_script_setup_true_lang-DY1_UG_g.js";import{u as Ae,b as O,e as Ue}from"./index-BKJW0i9Q.js";import{b as ze,m as D}from"./context-ChGKk1Cc.js";const Se={class:"settings-page"},Pe=["disabled"],Ve={class:"settings-actions"},Me=["disabled"],xe=["disabled"],Re={key:0,class:"settings-card settings-form","aria-live":"polite"},Ie={key:0},De={key:2,role:"status"},Ee={key:0},Oe={key:0},Te={key:1},Ne={key:2},$e={key:3},Le=["disabled"],je={class:"settings-actions"},qe=["disabled"],Be=["disabled"],Fe=["disabled"],Ke=["disabled"],He=["disabled"],Je=["disabled"],We={value:"user"},Ge={key:0,value:"project"},Qe={key:0},Xe=["disabled"],Ye={key:0},Ze={value:"keep"},et={value:"replace"},tt={key:1},at=["onUpdate:modelValue","aria-label"],nt=["onClick"],lt={key:0},ot=["required"],st={class:"checkbox-label"},it=["disabled"],ut={key:0},dt={key:2},rt={value:"keep"},ct={value:"set"},pt={value:"remove"},vt={key:3,class:"settings-form"},mt={key:0},bt={value:"keep"},ht={value:"set"},ft={value:"remove"},yt={key:1},gt=["required"],kt={key:3},_t={value:"keep"},wt=["disabled"],Ct={value:"remove"},At={key:0},Ut=["onUpdate:modelValue","aria-label","readonly"],zt=["onUpdate:modelValue","aria-label"],St={key:0,value:"keep"},Pt={value:"set"},Vt={key:1,value:"remove"},Mt=["onUpdate:modelValue","aria-label"],xt=["onClick"],Rt={key:4,class:"checkbox-label"},It={key:5},Dt={key:6},Et={class:"settings-actions"},Ot=["disabled"],Tt=["disabled"],Nt={key:2,class:"settings-card",role:"status"},$t={key:0},Lt={key:0},jt={key:3,class:"settings-card"},qt=["href"],Bt=["disabled"],Ft={class:"settings-actions"},Kt=["disabled"],Ht=["disabled"],Jt={class:"search-label"},Wt={class:"settings-actions"},Gt=["disabled","onClick"],Qt=["disabled","onClick"],Xt=["disabled","onClick"],Yt=["disabled","onClick"],Zt=["disabled","onClick"],ea=["disabled","onClick"],ta=["disabled","onClick"],aa=["disabled","onClick"],na={key:0},la={key:4,role:"status"},oa=me({__name:"McpSettings",setup(sa){const n=ge(),h=Ae(),z=_(),F=_(""),$=_(""),p=_(!1),g=_(""),i=_(),K=_(""),f=_(!1),H=_(""),U=_(),X=_(""),M=_(""),S=_(""),m=_(),V=_(),Y=_(),J=_("");let Z=!0;const x=B(()=>i.value!==void 0&&JSON.stringify(i.value)!==K.value),de=B(()=>i.value!==void 0&&(f.value?i.value.oauthAction==="set"||i.value.oauthAction==="keep"&&i.value.oauth:i.value.oauth)),ee=B(()=>{var s;return((s=z.value)==null?void 0:s.servers.filter(o=>o.id.toLocaleLowerCase().includes(J.value.toLocaleLowerCase())))??[]});ze(B(()=>x.value||!!S.value||!!M.value)),be(i,()=>{V.value=void 0},{deep:!0});function T(){return $.value?{cwd:$.value}:{}}function N(s){return{...T(),id:s.id,source:s.source}}function L(s){var b,r;const o=s==="user"?(b=z.value)==null?void 0:b.userRevision:(r=z.value)==null?void 0:r.projectRevision;if(o===void 0)throw new Error(n("Load the project catalog before editing it.","编辑项目前请先加载项目目录。"));return o}async function j(){z.value=await h.client.call("mcp.catalog",T(),ue)}async function q(){var o;if(!m.value)return;const s=(o=z.value)==null?void 0:o.servers.find(b=>{var r;return b.id===((r=m.value)==null?void 0:r.server.id)&&b.source===m.value.server.source});if(!s){m.value=void 0;return}m.value={server:s,inspection:await h.client.call("mcp.inspect",N(s),ie)}}async function te(s){if(!p.value&&!(S.value&&!window.confirm(n("Discard the entered OAuth client secret?","放弃已输入的 OAuth 客户端密钥?")))){p.value=!0,g.value="";try{m.value={server:s,inspection:await h.client.call("mcp.inspect",N(s),ie)},S.value=""}catch(o){g.value=D(o)}finally{p.value=!1}}}async function W(){if(!p.value&&!(x.value&&!window.confirm(n("Discard unsaved MCP configuration?","放弃未保存的 MCP 配置?")))){p.value=!0,g.value="";try{if(!h.supports("mcp.catalog"))throw new Error(n("MCP management is not available on this server.","此服务器不支持 MCP 管理。"));const s=F.value.trim(),o=await h.client.call("mcp.catalog",s?{cwd:s}:{},ue);$.value=s,z.value=o,i.value=void 0,m.value=void 0,S.value="",V.value=void 0}catch(s){g.value=D(s)}finally{p.value=!1}}}function re(){x.value&&!window.confirm(n("Discard unsaved MCP configuration?","放弃未保存的 MCP 配置?"))||(i.value={id:"",source:"user",type:"stdio",command:"",args:[],argsAction:"replace",storedArgsCount:0,cwd:"",url:"",secrets:[],enabled:!1,oauth:!1,clientId:"",token:"",bearerAction:"keep",authConfigured:!1,oauthAction:"keep",callbackPort:"",scopes:"",metadataUrl:"",metadataConfigured:!1,metadataAction:"keep"},K.value=JSON.stringify(i.value),f.value=!1,H.value=L("user"))}async function ce(s){var o,b,r,A;if(!(s.source==="plugin"||p.value)&&!(x.value&&!window.confirm(n("Discard unsaved MCP configuration?","放弃未保存的 MCP 配置?")))){p.value=!0,g.value="";try{const l=L(s.source),c=await h.client.call("mcp.configuration",N(s),Ce);i.value={id:s.id,source:s.source,type:c.type,command:c.type==="stdio"?c.command:"",args:[],argsAction:"keep",storedArgsCount:c.type==="stdio"?c.argsCount:0,cwd:c.type==="stdio"?c.cwd??"":"",url:"",...c.type!=="stdio"?{endpoint:c.endpoint}:{},secrets:(c.type==="stdio"?c.envNames:c.headerNames).map(w=>({name:w,action:"keep",value:"",stored:!0})),enabled:s.enabled,oauth:c.type!=="stdio"&&c.oauthConfigured,authConfigured:c.type!=="stdio"&&c.authConfigured,clientId:c.type!=="stdio"?((o=c.oauth)==null?void 0:o.clientId)??"":"",callbackPort:c.type!=="stdio"?String(((b=c.oauth)==null?void 0:b.callbackPort)??""):"",scopes:c.type!=="stdio"?((r=c.oauth)==null?void 0:r.scopes)??"":"",metadataConfigured:c.type!=="stdio"&&(((A=c.oauth)==null?void 0:A.metadataConfigured)??!1),metadataUrl:"",metadataAction:"keep",token:"",bearerAction:"keep",oauthAction:"keep"},f.value=!0,H.value=l,K.value=JSON.stringify(i.value)}catch(l){g.value=D(l)}finally{p.value=!1}}}function pe(){x.value&&!window.confirm(n("Discard unsaved MCP configuration?","放弃未保存的 MCP 配置?"))||(i.value=void 0)}function ae(s){const o=Object.fromEntries(s.secrets.filter(A=>A.action==="set").map(A=>[A.name.trim(),A.value])),b=s.source==="user"&&s.enabled;if(s.type==="stdio")return{type:"stdio",command:s.command,args:s.args,...s.cwd?{cwd:s.cwd}:{},env:o,enabled:b};const r={...s.clientId.trim()?{clientId:s.clientId.trim()}:{},...s.callbackPort?{callbackPort:Number(s.callbackPort)}:{},...s.scopes.trim()?{scopes:s.scopes.trim()}:{},...s.metadataUrl.trim()?{authServerMetadataUrl:s.metadataUrl.trim()}:{}};return{type:s.type,url:s.url.trim(),headers:o,enabled:b,...s.token?{auth:{type:"bearer",token:s.token}}:{},...s.oauth?{oauth:r}:{}}}function ne(s){const o=Object.fromEntries(s.secrets.filter(r=>r.action!=="keep").map(r=>[r.name.trim(),r.action==="remove"?null:r.value]));if(s.type==="stdio")return{command:s.command,...s.argsAction==="replace"?{args:s.args}:{},cwd:s.cwd,env:o};const b={...s.url.trim()?{url:s.url.trim()}:{},headers:o};return s.bearerAction!=="keep"&&(b.bearer=s.bearerAction==="remove"?{action:"remove"}:{action:"set",token:s.token}),s.oauthAction==="remove"&&(b.oauth={action:"remove"}),s.oauthAction==="set"&&(b.oauth={action:"set",clientId:s.clientId.trim()||null,callbackPort:s.callbackPort?Number(s.callbackPort):null,scopes:s.scopes.trim()||null,...s.metadataAction==="remove"?{authServerMetadataUrl:null}:s.metadataAction==="set"?{authServerMetadataUrl:s.metadataUrl.trim()}:{}}),b}function le(s){var b;const o=s.secrets.map(r=>r.name.trim());return o.some(r=>!r)||new Set(o).size!==o.length?(g.value=n("Secret field names must be nonempty and unique.","机密字段名称不能为空且必须唯一。"),!1):((b=Y.value)==null?void 0:b.reportValidity())??!1}async function ve(){var o;const s=i.value;if(!(!s||p.value||!x.value)&&(g.value="",!!le(s))){if(!f.value&&((o=z.value)!=null&&o.servers.some(b=>b.id===s.id.trim()))){g.value=n("This ID already exists in the effective catalog. Edit the existing entry instead.","此 ID 已存在于有效目录中。请编辑现有条目。");return}if(!(!f.value&&s.source==="user"&&s.enabled&&!window.confirm(n("Enabling this server permits its configured command or network connection to run. Continue?","启用此服务器将允许运行其配置命令或网络连接。是否继续?")))){p.value=!0;try{f.value?await h.client.call("mcp.update",{...T(),id:s.id,source:s.source,expectedVersion:H.value,patch:ne(s)},O):await h.client.call("mcp.save",{...T(),id:s.id.trim(),source:s.source,expectedVersion:L(s.source),configuration:ae(s)},O),i.value=void 0,await j(),await q()}catch(b){g.value=D(b)}finally{p.value=!1}}}}async function G(s){if(p.value)return;g.value="";let o,b;if(s)o=N(s),b=s.id;else{const r=i.value;if(!r||!le(r))return;o={...T(),id:r.id.trim(),source:r.source,...f.value?{patch:ne(r)}:{configuration:ae(r)}},b=r.id}if(window.confirm(n("Open a temporary connection and list tools? This executes the configured command or contacts its endpoint. No configuration is saved and the connection is closed after the test.","打开临时连接并列出工具?这会执行配置的命令或连接端点。测试不会保存设置,且会在结束后关闭连接。"))){p.value=!0,V.value=void 0;try{const r=await h.client.call("mcp.test",o,_e);V.value={id:b,tools:r.tools},await j(),await q()}catch(r){g.value=D(r)}finally{p.value=!1}}}async function E(s,o){var b;if(!p.value&&!(s==="mcp.remove"&&!window.confirm(n("Remove this server configuration?","移除此服务器配置?")))&&!(s==="mcp.set_enabled"&&!o.enabled&&!window.confirm(n("Enabling this server permits its configured command or network connection to run. Continue?","启用此服务器将允许运行其配置命令或网络连接。是否继续?")))){p.value=!0,g.value="";try{const r=N(o);if(s==="mcp.set_enabled"||s==="mcp.remove"){if(o.source==="plugin")return;r.expectedVersion=L(o.source),s==="mcp.set_enabled"&&(r.enabled=!o.enabled)}if(s==="mcp.auth.start"){((b=m.value)==null?void 0:b.server.id)===o.id&&m.value.server.source===o.source&&S.value&&(r.clientSecret=S.value);const A=await h.client.call(s,r,we);if(!Z){await h.client.call("mcp.auth.cancel",{attemptId:A.attemptId},O);return}U.value=A,X.value=o.id}else await h.client.call(s,r,O);await j(),await q()}catch(r){g.value=D(r)}finally{s==="mcp.auth.start"&&(S.value=""),p.value=!1}}}async function oe(s=!1){if(!(!U.value||!s&&!M.value||p.value)){p.value=!0,g.value="";try{await h.client.call(s?"mcp.auth.cancel":"mcp.auth.complete",{attemptId:U.value.attemptId,...s?{}:{callbackUrl:M.value}},O),M.value="",U.value=void 0,await j(),await q()}catch(o){g.value=D(o)}finally{p.value=!1}}}return he(W),fe(()=>{Z=!1,M.value="",S.value="",U.value&&h.client.call("mcp.auth.cancel",{attemptId:U.value.attemptId},O).catch(()=>{})}),(s,o)=>{var b,r,A;return d(),u("article",Se,[e("header",null,[o[30]||(o[30]=e("h2",{"data-route-heading":"",tabindex:"-1"},"MCP",-1)),e("p",null,a(t(n)("Manage command and remote MCP servers. Project servers stay disabled until you explicitly enable them locally.","管理命令和远程 MCP 服务器。项目服务器默认禁用,只有您在本地明确启用后才会运行。")),1)]),e("form",{class:"settings-card settings-form",onSubmit:Q(W,["prevent"])},[e("label",null,[e("span",null,a(t(n)("Project directory (optional, absolute path)","项目目录(可选,绝对路径)")),1),y(e("input",{"onUpdate:modelValue":o[0]||(o[0]=l=>F.value=l),class:"ui-field","data-size":"md",disabled:p.value},null,8,Pe),[[k,F.value]])]),e("div",Ve,[e("button",{class:"ui-button","data-size":"md","data-variant":"secondary",disabled:p.value},a(t(n)("Load / refresh","加载 / 刷新")),9,Me),e("button",{class:"ui-button","data-size":"md","data-variant":"primary",type:"button",disabled:p.value||!z.value||!t(h).supports("mcp.save"),onClick:re},a(t(n)("Add server","添加服务器")),9,xe)])],32),ye(ke,{busy:p.value,error:g.value,onReload:W},null,8,["busy","error"]),(d(!0),u(C,null,R((b=z.value)==null?void 0:b.errors,l=>(d(),u("p",{key:l,class:"ui-banner settings-banner","data-tone":"warning"},a(l),1))),128)),m.value?(d(),u("section",Re,[e("h3",null,a(t(n)("Server details","服务器详情"))+": "+a(m.value.server.id),1),e("p",null,a(m.value.server.source)+" · "+a(m.value.server.transport)+" · "+a(m.value.inspection.enabled?t(n)("Enabled","已启用"):t(n)("Disabled","已禁用")),1),m.value.inspection.configuration.type==="stdio"?(d(),u(C,{key:0},[e("p",null,[P(a(t(n)("Executable","可执行程序"))+": ",1),e("code",null,a(m.value.inspection.configuration.command),1)]),e("p",null,a(t(n)("Stored arguments (hidden)","已存参数(隐藏)"))+": "+a(m.value.inspection.configuration.argsCount),1),e("p",null,a(t(n)("Working directory","工作目录"))+": "+a(m.value.inspection.configuration.cwd||t(n)("Daemon directory","守护进程目录")),1),e("p",null,a(t(n)("Environment names","环境变量名"))+": "+a(m.value.inspection.configuration.envNames.join(", ")||"—"),1)],64)):(d(),u(C,{key:1},[e("p",null,[P(a(t(n)("Endpoint (origin only)","端点(仅来源)"))+": ",1),e("code",null,a(m.value.inspection.configuration.endpoint),1)]),e("p",null,a(t(n)("Header names","请求头名称"))+": "+a(m.value.inspection.configuration.headerNames.join(", ")||"—"),1),e("p",null,a(t(n)("Stored bearer token","已存储的 Bearer 令牌"))+": "+a(m.value.inspection.configuration.authConfigured?t(n)("Configured","已配置"):t(n)("None","无")),1),(r=m.value.inspection.configuration.oauth)!=null&&r.clientId?(d(),u("p",Ie,"OAuth client ID: "+a(m.value.inspection.configuration.oauth.clientId),1)):v("",!0)],64)),e("p",null,a(t(n)("Connection snapshots do not open a connection. Tool lists are the last successful discovery for each live connection generation.","查看快照不会打开连接。工具列表来自每个活动连接代次最近一次成功的发现。")),1),m.value.inspection.connections.length?v("",!0):(d(),u("p",De,a(t(n)("No live session connections. Use Test connection to discover tools without creating a session.","没有活动会话连接。可通过“测试连接”发现工具,无需创建会话。")),1)),(d(!0),u(C,null,R(m.value.inspection.connections,(l,c)=>(d(),u("section",{key:c,class:"runtime-detail"},[e("h4",null,[P(a(t(n)("Connection","连接"))+" "+a(c+1)+" · "+a(l.state),1),l.expired?(d(),u(C,{key:0},[P(" · "+a(t(n)("Credential expired","凭据已过期")),1)],64)):v("",!0)]),l.tools?(d(),u("ul",Ee,[(d(!0),u(C,null,R(l.tools,w=>(d(),u("li",{key:w.name},[e("strong",null,a(w.name),1),w.description?(d(),u("p",Oe,a(w.description),1)):v("",!0)]))),128))])):v("",!0),l.tools===void 0?(d(),u("p",Te,a(t(n)("Tools have not been discovered.","尚未发现工具。")),1)):l.tools.length?v("",!0):(d(),u("p",Ne,a(t(n)("The server exposes no tools.","服务器没有提供工具。")),1))]))),128)),m.value.inspection.configuration.type!=="stdio"&&((A=m.value.inspection.configuration.oauth)!=null&&A.clientId)?(d(),u("label",$e,[e("span",null,a(t(n)("OAuth client secret (optional, sent once on Sign in)","OAuth 客户端密钥(可选,仅在登录时发送一次)")),1),y(e("input",{"onUpdate:modelValue":o[1]||(o[1]=l=>S.value=l),class:"ui-field","data-size":"md",type:"password",autocomplete:"new-password",disabled:p.value},null,8,Le),[[k,S.value]])])):v("",!0),e("div",je,[e("button",{class:"ui-button","data-size":"md","data-variant":"secondary",disabled:p.value,onClick:o[2]||(o[2]=l=>te(m.value.server))},a(t(n)("Refresh details","刷新详情")),9,qe),e("button",{class:"ui-button","data-size":"md","data-variant":"secondary",disabled:p.value||!t(h).supports("mcp.test")||m.value.server.source!=="user"&&!m.value.server.enabled,onClick:o[3]||(o[3]=l=>G(m.value.server))},a(t(n)("Test connection","测试连接")),9,Be),m.value.server.transport!=="stdio"?(d(),u("button",{key:0,class:"ui-button","data-size":"md","data-variant":"secondary",disabled:p.value||!!U.value||!m.value.server.enabled||!t(h).supports("mcp.auth.start"),onClick:o[4]||(o[4]=l=>E("mcp.auth.start",m.value.server))},a(t(n)("Sign in","登录")),9,Fe)):v("",!0)])])):v("",!0),i.value?(d(),u("form",{key:1,ref_key:"editorForm",ref:Y,class:"settings-card settings-form",autocomplete:"off",onSubmit:Q(ve,["prevent"])},[e("h3",null,a(f.value?t(n)("Edit server","编辑服务器"):t(n)("New server","新服务器")),1),e("fieldset",{disabled:p.value},[e("label",null,[e("span",null,a(t(n)("Server ID","服务器 ID")),1),y(e("input",{"onUpdate:modelValue":o[5]||(o[5]=l=>i.value.id=l),class:"ui-field","data-size":"md",disabled:f.value,required:""},null,8,He),[[k,i.value.id]])]),e("label",null,[e("span",null,a(t(n)("Source","来源")),1),y(e("select",{"onUpdate:modelValue":o[6]||(o[6]=l=>i.value.source=l),class:"ui-field","data-size":"md",disabled:f.value},[e("option",We,a(t(n)("User","用户")),1),$.value?(d(),u("option",Ge,a(t(n)("Project","项目")),1)):v("",!0)],8,Je),[[I,i.value.source]])]),f.value?(d(),u("p",Qe,a(t(n)("The source and transport are fixed. Changes write only this source; moving between user and project scopes is not an atomic owner operation.","来源和传输方式固定。更改只写入此来源;在用户和项目范围之间迁移不是所有者支持的原子操作。")),1)):v("",!0),e("label",null,[e("span",null,a(t(n)("Transport","传输方式")),1),y(e("select",{"onUpdate:modelValue":o[7]||(o[7]=l=>i.value.type=l),class:"ui-field","data-size":"md",disabled:f.value},[...o[31]||(o[31]=[e("option",{value:"stdio"},"stdio",-1),e("option",{value:"http"},"HTTP",-1),e("option",{value:"sse"},"SSE",-1)])],8,Xe),[[I,i.value.type]])]),i.value.type==="stdio"?(d(),u(C,{key:1},[e("label",null,[e("span",null,a(t(n)("Executable","可执行程序")),1),y(e("input",{"onUpdate:modelValue":o[8]||(o[8]=l=>i.value.command=l),class:"ui-field","data-size":"md",required:""},null,512),[[k,i.value.command]])]),e("label",null,[e("span",null,a(t(n)("Working directory (optional)","工作目录(可选)")),1),y(e("input",{"onUpdate:modelValue":o[9]||(o[9]=l=>i.value.cwd=l),class:"ui-field","data-size":"md"},null,512),[[k,i.value.cwd]])]),f.value?(d(),u("label",Ye,[e("span",null,a(t(n)("Stored arguments (hidden)","已存参数(隐藏)"))+": "+a(i.value.storedArgsCount),1),y(e("select",{"onUpdate:modelValue":o[10]||(o[10]=l=>i.value.argsAction=l),class:"ui-field"},[e("option",Ze,a(t(n)("Keep stored arguments","保留已存参数")),1),e("option",et,a(t(n)("Replace all arguments","替换全部参数")),1)],512),[[I,i.value.argsAction]])])):v("",!0),!f.value||i.value.argsAction==="replace"?(d(),u("div",tt,[e("strong",null,a(t(n)("Arguments (one per field)","参数(每个字段一个)")),1),(d(!0),u(C,null,R(i.value.args,(l,c)=>(d(),u("div",{key:c,class:"argument-row"},[y(e("input",{"onUpdate:modelValue":w=>i.value.args[c]=w,class:"ui-field","data-size":"md",type:"password",autocomplete:"new-password","aria-label":t(n)("Argument","参数")},null,8,at),[[k,i.value.args[c]]]),e("button",{class:"ui-button","data-size":"md","data-variant":"secondary",type:"button",onClick:w=>i.value.args.splice(c,1)},a(t(n)("Remove","移除")),9,nt)]))),128)),e("button",{class:"ui-button","data-size":"sm","data-variant":"secondary",type:"button",onClick:o[11]||(o[11]=l=>i.value.args.push(""))},a(t(n)("Add argument","添加参数")),1)])):v("",!0)],64)):(d(),u(C,{key:2},[f.value?(d(),u("p",lt,a(t(n)("Current endpoint","当前端点"))+": "+a(i.value.endpoint)+" — "+a(t(n)("Path and credentials are hidden.","路径和凭据已隐藏。")),1)):v("",!0),e("label",null,[e("span",null,a(f.value?t(n)("Replace URL (blank preserves the stored URL)","替换 URL(留空保留已存储的 URL)"):"URL"),1),y(e("input",{"onUpdate:modelValue":o[12]||(o[12]=l=>i.value.url=l),class:"ui-field","data-size":"md",type:"url",required:!f.value,autocomplete:"off"},null,8,ot),[[k,i.value.url]])]),f.value?v("",!0):(d(),u(C,{key:1},[e("label",st,[y(e("input",{"onUpdate:modelValue":o[13]||(o[13]=l=>i.value.oauth=l),type:"checkbox",disabled:!!i.value.token},null,8,it),[[se,i.value.oauth]]),P(a(t(n)("Configure OAuth","配置 OAuth")),1)]),i.value.oauth?v("",!0):(d(),u("label",ut,[e("span",null,a(t(n)("Bearer token (optional, write-only)","Bearer 令牌(可选,只写)")),1),y(e("input",{"onUpdate:modelValue":o[14]||(o[14]=l=>i.value.token=l),class:"ui-field","data-size":"md",type:"password",autocomplete:"new-password"},null,512),[[k,i.value.token]])]))],64)),f.value?(d(),u("label",dt,[e("span",null,a(t(n)("OAuth configuration","OAuth 配置")),1),y(e("select",{"onUpdate:modelValue":o[15]||(o[15]=l=>i.value.oauthAction=l),class:"ui-field","data-size":"md"},[e("option",rt,a(t(n)("Preserve existing configuration","保留现有配置")),1),e("option",ct,a(t(n)("Configure / edit OAuth","配置 / 编辑 OAuth")),1),e("option",pt,a(t(n)("Remove explicit configuration (automatic discovery remains)","移除显式配置(仍可自动发现)")),1)],512),[[I,i.value.oauthAction]])])):v("",!0),!f.value&&i.value.oauth||f.value&&i.value.oauthAction==="set"?(d(),u("section",vt,[e("p",null,a(t(n)("OAuth cannot be combined with a bearer token or Authorization header. Remove those explicitly when enabling OAuth. Leave optional fields blank to use defaults.","OAuth 不能与 Bearer 令牌或 Authorization 请求头一起使用。启用 OAuth 时请明确移除这些字段。可选字段留空使用默认值。")),1),e("label",null,[e("span",null,a(t(n)("OAuth client ID (optional)","OAuth 客户端 ID(可选)")),1),y(e("input",{"onUpdate:modelValue":o[16]||(o[16]=l=>i.value.clientId=l),class:"ui-field","data-size":"md"},null,512),[[k,i.value.clientId]])]),e("label",null,[e("span",null,a(t(n)("Callback port (default 1456)","回调端口(默认 1456)")),1),y(e("input",{"onUpdate:modelValue":o[17]||(o[17]=l=>i.value.callbackPort=l),class:"ui-field","data-size":"md",type:"number",min:"1",max:"65535",step:"1",placeholder:"1456"},null,512),[[k,i.value.callbackPort]])]),e("label",null,[e("span",null,a(t(n)("Scopes (space separated, optional)","权限范围(空格分隔,可选)")),1),y(e("input",{"onUpdate:modelValue":o[18]||(o[18]=l=>i.value.scopes=l),class:"ui-field","data-size":"md"},null,512),[[k,i.value.scopes]])]),f.value?(d(),u("label",mt,[e("span",null,a(t(n)("Authorization metadata URL","授权元数据 URL"))+" · "+a(i.value.metadataConfigured?t(n)("Configured (hidden)","已配置(隐藏)"):t(n)("None","无")),1),y(e("select",{"onUpdate:modelValue":o[19]||(o[19]=l=>i.value.metadataAction=l),class:"ui-field","data-size":"md"},[e("option",bt,a(t(n)("Keep","保留")),1),e("option",ht,a(t(n)("Replace","替换")),1),e("option",ft,a(t(n)("Remove","移除")),1)],512),[[I,i.value.metadataAction]])])):v("",!0),!f.value||i.value.metadataAction==="set"?(d(),u("label",yt,[e("span",null,a(t(n)("Authorization metadata URL (optional fallback)","授权元数据 URL(可选回退)")),1),y(e("input",{"onUpdate:modelValue":o[20]||(o[20]=l=>i.value.metadataUrl=l),class:"ui-field","data-size":"md",type:"url",required:f.value&&i.value.metadataAction==="set",autocomplete:"off"},null,8,gt),[[k,i.value.metadataUrl]])])):v("",!0),e("p",null,a(t(n)("Client secrets are entered under server details when signing in, never in saved configuration.","客户端密钥在服务器详情中登录时输入,绝不写入配置。")),1)])):v("",!0)],64)),f.value&&i.value.type!=="stdio"?(d(),u("section",kt,[e("h4",null,a(t(n)("Bearer token (write-only)","Bearer 令牌(只写)")),1),e("p",null,a(i.value.authConfigured?t(n)("A token is configured.","已配置令牌。"):t(n)("No token is configured.","未配置令牌。")),1),e("label",null,[e("span",null,a(t(n)("Token action","令牌操作")),1),y(e("select",{"onUpdate:modelValue":o[21]||(o[21]=l=>i.value.bearerAction=l),class:"ui-field","data-size":"md"},[e("option",_t,a(t(n)("Keep stored token","保留已存储的令牌")),1),e("option",{value:"set",disabled:de.value},a(t(n)("Replace token","替换令牌")),9,wt),e("option",Ct,a(t(n)("Remove token","移除令牌")),1)],512),[[I,i.value.bearerAction]])]),i.value.bearerAction==="set"?(d(),u("label",At,[e("span",null,a(t(n)("New bearer token","新 Bearer 令牌")),1),y(e("input",{"onUpdate:modelValue":o[22]||(o[22]=l=>i.value.token=l),class:"ui-field","data-size":"md",type:"password",autocomplete:"new-password",required:""},null,512),[[k,i.value.token]])])):v("",!0)])):v("",!0),e("section",null,[e("h4",null,a(i.value.type==="stdio"?t(n)("Environment variables","环境变量"):t(n)("HTTP headers","HTTP 请求头")),1),e("p",null,a(t(n)("Stored values are never returned. Keep preserves a value; Set replaces it; Remove deletes it. Values are not stored in this browser.","已存储的值不会返回。“保留”维持原值,“设置”替换原值,“删除”移除字段。值不会保存在此浏览器中。")),1),(d(!0),u(C,null,R(i.value.secrets,(l,c)=>(d(),u("div",{key:c,class:"secret-row"},[y(e("input",{"onUpdate:modelValue":w=>l.name=w,class:"ui-field","data-size":"md","aria-label":t(n)("Field name","字段名称"),readonly:l.stored,required:""},null,8,Ut),[[k,l.name]]),y(e("select",{"onUpdate:modelValue":w=>l.action=w,class:"ui-field","data-size":"md","aria-label":t(n)("Secret action","机密操作")},[l.stored?(d(),u("option",St,a(t(n)("Keep","保留")),1)):v("",!0),e("option",Pt,a(t(n)("Set","设置")),1),l.stored?(d(),u("option",Vt,a(t(n)("Remove","删除")),1)):v("",!0)],8,zt),[[I,l.action]]),l.action==="set"?y((d(),u("input",{key:0,"onUpdate:modelValue":w=>l.value=w,class:"ui-field","data-size":"md",type:"password",autocomplete:"new-password","aria-label":t(n)("New value","新值")},null,8,Mt)),[[k,l.value]]):v("",!0),e("button",{class:"ui-button","data-size":"sm","data-variant":"secondary",type:"button",onClick:w=>i.value.secrets.splice(c,1)},a(t(n)("Cancel field change","取消字段更改")),9,xt)]))),128)),e("button",{class:"ui-button","data-size":"sm","data-variant":"secondary",type:"button",onClick:o[23]||(o[23]=l=>i.value.secrets.push({name:"",action:"set",value:""}))},a(t(n)("Add field","添加字段")),1)]),!f.value&&i.value.source==="user"?(d(),u("label",Rt,[y(e("input",{"onUpdate:modelValue":o[24]||(o[24]=l=>i.value.enabled=l),type:"checkbox"},null,512),[[se,i.value.enabled]]),P(a(t(n)("Enable after saving","保存后启用")),1)])):v("",!0),i.value.source==="project"?(d(),u("p",It,a(t(n)("Project tests require a saved entry that you explicitly enabled locally. Unsaved project definitions cannot execute.","项目测试要求条目已保存且由您在本地明确启用。未保存的项目定义不能执行。")),1)):v("",!0),f.value?(d(),u("p",Dt,a(t(n)("Enablement and unedited fields are preserved. Use the server actions to enable, disable or sign in.","启用状态及未编辑字段会被保留。请通过服务器操作启用、禁用或登录。")),1)):v("",!0),e("div",Et,[e("button",{class:"ui-button","data-size":"md","data-variant":"secondary",type:"button",disabled:!t(h).supports("mcp.test")||i.value.source==="project"&&(!f.value||!i.value.enabled),onClick:o[25]||(o[25]=l=>G())},a(t(n)("Test draft connection","测试草稿连接")),9,Ot),e("button",{class:"ui-button","data-size":"md","data-variant":"primary",disabled:!x.value||f.value&&!t(h).supports("mcp.update")},a(t(n)("Save server","保存服务器")),9,Tt),e("button",{class:"ui-button","data-size":"md","data-variant":"secondary",type:"button",onClick:pe},a(t(n)("Cancel","取消")),1)])],8,Ke)],544)):v("",!0),V.value?(d(),u("section",Nt,[e("h3",null,a(t(n)("Connection test passed","连接测试通过"))+": "+a(V.value.id),1),e("p",null,a(t(n)("The temporary connection has been closed. Configuration and session connections were not changed.","临时连接已关闭。配置及会话连接未被更改。")),1),e("ul",null,[(d(!0),u(C,null,R(V.value.tools,l=>(d(),u("li",{key:l.name},[e("strong",null,a(l.name),1),l.description?(d(),u("p",$t,a(l.description),1)):v("",!0)]))),128))]),V.value.tools.length?v("",!0):(d(),u("p",Lt,a(t(n)("The server exposes no tools.","服务器没有提供工具。")),1))])):v("",!0),U.value?(d(),u("section",jt,[e("h3",null,a(t(n)("Authorize MCP","授权 MCP"))+": "+a(X.value),1),e("p",null,[P(a(t(n)("Callback","回调"))+": ",1),e("code",null,a(U.value.redirectUri),1),P(" · "+a(t(n)("Expires","过期时间"))+": "+a(new Date(U.value.expiresAt).toLocaleString()),1)]),e("a",{class:"ui-button","data-size":"md","data-variant":"primary",href:U.value.authorizationUrl,target:"_blank",rel:"noopener noreferrer"},a(t(n)("Open authorization page","打开授权页面")),9,qt),e("form",{class:"settings-form",autocomplete:"off",onSubmit:o[28]||(o[28]=Q(l=>oe(),["prevent"]))},[e("label",null,[e("span",null,a(t(n)("Paste the full callback URL after authorization","授权后粘贴完整回调 URL")),1),y(e("input",{"onUpdate:modelValue":o[26]||(o[26]=l=>M.value=l),class:"ui-field","data-size":"md",type:"password",autocomplete:"new-password",disabled:p.value,required:""},null,8,Bt),[[k,M.value]])]),e("div",Ft,[e("button",{class:"ui-button","data-size":"md","data-variant":"primary",disabled:p.value||!t(h).supports("mcp.auth.complete")},a(t(n)("Complete sign-in","完成登录")),9,Kt),e("button",{class:"ui-button","data-size":"md","data-variant":"secondary",type:"button",disabled:p.value||!t(h).supports("mcp.auth.cancel"),onClick:o[27]||(o[27]=l=>oe(!0))},a(t(n)("Cancel sign-in","取消登录")),9,Ht)])],32)])):v("",!0),e("label",Jt,[e("span",null,a(t(n)("Search servers","搜索服务器")),1),y(e("input",{"onUpdate:modelValue":o[29]||(o[29]=l=>J.value=l),class:"ui-field","data-size":"md",type:"search"},null,512),[[k,J.value]])]),(d(!0),u(C,null,R(ee.value,l=>(d(),u("section",{key:`${l.source}:${l.id}`,class:"settings-card"},[e("h3",null,a(l.id),1),e("p",null,[P(a(l.source)+" · "+a(l.transport)+" · "+a(l.enabled?t(n)("Enabled","已启用"):t(n)("Disabled","已禁用")),1),l.auth?(d(),u(C,{key:0},[P(" · OAuth: "+a(l.auth),1)],64)):v("",!0)]),e("div",Wt,[e("button",{class:"ui-button","data-size":"md","data-variant":"secondary",disabled:p.value||!t(h).supports("mcp.inspect"),onClick:c=>te(l)},a(t(n)("Details / tools","详情 / 工具")),9,Gt),e("button",{class:"ui-button","data-size":"md","data-variant":"secondary",disabled:p.value||!!i.value||!t(h).supports("mcp.test")||l.source!=="user"&&!l.enabled,onClick:c=>G(l)},a(t(n)("Test connection","测试连接")),9,Qt),l.source!=="plugin"?(d(),u(C,{key:0},[e("button",{class:"ui-button","data-size":"md","data-variant":"secondary",disabled:p.value||!!i.value||!t(h).supports("mcp.configuration")||!t(h).supports("mcp.update"),onClick:c=>ce(l)},a(t(n)("Edit","编辑")),9,Xt),e("button",{class:"ui-button","data-size":"md","data-variant":"secondary",disabled:p.value||!!i.value||!t(h).supports("mcp.set_enabled"),onClick:c=>E("mcp.set_enabled",l)},a(l.enabled?t(n)("Disable","禁用"):t(n)("Enable","启用")),9,Yt),e("button",{class:"ui-button","data-size":"md","data-variant":"danger-ghost",disabled:p.value||!!i.value||!t(h).supports("mcp.remove"),onClick:c=>E("mcp.remove",l)},a(t(n)("Remove","移除")),9,Zt)],64)):v("",!0),e("button",{class:"ui-button","data-size":"md","data-variant":"secondary",disabled:p.value||!l.enabled||!t(h).supports("mcp.disconnect"),onClick:c=>E("mcp.disconnect",l)},a(t(n)("Disconnect","断开连接")),9,ea),l.transport!=="stdio"?(d(),u(C,{key:1},[e("button",{class:"ui-button","data-size":"md","data-variant":"secondary",disabled:p.value||!!U.value||!l.enabled||!t(h).supports("mcp.auth.start"),onClick:c=>E("mcp.auth.start",l)},a(t(n)("Sign in","登录")),9,ta),l.auth?(d(),u("button",{key:0,class:"ui-button","data-size":"md","data-variant":"secondary",disabled:p.value||!t(h).supports("mcp.auth.logout"),onClick:c=>E("mcp.auth.logout",l)},a(t(n)("Sign out","退出登录")),9,aa)):v("",!0)],64)):v("",!0)]),l.source==="plugin"?(d(),u("p",na,a(t(n)("This entry is owned by its plugin. Change it through Plugins.","此条目归其插件所有。请通过插件页面更改。")),1)):v("",!0)]))),128)),z.value&&!ee.value.length?(d(),u("p",la,a(t(n)("No matching MCP servers. Add a server to get started.","没有匹配的 MCP 服务器。请添加服务器以开始使用。")),1)):v("",!0)])}}}),pa=Ue(oa,[["__scopeId","data-v-911186f7"]]);export{pa as default};
@@ -1 +0,0 @@
1
- fieldset[data-v-a9539763]{padding:0;border:0;min-width:0}section label[data-v-a9539763]{display:flex;align-items:center;gap:var(--space-2);margin-block:var(--space-3)}
@@ -1 +0,0 @@
1
- import{d as O,p as T,q as u,b as a,t as o,A as l,g as y,D as B,F as M,E as w,B as N,e as E,x,r as c,y as J,M as V,h as k,a as v}from"./vendor-vue-Ci9TYO_I.js";import{u as z}from"./settings-general-d_R-CH6R.js";import{_ as F,e as L,f as P}from"./GeneralSettingsStatus.vue_vue_type_script_setup_true_lang-DY1_UG_g.js";import{u as A,f as R,e as j}from"./index-BKJW0i9Q.js";import{b as q,m as I}from"./context-ChGKk1Cc.js";const $={class:"settings-page"},G={"data-route-heading":"",tabindex:"-1"},H={class:"ui-banner settings-banner"},K=["disabled"],Q=["value"],W=["disabled"],X=["disabled"],Y=["onUpdate:modelValue"],Z=["onUpdate:modelValue"],ee=["onUpdate:modelValue"],ae={key:0},te={class:"settings-actions"},se=["disabled"],oe={key:1,role:"status"},ie=O({__name:"ModalitySettings",setup(le){const i=z(),p=A(),h=c([]),_=c(""),C=c(""),d=c(),m=c([]),n=c(!1),f=c(""),b=c(!1),g=J(()=>d.value!==void 0&&JSON.stringify(d.value.models)!==JSON.stringify(m.value));q(g);async function S(){var r,t;if(!n.value&&!(g.value&&!window.confirm(i("Discard unsaved model capabilities?","放弃未保存的模型能力?")))){n.value=!0,f.value="",b.value=!1;try{if(!p.supports("provider.list")||!p.supports("provider.catalog"))throw new Error(i("Model catalogs are not available on this server.","此服务器不支持模型目录。"));h.value=await p.client.call("provider.list",{},R);const e=_.value||((r=h.value[0])==null?void 0:r.providerId);if(!e){d.value=void 0,m.value=[];return}_.value=e,d.value=await p.client.call("provider.catalog",{providerId:e},L),C.value=e,m.value=((t=d.value)==null?void 0:t.models.map(s=>({...s,modalities:[...s.modalities]})))??[]}catch(e){f.value=I(e)}finally{n.value=!1}}}async function U(){if(!(!d.value||n.value||!g.value)){n.value=!0,f.value="",b.value=!1;try{let r=d.value.version;for(const t of m.value){const e=d.value.models.find(D=>D.id===t.id);if(JSON.stringify(t)===JSON.stringify(e))continue;const s=await p.client.call("provider.models.edit",{providerId:C.value,expectedVersion:r,modelId:t.id,edit:{vision:t.vision,toolCalling:t.toolCalling,modalityCapabilities:t.modalities}},P);d.value=s,r=s.version}m.value=d.value.models.map(t=>({...t,modalities:[...t.modalities]})),b.value=!0}catch(r){f.value=I(r)}finally{n.value=!1}}}return T(S),(r,t)=>(v(),u("article",$,[a("header",null,[a("h2",G,o(l(i)("Modality","模态")),1),a("p",null,o(l(i)("Review and override static model capabilities. Capability declarations do not add abilities the upstream model does not have.","查看并覆盖静态模型能力声明。声明不会为上游模型增加它不具备的能力。")),1)]),a("p",H,o(l(i)("The runtime has no separate image/audio task routing service yet. These settings update provider model declarations, not an unused default-model record.","当前运行时尚无独立图像 / 音频任务路由服务。此处更改的是提供商模型声明,而非未被使用的默认模型记录。")),1),a("form",{class:"settings-card settings-form",onSubmit:N(S,["prevent"])},[a("label",null,[a("span",null,o(l(i)("Provider","提供商")),1),y(a("select",{"onUpdate:modelValue":t[0]||(t[0]=e=>_.value=e),class:"ui-field","data-size":"md",disabled:n.value||g.value},[(v(!0),u(M,null,w(h.value,e=>(v(),u("option",{key:e.providerId,value:e.providerId},o(e.displayName),9,Q))),128))],8,K),[[B,_.value]])]),a("button",{class:"ui-button","data-size":"md","data-variant":"secondary",disabled:n.value},o(l(i)("Load catalog","加载目录")),9,W)],32),E(F,{busy:n.value,error:f.value,saved:b.value&&!g.value,onReload:S},null,8,["busy","error","saved"]),d.value?(v(),u("form",{key:0,class:"settings-form",onSubmit:N(U,["prevent"])},[a("fieldset",{disabled:n.value||!l(p).supports("provider.models.edit")},[(v(!0),u(M,null,w(m.value,e=>(v(),u("section",{key:e.id,class:"settings-card"},[a("h3",null,o(e.name),1),a("p",null,[a("code",null,o(e.id),1)]),a("label",null,[y(a("input",{"onUpdate:modelValue":s=>e.vision=s,type:"checkbox"},null,8,Y),[[V,e.vision]]),k(o(l(i)("Vision input","视觉输入")),1)]),a("label",null,[y(a("input",{"onUpdate:modelValue":s=>e.toolCalling=s,type:"checkbox"},null,8,Z),[[V,e.toolCalling]]),k(o(l(i)("Tool calling","工具调用")),1)]),a("label",null,[y(a("input",{"onUpdate:modelValue":s=>e.modalities=s,type:"checkbox",value:"image.generate"},null,8,ee),[[V,e.modalities]]),k(o(l(i)("Image generation","图像生成")),1)]),e.modalities.some(s=>s!=="image.generate")?(v(),u("p",ae,o(l(i)("Other declarations (preserved)","其他声明(保留)"))+": "+o(e.modalities.filter(s=>s!=="image.generate").join(", ")),1)):x("",!0)]))),128))],8,X),a("footer",te,[a("button",{class:"ui-button","data-size":"md","data-variant":"primary",disabled:n.value||!g.value||!l(p).supports("provider.models.edit")},o(l(i)("Save capabilities","保存能力声明")),9,se)])],32)):x("",!0),!n.value&&!f.value&&!m.value.length?(v(),u("p",oe,o(l(i)("No static models. Add a provider and models first. Managed-provider catalogs are controlled by their provider.","没有静态模型。请先添加提供商和模型。托管提供商目录由其提供商管理。")),1)):x("",!0)]))}}),ve=j(ie,[["__scopeId","data-v-a9539763"]]);export{ve as default};
@@ -1 +0,0 @@
1
- fieldset[data-v-398399a2]{min-width:0;padding:0;border:0}label[data-v-398399a2]{display:grid;gap:var(--space-2)}legend[data-v-398399a2]{margin-bottom:var(--space-4);color:var(--muted-foreground);font-size:var(--text-sm)}.rule-row[data-v-398399a2]{display:grid;grid-template-columns:minmax(120px,1fr) auto auto auto;gap:var(--space-2);margin-bottom:var(--space-3)}@media(max-width:640px){.rule-row[data-v-398399a2]{grid-template-columns:1fr 1fr}.rule-row input[data-v-398399a2]{grid-column:1 / -1}}
@@ -1 +0,0 @@
1
- import{d as P,p as T,q as b,b as e,t,A as s,e as F,h as D,x as k,B as U,g as y,M,F as q,E as J,r as c,y as N,C as O,D as z,a as h}from"./vendor-vue-Ci9TYO_I.js";import{u as I}from"./settings-general-d_R-CH6R.js";import{_ as L,n as W,o as A,d as j}from"./GeneralSettingsStatus.vue_vue_type_script_setup_true_lang-DY1_UG_g.js";import{u as G,e as H}from"./index-BKJW0i9Q.js";import{b as K,m as S}from"./context-ChGKk1Cc.js";const Q={class:"settings-page"},X={"data-route-heading":"",tabindex:"-1"},Y={key:0,class:"ui-banner settings-banner","data-tone":"danger",role:"alert"},Z=["disabled"],ee=["disabled"],ae={class:"ui-banner settings-banner","data-tone":"warning"},se={class:"settings-actions"},te=["disabled"],oe={class:"settings-card"},ne=["disabled"],le=["onUpdate:modelValue","aria-label"],ie=["onUpdate:modelValue","aria-label"],ue={value:"exact"},re={value:"prefix"},de=["onUpdate:modelValue","aria-label"],ce={value:"allow"},ve={value:"deny"},me=["onClick"],pe={key:0},be={class:"settings-actions"},he=["disabled"],fe=["disabled"],_e=P({__name:"PermissionsSettings",setup(we){const a=I(),r=G(),v=c(),d=c([]),o=c(!1),f=c(""),g=c(!1),l=c(),m=c(!1),p=c(!1),_=c(""),R=N(()=>l.value!==void 0&&(m.value!==l.value.sandbox||p.value!==l.value.network)),C=N(()=>v.value!==void 0&&JSON.stringify(d.value)!==JSON.stringify(v.value.commandRules)),V=N(()=>C.value||R.value);K(V);async function x(){if(!o.value&&!(V.value&&!window.confirm(a("Discard unsaved command rules?","放弃未保存的命令规则?")))){o.value=!0,f.value="",g.value=!1;try{if(!r.supports("permission.rules"))throw new Error(a("Command rules are not available on this server.","此服务器不支持命令规则。"));v.value=await r.client.call("permission.rules",{},W),d.value=v.value.commandRules.map(n=>({...n}))}catch(n){f.value=S(n)}try{_.value="",r.supports("settings.read")&&(l.value=await r.client.call("settings.read",{source:"execution",scope:"user"},A),m.value=l.value.sandbox,p.value=l.value.network)}catch(n){_.value=S(n)}o.value=!1}}async function $(){if(!(!v.value||!C.value||o.value)){if(d.value.some(n=>!n.command.trim()||/[;&|`()<>$\n\r]/.test(n.command))){f.value=a("Enter a simple command without shell separators, substitutions or redirection.","请输入不含 Shell 分隔符、替换或重定向的简单命令。");return}if(!(d.value.some(n=>n.decision==="allow")&&!window.confirm(a("Save command rules that allow execution without asking? Deny presets still take precedence.","保存允许免询问执行的命令规则?拒绝预设仍然优先。")))){o.value=!0,f.value="",g.value=!1;try{const n=await r.client.call("permission.set_rules",{expectedRevision:v.value.revision,commandRules:d.value},j);v.value={revision:n,commandRules:d.value.map(i=>({...i}))},g.value=!0}catch(n){f.value=S(n)}finally{o.value=!1}}}}async function B(){if(!(!l.value||o.value||!R.value||(l.value.sandbox&&!m.value||!l.value.network&&p.value)&&!window.confirm(a("New commands will run with less isolation than now. Running processes keep their boundary.","新命令将以比现在更少的隔离运行。已运行的进程保留原边界。")))){o.value=!0,_.value="";try{l.value=await r.client.call("settings.update",{source:"execution",scope:"user",expectedRevision:l.value.revision,document:{sandbox:m.value,network:p.value}},A),m.value=l.value.sandbox,p.value=l.value.network}catch(i){_.value=S(i)}finally{o.value=!1}}}return T(x),(n,i)=>(h(),b("article",Q,[e("header",null,[e("h2",X,t(s(a)("Permissions","权限")),1),e("p",null,t(s(a)("User-level command rules apply to process-starting agent tools in every session. Deny wins; Allow never overrides a denied permission preset.","用户命令规则适用于所有会话中启动进程的代理工具。拒绝优先;允许规则不会越过权限预设的拒绝。")),1)]),F(L,{busy:o.value,error:f.value,saved:g.value&&!V.value,onReload:x},null,8,["busy","error","saved"]),_.value?(h(),b("p",Y,[D(t(_.value)+" ",1),e("button",{class:"ui-button","data-variant":"ghost",disabled:o.value,onClick:x},t(s(a)("Reload","重新加载")),9,Z)])):k("",!0),l.value?(h(),b("form",{key:1,class:"settings-card settings-form",onSubmit:i[2]||(i[2]=U(u=>B(),["prevent"]))},[e("h3",null,t(s(a)("Execution","执行")),1),e("p",null,t(s(a)("Applies to new commands on this execution host. Running processes keep their boundary. A platform without a sandbox backend fails the command instead of running it unsandboxed.","适用于此执行主机上的新命令。已运行的进程保留原边界。没有沙盒后端的平台会让命令失败,而不是不加隔离地运行。")),1),e("fieldset",{class:"settings-form",disabled:o.value||!s(r).supports("settings.update")},[e("label",null,[y(e("input",{"onUpdate:modelValue":i[0]||(i[0]=u=>m.value=u),type:"checkbox"},null,512),[[M,m.value]]),D(t(s(a)("Sandbox — run commands isolated from the host","沙盒 — 在隔离环境中运行命令")),1)]),e("label",null,[y(e("input",{"onUpdate:modelValue":i[1]||(i[1]=u=>p.value=u),type:"checkbox"},null,512),[[M,p.value]]),D(t(s(a)("Network — allow outbound connections while sandboxed","网络 — 沙盒内允许出站连接")),1)])],8,ee),e("p",ae,t(s(a)("Network applies only while the sandbox is on. With the sandbox off, commands run as the daemon user with this host's files and network.","网络仅在沙盒开启时生效。沙盒关闭时,命令以守护进程用户的身份、使用此主机的文件和网络运行。")),1),e("div",se,[e("button",{class:"ui-button","data-variant":"primary",disabled:o.value||!R.value||!s(r).supports("settings.update")},t(s(a)("Save execution settings","保存执行设置")),9,te)])],32)):k("",!0),v.value?(h(),b("form",{key:2,class:"settings-form",onSubmit:U($,["prevent"])},[e("section",oe,[e("h3",null,t(s(a)("Command rules","命令规则")),1),e("fieldset",{disabled:o.value||!s(r).supports("permission.set_rules")},[e("legend",null,t(s(a)("Match commands by words, not wildcards or regular expressions.","按单词匹配命令,不支持通配符或正则表达式。")),1),(h(!0),b(q,null,J(d.value,(u,E)=>(h(),b("div",{key:E,class:"rule-row"},[y(e("input",{"onUpdate:modelValue":w=>u.command=w,class:"ui-field","data-size":"md","aria-label":s(a)("Command","命令"),placeholder:"git status",required:""},null,8,le),[[O,u.command]]),y(e("select",{"onUpdate:modelValue":w=>u.match=w,class:"ui-field","data-size":"md","aria-label":s(a)("Match","匹配方式")},[e("option",ue,t(s(a)("Exact","精确")),1),e("option",re,t(s(a)("Prefix","前缀")),1)],8,ie),[[z,u.match]]),y(e("select",{"onUpdate:modelValue":w=>u.decision=w,class:"ui-field","data-size":"md","aria-label":s(a)("Decision","决策")},[e("option",ce,t(s(a)("Allow","允许")),1),e("option",ve,t(s(a)("Deny","拒绝")),1)],8,de),[[z,u.decision]]),e("button",{class:"ui-button","data-size":"md","data-variant":"danger-ghost",type:"button",onClick:w=>d.value.splice(E,1)},t(s(a)("Remove","移除")),9,me)]))),128)),d.value.length?k("",!0):(h(),b("p",pe,t(s(a)("No command rules. The session permission preset and approval flow decide each call.","尚无命令规则。每次调用由会话权限预设和审批流程决定。")),1)),e("button",{class:"ui-button","data-size":"md","data-variant":"secondary",type:"button",onClick:i[3]||(i[3]=u=>d.value.push({command:"",match:"prefix",decision:"deny"}))},t(s(a)("Add rule","添加规则")),1)],8,ne)]),e("footer",be,[e("button",{class:"ui-button","data-size":"md","data-variant":"secondary",type:"button",disabled:o.value,onClick:x},t(s(a)("Reload","重新加载")),9,he),e("button",{class:"ui-button","data-size":"md","data-variant":"primary",disabled:o.value||!C.value||!s(r).supports("permission.set_rules")},t(s(a)("Save rules","保存规则")),9,fe)])],32)):k("",!0)]))}}),Re=H(_e,[["__scopeId","data-v-398399a2"]]);export{Re as default};