mind-elixir 3.1.3 → 3.2.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/dist/MindElixir.iife.js +9 -8
- package/dist/MindElixir.js +1376 -1179
- package/dist/MindElixirLite.iife.js +7 -6
- package/dist/MindElixirLite.js +822 -638
- package/dist/example.iife.js +1 -1
- package/dist/example.js +17 -2
- package/dist/types/customLink.d.ts +8 -3
- package/dist/types/index.d.ts +7 -2
- package/dist/types/methods.d.ts +7 -2
- package/dist/types/plugin/exportImage.d.ts +3 -0
- package/dist/types/types/dom.d.ts +2 -2
- package/dist/types/utils/index.d.ts +0 -9
- package/dist/types/utils/svg.d.ts +3 -1
- package/package.json +1 -2
- package/readme.md +49 -3
package/dist/MindElixirLite.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".mind-elixir{--gap: 30px;--root-radius: 30px;--main-radius: 20px;--root-color: #ffffff;--root-bgcolor: #4c4f69;--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;position:relative;-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}.mind-elixir .hyper-link{text-decoration:none}.map-container{-webkit-user-select:none;user-select:none;height:100%;width:100%;overflow:scroll;font-size:15px}.map-container::-webkit-scrollbar{width:0px;height:0px}.map-container .selected{box-shadow:0 0 0 2px var(--selected)}.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;transition:transform .3s;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);white-space:pre-wrap;background-color:var(--root-bgcolor)}.map-container .map-canvas me-root me-tpc #input-box{padding:10px var(--gap)}.map-container me-main>me-wrapper{position:relative;margin:20px 65px}.map-container me-main>me-wrapper>me-parent{margin:var(--gap);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 var(--gap)}.map-container me-main>me-wrapper>me-parent>me-tpc #input-box{padding:8px var(--gap)}.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:800px;white-space:pre-wrap;padding:var(--topic-padding);line-height:1.2}.map-container me-parent me-tpc>div,.map-container me-parent me-tpc>span,.map-container me-parent me-tpc>img{pointer-events:none}.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}.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}.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{pointer-events:none}.map-container .topiclinks text,.map-container .linkcontroller text,.map-container .summary text{pointer-events:all}.map-container .topiclinks .selected,.map-container .linkcontroller .selected,.map-container .summary .selected{pointer-events:none}.map-container .lines,.map-container .subLines{pointer-events:none;z-index:-1}.map-container .topiclinks *,.map-container .linkcontroller *{z-index:100}.map-container .topiclinks g{cursor:pointer}.map-container #input-box{position:absolute;top:0;left:0;padding:var(--topic-padding);color:var(--color);background-color:var(--bgcolor);width:max-content;max-width:800px;z-index:11;direction:ltr;-webkit-user-select:auto;user-select:auto;pointer-events:all}.map-container me-tpc>img{pointer-events:none;display:block;margin-top:8px}.map-container .circle{position:absolute;height:10px;width:10px;margin-top:-5px;margin-left:-5px;border-radius:100%;background:#aaa;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 3px 0 0;font-size:12px;line-height:16px}.map-container .icons{display:inline-block;direction:ltr;margin-right:10px}.map-container .mind-elixir-ghost{position:fixed;top:-100%;left:-100%;box-sizing:content-box;opacity:.5;background-color:#f6f6f6;max-width:200px;width:fit-content;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:8px 16px;border-radius:6px;border:#666666 2px solid}.selection-area{background:#4f90f22d;border:1px solid #4f90f2}.mind-elixir .context-menu{position:fixed;top:0;left:0;width:100%;height:100%;z-index:99}.mind-elixir .context-menu .menu-list{position:fixed;list-style:none;margin:0;padding:0;font:300 15px Roboto,sans-serif;color:var(--panel-color);box-shadow:0 12px 15px #0003}.mind-elixir .context-menu .menu-list li{min-width:200px;overflow:hidden;white-space:nowrap;padding:10px 14px;background:var(--panel-bgcolor);border-bottom:1px solid var(--panel-border-color)}.mind-elixir .context-menu .menu-list li a{color:#333;text-decoration:none}.mind-elixir .context-menu .menu-list li.disabled{display:none;color:#5e5e5e;background-color:#f7f7f7}.mind-elixir .context-menu .menu-list li.disabled:hover{cursor:default;background-color:#f7f7f7}.mind-elixir .context-menu .menu-list li:hover{cursor:pointer;filter:brightness(.9)}.mind-elixir .context-menu .menu-list li:first-child{border-radius:5px 5px 0 0}.mind-elixir .context-menu .menu-list li:last-child{border-bottom:0;border-radius:0 0 5px 5px}.mind-elixir .context-menu .menu-list li span:last-child{float:right}.mind-elixir .mobile-menu{position:absolute;left:20px;bottom:70px;z-index:99;margin:0;padding:0;color:#333;border-radius:5px;box-shadow:0 12px 15px #0003;overflow:hidden}.mind-elixir .mobile-menu *{transition:color .4s,background-color .4s}.mind-elixir .mobile-menu div{float:left;text-align:center;width:30px;overflow:hidden;white-space:nowrap;padding:8px;background-color:#fff;border-bottom:1px solid #ecf0f1}.mind-elixir .mobile-menu div a{color:#333;text-decoration:none}.mind-elixir .mobile-menu div.disabled{color:#5e5e5e;background-color:#f7f7f7}.mind-elixir .mobile-menu div.disabled:hover{cursor:default;background-color:#f7f7f7}.mind-elixir .mobile-menu div:hover{cursor:pointer;background-color:#ecf0f1}.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(i){console.error("vite-plugin-css-injected-by-js",i)}})();
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".mind-elixir{--gap: 30px;--root-radius: 30px;--main-radius: 20px;--root-color: #ffffff;--root-bgcolor: #4c4f69;--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;position:relative;-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}.mind-elixir .hyper-link{text-decoration:none}.map-container{-webkit-user-select:none;user-select:none;height:100%;width:100%;overflow:scroll;font-size:15px}.map-container::-webkit-scrollbar{width:0px;height:0px}.map-container .selected{box-shadow:0 0 0 2px var(--selected)}.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;transition:transform .3s;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;line-height:1.2em;color:var(--root-color);padding:10px var(--gap);border-radius:var(--root-radius);white-space:pre-wrap;background-color:var(--root-bgcolor)}.map-container .map-canvas me-root me-tpc #input-box{padding:10px var(--gap)}.map-container me-main>me-wrapper{position:relative;margin:20px 65px}.map-container me-main>me-wrapper>me-parent{margin:var(--gap);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 var(--gap)}.map-container me-main>me-wrapper>me-parent>me-tpc #input-box{padding:8px var(--gap)}.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);line-height:1.2em}.map-container me-parent me-tpc>div,.map-container me-parent me-tpc>span,.map-container me-parent me-tpc>img{pointer-events:none}.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}.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}.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{pointer-events:none}.map-container .topiclinks text,.map-container .linkcontroller text,.map-container .summary text{pointer-events:all}.map-container .topiclinks .selected,.map-container .linkcontroller .selected,.map-container .summary .selected{pointer-events:none}.map-container .lines,.map-container .subLines{pointer-events:none;z-index:-1}.map-container .topiclinks *,.map-container .linkcontroller *{z-index:100}.map-container .topiclinks g{cursor:pointer}.map-container #input-box{position:absolute;top:0;left:0;padding:var(--topic-padding);color:var(--color);background-color:var(--bgcolor);width:max-content;max-width:35em;z-index:11;direction:ltr;-webkit-user-select:auto;user-select:auto;pointer-events:all}.map-container me-tpc>img{pointer-events:none;display:block;margin-top:8px}.map-container .circle{position:absolute;height:10px;width:10px;margin-top:-5px;margin-left:-5px;border-radius:100%;background:#aaa;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 3px 0 0;font-size:12px;line-height:1.3em}.map-container .icons{display:inline-block;direction:ltr;margin-right:10px}.map-container .icons span{display:inline-block}.map-container .mind-elixir-ghost{position:fixed;top:-100%;left:-100%;box-sizing:content-box;opacity:.5;background-color:#f6f6f6;max-width:200px;width:fit-content;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:8px 16px;border-radius:6px;border:#666666 2px solid}.selection-area{background:#4f90f22d;border:1px solid #4f90f2}.mind-elixir .context-menu{position:fixed;top:0;left:0;width:100%;height:100%;z-index:99}.mind-elixir .context-menu .menu-list{position:fixed;list-style:none;margin:0;padding:0;font:300 15px Roboto,sans-serif;color:var(--panel-color);box-shadow:0 12px 15px #0003}.mind-elixir .context-menu .menu-list li{min-width:200px;overflow:hidden;white-space:nowrap;padding:10px 14px;background:var(--panel-bgcolor);border-bottom:1px solid var(--panel-border-color)}.mind-elixir .context-menu .menu-list li a{color:#333;text-decoration:none}.mind-elixir .context-menu .menu-list li.disabled{display:none;color:#5e5e5e;background-color:#f7f7f7}.mind-elixir .context-menu .menu-list li.disabled:hover{cursor:default;background-color:#f7f7f7}.mind-elixir .context-menu .menu-list li:hover{cursor:pointer;filter:brightness(.9)}.mind-elixir .context-menu .menu-list li:first-child{border-radius:5px 5px 0 0}.mind-elixir .context-menu .menu-list li:last-child{border-bottom:0;border-radius:0 0 5px 5px}.mind-elixir .context-menu .menu-list li span:last-child{float:right}.mind-elixir .tips{position:absolute;bottom:20px;left:50%;transform:translate(-50%);color:var(--panel-color);font-weight:bolder}.mind-elixir .mobile-menu{position:absolute;left:20px;bottom:70px;z-index:99;margin:0;padding:0;color:#333;border-radius:5px;box-shadow:0 12px 15px #0003;overflow:hidden}.mind-elixir .mobile-menu *{transition:color .4s,background-color .4s}.mind-elixir .mobile-menu div{float:left;text-align:center;width:30px;overflow:hidden;white-space:nowrap;padding:8px;background-color:#fff;border-bottom:1px solid #ecf0f1}.mind-elixir .mobile-menu div a{color:#333;text-decoration:none}.mind-elixir .mobile-menu div.disabled{color:#5e5e5e;background-color:#f7f7f7}.mind-elixir .mobile-menu div.disabled:hover{cursor:default;background-color:#f7f7f7}.mind-elixir .mobile-menu div:hover{cursor:pointer;background-color:#ecf0f1}.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(i){console.error("vite-plugin-css-injected-by-js",i)}})();
|
|
2
2
|
(function(e) {
|
|
3
|
-
var t, n, i, s, o, l, r = '<svg><symbol id="icon-edit" viewBox="0 0 1024 1024"><path d="M423.765333 128a42.666667 42.666667 0 0 1 3.2 85.205333L423.765333 213.333333H234.666667a64 64 0 0 0-63.872 60.245334L170.666667 277.333333v512a64 64 0 0 0 60.245333 63.872L234.666667 853.333333h512a64 64 0 0 0 63.872-60.245333L810.666667 789.333333v-189.098666a42.666667 42.666667 0 0 1 85.205333-3.2l0.128 3.2V789.333333a149.333333 149.333333 0 0 1-144.213333 149.248L746.666667 938.666667h-512a149.333333 149.333333 0 0 1-149.248-144.213334L85.333333 789.333333v-512a149.333333 149.333333 0 0 1 144.213334-149.248L234.666667 128h189.098666z m324.949334-53.248a42.666667 42.666667 0 0 1 60.330666 0l150.869334 150.869333a42.666667 42.666667 0 0 1 0 60.330667l-329.386667 329.386667a42.666667 42.666667 0 0 1-29.44 12.458666l-153.386667 2.517334a42.666667 42.666667 0 0 1-43.349333-43.349334l2.56-153.386666a42.666667 42.666667 0 0 1 12.458667-29.44z m30.165333 90.496L491.946667 452.266667l-1.493334 91.989333 92.032-1.493333 286.976-286.976-90.538666-90.538667z" ></path></symbol><symbol id="icon-rising" viewBox="0 0 1024 1024"><path d="M553.173333 803.84h-64l0.021334-474.581333-224.021334 224-45.269333-45.226667L521.6 206.293333l301.717333 301.696-45.269333 45.269334-224.853333-224.896v475.477333z" ></path></symbol><symbol id="icon-falling" viewBox="0 0 1024 1024"><path d="M553.173333 238.314667h-64l0.021334 474.602666-224.021334-224-45.269333 45.226667L521.6 835.861333l301.717333-301.717333-45.269333-45.226667-224.853333 224.853334V238.336z" ></path></symbol><symbol id="icon-shanchu2" viewBox="0 0 1024 1024"><path d="M516.60601807 107.93026734c-82.64382935 0-149.71865844 65.51751709-152.5729065 147.77160644H171.37136841c-21.40603638 0-38.92044068 17.38504028-38.92044068 38.92126465 0 21.40686036 17.38504028 38.92208862 38.92126466 38.92208862h42.94308471v435.40136719c0 81.73498536 55.39828492 148.55026245 123.90106201 148.55026245h348.99444581c68.37341309 0 123.90106201-66.42553711 123.901062-148.55026245V333.80477906h38.92126465c21.40686036 0 38.92126464-17.38586426 38.92126465-38.92208863 0-21.40686036-17.38504028-38.92126464-38.92126465-38.92126465H668.91854859C666.45321656 173.44860839 599.24902344 107.93109131 516.60601807 107.93109131z m-79.65939331 147.77160644c2.85424805-42.16442872 37.2354126-74.85809326 79.78875732-74.85809326s76.93450927 32.82302857 79.39984131 74.85809326H436.94662476z m-98.86047364 589.01165771c-24.2611084 0-50.98754883-31.13717651-50.98754883-75.76693725V333.80477906h450.97036744V769.33551026c0 44.50039673-26.72644043 75.76776123-50.98754884 75.76776122H338.08615112v-0.38973999z m0 0" ></path><path d="M390.37063599 751.17263794c17.77313232 0 32.43411255-17.7739563 32.43411255-40.08883667V482.35504151c0-22.31488037-14.53079224-40.08966065-32.43411255-40.08966065-17.77478027 0-32.43493653 17.77478027-32.43493653 40.08966065v228.72875976c0 22.18469239 14.27124023 40.08883667 32.43493653 40.08883667z m117.41308594 0c17.7739563 0 32.43411255-17.7739563 32.43411255-40.08883667V482.35504151c0-22.31488037-14.53079224-40.08966065-32.43411255-40.08966065-17.7739563 0-32.43493653 17.77478027-32.43493653 40.08966065v228.72875976c0 22.18469239 14.66098023 40.08883667 32.43493653 40.08883667z m123.51049804 0c17.7739563 0 32.43493653-17.7739563 32.43493652-40.08883667V482.35504151c0-22.31488037-14.53079224-40.08966065-32.43493652-40.08966065-17.7739563 0-32.43411255 17.77478027-32.43411255 40.08966065v228.72875976c0 22.18469239 14.14105224 40.08883667 32.43411255 40.08883667z m0 0" ></path></symbol><symbol id="icon-zijiedian" viewBox="0 0 1024 1024"><path d="M312.208 472c19.568-157.856 153.432-280 315.656-280 175.68 0 318.112 143.272 318.112 320S803.552 832 627.864 832c-162.224 0-296.08-122.144-315.656-280H120a40 40 0 0 1 0-80h192.208zM632 752c132.552 0 240-107.448 240-240 0-132.552-107.448-240-240-240-132.552 0-240 107.448-240 240 0 132.552 107.448 240 240 240z m-40-280v-80a40 40 0 0 1 80 0v80h80a40 40 0 0 1 0 80h-80v80a40 40 0 0 1-80 0v-80h-80a40 40 0 0 1 0-80h80z" ></path></symbol><symbol id="icon-tongjijiedian-" viewBox="0 0 1024 1024"><path d="M803.84 131.626667H410.24A59.733333 59.733333 0 0 0 350.506667 192v45.226667H199.68a51.626667 51.626667 0 0 0-51.626667 51.626666v465.92a51.626667 51.626667 0 0 0 51.626667 51.626667h187.52v-55.466667h-162.133333a21.333333 21.333333 0 0 1-21.333334-21.333333V313.386667a21.333333 21.333333 0 0 1 21.333334-21.333334h125.653333v64a59.733333 59.733333 0 0 0 59.733333 59.733334h393.386667a59.733333 59.733333 0 0 0 59.733333-59.733334V192a59.733333 59.733333 0 0 0-59.733333-60.373333z m4.266667 224.64a4.266667 4.266667 0 0 1-4.266667 4.266666H410.24a4.266667 4.266667 0 0 1-4.266667-4.266666V192a4.266667 4.266667 0 0 1 4.266667-4.266667h393.6a4.266667 4.266667 0 0 1 4.266667 4.266667zM716.16 749.44h-81.28v-81.493333a27.733333 27.733333 0 0 0-55.466667 0v81.28h-81.493333a27.733333 27.733333 0 1 0 0 55.466666h81.28v81.28a27.733333 27.733333 0 1 0 55.466667 0v-81.066666h81.28a27.733333 27.733333 0 0 0 0-55.466667z" ></path></symbol><symbol id="icon-close" viewBox="0 0 1024 1024"><path d="M557.312 513.248l265.28-263.904c12.544-12.48 12.608-32.704 0.128-45.248-12.512-12.576-32.704-12.608-45.248-0.128L512.128 467.904l-263.04-263.84c-12.448-12.48-32.704-12.544-45.248-0.064-12.512 12.48-12.544 32.736-0.064 45.28l262.976 263.776L201.6 776.8c-12.544 12.48-12.608 32.704-0.128 45.248a31.937 31.937 0 0 0 22.688 9.44c8.16 0 16.32-3.104 22.56-9.312l265.216-263.808 265.44 266.24c6.24 6.272 14.432 9.408 22.656 9.408a31.94 31.94 0 0 0 22.592-9.344c12.512-12.48 12.544-32.704 0.064-45.248L557.312 513.248z" fill="" ></path></symbol><symbol id="icon-menu" viewBox="0 0 1024 1024"><path d="M109.714 292.571h804.572c21.943 0 36.571-21.942 36.571-43.885 0-14.629-14.628-29.257-36.571-29.257H109.714c-21.943 0-36.571 14.628-36.571 36.571 0 14.629 14.628 36.571 36.571 36.571zM914.286 512H109.714c-21.943 0-36.571 14.629-36.571 36.571 0 14.629 14.628 36.572 36.571 36.572h804.572c21.943 0 36.571-21.943 36.571-43.886 0-14.628-14.628-29.257-36.571-29.257z m0 292.571H109.714c-21.943 0-36.571 14.629-36.571 36.572s14.628 36.571 36.571 36.571h804.572c21.943 0 36.571-21.943 36.571-36.571 0-21.943-14.628-36.572-36.571-36.572z" ></path></symbol><symbol id="icon-right" viewBox="0 0 1024 1024"><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="" ></path></symbol><symbol id="icon-left" viewBox="0 0 1024 1024"><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="" ></path></symbol><symbol id="icon-side" viewBox="0 0 1024 1024"><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" ></path></symbol><symbol id="icon-B" viewBox="0 0 1024 1024"><path d="M98.067692 65.457231H481.28c75.854769 0 132.411077 3.150769 169.668923 9.452307 37.336615 6.301538 70.656 19.534769 100.036923 39.620924 29.459692 20.007385 53.956923 46.710154 73.570462 80.029538 19.692308 33.398154 29.459692 70.734769 29.459692 112.167385 0 44.898462-12.130462 86.094769-36.233846 123.588923a224.886154 224.886154 0 0 1-98.461539 84.283077c58.368 17.092923 103.266462 46.08 134.695385 87.04 31.350154 40.96 47.025231 89.088 47.025231 144.462769 0 43.638154-10.082462 86.016-30.404923 127.212308-20.243692 41.196308-47.891692 74.043077-83.02277 98.697846-35.052308 24.654769-78.296615 39.778462-129.732923 45.449846-32.295385 3.465846-110.119385 5.671385-233.472 6.537846H98.067692V65.457231z m193.536 159.507692V446.621538h126.818462c75.460923 0 122.328615-1.024 140.603077-3.229538 33.083077-3.938462 59.155692-15.36 78.139077-34.343385 18.904615-18.904615 28.435692-43.874462 28.435692-74.830769 0-29.696-8.192-53.720615-24.497231-72.310154-16.384-18.510769-40.644923-29.696-72.940307-33.634461-19.140923-2.205538-74.279385-3.308308-165.415385-3.308308h-111.064615z m0 381.243077v256.315077h179.2c69.710769 0 113.979077-1.969231 132.726154-5.907692 28.750769-5.198769 52.145231-17.959385 70.262154-38.281847 18.116923-20.243692 27.096615-47.340308 27.096615-81.368615 0-28.750769-6.931692-53.169231-20.873846-73.255385a118.232615 118.232615 0 0 0-60.494769-43.795692c-26.387692-9.137231-83.574154-13.705846-171.638154-13.705846H291.603692z" ></path></symbol><symbol id="icon-a" viewBox="0 0 1024 1024"><path d="M757.76 665.6q0 20.48 1.536 34.304t7.68 22.016 18.944 12.288 34.304 4.096q-3.072 25.6-15.36 44.032-11.264 16.384-33.28 29.696t-62.976 13.312q-11.264 0-20.48-0.512t-17.408-2.56l-6.144-2.048-1.024 0q-4.096-1.024-10.24-4.096-2.048-2.048-4.096-2.048-1.024-1.024-2.048-1.024-14.336-8.192-23.552-17.408t-14.336-17.408q-6.144-10.24-9.216-20.48-63.488 75.776-178.176 75.776-48.128 0-88.064-15.36t-69.12-44.032-45.056-68.096-15.872-88.576 16.896-89.088 47.616-67.584 74.24-42.496 96.768-14.848q48.128 0 88.576 17.408t66.048 49.152q0-8.192 0.512-16.384t0.512-15.36q0-71.68-39.936-104.448t-128-32.768q-43.008 0-84.992 6.656t-84.992 17.92q14.336-28.672 25.088-47.616t24.064-29.184q30.72-24.576 158.72-24.576 79.872 0 135.168 13.824t90.624 43.52 51.2 75.264 15.872 108.032l0 200.704zM487.424 743.424q50.176 0 79.872-33.28t29.696-95.744q0-61.44-28.672-93.696t-76.8-32.256q-52.224 0-82.944 33.28t-30.72 94.72q0 58.368 31.744 92.672t77.824 34.304z" ></path></symbol><symbol id="icon-full" viewBox="0 0 1024 1024"><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" ></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" ></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" ></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" ></path></symbol><symbol id="icon-add" viewBox="0 0 1024 1024"><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" ></path></symbol><symbol id="icon-move" viewBox="0 0 1024 1024"><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" ></path></symbol><symbol id="icon-living" viewBox="0 0 1024 1024"><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="" ></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="" ></path></symbol></svg>', d = (d = document.getElementsByTagName("script"))[d.length - 1].getAttribute("data-injectcss");
|
|
4
|
-
if (
|
|
3
|
+
var t, n, s, i, o, r, l = '<svg><symbol id="icon-edit" viewBox="0 0 1024 1024"><path d="M423.765333 128a42.666667 42.666667 0 0 1 3.2 85.205333L423.765333 213.333333H234.666667a64 64 0 0 0-63.872 60.245334L170.666667 277.333333v512a64 64 0 0 0 60.245333 63.872L234.666667 853.333333h512a64 64 0 0 0 63.872-60.245333L810.666667 789.333333v-189.098666a42.666667 42.666667 0 0 1 85.205333-3.2l0.128 3.2V789.333333a149.333333 149.333333 0 0 1-144.213333 149.248L746.666667 938.666667h-512a149.333333 149.333333 0 0 1-149.248-144.213334L85.333333 789.333333v-512a149.333333 149.333333 0 0 1 144.213334-149.248L234.666667 128h189.098666z m324.949334-53.248a42.666667 42.666667 0 0 1 60.330666 0l150.869334 150.869333a42.666667 42.666667 0 0 1 0 60.330667l-329.386667 329.386667a42.666667 42.666667 0 0 1-29.44 12.458666l-153.386667 2.517334a42.666667 42.666667 0 0 1-43.349333-43.349334l2.56-153.386666a42.666667 42.666667 0 0 1 12.458667-29.44z m30.165333 90.496L491.946667 452.266667l-1.493334 91.989333 92.032-1.493333 286.976-286.976-90.538666-90.538667z" ></path></symbol><symbol id="icon-rising" viewBox="0 0 1024 1024"><path d="M553.173333 803.84h-64l0.021334-474.581333-224.021334 224-45.269333-45.226667L521.6 206.293333l301.717333 301.696-45.269333 45.269334-224.853333-224.896v475.477333z" ></path></symbol><symbol id="icon-falling" viewBox="0 0 1024 1024"><path d="M553.173333 238.314667h-64l0.021334 474.602666-224.021334-224-45.269333 45.226667L521.6 835.861333l301.717333-301.717333-45.269333-45.226667-224.853333 224.853334V238.336z" ></path></symbol><symbol id="icon-shanchu2" viewBox="0 0 1024 1024"><path d="M516.60601807 107.93026734c-82.64382935 0-149.71865844 65.51751709-152.5729065 147.77160644H171.37136841c-21.40603638 0-38.92044068 17.38504028-38.92044068 38.92126465 0 21.40686036 17.38504028 38.92208862 38.92126466 38.92208862h42.94308471v435.40136719c0 81.73498536 55.39828492 148.55026245 123.90106201 148.55026245h348.99444581c68.37341309 0 123.90106201-66.42553711 123.901062-148.55026245V333.80477906h38.92126465c21.40686036 0 38.92126464-17.38586426 38.92126465-38.92208863 0-21.40686036-17.38504028-38.92126464-38.92126465-38.92126465H668.91854859C666.45321656 173.44860839 599.24902344 107.93109131 516.60601807 107.93109131z m-79.65939331 147.77160644c2.85424805-42.16442872 37.2354126-74.85809326 79.78875732-74.85809326s76.93450927 32.82302857 79.39984131 74.85809326H436.94662476z m-98.86047364 589.01165771c-24.2611084 0-50.98754883-31.13717651-50.98754883-75.76693725V333.80477906h450.97036744V769.33551026c0 44.50039673-26.72644043 75.76776123-50.98754884 75.76776122H338.08615112v-0.38973999z m0 0" ></path><path d="M390.37063599 751.17263794c17.77313232 0 32.43411255-17.7739563 32.43411255-40.08883667V482.35504151c0-22.31488037-14.53079224-40.08966065-32.43411255-40.08966065-17.77478027 0-32.43493653 17.77478027-32.43493653 40.08966065v228.72875976c0 22.18469239 14.27124023 40.08883667 32.43493653 40.08883667z m117.41308594 0c17.7739563 0 32.43411255-17.7739563 32.43411255-40.08883667V482.35504151c0-22.31488037-14.53079224-40.08966065-32.43411255-40.08966065-17.7739563 0-32.43493653 17.77478027-32.43493653 40.08966065v228.72875976c0 22.18469239 14.66098023 40.08883667 32.43493653 40.08883667z m123.51049804 0c17.7739563 0 32.43493653-17.7739563 32.43493652-40.08883667V482.35504151c0-22.31488037-14.53079224-40.08966065-32.43493652-40.08966065-17.7739563 0-32.43411255 17.77478027-32.43411255 40.08966065v228.72875976c0 22.18469239 14.14105224 40.08883667 32.43411255 40.08883667z m0 0" ></path></symbol><symbol id="icon-zijiedian" viewBox="0 0 1024 1024"><path d="M312.208 472c19.568-157.856 153.432-280 315.656-280 175.68 0 318.112 143.272 318.112 320S803.552 832 627.864 832c-162.224 0-296.08-122.144-315.656-280H120a40 40 0 0 1 0-80h192.208zM632 752c132.552 0 240-107.448 240-240 0-132.552-107.448-240-240-240-132.552 0-240 107.448-240 240 0 132.552 107.448 240 240 240z m-40-280v-80a40 40 0 0 1 80 0v80h80a40 40 0 0 1 0 80h-80v80a40 40 0 0 1-80 0v-80h-80a40 40 0 0 1 0-80h80z" ></path></symbol><symbol id="icon-tongjijiedian-" viewBox="0 0 1024 1024"><path d="M803.84 131.626667H410.24A59.733333 59.733333 0 0 0 350.506667 192v45.226667H199.68a51.626667 51.626667 0 0 0-51.626667 51.626666v465.92a51.626667 51.626667 0 0 0 51.626667 51.626667h187.52v-55.466667h-162.133333a21.333333 21.333333 0 0 1-21.333334-21.333333V313.386667a21.333333 21.333333 0 0 1 21.333334-21.333334h125.653333v64a59.733333 59.733333 0 0 0 59.733333 59.733334h393.386667a59.733333 59.733333 0 0 0 59.733333-59.733334V192a59.733333 59.733333 0 0 0-59.733333-60.373333z m4.266667 224.64a4.266667 4.266667 0 0 1-4.266667 4.266666H410.24a4.266667 4.266667 0 0 1-4.266667-4.266666V192a4.266667 4.266667 0 0 1 4.266667-4.266667h393.6a4.266667 4.266667 0 0 1 4.266667 4.266667zM716.16 749.44h-81.28v-81.493333a27.733333 27.733333 0 0 0-55.466667 0v81.28h-81.493333a27.733333 27.733333 0 1 0 0 55.466666h81.28v81.28a27.733333 27.733333 0 1 0 55.466667 0v-81.066666h81.28a27.733333 27.733333 0 0 0 0-55.466667z" ></path></symbol><symbol id="icon-close" viewBox="0 0 1024 1024"><path d="M557.312 513.248l265.28-263.904c12.544-12.48 12.608-32.704 0.128-45.248-12.512-12.576-32.704-12.608-45.248-0.128L512.128 467.904l-263.04-263.84c-12.448-12.48-32.704-12.544-45.248-0.064-12.512 12.48-12.544 32.736-0.064 45.28l262.976 263.776L201.6 776.8c-12.544 12.48-12.608 32.704-0.128 45.248a31.937 31.937 0 0 0 22.688 9.44c8.16 0 16.32-3.104 22.56-9.312l265.216-263.808 265.44 266.24c6.24 6.272 14.432 9.408 22.656 9.408a31.94 31.94 0 0 0 22.592-9.344c12.512-12.48 12.544-32.704 0.064-45.248L557.312 513.248z" fill="" ></path></symbol><symbol id="icon-menu" viewBox="0 0 1024 1024"><path d="M109.714 292.571h804.572c21.943 0 36.571-21.942 36.571-43.885 0-14.629-14.628-29.257-36.571-29.257H109.714c-21.943 0-36.571 14.628-36.571 36.571 0 14.629 14.628 36.571 36.571 36.571zM914.286 512H109.714c-21.943 0-36.571 14.629-36.571 36.571 0 14.629 14.628 36.572 36.571 36.572h804.572c21.943 0 36.571-21.943 36.571-43.886 0-14.628-14.628-29.257-36.571-29.257z m0 292.571H109.714c-21.943 0-36.571 14.629-36.571 36.572s14.628 36.571 36.571 36.571h804.572c21.943 0 36.571-21.943 36.571-36.571 0-21.943-14.628-36.572-36.571-36.572z" ></path></symbol><symbol id="icon-right" viewBox="0 0 1024 1024"><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="" ></path></symbol><symbol id="icon-left" viewBox="0 0 1024 1024"><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="" ></path></symbol><symbol id="icon-side" viewBox="0 0 1024 1024"><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" ></path></symbol><symbol id="icon-B" viewBox="0 0 1024 1024"><path d="M98.067692 65.457231H481.28c75.854769 0 132.411077 3.150769 169.668923 9.452307 37.336615 6.301538 70.656 19.534769 100.036923 39.620924 29.459692 20.007385 53.956923 46.710154 73.570462 80.029538 19.692308 33.398154 29.459692 70.734769 29.459692 112.167385 0 44.898462-12.130462 86.094769-36.233846 123.588923a224.886154 224.886154 0 0 1-98.461539 84.283077c58.368 17.092923 103.266462 46.08 134.695385 87.04 31.350154 40.96 47.025231 89.088 47.025231 144.462769 0 43.638154-10.082462 86.016-30.404923 127.212308-20.243692 41.196308-47.891692 74.043077-83.02277 98.697846-35.052308 24.654769-78.296615 39.778462-129.732923 45.449846-32.295385 3.465846-110.119385 5.671385-233.472 6.537846H98.067692V65.457231z m193.536 159.507692V446.621538h126.818462c75.460923 0 122.328615-1.024 140.603077-3.229538 33.083077-3.938462 59.155692-15.36 78.139077-34.343385 18.904615-18.904615 28.435692-43.874462 28.435692-74.830769 0-29.696-8.192-53.720615-24.497231-72.310154-16.384-18.510769-40.644923-29.696-72.940307-33.634461-19.140923-2.205538-74.279385-3.308308-165.415385-3.308308h-111.064615z m0 381.243077v256.315077h179.2c69.710769 0 113.979077-1.969231 132.726154-5.907692 28.750769-5.198769 52.145231-17.959385 70.262154-38.281847 18.116923-20.243692 27.096615-47.340308 27.096615-81.368615 0-28.750769-6.931692-53.169231-20.873846-73.255385a118.232615 118.232615 0 0 0-60.494769-43.795692c-26.387692-9.137231-83.574154-13.705846-171.638154-13.705846H291.603692z" ></path></symbol><symbol id="icon-a" viewBox="0 0 1024 1024"><path d="M757.76 665.6q0 20.48 1.536 34.304t7.68 22.016 18.944 12.288 34.304 4.096q-3.072 25.6-15.36 44.032-11.264 16.384-33.28 29.696t-62.976 13.312q-11.264 0-20.48-0.512t-17.408-2.56l-6.144-2.048-1.024 0q-4.096-1.024-10.24-4.096-2.048-2.048-4.096-2.048-1.024-1.024-2.048-1.024-14.336-8.192-23.552-17.408t-14.336-17.408q-6.144-10.24-9.216-20.48-63.488 75.776-178.176 75.776-48.128 0-88.064-15.36t-69.12-44.032-45.056-68.096-15.872-88.576 16.896-89.088 47.616-67.584 74.24-42.496 96.768-14.848q48.128 0 88.576 17.408t66.048 49.152q0-8.192 0.512-16.384t0.512-15.36q0-71.68-39.936-104.448t-128-32.768q-43.008 0-84.992 6.656t-84.992 17.92q14.336-28.672 25.088-47.616t24.064-29.184q30.72-24.576 158.72-24.576 79.872 0 135.168 13.824t90.624 43.52 51.2 75.264 15.872 108.032l0 200.704zM487.424 743.424q50.176 0 79.872-33.28t29.696-95.744q0-61.44-28.672-93.696t-76.8-32.256q-52.224 0-82.944 33.28t-30.72 94.72q0 58.368 31.744 92.672t77.824 34.304z" ></path></symbol><symbol id="icon-full" viewBox="0 0 1024 1024"><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" ></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" ></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" ></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" ></path></symbol><symbol id="icon-add" viewBox="0 0 1024 1024"><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" ></path></symbol><symbol id="icon-move" viewBox="0 0 1024 1024"><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" ></path></symbol><symbol id="icon-living" viewBox="0 0 1024 1024"><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="" ></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="" ></path></symbol></svg>', c = (c = document.getElementsByTagName("script"))[c.length - 1].getAttribute("data-injectcss");
|
|
4
|
+
if (c && !e.__iconfont__svg__cssinject__) {
|
|
5
5
|
e.__iconfont__svg__cssinject__ = !0;
|
|
6
6
|
try {
|
|
7
7
|
document.write(
|
|
@@ -11,26 +11,26 @@
|
|
|
11
11
|
console && console.log(h);
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
-
function
|
|
15
|
-
o || (o = !0,
|
|
14
|
+
function u() {
|
|
15
|
+
o || (o = !0, s());
|
|
16
16
|
}
|
|
17
17
|
t = function() {
|
|
18
|
-
var h,
|
|
19
|
-
(
|
|
18
|
+
var h, d, a, f;
|
|
19
|
+
(f = document.createElement("div")).innerHTML = l, l = null, (a = f.getElementsByTagName("svg")[0]) && (a.setAttribute("aria-hidden", "true"), a.style.position = "absolute", a.style.width = 0, a.style.height = 0, a.style.overflow = "hidden", h = a, (d = document.body).firstChild ? (f = h, (a = d.firstChild).parentNode.insertBefore(f, a)) : d.appendChild(h));
|
|
20
20
|
}, document.addEventListener ? ~["complete", "loaded", "interactive"].indexOf(document.readyState) ? setTimeout(t, 0) : (n = function() {
|
|
21
21
|
document.removeEventListener("DOMContentLoaded", n, !1), t();
|
|
22
|
-
}, document.addEventListener("DOMContentLoaded", n, !1)) : document.attachEvent && (
|
|
22
|
+
}, document.addEventListener("DOMContentLoaded", n, !1)) : document.attachEvent && (s = t, i = e.document, o = !1, (r = function() {
|
|
23
23
|
try {
|
|
24
|
-
|
|
24
|
+
i.documentElement.doScroll("left");
|
|
25
25
|
} catch {
|
|
26
|
-
return void setTimeout(
|
|
26
|
+
return void setTimeout(r, 50);
|
|
27
27
|
}
|
|
28
|
-
|
|
29
|
-
})(),
|
|
30
|
-
|
|
28
|
+
u();
|
|
29
|
+
})(), i.onreadystatechange = function() {
|
|
30
|
+
i.readyState == "complete" && (i.onreadystatechange = null, u());
|
|
31
31
|
});
|
|
32
32
|
})(window);
|
|
33
|
-
const
|
|
33
|
+
const q = 0, Z = 1, J = 2, S = 30, L = 8, mt = {
|
|
34
34
|
name: "Latte",
|
|
35
35
|
palette: ["#dd7878", "#ea76cb", "#8839ef", "#e64553", "#fe640b", "#df8e1d", "#40a02b", "#209fb5", "#1e66f5", "#7287fd"],
|
|
36
36
|
cssVar: {
|
|
@@ -42,7 +42,7 @@ const j = 0, G = 1, I = 2, $ = 30, M = 8, ut = {
|
|
|
42
42
|
"--panel-bgcolor": "#ffffff",
|
|
43
43
|
"--panel-border-color": "#eaeaea"
|
|
44
44
|
}
|
|
45
|
-
},
|
|
45
|
+
}, gt = {
|
|
46
46
|
name: "Dark",
|
|
47
47
|
palette: ["#848FA0", "#748BE9", "#D2F9FE", "#4145A5", "#789AFA", "#706CF4", "#EF987F", "#775DD5", "#FCEECF", "#DA7FBC"],
|
|
48
48
|
cssVar: {
|
|
@@ -55,72 +55,56 @@ const j = 0, G = 1, I = 2, $ = 30, M = 8, ut = {
|
|
|
55
55
|
"--panel-border-color": "#696969"
|
|
56
56
|
}
|
|
57
57
|
};
|
|
58
|
-
function
|
|
58
|
+
function it(e) {
|
|
59
59
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/"/g, """);
|
|
60
60
|
}
|
|
61
|
-
const
|
|
61
|
+
const vt = function(e, t) {
|
|
62
62
|
if (t.id === e)
|
|
63
63
|
return t;
|
|
64
64
|
if (t.children && t.children.length) {
|
|
65
65
|
for (let n = 0; n < t.children.length; n++) {
|
|
66
|
-
const
|
|
67
|
-
if (
|
|
68
|
-
return
|
|
66
|
+
const s = vt(e, t.children[n]);
|
|
67
|
+
if (s)
|
|
68
|
+
return s;
|
|
69
69
|
}
|
|
70
70
|
return null;
|
|
71
71
|
} else
|
|
72
72
|
return null;
|
|
73
|
-
},
|
|
73
|
+
}, tt = (e, t) => {
|
|
74
74
|
if (e.parent = t, e.children)
|
|
75
75
|
for (let n = 0; n < e.children.length; n++)
|
|
76
|
-
|
|
76
|
+
tt(e.children[n], e);
|
|
77
77
|
};
|
|
78
|
-
function
|
|
79
|
-
const
|
|
80
|
-
let
|
|
81
|
-
o < 0 &&
|
|
82
|
-
const
|
|
78
|
+
function yt(e, t, n, s) {
|
|
79
|
+
const i = s - t, o = e - n;
|
|
80
|
+
let r = Math.atan(Math.abs(i) / Math.abs(o)) / 3.14 * 180;
|
|
81
|
+
o < 0 && i > 0 && (r = 180 - r), o < 0 && i < 0 && (r = 180 + r), o > 0 && i < 0 && (r = 360 - r);
|
|
82
|
+
const l = 15, c = 30, u = r + c, h = r - c;
|
|
83
83
|
return {
|
|
84
|
-
x1: n + Math.cos(Math.PI *
|
|
85
|
-
y1:
|
|
86
|
-
x2: n + Math.cos(Math.PI * h / 180) *
|
|
87
|
-
y2:
|
|
84
|
+
x1: n + Math.cos(Math.PI * u / 180) * l,
|
|
85
|
+
y1: s - Math.sin(Math.PI * u / 180) * l,
|
|
86
|
+
x2: n + Math.cos(Math.PI * h / 180) * l,
|
|
87
|
+
y2: s - Math.sin(Math.PI * h / 180) * l
|
|
88
88
|
};
|
|
89
89
|
}
|
|
90
|
-
function
|
|
91
|
-
let i, s;
|
|
92
|
-
const o = (e.cy - n) / (t - e.cx);
|
|
93
|
-
return o > e.h / e.w || o < -e.h / e.w ? e.cy - n < 0 ? (i = e.cx - e.h / 2 / o, s = e.cy + e.h / 2) : (i = e.cx + e.h / 2 / o, s = e.cy - e.h / 2) : e.cx - t < 0 ? (i = e.cx + e.w / 2, s = e.cy - e.w * o / 2) : (i = e.cx - e.w / 2, s = e.cy + e.w * o / 2), {
|
|
94
|
-
x: i,
|
|
95
|
-
y: s
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
function J(e, t, n) {
|
|
99
|
-
let i, s;
|
|
100
|
-
const o = (e.cy - n) / (t - e.cx);
|
|
101
|
-
return o > e.h / e.w || o < -e.h / e.w ? e.cy - n < 0 ? (i = e.cx - e.h / 2 / o, s = e.cy + e.h / 2) : (i = e.cx + e.h / 2 / o, s = e.cy - e.h / 2) : e.cx - t < 0 ? (i = e.cx + e.w / 2, s = e.cy - e.w * o / 2) : (i = e.cx - e.w / 2, s = e.cy + e.w * o / 2), {
|
|
102
|
-
x: i,
|
|
103
|
-
y: s
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
|
-
function Q() {
|
|
90
|
+
function et() {
|
|
107
91
|
return ((/* @__PURE__ */ new Date()).getTime().toString(16) + Math.random().toString(16).substr(2)).substr(2, 16);
|
|
108
92
|
}
|
|
109
|
-
const
|
|
110
|
-
const e =
|
|
93
|
+
const Tt = function() {
|
|
94
|
+
const e = et();
|
|
111
95
|
return {
|
|
112
96
|
topic: this.newTopicName,
|
|
113
97
|
id: e
|
|
114
98
|
};
|
|
115
|
-
},
|
|
116
|
-
let n = 0,
|
|
99
|
+
}, V = (e, t) => {
|
|
100
|
+
let n = 0, s = 0;
|
|
117
101
|
for (; t && t !== e; )
|
|
118
|
-
n += t.offsetLeft,
|
|
119
|
-
return { offsetLeft: n, offsetTop:
|
|
120
|
-
},
|
|
102
|
+
n += t.offsetLeft, s += t.offsetTop, t = t.offsetParent;
|
|
103
|
+
return { offsetLeft: n, offsetTop: s };
|
|
104
|
+
}, b = (e, t) => {
|
|
121
105
|
for (const n in t)
|
|
122
106
|
e.setAttribute(n, t[n]);
|
|
123
|
-
},
|
|
107
|
+
}, N = {
|
|
124
108
|
moved: !1,
|
|
125
109
|
// diffrentiate click and move
|
|
126
110
|
mousedown: !1,
|
|
@@ -132,19 +116,18 @@ const Mt = function() {
|
|
|
132
116
|
this.lastX = e.pageX, this.lastY = e.pageY;
|
|
133
117
|
return;
|
|
134
118
|
}
|
|
135
|
-
const n = this.lastX - e.pageX,
|
|
136
|
-
t.scrollTo(t.scrollLeft + n, t.scrollTop +
|
|
119
|
+
const n = this.lastX - e.pageX, s = this.lastY - e.pageY;
|
|
120
|
+
t.scrollTo(t.scrollLeft + n, t.scrollTop + s), this.lastX = e.pageX, this.lastY = e.pageY;
|
|
137
121
|
}
|
|
138
122
|
},
|
|
139
123
|
clear() {
|
|
140
124
|
this.moved = !1, this.mousedown = !1, this.lastX = 0, this.lastY = 0;
|
|
141
125
|
}
|
|
142
|
-
},
|
|
143
|
-
function
|
|
126
|
+
}, ot = (e) => e.tagName === "ME-TPC";
|
|
127
|
+
function Nt(e) {
|
|
144
128
|
e.map.addEventListener("click", (t) => {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
P.clear();
|
|
129
|
+
if (N.moved) {
|
|
130
|
+
N.clear();
|
|
148
131
|
return;
|
|
149
132
|
}
|
|
150
133
|
e.unselectNode(), e.unselectNodes(), e.unselectSummary();
|
|
@@ -152,25 +135,25 @@ function $t(e) {
|
|
|
152
135
|
if (n.tagName === "ME-EPD")
|
|
153
136
|
e.expandNode(n.previousSibling);
|
|
154
137
|
else if (e.editable)
|
|
155
|
-
|
|
138
|
+
ot(n) ? e.selectNode(n, !1, t) : n.tagName === "text" ? n.dataset.type === "custom-link" ? e.selectLink(n.parentElement) : e.selectSummary(n.parentElement) : n.className === "circle" || e.hideLinkController && e.hideLinkController();
|
|
156
139
|
else
|
|
157
140
|
return;
|
|
158
141
|
}), e.map.addEventListener("dblclick", (t) => {
|
|
159
142
|
if (t.preventDefault(), !e.editable)
|
|
160
143
|
return;
|
|
161
144
|
const n = t.target;
|
|
162
|
-
|
|
145
|
+
ot(n) ? e.beginEdit(n) : n.tagName === "text" && (n.dataset.type === "custom-link" ? e.editCutsomLinkLabel(n.parentElement) : e.editSummary(n.parentElement));
|
|
163
146
|
}), e.map.addEventListener("mousemove", (t) => {
|
|
164
|
-
t.target.contentEditable !== "true" &&
|
|
147
|
+
t.target.contentEditable !== "true" && N.onMove(t, e.container);
|
|
165
148
|
}), e.map.addEventListener("mousedown", (t) => {
|
|
166
|
-
t.button === 2 && t.target.contentEditable !== "true" && (
|
|
149
|
+
t.button === 2 && t.target.contentEditable !== "true" && (N.moved = !1, N.mousedown = !0);
|
|
167
150
|
}), e.map.addEventListener("mouseleave", (t) => {
|
|
168
|
-
console.log(t.button), t.button === 2 &&
|
|
151
|
+
console.log(t.button), t.button === 2 && N.clear();
|
|
169
152
|
}), e.map.addEventListener("mouseup", (t) => {
|
|
170
|
-
t.button === 2 &&
|
|
153
|
+
t.button === 2 && N.clear();
|
|
171
154
|
});
|
|
172
155
|
}
|
|
173
|
-
const
|
|
156
|
+
const At = {
|
|
174
157
|
create() {
|
|
175
158
|
return {
|
|
176
159
|
handlers: {},
|
|
@@ -183,8 +166,8 @@ const kt = {
|
|
|
183
166
|
fire: function(e, ...t) {
|
|
184
167
|
if (this.handlers[e] instanceof Array) {
|
|
185
168
|
const n = this.handlers[e];
|
|
186
|
-
for (let
|
|
187
|
-
n[
|
|
169
|
+
for (let s = 0; s < n.length; s++)
|
|
170
|
+
n[s](...t);
|
|
188
171
|
}
|
|
189
172
|
},
|
|
190
173
|
removeListener: function(e, t) {
|
|
@@ -194,87 +177,87 @@ const kt = {
|
|
|
194
177
|
if (!t)
|
|
195
178
|
n.length = 0;
|
|
196
179
|
else if (n.length)
|
|
197
|
-
for (let
|
|
198
|
-
n[
|
|
180
|
+
for (let s = 0; s < n.length; s++)
|
|
181
|
+
n[s] === t && this.handlers[e].splice(s, 1);
|
|
199
182
|
}
|
|
200
183
|
};
|
|
201
184
|
}
|
|
202
|
-
},
|
|
185
|
+
}, K = document, Dt = function() {
|
|
203
186
|
console.time("layout"), this.nodes.innerHTML = "";
|
|
204
187
|
const e = this.createTopic(this.nodeData);
|
|
205
|
-
|
|
206
|
-
const t =
|
|
188
|
+
bt(e, this.nodeData), e.draggable = !1;
|
|
189
|
+
const t = K.createElement("me-root");
|
|
207
190
|
t.appendChild(e);
|
|
208
191
|
const n = this.nodeData.children || [];
|
|
209
|
-
if (this.direction ===
|
|
210
|
-
let
|
|
192
|
+
if (this.direction === J) {
|
|
193
|
+
let s = 0, i = 0;
|
|
211
194
|
n.map((o) => {
|
|
212
|
-
o.direction ===
|
|
195
|
+
o.direction === q ? s += 1 : o.direction === Z ? i += 1 : s <= i ? (o.direction = q, s += 1) : (o.direction = Z, i += 1);
|
|
213
196
|
});
|
|
214
197
|
}
|
|
215
|
-
|
|
216
|
-
},
|
|
217
|
-
const
|
|
218
|
-
|
|
219
|
-
const
|
|
220
|
-
|
|
198
|
+
Ht(this, n, t), console.timeEnd("layout");
|
|
199
|
+
}, Ht = function(e, t, n) {
|
|
200
|
+
const s = K.createElement("me-main");
|
|
201
|
+
s.className = "lhs";
|
|
202
|
+
const i = K.createElement("me-main");
|
|
203
|
+
i.className = "rhs";
|
|
221
204
|
for (let o = 0; o < t.length; o++) {
|
|
222
|
-
const
|
|
223
|
-
e.direction ===
|
|
205
|
+
const r = t[o], { grp: l } = e.createWrapper(r);
|
|
206
|
+
e.direction === J ? r.direction === q ? s.appendChild(l) : i.appendChild(l) : e.direction === q ? s.appendChild(l) : i.appendChild(l);
|
|
224
207
|
}
|
|
225
|
-
e.nodes.appendChild(
|
|
226
|
-
},
|
|
227
|
-
const n =
|
|
228
|
-
for (let
|
|
229
|
-
const
|
|
208
|
+
e.nodes.appendChild(s), e.nodes.appendChild(n), e.nodes.appendChild(i), e.nodes.appendChild(e.lines);
|
|
209
|
+
}, Pt = function(e, t) {
|
|
210
|
+
const n = K.createElement("me-children");
|
|
211
|
+
for (let s = 0; s < t.length; s++) {
|
|
212
|
+
const i = t[s], { grp: o } = e.createWrapper(i);
|
|
230
213
|
n.appendChild(o);
|
|
231
214
|
}
|
|
232
215
|
return n;
|
|
233
|
-
},
|
|
216
|
+
}, E = document, C = (e, t) => (t ? t.mindElixirBox : E).querySelector(`[data-nodeid=me${e}]`), bt = function(e, t) {
|
|
234
217
|
if (e.textContent = t.topic, t.style && (e.style.color = t.style.color || "", e.style.background = t.style.background || "", e.style.fontSize = t.style.fontSize + "px", e.style.fontWeight = t.style.fontWeight || "normal"), t.image) {
|
|
235
218
|
const n = t.image;
|
|
236
219
|
if (n.url && n.width && n.height) {
|
|
237
|
-
const
|
|
238
|
-
|
|
220
|
+
const s = E.createElement("img");
|
|
221
|
+
s.src = n.url, s.style.width = n.width + "px", s.style.height = n.height + "px", e.appendChild(s), e.image = s;
|
|
239
222
|
} else
|
|
240
223
|
console.warn("image url/width/height are required");
|
|
241
224
|
}
|
|
242
225
|
if (t.hyperLink) {
|
|
243
|
-
const n =
|
|
244
|
-
n.className = "hyper-link", n.target = "_blank", n.innerText = "🔗", n.href = t.hyperLink, e.appendChild(n), e.linkContainer = n
|
|
226
|
+
const n = E.createElement("a");
|
|
227
|
+
n.className = "hyper-link", n.target = "_blank", n.innerText = "🔗", n.href = t.hyperLink, e.appendChild(n), e.linkContainer = n;
|
|
245
228
|
} else
|
|
246
229
|
e.linkContainer && (e.linkContainer.remove(), e.linkContainer = null);
|
|
247
230
|
if (t.icons && t.icons.length) {
|
|
248
|
-
const n =
|
|
249
|
-
n.className = "icons", n.innerHTML = t.icons.map((
|
|
231
|
+
const n = E.createElement("span");
|
|
232
|
+
n.className = "icons", n.innerHTML = t.icons.map((s) => `<span>${it(s)}</span>`).join(""), e.appendChild(n), e.icons = n;
|
|
250
233
|
}
|
|
251
234
|
if (t.tags && t.tags.length) {
|
|
252
|
-
const n =
|
|
253
|
-
n.className = "tags", n.innerHTML = t.tags.map((
|
|
235
|
+
const n = E.createElement("div");
|
|
236
|
+
n.className = "tags", n.innerHTML = t.tags.map((s) => `<span>${it(s)}</span>`).join(""), e.appendChild(n), e.tags = n;
|
|
254
237
|
}
|
|
255
238
|
t.branchColor && (e.style.borderColor = t.branchColor);
|
|
256
|
-
},
|
|
257
|
-
const n =
|
|
258
|
-
if (n.appendChild(
|
|
259
|
-
const o =
|
|
260
|
-
if (
|
|
261
|
-
const
|
|
262
|
-
n.appendChild(
|
|
239
|
+
}, zt = function(e, t) {
|
|
240
|
+
const n = E.createElement("me-wrapper"), { p: s, tpc: i } = this.createParent(e);
|
|
241
|
+
if (n.appendChild(s), !t && e.children && e.children.length > 0) {
|
|
242
|
+
const o = Rt(e.expanded);
|
|
243
|
+
if (s.appendChild(o), e.expanded !== !1) {
|
|
244
|
+
const r = Pt(this, e.children);
|
|
245
|
+
n.appendChild(r);
|
|
263
246
|
}
|
|
264
247
|
}
|
|
265
|
-
return { grp: n, top:
|
|
266
|
-
}, Pt = function(e) {
|
|
267
|
-
const t = C.createElement("me-parent"), n = this.createTopic(e);
|
|
268
|
-
return vt(n, e), t.appendChild(n), { p: t, tpc: n };
|
|
248
|
+
return { grp: n, top: s, tpc: i };
|
|
269
249
|
}, Bt = function(e) {
|
|
270
|
-
const t =
|
|
250
|
+
const t = E.createElement("me-parent"), n = this.createTopic(e);
|
|
251
|
+
return bt(n, e), t.appendChild(n), { p: t, tpc: n };
|
|
252
|
+
}, Ot = function(e) {
|
|
253
|
+
const t = E.createElement("me-children");
|
|
271
254
|
return t.append(...e), t;
|
|
272
|
-
},
|
|
273
|
-
const t =
|
|
255
|
+
}, qt = function(e) {
|
|
256
|
+
const t = E.createElement("me-tpc");
|
|
274
257
|
return t.nodeObj = e, t.dataset.nodeid = "me" + e.id, t.draggable = this.draggable, t;
|
|
275
258
|
};
|
|
276
|
-
function
|
|
277
|
-
const t =
|
|
259
|
+
function xt(e) {
|
|
260
|
+
const t = E.createRange();
|
|
278
261
|
t.selectNodeContents(e);
|
|
279
262
|
const n = window.getSelection();
|
|
280
263
|
n && (n.removeAllRanges(), n.addRange(t));
|
|
@@ -282,205 +265,233 @@ function bt(e) {
|
|
|
282
265
|
const Vt = function(e) {
|
|
283
266
|
if (console.time("editTopic"), !e)
|
|
284
267
|
return;
|
|
285
|
-
const t =
|
|
286
|
-
e.appendChild(t), t.id = "input-box", t.textContent = n, t.contentEditable = "true", t.spellcheck = !1, t.style.cssText = `min-width:${e.offsetWidth - 8}px;`, this.direction ===
|
|
268
|
+
const t = E.createElement("div"), n = e.childNodes[0].textContent;
|
|
269
|
+
e.appendChild(t), t.id = "input-box", t.textContent = n, t.contentEditable = "true", t.spellcheck = !1, t.style.cssText = `min-width:${e.offsetWidth - 8}px;`, this.direction === q && (t.style.right = "0"), t.focus(), xt(t), this.bus.fire("operation", {
|
|
287
270
|
name: "beginEdit",
|
|
288
271
|
obj: e.nodeObj
|
|
289
|
-
}), t.addEventListener("keydown", (
|
|
290
|
-
|
|
291
|
-
const
|
|
292
|
-
if (
|
|
293
|
-
if (
|
|
272
|
+
}), t.addEventListener("keydown", (s) => {
|
|
273
|
+
s.stopPropagation();
|
|
274
|
+
const i = s.key;
|
|
275
|
+
if (i === "Enter" || i === "Tab") {
|
|
276
|
+
if (s.shiftKey)
|
|
294
277
|
return;
|
|
295
|
-
|
|
278
|
+
s.preventDefault(), t == null || t.blur(), this.map.focus();
|
|
296
279
|
}
|
|
297
280
|
}), t.addEventListener("blur", () => {
|
|
298
281
|
var o;
|
|
299
282
|
if (!t)
|
|
300
283
|
return;
|
|
301
|
-
const
|
|
302
|
-
console.log(
|
|
284
|
+
const s = e.nodeObj, i = ((o = t.textContent) == null ? void 0 : o.trim()) || "";
|
|
285
|
+
console.log(i), i === "" ? s.topic = n : s.topic = i, t.remove(), i !== n && (e.childNodes[0].textContent = s.topic, this.linkDiv(), this.bus.fire("operation", {
|
|
303
286
|
name: "finishEdit",
|
|
304
|
-
obj:
|
|
287
|
+
obj: s,
|
|
305
288
|
origin: n
|
|
306
289
|
}));
|
|
307
290
|
}), console.timeEnd("editTopic");
|
|
308
|
-
},
|
|
309
|
-
const t =
|
|
291
|
+
}, Rt = function(e) {
|
|
292
|
+
const t = E.createElement("me-epd");
|
|
310
293
|
return t.expanded = e !== !1, t.className = e !== !1 ? "minus" : "", t;
|
|
311
|
-
},
|
|
312
|
-
const n =
|
|
294
|
+
}, H = document, P = "http://www.w3.org/2000/svg", jt = function(e, t) {
|
|
295
|
+
const n = H.createElementNS(P, "path");
|
|
313
296
|
return n.setAttribute("d", e), n.setAttribute("stroke", t || "#666"), n.setAttribute("fill", "none"), n.setAttribute("stroke-width", "3"), n;
|
|
314
|
-
},
|
|
315
|
-
const t =
|
|
297
|
+
}, W = function(e) {
|
|
298
|
+
const t = H.createElementNS(P, "svg");
|
|
316
299
|
return t.setAttribute("class", e), t.setAttribute("overflow", "visible"), t;
|
|
317
|
-
},
|
|
318
|
-
const
|
|
319
|
-
return
|
|
320
|
-
},
|
|
321
|
-
const n =
|
|
300
|
+
}, rt = function() {
|
|
301
|
+
const e = H.createElementNS(P, "line");
|
|
302
|
+
return e.setAttribute("stroke", "#bbb"), e.setAttribute("fill", "none"), e.setAttribute("stroke-width", "2"), e;
|
|
303
|
+
}, Wt = function(e, t) {
|
|
304
|
+
const n = H.createElementNS(P, "path");
|
|
322
305
|
return n.setAttribute("d", e), n.setAttribute("stroke", t || "#555"), n.setAttribute("fill", "none"), n.setAttribute("stroke-linecap", "square"), n.setAttribute("stroke-width", "2"), n;
|
|
323
|
-
},
|
|
324
|
-
const n =
|
|
325
|
-
|
|
306
|
+
}, Xt = function(e, t) {
|
|
307
|
+
const n = {
|
|
308
|
+
stroke: "rgb(235, 95, 82)",
|
|
309
|
+
fill: "none",
|
|
310
|
+
"stroke-linecap": "cap",
|
|
311
|
+
"stroke-width": "2"
|
|
312
|
+
}, s = H.createElementNS(P, "g"), i = H.createElementNS(P, "path"), o = H.createElementNS(P, "path");
|
|
313
|
+
return b(o, {
|
|
314
|
+
d: t,
|
|
315
|
+
...n
|
|
316
|
+
}), b(i, {
|
|
317
|
+
d: e,
|
|
318
|
+
...n,
|
|
319
|
+
"stroke-dasharray": "8,2"
|
|
320
|
+
}), s.appendChild(i), s.appendChild(o), s;
|
|
321
|
+
}, wt = function(e, t, n) {
|
|
322
|
+
if (console.time("editSummary"), !t)
|
|
323
|
+
return;
|
|
324
|
+
const s = document.createElement("div");
|
|
325
|
+
e.nodes.appendChild(s);
|
|
326
|
+
const i = t.innerHTML;
|
|
327
|
+
s.id = "input-box", s.textContent = i, s.contentEditable = "true", s.spellcheck = !1;
|
|
328
|
+
const o = t.getAttribute("x") + "px", r = t.getAttribute("y") + "px";
|
|
329
|
+
s.style.cssText = `min-width:${100 - 8}px;position:absolute;left:${o};top:${r};`;
|
|
330
|
+
const l = t.getAttribute("text-anchor");
|
|
331
|
+
l === "end" ? s.style.cssText += "transform: translate(-100%, -100%);" : l === "middle" ? s.style.cssText += "transform: translate(-50%, -100%);" : s.style.cssText += "transform: translate(0, -100%);", s.focus(), xt(s), s.addEventListener("keydown", (c) => {
|
|
332
|
+
c.stopPropagation();
|
|
333
|
+
const u = c.key;
|
|
334
|
+
if (u === "Enter" || u === "Tab") {
|
|
335
|
+
if (c.shiftKey)
|
|
336
|
+
return;
|
|
337
|
+
c.preventDefault(), s.blur(), e.map.focus();
|
|
338
|
+
}
|
|
339
|
+
}), s.addEventListener("blur", () => {
|
|
340
|
+
s && n(s);
|
|
341
|
+
}), console.timeEnd("editSummary");
|
|
326
342
|
};
|
|
327
|
-
let
|
|
328
|
-
const
|
|
343
|
+
let _t = Ct;
|
|
344
|
+
const Yt = function(e) {
|
|
329
345
|
console.time("linkDiv");
|
|
330
346
|
const t = this.map.querySelector("me-root");
|
|
331
347
|
this.nodes.style.top = `${1e4 - this.nodes.offsetHeight / 2}px`, this.nodes.style.left = `${1e4 - t.offsetLeft - t.offsetWidth / 2}px`;
|
|
332
348
|
const n = this.map.querySelectorAll("me-main > me-wrapper");
|
|
333
|
-
this.lines.innerHTML = "",
|
|
334
|
-
for (let
|
|
335
|
-
const
|
|
336
|
-
let
|
|
337
|
-
const
|
|
349
|
+
this.lines.innerHTML = "", _t = this.subLinkStyle === 2 ? Gt : Ct;
|
|
350
|
+
for (let s = 0; s < n.length; s++) {
|
|
351
|
+
const i = n[s], o = i.querySelector("me-tpc"), r = i.firstChild, l = i.parentNode.className;
|
|
352
|
+
let c = t.offsetLeft + t.offsetWidth / 2;
|
|
353
|
+
const u = t.offsetTop + t.offsetHeight / 2;
|
|
338
354
|
let h;
|
|
339
|
-
const
|
|
340
|
-
|
|
341
|
-
const m = g +
|
|
355
|
+
const d = this.theme.palette, a = o.nodeObj.branchColor || d[s % d.length], { offsetLeft: f, offsetTop: g } = V(this.nodes, r);
|
|
356
|
+
l === "lhs" ? h = f + r.offsetWidth : h = f;
|
|
357
|
+
const m = g + r.offsetHeight / 2;
|
|
342
358
|
let p = "";
|
|
343
359
|
if (this.mainLinkStyle === 2)
|
|
344
|
-
this.direction ===
|
|
360
|
+
this.direction === J && (l === "lhs" ? c = c - t.offsetWidth / 6 : c = c + t.offsetWidth / 6), p = Ft({ x1: c, y1: u, x2: h, y2: m });
|
|
345
361
|
else {
|
|
346
|
-
const
|
|
347
|
-
|
|
362
|
+
const w = (1 - Math.abs(m - i.parentElement.offsetTop - i.parentElement.offsetHeight / 2) / i.parentElement.offsetHeight) * 0.25 * (t.offsetWidth / 2);
|
|
363
|
+
l === "lhs" ? c = c - t.offsetWidth / 10 - w : c = c + t.offsetWidth / 10 + w, p = It({ x1: c, y1: u, x2: h, y2: m });
|
|
348
364
|
}
|
|
349
|
-
this.lines.appendChild(
|
|
350
|
-
const v =
|
|
351
|
-
if (v && (v.style.top = (v.parentNode.offsetHeight - v.offsetHeight) / 2 + "px",
|
|
352
|
-
const
|
|
353
|
-
|
|
354
|
-
const _ =
|
|
355
|
-
|
|
365
|
+
this.lines.appendChild(jt(p, a));
|
|
366
|
+
const v = i.children[0].children[1];
|
|
367
|
+
if (v && (v.style.top = (v.parentNode.offsetHeight - v.offsetHeight) / 2 + "px", l === "lhs" ? v.style.left = "-10px" : v.style.right = "-10px"), !(e && e !== i) && i.childElementCount) {
|
|
368
|
+
const x = W("subLines"), w = i.lastChild;
|
|
369
|
+
w.tagName === "svg" && w.remove(), i.appendChild(x);
|
|
370
|
+
const _ = i.firstChild, M = i.children[1].children, X = Et(M, _, l, !0);
|
|
371
|
+
x.appendChild(Wt(X, a));
|
|
356
372
|
}
|
|
357
373
|
}
|
|
358
|
-
this.
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
const o = t.offsetTop, l = t.offsetLeft, r = t.offsetWidth, d = t.offsetHeight;
|
|
367
|
-
for (let f = 0; f < e.length; f++) {
|
|
368
|
-
const h = e[f], a = h.firstChild, c = a.offsetTop, u = a.offsetLeft, g = a.offsetWidth, m = a.offsetHeight;
|
|
369
|
-
s += yt({ pT: o, pL: l, pW: r, pH: d, cT: c, cL: u, cW: g, cH: m, direction: n, isFirst: i });
|
|
370
|
-
const p = a.children[1];
|
|
374
|
+
this.renderCustomLink(), this.renderSummary(), console.timeEnd("linkDiv");
|
|
375
|
+
}, Et = function(e, t, n, s) {
|
|
376
|
+
let i = "";
|
|
377
|
+
const o = t.offsetTop, r = t.offsetLeft, l = t.offsetWidth, c = t.offsetHeight;
|
|
378
|
+
for (let u = 0; u < e.length; u++) {
|
|
379
|
+
const h = e[u], d = h.firstChild, a = d.offsetTop, f = d.offsetLeft, g = d.offsetWidth, m = d.offsetHeight;
|
|
380
|
+
i += _t({ pT: o, pL: r, pW: l, pH: c, cT: a, cL: f, cW: g, cH: m, direction: n, isFirst: s });
|
|
381
|
+
const p = d.children[1];
|
|
371
382
|
if (p) {
|
|
372
383
|
if (p.style.bottom = -(p.offsetHeight / 2) + "px", n === "lhs" ? p.style.left = "10px" : n === "rhs" && (p.style.right = "10px"), !p.expanded)
|
|
373
384
|
continue;
|
|
374
385
|
} else
|
|
375
386
|
continue;
|
|
376
387
|
const v = h.children[1].children;
|
|
377
|
-
v.length > 0 && (
|
|
388
|
+
v.length > 0 && (i += Et(v, d, n));
|
|
378
389
|
}
|
|
379
|
-
return
|
|
390
|
+
return i;
|
|
380
391
|
};
|
|
381
|
-
function
|
|
382
|
-
return `M ${e} ${t} V ${
|
|
392
|
+
function Ft({ x1: e, y1: t, x2: n, y2: s }) {
|
|
393
|
+
return `M ${e} ${t} V ${s > t ? s - 20 : s + 20} C ${e} ${s} ${e} ${s} ${n > e ? e + 20 : e - 20} ${s} H ${n}`;
|
|
383
394
|
}
|
|
384
|
-
function
|
|
385
|
-
return `M ${e} ${t} Q ${e} ${
|
|
395
|
+
function It({ x1: e, y1: t, x2: n, y2: s }) {
|
|
396
|
+
return `M ${e} ${t} Q ${e} ${s} ${n} ${s}`;
|
|
386
397
|
}
|
|
387
|
-
function
|
|
398
|
+
function Gt({ pT: e, pL: t, pW: n, pH: s, cT: i, cL: o, cW: r, cH: l, direction: c, isFirst: u }) {
|
|
388
399
|
let h;
|
|
389
|
-
|
|
390
|
-
const
|
|
391
|
-
let
|
|
392
|
-
return
|
|
400
|
+
u ? h = e + s / 2 : h = e + s;
|
|
401
|
+
const d = i + l;
|
|
402
|
+
let a = 0, f = 0, g = 0;
|
|
403
|
+
return c === "lhs" ? (a = t + S, f = o, g = o + r) : c === "rhs" && (a = t + n - S, f = o + r, g = o), d < h + 50 && d > h - 50 ? `M ${a} ${h} H ${g} V ${d} H ${f}` : d >= h ? `M ${a} ${h} H ${g} V ${d - L} A ${L} ${L} 0 0 ${a > f ? 1 : 0} ${a > f ? g - L : g + L} ${d} H ${f}` : `M ${a} ${h} H ${g} V ${d + L} A ${L} ${L} 0 0 ${a > f ? 0 : 1} ${a > f ? g - L : g + L} ${d} H ${f}`;
|
|
393
404
|
}
|
|
394
|
-
function
|
|
395
|
-
let h = 0,
|
|
396
|
-
|
|
397
|
-
const
|
|
398
|
-
let
|
|
399
|
-
const p = Math.min(Math.abs(h -
|
|
400
|
-
return
|
|
405
|
+
function Ct({ pT: e, pL: t, pW: n, pH: s, cT: i, cL: o, cW: r, cH: l, direction: c, isFirst: u }) {
|
|
406
|
+
let h = 0, d = 0;
|
|
407
|
+
u ? h = e + s / 2 : h = e + s;
|
|
408
|
+
const a = i + l;
|
|
409
|
+
let f = 0, g = 0, m = 0;
|
|
410
|
+
const p = Math.min(Math.abs(h - a) / 800, 1.2) * S;
|
|
411
|
+
return c === "lhs" ? (m = t, f = m + S, g = m - S, d = o + S, `M ${f} ${h} C ${m} ${h} ${m + p} ${a} ${g} ${a} H ${d}`) : (m = t + n, f = m - S, g = m + S, d = o + r - S, `M ${f} ${h} C ${m} ${h} ${m - p} ${a} ${g} ${a} H ${d}`);
|
|
401
412
|
}
|
|
402
|
-
const
|
|
413
|
+
const D = (e, t) => {
|
|
403
414
|
const n = document.createElement("span");
|
|
404
415
|
return n.id = e, n.innerHTML = `<svg class="icon" aria-hidden="true">
|
|
405
416
|
<use xlink:href="#icon-${t}"></use>
|
|
406
417
|
</svg>`, n;
|
|
407
418
|
};
|
|
408
|
-
function
|
|
409
|
-
const t = document.createElement("div"), n =
|
|
410
|
-
return
|
|
419
|
+
function Kt(e) {
|
|
420
|
+
const t = document.createElement("div"), n = D("fullscreen", "full"), s = D("toCenter", "living"), i = D("zoomout", "move"), o = D("zoomin", "add"), r = document.createElement("span");
|
|
421
|
+
return r.innerText = "100%", t.appendChild(n), t.appendChild(s), t.appendChild(i), t.appendChild(o), t.className = "mind-elixir-toolbar rb", n.onclick = () => {
|
|
411
422
|
e.container.requestFullscreen();
|
|
412
|
-
}, i.onclick = () => {
|
|
413
|
-
e.toCenter();
|
|
414
423
|
}, s.onclick = () => {
|
|
424
|
+
e.toCenter();
|
|
425
|
+
}, i.onclick = () => {
|
|
415
426
|
e.scaleVal < 0.6 || e.scale(e.scaleVal -= 0.2);
|
|
416
427
|
}, o.onclick = () => {
|
|
417
428
|
e.scaleVal > 1.6 || e.scale(e.scaleVal += 0.2);
|
|
418
429
|
}, t;
|
|
419
430
|
}
|
|
420
|
-
function
|
|
421
|
-
const t = document.createElement("div"), n =
|
|
422
|
-
return t.appendChild(n), t.appendChild(
|
|
431
|
+
function Ut(e) {
|
|
432
|
+
const t = document.createElement("div"), n = D("tbltl", "left"), s = D("tbltr", "right"), i = D("tblts", "side");
|
|
433
|
+
return t.appendChild(n), t.appendChild(s), t.appendChild(i), t.className = "mind-elixir-toolbar lt", n.onclick = () => {
|
|
423
434
|
e.initLeft();
|
|
424
|
-
}, i.onclick = () => {
|
|
425
|
-
e.initRight();
|
|
426
435
|
}, s.onclick = () => {
|
|
436
|
+
e.initRight();
|
|
437
|
+
}, i.onclick = () => {
|
|
427
438
|
e.initSide();
|
|
428
439
|
}, t;
|
|
429
440
|
}
|
|
430
|
-
function
|
|
431
|
-
e.container.append(
|
|
441
|
+
function Jt(e) {
|
|
442
|
+
e.container.append(Kt(e)), e.container.append(Ut(e));
|
|
432
443
|
}
|
|
433
444
|
/*! @viselect/vanilla v3.3.1 MIT | https://github.com/Simonwep/selection/tree/master/packages/vanilla */
|
|
434
|
-
var
|
|
435
|
-
class
|
|
445
|
+
var Qt = Object.defineProperty, Zt = (e, t, n) => t in e ? Qt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, y = (e, t, n) => (Zt(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
446
|
+
class te {
|
|
436
447
|
constructor() {
|
|
437
|
-
|
|
448
|
+
y(this, "_listeners", /* @__PURE__ */ new Map()), y(this, "on", this.addEventListener), y(this, "off", this.removeEventListener), y(this, "emit", this.dispatchEvent);
|
|
438
449
|
}
|
|
439
450
|
addEventListener(t, n) {
|
|
440
|
-
const
|
|
441
|
-
return this._listeners.set(t,
|
|
451
|
+
const s = this._listeners.get(t) ?? /* @__PURE__ */ new Set();
|
|
452
|
+
return this._listeners.set(t, s), s.add(n), this;
|
|
442
453
|
}
|
|
443
454
|
removeEventListener(t, n) {
|
|
444
|
-
var
|
|
445
|
-
return (
|
|
455
|
+
var s;
|
|
456
|
+
return (s = this._listeners.get(t)) == null || s.delete(n), this;
|
|
446
457
|
}
|
|
447
458
|
dispatchEvent(t, ...n) {
|
|
448
|
-
let
|
|
449
|
-
for (const
|
|
450
|
-
|
|
451
|
-
return
|
|
459
|
+
let s = !0;
|
|
460
|
+
for (const i of this._listeners.get(t) ?? [])
|
|
461
|
+
s = i(...n) !== !1 && s;
|
|
462
|
+
return s;
|
|
452
463
|
}
|
|
453
464
|
unbindAllListeners() {
|
|
454
465
|
this._listeners.clear();
|
|
455
466
|
}
|
|
456
467
|
}
|
|
457
|
-
const
|
|
458
|
-
function
|
|
468
|
+
const lt = (e, t = "px") => typeof e == "number" ? e + t : e;
|
|
469
|
+
function $({ style: e }, t, n) {
|
|
459
470
|
if (typeof t == "object")
|
|
460
|
-
for (const [
|
|
461
|
-
|
|
471
|
+
for (const [s, i] of Object.entries(t))
|
|
472
|
+
i !== void 0 && (e[s] = lt(i));
|
|
462
473
|
else
|
|
463
|
-
n !== void 0 && (e[t] =
|
|
474
|
+
n !== void 0 && (e[t] = lt(n));
|
|
464
475
|
}
|
|
465
|
-
function
|
|
466
|
-
return (t, n,
|
|
476
|
+
function Lt(e) {
|
|
477
|
+
return (t, n, s, i = {}) => {
|
|
467
478
|
t instanceof HTMLCollection || t instanceof NodeList ? t = Array.from(t) : Array.isArray(t) || (t = [t]), Array.isArray(n) || (n = [n]);
|
|
468
479
|
for (const o of t)
|
|
469
|
-
for (const
|
|
470
|
-
o[e](
|
|
471
|
-
return [t, n,
|
|
480
|
+
for (const r of n)
|
|
481
|
+
o[e](r, s, { capture: !1, ...i });
|
|
482
|
+
return [t, n, s, i];
|
|
472
483
|
};
|
|
473
484
|
}
|
|
474
|
-
const
|
|
485
|
+
const z = Lt("addEventListener"), T = Lt("removeEventListener"), I = (e) => {
|
|
475
486
|
var t;
|
|
476
|
-
const { clientX: n, clientY:
|
|
477
|
-
return { x: n, y:
|
|
487
|
+
const { clientX: n, clientY: s, target: i } = ((t = e.touches) == null ? void 0 : t[0]) ?? e;
|
|
488
|
+
return { x: n, y: s, target: i };
|
|
478
489
|
};
|
|
479
|
-
function
|
|
490
|
+
function ct(e, t, n = "touch") {
|
|
480
491
|
switch (n) {
|
|
481
492
|
case "center": {
|
|
482
|
-
const
|
|
483
|
-
return
|
|
493
|
+
const s = t.left + t.width / 2, i = t.top + t.height / 2;
|
|
494
|
+
return s >= e.left && s <= e.right && i >= e.top && i <= e.bottom;
|
|
484
495
|
}
|
|
485
496
|
case "cover":
|
|
486
497
|
return t.left >= e.left && t.top >= e.top && t.right <= e.right && t.bottom <= e.bottom;
|
|
@@ -488,32 +499,32 @@ function ot(e, t, n = "touch") {
|
|
|
488
499
|
return e.right >= t.left && e.left <= t.right && e.bottom >= t.top && e.top <= t.bottom;
|
|
489
500
|
}
|
|
490
501
|
}
|
|
491
|
-
function
|
|
502
|
+
function B(e, t = document) {
|
|
492
503
|
const n = Array.isArray(e) ? e : [e];
|
|
493
|
-
let
|
|
494
|
-
for (let
|
|
495
|
-
const
|
|
496
|
-
typeof
|
|
504
|
+
let s = [];
|
|
505
|
+
for (let i = 0, o = n.length; i < o; i++) {
|
|
506
|
+
const r = n[i];
|
|
507
|
+
typeof r == "string" ? s = s.concat(Array.from(t.querySelectorAll(r))) : r instanceof Element && s.push(r);
|
|
497
508
|
}
|
|
498
|
-
return
|
|
509
|
+
return s;
|
|
499
510
|
}
|
|
500
|
-
const
|
|
501
|
-
let t, n = -1,
|
|
511
|
+
const ee = () => matchMedia("(hover: none), (pointer: coarse)").matches, ne = () => "safari" in window, se = (e) => {
|
|
512
|
+
let t, n = -1, s = !1;
|
|
502
513
|
return {
|
|
503
|
-
next(...
|
|
504
|
-
t =
|
|
505
|
-
e(...t),
|
|
514
|
+
next(...i) {
|
|
515
|
+
t = i, s || (s = !0, n = requestAnimationFrame(() => {
|
|
516
|
+
e(...t), s = !1;
|
|
506
517
|
}));
|
|
507
518
|
},
|
|
508
519
|
cancel() {
|
|
509
|
-
cancelAnimationFrame(n),
|
|
520
|
+
cancelAnimationFrame(n), s = !1;
|
|
510
521
|
}
|
|
511
522
|
};
|
|
512
|
-
}, { abs:
|
|
513
|
-
class
|
|
523
|
+
}, { abs: A, max: at, min: ht, ceil: dt } = Math;
|
|
524
|
+
class St extends te {
|
|
514
525
|
constructor(t) {
|
|
515
|
-
var n,
|
|
516
|
-
super(),
|
|
526
|
+
var n, s, i, o, r;
|
|
527
|
+
super(), y(this, "_options"), y(this, "_selection", {
|
|
517
528
|
stored: [],
|
|
518
529
|
selected: [],
|
|
519
530
|
touched: [],
|
|
@@ -523,7 +534,7 @@ class Ct extends Ut {
|
|
|
523
534
|
removed: []
|
|
524
535
|
// Removed elements since last selection
|
|
525
536
|
}
|
|
526
|
-
}),
|
|
537
|
+
}), y(this, "_area"), y(this, "_clippingElement"), y(this, "_targetElement"), y(this, "_targetRect"), y(this, "_selectables", []), y(this, "_latestElement"), y(this, "_areaRect", new DOMRect()), y(this, "_areaLocation", { y1: 0, x2: 0, y2: 0, x1: 0 }), y(this, "_singleClick", !0), y(this, "_frame"), y(this, "_scrollAvailable", !0), y(this, "_scrollingActive", !1), y(this, "_scrollSpeed", { x: 0, y: 0 }), y(this, "_scrollDelta", { x: 0, y: 0 }), y(this, "disable", this._bindStartEvents.bind(this, !1)), y(this, "enable", this._bindStartEvents), this._options = {
|
|
527
538
|
selectionAreaClass: "selection-area",
|
|
528
539
|
selectionContainerClass: void 0,
|
|
529
540
|
selectables: [],
|
|
@@ -540,11 +551,11 @@ class Ct extends Ut {
|
|
|
540
551
|
scrolling: {
|
|
541
552
|
speedDivider: 10,
|
|
542
553
|
manualSpeed: 750,
|
|
543
|
-
...(
|
|
554
|
+
...(s = t.behaviour) == null ? void 0 : s.scrolling,
|
|
544
555
|
startScrollMargins: {
|
|
545
556
|
x: 0,
|
|
546
557
|
y: 0,
|
|
547
|
-
...(o = (
|
|
558
|
+
...(o = (i = t.behaviour) == null ? void 0 : i.scrolling) == null ? void 0 : o.startScrollMargins
|
|
548
559
|
}
|
|
549
560
|
}
|
|
550
561
|
},
|
|
@@ -555,58 +566,58 @@ class Ct extends Ut {
|
|
|
555
566
|
singleTap: {
|
|
556
567
|
allow: !0,
|
|
557
568
|
intersect: "native",
|
|
558
|
-
...(
|
|
569
|
+
...(r = t.features) == null ? void 0 : r.singleTap
|
|
559
570
|
}
|
|
560
571
|
}
|
|
561
572
|
};
|
|
562
573
|
for (const h of Object.getOwnPropertyNames(Object.getPrototypeOf(this)))
|
|
563
574
|
typeof this[h] == "function" && (this[h] = this[h].bind(this));
|
|
564
|
-
const { document:
|
|
565
|
-
this._area =
|
|
575
|
+
const { document: l, selectionAreaClass: c, selectionContainerClass: u } = this._options;
|
|
576
|
+
this._area = l.createElement("div"), this._clippingElement = l.createElement("div"), this._clippingElement.appendChild(this._area), this._area.classList.add(c), u && this._clippingElement.classList.add(u), $(this._area, {
|
|
566
577
|
willChange: "top, left, bottom, right, width, height",
|
|
567
578
|
top: 0,
|
|
568
579
|
left: 0,
|
|
569
580
|
position: "fixed"
|
|
570
|
-
}),
|
|
581
|
+
}), $(this._clippingElement, {
|
|
571
582
|
overflow: "hidden",
|
|
572
583
|
position: "fixed",
|
|
573
584
|
transform: "translate3d(0, 0, 0)",
|
|
574
585
|
// https://stackoverflow.com/a/38268846
|
|
575
586
|
pointerEvents: "none",
|
|
576
587
|
zIndex: "1"
|
|
577
|
-
}), this._frame =
|
|
588
|
+
}), this._frame = se((h) => {
|
|
578
589
|
this._recalculateSelectionAreaRect(), this._updateElementSelection(), this._emitEvent("move", h), this._redrawSelectionArea();
|
|
579
590
|
}), this.enable();
|
|
580
591
|
}
|
|
581
592
|
_bindStartEvents(t = !0) {
|
|
582
|
-
const { document: n, features:
|
|
583
|
-
|
|
593
|
+
const { document: n, features: s } = this._options, i = t ? z : T;
|
|
594
|
+
i(n, "mousedown", this._onTapStart), s.touch && i(n, "touchstart", this._onTapStart, {
|
|
584
595
|
passive: !1
|
|
585
596
|
});
|
|
586
597
|
}
|
|
587
598
|
_onTapStart(t, n = !1) {
|
|
588
|
-
const { x:
|
|
599
|
+
const { x: s, y: i, target: o } = I(t), { _options: r } = this, { document: l } = this._options, c = o.getBoundingClientRect(), u = B(r.startAreas, r.document), h = B(r.boundaries, r.document);
|
|
589
600
|
this._targetElement = h.find(
|
|
590
|
-
(
|
|
601
|
+
(f) => ct(f.getBoundingClientRect(), c)
|
|
591
602
|
);
|
|
592
|
-
const
|
|
593
|
-
if (!this._targetElement || !
|
|
603
|
+
const d = t.composedPath();
|
|
604
|
+
if (!this._targetElement || !u.find((f) => d.includes(f)) || !h.find((f) => d.includes(f)) || !n && this._emitEvent("beforestart", t) === !1)
|
|
594
605
|
return;
|
|
595
|
-
this._areaLocation = { x1:
|
|
596
|
-
const
|
|
597
|
-
this._scrollDelta = { x:
|
|
606
|
+
this._areaLocation = { x1: s, y1: i, x2: 0, y2: 0 };
|
|
607
|
+
const a = l.scrollingElement ?? l.body;
|
|
608
|
+
this._scrollDelta = { x: a.scrollLeft, y: a.scrollTop }, this._singleClick = !0, this.clearSelection(!1, !0), z(l, ["touchmove", "mousemove"], this._delayedTapMove, { passive: !1 }), z(l, ["mouseup", "touchcancel", "touchend"], this._onTapStop), z(l, "scroll", this._onScroll);
|
|
598
609
|
}
|
|
599
610
|
_onSingleTap(t) {
|
|
600
|
-
const { singleTap: { intersect: n }, range:
|
|
611
|
+
const { singleTap: { intersect: n }, range: s } = this._options.features, i = I(t);
|
|
601
612
|
let o;
|
|
602
613
|
if (n === "native")
|
|
603
|
-
o =
|
|
614
|
+
o = i.target;
|
|
604
615
|
else if (n === "touch") {
|
|
605
616
|
this.resolveSelectables();
|
|
606
|
-
const { x:
|
|
607
|
-
o = this._selectables.find((
|
|
608
|
-
const { right: h, left:
|
|
609
|
-
return
|
|
617
|
+
const { x: l, y: c } = i;
|
|
618
|
+
o = this._selectables.find((u) => {
|
|
619
|
+
const { right: h, left: d, top: a, bottom: f } = u.getBoundingClientRect();
|
|
620
|
+
return l < h && l > d && c < f && c > a;
|
|
610
621
|
});
|
|
611
622
|
}
|
|
612
623
|
if (!o)
|
|
@@ -616,121 +627,121 @@ class Ct extends Ut {
|
|
|
616
627
|
return;
|
|
617
628
|
o = o.parentElement;
|
|
618
629
|
}
|
|
619
|
-
const { stored:
|
|
620
|
-
if (this._emitEvent("start", t), t.shiftKey &&
|
|
621
|
-
const
|
|
622
|
-
(
|
|
623
|
-
),
|
|
624
|
-
this.select(h), this._latestElement =
|
|
630
|
+
const { stored: r } = this._selection;
|
|
631
|
+
if (this._emitEvent("start", t), t.shiftKey && s && this._latestElement) {
|
|
632
|
+
const l = this._latestElement, [c, u] = l.compareDocumentPosition(o) & 4 ? [o, l] : [l, o], h = [...this._selectables.filter(
|
|
633
|
+
(d) => d.compareDocumentPosition(c) & 4 && d.compareDocumentPosition(u) & 2
|
|
634
|
+
), c, u];
|
|
635
|
+
this.select(h), this._latestElement = l;
|
|
625
636
|
} else
|
|
626
|
-
|
|
637
|
+
r.includes(o) && (r.length === 1 || t.ctrlKey || r.every((l) => this._selection.stored.includes(l))) ? this.deselect(o) : (this.select(o), this._latestElement = o);
|
|
627
638
|
this._emitEvent("stop", t);
|
|
628
639
|
}
|
|
629
640
|
_delayedTapMove(t) {
|
|
630
|
-
const { container: n, document:
|
|
641
|
+
const { container: n, document: s, behaviour: { startThreshold: i } } = this._options, { x1: o, y1: r } = this._areaLocation, { x: l, y: c } = I(t);
|
|
631
642
|
if (
|
|
632
643
|
// Single number for both coordinates
|
|
633
|
-
typeof
|
|
634
|
-
typeof
|
|
644
|
+
typeof i == "number" && A(l + c - (o + r)) >= i || // Different x and y threshold
|
|
645
|
+
typeof i == "object" && A(l - o) >= i.x || A(c - r) >= i.y
|
|
635
646
|
) {
|
|
636
|
-
if (
|
|
637
|
-
|
|
647
|
+
if (T(s, ["mousemove", "touchmove"], this._delayedTapMove, { passive: !1 }), this._emitEvent("beforedrag", t) === !1) {
|
|
648
|
+
T(s, ["mouseup", "touchcancel", "touchend"], this._onTapStop);
|
|
638
649
|
return;
|
|
639
650
|
}
|
|
640
|
-
|
|
651
|
+
z(s, ["mousemove", "touchmove"], this._onTapMove, { passive: !1 }), $(this._area, "display", "block"), B(n, s)[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 && (z(s, "wheel", this._manualScroll, { passive: !1 }), this._selectables = this._selectables.filter((u) => this._targetElement.contains(u))), this._setupSelectionArea(), this._emitEvent("start", t), this._onTapMove(t);
|
|
641
652
|
}
|
|
642
653
|
this._handleMoveEvent(t);
|
|
643
654
|
}
|
|
644
655
|
_setupSelectionArea() {
|
|
645
|
-
const { _clippingElement: t, _targetElement: n, _area:
|
|
646
|
-
this._scrollAvailable ? (
|
|
647
|
-
top:
|
|
648
|
-
left:
|
|
649
|
-
width:
|
|
650
|
-
height:
|
|
651
|
-
}),
|
|
652
|
-
marginTop: -
|
|
653
|
-
marginLeft: -
|
|
654
|
-
})) : (
|
|
656
|
+
const { _clippingElement: t, _targetElement: n, _area: s } = this, i = this._targetRect = n.getBoundingClientRect();
|
|
657
|
+
this._scrollAvailable ? ($(t, {
|
|
658
|
+
top: i.top,
|
|
659
|
+
left: i.left,
|
|
660
|
+
width: i.width,
|
|
661
|
+
height: i.height
|
|
662
|
+
}), $(s, {
|
|
663
|
+
marginTop: -i.top,
|
|
664
|
+
marginLeft: -i.left
|
|
665
|
+
})) : ($(t, {
|
|
655
666
|
top: 0,
|
|
656
667
|
left: 0,
|
|
657
668
|
width: "100%",
|
|
658
669
|
height: "100%"
|
|
659
|
-
}),
|
|
670
|
+
}), $(s, {
|
|
660
671
|
marginTop: 0,
|
|
661
672
|
marginLeft: 0
|
|
662
673
|
}));
|
|
663
674
|
}
|
|
664
675
|
_onTapMove(t) {
|
|
665
|
-
const { x: n, y:
|
|
666
|
-
if (o.x2 = n, o.y2 =
|
|
676
|
+
const { x: n, y: s } = I(t), { _scrollSpeed: i, _areaLocation: o, _options: r, _frame: l } = this, { speedDivider: c } = r.behaviour.scrolling, u = this._targetElement;
|
|
677
|
+
if (o.x2 = n, o.y2 = s, this._scrollAvailable && !this._scrollingActive && (i.y || i.x)) {
|
|
667
678
|
this._scrollingActive = !0;
|
|
668
679
|
const h = () => {
|
|
669
|
-
if (!
|
|
680
|
+
if (!i.x && !i.y) {
|
|
670
681
|
this._scrollingActive = !1;
|
|
671
682
|
return;
|
|
672
683
|
}
|
|
673
|
-
const { scrollTop:
|
|
674
|
-
|
|
684
|
+
const { scrollTop: d, scrollLeft: a } = u;
|
|
685
|
+
i.y && (u.scrollTop += dt(i.y / c), o.y1 -= u.scrollTop - d), i.x && (u.scrollLeft += dt(i.x / c), o.x1 -= u.scrollLeft - a), l.next(t), requestAnimationFrame(h);
|
|
675
686
|
};
|
|
676
687
|
requestAnimationFrame(h);
|
|
677
688
|
} else
|
|
678
|
-
|
|
689
|
+
l.next(t);
|
|
679
690
|
this._handleMoveEvent(t);
|
|
680
691
|
}
|
|
681
692
|
_handleMoveEvent(t) {
|
|
682
693
|
const { features: n } = this._options;
|
|
683
|
-
(n.touch &&
|
|
694
|
+
(n.touch && ee() || this._scrollAvailable && ne()) && t.preventDefault();
|
|
684
695
|
}
|
|
685
696
|
_onScroll() {
|
|
686
|
-
const { _scrollDelta: t, _options: { document: n } } = this, { scrollTop:
|
|
687
|
-
this._areaLocation.x1 += t.x -
|
|
697
|
+
const { _scrollDelta: t, _options: { document: n } } = this, { scrollTop: s, scrollLeft: i } = n.scrollingElement ?? n.body;
|
|
698
|
+
this._areaLocation.x1 += t.x - i, this._areaLocation.y1 += t.y - s, t.x = i, t.y = s, this._setupSelectionArea(), this._frame.next(null);
|
|
688
699
|
}
|
|
689
700
|
_manualScroll(t) {
|
|
690
|
-
const { manualSpeed: n } = this._options.behaviour.scrolling,
|
|
691
|
-
this._scrollSpeed.y +=
|
|
701
|
+
const { manualSpeed: n } = this._options.behaviour.scrolling, s = t.deltaY ? t.deltaY > 0 ? 1 : -1 : 0, i = t.deltaX ? t.deltaX > 0 ? 1 : -1 : 0;
|
|
702
|
+
this._scrollSpeed.y += s * n, this._scrollSpeed.x += i * n, this._onTapMove(t), t.preventDefault();
|
|
692
703
|
}
|
|
693
704
|
_recalculateSelectionAreaRect() {
|
|
694
|
-
const { _scrollSpeed: t, _areaLocation: n, _areaRect:
|
|
705
|
+
const { _scrollSpeed: t, _areaLocation: n, _areaRect: s, _targetElement: i, _options: o } = this, { scrollTop: r, scrollHeight: l, clientHeight: c, scrollLeft: u, scrollWidth: h, clientWidth: d } = i, a = this._targetRect, { x1: f, y1: g } = n;
|
|
695
706
|
let { x2: m, y2: p } = n;
|
|
696
707
|
const { behaviour: { scrolling: { startScrollMargins: v } } } = o;
|
|
697
|
-
m <
|
|
698
|
-
const
|
|
699
|
-
|
|
708
|
+
m < a.left + v.x ? (t.x = u ? -A(a.left - m + v.x) : 0, m = m < a.left ? a.left : m) : m > a.right - v.x ? (t.x = h - u - d ? A(a.left + a.width - m - v.x) : 0, m = m > a.right ? a.right : m) : t.x = 0, p < a.top + v.y ? (t.y = r ? -A(a.top - p + v.y) : 0, p = p < a.top ? a.top : p) : p > a.bottom - v.y ? (t.y = l - r - c ? A(a.top + a.height - p - v.y) : 0, p = p > a.bottom ? a.bottom : p) : t.y = 0;
|
|
709
|
+
const x = ht(f, m), w = ht(g, p), _ = at(f, m), M = at(g, p);
|
|
710
|
+
s.x = x, s.y = w, s.width = _ - x, s.height = M - w;
|
|
700
711
|
}
|
|
701
712
|
_redrawSelectionArea() {
|
|
702
|
-
const { x: t, y: n, width:
|
|
703
|
-
o.left = `${t}px`, o.top = `${n}px`, o.width = `${
|
|
713
|
+
const { x: t, y: n, width: s, height: i } = this._areaRect, { style: o } = this._area;
|
|
714
|
+
o.left = `${t}px`, o.top = `${n}px`, o.width = `${s}px`, o.height = `${i}px`;
|
|
704
715
|
}
|
|
705
716
|
_onTapStop(t, n) {
|
|
706
|
-
var
|
|
707
|
-
const { document:
|
|
708
|
-
|
|
717
|
+
var s;
|
|
718
|
+
const { document: i, features: o } = this._options, { _singleClick: r } = this;
|
|
719
|
+
T(i, ["mousemove", "touchmove"], this._delayedTapMove), T(i, ["touchmove", "mousemove"], this._onTapMove), T(i, ["mouseup", "touchcancel", "touchend"], this._onTapStop), T(i, "scroll", this._onScroll), this._keepSelection(), t && r && o.singleTap.allow ? this._onSingleTap(t) : !r && !n && (this._updateElementSelection(), this._emitEvent("stop", t)), this._scrollSpeed.x = 0, this._scrollSpeed.y = 0, this._scrollAvailable && T(i, "wheel", this._manualScroll, { passive: !0 }), this._clippingElement.remove(), (s = this._frame) == null || s.cancel(), $(this._area, "display", "none");
|
|
709
720
|
}
|
|
710
721
|
_updateElementSelection() {
|
|
711
|
-
const { _selectables: t, _options: n, _selection:
|
|
722
|
+
const { _selectables: t, _options: n, _selection: s, _areaRect: i } = this, { stored: o, selected: r, touched: l } = s, { intersect: c, overlap: u } = n.behaviour, h = u === "invert", d = [], a = [], f = [];
|
|
712
723
|
for (let m = 0; m < t.length; m++) {
|
|
713
724
|
const p = t[m];
|
|
714
|
-
if (
|
|
715
|
-
if (
|
|
716
|
-
o.includes(p) && !
|
|
725
|
+
if (ct(i, p.getBoundingClientRect(), c)) {
|
|
726
|
+
if (r.includes(p))
|
|
727
|
+
o.includes(p) && !l.includes(p) && l.push(p);
|
|
717
728
|
else if (h && o.includes(p)) {
|
|
718
|
-
|
|
729
|
+
f.push(p);
|
|
719
730
|
continue;
|
|
720
731
|
} else
|
|
721
|
-
|
|
722
|
-
|
|
732
|
+
a.push(p);
|
|
733
|
+
d.push(p);
|
|
723
734
|
}
|
|
724
735
|
}
|
|
725
|
-
h &&
|
|
726
|
-
const g =
|
|
727
|
-
for (let m = 0; m <
|
|
728
|
-
const p =
|
|
729
|
-
!
|
|
736
|
+
h && a.push(...o.filter((m) => !r.includes(m)));
|
|
737
|
+
const g = u === "keep";
|
|
738
|
+
for (let m = 0; m < r.length; m++) {
|
|
739
|
+
const p = r[m];
|
|
740
|
+
!d.includes(p) && !// Check if user wants to keep previously selected elements, e.g.
|
|
730
741
|
// not make them part of the current selection as soon as they're touched.
|
|
731
|
-
(g && o.includes(p)) &&
|
|
742
|
+
(g && o.includes(p)) && f.push(p);
|
|
732
743
|
}
|
|
733
|
-
|
|
744
|
+
s.selected = d, s.changed = { added: a, removed: f }, this._latestElement = void 0;
|
|
734
745
|
}
|
|
735
746
|
_emitEvent(t, n) {
|
|
736
747
|
return this.emit(t, {
|
|
@@ -740,28 +751,28 @@ class Ct extends Ut {
|
|
|
740
751
|
});
|
|
741
752
|
}
|
|
742
753
|
_keepSelection() {
|
|
743
|
-
const { _options: t, _selection: n } = this, { selected:
|
|
754
|
+
const { _options: t, _selection: n } = this, { selected: s, changed: i, touched: o, stored: r } = n, l = s.filter((c) => !r.includes(c));
|
|
744
755
|
switch (t.behaviour.overlap) {
|
|
745
756
|
case "drop": {
|
|
746
757
|
n.stored = [
|
|
747
|
-
...
|
|
748
|
-
...
|
|
758
|
+
...l,
|
|
759
|
+
...r.filter((c) => !o.includes(c))
|
|
749
760
|
// Elements not touched
|
|
750
761
|
];
|
|
751
762
|
break;
|
|
752
763
|
}
|
|
753
764
|
case "invert": {
|
|
754
765
|
n.stored = [
|
|
755
|
-
...
|
|
756
|
-
...
|
|
766
|
+
...l,
|
|
767
|
+
...r.filter((c) => !i.removed.includes(c))
|
|
757
768
|
// Elements not removed from selection
|
|
758
769
|
];
|
|
759
770
|
break;
|
|
760
771
|
}
|
|
761
772
|
case "keep": {
|
|
762
773
|
n.stored = [
|
|
763
|
-
...
|
|
764
|
-
...
|
|
774
|
+
...r,
|
|
775
|
+
...s.filter((c) => !r.includes(c))
|
|
765
776
|
// Newly added
|
|
766
777
|
];
|
|
767
778
|
break;
|
|
@@ -781,7 +792,7 @@ class Ct extends Ut {
|
|
|
781
792
|
* Will update everything which can be selected.
|
|
782
793
|
*/
|
|
783
794
|
resolveSelectables() {
|
|
784
|
-
this._selectables =
|
|
795
|
+
this._selectables = B(this._options.selectables, this._options.document);
|
|
785
796
|
}
|
|
786
797
|
/**
|
|
787
798
|
* Same as deselect, but for all elements currently selected.
|
|
@@ -789,12 +800,12 @@ class Ct extends Ut {
|
|
|
789
800
|
* @param quiet If move / stop events should be fired
|
|
790
801
|
*/
|
|
791
802
|
clearSelection(t = !0, n = !1) {
|
|
792
|
-
const { selected:
|
|
803
|
+
const { selected: s, stored: i, changed: o } = this._selection;
|
|
793
804
|
o.added = [], o.removed.push(
|
|
794
|
-
...
|
|
795
|
-
...t ?
|
|
805
|
+
...s,
|
|
806
|
+
...t ? i : []
|
|
796
807
|
), n || (this._emitEvent("move", null), this._emitEvent("stop", null)), this._selection = {
|
|
797
|
-
stored: t ? [] :
|
|
808
|
+
stored: t ? [] : i,
|
|
798
809
|
selected: [],
|
|
799
810
|
touched: [],
|
|
800
811
|
changed: { added: [], removed: [] }
|
|
@@ -831,10 +842,10 @@ class Ct extends Ut {
|
|
|
831
842
|
* @param quiet - If this should not trigger the move event
|
|
832
843
|
*/
|
|
833
844
|
select(t, n = !1) {
|
|
834
|
-
const { changed:
|
|
835
|
-
(
|
|
845
|
+
const { changed: s, selected: i, stored: o } = this._selection, r = B(t, this._options.document).filter(
|
|
846
|
+
(l) => !i.includes(l) && !o.includes(l)
|
|
836
847
|
);
|
|
837
|
-
return o.push(...
|
|
848
|
+
return o.push(...r), i.push(...r), s.added.push(...r), s.removed = [], this._latestElement = void 0, n || (this._emitEvent("move", null), this._emitEvent("stop", null)), r;
|
|
838
849
|
}
|
|
839
850
|
/**
|
|
840
851
|
* Removes a particular element from the selection.
|
|
@@ -842,17 +853,17 @@ class Ct extends Ut {
|
|
|
842
853
|
* @param quiet - If this should not trigger the move event
|
|
843
854
|
*/
|
|
844
855
|
deselect(t, n = !1) {
|
|
845
|
-
const { selected:
|
|
846
|
-
(
|
|
856
|
+
const { selected: s, stored: i, changed: o } = this._selection, r = B(t, this._options.document).filter(
|
|
857
|
+
(l) => s.includes(l) || i.includes(l)
|
|
847
858
|
);
|
|
848
|
-
|
|
849
|
-
...
|
|
859
|
+
r.length && (this._selection.stored = i.filter((l) => !r.includes(l)), this._selection.selected = s.filter((l) => !r.includes(l)), this._selection.changed.added = [], this._selection.changed.removed.push(
|
|
860
|
+
...r.filter((l) => !o.removed.includes(l))
|
|
850
861
|
), this._latestElement = void 0, n || (this._emitEvent("move", null), this._emitEvent("stop", null)));
|
|
851
862
|
}
|
|
852
863
|
}
|
|
853
|
-
|
|
854
|
-
function
|
|
855
|
-
const t = new
|
|
864
|
+
y(St, "version", "3.3.1");
|
|
865
|
+
function ie(e) {
|
|
866
|
+
const t = new St({
|
|
856
867
|
selectables: [".map-container me-tpc"],
|
|
857
868
|
boundaries: [".map-container"],
|
|
858
869
|
container: ".map-container",
|
|
@@ -871,36 +882,36 @@ function ee(e) {
|
|
|
871
882
|
startScrollMargins: { x: 10, y: 10 }
|
|
872
883
|
}
|
|
873
884
|
}
|
|
874
|
-
}).on("beforestart", ({ event: n }) => !(n.button !== 0 || n.target.tagName === "ME-TPC" || n.target.id === "input-box")).on("start", ({ event: n }) => {
|
|
885
|
+
}).on("beforestart", ({ event: n }) => !(n.button !== 0 || n.target.tagName === "ME-TPC" || n.target.id === "input-box" || n.target.className === "circle")).on("start", ({ event: n }) => {
|
|
875
886
|
!n.ctrlKey && !n.metaKey && (e.unselectNode(), e.unselectNodes(), e.unselectSummary(), t.clearSelection(!0, !0));
|
|
876
887
|
}).on(
|
|
877
888
|
"move",
|
|
878
889
|
({
|
|
879
890
|
store: {
|
|
880
|
-
changed: { added: n, removed:
|
|
891
|
+
changed: { added: n, removed: s }
|
|
881
892
|
}
|
|
882
893
|
}) => {
|
|
883
|
-
|
|
884
|
-
for (const
|
|
885
|
-
|
|
886
|
-
for (const
|
|
887
|
-
|
|
894
|
+
N.moved = !0;
|
|
895
|
+
for (const i of n)
|
|
896
|
+
i.classList.add("selected");
|
|
897
|
+
for (const i of s)
|
|
898
|
+
i.classList.remove("selected");
|
|
888
899
|
}
|
|
889
900
|
).on("stop", ({ store: { stored: n } }) => {
|
|
890
901
|
console.log(n, "stored"), e.selectNodes(n);
|
|
891
902
|
});
|
|
892
903
|
console.log(t, "selection");
|
|
893
904
|
}
|
|
894
|
-
const
|
|
905
|
+
const oe = function(e, t = !0) {
|
|
895
906
|
this.theme = e;
|
|
896
|
-
const n = this.theme.cssVar,
|
|
897
|
-
for (let
|
|
898
|
-
const o = i
|
|
907
|
+
const n = this.theme.cssVar, s = Object.keys(n);
|
|
908
|
+
for (let i = 0; i < s.length; i++) {
|
|
909
|
+
const o = s[i];
|
|
899
910
|
this.mindElixirBox.style.setProperty(o, n[o]);
|
|
900
911
|
}
|
|
901
912
|
t && this.refresh();
|
|
902
913
|
};
|
|
903
|
-
function
|
|
914
|
+
function Mt(e) {
|
|
904
915
|
return {
|
|
905
916
|
nodeData: e.isFocusMode ? e.nodeDataBackup : e.nodeData,
|
|
906
917
|
linkData: e.linkData,
|
|
@@ -909,17 +920,17 @@ function wt(e) {
|
|
|
909
920
|
theme: e.theme
|
|
910
921
|
};
|
|
911
922
|
}
|
|
912
|
-
const
|
|
923
|
+
const re = function(e, t, n) {
|
|
913
924
|
if (e) {
|
|
914
925
|
if (console.time("selectNode"), typeof e == "string") {
|
|
915
|
-
const
|
|
916
|
-
return
|
|
926
|
+
const s = C(e);
|
|
927
|
+
return s ? this.selectNode(s) : void 0;
|
|
917
928
|
}
|
|
918
929
|
this.currentNode && (this.currentNode.className = ""), e.className = "selected", e.scrollIntoView({ block: "nearest", inline: "nearest" }), this.currentNode = e, t ? this.bus.fire("selectNewNode", e.nodeObj) : this.bus.fire("selectNode", e.nodeObj, n), console.timeEnd("selectNode");
|
|
919
930
|
}
|
|
920
|
-
},
|
|
931
|
+
}, le = function() {
|
|
921
932
|
this.currentNode && (this.currentNode.className = ""), this.currentNode = null, this.bus.fire("unselectNode");
|
|
922
|
-
},
|
|
933
|
+
}, ce = function(e) {
|
|
923
934
|
if (e) {
|
|
924
935
|
console.time("selectNodes");
|
|
925
936
|
for (const t of e)
|
|
@@ -929,12 +940,12 @@ const ie = function(e, t, n) {
|
|
|
929
940
|
e.map((t) => t.nodeObj)
|
|
930
941
|
), console.timeEnd("selectNodes");
|
|
931
942
|
}
|
|
932
|
-
},
|
|
943
|
+
}, ae = function() {
|
|
933
944
|
if (this.currentNodes)
|
|
934
945
|
for (const e of this.currentNodes)
|
|
935
946
|
e.classList.remove("selected");
|
|
936
947
|
this.currentNodes = null, this.bus.fire("unselectNodes");
|
|
937
|
-
},
|
|
948
|
+
}, he = function() {
|
|
938
949
|
if (!this.currentNode || this.currentNode.dataset.nodeid === "meroot")
|
|
939
950
|
return !1;
|
|
940
951
|
const e = this.currentNode.parentElement.parentElement.nextSibling;
|
|
@@ -944,7 +955,7 @@ const ie = function(e, t, n) {
|
|
|
944
955
|
else
|
|
945
956
|
return !1;
|
|
946
957
|
return this.selectNode(t), !0;
|
|
947
|
-
},
|
|
958
|
+
}, de = function() {
|
|
948
959
|
if (!this.currentNode || this.currentNode.dataset.nodeid === "meroot")
|
|
949
960
|
return !1;
|
|
950
961
|
const e = this.currentNode.parentElement.parentElement.previousSibling;
|
|
@@ -954,7 +965,7 @@ const ie = function(e, t, n) {
|
|
|
954
965
|
else
|
|
955
966
|
return !1;
|
|
956
967
|
return this.selectNode(t), !0;
|
|
957
|
-
},
|
|
968
|
+
}, ue = function() {
|
|
958
969
|
if (!this.currentNode)
|
|
959
970
|
return;
|
|
960
971
|
const e = this.currentNode.parentElement.nextSibling;
|
|
@@ -962,7 +973,7 @@ const ie = function(e, t, n) {
|
|
|
962
973
|
const t = e.firstChild.firstChild.firstChild;
|
|
963
974
|
this.selectNode(t);
|
|
964
975
|
}
|
|
965
|
-
},
|
|
976
|
+
}, fe = function() {
|
|
966
977
|
if (!this.currentNode || this.currentNode.dataset.nodeid === "meroot")
|
|
967
978
|
return;
|
|
968
979
|
const e = this.currentNode.parentElement.parentElement.parentElement.previousSibling;
|
|
@@ -970,101 +981,101 @@ const ie = function(e, t, n) {
|
|
|
970
981
|
const t = e.firstChild;
|
|
971
982
|
this.selectNode(t);
|
|
972
983
|
}
|
|
973
|
-
},
|
|
974
|
-
const e =
|
|
984
|
+
}, pe = function() {
|
|
985
|
+
const e = Mt(this);
|
|
975
986
|
return JSON.stringify(e, (t, n) => {
|
|
976
987
|
if (!(t === "parent" && typeof n != "string"))
|
|
977
|
-
return
|
|
988
|
+
return n;
|
|
978
989
|
});
|
|
979
|
-
},
|
|
990
|
+
}, me = function() {
|
|
980
991
|
return JSON.parse(this.getDataString());
|
|
981
|
-
},
|
|
982
|
-
const e =
|
|
992
|
+
}, ge = function() {
|
|
993
|
+
const e = Mt(this).nodeData;
|
|
983
994
|
let t = "# " + e.topic + `
|
|
984
995
|
|
|
985
996
|
`;
|
|
986
|
-
function n(
|
|
987
|
-
for (let o = 0; o <
|
|
988
|
-
|
|
997
|
+
function n(s, i) {
|
|
998
|
+
for (let o = 0; o < s.length; o++)
|
|
999
|
+
i <= 6 ? t += "".padStart(i, "#") + " " + s[o].topic + `
|
|
989
1000
|
|
|
990
|
-
` : t += "".padStart(
|
|
991
|
-
`,
|
|
1001
|
+
` : t += "".padStart(i - 7, " ") + "- " + s[o].topic + `
|
|
1002
|
+
`, s[o].children && n(s[o].children || [], i + 1);
|
|
992
1003
|
}
|
|
993
1004
|
return n(e.children || [], 2), t;
|
|
994
|
-
},
|
|
1005
|
+
}, ve = function() {
|
|
995
1006
|
this.editable = !0;
|
|
996
|
-
},
|
|
1007
|
+
}, ye = function() {
|
|
997
1008
|
this.editable = !1;
|
|
998
|
-
},
|
|
1009
|
+
}, be = function(e) {
|
|
999
1010
|
this.scaleVal = e, this.map.style.transform = "scale(" + e + ")";
|
|
1000
|
-
},
|
|
1011
|
+
}, xe = function() {
|
|
1001
1012
|
this.container.scrollTo(1e4 - this.container.offsetWidth / 2, 1e4 - this.container.offsetHeight / 2);
|
|
1002
|
-
},
|
|
1013
|
+
}, we = function(e) {
|
|
1003
1014
|
e(this);
|
|
1004
|
-
},
|
|
1015
|
+
}, _e = function(e) {
|
|
1005
1016
|
e.nodeObj.root || (this.tempDirection === null && (this.tempDirection = this.direction), this.isFocusMode || (this.nodeDataBackup = this.nodeData, this.isFocusMode = !0), this.nodeData = e.nodeObj, this.nodeData.root = !0, this.initRight(), this.toCenter());
|
|
1006
|
-
},
|
|
1017
|
+
}, Ee = function() {
|
|
1007
1018
|
this.isFocusMode = !1, this.tempDirection !== null && (delete this.nodeData.root, this.nodeData = this.nodeDataBackup, this.direction = this.tempDirection, this.tempDirection = null, this.refresh(), this.toCenter());
|
|
1008
|
-
},
|
|
1019
|
+
}, Ce = function() {
|
|
1009
1020
|
this.direction = 0, this.refresh();
|
|
1010
|
-
},
|
|
1021
|
+
}, Le = function() {
|
|
1011
1022
|
this.direction = 1, this.refresh();
|
|
1012
|
-
},
|
|
1023
|
+
}, Se = function() {
|
|
1013
1024
|
this.direction = 2, this.refresh();
|
|
1014
|
-
},
|
|
1025
|
+
}, Me = function(e) {
|
|
1015
1026
|
this.locale = e, this.refresh();
|
|
1016
|
-
},
|
|
1027
|
+
}, ke = function(e, t) {
|
|
1017
1028
|
const n = e.nodeObj;
|
|
1018
1029
|
typeof t == "boolean" ? n.expanded = t : n.expanded !== !1 ? n.expanded = !1 : n.expanded = !0, this.layout(), this.linkDiv(), this.bus.fire("expandNode", n);
|
|
1019
|
-
},
|
|
1020
|
-
e && (e = JSON.parse(JSON.stringify(e)), this.nodeData = e.nodeData, this.linkData = e.linkData || {}),
|
|
1021
|
-
},
|
|
1030
|
+
}, $e = function(e) {
|
|
1031
|
+
e && (e = JSON.parse(JSON.stringify(e)), this.nodeData = e.nodeData, this.linkData = e.linkData || {}), tt(this.nodeData), this.layout(), this.linkDiv();
|
|
1032
|
+
}, Te = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1022
1033
|
__proto__: null,
|
|
1023
|
-
cancelFocus:
|
|
1024
|
-
disableEdit:
|
|
1025
|
-
enableEdit:
|
|
1026
|
-
expandNode:
|
|
1027
|
-
focusNode:
|
|
1028
|
-
getData:
|
|
1029
|
-
getDataMd:
|
|
1030
|
-
getDataString:
|
|
1031
|
-
initLeft:
|
|
1032
|
-
initRight:
|
|
1033
|
-
initSide:
|
|
1034
|
-
install:
|
|
1035
|
-
refresh:
|
|
1036
|
-
scale:
|
|
1037
|
-
selectFirstChild:
|
|
1038
|
-
selectNextSibling:
|
|
1039
|
-
selectNode:
|
|
1040
|
-
selectNodes:
|
|
1041
|
-
selectParent:
|
|
1042
|
-
selectPrevSibling:
|
|
1043
|
-
setLocale:
|
|
1044
|
-
toCenter:
|
|
1045
|
-
unselectNode:
|
|
1046
|
-
unselectNodes:
|
|
1047
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1034
|
+
cancelFocus: Ee,
|
|
1035
|
+
disableEdit: ye,
|
|
1036
|
+
enableEdit: ve,
|
|
1037
|
+
expandNode: ke,
|
|
1038
|
+
focusNode: _e,
|
|
1039
|
+
getData: me,
|
|
1040
|
+
getDataMd: ge,
|
|
1041
|
+
getDataString: pe,
|
|
1042
|
+
initLeft: Ce,
|
|
1043
|
+
initRight: Le,
|
|
1044
|
+
initSide: Se,
|
|
1045
|
+
install: we,
|
|
1046
|
+
refresh: $e,
|
|
1047
|
+
scale: be,
|
|
1048
|
+
selectFirstChild: ue,
|
|
1049
|
+
selectNextSibling: he,
|
|
1050
|
+
selectNode: re,
|
|
1051
|
+
selectNodes: ce,
|
|
1052
|
+
selectParent: fe,
|
|
1053
|
+
selectPrevSibling: de,
|
|
1054
|
+
setLocale: Me,
|
|
1055
|
+
toCenter: xe,
|
|
1056
|
+
unselectNode: le,
|
|
1057
|
+
unselectNodes: ae
|
|
1058
|
+
}, Symbol.toStringTag, { value: "Module" })), Ne = function(e) {
|
|
1048
1059
|
return {
|
|
1049
1060
|
dom: e,
|
|
1050
1061
|
mousedown: !1,
|
|
1051
1062
|
lastX: 0,
|
|
1052
1063
|
lastY: 0,
|
|
1053
1064
|
handleMouseMove(t) {
|
|
1054
|
-
if (
|
|
1065
|
+
if (this.mousedown) {
|
|
1055
1066
|
if (!this.lastX) {
|
|
1056
1067
|
this.lastX = t.pageX, this.lastY = t.pageY;
|
|
1057
1068
|
return;
|
|
1058
1069
|
}
|
|
1059
|
-
const n = this.lastX - t.pageX,
|
|
1060
|
-
this.cb && this.cb(n,
|
|
1070
|
+
const n = this.lastX - t.pageX, s = this.lastY - t.pageY;
|
|
1071
|
+
this.cb && this.cb(n, s), this.lastX = t.pageX, this.lastY = t.pageY;
|
|
1061
1072
|
}
|
|
1062
1073
|
},
|
|
1063
1074
|
handleMouseDown(t) {
|
|
1064
|
-
|
|
1075
|
+
this.mousedown = !0;
|
|
1065
1076
|
},
|
|
1066
1077
|
handleClear(t) {
|
|
1067
|
-
|
|
1078
|
+
this.clear();
|
|
1068
1079
|
},
|
|
1069
1080
|
cb: null,
|
|
1070
1081
|
init(t, n) {
|
|
@@ -1077,302 +1088,475 @@ const ie = function(e, t, n) {
|
|
|
1077
1088
|
this.mousedown = !1, this.lastX = 0, this.lastY = 0;
|
|
1078
1089
|
}
|
|
1079
1090
|
};
|
|
1080
|
-
},
|
|
1081
|
-
create:
|
|
1082
|
-
}
|
|
1083
|
-
|
|
1091
|
+
}, ut = {
|
|
1092
|
+
create: Ne
|
|
1093
|
+
};
|
|
1094
|
+
function U(e, t, n) {
|
|
1095
|
+
const { offsetLeft: s, offsetTop: i } = V(e.nodes, t), o = t.offsetWidth, r = t.offsetHeight, l = s + o / 2, c = i + r / 2, u = l + n.x, h = c + n.y;
|
|
1096
|
+
return {
|
|
1097
|
+
w: o,
|
|
1098
|
+
h: r,
|
|
1099
|
+
cx: l,
|
|
1100
|
+
cy: c,
|
|
1101
|
+
ctrlX: u,
|
|
1102
|
+
ctrlY: h
|
|
1103
|
+
};
|
|
1104
|
+
}
|
|
1105
|
+
function O(e) {
|
|
1106
|
+
let t, n;
|
|
1107
|
+
const s = (e.cy - e.ctrlY) / (e.ctrlX - e.cx);
|
|
1108
|
+
return s > e.h / e.w || s < -e.h / e.w ? e.cy - e.ctrlY < 0 ? (t = e.cx - e.h / 2 / s, n = e.cy + e.h / 2) : (t = e.cx + e.h / 2 / s, n = e.cy - e.h / 2) : e.cx - e.ctrlX < 0 ? (t = e.cx + e.w / 2, n = e.cy - e.w * s / 2) : (t = e.cx - e.w / 2, n = e.cy + e.w * s / 2), {
|
|
1109
|
+
x: t,
|
|
1110
|
+
y: n
|
|
1111
|
+
};
|
|
1112
|
+
}
|
|
1113
|
+
const Ae = function(e, t, n, s) {
|
|
1114
|
+
const i = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
1115
|
+
return b(i, {
|
|
1116
|
+
"text-anchor": "middle",
|
|
1117
|
+
x: t + "",
|
|
1118
|
+
y: n + "",
|
|
1119
|
+
fill: s || "#666"
|
|
1120
|
+
}), i.dataset.type = "custom-link", i.innerHTML = e, i;
|
|
1121
|
+
}, De = function(e, t, n, s) {
|
|
1084
1122
|
if (!e || !t)
|
|
1085
1123
|
return;
|
|
1086
|
-
const
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
}, v = K(m, a, c), y = v.x, x = v.y, _ = J(p, u, g), E = _.x, T = _.y, S = mt(u, g, E, T), w = {
|
|
1100
|
-
id: "",
|
|
1101
|
-
label: "",
|
|
1124
|
+
const i = performance.now();
|
|
1125
|
+
this.hideLinkController();
|
|
1126
|
+
const o = U(this, e, n.delta1), r = U(this, t, n.delta2), { x: l, y: c } = O(o), { ctrlX: u, ctrlY: h } = o, { ctrlX: d, ctrlY: a } = r, { x: f, y: g } = O(r), m = yt(d, a, f, g), p = Xt(
|
|
1127
|
+
`M ${l} ${c} C ${u} ${h} ${d} ${a} ${f} ${g}`,
|
|
1128
|
+
`M ${m.x1} ${m.y1} L ${f} ${g} L ${m.x2} ${m.y2}`
|
|
1129
|
+
), v = l / 8 + u * 3 / 8 + d * 3 / 8 + f / 8, x = c / 8 + h * 3 / 8 + a * 3 / 8 + g / 8, w = Ae(n.label, v, x, this.theme.cssVar["--color"]);
|
|
1130
|
+
p.appendChild(w), p.linkObj = n, p.dataset.linkid = n.id, this.linkSvgGroup.appendChild(p), s || (this.linkData[n.id] = n, this.currentLink = p, this.showLinkController(n, o, r));
|
|
1131
|
+
const _ = performance.now();
|
|
1132
|
+
console.log(`DrawCustomLink Execution time: ${_ - i} ms`);
|
|
1133
|
+
}, He = function(e, t) {
|
|
1134
|
+
const n = {
|
|
1135
|
+
id: et(),
|
|
1136
|
+
label: "Custom Link",
|
|
1102
1137
|
from: e.nodeObj.id,
|
|
1103
1138
|
to: t.nodeObj.id,
|
|
1104
1139
|
delta1: {
|
|
1105
|
-
x:
|
|
1106
|
-
y:
|
|
1140
|
+
x: 0,
|
|
1141
|
+
y: -200
|
|
1107
1142
|
},
|
|
1108
1143
|
delta2: {
|
|
1109
|
-
x:
|
|
1110
|
-
y:
|
|
1144
|
+
x: 0,
|
|
1145
|
+
y: -200
|
|
1111
1146
|
}
|
|
1112
|
-
}
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
);
|
|
1116
|
-
n && i ? (w.id = i.id, this.linkData[i.id] = w) : (w.id = Q(), this.linkData[w.id] = w, this.currentLink = k), k.linkObj = w, k.dataset.linkid = w.id, this.linkSvgGroup.appendChild(k), n || this.showLinkController(a, c, u, g, w, m, p);
|
|
1117
|
-
}, Ne = function(e) {
|
|
1147
|
+
};
|
|
1148
|
+
this.drawCustomLink(e, t, n);
|
|
1149
|
+
}, Pe = function(e) {
|
|
1118
1150
|
let t;
|
|
1119
1151
|
if (e ? t = e : t = this.currentLink, !t)
|
|
1120
1152
|
return;
|
|
1121
|
-
|
|
1153
|
+
this.hideLinkController();
|
|
1122
1154
|
const n = t.linkObj.id;
|
|
1123
|
-
|
|
1124
|
-
},
|
|
1155
|
+
delete this.linkData[n], t.remove(), t = null;
|
|
1156
|
+
}, ze = function(e) {
|
|
1125
1157
|
this.currentLink = e;
|
|
1126
|
-
const t = e.linkObj;
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
const n = t.from, i = t.to, s = this.map.getBoundingClientRect(), o = L(n).getBoundingClientRect(), l = L(i).getBoundingClientRect(), r = (o.x + o.width / 2 - s.x) / this.scaleVal, d = (o.y + o.height / 2 - s.y) / this.scaleVal, f = (l.x + l.width / 2 - s.x) / this.scaleVal, h = (l.y + l.height / 2 - s.y) / this.scaleVal, a = {
|
|
1130
|
-
cx: r,
|
|
1131
|
-
cy: d,
|
|
1132
|
-
w: o.width,
|
|
1133
|
-
h: o.height
|
|
1134
|
-
}, c = {
|
|
1135
|
-
cx: f,
|
|
1136
|
-
cy: h,
|
|
1137
|
-
w: l.width,
|
|
1138
|
-
h: l.height
|
|
1139
|
-
}, u = r + t.delta1.x, g = d + t.delta1.y, m = f + t.delta2.x, p = h + t.delta2.y;
|
|
1140
|
-
this.showLinkController(u, g, m, p, t, a, c);
|
|
1141
|
-
}, Ae = function() {
|
|
1158
|
+
const t = e.linkObj, n = C(t.from), s = C(t.to), i = U(this, n, t.delta1), o = U(this, s, t.delta2);
|
|
1159
|
+
this.showLinkController(t, i, o);
|
|
1160
|
+
}, Be = function() {
|
|
1142
1161
|
this.linkController.style.display = "none", this.P2.style.display = "none", this.P3.style.display = "none";
|
|
1143
|
-
},
|
|
1144
|
-
this.linkController.style.display = "initial", this.P2.style.display = "initial", this.P3.style.display = "initial";
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1162
|
+
}, Oe = function(e, t, n) {
|
|
1163
|
+
this.linkController.style.display = "initial", this.P2.style.display = "initial", this.P3.style.display = "initial", this.nodes.appendChild(this.linkController), this.nodes.appendChild(this.P2), this.nodes.appendChild(this.P3);
|
|
1164
|
+
let { x: s, y: i } = O(t), { ctrlX: o, ctrlY: r } = t, { ctrlX: l, ctrlY: c } = n, { x: u, y: h } = O(n);
|
|
1165
|
+
this.P2.style.cssText = `top:${r}px;left:${o}px;`, this.P3.style.cssText = `top:${c}px;left:${l}px;`, b(this.line1, {
|
|
1166
|
+
x1: s + "",
|
|
1167
|
+
y1: i + "",
|
|
1168
|
+
x2: o + "",
|
|
1169
|
+
y2: r + ""
|
|
1170
|
+
}), b(this.line2, {
|
|
1171
|
+
x1: l + "",
|
|
1172
|
+
y1: c + "",
|
|
1173
|
+
x2: u + "",
|
|
1174
|
+
y2: h + ""
|
|
1175
|
+
}), this.helper1 && (this.helper1.destory(this.map), this.helper2.destory(this.map)), this.helper1 = ut.create(this.P2), this.helper2 = ut.create(this.P3), this.helper1.init(this.map, (d, a) => {
|
|
1150
1176
|
var p;
|
|
1151
|
-
|
|
1152
|
-
const
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1177
|
+
o = o - d / this.scaleVal, r = r - a / this.scaleVal;
|
|
1178
|
+
const f = O({ ...t, ctrlX: o, ctrlY: r });
|
|
1179
|
+
s = f.x, i = f.y;
|
|
1180
|
+
const g = s / 8 + o * 3 / 8 + l * 3 / 8 + u / 8, m = i / 8 + r * 3 / 8 + c * 3 / 8 + h / 8;
|
|
1181
|
+
this.P2.style.top = r + "px", this.P2.style.left = o + "px", (p = this.currentLink) == null || p.children[0].setAttribute("d", `M ${s} ${i} C ${o} ${r} ${l} ${c} ${u} ${h}`), b(this.currentLink.children[2], {
|
|
1182
|
+
x: g + "",
|
|
1183
|
+
y: m + ""
|
|
1184
|
+
}), b(this.line1, {
|
|
1185
|
+
x1: s + "",
|
|
1186
|
+
y1: i + "",
|
|
1187
|
+
x2: o + "",
|
|
1188
|
+
y2: r + ""
|
|
1189
|
+
}), e.delta1.x = o - t.cx, e.delta1.y = r - t.cy;
|
|
1190
|
+
}), this.helper2.init(this.map, (d, a) => {
|
|
1191
|
+
var v, x;
|
|
1192
|
+
l = l - d / this.scaleVal, c = c - a / this.scaleVal;
|
|
1193
|
+
const f = O({ ...n, ctrlX: l, ctrlY: c });
|
|
1194
|
+
u = f.x, h = f.y;
|
|
1195
|
+
const g = s / 8 + o * 3 / 8 + l * 3 / 8 + u / 8, m = i / 8 + r * 3 / 8 + c * 3 / 8 + h / 8, p = yt(l, c, u, h);
|
|
1196
|
+
this.P3.style.top = c + "px", this.P3.style.left = l + "px", (v = this.currentLink) == null || v.children[0].setAttribute("d", `M ${s} ${i} C ${o} ${r} ${l} ${c} ${u} ${h}`), (x = this.currentLink) == null || x.children[1].setAttribute("d", `M ${p.x1} ${p.y1} L ${u} ${h} L ${p.x2} ${p.y2}`), b(this.currentLink.children[2], {
|
|
1197
|
+
x: g + "",
|
|
1198
|
+
y: m + ""
|
|
1199
|
+
}), b(this.line2, {
|
|
1200
|
+
x1: l + "",
|
|
1201
|
+
y1: c + "",
|
|
1202
|
+
x2: u + "",
|
|
1203
|
+
y2: h + ""
|
|
1204
|
+
}), e.delta2.x = l - n.cx, e.delta2.y = c - n.cy;
|
|
1161
1205
|
});
|
|
1162
|
-
}
|
|
1206
|
+
};
|
|
1207
|
+
function qe() {
|
|
1208
|
+
this.linkSvgGroup.innerHTML = "";
|
|
1209
|
+
for (const e in this.linkData) {
|
|
1210
|
+
const t = this.linkData[e];
|
|
1211
|
+
this.drawCustomLink(C(t.from), C(t.to), t, !0);
|
|
1212
|
+
}
|
|
1213
|
+
this.nodes.appendChild(this.linkSvgGroup);
|
|
1214
|
+
}
|
|
1215
|
+
function Ve(e) {
|
|
1216
|
+
if (console.time("editSummary"), !e)
|
|
1217
|
+
return;
|
|
1218
|
+
const t = e.children[2];
|
|
1219
|
+
console.log(t, e), wt(this, t, (n) => {
|
|
1220
|
+
var o;
|
|
1221
|
+
const s = e.linkObj, i = ((o = n.textContent) == null ? void 0 : o.trim()) || "";
|
|
1222
|
+
i === "" ? s.label = origin : s.label = i, n.remove(), i !== origin && (t.innerHTML = s.label, this.linkDiv());
|
|
1223
|
+
}), console.timeEnd("editSummary");
|
|
1224
|
+
}
|
|
1225
|
+
const Re = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1163
1226
|
__proto__: null,
|
|
1164
|
-
createLink:
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1227
|
+
createLink: He,
|
|
1228
|
+
drawCustomLink: De,
|
|
1229
|
+
editCutsomLinkLabel: Ve,
|
|
1230
|
+
hideLinkController: Be,
|
|
1231
|
+
removeLink: Pe,
|
|
1232
|
+
renderCustomLink: qe,
|
|
1233
|
+
selectLink: ze,
|
|
1234
|
+
showLinkController: Oe
|
|
1235
|
+
}, Symbol.toStringTag, { value: "Module" })), je = function(e) {
|
|
1236
|
+
var c, u;
|
|
1171
1237
|
if (e.length === 0)
|
|
1172
1238
|
throw new Error("No selected node.");
|
|
1173
1239
|
if (e.length === 1) {
|
|
1174
|
-
const h = e[0].nodeObj,
|
|
1175
|
-
if (!
|
|
1240
|
+
const h = e[0].nodeObj, d = e[0].nodeObj.parent;
|
|
1241
|
+
if (!d)
|
|
1176
1242
|
throw new Error("Can not select root node.");
|
|
1177
|
-
const
|
|
1243
|
+
const a = d.children.findIndex((f) => h === f);
|
|
1178
1244
|
return {
|
|
1179
|
-
parent:
|
|
1180
|
-
start:
|
|
1181
|
-
end:
|
|
1245
|
+
parent: d.id,
|
|
1246
|
+
start: a,
|
|
1247
|
+
end: a
|
|
1182
1248
|
};
|
|
1183
1249
|
}
|
|
1184
1250
|
let t = 0;
|
|
1185
1251
|
const n = e.map((h) => {
|
|
1186
|
-
let
|
|
1187
|
-
const
|
|
1188
|
-
for (;
|
|
1189
|
-
const
|
|
1190
|
-
|
|
1252
|
+
let d = h.nodeObj;
|
|
1253
|
+
const a = [];
|
|
1254
|
+
for (; d.parent; ) {
|
|
1255
|
+
const f = d.parent, g = f.children, m = g == null ? void 0 : g.indexOf(d);
|
|
1256
|
+
d = f, a.unshift({ node: d, index: m });
|
|
1191
1257
|
}
|
|
1192
|
-
return
|
|
1258
|
+
return a.length > t && (t = a.length), a;
|
|
1193
1259
|
});
|
|
1194
|
-
let
|
|
1260
|
+
let s = 0;
|
|
1195
1261
|
t:
|
|
1196
|
-
for (;
|
|
1197
|
-
const h = (
|
|
1198
|
-
for (let
|
|
1199
|
-
if (((
|
|
1262
|
+
for (; s < t; s++) {
|
|
1263
|
+
const h = (c = n[0][s]) == null ? void 0 : c.node;
|
|
1264
|
+
for (let d = 1; d < n.length; d++)
|
|
1265
|
+
if (((u = n[d][s]) == null ? void 0 : u.node) !== h)
|
|
1200
1266
|
break t;
|
|
1201
1267
|
}
|
|
1202
|
-
if (!
|
|
1268
|
+
if (!s)
|
|
1203
1269
|
throw new Error("Can not select root node.");
|
|
1204
|
-
const
|
|
1205
|
-
if (
|
|
1270
|
+
const i = n.map((h) => h[s - 1].index).sort(), o = i[0] || 0, r = i[i.length - 1] || 0, l = n[0][s - 1].node;
|
|
1271
|
+
if (l.root)
|
|
1206
1272
|
throw new Error("Please select nodes in the same main topic.");
|
|
1207
1273
|
return {
|
|
1208
|
-
parent:
|
|
1274
|
+
parent: l.id,
|
|
1209
1275
|
start: o,
|
|
1210
|
-
end:
|
|
1276
|
+
end: r
|
|
1211
1277
|
};
|
|
1212
|
-
},
|
|
1278
|
+
}, We = function(e) {
|
|
1213
1279
|
const t = document.createElementNS("http://www.w3.org/2000/svg", "g");
|
|
1214
1280
|
return t.setAttribute("id", e), t;
|
|
1215
|
-
},
|
|
1281
|
+
}, ft = function(e, t) {
|
|
1216
1282
|
const n = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
1217
|
-
return
|
|
1283
|
+
return b(n, {
|
|
1218
1284
|
d: e,
|
|
1219
1285
|
stroke: t || "#666",
|
|
1220
1286
|
fill: "none",
|
|
1221
1287
|
"stroke-linecap": "round",
|
|
1222
1288
|
"stroke-width": "2"
|
|
1223
1289
|
}), n;
|
|
1224
|
-
},
|
|
1290
|
+
}, pt = function(e, t, n, s, i) {
|
|
1225
1291
|
const o = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
1226
|
-
return
|
|
1227
|
-
"text-anchor":
|
|
1292
|
+
return b(o, {
|
|
1293
|
+
"text-anchor": s,
|
|
1228
1294
|
x: t + "",
|
|
1229
1295
|
y: n + "",
|
|
1230
|
-
fill:
|
|
1296
|
+
fill: i || "#666"
|
|
1231
1297
|
}), o.innerHTML = e, o;
|
|
1232
|
-
},
|
|
1233
|
-
var o,
|
|
1234
|
-
const n =
|
|
1235
|
-
let
|
|
1236
|
-
return
|
|
1237
|
-
},
|
|
1238
|
-
var
|
|
1239
|
-
const { id: n, text:
|
|
1240
|
-
let
|
|
1241
|
-
for (let
|
|
1242
|
-
const
|
|
1243
|
-
if (!
|
|
1298
|
+
}, Xe = (e) => C(e).parentElement.parentElement, Ye = function({ parent: e, start: t }) {
|
|
1299
|
+
var o, r;
|
|
1300
|
+
const n = C(e), s = n.nodeObj;
|
|
1301
|
+
let i;
|
|
1302
|
+
return s.root === !0 ? i = (o = C(s.children[t].id).closest("me-main")) == null ? void 0 : o.className : i = (r = n.closest("me-main")) == null ? void 0 : r.className, i;
|
|
1303
|
+
}, kt = function(e, t) {
|
|
1304
|
+
var X;
|
|
1305
|
+
const { id: n, text: s, parent: i, start: o, end: r } = t, l = e.nodes, u = C(i).nodeObj, h = Ye(t);
|
|
1306
|
+
let d = 1 / 0, a = 0, f = 0, g = 0;
|
|
1307
|
+
for (let R = o; R <= r; R++) {
|
|
1308
|
+
const nt = (X = u.children) == null ? void 0 : X[R];
|
|
1309
|
+
if (!nt)
|
|
1244
1310
|
return console.warn("Child not found"), e.removeSummary(n), null;
|
|
1245
|
-
const
|
|
1246
|
-
|
|
1311
|
+
const Y = Xe(nt.id), { offsetLeft: F, offsetTop: st } = V(l, Y);
|
|
1312
|
+
R === o && (f = st), R === r && (g = st + Y.offsetHeight), F < d && (d = F), Y.offsetWidth + F > a && (a = Y.offsetWidth + F);
|
|
1247
1313
|
}
|
|
1248
1314
|
let m, p;
|
|
1249
|
-
const v =
|
|
1250
|
-
h === "lhs" ? (m =
|
|
1251
|
-
const
|
|
1252
|
-
return
|
|
1253
|
-
},
|
|
1315
|
+
const v = f + 10, x = g + 10, w = (v + x) / 2, _ = e.theme.cssVar["--color"];
|
|
1316
|
+
h === "lhs" ? (m = ft(`M ${d + 10} ${v} c -5 0 -10 5 -10 10 L ${d} ${x - 10} c 0 5 5 10 10 10 M ${d} ${w} h -10`, _), p = pt(s, d - 20, w + 6, "end", _)) : (m = ft(`M ${a - 10} ${v} c 5 0 10 5 10 10 L ${a} ${x - 10} c 0 5 -5 10 -10 10 M ${a} ${w} h 10`, _), p = pt(s, a + 20, w + 6, "start", _));
|
|
1317
|
+
const M = We("s-" + n);
|
|
1318
|
+
return M.appendChild(m), M.appendChild(p), M.summaryObj = t, e.summarySvg.appendChild(M), M;
|
|
1319
|
+
}, Fe = function() {
|
|
1254
1320
|
let e = [];
|
|
1255
1321
|
this.currentNode ? e = [this.currentNode] : this.currentNodes && (e = this.currentNodes);
|
|
1256
|
-
const { parent: t, start: n, end:
|
|
1257
|
-
this.summaries.push(
|
|
1258
|
-
},
|
|
1322
|
+
const { parent: t, start: n, end: s } = je(e), i = { id: et(), parent: t, start: n, end: s, text: "summary" }, o = kt(this, i);
|
|
1323
|
+
this.summaries.push(i), this.editSummary(o);
|
|
1324
|
+
}, Ie = function(e) {
|
|
1259
1325
|
var n;
|
|
1260
|
-
const t = this.summaries.findIndex((
|
|
1326
|
+
const t = this.summaries.findIndex((s) => s.id === e);
|
|
1261
1327
|
t > -1 && (this.summaries.splice(t, 1), (n = document.querySelector("#s-" + e)) == null || n.remove());
|
|
1262
|
-
},
|
|
1263
|
-
const t = e.children[1].getBBox(), n = 6,
|
|
1264
|
-
|
|
1328
|
+
}, Ge = function(e) {
|
|
1329
|
+
const t = e.children[1].getBBox(), n = 6, s = 3, i = document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
|
1330
|
+
b(i, {
|
|
1265
1331
|
x: t.x - n + "",
|
|
1266
1332
|
y: t.y - n + "",
|
|
1267
1333
|
width: t.width + n * 2 + "",
|
|
1268
1334
|
height: t.height + n * 2 + "",
|
|
1269
|
-
rx:
|
|
1335
|
+
rx: s + "",
|
|
1270
1336
|
stroke: this.theme.cssVar["--selected"] || "#4dc4ff",
|
|
1271
1337
|
"stroke-width": "2",
|
|
1272
1338
|
fill: "none"
|
|
1273
|
-
}),
|
|
1274
|
-
},
|
|
1339
|
+
}), i.classList.add("selected"), e.appendChild(i), this.currentSummary = e;
|
|
1340
|
+
}, Ke = function() {
|
|
1275
1341
|
var e, t;
|
|
1276
1342
|
(t = (e = this.currentSummary) == null ? void 0 : e.querySelector("rect")) == null || t.remove(), this.currentSummary = null;
|
|
1277
|
-
},
|
|
1343
|
+
}, Ue = function() {
|
|
1278
1344
|
this.summarySvg.innerHTML = "", this.summaries.forEach((e) => {
|
|
1279
|
-
|
|
1345
|
+
kt(this, e);
|
|
1280
1346
|
}), this.nodes.insertAdjacentElement("beforeend", this.summarySvg);
|
|
1281
|
-
},
|
|
1347
|
+
}, Je = function(e) {
|
|
1282
1348
|
if (console.time("editSummary"), !e)
|
|
1283
1349
|
return;
|
|
1284
|
-
const t = e.childNodes[1]
|
|
1285
|
-
this
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
n.style.cssText = `min-width:${100 - 8}px;position:absolute;left:${s};top:${o};`, Lt(e.summaryObj) === "lhs" ? n.style.cssText += "transform: translate(-100%, -100%);" : n.style.cssText += "transform: translate(0, -100%);", n.focus(), bt(n), n.addEventListener("keydown", (l) => {
|
|
1290
|
-
l.stopPropagation();
|
|
1291
|
-
const r = l.key;
|
|
1292
|
-
if (r === "Enter" || r === "Tab") {
|
|
1293
|
-
if (l.shiftKey)
|
|
1294
|
-
return;
|
|
1295
|
-
l.preventDefault(), n.blur(), this.map.focus();
|
|
1296
|
-
}
|
|
1297
|
-
}), n.addEventListener("blur", () => {
|
|
1298
|
-
var d;
|
|
1299
|
-
if (!n)
|
|
1300
|
-
return;
|
|
1301
|
-
const l = e.summaryObj, r = ((d = n.textContent) == null ? void 0 : d.trim()) || "";
|
|
1302
|
-
r === "" ? l.text = i : l.text = r, n.remove(), r !== i && (t.innerHTML = l.text, this.linkDiv(), this.bus.fire("operation", {
|
|
1350
|
+
const t = e.childNodes[1];
|
|
1351
|
+
wt(this, t, (n) => {
|
|
1352
|
+
var o;
|
|
1353
|
+
const s = e.summaryObj, i = ((o = n.textContent) == null ? void 0 : o.trim()) || "";
|
|
1354
|
+
i === "" ? s.text = origin : s.text = i, n.remove(), i !== origin && (t.innerHTML = s.text, this.linkDiv(), this.bus.fire("operation", {
|
|
1303
1355
|
name: "finishEditSummary",
|
|
1304
|
-
obj:
|
|
1305
|
-
origin
|
|
1356
|
+
obj: s,
|
|
1357
|
+
origin
|
|
1306
1358
|
}));
|
|
1307
1359
|
}), console.timeEnd("editSummary");
|
|
1308
|
-
},
|
|
1360
|
+
}, Qe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1361
|
+
__proto__: null,
|
|
1362
|
+
createSummary: Fe,
|
|
1363
|
+
editSummary: Je,
|
|
1364
|
+
removeSummary: Ie,
|
|
1365
|
+
renderSummary: Ue,
|
|
1366
|
+
selectSummary: Ge,
|
|
1367
|
+
unselectSummary: Ke
|
|
1368
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
1369
|
+
function Ze(e, t) {
|
|
1370
|
+
const n = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
1371
|
+
return b(n, {
|
|
1372
|
+
version: "1.1",
|
|
1373
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1374
|
+
height: e,
|
|
1375
|
+
width: t
|
|
1376
|
+
}), n;
|
|
1377
|
+
}
|
|
1378
|
+
function tn(e, t) {
|
|
1379
|
+
return (parseInt(e) - parseInt(t)) / 2;
|
|
1380
|
+
}
|
|
1381
|
+
function en(e, t, n, s) {
|
|
1382
|
+
const i = document.createElementNS("http://www.w3.org/2000/svg", "g");
|
|
1383
|
+
return e.childNodes[0].textContent.split(`
|
|
1384
|
+
`).forEach((l, c) => {
|
|
1385
|
+
const u = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
1386
|
+
b(u, {
|
|
1387
|
+
x: n + parseInt(t.paddingLeft) + "",
|
|
1388
|
+
y: s + parseInt(t.paddingTop) + tn(t.lineHeight, t.fontSize) * (c + 1) + parseFloat(t.fontSize) * (c + 1) + "",
|
|
1389
|
+
"text-anchor": "start",
|
|
1390
|
+
"font-family": t.fontFamily,
|
|
1391
|
+
"font-size": `${t.fontSize}`,
|
|
1392
|
+
"font-weight": `${t.fontWeight}`,
|
|
1393
|
+
fill: `${t.color}`
|
|
1394
|
+
}), u.innerHTML = l, i.appendChild(u);
|
|
1395
|
+
}), i;
|
|
1396
|
+
}
|
|
1397
|
+
function nn(e, t, n, s) {
|
|
1398
|
+
const i = e.childNodes[0].textContent, o = document.createElementNS("http://www.w3.org/2000/svg", "foreignObject");
|
|
1399
|
+
b(o, {
|
|
1400
|
+
x: n + parseInt(t.paddingLeft) + "",
|
|
1401
|
+
y: s + parseInt(t.paddingTop) + "",
|
|
1402
|
+
width: t.width,
|
|
1403
|
+
height: t.height
|
|
1404
|
+
});
|
|
1405
|
+
const r = document.createElement("div");
|
|
1406
|
+
return b(r, {
|
|
1407
|
+
xmlns: "http://www.w3.org/1999/xhtml",
|
|
1408
|
+
style: `font-family: ${t.fontFamily}; font-size: ${t.fontSize}; font-weight: ${t.fontWeight}; color: ${t.color}; white-space: pre-wrap;`
|
|
1409
|
+
}), r.innerHTML = i, o.appendChild(r), o;
|
|
1410
|
+
}
|
|
1411
|
+
function Q(e, t, n = !1) {
|
|
1412
|
+
const s = getComputedStyle(t), { offsetLeft: i, offsetTop: o } = V(e.nodes, t), r = document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
|
1413
|
+
b(r, {
|
|
1414
|
+
x: i + "",
|
|
1415
|
+
y: o + "",
|
|
1416
|
+
rx: s.borderRadius,
|
|
1417
|
+
ry: s.borderRadius,
|
|
1418
|
+
width: s.width,
|
|
1419
|
+
height: s.height,
|
|
1420
|
+
fill: s.backgroundColor,
|
|
1421
|
+
stroke: s.borderColor,
|
|
1422
|
+
"stroke-width": s.borderWidth
|
|
1423
|
+
});
|
|
1424
|
+
const l = document.createElementNS("http://www.w3.org/2000/svg", "g");
|
|
1425
|
+
l.appendChild(r);
|
|
1426
|
+
let c;
|
|
1427
|
+
return n ? c = nn(t, s, i, o) : c = en(t, s, i, o), l.appendChild(c), l;
|
|
1428
|
+
}
|
|
1429
|
+
function sn(e, t) {
|
|
1430
|
+
const n = getComputedStyle(t), { offsetLeft: s, offsetTop: i } = V(e.nodes, t), o = document.createElementNS("http://www.w3.org/2000/svg", "a"), r = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
1431
|
+
return b(r, {
|
|
1432
|
+
x: s + "",
|
|
1433
|
+
y: i + parseInt(n.fontSize) + "",
|
|
1434
|
+
"text-anchor": "start",
|
|
1435
|
+
"font-family": n.fontFamily,
|
|
1436
|
+
"font-size": `${n.fontSize}`,
|
|
1437
|
+
"font-weight": `${n.fontWeight}`,
|
|
1438
|
+
fill: `${n.color}`
|
|
1439
|
+
}), r.innerHTML = t.textContent, o.appendChild(r), o.setAttribute("href", t.href), o;
|
|
1440
|
+
}
|
|
1441
|
+
const G = 100, on = '<?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">', $t = (e) => {
|
|
1442
|
+
var h, d, a;
|
|
1443
|
+
const t = e.nodes, n = t.offsetHeight + G * 2, s = t.offsetWidth + G * 2, i = Ze(n + "px", s + "px"), o = document.createElementNS("http://www.w3.org/2000/svg", "svg"), r = document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
|
1444
|
+
b(r, {
|
|
1445
|
+
x: "0",
|
|
1446
|
+
y: "0",
|
|
1447
|
+
width: `${s}`,
|
|
1448
|
+
height: `${n}`,
|
|
1449
|
+
fill: e.theme.cssVar["--bgcolor"]
|
|
1450
|
+
}), i.appendChild(r), t.querySelectorAll(".subLines").forEach((f) => {
|
|
1451
|
+
const g = f.cloneNode(!0), { offsetLeft: m, offsetTop: p } = V(t, f.parentElement);
|
|
1452
|
+
g.setAttribute("x", `${m}`), g.setAttribute("y", `${p}`), o.appendChild(g);
|
|
1453
|
+
});
|
|
1454
|
+
const l = (h = t.querySelector(".lines")) == null ? void 0 : h.cloneNode(!0);
|
|
1455
|
+
l && o.appendChild(l);
|
|
1456
|
+
const c = (d = t.querySelector(".topiclinks")) == null ? void 0 : d.cloneNode(!0);
|
|
1457
|
+
c && o.appendChild(c);
|
|
1458
|
+
const u = (a = t.querySelector(".summary")) == null ? void 0 : a.cloneNode(!0);
|
|
1459
|
+
return u && o.appendChild(u), t.querySelectorAll("me-tpc").forEach((f) => {
|
|
1460
|
+
o.appendChild(Q(e, f, !0));
|
|
1461
|
+
}), t.querySelectorAll(".tags > span").forEach((f) => {
|
|
1462
|
+
o.appendChild(Q(e, f));
|
|
1463
|
+
}), t.querySelectorAll(".icons > span").forEach((f) => {
|
|
1464
|
+
o.appendChild(Q(e, f));
|
|
1465
|
+
}), t.querySelectorAll(".hyper-link").forEach((f) => {
|
|
1466
|
+
o.appendChild(sn(e, f));
|
|
1467
|
+
}), b(o, {
|
|
1468
|
+
x: G + "",
|
|
1469
|
+
y: G + "",
|
|
1470
|
+
overflow: "visible"
|
|
1471
|
+
}), i.appendChild(o), on + i.outerHTML;
|
|
1472
|
+
};
|
|
1473
|
+
function rn(e) {
|
|
1474
|
+
return new Promise((t, n) => {
|
|
1475
|
+
const s = new FileReader();
|
|
1476
|
+
s.onload = (i) => {
|
|
1477
|
+
t(i.target.result);
|
|
1478
|
+
}, s.onerror = (i) => {
|
|
1479
|
+
n(i);
|
|
1480
|
+
}, s.readAsDataURL(e);
|
|
1481
|
+
});
|
|
1482
|
+
}
|
|
1483
|
+
const ln = function() {
|
|
1484
|
+
const e = $t(this);
|
|
1485
|
+
return new Blob([e], { type: "image/svg+xml" });
|
|
1486
|
+
}, cn = async function() {
|
|
1487
|
+
const e = $t(this), t = new Blob([e], { type: "image/svg+xml" }), n = await rn(t);
|
|
1488
|
+
return new Promise((s, i) => {
|
|
1489
|
+
const o = new Image();
|
|
1490
|
+
o.setAttribute("crossOrigin", "anonymous"), o.onload = () => {
|
|
1491
|
+
const r = document.createElement("canvas");
|
|
1492
|
+
r.width = o.width, r.height = o.height, r.getContext("2d").drawImage(o, 0, 0), r.toBlob(s, "image/png", 1);
|
|
1493
|
+
}, o.src = n, o.onerror = i;
|
|
1494
|
+
});
|
|
1495
|
+
}, an = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1309
1496
|
__proto__: null,
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
getObjById: pt,
|
|
1318
|
-
generateNewObj: Mt,
|
|
1319
|
-
layout: Nt,
|
|
1320
|
-
linkDiv: qt,
|
|
1497
|
+
exportPng: cn,
|
|
1498
|
+
exportSvg: ln
|
|
1499
|
+
}, Symbol.toStringTag, { value: "Module" })), hn = {}, dn = {
|
|
1500
|
+
getObjById: vt,
|
|
1501
|
+
generateNewObj: Tt,
|
|
1502
|
+
layout: Dt,
|
|
1503
|
+
linkDiv: Yt,
|
|
1321
1504
|
editTopic: Vt,
|
|
1322
|
-
createWrapper:
|
|
1323
|
-
createParent:
|
|
1324
|
-
createChildren:
|
|
1325
|
-
createTopic:
|
|
1326
|
-
findEle:
|
|
1327
|
-
changeTheme:
|
|
1328
|
-
...
|
|
1329
|
-
...
|
|
1330
|
-
...
|
|
1331
|
-
...
|
|
1505
|
+
createWrapper: zt,
|
|
1506
|
+
createParent: Bt,
|
|
1507
|
+
createChildren: Ot,
|
|
1508
|
+
createTopic: qt,
|
|
1509
|
+
findEle: C,
|
|
1510
|
+
changeTheme: oe,
|
|
1511
|
+
...Te,
|
|
1512
|
+
...hn,
|
|
1513
|
+
...Re,
|
|
1514
|
+
...Qe,
|
|
1515
|
+
...an,
|
|
1332
1516
|
init(e) {
|
|
1333
1517
|
if (!e || !e.nodeData)
|
|
1334
1518
|
return new Error("MindElixir: `data` is required");
|
|
1335
|
-
e.direction !== void 0 && (this.direction = e.direction), this.changeTheme(e.theme || this.theme, !1), this.nodeData = e.nodeData,
|
|
1519
|
+
e.direction !== void 0 && (this.direction = e.direction), this.changeTheme(e.theme || this.theme, !1), this.nodeData = e.nodeData, tt(this.nodeData), this.linkData = e.linkData || {}, this.summaries = e.summaries || [], this.toolBar && Jt(this), ie(this), this.toCenter(), this.layout(), this.linkDiv();
|
|
1336
1520
|
}
|
|
1337
|
-
},
|
|
1338
|
-
function
|
|
1521
|
+
}, j = document;
|
|
1522
|
+
function k({
|
|
1339
1523
|
el: e,
|
|
1340
1524
|
direction: t,
|
|
1341
1525
|
locale: n,
|
|
1342
|
-
draggable:
|
|
1343
|
-
editable:
|
|
1526
|
+
draggable: s,
|
|
1527
|
+
editable: i,
|
|
1344
1528
|
contextMenu: o,
|
|
1345
|
-
contextMenuOption:
|
|
1346
|
-
toolBar:
|
|
1347
|
-
keypress:
|
|
1348
|
-
before:
|
|
1529
|
+
contextMenuOption: r,
|
|
1530
|
+
toolBar: l,
|
|
1531
|
+
keypress: c,
|
|
1532
|
+
before: u,
|
|
1349
1533
|
newTopicName: h,
|
|
1350
|
-
allowUndo:
|
|
1351
|
-
mainLinkStyle:
|
|
1352
|
-
subLinkStyle:
|
|
1534
|
+
allowUndo: d,
|
|
1535
|
+
mainLinkStyle: a,
|
|
1536
|
+
subLinkStyle: f,
|
|
1353
1537
|
overflowHidden: g,
|
|
1354
1538
|
mobileMenu: m,
|
|
1355
1539
|
theme: p
|
|
1356
1540
|
}) {
|
|
1357
|
-
console.log("ME_version " +
|
|
1541
|
+
console.log("ME_version " + k.version, this);
|
|
1358
1542
|
let v = null;
|
|
1359
|
-
const
|
|
1360
|
-
if (
|
|
1543
|
+
const x = Object.prototype.toString.call(e);
|
|
1544
|
+
if (x === "[object HTMLDivElement]" ? v = e : x === "[object String]" && (v = document.querySelector(e)), !v)
|
|
1361
1545
|
throw new Error("MindElixir: el is not a valid element");
|
|
1362
|
-
v.className += " mind-elixir", v.innerHTML = "", v.style.setProperty("--gap",
|
|
1363
|
-
const
|
|
1364
|
-
this.theme = p || (
|
|
1365
|
-
const _ =
|
|
1366
|
-
_.className = "map-canvas", this.map = _, this.map.setAttribute("tabindex", "0"), this.container.appendChild(this.map), this.mindElixirBox.appendChild(this.container), this.nodes =
|
|
1546
|
+
v.className += " mind-elixir", v.innerHTML = "", v.style.setProperty("--gap", S + "px"), this.mindElixirBox = v, this.before = u || {}, this.locale = n || "en", this.contextMenuOption = r, this.contextMenu = o === void 0 ? !0 : o, this.toolBar = l === void 0 ? !0 : l, this.keypress = c === void 0 ? !0 : c, this.mobileMenu = m || !1, this.direction = typeof t == "number" ? t : 1, this.draggable = s === void 0 ? !0 : s, this.newTopicName = h || "new node", this.editable = i === void 0 ? !0 : i, this.allowUndo = d === void 0 ? !1 : d, this.currentNode = null, this.currentLink = null, this.scaleVal = 1, this.tempDirection = null, this.mainLinkStyle = a || 0, this.subLinkStyle = f || 0, this.overflowHidden = g || !1, this.bus = At.create(), this.container = j.createElement("div"), this.container.className = "map-container";
|
|
1547
|
+
const w = window.matchMedia("(prefers-color-scheme: dark)");
|
|
1548
|
+
this.theme = p || (w.matches ? gt : mt);
|
|
1549
|
+
const _ = j.createElement("div");
|
|
1550
|
+
_.className = "map-canvas", this.map = _, this.map.setAttribute("tabindex", "0"), this.container.appendChild(this.map), this.mindElixirBox.appendChild(this.container), this.nodes = j.createElement("me-nodes"), this.nodes.className = "main-node-container", this.lines = W("lines"), this.summarySvg = W("summary"), this.linkController = W("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 = rt(), this.line2 = rt(), this.linkController.appendChild(this.line1), this.linkController.appendChild(this.line2), this.linkSvgGroup = W("topiclinks"), this.map.appendChild(this.nodes), this.overflowHidden ? this.container.style.overflow = "hidden" : Nt(this);
|
|
1367
1551
|
}
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1552
|
+
k.prototype = dn;
|
|
1553
|
+
k.LEFT = q;
|
|
1554
|
+
k.RIGHT = Z;
|
|
1555
|
+
k.SIDE = J;
|
|
1556
|
+
k.THEME = mt;
|
|
1557
|
+
k.DARK_THEME = gt;
|
|
1558
|
+
k.version = "3.2.0";
|
|
1559
|
+
k.E = C;
|
|
1376
1560
|
export {
|
|
1377
|
-
|
|
1561
|
+
k as default
|
|
1378
1562
|
};
|