mind-elixir 5.0.0-beta.21 → 5.0.0-beta.23

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.
@@ -1,4 +1,4 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".map-container{--gap: 30px;--root-radius: 30px;--main-radius: 20px;--root-color: #ffffff;--root-bgcolor: #4c4f69;--root-border-color: rgba(0, 0, 0, 0);--main-color: #444446;--main-bgcolor: #ffffff;--topic-padding: 3px;--color: #777777;--bgcolor: #f6f6f6;--selected: #4dc4ff;--panel-color: #444446;--panel-bgcolor: #ffffff;--panel-border-color: #eaeaea;-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}.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 .lhs{direction:rtl}.map-container .lhs me-tpc{direction:ltr}.map-container .map-canvas{height:20000px;width:20000px;position:relative;-webkit-user-select:none;user-select:none;transform:scale(1);background-color:var(--bgcolor)}.map-container .map-canvas me-nodes{position:absolute;display:flex;justify-content:center;align-items:center;height:fit-content;width:fit-content}.map-container .map-canvas me-root{position:relative}.map-container .map-canvas me-root me-tpc{display:block;font-size:25px;color:var(--root-color);padding:10px var(--gap);border-radius:var(--root-radius);border:var(--root-border-color) 2px solid;white-space:pre-wrap;background-color:var(--root-bgcolor)}.map-container me-main>me-wrapper{position:relative;margin:45px 65px}.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-parent{position:relative;cursor:pointer;padding:6px var(--gap);margin-top:10px}.map-container me-parent me-tpc{position:relative;display:block;border-radius:3px;color:var(--color);pointer-events:all;max-width:35em;white-space:pre-wrap;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}.map-container me-parent me-epd.minus:hover{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>*{pointer-events:none}.map-container me-tpc>a,.map-container me-tpc>iframe{pointer-events:auto}.map-container me-tpc>img{display:block;margin-bottom:8px;object-fit:cover}.map-container me-tpc>.text{display:inline-block}.map-container .circle{position:absolute;height:10px;width:10px;margin-top:-5px;margin-left:-5px;border-radius:100%;background:#757575;border:2px solid #ffffff;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:20px;left:50%;transform:translate(-50%);color:var(--panel-color);font-weight:bolder}.mind-elixir-toolbar{font-family:iconfont;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}")),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
1
+ (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".map-container{--gap: 30px;--root-radius: 30px;--main-radius: 20px;--root-color: #ffffff;--root-bgcolor: #4c4f69;--root-border-color: rgba(0, 0, 0, 0);--main-color: #444446;--main-bgcolor: #ffffff;--topic-padding: 3px;--color: #777777;--bgcolor: #f6f6f6;--selected: #4dc4ff;--panel-color: #444446;--panel-bgcolor: #ffffff;--panel-border-color: #eaeaea;-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}.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 .lhs{direction:rtl}.map-container .lhs me-tpc{direction:ltr}.map-container .map-canvas{height:20000px;width:20000px;position:relative;-webkit-user-select:none;user-select:none;transform:scale(1);background-color:var(--bgcolor)}.map-container .map-canvas me-nodes{position:absolute;display:flex;justify-content:center;align-items:center;height:fit-content;width:fit-content}.map-container .map-canvas me-root{position:relative}.map-container .map-canvas me-root me-tpc{display:block;font-size:25px;color:var(--root-color);padding:10px var(--gap);border-radius:var(--root-radius);border:var(--root-border-color) 2px solid;white-space:pre-wrap;background-color:var(--root-bgcolor)}.map-container me-main>me-wrapper{position:relative;margin:45px 65px}.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-parent{position:relative;cursor:pointer;padding:6px var(--gap);margin-top:10px}.map-container me-parent me-tpc{position:relative;display:block;border-radius:3px;color:var(--color);pointer-events:all;max-width:35em;white-space:pre-wrap;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}.map-container me-parent me-epd.minus:hover{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>*{pointer-events:none}.map-container me-tpc>a,.map-container me-tpc>iframe{pointer-events:auto}.map-container me-tpc>img{display:block;margin-bottom:8px;object-fit:cover}.map-container me-tpc>.text{display:inline-block}.map-container .circle{position:absolute;height:10px;width:10px;margin-top:-5px;margin-left:-5px;border-radius:100%;background:#757575;border:2px solid #ffffff;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{font-family:iconfont;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}")),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
2
  var nt = Object.defineProperty;
3
3
  var ot = (e, t, n) => t in e ? nt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
4
4
  var G = (e, t, n) => (ot(e, typeof t != "symbol" ? t + "" : t, n), n);
@@ -17,8 +17,8 @@ var G = (e, t, n) => (ot(e, typeof t != "symbol" ? t + "" : t, n), n);
17
17
  i || (i = !0, o());
18
18
  }
19
19
  t = function() {
20
- var l, u, h, v;
21
- (v = document.createElement("div")).innerHTML = c, c = null, (h = v.getElementsByTagName("svg")[0]) && (h.setAttribute("aria-hidden", "true"), h.style.position = "absolute", h.style.width = 0, h.style.height = 0, h.style.overflow = "hidden", l = h, (u = document.body).firstChild ? (v = l, (h = u.firstChild).parentNode.insertBefore(v, h)) : u.appendChild(l));
20
+ var l, f, h, g;
21
+ (g = document.createElement("div")).innerHTML = c, c = null, (h = g.getElementsByTagName("svg")[0]) && (h.setAttribute("aria-hidden", "true"), h.style.position = "absolute", h.style.width = 0, h.style.height = 0, h.style.overflow = "hidden", l = h, (f = document.body).firstChild ? (g = l, (h = f.firstChild).parentNode.insertBefore(g, h)) : f.appendChild(l));
22
22
  }, document.addEventListener ? ~["complete", "loaded", "interactive"].indexOf(document.readyState) ? setTimeout(t, 0) : (n = function() {
23
23
  document.removeEventListener("DOMContentLoaded", n, !1), t();
24
24
  }, document.addEventListener("DOMContentLoaded", n, !1)) : document.attachEvent && (o = t, s = e.document, i = !1, (r = function() {
@@ -60,15 +60,15 @@ const A = 0, H = 1, ae = 2, Be = {
60
60
  "--panel-border-color": "#696969"
61
61
  }
62
62
  };
63
- function se(e) {
63
+ function oe(e) {
64
64
  return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/"/g, "&quot;");
65
65
  }
66
- const ie = function(e, t) {
66
+ const se = function(e, t) {
67
67
  if (t.id === e)
68
68
  return t;
69
69
  if (t.children && t.children.length) {
70
70
  for (let n = 0; n < t.children.length; n++) {
71
- const o = ie(e, t.children[n]);
71
+ const o = se(e, t.children[n]);
72
72
  if (o)
73
73
  return o;
74
74
  }
@@ -85,7 +85,7 @@ function fe(e) {
85
85
  for (let t = 0; t < e.children.length; t++)
86
86
  fe(e.children[t]);
87
87
  }
88
- function re(e, t, n, o) {
88
+ function ie(e, t, n, o) {
89
89
  const s = o - t, i = e - n;
90
90
  let r = Math.atan(Math.abs(s) / Math.abs(i)) / 3.14 * 180;
91
91
  if (isNaN(r))
@@ -149,18 +149,137 @@ const B = (e, t) => {
149
149
  }
150
150
  };
151
151
  };
152
- function it(e) {
152
+ var T = /* @__PURE__ */ ((e) => (e.LHS = "lhs", e.RHS = "rhs", e))(T || {});
153
+ const it = (e) => {
154
+ const t = e.map.querySelectorAll(".lhs>me-wrapper>me-parent>me-tpc");
155
+ e.selectNode(t[Math.ceil(t.length / 2) - 1]);
156
+ }, rt = (e) => {
157
+ const t = e.map.querySelectorAll(".rhs>me-wrapper>me-parent>me-tpc");
158
+ e.selectNode(t[Math.ceil(t.length / 2) - 1]);
159
+ }, ct = (e) => {
160
+ e.selectNode(e.map.querySelector("me-root>me-tpc"));
161
+ }, lt = function(e, t) {
162
+ const n = t.parentElement.parentElement.parentElement.previousSibling;
163
+ if (n) {
164
+ const o = n.firstChild;
165
+ e.selectNode(o);
166
+ }
167
+ }, at = function(e, t) {
168
+ const n = t.parentElement.nextSibling;
169
+ if (n && n.firstChild) {
170
+ const o = n.firstChild.firstChild.firstChild;
171
+ e.selectNode(o);
172
+ }
173
+ }, Ce = function(e, t) {
174
+ var i, r;
175
+ const n = e.currentNode || ((i = e.currentNodes) == null ? void 0 : i[0]);
176
+ if (!n)
177
+ return;
178
+ const o = n.nodeObj, s = n.offsetParent.offsetParent.parentElement;
179
+ o.parent ? s.className === t ? at(e, n) : (r = o.parent) != null && r.parent ? lt(e, n) : ct(e) : t === T.LHS ? it(e) : rt(e);
180
+ }, Ne = function(e, t) {
181
+ const n = e.currentNode;
182
+ if (!n || !n.nodeObj.parent)
183
+ return;
184
+ const s = t + "Sibling", i = n.parentElement.parentElement[s];
185
+ i ? e.selectNode(i.firstChild.firstChild) : e.selectNode(n);
186
+ }, re = function(e, t, n) {
187
+ switch (t) {
188
+ case "in":
189
+ if (e.scaleVal > 1.6)
190
+ return;
191
+ e.scale(e.scaleVal + 0.2, n);
192
+ break;
193
+ case "out":
194
+ if (e.scaleVal < 0.6)
195
+ return;
196
+ e.scale(e.scaleVal - 0.2, n);
197
+ }
198
+ };
199
+ function dt(e, t) {
200
+ t = t === !0 ? {} : t;
201
+ const n = () => {
202
+ e.currentArrow ? e.removeArrow() : e.currentSummary ? e.removeSummary(e.currentSummary.summaryObj.id) : e.currentNodes && e.removeNodes(e.currentNodes);
203
+ }, o = {
204
+ Enter: (s) => {
205
+ s.shiftKey ? e.insertSibling("before") : s.ctrlKey ? e.insertParent() : e.insertSibling("after");
206
+ },
207
+ Tab: () => {
208
+ e.addChild();
209
+ },
210
+ F1: () => {
211
+ e.toCenter();
212
+ },
213
+ F2: () => {
214
+ e.beginEdit();
215
+ },
216
+ ArrowUp: (s) => {
217
+ if (s.altKey)
218
+ e.moveUpNode();
219
+ else {
220
+ if (s.metaKey || s.ctrlKey)
221
+ return e.initSide();
222
+ Ne(e, "previous");
223
+ }
224
+ },
225
+ ArrowDown: (s) => {
226
+ s.altKey ? e.moveDownNode() : Ne(e, "next");
227
+ },
228
+ ArrowLeft: (s) => {
229
+ if (s.metaKey || s.ctrlKey)
230
+ return e.initLeft();
231
+ Ce(e, T.LHS);
232
+ },
233
+ ArrowRight: (s) => {
234
+ if (s.metaKey || s.ctrlKey)
235
+ return e.initRight();
236
+ Ce(e, T.RHS);
237
+ },
238
+ PageUp: () => e.moveUpNode(),
239
+ PageDown: () => {
240
+ e.moveDownNode();
241
+ },
242
+ c: (s) => {
243
+ (s.metaKey || s.ctrlKey) && (e.waitCopy = e.currentNodes);
244
+ },
245
+ x: (s) => {
246
+ (s.metaKey || s.ctrlKey) && (e.waitCopy = e.currentNodes, n());
247
+ },
248
+ v: (s) => {
249
+ !e.waitCopy || !e.currentNode || (s.metaKey || s.ctrlKey) && (e.waitCopy.length === 1 ? e.copyNode(e.waitCopy[0], e.currentNode) : e.copyNodes(e.waitCopy, e.currentNode));
250
+ },
251
+ "=": (s) => {
252
+ (s.metaKey || s.ctrlKey) && re(e, "in");
253
+ },
254
+ "-": (s) => {
255
+ (s.metaKey || s.ctrlKey) && re(e, "out");
256
+ },
257
+ 0: (s) => {
258
+ (s.metaKey || s.ctrlKey) && e.scale(1);
259
+ },
260
+ Delete: n,
261
+ Backspace: n,
262
+ ...t
263
+ };
264
+ e.map.onkeydown = (s) => {
265
+ if (s.preventDefault(), !e.editable || s.target !== s.currentTarget)
266
+ return;
267
+ const i = o[s.key];
268
+ i && i(s);
269
+ };
270
+ }
271
+ function ht(e) {
153
272
  const { dragMoveHelper: t } = e;
154
273
  let n = 0, o = 0;
155
- const s = (f) => {
156
- var g, y, x;
157
- if (f instanceof TouchEvent || f.button !== 0)
274
+ const s = (u) => {
275
+ var y, x, w;
276
+ if (u instanceof TouchEvent || u.button !== 0)
158
277
  return;
159
- if ((g = e.helper1) != null && g.moved) {
278
+ if ((y = e.helper1) != null && y.moved) {
160
279
  e.helper1.clear();
161
280
  return;
162
281
  }
163
- if ((y = e.helper2) != null && y.moved) {
282
+ if ((x = e.helper2) != null && x.moved) {
164
283
  e.helper2.clear();
165
284
  return;
166
285
  }
@@ -168,84 +287,88 @@ function it(e) {
168
287
  t.clear();
169
288
  return;
170
289
  }
171
- const p = f.target;
290
+ const p = u.target;
172
291
  if (p.tagName === "ME-EPD")
173
- f.ctrlKey || f.metaKey ? e.expandNodeAll(p.previousSibling) : e.expandNode(p.previousSibling);
292
+ u.ctrlKey || u.metaKey ? e.expandNodeAll(p.previousSibling) : e.expandNode(p.previousSibling);
174
293
  else if (p.tagName === "ME-TPC" && e.currentNodes.length > 1)
175
294
  e.selectNode(p);
176
295
  else if (!e.editable)
177
296
  return;
178
- const m = (x = p.parentElement) == null ? void 0 : x.parentElement;
297
+ const m = (w = p.parentElement) == null ? void 0 : w.parentElement;
179
298
  m.getAttribute("class") === "topiclinks" ? e.selectArrow(p.parentElement) : m.getAttribute("class") === "summary" && e.selectSummary(p.parentElement);
180
- }, i = (f) => {
181
- var g;
299
+ }, i = (u) => {
300
+ var y;
182
301
  if (!e.editable)
183
302
  return;
184
- const p = f.target;
303
+ const p = u.target;
185
304
  ze(p) && e.beginEdit(p);
186
- const m = (g = p.parentElement) == null ? void 0 : g.parentElement;
305
+ const m = (y = p.parentElement) == null ? void 0 : y.parentElement;
187
306
  m.getAttribute("class") === "topiclinks" ? e.editArrowLabel(p.parentElement) : m.getAttribute("class") === "summary" && e.editSummary(p.parentElement);
188
307
  };
189
308
  let r = 0;
190
- const c = (f) => {
309
+ const c = (u) => {
191
310
  const p = (/* @__PURE__ */ new Date()).getTime(), m = p - r;
192
- m < 300 && m > 0 && i(f), r = p;
193
- }, a = (f) => {
311
+ m < 300 && m > 0 && i(u), r = p;
312
+ }, a = (u) => {
194
313
  var p, m;
195
- if (f instanceof MouseEvent) {
196
- const g = e.mouseSelectionButton === 0 ? 2 : 0;
197
- if (f.button !== g)
314
+ if (u instanceof MouseEvent) {
315
+ const y = e.mouseSelectionButton === 0 ? 2 : 0;
316
+ if (u.button !== y)
198
317
  return;
199
318
  } else
200
- n = ((p = f.touches[0]) == null ? void 0 : p.clientX) || 0, o = ((m = f.touches[0]) == null ? void 0 : m.clientY) || 0;
201
- f.target.contentEditable === "inherit" && (t.moved = !1, t.mousedown = !0, e.map.style.transition = "none");
202
- }, d = (f) => {
203
- var p, m, g, y;
204
- if (f.target.contentEditable === "inherit")
205
- if (f instanceof MouseEvent)
206
- t.onMove(f), t.x = f.clientX, t.y = f.clientY;
319
+ n = ((p = u.touches[0]) == null ? void 0 : p.clientX) || 0, o = ((m = u.touches[0]) == null ? void 0 : m.clientY) || 0;
320
+ u.target.contentEditable === "inherit" && (t.moved = !1, t.mousedown = !0, e.map.style.transition = "none");
321
+ }, d = (u) => {
322
+ var p, m, y, x;
323
+ if (u.target.contentEditable === "inherit")
324
+ if (u instanceof MouseEvent)
325
+ t.onMove(u), t.x = u.clientX, t.y = u.clientY;
207
326
  else {
208
- const x = ((p = f.touches[0]) == null ? void 0 : p.clientX) || 0, E = ((m = f.touches[0]) == null ? void 0 : m.clientY) || 0, b = x - n, w = E - o, _ = {
209
- clientX: x,
210
- clientY: E,
211
- movementX: b,
212
- movementY: w,
213
- target: f.target
327
+ const w = ((p = u.touches[0]) == null ? void 0 : p.clientX) || 0, b = ((m = u.touches[0]) == null ? void 0 : m.clientY) || 0, E = w - n, _ = b - o, M = {
328
+ clientX: w,
329
+ clientY: b,
330
+ movementX: E,
331
+ movementY: _,
332
+ target: u.target
214
333
  };
215
- t.onMove(_), t.x = x, t.y = E, n = x, o = E;
334
+ t.onMove(M), t.x = w, t.y = b, n = w, o = b;
216
335
  }
217
- else if (f instanceof MouseEvent)
218
- t.x = f.clientX, t.y = f.clientY;
336
+ else if (u instanceof MouseEvent)
337
+ t.x = u.clientX, t.y = u.clientY;
219
338
  else {
220
- const x = ((g = f.touches[0]) == null ? void 0 : g.clientX) || 0, E = ((y = f.touches[0]) == null ? void 0 : y.clientY) || 0;
221
- t.x = x, t.y = E, n = x, o = E;
339
+ const w = ((y = u.touches[0]) == null ? void 0 : y.clientX) || 0, b = ((x = u.touches[0]) == null ? void 0 : x.clientY) || 0;
340
+ t.x = w, t.y = b, n = w, o = b;
222
341
  }
223
- }, l = (f) => {
224
- if (f instanceof MouseEvent) {
342
+ }, l = (u) => {
343
+ if (u instanceof MouseEvent) {
225
344
  const p = e.mouseSelectionButton === 0 ? 2 : 0;
226
- if (f.button !== p)
345
+ if (u.button !== p)
227
346
  return;
228
347
  }
229
348
  t.clear();
230
- }, u = (f) => {
231
- f instanceof TouchEvent || t.moved && f.preventDefault();
232
- }, h = e.map;
349
+ }, f = (u) => {
350
+ u instanceof TouchEvent || t.moved && u.preventDefault();
351
+ }, h = (u) => {
352
+ u.stopPropagation(), u.preventDefault(), u.ctrlKey || u.metaKey ? u.deltaY < 0 ? re(e, "in", e.dragMoveHelper) : e.scaleVal - 0.2 > 0 && re(e, "out", e.dragMoveHelper) : u.shiftKey ? e.move(-u.deltaY, 0) : (e.map.style.transition = "none", e.move(-u.deltaX, -u.deltaY), e.map.style.transition = "transform 0.3s");
353
+ }, g = e.map;
233
354
  return me([
234
- { dom: h, evt: "click", func: s },
235
- { dom: h, evt: "dblclick", func: i },
236
- { dom: h, evt: "mousedown", func: a },
355
+ { dom: g, evt: "click", func: s },
356
+ { dom: g, evt: "dblclick", func: i },
357
+ { dom: g, evt: "mousedown", func: a },
237
358
  // to handle mouse move outside of map, add event listener to document
238
359
  { dom: document, evt: "mousemove", func: d },
239
360
  { dom: document, evt: "mouseup", func: l },
240
- { dom: document, evt: "contextmenu", func: u },
361
+ { dom: document, evt: "contextmenu", func: f },
241
362
  // support touch events
242
- { dom: h, evt: "touchstart", func: a },
363
+ { dom: g, evt: "touchstart", func: a },
243
364
  { dom: document, evt: "touchmove", func: d },
244
365
  { dom: document, evt: "touchend", func: l },
245
- { dom: h, evt: "touchend", func: c }
366
+ { dom: g, evt: "touchend", func: c },
367
+ // support wheel event
368
+ { dom: g, evt: "wheel", func: h }
246
369
  ]);
247
370
  }
248
- function rt() {
371
+ function ut() {
249
372
  return {
250
373
  handlers: {},
251
374
  addListener: function(e, t) {
@@ -270,8 +393,7 @@ function rt() {
270
393
  }
271
394
  };
272
395
  }
273
- var M = /* @__PURE__ */ ((e) => (e.LHS = "lhs", e.RHS = "rhs", e))(M || {});
274
- const ce = document, ct = function() {
396
+ const ce = document, ft = function() {
275
397
  this.nodes.innerHTML = "";
276
398
  const e = this.createTopic(this.nodeData);
277
399
  ge(e, this.nodeData), e.draggable = !1;
@@ -284,18 +406,18 @@ const ce = document, ct = function() {
284
406
  i.direction === A ? o += 1 : i.direction === H ? s += 1 : o <= s ? (i.direction = A, o += 1) : (i.direction = H, s += 1);
285
407
  });
286
408
  }
287
- lt(this, n, t);
288
- }, lt = function(e, t, n) {
409
+ pt(this, n, t);
410
+ }, pt = function(e, t, n) {
289
411
  const o = ce.createElement("me-main");
290
- o.className = M.LHS;
412
+ o.className = T.LHS;
291
413
  const s = ce.createElement("me-main");
292
- s.className = M.RHS;
414
+ s.className = T.RHS;
293
415
  for (let i = 0; i < t.length; i++) {
294
416
  const r = t[i], { grp: c } = e.createWrapper(r);
295
417
  e.direction === ae ? r.direction === A ? o.appendChild(c) : s.appendChild(c) : e.direction === A ? o.appendChild(c) : s.appendChild(c);
296
418
  }
297
419
  e.nodes.appendChild(o), e.nodes.appendChild(n), e.nodes.appendChild(s), e.nodes.appendChild(e.lines);
298
- }, at = function(e, t) {
420
+ }, mt = function(e, t) {
299
421
  const n = ce.createElement("me-children");
300
422
  for (let o = 0; o < t.length; o++) {
301
423
  const s = t[o], { grp: i } = e.createWrapper(s);
@@ -331,31 +453,31 @@ const ce = document, ct = function() {
331
453
  e.link && (e.link = void 0);
332
454
  if (t.icons && t.icons.length) {
333
455
  const n = k.createElement("span");
334
- n.className = "icons", n.innerHTML = t.icons.map((o) => `<span>${se(o)}</span>`).join(""), e.appendChild(n), e.icons = n;
456
+ n.className = "icons", n.innerHTML = t.icons.map((o) => `<span>${oe(o)}</span>`).join(""), e.appendChild(n), e.icons = n;
335
457
  } else
336
458
  e.icons && (e.icons = void 0);
337
459
  if (t.tags && t.tags.length) {
338
460
  const n = k.createElement("div");
339
- n.className = "tags", n.innerHTML = t.tags.map((o) => `<span>${se(o)}</span>`).join(""), e.appendChild(n), e.tags = n;
461
+ n.className = "tags", n.innerHTML = t.tags.map((o) => `<span>${oe(o)}</span>`).join(""), e.appendChild(n), e.tags = n;
340
462
  } else
341
463
  e.tags && (e.tags = void 0);
342
- }, dt = function(e, t) {
464
+ }, gt = function(e, t) {
343
465
  const n = k.createElement("me-wrapper"), { p: o, tpc: s } = this.createParent(e);
344
466
  if (n.appendChild(o), !t && e.children && e.children.length > 0) {
345
467
  const i = ve(e.expanded);
346
468
  if (o.appendChild(i), e.expanded !== !1) {
347
- const r = at(this, e.children);
469
+ const r = mt(this, e.children);
348
470
  n.appendChild(r);
349
471
  }
350
472
  }
351
473
  return { grp: n, top: o, tpc: s };
352
- }, ht = function(e) {
474
+ }, vt = function(e) {
353
475
  const t = k.createElement("me-parent"), n = this.createTopic(e);
354
476
  return ge(n, e), t.appendChild(n), { p: t, tpc: n };
355
- }, ut = function(e) {
477
+ }, yt = function(e) {
356
478
  const t = k.createElement("me-children");
357
479
  return t.append(...e), t;
358
- }, ft = function(e) {
480
+ }, bt = function(e) {
359
481
  const t = k.createElement("me-tpc");
360
482
  return t.nodeObj = e, t.dataset.nodeid = "me" + e.id, t.draggable = this.draggable, t;
361
483
  };
@@ -365,7 +487,7 @@ function qe(e) {
365
487
  const n = window.getSelection();
366
488
  n && (n.removeAllRanges(), n.addRange(t));
367
489
  }
368
- const pt = function(e) {
490
+ const xt = function(e) {
369
491
  if (!e)
370
492
  return;
371
493
  const t = k.createElement("div"), n = e.text.textContent;
@@ -413,10 +535,10 @@ const pt = function(e) {
413
535
  }, Z = function(e) {
414
536
  const t = q.createElementNS(W, "svg");
415
537
  return t.setAttribute("class", e), t.setAttribute("overflow", "visible"), t;
416
- }, Ce = function() {
538
+ }, Se = function() {
417
539
  const e = q.createElementNS(W, "line");
418
540
  return e.setAttribute("stroke", "#bbb"), e.setAttribute("fill", "none"), e.setAttribute("stroke-width", "2"), e;
419
- }, mt = function(e, t, n) {
541
+ }, wt = function(e, t, n) {
420
542
  const o = q.createElementNS(W, "g");
421
543
  return [
422
544
  {
@@ -484,38 +606,38 @@ const pt = function(e) {
484
606
  obj: n
485
607
  }));
486
608
  });
487
- }, gt = function(e) {
609
+ }, Et = function(e) {
488
610
  const t = this.map.querySelector("me-root"), n = t.offsetTop, o = t.offsetLeft, s = t.offsetWidth, i = t.offsetHeight, c = this.nodes.offsetWidth;
489
611
  this.nodes.style.top = `${1e4 - this.nodes.offsetHeight / 2}px`, this.alignment === "root" ? this.nodes.style.left = `${1e4 - o - s / 2}px` : this.nodes.style.left = `${1e4 - c / 2}px`;
490
612
  const a = this.map.querySelectorAll("me-main > me-wrapper");
491
613
  this.lines.innerHTML = "";
492
614
  for (let d = 0; d < a.length; d++) {
493
- const l = a[d], u = l.querySelector("me-tpc"), { offsetLeft: h, offsetTop: v } = B(this.nodes, u), f = u.offsetWidth, p = u.offsetHeight, m = l.parentNode.className, g = this.generateMainBranch({ pT: n, pL: o, pW: s, pH: i, cT: v, cL: h, cW: f, cH: p, direction: m, containerHeight: this.nodes.offsetHeight }), y = this.theme.palette, x = u.nodeObj.branchColor || y[d % y.length];
494
- u.style.borderColor = x, this.lines.appendChild(Ve(g, x, "3"));
495
- const E = l.children[0].children[1];
496
- if (E && (E.style.top = (E.parentNode.offsetHeight - E.offsetHeight) / 2 + "px", m === M.LHS ? E.style.left = "-10px" : E.style.right = "-10px"), e && e !== l)
615
+ const l = a[d], f = l.querySelector("me-tpc"), { offsetLeft: h, offsetTop: g } = B(this.nodes, f), v = f.offsetWidth, u = f.offsetHeight, p = l.parentNode.className, m = this.generateMainBranch({ pT: n, pL: o, pW: s, pH: i, cT: g, cL: h, cW: v, cH: u, direction: p, containerHeight: this.nodes.offsetHeight }), y = this.theme.palette, x = f.nodeObj.branchColor || y[d % y.length];
616
+ f.style.borderColor = x, this.lines.appendChild(Ve(m, x, "3"));
617
+ const w = l.children[0].children[1];
618
+ if (w && (w.style.top = (w.parentNode.offsetHeight - w.offsetHeight) / 2 + "px", p === T.LHS ? w.style.left = "-10px" : w.style.right = "-10px"), e && e !== l)
497
619
  continue;
498
- const b = Z("subLines"), w = l.lastChild;
499
- w.tagName === "svg" && w.remove(), l.appendChild(b), Ke(this, b, x, l, m, !0);
620
+ const b = Z("subLines"), E = l.lastChild;
621
+ E.tagName === "svg" && E.remove(), l.appendChild(b), Ke(this, b, x, l, p, !0);
500
622
  }
501
623
  this.renderArrow(), this.renderSummary(), this.bus.fire("linkDiv");
502
624
  }, Ke = function(e, t, n, o, s, i) {
503
625
  const r = o.firstChild, c = o.children[1].children;
504
626
  if (c.length === 0)
505
627
  return;
506
- const a = r.offsetTop, d = r.offsetLeft, l = r.offsetWidth, u = r.offsetHeight;
628
+ const a = r.offsetTop, d = r.offsetLeft, l = r.offsetWidth, f = r.offsetHeight;
507
629
  for (let h = 0; h < c.length; h++) {
508
- const v = c[h], f = v.firstChild, p = f.offsetTop, m = f.offsetLeft, g = f.offsetWidth, y = f.offsetHeight, x = f.firstChild.nodeObj.branchColor || n, E = e.generateSubBranch({ pT: a, pL: d, pW: l, pH: u, cT: p, cL: m, cW: g, cH: y, direction: s, isFirst: i });
509
- t.appendChild(Ve(E, x, "2"));
510
- const b = f.children[1];
630
+ const g = c[h], v = g.firstChild, u = v.offsetTop, p = v.offsetLeft, m = v.offsetWidth, y = v.offsetHeight, x = v.firstChild.nodeObj.branchColor || n, w = e.generateSubBranch({ pT: a, pL: d, pW: l, pH: f, cT: u, cL: p, cW: m, cH: y, direction: s, isFirst: i });
631
+ t.appendChild(Ve(w, x, "2"));
632
+ const b = v.children[1];
511
633
  if (b) {
512
- if (b.style.bottom = -(b.offsetHeight / 2) + "px", s === M.LHS ? b.style.left = "10px" : s === M.RHS && (b.style.right = "10px"), !b.expanded)
634
+ if (b.style.bottom = -(b.offsetHeight / 2) + "px", s === T.LHS ? b.style.left = "10px" : s === T.RHS && (b.style.right = "10px"), !b.expanded)
513
635
  continue;
514
636
  } else
515
637
  continue;
516
- Ke(e, t, x, v, s);
638
+ Ke(e, t, x, g, s);
517
639
  }
518
- }, Ne = {
640
+ }, _e = {
519
641
  addChild: "插入子节点",
520
642
  addParent: "插入父节点",
521
643
  addSibling: "插入同级节点",
@@ -527,9 +649,9 @@ const pt = function(e) {
527
649
  link: "连接",
528
650
  clickTips: "请点击目标节点",
529
651
  summary: "摘要"
530
- }, Se = {
531
- cn: Ne,
532
- zh_CN: Ne,
652
+ }, Me = {
653
+ cn: _e,
654
+ zh_CN: _e,
533
655
  zh_TW: {
534
656
  addChild: "插入子節點",
535
657
  addParent: "插入父節點",
@@ -648,36 +770,36 @@ const pt = function(e) {
648
770
  summary: "요약"
649
771
  }
650
772
  };
651
- function vt(e, t) {
773
+ function Ct(e, t) {
652
774
  t = t === !0 ? {
653
775
  focus: !0,
654
776
  link: !0
655
777
  } : t;
656
778
  const n = (b) => {
657
- const w = document.createElement("div");
658
- return w.innerText = b, w.className = "tips", w;
659
- }, o = (b, w, _) => {
660
- const T = document.createElement("li");
661
- return T.id = b, T.innerHTML = `<span>${se(w)}</span><span ${_ ? 'class="key"' : ""}>${se(_)}</span>`, T;
662
- }, s = Se[e.locale] ? e.locale : "en", i = Se[s], r = o("cm-add_child", i.addChild, "Tab"), c = o("cm-add_parent", i.addParent, "Ctrl + Enter"), a = o("cm-add_sibling", i.addSibling, "Enter"), d = o("cm-remove_child", i.removeNode, "Delete"), l = o("cm-fucus", i.focus, ""), u = o("cm-unfucus", i.cancelFocus, ""), h = o("cm-up", i.moveUp, "PgUp"), v = o("cm-down", i.moveDown, "Pgdn"), f = o("cm-link", i.link, ""), p = o("cm-link-bidirectional", "Bidirectional Link", ""), m = o("cm-summary", i.summary, ""), g = document.createElement("ul");
663
- if (g.className = "menu-list", g.appendChild(r), g.appendChild(c), g.appendChild(a), g.appendChild(d), t.focus && (g.appendChild(l), g.appendChild(u)), g.appendChild(h), g.appendChild(v), g.appendChild(m), t.link && (g.appendChild(f), g.appendChild(p)), t && t.extend)
779
+ const E = document.createElement("div");
780
+ return E.innerText = b, E.className = "tips", E;
781
+ }, o = (b, E, _) => {
782
+ const M = document.createElement("li");
783
+ return M.id = b, M.innerHTML = `<span>${oe(E)}</span><span ${_ ? 'class="key"' : ""}>${oe(_)}</span>`, M;
784
+ }, s = Me[e.locale] ? e.locale : "en", i = Me[s], r = o("cm-add_child", i.addChild, "Tab"), c = o("cm-add_parent", i.addParent, "Ctrl + Enter"), a = o("cm-add_sibling", i.addSibling, "Enter"), d = o("cm-remove_child", i.removeNode, "Delete"), l = o("cm-fucus", i.focus, ""), f = o("cm-unfucus", i.cancelFocus, ""), h = o("cm-up", i.moveUp, "PgUp"), g = o("cm-down", i.moveDown, "Pgdn"), v = o("cm-link", i.link, ""), u = o("cm-link-bidirectional", "Bidirectional Link", ""), p = o("cm-summary", i.summary, ""), m = document.createElement("ul");
785
+ if (m.className = "menu-list", m.appendChild(r), m.appendChild(c), m.appendChild(a), m.appendChild(d), t.focus && (m.appendChild(l), m.appendChild(f)), m.appendChild(h), m.appendChild(g), m.appendChild(p), t.link && (m.appendChild(v), m.appendChild(u)), t && t.extend)
664
786
  for (let b = 0; b < t.extend.length; b++) {
665
- const w = t.extend[b], _ = o(w.name, w.name, w.key || "");
666
- g.appendChild(_), _.onclick = (T) => {
667
- w.onclick(T);
787
+ const E = t.extend[b], _ = o(E.name, E.name, E.key || "");
788
+ m.appendChild(_), _.onclick = (M) => {
789
+ E.onclick(M);
668
790
  };
669
791
  }
670
792
  const y = document.createElement("div");
671
- y.className = "context-menu", y.appendChild(g), y.hidden = !0, e.container.append(y);
793
+ y.className = "context-menu", y.appendChild(m), y.hidden = !0, e.container.append(y);
672
794
  let x = !0;
673
795
  e.container.oncontextmenu = function(b) {
674
796
  if (b.preventDefault(), !e.editable || e.dragMoveHelper.moved)
675
797
  return;
676
- const w = b.target;
677
- if (ze(w)) {
678
- w.parentElement.tagName === "ME-ROOT" ? x = !0 : x = !1, x ? (l.className = "disabled", h.className = "disabled", v.className = "disabled", c.className = "disabled", a.className = "disabled", d.className = "disabled") : (l.className = "", h.className = "", v.className = "", c.className = "", a.className = "", d.className = ""), w.classList.contains("selected") || e.selectNode(w), y.hidden = !1, g.style.top = "", g.style.bottom = "", g.style.left = "", g.style.right = "";
679
- const _ = g.getBoundingClientRect(), T = g.offsetHeight, $ = g.offsetWidth, R = b.clientY - _.top, U = b.clientX - _.left;
680
- T + R > window.innerHeight ? (g.style.top = "", g.style.bottom = "0px") : (g.style.bottom = "", g.style.top = R + 15 + "px"), $ + U > window.innerWidth ? (g.style.left = "", g.style.right = "0px") : (g.style.right = "", g.style.left = U + 10 + "px");
798
+ const E = b.target;
799
+ if (ze(E)) {
800
+ E.parentElement.tagName === "ME-ROOT" ? x = !0 : x = !1, x ? (l.className = "disabled", h.className = "disabled", g.className = "disabled", c.className = "disabled", a.className = "disabled", d.className = "disabled") : (l.className = "", h.className = "", g.className = "", c.className = "", a.className = "", d.className = ""), E.classList.contains("selected") || e.selectNode(E), y.hidden = !1, m.style.top = "", m.style.bottom = "", m.style.left = "", m.style.right = "";
801
+ const _ = m.getBoundingClientRect(), M = m.offsetHeight, $ = m.offsetWidth, R = b.clientY - _.top, U = b.clientX - _.left;
802
+ M + R > window.innerHeight ? (m.style.top = "", m.style.bottom = "0px") : (m.style.bottom = "", m.style.top = R + 15 + "px"), $ + U > window.innerWidth ? (m.style.left = "", m.style.right = "0px") : (m.style.right = "", m.style.left = U + 10 + "px");
681
803
  }
682
804
  }, y.onclick = (b) => {
683
805
  b.target === y && (y.hidden = !0);
@@ -691,152 +813,32 @@ function vt(e, t) {
691
813
  x || (e.removeNodes(e.currentNodes || []), y.hidden = !0);
692
814
  }, l.onclick = () => {
693
815
  x || (e.focusNode(e.currentNode), y.hidden = !0);
694
- }, u.onclick = () => {
816
+ }, f.onclick = () => {
695
817
  e.cancelFocus(), y.hidden = !0;
696
818
  }, h.onclick = () => {
697
819
  x || (e.moveUpNode(), y.hidden = !0);
698
- }, v.onclick = () => {
820
+ }, g.onclick = () => {
699
821
  x || (e.moveDownNode(), y.hidden = !0);
700
822
  };
701
- const E = (b) => {
823
+ const w = (b) => {
702
824
  y.hidden = !0;
703
- const w = e.currentNode, _ = n(i.clickTips);
825
+ const E = e.currentNode, _ = n(i.clickTips);
704
826
  e.container.appendChild(_), e.map.addEventListener(
705
827
  "click",
706
- (T) => {
707
- T.preventDefault(), _.remove();
708
- const $ = T.target;
709
- ($.parentElement.tagName === "ME-PARENT" || $.parentElement.tagName === "ME-ROOT") && e.createArrow(w, $, b);
828
+ (M) => {
829
+ M.preventDefault(), _.remove();
830
+ const $ = M.target;
831
+ ($.parentElement.tagName === "ME-PARENT" || $.parentElement.tagName === "ME-ROOT") && e.createArrow(E, $, b);
710
832
  },
711
833
  {
712
834
  once: !0
713
835
  }
714
836
  );
715
837
  };
716
- return f.onclick = () => E(), p.onclick = () => E({ bidirectional: !0 }), m.onclick = () => {
838
+ return v.onclick = () => w(), u.onclick = () => w({ bidirectional: !0 }), p.onclick = () => {
717
839
  y.hidden = !0, e.createSummary(), e.unselectNodes(e.currentNodes);
718
840
  }, () => {
719
- r.onclick = null, c.onclick = null, a.onclick = null, d.onclick = null, l.onclick = null, u.onclick = null, h.onclick = null, v.onclick = null, f.onclick = null, m.onclick = null, y.onclick = null, e.container.oncontextmenu = null;
720
- };
721
- }
722
- const yt = (e) => {
723
- const t = e.map.querySelectorAll(".lhs>me-wrapper>me-parent>me-tpc");
724
- e.selectNode(t[Math.ceil(t.length / 2) - 1]);
725
- }, bt = (e) => {
726
- const t = e.map.querySelectorAll(".rhs>me-wrapper>me-parent>me-tpc");
727
- e.selectNode(t[Math.ceil(t.length / 2) - 1]);
728
- }, xt = (e) => {
729
- e.selectNode(e.map.querySelector("me-root>me-tpc"));
730
- }, wt = function(e, t) {
731
- const n = t.parentElement.parentElement.parentElement.previousSibling;
732
- if (n) {
733
- const o = n.firstChild;
734
- e.selectNode(o);
735
- }
736
- }, Et = function(e, t) {
737
- const n = t.parentElement.nextSibling;
738
- if (n && n.firstChild) {
739
- const o = n.firstChild.firstChild.firstChild;
740
- e.selectNode(o);
741
- }
742
- }, _e = function(e, t) {
743
- var i, r;
744
- const n = e.currentNode || ((i = e.currentNodes) == null ? void 0 : i[0]);
745
- if (!n)
746
- return;
747
- const o = n.nodeObj, s = n.offsetParent.offsetParent.parentElement;
748
- o.parent ? s.className === t ? Et(e, n) : (r = o.parent) != null && r.parent ? wt(e, n) : xt(e) : t === M.LHS ? yt(e) : bt(e);
749
- }, Me = function(e, t) {
750
- const n = e.currentNode;
751
- if (!n || !n.nodeObj.parent)
752
- return;
753
- const s = t + "Sibling", i = n.parentElement.parentElement[s];
754
- i ? e.selectNode(i.firstChild.firstChild) : e.selectNode(n);
755
- }, ee = function(e, t, n) {
756
- switch (t) {
757
- case "in":
758
- if (e.scaleVal > 1.6)
759
- return;
760
- e.scale(e.scaleVal + 0.2, n);
761
- break;
762
- case "out":
763
- if (e.scaleVal < 0.6)
764
- return;
765
- e.scale(e.scaleVal - 0.2, n);
766
- }
767
- };
768
- function Ct(e, t) {
769
- t = t === !0 ? {} : t;
770
- const n = () => {
771
- e.currentArrow ? e.removeArrow() : e.currentSummary ? e.removeSummary(e.currentSummary.summaryObj.id) : e.currentNodes && e.removeNodes(e.currentNodes);
772
- }, o = {
773
- Enter: (s) => {
774
- s.shiftKey ? e.insertSibling("before") : s.ctrlKey ? e.insertParent() : e.insertSibling("after");
775
- },
776
- Tab: () => {
777
- e.addChild();
778
- },
779
- F1: () => {
780
- e.toCenter();
781
- },
782
- F2: () => {
783
- e.beginEdit();
784
- },
785
- ArrowUp: (s) => {
786
- if (s.altKey)
787
- e.moveUpNode();
788
- else {
789
- if (s.metaKey || s.ctrlKey)
790
- return e.initSide();
791
- Me(e, "previous");
792
- }
793
- },
794
- ArrowDown: (s) => {
795
- s.altKey ? e.moveDownNode() : Me(e, "next");
796
- },
797
- ArrowLeft: (s) => {
798
- if (s.metaKey || s.ctrlKey)
799
- return e.initLeft();
800
- _e(e, M.LHS);
801
- },
802
- ArrowRight: (s) => {
803
- if (s.metaKey || s.ctrlKey)
804
- return e.initRight();
805
- _e(e, M.RHS);
806
- },
807
- PageUp: () => e.moveUpNode(),
808
- PageDown: () => {
809
- e.moveDownNode();
810
- },
811
- c: (s) => {
812
- (s.metaKey || s.ctrlKey) && (e.waitCopy = e.currentNodes);
813
- },
814
- x: (s) => {
815
- (s.metaKey || s.ctrlKey) && (e.waitCopy = e.currentNodes, n());
816
- },
817
- v: (s) => {
818
- !e.waitCopy || !e.currentNode || (s.metaKey || s.ctrlKey) && (e.waitCopy.length === 1 ? e.copyNode(e.waitCopy[0], e.currentNode) : e.copyNodes(e.waitCopy, e.currentNode));
819
- },
820
- "=": (s) => {
821
- (s.metaKey || s.ctrlKey) && ee(e, "in");
822
- },
823
- "-": (s) => {
824
- (s.metaKey || s.ctrlKey) && ee(e, "out");
825
- },
826
- 0: (s) => {
827
- (s.metaKey || s.ctrlKey) && e.scale(1);
828
- },
829
- Delete: n,
830
- Backspace: n,
831
- ...t
832
- };
833
- e.map.onkeydown = (s) => {
834
- if (s.preventDefault(), !e.editable || s.target !== s.currentTarget)
835
- return;
836
- const i = o[s.key];
837
- i && i(s);
838
- }, e.map.onwheel = (s) => {
839
- s.stopPropagation(), s.preventDefault(), s.ctrlKey || s.metaKey ? s.deltaY < 0 ? ee(e, "in", e.dragMoveHelper) : e.scaleVal - 0.2 > 0 && ee(e, "out", e.dragMoveHelper) : s.shiftKey ? e.move(-s.deltaY, 0) : e.move(0, -s.deltaY);
841
+ r.onclick = null, c.onclick = null, a.onclick = null, d.onclick = null, l.onclick = null, f.onclick = null, h.onclick = null, g.onclick = null, v.onclick = null, p.onclick = null, y.onclick = null, e.container.oncontextmenu = null;
840
842
  };
841
843
  }
842
844
  const he = document, Nt = function(e, t) {
@@ -888,9 +890,9 @@ function Mt(e) {
888
890
  d.preventDefault();
889
891
  return;
890
892
  }
891
- let u = e.currentNodes;
892
- u != null && u.includes(l) || (e.selectNode(l), u = e.currentNodes), e.dragged = u, u.length > 1 ? o.innerHTML = u.length + "" : o.innerHTML = l.innerHTML;
893
- for (const h of u)
893
+ let f = e.currentNodes;
894
+ f != null && f.includes(l) || (e.selectNode(l), f = e.currentNodes), e.dragged = f, f.length > 1 ? o.innerHTML = f.length + "" : o.innerHTML = l.innerHTML;
895
+ for (const h of f)
894
896
  h.parentElement.parentElement.style.opacity = "0.5";
895
897
  d.dataTransfer.setDragImage(o, 0, 0), d.dataTransfer.dropEffect = "move", e.dragMoveHelper.clear();
896
898
  }, r = (d) => {
@@ -900,26 +902,26 @@ function Mt(e) {
900
902
  s.stop();
901
903
  for (const h of l)
902
904
  h.parentElement.parentElement.style.opacity = "1";
903
- const u = d.target;
904
- u.style.opacity = "", n && (ue(n), t === "before" ? e.moveNodeBefore(l, n) : t === "after" ? e.moveNodeAfter(l, n) : t === "in" && e.moveNodeIn(l, n), e.dragged = null);
905
+ const f = d.target;
906
+ f.style.opacity = "", n && (ue(n), t === "before" ? e.moveNodeBefore(l, n) : t === "after" ? e.moveNodeAfter(l, n) : t === "in" && e.moveNodeIn(l, n), e.dragged = null);
905
907
  }, c = (d) => {
906
908
  d.preventDefault();
907
- const l = 12 * e.scaleVal, { dragged: u } = e;
908
- if (!u)
909
+ const l = 12 * e.scaleVal, { dragged: f } = e;
910
+ if (!f)
909
911
  return;
910
912
  const h = e.container.getBoundingClientRect();
911
913
  d.clientX < h.x + 50 ? s.move(1, 0) : d.clientX > h.x + h.width - 50 ? s.move(-1, 0) : d.clientY < h.y + 50 ? s.move(0, 1) : d.clientY > h.y + h.height - 50 ? s.move(0, -1) : s.stop(), ue(n);
912
- const v = he.elementFromPoint(d.clientX, d.clientY - l);
913
- if (Te(v, u)) {
914
- n = v;
915
- const f = v.getBoundingClientRect(), p = f.y;
916
- d.clientY > p + f.height ? t = "after" : t = "in";
914
+ const g = he.elementFromPoint(d.clientX, d.clientY - l);
915
+ if (Te(g, f)) {
916
+ n = g;
917
+ const v = g.getBoundingClientRect(), u = v.y;
918
+ d.clientY > u + v.height ? t = "after" : t = "in";
917
919
  } else {
918
- const f = he.elementFromPoint(d.clientX, d.clientY + l), p = f.getBoundingClientRect();
919
- if (Te(f, u)) {
920
- n = f;
921
- const m = p.y;
922
- d.clientY < m ? t = "before" : t = "in";
920
+ const v = he.elementFromPoint(d.clientX, d.clientY + l), u = v.getBoundingClientRect();
921
+ if (Te(v, f)) {
922
+ n = v;
923
+ const p = u.y;
924
+ d.clientY < p ? t = "before" : t = "in";
923
925
  } else
924
926
  t = n = null;
925
927
  }
@@ -1049,7 +1051,7 @@ const Ye = (e) => (t, n, o, s = {}) => {
1049
1051
  for (const r of n)
1050
1052
  i[e](r, o, { capture: !1, ...s });
1051
1053
  return [t, n, o, s];
1052
- }, I = Ye("addEventListener"), O = Ye("removeEventListener"), te = (e) => {
1054
+ }, I = Ye("addEventListener"), O = Ye("removeEventListener"), ee = (e) => {
1053
1055
  var t;
1054
1056
  const { clientX: n, clientY: o, target: s } = ((t = e.touches) == null ? void 0 : t[0]) ?? e;
1055
1057
  return { x: n, y: o, target: s };
@@ -1185,22 +1187,22 @@ class We extends Ot {
1185
1187
  });
1186
1188
  }
1187
1189
  _onTapStart(t, n = !1) {
1188
- const { x: o, y: s, target: i } = te(t), { _options: r } = this, { document: c } = this._options, a = i.getBoundingClientRect();
1190
+ const { x: o, y: s, target: i } = ee(t), { _options: r } = this, { document: c } = this._options, a = i.getBoundingClientRect();
1189
1191
  if (t instanceof MouseEvent && !Rt(t, r.behaviour.triggers))
1190
1192
  return;
1191
1193
  const d = K(r.startAreas, r.document), l = K(r.boundaries, r.document);
1192
1194
  this._targetElement = l.find(
1193
- (v) => Le(v.getBoundingClientRect(), a)
1195
+ (g) => Le(g.getBoundingClientRect(), a)
1194
1196
  );
1195
- const u = t.composedPath();
1196
- if (!this._targetElement || !d.find((v) => u.includes(v)) || !l.find((v) => u.includes(v)) || !n && this._emitEvent("beforestart", t) === !1)
1197
+ const f = t.composedPath();
1198
+ if (!this._targetElement || !d.find((g) => f.includes(g)) || !l.find((g) => f.includes(g)) || !n && this._emitEvent("beforestart", t) === !1)
1197
1199
  return;
1198
1200
  this._areaLocation = { x1: o, y1: s, x2: 0, y2: 0 };
1199
1201
  const h = c.scrollingElement ?? c.body;
1200
1202
  this._scrollDelta = { x: h.scrollLeft, y: h.scrollTop }, this._singleClick = !0, this.clearSelection(!1, !0), I(c, ["touchmove", "mousemove"], this._delayedTapMove, { passive: !1 }), I(c, ["mouseup", "touchcancel", "touchend"], this._onTapStop), I(c, "scroll", this._onScroll);
1201
1203
  }
1202
1204
  _onSingleTap(t) {
1203
- const { singleTap: { intersect: n }, range: o } = this._options.features, s = te(t);
1205
+ const { singleTap: { intersect: n }, range: o } = this._options.features, s = ee(t);
1204
1206
  let i;
1205
1207
  if (n === "native")
1206
1208
  i = s.target;
@@ -1208,8 +1210,8 @@ class We extends Ot {
1208
1210
  this.resolveSelectables();
1209
1211
  const { x: c, y: a } = s;
1210
1212
  i = this._selectables.find((d) => {
1211
- const { right: l, left: u, top: h, bottom: v } = d.getBoundingClientRect();
1212
- return c < l && c > u && a < v && a > h;
1213
+ const { right: l, left: f, top: h, bottom: g } = d.getBoundingClientRect();
1214
+ return c < l && c > f && a < g && a > h;
1213
1215
  });
1214
1216
  }
1215
1217
  if (!i)
@@ -1222,14 +1224,14 @@ class We extends Ot {
1222
1224
  const { stored: r } = this._selection;
1223
1225
  if (this._emitEvent("start", t), t.shiftKey && o && this._latestElement) {
1224
1226
  const c = this._latestElement, [a, d] = c.compareDocumentPosition(i) & 4 ? [i, c] : [c, i], l = [...this._selectables.filter(
1225
- (u) => u.compareDocumentPosition(a) & 4 && u.compareDocumentPosition(d) & 2
1227
+ (f) => f.compareDocumentPosition(a) & 4 && f.compareDocumentPosition(d) & 2
1226
1228
  ), a, d];
1227
1229
  this.select(l), this._latestElement = c;
1228
1230
  } else
1229
1231
  r.includes(i) && (r.length === 1 || t.ctrlKey || r.every((c) => this._selection.stored.includes(c))) ? this.deselect(i) : (this.select(i), this._latestElement = i);
1230
1232
  }
1231
1233
  _delayedTapMove(t) {
1232
- const { container: n, document: o, behaviour: { startThreshold: s } } = this._options, { x1: i, y1: r } = this._areaLocation, { x: c, y: a } = te(t);
1234
+ const { container: n, document: o, behaviour: { startThreshold: s } } = this._options, { x1: i, y1: r } = this._areaLocation, { x: c, y: a } = ee(t);
1233
1235
  if (
1234
1236
  // Single number for both coordinates
1235
1237
  typeof s == "number" && z(c + a - (i + r)) >= s || // Different x and y threshold
@@ -1264,7 +1266,7 @@ class We extends Ot {
1264
1266
  }));
1265
1267
  }
1266
1268
  _onTapMove(t) {
1267
- const { x: n, y: o } = te(t), { _scrollSpeed: s, _areaLocation: i, _options: r, _frame: c } = this, { speedDivider: a } = r.behaviour.scrolling, d = this._targetElement;
1269
+ const { x: n, y: o } = ee(t), { _scrollSpeed: s, _areaLocation: i, _options: r, _frame: c } = this, { speedDivider: a } = r.behaviour.scrolling, d = this._targetElement;
1268
1270
  if (i.x2 = n, i.y2 = o, this._scrollAvailable && !this._scrollingActive && (s.y || s.x)) {
1269
1271
  this._scrollingActive = !0;
1270
1272
  const l = () => {
@@ -1272,8 +1274,8 @@ class We extends Ot {
1272
1274
  this._scrollingActive = !1;
1273
1275
  return;
1274
1276
  }
1275
- const { scrollTop: u, scrollLeft: h } = d;
1276
- s.y && (d.scrollTop += je(s.y / a), i.y1 -= d.scrollTop - u), s.x && (d.scrollLeft += je(s.x / a), i.x1 -= d.scrollLeft - h), c.next(t), requestAnimationFrame(l);
1277
+ const { scrollTop: f, scrollLeft: h } = d;
1278
+ s.y && (d.scrollTop += je(s.y / a), i.y1 -= d.scrollTop - f), s.x && (d.scrollLeft += je(s.x / a), i.x1 -= d.scrollLeft - h), c.next(t), requestAnimationFrame(l);
1277
1279
  };
1278
1280
  requestAnimationFrame(l);
1279
1281
  } else
@@ -1293,12 +1295,12 @@ class We extends Ot {
1293
1295
  this._scrollSpeed.y += o * n, this._scrollSpeed.x += s * n, this._onTapMove(t), t.preventDefault();
1294
1296
  }
1295
1297
  _recalculateSelectionAreaRect() {
1296
- const { _scrollSpeed: t, _areaLocation: n, _areaRect: o, _targetElement: s, _options: i } = this, { scrollTop: r, scrollHeight: c, clientHeight: a, scrollLeft: d, scrollWidth: l, clientWidth: u } = s, h = this._targetRect, { x1: v, y1: f } = n;
1297
- let { x2: p, y2: m } = n;
1298
- const { behaviour: { scrolling: { startScrollMargins: g } } } = i;
1299
- p < h.left + g.x ? (t.x = d ? -z(h.left - p + g.x) : 0, p = p < h.left ? h.left : p) : p > h.right - g.x ? (t.x = l - d - u ? z(h.left + h.width - p - g.x) : 0, p = p > h.right ? h.right : p) : t.x = 0, m < h.top + g.y ? (t.y = r ? -z(h.top - m + g.y) : 0, m = m < h.top ? h.top : m) : m > h.bottom - g.y ? (t.y = c - r - a ? z(h.top + h.height - m - g.y) : 0, m = m > h.bottom ? h.bottom : m) : t.y = 0;
1300
- const y = $e(v, p), x = $e(f, m), E = Ae(v, p), b = Ae(f, m);
1301
- o.x = y, o.y = x, o.width = E - y, o.height = b - x;
1298
+ const { _scrollSpeed: t, _areaLocation: n, _areaRect: o, _targetElement: s, _options: i } = this, { scrollTop: r, scrollHeight: c, clientHeight: a, scrollLeft: d, scrollWidth: l, clientWidth: f } = s, h = this._targetRect, { x1: g, y1: v } = n;
1299
+ let { x2: u, y2: p } = n;
1300
+ const { behaviour: { scrolling: { startScrollMargins: m } } } = i;
1301
+ u < h.left + m.x ? (t.x = d ? -z(h.left - u + m.x) : 0, u = u < h.left ? h.left : u) : u > h.right - m.x ? (t.x = l - d - f ? z(h.left + h.width - u - m.x) : 0, u = u > h.right ? h.right : u) : t.x = 0, p < h.top + m.y ? (t.y = r ? -z(h.top - p + m.y) : 0, p = p < h.top ? h.top : p) : p > h.bottom - m.y ? (t.y = c - r - a ? z(h.top + h.height - p - m.y) : 0, p = p > h.bottom ? h.bottom : p) : t.y = 0;
1302
+ const y = $e(g, u), x = $e(v, p), w = Ae(g, u), b = Ae(v, p);
1303
+ o.x = y, o.y = x, o.width = w - y, o.height = b - x;
1302
1304
  }
1303
1305
  _redrawSelectionArea() {
1304
1306
  const { x: t, y: n, width: o, height: s } = this._areaRect, { style: i } = this._area;
@@ -1310,29 +1312,29 @@ class We extends Ot {
1310
1312
  O(s, ["mousemove", "touchmove"], this._delayedTapMove), O(s, ["touchmove", "mousemove"], this._onTapMove), O(s, ["mouseup", "touchcancel", "touchend"], this._onTapStop), O(s, "scroll", this._onScroll), this._keepSelection(), t && r && i.singleTap.allow ? this._onSingleTap(t) : !r && !n && (this._updateElementSelection(), this._emitEvent("stop", t)), this._scrollSpeed.x = 0, this._scrollSpeed.y = 0, O(this._targetElement, "wheel", this._manualScroll, { passive: !0 }), this._clippingElement.remove(), (o = this._frame) == null || o.cancel(), D(this._area, "display", "none");
1311
1313
  }
1312
1314
  _updateElementSelection() {
1313
- const { _selectables: t, _options: n, _selection: o, _areaRect: s } = this, { stored: i, selected: r, touched: c } = o, { intersect: a, overlap: d } = n.behaviour, l = d === "invert", u = [], h = [], v = [];
1314
- for (let p = 0; p < t.length; p++) {
1315
- const m = t[p];
1316
- if (Le(s, m.getBoundingClientRect(), a)) {
1317
- if (r.includes(m))
1318
- i.includes(m) && !c.includes(m) && c.push(m);
1319
- else if (l && i.includes(m)) {
1320
- v.push(m);
1315
+ const { _selectables: t, _options: n, _selection: o, _areaRect: s } = this, { stored: i, selected: r, touched: c } = o, { intersect: a, overlap: d } = n.behaviour, l = d === "invert", f = [], h = [], g = [];
1316
+ for (let u = 0; u < t.length; u++) {
1317
+ const p = t[u];
1318
+ if (Le(s, p.getBoundingClientRect(), a)) {
1319
+ if (r.includes(p))
1320
+ i.includes(p) && !c.includes(p) && c.push(p);
1321
+ else if (l && i.includes(p)) {
1322
+ g.push(p);
1321
1323
  continue;
1322
1324
  } else
1323
- h.push(m);
1324
- u.push(m);
1325
+ h.push(p);
1326
+ f.push(p);
1325
1327
  }
1326
1328
  }
1327
- l && h.push(...i.filter((p) => !r.includes(p)));
1328
- const f = d === "keep";
1329
- for (let p = 0; p < r.length; p++) {
1330
- const m = r[p];
1331
- !u.includes(m) && !// Check if user wants to keep previously selected elements, e.g.
1329
+ l && h.push(...i.filter((u) => !r.includes(u)));
1330
+ const v = d === "keep";
1331
+ for (let u = 0; u < r.length; u++) {
1332
+ const p = r[u];
1333
+ !f.includes(p) && !// Check if user wants to keep previously selected elements, e.g.
1332
1334
  // not make them part of the current selection as soon as they're touched.
1333
- (f && i.includes(m)) && v.push(m);
1335
+ (v && i.includes(p)) && g.push(p);
1334
1336
  }
1335
- o.selected = u, o.changed = { added: h, removed: v }, this._latestElement = void 0;
1337
+ o.selected = f, o.changed = { added: h, removed: g }, this._latestElement = void 0;
1336
1338
  }
1337
1339
  _emitEvent(t, n) {
1338
1340
  return this.emit(t, {
@@ -1623,13 +1625,13 @@ const Yt = function({ map: e, direction: t }, n) {
1623
1625
  const { grp: i, top: r } = e.createWrapper(s);
1624
1626
  return Ge(e, t, i), { newTop: r, newNodeObj: s };
1625
1627
  }, Ut = function(e, t, n) {
1626
- var d, l, u, h;
1628
+ var d, l, f, h;
1627
1629
  const o = t || this.currentNode;
1628
1630
  if (!o)
1629
1631
  return;
1630
1632
  const s = o.nodeObj;
1631
1633
  if (s.parent) {
1632
- if (!((d = s.parent) != null && d.parent) && ((u = (l = s.parent) == null ? void 0 : l.children) == null ? void 0 : u.length) === 1) {
1634
+ if (!((d = s.parent) != null && d.parent) && ((f = (l = s.parent) == null ? void 0 : l.children) == null ? void 0 : f.length) === 1) {
1633
1635
  this.addChild(S(s.parent.id), n);
1634
1636
  return;
1635
1637
  }
@@ -1639,8 +1641,8 @@ const Yt = function({ map: e, direction: t }, n) {
1639
1641
  }
1640
1642
  const i = n || this.generateNewObj();
1641
1643
  if (!((h = s.parent) != null && h.parent)) {
1642
- const v = o.closest("me-main").className === M.LHS ? A : H;
1643
- i.direction = v;
1644
+ const g = o.closest("me-main").className === T.LHS ? A : H;
1645
+ i.direction = g;
1644
1646
  }
1645
1647
  It(i, e, s), P(this.nodeData);
1646
1648
  const r = o.parentElement, { grp: c, top: a } = this.createWrapper(i);
@@ -1834,14 +1836,14 @@ const dn = function(e) {
1834
1836
  }, yn = function() {
1835
1837
  this.editable = !1;
1836
1838
  }, bn = function(e, t = { x: 0, y: 0 }) {
1837
- const n = this.container.getBoundingClientRect(), o = n.width / 2 - 1e4, s = n.height / 2 - 1e4, i = this.scaleVal, r = this.map.style.transform, { x: c, y: a } = Fe(r), d = c - (t.x - n.left - n.width / 2), l = a - (t.y - n.top - n.height / 2), u = (o - d) * (1 - e / i), h = (s - l) * (1 - e / i);
1838
- this.map.style.transform = `translate(${c + u}px, ${a + h}px) scale(${e})`, this.scaleVal = e, this.bus.fire("scale", e);
1839
+ const n = this.container.getBoundingClientRect(), o = n.width / 2 - 1e4, s = n.height / 2 - 1e4, i = this.scaleVal, r = this.map.style.transform, { x: c, y: a } = Fe(r), d = c - (t.x - n.left - n.width / 2), l = a - (t.y - n.top - n.height / 2), f = (o - d) * (1 - e / i), h = (s - l) * (1 - e / i);
1840
+ this.map.style.transform = `translate(${c + f}px, ${a + h}px) scale(${e})`, this.scaleVal = e, this.bus.fire("scale", e);
1839
1841
  }, xn = function() {
1840
1842
  const e = this.nodes.offsetHeight / this.container.offsetHeight, t = this.nodes.offsetWidth / this.container.offsetWidth, n = 1 / Math.max(1, Math.max(e, t));
1841
1843
  this.scaleVal = n, this.map.style.transform = "scale(" + n + ")", this.bus.fire("scale", n);
1842
1844
  }, wn = function(e, t) {
1843
- const { map: n, scaleVal: o, container: s, bus: i } = this, r = n.style.transform, { x: c, y: a } = Fe(r), d = c + e, l = a + t, u = (1 - o) * 1e4, h = 0 - u, v = -2e4 + s.offsetWidth + u, f = -2e4 + s.offsetHeight + u, p = Math.min(h, Math.max(v, d)), m = Math.min(h, Math.max(f, l));
1844
- n.style.transform = `translate(${p}px, ${m}px) scale(${o})`, i.fire("move", { dx: e, dy: t });
1845
+ const { map: n, scaleVal: o, container: s, bus: i } = this, r = n.style.transform, { x: c, y: a } = Fe(r), d = c + e, l = a + t, f = (1 - o) * 1e4, h = 0 - f, g = -2e4 + s.offsetWidth + f, v = -2e4 + s.offsetHeight + f, u = Math.min(h, Math.max(g, d)), p = Math.min(h, Math.max(v, l));
1846
+ n.style.transform = `translate(${u}px, ${p}px) scale(${o})`, i.fire("move", { dx: e, dy: t });
1845
1847
  }, En = function() {
1846
1848
  const e = this.container.getBoundingClientRect(), t = e.width / 2 - 1e4, n = e.height / 2 - 1e4;
1847
1849
  this.map.style.transform = `translate(${t}px, ${n}px) scale(${this.scaleVal})`;
@@ -1970,18 +1972,18 @@ const On = function(e, t, n, o) {
1970
1972
  if (!t || !n)
1971
1973
  return;
1972
1974
  performance.now();
1973
- const i = le(e, t, o.delta1), r = le(e, n, o.delta2), { x: c, y: a } = Y(i), { ctrlX: d, ctrlY: l } = i, { ctrlX: u, ctrlY: h } = r, { x: v, y: f } = Y(r), p = re(u, h, v, f);
1974
- if (!p)
1975
+ const i = le(e, t, o.delta1), r = le(e, n, o.delta2), { x: c, y: a } = Y(i), { ctrlX: d, ctrlY: l } = i, { ctrlX: f, ctrlY: h } = r, { x: g, y: v } = Y(r), u = ie(f, h, g, v);
1976
+ if (!u)
1975
1977
  return;
1976
- const m = `M ${p.x1} ${p.y1} L ${v} ${f} L ${p.x2} ${p.y2}`;
1977
- let g = "";
1978
+ const p = `M ${u.x1} ${u.y1} L ${g} ${v} L ${u.x2} ${u.y2}`;
1979
+ let m = "";
1978
1980
  if (o.bidirectional) {
1979
- const w = re(d, l, c, a);
1980
- if (!w)
1981
+ const E = ie(d, l, c, a);
1982
+ if (!E)
1981
1983
  return;
1982
- g = `M ${w.x1} ${w.y1} L ${c} ${a} L ${w.x2} ${w.y2}`;
1984
+ m = `M ${E.x1} ${E.y1} L ${c} ${a} L ${E.x2} ${E.y2}`;
1983
1985
  }
1984
- const y = mt(`M ${c} ${a} C ${d} ${l} ${u} ${h} ${v} ${f}`, m, g), x = c / 8 + d * 3 / 8 + u * 3 / 8 + v / 8, E = a / 8 + l * 3 / 8 + h * 3 / 8 + f / 8, b = On(o.label, x, E, e.theme.cssVar["--color"]);
1986
+ const y = wt(`M ${c} ${a} C ${d} ${l} ${f} ${h} ${g} ${v}`, p, m), x = c / 8 + d * 3 / 8 + f * 3 / 8 + g / 8, w = a / 8 + l * 3 / 8 + h * 3 / 8 + v / 8, b = On(o.label, x, w, e.theme.cssVar["--color"]);
1985
1987
  y.appendChild(b), y.label = b, y.arrowObj = o, y.dataset.linkid = o.id, e.linkSvgGroup.appendChild(y), s || (e.arrows.push(o), e.currentArrow = y, et(e, o, i, r)), performance.now();
1986
1988
  }, Hn = function(e, t, n = {}) {
1987
1989
  const o = {
@@ -2032,7 +2034,7 @@ const On = function(e, t, n, o) {
2032
2034
  (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";
2033
2035
  }, et = function(e, t, n, o) {
2034
2036
  e.linkController.style.display = "initial", e.P2.style.display = "initial", e.P3.style.display = "initial", e.nodes.appendChild(e.linkController), e.nodes.appendChild(e.P2), e.nodes.appendChild(e.P3);
2035
- let { x: s, y: i } = Y(n), { ctrlX: r, ctrlY: c } = n, { ctrlX: a, ctrlY: d } = o, { x: l, y: u } = Y(o);
2037
+ let { x: s, y: i } = Y(n), { ctrlX: r, ctrlY: c } = n, { ctrlX: a, ctrlY: d } = o, { x: l, y: f } = Y(o);
2036
2038
  e.P2.style.cssText = `top:${c}px;left:${r}px;`, e.P3.style.cssText = `top:${d}px;left:${a}px;`, N(e.line1, {
2037
2039
  x1: s + "",
2038
2040
  y1: i + "",
@@ -2042,44 +2044,44 @@ const On = function(e, t, n, o) {
2042
2044
  x1: a + "",
2043
2045
  y1: d + "",
2044
2046
  x2: l + "",
2045
- y2: u + ""
2046
- }), e.helper1 = De.create(e.P2), e.helper2 = De.create(e.P3), e.helper1.init(e.map, (h, v) => {
2047
+ y2: f + ""
2048
+ }), e.helper1 = De.create(e.P2), e.helper2 = De.create(e.P3), e.helper1.init(e.map, (h, g) => {
2047
2049
  if (!e.currentArrow)
2048
2050
  return;
2049
- r = r + h / e.scaleVal, c = c + v / e.scaleVal;
2050
- const f = Y({ ...n, ctrlX: r, ctrlY: c });
2051
- s = f.x, i = f.y;
2052
- const p = s / 8 + r * 3 / 8 + a * 3 / 8 + l / 8, m = i / 8 + c * 3 / 8 + d * 3 / 8 + u / 8;
2053
- if (e.P2.style.top = c + "px", e.P2.style.left = r + "px", e.currentArrow.line.setAttribute("d", `M ${s} ${i} C ${r} ${c} ${a} ${d} ${l} ${u}`), t.bidirectional) {
2054
- const g = re(r, c, s, i);
2055
- if (!g)
2051
+ r = r + h / e.scaleVal, c = c + g / e.scaleVal;
2052
+ const v = Y({ ...n, ctrlX: r, ctrlY: c });
2053
+ s = v.x, i = v.y;
2054
+ const u = s / 8 + r * 3 / 8 + a * 3 / 8 + l / 8, p = i / 8 + c * 3 / 8 + d * 3 / 8 + f / 8;
2055
+ if (e.P2.style.top = c + "px", e.P2.style.left = r + "px", e.currentArrow.line.setAttribute("d", `M ${s} ${i} C ${r} ${c} ${a} ${d} ${l} ${f}`), t.bidirectional) {
2056
+ const m = ie(r, c, s, i);
2057
+ if (!m)
2056
2058
  return;
2057
- e.currentArrow.arrow2.setAttribute("d", `M ${g.x1} ${g.y1} L ${s} ${i} L ${g.x2} ${g.y2}`);
2059
+ e.currentArrow.arrow2.setAttribute("d", `M ${m.x1} ${m.y1} L ${s} ${i} L ${m.x2} ${m.y2}`);
2058
2060
  }
2059
2061
  N(e.currentArrow.label, {
2060
- x: p + "",
2061
- y: m + ""
2062
+ x: u + "",
2063
+ y: p + ""
2062
2064
  }), N(e.line1, {
2063
2065
  x1: s + "",
2064
2066
  y1: i + "",
2065
2067
  x2: r + "",
2066
2068
  y2: c + ""
2067
2069
  }), t.delta1.x = r - n.cx, t.delta1.y = c - n.cy, e.bus.fire("updateArrowDelta", t);
2068
- }), e.helper2.init(e.map, (h, v) => {
2070
+ }), e.helper2.init(e.map, (h, g) => {
2069
2071
  if (!e.currentArrow)
2070
2072
  return;
2071
- a = a + h / e.scaleVal, d = d + v / e.scaleVal;
2072
- const f = Y({ ...o, ctrlX: a, ctrlY: d });
2073
- l = f.x, u = f.y;
2074
- const p = s / 8 + r * 3 / 8 + a * 3 / 8 + l / 8, m = i / 8 + c * 3 / 8 + d * 3 / 8 + u / 8, g = re(a, d, l, u);
2075
- g && (e.P3.style.top = d + "px", e.P3.style.left = a + "px", e.currentArrow.line.setAttribute("d", `M ${s} ${i} C ${r} ${c} ${a} ${d} ${l} ${u}`), e.currentArrow.arrow1.setAttribute("d", `M ${g.x1} ${g.y1} L ${l} ${u} L ${g.x2} ${g.y2}`), N(e.currentArrow.label, {
2076
- x: p + "",
2077
- y: m + ""
2073
+ a = a + h / e.scaleVal, d = d + g / e.scaleVal;
2074
+ const v = Y({ ...o, ctrlX: a, ctrlY: d });
2075
+ l = v.x, f = v.y;
2076
+ const u = s / 8 + r * 3 / 8 + a * 3 / 8 + l / 8, p = i / 8 + c * 3 / 8 + d * 3 / 8 + f / 8, m = ie(a, d, l, f);
2077
+ m && (e.P3.style.top = d + "px", e.P3.style.left = a + "px", e.currentArrow.line.setAttribute("d", `M ${s} ${i} C ${r} ${c} ${a} ${d} ${l} ${f}`), e.currentArrow.arrow1.setAttribute("d", `M ${m.x1} ${m.y1} L ${l} ${f} L ${m.x2} ${m.y2}`), N(e.currentArrow.label, {
2078
+ x: u + "",
2079
+ y: p + ""
2078
2080
  }), N(e.line2, {
2079
2081
  x1: a + "",
2080
2082
  y1: d + "",
2081
2083
  x2: l + "",
2082
- y2: u + ""
2084
+ y2: f + ""
2083
2085
  }), t.delta2.x = a - o.cx, t.delta2.y = d - o.cy, e.bus.fire("updateArrowDelta", t));
2084
2086
  });
2085
2087
  };
@@ -2101,7 +2103,7 @@ function qn(e) {
2101
2103
  Ie(this, t, e.arrowObj);
2102
2104
  }
2103
2105
  function Vn() {
2104
- this.arrows = this.arrows.filter((e) => ie(e.from, this.nodeData) && ie(e.to, this.nodeData));
2106
+ this.arrows = this.arrows.filter((e) => se(e.from, this.nodeData) && se(e.to, this.nodeData));
2105
2107
  }
2106
2108
  const In = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2107
2109
  __proto__: null,
@@ -2118,23 +2120,23 @@ const In = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2118
2120
  if (e.length === 0)
2119
2121
  throw new Error("No selected node.");
2120
2122
  if (e.length === 1) {
2121
- const l = e[0].nodeObj, u = e[0].nodeObj.parent;
2122
- if (!u)
2123
+ const l = e[0].nodeObj, f = e[0].nodeObj.parent;
2124
+ if (!f)
2123
2125
  throw new Error("Can not select root node.");
2124
- const h = u.children.findIndex((v) => l === v);
2126
+ const h = f.children.findIndex((g) => l === g);
2125
2127
  return {
2126
- parent: u.id,
2128
+ parent: f.id,
2127
2129
  start: h,
2128
2130
  end: h
2129
2131
  };
2130
2132
  }
2131
2133
  let t = 0;
2132
2134
  const n = e.map((l) => {
2133
- let u = l.nodeObj;
2135
+ let f = l.nodeObj;
2134
2136
  const h = [];
2135
- for (; u.parent; ) {
2136
- const v = u.parent, f = v.children, p = f == null ? void 0 : f.indexOf(u);
2137
- u = v, h.unshift({ node: u, index: p });
2137
+ for (; f.parent; ) {
2138
+ const g = f.parent, v = g.children, u = v == null ? void 0 : v.indexOf(f);
2139
+ f = g, h.unshift({ node: f, index: u });
2138
2140
  }
2139
2141
  return h.length > t && (t = h.length), h;
2140
2142
  });
@@ -2142,8 +2144,8 @@ const In = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2142
2144
  e:
2143
2145
  for (; o < t; o++) {
2144
2146
  const l = (a = n[0][o]) == null ? void 0 : a.node;
2145
- for (let u = 1; u < n.length; u++)
2146
- if (((d = n[u][o]) == null ? void 0 : d.node) !== l)
2147
+ for (let f = 1; f < n.length; f++)
2148
+ if (((d = n[f][o]) == null ? void 0 : d.node) !== l)
2147
2149
  break e;
2148
2150
  }
2149
2151
  if (!o)
@@ -2181,21 +2183,21 @@ const In = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2181
2183
  let s;
2182
2184
  return o.parent ? s = n.closest("me-main").className : s = S(o.children[t].id).closest("me-main").className, s;
2183
2185
  }, we = function(e, t) {
2184
- var w;
2186
+ var E;
2185
2187
  const { id: n, label: o, parent: s, start: i, end: r } = t, c = e.nodes, d = S(s).nodeObj, l = Xn(t);
2186
- let u = 1 / 0, h = 0, v = 0, f = 0;
2188
+ let f = 1 / 0, h = 0, g = 0, v = 0;
2187
2189
  for (let _ = i; _ <= r; _++) {
2188
- const T = (w = d.children) == null ? void 0 : w[_];
2189
- if (!T)
2190
+ const M = (E = d.children) == null ? void 0 : E[_];
2191
+ if (!M)
2190
2192
  return e.removeSummary(n), null;
2191
- const $ = Wn(T.id), { offsetLeft: R, offsetTop: U } = B(c, $), Ee = i === r ? 10 : 20;
2192
- _ === i && (v = U + Ee), _ === r && (f = U + $.offsetHeight - Ee), R < u && (u = R), $.offsetWidth + R > h && (h = $.offsetWidth + R);
2193
+ const $ = Wn(M.id), { offsetLeft: R, offsetTop: U } = B(c, $), Ee = i === r ? 10 : 20;
2194
+ _ === i && (g = U + Ee), _ === r && (v = U + $.offsetHeight - Ee), R < f && (f = R), $.offsetWidth + R > h && (h = $.offsetWidth + R);
2193
2195
  }
2194
- let p, m;
2195
- const g = v + 10, y = f + 10, x = (g + y) / 2, E = e.theme.cssVar["--color"];
2196
- l === M.LHS ? (p = Oe(`M ${u + 10} ${g} c -5 0 -10 5 -10 10 L ${u} ${y - 10} c 0 5 5 10 10 10 M ${u} ${x} h -10`, E), m = He(o, u - 20, x + 6, "end", E)) : (p = Oe(`M ${h - 10} ${g} c 5 0 10 5 10 10 L ${h} ${y - 10} c 0 5 -5 10 -10 10 M ${h} ${x} h 10`, E), m = He(o, h + 20, x + 6, "start", E));
2196
+ let u, p;
2197
+ const m = g + 10, y = v + 10, x = (m + y) / 2, w = e.theme.cssVar["--color"];
2198
+ l === T.LHS ? (u = Oe(`M ${f + 10} ${m} c -5 0 -10 5 -10 10 L ${f} ${y - 10} c 0 5 5 10 10 10 M ${f} ${x} h -10`, w), p = He(o, f - 20, x + 6, "end", w)) : (u = Oe(`M ${h - 10} ${m} c 5 0 10 5 10 10 L ${h} ${y - 10} c 0 5 -5 10 -10 10 M ${h} ${x} h 10`, w), p = He(o, h + 20, x + 6, "start", w));
2197
2199
  const b = Yn("s-" + n);
2198
- return b.appendChild(p), b.appendChild(m), b.summaryObj = t, e.summarySvg.appendChild(b), b;
2200
+ return b.appendChild(u), b.appendChild(p), b.summaryObj = t, e.summarySvg.appendChild(b), b;
2199
2201
  }, Un = function() {
2200
2202
  if (!this.currentNodes)
2201
2203
  return;
@@ -2314,7 +2316,7 @@ function co(e, t) {
2314
2316
  "stroke-width": n.borderWidth
2315
2317
  }), i;
2316
2318
  }
2317
- function ne(e, t, n = !1) {
2319
+ function te(e, t, n = !1) {
2318
2320
  const o = getComputedStyle(t), { offsetLeft: s, offsetTop: i } = B(e.nodes, t), r = document.createElementNS(L, "rect");
2319
2321
  N(r, {
2320
2322
  x: s + "",
@@ -2354,37 +2356,37 @@ function ao(e, t) {
2354
2356
  href: t.src
2355
2357
  }), i;
2356
2358
  }
2357
- const oe = 100, ho = '<?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">', uo = (e, t = !1) => {
2358
- var u, h, v;
2359
- const n = e.nodes, o = n.offsetHeight + oe * 2, s = n.offsetWidth + oe * 2, i = oo(o + "px", s + "px"), r = document.createElementNS(L, "svg"), c = document.createElementNS(L, "rect");
2359
+ const ne = 100, ho = '<?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">', uo = (e, t = !1) => {
2360
+ var f, h, g;
2361
+ const n = e.nodes, o = n.offsetHeight + ne * 2, s = n.offsetWidth + ne * 2, i = oo(o + "px", s + "px"), r = document.createElementNS(L, "svg"), c = document.createElementNS(L, "rect");
2360
2362
  N(c, {
2361
2363
  x: "0",
2362
2364
  y: "0",
2363
2365
  width: `${s}`,
2364
2366
  height: `${o}`,
2365
2367
  fill: e.theme.cssVar["--bgcolor"]
2366
- }), i.appendChild(c), n.querySelectorAll(".subLines").forEach((f) => {
2367
- const p = f.cloneNode(!0), { offsetLeft: m, offsetTop: g } = B(n, f.parentElement);
2368
- p.setAttribute("x", `${m}`), p.setAttribute("y", `${g}`), r.appendChild(p);
2368
+ }), i.appendChild(c), n.querySelectorAll(".subLines").forEach((v) => {
2369
+ const u = v.cloneNode(!0), { offsetLeft: p, offsetTop: m } = B(n, v.parentElement);
2370
+ u.setAttribute("x", `${p}`), u.setAttribute("y", `${m}`), r.appendChild(u);
2369
2371
  });
2370
- const a = (u = n.querySelector(".lines")) == null ? void 0 : u.cloneNode(!0);
2372
+ const a = (f = n.querySelector(".lines")) == null ? void 0 : f.cloneNode(!0);
2371
2373
  a && r.appendChild(a);
2372
2374
  const d = (h = n.querySelector(".topiclinks")) == null ? void 0 : h.cloneNode(!0);
2373
2375
  d && r.appendChild(d);
2374
- const l = (v = n.querySelector(".summary")) == null ? void 0 : v.cloneNode(!0);
2375
- return l && r.appendChild(l), n.querySelectorAll("me-tpc").forEach((f) => {
2376
- f.nodeObj.dangerouslySetInnerHTML ? r.appendChild(ne(e, f, !t)) : (r.appendChild(co(e, f)), r.appendChild(ne(e, f.text, !t)));
2377
- }), n.querySelectorAll(".tags > span").forEach((f) => {
2378
- r.appendChild(ne(e, f));
2379
- }), n.querySelectorAll(".icons > span").forEach((f) => {
2380
- r.appendChild(ne(e, f));
2381
- }), n.querySelectorAll(".hyper-link").forEach((f) => {
2382
- r.appendChild(lo(e, f));
2383
- }), n.querySelectorAll("img").forEach((f) => {
2384
- r.appendChild(ao(e, f));
2376
+ const l = (g = n.querySelector(".summary")) == null ? void 0 : g.cloneNode(!0);
2377
+ return l && r.appendChild(l), n.querySelectorAll("me-tpc").forEach((v) => {
2378
+ v.nodeObj.dangerouslySetInnerHTML ? r.appendChild(te(e, v, !t)) : (r.appendChild(co(e, v)), r.appendChild(te(e, v.text, !t)));
2379
+ }), n.querySelectorAll(".tags > span").forEach((v) => {
2380
+ r.appendChild(te(e, v));
2381
+ }), n.querySelectorAll(".icons > span").forEach((v) => {
2382
+ r.appendChild(te(e, v));
2383
+ }), n.querySelectorAll(".hyper-link").forEach((v) => {
2384
+ r.appendChild(lo(e, v));
2385
+ }), n.querySelectorAll("img").forEach((v) => {
2386
+ r.appendChild(ao(e, v));
2385
2387
  }), N(r, {
2386
- x: oe + "",
2387
- y: oe + "",
2388
+ x: ne + "",
2389
+ y: ne + "",
2388
2390
  overflow: "visible"
2389
2391
  }), i.appendChild(r), i;
2390
2392
  }, fo = (e, t) => (t && e.insertAdjacentHTML("afterbegin", "<style>" + t + "</style>"), ho + e.outerHTML);
@@ -2427,15 +2429,15 @@ for (let e = 0; e < Pe.length; e++) {
2427
2429
  tt[t] = yo(Qe[t], t);
2428
2430
  }
2429
2431
  const bo = {
2430
- getObjById: ie,
2432
+ getObjById: se,
2431
2433
  generateNewObj: st,
2432
- layout: ct,
2433
- linkDiv: gt,
2434
- editTopic: pt,
2435
- createWrapper: dt,
2436
- createParent: ht,
2437
- createChildren: ut,
2438
- createTopic: ft,
2434
+ layout: ft,
2435
+ linkDiv: Et,
2436
+ editTopic: xt,
2437
+ createWrapper: gt,
2438
+ createParent: vt,
2439
+ createChildren: yt,
2440
+ createTopic: bt,
2439
2441
  findEle: S,
2440
2442
  changeTheme: Ft,
2441
2443
  ...jn,
@@ -2446,7 +2448,7 @@ const bo = {
2446
2448
  init(e) {
2447
2449
  if (e = JSON.parse(JSON.stringify(e)), !e || !e.nodeData)
2448
2450
  return new Error("MindElixir: `data` is required");
2449
- e.direction !== void 0 && (this.direction = e.direction), this.changeTheme(e.theme || this.theme, !1), this.nodeData = e.nodeData, P(this.nodeData), this.arrows = e.arrows || [], this.summaries = e.summaries || [], this.tidyArrow(), this.toolBar && $t(this), this.keypress && Ct(this, this.keypress), this.editable && zt(this), this.contextMenu && this.disposable.push(vt(this, this.contextMenu)), this.draggable && this.disposable.push(Mt(this)), this.allowUndo && this.disposable.push(kt(this)), this.toCenter(), this.layout(), this.linkDiv();
2451
+ e.direction !== void 0 && (this.direction = e.direction), this.changeTheme(e.theme || this.theme, !1), this.nodeData = e.nodeData, P(this.nodeData), this.arrows = e.arrows || [], this.summaries = e.summaries || [], this.tidyArrow(), this.toolBar && $t(this), this.keypress && dt(this, this.keypress), this.editable && zt(this), this.contextMenu && this.disposable.push(Ct(this, this.contextMenu)), this.draggable && this.disposable.push(Mt(this)), this.allowUndo && this.disposable.push(kt(this)), this.toCenter(), this.layout(), this.linkDiv();
2450
2452
  },
2451
2453
  destroy() {
2452
2454
  var e;
@@ -2455,22 +2457,22 @@ const bo = {
2455
2457
  };
2456
2458
  function xo({ pT: e, pL: t, pW: n, pH: o, cT: s, cL: i, cW: r, cH: c, direction: a, containerHeight: d }) {
2457
2459
  let l = t + n / 2;
2458
- const u = e + o / 2;
2460
+ const f = e + o / 2;
2459
2461
  let h;
2460
- a === M.LHS ? h = i + r : h = i;
2461
- const v = s + c / 2, p = (1 - Math.abs(v - u) / d) * 0.25 * (n / 2);
2462
- return a === M.LHS ? l = l - n / 10 - p : l = l + n / 10 + p, `M ${l} ${u} Q ${l} ${v} ${h} ${v}`;
2462
+ a === T.LHS ? h = i + r : h = i;
2463
+ const g = s + c / 2, u = (1 - Math.abs(g - f) / d) * 0.25 * (n / 2);
2464
+ return a === T.LHS ? l = l - n / 10 - u : l = l + n / 10 + u, `M ${l} ${f} Q ${l} ${g} ${h} ${g}`;
2463
2465
  }
2464
2466
  function wo({ pT: e, pL: t, pW: n, pH: o, cT: s, cL: i, cW: r, cH: c, direction: a, isFirst: d }) {
2465
2467
  const l = parseInt(this.container.style.getPropertyValue("--gap"));
2466
- let u = 0, h = 0;
2467
- d ? u = e + o / 2 : u = e + o;
2468
- const v = s + c;
2469
- let f = 0, p = 0, m = 0;
2470
- const g = Math.abs(u - v) / 300 * l;
2471
- return a === M.LHS ? (m = t, f = m + l, p = m - l, h = i + l, `M ${f} ${u} C ${m} ${u} ${m + g} ${v} ${p} ${v} H ${h}`) : (m = t + n, f = m - l, p = m + l, h = i + r - l, `M ${f} ${u} C ${m} ${u} ${m - g} ${v} ${p} ${v} H ${h}`);
2468
+ let f = 0, h = 0;
2469
+ d ? f = e + o / 2 : f = e + o;
2470
+ const g = s + c;
2471
+ let v = 0, u = 0, p = 0;
2472
+ const m = Math.abs(f - g) / 300 * l;
2473
+ return a === T.LHS ? (p = t, v = p + l, u = p - l, h = i + l, `M ${v} ${f} C ${p} ${f} ${p + m} ${g} ${u} ${g} H ${h}`) : (p = t + n, v = p - l, u = p + l, h = i + r - l, `M ${v} ${f} C ${p} ${f} ${p - m} ${g} ${u} ${g} H ${h}`);
2472
2474
  }
2473
- const Eo = "5.0.0-beta.21";
2475
+ const Eo = "5.0.0-beta.23";
2474
2476
  function Co(e) {
2475
2477
  return {
2476
2478
  x: 0,
@@ -2505,25 +2507,25 @@ function j({
2505
2507
  mouseSelectionButton: a,
2506
2508
  selectionContainer: d,
2507
2509
  before: l,
2508
- newTopicName: u,
2510
+ newTopicName: f,
2509
2511
  allowUndo: h,
2510
- generateMainBranch: v,
2511
- generateSubBranch: f,
2512
- overflowHidden: p,
2513
- theme: m,
2514
- alignment: g
2512
+ generateMainBranch: g,
2513
+ generateSubBranch: v,
2514
+ overflowHidden: u,
2515
+ theme: p,
2516
+ alignment: m
2515
2517
  }) {
2516
2518
  let y = null;
2517
2519
  const x = Object.prototype.toString.call(e);
2518
2520
  if (x === "[object HTMLDivElement]" ? y = e : x === "[object String]" && (y = document.querySelector(e)), !y)
2519
2521
  throw new Error("MindElixir: el is not a valid element");
2520
- y.style.position = "relative", y.innerHTML = "", this.el = y, this.disposable = [], this.before = l || {}, this.locale = n || "en", this.contextMenu = i === void 0 ? !0 : i, this.toolBar = r === void 0 ? !0 : r, this.keypress = c === void 0 ? !0 : c, this.mouseSelectionButton = a || 0, this.direction = typeof t == "number" ? t : 1, this.draggable = o === void 0 ? !0 : o, this.newTopicName = u || "new node", this.editable = s === void 0 ? !0 : s, this.allowUndo = h === void 0 ? !1 : h, this.currentNodes = [], this.currentArrow = null, this.scaleVal = 1, this.tempDirection = null, this.generateMainBranch = v || xo, this.generateSubBranch = f || wo, this.overflowHidden = p || !1, this.dragMoveHelper = Co(this), this.bus = rt(), this.container = J.createElement("div"), this.selectionContainer = d || this.container, this.container.className = "map-container";
2521
- const E = window.matchMedia("(prefers-color-scheme: dark)");
2522
- this.theme = m || (E.matches ? Re : Be);
2522
+ y.style.position = "relative", y.innerHTML = "", this.el = y, this.disposable = [], this.before = l || {}, this.locale = n || "en", this.contextMenu = i === void 0 ? !0 : i, this.toolBar = r === void 0 ? !0 : r, this.keypress = c === void 0 ? !0 : c, this.mouseSelectionButton = a || 0, this.direction = typeof t == "number" ? t : 1, this.draggable = o === void 0 ? !0 : o, this.newTopicName = f || "new node", this.editable = s === void 0 ? !0 : s, this.allowUndo = h === void 0 ? !1 : h, this.currentNodes = [], this.currentArrow = null, this.scaleVal = 1, this.tempDirection = null, this.generateMainBranch = g || xo, this.generateSubBranch = v || wo, this.overflowHidden = u || !1, this.dragMoveHelper = Co(this), this.bus = ut(), this.container = J.createElement("div"), this.selectionContainer = d || this.container, this.container.className = "map-container";
2523
+ const w = window.matchMedia("(prefers-color-scheme: dark)");
2524
+ this.theme = p || (w.matches ? Re : Be);
2523
2525
  const b = J.createElement("div");
2524
2526
  b.className = "map-canvas", setTimeout(() => {
2525
2527
  b.style.transition = "all 0.3s";
2526
- }, 300), this.map = b, this.map.setAttribute("tabindex", "0"), this.container.appendChild(this.map), this.el.appendChild(this.container), this.nodes = J.createElement("me-nodes"), this.nodes.className = "main-node-container", this.lines = Z("lines"), this.summarySvg = Z("summary"), this.linkController = Z("linkcontroller"), this.P2 = J.createElement("div"), this.P3 = J.createElement("div"), this.P2.className = this.P3.className = "circle", this.P2.style.display = this.P3.style.display = "none", this.line1 = Ce(), this.line2 = Ce(), this.linkController.appendChild(this.line1), this.linkController.appendChild(this.line2), this.linkSvgGroup = Z("topiclinks"), this.alignment = g ?? "root", this.map.appendChild(this.nodes), this.overflowHidden ? this.container.style.overflow = "hidden" : this.disposable.push(it(this));
2528
+ }, 300), this.map = b, this.map.setAttribute("tabindex", "0"), this.container.appendChild(this.map), this.el.appendChild(this.container), this.nodes = J.createElement("me-nodes"), this.nodes.className = "main-node-container", this.lines = Z("lines"), this.summarySvg = Z("summary"), this.linkController = Z("linkcontroller"), this.P2 = J.createElement("div"), this.P3 = J.createElement("div"), this.P2.className = this.P3.className = "circle", this.P2.style.display = this.P3.style.display = "none", this.line1 = Se(), this.line2 = Se(), this.linkController.appendChild(this.line1), this.linkController.appendChild(this.line2), this.linkSvgGroup = Z("topiclinks"), this.alignment = m ?? "root", this.map.appendChild(this.nodes), this.overflowHidden ? this.container.style.overflow = "hidden" : this.disposable.push(ht(this));
2527
2529
  }
2528
2530
  j.prototype = bo;
2529
2531
  Object.defineProperty(j.prototype, "currentNode", {