mind-elixir 4.4.2 → 4.4.3
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 +7 -7
- package/dist/MindElixir.js +519 -518
- package/dist/MindElixirLite.iife.js +6 -6
- package/dist/MindElixirLite.js +153 -152
- package/dist/types/index.d.ts +3 -2
- package/dist/types/types/index.d.ts +3 -2
- package/package.json +1 -1
package/dist/MindElixir.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".map-container{--gap: 30px;--root-radius: 30px;--main-radius: 20px;--root-color: #ffffff;--root-bgcolor: #4c4f69;--root-border-color: rgba(0, 0, 0, 0);--main-color: #444446;--main-bgcolor: #ffffff;--topic-padding: 3px;--color: #777777;--bgcolor: #f6f6f6;--selected: #4dc4ff;--panel-color: #444446;--panel-bgcolor: #ffffff;--panel-border-color: #eaeaea;-webkit-tap-highlight-color:rgba(0,0,0,0);font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,PingFang SC,Microsoft YaHei,Source Han Sans SC,Noto Sans CJK SC,WenQuanYi Micro Hei,sans-serif;-webkit-user-select:none;user-select:none;height:100%;width:100%;overflow: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 .hyper-link{text-decoration:none;margin-left:.3em}.map-container .lhs{direction:rtl}.map-container .lhs me-tpc{direction:ltr}.map-container .map-canvas{height:20000px;width:20000px;position:relative;-webkit-user-select:none;user-select:none;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,.map-container me-tpc>iframe{pointer-events:auto}.map-container me-tpc>img{display:block;margin-bottom:8px;object-fit:cover}.map-container me-tpc>.text{display:inline-block}.map-container .circle{position:absolute;height:10px;width:10px;margin-top:-5px;margin-left:-5px;border-radius:100%;background:#757575;border:2px solid #ffffff;cursor:pointer}.map-container .tags{direction:ltr}.map-container .tags span{display:inline-block;border-radius:3px;padding:2px 4px;background:#d6f0f8;color:#276f86;margin:2px 4px 0 0;font-size:12px;line-height:1.3em}.map-container .icons{display:inline-block;direction:ltr;margin-left:5px}.map-container .icons span{display:inline-block;line-height:1.3em}.map-container .mind-elixir-ghost{position:fixed;top:-100%;left:-100%;box-sizing:content-box;opacity:.5;background-color:#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}.
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".map-container{--gap: 30px;--root-radius: 30px;--main-radius: 20px;--root-color: #ffffff;--root-bgcolor: #4c4f69;--root-border-color: rgba(0, 0, 0, 0);--main-color: #444446;--main-bgcolor: #ffffff;--topic-padding: 3px;--color: #777777;--bgcolor: #f6f6f6;--selected: #4dc4ff;--panel-color: #444446;--panel-bgcolor: #ffffff;--panel-border-color: #eaeaea;-webkit-tap-highlight-color:rgba(0,0,0,0);font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,PingFang SC,Microsoft YaHei,Source Han Sans SC,Noto Sans CJK SC,WenQuanYi Micro Hei,sans-serif;-webkit-user-select:none;user-select:none;height:100%;width:100%;overflow: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 .hyper-link{text-decoration:none;margin-left:.3em}.map-container .lhs{direction:rtl}.map-container .lhs me-tpc{direction:ltr}.map-container .map-canvas{height:20000px;width:20000px;position:relative;-webkit-user-select:none;user-select:none;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,.map-container me-tpc>iframe{pointer-events:auto}.map-container me-tpc>img{display:block;margin-bottom:8px;object-fit:cover}.map-container me-tpc>.text{display:inline-block}.map-container .circle{position:absolute;height:10px;width:10px;margin-top:-5px;margin-left:-5px;border-radius:100%;background:#757575;border:2px solid #ffffff;cursor:pointer}.map-container .tags{direction:ltr}.map-container .tags span{display:inline-block;border-radius:3px;padding:2px 4px;background:#d6f0f8;color:#276f86;margin:2px 4px 0 0;font-size:12px;line-height:1.3em}.map-container .icons{display:inline-block;direction:ltr;margin-left:5px}.map-container .icons span{display:inline-block;line-height:1.3em}.map-container .mind-elixir-ghost{position:fixed;top:-100%;left:-100%;box-sizing:content-box;opacity:.5;background-color:#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}.map-container .context-menu{position:fixed;top:0;left:0;width:100%;height:100%;z-index:99}.map-container .context-menu .menu-list{position:fixed;list-style:none;margin:0;padding:0;color:var(--panel-color);box-shadow:0 12px 15px #0003;border-radius:5px;overflow:hidden}.map-container .context-menu .menu-list li{min-width:200px;overflow:hidden;white-space:nowrap;padding:6px 10px;background:var(--panel-bgcolor);border-bottom:1px solid var(--panel-border-color);cursor:pointer}.map-container .context-menu .menu-list li span{line-height:20px}.map-container .context-menu .menu-list li a{color:#333;text-decoration:none}.map-container .context-menu .menu-list li.disabled{display:none}.map-container .context-menu .menu-list li:hover{filter:brightness(.95)}.map-container .context-menu .menu-list li:last-child{border-bottom:0}.map-container .context-menu .menu-list li span:last-child{float:right}.map-container .context-menu .key{font-size:10px;background-color:#f1f1f1;color:#333;padding:2px 5px;border-radius:3px}.map-container .tips{position:absolute;bottom:20px;left:50%;transform:translate(-50%);color:var(--panel-color);font-weight:bolder}.mind-elixir-toolbar{font-family:iconfont;position:absolute;color:var(--panel-color);background:var(--panel-bgcolor);padding:10px;border-radius:5px;box-shadow:0 1px 2px #0003}.mind-elixir-toolbar svg{display:inline-block}.mind-elixir-toolbar span:active{opacity:.5}.mind-elixir-toolbar.rb{right:20px;bottom:20px}.mind-elixir-toolbar.rb span+span{margin-left:10px}.mind-elixir-toolbar.lt{font-size:20px;left:20px;top:20px}.mind-elixir-toolbar.lt span{display:block}.mind-elixir-toolbar.lt span+span{margin-top:10px}")),document.head.appendChild(e)}}catch(n){console.error("vite-plugin-css-injected-by-js",n)}})();
|
|
2
2
|
(function(e) {
|
|
3
|
-
var t, n, o, i, s, 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");
|
|
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
4
|
if (l && !e.__iconfont__svg__cssinject__) {
|
|
5
5
|
e.__iconfont__svg__cssinject__ = !0;
|
|
6
6
|
try {
|
|
@@ -10,23 +10,23 @@
|
|
|
10
10
|
} catch {
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
|
-
function
|
|
14
|
-
|
|
13
|
+
function d() {
|
|
14
|
+
i || (i = !0, o());
|
|
15
15
|
}
|
|
16
16
|
t = function() {
|
|
17
|
-
var
|
|
18
|
-
(p = document.createElement("div")).innerHTML = c, c = null, (h = p.getElementsByTagName("svg")[0]) && (h.setAttribute("aria-hidden", "true"), h.style.position = "absolute", h.style.width = 0, h.style.height = 0, h.style.overflow = "hidden",
|
|
17
|
+
var a, u, h, p;
|
|
18
|
+
(p = document.createElement("div")).innerHTML = c, c = null, (h = p.getElementsByTagName("svg")[0]) && (h.setAttribute("aria-hidden", "true"), h.style.position = "absolute", h.style.width = 0, h.style.height = 0, h.style.overflow = "hidden", a = h, (u = document.body).firstChild ? (p = a, (h = u.firstChild).parentNode.insertBefore(p, h)) : u.appendChild(a));
|
|
19
19
|
}, document.addEventListener ? ~["complete", "loaded", "interactive"].indexOf(document.readyState) ? setTimeout(t, 0) : (n = function() {
|
|
20
20
|
document.removeEventListener("DOMContentLoaded", n, !1), t();
|
|
21
|
-
}, document.addEventListener("DOMContentLoaded", n, !1)) : document.attachEvent && (o = t,
|
|
21
|
+
}, document.addEventListener("DOMContentLoaded", n, !1)) : document.attachEvent && (o = t, s = e.document, i = !1, (r = function() {
|
|
22
22
|
try {
|
|
23
|
-
|
|
23
|
+
s.documentElement.doScroll("left");
|
|
24
24
|
} catch {
|
|
25
25
|
return void setTimeout(r, 50);
|
|
26
26
|
}
|
|
27
|
-
|
|
28
|
-
})(),
|
|
29
|
-
|
|
27
|
+
d();
|
|
28
|
+
})(), s.onreadystatechange = function() {
|
|
29
|
+
s.readyState == "complete" && (s.onreadystatechange = null, d());
|
|
30
30
|
});
|
|
31
31
|
})(window);
|
|
32
32
|
const $ = 0, P = 1, ae = 2, Pe = {
|
|
@@ -57,15 +57,15 @@ const $ = 0, P = 1, ae = 2, Pe = {
|
|
|
57
57
|
"--panel-border-color": "#696969"
|
|
58
58
|
}
|
|
59
59
|
};
|
|
60
|
-
function
|
|
60
|
+
function se(e) {
|
|
61
61
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/"/g, """);
|
|
62
62
|
}
|
|
63
|
-
const
|
|
63
|
+
const ie = 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 = ie(e, t.children[n]);
|
|
69
69
|
if (o)
|
|
70
70
|
return o;
|
|
71
71
|
}
|
|
@@ -89,15 +89,15 @@ const nt = (e, t) => {
|
|
|
89
89
|
};
|
|
90
90
|
};
|
|
91
91
|
function re(e, t, n, o) {
|
|
92
|
-
const
|
|
93
|
-
let r = Math.atan(Math.abs(
|
|
94
|
-
|
|
95
|
-
const c = 12, l = 30,
|
|
92
|
+
const s = o - t, i = e - n;
|
|
93
|
+
let r = Math.atan(Math.abs(s) / Math.abs(i)) / 3.14 * 180;
|
|
94
|
+
i < 0 && s > 0 && (r = 180 - r), i < 0 && s < 0 && (r = 180 + r), i > 0 && s < 0 && (r = 360 - r);
|
|
95
|
+
const c = 12, l = 30, d = r + l, a = r - l;
|
|
96
96
|
return {
|
|
97
|
-
x1: n + Math.cos(Math.PI *
|
|
98
|
-
y1: o - Math.sin(Math.PI *
|
|
99
|
-
x2: n + Math.cos(Math.PI *
|
|
100
|
-
y2: o - Math.sin(Math.PI *
|
|
97
|
+
x1: n + Math.cos(Math.PI * d / 180) * c,
|
|
98
|
+
y1: o - Math.sin(Math.PI * d / 180) * c,
|
|
99
|
+
x2: n + Math.cos(Math.PI * a / 180) * c,
|
|
100
|
+
y2: o - Math.sin(Math.PI * a / 180) * c
|
|
101
101
|
};
|
|
102
102
|
}
|
|
103
103
|
function Z() {
|
|
@@ -123,7 +123,7 @@ const R = (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
|
+
}, C = (e, t) => {
|
|
127
127
|
for (const n in t)
|
|
128
128
|
e.setAttribute(n, t[n]);
|
|
129
129
|
}, he = (e) => e ? e.tagName === "ME-TPC" : !1, de = (e) => e.filter((t) => {
|
|
@@ -141,13 +141,13 @@ const R = (e, t) => {
|
|
|
141
141
|
onMove(e, t) {
|
|
142
142
|
if (this.mousedown) {
|
|
143
143
|
this.moved = !0;
|
|
144
|
-
const n = e.movementX, o = e.movementY, { container:
|
|
145
|
-
let c =
|
|
144
|
+
const n = e.movementX, o = e.movementY, { container: s, map: i, scaleVal: r } = t;
|
|
145
|
+
let c = s.scrollLeft - n, l = s.scrollTop - o;
|
|
146
146
|
if (r < 1) {
|
|
147
|
-
const
|
|
148
|
-
c = Math.max(
|
|
147
|
+
const d = (s.scrollWidth - i.clientWidth * r) / 2, a = (s.scrollHeight - i.clientHeight * r) / 2;
|
|
148
|
+
c = Math.max(d, Math.min(s.scrollWidth - d - s.clientWidth, c)), l = Math.max(a, Math.min(s.scrollHeight - a - s.clientHeight, l));
|
|
149
149
|
}
|
|
150
|
-
|
|
150
|
+
s.scrollTo(c, l);
|
|
151
151
|
}
|
|
152
152
|
},
|
|
153
153
|
clear() {
|
|
@@ -156,16 +156,16 @@ const R = (e, t) => {
|
|
|
156
156
|
}, 0);
|
|
157
157
|
}
|
|
158
158
|
};
|
|
159
|
-
function
|
|
159
|
+
function st(e) {
|
|
160
160
|
e.map.addEventListener("click", (t) => {
|
|
161
|
-
var o,
|
|
161
|
+
var o, s;
|
|
162
162
|
if (t.button !== 0)
|
|
163
163
|
return;
|
|
164
164
|
if ((o = e.helper1) != null && o.moved) {
|
|
165
165
|
e.helper1.clear();
|
|
166
166
|
return;
|
|
167
167
|
}
|
|
168
|
-
if ((
|
|
168
|
+
if ((s = e.helper2) != null && s.moved) {
|
|
169
169
|
e.helper2.clear();
|
|
170
170
|
return;
|
|
171
171
|
}
|
|
@@ -201,7 +201,7 @@ function it(e) {
|
|
|
201
201
|
t.button === n && k.clear();
|
|
202
202
|
});
|
|
203
203
|
}
|
|
204
|
-
const
|
|
204
|
+
const it = {
|
|
205
205
|
create() {
|
|
206
206
|
return {
|
|
207
207
|
handlers: {},
|
|
@@ -239,30 +239,30 @@ const ce = document, rt = function() {
|
|
|
239
239
|
t.appendChild(e);
|
|
240
240
|
const n = this.nodeData.children || [];
|
|
241
241
|
if (this.direction === ae) {
|
|
242
|
-
let o = 0,
|
|
243
|
-
n.map((
|
|
244
|
-
|
|
242
|
+
let o = 0, s = 0;
|
|
243
|
+
n.map((i) => {
|
|
244
|
+
i.direction === $ ? o += 1 : i.direction === P ? s += 1 : o <= s ? (i.direction = $, o += 1) : (i.direction = P, s += 1);
|
|
245
245
|
});
|
|
246
246
|
}
|
|
247
247
|
ct(this, n, t);
|
|
248
248
|
}, ct = function(e, t, n) {
|
|
249
249
|
const o = ce.createElement("me-main");
|
|
250
250
|
o.className = L.LHS;
|
|
251
|
-
const
|
|
252
|
-
|
|
253
|
-
for (let
|
|
254
|
-
const r = t[
|
|
255
|
-
e.direction === ae ? r.direction === $ ? o.appendChild(c) :
|
|
251
|
+
const s = ce.createElement("me-main");
|
|
252
|
+
s.className = L.RHS;
|
|
253
|
+
for (let i = 0; i < t.length; i++) {
|
|
254
|
+
const r = t[i], { grp: c } = e.createWrapper(r);
|
|
255
|
+
e.direction === ae ? r.direction === $ ? o.appendChild(c) : s.appendChild(c) : e.direction === $ ? o.appendChild(c) : s.appendChild(c);
|
|
256
256
|
}
|
|
257
|
-
e.nodes.appendChild(o), e.nodes.appendChild(n), e.nodes.appendChild(
|
|
257
|
+
e.nodes.appendChild(o), e.nodes.appendChild(n), e.nodes.appendChild(s), e.nodes.appendChild(e.lines);
|
|
258
258
|
}, lt = function(e, t) {
|
|
259
259
|
const n = ce.createElement("me-children");
|
|
260
260
|
for (let o = 0; o < t.length; o++) {
|
|
261
|
-
const
|
|
262
|
-
n.appendChild(
|
|
261
|
+
const s = t[o], { grp: i } = e.createWrapper(s);
|
|
262
|
+
n.appendChild(i);
|
|
263
263
|
}
|
|
264
264
|
return n;
|
|
265
|
-
}, T = document,
|
|
265
|
+
}, T = document, S = (e, t) => {
|
|
266
266
|
const o = (t ? t.mindElixirBox : T).querySelector(`[data-nodeid=me${e}]`);
|
|
267
267
|
if (!o)
|
|
268
268
|
throw new Error(`FindEle: Node ${e} not found, maybe it's collapsed.`);
|
|
@@ -291,24 +291,24 @@ const ce = document, rt = function() {
|
|
|
291
291
|
e.link && (e.link = void 0);
|
|
292
292
|
if (t.icons && t.icons.length) {
|
|
293
293
|
const n = T.createElement("span");
|
|
294
|
-
n.className = "icons", n.innerHTML = t.icons.map((o) => `<span>${
|
|
294
|
+
n.className = "icons", n.innerHTML = t.icons.map((o) => `<span>${se(o)}</span>`).join(""), e.appendChild(n), e.icons = n;
|
|
295
295
|
} else
|
|
296
296
|
e.icons && (e.icons = void 0);
|
|
297
297
|
if (t.tags && t.tags.length) {
|
|
298
298
|
const n = T.createElement("div");
|
|
299
|
-
n.className = "tags", n.innerHTML = t.tags.map((o) => `<span>${
|
|
299
|
+
n.className = "tags", n.innerHTML = t.tags.map((o) => `<span>${se(o)}</span>`).join(""), e.appendChild(n), e.tags = n;
|
|
300
300
|
} else
|
|
301
301
|
e.tags && (e.tags = void 0);
|
|
302
302
|
}, at = function(e, t) {
|
|
303
|
-
const n = T.createElement("me-wrapper"), { p: o, tpc:
|
|
303
|
+
const n = T.createElement("me-wrapper"), { p: o, tpc: s } = this.createParent(e);
|
|
304
304
|
if (n.appendChild(o), !t && e.children && e.children.length > 0) {
|
|
305
|
-
const
|
|
306
|
-
if (o.appendChild(
|
|
305
|
+
const i = ve(e.expanded);
|
|
306
|
+
if (o.appendChild(i), e.expanded !== !1) {
|
|
307
307
|
const r = lt(this, e.children);
|
|
308
308
|
n.appendChild(r);
|
|
309
309
|
}
|
|
310
310
|
}
|
|
311
|
-
return { grp: n, top: o, tpc:
|
|
311
|
+
return { grp: n, top: o, tpc: s };
|
|
312
312
|
}, dt = function(e) {
|
|
313
313
|
const t = T.createElement("me-parent"), n = this.createTopic(e);
|
|
314
314
|
return ge(n, e), t.appendChild(n), { p: t, tpc: n };
|
|
@@ -340,22 +340,22 @@ const ft = function(e) {
|
|
|
340
340
|
border-radius:${o.borderRadius};`, this.direction === $ && (t.style.right = "0"), t.focus(), Re(t), this.bus.fire("operation", {
|
|
341
341
|
name: "beginEdit",
|
|
342
342
|
obj: e.nodeObj
|
|
343
|
-
}), t.addEventListener("keydown", (
|
|
344
|
-
|
|
345
|
-
const
|
|
346
|
-
if (
|
|
347
|
-
if (
|
|
343
|
+
}), t.addEventListener("keydown", (s) => {
|
|
344
|
+
s.stopPropagation();
|
|
345
|
+
const i = s.key;
|
|
346
|
+
if (i === "Enter" || i === "Tab") {
|
|
347
|
+
if (s.shiftKey)
|
|
348
348
|
return;
|
|
349
|
-
|
|
349
|
+
s.preventDefault(), t.blur(), this.map.focus();
|
|
350
350
|
}
|
|
351
351
|
}), t.addEventListener("blur", () => {
|
|
352
352
|
var r;
|
|
353
353
|
if (!t)
|
|
354
354
|
return;
|
|
355
|
-
const
|
|
356
|
-
|
|
355
|
+
const s = e.nodeObj, i = ((r = t.textContent) == null ? void 0 : r.trim()) || "";
|
|
356
|
+
i === "" ? s.topic = n : s.topic = i, t.remove(), i !== n && (e.text.textContent = s.topic, this.linkDiv(), this.bus.fire("operation", {
|
|
357
357
|
name: "finishEdit",
|
|
358
|
-
obj:
|
|
358
|
+
obj: s,
|
|
359
359
|
origin: n
|
|
360
360
|
}));
|
|
361
361
|
});
|
|
@@ -364,7 +364,7 @@ const ft = function(e) {
|
|
|
364
364
|
return t.expanded = e !== !1, t.className = e !== !1 ? "minus" : "", t;
|
|
365
365
|
}, G = document, J = "http://www.w3.org/2000/svg", ze = function(e, t, n) {
|
|
366
366
|
const o = G.createElementNS(J, "path");
|
|
367
|
-
return
|
|
367
|
+
return C(o, {
|
|
368
368
|
d: e,
|
|
369
369
|
stroke: t || "#666",
|
|
370
370
|
fill: "none",
|
|
@@ -382,27 +382,27 @@ const ft = function(e) {
|
|
|
382
382
|
fill: "none",
|
|
383
383
|
"stroke-linecap": "cap",
|
|
384
384
|
"stroke-width": "2"
|
|
385
|
-
},
|
|
386
|
-
return [e, t, n].forEach((
|
|
385
|
+
}, s = G.createElementNS(J, "g");
|
|
386
|
+
return [e, t, n].forEach((i, r) => {
|
|
387
387
|
const c = G.createElementNS(J, "path"), l = {
|
|
388
|
-
d:
|
|
388
|
+
d: i,
|
|
389
389
|
...o
|
|
390
390
|
};
|
|
391
|
-
|
|
392
|
-
}),
|
|
391
|
+
C(c, l), r === 0 && c.setAttribute("stroke-dasharray", "8,2"), s.appendChild(c);
|
|
392
|
+
}), s;
|
|
393
393
|
}, Fe = function(e, t, n) {
|
|
394
394
|
if (!t)
|
|
395
395
|
return;
|
|
396
396
|
const o = document.createElement("div");
|
|
397
397
|
e.nodes.appendChild(o);
|
|
398
|
-
const
|
|
399
|
-
o.id = "input-box", o.textContent =
|
|
400
|
-
const
|
|
398
|
+
const s = t.innerHTML;
|
|
399
|
+
o.id = "input-box", o.textContent = s, o.contentEditable = "true", o.spellcheck = !1;
|
|
400
|
+
const i = t.getBBox();
|
|
401
401
|
o.style.cssText = `
|
|
402
|
-
min-width:${Math.max(88,
|
|
402
|
+
min-width:${Math.max(88, i.width)}px;
|
|
403
403
|
position:absolute;
|
|
404
|
-
left:${
|
|
405
|
-
top:${
|
|
404
|
+
left:${i.x}px;
|
|
405
|
+
top:${i.y}px;
|
|
406
406
|
padding: 2px 4px;
|
|
407
407
|
margin: -2px -4px;
|
|
408
408
|
`, o.focus(), Re(o), o.addEventListener("keydown", (r) => {
|
|
@@ -417,35 +417,35 @@ const ft = function(e) {
|
|
|
417
417
|
o && n(o);
|
|
418
418
|
});
|
|
419
419
|
}, mt = function(e) {
|
|
420
|
-
const t = this.map.querySelector("me-root"), n = t.offsetTop, o = t.offsetLeft,
|
|
421
|
-
this.nodes.style.top = `${1e4 - this.nodes.offsetHeight / 2}px`, this.nodes.style.left = `${1e4 - o -
|
|
422
|
-
const
|
|
420
|
+
const t = this.map.querySelector("me-root"), n = t.offsetTop, o = t.offsetLeft, s = t.offsetWidth, i = t.offsetHeight, c = this.map.querySelector("me-nodes").offsetWidth;
|
|
421
|
+
this.nodes.style.top = `${1e4 - this.nodes.offsetHeight / 2}px`, this.alignment === "root" ? this.nodes.style.left = `${1e4 - o - s / 2}px` : this.nodes.style.left = `${1e4 - c / 2}px`;
|
|
422
|
+
const l = this.map.querySelectorAll("me-main > me-wrapper");
|
|
423
423
|
this.lines.innerHTML = "";
|
|
424
|
-
for (let
|
|
425
|
-
const
|
|
426
|
-
|
|
427
|
-
const
|
|
428
|
-
if (
|
|
424
|
+
for (let d = 0; d < l.length; d++) {
|
|
425
|
+
const a = l[d], u = a.querySelector("me-tpc"), { offsetLeft: h, offsetTop: p } = R(this.nodes, u), g = u.offsetWidth, v = u.offsetHeight, m = a.parentNode.className, f = this.generateMainBranch({ pT: n, pL: o, pW: s, pH: i, cT: p, cL: h, cW: g, cH: v, direction: m, containerHeight: this.nodes.offsetHeight }), b = this.theme.palette, x = u.nodeObj.branchColor || b[d % b.length];
|
|
426
|
+
u.style.borderColor = x, this.lines.appendChild(ze(f, x, "3"));
|
|
427
|
+
const E = a.children[0].children[1];
|
|
428
|
+
if (E && (E.style.top = (E.parentNode.offsetHeight - E.offsetHeight) / 2 + "px", m === L.LHS ? E.style.left = "-10px" : E.style.right = "-10px"), e && e !== a)
|
|
429
429
|
continue;
|
|
430
|
-
const
|
|
431
|
-
|
|
430
|
+
const y = X("subLines"), w = a.lastChild;
|
|
431
|
+
w.tagName === "svg" && w.remove(), a.appendChild(y), qe(this, y, x, a, m, !0);
|
|
432
432
|
}
|
|
433
433
|
this.renderArrow(), this.renderSummary(), this.bus.fire("linkDiv");
|
|
434
|
-
}, qe = function(e, t, n, o,
|
|
434
|
+
}, qe = function(e, t, n, o, s, i) {
|
|
435
435
|
const r = o.firstChild, c = o.children[1].children;
|
|
436
436
|
if (c.length === 0)
|
|
437
437
|
return;
|
|
438
|
-
const l = r.offsetTop,
|
|
438
|
+
const l = r.offsetTop, d = r.offsetLeft, a = r.offsetWidth, u = r.offsetHeight;
|
|
439
439
|
for (let h = 0; h < c.length; h++) {
|
|
440
|
-
const p = c[h],
|
|
441
|
-
t.appendChild(ze(
|
|
442
|
-
const y =
|
|
440
|
+
const p = c[h], g = p.firstChild, v = g.offsetTop, m = g.offsetLeft, f = g.offsetWidth, b = g.offsetHeight, x = g.firstChild.nodeObj.branchColor || n, E = e.generateSubBranch({ pT: l, pL: d, pW: a, pH: u, cT: v, cL: m, cW: f, cH: b, direction: s, isFirst: i });
|
|
441
|
+
t.appendChild(ze(E, x, "2"));
|
|
442
|
+
const y = g.children[1];
|
|
443
443
|
if (y) {
|
|
444
|
-
if (y.style.bottom = -(y.offsetHeight / 2) + "px",
|
|
444
|
+
if (y.style.bottom = -(y.offsetHeight / 2) + "px", s === L.LHS ? y.style.left = "10px" : s === L.RHS && (y.style.right = "10px"), !y.expanded)
|
|
445
445
|
continue;
|
|
446
446
|
} else
|
|
447
447
|
continue;
|
|
448
|
-
qe(e, t, x, p,
|
|
448
|
+
qe(e, t, x, p, s);
|
|
449
449
|
}
|
|
450
450
|
}, Ne = {
|
|
451
451
|
addChild: "插入子节点",
|
|
@@ -586,9 +586,9 @@ function gt(e, t) {
|
|
|
586
586
|
return w.innerText = y, w.className = "tips", w;
|
|
587
587
|
}, o = (y, w, _) => {
|
|
588
588
|
const M = document.createElement("li");
|
|
589
|
-
return M.id = y, M.innerHTML = `<span>${
|
|
590
|
-
},
|
|
591
|
-
if (f.className = "menu-list", f.appendChild(r), f.appendChild(c), f.appendChild(l), f.appendChild(
|
|
589
|
+
return M.id = y, M.innerHTML = `<span>${se(w)}</span><span ${_ ? 'class="key"' : ""}>${se(_)}</span>`, M;
|
|
590
|
+
}, s = Ce[e.locale] ? e.locale : "en", i = Ce[s], r = o("cm-add_child", i.addChild, "Tab"), c = o("cm-add_parent", i.addParent, "Ctrl + Enter"), l = o("cm-add_sibling", i.addSibling, "Enter"), d = o("cm-remove_child", i.removeNode, "Delete"), a = o("cm-fucus", i.focus, ""), u = o("cm-unfucus", i.cancelFocus, ""), h = o("cm-up", i.moveUp, "PgUp"), p = o("cm-down", i.moveDown, "Pgdn"), g = o("cm-link", i.link, ""), v = o("cm-link-bidirectional", "Bidreactional Link", ""), m = o("cm-summary", i.summary, ""), f = document.createElement("ul");
|
|
591
|
+
if (f.className = "menu-list", f.appendChild(r), f.appendChild(c), f.appendChild(l), f.appendChild(d), (!t || t.focus) && (f.appendChild(a), f.appendChild(u)), f.appendChild(h), f.appendChild(p), f.appendChild(m), (!t || t.link) && (f.appendChild(g), f.appendChild(v)), t && t.extend)
|
|
592
592
|
for (let y = 0; y < t.extend.length; y++) {
|
|
593
593
|
const w = t.extend[y], _ = o(w.name, w.name, w.key || "");
|
|
594
594
|
f.appendChild(_), _.onclick = (M) => {
|
|
@@ -603,7 +603,7 @@ function gt(e, t) {
|
|
|
603
603
|
return;
|
|
604
604
|
const w = y.target;
|
|
605
605
|
if (he(w)) {
|
|
606
|
-
w.parentElement.tagName === "ME-ROOT" ? x = !0 : x = !1, x ? (
|
|
606
|
+
w.parentElement.tagName === "ME-ROOT" ? x = !0 : x = !1, x ? (a.className = "disabled", h.className = "disabled", p.className = "disabled", c.className = "disabled", l.className = "disabled", d.className = "disabled") : (a.className = "", h.className = "", p.className = "", c.className = "", l.className = "", d.className = ""), e.currentNodes || e.selectNode(w), b.hidden = !1, k.mousedown && (k.mousedown = !1), f.style.top = "", f.style.bottom = "", f.style.left = "", f.style.right = "";
|
|
607
607
|
const _ = f.getBoundingClientRect(), M = f.offsetHeight, j = f.offsetWidth, z = y.clientY - _.top, U = y.clientX - _.left;
|
|
608
608
|
M + z > window.innerHeight ? (f.style.top = "", f.style.bottom = "0px") : (f.style.bottom = "", f.style.top = z + 15 + "px"), j + U > window.innerWidth ? (f.style.left = "", f.style.right = "0px") : (f.style.right = "", f.style.left = U + 10 + "px");
|
|
609
609
|
}
|
|
@@ -615,9 +615,9 @@ function gt(e, t) {
|
|
|
615
615
|
e.insertParent(), b.hidden = !0;
|
|
616
616
|
}, l.onclick = () => {
|
|
617
617
|
x || (e.insertSibling("after"), b.hidden = !0);
|
|
618
|
-
}, a.onclick = () => {
|
|
619
|
-
x || (e.removeNode(), b.hidden = !0);
|
|
620
618
|
}, d.onclick = () => {
|
|
619
|
+
x || (e.removeNode(), b.hidden = !0);
|
|
620
|
+
}, a.onclick = () => {
|
|
621
621
|
x || (e.focusNode(e.currentNode), b.hidden = !0);
|
|
622
622
|
}, u.onclick = () => {
|
|
623
623
|
e.cancelFocus(), b.hidden = !0;
|
|
@@ -626,9 +626,9 @@ function gt(e, t) {
|
|
|
626
626
|
}, p.onclick = () => {
|
|
627
627
|
x || (e.moveDownNode(), b.hidden = !0);
|
|
628
628
|
};
|
|
629
|
-
const
|
|
629
|
+
const E = (y) => {
|
|
630
630
|
b.hidden = !0;
|
|
631
|
-
const w = e.currentNode, _ = n(
|
|
631
|
+
const w = e.currentNode, _ = n(i.clickTips);
|
|
632
632
|
e.container.appendChild(_), e.map.addEventListener(
|
|
633
633
|
"click",
|
|
634
634
|
(M) => {
|
|
@@ -641,10 +641,10 @@ function gt(e, t) {
|
|
|
641
641
|
}
|
|
642
642
|
);
|
|
643
643
|
};
|
|
644
|
-
return
|
|
644
|
+
return g.onclick = () => E(), v.onclick = () => E({ bidirectional: !0 }), m.onclick = () => {
|
|
645
645
|
b.hidden = !0, e.createSummary(), e.unselectNodes();
|
|
646
646
|
}, () => {
|
|
647
|
-
r.onclick = null, c.onclick = null, l.onclick = null,
|
|
647
|
+
r.onclick = null, c.onclick = null, l.onclick = null, d.onclick = null, a.onclick = null, u.onclick = null, h.onclick = null, p.onclick = null, g.onclick = null, m.onclick = null, b.onclick = null, e.container.oncontextmenu = null;
|
|
648
648
|
};
|
|
649
649
|
}
|
|
650
650
|
const vt = (e) => {
|
|
@@ -668,19 +668,19 @@ const vt = (e) => {
|
|
|
668
668
|
e.selectNode(o);
|
|
669
669
|
}
|
|
670
670
|
}, Se = function(e, t) {
|
|
671
|
-
var
|
|
672
|
-
const n = e.currentNode || ((
|
|
671
|
+
var i, r;
|
|
672
|
+
const n = e.currentNode || ((i = e.currentNodes) == null ? void 0 : i[0]);
|
|
673
673
|
if (!n)
|
|
674
674
|
return;
|
|
675
|
-
const o = n.nodeObj,
|
|
676
|
-
o.parent ?
|
|
675
|
+
const o = n.nodeObj, s = n.offsetParent.offsetParent.parentElement;
|
|
676
|
+
o.parent ? s.className === t ? wt(e, n) : (r = o.parent) != null && r.parent ? xt(e, n) : yt(e) : t === L.LHS ? vt(e) : bt(e);
|
|
677
677
|
}, _e = function(e, t) {
|
|
678
678
|
var r;
|
|
679
679
|
const n = e.currentNode || ((r = e.currentNodes) == null ? void 0 : r[0]);
|
|
680
680
|
if (!n || !n.nodeObj.parent)
|
|
681
681
|
return;
|
|
682
|
-
const
|
|
683
|
-
|
|
682
|
+
const s = t + "Sibling", i = n.parentElement.parentElement[s];
|
|
683
|
+
i && e.selectNode(i.firstChild.firstChild);
|
|
684
684
|
}, ee = function(e, t, n = 1) {
|
|
685
685
|
switch (t) {
|
|
686
686
|
case "in":
|
|
@@ -760,13 +760,13 @@ function Et(e) {
|
|
|
760
760
|
e.map.onkeydown = (o) => {
|
|
761
761
|
if (o.preventDefault(), !e.editable || o.target !== o.currentTarget)
|
|
762
762
|
return;
|
|
763
|
-
const
|
|
764
|
-
|
|
763
|
+
const s = n[o.key];
|
|
764
|
+
s && s(o);
|
|
765
765
|
}, e.map.onwheel = (o) => {
|
|
766
766
|
if (o.ctrlKey || o.metaKey) {
|
|
767
767
|
o.preventDefault();
|
|
768
|
-
const
|
|
769
|
-
o.deltaY < 0 ? ee(e, "in",
|
|
768
|
+
const s = Math.abs(o.deltaY / 100);
|
|
769
|
+
o.deltaY < 0 ? ee(e, "in", s) : e.scaleVal - 0.2 > 0 && ee(e, "out", s), o.stopPropagation();
|
|
770
770
|
}
|
|
771
771
|
};
|
|
772
772
|
}
|
|
@@ -795,18 +795,18 @@ const ue = document, Nt = function(e, t) {
|
|
|
795
795
|
};
|
|
796
796
|
function St(e) {
|
|
797
797
|
let t = null, n = null, o = null;
|
|
798
|
-
const
|
|
798
|
+
const s = Ct(e), i = 12;
|
|
799
799
|
e.map.addEventListener("dragstart", (r) => {
|
|
800
|
-
var l,
|
|
800
|
+
var l, d;
|
|
801
801
|
const c = r.target;
|
|
802
802
|
if ((c == null ? void 0 : c.tagName) !== "ME-TPC") {
|
|
803
803
|
r.preventDefault();
|
|
804
804
|
return;
|
|
805
805
|
}
|
|
806
|
-
(l = e.currentNodes) != null && l.includes(c) || (e.unselectNodes(), e.selectNode(c)), e.currentNodes ? (t = e.currentNodes,
|
|
807
|
-
for (const
|
|
808
|
-
|
|
809
|
-
(
|
|
806
|
+
(l = e.currentNodes) != null && l.includes(c) || (e.unselectNodes(), e.selectNode(c)), e.currentNodes ? (t = e.currentNodes, s.innerHTML = e.currentNodes.length + " nodes") : (t = [c], s.innerHTML = c.innerHTML);
|
|
807
|
+
for (const a of t)
|
|
808
|
+
a.parentElement.parentElement.style.opacity = "0.5";
|
|
809
|
+
(d = r.dataTransfer) == null || d.setDragImage(s, 0, 0), k.clear();
|
|
810
810
|
}), e.map.addEventListener("dragend", async (r) => {
|
|
811
811
|
if (!t)
|
|
812
812
|
return;
|
|
@@ -820,17 +820,17 @@ function St(e) {
|
|
|
820
820
|
if (!t)
|
|
821
821
|
return;
|
|
822
822
|
fe(o);
|
|
823
|
-
const c = ue.elementFromPoint(r.clientX, r.clientY -
|
|
823
|
+
const c = ue.elementFromPoint(r.clientX, r.clientY - i);
|
|
824
824
|
if (Le(c, t)) {
|
|
825
825
|
o = c;
|
|
826
826
|
const l = c.getBoundingClientRect().y;
|
|
827
827
|
r.clientY > l + c.clientHeight ? n = "after" : n = "in";
|
|
828
828
|
} else {
|
|
829
|
-
const l = ue.elementFromPoint(r.clientX, r.clientY +
|
|
829
|
+
const l = ue.elementFromPoint(r.clientX, r.clientY + i);
|
|
830
830
|
if (Le(l, t)) {
|
|
831
831
|
o = l;
|
|
832
|
-
const
|
|
833
|
-
r.clientY <
|
|
832
|
+
const d = l.getBoundingClientRect().y;
|
|
833
|
+
r.clientY < d ? n = "before" : n = "in";
|
|
834
834
|
} else
|
|
835
835
|
n = o = null;
|
|
836
836
|
}
|
|
@@ -855,18 +855,18 @@ const _t = function(e) {
|
|
|
855
855
|
};
|
|
856
856
|
function Lt(e) {
|
|
857
857
|
let t = [], n = -1, o = e.getData();
|
|
858
|
-
e.bus.addListener("operation", (
|
|
859
|
-
if (
|
|
858
|
+
e.bus.addListener("operation", (s) => {
|
|
859
|
+
if (s.name === "beginEdit")
|
|
860
860
|
return;
|
|
861
861
|
t = t.slice(0, n + 1);
|
|
862
|
-
const
|
|
863
|
-
t.push({ prev: o, currentObject: _t(
|
|
862
|
+
const i = e.getData();
|
|
863
|
+
t.push({ prev: o, currentObject: _t(s), next: i }), o = i, n = t.length - 1;
|
|
864
864
|
}), e.undo = function() {
|
|
865
865
|
if (n > -1) {
|
|
866
|
-
const
|
|
867
|
-
o =
|
|
866
|
+
const s = t[n];
|
|
867
|
+
o = s.prev, e.refresh(s.prev);
|
|
868
868
|
try {
|
|
869
|
-
|
|
869
|
+
s.currentObject.type === "node" ? e.selectNode(S(s.currentObject.value)) : s.currentObject.type === "nodes" && e.selectNodes(s.currentObject.value.map((i) => S(i)));
|
|
870
870
|
} catch {
|
|
871
871
|
} finally {
|
|
872
872
|
n--;
|
|
@@ -875,11 +875,11 @@ function Lt(e) {
|
|
|
875
875
|
}, e.redo = function() {
|
|
876
876
|
if (n < t.length - 1) {
|
|
877
877
|
n++;
|
|
878
|
-
const
|
|
879
|
-
o =
|
|
878
|
+
const s = t[n];
|
|
879
|
+
o = s.next, e.refresh(s.next), s.currentObject.type === "node" ? e.selectNode(S(s.currentObject.value)) : s.currentObject.type === "nodes" && e.selectNodes(s.currentObject.value.map((i) => S(i)));
|
|
880
880
|
}
|
|
881
|
-
}, e.map.addEventListener("keydown", (
|
|
882
|
-
(
|
|
881
|
+
}, e.map.addEventListener("keydown", (s) => {
|
|
882
|
+
(s.metaKey || s.ctrlKey) && (s.shiftKey && s.key === "Z" || s.key === "y") ? e.redo() : (s.metaKey || s.ctrlKey) && s.key === "z" && e.undo();
|
|
883
883
|
});
|
|
884
884
|
}
|
|
885
885
|
const q = (e, t) => {
|
|
@@ -889,24 +889,24 @@ const q = (e, t) => {
|
|
|
889
889
|
</svg>`, n;
|
|
890
890
|
};
|
|
891
891
|
function Mt(e) {
|
|
892
|
-
const t = document.createElement("div"), n = q("fullscreen", "full"), o = q("toCenter", "living"),
|
|
893
|
-
return r.innerText = "100%", t.appendChild(n), t.appendChild(o), t.appendChild(
|
|
892
|
+
const t = document.createElement("div"), n = q("fullscreen", "full"), o = q("toCenter", "living"), s = q("zoomout", "move"), i = q("zoomin", "add"), r = document.createElement("span");
|
|
893
|
+
return r.innerText = "100%", t.appendChild(n), t.appendChild(o), t.appendChild(s), t.appendChild(i), t.className = "mind-elixir-toolbar rb", n.onclick = () => {
|
|
894
894
|
e.mindElixirBox.requestFullscreen();
|
|
895
895
|
}, o.onclick = () => {
|
|
896
896
|
e.toCenter();
|
|
897
|
-
}, i.onclick = () => {
|
|
898
|
-
e.scaleVal < 0.6 || e.scale(e.scaleVal - 0.2);
|
|
899
897
|
}, s.onclick = () => {
|
|
898
|
+
e.scaleVal < 0.6 || e.scale(e.scaleVal - 0.2);
|
|
899
|
+
}, i.onclick = () => {
|
|
900
900
|
e.scaleVal > 1.6 || e.scale(e.scaleVal + 0.2);
|
|
901
901
|
}, t;
|
|
902
902
|
}
|
|
903
903
|
function kt(e) {
|
|
904
|
-
const t = document.createElement("div"), n = q("tbltl", "left"), o = q("tbltr", "right"),
|
|
905
|
-
return t.appendChild(n), t.appendChild(o), t.appendChild(
|
|
904
|
+
const t = document.createElement("div"), n = q("tbltl", "left"), o = q("tbltr", "right"), s = q("tblts", "side");
|
|
905
|
+
return t.appendChild(n), t.appendChild(o), t.appendChild(s), t.className = "mind-elixir-toolbar lt", n.onclick = () => {
|
|
906
906
|
e.initLeft();
|
|
907
907
|
}, o.onclick = () => {
|
|
908
908
|
e.initRight();
|
|
909
|
-
},
|
|
909
|
+
}, s.onclick = () => {
|
|
910
910
|
e.initSide();
|
|
911
911
|
}, t;
|
|
912
912
|
}
|
|
@@ -914,10 +914,10 @@ function Tt(e) {
|
|
|
914
914
|
e.container.append(Mt(e)), e.container.append(kt(e));
|
|
915
915
|
}
|
|
916
916
|
/*! @viselect/vanilla v3.5.1 MIT | https://github.com/Simonwep/selection/tree/master/packages/vanilla */
|
|
917
|
-
var At = Object.defineProperty, $t = (e, t, n) => t in e ? At(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n,
|
|
917
|
+
var At = Object.defineProperty, $t = (e, t, n) => t in e ? At(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, N = (e, t, n) => ($t(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
918
918
|
class jt {
|
|
919
919
|
constructor() {
|
|
920
|
-
|
|
920
|
+
N(this, "_listeners", /* @__PURE__ */ new Map()), N(this, "on", this.addEventListener), N(this, "off", this.removeEventListener), N(this, "emit", this.dispatchEvent);
|
|
921
921
|
}
|
|
922
922
|
addEventListener(t, n) {
|
|
923
923
|
const o = this._listeners.get(t) ?? /* @__PURE__ */ new Set();
|
|
@@ -929,8 +929,8 @@ class jt {
|
|
|
929
929
|
}
|
|
930
930
|
dispatchEvent(t, ...n) {
|
|
931
931
|
let o = !0;
|
|
932
|
-
for (const
|
|
933
|
-
o =
|
|
932
|
+
for (const s of this._listeners.get(t) ?? [])
|
|
933
|
+
o = s(...n) !== !1 && o;
|
|
934
934
|
return o;
|
|
935
935
|
}
|
|
936
936
|
unbindAllListeners() {
|
|
@@ -940,28 +940,28 @@ class jt {
|
|
|
940
940
|
const Me = (e, t = "px") => typeof e == "number" ? e + t : e;
|
|
941
941
|
function O({ style: e }, t, n) {
|
|
942
942
|
if (typeof t == "object")
|
|
943
|
-
for (const [o,
|
|
944
|
-
|
|
943
|
+
for (const [o, s] of Object.entries(t))
|
|
944
|
+
s !== void 0 && (e[o] = Me(s));
|
|
945
945
|
else
|
|
946
946
|
n !== void 0 && (e[t] = Me(n));
|
|
947
947
|
}
|
|
948
|
-
const Ve = (e) => (t, n, o,
|
|
948
|
+
const Ve = (e) => (t, n, o, s = {}) => {
|
|
949
949
|
t instanceof HTMLCollection || t instanceof NodeList ? t = Array.from(t) : Array.isArray(t) || (t = [t]), Array.isArray(n) || (n = [n]);
|
|
950
|
-
for (const
|
|
951
|
-
if (
|
|
950
|
+
for (const i of t)
|
|
951
|
+
if (i)
|
|
952
952
|
for (const r of n)
|
|
953
|
-
|
|
954
|
-
return [t, n, o,
|
|
953
|
+
i[e](r, o, { capture: !1, ...s });
|
|
954
|
+
return [t, n, o, s];
|
|
955
955
|
}, V = Ve("addEventListener"), H = Ve("removeEventListener"), te = (e) => {
|
|
956
956
|
var t;
|
|
957
|
-
const { clientX: n, clientY: o, target:
|
|
958
|
-
return { x: n, y: o, target:
|
|
957
|
+
const { clientX: n, clientY: o, target: s } = ((t = e.touches) == null ? void 0 : t[0]) ?? e;
|
|
958
|
+
return { x: n, y: o, target: s };
|
|
959
959
|
};
|
|
960
960
|
function ke(e, t, n = "touch") {
|
|
961
961
|
switch (n) {
|
|
962
962
|
case "center": {
|
|
963
|
-
const o = t.left + t.width / 2,
|
|
964
|
-
return o >= e.left && o <= e.right &&
|
|
963
|
+
const o = t.left + t.width / 2, s = t.top + t.height / 2;
|
|
964
|
+
return o >= e.left && o <= e.right && s >= e.top && s <= e.bottom;
|
|
965
965
|
}
|
|
966
966
|
case "cover":
|
|
967
967
|
return t.left >= e.left && t.top >= e.top && t.right <= e.right && t.bottom <= e.bottom;
|
|
@@ -972,8 +972,8 @@ function ke(e, t, n = "touch") {
|
|
|
972
972
|
function I(e, t = document) {
|
|
973
973
|
const n = Array.isArray(e) ? e : [e];
|
|
974
974
|
let o = [];
|
|
975
|
-
for (let
|
|
976
|
-
const r = n[
|
|
975
|
+
for (let s = 0, i = n.length; s < i; s++) {
|
|
976
|
+
const r = n[s];
|
|
977
977
|
typeof r == "string" ? o = o.concat(Array.from(t.querySelectorAll(r))) : r instanceof Element && o.push(r);
|
|
978
978
|
}
|
|
979
979
|
return o;
|
|
@@ -981,8 +981,8 @@ function I(e, t = document) {
|
|
|
981
981
|
const Dt = () => matchMedia("(hover: none), (pointer: coarse)").matches, Ot = () => "safari" in window, Ht = (e) => {
|
|
982
982
|
let t, n = -1, o = !1;
|
|
983
983
|
return {
|
|
984
|
-
next(...
|
|
985
|
-
t =
|
|
984
|
+
next(...s) {
|
|
985
|
+
t = s, o || (o = !0, n = requestAnimationFrame(() => {
|
|
986
986
|
e(...t), o = !1;
|
|
987
987
|
}));
|
|
988
988
|
},
|
|
@@ -996,8 +996,8 @@ function Pt(e, t) {
|
|
|
996
996
|
if (typeof n == "number")
|
|
997
997
|
return e.button === n;
|
|
998
998
|
if (typeof n == "object") {
|
|
999
|
-
const o = n.button === e.button,
|
|
1000
|
-
switch (
|
|
999
|
+
const o = n.button === e.button, s = n.modifiers.every((i) => {
|
|
1000
|
+
switch (i) {
|
|
1001
1001
|
case "alt":
|
|
1002
1002
|
return e.altKey;
|
|
1003
1003
|
case "ctrl":
|
|
@@ -1006,7 +1006,7 @@ function Pt(e, t) {
|
|
|
1006
1006
|
return e.shiftKey;
|
|
1007
1007
|
}
|
|
1008
1008
|
});
|
|
1009
|
-
return o &&
|
|
1009
|
+
return o && s;
|
|
1010
1010
|
}
|
|
1011
1011
|
}
|
|
1012
1012
|
return !1;
|
|
@@ -1014,8 +1014,8 @@ function Pt(e, t) {
|
|
|
1014
1014
|
const { abs: F, max: Te, min: Ae, ceil: $e } = Math;
|
|
1015
1015
|
class Ie extends jt {
|
|
1016
1016
|
constructor(t) {
|
|
1017
|
-
var n, o,
|
|
1018
|
-
super(),
|
|
1017
|
+
var n, o, s, i, r;
|
|
1018
|
+
super(), N(this, "_options"), N(this, "_selection", {
|
|
1019
1019
|
stored: [],
|
|
1020
1020
|
selected: [],
|
|
1021
1021
|
touched: [],
|
|
@@ -1025,7 +1025,7 @@ class Ie extends jt {
|
|
|
1025
1025
|
removed: []
|
|
1026
1026
|
// Removed elements since last selection
|
|
1027
1027
|
}
|
|
1028
|
-
}),
|
|
1028
|
+
}), N(this, "_area"), N(this, "_clippingElement"), N(this, "_targetElement"), N(this, "_targetRect"), N(this, "_selectables", []), N(this, "_latestElement"), N(this, "_areaRect", new DOMRect()), N(this, "_areaLocation", { y1: 0, x2: 0, y2: 0, x1: 0 }), N(this, "_singleClick", !0), N(this, "_frame"), N(this, "_scrollAvailable", !0), N(this, "_scrollingActive", !1), N(this, "_scrollSpeed", { x: 0, y: 0 }), N(this, "_scrollDelta", { x: 0, y: 0 }), N(this, "disable", this._bindStartEvents.bind(this, !1)), N(this, "enable", this._bindStartEvents), this._options = {
|
|
1029
1029
|
selectionAreaClass: "selection-area",
|
|
1030
1030
|
selectionContainerClass: void 0,
|
|
1031
1031
|
selectables: [],
|
|
@@ -1047,7 +1047,7 @@ class Ie extends jt {
|
|
|
1047
1047
|
startScrollMargins: {
|
|
1048
1048
|
x: 0,
|
|
1049
1049
|
y: 0,
|
|
1050
|
-
...(
|
|
1050
|
+
...(i = (s = t.behaviour) == null ? void 0 : s.scrolling) == null ? void 0 : i.startScrollMargins
|
|
1051
1051
|
}
|
|
1052
1052
|
}
|
|
1053
1053
|
},
|
|
@@ -1062,10 +1062,10 @@ class Ie extends jt {
|
|
|
1062
1062
|
}
|
|
1063
1063
|
}
|
|
1064
1064
|
};
|
|
1065
|
-
for (const
|
|
1066
|
-
typeof this[
|
|
1067
|
-
const { document: c, selectionAreaClass: l, selectionContainerClass:
|
|
1068
|
-
this._area = c.createElement("div"), this._clippingElement = c.createElement("div"), this._clippingElement.appendChild(this._area), this._area.classList.add(l),
|
|
1065
|
+
for (const a of Object.getOwnPropertyNames(Object.getPrototypeOf(this)))
|
|
1066
|
+
typeof this[a] == "function" && (this[a] = this[a].bind(this));
|
|
1067
|
+
const { document: c, selectionAreaClass: l, selectionContainerClass: d } = this._options;
|
|
1068
|
+
this._area = c.createElement("div"), this._clippingElement = c.createElement("div"), this._clippingElement.appendChild(this._area), this._area.classList.add(l), d && this._clippingElement.classList.add(d), O(this._area, {
|
|
1069
1069
|
willChange: "top, left, bottom, right, width, height",
|
|
1070
1070
|
top: 0,
|
|
1071
1071
|
left: 0,
|
|
@@ -1077,85 +1077,85 @@ class Ie extends jt {
|
|
|
1077
1077
|
// https://stackoverflow.com/a/38268846
|
|
1078
1078
|
pointerEvents: "none",
|
|
1079
1079
|
zIndex: "1"
|
|
1080
|
-
}), this._frame = Ht((
|
|
1081
|
-
this._recalculateSelectionAreaRect(), this._updateElementSelection(), this._emitEvent("move",
|
|
1080
|
+
}), this._frame = Ht((a) => {
|
|
1081
|
+
this._recalculateSelectionAreaRect(), this._updateElementSelection(), this._emitEvent("move", a), this._redrawSelectionArea();
|
|
1082
1082
|
}), this.enable();
|
|
1083
1083
|
}
|
|
1084
1084
|
_bindStartEvents(t = !0) {
|
|
1085
|
-
const { document: n, features: o } = this._options,
|
|
1086
|
-
|
|
1085
|
+
const { document: n, features: o } = this._options, s = t ? V : H;
|
|
1086
|
+
s(n, "mousedown", this._onTapStart), o.touch && s(n, "touchstart", this._onTapStart, {
|
|
1087
1087
|
passive: !1
|
|
1088
1088
|
});
|
|
1089
1089
|
}
|
|
1090
1090
|
_onTapStart(t, n = !1) {
|
|
1091
|
-
const { x: o, y:
|
|
1091
|
+
const { x: o, y: s, target: i } = te(t), { _options: r } = this, { document: c } = this._options, l = i.getBoundingClientRect();
|
|
1092
1092
|
if (t instanceof MouseEvent && !Pt(t, r.behaviour.triggers))
|
|
1093
1093
|
return;
|
|
1094
|
-
const
|
|
1095
|
-
this._targetElement =
|
|
1094
|
+
const d = I(r.startAreas, r.document), a = I(r.boundaries, r.document);
|
|
1095
|
+
this._targetElement = a.find(
|
|
1096
1096
|
(p) => ke(p.getBoundingClientRect(), l)
|
|
1097
1097
|
);
|
|
1098
1098
|
const u = t.composedPath();
|
|
1099
|
-
if (!this._targetElement || !
|
|
1099
|
+
if (!this._targetElement || !d.find((p) => u.includes(p)) || !a.find((p) => u.includes(p)) || !n && this._emitEvent("beforestart", t) === !1)
|
|
1100
1100
|
return;
|
|
1101
|
-
this._areaLocation = { x1: o, y1:
|
|
1101
|
+
this._areaLocation = { x1: o, y1: s, x2: 0, y2: 0 };
|
|
1102
1102
|
const h = c.scrollingElement ?? c.body;
|
|
1103
1103
|
this._scrollDelta = { x: h.scrollLeft, y: h.scrollTop }, this._singleClick = !0, this.clearSelection(!1, !0), V(c, ["touchmove", "mousemove"], this._delayedTapMove, { passive: !1 }), V(c, ["mouseup", "touchcancel", "touchend"], this._onTapStop), V(c, "scroll", this._onScroll);
|
|
1104
1104
|
}
|
|
1105
1105
|
_onSingleTap(t) {
|
|
1106
|
-
const { singleTap: { intersect: n }, range: o } = this._options.features,
|
|
1107
|
-
let
|
|
1106
|
+
const { singleTap: { intersect: n }, range: o } = this._options.features, s = te(t);
|
|
1107
|
+
let i;
|
|
1108
1108
|
if (n === "native")
|
|
1109
|
-
|
|
1109
|
+
i = s.target;
|
|
1110
1110
|
else if (n === "touch") {
|
|
1111
1111
|
this.resolveSelectables();
|
|
1112
|
-
const { x: c, y: l } =
|
|
1113
|
-
|
|
1114
|
-
const { right:
|
|
1115
|
-
return c <
|
|
1112
|
+
const { x: c, y: l } = s;
|
|
1113
|
+
i = this._selectables.find((d) => {
|
|
1114
|
+
const { right: a, left: u, top: h, bottom: p } = d.getBoundingClientRect();
|
|
1115
|
+
return c < a && c > u && l < p && l > h;
|
|
1116
1116
|
});
|
|
1117
1117
|
}
|
|
1118
|
-
if (!
|
|
1118
|
+
if (!i)
|
|
1119
1119
|
return;
|
|
1120
|
-
for (this.resolveSelectables(); !this._selectables.includes(
|
|
1121
|
-
if (!
|
|
1120
|
+
for (this.resolveSelectables(); !this._selectables.includes(i); ) {
|
|
1121
|
+
if (!i.parentElement)
|
|
1122
1122
|
return;
|
|
1123
|
-
|
|
1123
|
+
i = i.parentElement;
|
|
1124
1124
|
}
|
|
1125
1125
|
const { stored: r } = this._selection;
|
|
1126
1126
|
if (this._emitEvent("start", t), t.shiftKey && o && this._latestElement) {
|
|
1127
|
-
const c = this._latestElement, [l,
|
|
1128
|
-
(u) => u.compareDocumentPosition(l) & 4 && u.compareDocumentPosition(
|
|
1129
|
-
), l,
|
|
1130
|
-
this.select(
|
|
1127
|
+
const c = this._latestElement, [l, d] = c.compareDocumentPosition(i) & 4 ? [i, c] : [c, i], a = [...this._selectables.filter(
|
|
1128
|
+
(u) => u.compareDocumentPosition(l) & 4 && u.compareDocumentPosition(d) & 2
|
|
1129
|
+
), l, d];
|
|
1130
|
+
this.select(a), this._latestElement = c;
|
|
1131
1131
|
} else
|
|
1132
|
-
r.includes(
|
|
1132
|
+
r.includes(i) && (r.length === 1 || t.ctrlKey || r.every((c) => this._selection.stored.includes(c))) ? this.deselect(i) : (this.select(i), this._latestElement = i);
|
|
1133
1133
|
}
|
|
1134
1134
|
_delayedTapMove(t) {
|
|
1135
|
-
const { container: n, document: o, behaviour: { startThreshold:
|
|
1135
|
+
const { container: n, document: o, behaviour: { startThreshold: s } } = this._options, { x1: i, y1: r } = this._areaLocation, { x: c, y: l } = te(t);
|
|
1136
1136
|
if (
|
|
1137
1137
|
// Single number for both coordinates
|
|
1138
|
-
typeof
|
|
1139
|
-
typeof
|
|
1138
|
+
typeof s == "number" && F(c + l - (i + r)) >= s || // Different x and y threshold
|
|
1139
|
+
typeof s == "object" && F(c - i) >= s.x || F(l - r) >= s.y
|
|
1140
1140
|
) {
|
|
1141
1141
|
if (H(o, ["mousemove", "touchmove"], this._delayedTapMove, { passive: !1 }), this._emitEvent("beforedrag", t) === !1) {
|
|
1142
1142
|
H(o, ["mouseup", "touchcancel", "touchend"], this._onTapStop);
|
|
1143
1143
|
return;
|
|
1144
1144
|
}
|
|
1145
|
-
V(o, ["mousemove", "touchmove"], this._onTapMove, { passive: !1 }), O(this._area, "display", "block"), I(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 && (V(this._targetElement, "wheel", this._manualScroll, { passive: !1 }), this._selectables = this._selectables.filter((
|
|
1145
|
+
V(o, ["mousemove", "touchmove"], this._onTapMove, { passive: !1 }), O(this._area, "display", "block"), I(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 && (V(this._targetElement, "wheel", this._manualScroll, { passive: !1 }), this._selectables = this._selectables.filter((d) => this._targetElement.contains(d))), this._setupSelectionArea(), this._emitEvent("start", t), this._onTapMove(t);
|
|
1146
1146
|
}
|
|
1147
1147
|
this._handleMoveEvent(t);
|
|
1148
1148
|
}
|
|
1149
1149
|
_setupSelectionArea() {
|
|
1150
|
-
const { _clippingElement: t, _targetElement: n, _area: o } = this,
|
|
1150
|
+
const { _clippingElement: t, _targetElement: n, _area: o } = this, s = this._targetRect = n.getBoundingClientRect();
|
|
1151
1151
|
this._scrollAvailable ? (O(t, {
|
|
1152
|
-
top:
|
|
1153
|
-
left:
|
|
1154
|
-
width:
|
|
1155
|
-
height:
|
|
1152
|
+
top: s.top,
|
|
1153
|
+
left: s.left,
|
|
1154
|
+
width: s.width,
|
|
1155
|
+
height: s.height
|
|
1156
1156
|
}), O(o, {
|
|
1157
|
-
marginTop: -
|
|
1158
|
-
marginLeft: -
|
|
1157
|
+
marginTop: -s.top,
|
|
1158
|
+
marginLeft: -s.left
|
|
1159
1159
|
})) : (O(t, {
|
|
1160
1160
|
top: 0,
|
|
1161
1161
|
left: 0,
|
|
@@ -1167,18 +1167,18 @@ class Ie extends jt {
|
|
|
1167
1167
|
}));
|
|
1168
1168
|
}
|
|
1169
1169
|
_onTapMove(t) {
|
|
1170
|
-
const { x: n, y: o } = te(t), { _scrollSpeed:
|
|
1171
|
-
if (
|
|
1170
|
+
const { x: n, y: o } = te(t), { _scrollSpeed: s, _areaLocation: i, _options: r, _frame: c } = this, { speedDivider: l } = r.behaviour.scrolling, d = this._targetElement;
|
|
1171
|
+
if (i.x2 = n, i.y2 = o, this._scrollAvailable && !this._scrollingActive && (s.y || s.x)) {
|
|
1172
1172
|
this._scrollingActive = !0;
|
|
1173
|
-
const
|
|
1174
|
-
if (!
|
|
1173
|
+
const a = () => {
|
|
1174
|
+
if (!s.x && !s.y) {
|
|
1175
1175
|
this._scrollingActive = !1;
|
|
1176
1176
|
return;
|
|
1177
1177
|
}
|
|
1178
|
-
const { scrollTop: u, scrollLeft: h } =
|
|
1179
|
-
|
|
1178
|
+
const { scrollTop: u, scrollLeft: h } = d;
|
|
1179
|
+
s.y && (d.scrollTop += $e(s.y / l), i.y1 -= d.scrollTop - u), s.x && (d.scrollLeft += $e(s.x / l), i.x1 -= d.scrollLeft - h), c.next(t), requestAnimationFrame(a);
|
|
1180
1180
|
};
|
|
1181
|
-
requestAnimationFrame(
|
|
1181
|
+
requestAnimationFrame(a);
|
|
1182
1182
|
} else
|
|
1183
1183
|
c.next(t);
|
|
1184
1184
|
this._handleMoveEvent(t);
|
|
@@ -1188,52 +1188,52 @@ class Ie extends jt {
|
|
|
1188
1188
|
(n.touch && Dt() || this._scrollAvailable && Ot()) && t.preventDefault();
|
|
1189
1189
|
}
|
|
1190
1190
|
_onScroll() {
|
|
1191
|
-
const { _scrollDelta: t, _options: { document: n } } = this, { scrollTop: o, scrollLeft:
|
|
1192
|
-
this._areaLocation.x1 += t.x -
|
|
1191
|
+
const { _scrollDelta: t, _options: { document: n } } = this, { scrollTop: o, scrollLeft: s } = n.scrollingElement ?? n.body;
|
|
1192
|
+
this._areaLocation.x1 += t.x - s, this._areaLocation.y1 += t.y - o, t.x = s, t.y = o, this._setupSelectionArea(), this._frame.next(null);
|
|
1193
1193
|
}
|
|
1194
1194
|
_manualScroll(t) {
|
|
1195
|
-
const { manualSpeed: n } = this._options.behaviour.scrolling, o = t.deltaY ? t.deltaY > 0 ? 1 : -1 : 0,
|
|
1196
|
-
this._scrollSpeed.y += o * n, this._scrollSpeed.x +=
|
|
1195
|
+
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;
|
|
1196
|
+
this._scrollSpeed.y += o * n, this._scrollSpeed.x += s * n, this._onTapMove(t), t.preventDefault();
|
|
1197
1197
|
}
|
|
1198
1198
|
_recalculateSelectionAreaRect() {
|
|
1199
|
-
const { _scrollSpeed: t, _areaLocation: n, _areaRect: o, _targetElement:
|
|
1200
|
-
let { x2: v, y2:
|
|
1201
|
-
const { behaviour: { scrolling: { startScrollMargins: f } } } =
|
|
1202
|
-
v < h.left + f.x ? (t.x =
|
|
1203
|
-
const b = Ae(p, v), x = Ae(
|
|
1204
|
-
o.x = b, o.y = x, o.width =
|
|
1199
|
+
const { _scrollSpeed: t, _areaLocation: n, _areaRect: o, _targetElement: s, _options: i } = this, { scrollTop: r, scrollHeight: c, clientHeight: l, scrollLeft: d, scrollWidth: a, clientWidth: u } = s, h = this._targetRect, { x1: p, y1: g } = n;
|
|
1200
|
+
let { x2: v, y2: m } = n;
|
|
1201
|
+
const { behaviour: { scrolling: { startScrollMargins: f } } } = i;
|
|
1202
|
+
v < h.left + f.x ? (t.x = d ? -F(h.left - v + f.x) : 0, v = v < h.left ? h.left : v) : v > h.right - f.x ? (t.x = a - d - u ? F(h.left + h.width - v - f.x) : 0, v = v > h.right ? h.right : v) : t.x = 0, m < h.top + f.y ? (t.y = r ? -F(h.top - m + f.y) : 0, m = m < h.top ? h.top : m) : m > h.bottom - f.y ? (t.y = c - r - l ? F(h.top + h.height - m - f.y) : 0, m = m > h.bottom ? h.bottom : m) : t.y = 0;
|
|
1203
|
+
const b = Ae(p, v), x = Ae(g, m), E = Te(p, v), y = Te(g, m);
|
|
1204
|
+
o.x = b, o.y = x, o.width = E - b, o.height = y - x;
|
|
1205
1205
|
}
|
|
1206
1206
|
_redrawSelectionArea() {
|
|
1207
|
-
const { x: t, y: n, width: o, height:
|
|
1208
|
-
|
|
1207
|
+
const { x: t, y: n, width: o, height: s } = this._areaRect, { style: i } = this._area;
|
|
1208
|
+
i.left = `${t}px`, i.top = `${n}px`, i.width = `${o}px`, i.height = `${s}px`;
|
|
1209
1209
|
}
|
|
1210
1210
|
_onTapStop(t, n) {
|
|
1211
1211
|
var o;
|
|
1212
|
-
const { document:
|
|
1213
|
-
H(
|
|
1212
|
+
const { document: s, features: i } = this._options, { _singleClick: r } = this;
|
|
1213
|
+
H(s, ["mousemove", "touchmove"], this._delayedTapMove), H(s, ["touchmove", "mousemove"], this._onTapMove), H(s, ["mouseup", "touchcancel", "touchend"], this._onTapStop), H(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, H(this._targetElement, "wheel", this._manualScroll, { passive: !0 }), this._clippingElement.remove(), (o = this._frame) == null || o.cancel(), O(this._area, "display", "none");
|
|
1214
1214
|
}
|
|
1215
1215
|
_updateElementSelection() {
|
|
1216
|
-
const { _selectables: t, _options: n, _selection: o, _areaRect:
|
|
1216
|
+
const { _selectables: t, _options: n, _selection: o, _areaRect: s } = this, { stored: i, selected: r, touched: c } = o, { intersect: l, overlap: d } = n.behaviour, a = d === "invert", u = [], h = [], p = [];
|
|
1217
1217
|
for (let v = 0; v < t.length; v++) {
|
|
1218
|
-
const
|
|
1219
|
-
if (ke(
|
|
1220
|
-
if (r.includes(
|
|
1221
|
-
|
|
1222
|
-
else if (
|
|
1223
|
-
p.push(
|
|
1218
|
+
const m = t[v];
|
|
1219
|
+
if (ke(s, m.getBoundingClientRect(), l)) {
|
|
1220
|
+
if (r.includes(m))
|
|
1221
|
+
i.includes(m) && !c.includes(m) && c.push(m);
|
|
1222
|
+
else if (a && i.includes(m)) {
|
|
1223
|
+
p.push(m);
|
|
1224
1224
|
continue;
|
|
1225
1225
|
} else
|
|
1226
|
-
h.push(
|
|
1227
|
-
u.push(
|
|
1226
|
+
h.push(m);
|
|
1227
|
+
u.push(m);
|
|
1228
1228
|
}
|
|
1229
1229
|
}
|
|
1230
|
-
|
|
1231
|
-
const
|
|
1230
|
+
a && h.push(...i.filter((v) => !r.includes(v)));
|
|
1231
|
+
const g = d === "keep";
|
|
1232
1232
|
for (let v = 0; v < r.length; v++) {
|
|
1233
|
-
const
|
|
1234
|
-
!u.includes(
|
|
1233
|
+
const m = r[v];
|
|
1234
|
+
!u.includes(m) && !// Check if user wants to keep previously selected elements, e.g.
|
|
1235
1235
|
// not make them part of the current selection as soon as they're touched.
|
|
1236
|
-
(
|
|
1236
|
+
(g && i.includes(m)) && p.push(m);
|
|
1237
1237
|
}
|
|
1238
1238
|
o.selected = u, o.changed = { added: h, removed: p }, this._latestElement = void 0;
|
|
1239
1239
|
}
|
|
@@ -1245,12 +1245,12 @@ class Ie extends jt {
|
|
|
1245
1245
|
});
|
|
1246
1246
|
}
|
|
1247
1247
|
_keepSelection() {
|
|
1248
|
-
const { _options: t, _selection: n } = this, { selected: o, changed:
|
|
1248
|
+
const { _options: t, _selection: n } = this, { selected: o, changed: s, touched: i, stored: r } = n, c = o.filter((l) => !r.includes(l));
|
|
1249
1249
|
switch (t.behaviour.overlap) {
|
|
1250
1250
|
case "drop": {
|
|
1251
1251
|
n.stored = [
|
|
1252
1252
|
...c,
|
|
1253
|
-
...r.filter((l) => !
|
|
1253
|
+
...r.filter((l) => !i.includes(l))
|
|
1254
1254
|
// Elements not touched
|
|
1255
1255
|
];
|
|
1256
1256
|
break;
|
|
@@ -1258,7 +1258,7 @@ class Ie extends jt {
|
|
|
1258
1258
|
case "invert": {
|
|
1259
1259
|
n.stored = [
|
|
1260
1260
|
...c,
|
|
1261
|
-
...r.filter((l) => !
|
|
1261
|
+
...r.filter((l) => !s.removed.includes(l))
|
|
1262
1262
|
// Elements not removed from selection
|
|
1263
1263
|
];
|
|
1264
1264
|
break;
|
|
@@ -1294,12 +1294,12 @@ class Ie extends jt {
|
|
|
1294
1294
|
* @param quiet If move / stop events should be fired
|
|
1295
1295
|
*/
|
|
1296
1296
|
clearSelection(t = !0, n = !1) {
|
|
1297
|
-
const { selected: o, stored:
|
|
1298
|
-
|
|
1297
|
+
const { selected: o, stored: s, changed: i } = this._selection;
|
|
1298
|
+
i.added = [], i.removed.push(
|
|
1299
1299
|
...o,
|
|
1300
|
-
...t ?
|
|
1300
|
+
...t ? s : []
|
|
1301
1301
|
), n || (this._emitEvent("move", null), this._emitEvent("stop", null)), this._selection = {
|
|
1302
|
-
stored: t ? [] :
|
|
1302
|
+
stored: t ? [] : s,
|
|
1303
1303
|
selected: [],
|
|
1304
1304
|
touched: [],
|
|
1305
1305
|
changed: { added: [], removed: [] }
|
|
@@ -1336,10 +1336,10 @@ class Ie extends jt {
|
|
|
1336
1336
|
* @param quiet - If this should not trigger the move event
|
|
1337
1337
|
*/
|
|
1338
1338
|
select(t, n = !1) {
|
|
1339
|
-
const { changed: o, selected:
|
|
1340
|
-
(c) => !
|
|
1339
|
+
const { changed: o, selected: s, stored: i } = this._selection, r = I(t, this._options.document).filter(
|
|
1340
|
+
(c) => !s.includes(c) && !i.includes(c)
|
|
1341
1341
|
);
|
|
1342
|
-
return
|
|
1342
|
+
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;
|
|
1343
1343
|
}
|
|
1344
1344
|
/**
|
|
1345
1345
|
* Removes a particular element from the selection.
|
|
@@ -1347,15 +1347,15 @@ class Ie extends jt {
|
|
|
1347
1347
|
* @param quiet - If this should not trigger the move event
|
|
1348
1348
|
*/
|
|
1349
1349
|
deselect(t, n = !1) {
|
|
1350
|
-
const { selected: o, stored:
|
|
1351
|
-
(c) => o.includes(c) ||
|
|
1350
|
+
const { selected: o, stored: s, changed: i } = this._selection, r = I(t, this._options.document).filter(
|
|
1351
|
+
(c) => o.includes(c) || s.includes(c)
|
|
1352
1352
|
);
|
|
1353
|
-
r.length && (this._selection.stored =
|
|
1354
|
-
...r.filter((c) => !
|
|
1353
|
+
r.length && (this._selection.stored = s.filter((c) => !r.includes(c)), this._selection.selected = o.filter((c) => !r.includes(c)), this._selection.changed.added = [], this._selection.changed.removed.push(
|
|
1354
|
+
...r.filter((c) => !i.removed.includes(c))
|
|
1355
1355
|
), this._latestElement = void 0, n || (this._emitEvent("move", null), this._emitEvent("stop", null)));
|
|
1356
1356
|
}
|
|
1357
1357
|
}
|
|
1358
|
-
|
|
1358
|
+
N(Ie, "version", "3.5.1");
|
|
1359
1359
|
function Bt(e) {
|
|
1360
1360
|
const t = e.mouseSelectionButton === 2 ? [2] : [0], n = new Ie({
|
|
1361
1361
|
selectables: [".map-container me-tpc"],
|
|
@@ -1380,22 +1380,22 @@ function Bt(e) {
|
|
|
1380
1380
|
}).on("beforestart", ({ event: o }) => {
|
|
1381
1381
|
if (o.target.tagName === "ME-TPC" || o.target.id === "input-box" || o.target.className === "circle")
|
|
1382
1382
|
return !1;
|
|
1383
|
-
const
|
|
1384
|
-
return
|
|
1383
|
+
const s = n.getSelectionArea();
|
|
1384
|
+
return s.style.background = "#4f90f22d", s.style.border = "1px solid #4f90f2", s.parentElement && (s.parentElement.style.zIndex = "9999"), !0;
|
|
1385
1385
|
}).on("start", ({ event: o }) => {
|
|
1386
1386
|
!o.ctrlKey && !o.metaKey && (e.clearSelection(), n.clearSelection(!0, !0));
|
|
1387
1387
|
}).on(
|
|
1388
1388
|
"move",
|
|
1389
1389
|
({
|
|
1390
1390
|
store: {
|
|
1391
|
-
changed: { added: o, removed:
|
|
1391
|
+
changed: { added: o, removed: s }
|
|
1392
1392
|
}
|
|
1393
1393
|
}) => {
|
|
1394
1394
|
k.moved = !0;
|
|
1395
|
-
for (const
|
|
1396
|
-
|
|
1397
|
-
for (const
|
|
1398
|
-
|
|
1395
|
+
for (const i of o)
|
|
1396
|
+
i.classList.add("selected");
|
|
1397
|
+
for (const i of s)
|
|
1398
|
+
i.classList.remove("selected");
|
|
1399
1399
|
}
|
|
1400
1400
|
).on("stop", ({ store: { stored: o } }) => {
|
|
1401
1401
|
e.selectNodes(o);
|
|
@@ -1406,9 +1406,9 @@ const Rt = function(e, t = !0) {
|
|
|
1406
1406
|
this.theme = e;
|
|
1407
1407
|
const n = this.theme.cssVar, o = Object.keys(n);
|
|
1408
1408
|
this.container.style.cssText = "";
|
|
1409
|
-
for (let
|
|
1410
|
-
const
|
|
1411
|
-
this.container.style.setProperty(
|
|
1409
|
+
for (let s = 0; s < o.length; s++) {
|
|
1410
|
+
const i = o[s];
|
|
1411
|
+
this.container.style.setProperty(i, n[i]);
|
|
1412
1412
|
}
|
|
1413
1413
|
e.cssVar["--gap"] || this.container.style.setProperty("--gap", "30px"), t && this.refresh();
|
|
1414
1414
|
}, W = (e) => {
|
|
@@ -1435,8 +1435,8 @@ function be(e) {
|
|
|
1435
1435
|
return t === void 0 ? 0 : (t.splice(n, 1), t.length);
|
|
1436
1436
|
}
|
|
1437
1437
|
function qt(e, t, n) {
|
|
1438
|
-
const { siblings: o, index:
|
|
1439
|
-
o !== void 0 && (t === "before" ? o.splice(
|
|
1438
|
+
const { siblings: o, index: s } = W(n);
|
|
1439
|
+
o !== void 0 && (t === "before" ? o.splice(s, 0, e) : o.splice(s + 1, 0, e));
|
|
1440
1440
|
}
|
|
1441
1441
|
function Vt(e, t) {
|
|
1442
1442
|
const { siblings: n, index: o } = W(e);
|
|
@@ -1447,10 +1447,10 @@ function Ke(e, t, n) {
|
|
|
1447
1447
|
n.children ? n.children.push(t) : n.children = [t];
|
|
1448
1448
|
else {
|
|
1449
1449
|
t.direction !== void 0 && (t.direction = n.direction);
|
|
1450
|
-
const { siblings: o, index:
|
|
1450
|
+
const { siblings: o, index: s } = W(n);
|
|
1451
1451
|
if (o === void 0)
|
|
1452
1452
|
return;
|
|
1453
|
-
e === "before" ? o.splice(
|
|
1453
|
+
e === "before" ? o.splice(s, 0, t) : o.splice(s + 1, 0, t);
|
|
1454
1454
|
}
|
|
1455
1455
|
}
|
|
1456
1456
|
const It = function(e, t) {
|
|
@@ -1460,22 +1460,22 @@ const It = function(e, t) {
|
|
|
1460
1460
|
if (e === P)
|
|
1461
1461
|
return P;
|
|
1462
1462
|
if (e === ae) {
|
|
1463
|
-
const
|
|
1464
|
-
return
|
|
1463
|
+
const s = ((n = document.querySelector(".lhs")) == null ? void 0 : n.childElementCount) || 0, i = ((o = document.querySelector(".rhs")) == null ? void 0 : o.childElementCount) || 0;
|
|
1464
|
+
return s <= i ? (t.direction = $, $) : (t.direction = P, P);
|
|
1465
1465
|
}
|
|
1466
1466
|
}, We = function(e, t, n) {
|
|
1467
|
-
var
|
|
1468
|
-
const o = n.children[0].children[0],
|
|
1469
|
-
if (
|
|
1470
|
-
if (Q(o),
|
|
1471
|
-
|
|
1467
|
+
var i, r;
|
|
1468
|
+
const o = n.children[0].children[0], s = t.parentElement;
|
|
1469
|
+
if (s.tagName === "ME-PARENT") {
|
|
1470
|
+
if (Q(o), s.children[1])
|
|
1471
|
+
s.nextSibling.appendChild(n);
|
|
1472
1472
|
else {
|
|
1473
1473
|
const c = e.createChildren([n]);
|
|
1474
|
-
|
|
1474
|
+
s.appendChild(ve(!0)), s.insertAdjacentElement("afterend", c);
|
|
1475
1475
|
}
|
|
1476
1476
|
e.linkDiv(n.offsetParent);
|
|
1477
1477
|
} else
|
|
1478
|
-
|
|
1478
|
+
s.tagName === "ME-ROOT" && (It(e.direction, o.nodeObj) === $ ? (i = e.container.querySelector(".lhs")) == null || i.appendChild(n) : (r = e.container.querySelector(".rhs")) == null || r.appendChild(n), e.linkDiv());
|
|
1479
1479
|
}, Ue = function(e, t) {
|
|
1480
1480
|
const n = e.parentNode;
|
|
1481
1481
|
if (t === 0) {
|
|
@@ -1492,47 +1492,47 @@ const It = function(e, t) {
|
|
|
1492
1492
|
}, Kt = function(e, t) {
|
|
1493
1493
|
const n = e.nodeObj, o = me(n);
|
|
1494
1494
|
o.style && t.style && (t.style = Object.assign(o.style, t.style));
|
|
1495
|
-
const
|
|
1496
|
-
ge(e,
|
|
1495
|
+
const s = Object.assign(n, t);
|
|
1496
|
+
ge(e, s), this.linkDiv(), this.bus.fire("operation", {
|
|
1497
1497
|
name: "reshapeNode",
|
|
1498
|
-
obj:
|
|
1498
|
+
obj: s,
|
|
1499
1499
|
origin: o
|
|
1500
1500
|
});
|
|
1501
1501
|
}, ye = function(e, t, n) {
|
|
1502
1502
|
if (!t)
|
|
1503
1503
|
return null;
|
|
1504
1504
|
const o = t.nodeObj;
|
|
1505
|
-
o.expanded === !1 && (e.expandNode(t, !0), t =
|
|
1506
|
-
const
|
|
1507
|
-
o.children ? o.children.push(
|
|
1508
|
-
const { grp:
|
|
1509
|
-
return We(e, t,
|
|
1505
|
+
o.expanded === !1 && (e.expandNode(t, !0), t = S(o.id));
|
|
1506
|
+
const s = n || e.generateNewObj();
|
|
1507
|
+
o.children ? o.children.push(s) : o.children = [s], B(e.nodeData);
|
|
1508
|
+
const { grp: i, top: r } = e.createWrapper(s);
|
|
1509
|
+
return We(e, t, i), { newTop: r, newNodeObj: s };
|
|
1510
1510
|
}, Wt = function(e, t, n) {
|
|
1511
|
-
var
|
|
1511
|
+
var d, a, u, h;
|
|
1512
1512
|
const o = t || this.currentNode;
|
|
1513
1513
|
if (!o)
|
|
1514
1514
|
return;
|
|
1515
|
-
const
|
|
1516
|
-
if (
|
|
1517
|
-
if (!((
|
|
1518
|
-
this.addChild(
|
|
1515
|
+
const s = o.nodeObj;
|
|
1516
|
+
if (s.parent) {
|
|
1517
|
+
if (!((d = s.parent) != null && d.parent) && ((u = (a = s.parent) == null ? void 0 : a.children) == null ? void 0 : u.length) === 1) {
|
|
1518
|
+
this.addChild(S(s.parent.id), n);
|
|
1519
1519
|
return;
|
|
1520
1520
|
}
|
|
1521
1521
|
} else {
|
|
1522
1522
|
this.addChild();
|
|
1523
1523
|
return;
|
|
1524
1524
|
}
|
|
1525
|
-
const
|
|
1526
|
-
if (!((h =
|
|
1525
|
+
const i = n || this.generateNewObj();
|
|
1526
|
+
if (!((h = s.parent) != null && h.parent)) {
|
|
1527
1527
|
const p = o.closest("me-main").className === L.LHS ? $ : P;
|
|
1528
|
-
|
|
1528
|
+
i.direction = p;
|
|
1529
1529
|
}
|
|
1530
|
-
qt(
|
|
1531
|
-
const r = o.parentElement, { grp: c, top: l } = this.createWrapper(
|
|
1530
|
+
qt(i, e, s), B(this.nodeData);
|
|
1531
|
+
const r = o.parentElement, { grp: c, top: l } = this.createWrapper(i);
|
|
1532
1532
|
r.parentElement.insertAdjacentElement(Ye[e], c), this.linkDiv(c.offsetParent), n || this.editTopic(l.firstChild), this.selectNode(l.firstChild, !0), this.bus.fire("operation", {
|
|
1533
1533
|
name: "insertSibling",
|
|
1534
1534
|
type: e,
|
|
1535
|
-
obj:
|
|
1535
|
+
obj: i
|
|
1536
1536
|
});
|
|
1537
1537
|
}, Ut = function(e, t) {
|
|
1538
1538
|
const n = e || this.currentNode;
|
|
@@ -1542,14 +1542,14 @@ const It = function(e, t) {
|
|
|
1542
1542
|
const o = n.nodeObj;
|
|
1543
1543
|
if (!o.parent)
|
|
1544
1544
|
return;
|
|
1545
|
-
const
|
|
1546
|
-
Vt(o,
|
|
1547
|
-
const
|
|
1548
|
-
c.appendChild(ve(!0)),
|
|
1549
|
-
const l = this.createChildren([
|
|
1545
|
+
const s = t || this.generateNewObj();
|
|
1546
|
+
Vt(o, s), B(this.nodeData);
|
|
1547
|
+
const i = n.parentElement.parentElement, { grp: r, top: c } = this.createWrapper(s, !0);
|
|
1548
|
+
c.appendChild(ve(!0)), i.insertAdjacentElement("afterend", r);
|
|
1549
|
+
const l = this.createChildren([i]);
|
|
1550
1550
|
c.insertAdjacentElement("afterend", l), this.linkDiv(), t || this.editTopic(c.firstChild), this.selectNode(c.firstChild, !0), this.bus.fire("operation", {
|
|
1551
1551
|
name: "insertParent",
|
|
1552
|
-
obj:
|
|
1552
|
+
obj: s
|
|
1553
1553
|
});
|
|
1554
1554
|
}, Yt = function(e, t) {
|
|
1555
1555
|
const n = e || this.currentNode;
|
|
@@ -1558,35 +1558,35 @@ const It = function(e, t) {
|
|
|
1558
1558
|
const o = ye(this, n, t);
|
|
1559
1559
|
if (!o)
|
|
1560
1560
|
return;
|
|
1561
|
-
const { newTop:
|
|
1561
|
+
const { newTop: s, newNodeObj: i } = o;
|
|
1562
1562
|
this.bus.fire("operation", {
|
|
1563
1563
|
name: "addChild",
|
|
1564
|
-
obj:
|
|
1565
|
-
}), t || this.editTopic(
|
|
1564
|
+
obj: i
|
|
1565
|
+
}), t || this.editTopic(s.firstChild), this.selectNode(s.firstChild, !0);
|
|
1566
1566
|
}, Xt = function(e, t) {
|
|
1567
1567
|
const n = me(e.nodeObj);
|
|
1568
1568
|
pe(n);
|
|
1569
1569
|
const o = ye(this, t, n);
|
|
1570
1570
|
if (!o)
|
|
1571
1571
|
return;
|
|
1572
|
-
const { newNodeObj:
|
|
1573
|
-
this.selectNode(
|
|
1572
|
+
const { newNodeObj: s } = o;
|
|
1573
|
+
this.selectNode(S(s.id)), this.bus.fire("operation", {
|
|
1574
1574
|
name: "copyNode",
|
|
1575
|
-
obj:
|
|
1575
|
+
obj: s
|
|
1576
1576
|
});
|
|
1577
1577
|
}, Gt = function(e, t) {
|
|
1578
1578
|
e = de(e);
|
|
1579
1579
|
const n = [];
|
|
1580
1580
|
for (let o = 0; o < e.length; o++) {
|
|
1581
|
-
const
|
|
1582
|
-
pe(
|
|
1583
|
-
const r = ye(this, t,
|
|
1581
|
+
const s = e[o], i = me(s.nodeObj);
|
|
1582
|
+
pe(i);
|
|
1583
|
+
const r = ye(this, t, i);
|
|
1584
1584
|
if (!r)
|
|
1585
1585
|
return;
|
|
1586
1586
|
const { newNodeObj: c } = r;
|
|
1587
1587
|
n.push(c);
|
|
1588
1588
|
}
|
|
1589
|
-
this.selectNodes(n.map((o) =>
|
|
1589
|
+
this.selectNodes(n.map((o) => S(o.id))), this.bus.fire("operation", {
|
|
1590
1590
|
name: "copyNodes",
|
|
1591
1591
|
objs: n
|
|
1592
1592
|
});
|
|
@@ -1620,16 +1620,16 @@ const It = function(e, t) {
|
|
|
1620
1620
|
const n = t.nodeObj;
|
|
1621
1621
|
if (!n.parent)
|
|
1622
1622
|
throw new Error("Can not remove root node");
|
|
1623
|
-
const o = n.parent.children,
|
|
1624
|
-
if (Ue(t,
|
|
1625
|
-
const c = o[
|
|
1626
|
-
this.selectNode(
|
|
1623
|
+
const o = n.parent.children, s = o.findIndex((c) => c === n), i = be(n);
|
|
1624
|
+
if (Ue(t, i), o.length !== 0) {
|
|
1625
|
+
const c = o[s] || o[s - 1];
|
|
1626
|
+
this.selectNode(S(c.id));
|
|
1627
1627
|
} else
|
|
1628
|
-
this.selectNode(
|
|
1628
|
+
this.selectNode(S(n.parent.id));
|
|
1629
1629
|
this.linkDiv(), this.bus.fire("operation", {
|
|
1630
1630
|
name: "removeNode",
|
|
1631
1631
|
obj: n,
|
|
1632
|
-
originIndex:
|
|
1632
|
+
originIndex: s,
|
|
1633
1633
|
originParentId: (r = n == null ? void 0 : n.parent) == null ? void 0 : r.id
|
|
1634
1634
|
});
|
|
1635
1635
|
}, en = function(e) {
|
|
@@ -1648,12 +1648,12 @@ const It = function(e, t) {
|
|
|
1648
1648
|
}, tn = function(e, t) {
|
|
1649
1649
|
e = de(e);
|
|
1650
1650
|
const n = t.nodeObj;
|
|
1651
|
-
n.expanded === !1 && (this.expandNode(t, !0), t =
|
|
1651
|
+
n.expanded === !1 && (this.expandNode(t, !0), t = S(n.id));
|
|
1652
1652
|
for (const o of e) {
|
|
1653
|
-
const
|
|
1654
|
-
Ke("in",
|
|
1655
|
-
const
|
|
1656
|
-
We(this, t,
|
|
1653
|
+
const s = o.nodeObj;
|
|
1654
|
+
Ke("in", s, n), B(this.nodeData);
|
|
1655
|
+
const i = o.parentElement;
|
|
1656
|
+
We(this, t, i.parentElement);
|
|
1657
1657
|
}
|
|
1658
1658
|
this.linkDiv(), this.bus.fire("operation", {
|
|
1659
1659
|
name: "moveNodeIn",
|
|
@@ -1662,17 +1662,17 @@ const It = function(e, t) {
|
|
|
1662
1662
|
});
|
|
1663
1663
|
}, Xe = (e, t, n, o) => {
|
|
1664
1664
|
e = de(e), t === "after" && (e = e.reverse());
|
|
1665
|
-
const
|
|
1666
|
-
for (const
|
|
1667
|
-
const r =
|
|
1668
|
-
Ke(t, r,
|
|
1669
|
-
const c =
|
|
1665
|
+
const s = n.nodeObj;
|
|
1666
|
+
for (const i of e) {
|
|
1667
|
+
const r = i.nodeObj;
|
|
1668
|
+
Ke(t, r, s), B(o.nodeData), Q(i);
|
|
1669
|
+
const c = i.parentElement.parentNode;
|
|
1670
1670
|
n.parentElement.parentNode.insertAdjacentElement(Ye[t], c);
|
|
1671
1671
|
}
|
|
1672
1672
|
o.linkDiv(), o.bus.fire("operation", {
|
|
1673
1673
|
name: t === "before" ? "moveNodeBefore" : "moveNodeAfter",
|
|
1674
|
-
objs: e.map((
|
|
1675
|
-
toObj:
|
|
1674
|
+
objs: e.map((i) => i.nodeObj),
|
|
1675
|
+
toObj: s
|
|
1676
1676
|
});
|
|
1677
1677
|
}, nn = function(e, t) {
|
|
1678
1678
|
Xe(e, "before", t, this);
|
|
@@ -1714,7 +1714,7 @@ function Je(e) {
|
|
|
1714
1714
|
const cn = function(e, t, n) {
|
|
1715
1715
|
if (e) {
|
|
1716
1716
|
if (this.clearSelection(), typeof e == "string") {
|
|
1717
|
-
const o =
|
|
1717
|
+
const o = S(e);
|
|
1718
1718
|
return o ? this.selectNode(o) : void 0;
|
|
1719
1719
|
}
|
|
1720
1720
|
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);
|
|
@@ -1749,12 +1749,12 @@ const cn = function(e, t, n) {
|
|
|
1749
1749
|
let t = "# " + e.topic + `
|
|
1750
1750
|
|
|
1751
1751
|
`;
|
|
1752
|
-
function n(o,
|
|
1753
|
-
for (let
|
|
1754
|
-
|
|
1752
|
+
function n(o, s) {
|
|
1753
|
+
for (let i = 0; i < o.length; i++)
|
|
1754
|
+
s <= 6 ? t += "".padStart(s, "#") + " " + o[i].topic + `
|
|
1755
1755
|
|
|
1756
|
-
` : t += "".padStart(
|
|
1757
|
-
`, o[
|
|
1756
|
+
` : t += "".padStart(s - 7, " ") + "- " + o[i].topic + `
|
|
1757
|
+
`, o[i].children && n(o[i].children || [], s + 1);
|
|
1758
1758
|
}
|
|
1759
1759
|
return n(e.children || [], 2), t;
|
|
1760
1760
|
}, mn = function() {
|
|
@@ -1782,17 +1782,17 @@ const cn = function(e, t, n) {
|
|
|
1782
1782
|
}, _n = function(e, t) {
|
|
1783
1783
|
const n = e.nodeObj;
|
|
1784
1784
|
typeof t == "boolean" ? n.expanded = t : n.expanded !== !1 ? n.expanded = !1 : n.expanded = !0;
|
|
1785
|
-
const o = e.parentNode,
|
|
1786
|
-
if (
|
|
1785
|
+
const o = e.parentNode, s = o.children[1];
|
|
1786
|
+
if (s.expanded = n.expanded, s.className = n.expanded ? "minus" : "", Q(e), n.expanded) {
|
|
1787
1787
|
const l = this.createChildren(
|
|
1788
|
-
n.children.map((
|
|
1788
|
+
n.children.map((d) => this.createWrapper(d).grp)
|
|
1789
1789
|
);
|
|
1790
1790
|
o.parentNode.appendChild(l);
|
|
1791
1791
|
} else
|
|
1792
1792
|
o.parentNode.children[1].remove();
|
|
1793
1793
|
this.linkDiv(e.closest("me-main > me-wrapper"));
|
|
1794
|
-
const
|
|
1795
|
-
(
|
|
1794
|
+
const i = e.getBoundingClientRect(), r = this.container.getBoundingClientRect();
|
|
1795
|
+
(i.bottom > r.bottom || i.top < r.top || i.right > r.right || i.left < r.left) && e.scrollIntoView({ block: "center", inline: "center" }), this.bus.fire("expandNode", n);
|
|
1796
1796
|
}, Ln = function(e) {
|
|
1797
1797
|
e && (e = JSON.parse(JSON.stringify(e)), this.nodeData = e.nodeData, this.arrows = e.arrows || [], this.summaries = e.summaries || []), B(this.nodeData), this.layout(), this.linkDiv();
|
|
1798
1798
|
}, Mn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
@@ -1848,14 +1848,14 @@ const cn = function(e, t, n) {
|
|
|
1848
1848
|
create: kn
|
|
1849
1849
|
};
|
|
1850
1850
|
function le(e, t, n) {
|
|
1851
|
-
const { offsetLeft: o, offsetTop:
|
|
1851
|
+
const { offsetLeft: o, offsetTop: s } = R(e.nodes, t), i = t.offsetWidth, r = t.offsetHeight, c = o + i / 2, l = s + r / 2, d = c + n.x, a = l + n.y;
|
|
1852
1852
|
return {
|
|
1853
|
-
w:
|
|
1853
|
+
w: i,
|
|
1854
1854
|
h: r,
|
|
1855
1855
|
cx: c,
|
|
1856
1856
|
cy: l,
|
|
1857
|
-
ctrlX:
|
|
1858
|
-
ctrlY:
|
|
1857
|
+
ctrlX: d,
|
|
1858
|
+
ctrlY: a
|
|
1859
1859
|
};
|
|
1860
1860
|
}
|
|
1861
1861
|
function K(e) {
|
|
@@ -1867,25 +1867,25 @@ function K(e) {
|
|
|
1867
1867
|
};
|
|
1868
1868
|
}
|
|
1869
1869
|
const Tn = function(e, t, n, o) {
|
|
1870
|
-
const
|
|
1871
|
-
return
|
|
1870
|
+
const s = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
1871
|
+
return C(s, {
|
|
1872
1872
|
"text-anchor": "middle",
|
|
1873
1873
|
x: t + "",
|
|
1874
1874
|
y: n + "",
|
|
1875
1875
|
fill: o || "#666"
|
|
1876
|
-
}),
|
|
1877
|
-
}, Ze = function(e, t, n, o,
|
|
1876
|
+
}), s.dataset.type = "custom-link", s.innerHTML = e, s;
|
|
1877
|
+
}, Ze = function(e, t, n, o, s) {
|
|
1878
1878
|
if (!t || !n)
|
|
1879
1879
|
return;
|
|
1880
1880
|
performance.now();
|
|
1881
|
-
const
|
|
1881
|
+
const i = le(e, t, o.delta1), r = le(e, n, o.delta2), { x: c, y: l } = K(i), { ctrlX: d, ctrlY: a } = i, { ctrlX: u, ctrlY: h } = r, { x: p, y: g } = K(r), v = re(u, h, p, g), m = `M ${v.x1} ${v.y1} L ${p} ${g} L ${v.x2} ${v.y2}`;
|
|
1882
1882
|
let f = "";
|
|
1883
1883
|
if (o.bidirectional) {
|
|
1884
|
-
const w = re(
|
|
1884
|
+
const w = re(d, a, c, l);
|
|
1885
1885
|
f = `M ${w.x1} ${w.y1} L ${c} ${l} L ${w.x2} ${w.y2}`;
|
|
1886
1886
|
}
|
|
1887
|
-
const b = pt(`M ${c} ${l} C ${
|
|
1888
|
-
b.appendChild(y), b.arrowObj = o, b.dataset.linkid = o.id, e.linkSvgGroup.appendChild(b),
|
|
1887
|
+
const b = pt(`M ${c} ${l} C ${d} ${a} ${u} ${h} ${p} ${g}`, m, f), x = c / 8 + d * 3 / 8 + u * 3 / 8 + p / 8, E = l / 8 + a * 3 / 8 + h * 3 / 8 + g / 8, y = Tn(o.label, x, E, e.theme.cssVar["--color"]);
|
|
1888
|
+
b.appendChild(y), b.arrowObj = o, b.dataset.linkid = o.id, e.linkSvgGroup.appendChild(b), s || (e.arrows.push(o), e.currentArrow = b, Qe(e, o, i, r)), performance.now();
|
|
1889
1889
|
}, An = function(e, t, n = {}) {
|
|
1890
1890
|
const o = {
|
|
1891
1891
|
id: Z(),
|
|
@@ -1920,8 +1920,8 @@ const Tn = function(e, t, n, o) {
|
|
|
1920
1920
|
});
|
|
1921
1921
|
}, jn = function(e) {
|
|
1922
1922
|
this.currentArrow = e;
|
|
1923
|
-
const t = e.arrowObj, n =
|
|
1924
|
-
Qe(this, t,
|
|
1923
|
+
const t = e.arrowObj, n = S(t.from), o = S(t.to), s = le(this, n, t.delta1), i = le(this, o, t.delta2);
|
|
1924
|
+
Qe(this, t, s, i);
|
|
1925
1925
|
}, Dn = function() {
|
|
1926
1926
|
this.currentArrow = null, xe(this);
|
|
1927
1927
|
}, xe = function(e) {
|
|
@@ -1929,53 +1929,53 @@ const Tn = function(e, t, n, o) {
|
|
|
1929
1929
|
(t = e.helper1) == null || t.destory(e.map), (n = e.helper2) == null || n.destory(e.map), e.linkController.style.display = "none", e.P2.style.display = "none", e.P3.style.display = "none";
|
|
1930
1930
|
}, Qe = function(e, t, n, o) {
|
|
1931
1931
|
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);
|
|
1932
|
-
let { x:
|
|
1933
|
-
e.P2.style.cssText = `top:${c}px;left:${r}px;`, e.P3.style.cssText = `top:${
|
|
1934
|
-
x1:
|
|
1935
|
-
y1:
|
|
1932
|
+
let { x: s, y: i } = K(n), { ctrlX: r, ctrlY: c } = n, { ctrlX: l, ctrlY: d } = o, { x: a, y: u } = K(o);
|
|
1933
|
+
e.P2.style.cssText = `top:${c}px;left:${r}px;`, e.P3.style.cssText = `top:${d}px;left:${l}px;`, C(e.line1, {
|
|
1934
|
+
x1: s + "",
|
|
1935
|
+
y1: i + "",
|
|
1936
1936
|
x2: r + "",
|
|
1937
1937
|
y2: c + ""
|
|
1938
|
-
}),
|
|
1938
|
+
}), C(e.line2, {
|
|
1939
1939
|
x1: l + "",
|
|
1940
|
-
y1:
|
|
1941
|
-
x2:
|
|
1940
|
+
y1: d + "",
|
|
1941
|
+
x2: a + "",
|
|
1942
1942
|
y2: u + ""
|
|
1943
1943
|
}), e.helper1 = je.create(e.P2), e.helper2 = je.create(e.P3), e.helper1.init(e.map, (h, p) => {
|
|
1944
1944
|
if (!e.currentArrow)
|
|
1945
1945
|
return;
|
|
1946
1946
|
r = r + h / e.scaleVal, c = c + p / e.scaleVal;
|
|
1947
|
-
const
|
|
1948
|
-
|
|
1949
|
-
const v =
|
|
1950
|
-
if (e.P2.style.top = c + "px", e.P2.style.left = r + "px", e.currentArrow.children[0].setAttribute("d", `M ${
|
|
1951
|
-
const f = re(r, c,
|
|
1952
|
-
e.currentArrow.children[2].setAttribute("d", `M ${f.x1} ${f.y1} L ${
|
|
1947
|
+
const g = K({ ...n, ctrlX: r, ctrlY: c });
|
|
1948
|
+
s = g.x, i = g.y;
|
|
1949
|
+
const v = s / 8 + r * 3 / 8 + l * 3 / 8 + a / 8, m = i / 8 + c * 3 / 8 + d * 3 / 8 + u / 8;
|
|
1950
|
+
if (e.P2.style.top = c + "px", e.P2.style.left = r + "px", e.currentArrow.children[0].setAttribute("d", `M ${s} ${i} C ${r} ${c} ${l} ${d} ${a} ${u}`), t.bidirectional) {
|
|
1951
|
+
const f = re(r, c, s, i);
|
|
1952
|
+
e.currentArrow.children[2].setAttribute("d", `M ${f.x1} ${f.y1} L ${s} ${i} L ${f.x2} ${f.y2}`);
|
|
1953
1953
|
}
|
|
1954
|
-
|
|
1954
|
+
C(e.currentArrow.children[3], {
|
|
1955
1955
|
x: v + "",
|
|
1956
|
-
y:
|
|
1957
|
-
}),
|
|
1958
|
-
x1:
|
|
1959
|
-
y1:
|
|
1956
|
+
y: m + ""
|
|
1957
|
+
}), C(e.line1, {
|
|
1958
|
+
x1: s + "",
|
|
1959
|
+
y1: i + "",
|
|
1960
1960
|
x2: r + "",
|
|
1961
1961
|
y2: c + ""
|
|
1962
1962
|
}), t.delta1.x = r - n.cx, t.delta1.y = c - n.cy, e.bus.fire("updateArrowDelta", t);
|
|
1963
1963
|
}), e.helper2.init(e.map, (h, p) => {
|
|
1964
1964
|
if (!e.currentArrow)
|
|
1965
1965
|
return;
|
|
1966
|
-
l = l + h / e.scaleVal,
|
|
1967
|
-
const
|
|
1968
|
-
|
|
1969
|
-
const v =
|
|
1970
|
-
e.P3.style.top =
|
|
1966
|
+
l = l + h / e.scaleVal, d = d + p / e.scaleVal;
|
|
1967
|
+
const g = K({ ...o, ctrlX: l, ctrlY: d });
|
|
1968
|
+
a = g.x, u = g.y;
|
|
1969
|
+
const v = s / 8 + r * 3 / 8 + l * 3 / 8 + a / 8, m = i / 8 + c * 3 / 8 + d * 3 / 8 + u / 8, f = re(l, d, a, u);
|
|
1970
|
+
e.P3.style.top = d + "px", e.P3.style.left = l + "px", e.currentArrow.children[0].setAttribute("d", `M ${s} ${i} C ${r} ${c} ${l} ${d} ${a} ${u}`), e.currentArrow.children[1].setAttribute("d", `M ${f.x1} ${f.y1} L ${a} ${u} L ${f.x2} ${f.y2}`), C(e.currentArrow.children[3], {
|
|
1971
1971
|
x: v + "",
|
|
1972
|
-
y:
|
|
1973
|
-
}),
|
|
1972
|
+
y: m + ""
|
|
1973
|
+
}), C(e.line2, {
|
|
1974
1974
|
x1: l + "",
|
|
1975
|
-
y1:
|
|
1976
|
-
x2:
|
|
1975
|
+
y1: d + "",
|
|
1976
|
+
x2: a + "",
|
|
1977
1977
|
y2: u + ""
|
|
1978
|
-
}), t.delta2.x = l - o.cx, t.delta2.y =
|
|
1978
|
+
}), t.delta2.x = l - o.cx, t.delta2.y = d - o.cy, e.bus.fire("updateArrowDelta", t);
|
|
1979
1979
|
});
|
|
1980
1980
|
};
|
|
1981
1981
|
function On() {
|
|
@@ -1983,7 +1983,7 @@ function On() {
|
|
|
1983
1983
|
for (let e = 0; e < this.arrows.length; e++) {
|
|
1984
1984
|
const t = this.arrows[e];
|
|
1985
1985
|
try {
|
|
1986
|
-
Ze(this,
|
|
1986
|
+
Ze(this, S(t.from), S(t.to), t, !0);
|
|
1987
1987
|
} catch {
|
|
1988
1988
|
}
|
|
1989
1989
|
}
|
|
@@ -1994,16 +1994,16 @@ function Hn(e) {
|
|
|
1994
1994
|
return;
|
|
1995
1995
|
const t = e.children[3];
|
|
1996
1996
|
Fe(this, t, (n) => {
|
|
1997
|
-
var
|
|
1998
|
-
const o = e.arrowObj,
|
|
1999
|
-
|
|
1997
|
+
var i;
|
|
1998
|
+
const o = e.arrowObj, s = ((i = n.textContent) == null ? void 0 : i.trim()) || "";
|
|
1999
|
+
s === "" ? o.label = origin : o.label = s, n.remove(), s !== origin && (t.innerHTML = o.label, this.linkDiv(), this.bus.fire("operation", {
|
|
2000
2000
|
name: "finishEditArrowLabel",
|
|
2001
2001
|
obj: o
|
|
2002
2002
|
}));
|
|
2003
2003
|
});
|
|
2004
2004
|
}
|
|
2005
2005
|
function Pn() {
|
|
2006
|
-
this.arrows = this.arrows.filter((e) =>
|
|
2006
|
+
this.arrows = this.arrows.filter((e) => ie(e.from, this.nodeData) && ie(e.to, this.nodeData));
|
|
2007
2007
|
}
|
|
2008
2008
|
const Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2009
2009
|
__proto__: null,
|
|
@@ -2015,14 +2015,14 @@ const Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2015
2015
|
tidyArrow: Pn,
|
|
2016
2016
|
unselectArrow: Dn
|
|
2017
2017
|
}, Symbol.toStringTag, { value: "Module" })), Rn = function(e) {
|
|
2018
|
-
var l,
|
|
2018
|
+
var l, d;
|
|
2019
2019
|
if (e.length === 0)
|
|
2020
2020
|
throw new Error("No selected node.");
|
|
2021
2021
|
if (e.length === 1) {
|
|
2022
|
-
const
|
|
2022
|
+
const a = e[0].nodeObj, u = e[0].nodeObj.parent;
|
|
2023
2023
|
if (!u)
|
|
2024
2024
|
throw new Error("Can not select root node.");
|
|
2025
|
-
const h = u.children.findIndex((p) =>
|
|
2025
|
+
const h = u.children.findIndex((p) => a === p);
|
|
2026
2026
|
return {
|
|
2027
2027
|
parent: u.id,
|
|
2028
2028
|
start: h,
|
|
@@ -2030,11 +2030,11 @@ const Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2030
2030
|
};
|
|
2031
2031
|
}
|
|
2032
2032
|
let t = 0;
|
|
2033
|
-
const n = e.map((
|
|
2034
|
-
let u =
|
|
2033
|
+
const n = e.map((a) => {
|
|
2034
|
+
let u = a.nodeObj;
|
|
2035
2035
|
const h = [];
|
|
2036
2036
|
for (; u.parent; ) {
|
|
2037
|
-
const p = u.parent,
|
|
2037
|
+
const p = u.parent, g = p.children, v = g == null ? void 0 : g.indexOf(u);
|
|
2038
2038
|
u = p, h.unshift({ node: u, index: v });
|
|
2039
2039
|
}
|
|
2040
2040
|
return h.length > t && (t = h.length), h;
|
|
@@ -2042,19 +2042,19 @@ const Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2042
2042
|
let o = 0;
|
|
2043
2043
|
e:
|
|
2044
2044
|
for (; o < t; o++) {
|
|
2045
|
-
const
|
|
2045
|
+
const a = (l = n[0][o]) == null ? void 0 : l.node;
|
|
2046
2046
|
for (let u = 1; u < n.length; u++)
|
|
2047
|
-
if (((
|
|
2047
|
+
if (((d = n[u][o]) == null ? void 0 : d.node) !== a)
|
|
2048
2048
|
break e;
|
|
2049
2049
|
}
|
|
2050
2050
|
if (!o)
|
|
2051
2051
|
throw new Error("Can not select root node.");
|
|
2052
|
-
const
|
|
2052
|
+
const s = n.map((a) => a[o - 1].index).sort(), i = s[0] || 0, r = s[s.length - 1] || 0, c = n[0][o - 1].node;
|
|
2053
2053
|
if (!c.parent)
|
|
2054
2054
|
throw new Error("Please select nodes in the same main topic.");
|
|
2055
2055
|
return {
|
|
2056
2056
|
parent: c.id,
|
|
2057
|
-
start:
|
|
2057
|
+
start: i,
|
|
2058
2058
|
end: r
|
|
2059
2059
|
};
|
|
2060
2060
|
}, zn = function(e) {
|
|
@@ -2062,48 +2062,48 @@ const Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2062
2062
|
return t.setAttribute("id", e), t;
|
|
2063
2063
|
}, De = function(e, t) {
|
|
2064
2064
|
const n = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
2065
|
-
return
|
|
2065
|
+
return C(n, {
|
|
2066
2066
|
d: e,
|
|
2067
2067
|
stroke: t || "#666",
|
|
2068
2068
|
fill: "none",
|
|
2069
2069
|
"stroke-linecap": "round",
|
|
2070
2070
|
"stroke-width": "2"
|
|
2071
2071
|
}), n;
|
|
2072
|
-
}, Oe = function(e, t, n, o,
|
|
2073
|
-
const
|
|
2074
|
-
return
|
|
2072
|
+
}, Oe = function(e, t, n, o, s) {
|
|
2073
|
+
const i = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
2074
|
+
return C(i, {
|
|
2075
2075
|
"text-anchor": o,
|
|
2076
2076
|
x: t + "",
|
|
2077
2077
|
y: n + "",
|
|
2078
|
-
fill:
|
|
2079
|
-
}),
|
|
2080
|
-
}, Fn = (e) =>
|
|
2081
|
-
const n =
|
|
2082
|
-
let
|
|
2083
|
-
return o.parent ?
|
|
2078
|
+
fill: s || "#666"
|
|
2079
|
+
}), i.innerHTML = e, i;
|
|
2080
|
+
}, Fn = (e) => S(e).parentElement.parentElement, qn = function({ parent: e, start: t }) {
|
|
2081
|
+
const n = S(e), o = n.nodeObj;
|
|
2082
|
+
let s;
|
|
2083
|
+
return o.parent ? s = n.closest("me-main").className : s = S(o.children[t].id).closest("me-main").className, s;
|
|
2084
2084
|
}, et = function(e, t) {
|
|
2085
2085
|
var w;
|
|
2086
|
-
const { id: n, text: o, parent:
|
|
2087
|
-
let u = 1 / 0, h = 0, p = 0,
|
|
2088
|
-
for (let _ =
|
|
2089
|
-
const M = (w =
|
|
2086
|
+
const { id: n, text: o, parent: s, start: i, end: r } = t, c = e.nodes, d = S(s).nodeObj, a = qn(t);
|
|
2087
|
+
let u = 1 / 0, h = 0, p = 0, g = 0;
|
|
2088
|
+
for (let _ = i; _ <= r; _++) {
|
|
2089
|
+
const M = (w = d.children) == null ? void 0 : w[_];
|
|
2090
2090
|
if (!M)
|
|
2091
2091
|
return e.removeSummary(n), null;
|
|
2092
|
-
const j = Fn(M.id), { offsetLeft: z, offsetTop: U } = R(c, j), we =
|
|
2093
|
-
_ ===
|
|
2092
|
+
const j = Fn(M.id), { offsetLeft: z, offsetTop: U } = R(c, j), we = i === r ? 10 : 20;
|
|
2093
|
+
_ === i && (p = U + we), _ === r && (g = U + j.offsetHeight - we), z < u && (u = z), j.offsetWidth + z > h && (h = j.offsetWidth + z);
|
|
2094
2094
|
}
|
|
2095
|
-
let v,
|
|
2096
|
-
const f = p + 10, b =
|
|
2097
|
-
|
|
2095
|
+
let v, m;
|
|
2096
|
+
const f = p + 10, b = g + 10, x = (f + b) / 2, E = e.theme.cssVar["--color"];
|
|
2097
|
+
a === L.LHS ? (v = De(`M ${u + 10} ${f} c -5 0 -10 5 -10 10 L ${u} ${b - 10} c 0 5 5 10 10 10 M ${u} ${x} h -10`, E), m = Oe(o, u - 20, x + 6, "end", E)) : (v = De(`M ${h - 10} ${f} c 5 0 10 5 10 10 L ${h} ${b - 10} c 0 5 -5 10 -10 10 M ${h} ${x} h 10`, E), m = Oe(o, h + 20, x + 6, "start", E));
|
|
2098
2098
|
const y = zn("s-" + n);
|
|
2099
|
-
return y.appendChild(v), y.appendChild(
|
|
2099
|
+
return y.appendChild(v), y.appendChild(m), y.summaryObj = t, e.summarySvg.appendChild(y), y;
|
|
2100
2100
|
}, Vn = function() {
|
|
2101
2101
|
let e = [];
|
|
2102
2102
|
this.currentNode ? e = [this.currentNode] : this.currentNodes && (e = this.currentNodes);
|
|
2103
|
-
const { parent: t, start: n, end: o } = Rn(e),
|
|
2104
|
-
this.summaries.push(
|
|
2103
|
+
const { parent: t, start: n, end: o } = Rn(e), s = { id: Z(), parent: t, start: n, end: o, text: "summary" }, i = et(this, s);
|
|
2104
|
+
this.summaries.push(s), this.editSummary(i), this.bus.fire("operation", {
|
|
2105
2105
|
name: "createSummary",
|
|
2106
|
-
obj:
|
|
2106
|
+
obj: s
|
|
2107
2107
|
});
|
|
2108
2108
|
}, In = function(e) {
|
|
2109
2109
|
var n;
|
|
@@ -2113,8 +2113,8 @@ const Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2113
2113
|
obj: { id: e }
|
|
2114
2114
|
});
|
|
2115
2115
|
}, Kn = function(e) {
|
|
2116
|
-
const t = e.children[1].getBBox(), n = 6, o = 3,
|
|
2117
|
-
|
|
2116
|
+
const t = e.children[1].getBBox(), n = 6, o = 3, s = document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
|
2117
|
+
C(s, {
|
|
2118
2118
|
x: t.x - n + "",
|
|
2119
2119
|
y: t.y - n + "",
|
|
2120
2120
|
width: t.width + n * 2 + "",
|
|
@@ -2123,7 +2123,7 @@ const Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2123
2123
|
stroke: this.theme.cssVar["--selected"] || "#4dc4ff",
|
|
2124
2124
|
"stroke-width": "2",
|
|
2125
2125
|
fill: "none"
|
|
2126
|
-
}), e.appendChild(
|
|
2126
|
+
}), e.appendChild(s), this.currentSummary = e;
|
|
2127
2127
|
}, Wn = function() {
|
|
2128
2128
|
var e, t;
|
|
2129
2129
|
(t = (e = this.currentSummary) == null ? void 0 : e.querySelector("rect")) == null || t.remove(), this.currentSummary = null;
|
|
@@ -2139,9 +2139,9 @@ const Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2139
2139
|
return;
|
|
2140
2140
|
const t = e.childNodes[1];
|
|
2141
2141
|
Fe(this, t, (n) => {
|
|
2142
|
-
var
|
|
2143
|
-
const o = e.summaryObj,
|
|
2144
|
-
|
|
2142
|
+
var i;
|
|
2143
|
+
const o = e.summaryObj, s = ((i = n.textContent) == null ? void 0 : i.trim()) || "";
|
|
2144
|
+
s === "" ? o.text = origin : o.text = s, n.remove(), s !== origin && (t.innerHTML = o.text, this.linkDiv(), this.bus.fire("operation", {
|
|
2145
2145
|
name: "finishEditSummary",
|
|
2146
2146
|
obj: o
|
|
2147
2147
|
}));
|
|
@@ -2157,7 +2157,7 @@ const Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2157
2157
|
}, Symbol.toStringTag, { value: "Module" })), A = "http://www.w3.org/2000/svg";
|
|
2158
2158
|
function Gn(e, t) {
|
|
2159
2159
|
const n = document.createElementNS(A, "svg");
|
|
2160
|
-
return
|
|
2160
|
+
return C(n, {
|
|
2161
2161
|
version: "1.1",
|
|
2162
2162
|
xmlns: A,
|
|
2163
2163
|
height: e,
|
|
@@ -2168,12 +2168,12 @@ function Jn(e, t) {
|
|
|
2168
2168
|
return (parseInt(e) - parseInt(t)) / 2;
|
|
2169
2169
|
}
|
|
2170
2170
|
function Zn(e, t, n, o) {
|
|
2171
|
-
const
|
|
2172
|
-
let
|
|
2173
|
-
return e.text ?
|
|
2171
|
+
const s = document.createElementNS(A, "g");
|
|
2172
|
+
let i = "";
|
|
2173
|
+
return e.text ? i = e.text.textContent : i = e.childNodes[0].textContent, i.split(`
|
|
2174
2174
|
`).forEach((c, l) => {
|
|
2175
|
-
const
|
|
2176
|
-
|
|
2175
|
+
const d = document.createElementNS(A, "text");
|
|
2176
|
+
C(d, {
|
|
2177
2177
|
x: n + parseInt(t.paddingLeft) + "",
|
|
2178
2178
|
y: o + parseInt(t.paddingTop) + Jn(t.lineHeight, t.fontSize) * (l + 1) + parseFloat(t.fontSize) * (l + 1) + "",
|
|
2179
2179
|
"text-anchor": "start",
|
|
@@ -2181,31 +2181,31 @@ function Zn(e, t, n, o) {
|
|
|
2181
2181
|
"font-size": `${t.fontSize}`,
|
|
2182
2182
|
"font-weight": `${t.fontWeight}`,
|
|
2183
2183
|
fill: `${t.color}`
|
|
2184
|
-
}),
|
|
2185
|
-
}),
|
|
2184
|
+
}), d.innerHTML = c, s.appendChild(d);
|
|
2185
|
+
}), s;
|
|
2186
2186
|
}
|
|
2187
2187
|
function Qn(e, t, n, o) {
|
|
2188
2188
|
var c;
|
|
2189
|
-
let
|
|
2190
|
-
(c = e.nodeObj) != null && c.dangerouslySetInnerHTML ?
|
|
2191
|
-
const
|
|
2192
|
-
|
|
2189
|
+
let s = "";
|
|
2190
|
+
(c = e.nodeObj) != null && c.dangerouslySetInnerHTML ? s = e.nodeObj.dangerouslySetInnerHTML : e.text ? s = e.text.textContent : s = e.childNodes[0].textContent;
|
|
2191
|
+
const i = document.createElementNS(A, "foreignObject");
|
|
2192
|
+
C(i, {
|
|
2193
2193
|
x: n + parseInt(t.paddingLeft) + "",
|
|
2194
2194
|
y: o + parseInt(t.paddingTop) + "",
|
|
2195
2195
|
width: t.width,
|
|
2196
2196
|
height: t.height
|
|
2197
2197
|
});
|
|
2198
2198
|
const r = document.createElement("div");
|
|
2199
|
-
return
|
|
2199
|
+
return C(r, {
|
|
2200
2200
|
xmlns: "http://www.w3.org/1999/xhtml",
|
|
2201
2201
|
style: `font-family: ${t.fontFamily}; font-size: ${t.fontSize}; font-weight: ${t.fontWeight}; color: ${t.color}; white-space: pre-wrap;`
|
|
2202
|
-
}), r.innerHTML =
|
|
2202
|
+
}), r.innerHTML = s, i.appendChild(r), i;
|
|
2203
2203
|
}
|
|
2204
2204
|
function eo(e, t) {
|
|
2205
|
-
const n = getComputedStyle(t), { offsetLeft: o, offsetTop:
|
|
2206
|
-
return
|
|
2205
|
+
const n = getComputedStyle(t), { offsetLeft: o, offsetTop: s } = R(e.nodes, t), i = document.createElementNS(A, "rect");
|
|
2206
|
+
return C(i, {
|
|
2207
2207
|
x: o + "",
|
|
2208
|
-
y:
|
|
2208
|
+
y: s + "",
|
|
2209
2209
|
rx: n.borderRadius,
|
|
2210
2210
|
ry: n.borderRadius,
|
|
2211
2211
|
width: n.width,
|
|
@@ -2213,13 +2213,13 @@ function eo(e, t) {
|
|
|
2213
2213
|
fill: n.backgroundColor,
|
|
2214
2214
|
stroke: n.borderColor,
|
|
2215
2215
|
"stroke-width": n.borderWidth
|
|
2216
|
-
}),
|
|
2216
|
+
}), i;
|
|
2217
2217
|
}
|
|
2218
2218
|
function ne(e, t, n = !1) {
|
|
2219
|
-
const o = getComputedStyle(t), { offsetLeft:
|
|
2220
|
-
|
|
2221
|
-
x:
|
|
2222
|
-
y:
|
|
2219
|
+
const o = getComputedStyle(t), { offsetLeft: s, offsetTop: i } = R(e.nodes, t), r = document.createElementNS(A, "rect");
|
|
2220
|
+
C(r, {
|
|
2221
|
+
x: s + "",
|
|
2222
|
+
y: i + "",
|
|
2223
2223
|
rx: o.borderRadius,
|
|
2224
2224
|
ry: o.borderRadius,
|
|
2225
2225
|
width: o.width,
|
|
@@ -2231,85 +2231,85 @@ function ne(e, t, n = !1) {
|
|
|
2231
2231
|
const c = document.createElementNS(A, "g");
|
|
2232
2232
|
c.appendChild(r);
|
|
2233
2233
|
let l;
|
|
2234
|
-
return n ? l = Qn(t, o,
|
|
2234
|
+
return n ? l = Qn(t, o, s, i) : l = Zn(t, o, s, i), c.appendChild(l), c;
|
|
2235
2235
|
}
|
|
2236
2236
|
function to(e, t) {
|
|
2237
|
-
const n = getComputedStyle(t), { offsetLeft: o, offsetTop:
|
|
2238
|
-
return
|
|
2237
|
+
const n = getComputedStyle(t), { offsetLeft: o, offsetTop: s } = R(e.nodes, t), i = document.createElementNS(A, "a"), r = document.createElementNS(A, "text");
|
|
2238
|
+
return C(r, {
|
|
2239
2239
|
x: o + "",
|
|
2240
|
-
y:
|
|
2240
|
+
y: s + parseInt(n.fontSize) + "",
|
|
2241
2241
|
"text-anchor": "start",
|
|
2242
2242
|
"font-family": n.fontFamily,
|
|
2243
2243
|
"font-size": `${n.fontSize}`,
|
|
2244
2244
|
"font-weight": `${n.fontWeight}`,
|
|
2245
2245
|
fill: `${n.color}`
|
|
2246
|
-
}), r.innerHTML = t.textContent,
|
|
2246
|
+
}), r.innerHTML = t.textContent, i.appendChild(r), i.setAttribute("href", t.href), i;
|
|
2247
2247
|
}
|
|
2248
2248
|
function no(e, t) {
|
|
2249
|
-
const n = getComputedStyle(t), { offsetLeft: o, offsetTop:
|
|
2250
|
-
return
|
|
2249
|
+
const n = getComputedStyle(t), { offsetLeft: o, offsetTop: s } = R(e.nodes, t), i = document.createElementNS(A, "image");
|
|
2250
|
+
return C(i, {
|
|
2251
2251
|
x: o + "",
|
|
2252
|
-
y:
|
|
2252
|
+
y: s + "",
|
|
2253
2253
|
width: n.width + "",
|
|
2254
2254
|
height: n.height + "",
|
|
2255
2255
|
href: t.src
|
|
2256
|
-
}),
|
|
2256
|
+
}), i;
|
|
2257
2257
|
}
|
|
2258
|
-
const oe = 100, oo = '<?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">',
|
|
2258
|
+
const oe = 100, oo = '<?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">', so = (e, t = !1) => {
|
|
2259
2259
|
var u, h, p;
|
|
2260
|
-
const n = e.nodes, o = n.offsetHeight + oe * 2,
|
|
2261
|
-
|
|
2260
|
+
const n = e.nodes, o = n.offsetHeight + oe * 2, s = n.offsetWidth + oe * 2, i = Gn(o + "px", s + "px"), r = document.createElementNS(A, "svg"), c = document.createElementNS(A, "rect");
|
|
2261
|
+
C(c, {
|
|
2262
2262
|
x: "0",
|
|
2263
2263
|
y: "0",
|
|
2264
|
-
width: `${
|
|
2264
|
+
width: `${s}`,
|
|
2265
2265
|
height: `${o}`,
|
|
2266
2266
|
fill: e.theme.cssVar["--bgcolor"]
|
|
2267
|
-
}),
|
|
2268
|
-
const v =
|
|
2269
|
-
v.setAttribute("x", `${
|
|
2267
|
+
}), i.appendChild(c), n.querySelectorAll(".subLines").forEach((g) => {
|
|
2268
|
+
const v = g.cloneNode(!0), { offsetLeft: m, offsetTop: f } = R(n, g.parentElement);
|
|
2269
|
+
v.setAttribute("x", `${m}`), v.setAttribute("y", `${f}`), r.appendChild(v);
|
|
2270
2270
|
});
|
|
2271
2271
|
const l = (u = n.querySelector(".lines")) == null ? void 0 : u.cloneNode(!0);
|
|
2272
2272
|
l && r.appendChild(l);
|
|
2273
|
-
const
|
|
2274
|
-
|
|
2275
|
-
const
|
|
2276
|
-
return
|
|
2277
|
-
|
|
2278
|
-
}), n.querySelectorAll(".tags > span").forEach((
|
|
2279
|
-
r.appendChild(ne(e,
|
|
2280
|
-
}), n.querySelectorAll(".icons > span").forEach((
|
|
2281
|
-
r.appendChild(ne(e,
|
|
2282
|
-
}), n.querySelectorAll(".hyper-link").forEach((
|
|
2283
|
-
r.appendChild(to(e,
|
|
2284
|
-
}), n.querySelectorAll("img").forEach((
|
|
2285
|
-
r.appendChild(no(e,
|
|
2286
|
-
}),
|
|
2273
|
+
const d = (h = n.querySelector(".topiclinks")) == null ? void 0 : h.cloneNode(!0);
|
|
2274
|
+
d && r.appendChild(d);
|
|
2275
|
+
const a = (p = n.querySelector(".summary")) == null ? void 0 : p.cloneNode(!0);
|
|
2276
|
+
return a && r.appendChild(a), n.querySelectorAll("me-tpc").forEach((g) => {
|
|
2277
|
+
g.nodeObj.dangerouslySetInnerHTML ? r.appendChild(ne(e, g, !t)) : (r.appendChild(eo(e, g)), r.appendChild(ne(e, g.text, !t)));
|
|
2278
|
+
}), n.querySelectorAll(".tags > span").forEach((g) => {
|
|
2279
|
+
r.appendChild(ne(e, g));
|
|
2280
|
+
}), n.querySelectorAll(".icons > span").forEach((g) => {
|
|
2281
|
+
r.appendChild(ne(e, g));
|
|
2282
|
+
}), n.querySelectorAll(".hyper-link").forEach((g) => {
|
|
2283
|
+
r.appendChild(to(e, g));
|
|
2284
|
+
}), n.querySelectorAll("img").forEach((g) => {
|
|
2285
|
+
r.appendChild(no(e, g));
|
|
2286
|
+
}), C(r, {
|
|
2287
2287
|
x: oe + "",
|
|
2288
2288
|
y: oe + "",
|
|
2289
2289
|
overflow: "visible"
|
|
2290
|
-
}),
|
|
2291
|
-
},
|
|
2290
|
+
}), i.appendChild(r), i;
|
|
2291
|
+
}, io = (e, t) => (t && e.insertAdjacentHTML("afterbegin", "<style>" + t + "</style>"), oo + e.outerHTML);
|
|
2292
2292
|
function ro(e) {
|
|
2293
2293
|
return new Promise((t, n) => {
|
|
2294
2294
|
const o = new FileReader();
|
|
2295
|
-
o.onload = (
|
|
2296
|
-
t(
|
|
2297
|
-
}, o.onerror = (
|
|
2298
|
-
n(
|
|
2295
|
+
o.onload = (s) => {
|
|
2296
|
+
t(s.target.result);
|
|
2297
|
+
}, o.onerror = (s) => {
|
|
2298
|
+
n(s);
|
|
2299
2299
|
}, o.readAsDataURL(e);
|
|
2300
2300
|
});
|
|
2301
2301
|
}
|
|
2302
2302
|
const co = function(e = !1, t) {
|
|
2303
|
-
const n =
|
|
2303
|
+
const n = so(this, e), o = io(n, t);
|
|
2304
2304
|
return new Blob([o], { type: "image/svg+xml" });
|
|
2305
2305
|
}, lo = async function(e = !1, t) {
|
|
2306
2306
|
const n = this.exportSvg(e, t), o = await ro(n);
|
|
2307
|
-
return new Promise((
|
|
2307
|
+
return new Promise((s, i) => {
|
|
2308
2308
|
const r = new Image();
|
|
2309
2309
|
r.setAttribute("crossOrigin", "anonymous"), r.onload = () => {
|
|
2310
2310
|
const c = document.createElement("canvas");
|
|
2311
|
-
c.width = r.width, c.height = r.height, c.getContext("2d").drawImage(r, 0, 0), c.toBlob(
|
|
2312
|
-
}, r.src = o, r.onerror =
|
|
2311
|
+
c.width = r.width, c.height = r.height, c.getContext("2d").drawImage(r, 0, 0), c.toBlob(s, "image/png", 1);
|
|
2312
|
+
}, r.src = o, r.onerror = i;
|
|
2313
2313
|
});
|
|
2314
2314
|
}, ao = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2315
2315
|
__proto__: null,
|
|
@@ -2328,7 +2328,7 @@ for (let e = 0; e < He.length; e++) {
|
|
|
2328
2328
|
tt[t] = ho(Ge[t], t);
|
|
2329
2329
|
}
|
|
2330
2330
|
const uo = {
|
|
2331
|
-
getObjById:
|
|
2331
|
+
getObjById: ie,
|
|
2332
2332
|
generateNewObj: ot,
|
|
2333
2333
|
layout: rt,
|
|
2334
2334
|
linkDiv: mt,
|
|
@@ -2337,7 +2337,7 @@ const uo = {
|
|
|
2337
2337
|
createParent: dt,
|
|
2338
2338
|
createChildren: ht,
|
|
2339
2339
|
createTopic: ut,
|
|
2340
|
-
findEle:
|
|
2340
|
+
findEle: S,
|
|
2341
2341
|
changeTheme: Rt,
|
|
2342
2342
|
...Mn,
|
|
2343
2343
|
...tt,
|
|
@@ -2354,53 +2354,54 @@ const uo = {
|
|
|
2354
2354
|
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;
|
|
2355
2355
|
}
|
|
2356
2356
|
};
|
|
2357
|
-
function fo({ pT: e, pL: t, pW: n, pH: o, cT:
|
|
2358
|
-
let
|
|
2357
|
+
function fo({ pT: e, pL: t, pW: n, pH: o, cT: s, cL: i, cW: r, cH: c, direction: l, containerHeight: d }) {
|
|
2358
|
+
let a = t + n / 2;
|
|
2359
2359
|
const u = e + o / 2;
|
|
2360
2360
|
let h;
|
|
2361
|
-
l === L.LHS ? h =
|
|
2362
|
-
const p =
|
|
2363
|
-
return l === L.LHS ?
|
|
2361
|
+
l === L.LHS ? h = i + r : h = i;
|
|
2362
|
+
const p = s + c / 2, v = (1 - Math.abs(p - u) / d) * 0.25 * (n / 2);
|
|
2363
|
+
return l === L.LHS ? a = a - n / 10 - v : a = a + n / 10 + v, `M ${a} ${u} Q ${a} ${p} ${h} ${p}`;
|
|
2364
2364
|
}
|
|
2365
|
-
function po({ pT: e, pL: t, pW: n, pH: o, cT:
|
|
2366
|
-
const
|
|
2365
|
+
function po({ pT: e, pL: t, pW: n, pH: o, cT: s, cL: i, cW: r, cH: c, direction: l, isFirst: d }) {
|
|
2366
|
+
const a = parseInt(this.container.style.getPropertyValue("--gap"));
|
|
2367
2367
|
let u = 0, h = 0;
|
|
2368
|
-
|
|
2369
|
-
const p =
|
|
2370
|
-
let
|
|
2371
|
-
const f = Math.abs(u - p) / 300 *
|
|
2372
|
-
return l === L.LHS ? (
|
|
2368
|
+
d ? u = e + o / 2 : u = e + o;
|
|
2369
|
+
const p = s + c;
|
|
2370
|
+
let g = 0, v = 0, m = 0;
|
|
2371
|
+
const f = Math.abs(u - p) / 300 * a;
|
|
2372
|
+
return l === L.LHS ? (m = t, g = m + a, v = m - a, h = i + a, `M ${g} ${u} C ${m} ${u} ${m + f} ${p} ${v} ${p} H ${h}`) : (m = t + n, g = m - a, v = m + a, h = i + r - a, `M ${g} ${u} C ${m} ${u} ${m - f} ${p} ${v} ${p} H ${h}`);
|
|
2373
2373
|
}
|
|
2374
|
-
const mo = "4.4.
|
|
2374
|
+
const mo = "4.4.3", Y = document;
|
|
2375
2375
|
function D({
|
|
2376
2376
|
el: e,
|
|
2377
2377
|
direction: t,
|
|
2378
2378
|
locale: n,
|
|
2379
2379
|
draggable: o,
|
|
2380
|
-
editable:
|
|
2381
|
-
contextMenu:
|
|
2380
|
+
editable: s,
|
|
2381
|
+
contextMenu: i,
|
|
2382
2382
|
contextMenuOption: r,
|
|
2383
2383
|
toolBar: c,
|
|
2384
2384
|
keypress: l,
|
|
2385
|
-
mouseSelectionButton:
|
|
2386
|
-
selectionContainer:
|
|
2385
|
+
mouseSelectionButton: d,
|
|
2386
|
+
selectionContainer: a,
|
|
2387
2387
|
before: u,
|
|
2388
2388
|
newTopicName: h,
|
|
2389
2389
|
allowUndo: p,
|
|
2390
|
-
generateMainBranch:
|
|
2390
|
+
generateMainBranch: g,
|
|
2391
2391
|
generateSubBranch: v,
|
|
2392
|
-
overflowHidden:
|
|
2393
|
-
theme: f
|
|
2392
|
+
overflowHidden: m,
|
|
2393
|
+
theme: f,
|
|
2394
|
+
alignment: b
|
|
2394
2395
|
}) {
|
|
2395
|
-
let
|
|
2396
|
-
const
|
|
2397
|
-
if (
|
|
2396
|
+
let x = null;
|
|
2397
|
+
const E = Object.prototype.toString.call(e);
|
|
2398
|
+
if (E === "[object HTMLDivElement]" ? x = e : E === "[object String]" && (x = document.querySelector(e)), !x)
|
|
2398
2399
|
throw new Error("MindElixir: el is not a valid element");
|
|
2399
|
-
|
|
2400
|
-
const
|
|
2401
|
-
this.theme = f || (
|
|
2402
|
-
const
|
|
2403
|
-
|
|
2400
|
+
x.style.position = "relative", x.innerHTML = "", this.mindElixirBox = x, this.disposable = [], this.before = u || {}, this.locale = n || "en", this.contextMenuOption = r, this.contextMenu = i === void 0 ? !0 : i, this.toolBar = c === void 0 ? !0 : c, this.keypress = l === void 0 ? !0 : l, this.mouseSelectionButton = d || 0, this.direction = typeof t == "number" ? t : 1, this.draggable = o === void 0 ? !0 : o, this.newTopicName = h || "new node", this.editable = s === void 0 ? !0 : s, this.allowUndo = p === void 0 ? !1 : p, this.currentNode = null, this.currentArrow = null, this.scaleVal = 1, this.tempDirection = null, this.generateMainBranch = g || fo, this.generateSubBranch = v || po, this.overflowHidden = m || !1, this.bus = it.create(), this.container = Y.createElement("div"), this.selectionContainer = a || this.container, this.container.className = "map-container";
|
|
2401
|
+
const y = window.matchMedia("(prefers-color-scheme: dark)");
|
|
2402
|
+
this.theme = f || (y.matches ? Be : Pe);
|
|
2403
|
+
const w = Y.createElement("div");
|
|
2404
|
+
w.className = "map-canvas", this.map = w, this.map.setAttribute("tabindex", "0"), this.container.appendChild(this.map), this.mindElixirBox.appendChild(this.container), this.nodes = Y.createElement("me-nodes"), this.nodes.className = "main-node-container", this.lines = X("lines"), this.summarySvg = X("summary"), this.linkController = X("linkcontroller"), this.P2 = Y.createElement("div"), this.P3 = Y.createElement("div"), this.P2.className = this.P3.className = "circle", this.P2.style.display = this.P3.style.display = "none", this.line1 = Ee(), this.line2 = Ee(), this.linkController.appendChild(this.line1), this.linkController.appendChild(this.line2), this.linkSvgGroup = X("topiclinks"), this.alignment = b ?? "root", this.map.appendChild(this.nodes), this.overflowHidden ? this.container.style.overflow = "hidden" : st(this);
|
|
2404
2405
|
}
|
|
2405
2406
|
D.prototype = uo;
|
|
2406
2407
|
D.LEFT = $;
|
|
@@ -2409,7 +2410,7 @@ D.SIDE = ae;
|
|
|
2409
2410
|
D.THEME = Pe;
|
|
2410
2411
|
D.DARK_THEME = Be;
|
|
2411
2412
|
D.version = mo;
|
|
2412
|
-
D.E =
|
|
2413
|
+
D.E = S;
|
|
2413
2414
|
D.new = (e) => ({
|
|
2414
2415
|
nodeData: {
|
|
2415
2416
|
id: Z(),
|