mind-elixir 5.7.1 → 5.8.0

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.
@@ -13,4 +13,4 @@ var MindElixir=(function(Y){"use strict";const re={name:"Latte",type:"light",pal
13
13
  top:${t.style.top};
14
14
  max-width: 200px;
15
15
  `,Ye(s),e.scrollIntoView(s),s.addEventListener("keydown",i=>{i.stopPropagation();const l=i.key;if(l==="Enter"||l==="Tab"){if(i.shiftKey)return;i.preventDefault(),s.blur(),e.container.focus()}}),s.addEventListener("blur",()=>{if(!s)return;const i=s.textContent?.trim()||"";i===""?n.label=o:n.label=i,s.remove(),i!==o&&(e.markdown?t.innerHTML=e.markdown(n.label,n):t.textContent=n.label,ue(t),"parent"in n?e.bus.fire("operation",{name:"finishEditSummary",obj:n}):e.bus.fire("operation",{name:"finishEditArrowLabel",obj:n}))})},Sn=function(e){const t=this.map.querySelector("me-root"),n=t.offsetTop,o=t.offsetLeft,s=t.offsetWidth,i=t.offsetHeight,l=this.map.querySelectorAll("me-main > me-wrapper");this.lines.innerHTML="";for(let c=0;c<l.length;c++){const r=l[c],a=r.querySelector("me-tpc"),{offsetLeft:d,offsetTop:h}=H(this.nodes,a),u=a.offsetWidth,y=a.offsetHeight,v=r.parentNode.className,p=this.generateMainBranch({pT:n,pL:o,pW:s,pH:i,cT:h,cL:d,cW:u,cH:y,direction:v,containerHeight:this.nodes.offsetHeight}),g=this.theme.palette,m=a.nodeObj.branchColor||g[c%g.length];if(a.style.borderColor=m,this.lines.appendChild(et(p,m,"3")),e&&e!==r)continue;const b=se("subLines"),x=r.lastChild;x.tagName==="svg"&&x.remove(),r.appendChild(b),ot(this,b,m,r,v,!0)}this.labelContainer.innerHTML="",this.renderArrow(),this.renderSummary(),this.bus.fire("linkDiv")},ot=function(e,t,n,o,s,i){const l=o.firstChild,c=o.children[1].children;if(c.length===0)return;const r=l.offsetTop,a=l.offsetLeft,d=l.offsetWidth,h=l.offsetHeight;for(let u=0;u<c.length;u++){const y=c[u],v=y.firstChild,p=v.offsetTop,g=v.offsetLeft,m=v.offsetWidth,b=v.offsetHeight,x=v.firstChild.nodeObj.branchColor||n,L=e.generateSubBranch({pT:r,pL:a,pW:d,pH:h,cT:p,cL:g,cW:m,cH:b,direction:s,isFirst:i});t.appendChild(et(L,x,"2"));const k=v.children[1];if(k){if(!k.expanded)continue}else continue;ot(e,t,x,y,s)}},st={addChild:"插入子节点",addParent:"插入父节点",addSibling:"插入同级节点",removeNode:"删除节点",focus:"专注",cancelFocus:"取消专注",moveUp:"上移",moveDown:"下移",link:"连接",linkBidirectional:"双向连接",clickTips:"请点击目标节点",summary:"摘要"},it={cn:st,zh_CN:st,zh_TW:{addChild:"插入子節點",addParent:"插入父節點",addSibling:"插入同級節點",removeNode:"刪除節點",focus:"專注",cancelFocus:"取消專注",moveUp:"上移",moveDown:"下移",link:"連接",linkBidirectional:"雙向連接",clickTips:"請點擊目標節點",summary:"摘要"},en:{addChild:"Add child",addParent:"Add parent",addSibling:"Add sibling",removeNode:"Remove node",focus:"Focus Mode",cancelFocus:"Cancel Focus Mode",moveUp:"Move up",moveDown:"Move down",link:"Link",linkBidirectional:"Bidirectional Link",clickTips:"Please click the target node",summary:"Summary"},ru:{addChild:"Добавить дочерний элемент",addParent:"Добавить родительский элемент",addSibling:"Добавить на этом уровне",removeNode:"Удалить узел",focus:"Режим фокусировки",cancelFocus:"Отменить режим фокусировки",moveUp:"Поднять выше",moveDown:"Опустить ниже",link:"Ссылка",linkBidirectional:"Двунаправленная ссылка",clickTips:"Пожалуйста, нажмите на целевой узел",summary:"Описание"},ja:{addChild:"子ノードを追加する",addParent:"親ノードを追加します",addSibling:"兄弟ノードを追加する",removeNode:"ノードを削除",focus:"集中",cancelFocus:"集中解除",moveUp:"上へ移動",moveDown:"下へ移動",link:"コネクト",linkBidirectional:"双方向リンク",clickTips:"ターゲットノードをクリックしてください",summary:"概要"},pt:{addChild:"Adicionar item filho",addParent:"Adicionar item pai",addSibling:"Adicionar item irmao",removeNode:"Remover item",focus:"Modo Foco",cancelFocus:"Cancelar Modo Foco",moveUp:"Mover para cima",moveDown:"Mover para baixo",link:"Link",linkBidirectional:"Link bidirecional",clickTips:"Favor clicar no item alvo",summary:"Resumo"},it:{addChild:"Aggiungi figlio",addParent:"Aggiungi genitore",addSibling:"Aggiungi fratello",removeNode:"Rimuovi nodo",focus:"Modalità Focus",cancelFocus:"Annulla Modalità Focus",moveUp:"Sposta su",moveDown:"Sposta giù",link:"Collega",linkBidirectional:"Collegamento bidirezionale",clickTips:"Si prega di fare clic sul nodo di destinazione",summary:"Unisci nodi"},es:{addChild:"Agregar hijo",addParent:"Agregar padre",addSibling:"Agregar hermano",removeNode:"Eliminar nodo",focus:"Modo Enfoque",cancelFocus:"Cancelar Modo Enfoque",moveUp:"Mover hacia arriba",moveDown:"Mover hacia abajo",link:"Enlace",linkBidirectional:"Enlace bidireccional",clickTips:"Por favor haga clic en el nodo de destino",summary:"Resumen"},fr:{addChild:"Ajout enfant",addParent:"Ajout parent",addSibling:"Ajout voisin",removeNode:"Supprimer",focus:"Cibler",cancelFocus:"Retour",moveUp:"Monter",moveDown:"Descendre",link:"Lier",linkBidirectional:"Lien bidirectionnel",clickTips:"Cliquer sur le noeud cible",summary:"Annoter"},ko:{addChild:"자식 추가",addParent:"부모 추가",addSibling:"형제 추가",removeNode:"노드 삭제",focus:"포커스 모드",cancelFocus:"포커스 모드 취소",moveUp:"위로 이동",moveDown:"아래로 이동",link:"연결",linkBidirectional:"양방향 연결",clickTips:"대상 노드를 클릭하십시오",summary:"요약"},ro:{addChild:"Adaugă sub-nod",addParent:"Adaugă nod părinte",addSibling:"Adaugă nod la același nivel",removeNode:"Șterge nodul",focus:"Focalizare",cancelFocus:"Anulează focalizarea",moveUp:"Mută în sus",moveDown:"Mută în jos",link:"Creează legătură",linkBidirectional:"Creează legătură bidirecțională",clickTips:"Click pe nodul țintă",summary:"Rezumat"}};function Nn(e,t){t=t===!0?{focus:!0,link:!0}:t;const n=E=>{const C=document.createElement("div");return C.innerText=E,C.className="tips",C},o=(E,C,S)=>{const N=document.createElement("li");return N.id=E,N.innerHTML=`<span>${xe(C)}</span><span ${S?'class="key"':""}>${xe(S)}</span>`,N},s=it[e.locale]?e.locale:"en",i=it[s],l=o("cm-add_child",i.addChild,"Tab"),c=o("cm-add_parent",i.addParent,"Ctrl + Enter"),r=o("cm-add_sibling",i.addSibling,"Enter"),a=o("cm-remove_child",i.removeNode,"Delete"),d=o("cm-fucus",i.focus,""),h=o("cm-unfucus",i.cancelFocus,""),u=o("cm-up",i.moveUp,"PgUp"),y=o("cm-down",i.moveDown,"Pgdn"),v=o("cm-link",i.link,""),p=o("cm-link-bidirectional",i.linkBidirectional,""),g=o("cm-summary",i.summary,""),m=document.createElement("ul");if(m.className="menu-list",m.appendChild(l),m.appendChild(c),m.appendChild(r),m.appendChild(a),t.focus&&(m.appendChild(d),m.appendChild(h)),m.appendChild(u),m.appendChild(y),m.appendChild(g),t.link&&(m.appendChild(v),m.appendChild(p)),t&&t.extend)for(let E=0;E<t.extend.length;E++){const C=t.extend[E],S=o(C.name,C.name,C.key||"");m.appendChild(S),S.onclick=N=>{C.onclick(N)}}const b=document.createElement("div");b.className="context-menu",b.appendChild(m),b.hidden=!0,e.container.append(b);let x=!0;const L=E=>{const C=E.target;if(de(C)){C.parentElement.tagName==="ME-ROOT"?x=!0:x=!1,x?(d.className="disabled",u.className="disabled",y.className="disabled",c.className="disabled",r.className="disabled",a.className="disabled"):(d.className="",u.className="",y.className="",c.className="",r.className="",a.className=""),b.hidden=!1,m.style.top="",m.style.bottom="",m.style.left="",m.style.right="";const S=m.getBoundingClientRect(),N=m.offsetHeight,O=m.offsetWidth,_=E.clientY-S.top,F=E.clientX-S.left;N+_>window.innerHeight?(m.style.top="",m.style.bottom="0px"):(m.style.bottom="",m.style.top=_+15+"px"),O+F>window.innerWidth?(m.style.left="",m.style.right="0px"):(m.style.right="",m.style.left=F+10+"px")}};e.bus.addListener("showContextMenu",L),b.onclick=E=>{E.target===b&&(b.hidden=!0)},l.onclick=()=>{e.addChild(),b.hidden=!0},c.onclick=()=>{e.insertParent(),b.hidden=!0},r.onclick=()=>{x||(e.insertSibling("after"),b.hidden=!0)},a.onclick=()=>{x||(e.removeNodes(e.currentNodes||[]),b.hidden=!0)},d.onclick=()=>{x||(e.focusNode(e.currentNode),b.hidden=!0)},h.onclick=()=>{e.cancelFocus(),b.hidden=!0},u.onclick=()=>{x||(e.moveUpNode(),b.hidden=!0)},y.onclick=()=>{x||(e.moveDownNode(),b.hidden=!0)};const k=E=>{b.hidden=!0;const C=e.currentNode,S=n(i.clickTips);e.container.appendChild(S),e.map.addEventListener("click",N=>{N.preventDefault(),S.remove();const O=N.target;(O.parentElement.tagName==="ME-PARENT"||O.parentElement.tagName==="ME-ROOT")&&e.createArrow(C,O,E)},{once:!0})};return v.onclick=()=>k(),p.onclick=()=>k({bidirectional:!0}),g.onclick=()=>{b.hidden=!0,e.createSummary(),e.unselectNodes(e.currentNodes)},()=>{l.onclick=null,c.onclick=null,r.onclick=null,a.onclick=null,d.onclick=null,h.onclick=null,u.onclick=null,y.onclick=null,v.onclick=null,g.onclick=null,b.onclick=null,e.container.oncontextmenu=null}}const Tn=function(e){return["createSummary","removeSummary","finishEditSummary"].includes(e.name)?{type:"summary",value:e.obj.id}:["createArrow","removeArrow","finishEditArrowLabel"].includes(e.name)?{type:"arrow",value:e.obj.id}:["removeNodes","copyNodes","moveNodeBefore","moveNodeAfter","moveNodeIn"].includes(e.name)?{type:"nodes",value:e.objs.map(t=>t.id)}:{type:"nodes",value:[e.obj.id]}};function kn(e){let t=[],n=-1,o=e.getData(),s=[];e.undo=function(){if(n>-1){const r=t[n];o=r.prev,e.refresh(r.prev);try{r.currentTarget.type==="nodes"&&(r.operation==="removeNodes"?e.selectNodes(r.currentTarget.value.map(a=>this.findEle(a))):e.selectNodes(r.currentSelected.map(a=>this.findEle(a))))}catch{}finally{n--}}},e.redo=function(){if(n<t.length-1){n++;const r=t[n];o=r.next,e.refresh(r.next);try{r.currentTarget.type==="nodes"&&(r.operation==="removeNodes"?e.selectNodes(r.currentSelected.map(a=>this.findEle(a))):e.selectNodes(r.currentTarget.value.map(a=>this.findEle(a))))}catch{}}};const i=function(r){if(r.name==="beginEdit")return;t=t.slice(0,n+1);const a=e.getData(),d={prev:o,operation:r.name,currentSelected:s.map(h=>h.id),currentTarget:Tn(r),next:a};t.push(d),o=a,n=t.length-1},l=function(r){(r.metaKey||r.ctrlKey)&&(r.shiftKey&&r.key==="Z"||r.key==="y")?e.redo():(r.metaKey||r.ctrlKey)&&r.key==="z"&&e.undo()},c=function(){s=e.currentNodes.map(r=>r.nodeObj)};return e.bus.addListener("operation",i),e.bus.addListener("selectNodes",c),e.container.addEventListener("keydown",l),()=>{e.bus.removeListener("operation",i),e.bus.removeListener("selectNodes",c),e.container.removeEventListener("keydown",l)}}const _n={side:'<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169394918" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2021" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M851.91168 328.45312c-59.97056 0-108.6208 48.47104-108.91264 108.36992l-137.92768 38.4a109.14304 109.14304 0 0 0-63.46752-46.58688l1.39264-137.11872c47.29344-11.86816 82.31936-54.66624 82.31936-105.64096 0-60.15488-48.76288-108.91776-108.91776-108.91776s-108.91776 48.76288-108.91776 108.91776c0 49.18784 32.60928 90.75712 77.38368 104.27392l-1.41312 138.87488a109.19936 109.19936 0 0 0-63.50336 48.55808l-138.93632-39.48544 0.01024-0.72704c0-60.15488-48.76288-108.91776-108.91776-108.91776s-108.91776 48.75776-108.91776 108.91776c0 60.15488 48.76288 108.91264 108.91776 108.91264 39.3984 0 73.91232-20.92032 93.03552-52.2496l139.19232 39.552-0.00512 0.2304c0 25.8304 9.00096 49.5616 24.02816 68.23424l-90.14272 132.63872a108.7488 108.7488 0 0 0-34.2528-5.504c-60.15488 0-108.91776 48.768-108.91776 108.91776 0 60.16 48.76288 108.91776 108.91776 108.91776 60.16 0 108.92288-48.75776 108.92288-108.91776 0-27.14624-9.9328-51.968-26.36288-71.04l89.04704-131.03104a108.544 108.544 0 0 0 37.6832 6.70208 108.672 108.672 0 0 0 36.48512-6.272l93.13792 132.57216a108.48256 108.48256 0 0 0-24.69888 69.0688c0 60.16 48.768 108.92288 108.91776 108.92288 60.16 0 108.91776-48.76288 108.91776-108.92288 0-60.14976-48.75776-108.91776-108.91776-108.91776a108.80512 108.80512 0 0 0-36.69504 6.3488l-93.07136-132.48a108.48768 108.48768 0 0 0 24.79616-72.22784l136.09984-37.888c18.99008 31.93856 53.84192 53.3504 93.69088 53.3504 60.16 0 108.92288-48.75776 108.92288-108.91264-0.00512-60.15488-48.77312-108.92288-108.92288-108.92288z" p-id="2022"></path></svg>',left:'<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169375313" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1775" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M639 463.30000001L639 285.1c0-36.90000001-26.4-68.5-61.3-68.5l-150.2 0c-1.5 0-3 0.1-4.5 0.3-10.2-38.7-45.5-67.3-87.5-67.3-50 0-90.5 40.5-90.5 90.5s40.5 90.5 90.5 90.5c42 0 77.3-28.6 87.5-67.39999999 1.4 0.3 2.9 0.4 4.5 0.39999999L577.7 263.6c6.8 0 14.3 8.9 14.3 21.49999999l0 427.00000001c0 12.7-7.40000001 21.5-14.30000001 21.5l-150.19999999 0c-1.5 0-3 0.2-4.5 0.4-10.2-38.8-45.5-67.3-87.5-67.3-50 0-90.5 40.5-90.5 90.4 0 49.9 40.5 90.6 90.5 90.59999999 42 0 77.3-28.6 87.5-67.39999999 1.4 0.2 2.9 0.4 4.49999999 0.4L577.7 780.7c34.80000001 0 61.3-31.6 61.3-68.50000001L639 510.3l79.1 0c10.4 38.5 45.49999999 67 87.4 67 50 0 90.5-40.5 90.5-90.5s-40.5-90.5-90.5-90.5c-41.79999999 0-77.00000001 28.4-87.4 67L639 463.30000001z" fill="currentColor" p-id="1776"></path></svg>',right:'<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169667709" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3037" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M385 560.69999999L385 738.9c0 36.90000001 26.4 68.5 61.3 68.5l150.2 0c1.5 0 3-0.1 4.5-0.3 10.2 38.7 45.5 67.3 87.5 67.3 50 0 90.5-40.5 90.5-90.5s-40.5-90.5-90.5-90.5c-42 0-77.3 28.6-87.5 67.39999999-1.4-0.3-2.9-0.4-4.5-0.39999999L446.3 760.4c-6.8 0-14.3-8.9-14.3-21.49999999l0-427.00000001c0-12.7 7.40000001-21.5 14.30000001-21.5l150.19999999 0c1.5 0 3-0.2 4.5-0.4 10.2 38.8 45.5 67.3 87.5 67.3 50 0 90.5-40.5 90.5-90.4 0-49.9-40.5-90.6-90.5-90.59999999-42 0-77.3 28.6-87.5 67.39999999-1.4-0.2-2.9-0.4-4.49999999-0.4L446.3 243.3c-34.80000001 0-61.3 31.6-61.3 68.50000001L385 513.7l-79.1 0c-10.4-38.5-45.49999999-67-87.4-67-50 0-90.5 40.5-90.5 90.5s40.5 90.5 90.5 90.5c41.79999999 0 77.00000001-28.4 87.4-67L385 560.69999999z" fill="currentColor" p-id="3038"></path></svg>',full:'<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169402629" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2170" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M639.328 416c8.032 0 16.096-3.008 22.304-9.056l202.624-197.184-0.8 143.808c-0.096 17.696 14.144 32.096 31.808 32.192 0.064 0 0.128 0 0.192 0 17.6 0 31.904-14.208 32-31.808l1.248-222.208c0-0.672-0.352-1.248-0.384-1.92 0.032-0.512 0.288-0.896 0.288-1.408 0.032-17.664-14.272-32-31.968-32.032L671.552 96l-0.032 0c-17.664 0-31.968 14.304-32 31.968C639.488 145.632 653.824 160 671.488 160l151.872 0.224-206.368 200.8c-12.672 12.32-12.928 32.608-0.64 45.248C622.656 412.736 630.976 416 639.328 416z" p-id="2171"></path><path d="M896.032 639.552 896.032 639.552c-17.696 0-32 14.304-32.032 31.968l-0.224 151.872-200.832-206.4c-12.32-12.64-32.576-12.96-45.248-0.64-12.672 12.352-12.928 32.608-0.64 45.248l197.184 202.624-143.808-0.8c-0.064 0-0.128 0-0.192 0-17.6 0-31.904 14.208-32 31.808-0.096 17.696 14.144 32.096 31.808 32.192l222.24 1.248c0.064 0 0.128 0 0.192 0 0.64 0 1.12-0.32 1.76-0.352 0.512 0.032 0.896 0.288 1.408 0.288l0.032 0c17.664 0 31.968-14.304 32-31.968L928 671.584C928.032 653.952 913.728 639.584 896.032 639.552z" p-id="2172"></path><path d="M209.76 159.744l143.808 0.8c0.064 0 0.128 0 0.192 0 17.6 0 31.904-14.208 32-31.808 0.096-17.696-14.144-32.096-31.808-32.192L131.68 95.328c-0.064 0-0.128 0-0.192 0-0.672 0-1.248 0.352-1.888 0.384-0.448 0-0.8-0.256-1.248-0.256 0 0-0.032 0-0.032 0-17.664 0-31.968 14.304-32 31.968L96 352.448c-0.032 17.664 14.272 32 31.968 32.032 0 0 0.032 0 0.032 0 17.664 0 31.968-14.304 32-31.968l0.224-151.936 200.832 206.4c6.272 6.464 14.624 9.696 22.944 9.696 8.032 0 16.096-3.008 22.304-9.056 12.672-12.32 12.96-32.608 0.64-45.248L209.76 159.744z" p-id="2173"></path><path d="M362.368 617.056l-202.624 197.184 0.8-143.808c0.096-17.696-14.144-32.096-31.808-32.192-0.064 0-0.128 0-0.192 0-17.6 0-31.904 14.208-32 31.808l-1.248 222.24c0 0.704 0.352 1.312 0.384 2.016 0 0.448-0.256 0.832-0.256 1.312-0.032 17.664 14.272 32 31.968 32.032L352.448 928c0 0 0.032 0 0.032 0 17.664 0 31.968-14.304 32-31.968s-14.272-32-31.968-32.032l-151.936-0.224 206.4-200.832c12.672-12.352 12.96-32.608 0.64-45.248S375.008 604.704 362.368 617.056z" p-id="2174"></path></svg>',living:'<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169573443" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2883" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M514.133333 488.533333m-106.666666 0a106.666667 106.666667 0 1 0 213.333333 0 106.666667 106.666667 0 1 0-213.333333 0Z" fill="currentColor" p-id="2884"></path><path d="M512 64C264.533333 64 64 264.533333 64 512c0 236.8 183.466667 428.8 416 445.866667v-134.4c-53.333333-59.733333-200.533333-230.4-200.533333-334.933334 0-130.133333 104.533333-234.666667 234.666666-234.666666s234.666667 104.533333 234.666667 234.666666c0 61.866667-49.066667 153.6-145.066667 270.933334l-59.733333 68.266666V960C776.533333 942.933333 960 748.8 960 512c0-247.466667-200.533333-448-448-448z" fill="currentColor" p-id="2885"></path></svg>',zoomin:'<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169419447" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2480" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M863.328 482.56l-317.344-1.12L545.984 162.816c0-17.664-14.336-32-32-32s-32 14.336-32 32l0 318.4L159.616 480.064c-0.032 0-0.064 0-0.096 0-17.632 0-31.936 14.24-32 31.904C127.424 529.632 141.728 544 159.392 544.064l322.592 1.152 0 319.168c0 17.696 14.336 32 32 32s32-14.304 32-32l0-318.944 317.088 1.12c0.064 0 0.096 0 0.128 0 17.632 0 31.936-14.24 32-31.904C895.264 496.992 880.96 482.624 863.328 482.56z" p-id="2481"></path></svg>',zoomout:'<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169426515" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2730" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M863.744 544 163.424 544c-17.664 0-32-14.336-32-32s14.336-32 32-32l700.32 0c17.696 0 32 14.336 32 32S881.44 544 863.744 544z" p-id="2731"></path></svg>'},K=(e,t)=>{const n=document.createElement("span");return n.id=e,n.innerHTML=_n[t],n};function Ln(e){const t=document.createElement("div"),n=K("fullscreen","full"),o=K("toCenter","living"),s=K("zoomout","zoomout"),i=K("zoomin","zoomin");t.appendChild(n),t.appendChild(o),t.appendChild(s),t.appendChild(i),t.className="mind-elixir-toolbar rb";let l=null;const c=()=>{const a=e.container.getBoundingClientRect(),d=Ne(e.map.style.transform),h=a.width/2,u=a.height/2,y=(h-d.x)/e.scaleVal,v=(u-d.y)/e.scaleVal;l={containerRect:a,currentTransform:d,mapCenterX:y,mapCenterY:v}},r=()=>{if(l){const a=e.container.getBoundingClientRect(),d=a.width/2,h=a.height/2,u=d-l.mapCenterX*e.scaleVal,y=h-l.mapCenterY*e.scaleVal,v=u-l.currentTransform.x,p=y-l.currentTransform.y;e.move(v,p)}};return e.el.addEventListener("fullscreenchange",r),n.onclick=()=>{c(),document.fullscreenElement!==e.el?e.el.requestFullscreen():document.exitFullscreen()},o.onclick=()=>{e.toCenter()},s.onclick=()=>{e.scale(e.scaleVal-e.scaleSensitivity)},i.onclick=()=>{e.scale(e.scaleVal+e.scaleSensitivity)},t}function An(e){const t=document.createElement("div"),n=K("tbltl","left"),o=K("tbltr","right"),s=K("tblts","side");return t.appendChild(n),t.appendChild(o),t.appendChild(s),t.className="mind-elixir-toolbar lt",n.onclick=()=>{e.initLeft()},o.onclick=()=>{e.initRight()},s.onclick=()=>{e.initSide()},t}function Dn(e){e.container.append(Ln(e)),e.container.append(An(e))}class Mn{_listeners=new Map;addEventListener(t,n){const o=this._listeners.get(t)??new Set;return this._listeners.set(t,o),o.add(n),this}removeEventListener(t,n){return this._listeners.get(t)?.delete(n),this}dispatchEvent(t,...n){let o=!0;for(const s of this._listeners.get(t)??[])o=s(...n)!==!1&&o;return o}unbindAllListeners(){this._listeners.clear()}on=this.addEventListener;off=this.removeEventListener;emit=this.dispatchEvent}const rt=(e,t="px")=>typeof e=="number"?e+t:e,W=({style:e},t,n)=>{if(typeof t=="object")for(const[o,s]of Object.entries(t))s!==void 0&&(e[o]=rt(s));else n!==void 0&&(e[t]=rt(n))},lt=(e=0,t=0,n=0,o=0)=>{const s={x:e,y:t,width:n,height:o,top:t,left:e,right:e+n,bottom:t+o};return{...s,toJSON:()=>JSON.stringify(s)}},Pn=e=>{let t,n=-1,o=!1;return{next:(...s)=>{t=s,o||(o=!0,n=requestAnimationFrame(()=>{e(...t),o=!1}))},cancel:()=>{cancelAnimationFrame(n),o=!1}}},ct=(e,t,n="touch")=>{switch(n){case"center":{const o=t.left+t.width/2,s=t.top+t.height/2;return o>=e.left&&o<=e.right&&s>=e.top&&s<=e.bottom}case"cover":return t.left>=e.left&&t.top>=e.top&&t.right<=e.right&&t.bottom<=e.bottom;case"touch":return e.right>=t.left&&e.left<=t.right&&e.bottom>=t.top&&e.top<=t.bottom}},On=()=>matchMedia("(hover: none), (pointer: coarse)").matches,$n=()=>"safari"in window,$e=e=>Array.isArray(e)?e:[e],at=e=>(t,n,o,s={})=>{(t instanceof HTMLCollection||t instanceof NodeList)&&(t=Array.from(t)),n=$e(n),t=$e(t);for(const i of t)if(i)for(const l of n)i[e](l,o,{capture:!1,...s})},X=at("addEventListener"),j=at("removeEventListener"),pe=e=>{const{clientX:t,clientY:n,target:o}=e.touches?.[0]??e;return{x:t,y:n,target:o}},ee=(e,t=document)=>$e(e).map(n=>typeof n=="string"?Array.from(t.querySelectorAll(n)):n instanceof Element?n:null).flat().filter(Boolean),Hn=(e,t)=>t.some(n=>typeof n=="number"?e.button===n:typeof n=="object"?n.button!==e.button?!1:n.modifiers.every(o=>{switch(o){case"alt":return e.altKey;case"ctrl":return e.ctrlKey||e.metaKey;case"shift":return e.shiftKey}}):!1),{abs:V,max:dt,min:ht,ceil:ft}=Math,ut=(e=[])=>({stored:e,selected:[],touched:[],changed:{added:[],removed:[]}});class jn extends Mn{static version="mind-elixir-fork";_options;_selection=ut();_area;_clippingElement;_targetElement;_targetBoundary;_targetBoundaryScrolled=!0;_targetRect;_selectables=[];_latestElement;_areaLocation={y1:0,x2:0,y2:0,x1:0};_areaRect=lt();_singleClick=!0;_frame;_scrollAvailable=!0;_scrollingActive=!1;_scrollSpeed={x:0,y:0};_scrollDelta={x:0,y:0};_lastMousePosition={x:0,y:0};constructor(t){super(),this._options={selectionAreaClass:"selection-area",selectionContainerClass:void 0,selectables:[],document:window.document,startAreas:["html"],boundaries:["html"],container:"body",mindElixirInstance:void 0,...t,behaviour:{overlap:"invert",intersect:"touch",triggers:[0],...t.behaviour,startThreshold:t.behaviour?.startThreshold?typeof t.behaviour.startThreshold=="number"?t.behaviour.startThreshold:{x:10,y:10,...t.behaviour.startThreshold}:{x:10,y:10},scrolling:{speedDivider:10,manualSpeed:750,...t.behaviour?.scrolling,startScrollMargins:{x:0,y:0,...t.behaviour?.scrolling?.startScrollMargins}}},features:{range:!0,touch:!0,deselectOnBlur:!1,...t.features,singleTap:{allow:!0,intersect:"native",...t.features?.singleTap}}};for(const i of Object.getOwnPropertyNames(Object.getPrototypeOf(this)))typeof this[i]=="function"&&(this[i]=this[i].bind(this));const{document:n,selectionAreaClass:o,selectionContainerClass:s}=this._options;this._area=n.createElement("div"),this._clippingElement=n.createElement("div"),this._clippingElement.appendChild(this._area),this._area.classList.add(o),s&&this._clippingElement.classList.add(s),W(this._area,{willChange:"top, left, bottom, right, width, height",top:0,left:0,position:"fixed"}),W(this._clippingElement,{overflow:"hidden",position:"fixed",transform:"translate3d(0, 0, 0)",pointerEvents:"none",zIndex:"1"}),this._frame=Pn(i=>{this._recalculateSelectionAreaRect(),this._updateElementSelection(),this._emitEvent("move",i),this._redrawSelectionArea()}),this.enable()}_toggleStartEvents(t=!0){const{document:n,features:o}=this._options,s=t?X:j;s(n,"mousedown",this._onTapStart),o.touch&&s(n,"touchstart",this._onTapStart,{passive:!1})}_onTapStart(t,n=!1){const{x:o,y:s,target:i}=pe(t),{document:l,startAreas:c,boundaries:r,features:a,behaviour:d}=this._options,h=i.getBoundingClientRect();if(t instanceof MouseEvent&&!Hn(t,d.triggers))return;const u=ee(c,l),y=ee(r,l);this._targetElement=y.find(m=>ct(m.getBoundingClientRect(),h));const v=t.composedPath(),p=u.find(m=>v.includes(m));if(this._targetBoundary=y.find(m=>v.includes(m)),!this._targetElement||!p||!this._targetBoundary||!n&&this._emitEvent("beforestart",t)===!1)return;this._areaLocation={x1:o,y1:s,x2:0,y2:0};const g=l.scrollingElement??l.body;this._scrollDelta={x:g.scrollLeft,y:g.scrollTop},this._singleClick=!0,this.clearSelection(!1,!0),X(l,["touchmove","mousemove"],this._delayedTapMove,{passive:!1}),X(l,["mouseup","touchcancel","touchend"],this._onTapStop),X(l,"scroll",this._onScroll),a.deselectOnBlur&&(this._targetBoundaryScrolled=!1,X(this._targetBoundary,"scroll",this._onStartAreaScroll))}_onSingleTap(t){const{singleTap:{intersect:n},range:o}=this._options.features,s=pe(t);let i;if(n==="native")i=s.target;else if(n==="touch"){this.resolveSelectables();const{x:c,y:r}=s;i=this._selectables.find(a=>{const{right:d,left:h,top:u,bottom:y}=a.getBoundingClientRect();return c<d&&c>h&&r<y&&r>u})}if(!i)return;for(this.resolveSelectables();!this._selectables.includes(i);)if(i.parentElement)i=i.parentElement;else{this._targetBoundaryScrolled||this.clearSelection();return}const{stored:l}=this._selection;if(this._emitEvent("start",t),t.shiftKey&&o&&this._latestElement){const c=this._latestElement,[r,a]=c.compareDocumentPosition(i)&4?[i,c]:[c,i],d=[...this._selectables.filter(h=>h.compareDocumentPosition(r)&4&&h.compareDocumentPosition(a)&2),r,a];this.select(d),this._latestElement=c}else l.includes(i)&&(l.length===1||t.ctrlKey||l.every(c=>this._selection.stored.includes(c)))?this.deselect(i):(this.select(i),this._latestElement=i)}_delayedTapMove(t){const{container:n,document:o,behaviour:{startThreshold:s}}=this._options,{x1:i,y1:l}=this._areaLocation,{x:c,y:r}=pe(t);if(typeof s=="number"&&V(c+r-(i+l))>=s||typeof s=="object"&&V(c-i)>=s.x||V(r-l)>=s.y){if(j(o,["mousemove","touchmove"],this._delayedTapMove,{passive:!1}),this._emitEvent("beforedrag",t)===!1){j(o,["mouseup","touchcancel","touchend"],this._onTapStop);return}X(o,["mousemove","touchmove"],this._onTapMove,{passive:!1}),W(this._area,"display","block"),ee(n,o)[0].appendChild(this._clippingElement),this.resolveSelectables(),this._singleClick=!1,this._targetRect=this._targetElement.getBoundingClientRect(),this._scrollAvailable=this._targetElement.scrollHeight!==this._targetElement.clientHeight||this._targetElement.scrollWidth!==this._targetElement.clientWidth,this._scrollAvailable&&(X(this._targetElement,"wheel",this._wheelScroll,{passive:!1}),X(this._options.document,"keydown",this._keyboardScroll,{passive:!1}),this._selectables=this._selectables.filter(a=>this._targetElement.contains(a))),this._setupSelectionArea(),this._emitEvent("start",t),this._onTapMove(t)}this._handleMoveEvent(t)}_setupSelectionArea(){const{_clippingElement:t,_targetElement:n,_area:o}=this,s=this._targetRect=n.getBoundingClientRect();this._scrollAvailable?(W(t,{top:s.top,left:s.left,width:s.width,height:s.height}),W(o,{marginTop:-s.top,marginLeft:-s.left})):(W(t,{top:0,left:0,width:"100%",height:"100%"}),W(o,{marginTop:0,marginLeft:0}))}_onTapMove(t){const{_scrollSpeed:n,_areaLocation:o,_options:s,_frame:i}=this,{speedDivider:l}=s.behaviour.scrolling;this._targetElement;const{x:c,y:r}=pe(t);if(o.x2=c,o.y2=r,this._lastMousePosition.x=c,this._lastMousePosition.y=r,this._scrollAvailable&&!this._scrollingActive&&(n.y||n.x)){this._scrollingActive=!0;const a=()=>{if(!n.x&&!n.y){this._scrollingActive=!1;return}const d=this._options.mindElixirInstance;if(d&&d.move){const h=n.x?ft(n.x/l):0,u=n.y?ft(n.y/l):0;(h||u)&&(d.move(-h,-u),o.x1-=h,o.y1-=u)}i.next(t),requestAnimationFrame(a)};requestAnimationFrame(a)}else i.next(t);this._handleMoveEvent(t)}_handleMoveEvent(t){const{features:n}=this._options;(n.touch&&On()||this._scrollAvailable&&$n())&&t.preventDefault()}_onScroll(){const{_scrollDelta:t,_options:{document:n}}=this,{scrollTop:o,scrollLeft:s}=n.scrollingElement??n.body;this._areaLocation.x1+=t.x-s,this._areaLocation.y1+=t.y-o,t.x=s,t.y=o,this._setupSelectionArea(),this._frame.next(null)}_onStartAreaScroll(){this._targetBoundaryScrolled=!0,j(this._targetElement,"scroll",this._onStartAreaScroll)}_wheelScroll(t){const{manualSpeed:n}=this._options.behaviour.scrolling,o=t.deltaY?t.deltaY>0?1:-1:0,s=t.deltaX?t.deltaX>0?1:-1:0;this._scrollSpeed.y+=o*n,this._scrollSpeed.x+=s*n,this._onTapMove(t),t.preventDefault()}_keyboardScroll(t){const{manualSpeed:n}=this._options.behaviour.scrolling,o=t.key==="ArrowLeft"?-1:t.key==="ArrowRight"?1:0,s=t.key==="ArrowUp"?-1:t.key==="ArrowDown"?1:0;this._scrollSpeed.x+=Math.sign(o)*n,this._scrollSpeed.y+=Math.sign(s)*n,t.preventDefault(),this._onTapMove({clientX:this._lastMousePosition.x,clientY:this._lastMousePosition.y,preventDefault:()=>{}})}_recalculateSelectionAreaRect(){const{_scrollSpeed:t,_areaLocation:n,_targetElement:o,_options:s}=this,i=this._targetRect,{x1:l,y1:c}=n;let{x2:r,y2:a}=n;const{behaviour:{scrolling:{startScrollMargins:d}}}=s;r<i.left+d.x?(t.x=-V(i.left-r+d.x),r=r<i.left?i.left:r):r>i.right-d.x?(t.x=V(i.left+i.width-r-d.x),r=r>i.right?i.right:r):t.x=0,a<i.top+d.y?(t.y=-V(i.top-a+d.y),a=a<i.top?i.top:a):a>i.bottom-d.y?(t.y=V(i.top+i.height-a-d.y),a=a>i.bottom?i.bottom:a):t.y=0;const h=ht(l,r),u=ht(c,a),y=dt(l,r),v=dt(c,a);this._areaRect=lt(h,u,y-h,v-u)}_redrawSelectionArea(){const{x:t,y:n,width:o,height:s}=this._areaRect,{style:i}=this._area;i.left=`${t}px`,i.top=`${n}px`,i.width=`${o}px`,i.height=`${s}px`}_onTapStop(t,n){const{document:o,features:s}=this._options,{_singleClick:i}=this;j(this._targetElement,"scroll",this._onStartAreaScroll),j(o,["mousemove","touchmove"],this._delayedTapMove),j(o,["touchmove","mousemove"],this._onTapMove),j(o,["mouseup","touchcancel","touchend"],this._onTapStop),j(o,"scroll",this._onScroll),this._keepSelection(),t&&i&&s.singleTap.allow?this._onSingleTap(t):!i&&!n&&(this._updateElementSelection(),this._emitEvent("stop",t)),this._scrollSpeed.x=0,this._scrollSpeed.y=0,j(this._targetElement,"wheel",this._wheelScroll,{passive:!0}),j(this._options.document,"keydown",this._keyboardScroll,{passive:!0}),this._clippingElement.remove(),this._frame?.cancel(),W(this._area,"display","none")}_updateElementSelection(){const{_selectables:t,_options:n,_selection:o,_areaRect:s}=this,{stored:i,selected:l,touched:c}=o,{intersect:r,overlap:a}=n.behaviour,d=a==="invert",h=[],u=[],y=[];for(let p=0;p<t.length;p++){const g=t[p];if(ct(s,g.getBoundingClientRect(),r)){if(l.includes(g))i.includes(g)&&!c.includes(g)&&c.push(g);else if(d&&i.includes(g)){y.push(g);continue}else u.push(g);h.push(g)}}d&&u.push(...i.filter(p=>!l.includes(p)));const v=a==="keep";for(let p=0;p<l.length;p++){const g=l[p];!h.includes(g)&&!(v&&i.includes(g))&&y.push(g)}o.selected=h,o.changed={added:u,removed:y},this._latestElement=void 0}_emitEvent(t,n){return this.emit(t,{event:n,store:this._selection,selection:this})}_keepSelection(){const{_options:t,_selection:n}=this,{selected:o,changed:s,touched:i,stored:l}=n,c=o.filter(r=>!l.includes(r));switch(t.behaviour.overlap){case"drop":{n.stored=[...c,...l.filter(r=>!i.includes(r))];break}case"invert":{n.stored=[...c,...l.filter(r=>!s.removed.includes(r))];break}case"keep":{n.stored=[...l,...o.filter(r=>!l.includes(r))];break}}}trigger(t,n=!0){this._onTapStart(t,n)}resolveSelectables(){this._selectables=ee(this._options.selectables,this._options.document)}clearSelection(t=!0,n=!1){const{selected:o,stored:s,changed:i}=this._selection;i.added=[],i.removed.push(...o,...t?s:[]),n||(this._emitEvent("move",null),this._emitEvent("stop",null)),this._selection=ut(t?[]:s)}getSelection(){return this._selection.stored}getSelectionArea(){return this._area}getSelectables(){return this._selectables}setAreaLocation(t){Object.assign(this._areaLocation,t),this._redrawSelectionArea()}getAreaLocation(){return this._areaLocation}cancel(t=!1){this._onTapStop(null,!t)}destroy(){this.cancel(),this.disable(),this._clippingElement.remove(),super.unbindAllListeners()}enable=this._toggleStartEvents;disable=this._toggleStartEvents.bind(this,!1);select(t,n=!1){const{changed:o,selected:s,stored:i}=this._selection,l=ee(t,this._options.document).filter(c=>!s.includes(c)&&!i.includes(c));return i.push(...l),s.push(...l),o.added.push(...l),o.removed=[],this._latestElement=void 0,n||(this._emitEvent("move",null),this._emitEvent("stop",null)),l}deselect(t,n=!1){const{selected:o,stored:s,changed:i}=this._selection,l=ee(t,this._options.document).filter(c=>o.includes(c)||s.includes(c));this._selection.stored=s.filter(c=>!l.includes(c)),this._selection.selected=o.filter(c=>!l.includes(c)),this._selection.changed.added=[],this._selection.changed.removed.push(...l.filter(c=>!i.removed.includes(c))),this._latestElement=void 0,n||(this._emitEvent("move",null),this._emitEvent("stop",null))}}function Rn(e){const t=e.mouseSelectionButton===2?[2]:[0],n=new jn({selectables:[".map-container me-tpc"],boundaries:[e.container],container:e.selectionContainer,mindElixirInstance:e,features:{touch:!1},behaviour:{triggers:t,scrolling:{speedDivider:10,startScrollMargins:{x:50,y:50}}}}).on("beforestart",({event:o})=>{if(e.spacePressed)return!1;const s=o.target;if(s.id==="input-box"||s.className==="circle"||e.container.querySelector(".context-menu")?.contains(s))return!1;if(!o.ctrlKey&&!o.metaKey){if(s.tagName==="ME-TPC"&&s.classList.contains("selected"))return!1;e.clearSelection()}const i=n.getSelectionArea();return i.style.background="#4f90f22d",i.style.border="1px solid #4f90f2",i.parentElement&&(i.parentElement.style.zIndex="9999"),!0}).on("move",({store:{changed:{added:o,removed:s}}})=>{if(o.length>0||s.length>0,o.length>0){for(const i of o)i.className="selected";e.currentNodes=[...e.currentNodes,...o],e.bus.fire("selectNodes",o.map(i=>i.nodeObj))}if(s.length>0){for(const i of s)i.classList.remove("selected");e.currentNodes=e.currentNodes.filter(i=>!s?.includes(i)),e.bus.fire("unselectNodes",s.map(i=>i.nodeObj))}});e.selection=n}const In=function(e,t=!0){this.theme=e;const o={...(e.type==="dark"?le:re).cssVar,...e.cssVar},s=Object.keys(o);for(let i=0;i<s.length;i++){const l=s[i];this.container.style.setProperty(l,o[l])}t&&this.refresh()},pt={create:function(e){return{dom:e,moved:!1,pointerdown:!1,lastX:0,lastY:0,handlePointerMove(t){if(this.pointerdown){this.moved=!0;const n=t.clientX-this.lastX,o=t.clientY-this.lastY;this.lastX=t.clientX,this.lastY=t.clientY,this.cb&&this.cb(n,o)}},handlePointerDown(t){t.button===0&&(this.pointerdown=!0,this.lastX=t.clientX,this.lastY=t.clientY,this.dom.setPointerCapture(t.pointerId))},handleClear(t){this.pointerdown=!1,t.pointerId!==void 0&&this.dom.releasePointerCapture(t.pointerId)},cb:null,init(t,n){this.cb=n,this.handleClear=this.handleClear.bind(this),this.handlePointerMove=this.handlePointerMove.bind(this),this.handlePointerDown=this.handlePointerDown.bind(this),this.destroy=Ie([{dom:t,evt:"pointermove",func:this.handlePointerMove},{dom:t,evt:"pointerleave",func:this.handleClear},{dom:t,evt:"pointerup",func:this.handleClear},{dom:this.dom,evt:"pointerdown",func:this.handlePointerDown}])},destroy:null,clear(){this.moved=!1,this.pointerdown=!1}}}},Bn="#4dc4ff";function gt(e,t,n,o,s,i,l,c){return{x:e/8+n*3/8+s*3/8+l/8,y:t/8+o*3/8+i*3/8+c/8}}function Fn(e,t,n){e&&(e.dataset.x=t.toString(),e.dataset.y=n.toString(),ue(e))}function ge(e,t,n,o,s){A(e,{x1:t+"",y1:n+"",x2:o+"",y2:s+""})}function mt(e,t,n,o,s,i,l,c,r,a){const d=`M ${t} ${n} C ${o} ${s} ${i} ${l} ${c} ${r}`;if(e.line.setAttribute("d",d),a.style){const p=a.style;p.stroke&&e.line.setAttribute("stroke",p.stroke),p.strokeWidth&&e.line.setAttribute("stroke-width",String(p.strokeWidth)),p.strokeDasharray&&e.line.setAttribute("stroke-dasharray",p.strokeDasharray),p.strokeLinecap&&e.line.setAttribute("stroke-linecap",p.strokeLinecap),p.opacity!==void 0&&e.line.setAttribute("opacity",String(p.opacity))}const h=e.querySelectorAll('path[stroke="transparent"]');h.length>0&&h[0].setAttribute("d",d);const u=ae(i,l,c,r);if(u){const p=`M ${u.x1} ${u.y1} L ${c} ${r} L ${u.x2} ${u.y2}`;if(e.arrow1.setAttribute("d",p),h.length>1&&h[1].setAttribute("d",p),a.style){const g=a.style;g.stroke&&e.arrow1.setAttribute("stroke",g.stroke),g.strokeWidth&&e.arrow1.setAttribute("stroke-width",String(g.strokeWidth)),g.strokeLinecap&&e.arrow1.setAttribute("stroke-linecap",g.strokeLinecap),g.opacity!==void 0&&e.arrow1.setAttribute("opacity",String(g.opacity))}}if(a.bidirectional){const p=ae(o,s,t,n);if(p){const g=`M ${p.x1} ${p.y1} L ${t} ${n} L ${p.x2} ${p.y2}`;if(e.arrow2.setAttribute("d",g),h.length>2&&h[2].setAttribute("d",g),a.style){const m=a.style;m.stroke&&e.arrow2.setAttribute("stroke",m.stroke),m.strokeWidth&&e.arrow2.setAttribute("stroke-width",String(m.strokeWidth)),m.strokeLinecap&&e.arrow2.setAttribute("stroke-linecap",m.strokeLinecap),m.opacity!==void 0&&e.arrow2.setAttribute("opacity",String(m.opacity))}}}const{x:y,y:v}=gt(t,n,o,s,i,l,c,r);if(e.labelEl&&Fn(e.labelEl,y,v),a.style?.labelColor){const p=e.labelEl;p&&(p.style.color=a.style.labelColor)}Un(e)}function me(e,t,n){const{offsetLeft:o,offsetTop:s}=H(e.nodes,t),i=t.offsetWidth,l=t.offsetHeight,c=o+i/2,r=s+l/2,a=c+n.x,d=r+n.y;return{w:i,h:l,cx:c,cy:r,ctrlX:a,ctrlY:d}}function te(e){let t,n;const o=(e.cy-e.ctrlY)/(e.ctrlX-e.cx);return o>e.h/e.w||o<-e.h/e.w?e.cy-e.ctrlY<0?(t=e.cx-e.h/2/o,n=e.cy+e.h/2):(t=e.cx+e.h/2/o,n=e.cy-e.h/2):e.cx-e.ctrlX<0?(t=e.cx+e.w/2,n=e.cy-e.w*o/2):(t=e.cx-e.w/2,n=e.cy+e.w*o/2),{x:t,y:n}}const Yn=function(e,t,n){const o=H(e.nodes,t),s=H(e.nodes,n),i=o.offsetLeft+t.offsetWidth/2,l=o.offsetTop+t.offsetHeight/2,c=s.offsetLeft+n.offsetWidth/2,r=s.offsetTop+n.offsetHeight/2,a=c-i,d=r-l,h=Math.sqrt(a*a+d*d),u=Math.max(50,Math.min(200,h*.3)),y=Math.abs(a),v=Math.abs(d);let p,g;if(h<150){const b=t.closest("me-main").className==="lhs"?-1:1;p={x:200*b,y:0},g={x:200*b,y:0}}else if(y>v*1.5){const b=a>0?t.offsetWidth/2:-t.offsetWidth/2,x=a>0?-n.offsetWidth/2:n.offsetWidth/2;p={x:b+(a>0?u:-u),y:0},g={x:x+(a>0?-u:u),y:0}}else if(v>y*1.5){const b=d>0?t.offsetHeight/2:-t.offsetHeight/2,x=d>0?-n.offsetHeight/2:n.offsetHeight/2;p={x:0,y:b+(d>0?u:-u)},g={x:0,y:x+(d>0?-u:u)}}else{const b=Math.atan2(d,a),x=t.offsetWidth/2*Math.cos(b),L=t.offsetHeight/2*Math.sin(b),k=-(n.offsetWidth/2)*Math.cos(b),E=-(n.offsetHeight/2)*Math.sin(b),C=u*.7*(a>0?1:-1),S=u*.7*(d>0?1:-1);p={x:x+C,y:L+S},g={x:k-C,y:E-S}}return{delta1:p,delta2:g}},He=function(e,t,n,o,s){if(!t||!n)return;if(!o.delta1||!o.delta2){const N=Yn(e,t,n);o.delta1=N.delta1,o.delta2=N.delta2}const i=me(e,t,o.delta1),l=me(e,n,o.delta2),{x:c,y:r}=te(i),{ctrlX:a,ctrlY:d}=i,{ctrlX:h,ctrlY:u}=l,{x:y,y:v}=te(l),p=ae(h,u,y,v);if(!p)return;const g=`M ${p.x1} ${p.y1} L ${y} ${v} L ${p.x2} ${p.y2}`;let m="";if(o.bidirectional){const N=ae(a,d,c,r);if(!N)return;m=`M ${N.x1} ${N.y1} L ${c} ${r} L ${N.x2} ${N.y2}`}const b=En(`M ${c} ${r} C ${a} ${d} ${h} ${u} ${y} ${v}`,g,m,o.style),{x,y:L}=gt(c,r,a,d,h,u,y,v),k=o.style?.labelColor||"rgb(235, 95, 82)",E="arrow-"+o.id;b.id=E;const C=e.markdown?e.markdown(o.label,o):o.label,S=Oe(C,x,L,{anchor:"middle",color:k,dataType:"arrow",svgId:E});b.labelEl=S,b.arrowObj=o,b.dataset.linkid=o.id,e.labelContainer.appendChild(S),e.linkSvgGroup.appendChild(b),ue(S),s||(e.arrows.push(o),e.currentArrow=b,yt(e,o,i,l))},Wn=function(e,t,n={}){const o={id:q(),label:"Custom Link",from:e.nodeObj.id,to:t.nodeObj.id,...n};He(this,e,t,o),this.bus.fire("operation",{name:"createArrow",obj:o})},Xn=function(e){ye(this);const t={...e,id:q()};He(this,this.findEle(t.from),this.findEle(t.to),t),this.bus.fire("operation",{name:"createArrow",obj:t})},zn=function(e){let t;if(e?t=e:t=this.currentArrow,!t)return;ye(this);const n=t.arrowObj.id;this.arrows=this.arrows.filter(o=>o.id!==n),t.labelEl?.remove(),t.remove(),this.bus.fire("operation",{name:"removeArrow",obj:{id:n}})},Gn=function(e){this.currentArrow=e;const t=e.arrowObj,n=this.findEle(t.from),o=this.findEle(t.to),s=me(this,n,t.delta1),i=me(this,o,t.delta2);yt(this,t,s,i)},qn=function(){ye(this),this.currentArrow=null},je=function(e,t){const n=document.createElementNS(B,"path");return A(n,{d:e,stroke:t,fill:"none","stroke-width":"6","stroke-linecap":"round","stroke-linejoin":"round"}),n},Kn=function(e,t){const n=document.createElementNS(B,"g");n.setAttribute("class","arrow-highlight"),n.setAttribute("opacity","0.45");const o=je(e.line.getAttribute("d"),t);n.appendChild(o);const s=je(e.arrow1.getAttribute("d"),t);if(n.appendChild(s),e.arrow2.getAttribute("d")){const i=je(e.arrow2.getAttribute("d"),t);n.appendChild(i)}e.insertBefore(n,e.firstChild)},Vn=function(e){const t=e.querySelector(".arrow-highlight");t&&t.remove()},Un=function(e){const t=e.querySelector(".arrow-highlight");if(!t)return;const n=t.querySelectorAll("path");n.length>=1&&n[0].setAttribute("d",e.line.getAttribute("d")),n.length>=2&&n[1].setAttribute("d",e.arrow1.getAttribute("d")),n.length>=3&&e.arrow2.getAttribute("d")&&n[2].setAttribute("d",e.arrow2.getAttribute("d"))},ye=function(e){e.helper1?.destroy(),e.helper2?.destroy(),e.linkController.style.display="none",e.P2.style.display="none",e.P3.style.display="none",e.currentArrow&&Vn(e.currentArrow)},yt=function(e,t,n,o){const{linkController:s,P2:i,P3:l,line1:c,line2:r,nodes:a,map:d,currentArrow:h,bus:u}=e;if(!h)return;s.style.display="initial",i.style.display="initial",l.style.display="initial",a.appendChild(s),a.appendChild(i),a.appendChild(l),Kn(h,Bn);let{x:y,y:v}=te(n),{ctrlX:p,ctrlY:g}=n,{ctrlX:m,ctrlY:b}=o,{x,y:L}=te(o);i.style.cssText=`top:${g}px;left:${p}px;`,l.style.cssText=`top:${b}px;left:${m}px;`,ge(c,y,v,p,g),ge(r,m,b,x,L),e.helper1=pt.create(i),e.helper2=pt.create(l),e.helper1.init(d,(k,E)=>{p=p+k/e.scaleVal,g=g+E/e.scaleVal;const C=te({...n,ctrlX:p,ctrlY:g});y=C.x,v=C.y,i.style.top=g+"px",i.style.left=p+"px",mt(h,y,v,p,g,m,b,x,L,t),ge(c,y,v,p,g),t.delta1.x=p-n.cx,t.delta1.y=g-n.cy,u.fire("updateArrowDelta",t)}),e.helper2.init(d,(k,E)=>{m=m+k/e.scaleVal,b=b+E/e.scaleVal;const C=te({...o,ctrlX:m,ctrlY:b});x=C.x,L=C.y,l.style.top=b+"px",l.style.left=m+"px",mt(h,y,v,p,g,m,b,x,L,t),ge(r,m,b,x,L),t.delta2.x=m-o.cx,t.delta2.y=b-o.cy,u.fire("updateArrowDelta",t)})};function Jn(){this.linkSvgGroup.innerHTML="",this.labelContainer.querySelectorAll('.svg-label[data-type="arrow"]').forEach(t=>t.remove());for(let t=0;t<this.arrows.length;t++){const n=this.arrows[t];try{He(this,this.findEle(n.from),this.findEle(n.to),n,!0)}catch{}}this.nodes.appendChild(this.linkSvgGroup)}function Zn(e){ye(this),e&&e.labelEl&&nt(this,e.labelEl,e.arrowObj)}function Qn(){this.arrows=this.arrows.filter(e=>ce(e.from,this.nodeData)&&ce(e.to,this.nodeData))}const eo=Object.freeze(Object.defineProperty({__proto__:null,createArrow:Wn,createArrowFrom:Xn,editArrowLabel:Zn,removeArrow:zn,renderArrow:Jn,selectArrow:Gn,tidyArrow:Qn,unselectArrow:qn},Symbol.toStringTag,{value:"Module"})),to=function(e){if(e.length===0)throw new Error("No selected node.");if(e.length===1){const r=e[0].nodeObj,a=e[0].nodeObj.parent;if(!a)throw new Error("Can not select root node.");const d=a.children.findIndex(h=>r===h);return{parent:a.id,start:d,end:d}}let t=0;const n=e.map(r=>{let a=r.nodeObj;const d=[];for(;a.parent;){const h=a.parent,y=h.children?.indexOf(a);a=h,d.unshift({node:a,index:y})}return d.length>t&&(t=d.length),d});let o=0;e:for(;o<t;o++){const r=n[0][o]?.node;for(let a=1;a<n.length;a++)if(n[a][o]?.node!==r)break e}if(!o)throw new Error("Can not select root node.");const s=n.map(r=>r[o-1].index).sort(),i=s[0]||0,l=s[s.length-1]||0,c=n[0][o-1].node;if(!c.parent)throw new Error("Please select nodes in the same main topic.");return{parent:c.id,start:i,end:l}},no=function(e){const t=document.createElementNS(B,"g");return t.setAttribute("id",e),t},vt=function(e,t){const n=document.createElementNS(B,"path");return A(n,{d:e,stroke:t||"#666",fill:"none","stroke-linecap":"round","stroke-width":"2"}),n},oo=e=>e.parentElement.parentElement,so=function(e,{parent:t,start:n}){const o=e.findEle(t),s=o.nodeObj;let i;return s.parent?i=o.closest("me-main").className:i=e.findEle(s.children[n].id).closest("me-main").className,i},Re=function(e,t){const{id:n,label:o,parent:s,start:i,end:l,style:c}=t,{nodes:r,theme:a,summarySvg:d}=e,u=e.findEle(s).nodeObj,y=so(e,t);let v=1/0,p=0,g=0,m=0;for(let f=i;f<=l;f++){const w=u.children?.[f];if(!w)return e.removeSummary(n),null;const T=oo(e.findEle(w.id)),{offsetLeft:$,offsetTop:z}=H(r,T),D=i===l?10:20;f===i&&(g=z+D),f===l&&(m=z+T.offsetHeight-D),$<v&&(v=$),T.offsetWidth+$>p&&(p=T.offsetWidth+$)}let b,x;const L=u.parent?10:0,k=g+L,E=m+L,C=(k+E)/2,S=c?.stroke||a.cssVar["--color"],N=c?.labelColor||a.cssVar["--color"],O="s-"+n,_=e.markdown?e.markdown(o,t):o;y===I.LHS?(b=vt(`M ${v+10} ${k} c -5 0 -10 5 -10 10 L ${v} ${E-10} c 0 5 5 10 10 10 M ${v} ${C} h -10`,S),x=Oe(_,v-20,C,{anchor:"end",color:N,dataType:"summary",svgId:O})):(b=vt(`M ${p-10} ${k} c 5 0 10 5 10 10 L ${p} ${E-10} c 0 5 -5 10 -10 10 M ${p} ${C} h 10`,S),x=Oe(_,p+20,C,{anchor:"start",color:N,dataType:"summary",svgId:O}));const F=no(O);return F.appendChild(b),e.labelContainer.appendChild(x),ue(x),F.summaryObj=t,F.labelEl=x,d.appendChild(F),F},io=Object.freeze(Object.defineProperty({__proto__:null,createSummary:function(e={}){if(!this.currentNodes)return;const{currentNodes:t,summaries:n,bus:o}=this,{parent:s,start:i,end:l}=to(t),c={id:q(),parent:s,start:i,end:l,label:"summary",style:e.style},r=Re(this,c);n.push(c),this.editSummary(r),o.fire("operation",{name:"createSummary",obj:c})},createSummaryFrom:function(e){const t=q(),n={...e,id:t};Re(this,n),this.summaries.push(n),this.bus.fire("operation",{name:"createSummary",obj:n})},editSummary:function(e){e&&e.labelEl&&nt(this,e.labelEl,e.summaryObj)},removeSummary:function(e){const t=this.summaries.findIndex(n=>n.id===e);t>-1&&(this.summaries.splice(t,1),this.nodes.querySelector("#s-"+e)?.remove(),this.nodes.querySelector("#label-s-"+e)?.remove()),this.bus.fire("operation",{name:"removeSummary",obj:{id:e}})},renderSummary:function(){this.summarySvg.innerHTML="",this.summaries.forEach(e=>{try{Re(this,e)}catch{}}),this.nodes.insertAdjacentElement("beforeend",this.summarySvg)},selectSummary:function(e){const t=e.labelEl;t&&t.classList.add("selected"),this.currentSummary=e},unselectSummary:function(){this.currentSummary?.labelEl?.classList.remove("selected"),this.currentSummary=null}},Symbol.toStringTag,{value:"Module"})),P="http://www.w3.org/2000/svg";function ro(e,t){const n=document.createElementNS(P,"svg");return A(n,{version:"1.1",xmlns:P,height:e,width:t}),n}function lo(e,t){return(parseInt(e)-parseInt(t))/2}function co(e,t,n,o){const s=document.createElementNS(P,"g");let i="";return e.text?i=e.text.textContent:i=e.childNodes[0].textContent,i.split(`
16
- `).forEach((c,r)=>{const a=document.createElementNS(P,"text");A(a,{x:n+parseInt(t.paddingLeft)+"",y:o+parseInt(t.paddingTop)+lo(t.lineHeight,t.fontSize)*(r+1)+parseFloat(t.fontSize)*(r+1)+"","text-anchor":"start","font-family":t.fontFamily,"font-size":`${t.fontSize}`,"font-weight":`${t.fontWeight}`,fill:`${t.color}`}),a.innerHTML=c,s.appendChild(a)}),s}function ao(e,t,n,o){let s="";e.nodeObj?.dangerouslySetInnerHTML?s=e.nodeObj.dangerouslySetInnerHTML:e.text?s=e.text.textContent:s=e.childNodes[0].textContent;const i=document.createElementNS(P,"foreignObject");A(i,{x:n+parseInt(t.paddingLeft)+"",y:o+parseInt(t.paddingTop)+"",width:t.width,height:t.height});const l=document.createElement("div");return A(l,{xmlns:"http://www.w3.org/1999/xhtml",style:`font-family: ${t.fontFamily}; font-size: ${t.fontSize}; font-weight: ${t.fontWeight}; color: ${t.color}; white-space: pre-wrap;`}),l.innerHTML=s,i.appendChild(l),i}function ho(e,t){const n=getComputedStyle(t),{offsetLeft:o,offsetTop:s}=H(e.nodes,t),i=document.createElementNS(P,"rect");return A(i,{x:o+"",y:s+"",rx:n.borderRadius,ry:n.borderRadius,width:n.width,height:n.height,fill:n.backgroundColor,stroke:n.borderColor,"stroke-width":n.borderWidth}),i}function ve(e,t,n=!1){const o=getComputedStyle(t),{offsetLeft:s,offsetTop:i}=H(e.nodes,t),l=document.createElementNS(P,"rect");A(l,{x:s+"",y:i+"",rx:o.borderRadius,ry:o.borderRadius,width:o.width,height:o.height,fill:o.backgroundColor,stroke:o.borderColor,"stroke-width":o.borderWidth});const c=document.createElementNS(P,"g");c.appendChild(l);let r;return n?r=ao(t,o,s,i):r=co(t,o,s,i),c.appendChild(r),c}function fo(e,t){const n=getComputedStyle(t),{offsetLeft:o,offsetTop:s}=H(e.nodes,t),i=document.createElementNS(P,"a"),l=document.createElementNS(P,"text");return A(l,{x:o+"",y:s+parseInt(n.fontSize)+"","text-anchor":"start","font-family":n.fontFamily,"font-size":`${n.fontSize}`,"font-weight":`${n.fontWeight}`,fill:`${n.color}`}),l.innerHTML=t.textContent,i.appendChild(l),i.setAttribute("href",t.href),i}function uo(e,t){const n=getComputedStyle(t),{offsetLeft:o,offsetTop:s}=H(e.nodes,t),i=document.createElementNS(P,"image");return A(i,{x:o+"",y:s+"",width:n.width+"",height:n.height+"",href:t.src}),i}const be=100,po='<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">',go=(e,t=!1)=>{const n=e.nodes,o=n.offsetHeight+be*2,s=n.offsetWidth+be*2,i=ro(o+"px",s+"px"),l=document.createElementNS(P,"svg"),c=document.createElementNS(P,"rect");A(c,{x:"0",y:"0",width:`${s}`,height:`${o}`,fill:e.theme.cssVar["--bgcolor"]}),i.appendChild(c),n.querySelectorAll(".subLines").forEach(h=>{const u=h.cloneNode(!0),{offsetLeft:y,offsetTop:v}=H(n,h.parentElement);u.setAttribute("x",`${y}`),u.setAttribute("y",`${v}`),l.appendChild(u)});const r=n.querySelector(".lines")?.cloneNode(!0);r&&l.appendChild(r);const a=n.querySelector(".topiclinks")?.cloneNode(!0);a&&l.appendChild(a);const d=n.querySelector(".summary")?.cloneNode(!0);return d&&l.appendChild(d),n.querySelectorAll("me-tpc").forEach(h=>{h.nodeObj.dangerouslySetInnerHTML?l.appendChild(ve(e,h,!t)):(l.appendChild(ho(e,h)),l.appendChild(ve(e,h.text,!t)))}),n.querySelectorAll(".tags > span").forEach(h=>{l.appendChild(ve(e,h))}),n.querySelectorAll(".icons > span").forEach(h=>{l.appendChild(ve(e,h))}),n.querySelectorAll(".hyper-link").forEach(h=>{l.appendChild(fo(e,h))}),n.querySelectorAll("img").forEach(h=>{l.appendChild(uo(e,h))}),A(l,{x:be+"",y:be+"",overflow:"visible"}),i.appendChild(l),i},mo=(e,t)=>(t&&e.insertAdjacentHTML("afterbegin","<style>"+t+"</style>"),po+e.outerHTML);function yo(e){return new Promise((t,n)=>{const o=new FileReader;o.onload=s=>{t(s.target.result)},o.onerror=s=>{n(s)},o.readAsDataURL(e)})}const vo=Object.freeze(Object.defineProperty({__proto__:null,exportPng:async function(e=!1,t){const n=this.exportSvg(e,t),o=await yo(n);return new Promise((s,i)=>{const l=new Image;l.setAttribute("crossOrigin","anonymous"),l.onload=()=>{const c=document.createElement("canvas");c.width=l.width,c.height=l.height,c.getContext("2d").drawImage(l,0,0),c.toBlob(s,"image/png",1)},l.src=o,l.onerror=i})},exportSvg:function(e=!1,t){const n=go(this,e),o=mo(n,t);return new Blob([o],{type:"image/svg+xml"})}},Symbol.toStringTag,{value:"Module"}));function bo(e,t){return async function(...n){const o=this.before[t];o&&!await o.apply(this,n)||e.apply(this,n)}}const bt=Object.keys(Ge),wt={};for(let e=0;e<bt.length;e++){const t=bt[e];wt[t]=bo(Ge[t],t)}const wo={getObjById:ce,generateNewObj:xt,layout:Ct,linkDiv:Sn,editTopic:Lt,createWrapper:Nt,createParent:Tt,createChildren:kt,createTopic:_t,findEle:Fe,changeTheme:In,...rn,...wt,...eo,...io,...vo,init(e){if(e=JSON.parse(JSON.stringify(e)),!e||!e.nodeData)return new Error("MindElixir: `data` is required");e.direction!==void 0&&(this.direction=e.direction),this.changeTheme(e.theme||this.theme,!1),this.nodeData=e.nodeData,G(this.nodeData),this.arrows=e.arrows||[],this.summaries=e.summaries||[],this.tidyArrow(),this.toolBar&&Dn(this),this.keypress&&fn(this,this.keypress),this.editable&&(Rn(this),this.disposable.push(wn())),this.contextMenu&&this.disposable.push(Nn(this,this.contextMenu)),this.allowUndo&&this.disposable.push(kn(this)),this.layout(),this.linkDiv(),this.toCenter()},destroy(){this.disposable.forEach(e=>e()),this.el&&(this.el.innerHTML=""),this.el=void 0,this.nodeData=void 0,this.arrows=void 0,this.summaries=void 0,this.currentArrow=void 0,this.currentNodes=void 0,this.currentSummary=void 0,this.theme=void 0,this.direction=void 0,this.bus=void 0,this.container=void 0,this.map=void 0,this.lines=void 0,this.linkController=void 0,this.linkSvgGroup=void 0,this.P2=void 0,this.P3=void 0,this.line1=void 0,this.line2=void 0,this.nodes=void 0,this.selection?.destroy(),this.selection=void 0}};function xo({pT:e,pL:t,pW:n,pH:o,cT:s,cL:i,cW:l,cH:c,direction:r,containerHeight:a}){let d=t+n/2;const h=e+o/2;let u;r===I.LHS?u=i+l:u=i;const y=s+c/2,p=(1-Math.abs(y-h)/a)*.25*(n/2);return r===I.LHS?d=d-n/10-p:d=d+n/10+p,`M ${d} ${h} Q ${d} ${y} ${u} ${y}`}function Co({pT:e,pL:t,pW:n,pH:o,cT:s,cL:i,cW:l,cH:c,direction:r,isFirst:a}){const d=parseInt(this.container.style.getPropertyValue("--node-gap-x"));let h=0,u=0;a?h=e+o/2:h=e+o;const y=s+c;let v=0,p=0,g=0;const m=Math.abs(h-y)/300*d;return r===I.LHS?(g=t,v=g+d,p=g-d,u=i+d,`M ${v} ${h} C ${g} ${h} ${g+m} ${y} ${p} ${y} H ${u}`):(g=t+n,v=g-d,p=g+d,u=i+l-d,`M ${v} ${h} C ${g} ${h} ${g-m} ${y} ${p} ${y} H ${u}`)}const Eo="5.7.1";function So(e){return{x:0,y:0,moved:!1,mousedown:!1,onMove(t,n){this.mousedown&&(this.moved=!0,e.move(t,n))},clear(){this.mousedown=!1}}}const ne=document;function R({el:e,direction:t,locale:n,editable:o,contextMenu:s,toolBar:i,keypress:l,mouseSelectionButton:c,selectionContainer:r,before:a,newTopicName:d,allowUndo:h,generateMainBranch:u,generateSubBranch:y,overflowHidden:v,theme:p,alignment:g,scaleSensitivity:m,scaleMax:b,scaleMin:x,handleWheel:L,markdown:k,imageProxy:E,pasteHandler:C}){let S=null;const N=Object.prototype.toString.call(e);if(N==="[object HTMLDivElement]"?S=e:N==="[object String]"&&(S=document.querySelector(e)),!S)throw new Error("MindElixir: el is not a valid element");S.style.position="relative",S.innerHTML="",this.el=S,this.disposable=[],this.before=a||{},this.locale=n||"en",this.newTopicName=d||"New Node",this.contextMenu=s??!0,this.toolBar=i??!0,this.keypress=l??!0,this.mouseSelectionButton=c??0,this.direction=t??1,this.editable=o??!0,this.allowUndo=h??!0,this.scaleSensitivity=m??.1,this.scaleMax=b??1.4,this.scaleMin=x??.2,this.generateMainBranch=u||xo,this.generateSubBranch=y||Co,this.overflowHidden=v??!1,this.alignment=g??"root",this.handleWheel=L??!0,this.markdown=k||void 0,this.imageProxy=E||void 0,this.currentNodes=[],this.currentArrow=null,this.scaleVal=1,this.tempDirection=null,this.dragMoveHelper=So(this),this.bus=Cn(),this.container=ne.createElement("div"),this.selectionContainer=r||this.container,this.container.className="map-container";const O=window.matchMedia("(prefers-color-scheme: dark)");this.theme=p||(O.matches?le:re);const _=ne.createElement("div");_.className="map-canvas",this.map=_,this.container.setAttribute("tabindex","0"),this.container.appendChild(this.map),this.el.appendChild(this.container),this.nodes=ne.createElement("me-nodes"),this.lines=se("lines"),this.summarySvg=se("summary"),this.linkController=se("linkcontroller"),this.P2=ne.createElement("div"),this.P3=ne.createElement("div"),this.P2.className=this.P3.className="circle",this.P2.style.display=this.P3.style.display="none",this.line1=tt(),this.line2=tt(),this.linkController.appendChild(this.line1),this.linkController.appendChild(this.line2),this.linkSvgGroup=se("topiclinks"),this.labelContainer=ne.createElement("div"),this.labelContainer.className="label-container",this.map.appendChild(this.nodes),this.overflowHidden?this.container.style.overflow="hidden":this.disposable.push(xn(this)),C&&(this.pasteHandler=C)}return R.prototype=wo,Object.defineProperty(R.prototype,"currentNode",{get(){return this.currentNodes[this.currentNodes.length-1]},enumerable:!0}),R.LEFT=0,R.RIGHT=1,R.SIDE=2,R.THEME=re,R.DARK_THEME=le,R.version=Eo,R.E=Fe,R.new=e=>({nodeData:{id:q(),topic:e||"new topic",children:[]}}),Y.DARK_THEME=le,Y.LEFT=0,Y.RIGHT=1,Y.SIDE=2,Y.THEME=re,Y.default=R,Object.defineProperties(Y,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),Y})({});
16
+ `).forEach((c,r)=>{const a=document.createElementNS(P,"text");A(a,{x:n+parseInt(t.paddingLeft)+"",y:o+parseInt(t.paddingTop)+lo(t.lineHeight,t.fontSize)*(r+1)+parseFloat(t.fontSize)*(r+1)+"","text-anchor":"start","font-family":t.fontFamily,"font-size":`${t.fontSize}`,"font-weight":`${t.fontWeight}`,fill:`${t.color}`}),a.innerHTML=c,s.appendChild(a)}),s}function ao(e,t,n,o){let s="";e.nodeObj?.dangerouslySetInnerHTML?s=e.nodeObj.dangerouslySetInnerHTML:e.text?s=e.text.textContent:s=e.childNodes[0].textContent;const i=document.createElementNS(P,"foreignObject");A(i,{x:n+parseInt(t.paddingLeft)+"",y:o+parseInt(t.paddingTop)+"",width:t.width,height:t.height});const l=document.createElement("div");return A(l,{xmlns:"http://www.w3.org/1999/xhtml",style:`font-family: ${t.fontFamily}; font-size: ${t.fontSize}; font-weight: ${t.fontWeight}; color: ${t.color}; white-space: pre-wrap;`}),l.innerHTML=s,i.appendChild(l),i}function ho(e,t){const n=getComputedStyle(t),{offsetLeft:o,offsetTop:s}=H(e.nodes,t),i=document.createElementNS(P,"rect");return A(i,{x:o+"",y:s+"",rx:n.borderRadius,ry:n.borderRadius,width:n.width,height:n.height,fill:n.backgroundColor,stroke:n.borderColor,"stroke-width":n.borderWidth}),i}function ve(e,t,n=!1){const o=getComputedStyle(t),{offsetLeft:s,offsetTop:i}=H(e.nodes,t),l=document.createElementNS(P,"rect");A(l,{x:s+"",y:i+"",rx:o.borderRadius,ry:o.borderRadius,width:o.width,height:o.height,fill:o.backgroundColor,stroke:o.borderColor,"stroke-width":o.borderWidth});const c=document.createElementNS(P,"g");c.appendChild(l);let r;return n?r=ao(t,o,s,i):r=co(t,o,s,i),c.appendChild(r),c}function fo(e,t){const n=getComputedStyle(t),{offsetLeft:o,offsetTop:s}=H(e.nodes,t),i=document.createElementNS(P,"a"),l=document.createElementNS(P,"text");return A(l,{x:o+"",y:s+parseInt(n.fontSize)+"","text-anchor":"start","font-family":n.fontFamily,"font-size":`${n.fontSize}`,"font-weight":`${n.fontWeight}`,fill:`${n.color}`}),l.innerHTML=t.textContent,i.appendChild(l),i.setAttribute("href",t.href),i}function uo(e,t){const n=getComputedStyle(t),{offsetLeft:o,offsetTop:s}=H(e.nodes,t),i=document.createElementNS(P,"image");return A(i,{x:o+"",y:s+"",width:n.width+"",height:n.height+"",href:t.src}),i}const be=100,po='<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">',go=(e,t=!1)=>{const n=e.nodes,o=n.offsetHeight+be*2,s=n.offsetWidth+be*2,i=ro(o+"px",s+"px"),l=document.createElementNS(P,"svg"),c=document.createElementNS(P,"rect");A(c,{x:"0",y:"0",width:`${s}`,height:`${o}`,fill:e.theme.cssVar["--bgcolor"]}),i.appendChild(c),n.querySelectorAll(".subLines").forEach(h=>{const u=h.cloneNode(!0),{offsetLeft:y,offsetTop:v}=H(n,h.parentElement);u.setAttribute("x",`${y}`),u.setAttribute("y",`${v}`),l.appendChild(u)});const r=n.querySelector(".lines")?.cloneNode(!0);r&&l.appendChild(r);const a=n.querySelector(".topiclinks")?.cloneNode(!0);a&&l.appendChild(a);const d=n.querySelector(".summary")?.cloneNode(!0);return d&&l.appendChild(d),n.querySelectorAll("me-tpc").forEach(h=>{h.nodeObj.dangerouslySetInnerHTML?l.appendChild(ve(e,h,!t)):(l.appendChild(ho(e,h)),l.appendChild(ve(e,h.text,!t)))}),n.querySelectorAll(".tags > span").forEach(h=>{l.appendChild(ve(e,h))}),n.querySelectorAll(".icons > span").forEach(h=>{l.appendChild(ve(e,h))}),n.querySelectorAll(".hyper-link").forEach(h=>{l.appendChild(fo(e,h))}),n.querySelectorAll("img").forEach(h=>{l.appendChild(uo(e,h))}),A(l,{x:be+"",y:be+"",overflow:"visible"}),i.appendChild(l),i},mo=(e,t)=>(t&&e.insertAdjacentHTML("afterbegin","<style>"+t+"</style>"),po+e.outerHTML);function yo(e){return new Promise((t,n)=>{const o=new FileReader;o.onload=s=>{t(s.target.result)},o.onerror=s=>{n(s)},o.readAsDataURL(e)})}const vo=Object.freeze(Object.defineProperty({__proto__:null,exportPng:async function(e=!1,t){const n=this.exportSvg(e,t),o=await yo(n);return new Promise((s,i)=>{const l=new Image;l.setAttribute("crossOrigin","anonymous"),l.onload=()=>{const c=document.createElement("canvas");c.width=l.width,c.height=l.height,c.getContext("2d").drawImage(l,0,0),c.toBlob(s,"image/png",1)},l.src=o,l.onerror=i})},exportSvg:function(e=!1,t){const n=go(this,e),o=mo(n,t);return new Blob([o],{type:"image/svg+xml"})}},Symbol.toStringTag,{value:"Module"}));function bo(e,t){return async function(...n){const o=this.before[t];o&&!await o.apply(this,n)||e.apply(this,n)}}const bt=Object.keys(Ge),wt={};for(let e=0;e<bt.length;e++){const t=bt[e];wt[t]=bo(Ge[t],t)}const wo={getObjById:ce,generateNewObj:xt,layout:Ct,linkDiv:Sn,editTopic:Lt,createWrapper:Nt,createParent:Tt,createChildren:kt,createTopic:_t,findEle:Fe,changeTheme:In,...rn,...wt,...eo,...io,...vo,init(e){if(e=JSON.parse(JSON.stringify(e)),!e||!e.nodeData)return new Error("MindElixir: `data` is required");e.direction!==void 0&&(this.direction=e.direction),this.changeTheme(e.theme||this.theme,!1),this.nodeData=e.nodeData,G(this.nodeData),this.arrows=e.arrows||[],this.summaries=e.summaries||[],this.tidyArrow(),this.toolBar&&Dn(this),this.keypress&&fn(this,this.keypress),this.editable&&(Rn(this),this.disposable.push(wn())),this.contextMenu&&this.disposable.push(Nn(this,this.contextMenu)),this.allowUndo&&this.disposable.push(kn(this)),this.layout(),this.linkDiv(),this.toCenter()},destroy(){this.disposable.forEach(e=>e()),this.el&&(this.el.innerHTML=""),this.el=void 0,this.nodeData=void 0,this.arrows=void 0,this.summaries=void 0,this.currentArrow=void 0,this.currentNodes=void 0,this.currentSummary=void 0,this.theme=void 0,this.direction=void 0,this.bus=void 0,this.container=void 0,this.map=void 0,this.lines=void 0,this.linkController=void 0,this.linkSvgGroup=void 0,this.P2=void 0,this.P3=void 0,this.line1=void 0,this.line2=void 0,this.nodes=void 0,this.selection?.destroy(),this.selection=void 0}};function xo({pT:e,pL:t,pW:n,pH:o,cT:s,cL:i,cW:l,cH:c,direction:r,containerHeight:a}){let d=t+n/2;const h=e+o/2;let u;r===I.LHS?u=i+l:u=i;const y=s+c/2,p=(1-Math.abs(y-h)/a)*.25*(n/2);return r===I.LHS?d=d-n/10-p:d=d+n/10+p,`M ${d} ${h} Q ${d} ${y} ${u} ${y}`}function Co({pT:e,pL:t,pW:n,pH:o,cT:s,cL:i,cW:l,cH:c,direction:r,isFirst:a}){const d=parseInt(this.container.style.getPropertyValue("--node-gap-x"));let h=0,u=0;a?h=e+o/2:h=e+o;const y=s+c;let v=0,p=0,g=0;const m=Math.abs(h-y)/300*d;return r===I.LHS?(g=t,v=g+d,p=g-d,u=i+d,`M ${v} ${h} C ${g} ${h} ${g+m} ${y} ${p} ${y} H ${u}`):(g=t+n,v=g-d,p=g+d,u=i+l-d,`M ${v} ${h} C ${g} ${h} ${g-m} ${y} ${p} ${y} H ${u}`)}const Eo="5.8.0";function So(e){return{x:0,y:0,moved:!1,mousedown:!1,onMove(t,n){this.mousedown&&(this.moved=!0,e.move(t,n))},clear(){this.mousedown=!1}}}const ne=document;function R({el:e,direction:t,locale:n,editable:o,contextMenu:s,toolBar:i,keypress:l,mouseSelectionButton:c,selectionContainer:r,before:a,newTopicName:d,allowUndo:h,generateMainBranch:u,generateSubBranch:y,overflowHidden:v,theme:p,alignment:g,scaleSensitivity:m,scaleMax:b,scaleMin:x,handleWheel:L,markdown:k,imageProxy:E,pasteHandler:C}){let S=null;const N=Object.prototype.toString.call(e);if(N==="[object HTMLDivElement]"?S=e:N==="[object String]"&&(S=document.querySelector(e)),!S)throw new Error("MindElixir: el is not a valid element");S.style.position="relative",S.innerHTML="",this.el=S,this.disposable=[],this.before=a||{},this.locale=n||"en",this.newTopicName=d||"New Node",this.contextMenu=s??!0,this.toolBar=i??!0,this.keypress=l??!0,this.mouseSelectionButton=c??0,this.direction=t??1,this.editable=o??!0,this.allowUndo=h??!0,this.scaleSensitivity=m??.1,this.scaleMax=b??1.4,this.scaleMin=x??.2,this.generateMainBranch=u||xo,this.generateSubBranch=y||Co,this.overflowHidden=v??!1,this.alignment=g??"root",this.handleWheel=L??!0,this.markdown=k||void 0,this.imageProxy=E||void 0,this.currentNodes=[],this.currentArrow=null,this.scaleVal=1,this.tempDirection=null,this.dragMoveHelper=So(this),this.bus=Cn(),this.container=ne.createElement("div"),this.selectionContainer=r||this.container,this.container.className="map-container";const O=window.matchMedia("(prefers-color-scheme: dark)");this.theme=p||(O.matches?le:re);const _=ne.createElement("div");_.className="map-canvas",this.map=_,this.container.setAttribute("tabindex","0"),this.container.appendChild(this.map),this.el.appendChild(this.container),this.nodes=ne.createElement("me-nodes"),this.lines=se("lines"),this.summarySvg=se("summary"),this.linkController=se("linkcontroller"),this.P2=ne.createElement("div"),this.P3=ne.createElement("div"),this.P2.className=this.P3.className="circle",this.P2.style.display=this.P3.style.display="none",this.line1=tt(),this.line2=tt(),this.linkController.appendChild(this.line1),this.linkController.appendChild(this.line2),this.linkSvgGroup=se("topiclinks"),this.labelContainer=ne.createElement("div"),this.labelContainer.className="label-container",this.map.appendChild(this.nodes),this.overflowHidden?this.container.style.overflow="hidden":this.disposable.push(xn(this)),C&&(this.pasteHandler=C)}return R.prototype=wo,Object.defineProperty(R.prototype,"currentNode",{get(){return this.currentNodes[this.currentNodes.length-1]},enumerable:!0}),R.LEFT=0,R.RIGHT=1,R.SIDE=2,R.THEME=re,R.DARK_THEME=le,R.version=Eo,R.E=Fe,R.new=e=>({nodeData:{id:q(),topic:e||"new topic",children:[]}}),Y.DARK_THEME=le,Y.LEFT=0,Y.RIGHT=1,Y.SIDE=2,Y.THEME=re,Y.default=R,Object.defineProperties(Y,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),Y})({});
@@ -2716,7 +2716,7 @@ function es({ pT: e, pL: t, pW: n, pH: o, cT: s, cL: i, cW: l, cH: c, direction:
2716
2716
  const m = Math.abs(h - y) / 300 * d;
2717
2717
  return r === I.LHS ? (g = t, v = g + d, p = g - d, u = i + d, `M ${v} ${h} C ${g} ${h} ${g + m} ${y} ${p} ${y} H ${u}`) : (g = t + n, v = g - d, p = g + d, u = i + l - d, `M ${v} ${h} C ${g} ${h} ${g - m} ${y} ${p} ${y} H ${u}`);
2718
2718
  }
2719
- const ts = "5.7.1";
2719
+ const ts = "5.8.0";
2720
2720
  function ns(e) {
2721
2721
  return {
2722
2722
  x: 0,
@@ -13,4 +13,4 @@ var MindElixirLite=(function(R){"use strict";const K={name:"Latte",type:"light",
13
13
  top:${e.style.top};
14
14
  max-width: 200px;
15
15
  `,Tt(s),t.scrollIntoView(s),s.addEventListener("keydown",i=>{i.stopPropagation();const r=i.key;if(r==="Enter"||r==="Tab"){if(i.shiftKey)return;i.preventDefault(),s.blur(),t.container.focus()}}),s.addEventListener("blur",()=>{if(!s)return;const i=s.textContent?.trim()||"";i===""?n.label=o:n.label=i,s.remove(),i!==o&&(t.markdown?e.innerHTML=t.markdown(n.label,n):e.textContent=n.label,ot(e),"parent"in n?t.bus.fire("operation",{name:"finishEditSummary",obj:n}):t.bus.fire("operation",{name:"finishEditArrowLabel",obj:n}))})},Ce=function(t){const e=this.map.querySelector("me-root"),n=e.offsetTop,o=e.offsetLeft,s=e.offsetWidth,i=e.offsetHeight,r=this.map.querySelectorAll("me-main > me-wrapper");this.lines.innerHTML="";for(let l=0;l<r.length;l++){const a=r[l],c=a.querySelector("me-tpc"),{offsetLeft:h,offsetTop:f}=I(this.nodes,c),u=c.offsetWidth,y=c.offsetHeight,m=a.parentNode.className,p=this.generateMainBranch({pT:n,pL:o,pW:s,pH:i,cT:f,cL:h,cW:u,cH:y,direction:m,containerHeight:this.nodes.offsetHeight}),g=this.theme.palette,b=c.nodeObj.branchColor||g[l%g.length];if(c.style.borderColor=b,this.lines.appendChild($t(p,b,"3")),t&&t!==a)continue;const w=_("subLines"),x=a.lastChild;x.tagName==="svg"&&x.remove(),a.appendChild(w),Ht(this,w,b,a,m,!0)}this.labelContainer.innerHTML="",this.renderArrow(),this.renderSummary(),this.bus.fire("linkDiv")},Ht=function(t,e,n,o,s,i){const r=o.firstChild,l=o.children[1].children;if(l.length===0)return;const a=r.offsetTop,c=r.offsetLeft,h=r.offsetWidth,f=r.offsetHeight;for(let u=0;u<l.length;u++){const y=l[u],m=y.firstChild,p=m.offsetTop,g=m.offsetLeft,b=m.offsetWidth,w=m.offsetHeight,x=m.firstChild.nodeObj.branchColor||n,S=t.generateSubBranch({pT:a,pL:c,pW:h,pH:f,cT:p,cL:g,cW:b,cH:w,direction:s,isFirst:i});e.appendChild($t(S,x,"2"));const T=m.children[1];if(T){if(!T.expanded)continue}else continue;Ht(t,e,x,y,s)}},Ee={side:'<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169394918" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2021" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M851.91168 328.45312c-59.97056 0-108.6208 48.47104-108.91264 108.36992l-137.92768 38.4a109.14304 109.14304 0 0 0-63.46752-46.58688l1.39264-137.11872c47.29344-11.86816 82.31936-54.66624 82.31936-105.64096 0-60.15488-48.76288-108.91776-108.91776-108.91776s-108.91776 48.76288-108.91776 108.91776c0 49.18784 32.60928 90.75712 77.38368 104.27392l-1.41312 138.87488a109.19936 109.19936 0 0 0-63.50336 48.55808l-138.93632-39.48544 0.01024-0.72704c0-60.15488-48.76288-108.91776-108.91776-108.91776s-108.91776 48.75776-108.91776 108.91776c0 60.15488 48.76288 108.91264 108.91776 108.91264 39.3984 0 73.91232-20.92032 93.03552-52.2496l139.19232 39.552-0.00512 0.2304c0 25.8304 9.00096 49.5616 24.02816 68.23424l-90.14272 132.63872a108.7488 108.7488 0 0 0-34.2528-5.504c-60.15488 0-108.91776 48.768-108.91776 108.91776 0 60.16 48.76288 108.91776 108.91776 108.91776 60.16 0 108.92288-48.75776 108.92288-108.91776 0-27.14624-9.9328-51.968-26.36288-71.04l89.04704-131.03104a108.544 108.544 0 0 0 37.6832 6.70208 108.672 108.672 0 0 0 36.48512-6.272l93.13792 132.57216a108.48256 108.48256 0 0 0-24.69888 69.0688c0 60.16 48.768 108.92288 108.91776 108.92288 60.16 0 108.91776-48.76288 108.91776-108.92288 0-60.14976-48.75776-108.91776-108.91776-108.91776a108.80512 108.80512 0 0 0-36.69504 6.3488l-93.07136-132.48a108.48768 108.48768 0 0 0 24.79616-72.22784l136.09984-37.888c18.99008 31.93856 53.84192 53.3504 93.69088 53.3504 60.16 0 108.92288-48.75776 108.92288-108.91264-0.00512-60.15488-48.77312-108.92288-108.92288-108.92288z" p-id="2022"></path></svg>',left:'<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169375313" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1775" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M639 463.30000001L639 285.1c0-36.90000001-26.4-68.5-61.3-68.5l-150.2 0c-1.5 0-3 0.1-4.5 0.3-10.2-38.7-45.5-67.3-87.5-67.3-50 0-90.5 40.5-90.5 90.5s40.5 90.5 90.5 90.5c42 0 77.3-28.6 87.5-67.39999999 1.4 0.3 2.9 0.4 4.5 0.39999999L577.7 263.6c6.8 0 14.3 8.9 14.3 21.49999999l0 427.00000001c0 12.7-7.40000001 21.5-14.30000001 21.5l-150.19999999 0c-1.5 0-3 0.2-4.5 0.4-10.2-38.8-45.5-67.3-87.5-67.3-50 0-90.5 40.5-90.5 90.4 0 49.9 40.5 90.6 90.5 90.59999999 42 0 77.3-28.6 87.5-67.39999999 1.4 0.2 2.9 0.4 4.49999999 0.4L577.7 780.7c34.80000001 0 61.3-31.6 61.3-68.50000001L639 510.3l79.1 0c10.4 38.5 45.49999999 67 87.4 67 50 0 90.5-40.5 90.5-90.5s-40.5-90.5-90.5-90.5c-41.79999999 0-77.00000001 28.4-87.4 67L639 463.30000001z" fill="currentColor" p-id="1776"></path></svg>',right:'<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169667709" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3037" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M385 560.69999999L385 738.9c0 36.90000001 26.4 68.5 61.3 68.5l150.2 0c1.5 0 3-0.1 4.5-0.3 10.2 38.7 45.5 67.3 87.5 67.3 50 0 90.5-40.5 90.5-90.5s-40.5-90.5-90.5-90.5c-42 0-77.3 28.6-87.5 67.39999999-1.4-0.3-2.9-0.4-4.5-0.39999999L446.3 760.4c-6.8 0-14.3-8.9-14.3-21.49999999l0-427.00000001c0-12.7 7.40000001-21.5 14.30000001-21.5l150.19999999 0c1.5 0 3-0.2 4.5-0.4 10.2 38.8 45.5 67.3 87.5 67.3 50 0 90.5-40.5 90.5-90.4 0-49.9-40.5-90.6-90.5-90.59999999-42 0-77.3 28.6-87.5 67.39999999-1.4-0.2-2.9-0.4-4.49999999-0.4L446.3 243.3c-34.80000001 0-61.3 31.6-61.3 68.50000001L385 513.7l-79.1 0c-10.4-38.5-45.49999999-67-87.4-67-50 0-90.5 40.5-90.5 90.5s40.5 90.5 90.5 90.5c41.79999999 0 77.00000001-28.4 87.4-67L385 560.69999999z" fill="currentColor" p-id="3038"></path></svg>',full:'<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169402629" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2170" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M639.328 416c8.032 0 16.096-3.008 22.304-9.056l202.624-197.184-0.8 143.808c-0.096 17.696 14.144 32.096 31.808 32.192 0.064 0 0.128 0 0.192 0 17.6 0 31.904-14.208 32-31.808l1.248-222.208c0-0.672-0.352-1.248-0.384-1.92 0.032-0.512 0.288-0.896 0.288-1.408 0.032-17.664-14.272-32-31.968-32.032L671.552 96l-0.032 0c-17.664 0-31.968 14.304-32 31.968C639.488 145.632 653.824 160 671.488 160l151.872 0.224-206.368 200.8c-12.672 12.32-12.928 32.608-0.64 45.248C622.656 412.736 630.976 416 639.328 416z" p-id="2171"></path><path d="M896.032 639.552 896.032 639.552c-17.696 0-32 14.304-32.032 31.968l-0.224 151.872-200.832-206.4c-12.32-12.64-32.576-12.96-45.248-0.64-12.672 12.352-12.928 32.608-0.64 45.248l197.184 202.624-143.808-0.8c-0.064 0-0.128 0-0.192 0-17.6 0-31.904 14.208-32 31.808-0.096 17.696 14.144 32.096 31.808 32.192l222.24 1.248c0.064 0 0.128 0 0.192 0 0.64 0 1.12-0.32 1.76-0.352 0.512 0.032 0.896 0.288 1.408 0.288l0.032 0c17.664 0 31.968-14.304 32-31.968L928 671.584C928.032 653.952 913.728 639.584 896.032 639.552z" p-id="2172"></path><path d="M209.76 159.744l143.808 0.8c0.064 0 0.128 0 0.192 0 17.6 0 31.904-14.208 32-31.808 0.096-17.696-14.144-32.096-31.808-32.192L131.68 95.328c-0.064 0-0.128 0-0.192 0-0.672 0-1.248 0.352-1.888 0.384-0.448 0-0.8-0.256-1.248-0.256 0 0-0.032 0-0.032 0-17.664 0-31.968 14.304-32 31.968L96 352.448c-0.032 17.664 14.272 32 31.968 32.032 0 0 0.032 0 0.032 0 17.664 0 31.968-14.304 32-31.968l0.224-151.936 200.832 206.4c6.272 6.464 14.624 9.696 22.944 9.696 8.032 0 16.096-3.008 22.304-9.056 12.672-12.32 12.96-32.608 0.64-45.248L209.76 159.744z" p-id="2173"></path><path d="M362.368 617.056l-202.624 197.184 0.8-143.808c0.096-17.696-14.144-32.096-31.808-32.192-0.064 0-0.128 0-0.192 0-17.6 0-31.904 14.208-32 31.808l-1.248 222.24c0 0.704 0.352 1.312 0.384 2.016 0 0.448-0.256 0.832-0.256 1.312-0.032 17.664 14.272 32 31.968 32.032L352.448 928c0 0 0.032 0 0.032 0 17.664 0 31.968-14.304 32-31.968s-14.272-32-31.968-32.032l-151.936-0.224 206.4-200.832c12.672-12.352 12.96-32.608 0.64-45.248S375.008 604.704 362.368 617.056z" p-id="2174"></path></svg>',living:'<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169573443" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2883" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M514.133333 488.533333m-106.666666 0a106.666667 106.666667 0 1 0 213.333333 0 106.666667 106.666667 0 1 0-213.333333 0Z" fill="currentColor" p-id="2884"></path><path d="M512 64C264.533333 64 64 264.533333 64 512c0 236.8 183.466667 428.8 416 445.866667v-134.4c-53.333333-59.733333-200.533333-230.4-200.533333-334.933334 0-130.133333 104.533333-234.666667 234.666666-234.666666s234.666667 104.533333 234.666667 234.666666c0 61.866667-49.066667 153.6-145.066667 270.933334l-59.733333 68.266666V960C776.533333 942.933333 960 748.8 960 512c0-247.466667-200.533333-448-448-448z" fill="currentColor" p-id="2885"></path></svg>',zoomin:'<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169419447" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2480" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M863.328 482.56l-317.344-1.12L545.984 162.816c0-17.664-14.336-32-32-32s-32 14.336-32 32l0 318.4L159.616 480.064c-0.032 0-0.064 0-0.096 0-17.632 0-31.936 14.24-32 31.904C127.424 529.632 141.728 544 159.392 544.064l322.592 1.152 0 319.168c0 17.696 14.336 32 32 32s32-14.304 32-32l0-318.944 317.088 1.12c0.064 0 0.096 0 0.128 0 17.632 0 31.936-14.24 32-31.904C895.264 496.992 880.96 482.624 863.328 482.56z" p-id="2481"></path></svg>',zoomout:'<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169426515" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2730" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M863.744 544 163.424 544c-17.664 0-32-14.336-32-32s14.336-32 32-32l700.32 0c17.696 0 32 14.336 32 32S881.44 544 863.744 544z" p-id="2731"></path></svg>'},W=(t,e)=>{const n=document.createElement("span");return n.id=t,n.innerHTML=Ee[e],n};function Se(t){const e=document.createElement("div"),n=W("fullscreen","full"),o=W("toCenter","living"),s=W("zoomout","zoomout"),i=W("zoomin","zoomin");e.appendChild(n),e.appendChild(o),e.appendChild(s),e.appendChild(i),e.className="mind-elixir-toolbar rb";let r=null;const l=()=>{const c=t.container.getBoundingClientRect(),h=ft(t.map.style.transform),f=c.width/2,u=c.height/2,y=(f-h.x)/t.scaleVal,m=(u-h.y)/t.scaleVal;r={containerRect:c,currentTransform:h,mapCenterX:y,mapCenterY:m}},a=()=>{if(r){const c=t.container.getBoundingClientRect(),h=c.width/2,f=c.height/2,u=h-r.mapCenterX*t.scaleVal,y=f-r.mapCenterY*t.scaleVal,m=u-r.currentTransform.x,p=y-r.currentTransform.y;t.move(m,p)}};return t.el.addEventListener("fullscreenchange",a),n.onclick=()=>{l(),document.fullscreenElement!==t.el?t.el.requestFullscreen():document.exitFullscreen()},o.onclick=()=>{t.toCenter()},s.onclick=()=>{t.scale(t.scaleVal-t.scaleSensitivity)},i.onclick=()=>{t.scale(t.scaleVal+t.scaleSensitivity)},e}function Te(t){const e=document.createElement("div"),n=W("tbltl","left"),o=W("tbltr","right"),s=W("tblts","side");return e.appendChild(n),e.appendChild(o),e.appendChild(s),e.className="mind-elixir-toolbar lt",n.onclick=()=>{t.initLeft()},o.onclick=()=>{t.initRight()},s.onclick=()=>{t.initSide()},e}function Le(t){t.container.append(Se(t)),t.container.append(Te(t))}const De=function(t,e=!0){this.theme=t;const o={...(t.type==="dark"?J:K).cssVar,...t.cssVar},s=Object.keys(o);for(let i=0;i<s.length;i++){const r=s[i];this.container.style.setProperty(r,o[r])}e&&this.refresh()},It={create:function(t){return{dom:t,moved:!1,pointerdown:!1,lastX:0,lastY:0,handlePointerMove(e){if(this.pointerdown){this.moved=!0;const n=e.clientX-this.lastX,o=e.clientY-this.lastY;this.lastX=e.clientX,this.lastY=e.clientY,this.cb&&this.cb(n,o)}},handlePointerDown(e){e.button===0&&(this.pointerdown=!0,this.lastX=e.clientX,this.lastY=e.clientY,this.dom.setPointerCapture(e.pointerId))},handleClear(e){this.pointerdown=!1,e.pointerId!==void 0&&this.dom.releasePointerCapture(e.pointerId)},cb:null,init(e,n){this.cb=n,this.handleClear=this.handleClear.bind(this),this.handlePointerMove=this.handlePointerMove.bind(this),this.handlePointerDown=this.handlePointerDown.bind(this),this.destroy=xt([{dom:e,evt:"pointermove",func:this.handlePointerMove},{dom:e,evt:"pointerleave",func:this.handleClear},{dom:e,evt:"pointerup",func:this.handleClear},{dom:this.dom,evt:"pointerdown",func:this.handlePointerDown}])},destroy:null,clear(){this.moved=!1,this.pointerdown=!1}}}},Me="#4dc4ff";function Ot(t,e,n,o,s,i,r,l){return{x:t/8+n*3/8+s*3/8+r/8,y:e/8+o*3/8+i*3/8+l/8}}function ke(t,e,n){t&&(t.dataset.x=e.toString(),t.dataset.y=n.toString(),ot(t))}function st(t,e,n,o,s){k(t,{x1:e+"",y1:n+"",x2:o+"",y2:s+""})}function Yt(t,e,n,o,s,i,r,l,a,c){const h=`M ${e} ${n} C ${o} ${s} ${i} ${r} ${l} ${a}`;if(t.line.setAttribute("d",h),c.style){const p=c.style;p.stroke&&t.line.setAttribute("stroke",p.stroke),p.strokeWidth&&t.line.setAttribute("stroke-width",String(p.strokeWidth)),p.strokeDasharray&&t.line.setAttribute("stroke-dasharray",p.strokeDasharray),p.strokeLinecap&&t.line.setAttribute("stroke-linecap",p.strokeLinecap),p.opacity!==void 0&&t.line.setAttribute("opacity",String(p.opacity))}const f=t.querySelectorAll('path[stroke="transparent"]');f.length>0&&f[0].setAttribute("d",h);const u=Z(i,r,l,a);if(u){const p=`M ${u.x1} ${u.y1} L ${l} ${a} L ${u.x2} ${u.y2}`;if(t.arrow1.setAttribute("d",p),f.length>1&&f[1].setAttribute("d",p),c.style){const g=c.style;g.stroke&&t.arrow1.setAttribute("stroke",g.stroke),g.strokeWidth&&t.arrow1.setAttribute("stroke-width",String(g.strokeWidth)),g.strokeLinecap&&t.arrow1.setAttribute("stroke-linecap",g.strokeLinecap),g.opacity!==void 0&&t.arrow1.setAttribute("opacity",String(g.opacity))}}if(c.bidirectional){const p=Z(o,s,e,n);if(p){const g=`M ${p.x1} ${p.y1} L ${e} ${n} L ${p.x2} ${p.y2}`;if(t.arrow2.setAttribute("d",g),f.length>2&&f[2].setAttribute("d",g),c.style){const b=c.style;b.stroke&&t.arrow2.setAttribute("stroke",b.stroke),b.strokeWidth&&t.arrow2.setAttribute("stroke-width",String(b.strokeWidth)),b.strokeLinecap&&t.arrow2.setAttribute("stroke-linecap",b.strokeLinecap),b.opacity!==void 0&&t.arrow2.setAttribute("opacity",String(b.opacity))}}}const{x:y,y:m}=Ot(e,n,o,s,i,r,l,a);if(t.labelEl&&ke(t.labelEl,y,m),c.style?.labelColor){const p=t.labelEl;p&&(p.style.color=c.style.labelColor)}Re(t)}function it(t,e,n){const{offsetLeft:o,offsetTop:s}=I(t.nodes,e),i=e.offsetWidth,r=e.offsetHeight,l=o+i/2,a=s+r/2,c=l+n.x,h=a+n.y;return{w:i,h:r,cx:l,cy:a,ctrlX:c,ctrlY:h}}function z(t){let e,n;const o=(t.cy-t.ctrlY)/(t.ctrlX-t.cx);return o>t.h/t.w||o<-t.h/t.w?t.cy-t.ctrlY<0?(e=t.cx-t.h/2/o,n=t.cy+t.h/2):(e=t.cx+t.h/2/o,n=t.cy-t.h/2):t.cx-t.ctrlX<0?(e=t.cx+t.w/2,n=t.cy-t.w*o/2):(e=t.cx-t.w/2,n=t.cy+t.w*o/2),{x:e,y:n}}const Ne=function(t,e,n){const o=I(t.nodes,e),s=I(t.nodes,n),i=o.offsetLeft+e.offsetWidth/2,r=o.offsetTop+e.offsetHeight/2,l=s.offsetLeft+n.offsetWidth/2,a=s.offsetTop+n.offsetHeight/2,c=l-i,h=a-r,f=Math.sqrt(c*c+h*h),u=Math.max(50,Math.min(200,f*.3)),y=Math.abs(c),m=Math.abs(h);let p,g;if(f<150){const w=e.closest("me-main").className==="lhs"?-1:1;p={x:200*w,y:0},g={x:200*w,y:0}}else if(y>m*1.5){const w=c>0?e.offsetWidth/2:-e.offsetWidth/2,x=c>0?-n.offsetWidth/2:n.offsetWidth/2;p={x:w+(c>0?u:-u),y:0},g={x:x+(c>0?-u:u),y:0}}else if(m>y*1.5){const w=h>0?e.offsetHeight/2:-e.offsetHeight/2,x=h>0?-n.offsetHeight/2:n.offsetHeight/2;p={x:0,y:w+(h>0?u:-u)},g={x:0,y:x+(h>0?-u:u)}}else{const w=Math.atan2(h,c),x=e.offsetWidth/2*Math.cos(w),S=e.offsetHeight/2*Math.sin(w),T=-(n.offsetWidth/2)*Math.cos(w),M=-(n.offsetHeight/2)*Math.sin(w),E=u*.7*(c>0?1:-1),L=u*.7*(h>0?1:-1);p={x:x+E,y:S+L},g={x:T-E,y:M-L}}return{delta1:p,delta2:g}},yt=function(t,e,n,o,s){if(!e||!n)return;if(!o.delta1||!o.delta2){const N=Ne(t,e,n);o.delta1=N.delta1,o.delta2=N.delta2}const i=it(t,e,o.delta1),r=it(t,n,o.delta2),{x:l,y:a}=z(i),{ctrlX:c,ctrlY:h}=i,{ctrlX:f,ctrlY:u}=r,{x:y,y:m}=z(r),p=Z(f,u,y,m);if(!p)return;const g=`M ${p.x1} ${p.y1} L ${y} ${m} L ${p.x2} ${p.y2}`;let b="";if(o.bidirectional){const N=Z(c,h,l,a);if(!N)return;b=`M ${N.x1} ${N.y1} L ${l} ${a} L ${N.x2} ${N.y2}`}const w=xe(`M ${l} ${a} C ${c} ${h} ${f} ${u} ${y} ${m}`,g,b,o.style),{x,y:S}=Ot(l,a,c,h,f,u,y,m),T=o.style?.labelColor||"rgb(235, 95, 82)",M="arrow-"+o.id;w.id=M;const E=t.markdown?t.markdown(o.label,o):o.label,L=mt(E,x,S,{anchor:"middle",color:T,dataType:"arrow",svgId:M});w.labelEl=L,w.arrowObj=o,w.dataset.linkid=o.id,t.labelContainer.appendChild(L),t.linkSvgGroup.appendChild(w),ot(L),s||(t.arrows.push(o),t.currentArrow=w,Rt(t,o,i,r))},$e=function(t,e,n={}){const o={id:j(),label:"Custom Link",from:t.nodeObj.id,to:e.nodeObj.id,...n};yt(this,t,e,o),this.bus.fire("operation",{name:"createArrow",obj:o})},Ae=function(t){rt(this);const e={...t,id:j()};yt(this,this.findEle(e.from),this.findEle(e.to),e),this.bus.fire("operation",{name:"createArrow",obj:e})},Pe=function(t){let e;if(t?e=t:e=this.currentArrow,!e)return;rt(this);const n=e.arrowObj.id;this.arrows=this.arrows.filter(o=>o.id!==n),e.labelEl?.remove(),e.remove(),this.bus.fire("operation",{name:"removeArrow",obj:{id:n}})},He=function(t){this.currentArrow=t;const e=t.arrowObj,n=this.findEle(e.from),o=this.findEle(e.to),s=it(this,n,e.delta1),i=it(this,o,e.delta2);Rt(this,e,s,i)},Ie=function(){rt(this),this.currentArrow=null},vt=function(t,e){const n=document.createElementNS(O,"path");return k(n,{d:t,stroke:e,fill:"none","stroke-width":"6","stroke-linecap":"round","stroke-linejoin":"round"}),n},Oe=function(t,e){const n=document.createElementNS(O,"g");n.setAttribute("class","arrow-highlight"),n.setAttribute("opacity","0.45");const o=vt(t.line.getAttribute("d"),e);n.appendChild(o);const s=vt(t.arrow1.getAttribute("d"),e);if(n.appendChild(s),t.arrow2.getAttribute("d")){const i=vt(t.arrow2.getAttribute("d"),e);n.appendChild(i)}t.insertBefore(n,t.firstChild)},Ye=function(t){const e=t.querySelector(".arrow-highlight");e&&e.remove()},Re=function(t){const e=t.querySelector(".arrow-highlight");if(!e)return;const n=e.querySelectorAll("path");n.length>=1&&n[0].setAttribute("d",t.line.getAttribute("d")),n.length>=2&&n[1].setAttribute("d",t.arrow1.getAttribute("d")),n.length>=3&&t.arrow2.getAttribute("d")&&n[2].setAttribute("d",t.arrow2.getAttribute("d"))},rt=function(t){t.helper1?.destroy(),t.helper2?.destroy(),t.linkController.style.display="none",t.P2.style.display="none",t.P3.style.display="none",t.currentArrow&&Ye(t.currentArrow)},Rt=function(t,e,n,o){const{linkController:s,P2:i,P3:r,line1:l,line2:a,nodes:c,map:h,currentArrow:f,bus:u}=t;if(!f)return;s.style.display="initial",i.style.display="initial",r.style.display="initial",c.appendChild(s),c.appendChild(i),c.appendChild(r),Oe(f,Me);let{x:y,y:m}=z(n),{ctrlX:p,ctrlY:g}=n,{ctrlX:b,ctrlY:w}=o,{x,y:S}=z(o);i.style.cssText=`top:${g}px;left:${p}px;`,r.style.cssText=`top:${w}px;left:${b}px;`,st(l,y,m,p,g),st(a,b,w,x,S),t.helper1=It.create(i),t.helper2=It.create(r),t.helper1.init(h,(T,M)=>{p=p+T/t.scaleVal,g=g+M/t.scaleVal;const E=z({...n,ctrlX:p,ctrlY:g});y=E.x,m=E.y,i.style.top=g+"px",i.style.left=p+"px",Yt(f,y,m,p,g,b,w,x,S,e),st(l,y,m,p,g),e.delta1.x=p-n.cx,e.delta1.y=g-n.cy,u.fire("updateArrowDelta",e)}),t.helper2.init(h,(T,M)=>{b=b+T/t.scaleVal,w=w+M/t.scaleVal;const E=z({...o,ctrlX:b,ctrlY:w});x=E.x,S=E.y,r.style.top=w+"px",r.style.left=b+"px",Yt(f,y,m,p,g,b,w,x,S,e),st(a,b,w,x,S),e.delta2.x=b-o.cx,e.delta2.y=w-o.cy,u.fire("updateArrowDelta",e)})};function Be(){this.linkSvgGroup.innerHTML="",this.labelContainer.querySelectorAll('.svg-label[data-type="arrow"]').forEach(e=>e.remove());for(let e=0;e<this.arrows.length;e++){const n=this.arrows[e];try{yt(this,this.findEle(n.from),this.findEle(n.to),n,!0)}catch{}}this.nodes.appendChild(this.linkSvgGroup)}function We(t){rt(this),t&&t.labelEl&&Pt(this,t.labelEl,t.arrowObj)}function Xe(){this.arrows=this.arrows.filter(t=>Q(t.from,this.nodeData)&&Q(t.to,this.nodeData))}const Ge=Object.freeze(Object.defineProperty({__proto__:null,createArrow:$e,createArrowFrom:Ae,editArrowLabel:We,removeArrow:Pe,renderArrow:Be,selectArrow:He,tidyArrow:Xe,unselectArrow:Ie},Symbol.toStringTag,{value:"Module"})),Ve=function(t){if(t.length===0)throw new Error("No selected node.");if(t.length===1){const a=t[0].nodeObj,c=t[0].nodeObj.parent;if(!c)throw new Error("Can not select root node.");const h=c.children.findIndex(f=>a===f);return{parent:c.id,start:h,end:h}}let e=0;const n=t.map(a=>{let c=a.nodeObj;const h=[];for(;c.parent;){const f=c.parent,y=f.children?.indexOf(c);c=f,h.unshift({node:c,index:y})}return h.length>e&&(e=h.length),h});let o=0;t:for(;o<e;o++){const a=n[0][o]?.node;for(let c=1;c<n.length;c++)if(n[c][o]?.node!==a)break t}if(!o)throw new Error("Can not select root node.");const s=n.map(a=>a[o-1].index).sort(),i=s[0]||0,r=s[s.length-1]||0,l=n[0][o-1].node;if(!l.parent)throw new Error("Please select nodes in the same main topic.");return{parent:l.id,start:i,end:r}},ze=function(t){const e=document.createElementNS(O,"g");return e.setAttribute("id",t),e},Bt=function(t,e){const n=document.createElementNS(O,"path");return k(n,{d:t,stroke:e||"#666",fill:"none","stroke-linecap":"round","stroke-width":"2"}),n},Fe=t=>t.parentElement.parentElement,qe=function(t,{parent:e,start:n}){const o=t.findEle(e),s=o.nodeObj;let i;return s.parent?i=o.closest("me-main").className:i=t.findEle(s.children[n].id).closest("me-main").className,i},wt=function(t,e){const{id:n,label:o,parent:s,start:i,end:r,style:l}=e,{nodes:a,theme:c,summarySvg:h}=t,u=t.findEle(s).nodeObj,y=qe(t,e);let m=1/0,p=0,g=0,b=0;for(let d=i;d<=r;d++){const v=u.children?.[d];if(!v)return t.removeSummary(n),null;const C=Fe(t.findEle(v.id)),{offsetLeft:H,offsetTop:B}=I(a,C),$=i===r?10:20;d===i&&(g=B+$),d===r&&(b=B+C.offsetHeight-$),H<m&&(m=H),C.offsetWidth+H>p&&(p=C.offsetWidth+H)}let w,x;const S=u.parent?10:0,T=g+S,M=b+S,E=(T+M)/2,L=l?.stroke||c.cssVar["--color"],N=l?.labelColor||c.cssVar["--color"],X="s-"+n,D=t.markdown?t.markdown(o,e):o;y===G.LHS?(w=Bt(`M ${m+10} ${T} c -5 0 -10 5 -10 10 L ${m} ${M-10} c 0 5 5 10 10 10 M ${m} ${E} h -10`,L),x=mt(D,m-20,E,{anchor:"end",color:N,dataType:"summary",svgId:X})):(w=Bt(`M ${p-10} ${T} c 5 0 10 5 10 10 L ${p} ${M-10} c 0 5 -5 10 -10 10 M ${p} ${E} h 10`,L),x=mt(D,p+20,E,{anchor:"start",color:N,dataType:"summary",svgId:X}));const q=ze(X);return q.appendChild(w),t.labelContainer.appendChild(x),ot(x),q.summaryObj=e,q.labelEl=x,h.appendChild(q),q},je=Object.freeze(Object.defineProperty({__proto__:null,createSummary:function(t={}){if(!this.currentNodes)return;const{currentNodes:e,summaries:n,bus:o}=this,{parent:s,start:i,end:r}=Ve(e),l={id:j(),parent:s,start:i,end:r,label:"summary",style:t.style},a=wt(this,l);n.push(l),this.editSummary(a),o.fire("operation",{name:"createSummary",obj:l})},createSummaryFrom:function(t){const e=j(),n={...t,id:e};wt(this,n),this.summaries.push(n),this.bus.fire("operation",{name:"createSummary",obj:n})},editSummary:function(t){t&&t.labelEl&&Pt(this,t.labelEl,t.summaryObj)},removeSummary:function(t){const e=this.summaries.findIndex(n=>n.id===t);e>-1&&(this.summaries.splice(e,1),this.nodes.querySelector("#s-"+t)?.remove(),this.nodes.querySelector("#label-s-"+t)?.remove()),this.bus.fire("operation",{name:"removeSummary",obj:{id:t}})},renderSummary:function(){this.summarySvg.innerHTML="",this.summaries.forEach(t=>{try{wt(this,t)}catch{}}),this.nodes.insertAdjacentElement("beforeend",this.summarySvg)},selectSummary:function(t){const e=t.labelEl;e&&e.classList.add("selected"),this.currentSummary=t},unselectSummary:function(){this.currentSummary?.labelEl?.classList.remove("selected"),this.currentSummary=null}},Symbol.toStringTag,{value:"Module"})),P="http://www.w3.org/2000/svg";function _e(t,e){const n=document.createElementNS(P,"svg");return k(n,{version:"1.1",xmlns:P,height:t,width:e}),n}function Ue(t,e){return(parseInt(t)-parseInt(e))/2}function Ke(t,e,n,o){const s=document.createElementNS(P,"g");let i="";return t.text?i=t.text.textContent:i=t.childNodes[0].textContent,i.split(`
16
- `).forEach((l,a)=>{const c=document.createElementNS(P,"text");k(c,{x:n+parseInt(e.paddingLeft)+"",y:o+parseInt(e.paddingTop)+Ue(e.lineHeight,e.fontSize)*(a+1)+parseFloat(e.fontSize)*(a+1)+"","text-anchor":"start","font-family":e.fontFamily,"font-size":`${e.fontSize}`,"font-weight":`${e.fontWeight}`,fill:`${e.color}`}),c.innerHTML=l,s.appendChild(c)}),s}function Je(t,e,n,o){let s="";t.nodeObj?.dangerouslySetInnerHTML?s=t.nodeObj.dangerouslySetInnerHTML:t.text?s=t.text.textContent:s=t.childNodes[0].textContent;const i=document.createElementNS(P,"foreignObject");k(i,{x:n+parseInt(e.paddingLeft)+"",y:o+parseInt(e.paddingTop)+"",width:e.width,height:e.height});const r=document.createElement("div");return k(r,{xmlns:"http://www.w3.org/1999/xhtml",style:`font-family: ${e.fontFamily}; font-size: ${e.fontSize}; font-weight: ${e.fontWeight}; color: ${e.color}; white-space: pre-wrap;`}),r.innerHTML=s,i.appendChild(r),i}function Qe(t,e){const n=getComputedStyle(e),{offsetLeft:o,offsetTop:s}=I(t.nodes,e),i=document.createElementNS(P,"rect");return k(i,{x:o+"",y:s+"",rx:n.borderRadius,ry:n.borderRadius,width:n.width,height:n.height,fill:n.backgroundColor,stroke:n.borderColor,"stroke-width":n.borderWidth}),i}function lt(t,e,n=!1){const o=getComputedStyle(e),{offsetLeft:s,offsetTop:i}=I(t.nodes,e),r=document.createElementNS(P,"rect");k(r,{x:s+"",y:i+"",rx:o.borderRadius,ry:o.borderRadius,width:o.width,height:o.height,fill:o.backgroundColor,stroke:o.borderColor,"stroke-width":o.borderWidth});const l=document.createElementNS(P,"g");l.appendChild(r);let a;return n?a=Je(e,o,s,i):a=Ke(e,o,s,i),l.appendChild(a),l}function Ze(t,e){const n=getComputedStyle(e),{offsetLeft:o,offsetTop:s}=I(t.nodes,e),i=document.createElementNS(P,"a"),r=document.createElementNS(P,"text");return k(r,{x:o+"",y:s+parseInt(n.fontSize)+"","text-anchor":"start","font-family":n.fontFamily,"font-size":`${n.fontSize}`,"font-weight":`${n.fontWeight}`,fill:`${n.color}`}),r.innerHTML=e.textContent,i.appendChild(r),i.setAttribute("href",e.href),i}function tn(t,e){const n=getComputedStyle(e),{offsetLeft:o,offsetTop:s}=I(t.nodes,e),i=document.createElementNS(P,"image");return k(i,{x:o+"",y:s+"",width:n.width+"",height:n.height+"",href:e.src}),i}const ct=100,en='<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">',nn=(t,e=!1)=>{const n=t.nodes,o=n.offsetHeight+ct*2,s=n.offsetWidth+ct*2,i=_e(o+"px",s+"px"),r=document.createElementNS(P,"svg"),l=document.createElementNS(P,"rect");k(l,{x:"0",y:"0",width:`${s}`,height:`${o}`,fill:t.theme.cssVar["--bgcolor"]}),i.appendChild(l),n.querySelectorAll(".subLines").forEach(f=>{const u=f.cloneNode(!0),{offsetLeft:y,offsetTop:m}=I(n,f.parentElement);u.setAttribute("x",`${y}`),u.setAttribute("y",`${m}`),r.appendChild(u)});const a=n.querySelector(".lines")?.cloneNode(!0);a&&r.appendChild(a);const c=n.querySelector(".topiclinks")?.cloneNode(!0);c&&r.appendChild(c);const h=n.querySelector(".summary")?.cloneNode(!0);return h&&r.appendChild(h),n.querySelectorAll("me-tpc").forEach(f=>{f.nodeObj.dangerouslySetInnerHTML?r.appendChild(lt(t,f,!e)):(r.appendChild(Qe(t,f)),r.appendChild(lt(t,f.text,!e)))}),n.querySelectorAll(".tags > span").forEach(f=>{r.appendChild(lt(t,f))}),n.querySelectorAll(".icons > span").forEach(f=>{r.appendChild(lt(t,f))}),n.querySelectorAll(".hyper-link").forEach(f=>{r.appendChild(Ze(t,f))}),n.querySelectorAll("img").forEach(f=>{r.appendChild(tn(t,f))}),k(r,{x:ct+"",y:ct+"",overflow:"visible"}),i.appendChild(r),i},on=(t,e)=>(e&&t.insertAdjacentHTML("afterbegin","<style>"+e+"</style>"),en+t.outerHTML);function sn(t){return new Promise((e,n)=>{const o=new FileReader;o.onload=s=>{e(s.target.result)},o.onerror=s=>{n(s)},o.readAsDataURL(t)})}const rn={getObjById:Q,generateNewObj:Xt,layout:Gt,linkDiv:Ce,editTopic:Ut,createWrapper:Ft,createParent:qt,createChildren:jt,createTopic:_t,findEle:Et,changeTheme:De,...he,...{},...Ge,...je,...Object.freeze(Object.defineProperty({__proto__:null,exportPng:async function(t=!1,e){const n=this.exportSvg(t,e),o=await sn(n);return new Promise((s,i)=>{const r=new Image;r.setAttribute("crossOrigin","anonymous"),r.onload=()=>{const l=document.createElement("canvas");l.width=r.width,l.height=r.height,l.getContext("2d").drawImage(r,0,0),l.toBlob(s,"image/png",1)},r.src=o,r.onerror=i})},exportSvg:function(t=!1,e){const n=nn(this,t),o=on(n,e);return new Blob([o],{type:"image/svg+xml"})}},Symbol.toStringTag,{value:"Module"})),init(t){if(t=JSON.parse(JSON.stringify(t)),!t||!t.nodeData)return new Error("MindElixir: `data` is required");t.direction!==void 0&&(this.direction=t.direction),this.changeTheme(t.theme||this.theme,!1),this.nodeData=t.nodeData,dt(this.nodeData),this.arrows=t.arrows||[],this.summaries=t.summaries||[],this.tidyArrow(),this.toolBar&&Le(this),this.layout(),this.linkDiv(),this.toCenter()},destroy(){this.disposable.forEach(t=>t()),this.el&&(this.el.innerHTML=""),this.el=void 0,this.nodeData=void 0,this.arrows=void 0,this.summaries=void 0,this.currentArrow=void 0,this.currentNodes=void 0,this.currentSummary=void 0,this.theme=void 0,this.direction=void 0,this.bus=void 0,this.container=void 0,this.map=void 0,this.lines=void 0,this.linkController=void 0,this.linkSvgGroup=void 0,this.P2=void 0,this.P3=void 0,this.line1=void 0,this.line2=void 0,this.nodes=void 0,this.selection?.destroy(),this.selection=void 0}};function ln({pT:t,pL:e,pW:n,pH:o,cT:s,cL:i,cW:r,cH:l,direction:a,containerHeight:c}){let h=e+n/2;const f=t+o/2;let u;a===G.LHS?u=i+r:u=i;const y=s+l/2,p=(1-Math.abs(y-f)/c)*.25*(n/2);return a===G.LHS?h=h-n/10-p:h=h+n/10+p,`M ${h} ${f} Q ${h} ${y} ${u} ${y}`}function cn({pT:t,pL:e,pW:n,pH:o,cT:s,cL:i,cW:r,cH:l,direction:a,isFirst:c}){const h=parseInt(this.container.style.getPropertyValue("--node-gap-x"));let f=0,u=0;c?f=t+o/2:f=t+o;const y=s+l;let m=0,p=0,g=0;const b=Math.abs(f-y)/300*h;return a===G.LHS?(g=e,m=g+h,p=g-h,u=i+h,`M ${m} ${f} C ${g} ${f} ${g+b} ${y} ${p} ${y} H ${u}`):(g=e+n,m=g-h,p=g+h,u=i+r-h,`M ${m} ${f} C ${g} ${f} ${g-b} ${y} ${p} ${y} H ${u}`)}const an="5.7.1";function dn(t){return{x:0,y:0,moved:!1,mousedown:!1,onMove(e,n){this.mousedown&&(this.moved=!0,t.move(e,n))},clear(){this.mousedown=!1}}}const F=document;function Y({el:t,direction:e,locale:n,editable:o,contextMenu:s,toolBar:i,keypress:r,mouseSelectionButton:l,selectionContainer:a,before:c,newTopicName:h,allowUndo:f,generateMainBranch:u,generateSubBranch:y,overflowHidden:m,theme:p,alignment:g,scaleSensitivity:b,scaleMax:w,scaleMin:x,handleWheel:S,markdown:T,imageProxy:M,pasteHandler:E}){let L=null;const N=Object.prototype.toString.call(t);if(N==="[object HTMLDivElement]"?L=t:N==="[object String]"&&(L=document.querySelector(t)),!L)throw new Error("MindElixir: el is not a valid element");L.style.position="relative",L.innerHTML="",this.el=L,this.disposable=[],this.before=c||{},this.locale=n||"en",this.newTopicName=h||"New Node",this.contextMenu=s??!0,this.toolBar=i??!0,this.keypress=r??!0,this.mouseSelectionButton=l??0,this.direction=e??1,this.editable=o??!0,this.allowUndo=f??!0,this.scaleSensitivity=b??.1,this.scaleMax=w??1.4,this.scaleMin=x??.2,this.generateMainBranch=u||ln,this.generateSubBranch=y||cn,this.overflowHidden=m??!1,this.alignment=g??"root",this.handleWheel=S??!0,this.markdown=T||void 0,this.imageProxy=M||void 0,this.currentNodes=[],this.currentArrow=null,this.scaleVal=1,this.tempDirection=null,this.dragMoveHelper=dn(this),this.bus=be(),this.container=F.createElement("div"),this.selectionContainer=a||this.container,this.container.className="map-container";const X=window.matchMedia("(prefers-color-scheme: dark)");this.theme=p||(X.matches?J:K);const D=F.createElement("div");D.className="map-canvas",this.map=D,this.container.setAttribute("tabindex","0"),this.container.appendChild(this.map),this.el.appendChild(this.container),this.nodes=F.createElement("me-nodes"),this.lines=_("lines"),this.summarySvg=_("summary"),this.linkController=_("linkcontroller"),this.P2=F.createElement("div"),this.P3=F.createElement("div"),this.P2.className=this.P3.className="circle",this.P2.style.display=this.P3.style.display="none",this.line1=At(),this.line2=At(),this.linkController.appendChild(this.line1),this.linkController.appendChild(this.line2),this.linkSvgGroup=_("topiclinks"),this.labelContainer=F.createElement("div"),this.labelContainer.className="label-container",this.map.appendChild(this.nodes),this.overflowHidden?this.container.style.overflow="hidden":this.disposable.push(we(this)),E&&(this.pasteHandler=E)}return Y.prototype=rn,Object.defineProperty(Y.prototype,"currentNode",{get(){return this.currentNodes[this.currentNodes.length-1]},enumerable:!0}),Y.LEFT=0,Y.RIGHT=1,Y.SIDE=2,Y.THEME=K,Y.DARK_THEME=J,Y.version=an,Y.E=Et,R.DARK_THEME=J,R.LEFT=0,R.RIGHT=1,R.SIDE=2,R.THEME=K,R.default=Y,Object.defineProperties(R,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),R})({});
16
+ `).forEach((l,a)=>{const c=document.createElementNS(P,"text");k(c,{x:n+parseInt(e.paddingLeft)+"",y:o+parseInt(e.paddingTop)+Ue(e.lineHeight,e.fontSize)*(a+1)+parseFloat(e.fontSize)*(a+1)+"","text-anchor":"start","font-family":e.fontFamily,"font-size":`${e.fontSize}`,"font-weight":`${e.fontWeight}`,fill:`${e.color}`}),c.innerHTML=l,s.appendChild(c)}),s}function Je(t,e,n,o){let s="";t.nodeObj?.dangerouslySetInnerHTML?s=t.nodeObj.dangerouslySetInnerHTML:t.text?s=t.text.textContent:s=t.childNodes[0].textContent;const i=document.createElementNS(P,"foreignObject");k(i,{x:n+parseInt(e.paddingLeft)+"",y:o+parseInt(e.paddingTop)+"",width:e.width,height:e.height});const r=document.createElement("div");return k(r,{xmlns:"http://www.w3.org/1999/xhtml",style:`font-family: ${e.fontFamily}; font-size: ${e.fontSize}; font-weight: ${e.fontWeight}; color: ${e.color}; white-space: pre-wrap;`}),r.innerHTML=s,i.appendChild(r),i}function Qe(t,e){const n=getComputedStyle(e),{offsetLeft:o,offsetTop:s}=I(t.nodes,e),i=document.createElementNS(P,"rect");return k(i,{x:o+"",y:s+"",rx:n.borderRadius,ry:n.borderRadius,width:n.width,height:n.height,fill:n.backgroundColor,stroke:n.borderColor,"stroke-width":n.borderWidth}),i}function lt(t,e,n=!1){const o=getComputedStyle(e),{offsetLeft:s,offsetTop:i}=I(t.nodes,e),r=document.createElementNS(P,"rect");k(r,{x:s+"",y:i+"",rx:o.borderRadius,ry:o.borderRadius,width:o.width,height:o.height,fill:o.backgroundColor,stroke:o.borderColor,"stroke-width":o.borderWidth});const l=document.createElementNS(P,"g");l.appendChild(r);let a;return n?a=Je(e,o,s,i):a=Ke(e,o,s,i),l.appendChild(a),l}function Ze(t,e){const n=getComputedStyle(e),{offsetLeft:o,offsetTop:s}=I(t.nodes,e),i=document.createElementNS(P,"a"),r=document.createElementNS(P,"text");return k(r,{x:o+"",y:s+parseInt(n.fontSize)+"","text-anchor":"start","font-family":n.fontFamily,"font-size":`${n.fontSize}`,"font-weight":`${n.fontWeight}`,fill:`${n.color}`}),r.innerHTML=e.textContent,i.appendChild(r),i.setAttribute("href",e.href),i}function tn(t,e){const n=getComputedStyle(e),{offsetLeft:o,offsetTop:s}=I(t.nodes,e),i=document.createElementNS(P,"image");return k(i,{x:o+"",y:s+"",width:n.width+"",height:n.height+"",href:e.src}),i}const ct=100,en='<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">',nn=(t,e=!1)=>{const n=t.nodes,o=n.offsetHeight+ct*2,s=n.offsetWidth+ct*2,i=_e(o+"px",s+"px"),r=document.createElementNS(P,"svg"),l=document.createElementNS(P,"rect");k(l,{x:"0",y:"0",width:`${s}`,height:`${o}`,fill:t.theme.cssVar["--bgcolor"]}),i.appendChild(l),n.querySelectorAll(".subLines").forEach(f=>{const u=f.cloneNode(!0),{offsetLeft:y,offsetTop:m}=I(n,f.parentElement);u.setAttribute("x",`${y}`),u.setAttribute("y",`${m}`),r.appendChild(u)});const a=n.querySelector(".lines")?.cloneNode(!0);a&&r.appendChild(a);const c=n.querySelector(".topiclinks")?.cloneNode(!0);c&&r.appendChild(c);const h=n.querySelector(".summary")?.cloneNode(!0);return h&&r.appendChild(h),n.querySelectorAll("me-tpc").forEach(f=>{f.nodeObj.dangerouslySetInnerHTML?r.appendChild(lt(t,f,!e)):(r.appendChild(Qe(t,f)),r.appendChild(lt(t,f.text,!e)))}),n.querySelectorAll(".tags > span").forEach(f=>{r.appendChild(lt(t,f))}),n.querySelectorAll(".icons > span").forEach(f=>{r.appendChild(lt(t,f))}),n.querySelectorAll(".hyper-link").forEach(f=>{r.appendChild(Ze(t,f))}),n.querySelectorAll("img").forEach(f=>{r.appendChild(tn(t,f))}),k(r,{x:ct+"",y:ct+"",overflow:"visible"}),i.appendChild(r),i},on=(t,e)=>(e&&t.insertAdjacentHTML("afterbegin","<style>"+e+"</style>"),en+t.outerHTML);function sn(t){return new Promise((e,n)=>{const o=new FileReader;o.onload=s=>{e(s.target.result)},o.onerror=s=>{n(s)},o.readAsDataURL(t)})}const rn={getObjById:Q,generateNewObj:Xt,layout:Gt,linkDiv:Ce,editTopic:Ut,createWrapper:Ft,createParent:qt,createChildren:jt,createTopic:_t,findEle:Et,changeTheme:De,...he,...{},...Ge,...je,...Object.freeze(Object.defineProperty({__proto__:null,exportPng:async function(t=!1,e){const n=this.exportSvg(t,e),o=await sn(n);return new Promise((s,i)=>{const r=new Image;r.setAttribute("crossOrigin","anonymous"),r.onload=()=>{const l=document.createElement("canvas");l.width=r.width,l.height=r.height,l.getContext("2d").drawImage(r,0,0),l.toBlob(s,"image/png",1)},r.src=o,r.onerror=i})},exportSvg:function(t=!1,e){const n=nn(this,t),o=on(n,e);return new Blob([o],{type:"image/svg+xml"})}},Symbol.toStringTag,{value:"Module"})),init(t){if(t=JSON.parse(JSON.stringify(t)),!t||!t.nodeData)return new Error("MindElixir: `data` is required");t.direction!==void 0&&(this.direction=t.direction),this.changeTheme(t.theme||this.theme,!1),this.nodeData=t.nodeData,dt(this.nodeData),this.arrows=t.arrows||[],this.summaries=t.summaries||[],this.tidyArrow(),this.toolBar&&Le(this),this.layout(),this.linkDiv(),this.toCenter()},destroy(){this.disposable.forEach(t=>t()),this.el&&(this.el.innerHTML=""),this.el=void 0,this.nodeData=void 0,this.arrows=void 0,this.summaries=void 0,this.currentArrow=void 0,this.currentNodes=void 0,this.currentSummary=void 0,this.theme=void 0,this.direction=void 0,this.bus=void 0,this.container=void 0,this.map=void 0,this.lines=void 0,this.linkController=void 0,this.linkSvgGroup=void 0,this.P2=void 0,this.P3=void 0,this.line1=void 0,this.line2=void 0,this.nodes=void 0,this.selection?.destroy(),this.selection=void 0}};function ln({pT:t,pL:e,pW:n,pH:o,cT:s,cL:i,cW:r,cH:l,direction:a,containerHeight:c}){let h=e+n/2;const f=t+o/2;let u;a===G.LHS?u=i+r:u=i;const y=s+l/2,p=(1-Math.abs(y-f)/c)*.25*(n/2);return a===G.LHS?h=h-n/10-p:h=h+n/10+p,`M ${h} ${f} Q ${h} ${y} ${u} ${y}`}function cn({pT:t,pL:e,pW:n,pH:o,cT:s,cL:i,cW:r,cH:l,direction:a,isFirst:c}){const h=parseInt(this.container.style.getPropertyValue("--node-gap-x"));let f=0,u=0;c?f=t+o/2:f=t+o;const y=s+l;let m=0,p=0,g=0;const b=Math.abs(f-y)/300*h;return a===G.LHS?(g=e,m=g+h,p=g-h,u=i+h,`M ${m} ${f} C ${g} ${f} ${g+b} ${y} ${p} ${y} H ${u}`):(g=e+n,m=g-h,p=g+h,u=i+r-h,`M ${m} ${f} C ${g} ${f} ${g-b} ${y} ${p} ${y} H ${u}`)}const an="5.8.0";function dn(t){return{x:0,y:0,moved:!1,mousedown:!1,onMove(e,n){this.mousedown&&(this.moved=!0,t.move(e,n))},clear(){this.mousedown=!1}}}const F=document;function Y({el:t,direction:e,locale:n,editable:o,contextMenu:s,toolBar:i,keypress:r,mouseSelectionButton:l,selectionContainer:a,before:c,newTopicName:h,allowUndo:f,generateMainBranch:u,generateSubBranch:y,overflowHidden:m,theme:p,alignment:g,scaleSensitivity:b,scaleMax:w,scaleMin:x,handleWheel:S,markdown:T,imageProxy:M,pasteHandler:E}){let L=null;const N=Object.prototype.toString.call(t);if(N==="[object HTMLDivElement]"?L=t:N==="[object String]"&&(L=document.querySelector(t)),!L)throw new Error("MindElixir: el is not a valid element");L.style.position="relative",L.innerHTML="",this.el=L,this.disposable=[],this.before=c||{},this.locale=n||"en",this.newTopicName=h||"New Node",this.contextMenu=s??!0,this.toolBar=i??!0,this.keypress=r??!0,this.mouseSelectionButton=l??0,this.direction=e??1,this.editable=o??!0,this.allowUndo=f??!0,this.scaleSensitivity=b??.1,this.scaleMax=w??1.4,this.scaleMin=x??.2,this.generateMainBranch=u||ln,this.generateSubBranch=y||cn,this.overflowHidden=m??!1,this.alignment=g??"root",this.handleWheel=S??!0,this.markdown=T||void 0,this.imageProxy=M||void 0,this.currentNodes=[],this.currentArrow=null,this.scaleVal=1,this.tempDirection=null,this.dragMoveHelper=dn(this),this.bus=be(),this.container=F.createElement("div"),this.selectionContainer=a||this.container,this.container.className="map-container";const X=window.matchMedia("(prefers-color-scheme: dark)");this.theme=p||(X.matches?J:K);const D=F.createElement("div");D.className="map-canvas",this.map=D,this.container.setAttribute("tabindex","0"),this.container.appendChild(this.map),this.el.appendChild(this.container),this.nodes=F.createElement("me-nodes"),this.lines=_("lines"),this.summarySvg=_("summary"),this.linkController=_("linkcontroller"),this.P2=F.createElement("div"),this.P3=F.createElement("div"),this.P2.className=this.P3.className="circle",this.P2.style.display=this.P3.style.display="none",this.line1=At(),this.line2=At(),this.linkController.appendChild(this.line1),this.linkController.appendChild(this.line2),this.linkSvgGroup=_("topiclinks"),this.labelContainer=F.createElement("div"),this.labelContainer.className="label-container",this.map.appendChild(this.nodes),this.overflowHidden?this.container.style.overflow="hidden":this.disposable.push(we(this)),E&&(this.pasteHandler=E)}return Y.prototype=rn,Object.defineProperty(Y.prototype,"currentNode",{get(){return this.currentNodes[this.currentNodes.length-1]},enumerable:!0}),Y.LEFT=0,Y.RIGHT=1,Y.SIDE=2,Y.THEME=K,Y.DARK_THEME=J,Y.version=an,Y.E=Et,R.DARK_THEME=J,R.LEFT=0,R.RIGHT=1,R.SIDE=2,R.THEME=K,R.default=Y,Object.defineProperties(R,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),R})({});
@@ -1450,7 +1450,7 @@ function Yn({ pT: t, pL: e, pW: n, pH: o, cT: s, cL: i, cW: r, cH: l, direction:
1450
1450
  const b = Math.abs(f - y) / 300 * h;
1451
1451
  return a === F.LHS ? (g = e, m = g + h, p = g - h, u = i + h, `M ${m} ${f} C ${g} ${f} ${g + b} ${y} ${p} ${y} H ${u}`) : (g = e + n, m = g - h, p = g + h, u = i + r - h, `M ${m} ${f} C ${g} ${f} ${g - b} ${y} ${p} ${y} H ${u}`);
1452
1452
  }
1453
- const Bn = "5.7.1";
1453
+ const Bn = "5.8.0";
1454
1454
  function Rn(t) {
1455
1455
  return {
1456
1456
  x: 0,
@@ -0,0 +1,170 @@
1
+ const M = `- Root Node
2
+ - Child Node 1
3
+ - Child Node 1-1
4
+ - Child Node 1-2
5
+ - Child Node 1-3
6
+ - }:2 Summary of first two nodes
7
+ - Child Node 2
8
+ - Child Node 2-1 [^id1]
9
+ - Child Node 2-2 [^id2]
10
+ - Child Node 2-3 {color: #e87a90}
11
+ - > [^id1] <-Bidirectional Link-> [^id2]
12
+ - Child Node 3
13
+ - Child Node 3-1 [^id3]
14
+ - Child Node 3-2 [^id4]
15
+ - Child Node 3-3 [^id5]
16
+ - > [^id3] >-Unidirectional Link-> [^id4]
17
+ - > [^id3] <-Unidirectional Link-< [^id5]
18
+ - Child Node 4
19
+ - Child Node 4-1 [^id6]
20
+ - Child Node 4-2 [^id7]
21
+ - Child Node 4-3 [^id8]
22
+ - } Summary of all previous nodes
23
+ - Child Node 4-4
24
+ - > [^id1] <-Link position is not restricted, as long as the id can be found during rendering-> [^id8]
25
+ `;
26
+ function L(i) {
27
+ const t = i.split(`
28
+ `).filter((e) => e.trim()), d = {
29
+ arrowLines: [],
30
+ summaryLines: [],
31
+ nodeIdMap: /* @__PURE__ */ new Map()
32
+ }, n = y(t, 0, -2, d);
33
+ if (!n.node)
34
+ throw new Error("Failed to parse plaintext: no root node found");
35
+ const s = d.arrowLines.map(({ content: e }) => C(e, d)).filter((e) => e !== null), o = d.summaryLines.map(({ content: e, parentChildren: r, parentId: a }) => N(e, r, a)).filter((e) => e !== null);
36
+ return {
37
+ nodeData: n.node,
38
+ arrows: s.length > 0 ? s : void 0,
39
+ summaries: o.length > 0 ? o : void 0
40
+ };
41
+ }
42
+ function y(i, t, d, n) {
43
+ if (t >= i.length)
44
+ return { node: null, nextIndex: t };
45
+ const s = i[t], o = I(s);
46
+ if (o <= d)
47
+ return { node: null, nextIndex: t };
48
+ const e = w(s);
49
+ if (e.type === "arrow" || e.type === "summary")
50
+ return { node: null, nextIndex: t + 1 };
51
+ const r = u(), a = {
52
+ topic: e.topic,
53
+ id: r
54
+ };
55
+ e.style && (a.style = e.style), e.refId && n.nodeIdMap.set(e.refId, r);
56
+ const c = [];
57
+ let l = t + 1;
58
+ for (; l < i.length; ) {
59
+ const m = i[l], p = I(m);
60
+ if (p <= o)
61
+ break;
62
+ if (p === o + 2) {
63
+ const f = w(m);
64
+ if (f.type === "arrow")
65
+ n.arrowLines.push({
66
+ content: f.content,
67
+ parentChildren: c
68
+ }), l++;
69
+ else if (f.type === "summary")
70
+ n.summaryLines.push({
71
+ content: f.content,
72
+ parentChildren: c,
73
+ parentId: r
74
+ // Pass parent node ID
75
+ }), l++;
76
+ else {
77
+ const h = y(i, l, o, n);
78
+ h.node && c.push(h.node), l = h.nextIndex;
79
+ }
80
+ } else
81
+ l++;
82
+ }
83
+ return c.length > 0 && (a.children = c), { node: a, nextIndex: l };
84
+ }
85
+ function I(i) {
86
+ const t = i.match(/^(\s*)/);
87
+ return t ? t[1].length : 0;
88
+ }
89
+ function w(i) {
90
+ const d = i.trim().replace(/^-\s*/, "");
91
+ if (d.startsWith(">"))
92
+ return {
93
+ type: "arrow",
94
+ topic: "",
95
+ content: d.substring(1).trim()
96
+ };
97
+ if (d.startsWith("}"))
98
+ return {
99
+ type: "summary",
100
+ topic: "",
101
+ content: d.substring(1).trim()
102
+ };
103
+ let n = d, s, o;
104
+ const e = n.match(/\[\^(\w+)\]/);
105
+ e && (s = e[1], n = n.replace(e[0], "").trim());
106
+ const r = n.match(/\{color:\s*(#[0-9a-fA-F]{6})\}/);
107
+ return r && (o = { color: r[1] }, n = n.replace(r[0], "").trim()), {
108
+ type: "node",
109
+ topic: n,
110
+ content: n,
111
+ refId: s,
112
+ style: o
113
+ };
114
+ }
115
+ function C(i, t) {
116
+ const d = i.match(/\[\^(\w+)\]\s*<-([^-]*)->\s*\[\^(\w+)\]/);
117
+ if (d) {
118
+ const o = d[1], e = d[2].trim(), r = d[3];
119
+ return {
120
+ id: u(),
121
+ label: e,
122
+ from: t.nodeIdMap.get(o) || o,
123
+ to: t.nodeIdMap.get(r) || r,
124
+ bidirectional: !0
125
+ };
126
+ }
127
+ const n = i.match(/\[\^(\w+)\]\s*>-([^-]*)->\s*\[\^(\w+)\]/);
128
+ if (n) {
129
+ const o = n[1], e = n[2].trim(), r = n[3];
130
+ return {
131
+ id: u(),
132
+ label: e,
133
+ from: t.nodeIdMap.get(o) || o,
134
+ to: t.nodeIdMap.get(r) || r
135
+ };
136
+ }
137
+ const s = i.match(/\[\^(\w+)\]\s*<-([^-]*)-<\s*\[\^(\w+)\]/);
138
+ if (s) {
139
+ const o = s[3], e = s[2].trim(), r = s[1];
140
+ return {
141
+ id: u(),
142
+ label: e,
143
+ from: t.nodeIdMap.get(o) || o,
144
+ to: t.nodeIdMap.get(r) || r
145
+ };
146
+ }
147
+ return null;
148
+ }
149
+ function N(i, t, d) {
150
+ const n = i.match(/^:(\d+)\s+(.*)/);
151
+ let s, o;
152
+ if (n ? (s = parseInt(n[1], 10), o = n[2]) : (s = t.length, o = i.trim()), t.length === 0 || s === 0)
153
+ return null;
154
+ const e = t.slice(-s), r = t.indexOf(e[0]), a = t.indexOf(e[e.length - 1]);
155
+ return {
156
+ id: u(),
157
+ label: o,
158
+ parent: d,
159
+ start: r,
160
+ end: a
161
+ };
162
+ }
163
+ let g = 0;
164
+ function u() {
165
+ return `node-${Date.now()}-${g++}`;
166
+ }
167
+ export {
168
+ M as plaintextExample,
169
+ L as plaintextToMindElixir
170
+ };
@@ -1,4 +1,5 @@
1
1
  import type { MindElixirData } from '../types';
2
+ export declare const plaintextExample = "- Root Node\n - Child Node 1\n - Child Node 1-1\n - Child Node 1-2\n - Child Node 1-3\n - }:2 Summary of first two nodes\n - Child Node 2\n - Child Node 2-1 [^id1]\n - Child Node 2-2 [^id2]\n - Child Node 2-3 {color: #e87a90}\n - > [^id1] <-Bidirectional Link-> [^id2]\n - Child Node 3\n - Child Node 3-1 [^id3]\n - Child Node 3-2 [^id4]\n - Child Node 3-3 [^id5]\n - > [^id3] >-Unidirectional Link-> [^id4]\n - > [^id3] <-Unidirectional Link-< [^id5]\n - Child Node 4\n - Child Node 4-1 [^id6]\n - Child Node 4-2 [^id7]\n - Child Node 4-3 [^id8]\n - } Summary of all previous nodes\n - Child Node 4-4\n - > [^id1] <-Link position is not restricted, as long as the id can be found during rendering-> [^id8]\n";
2
3
  /**
3
4
  * Convert plaintext format to MindElixirData
4
5
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mind-elixir",
3
- "version": "5.7.1",
3
+ "version": "5.8.0",
4
4
  "type": "module",
5
5
  "description": "Mind elixir is a free open source mind map core.",
6
6
  "keywords": [
@@ -47,7 +47,11 @@
47
47
  "./readme.md": "./readme.md",
48
48
  "./package.json": "./package.json",
49
49
  "./style": "./dist/MindElixir.css",
50
- "./style.css": "./dist/MindElixir.css"
50
+ "./style.css": "./dist/MindElixir.css",
51
+ "./plaintextConverter": {
52
+ "types": "./dist/types/utils/plaintextConverter.d.ts",
53
+ "import": "./dist/PlaintextConverter.js"
54
+ }
51
55
  },
52
56
  "typesVersions": {
53
57
  "*": {
@@ -105,4 +109,4 @@
105
109
  "vite": "^7.1.7",
106
110
  "vite-plugin-istanbul": "^7.2.0"
107
111
  }
108
- }
112
+ }
@@ -1 +0,0 @@
1
- var LayoutSsr=(function(p){"use strict";const T={LHS:"lhs",RHS:"rhs"},j=s=>`<div class="map-container"><div class="map-canvas">${s}</div></div>`,v=function(s,c={}){const{direction:a=2}=c,o=e=>{const n={id:e.id,topic:e.topic,direction:e.direction,style:e.style,tags:e.tags,icons:e.icons,hyperLink:e.hyperLink,expanded:e.expanded,image:e.image,branchColor:e.branchColor,dangerouslySetInnerHTML:e.dangerouslySetInnerHTML,note:e.note};return e.children&&e.children.length>0&&(n.children=e.children.map(o)),n},u=o(s),g=s.children||[],m=[],f=[];if(a===2){let e=0,n=0;g.forEach(t=>{const l=o(t);t.direction===0?(l.direction=0,m.push(l),e+=1):t.direction===1?(l.direction=1,f.push(l),n+=1):e<=n?(l.direction=0,m.push(l),e+=1):(l.direction=1,f.push(l),n+=1)})}else a===0?g.forEach(e=>{const n=o(e);n.direction=0,m.push(n)}):g.forEach(e=>{const n=o(e);n.direction=1,f.push(n)});return{root:u,leftNodes:m,rightNodes:f,direction:a}},R=function(s,c={}){const{className:a=""}=c,o=(t,l=!1)=>{const M=`me${t.id}`,W="me-tpc";let L="";if(t.style){const r=[];t.style.color&&r.push(`color: ${t.style.color}`),t.style.background&&r.push(`background: ${t.style.background}`),t.style.fontSize&&r.push(`font-size: ${t.style.fontSize}px`),t.style.fontWeight&&r.push(`font-weight: ${t.style.fontWeight}`),r.length>0&&(L=` style="${r.join("; ")}"`)}let h="";if(t.dangerouslySetInnerHTML)h=t.dangerouslySetInnerHTML;else{if(h=$(t.topic),t.tags&&t.tags.length>0){const r=t.tags.map(i=>{if(typeof i=="string")return`<span class="me-tag">${$(i)}</span>`;{let y="me-tag";i.className&&(y+=` ${i.className}`);let S="";if(i.style){const H=Object.entries(i.style).filter(([I,d])=>d!=null&&d!=="").map(([I,d])=>`${I.replace(/([A-Z])/g,"-$1").toLowerCase()}: ${d}`);H.length>0&&(S=` style="${H.join("; ")}"`)}return`<span class="${y}"${S}>${$(i.text)}</span>`}}).join("");h+=r}if(t.icons&&t.icons.length>0){const r=t.icons.map(i=>`<span class="me-icon">${i}</span>`).join("");h+=r}if(t.image){const{url:r,width:i,height:y,fit:S="cover"}=t.image,H=c.imageProxy?c.imageProxy(r):r;h+=`<img src="${$(H)}" width="${i}" height="${y}" style="object-fit: ${S}" alt="" />`}}const N=`<me-tpc class="${W}" data-nodeid="${M}"${L}>${h}</me-tpc>`;if(l)return`<me-root>${N}</me-root>`;let E="";return t.children&&t.children.length>0&&t.expanded!==!1&&(E=`<me-children>${t.children.map(i=>u(i)).join("")}</me-children>`),`<me-wrapper>${`<me-parent>${N}</me-parent>`}${E}</me-wrapper>`},u=t=>o(t,!1),g=o(s.root,!0),m=s.leftNodes.map(t=>u(t)).join(""),f=s.rightNodes.map(t=>u(t)).join(""),e=`<me-main class="${T.LHS}">${m}</me-main>`,n=`<me-main class="${T.RHS}">${f}</me-main>`;return j(`<me-nodes class="${a}">${e}${g}${n}</me-nodes>`)};function $(s){const c=typeof document<"u"?document.createElement("div"):null;return c?(c.textContent=s,c.innerHTML):s.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}const b=function(s){return JSON.stringify(s,null,2)},D=function(s,c,a={}){return{nodeData:s,layoutResult:c,options:{direction:c.direction,...a},timestamp:Date.now()}};return p.getHydrationData=D,p.getSSRData=b,p.layoutSSR=v,p.renderSSRHTML=R,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"}),p})({});
@@ -1,7 +0,0 @@
1
- var example=(function(){"use strict";return{nodeData:{id:"me-root",topic:"Mind Elixir",tags:["Mind Map Core"],children:[{topic:"logo2",id:"56dae51a90d350a8",direction:0,expanded:!0,children:[{id:"use-image",topic:"mind-elixir",image:{url:"https://raw.githubusercontent.com/ssshooter/mind-elixir-core/master/images/logo2.png",height:100,width:90,fit:"contain"}}]},{topic:"What is Mind Elixir",id:"bd4313fbac40284b",direction:0,expanded:!0,children:[{topic:"A mind map core",id:"beeb823afd6d2114"},{topic:"Free",id:"c1f068377de9f3a0"},{topic:"Open-Source",id:"c1f06d38a09f23ca"},{topic:"Framework agnostic",id:"c1f06e4cbcf16463",expanded:!0,children:[{topic:"Use without JavaScript framework",id:"c1f06e4cbcf16464"},{topic:"Pluginable",id:"c1f06e4cbcf16465"}]},{topic:"Use in your own project",id:"c1f1f11a7fbf7550",children:[{topic:"import MindElixir from 'mind-elixir'",id:"c1f1e245b0a89f9b"},{topic:"new MindElixir({...}).init(data)",id:"c1f1ebc7072c8928"}]},{topic:"Key Features",id:"c1f0723c07b408d7",expanded:!0,children:[{topic:"Fluent UX",id:"c1f09612fd89920d"},{topic:"Well designed",id:"c1f09612fd89920e"},{topic:"Mobile friendly",id:"c1f09612fd89920f"},{topic:"Lightweight & High performance",id:"c1f09612fd899210"}]}]},{topic:"Efficient Shortcuts",id:"bd1b66c4b56754d9",direction:0,expanded:!0,children:[{topic:"Tab - Create a child node",id:"bd1b6892bcab126a"},{topic:"Enter - Create a sibling node",id:"bd1b6b632a434b27"},{topic:"F1 - Center the Map",id:"bd1b983085187c0a"},{topic:"F2 - Begin Editing",id:"bd1b983085187c0b"},{topic:"Ctrl + C/V - Copy/Paste",id:"bd1b983085187c0c"},{topic:"Ctrl + +/- - Zoom In/Out",id:"bd1b983085187c0d"}]},{topic:"Advanced Features",id:"bd1b66c4b56754da",direction:0,expanded:!0,children:[{topic:"Bulk operations supported",id:"bd1b6892bcab126b",tags:["New"]},{topic:"Undo / Redo",id:"bd1b6b632a434b28",tags:["New"]},{topic:"Summarize nodes",id:"bd1b983085187c0e"},{topic:"Easily Styling with CSS variables",id:"bd1b983085187c0f",tags:["New"]}]},{topic:"Focus mode",id:"bd1b9b94a9a7a913",direction:1,expanded:!0,children:[{topic:"Right click and select Focus Mode",id:"bd1bb2ac4bbab458"},{topic:"Right click and select Cancel Focus Mode",id:"bd1bb4b14d6697c3"}]},{topic:"Left menu",id:"bd1b9d1816ede134",direction:0,expanded:!0,children:[{topic:"Node distribution",id:"bd1ba11e620c3c1a",expanded:!0,children:[{topic:"Left",id:"bd1c1cb51e6745d3"},{topic:"Right",id:"bd1c1e12fd603ff6"},{topic:"Both l & r",id:"bd1c1f03def5c97b"}]}]},{topic:"Bottom menu",id:"bd1ba66996df4ba4",direction:1,expanded:!0,children:[{topic:"Full screen",id:"bd1ba81d9bc95a7e"},{topic:"Return to Center",id:"bd1babdd5c18a7a2"},{topic:"Zoom in",id:"bd1bae68e0ab186e"},{topic:"Zoom out",id:"bd1bb06377439977"}]},{topic:"Link",id:"bd1beff607711025",direction:0,expanded:!0,children:[{topic:"Right click and select Link",id:"bd1bf320da90046a"},{topic:"Click the target you want to link",id:"bd1bf6f94ff2e642"},{topic:"Modify link with control points",id:"bd1c0c4a487bd036"},{topic:"Bidirectional link is",id:"4da8dbbc7b71be99"},{topic:"Also available.",id:"4da8ded27033a710"}]},{topic:"Node style",id:"bd1c217f9d0b20bd",direction:0,expanded:!0,children:[{topic:"Font Size",id:"bd1c24420cd2c2f5",style:{fontSize:"32px",color:"#3298db"}},{topic:"Font Color",id:"bd1c2a59b9a2739c",style:{color:"#c0392c"}},{topic:"Background Color",id:"bd1c2de33f057eb4",style:{color:"#bdc3c7",background:"#2c3e50"}},{topic:"Add tags",id:"bd1cff58364436d0",tags:["Completed"]},{topic:"Add icons",id:"bd1d0317f7e8a61a",icons:["😂"],tags:["www"]},{topic:"Bolder",id:"bd41fd4ca32322a4",style:{fontWeight:"bold"}},{topic:"Hyper link",id:"bd41fd4ca32322a5",hyperLink:"https://github.com/ssshooter/mind-elixir-core"}]},{topic:"Draggable",id:"bd1f03fee1f63bc6",direction:1,expanded:!0,children:[{topic:`Drag a node to another node
2
- and the former one will become a child node of latter one`,id:"bd1f07c598e729dc"}]},{topic:"Export & Import",id:"beeb7586973430db",direction:1,expanded:!0,children:[{topic:"Export as SVG",id:"beeb7a6bec2d68e6"},{topic:"Export as PNG",id:"beeb7a6bec2d68e7",tags:["New"]},{topic:"Export JSON data",id:"beeb784cc189375f"},{topic:"Export as HTML",id:"beeb7a6bec2d68f5"}]},{topic:"Ecosystem",id:"beeb7586973430dc",direction:1,expanded:!0,children:[{topic:"@mind-elixir/node-menu",id:"beeb7586973430dd",hyperLink:"https://github.com/ssshooter/node-menu"},{topic:"@mind-elixir/export-xmind",id:"beeb7586973430de",hyperLink:"https://github.com/ssshooter/export-xmind"},{topic:"mind-elixir-react",id:"beeb7586973430df",hyperLink:"https://github.com/ssshooter/mind-elixir-react"}]},{topic:"dangerouslySetInnerHTML",id:"c00a1cf60baa44f0",style:{background:"#f1c40e"},children:[{topic:"Code Block",id:"c00a2264fdaw32612",children:[{topic:"",id:"c00a2264f4532613",dangerouslySetInnerHTML:`<pre class="language-javascript"><code class="language-javascript"><span class="token keyword">let</span> message <span class="token operator">=</span> <span class="token string">'Hello world'</span>
3
- <span class="token function">alert</span><span class="token punctuation">(</span>message<span class="token punctuation">)</span></code></pre>`}]},{topic:"Customized Div",id:"c00a2264f4532615",children:[{topic:"",id:"c00a2264f4532614",dangerouslySetInnerHTML:'<div><style>.title{font-size:50px}</style><div class="title">Title</div><div style="color: red; font-size: 20px;">Hello world</div></div>'}]}],direction:1},{topic:"KaTeX",id:"markdown-complex-math",direction:1,expanded:!0,children:[{topic:"Fourier transform: $$F(\\omega) = \\int_{-\\infty}^{\\infty} f(t) e^{-i\\omega t} dt$$",id:"markdown-fourier",useMd:!0},{topic:"Schrödinger equation: $$i\\hbar\\frac{\\partial}{\\partial t}\\Psi = \\hat{H}\\Psi$$",id:"markdown-schrodinger",useMd:!0}]},{topic:"Basic Markdown Examples",id:"markdown-basic-examples",direction:1,expanded:!0,children:[{topic:"# Heading 1",id:"markdown-headings",useMd:!0},{topic:"**Bold text** and __Highlight__ and *italic text*",id:"markdown-emphasis",useMd:!0},{topic:`- Unordered list item 1
4
- - Unordered list item 2`,id:"markdown-lists",useMd:!0},{topic:"[Link to GitHub](https://github.com) and `inline code`",id:"markdown-links-code",useMd:!0},{topic:`| Column 1 | Column 2 | Column 3 |
5
- |----------|----------|----------|
6
- | Row 1 | Data 1 | Info 1 |
7
- | Row 2 | Data 2 | Info 2 |`,id:"markdown-table",useMd:!0}]},{topic:"Theme System",id:"bd42dad21aaf6baf",direction:1,expanded:!0,children:[{topic:"Built-in Themes",id:"bd42e1d0163ebf05",expanded:!0,children:[{topic:"Latte (Light)",id:"bd42e619051878b4",style:{background:"#ffffff",color:"#444446"}},{topic:"Dark Theme",id:"bd42e97d7ac35e9a",style:{background:"#252526",color:"#ffffff"}}]},{topic:"Custom CSS Variables",id:"bd42e1d0163ebf06",tags:["Flexible"]},{topic:"Color Palette Customization",id:"bd42e1d0163ebf07",tags:["10 Colors"]}]}],expanded:!0},arrows:[{id:"ac5fb1df7345e9c4",label:"Render",from:"beeb784cc189375f",to:"beeb7a6bec2d68f5",delta1:{x:142.8828125,y:-57},delta2:{x:146.1171875,y:45},bidirectional:!1},{id:"4da8e3367b63b640",label:"Bidirectional!",from:"4da8dbbc7b71be99",to:"4da8ded27033a710",delta1:{x:-186,y:7},delta2:{x:-155,y:28},bidirectional:!0,style:{stroke:"#8839ef",labelColor:"#8839ef",strokeWidth:"2",strokeDasharray:"2,5",opacity:"1"}}],summaries:[{id:"a5e6978f1bc69f4a",parent:"bd1ba66996df4ba4",start:0,end:3,label:"This is a summary section that groups together related nodes to show their logical connection and relationship. You can customize this text to provide more context about the grouped items.",style:{labelColor:"#8839ef"}}],direction:2,theme:{name:"Latte",palette:["#dd7878","#ea76cb","#8839ef","#e64553","#fe640b","#df8e1d","#40a02b","#209fb5","#1e66f5","#7287fd"],cssVar:{"--node-gap-x":"30px","--node-gap-y":"10px","--main-gap-x":"32px","--main-gap-y":"12px","--root-radius":"30px","--main-radius":"20px","--root-color":"#ffffff","--root-bgcolor":"#4c4f69","--root-border-color":"rgba(0, 0, 0, 0)","--main-color":"#444446","--main-bgcolor":"#ffffff","--main-bgcolor-transparent":"rgba(255, 255, 255, 0.8)","--topic-padding":"3px","--color":"#777777","--bgcolor":"#f6f6f6","--selected":"#4dc4ff","--accent-color":"#e64553","--panel-color":"#444446","--panel-bgcolor":"#ffffff","--panel-border-color":"#eaeaea","--map-padding":"50px 80px"}}}})();
@@ -1,2 +0,0 @@
1
- declare const _default: "- Root Node\n - Child Node 1\n - Child Node 1-1\n - Child Node 1-2\n - Child Node 1-3\n - }:2 Summary of first two nodes\n - Child Node 2\n - Child Node 2-1 [^id1]\n - Child Node 2-2 [^id2]\n - Child Node 2-3 {color: #e87a90}\n - > [^id1] <-Bidirectional Link-> [^id2]\n - Child Node 3\n - Child Node 3-1 [^id3]\n - Child Node 3-2 [^id4]\n - Child Node 3-3 [^id5]\n - > [^id3] >-Unidirectional Link-> [^id4]\n - > [^id3] <-Unidirectional Link-< [^id5]\n - Child Node 4\n - Child Node 4-1 [^id6]\n - Child Node 4-2 [^id7]\n - Child Node 4-3 [^id8]\n - } Summary of all previous nodes\n - Child Node 4-4\n - > [^id1] <-Link position is not restricted, as long as the id can be found during rendering-> [^id8]\n";
2
- export default _default;