mind-elixir 4.3.3 → 4.3.4
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 +13 -6
- package/dist/MindElixir.js +522 -513
- package/dist/MindElixirLite.iife.js +13 -6
- package/dist/MindElixirLite.js +415 -846
- package/package.json +1 -1
package/dist/MindElixir.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;--root-border-color: rgba(0, 0, 0, 0);--main-color: #444446;--main-bgcolor: #ffffff;--topic-padding: 3px;--color: #777777;--bgcolor: #f6f6f6;--selected: #4dc4ff;--panel-color: #444446;--panel-bgcolor: #ffffff;--panel-border-color: #eaeaea;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;margin-left:.3em}.map-container{-webkit-user-select:none;user-select:none;height:100%;width:100%;overflow:scroll;font-size:15px}.map-container *{box-sizing:border-box}.map-container::-webkit-scrollbar{width:0px;height:0px}.map-container .selected{outline:2px solid var(--selected);outline-offset:1px}.map-container .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);border:var(--root-border-color) 2px solid;white-space:pre-wrap;background-color:var(--root-bgcolor)}.map-container me-main>me-wrapper{position:relative;margin:45px 65px}.map-container me-main>me-wrapper>me-parent{margin:10px;padding:0}.map-container me-main>me-wrapper>me-parent>me-tpc{border-radius:var(--main-radius);background-color:var(--main-bgcolor);border:2px solid var(--main-color);color:var(--main-color);padding:8px 25px}.map-container me-wrapper{display:block;pointer-events:none;width:fit-content}.map-container me-children,.map-container me-parent{display:inline-block;vertical-align:middle}.map-container me-parent{position:relative;cursor:pointer;padding:6px var(--gap);margin-top:10px}.map-container me-parent me-tpc{position:relative;display:block;border-radius:3px;color:var(--color);pointer-events:all;max-width:35em;white-space:pre-wrap;padding:var(--topic-padding)}.map-container me-parent me-tpc .insert-preview{position:absolute;width:100%;left:0;z-index:9}.map-container me-parent me-tpc .show{background:#7ad5ff;pointer-events:none;opacity:.7}.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;width:max-content;max-width:35em;z-index:11;direction:ltr;-webkit-user-select:auto;user-select:auto;pointer-events:auto;background-color:var(--bgcolor)}.map-container me-tpc>*{pointer-events:none}.map-container me-tpc>a{pointer-events:auto}.map-container me-tpc>img{display:block;margin-bottom:8px;object-fit:cover}.map-container me-tpc>.text{display:inline-block}.map-container .circle{position:absolute;height:10px;width:10px;margin-top:-5px;margin-left:-5px;border-radius:100%;background:#757575;border:2px solid #ffffff;cursor:pointer}.map-container .tags{direction:ltr}.map-container .tags span{display:inline-block;border-radius:3px;padding:2px 4px;background:#d6f0f8;color:#276f86;margin:2px 4px 0 0;font-size:12px;line-height:1.3em}.map-container .icons{display:inline-block;direction:ltr;margin-
|
|
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;--root-border-color: rgba(0, 0, 0, 0);--main-color: #444446;--main-bgcolor: #ffffff;--topic-padding: 3px;--color: #777777;--bgcolor: #f6f6f6;--selected: #4dc4ff;--panel-color: #444446;--panel-bgcolor: #ffffff;--panel-border-color: #eaeaea;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;margin-left:.3em}.map-container{-webkit-user-select:none;user-select:none;height:100%;width:100%;overflow:scroll;font-size:15px}.map-container *{box-sizing:border-box}.map-container::-webkit-scrollbar{width:0px;height:0px}.map-container .selected{outline:2px solid var(--selected);outline-offset:1px}.map-container .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);border:var(--root-border-color) 2px solid;white-space:pre-wrap;background-color:var(--root-bgcolor)}.map-container me-main>me-wrapper{position:relative;margin:45px 65px}.map-container me-main>me-wrapper>me-parent{margin:10px;padding:0}.map-container me-main>me-wrapper>me-parent>me-tpc{border-radius:var(--main-radius);background-color:var(--main-bgcolor);border:2px solid var(--main-color);color:var(--main-color);padding:8px 25px}.map-container me-wrapper{display:block;pointer-events:none;width:fit-content}.map-container me-children,.map-container me-parent{display:inline-block;vertical-align:middle}.map-container me-parent{position:relative;cursor:pointer;padding:6px var(--gap);margin-top:10px}.map-container me-parent me-tpc{position:relative;display:block;border-radius:3px;color:var(--color);pointer-events:all;max-width:35em;white-space:pre-wrap;padding:var(--topic-padding)}.map-container me-parent me-tpc .insert-preview{position:absolute;width:100%;left:0;z-index:9}.map-container me-parent me-tpc .show{background:#7ad5ff;pointer-events:none;opacity:.7}.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;width:max-content;max-width:35em;z-index:11;direction:ltr;-webkit-user-select:auto;user-select:auto;pointer-events:auto;background-color:var(--bgcolor)}.map-container me-tpc>*{pointer-events:none}.map-container me-tpc>a{pointer-events:auto}.map-container me-tpc>img{display:block;margin-bottom:8px;object-fit:cover}.map-container me-tpc>.text{display:inline-block}.map-container .circle{position:absolute;height:10px;width:10px;margin-top:-5px;margin-left:-5px;border-radius:100%;background:#757575;border:2px solid #ffffff;cursor:pointer}.map-container .tags{direction:ltr}.map-container .tags span{display:inline-block;border-radius:3px;padding:2px 4px;background:#d6f0f8;color:#276f86;margin:2px 4px 0 0;font-size:12px;line-height:1.3em}.map-container .icons{display:inline-block;direction:ltr;margin-left:5px}.map-container .icons span{display:inline-block;line-height:1.3em}.map-container .mind-elixir-ghost{position:fixed;top:-100%;left:-100%;box-sizing:content-box;opacity:.5;background-color:#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}.map-container .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;color:var(--panel-color);box-shadow:0 12px 15px #0003;border-radius:5px;overflow:hidden}.mind-elixir .context-menu .menu-list li{min-width:200px;overflow:hidden;white-space:nowrap;padding:6px 10px;background:var(--panel-bgcolor);border-bottom:1px solid var(--panel-border-color);cursor:pointer}.mind-elixir .context-menu .menu-list li span{line-height:20px}.mind-elixir .context-menu .menu-list li a{color:#333;text-decoration:none}.mind-elixir .context-menu .menu-list li.disabled{display:none}.mind-elixir .context-menu .menu-list li:hover{filter:brightness(.95)}.mind-elixir .context-menu .menu-list li:last-child{border-bottom:0}.mind-elixir .context-menu .menu-list li span:last-child{float:right}.mind-elixir .context-menu .key{font-size:10px;background-color:#f1f1f1;color:#333;padding:2px 5px;border-radius:3px}.mind-elixir .tips{position:absolute;bottom:20px;left:50%;transform:translate(-50%);color:var(--panel-color);font-weight:bolder}.mind-elixir-toolbar{font-family:iconfont;position:absolute;color:var(--panel-color);background:var(--panel-bgcolor);padding:10px;border-radius:5px;box-shadow:0 1px 2px #0003}.mind-elixir-toolbar svg{display:inline-block}.mind-elixir-toolbar span:active{opacity:.5}.mind-elixir-toolbar.rb{right:20px;bottom:20px}.mind-elixir-toolbar.rb span+span{margin-left:10px}.mind-elixir-toolbar.lt{font-size:20px;left:20px;top:20px}.mind-elixir-toolbar.lt span{display:block}.mind-elixir-toolbar.lt span+span{margin-top:10px}")),document.head.appendChild(e)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();
|
|
2
2
|
(function(e) {
|
|
3
|
-
var t, n, o, s, i, r, c = '<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>', l = (l = document.getElementsByTagName("script"))[l.length - 1].getAttribute("data-injectcss");
|
|
4
|
-
if (
|
|
3
|
+
var t, n, o, s, i, 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(
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
}
|
|
16
16
|
t = function() {
|
|
17
17
|
var d, a, f, g;
|
|
18
|
-
(g = document.createElement("div")).innerHTML =
|
|
18
|
+
(g = document.createElement("div")).innerHTML = l, l = null, (f = g.getElementsByTagName("svg")[0]) && (f.setAttribute("aria-hidden", "true"), f.style.position = "absolute", f.style.width = 0, f.style.height = 0, f.style.overflow = "hidden", d = f, (a = document.body).firstChild ? (g = d, (f = a.firstChild).parentNode.insertBefore(g, f)) : a.appendChild(d));
|
|
19
19
|
}, document.addEventListener ? ~["complete", "loaded", "interactive"].indexOf(document.readyState) ? setTimeout(t, 0) : (n = function() {
|
|
20
20
|
document.removeEventListener("DOMContentLoaded", n, !1), t();
|
|
21
21
|
}, document.addEventListener("DOMContentLoaded", n, !1)) : document.attachEvent && (o = t, s = e.document, i = !1, (r = function() {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
s.readyState == "complete" && (s.onreadystatechange = null, u());
|
|
30
30
|
});
|
|
31
31
|
})(window);
|
|
32
|
-
const
|
|
32
|
+
const M = 0, D = 1, ie = 2, Oe = {
|
|
33
33
|
name: "Latte",
|
|
34
34
|
type: "light",
|
|
35
35
|
palette: ["#dd7878", "#ea76cb", "#8839ef", "#e64553", "#fe640b", "#df8e1d", "#40a02b", "#209fb5", "#1e66f5", "#7287fd"],
|
|
@@ -43,7 +43,7 @@ const k = 0, D = 1, re = 2, $e = {
|
|
|
43
43
|
"--panel-bgcolor": "#ffffff",
|
|
44
44
|
"--panel-border-color": "#eaeaea"
|
|
45
45
|
}
|
|
46
|
-
},
|
|
46
|
+
}, Pe = {
|
|
47
47
|
name: "Dark",
|
|
48
48
|
type: "dark",
|
|
49
49
|
palette: ["#848FA0", "#748BE9", "#D2F9FE", "#4145A5", "#789AFA", "#706CF4", "#EF987F", "#775DD5", "#FCEECF", "#DA7FBC"],
|
|
@@ -57,15 +57,15 @@ const k = 0, D = 1, re = 2, $e = {
|
|
|
57
57
|
"--panel-border-color": "#696969"
|
|
58
58
|
}
|
|
59
59
|
};
|
|
60
|
-
function
|
|
60
|
+
function te(e) {
|
|
61
61
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/"/g, """);
|
|
62
62
|
}
|
|
63
|
-
const
|
|
63
|
+
const ne = function(e, t) {
|
|
64
64
|
if (t.id === e)
|
|
65
65
|
return t;
|
|
66
66
|
if (t.children && t.children.length) {
|
|
67
67
|
for (let n = 0; n < t.children.length; n++) {
|
|
68
|
-
const o =
|
|
68
|
+
const o = ne(e, t.children[n]);
|
|
69
69
|
if (o)
|
|
70
70
|
return o;
|
|
71
71
|
}
|
|
@@ -77,40 +77,40 @@ const oe = function(e, t) {
|
|
|
77
77
|
for (let n = 0; n < e.children.length; n++)
|
|
78
78
|
$(e.children[n], e);
|
|
79
79
|
};
|
|
80
|
-
function
|
|
81
|
-
if (e.id =
|
|
80
|
+
function de(e) {
|
|
81
|
+
if (e.id = Y(), e.children)
|
|
82
82
|
for (let t = 0; t < e.children.length; t++)
|
|
83
|
-
|
|
83
|
+
de(e.children[t]);
|
|
84
84
|
}
|
|
85
|
-
const
|
|
85
|
+
const nt = (e, t) => {
|
|
86
86
|
let n = Date.now();
|
|
87
87
|
return function(...o) {
|
|
88
88
|
Date.now() - n < t || (e(...o), n = Date.now());
|
|
89
89
|
};
|
|
90
90
|
};
|
|
91
|
-
function
|
|
91
|
+
function Be(e, t, n, o) {
|
|
92
92
|
const s = o - t, i = e - n;
|
|
93
93
|
let r = Math.atan(Math.abs(s) / Math.abs(i)) / 3.14 * 180;
|
|
94
94
|
i < 0 && s > 0 && (r = 180 - r), i < 0 && s < 0 && (r = 180 + r), i > 0 && s < 0 && (r = 360 - r);
|
|
95
|
-
const
|
|
95
|
+
const l = 15, c = 30, u = r + c, d = r - c;
|
|
96
96
|
return {
|
|
97
|
-
x1: n + Math.cos(Math.PI * u / 180) *
|
|
98
|
-
y1: o - Math.sin(Math.PI * u / 180) *
|
|
99
|
-
x2: n + Math.cos(Math.PI * d / 180) *
|
|
100
|
-
y2: o - Math.sin(Math.PI * d / 180) *
|
|
97
|
+
x1: n + Math.cos(Math.PI * u / 180) * l,
|
|
98
|
+
y1: o - Math.sin(Math.PI * u / 180) * l,
|
|
99
|
+
x2: n + Math.cos(Math.PI * d / 180) * l,
|
|
100
|
+
y2: o - Math.sin(Math.PI * d / 180) * l
|
|
101
101
|
};
|
|
102
102
|
}
|
|
103
|
-
function
|
|
103
|
+
function Y() {
|
|
104
104
|
return ((/* @__PURE__ */ new Date()).getTime().toString(16) + Math.random().toString(16).substr(2)).substr(2, 16);
|
|
105
105
|
}
|
|
106
|
-
const
|
|
107
|
-
const e =
|
|
106
|
+
const ot = function() {
|
|
107
|
+
const e = Y();
|
|
108
108
|
return {
|
|
109
109
|
topic: this.newTopicName,
|
|
110
110
|
id: e
|
|
111
111
|
};
|
|
112
112
|
};
|
|
113
|
-
function
|
|
113
|
+
function he(e) {
|
|
114
114
|
return JSON.parse(
|
|
115
115
|
JSON.stringify(e, (n, o) => {
|
|
116
116
|
if (n !== "parent")
|
|
@@ -123,10 +123,10 @@ const O = (e, t) => {
|
|
|
123
123
|
for (; t && t !== e; )
|
|
124
124
|
n += t.offsetLeft, o += t.offsetTop, t = t.offsetParent;
|
|
125
125
|
return { offsetLeft: n, offsetTop: o };
|
|
126
|
-
},
|
|
126
|
+
}, E = (e, t) => {
|
|
127
127
|
for (const n in t)
|
|
128
128
|
e.setAttribute(n, t[n]);
|
|
129
|
-
}, le = (e) => e ? e.tagName === "ME-TPC" : !1,
|
|
129
|
+
}, le = (e) => e ? e.tagName === "ME-TPC" : !1, re = (e) => e.filter((t) => {
|
|
130
130
|
for (let n = 0; n < e.length; n++) {
|
|
131
131
|
if (t === e[n])
|
|
132
132
|
continue;
|
|
@@ -134,7 +134,7 @@ const O = (e, t) => {
|
|
|
134
134
|
return !1;
|
|
135
135
|
}
|
|
136
136
|
return !0;
|
|
137
|
-
}),
|
|
137
|
+
}), L = {
|
|
138
138
|
moved: !1,
|
|
139
139
|
// diffrentiate click and move
|
|
140
140
|
mousedown: !1,
|
|
@@ -149,7 +149,7 @@ const O = (e, t) => {
|
|
|
149
149
|
this.moved = !1, this.mousedown = !1;
|
|
150
150
|
}
|
|
151
151
|
};
|
|
152
|
-
function
|
|
152
|
+
function st(e) {
|
|
153
153
|
e.map.addEventListener("click", (t) => {
|
|
154
154
|
var o, s;
|
|
155
155
|
if (t.button !== 0)
|
|
@@ -162,8 +162,8 @@ function ot(e) {
|
|
|
162
162
|
e.helper2.clear();
|
|
163
163
|
return;
|
|
164
164
|
}
|
|
165
|
-
if (
|
|
166
|
-
|
|
165
|
+
if (L.moved) {
|
|
166
|
+
L.clear();
|
|
167
167
|
return;
|
|
168
168
|
}
|
|
169
169
|
e.clearSelection();
|
|
@@ -182,19 +182,19 @@ function ot(e) {
|
|
|
182
182
|
const n = t.target;
|
|
183
183
|
le(n) ? e.beginEdit(n) : n.tagName === "text" && (n.dataset.type === "custom-link" ? e.editArrowLabel(n.parentElement) : e.editSummary(n.parentElement));
|
|
184
184
|
}), e.map.addEventListener("mousemove", (t) => {
|
|
185
|
-
t.target.contentEditable !== "true" &&
|
|
185
|
+
t.target.contentEditable !== "true" && L.onMove(t, e.container);
|
|
186
186
|
}), e.map.addEventListener("mousedown", (t) => {
|
|
187
187
|
const n = e.mouseSelectionButton === 0 ? 2 : 0;
|
|
188
|
-
t.button === n && t.target.contentEditable !== "true" && (
|
|
188
|
+
t.button === n && t.target.contentEditable !== "true" && (L.moved = !1, L.mousedown = !0);
|
|
189
189
|
}), e.map.addEventListener("mouseleave", (t) => {
|
|
190
190
|
const n = e.mouseSelectionButton === 0 ? 2 : 0;
|
|
191
|
-
t.button === n &&
|
|
191
|
+
t.button === n && L.clear();
|
|
192
192
|
}), e.map.addEventListener("mouseup", (t) => {
|
|
193
193
|
const n = e.mouseSelectionButton === 0 ? 2 : 0;
|
|
194
|
-
t.button === n &&
|
|
194
|
+
t.button === n && L.clear();
|
|
195
195
|
});
|
|
196
196
|
}
|
|
197
|
-
const
|
|
197
|
+
const it = {
|
|
198
198
|
create() {
|
|
199
199
|
return {
|
|
200
200
|
handlers: {},
|
|
@@ -222,43 +222,43 @@ const st = {
|
|
|
222
222
|
}
|
|
223
223
|
};
|
|
224
224
|
}
|
|
225
|
-
},
|
|
225
|
+
}, oe = document, rt = function() {
|
|
226
226
|
this.nodes.innerHTML = "";
|
|
227
227
|
const e = this.createTopic(this.nodeData);
|
|
228
|
-
|
|
229
|
-
const t =
|
|
228
|
+
ue(e, this.nodeData), e.draggable = !1;
|
|
229
|
+
const t = oe.createElement("me-root");
|
|
230
230
|
t.appendChild(e);
|
|
231
231
|
const n = this.nodeData.children || [];
|
|
232
|
-
if (this.direction ===
|
|
232
|
+
if (this.direction === ie) {
|
|
233
233
|
let o = 0, s = 0;
|
|
234
234
|
n.map((i) => {
|
|
235
|
-
i.direction ===
|
|
235
|
+
i.direction === M ? o += 1 : i.direction === D ? s += 1 : o <= s ? (i.direction = M, o += 1) : (i.direction = D, s += 1);
|
|
236
236
|
});
|
|
237
237
|
}
|
|
238
|
-
|
|
239
|
-
},
|
|
240
|
-
const o =
|
|
238
|
+
lt(this, n, t);
|
|
239
|
+
}, lt = function(e, t, n) {
|
|
240
|
+
const o = oe.createElement("me-main");
|
|
241
241
|
o.className = "lhs";
|
|
242
|
-
const s =
|
|
242
|
+
const s = oe.createElement("me-main");
|
|
243
243
|
s.className = "rhs";
|
|
244
244
|
for (let i = 0; i < t.length; i++) {
|
|
245
|
-
const r = t[i], { grp:
|
|
246
|
-
e.direction ===
|
|
245
|
+
const r = t[i], { grp: l } = e.createWrapper(r);
|
|
246
|
+
e.direction === ie ? r.direction === M ? o.appendChild(l) : s.appendChild(l) : e.direction === M ? o.appendChild(l) : s.appendChild(l);
|
|
247
247
|
}
|
|
248
248
|
e.nodes.appendChild(o), e.nodes.appendChild(n), e.nodes.appendChild(s), e.nodes.appendChild(e.lines);
|
|
249
249
|
}, ct = function(e, t) {
|
|
250
|
-
const n =
|
|
250
|
+
const n = oe.createElement("me-children");
|
|
251
251
|
for (let o = 0; o < t.length; o++) {
|
|
252
252
|
const s = t[o], { grp: i } = e.createWrapper(s);
|
|
253
253
|
n.appendChild(i);
|
|
254
254
|
}
|
|
255
255
|
return n;
|
|
256
|
-
},
|
|
257
|
-
const o = (t ? t.mindElixirBox :
|
|
256
|
+
}, S = document, N = (e, t) => {
|
|
257
|
+
const o = (t ? t.mindElixirBox : S).querySelector(`[data-nodeid=me${e}]`);
|
|
258
258
|
if (!o)
|
|
259
259
|
throw new Error(`FindEle: Node ${e} not found, maybe it's collapsed.`);
|
|
260
260
|
return o;
|
|
261
|
-
},
|
|
261
|
+
}, ue = function(e, t) {
|
|
262
262
|
if (e.innerHTML = "", 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.dangerouslySetInnerHTML) {
|
|
263
263
|
e.innerHTML = t.dangerouslySetInnerHTML;
|
|
264
264
|
return;
|
|
@@ -266,60 +266,60 @@ const st = {
|
|
|
266
266
|
if (t.image) {
|
|
267
267
|
const n = t.image;
|
|
268
268
|
if (n.url && n.width && n.height) {
|
|
269
|
-
const o =
|
|
269
|
+
const o = S.createElement("img");
|
|
270
270
|
o.src = n.url, o.style.width = n.width + "px", o.style.height = n.height + "px", n.fit && (o.style.objectFit = n.fit), e.appendChild(o), e.image = o;
|
|
271
271
|
}
|
|
272
272
|
} else
|
|
273
273
|
e.image && (e.image = void 0);
|
|
274
274
|
{
|
|
275
|
-
const n =
|
|
275
|
+
const n = S.createElement("span");
|
|
276
276
|
n.className = "text", n.textContent = t.topic, e.appendChild(n), e.text = n;
|
|
277
277
|
}
|
|
278
278
|
if (t.hyperLink) {
|
|
279
|
-
const n =
|
|
279
|
+
const n = S.createElement("a");
|
|
280
280
|
n.className = "hyper-link", n.target = "_blank", n.innerText = "🔗", n.href = t.hyperLink, e.appendChild(n), e.link = n;
|
|
281
281
|
} else
|
|
282
282
|
e.link && (e.link = void 0);
|
|
283
283
|
if (t.icons && t.icons.length) {
|
|
284
|
-
const n =
|
|
285
|
-
n.className = "icons", n.innerHTML = t.icons.map((o) => `<span>${
|
|
284
|
+
const n = S.createElement("span");
|
|
285
|
+
n.className = "icons", n.innerHTML = t.icons.map((o) => `<span>${te(o)}</span>`).join(""), e.appendChild(n), e.icons = n;
|
|
286
286
|
} else
|
|
287
287
|
e.icons && (e.icons = void 0);
|
|
288
288
|
if (t.tags && t.tags.length) {
|
|
289
|
-
const n =
|
|
290
|
-
n.className = "tags", n.innerHTML = t.tags.map((o) => `<span>${
|
|
289
|
+
const n = S.createElement("div");
|
|
290
|
+
n.className = "tags", n.innerHTML = t.tags.map((o) => `<span>${te(o)}</span>`).join(""), e.appendChild(n), e.tags = n;
|
|
291
291
|
} else
|
|
292
292
|
e.tags && (e.tags = void 0);
|
|
293
|
-
},
|
|
294
|
-
const n =
|
|
293
|
+
}, at = function(e, t) {
|
|
294
|
+
const n = S.createElement("me-wrapper"), { p: o, tpc: s } = this.createParent(e);
|
|
295
295
|
if (n.appendChild(o), !t && e.children && e.children.length > 0) {
|
|
296
|
-
const i =
|
|
296
|
+
const i = fe(e.expanded);
|
|
297
297
|
if (o.appendChild(i), e.expanded !== !1) {
|
|
298
298
|
const r = ct(this, e.children);
|
|
299
299
|
n.appendChild(r);
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
302
|
return { grp: n, top: o, tpc: s };
|
|
303
|
-
}, at = function(e) {
|
|
304
|
-
const t = _.createElement("me-parent"), n = this.createTopic(e);
|
|
305
|
-
return fe(n, e), t.appendChild(n), { p: t, tpc: n };
|
|
306
303
|
}, dt = function(e) {
|
|
307
|
-
const t =
|
|
308
|
-
return t.
|
|
304
|
+
const t = S.createElement("me-parent"), n = this.createTopic(e);
|
|
305
|
+
return ue(n, e), t.appendChild(n), { p: t, tpc: n };
|
|
309
306
|
}, ht = function(e) {
|
|
310
|
-
const t =
|
|
307
|
+
const t = S.createElement("me-children");
|
|
308
|
+
return t.append(...e), t;
|
|
309
|
+
}, ut = function(e) {
|
|
310
|
+
const t = S.createElement("me-tpc");
|
|
311
311
|
return t.nodeObj = e, t.dataset.nodeid = "me" + e.id, t.draggable = this.draggable, t;
|
|
312
312
|
};
|
|
313
|
-
function
|
|
314
|
-
const t =
|
|
313
|
+
function He(e) {
|
|
314
|
+
const t = S.createRange();
|
|
315
315
|
t.selectNodeContents(e);
|
|
316
316
|
const n = window.getSelection();
|
|
317
317
|
n && (n.removeAllRanges(), n.addRange(t));
|
|
318
318
|
}
|
|
319
|
-
const
|
|
319
|
+
const ft = function(e) {
|
|
320
320
|
if (!e)
|
|
321
321
|
return;
|
|
322
|
-
const t =
|
|
322
|
+
const t = S.createElement("div"), n = e.text.textContent;
|
|
323
323
|
e.appendChild(t), t.id = "input-box", t.textContent = n, t.contentEditable = "true", t.spellcheck = !1;
|
|
324
324
|
const o = getComputedStyle(e);
|
|
325
325
|
t.style.cssText = `min-width:${e.offsetWidth - 8}px;
|
|
@@ -328,7 +328,7 @@ const ut = function(e) {
|
|
|
328
328
|
margin:${o.margin};
|
|
329
329
|
font:${o.font};
|
|
330
330
|
background-color:${o.backgroundColor !== "rgba(0, 0, 0, 0)" && o.backgroundColor};
|
|
331
|
-
border-radius:${o.borderRadius};`, this.direction ===
|
|
331
|
+
border-radius:${o.borderRadius};`, this.direction === M && (t.style.right = "0"), t.focus(), He(t), this.bus.fire("operation", {
|
|
332
332
|
name: "beginEdit",
|
|
333
333
|
obj: e.nodeObj
|
|
334
334
|
}), t.addEventListener("keydown", (s) => {
|
|
@@ -337,7 +337,7 @@ const ut = function(e) {
|
|
|
337
337
|
if (i === "Enter" || i === "Tab") {
|
|
338
338
|
if (s.shiftKey)
|
|
339
339
|
return;
|
|
340
|
-
s.preventDefault(), t
|
|
340
|
+
s.preventDefault(), t.blur(), this.map.focus();
|
|
341
341
|
}
|
|
342
342
|
}), t.addEventListener("blur", () => {
|
|
343
343
|
var r;
|
|
@@ -350,89 +350,94 @@ const ut = function(e) {
|
|
|
350
350
|
origin: n
|
|
351
351
|
}));
|
|
352
352
|
});
|
|
353
|
-
},
|
|
354
|
-
const t =
|
|
353
|
+
}, fe = function(e) {
|
|
354
|
+
const t = S.createElement("me-epd");
|
|
355
355
|
return t.expanded = e !== !1, t.className = e !== !1 ? "minus" : "", t;
|
|
356
|
-
},
|
|
357
|
-
const o =
|
|
358
|
-
return
|
|
356
|
+
}, q = document, I = "http://www.w3.org/2000/svg", ze = function(e, t, n) {
|
|
357
|
+
const o = q.createElementNS(I, "path");
|
|
358
|
+
return E(o, {
|
|
359
359
|
d: e,
|
|
360
360
|
stroke: t || "#666",
|
|
361
361
|
fill: "none",
|
|
362
362
|
"stroke-width": n
|
|
363
363
|
}), o;
|
|
364
|
-
},
|
|
365
|
-
const t =
|
|
364
|
+
}, U = function(e) {
|
|
365
|
+
const t = q.createElementNS(I, "svg");
|
|
366
366
|
return t.setAttribute("class", e), t.setAttribute("overflow", "visible"), t;
|
|
367
367
|
}, ye = function() {
|
|
368
|
-
const e =
|
|
368
|
+
const e = q.createElementNS(I, "line");
|
|
369
369
|
return e.setAttribute("stroke", "#bbb"), e.setAttribute("fill", "none"), e.setAttribute("stroke-width", "2"), e;
|
|
370
|
-
},
|
|
370
|
+
}, pt = function(e, t) {
|
|
371
371
|
const n = {
|
|
372
372
|
stroke: "rgb(235, 95, 82)",
|
|
373
373
|
fill: "none",
|
|
374
374
|
"stroke-linecap": "cap",
|
|
375
375
|
"stroke-width": "2"
|
|
376
|
-
}, o =
|
|
377
|
-
return
|
|
376
|
+
}, o = q.createElementNS(I, "g"), s = q.createElementNS(I, "path"), i = q.createElementNS(I, "path");
|
|
377
|
+
return E(i, {
|
|
378
378
|
d: t,
|
|
379
379
|
...n
|
|
380
|
-
}),
|
|
380
|
+
}), E(s, {
|
|
381
381
|
d: e,
|
|
382
382
|
...n,
|
|
383
383
|
"stroke-dasharray": "8,2"
|
|
384
384
|
}), o.appendChild(s), o.appendChild(i), o;
|
|
385
|
-
},
|
|
385
|
+
}, Re = function(e, t, n) {
|
|
386
386
|
if (!t)
|
|
387
387
|
return;
|
|
388
388
|
const o = document.createElement("div");
|
|
389
389
|
e.nodes.appendChild(o);
|
|
390
390
|
const s = t.innerHTML;
|
|
391
391
|
o.id = "input-box", o.textContent = s, o.contentEditable = "true", o.spellcheck = !1;
|
|
392
|
-
const i = t.
|
|
393
|
-
o.style.cssText = `
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
392
|
+
const i = t.getBBox();
|
|
393
|
+
o.style.cssText = `
|
|
394
|
+
min-width:${Math.max(88, i.width)}px;
|
|
395
|
+
position:absolute;
|
|
396
|
+
left:${i.x}px;
|
|
397
|
+
top:${i.y}px;
|
|
398
|
+
padding: 2px 4px;
|
|
399
|
+
margin: -2px -4px;
|
|
400
|
+
`, o.focus(), He(o), o.addEventListener("keydown", (r) => {
|
|
401
|
+
r.stopPropagation();
|
|
402
|
+
const l = r.key;
|
|
403
|
+
if (l === "Enter" || l === "Tab") {
|
|
404
|
+
if (r.shiftKey)
|
|
400
405
|
return;
|
|
401
|
-
|
|
406
|
+
r.preventDefault(), o.blur(), e.map.focus();
|
|
402
407
|
}
|
|
403
408
|
}), o.addEventListener("blur", () => {
|
|
404
409
|
o && n(o);
|
|
405
410
|
});
|
|
406
|
-
},
|
|
411
|
+
}, mt = function(e) {
|
|
407
412
|
const t = this.map.querySelector("me-root"), n = t.offsetTop, o = t.offsetLeft, s = t.offsetWidth, i = t.offsetHeight;
|
|
408
413
|
this.nodes.style.top = `${1e4 - this.nodes.offsetHeight / 2}px`, this.nodes.style.left = `${1e4 - o - s / 2}px`;
|
|
409
414
|
const r = this.map.querySelectorAll("me-main > me-wrapper");
|
|
410
415
|
this.lines.innerHTML = "";
|
|
411
|
-
for (let
|
|
412
|
-
const
|
|
413
|
-
u.style.borderColor = v, this.lines.appendChild(
|
|
414
|
-
const y =
|
|
415
|
-
if (y && (y.style.top = (y.parentNode.offsetHeight - y.offsetHeight) / 2 + "px", p === "lhs" ? y.style.left = "-10px" : y.style.right = "-10px"), e && e !==
|
|
416
|
+
for (let l = 0; l < r.length; l++) {
|
|
417
|
+
const c = r[l], u = c.querySelector("me-tpc"), { offsetLeft: d, offsetTop: a } = O(this.nodes, u), f = u.offsetWidth, g = u.offsetHeight, p = c.parentNode.className, m = this.generateMainBranch({ pT: n, pL: o, pW: s, pH: i, cT: a, cL: d, cW: f, cH: g, direction: p, containerHeight: this.nodes.offsetHeight }), h = this.theme.palette, v = u.nodeObj.branchColor || h[l % h.length];
|
|
418
|
+
u.style.borderColor = v, this.lines.appendChild(ze(m, v, "3"));
|
|
419
|
+
const y = c.children[0].children[1];
|
|
420
|
+
if (y && (y.style.top = (y.parentNode.offsetHeight - y.offsetHeight) / 2 + "px", p === "lhs" ? y.style.left = "-10px" : y.style.right = "-10px"), e && e !== c)
|
|
416
421
|
continue;
|
|
417
|
-
const b =
|
|
418
|
-
x.tagName === "svg" && x.remove(),
|
|
422
|
+
const b = U("subLines"), x = c.lastChild;
|
|
423
|
+
x.tagName === "svg" && x.remove(), c.appendChild(b), Fe(this, b, v, c, p, !0);
|
|
419
424
|
}
|
|
420
425
|
this.renderArrow(), this.renderSummary(), this.bus.fire("linkDiv");
|
|
421
|
-
},
|
|
422
|
-
const r = o.firstChild,
|
|
423
|
-
if (
|
|
426
|
+
}, Fe = function(e, t, n, o, s, i) {
|
|
427
|
+
const r = o.firstChild, l = o.children[1].children;
|
|
428
|
+
if (l.length === 0)
|
|
424
429
|
return;
|
|
425
|
-
const
|
|
426
|
-
for (let f = 0; f <
|
|
427
|
-
const g =
|
|
428
|
-
t.appendChild(
|
|
430
|
+
const c = r.offsetTop, u = r.offsetLeft, d = r.offsetWidth, a = r.offsetHeight;
|
|
431
|
+
for (let f = 0; f < l.length; f++) {
|
|
432
|
+
const g = l[f], p = g.firstChild, m = p.offsetTop, h = p.offsetLeft, v = p.offsetWidth, y = p.offsetHeight, b = p.firstChild.nodeObj.branchColor || n, x = e.generateSubBranch({ pT: c, pL: u, pW: d, pH: a, cT: m, cL: h, cW: v, cH: y, direction: s, isFirst: i });
|
|
433
|
+
t.appendChild(ze(x, b, "2"));
|
|
429
434
|
const w = p.children[1];
|
|
430
435
|
if (w) {
|
|
431
436
|
if (w.style.bottom = -(w.offsetHeight / 2) + "px", s === "lhs" ? w.style.left = "10px" : s === "rhs" && (w.style.right = "10px"), !w.expanded)
|
|
432
437
|
continue;
|
|
433
438
|
} else
|
|
434
439
|
continue;
|
|
435
|
-
|
|
440
|
+
Fe(e, t, b, g, s);
|
|
436
441
|
}
|
|
437
442
|
}, be = {
|
|
438
443
|
addChild: "插入子节点",
|
|
@@ -567,19 +572,19 @@ const ut = function(e) {
|
|
|
567
572
|
summary: "요약"
|
|
568
573
|
}
|
|
569
574
|
};
|
|
570
|
-
function
|
|
575
|
+
function gt(e, t) {
|
|
571
576
|
const n = (b) => {
|
|
572
577
|
const x = document.createElement("div");
|
|
573
578
|
return x.innerText = b, x.className = "tips", x;
|
|
574
579
|
}, o = (b, x, w) => {
|
|
575
|
-
const
|
|
576
|
-
return
|
|
577
|
-
}, s = xe[e.locale] ? e.locale : "en", i = xe[s], r = o("cm-add_child", i.addChild, "Tab"),
|
|
578
|
-
if (h.className = "menu-list", h.appendChild(r), h.appendChild(
|
|
580
|
+
const C = document.createElement("li");
|
|
581
|
+
return C.id = b, C.innerHTML = `<span>${te(x)}</span><span ${w ? 'class="key"' : ""}>${te(w)}</span>`, C;
|
|
582
|
+
}, s = xe[e.locale] ? e.locale : "en", i = xe[s], r = o("cm-add_child", i.addChild, "Tab"), l = o("cm-add_parent", i.addParent, "Ctrl + Enter"), c = o("cm-add_sibling", i.addSibling, "Enter"), u = o("cm-remove_child", i.removeNode, "Delete"), d = o("cm-fucus", i.focus, ""), a = o("cm-unfucus", i.cancelFocus, ""), f = o("cm-up", i.moveUp, "PgUp"), g = o("cm-down", i.moveDown, "Pgdn"), p = o("cm-link", i.link, ""), m = o("cm-summary", i.summary, ""), h = document.createElement("ul");
|
|
583
|
+
if (h.className = "menu-list", h.appendChild(r), h.appendChild(l), h.appendChild(c), h.appendChild(u), (!t || t.focus) && (h.appendChild(d), h.appendChild(a)), h.appendChild(f), h.appendChild(g), h.appendChild(m), (!t || t.link) && h.appendChild(p), t && t.extend)
|
|
579
584
|
for (let b = 0; b < t.extend.length; b++) {
|
|
580
585
|
const x = t.extend[b], w = o(x.name, x.name, x.key || "");
|
|
581
|
-
h.appendChild(w), w.onclick = (
|
|
582
|
-
x.onclick(
|
|
586
|
+
h.appendChild(w), w.onclick = (C) => {
|
|
587
|
+
x.onclick(C);
|
|
583
588
|
};
|
|
584
589
|
}
|
|
585
590
|
const v = document.createElement("div");
|
|
@@ -590,17 +595,17 @@ function mt(e, t) {
|
|
|
590
595
|
return;
|
|
591
596
|
const x = b.target;
|
|
592
597
|
if (le(x)) {
|
|
593
|
-
x.parentElement.tagName === "ME-ROOT" ? y = !0 : y = !1, y ? (d.className = "disabled", f.className = "disabled", g.className = "disabled",
|
|
594
|
-
const w = h.getBoundingClientRect(),
|
|
595
|
-
|
|
598
|
+
x.parentElement.tagName === "ME-ROOT" ? y = !0 : y = !1, y ? (d.className = "disabled", f.className = "disabled", g.className = "disabled", l.className = "disabled", c.className = "disabled", u.className = "disabled") : (d.className = "", f.className = "", g.className = "", l.className = "", c.className = "", u.className = ""), e.currentNodes || e.selectNode(x), v.hidden = !1, L.mousedown && (L.mousedown = !1), h.style.top = "", h.style.bottom = "", h.style.left = "", h.style.right = "";
|
|
599
|
+
const w = h.getBoundingClientRect(), C = h.offsetHeight, P = h.offsetWidth, V = b.clientY - w.top, B = b.clientX - w.left;
|
|
600
|
+
C + V > window.innerHeight ? (h.style.top = "", h.style.bottom = "0px") : (h.style.bottom = "", h.style.top = V + 15 + "px"), P + B > window.innerWidth ? (h.style.left = "", h.style.right = "0px") : (h.style.right = "", h.style.left = B + 10 + "px");
|
|
596
601
|
}
|
|
597
602
|
}, v.onclick = (b) => {
|
|
598
603
|
b.target === v && (v.hidden = !0);
|
|
599
604
|
}, r.onclick = () => {
|
|
600
605
|
e.addChild(), v.hidden = !0;
|
|
601
|
-
}, c.onclick = () => {
|
|
602
|
-
e.insertParent(), v.hidden = !0;
|
|
603
606
|
}, l.onclick = () => {
|
|
607
|
+
e.insertParent(), v.hidden = !0;
|
|
608
|
+
}, c.onclick = () => {
|
|
604
609
|
y || (e.insertSibling("after"), v.hidden = !0);
|
|
605
610
|
}, u.onclick = () => {
|
|
606
611
|
y || (e.removeNode(), v.hidden = !0);
|
|
@@ -619,8 +624,8 @@ function mt(e, t) {
|
|
|
619
624
|
"click",
|
|
620
625
|
(w) => {
|
|
621
626
|
w.preventDefault(), x.remove();
|
|
622
|
-
const
|
|
623
|
-
(
|
|
627
|
+
const C = w.target;
|
|
628
|
+
(C.parentElement.tagName === "ME-PARENT" || C.parentElement.tagName === "ME-ROOT") && e.createArrow(b, C);
|
|
624
629
|
},
|
|
625
630
|
{
|
|
626
631
|
once: !0
|
|
@@ -629,24 +634,24 @@ function mt(e, t) {
|
|
|
629
634
|
}, m.onclick = () => {
|
|
630
635
|
v.hidden = !0, e.createSummary(), e.unselectNodes();
|
|
631
636
|
}, () => {
|
|
632
|
-
r.onclick = null,
|
|
637
|
+
r.onclick = null, l.onclick = null, c.onclick = null, u.onclick = null, d.onclick = null, a.onclick = null, f.onclick = null, g.onclick = null, p.onclick = null, m.onclick = null, v.onclick = null, e.container.oncontextmenu = null;
|
|
633
638
|
};
|
|
634
639
|
}
|
|
635
|
-
const
|
|
640
|
+
const vt = (e) => {
|
|
636
641
|
const t = e.map.querySelectorAll(".lhs>me-wrapper>me-parent>me-tpc");
|
|
637
642
|
e.selectNode(t[Math.ceil(t.length / 2) - 1]);
|
|
638
|
-
},
|
|
643
|
+
}, yt = (e) => {
|
|
639
644
|
const t = e.map.querySelectorAll(".rhs>me-wrapper>me-parent>me-tpc");
|
|
640
645
|
e.selectNode(t[Math.ceil(t.length / 2) - 1]);
|
|
641
|
-
},
|
|
646
|
+
}, bt = (e) => {
|
|
642
647
|
e.selectNode(e.map.querySelector("me-root>me-tpc"));
|
|
643
|
-
},
|
|
648
|
+
}, xt = function(e, t) {
|
|
644
649
|
const n = t.parentElement.parentElement.parentElement.previousSibling;
|
|
645
650
|
if (n) {
|
|
646
651
|
const o = n.firstChild;
|
|
647
652
|
e.selectNode(o);
|
|
648
653
|
}
|
|
649
|
-
},
|
|
654
|
+
}, wt = function(e, t) {
|
|
650
655
|
const n = t.parentElement.nextSibling;
|
|
651
656
|
if (n && n.firstChild) {
|
|
652
657
|
const o = n.firstChild.firstChild.firstChild;
|
|
@@ -658,7 +663,7 @@ const gt = (e) => {
|
|
|
658
663
|
if (!n)
|
|
659
664
|
return;
|
|
660
665
|
const o = n.nodeObj, s = n.offsetParent.offsetParent.parentElement;
|
|
661
|
-
o.parent ? s.className === t ?
|
|
666
|
+
o.parent ? s.className === t ? wt(e, n) : (r = o.parent) != null && r.parent ? xt(e, n) : bt(e) : t === "lhs" ? vt(e) : yt(e);
|
|
662
667
|
}, Ee = function(e, t) {
|
|
663
668
|
var r;
|
|
664
669
|
const n = e.currentNode || ((r = e.currentNodes) == null ? void 0 : r[0]);
|
|
@@ -666,7 +671,7 @@ const gt = (e) => {
|
|
|
666
671
|
return;
|
|
667
672
|
const s = t + "Sibling", i = n.parentElement.parentElement[s];
|
|
668
673
|
i && e.selectNode(i.firstChild.firstChild);
|
|
669
|
-
},
|
|
674
|
+
}, J = function(e, t, n = 1) {
|
|
670
675
|
switch (t) {
|
|
671
676
|
case "in":
|
|
672
677
|
if (e.scaleVal * n > 1.6)
|
|
@@ -679,7 +684,7 @@ const gt = (e) => {
|
|
|
679
684
|
e.scale(e.scaleVal -= 0.2);
|
|
680
685
|
}
|
|
681
686
|
};
|
|
682
|
-
function
|
|
687
|
+
function Et(e) {
|
|
683
688
|
const t = () => {
|
|
684
689
|
e.currentArrow ? e.removeArrow() : e.currentSummary ? e.removeSummary(e.currentSummary.summaryObj.id) : e.currentNode ? e.removeNode() : e.currentNodes && e.removeNodes(e.currentNodes);
|
|
685
690
|
}, n = {
|
|
@@ -731,10 +736,10 @@ function wt(e) {
|
|
|
731
736
|
!e.waitCopy || !e.currentNode || (o.metaKey || o.ctrlKey) && (e.waitCopy.length === 1 ? e.copyNode(e.waitCopy[0], e.currentNode) : e.copyNodes(e.waitCopy, e.currentNode));
|
|
732
737
|
},
|
|
733
738
|
"+": (o) => {
|
|
734
|
-
(o.metaKey || o.ctrlKey) &&
|
|
739
|
+
(o.metaKey || o.ctrlKey) && J(e, "in");
|
|
735
740
|
},
|
|
736
741
|
"-": (o) => {
|
|
737
|
-
(o.metaKey || o.ctrlKey) &&
|
|
742
|
+
(o.metaKey || o.ctrlKey) && J(e, "out");
|
|
738
743
|
},
|
|
739
744
|
0: (o) => {
|
|
740
745
|
(o.metaKey || o.ctrlKey) && e.scale(1);
|
|
@@ -751,17 +756,17 @@ function wt(e) {
|
|
|
751
756
|
if (o.ctrlKey || o.metaKey) {
|
|
752
757
|
o.preventDefault();
|
|
753
758
|
const s = Math.abs(o.deltaY / 100);
|
|
754
|
-
o.deltaY < 0 ?
|
|
759
|
+
o.deltaY < 0 ? J(e, "in", s) : e.scaleVal - 0.2 > 0 && J(e, "out", s), o.stopPropagation();
|
|
755
760
|
}
|
|
756
761
|
};
|
|
757
762
|
}
|
|
758
|
-
const
|
|
763
|
+
const ce = document, Nt = function(e, t) {
|
|
759
764
|
if (!t)
|
|
760
|
-
return
|
|
765
|
+
return ae(e), e;
|
|
761
766
|
let n = e.querySelector(".insert-preview");
|
|
762
767
|
const o = `insert-preview ${t} show`;
|
|
763
|
-
return n || (n =
|
|
764
|
-
},
|
|
768
|
+
return n || (n = ce.createElement("div"), e.appendChild(n)), n.className = o, e;
|
|
769
|
+
}, ae = function(e) {
|
|
765
770
|
if (!e)
|
|
766
771
|
return;
|
|
767
772
|
const t = e.querySelectorAll(".insert-preview");
|
|
@@ -774,56 +779,56 @@ const ae = document, Et = function(e, t) {
|
|
|
774
779
|
return !1;
|
|
775
780
|
}
|
|
776
781
|
return !0;
|
|
777
|
-
},
|
|
782
|
+
}, Ct = function(e) {
|
|
778
783
|
const t = document.createElement("div");
|
|
779
784
|
return t.className = "mind-elixir-ghost", e.map.appendChild(t), t;
|
|
780
785
|
};
|
|
781
|
-
function
|
|
786
|
+
function St(e) {
|
|
782
787
|
let t = null, n = null, o = null;
|
|
783
|
-
const s =
|
|
788
|
+
const s = Ct(e), i = 12;
|
|
784
789
|
e.map.addEventListener("dragstart", (r) => {
|
|
785
|
-
var
|
|
786
|
-
const
|
|
787
|
-
if ((
|
|
790
|
+
var c, u;
|
|
791
|
+
const l = r.target;
|
|
792
|
+
if ((l == null ? void 0 : l.tagName) !== "ME-TPC") {
|
|
788
793
|
r.preventDefault();
|
|
789
794
|
return;
|
|
790
795
|
}
|
|
791
|
-
(
|
|
796
|
+
(c = e.currentNodes) != null && c.includes(l) || (e.unselectNodes(), e.selectNode(l)), e.currentNodes ? (t = e.currentNodes, s.innerHTML = e.currentNodes.length + " nodes") : (t = [l], s.innerHTML = l.innerHTML);
|
|
792
797
|
for (const d of t)
|
|
793
798
|
d.parentElement.parentElement.style.opacity = "0.5";
|
|
794
|
-
(u = r.dataTransfer) == null || u.setDragImage(s, 0, 0),
|
|
799
|
+
(u = r.dataTransfer) == null || u.setDragImage(s, 0, 0), L.clear();
|
|
795
800
|
}), e.map.addEventListener("dragend", async (r) => {
|
|
796
801
|
if (!t)
|
|
797
802
|
return;
|
|
798
|
-
for (const
|
|
799
|
-
|
|
800
|
-
const
|
|
801
|
-
|
|
803
|
+
for (const c of t)
|
|
804
|
+
c.parentElement.parentElement.style.opacity = "1";
|
|
805
|
+
const l = r.target;
|
|
806
|
+
l.style.opacity = "", o && (ae(o), n === "before" ? e.moveNodeBefore(t, o) : n === "after" ? e.moveNodeAfter(t, o) : n === "in" && e.moveNodeIn(t, o), t = null);
|
|
802
807
|
}), e.map.addEventListener(
|
|
803
808
|
"dragover",
|
|
804
|
-
|
|
809
|
+
nt(function(r) {
|
|
805
810
|
if (!t)
|
|
806
811
|
return;
|
|
807
|
-
|
|
808
|
-
const
|
|
809
|
-
if (Ne(
|
|
810
|
-
o =
|
|
811
|
-
const
|
|
812
|
-
r.clientY >
|
|
812
|
+
ae(o);
|
|
813
|
+
const l = ce.elementFromPoint(r.clientX, r.clientY - i);
|
|
814
|
+
if (Ne(l, t)) {
|
|
815
|
+
o = l;
|
|
816
|
+
const c = l.getBoundingClientRect().y;
|
|
817
|
+
r.clientY > c + l.clientHeight ? n = "after" : n = "in";
|
|
813
818
|
} else {
|
|
814
|
-
const
|
|
815
|
-
if (Ne(
|
|
816
|
-
o =
|
|
817
|
-
const u =
|
|
819
|
+
const c = ce.elementFromPoint(r.clientX, r.clientY + i);
|
|
820
|
+
if (Ne(c, t)) {
|
|
821
|
+
o = c;
|
|
822
|
+
const u = c.getBoundingClientRect().y;
|
|
818
823
|
r.clientY < u ? n = "before" : n = "in";
|
|
819
824
|
} else
|
|
820
825
|
n = o = null;
|
|
821
826
|
}
|
|
822
|
-
o &&
|
|
827
|
+
o && Nt(o, n);
|
|
823
828
|
}, 100)
|
|
824
829
|
);
|
|
825
830
|
}
|
|
826
|
-
const
|
|
831
|
+
const _t = function(e) {
|
|
827
832
|
return ["createSummary", "removeSummary", "finishEditSummary"].includes(e.name) ? {
|
|
828
833
|
type: "summary",
|
|
829
834
|
value: e.obj.id
|
|
@@ -838,20 +843,20 @@ const St = function(e) {
|
|
|
838
843
|
value: e.obj.id
|
|
839
844
|
};
|
|
840
845
|
};
|
|
841
|
-
function
|
|
846
|
+
function Mt(e) {
|
|
842
847
|
let t = [], n = -1, o = e.getData();
|
|
843
848
|
e.bus.addListener("operation", (s) => {
|
|
844
849
|
if (s.name === "beginEdit")
|
|
845
850
|
return;
|
|
846
851
|
t = t.slice(0, n + 1);
|
|
847
852
|
const i = e.getData();
|
|
848
|
-
t.push({ prev: o, currentObject:
|
|
853
|
+
t.push({ prev: o, currentObject: _t(s), next: i }), o = i, n = t.length - 1;
|
|
849
854
|
}), e.undo = function() {
|
|
850
855
|
if (n > -1) {
|
|
851
856
|
const s = t[n];
|
|
852
857
|
o = s.prev, e.refresh(s.prev);
|
|
853
858
|
try {
|
|
854
|
-
s.currentObject.type === "node" ? e.selectNode(
|
|
859
|
+
s.currentObject.type === "node" ? e.selectNode(N(s.currentObject.value)) : s.currentObject.type === "nodes" && e.selectNodes(s.currentObject.value.map((i) => N(i)));
|
|
855
860
|
} catch {
|
|
856
861
|
} finally {
|
|
857
862
|
n--;
|
|
@@ -861,20 +866,20 @@ function _t(e) {
|
|
|
861
866
|
if (n < t.length - 1) {
|
|
862
867
|
n++;
|
|
863
868
|
const s = t[n];
|
|
864
|
-
o = s.next, e.refresh(s.next), s.currentObject.type === "node" ? e.selectNode(
|
|
869
|
+
o = s.next, e.refresh(s.next), s.currentObject.type === "node" ? e.selectNode(N(s.currentObject.value)) : s.currentObject.type === "nodes" && e.selectNodes(s.currentObject.value.map((i) => N(i)));
|
|
865
870
|
}
|
|
866
871
|
}, e.map.addEventListener("keydown", (s) => {
|
|
867
872
|
(s.metaKey || s.ctrlKey) && s.shiftKey && s.key === "Z" ? e.redo() : (s.metaKey || s.ctrlKey) && s.key === "z" && e.undo();
|
|
868
873
|
});
|
|
869
874
|
}
|
|
870
|
-
const
|
|
875
|
+
const z = (e, t) => {
|
|
871
876
|
const n = document.createElement("span");
|
|
872
877
|
return n.id = e, n.innerHTML = `<svg class="icon" aria-hidden="true">
|
|
873
878
|
<use xlink:href="#icon-${t}"></use>
|
|
874
879
|
</svg>`, n;
|
|
875
880
|
};
|
|
876
|
-
function
|
|
877
|
-
const t = document.createElement("div"), n =
|
|
881
|
+
function kt(e) {
|
|
882
|
+
const t = document.createElement("div"), n = z("fullscreen", "full"), o = z("toCenter", "living"), s = z("zoomout", "move"), i = z("zoomin", "add"), r = document.createElement("span");
|
|
878
883
|
return r.innerText = "100%", t.appendChild(n), t.appendChild(o), t.appendChild(s), t.appendChild(i), t.className = "mind-elixir-toolbar rb", n.onclick = () => {
|
|
879
884
|
e.mindElixirBox.requestFullscreen();
|
|
880
885
|
}, o.onclick = () => {
|
|
@@ -885,8 +890,8 @@ function Mt(e) {
|
|
|
885
890
|
e.scaleVal > 1.6 || e.scale(e.scaleVal + 0.2);
|
|
886
891
|
}, t;
|
|
887
892
|
}
|
|
888
|
-
function
|
|
889
|
-
const t = document.createElement("div"), n =
|
|
893
|
+
function Lt(e) {
|
|
894
|
+
const t = document.createElement("div"), n = z("tbltl", "left"), o = z("tbltr", "right"), s = z("tblts", "side");
|
|
890
895
|
return t.appendChild(n), t.appendChild(o), t.appendChild(s), t.className = "mind-elixir-toolbar lt", n.onclick = () => {
|
|
891
896
|
e.initLeft();
|
|
892
897
|
}, o.onclick = () => {
|
|
@@ -896,13 +901,12 @@ function kt(e) {
|
|
|
896
901
|
}, t;
|
|
897
902
|
}
|
|
898
903
|
function Tt(e) {
|
|
899
|
-
e.container.append(
|
|
904
|
+
e.container.append(kt(e)), e.container.append(Lt(e));
|
|
900
905
|
}
|
|
901
|
-
/*! @viselect/vanilla v3.
|
|
902
|
-
|
|
903
|
-
class jt {
|
|
906
|
+
/*! @viselect/vanilla v3.7.1 MIT | https://github.com/Simonwep/selection/tree/master/packages/vanilla */
|
|
907
|
+
class At {
|
|
904
908
|
constructor() {
|
|
905
|
-
|
|
909
|
+
this._listeners = /* @__PURE__ */ new Map(), this.on = this.addEventListener, this.off = this.removeEventListener, this.emit = this.dispatchEvent;
|
|
906
910
|
}
|
|
907
911
|
addEventListener(t, n) {
|
|
908
912
|
const o = this._listeners.get(t) ?? /* @__PURE__ */ new Set();
|
|
@@ -922,27 +926,28 @@ class jt {
|
|
|
922
926
|
this._listeners.clear();
|
|
923
927
|
}
|
|
924
928
|
}
|
|
925
|
-
const Ce = (e, t = "px") => typeof e == "number" ? e + t : e
|
|
926
|
-
function j({ style: e }, t, n) {
|
|
929
|
+
const Ce = (e, t = "px") => typeof e == "number" ? e + t : e, A = ({ style: e }, t, n) => {
|
|
927
930
|
if (typeof t == "object")
|
|
928
931
|
for (const [o, s] of Object.entries(t))
|
|
929
932
|
s !== void 0 && (e[o] = Ce(s));
|
|
930
933
|
else
|
|
931
934
|
n !== void 0 && (e[t] = Ce(n));
|
|
932
|
-
}
|
|
933
|
-
const
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
935
|
+
}, Se = (e = 0, t = 0, n = 0, o = 0) => {
|
|
936
|
+
const s = { x: e, y: t, width: n, height: o, top: t, left: e, right: e + n, bottom: t + o };
|
|
937
|
+
return { ...s, toJSON: () => JSON.stringify(s) };
|
|
938
|
+
}, jt = (e) => {
|
|
939
|
+
let t, n = -1, o = !1;
|
|
940
|
+
return {
|
|
941
|
+
next: (...s) => {
|
|
942
|
+
t = s, o || (o = !0, n = requestAnimationFrame(() => {
|
|
943
|
+
e(...t), o = !1;
|
|
944
|
+
}));
|
|
945
|
+
},
|
|
946
|
+
cancel: () => {
|
|
947
|
+
cancelAnimationFrame(n), o = !1;
|
|
948
|
+
}
|
|
949
|
+
};
|
|
950
|
+
}, _e = (e, t, n = "touch") => {
|
|
946
951
|
switch (n) {
|
|
947
952
|
case "center": {
|
|
948
953
|
const o = t.left + t.width / 2, s = t.top + t.height / 2;
|
|
@@ -953,8 +958,18 @@ function Se(e, t, n = "touch") {
|
|
|
953
958
|
case "touch":
|
|
954
959
|
return e.right >= t.left && e.left <= t.right && e.bottom >= t.top && e.top <= t.bottom;
|
|
955
960
|
}
|
|
956
|
-
}
|
|
957
|
-
|
|
961
|
+
}, Dt = () => matchMedia("(hover: none), (pointer: coarse)").matches, $t = () => "safari" in window, qe = (e) => (t, n, o, s = {}) => {
|
|
962
|
+
t instanceof HTMLCollection || t instanceof NodeList ? t = Array.from(t) : Array.isArray(t) || (t = [t]), Array.isArray(n) || (n = [n]);
|
|
963
|
+
for (const i of t)
|
|
964
|
+
if (i)
|
|
965
|
+
for (const r of n)
|
|
966
|
+
i[e](r, o, { capture: !1, ...s });
|
|
967
|
+
return [t, n, o, s];
|
|
968
|
+
}, j = qe("addEventListener"), k = qe("removeEventListener"), Z = (e) => {
|
|
969
|
+
var t;
|
|
970
|
+
const { clientX: n, clientY: o, target: s } = ((t = e.touches) == null ? void 0 : t[0]) ?? e;
|
|
971
|
+
return { x: n, y: o, target: s };
|
|
972
|
+
}, R = (e, t = document) => {
|
|
958
973
|
const n = Array.isArray(e) ? e : [e];
|
|
959
974
|
let o = [];
|
|
960
975
|
for (let s = 0, i = n.length; s < i; s++) {
|
|
@@ -962,21 +977,7 @@ function F(e, t = document) {
|
|
|
962
977
|
typeof r == "string" ? o = o.concat(Array.from(t.querySelectorAll(r))) : r instanceof Element && o.push(r);
|
|
963
978
|
}
|
|
964
979
|
return o;
|
|
965
|
-
}
|
|
966
|
-
const Dt = () => matchMedia("(hover: none), (pointer: coarse)").matches, $t = () => "safari" in window, Ot = (e) => {
|
|
967
|
-
let t, n = -1, o = !1;
|
|
968
|
-
return {
|
|
969
|
-
next(...s) {
|
|
970
|
-
t = s, o || (o = !0, n = requestAnimationFrame(() => {
|
|
971
|
-
e(...t), o = !1;
|
|
972
|
-
}));
|
|
973
|
-
},
|
|
974
|
-
cancel() {
|
|
975
|
-
cancelAnimationFrame(n), o = !1;
|
|
976
|
-
}
|
|
977
|
-
};
|
|
978
|
-
};
|
|
979
|
-
function Pt(e, t) {
|
|
980
|
+
}, Ot = (e, t) => {
|
|
980
981
|
for (const n of t) {
|
|
981
982
|
if (typeof n == "number")
|
|
982
983
|
return e.button === n;
|
|
@@ -995,17 +996,15 @@ function Pt(e, t) {
|
|
|
995
996
|
}
|
|
996
997
|
}
|
|
997
998
|
return !1;
|
|
998
|
-
}
|
|
999
|
-
const { abs: z, max: _e, min: Me, ceil: ke } = Math, Te = (e = []) => ({
|
|
999
|
+
}, { abs: H, max: Me, min: ke, ceil: Le } = Math, Te = (e = []) => ({
|
|
1000
1000
|
stored: e,
|
|
1001
1001
|
selected: [],
|
|
1002
1002
|
touched: [],
|
|
1003
1003
|
changed: { added: [], removed: [] }
|
|
1004
|
-
})
|
|
1005
|
-
class qe extends jt {
|
|
1004
|
+
}), Ie = class extends At {
|
|
1006
1005
|
constructor(t) {
|
|
1007
1006
|
var n, o, s, i, r;
|
|
1008
|
-
super(),
|
|
1007
|
+
super(), this._selection = Te(), this._targetBoundaryScrolled = !0, this._selectables = [], this._areaLocation = { y1: 0, x2: 0, y2: 0, x1: 0 }, this._areaRect = Se(), this._singleClick = !0, this._scrollAvailable = !0, this._scrollingActive = !1, this._scrollSpeed = { x: 0, y: 0 }, this._scrollDelta = { x: 0, y: 0 }, this._lastMousePosition = { x: 0, y: 0 }, this.disable = this._toggleStartEvents.bind(this, !1), this.enable = this._toggleStartEvents, this._options = {
|
|
1009
1008
|
selectionAreaClass: "selection-area",
|
|
1010
1009
|
selectionContainerClass: void 0,
|
|
1011
1010
|
selectables: [],
|
|
@@ -1045,53 +1044,53 @@ class qe extends jt {
|
|
|
1045
1044
|
};
|
|
1046
1045
|
for (const d of Object.getOwnPropertyNames(Object.getPrototypeOf(this)))
|
|
1047
1046
|
typeof this[d] == "function" && (this[d] = this[d].bind(this));
|
|
1048
|
-
const { document:
|
|
1049
|
-
this._area =
|
|
1047
|
+
const { document: l, selectionAreaClass: c, selectionContainerClass: u } = this._options;
|
|
1048
|
+
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), A(this._area, {
|
|
1050
1049
|
willChange: "top, left, bottom, right, width, height",
|
|
1051
1050
|
top: 0,
|
|
1052
1051
|
left: 0,
|
|
1053
1052
|
position: "fixed"
|
|
1054
|
-
}),
|
|
1053
|
+
}), A(this._clippingElement, {
|
|
1055
1054
|
overflow: "hidden",
|
|
1056
1055
|
position: "fixed",
|
|
1057
1056
|
transform: "translate3d(0, 0, 0)",
|
|
1058
1057
|
// https://stackoverflow.com/a/38268846
|
|
1059
1058
|
pointerEvents: "none",
|
|
1060
1059
|
zIndex: "1"
|
|
1061
|
-
}), this._frame =
|
|
1060
|
+
}), this._frame = jt((d) => {
|
|
1062
1061
|
this._recalculateSelectionAreaRect(), this._updateElementSelection(), this._emitEvent("move", d), this._redrawSelectionArea();
|
|
1063
1062
|
}), this.enable();
|
|
1064
1063
|
}
|
|
1065
1064
|
_toggleStartEvents(t = !0) {
|
|
1066
|
-
const { document: n, features: o } = this._options, s = t ?
|
|
1065
|
+
const { document: n, features: o } = this._options, s = t ? j : k;
|
|
1067
1066
|
s(n, "mousedown", this._onTapStart), o.touch && s(n, "touchstart", this._onTapStart, { passive: !1 });
|
|
1068
1067
|
}
|
|
1069
1068
|
_onTapStart(t, n = !1) {
|
|
1070
|
-
const { x: o, y: s, target: i } =
|
|
1071
|
-
if (t instanceof MouseEvent && !
|
|
1069
|
+
const { x: o, y: s, target: i } = Z(t), { document: r, startAreas: l, boundaries: c, features: u, behaviour: d } = this._options, a = i.getBoundingClientRect();
|
|
1070
|
+
if (t instanceof MouseEvent && !Ot(t, d.triggers))
|
|
1072
1071
|
return;
|
|
1073
|
-
const f =
|
|
1072
|
+
const f = R(l, r), g = R(c, r);
|
|
1074
1073
|
this._targetElement = g.find(
|
|
1075
|
-
(v) =>
|
|
1074
|
+
(v) => _e(v.getBoundingClientRect(), a)
|
|
1076
1075
|
);
|
|
1077
1076
|
const p = t.composedPath(), m = f.find((v) => p.includes(v));
|
|
1078
1077
|
if (this._targetBoundary = g.find((v) => p.includes(v)), !this._targetElement || !m || !this._targetBoundary || !n && this._emitEvent("beforestart", t) === !1)
|
|
1079
1078
|
return;
|
|
1080
1079
|
this._areaLocation = { x1: o, y1: s, x2: 0, y2: 0 };
|
|
1081
1080
|
const h = r.scrollingElement ?? r.body;
|
|
1082
|
-
this._scrollDelta = { x: h.scrollLeft, y: h.scrollTop }, this._singleClick = !0, this.clearSelection(!1, !0),
|
|
1081
|
+
this._scrollDelta = { x: h.scrollLeft, y: h.scrollTop }, this._singleClick = !0, this.clearSelection(!1, !0), j(r, ["touchmove", "mousemove"], this._delayedTapMove, { passive: !1 }), j(r, ["mouseup", "touchcancel", "touchend"], this._onTapStop), j(r, "scroll", this._onScroll), u.deselectOnBlur && (this._targetBoundaryScrolled = !1, j(this._targetBoundary, "scroll", this._onStartAreaScroll));
|
|
1083
1082
|
}
|
|
1084
1083
|
_onSingleTap(t) {
|
|
1085
|
-
const { singleTap: { intersect: n }, range: o } = this._options.features, s =
|
|
1084
|
+
const { singleTap: { intersect: n }, range: o } = this._options.features, s = Z(t);
|
|
1086
1085
|
let i;
|
|
1087
1086
|
if (n === "native")
|
|
1088
1087
|
i = s.target;
|
|
1089
1088
|
else if (n === "touch") {
|
|
1090
1089
|
this.resolveSelectables();
|
|
1091
|
-
const { x:
|
|
1090
|
+
const { x: l, y: c } = s;
|
|
1092
1091
|
i = this._selectables.find((u) => {
|
|
1093
1092
|
const { right: d, left: a, top: f, bottom: g } = u.getBoundingClientRect();
|
|
1094
|
-
return
|
|
1093
|
+
return l < d && l > a && c < g && c > f;
|
|
1095
1094
|
});
|
|
1096
1095
|
}
|
|
1097
1096
|
if (!i)
|
|
@@ -1105,59 +1104,59 @@ class qe extends jt {
|
|
|
1105
1104
|
}
|
|
1106
1105
|
const { stored: r } = this._selection;
|
|
1107
1106
|
if (this._emitEvent("start", t), t.shiftKey && o && this._latestElement) {
|
|
1108
|
-
const
|
|
1109
|
-
(a) => a.compareDocumentPosition(
|
|
1110
|
-
),
|
|
1111
|
-
this.select(d), this._latestElement =
|
|
1107
|
+
const l = this._latestElement, [c, u] = l.compareDocumentPosition(i) & 4 ? [i, l] : [l, i], d = [...this._selectables.filter(
|
|
1108
|
+
(a) => a.compareDocumentPosition(c) & 4 && a.compareDocumentPosition(u) & 2
|
|
1109
|
+
), c, u];
|
|
1110
|
+
this.select(d), this._latestElement = l;
|
|
1112
1111
|
} else
|
|
1113
|
-
r.includes(i) && (r.length === 1 || t.ctrlKey || r.every((
|
|
1112
|
+
r.includes(i) && (r.length === 1 || t.ctrlKey || r.every((l) => this._selection.stored.includes(l))) ? this.deselect(i) : (this.select(i), this._latestElement = i);
|
|
1114
1113
|
}
|
|
1115
1114
|
_delayedTapMove(t) {
|
|
1116
|
-
const { container: n, document: o, behaviour: { startThreshold: s } } = this._options, { x1: i, y1: r } = this._areaLocation, { x:
|
|
1115
|
+
const { container: n, document: o, behaviour: { startThreshold: s } } = this._options, { x1: i, y1: r } = this._areaLocation, { x: l, y: c } = Z(t);
|
|
1117
1116
|
if (
|
|
1118
1117
|
// Single number for both coordinates
|
|
1119
|
-
typeof s == "number" &&
|
|
1120
|
-
typeof s == "object" &&
|
|
1118
|
+
typeof s == "number" && H(l + c - (i + r)) >= s || // Different x and y threshold
|
|
1119
|
+
typeof s == "object" && H(l - i) >= s.x || H(c - r) >= s.y
|
|
1121
1120
|
) {
|
|
1122
|
-
if (
|
|
1123
|
-
|
|
1121
|
+
if (k(o, ["mousemove", "touchmove"], this._delayedTapMove, { passive: !1 }), this._emitEvent("beforedrag", t) === !1) {
|
|
1122
|
+
k(o, ["mouseup", "touchcancel", "touchend"], this._onTapStop);
|
|
1124
1123
|
return;
|
|
1125
1124
|
}
|
|
1126
|
-
|
|
1125
|
+
j(o, ["mousemove", "touchmove"], this._onTapMove, { passive: !1 }), A(this._area, "display", "block"), R(n, o)[0].appendChild(this._clippingElement), this.resolveSelectables(), this._singleClick = !1, this._targetRect = this._targetElement.getBoundingClientRect(), this._scrollAvailable = this._targetElement.scrollHeight !== this._targetElement.clientHeight || this._targetElement.scrollWidth !== this._targetElement.clientWidth, this._scrollAvailable && (j(this._targetElement, "wheel", this._wheelScroll, { passive: !1 }), j(this._options.document, "keydown", this._keyboardScroll, { passive: !1 }), this._selectables = this._selectables.filter((u) => this._targetElement.contains(u))), this._setupSelectionArea(), this._emitEvent("start", t), this._onTapMove(t);
|
|
1127
1126
|
}
|
|
1128
1127
|
this._handleMoveEvent(t);
|
|
1129
1128
|
}
|
|
1130
1129
|
_setupSelectionArea() {
|
|
1131
1130
|
const { _clippingElement: t, _targetElement: n, _area: o } = this, s = this._targetRect = n.getBoundingClientRect();
|
|
1132
|
-
this._scrollAvailable ? (
|
|
1131
|
+
this._scrollAvailable ? (A(t, {
|
|
1133
1132
|
top: s.top,
|
|
1134
1133
|
left: s.left,
|
|
1135
1134
|
width: s.width,
|
|
1136
1135
|
height: s.height
|
|
1137
|
-
}),
|
|
1136
|
+
}), A(o, {
|
|
1138
1137
|
marginTop: -s.top,
|
|
1139
1138
|
marginLeft: -s.left
|
|
1140
|
-
})) : (
|
|
1139
|
+
})) : (A(t, {
|
|
1141
1140
|
top: 0,
|
|
1142
1141
|
left: 0,
|
|
1143
1142
|
width: "100%",
|
|
1144
1143
|
height: "100%"
|
|
1145
|
-
}),
|
|
1144
|
+
}), A(o, {
|
|
1146
1145
|
marginTop: 0,
|
|
1147
1146
|
marginLeft: 0
|
|
1148
1147
|
}));
|
|
1149
1148
|
}
|
|
1150
1149
|
_onTapMove(t) {
|
|
1151
|
-
const { _scrollSpeed: n, _areaLocation: o, _options: s, _frame: i } = this, { speedDivider: r } = s.behaviour.scrolling,
|
|
1152
|
-
if (o.x2 =
|
|
1150
|
+
const { _scrollSpeed: n, _areaLocation: o, _options: s, _frame: i } = this, { speedDivider: r } = s.behaviour.scrolling, l = this._targetElement, { x: c, y: u } = Z(t);
|
|
1151
|
+
if (o.x2 = c, o.y2 = u, this._lastMousePosition.x = c, this._lastMousePosition.y = u, this._scrollAvailable && !this._scrollingActive && (n.y || n.x)) {
|
|
1153
1152
|
this._scrollingActive = !0;
|
|
1154
1153
|
const d = () => {
|
|
1155
1154
|
if (!n.x && !n.y) {
|
|
1156
1155
|
this._scrollingActive = !1;
|
|
1157
1156
|
return;
|
|
1158
1157
|
}
|
|
1159
|
-
const { scrollTop: a, scrollLeft: f } =
|
|
1160
|
-
n.y && (
|
|
1158
|
+
const { scrollTop: a, scrollLeft: f } = l;
|
|
1159
|
+
n.y && (l.scrollTop += Le(n.y / r), o.y1 -= l.scrollTop - a), n.x && (l.scrollLeft += Le(n.x / r), o.x1 -= l.scrollLeft - f), i.next(t), requestAnimationFrame(d);
|
|
1161
1160
|
};
|
|
1162
1161
|
requestAnimationFrame(d);
|
|
1163
1162
|
} else
|
|
@@ -1173,19 +1172,28 @@ class qe extends jt {
|
|
|
1173
1172
|
this._areaLocation.x1 += t.x - s, this._areaLocation.y1 += t.y - o, t.x = s, t.y = o, this._setupSelectionArea(), this._frame.next(null);
|
|
1174
1173
|
}
|
|
1175
1174
|
_onStartAreaScroll() {
|
|
1176
|
-
this._targetBoundaryScrolled = !0,
|
|
1175
|
+
this._targetBoundaryScrolled = !0, k(this._targetElement, "scroll", this._onStartAreaScroll);
|
|
1177
1176
|
}
|
|
1178
|
-
|
|
1177
|
+
_wheelScroll(t) {
|
|
1179
1178
|
const { manualSpeed: n } = this._options.behaviour.scrolling, o = t.deltaY ? t.deltaY > 0 ? 1 : -1 : 0, s = t.deltaX ? t.deltaX > 0 ? 1 : -1 : 0;
|
|
1180
1179
|
this._scrollSpeed.y += o * n, this._scrollSpeed.x += s * n, this._onTapMove(t), t.preventDefault();
|
|
1181
1180
|
}
|
|
1181
|
+
_keyboardScroll(t) {
|
|
1182
|
+
const { manualSpeed: n } = this._options.behaviour.scrolling, o = t.key === "ArrowLeft" ? -1 : t.key === "ArrowRight" ? 1 : 0, s = t.key === "ArrowUp" ? -1 : t.key === "ArrowDown" ? 1 : 0;
|
|
1183
|
+
this._scrollSpeed.x += Math.sign(o) * n, this._scrollSpeed.y += Math.sign(s) * n, t.preventDefault(), this._onTapMove({
|
|
1184
|
+
clientX: this._lastMousePosition.x,
|
|
1185
|
+
clientY: this._lastMousePosition.y,
|
|
1186
|
+
preventDefault: () => {
|
|
1187
|
+
}
|
|
1188
|
+
});
|
|
1189
|
+
}
|
|
1182
1190
|
_recalculateSelectionAreaRect() {
|
|
1183
|
-
const { _scrollSpeed: t, _areaLocation: n, _targetElement: o, _options: s } = this, { scrollTop: i, scrollHeight: r, clientHeight:
|
|
1191
|
+
const { _scrollSpeed: t, _areaLocation: n, _targetElement: o, _options: s } = this, { scrollTop: i, scrollHeight: r, clientHeight: l, scrollLeft: c, scrollWidth: u, clientWidth: d } = o, a = this._targetRect, { x1: f, y1: g } = n;
|
|
1184
1192
|
let { x2: p, y2: m } = n;
|
|
1185
1193
|
const { behaviour: { scrolling: { startScrollMargins: h } } } = s;
|
|
1186
|
-
p < a.left + h.x ? (t.x =
|
|
1187
|
-
const v =
|
|
1188
|
-
this._areaRect =
|
|
1194
|
+
p < a.left + h.x ? (t.x = c ? -H(a.left - p + h.x) : 0, p = p < a.left ? a.left : p) : p > a.right - h.x ? (t.x = u - c - d ? H(a.left + a.width - p - h.x) : 0, p = p > a.right ? a.right : p) : t.x = 0, m < a.top + h.y ? (t.y = i ? -H(a.top - m + h.y) : 0, m = m < a.top ? a.top : m) : m > a.bottom - h.y ? (t.y = r - i - l ? H(a.top + a.height - m - h.y) : 0, m = m > a.bottom ? a.bottom : m) : t.y = 0;
|
|
1195
|
+
const v = ke(f, p), y = ke(g, m), b = Me(f, p), x = Me(g, m);
|
|
1196
|
+
this._areaRect = Se(v, y, b - v, x - y);
|
|
1189
1197
|
}
|
|
1190
1198
|
_redrawSelectionArea() {
|
|
1191
1199
|
const { x: t, y: n, width: o, height: s } = this._areaRect, { style: i } = this._area;
|
|
@@ -1194,15 +1202,15 @@ class qe extends jt {
|
|
|
1194
1202
|
_onTapStop(t, n) {
|
|
1195
1203
|
var o;
|
|
1196
1204
|
const { document: s, features: i } = this._options, { _singleClick: r } = this;
|
|
1197
|
-
|
|
1205
|
+
k(this._targetElement, "scroll", this._onStartAreaScroll), k(s, ["mousemove", "touchmove"], this._delayedTapMove), k(s, ["touchmove", "mousemove"], this._onTapMove), k(s, ["mouseup", "touchcancel", "touchend"], this._onTapStop), k(s, "scroll", this._onScroll), this._keepSelection(), t && r && i.singleTap.allow ? this._onSingleTap(t) : !r && !n && (this._updateElementSelection(), this._emitEvent("stop", t)), this._scrollSpeed.x = 0, this._scrollSpeed.y = 0, k(this._targetElement, "wheel", this._wheelScroll, { passive: !0 }), k(this._options.document, "keydown", this._keyboardScroll, { passive: !0 }), this._clippingElement.remove(), (o = this._frame) == null || o.cancel(), A(this._area, "display", "none");
|
|
1198
1206
|
}
|
|
1199
1207
|
_updateElementSelection() {
|
|
1200
|
-
const { _selectables: t, _options: n, _selection: o, _areaRect: s } = this, { stored: i, selected: r, touched:
|
|
1208
|
+
const { _selectables: t, _options: n, _selection: o, _areaRect: s } = this, { stored: i, selected: r, touched: l } = o, { intersect: c, overlap: u } = n.behaviour, d = u === "invert", a = [], f = [], g = [];
|
|
1201
1209
|
for (let m = 0; m < t.length; m++) {
|
|
1202
1210
|
const h = t[m];
|
|
1203
|
-
if (
|
|
1211
|
+
if (_e(s, h.getBoundingClientRect(), c)) {
|
|
1204
1212
|
if (r.includes(h))
|
|
1205
|
-
i.includes(h) && !
|
|
1213
|
+
i.includes(h) && !l.includes(h) && l.push(h);
|
|
1206
1214
|
else if (d && i.includes(h)) {
|
|
1207
1215
|
g.push(h);
|
|
1208
1216
|
continue;
|
|
@@ -1229,20 +1237,20 @@ class qe extends jt {
|
|
|
1229
1237
|
});
|
|
1230
1238
|
}
|
|
1231
1239
|
_keepSelection() {
|
|
1232
|
-
const { _options: t, _selection: n } = this, { selected: o, changed: s, touched: i, stored: r } = n,
|
|
1240
|
+
const { _options: t, _selection: n } = this, { selected: o, changed: s, touched: i, stored: r } = n, l = o.filter((c) => !r.includes(c));
|
|
1233
1241
|
switch (t.behaviour.overlap) {
|
|
1234
1242
|
case "drop": {
|
|
1235
1243
|
n.stored = [
|
|
1236
|
-
...
|
|
1237
|
-
...r.filter((
|
|
1244
|
+
...l,
|
|
1245
|
+
...r.filter((c) => !i.includes(c))
|
|
1238
1246
|
// Elements not touched
|
|
1239
1247
|
];
|
|
1240
1248
|
break;
|
|
1241
1249
|
}
|
|
1242
1250
|
case "invert": {
|
|
1243
1251
|
n.stored = [
|
|
1244
|
-
...
|
|
1245
|
-
...r.filter((
|
|
1252
|
+
...l,
|
|
1253
|
+
...r.filter((c) => !s.removed.includes(c))
|
|
1246
1254
|
// Elements not removed from selection
|
|
1247
1255
|
];
|
|
1248
1256
|
break;
|
|
@@ -1250,7 +1258,7 @@ class qe extends jt {
|
|
|
1250
1258
|
case "keep": {
|
|
1251
1259
|
n.stored = [
|
|
1252
1260
|
...r,
|
|
1253
|
-
...o.filter((
|
|
1261
|
+
...o.filter((c) => !r.includes(c))
|
|
1254
1262
|
// Newly added
|
|
1255
1263
|
];
|
|
1256
1264
|
break;
|
|
@@ -1270,7 +1278,7 @@ class qe extends jt {
|
|
|
1270
1278
|
* Will update everything that can be selected.
|
|
1271
1279
|
*/
|
|
1272
1280
|
resolveSelectables() {
|
|
1273
|
-
this._selectables =
|
|
1281
|
+
this._selectables = R(this._options.selectables, this._options.document);
|
|
1274
1282
|
}
|
|
1275
1283
|
/**
|
|
1276
1284
|
* Same as deselecting, but for all elements currently selected.
|
|
@@ -1314,8 +1322,8 @@ class qe extends jt {
|
|
|
1314
1322
|
* @param quiet - If this should not trigger the move event
|
|
1315
1323
|
*/
|
|
1316
1324
|
select(t, n = !1) {
|
|
1317
|
-
const { changed: o, selected: s, stored: i } = this._selection, r =
|
|
1318
|
-
(
|
|
1325
|
+
const { changed: o, selected: s, stored: i } = this._selection, r = R(t, this._options.document).filter(
|
|
1326
|
+
(l) => !s.includes(l) && !i.includes(l)
|
|
1319
1327
|
);
|
|
1320
1328
|
return i.push(...r), s.push(...r), o.added.push(...r), o.removed = [], this._latestElement = void 0, n || (this._emitEvent("move", null), this._emitEvent("stop", null)), r;
|
|
1321
1329
|
}
|
|
@@ -1325,17 +1333,18 @@ class qe extends jt {
|
|
|
1325
1333
|
* @param quiet - If this should not trigger the move event
|
|
1326
1334
|
*/
|
|
1327
1335
|
deselect(t, n = !1) {
|
|
1328
|
-
const { selected: o, stored: s, changed: i } = this._selection, r =
|
|
1329
|
-
(
|
|
1336
|
+
const { selected: o, stored: s, changed: i } = this._selection, r = R(t, this._options.document).filter(
|
|
1337
|
+
(l) => o.includes(l) || s.includes(l)
|
|
1330
1338
|
);
|
|
1331
|
-
|
|
1332
|
-
...r.filter((
|
|
1333
|
-
), this._latestElement = void 0, n || (this._emitEvent("move", null), this._emitEvent("stop", null))
|
|
1339
|
+
this._selection.stored = s.filter((l) => !r.includes(l)), this._selection.selected = o.filter((l) => !r.includes(l)), this._selection.changed.added = [], this._selection.changed.removed.push(
|
|
1340
|
+
...r.filter((l) => !i.removed.includes(l))
|
|
1341
|
+
), this._latestElement = void 0, n || (this._emitEvent("move", null), this._emitEvent("stop", null));
|
|
1334
1342
|
}
|
|
1335
|
-
}
|
|
1336
|
-
|
|
1343
|
+
};
|
|
1344
|
+
Ie.version = "3.7.1";
|
|
1345
|
+
let Pt = Ie;
|
|
1337
1346
|
function Bt(e) {
|
|
1338
|
-
const t = e.mouseSelectionButton === 2 ? [2] : [0], n = new
|
|
1347
|
+
const t = e.mouseSelectionButton === 2 ? [2] : [0], n = new Pt({
|
|
1339
1348
|
selectables: [".map-container me-tpc"],
|
|
1340
1349
|
boundaries: [e.container],
|
|
1341
1350
|
container: e.selectionContainer,
|
|
@@ -1369,7 +1378,7 @@ function Bt(e) {
|
|
|
1369
1378
|
changed: { added: o, removed: s }
|
|
1370
1379
|
}
|
|
1371
1380
|
}) => {
|
|
1372
|
-
|
|
1381
|
+
L.moved = !0;
|
|
1373
1382
|
for (const i of o)
|
|
1374
1383
|
i.classList.add("selected");
|
|
1375
1384
|
for (const i of s)
|
|
@@ -1389,43 +1398,43 @@ const Ht = function(e, t = !0) {
|
|
|
1389
1398
|
this.mindElixirBox.style.setProperty(i, n[i]);
|
|
1390
1399
|
}
|
|
1391
1400
|
e.cssVar["--gap"] || this.mindElixirBox.style.setProperty("--gap", "30px"), t && this.refresh();
|
|
1392
|
-
},
|
|
1401
|
+
}, K = (e) => {
|
|
1393
1402
|
var o;
|
|
1394
1403
|
const t = (o = e.parent) == null ? void 0 : o.children, n = (t == null ? void 0 : t.indexOf(e)) ?? 0;
|
|
1395
1404
|
return { siblings: t, index: n };
|
|
1396
1405
|
};
|
|
1397
1406
|
function zt(e) {
|
|
1398
|
-
const { siblings: t, index: n } =
|
|
1407
|
+
const { siblings: t, index: n } = K(e);
|
|
1399
1408
|
if (t === void 0)
|
|
1400
1409
|
return;
|
|
1401
1410
|
const o = t[n];
|
|
1402
1411
|
n === 0 ? (t[n] = t[t.length - 1], t[t.length - 1] = o) : (t[n] = t[n - 1], t[n - 1] = o);
|
|
1403
1412
|
}
|
|
1404
1413
|
function Rt(e) {
|
|
1405
|
-
const { siblings: t, index: n } =
|
|
1414
|
+
const { siblings: t, index: n } = K(e);
|
|
1406
1415
|
if (t === void 0)
|
|
1407
1416
|
return;
|
|
1408
1417
|
const o = t[n];
|
|
1409
1418
|
n === t.length - 1 ? (t[n] = t[0], t[0] = o) : (t[n] = t[n + 1], t[n + 1] = o);
|
|
1410
1419
|
}
|
|
1411
|
-
function
|
|
1412
|
-
const { siblings: t, index: n } =
|
|
1420
|
+
function pe(e) {
|
|
1421
|
+
const { siblings: t, index: n } = K(e);
|
|
1413
1422
|
return t === void 0 ? 0 : (t.splice(n, 1), t.length);
|
|
1414
1423
|
}
|
|
1415
1424
|
function Ft(e, t, n) {
|
|
1416
|
-
const { siblings: o, index: s } =
|
|
1425
|
+
const { siblings: o, index: s } = K(n);
|
|
1417
1426
|
o !== void 0 && (t === "before" ? o.splice(s, 0, e) : o.splice(s + 1, 0, e));
|
|
1418
1427
|
}
|
|
1419
1428
|
function qt(e, t) {
|
|
1420
|
-
const { siblings: n, index: o } =
|
|
1429
|
+
const { siblings: n, index: o } = K(e);
|
|
1421
1430
|
n !== void 0 && (n[o] = t, t.children = [e]);
|
|
1422
1431
|
}
|
|
1423
|
-
function
|
|
1424
|
-
if (
|
|
1432
|
+
function Ke(e, t, n) {
|
|
1433
|
+
if (pe(t), e === "in")
|
|
1425
1434
|
n.children ? n.children.push(t) : n.children = [t];
|
|
1426
1435
|
else {
|
|
1427
1436
|
t.direction !== void 0 && (t.direction = n.direction);
|
|
1428
|
-
const { siblings: o, index: s } =
|
|
1437
|
+
const { siblings: o, index: s } = K(n);
|
|
1429
1438
|
if (o === void 0)
|
|
1430
1439
|
return;
|
|
1431
1440
|
e === "before" ? o.splice(s, 0, t) : o.splice(s + 1, 0, t);
|
|
@@ -1433,58 +1442,58 @@ function Ie(e, t, n) {
|
|
|
1433
1442
|
}
|
|
1434
1443
|
const It = function(e, t) {
|
|
1435
1444
|
var n, o;
|
|
1436
|
-
if (e ===
|
|
1437
|
-
return
|
|
1445
|
+
if (e === M)
|
|
1446
|
+
return M;
|
|
1438
1447
|
if (e === D)
|
|
1439
1448
|
return D;
|
|
1440
|
-
if (e ===
|
|
1449
|
+
if (e === ie) {
|
|
1441
1450
|
const s = ((n = document.querySelector(".lhs")) == null ? void 0 : n.childElementCount) || 0, i = ((o = document.querySelector(".rhs")) == null ? void 0 : o.childElementCount) || 0;
|
|
1442
|
-
return s <= i ? (t.direction =
|
|
1451
|
+
return s <= i ? (t.direction = M, M) : (t.direction = D, D);
|
|
1443
1452
|
}
|
|
1444
|
-
},
|
|
1453
|
+
}, Ve = function(e, t, n) {
|
|
1445
1454
|
var i, r;
|
|
1446
1455
|
const o = n.children[0].children[0], s = t.parentElement;
|
|
1447
1456
|
if (s.tagName === "ME-PARENT") {
|
|
1448
|
-
if (
|
|
1457
|
+
if (X(o), s.children[1])
|
|
1449
1458
|
s.nextSibling.appendChild(n);
|
|
1450
1459
|
else {
|
|
1451
|
-
const
|
|
1452
|
-
s.appendChild(
|
|
1460
|
+
const l = e.createChildren([n]);
|
|
1461
|
+
s.appendChild(fe(!0)), s.insertAdjacentElement("afterend", l);
|
|
1453
1462
|
}
|
|
1454
1463
|
e.linkDiv(n.offsetParent);
|
|
1455
1464
|
} else
|
|
1456
|
-
s.tagName === "ME-ROOT" && (It(e.direction, o.nodeObj) ===
|
|
1457
|
-
},
|
|
1465
|
+
s.tagName === "ME-ROOT" && (It(e.direction, o.nodeObj) === M ? (i = e.container.querySelector(".lhs")) == null || i.appendChild(n) : (r = e.container.querySelector(".rhs")) == null || r.appendChild(n), e.linkDiv());
|
|
1466
|
+
}, We = function(e, t) {
|
|
1458
1467
|
const n = e.parentNode;
|
|
1459
1468
|
if (t === 0) {
|
|
1460
1469
|
const o = n.parentNode.parentNode;
|
|
1461
1470
|
o.tagName !== "ME-MAIN" && o.previousSibling.children[1].remove();
|
|
1462
1471
|
}
|
|
1463
1472
|
n.parentNode.remove();
|
|
1464
|
-
},
|
|
1473
|
+
}, Ue = {
|
|
1465
1474
|
before: "beforebegin",
|
|
1466
1475
|
after: "afterend"
|
|
1467
|
-
},
|
|
1476
|
+
}, X = function(e) {
|
|
1468
1477
|
const n = e.parentElement.parentElement.lastElementChild;
|
|
1469
1478
|
(n == null ? void 0 : n.tagName) === "svg" && (n == null || n.remove());
|
|
1470
1479
|
}, Kt = function(e, t) {
|
|
1471
|
-
const n = e.nodeObj, o =
|
|
1480
|
+
const n = e.nodeObj, o = he(n);
|
|
1472
1481
|
o.style && t.style && (t.style = Object.assign(o.style, t.style));
|
|
1473
1482
|
const s = Object.assign(n, t);
|
|
1474
|
-
|
|
1483
|
+
ue(e, s), this.linkDiv(), this.bus.fire("operation", {
|
|
1475
1484
|
name: "reshapeNode",
|
|
1476
1485
|
obj: s,
|
|
1477
1486
|
origin: o
|
|
1478
1487
|
});
|
|
1479
|
-
},
|
|
1488
|
+
}, me = function(e, t, n) {
|
|
1480
1489
|
if (!t)
|
|
1481
1490
|
return null;
|
|
1482
1491
|
const o = t.nodeObj;
|
|
1483
|
-
o.expanded === !1 && (e.expandNode(t, !0), t =
|
|
1492
|
+
o.expanded === !1 && (e.expandNode(t, !0), t = N(o.id));
|
|
1484
1493
|
const s = n || e.generateNewObj();
|
|
1485
1494
|
o.children ? o.children.push(s) : o.children = [s], $(e.nodeData);
|
|
1486
1495
|
const { grp: i, top: r } = e.createWrapper(s);
|
|
1487
|
-
return
|
|
1496
|
+
return Ve(e, t, i), { newTop: r, newNodeObj: s };
|
|
1488
1497
|
}, Vt = function(e, t, n) {
|
|
1489
1498
|
var u, d, a, f;
|
|
1490
1499
|
const o = t || this.currentNode;
|
|
@@ -1493,7 +1502,7 @@ const It = function(e, t) {
|
|
|
1493
1502
|
const s = o.nodeObj;
|
|
1494
1503
|
if (s.parent) {
|
|
1495
1504
|
if (!((u = s.parent) != null && u.parent) && ((a = (d = s.parent) == null ? void 0 : d.children) == null ? void 0 : a.length) === 1) {
|
|
1496
|
-
this.addChild(
|
|
1505
|
+
this.addChild(N(s.parent.id), n);
|
|
1497
1506
|
return;
|
|
1498
1507
|
}
|
|
1499
1508
|
} else {
|
|
@@ -1502,12 +1511,12 @@ const It = function(e, t) {
|
|
|
1502
1511
|
}
|
|
1503
1512
|
const i = n || this.generateNewObj();
|
|
1504
1513
|
if (!((f = s.parent) != null && f.parent)) {
|
|
1505
|
-
const g = o.offsetParent.offsetParent.parentElement.className === "lhs" ?
|
|
1514
|
+
const g = o.offsetParent.offsetParent.parentElement.className === "lhs" ? M : D;
|
|
1506
1515
|
i.direction = g;
|
|
1507
1516
|
}
|
|
1508
1517
|
Ft(i, e, s), $(this.nodeData);
|
|
1509
|
-
const r = o.parentElement, { grp:
|
|
1510
|
-
r.parentElement.insertAdjacentElement(
|
|
1518
|
+
const r = o.parentElement, { grp: l, top: c } = this.createWrapper(i);
|
|
1519
|
+
r.parentElement.insertAdjacentElement(Ue[e], l), this.linkDiv(l.offsetParent), n || this.editTopic(c.firstChild), this.selectNode(c.firstChild, !0), this.bus.fire("operation", {
|
|
1511
1520
|
name: "insertSibling",
|
|
1512
1521
|
type: e,
|
|
1513
1522
|
obj: i
|
|
@@ -1516,16 +1525,16 @@ const It = function(e, t) {
|
|
|
1516
1525
|
const n = e || this.currentNode;
|
|
1517
1526
|
if (!n)
|
|
1518
1527
|
return;
|
|
1519
|
-
|
|
1528
|
+
X(n);
|
|
1520
1529
|
const o = n.nodeObj;
|
|
1521
1530
|
if (!o.parent)
|
|
1522
1531
|
return;
|
|
1523
1532
|
const s = t || this.generateNewObj();
|
|
1524
1533
|
qt(o, s), $(this.nodeData);
|
|
1525
|
-
const i = n.parentElement.parentElement, { grp: r, top:
|
|
1526
|
-
|
|
1527
|
-
const
|
|
1528
|
-
|
|
1534
|
+
const i = n.parentElement.parentElement, { grp: r, top: l } = this.createWrapper(s, !0);
|
|
1535
|
+
l.appendChild(fe(!0)), i.insertAdjacentElement("afterend", r);
|
|
1536
|
+
const c = this.createChildren([i]);
|
|
1537
|
+
l.insertAdjacentElement("afterend", c), this.linkDiv(), t || this.editTopic(l.firstChild), this.selectNode(l.firstChild, !0), this.bus.fire("operation", {
|
|
1529
1538
|
name: "insertParent",
|
|
1530
1539
|
obj: s
|
|
1531
1540
|
});
|
|
@@ -1533,7 +1542,7 @@ const It = function(e, t) {
|
|
|
1533
1542
|
const n = e || this.currentNode;
|
|
1534
1543
|
if (!n)
|
|
1535
1544
|
return;
|
|
1536
|
-
const o =
|
|
1545
|
+
const o = me(this, n, t);
|
|
1537
1546
|
if (!o)
|
|
1538
1547
|
return;
|
|
1539
1548
|
const { newTop: s, newNodeObj: i } = o;
|
|
@@ -1542,29 +1551,29 @@ const It = function(e, t) {
|
|
|
1542
1551
|
obj: i
|
|
1543
1552
|
}), t || this.editTopic(s.firstChild), this.selectNode(s.firstChild, !0);
|
|
1544
1553
|
}, Yt = function(e, t) {
|
|
1545
|
-
const n =
|
|
1546
|
-
|
|
1547
|
-
const o =
|
|
1554
|
+
const n = he(e.nodeObj);
|
|
1555
|
+
de(n);
|
|
1556
|
+
const o = me(this, t, n);
|
|
1548
1557
|
if (!o)
|
|
1549
1558
|
return;
|
|
1550
1559
|
const { newNodeObj: s } = o;
|
|
1551
|
-
this.selectNode(
|
|
1560
|
+
this.selectNode(N(s.id)), this.bus.fire("operation", {
|
|
1552
1561
|
name: "copyNode",
|
|
1553
1562
|
obj: s
|
|
1554
1563
|
});
|
|
1555
1564
|
}, Xt = function(e, t) {
|
|
1556
|
-
e =
|
|
1565
|
+
e = re(e);
|
|
1557
1566
|
const n = [];
|
|
1558
1567
|
for (let o = 0; o < e.length; o++) {
|
|
1559
|
-
const s = e[o], i =
|
|
1560
|
-
|
|
1561
|
-
const r =
|
|
1568
|
+
const s = e[o], i = he(s.nodeObj);
|
|
1569
|
+
de(i);
|
|
1570
|
+
const r = me(this, t, i);
|
|
1562
1571
|
if (!r)
|
|
1563
1572
|
return;
|
|
1564
|
-
const { newNodeObj:
|
|
1565
|
-
n.push(
|
|
1573
|
+
const { newNodeObj: l } = r;
|
|
1574
|
+
n.push(l);
|
|
1566
1575
|
}
|
|
1567
|
-
this.selectNodes(n.map((o) =>
|
|
1576
|
+
this.selectNodes(n.map((o) => N(o.id))), this.bus.fire("operation", {
|
|
1568
1577
|
name: "copyNodes",
|
|
1569
1578
|
objs: n
|
|
1570
1579
|
});
|
|
@@ -1598,12 +1607,12 @@ const It = function(e, t) {
|
|
|
1598
1607
|
const n = t.nodeObj;
|
|
1599
1608
|
if (!n.parent)
|
|
1600
1609
|
throw new Error("Can not remove root node");
|
|
1601
|
-
const o = n.parent.children, s = o.findIndex((
|
|
1602
|
-
if (
|
|
1603
|
-
const
|
|
1604
|
-
this.selectNode(
|
|
1610
|
+
const o = n.parent.children, s = o.findIndex((l) => l === n), i = pe(n);
|
|
1611
|
+
if (We(t, i), o.length !== 0) {
|
|
1612
|
+
const l = o[s] || o[s - 1];
|
|
1613
|
+
this.selectNode(N(l.id));
|
|
1605
1614
|
} else
|
|
1606
|
-
this.selectNode(
|
|
1615
|
+
this.selectNode(N(n.parent.id));
|
|
1607
1616
|
this.linkDiv(), this.bus.fire("operation", {
|
|
1608
1617
|
name: "removeNode",
|
|
1609
1618
|
obj: n,
|
|
@@ -1611,41 +1620,41 @@ const It = function(e, t) {
|
|
|
1611
1620
|
originParentId: (r = n == null ? void 0 : n.parent) == null ? void 0 : r.id
|
|
1612
1621
|
});
|
|
1613
1622
|
}, Qt = function(e) {
|
|
1614
|
-
e =
|
|
1623
|
+
e = re(e);
|
|
1615
1624
|
for (const t of e) {
|
|
1616
1625
|
const n = t.nodeObj;
|
|
1617
1626
|
if (!n.parent)
|
|
1618
1627
|
continue;
|
|
1619
|
-
const o =
|
|
1620
|
-
|
|
1628
|
+
const o = pe(n);
|
|
1629
|
+
We(t, o);
|
|
1621
1630
|
}
|
|
1622
1631
|
this.linkDiv(), this.bus.fire("operation", {
|
|
1623
1632
|
name: "removeNodes",
|
|
1624
1633
|
objs: e.map((t) => t.nodeObj)
|
|
1625
1634
|
});
|
|
1626
1635
|
}, en = function(e, t) {
|
|
1627
|
-
e =
|
|
1636
|
+
e = re(e);
|
|
1628
1637
|
const n = t.nodeObj;
|
|
1629
|
-
n.expanded === !1 && (this.expandNode(t, !0), t =
|
|
1638
|
+
n.expanded === !1 && (this.expandNode(t, !0), t = N(n.id));
|
|
1630
1639
|
for (const o of e) {
|
|
1631
1640
|
const s = o.nodeObj;
|
|
1632
|
-
|
|
1641
|
+
Ke("in", s, n), $(this.nodeData);
|
|
1633
1642
|
const i = o.parentElement;
|
|
1634
|
-
|
|
1643
|
+
Ve(this, t, i.parentElement);
|
|
1635
1644
|
}
|
|
1636
1645
|
this.linkDiv(), this.bus.fire("operation", {
|
|
1637
1646
|
name: "moveNodeIn",
|
|
1638
1647
|
objs: e.map((o) => o.nodeObj),
|
|
1639
1648
|
toObj: n
|
|
1640
1649
|
});
|
|
1641
|
-
},
|
|
1642
|
-
e =
|
|
1650
|
+
}, Ye = (e, t, n, o) => {
|
|
1651
|
+
e = re(e), t === "after" && (e = e.reverse());
|
|
1643
1652
|
const s = n.nodeObj;
|
|
1644
1653
|
for (const i of e) {
|
|
1645
1654
|
const r = i.nodeObj;
|
|
1646
|
-
|
|
1647
|
-
const
|
|
1648
|
-
n.parentElement.parentNode.insertAdjacentElement(
|
|
1655
|
+
Ke(t, r, s), $(o.nodeData), X(i);
|
|
1656
|
+
const l = i.parentElement.parentNode;
|
|
1657
|
+
n.parentElement.parentNode.insertAdjacentElement(Ue[t], l);
|
|
1649
1658
|
}
|
|
1650
1659
|
o.linkDiv(), o.bus.fire("operation", {
|
|
1651
1660
|
name: t === "before" ? "moveNodeBefore" : "moveNodeAfter",
|
|
@@ -1653,15 +1662,15 @@ const It = function(e, t) {
|
|
|
1653
1662
|
toObj: s
|
|
1654
1663
|
});
|
|
1655
1664
|
}, tn = function(e, t) {
|
|
1656
|
-
|
|
1665
|
+
Ye(e, "before", t, this);
|
|
1657
1666
|
}, nn = function(e, t) {
|
|
1658
|
-
|
|
1667
|
+
Ye(e, "after", t, this);
|
|
1659
1668
|
}, on = function(e) {
|
|
1660
1669
|
const t = e || this.currentNode;
|
|
1661
1670
|
t && (t.nodeObj.dangerouslySetInnerHTML || this.editTopic(t));
|
|
1662
1671
|
}, sn = function(e, t) {
|
|
1663
1672
|
e.text.textContent = t, e.nodeObj.topic = t, this.linkDiv();
|
|
1664
|
-
},
|
|
1673
|
+
}, Xe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1665
1674
|
__proto__: null,
|
|
1666
1675
|
addChild: Ut,
|
|
1667
1676
|
beginEdit: on,
|
|
@@ -1677,10 +1686,10 @@ const It = function(e, t) {
|
|
|
1677
1686
|
removeNode: Zt,
|
|
1678
1687
|
removeNodes: Qt,
|
|
1679
1688
|
reshapeNode: Kt,
|
|
1680
|
-
rmSubline:
|
|
1689
|
+
rmSubline: X,
|
|
1681
1690
|
setNodeTopic: sn
|
|
1682
1691
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1683
|
-
function
|
|
1692
|
+
function Ge(e) {
|
|
1684
1693
|
return {
|
|
1685
1694
|
nodeData: e.isFocusMode ? e.nodeDataBackup : e.nodeData,
|
|
1686
1695
|
arrows: e.arrows,
|
|
@@ -1692,14 +1701,14 @@ function Xe(e) {
|
|
|
1692
1701
|
const rn = function(e, t, n) {
|
|
1693
1702
|
if (e) {
|
|
1694
1703
|
if (this.clearSelection(), typeof e == "string") {
|
|
1695
|
-
const o =
|
|
1704
|
+
const o = N(e);
|
|
1696
1705
|
return o ? this.selectNode(o) : void 0;
|
|
1697
1706
|
}
|
|
1698
1707
|
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);
|
|
1699
1708
|
}
|
|
1700
|
-
},
|
|
1709
|
+
}, ln = function() {
|
|
1701
1710
|
this.currentNode && (this.currentNode.className = ""), this.currentNode = null, this.bus.fire("unselectNode");
|
|
1702
|
-
},
|
|
1711
|
+
}, cn = function(e) {
|
|
1703
1712
|
this.clearSelection();
|
|
1704
1713
|
for (const t of e)
|
|
1705
1714
|
t.className = "selected";
|
|
@@ -1715,7 +1724,7 @@ const rn = function(e, t, n) {
|
|
|
1715
1724
|
}, dn = function() {
|
|
1716
1725
|
this.unselectNode(), this.unselectNodes(), this.unselectSummary(), this.unselectArrow();
|
|
1717
1726
|
}, hn = function() {
|
|
1718
|
-
const e =
|
|
1727
|
+
const e = Ge(this);
|
|
1719
1728
|
return JSON.stringify(e, (t, n) => {
|
|
1720
1729
|
if (!(t === "parent" && typeof n != "string"))
|
|
1721
1730
|
return n;
|
|
@@ -1723,7 +1732,7 @@ const rn = function(e, t, n) {
|
|
|
1723
1732
|
}, un = function() {
|
|
1724
1733
|
return JSON.parse(this.getDataString());
|
|
1725
1734
|
}, fn = function() {
|
|
1726
|
-
const e =
|
|
1735
|
+
const e = Ge(this).nodeData;
|
|
1727
1736
|
let t = "# " + e.topic + `
|
|
1728
1737
|
|
|
1729
1738
|
`;
|
|
@@ -1761,7 +1770,7 @@ const rn = function(e, t, n) {
|
|
|
1761
1770
|
const n = e.nodeObj;
|
|
1762
1771
|
typeof t == "boolean" ? n.expanded = t : n.expanded !== !1 ? n.expanded = !1 : n.expanded = !0;
|
|
1763
1772
|
const o = e.parentNode, s = o.children[1];
|
|
1764
|
-
if (s.expanded = n.expanded, s.className = n.expanded ? "minus" : "",
|
|
1773
|
+
if (s.expanded = n.expanded, s.className = n.expanded ? "minus" : "", X(e), n.expanded) {
|
|
1765
1774
|
const i = this.createChildren(
|
|
1766
1775
|
n.children.map((r) => this.createWrapper(r).grp)
|
|
1767
1776
|
);
|
|
@@ -1789,10 +1798,10 @@ const rn = function(e, t, n) {
|
|
|
1789
1798
|
refresh: _n,
|
|
1790
1799
|
scale: gn,
|
|
1791
1800
|
selectNode: rn,
|
|
1792
|
-
selectNodes:
|
|
1801
|
+
selectNodes: cn,
|
|
1793
1802
|
setLocale: Cn,
|
|
1794
1803
|
toCenter: vn,
|
|
1795
|
-
unselectNode:
|
|
1804
|
+
unselectNode: ln,
|
|
1796
1805
|
unselectNodes: an
|
|
1797
1806
|
}, Symbol.toStringTag, { value: "Module" })), kn = function(e) {
|
|
1798
1807
|
return {
|
|
@@ -1820,21 +1829,21 @@ const rn = function(e, t, n) {
|
|
|
1820
1829
|
this.moved = !1, this.mousedown = !1;
|
|
1821
1830
|
}
|
|
1822
1831
|
};
|
|
1823
|
-
},
|
|
1832
|
+
}, Ae = {
|
|
1824
1833
|
create: kn
|
|
1825
1834
|
};
|
|
1826
|
-
function
|
|
1827
|
-
const { offsetLeft: o, offsetTop: s } = O(e.nodes, t), i = t.offsetWidth, r = t.offsetHeight,
|
|
1835
|
+
function se(e, t, n) {
|
|
1836
|
+
const { offsetLeft: o, offsetTop: s } = O(e.nodes, t), i = t.offsetWidth, r = t.offsetHeight, l = o + i / 2, c = s + r / 2, u = l + n.x, d = c + n.y;
|
|
1828
1837
|
return {
|
|
1829
1838
|
w: i,
|
|
1830
1839
|
h: r,
|
|
1831
|
-
cx:
|
|
1832
|
-
cy:
|
|
1840
|
+
cx: l,
|
|
1841
|
+
cy: c,
|
|
1833
1842
|
ctrlX: u,
|
|
1834
1843
|
ctrlY: d
|
|
1835
1844
|
};
|
|
1836
1845
|
}
|
|
1837
|
-
function
|
|
1846
|
+
function F(e) {
|
|
1838
1847
|
let t, n;
|
|
1839
1848
|
const o = (e.cy - e.ctrlY) / (e.ctrlX - e.cx);
|
|
1840
1849
|
return o > e.h / e.w || o < -e.h / e.w ? e.cy - e.ctrlY < 0 ? (t = e.cx - e.h / 2 / o, n = e.cy + e.h / 2) : (t = e.cx + e.h / 2 / o, n = e.cy - e.h / 2) : e.cx - e.ctrlX < 0 ? (t = e.cx + e.w / 2, n = e.cy - e.w * o / 2) : (t = e.cx - e.w / 2, n = e.cy + e.w * o / 2), {
|
|
@@ -1842,26 +1851,26 @@ function q(e) {
|
|
|
1842
1851
|
y: n
|
|
1843
1852
|
};
|
|
1844
1853
|
}
|
|
1845
|
-
const
|
|
1854
|
+
const Ln = function(e, t, n, o) {
|
|
1846
1855
|
const s = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
1847
|
-
return
|
|
1856
|
+
return E(s, {
|
|
1848
1857
|
"text-anchor": "middle",
|
|
1849
1858
|
x: t + "",
|
|
1850
1859
|
y: n + "",
|
|
1851
1860
|
fill: o || "#666"
|
|
1852
1861
|
}), s.dataset.type = "custom-link", s.innerHTML = e, s;
|
|
1853
|
-
},
|
|
1862
|
+
}, Je = function(e, t, n, o, s) {
|
|
1854
1863
|
if (!t || !n)
|
|
1855
1864
|
return;
|
|
1856
1865
|
performance.now();
|
|
1857
|
-
const i =
|
|
1858
|
-
`M ${
|
|
1866
|
+
const i = se(e, t, o.delta1), r = se(e, n, o.delta2), { x: l, y: c } = F(i), { ctrlX: u, ctrlY: d } = i, { ctrlX: a, ctrlY: f } = r, { x: g, y: p } = F(r), m = Be(a, f, g, p), h = pt(
|
|
1867
|
+
`M ${l} ${c} C ${u} ${d} ${a} ${f} ${g} ${p}`,
|
|
1859
1868
|
`M ${m.x1} ${m.y1} L ${g} ${p} L ${m.x2} ${m.y2}`
|
|
1860
|
-
), v =
|
|
1861
|
-
h.appendChild(b), h.arrowObj = o, h.dataset.linkid = o.id, e.linkSvgGroup.appendChild(h), s || (e.arrows.push(o), e.currentArrow = h,
|
|
1862
|
-
},
|
|
1869
|
+
), v = l / 8 + u * 3 / 8 + a * 3 / 8 + g / 8, y = c / 8 + d * 3 / 8 + f * 3 / 8 + p / 8, b = Ln(o.label, v, y, e.theme.cssVar["--color"]);
|
|
1870
|
+
h.appendChild(b), h.arrowObj = o, h.dataset.linkid = o.id, e.linkSvgGroup.appendChild(h), s || (e.arrows.push(o), e.currentArrow = h, Qe(e, o, i, r)), performance.now();
|
|
1871
|
+
}, Tn = function(e, t) {
|
|
1863
1872
|
const n = {
|
|
1864
|
-
id:
|
|
1873
|
+
id: Y(),
|
|
1865
1874
|
label: "Custom Link",
|
|
1866
1875
|
from: e.nodeObj.id,
|
|
1867
1876
|
to: t.nodeObj.id,
|
|
@@ -1874,7 +1883,7 @@ const Tn = function(e, t, n, o) {
|
|
|
1874
1883
|
y: -200
|
|
1875
1884
|
}
|
|
1876
1885
|
};
|
|
1877
|
-
|
|
1886
|
+
Je(this, e, t, n), this.bus.fire("operation", {
|
|
1878
1887
|
name: "createArrow",
|
|
1879
1888
|
obj: n
|
|
1880
1889
|
});
|
|
@@ -1882,7 +1891,7 @@ const Tn = function(e, t, n, o) {
|
|
|
1882
1891
|
let t;
|
|
1883
1892
|
if (e ? t = e : t = this.currentArrow, !t)
|
|
1884
1893
|
return;
|
|
1885
|
-
|
|
1894
|
+
Ze(this);
|
|
1886
1895
|
const n = t.arrowObj.id;
|
|
1887
1896
|
this.arrows = this.arrows.filter((o) => o.id !== n), t.remove(), this.bus.fire("operation", {
|
|
1888
1897
|
name: "removeArrow",
|
|
@@ -1892,56 +1901,56 @@ const Tn = function(e, t, n, o) {
|
|
|
1892
1901
|
});
|
|
1893
1902
|
}, jn = function(e) {
|
|
1894
1903
|
this.currentArrow = e;
|
|
1895
|
-
const t = e.arrowObj, n =
|
|
1896
|
-
|
|
1904
|
+
const t = e.arrowObj, n = N(t.from), o = N(t.to), s = se(this, n, t.delta1), i = se(this, o, t.delta2);
|
|
1905
|
+
Qe(this, t, s, i);
|
|
1897
1906
|
}, Dn = function() {
|
|
1898
|
-
this.currentArrow = null,
|
|
1899
|
-
},
|
|
1907
|
+
this.currentArrow = null, Ze(this);
|
|
1908
|
+
}, Ze = function(e) {
|
|
1900
1909
|
e.linkController.style.display = "none", e.P2.style.display = "none", e.P3.style.display = "none";
|
|
1901
|
-
},
|
|
1910
|
+
}, Qe = function(e, t, n, o) {
|
|
1902
1911
|
var f;
|
|
1903
1912
|
e.linkController.style.display = "initial", e.P2.style.display = "initial", e.P3.style.display = "initial", e.nodes.appendChild(e.linkController), e.nodes.appendChild(e.P2), e.nodes.appendChild(e.P3);
|
|
1904
|
-
let { x: s, y: i } =
|
|
1905
|
-
e.P2.style.cssText = `top:${
|
|
1913
|
+
let { x: s, y: i } = F(n), { ctrlX: r, ctrlY: l } = n, { ctrlX: c, ctrlY: u } = o, { x: d, y: a } = F(o);
|
|
1914
|
+
e.P2.style.cssText = `top:${l}px;left:${r}px;`, e.P3.style.cssText = `top:${u}px;left:${c}px;`, E(e.line1, {
|
|
1906
1915
|
x1: s + "",
|
|
1907
1916
|
y1: i + "",
|
|
1908
1917
|
x2: r + "",
|
|
1909
|
-
y2:
|
|
1910
|
-
}),
|
|
1911
|
-
x1:
|
|
1918
|
+
y2: l + ""
|
|
1919
|
+
}), E(e.line2, {
|
|
1920
|
+
x1: c + "",
|
|
1912
1921
|
y1: u + "",
|
|
1913
1922
|
x2: d + "",
|
|
1914
1923
|
y2: a + ""
|
|
1915
|
-
}), e.helper1 && (e.helper1.destory(e.map), (f = e.helper2) == null || f.destory(e.map)), e.helper1 =
|
|
1924
|
+
}), e.helper1 && (e.helper1.destory(e.map), (f = e.helper2) == null || f.destory(e.map)), e.helper1 = Ae.create(e.P2), e.helper2 = Ae.create(e.P3), e.helper1.init(e.map, (g, p) => {
|
|
1916
1925
|
var y;
|
|
1917
|
-
r = r + g / e.scaleVal,
|
|
1918
|
-
const m =
|
|
1926
|
+
r = r + g / e.scaleVal, l = l + p / e.scaleVal;
|
|
1927
|
+
const m = F({ ...n, ctrlX: r, ctrlY: l });
|
|
1919
1928
|
s = m.x, i = m.y;
|
|
1920
|
-
const h = s / 8 + r * 3 / 8 +
|
|
1921
|
-
e.P2.style.top =
|
|
1929
|
+
const h = s / 8 + r * 3 / 8 + c * 3 / 8 + d / 8, v = i / 8 + l * 3 / 8 + u * 3 / 8 + a / 8;
|
|
1930
|
+
e.P2.style.top = l + "px", e.P2.style.left = r + "px", (y = e.currentArrow) == null || y.children[0].setAttribute("d", `M ${s} ${i} C ${r} ${l} ${c} ${u} ${d} ${a}`), E(e.currentArrow.children[2], {
|
|
1922
1931
|
x: h + "",
|
|
1923
1932
|
y: v + ""
|
|
1924
|
-
}),
|
|
1933
|
+
}), E(e.line1, {
|
|
1925
1934
|
x1: s + "",
|
|
1926
1935
|
y1: i + "",
|
|
1927
1936
|
x2: r + "",
|
|
1928
|
-
y2:
|
|
1929
|
-
}), t.delta1.x = r - n.cx, t.delta1.y =
|
|
1937
|
+
y2: l + ""
|
|
1938
|
+
}), t.delta1.x = r - n.cx, t.delta1.y = l - n.cy;
|
|
1930
1939
|
}), e.helper2.init(e.map, (g, p) => {
|
|
1931
1940
|
var b, x;
|
|
1932
|
-
|
|
1933
|
-
const m =
|
|
1941
|
+
c = c + g / e.scaleVal, u = u + p / e.scaleVal;
|
|
1942
|
+
const m = F({ ...o, ctrlX: c, ctrlY: u });
|
|
1934
1943
|
d = m.x, a = m.y;
|
|
1935
|
-
const h = s / 8 + r * 3 / 8 +
|
|
1936
|
-
e.P3.style.top = u + "px", e.P3.style.left =
|
|
1944
|
+
const h = s / 8 + r * 3 / 8 + c * 3 / 8 + d / 8, v = i / 8 + l * 3 / 8 + u * 3 / 8 + a / 8, y = Be(c, u, d, a);
|
|
1945
|
+
e.P3.style.top = u + "px", e.P3.style.left = c + "px", (b = e.currentArrow) == null || b.children[0].setAttribute("d", `M ${s} ${i} C ${r} ${l} ${c} ${u} ${d} ${a}`), (x = e.currentArrow) == null || x.children[1].setAttribute("d", `M ${y.x1} ${y.y1} L ${d} ${a} L ${y.x2} ${y.y2}`), E(e.currentArrow.children[2], {
|
|
1937
1946
|
x: h + "",
|
|
1938
1947
|
y: v + ""
|
|
1939
|
-
}),
|
|
1940
|
-
x1:
|
|
1948
|
+
}), E(e.line2, {
|
|
1949
|
+
x1: c + "",
|
|
1941
1950
|
y1: u + "",
|
|
1942
1951
|
x2: d + "",
|
|
1943
1952
|
y2: a + ""
|
|
1944
|
-
}), t.delta2.x =
|
|
1953
|
+
}), t.delta2.x = c - o.cx, t.delta2.y = u - o.cy;
|
|
1945
1954
|
});
|
|
1946
1955
|
};
|
|
1947
1956
|
function $n() {
|
|
@@ -1949,7 +1958,7 @@ function $n() {
|
|
|
1949
1958
|
for (let e = 0; e < this.arrows.length; e++) {
|
|
1950
1959
|
const t = this.arrows[e];
|
|
1951
1960
|
try {
|
|
1952
|
-
|
|
1961
|
+
Je(this, N(t.from), N(t.to), t, !0);
|
|
1953
1962
|
} catch {
|
|
1954
1963
|
}
|
|
1955
1964
|
}
|
|
@@ -1959,7 +1968,7 @@ function On(e) {
|
|
|
1959
1968
|
if (!e)
|
|
1960
1969
|
return;
|
|
1961
1970
|
const t = e.children[2];
|
|
1962
|
-
|
|
1971
|
+
Re(this, t, (n) => {
|
|
1963
1972
|
var i;
|
|
1964
1973
|
const o = e.arrowObj, s = ((i = n.textContent) == null ? void 0 : i.trim()) || "";
|
|
1965
1974
|
s === "" ? o.label = origin : o.label = s, n.remove(), s !== origin && (t.innerHTML = o.label, this.linkDiv(), this.bus.fire("operation", {
|
|
@@ -1969,11 +1978,11 @@ function On(e) {
|
|
|
1969
1978
|
});
|
|
1970
1979
|
}
|
|
1971
1980
|
function Pn() {
|
|
1972
|
-
this.arrows = this.arrows.filter((e) =>
|
|
1981
|
+
this.arrows = this.arrows.filter((e) => ne(e.from, this.nodeData) && ne(e.to, this.nodeData));
|
|
1973
1982
|
}
|
|
1974
1983
|
const Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1975
1984
|
__proto__: null,
|
|
1976
|
-
createArrow:
|
|
1985
|
+
createArrow: Tn,
|
|
1977
1986
|
editArrowLabel: On,
|
|
1978
1987
|
removeArrow: An,
|
|
1979
1988
|
renderArrow: $n,
|
|
@@ -1981,7 +1990,7 @@ const Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1981
1990
|
tidyArrow: Pn,
|
|
1982
1991
|
unselectArrow: Dn
|
|
1983
1992
|
}, Symbol.toStringTag, { value: "Module" })), Hn = function(e) {
|
|
1984
|
-
var
|
|
1993
|
+
var c, u;
|
|
1985
1994
|
if (e.length === 0)
|
|
1986
1995
|
throw new Error("No selected node.");
|
|
1987
1996
|
if (e.length === 1) {
|
|
@@ -2008,66 +2017,66 @@ const Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2008
2017
|
let o = 0;
|
|
2009
2018
|
e:
|
|
2010
2019
|
for (; o < t; o++) {
|
|
2011
|
-
const d = (
|
|
2020
|
+
const d = (c = n[0][o]) == null ? void 0 : c.node;
|
|
2012
2021
|
for (let a = 1; a < n.length; a++)
|
|
2013
2022
|
if (((u = n[a][o]) == null ? void 0 : u.node) !== d)
|
|
2014
2023
|
break e;
|
|
2015
2024
|
}
|
|
2016
2025
|
if (!o)
|
|
2017
2026
|
throw new Error("Can not select root node.");
|
|
2018
|
-
const s = n.map((d) => d[o - 1].index).sort(), i = s[0] || 0, r = s[s.length - 1] || 0,
|
|
2019
|
-
if (!
|
|
2027
|
+
const s = n.map((d) => d[o - 1].index).sort(), i = s[0] || 0, r = s[s.length - 1] || 0, l = n[0][o - 1].node;
|
|
2028
|
+
if (!l.parent)
|
|
2020
2029
|
throw new Error("Please select nodes in the same main topic.");
|
|
2021
2030
|
return {
|
|
2022
|
-
parent:
|
|
2031
|
+
parent: l.id,
|
|
2023
2032
|
start: i,
|
|
2024
2033
|
end: r
|
|
2025
2034
|
};
|
|
2026
2035
|
}, zn = function(e) {
|
|
2027
2036
|
const t = document.createElementNS("http://www.w3.org/2000/svg", "g");
|
|
2028
2037
|
return t.setAttribute("id", e), t;
|
|
2029
|
-
},
|
|
2038
|
+
}, je = function(e, t) {
|
|
2030
2039
|
const n = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
2031
|
-
return
|
|
2040
|
+
return E(n, {
|
|
2032
2041
|
d: e,
|
|
2033
2042
|
stroke: t || "#666",
|
|
2034
2043
|
fill: "none",
|
|
2035
2044
|
"stroke-linecap": "round",
|
|
2036
2045
|
"stroke-width": "2"
|
|
2037
2046
|
}), n;
|
|
2038
|
-
},
|
|
2047
|
+
}, De = function(e, t, n, o, s) {
|
|
2039
2048
|
const i = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
2040
|
-
return
|
|
2049
|
+
return E(i, {
|
|
2041
2050
|
"text-anchor": o,
|
|
2042
2051
|
x: t + "",
|
|
2043
2052
|
y: n + "",
|
|
2044
2053
|
fill: s || "#666"
|
|
2045
2054
|
}), i.innerHTML = e, i;
|
|
2046
|
-
}, Rn = (e) =>
|
|
2055
|
+
}, Rn = (e) => N(e).parentElement.parentElement, Fn = function({ parent: e, start: t }) {
|
|
2047
2056
|
var i, r;
|
|
2048
|
-
const n =
|
|
2057
|
+
const n = N(e), o = n.nodeObj;
|
|
2049
2058
|
let s;
|
|
2050
|
-
return o.parent ? s = (i = n.closest("me-main")) == null ? void 0 : i.className : s = (r =
|
|
2051
|
-
},
|
|
2052
|
-
var
|
|
2053
|
-
const { id: n, text: o, parent: s, start: i, end: r } = t,
|
|
2059
|
+
return o.parent ? s = (i = n.closest("me-main")) == null ? void 0 : i.className : s = (r = N(o.children[t].id).closest("me-main")) == null ? void 0 : r.className, s;
|
|
2060
|
+
}, et = function(e, t) {
|
|
2061
|
+
var C;
|
|
2062
|
+
const { id: n, text: o, parent: s, start: i, end: r } = t, l = e.nodes, u = N(s).nodeObj, d = Fn(t);
|
|
2054
2063
|
let a = 1 / 0, f = 0, g = 0, p = 0;
|
|
2055
2064
|
for (let P = i; P <= r; P++) {
|
|
2056
|
-
const
|
|
2057
|
-
if (!
|
|
2065
|
+
const V = (C = u.children) == null ? void 0 : C[P];
|
|
2066
|
+
if (!V)
|
|
2058
2067
|
return e.removeSummary(n), null;
|
|
2059
|
-
const B = Rn(
|
|
2060
|
-
P === i && (g =
|
|
2068
|
+
const B = Rn(V.id), { offsetLeft: G, offsetTop: ge } = O(l, B), ve = i === r ? 10 : 20;
|
|
2069
|
+
P === i && (g = ge + ve), P === r && (p = ge + B.offsetHeight - ve), G < a && (a = G), B.offsetWidth + G > f && (f = B.offsetWidth + G);
|
|
2061
2070
|
}
|
|
2062
2071
|
let m, h;
|
|
2063
2072
|
const v = g + 10, y = p + 10, b = (v + y) / 2, x = e.theme.cssVar["--color"];
|
|
2064
|
-
d === "lhs" ? (m =
|
|
2073
|
+
d === "lhs" ? (m = je(`M ${a + 10} ${v} c -5 0 -10 5 -10 10 L ${a} ${y - 10} c 0 5 5 10 10 10 M ${a} ${b} h -10`, x), h = De(o, a - 20, b + 6, "end", x)) : (m = je(`M ${f - 10} ${v} c 5 0 10 5 10 10 L ${f} ${y - 10} c 0 5 -5 10 -10 10 M ${f} ${b} h 10`, x), h = De(o, f + 20, b + 6, "start", x));
|
|
2065
2074
|
const w = zn("s-" + n);
|
|
2066
2075
|
return w.appendChild(m), w.appendChild(h), w.summaryObj = t, e.summarySvg.appendChild(w), w;
|
|
2067
2076
|
}, qn = function() {
|
|
2068
2077
|
let e = [];
|
|
2069
2078
|
this.currentNode ? e = [this.currentNode] : this.currentNodes && (e = this.currentNodes);
|
|
2070
|
-
const { parent: t, start: n, end: o } = Hn(e), s = { id:
|
|
2079
|
+
const { parent: t, start: n, end: o } = Hn(e), s = { id: Y(), parent: t, start: n, end: o, text: "summary" }, i = et(this, s);
|
|
2071
2080
|
this.summaries.push(s), this.editSummary(i), this.bus.fire("operation", {
|
|
2072
2081
|
name: "createSummary",
|
|
2073
2082
|
obj: s
|
|
@@ -2081,7 +2090,7 @@ const Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2081
2090
|
});
|
|
2082
2091
|
}, Kn = function(e) {
|
|
2083
2092
|
const t = e.children[1].getBBox(), n = 6, o = 3, s = document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
|
2084
|
-
|
|
2093
|
+
E(s, {
|
|
2085
2094
|
x: t.x - n + "",
|
|
2086
2095
|
y: t.y - n + "",
|
|
2087
2096
|
width: t.width + n * 2 + "",
|
|
@@ -2090,14 +2099,14 @@ const Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2090
2099
|
stroke: this.theme.cssVar["--selected"] || "#4dc4ff",
|
|
2091
2100
|
"stroke-width": "2",
|
|
2092
2101
|
fill: "none"
|
|
2093
|
-
}),
|
|
2102
|
+
}), e.appendChild(s), this.currentSummary = e;
|
|
2094
2103
|
}, Vn = function() {
|
|
2095
2104
|
var e, t;
|
|
2096
2105
|
(t = (e = this.currentSummary) == null ? void 0 : e.querySelector("rect")) == null || t.remove(), this.currentSummary = null;
|
|
2097
2106
|
}, Wn = function() {
|
|
2098
2107
|
this.summarySvg.innerHTML = "", this.summaries.forEach((e) => {
|
|
2099
2108
|
try {
|
|
2100
|
-
|
|
2109
|
+
et(this, e);
|
|
2101
2110
|
} catch {
|
|
2102
2111
|
}
|
|
2103
2112
|
}), this.nodes.insertAdjacentElement("beforeend", this.summarySvg);
|
|
@@ -2105,7 +2114,7 @@ const Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2105
2114
|
if (!e)
|
|
2106
2115
|
return;
|
|
2107
2116
|
const t = e.childNodes[1];
|
|
2108
|
-
|
|
2117
|
+
Re(this, t, (n) => {
|
|
2109
2118
|
var i;
|
|
2110
2119
|
const o = e.summaryObj, s = ((i = n.textContent) == null ? void 0 : i.trim()) || "";
|
|
2111
2120
|
s === "" ? o.text = origin : o.text = s, n.remove(), s !== origin && (t.innerHTML = o.text, this.linkDiv(), this.bus.fire("operation", {
|
|
@@ -2121,12 +2130,12 @@ const Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2121
2130
|
renderSummary: Wn,
|
|
2122
2131
|
selectSummary: Kn,
|
|
2123
2132
|
unselectSummary: Vn
|
|
2124
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
2133
|
+
}, Symbol.toStringTag, { value: "Module" })), _ = "http://www.w3.org/2000/svg";
|
|
2125
2134
|
function Xn(e, t) {
|
|
2126
|
-
const n = document.createElementNS(
|
|
2127
|
-
return
|
|
2135
|
+
const n = document.createElementNS(_, "svg");
|
|
2136
|
+
return E(n, {
|
|
2128
2137
|
version: "1.1",
|
|
2129
|
-
xmlns:
|
|
2138
|
+
xmlns: _,
|
|
2130
2139
|
height: e,
|
|
2131
2140
|
width: t
|
|
2132
2141
|
}), n;
|
|
@@ -2135,42 +2144,42 @@ function Gn(e, t) {
|
|
|
2135
2144
|
return (parseInt(e) - parseInt(t)) / 2;
|
|
2136
2145
|
}
|
|
2137
2146
|
function Jn(e, t, n, o) {
|
|
2138
|
-
const s = document.createElementNS(
|
|
2147
|
+
const s = document.createElementNS(_, "g");
|
|
2139
2148
|
let i = "";
|
|
2140
2149
|
return e.text ? i = e.text.textContent : i = e.childNodes[0].textContent, i.split(`
|
|
2141
|
-
`).forEach((
|
|
2142
|
-
const u = document.createElementNS(
|
|
2143
|
-
|
|
2150
|
+
`).forEach((l, c) => {
|
|
2151
|
+
const u = document.createElementNS(_, "text");
|
|
2152
|
+
E(u, {
|
|
2144
2153
|
x: n + parseInt(t.paddingLeft) + "",
|
|
2145
|
-
y: o + parseInt(t.paddingTop) + Gn(t.lineHeight, t.fontSize) * (
|
|
2154
|
+
y: o + parseInt(t.paddingTop) + Gn(t.lineHeight, t.fontSize) * (c + 1) + parseFloat(t.fontSize) * (c + 1) + "",
|
|
2146
2155
|
"text-anchor": "start",
|
|
2147
2156
|
"font-family": t.fontFamily,
|
|
2148
2157
|
"font-size": `${t.fontSize}`,
|
|
2149
2158
|
"font-weight": `${t.fontWeight}`,
|
|
2150
2159
|
fill: `${t.color}`
|
|
2151
|
-
}), u.innerHTML =
|
|
2160
|
+
}), u.innerHTML = l, s.appendChild(u);
|
|
2152
2161
|
}), s;
|
|
2153
2162
|
}
|
|
2154
2163
|
function Zn(e, t, n, o) {
|
|
2155
|
-
var
|
|
2164
|
+
var l;
|
|
2156
2165
|
let s = "";
|
|
2157
|
-
(
|
|
2158
|
-
const i = document.createElementNS(
|
|
2159
|
-
|
|
2166
|
+
(l = e.nodeObj) != null && l.dangerouslySetInnerHTML ? s = e.nodeObj.dangerouslySetInnerHTML : e.text ? s = e.text.textContent : s = e.childNodes[0].textContent;
|
|
2167
|
+
const i = document.createElementNS(_, "foreignObject");
|
|
2168
|
+
E(i, {
|
|
2160
2169
|
x: n + parseInt(t.paddingLeft) + "",
|
|
2161
2170
|
y: o + parseInt(t.paddingTop) + "",
|
|
2162
2171
|
width: t.width,
|
|
2163
2172
|
height: t.height
|
|
2164
2173
|
});
|
|
2165
2174
|
const r = document.createElement("div");
|
|
2166
|
-
return
|
|
2175
|
+
return E(r, {
|
|
2167
2176
|
xmlns: "http://www.w3.org/1999/xhtml",
|
|
2168
2177
|
style: `font-family: ${t.fontFamily}; font-size: ${t.fontSize}; font-weight: ${t.fontWeight}; color: ${t.color}; white-space: pre-wrap;`
|
|
2169
2178
|
}), r.innerHTML = s, i.appendChild(r), i;
|
|
2170
2179
|
}
|
|
2171
2180
|
function Qn(e, t) {
|
|
2172
|
-
const n = getComputedStyle(t), { offsetLeft: o, offsetTop: s } = O(e.nodes, t), i = document.createElementNS(
|
|
2173
|
-
return
|
|
2181
|
+
const n = getComputedStyle(t), { offsetLeft: o, offsetTop: s } = O(e.nodes, t), i = document.createElementNS(_, "rect");
|
|
2182
|
+
return E(i, {
|
|
2174
2183
|
x: o + "",
|
|
2175
2184
|
y: s + "",
|
|
2176
2185
|
rx: n.borderRadius,
|
|
@@ -2182,9 +2191,9 @@ function Qn(e, t) {
|
|
|
2182
2191
|
"stroke-width": n.borderWidth
|
|
2183
2192
|
}), i;
|
|
2184
2193
|
}
|
|
2185
|
-
function
|
|
2186
|
-
const o = getComputedStyle(t), { offsetLeft: s, offsetTop: i } = O(e.nodes, t), r = document.createElementNS(
|
|
2187
|
-
|
|
2194
|
+
function Q(e, t, n = !1) {
|
|
2195
|
+
const o = getComputedStyle(t), { offsetLeft: s, offsetTop: i } = O(e.nodes, t), r = document.createElementNS(_, "rect");
|
|
2196
|
+
E(r, {
|
|
2188
2197
|
x: s + "",
|
|
2189
2198
|
y: i + "",
|
|
2190
2199
|
rx: o.borderRadius,
|
|
@@ -2195,14 +2204,14 @@ function ee(e, t, n = !1) {
|
|
|
2195
2204
|
stroke: o.borderColor,
|
|
2196
2205
|
"stroke-width": o.borderWidth
|
|
2197
2206
|
});
|
|
2198
|
-
const
|
|
2199
|
-
|
|
2200
|
-
let
|
|
2201
|
-
return n ?
|
|
2207
|
+
const l = document.createElementNS(_, "g");
|
|
2208
|
+
l.appendChild(r);
|
|
2209
|
+
let c;
|
|
2210
|
+
return n ? c = Zn(t, o, s, i) : c = Jn(t, o, s, i), l.appendChild(c), l;
|
|
2202
2211
|
}
|
|
2203
2212
|
function eo(e, t) {
|
|
2204
|
-
const n = getComputedStyle(t), { offsetLeft: o, offsetTop: s } = O(e.nodes, t), i = document.createElementNS(
|
|
2205
|
-
return
|
|
2213
|
+
const n = getComputedStyle(t), { offsetLeft: o, offsetTop: s } = O(e.nodes, t), i = document.createElementNS(_, "a"), r = document.createElementNS(_, "text");
|
|
2214
|
+
return E(r, {
|
|
2206
2215
|
x: o + "",
|
|
2207
2216
|
y: s + parseInt(n.fontSize) + "",
|
|
2208
2217
|
"text-anchor": "start",
|
|
@@ -2213,8 +2222,8 @@ function eo(e, t) {
|
|
|
2213
2222
|
}), r.innerHTML = t.textContent, i.appendChild(r), i.setAttribute("href", t.href), i;
|
|
2214
2223
|
}
|
|
2215
2224
|
function to(e, t) {
|
|
2216
|
-
const n = getComputedStyle(t), { offsetLeft: o, offsetTop: s } = O(e.nodes, t), i = document.createElementNS(
|
|
2217
|
-
return
|
|
2225
|
+
const n = getComputedStyle(t), { offsetLeft: o, offsetTop: s } = O(e.nodes, t), i = document.createElementNS(_, "image");
|
|
2226
|
+
return E(i, {
|
|
2218
2227
|
x: o + "",
|
|
2219
2228
|
y: s + "",
|
|
2220
2229
|
width: n.width + "",
|
|
@@ -2222,37 +2231,37 @@ function to(e, t) {
|
|
|
2222
2231
|
href: t.src
|
|
2223
2232
|
}), i;
|
|
2224
2233
|
}
|
|
2225
|
-
const
|
|
2234
|
+
const ee = 100, no = '<?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">', oo = (e, t = !1) => {
|
|
2226
2235
|
var a, f, g;
|
|
2227
|
-
const n = e.nodes, o = n.offsetHeight +
|
|
2228
|
-
|
|
2236
|
+
const n = e.nodes, o = n.offsetHeight + ee * 2, s = n.offsetWidth + ee * 2, i = Xn(o + "px", s + "px"), r = document.createElementNS(_, "svg"), l = document.createElementNS(_, "rect");
|
|
2237
|
+
E(l, {
|
|
2229
2238
|
x: "0",
|
|
2230
2239
|
y: "0",
|
|
2231
2240
|
width: `${s}`,
|
|
2232
2241
|
height: `${o}`,
|
|
2233
2242
|
fill: e.theme.cssVar["--bgcolor"]
|
|
2234
|
-
}), i.appendChild(
|
|
2243
|
+
}), i.appendChild(l), n.querySelectorAll(".subLines").forEach((p) => {
|
|
2235
2244
|
const m = p.cloneNode(!0), { offsetLeft: h, offsetTop: v } = O(n, p.parentElement);
|
|
2236
2245
|
m.setAttribute("x", `${h}`), m.setAttribute("y", `${v}`), r.appendChild(m);
|
|
2237
2246
|
});
|
|
2238
|
-
const
|
|
2239
|
-
|
|
2247
|
+
const c = (a = n.querySelector(".lines")) == null ? void 0 : a.cloneNode(!0);
|
|
2248
|
+
c && r.appendChild(c);
|
|
2240
2249
|
const u = (f = n.querySelector(".topiclinks")) == null ? void 0 : f.cloneNode(!0);
|
|
2241
2250
|
u && r.appendChild(u);
|
|
2242
2251
|
const d = (g = n.querySelector(".summary")) == null ? void 0 : g.cloneNode(!0);
|
|
2243
2252
|
return d && r.appendChild(d), n.querySelectorAll("me-tpc").forEach((p) => {
|
|
2244
|
-
p.nodeObj.dangerouslySetInnerHTML ? r.appendChild(
|
|
2253
|
+
p.nodeObj.dangerouslySetInnerHTML ? r.appendChild(Q(e, p, !t)) : (r.appendChild(Qn(e, p)), r.appendChild(Q(e, p.text, !t)));
|
|
2245
2254
|
}), n.querySelectorAll(".tags > span").forEach((p) => {
|
|
2246
|
-
r.appendChild(
|
|
2255
|
+
r.appendChild(Q(e, p));
|
|
2247
2256
|
}), n.querySelectorAll(".icons > span").forEach((p) => {
|
|
2248
|
-
r.appendChild(
|
|
2257
|
+
r.appendChild(Q(e, p));
|
|
2249
2258
|
}), n.querySelectorAll(".hyper-link").forEach((p) => {
|
|
2250
2259
|
r.appendChild(eo(e, p));
|
|
2251
2260
|
}), n.querySelectorAll("img").forEach((p) => {
|
|
2252
2261
|
r.appendChild(to(e, p));
|
|
2253
|
-
}),
|
|
2254
|
-
x:
|
|
2255
|
-
y:
|
|
2262
|
+
}), E(r, {
|
|
2263
|
+
x: ee + "",
|
|
2264
|
+
y: ee + "",
|
|
2256
2265
|
overflow: "visible"
|
|
2257
2266
|
}), i.appendChild(r), i;
|
|
2258
2267
|
}, so = (e, t) => (t && e.insertAdjacentHTML("afterbegin", "<style>" + t + "</style>"), no + e.outerHTML);
|
|
@@ -2269,18 +2278,18 @@ function io(e) {
|
|
|
2269
2278
|
const ro = function(e = !1, t) {
|
|
2270
2279
|
const n = oo(this, e), o = so(n, t);
|
|
2271
2280
|
return new Blob([o], { type: "image/svg+xml" });
|
|
2272
|
-
},
|
|
2281
|
+
}, lo = async function(e = !1, t) {
|
|
2273
2282
|
const n = this.exportSvg(e, t), o = await io(n);
|
|
2274
2283
|
return new Promise((s, i) => {
|
|
2275
2284
|
const r = new Image();
|
|
2276
2285
|
r.setAttribute("crossOrigin", "anonymous"), r.onload = () => {
|
|
2277
|
-
const
|
|
2278
|
-
|
|
2286
|
+
const l = document.createElement("canvas");
|
|
2287
|
+
l.width = r.width, l.height = r.height, l.getContext("2d").drawImage(r, 0, 0), l.toBlob(s, "image/png", 1);
|
|
2279
2288
|
}, r.src = o, r.onerror = i;
|
|
2280
2289
|
});
|
|
2281
|
-
},
|
|
2290
|
+
}, co = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2282
2291
|
__proto__: null,
|
|
2283
|
-
exportPng:
|
|
2292
|
+
exportPng: lo,
|
|
2284
2293
|
exportSvg: ro
|
|
2285
2294
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2286
2295
|
function ao(e, t) {
|
|
@@ -2289,57 +2298,57 @@ function ao(e, t) {
|
|
|
2289
2298
|
o && !await o.apply(this, n) || e.apply(this, n);
|
|
2290
2299
|
};
|
|
2291
2300
|
}
|
|
2292
|
-
const
|
|
2293
|
-
for (let e = 0; e <
|
|
2294
|
-
const t =
|
|
2295
|
-
|
|
2301
|
+
const $e = Object.keys(Xe), tt = {};
|
|
2302
|
+
for (let e = 0; e < $e.length; e++) {
|
|
2303
|
+
const t = $e[e];
|
|
2304
|
+
tt[t] = ao(Xe[t], t);
|
|
2296
2305
|
}
|
|
2297
2306
|
const ho = {
|
|
2298
|
-
getObjById:
|
|
2299
|
-
generateNewObj:
|
|
2300
|
-
layout:
|
|
2301
|
-
linkDiv:
|
|
2302
|
-
editTopic:
|
|
2303
|
-
createWrapper:
|
|
2304
|
-
createParent:
|
|
2305
|
-
createChildren:
|
|
2306
|
-
createTopic:
|
|
2307
|
-
findEle:
|
|
2307
|
+
getObjById: ne,
|
|
2308
|
+
generateNewObj: ot,
|
|
2309
|
+
layout: rt,
|
|
2310
|
+
linkDiv: mt,
|
|
2311
|
+
editTopic: ft,
|
|
2312
|
+
createWrapper: at,
|
|
2313
|
+
createParent: dt,
|
|
2314
|
+
createChildren: ht,
|
|
2315
|
+
createTopic: ut,
|
|
2316
|
+
findEle: N,
|
|
2308
2317
|
changeTheme: Ht,
|
|
2309
2318
|
...Mn,
|
|
2310
|
-
...
|
|
2319
|
+
...tt,
|
|
2311
2320
|
...Bn,
|
|
2312
2321
|
...Yn,
|
|
2313
|
-
...
|
|
2322
|
+
...co,
|
|
2314
2323
|
init(e) {
|
|
2315
2324
|
if (!e || !e.nodeData)
|
|
2316
2325
|
return new Error("MindElixir: `data` is required");
|
|
2317
|
-
e.direction !== void 0 && (this.direction = e.direction), this.changeTheme(e.theme || this.theme, !1), this.nodeData = e.nodeData, $(this.nodeData), this.arrows = e.arrows || [], this.summaries = e.summaries || [], this.tidyArrow(), this.toolBar && Tt(this), this.keypress &&
|
|
2326
|
+
e.direction !== void 0 && (this.direction = e.direction), this.changeTheme(e.theme || this.theme, !1), this.nodeData = e.nodeData, $(this.nodeData), this.arrows = e.arrows || [], this.summaries = e.summaries || [], this.tidyArrow(), this.toolBar && Tt(this), this.keypress && Et(this), this.editable && Bt(this), this.contextMenu && this.disposable.push(gt(this, this.contextMenuOption)), this.draggable && St(this), this.allowUndo && Mt(this), this.toCenter(), this.layout(), this.linkDiv();
|
|
2318
2327
|
},
|
|
2319
2328
|
destroy() {
|
|
2320
2329
|
var e;
|
|
2321
2330
|
this.disposable.forEach((t) => t()), this.mindElixirBox && (this.mindElixirBox.innerHTML = ""), this.mindElixirBox = void 0, this.nodeData = void 0, this.arrows = void 0, this.summaries = void 0, this.currentArrow = void 0, this.currentNode = void 0, this.currentNodes = void 0, this.currentSummary = void 0, this.waitCopy = void 0, this.theme = void 0, this.direction = void 0, this.bus = void 0, this.container = void 0, this.map = void 0, this.lines = void 0, this.linkController = void 0, this.linkSvgGroup = void 0, this.P2 = void 0, this.P3 = void 0, this.line1 = void 0, this.line2 = void 0, this.nodes = void 0, (e = this.selection) == null || e.destroy(), this.selection = void 0;
|
|
2322
2331
|
}
|
|
2323
2332
|
};
|
|
2324
|
-
function uo({ pT: e, pL: t, pW: n, pH: o, cT: s, cL: i, cW: r, cH:
|
|
2333
|
+
function uo({ pT: e, pL: t, pW: n, pH: o, cT: s, cL: i, cW: r, cH: l, direction: c, containerHeight: u }) {
|
|
2325
2334
|
let d = t + n / 2;
|
|
2326
2335
|
const a = e + o / 2;
|
|
2327
2336
|
let f;
|
|
2328
|
-
|
|
2329
|
-
const g = s +
|
|
2330
|
-
return
|
|
2337
|
+
c === "lhs" ? f = i + r : f = i;
|
|
2338
|
+
const g = s + l / 2, m = (1 - Math.abs(g - a) / u) * 0.25 * (n / 2);
|
|
2339
|
+
return c === "lhs" ? d = d - n / 10 - m : d = d + n / 10 + m, `M ${d} ${a} Q ${d} ${g} ${f} ${g}`;
|
|
2331
2340
|
}
|
|
2332
|
-
function fo({ pT: e, pL: t, pW: n, pH: o, cT: s, cL: i, cW: r, cH:
|
|
2341
|
+
function fo({ pT: e, pL: t, pW: n, pH: o, cT: s, cL: i, cW: r, cH: l, direction: c, isFirst: u }) {
|
|
2333
2342
|
const d = parseInt(this.mindElixirBox.style.getPropertyValue("--gap"));
|
|
2334
2343
|
let a = 0, f = 0;
|
|
2335
2344
|
u ? a = e + o / 2 : a = e + o;
|
|
2336
|
-
const g = s +
|
|
2345
|
+
const g = s + l;
|
|
2337
2346
|
let p = 0, m = 0, h = 0;
|
|
2338
2347
|
const v = Math.abs(a - g) / 300 * d;
|
|
2339
|
-
return
|
|
2348
|
+
return c === "lhs" ? (h = t, p = h + d, m = h - d, f = i + d, `M ${p} ${a} C ${h} ${a} ${h + v} ${g} ${m} ${g} H ${f}`) : (h = t + n, p = h - d, m = h + d, f = i + r - d, `M ${p} ${a} C ${h} ${a} ${h - v} ${g} ${m} ${g} H ${f}`);
|
|
2340
2349
|
}
|
|
2341
|
-
const po = "4.3.
|
|
2342
|
-
function
|
|
2350
|
+
const po = "4.3.4", W = document;
|
|
2351
|
+
function T({
|
|
2343
2352
|
el: e,
|
|
2344
2353
|
direction: t,
|
|
2345
2354
|
locale: n,
|
|
@@ -2347,8 +2356,8 @@ function A({
|
|
|
2347
2356
|
editable: s,
|
|
2348
2357
|
contextMenu: i,
|
|
2349
2358
|
contextMenuOption: r,
|
|
2350
|
-
toolBar:
|
|
2351
|
-
keypress:
|
|
2359
|
+
toolBar: l,
|
|
2360
|
+
keypress: c,
|
|
2352
2361
|
mouseSelectionButton: u,
|
|
2353
2362
|
selectionContainer: d,
|
|
2354
2363
|
before: a,
|
|
@@ -2363,27 +2372,27 @@ function A({
|
|
|
2363
2372
|
const b = Object.prototype.toString.call(e);
|
|
2364
2373
|
if (b === "[object HTMLDivElement]" ? y = e : b === "[object String]" && (y = document.querySelector(e)), !y)
|
|
2365
2374
|
throw new Error("MindElixir: el is not a valid element");
|
|
2366
|
-
y.className += " mind-elixir", y.innerHTML = "", this.mindElixirBox = y, this.disposable = [], this.before = a || {}, this.locale = n || "en", this.contextMenuOption = r, this.contextMenu = i === void 0 ? !0 : i, this.toolBar =
|
|
2375
|
+
y.className += " mind-elixir", y.innerHTML = "", this.mindElixirBox = y, this.disposable = [], this.before = a || {}, this.locale = n || "en", this.contextMenuOption = r, this.contextMenu = i === void 0 ? !0 : i, this.toolBar = l === void 0 ? !0 : l, this.keypress = c === void 0 ? !0 : c, this.mouseSelectionButton = u || 0, this.direction = typeof t == "number" ? t : 1, this.draggable = o === void 0 ? !0 : o, this.newTopicName = f || "new node", this.editable = s === void 0 ? !0 : s, this.allowUndo = g === void 0 ? !1 : g, this.currentNode = null, this.currentArrow = null, this.scaleVal = 1, this.tempDirection = null, this.generateMainBranch = p || uo, this.generateSubBranch = m || fo, this.overflowHidden = h || !1, this.bus = it.create(), this.container = W.createElement("div"), this.selectionContainer = d || this.container, this.container.className = "map-container";
|
|
2367
2376
|
const x = window.matchMedia("(prefers-color-scheme: dark)");
|
|
2368
|
-
this.theme = v || (x.matches ?
|
|
2369
|
-
const w =
|
|
2370
|
-
w.className = "map-canvas", this.map = w, this.map.setAttribute("tabindex", "0"), this.container.appendChild(this.map), this.mindElixirBox.appendChild(this.container), this.nodes =
|
|
2377
|
+
this.theme = v || (x.matches ? Pe : Oe);
|
|
2378
|
+
const w = W.createElement("div");
|
|
2379
|
+
w.className = "map-canvas", this.map = w, this.map.setAttribute("tabindex", "0"), this.container.appendChild(this.map), this.mindElixirBox.appendChild(this.container), this.nodes = W.createElement("me-nodes"), this.nodes.className = "main-node-container", this.lines = U("lines"), this.summarySvg = U("summary"), this.linkController = U("linkcontroller"), this.P2 = W.createElement("div"), this.P3 = W.createElement("div"), this.P2.className = this.P3.className = "circle", this.P2.style.display = this.P3.style.display = "none", this.line1 = ye(), this.line2 = ye(), this.linkController.appendChild(this.line1), this.linkController.appendChild(this.line2), this.linkSvgGroup = U("topiclinks"), this.map.appendChild(this.nodes), this.overflowHidden ? this.container.style.overflow = "hidden" : st(this);
|
|
2371
2380
|
}
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
+
T.prototype = ho;
|
|
2382
|
+
T.LEFT = M;
|
|
2383
|
+
T.RIGHT = D;
|
|
2384
|
+
T.SIDE = ie;
|
|
2385
|
+
T.THEME = Oe;
|
|
2386
|
+
T.DARK_THEME = Pe;
|
|
2387
|
+
T.version = po;
|
|
2388
|
+
T.E = N;
|
|
2389
|
+
T.new = (e) => ({
|
|
2381
2390
|
nodeData: {
|
|
2382
|
-
id:
|
|
2391
|
+
id: Y(),
|
|
2383
2392
|
topic: e || "new topic",
|
|
2384
2393
|
children: []
|
|
2385
2394
|
}
|
|
2386
2395
|
});
|
|
2387
2396
|
export {
|
|
2388
|
-
|
|
2397
|
+
T as default
|
|
2389
2398
|
};
|