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