mind-elixir 3.1.3 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,36 +1,36 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".mind-elixir{--gap: 30px;--root-radius: 30px;--main-radius: 20px;--root-color: #ffffff;--root-bgcolor: #4c4f69;--main-color: #444446;--main-bgcolor: #ffffff;--topic-padding: 3px;--color: #777777;--bgcolor: #f6f6f6;--selected: #4dc4ff;--panel-color: #444446;--panel-bgcolor: #ffffff;--panel-border-color: #eaeaea;position:relative;-webkit-tap-highlight-color:rgba(0,0,0,0);font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,PingFang SC,Microsoft YaHei,Source Han Sans SC,Noto Sans CJK SC,WenQuanYi Micro Hei,sans-serif}.mind-elixir .hyper-link{text-decoration:none}.map-container{-webkit-user-select:none;user-select:none;height:100%;width:100%;overflow:scroll;font-size:15px}.map-container::-webkit-scrollbar{width:0px;height:0px}.map-container .selected{box-shadow:0 0 0 2px var(--selected)}.map-container .lhs{direction:rtl}.map-container .lhs me-tpc{direction:ltr}.map-container .map-canvas{height:20000px;width:20000px;position:relative;-webkit-user-select:none;user-select:none;transition:transform .3s;transform:scale(1);background-color:var(--bgcolor)}.map-container .map-canvas me-nodes{position:absolute;display:flex;justify-content:center;align-items:center;height:fit-content;width:fit-content}.map-container .map-canvas me-root{position:relative}.map-container .map-canvas me-root me-tpc{display:block;font-size:25px;color:var(--root-color);padding:10px var(--gap);border-radius:var(--root-radius);white-space:pre-wrap;background-color:var(--root-bgcolor)}.map-container .map-canvas me-root me-tpc #input-box{padding:10px var(--gap)}.map-container me-main>me-wrapper{position:relative;margin:20px 65px}.map-container me-main>me-wrapper>me-parent{margin:var(--gap);padding:0}.map-container me-main>me-wrapper>me-parent>me-tpc{border-radius:var(--main-radius);background-color:var(--main-bgcolor);border:2px solid var(--main-color);color:var(--main-color);padding:8px var(--gap)}.map-container me-main>me-wrapper>me-parent>me-tpc #input-box{padding:8px var(--gap)}.map-container me-wrapper{display:block;pointer-events:none;width:fit-content}.map-container me-children,.map-container me-parent{display:inline-block;vertical-align:middle}.map-container me-parent{position:relative;cursor:pointer;padding:6px var(--gap);margin-top:10px}.map-container me-parent me-tpc{position:relative;display:block;border-radius:3px;color:var(--color);pointer-events:all;max-width:800px;white-space:pre-wrap;padding:var(--topic-padding);line-height:1.2}.map-container me-parent me-tpc>div,.map-container me-parent me-tpc>span,.map-container me-parent me-tpc>img{pointer-events:none}.map-container me-parent me-tpc .insert-preview{position:absolute;width:100%;left:0;z-index:9}.map-container me-parent me-tpc .show{background:#7ad5ff;pointer-events:none;opacity:.7}.map-container me-parent me-tpc .before{height:14px;top:-14px}.map-container me-parent me-tpc .in{height:100%;top:0}.map-container me-parent me-tpc .after{height:14px;bottom:-14px}.map-container me-parent me-epd{position:absolute;height:18px;width:18px;opacity:.8;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgdD0iMTY1NjY1NDcxNzI0MiIgY2xhc3M9Imljb24iIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiIHZlcnNpb249IjEuMSIKICAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+CiAgICA8cGF0aCBkPSJNNTEyIDc0LjY2NjY2N0MyNzAuOTMzMzMzIDc0LjY2NjY2NyA3NC42NjY2NjcgMjcwLjkzMzMzMyA3NC42NjY2NjcgNTEyUzI3MC45MzMzMzMgOTQ5LjMzMzMzMyA1MTIgOTQ5LjMzMzMzMyA5NDkuMzMzMzMzIDc1My4wNjY2NjcgOTQ5LjMzMzMzMyA1MTIgNzUzLjA2NjY2NyA3NC42NjY2NjcgNTEyIDc0LjY2NjY2N3oiIHN0cm9rZS13aWR0aD0iNTQiIHN0cm9rZT0nYmxhY2snIGZpbGw9J3doaXRlJyA+PC9wYXRoPgogICAgPHBhdGggZD0iTTY4Mi42NjY2NjcgNDgwaC0xMzguNjY2NjY3VjM0MS4zMzMzMzNjMC0xNy4wNjY2NjctMTQuOTMzMzMzLTMyLTMyLTMycy0zMiAxNC45MzMzMzMtMzIgMzJ2MTM4LjY2NjY2N0gzNDEuMzMzMzMzYy0xNy4wNjY2NjcgMC0zMiAxNC45MzMzMzMtMzIgMzJzMTQuOTMzMzMzIDMyIDMyIDMyaDEzOC42NjY2NjdWNjgyLjY2NjY2N2MwIDE3LjA2NjY2NyAxNC45MzMzMzMgMzIgMzIgMzJzMzItMTQuOTMzMzMzIDMyLTMydi0xMzguNjY2NjY3SDY4Mi42NjY2NjdjMTcuMDY2NjY3IDAgMzItMTQuOTMzMzMzIDMyLTMycy0xNC45MzMzMzMtMzItMzItMzJ6Ij48L3BhdGg+Cjwvc3ZnPg==);background-repeat:no-repeat;background-size:contain;background-position:center;pointer-events:all;z-index:9}.map-container me-parent me-epd.minus{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgdD0iMTY1NjY1NTU2NDk4NSIgY2xhc3M9Imljb24iIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiIHZlcnNpb249IjEuMSIKICAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+CiAgICA8cGF0aCBkPSJNNTEyIDc0LjY2NjY2N0MyNzAuOTMzMzMzIDc0LjY2NjY2NyA3NC42NjY2NjcgMjcwLjkzMzMzMyA3NC42NjY2NjcgNTEyUzI3MC45MzMzMzMgOTQ5LjMzMzMzMyA1MTIgOTQ5LjMzMzMzMyA5NDkuMzMzMzMzIDc1My4wNjY2NjcgOTQ5LjMzMzMzMyA1MTIgNzUzLjA2NjY2NyA3NC42NjY2NjcgNTEyIDc0LjY2NjY2N3oiIHN0cm9rZS13aWR0aD0iNTQiIHN0cm9rZT0nYmxhY2snIGZpbGw9J3doaXRlJyA+PC9wYXRoPgogICAgPHBhdGggZD0iTTY4Mi42NjY2NjcgNTQ0SDM0MS4zMzMzMzNjLTE3LjA2NjY2NyAwLTMyLTE0LjkzMzMzMy0zMi0zMnMxNC45MzMzMzMtMzIgMzItMzJoMzQxLjMzMzMzNGMxNy4wNjY2NjcgMCAzMiAxNC45MzMzMzMgMzIgMzJzLTE0LjkzMzMzMyAzMi0zMiAzMnoiPjwvcGF0aD4KPC9zdmc+)!important;transition:opacity .3s;opacity:0}.map-container me-parent me-epd.minus:hover{opacity:.8}.map-container .icon{width:1em;height:1em;vertical-align:-.15em;fill:currentColor;overflow:hidden}.map-container .lines,.map-container .summary,.map-container .subLines,.map-container .topiclinks,.map-container .linkcontroller{position:absolute;height:102%;width:100%;top:0;left:0}.map-container .topiclinks,.map-container .linkcontroller,.map-container .summary{pointer-events:none}.map-container .topiclinks text,.map-container .linkcontroller text,.map-container .summary text{pointer-events:all}.map-container .topiclinks .selected,.map-container .linkcontroller .selected,.map-container .summary .selected{pointer-events:none}.map-container .lines,.map-container .subLines{pointer-events:none;z-index:-1}.map-container .topiclinks *,.map-container .linkcontroller *{z-index:100}.map-container .topiclinks g{cursor:pointer}.map-container #input-box{position:absolute;top:0;left:0;padding:var(--topic-padding);color:var(--color);background-color:var(--bgcolor);width:max-content;max-width:800px;z-index:11;direction:ltr;-webkit-user-select:auto;user-select:auto;pointer-events:all}.map-container me-tpc>img{pointer-events:none;display:block;margin-top:8px}.map-container .circle{position:absolute;height:10px;width:10px;margin-top:-5px;margin-left:-5px;border-radius:100%;background:#aaa;cursor:pointer}.map-container .tags{direction:ltr}.map-container .tags span{display:inline-block;border-radius:3px;padding:2px 4px;background:#d6f0f8;color:#276f86;margin:2px 3px 0 0;font-size:12px;line-height:16px}.map-container .icons{display:inline-block;direction:ltr;margin-right:10px}.map-container .mind-elixir-ghost{position:fixed;top:-100%;left:-100%;box-sizing:content-box;opacity:.5;background-color:#f6f6f6;max-width:200px;width:fit-content;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:8px 16px;border-radius:6px;border:#666666 2px solid}.selection-area{background:#4f90f22d;border:1px solid #4f90f2}.mind-elixir .context-menu{position:fixed;top:0;left:0;width:100%;height:100%;z-index:99}.mind-elixir .context-menu .menu-list{position:fixed;list-style:none;margin:0;padding:0;font:300 15px Roboto,sans-serif;color:var(--panel-color);box-shadow:0 12px 15px #0003}.mind-elixir .context-menu .menu-list li{min-width:200px;overflow:hidden;white-space:nowrap;padding:10px 14px;background:var(--panel-bgcolor);border-bottom:1px solid var(--panel-border-color)}.mind-elixir .context-menu .menu-list li a{color:#333;text-decoration:none}.mind-elixir .context-menu .menu-list li.disabled{display:none;color:#5e5e5e;background-color:#f7f7f7}.mind-elixir .context-menu .menu-list li.disabled:hover{cursor:default;background-color:#f7f7f7}.mind-elixir .context-menu .menu-list li:hover{cursor:pointer;filter:brightness(.9)}.mind-elixir .context-menu .menu-list li:first-child{border-radius:5px 5px 0 0}.mind-elixir .context-menu .menu-list li:last-child{border-bottom:0;border-radius:0 0 5px 5px}.mind-elixir .context-menu .menu-list li span:last-child{float:right}.mind-elixir .mobile-menu{position:absolute;left:20px;bottom:70px;z-index:99;margin:0;padding:0;color:#333;border-radius:5px;box-shadow:0 12px 15px #0003;overflow:hidden}.mind-elixir .mobile-menu *{transition:color .4s,background-color .4s}.mind-elixir .mobile-menu div{float:left;text-align:center;width:30px;overflow:hidden;white-space:nowrap;padding:8px;background-color:#fff;border-bottom:1px solid #ecf0f1}.mind-elixir .mobile-menu div a{color:#333;text-decoration:none}.mind-elixir .mobile-menu div.disabled{color:#5e5e5e;background-color:#f7f7f7}.mind-elixir .mobile-menu div.disabled:hover{cursor:default;background-color:#f7f7f7}.mind-elixir .mobile-menu div:hover{cursor:pointer;background-color:#ecf0f1}.mind-elixir-toolbar{font-family:iconfont;position:absolute;color:var(--panel-color);background:var(--panel-bgcolor);padding:10px;border-radius:5px;box-shadow:0 1px 2px #0003}.mind-elixir-toolbar svg{display:inline-block}.mind-elixir-toolbar span:active{opacity:.5}.mind-elixir-toolbar.rb{right:20px;bottom:20px}.mind-elixir-toolbar.rb span+span{margin-left:10px}.mind-elixir-toolbar.lt{font-size:20px;left:20px;top:20px}.mind-elixir-toolbar.lt span{display:block}.mind-elixir-toolbar.lt span+span{margin-top:10px}")),document.head.appendChild(e)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();
2
- (function(e) {
3
- var t, n, i, s, o, r, l = '<svg><symbol id="icon-edit" viewBox="0 0 1024 1024"><path d="M423.765333 128a42.666667 42.666667 0 0 1 3.2 85.205333L423.765333 213.333333H234.666667a64 64 0 0 0-63.872 60.245334L170.666667 277.333333v512a64 64 0 0 0 60.245333 63.872L234.666667 853.333333h512a64 64 0 0 0 63.872-60.245333L810.666667 789.333333v-189.098666a42.666667 42.666667 0 0 1 85.205333-3.2l0.128 3.2V789.333333a149.333333 149.333333 0 0 1-144.213333 149.248L746.666667 938.666667h-512a149.333333 149.333333 0 0 1-149.248-144.213334L85.333333 789.333333v-512a149.333333 149.333333 0 0 1 144.213334-149.248L234.666667 128h189.098666z m324.949334-53.248a42.666667 42.666667 0 0 1 60.330666 0l150.869334 150.869333a42.666667 42.666667 0 0 1 0 60.330667l-329.386667 329.386667a42.666667 42.666667 0 0 1-29.44 12.458666l-153.386667 2.517334a42.666667 42.666667 0 0 1-43.349333-43.349334l2.56-153.386666a42.666667 42.666667 0 0 1 12.458667-29.44z m30.165333 90.496L491.946667 452.266667l-1.493334 91.989333 92.032-1.493333 286.976-286.976-90.538666-90.538667z" ></path></symbol><symbol id="icon-rising" viewBox="0 0 1024 1024"><path d="M553.173333 803.84h-64l0.021334-474.581333-224.021334 224-45.269333-45.226667L521.6 206.293333l301.717333 301.696-45.269333 45.269334-224.853333-224.896v475.477333z" ></path></symbol><symbol id="icon-falling" viewBox="0 0 1024 1024"><path d="M553.173333 238.314667h-64l0.021334 474.602666-224.021334-224-45.269333 45.226667L521.6 835.861333l301.717333-301.717333-45.269333-45.226667-224.853333 224.853334V238.336z" ></path></symbol><symbol id="icon-shanchu2" viewBox="0 0 1024 1024"><path d="M516.60601807 107.93026734c-82.64382935 0-149.71865844 65.51751709-152.5729065 147.77160644H171.37136841c-21.40603638 0-38.92044068 17.38504028-38.92044068 38.92126465 0 21.40686036 17.38504028 38.92208862 38.92126466 38.92208862h42.94308471v435.40136719c0 81.73498536 55.39828492 148.55026245 123.90106201 148.55026245h348.99444581c68.37341309 0 123.90106201-66.42553711 123.901062-148.55026245V333.80477906h38.92126465c21.40686036 0 38.92126464-17.38586426 38.92126465-38.92208863 0-21.40686036-17.38504028-38.92126464-38.92126465-38.92126465H668.91854859C666.45321656 173.44860839 599.24902344 107.93109131 516.60601807 107.93109131z m-79.65939331 147.77160644c2.85424805-42.16442872 37.2354126-74.85809326 79.78875732-74.85809326s76.93450927 32.82302857 79.39984131 74.85809326H436.94662476z m-98.86047364 589.01165771c-24.2611084 0-50.98754883-31.13717651-50.98754883-75.76693725V333.80477906h450.97036744V769.33551026c0 44.50039673-26.72644043 75.76776123-50.98754884 75.76776122H338.08615112v-0.38973999z m0 0" ></path><path d="M390.37063599 751.17263794c17.77313232 0 32.43411255-17.7739563 32.43411255-40.08883667V482.35504151c0-22.31488037-14.53079224-40.08966065-32.43411255-40.08966065-17.77478027 0-32.43493653 17.77478027-32.43493653 40.08966065v228.72875976c0 22.18469239 14.27124023 40.08883667 32.43493653 40.08883667z m117.41308594 0c17.7739563 0 32.43411255-17.7739563 32.43411255-40.08883667V482.35504151c0-22.31488037-14.53079224-40.08966065-32.43411255-40.08966065-17.7739563 0-32.43493653 17.77478027-32.43493653 40.08966065v228.72875976c0 22.18469239 14.66098023 40.08883667 32.43493653 40.08883667z m123.51049804 0c17.7739563 0 32.43493653-17.7739563 32.43493652-40.08883667V482.35504151c0-22.31488037-14.53079224-40.08966065-32.43493652-40.08966065-17.7739563 0-32.43411255 17.77478027-32.43411255 40.08966065v228.72875976c0 22.18469239 14.14105224 40.08883667 32.43411255 40.08883667z m0 0" ></path></symbol><symbol id="icon-zijiedian" viewBox="0 0 1024 1024"><path d="M312.208 472c19.568-157.856 153.432-280 315.656-280 175.68 0 318.112 143.272 318.112 320S803.552 832 627.864 832c-162.224 0-296.08-122.144-315.656-280H120a40 40 0 0 1 0-80h192.208zM632 752c132.552 0 240-107.448 240-240 0-132.552-107.448-240-240-240-132.552 0-240 107.448-240 240 0 132.552 107.448 240 240 240z m-40-280v-80a40 40 0 0 1 80 0v80h80a40 40 0 0 1 0 80h-80v80a40 40 0 0 1-80 0v-80h-80a40 40 0 0 1 0-80h80z" ></path></symbol><symbol id="icon-tongjijiedian-" viewBox="0 0 1024 1024"><path d="M803.84 131.626667H410.24A59.733333 59.733333 0 0 0 350.506667 192v45.226667H199.68a51.626667 51.626667 0 0 0-51.626667 51.626666v465.92a51.626667 51.626667 0 0 0 51.626667 51.626667h187.52v-55.466667h-162.133333a21.333333 21.333333 0 0 1-21.333334-21.333333V313.386667a21.333333 21.333333 0 0 1 21.333334-21.333334h125.653333v64a59.733333 59.733333 0 0 0 59.733333 59.733334h393.386667a59.733333 59.733333 0 0 0 59.733333-59.733334V192a59.733333 59.733333 0 0 0-59.733333-60.373333z m4.266667 224.64a4.266667 4.266667 0 0 1-4.266667 4.266666H410.24a4.266667 4.266667 0 0 1-4.266667-4.266666V192a4.266667 4.266667 0 0 1 4.266667-4.266667h393.6a4.266667 4.266667 0 0 1 4.266667 4.266667zM716.16 749.44h-81.28v-81.493333a27.733333 27.733333 0 0 0-55.466667 0v81.28h-81.493333a27.733333 27.733333 0 1 0 0 55.466666h81.28v81.28a27.733333 27.733333 0 1 0 55.466667 0v-81.066666h81.28a27.733333 27.733333 0 0 0 0-55.466667z" ></path></symbol><symbol id="icon-close" viewBox="0 0 1024 1024"><path d="M557.312 513.248l265.28-263.904c12.544-12.48 12.608-32.704 0.128-45.248-12.512-12.576-32.704-12.608-45.248-0.128L512.128 467.904l-263.04-263.84c-12.448-12.48-32.704-12.544-45.248-0.064-12.512 12.48-12.544 32.736-0.064 45.28l262.976 263.776L201.6 776.8c-12.544 12.48-12.608 32.704-0.128 45.248a31.937 31.937 0 0 0 22.688 9.44c8.16 0 16.32-3.104 22.56-9.312l265.216-263.808 265.44 266.24c6.24 6.272 14.432 9.408 22.656 9.408a31.94 31.94 0 0 0 22.592-9.344c12.512-12.48 12.544-32.704 0.064-45.248L557.312 513.248z" fill="" ></path></symbol><symbol id="icon-menu" viewBox="0 0 1024 1024"><path d="M109.714 292.571h804.572c21.943 0 36.571-21.942 36.571-43.885 0-14.629-14.628-29.257-36.571-29.257H109.714c-21.943 0-36.571 14.628-36.571 36.571 0 14.629 14.628 36.571 36.571 36.571zM914.286 512H109.714c-21.943 0-36.571 14.629-36.571 36.571 0 14.629 14.628 36.572 36.571 36.572h804.572c21.943 0 36.571-21.943 36.571-43.886 0-14.628-14.628-29.257-36.571-29.257z m0 292.571H109.714c-21.943 0-36.571 14.629-36.571 36.572s14.628 36.571 36.571 36.571h804.572c21.943 0 36.571-21.943 36.571-36.571 0-21.943-14.628-36.572-36.571-36.572z" ></path></symbol><symbol id="icon-right" viewBox="0 0 1024 1024"><path d="M385 560.69999999L385 738.9c0 36.90000001 26.4 68.5 61.3 68.5l150.2 0c1.5 0 3-0.1 4.5-0.3 10.2 38.7 45.5 67.3 87.5 67.3 50 0 90.5-40.5 90.5-90.5s-40.5-90.5-90.5-90.5c-42 0-77.3 28.6-87.5 67.39999999-1.4-0.3-2.9-0.4-4.5-0.39999999L446.3 760.4c-6.8 0-14.3-8.9-14.3-21.49999999l0-427.00000001c0-12.7 7.40000001-21.5 14.30000001-21.5l150.19999999 0c1.5 0 3-0.2 4.5-0.4 10.2 38.8 45.5 67.3 87.5 67.3 50 0 90.5-40.5 90.5-90.4 0-49.9-40.5-90.6-90.5-90.59999999-42 0-77.3 28.6-87.5 67.39999999-1.4-0.2-2.9-0.4-4.49999999-0.4L446.3 243.3c-34.80000001 0-61.3 31.6-61.3 68.50000001L385 513.7l-79.1 0c-10.4-38.5-45.49999999-67-87.4-67-50 0-90.5 40.5-90.5 90.5s40.5 90.5 90.5 90.5c41.79999999 0 77.00000001-28.4 87.4-67L385 560.69999999z" fill="" ></path></symbol><symbol id="icon-left" viewBox="0 0 1024 1024"><path d="M639 463.30000001L639 285.1c0-36.90000001-26.4-68.5-61.3-68.5l-150.2 0c-1.5 0-3 0.1-4.5 0.3-10.2-38.7-45.5-67.3-87.5-67.3-50 0-90.5 40.5-90.5 90.5s40.5 90.5 90.5 90.5c42 0 77.3-28.6 87.5-67.39999999 1.4 0.3 2.9 0.4 4.5 0.39999999L577.7 263.6c6.8 0 14.3 8.9 14.3 21.49999999l0 427.00000001c0 12.7-7.40000001 21.5-14.30000001 21.5l-150.19999999 0c-1.5 0-3 0.2-4.5 0.4-10.2-38.8-45.5-67.3-87.5-67.3-50 0-90.5 40.5-90.5 90.4 0 49.9 40.5 90.6 90.5 90.59999999 42 0 77.3-28.6 87.5-67.39999999 1.4 0.2 2.9 0.4 4.49999999 0.4L577.7 780.7c34.80000001 0 61.3-31.6 61.3-68.50000001L639 510.3l79.1 0c10.4 38.5 45.49999999 67 87.4 67 50 0 90.5-40.5 90.5-90.5s-40.5-90.5-90.5-90.5c-41.79999999 0-77.00000001 28.4-87.4 67L639 463.30000001z" fill="" ></path></symbol><symbol id="icon-side" viewBox="0 0 1024 1024"><path d="M851.91168 328.45312c-59.97056 0-108.6208 48.47104-108.91264 108.36992l-137.92768 38.4a109.14304 109.14304 0 0 0-63.46752-46.58688l1.39264-137.11872c47.29344-11.86816 82.31936-54.66624 82.31936-105.64096 0-60.15488-48.76288-108.91776-108.91776-108.91776s-108.91776 48.76288-108.91776 108.91776c0 49.18784 32.60928 90.75712 77.38368 104.27392l-1.41312 138.87488a109.19936 109.19936 0 0 0-63.50336 48.55808l-138.93632-39.48544 0.01024-0.72704c0-60.15488-48.76288-108.91776-108.91776-108.91776s-108.91776 48.75776-108.91776 108.91776c0 60.15488 48.76288 108.91264 108.91776 108.91264 39.3984 0 73.91232-20.92032 93.03552-52.2496l139.19232 39.552-0.00512 0.2304c0 25.8304 9.00096 49.5616 24.02816 68.23424l-90.14272 132.63872a108.7488 108.7488 0 0 0-34.2528-5.504c-60.15488 0-108.91776 48.768-108.91776 108.91776 0 60.16 48.76288 108.91776 108.91776 108.91776 60.16 0 108.92288-48.75776 108.92288-108.91776 0-27.14624-9.9328-51.968-26.36288-71.04l89.04704-131.03104a108.544 108.544 0 0 0 37.6832 6.70208 108.672 108.672 0 0 0 36.48512-6.272l93.13792 132.57216a108.48256 108.48256 0 0 0-24.69888 69.0688c0 60.16 48.768 108.92288 108.91776 108.92288 60.16 0 108.91776-48.76288 108.91776-108.92288 0-60.14976-48.75776-108.91776-108.91776-108.91776a108.80512 108.80512 0 0 0-36.69504 6.3488l-93.07136-132.48a108.48768 108.48768 0 0 0 24.79616-72.22784l136.09984-37.888c18.99008 31.93856 53.84192 53.3504 93.69088 53.3504 60.16 0 108.92288-48.75776 108.92288-108.91264-0.00512-60.15488-48.77312-108.92288-108.92288-108.92288z" ></path></symbol><symbol id="icon-B" viewBox="0 0 1024 1024"><path d="M98.067692 65.457231H481.28c75.854769 0 132.411077 3.150769 169.668923 9.452307 37.336615 6.301538 70.656 19.534769 100.036923 39.620924 29.459692 20.007385 53.956923 46.710154 73.570462 80.029538 19.692308 33.398154 29.459692 70.734769 29.459692 112.167385 0 44.898462-12.130462 86.094769-36.233846 123.588923a224.886154 224.886154 0 0 1-98.461539 84.283077c58.368 17.092923 103.266462 46.08 134.695385 87.04 31.350154 40.96 47.025231 89.088 47.025231 144.462769 0 43.638154-10.082462 86.016-30.404923 127.212308-20.243692 41.196308-47.891692 74.043077-83.02277 98.697846-35.052308 24.654769-78.296615 39.778462-129.732923 45.449846-32.295385 3.465846-110.119385 5.671385-233.472 6.537846H98.067692V65.457231z m193.536 159.507692V446.621538h126.818462c75.460923 0 122.328615-1.024 140.603077-3.229538 33.083077-3.938462 59.155692-15.36 78.139077-34.343385 18.904615-18.904615 28.435692-43.874462 28.435692-74.830769 0-29.696-8.192-53.720615-24.497231-72.310154-16.384-18.510769-40.644923-29.696-72.940307-33.634461-19.140923-2.205538-74.279385-3.308308-165.415385-3.308308h-111.064615z m0 381.243077v256.315077h179.2c69.710769 0 113.979077-1.969231 132.726154-5.907692 28.750769-5.198769 52.145231-17.959385 70.262154-38.281847 18.116923-20.243692 27.096615-47.340308 27.096615-81.368615 0-28.750769-6.931692-53.169231-20.873846-73.255385a118.232615 118.232615 0 0 0-60.494769-43.795692c-26.387692-9.137231-83.574154-13.705846-171.638154-13.705846H291.603692z" ></path></symbol><symbol id="icon-a" viewBox="0 0 1024 1024"><path d="M757.76 665.6q0 20.48 1.536 34.304t7.68 22.016 18.944 12.288 34.304 4.096q-3.072 25.6-15.36 44.032-11.264 16.384-33.28 29.696t-62.976 13.312q-11.264 0-20.48-0.512t-17.408-2.56l-6.144-2.048-1.024 0q-4.096-1.024-10.24-4.096-2.048-2.048-4.096-2.048-1.024-1.024-2.048-1.024-14.336-8.192-23.552-17.408t-14.336-17.408q-6.144-10.24-9.216-20.48-63.488 75.776-178.176 75.776-48.128 0-88.064-15.36t-69.12-44.032-45.056-68.096-15.872-88.576 16.896-89.088 47.616-67.584 74.24-42.496 96.768-14.848q48.128 0 88.576 17.408t66.048 49.152q0-8.192 0.512-16.384t0.512-15.36q0-71.68-39.936-104.448t-128-32.768q-43.008 0-84.992 6.656t-84.992 17.92q14.336-28.672 25.088-47.616t24.064-29.184q30.72-24.576 158.72-24.576 79.872 0 135.168 13.824t90.624 43.52 51.2 75.264 15.872 108.032l0 200.704zM487.424 743.424q50.176 0 79.872-33.28t29.696-95.744q0-61.44-28.672-93.696t-76.8-32.256q-52.224 0-82.944 33.28t-30.72 94.72q0 58.368 31.744 92.672t77.824 34.304z" ></path></symbol><symbol id="icon-full" viewBox="0 0 1024 1024"><path d="M639.328 416c8.032 0 16.096-3.008 22.304-9.056l202.624-197.184-0.8 143.808c-0.096 17.696 14.144 32.096 31.808 32.192 0.064 0 0.128 0 0.192 0 17.6 0 31.904-14.208 32-31.808l1.248-222.208c0-0.672-0.352-1.248-0.384-1.92 0.032-0.512 0.288-0.896 0.288-1.408 0.032-17.664-14.272-32-31.968-32.032L671.552 96l-0.032 0c-17.664 0-31.968 14.304-32 31.968C639.488 145.632 653.824 160 671.488 160l151.872 0.224-206.368 200.8c-12.672 12.32-12.928 32.608-0.64 45.248C622.656 412.736 630.976 416 639.328 416z" ></path><path d="M896.032 639.552 896.032 639.552c-17.696 0-32 14.304-32.032 31.968l-0.224 151.872-200.832-206.4c-12.32-12.64-32.576-12.96-45.248-0.64-12.672 12.352-12.928 32.608-0.64 45.248l197.184 202.624-143.808-0.8c-0.064 0-0.128 0-0.192 0-17.6 0-31.904 14.208-32 31.808-0.096 17.696 14.144 32.096 31.808 32.192l222.24 1.248c0.064 0 0.128 0 0.192 0 0.64 0 1.12-0.32 1.76-0.352 0.512 0.032 0.896 0.288 1.408 0.288l0.032 0c17.664 0 31.968-14.304 32-31.968L928 671.584C928.032 653.952 913.728 639.584 896.032 639.552z" ></path><path d="M209.76 159.744l143.808 0.8c0.064 0 0.128 0 0.192 0 17.6 0 31.904-14.208 32-31.808 0.096-17.696-14.144-32.096-31.808-32.192L131.68 95.328c-0.064 0-0.128 0-0.192 0-0.672 0-1.248 0.352-1.888 0.384-0.448 0-0.8-0.256-1.248-0.256 0 0-0.032 0-0.032 0-17.664 0-31.968 14.304-32 31.968L96 352.448c-0.032 17.664 14.272 32 31.968 32.032 0 0 0.032 0 0.032 0 17.664 0 31.968-14.304 32-31.968l0.224-151.936 200.832 206.4c6.272 6.464 14.624 9.696 22.944 9.696 8.032 0 16.096-3.008 22.304-9.056 12.672-12.32 12.96-32.608 0.64-45.248L209.76 159.744z" ></path><path d="M362.368 617.056l-202.624 197.184 0.8-143.808c0.096-17.696-14.144-32.096-31.808-32.192-0.064 0-0.128 0-0.192 0-17.6 0-31.904 14.208-32 31.808l-1.248 222.24c0 0.704 0.352 1.312 0.384 2.016 0 0.448-0.256 0.832-0.256 1.312-0.032 17.664 14.272 32 31.968 32.032L352.448 928c0 0 0.032 0 0.032 0 17.664 0 31.968-14.304 32-31.968s-14.272-32-31.968-32.032l-151.936-0.224 206.4-200.832c12.672-12.352 12.96-32.608 0.64-45.248S375.008 604.704 362.368 617.056z" ></path></symbol><symbol id="icon-add" viewBox="0 0 1024 1024"><path d="M863.328 482.56l-317.344-1.12L545.984 162.816c0-17.664-14.336-32-32-32s-32 14.336-32 32l0 318.4L159.616 480.064c-0.032 0-0.064 0-0.096 0-17.632 0-31.936 14.24-32 31.904C127.424 529.632 141.728 544 159.392 544.064l322.592 1.152 0 319.168c0 17.696 14.336 32 32 32s32-14.304 32-32l0-318.944 317.088 1.12c0.064 0 0.096 0 0.128 0 17.632 0 31.936-14.24 32-31.904C895.264 496.992 880.96 482.624 863.328 482.56z" ></path></symbol><symbol id="icon-move" viewBox="0 0 1024 1024"><path d="M863.744 544 163.424 544c-17.664 0-32-14.336-32-32s14.336-32 32-32l700.32 0c17.696 0 32 14.336 32 32S881.44 544 863.744 544z" ></path></symbol><symbol id="icon-living" viewBox="0 0 1024 1024"><path d="M514.133333 488.533333m-106.666666 0a106.666667 106.666667 0 1 0 213.333333 0 106.666667 106.666667 0 1 0-213.333333 0Z" fill="" ></path><path d="M512 64C264.533333 64 64 264.533333 64 512c0 236.8 183.466667 428.8 416 445.866667v-134.4c-53.333333-59.733333-200.533333-230.4-200.533333-334.933334 0-130.133333 104.533333-234.666667 234.666666-234.666666s234.666667 104.533333 234.666667 234.666666c0 61.866667-49.066667 153.6-145.066667 270.933334l-59.733333 68.266666V960C776.533333 942.933333 960 748.8 960 512c0-247.466667-200.533333-448-448-448z" fill="" ></path></symbol></svg>', c = (c = document.getElementsByTagName("script"))[c.length - 1].getAttribute("data-injectcss");
4
- if (c && !e.__iconfont__svg__cssinject__) {
5
- e.__iconfont__svg__cssinject__ = !0;
1
+ (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".mind-elixir{--gap: 30px;--root-radius: 30px;--main-radius: 20px;--root-color: #ffffff;--root-bgcolor: #4c4f69;--main-color: #444446;--main-bgcolor: #ffffff;--topic-padding: 3px;--color: #777777;--bgcolor: #f6f6f6;--selected: #4dc4ff;--panel-color: #444446;--panel-bgcolor: #ffffff;--panel-border-color: #eaeaea;position:relative;-webkit-tap-highlight-color:rgba(0,0,0,0);font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,PingFang SC,Microsoft YaHei,Source Han Sans SC,Noto Sans CJK SC,WenQuanYi Micro Hei,sans-serif}.mind-elixir .hyper-link{text-decoration:none}.map-container{-webkit-user-select:none;user-select:none;height:100%;width:100%;overflow:scroll;font-size:15px}.map-container::-webkit-scrollbar{width:0px;height:0px}.map-container .selected{box-shadow:0 0 0 2px var(--selected)}.map-container .lhs{direction:rtl}.map-container .lhs me-tpc{direction:ltr}.map-container .map-canvas{height:20000px;width:20000px;position:relative;-webkit-user-select:none;user-select:none;transition:transform .3s;transform:scale(1);background-color:var(--bgcolor)}.map-container .map-canvas me-nodes{position:absolute;display:flex;justify-content:center;align-items:center;height:fit-content;width:fit-content}.map-container .map-canvas me-root{position:relative}.map-container .map-canvas me-root me-tpc{display:block;font-size:25px;line-height:1.2em;color:var(--root-color);padding:10px var(--gap);border-radius:var(--root-radius);white-space:pre-wrap;background-color:var(--root-bgcolor)}.map-container .map-canvas me-root me-tpc #input-box{padding:10px var(--gap)}.map-container me-main>me-wrapper{position:relative;margin:20px 65px}.map-container me-main>me-wrapper>me-parent{margin:var(--gap);padding:0}.map-container me-main>me-wrapper>me-parent>me-tpc{border-radius:var(--main-radius);background-color:var(--main-bgcolor);border:2px solid var(--main-color);color:var(--main-color);padding:8px var(--gap)}.map-container me-main>me-wrapper>me-parent>me-tpc #input-box{padding:8px var(--gap)}.map-container me-wrapper{display:block;pointer-events:none;width:fit-content}.map-container me-children,.map-container me-parent{display:inline-block;vertical-align:middle}.map-container me-parent{position:relative;cursor:pointer;padding:6px var(--gap);margin-top:10px}.map-container me-parent me-tpc{position:relative;display:block;border-radius:3px;color:var(--color);pointer-events:all;max-width:35em;white-space:pre-wrap;padding:var(--topic-padding);line-height:1.2em}.map-container me-parent me-tpc>div,.map-container me-parent me-tpc>span,.map-container me-parent me-tpc>img{pointer-events:none}.map-container me-parent me-tpc .insert-preview{position:absolute;width:100%;left:0;z-index:9}.map-container me-parent me-tpc .show{background:#7ad5ff;pointer-events:none;opacity:.7}.map-container me-parent me-tpc .before{height:14px;top:-14px}.map-container me-parent me-tpc .in{height:100%;top:0}.map-container me-parent me-tpc .after{height:14px;bottom:-14px}.map-container me-parent me-epd{position:absolute;height:18px;width:18px;opacity:.8;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgdD0iMTY1NjY1NDcxNzI0MiIgY2xhc3M9Imljb24iIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiIHZlcnNpb249IjEuMSIKICAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+CiAgICA8cGF0aCBkPSJNNTEyIDc0LjY2NjY2N0MyNzAuOTMzMzMzIDc0LjY2NjY2NyA3NC42NjY2NjcgMjcwLjkzMzMzMyA3NC42NjY2NjcgNTEyUzI3MC45MzMzMzMgOTQ5LjMzMzMzMyA1MTIgOTQ5LjMzMzMzMyA5NDkuMzMzMzMzIDc1My4wNjY2NjcgOTQ5LjMzMzMzMyA1MTIgNzUzLjA2NjY2NyA3NC42NjY2NjcgNTEyIDc0LjY2NjY2N3oiIHN0cm9rZS13aWR0aD0iNTQiIHN0cm9rZT0nYmxhY2snIGZpbGw9J3doaXRlJyA+PC9wYXRoPgogICAgPHBhdGggZD0iTTY4Mi42NjY2NjcgNDgwaC0xMzguNjY2NjY3VjM0MS4zMzMzMzNjMC0xNy4wNjY2NjctMTQuOTMzMzMzLTMyLTMyLTMycy0zMiAxNC45MzMzMzMtMzIgMzJ2MTM4LjY2NjY2N0gzNDEuMzMzMzMzYy0xNy4wNjY2NjcgMC0zMiAxNC45MzMzMzMtMzIgMzJzMTQuOTMzMzMzIDMyIDMyIDMyaDEzOC42NjY2NjdWNjgyLjY2NjY2N2MwIDE3LjA2NjY2NyAxNC45MzMzMzMgMzIgMzIgMzJzMzItMTQuOTMzMzMzIDMyLTMydi0xMzguNjY2NjY3SDY4Mi42NjY2NjdjMTcuMDY2NjY3IDAgMzItMTQuOTMzMzMzIDMyLTMycy0xNC45MzMzMzMtMzItMzItMzJ6Ij48L3BhdGg+Cjwvc3ZnPg==);background-repeat:no-repeat;background-size:contain;background-position:center;pointer-events:all;z-index:9}.map-container me-parent me-epd.minus{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgdD0iMTY1NjY1NTU2NDk4NSIgY2xhc3M9Imljb24iIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiIHZlcnNpb249IjEuMSIKICAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+CiAgICA8cGF0aCBkPSJNNTEyIDc0LjY2NjY2N0MyNzAuOTMzMzMzIDc0LjY2NjY2NyA3NC42NjY2NjcgMjcwLjkzMzMzMyA3NC42NjY2NjcgNTEyUzI3MC45MzMzMzMgOTQ5LjMzMzMzMyA1MTIgOTQ5LjMzMzMzMyA5NDkuMzMzMzMzIDc1My4wNjY2NjcgOTQ5LjMzMzMzMyA1MTIgNzUzLjA2NjY2NyA3NC42NjY2NjcgNTEyIDc0LjY2NjY2N3oiIHN0cm9rZS13aWR0aD0iNTQiIHN0cm9rZT0nYmxhY2snIGZpbGw9J3doaXRlJyA+PC9wYXRoPgogICAgPHBhdGggZD0iTTY4Mi42NjY2NjcgNTQ0SDM0MS4zMzMzMzNjLTE3LjA2NjY2NyAwLTMyLTE0LjkzMzMzMy0zMi0zMnMxNC45MzMzMzMtMzIgMzItMzJoMzQxLjMzMzMzNGMxNy4wNjY2NjcgMCAzMiAxNC45MzMzMzMgMzIgMzJzLTE0LjkzMzMzMyAzMi0zMiAzMnoiPjwvcGF0aD4KPC9zdmc+)!important;transition:opacity .3s;opacity:0}.map-container me-parent me-epd.minus:hover{opacity:.8}.map-container .icon{width:1em;height:1em;vertical-align:-.15em;fill:currentColor;overflow:hidden}.map-container .lines,.map-container .summary,.map-container .subLines,.map-container .topiclinks,.map-container .linkcontroller{position:absolute;height:102%;width:100%;top:0;left:0}.map-container .topiclinks,.map-container .linkcontroller,.map-container .summary{pointer-events:none}.map-container .topiclinks text,.map-container .linkcontroller text,.map-container .summary text{pointer-events:all}.map-container .topiclinks .selected,.map-container .linkcontroller .selected,.map-container .summary .selected{pointer-events:none}.map-container .lines,.map-container .subLines{pointer-events:none;z-index:-1}.map-container .topiclinks *,.map-container .linkcontroller *{z-index:100}.map-container .topiclinks g{cursor:pointer}.map-container #input-box{position:absolute;top:0;left:0;padding:var(--topic-padding);color:var(--color);background-color:var(--bgcolor);width:max-content;max-width:35em;z-index:11;direction:ltr;-webkit-user-select:auto;user-select:auto;pointer-events:all}.map-container me-tpc>img{pointer-events:none;display:block;margin-top:8px}.map-container .circle{position:absolute;height:10px;width:10px;margin-top:-5px;margin-left:-5px;border-radius:100%;background:#aaa;cursor:pointer}.map-container .tags{direction:ltr}.map-container .tags span{display:inline-block;border-radius:3px;padding:2px 4px;background:#d6f0f8;color:#276f86;margin:2px 3px 0 0;font-size:12px;line-height:1.3em}.map-container .icons{display:inline-block;direction:ltr;margin-right:10px}.map-container .icons span{display:inline-block}.map-container .mind-elixir-ghost{position:fixed;top:-100%;left:-100%;box-sizing:content-box;opacity:.5;background-color:#f6f6f6;max-width:200px;width:fit-content;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:8px 16px;border-radius:6px;border:#666666 2px solid}.selection-area{background:#4f90f22d;border:1px solid #4f90f2}.mind-elixir .context-menu{position:fixed;top:0;left:0;width:100%;height:100%;z-index:99}.mind-elixir .context-menu .menu-list{position:fixed;list-style:none;margin:0;padding:0;font:300 15px Roboto,sans-serif;color:var(--panel-color);box-shadow:0 12px 15px #0003}.mind-elixir .context-menu .menu-list li{min-width:200px;overflow:hidden;white-space:nowrap;padding:10px 14px;background:var(--panel-bgcolor);border-bottom:1px solid var(--panel-border-color)}.mind-elixir .context-menu .menu-list li a{color:#333;text-decoration:none}.mind-elixir .context-menu .menu-list li.disabled{display:none;color:#5e5e5e;background-color:#f7f7f7}.mind-elixir .context-menu .menu-list li.disabled:hover{cursor:default;background-color:#f7f7f7}.mind-elixir .context-menu .menu-list li:hover{cursor:pointer;filter:brightness(.9)}.mind-elixir .context-menu .menu-list li:first-child{border-radius:5px 5px 0 0}.mind-elixir .context-menu .menu-list li:last-child{border-bottom:0;border-radius:0 0 5px 5px}.mind-elixir .context-menu .menu-list li span:last-child{float:right}.mind-elixir .tips{position:absolute;bottom:20px;left:50%;transform:translate(-50%);color:var(--panel-color);font-weight:bolder}.mind-elixir .mobile-menu{position:absolute;left:20px;bottom:70px;z-index:99;margin:0;padding:0;color:#333;border-radius:5px;box-shadow:0 12px 15px #0003;overflow:hidden}.mind-elixir .mobile-menu *{transition:color .4s,background-color .4s}.mind-elixir .mobile-menu div{float:left;text-align:center;width:30px;overflow:hidden;white-space:nowrap;padding:8px;background-color:#fff;border-bottom:1px solid #ecf0f1}.mind-elixir .mobile-menu div a{color:#333;text-decoration:none}.mind-elixir .mobile-menu div.disabled{color:#5e5e5e;background-color:#f7f7f7}.mind-elixir .mobile-menu div.disabled:hover{cursor:default;background-color:#f7f7f7}.mind-elixir .mobile-menu div:hover{cursor:pointer;background-color:#ecf0f1}.mind-elixir-toolbar{font-family:iconfont;position:absolute;color:var(--panel-color);background:var(--panel-bgcolor);padding:10px;border-radius:5px;box-shadow:0 1px 2px #0003}.mind-elixir-toolbar svg{display:inline-block}.mind-elixir-toolbar span:active{opacity:.5}.mind-elixir-toolbar.rb{right:20px;bottom:20px}.mind-elixir-toolbar.rb span+span{margin-left:10px}.mind-elixir-toolbar.lt{font-size:20px;left:20px;top:20px}.mind-elixir-toolbar.lt span{display:block}.mind-elixir-toolbar.lt span+span{margin-top:10px}")),document.head.appendChild(e)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();
2
+ (function(t) {
3
+ var e, n, i, o, s, r, l = '<svg><symbol id="icon-edit" viewBox="0 0 1024 1024"><path d="M423.765333 128a42.666667 42.666667 0 0 1 3.2 85.205333L423.765333 213.333333H234.666667a64 64 0 0 0-63.872 60.245334L170.666667 277.333333v512a64 64 0 0 0 60.245333 63.872L234.666667 853.333333h512a64 64 0 0 0 63.872-60.245333L810.666667 789.333333v-189.098666a42.666667 42.666667 0 0 1 85.205333-3.2l0.128 3.2V789.333333a149.333333 149.333333 0 0 1-144.213333 149.248L746.666667 938.666667h-512a149.333333 149.333333 0 0 1-149.248-144.213334L85.333333 789.333333v-512a149.333333 149.333333 0 0 1 144.213334-149.248L234.666667 128h189.098666z m324.949334-53.248a42.666667 42.666667 0 0 1 60.330666 0l150.869334 150.869333a42.666667 42.666667 0 0 1 0 60.330667l-329.386667 329.386667a42.666667 42.666667 0 0 1-29.44 12.458666l-153.386667 2.517334a42.666667 42.666667 0 0 1-43.349333-43.349334l2.56-153.386666a42.666667 42.666667 0 0 1 12.458667-29.44z m30.165333 90.496L491.946667 452.266667l-1.493334 91.989333 92.032-1.493333 286.976-286.976-90.538666-90.538667z" ></path></symbol><symbol id="icon-rising" viewBox="0 0 1024 1024"><path d="M553.173333 803.84h-64l0.021334-474.581333-224.021334 224-45.269333-45.226667L521.6 206.293333l301.717333 301.696-45.269333 45.269334-224.853333-224.896v475.477333z" ></path></symbol><symbol id="icon-falling" viewBox="0 0 1024 1024"><path d="M553.173333 238.314667h-64l0.021334 474.602666-224.021334-224-45.269333 45.226667L521.6 835.861333l301.717333-301.717333-45.269333-45.226667-224.853333 224.853334V238.336z" ></path></symbol><symbol id="icon-shanchu2" viewBox="0 0 1024 1024"><path d="M516.60601807 107.93026734c-82.64382935 0-149.71865844 65.51751709-152.5729065 147.77160644H171.37136841c-21.40603638 0-38.92044068 17.38504028-38.92044068 38.92126465 0 21.40686036 17.38504028 38.92208862 38.92126466 38.92208862h42.94308471v435.40136719c0 81.73498536 55.39828492 148.55026245 123.90106201 148.55026245h348.99444581c68.37341309 0 123.90106201-66.42553711 123.901062-148.55026245V333.80477906h38.92126465c21.40686036 0 38.92126464-17.38586426 38.92126465-38.92208863 0-21.40686036-17.38504028-38.92126464-38.92126465-38.92126465H668.91854859C666.45321656 173.44860839 599.24902344 107.93109131 516.60601807 107.93109131z m-79.65939331 147.77160644c2.85424805-42.16442872 37.2354126-74.85809326 79.78875732-74.85809326s76.93450927 32.82302857 79.39984131 74.85809326H436.94662476z m-98.86047364 589.01165771c-24.2611084 0-50.98754883-31.13717651-50.98754883-75.76693725V333.80477906h450.97036744V769.33551026c0 44.50039673-26.72644043 75.76776123-50.98754884 75.76776122H338.08615112v-0.38973999z m0 0" ></path><path d="M390.37063599 751.17263794c17.77313232 0 32.43411255-17.7739563 32.43411255-40.08883667V482.35504151c0-22.31488037-14.53079224-40.08966065-32.43411255-40.08966065-17.77478027 0-32.43493653 17.77478027-32.43493653 40.08966065v228.72875976c0 22.18469239 14.27124023 40.08883667 32.43493653 40.08883667z m117.41308594 0c17.7739563 0 32.43411255-17.7739563 32.43411255-40.08883667V482.35504151c0-22.31488037-14.53079224-40.08966065-32.43411255-40.08966065-17.7739563 0-32.43493653 17.77478027-32.43493653 40.08966065v228.72875976c0 22.18469239 14.66098023 40.08883667 32.43493653 40.08883667z m123.51049804 0c17.7739563 0 32.43493653-17.7739563 32.43493652-40.08883667V482.35504151c0-22.31488037-14.53079224-40.08966065-32.43493652-40.08966065-17.7739563 0-32.43411255 17.77478027-32.43411255 40.08966065v228.72875976c0 22.18469239 14.14105224 40.08883667 32.43411255 40.08883667z m0 0" ></path></symbol><symbol id="icon-zijiedian" viewBox="0 0 1024 1024"><path d="M312.208 472c19.568-157.856 153.432-280 315.656-280 175.68 0 318.112 143.272 318.112 320S803.552 832 627.864 832c-162.224 0-296.08-122.144-315.656-280H120a40 40 0 0 1 0-80h192.208zM632 752c132.552 0 240-107.448 240-240 0-132.552-107.448-240-240-240-132.552 0-240 107.448-240 240 0 132.552 107.448 240 240 240z m-40-280v-80a40 40 0 0 1 80 0v80h80a40 40 0 0 1 0 80h-80v80a40 40 0 0 1-80 0v-80h-80a40 40 0 0 1 0-80h80z" ></path></symbol><symbol id="icon-tongjijiedian-" viewBox="0 0 1024 1024"><path d="M803.84 131.626667H410.24A59.733333 59.733333 0 0 0 350.506667 192v45.226667H199.68a51.626667 51.626667 0 0 0-51.626667 51.626666v465.92a51.626667 51.626667 0 0 0 51.626667 51.626667h187.52v-55.466667h-162.133333a21.333333 21.333333 0 0 1-21.333334-21.333333V313.386667a21.333333 21.333333 0 0 1 21.333334-21.333334h125.653333v64a59.733333 59.733333 0 0 0 59.733333 59.733334h393.386667a59.733333 59.733333 0 0 0 59.733333-59.733334V192a59.733333 59.733333 0 0 0-59.733333-60.373333z m4.266667 224.64a4.266667 4.266667 0 0 1-4.266667 4.266666H410.24a4.266667 4.266667 0 0 1-4.266667-4.266666V192a4.266667 4.266667 0 0 1 4.266667-4.266667h393.6a4.266667 4.266667 0 0 1 4.266667 4.266667zM716.16 749.44h-81.28v-81.493333a27.733333 27.733333 0 0 0-55.466667 0v81.28h-81.493333a27.733333 27.733333 0 1 0 0 55.466666h81.28v81.28a27.733333 27.733333 0 1 0 55.466667 0v-81.066666h81.28a27.733333 27.733333 0 0 0 0-55.466667z" ></path></symbol><symbol id="icon-close" viewBox="0 0 1024 1024"><path d="M557.312 513.248l265.28-263.904c12.544-12.48 12.608-32.704 0.128-45.248-12.512-12.576-32.704-12.608-45.248-0.128L512.128 467.904l-263.04-263.84c-12.448-12.48-32.704-12.544-45.248-0.064-12.512 12.48-12.544 32.736-0.064 45.28l262.976 263.776L201.6 776.8c-12.544 12.48-12.608 32.704-0.128 45.248a31.937 31.937 0 0 0 22.688 9.44c8.16 0 16.32-3.104 22.56-9.312l265.216-263.808 265.44 266.24c6.24 6.272 14.432 9.408 22.656 9.408a31.94 31.94 0 0 0 22.592-9.344c12.512-12.48 12.544-32.704 0.064-45.248L557.312 513.248z" fill="" ></path></symbol><symbol id="icon-menu" viewBox="0 0 1024 1024"><path d="M109.714 292.571h804.572c21.943 0 36.571-21.942 36.571-43.885 0-14.629-14.628-29.257-36.571-29.257H109.714c-21.943 0-36.571 14.628-36.571 36.571 0 14.629 14.628 36.571 36.571 36.571zM914.286 512H109.714c-21.943 0-36.571 14.629-36.571 36.571 0 14.629 14.628 36.572 36.571 36.572h804.572c21.943 0 36.571-21.943 36.571-43.886 0-14.628-14.628-29.257-36.571-29.257z m0 292.571H109.714c-21.943 0-36.571 14.629-36.571 36.572s14.628 36.571 36.571 36.571h804.572c21.943 0 36.571-21.943 36.571-36.571 0-21.943-14.628-36.572-36.571-36.572z" ></path></symbol><symbol id="icon-right" viewBox="0 0 1024 1024"><path d="M385 560.69999999L385 738.9c0 36.90000001 26.4 68.5 61.3 68.5l150.2 0c1.5 0 3-0.1 4.5-0.3 10.2 38.7 45.5 67.3 87.5 67.3 50 0 90.5-40.5 90.5-90.5s-40.5-90.5-90.5-90.5c-42 0-77.3 28.6-87.5 67.39999999-1.4-0.3-2.9-0.4-4.5-0.39999999L446.3 760.4c-6.8 0-14.3-8.9-14.3-21.49999999l0-427.00000001c0-12.7 7.40000001-21.5 14.30000001-21.5l150.19999999 0c1.5 0 3-0.2 4.5-0.4 10.2 38.8 45.5 67.3 87.5 67.3 50 0 90.5-40.5 90.5-90.4 0-49.9-40.5-90.6-90.5-90.59999999-42 0-77.3 28.6-87.5 67.39999999-1.4-0.2-2.9-0.4-4.49999999-0.4L446.3 243.3c-34.80000001 0-61.3 31.6-61.3 68.50000001L385 513.7l-79.1 0c-10.4-38.5-45.49999999-67-87.4-67-50 0-90.5 40.5-90.5 90.5s40.5 90.5 90.5 90.5c41.79999999 0 77.00000001-28.4 87.4-67L385 560.69999999z" fill="" ></path></symbol><symbol id="icon-left" viewBox="0 0 1024 1024"><path d="M639 463.30000001L639 285.1c0-36.90000001-26.4-68.5-61.3-68.5l-150.2 0c-1.5 0-3 0.1-4.5 0.3-10.2-38.7-45.5-67.3-87.5-67.3-50 0-90.5 40.5-90.5 90.5s40.5 90.5 90.5 90.5c42 0 77.3-28.6 87.5-67.39999999 1.4 0.3 2.9 0.4 4.5 0.39999999L577.7 263.6c6.8 0 14.3 8.9 14.3 21.49999999l0 427.00000001c0 12.7-7.40000001 21.5-14.30000001 21.5l-150.19999999 0c-1.5 0-3 0.2-4.5 0.4-10.2-38.8-45.5-67.3-87.5-67.3-50 0-90.5 40.5-90.5 90.4 0 49.9 40.5 90.6 90.5 90.59999999 42 0 77.3-28.6 87.5-67.39999999 1.4 0.2 2.9 0.4 4.49999999 0.4L577.7 780.7c34.80000001 0 61.3-31.6 61.3-68.50000001L639 510.3l79.1 0c10.4 38.5 45.49999999 67 87.4 67 50 0 90.5-40.5 90.5-90.5s-40.5-90.5-90.5-90.5c-41.79999999 0-77.00000001 28.4-87.4 67L639 463.30000001z" fill="" ></path></symbol><symbol id="icon-side" viewBox="0 0 1024 1024"><path d="M851.91168 328.45312c-59.97056 0-108.6208 48.47104-108.91264 108.36992l-137.92768 38.4a109.14304 109.14304 0 0 0-63.46752-46.58688l1.39264-137.11872c47.29344-11.86816 82.31936-54.66624 82.31936-105.64096 0-60.15488-48.76288-108.91776-108.91776-108.91776s-108.91776 48.76288-108.91776 108.91776c0 49.18784 32.60928 90.75712 77.38368 104.27392l-1.41312 138.87488a109.19936 109.19936 0 0 0-63.50336 48.55808l-138.93632-39.48544 0.01024-0.72704c0-60.15488-48.76288-108.91776-108.91776-108.91776s-108.91776 48.75776-108.91776 108.91776c0 60.15488 48.76288 108.91264 108.91776 108.91264 39.3984 0 73.91232-20.92032 93.03552-52.2496l139.19232 39.552-0.00512 0.2304c0 25.8304 9.00096 49.5616 24.02816 68.23424l-90.14272 132.63872a108.7488 108.7488 0 0 0-34.2528-5.504c-60.15488 0-108.91776 48.768-108.91776 108.91776 0 60.16 48.76288 108.91776 108.91776 108.91776 60.16 0 108.92288-48.75776 108.92288-108.91776 0-27.14624-9.9328-51.968-26.36288-71.04l89.04704-131.03104a108.544 108.544 0 0 0 37.6832 6.70208 108.672 108.672 0 0 0 36.48512-6.272l93.13792 132.57216a108.48256 108.48256 0 0 0-24.69888 69.0688c0 60.16 48.768 108.92288 108.91776 108.92288 60.16 0 108.91776-48.76288 108.91776-108.92288 0-60.14976-48.75776-108.91776-108.91776-108.91776a108.80512 108.80512 0 0 0-36.69504 6.3488l-93.07136-132.48a108.48768 108.48768 0 0 0 24.79616-72.22784l136.09984-37.888c18.99008 31.93856 53.84192 53.3504 93.69088 53.3504 60.16 0 108.92288-48.75776 108.92288-108.91264-0.00512-60.15488-48.77312-108.92288-108.92288-108.92288z" ></path></symbol><symbol id="icon-B" viewBox="0 0 1024 1024"><path d="M98.067692 65.457231H481.28c75.854769 0 132.411077 3.150769 169.668923 9.452307 37.336615 6.301538 70.656 19.534769 100.036923 39.620924 29.459692 20.007385 53.956923 46.710154 73.570462 80.029538 19.692308 33.398154 29.459692 70.734769 29.459692 112.167385 0 44.898462-12.130462 86.094769-36.233846 123.588923a224.886154 224.886154 0 0 1-98.461539 84.283077c58.368 17.092923 103.266462 46.08 134.695385 87.04 31.350154 40.96 47.025231 89.088 47.025231 144.462769 0 43.638154-10.082462 86.016-30.404923 127.212308-20.243692 41.196308-47.891692 74.043077-83.02277 98.697846-35.052308 24.654769-78.296615 39.778462-129.732923 45.449846-32.295385 3.465846-110.119385 5.671385-233.472 6.537846H98.067692V65.457231z m193.536 159.507692V446.621538h126.818462c75.460923 0 122.328615-1.024 140.603077-3.229538 33.083077-3.938462 59.155692-15.36 78.139077-34.343385 18.904615-18.904615 28.435692-43.874462 28.435692-74.830769 0-29.696-8.192-53.720615-24.497231-72.310154-16.384-18.510769-40.644923-29.696-72.940307-33.634461-19.140923-2.205538-74.279385-3.308308-165.415385-3.308308h-111.064615z m0 381.243077v256.315077h179.2c69.710769 0 113.979077-1.969231 132.726154-5.907692 28.750769-5.198769 52.145231-17.959385 70.262154-38.281847 18.116923-20.243692 27.096615-47.340308 27.096615-81.368615 0-28.750769-6.931692-53.169231-20.873846-73.255385a118.232615 118.232615 0 0 0-60.494769-43.795692c-26.387692-9.137231-83.574154-13.705846-171.638154-13.705846H291.603692z" ></path></symbol><symbol id="icon-a" viewBox="0 0 1024 1024"><path d="M757.76 665.6q0 20.48 1.536 34.304t7.68 22.016 18.944 12.288 34.304 4.096q-3.072 25.6-15.36 44.032-11.264 16.384-33.28 29.696t-62.976 13.312q-11.264 0-20.48-0.512t-17.408-2.56l-6.144-2.048-1.024 0q-4.096-1.024-10.24-4.096-2.048-2.048-4.096-2.048-1.024-1.024-2.048-1.024-14.336-8.192-23.552-17.408t-14.336-17.408q-6.144-10.24-9.216-20.48-63.488 75.776-178.176 75.776-48.128 0-88.064-15.36t-69.12-44.032-45.056-68.096-15.872-88.576 16.896-89.088 47.616-67.584 74.24-42.496 96.768-14.848q48.128 0 88.576 17.408t66.048 49.152q0-8.192 0.512-16.384t0.512-15.36q0-71.68-39.936-104.448t-128-32.768q-43.008 0-84.992 6.656t-84.992 17.92q14.336-28.672 25.088-47.616t24.064-29.184q30.72-24.576 158.72-24.576 79.872 0 135.168 13.824t90.624 43.52 51.2 75.264 15.872 108.032l0 200.704zM487.424 743.424q50.176 0 79.872-33.28t29.696-95.744q0-61.44-28.672-93.696t-76.8-32.256q-52.224 0-82.944 33.28t-30.72 94.72q0 58.368 31.744 92.672t77.824 34.304z" ></path></symbol><symbol id="icon-full" viewBox="0 0 1024 1024"><path d="M639.328 416c8.032 0 16.096-3.008 22.304-9.056l202.624-197.184-0.8 143.808c-0.096 17.696 14.144 32.096 31.808 32.192 0.064 0 0.128 0 0.192 0 17.6 0 31.904-14.208 32-31.808l1.248-222.208c0-0.672-0.352-1.248-0.384-1.92 0.032-0.512 0.288-0.896 0.288-1.408 0.032-17.664-14.272-32-31.968-32.032L671.552 96l-0.032 0c-17.664 0-31.968 14.304-32 31.968C639.488 145.632 653.824 160 671.488 160l151.872 0.224-206.368 200.8c-12.672 12.32-12.928 32.608-0.64 45.248C622.656 412.736 630.976 416 639.328 416z" ></path><path d="M896.032 639.552 896.032 639.552c-17.696 0-32 14.304-32.032 31.968l-0.224 151.872-200.832-206.4c-12.32-12.64-32.576-12.96-45.248-0.64-12.672 12.352-12.928 32.608-0.64 45.248l197.184 202.624-143.808-0.8c-0.064 0-0.128 0-0.192 0-17.6 0-31.904 14.208-32 31.808-0.096 17.696 14.144 32.096 31.808 32.192l222.24 1.248c0.064 0 0.128 0 0.192 0 0.64 0 1.12-0.32 1.76-0.352 0.512 0.032 0.896 0.288 1.408 0.288l0.032 0c17.664 0 31.968-14.304 32-31.968L928 671.584C928.032 653.952 913.728 639.584 896.032 639.552z" ></path><path d="M209.76 159.744l143.808 0.8c0.064 0 0.128 0 0.192 0 17.6 0 31.904-14.208 32-31.808 0.096-17.696-14.144-32.096-31.808-32.192L131.68 95.328c-0.064 0-0.128 0-0.192 0-0.672 0-1.248 0.352-1.888 0.384-0.448 0-0.8-0.256-1.248-0.256 0 0-0.032 0-0.032 0-17.664 0-31.968 14.304-32 31.968L96 352.448c-0.032 17.664 14.272 32 31.968 32.032 0 0 0.032 0 0.032 0 17.664 0 31.968-14.304 32-31.968l0.224-151.936 200.832 206.4c6.272 6.464 14.624 9.696 22.944 9.696 8.032 0 16.096-3.008 22.304-9.056 12.672-12.32 12.96-32.608 0.64-45.248L209.76 159.744z" ></path><path d="M362.368 617.056l-202.624 197.184 0.8-143.808c0.096-17.696-14.144-32.096-31.808-32.192-0.064 0-0.128 0-0.192 0-17.6 0-31.904 14.208-32 31.808l-1.248 222.24c0 0.704 0.352 1.312 0.384 2.016 0 0.448-0.256 0.832-0.256 1.312-0.032 17.664 14.272 32 31.968 32.032L352.448 928c0 0 0.032 0 0.032 0 17.664 0 31.968-14.304 32-31.968s-14.272-32-31.968-32.032l-151.936-0.224 206.4-200.832c12.672-12.352 12.96-32.608 0.64-45.248S375.008 604.704 362.368 617.056z" ></path></symbol><symbol id="icon-add" viewBox="0 0 1024 1024"><path d="M863.328 482.56l-317.344-1.12L545.984 162.816c0-17.664-14.336-32-32-32s-32 14.336-32 32l0 318.4L159.616 480.064c-0.032 0-0.064 0-0.096 0-17.632 0-31.936 14.24-32 31.904C127.424 529.632 141.728 544 159.392 544.064l322.592 1.152 0 319.168c0 17.696 14.336 32 32 32s32-14.304 32-32l0-318.944 317.088 1.12c0.064 0 0.096 0 0.128 0 17.632 0 31.936-14.24 32-31.904C895.264 496.992 880.96 482.624 863.328 482.56z" ></path></symbol><symbol id="icon-move" viewBox="0 0 1024 1024"><path d="M863.744 544 163.424 544c-17.664 0-32-14.336-32-32s14.336-32 32-32l700.32 0c17.696 0 32 14.336 32 32S881.44 544 863.744 544z" ></path></symbol><symbol id="icon-living" viewBox="0 0 1024 1024"><path d="M514.133333 488.533333m-106.666666 0a106.666667 106.666667 0 1 0 213.333333 0 106.666667 106.666667 0 1 0-213.333333 0Z" fill="" ></path><path d="M512 64C264.533333 64 64 264.533333 64 512c0 236.8 183.466667 428.8 416 445.866667v-134.4c-53.333333-59.733333-200.533333-230.4-200.533333-334.933334 0-130.133333 104.533333-234.666667 234.666666-234.666666s234.666667 104.533333 234.666667 234.666666c0 61.866667-49.066667 153.6-145.066667 270.933334l-59.733333 68.266666V960C776.533333 942.933333 960 748.8 960 512c0-247.466667-200.533333-448-448-448z" fill="" ></path></symbol></svg>', c = (c = document.getElementsByTagName("script"))[c.length - 1].getAttribute("data-injectcss");
4
+ if (c && !t.__iconfont__svg__cssinject__) {
5
+ t.__iconfont__svg__cssinject__ = !0;
6
6
  try {
7
7
  document.write(
8
8
  "<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>"
9
9
  );
10
- } catch (d) {
11
- console && console.log(d);
10
+ } catch (a) {
11
+ console && console.log(a);
12
12
  }
13
13
  }
14
- function u() {
15
- o || (o = !0, i());
14
+ function h() {
15
+ s || (s = !0, i());
16
16
  }
17
- t = function() {
18
- var d, h, a, p;
19
- (p = document.createElement("div")).innerHTML = l, l = null, (a = p.getElementsByTagName("svg")[0]) && (a.setAttribute("aria-hidden", "true"), a.style.position = "absolute", a.style.width = 0, a.style.height = 0, a.style.overflow = "hidden", d = a, (h = document.body).firstChild ? (p = d, (a = h.firstChild).parentNode.insertBefore(p, a)) : h.appendChild(d));
20
- }, document.addEventListener ? ~["complete", "loaded", "interactive"].indexOf(document.readyState) ? setTimeout(t, 0) : (n = function() {
21
- document.removeEventListener("DOMContentLoaded", n, !1), t();
22
- }, document.addEventListener("DOMContentLoaded", n, !1)) : document.attachEvent && (i = t, s = e.document, o = !1, (r = function() {
17
+ e = function() {
18
+ var a, u, d, p;
19
+ (p = document.createElement("div")).innerHTML = l, l = 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", a = d, (u = document.body).firstChild ? (p = a, (d = u.firstChild).parentNode.insertBefore(p, d)) : u.appendChild(a));
20
+ }, document.addEventListener ? ~["complete", "loaded", "interactive"].indexOf(document.readyState) ? setTimeout(e, 0) : (n = function() {
21
+ document.removeEventListener("DOMContentLoaded", n, !1), e();
22
+ }, document.addEventListener("DOMContentLoaded", n, !1)) : document.attachEvent && (i = e, o = t.document, s = !1, (r = function() {
23
23
  try {
24
- s.documentElement.doScroll("left");
24
+ o.documentElement.doScroll("left");
25
25
  } catch {
26
26
  return void setTimeout(r, 50);
27
27
  }
28
- u();
29
- })(), s.onreadystatechange = function() {
30
- s.readyState == "complete" && (s.onreadystatechange = null, u());
28
+ h();
29
+ })(), o.onreadystatechange = function() {
30
+ o.readyState == "complete" && (o.onreadystatechange = null, h());
31
31
  });
32
32
  })(window);
33
- const S = 0, R = 1, I = 2, T = 30, L = 8, _e = {
33
+ const S = 0, H = 1, K = 2, M = 30, L = 8, Se = {
34
34
  name: "Latte",
35
35
  palette: ["#dd7878", "#ea76cb", "#8839ef", "#e64553", "#fe640b", "#df8e1d", "#40a02b", "#209fb5", "#1e66f5", "#7287fd"],
36
36
  cssVar: {
@@ -42,7 +42,7 @@ const S = 0, R = 1, I = 2, T = 30, L = 8, _e = {
42
42
  "--panel-bgcolor": "#ffffff",
43
43
  "--panel-border-color": "#eaeaea"
44
44
  }
45
- }, we = {
45
+ }, Le = {
46
46
  name: "Dark",
47
47
  palette: ["#848FA0", "#748BE9", "#D2F9FE", "#4145A5", "#789AFA", "#706CF4", "#EF987F", "#775DD5", "#FCEECF", "#DA7FBC"],
48
48
  cssVar: {
@@ -55,424 +55,435 @@ const S = 0, R = 1, I = 2, T = 30, L = 8, _e = {
55
55
  "--panel-border-color": "#696969"
56
56
  }
57
57
  };
58
- function J(e) {
59
- return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/"/g, "&quot;");
58
+ function ee(t) {
59
+ return t.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/"/g, "&quot;");
60
60
  }
61
- const Ye = () => /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent), ke = function(e, t) {
62
- if (t.id === e)
63
- return t;
64
- if (t.children && t.children.length) {
65
- for (let n = 0; n < t.children.length; n++) {
66
- const i = ke(e, t.children[n]);
61
+ const Xe = () => /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent), Me = function(t, e) {
62
+ if (e.id === t)
63
+ return e;
64
+ if (e.children && e.children.length) {
65
+ for (let n = 0; n < e.children.length; n++) {
66
+ const i = Me(t, e.children[n]);
67
67
  if (i)
68
68
  return i;
69
69
  }
70
70
  return null;
71
71
  } else
72
72
  return null;
73
- }, $ = (e, t) => {
74
- if (e.parent = t, e.children)
75
- for (let n = 0; n < e.children.length; n++)
76
- $(e.children[n], e);
73
+ }, T = (t, e) => {
74
+ if (t.parent = e, t.children)
75
+ for (let n = 0; n < t.children.length; n++)
76
+ T(t.children[n], t);
77
77
  };
78
- function Se(e) {
79
- if (e.id = K(), e.children)
80
- for (let t = 0; t < e.children.length; t++)
81
- Se(e.children[t]);
78
+ function Te(t) {
79
+ if (t.id = U(), t.children)
80
+ for (let e = 0; e < t.children.length; e++)
81
+ Te(t.children[e]);
82
82
  }
83
- const We = (e, t) => {
83
+ const Ke = (t, e) => {
84
84
  let n = Date.now();
85
85
  return function(...i) {
86
- Date.now() - n >= t && (e(...i), n = Date.now());
86
+ Date.now() - n >= e && (t(...i), n = Date.now());
87
87
  };
88
88
  };
89
- function Me(e, t, n, i) {
90
- const s = i - t, o = e - n;
91
- let r = Math.atan(Math.abs(s) / Math.abs(o)) / 3.14 * 180;
92
- o < 0 && s > 0 && (r = 180 - r), o < 0 && s < 0 && (r = 180 + r), o > 0 && s < 0 && (r = 360 - r);
93
- const l = 20, c = 30, u = r + c, d = r - c;
89
+ function $e(t, e, n, i) {
90
+ const o = i - e, s = t - n;
91
+ let r = Math.atan(Math.abs(o) / Math.abs(s)) / 3.14 * 180;
92
+ s < 0 && o > 0 && (r = 180 - r), s < 0 && o < 0 && (r = 180 + r), s > 0 && o < 0 && (r = 360 - r);
93
+ const l = 15, c = 30, h = r + c, a = r - c;
94
94
  return {
95
- x1: n + Math.cos(Math.PI * u / 180) * l,
96
- y1: i - Math.sin(Math.PI * u / 180) * l,
97
- x2: n + Math.cos(Math.PI * d / 180) * l,
98
- y2: i - Math.sin(Math.PI * d / 180) * l
95
+ x1: n + Math.cos(Math.PI * h / 180) * l,
96
+ y1: i - Math.sin(Math.PI * h / 180) * l,
97
+ x2: n + Math.cos(Math.PI * a / 180) * l,
98
+ y2: i - Math.sin(Math.PI * a / 180) * l
99
99
  };
100
100
  }
101
- function ne(e, t, n) {
102
- let i, s;
103
- const o = (e.cy - n) / (t - e.cx);
104
- return o > e.h / e.w || o < -e.h / e.w ? e.cy - n < 0 ? (i = e.cx - e.h / 2 / o, s = e.cy + e.h / 2) : (i = e.cx + e.h / 2 / o, s = e.cy - e.h / 2) : e.cx - t < 0 ? (i = e.cx + e.w / 2, s = e.cy - e.w * o / 2) : (i = e.cx - e.w / 2, s = e.cy + e.w * o / 2), {
105
- x: i,
106
- y: s
107
- };
108
- }
109
- function ie(e, t, n) {
110
- let i, s;
111
- const o = (e.cy - n) / (t - e.cx);
112
- return o > e.h / e.w || o < -e.h / e.w ? e.cy - n < 0 ? (i = e.cx - e.h / 2 / o, s = e.cy + e.h / 2) : (i = e.cx + e.h / 2 / o, s = e.cy - e.h / 2) : e.cx - t < 0 ? (i = e.cx + e.w / 2, s = e.cy - e.w * o / 2) : (i = e.cx - e.w / 2, s = e.cy + e.w * o / 2), {
113
- x: i,
114
- y: s
115
- };
116
- }
117
- function K() {
101
+ function U() {
118
102
  return ((/* @__PURE__ */ new Date()).getTime().toString(16) + Math.random().toString(16).substr(2)).substr(2, 16);
119
103
  }
120
- const Xe = function() {
121
- const e = K();
104
+ const Ue = function() {
105
+ const t = U();
122
106
  return {
123
107
  topic: this.newTopicName,
124
- id: e
108
+ id: t
125
109
  };
126
110
  };
127
- function Ie(e, t) {
111
+ function Ge(t, e) {
128
112
  let n = !0;
129
- for (; t.parent; ) {
130
- if (t.parent === e) {
113
+ for (; e.parent; ) {
114
+ if (e.parent === t) {
131
115
  n = !1;
132
116
  break;
133
117
  }
134
- t = t.parent;
118
+ e = e.parent;
135
119
  }
136
120
  return n;
137
121
  }
138
- const H = (e) => {
122
+ const P = (t) => {
139
123
  var i;
140
- const t = (i = e.parent) == null ? void 0 : i.children, n = t.indexOf(e);
141
- return { siblings: t, index: n };
124
+ const e = (i = t.parent) == null ? void 0 : i.children, n = e.indexOf(t);
125
+ return { siblings: e, index: n };
142
126
  };
143
- function Ke(e) {
144
- const { siblings: t, index: n } = H(e), i = t[n];
145
- n === 0 ? (t[n] = t[t.length - 1], t[t.length - 1] = i) : (t[n] = t[n - 1], t[n - 1] = i);
127
+ function Je(t) {
128
+ const { siblings: e, index: n } = P(t), i = e[n];
129
+ n === 0 ? (e[n] = e[e.length - 1], e[e.length - 1] = i) : (e[n] = e[n - 1], e[n - 1] = i);
146
130
  }
147
- function Ue(e) {
148
- const { siblings: t, index: n } = H(e), i = t[n];
149
- n === t.length - 1 ? (t[n] = t[0], t[0] = i) : (t[n] = t[n + 1], t[n + 1] = i);
131
+ function Qe(t) {
132
+ const { siblings: e, index: n } = P(t), i = e[n];
133
+ n === e.length - 1 ? (e[n] = e[0], e[0] = i) : (e[n] = e[n + 1], e[n + 1] = i);
150
134
  }
151
- function Z(e) {
152
- const { siblings: t, index: n } = H(e);
153
- return t.splice(n, 1), t.length;
135
+ function ie(t) {
136
+ const { siblings: e, index: n } = P(t);
137
+ return e.splice(n, 1), e.length;
154
138
  }
155
- function Ge(e, t) {
156
- const { siblings: n, index: i } = H(e);
157
- n.splice(i + 1, 0, t);
139
+ function Ze(t, e) {
140
+ const { siblings: n, index: i } = P(t);
141
+ n.splice(i + 1, 0, e);
158
142
  }
159
- function Je(e, t) {
160
- const { siblings: n, index: i } = H(e);
161
- n.splice(i, 0, t);
143
+ function et(t, e) {
144
+ const { siblings: n, index: i } = P(t);
145
+ n.splice(i, 0, e);
162
146
  }
163
- function Qe(e, t) {
164
- const { siblings: n, index: i } = H(e);
165
- n[i] = t, t.children = [e];
147
+ function tt(t, e) {
148
+ const { siblings: n, index: i } = P(t);
149
+ n[i] = e, e.children = [t];
166
150
  }
167
- function Ze(e, t) {
168
- Z(e), t.children ? t.children.push(e) : t.children = [e];
151
+ function nt(t, e) {
152
+ ie(t), e.children ? e.children.push(t) : e.children = [t];
169
153
  }
170
- function et(e, t) {
171
- Z(e);
172
- const { siblings: n, index: i } = H(t);
173
- n.splice(i, 0, e);
154
+ function it(t, e) {
155
+ ie(t);
156
+ const { siblings: n, index: i } = P(e);
157
+ n.splice(i, 0, t);
174
158
  }
175
- function tt(e, t) {
176
- Z(e);
177
- const { siblings: n, index: i } = H(t);
178
- n.splice(i + 1, 0, e);
159
+ function ot(t, e) {
160
+ ie(t);
161
+ const { siblings: n, index: i } = P(e);
162
+ n.splice(i + 1, 0, t);
179
163
  }
180
- function Le(e) {
164
+ function De(t) {
181
165
  return JSON.parse(
182
- JSON.stringify(e, (n, i) => {
166
+ JSON.stringify(t, (n, i) => {
183
167
  if (n !== "parent")
184
168
  return i;
185
169
  })
186
170
  );
187
171
  }
188
- const Te = (e, t) => {
172
+ const W = (t, e) => {
189
173
  let n = 0, i = 0;
190
- for (; t && t !== e; )
191
- n += t.offsetLeft, i += t.offsetTop, t = t.offsetParent;
174
+ for (; e && e !== t; )
175
+ n += e.offsetLeft, i += e.offsetTop, e = e.offsetParent;
192
176
  return { offsetLeft: n, offsetTop: i };
193
- }, re = (e, t) => {
194
- for (const n in t)
195
- e.setAttribute(n, t[n]);
196
- }, j = {
177
+ }, N = (t, e) => {
178
+ for (const n in e)
179
+ t.setAttribute(n, e[n]);
180
+ }, D = {
197
181
  moved: !1,
198
182
  // diffrentiate click and move
199
183
  mousedown: !1,
200
184
  lastX: 0,
201
185
  lastY: 0,
202
- onMove(e, t) {
186
+ onMove(t, e) {
203
187
  if (this.mousedown) {
204
188
  if (this.moved = !0, !this.lastX) {
205
- this.lastX = e.pageX, this.lastY = e.pageY;
189
+ this.lastX = t.pageX, this.lastY = t.pageY;
206
190
  return;
207
191
  }
208
- const n = this.lastX - e.pageX, i = this.lastY - e.pageY;
209
- t.scrollTo(t.scrollLeft + n, t.scrollTop + i), this.lastX = e.pageX, this.lastY = e.pageY;
192
+ const n = this.lastX - t.pageX, i = this.lastY - t.pageY;
193
+ e.scrollTo(e.scrollLeft + n, e.scrollTop + i), this.lastX = t.pageX, this.lastY = t.pageY;
210
194
  }
211
195
  },
212
196
  clear() {
213
197
  this.moved = !1, this.mousedown = !1, this.lastX = 0, this.lastY = 0;
214
198
  }
215
- }, ae = (e) => e.tagName === "ME-TPC";
216
- function nt(e) {
217
- e.map.addEventListener("click", (t) => {
218
- var i;
219
- if (j.moved) {
220
- j.clear();
199
+ }, ue = (t) => t.tagName === "ME-TPC";
200
+ function st(t) {
201
+ t.map.addEventListener("click", (e) => {
202
+ if (D.moved) {
203
+ D.clear();
221
204
  return;
222
205
  }
223
- e.unselectNode(), e.unselectNodes(), e.unselectSummary();
224
- const n = t.target;
206
+ t.unselectNode(), t.unselectNodes(), t.unselectSummary();
207
+ const n = e.target;
225
208
  if (n.tagName === "ME-EPD")
226
- e.expandNode(n.previousSibling);
227
- else if (e.editable)
228
- ae(n) ? e.selectNode(n, !1, t) : n.tagName === "text" ? e.selectSummary(n.parentElement) : n.tagName === "path" ? ((i = n == null ? void 0 : n.parentElement) == null ? void 0 : i.tagName) === "g" && e.selectLink(n.parentElement) : n.className === "circle" || e.hideLinkController && e.hideLinkController();
209
+ t.expandNode(n.previousSibling);
210
+ else if (t.editable)
211
+ ue(n) ? t.selectNode(n, !1, e) : n.tagName === "text" ? n.dataset.type === "custom-link" ? t.selectLink(n.parentElement) : t.selectSummary(n.parentElement) : n.className === "circle" || t.hideLinkController && t.hideLinkController();
229
212
  else
230
213
  return;
231
- }), e.map.addEventListener("dblclick", (t) => {
232
- if (t.preventDefault(), !e.editable)
214
+ }), t.map.addEventListener("dblclick", (e) => {
215
+ if (e.preventDefault(), !t.editable)
233
216
  return;
234
- const n = t.target;
235
- ae(n) ? e.beginEdit(n) : n.tagName === "text" && e.editSummary(n.parentElement);
236
- }), e.map.addEventListener("mousemove", (t) => {
237
- t.target.contentEditable !== "true" && j.onMove(t, e.container);
238
- }), e.map.addEventListener("mousedown", (t) => {
239
- t.button === 2 && t.target.contentEditable !== "true" && (j.moved = !1, j.mousedown = !0);
240
- }), e.map.addEventListener("mouseleave", (t) => {
241
- console.log(t.button), t.button === 2 && j.clear();
242
- }), e.map.addEventListener("mouseup", (t) => {
243
- t.button === 2 && j.clear();
217
+ const n = e.target;
218
+ ue(n) ? t.beginEdit(n) : n.tagName === "text" && (n.dataset.type === "custom-link" ? t.editCutsomLinkLabel(n.parentElement) : t.editSummary(n.parentElement));
219
+ }), t.map.addEventListener("mousemove", (e) => {
220
+ e.target.contentEditable !== "true" && D.onMove(e, t.container);
221
+ }), t.map.addEventListener("mousedown", (e) => {
222
+ e.button === 2 && e.target.contentEditable !== "true" && (D.moved = !1, D.mousedown = !0);
223
+ }), t.map.addEventListener("mouseleave", (e) => {
224
+ console.log(e.button), e.button === 2 && D.clear();
225
+ }), t.map.addEventListener("mouseup", (e) => {
226
+ e.button === 2 && D.clear();
244
227
  });
245
228
  }
246
- const it = {
229
+ const rt = {
247
230
  create() {
248
231
  return {
249
232
  handlers: {},
250
233
  showHandler: function() {
251
234
  console.log(this.handlers);
252
235
  },
253
- addListener: function(e, t) {
254
- this.handlers[e] === void 0 && (this.handlers[e] = []), this.handlers[e].push(t);
236
+ addListener: function(t, e) {
237
+ this.handlers[t] === void 0 && (this.handlers[t] = []), this.handlers[t].push(e);
255
238
  },
256
- fire: function(e, ...t) {
257
- if (this.handlers[e] instanceof Array) {
258
- const n = this.handlers[e];
239
+ fire: function(t, ...e) {
240
+ if (this.handlers[t] instanceof Array) {
241
+ const n = this.handlers[t];
259
242
  for (let i = 0; i < n.length; i++)
260
- n[i](...t);
243
+ n[i](...e);
261
244
  }
262
245
  },
263
- removeListener: function(e, t) {
264
- if (!this.handlers[e])
246
+ removeListener: function(t, e) {
247
+ if (!this.handlers[t])
265
248
  return;
266
- const n = this.handlers[e];
267
- if (!t)
249
+ const n = this.handlers[t];
250
+ if (!e)
268
251
  n.length = 0;
269
252
  else if (n.length)
270
253
  for (let i = 0; i < n.length; i++)
271
- n[i] === t && this.handlers[e].splice(i, 1);
254
+ n[i] === e && this.handlers[t].splice(i, 1);
272
255
  }
273
256
  };
274
257
  }
275
- }, Q = document, st = function() {
258
+ }, te = document, lt = function() {
276
259
  console.time("layout"), this.nodes.innerHTML = "";
277
- const e = this.createTopic(this.nodeData);
278
- le(e, this.nodeData), e.draggable = !1;
279
- const t = Q.createElement("me-root");
280
- t.appendChild(e);
260
+ const t = this.createTopic(this.nodeData);
261
+ ae(t, this.nodeData), t.draggable = !1;
262
+ const e = te.createElement("me-root");
263
+ e.appendChild(t);
281
264
  const n = this.nodeData.children || [];
282
- if (this.direction === I) {
283
- let i = 0, s = 0;
284
- n.map((o) => {
285
- o.direction === S ? i += 1 : o.direction === R ? s += 1 : i <= s ? (o.direction = S, i += 1) : (o.direction = R, s += 1);
265
+ if (this.direction === K) {
266
+ let i = 0, o = 0;
267
+ n.map((s) => {
268
+ s.direction === S ? i += 1 : s.direction === H ? o += 1 : i <= o ? (s.direction = S, i += 1) : (s.direction = H, o += 1);
286
269
  });
287
270
  }
288
- ot(this, n, t), console.timeEnd("layout");
289
- }, ot = function(e, t, n) {
290
- const i = Q.createElement("me-main");
271
+ ct(this, n, e), console.timeEnd("layout");
272
+ }, ct = function(t, e, n) {
273
+ const i = te.createElement("me-main");
291
274
  i.className = "lhs";
292
- const s = Q.createElement("me-main");
293
- s.className = "rhs";
294
- for (let o = 0; o < t.length; o++) {
295
- const r = t[o], { grp: l } = e.createWrapper(r);
296
- e.direction === I ? r.direction === S ? i.appendChild(l) : s.appendChild(l) : e.direction === S ? i.appendChild(l) : s.appendChild(l);
297
- }
298
- e.nodes.appendChild(i), e.nodes.appendChild(n), e.nodes.appendChild(s), e.nodes.appendChild(e.lines);
299
- }, rt = function(e, t) {
300
- const n = Q.createElement("me-children");
301
- for (let i = 0; i < t.length; i++) {
302
- const s = t[i], { grp: o } = e.createWrapper(s);
303
- n.appendChild(o);
275
+ const o = te.createElement("me-main");
276
+ o.className = "rhs";
277
+ for (let s = 0; s < e.length; s++) {
278
+ const r = e[s], { grp: l } = t.createWrapper(r);
279
+ t.direction === K ? r.direction === S ? i.appendChild(l) : o.appendChild(l) : t.direction === S ? i.appendChild(l) : o.appendChild(l);
280
+ }
281
+ t.nodes.appendChild(i), t.nodes.appendChild(n), t.nodes.appendChild(o), t.nodes.appendChild(t.lines);
282
+ }, at = function(t, e) {
283
+ const n = te.createElement("me-children");
284
+ for (let i = 0; i < e.length; i++) {
285
+ const o = e[i], { grp: s } = t.createWrapper(o);
286
+ n.appendChild(s);
304
287
  }
305
288
  return n;
306
- }, w = document, C = (e, t) => (t ? t.mindElixirBox : w).querySelector(`[data-nodeid=me${e}]`), le = function(e, t) {
307
- if (e.textContent = t.topic, t.style && (e.style.color = t.style.color || "", e.style.background = t.style.background || "", e.style.fontSize = t.style.fontSize + "px", e.style.fontWeight = t.style.fontWeight || "normal"), t.image) {
308
- const n = t.image;
289
+ }, k = document, E = (t, e) => (e ? e.mindElixirBox : k).querySelector(`[data-nodeid=me${t}]`), ae = function(t, e) {
290
+ if (t.textContent = e.topic, e.style && (t.style.color = e.style.color || "", t.style.background = e.style.background || "", t.style.fontSize = e.style.fontSize + "px", t.style.fontWeight = e.style.fontWeight || "normal"), e.image) {
291
+ const n = e.image;
309
292
  if (n.url && n.width && n.height) {
310
- const i = w.createElement("img");
311
- i.src = n.url, i.style.width = n.width + "px", i.style.height = n.height + "px", e.appendChild(i), e.image = i;
293
+ const i = k.createElement("img");
294
+ i.src = n.url, i.style.width = n.width + "px", i.style.height = n.height + "px", t.appendChild(i), t.image = i;
312
295
  } else
313
296
  console.warn("image url/width/height are required");
314
297
  }
315
- if (t.hyperLink) {
316
- const n = w.createElement("a");
317
- n.className = "hyper-link", n.target = "_blank", n.innerText = "🔗", n.href = t.hyperLink, e.appendChild(n), e.linkContainer = n, console.log(n);
298
+ if (e.hyperLink) {
299
+ const n = k.createElement("a");
300
+ n.className = "hyper-link", n.target = "_blank", n.innerText = "🔗", n.href = e.hyperLink, t.appendChild(n), t.linkContainer = n;
318
301
  } else
319
- e.linkContainer && (e.linkContainer.remove(), e.linkContainer = null);
320
- if (t.icons && t.icons.length) {
321
- const n = w.createElement("span");
322
- n.className = "icons", n.innerHTML = t.icons.map((i) => `<span>${J(i)}</span>`).join(""), e.appendChild(n), e.icons = n;
323
- }
324
- if (t.tags && t.tags.length) {
325
- const n = w.createElement("div");
326
- n.className = "tags", n.innerHTML = t.tags.map((i) => `<span>${J(i)}</span>`).join(""), e.appendChild(n), e.tags = n;
327
- }
328
- t.branchColor && (e.style.borderColor = t.branchColor);
329
- }, lt = function(e, t) {
330
- const n = w.createElement("me-wrapper"), { p: i, tpc: s } = this.createParent(e);
331
- if (n.appendChild(i), !t && e.children && e.children.length > 0) {
332
- const o = ee(e.expanded);
333
- if (i.appendChild(o), e.expanded !== !1) {
334
- const r = rt(this, e.children);
302
+ t.linkContainer && (t.linkContainer.remove(), t.linkContainer = null);
303
+ if (e.icons && e.icons.length) {
304
+ const n = k.createElement("span");
305
+ n.className = "icons", n.innerHTML = e.icons.map((i) => `<span>${ee(i)}</span>`).join(""), t.appendChild(n), t.icons = n;
306
+ }
307
+ if (e.tags && e.tags.length) {
308
+ const n = k.createElement("div");
309
+ n.className = "tags", n.innerHTML = e.tags.map((i) => `<span>${ee(i)}</span>`).join(""), t.appendChild(n), t.tags = n;
310
+ }
311
+ e.branchColor && (t.style.borderColor = e.branchColor);
312
+ }, dt = function(t, e) {
313
+ const n = k.createElement("me-wrapper"), { p: i, tpc: o } = this.createParent(t);
314
+ if (n.appendChild(i), !e && t.children && t.children.length > 0) {
315
+ const s = oe(t.expanded);
316
+ if (i.appendChild(s), t.expanded !== !1) {
317
+ const r = at(this, t.children);
335
318
  n.appendChild(r);
336
319
  }
337
320
  }
338
- return { grp: n, top: i, tpc: s };
339
- }, ct = function(e) {
340
- const t = w.createElement("me-parent"), n = this.createTopic(e);
341
- return le(n, e), t.appendChild(n), { p: t, tpc: n };
342
- }, at = function(e) {
343
- const t = w.createElement("me-children");
344
- return t.append(...e), t;
345
- }, dt = function(e) {
346
- const t = w.createElement("me-tpc");
347
- return t.nodeObj = e, t.dataset.nodeid = "me" + e.id, t.draggable = this.draggable, t;
321
+ return { grp: n, top: i, tpc: o };
322
+ }, ht = function(t) {
323
+ const e = k.createElement("me-parent"), n = this.createTopic(t);
324
+ return ae(n, t), e.appendChild(n), { p: e, tpc: n };
325
+ }, ut = function(t) {
326
+ const e = k.createElement("me-children");
327
+ return e.append(...t), e;
328
+ }, ft = function(t) {
329
+ const e = k.createElement("me-tpc");
330
+ return e.nodeObj = t, e.dataset.nodeid = "me" + t.id, e.draggable = this.draggable, e;
348
331
  };
349
- function $e(e) {
350
- const t = w.createRange();
351
- t.selectNodeContents(e);
332
+ function Oe(t) {
333
+ const e = k.createRange();
334
+ e.selectNodeContents(t);
352
335
  const n = window.getSelection();
353
- n && (n.removeAllRanges(), n.addRange(t));
336
+ n && (n.removeAllRanges(), n.addRange(e));
354
337
  }
355
- const ht = function(e) {
356
- if (console.time("editTopic"), !e)
338
+ const pt = function(t) {
339
+ if (console.time("editTopic"), !t)
357
340
  return;
358
- const t = w.createElement("div"), n = e.childNodes[0].textContent;
359
- e.appendChild(t), t.id = "input-box", t.textContent = n, t.contentEditable = "true", t.spellcheck = !1, t.style.cssText = `min-width:${e.offsetWidth - 8}px;`, this.direction === S && (t.style.right = "0"), t.focus(), $e(t), this.bus.fire("operation", {
341
+ const e = k.createElement("div"), n = t.childNodes[0].textContent;
342
+ t.appendChild(e), e.id = "input-box", e.textContent = n, e.contentEditable = "true", e.spellcheck = !1, e.style.cssText = `min-width:${t.offsetWidth - 8}px;`, this.direction === S && (e.style.right = "0"), e.focus(), Oe(e), this.bus.fire("operation", {
360
343
  name: "beginEdit",
361
- obj: e.nodeObj
362
- }), t.addEventListener("keydown", (i) => {
344
+ obj: t.nodeObj
345
+ }), e.addEventListener("keydown", (i) => {
363
346
  i.stopPropagation();
364
- const s = i.key;
365
- if (s === "Enter" || s === "Tab") {
347
+ const o = i.key;
348
+ if (o === "Enter" || o === "Tab") {
366
349
  if (i.shiftKey)
367
350
  return;
368
- i.preventDefault(), t == null || t.blur(), this.map.focus();
351
+ i.preventDefault(), e == null || e.blur(), this.map.focus();
369
352
  }
370
- }), t.addEventListener("blur", () => {
371
- var o;
372
- if (!t)
353
+ }), e.addEventListener("blur", () => {
354
+ var s;
355
+ if (!e)
373
356
  return;
374
- const i = e.nodeObj, s = ((o = t.textContent) == null ? void 0 : o.trim()) || "";
375
- console.log(s), s === "" ? i.topic = n : i.topic = s, t.remove(), s !== n && (e.childNodes[0].textContent = i.topic, this.linkDiv(), this.bus.fire("operation", {
357
+ const i = t.nodeObj, o = ((s = e.textContent) == null ? void 0 : s.trim()) || "";
358
+ console.log(o), o === "" ? i.topic = n : i.topic = o, e.remove(), o !== n && (t.childNodes[0].textContent = i.topic, this.linkDiv(), this.bus.fire("operation", {
376
359
  name: "finishEdit",
377
360
  obj: i,
378
361
  origin: n
379
362
  }));
380
363
  }), console.timeEnd("editTopic");
381
- }, ee = function(e) {
382
- const t = w.createElement("me-epd");
383
- return t.expanded = e !== !1, t.className = e !== !1 ? "minus" : "", t;
384
- }, V = document, q = "http://www.w3.org/2000/svg", ut = function(e, t) {
385
- const n = V.createElementNS(q, "path");
386
- return n.setAttribute("d", e), n.setAttribute("stroke", t || "#666"), n.setAttribute("fill", "none"), n.setAttribute("stroke-width", "3"), n;
387
- }, X = function(e) {
388
- const t = V.createElementNS(q, "svg");
389
- return t.setAttribute("class", e), t.setAttribute("overflow", "visible"), t;
390
- }, de = function(e, t, n, i) {
391
- const s = V.createElementNS(q, "line");
392
- return s.setAttribute("x1", String(e)), s.setAttribute("y1", String(t)), s.setAttribute("x2", String(n)), s.setAttribute("y2", String(i)), s.setAttribute("stroke", "#bbb"), s.setAttribute("fill", "none"), s.setAttribute("stroke-width", "2"), s;
393
- }, ft = function(e, t) {
394
- const n = V.createElementNS(q, "path");
395
- return n.setAttribute("d", e), n.setAttribute("stroke", t || "#555"), n.setAttribute("fill", "none"), n.setAttribute("stroke-linecap", "square"), n.setAttribute("stroke-width", "2"), n;
396
- }, pt = function(e, t) {
397
- const n = V.createElementNS(q, "g"), i = V.createElementNS(q, "path"), s = V.createElementNS(q, "path");
398
- return s.setAttribute("d", t), s.setAttribute("stroke", "rgb(235, 95, 82)"), s.setAttribute("fill", "none"), s.setAttribute("stroke-linecap", "cap"), s.setAttribute("stroke-width", "2"), i.setAttribute("d", e), i.setAttribute("stroke", "rgb(235, 95, 82)"), i.setAttribute("fill", "none"), i.setAttribute("stroke-linecap", "cap"), i.setAttribute("stroke-width", "2"), n.appendChild(i), n.appendChild(s), n;
364
+ }, oe = function(t) {
365
+ const e = k.createElement("me-epd");
366
+ return e.expanded = t !== !1, e.className = t !== !1 ? "minus" : "", e;
367
+ }, z = document, R = "http://www.w3.org/2000/svg", mt = function(t, e) {
368
+ const n = z.createElementNS(R, "path");
369
+ return n.setAttribute("d", t), n.setAttribute("stroke", e || "#666"), n.setAttribute("fill", "none"), n.setAttribute("stroke-width", "3"), n;
370
+ }, X = function(t) {
371
+ const e = z.createElementNS(R, "svg");
372
+ return e.setAttribute("class", t), e.setAttribute("overflow", "visible"), e;
373
+ }, fe = function() {
374
+ const t = z.createElementNS(R, "line");
375
+ return t.setAttribute("stroke", "#bbb"), t.setAttribute("fill", "none"), t.setAttribute("stroke-width", "2"), t;
376
+ }, gt = function(t, e) {
377
+ const n = z.createElementNS(R, "path");
378
+ return n.setAttribute("d", t), n.setAttribute("stroke", e || "#555"), n.setAttribute("fill", "none"), n.setAttribute("stroke-linecap", "square"), n.setAttribute("stroke-width", "2"), n;
379
+ }, vt = function(t, e) {
380
+ const n = {
381
+ stroke: "rgb(235, 95, 82)",
382
+ fill: "none",
383
+ "stroke-linecap": "cap",
384
+ "stroke-width": "2"
385
+ }, i = z.createElementNS(R, "g"), o = z.createElementNS(R, "path"), s = z.createElementNS(R, "path");
386
+ return N(s, {
387
+ d: e,
388
+ ...n
389
+ }), N(o, {
390
+ d: t,
391
+ ...n,
392
+ "stroke-dasharray": "8,2"
393
+ }), i.appendChild(o), i.appendChild(s), i;
394
+ }, Ae = function(t, e, n) {
395
+ if (console.time("editSummary"), !e)
396
+ return;
397
+ const i = document.createElement("div");
398
+ t.nodes.appendChild(i);
399
+ const o = e.innerHTML;
400
+ i.id = "input-box", i.textContent = o, i.contentEditable = "true", i.spellcheck = !1;
401
+ const s = e.getAttribute("x") + "px", r = e.getAttribute("y") + "px";
402
+ i.style.cssText = `min-width:${100 - 8}px;position:absolute;left:${s};top:${r};`;
403
+ const l = e.getAttribute("text-anchor");
404
+ l === "end" ? i.style.cssText += "transform: translate(-100%, -100%);" : l === "middle" ? i.style.cssText += "transform: translate(-50%, -100%);" : i.style.cssText += "transform: translate(0, -100%);", i.focus(), Oe(i), i.addEventListener("keydown", (c) => {
405
+ c.stopPropagation();
406
+ const h = c.key;
407
+ if (h === "Enter" || h === "Tab") {
408
+ if (c.shiftKey)
409
+ return;
410
+ c.preventDefault(), i.blur(), t.map.focus();
411
+ }
412
+ }), i.addEventListener("blur", () => {
413
+ i && n(i);
414
+ }), console.timeEnd("editSummary");
399
415
  };
400
- let Ae = je;
401
- const mt = function(e) {
416
+ let Pe = He;
417
+ const bt = function(t) {
402
418
  console.time("linkDiv");
403
- const t = this.map.querySelector("me-root");
404
- this.nodes.style.top = `${1e4 - this.nodes.offsetHeight / 2}px`, this.nodes.style.left = `${1e4 - t.offsetLeft - t.offsetWidth / 2}px`;
419
+ const e = this.map.querySelector("me-root");
420
+ this.nodes.style.top = `${1e4 - this.nodes.offsetHeight / 2}px`, this.nodes.style.left = `${1e4 - e.offsetLeft - e.offsetWidth / 2}px`;
405
421
  const n = this.map.querySelectorAll("me-main > me-wrapper");
406
- this.lines.innerHTML = "", Ae = this.subLinkStyle === 2 ? vt : je;
422
+ this.lines.innerHTML = "", Pe = this.subLinkStyle === 2 ? wt : He;
407
423
  for (let i = 0; i < n.length; i++) {
408
- const s = n[i], o = s.querySelector("me-tpc"), r = s.firstChild, l = s.parentNode.className;
409
- let c = t.offsetLeft + t.offsetWidth / 2;
410
- const u = t.offsetTop + t.offsetHeight / 2;
411
- let d;
412
- const h = this.theme.palette, a = o.nodeObj.branchColor || h[i % h.length], { offsetLeft: p, offsetTop: g } = Te(this.nodes, r);
413
- l === "lhs" ? d = p + r.offsetWidth : d = p;
424
+ const o = n[i], s = o.querySelector("me-tpc"), r = o.firstChild, l = o.parentNode.className;
425
+ let c = e.offsetLeft + e.offsetWidth / 2;
426
+ const h = e.offsetTop + e.offsetHeight / 2;
427
+ let a;
428
+ const u = this.theme.palette, d = s.nodeObj.branchColor || u[i % u.length], { offsetLeft: p, offsetTop: g } = W(this.nodes, r);
429
+ l === "lhs" ? a = p + r.offsetWidth : a = p;
414
430
  const m = g + r.offsetHeight / 2;
415
431
  let f = "";
416
432
  if (this.mainLinkStyle === 2)
417
- this.direction === I && (l === "lhs" ? c = c - t.offsetWidth / 6 : c = c + t.offsetWidth / 6), f = gt({ x1: c, y1: u, x2: d, y2: m });
433
+ this.direction === K && (l === "lhs" ? c = c - e.offsetWidth / 6 : c = c + e.offsetWidth / 6), f = yt({ x1: c, y1: h, x2: a, y2: m });
418
434
  else {
419
- const v = (1 - Math.abs(m - s.parentElement.offsetTop - s.parentElement.offsetHeight / 2) / s.parentElement.offsetHeight) * 0.25 * (t.offsetWidth / 2);
420
- l === "lhs" ? c = c - t.offsetWidth / 10 - v : c = c + t.offsetWidth / 10 + v, f = bt({ x1: c, y1: u, x2: d, y2: m });
435
+ const b = (1 - Math.abs(m - o.parentElement.offsetTop - o.parentElement.offsetHeight / 2) / o.parentElement.offsetHeight) * 0.25 * (e.offsetWidth / 2);
436
+ l === "lhs" ? c = c - e.offsetWidth / 10 - b : c = c + e.offsetWidth / 10 + b, f = xt({ x1: c, y1: h, x2: a, y2: m });
421
437
  }
422
- this.lines.appendChild(ut(f, a));
423
- const b = s.children[0].children[1];
424
- if (b && (b.style.top = (b.parentNode.offsetHeight - b.offsetHeight) / 2 + "px", l === "lhs" ? b.style.left = "-10px" : b.style.right = "-10px"), !(e && e !== s) && s.childElementCount) {
425
- const N = X("subLines"), v = s.lastChild;
426
- v.tagName === "svg" && v.remove(), s.appendChild(N);
427
- const y = s.firstChild, E = s.children[1].children, _ = Oe(E, y, l, !0);
428
- N.appendChild(ft(_, a));
438
+ this.lines.appendChild(mt(f, d));
439
+ const v = o.children[0].children[1];
440
+ if (v && (v.style.top = (v.parentNode.offsetHeight - v.offsetHeight) / 2 + "px", l === "lhs" ? v.style.left = "-10px" : v.style.right = "-10px"), !(t && t !== o) && o.childElementCount) {
441
+ const x = X("subLines"), b = o.lastChild;
442
+ b.tagName === "svg" && b.remove(), o.appendChild(x);
443
+ const y = o.firstChild, C = o.children[1].children, _ = je(C, y, l, !0);
444
+ x.appendChild(gt(_, d));
429
445
  }
430
446
  }
431
- this.linkSvgGroup.innerHTML = "";
432
- for (const i in this.linkData) {
433
- const s = this.linkData[i];
434
- this.createLink(C(s.from), C(s.to), !0, s);
435
- }
436
- this.renderSummary(), console.timeEnd("linkDiv");
437
- }, Oe = function(e, t, n, i) {
438
- let s = "";
439
- const o = t.offsetTop, r = t.offsetLeft, l = t.offsetWidth, c = t.offsetHeight;
440
- for (let u = 0; u < e.length; u++) {
441
- const d = e[u], h = d.firstChild, a = h.offsetTop, p = h.offsetLeft, g = h.offsetWidth, m = h.offsetHeight;
442
- s += Ae({ pT: o, pL: r, pW: l, pH: c, cT: a, cL: p, cW: g, cH: m, direction: n, isFirst: i });
443
- const f = h.children[1];
447
+ this.renderCustomLink(), this.renderSummary(), console.timeEnd("linkDiv");
448
+ }, je = function(t, e, n, i) {
449
+ let o = "";
450
+ const s = e.offsetTop, r = e.offsetLeft, l = e.offsetWidth, c = e.offsetHeight;
451
+ for (let h = 0; h < t.length; h++) {
452
+ const a = t[h], u = a.firstChild, d = u.offsetTop, p = u.offsetLeft, g = u.offsetWidth, m = u.offsetHeight;
453
+ o += Pe({ pT: s, pL: r, pW: l, pH: c, cT: d, cL: p, cW: g, cH: m, direction: n, isFirst: i });
454
+ const f = u.children[1];
444
455
  if (f) {
445
456
  if (f.style.bottom = -(f.offsetHeight / 2) + "px", n === "lhs" ? f.style.left = "10px" : n === "rhs" && (f.style.right = "10px"), !f.expanded)
446
457
  continue;
447
458
  } else
448
459
  continue;
449
- const b = d.children[1].children;
450
- b.length > 0 && (s += Oe(b, h, n));
460
+ const v = a.children[1].children;
461
+ v.length > 0 && (o += je(v, u, n));
451
462
  }
452
- return s;
463
+ return o;
453
464
  };
454
- function gt({ x1: e, y1: t, x2: n, y2: i }) {
455
- return `M ${e} ${t} V ${i > t ? i - 20 : i + 20} C ${e} ${i} ${e} ${i} ${n > e ? e + 20 : e - 20} ${i} H ${n}`;
465
+ function yt({ x1: t, y1: e, x2: n, y2: i }) {
466
+ return `M ${t} ${e} V ${i > e ? i - 20 : i + 20} C ${t} ${i} ${t} ${i} ${n > t ? t + 20 : t - 20} ${i} H ${n}`;
456
467
  }
457
- function bt({ x1: e, y1: t, x2: n, y2: i }) {
458
- return `M ${e} ${t} Q ${e} ${i} ${n} ${i}`;
468
+ function xt({ x1: t, y1: e, x2: n, y2: i }) {
469
+ return `M ${t} ${e} Q ${t} ${i} ${n} ${i}`;
459
470
  }
460
- function vt({ pT: e, pL: t, pW: n, pH: i, cT: s, cL: o, cW: r, cH: l, direction: c, isFirst: u }) {
461
- let d;
462
- u ? d = e + i / 2 : d = e + i;
463
- const h = s + l;
464
- let a = 0, p = 0, g = 0;
465
- return c === "lhs" ? (a = t + T, p = o, g = o + r) : c === "rhs" && (a = t + n - T, p = o + r, g = o), h < d + 50 && h > d - 50 ? `M ${a} ${d} H ${g} V ${h} H ${p}` : h >= d ? `M ${a} ${d} H ${g} V ${h - L} A ${L} ${L} 0 0 ${a > p ? 1 : 0} ${a > p ? g - L : g + L} ${h} H ${p}` : `M ${a} ${d} H ${g} V ${h + L} A ${L} ${L} 0 0 ${a > p ? 0 : 1} ${a > p ? g - L : g + L} ${h} H ${p}`;
471
+ function wt({ pT: t, pL: e, pW: n, pH: i, cT: o, cL: s, cW: r, cH: l, direction: c, isFirst: h }) {
472
+ let a;
473
+ h ? a = t + i / 2 : a = t + i;
474
+ const u = o + l;
475
+ let d = 0, p = 0, g = 0;
476
+ return c === "lhs" ? (d = e + M, p = s, g = s + r) : c === "rhs" && (d = e + n - M, p = s + r, g = s), u < a + 50 && u > a - 50 ? `M ${d} ${a} H ${g} V ${u} H ${p}` : u >= a ? `M ${d} ${a} H ${g} V ${u - L} A ${L} ${L} 0 0 ${d > p ? 1 : 0} ${d > p ? g - L : g + L} ${u} H ${p}` : `M ${d} ${a} H ${g} V ${u + L} A ${L} ${L} 0 0 ${d > p ? 0 : 1} ${d > p ? g - L : g + L} ${u} H ${p}`;
466
477
  }
467
- function je({ pT: e, pL: t, pW: n, pH: i, cT: s, cL: o, cW: r, cH: l, direction: c, isFirst: u }) {
468
- let d = 0, h = 0;
469
- u ? d = e + i / 2 : d = e + i;
470
- const a = s + l;
478
+ function He({ pT: t, pL: e, pW: n, pH: i, cT: o, cL: s, cW: r, cH: l, direction: c, isFirst: h }) {
479
+ let a = 0, u = 0;
480
+ h ? a = t + i / 2 : a = t + i;
481
+ const d = o + l;
471
482
  let p = 0, g = 0, m = 0;
472
- const f = Math.min(Math.abs(d - a) / 800, 1.2) * T;
473
- return c === "lhs" ? (m = t, p = m + T, g = m - T, h = o + T, `M ${p} ${d} C ${m} ${d} ${m + f} ${a} ${g} ${a} H ${h}`) : (m = t + n, p = m - T, g = m + T, h = o + r - T, `M ${p} ${d} C ${m} ${d} ${m - f} ${a} ${g} ${a} H ${h}`);
483
+ const f = Math.min(Math.abs(a - d) / 800, 1.2) * M;
484
+ return c === "lhs" ? (m = e, p = m + M, g = m - M, u = s + M, `M ${p} ${a} C ${m} ${a} ${m + f} ${d} ${g} ${d} H ${u}`) : (m = e + n, p = m - M, g = m + M, u = s + r - M, `M ${p} ${a} C ${m} ${a} ${m - f} ${d} ${g} ${d} H ${u}`);
474
485
  }
475
- const he = {
486
+ const pe = {
476
487
  addChild: "插入子节点",
477
488
  addParent: "插入父节点",
478
489
  addSibling: "插入同级节点",
@@ -484,9 +495,9 @@ const he = {
484
495
  link: "连接",
485
496
  clickTips: "请点击目标节点",
486
497
  summary: "摘要"
487
- }, ue = {
488
- cn: he,
489
- zh_CN: he,
498
+ }, me = {
499
+ cn: pe,
500
+ zh_CN: pe,
490
501
  zh_TW: {
491
502
  addChild: "插入子節點",
492
503
  addParent: "插入父節點",
@@ -553,403 +564,416 @@ const he = {
553
564
  summary: "Resumo"
554
565
  }
555
566
  };
556
- function yt(e, t) {
557
- const n = (v) => {
567
+ function Et(t, e) {
568
+ const n = (b) => {
558
569
  const y = document.createElement("div");
559
- return y.innerText = v, y.style.cssText = "position:absolute;bottom:20px;left:50%;transform:translateX(-50%);", y;
560
- }, i = (v, y, E) => {
570
+ return y.innerText = b, y.className = "tips", y;
571
+ }, i = (b, y, C) => {
561
572
  const _ = document.createElement("li");
562
- return _.id = v, _.innerHTML = `<span>${J(y)}</span><span>${J(E)}</span>`, _;
563
- }, s = ue[e.locale] ? e.locale : "en", o = ue[s], r = i("cm-add_child", o.addChild, "tab"), l = i("cm-add_parent", o.addParent, ""), c = i("cm-add_sibling", o.addSibling, "enter"), u = i("cm-remove_child", o.removeNode, "delete"), d = i("cm-fucus", o.focus, ""), h = i("cm-unfucus", o.cancelFocus, ""), a = i("cm-up", o.moveUp, "PgUp"), p = i("cm-down", o.moveDown, "Pgdn"), g = i("cm-down", o.link, ""), m = i("cm-down", o.summary, ""), f = document.createElement("ul");
564
- if (f.className = "menu-list", f.appendChild(r), f.appendChild(l), f.appendChild(c), f.appendChild(u), (!t || t.focus) && (f.appendChild(d), f.appendChild(h)), f.appendChild(a), f.appendChild(p), f.appendChild(m), (!t || t.link) && f.appendChild(g), t && t.extend)
565
- for (let v = 0; v < t.extend.length; v++) {
566
- const y = t.extend[v], E = i(y.name, y.name, y.key || "");
567
- f.appendChild(E), E.onclick = (_) => {
573
+ return _.id = b, _.innerHTML = `<span>${ee(y)}</span><span>${ee(C)}</span>`, _;
574
+ }, o = me[t.locale] ? t.locale : "en", s = me[o], r = i("cm-add_child", s.addChild, "tab"), l = i("cm-add_parent", s.addParent, ""), c = i("cm-add_sibling", s.addSibling, "enter"), h = i("cm-remove_child", s.removeNode, "delete"), a = i("cm-fucus", s.focus, ""), u = i("cm-unfucus", s.cancelFocus, ""), d = i("cm-up", s.moveUp, "PgUp"), p = i("cm-down", s.moveDown, "Pgdn"), g = i("cm-down", s.link, ""), m = i("cm-down", s.summary, ""), f = document.createElement("ul");
575
+ if (f.className = "menu-list", f.appendChild(r), f.appendChild(l), f.appendChild(c), f.appendChild(h), (!e || e.focus) && (f.appendChild(a), f.appendChild(u)), f.appendChild(d), f.appendChild(p), f.appendChild(m), (!e || e.link) && f.appendChild(g), e && e.extend)
576
+ for (let b = 0; b < e.extend.length; b++) {
577
+ const y = e.extend[b], C = i(y.name, y.name, y.key || "");
578
+ f.appendChild(C), C.onclick = (_) => {
568
579
  y.onclick(_);
569
580
  };
570
581
  }
571
- const b = document.createElement("div");
572
- b.className = "context-menu", b.appendChild(f), b.hidden = !0, e.container.append(b);
573
- let N = !0;
574
- e.container.oncontextmenu = function(v) {
575
- if (v.preventDefault(), !e.editable)
582
+ const v = document.createElement("div");
583
+ v.className = "context-menu", v.appendChild(f), v.hidden = !0, t.container.append(v);
584
+ let x = !0;
585
+ t.container.oncontextmenu = function(b) {
586
+ if (b.preventDefault(), !t.editable)
576
587
  return;
577
- const y = v.target;
588
+ const y = b.target;
578
589
  if (y.tagName === "ME-TPC") {
579
- y.parentElement.tagName === "ME-ROOT" ? N = !0 : N = !1, N ? (d.className = "disabled", a.className = "disabled", p.className = "disabled", l.className = "disabled", c.className = "disabled", u.className = "disabled") : (d.className = "", a.className = "", p.className = "", l.className = "", c.className = "", u.className = ""), e.currentNodes || e.selectNode(y), b.hidden = !1;
580
- const E = f.offsetHeight, _ = f.offsetWidth;
581
- E + v.clientY > window.innerHeight ? (f.style.top = "", f.style.bottom = "0px") : (f.style.bottom = "", f.style.top = v.clientY + 15 + "px"), _ + v.clientX > window.innerWidth ? (f.style.left = "", f.style.right = "0px") : (f.style.right = "", f.style.left = v.clientX + 10 + "px");
590
+ y.parentElement.tagName === "ME-ROOT" ? x = !0 : x = !1, x ? (a.className = "disabled", d.className = "disabled", p.className = "disabled", l.className = "disabled", c.className = "disabled", h.className = "disabled") : (a.className = "", d.className = "", p.className = "", l.className = "", c.className = "", h.className = ""), t.currentNodes || t.selectNode(y), v.hidden = !1;
591
+ const C = f.offsetHeight, _ = f.offsetWidth;
592
+ C + b.clientY > window.innerHeight ? (f.style.top = "", f.style.bottom = "0px") : (f.style.bottom = "", f.style.top = b.clientY + 15 + "px"), _ + b.clientX > window.innerWidth ? (f.style.left = "", f.style.right = "0px") : (f.style.right = "", f.style.left = b.clientX + 10 + "px");
582
593
  }
583
- }, b.onclick = (v) => {
584
- v.target === b && (b.hidden = !0);
594
+ }, v.onclick = (b) => {
595
+ b.target === v && (v.hidden = !0);
585
596
  }, r.onclick = () => {
586
- e.addChild(), b.hidden = !0;
597
+ t.addChild(), v.hidden = !0;
587
598
  }, l.onclick = () => {
588
- e.insertParent(), b.hidden = !0;
599
+ t.insertParent(), v.hidden = !0;
589
600
  }, c.onclick = () => {
590
- N || (e.insertSibling(), b.hidden = !0);
591
- }, u.onclick = () => {
592
- N || (e.removeNode(), b.hidden = !0);
593
- }, d.onclick = () => {
594
- N || (e.focusNode(e.currentNode), b.hidden = !0);
601
+ x || (t.insertSibling(), v.hidden = !0);
595
602
  }, h.onclick = () => {
596
- e.cancelFocus(), b.hidden = !0;
603
+ x || (t.removeNode(), v.hidden = !0);
597
604
  }, a.onclick = () => {
598
- N || (e.moveUpNode(), b.hidden = !0);
605
+ x || (t.focusNode(t.currentNode), v.hidden = !0);
606
+ }, u.onclick = () => {
607
+ t.cancelFocus(), v.hidden = !0;
608
+ }, d.onclick = () => {
609
+ x || (t.moveUpNode(), v.hidden = !0);
599
610
  }, p.onclick = () => {
600
- N || (e.moveDownNode(), b.hidden = !0);
611
+ x || (t.moveDownNode(), v.hidden = !0);
601
612
  }, g.onclick = () => {
602
- b.hidden = !0;
603
- const v = e.currentNode, y = n(o.clickTips);
604
- e.container.appendChild(y), e.map.addEventListener(
613
+ v.hidden = !0;
614
+ const b = t.currentNode, y = n(s.clickTips);
615
+ t.container.appendChild(y), t.map.addEventListener(
605
616
  "click",
606
- (E) => {
607
- E.preventDefault(), y.remove();
608
- const _ = E.target;
609
- _.parentElement.tagName === "ME-PARENT" || _.parentElement.tagName === "ME-ROOT" ? e.createLink(v, e.currentNode) : console.log("link cancel");
617
+ (C) => {
618
+ C.preventDefault(), y.remove();
619
+ const _ = C.target;
620
+ _.parentElement.tagName === "ME-PARENT" || _.parentElement.tagName === "ME-ROOT" ? t.createLink(b, _) : console.log("link cancel");
610
621
  },
611
622
  {
612
623
  once: !0
613
624
  }
614
625
  );
615
626
  }, m.onclick = () => {
616
- b.hidden = !0, e.createSummary(), e.unselectNodes();
627
+ v.hidden = !0, t.createSummary(), t.unselectNodes();
617
628
  };
618
629
  }
619
- const Nt = (e) => {
620
- const t = e.map.querySelectorAll(".lhs>me-wrapper>me-parent>me-tpc");
621
- e.selectNode(t[Math.ceil(t.length / 2) - 1]);
622
- }, Et = (e) => {
623
- const t = e.map.querySelectorAll(".rhs>me-wrapper>me-parent>me-tpc");
624
- e.selectNode(t[Math.ceil(t.length / 2) - 1]);
625
- }, fe = (e) => {
626
- e.selectNode(e.map.querySelector("me-root>me-tpc"));
630
+ const Nt = (t) => {
631
+ const e = t.map.querySelectorAll(".lhs>me-wrapper>me-parent>me-tpc");
632
+ t.selectNode(e[Math.ceil(e.length / 2) - 1]);
633
+ }, Ct = (t) => {
634
+ const e = t.map.querySelectorAll(".rhs>me-wrapper>me-parent>me-tpc");
635
+ t.selectNode(e[Math.ceil(e.length / 2) - 1]);
636
+ }, ge = (t) => {
637
+ t.selectNode(t.map.querySelector("me-root>me-tpc"));
627
638
  };
628
- function xt(e) {
629
- const t = {
639
+ function _t(t) {
640
+ const e = {
630
641
  13: () => {
631
- e.insertSibling();
642
+ t.insertSibling();
632
643
  },
633
644
  9: () => {
634
- e.addChild();
645
+ t.addChild();
646
+ },
647
+ 112: () => {
648
+ t.toCenter();
635
649
  },
636
650
  113: () => {
637
- e.beginEdit();
651
+ t.beginEdit();
638
652
  },
639
- 38: () => {
640
- e.selectPrevSibling();
653
+ 38: (n) => {
654
+ if (n.metaKey || n.ctrlKey)
655
+ return t.initSide();
656
+ t.selectPrevSibling();
641
657
  },
642
658
  40: () => {
643
- e.selectNextSibling();
659
+ t.selectNextSibling();
644
660
  },
645
- 37: () => {
661
+ 37: (n) => {
646
662
  var s;
647
- if (!e.currentNode)
663
+ if (n.metaKey || n.ctrlKey)
664
+ return t.initLeft();
665
+ if (!t.currentNode)
648
666
  return;
649
- const n = e.currentNode.nodeObj, i = e.currentNode.offsetParent.offsetParent.parentElement;
650
- e.currentNode.nodeObj.root ? Nt(e) : i.className === "rhs" ? (s = n.parent) != null && s.root ? fe(e) : e.selectParent() : i.className === "lhs" && e.selectFirstChild();
667
+ const i = t.currentNode.nodeObj, o = t.currentNode.offsetParent.offsetParent.parentElement;
668
+ t.currentNode.nodeObj.root ? Nt(t) : o.className === "rhs" ? (s = i.parent) != null && s.root ? ge(t) : t.selectParent() : o.className === "lhs" && t.selectFirstChild();
651
669
  },
652
- 39: () => {
670
+ 39: (n) => {
653
671
  var s;
654
- if (!e.currentNode)
672
+ if (n.metaKey || n.ctrlKey)
673
+ return t.initRight();
674
+ if (!t.currentNode)
655
675
  return;
656
- const n = e.currentNode.nodeObj, i = e.currentNode.offsetParent.offsetParent.parentElement;
657
- n.root ? Et(e) : i.className === "lhs" ? (s = n.parent) != null && s.root ? fe(e) : e.selectParent() : i.className === "rhs" && e.selectFirstChild();
676
+ const i = t.currentNode.nodeObj, o = t.currentNode.offsetParent.offsetParent.parentElement;
677
+ i.root ? Ct(t) : o.className === "lhs" ? (s = i.parent) != null && s.root ? ge(t) : t.selectParent() : o.className === "rhs" && t.selectFirstChild();
658
678
  },
659
679
  33() {
660
- e.moveUpNode();
680
+ t.moveUpNode();
661
681
  },
662
682
  34() {
663
- e.moveDownNode();
683
+ t.moveDownNode();
664
684
  },
665
685
  67: (n) => {
666
- (n.metaKey || n.ctrlKey) && (e.waitCopy = e.currentNode);
686
+ (n.metaKey || n.ctrlKey) && (t.waitCopy = t.currentNode);
667
687
  },
668
688
  86: (n) => {
669
- !e.waitCopy || !e.currentNode || (n.metaKey || n.ctrlKey) && (e.copyNode(e.waitCopy, e.currentNode), e.waitCopy = null);
689
+ !t.waitCopy || !t.currentNode || (n.metaKey || n.ctrlKey) && (t.copyNode(t.waitCopy, t.currentNode), t.waitCopy = null);
670
690
  },
671
691
  // ctrl +
672
692
  187: (n) => {
673
693
  if (n.metaKey || n.ctrlKey) {
674
- if (e.scaleVal > 1.6)
694
+ if (t.scaleVal > 1.6)
675
695
  return;
676
- e.scale(e.scaleVal += 0.2);
696
+ t.scale(t.scaleVal += 0.2);
677
697
  }
678
698
  },
679
699
  // ctrl -
680
700
  189: (n) => {
681
701
  if (n.metaKey || n.ctrlKey) {
682
- if (e.scaleVal < 0.6)
702
+ if (t.scaleVal < 0.6)
683
703
  return;
684
- e.scale(e.scaleVal -= 0.2);
704
+ t.scale(t.scaleVal -= 0.2);
685
705
  }
706
+ },
707
+ // ctrl 0
708
+ 48: (n) => {
709
+ (n.metaKey || n.ctrlKey) && t.scale(1);
686
710
  }
687
711
  };
688
- e.map.onkeydown = (n) => {
689
- if (n.preventDefault(), !!e.editable && n.target === n.currentTarget)
712
+ t.map.onkeydown = (n) => {
713
+ if (n.preventDefault(), !!t.editable && n.target === n.currentTarget)
690
714
  if (n.keyCode === 8 || n.keyCode === 46)
691
- e.currentLink ? e.removeLink() : e.currentSummary ? e.removeSummary(e.currentSummary.summaryObj.id) : e.removeNode();
715
+ t.currentLink ? t.removeLink() : t.currentSummary ? t.removeSummary(t.currentSummary.summaryObj.id) : t.removeNode();
692
716
  else {
693
- const i = t[n.keyCode];
717
+ const i = e[n.keyCode];
694
718
  i && i(n);
695
719
  }
696
720
  };
697
721
  }
698
- function Ct(e, t) {
699
- const n = (a, p) => {
722
+ function kt(t, e) {
723
+ const n = (d, p) => {
700
724
  const g = document.createElement("div");
701
- return g.id = a, g.innerHTML = `<svg class="icon" aria-hidden="true">
725
+ return g.id = d, g.innerHTML = `<svg class="icon" aria-hidden="true">
702
726
  <use xlink:href="#icon-${p}"></use>
703
727
  </svg>`, g;
704
- }, i = n("cm-add_child", "zijiedian"), s = n("cm-add_sibling", "tongjijiedian-"), o = n("cm-remove_child", "shanchu2"), r = n("cm-up", "rising"), l = n("cm-down", "falling"), c = n("cm-edit", "edit"), u = document.createElement("ul");
705
- if (u.className = "menu-list", t && t.extend)
706
- for (let a = 0; a < t.extend.length; a++) {
707
- const p = t.extend[a], g = n(p.name, p.name);
708
- u.appendChild(g), g.onclick = (m) => {
728
+ }, i = n("cm-add_child", "zijiedian"), o = n("cm-add_sibling", "tongjijiedian-"), s = n("cm-remove_child", "shanchu2"), r = n("cm-up", "rising"), l = n("cm-down", "falling"), c = n("cm-edit", "edit"), h = document.createElement("ul");
729
+ if (h.className = "menu-list", e && e.extend)
730
+ for (let d = 0; d < e.extend.length; d++) {
731
+ const p = e.extend[d], g = n(p.name, p.name);
732
+ h.appendChild(g), g.onclick = (m) => {
709
733
  p.onclick(m);
710
734
  };
711
735
  }
712
- const d = document.createElement("mmenu");
713
- d.className = "mobile-menu", d.appendChild(i), d.appendChild(s), d.appendChild(o), d.appendChild(r), d.appendChild(l), d.appendChild(c), d.hidden = !0, e.container.append(d);
714
- let h = !0;
715
- e.bus.addListener("unselectNode", function() {
716
- d.hidden = !0;
717
- }), e.bus.addListener("selectNode", function(a) {
718
- d.hidden = !1, a.root ? h = !0 : h = !1;
719
- }), d.onclick = (a) => {
720
- a.target === d && (d.hidden = !0);
736
+ const a = document.createElement("mmenu");
737
+ a.className = "mobile-menu", a.appendChild(i), a.appendChild(o), a.appendChild(s), a.appendChild(r), a.appendChild(l), a.appendChild(c), a.hidden = !0, t.container.append(a);
738
+ let u = !0;
739
+ t.bus.addListener("unselectNode", function() {
740
+ a.hidden = !0;
741
+ }), t.bus.addListener("selectNode", function(d) {
742
+ a.hidden = !1, d.root ? u = !0 : u = !1;
743
+ }), a.onclick = (d) => {
744
+ d.target === a && (a.hidden = !0);
721
745
  }, i.onclick = () => {
722
- e.addChild();
723
- }, s.onclick = () => {
724
- h || e.insertSibling();
746
+ t.addChild();
725
747
  }, o.onclick = () => {
726
- h || e.removeNode();
727
- }, r.onclick = (a) => {
728
- h || e.moveUpNode();
729
- }, l.onclick = (a) => {
730
- h || e.moveDownNode();
731
- }, c.onclick = (a) => {
732
- e.beginEdit();
748
+ u || t.insertSibling();
749
+ }, s.onclick = () => {
750
+ u || t.removeNode();
751
+ }, r.onclick = (d) => {
752
+ u || t.moveUpNode();
753
+ }, l.onclick = (d) => {
754
+ u || t.moveDownNode();
755
+ }, c.onclick = (d) => {
756
+ t.beginEdit();
733
757
  };
734
758
  }
735
- const se = document, _t = function(e, t) {
736
- if (!t)
737
- return oe(e), e;
738
- const n = e.getElementsByClassName("insert-preview"), i = `insert-preview ${t} show`;
759
+ const le = document, St = function(t, e) {
760
+ if (!e)
761
+ return ce(t), t;
762
+ const n = t.getElementsByClassName("insert-preview"), i = `insert-preview ${e} show`;
739
763
  if (n.length > 0)
740
764
  n[0].className = i;
741
765
  else {
742
- const s = se.createElement("div");
743
- s.className = i, e.appendChild(s);
766
+ const o = le.createElement("div");
767
+ o.className = i, t.appendChild(o);
744
768
  }
745
- return e;
746
- }, oe = function(e) {
747
- if (!e)
769
+ return t;
770
+ }, ce = function(t) {
771
+ if (!t)
748
772
  return;
749
- const t = e.getElementsByClassName("insert-preview");
750
- for (const n of t || [])
773
+ const e = t.getElementsByClassName("insert-preview");
774
+ for (const n of e || [])
751
775
  n.remove();
752
- }, pe = function(e, t) {
753
- const n = t.parentElement.parentElement.contains(e);
754
- return e && e.tagName === "ME-TPC" && e !== t && !n && e.nodeObj.root !== !0;
755
- }, wt = function(e) {
756
- const t = document.createElement("div");
757
- return t.className = "mind-elixir-ghost", e.map.appendChild(t), t;
776
+ }, ve = function(t, e) {
777
+ const n = e.parentElement.parentElement.contains(t);
778
+ return t && t.tagName === "ME-TPC" && t !== e && !n && t.nodeObj.root !== !0;
779
+ }, Lt = function(t) {
780
+ const e = document.createElement("div");
781
+ return e.className = "mind-elixir-ghost", t.map.appendChild(e), e;
758
782
  };
759
- function kt(e) {
760
- let t = null, n = null, i = null;
761
- const s = wt(e), o = 12;
762
- e.map.addEventListener("dragstart", (r) => {
783
+ function Mt(t) {
784
+ let e = null, n = null, i = null;
785
+ const o = Lt(t), s = 12;
786
+ t.map.addEventListener("dragstart", (r) => {
763
787
  var c;
764
788
  const l = r.target;
765
789
  if ((l == null ? void 0 : l.tagName) !== "ME-TPC") {
766
790
  r.preventDefault();
767
791
  return;
768
792
  }
769
- t = l, t.parentElement.parentElement.style.opacity = "0.5", s.innerHTML = t.innerHTML, (c = r.dataTransfer) == null || c.setDragImage(s, 0, 0), j.clear();
770
- }), e.map.addEventListener("dragend", async (r) => {
771
- if (!t)
793
+ e = l, e.parentElement.parentElement.style.opacity = "0.5", o.innerHTML = e.innerHTML, (c = r.dataTransfer) == null || c.setDragImage(o, 0, 0), D.clear();
794
+ }), t.map.addEventListener("dragend", async (r) => {
795
+ if (!e)
772
796
  return;
773
- t.parentElement.parentElement.style.opacity = "1";
797
+ e.parentElement.parentElement.style.opacity = "1";
774
798
  const l = r.target;
775
799
  if (l.style.opacity = "", !i)
776
800
  return;
777
- oe(i);
778
- const c = t.nodeObj;
801
+ ce(i);
802
+ const c = e.nodeObj;
779
803
  switch (n) {
780
804
  case "before":
781
- e.moveNodeBefore(t, i), e.selectNode(C(c.id));
805
+ t.moveNodeBefore(e, i), t.selectNode(E(c.id));
782
806
  break;
783
807
  case "after":
784
- e.moveNodeAfter(t, i), e.selectNode(C(c.id));
808
+ t.moveNodeAfter(e, i), t.selectNode(E(c.id));
785
809
  break;
786
810
  case "in":
787
- e.moveNode(t, i);
811
+ t.moveNode(e, i);
788
812
  break;
789
813
  }
790
- t = null;
791
- }), e.map.addEventListener(
814
+ e = null;
815
+ }), t.map.addEventListener(
792
816
  "dragover",
793
- We(function(r) {
794
- if (!t)
817
+ Ke(function(r) {
818
+ if (!e)
795
819
  return;
796
- oe(i);
797
- const l = se.elementFromPoint(r.clientX, r.clientY - o);
798
- if (pe(l, t)) {
820
+ ce(i);
821
+ const l = le.elementFromPoint(r.clientX, r.clientY - s);
822
+ if (ve(l, e)) {
799
823
  i = l;
800
824
  const c = l.getBoundingClientRect().y;
801
825
  r.clientY > c + l.clientHeight ? n = "after" : r.clientY > c + l.clientHeight / 2 && (n = "in");
802
826
  } else {
803
- const c = se.elementFromPoint(r.clientX, r.clientY + o);
804
- if (pe(c, t)) {
827
+ const c = le.elementFromPoint(r.clientX, r.clientY + s);
828
+ if (ve(c, e)) {
805
829
  i = c;
806
- const u = c.getBoundingClientRect().y;
807
- r.clientY < u ? n = "before" : r.clientY < u + c.clientHeight / 2 && (n = "in");
830
+ const h = c.getBoundingClientRect().y;
831
+ r.clientY < h ? n = "before" : r.clientY < h + c.clientHeight / 2 && (n = "in");
808
832
  } else
809
833
  n = i = null;
810
834
  }
811
- i && _t(i, n);
835
+ i && St(i, n);
812
836
  }, 200)
813
837
  );
814
838
  }
815
- function St(e) {
816
- let t = [], n = -1, i = e.getData();
817
- e.bus.addListener("operation", (s) => {
818
- if (s.name === "beginEdit")
839
+ function Tt(t) {
840
+ let e = [], n = -1, i = t.getData();
841
+ t.bus.addListener("operation", (o) => {
842
+ if (o.name === "beginEdit")
819
843
  return;
820
- t = t.slice(0, n + 1);
821
- const o = e.getData();
822
- t.push({ prev: i, currentNodeId: s.obj.id, next: o }), i = o, n = t.length - 1, console.log("operation", s.obj.id, t);
823
- }), e.undo = function() {
844
+ e = e.slice(0, n + 1);
845
+ const s = t.getData();
846
+ e.push({ prev: i, currentNodeId: o.obj.id, next: s }), i = s, n = e.length - 1, console.log("operation", o.obj.id, e);
847
+ }), t.undo = function() {
824
848
  if (n > -1) {
825
- const s = t[n];
826
- i = s.prev, e.refresh(s.prev), e.selectNode(C(s.currentNodeId)), n--, console.log("current", i);
849
+ const o = e[n];
850
+ i = o.prev, t.refresh(o.prev), t.selectNode(E(o.currentNodeId)), n--, console.log("current", i);
827
851
  }
828
- }, e.redo = function() {
829
- if (n < t.length - 1) {
852
+ }, t.redo = function() {
853
+ if (n < e.length - 1) {
830
854
  n++;
831
- const s = t[n];
832
- i = s.next, e.refresh(s.next), e.selectNode(C(s.currentNodeId));
855
+ const o = e[n];
856
+ i = o.next, t.refresh(o.next), t.selectNode(E(o.currentNodeId));
833
857
  }
834
- }, e.map.addEventListener("keydown", (s) => {
835
- (s.metaKey || s.ctrlKey) && s.shiftKey && s.key === "Z" ? e.redo() : (s.metaKey || s.ctrlKey) && s.key === "z" && e.undo();
858
+ }, t.map.addEventListener("keydown", (o) => {
859
+ (o.metaKey || o.ctrlKey) && o.shiftKey && o.key === "Z" ? t.redo() : (o.metaKey || o.ctrlKey) && o.key === "z" && t.undo();
836
860
  });
837
861
  }
838
- const z = (e, t) => {
862
+ const B = (t, e) => {
839
863
  const n = document.createElement("span");
840
- return n.id = e, n.innerHTML = `<svg class="icon" aria-hidden="true">
841
- <use xlink:href="#icon-${t}"></use>
864
+ return n.id = t, n.innerHTML = `<svg class="icon" aria-hidden="true">
865
+ <use xlink:href="#icon-${e}"></use>
842
866
  </svg>`, n;
843
867
  };
844
- function Mt(e) {
845
- const t = document.createElement("div"), n = z("fullscreen", "full"), i = z("toCenter", "living"), s = z("zoomout", "move"), o = z("zoomin", "add"), r = document.createElement("span");
846
- return r.innerText = "100%", t.appendChild(n), t.appendChild(i), t.appendChild(s), t.appendChild(o), t.className = "mind-elixir-toolbar rb", n.onclick = () => {
847
- e.container.requestFullscreen();
868
+ function $t(t) {
869
+ const e = document.createElement("div"), n = B("fullscreen", "full"), i = B("toCenter", "living"), o = B("zoomout", "move"), s = B("zoomin", "add"), r = document.createElement("span");
870
+ return r.innerText = "100%", e.appendChild(n), e.appendChild(i), e.appendChild(o), e.appendChild(s), e.className = "mind-elixir-toolbar rb", n.onclick = () => {
871
+ t.container.requestFullscreen();
848
872
  }, i.onclick = () => {
849
- e.toCenter();
850
- }, s.onclick = () => {
851
- e.scaleVal < 0.6 || e.scale(e.scaleVal -= 0.2);
873
+ t.toCenter();
852
874
  }, o.onclick = () => {
853
- e.scaleVal > 1.6 || e.scale(e.scaleVal += 0.2);
854
- }, t;
875
+ t.scaleVal < 0.6 || t.scale(t.scaleVal -= 0.2);
876
+ }, s.onclick = () => {
877
+ t.scaleVal > 1.6 || t.scale(t.scaleVal += 0.2);
878
+ }, e;
855
879
  }
856
- function Lt(e) {
857
- const t = document.createElement("div"), n = z("tbltl", "left"), i = z("tbltr", "right"), s = z("tblts", "side");
858
- return t.appendChild(n), t.appendChild(i), t.appendChild(s), t.className = "mind-elixir-toolbar lt", n.onclick = () => {
859
- e.initLeft();
880
+ function Dt(t) {
881
+ const e = document.createElement("div"), n = B("tbltl", "left"), i = B("tbltr", "right"), o = B("tblts", "side");
882
+ return e.appendChild(n), e.appendChild(i), e.appendChild(o), e.className = "mind-elixir-toolbar lt", n.onclick = () => {
883
+ t.initLeft();
860
884
  }, i.onclick = () => {
861
- e.initRight();
862
- }, s.onclick = () => {
863
- e.initSide();
864
- }, t;
885
+ t.initRight();
886
+ }, o.onclick = () => {
887
+ t.initSide();
888
+ }, e;
865
889
  }
866
- function Tt(e) {
867
- e.container.append(Mt(e)), e.container.append(Lt(e));
890
+ function Ot(t) {
891
+ t.container.append($t(t)), t.container.append(Dt(t));
868
892
  }
869
893
  /*! @viselect/vanilla v3.3.1 MIT | https://github.com/Simonwep/selection/tree/master/packages/vanilla */
870
- var $t = Object.defineProperty, At = (e, t, n) => t in e ? $t(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, x = (e, t, n) => (At(e, typeof t != "symbol" ? t + "" : t, n), n);
871
- class Ot {
894
+ var At = Object.defineProperty, Pt = (t, e, n) => e in t ? At(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, w = (t, e, n) => (Pt(t, typeof e != "symbol" ? e + "" : e, n), n);
895
+ class jt {
872
896
  constructor() {
873
- x(this, "_listeners", /* @__PURE__ */ new Map()), x(this, "on", this.addEventListener), x(this, "off", this.removeEventListener), x(this, "emit", this.dispatchEvent);
897
+ w(this, "_listeners", /* @__PURE__ */ new Map()), w(this, "on", this.addEventListener), w(this, "off", this.removeEventListener), w(this, "emit", this.dispatchEvent);
874
898
  }
875
- addEventListener(t, n) {
876
- const i = this._listeners.get(t) ?? /* @__PURE__ */ new Set();
877
- return this._listeners.set(t, i), i.add(n), this;
899
+ addEventListener(e, n) {
900
+ const i = this._listeners.get(e) ?? /* @__PURE__ */ new Set();
901
+ return this._listeners.set(e, i), i.add(n), this;
878
902
  }
879
- removeEventListener(t, n) {
903
+ removeEventListener(e, n) {
880
904
  var i;
881
- return (i = this._listeners.get(t)) == null || i.delete(n), this;
905
+ return (i = this._listeners.get(e)) == null || i.delete(n), this;
882
906
  }
883
- dispatchEvent(t, ...n) {
907
+ dispatchEvent(e, ...n) {
884
908
  let i = !0;
885
- for (const s of this._listeners.get(t) ?? [])
886
- i = s(...n) !== !1 && i;
909
+ for (const o of this._listeners.get(e) ?? [])
910
+ i = o(...n) !== !1 && i;
887
911
  return i;
888
912
  }
889
913
  unbindAllListeners() {
890
914
  this._listeners.clear();
891
915
  }
892
916
  }
893
- const me = (e, t = "px") => typeof e == "number" ? e + t : e;
894
- function P({ style: e }, t, n) {
895
- if (typeof t == "object")
896
- for (const [i, s] of Object.entries(t))
897
- s !== void 0 && (e[i] = me(s));
917
+ const be = (t, e = "px") => typeof t == "number" ? t + e : t;
918
+ function O({ style: t }, e, n) {
919
+ if (typeof e == "object")
920
+ for (const [i, o] of Object.entries(e))
921
+ o !== void 0 && (t[i] = be(o));
898
922
  else
899
- n !== void 0 && (e[t] = me(n));
923
+ n !== void 0 && (t[e] = be(n));
900
924
  }
901
- function Pe(e) {
902
- return (t, n, i, s = {}) => {
903
- t instanceof HTMLCollection || t instanceof NodeList ? t = Array.from(t) : Array.isArray(t) || (t = [t]), Array.isArray(n) || (n = [n]);
904
- for (const o of t)
925
+ function Be(t) {
926
+ return (e, n, i, o = {}) => {
927
+ e instanceof HTMLCollection || e instanceof NodeList ? e = Array.from(e) : Array.isArray(e) || (e = [e]), Array.isArray(n) || (n = [n]);
928
+ for (const s of e)
905
929
  for (const r of n)
906
- o[e](r, i, { capture: !1, ...s });
907
- return [t, n, i, s];
930
+ s[t](r, i, { capture: !1, ...o });
931
+ return [e, n, i, o];
908
932
  };
909
933
  }
910
- const F = Pe("addEventListener"), D = Pe("removeEventListener"), G = (e) => {
911
- var t;
912
- const { clientX: n, clientY: i, target: s } = ((t = e.touches) == null ? void 0 : t[0]) ?? e;
913
- return { x: n, y: i, target: s };
934
+ const q = Be("addEventListener"), A = Be("removeEventListener"), Q = (t) => {
935
+ var e;
936
+ const { clientX: n, clientY: i, target: o } = ((e = t.touches) == null ? void 0 : e[0]) ?? t;
937
+ return { x: n, y: i, target: o };
914
938
  };
915
- function ge(e, t, n = "touch") {
939
+ function ye(t, e, n = "touch") {
916
940
  switch (n) {
917
941
  case "center": {
918
- const i = t.left + t.width / 2, s = t.top + t.height / 2;
919
- return i >= e.left && i <= e.right && s >= e.top && s <= e.bottom;
942
+ const i = e.left + e.width / 2, o = e.top + e.height / 2;
943
+ return i >= t.left && i <= t.right && o >= t.top && o <= t.bottom;
920
944
  }
921
945
  case "cover":
922
- return t.left >= e.left && t.top >= e.top && t.right <= e.right && t.bottom <= e.bottom;
946
+ return e.left >= t.left && e.top >= t.top && e.right <= t.right && e.bottom <= t.bottom;
923
947
  case "touch":
924
- return e.right >= t.left && e.left <= t.right && e.bottom >= t.top && e.top <= t.bottom;
948
+ return t.right >= e.left && t.left <= e.right && t.bottom >= e.top && t.top <= e.bottom;
925
949
  }
926
950
  }
927
- function Y(e, t = document) {
928
- const n = Array.isArray(e) ? e : [e];
951
+ function F(t, e = document) {
952
+ const n = Array.isArray(t) ? t : [t];
929
953
  let i = [];
930
- for (let s = 0, o = n.length; s < o; s++) {
931
- const r = n[s];
932
- typeof r == "string" ? i = i.concat(Array.from(t.querySelectorAll(r))) : r instanceof Element && i.push(r);
954
+ for (let o = 0, s = n.length; o < s; o++) {
955
+ const r = n[o];
956
+ typeof r == "string" ? i = i.concat(Array.from(e.querySelectorAll(r))) : r instanceof Element && i.push(r);
933
957
  }
934
958
  return i;
935
959
  }
936
- const jt = () => matchMedia("(hover: none), (pointer: coarse)").matches, Pt = () => "safari" in window, Dt = (e) => {
937
- let t, n = -1, i = !1;
960
+ const Ht = () => matchMedia("(hover: none), (pointer: coarse)").matches, Bt = () => "safari" in window, zt = (t) => {
961
+ let e, n = -1, i = !1;
938
962
  return {
939
- next(...s) {
940
- t = s, i || (i = !0, n = requestAnimationFrame(() => {
941
- e(...t), i = !1;
963
+ next(...o) {
964
+ e = o, i || (i = !0, n = requestAnimationFrame(() => {
965
+ t(...e), i = !1;
942
966
  }));
943
967
  },
944
968
  cancel() {
945
969
  cancelAnimationFrame(n), i = !1;
946
970
  }
947
971
  };
948
- }, { abs: B, max: be, min: ve, ceil: ye } = Math;
949
- class De extends Ot {
950
- constructor(t) {
951
- var n, i, s, o, r;
952
- super(), x(this, "_options"), x(this, "_selection", {
972
+ }, { abs: j, max: xe, min: we, ceil: Ee } = Math;
973
+ class ze extends jt {
974
+ constructor(e) {
975
+ var n, i, o, s, r;
976
+ super(), w(this, "_options"), w(this, "_selection", {
953
977
  stored: [],
954
978
  selected: [],
955
979
  touched: [],
@@ -959,7 +983,7 @@ class De extends Ot {
959
983
  removed: []
960
984
  // Removed elements since last selection
961
985
  }
962
- }), x(this, "_area"), x(this, "_clippingElement"), x(this, "_targetElement"), x(this, "_targetRect"), x(this, "_selectables", []), x(this, "_latestElement"), x(this, "_areaRect", new DOMRect()), x(this, "_areaLocation", { y1: 0, x2: 0, y2: 0, x1: 0 }), x(this, "_singleClick", !0), x(this, "_frame"), x(this, "_scrollAvailable", !0), x(this, "_scrollingActive", !1), x(this, "_scrollSpeed", { x: 0, y: 0 }), x(this, "_scrollDelta", { x: 0, y: 0 }), x(this, "disable", this._bindStartEvents.bind(this, !1)), x(this, "enable", this._bindStartEvents), this._options = {
986
+ }), w(this, "_area"), w(this, "_clippingElement"), w(this, "_targetElement"), w(this, "_targetRect"), w(this, "_selectables", []), w(this, "_latestElement"), w(this, "_areaRect", new DOMRect()), w(this, "_areaLocation", { y1: 0, x2: 0, y2: 0, x1: 0 }), w(this, "_singleClick", !0), w(this, "_frame"), w(this, "_scrollAvailable", !0), w(this, "_scrollingActive", !1), w(this, "_scrollSpeed", { x: 0, y: 0 }), w(this, "_scrollDelta", { x: 0, y: 0 }), w(this, "disable", this._bindStartEvents.bind(this, !1)), w(this, "enable", this._bindStartEvents), this._options = {
963
987
  selectionAreaClass: "selection-area",
964
988
  selectionContainerClass: void 0,
965
989
  selectables: [],
@@ -967,221 +991,221 @@ class De extends Ot {
967
991
  startAreas: ["html"],
968
992
  boundaries: ["html"],
969
993
  container: "body",
970
- ...t,
994
+ ...e,
971
995
  behaviour: {
972
996
  overlap: "invert",
973
997
  intersect: "touch",
974
- ...t.behaviour,
975
- 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 },
998
+ ...e.behaviour,
999
+ startThreshold: (n = e.behaviour) != null && n.startThreshold ? typeof e.behaviour.startThreshold == "number" ? e.behaviour.startThreshold : { x: 10, y: 10, ...e.behaviour.startThreshold } : { x: 10, y: 10 },
976
1000
  scrolling: {
977
1001
  speedDivider: 10,
978
1002
  manualSpeed: 750,
979
- ...(i = t.behaviour) == null ? void 0 : i.scrolling,
1003
+ ...(i = e.behaviour) == null ? void 0 : i.scrolling,
980
1004
  startScrollMargins: {
981
1005
  x: 0,
982
1006
  y: 0,
983
- ...(o = (s = t.behaviour) == null ? void 0 : s.scrolling) == null ? void 0 : o.startScrollMargins
1007
+ ...(s = (o = e.behaviour) == null ? void 0 : o.scrolling) == null ? void 0 : s.startScrollMargins
984
1008
  }
985
1009
  }
986
1010
  },
987
1011
  features: {
988
1012
  range: !0,
989
1013
  touch: !0,
990
- ...t.features,
1014
+ ...e.features,
991
1015
  singleTap: {
992
1016
  allow: !0,
993
1017
  intersect: "native",
994
- ...(r = t.features) == null ? void 0 : r.singleTap
1018
+ ...(r = e.features) == null ? void 0 : r.singleTap
995
1019
  }
996
1020
  }
997
1021
  };
998
- for (const d of Object.getOwnPropertyNames(Object.getPrototypeOf(this)))
999
- typeof this[d] == "function" && (this[d] = this[d].bind(this));
1000
- const { document: l, selectionAreaClass: c, selectionContainerClass: u } = this._options;
1001
- this._area = l.createElement("div"), this._clippingElement = l.createElement("div"), this._clippingElement.appendChild(this._area), this._area.classList.add(c), u && this._clippingElement.classList.add(u), P(this._area, {
1022
+ for (const a of Object.getOwnPropertyNames(Object.getPrototypeOf(this)))
1023
+ typeof this[a] == "function" && (this[a] = this[a].bind(this));
1024
+ const { document: l, selectionAreaClass: c, selectionContainerClass: h } = this._options;
1025
+ this._area = l.createElement("div"), this._clippingElement = l.createElement("div"), this._clippingElement.appendChild(this._area), this._area.classList.add(c), h && this._clippingElement.classList.add(h), O(this._area, {
1002
1026
  willChange: "top, left, bottom, right, width, height",
1003
1027
  top: 0,
1004
1028
  left: 0,
1005
1029
  position: "fixed"
1006
- }), P(this._clippingElement, {
1030
+ }), O(this._clippingElement, {
1007
1031
  overflow: "hidden",
1008
1032
  position: "fixed",
1009
1033
  transform: "translate3d(0, 0, 0)",
1010
1034
  // https://stackoverflow.com/a/38268846
1011
1035
  pointerEvents: "none",
1012
1036
  zIndex: "1"
1013
- }), this._frame = Dt((d) => {
1014
- this._recalculateSelectionAreaRect(), this._updateElementSelection(), this._emitEvent("move", d), this._redrawSelectionArea();
1037
+ }), this._frame = zt((a) => {
1038
+ this._recalculateSelectionAreaRect(), this._updateElementSelection(), this._emitEvent("move", a), this._redrawSelectionArea();
1015
1039
  }), this.enable();
1016
1040
  }
1017
- _bindStartEvents(t = !0) {
1018
- const { document: n, features: i } = this._options, s = t ? F : D;
1019
- s(n, "mousedown", this._onTapStart), i.touch && s(n, "touchstart", this._onTapStart, {
1041
+ _bindStartEvents(e = !0) {
1042
+ const { document: n, features: i } = this._options, o = e ? q : A;
1043
+ o(n, "mousedown", this._onTapStart), i.touch && o(n, "touchstart", this._onTapStart, {
1020
1044
  passive: !1
1021
1045
  });
1022
1046
  }
1023
- _onTapStart(t, n = !1) {
1024
- const { x: i, y: s, target: o } = G(t), { _options: r } = this, { document: l } = this._options, c = o.getBoundingClientRect(), u = Y(r.startAreas, r.document), d = Y(r.boundaries, r.document);
1025
- this._targetElement = d.find(
1026
- (p) => ge(p.getBoundingClientRect(), c)
1047
+ _onTapStart(e, n = !1) {
1048
+ const { x: i, y: o, target: s } = Q(e), { _options: r } = this, { document: l } = this._options, c = s.getBoundingClientRect(), h = F(r.startAreas, r.document), a = F(r.boundaries, r.document);
1049
+ this._targetElement = a.find(
1050
+ (p) => ye(p.getBoundingClientRect(), c)
1027
1051
  );
1028
- const h = t.composedPath();
1029
- if (!this._targetElement || !u.find((p) => h.includes(p)) || !d.find((p) => h.includes(p)) || !n && this._emitEvent("beforestart", t) === !1)
1052
+ const u = e.composedPath();
1053
+ if (!this._targetElement || !h.find((p) => u.includes(p)) || !a.find((p) => u.includes(p)) || !n && this._emitEvent("beforestart", e) === !1)
1030
1054
  return;
1031
- this._areaLocation = { x1: i, y1: s, x2: 0, y2: 0 };
1032
- const a = l.scrollingElement ?? l.body;
1033
- this._scrollDelta = { x: a.scrollLeft, y: a.scrollTop }, this._singleClick = !0, this.clearSelection(!1, !0), F(l, ["touchmove", "mousemove"], this._delayedTapMove, { passive: !1 }), F(l, ["mouseup", "touchcancel", "touchend"], this._onTapStop), F(l, "scroll", this._onScroll);
1055
+ this._areaLocation = { x1: i, y1: o, x2: 0, y2: 0 };
1056
+ const d = l.scrollingElement ?? l.body;
1057
+ this._scrollDelta = { x: d.scrollLeft, y: d.scrollTop }, this._singleClick = !0, this.clearSelection(!1, !0), q(l, ["touchmove", "mousemove"], this._delayedTapMove, { passive: !1 }), q(l, ["mouseup", "touchcancel", "touchend"], this._onTapStop), q(l, "scroll", this._onScroll);
1034
1058
  }
1035
- _onSingleTap(t) {
1036
- const { singleTap: { intersect: n }, range: i } = this._options.features, s = G(t);
1037
- let o;
1059
+ _onSingleTap(e) {
1060
+ const { singleTap: { intersect: n }, range: i } = this._options.features, o = Q(e);
1061
+ let s;
1038
1062
  if (n === "native")
1039
- o = s.target;
1063
+ s = o.target;
1040
1064
  else if (n === "touch") {
1041
1065
  this.resolveSelectables();
1042
- const { x: l, y: c } = s;
1043
- o = this._selectables.find((u) => {
1044
- const { right: d, left: h, top: a, bottom: p } = u.getBoundingClientRect();
1045
- return l < d && l > h && c < p && c > a;
1066
+ const { x: l, y: c } = o;
1067
+ s = this._selectables.find((h) => {
1068
+ const { right: a, left: u, top: d, bottom: p } = h.getBoundingClientRect();
1069
+ return l < a && l > u && c < p && c > d;
1046
1070
  });
1047
1071
  }
1048
- if (!o)
1072
+ if (!s)
1049
1073
  return;
1050
- for (this.resolveSelectables(); !this._selectables.includes(o); ) {
1051
- if (!o.parentElement)
1074
+ for (this.resolveSelectables(); !this._selectables.includes(s); ) {
1075
+ if (!s.parentElement)
1052
1076
  return;
1053
- o = o.parentElement;
1077
+ s = s.parentElement;
1054
1078
  }
1055
1079
  const { stored: r } = this._selection;
1056
- if (this._emitEvent("start", t), t.shiftKey && i && this._latestElement) {
1057
- const l = this._latestElement, [c, u] = l.compareDocumentPosition(o) & 4 ? [o, l] : [l, o], d = [...this._selectables.filter(
1058
- (h) => h.compareDocumentPosition(c) & 4 && h.compareDocumentPosition(u) & 2
1059
- ), c, u];
1060
- this.select(d), this._latestElement = l;
1080
+ if (this._emitEvent("start", e), e.shiftKey && i && this._latestElement) {
1081
+ const l = this._latestElement, [c, h] = l.compareDocumentPosition(s) & 4 ? [s, l] : [l, s], a = [...this._selectables.filter(
1082
+ (u) => u.compareDocumentPosition(c) & 4 && u.compareDocumentPosition(h) & 2
1083
+ ), c, h];
1084
+ this.select(a), this._latestElement = l;
1061
1085
  } else
1062
- r.includes(o) && (r.length === 1 || t.ctrlKey || r.every((l) => this._selection.stored.includes(l))) ? this.deselect(o) : (this.select(o), this._latestElement = o);
1063
- this._emitEvent("stop", t);
1086
+ r.includes(s) && (r.length === 1 || e.ctrlKey || r.every((l) => this._selection.stored.includes(l))) ? this.deselect(s) : (this.select(s), this._latestElement = s);
1087
+ this._emitEvent("stop", e);
1064
1088
  }
1065
- _delayedTapMove(t) {
1066
- const { container: n, document: i, behaviour: { startThreshold: s } } = this._options, { x1: o, y1: r } = this._areaLocation, { x: l, y: c } = G(t);
1089
+ _delayedTapMove(e) {
1090
+ const { container: n, document: i, behaviour: { startThreshold: o } } = this._options, { x1: s, y1: r } = this._areaLocation, { x: l, y: c } = Q(e);
1067
1091
  if (
1068
1092
  // Single number for both coordinates
1069
- typeof s == "number" && B(l + c - (o + r)) >= s || // Different x and y threshold
1070
- typeof s == "object" && B(l - o) >= s.x || B(c - r) >= s.y
1093
+ typeof o == "number" && j(l + c - (s + r)) >= o || // Different x and y threshold
1094
+ typeof o == "object" && j(l - s) >= o.x || j(c - r) >= o.y
1071
1095
  ) {
1072
- if (D(i, ["mousemove", "touchmove"], this._delayedTapMove, { passive: !1 }), this._emitEvent("beforedrag", t) === !1) {
1073
- D(i, ["mouseup", "touchcancel", "touchend"], this._onTapStop);
1096
+ if (A(i, ["mousemove", "touchmove"], this._delayedTapMove, { passive: !1 }), this._emitEvent("beforedrag", e) === !1) {
1097
+ A(i, ["mouseup", "touchcancel", "touchend"], this._onTapStop);
1074
1098
  return;
1075
1099
  }
1076
- F(i, ["mousemove", "touchmove"], this._onTapMove, { passive: !1 }), P(this._area, "display", "block"), Y(n, i)[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 && (F(i, "wheel", this._manualScroll, { passive: !1 }), this._selectables = this._selectables.filter((u) => this._targetElement.contains(u))), this._setupSelectionArea(), this._emitEvent("start", t), this._onTapMove(t);
1100
+ q(i, ["mousemove", "touchmove"], this._onTapMove, { passive: !1 }), O(this._area, "display", "block"), F(n, i)[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 && (q(i, "wheel", this._manualScroll, { passive: !1 }), this._selectables = this._selectables.filter((h) => this._targetElement.contains(h))), this._setupSelectionArea(), this._emitEvent("start", e), this._onTapMove(e);
1077
1101
  }
1078
- this._handleMoveEvent(t);
1102
+ this._handleMoveEvent(e);
1079
1103
  }
1080
1104
  _setupSelectionArea() {
1081
- const { _clippingElement: t, _targetElement: n, _area: i } = this, s = this._targetRect = n.getBoundingClientRect();
1082
- this._scrollAvailable ? (P(t, {
1083
- top: s.top,
1084
- left: s.left,
1085
- width: s.width,
1086
- height: s.height
1087
- }), P(i, {
1088
- marginTop: -s.top,
1089
- marginLeft: -s.left
1090
- })) : (P(t, {
1105
+ const { _clippingElement: e, _targetElement: n, _area: i } = this, o = this._targetRect = n.getBoundingClientRect();
1106
+ this._scrollAvailable ? (O(e, {
1107
+ top: o.top,
1108
+ left: o.left,
1109
+ width: o.width,
1110
+ height: o.height
1111
+ }), O(i, {
1112
+ marginTop: -o.top,
1113
+ marginLeft: -o.left
1114
+ })) : (O(e, {
1091
1115
  top: 0,
1092
1116
  left: 0,
1093
1117
  width: "100%",
1094
1118
  height: "100%"
1095
- }), P(i, {
1119
+ }), O(i, {
1096
1120
  marginTop: 0,
1097
1121
  marginLeft: 0
1098
1122
  }));
1099
1123
  }
1100
- _onTapMove(t) {
1101
- const { x: n, y: i } = G(t), { _scrollSpeed: s, _areaLocation: o, _options: r, _frame: l } = this, { speedDivider: c } = r.behaviour.scrolling, u = this._targetElement;
1102
- if (o.x2 = n, o.y2 = i, this._scrollAvailable && !this._scrollingActive && (s.y || s.x)) {
1124
+ _onTapMove(e) {
1125
+ const { x: n, y: i } = Q(e), { _scrollSpeed: o, _areaLocation: s, _options: r, _frame: l } = this, { speedDivider: c } = r.behaviour.scrolling, h = this._targetElement;
1126
+ if (s.x2 = n, s.y2 = i, this._scrollAvailable && !this._scrollingActive && (o.y || o.x)) {
1103
1127
  this._scrollingActive = !0;
1104
- const d = () => {
1105
- if (!s.x && !s.y) {
1128
+ const a = () => {
1129
+ if (!o.x && !o.y) {
1106
1130
  this._scrollingActive = !1;
1107
1131
  return;
1108
1132
  }
1109
- const { scrollTop: h, scrollLeft: a } = u;
1110
- s.y && (u.scrollTop += ye(s.y / c), o.y1 -= u.scrollTop - h), s.x && (u.scrollLeft += ye(s.x / c), o.x1 -= u.scrollLeft - a), l.next(t), requestAnimationFrame(d);
1133
+ const { scrollTop: u, scrollLeft: d } = h;
1134
+ o.y && (h.scrollTop += Ee(o.y / c), s.y1 -= h.scrollTop - u), o.x && (h.scrollLeft += Ee(o.x / c), s.x1 -= h.scrollLeft - d), l.next(e), requestAnimationFrame(a);
1111
1135
  };
1112
- requestAnimationFrame(d);
1136
+ requestAnimationFrame(a);
1113
1137
  } else
1114
- l.next(t);
1115
- this._handleMoveEvent(t);
1138
+ l.next(e);
1139
+ this._handleMoveEvent(e);
1116
1140
  }
1117
- _handleMoveEvent(t) {
1141
+ _handleMoveEvent(e) {
1118
1142
  const { features: n } = this._options;
1119
- (n.touch && jt() || this._scrollAvailable && Pt()) && t.preventDefault();
1143
+ (n.touch && Ht() || this._scrollAvailable && Bt()) && e.preventDefault();
1120
1144
  }
1121
1145
  _onScroll() {
1122
- const { _scrollDelta: t, _options: { document: n } } = this, { scrollTop: i, scrollLeft: s } = n.scrollingElement ?? n.body;
1123
- this._areaLocation.x1 += t.x - s, this._areaLocation.y1 += t.y - i, t.x = s, t.y = i, this._setupSelectionArea(), this._frame.next(null);
1146
+ const { _scrollDelta: e, _options: { document: n } } = this, { scrollTop: i, scrollLeft: o } = n.scrollingElement ?? n.body;
1147
+ this._areaLocation.x1 += e.x - o, this._areaLocation.y1 += e.y - i, e.x = o, e.y = i, this._setupSelectionArea(), this._frame.next(null);
1124
1148
  }
1125
- _manualScroll(t) {
1126
- const { manualSpeed: n } = this._options.behaviour.scrolling, i = t.deltaY ? t.deltaY > 0 ? 1 : -1 : 0, s = t.deltaX ? t.deltaX > 0 ? 1 : -1 : 0;
1127
- this._scrollSpeed.y += i * n, this._scrollSpeed.x += s * n, this._onTapMove(t), t.preventDefault();
1149
+ _manualScroll(e) {
1150
+ const { manualSpeed: n } = this._options.behaviour.scrolling, i = e.deltaY ? e.deltaY > 0 ? 1 : -1 : 0, o = e.deltaX ? e.deltaX > 0 ? 1 : -1 : 0;
1151
+ this._scrollSpeed.y += i * n, this._scrollSpeed.x += o * n, this._onTapMove(e), e.preventDefault();
1128
1152
  }
1129
1153
  _recalculateSelectionAreaRect() {
1130
- const { _scrollSpeed: t, _areaLocation: n, _areaRect: i, _targetElement: s, _options: o } = this, { scrollTop: r, scrollHeight: l, clientHeight: c, scrollLeft: u, scrollWidth: d, clientWidth: h } = s, a = this._targetRect, { x1: p, y1: g } = n;
1154
+ const { _scrollSpeed: e, _areaLocation: n, _areaRect: i, _targetElement: o, _options: s } = this, { scrollTop: r, scrollHeight: l, clientHeight: c, scrollLeft: h, scrollWidth: a, clientWidth: u } = o, d = this._targetRect, { x1: p, y1: g } = n;
1131
1155
  let { x2: m, y2: f } = n;
1132
- const { behaviour: { scrolling: { startScrollMargins: b } } } = o;
1133
- m < a.left + b.x ? (t.x = u ? -B(a.left - m + b.x) : 0, m = m < a.left ? a.left : m) : m > a.right - b.x ? (t.x = d - u - h ? B(a.left + a.width - m - b.x) : 0, m = m > a.right ? a.right : m) : t.x = 0, f < a.top + b.y ? (t.y = r ? -B(a.top - f + b.y) : 0, f = f < a.top ? a.top : f) : f > a.bottom - b.y ? (t.y = l - r - c ? B(a.top + a.height - f - b.y) : 0, f = f > a.bottom ? a.bottom : f) : t.y = 0;
1134
- const N = ve(p, m), v = ve(g, f), y = be(p, m), E = be(g, f);
1135
- i.x = N, i.y = v, i.width = y - N, i.height = E - v;
1156
+ const { behaviour: { scrolling: { startScrollMargins: v } } } = s;
1157
+ m < d.left + v.x ? (e.x = h ? -j(d.left - m + v.x) : 0, m = m < d.left ? d.left : m) : m > d.right - v.x ? (e.x = a - h - u ? j(d.left + d.width - m - v.x) : 0, m = m > d.right ? d.right : m) : e.x = 0, f < d.top + v.y ? (e.y = r ? -j(d.top - f + v.y) : 0, f = f < d.top ? d.top : f) : f > d.bottom - v.y ? (e.y = l - r - c ? j(d.top + d.height - f - v.y) : 0, f = f > d.bottom ? d.bottom : f) : e.y = 0;
1158
+ const x = we(p, m), b = we(g, f), y = xe(p, m), C = xe(g, f);
1159
+ i.x = x, i.y = b, i.width = y - x, i.height = C - b;
1136
1160
  }
1137
1161
  _redrawSelectionArea() {
1138
- const { x: t, y: n, width: i, height: s } = this._areaRect, { style: o } = this._area;
1139
- o.left = `${t}px`, o.top = `${n}px`, o.width = `${i}px`, o.height = `${s}px`;
1162
+ const { x: e, y: n, width: i, height: o } = this._areaRect, { style: s } = this._area;
1163
+ s.left = `${e}px`, s.top = `${n}px`, s.width = `${i}px`, s.height = `${o}px`;
1140
1164
  }
1141
- _onTapStop(t, n) {
1165
+ _onTapStop(e, n) {
1142
1166
  var i;
1143
- const { document: s, features: o } = this._options, { _singleClick: r } = this;
1144
- D(s, ["mousemove", "touchmove"], this._delayedTapMove), D(s, ["touchmove", "mousemove"], this._onTapMove), D(s, ["mouseup", "touchcancel", "touchend"], this._onTapStop), D(s, "scroll", this._onScroll), this._keepSelection(), t && r && o.singleTap.allow ? this._onSingleTap(t) : !r && !n && (this._updateElementSelection(), this._emitEvent("stop", t)), this._scrollSpeed.x = 0, this._scrollSpeed.y = 0, this._scrollAvailable && D(s, "wheel", this._manualScroll, { passive: !0 }), this._clippingElement.remove(), (i = this._frame) == null || i.cancel(), P(this._area, "display", "none");
1167
+ const { document: o, features: s } = this._options, { _singleClick: r } = this;
1168
+ A(o, ["mousemove", "touchmove"], this._delayedTapMove), A(o, ["touchmove", "mousemove"], this._onTapMove), A(o, ["mouseup", "touchcancel", "touchend"], this._onTapStop), A(o, "scroll", this._onScroll), this._keepSelection(), e && r && s.singleTap.allow ? this._onSingleTap(e) : !r && !n && (this._updateElementSelection(), this._emitEvent("stop", e)), this._scrollSpeed.x = 0, this._scrollSpeed.y = 0, this._scrollAvailable && A(o, "wheel", this._manualScroll, { passive: !0 }), this._clippingElement.remove(), (i = this._frame) == null || i.cancel(), O(this._area, "display", "none");
1145
1169
  }
1146
1170
  _updateElementSelection() {
1147
- const { _selectables: t, _options: n, _selection: i, _areaRect: s } = this, { stored: o, selected: r, touched: l } = i, { intersect: c, overlap: u } = n.behaviour, d = u === "invert", h = [], a = [], p = [];
1148
- for (let m = 0; m < t.length; m++) {
1149
- const f = t[m];
1150
- if (ge(s, f.getBoundingClientRect(), c)) {
1171
+ const { _selectables: e, _options: n, _selection: i, _areaRect: o } = this, { stored: s, selected: r, touched: l } = i, { intersect: c, overlap: h } = n.behaviour, a = h === "invert", u = [], d = [], p = [];
1172
+ for (let m = 0; m < e.length; m++) {
1173
+ const f = e[m];
1174
+ if (ye(o, f.getBoundingClientRect(), c)) {
1151
1175
  if (r.includes(f))
1152
- o.includes(f) && !l.includes(f) && l.push(f);
1153
- else if (d && o.includes(f)) {
1176
+ s.includes(f) && !l.includes(f) && l.push(f);
1177
+ else if (a && s.includes(f)) {
1154
1178
  p.push(f);
1155
1179
  continue;
1156
1180
  } else
1157
- a.push(f);
1158
- h.push(f);
1181
+ d.push(f);
1182
+ u.push(f);
1159
1183
  }
1160
1184
  }
1161
- d && a.push(...o.filter((m) => !r.includes(m)));
1162
- const g = u === "keep";
1185
+ a && d.push(...s.filter((m) => !r.includes(m)));
1186
+ const g = h === "keep";
1163
1187
  for (let m = 0; m < r.length; m++) {
1164
1188
  const f = r[m];
1165
- !h.includes(f) && !// Check if user wants to keep previously selected elements, e.g.
1189
+ !u.includes(f) && !// Check if user wants to keep previously selected elements, e.g.
1166
1190
  // not make them part of the current selection as soon as they're touched.
1167
- (g && o.includes(f)) && p.push(f);
1191
+ (g && s.includes(f)) && p.push(f);
1168
1192
  }
1169
- i.selected = h, i.changed = { added: a, removed: p }, this._latestElement = void 0;
1193
+ i.selected = u, i.changed = { added: d, removed: p }, this._latestElement = void 0;
1170
1194
  }
1171
- _emitEvent(t, n) {
1172
- return this.emit(t, {
1195
+ _emitEvent(e, n) {
1196
+ return this.emit(e, {
1173
1197
  event: n,
1174
1198
  store: this._selection,
1175
1199
  selection: this
1176
1200
  });
1177
1201
  }
1178
1202
  _keepSelection() {
1179
- const { _options: t, _selection: n } = this, { selected: i, changed: s, touched: o, stored: r } = n, l = i.filter((c) => !r.includes(c));
1180
- switch (t.behaviour.overlap) {
1203
+ const { _options: e, _selection: n } = this, { selected: i, changed: o, touched: s, stored: r } = n, l = i.filter((c) => !r.includes(c));
1204
+ switch (e.behaviour.overlap) {
1181
1205
  case "drop": {
1182
1206
  n.stored = [
1183
1207
  ...l,
1184
- ...r.filter((c) => !o.includes(c))
1208
+ ...r.filter((c) => !s.includes(c))
1185
1209
  // Elements not touched
1186
1210
  ];
1187
1211
  break;
@@ -1189,7 +1213,7 @@ class De extends Ot {
1189
1213
  case "invert": {
1190
1214
  n.stored = [
1191
1215
  ...l,
1192
- ...r.filter((c) => !s.removed.includes(c))
1216
+ ...r.filter((c) => !o.removed.includes(c))
1193
1217
  // Elements not removed from selection
1194
1218
  ];
1195
1219
  break;
@@ -1209,28 +1233,28 @@ class De extends Ot {
1209
1233
  * @param evt A MouseEvent / TouchEvent -like object
1210
1234
  * @param silent If beforestart should be fired,
1211
1235
  */
1212
- trigger(t, n = !0) {
1213
- this._onTapStart(t, n);
1236
+ trigger(e, n = !0) {
1237
+ this._onTapStart(e, n);
1214
1238
  }
1215
1239
  /**
1216
1240
  * Can be used if during a selection elements have been added.
1217
1241
  * Will update everything which can be selected.
1218
1242
  */
1219
1243
  resolveSelectables() {
1220
- this._selectables = Y(this._options.selectables, this._options.document);
1244
+ this._selectables = F(this._options.selectables, this._options.document);
1221
1245
  }
1222
1246
  /**
1223
1247
  * Same as deselect, but for all elements currently selected.
1224
1248
  * @param includeStored If the store should also get cleared
1225
1249
  * @param quiet If move / stop events should be fired
1226
1250
  */
1227
- clearSelection(t = !0, n = !1) {
1228
- const { selected: i, stored: s, changed: o } = this._selection;
1229
- o.added = [], o.removed.push(
1251
+ clearSelection(e = !0, n = !1) {
1252
+ const { selected: i, stored: o, changed: s } = this._selection;
1253
+ s.added = [], s.removed.push(
1230
1254
  ...i,
1231
- ...t ? s : []
1255
+ ...e ? o : []
1232
1256
  ), n || (this._emitEvent("move", null), this._emitEvent("stop", null)), this._selection = {
1233
- stored: t ? [] : s,
1257
+ stored: e ? [] : o,
1234
1258
  selected: [],
1235
1259
  touched: [],
1236
1260
  changed: { added: [], removed: [] }
@@ -1252,8 +1276,8 @@ class De extends Ot {
1252
1276
  * Cancel the current selection process.
1253
1277
  * @param keepEvent {boolean} true to fire a stop event after cancel.
1254
1278
  */
1255
- cancel(t = !1) {
1256
- this._onTapStop(null, !t);
1279
+ cancel(e = !1) {
1280
+ this._onTapStop(null, !e);
1257
1281
  }
1258
1282
  /**
1259
1283
  * Unbinds all events and removes the area-element.
@@ -1266,29 +1290,29 @@ class De extends Ot {
1266
1290
  * @param query - CSS Query, can be an array of queries
1267
1291
  * @param quiet - If this should not trigger the move event
1268
1292
  */
1269
- select(t, n = !1) {
1270
- const { changed: i, selected: s, stored: o } = this._selection, r = Y(t, this._options.document).filter(
1271
- (l) => !s.includes(l) && !o.includes(l)
1293
+ select(e, n = !1) {
1294
+ const { changed: i, selected: o, stored: s } = this._selection, r = F(e, this._options.document).filter(
1295
+ (l) => !o.includes(l) && !s.includes(l)
1272
1296
  );
1273
- return o.push(...r), s.push(...r), i.added.push(...r), i.removed = [], this._latestElement = void 0, n || (this._emitEvent("move", null), this._emitEvent("stop", null)), r;
1297
+ return s.push(...r), o.push(...r), i.added.push(...r), i.removed = [], this._latestElement = void 0, n || (this._emitEvent("move", null), this._emitEvent("stop", null)), r;
1274
1298
  }
1275
1299
  /**
1276
1300
  * Removes a particular element from the selection.
1277
1301
  * @param query - CSS Query, can be an array of queries
1278
1302
  * @param quiet - If this should not trigger the move event
1279
1303
  */
1280
- deselect(t, n = !1) {
1281
- const { selected: i, stored: s, changed: o } = this._selection, r = Y(t, this._options.document).filter(
1282
- (l) => i.includes(l) || s.includes(l)
1304
+ deselect(e, n = !1) {
1305
+ const { selected: i, stored: o, changed: s } = this._selection, r = F(e, this._options.document).filter(
1306
+ (l) => i.includes(l) || o.includes(l)
1283
1307
  );
1284
- r.length && (this._selection.stored = s.filter((l) => !r.includes(l)), this._selection.selected = i.filter((l) => !r.includes(l)), this._selection.changed.added = [], this._selection.changed.removed.push(
1285
- ...r.filter((l) => !o.removed.includes(l))
1308
+ r.length && (this._selection.stored = o.filter((l) => !r.includes(l)), this._selection.selected = i.filter((l) => !r.includes(l)), this._selection.changed.added = [], this._selection.changed.removed.push(
1309
+ ...r.filter((l) => !s.removed.includes(l))
1286
1310
  ), this._latestElement = void 0, n || (this._emitEvent("move", null), this._emitEvent("stop", null)));
1287
1311
  }
1288
1312
  }
1289
- x(De, "version", "3.3.1");
1290
- function Ht(e) {
1291
- const t = new De({
1313
+ w(ze, "version", "3.3.1");
1314
+ function Rt(t) {
1315
+ const e = new ze({
1292
1316
  selectables: [".map-container me-tpc"],
1293
1317
  boundaries: [".map-container"],
1294
1318
  container: ".map-container",
@@ -1307,8 +1331,8 @@ function Ht(e) {
1307
1331
  startScrollMargins: { x: 10, y: 10 }
1308
1332
  }
1309
1333
  }
1310
- }).on("beforestart", ({ event: n }) => !(n.button !== 0 || n.target.tagName === "ME-TPC" || n.target.id === "input-box")).on("start", ({ event: n }) => {
1311
- !n.ctrlKey && !n.metaKey && (e.unselectNode(), e.unselectNodes(), e.unselectSummary(), t.clearSelection(!0, !0));
1334
+ }).on("beforestart", ({ event: n }) => !(n.button !== 0 || n.target.tagName === "ME-TPC" || n.target.id === "input-box" || n.target.className === "circle")).on("start", ({ event: n }) => {
1335
+ !n.ctrlKey && !n.metaKey && (t.unselectNode(), t.unselectNodes(), t.unselectSummary(), e.clearSelection(!0, !0));
1312
1336
  }).on(
1313
1337
  "move",
1314
1338
  ({
@@ -1316,217 +1340,217 @@ function Ht(e) {
1316
1340
  changed: { added: n, removed: i }
1317
1341
  }
1318
1342
  }) => {
1319
- j.moved = !0;
1320
- for (const s of n)
1321
- s.classList.add("selected");
1322
- for (const s of i)
1323
- s.classList.remove("selected");
1343
+ D.moved = !0;
1344
+ for (const o of n)
1345
+ o.classList.add("selected");
1346
+ for (const o of i)
1347
+ o.classList.remove("selected");
1324
1348
  }
1325
1349
  ).on("stop", ({ store: { stored: n } }) => {
1326
- console.log(n, "stored"), e.selectNodes(n);
1350
+ console.log(n, "stored"), t.selectNodes(n);
1327
1351
  });
1328
- console.log(t, "selection");
1352
+ console.log(e, "selection");
1329
1353
  }
1330
- const Bt = function(e, t = !0) {
1331
- this.theme = e;
1354
+ const qt = function(t, e = !0) {
1355
+ this.theme = t;
1332
1356
  const n = this.theme.cssVar, i = Object.keys(n);
1333
- for (let s = 0; s < i.length; s++) {
1334
- const o = i[s];
1335
- this.mindElixirBox.style.setProperty(o, n[o]);
1357
+ for (let o = 0; o < i.length; o++) {
1358
+ const s = i[o];
1359
+ this.mindElixirBox.style.setProperty(s, n[s]);
1336
1360
  }
1337
- t && this.refresh();
1361
+ e && this.refresh();
1338
1362
  };
1339
- function He(e) {
1363
+ function Re(t) {
1340
1364
  return {
1341
- nodeData: e.isFocusMode ? e.nodeDataBackup : e.nodeData,
1342
- linkData: e.linkData,
1343
- summaries: e.summaries,
1344
- direction: e.direction,
1345
- theme: e.theme
1365
+ nodeData: t.isFocusMode ? t.nodeDataBackup : t.nodeData,
1366
+ linkData: t.linkData,
1367
+ summaries: t.summaries,
1368
+ direction: t.direction,
1369
+ theme: t.theme
1346
1370
  };
1347
1371
  }
1348
- const Rt = function(e, t, n) {
1349
- if (e) {
1350
- if (console.time("selectNode"), typeof e == "string") {
1351
- const i = C(e);
1372
+ const Ft = function(t, e, n) {
1373
+ if (t) {
1374
+ if (console.time("selectNode"), typeof t == "string") {
1375
+ const i = E(t);
1352
1376
  return i ? this.selectNode(i) : void 0;
1353
1377
  }
1354
- this.currentNode && (this.currentNode.className = ""), e.className = "selected", e.scrollIntoView({ block: "nearest", inline: "nearest" }), this.currentNode = e, t ? this.bus.fire("selectNewNode", e.nodeObj) : this.bus.fire("selectNode", e.nodeObj, n), console.timeEnd("selectNode");
1378
+ this.currentNode && (this.currentNode.className = ""), t.className = "selected", t.scrollIntoView({ block: "nearest", inline: "nearest" }), this.currentNode = t, e ? this.bus.fire("selectNewNode", t.nodeObj) : this.bus.fire("selectNode", t.nodeObj, n), console.timeEnd("selectNode");
1355
1379
  }
1356
- }, zt = function() {
1380
+ }, Vt = function() {
1357
1381
  this.currentNode && (this.currentNode.className = ""), this.currentNode = null, this.bus.fire("unselectNode");
1358
- }, Vt = function(e) {
1359
- if (e) {
1382
+ }, Wt = function(t) {
1383
+ if (t) {
1360
1384
  console.time("selectNodes");
1361
- for (const t of e)
1362
- t.className = "selected";
1363
- this.currentNodes = e, this.bus.fire(
1385
+ for (const e of t)
1386
+ e.className = "selected";
1387
+ this.currentNodes = t, this.bus.fire(
1364
1388
  "selectNodes",
1365
- e.map((t) => t.nodeObj)
1389
+ t.map((e) => e.nodeObj)
1366
1390
  ), console.timeEnd("selectNodes");
1367
1391
  }
1368
- }, qt = function() {
1392
+ }, Yt = function() {
1369
1393
  if (this.currentNodes)
1370
- for (const e of this.currentNodes)
1371
- e.classList.remove("selected");
1394
+ for (const t of this.currentNodes)
1395
+ t.classList.remove("selected");
1372
1396
  this.currentNodes = null, this.bus.fire("unselectNodes");
1373
- }, Ft = function() {
1397
+ }, It = function() {
1374
1398
  if (!this.currentNode || this.currentNode.dataset.nodeid === "meroot")
1375
1399
  return !1;
1376
- const e = this.currentNode.parentElement.parentElement.nextSibling;
1377
- let t;
1378
- if (e)
1379
- t = e.firstChild.firstChild;
1400
+ const t = this.currentNode.parentElement.parentElement.nextSibling;
1401
+ let e;
1402
+ if (t)
1403
+ e = t.firstChild.firstChild;
1380
1404
  else
1381
1405
  return !1;
1382
- return this.selectNode(t), !0;
1383
- }, Yt = function() {
1406
+ return this.selectNode(e), !0;
1407
+ }, Xt = function() {
1384
1408
  if (!this.currentNode || this.currentNode.dataset.nodeid === "meroot")
1385
1409
  return !1;
1386
- const e = this.currentNode.parentElement.parentElement.previousSibling;
1387
- let t;
1388
- if (e)
1389
- t = e.firstChild.firstChild;
1410
+ const t = this.currentNode.parentElement.parentElement.previousSibling;
1411
+ let e;
1412
+ if (t)
1413
+ e = t.firstChild.firstChild;
1390
1414
  else
1391
1415
  return !1;
1392
- return this.selectNode(t), !0;
1393
- }, Wt = function() {
1416
+ return this.selectNode(e), !0;
1417
+ }, Kt = function() {
1394
1418
  if (!this.currentNode)
1395
1419
  return;
1396
- const e = this.currentNode.parentElement.nextSibling;
1397
- if (e && e.firstChild) {
1398
- const t = e.firstChild.firstChild.firstChild;
1399
- this.selectNode(t);
1420
+ const t = this.currentNode.parentElement.nextSibling;
1421
+ if (t && t.firstChild) {
1422
+ const e = t.firstChild.firstChild.firstChild;
1423
+ this.selectNode(e);
1400
1424
  }
1401
- }, Xt = function() {
1425
+ }, Ut = function() {
1402
1426
  if (!this.currentNode || this.currentNode.dataset.nodeid === "meroot")
1403
1427
  return;
1404
- const e = this.currentNode.parentElement.parentElement.parentElement.previousSibling;
1405
- if (e) {
1406
- const t = e.firstChild;
1407
- this.selectNode(t);
1428
+ const t = this.currentNode.parentElement.parentElement.parentElement.previousSibling;
1429
+ if (t) {
1430
+ const e = t.firstChild;
1431
+ this.selectNode(e);
1408
1432
  }
1409
- }, It = function() {
1410
- const e = He(this);
1411
- return JSON.stringify(e, (t, n) => {
1412
- if (!(t === "parent" && typeof n != "string"))
1413
- return t === "from" || t === "to" ? n.nodeObj.id : n;
1433
+ }, Gt = function() {
1434
+ const t = Re(this);
1435
+ return JSON.stringify(t, (e, n) => {
1436
+ if (!(e === "parent" && typeof n != "string"))
1437
+ return n;
1414
1438
  });
1415
- }, Kt = function() {
1439
+ }, Jt = function() {
1416
1440
  return JSON.parse(this.getDataString());
1417
- }, Ut = function() {
1418
- const e = He(this).nodeData;
1419
- let t = "# " + e.topic + `
1441
+ }, Qt = function() {
1442
+ const t = Re(this).nodeData;
1443
+ let e = "# " + t.topic + `
1420
1444
 
1421
1445
  `;
1422
- function n(i, s) {
1423
- for (let o = 0; o < i.length; o++)
1424
- s <= 6 ? t += "".padStart(s, "#") + " " + i[o].topic + `
1446
+ function n(i, o) {
1447
+ for (let s = 0; s < i.length; s++)
1448
+ o <= 6 ? e += "".padStart(o, "#") + " " + i[s].topic + `
1425
1449
 
1426
- ` : t += "".padStart(s - 7, " ") + "- " + i[o].topic + `
1427
- `, i[o].children && n(i[o].children || [], s + 1);
1450
+ ` : e += "".padStart(o - 7, " ") + "- " + i[s].topic + `
1451
+ `, i[s].children && n(i[s].children || [], o + 1);
1428
1452
  }
1429
- return n(e.children || [], 2), t;
1430
- }, Gt = function() {
1453
+ return n(t.children || [], 2), e;
1454
+ }, Zt = function() {
1431
1455
  this.editable = !0;
1432
- }, Jt = function() {
1456
+ }, en = function() {
1433
1457
  this.editable = !1;
1434
- }, Qt = function(e) {
1435
- this.scaleVal = e, this.map.style.transform = "scale(" + e + ")";
1436
- }, Zt = function() {
1437
- this.container.scrollTo(1e4 - this.container.offsetWidth / 2, 1e4 - this.container.offsetHeight / 2);
1438
- }, en = function(e) {
1439
- e(this);
1440
- }, tn = function(e) {
1441
- e.nodeObj.root || (this.tempDirection === null && (this.tempDirection = this.direction), this.isFocusMode || (this.nodeDataBackup = this.nodeData, this.isFocusMode = !0), this.nodeData = e.nodeObj, this.nodeData.root = !0, this.initRight(), this.toCenter());
1458
+ }, tn = function(t) {
1459
+ this.scaleVal = t, this.map.style.transform = "scale(" + t + ")";
1442
1460
  }, nn = function() {
1461
+ this.container.scrollTo(1e4 - this.container.offsetWidth / 2, 1e4 - this.container.offsetHeight / 2);
1462
+ }, on = function(t) {
1463
+ t(this);
1464
+ }, sn = function(t) {
1465
+ t.nodeObj.root || (this.tempDirection === null && (this.tempDirection = this.direction), this.isFocusMode || (this.nodeDataBackup = this.nodeData, this.isFocusMode = !0), this.nodeData = t.nodeObj, this.nodeData.root = !0, this.initRight(), this.toCenter());
1466
+ }, rn = function() {
1443
1467
  this.isFocusMode = !1, this.tempDirection !== null && (delete this.nodeData.root, this.nodeData = this.nodeDataBackup, this.direction = this.tempDirection, this.tempDirection = null, this.refresh(), this.toCenter());
1444
- }, sn = function() {
1468
+ }, ln = function() {
1445
1469
  this.direction = 0, this.refresh();
1446
- }, on = function() {
1470
+ }, cn = function() {
1447
1471
  this.direction = 1, this.refresh();
1448
- }, rn = function() {
1472
+ }, an = function() {
1449
1473
  this.direction = 2, this.refresh();
1450
- }, ln = function(e) {
1451
- this.locale = e, this.refresh();
1452
- }, cn = function(e, t) {
1453
- const n = e.nodeObj;
1454
- typeof t == "boolean" ? n.expanded = t : n.expanded !== !1 ? n.expanded = !1 : n.expanded = !0, this.layout(), this.linkDiv(), this.bus.fire("expandNode", n);
1455
- }, an = function(e) {
1456
- e && (e = JSON.parse(JSON.stringify(e)), this.nodeData = e.nodeData, this.linkData = e.linkData || {}), $(this.nodeData), this.layout(), this.linkDiv();
1457
- }, dn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1474
+ }, dn = function(t) {
1475
+ this.locale = t, this.refresh();
1476
+ }, hn = function(t, e) {
1477
+ const n = t.nodeObj;
1478
+ typeof e == "boolean" ? n.expanded = e : n.expanded !== !1 ? n.expanded = !1 : n.expanded = !0, this.layout(), this.linkDiv(), this.bus.fire("expandNode", n);
1479
+ }, un = function(t) {
1480
+ t && (t = JSON.parse(JSON.stringify(t)), this.nodeData = t.nodeData, this.linkData = t.linkData || {}), T(this.nodeData), this.layout(), this.linkDiv();
1481
+ }, fn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1458
1482
  __proto__: null,
1459
- cancelFocus: nn,
1460
- disableEdit: Jt,
1461
- enableEdit: Gt,
1462
- expandNode: cn,
1463
- focusNode: tn,
1464
- getData: Kt,
1465
- getDataMd: Ut,
1466
- getDataString: It,
1467
- initLeft: sn,
1468
- initRight: on,
1469
- initSide: rn,
1470
- install: en,
1471
- refresh: an,
1472
- scale: Qt,
1473
- selectFirstChild: Wt,
1474
- selectNextSibling: Ft,
1475
- selectNode: Rt,
1476
- selectNodes: Vt,
1477
- selectParent: Xt,
1478
- selectPrevSibling: Yt,
1479
- setLocale: ln,
1480
- toCenter: Zt,
1481
- unselectNode: zt,
1482
- unselectNodes: qt
1483
- }, Symbol.toStringTag, { value: "Module" })), te = function(e) {
1484
- const n = e.parentElement.parentElement.lastElementChild;
1483
+ cancelFocus: rn,
1484
+ disableEdit: en,
1485
+ enableEdit: Zt,
1486
+ expandNode: hn,
1487
+ focusNode: sn,
1488
+ getData: Jt,
1489
+ getDataMd: Qt,
1490
+ getDataString: Gt,
1491
+ initLeft: ln,
1492
+ initRight: cn,
1493
+ initSide: an,
1494
+ install: on,
1495
+ refresh: un,
1496
+ scale: tn,
1497
+ selectFirstChild: Kt,
1498
+ selectNextSibling: It,
1499
+ selectNode: Ft,
1500
+ selectNodes: Wt,
1501
+ selectParent: Ut,
1502
+ selectPrevSibling: Xt,
1503
+ setLocale: dn,
1504
+ toCenter: nn,
1505
+ unselectNode: Vt,
1506
+ unselectNodes: Yt
1507
+ }, Symbol.toStringTag, { value: "Module" })), se = function(t) {
1508
+ const n = t.parentElement.parentElement.lastElementChild;
1485
1509
  (n == null ? void 0 : n.tagName) === "svg" && (n == null || n.remove());
1486
- }, Be = function(e, t) {
1510
+ }, qe = function(t, e) {
1487
1511
  var n, i;
1488
- if (e === S)
1512
+ if (t === S)
1489
1513
  return S;
1490
- if (e === R)
1491
- return R;
1492
- if (e === I) {
1493
- const s = ((n = document.querySelector(".lhs")) == null ? void 0 : n.childElementCount) || 0, o = ((i = document.querySelector(".rhs")) == null ? void 0 : i.childElementCount) || 0;
1494
- return s <= o ? (t.direction = S, S) : (t.direction = R, R);
1495
- }
1496
- }, hn = function(e, t) {
1497
- console.log(t);
1498
- const n = e.nodeObj, i = Le(n);
1499
- i.style && t.style && (t.style = Object.assign(i.style, t.style));
1500
- const s = Object.assign(n, t);
1501
- le(e, s), this.linkDiv(), this.bus.fire("operation", {
1514
+ if (t === H)
1515
+ return H;
1516
+ if (t === K) {
1517
+ const o = ((n = document.querySelector(".lhs")) == null ? void 0 : n.childElementCount) || 0, s = ((i = document.querySelector(".rhs")) == null ? void 0 : i.childElementCount) || 0;
1518
+ return o <= s ? (e.direction = S, S) : (e.direction = H, H);
1519
+ }
1520
+ }, pn = function(t, e) {
1521
+ console.log(e);
1522
+ const n = t.nodeObj, i = De(n);
1523
+ i.style && e.style && (e.style = Object.assign(i.style, e.style));
1524
+ const o = Object.assign(n, e);
1525
+ ae(t, o), this.linkDiv(), this.bus.fire("operation", {
1502
1526
  name: "reshapeNode",
1503
- obj: s,
1527
+ obj: o,
1504
1528
  origin: i
1505
1529
  });
1506
- }, un = function(e, t) {
1507
- var u, d, h;
1508
- const n = e || this.currentNode;
1530
+ }, mn = function(t, e) {
1531
+ var h, a, u;
1532
+ const n = t || this.currentNode;
1509
1533
  if (!n)
1510
1534
  return;
1511
1535
  const i = n.nodeObj;
1512
1536
  if (i.root === !0) {
1513
1537
  this.addChild();
1514
1538
  return;
1515
- } else if (((u = i.parent) == null ? void 0 : u.root) === !0 && ((h = (d = i.parent) == null ? void 0 : d.children) == null ? void 0 : h.length) === 1) {
1516
- this.addChild(C(i.parent.id));
1539
+ } else if (((h = i.parent) == null ? void 0 : h.root) === !0 && ((u = (a = i.parent) == null ? void 0 : a.children) == null ? void 0 : u.length) === 1) {
1540
+ this.addChild(E(i.parent.id));
1517
1541
  return;
1518
1542
  }
1519
- const s = t || this.generateNewObj();
1520
- Ge(i, s), $(this.nodeData);
1521
- const o = n.parentElement;
1543
+ const o = e || this.generateNewObj();
1544
+ Ze(i, o), T(this.nodeData);
1545
+ const s = n.parentElement;
1522
1546
  console.time("insertSibling_DOM");
1523
- const { grp: r, top: l } = this.createWrapper(s);
1524
- o.parentNode.parentNode.insertBefore(r, o.parentNode.nextSibling), this.linkDiv(r.offsetParent), t || this.editTopic(l.firstChild), this.selectNode(l.firstChild, !0), console.timeEnd("insertSibling_DOM"), this.bus.fire("operation", {
1547
+ const { grp: r, top: l } = this.createWrapper(o);
1548
+ s.parentNode.parentNode.insertBefore(r, s.parentNode.nextSibling), this.linkDiv(r.offsetParent), e || this.editTopic(l.firstChild), this.selectNode(l.firstChild, !0), console.timeEnd("insertSibling_DOM"), this.bus.fire("operation", {
1525
1549
  name: "insertSibling",
1526
- obj: s
1550
+ obj: o
1527
1551
  });
1528
- }, fn = function(e, t) {
1529
- const n = e || this.currentNode;
1552
+ }, gn = function(t, e) {
1553
+ const n = t || this.currentNode;
1530
1554
  if (!n)
1531
1555
  return;
1532
1556
  const i = n.nodeObj;
@@ -1534,545 +1558,718 @@ const Rt = function(e, t, n) {
1534
1558
  this.addChild();
1535
1559
  return;
1536
1560
  }
1537
- const s = t || this.generateNewObj();
1538
- Je(i, s), $(this.nodeData);
1539
- const o = n.parentElement;
1561
+ const o = e || this.generateNewObj();
1562
+ et(i, o), T(this.nodeData);
1563
+ const s = n.parentElement;
1540
1564
  console.time("insertSibling_DOM");
1541
- const { grp: r, top: l } = this.createWrapper(s);
1542
- o.parentNode.parentNode.insertBefore(r, o.parentNode), this.linkDiv(r.offsetParent), t || this.editTopic(l.firstChild), this.selectNode(l.firstChild, !0), console.timeEnd("insertSibling_DOM"), this.bus.fire("operation", {
1565
+ const { grp: r, top: l } = this.createWrapper(o);
1566
+ s.parentNode.parentNode.insertBefore(r, s.parentNode), this.linkDiv(r.offsetParent), e || this.editTopic(l.firstChild), this.selectNode(l.firstChild, !0), console.timeEnd("insertSibling_DOM"), this.bus.fire("operation", {
1543
1567
  name: "insertBefore",
1544
- obj: s
1568
+ obj: o
1545
1569
  });
1546
- }, pn = function(e, t) {
1547
- const n = e || this.currentNode;
1570
+ }, vn = function(t, e) {
1571
+ const n = t || this.currentNode;
1548
1572
  if (!n)
1549
1573
  return;
1550
- te(n);
1574
+ se(n);
1551
1575
  const i = n.nodeObj;
1552
1576
  if (i.root === !0)
1553
1577
  return;
1554
- const s = t || this.generateNewObj();
1555
- Qe(i, s), $(this.nodeData);
1556
- const o = n.parentElement.parentElement;
1578
+ const o = e || this.generateNewObj();
1579
+ tt(i, o), T(this.nodeData);
1580
+ const s = n.parentElement.parentElement;
1557
1581
  console.time("insertParent_DOM");
1558
- const { grp: r, top: l } = this.createWrapper(s, !0);
1559
- l.appendChild(ee(!0)), o.insertAdjacentElement("afterend", r);
1560
- const c = this.createChildren([o]);
1561
- l.insertAdjacentElement("afterend", c), this.linkDiv(), t || this.editTopic(l.firstChild), this.selectNode(l.firstChild, !0), console.timeEnd("insertParent_DOM"), this.bus.fire("operation", {
1582
+ const { grp: r, top: l } = this.createWrapper(o, !0);
1583
+ l.appendChild(oe(!0)), s.insertAdjacentElement("afterend", r);
1584
+ const c = this.createChildren([s]);
1585
+ l.insertAdjacentElement("afterend", c), this.linkDiv(), e || this.editTopic(l.firstChild), this.selectNode(l.firstChild, !0), console.timeEnd("insertParent_DOM"), this.bus.fire("operation", {
1562
1586
  name: "insertParent",
1563
- obj: s
1587
+ obj: o
1564
1588
  });
1565
- }, Re = function(e, t) {
1589
+ }, Fe = function(t, e) {
1566
1590
  var l, c;
1567
- if (!e)
1591
+ if (!t)
1568
1592
  return null;
1569
- const n = e.nodeObj;
1570
- n.expanded === !1 && (this.expandNode(e, !0), e = C(n.id));
1571
- const i = t || this.generateNewObj();
1572
- n.children ? n.children.push(i) : n.children = [i], $(this.nodeData);
1573
- const s = e.parentElement, { grp: o, top: r } = this.createWrapper(i);
1574
- if (s.tagName === "ME-PARENT") {
1575
- if (s.children[1])
1576
- s.nextSibling.appendChild(o);
1593
+ const n = t.nodeObj;
1594
+ n.expanded === !1 && (this.expandNode(t, !0), t = E(n.id));
1595
+ const i = e || this.generateNewObj();
1596
+ n.children ? n.children.push(i) : n.children = [i], T(this.nodeData);
1597
+ const o = t.parentElement, { grp: s, top: r } = this.createWrapper(i);
1598
+ if (o.tagName === "ME-PARENT") {
1599
+ if (o.children[1])
1600
+ o.nextSibling.appendChild(s);
1577
1601
  else {
1578
- const u = this.createChildren([o]);
1579
- s.appendChild(ee(!0)), s.insertAdjacentElement("afterend", u);
1602
+ const h = this.createChildren([s]);
1603
+ o.appendChild(oe(!0)), o.insertAdjacentElement("afterend", h);
1580
1604
  }
1581
- this.linkDiv(o.offsetParent);
1605
+ this.linkDiv(s.offsetParent);
1582
1606
  } else
1583
- s.tagName === "ME-ROOT" && (Be(this.direction, i) === S ? (l = document.querySelector(".lhs")) == null || l.appendChild(o) : (c = document.querySelector(".rhs")) == null || c.appendChild(o), this.linkDiv());
1607
+ o.tagName === "ME-ROOT" && (qe(this.direction, i) === S ? (l = document.querySelector(".lhs")) == null || l.appendChild(s) : (c = document.querySelector(".rhs")) == null || c.appendChild(s), this.linkDiv());
1584
1608
  return { newTop: r, newNodeObj: i };
1585
- }, mn = function(e, t) {
1609
+ }, bn = function(t, e) {
1586
1610
  console.time("addChild");
1587
- const n = e || this.currentNode;
1611
+ const n = t || this.currentNode;
1588
1612
  if (!n)
1589
1613
  return;
1590
- const i = Re.call(this, n, t);
1614
+ const i = Fe.call(this, n, e);
1591
1615
  if (!i)
1592
1616
  return;
1593
- const { newTop: s, newNodeObj: o } = i;
1617
+ const { newTop: o, newNodeObj: s } = i;
1594
1618
  this.bus.fire("operation", {
1595
1619
  name: "addChild",
1596
- obj: o
1597
- }), console.timeEnd("addChild"), t || this.editTopic(s.firstChild), this.selectNode(s.firstChild, !0);
1598
- }, gn = function(e, t) {
1620
+ obj: s
1621
+ }), console.timeEnd("addChild"), e || this.editTopic(o.firstChild), this.selectNode(o.firstChild, !0);
1622
+ }, yn = function(t, e) {
1599
1623
  console.time("copyNode");
1600
- const n = Le(e.nodeObj);
1601
- Se(n);
1602
- const i = Re.call(this, t, n);
1624
+ const n = De(t.nodeObj);
1625
+ Te(n);
1626
+ const i = Fe.call(this, e, n);
1603
1627
  if (!i)
1604
1628
  return;
1605
- const { newNodeObj: s } = i;
1629
+ const { newNodeObj: o } = i;
1606
1630
  console.timeEnd("copyNode"), this.bus.fire("operation", {
1607
1631
  name: "copyNode",
1608
- obj: s
1632
+ obj: o
1609
1633
  });
1610
- }, bn = function(e) {
1611
- const t = e || this.currentNode;
1612
- if (!t)
1634
+ }, xn = function(t) {
1635
+ const e = t || this.currentNode;
1636
+ if (!e)
1613
1637
  return;
1614
- const n = t.parentNode.parentNode, i = t.nodeObj;
1615
- Ke(i), n.parentNode.insertBefore(n, n.previousSibling), this.linkDiv(), this.bus.fire("operation", {
1638
+ const n = e.parentNode.parentNode, i = e.nodeObj;
1639
+ Je(i), n.parentNode.insertBefore(n, n.previousSibling), this.linkDiv(), this.bus.fire("operation", {
1616
1640
  name: "moveUpNode",
1617
1641
  obj: i
1618
1642
  });
1619
- }, vn = function(e) {
1620
- const t = e || this.currentNode;
1621
- if (!t)
1643
+ }, wn = function(t) {
1644
+ const e = t || this.currentNode;
1645
+ if (!e)
1622
1646
  return;
1623
- const n = t.parentNode.parentNode, i = t.nodeObj;
1624
- Ue(i), n.nextSibling ? n.nextSibling.insertAdjacentElement("afterend", n) : n.parentNode.prepend(n), this.linkDiv(), this.bus.fire("operation", {
1647
+ const n = e.parentNode.parentNode, i = e.nodeObj;
1648
+ Qe(i), n.nextSibling ? n.nextSibling.insertAdjacentElement("afterend", n) : n.parentNode.prepend(n), this.linkDiv(), this.bus.fire("operation", {
1625
1649
  name: "moveDownNode",
1626
1650
  obj: i
1627
1651
  });
1628
- }, yn = function(e) {
1652
+ }, En = function(t) {
1629
1653
  var l;
1630
- const t = e || this.currentNode;
1631
- if (!t)
1654
+ const e = t || this.currentNode;
1655
+ if (!e)
1632
1656
  return;
1633
- const n = t.nodeObj;
1657
+ const n = e.nodeObj;
1634
1658
  if (n.root === !0)
1635
1659
  throw new Error("Can not remove root node");
1636
- const i = n.parent.children, s = i.findIndex((c) => c === n), o = Z(n), r = t.parentNode;
1637
- if (o === 0) {
1660
+ const i = n.parent.children, o = i.findIndex((c) => c === n), s = ie(n), r = e.parentNode;
1661
+ if (s === 0) {
1638
1662
  const c = r.parentNode.parentNode;
1639
1663
  c.tagName !== "ME-MAIN" && c.previousSibling.children[1].remove();
1640
1664
  }
1641
1665
  if (i.length !== 0) {
1642
- const c = i[s] || i[s - 1];
1643
- this.selectNode(C(c.id));
1666
+ const c = i[o] || i[o - 1];
1667
+ this.selectNode(E(c.id));
1644
1668
  } else
1645
- this.selectNode(C(n.parent.id));
1669
+ this.selectNode(E(n.parent.id));
1646
1670
  for (const c in this.linkData) {
1647
- const u = this.linkData[c];
1648
- if (u.from === n.id || u.to === n.id) {
1649
- const d = this.mindElixirBox.querySelector(`[data-linkid=${this.linkData[c].id}]`);
1650
- this.removeLink(d);
1671
+ const h = this.linkData[c];
1672
+ if (h.from === n.id || h.to === n.id) {
1673
+ const a = this.mindElixirBox.querySelector(`[data-linkid=${this.linkData[c].id}]`);
1674
+ this.removeLink(a);
1651
1675
  }
1652
1676
  }
1653
1677
  r.parentNode.remove(), this.linkDiv(), this.bus.fire("operation", {
1654
1678
  name: "removeNode",
1655
1679
  obj: n,
1656
- originIndex: s,
1680
+ originIndex: o,
1657
1681
  originParentId: (l = n == null ? void 0 : n.parent) == null ? void 0 : l.id
1658
1682
  });
1659
- }, Nn = function(e, t) {
1683
+ }, Nn = function(t, e) {
1660
1684
  var l;
1661
- const n = e.nodeObj, i = t.nodeObj, s = (l = n == null ? void 0 : n.parent) == null ? void 0 : l.id;
1662
- if (i.expanded === !1 && (this.expandNode(t, !0), e = C(n.id), t = C(i.id)), !Ie(n, i)) {
1685
+ const n = t.nodeObj, i = e.nodeObj, o = (l = n == null ? void 0 : n.parent) == null ? void 0 : l.id;
1686
+ if (i.expanded === !1 && (this.expandNode(e, !0), t = E(n.id), e = E(i.id)), !Ge(n, i)) {
1663
1687
  console.warn("Invalid move");
1664
1688
  return;
1665
1689
  }
1666
- console.time("moveNode"), Ze(n, i), $(this.nodeData);
1667
- const o = e.parentElement, r = t.parentElement;
1690
+ console.time("moveNode"), nt(n, i), T(this.nodeData);
1691
+ const s = t.parentElement, r = e.parentElement;
1668
1692
  if (r.tagName === "ME-PARENT")
1669
- if (te(e), r.children[1])
1670
- r.nextSibling.appendChild(o.parentElement);
1693
+ if (se(t), r.children[1])
1694
+ r.nextSibling.appendChild(s.parentElement);
1671
1695
  else {
1672
- const c = this.createChildren([o.parentElement]);
1673
- r.appendChild(ee(!0)), r.parentElement.insertBefore(c, r.nextSibling);
1696
+ const c = this.createChildren([s.parentElement]);
1697
+ r.appendChild(oe(!0)), r.parentElement.insertBefore(c, r.nextSibling);
1674
1698
  }
1675
1699
  else
1676
- r.tagName === "ME-ROOT" && (Be(this.direction, n), r.nextSibling.appendChild(o.parentElement));
1700
+ r.tagName === "ME-ROOT" && (qe(this.direction, n), r.nextSibling.appendChild(s.parentElement));
1677
1701
  this.linkDiv(), this.bus.fire("operation", {
1678
1702
  name: "moveNode",
1679
1703
  obj: n,
1680
1704
  toObj: i,
1681
- originParentId: s
1705
+ originParentId: o
1682
1706
  }), console.timeEnd("moveNode");
1683
- }, En = function(e, t) {
1684
- var u;
1685
- const n = e.nodeObj, i = t.nodeObj, s = (u = n.parent) == null ? void 0 : u.id;
1686
- et(n, i), $(this.nodeData), te(e);
1687
- const r = e.parentElement.parentNode;
1688
- t.parentElement.parentNode.insertAdjacentElement("beforebegin", r), this.linkDiv(), this.bus.fire("operation", {
1707
+ }, Cn = function(t, e) {
1708
+ var h;
1709
+ const n = t.nodeObj, i = e.nodeObj, o = (h = n.parent) == null ? void 0 : h.id;
1710
+ it(n, i), T(this.nodeData), se(t);
1711
+ const r = t.parentElement.parentNode;
1712
+ e.parentElement.parentNode.insertAdjacentElement("beforebegin", r), this.linkDiv(), this.bus.fire("operation", {
1689
1713
  name: "moveNodeBefore",
1690
1714
  obj: n,
1691
1715
  toObj: i,
1692
- originParentId: s
1716
+ originParentId: o
1693
1717
  });
1694
- }, xn = function(e, t) {
1695
- var u;
1696
- const n = e.nodeObj, i = t.nodeObj, s = (u = n.parent) == null ? void 0 : u.id;
1697
- tt(n, i), $(this.nodeData), te(e);
1698
- const r = e.parentElement.parentElement;
1699
- t.parentElement.parentElement.insertAdjacentElement("afterend", r), this.linkDiv(), this.bus.fire("operation", {
1718
+ }, _n = function(t, e) {
1719
+ var h;
1720
+ const n = t.nodeObj, i = e.nodeObj, o = (h = n.parent) == null ? void 0 : h.id;
1721
+ ot(n, i), T(this.nodeData), se(t);
1722
+ const r = t.parentElement.parentElement;
1723
+ e.parentElement.parentElement.insertAdjacentElement("afterend", r), this.linkDiv(), this.bus.fire("operation", {
1700
1724
  name: "moveNodeAfter",
1701
1725
  obj: n,
1702
1726
  toObj: i,
1703
- originParentId: s
1727
+ originParentId: o
1704
1728
  });
1705
- }, Cn = function(e) {
1706
- const t = e || this.currentNode;
1707
- t && this.editTopic(t);
1708
- }, _n = function(e, t) {
1709
- e.childNodes[0].textContent = t, e.nodeObj.topic = t, this.linkDiv();
1710
- }, ze = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1729
+ }, kn = function(t) {
1730
+ const e = t || this.currentNode;
1731
+ e && this.editTopic(e);
1732
+ }, Sn = function(t, e) {
1733
+ t.childNodes[0].textContent = e, t.nodeObj.topic = e, this.linkDiv();
1734
+ }, Ve = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1711
1735
  __proto__: null,
1712
- addChild: mn,
1713
- beginEdit: Cn,
1714
- copyNode: gn,
1715
- insertBefore: fn,
1716
- insertParent: pn,
1717
- insertSibling: un,
1718
- moveDownNode: vn,
1736
+ addChild: bn,
1737
+ beginEdit: kn,
1738
+ copyNode: yn,
1739
+ insertBefore: gn,
1740
+ insertParent: vn,
1741
+ insertSibling: mn,
1742
+ moveDownNode: wn,
1719
1743
  moveNode: Nn,
1720
- moveNodeAfter: xn,
1721
- moveNodeBefore: En,
1722
- moveUpNode: bn,
1723
- removeNode: yn,
1724
- reshapeNode: hn,
1725
- setNodeTopic: _n
1726
- }, Symbol.toStringTag, { value: "Module" })), wn = function(e) {
1744
+ moveNodeAfter: _n,
1745
+ moveNodeBefore: Cn,
1746
+ moveUpNode: xn,
1747
+ removeNode: En,
1748
+ reshapeNode: pn,
1749
+ setNodeTopic: Sn
1750
+ }, Symbol.toStringTag, { value: "Module" })), Ln = function(t) {
1727
1751
  return {
1728
- dom: e,
1752
+ dom: t,
1729
1753
  mousedown: !1,
1730
1754
  lastX: 0,
1731
1755
  lastY: 0,
1732
- handleMouseMove(t) {
1733
- if (t.stopPropagation(), this.mousedown) {
1756
+ handleMouseMove(e) {
1757
+ if (this.mousedown) {
1734
1758
  if (!this.lastX) {
1735
- this.lastX = t.pageX, this.lastY = t.pageY;
1759
+ this.lastX = e.pageX, this.lastY = e.pageY;
1736
1760
  return;
1737
1761
  }
1738
- const n = this.lastX - t.pageX, i = this.lastY - t.pageY;
1739
- this.cb && this.cb(n, i), this.lastX = t.pageX, this.lastY = t.pageY;
1762
+ const n = this.lastX - e.pageX, i = this.lastY - e.pageY;
1763
+ this.cb && this.cb(n, i), this.lastX = e.pageX, this.lastY = e.pageY;
1740
1764
  }
1741
1765
  },
1742
- handleMouseDown(t) {
1743
- t.stopPropagation(), this.mousedown = !0;
1766
+ handleMouseDown(e) {
1767
+ this.mousedown = !0;
1744
1768
  },
1745
- handleClear(t) {
1746
- t.stopPropagation(), this.clear();
1769
+ handleClear(e) {
1770
+ this.clear();
1747
1771
  },
1748
1772
  cb: null,
1749
- init(t, n) {
1750
- this.cb = n, this.handleClear = this.handleClear.bind(this), this.handleMouseMove = this.handleMouseMove.bind(this), this.handleMouseDown = this.handleMouseDown.bind(this), t.addEventListener("mousemove", this.handleMouseMove), t.addEventListener("mouseleave", this.handleClear), t.addEventListener("mouseup", this.handleClear), this.dom.addEventListener("mousedown", this.handleMouseDown);
1773
+ init(e, n) {
1774
+ this.cb = n, this.handleClear = this.handleClear.bind(this), this.handleMouseMove = this.handleMouseMove.bind(this), this.handleMouseDown = this.handleMouseDown.bind(this), e.addEventListener("mousemove", this.handleMouseMove), e.addEventListener("mouseleave", this.handleClear), e.addEventListener("mouseup", this.handleClear), this.dom.addEventListener("mousedown", this.handleMouseDown);
1751
1775
  },
1752
- destory(t) {
1753
- t.removeEventListener("mousemove", this.handleMouseMove), t.removeEventListener("mouseleave", this.handleClear), t.removeEventListener("mouseup", this.handleClear), this.dom.removeEventListener("mousedown", this.handleMouseDown);
1776
+ destory(e) {
1777
+ e.removeEventListener("mousemove", this.handleMouseMove), e.removeEventListener("mouseleave", this.handleClear), e.removeEventListener("mouseup", this.handleClear), this.dom.removeEventListener("mousedown", this.handleMouseDown);
1754
1778
  },
1755
1779
  clear() {
1756
1780
  this.mousedown = !1, this.lastX = 0, this.lastY = 0;
1757
1781
  }
1758
1782
  };
1759
1783
  }, Ne = {
1760
- create: wn
1761
- }, kn = function(e, t, n, i) {
1762
- const s = this.map.getBoundingClientRect();
1763
- if (!e || !t)
1764
- return;
1765
- const o = e.getBoundingClientRect(), r = t.getBoundingClientRect(), l = (o.x + o.width / 2 - s.x) / this.scaleVal, c = (o.y + o.height / 2 - s.y) / this.scaleVal, u = (r.x + r.width / 2 - s.x) / this.scaleVal, d = (r.y + r.height / 2 - s.y) / this.scaleVal;
1766
- let h, a, p, g;
1767
- n && i ? (h = l + i.delta1.x, a = c + i.delta1.y, p = u + i.delta2.x, g = d + i.delta2.y) : (c + d) / 2 - c <= o.height / 2 ? (h = (o.x + o.width - s.x) / this.scaleVal + 100, a = c, p = (r.x + r.width - s.x) / this.scaleVal + 100, g = d) : (h = (l + u) / 2, a = (c + d) / 2, p = (l + u) / 2, g = (c + d) / 2);
1768
- const m = {
1784
+ create: Ln
1785
+ };
1786
+ function ne(t, e, n) {
1787
+ const { offsetLeft: i, offsetTop: o } = W(t.nodes, e), s = e.offsetWidth, r = e.offsetHeight, l = i + s / 2, c = o + r / 2, h = l + n.x, a = c + n.y;
1788
+ return {
1789
+ w: s,
1790
+ h: r,
1769
1791
  cx: l,
1770
1792
  cy: c,
1771
- w: o.width,
1772
- h: o.height
1773
- }, f = {
1774
- cx: u,
1775
- cy: d,
1776
- w: r.width,
1777
- h: r.height
1778
- }, b = ne(m, h, a), N = b.x, v = b.y, y = ie(f, p, g), E = y.x, _ = y.y, M = Me(p, g, E, _), k = {
1779
- id: "",
1780
- label: "",
1781
- from: e.nodeObj.id,
1782
- to: t.nodeObj.id,
1793
+ ctrlX: h,
1794
+ ctrlY: a
1795
+ };
1796
+ }
1797
+ function V(t) {
1798
+ let e, n;
1799
+ const i = (t.cy - t.ctrlY) / (t.ctrlX - t.cx);
1800
+ return i > t.h / t.w || i < -t.h / t.w ? t.cy - t.ctrlY < 0 ? (e = t.cx - t.h / 2 / i, n = t.cy + t.h / 2) : (e = t.cx + t.h / 2 / i, n = t.cy - t.h / 2) : t.cx - t.ctrlX < 0 ? (e = t.cx + t.w / 2, n = t.cy - t.w * i / 2) : (e = t.cx - t.w / 2, n = t.cy + t.w * i / 2), {
1801
+ x: e,
1802
+ y: n
1803
+ };
1804
+ }
1805
+ const Mn = function(t, e, n, i) {
1806
+ const o = document.createElementNS("http://www.w3.org/2000/svg", "text");
1807
+ return N(o, {
1808
+ "text-anchor": "middle",
1809
+ x: e + "",
1810
+ y: n + "",
1811
+ fill: i || "#666"
1812
+ }), o.dataset.type = "custom-link", o.innerHTML = t, o;
1813
+ }, Tn = function(t, e, n, i) {
1814
+ if (!t || !e)
1815
+ return;
1816
+ const o = performance.now();
1817
+ this.hideLinkController();
1818
+ const s = ne(this, t, n.delta1), r = ne(this, e, n.delta2), { x: l, y: c } = V(s), { ctrlX: h, ctrlY: a } = s, { ctrlX: u, ctrlY: d } = r, { x: p, y: g } = V(r), m = $e(u, d, p, g), f = vt(
1819
+ `M ${l} ${c} C ${h} ${a} ${u} ${d} ${p} ${g}`,
1820
+ `M ${m.x1} ${m.y1} L ${p} ${g} L ${m.x2} ${m.y2}`
1821
+ ), v = l / 8 + h * 3 / 8 + u * 3 / 8 + p / 8, x = c / 8 + a * 3 / 8 + d * 3 / 8 + g / 8, b = Mn(n.label, v, x, this.theme.cssVar["--color"]);
1822
+ f.appendChild(b), f.linkObj = n, f.dataset.linkid = n.id, this.linkSvgGroup.appendChild(f), i || (this.linkData[n.id] = n, this.currentLink = f, this.showLinkController(n, s, r));
1823
+ const y = performance.now();
1824
+ console.log(`DrawCustomLink Execution time: ${y - o} ms`);
1825
+ }, $n = function(t, e) {
1826
+ const n = {
1827
+ id: U(),
1828
+ label: "Custom Link",
1829
+ from: t.nodeObj.id,
1830
+ to: e.nodeObj.id,
1783
1831
  delta1: {
1784
- x: h - l,
1785
- y: a - c
1832
+ x: 0,
1833
+ y: -200
1786
1834
  },
1787
1835
  delta2: {
1788
- x: p - u,
1789
- y: g - d
1836
+ x: 0,
1837
+ y: -200
1790
1838
  }
1791
- }, O = pt(
1792
- `M ${N} ${v} C ${h} ${a} ${p} ${g} ${E} ${_}`,
1793
- `M ${M.x1} ${M.y1} L ${E} ${_} L ${M.x2} ${M.y2}`
1794
- );
1795
- n && i ? (k.id = i.id, this.linkData[i.id] = k) : (k.id = K(), this.linkData[k.id] = k, this.currentLink = O), O.linkObj = k, O.dataset.linkid = k.id, this.linkSvgGroup.appendChild(O), n || this.showLinkController(h, a, p, g, k, m, f);
1796
- }, Sn = function(e) {
1797
- let t;
1798
- if (e ? t = e : t = this.currentLink, !t)
1799
- return;
1800
- console.log(t), this.hideLinkController();
1801
- const n = t.linkObj.id;
1802
- console.log(n), delete this.linkData[n], t.remove(), t = null;
1803
- }, Mn = function(e) {
1804
- this.currentLink = e;
1805
- const t = e.linkObj;
1806
- if (!t)
1839
+ };
1840
+ this.drawCustomLink(t, e, n);
1841
+ }, Dn = function(t) {
1842
+ let e;
1843
+ if (t ? e = t : e = this.currentLink, !e)
1807
1844
  return;
1808
- const n = t.from, i = t.to, s = this.map.getBoundingClientRect(), o = C(n).getBoundingClientRect(), r = C(i).getBoundingClientRect(), l = (o.x + o.width / 2 - s.x) / this.scaleVal, c = (o.y + o.height / 2 - s.y) / this.scaleVal, u = (r.x + r.width / 2 - s.x) / this.scaleVal, d = (r.y + r.height / 2 - s.y) / this.scaleVal, h = {
1809
- cx: l,
1810
- cy: c,
1811
- w: o.width,
1812
- h: o.height
1813
- }, a = {
1814
- cx: u,
1815
- cy: d,
1816
- w: r.width,
1817
- h: r.height
1818
- }, p = l + t.delta1.x, g = c + t.delta1.y, m = u + t.delta2.x, f = d + t.delta2.y;
1819
- this.showLinkController(p, g, m, f, t, h, a);
1820
- }, Ln = function() {
1845
+ this.hideLinkController();
1846
+ const n = e.linkObj.id;
1847
+ delete this.linkData[n], e.remove(), e = null;
1848
+ }, On = function(t) {
1849
+ this.currentLink = t;
1850
+ const e = t.linkObj, n = E(e.from), i = E(e.to), o = ne(this, n, e.delta1), s = ne(this, i, e.delta2);
1851
+ this.showLinkController(e, o, s);
1852
+ }, An = function() {
1821
1853
  this.linkController.style.display = "none", this.P2.style.display = "none", this.P3.style.display = "none";
1822
- }, Tn = function(e, t, n, i, s, o, r) {
1823
- this.linkController.style.display = "initial", this.P2.style.display = "initial", this.P3.style.display = "initial";
1824
- const l = ne(o, e, t);
1825
- let c = l.x, u = l.y;
1826
- const d = ie(r, n, i);
1827
- let h = d.x, a = d.y;
1828
- this.P2.style.cssText = `top:${t}px;left:${e}px;`, this.P3.style.cssText = `top:${i}px;left:${n}px;`, this.line1.setAttribute("x1", c), this.line1.setAttribute("y1", u), this.line1.setAttribute("x2", e), this.line1.setAttribute("y2", t), this.line2.setAttribute("x1", n), this.line2.setAttribute("y1", i), this.line2.setAttribute("x2", h), this.line2.setAttribute("y2", a), this.helper1 && (this.helper1.destory(this.map), this.helper2.destory(this.map)), this.helper1 = Ne.create(this.P2), this.helper2 = Ne.create(this.P3), this.helper1.init(this.map, (p, g) => {
1854
+ }, Pn = function(t, e, n) {
1855
+ this.linkController.style.display = "initial", this.P2.style.display = "initial", this.P3.style.display = "initial", this.nodes.appendChild(this.linkController), this.nodes.appendChild(this.P2), this.nodes.appendChild(this.P3);
1856
+ let { x: i, y: o } = V(e), { ctrlX: s, ctrlY: r } = e, { ctrlX: l, ctrlY: c } = n, { x: h, y: a } = V(n);
1857
+ this.P2.style.cssText = `top:${r}px;left:${s}px;`, this.P3.style.cssText = `top:${c}px;left:${l}px;`, N(this.line1, {
1858
+ x1: i + "",
1859
+ y1: o + "",
1860
+ x2: s + "",
1861
+ y2: r + ""
1862
+ }), N(this.line2, {
1863
+ x1: l + "",
1864
+ y1: c + "",
1865
+ x2: h + "",
1866
+ y2: a + ""
1867
+ }), this.helper1 && (this.helper1.destory(this.map), this.helper2.destory(this.map)), this.helper1 = Ne.create(this.P2), this.helper2 = Ne.create(this.P3), this.helper1.init(this.map, (u, d) => {
1829
1868
  var f;
1830
- e = e - p / this.scaleVal, t = t - g / this.scaleVal;
1831
- const m = ne(o, e, t);
1832
- c = m.x, u = m.y, this.P2.style.top = t + "px", this.P2.style.left = e + "px", (f = this.currentLink) == null || f.children[0].setAttribute("d", `M ${c} ${u} C ${e} ${t} ${n} ${i} ${h} ${a}`), this.line1.setAttribute("x1", c), this.line1.setAttribute("y1", u), this.line1.setAttribute("x2", e), this.line1.setAttribute("y2", t), s.delta1.x = e - o.cx, s.delta1.y = t - o.cy;
1833
- }), this.helper2.init(this.map, (p, g) => {
1834
- var b, N;
1835
- n = n - p / this.scaleVal, i = i - g / this.scaleVal;
1836
- const m = ie(r, n, i);
1837
- h = m.x, a = m.y;
1838
- const f = Me(n, i, h, a);
1839
- this.P3.style.top = i + "px", this.P3.style.left = n + "px", (b = this.currentLink) == null || b.children[0].setAttribute("d", `M ${c} ${u} C ${e} ${t} ${n} ${i} ${h} ${a}`), (N = this.currentLink) == null || N.children[1].setAttribute("d", `M ${f.x1} ${f.y1} L ${h} ${a} L ${f.x2} ${f.y2}`), this.line2.setAttribute("x1", n), this.line2.setAttribute("y1", i), this.line2.setAttribute("x2", h), this.line2.setAttribute("y2", a), s.delta2.x = n - r.cx, s.delta2.y = i - r.cy;
1869
+ s = s - u / this.scaleVal, r = r - d / this.scaleVal;
1870
+ const p = V({ ...e, ctrlX: s, ctrlY: r });
1871
+ i = p.x, o = p.y;
1872
+ const g = i / 8 + s * 3 / 8 + l * 3 / 8 + h / 8, m = o / 8 + r * 3 / 8 + c * 3 / 8 + a / 8;
1873
+ this.P2.style.top = r + "px", this.P2.style.left = s + "px", (f = this.currentLink) == null || f.children[0].setAttribute("d", `M ${i} ${o} C ${s} ${r} ${l} ${c} ${h} ${a}`), N(this.currentLink.children[2], {
1874
+ x: g + "",
1875
+ y: m + ""
1876
+ }), N(this.line1, {
1877
+ x1: i + "",
1878
+ y1: o + "",
1879
+ x2: s + "",
1880
+ y2: r + ""
1881
+ }), t.delta1.x = s - e.cx, t.delta1.y = r - e.cy;
1882
+ }), this.helper2.init(this.map, (u, d) => {
1883
+ var v, x;
1884
+ l = l - u / this.scaleVal, c = c - d / this.scaleVal;
1885
+ const p = V({ ...n, ctrlX: l, ctrlY: c });
1886
+ h = p.x, a = p.y;
1887
+ const g = i / 8 + s * 3 / 8 + l * 3 / 8 + h / 8, m = o / 8 + r * 3 / 8 + c * 3 / 8 + a / 8, f = $e(l, c, h, a);
1888
+ this.P3.style.top = c + "px", this.P3.style.left = l + "px", (v = this.currentLink) == null || v.children[0].setAttribute("d", `M ${i} ${o} C ${s} ${r} ${l} ${c} ${h} ${a}`), (x = this.currentLink) == null || x.children[1].setAttribute("d", `M ${f.x1} ${f.y1} L ${h} ${a} L ${f.x2} ${f.y2}`), N(this.currentLink.children[2], {
1889
+ x: g + "",
1890
+ y: m + ""
1891
+ }), N(this.line2, {
1892
+ x1: l + "",
1893
+ y1: c + "",
1894
+ x2: h + "",
1895
+ y2: a + ""
1896
+ }), t.delta2.x = l - n.cx, t.delta2.y = c - n.cy;
1840
1897
  });
1841
- }, $n = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1898
+ };
1899
+ function jn() {
1900
+ this.linkSvgGroup.innerHTML = "";
1901
+ for (const t in this.linkData) {
1902
+ const e = this.linkData[t];
1903
+ this.drawCustomLink(E(e.from), E(e.to), e, !0);
1904
+ }
1905
+ this.nodes.appendChild(this.linkSvgGroup);
1906
+ }
1907
+ function Hn(t) {
1908
+ if (console.time("editSummary"), !t)
1909
+ return;
1910
+ const e = t.children[2];
1911
+ console.log(e, t), Ae(this, e, (n) => {
1912
+ var s;
1913
+ const i = t.linkObj, o = ((s = n.textContent) == null ? void 0 : s.trim()) || "";
1914
+ o === "" ? i.label = origin : i.label = o, n.remove(), o !== origin && (e.innerHTML = i.label, this.linkDiv());
1915
+ }), console.timeEnd("editSummary");
1916
+ }
1917
+ const Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1842
1918
  __proto__: null,
1843
- createLink: kn,
1844
- hideLinkController: Ln,
1845
- removeLink: Sn,
1846
- selectLink: Mn,
1847
- showLinkController: Tn
1848
- }, Symbol.toStringTag, { value: "Module" })), An = function(e) {
1849
- var c, u;
1850
- if (e.length === 0)
1919
+ createLink: $n,
1920
+ drawCustomLink: Tn,
1921
+ editCutsomLinkLabel: Hn,
1922
+ hideLinkController: An,
1923
+ removeLink: Dn,
1924
+ renderCustomLink: jn,
1925
+ selectLink: On,
1926
+ showLinkController: Pn
1927
+ }, Symbol.toStringTag, { value: "Module" })), zn = function(t) {
1928
+ var c, h;
1929
+ if (t.length === 0)
1851
1930
  throw new Error("No selected node.");
1852
- if (e.length === 1) {
1853
- const d = e[0].nodeObj, h = e[0].nodeObj.parent;
1854
- if (!h)
1931
+ if (t.length === 1) {
1932
+ const a = t[0].nodeObj, u = t[0].nodeObj.parent;
1933
+ if (!u)
1855
1934
  throw new Error("Can not select root node.");
1856
- const a = h.children.findIndex((p) => d === p);
1935
+ const d = u.children.findIndex((p) => a === p);
1857
1936
  return {
1858
- parent: h.id,
1859
- start: a,
1860
- end: a
1937
+ parent: u.id,
1938
+ start: d,
1939
+ end: d
1861
1940
  };
1862
1941
  }
1863
- let t = 0;
1864
- const n = e.map((d) => {
1865
- let h = d.nodeObj;
1866
- const a = [];
1867
- for (; h.parent; ) {
1868
- const p = h.parent, g = p.children, m = g == null ? void 0 : g.indexOf(h);
1869
- h = p, a.unshift({ node: h, index: m });
1942
+ let e = 0;
1943
+ const n = t.map((a) => {
1944
+ let u = a.nodeObj;
1945
+ const d = [];
1946
+ for (; u.parent; ) {
1947
+ const p = u.parent, g = p.children, m = g == null ? void 0 : g.indexOf(u);
1948
+ u = p, d.unshift({ node: u, index: m });
1870
1949
  }
1871
- return a.length > t && (t = a.length), a;
1950
+ return d.length > e && (e = d.length), d;
1872
1951
  });
1873
1952
  let i = 0;
1874
1953
  e:
1875
- for (; i < t; i++) {
1876
- const d = (c = n[0][i]) == null ? void 0 : c.node;
1877
- for (let h = 1; h < n.length; h++)
1878
- if (((u = n[h][i]) == null ? void 0 : u.node) !== d)
1954
+ for (; i < e; i++) {
1955
+ const a = (c = n[0][i]) == null ? void 0 : c.node;
1956
+ for (let u = 1; u < n.length; u++)
1957
+ if (((h = n[u][i]) == null ? void 0 : h.node) !== a)
1879
1958
  break e;
1880
1959
  }
1881
1960
  if (!i)
1882
1961
  throw new Error("Can not select root node.");
1883
- const s = n.map((d) => d[i - 1].index).sort(), o = s[0] || 0, r = s[s.length - 1] || 0, l = n[0][i - 1].node;
1962
+ const o = n.map((a) => a[i - 1].index).sort(), s = o[0] || 0, r = o[o.length - 1] || 0, l = n[0][i - 1].node;
1884
1963
  if (l.root)
1885
1964
  throw new Error("Please select nodes in the same main topic.");
1886
1965
  return {
1887
1966
  parent: l.id,
1888
- start: o,
1967
+ start: s,
1889
1968
  end: r
1890
1969
  };
1891
- }, On = function(e) {
1892
- const t = document.createElementNS("http://www.w3.org/2000/svg", "g");
1893
- return t.setAttribute("id", e), t;
1894
- }, Ee = function(e, t) {
1970
+ }, Rn = function(t) {
1971
+ const e = document.createElementNS("http://www.w3.org/2000/svg", "g");
1972
+ return e.setAttribute("id", t), e;
1973
+ }, Ce = function(t, e) {
1895
1974
  const n = document.createElementNS("http://www.w3.org/2000/svg", "path");
1896
- return re(n, {
1897
- d: e,
1898
- stroke: t || "#666",
1975
+ return N(n, {
1976
+ d: t,
1977
+ stroke: e || "#666",
1899
1978
  fill: "none",
1900
1979
  "stroke-linecap": "round",
1901
1980
  "stroke-width": "2"
1902
1981
  }), n;
1903
- }, xe = function(e, t, n, i, s) {
1904
- const o = document.createElementNS("http://www.w3.org/2000/svg", "text");
1905
- return re(o, {
1982
+ }, _e = function(t, e, n, i, o) {
1983
+ const s = document.createElementNS("http://www.w3.org/2000/svg", "text");
1984
+ return N(s, {
1906
1985
  "text-anchor": i,
1907
- x: t + "",
1986
+ x: e + "",
1908
1987
  y: n + "",
1909
- fill: s || "#666"
1910
- }), o.innerHTML = e, o;
1911
- }, jn = (e) => C(e).parentElement.parentElement, Ve = function({ parent: e, start: t }) {
1912
- var o, r;
1913
- const n = C(e), i = n.nodeObj;
1914
- let s;
1915
- return i.root === !0 ? s = (o = C(i.children[t].id).closest("me-main")) == null ? void 0 : o.className : s = (r = n.closest("me-main")) == null ? void 0 : r.className, s;
1916
- }, qe = function(e, t) {
1988
+ fill: o || "#666"
1989
+ }), s.innerHTML = t, s;
1990
+ }, qn = (t) => E(t).parentElement.parentElement, Fn = function({ parent: t, start: e }) {
1991
+ var s, r;
1992
+ const n = E(t), i = n.nodeObj;
1993
+ let o;
1994
+ return i.root === !0 ? o = (s = E(i.children[e].id).closest("me-main")) == null ? void 0 : s.className : o = (r = n.closest("me-main")) == null ? void 0 : r.className, o;
1995
+ }, We = function(t, e) {
1917
1996
  var _;
1918
- const { id: n, text: i, parent: s, start: o, end: r } = t, l = e.nodes, u = C(s).nodeObj, d = Ve(t);
1919
- let h = 1 / 0, a = 0, p = 0, g = 0;
1920
- for (let M = o; M <= r; M++) {
1921
- const k = (_ = u.children) == null ? void 0 : _[M];
1922
- if (!k)
1923
- return console.warn("Child not found"), e.removeSummary(n), null;
1924
- const O = jn(k.id), { offsetLeft: U, offsetTop: ce } = Te(l, O);
1925
- M === o && (p = ce), M === r && (g = ce + O.offsetHeight), U < h && (h = U), O.offsetWidth + U > a && (a = O.offsetWidth + U);
1997
+ const { id: n, text: i, parent: o, start: s, end: r } = e, l = t.nodes, h = E(o).nodeObj, a = Fn(e);
1998
+ let u = 1 / 0, d = 0, p = 0, g = 0;
1999
+ for (let Y = s; Y <= r; Y++) {
2000
+ const de = (_ = h.children) == null ? void 0 : _[Y];
2001
+ if (!de)
2002
+ return console.warn("Child not found"), t.removeSummary(n), null;
2003
+ const G = qn(de.id), { offsetLeft: J, offsetTop: he } = W(l, G);
2004
+ Y === s && (p = he), Y === r && (g = he + G.offsetHeight), J < u && (u = J), G.offsetWidth + J > d && (d = G.offsetWidth + J);
1926
2005
  }
1927
2006
  let m, f;
1928
- const b = p + 10, N = g + 10, v = (b + N) / 2, y = e.theme.cssVar["--color"];
1929
- d === "lhs" ? (m = Ee(`M ${h + 10} ${b} c -5 0 -10 5 -10 10 L ${h} ${N - 10} c 0 5 5 10 10 10 M ${h} ${v} h -10`, y), f = xe(i, h - 20, v + 6, "end", y)) : (m = Ee(`M ${a - 10} ${b} c 5 0 10 5 10 10 L ${a} ${N - 10} c 0 5 -5 10 -10 10 M ${a} ${v} h 10`, y), f = xe(i, a + 20, v + 6, "start", y));
1930
- const E = On("s-" + n);
1931
- return E.appendChild(m), E.appendChild(f), E.summaryObj = t, e.summarySvg.appendChild(E), E;
1932
- }, Pn = function() {
1933
- let e = [];
1934
- this.currentNode ? e = [this.currentNode] : this.currentNodes && (e = this.currentNodes);
1935
- const { parent: t, start: n, end: i } = An(e), s = { id: K(), parent: t, start: n, end: i, text: "summary" }, o = qe(this, s);
1936
- this.summaries.push(s), this.editSummary(o);
1937
- }, Dn = function(e) {
2007
+ const v = p + 10, x = g + 10, b = (v + x) / 2, y = t.theme.cssVar["--color"];
2008
+ a === "lhs" ? (m = Ce(`M ${u + 10} ${v} c -5 0 -10 5 -10 10 L ${u} ${x - 10} c 0 5 5 10 10 10 M ${u} ${b} h -10`, y), f = _e(i, u - 20, b + 6, "end", y)) : (m = Ce(`M ${d - 10} ${v} c 5 0 10 5 10 10 L ${d} ${x - 10} c 0 5 -5 10 -10 10 M ${d} ${b} h 10`, y), f = _e(i, d + 20, b + 6, "start", y));
2009
+ const C = Rn("s-" + n);
2010
+ return C.appendChild(m), C.appendChild(f), C.summaryObj = e, t.summarySvg.appendChild(C), C;
2011
+ }, Vn = function() {
2012
+ let t = [];
2013
+ this.currentNode ? t = [this.currentNode] : this.currentNodes && (t = this.currentNodes);
2014
+ const { parent: e, start: n, end: i } = zn(t), o = { id: U(), parent: e, start: n, end: i, text: "summary" }, s = We(this, o);
2015
+ this.summaries.push(o), this.editSummary(s);
2016
+ }, Wn = function(t) {
1938
2017
  var n;
1939
- const t = this.summaries.findIndex((i) => i.id === e);
1940
- t > -1 && (this.summaries.splice(t, 1), (n = document.querySelector("#s-" + e)) == null || n.remove());
1941
- }, Hn = function(e) {
1942
- const t = e.children[1].getBBox(), n = 6, i = 3, s = document.createElementNS("http://www.w3.org/2000/svg", "rect");
1943
- re(s, {
1944
- x: t.x - n + "",
1945
- y: t.y - n + "",
1946
- width: t.width + n * 2 + "",
1947
- height: t.height + n * 2 + "",
2018
+ const e = this.summaries.findIndex((i) => i.id === t);
2019
+ e > -1 && (this.summaries.splice(e, 1), (n = document.querySelector("#s-" + t)) == null || n.remove());
2020
+ }, Yn = function(t) {
2021
+ const e = t.children[1].getBBox(), n = 6, i = 3, o = document.createElementNS("http://www.w3.org/2000/svg", "rect");
2022
+ N(o, {
2023
+ x: e.x - n + "",
2024
+ y: e.y - n + "",
2025
+ width: e.width + n * 2 + "",
2026
+ height: e.height + n * 2 + "",
1948
2027
  rx: i + "",
1949
2028
  stroke: this.theme.cssVar["--selected"] || "#4dc4ff",
1950
2029
  "stroke-width": "2",
1951
2030
  fill: "none"
1952
- }), s.classList.add("selected"), e.appendChild(s), this.currentSummary = e;
1953
- }, Bn = function() {
1954
- var e, t;
1955
- (t = (e = this.currentSummary) == null ? void 0 : e.querySelector("rect")) == null || t.remove(), this.currentSummary = null;
1956
- }, Rn = function() {
1957
- this.summarySvg.innerHTML = "", this.summaries.forEach((e) => {
1958
- qe(this, e);
2031
+ }), o.classList.add("selected"), t.appendChild(o), this.currentSummary = t;
2032
+ }, In = function() {
2033
+ var t, e;
2034
+ (e = (t = this.currentSummary) == null ? void 0 : t.querySelector("rect")) == null || e.remove(), this.currentSummary = null;
2035
+ }, Xn = function() {
2036
+ this.summarySvg.innerHTML = "", this.summaries.forEach((t) => {
2037
+ We(this, t);
1959
2038
  }), this.nodes.insertAdjacentElement("beforeend", this.summarySvg);
1960
- }, zn = function(e) {
1961
- if (console.time("editSummary"), !e)
2039
+ }, Kn = function(t) {
2040
+ if (console.time("editSummary"), !t)
1962
2041
  return;
1963
- const t = e.childNodes[1], n = document.createElement("div");
1964
- this.nodes.appendChild(n);
1965
- const i = t.innerHTML;
1966
- n.id = "input-box", n.textContent = i, n.contentEditable = "true", n.spellcheck = !1;
1967
- const s = t.getAttribute("x") + "px", o = t.getAttribute("y") + "px";
1968
- n.style.cssText = `min-width:${100 - 8}px;position:absolute;left:${s};top:${o};`, Ve(e.summaryObj) === "lhs" ? n.style.cssText += "transform: translate(-100%, -100%);" : n.style.cssText += "transform: translate(0, -100%);", n.focus(), $e(n), n.addEventListener("keydown", (r) => {
1969
- r.stopPropagation();
1970
- const l = r.key;
1971
- if (l === "Enter" || l === "Tab") {
1972
- if (r.shiftKey)
1973
- return;
1974
- r.preventDefault(), n.blur(), this.map.focus();
1975
- }
1976
- }), n.addEventListener("blur", () => {
1977
- var c;
1978
- if (!n)
1979
- return;
1980
- const r = e.summaryObj, l = ((c = n.textContent) == null ? void 0 : c.trim()) || "";
1981
- l === "" ? r.text = i : r.text = l, n.remove(), l !== i && (t.innerHTML = r.text, this.linkDiv(), this.bus.fire("operation", {
2042
+ const e = t.childNodes[1];
2043
+ Ae(this, e, (n) => {
2044
+ var s;
2045
+ const i = t.summaryObj, o = ((s = n.textContent) == null ? void 0 : s.trim()) || "";
2046
+ o === "" ? i.text = origin : i.text = o, n.remove(), o !== origin && (e.innerHTML = i.text, this.linkDiv(), this.bus.fire("operation", {
1982
2047
  name: "finishEditSummary",
1983
- obj: r,
1984
- origin: i
2048
+ obj: i,
2049
+ origin
1985
2050
  }));
1986
2051
  }), console.timeEnd("editSummary");
1987
- }, Vn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2052
+ }, Un = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2053
+ __proto__: null,
2054
+ createSummary: Vn,
2055
+ editSummary: Kn,
2056
+ removeSummary: Wn,
2057
+ renderSummary: Xn,
2058
+ selectSummary: Yn,
2059
+ unselectSummary: In
2060
+ }, Symbol.toStringTag, { value: "Module" }));
2061
+ function Gn(t, e) {
2062
+ const n = document.createElementNS("http://www.w3.org/2000/svg", "svg");
2063
+ return N(n, {
2064
+ version: "1.1",
2065
+ xmlns: "http://www.w3.org/2000/svg",
2066
+ height: t,
2067
+ width: e
2068
+ }), n;
2069
+ }
2070
+ function Jn(t, e) {
2071
+ return (parseInt(t) - parseInt(e)) / 2;
2072
+ }
2073
+ function Qn(t, e, n, i) {
2074
+ const o = document.createElementNS("http://www.w3.org/2000/svg", "g");
2075
+ return t.childNodes[0].textContent.split(`
2076
+ `).forEach((l, c) => {
2077
+ const h = document.createElementNS("http://www.w3.org/2000/svg", "text");
2078
+ N(h, {
2079
+ x: n + parseInt(e.paddingLeft) + "",
2080
+ y: i + parseInt(e.paddingTop) + Jn(e.lineHeight, e.fontSize) * (c + 1) + parseFloat(e.fontSize) * (c + 1) + "",
2081
+ "text-anchor": "start",
2082
+ "font-family": e.fontFamily,
2083
+ "font-size": `${e.fontSize}`,
2084
+ "font-weight": `${e.fontWeight}`,
2085
+ fill: `${e.color}`
2086
+ }), h.innerHTML = l, o.appendChild(h);
2087
+ }), o;
2088
+ }
2089
+ function Zn(t, e, n, i) {
2090
+ const o = t.childNodes[0].textContent, s = document.createElementNS("http://www.w3.org/2000/svg", "foreignObject");
2091
+ N(s, {
2092
+ x: n + parseInt(e.paddingLeft) + "",
2093
+ y: i + parseInt(e.paddingTop) + "",
2094
+ width: e.width,
2095
+ height: e.height
2096
+ });
2097
+ const r = document.createElement("div");
2098
+ return N(r, {
2099
+ xmlns: "http://www.w3.org/1999/xhtml",
2100
+ style: `font-family: ${e.fontFamily}; font-size: ${e.fontSize}; font-weight: ${e.fontWeight}; color: ${e.color}; white-space: pre-wrap;`
2101
+ }), r.innerHTML = o, s.appendChild(r), s;
2102
+ }
2103
+ function re(t, e, n = !1) {
2104
+ const i = getComputedStyle(e), { offsetLeft: o, offsetTop: s } = W(t.nodes, e), r = document.createElementNS("http://www.w3.org/2000/svg", "rect");
2105
+ N(r, {
2106
+ x: o + "",
2107
+ y: s + "",
2108
+ rx: i.borderRadius,
2109
+ ry: i.borderRadius,
2110
+ width: i.width,
2111
+ height: i.height,
2112
+ fill: i.backgroundColor,
2113
+ stroke: i.borderColor,
2114
+ "stroke-width": i.borderWidth
2115
+ });
2116
+ const l = document.createElementNS("http://www.w3.org/2000/svg", "g");
2117
+ l.appendChild(r);
2118
+ let c;
2119
+ return n ? c = Zn(e, i, o, s) : c = Qn(e, i, o, s), l.appendChild(c), l;
2120
+ }
2121
+ function ei(t, e) {
2122
+ const n = getComputedStyle(e), { offsetLeft: i, offsetTop: o } = W(t.nodes, e), s = document.createElementNS("http://www.w3.org/2000/svg", "a"), r = document.createElementNS("http://www.w3.org/2000/svg", "text");
2123
+ return N(r, {
2124
+ x: i + "",
2125
+ y: o + parseInt(n.fontSize) + "",
2126
+ "text-anchor": "start",
2127
+ "font-family": n.fontFamily,
2128
+ "font-size": `${n.fontSize}`,
2129
+ "font-weight": `${n.fontWeight}`,
2130
+ fill: `${n.color}`
2131
+ }), r.innerHTML = e.textContent, s.appendChild(r), s.setAttribute("href", e.href), s;
2132
+ }
2133
+ const Z = 100, ti = '<?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">', Ye = (t) => {
2134
+ var a, u, d;
2135
+ const e = t.nodes, n = e.offsetHeight + Z * 2, i = e.offsetWidth + Z * 2, o = Gn(n + "px", i + "px"), s = document.createElementNS("http://www.w3.org/2000/svg", "svg"), r = document.createElementNS("http://www.w3.org/2000/svg", "rect");
2136
+ N(r, {
2137
+ x: "0",
2138
+ y: "0",
2139
+ width: `${i}`,
2140
+ height: `${n}`,
2141
+ fill: t.theme.cssVar["--bgcolor"]
2142
+ }), o.appendChild(r), e.querySelectorAll(".subLines").forEach((p) => {
2143
+ const g = p.cloneNode(!0), { offsetLeft: m, offsetTop: f } = W(e, p.parentElement);
2144
+ g.setAttribute("x", `${m}`), g.setAttribute("y", `${f}`), s.appendChild(g);
2145
+ });
2146
+ const l = (a = e.querySelector(".lines")) == null ? void 0 : a.cloneNode(!0);
2147
+ l && s.appendChild(l);
2148
+ const c = (u = e.querySelector(".topiclinks")) == null ? void 0 : u.cloneNode(!0);
2149
+ c && s.appendChild(c);
2150
+ const h = (d = e.querySelector(".summary")) == null ? void 0 : d.cloneNode(!0);
2151
+ return h && s.appendChild(h), e.querySelectorAll("me-tpc").forEach((p) => {
2152
+ s.appendChild(re(t, p, !0));
2153
+ }), e.querySelectorAll(".tags > span").forEach((p) => {
2154
+ s.appendChild(re(t, p));
2155
+ }), e.querySelectorAll(".icons > span").forEach((p) => {
2156
+ s.appendChild(re(t, p));
2157
+ }), e.querySelectorAll(".hyper-link").forEach((p) => {
2158
+ s.appendChild(ei(t, p));
2159
+ }), N(s, {
2160
+ x: Z + "",
2161
+ y: Z + "",
2162
+ overflow: "visible"
2163
+ }), o.appendChild(s), ti + o.outerHTML;
2164
+ };
2165
+ function ni(t) {
2166
+ return new Promise((e, n) => {
2167
+ const i = new FileReader();
2168
+ i.onload = (o) => {
2169
+ e(o.target.result);
2170
+ }, i.onerror = (o) => {
2171
+ n(o);
2172
+ }, i.readAsDataURL(t);
2173
+ });
2174
+ }
2175
+ const ii = function() {
2176
+ const t = Ye(this);
2177
+ return new Blob([t], { type: "image/svg+xml" });
2178
+ }, oi = async function() {
2179
+ const t = Ye(this), e = new Blob([t], { type: "image/svg+xml" }), n = await ni(e);
2180
+ return new Promise((i, o) => {
2181
+ const s = new Image();
2182
+ s.setAttribute("crossOrigin", "anonymous"), s.onload = () => {
2183
+ const r = document.createElement("canvas");
2184
+ r.width = s.width, r.height = s.height, r.getContext("2d").drawImage(s, 0, 0), r.toBlob(i, "image/png", 1);
2185
+ }, s.src = n, s.onerror = o;
2186
+ });
2187
+ }, si = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1988
2188
  __proto__: null,
1989
- createSummary: Pn,
1990
- editSummary: zn,
1991
- removeSummary: Dn,
1992
- renderSummary: Rn,
1993
- selectSummary: Hn,
1994
- unselectSummary: Bn
2189
+ exportPng: oi,
2190
+ exportSvg: ii
1995
2191
  }, Symbol.toStringTag, { value: "Module" }));
1996
- function qn(e, t) {
2192
+ function ri(t, e) {
1997
2193
  return async function(...n) {
1998
- const i = this.before[t];
1999
- i && !await i.apply(this, n) || e.apply(this, n);
2194
+ const i = this.before[e];
2195
+ i && !await i.apply(this, n) || t.apply(this, n);
2000
2196
  };
2001
2197
  }
2002
- const Ce = Object.keys(ze), Fe = {};
2003
- for (let e = 0; e < Ce.length; e++) {
2004
- const t = Ce[e];
2005
- Fe[t] = qn(ze[t], t);
2198
+ const ke = Object.keys(Ve), Ie = {};
2199
+ for (let t = 0; t < ke.length; t++) {
2200
+ const e = ke[t];
2201
+ Ie[e] = ri(Ve[e], e);
2006
2202
  }
2007
- const Fn = {
2008
- getObjById: ke,
2009
- generateNewObj: Xe,
2010
- layout: st,
2011
- linkDiv: mt,
2012
- editTopic: ht,
2013
- createWrapper: lt,
2014
- createParent: ct,
2015
- createChildren: at,
2016
- createTopic: dt,
2017
- findEle: C,
2018
- changeTheme: Bt,
2019
- ...dn,
2020
- ...Fe,
2021
- ...$n,
2022
- ...Vn,
2023
- init(e) {
2024
- if (!e || !e.nodeData)
2203
+ const li = {
2204
+ getObjById: Me,
2205
+ generateNewObj: Ue,
2206
+ layout: lt,
2207
+ linkDiv: bt,
2208
+ editTopic: pt,
2209
+ createWrapper: dt,
2210
+ createParent: ht,
2211
+ createChildren: ut,
2212
+ createTopic: ft,
2213
+ findEle: E,
2214
+ changeTheme: qt,
2215
+ ...fn,
2216
+ ...Ie,
2217
+ ...Bn,
2218
+ ...Un,
2219
+ ...si,
2220
+ init(t) {
2221
+ if (!t || !t.nodeData)
2025
2222
  return new Error("MindElixir: `data` is required");
2026
- e.direction !== void 0 && (this.direction = e.direction), this.changeTheme(e.theme || this.theme, !1), this.nodeData = e.nodeData, $(this.nodeData), this.linkData = e.linkData || {}, this.summaries = e.summaries || [], this.toolBar && Tt(this), this.keypress && xt(this), Ye() && this.mobileMenu ? Ct(this) : this.contextMenu && yt(this, this.contextMenuOption), this.draggable && kt(this), this.allowUndo && St(this), Ht(this), this.toCenter(), this.layout(), this.linkDiv();
2223
+ t.direction !== void 0 && (this.direction = t.direction), this.changeTheme(t.theme || this.theme, !1), this.nodeData = t.nodeData, T(this.nodeData), this.linkData = t.linkData || {}, this.summaries = t.summaries || [], this.toolBar && Ot(this), this.keypress && _t(this), Xe() && this.mobileMenu ? kt(this) : this.contextMenu && Et(this, this.contextMenuOption), this.draggable && Mt(this), this.allowUndo && Tt(this), Rt(this), this.toCenter(), this.layout(), this.linkDiv();
2027
2224
  }
2028
- }, W = document;
2029
- function A({
2030
- el: e,
2031
- direction: t,
2225
+ }, I = document;
2226
+ function $({
2227
+ el: t,
2228
+ direction: e,
2032
2229
  locale: n,
2033
2230
  draggable: i,
2034
- editable: s,
2035
- contextMenu: o,
2231
+ editable: o,
2232
+ contextMenu: s,
2036
2233
  contextMenuOption: r,
2037
2234
  toolBar: l,
2038
2235
  keypress: c,
2039
- before: u,
2040
- newTopicName: d,
2041
- allowUndo: h,
2042
- mainLinkStyle: a,
2236
+ before: h,
2237
+ newTopicName: a,
2238
+ allowUndo: u,
2239
+ mainLinkStyle: d,
2043
2240
  subLinkStyle: p,
2044
2241
  overflowHidden: g,
2045
2242
  mobileMenu: m,
2046
2243
  theme: f
2047
2244
  }) {
2048
- console.log("ME_version " + A.version, this);
2049
- let b = null;
2050
- const N = Object.prototype.toString.call(e);
2051
- if (N === "[object HTMLDivElement]" ? b = e : N === "[object String]" && (b = document.querySelector(e)), !b)
2245
+ console.log("ME_version " + $.version, this);
2246
+ let v = null;
2247
+ const x = Object.prototype.toString.call(t);
2248
+ if (x === "[object HTMLDivElement]" ? v = t : x === "[object String]" && (v = document.querySelector(t)), !v)
2052
2249
  throw new Error("MindElixir: el is not a valid element");
2053
- b.className += " mind-elixir", b.innerHTML = "", b.style.setProperty("--gap", T + "px"), this.mindElixirBox = b, this.before = u || {}, this.locale = n || "en", this.contextMenuOption = r, this.contextMenu = o === void 0 ? !0 : o, this.toolBar = l === void 0 ? !0 : l, this.keypress = c === void 0 ? !0 : c, this.mobileMenu = m || !1, this.direction = typeof t == "number" ? t : 1, this.draggable = i === void 0 ? !0 : i, this.newTopicName = d || "new node", this.editable = s === void 0 ? !0 : s, this.allowUndo = h === void 0 ? !1 : h, this.currentNode = null, this.currentLink = null, this.scaleVal = 1, this.tempDirection = null, this.mainLinkStyle = a || 0, this.subLinkStyle = p || 0, this.overflowHidden = g || !1, this.bus = it.create(), this.container = W.createElement("div"), this.container.className = "map-container";
2054
- const v = window.matchMedia("(prefers-color-scheme: dark)");
2055
- this.theme = f || (v.matches ? we : _e);
2056
- const y = W.createElement("div");
2057
- y.className = "map-canvas", this.map = y, this.map.setAttribute("tabindex", "0"), this.container.appendChild(this.map), this.mindElixirBox.appendChild(this.container), this.nodes = W.createElement("me-nodes"), this.nodes.className = "main-node-container", this.lines = X("lines"), this.summarySvg = X("summary"), this.linkController = X("linkcontroller"), this.P2 = W.createElement("div"), this.P3 = W.createElement("div"), this.P2.className = this.P3.className = "circle", this.P2.style.display = this.P3.style.display = "none", this.line1 = de(0, 0, 0, 0), this.line2 = de(0, 0, 0, 0), this.linkController.appendChild(this.line1), this.linkController.appendChild(this.line2), this.linkSvgGroup = X("topiclinks"), this.map.appendChild(this.nodes), this.map.appendChild(this.linkController), this.map.appendChild(this.linkSvgGroup), this.map.appendChild(this.P2), this.map.appendChild(this.P3), this.overflowHidden ? this.container.style.overflow = "hidden" : nt(this);
2250
+ v.className += " mind-elixir", v.innerHTML = "", v.style.setProperty("--gap", M + "px"), this.mindElixirBox = v, this.before = h || {}, this.locale = n || "en", this.contextMenuOption = r, this.contextMenu = s === void 0 ? !0 : s, this.toolBar = l === void 0 ? !0 : l, this.keypress = c === void 0 ? !0 : c, this.mobileMenu = m || !1, this.direction = typeof e == "number" ? e : 1, this.draggable = i === void 0 ? !0 : i, this.newTopicName = a || "new node", this.editable = o === void 0 ? !0 : o, this.allowUndo = u === void 0 ? !1 : u, this.currentNode = null, this.currentLink = null, this.scaleVal = 1, this.tempDirection = null, this.mainLinkStyle = d || 0, this.subLinkStyle = p || 0, this.overflowHidden = g || !1, this.bus = rt.create(), this.container = I.createElement("div"), this.container.className = "map-container";
2251
+ const b = window.matchMedia("(prefers-color-scheme: dark)");
2252
+ this.theme = f || (b.matches ? Le : Se);
2253
+ const y = I.createElement("div");
2254
+ y.className = "map-canvas", this.map = y, this.map.setAttribute("tabindex", "0"), this.container.appendChild(this.map), this.mindElixirBox.appendChild(this.container), this.nodes = I.createElement("me-nodes"), this.nodes.className = "main-node-container", this.lines = X("lines"), this.summarySvg = X("summary"), this.linkController = X("linkcontroller"), this.P2 = I.createElement("div"), this.P3 = I.createElement("div"), this.P2.className = this.P3.className = "circle", this.P2.style.display = this.P3.style.display = "none", this.line1 = fe(), this.line2 = fe(), this.linkController.appendChild(this.line1), this.linkController.appendChild(this.line2), this.linkSvgGroup = X("topiclinks"), this.map.appendChild(this.nodes), this.overflowHidden ? this.container.style.overflow = "hidden" : st(this);
2058
2255
  }
2059
- A.prototype = Fn;
2060
- A.LEFT = S;
2061
- A.RIGHT = R;
2062
- A.SIDE = I;
2063
- A.THEME = _e;
2064
- A.DARK_THEME = we;
2065
- A.version = "3.1.3";
2066
- A.E = C;
2067
- A.new = (e) => ({
2256
+ $.prototype = li;
2257
+ $.LEFT = S;
2258
+ $.RIGHT = H;
2259
+ $.SIDE = K;
2260
+ $.THEME = Se;
2261
+ $.DARK_THEME = Le;
2262
+ $.version = "3.2.0";
2263
+ $.E = E;
2264
+ $.new = (t) => ({
2068
2265
  nodeData: {
2069
- id: K(),
2070
- topic: e || "new topic",
2266
+ id: U(),
2267
+ topic: t || "new topic",
2071
2268
  root: !0,
2072
2269
  children: []
2073
2270
  },
2074
2271
  linkData: {}
2075
2272
  });
2076
2273
  export {
2077
- A as default
2274
+ $ as default
2078
2275
  };