zen-gitsync 2.14.3 → 2.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/package.json +1 -1
  2. package/src/ui/public/assets/{AppVersionBadge-z2kqhmtD.js → AppVersionBadge-BoAhI0Kt.js} +2 -2
  3. package/src/ui/public/assets/BranchSelector--8Qfb75A.js +1 -0
  4. package/src/ui/public/assets/CommitForm-CobjwXah.js +6 -0
  5. package/src/ui/public/assets/ConsoleView-B2WZRKsP.css +1 -0
  6. package/src/ui/public/assets/ConsoleView-HcfiYLnM.js +17 -0
  7. package/src/ui/public/assets/CustomCommandManager-DQG4wRU7.js +1 -0
  8. package/src/ui/public/assets/{EditorView-aoA30emq.js → EditorView-CAjuz7yY.js} +0 -0
  9. package/src/ui/public/assets/{FlowExecutionViewer-BvXlaQai.js → FlowExecutionViewer-C8H9uoZL.js} +1 -1
  10. package/src/ui/public/assets/FlowOrchestrationWorkspace-C2RMFB-p.js +21 -0
  11. package/src/ui/public/assets/{LogList-uF4tir23.js → LogList-8qSNrgT7.js} +4 -4
  12. package/src/ui/public/assets/{MindmapView-B8wr0EFL.js → MindmapView-C5pLBOs_.js} +1 -1
  13. package/src/ui/public/assets/{MonitorView-DaJ0h8Im.js → MonitorView-Bijvi8pi.js} +1 -1
  14. package/src/ui/public/assets/ProjectStartupButton-Cb-RAZqA.js +1 -0
  15. package/src/ui/public/assets/{RemoteRepoCard-BDbJ76uf.js → RemoteRepoCard-DjfI188H.js} +1 -1
  16. package/src/ui/public/assets/{SourceMapView-2HjAlHnp.js → SourceMapView-DbdbojUR.js} +2 -2
  17. package/src/ui/public/assets/{SvgIcon-CK6VGHb5.js → SvgIcon-BVBpj6nK.js} +1 -1
  18. package/src/ui/public/assets/TemplateManager-C0rm8xfC.css +1 -0
  19. package/src/ui/public/assets/TemplateManager-CSI1wQZY.js +1 -0
  20. package/src/ui/public/assets/{UserInputNode-Cx8r5geA.js → UserInputNode-8ocSzj-6.js} +1 -1
  21. package/src/ui/public/assets/{WorkbenchView-CG54iND-.js → WorkbenchView-DAXAzJTK.js} +1 -1
  22. package/src/ui/public/assets/{_plugin-vue_export-helper-CJMndG_W.js → _plugin-vue_export-helper-Uwc4Esmp.js} +4 -4
  23. package/src/ui/public/assets/commandParser-wwLxoJ92.js +1 -0
  24. package/src/ui/public/assets/{configStore-DDnE5eie.js → configStore-BHFJlgWp.js} +1 -1
  25. package/src/ui/public/assets/element-plus-R1nMzM9j.css +1 -0
  26. package/src/ui/public/assets/{flow-mindmap-CAkGY2ir.js → flow-mindmap-C0IUPqjN.js} +1 -1
  27. package/src/ui/public/assets/index-BZk-ldXr.css +1 -0
  28. package/src/ui/public/assets/index-Bl8fyL3X.js +23 -0
  29. package/src/ui/public/assets/{vendor-BuiZXcjj.js → vendor-0hkrGFDb.js} +1 -1
  30. package/src/ui/public/assets/{vue-flow-C6RXt-U3.js → vue-flow-CkwNeuGO.js} +1 -1
  31. package/src/ui/public/index.html +9 -11
  32. package/src/ui/server/routes/branchStatus.test.js +37 -0
  33. package/src/ui/server/routes/npm.js +1387 -1327
  34. package/src/utils/index.js +10 -3
  35. package/src/ui/public/assets/BranchSelector-CSjsCeeJ.js +0 -1
  36. package/src/ui/public/assets/CommandConsole-96MUoG1F.js +0 -17
  37. package/src/ui/public/assets/CommandConsole-Da3j09oc.css +0 -1
  38. package/src/ui/public/assets/CommitForm-BBKQ0GqO.js +0 -6
  39. package/src/ui/public/assets/CommonDialog-CgQovpCJ.js +0 -1
  40. package/src/ui/public/assets/CommonDialog-Cyh3xu0p.css +0 -1
  41. package/src/ui/public/assets/FlowOrchestrationWorkspace-CgWUF1Jc.js +0 -21
  42. package/src/ui/public/assets/ProjectStartupButton-CcH1NL2W.js +0 -1
  43. package/src/ui/public/assets/element-plus-D06ZgZjR.css +0 -1
  44. package/src/ui/public/assets/index-B7FGNx_l.js +0 -23
  45. package/src/ui/public/assets/index-f6UhuE5j.css +0 -1
  46. /package/src/ui/public/assets/{element-plus-B6Owr5jY.js → element-plus-tbZnDtyd.js} +0 -0
@@ -1,4 +1,4 @@
1
- import{Cn as e,Fn as t,Kn as n,Ln as r,Mn as i,Pn as a,Tn as o,Yn as s,_n as c,ar as l,cn as u,dr as d,fr as f,gn as p,hn as m,hr as h,ln as g,mn as _,mr as v,on as y,rr as b,un as x,vn as S,xn as C,zn as w}from"./element-plus-B6Owr5jY.js";var T=[`width`,`height`,`stroke-width`],E={key:4,points:`6 9 12 15 18 9`},D={key:5,points:`9 6 15 12 9 18`},O=o({__name:`Icon`,props:{name:{},size:{},stroke:{}},setup(e){return(t,n)=>(r(),S(`svg`,{width:e.size??16,height:e.size??16,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":e.stroke??1.8,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`},[e.name===`add`?(r(),S(x,{key:0},[n[0]||=m(`circle`,{cx:`12`,cy:`12`,r:`9`},null,-1),n[1]||=m(`line`,{x1:`12`,y1:`8`,x2:`12`,y2:`16`},null,-1),n[2]||=m(`line`,{x1:`8`,y1:`12`,x2:`16`,y2:`12`},null,-1)],64)):e.name===`minus`?(r(),S(x,{key:1},[n[3]||=m(`circle`,{cx:`12`,cy:`12`,r:`9`},null,-1),n[4]||=m(`line`,{x1:`8`,y1:`12`,x2:`16`,y2:`12`},null,-1)],64)):e.name===`delete`?(r(),S(x,{key:2},[n[5]||=C(`<polyline points="4 7 20 7"></polyline><path d="M9 7 V5 a1 1 0 0 1 1 -1 h4 a1 1 0 0 1 1 1 V7"></path><path d="M6 7 l1 12 a1 1 0 0 0 1 1 h8 a1 1 0 0 0 1 -1 l1 -12"></path><line x1="10" y1="11" x2="10" y2="18"></line><line x1="14" y1="11" x2="14" y2="18"></line>`,5)],64)):e.name===`edit`?(r(),S(x,{key:3},[n[6]||=m(`path`,{d:`M4 20 l4 -1 11 -11 -3 -3 -11 11 z`},null,-1),n[7]||=m(`line`,{x1:`14`,y1:`6`,x2:`18`,y2:`10`},null,-1)],64)):e.name===`collapse`?(r(),S(`polyline`,E)):e.name===`expand`?(r(),S(`polyline`,D)):e.name===`collapse-all`?(r(),S(x,{key:6},[n[8]||=C(`<line x1="4" y1="4" x2="10" y2="10"></line><polyline points="6 10 10 10 10 6"></polyline><line x1="20" y1="4" x2="14" y2="10"></line><polyline points="14 6 14 10 18 10"></polyline><line x1="20" y1="20" x2="14" y2="14"></line><polyline points="14 18 14 14 18 14"></polyline><line x1="4" y1="20" x2="10" y2="14"></line><polyline points="6 14 10 14 10 18"></polyline>`,8)],64)):e.name===`expand-all`?(r(),S(x,{key:7},[n[9]||=C(`<line x1="10" y1="10" x2="4" y2="4"></line><polyline points="4 6 4 4 6 4"></polyline><line x1="14" y1="10" x2="20" y2="4"></line><polyline points="20 6 20 4 18 4"></polyline><line x1="14" y1="14" x2="20" y2="20"></line><polyline points="20 18 20 20 18 20"></polyline><line x1="10" y1="14" x2="4" y2="20"></line><polyline points="4 18 4 20 6 20"></polyline>`,8)],64)):e.name===`expand-level-1`?(r(),S(x,{key:8},[n[10]||=C(`<circle cx="12" cy="5" r="1.8" fill="currentColor" stroke="none"></circle><line x1="12" y1="7" x2="12" y2="11"></line><line x1="12" y1="11" x2="5" y2="17"></line><line x1="12" y1="11" x2="12" y2="17"></line><line x1="12" y1="11" x2="19" y2="17"></line><circle cx="5" cy="19" r="1.8" fill="currentColor" stroke="none"></circle><circle cx="12" cy="19" r="1.8" fill="currentColor" stroke="none"></circle><circle cx="19" cy="19" r="1.8" fill="currentColor" stroke="none"></circle>`,8)],64)):e.name===`expand-level-2`?(r(),S(x,{key:9},[n[11]||=C(`<circle cx="12" cy="3" r="1.4" fill="currentColor" stroke="none"></circle><line x1="12" y1="4.5" x2="12" y2="7"></line><line x1="12" y1="7" x2="5" y2="11"></line><line x1="12" y1="7" x2="12" y2="11"></line><line x1="12" y1="7" x2="19" y2="11"></line><line x1="5" y1="11" x2="3" y2="16"></line><line x1="5" y1="11" x2="7" y2="16"></line><line x1="12" y1="11" x2="10" y2="16"></line><line x1="12" y1="11" x2="14" y2="16"></line><line x1="19" y1="11" x2="17" y2="16"></line><line x1="19" y1="11" x2="21" y2="16"></line><circle cx="5" cy="11" r="1.4" fill="currentColor" stroke="none"></circle><circle cx="12" cy="11" r="1.4" fill="currentColor" stroke="none"></circle><circle cx="19" cy="11" r="1.4" fill="currentColor" stroke="none"></circle><circle cx="3" cy="18" r="1.4" fill="currentColor" stroke="none"></circle><circle cx="7" cy="18" r="1.4" fill="currentColor" stroke="none"></circle><circle cx="10" cy="18" r="1.4" fill="currentColor" stroke="none"></circle><circle cx="14" cy="18" r="1.4" fill="currentColor" stroke="none"></circle><circle cx="17" cy="18" r="1.4" fill="currentColor" stroke="none"></circle><circle cx="21" cy="18" r="1.4" fill="currentColor" stroke="none"></circle>`,20)],64)):e.name===`zoom-in`?(r(),S(x,{key:10},[n[12]||=m(`circle`,{cx:`11`,cy:`11`,r:`7`},null,-1),n[13]||=m(`line`,{x1:`11`,y1:`8`,x2:`11`,y2:`14`},null,-1),n[14]||=m(`line`,{x1:`8`,y1:`11`,x2:`14`,y2:`11`},null,-1),n[15]||=m(`line`,{x1:`16`,y1:`16`,x2:`21`,y2:`21`},null,-1)],64)):e.name===`zoom-out`?(r(),S(x,{key:11},[n[16]||=m(`circle`,{cx:`11`,cy:`11`,r:`7`},null,-1),n[17]||=m(`line`,{x1:`8`,y1:`11`,x2:`14`,y2:`11`},null,-1),n[18]||=m(`line`,{x1:`16`,y1:`16`,x2:`21`,y2:`21`},null,-1)],64)):e.name===`reset`?(r(),S(x,{key:12},[n[19]||=m(`polyline`,{points:`4 9 4 4 9 4`},null,-1),n[20]||=m(`polyline`,{points:`15 4 20 4 20 9`},null,-1),n[21]||=m(`polyline`,{points:`20 15 20 20 15 20`},null,-1),n[22]||=m(`polyline`,{points:`9 20 4 20 4 15`},null,-1)],64)):e.name===`logo`?(r(),S(x,{key:13},[n[23]||=C(`<circle cx="12" cy="12" r="2.2"></circle><circle cx="4" cy="5" r="1.6"></circle><circle cx="20" cy="5" r="1.6"></circle><circle cx="4" cy="19" r="1.6"></circle><circle cx="20" cy="19" r="1.6"></circle><line x1="10.5" y1="10.8" x2="5.2" y2="6.4"></line><line x1="13.5" y1="10.8" x2="18.8" y2="6.4"></line><line x1="10.5" y1="13.2" x2="5.2" y2="17.6"></line><line x1="13.5" y1="13.2" x2="18.8" y2="17.6"></line>`,9)],64)):e.name===`import`?(r(),S(x,{key:14},[n[24]||=m(`path`,{d:`M12 4 V15`},null,-1),n[25]||=m(`polyline`,{points:`7 10 12 15 17 10`},null,-1),n[26]||=m(`path`,{d:`M4 19 H20`},null,-1)],64)):e.name===`export`?(r(),S(x,{key:15},[n[27]||=m(`path`,{d:`M12 15 V4`},null,-1),n[28]||=m(`polyline`,{points:`7 9 12 4 17 9`},null,-1),n[29]||=m(`path`,{d:`M4 19 H20`},null,-1)],64)):e.name===`balance`?(r(),S(x,{key:16},[n[30]||=C(`<line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="18" x2="21" y2="18"></line><polyline points="9 4 5 6 9 8"></polyline><polyline points="15 4 19 6 15 8"></polyline><polyline points="9 10 5 12 9 14"></polyline><polyline points="15 10 19 12 15 14"></polyline><polyline points="9 16 5 18 9 20"></polyline><polyline points="15 16 19 18 15 20"></polyline>`,9)],64)):e.name===`mindmap`?(r(),S(x,{key:17},[n[31]||=C(`<circle cx="12" cy="12" r="2.4" fill="currentColor" stroke="none"></circle><line x1="13.4" y1="10.6" x2="18.5" y2="5.5"></line><line x1="13.4" y1="13.4" x2="18.5" y2="18.5"></line><line x1="10.6" y1="10.6" x2="5.5" y2="5.5"></line><line x1="10.6" y1="13.4" x2="5.5" y2="18.5"></line><circle cx="19.5" cy="4.5" r="1.8" fill="currentColor" stroke="none"></circle><circle cx="19.5" cy="19.5" r="1.8" fill="currentColor" stroke="none"></circle><circle cx="4.5" cy="4.5" r="1.8" fill="currentColor" stroke="none"></circle><circle cx="4.5" cy="19.5" r="1.8" fill="currentColor" stroke="none"></circle>`,9)],64)):e.name===`tree`?(r(),S(x,{key:18},[n[32]||=C(`<circle cx="5" cy="12" r="2" fill="currentColor" stroke="none"></circle><circle cx="19" cy="5" r="2" fill="currentColor" stroke="none"></circle><circle cx="19" cy="12" r="2" fill="currentColor" stroke="none"></circle><circle cx="19" cy="19" r="2" fill="currentColor" stroke="none"></circle><line x1="7" y1="12" x2="12" y2="12"></line><line x1="12" y1="12" x2="12" y2="5"></line><line x1="12" y1="12" x2="12" y2="19"></line><line x1="12" y1="5" x2="17" y2="5"></line><line x1="12" y1="19" x2="17" y2="19"></line>`,9)],64)):e.name===`org`?(r(),S(x,{key:19},[n[33]||=C(`<circle cx="12" cy="5" r="2" fill="currentColor" stroke="none"></circle><circle cx="6" cy="19" r="2" fill="currentColor" stroke="none"></circle><circle cx="12" cy="19" r="2" fill="currentColor" stroke="none"></circle><circle cx="18" cy="19" r="2" fill="currentColor" stroke="none"></circle><line x1="12" y1="7" x2="12" y2="13"></line><line x1="6" y1="13" x2="18" y2="13"></line><line x1="6" y1="13" x2="6" y2="17"></line><line x1="12" y1="13" x2="12" y2="17"></line><line x1="18" y1="13" x2="18" y2="17"></line>`,9)],64)):e.name===`image`?(r(),S(x,{key:20},[n[34]||=m(`rect`,{x:`3`,y:`5`,width:`18`,height:`14`,rx:`2`},null,-1),n[35]||=m(`circle`,{cx:`9`,cy:`11`,r:`1.6`},null,-1),n[36]||=m(`polyline`,{points:`3 17 9 12 13 15 16 13 21 17`},null,-1)],64)):e.name===`x`?(r(),S(x,{key:21},[n[37]||=m(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`},null,-1),n[38]||=m(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`},null,-1)],64)):e.name===`link`?(r(),S(x,{key:22},[n[39]||=m(`path`,{d:`M10 13 a4 4 0 0 0 5.66 0 l3 -3 a4 4 0 1 0 -5.66 -5.66 l-1 1`},null,-1),n[40]||=m(`path`,{d:`M14 11 a4 4 0 0 0 -5.66 0 l-3 3 a4 4 0 1 0 5.66 5.66 l1 -1`},null,-1)],64)):e.name===`note`?(r(),S(x,{key:23},[n[41]||=m(`path`,{d:`M6 4 h9 l3 3 v13 a1 1 0 0 1 -1 1 h-11 a1 1 0 0 1 -1 -1 v-15 a1 1 0 0 1 1 -1 z`},null,-1),n[42]||=m(`line`,{x1:`8`,y1:`10`,x2:`16`,y2:`10`},null,-1),n[43]||=m(`line`,{x1:`8`,y1:`13`,x2:`16`,y2:`13`},null,-1),n[44]||=m(`line`,{x1:`8`,y1:`16`,x2:`13`,y2:`16`},null,-1)],64)):c(``,!0)],8,T))}}),k=`data:image/svg+xml,%3csvg%20t='1780822312364'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='7459'%20width='200'%20height='200'%3e%3cpath%20d='M329.16%20292.571h658.286V512H329.16zM329.16%200h658.286v219.429H329.16z'%20fill='%239AA1A2'%20p-id='7460'%3e%3c/path%3e%3cpath%20d='M44.927%20146.286a46.519%2046.519%200%200%201%2038.107-73.143h319.269v73.143H109.73V791.99l-48.713%205.705-24.43-651.41h8.339z'%20fill='%239AA1A2'%20p-id='7461'%3e%3c/path%3e%3cpath%20d='M363.83%20877.714H179.51c-78.775%200-142.921-66.12-142.921-147.31V112.787c0-21.943%2017.188-39.643%2038.473-39.643%2021.211%200%2033.5%2017.774%2033.5%2039.643v617.619c0%2037.522%2028.013%2076.58%2064.438%2076.58h190.903c21.211%200%2038.766%2013.97%2038.766%2035.84%200%2021.943-17.555%2034.89-38.766%2034.89z'%20fill='%239AA1A2'%20p-id='7462'%3e%3c/path%3e%3cpath%20d='M432.95%20438.857H179.51c-78.775%200-81.043-18.578-81.043-62.903l10.094-90.624c0%2020.48%2013.458%2080.677%2049.884%2080.677h210.139c21.211%200%20120.613%204.023%20120.613%2016.018%200%2011.922-35.036%2056.832-56.32%2056.832zM640.017%20749.714V640a54.857%2054.857%200%200%201%20109.714%200v109.714h109.715a54.857%2054.857%200%200%201%200%20109.715H749.73v109.714a54.857%2054.857%200%200%201-109.714%200V859.429H530.303a54.857%2054.857%200%200%201%200-109.715h109.714z'%20fill='%239AA1A2'%20p-id='7463'%3e%3c/path%3e%3c/svg%3e`,A=`data:image/svg+xml,%3csvg%20t='1780822464335'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='8457'%20width='200'%20height='200'%3e%3cpath%20d='M512%20804.571h512V1024H512V804.571zM0%200h658.286v219.429H0V0z'%20fill='%239AA1A2'%20p-id='8458'%3e%3c/path%3e%3cpath%20d='M619.813%20950.857h-184.32c-78.775%200-142.922-66.121-142.922-147.31V185.93c0-21.943%2017.189-39.643%2038.474-39.643%2021.211%200%2033.353%2017.773%2033.353%2039.643v617.618c0%2037.523%2034.743%2073.728%2071.095%2073.728h184.32c21.211%200%2038.473%2012.069%2038.473%2033.939%200%2021.943-17.189%2039.643-38.473%2039.643z'%20fill='%239AA1A2'%20p-id='8459'%3e%3c/path%3e%3cpath%20d='M676.571%20457.143V347.429a54.857%2054.857%200%200%201%20109.715%200v109.714H896a54.857%2054.857%200%200%201%200%20109.714H786.286v109.714a54.857%2054.857%200%200%201-109.715%200V566.857H566.857a54.857%2054.857%200%200%201%200-109.714h109.714z'%20fill='%239AA1A2'%20p-id='8460'%3e%3c/path%3e%3c/svg%3e`,j=[18,15,13,12],M=[700,600,500,400],N=[52,40,32,28],P=[120,80,60,44],F=[.8,.8,.8,.8],ee=j.length-1;function te(e,t){return Math.round(I(e,t)*F[ne(e)])}function ne(e){return Math.min(ee,Math.max(0,e))}function I(e,t=14){return Math.round(j[ne(e)]*t/14*10)/10}function L(e,t=14){return Math.round(N[ne(e)]*t/14)}var re=60,ie=14,R=24,ae=null;function oe(){if(ae)return ae;let e=typeof document<`u`?document.createElement(`canvas`).getContext(`2d`):null;return e?(ae=e,e):{font:``,measureText:()=>({width:0})}}var se=new Map;function ce(e,t,n){let r=`${n}|${t}|${e}`,i=se.get(r);if(i!==void 0)return i;let a=oe();a.font=`${n} ${t}px "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif`;let o=a.measureText(e).width;return se.set(r,o),o}var le=24,ue=400,de=8,fe=16,pe=4,me=200;function he(e,t,n){return Math.min(n,Math.max(t,e))}function ge(e,t,n,r,i){let a=ne(t),o=I(t,n),s=Math.min(ce(e.text||``,o,M[a]),me),c=te(t,n),l=Math.ceil(s+c*2),u=e.richContent&&(e.richContent.kind===`code`||e.richContent.kind===`table`)?Math.ceil(o*1.2)+6:L(t,n),d=0;if(e.link&&(d+=fe),e.note&&(d+=fe),d>0){let t=+!!e.link+ +!!e.note;d+=pe*t}let f=l+d,p=(()=>{let t=Math.round(P[a]*n/14);if(e.richContent&&(e.richContent.kind===`code`||e.richContent.kind===`table`)){let n=i?.[e.id];return Math.max(t,n??240)}return t})(),m=!!(e.richContent&&(e.richContent.kind===`code`||e.richContent.kind===`table`)),h=r?.[e.id],g=m?Math.max(24,h??Math.max(70,Math.ceil(o*5))):0,_=g>0?10:0;if(!e.image)return{w:Math.max(p,f),h:Math.ceil(u+_+g)};let v=he(e.image.width,le,ue);return{w:Math.max(p,f,Math.ceil(v+c*2)),h:Math.ceil(e.image.height+de+u+_+g)}}function _e(e,t={}){let n=t.mode??`mindmap`,r=t.preservePositions===!0,i=xe(e,0,null,1,`right`,t.baseFontSize??14,t.richHeights,t.richWidths);return z(i),ve(i,n,r),i.x=0,i.y=0,B(i,r)}function ve(e,t,n=!1){if(t===`mindmap`){let t=e.children;if(t.length!==0)if(t.length===1)t[0]._dir=`right`,t[0].side=1,t[0]._dirRight=1;else{let e=t.reduce((e,t)=>e+t._subtreeH,0),n=1,r=Math.abs(t[0]._subtreeH-(e-t[0]._subtreeH)),i=0;for(let a=0;a<t.length-1;a++){i+=t[a]._subtreeH;let o=Math.abs(i-(e-i));o<r&&(r=o,n=a+1)}for(let e=0;e<n;e++)t[e]._dir=`right`,t[e].side=1,t[e]._dirRight=1;for(let e=n;e<t.length;e++)t[e]._dir=`left`,t[e].side=-1,t[e]._dirRight=-1}let r=e.children.filter(e=>e.side===1),i=e.children.filter(e=>e.side===-1),a=(e,t)=>{let n=t===`right`?1:-1;e._dir=t,e.side=n,e._dirRight=n;for(let n of e.children)a(n,t)};for(let e of r)a(e,`right`);for(let e of i)a(e,`left`);r.length>0&&ye({...e,children:r},`right`,re,!0,n),i.length>0&&ye({...e,children:i},`left`,re,!0,n)}else if(t===`tree`){let t=e=>{e.side=1,e._dir=`right`;for(let n of e.children)t(n)};for(let t of e.children)t._dir=`right`;ye(e,`right`,re,!0,n),t(e)}else{for(let t of e.children)t._dir=`down`;be(e,re,n)}}function ye(e,t,n,r,i=!1){if(e.children.length===0)return;let a=e.children.reduce((e,t,n)=>e+t._subtreeH+(n>0?ie:0),0),o=t===`right`?1:-1,s=r?o:1,c=e.y-s*a/2;e.children.forEach(r=>{i||(r.x=e.x+o*(e.width/2+n+r.width/2),r.y=c+s*r._subtreeH/2),r._dir=t,c+=s*(r._subtreeH+ie),ye(r,t,n,!1,i)})}function be(e,t,n=!1){if(e.children.length===0)return;let r=e.children.reduce((e,t,n)=>e+t._subtreeW+(n>0?ie*2:0),0),i=e.x-r/2;e.children.forEach(r=>{n||(r.x=i+r._subtreeW/2,r.y=e.y+e.height/2+t+r.height/2),r._dir=`down`,i+=r._subtreeW+ie*2,be(r,t,n)})}function xe(e,t,n,r,i,a,o,s){let c=ge(e,t,a,o,s),l={id:e.id,text:e.text,depth:t,x:e._x??0,y:e._y??0,width:c.w,height:c.h,fontSize:I(t,a),isRoot:t===0,collapsed:e.collapsed,side:r,_dir:i,_dirRight:r,_subtreeH:c.h,_subtreeW:c.w,image:e.image?{...e.image}:void 0,link:e.link?{url:e.link.url}:void 0,note:e.note?{text:e.note.text}:void 0,richContent:e.richContent?{kind:e.richContent.kind,raw:e.richContent.raw,lang:e.richContent.lang}:void 0,children:[],parent:n};if(e.collapsed)return l;let u=e.children.length,d=Math.ceil(u/2);return l.children=e.children.map((e,n)=>{let c=t===0?n<d?1:-1:r;return xe(e,t+1,l,c,i,a,o,s)}),l}function z(e){let t=[e];for(let e=0;e<t.length;e++){let n=t[e];for(let e of n.children)t.push(e)}for(let e=t.length-1;e>=0;e--){let n=t[e];if(n.collapsed||n.children.length===0){n._subtreeH=n.height,n._subtreeW=n.width;continue}let r=0,i=0;for(let e of n.children)r+=e._subtreeH,i+=e._subtreeW;n.children.length>1&&(r+=ie*(n.children.length-1),i+=ie*2*(n.children.length-1)),n._subtreeH=Math.max(n.height,r),n._subtreeW=Math.max(n.width,i)}}function B(e,t=!1){let n=[e],r=1/0,i=-1/0,a=1/0,o=-1/0;for(;n.length;){let e=n.pop(),t=e.width/2,s=e.height/2;e.x-t<r&&(r=e.x-t),e.x+t>i&&(i=e.x+t),e.y-s<a&&(a=e.y-s),e.y+s>o&&(o=e.y+s),n.push(...e.children)}if(t)return{root:e,width:i-r+R*2,height:o-a+R*2,vbX:r-R,vbY:a-R,vbW:i-r+R*2,vbH:o-a+R*2};let s=R-a,c=[e];for(;c.length;){let e=c.pop();e.y+=s,c.push(...e.children)}return a+=s,o+=s,{root:e,width:i-r+R*2,height:o+R,vbX:r-R,vbY:0,vbW:i-r+R*2,vbH:o+R}}var Se=[{id:`default`,name:`默认`,colors:[`#f87171`,`#fb923c`,`#fbbf24`,`#a3e635`,`#34d399`,`#22d3ee`,`#818cf8`,`#c084fc`]},{id:`classic`,name:`经典`,colors:[`#ef4444`,`#f59e0b`,`#10b981`,`#3b82f6`,`#6366f1`,`#8b5cf6`,`#ec4899`,`#14b8a6`]},{id:`vivid`,name:`活力`,colors:[`#dc2626`,`#ea580c`,`#ca8a04`,`#16a34a`,`#0891b2`,`#2563eb`,`#7c3aed`,`#db2777`]},{id:`dev`,name:`代码`,colors:[`#f472b6`,`#a78bfa`,`#60a5fa`,`#38bdf8`,`#22d3ee`,`#34d399`,`#facc15`,`#fb923c`]},{id:`mint`,name:`薄荷`,colors:[`#5eead4`,`#67e8f9`,`#93c5fd`,`#c4b5fd`,`#fbcfe8`,`#fde68a`,`#a7f3d0`,`#bae6fd`]}];function Ce(e,t=[]){return[...Se,...t].find(t=>t.id===e)??Se[0]}function V(){return`n_`+Math.random().toString(36).slice(2,10)+Date.now().toString(36).slice(-4)}function we(e){return JSON.parse(JSON.stringify(e))}function H(e,t){if(e.id===t)return e;for(let n of e.children){let e=H(n,t);if(e)return e}return null}function U(e,t,n=null){if(e.id===t)return n;for(let n of e.children){let r=U(n,t,e);if(r!==null)return r}return null}function Te(e,t){let n=e.children.findIndex(e=>e.id===t);if(n>=0)return e.children.splice(n,1),!0;for(let n of e.children)if(Te(n,t))return!0;return!1}function Ee(e,t,n){let r=H(e,t);return!r||r.text===n?!1:(r.text=n,!0)}function De(e,t,n,r){if(!U(e,t)||t===n||H(H(e,t),n))return!1;let i=U(e,t),a=i.children.findIndex(e=>e.id===t);if(a<0)return!1;let[o]=i.children.splice(a,1);if(r===`child`){let t=H(e,n);return t?(t.children.push(o),!0):(i.children.splice(a,0,o),!1)}let s=U(e,n);if(!s)return i.children.splice(a,0,o),!1;let c=s.children.findIndex(e=>e.id===n);return c<0?(i.children.splice(a,0,o),!1):(r===`after`&&(c+=1),s.children.splice(c,0,o),!0)}function Oe(e){let t=/^新节点(?:\s+(\d+))?$/,n=0,r=!1;for(let i of e.children){let e=i.text.match(t);if(e)if(e[1]){let t=parseInt(e[1],10);t>n&&(n=t)}else r=!0}return n===0&&!r?Pe:n>0?`新节点 ${n+1}`:`新节点 2`}function ke(e,t,n){let r=H(e,t);if(!r)return null;let i={id:V(),text:n??Oe(r),children:[]};return r.children.push(i),i}function Ae(e,t,n){let r=U(e,t);if(!r)return null;let i=r.children.findIndex(e=>e.id===t);if(i<0)return null;let a={id:V(),text:n??Oe(r),children:[]};return r.children.splice(i+1,0,a),a}function je(e,t,n){let r=U(e,t);if(!r)return null;let i=r.children.findIndex(e=>e.id===t);if(i<0)return null;let a={id:V(),text:n,children:[]};return r.children.splice(i,0,a),a}function Me(e,t){let n=U(e,t);if(!n)return null;let r=n.children.findIndex(e=>e.id===t);if(r<0)return null;let i=n.children[r],a=we(i);return Ne(a),n.children.splice(r+1,0,a),a}function Ne(e){e.id=V();for(let t of e.children)Ne(t)}var Pe=`新节点`;function Fe(e,t=`导入的导图`){let n=e.split(/\r?\n/),r={id:V(),text:t,children:[]},i=[r],a=[-1/0],o=[],s=/^(#{1,6})\s+(.+?)\s*#*\s*$/,c=/^!\[([^\]]*)\]\((\S+?)(?:\s+"[^"]*")?\)\s*$/,l=/^\[([^\]]+)\]\((\S+?)(?:\s+"[^"]*")?\)\s*$/,u=/^(`{3,}|~{3,})\s*(\S+)?\s*$/,d=!1,f=[],p=null;function m(e){f.push(e)}function h(){if(p&&f.length>0){for(;f.length>0&&f[0].trim()===``;)f.shift();for(;f.length>0&&f[f.length-1].trim()===``;)f.pop();let e=f.join(`
1
+ import{Cn as e,Fn as t,Kn as n,Ln as r,Mn as i,Pn as a,Tn as o,Yn as s,_n as c,ar as l,cn as u,dr as d,fr as f,gn as p,hn as m,hr as h,ln as g,mn as _,mr as v,on as y,rr as b,un as x,vn as S,xn as C,zn as w}from"./element-plus-tbZnDtyd.js";var T=[`width`,`height`,`stroke-width`],E={key:4,points:`6 9 12 15 18 9`},D={key:5,points:`9 6 15 12 9 18`},O=o({__name:`Icon`,props:{name:{},size:{},stroke:{}},setup(e){return(t,n)=>(r(),S(`svg`,{width:e.size??16,height:e.size??16,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":e.stroke??1.8,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`},[e.name===`add`?(r(),S(x,{key:0},[n[0]||=m(`circle`,{cx:`12`,cy:`12`,r:`9`},null,-1),n[1]||=m(`line`,{x1:`12`,y1:`8`,x2:`12`,y2:`16`},null,-1),n[2]||=m(`line`,{x1:`8`,y1:`12`,x2:`16`,y2:`12`},null,-1)],64)):e.name===`minus`?(r(),S(x,{key:1},[n[3]||=m(`circle`,{cx:`12`,cy:`12`,r:`9`},null,-1),n[4]||=m(`line`,{x1:`8`,y1:`12`,x2:`16`,y2:`12`},null,-1)],64)):e.name===`delete`?(r(),S(x,{key:2},[n[5]||=C(`<polyline points="4 7 20 7"></polyline><path d="M9 7 V5 a1 1 0 0 1 1 -1 h4 a1 1 0 0 1 1 1 V7"></path><path d="M6 7 l1 12 a1 1 0 0 0 1 1 h8 a1 1 0 0 0 1 -1 l1 -12"></path><line x1="10" y1="11" x2="10" y2="18"></line><line x1="14" y1="11" x2="14" y2="18"></line>`,5)],64)):e.name===`edit`?(r(),S(x,{key:3},[n[6]||=m(`path`,{d:`M4 20 l4 -1 11 -11 -3 -3 -11 11 z`},null,-1),n[7]||=m(`line`,{x1:`14`,y1:`6`,x2:`18`,y2:`10`},null,-1)],64)):e.name===`collapse`?(r(),S(`polyline`,E)):e.name===`expand`?(r(),S(`polyline`,D)):e.name===`collapse-all`?(r(),S(x,{key:6},[n[8]||=C(`<line x1="4" y1="4" x2="10" y2="10"></line><polyline points="6 10 10 10 10 6"></polyline><line x1="20" y1="4" x2="14" y2="10"></line><polyline points="14 6 14 10 18 10"></polyline><line x1="20" y1="20" x2="14" y2="14"></line><polyline points="14 18 14 14 18 14"></polyline><line x1="4" y1="20" x2="10" y2="14"></line><polyline points="6 14 10 14 10 18"></polyline>`,8)],64)):e.name===`expand-all`?(r(),S(x,{key:7},[n[9]||=C(`<line x1="10" y1="10" x2="4" y2="4"></line><polyline points="4 6 4 4 6 4"></polyline><line x1="14" y1="10" x2="20" y2="4"></line><polyline points="20 6 20 4 18 4"></polyline><line x1="14" y1="14" x2="20" y2="20"></line><polyline points="20 18 20 20 18 20"></polyline><line x1="10" y1="14" x2="4" y2="20"></line><polyline points="4 18 4 20 6 20"></polyline>`,8)],64)):e.name===`expand-level-1`?(r(),S(x,{key:8},[n[10]||=C(`<circle cx="12" cy="5" r="1.8" fill="currentColor" stroke="none"></circle><line x1="12" y1="7" x2="12" y2="11"></line><line x1="12" y1="11" x2="5" y2="17"></line><line x1="12" y1="11" x2="12" y2="17"></line><line x1="12" y1="11" x2="19" y2="17"></line><circle cx="5" cy="19" r="1.8" fill="currentColor" stroke="none"></circle><circle cx="12" cy="19" r="1.8" fill="currentColor" stroke="none"></circle><circle cx="19" cy="19" r="1.8" fill="currentColor" stroke="none"></circle>`,8)],64)):e.name===`expand-level-2`?(r(),S(x,{key:9},[n[11]||=C(`<circle cx="12" cy="3" r="1.4" fill="currentColor" stroke="none"></circle><line x1="12" y1="4.5" x2="12" y2="7"></line><line x1="12" y1="7" x2="5" y2="11"></line><line x1="12" y1="7" x2="12" y2="11"></line><line x1="12" y1="7" x2="19" y2="11"></line><line x1="5" y1="11" x2="3" y2="16"></line><line x1="5" y1="11" x2="7" y2="16"></line><line x1="12" y1="11" x2="10" y2="16"></line><line x1="12" y1="11" x2="14" y2="16"></line><line x1="19" y1="11" x2="17" y2="16"></line><line x1="19" y1="11" x2="21" y2="16"></line><circle cx="5" cy="11" r="1.4" fill="currentColor" stroke="none"></circle><circle cx="12" cy="11" r="1.4" fill="currentColor" stroke="none"></circle><circle cx="19" cy="11" r="1.4" fill="currentColor" stroke="none"></circle><circle cx="3" cy="18" r="1.4" fill="currentColor" stroke="none"></circle><circle cx="7" cy="18" r="1.4" fill="currentColor" stroke="none"></circle><circle cx="10" cy="18" r="1.4" fill="currentColor" stroke="none"></circle><circle cx="14" cy="18" r="1.4" fill="currentColor" stroke="none"></circle><circle cx="17" cy="18" r="1.4" fill="currentColor" stroke="none"></circle><circle cx="21" cy="18" r="1.4" fill="currentColor" stroke="none"></circle>`,20)],64)):e.name===`zoom-in`?(r(),S(x,{key:10},[n[12]||=m(`circle`,{cx:`11`,cy:`11`,r:`7`},null,-1),n[13]||=m(`line`,{x1:`11`,y1:`8`,x2:`11`,y2:`14`},null,-1),n[14]||=m(`line`,{x1:`8`,y1:`11`,x2:`14`,y2:`11`},null,-1),n[15]||=m(`line`,{x1:`16`,y1:`16`,x2:`21`,y2:`21`},null,-1)],64)):e.name===`zoom-out`?(r(),S(x,{key:11},[n[16]||=m(`circle`,{cx:`11`,cy:`11`,r:`7`},null,-1),n[17]||=m(`line`,{x1:`8`,y1:`11`,x2:`14`,y2:`11`},null,-1),n[18]||=m(`line`,{x1:`16`,y1:`16`,x2:`21`,y2:`21`},null,-1)],64)):e.name===`reset`?(r(),S(x,{key:12},[n[19]||=m(`polyline`,{points:`4 9 4 4 9 4`},null,-1),n[20]||=m(`polyline`,{points:`15 4 20 4 20 9`},null,-1),n[21]||=m(`polyline`,{points:`20 15 20 20 15 20`},null,-1),n[22]||=m(`polyline`,{points:`9 20 4 20 4 15`},null,-1)],64)):e.name===`logo`?(r(),S(x,{key:13},[n[23]||=C(`<circle cx="12" cy="12" r="2.2"></circle><circle cx="4" cy="5" r="1.6"></circle><circle cx="20" cy="5" r="1.6"></circle><circle cx="4" cy="19" r="1.6"></circle><circle cx="20" cy="19" r="1.6"></circle><line x1="10.5" y1="10.8" x2="5.2" y2="6.4"></line><line x1="13.5" y1="10.8" x2="18.8" y2="6.4"></line><line x1="10.5" y1="13.2" x2="5.2" y2="17.6"></line><line x1="13.5" y1="13.2" x2="18.8" y2="17.6"></line>`,9)],64)):e.name===`import`?(r(),S(x,{key:14},[n[24]||=m(`path`,{d:`M12 4 V15`},null,-1),n[25]||=m(`polyline`,{points:`7 10 12 15 17 10`},null,-1),n[26]||=m(`path`,{d:`M4 19 H20`},null,-1)],64)):e.name===`export`?(r(),S(x,{key:15},[n[27]||=m(`path`,{d:`M12 15 V4`},null,-1),n[28]||=m(`polyline`,{points:`7 9 12 4 17 9`},null,-1),n[29]||=m(`path`,{d:`M4 19 H20`},null,-1)],64)):e.name===`balance`?(r(),S(x,{key:16},[n[30]||=C(`<line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="18" x2="21" y2="18"></line><polyline points="9 4 5 6 9 8"></polyline><polyline points="15 4 19 6 15 8"></polyline><polyline points="9 10 5 12 9 14"></polyline><polyline points="15 10 19 12 15 14"></polyline><polyline points="9 16 5 18 9 20"></polyline><polyline points="15 16 19 18 15 20"></polyline>`,9)],64)):e.name===`mindmap`?(r(),S(x,{key:17},[n[31]||=C(`<circle cx="12" cy="12" r="2.4" fill="currentColor" stroke="none"></circle><line x1="13.4" y1="10.6" x2="18.5" y2="5.5"></line><line x1="13.4" y1="13.4" x2="18.5" y2="18.5"></line><line x1="10.6" y1="10.6" x2="5.5" y2="5.5"></line><line x1="10.6" y1="13.4" x2="5.5" y2="18.5"></line><circle cx="19.5" cy="4.5" r="1.8" fill="currentColor" stroke="none"></circle><circle cx="19.5" cy="19.5" r="1.8" fill="currentColor" stroke="none"></circle><circle cx="4.5" cy="4.5" r="1.8" fill="currentColor" stroke="none"></circle><circle cx="4.5" cy="19.5" r="1.8" fill="currentColor" stroke="none"></circle>`,9)],64)):e.name===`tree`?(r(),S(x,{key:18},[n[32]||=C(`<circle cx="5" cy="12" r="2" fill="currentColor" stroke="none"></circle><circle cx="19" cy="5" r="2" fill="currentColor" stroke="none"></circle><circle cx="19" cy="12" r="2" fill="currentColor" stroke="none"></circle><circle cx="19" cy="19" r="2" fill="currentColor" stroke="none"></circle><line x1="7" y1="12" x2="12" y2="12"></line><line x1="12" y1="12" x2="12" y2="5"></line><line x1="12" y1="12" x2="12" y2="19"></line><line x1="12" y1="5" x2="17" y2="5"></line><line x1="12" y1="19" x2="17" y2="19"></line>`,9)],64)):e.name===`org`?(r(),S(x,{key:19},[n[33]||=C(`<circle cx="12" cy="5" r="2" fill="currentColor" stroke="none"></circle><circle cx="6" cy="19" r="2" fill="currentColor" stroke="none"></circle><circle cx="12" cy="19" r="2" fill="currentColor" stroke="none"></circle><circle cx="18" cy="19" r="2" fill="currentColor" stroke="none"></circle><line x1="12" y1="7" x2="12" y2="13"></line><line x1="6" y1="13" x2="18" y2="13"></line><line x1="6" y1="13" x2="6" y2="17"></line><line x1="12" y1="13" x2="12" y2="17"></line><line x1="18" y1="13" x2="18" y2="17"></line>`,9)],64)):e.name===`image`?(r(),S(x,{key:20},[n[34]||=m(`rect`,{x:`3`,y:`5`,width:`18`,height:`14`,rx:`2`},null,-1),n[35]||=m(`circle`,{cx:`9`,cy:`11`,r:`1.6`},null,-1),n[36]||=m(`polyline`,{points:`3 17 9 12 13 15 16 13 21 17`},null,-1)],64)):e.name===`x`?(r(),S(x,{key:21},[n[37]||=m(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`},null,-1),n[38]||=m(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`},null,-1)],64)):e.name===`link`?(r(),S(x,{key:22},[n[39]||=m(`path`,{d:`M10 13 a4 4 0 0 0 5.66 0 l3 -3 a4 4 0 1 0 -5.66 -5.66 l-1 1`},null,-1),n[40]||=m(`path`,{d:`M14 11 a4 4 0 0 0 -5.66 0 l-3 3 a4 4 0 1 0 5.66 5.66 l1 -1`},null,-1)],64)):e.name===`note`?(r(),S(x,{key:23},[n[41]||=m(`path`,{d:`M6 4 h9 l3 3 v13 a1 1 0 0 1 -1 1 h-11 a1 1 0 0 1 -1 -1 v-15 a1 1 0 0 1 1 -1 z`},null,-1),n[42]||=m(`line`,{x1:`8`,y1:`10`,x2:`16`,y2:`10`},null,-1),n[43]||=m(`line`,{x1:`8`,y1:`13`,x2:`16`,y2:`13`},null,-1),n[44]||=m(`line`,{x1:`8`,y1:`16`,x2:`13`,y2:`16`},null,-1)],64)):c(``,!0)],8,T))}}),k=`data:image/svg+xml,%3csvg%20t='1780822312364'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='7459'%20width='200'%20height='200'%3e%3cpath%20d='M329.16%20292.571h658.286V512H329.16zM329.16%200h658.286v219.429H329.16z'%20fill='%239AA1A2'%20p-id='7460'%3e%3c/path%3e%3cpath%20d='M44.927%20146.286a46.519%2046.519%200%200%201%2038.107-73.143h319.269v73.143H109.73V791.99l-48.713%205.705-24.43-651.41h8.339z'%20fill='%239AA1A2'%20p-id='7461'%3e%3c/path%3e%3cpath%20d='M363.83%20877.714H179.51c-78.775%200-142.921-66.12-142.921-147.31V112.787c0-21.943%2017.188-39.643%2038.473-39.643%2021.211%200%2033.5%2017.774%2033.5%2039.643v617.619c0%2037.522%2028.013%2076.58%2064.438%2076.58h190.903c21.211%200%2038.766%2013.97%2038.766%2035.84%200%2021.943-17.555%2034.89-38.766%2034.89z'%20fill='%239AA1A2'%20p-id='7462'%3e%3c/path%3e%3cpath%20d='M432.95%20438.857H179.51c-78.775%200-81.043-18.578-81.043-62.903l10.094-90.624c0%2020.48%2013.458%2080.677%2049.884%2080.677h210.139c21.211%200%20120.613%204.023%20120.613%2016.018%200%2011.922-35.036%2056.832-56.32%2056.832zM640.017%20749.714V640a54.857%2054.857%200%200%201%20109.714%200v109.714h109.715a54.857%2054.857%200%200%201%200%20109.715H749.73v109.714a54.857%2054.857%200%200%201-109.714%200V859.429H530.303a54.857%2054.857%200%200%201%200-109.715h109.714z'%20fill='%239AA1A2'%20p-id='7463'%3e%3c/path%3e%3c/svg%3e`,A=`data:image/svg+xml,%3csvg%20t='1780822464335'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='8457'%20width='200'%20height='200'%3e%3cpath%20d='M512%20804.571h512V1024H512V804.571zM0%200h658.286v219.429H0V0z'%20fill='%239AA1A2'%20p-id='8458'%3e%3c/path%3e%3cpath%20d='M619.813%20950.857h-184.32c-78.775%200-142.922-66.121-142.922-147.31V185.93c0-21.943%2017.189-39.643%2038.474-39.643%2021.211%200%2033.353%2017.773%2033.353%2039.643v617.618c0%2037.523%2034.743%2073.728%2071.095%2073.728h184.32c21.211%200%2038.473%2012.069%2038.473%2033.939%200%2021.943-17.189%2039.643-38.473%2039.643z'%20fill='%239AA1A2'%20p-id='8459'%3e%3c/path%3e%3cpath%20d='M676.571%20457.143V347.429a54.857%2054.857%200%200%201%20109.715%200v109.714H896a54.857%2054.857%200%200%201%200%20109.714H786.286v109.714a54.857%2054.857%200%200%201-109.715%200V566.857H566.857a54.857%2054.857%200%200%201%200-109.714h109.714z'%20fill='%239AA1A2'%20p-id='8460'%3e%3c/path%3e%3c/svg%3e`,j=[18,15,13,12],M=[700,600,500,400],N=[52,40,32,28],P=[120,80,60,44],F=[.8,.8,.8,.8],ee=j.length-1;function te(e,t){return Math.round(I(e,t)*F[ne(e)])}function ne(e){return Math.min(ee,Math.max(0,e))}function I(e,t=14){return Math.round(j[ne(e)]*t/14*10)/10}function L(e,t=14){return Math.round(N[ne(e)]*t/14)}var re=60,ie=14,R=24,ae=null;function oe(){if(ae)return ae;let e=typeof document<`u`?document.createElement(`canvas`).getContext(`2d`):null;return e?(ae=e,e):{font:``,measureText:()=>({width:0})}}var se=new Map;function ce(e,t,n){let r=`${n}|${t}|${e}`,i=se.get(r);if(i!==void 0)return i;let a=oe();a.font=`${n} ${t}px "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif`;let o=a.measureText(e).width;return se.set(r,o),o}var le=24,ue=400,de=8,fe=16,pe=4,me=200;function he(e,t,n){return Math.min(n,Math.max(t,e))}function ge(e,t,n,r,i){let a=ne(t),o=I(t,n),s=Math.min(ce(e.text||``,o,M[a]),me),c=te(t,n),l=Math.ceil(s+c*2),u=e.richContent&&(e.richContent.kind===`code`||e.richContent.kind===`table`)?Math.ceil(o*1.2)+6:L(t,n),d=0;if(e.link&&(d+=fe),e.note&&(d+=fe),d>0){let t=+!!e.link+ +!!e.note;d+=pe*t}let f=l+d,p=(()=>{let t=Math.round(P[a]*n/14);if(e.richContent&&(e.richContent.kind===`code`||e.richContent.kind===`table`)){let n=i?.[e.id];return Math.max(t,n??240)}return t})(),m=!!(e.richContent&&(e.richContent.kind===`code`||e.richContent.kind===`table`)),h=r?.[e.id],g=m?Math.max(24,h??Math.max(70,Math.ceil(o*5))):0,_=g>0?10:0;if(!e.image)return{w:Math.max(p,f),h:Math.ceil(u+_+g)};let v=he(e.image.width,le,ue);return{w:Math.max(p,f,Math.ceil(v+c*2)),h:Math.ceil(e.image.height+de+u+_+g)}}function _e(e,t={}){let n=t.mode??`mindmap`,r=t.preservePositions===!0,i=xe(e,0,null,1,`right`,t.baseFontSize??14,t.richHeights,t.richWidths);return z(i),ve(i,n,r),i.x=0,i.y=0,B(i,r)}function ve(e,t,n=!1){if(t===`mindmap`){let t=e.children;if(t.length!==0)if(t.length===1)t[0]._dir=`right`,t[0].side=1,t[0]._dirRight=1;else{let e=t.reduce((e,t)=>e+t._subtreeH,0),n=1,r=Math.abs(t[0]._subtreeH-(e-t[0]._subtreeH)),i=0;for(let a=0;a<t.length-1;a++){i+=t[a]._subtreeH;let o=Math.abs(i-(e-i));o<r&&(r=o,n=a+1)}for(let e=0;e<n;e++)t[e]._dir=`right`,t[e].side=1,t[e]._dirRight=1;for(let e=n;e<t.length;e++)t[e]._dir=`left`,t[e].side=-1,t[e]._dirRight=-1}let r=e.children.filter(e=>e.side===1),i=e.children.filter(e=>e.side===-1),a=(e,t)=>{let n=t===`right`?1:-1;e._dir=t,e.side=n,e._dirRight=n;for(let n of e.children)a(n,t)};for(let e of r)a(e,`right`);for(let e of i)a(e,`left`);r.length>0&&ye({...e,children:r},`right`,re,!0,n),i.length>0&&ye({...e,children:i},`left`,re,!0,n)}else if(t===`tree`){let t=e=>{e.side=1,e._dir=`right`;for(let n of e.children)t(n)};for(let t of e.children)t._dir=`right`;ye(e,`right`,re,!0,n),t(e)}else{for(let t of e.children)t._dir=`down`;be(e,re,n)}}function ye(e,t,n,r,i=!1){if(e.children.length===0)return;let a=e.children.reduce((e,t,n)=>e+t._subtreeH+(n>0?ie:0),0),o=t===`right`?1:-1,s=r?o:1,c=e.y-s*a/2;e.children.forEach(r=>{i||(r.x=e.x+o*(e.width/2+n+r.width/2),r.y=c+s*r._subtreeH/2),r._dir=t,c+=s*(r._subtreeH+ie),ye(r,t,n,!1,i)})}function be(e,t,n=!1){if(e.children.length===0)return;let r=e.children.reduce((e,t,n)=>e+t._subtreeW+(n>0?ie*2:0),0),i=e.x-r/2;e.children.forEach(r=>{n||(r.x=i+r._subtreeW/2,r.y=e.y+e.height/2+t+r.height/2),r._dir=`down`,i+=r._subtreeW+ie*2,be(r,t,n)})}function xe(e,t,n,r,i,a,o,s){let c=ge(e,t,a,o,s),l={id:e.id,text:e.text,depth:t,x:e._x??0,y:e._y??0,width:c.w,height:c.h,fontSize:I(t,a),isRoot:t===0,collapsed:e.collapsed,side:r,_dir:i,_dirRight:r,_subtreeH:c.h,_subtreeW:c.w,image:e.image?{...e.image}:void 0,link:e.link?{url:e.link.url}:void 0,note:e.note?{text:e.note.text}:void 0,richContent:e.richContent?{kind:e.richContent.kind,raw:e.richContent.raw,lang:e.richContent.lang}:void 0,children:[],parent:n};if(e.collapsed)return l;let u=e.children.length,d=Math.ceil(u/2);return l.children=e.children.map((e,n)=>{let c=t===0?n<d?1:-1:r;return xe(e,t+1,l,c,i,a,o,s)}),l}function z(e){let t=[e];for(let e=0;e<t.length;e++){let n=t[e];for(let e of n.children)t.push(e)}for(let e=t.length-1;e>=0;e--){let n=t[e];if(n.collapsed||n.children.length===0){n._subtreeH=n.height,n._subtreeW=n.width;continue}let r=0,i=0;for(let e of n.children)r+=e._subtreeH,i+=e._subtreeW;n.children.length>1&&(r+=ie*(n.children.length-1),i+=ie*2*(n.children.length-1)),n._subtreeH=Math.max(n.height,r),n._subtreeW=Math.max(n.width,i)}}function B(e,t=!1){let n=[e],r=1/0,i=-1/0,a=1/0,o=-1/0;for(;n.length;){let e=n.pop(),t=e.width/2,s=e.height/2;e.x-t<r&&(r=e.x-t),e.x+t>i&&(i=e.x+t),e.y-s<a&&(a=e.y-s),e.y+s>o&&(o=e.y+s),n.push(...e.children)}if(t)return{root:e,width:i-r+R*2,height:o-a+R*2,vbX:r-R,vbY:a-R,vbW:i-r+R*2,vbH:o-a+R*2};let s=R-a,c=[e];for(;c.length;){let e=c.pop();e.y+=s,c.push(...e.children)}return a+=s,o+=s,{root:e,width:i-r+R*2,height:o+R,vbX:r-R,vbY:0,vbW:i-r+R*2,vbH:o+R}}var Se=[{id:`default`,name:`默认`,colors:[`#f87171`,`#fb923c`,`#fbbf24`,`#a3e635`,`#34d399`,`#22d3ee`,`#818cf8`,`#c084fc`]},{id:`classic`,name:`经典`,colors:[`#ef4444`,`#f59e0b`,`#10b981`,`#3b82f6`,`#6366f1`,`#8b5cf6`,`#ec4899`,`#14b8a6`]},{id:`vivid`,name:`活力`,colors:[`#dc2626`,`#ea580c`,`#ca8a04`,`#16a34a`,`#0891b2`,`#2563eb`,`#7c3aed`,`#db2777`]},{id:`dev`,name:`代码`,colors:[`#f472b6`,`#a78bfa`,`#60a5fa`,`#38bdf8`,`#22d3ee`,`#34d399`,`#facc15`,`#fb923c`]},{id:`mint`,name:`薄荷`,colors:[`#5eead4`,`#67e8f9`,`#93c5fd`,`#c4b5fd`,`#fbcfe8`,`#fde68a`,`#a7f3d0`,`#bae6fd`]}];function Ce(e,t=[]){return[...Se,...t].find(t=>t.id===e)??Se[0]}function V(){return`n_`+Math.random().toString(36).slice(2,10)+Date.now().toString(36).slice(-4)}function we(e){return JSON.parse(JSON.stringify(e))}function H(e,t){if(e.id===t)return e;for(let n of e.children){let e=H(n,t);if(e)return e}return null}function U(e,t,n=null){if(e.id===t)return n;for(let n of e.children){let r=U(n,t,e);if(r!==null)return r}return null}function Te(e,t){let n=e.children.findIndex(e=>e.id===t);if(n>=0)return e.children.splice(n,1),!0;for(let n of e.children)if(Te(n,t))return!0;return!1}function Ee(e,t,n){let r=H(e,t);return!r||r.text===n?!1:(r.text=n,!0)}function De(e,t,n,r){if(!U(e,t)||t===n||H(H(e,t),n))return!1;let i=U(e,t),a=i.children.findIndex(e=>e.id===t);if(a<0)return!1;let[o]=i.children.splice(a,1);if(r===`child`){let t=H(e,n);return t?(t.children.push(o),!0):(i.children.splice(a,0,o),!1)}let s=U(e,n);if(!s)return i.children.splice(a,0,o),!1;let c=s.children.findIndex(e=>e.id===n);return c<0?(i.children.splice(a,0,o),!1):(r===`after`&&(c+=1),s.children.splice(c,0,o),!0)}function Oe(e){let t=/^新节点(?:\s+(\d+))?$/,n=0,r=!1;for(let i of e.children){let e=i.text.match(t);if(e)if(e[1]){let t=parseInt(e[1],10);t>n&&(n=t)}else r=!0}return n===0&&!r?Pe:n>0?`新节点 ${n+1}`:`新节点 2`}function ke(e,t,n){let r=H(e,t);if(!r)return null;let i={id:V(),text:n??Oe(r),children:[]};return r.children.push(i),i}function Ae(e,t,n){let r=U(e,t);if(!r)return null;let i=r.children.findIndex(e=>e.id===t);if(i<0)return null;let a={id:V(),text:n??Oe(r),children:[]};return r.children.splice(i+1,0,a),a}function je(e,t,n){let r=U(e,t);if(!r)return null;let i=r.children.findIndex(e=>e.id===t);if(i<0)return null;let a={id:V(),text:n,children:[]};return r.children.splice(i,0,a),a}function Me(e,t){let n=U(e,t);if(!n)return null;let r=n.children.findIndex(e=>e.id===t);if(r<0)return null;let i=n.children[r],a=we(i);return Ne(a),n.children.splice(r+1,0,a),a}function Ne(e){e.id=V();for(let t of e.children)Ne(t)}var Pe=`新节点`;function Fe(e,t=`导入的导图`){let n=e.split(/\r?\n/),r={id:V(),text:t,children:[]},i=[r],a=[-1/0],o=[],s=/^(#{1,6})\s+(.+?)\s*#*\s*$/,c=/^!\[([^\]]*)\]\((\S+?)(?:\s+"[^"]*")?\)\s*$/,l=/^\[([^\]]+)\]\((\S+?)(?:\s+"[^"]*")?\)\s*$/,u=/^(`{3,}|~{3,})\s*(\S+)?\s*$/,d=!1,f=[],p=null;function m(e){f.push(e)}function h(){if(p&&f.length>0){for(;f.length>0&&f[0].trim()===``;)f.shift();for(;f.length>0&&f[f.length-1].trim()===``;)f.pop();let e=f.join(`
2
2
  `);e&&(p.note={text:e})}d=!1,f=[]}for(let e of n){if(d){let t=e.match(u);if(t&&t[1][0]==="`"){h();continue}m(e);continue}let t=e.match(s);if(t){let e=t[1].length,n=t[2].trim();o.push({level:e,text:n,body:``}),p=o[o.length-1];continue}let n=e.match(u);if(n&&n[2]===`note`){d=!0,f=[];continue}let r=e.match(c);if(r&&p){let e=r[2];p.image={src:e,naturalW:160,naturalH:120,width:160,height:120};continue}let i=e.match(l);if(i&&p){p.link={url:i[2]},p.text=i[1];continue}if(e.trim().length>0&&p){let t=e.trim();p.body=p.body?p.body+`
3
3
  `+t:t}}d&&h();function g(e){for(;i.length>1;){let t=a[i.length-1];if(t!==void 0&&t<e.level)break;i.pop(),a.pop()}let t=i[i.length-1],n=e.text,r={id:V(),text:n,children:[]};e.image&&(r.image={...e.image}),e.link&&(r.link={url:e.link.url}),e.note&&(r.note={text:e.note.text}),e.body&&(r.note={text:e.body}),t.children.push(r),i.push(r),a.push(e.level)}for(let e of o)g(e);if(o.length>0&&o[0].level===1){let e=r.children[0];e&&(r.text=e.text,r.id=e.id,e.image&&(r.image={...e.image}),e.link&&(r.link={url:e.link.url}),e.note&&(r.note={text:e.note.text}),r.children=e.children)}return r}function Ie(e,t=1){let n=`#`.repeat(t)+` `+(e.text||``)+`
4
4
  `;e.link&&(n+=`[${e.text||`link`}](${e.link.url})