mind-elixir 5.1.0-beta.1 → 5.1.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.
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2019 DjZhou
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2019 DjZhou
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -12,4 +12,4 @@ var MindElixir=function(){"use strict";var xo=Object.defineProperty;var Eo=(G,O,
12
12
  padding: 2px 4px;
13
13
  margin: -2px -4px;
14
14
  `,je(o),e.scrollIntoView(o),o.addEventListener("keydown",r=>{r.stopPropagation();const c=r.key;if(c==="Enter"||c==="Tab"){if(r.shiftKey)return;r.preventDefault(),o.blur(),e.container.focus()}}),o.addEventListener("blur",()=>{var c;if(!o)return;const r=((c=o.textContent)==null?void 0:c.trim())||"";r===""?n.label=i:n.label=r,o.remove(),r!==i&&(t.innerHTML=n.label,e.linkDiv(),"parent"in n?e.bus.fire("operation",{name:"finishEditSummary",obj:n}):e.bus.fire("operation",{name:"finishEditArrowLabel",obj:n}))})},Pt=function(e){const t=this.map.querySelector("me-root"),n=t.offsetTop,o=t.offsetLeft,i=t.offsetWidth,s=t.offsetHeight,r=this.map.querySelectorAll("me-main > me-wrapper");this.lines.innerHTML="";for(let c=0;c<r.length;c++){const l=r[c],d=l.querySelector("me-tpc"),{offsetLeft:f,offsetTop:h}=H(this.nodes,d),g=d.offsetWidth,u=d.offsetHeight,a=l.parentNode.className,p=this.generateMainBranch({pT:n,pL:o,pW:i,pH:s,cT:h,cL:f,cW:g,cH:u,direction:a,containerHeight:this.nodes.offsetHeight}),m=this.theme.palette,v=d.nodeObj.branchColor||m[c%m.length];if(d.style.borderColor=v,this.lines.appendChild(He(p,v,"3")),e&&e!==l)continue;const y=J("subLines"),w=l.lastChild;w.tagName==="svg"&&w.remove(),l.appendChild(y),Fe(this,y,v,l,a,!0)}this.renderArrow(),this.renderSummary(),this.bus.fire("linkDiv")},Fe=function(e,t,n,o,i,s){const r=o.firstChild,c=o.children[1].children;if(c.length===0)return;const l=r.offsetTop,d=r.offsetLeft,f=r.offsetWidth,h=r.offsetHeight;for(let g=0;g<c.length;g++){const u=c[g],a=u.firstChild,p=a.offsetTop,m=a.offsetLeft,v=a.offsetWidth,y=a.offsetHeight,w=a.firstChild.nodeObj.branchColor||n,S=e.generateSubBranch({pT:l,pL:d,pW:f,pH:h,cT:p,cL:m,cW:v,cH:y,direction:i,isFirst:s});t.appendChild(He(S,w,"2"));const k=a.children[1];if(k){if(!k.expanded)continue}else continue;Fe(e,t,w,u,i)}},We={addChild:"插入子节点",addParent:"插入父节点",addSibling:"插入同级节点",removeNode:"删除节点",focus:"专注",cancelFocus:"取消专注",moveUp:"上移",moveDown:"下移",link:"连接",linkBidirectional:"双向连接",clickTips:"请点击目标节点",summary:"摘要"},Ie={cn:We,zh_CN:We,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:"요약"}},So="";function $t(e,t){t=t===!0?{focus:!0,link:!0}:t;const n=x=>{const b=document.createElement("div");return b.innerText=x,b.className="tips",b},o=(x,b,E)=>{const N=document.createElement("li");return N.id=x,N.innerHTML=`<span>${pe(b)}</span><span ${E?'class="key"':""}>${pe(E)}</span>`,N},i=Ie[e.locale]?e.locale:"en",s=Ie[i],r=o("cm-add_child",s.addChild,"Tab"),c=o("cm-add_parent",s.addParent,"Ctrl + Enter"),l=o("cm-add_sibling",s.addSibling,"Enter"),d=o("cm-remove_child",s.removeNode,"Delete"),f=o("cm-fucus",s.focus,""),h=o("cm-unfucus",s.cancelFocus,""),g=o("cm-up",s.moveUp,"PgUp"),u=o("cm-down",s.moveDown,"Pgdn"),a=o("cm-link",s.link,""),p=o("cm-link-bidirectional",s.linkBidirectional,""),m=o("cm-summary",s.summary,""),v=document.createElement("ul");if(v.className="menu-list",v.appendChild(r),v.appendChild(c),v.appendChild(l),v.appendChild(d),t.focus&&(v.appendChild(f),v.appendChild(h)),v.appendChild(g),v.appendChild(u),v.appendChild(m),t.link&&(v.appendChild(a),v.appendChild(p)),t&&t.extend)for(let x=0;x<t.extend.length;x++){const b=t.extend[x],E=o(b.name,b.name,b.key||"");v.appendChild(E),E.onclick=N=>{b.onclick(N)}}const y=document.createElement("div");y.className="context-menu",y.appendChild(v),y.hidden=!0,e.container.append(y);let w=!0;const S=x=>{const b=x.target;if(ve(b)){b.parentElement.tagName==="ME-ROOT"?w=!0:w=!1,w?(f.className="disabled",g.className="disabled",u.className="disabled",c.className="disabled",l.className="disabled",d.className="disabled"):(f.className="",g.className="",u.className="",c.className="",l.className="",d.className=""),y.hidden=!1,v.style.top="",v.style.bottom="",v.style.left="",v.style.right="";const E=v.getBoundingClientRect(),N=v.offsetHeight,P=v.offsetWidth,$=x.clientY-E.top,Y=x.clientX-E.left;N+$>window.innerHeight?(v.style.top="",v.style.bottom="0px"):(v.style.bottom="",v.style.top=$+15+"px"),P+Y>window.innerWidth?(v.style.left="",v.style.right="0px"):(v.style.right="",v.style.left=Y+10+"px")}};e.bus.addListener("showContextMenu",S),y.onclick=x=>{x.target===y&&(y.hidden=!0)},r.onclick=()=>{e.addChild(),y.hidden=!0},c.onclick=()=>{e.insertParent(),y.hidden=!0},l.onclick=()=>{w||(e.insertSibling("after"),y.hidden=!0)},d.onclick=()=>{w||(e.removeNodes(e.currentNodes||[]),y.hidden=!0)},f.onclick=()=>{w||(e.focusNode(e.currentNode),y.hidden=!0)},h.onclick=()=>{e.cancelFocus(),y.hidden=!0},g.onclick=()=>{w||(e.moveUpNode(),y.hidden=!0)},u.onclick=()=>{w||(e.moveDownNode(),y.hidden=!0)};const k=x=>{y.hidden=!0;const b=e.currentNode,E=n(s.clickTips);e.container.appendChild(E),e.map.addEventListener("click",N=>{N.preventDefault(),E.remove();const P=N.target;(P.parentElement.tagName==="ME-PARENT"||P.parentElement.tagName==="ME-ROOT")&&e.createArrow(b,P,x)},{once:!0})};return a.onclick=()=>k(),p.onclick=()=>k({bidirectional:!0}),m.onclick=()=>{y.hidden=!0,e.createSummary(),e.unselectNodes(e.currentNodes)},()=>{r.onclick=null,c.onclick=null,l.onclick=null,d.onclick=null,f.onclick=null,h.onclick=null,g.onclick=null,u.onclick=null,a.onclick=null,m.onclick=null,y.onclick=null,e.container.oncontextmenu=null}}const Ce=document,Ot=function(e,t){if(!t)return Se(e),e;let n=e.querySelector(".insert-preview");const o=`insert-preview ${t} show`;return n||(n=Ce.createElement("div"),e.appendChild(n)),n.className=o,e},Se=function(e){if(!e)return;const t=e.querySelectorAll(".insert-preview");for(const n of t||[])n.remove()},Ke=function(e,t){for(const n of t){const o=n.parentElement.parentElement.contains(e);if(!(e&&e.tagName==="ME-TPC"&&e!==n&&!o&&e.nodeObj.parent))return!1}return!0},jt=function(e){const t=document.createElement("div");return t.className="mind-elixir-ghost",e.container.appendChild(t),t};class Ht{constructor(t){ee(this,"mind");ee(this,"isMoving",!1);ee(this,"interval",null);ee(this,"speed",20);this.mind=t}move(t,n){this.isMoving||(this.isMoving=!0,this.interval=setInterval(()=>{this.mind.move(t*this.speed*this.mind.scaleVal,n*this.speed*this.mind.scaleVal)},100))}stop(){this.isMoving=!1,clearInterval(this.interval)}}function Bt(e){let t=null,n=null;const o=jt(e),i=new Ht(e),s=d=>{e.selection.cancel();const f=d.target;if((f==null?void 0:f.tagName)!=="ME-TPC"){d.preventDefault();return}let h=e.currentNodes;h!=null&&h.includes(f)||(e.selectNode(f),h=e.currentNodes),e.dragged=h,h.length>1?o.innerHTML=h.length+"":o.innerHTML=f.innerHTML;for(const g of h)g.parentElement.parentElement.style.opacity="0.5";d.dataTransfer.setDragImage(o,0,0),d.dataTransfer.dropEffect="move",e.dragMoveHelper.clear()},r=d=>{const{dragged:f}=e;if(!f)return;i.stop();for(const g of f)g.parentElement.parentElement.style.opacity="1";const h=d.target;h.style.opacity="",n&&(Se(n),t==="before"?e.moveNodeBefore(f,n):t==="after"?e.moveNodeAfter(f,n):t==="in"&&e.moveNodeIn(f,n),e.dragged=null,o.innerHTML="")},c=d=>{d.preventDefault();const f=12*e.scaleVal,{dragged:h}=e;if(!h)return;const g=e.container.getBoundingClientRect();d.clientX<g.x+50?i.move(1,0):d.clientX>g.x+g.width-50?i.move(-1,0):d.clientY<g.y+50?i.move(0,1):d.clientY>g.y+g.height-50?i.move(0,-1):i.stop(),Se(n);const u=Ce.elementFromPoint(d.clientX,d.clientY-f);if(Ke(u,h)){n=u;const a=u.getBoundingClientRect(),p=a.y;d.clientY>p+a.height?t="after":t="in"}else{const a=Ce.elementFromPoint(d.clientX,d.clientY+f),p=a.getBoundingClientRect();if(Ke(a,h)){n=a;const m=p.y;d.clientY<m?t="before":t="in"}else t=n=null}n&&Ot(n,t)};return ye([{dom:e.map,evt:"dragstart",func:s},{dom:e.map,evt:"dragend",func:r},{dom:e.map,evt:"dragover",func:c}])}const Rt=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 Ft(e){let t=[],n=-1,o=e.getData(),i=[];e.undo=function(){if(n>-1){const l=t[n];o=l.prev,e.refresh(l.prev);try{l.currentTarget.type==="nodes"&&(l.operation==="removeNodes"?e.selectNodes(l.currentTarget.value.map(d=>this.findEle(d))):e.selectNodes(l.currentSelected.map(d=>this.findEle(d))))}catch{}finally{n--}}},e.redo=function(){if(n<t.length-1){n++;const l=t[n];o=l.next,e.refresh(l.next);try{l.currentTarget.type==="nodes"&&(l.operation==="removeNodes"?e.selectNodes(l.currentSelected.map(d=>this.findEle(d))):e.selectNodes(l.currentTarget.value.map(d=>this.findEle(d))))}catch{}}};const s=function(l){if(l.name==="beginEdit")return;t=t.slice(0,n+1);const d=e.getData(),f={prev:o,operation:l.name,currentSelected:i.map(h=>h.id),currentTarget:Rt(l),next:d};t.push(f),o=d,n=t.length-1},r=function(l){(l.metaKey||l.ctrlKey)&&(l.shiftKey&&l.key==="Z"||l.key==="y")?e.redo():(l.metaKey||l.ctrlKey)&&l.key==="z"&&e.undo()},c=function(l){i=e.currentNodes.map(d=>d.nodeObj)};return e.bus.addListener("operation",s),e.bus.addListener("selectNodes",c),e.container.addEventListener("keydown",r),()=>{e.bus.removeListener("operation",s),e.bus.removeListener("selectNodes",c),e.container.removeEventListener("keydown",r)}}const Wt='<?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>',It='<?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>',Kt='<?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>',Yt='<?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>',Gt='<?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>',qt='<?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>',zt='<?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>',No="",Vt={side:Wt,left:It,right:Kt,full:Yt,living:Gt,zoomin:qt,zoomout:zt},I=(e,t)=>{const n=document.createElement("span");return n.id=e,n.innerHTML=Vt[t],n};function Ut(e){const t=document.createElement("div"),n=I("fullscreen","full"),o=I("toCenter","living"),i=I("zoomout","zoomout"),s=I("zoomin","zoomin"),r=document.createElement("span");return r.innerText="100%",t.appendChild(n),t.appendChild(o),t.appendChild(i),t.appendChild(s),t.className="mind-elixir-toolbar rb",n.onclick=()=>{document.fullscreenElement===e.el?document.exitFullscreen():e.el.requestFullscreen()},o.onclick=()=>{e.toCenter()},i.onclick=()=>{e.scale(e.scaleVal-e.scaleSensitivity)},s.onclick=()=>{e.scale(e.scaleVal+e.scaleSensitivity)},t}function Xt(e){const t=document.createElement("div"),n=I("tbltl","left"),o=I("tbltr","right"),i=I("tblts","side");return t.appendChild(n),t.appendChild(o),t.appendChild(i),t.className="mind-elixir-toolbar lt",n.onclick=()=>{e.initLeft()},o.onclick=()=>{e.initRight()},i.onclick=()=>{e.initSide()},t}function Jt(e){e.container.append(Ut(e)),e.container.append(Xt(e))}/*! @viselect/vanilla v3.9.0 MIT | https://github.com/Simonwep/selection/tree/master/packages/vanilla */class Zt{constructor(){this._listeners=new Map,this.on=this.addEventListener,this.off=this.removeEventListener,this.emit=this.dispatchEvent}addEventListener(t,n){const o=this._listeners.get(t)??new Set;return this._listeners.set(t,o),o.add(n),this}removeEventListener(t,n){var o;return(o=this._listeners.get(t))==null||o.delete(n),this}dispatchEvent(t,...n){let o=!0;for(const i of this._listeners.get(t)??[])o=i(...n)!==!1&&o;return o}unbindAllListeners(){this._listeners.clear()}}const Ye=(e,t="px")=>typeof e=="number"?e+t:e,B=({style:e},t,n)=>{if(typeof t=="object")for(const[o,i]of Object.entries(t))i!==void 0&&(e[o]=Ye(i));else n!==void 0&&(e[t]=Ye(n))},Ge=(e=0,t=0,n=0,o=0)=>{const i={x:e,y:t,width:n,height:o,top:t,left:e,right:e+n,bottom:t+o};return{...i,toJSON:()=>JSON.stringify(i)}},Qt=e=>{let t,n=-1,o=!1;return{next:(...i)=>{t=i,o||(o=!0,n=requestAnimationFrame(()=>{e(...t),o=!1}))},cancel:()=>{cancelAnimationFrame(n),o=!1}}},qe=(e,t,n="touch")=>{switch(n){case"center":{const o=t.left+t.width/2,i=t.top+t.height/2;return o>=e.left&&o<=e.right&&i>=e.top&&i<=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}},en=()=>matchMedia("(hover: none), (pointer: coarse)").matches,tn=()=>"safari"in window,Ne=e=>Array.isArray(e)?e:[e],ze=e=>(t,n,o,i={})=>{(t instanceof HTMLCollection||t instanceof NodeList)&&(t=Array.from(t)),n=Ne(n),t=Ne(t);for(const s of t)if(s)for(const r of n)s[e](r,o,{capture:!1,...i})},R=ze("addEventListener"),M=ze("removeEventListener"),re=e=>{var t;const{clientX:n,clientY:o,target:i}=((t=e.touches)==null?void 0:t[0])??e;return{x:n,y:o,target:i}},V=(e,t=document)=>Ne(e).map(n=>typeof n=="string"?Array.from(t.querySelectorAll(n)):n instanceof Element?n:null).flat().filter(Boolean),nn=(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:K,max:Ve,min:Ue,ceil:Xe}=Math,Je=(e=[])=>({stored:e,selected:[],touched:[],changed:{added:[],removed:[]}}),Ze=class extends Zt{constructor(t){var n,o,i,s,r;super(),this._selection=Je(),this._targetBoundaryScrolled=!0,this._selectables=[],this._areaLocation={y1:0,x2:0,y2:0,x1:0},this._areaRect=Ge(),this._singleClick=!0,this._scrollAvailable=!0,this._scrollingActive=!1,this._scrollSpeed={x:0,y:0},this._scrollDelta={x:0,y:0},this._lastMousePosition={x:0,y:0},this.enable=this._toggleStartEvents,this.disable=this._toggleStartEvents.bind(this,!1),this._options={selectionAreaClass:"selection-area",selectionContainerClass:void 0,selectables:[],document:window.document,startAreas:["html"],boundaries:["html"],container:"body",...t,behaviour:{overlap:"invert",intersect:"touch",triggers:[0],...t.behaviour,startThreshold:(n=t.behaviour)!=null&&n.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,...(o=t.behaviour)==null?void 0:o.scrolling,startScrollMargins:{x:0,y:0,...(s=(i=t.behaviour)==null?void 0:i.scrolling)==null?void 0:s.startScrollMargins}}},features:{range:!0,touch:!0,deselectOnBlur:!1,...t.features,singleTap:{allow:!0,intersect:"native",...(r=t.features)==null?void 0:r.singleTap}}};for(const f of Object.getOwnPropertyNames(Object.getPrototypeOf(this)))typeof this[f]=="function"&&(this[f]=this[f].bind(this));const{document:c,selectionAreaClass:l,selectionContainerClass:d}=this._options;this._area=c.createElement("div"),this._clippingElement=c.createElement("div"),this._clippingElement.appendChild(this._area),this._area.classList.add(l),d&&this._clippingElement.classList.add(d),B(this._area,{willChange:"top, left, bottom, right, width, height",top:0,left:0,position:"fixed"}),B(this._clippingElement,{overflow:"hidden",position:"fixed",transform:"translate3d(0, 0, 0)",pointerEvents:"none",zIndex:"1"}),this._frame=Qt(f=>{this._recalculateSelectionAreaRect(),this._updateElementSelection(),this._emitEvent("move",f),this._redrawSelectionArea()}),this.enable()}_toggleStartEvents(t=!0){const{document:n,features:o}=this._options,i=t?R:M;i(n,"mousedown",this._onTapStart),o.touch&&i(n,"touchstart",this._onTapStart,{passive:!1})}_onTapStart(t,n=!1){const{x:o,y:i,target:s}=re(t),{document:r,startAreas:c,boundaries:l,features:d,behaviour:f}=this._options,h=s.getBoundingClientRect();if(t instanceof MouseEvent&&!nn(t,f.triggers))return;const g=V(c,r),u=V(l,r);this._targetElement=u.find(v=>qe(v.getBoundingClientRect(),h));const a=t.composedPath(),p=g.find(v=>a.includes(v));if(this._targetBoundary=u.find(v=>a.includes(v)),!this._targetElement||!p||!this._targetBoundary||!n&&this._emitEvent("beforestart",t)===!1)return;this._areaLocation={x1:o,y1:i,x2:0,y2:0};const m=r.scrollingElement??r.body;this._scrollDelta={x:m.scrollLeft,y:m.scrollTop},this._singleClick=!0,this.clearSelection(!1,!0),R(r,["touchmove","mousemove"],this._delayedTapMove,{passive:!1}),R(r,["mouseup","touchcancel","touchend"],this._onTapStop),R(r,"scroll",this._onScroll),d.deselectOnBlur&&(this._targetBoundaryScrolled=!1,R(this._targetBoundary,"scroll",this._onStartAreaScroll))}_onSingleTap(t){const{singleTap:{intersect:n},range:o}=this._options.features,i=re(t);let s;if(n==="native")s=i.target;else if(n==="touch"){this.resolveSelectables();const{x:c,y:l}=i;s=this._selectables.find(d=>{const{right:f,left:h,top:g,bottom:u}=d.getBoundingClientRect();return c<f&&c>h&&l<u&&l>g})}if(!s)return;for(this.resolveSelectables();!this._selectables.includes(s);)if(s.parentElement)s=s.parentElement;else{this._targetBoundaryScrolled||this.clearSelection();return}const{stored:r}=this._selection;if(this._emitEvent("start",t),t.shiftKey&&o&&this._latestElement){const c=this._latestElement,[l,d]=c.compareDocumentPosition(s)&4?[s,c]:[c,s],f=[...this._selectables.filter(h=>h.compareDocumentPosition(l)&4&&h.compareDocumentPosition(d)&2),l,d];this.select(f),this._latestElement=c}else r.includes(s)&&(r.length===1||t.ctrlKey||r.every(c=>this._selection.stored.includes(c)))?this.deselect(s):(this.select(s),this._latestElement=s)}_delayedTapMove(t){const{container:n,document:o,behaviour:{startThreshold:i}}=this._options,{x1:s,y1:r}=this._areaLocation,{x:c,y:l}=re(t);if(typeof i=="number"&&K(c+l-(s+r))>=i||typeof i=="object"&&K(c-s)>=i.x||K(l-r)>=i.y){if(M(o,["mousemove","touchmove"],this._delayedTapMove,{passive:!1}),this._emitEvent("beforedrag",t)===!1){M(o,["mouseup","touchcancel","touchend"],this._onTapStop);return}R(o,["mousemove","touchmove"],this._onTapMove,{passive:!1}),B(this._area,"display","block"),V(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&&(R(this._targetElement,"wheel",this._wheelScroll,{passive:!1}),R(this._options.document,"keydown",this._keyboardScroll,{passive:!1}),this._selectables=this._selectables.filter(d=>this._targetElement.contains(d))),this._setupSelectionArea(),this._emitEvent("start",t),this._onTapMove(t)}this._handleMoveEvent(t)}_setupSelectionArea(){const{_clippingElement:t,_targetElement:n,_area:o}=this,i=this._targetRect=n.getBoundingClientRect();this._scrollAvailable?(B(t,{top:i.top,left:i.left,width:i.width,height:i.height}),B(o,{marginTop:-i.top,marginLeft:-i.left})):(B(t,{top:0,left:0,width:"100%",height:"100%"}),B(o,{marginTop:0,marginLeft:0}))}_onTapMove(t){const{_scrollSpeed:n,_areaLocation:o,_options:i,_frame:s}=this,{speedDivider:r}=i.behaviour.scrolling,c=this._targetElement,{x:l,y:d}=re(t);if(o.x2=l,o.y2=d,this._lastMousePosition.x=l,this._lastMousePosition.y=d,this._scrollAvailable&&!this._scrollingActive&&(n.y||n.x)){this._scrollingActive=!0;const f=()=>{if(!n.x&&!n.y){this._scrollingActive=!1;return}const{scrollTop:h,scrollLeft:g}=c;n.y&&(c.scrollTop+=Xe(n.y/r),o.y1-=c.scrollTop-h),n.x&&(c.scrollLeft+=Xe(n.x/r),o.x1-=c.scrollLeft-g),s.next(t),requestAnimationFrame(f)};requestAnimationFrame(f)}else s.next(t);this._handleMoveEvent(t)}_handleMoveEvent(t){const{features:n}=this._options;(n.touch&&en()||this._scrollAvailable&&tn())&&t.preventDefault()}_onScroll(){const{_scrollDelta:t,_options:{document:n}}=this,{scrollTop:o,scrollLeft:i}=n.scrollingElement??n.body;this._areaLocation.x1+=t.x-i,this._areaLocation.y1+=t.y-o,t.x=i,t.y=o,this._setupSelectionArea(),this._frame.next(null)}_onStartAreaScroll(){this._targetBoundaryScrolled=!0,M(this._targetElement,"scroll",this._onStartAreaScroll)}_wheelScroll(t){const{manualSpeed:n}=this._options.behaviour.scrolling,o=t.deltaY?t.deltaY>0?1:-1:0,i=t.deltaX?t.deltaX>0?1:-1:0;this._scrollSpeed.y+=o*n,this._scrollSpeed.x+=i*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,i=t.key==="ArrowUp"?-1:t.key==="ArrowDown"?1:0;this._scrollSpeed.x+=Math.sign(o)*n,this._scrollSpeed.y+=Math.sign(i)*n,t.preventDefault(),this._onTapMove({clientX:this._lastMousePosition.x,clientY:this._lastMousePosition.y,preventDefault:()=>{}})}_recalculateSelectionAreaRect(){const{_scrollSpeed:t,_areaLocation:n,_targetElement:o,_options:i}=this,{scrollTop:s,scrollHeight:r,clientHeight:c,scrollLeft:l,scrollWidth:d,clientWidth:f}=o,h=this._targetRect,{x1:g,y1:u}=n;let{x2:a,y2:p}=n;const{behaviour:{scrolling:{startScrollMargins:m}}}=i;a<h.left+m.x?(t.x=l?-K(h.left-a+m.x):0,a=a<h.left?h.left:a):a>h.right-m.x?(t.x=d-l-f?K(h.left+h.width-a-m.x):0,a=a>h.right?h.right:a):t.x=0,p<h.top+m.y?(t.y=s?-K(h.top-p+m.y):0,p=p<h.top?h.top:p):p>h.bottom-m.y?(t.y=r-s-c?K(h.top+h.height-p-m.y):0,p=p>h.bottom?h.bottom:p):t.y=0;const v=Ue(g,a),y=Ue(u,p),w=Ve(g,a),S=Ve(u,p);this._areaRect=Ge(v,y,w-v,S-y)}_redrawSelectionArea(){const{x:t,y:n,width:o,height:i}=this._areaRect,{style:s}=this._area;s.left=`${t}px`,s.top=`${n}px`,s.width=`${o}px`,s.height=`${i}px`}_onTapStop(t,n){var o;const{document:i,features:s}=this._options,{_singleClick:r}=this;M(this._targetElement,"scroll",this._onStartAreaScroll),M(i,["mousemove","touchmove"],this._delayedTapMove),M(i,["touchmove","mousemove"],this._onTapMove),M(i,["mouseup","touchcancel","touchend"],this._onTapStop),M(i,"scroll",this._onScroll),this._keepSelection(),t&&r&&s.singleTap.allow?this._onSingleTap(t):!r&&!n&&(this._updateElementSelection(),this._emitEvent("stop",t)),this._scrollSpeed.x=0,this._scrollSpeed.y=0,M(this._targetElement,"wheel",this._wheelScroll,{passive:!0}),M(this._options.document,"keydown",this._keyboardScroll,{passive:!0}),this._clippingElement.remove(),(o=this._frame)==null||o.cancel(),B(this._area,"display","none")}_updateElementSelection(){const{_selectables:t,_options:n,_selection:o,_areaRect:i}=this,{stored:s,selected:r,touched:c}=o,{intersect:l,overlap:d}=n.behaviour,f=d==="invert",h=[],g=[],u=[];for(let p=0;p<t.length;p++){const m=t[p];if(qe(i,m.getBoundingClientRect(),l)){if(r.includes(m))s.includes(m)&&!c.includes(m)&&c.push(m);else if(f&&s.includes(m)){u.push(m);continue}else g.push(m);h.push(m)}}f&&g.push(...s.filter(p=>!r.includes(p)));const a=d==="keep";for(let p=0;p<r.length;p++){const m=r[p];!h.includes(m)&&!(a&&s.includes(m))&&u.push(m)}o.selected=h,o.changed={added:g,removed:u},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:i,touched:s,stored:r}=n,c=o.filter(l=>!r.includes(l));switch(t.behaviour.overlap){case"drop":{n.stored=[...c,...r.filter(l=>!s.includes(l))];break}case"invert":{n.stored=[...c,...r.filter(l=>!i.removed.includes(l))];break}case"keep":{n.stored=[...r,...o.filter(l=>!r.includes(l))];break}}}trigger(t,n=!0){this._onTapStart(t,n)}resolveSelectables(){this._selectables=V(this._options.selectables,this._options.document)}clearSelection(t=!0,n=!1){const{selected:o,stored:i,changed:s}=this._selection;s.added=[],s.removed.push(...o,...t?i:[]),n||(this._emitEvent("move",null),this._emitEvent("stop",null)),this._selection=Je(t?[]:i)}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()}select(t,n=!1){const{changed:o,selected:i,stored:s}=this._selection,r=V(t,this._options.document).filter(c=>!i.includes(c)&&!s.includes(c));return s.push(...r),i.push(...r),o.added.push(...r),o.removed=[],this._latestElement=void 0,n||(this._emitEvent("move",null),this._emitEvent("stop",null)),r}deselect(t,n=!1){const{selected:o,stored:i,changed:s}=this._selection,r=V(t,this._options.document).filter(c=>o.includes(c)||i.includes(c));this._selection.stored=i.filter(c=>!r.includes(c)),this._selection.selected=o.filter(c=>!r.includes(c)),this._selection.changed.added=[],this._selection.changed.removed.push(...r.filter(c=>!s.removed.includes(c))),this._latestElement=void 0,n||(this._emitEvent("move",null),this._emitEvent("stop",null))}};Ze.version="3.9.0";let on=Ze;function sn(e){const t=e.mouseSelectionButton===2?[2]:[0],n=new on({selectables:[".map-container me-tpc"],boundaries:[e.container],container:e.selectionContainer,features:{touch:!1},behaviour:{triggers:t,scrolling:{speedDivider:10,manualSpeed:750,startScrollMargins:{x:10,y:10}}}}).on("beforestart",({event:o})=>{var r;const i=o.target;if(i.id==="input-box"||i.className==="circle"||(r=e.container.querySelector(".context-menu"))!=null&&r.contains(i))return!1;if(!o.ctrlKey&&!o.metaKey){if(i.tagName==="ME-TPC"&&i.classList.contains("selected"))return!1;e.clearSelection()}const s=n.getSelectionArea();return s.style.background="#4f90f22d",s.style.border="1px solid #4f90f2",s.parentElement&&(s.parentElement.style.zIndex="9999"),!0}).on("move",({store:{changed:{added:o,removed:i}}})=>{if(o.length>0||i.length>0,o.length>0){for(const s of o)s.className="selected";e.currentNodes=[...e.currentNodes,...o],e.bus.fire("selectNodes",o.map(s=>s.nodeObj))}if(i.length>0){for(const s of i)s.classList.remove("selected");e.currentNodes=e.currentNodes.filter(s=>!(i!=null&&i.includes(s))),e.bus.fire("unselectNodes",i.map(s=>s.nodeObj))}});e.selection=n}const rn=function(e,t=!0){this.theme=e;const o={...(e.type==="dark"?fe:ue).cssVar,...e.cssVar},i=Object.keys(o);for(let s=0;s<i.length;s++){const r=i[s];this.container.style.setProperty(r,o[r])}t&&this.refresh()},U=e=>{var o;const t=(o=e.parent)==null?void 0:o.children,n=(t==null?void 0:t.indexOf(e))??0;return{siblings:t,index:n}};function cn(e){const{siblings:t,index:n}=U(e);if(t===void 0)return;const o=t[n];n===0?(t[n]=t[t.length-1],t[t.length-1]=o):(t[n]=t[n-1],t[n-1]=o)}function ln(e){const{siblings:t,index:n}=U(e);if(t===void 0)return;const o=t[n];n===t.length-1?(t[n]=t[0],t[0]=o):(t[n]=t[n+1],t[n+1]=o)}function Qe(e){const{siblings:t,index:n}=U(e);return t===void 0?0:(t.splice(n,1),t.length)}function an(e,t,n){const{siblings:o,index:i}=U(n);o!==void 0&&(t==="before"?o.splice(i,0,e):o.splice(i+1,0,e))}function dn(e,t){const{siblings:n,index:o}=U(e);n!==void 0&&(n[o]=t,t.children=[e])}function et(e,t,n){var o;if(Qe(t),(o=n.parent)!=null&&o.parent||(t.direction=n.direction),e==="in")n.children?n.children.push(t):n.children=[t];else{t.direction!==void 0&&(t.direction=n.direction);const{siblings:i,index:s}=U(n);if(i===void 0)return;e==="before"?i.splice(s,0,t):i.splice(s+1,0,t)}}const hn=function({map:e,direction:t},n){var o,i;if(t===0)return 0;if(t===1)return 1;if(t===2){const s=((o=e.querySelector(".lhs"))==null?void 0:o.childElementCount)||0,r=((i=e.querySelector(".rhs"))==null?void 0:i.childElementCount)||0;return s<=r?(n.direction=0,0):(n.direction=1,1)}},tt=function(e,t,n){var s,r;const o=n.children[0].children[0],i=t.parentElement;if(i.tagName==="ME-PARENT"){if(Z(o),i.children[1])i.nextSibling.appendChild(n);else{const c=e.createChildren([n]);i.appendChild(xe(!0)),i.insertAdjacentElement("afterend",c)}e.linkDiv(n.offsetParent)}else i.tagName==="ME-ROOT"&&(hn(e,o.nodeObj)===0?(s=e.container.querySelector(".lhs"))==null||s.appendChild(n):(r=e.container.querySelector(".rhs"))==null||r.appendChild(n),e.linkDiv())},un=function(e,t){const n=e.parentNode;if(t===0){const o=n.parentNode.parentNode;o.tagName!=="ME-MAIN"&&(o.previousSibling.children[1].remove(),o.remove())}n.parentNode.remove()},nt={before:"beforebegin",after:"afterend"},Z=function(e){const n=e.parentElement.parentElement.lastElementChild;(n==null?void 0:n.tagName)==="svg"&&(n==null||n.remove())},fn=function(e,t){const n=e.nodeObj,o=me(n);o.style&&t.style&&(t.style=Object.assign(o.style,t.style));const i=Object.assign(n,t);we.call(this,e,i),this.linkDiv(),this.bus.fire("operation",{name:"reshapeNode",obj:i,origin:o})},ke=function(e,t,n){if(!t)return null;const o=t.nodeObj;o.expanded===!1&&(e.expandNode(t,!0),t=e.findEle(o.id));const i=n||e.generateNewObj();o.children?o.children.push(i):o.children=[i],j(e.nodeData);const{grp:s,top:r}=e.createWrapper(i);return tt(e,t,s),{newTop:r,newNodeObj:i}},pn=function(e,t,n){var d,f,h,g;const o=t||this.currentNode;if(!o)return;const i=o.nodeObj;if(i.parent){if(!((d=i.parent)!=null&&d.parent)&&((h=(f=i.parent)==null?void 0:f.children)==null?void 0:h.length)===1&&this.direction===2){this.addChild(this.findEle(i.parent.id),n);return}}else{this.addChild();return}const s=n||this.generateNewObj();if(!((g=i.parent)!=null&&g.parent)){const u=o.closest("me-main").className===A.LHS?0:1;s.direction=u}an(s,e,i),j(this.nodeData);const r=o.parentElement,{grp:c,top:l}=this.createWrapper(s);r.parentElement.insertAdjacentElement(nt[e],c),this.linkDiv(c.offsetParent),n||this.editTopic(l.firstChild),this.bus.fire("operation",{name:"insertSibling",type:e,obj:s}),this.selectNode(l.firstChild,!0)},gn=function(e,t){const n=e||this.currentNode;if(!n)return;Z(n);const o=n.nodeObj;if(!o.parent)return;const i=t||this.generateNewObj();dn(o,i),j(this.nodeData);const s=n.parentElement.parentElement,{grp:r,top:c}=this.createWrapper(i,!0);c.appendChild(xe(!0)),s.insertAdjacentElement("afterend",r);const l=this.createChildren([s]);c.insertAdjacentElement("afterend",l),this.linkDiv(),t||this.editTopic(c.firstChild),this.selectNode(c.firstChild,!0),this.bus.fire("operation",{name:"insertParent",obj:i})},mn=function(e,t){const n=e||this.currentNode;if(!n)return;const o=ke(this,n,t);if(!o)return;const{newTop:i,newNodeObj:s}=o;this.bus.fire("operation",{name:"addChild",obj:s}),t||this.editTopic(i.firstChild),this.selectNode(i.firstChild,!0)},vn=function(e,t){const n=me(e.nodeObj);ge(n);const o=ke(this,t,n);if(!o)return;const{newNodeObj:i}=o;this.selectNode(this.findEle(i.id)),this.bus.fire("operation",{name:"copyNode",obj:i})},yn=function(e,t){e=oe(e);const n=[];for(let o=0;o<e.length;o++){const i=e[o],s=me(i.nodeObj);ge(s);const r=ke(this,t,s);if(!r)return;const{newNodeObj:c}=r;n.push(c)}this.unselectNodes(this.currentNodes),this.selectNodes(n.map(o=>this.findEle(o.id))),this.bus.fire("operation",{name:"copyNodes",objs:n})},bn=function(e){const t=e||this.currentNode;if(!t)return;const n=t.nodeObj;cn(n);const o=t.parentNode.parentNode;o.parentNode.insertBefore(o,o.previousSibling),this.linkDiv(),this.bus.fire("operation",{name:"moveUpNode",obj:n})},wn=function(e){const t=e||this.currentNode;if(!t)return;const n=t.nodeObj;ln(n);const o=t.parentNode.parentNode;o.nextSibling?o.nextSibling.insertAdjacentElement("afterend",o):o.parentNode.prepend(o),this.linkDiv(),this.bus.fire("operation",{name:"moveDownNode",obj:n})},xn=function(e){if(e.length===0)return;e=oe(e);for(const n of e){const o=n.nodeObj,i=Qe(o);un(n,i)}const t=e[e.length-1];this.selectNode(this.findEle(t.nodeObj.parent.id)),this.linkDiv(),this.bus.fire("operation",{name:"removeNodes",objs:e.map(n=>n.nodeObj)})},En=function(e,t){e=oe(e);const n=t.nodeObj;n.expanded===!1&&(this.expandNode(t,!0),t=this.findEle(n.id));for(const o of e){const i=o.nodeObj;et("in",i,n),j(this.nodeData);const s=o.parentElement;tt(this,t,s.parentElement)}this.linkDiv(),this.bus.fire("operation",{name:"moveNodeIn",objs:e.map(o=>o.nodeObj),toObj:n})},ot=(e,t,n,o)=>{e=oe(e),t==="after"&&(e=e.reverse());const i=n.nodeObj,s=[];for(const r of e){const c=r.nodeObj;et(t,c,i),j(o.nodeData),Z(r);const l=r.parentElement.parentNode;s.includes(l.parentElement)||s.push(l.parentElement),n.parentElement.parentNode.insertAdjacentElement(nt[t],l)}for(const r of s)r.childElementCount===0&&r.tagName!=="ME-MAIN"&&(r.previousSibling.children[1].remove(),r.remove());o.linkDiv(),o.bus.fire("operation",{name:t==="before"?"moveNodeBefore":"moveNodeAfter",objs:e.map(r=>r.nodeObj),toObj:i})},it=Object.freeze(Object.defineProperty({__proto__:null,addChild:mn,beginEdit:function(e){const t=e||this.currentNode;t&&(t.nodeObj.dangerouslySetInnerHTML||this.editTopic(t))},copyNode:vn,copyNodes:yn,insertParent:gn,insertSibling:pn,moveDownNode:wn,moveNodeAfter:function(e,t){ot(e,"after",t,this)},moveNodeBefore:function(e,t){ot(e,"before",t,this)},moveNodeIn:En,moveUpNode:bn,removeNodes:xn,reshapeNode:fn,rmSubline:Z,setNodeTopic:function(e,t){e.text.textContent=t,e.nodeObj.topic=t,this.linkDiv()}},Symbol.toStringTag,{value:"Module"}));function Cn(e){return{nodeData:e.isFocusMode?e.nodeDataBackup:e.nodeData,arrows:e.arrows,summaries:e.summaries,direction:e.direction,theme:e.theme}}const Sn=function(e){const t=this.container,n=e.getBoundingClientRect(),o=t.getBoundingClientRect();if(n.top>o.bottom||n.bottom<o.top||n.left>o.right||n.right<o.left){const s=n.left+n.width/2,r=n.top+n.height/2,c=o.left+o.width/2,l=o.top+o.height/2,d=s-c,f=r-l;this.move(-d,-f,!0)}},Nn=function(e,t,n){this.clearSelection(),this.scrollIntoView(e),this.selection.select(e),t&&this.bus.fire("selectNewNode",e.nodeObj)},kn=function(e){this.selection.select(e)},_n=function(e){this.selection.deselect(e)},Tn=function(){this.unselectNodes(this.currentNodes),this.unselectSummary(),this.unselectArrow()},Ln=function(){const e=Cn(this);return JSON.stringify(e,(t,n)=>{if(!(t==="parent"&&typeof n!="string"))return n})},An=function(){return JSON.parse(this.getDataString())},Mn=function(){this.editable=!0},Dn=function(){this.editable=!1},Pn=function(e,t={x:0,y:0}){if(e<this.scaleMin||e>this.scaleMax)return;const n=this.container.getBoundingClientRect(),o=t.x?t.x-n.left-n.width/2:0,i=t.y?t.y-n.top-n.height/2:0,{dx:s,dy:r}=st(this),c=this.map.style.transform,{x:l,y:d}=Ae(c),f=l-s,h=d-r,g=this.scaleVal,u=(-o+f)*(1-e/g),a=(-i+h)*(1-e/g);this.map.style.transform=`translate(${l-u}px, ${d-a}px) scale(${e})`,this.scaleVal=e,this.bus.fire("scale",e)},$n=function(){const e=this.nodes.offsetHeight/this.container.offsetHeight,t=this.nodes.offsetWidth/this.container.offsetWidth,n=1/Math.max(1,Math.max(e,t));this.scaleVal=n,this.map.style.transform="scale("+n+")",this.bus.fire("scale",n)},On=function(e,t,n=!1){const{map:o,scaleVal:i,bus:s}=this,r=o.style.transform;let{x:c,y:l}=Ae(r);c+=e,l+=t,n&&(o.style.transition="transform 0.3s",setTimeout(()=>{o.style.transition="none"},300)),o.style.transform=`translate(${c}px, ${l}px) scale(${i})`,s.fire("move",{dx:e,dy:t})},st=e=>{const{container:t,map:n,nodes:o}=e,i=n.querySelector("me-root"),s=i.offsetTop,r=i.offsetLeft,c=i.offsetWidth,l=i.offsetHeight;let d,f;return e.alignment==="root"?(d=t.offsetWidth/2-r-c/2,f=t.offsetHeight/2-s-l/2,n.style.transformOrigin=`${r+c/2}px 50%`):(d=(t.offsetWidth-o.offsetWidth)/2,f=(t.offsetHeight-o.offsetHeight)/2,n.style.transformOrigin="50% 50%"),{dx:d,dy:f}},jn=Object.freeze(Object.defineProperty({__proto__:null,cancelFocus:function(){this.isFocusMode=!1,this.tempDirection!==null&&(this.nodeData=this.nodeDataBackup,this.direction=this.tempDirection,this.tempDirection=null,this.refresh(),this.toCenter())},clearSelection:Tn,disableEdit:Dn,enableEdit:Mn,expandNode:function(e,t){const n=e.nodeObj;typeof t=="boolean"?n.expanded=t:n.expanded!==!1?n.expanded=!1:n.expanded=!0;const o=e.getBoundingClientRect(),i={x:o.left,y:o.top},s=e.parentNode,r=s.children[1];if(r.expanded=n.expanded,r.className=n.expanded?"minus":"",Z(e),n.expanded){const h=this.createChildren(n.children.map(g=>this.createWrapper(g).grp));s.parentNode.appendChild(h)}else s.parentNode.children[1].remove();this.linkDiv(e.closest("me-main > me-wrapper"));const c=e.getBoundingClientRect(),l={x:c.left,y:c.top},d=i.x-l.x,f=i.y-l.y;this.move(d,f),this.bus.fire("expandNode",n)},expandNodeAll:function(e,t){const n=e.nodeObj,o=e.getBoundingClientRect(),i={x:o.left,y:o.top};z(n,t??!n.expanded),this.refresh();const s=this.findEle(n.id).getBoundingClientRect(),r={x:s.left,y:s.top},c=i.x-r.x,l=i.y-r.y;this.move(c,l)},focusNode:function(e){e.nodeObj.parent&&(this.clearSelection(),this.tempDirection===null&&(this.tempDirection=this.direction),this.isFocusMode||(this.nodeDataBackup=this.nodeData,this.isFocusMode=!0),this.nodeData=e.nodeObj,this.initRight(),this.toCenter())},getData:An,getDataString:Ln,initLeft:function(){this.direction=0,this.refresh(),this.toCenter()},initRight:function(){this.direction=1,this.refresh(),this.toCenter()},initSide:function(){this.direction=2,this.refresh(),this.toCenter()},install:function(e){e(this)},move:On,refresh:function(e){this.clearSelection(),e&&(e=JSON.parse(JSON.stringify(e)),this.nodeData=e.nodeData,this.arrows=e.arrows||[],this.summaries=e.summaries||[],e.theme&&this.changeTheme(e.theme)),j(this.nodeData),this.layout(),this.linkDiv()},scale:Pn,scaleFit:$n,scrollIntoView:Sn,selectNode:Nn,selectNodes:kn,setLocale:function(e){this.locale=e,this.refresh()},toCenter:function(){const{map:e}=this,{dx:t,dy:n}=st(this);e.style.transform=`translate(${t}px, ${n}px) scale(${this.scaleVal})`},unselectNodes:_n},Symbol.toStringTag,{value:"Module"})),rt={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=ye([{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}}}},Hn="#4dc4ff";function ct(e,t,n,o,i,s,r,c){return{x:e/8+n*3/8+i*3/8+r/8,y:t/8+o*3/8+s*3/8+c/8}}function Bn(e,t,n){C(e,{x:t+"",y:n+""})}function ce(e,t,n,o,i){C(e,{x1:t+"",y1:n+"",x2:o+"",y2:i+""})}function lt(e,t,n,o,i,s,r,c,l,d){var u;if(e.line.setAttribute("d",`M ${t} ${n} C ${o} ${i} ${s} ${r} ${c} ${l}`),d.style){const a=d.style;a.stroke&&e.line.setAttribute("stroke",a.stroke),a.strokeWidth&&e.line.setAttribute("stroke-width",String(a.strokeWidth)),a.strokeDasharray&&e.line.setAttribute("stroke-dasharray",a.strokeDasharray),a.strokeLinecap&&e.line.setAttribute("stroke-linecap",a.strokeLinecap),a.opacity!==void 0&&e.line.setAttribute("opacity",String(a.opacity))}const f=ne(s,r,c,l);if(f&&(e.arrow1.setAttribute("d",`M ${f.x1} ${f.y1} L ${c} ${l} L ${f.x2} ${f.y2}`),d.style)){const a=d.style;a.stroke&&e.arrow1.setAttribute("stroke",a.stroke),a.strokeWidth&&e.arrow1.setAttribute("stroke-width",String(a.strokeWidth)),a.strokeLinecap&&e.arrow1.setAttribute("stroke-linecap",a.strokeLinecap),a.opacity!==void 0&&e.arrow1.setAttribute("opacity",String(a.opacity))}if(d.bidirectional){const a=ne(o,i,t,n);if(a&&(e.arrow2.setAttribute("d",`M ${a.x1} ${a.y1} L ${t} ${n} L ${a.x2} ${a.y2}`),d.style)){const p=d.style;p.stroke&&e.arrow2.setAttribute("stroke",p.stroke),p.strokeWidth&&e.arrow2.setAttribute("stroke-width",String(p.strokeWidth)),p.strokeLinecap&&e.arrow2.setAttribute("stroke-linecap",p.strokeLinecap),p.opacity!==void 0&&e.arrow2.setAttribute("opacity",String(p.opacity))}}const{x:h,y:g}=ct(t,n,o,i,s,r,c,l);Bn(e.label,h,g),(u=d.style)!=null&&u.labelColor&&e.label.setAttribute("fill",d.style.labelColor),qn(e)}function le(e,t,n){const{offsetLeft:o,offsetTop:i}=H(e.nodes,t),s=t.offsetWidth,r=t.offsetHeight,c=o+s/2,l=i+r/2,d=c+n.x,f=l+n.y;return{w:s,h:r,cx:c,cy:l,ctrlX:d,ctrlY:f}}function X(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 _e=function(e,t,n,o,i){var b;if(!t||!n)return;const s=le(e,t,o.delta1),r=le(e,n,o.delta2),{x:c,y:l}=X(s),{ctrlX:d,ctrlY:f}=s,{ctrlX:h,ctrlY:g}=r,{x:u,y:a}=X(r),p=ne(h,g,u,a);if(!p)return;const m=`M ${p.x1} ${p.y1} L ${u} ${a} L ${p.x2} ${p.y2}`;let v="";if(o.bidirectional){const E=ne(d,f,c,l);if(!E)return;v=`M ${E.x1} ${E.y1} L ${c} ${l} L ${E.x2} ${E.y2}`}const y=Dt(`M ${c} ${l} C ${d} ${f} ${h} ${g} ${u} ${a}`,m,v,o.style),{x:w,y:S}=ct(c,l,d,f,h,g,u,a),k=(b=o.style)==null?void 0:b.labelColor,x=Ee(o.label,w,S,{anchor:"middle",color:k,dataType:"custom-link"});y.appendChild(x),y.label=x,y.arrowObj=o,y.dataset.linkid=o.id,e.linkSvgGroup.appendChild(y),i||(e.arrows.push(o),e.currentArrow=y,at(e,o,s,r))},Rn=function(e,t,n={}){const o={id:F(),label:"Custom Link",from:e.nodeObj.id,to:t.nodeObj.id,delta1:{x:e.offsetWidth/2+100,y:0},delta2:{x:t.offsetWidth/2+100,y:0},...n};_e(this,e,t,o),this.bus.fire("operation",{name:"createArrow",obj:o})},Fn=function(e){ae(this);const t={...e,id:F()};_e(this,this.findEle(t.from),this.findEle(t.to),t),this.bus.fire("operation",{name:"createArrow",obj:t})},Wn=function(e){let t;if(e?t=e:t=this.currentArrow,!t)return;ae(this);const n=t.arrowObj.id;this.arrows=this.arrows.filter(o=>o.id!==n),t.remove(),this.bus.fire("operation",{name:"removeArrow",obj:{id:n}})},In=function(e){this.currentArrow=e;const t=e.arrowObj,n=this.findEle(t.from),o=this.findEle(t.to),i=le(this,n,t.delta1),s=le(this,o,t.delta2);at(this,t,i,s)},Kn=function(){ae(this),this.currentArrow=null},Te=function(e,t){const n=document.createElementNS(L,"path");return C(n,{d:e,stroke:t,fill:"none","stroke-width":"6","stroke-linecap":"round","stroke-linejoin":"round"}),n},Yn=function(e,t){const n=document.createElementNS(L,"g");n.setAttribute("class","arrow-highlight"),n.setAttribute("opacity","0.45");const o=Te(e.line.getAttribute("d"),t);n.appendChild(o);const i=Te(e.arrow1.getAttribute("d"),t);if(n.appendChild(i),e.arrow2.getAttribute("d")){const s=Te(e.arrow2.getAttribute("d"),t);n.appendChild(s)}e.insertBefore(n,e.firstChild)},Gn=function(e){const t=e.querySelector(".arrow-highlight");t&&t.remove()},qn=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"))},ae=function(e){var t,n;(t=e.helper1)==null||t.destroy(),(n=e.helper2)==null||n.destroy(),e.linkController.style.display="none",e.P2.style.display="none",e.P3.style.display="none",e.currentArrow&&Gn(e.currentArrow)},at=function(e,t,n,o){const{linkController:i,P2:s,P3:r,line1:c,line2:l,nodes:d,map:f,currentArrow:h,bus:g}=e;if(!h)return;i.style.display="initial",s.style.display="initial",r.style.display="initial",d.appendChild(i),d.appendChild(s),d.appendChild(r),Yn(h,Hn);let{x:u,y:a}=X(n),{ctrlX:p,ctrlY:m}=n,{ctrlX:v,ctrlY:y}=o,{x:w,y:S}=X(o);s.style.cssText=`top:${m}px;left:${p}px;`,r.style.cssText=`top:${y}px;left:${v}px;`,ce(c,u,a,p,m),ce(l,v,y,w,S),e.helper1=rt.create(s),e.helper2=rt.create(r),e.helper1.init(f,(k,x)=>{p=p+k/e.scaleVal,m=m+x/e.scaleVal;const b=X({...n,ctrlX:p,ctrlY:m});u=b.x,a=b.y,s.style.top=m+"px",s.style.left=p+"px",lt(h,u,a,p,m,v,y,w,S,t),ce(c,u,a,p,m),t.delta1.x=p-n.cx,t.delta1.y=m-n.cy,g.fire("updateArrowDelta",t)}),e.helper2.init(f,(k,x)=>{v=v+k/e.scaleVal,y=y+x/e.scaleVal;const b=X({...o,ctrlX:v,ctrlY:y});w=b.x,S=b.y,r.style.top=y+"px",r.style.left=v+"px",lt(h,u,a,p,m,v,y,w,S,t),ce(l,v,y,w,S),t.delta2.x=v-o.cx,t.delta2.y=y-o.cy,g.fire("updateArrowDelta",t)})};function zn(){this.linkSvgGroup.innerHTML="";for(let e=0;e<this.arrows.length;e++){const t=this.arrows[e];try{_e(this,this.findEle(t.from),this.findEle(t.to),t,!0)}catch{}}this.nodes.appendChild(this.linkSvgGroup)}function Vn(e){if(ae(this),!e)return;const t=e.label;Re(this,t,e.arrowObj)}function Un(){this.arrows=this.arrows.filter(e=>te(e.from,this.nodeData)&&te(e.to,this.nodeData))}const Xn=Object.freeze(Object.defineProperty({__proto__:null,createArrow:Rn,createArrowFrom:Fn,editArrowLabel:Vn,removeArrow:Wn,renderArrow:zn,selectArrow:In,tidyArrow:Un,unselectArrow:Kn},Symbol.toStringTag,{value:"Module"})),Jn=function(e){var l,d;if(e.length===0)throw new Error("No selected node.");if(e.length===1){const f=e[0].nodeObj,h=e[0].nodeObj.parent;if(!h)throw new Error("Can not select root node.");const g=h.children.findIndex(u=>f===u);return{parent:h.id,start:g,end:g}}let t=0;const n=e.map(f=>{let h=f.nodeObj;const g=[];for(;h.parent;){const u=h.parent,a=u.children,p=a==null?void 0:a.indexOf(h);h=u,g.unshift({node:h,index:p})}return g.length>t&&(t=g.length),g});let o=0;e:for(;o<t;o++){const f=(l=n[0][o])==null?void 0:l.node;for(let h=1;h<n.length;h++)if(((d=n[h][o])==null?void 0:d.node)!==f)break e}if(!o)throw new Error("Can not select root node.");const i=n.map(f=>f[o-1].index).sort(),s=i[0]||0,r=i[i.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:s,end:r}},Zn=function(e){const t=document.createElementNS(L,"g");return t.setAttribute("id",e),t},dt=function(e,t){const n=document.createElementNS(L,"path");return C(n,{d:e,stroke:t||"#666",fill:"none","stroke-linecap":"round","stroke-width":"2"}),n},Qn=e=>e.parentElement.parentElement,eo=function(e,{parent:t,start:n}){const o=e.findEle(t),i=o.nodeObj;let s;return i.parent?s=o.closest("me-main").className:s=e.findEle(i.children[n].id).closest("me-main").className,s},Le=function(e,t){var E;const{id:n,label:o,parent:i,start:s,end:r}=t,{nodes:c,theme:l,summarySvg:d}=e,h=e.findEle(i).nodeObj,g=eo(e,t);let u=1/0,a=0,p=0,m=0;for(let N=s;N<=r;N++){const P=(E=h.children)==null?void 0:E[N];if(!P)return e.removeSummary(n),null;const $=Qn(e.findEle(P.id)),{offsetLeft:Y,offsetTop:ft}=H(c,$),pt=s===r?10:20;N===s&&(p=ft+pt),N===r&&(m=ft+$.offsetHeight-pt),Y<u&&(u=Y),$.offsetWidth+Y>a&&(a=$.offsetWidth+Y)}let v,y;const w=p+10,S=m+10,k=(w+S)/2,x=l.cssVar["--color"];g===A.LHS?(v=dt(`M ${u+10} ${w} c -5 0 -10 5 -10 10 L ${u} ${S-10} c 0 5 5 10 10 10 M ${u} ${k} h -10`,x),y=Ee(o,u-20,k+6,{anchor:"end",color:x})):(v=dt(`M ${a-10} ${w} c 5 0 10 5 10 10 L ${a} ${S-10} c 0 5 -5 10 -10 10 M ${a} ${k} h 10`,x),y=Ee(o,a+20,k+6,{anchor:"start",color:x}));const b=Zn("s-"+n);return b.appendChild(v),b.appendChild(y),b.summaryObj=t,d.appendChild(b),b},to=Object.freeze(Object.defineProperty({__proto__:null,createSummary:function(){if(!this.currentNodes)return;const{currentNodes:e,summaries:t,bus:n}=this,{parent:o,start:i,end:s}=Jn(e),r={id:F(),parent:o,start:i,end:s,label:"summary"},c=Le(this,r);t.push(r),this.editSummary(c),n.fire("operation",{name:"createSummary",obj:r})},createSummaryFrom:function(e){const t=F(),n={...e,id:t};Le(this,n),this.summaries.push(n),this.bus.fire("operation",{name:"createSummary",obj:n})},editSummary:function(e){if(!e)return;const t=e.childNodes[1];Re(this,t,e.summaryObj)},removeSummary:function(e){var n;const t=this.summaries.findIndex(o=>o.id===e);t>-1&&(this.summaries.splice(t,1),(n=document.querySelector("#s-"+e))==null||n.remove()),this.bus.fire("operation",{name:"removeSummary",obj:{id:e}})},renderSummary:function(){this.summarySvg.innerHTML="",this.summaries.forEach(e=>{try{Le(this,e)}catch{}}),this.nodes.insertAdjacentElement("beforeend",this.summarySvg)},selectSummary:function(e){const t=e.children[1].getBBox(),n=6,o=3,i=document.createElementNS(L,"rect");C(i,{x:t.x-n+"",y:t.y-n+"",width:t.width+n*2+"",height:t.height+n*2+"",rx:o+"",stroke:this.theme.cssVar["--selected"]||"#4dc4ff","stroke-width":"2",fill:"none"}),e.appendChild(i),this.currentSummary=e},unselectSummary:function(){var e,t;(t=(e=this.currentSummary)==null?void 0:e.querySelector("rect"))==null||t.remove(),this.currentSummary=null}},Symbol.toStringTag,{value:"Module"})),T="http://www.w3.org/2000/svg";function no(e,t){const n=document.createElementNS(T,"svg");return C(n,{version:"1.1",xmlns:T,height:e,width:t}),n}function oo(e,t){return(parseInt(e)-parseInt(t))/2}function io(e,t,n,o){const i=document.createElementNS(T,"g");let s="";return e.text?s=e.text.textContent:s=e.childNodes[0].textContent,s.split(`
15
- `).forEach((c,l)=>{const d=document.createElementNS(T,"text");C(d,{x:n+parseInt(t.paddingLeft)+"",y:o+parseInt(t.paddingTop)+oo(t.lineHeight,t.fontSize)*(l+1)+parseFloat(t.fontSize)*(l+1)+"","text-anchor":"start","font-family":t.fontFamily,"font-size":`${t.fontSize}`,"font-weight":`${t.fontWeight}`,fill:`${t.color}`}),d.innerHTML=c,i.appendChild(d)}),i}function so(e,t,n,o){var c;let i="";(c=e.nodeObj)!=null&&c.dangerouslySetInnerHTML?i=e.nodeObj.dangerouslySetInnerHTML:e.text?i=e.text.textContent:i=e.childNodes[0].textContent;const s=document.createElementNS(T,"foreignObject");C(s,{x:n+parseInt(t.paddingLeft)+"",y:o+parseInt(t.paddingTop)+"",width:t.width,height:t.height});const r=document.createElement("div");return C(r,{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;`}),r.innerHTML=i,s.appendChild(r),s}function ro(e,t){const n=getComputedStyle(t),{offsetLeft:o,offsetTop:i}=H(e.nodes,t),s=document.createElementNS(T,"rect");return C(s,{x:o+"",y:i+"",rx:n.borderRadius,ry:n.borderRadius,width:n.width,height:n.height,fill:n.backgroundColor,stroke:n.borderColor,"stroke-width":n.borderWidth}),s}function de(e,t,n=!1){const o=getComputedStyle(t),{offsetLeft:i,offsetTop:s}=H(e.nodes,t),r=document.createElementNS(T,"rect");C(r,{x:i+"",y:s+"",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(T,"g");c.appendChild(r);let l;return n?l=so(t,o,i,s):l=io(t,o,i,s),c.appendChild(l),c}function co(e,t){const n=getComputedStyle(t),{offsetLeft:o,offsetTop:i}=H(e.nodes,t),s=document.createElementNS(T,"a"),r=document.createElementNS(T,"text");return C(r,{x:o+"",y:i+parseInt(n.fontSize)+"","text-anchor":"start","font-family":n.fontFamily,"font-size":`${n.fontSize}`,"font-weight":`${n.fontWeight}`,fill:`${n.color}`}),r.innerHTML=t.textContent,s.appendChild(r),s.setAttribute("href",t.href),s}function lo(e,t){const n=getComputedStyle(t),{offsetLeft:o,offsetTop:i}=H(e.nodes,t),s=document.createElementNS(T,"image");return C(s,{x:o+"",y:i+"",width:n.width+"",height:n.height+"",href:t.src}),s}const he=100,ao='<?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">',ho=(e,t=!1)=>{var h,g,u;const n=e.nodes,o=n.offsetHeight+he*2,i=n.offsetWidth+he*2,s=no(o+"px",i+"px"),r=document.createElementNS(T,"svg"),c=document.createElementNS(T,"rect");C(c,{x:"0",y:"0",width:`${i}`,height:`${o}`,fill:e.theme.cssVar["--bgcolor"]}),s.appendChild(c),n.querySelectorAll(".subLines").forEach(a=>{const p=a.cloneNode(!0),{offsetLeft:m,offsetTop:v}=H(n,a.parentElement);p.setAttribute("x",`${m}`),p.setAttribute("y",`${v}`),r.appendChild(p)});const l=(h=n.querySelector(".lines"))==null?void 0:h.cloneNode(!0);l&&r.appendChild(l);const d=(g=n.querySelector(".topiclinks"))==null?void 0:g.cloneNode(!0);d&&r.appendChild(d);const f=(u=n.querySelector(".summary"))==null?void 0:u.cloneNode(!0);return f&&r.appendChild(f),n.querySelectorAll("me-tpc").forEach(a=>{a.nodeObj.dangerouslySetInnerHTML?r.appendChild(de(e,a,!t)):(r.appendChild(ro(e,a)),r.appendChild(de(e,a.text,!t)))}),n.querySelectorAll(".tags > span").forEach(a=>{r.appendChild(de(e,a))}),n.querySelectorAll(".icons > span").forEach(a=>{r.appendChild(de(e,a))}),n.querySelectorAll(".hyper-link").forEach(a=>{r.appendChild(co(e,a))}),n.querySelectorAll("img").forEach(a=>{r.appendChild(lo(e,a))}),C(r,{x:he+"",y:he+"",overflow:"visible"}),s.appendChild(r),s},uo=(e,t)=>(t&&e.insertAdjacentHTML("afterbegin","<style>"+t+"</style>"),ao+e.outerHTML);function fo(e){return new Promise((t,n)=>{const o=new FileReader;o.onload=i=>{t(i.target.result)},o.onerror=i=>{n(i)},o.readAsDataURL(e)})}const po=Object.freeze(Object.defineProperty({__proto__:null,exportPng:async function(e=!1,t){const n=this.exportSvg(e,t),o=await fo(n);return new Promise((i,s)=>{const r=new Image;r.setAttribute("crossOrigin","anonymous"),r.onload=()=>{const c=document.createElement("canvas");c.width=r.width,c.height=r.height,c.getContext("2d").drawImage(r,0,0),c.toBlob(i,"image/png",1)},r.src=o,r.onerror=s})},exportSvg:function(e=!1,t){const n=ho(this,e),o=uo(n,t);return new Blob([o],{type:"image/svg+xml"})}},Symbol.toStringTag,{value:"Module"}));function go(e,t){return async function(...n){const o=this.before[t];o&&!await o.apply(this,n)||e.apply(this,n)}}const ht=Object.keys(it),ut={};for(let e=0;e<ht.length;e++){const t=ht[e];ut[t]=go(it[t],t)}const mo={getObjById:te,generateNewObj:gt,layout:St,linkDiv:Pt,editTopic:Mt,createWrapper:_t,createParent:Tt,createChildren:Lt,createTopic:At,findEle:Oe,changeTheme:rn,...jn,...ut,...Xn,...to,...po,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,j(this.nodeData),this.arrows=e.arrows||[],this.summaries=e.summaries||[],this.tidyArrow(),this.toolBar&&Jt(this),this.keypress&&xt(this,this.keypress),this.editable&&sn(this),this.contextMenu&&this.disposable.push($t(this,this.contextMenu)),this.draggable&&this.disposable.push(Bt(this)),this.allowUndo&&this.disposable.push(Ft(this)),this.layout(),this.linkDiv(),this.toCenter()},destroy(){var e;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.waitCopy=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,(e=this.selection)==null||e.destroy(),this.selection=void 0}};function vo({pT:e,pL:t,pW:n,pH:o,cT:i,cL:s,cW:r,cH:c,direction:l,containerHeight:d}){let f=t+n/2;const h=e+o/2;let g;l===A.LHS?g=s+r:g=s;const u=i+c/2,p=(1-Math.abs(u-h)/d)*.25*(n/2);return l===A.LHS?f=f-n/10-p:f=f+n/10+p,`M ${f} ${h} Q ${f} ${u} ${g} ${u}`}function yo({pT:e,pL:t,pW:n,pH:o,cT:i,cL:s,cW:r,cH:c,direction:l,isFirst:d}){const f=parseInt(this.container.style.getPropertyValue("--node-gap-x"));let h=0,g=0;d?h=e+o/2:h=e+o;const u=i+c;let a=0,p=0,m=0;const v=Math.abs(h-u)/300*f;return l===A.LHS?(m=t,a=m+f,p=m-f,g=s+f,`M ${a} ${h} C ${m} ${h} ${m+v} ${u} ${p} ${u} H ${g}`):(m=t+n,a=m-f,p=m+f,g=s+r-f,`M ${a} ${h} C ${m} ${h} ${m-v} ${u} ${p} ${u} H ${g}`)}const bo="5.1.0-beta.1";function wo(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 Q=document;function D({el:e,direction:t,locale:n,draggable:o,editable:i,contextMenu:s,toolBar:r,keypress:c,mouseSelectionButton:l,selectionContainer:d,before:f,newTopicName:h,allowUndo:g,generateMainBranch:u,generateSubBranch:a,overflowHidden:p,theme:m,alignment:v,scaleSensitivity:y,scaleMax:w,scaleMin:S,handleWheel:k,markdown:x,imageProxy:b}){let E=null;const N=Object.prototype.toString.call(e);if(N==="[object HTMLDivElement]"?E=e:N==="[object String]"&&(E=document.querySelector(e)),!E)throw new Error("MindElixir: el is not a valid element");E.style.position="relative",E.innerHTML="",this.el=E,this.disposable=[],this.before=f||{},this.locale=n||"en",this.newTopicName=h||"New Node",this.contextMenu=s??!0,this.toolBar=r??!0,this.keypress=c??!0,this.mouseSelectionButton=l??0,this.direction=t??1,this.draggable=o??!0,this.editable=i??!0,this.allowUndo=g??!0,this.scaleSensitivity=y??.1,this.scaleMax=w??1.4,this.scaleMin=S??.2,this.generateMainBranch=u||vo,this.generateSubBranch=a||yo,this.overflowHidden=p??!1,this.alignment=v??"root",this.handleWheel=k??!0,this.markdown=x||void 0,this.imageProxy=b||void 0,this.currentNodes=[],this.currentArrow=null,this.scaleVal=1,this.tempDirection=null,this.dragMoveHelper=wo(this),this.bus=Ct(),this.container=Q.createElement("div"),this.selectionContainer=d||this.container,this.container.className="map-container";const P=window.matchMedia("(prefers-color-scheme: dark)");this.theme=m||(P.matches?fe:ue);const $=Q.createElement("div");$.className="map-canvas",this.map=$,this.container.setAttribute("tabindex","0"),this.container.appendChild(this.map),this.el.appendChild(this.container),this.nodes=Q.createElement("me-nodes"),this.lines=J("lines"),this.summarySvg=J("summary"),this.linkController=J("linkcontroller"),this.P2=Q.createElement("div"),this.P3=Q.createElement("div"),this.P2.className=this.P3.className="circle",this.P2.style.display=this.P3.style.display="none",this.line1=Be(),this.line2=Be(),this.linkController.appendChild(this.line1),this.linkController.appendChild(this.line2),this.linkSvgGroup=J("topiclinks"),this.map.appendChild(this.nodes),this.overflowHidden?this.container.style.overflow="hidden":this.disposable.push(Et(this))}return D.prototype=mo,Object.defineProperty(D.prototype,"currentNode",{get(){return this.currentNodes[this.currentNodes.length-1]},enumerable:!0}),D.LEFT=0,D.RIGHT=1,D.SIDE=2,D.THEME=ue,D.DARK_THEME=fe,D.version=bo,D.E=Oe,D.new=e=>({nodeData:{id:F(),topic:e||"new topic",children:[]}}),D}();
15
+ `).forEach((c,l)=>{const d=document.createElementNS(T,"text");C(d,{x:n+parseInt(t.paddingLeft)+"",y:o+parseInt(t.paddingTop)+oo(t.lineHeight,t.fontSize)*(l+1)+parseFloat(t.fontSize)*(l+1)+"","text-anchor":"start","font-family":t.fontFamily,"font-size":`${t.fontSize}`,"font-weight":`${t.fontWeight}`,fill:`${t.color}`}),d.innerHTML=c,i.appendChild(d)}),i}function so(e,t,n,o){var c;let i="";(c=e.nodeObj)!=null&&c.dangerouslySetInnerHTML?i=e.nodeObj.dangerouslySetInnerHTML:e.text?i=e.text.textContent:i=e.childNodes[0].textContent;const s=document.createElementNS(T,"foreignObject");C(s,{x:n+parseInt(t.paddingLeft)+"",y:o+parseInt(t.paddingTop)+"",width:t.width,height:t.height});const r=document.createElement("div");return C(r,{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;`}),r.innerHTML=i,s.appendChild(r),s}function ro(e,t){const n=getComputedStyle(t),{offsetLeft:o,offsetTop:i}=H(e.nodes,t),s=document.createElementNS(T,"rect");return C(s,{x:o+"",y:i+"",rx:n.borderRadius,ry:n.borderRadius,width:n.width,height:n.height,fill:n.backgroundColor,stroke:n.borderColor,"stroke-width":n.borderWidth}),s}function de(e,t,n=!1){const o=getComputedStyle(t),{offsetLeft:i,offsetTop:s}=H(e.nodes,t),r=document.createElementNS(T,"rect");C(r,{x:i+"",y:s+"",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(T,"g");c.appendChild(r);let l;return n?l=so(t,o,i,s):l=io(t,o,i,s),c.appendChild(l),c}function co(e,t){const n=getComputedStyle(t),{offsetLeft:o,offsetTop:i}=H(e.nodes,t),s=document.createElementNS(T,"a"),r=document.createElementNS(T,"text");return C(r,{x:o+"",y:i+parseInt(n.fontSize)+"","text-anchor":"start","font-family":n.fontFamily,"font-size":`${n.fontSize}`,"font-weight":`${n.fontWeight}`,fill:`${n.color}`}),r.innerHTML=t.textContent,s.appendChild(r),s.setAttribute("href",t.href),s}function lo(e,t){const n=getComputedStyle(t),{offsetLeft:o,offsetTop:i}=H(e.nodes,t),s=document.createElementNS(T,"image");return C(s,{x:o+"",y:i+"",width:n.width+"",height:n.height+"",href:t.src}),s}const he=100,ao='<?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">',ho=(e,t=!1)=>{var h,g,u;const n=e.nodes,o=n.offsetHeight+he*2,i=n.offsetWidth+he*2,s=no(o+"px",i+"px"),r=document.createElementNS(T,"svg"),c=document.createElementNS(T,"rect");C(c,{x:"0",y:"0",width:`${i}`,height:`${o}`,fill:e.theme.cssVar["--bgcolor"]}),s.appendChild(c),n.querySelectorAll(".subLines").forEach(a=>{const p=a.cloneNode(!0),{offsetLeft:m,offsetTop:v}=H(n,a.parentElement);p.setAttribute("x",`${m}`),p.setAttribute("y",`${v}`),r.appendChild(p)});const l=(h=n.querySelector(".lines"))==null?void 0:h.cloneNode(!0);l&&r.appendChild(l);const d=(g=n.querySelector(".topiclinks"))==null?void 0:g.cloneNode(!0);d&&r.appendChild(d);const f=(u=n.querySelector(".summary"))==null?void 0:u.cloneNode(!0);return f&&r.appendChild(f),n.querySelectorAll("me-tpc").forEach(a=>{a.nodeObj.dangerouslySetInnerHTML?r.appendChild(de(e,a,!t)):(r.appendChild(ro(e,a)),r.appendChild(de(e,a.text,!t)))}),n.querySelectorAll(".tags > span").forEach(a=>{r.appendChild(de(e,a))}),n.querySelectorAll(".icons > span").forEach(a=>{r.appendChild(de(e,a))}),n.querySelectorAll(".hyper-link").forEach(a=>{r.appendChild(co(e,a))}),n.querySelectorAll("img").forEach(a=>{r.appendChild(lo(e,a))}),C(r,{x:he+"",y:he+"",overflow:"visible"}),s.appendChild(r),s},uo=(e,t)=>(t&&e.insertAdjacentHTML("afterbegin","<style>"+t+"</style>"),ao+e.outerHTML);function fo(e){return new Promise((t,n)=>{const o=new FileReader;o.onload=i=>{t(i.target.result)},o.onerror=i=>{n(i)},o.readAsDataURL(e)})}const po=Object.freeze(Object.defineProperty({__proto__:null,exportPng:async function(e=!1,t){const n=this.exportSvg(e,t),o=await fo(n);return new Promise((i,s)=>{const r=new Image;r.setAttribute("crossOrigin","anonymous"),r.onload=()=>{const c=document.createElement("canvas");c.width=r.width,c.height=r.height,c.getContext("2d").drawImage(r,0,0),c.toBlob(i,"image/png",1)},r.src=o,r.onerror=s})},exportSvg:function(e=!1,t){const n=ho(this,e),o=uo(n,t);return new Blob([o],{type:"image/svg+xml"})}},Symbol.toStringTag,{value:"Module"}));function go(e,t){return async function(...n){const o=this.before[t];o&&!await o.apply(this,n)||e.apply(this,n)}}const ht=Object.keys(it),ut={};for(let e=0;e<ht.length;e++){const t=ht[e];ut[t]=go(it[t],t)}const mo={getObjById:te,generateNewObj:gt,layout:St,linkDiv:Pt,editTopic:Mt,createWrapper:_t,createParent:Tt,createChildren:Lt,createTopic:At,findEle:Oe,changeTheme:rn,...jn,...ut,...Xn,...to,...po,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,j(this.nodeData),this.arrows=e.arrows||[],this.summaries=e.summaries||[],this.tidyArrow(),this.toolBar&&Jt(this),this.keypress&&xt(this,this.keypress),this.editable&&sn(this),this.contextMenu&&this.disposable.push($t(this,this.contextMenu)),this.draggable&&this.disposable.push(Bt(this)),this.allowUndo&&this.disposable.push(Ft(this)),this.layout(),this.linkDiv(),this.toCenter()},destroy(){var e;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.waitCopy=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,(e=this.selection)==null||e.destroy(),this.selection=void 0}};function vo({pT:e,pL:t,pW:n,pH:o,cT:i,cL:s,cW:r,cH:c,direction:l,containerHeight:d}){let f=t+n/2;const h=e+o/2;let g;l===A.LHS?g=s+r:g=s;const u=i+c/2,p=(1-Math.abs(u-h)/d)*.25*(n/2);return l===A.LHS?f=f-n/10-p:f=f+n/10+p,`M ${f} ${h} Q ${f} ${u} ${g} ${u}`}function yo({pT:e,pL:t,pW:n,pH:o,cT:i,cL:s,cW:r,cH:c,direction:l,isFirst:d}){const f=parseInt(this.container.style.getPropertyValue("--node-gap-x"));let h=0,g=0;d?h=e+o/2:h=e+o;const u=i+c;let a=0,p=0,m=0;const v=Math.abs(h-u)/300*f;return l===A.LHS?(m=t,a=m+f,p=m-f,g=s+f,`M ${a} ${h} C ${m} ${h} ${m+v} ${u} ${p} ${u} H ${g}`):(m=t+n,a=m-f,p=m+f,g=s+r-f,`M ${a} ${h} C ${m} ${h} ${m-v} ${u} ${p} ${u} H ${g}`)}const bo="5.1.0";function wo(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 Q=document;function D({el:e,direction:t,locale:n,draggable:o,editable:i,contextMenu:s,toolBar:r,keypress:c,mouseSelectionButton:l,selectionContainer:d,before:f,newTopicName:h,allowUndo:g,generateMainBranch:u,generateSubBranch:a,overflowHidden:p,theme:m,alignment:v,scaleSensitivity:y,scaleMax:w,scaleMin:S,handleWheel:k,markdown:x,imageProxy:b}){let E=null;const N=Object.prototype.toString.call(e);if(N==="[object HTMLDivElement]"?E=e:N==="[object String]"&&(E=document.querySelector(e)),!E)throw new Error("MindElixir: el is not a valid element");E.style.position="relative",E.innerHTML="",this.el=E,this.disposable=[],this.before=f||{},this.locale=n||"en",this.newTopicName=h||"New Node",this.contextMenu=s??!0,this.toolBar=r??!0,this.keypress=c??!0,this.mouseSelectionButton=l??0,this.direction=t??1,this.draggable=o??!0,this.editable=i??!0,this.allowUndo=g??!0,this.scaleSensitivity=y??.1,this.scaleMax=w??1.4,this.scaleMin=S??.2,this.generateMainBranch=u||vo,this.generateSubBranch=a||yo,this.overflowHidden=p??!1,this.alignment=v??"root",this.handleWheel=k??!0,this.markdown=x||void 0,this.imageProxy=b||void 0,this.currentNodes=[],this.currentArrow=null,this.scaleVal=1,this.tempDirection=null,this.dragMoveHelper=wo(this),this.bus=Ct(),this.container=Q.createElement("div"),this.selectionContainer=d||this.container,this.container.className="map-container";const P=window.matchMedia("(prefers-color-scheme: dark)");this.theme=m||(P.matches?fe:ue);const $=Q.createElement("div");$.className="map-canvas",this.map=$,this.container.setAttribute("tabindex","0"),this.container.appendChild(this.map),this.el.appendChild(this.container),this.nodes=Q.createElement("me-nodes"),this.lines=J("lines"),this.summarySvg=J("summary"),this.linkController=J("linkcontroller"),this.P2=Q.createElement("div"),this.P3=Q.createElement("div"),this.P2.className=this.P3.className="circle",this.P2.style.display=this.P3.style.display="none",this.line1=Be(),this.line2=Be(),this.linkController.appendChild(this.line1),this.linkController.appendChild(this.line2),this.linkSvgGroup=J("topiclinks"),this.map.appendChild(this.nodes),this.overflowHidden?this.container.style.overflow="hidden":this.disposable.push(Et(this))}return D.prototype=mo,Object.defineProperty(D.prototype,"currentNode",{get(){return this.currentNodes[this.currentNodes.length-1]},enumerable:!0}),D.LEFT=0,D.RIGHT=1,D.SIDE=2,D.THEME=ue,D.DARK_THEME=fe,D.version=bo,D.E=Oe,D.new=e=>({nodeData:{id:F(),topic:e||"new topic",children:[]}}),D}();
@@ -2613,7 +2613,7 @@ function Io({ pT: e, pL: t, pW: n, pH: o, cT: i, cL: s, cW: r, cH: l, direction:
2613
2613
  const v = Math.abs(h - u) / 300 * f;
2614
2614
  return c === M.LHS ? (m = t, a = m + f, p = m - f, g = s + f, `M ${a} ${h} C ${m} ${h} ${m + v} ${u} ${p} ${u} H ${g}`) : (m = t + n, a = m - f, p = m + f, g = s + r - f, `M ${a} ${h} C ${m} ${h} ${m - v} ${u} ${p} ${u} H ${g}`);
2615
2615
  }
2616
- const Ko = "5.1.0-beta.1";
2616
+ const Ko = "5.1.0";
2617
2617
  function Yo(e) {
2618
2618
  return {
2619
2619
  x: 0,
@@ -12,4 +12,4 @@ var MindElixirLite=function(){"use strict";const Ue="",K={name:"Latte",type:"lig
12
12
  padding: 2px 4px;
13
13
  margin: -2px -4px;
14
14
  `,ut(o),t.scrollIntoView(o),o.addEventListener("keydown",r=>{r.stopPropagation();const l=r.key;if(l==="Enter"||l==="Tab"){if(r.shiftKey)return;r.preventDefault(),o.blur(),t.container.focus()}}),o.addEventListener("blur",()=>{var l;if(!o)return;const r=((l=o.textContent)==null?void 0:l.trim())||"";r===""?n.label=i:n.label=r,o.remove(),r!==i&&(e.innerHTML=n.label,t.linkDiv(),"parent"in n?t.bus.fire("operation",{name:"finishEditSummary",obj:n}):t.bus.fire("operation",{name:"finishEditArrowLabel",obj:n}))})},It=function(t){const e=this.map.querySelector("me-root"),n=e.offsetTop,o=e.offsetLeft,i=e.offsetWidth,s=e.offsetHeight,r=this.map.querySelectorAll("me-main > me-wrapper");this.lines.innerHTML="";for(let l=0;l<r.length;l++){const h=r[l],f=h.querySelector("me-tpc"),{offsetLeft:u,offsetTop:p}=A(this.nodes,f),g=f.offsetWidth,a=f.offsetHeight,c=h.parentNode.className,d=this.generateMainBranch({pT:n,pL:o,pW:i,pH:s,cT:p,cL:u,cW:g,cH:a,direction:c,containerHeight:this.nodes.offsetHeight}),m=this.theme.palette,x=f.nodeObj.branchColor||m[l%m.length];if(f.style.borderColor=x,this.lines.appendChild(pt(d,x,"3")),t&&t!==h)continue;const w=G("subLines"),v=h.lastChild;v.tagName==="svg"&&v.remove(),h.appendChild(w),xt(this,w,x,h,c,!0)}this.renderArrow(),this.renderSummary(),this.bus.fire("linkDiv")},xt=function(t,e,n,o,i,s){const r=o.firstChild,l=o.children[1].children;if(l.length===0)return;const h=r.offsetTop,f=r.offsetLeft,u=r.offsetWidth,p=r.offsetHeight;for(let g=0;g<l.length;g++){const a=l[g],c=a.firstChild,d=c.offsetTop,m=c.offsetLeft,x=c.offsetWidth,w=c.offsetHeight,v=c.firstChild.nodeObj.branchColor||n,C=t.generateSubBranch({pT:h,pL:f,pW:u,pH:p,cT:d,cL:m,cW:x,cH:w,direction:i,isFirst:s});e.appendChild(pt(C,v,"2"));const S=c.children[1];if(S){if(!S.expanded)continue}else continue;xt(t,e,v,a,i)}},Ze="",Vt='<?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>',Rt='<?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>',Yt='<?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>',zt='<?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>',jt='<?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>',Xt='<?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>',_t='<?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>',tn="",qt={side:Vt,left:Rt,right:Yt,full:zt,living:jt,zoomin:Xt,zoomout:_t},H=(t,e)=>{const n=document.createElement("span");return n.id=t,n.innerHTML=qt[e],n};function Ut(t){const e=document.createElement("div"),n=H("fullscreen","full"),o=H("toCenter","living"),i=H("zoomout","zoomout"),s=H("zoomin","zoomin"),r=document.createElement("span");return r.innerText="100%",e.appendChild(n),e.appendChild(o),e.appendChild(i),e.appendChild(s),e.className="mind-elixir-toolbar rb",n.onclick=()=>{document.fullscreenElement===t.el?document.exitFullscreen():t.el.requestFullscreen()},o.onclick=()=>{t.toCenter()},i.onclick=()=>{t.scale(t.scaleVal-t.scaleSensitivity)},s.onclick=()=>{t.scale(t.scaleVal+t.scaleSensitivity)},e}function Kt(t){const e=document.createElement("div"),n=H("tbltl","left"),o=H("tbltr","right"),i=H("tblts","side");return e.appendChild(n),e.appendChild(o),e.appendChild(i),e.className="mind-elixir-toolbar lt",n.onclick=()=>{t.initLeft()},o.onclick=()=>{t.initRight()},i.onclick=()=>{t.initSide()},e}function Jt(t){t.container.append(Ut(t)),t.container.append(Kt(t))}const Qt=function(t,e=!0){this.theme=t;const o={...(t.type==="dark"?J:K).cssVar,...t.cssVar},i=Object.keys(o);for(let s=0;s<i.length;s++){const r=i[s];this.container.style.setProperty(r,o[r])}e&&this.refresh()},Zt=function(t){const n=t.parentElement.parentElement.lastElementChild;(n==null?void 0:n.tagName)==="svg"&&(n==null||n.remove())};function te(t){return{nodeData:t.isFocusMode?t.nodeDataBackup:t.nodeData,arrows:t.arrows,summaries:t.summaries,direction:t.direction,theme:t.theme}}const ee=function(t){const e=this.container,n=t.getBoundingClientRect(),o=e.getBoundingClientRect();if(n.top>o.bottom||n.bottom<o.top||n.left>o.right||n.right<o.left){const s=n.left+n.width/2,r=n.top+n.height/2,l=o.left+o.width/2,h=o.top+o.height/2,f=s-l,u=r-h;this.move(-f,-u,!0)}},ne=function(t,e,n){this.clearSelection(),this.scrollIntoView(t),this.selection.select(t),e&&this.bus.fire("selectNewNode",t.nodeObj)},oe=function(t){this.selection.select(t)},ie=function(t){this.selection.deselect(t)},se=function(){this.unselectNodes(this.currentNodes),this.unselectSummary(),this.unselectArrow()},re=function(){const t=te(this);return JSON.stringify(t,(e,n)=>{if(!(e==="parent"&&typeof n!="string"))return n})},ce=function(){return JSON.parse(this.getDataString())},le=function(){this.editable=!0},ae=function(){this.editable=!1},he=function(t,e={x:0,y:0}){if(t<this.scaleMin||t>this.scaleMax)return;const n=this.container.getBoundingClientRect(),o=e.x?e.x-n.left-n.width/2:0,i=e.y?e.y-n.top-n.height/2:0,{dx:s,dy:r}=wt(this),l=this.map.style.transform,{x:h,y:f}=rt(l),u=h-s,p=f-r,g=this.scaleVal,a=(-o+u)*(1-t/g),c=(-i+p)*(1-t/g);this.map.style.transform=`translate(${h-a}px, ${f-c}px) scale(${t})`,this.scaleVal=t,this.bus.fire("scale",t)},de=function(){const t=this.nodes.offsetHeight/this.container.offsetHeight,e=this.nodes.offsetWidth/this.container.offsetWidth,n=1/Math.max(1,Math.max(t,e));this.scaleVal=n,this.map.style.transform="scale("+n+")",this.bus.fire("scale",n)},fe=function(t,e,n=!1){const{map:o,scaleVal:i,bus:s}=this,r=o.style.transform;let{x:l,y:h}=rt(r);l+=t,h+=e,n&&(o.style.transition="transform 0.3s",setTimeout(()=>{o.style.transition="none"},300)),o.style.transform=`translate(${l}px, ${h}px) scale(${i})`,s.fire("move",{dx:t,dy:e})},wt=t=>{const{container:e,map:n,nodes:o}=t,i=n.querySelector("me-root"),s=i.offsetTop,r=i.offsetLeft,l=i.offsetWidth,h=i.offsetHeight;let f,u;return t.alignment==="root"?(f=e.offsetWidth/2-r-l/2,u=e.offsetHeight/2-s-h/2,n.style.transformOrigin=`${r+l/2}px 50%`):(f=(e.offsetWidth-o.offsetWidth)/2,u=(e.offsetHeight-o.offsetHeight)/2,n.style.transformOrigin="50% 50%"),{dx:f,dy:u}},ue=Object.freeze(Object.defineProperty({__proto__:null,cancelFocus:function(){this.isFocusMode=!1,this.tempDirection!==null&&(this.nodeData=this.nodeDataBackup,this.direction=this.tempDirection,this.tempDirection=null,this.refresh(),this.toCenter())},clearSelection:se,disableEdit:ae,enableEdit:le,expandNode:function(t,e){const n=t.nodeObj;typeof e=="boolean"?n.expanded=e:n.expanded!==!1?n.expanded=!1:n.expanded=!0;const o=t.getBoundingClientRect(),i={x:o.left,y:o.top},s=t.parentNode,r=s.children[1];if(r.expanded=n.expanded,r.className=n.expanded?"minus":"",Zt(t),n.expanded){const p=this.createChildren(n.children.map(g=>this.createWrapper(g).grp));s.parentNode.appendChild(p)}else s.parentNode.children[1].remove();this.linkDiv(t.closest("me-main > me-wrapper"));const l=t.getBoundingClientRect(),h={x:l.left,y:l.top},f=i.x-h.x,u=i.y-h.y;this.move(f,u),this.bus.fire("expandNode",n)},expandNodeAll:function(t,e){const n=t.nodeObj,o=t.getBoundingClientRect(),i={x:o.left,y:o.top};Z(n,e??!n.expanded),this.refresh();const s=this.findEle(n.id).getBoundingClientRect(),r={x:s.left,y:s.top},l=i.x-r.x,h=i.y-r.y;this.move(l,h)},focusNode:function(t){t.nodeObj.parent&&(this.clearSelection(),this.tempDirection===null&&(this.tempDirection=this.direction),this.isFocusMode||(this.nodeDataBackup=this.nodeData,this.isFocusMode=!0),this.nodeData=t.nodeObj,this.initRight(),this.toCenter())},getData:ce,getDataString:re,initLeft:function(){this.direction=0,this.refresh(),this.toCenter()},initRight:function(){this.direction=1,this.refresh(),this.toCenter()},initSide:function(){this.direction=2,this.refresh(),this.toCenter()},install:function(t){t(this)},move:fe,refresh:function(t){this.clearSelection(),t&&(t=JSON.parse(JSON.stringify(t)),this.nodeData=t.nodeData,this.arrows=t.arrows||[],this.summaries=t.summaries||[],t.theme&&this.changeTheme(t.theme)),Q(this.nodeData),this.layout(),this.linkDiv()},scale:he,scaleFit:de,scrollIntoView:ee,selectNode:ne,selectNodes:oe,setLocale:function(t){this.locale=t,this.refresh()},toCenter:function(){const{map:t}=this,{dx:e,dy:n}=wt(this);t.style.transform=`translate(${e}px, ${n}px) scale(${this.scaleVal})`},unselectNodes:ie},Symbol.toStringTag,{value:"Module"})),yt={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=ct([{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}}}},pe="#4dc4ff";function vt(t,e,n,o,i,s,r,l){return{x:t/8+n*3/8+i*3/8+r/8,y:e/8+o*3/8+s*3/8+l/8}}function ge(t,e,n){y(t,{x:e+"",y:n+""})}function Y(t,e,n,o,i){y(t,{x1:e+"",y1:n+"",x2:o+"",y2:i+""})}function bt(t,e,n,o,i,s,r,l,h,f){var a;if(t.line.setAttribute("d",`M ${e} ${n} C ${o} ${i} ${s} ${r} ${l} ${h}`),f.style){const c=f.style;c.stroke&&t.line.setAttribute("stroke",c.stroke),c.strokeWidth&&t.line.setAttribute("stroke-width",String(c.strokeWidth)),c.strokeDasharray&&t.line.setAttribute("stroke-dasharray",c.strokeDasharray),c.strokeLinecap&&t.line.setAttribute("stroke-linecap",c.strokeLinecap),c.opacity!==void 0&&t.line.setAttribute("opacity",String(c.opacity))}const u=V(s,r,l,h);if(u&&(t.arrow1.setAttribute("d",`M ${u.x1} ${u.y1} L ${l} ${h} L ${u.x2} ${u.y2}`),f.style)){const c=f.style;c.stroke&&t.arrow1.setAttribute("stroke",c.stroke),c.strokeWidth&&t.arrow1.setAttribute("stroke-width",String(c.strokeWidth)),c.strokeLinecap&&t.arrow1.setAttribute("stroke-linecap",c.strokeLinecap),c.opacity!==void 0&&t.arrow1.setAttribute("opacity",String(c.opacity))}if(f.bidirectional){const c=V(o,i,e,n);if(c&&(t.arrow2.setAttribute("d",`M ${c.x1} ${c.y1} L ${e} ${n} L ${c.x2} ${c.y2}`),f.style)){const d=f.style;d.stroke&&t.arrow2.setAttribute("stroke",d.stroke),d.strokeWidth&&t.arrow2.setAttribute("stroke-width",String(d.strokeWidth)),d.strokeLinecap&&t.arrow2.setAttribute("stroke-linecap",d.strokeLinecap),d.opacity!==void 0&&t.arrow2.setAttribute("opacity",String(d.opacity))}}const{x:p,y:g}=vt(e,n,o,i,s,r,l,h);ge(t.label,p,g),(a=f.style)!=null&&a.labelColor&&t.label.setAttribute("fill",f.style.labelColor),Se(t)}function z(t,e,n){const{offsetLeft:o,offsetTop:i}=A(t.nodes,e),s=e.offsetWidth,r=e.offsetHeight,l=o+s/2,h=i+r/2,f=l+n.x,u=h+n.y;return{w:s,h:r,cx:l,cy:h,ctrlX:f,ctrlY:u}}function O(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 nt=function(t,e,n,o,i){var b;if(!e||!n)return;const s=z(t,e,o.delta1),r=z(t,n,o.delta2),{x:l,y:h}=O(s),{ctrlX:f,ctrlY:u}=s,{ctrlX:p,ctrlY:g}=r,{x:a,y:c}=O(r),d=V(p,g,a,c);if(!d)return;const m=`M ${d.x1} ${d.y1} L ${a} ${c} L ${d.x2} ${d.y2}`;let x="";if(o.bidirectional){const E=V(f,u,l,h);if(!E)return;x=`M ${E.x1} ${E.y1} L ${l} ${h} L ${E.x2} ${E.y2}`}const w=Ft(`M ${l} ${h} C ${f} ${u} ${p} ${g} ${a} ${c}`,m,x,o.style),{x:v,y:C}=vt(l,h,f,u,p,g,a,c),S=(b=o.style)==null?void 0:b.labelColor,L=et(o.label,v,C,{anchor:"middle",color:S,dataType:"custom-link"});w.appendChild(L),w.label=L,w.arrowObj=o,w.dataset.linkid=o.id,t.linkSvgGroup.appendChild(w),i||(t.arrows.push(o),t.currentArrow=w,Ct(t,o,s,r))},me=function(t,e,n={}){const o={id:W(),label:"Custom Link",from:t.nodeObj.id,to:e.nodeObj.id,delta1:{x:t.offsetWidth/2+100,y:0},delta2:{x:e.offsetWidth/2+100,y:0},...n};nt(this,t,e,o),this.bus.fire("operation",{name:"createArrow",obj:o})},xe=function(t){j(this);const e={...t,id:W()};nt(this,this.findEle(e.from),this.findEle(e.to),e),this.bus.fire("operation",{name:"createArrow",obj:e})},we=function(t){let e;if(t?e=t:e=this.currentArrow,!e)return;j(this);const n=e.arrowObj.id;this.arrows=this.arrows.filter(o=>o.id!==n),e.remove(),this.bus.fire("operation",{name:"removeArrow",obj:{id:n}})},ye=function(t){this.currentArrow=t;const e=t.arrowObj,n=this.findEle(e.from),o=this.findEle(e.to),i=z(this,n,e.delta1),s=z(this,o,e.delta2);Ct(this,e,i,s)},ve=function(){j(this),this.currentArrow=null},ot=function(t,e){const n=document.createElementNS($,"path");return y(n,{d:t,stroke:e,fill:"none","stroke-width":"6","stroke-linecap":"round","stroke-linejoin":"round"}),n},be=function(t,e){const n=document.createElementNS($,"g");n.setAttribute("class","arrow-highlight"),n.setAttribute("opacity","0.45");const o=ot(t.line.getAttribute("d"),e);n.appendChild(o);const i=ot(t.arrow1.getAttribute("d"),e);if(n.appendChild(i),t.arrow2.getAttribute("d")){const s=ot(t.arrow2.getAttribute("d"),e);n.appendChild(s)}t.insertBefore(n,t.firstChild)},Ce=function(t){const e=t.querySelector(".arrow-highlight");e&&e.remove()},Se=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"))},j=function(t){var e,n;(e=t.helper1)==null||e.destroy(),(n=t.helper2)==null||n.destroy(),t.linkController.style.display="none",t.P2.style.display="none",t.P3.style.display="none",t.currentArrow&&Ce(t.currentArrow)},Ct=function(t,e,n,o){const{linkController:i,P2:s,P3:r,line1:l,line2:h,nodes:f,map:u,currentArrow:p,bus:g}=t;if(!p)return;i.style.display="initial",s.style.display="initial",r.style.display="initial",f.appendChild(i),f.appendChild(s),f.appendChild(r),be(p,pe);let{x:a,y:c}=O(n),{ctrlX:d,ctrlY:m}=n,{ctrlX:x,ctrlY:w}=o,{x:v,y:C}=O(o);s.style.cssText=`top:${m}px;left:${d}px;`,r.style.cssText=`top:${w}px;left:${x}px;`,Y(l,a,c,d,m),Y(h,x,w,v,C),t.helper1=yt.create(s),t.helper2=yt.create(r),t.helper1.init(u,(S,L)=>{d=d+S/t.scaleVal,m=m+L/t.scaleVal;const b=O({...n,ctrlX:d,ctrlY:m});a=b.x,c=b.y,s.style.top=m+"px",s.style.left=d+"px",bt(p,a,c,d,m,x,w,v,C,e),Y(l,a,c,d,m),e.delta1.x=d-n.cx,e.delta1.y=m-n.cy,g.fire("updateArrowDelta",e)}),t.helper2.init(u,(S,L)=>{x=x+S/t.scaleVal,w=w+L/t.scaleVal;const b=O({...o,ctrlX:x,ctrlY:w});v=b.x,C=b.y,r.style.top=w+"px",r.style.left=x+"px",bt(p,a,c,d,m,x,w,v,C,e),Y(h,x,w,v,C),e.delta2.x=x-o.cx,e.delta2.y=w-o.cy,g.fire("updateArrowDelta",e)})};function Ee(){this.linkSvgGroup.innerHTML="";for(let t=0;t<this.arrows.length;t++){const e=this.arrows[t];try{nt(this,this.findEle(e.from),this.findEle(e.to),e,!0)}catch{}}this.nodes.appendChild(this.linkSvgGroup)}function ke(t){if(j(this),!t)return;const e=t.label;mt(this,e,t.arrowObj)}function Te(){this.arrows=this.arrows.filter(t=>I(t.from,this.nodeData)&&I(t.to,this.nodeData))}const Le=Object.freeze(Object.defineProperty({__proto__:null,createArrow:me,createArrowFrom:xe,editArrowLabel:ke,removeArrow:we,renderArrow:Ee,selectArrow:ye,tidyArrow:Te,unselectArrow:ve},Symbol.toStringTag,{value:"Module"})),$e=function(t){var h,f;if(t.length===0)throw new Error("No selected node.");if(t.length===1){const u=t[0].nodeObj,p=t[0].nodeObj.parent;if(!p)throw new Error("Can not select root node.");const g=p.children.findIndex(a=>u===a);return{parent:p.id,start:g,end:g}}let e=0;const n=t.map(u=>{let p=u.nodeObj;const g=[];for(;p.parent;){const a=p.parent,c=a.children,d=c==null?void 0:c.indexOf(p);p=a,g.unshift({node:p,index:d})}return g.length>e&&(e=g.length),g});let o=0;t:for(;o<e;o++){const u=(h=n[0][o])==null?void 0:h.node;for(let p=1;p<n.length;p++)if(((f=n[p][o])==null?void 0:f.node)!==u)break t}if(!o)throw new Error("Can not select root node.");const i=n.map(u=>u[o-1].index).sort(),s=i[0]||0,r=i[i.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:s,end:r}},Me=function(t){const e=document.createElementNS($,"g");return e.setAttribute("id",t),e},St=function(t,e){const n=document.createElementNS($,"path");return y(n,{d:t,stroke:e||"#666",fill:"none","stroke-linecap":"round","stroke-width":"2"}),n},Ae=t=>t.parentElement.parentElement,Ne=function(t,{parent:e,start:n}){const o=t.findEle(e),i=o.nodeObj;let s;return i.parent?s=o.closest("me-main").className:s=t.findEle(i.children[n].id).closest("me-main").className,s},it=function(t,e){var E;const{id:n,label:o,parent:i,start:s,end:r}=e,{nodes:l,theme:h,summarySvg:f}=t,p=t.findEle(i).nodeObj,g=Ne(t,e);let a=1/0,c=0,d=0,m=0;for(let N=s;N<=r;N++){const q=(E=p.children)==null?void 0:E[N];if(!q)return t.removeSummary(n),null;const B=Ae(t.findEle(q.id)),{offsetLeft:U,offsetTop:Et}=A(l,B),kt=s===r?10:20;N===s&&(d=Et+kt),N===r&&(m=Et+B.offsetHeight-kt),U<a&&(a=U),B.offsetWidth+U>c&&(c=B.offsetWidth+U)}let x,w;const v=d+10,C=m+10,S=(v+C)/2,L=h.cssVar["--color"];g===D.LHS?(x=St(`M ${a+10} ${v} c -5 0 -10 5 -10 10 L ${a} ${C-10} c 0 5 5 10 10 10 M ${a} ${S} h -10`,L),w=et(o,a-20,S+6,{anchor:"end",color:L})):(x=St(`M ${c-10} ${v} c 5 0 10 5 10 10 L ${c} ${C-10} c 0 5 -5 10 -10 10 M ${c} ${S} h 10`,L),w=et(o,c+20,S+6,{anchor:"start",color:L}));const b=Me("s-"+n);return b.appendChild(x),b.appendChild(w),b.summaryObj=e,f.appendChild(b),b},De=Object.freeze(Object.defineProperty({__proto__:null,createSummary:function(){if(!this.currentNodes)return;const{currentNodes:t,summaries:e,bus:n}=this,{parent:o,start:i,end:s}=$e(t),r={id:W(),parent:o,start:i,end:s,label:"summary"},l=it(this,r);e.push(r),this.editSummary(l),n.fire("operation",{name:"createSummary",obj:r})},createSummaryFrom:function(t){const e=W(),n={...t,id:e};it(this,n),this.summaries.push(n),this.bus.fire("operation",{name:"createSummary",obj:n})},editSummary:function(t){if(!t)return;const e=t.childNodes[1];mt(this,e,t.summaryObj)},removeSummary:function(t){var n;const e=this.summaries.findIndex(o=>o.id===t);e>-1&&(this.summaries.splice(e,1),(n=document.querySelector("#s-"+t))==null||n.remove()),this.bus.fire("operation",{name:"removeSummary",obj:{id:t}})},renderSummary:function(){this.summarySvg.innerHTML="",this.summaries.forEach(t=>{try{it(this,t)}catch{}}),this.nodes.insertAdjacentElement("beforeend",this.summarySvg)},selectSummary:function(t){const e=t.children[1].getBBox(),n=6,o=3,i=document.createElementNS($,"rect");y(i,{x:e.x-n+"",y:e.y-n+"",width:e.width+n*2+"",height:e.height+n*2+"",rx:o+"",stroke:this.theme.cssVar["--selected"]||"#4dc4ff","stroke-width":"2",fill:"none"}),t.appendChild(i),this.currentSummary=t},unselectSummary:function(){var t,e;(e=(t=this.currentSummary)==null?void 0:t.querySelector("rect"))==null||e.remove(),this.currentSummary=null}},Symbol.toStringTag,{value:"Module"})),T="http://www.w3.org/2000/svg";function Pe(t,e){const n=document.createElementNS(T,"svg");return y(n,{version:"1.1",xmlns:T,height:t,width:e}),n}function He(t,e){return(parseInt(t)-parseInt(e))/2}function Be(t,e,n,o){const i=document.createElementNS(T,"g");let s="";return t.text?s=t.text.textContent:s=t.childNodes[0].textContent,s.split(`
15
- `).forEach((l,h)=>{const f=document.createElementNS(T,"text");y(f,{x:n+parseInt(e.paddingLeft)+"",y:o+parseInt(e.paddingTop)+He(e.lineHeight,e.fontSize)*(h+1)+parseFloat(e.fontSize)*(h+1)+"","text-anchor":"start","font-family":e.fontFamily,"font-size":`${e.fontSize}`,"font-weight":`${e.fontWeight}`,fill:`${e.color}`}),f.innerHTML=l,i.appendChild(f)}),i}function Oe(t,e,n,o){var l;let i="";(l=t.nodeObj)!=null&&l.dangerouslySetInnerHTML?i=t.nodeObj.dangerouslySetInnerHTML:t.text?i=t.text.textContent:i=t.childNodes[0].textContent;const s=document.createElementNS(T,"foreignObject");y(s,{x:n+parseInt(e.paddingLeft)+"",y:o+parseInt(e.paddingTop)+"",width:e.width,height:e.height});const r=document.createElement("div");return y(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=i,s.appendChild(r),s}function We(t,e){const n=getComputedStyle(e),{offsetLeft:o,offsetTop:i}=A(t.nodes,e),s=document.createElementNS(T,"rect");return y(s,{x:o+"",y:i+"",rx:n.borderRadius,ry:n.borderRadius,width:n.width,height:n.height,fill:n.backgroundColor,stroke:n.borderColor,"stroke-width":n.borderWidth}),s}function X(t,e,n=!1){const o=getComputedStyle(e),{offsetLeft:i,offsetTop:s}=A(t.nodes,e),r=document.createElementNS(T,"rect");y(r,{x:i+"",y:s+"",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(T,"g");l.appendChild(r);let h;return n?h=Oe(e,o,i,s):h=Be(e,o,i,s),l.appendChild(h),l}function Ge(t,e){const n=getComputedStyle(e),{offsetLeft:o,offsetTop:i}=A(t.nodes,e),s=document.createElementNS(T,"a"),r=document.createElementNS(T,"text");return y(r,{x:o+"",y:i+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,s.appendChild(r),s.setAttribute("href",e.href),s}function Fe(t,e){const n=getComputedStyle(e),{offsetLeft:o,offsetTop:i}=A(t.nodes,e),s=document.createElementNS(T,"image");return y(s,{x:o+"",y:i+"",width:n.width+"",height:n.height+"",href:e.src}),s}const _=100,Ie='<?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">',Ve=(t,e=!1)=>{var p,g,a;const n=t.nodes,o=n.offsetHeight+_*2,i=n.offsetWidth+_*2,s=Pe(o+"px",i+"px"),r=document.createElementNS(T,"svg"),l=document.createElementNS(T,"rect");y(l,{x:"0",y:"0",width:`${i}`,height:`${o}`,fill:t.theme.cssVar["--bgcolor"]}),s.appendChild(l),n.querySelectorAll(".subLines").forEach(c=>{const d=c.cloneNode(!0),{offsetLeft:m,offsetTop:x}=A(n,c.parentElement);d.setAttribute("x",`${m}`),d.setAttribute("y",`${x}`),r.appendChild(d)});const h=(p=n.querySelector(".lines"))==null?void 0:p.cloneNode(!0);h&&r.appendChild(h);const f=(g=n.querySelector(".topiclinks"))==null?void 0:g.cloneNode(!0);f&&r.appendChild(f);const u=(a=n.querySelector(".summary"))==null?void 0:a.cloneNode(!0);return u&&r.appendChild(u),n.querySelectorAll("me-tpc").forEach(c=>{c.nodeObj.dangerouslySetInnerHTML?r.appendChild(X(t,c,!e)):(r.appendChild(We(t,c)),r.appendChild(X(t,c.text,!e)))}),n.querySelectorAll(".tags > span").forEach(c=>{r.appendChild(X(t,c))}),n.querySelectorAll(".icons > span").forEach(c=>{r.appendChild(X(t,c))}),n.querySelectorAll(".hyper-link").forEach(c=>{r.appendChild(Ge(t,c))}),n.querySelectorAll("img").forEach(c=>{r.appendChild(Fe(t,c))}),y(r,{x:_+"",y:_+"",overflow:"visible"}),s.appendChild(r),s},Re=(t,e)=>(e&&t.insertAdjacentHTML("afterbegin","<style>"+e+"</style>"),Ie+t.outerHTML);function Ye(t){return new Promise((e,n)=>{const o=new FileReader;o.onload=i=>{e(i.target.result)},o.onerror=i=>{n(i)},o.readAsDataURL(t)})}const ze={getObjById:I,generateNewObj:Lt,layout:At,linkDiv:It,editTopic:Wt,createWrapper:Pt,createParent:Ht,createChildren:Bt,createTopic:Ot,findEle:dt,changeTheme:Qt,...ue,...{},...Le,...De,...Object.freeze(Object.defineProperty({__proto__:null,exportPng:async function(t=!1,e){const n=this.exportSvg(t,e),o=await Ye(n);return new Promise((i,s)=>{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(i,"image/png",1)},r.src=o,r.onerror=s})},exportSvg:function(t=!1,e){const n=Ve(this,t),o=Re(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,Q(this.nodeData),this.arrows=t.arrows||[],this.summaries=t.summaries||[],this.tidyArrow(),this.toolBar&&Jt(this),this.layout(),this.linkDiv(),this.toCenter()},destroy(){var t;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.waitCopy=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,(t=this.selection)==null||t.destroy(),this.selection=void 0}};function je({pT:t,pL:e,pW:n,pH:o,cT:i,cL:s,cW:r,cH:l,direction:h,containerHeight:f}){let u=e+n/2;const p=t+o/2;let g;h===D.LHS?g=s+r:g=s;const a=i+l/2,d=(1-Math.abs(a-p)/f)*.25*(n/2);return h===D.LHS?u=u-n/10-d:u=u+n/10+d,`M ${u} ${p} Q ${u} ${a} ${g} ${a}`}function Xe({pT:t,pL:e,pW:n,pH:o,cT:i,cL:s,cW:r,cH:l,direction:h,isFirst:f}){const u=parseInt(this.container.style.getPropertyValue("--node-gap-x"));let p=0,g=0;f?p=t+o/2:p=t+o;const a=i+l;let c=0,d=0,m=0;const x=Math.abs(p-a)/300*u;return h===D.LHS?(m=e,c=m+u,d=m-u,g=s+u,`M ${c} ${p} C ${m} ${p} ${m+x} ${a} ${d} ${a} H ${g}`):(m=e+n,c=m-u,d=m+u,g=s+r-u,`M ${c} ${p} C ${m} ${p} ${m-x} ${a} ${d} ${a} H ${g}`)}const _e="5.1.0-beta.1";function qe(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 M({el:t,direction:e,locale:n,draggable:o,editable:i,contextMenu:s,toolBar:r,keypress:l,mouseSelectionButton:h,selectionContainer:f,before:u,newTopicName:p,allowUndo:g,generateMainBranch:a,generateSubBranch:c,overflowHidden:d,theme:m,alignment:x,scaleSensitivity:w,scaleMax:v,scaleMin:C,handleWheel:S,markdown:L,imageProxy:b}){let E=null;const N=Object.prototype.toString.call(t);if(N==="[object HTMLDivElement]"?E=t:N==="[object String]"&&(E=document.querySelector(t)),!E)throw new Error("MindElixir: el is not a valid element");E.style.position="relative",E.innerHTML="",this.el=E,this.disposable=[],this.before=u||{},this.locale=n||"en",this.newTopicName=p||"New Node",this.contextMenu=s??!0,this.toolBar=r??!0,this.keypress=l??!0,this.mouseSelectionButton=h??0,this.direction=e??1,this.draggable=o??!0,this.editable=i??!0,this.allowUndo=g??!0,this.scaleSensitivity=w??.1,this.scaleMax=v??1.4,this.scaleMin=C??.2,this.generateMainBranch=a||je,this.generateSubBranch=c||Xe,this.overflowHidden=d??!1,this.alignment=x??"root",this.handleWheel=S??!0,this.markdown=L||void 0,this.imageProxy=b||void 0,this.currentNodes=[],this.currentArrow=null,this.scaleVal=1,this.tempDirection=null,this.dragMoveHelper=qe(this),this.bus=Mt(),this.container=F.createElement("div"),this.selectionContainer=f||this.container,this.container.className="map-container";const q=window.matchMedia("(prefers-color-scheme: dark)");this.theme=m||(q.matches?J:K);const B=F.createElement("div");B.className="map-canvas",this.map=B,this.container.setAttribute("tabindex","0"),this.container.appendChild(this.map),this.el.appendChild(this.container),this.nodes=F.createElement("me-nodes"),this.lines=G("lines"),this.summarySvg=G("summary"),this.linkController=G("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=gt(),this.line2=gt(),this.linkController.appendChild(this.line1),this.linkController.appendChild(this.line2),this.linkSvgGroup=G("topiclinks"),this.map.appendChild(this.nodes),this.overflowHidden?this.container.style.overflow="hidden":this.disposable.push($t(this))}return M.prototype=ze,Object.defineProperty(M.prototype,"currentNode",{get(){return this.currentNodes[this.currentNodes.length-1]},enumerable:!0}),M.LEFT=0,M.RIGHT=1,M.SIDE=2,M.THEME=K,M.DARK_THEME=J,M.version=_e,M.E=dt,M}();
15
+ `).forEach((l,h)=>{const f=document.createElementNS(T,"text");y(f,{x:n+parseInt(e.paddingLeft)+"",y:o+parseInt(e.paddingTop)+He(e.lineHeight,e.fontSize)*(h+1)+parseFloat(e.fontSize)*(h+1)+"","text-anchor":"start","font-family":e.fontFamily,"font-size":`${e.fontSize}`,"font-weight":`${e.fontWeight}`,fill:`${e.color}`}),f.innerHTML=l,i.appendChild(f)}),i}function Oe(t,e,n,o){var l;let i="";(l=t.nodeObj)!=null&&l.dangerouslySetInnerHTML?i=t.nodeObj.dangerouslySetInnerHTML:t.text?i=t.text.textContent:i=t.childNodes[0].textContent;const s=document.createElementNS(T,"foreignObject");y(s,{x:n+parseInt(e.paddingLeft)+"",y:o+parseInt(e.paddingTop)+"",width:e.width,height:e.height});const r=document.createElement("div");return y(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=i,s.appendChild(r),s}function We(t,e){const n=getComputedStyle(e),{offsetLeft:o,offsetTop:i}=A(t.nodes,e),s=document.createElementNS(T,"rect");return y(s,{x:o+"",y:i+"",rx:n.borderRadius,ry:n.borderRadius,width:n.width,height:n.height,fill:n.backgroundColor,stroke:n.borderColor,"stroke-width":n.borderWidth}),s}function X(t,e,n=!1){const o=getComputedStyle(e),{offsetLeft:i,offsetTop:s}=A(t.nodes,e),r=document.createElementNS(T,"rect");y(r,{x:i+"",y:s+"",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(T,"g");l.appendChild(r);let h;return n?h=Oe(e,o,i,s):h=Be(e,o,i,s),l.appendChild(h),l}function Ge(t,e){const n=getComputedStyle(e),{offsetLeft:o,offsetTop:i}=A(t.nodes,e),s=document.createElementNS(T,"a"),r=document.createElementNS(T,"text");return y(r,{x:o+"",y:i+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,s.appendChild(r),s.setAttribute("href",e.href),s}function Fe(t,e){const n=getComputedStyle(e),{offsetLeft:o,offsetTop:i}=A(t.nodes,e),s=document.createElementNS(T,"image");return y(s,{x:o+"",y:i+"",width:n.width+"",height:n.height+"",href:e.src}),s}const _=100,Ie='<?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">',Ve=(t,e=!1)=>{var p,g,a;const n=t.nodes,o=n.offsetHeight+_*2,i=n.offsetWidth+_*2,s=Pe(o+"px",i+"px"),r=document.createElementNS(T,"svg"),l=document.createElementNS(T,"rect");y(l,{x:"0",y:"0",width:`${i}`,height:`${o}`,fill:t.theme.cssVar["--bgcolor"]}),s.appendChild(l),n.querySelectorAll(".subLines").forEach(c=>{const d=c.cloneNode(!0),{offsetLeft:m,offsetTop:x}=A(n,c.parentElement);d.setAttribute("x",`${m}`),d.setAttribute("y",`${x}`),r.appendChild(d)});const h=(p=n.querySelector(".lines"))==null?void 0:p.cloneNode(!0);h&&r.appendChild(h);const f=(g=n.querySelector(".topiclinks"))==null?void 0:g.cloneNode(!0);f&&r.appendChild(f);const u=(a=n.querySelector(".summary"))==null?void 0:a.cloneNode(!0);return u&&r.appendChild(u),n.querySelectorAll("me-tpc").forEach(c=>{c.nodeObj.dangerouslySetInnerHTML?r.appendChild(X(t,c,!e)):(r.appendChild(We(t,c)),r.appendChild(X(t,c.text,!e)))}),n.querySelectorAll(".tags > span").forEach(c=>{r.appendChild(X(t,c))}),n.querySelectorAll(".icons > span").forEach(c=>{r.appendChild(X(t,c))}),n.querySelectorAll(".hyper-link").forEach(c=>{r.appendChild(Ge(t,c))}),n.querySelectorAll("img").forEach(c=>{r.appendChild(Fe(t,c))}),y(r,{x:_+"",y:_+"",overflow:"visible"}),s.appendChild(r),s},Re=(t,e)=>(e&&t.insertAdjacentHTML("afterbegin","<style>"+e+"</style>"),Ie+t.outerHTML);function Ye(t){return new Promise((e,n)=>{const o=new FileReader;o.onload=i=>{e(i.target.result)},o.onerror=i=>{n(i)},o.readAsDataURL(t)})}const ze={getObjById:I,generateNewObj:Lt,layout:At,linkDiv:It,editTopic:Wt,createWrapper:Pt,createParent:Ht,createChildren:Bt,createTopic:Ot,findEle:dt,changeTheme:Qt,...ue,...{},...Le,...De,...Object.freeze(Object.defineProperty({__proto__:null,exportPng:async function(t=!1,e){const n=this.exportSvg(t,e),o=await Ye(n);return new Promise((i,s)=>{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(i,"image/png",1)},r.src=o,r.onerror=s})},exportSvg:function(t=!1,e){const n=Ve(this,t),o=Re(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,Q(this.nodeData),this.arrows=t.arrows||[],this.summaries=t.summaries||[],this.tidyArrow(),this.toolBar&&Jt(this),this.layout(),this.linkDiv(),this.toCenter()},destroy(){var t;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.waitCopy=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,(t=this.selection)==null||t.destroy(),this.selection=void 0}};function je({pT:t,pL:e,pW:n,pH:o,cT:i,cL:s,cW:r,cH:l,direction:h,containerHeight:f}){let u=e+n/2;const p=t+o/2;let g;h===D.LHS?g=s+r:g=s;const a=i+l/2,d=(1-Math.abs(a-p)/f)*.25*(n/2);return h===D.LHS?u=u-n/10-d:u=u+n/10+d,`M ${u} ${p} Q ${u} ${a} ${g} ${a}`}function Xe({pT:t,pL:e,pW:n,pH:o,cT:i,cL:s,cW:r,cH:l,direction:h,isFirst:f}){const u=parseInt(this.container.style.getPropertyValue("--node-gap-x"));let p=0,g=0;f?p=t+o/2:p=t+o;const a=i+l;let c=0,d=0,m=0;const x=Math.abs(p-a)/300*u;return h===D.LHS?(m=e,c=m+u,d=m-u,g=s+u,`M ${c} ${p} C ${m} ${p} ${m+x} ${a} ${d} ${a} H ${g}`):(m=e+n,c=m-u,d=m+u,g=s+r-u,`M ${c} ${p} C ${m} ${p} ${m-x} ${a} ${d} ${a} H ${g}`)}const _e="5.1.0";function qe(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 M({el:t,direction:e,locale:n,draggable:o,editable:i,contextMenu:s,toolBar:r,keypress:l,mouseSelectionButton:h,selectionContainer:f,before:u,newTopicName:p,allowUndo:g,generateMainBranch:a,generateSubBranch:c,overflowHidden:d,theme:m,alignment:x,scaleSensitivity:w,scaleMax:v,scaleMin:C,handleWheel:S,markdown:L,imageProxy:b}){let E=null;const N=Object.prototype.toString.call(t);if(N==="[object HTMLDivElement]"?E=t:N==="[object String]"&&(E=document.querySelector(t)),!E)throw new Error("MindElixir: el is not a valid element");E.style.position="relative",E.innerHTML="",this.el=E,this.disposable=[],this.before=u||{},this.locale=n||"en",this.newTopicName=p||"New Node",this.contextMenu=s??!0,this.toolBar=r??!0,this.keypress=l??!0,this.mouseSelectionButton=h??0,this.direction=e??1,this.draggable=o??!0,this.editable=i??!0,this.allowUndo=g??!0,this.scaleSensitivity=w??.1,this.scaleMax=v??1.4,this.scaleMin=C??.2,this.generateMainBranch=a||je,this.generateSubBranch=c||Xe,this.overflowHidden=d??!1,this.alignment=x??"root",this.handleWheel=S??!0,this.markdown=L||void 0,this.imageProxy=b||void 0,this.currentNodes=[],this.currentArrow=null,this.scaleVal=1,this.tempDirection=null,this.dragMoveHelper=qe(this),this.bus=Mt(),this.container=F.createElement("div"),this.selectionContainer=f||this.container,this.container.className="map-container";const q=window.matchMedia("(prefers-color-scheme: dark)");this.theme=m||(q.matches?J:K);const B=F.createElement("div");B.className="map-canvas",this.map=B,this.container.setAttribute("tabindex","0"),this.container.appendChild(this.map),this.el.appendChild(this.container),this.nodes=F.createElement("me-nodes"),this.lines=G("lines"),this.summarySvg=G("summary"),this.linkController=G("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=gt(),this.line2=gt(),this.linkController.appendChild(this.line1),this.linkController.appendChild(this.line2),this.linkSvgGroup=G("topiclinks"),this.map.appendChild(this.nodes),this.overflowHidden?this.container.style.overflow="hidden":this.disposable.push($t(this))}return M.prototype=ze,Object.defineProperty(M.prototype,"currentNode",{get(){return this.currentNodes[this.currentNodes.length-1]},enumerable:!0}),M.LEFT=0,M.RIGHT=1,M.SIDE=2,M.THEME=K,M.DARK_THEME=J,M.version=_e,M.E=dt,M}();
@@ -1307,7 +1307,7 @@ function mn({ pT: t, pL: e, pW: n, pH: o, cT: i, cL: s, cW: r, cH: l, direction:
1307
1307
  const w = Math.abs(u - a) / 300 * p;
1308
1308
  return h === B.LHS ? (m = e, c = m + p, d = m - p, g = s + p, `M ${c} ${u} C ${m} ${u} ${m + w} ${a} ${d} ${a} H ${g}`) : (m = e + n, c = m - p, d = m + p, g = s + r - p, `M ${c} ${u} C ${m} ${u} ${m - w} ${a} ${d} ${a} H ${g}`);
1309
1309
  }
1310
- const wn = "5.1.0-beta.1";
1310
+ const wn = "5.1.0";
1311
1311
  function xn(t) {
1312
1312
  return {
1313
1313
  x: 0,
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .map-container{-webkit-tap-highlight-color:rgba(0,0,0,0);font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,PingFang SC,Microsoft YaHei,Source Han Sans SC,Noto Sans CJK SC,WenQuanYi Micro Hei,sans-serif;-webkit-user-select:none;user-select:none;height:100%;width:100%;overflow:hidden;font-size:15px;outline:none;touch-action:none;background-color:var(--bgcolor)}.map-container *{box-sizing:border-box}.map-container::-webkit-scrollbar{width:0px;height:0px}.map-container .selected{outline:2px solid var(--selected);outline-offset:1px}.map-container .hyper-link{text-decoration:none;margin-left:.3em}.map-container me-main>me-wrapper>me-parent>me-epd{top:50%;transform:translateY(-50%)}.map-container me-epd{top:100%;transform:translateY(-50%)}.map-container .lhs{direction:rtl}.map-container .lhs>me-wrapper>me-parent>me-epd{left:-10px}.map-container .lhs me-epd{left:5px}.map-container .lhs me-tpc{direction:ltr}.map-container .rhs>me-wrapper>me-parent>me-epd{right:-10px}.map-container .rhs me-epd{right:5px}.map-container .map-canvas{position:relative;-webkit-user-select:none;user-select:none;width:fit-content;transform:scale(1)}.map-container .map-canvas me-nodes{position:relative;display:flex;justify-content:center;align-items:center;height:max-content;width:max-content;padding:var(--map-padding)}.map-container me-main>me-wrapper{position:relative;margin:var(--main-gap-y) var(--main-gap-x)}.map-container me-main>me-wrapper>me-parent{margin:10px;padding:0}.map-container me-main>me-wrapper>me-parent>me-tpc{border-radius:var(--main-radius);background-color:var(--main-bgcolor);border:2px solid var(--main-color);color:var(--main-color);padding:8px 25px}.map-container me-wrapper{display:block;pointer-events:none;width:fit-content}.map-container me-children,.map-container me-parent{display:inline-block;vertical-align:middle}.map-container me-root{position:relative;margin:45px 0}.map-container me-root me-tpc{font-size:25px;color:var(--root-color);padding:10px 30px;border-radius:var(--root-radius);border:var(--root-border-color) 2px solid;background-color:var(--root-bgcolor)}.map-container me-parent{position:relative;cursor:pointer;padding:6px var(--node-gap-x);margin-top:var(--node-gap-y)}.map-container me-parent me-tpc{position:relative;border-radius:3px;color:var(--color);padding:var(--topic-padding)}.map-container me-parent me-tpc .insert-preview{position:absolute;width:100%;left:0;z-index:9}.map-container me-parent me-tpc .show{background:#7ad5ff;pointer-events:none;opacity:.7;border-radius:3px}.map-container me-parent me-tpc .before{height:14px;top:-14px}.map-container me-parent me-tpc .in{height:100%;top:0}.map-container me-parent me-tpc .after{height:14px;bottom:-14px}.map-container me-parent me-epd{position:absolute;height:18px;width:18px;opacity:.8;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHQ9IjE2NTY2NTQ3MTcyNDIiIGNsYXNzPSJpY29uIiB2aWV3Qm94PSIwIDAgMTAyNCAxMDI0IiB2ZXJzaW9uPSIxLjEiDQogICAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIg0KICAgIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+DQogICAgPHBhdGggZD0iTTUxMiA3NC42NjY2NjdDMjcwLjkzMzMzMyA3NC42NjY2NjcgNzQuNjY2NjY3IDI3MC45MzMzMzMgNzQuNjY2NjY3IDUxMlMyNzAuOTMzMzMzIDk0OS4zMzMzMzMgNTEyIDk0OS4zMzMzMzMgOTQ5LjMzMzMzMyA3NTMuMDY2NjY3IDk0OS4zMzMzMzMgNTEyIDc1My4wNjY2NjcgNzQuNjY2NjY3IDUxMiA3NC42NjY2Njd6IiBzdHJva2Utd2lkdGg9IjU0IiBzdHJva2U9J2JsYWNrJyBmaWxsPSd3aGl0ZScgPjwvcGF0aD4NCiAgICA8cGF0aCBkPSJNNjgyLjY2NjY2NyA0ODBoLTEzOC42NjY2NjdWMzQxLjMzMzMzM2MwLTE3LjA2NjY2Ny0xNC45MzMzMzMtMzItMzItMzJzLTMyIDE0LjkzMzMzMy0zMiAzMnYxMzguNjY2NjY3SDM0MS4zMzMzMzNjLTE3LjA2NjY2NyAwLTMyIDE0LjkzMzMzMy0zMiAzMnMxNC45MzMzMzMgMzIgMzIgMzJoMTM4LjY2NjY2N1Y2ODIuNjY2NjY3YzAgMTcuMDY2NjY3IDE0LjkzMzMzMyAzMiAzMiAzMnMzMi0xNC45MzMzMzMgMzItMzJ2LTEzOC42NjY2NjdINjgyLjY2NjY2N2MxNy4wNjY2NjcgMCAzMi0xNC45MzMzMzMgMzItMzJzLTE0LjkzMzMzMy0zMi0zMi0zMnoiPjwvcGF0aD4NCjwvc3ZnPg==);background-repeat:no-repeat;background-size:contain;background-position:center;pointer-events:all;z-index:9}.map-container me-parent me-epd.minus{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHQ9IjE2NTY2NTU1NjQ5ODUiIGNsYXNzPSJpY29uIiB2aWV3Qm94PSIwIDAgMTAyNCAxMDI0IiB2ZXJzaW9uPSIxLjEiDQogICAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIg0KICAgIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+DQogICAgPHBhdGggZD0iTTUxMiA3NC42NjY2NjdDMjcwLjkzMzMzMyA3NC42NjY2NjcgNzQuNjY2NjY3IDI3MC45MzMzMzMgNzQuNjY2NjY3IDUxMlMyNzAuOTMzMzMzIDk0OS4zMzMzMzMgNTEyIDk0OS4zMzMzMzMgOTQ5LjMzMzMzMyA3NTMuMDY2NjY3IDk0OS4zMzMzMzMgNTEyIDc1My4wNjY2NjcgNzQuNjY2NjY3IDUxMiA3NC42NjY2Njd6IiBzdHJva2Utd2lkdGg9IjU0IiBzdHJva2U9J2JsYWNrJyBmaWxsPSd3aGl0ZScgPjwvcGF0aD4NCiAgICA8cGF0aCBkPSJNNjgyLjY2NjY2NyA1NDRIMzQxLjMzMzMzM2MtMTcuMDY2NjY3IDAtMzItMTQuOTMzMzMzLTMyLTMyczE0LjkzMzMzMy0zMiAzMi0zMmgzNDEuMzMzMzM0YzE3LjA2NjY2NyAwIDMyIDE0LjkzMzMzMyAzMiAzMnMtMTQuOTMzMzMzIDMyLTMyIDMyeiI+PC9wYXRoPg0KPC9zdmc+)!important;transition:opacity .3s;opacity:0}@media (hover: hover){.map-container me-parent me-epd.minus:hover{opacity:.8}}@media (hover: none){.map-container me-parent me-epd.minus{opacity:.8}}.map-container .icon{width:1em;height:1em;vertical-align:-.15em;fill:currentColor;overflow:hidden}.map-container .lines,.map-container .summary,.map-container .subLines,.map-container .topiclinks,.map-container .linkcontroller{position:absolute;height:102%;width:100%;top:0;left:0}.map-container .topiclinks,.map-container .linkcontroller,.map-container .summary,.map-container .topiclinks .selected,.map-container .linkcontroller .selected,.map-container .summary .selected{pointer-events:none}.map-container .summary>g,.map-container .topiclinks>g{cursor:pointer;pointer-events:stroke}.map-container .lines,.map-container .subLines{pointer-events:none;z-index:-1}.map-container .topiclinks *,.map-container .linkcontroller *{z-index:100}.map-container #input-box{position:absolute;top:0;left:0;width:max-content;max-width:35em;z-index:11;direction:ltr;-webkit-user-select:auto;user-select:auto;pointer-events:auto;color:var(--color);background-color:var(--bgcolor)}.map-container me-tpc{display:block;max-width:35em;white-space:pre-wrap;pointer-events:all}.map-container me-tpc>*{pointer-events:none}.map-container me-tpc>a,.map-container me-tpc>iframe{pointer-events:auto}.map-container me-tpc>.text{display:inline-block}.map-container me-tpc>.text a{pointer-events:auto}.map-container me-tpc>img{display:block;margin-bottom:8px;object-fit:cover}.map-container .circle{position:absolute;height:10px;width:10px;margin-top:-5px;margin-left:-5px;border-radius:100%;background:#757575;border:2px solid #ffffff;z-index:10;cursor:pointer}.map-container .tags{direction:ltr}.map-container .tags span{display:inline-block;border-radius:3px;padding:2px 4px;background:#d6f0f8;color:#276f86;margin:2px 4px 0 0;font-size:12px;line-height:1.3em}.map-container .icons{display:inline-block;direction:ltr;margin-left:5px}.map-container .icons span{display:inline-block;line-height:1.3em}.map-container .mind-elixir-ghost{position:fixed;top:-100%;left:-100%;box-sizing:content-box;opacity:.5;background-color:var(--main-bgcolor);border:2px solid var(--main-color);color:var(--main-color);max-width:200px;width:fit-content;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:8px 16px;border-radius:6px}.map-container .selection-area{background:#4f90f22d;border:1px solid #4f90f2}.map-container .context-menu{position:fixed;top:0;left:0;width:100%;height:100%;z-index:99}.map-container .context-menu .menu-list{position:fixed;list-style:none;margin:0;padding:0;color:var(--panel-color);box-shadow:0 12px 15px #0003;border-radius:5px;overflow:hidden}.map-container .context-menu .menu-list li{min-width:200px;overflow:hidden;white-space:nowrap;padding:6px 10px;background:var(--panel-bgcolor);border-bottom:1px solid var(--panel-border-color);cursor:pointer}.map-container .context-menu .menu-list li span{line-height:20px}.map-container .context-menu .menu-list li a{color:#333;text-decoration:none}.map-container .context-menu .menu-list li.disabled{display:none}.map-container .context-menu .menu-list li:hover{filter:brightness(.95)}.map-container .context-menu .menu-list li:last-child{border-bottom:0}.map-container .context-menu .menu-list li span:last-child{float:right}.map-container .context-menu .key{font-size:10px;background-color:#f1f1f1;color:#333;padding:2px 5px;border-radius:3px}.map-container .tips{position:absolute;bottom:28px;left:50%;transform:translate(-50%);color:var(--panel-color);background:var(--panel-bgcolor);opacity:.8;padding:5px 10px;border-radius:5px;font-weight:700}.mind-elixir-toolbar{position:absolute;color:var(--panel-color);background:var(--panel-bgcolor);padding:10px;border-radius:5px;box-shadow:0 1px 2px #0003}.mind-elixir-toolbar svg{display:inline-block}.mind-elixir-toolbar span:active{opacity:.5}.mind-elixir-toolbar.rb{right:20px;bottom:20px}.mind-elixir-toolbar.rb span+span{margin-left:10px}.mind-elixir-toolbar.lt{font-size:20px;left:20px;top:20px}.mind-elixir-toolbar.lt span{display:block}.mind-elixir-toolbar.lt span+span{margin-top:10px}
1
+ .map-container{-webkit-tap-highlight-color:rgba(0,0,0,0);font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,PingFang SC,Microsoft YaHei,Source Han Sans SC,Noto Sans CJK SC,WenQuanYi Micro Hei,sans-serif;-webkit-user-select:none;user-select:none;height:100%;width:100%;overflow:hidden;font-size:15px;outline:none;touch-action:none;background-color:var(--bgcolor)}.map-container *{box-sizing:border-box}.map-container::-webkit-scrollbar{width:0px;height:0px}.map-container .selected{outline:2px solid var(--selected);outline-offset:1px}.map-container .hyper-link{text-decoration:none;margin-left:.3em}.map-container me-main>me-wrapper>me-parent>me-epd{top:50%;transform:translateY(-50%)}.map-container me-epd{top:100%;transform:translateY(-50%)}.map-container .lhs{direction:rtl}.map-container .lhs>me-wrapper>me-parent>me-epd{left:-10px}.map-container .lhs me-epd{left:5px}.map-container .lhs me-tpc{direction:ltr}.map-container .rhs>me-wrapper>me-parent>me-epd{right:-10px}.map-container .rhs me-epd{right:5px}.map-container .map-canvas{position:relative;-webkit-user-select:none;user-select:none;width:fit-content;transform:scale(1)}.map-container .map-canvas me-nodes{position:relative;display:flex;justify-content:center;align-items:center;height:max-content;width:max-content;padding:var(--map-padding)}.map-container me-main>me-wrapper{position:relative;margin:var(--main-gap-y) var(--main-gap-x)}.map-container me-main>me-wrapper>me-parent{margin:10px;padding:0}.map-container me-main>me-wrapper>me-parent>me-tpc{border-radius:var(--main-radius);background-color:var(--main-bgcolor);border:2px solid var(--main-color);color:var(--main-color);padding:8px 25px}.map-container me-wrapper{display:block;pointer-events:none;width:fit-content}.map-container me-children,.map-container me-parent{display:inline-block;vertical-align:middle}.map-container me-root{position:relative;margin:45px 0}.map-container me-root me-tpc{font-size:25px;color:var(--root-color);padding:10px 30px;border-radius:var(--root-radius);border:var(--root-border-color) 2px solid;background-color:var(--root-bgcolor)}.map-container me-parent{position:relative;cursor:pointer;padding:6px var(--node-gap-x);margin-top:var(--node-gap-y)}.map-container me-parent me-tpc{position:relative;border-radius:3px;color:var(--color);padding:var(--topic-padding)}.map-container me-parent me-tpc .insert-preview{position:absolute;width:100%;left:0;z-index:9}.map-container me-parent me-tpc .show{background:#7ad5ff;pointer-events:none;opacity:.7;border-radius:3px}.map-container me-parent me-tpc .before{height:14px;top:-14px}.map-container me-parent me-tpc .in{height:100%;top:0}.map-container me-parent me-tpc .after{height:14px;bottom:-14px}.map-container me-parent me-epd{position:absolute;height:18px;width:18px;opacity:.8;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgdD0iMTY1NjY1NDcxNzI0MiIgY2xhc3M9Imljb24iIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiIHZlcnNpb249IjEuMSIKICAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+CiAgICA8cGF0aCBkPSJNNTEyIDc0LjY2NjY2N0MyNzAuOTMzMzMzIDc0LjY2NjY2NyA3NC42NjY2NjcgMjcwLjkzMzMzMyA3NC42NjY2NjcgNTEyUzI3MC45MzMzMzMgOTQ5LjMzMzMzMyA1MTIgOTQ5LjMzMzMzMyA5NDkuMzMzMzMzIDc1My4wNjY2NjcgOTQ5LjMzMzMzMyA1MTIgNzUzLjA2NjY2NyA3NC42NjY2NjcgNTEyIDc0LjY2NjY2N3oiIHN0cm9rZS13aWR0aD0iNTQiIHN0cm9rZT0nYmxhY2snIGZpbGw9J3doaXRlJyA+PC9wYXRoPgogICAgPHBhdGggZD0iTTY4Mi42NjY2NjcgNDgwaC0xMzguNjY2NjY3VjM0MS4zMzMzMzNjMC0xNy4wNjY2NjctMTQuOTMzMzMzLTMyLTMyLTMycy0zMiAxNC45MzMzMzMtMzIgMzJ2MTM4LjY2NjY2N0gzNDEuMzMzMzMzYy0xNy4wNjY2NjcgMC0zMiAxNC45MzMzMzMtMzIgMzJzMTQuOTMzMzMzIDMyIDMyIDMyaDEzOC42NjY2NjdWNjgyLjY2NjY2N2MwIDE3LjA2NjY2NyAxNC45MzMzMzMgMzIgMzIgMzJzMzItMTQuOTMzMzMzIDMyLTMydi0xMzguNjY2NjY3SDY4Mi42NjY2NjdjMTcuMDY2NjY3IDAgMzItMTQuOTMzMzMzIDMyLTMycy0xNC45MzMzMzMtMzItMzItMzJ6Ij48L3BhdGg+Cjwvc3ZnPg==);background-repeat:no-repeat;background-size:contain;background-position:center;pointer-events:all;z-index:9}.map-container me-parent me-epd.minus{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgdD0iMTY1NjY1NTU2NDk4NSIgY2xhc3M9Imljb24iIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiIHZlcnNpb249IjEuMSIKICAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+CiAgICA8cGF0aCBkPSJNNTEyIDc0LjY2NjY2N0MyNzAuOTMzMzMzIDc0LjY2NjY2NyA3NC42NjY2NjcgMjcwLjkzMzMzMyA3NC42NjY2NjcgNTEyUzI3MC45MzMzMzMgOTQ5LjMzMzMzMyA1MTIgOTQ5LjMzMzMzMyA5NDkuMzMzMzMzIDc1My4wNjY2NjcgOTQ5LjMzMzMzMyA1MTIgNzUzLjA2NjY2NyA3NC42NjY2NjcgNTEyIDc0LjY2NjY2N3oiIHN0cm9rZS13aWR0aD0iNTQiIHN0cm9rZT0nYmxhY2snIGZpbGw9J3doaXRlJyA+PC9wYXRoPgogICAgPHBhdGggZD0iTTY4Mi42NjY2NjcgNTQ0SDM0MS4zMzMzMzNjLTE3LjA2NjY2NyAwLTMyLTE0LjkzMzMzMy0zMi0zMnMxNC45MzMzMzMtMzIgMzItMzJoMzQxLjMzMzMzNGMxNy4wNjY2NjcgMCAzMiAxNC45MzMzMzMgMzIgMzJzLTE0LjkzMzMzMyAzMi0zMiAzMnoiPjwvcGF0aD4KPC9zdmc+)!important;transition:opacity .3s;opacity:0}@media (hover: hover){.map-container me-parent me-epd.minus:hover{opacity:.8}}@media (hover: none){.map-container me-parent me-epd.minus{opacity:.8}}.map-container .icon{width:1em;height:1em;vertical-align:-.15em;fill:currentColor;overflow:hidden}.map-container .lines,.map-container .summary,.map-container .subLines,.map-container .topiclinks,.map-container .linkcontroller{position:absolute;height:102%;width:100%;top:0;left:0}.map-container .topiclinks,.map-container .linkcontroller,.map-container .summary,.map-container .topiclinks .selected,.map-container .linkcontroller .selected,.map-container .summary .selected{pointer-events:none}.map-container .summary>g,.map-container .topiclinks>g{cursor:pointer;pointer-events:stroke}.map-container .lines,.map-container .subLines{pointer-events:none;z-index:-1}.map-container .topiclinks *,.map-container .linkcontroller *{z-index:100}.map-container #input-box{position:absolute;top:0;left:0;width:max-content;max-width:35em;z-index:11;direction:ltr;-webkit-user-select:auto;user-select:auto;pointer-events:auto;color:var(--color);background-color:var(--bgcolor)}.map-container me-tpc{display:block;max-width:35em;white-space:pre-wrap;pointer-events:all}.map-container me-tpc>*{pointer-events:none}.map-container me-tpc>a,.map-container me-tpc>iframe{pointer-events:auto}.map-container me-tpc>.text{display:inline-block}.map-container me-tpc>.text a{pointer-events:auto}.map-container me-tpc>img{display:block;margin-bottom:8px;object-fit:cover}.map-container .circle{position:absolute;height:10px;width:10px;margin-top:-5px;margin-left:-5px;border-radius:100%;background:#757575;border:2px solid #ffffff;z-index:10;cursor:pointer}.map-container .tags{direction:ltr}.map-container .tags span{display:inline-block;border-radius:3px;padding:2px 4px;background:#d6f0f8;color:#276f86;margin:2px 4px 0 0;font-size:12px;line-height:1.3em}.map-container .icons{display:inline-block;direction:ltr;margin-left:5px}.map-container .icons span{display:inline-block;line-height:1.3em}.map-container .mind-elixir-ghost{position:fixed;top:-100%;left:-100%;box-sizing:content-box;opacity:.5;background-color:var(--main-bgcolor);border:2px solid var(--main-color);color:var(--main-color);max-width:200px;width:fit-content;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:8px 16px;border-radius:6px}.map-container .selection-area{background:#4f90f22d;border:1px solid #4f90f2}.map-container .context-menu{position:fixed;top:0;left:0;width:100%;height:100%;z-index:99}.map-container .context-menu .menu-list{position:fixed;list-style:none;margin:0;padding:0;color:var(--panel-color);box-shadow:0 12px 15px #0003;border-radius:5px;overflow:hidden}.map-container .context-menu .menu-list li{min-width:200px;overflow:hidden;white-space:nowrap;padding:6px 10px;background:var(--panel-bgcolor);border-bottom:1px solid var(--panel-border-color);cursor:pointer}.map-container .context-menu .menu-list li span{line-height:20px}.map-container .context-menu .menu-list li a{color:#333;text-decoration:none}.map-container .context-menu .menu-list li.disabled{display:none}.map-container .context-menu .menu-list li:hover{filter:brightness(.95)}.map-container .context-menu .menu-list li:last-child{border-bottom:0}.map-container .context-menu .menu-list li span:last-child{float:right}.map-container .context-menu .key{font-size:10px;background-color:#f1f1f1;color:#333;padding:2px 5px;border-radius:3px}.map-container .tips{position:absolute;bottom:28px;left:50%;transform:translate(-50%);color:var(--panel-color);background:var(--panel-bgcolor);opacity:.8;padding:5px 10px;border-radius:5px;font-weight:700}.mind-elixir-toolbar{position:absolute;color:var(--panel-color);background:var(--panel-bgcolor);padding:10px;border-radius:5px;box-shadow:0 1px 2px #0003}.mind-elixir-toolbar svg{display:inline-block}.mind-elixir-toolbar span:active{opacity:.5}.mind-elixir-toolbar.rb{right:20px;bottom:20px}.mind-elixir-toolbar.rb span+span{margin-left:10px}.mind-elixir-toolbar.lt{font-size:20px;left:20px;top:20px}.mind-elixir-toolbar.lt span{display:block}.mind-elixir-toolbar.lt span+span{margin-top:10px}
@@ -82,7 +82,7 @@ export type ArrowOptions = {
82
82
  };
83
83
  };
84
84
  export declare const createArrow: (this: MindElixirInstance, from: Topic, to: Topic, options?: ArrowOptions) => void;
85
- export declare const createArrowFrom: (this: MindElixirInstance, arrow: Omit<Arrow, 'id'>) => void;
85
+ export declare const createArrowFrom: (this: MindElixirInstance, arrow: Omit<Arrow, "id">) => void;
86
86
  export declare const removeArrow: (this: MindElixirInstance, linkSvg?: CustomSvg) => void;
87
87
  export declare const selectArrow: (this: MindElixirInstance, link: CustomSvg) => void;
88
88
  export declare const unselectArrow: (this: MindElixirInstance) => void;
@@ -7,8 +7,8 @@ declare namespace MindElixir {
7
7
  export var prototype: {
8
8
  init(this: MindElixirInstance, data: MindElixirData): Error | undefined;
9
9
  destroy(this: Partial<MindElixirInstance>): void;
10
- exportSvg: (this: MindElixirInstance, noForeignObject?: boolean, injectCss?: string | undefined) => Blob;
11
- exportPng: (this: MindElixirInstance, noForeignObject?: boolean, injectCss?: string | undefined) => Promise<Blob | null>;
10
+ exportSvg: (this: MindElixirInstance, noForeignObject?: boolean, injectCss?: string) => Blob;
11
+ exportPng: (this: MindElixirInstance, noForeignObject?: boolean, injectCss?: string) => Promise<Blob | null>;
12
12
  createSummary: (this: MindElixirInstance) => void;
13
13
  createSummaryFrom: (this: MindElixirInstance, summary: Omit<import("./summary").Summary, "id">) => void;
14
14
  removeSummary: (this: MindElixirInstance, id: string) => void;
@@ -21,7 +21,7 @@ declare namespace MindElixir {
21
21
  tidyArrow(this: MindElixirInstance): void;
22
22
  createArrow: (this: MindElixirInstance, from: Topic, to: Topic, options?: import("./arrow").ArrowOptions) => void;
23
23
  createArrowFrom: (this: MindElixirInstance, arrow: Omit<import("./arrow").Arrow, "id">) => void;
24
- removeArrow: (this: MindElixirInstance, linkSvg?: import("./docs").CustomSvg | undefined) => void;
24
+ removeArrow: (this: MindElixirInstance, linkSvg?: import("./docs").CustomSvg) => void;
25
25
  selectArrow: (this: MindElixirInstance, link: import("./docs").CustomSvg) => void;
26
26
  unselectArrow: (this: MindElixirInstance) => void;
27
27
  rmSubline: (this: MindElixirInstance, tpc: Topic) => Promise<void>;
@@ -40,7 +40,7 @@ declare namespace MindElixir {
40
40
  beginEdit: (this: MindElixirInstance, el?: Topic | undefined) => Promise<void>;
41
41
  setNodeTopic: (this: MindElixirInstance, el: Topic, topic: string) => Promise<void>;
42
42
  scrollIntoView: (this: MindElixirInstance, el: HTMLElement) => void;
43
- selectNode: (this: MindElixirInstance, tpc: Topic, isNewNode?: boolean | undefined, e?: MouseEvent | undefined) => void;
43
+ selectNode: (this: MindElixirInstance, tpc: Topic, isNewNode?: boolean, e?: MouseEvent) => void;
44
44
  selectNodes: (this: MindElixirInstance, tpc: Topic[]) => void;
45
45
  unselectNodes: (this: MindElixirInstance, tpc: Topic[]) => void;
46
46
  clearSelection: (this: MindElixirInstance) => void;
@@ -48,7 +48,8 @@ declare namespace MindElixir {
48
48
  getData: (this: MindElixirInstance) => MindElixirData;
49
49
  enableEdit: (this: MindElixirInstance) => void;
50
50
  disableEdit: (this: MindElixirInstance) => void;
51
- scale: (this: MindElixirInstance, scaleVal: number, offset?: {
51
+ scale: (this: MindElixirInstance, scaleVal: number, // summary container
52
+ offset?: {
52
53
  x: number;
53
54
  y: number;
54
55
  }) => void;
@@ -62,15 +63,15 @@ declare namespace MindElixir {
62
63
  initRight: (this: MindElixirInstance) => void;
63
64
  initSide: (this: MindElixirInstance) => void;
64
65
  setLocale: (this: MindElixirInstance, locale: import("./i18n").Locale) => void;
65
- expandNode: (this: MindElixirInstance, el: Topic, isExpand?: boolean | undefined) => void;
66
- expandNodeAll: (this: MindElixirInstance, el: Topic, isExpand?: boolean | undefined) => void;
67
- refresh: (this: MindElixirInstance, data?: MindElixirData | undefined) => void;
66
+ expandNode: (this: MindElixirInstance, el: Topic, isExpand?: boolean) => void;
67
+ expandNodeAll: (this: MindElixirInstance, el: Topic, isExpand?: boolean) => void;
68
+ refresh: (this: MindElixirInstance, data?: MindElixirData) => void;
68
69
  getObjById: (id: string, data: import("./docs").NodeObj) => import("./docs").NodeObj | null;
69
70
  generateNewObj: (this: MindElixirInstance) => import("./docs").NodeObjExport;
70
71
  layout: (this: MindElixirInstance) => void;
71
- linkDiv: (this: MindElixirInstance, mainNode?: import("./docs").Wrapper | undefined) => void;
72
+ linkDiv: (this: MindElixirInstance, mainNode?: import("./docs").Wrapper) => void;
72
73
  editTopic: (this: MindElixirInstance, el: Topic) => void;
73
- createWrapper: (this: MindElixirInstance, nodeObj: import("./docs").NodeObj, omitChildren?: boolean | undefined) => {
74
+ createWrapper: (this: MindElixirInstance, nodeObj: import("./docs").NodeObj, omitChildren?: boolean) => {
74
75
  grp: import("./docs").Wrapper;
75
76
  top: import("./docs").Parent;
76
77
  tpc: Topic;
@@ -81,7 +82,7 @@ declare namespace MindElixir {
81
82
  };
82
83
  createChildren: (this: MindElixirInstance, wrappers: import("./docs").Wrapper[]) => import("./docs").Children;
83
84
  createTopic: (this: MindElixirInstance, nodeObj: import("./docs").NodeObj) => Topic;
84
- findEle: (this: MindElixirInstance, id: string, el?: HTMLElement | undefined) => Topic;
85
+ findEle: (this: MindElixirInstance, id: string, el?: HTMLElement) => Topic;
85
86
  changeTheme: (this: MindElixirInstance, theme: import("./docs").Theme, shouldRefresh?: boolean) => void;
86
87
  };
87
88
  export var LEFT: number;
@@ -90,7 +91,7 @@ declare namespace MindElixir {
90
91
  export var THEME: import("./docs").Theme;
91
92
  export var DARK_THEME: import("./docs").Theme;
92
93
  export var version: any;
93
- export var E: (this: MindElixirInstance, id: string, el?: HTMLElement | undefined) => Topic;
94
+ export var E: (this: MindElixirInstance, id: string, el?: HTMLElement) => Topic;
94
95
  var _a: (topic: string) => MindElixirData;
95
96
  export { _a as new };
96
97
  }
@@ -13,8 +13,8 @@ export type MindElixirMethods = typeof methods;
13
13
  declare const methods: {
14
14
  init(this: MindElixirInstance, data: MindElixirData): Error | undefined;
15
15
  destroy(this: Partial<MindElixirInstance>): void;
16
- exportSvg: (this: MindElixirInstance, noForeignObject?: boolean, injectCss?: string | undefined) => Blob;
17
- exportPng: (this: MindElixirInstance, noForeignObject?: boolean, injectCss?: string | undefined) => Promise<Blob | null>;
16
+ exportSvg: (this: MindElixirInstance, noForeignObject?: boolean, injectCss?: string) => Blob;
17
+ exportPng: (this: MindElixirInstance, noForeignObject?: boolean, injectCss?: string) => Promise<Blob | null>;
18
18
  createSummary: (this: MindElixirInstance) => void;
19
19
  createSummaryFrom: (this: MindElixirInstance, summary: Omit<summary.Summary, "id">) => void;
20
20
  removeSummary: (this: MindElixirInstance, id: string) => void;
@@ -27,7 +27,7 @@ declare const methods: {
27
27
  tidyArrow(this: MindElixirInstance): void;
28
28
  createArrow: (this: MindElixirInstance, from: import("./index").Topic, to: import("./index").Topic, options?: arrow.ArrowOptions) => void;
29
29
  createArrowFrom: (this: MindElixirInstance, arrow: Omit<arrow.Arrow, "id">) => void;
30
- removeArrow: (this: MindElixirInstance, linkSvg?: import("./index").CustomSvg | undefined) => void;
30
+ removeArrow: (this: MindElixirInstance, linkSvg?: import("./index").CustomSvg) => void;
31
31
  selectArrow: (this: MindElixirInstance, link: import("./index").CustomSvg) => void;
32
32
  unselectArrow: (this: MindElixirInstance) => void;
33
33
  rmSubline: (this: MindElixirInstance, tpc: import("./index").Topic) => Promise<void>;
@@ -46,7 +46,7 @@ declare const methods: {
46
46
  beginEdit: (this: MindElixirInstance, el?: import("./index").Topic | undefined) => Promise<void>;
47
47
  setNodeTopic: (this: MindElixirInstance, el: import("./index").Topic, topic: string) => Promise<void>;
48
48
  scrollIntoView: (this: MindElixirInstance, el: HTMLElement) => void;
49
- selectNode: (this: MindElixirInstance, tpc: import("./index").Topic, isNewNode?: boolean | undefined, e?: MouseEvent | undefined) => void;
49
+ selectNode: (this: MindElixirInstance, tpc: import("./index").Topic, isNewNode?: boolean, e?: MouseEvent) => void;
50
50
  selectNodes: (this: MindElixirInstance, tpc: import("./index").Topic[]) => void;
51
51
  unselectNodes: (this: MindElixirInstance, tpc: import("./index").Topic[]) => void;
52
52
  clearSelection: (this: MindElixirInstance) => void;
@@ -68,15 +68,15 @@ declare const methods: {
68
68
  initRight: (this: MindElixirInstance) => void;
69
69
  initSide: (this: MindElixirInstance) => void;
70
70
  setLocale: (this: MindElixirInstance, locale: import("./i18n").Locale) => void;
71
- expandNode: (this: MindElixirInstance, el: import("./index").Topic, isExpand?: boolean | undefined) => void;
72
- expandNodeAll: (this: MindElixirInstance, el: import("./index").Topic, isExpand?: boolean | undefined) => void;
73
- refresh: (this: MindElixirInstance, data?: MindElixirData | undefined) => void;
71
+ expandNode: (this: MindElixirInstance, el: import("./index").Topic, isExpand?: boolean) => void;
72
+ expandNodeAll: (this: MindElixirInstance, el: import("./index").Topic, isExpand?: boolean) => void;
73
+ refresh: (this: MindElixirInstance, data?: MindElixirData) => void;
74
74
  getObjById: (id: string, data: import("./types").NodeObj) => import("./types").NodeObj | null;
75
75
  generateNewObj: (this: MindElixirInstance) => import("./types").NodeObjExport;
76
76
  layout: (this: MindElixirInstance) => void;
77
- linkDiv: (this: MindElixirInstance, mainNode?: import("./index").Wrapper | undefined) => void;
77
+ linkDiv: (this: MindElixirInstance, mainNode?: import("./index").Wrapper) => void;
78
78
  editTopic: (this: MindElixirInstance, el: import("./index").Topic) => void;
79
- createWrapper: (this: MindElixirInstance, nodeObj: import("./types").NodeObj, omitChildren?: boolean | undefined) => {
79
+ createWrapper: (this: MindElixirInstance, nodeObj: import("./types").NodeObj, omitChildren?: boolean) => {
80
80
  grp: import("./index").Wrapper;
81
81
  top: import("./index").Parent;
82
82
  tpc: import("./index").Topic;
@@ -87,7 +87,7 @@ declare const methods: {
87
87
  };
88
88
  createChildren: (this: MindElixirInstance, wrappers: import("./index").Wrapper[]) => import("./index").Children;
89
89
  createTopic: (this: MindElixirInstance, nodeObj: import("./types").NodeObj) => import("./index").Topic;
90
- findEle: (this: MindElixirInstance, id: string, el?: HTMLElement | undefined) => import("./index").Topic;
90
+ findEle: (this: MindElixirInstance, id: string, el?: HTMLElement) => import("./index").Topic;
91
91
  changeTheme: (this: MindElixirInstance, theme: import("./types").Theme, shouldRefresh?: boolean) => void;
92
92
  };
93
93
  export default methods;