dimcode-web 0.1.0-alpha.14 → 0.1.0-alpha.16

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 (124) hide show
  1. package/package.json +1 -1
  2. package/release-manifest.json +91 -92
  3. package/web/assets/AccountSettings-CuNxjb5M.js +1 -0
  4. package/web/assets/AccountSettings-DnfPPG7u.css +1 -0
  5. package/web/assets/AgentSettings-B1kyVC9H.js +1 -0
  6. package/web/assets/{AppearanceSettings-C6T82OEq.js → AppearanceSettings-BImLkd19.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-C6UPMqfk.js +1 -0
  10. package/web/assets/{CodeBlockNode-DsUHD3_k.js → CodeBlockNode-Cm4qQWYp.js} +5 -5
  11. package/web/assets/DiagnosticsSettings-Bf1nv4em.css +1 -0
  12. package/web/assets/DiagnosticsSettings-YSRtq2dI.js +1 -0
  13. package/web/assets/GeneralSettingsStatus.vue_vue_type_script_setup_true_lang-CWInOGTv.js +1 -0
  14. package/web/assets/McpSettings-BhAZ-WL2.css +1 -0
  15. package/web/assets/McpSettings-y4Wzg8CT.js +1 -0
  16. package/web/assets/ModalitySettings-BpFvRd--.js +1 -0
  17. package/web/assets/PermissionsSettings-CGumt3Ix.css +1 -0
  18. package/web/assets/PermissionsSettings-DQV3cdej.js +1 -0
  19. package/web/assets/PluginSettings-BF6eSPEd.js +1 -0
  20. package/web/assets/PluginSettings-rv5I0LON.css +1 -0
  21. package/web/assets/PreCodeBlock-DH2VwXzi.js +1 -0
  22. package/web/assets/ProviderAuthFlow.vue_vue_type_script_setup_true_lang-opd2fMYR.js +11 -0
  23. package/web/assets/ProviderSettings-A8WG9V7m.js +2 -0
  24. package/web/assets/ProviderSettings-Cc10ophS.css +1 -0
  25. package/web/assets/SettingsPage-DmhRtj9e.js +51 -0
  26. package/web/assets/SkillSettings-CZ98gDWn.js +3 -0
  27. package/web/assets/SkillSettings-DjDPbVAE.css +1 -0
  28. package/web/assets/{Tooltip-BJL7Jk33.js → Tooltip--ZEIq327.js} +1 -1
  29. package/web/assets/{arc-cA0USBj0.js → arc-BSskkHkz.js} +1 -1
  30. package/web/assets/{architectureDiagram-3BPJPVTR-D4GyRGsi.js → architectureDiagram-3BPJPVTR-B3e2_Mi5.js} +1 -1
  31. package/web/assets/arrow-left-mbUIwPsq.js +6 -0
  32. package/web/assets/{blockDiagram-GPEHLZMM-CaMtk8X8.js → blockDiagram-GPEHLZMM-BSII-1bz.js} +1 -1
  33. package/web/assets/{c4Diagram-AAUBKEIU-By4NO5z_.js → c4Diagram-AAUBKEIU-DA3DfWUR.js} +1 -1
  34. package/web/assets/channel-DrR7UcgS.js +1 -0
  35. package/web/assets/{chunk-2J33WTMH-DVR8RXjF.js → chunk-2J33WTMH-B112AqHa.js} +1 -1
  36. package/web/assets/{chunk-4BX2VUAB-BOCw1xVb.js → chunk-4BX2VUAB-DnNs4Y-E.js} +1 -1
  37. package/web/assets/{chunk-55IACEB6-nIfgcEjn.js → chunk-55IACEB6-BEqL8hBV.js} +1 -1
  38. package/web/assets/{chunk-727SXJPM-RYvblIbW.js → chunk-727SXJPM-DBBS3g7k.js} +1 -1
  39. package/web/assets/{chunk-AQP2D5EJ-BO5Su4MY.js → chunk-AQP2D5EJ-B9jCastR.js} +1 -1
  40. package/web/assets/{chunk-FMBD7UC4-Q206iq7t.js → chunk-FMBD7UC4-DllPbdIS.js} +1 -1
  41. package/web/assets/{chunk-ND2GUHAM-BEHXSkEZ.js → chunk-ND2GUHAM-D9KZG0cK.js} +1 -1
  42. package/web/assets/{chunk-QZHKN3VN-B4wImiUI.js → chunk-QZHKN3VN-BoD6R3M0.js} +1 -1
  43. package/web/assets/classDiagram-4FO5ZUOK-DGOBz3OV.js +1 -0
  44. package/web/assets/classDiagram-v2-Q7XG4LA2-DGOBz3OV.js +1 -0
  45. package/web/assets/context-Grqd_9Lt.js +1 -0
  46. package/web/assets/{cose-bilkent-S5V4N54A-BJj5g70v.js → cose-bilkent-S5V4N54A-BXVnnRnw.js} +1 -1
  47. package/web/assets/{cynefin-OW5HDTMX-C-fnPT_y.js → cynefin-OW5HDTMX-B-6oGbPp.js} +1 -1
  48. package/web/assets/{dagre-BM42HDAG-CpAodSX7.js → dagre-BM42HDAG-B22lGQ6O.js} +1 -1
  49. package/web/assets/{diagram-2AECGRRQ-C0jz5rBL.js → diagram-2AECGRRQ-CJpCn-CU.js} +1 -1
  50. package/web/assets/{diagram-5GNKFQAL-CKvRsL1_.js → diagram-5GNKFQAL-CXv-E4RN.js} +1 -1
  51. package/web/assets/{diagram-KO2AKTUF-C9_QTnZb.js → diagram-KO2AKTUF-DE6YITcQ.js} +1 -1
  52. package/web/assets/{diagram-LMA3HP47-B0gvGn3Z.js → diagram-LMA3HP47-C6a1LN_b.js} +1 -1
  53. package/web/assets/{diagram-OG6HWLK6-CoW4sNwB.js → diagram-OG6HWLK6-lzlMxndk.js} +1 -1
  54. package/web/assets/{erDiagram-TEJ5UH35-B1YPrM8R.js → erDiagram-TEJ5UH35-C33pLVdS.js} +1 -1
  55. package/web/assets/{flowDiagram-I6XJVG4X-DbSCyQ1o.js → flowDiagram-I6XJVG4X-CNEnFS_c.js} +1 -1
  56. package/web/assets/{ganttDiagram-6RSMTGT7-DCU_-HcU.js → ganttDiagram-6RSMTGT7-Dvt_IgnY.js} +1 -1
  57. package/web/assets/{gitGraphDiagram-PVQCEYII-BnwXK64G.js → gitGraphDiagram-PVQCEYII-DEM3UDeh.js} +1 -1
  58. package/web/assets/{index-gSmHRsHg.js → index-AEXvUA5U.js} +1 -1
  59. package/web/assets/{index-B9cemsjA.js → index-B4STIxMF.js} +86 -86
  60. package/web/assets/index-BbPaKBmv.css +1 -0
  61. package/web/assets/index-CenMTLFY.js +247 -0
  62. package/web/assets/{index10-B-_2OEd6.js → index10-BMLJ-2NW.js} +1 -1
  63. package/web/assets/{index5-CFV5-M95.js → index5-BvcjsDmt.js} +1 -1
  64. package/web/assets/{index6-C3q8vusa.js → index6-CxMZBEKt.js} +1 -1
  65. package/web/assets/{index8-Cg5dteH_.js → index8-bIdcFO9W.js} +1 -1
  66. package/web/assets/{index9-DOQm5ENJ.js → index9-DBx_o1y8.js} +1 -1
  67. package/web/assets/{infoDiagram-5YYISTIA-B_F1M87B.js → infoDiagram-5YYISTIA-BYT4MYJl.js} +1 -1
  68. package/web/assets/{ishikawaDiagram-YF4QCWOH-DXtU3ayb.js → ishikawaDiagram-YF4QCWOH-C9V1Zhoz.js} +1 -1
  69. package/web/assets/{journeyDiagram-JHISSGLW-DiP3bT6x.js → journeyDiagram-JHISSGLW-Be6x6oc7.js} +1 -1
  70. package/web/assets/{kanban-definition-UN3LZRKU-8kyelCSQ.js → kanban-definition-UN3LZRKU-BctYKWYf.js} +1 -1
  71. package/web/assets/{linear-aMkA3ImE.js → linear-Dl_nEC-L.js} +1 -1
  72. package/web/assets/{markstream-ybWMrpCV.js → markstream-CvxnTmYJ.js} +2 -2
  73. package/web/assets/{mermaid.core-BWfn-FFw.js → mermaid.core-qKUR3_rw.js} +4 -4
  74. package/web/assets/{mindmap-definition-RKZ34NQL-Dge0FtvP.js → mindmap-definition-RKZ34NQL-CeMPPNxO.js} +1 -1
  75. package/web/assets/{pieDiagram-4H26LBE5-D7MzngYj.js → pieDiagram-4H26LBE5-DDfXBtNB.js} +1 -1
  76. package/web/assets/{quadrantDiagram-W4KKPZXB-cjwaMhCa.js → quadrantDiagram-W4KKPZXB-DM7LwKAJ.js} +1 -1
  77. package/web/assets/{requirementDiagram-4Y6WPE33-ACmBdhUc.js → requirementDiagram-4Y6WPE33-CaWzWB7c.js} +1 -1
  78. package/web/assets/{sankeyDiagram-5OEKKPKP-Rva02Dvb.js → sankeyDiagram-5OEKKPKP-DC1oe_AT.js} +1 -1
  79. package/web/assets/{sequenceDiagram-3UESZ5HK-DzazUDns.js → sequenceDiagram-3UESZ5HK-BZM66sLw.js} +1 -1
  80. package/web/assets/settings-general-dc8P6dA0.js +1 -0
  81. package/web/assets/{stateDiagram-AJRCARHV-BODPWGjc.js → stateDiagram-AJRCARHV-BAaUZKRp.js} +1 -1
  82. package/web/assets/stateDiagram-v2-BHNVJYJU-DTfJIIDB.js +1 -0
  83. package/web/assets/{timeline-definition-PNZ67QCA-D5UqFLNW.js → timeline-definition-PNZ67QCA-Boz2EyqB.js} +1 -1
  84. package/web/assets/{vendor-vue-Ci9TYO_I.js → vendor-vue-CncuOShJ.js} +1 -1
  85. package/web/assets/{vennDiagram-CIIHVFJN-CtcagJ7K.js → vennDiagram-CIIHVFJN-ByQmaid9.js} +1 -1
  86. package/web/assets/{wardleyDiagram-YWT4CUSO-G86oBHE2.js → wardleyDiagram-YWT4CUSO-ByOBzspB.js} +1 -1
  87. package/web/assets/{xychartDiagram-2RQKCTM6-BJ1nXYiQ.js → xychartDiagram-2RQKCTM6-BNgy6nQp.js} +1 -1
  88. package/web/assets/zh-CN-DtOnK_oD.js +1 -0
  89. package/web/dimcode-web.json +2 -2
  90. package/web/index.html +3 -3
  91. package/web/assets/AccountSettings-4uSrBroj.js +0 -1
  92. package/web/assets/AccountSettings-DuC-j6CL.css +0 -1
  93. package/web/assets/AgentSettings-BDiSW65Y.js +0 -1
  94. package/web/assets/AppearanceSettings-CX6_CvK6.css +0 -1
  95. package/web/assets/ArchivedSettings-DDK-qro_.js +0 -1
  96. package/web/assets/ArchivedSettings-De1WaCgP.css +0 -1
  97. package/web/assets/ConfirmDialog.vue_vue_type_script_setup_true_lang-KPZUoxNU.js +0 -6
  98. package/web/assets/DiagnosticsSettings-BmWPEGHb.css +0 -1
  99. package/web/assets/DiagnosticsSettings-CiDVWqJz.js +0 -1
  100. package/web/assets/GeneralSettingsStatus.vue_vue_type_script_setup_true_lang-DY1_UG_g.js +0 -1
  101. package/web/assets/McpSettings-DCYV728D.css +0 -1
  102. package/web/assets/McpSettings-nYhoS35F.js +0 -1
  103. package/web/assets/ModalitySettings-BkeyOoQt.css +0 -1
  104. package/web/assets/ModalitySettings-mIAic7i5.js +0 -1
  105. package/web/assets/PermissionsSettings-DVv7C2io.css +0 -1
  106. package/web/assets/PermissionsSettings-Dh9gF7YF.js +0 -1
  107. package/web/assets/PluginSettings-BMQazfW6.js +0 -1
  108. package/web/assets/PluginSettings-EhulK7fw.css +0 -1
  109. package/web/assets/PreCodeBlock-DXIuTGLt.js +0 -1
  110. package/web/assets/ProviderAuthFlow.vue_vue_type_script_setup_true_lang-DHd2sgtZ.js +0 -11
  111. package/web/assets/ProviderSettings-Dc3kVfiC.js +0 -2
  112. package/web/assets/ProviderSettings-O7kVWRtj.css +0 -1
  113. package/web/assets/SettingsPage-YJcDRLr9.js +0 -56
  114. package/web/assets/SkillSettings-C16em-eW.css +0 -1
  115. package/web/assets/SkillSettings-ovHdSPTe.js +0 -3
  116. package/web/assets/channel-rxJrCDWw.js +0 -1
  117. package/web/assets/classDiagram-4FO5ZUOK-BtU1pWhP.js +0 -1
  118. package/web/assets/classDiagram-v2-Q7XG4LA2-BtU1pWhP.js +0 -1
  119. package/web/assets/context-ChGKk1Cc.js +0 -1
  120. package/web/assets/index-BKJW0i9Q.js +0 -225
  121. package/web/assets/index-GnV5W03u.css +0 -1
  122. package/web/assets/settings-general-d_R-CH6R.js +0 -1
  123. package/web/assets/stateDiagram-v2-BHNVJYJU-CJ6CdQEh.js +0 -1
  124. package/web/assets/zh-CN-CSwtlg0N.js +0 -1
@@ -50,4 +50,4 @@
50
50
  * vue-router v4.6.4
51
51
  * (c) 2025 Eduardo San Martin Morote
52
52
  * @license MIT
53
- */let Tb=()=>location.protocol+"//"+location.host;function Ff(e,t){const{pathname:n,search:s,hash:r}=t,i=e.indexOf("#");if(i>-1){let o=r.includes(e.slice(i))?e.slice(i).length:1,l=r.slice(o);return l[0]!=="/"&&(l="/"+l),Rc(l,"")}return Rc(n,e)+s+r}function Sb(e,t,n,s){let r=[],i=[],o=null;const l=({state:h})=>{const b=Ff(e,location),A=n.value,T=t.value;let L=0;if(h){if(n.value=b,t.value=h,o&&o===A){o=null;return}L=T?h.position-T.position:0}else s(b);r.forEach(v=>{v(n.value,A,{delta:L,type:oo.pop,direction:L?L>0?Ni.forward:Ni.back:Ni.unknown})})};function c(){o=n.value}function a(h){r.push(h);const b=()=>{const A=r.indexOf(h);A>-1&&r.splice(A,1)};return i.push(b),b}function u(){if(document.visibilityState==="hidden"){const{history:h}=window;if(!h.state)return;h.replaceState(he({},h.state,{scroll:li()}),"")}}function f(){for(const h of i)h();i=[],window.removeEventListener("popstate",l),window.removeEventListener("pagehide",u),document.removeEventListener("visibilitychange",u)}return window.addEventListener("popstate",l),window.addEventListener("pagehide",u),document.addEventListener("visibilitychange",u),{pauseListeners:c,listen:a,destroy:f}}function Lc(e,t,n,s=!1,r=!1){return{back:e,current:t,forward:n,replaced:s,position:window.history.length,scroll:r?li():null}}function Ab(e){const{history:t,location:n}=window,s={value:Ff(e,n)},r={value:t.state};r.value||i(s.value,{back:null,current:s.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(c,a,u){const f=e.indexOf("#"),h=f>-1?(n.host&&document.querySelector("base")?e:e.slice(f))+c:Tb()+e+c;try{t[u?"replaceState":"pushState"](a,"",h),r.value=a}catch(b){console.error(b),n[u?"replace":"assign"](h)}}function o(c,a){i(c,he({},t.state,Lc(r.value.back,c,r.value.forward,!0),a,{position:r.value.position}),!0),s.value=c}function l(c,a){const u=he({},r.value,t.state,{forward:c,scroll:li()});i(u.current,u,!0),i(c,he({},Lc(s.value,c,null),{position:u.position+1},a),!1),s.value=c}return{location:s,state:r,push:l,replace:o}}function zb(e){e=ub(e);const t=Ab(e),n=Sb(e,t.state,t.location,t.replace);function s(i,o=!0){o||n.pauseListeners(),history.go(i)}const r=he({location:"",base:e,go:s,createHref:db.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}let En=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e})({});var Fe=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e})(Fe||{});const Rb={type:En.Static,value:""},Nb=/[a-zA-Z0-9_]/;function Ob(e){if(!e)return[[]];if(e==="/")return[[Rb]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(b){throw new Error(`ERR (${n})/"${a}": ${b}`)}let n=Fe.Static,s=n;const r=[];let i;function o(){i&&r.push(i),i=[]}let l=0,c,a="",u="";function f(){a&&(n===Fe.Static?i.push({type:En.Static,value:a}):n===Fe.Param||n===Fe.ParamRegExp||n===Fe.ParamRegExpEnd?(i.length>1&&(c==="*"||c==="+")&&t(`A repeatable param (${a}) must be alone in its segment. eg: '/:ids+.`),i.push({type:En.Param,value:a,regexp:u,repeatable:c==="*"||c==="+",optional:c==="*"||c==="?"})):t("Invalid state to consume buffer"),a="")}function h(){a+=c}for(;l<e.length;){if(c=e[l++],c==="\\"&&n!==Fe.ParamRegExp){s=n,n=Fe.EscapeNext;continue}switch(n){case Fe.Static:c==="/"?(a&&f(),o()):c===":"?(f(),n=Fe.Param):h();break;case Fe.EscapeNext:h(),n=s;break;case Fe.Param:c==="("?n=Fe.ParamRegExp:Nb.test(c)?h():(f(),n=Fe.Static,c!=="*"&&c!=="?"&&c!=="+"&&l--);break;case Fe.ParamRegExp:c===")"?u[u.length-1]=="\\"?u=u.slice(0,-1)+c:n=Fe.ParamRegExpEnd:u+=c;break;case Fe.ParamRegExpEnd:f(),n=Fe.Static,c!=="*"&&c!=="?"&&c!=="+"&&l--,u="";break;default:t("Unknown state");break}}return n===Fe.ParamRegExp&&t(`Unfinished custom RegExp for param "${a}"`),f(),o(),r}const wc="[^/]+?",Ib={sensitive:!1,strict:!1,start:!0,end:!0};var Qe=(function(e){return e[e._multiplier=10]="_multiplier",e[e.Root=90]="Root",e[e.Segment=40]="Segment",e[e.SubSegment=30]="SubSegment",e[e.Static=40]="Static",e[e.Dynamic=20]="Dynamic",e[e.BonusCustomRegExp=10]="BonusCustomRegExp",e[e.BonusWildcard=-50]="BonusWildcard",e[e.BonusRepeatable=-20]="BonusRepeatable",e[e.BonusOptional=-8]="BonusOptional",e[e.BonusStrict=.7000000000000001]="BonusStrict",e[e.BonusCaseSensitive=.25]="BonusCaseSensitive",e})(Qe||{});const Pb=/[.+*?^${}()[\]/\\]/g;function Lb(e,t){const n=he({},Ib,t),s=[];let r=n.start?"^":"";const i=[];for(const a of e){const u=a.length?[]:[Qe.Root];n.strict&&!a.length&&(r+="/");for(let f=0;f<a.length;f++){const h=a[f];let b=Qe.Segment+(n.sensitive?Qe.BonusCaseSensitive:0);if(h.type===En.Static)f||(r+="/"),r+=h.value.replace(Pb,"\\$&"),b+=Qe.Static;else if(h.type===En.Param){const{value:A,repeatable:T,optional:L,regexp:v}=h;i.push({name:A,repeatable:T,optional:L});const y=v||wc;if(y!==wc){b+=Qe.BonusCustomRegExp;try{`${y}`}catch(g){throw new Error(`Invalid custom RegExp for param "${A}" (${y}): `+g.message)}}let p=T?`((?:${y})(?:/(?:${y}))*)`:`(${y})`;f||(p=L&&a.length<2?`(?:/${p})`:"/"+p),L&&(p+="?"),r+=p,b+=Qe.Dynamic,L&&(b+=Qe.BonusOptional),T&&(b+=Qe.BonusRepeatable),y===".*"&&(b+=Qe.BonusWildcard)}u.push(b)}s.push(u)}if(n.strict&&n.end){const a=s.length-1;s[a][s[a].length-1]+=Qe.BonusStrict}n.strict||(r+="/?"),n.end?r+="$":n.strict&&!r.endsWith("/")&&(r+="(?:/|$)");const o=new RegExp(r,n.sensitive?"":"i");function l(a){const u=a.match(o),f={};if(!u)return null;for(let h=1;h<u.length;h++){const b=u[h]||"",A=i[h-1];f[A.name]=b&&A.repeatable?b.split("/"):b}return f}function c(a){let u="",f=!1;for(const h of e){(!f||!u.endsWith("/"))&&(u+="/"),f=!1;for(const b of h)if(b.type===En.Static)u+=b.value;else if(b.type===En.Param){const{value:A,repeatable:T,optional:L}=b,v=A in a?a[A]:"";if(Et(v)&&!T)throw new Error(`Provided param "${A}" is an array but it is not repeatable (* or + modifiers)`);const y=Et(v)?v.join("/"):v;if(!y)if(L)h.length<2&&(u.endsWith("/")?u=u.slice(0,-1):f=!0);else throw new Error(`Missing required param "${A}"`);u+=y}}return u||"/"}return{re:o,score:s,keys:i,parse:l,stringify:c}}function wb(e,t){let n=0;for(;n<e.length&&n<t.length;){const s=t[n]-e[n];if(s)return s;n++}return e.length<t.length?e.length===1&&e[0]===Qe.Static+Qe.Segment?-1:1:e.length>t.length?t.length===1&&t[0]===Qe.Static+Qe.Segment?1:-1:0}function Vf(e,t){let n=0;const s=e.score,r=t.score;for(;n<s.length&&n<r.length;){const i=wb(s[n],r[n]);if(i)return i;n++}if(Math.abs(r.length-s.length)===1){if(kc(s))return 1;if(kc(r))return-1}return r.length-s.length}function kc(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const kb={strict:!1,end:!0,sensitive:!1};function xb(e,t,n){const s=Lb(Ob(e.path),n),r=he(s,{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function Mb(e,t){const n=[],s=new Map;t=Ac(kb,t);function r(f){return s.get(f)}function i(f,h,b){const A=!b,T=Mc(f);T.aliasOf=b&&b.record;const L=Ac(t,f),v=[T];if("alias"in f){const g=typeof f.alias=="string"?[f.alias]:f.alias;for(const C of g)v.push(Mc(he({},T,{components:b?b.record.components:T.components,path:C,aliasOf:b?b.record:T})))}let y,p;for(const g of v){const{path:C}=g;if(h&&C[0]!=="/"){const w=h.record.path,S=w[w.length-1]==="/"?"":"/";g.path=h.record.path+(C&&S+C)}if(y=xb(g,h,L),b?b.alias.push(y):(p=p||y,p!==y&&p.alias.push(y),A&&f.name&&!Dc(y)&&o(f.name)),Uf(y)&&c(y),T.children){const w=T.children;for(let S=0;S<w.length;S++)i(w[S],y,b&&b.children[S])}b=b||y}return p?()=>{o(p)}:As}function o(f){if(xf(f)){const h=s.get(f);h&&(s.delete(f),n.splice(n.indexOf(h),1),h.children.forEach(o),h.alias.forEach(o))}else{const h=n.indexOf(f);h>-1&&(n.splice(h,1),f.record.name&&s.delete(f.record.name),f.children.forEach(o),f.alias.forEach(o))}}function l(){return n}function c(f){const h=Vb(f,n);n.splice(h,0,f),f.record.name&&!Dc(f)&&s.set(f.record.name,f)}function a(f,h){let b,A={},T,L;if("name"in f&&f.name){if(b=s.get(f.name),!b)throw es(Oe.MATCHER_NOT_FOUND,{location:f});L=b.record.name,A=he(xc(h.params,b.keys.filter(p=>!p.optional).concat(b.parent?b.parent.keys.filter(p=>p.optional):[]).map(p=>p.name)),f.params&&xc(f.params,b.keys.map(p=>p.name))),T=b.stringify(A)}else if(f.path!=null)T=f.path,b=n.find(p=>p.re.test(T)),b&&(A=b.parse(T),L=b.record.name);else{if(b=h.name?s.get(h.name):n.find(p=>p.re.test(h.path)),!b)throw es(Oe.MATCHER_NOT_FOUND,{location:f,currentLocation:h});L=b.record.name,A=he({},h.params,f.params),T=b.stringify(A)}const v=[];let y=b;for(;y;)v.unshift(y.record),y=y.parent;return{name:L,path:T,params:A,matched:v,meta:Fb(v)}}e.forEach(f=>i(f));function u(){n.length=0,s.clear()}return{addRoute:i,resolve:a,removeRoute:o,clearRoutes:u,getRoutes:l,getRecordMatcher:r}}function xc(e,t){const n={};for(const s of t)s in e&&(n[s]=e[s]);return n}function Mc(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Db(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function Db(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const s in e.components)t[s]=typeof n=="object"?n[s]:n;return t}function Dc(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Fb(e){return e.reduce((t,n)=>he(t,n.meta),{})}function Vb(e,t){let n=0,s=t.length;for(;n!==s;){const i=n+s>>1;Vf(e,t[i])<0?s=i:n=i+1}const r=Ub(e);return r&&(s=t.lastIndexOf(r,s-1)),s}function Ub(e){let t=e;for(;t=t.parent;)if(Uf(t)&&Vf(e,t)===0)return t}function Uf({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Fc(e){const t=Ye(ci),n=Ye(Qo),s=Ue(()=>{const c=Pt(e.to);return t.resolve(c)}),r=Ue(()=>{const{matched:c}=s.value,{length:a}=c,u=c[a-1],f=n.matched;if(!u||!f.length)return-1;const h=f.findIndex(zn.bind(null,u));if(h>-1)return h;const b=Vc(c[a-2]);return a>1&&Vc(u)===b&&f[f.length-1].path!==b?f.findIndex(zn.bind(null,c[a-2])):h}),i=Ue(()=>r.value>-1&&jb(n.params,s.value.params)),o=Ue(()=>r.value>-1&&r.value===n.matched.length-1&&kf(n.params,s.value.params));function l(c={}){if(Bb(c)){const a=t[Pt(e.replace)?"replace":"push"](Pt(e.to)).catch(As);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>a),a}return Promise.resolve()}return{route:s,href:Ue(()=>s.value.href),isActive:i,isExactActive:o,navigate:l}}function Hb(e){return e.length===1?e[0]:e}const Wb=hn({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:Fc,setup(e,{slots:t}){const n=ns(Fc(e)),{options:s}=Ye(ci),r=Ue(()=>({[Uc(e.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[Uc(e.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const i=t.default&&Hb(t.default(n));return e.custom?i:fn("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},i)}}}),$b=Wb;function Bb(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function jb(e,t){for(const n in t){const s=t[n],r=e[n];if(typeof s=="string"){if(s!==r)return!1}else if(!Et(r)||r.length!==s.length||s.some((i,o)=>i.valueOf()!==r[o].valueOf()))return!1}return!0}function Vc(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Uc=(e,t,n)=>e??t??n,Kb=hn({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const s=Ye(co),r=Ue(()=>e.route||s.value),i=Ye(Pc,0),o=Ue(()=>{let a=Pt(i);const{matched:u}=r.value;let f;for(;(f=u[a])&&!f.components;)a++;return a}),l=Ue(()=>r.value.matched[o.value]);Es(Pc,Ue(()=>o.value+1)),Es(Jo,l),Es(co,r);const c=un();return ht(()=>[c.value,l.value,e.name],([a,u,f],[h,b,A])=>{u&&(u.instances[f]=a,b&&b!==u&&a&&a===h&&(u.leaveGuards.size||(u.leaveGuards=b.leaveGuards),u.updateGuards.size||(u.updateGuards=b.updateGuards))),a&&u&&(!b||!zn(u,b)||!h)&&(u.enterCallbacks[f]||[]).forEach(T=>T(a))},{flush:"post"}),()=>{const a=r.value,u=e.name,f=l.value,h=f&&f.components[u];if(!h)return Hc(n.default,{Component:h,route:a});const b=f.props[u],A=b?b===!0?a.params:typeof b=="function"?b(a):b:null,L=fn(h,he({},A,t,{onVnodeUnmounted:v=>{v.component.isUnmounted&&(f.instances[u]=null)},ref:c}));return Hc(n.default,{Component:L,route:a})||L}}});function Hc(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const Gb=Kb;function ey(e){const t=Mb(e.routes,e),n=e.parseQuery||Eb,s=e.stringifyQuery||Ic,r=e.history,i=ds(),o=ds(),l=ds(),c=Xr(en);let a=en;Fn&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=Ai.bind(null,U=>""+U),f=Ai.bind(null,sb),h=Ai.bind(null,$s);function b(U,X){let B,z;return xf(U)?(B=t.getRecordMatcher(U),z=X):z=U,t.addRoute(z,B)}function A(U){const X=t.getRecordMatcher(U);X&&t.removeRoute(X)}function T(){return t.getRoutes().map(U=>U.record)}function L(U){return!!t.getRecordMatcher(U)}function v(U,X){if(X=he({},X||c.value),typeof U=="string"){const E=Ri(n,U,X.path),I=t.resolve({path:E.path},X),H=r.createHref(E.fullPath);return he(E,I,{params:h(I.params),hash:$s(E.hash),redirectedFrom:void 0,href:H})}let B;if(U.path!=null)B=he({},U,{path:Ri(n,U.path,X.path).path});else{const E=he({},U.params);for(const I in E)E[I]==null&&delete E[I];B=he({},U,{params:f(E)}),X.params=f(X.params)}const z=t.resolve(B,X),re=U.hash||"";z.params=u(h(z.params));const _e=ob(s,he({},U,{hash:eb(re),path:z.path})),m=r.createHref(_e);return he({fullPath:_e,hash:re,query:s===Ic?vb(U.query):U.query||{}},z,{redirectedFrom:void 0,href:m})}function y(U){return typeof U=="string"?Ri(n,U,c.value.path):he({},U)}function p(U,X){if(a!==U)return es(Oe.NAVIGATION_CANCELLED,{from:X,to:U})}function g(U){return S(U)}function C(U){return g(he(y(U),{replace:!0}))}function w(U,X){const B=U.matched[U.matched.length-1];if(B&&B.redirect){const{redirect:z}=B;let re=typeof z=="function"?z(U,X):z;return typeof re=="string"&&(re=re.includes("?")||re.includes("#")?re=y(re):{path:re},re.params={}),he({query:U.query,hash:U.hash,params:re.path!=null?{}:U.params},re)}}function S(U,X){const B=a=v(U),z=c.value,re=U.state,_e=U.force,m=U.replace===!0,E=w(B,z);if(E)return S(he(y(E),{state:typeof E=="object"?he({},re,E.state):re,force:_e,replace:m}),X||B);const I=B;I.redirectedFrom=X;let H;return!_e&&lb(s,z,B)&&(H=es(Oe.NAVIGATION_DUPLICATED,{to:I,from:z}),Ie(z,z,!0,!1)),(H?Promise.resolve(H):k(I,z)).catch(V=>Mt(V)?Mt(V,Oe.NAVIGATION_GUARD_REDIRECT)?V:ct(V):q(V,I,z)).then(V=>{if(V){if(Mt(V,Oe.NAVIGATION_GUARD_REDIRECT))return S(he({replace:m},y(V.to),{state:typeof V.to=="object"?he({},re,V.to.state):re,force:_e}),X||I)}else V=M(I,z,!0,m,re);return W(I,z,V),V})}function x(U,X){const B=p(U,X);return B?Promise.reject(B):Promise.resolve()}function O(U){const X=Ct.values().next().value;return X&&typeof X.runWithContext=="function"?X.runWithContext(U):U()}function k(U,X){let B;const[z,re,_e]=Cb(U,X);B=Oi(z.reverse(),"beforeRouteLeave",U,X);for(const E of z)E.leaveGuards.forEach(I=>{B.push(cn(I,U,X))});const m=x.bind(null,U,X);return B.push(m),Be(B).then(()=>{B=[];for(const E of i.list())B.push(cn(E,U,X));return B.push(m),Be(B)}).then(()=>{B=Oi(re,"beforeRouteUpdate",U,X);for(const E of re)E.updateGuards.forEach(I=>{B.push(cn(I,U,X))});return B.push(m),Be(B)}).then(()=>{B=[];for(const E of _e)if(E.beforeEnter)if(Et(E.beforeEnter))for(const I of E.beforeEnter)B.push(cn(I,U,X));else B.push(cn(E.beforeEnter,U,X));return B.push(m),Be(B)}).then(()=>(U.matched.forEach(E=>E.enterCallbacks={}),B=Oi(_e,"beforeRouteEnter",U,X,O),B.push(m),Be(B))).then(()=>{B=[];for(const E of o.list())B.push(cn(E,U,X));return B.push(m),Be(B)}).catch(E=>Mt(E,Oe.NAVIGATION_CANCELLED)?E:Promise.reject(E))}function W(U,X,B){l.list().forEach(z=>O(()=>z(U,X,B)))}function M(U,X,B,z,re){const _e=p(U,X);if(_e)return _e;const m=X===en,E=Fn?history.state:{};B&&(z||m?r.replace(U.fullPath,he({scroll:m&&E&&E.scroll},re)):r.push(U.fullPath,re)),c.value=U,Ie(U,X,B,m),ct()}let K;function te(){K||(K=r.listen((U,X,B)=>{if(!mt.listening)return;const z=v(U),re=w(z,mt.currentRoute.value);if(re){S(he(re,{replace:!0,force:!0}),z).catch(As);return}a=z;const _e=c.value;Fn&&mb(Oc(_e.fullPath,B.delta),li()),k(z,_e).catch(m=>Mt(m,Oe.NAVIGATION_ABORTED|Oe.NAVIGATION_CANCELLED)?m:Mt(m,Oe.NAVIGATION_GUARD_REDIRECT)?(S(he(y(m.to),{force:!0}),z).then(E=>{Mt(E,Oe.NAVIGATION_ABORTED|Oe.NAVIGATION_DUPLICATED)&&!B.delta&&B.type===oo.pop&&r.go(-1,!1)}).catch(As),Promise.reject()):(B.delta&&r.go(-B.delta,!1),q(m,z,_e))).then(m=>{m=m||M(z,_e,!1),m&&(B.delta&&!Mt(m,Oe.NAVIGATION_CANCELLED)?r.go(-B.delta,!1):B.type===oo.pop&&Mt(m,Oe.NAVIGATION_ABORTED|Oe.NAVIGATION_DUPLICATED)&&r.go(-1,!1)),W(z,_e,m)}).catch(As)}))}let ie=ds(),Y=ds(),Q;function q(U,X,B){ct(U);const z=Y.list();return z.length?z.forEach(re=>re(U,X,B)):console.error(U),Promise.reject(U)}function ae(){return Q&&c.value!==en?Promise.resolve():new Promise((U,X)=>{ie.add([U,X])})}function ct(U){return Q||(Q=!U,te(),ie.list().forEach(([X,B])=>U?B(U):X()),ie.reset()),U}function Ie(U,X,B,z){const{scrollBehavior:re}=e;if(!Fn||!re)return Promise.resolve();const _e=!B&&gb(Oc(U.fullPath,0))||(z||!B)&&history.state&&history.state.scroll||null;return rs().then(()=>re(U,X,_e)).then(m=>m&&pb(m)).catch(m=>q(m,U,X))}const De=U=>r.go(U);let vt;const Ct=new Set,mt={currentRoute:c,listening:!0,addRoute:b,removeRoute:A,clearRoutes:t.clearRoutes,hasRoute:L,getRoutes:T,resolve:v,options:e,push:g,replace:C,go:De,back:()=>De(-1),forward:()=>De(1),beforeEach:i.add,beforeResolve:o.add,afterEach:l.add,onError:Y.add,isReady:ae,install(U){U.component("RouterLink",$b),U.component("RouterView",Gb),U.config.globalProperties.$router=mt,Object.defineProperty(U.config.globalProperties,"$route",{enumerable:!0,get:()=>Pt(c)}),Fn&&!vt&&c.value===en&&(vt=!0,g(r.location).catch(z=>{}));const X={};for(const z in en)Object.defineProperty(X,z,{get:()=>c.value[z],enumerable:!0});U.provide(ci,mt),U.provide(Qo,_o(X)),U.provide(co,c);const B=U.unmount;Ct.add(U),U.unmount=function(){Ct.delete(U),Ct.size<1&&(a=en,K&&K(),K=null,c.value=en,vt=!1,Q=!1),B()}}};function Be(U){return U.reduce((X,B)=>X.then(()=>O(B)),Promise.resolve())}return mt}function ty(){return Ye(ci)}function ny(e){return Ye(Qo)}export{Br as $,Pt as A,Em as B,Ir as C,ku as D,Sh as E,we as F,nh as G,os as H,Ah as I,Xr as J,uu as K,Nh as L,Fo as M,Xh as N,Uh as O,ty as P,ny as Q,$b as R,Ch as S,Wp as T,qd as U,vh as V,ns as W,ho as X,Qf as Y,cu as Z,gh as _,xs as a,fn as a0,qr as a1,Sd as a2,Es as a3,Qb as a4,Zb as a5,Gb as a6,Xb as a7,Jb as a8,_o as a9,Th as aa,fm as ab,Cm as ac,ey as ad,zb as ae,qb as af,Gi as ag,yp as ah,Yb as ai,xo as b,Tr as c,hn as d,Se as e,Eo as f,Yd as g,Mo as h,Ye as i,Gs as j,eh as k,rs as l,qe as m,Ks as n,ei as o,is as p,gp as q,un as r,Rh as s,Gc as t,qo as u,Au as v,ht as w,au as x,Ue as y,Fh as z};
53
+ */let Tb=()=>location.protocol+"//"+location.host;function Ff(e,t){const{pathname:n,search:s,hash:r}=t,i=e.indexOf("#");if(i>-1){let o=r.includes(e.slice(i))?e.slice(i).length:1,l=r.slice(o);return l[0]!=="/"&&(l="/"+l),Rc(l,"")}return Rc(n,e)+s+r}function Sb(e,t,n,s){let r=[],i=[],o=null;const l=({state:h})=>{const b=Ff(e,location),A=n.value,T=t.value;let L=0;if(h){if(n.value=b,t.value=h,o&&o===A){o=null;return}L=T?h.position-T.position:0}else s(b);r.forEach(v=>{v(n.value,A,{delta:L,type:oo.pop,direction:L?L>0?Ni.forward:Ni.back:Ni.unknown})})};function c(){o=n.value}function a(h){r.push(h);const b=()=>{const A=r.indexOf(h);A>-1&&r.splice(A,1)};return i.push(b),b}function u(){if(document.visibilityState==="hidden"){const{history:h}=window;if(!h.state)return;h.replaceState(he({},h.state,{scroll:li()}),"")}}function f(){for(const h of i)h();i=[],window.removeEventListener("popstate",l),window.removeEventListener("pagehide",u),document.removeEventListener("visibilitychange",u)}return window.addEventListener("popstate",l),window.addEventListener("pagehide",u),document.addEventListener("visibilitychange",u),{pauseListeners:c,listen:a,destroy:f}}function Lc(e,t,n,s=!1,r=!1){return{back:e,current:t,forward:n,replaced:s,position:window.history.length,scroll:r?li():null}}function Ab(e){const{history:t,location:n}=window,s={value:Ff(e,n)},r={value:t.state};r.value||i(s.value,{back:null,current:s.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(c,a,u){const f=e.indexOf("#"),h=f>-1?(n.host&&document.querySelector("base")?e:e.slice(f))+c:Tb()+e+c;try{t[u?"replaceState":"pushState"](a,"",h),r.value=a}catch(b){console.error(b),n[u?"replace":"assign"](h)}}function o(c,a){i(c,he({},t.state,Lc(r.value.back,c,r.value.forward,!0),a,{position:r.value.position}),!0),s.value=c}function l(c,a){const u=he({},r.value,t.state,{forward:c,scroll:li()});i(u.current,u,!0),i(c,he({},Lc(s.value,c,null),{position:u.position+1},a),!1),s.value=c}return{location:s,state:r,push:l,replace:o}}function zb(e){e=ub(e);const t=Ab(e),n=Sb(e,t.state,t.location,t.replace);function s(i,o=!0){o||n.pauseListeners(),history.go(i)}const r=he({location:"",base:e,go:s,createHref:db.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}let En=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e})({});var Fe=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e})(Fe||{});const Rb={type:En.Static,value:""},Nb=/[a-zA-Z0-9_]/;function Ob(e){if(!e)return[[]];if(e==="/")return[[Rb]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(b){throw new Error(`ERR (${n})/"${a}": ${b}`)}let n=Fe.Static,s=n;const r=[];let i;function o(){i&&r.push(i),i=[]}let l=0,c,a="",u="";function f(){a&&(n===Fe.Static?i.push({type:En.Static,value:a}):n===Fe.Param||n===Fe.ParamRegExp||n===Fe.ParamRegExpEnd?(i.length>1&&(c==="*"||c==="+")&&t(`A repeatable param (${a}) must be alone in its segment. eg: '/:ids+.`),i.push({type:En.Param,value:a,regexp:u,repeatable:c==="*"||c==="+",optional:c==="*"||c==="?"})):t("Invalid state to consume buffer"),a="")}function h(){a+=c}for(;l<e.length;){if(c=e[l++],c==="\\"&&n!==Fe.ParamRegExp){s=n,n=Fe.EscapeNext;continue}switch(n){case Fe.Static:c==="/"?(a&&f(),o()):c===":"?(f(),n=Fe.Param):h();break;case Fe.EscapeNext:h(),n=s;break;case Fe.Param:c==="("?n=Fe.ParamRegExp:Nb.test(c)?h():(f(),n=Fe.Static,c!=="*"&&c!=="?"&&c!=="+"&&l--);break;case Fe.ParamRegExp:c===")"?u[u.length-1]=="\\"?u=u.slice(0,-1)+c:n=Fe.ParamRegExpEnd:u+=c;break;case Fe.ParamRegExpEnd:f(),n=Fe.Static,c!=="*"&&c!=="?"&&c!=="+"&&l--,u="";break;default:t("Unknown state");break}}return n===Fe.ParamRegExp&&t(`Unfinished custom RegExp for param "${a}"`),f(),o(),r}const wc="[^/]+?",Ib={sensitive:!1,strict:!1,start:!0,end:!0};var Qe=(function(e){return e[e._multiplier=10]="_multiplier",e[e.Root=90]="Root",e[e.Segment=40]="Segment",e[e.SubSegment=30]="SubSegment",e[e.Static=40]="Static",e[e.Dynamic=20]="Dynamic",e[e.BonusCustomRegExp=10]="BonusCustomRegExp",e[e.BonusWildcard=-50]="BonusWildcard",e[e.BonusRepeatable=-20]="BonusRepeatable",e[e.BonusOptional=-8]="BonusOptional",e[e.BonusStrict=.7000000000000001]="BonusStrict",e[e.BonusCaseSensitive=.25]="BonusCaseSensitive",e})(Qe||{});const Pb=/[.+*?^${}()[\]/\\]/g;function Lb(e,t){const n=he({},Ib,t),s=[];let r=n.start?"^":"";const i=[];for(const a of e){const u=a.length?[]:[Qe.Root];n.strict&&!a.length&&(r+="/");for(let f=0;f<a.length;f++){const h=a[f];let b=Qe.Segment+(n.sensitive?Qe.BonusCaseSensitive:0);if(h.type===En.Static)f||(r+="/"),r+=h.value.replace(Pb,"\\$&"),b+=Qe.Static;else if(h.type===En.Param){const{value:A,repeatable:T,optional:L,regexp:v}=h;i.push({name:A,repeatable:T,optional:L});const y=v||wc;if(y!==wc){b+=Qe.BonusCustomRegExp;try{`${y}`}catch(g){throw new Error(`Invalid custom RegExp for param "${A}" (${y}): `+g.message)}}let p=T?`((?:${y})(?:/(?:${y}))*)`:`(${y})`;f||(p=L&&a.length<2?`(?:/${p})`:"/"+p),L&&(p+="?"),r+=p,b+=Qe.Dynamic,L&&(b+=Qe.BonusOptional),T&&(b+=Qe.BonusRepeatable),y===".*"&&(b+=Qe.BonusWildcard)}u.push(b)}s.push(u)}if(n.strict&&n.end){const a=s.length-1;s[a][s[a].length-1]+=Qe.BonusStrict}n.strict||(r+="/?"),n.end?r+="$":n.strict&&!r.endsWith("/")&&(r+="(?:/|$)");const o=new RegExp(r,n.sensitive?"":"i");function l(a){const u=a.match(o),f={};if(!u)return null;for(let h=1;h<u.length;h++){const b=u[h]||"",A=i[h-1];f[A.name]=b&&A.repeatable?b.split("/"):b}return f}function c(a){let u="",f=!1;for(const h of e){(!f||!u.endsWith("/"))&&(u+="/"),f=!1;for(const b of h)if(b.type===En.Static)u+=b.value;else if(b.type===En.Param){const{value:A,repeatable:T,optional:L}=b,v=A in a?a[A]:"";if(Et(v)&&!T)throw new Error(`Provided param "${A}" is an array but it is not repeatable (* or + modifiers)`);const y=Et(v)?v.join("/"):v;if(!y)if(L)h.length<2&&(u.endsWith("/")?u=u.slice(0,-1):f=!0);else throw new Error(`Missing required param "${A}"`);u+=y}}return u||"/"}return{re:o,score:s,keys:i,parse:l,stringify:c}}function wb(e,t){let n=0;for(;n<e.length&&n<t.length;){const s=t[n]-e[n];if(s)return s;n++}return e.length<t.length?e.length===1&&e[0]===Qe.Static+Qe.Segment?-1:1:e.length>t.length?t.length===1&&t[0]===Qe.Static+Qe.Segment?1:-1:0}function Vf(e,t){let n=0;const s=e.score,r=t.score;for(;n<s.length&&n<r.length;){const i=wb(s[n],r[n]);if(i)return i;n++}if(Math.abs(r.length-s.length)===1){if(kc(s))return 1;if(kc(r))return-1}return r.length-s.length}function kc(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const kb={strict:!1,end:!0,sensitive:!1};function xb(e,t,n){const s=Lb(Ob(e.path),n),r=he(s,{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function Mb(e,t){const n=[],s=new Map;t=Ac(kb,t);function r(f){return s.get(f)}function i(f,h,b){const A=!b,T=Mc(f);T.aliasOf=b&&b.record;const L=Ac(t,f),v=[T];if("alias"in f){const g=typeof f.alias=="string"?[f.alias]:f.alias;for(const C of g)v.push(Mc(he({},T,{components:b?b.record.components:T.components,path:C,aliasOf:b?b.record:T})))}let y,p;for(const g of v){const{path:C}=g;if(h&&C[0]!=="/"){const w=h.record.path,S=w[w.length-1]==="/"?"":"/";g.path=h.record.path+(C&&S+C)}if(y=xb(g,h,L),b?b.alias.push(y):(p=p||y,p!==y&&p.alias.push(y),A&&f.name&&!Dc(y)&&o(f.name)),Uf(y)&&c(y),T.children){const w=T.children;for(let S=0;S<w.length;S++)i(w[S],y,b&&b.children[S])}b=b||y}return p?()=>{o(p)}:As}function o(f){if(xf(f)){const h=s.get(f);h&&(s.delete(f),n.splice(n.indexOf(h),1),h.children.forEach(o),h.alias.forEach(o))}else{const h=n.indexOf(f);h>-1&&(n.splice(h,1),f.record.name&&s.delete(f.record.name),f.children.forEach(o),f.alias.forEach(o))}}function l(){return n}function c(f){const h=Vb(f,n);n.splice(h,0,f),f.record.name&&!Dc(f)&&s.set(f.record.name,f)}function a(f,h){let b,A={},T,L;if("name"in f&&f.name){if(b=s.get(f.name),!b)throw es(Oe.MATCHER_NOT_FOUND,{location:f});L=b.record.name,A=he(xc(h.params,b.keys.filter(p=>!p.optional).concat(b.parent?b.parent.keys.filter(p=>p.optional):[]).map(p=>p.name)),f.params&&xc(f.params,b.keys.map(p=>p.name))),T=b.stringify(A)}else if(f.path!=null)T=f.path,b=n.find(p=>p.re.test(T)),b&&(A=b.parse(T),L=b.record.name);else{if(b=h.name?s.get(h.name):n.find(p=>p.re.test(h.path)),!b)throw es(Oe.MATCHER_NOT_FOUND,{location:f,currentLocation:h});L=b.record.name,A=he({},h.params,f.params),T=b.stringify(A)}const v=[];let y=b;for(;y;)v.unshift(y.record),y=y.parent;return{name:L,path:T,params:A,matched:v,meta:Fb(v)}}e.forEach(f=>i(f));function u(){n.length=0,s.clear()}return{addRoute:i,resolve:a,removeRoute:o,clearRoutes:u,getRoutes:l,getRecordMatcher:r}}function xc(e,t){const n={};for(const s of t)s in e&&(n[s]=e[s]);return n}function Mc(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Db(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function Db(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const s in e.components)t[s]=typeof n=="object"?n[s]:n;return t}function Dc(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Fb(e){return e.reduce((t,n)=>he(t,n.meta),{})}function Vb(e,t){let n=0,s=t.length;for(;n!==s;){const i=n+s>>1;Vf(e,t[i])<0?s=i:n=i+1}const r=Ub(e);return r&&(s=t.lastIndexOf(r,s-1)),s}function Ub(e){let t=e;for(;t=t.parent;)if(Uf(t)&&Vf(e,t)===0)return t}function Uf({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Fc(e){const t=Ye(ci),n=Ye(Qo),s=Ue(()=>{const c=Pt(e.to);return t.resolve(c)}),r=Ue(()=>{const{matched:c}=s.value,{length:a}=c,u=c[a-1],f=n.matched;if(!u||!f.length)return-1;const h=f.findIndex(zn.bind(null,u));if(h>-1)return h;const b=Vc(c[a-2]);return a>1&&Vc(u)===b&&f[f.length-1].path!==b?f.findIndex(zn.bind(null,c[a-2])):h}),i=Ue(()=>r.value>-1&&jb(n.params,s.value.params)),o=Ue(()=>r.value>-1&&r.value===n.matched.length-1&&kf(n.params,s.value.params));function l(c={}){if(Bb(c)){const a=t[Pt(e.replace)?"replace":"push"](Pt(e.to)).catch(As);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>a),a}return Promise.resolve()}return{route:s,href:Ue(()=>s.value.href),isActive:i,isExactActive:o,navigate:l}}function Hb(e){return e.length===1?e[0]:e}const Wb=hn({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:Fc,setup(e,{slots:t}){const n=ns(Fc(e)),{options:s}=Ye(ci),r=Ue(()=>({[Uc(e.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[Uc(e.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const i=t.default&&Hb(t.default(n));return e.custom?i:fn("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},i)}}}),$b=Wb;function Bb(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function jb(e,t){for(const n in t){const s=t[n],r=e[n];if(typeof s=="string"){if(s!==r)return!1}else if(!Et(r)||r.length!==s.length||s.some((i,o)=>i.valueOf()!==r[o].valueOf()))return!1}return!0}function Vc(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Uc=(e,t,n)=>e??t??n,Kb=hn({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const s=Ye(co),r=Ue(()=>e.route||s.value),i=Ye(Pc,0),o=Ue(()=>{let a=Pt(i);const{matched:u}=r.value;let f;for(;(f=u[a])&&!f.components;)a++;return a}),l=Ue(()=>r.value.matched[o.value]);Es(Pc,Ue(()=>o.value+1)),Es(Jo,l),Es(co,r);const c=un();return ht(()=>[c.value,l.value,e.name],([a,u,f],[h,b,A])=>{u&&(u.instances[f]=a,b&&b!==u&&a&&a===h&&(u.leaveGuards.size||(u.leaveGuards=b.leaveGuards),u.updateGuards.size||(u.updateGuards=b.updateGuards))),a&&u&&(!b||!zn(u,b)||!h)&&(u.enterCallbacks[f]||[]).forEach(T=>T(a))},{flush:"post"}),()=>{const a=r.value,u=e.name,f=l.value,h=f&&f.components[u];if(!h)return Hc(n.default,{Component:h,route:a});const b=f.props[u],A=b?b===!0?a.params:typeof b=="function"?b(a):b:null,L=fn(h,he({},A,t,{onVnodeUnmounted:v=>{v.component.isUnmounted&&(f.instances[u]=null)},ref:c}));return Hc(n.default,{Component:L,route:a})||L}}});function Hc(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const Gb=Kb;function ey(e){const t=Mb(e.routes,e),n=e.parseQuery||Eb,s=e.stringifyQuery||Ic,r=e.history,i=ds(),o=ds(),l=ds(),c=Xr(en);let a=en;Fn&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=Ai.bind(null,U=>""+U),f=Ai.bind(null,sb),h=Ai.bind(null,$s);function b(U,X){let B,z;return xf(U)?(B=t.getRecordMatcher(U),z=X):z=U,t.addRoute(z,B)}function A(U){const X=t.getRecordMatcher(U);X&&t.removeRoute(X)}function T(){return t.getRoutes().map(U=>U.record)}function L(U){return!!t.getRecordMatcher(U)}function v(U,X){if(X=he({},X||c.value),typeof U=="string"){const E=Ri(n,U,X.path),I=t.resolve({path:E.path},X),H=r.createHref(E.fullPath);return he(E,I,{params:h(I.params),hash:$s(E.hash),redirectedFrom:void 0,href:H})}let B;if(U.path!=null)B=he({},U,{path:Ri(n,U.path,X.path).path});else{const E=he({},U.params);for(const I in E)E[I]==null&&delete E[I];B=he({},U,{params:f(E)}),X.params=f(X.params)}const z=t.resolve(B,X),re=U.hash||"";z.params=u(h(z.params));const _e=ob(s,he({},U,{hash:eb(re),path:z.path})),m=r.createHref(_e);return he({fullPath:_e,hash:re,query:s===Ic?vb(U.query):U.query||{}},z,{redirectedFrom:void 0,href:m})}function y(U){return typeof U=="string"?Ri(n,U,c.value.path):he({},U)}function p(U,X){if(a!==U)return es(Oe.NAVIGATION_CANCELLED,{from:X,to:U})}function g(U){return S(U)}function C(U){return g(he(y(U),{replace:!0}))}function w(U,X){const B=U.matched[U.matched.length-1];if(B&&B.redirect){const{redirect:z}=B;let re=typeof z=="function"?z(U,X):z;return typeof re=="string"&&(re=re.includes("?")||re.includes("#")?re=y(re):{path:re},re.params={}),he({query:U.query,hash:U.hash,params:re.path!=null?{}:U.params},re)}}function S(U,X){const B=a=v(U),z=c.value,re=U.state,_e=U.force,m=U.replace===!0,E=w(B,z);if(E)return S(he(y(E),{state:typeof E=="object"?he({},re,E.state):re,force:_e,replace:m}),X||B);const I=B;I.redirectedFrom=X;let H;return!_e&&lb(s,z,B)&&(H=es(Oe.NAVIGATION_DUPLICATED,{to:I,from:z}),Ie(z,z,!0,!1)),(H?Promise.resolve(H):k(I,z)).catch(V=>Mt(V)?Mt(V,Oe.NAVIGATION_GUARD_REDIRECT)?V:ct(V):q(V,I,z)).then(V=>{if(V){if(Mt(V,Oe.NAVIGATION_GUARD_REDIRECT))return S(he({replace:m},y(V.to),{state:typeof V.to=="object"?he({},re,V.to.state):re,force:_e}),X||I)}else V=M(I,z,!0,m,re);return W(I,z,V),V})}function x(U,X){const B=p(U,X);return B?Promise.reject(B):Promise.resolve()}function O(U){const X=Ct.values().next().value;return X&&typeof X.runWithContext=="function"?X.runWithContext(U):U()}function k(U,X){let B;const[z,re,_e]=Cb(U,X);B=Oi(z.reverse(),"beforeRouteLeave",U,X);for(const E of z)E.leaveGuards.forEach(I=>{B.push(cn(I,U,X))});const m=x.bind(null,U,X);return B.push(m),Be(B).then(()=>{B=[];for(const E of i.list())B.push(cn(E,U,X));return B.push(m),Be(B)}).then(()=>{B=Oi(re,"beforeRouteUpdate",U,X);for(const E of re)E.updateGuards.forEach(I=>{B.push(cn(I,U,X))});return B.push(m),Be(B)}).then(()=>{B=[];for(const E of _e)if(E.beforeEnter)if(Et(E.beforeEnter))for(const I of E.beforeEnter)B.push(cn(I,U,X));else B.push(cn(E.beforeEnter,U,X));return B.push(m),Be(B)}).then(()=>(U.matched.forEach(E=>E.enterCallbacks={}),B=Oi(_e,"beforeRouteEnter",U,X,O),B.push(m),Be(B))).then(()=>{B=[];for(const E of o.list())B.push(cn(E,U,X));return B.push(m),Be(B)}).catch(E=>Mt(E,Oe.NAVIGATION_CANCELLED)?E:Promise.reject(E))}function W(U,X,B){l.list().forEach(z=>O(()=>z(U,X,B)))}function M(U,X,B,z,re){const _e=p(U,X);if(_e)return _e;const m=X===en,E=Fn?history.state:{};B&&(z||m?r.replace(U.fullPath,he({scroll:m&&E&&E.scroll},re)):r.push(U.fullPath,re)),c.value=U,Ie(U,X,B,m),ct()}let K;function te(){K||(K=r.listen((U,X,B)=>{if(!mt.listening)return;const z=v(U),re=w(z,mt.currentRoute.value);if(re){S(he(re,{replace:!0,force:!0}),z).catch(As);return}a=z;const _e=c.value;Fn&&mb(Oc(_e.fullPath,B.delta),li()),k(z,_e).catch(m=>Mt(m,Oe.NAVIGATION_ABORTED|Oe.NAVIGATION_CANCELLED)?m:Mt(m,Oe.NAVIGATION_GUARD_REDIRECT)?(S(he(y(m.to),{force:!0}),z).then(E=>{Mt(E,Oe.NAVIGATION_ABORTED|Oe.NAVIGATION_DUPLICATED)&&!B.delta&&B.type===oo.pop&&r.go(-1,!1)}).catch(As),Promise.reject()):(B.delta&&r.go(-B.delta,!1),q(m,z,_e))).then(m=>{m=m||M(z,_e,!1),m&&(B.delta&&!Mt(m,Oe.NAVIGATION_CANCELLED)?r.go(-B.delta,!1):B.type===oo.pop&&Mt(m,Oe.NAVIGATION_ABORTED|Oe.NAVIGATION_DUPLICATED)&&r.go(-1,!1)),W(z,_e,m)}).catch(As)}))}let ie=ds(),Y=ds(),Q;function q(U,X,B){ct(U);const z=Y.list();return z.length?z.forEach(re=>re(U,X,B)):console.error(U),Promise.reject(U)}function ae(){return Q&&c.value!==en?Promise.resolve():new Promise((U,X)=>{ie.add([U,X])})}function ct(U){return Q||(Q=!U,te(),ie.list().forEach(([X,B])=>U?B(U):X()),ie.reset()),U}function Ie(U,X,B,z){const{scrollBehavior:re}=e;if(!Fn||!re)return Promise.resolve();const _e=!B&&gb(Oc(U.fullPath,0))||(z||!B)&&history.state&&history.state.scroll||null;return rs().then(()=>re(U,X,_e)).then(m=>m&&pb(m)).catch(m=>q(m,U,X))}const De=U=>r.go(U);let vt;const Ct=new Set,mt={currentRoute:c,listening:!0,addRoute:b,removeRoute:A,clearRoutes:t.clearRoutes,hasRoute:L,getRoutes:T,resolve:v,options:e,push:g,replace:C,go:De,back:()=>De(-1),forward:()=>De(1),beforeEach:i.add,beforeResolve:o.add,afterEach:l.add,onError:Y.add,isReady:ae,install(U){U.component("RouterLink",$b),U.component("RouterView",Gb),U.config.globalProperties.$router=mt,Object.defineProperty(U.config.globalProperties,"$route",{enumerable:!0,get:()=>Pt(c)}),Fn&&!vt&&c.value===en&&(vt=!0,g(r.location).catch(z=>{}));const X={};for(const z in en)Object.defineProperty(X,z,{get:()=>c.value[z],enumerable:!0});U.provide(ci,mt),U.provide(Qo,_o(X)),U.provide(co,c);const B=U.unmount;Ct.add(U),U.unmount=function(){Ct.delete(U),Ct.size<1&&(a=en,K&&K(),K=null,c.value=en,vt=!1,Q=!1),B()}}};function Be(U){return U.reduce((X,B)=>X.then(()=>O(B)),Promise.resolve())}return mt}function ty(){return Ye(ci)}function ny(e){return Ye(Qo)}export{fn as $,Fh as A,Em as B,Ir as C,ku as D,Sh as E,we as F,os as G,Ah as H,Xr as I,uu as J,Nh as K,Fo as L,Xh as M,Uh as N,ty as O,ny as P,Ch as Q,$b as R,qd as S,Wp as T,vh as U,ns as V,ho as W,Qf as X,cu as Y,gh as Z,Br as _,au as a,qr as a0,Sd as a1,Es as a2,Qb as a3,Zb as a4,Gb as a5,Xb as a6,Jb as a7,_o as a8,Th as a9,fm as aa,nh as ab,Cm as ac,ey as ad,zb as ae,qb as af,Gi as ag,yp as ah,Yb as ai,Mo as b,gp as c,hn as d,xo as e,qo as f,ei as g,Tr as h,Ye as i,Se as j,Eo as k,Yd as l,Gs as m,Ks as n,xs as o,eh as p,rs as q,un as r,qe as s,Gc as t,Pt as u,Au as v,ht as w,is as x,Rh as y,Ue as z};
@@ -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-qKUR3_rw.js";import"./index-CenMTLFY.js";import"./vendor-vue-CncuOShJ.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-qKUR3_rw.js";import{p as Ot}from"./chunk-4BX2VUAB-DnNs4Y-E.js";import{p as Wt}from"./cynefin-OW5HDTMX-B-6oGbPp.js";import"./index-CenMTLFY.js";import"./vendor-vue-CncuOShJ.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-qKUR3_rw.js";import{i as _i}from"./init-Gi6I4Gst.js";import{o as ki}from"./ordinal-Cboi1Yqb.js";import{l as zt}from"./linear-Dl_nEC-L.js";import"./index-CenMTLFY.js";import"./vendor-vue-CncuOShJ.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()+`
@@ -0,0 +1 @@
1
+ const e={"a11y.mainContent":"主要内容","a11y.primaryNavigation":"主导航","a11y.workspaceSessionIndex":"工作区和会话索引","auth.connectingTitle":"正在连接 Dim…","auth.expiredTitle":"此链接已失效","auth.expiredBefore":"此浏览器尚未登录 Web 工作区,或工作区已重新打开。请运行 ","auth.expiredAfter":" 获取新的链接。","auth.versionTitle":"更新浏览器页面","auth.versionDescription":"此页面与 App Server 的协议版本不一致。请重新加载页面;若仍存在,请再次运行 dimcode web。","brand.product":"Dim","brand.webHost":"Web 工作区","chat.assistant":"Dim","chat.composer":"消息输入框","chat.copyFailed":"无法访问剪贴板。","chat.emptyTimeline":"发送消息以开始会话。","chat.pathCopied":"已复制路径","chat.removedDescription":"此会话已关闭,或在 App Server 上已不存在。","chat.removedTitle":"会话已关闭","chat.you":"你","common.cancel":"取消","common.close":"关闭","common.loading":"加载中…","common.search":"搜索","common.skipToContent":"跳到主要内容","composer.category.model":"模型","composer.category.session":"会话","composer.branchUnavailable":"此处暂不支持创建分支","composer.command.branch":"从当前线创建分支","composer.command.lines":"查看会话分支","command.basisEstimated":"估算","command.basisProvider":"由服务商统计","command.compactSkipped":"已跳过压缩","command.compacted":"上下文已压缩","command.failed":"命令失败","command.effortChoices":"推理强度可选值:{choices}","command.effortSet":"推理强度配置{outcome}:{value}","command.effortUnavailable":"此模型没有声明推理强度可选值。","command.effortUnknown":"此模型没有声明这个推理强度。","command.effortUsage":"用法:/effort [值]","composer.command.effort":"查看或设置推理强度","queue.notHeld":"这条消息已被运行采纳。","queue.remove":"移除","queue.steer":"插话","queue.title":"排队中的消息","command.usage":"上下文:{input} / {window} tokens({percent}%),{basis} · 输出最多 {output} · 在 {threshold} 时压缩","command.usageTitle":"上下文用量","composer.command.compact":"压缩上下文","composer.command.fork":"在最近一次完成的回合处分叉","composer.command.usage":"查看上下文窗口用量","fork.confirm":"在最近一次完成的回合处分叉此会话?新会话会复制主线到该位置。","fork.confirmLabel":"分叉","composer.command.goal":"查看或修改目标","goal.action.clear":"清除","goal.action.edit":"修改","goal.action.pause":"暂停","goal.action.resume":"恢复","goal.action.set":"设置","goal.evaluator":"评估者裁定","goal.line":"主线目标 · {status}","goal.none":"主线没有目标。","goal.sent":"已{action}主线目标","goal.status.active":"进行中","goal.status.blocked":"受阻","goal.status.completed":"已完成","goal.status.none":"无状态","goal.status.paused":"已暂停({reason})","goal.usage":"用法:/goal [目标 | set 目标 | edit 目标 | pause | resume | clear]","composer.command.models":"选择模型","composer.command.new":"新建会话","composer.commandKeys":"↑↓ 选择 · Enter 确认 · Esc 关闭","composer.command.permissions":"查看或修改会话权限","composer.permission.label":"权限","composer.permission.fileAccess":"文件访问","composer.permission.file.read-only":"只读","composer.permission.file.workspace-read-write":"工作区读写","composer.permission.file.unrestricted":"不限制路径","composer.permission.fileDescription.read-only":"拒绝文件写入,包括已授权路径。","composer.permission.fileDescription.workspace-read-write":"允许工作区内写入,其他路径需要授权。","composer.permission.fileDescription.unrestricted":"不限制为工作区路径,仍遵守工具审批。","composer.permission.toolApproval":"工具审批","composer.permission.tool.ask":"询问","composer.permission.tool.bypass":"跳过询问","composer.permission.toolDescription.ask":"每次调用均询问,除非工具或命令允许规则已回答;明确拒绝仍优先。","composer.permission.toolDescription.bypass":"跳过工具询问,不跳过文件检查或明确拒绝。","composer.permission.legacy":"旧版工具策略","composer.permission.legacy.read-only":"旧版只读策略:允许读取和会话操作,拒绝进程、网络及其他风险;仍遵守明确的工具和命令规则。不等同于每次询问。","composer.permission.legacy.workspace-write":"旧版工作区策略:允许读取、会话操作及工作区写入,其他风险需询问;仍遵守明确的工具和命令规则。不等同于每次询问。","composer.permission.unrestrictedConfirm":"取消工作区路径限制?工具审批和进程隔离保持不变。","composer.permission.bypassConfirm":"跳过工具询问?文件检查、明确拒绝和进程隔离仍然生效。","composer.permission.allowedTools":"允许的工具","composer.permission.disallowedTools":"拒绝的工具","composer.permission.independent":"这些选项不会改变进程隔离。文件访问是工具准入检查,不是操作系统沙盒。","composer.permission.processIsolation":"进程隔离设置","permission.conflict":"权限已在别处修改,当前显示的是最新设置。","timeline.rail":"消息","composer.files":"文件","composer.mentionKeys":"↑↓ 选择 · Enter 插入 · Esc 关闭","composer.imageLimit":"一条消息最多 20 张图片。","composer.imageAttachment":"已附加的图片","question.selectMany":"可多选","composer.imageReadFailed":"无法读取这张图片。","composer.onlyImages":"这里目前只能附加图片。","composer.pastedText":"粘贴的文本 · {lines} 行","composer.pasteTooLarge":"粘贴内容超过 10 MB。","composer.removeAttachment":"移除附件","composer.commands":"命令","composer.modelLoadRetry":"加载失败 · 重试","composer.modelLoading":"模型加载中…","composer.noModels":"没有可用模型","composer.notConfigured":"默认模型","composer.searchModels":"搜索模型...","composer.send":"发送","composer.sendMessage":"发送消息...","composer.stopResponse":"停止回复","connection.accessRequired":"需要访问权限","connection.connecting":"正在连接","connection.host":"App Server","connection.live":"已连接","connection.protocolError":"App Server 返回了无法识别的数据","connection.reconnecting":"正在重连","connection.versionMismatch":"版本不匹配","detail.output":"输出","lines.afterMessage":"第 {count} 条消息之后","lines.atEnd":"在线的末尾","lines.beforeMessage":"在“{message}”之前","lines.closePanel":"关闭线面板","lines.closeTab":"关闭线标签","lines.collapse":"恢复面板宽度","lines.create":"创建线","lines.empty":"这条线还没有消息。","lines.emptyHint":"从一条消息创建线,并行处理另一个方向。","lines.emptyTitle":"还没有线","lines.end":"结束","lines.endDescription":"这条线会停止并变为只读,且无法撤销。","lines.endLine":"结束线 {name}","lines.endTitle":"结束线“{name}”?","lines.expand":"展开面板","lines.from":"来自 {name}","lines.lineAria":"线 {name}","lines.loadFailed":"无法加载这条线。","lines.main":"main","lines.mainHint":"会话本身","lines.newChild":"新建子线","lines.newLine":"新建线","lines.newLineFrom":"来自 {name}","lines.newLineTitle":"新建线","lines.noFinishedTurn":"还没有已结束的回合可供切分","lines.open":"打开线","lines.openLine":"打开线 {name}","lines.panelAria":"会话线","lines.placeholder":"给这条线发消息…","lines.promptLabel":"起始消息","lines.promptPlaceholder":"这条线要做什么?","lines.promptRequired":"请填写这条线的起始消息。","lines.readOnly":"这条线只读。","lines.resize":"调整线面板宽度","lines.retry":"重试","lines.state.creationFailed":"创建失败","lines.state.endedByOperation":"被操作结束","lines.state.endedItself":"自行结束","lines.state.endedWith":"随 {id} 结束","lines.state.main":"会话本身","lines.state.waiting":"等待中","lines.state.working":"运行中","lines.title":"线","message.branch":"从此消息创建线","message.collapse":"收起","message.copy":"复制整个消息","message.expand":"展示全部","message.quote":"引用到输入框","newThread.pathLabel":"目录的绝对路径","newThread.pathPlaceholder":"/path/to/project","newThread.selectWorkspace":"选择工作区...","newThread.title":"开始构建","newThread.usePath":"使用","newThread.workspaceRequired":"请选择工作区,或输入目录的绝对路径。","page.notFoundDescription":"此地址没有内容。","page.reconnecting":"连接已断开,正在重连…","prompt.actionRequest":"Dim 想要:{action}","prompt.allowOnce":"仅这次","prompt.allowAlways":"总是允许","prompt.allowSession":"本会话内允许","question.awaitingAnswer":"等待回答","question.decline":"不回答","question.failed":"发送回答失败","question.notPending":"这个问题已不再等待回答。运行继续后可以再次发送。","question.other":"其他回答","question.otherPlaceholder":"输入你自己的回答","question.sent":"回答已发送","question.submit":"发送回答","question.title":"Dim 有一个问题","prompt.awaitingApproval":"等待确认","prompt.input":"输入","prompt.permissionSubmitFailed":"提交工具权限失败","prompt.reject":"拒绝","prompt.useTool":"使用工具","route.newSession":"新会话","route.notFound":"页面不存在","route.session":"会话","sidebar.closeMenu":"关闭导航","sidebar.collapseWorkspace":"折叠 {name}","sidebar.expandWorkspace":"展开 {name}","sidebar.newInWorkspace":"在 {name} 中新建会话","sidebar.newSession":"新会话","sidebar.noMatches":"没有匹配的工作区或会话。","sidebar.noWorkspaces":"还没有会话。","sidebar.openMenu":"打开导航","sidebar.searchPlaceholder":"搜索工作区和会话","sidebar.showLess":"显示更少","sidebar.showMore":"显示更多","sidebar.untitled":"新会话","sidebar.workspaces":"工作区","status.running":"运行中","status.stopping":"正在停止","timeline.beforeMessage":"在“{message}”之前","timeline.copied":"已复制","timeline.copy":"复制","timeline.final":"最后","timeline.fromLine":"◂ 来自 {id}","timeline.lineEnded":"◂ {id} 已结束","timeline.lineEndedByOperation":"这条线已结束(由操作结束)","timeline.lineEndedItself":"这条线已结束(自行结束)","timeline.lineEndedWith":"这条线已结束(随 {id})","timeline.lineWaiting":"◂ {id} 正在等待({status})","timeline.noticeStopped":"已停止","timeline.scrollToBottom":"返回底部","timeline.steer":"(steer)","tool.edit":"编辑","tool.glob":"查找","tool.grep":"搜索内容","tool.listFiles":"列出文件","tool.read":"读取","tool.run":"执行","tool.runBackground":"后台执行","tool.webFetch":"获取网页","tool.webSearch":"搜索网络","tool.write":"写入","work.actionSeparator":"、","work.command":"执行{count}次命令","work.edit":"改{count}次文件","work.processing":"正在处理","work.read":"读{count}次文件","work.search":"搜{count}次","work.separator":" · ","work.thinking":"正在思考","work.thinkingSteps":"思考{count}轮","work.thoughtFor":"思考了 {duration}","work.unknown":"其他{count}次","work.webFetch":"抓取{count}次","work.webSearch":"网络搜{count}次"};export{e as default};
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.1.0-alpha.14",
2
+ "version": "0.1.0-alpha.16",
3
3
  "protocolVersion": 3,
4
- "sourceCommit": "77d63eb95fdab1698fb72d5390862c45aaa3cda2"
4
+ "sourceCommit": "7a232d0ebe939c4f9cc7140e368a53567b76b7d8"
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>
27
- <link rel="modulepreload" crossorigin href="/assets/vendor-vue-Ci9TYO_I.js">
28
- <link rel="stylesheet" crossorigin href="/assets/index-GnV5W03u.css">
26
+ <script type="module" crossorigin src="/assets/index-CenMTLFY.js"></script>
27
+ <link rel="modulepreload" crossorigin href="/assets/vendor-vue-CncuOShJ.js">
28
+ <link rel="stylesheet" crossorigin href="/assets/index-BbPaKBmv.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,6 +0,0 @@
1
- import{d as b,u as _,o as h,q as y,B as k,A as i,b as s,e as C,t as r,G as w,r as d,a as B}from"./vendor-vue-Ci9TYO_I.js";import{c as M,s as $}from"./index-BKJW0i9Q.js";/**
2
- * @license lucide-vue-next v0.577.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */const x=M("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),A=["aria-labelledby"],I={class:"ui-dialog-header"},q={class:"ui-dialog-icon","data-tone":"warning"},z=["id"],D={class:"ui-dialog-footer"},j=b({__name:"ConfirmDialog",setup(L,{expose:m}){const{t:u}=_({messages:$}),c=w(),l=d(),f=d(""),p=d("");let a;function v(n,e={}){return a==null||a(!1),f.value=n,p.value=e.confirmLabel??u("confirm"),new Promise(o=>{var g;a=o,(g=l.value)==null||g.showModal()})}function t(n){var o;const e=a;a=void 0,(o=l.value)==null||o.close(),e==null||e(n)}return h(()=>a==null?void 0:a(!1)),m({open:v}),(n,e)=>(B(),y("dialog",{ref_key:"dialog",ref:l,class:"ui-dialog","data-size":"md","aria-labelledby":i(c),onCancel:e[2]||(e[2]=k(o=>t(!1),["prevent"])),onClose:e[3]||(e[3]=o=>t(!1))},[s("header",I,[s("span",q,[C(i(x),{"aria-hidden":"true"})]),s("h2",{id:i(c),class:"ui-dialog-title"},r(f.value),9,z)]),s("footer",D,[s("button",{class:"ui-button","data-variant":"secondary",type:"button",autofocus:"",onClick:e[0]||(e[0]=o=>t(!1))},r(i(u)("cancel")),1),s("button",{class:"ui-button","data-variant":"danger",type:"button",onClick:e[1]||(e[1]=o=>t(!0))},r(p.value),1)])],40,A))}});export{j as _};
@@ -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}}