mind-elixir 3.2.1 → 3.2.2

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,12 +1,12 @@
1
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
- var MindElixir=function(){"use strict";const yn="";(function(t){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");if(c&&!t.__iconfont__svg__cssinject__){t.__iconfont__svg__cssinject__=!0;try{document.write("<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>")}catch(a){console&&console.log(a)}}function h(){s||(s=!0,i())}e=function(){var a,u,d,p;(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))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(e,0):(n=function(){document.removeEventListener("DOMContentLoaded",n,!1),e()},document.addEventListener("DOMContentLoaded",n,!1)):document.attachEvent&&(i=e,o=t.document,s=!1,(r=function(){try{o.documentElement.doScroll("left")}catch{return void setTimeout(r,50)}h()})(),o.onreadystatechange=function(){o.readyState=="complete"&&(o.onreadystatechange=null,h())})})(window);const k=0,j=1,Y=2,M=30,T=8,de={name:"Latte",palette:["#dd7878","#ea76cb","#8839ef","#e64553","#fe640b","#df8e1d","#40a02b","#209fb5","#1e66f5","#7287fd"],cssVar:{"--main-color":"#444446","--main-bgcolor":"#ffffff","--color":"#777777","--bgcolor":"#f6f6f6","--panel-color":"#444446","--panel-bgcolor":"#ffffff","--panel-border-color":"#eaeaea"}},he={name:"Dark",palette:["#848FA0","#748BE9","#D2F9FE","#4145A5","#789AFA","#706CF4","#EF987F","#775DD5","#FCEECF","#DA7FBC"],cssVar:{"--main-color":"#ffffff","--main-bgcolor":"#4c4f69","--color":"#cccccc","--bgcolor":"#252526","--panel-color":"#ffffff","--panel-bgcolor":"#2d3748","--panel-border-color":"#696969"}};function G(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;")}const Xe=()=>/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),ue=function(t,e){if(e.id===t)return e;if(e.children&&e.children.length){for(let n=0;n<e.children.length;n++){const i=ue(t,e.children[n]);if(i)return i}return null}else return null},$=(t,e)=>{if(t.parent=e,t.children)for(let n=0;n<t.children.length;n++)$(t.children[n],t)};function fe(t){if(t.id=I(),t.children)for(let e=0;e<t.children.length;e++)fe(t.children[e])}const Ke=(t,e)=>{let n=Date.now();return function(...i){Date.now()-n>=e&&(t(...i),n=Date.now())}};function pe(t,e,n,i){const o=i-e,s=t-n;let r=Math.atan(Math.abs(o)/Math.abs(s))/3.14*180;s<0&&o>0&&(r=180-r),s<0&&o<0&&(r=180+r),s>0&&o<0&&(r=360-r);const l=15,c=30,h=r+c,a=r-c;return{x1:n+Math.cos(Math.PI*h/180)*l,y1:i-Math.sin(Math.PI*h/180)*l,x2:n+Math.cos(Math.PI*a/180)*l,y2:i-Math.sin(Math.PI*a/180)*l}}function I(){return(new Date().getTime().toString(16)+Math.random().toString(16).substr(2)).substr(2,16)}const Ue=function(){const t=I();return{topic:this.newTopicName,id:t}};function Ge(t,e){let n=!0;for(;e.parent;){if(e.parent===t){n=!1;break}e=e.parent}return n}const O=t=>{var i;const e=(i=t.parent)==null?void 0:i.children,n=e.indexOf(t);return{siblings:e,index:n}};function Je(t){const{siblings:e,index:n}=O(t),i=e[n];n===0?(e[n]=e[e.length-1],e[e.length-1]=i):(e[n]=e[n-1],e[n-1]=i)}function Qe(t){const{siblings:e,index:n}=O(t),i=e[n];n===e.length-1?(e[n]=e[0],e[0]=i):(e[n]=e[n+1],e[n+1]=i)}function J(t){const{siblings:e,index:n}=O(t);return e.splice(n,1),e.length}function Ze(t,e){const{siblings:n,index:i}=O(t);n.splice(i+1,0,e)}function et(t,e){const{siblings:n,index:i}=O(t);n.splice(i,0,e)}function tt(t,e){const{siblings:n,index:i}=O(t);n[i]=e,e.children=[t]}function nt(t,e){J(t),e.children?e.children.push(t):e.children=[t]}function it(t,e){J(t);const{siblings:n,index:i}=O(e);n.splice(i,0,t)}function ot(t,e){J(t);const{siblings:n,index:i}=O(e);n.splice(i+1,0,t)}function me(t){return JSON.parse(JSON.stringify(t,(n,i)=>{if(n!=="parent")return i}))}const q=(t,e)=>{let n=0,i=0;for(;e&&e!==t;)n+=e.offsetLeft,i+=e.offsetTop,e=e.offsetParent;return{offsetLeft:n,offsetTop:i}},w=(t,e)=>{for(const n in e)t.setAttribute(n,e[n])},D={moved:!1,mousedown:!1,lastX:0,lastY:0,onMove(t,e){if(this.mousedown){if(this.moved=!0,!this.lastX){this.lastX=t.pageX,this.lastY=t.pageY;return}const n=this.lastX-t.pageX,i=this.lastY-t.pageY;e.scrollTo(e.scrollLeft+n,e.scrollTop+i),this.lastX=t.pageX,this.lastY=t.pageY}},clear(){this.moved=!1,this.mousedown=!1,this.lastX=0,this.lastY=0}},ge=t=>t.tagName==="ME-TPC";function st(t){t.map.addEventListener("click",e=>{if(D.moved){D.clear();return}t.unselectNode(),t.unselectNodes(),t.unselectSummary();const n=e.target;if(n.tagName==="ME-EPD")t.expandNode(n.previousSibling);else if(t.editable)ge(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();else return}),t.map.addEventListener("dblclick",e=>{if(e.preventDefault(),!t.editable)return;const n=e.target;ge(n)?t.beginEdit(n):n.tagName==="text"&&(n.dataset.type==="custom-link"?t.editCutsomLinkLabel(n.parentElement):t.editSummary(n.parentElement))}),t.map.addEventListener("mousemove",e=>{e.target.contentEditable!=="true"&&D.onMove(e,t.container)}),t.map.addEventListener("mousedown",e=>{e.button===2&&e.target.contentEditable!=="true"&&(D.moved=!1,D.mousedown=!0)}),t.map.addEventListener("mouseleave",e=>{console.log(e.button),e.button===2&&D.clear()}),t.map.addEventListener("mouseup",e=>{e.button===2&&D.clear()}),t.map.addEventListener("contextmenu",e=>{e.preventDefault()})}const rt={create(){return{handlers:{},showHandler:function(){console.log(this.handlers)},addListener:function(t,e){this.handlers[t]===void 0&&(this.handlers[t]=[]),this.handlers[t].push(e)},fire:function(t,...e){if(this.handlers[t]instanceof Array){const n=this.handlers[t];for(let i=0;i<n.length;i++)n[i](...e)}},removeListener:function(t,e){if(!this.handlers[t])return;const n=this.handlers[t];if(!e)n.length=0;else if(n.length)for(let i=0;i<n.length;i++)n[i]===e&&this.handlers[t].splice(i,1)}}}},Q=document,lt=function(){console.time("layout"),this.nodes.innerHTML="";const t=this.createTopic(this.nodeData);re(t,this.nodeData),t.draggable=!1;const e=Q.createElement("me-root");e.appendChild(t);const n=this.nodeData.children||[];if(this.direction===Y){let i=0,o=0;n.map(s=>{s.direction===k?i+=1:s.direction===j?o+=1:i<=o?(s.direction=k,i+=1):(s.direction=j,o+=1)})}ct(this,n,e),console.timeEnd("layout")},ct=function(t,e,n){const i=Q.createElement("me-main");i.className="lhs";const o=Q.createElement("me-main");o.className="rhs";for(let s=0;s<e.length;s++){const r=e[s],{grp:l}=t.createWrapper(r);t.direction===Y?r.direction===k?i.appendChild(l):o.appendChild(l):t.direction===k?i.appendChild(l):o.appendChild(l)}t.nodes.appendChild(i),t.nodes.appendChild(n),t.nodes.appendChild(o),t.nodes.appendChild(t.lines)},at=function(t,e){const n=Q.createElement("me-children");for(let i=0;i<e.length;i++){const o=e[i],{grp:s}=t.createWrapper(o);n.appendChild(s)}return n},S=document,E=(t,e)=>(e?e.mindElixirBox:S).querySelector(`[data-nodeid=me${t}]`),re=function(t,e){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){const n=e.image;if(n.url&&n.width&&n.height){const i=S.createElement("img");i.src=n.url,i.style.width=n.width+"px",i.style.height=n.height+"px",t.appendChild(i),t.image=i}else console.warn("image url/width/height are required")}if(e.hyperLink){const n=S.createElement("a");n.className="hyper-link",n.target="_blank",n.innerText="🔗",n.href=e.hyperLink,t.appendChild(n),t.linkContainer=n}else t.linkContainer&&(t.linkContainer.remove(),t.linkContainer=null);if(e.icons&&e.icons.length){const n=S.createElement("span");n.className="icons",n.innerHTML=e.icons.map(i=>`<span>${G(i)}</span>`).join(""),t.appendChild(n),t.icons=n}if(e.tags&&e.tags.length){const n=S.createElement("div");n.className="tags",n.innerHTML=e.tags.map(i=>`<span>${G(i)}</span>`).join(""),t.appendChild(n),t.tags=n}e.branchColor&&(t.style.borderColor=e.branchColor)},dt=function(t,e){const n=S.createElement("me-wrapper"),{p:i,tpc:o}=this.createParent(t);if(n.appendChild(i),!e&&t.children&&t.children.length>0){const s=Z(t.expanded);if(i.appendChild(s),t.expanded!==!1){const r=at(this,t.children);n.appendChild(r)}}return{grp:n,top:i,tpc:o}},ht=function(t){const e=S.createElement("me-parent"),n=this.createTopic(t);return re(n,t),e.appendChild(n),{p:e,tpc:n}},ut=function(t){const e=S.createElement("me-children");return e.append(...t),e},ft=function(t){const e=S.createElement("me-tpc");return e.nodeObj=t,e.dataset.nodeid="me"+t.id,e.draggable=this.draggable,e};function ve(t){const e=S.createRange();e.selectNodeContents(t);const n=window.getSelection();n&&(n.removeAllRanges(),n.addRange(e))}const pt=function(t){if(console.time("editTopic"),!t)return;const e=S.createElement("div"),n=t.childNodes[0].textContent;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===k&&(e.style.right="0"),e.focus(),ve(e),this.bus.fire("operation",{name:"beginEdit",obj:t.nodeObj}),e.addEventListener("keydown",i=>{i.stopPropagation();const o=i.key;if(o==="Enter"||o==="Tab"){if(i.shiftKey)return;i.preventDefault(),e==null||e.blur(),this.map.focus()}}),e.addEventListener("blur",()=>{var s;if(!e)return;const i=t.nodeObj,o=((s=e.textContent)==null?void 0:s.trim())||"";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",{name:"finishEdit",obj:i,origin:n}))}),console.timeEnd("editTopic")},Z=function(t){const e=S.createElement("me-epd");return e.expanded=t!==!1,e.className=t!==!1?"minus":"",e},H=document,B="http://www.w3.org/2000/svg",mt=function(t,e){const n=H.createElementNS(B,"path");return n.setAttribute("d",t),n.setAttribute("stroke",e||"#666"),n.setAttribute("fill","none"),n.setAttribute("stroke-width","3"),n},X=function(t){const e=H.createElementNS(B,"svg");return e.setAttribute("class",t),e.setAttribute("overflow","visible"),e},be=function(){const t=H.createElementNS(B,"line");return t.setAttribute("stroke","#bbb"),t.setAttribute("fill","none"),t.setAttribute("stroke-width","2"),t},gt=function(t,e){const n=H.createElementNS(B,"path");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},vt=function(t,e){const n={stroke:"rgb(235, 95, 82)",fill:"none","stroke-linecap":"cap","stroke-width":"2"},i=H.createElementNS(B,"g"),o=H.createElementNS(B,"path"),s=H.createElementNS(B,"path");return w(s,{d:e,...n}),w(o,{d:t,...n,"stroke-dasharray":"8,2"}),i.appendChild(o),i.appendChild(s),i},ye=function(t,e,n){if(console.time("editSummary"),!e)return;const i=document.createElement("div");t.nodes.appendChild(i);const o=e.innerHTML;i.id="input-box",i.textContent=o,i.contentEditable="true",i.spellcheck=!1;const s=e.getAttribute("x")+"px",r=e.getAttribute("y")+"px";i.style.cssText=`min-width:${100-8}px;position:absolute;left:${s};top:${r};`;const l=e.getAttribute("text-anchor");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(),ve(i),i.addEventListener("keydown",c=>{c.stopPropagation();const h=c.key;if(h==="Enter"||h==="Tab"){if(c.shiftKey)return;c.preventDefault(),i.blur(),t.map.focus()}}),i.addEventListener("blur",()=>{i&&n(i)}),console.timeEnd("editSummary")};let xe=Ee;const bt=function(t){console.time("linkDiv");const e=this.map.querySelector("me-root");this.nodes.style.top=`${1e4-this.nodes.offsetHeight/2}px`,this.nodes.style.left=`${1e4-e.offsetLeft-e.offsetWidth/2}px`;const n=this.map.querySelectorAll("me-main > me-wrapper");this.lines.innerHTML="",xe=this.subLinkStyle===2?Nt:Ee;for(let i=0;i<n.length;i++){const o=n[i],s=o.querySelector("me-tpc"),r=o.firstChild,l=o.parentNode.className;let c=e.offsetLeft+e.offsetWidth/2;const h=e.offsetTop+e.offsetHeight/2;let a;const u=this.theme.palette,d=s.nodeObj.branchColor||u[i%u.length],{offsetLeft:p,offsetTop:g}=q(this.nodes,r);l==="lhs"?a=p+r.offsetWidth:a=p;const m=g+r.offsetHeight/2;let f="";if(this.mainLinkStyle===2)this.direction===Y&&(l==="lhs"?c=c-e.offsetWidth/6:c=c+e.offsetWidth/6),f=yt({x1:c,y1:h,x2:a,y2:m});else{const b=(1-Math.abs(m-o.parentElement.offsetTop-o.parentElement.offsetHeight/2)/o.parentElement.offsetHeight)*.25*(e.offsetWidth/2);l==="lhs"?c=c-e.offsetWidth/10-b:c=c+e.offsetWidth/10+b,f=xt({x1:c,y1:h,x2:a,y2:m})}this.lines.appendChild(mt(f,d));const v=o.children[0].children[1];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){const x=X("subLines"),b=o.lastChild;b.tagName==="svg"&&b.remove(),o.appendChild(x);const y=o.firstChild,C=o.children[1].children,_=Ne(C,y,l,!0);x.appendChild(gt(_,d))}}this.renderCustomLink(),this.renderSummary(),console.timeEnd("linkDiv")},Ne=function(t,e,n,i){let o="";const s=e.offsetTop,r=e.offsetLeft,l=e.offsetWidth,c=e.offsetHeight;for(let h=0;h<t.length;h++){const a=t[h],u=a.firstChild,d=u.offsetTop,p=u.offsetLeft,g=u.offsetWidth,m=u.offsetHeight;o+=xe({pT:s,pL:r,pW:l,pH:c,cT:d,cL:p,cW:g,cH:m,direction:n,isFirst:i});const f=u.children[1];if(f){if(f.style.bottom=-(f.offsetHeight/2)+"px",n==="lhs"?f.style.left="10px":n==="rhs"&&(f.style.right="10px"),!f.expanded)continue}else continue;const v=a.children[1].children;v.length>0&&(o+=Ne(v,u,n))}return o};function yt({x1:t,y1:e,x2:n,y2:i}){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}`}function xt({x1:t,y1:e,x2:n,y2:i}){return`M ${t} ${e} Q ${t} ${i} ${n} ${i}`}function Nt({pT:t,pL:e,pW:n,pH:i,cT:o,cL:s,cW:r,cH:l,direction:c,isFirst:h}){let a;h?a=t+i/2:a=t+i;const u=o+l;let d=0,p=0,g=0;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-T} A ${T} ${T} 0 0 ${d>p?1:0} ${d>p?g-T:g+T} ${u} H ${p}`:`M ${d} ${a} H ${g} V ${u+T} A ${T} ${T} 0 0 ${d>p?0:1} ${d>p?g-T:g+T} ${u} H ${p}`}function Ee({pT:t,pL:e,pW:n,pH:i,cT:o,cL:s,cW:r,cH:l,direction:c,isFirst:h}){let a=0,u=0;h?a=t+i/2:a=t+i;const d=o+l;let p=0,g=0,m=0;const f=Math.min(Math.abs(a-d)/800,1.2)*M;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}`)}const we={addChild:"插入子节点",addParent:"插入父节点",addSibling:"插入同级节点",removeNode:"删除节点",focus:"专注",cancelFocus:"取消专注",moveUp:"上移",moveDown:"下移",link:"连接",clickTips:"请点击目标节点",summary:"摘要"},Ce={cn:we,zh_CN:we,zh_TW:{addChild:"插入子節點",addParent:"插入父節點",addSibling:"插入同級節點",removeNode:"刪除節點",focus:"專注",cancelFocus:"取消專注",moveUp:"上移",moveDown:"下移",link:"連接",clickTips:"請點擊目標節點",summary:"摘要"},en:{addChild:"Add child",addParent:"Add parent",addSibling:"Add sibling",removeNode:"Remove node",focus:"Focus Mode",cancelFocus:"Cancel Focus Mode",moveUp:"Move up",moveDown:"Move down",link:"Link",clickTips:"Please click the target node",summary:"Summary"},ru:{addChild:"Добавить дочерний элемент",addParent:"Добавить родительский элемент",addSibling:"Добавить на этом уровне",removeNode:"Удалить узел",focus:"Режим фокусировки",cancelFocus:"Отменить режим фокусировки",moveUp:"Поднять выше",moveDown:"Опустить ниже",link:"Ссылка",clickTips:"Пожалуйста, нажмите на целевой узел",summary:"Описание"},ja:{addChild:"子ノードを追加する",addParent:"親ノードを追加します",addSibling:"兄弟ノードを追加する",removeNode:"ノードを削除",focus:"集中",cancelFocus:"集中解除",moveUp:"上へ移動",moveDown:"下へ移動",link:"コネクト",clickTips:"ターゲットノードをクリックしてください",summary:"概要"},pt:{addChild:"Adicionar item filho",addParent:"Adicionar item pai",addSibling:"Adicionar item irmao",removeNode:"Remover item",focus:"Modo Foco",cancelFocus:"Cancelar Modo Foco",moveUp:"Mover para cima",moveDown:"Mover para baixo",link:"Link",clickTips:"Favor clicar no item alvo",summary:"Resumo"}},xn="";function Et(t,e){const n=b=>{const y=document.createElement("div");return y.innerText=b,y.className="tips",y},i=(b,y,C)=>{const _=document.createElement("li");return _.id=b,_.innerHTML=`<span>${G(y)}</span><span>${G(C)}</span>`,_},o=Ce[t.locale]?t.locale:"en",s=Ce[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");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)for(let b=0;b<e.extend.length;b++){const y=e.extend[b],C=i(y.name,y.name,y.key||"");f.appendChild(C),C.onclick=_=>{y.onclick(_)}}const v=document.createElement("div");v.className="context-menu",v.appendChild(f),v.hidden=!0,t.container.append(v);let x=!0;t.container.oncontextmenu=function(b){if(b.preventDefault(),!t.editable)return;const y=b.target;if(y.tagName==="ME-TPC"){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;const C=f.offsetHeight,_=f.offsetWidth;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")}},v.onclick=b=>{b.target===v&&(v.hidden=!0)},r.onclick=()=>{t.addChild(),v.hidden=!0},l.onclick=()=>{t.insertParent(),v.hidden=!0},c.onclick=()=>{x||(t.insertSibling(),v.hidden=!0)},h.onclick=()=>{x||(t.removeNode(),v.hidden=!0)},a.onclick=()=>{x||(t.focusNode(t.currentNode),v.hidden=!0)},u.onclick=()=>{t.cancelFocus(),v.hidden=!0},d.onclick=()=>{x||(t.moveUpNode(),v.hidden=!0)},p.onclick=()=>{x||(t.moveDownNode(),v.hidden=!0)},g.onclick=()=>{v.hidden=!0;const b=t.currentNode,y=n(s.clickTips);t.container.appendChild(y),t.map.addEventListener("click",C=>{C.preventDefault(),y.remove();const _=C.target;_.parentElement.tagName==="ME-PARENT"||_.parentElement.tagName==="ME-ROOT"?t.createLink(b,_):console.log("link cancel")},{once:!0})},m.onclick=()=>{v.hidden=!0,t.createSummary(),t.unselectNodes()}}const wt=t=>{const e=t.map.querySelectorAll(".lhs>me-wrapper>me-parent>me-tpc");t.selectNode(e[Math.ceil(e.length/2)-1])},Ct=t=>{const e=t.map.querySelectorAll(".rhs>me-wrapper>me-parent>me-tpc");t.selectNode(e[Math.ceil(e.length/2)-1])},_e=t=>{t.selectNode(t.map.querySelector("me-root>me-tpc"))};function _t(t){const e={13:()=>{t.insertSibling()},9:()=>{t.addChild()},112:()=>{t.toCenter()},113:()=>{t.beginEdit()},38:n=>{if(n.metaKey||n.ctrlKey)return t.initSide();t.selectPrevSibling()},40:()=>{t.selectNextSibling()},37:n=>{var s;if(n.metaKey||n.ctrlKey)return t.initLeft();if(!t.currentNode)return;const i=t.currentNode.nodeObj,o=t.currentNode.offsetParent.offsetParent.parentElement;t.currentNode.nodeObj.root?wt(t):o.className==="rhs"?(s=i.parent)!=null&&s.root?_e(t):t.selectParent():o.className==="lhs"&&t.selectFirstChild()},39:n=>{var s;if(n.metaKey||n.ctrlKey)return t.initRight();if(!t.currentNode)return;const i=t.currentNode.nodeObj,o=t.currentNode.offsetParent.offsetParent.parentElement;i.root?Ct(t):o.className==="lhs"?(s=i.parent)!=null&&s.root?_e(t):t.selectParent():o.className==="rhs"&&t.selectFirstChild()},33(){t.moveUpNode()},34(){t.moveDownNode()},67:n=>{(n.metaKey||n.ctrlKey)&&(t.waitCopy=t.currentNode)},86:n=>{!t.waitCopy||!t.currentNode||(n.metaKey||n.ctrlKey)&&(t.copyNode(t.waitCopy,t.currentNode),t.waitCopy=null)},187:n=>{if(n.metaKey||n.ctrlKey){if(t.scaleVal>1.6)return;t.scale(t.scaleVal+=.2)}},189:n=>{if(n.metaKey||n.ctrlKey){if(t.scaleVal<.6)return;t.scale(t.scaleVal-=.2)}},48:n=>{(n.metaKey||n.ctrlKey)&&t.scale(1)}};t.map.onkeydown=n=>{if(n.preventDefault(),!!t.editable&&n.target===n.currentTarget)if(n.keyCode===8||n.keyCode===46)t.currentLink?t.removeLink():t.currentSummary?t.removeSummary(t.currentSummary.summaryObj.id):t.removeNode();else{const i=e[n.keyCode];i&&i(n)}}}const Nn="";function St(t,e){const n=(d,p)=>{const g=document.createElement("div");return g.id=d,g.innerHTML=`<svg class="icon" aria-hidden="true">
2
+ var MindElixir=function(){"use strict";const xn="";(function(t){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");if(c&&!t.__iconfont__svg__cssinject__){t.__iconfont__svg__cssinject__=!0;try{document.write("<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>")}catch(a){console&&console.log(a)}}function h(){s||(s=!0,i())}e=function(){var a,u,d,p;(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))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(e,0):(n=function(){document.removeEventListener("DOMContentLoaded",n,!1),e()},document.addEventListener("DOMContentLoaded",n,!1)):document.attachEvent&&(i=e,o=t.document,s=!1,(r=function(){try{o.documentElement.doScroll("left")}catch{return void setTimeout(r,50)}h()})(),o.onreadystatechange=function(){o.readyState=="complete"&&(o.onreadystatechange=null,h())})})(window);const S=0,j=1,Y=2,M=30,T=8,de={name:"Latte",palette:["#dd7878","#ea76cb","#8839ef","#e64553","#fe640b","#df8e1d","#40a02b","#209fb5","#1e66f5","#7287fd"],cssVar:{"--main-color":"#444446","--main-bgcolor":"#ffffff","--color":"#777777","--bgcolor":"#f6f6f6","--panel-color":"#444446","--panel-bgcolor":"#ffffff","--panel-border-color":"#eaeaea"}},he={name:"Dark",palette:["#848FA0","#748BE9","#D2F9FE","#4145A5","#789AFA","#706CF4","#EF987F","#775DD5","#FCEECF","#DA7FBC"],cssVar:{"--main-color":"#ffffff","--main-bgcolor":"#4c4f69","--color":"#cccccc","--bgcolor":"#252526","--panel-color":"#ffffff","--panel-bgcolor":"#2d3748","--panel-border-color":"#696969"}};function G(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;")}const Xe=()=>/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),ue=function(t,e){if(e.id===t)return e;if(e.children&&e.children.length){for(let n=0;n<e.children.length;n++){const i=ue(t,e.children[n]);if(i)return i}return null}else return null},$=(t,e)=>{if(t.parent=e,t.children)for(let n=0;n<t.children.length;n++)$(t.children[n],t)};function fe(t){if(t.id=I(),t.children)for(let e=0;e<t.children.length;e++)fe(t.children[e])}const Ke=(t,e)=>{let n=Date.now();return function(...i){Date.now()-n>=e&&(t(...i),n=Date.now())}};function pe(t,e,n,i){const o=i-e,s=t-n;let r=Math.atan(Math.abs(o)/Math.abs(s))/3.14*180;s<0&&o>0&&(r=180-r),s<0&&o<0&&(r=180+r),s>0&&o<0&&(r=360-r);const l=15,c=30,h=r+c,a=r-c;return{x1:n+Math.cos(Math.PI*h/180)*l,y1:i-Math.sin(Math.PI*h/180)*l,x2:n+Math.cos(Math.PI*a/180)*l,y2:i-Math.sin(Math.PI*a/180)*l}}function I(){return(new Date().getTime().toString(16)+Math.random().toString(16).substr(2)).substr(2,16)}const Ue=function(){const t=I();return{topic:this.newTopicName,id:t}};function Ge(t,e){let n=!0;for(;e.parent;){if(e.parent===t){n=!1;break}e=e.parent}return n}const O=t=>{var i;const e=(i=t.parent)==null?void 0:i.children,n=e.indexOf(t);return{siblings:e,index:n}};function Je(t){const{siblings:e,index:n}=O(t),i=e[n];n===0?(e[n]=e[e.length-1],e[e.length-1]=i):(e[n]=e[n-1],e[n-1]=i)}function Qe(t){const{siblings:e,index:n}=O(t),i=e[n];n===e.length-1?(e[n]=e[0],e[0]=i):(e[n]=e[n+1],e[n+1]=i)}function J(t){const{siblings:e,index:n}=O(t);return e.splice(n,1),e.length}function Ze(t,e){const{siblings:n,index:i}=O(t);n.splice(i+1,0,e)}function et(t,e){const{siblings:n,index:i}=O(t);n.splice(i,0,e)}function tt(t,e){const{siblings:n,index:i}=O(t);n[i]=e,e.children=[t]}function nt(t,e){J(t),e.children?e.children.push(t):e.children=[t]}function it(t,e){J(t);const{siblings:n,index:i}=O(e);n.splice(i,0,t)}function ot(t,e){J(t);const{siblings:n,index:i}=O(e);n.splice(i+1,0,t)}function me(t){return JSON.parse(JSON.stringify(t,(n,i)=>{if(n!=="parent")return i}))}const q=(t,e)=>{let n=0,i=0;for(;e&&e!==t;)n+=e.offsetLeft,i+=e.offsetTop,e=e.offsetParent;return{offsetLeft:n,offsetTop:i}},w=(t,e)=>{for(const n in e)t.setAttribute(n,e[n])},D={moved:!1,mousedown:!1,lastX:0,lastY:0,onMove(t,e){if(this.mousedown){if(this.moved=!0,!this.lastX){this.lastX=t.pageX,this.lastY=t.pageY;return}const n=this.lastX-t.pageX,i=this.lastY-t.pageY;e.scrollTo(e.scrollLeft+n,e.scrollTop+i),this.lastX=t.pageX,this.lastY=t.pageY}},clear(){this.moved=!1,this.mousedown=!1,this.lastX=0,this.lastY=0}},ge=t=>t.tagName==="ME-TPC";function st(t){t.map.addEventListener("click",e=>{if(D.moved){D.clear();return}t.unselectNode(),t.unselectNodes(),t.unselectSummary(),t.unselectLink();const n=e.target;if(n.tagName==="ME-EPD")t.expandNode(n.previousSibling);else if(t.editable)ge(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();else return}),t.map.addEventListener("dblclick",e=>{if(e.preventDefault(),!t.editable)return;const n=e.target;ge(n)?t.beginEdit(n):n.tagName==="text"&&(n.dataset.type==="custom-link"?t.editCutsomLinkLabel(n.parentElement):t.editSummary(n.parentElement))}),t.map.addEventListener("mousemove",e=>{e.target.contentEditable!=="true"&&D.onMove(e,t.container)}),t.map.addEventListener("mousedown",e=>{e.button===2&&e.target.contentEditable!=="true"&&(D.moved=!1,D.mousedown=!0)}),t.map.addEventListener("mouseleave",e=>{console.log(e.button),e.button===2&&D.clear()}),t.map.addEventListener("mouseup",e=>{e.button===2&&D.clear()}),t.map.addEventListener("contextmenu",e=>{e.preventDefault()})}const rt={create(){return{handlers:{},showHandler:function(){console.log(this.handlers)},addListener:function(t,e){this.handlers[t]===void 0&&(this.handlers[t]=[]),this.handlers[t].push(e)},fire:function(t,...e){if(this.handlers[t]instanceof Array){const n=this.handlers[t];for(let i=0;i<n.length;i++)n[i](...e)}},removeListener:function(t,e){if(!this.handlers[t])return;const n=this.handlers[t];if(!e)n.length=0;else if(n.length)for(let i=0;i<n.length;i++)n[i]===e&&this.handlers[t].splice(i,1)}}}},Q=document,lt=function(){console.time("layout"),this.nodes.innerHTML="";const t=this.createTopic(this.nodeData);re(t,this.nodeData),t.draggable=!1;const e=Q.createElement("me-root");e.appendChild(t);const n=this.nodeData.children||[];if(this.direction===Y){let i=0,o=0;n.map(s=>{s.direction===S?i+=1:s.direction===j?o+=1:i<=o?(s.direction=S,i+=1):(s.direction=j,o+=1)})}ct(this,n,e),console.timeEnd("layout")},ct=function(t,e,n){const i=Q.createElement("me-main");i.className="lhs";const o=Q.createElement("me-main");o.className="rhs";for(let s=0;s<e.length;s++){const r=e[s],{grp:l}=t.createWrapper(r);t.direction===Y?r.direction===S?i.appendChild(l):o.appendChild(l):t.direction===S?i.appendChild(l):o.appendChild(l)}t.nodes.appendChild(i),t.nodes.appendChild(n),t.nodes.appendChild(o),t.nodes.appendChild(t.lines)},at=function(t,e){const n=Q.createElement("me-children");for(let i=0;i<e.length;i++){const o=e[i],{grp:s}=t.createWrapper(o);n.appendChild(s)}return n},k=document,E=(t,e)=>(e?e.mindElixirBox:k).querySelector(`[data-nodeid=me${t}]`),re=function(t,e){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){const n=e.image;if(n.url&&n.width&&n.height){const i=k.createElement("img");i.src=n.url,i.style.width=n.width+"px",i.style.height=n.height+"px",t.appendChild(i),t.image=i}else console.warn("image url/width/height are required")}if(e.hyperLink){const n=k.createElement("a");n.className="hyper-link",n.target="_blank",n.innerText="🔗",n.href=e.hyperLink,t.appendChild(n),t.linkContainer=n}else t.linkContainer&&(t.linkContainer.remove(),t.linkContainer=null);if(e.icons&&e.icons.length){const n=k.createElement("span");n.className="icons",n.innerHTML=e.icons.map(i=>`<span>${G(i)}</span>`).join(""),t.appendChild(n),t.icons=n}if(e.tags&&e.tags.length){const n=k.createElement("div");n.className="tags",n.innerHTML=e.tags.map(i=>`<span>${G(i)}</span>`).join(""),t.appendChild(n),t.tags=n}e.branchColor&&(t.style.borderColor=e.branchColor)},dt=function(t,e){const n=k.createElement("me-wrapper"),{p:i,tpc:o}=this.createParent(t);if(n.appendChild(i),!e&&t.children&&t.children.length>0){const s=Z(t.expanded);if(i.appendChild(s),t.expanded!==!1){const r=at(this,t.children);n.appendChild(r)}}return{grp:n,top:i,tpc:o}},ht=function(t){const e=k.createElement("me-parent"),n=this.createTopic(t);return re(n,t),e.appendChild(n),{p:e,tpc:n}},ut=function(t){const e=k.createElement("me-children");return e.append(...t),e},ft=function(t){const e=k.createElement("me-tpc");return e.nodeObj=t,e.dataset.nodeid="me"+t.id,e.draggable=this.draggable,e};function ve(t){const e=k.createRange();e.selectNodeContents(t);const n=window.getSelection();n&&(n.removeAllRanges(),n.addRange(e))}const pt=function(t){if(console.time("editTopic"),!t)return;const e=k.createElement("div"),n=t.childNodes[0].textContent;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(),ve(e),this.bus.fire("operation",{name:"beginEdit",obj:t.nodeObj}),e.addEventListener("keydown",i=>{i.stopPropagation();const o=i.key;if(o==="Enter"||o==="Tab"){if(i.shiftKey)return;i.preventDefault(),e==null||e.blur(),this.map.focus()}}),e.addEventListener("blur",()=>{var s;if(!e)return;const i=t.nodeObj,o=((s=e.textContent)==null?void 0:s.trim())||"";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",{name:"finishEdit",obj:i,origin:n}))}),console.timeEnd("editTopic")},Z=function(t){const e=k.createElement("me-epd");return e.expanded=t!==!1,e.className=t!==!1?"minus":"",e},H=document,B="http://www.w3.org/2000/svg",mt=function(t,e){const n=H.createElementNS(B,"path");return n.setAttribute("d",t),n.setAttribute("stroke",e||"#666"),n.setAttribute("fill","none"),n.setAttribute("stroke-width","3"),n},X=function(t){const e=H.createElementNS(B,"svg");return e.setAttribute("class",t),e.setAttribute("overflow","visible"),e},be=function(){const t=H.createElementNS(B,"line");return t.setAttribute("stroke","#bbb"),t.setAttribute("fill","none"),t.setAttribute("stroke-width","2"),t},gt=function(t,e){const n=H.createElementNS(B,"path");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},vt=function(t,e){const n={stroke:"rgb(235, 95, 82)",fill:"none","stroke-linecap":"cap","stroke-width":"2"},i=H.createElementNS(B,"g"),o=H.createElementNS(B,"path"),s=H.createElementNS(B,"path");return w(s,{d:e,...n}),w(o,{d:t,...n,"stroke-dasharray":"8,2"}),i.appendChild(o),i.appendChild(s),i},ye=function(t,e,n){if(console.time("editSummary"),!e)return;const i=document.createElement("div");t.nodes.appendChild(i);const o=e.innerHTML;i.id="input-box",i.textContent=o,i.contentEditable="true",i.spellcheck=!1;const s=e.getAttribute("x")+"px",r=e.getAttribute("y")+"px";i.style.cssText=`min-width:${100-8}px;position:absolute;left:${s};top:${r};`;const l=e.getAttribute("text-anchor");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(),ve(i),i.addEventListener("keydown",c=>{c.stopPropagation();const h=c.key;if(h==="Enter"||h==="Tab"){if(c.shiftKey)return;c.preventDefault(),i.blur(),t.map.focus()}}),i.addEventListener("blur",()=>{i&&n(i)}),console.timeEnd("editSummary")};let xe=Ee;const bt=function(t){console.time("linkDiv");const e=this.map.querySelector("me-root");this.nodes.style.top=`${1e4-this.nodes.offsetHeight/2}px`,this.nodes.style.left=`${1e4-e.offsetLeft-e.offsetWidth/2}px`;const n=this.map.querySelectorAll("me-main > me-wrapper");this.lines.innerHTML="",xe=this.subLinkStyle===2?Nt:Ee;for(let i=0;i<n.length;i++){const o=n[i],s=o.querySelector("me-tpc"),r=o.firstChild,l=o.parentNode.className;let c=e.offsetLeft+e.offsetWidth/2;const h=e.offsetTop+e.offsetHeight/2;let a;const u=this.theme.palette,d=s.nodeObj.branchColor||u[i%u.length],{offsetLeft:p,offsetTop:g}=q(this.nodes,r);l==="lhs"?a=p+r.offsetWidth:a=p;const m=g+r.offsetHeight/2;let f="";if(this.mainLinkStyle===2)this.direction===Y&&(l==="lhs"?c=c-e.offsetWidth/6:c=c+e.offsetWidth/6),f=yt({x1:c,y1:h,x2:a,y2:m});else{const b=(1-Math.abs(m-o.parentElement.offsetTop-o.parentElement.offsetHeight/2)/o.parentElement.offsetHeight)*.25*(e.offsetWidth/2);l==="lhs"?c=c-e.offsetWidth/10-b:c=c+e.offsetWidth/10+b,f=xt({x1:c,y1:h,x2:a,y2:m})}this.lines.appendChild(mt(f,d));const v=o.children[0].children[1];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){const x=X("subLines"),b=o.lastChild;b.tagName==="svg"&&b.remove(),o.appendChild(x);const y=o.firstChild,C=o.children[1].children,_=Ne(C,y,l,!0);x.appendChild(gt(_,d))}}this.renderCustomLink(),this.renderSummary(),console.timeEnd("linkDiv")},Ne=function(t,e,n,i){let o="";const s=e.offsetTop,r=e.offsetLeft,l=e.offsetWidth,c=e.offsetHeight;for(let h=0;h<t.length;h++){const a=t[h],u=a.firstChild,d=u.offsetTop,p=u.offsetLeft,g=u.offsetWidth,m=u.offsetHeight;o+=xe({pT:s,pL:r,pW:l,pH:c,cT:d,cL:p,cW:g,cH:m,direction:n,isFirst:i});const f=u.children[1];if(f){if(f.style.bottom=-(f.offsetHeight/2)+"px",n==="lhs"?f.style.left="10px":n==="rhs"&&(f.style.right="10px"),!f.expanded)continue}else continue;const v=a.children[1].children;v.length>0&&(o+=Ne(v,u,n))}return o};function yt({x1:t,y1:e,x2:n,y2:i}){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}`}function xt({x1:t,y1:e,x2:n,y2:i}){return`M ${t} ${e} Q ${t} ${i} ${n} ${i}`}function Nt({pT:t,pL:e,pW:n,pH:i,cT:o,cL:s,cW:r,cH:l,direction:c,isFirst:h}){let a;h?a=t+i/2:a=t+i;const u=o+l;let d=0,p=0,g=0;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-T} A ${T} ${T} 0 0 ${d>p?1:0} ${d>p?g-T:g+T} ${u} H ${p}`:`M ${d} ${a} H ${g} V ${u+T} A ${T} ${T} 0 0 ${d>p?0:1} ${d>p?g-T:g+T} ${u} H ${p}`}function Ee({pT:t,pL:e,pW:n,pH:i,cT:o,cL:s,cW:r,cH:l,direction:c,isFirst:h}){let a=0,u=0;h?a=t+i/2:a=t+i;const d=o+l;let p=0,g=0,m=0;const f=Math.min(Math.abs(a-d)/800,1.2)*M;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}`)}const we={addChild:"插入子节点",addParent:"插入父节点",addSibling:"插入同级节点",removeNode:"删除节点",focus:"专注",cancelFocus:"取消专注",moveUp:"上移",moveDown:"下移",link:"连接",clickTips:"请点击目标节点",summary:"摘要"},Ce={cn:we,zh_CN:we,zh_TW:{addChild:"插入子節點",addParent:"插入父節點",addSibling:"插入同級節點",removeNode:"刪除節點",focus:"專注",cancelFocus:"取消專注",moveUp:"上移",moveDown:"下移",link:"連接",clickTips:"請點擊目標節點",summary:"摘要"},en:{addChild:"Add child",addParent:"Add parent",addSibling:"Add sibling",removeNode:"Remove node",focus:"Focus Mode",cancelFocus:"Cancel Focus Mode",moveUp:"Move up",moveDown:"Move down",link:"Link",clickTips:"Please click the target node",summary:"Summary"},ru:{addChild:"Добавить дочерний элемент",addParent:"Добавить родительский элемент",addSibling:"Добавить на этом уровне",removeNode:"Удалить узел",focus:"Режим фокусировки",cancelFocus:"Отменить режим фокусировки",moveUp:"Поднять выше",moveDown:"Опустить ниже",link:"Ссылка",clickTips:"Пожалуйста, нажмите на целевой узел",summary:"Описание"},ja:{addChild:"子ノードを追加する",addParent:"親ノードを追加します",addSibling:"兄弟ノードを追加する",removeNode:"ノードを削除",focus:"集中",cancelFocus:"集中解除",moveUp:"上へ移動",moveDown:"下へ移動",link:"コネクト",clickTips:"ターゲットノードをクリックしてください",summary:"概要"},pt:{addChild:"Adicionar item filho",addParent:"Adicionar item pai",addSibling:"Adicionar item irmao",removeNode:"Remover item",focus:"Modo Foco",cancelFocus:"Cancelar Modo Foco",moveUp:"Mover para cima",moveDown:"Mover para baixo",link:"Link",clickTips:"Favor clicar no item alvo",summary:"Resumo"}},Nn="";function Et(t,e){const n=b=>{const y=document.createElement("div");return y.innerText=b,y.className="tips",y},i=(b,y,C)=>{const _=document.createElement("li");return _.id=b,_.innerHTML=`<span>${G(y)}</span><span>${G(C)}</span>`,_},o=Ce[t.locale]?t.locale:"en",s=Ce[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");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)for(let b=0;b<e.extend.length;b++){const y=e.extend[b],C=i(y.name,y.name,y.key||"");f.appendChild(C),C.onclick=_=>{y.onclick(_)}}const v=document.createElement("div");v.className="context-menu",v.appendChild(f),v.hidden=!0,t.container.append(v);let x=!0;t.container.oncontextmenu=function(b){if(b.preventDefault(),!t.editable)return;const y=b.target;if(y.tagName==="ME-TPC"){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;const C=f.offsetHeight,_=f.offsetWidth;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")}},v.onclick=b=>{b.target===v&&(v.hidden=!0)},r.onclick=()=>{t.addChild(),v.hidden=!0},l.onclick=()=>{t.insertParent(),v.hidden=!0},c.onclick=()=>{x||(t.insertSibling(),v.hidden=!0)},h.onclick=()=>{x||(t.removeNode(),v.hidden=!0)},a.onclick=()=>{x||(t.focusNode(t.currentNode),v.hidden=!0)},u.onclick=()=>{t.cancelFocus(),v.hidden=!0},d.onclick=()=>{x||(t.moveUpNode(),v.hidden=!0)},p.onclick=()=>{x||(t.moveDownNode(),v.hidden=!0)},g.onclick=()=>{v.hidden=!0;const b=t.currentNode,y=n(s.clickTips);t.container.appendChild(y),t.map.addEventListener("click",C=>{C.preventDefault(),y.remove();const _=C.target;_.parentElement.tagName==="ME-PARENT"||_.parentElement.tagName==="ME-ROOT"?t.createLink(b,_):console.log("link cancel")},{once:!0})},m.onclick=()=>{v.hidden=!0,t.createSummary(),t.unselectNodes()}}const wt=t=>{const e=t.map.querySelectorAll(".lhs>me-wrapper>me-parent>me-tpc");t.selectNode(e[Math.ceil(e.length/2)-1])},Ct=t=>{const e=t.map.querySelectorAll(".rhs>me-wrapper>me-parent>me-tpc");t.selectNode(e[Math.ceil(e.length/2)-1])},_e=t=>{t.selectNode(t.map.querySelector("me-root>me-tpc"))};function _t(t){const e={13:()=>{t.insertSibling()},9:()=>{t.addChild()},112:()=>{t.toCenter()},113:()=>{t.beginEdit()},38:n=>{if(n.metaKey||n.ctrlKey)return t.initSide();t.selectPrevSibling()},40:()=>{t.selectNextSibling()},37:n=>{var s;if(n.metaKey||n.ctrlKey)return t.initLeft();if(!t.currentNode)return;const i=t.currentNode.nodeObj,o=t.currentNode.offsetParent.offsetParent.parentElement;t.currentNode.nodeObj.root?wt(t):o.className==="rhs"?(s=i.parent)!=null&&s.root?_e(t):t.selectParent():o.className==="lhs"&&t.selectFirstChild()},39:n=>{var s;if(n.metaKey||n.ctrlKey)return t.initRight();if(!t.currentNode)return;const i=t.currentNode.nodeObj,o=t.currentNode.offsetParent.offsetParent.parentElement;i.root?Ct(t):o.className==="lhs"?(s=i.parent)!=null&&s.root?_e(t):t.selectParent():o.className==="rhs"&&t.selectFirstChild()},33(){t.moveUpNode()},34(){t.moveDownNode()},67:n=>{(n.metaKey||n.ctrlKey)&&(t.waitCopy=t.currentNode)},86:n=>{!t.waitCopy||!t.currentNode||(n.metaKey||n.ctrlKey)&&(t.copyNode(t.waitCopy,t.currentNode),t.waitCopy=null)},187:n=>{if(n.metaKey||n.ctrlKey){if(t.scaleVal>1.6)return;t.scale(t.scaleVal+=.2)}},189:n=>{if(n.metaKey||n.ctrlKey){if(t.scaleVal<.6)return;t.scale(t.scaleVal-=.2)}},48:n=>{(n.metaKey||n.ctrlKey)&&t.scale(1)}};t.map.onkeydown=n=>{if(n.preventDefault(),!!t.editable&&n.target===n.currentTarget)if(n.keyCode===8||n.keyCode===46)t.currentLink?t.removeLink():t.currentSummary?t.removeSummary(t.currentSummary.summaryObj.id):t.removeNode();else{const i=e[n.keyCode];i&&i(n)}}}const En="";function kt(t,e){const n=(d,p)=>{const g=document.createElement("div");return g.id=d,g.innerHTML=`<svg class="icon" aria-hidden="true">
3
3
  <use xlink:href="#icon-${p}"></use>
4
- </svg>`,g},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");if(h.className="menu-list",e&&e.extend)for(let d=0;d<e.extend.length;d++){const p=e.extend[d],g=n(p.name,p.name);h.appendChild(g),g.onclick=m=>{p.onclick(m)}}const a=document.createElement("mmenu");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);let u=!0;t.bus.addListener("unselectNode",function(){a.hidden=!0}),t.bus.addListener("selectNode",function(d){a.hidden=!1,d.root?u=!0:u=!1}),a.onclick=d=>{d.target===a&&(a.hidden=!0)},i.onclick=()=>{t.addChild()},o.onclick=()=>{u||t.insertSibling()},s.onclick=()=>{u||t.removeNode()},r.onclick=d=>{u||t.moveUpNode()},l.onclick=d=>{u||t.moveDownNode()},c.onclick=d=>{t.beginEdit()}}const le=document,kt=function(t,e){if(!e)return ce(t),t;const n=t.getElementsByClassName("insert-preview"),i=`insert-preview ${e} show`;if(n.length>0)n[0].className=i;else{const o=le.createElement("div");o.className=i,t.appendChild(o)}return t},ce=function(t){if(!t)return;const e=t.getElementsByClassName("insert-preview");for(const n of e||[])n.remove()},Se=function(t,e){const n=e.parentElement.parentElement.contains(t);return t&&t.tagName==="ME-TPC"&&t!==e&&!n&&t.nodeObj.root!==!0},Lt=function(t){const e=document.createElement("div");return e.className="mind-elixir-ghost",t.map.appendChild(e),e};function Mt(t){let e=null,n=null,i=null;const o=Lt(t),s=12;t.map.addEventListener("dragstart",r=>{var c;const l=r.target;if((l==null?void 0:l.tagName)!=="ME-TPC"){r.preventDefault();return}e=l,e.parentElement.parentElement.style.opacity="0.5",o.innerHTML=e.innerHTML,(c=r.dataTransfer)==null||c.setDragImage(o,0,0),D.clear()}),t.map.addEventListener("dragend",async r=>{if(!e)return;e.parentElement.parentElement.style.opacity="1";const l=r.target;if(l.style.opacity="",!i)return;ce(i);const c=e.nodeObj;switch(n){case"before":t.moveNodeBefore(e,i),t.selectNode(E(c.id));break;case"after":t.moveNodeAfter(e,i),t.selectNode(E(c.id));break;case"in":t.moveNode(e,i);break}e=null}),t.map.addEventListener("dragover",Ke(function(r){if(!e)return;ce(i);const l=le.elementFromPoint(r.clientX,r.clientY-s);if(Se(l,e)){i=l;const c=l.getBoundingClientRect().y;r.clientY>c+l.clientHeight?n="after":r.clientY>c+l.clientHeight/2&&(n="in")}else{const c=le.elementFromPoint(r.clientX,r.clientY+s);if(Se(c,e)){i=c;const h=c.getBoundingClientRect().y;r.clientY<h?n="before":r.clientY<h+c.clientHeight/2&&(n="in")}else n=i=null}i&&kt(i,n)},200))}function Tt(t){let e=[],n=-1,i=t.getData();t.bus.addListener("operation",o=>{if(o.name==="beginEdit")return;e=e.slice(0,n+1);const s=t.getData();e.push({prev:i,currentNodeId:o.obj.id,next:s}),i=s,n=e.length-1,console.log("operation",o.obj.id,e)}),t.undo=function(){if(n>-1){const o=e[n];i=o.prev,t.refresh(o.prev),t.selectNode(E(o.currentNodeId)),n--,console.log("current",i)}},t.redo=function(){if(n<e.length-1){n++;const o=e[n];i=o.next,t.refresh(o.next),t.selectNode(E(o.currentNodeId))}},t.map.addEventListener("keydown",o=>{(o.metaKey||o.ctrlKey)&&o.shiftKey&&o.key==="Z"?t.redo():(o.metaKey||o.ctrlKey)&&o.key==="z"&&t.undo()})}const En="",z=(t,e)=>{const n=document.createElement("span");return n.id=t,n.innerHTML=`<svg class="icon" aria-hidden="true">
4
+ </svg>`,g},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");if(h.className="menu-list",e&&e.extend)for(let d=0;d<e.extend.length;d++){const p=e.extend[d],g=n(p.name,p.name);h.appendChild(g),g.onclick=m=>{p.onclick(m)}}const a=document.createElement("mmenu");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);let u=!0;t.bus.addListener("unselectNode",function(){a.hidden=!0}),t.bus.addListener("selectNode",function(d){a.hidden=!1,d.root?u=!0:u=!1}),a.onclick=d=>{d.target===a&&(a.hidden=!0)},i.onclick=()=>{t.addChild()},o.onclick=()=>{u||t.insertSibling()},s.onclick=()=>{u||t.removeNode()},r.onclick=d=>{u||t.moveUpNode()},l.onclick=d=>{u||t.moveDownNode()},c.onclick=d=>{t.beginEdit()}}const le=document,St=function(t,e){if(!e)return ce(t),t;const n=t.getElementsByClassName("insert-preview"),i=`insert-preview ${e} show`;if(n.length>0)n[0].className=i;else{const o=le.createElement("div");o.className=i,t.appendChild(o)}return t},ce=function(t){if(!t)return;const e=t.getElementsByClassName("insert-preview");for(const n of e||[])n.remove()},ke=function(t,e){const n=e.parentElement.parentElement.contains(t);return t&&t.tagName==="ME-TPC"&&t!==e&&!n&&t.nodeObj.root!==!0},Lt=function(t){const e=document.createElement("div");return e.className="mind-elixir-ghost",t.map.appendChild(e),e};function Mt(t){let e=null,n=null,i=null;const o=Lt(t),s=12;t.map.addEventListener("dragstart",r=>{var c;const l=r.target;if((l==null?void 0:l.tagName)!=="ME-TPC"){r.preventDefault();return}e=l,e.parentElement.parentElement.style.opacity="0.5",o.innerHTML=e.innerHTML,(c=r.dataTransfer)==null||c.setDragImage(o,0,0),D.clear()}),t.map.addEventListener("dragend",async r=>{if(!e)return;e.parentElement.parentElement.style.opacity="1";const l=r.target;if(l.style.opacity="",!i)return;ce(i);const c=e.nodeObj;switch(n){case"before":t.moveNodeBefore(e,i),t.selectNode(E(c.id));break;case"after":t.moveNodeAfter(e,i),t.selectNode(E(c.id));break;case"in":t.moveNode(e,i);break}e=null}),t.map.addEventListener("dragover",Ke(function(r){if(!e)return;ce(i);const l=le.elementFromPoint(r.clientX,r.clientY-s);if(ke(l,e)){i=l;const c=l.getBoundingClientRect().y;r.clientY>c+l.clientHeight?n="after":r.clientY>c+l.clientHeight/2&&(n="in")}else{const c=le.elementFromPoint(r.clientX,r.clientY+s);if(ke(c,e)){i=c;const h=c.getBoundingClientRect().y;r.clientY<h?n="before":r.clientY<h+c.clientHeight/2&&(n="in")}else n=i=null}i&&St(i,n)},200))}function Tt(t){let e=[],n=-1,i=t.getData();t.bus.addListener("operation",o=>{if(o.name==="beginEdit")return;e=e.slice(0,n+1);const s=t.getData();e.push({prev:i,currentNodeId:o.obj.id,next:s}),i=s,n=e.length-1,console.log("operation",o.obj.id,e)}),t.undo=function(){if(n>-1){const o=e[n];i=o.prev,t.refresh(o.prev),t.selectNode(E(o.currentNodeId)),n--,console.log("current",i)}},t.redo=function(){if(n<e.length-1){n++;const o=e[n];i=o.next,t.refresh(o.next),t.selectNode(E(o.currentNodeId))}},t.map.addEventListener("keydown",o=>{(o.metaKey||o.ctrlKey)&&o.shiftKey&&o.key==="Z"?t.redo():(o.metaKey||o.ctrlKey)&&o.key==="z"&&t.undo()})}const wn="",z=(t,e)=>{const n=document.createElement("span");return n.id=t,n.innerHTML=`<svg class="icon" aria-hidden="true">
5
5
  <use xlink:href="#icon-${e}"></use>
6
- </svg>`,n};function $t(t){const e=document.createElement("div"),n=z("fullscreen","full"),i=z("toCenter","living"),o=z("zoomout","move"),s=z("zoomin","add"),r=document.createElement("span");return r.innerText="100%",e.appendChild(n),e.appendChild(i),e.appendChild(o),e.appendChild(s),e.className="mind-elixir-toolbar rb",n.onclick=()=>{t.container.requestFullscreen()},i.onclick=()=>{t.toCenter()},o.onclick=()=>{t.scaleVal<.6||t.scale(t.scaleVal-=.2)},s.onclick=()=>{t.scaleVal>1.6||t.scale(t.scaleVal+=.2)},e}function Dt(t){const e=document.createElement("div"),n=z("tbltl","left"),i=z("tbltr","right"),o=z("tblts","side");return e.appendChild(n),e.appendChild(i),e.appendChild(o),e.className="mind-elixir-toolbar lt",n.onclick=()=>{t.initLeft()},i.onclick=()=>{t.initRight()},o.onclick=()=>{t.initSide()},e}function Ot(t){t.container.append($t(t)),t.container.append(Dt(t))}/*! @viselect/vanilla v3.3.1 MIT | https://github.com/Simonwep/selection/tree/master/packages/vanilla */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,N=(t,e,n)=>(Pt(t,typeof e!="symbol"?e+"":e,n),n);class jt{constructor(){N(this,"_listeners",new Map),N(this,"on",this.addEventListener),N(this,"off",this.removeEventListener),N(this,"emit",this.dispatchEvent)}addEventListener(e,n){const i=this._listeners.get(e)??new Set;return this._listeners.set(e,i),i.add(n),this}removeEventListener(e,n){var i;return(i=this._listeners.get(e))==null||i.delete(n),this}dispatchEvent(e,...n){let i=!0;for(const o of this._listeners.get(e)??[])i=o(...n)!==!1&&i;return i}unbindAllListeners(){this._listeners.clear()}}const ke=(t,e="px")=>typeof t=="number"?t+e:t;function A({style:t},e,n){if(typeof e=="object")for(const[i,o]of Object.entries(e))o!==void 0&&(t[i]=ke(o));else n!==void 0&&(t[e]=ke(n))}function Le(t){return(e,n,i,o={})=>{e instanceof HTMLCollection||e instanceof NodeList?e=Array.from(e):Array.isArray(e)||(e=[e]),Array.isArray(n)||(n=[n]);for(const s of e)for(const r of n)s[t](r,i,{capture:!1,...o});return[e,n,i,o]}}const F=Le("addEventListener"),P=Le("removeEventListener"),ee=t=>{var e;const{clientX:n,clientY:i,target:o}=((e=t.touches)==null?void 0:e[0])??t;return{x:n,y:i,target:o}};function Me(t,e,n="touch"){switch(n){case"center":{const i=e.left+e.width/2,o=e.top+e.height/2;return i>=t.left&&i<=t.right&&o>=t.top&&o<=t.bottom}case"cover":return e.left>=t.left&&e.top>=t.top&&e.right<=t.right&&e.bottom<=t.bottom;case"touch":return t.right>=e.left&&t.left<=e.right&&t.bottom>=e.top&&t.top<=e.bottom}}function V(t,e=document){const n=Array.isArray(t)?t:[t];let i=[];for(let o=0,s=n.length;o<s;o++){const r=n[o];typeof r=="string"?i=i.concat(Array.from(e.querySelectorAll(r))):r instanceof Element&&i.push(r)}return i}const Ht=()=>matchMedia("(hover: none), (pointer: coarse)").matches,Bt=()=>"safari"in window,zt=t=>{let e,n=-1,i=!1;return{next(...o){e=o,i||(i=!0,n=requestAnimationFrame(()=>{t(...e),i=!1}))},cancel(){cancelAnimationFrame(n),i=!1}}},{abs:R,max:Te,min:$e,ceil:De}=Math;class Oe extends jt{constructor(e){var n,i,o,s,r;super(),N(this,"_options"),N(this,"_selection",{stored:[],selected:[],touched:[],changed:{added:[],removed:[]}}),N(this,"_area"),N(this,"_clippingElement"),N(this,"_targetElement"),N(this,"_targetRect"),N(this,"_selectables",[]),N(this,"_latestElement"),N(this,"_areaRect",new DOMRect),N(this,"_areaLocation",{y1:0,x2:0,y2:0,x1:0}),N(this,"_singleClick",!0),N(this,"_frame"),N(this,"_scrollAvailable",!0),N(this,"_scrollingActive",!1),N(this,"_scrollSpeed",{x:0,y:0}),N(this,"_scrollDelta",{x:0,y:0}),N(this,"disable",this._bindStartEvents.bind(this,!1)),N(this,"enable",this._bindStartEvents),this._options={selectionAreaClass:"selection-area",selectionContainerClass:void 0,selectables:[],document:window.document,startAreas:["html"],boundaries:["html"],container:"body",...e,behaviour:{overlap:"invert",intersect:"touch",...e.behaviour,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},scrolling:{speedDivider:10,manualSpeed:750,...(i=e.behaviour)==null?void 0:i.scrolling,startScrollMargins:{x:0,y:0,...(s=(o=e.behaviour)==null?void 0:o.scrolling)==null?void 0:s.startScrollMargins}}},features:{range:!0,touch:!0,...e.features,singleTap:{allow:!0,intersect:"native",...(r=e.features)==null?void 0:r.singleTap}}};for(const a of Object.getOwnPropertyNames(Object.getPrototypeOf(this)))typeof this[a]=="function"&&(this[a]=this[a].bind(this));const{document:l,selectionAreaClass:c,selectionContainerClass:h}=this._options;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),A(this._area,{willChange:"top, left, bottom, right, width, height",top:0,left:0,position:"fixed"}),A(this._clippingElement,{overflow:"hidden",position:"fixed",transform:"translate3d(0, 0, 0)",pointerEvents:"none",zIndex:"1"}),this._frame=zt(a=>{this._recalculateSelectionAreaRect(),this._updateElementSelection(),this._emitEvent("move",a),this._redrawSelectionArea()}),this.enable()}_bindStartEvents(e=!0){const{document:n,features:i}=this._options,o=e?F:P;o(n,"mousedown",this._onTapStart),i.touch&&o(n,"touchstart",this._onTapStart,{passive:!1})}_onTapStart(e,n=!1){const{x:i,y:o,target:s}=ee(e),{_options:r}=this,{document:l}=this._options,c=s.getBoundingClientRect(),h=V(r.startAreas,r.document),a=V(r.boundaries,r.document);this._targetElement=a.find(p=>Me(p.getBoundingClientRect(),c));const u=e.composedPath();if(!this._targetElement||!h.find(p=>u.includes(p))||!a.find(p=>u.includes(p))||!n&&this._emitEvent("beforestart",e)===!1)return;this._areaLocation={x1:i,y1:o,x2:0,y2:0};const d=l.scrollingElement??l.body;this._scrollDelta={x:d.scrollLeft,y:d.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)}_onSingleTap(e){const{singleTap:{intersect:n},range:i}=this._options.features,o=ee(e);let s;if(n==="native")s=o.target;else if(n==="touch"){this.resolveSelectables();const{x:l,y:c}=o;s=this._selectables.find(h=>{const{right:a,left:u,top:d,bottom:p}=h.getBoundingClientRect();return l<a&&l>u&&c<p&&c>d})}if(!s)return;for(this.resolveSelectables();!this._selectables.includes(s);){if(!s.parentElement)return;s=s.parentElement}const{stored:r}=this._selection;if(this._emitEvent("start",e),e.shiftKey&&i&&this._latestElement){const l=this._latestElement,[c,h]=l.compareDocumentPosition(s)&4?[s,l]:[l,s],a=[...this._selectables.filter(u=>u.compareDocumentPosition(c)&4&&u.compareDocumentPosition(h)&2),c,h];this.select(a),this._latestElement=l}else 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);this._emitEvent("stop",e)}_delayedTapMove(e){const{container:n,document:i,behaviour:{startThreshold:o}}=this._options,{x1:s,y1:r}=this._areaLocation,{x:l,y:c}=ee(e);if(typeof o=="number"&&R(l+c-(s+r))>=o||typeof o=="object"&&R(l-s)>=o.x||R(c-r)>=o.y){if(P(i,["mousemove","touchmove"],this._delayedTapMove,{passive:!1}),this._emitEvent("beforedrag",e)===!1){P(i,["mouseup","touchcancel","touchend"],this._onTapStop);return}F(i,["mousemove","touchmove"],this._onTapMove,{passive:!1}),A(this._area,"display","block"),V(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(h=>this._targetElement.contains(h))),this._setupSelectionArea(),this._emitEvent("start",e),this._onTapMove(e)}this._handleMoveEvent(e)}_setupSelectionArea(){const{_clippingElement:e,_targetElement:n,_area:i}=this,o=this._targetRect=n.getBoundingClientRect();this._scrollAvailable?(A(e,{top:o.top,left:o.left,width:o.width,height:o.height}),A(i,{marginTop:-o.top,marginLeft:-o.left})):(A(e,{top:0,left:0,width:"100%",height:"100%"}),A(i,{marginTop:0,marginLeft:0}))}_onTapMove(e){const{x:n,y:i}=ee(e),{_scrollSpeed:o,_areaLocation:s,_options:r,_frame:l}=this,{speedDivider:c}=r.behaviour.scrolling,h=this._targetElement;if(s.x2=n,s.y2=i,this._scrollAvailable&&!this._scrollingActive&&(o.y||o.x)){this._scrollingActive=!0;const a=()=>{if(!o.x&&!o.y){this._scrollingActive=!1;return}const{scrollTop:u,scrollLeft:d}=h;o.y&&(h.scrollTop+=De(o.y/c),s.y1-=h.scrollTop-u),o.x&&(h.scrollLeft+=De(o.x/c),s.x1-=h.scrollLeft-d),l.next(e),requestAnimationFrame(a)};requestAnimationFrame(a)}else l.next(e);this._handleMoveEvent(e)}_handleMoveEvent(e){const{features:n}=this._options;(n.touch&&Ht()||this._scrollAvailable&&Bt())&&e.preventDefault()}_onScroll(){const{_scrollDelta:e,_options:{document:n}}=this,{scrollTop:i,scrollLeft:o}=n.scrollingElement??n.body;this._areaLocation.x1+=e.x-o,this._areaLocation.y1+=e.y-i,e.x=o,e.y=i,this._setupSelectionArea(),this._frame.next(null)}_manualScroll(e){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;this._scrollSpeed.y+=i*n,this._scrollSpeed.x+=o*n,this._onTapMove(e),e.preventDefault()}_recalculateSelectionAreaRect(){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;let{x2:m,y2:f}=n;const{behaviour:{scrolling:{startScrollMargins:v}}}=s;m<d.left+v.x?(e.x=h?-R(d.left-m+v.x):0,m=m<d.left?d.left:m):m>d.right-v.x?(e.x=a-h-u?R(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?-R(d.top-f+v.y):0,f=f<d.top?d.top:f):f>d.bottom-v.y?(e.y=l-r-c?R(d.top+d.height-f-v.y):0,f=f>d.bottom?d.bottom:f):e.y=0;const x=$e(p,m),b=$e(g,f),y=Te(p,m),C=Te(g,f);i.x=x,i.y=b,i.width=y-x,i.height=C-b}_redrawSelectionArea(){const{x:e,y:n,width:i,height:o}=this._areaRect,{style:s}=this._area;s.left=`${e}px`,s.top=`${n}px`,s.width=`${i}px`,s.height=`${o}px`}_onTapStop(e,n){var i;const{document:o,features:s}=this._options,{_singleClick:r}=this;P(o,["mousemove","touchmove"],this._delayedTapMove),P(o,["touchmove","mousemove"],this._onTapMove),P(o,["mouseup","touchcancel","touchend"],this._onTapStop),P(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&&P(o,"wheel",this._manualScroll,{passive:!0}),this._clippingElement.remove(),(i=this._frame)==null||i.cancel(),A(this._area,"display","none")}_updateElementSelection(){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=[];for(let m=0;m<e.length;m++){const f=e[m];if(Me(o,f.getBoundingClientRect(),c)){if(r.includes(f))s.includes(f)&&!l.includes(f)&&l.push(f);else if(a&&s.includes(f)){p.push(f);continue}else d.push(f);u.push(f)}}a&&d.push(...s.filter(m=>!r.includes(m)));const g=h==="keep";for(let m=0;m<r.length;m++){const f=r[m];!u.includes(f)&&!(g&&s.includes(f))&&p.push(f)}i.selected=u,i.changed={added:d,removed:p},this._latestElement=void 0}_emitEvent(e,n){return this.emit(e,{event:n,store:this._selection,selection:this})}_keepSelection(){const{_options:e,_selection:n}=this,{selected:i,changed:o,touched:s,stored:r}=n,l=i.filter(c=>!r.includes(c));switch(e.behaviour.overlap){case"drop":{n.stored=[...l,...r.filter(c=>!s.includes(c))];break}case"invert":{n.stored=[...l,...r.filter(c=>!o.removed.includes(c))];break}case"keep":{n.stored=[...r,...i.filter(c=>!r.includes(c))];break}}}trigger(e,n=!0){this._onTapStart(e,n)}resolveSelectables(){this._selectables=V(this._options.selectables,this._options.document)}clearSelection(e=!0,n=!1){const{selected:i,stored:o,changed:s}=this._selection;s.added=[],s.removed.push(...i,...e?o:[]),n||(this._emitEvent("move",null),this._emitEvent("stop",null)),this._selection={stored:e?[]:o,selected:[],touched:[],changed:{added:[],removed:[]}}}getSelection(){return this._selection.stored}getSelectionArea(){return this._area}cancel(e=!1){this._onTapStop(null,!e)}destroy(){this.cancel(),this.disable(),this._clippingElement.remove(),super.unbindAllListeners()}select(e,n=!1){const{changed:i,selected:o,stored:s}=this._selection,r=V(e,this._options.document).filter(l=>!o.includes(l)&&!s.includes(l));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}deselect(e,n=!1){const{selected:i,stored:o,changed:s}=this._selection,r=V(e,this._options.document).filter(l=>i.includes(l)||o.includes(l));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(...r.filter(l=>!s.removed.includes(l))),this._latestElement=void 0,n||(this._emitEvent("move",null),this._emitEvent("stop",null)))}}N(Oe,"version","3.3.1");function Rt(t){const e=new Oe({selectables:[".map-container me-tpc"],boundaries:[t.container],container:t.container,behaviour:{scrolling:{speedDivider:10,manualSpeed:750,startScrollMargins:{x:10,y:10}}}}).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})=>{!n.ctrlKey&&!n.metaKey&&(t.unselectNode(),t.unselectNodes(),t.unselectSummary(),e.clearSelection(!0,!0))}).on("move",({store:{changed:{added:n,removed:i}}})=>{D.moved=!0;for(const o of n)o.classList.add("selected");for(const o of i)o.classList.remove("selected")}).on("stop",({store:{stored:n}})=>{console.log(n,"stored"),t.selectNodes(n)})}const qt=function(t,e=!0){this.theme=t;const n=this.theme.cssVar,i=Object.keys(n);for(let o=0;o<i.length;o++){const s=i[o];this.mindElixirBox.style.setProperty(s,n[s])}e&&this.refresh()};function Ae(t){return{nodeData:t.isFocusMode?t.nodeDataBackup:t.nodeData,linkData:t.linkData,summaries:t.summaries,direction:t.direction,theme:t.theme}}const Ft=Object.freeze(Object.defineProperty({__proto__:null,cancelFocus:function(){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())},disableEdit:function(){this.editable=!1},enableEdit:function(){this.editable=!0},expandNode:function(t,e){const n=t.nodeObj;typeof e=="boolean"?n.expanded=e:n.expanded!==!1?n.expanded=!1:n.expanded=!0,this.layout(),this.linkDiv(),this.bus.fire("expandNode",n)},focusNode:function(t){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())},getData:function(){return JSON.parse(this.getDataString())},getDataMd:function(){const t=Ae(this).nodeData;let e="# "+t.topic+`
6
+ </svg>`,n};function $t(t){const e=document.createElement("div"),n=z("fullscreen","full"),i=z("toCenter","living"),o=z("zoomout","move"),s=z("zoomin","add"),r=document.createElement("span");return r.innerText="100%",e.appendChild(n),e.appendChild(i),e.appendChild(o),e.appendChild(s),e.className="mind-elixir-toolbar rb",n.onclick=()=>{t.container.requestFullscreen()},i.onclick=()=>{t.toCenter()},o.onclick=()=>{t.scaleVal<.6||t.scale(t.scaleVal-=.2)},s.onclick=()=>{t.scaleVal>1.6||t.scale(t.scaleVal+=.2)},e}function Dt(t){const e=document.createElement("div"),n=z("tbltl","left"),i=z("tbltr","right"),o=z("tblts","side");return e.appendChild(n),e.appendChild(i),e.appendChild(o),e.className="mind-elixir-toolbar lt",n.onclick=()=>{t.initLeft()},i.onclick=()=>{t.initRight()},o.onclick=()=>{t.initSide()},e}function Ot(t){t.container.append($t(t)),t.container.append(Dt(t))}/*! @viselect/vanilla v3.3.1 MIT | https://github.com/Simonwep/selection/tree/master/packages/vanilla */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,N=(t,e,n)=>(Pt(t,typeof e!="symbol"?e+"":e,n),n);class jt{constructor(){N(this,"_listeners",new Map),N(this,"on",this.addEventListener),N(this,"off",this.removeEventListener),N(this,"emit",this.dispatchEvent)}addEventListener(e,n){const i=this._listeners.get(e)??new Set;return this._listeners.set(e,i),i.add(n),this}removeEventListener(e,n){var i;return(i=this._listeners.get(e))==null||i.delete(n),this}dispatchEvent(e,...n){let i=!0;for(const o of this._listeners.get(e)??[])i=o(...n)!==!1&&i;return i}unbindAllListeners(){this._listeners.clear()}}const Se=(t,e="px")=>typeof t=="number"?t+e:t;function A({style:t},e,n){if(typeof e=="object")for(const[i,o]of Object.entries(e))o!==void 0&&(t[i]=Se(o));else n!==void 0&&(t[e]=Se(n))}function Le(t){return(e,n,i,o={})=>{e instanceof HTMLCollection||e instanceof NodeList?e=Array.from(e):Array.isArray(e)||(e=[e]),Array.isArray(n)||(n=[n]);for(const s of e)for(const r of n)s[t](r,i,{capture:!1,...o});return[e,n,i,o]}}const F=Le("addEventListener"),P=Le("removeEventListener"),ee=t=>{var e;const{clientX:n,clientY:i,target:o}=((e=t.touches)==null?void 0:e[0])??t;return{x:n,y:i,target:o}};function Me(t,e,n="touch"){switch(n){case"center":{const i=e.left+e.width/2,o=e.top+e.height/2;return i>=t.left&&i<=t.right&&o>=t.top&&o<=t.bottom}case"cover":return e.left>=t.left&&e.top>=t.top&&e.right<=t.right&&e.bottom<=t.bottom;case"touch":return t.right>=e.left&&t.left<=e.right&&t.bottom>=e.top&&t.top<=e.bottom}}function V(t,e=document){const n=Array.isArray(t)?t:[t];let i=[];for(let o=0,s=n.length;o<s;o++){const r=n[o];typeof r=="string"?i=i.concat(Array.from(e.querySelectorAll(r))):r instanceof Element&&i.push(r)}return i}const Ht=()=>matchMedia("(hover: none), (pointer: coarse)").matches,Bt=()=>"safari"in window,zt=t=>{let e,n=-1,i=!1;return{next(...o){e=o,i||(i=!0,n=requestAnimationFrame(()=>{t(...e),i=!1}))},cancel(){cancelAnimationFrame(n),i=!1}}},{abs:R,max:Te,min:$e,ceil:De}=Math;class Oe extends jt{constructor(e){var n,i,o,s,r;super(),N(this,"_options"),N(this,"_selection",{stored:[],selected:[],touched:[],changed:{added:[],removed:[]}}),N(this,"_area"),N(this,"_clippingElement"),N(this,"_targetElement"),N(this,"_targetRect"),N(this,"_selectables",[]),N(this,"_latestElement"),N(this,"_areaRect",new DOMRect),N(this,"_areaLocation",{y1:0,x2:0,y2:0,x1:0}),N(this,"_singleClick",!0),N(this,"_frame"),N(this,"_scrollAvailable",!0),N(this,"_scrollingActive",!1),N(this,"_scrollSpeed",{x:0,y:0}),N(this,"_scrollDelta",{x:0,y:0}),N(this,"disable",this._bindStartEvents.bind(this,!1)),N(this,"enable",this._bindStartEvents),this._options={selectionAreaClass:"selection-area",selectionContainerClass:void 0,selectables:[],document:window.document,startAreas:["html"],boundaries:["html"],container:"body",...e,behaviour:{overlap:"invert",intersect:"touch",...e.behaviour,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},scrolling:{speedDivider:10,manualSpeed:750,...(i=e.behaviour)==null?void 0:i.scrolling,startScrollMargins:{x:0,y:0,...(s=(o=e.behaviour)==null?void 0:o.scrolling)==null?void 0:s.startScrollMargins}}},features:{range:!0,touch:!0,...e.features,singleTap:{allow:!0,intersect:"native",...(r=e.features)==null?void 0:r.singleTap}}};for(const a of Object.getOwnPropertyNames(Object.getPrototypeOf(this)))typeof this[a]=="function"&&(this[a]=this[a].bind(this));const{document:l,selectionAreaClass:c,selectionContainerClass:h}=this._options;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),A(this._area,{willChange:"top, left, bottom, right, width, height",top:0,left:0,position:"fixed"}),A(this._clippingElement,{overflow:"hidden",position:"fixed",transform:"translate3d(0, 0, 0)",pointerEvents:"none",zIndex:"1"}),this._frame=zt(a=>{this._recalculateSelectionAreaRect(),this._updateElementSelection(),this._emitEvent("move",a),this._redrawSelectionArea()}),this.enable()}_bindStartEvents(e=!0){const{document:n,features:i}=this._options,o=e?F:P;o(n,"mousedown",this._onTapStart),i.touch&&o(n,"touchstart",this._onTapStart,{passive:!1})}_onTapStart(e,n=!1){const{x:i,y:o,target:s}=ee(e),{_options:r}=this,{document:l}=this._options,c=s.getBoundingClientRect(),h=V(r.startAreas,r.document),a=V(r.boundaries,r.document);this._targetElement=a.find(p=>Me(p.getBoundingClientRect(),c));const u=e.composedPath();if(!this._targetElement||!h.find(p=>u.includes(p))||!a.find(p=>u.includes(p))||!n&&this._emitEvent("beforestart",e)===!1)return;this._areaLocation={x1:i,y1:o,x2:0,y2:0};const d=l.scrollingElement??l.body;this._scrollDelta={x:d.scrollLeft,y:d.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)}_onSingleTap(e){const{singleTap:{intersect:n},range:i}=this._options.features,o=ee(e);let s;if(n==="native")s=o.target;else if(n==="touch"){this.resolveSelectables();const{x:l,y:c}=o;s=this._selectables.find(h=>{const{right:a,left:u,top:d,bottom:p}=h.getBoundingClientRect();return l<a&&l>u&&c<p&&c>d})}if(!s)return;for(this.resolveSelectables();!this._selectables.includes(s);){if(!s.parentElement)return;s=s.parentElement}const{stored:r}=this._selection;if(this._emitEvent("start",e),e.shiftKey&&i&&this._latestElement){const l=this._latestElement,[c,h]=l.compareDocumentPosition(s)&4?[s,l]:[l,s],a=[...this._selectables.filter(u=>u.compareDocumentPosition(c)&4&&u.compareDocumentPosition(h)&2),c,h];this.select(a),this._latestElement=l}else 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);this._emitEvent("stop",e)}_delayedTapMove(e){const{container:n,document:i,behaviour:{startThreshold:o}}=this._options,{x1:s,y1:r}=this._areaLocation,{x:l,y:c}=ee(e);if(typeof o=="number"&&R(l+c-(s+r))>=o||typeof o=="object"&&R(l-s)>=o.x||R(c-r)>=o.y){if(P(i,["mousemove","touchmove"],this._delayedTapMove,{passive:!1}),this._emitEvent("beforedrag",e)===!1){P(i,["mouseup","touchcancel","touchend"],this._onTapStop);return}F(i,["mousemove","touchmove"],this._onTapMove,{passive:!1}),A(this._area,"display","block"),V(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(h=>this._targetElement.contains(h))),this._setupSelectionArea(),this._emitEvent("start",e),this._onTapMove(e)}this._handleMoveEvent(e)}_setupSelectionArea(){const{_clippingElement:e,_targetElement:n,_area:i}=this,o=this._targetRect=n.getBoundingClientRect();this._scrollAvailable?(A(e,{top:o.top,left:o.left,width:o.width,height:o.height}),A(i,{marginTop:-o.top,marginLeft:-o.left})):(A(e,{top:0,left:0,width:"100%",height:"100%"}),A(i,{marginTop:0,marginLeft:0}))}_onTapMove(e){const{x:n,y:i}=ee(e),{_scrollSpeed:o,_areaLocation:s,_options:r,_frame:l}=this,{speedDivider:c}=r.behaviour.scrolling,h=this._targetElement;if(s.x2=n,s.y2=i,this._scrollAvailable&&!this._scrollingActive&&(o.y||o.x)){this._scrollingActive=!0;const a=()=>{if(!o.x&&!o.y){this._scrollingActive=!1;return}const{scrollTop:u,scrollLeft:d}=h;o.y&&(h.scrollTop+=De(o.y/c),s.y1-=h.scrollTop-u),o.x&&(h.scrollLeft+=De(o.x/c),s.x1-=h.scrollLeft-d),l.next(e),requestAnimationFrame(a)};requestAnimationFrame(a)}else l.next(e);this._handleMoveEvent(e)}_handleMoveEvent(e){const{features:n}=this._options;(n.touch&&Ht()||this._scrollAvailable&&Bt())&&e.preventDefault()}_onScroll(){const{_scrollDelta:e,_options:{document:n}}=this,{scrollTop:i,scrollLeft:o}=n.scrollingElement??n.body;this._areaLocation.x1+=e.x-o,this._areaLocation.y1+=e.y-i,e.x=o,e.y=i,this._setupSelectionArea(),this._frame.next(null)}_manualScroll(e){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;this._scrollSpeed.y+=i*n,this._scrollSpeed.x+=o*n,this._onTapMove(e),e.preventDefault()}_recalculateSelectionAreaRect(){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;let{x2:m,y2:f}=n;const{behaviour:{scrolling:{startScrollMargins:v}}}=s;m<d.left+v.x?(e.x=h?-R(d.left-m+v.x):0,m=m<d.left?d.left:m):m>d.right-v.x?(e.x=a-h-u?R(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?-R(d.top-f+v.y):0,f=f<d.top?d.top:f):f>d.bottom-v.y?(e.y=l-r-c?R(d.top+d.height-f-v.y):0,f=f>d.bottom?d.bottom:f):e.y=0;const x=$e(p,m),b=$e(g,f),y=Te(p,m),C=Te(g,f);i.x=x,i.y=b,i.width=y-x,i.height=C-b}_redrawSelectionArea(){const{x:e,y:n,width:i,height:o}=this._areaRect,{style:s}=this._area;s.left=`${e}px`,s.top=`${n}px`,s.width=`${i}px`,s.height=`${o}px`}_onTapStop(e,n){var i;const{document:o,features:s}=this._options,{_singleClick:r}=this;P(o,["mousemove","touchmove"],this._delayedTapMove),P(o,["touchmove","mousemove"],this._onTapMove),P(o,["mouseup","touchcancel","touchend"],this._onTapStop),P(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&&P(o,"wheel",this._manualScroll,{passive:!0}),this._clippingElement.remove(),(i=this._frame)==null||i.cancel(),A(this._area,"display","none")}_updateElementSelection(){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=[];for(let m=0;m<e.length;m++){const f=e[m];if(Me(o,f.getBoundingClientRect(),c)){if(r.includes(f))s.includes(f)&&!l.includes(f)&&l.push(f);else if(a&&s.includes(f)){p.push(f);continue}else d.push(f);u.push(f)}}a&&d.push(...s.filter(m=>!r.includes(m)));const g=h==="keep";for(let m=0;m<r.length;m++){const f=r[m];!u.includes(f)&&!(g&&s.includes(f))&&p.push(f)}i.selected=u,i.changed={added:d,removed:p},this._latestElement=void 0}_emitEvent(e,n){return this.emit(e,{event:n,store:this._selection,selection:this})}_keepSelection(){const{_options:e,_selection:n}=this,{selected:i,changed:o,touched:s,stored:r}=n,l=i.filter(c=>!r.includes(c));switch(e.behaviour.overlap){case"drop":{n.stored=[...l,...r.filter(c=>!s.includes(c))];break}case"invert":{n.stored=[...l,...r.filter(c=>!o.removed.includes(c))];break}case"keep":{n.stored=[...r,...i.filter(c=>!r.includes(c))];break}}}trigger(e,n=!0){this._onTapStart(e,n)}resolveSelectables(){this._selectables=V(this._options.selectables,this._options.document)}clearSelection(e=!0,n=!1){const{selected:i,stored:o,changed:s}=this._selection;s.added=[],s.removed.push(...i,...e?o:[]),n||(this._emitEvent("move",null),this._emitEvent("stop",null)),this._selection={stored:e?[]:o,selected:[],touched:[],changed:{added:[],removed:[]}}}getSelection(){return this._selection.stored}getSelectionArea(){return this._area}cancel(e=!1){this._onTapStop(null,!e)}destroy(){this.cancel(),this.disable(),this._clippingElement.remove(),super.unbindAllListeners()}select(e,n=!1){const{changed:i,selected:o,stored:s}=this._selection,r=V(e,this._options.document).filter(l=>!o.includes(l)&&!s.includes(l));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}deselect(e,n=!1){const{selected:i,stored:o,changed:s}=this._selection,r=V(e,this._options.document).filter(l=>i.includes(l)||o.includes(l));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(...r.filter(l=>!s.removed.includes(l))),this._latestElement=void 0,n||(this._emitEvent("move",null),this._emitEvent("stop",null)))}}N(Oe,"version","3.3.1");function Rt(t){const e=new Oe({selectables:[".map-container me-tpc"],boundaries:[t.container],container:t.container,behaviour:{scrolling:{speedDivider:10,manualSpeed:750,startScrollMargins:{x:10,y:10}}}}).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})=>{!n.ctrlKey&&!n.metaKey&&(t.unselectNode(),t.unselectNodes(),t.unselectSummary(),t.unselectLink(),e.clearSelection(!0,!0))}).on("move",({store:{changed:{added:n,removed:i}}})=>{D.moved=!0;for(const o of n)o.classList.add("selected");for(const o of i)o.classList.remove("selected")}).on("stop",({store:{stored:n}})=>{console.log(n,"stored"),t.selectNodes(n)})}const qt=function(t,e=!0){this.theme=t;const n=this.theme.cssVar,i=Object.keys(n);for(let o=0;o<i.length;o++){const s=i[o];this.mindElixirBox.style.setProperty(s,n[s])}e&&this.refresh()};function Ae(t){return{nodeData:t.isFocusMode?t.nodeDataBackup:t.nodeData,linkData:t.linkData,summaries:t.summaries,direction:t.direction,theme:t.theme}}const Ft=Object.freeze(Object.defineProperty({__proto__:null,cancelFocus:function(){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())},disableEdit:function(){this.editable=!1},enableEdit:function(){this.editable=!0},expandNode:function(t,e){const n=t.nodeObj;typeof e=="boolean"?n.expanded=e:n.expanded!==!1?n.expanded=!1:n.expanded=!0,this.layout(),this.linkDiv(),this.bus.fire("expandNode",n)},focusNode:function(t){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())},getData:function(){return JSON.parse(this.getDataString())},getDataMd:function(){const t=Ae(this).nodeData;let e="# "+t.topic+`
7
7
 
8
8
  `;function n(i,o){for(let s=0;s<i.length;s++)o<=6?e+="".padStart(o,"#")+" "+i[s].topic+`
9
9
 
10
10
  `:e+="".padStart(o-7," ")+"- "+i[s].topic+`
11
- `,i[s].children&&n(i[s].children||[],o+1)}return n(t.children||[],2),e},getDataString:function(){const t=Ae(this);return JSON.stringify(t,(e,n)=>{if(!(e==="parent"&&typeof n!="string"))return n})},initLeft:function(){this.direction=0,this.refresh()},initRight:function(){this.direction=1,this.refresh()},initSide:function(){this.direction=2,this.refresh()},install:function(t){t(this)},refresh:function(t){t&&(t=JSON.parse(JSON.stringify(t)),this.nodeData=t.nodeData,this.linkData=t.linkData||{}),$(this.nodeData),this.layout(),this.linkDiv()},scale:function(t){this.scaleVal=t,this.map.style.transform="scale("+t+")"},selectFirstChild:function(){if(!this.currentNode)return;const t=this.currentNode.parentElement.nextSibling;if(t&&t.firstChild){const e=t.firstChild.firstChild.firstChild;this.selectNode(e)}},selectNextSibling:function(){if(!this.currentNode||this.currentNode.dataset.nodeid==="meroot")return!1;const t=this.currentNode.parentElement.parentElement.nextSibling;let e;if(t)e=t.firstChild.firstChild;else return!1;return this.selectNode(e),!0},selectNode:function(t,e,n){if(t){if(console.time("selectNode"),typeof t=="string"){const i=E(t);return i?this.selectNode(i):void 0}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")}},selectNodes:function(t){if(t){console.time("selectNodes");for(const e of t)e.className="selected";this.currentNodes=t,this.bus.fire("selectNodes",t.map(e=>e.nodeObj)),console.timeEnd("selectNodes")}},selectParent:function(){if(!this.currentNode||this.currentNode.dataset.nodeid==="meroot")return;const t=this.currentNode.parentElement.parentElement.parentElement.previousSibling;if(t){const e=t.firstChild;this.selectNode(e)}},selectPrevSibling:function(){if(!this.currentNode||this.currentNode.dataset.nodeid==="meroot")return!1;const t=this.currentNode.parentElement.parentElement.previousSibling;let e;if(t)e=t.firstChild.firstChild;else return!1;return this.selectNode(e),!0},setLocale:function(t){this.locale=t,this.refresh()},toCenter:function(){this.container.scrollTo(1e4-this.container.offsetWidth/2,1e4-this.container.offsetHeight/2)},unselectNode:function(){this.currentNode&&(this.currentNode.className=""),this.currentNode=null,this.bus.fire("unselectNode")},unselectNodes:function(){if(this.currentNodes)for(const t of this.currentNodes)t.classList.remove("selected");this.currentNodes=null,this.bus.fire("unselectNodes")}},Symbol.toStringTag,{value:"Module"})),te=function(t){const n=t.parentElement.parentElement.lastElementChild;(n==null?void 0:n.tagName)==="svg"&&(n==null||n.remove())},Pe=function(t,e){var n,i;if(t===k)return k;if(t===j)return j;if(t===Y){const o=((n=document.querySelector(".lhs"))==null?void 0:n.childElementCount)||0,s=((i=document.querySelector(".rhs"))==null?void 0:i.childElementCount)||0;return o<=s?(e.direction=k,k):(e.direction=j,j)}},Vt=function(t,e){console.log(e);const n=t.nodeObj,i=me(n);i.style&&e.style&&(e.style=Object.assign(i.style,e.style));const o=Object.assign(n,e);re(t,o),this.linkDiv(),this.bus.fire("operation",{name:"reshapeNode",obj:o,origin:i})},Wt=function(t,e){var h,a,u;const n=t||this.currentNode;if(!n)return;const i=n.nodeObj;if(i.root===!0){this.addChild();return}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){this.addChild(E(i.parent.id));return}const o=e||this.generateNewObj();Ze(i,o),$(this.nodeData);const s=n.parentElement;console.time("insertSibling_DOM");const{grp:r,top:l}=this.createWrapper(o);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",{name:"insertSibling",obj:o})},Yt=function(t,e){const n=t||this.currentNode;if(!n)return;const i=n.nodeObj;if(i.root===!0){this.addChild();return}const o=e||this.generateNewObj();et(i,o),$(this.nodeData);const s=n.parentElement;console.time("insertSibling_DOM");const{grp:r,top:l}=this.createWrapper(o);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",{name:"insertBefore",obj:o})},It=function(t,e){const n=t||this.currentNode;if(!n)return;te(n);const i=n.nodeObj;if(i.root===!0)return;const o=e||this.generateNewObj();tt(i,o),$(this.nodeData);const s=n.parentElement.parentElement;console.time("insertParent_DOM");const{grp:r,top:l}=this.createWrapper(o,!0);l.appendChild(Z(!0)),s.insertAdjacentElement("afterend",r);const c=this.createChildren([s]);l.insertAdjacentElement("afterend",c),this.linkDiv(),e||this.editTopic(l.firstChild),this.selectNode(l.firstChild,!0),console.timeEnd("insertParent_DOM"),this.bus.fire("operation",{name:"insertParent",obj:o})},je=function(t,e){var l,c;if(!t)return null;const n=t.nodeObj;n.expanded===!1&&(this.expandNode(t,!0),t=E(n.id));const i=e||this.generateNewObj();n.children?n.children.push(i):n.children=[i],$(this.nodeData);const o=t.parentElement,{grp:s,top:r}=this.createWrapper(i);if(o.tagName==="ME-PARENT"){if(o.children[1])o.nextSibling.appendChild(s);else{const h=this.createChildren([s]);o.appendChild(Z(!0)),o.insertAdjacentElement("afterend",h)}this.linkDiv(s.offsetParent)}else o.tagName==="ME-ROOT"&&(Pe(this.direction,i)===k?(l=document.querySelector(".lhs"))==null||l.appendChild(s):(c=document.querySelector(".rhs"))==null||c.appendChild(s),this.linkDiv());return{newTop:r,newNodeObj:i}},He=Object.freeze(Object.defineProperty({__proto__:null,addChild:function(t,e){console.time("addChild");const n=t||this.currentNode;if(!n)return;const i=je.call(this,n,e);if(!i)return;const{newTop:o,newNodeObj:s}=i;this.bus.fire("operation",{name:"addChild",obj:s}),console.timeEnd("addChild"),e||this.editTopic(o.firstChild),this.selectNode(o.firstChild,!0)},beginEdit:function(t){const e=t||this.currentNode;e&&this.editTopic(e)},copyNode:function(t,e){console.time("copyNode");const n=me(t.nodeObj);fe(n);const i=je.call(this,e,n);if(!i)return;const{newNodeObj:o}=i;console.timeEnd("copyNode"),this.bus.fire("operation",{name:"copyNode",obj:o})},insertBefore:Yt,insertParent:It,insertSibling:Wt,moveDownNode:function(t){const e=t||this.currentNode;if(!e)return;const n=e.parentNode.parentNode,i=e.nodeObj;Qe(i),n.nextSibling?n.nextSibling.insertAdjacentElement("afterend",n):n.parentNode.prepend(n),this.linkDiv(),this.bus.fire("operation",{name:"moveDownNode",obj:i})},moveNode:function(t,e){var l;const n=t.nodeObj,i=e.nodeObj,o=(l=n==null?void 0:n.parent)==null?void 0:l.id;if(i.expanded===!1&&(this.expandNode(e,!0),t=E(n.id),e=E(i.id)),!Ge(n,i)){console.warn("Invalid move");return}console.time("moveNode"),nt(n,i),$(this.nodeData);const s=t.parentElement,r=e.parentElement;if(r.tagName==="ME-PARENT")if(te(t),r.children[1])r.nextSibling.appendChild(s.parentElement);else{const c=this.createChildren([s.parentElement]);r.appendChild(Z(!0)),r.parentElement.insertBefore(c,r.nextSibling)}else r.tagName==="ME-ROOT"&&(Pe(this.direction,n),r.nextSibling.appendChild(s.parentElement));this.linkDiv(),this.bus.fire("operation",{name:"moveNode",obj:n,toObj:i,originParentId:o}),console.timeEnd("moveNode")},moveNodeAfter:function(t,e){var h;const n=t.nodeObj,i=e.nodeObj,o=(h=n.parent)==null?void 0:h.id;ot(n,i),$(this.nodeData),te(t);const r=t.parentElement.parentElement;e.parentElement.parentElement.insertAdjacentElement("afterend",r),this.linkDiv(),this.bus.fire("operation",{name:"moveNodeAfter",obj:n,toObj:i,originParentId:o})},moveNodeBefore:function(t,e){var h;const n=t.nodeObj,i=e.nodeObj,o=(h=n.parent)==null?void 0:h.id;it(n,i),$(this.nodeData),te(t);const r=t.parentElement.parentNode;e.parentElement.parentNode.insertAdjacentElement("beforebegin",r),this.linkDiv(),this.bus.fire("operation",{name:"moveNodeBefore",obj:n,toObj:i,originParentId:o})},moveUpNode:function(t){const e=t||this.currentNode;if(!e)return;const n=e.parentNode.parentNode,i=e.nodeObj;Je(i),n.parentNode.insertBefore(n,n.previousSibling),this.linkDiv(),this.bus.fire("operation",{name:"moveUpNode",obj:i})},removeNode:function(t){var l;const e=t||this.currentNode;if(!e)return;const n=e.nodeObj;if(n.root===!0)throw new Error("Can not remove root node");const i=n.parent.children,o=i.findIndex(c=>c===n),s=J(n),r=e.parentNode;if(s===0){const c=r.parentNode.parentNode;c.tagName!=="ME-MAIN"&&c.previousSibling.children[1].remove()}if(i.length!==0){const c=i[o]||i[o-1];this.selectNode(E(c.id))}else this.selectNode(E(n.parent.id));for(const c in this.linkData){const h=this.linkData[c];if(h.from===n.id||h.to===n.id){const a=this.mindElixirBox.querySelector(`[data-linkid=${this.linkData[c].id}]`);this.removeLink(a)}}r.parentNode.remove(),this.linkDiv(),this.bus.fire("operation",{name:"removeNode",obj:n,originIndex:o,originParentId:(l=n==null?void 0:n.parent)==null?void 0:l.id})},reshapeNode:Vt,setNodeTopic:function(t,e){t.childNodes[0].textContent=e,t.nodeObj.topic=e,this.linkDiv()}},Symbol.toStringTag,{value:"Module"})),Be={create:function(t){return{dom:t,mousedown:!1,lastX:0,lastY:0,handleMouseMove(e){if(this.mousedown){if(!this.lastX){this.lastX=e.pageX,this.lastY=e.pageY;return}const n=this.lastX-e.pageX,i=this.lastY-e.pageY;this.cb&&this.cb(n,i),this.lastX=e.pageX,this.lastY=e.pageY}},handleMouseDown(e){this.mousedown=!0},handleClear(e){this.clear()},cb:null,init(e,n){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)},destory(e){e.removeEventListener("mousemove",this.handleMouseMove),e.removeEventListener("mouseleave",this.handleClear),e.removeEventListener("mouseup",this.handleClear),this.dom.removeEventListener("mousedown",this.handleMouseDown)},clear(){this.mousedown=!1,this.lastX=0,this.lastY=0}}}};function ne(t,e,n){const{offsetLeft:i,offsetTop:o}=q(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;return{w:s,h:r,cx:l,cy:c,ctrlX:h,ctrlY:a}}function W(t){let e,n;const i=(t.cy-t.ctrlY)/(t.ctrlX-t.cx);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),{x:e,y:n}}const Xt=function(t,e,n,i){const o=document.createElementNS("http://www.w3.org/2000/svg","text");return w(o,{"text-anchor":"middle",x:e+"",y:n+"",fill:i||"#666"}),o.dataset.type="custom-link",o.innerHTML=t,o},Kt=function(t,e,n,i){if(!t||!e)return;const o=performance.now();this.hideLinkController();const s=ne(this,t,n.delta1),r=ne(this,e,n.delta2),{x:l,y:c}=W(s),{ctrlX:h,ctrlY:a}=s,{ctrlX:u,ctrlY:d}=r,{x:p,y:g}=W(r),m=pe(u,d,p,g),f=vt(`M ${l} ${c} C ${h} ${a} ${u} ${d} ${p} ${g}`,`M ${m.x1} ${m.y1} L ${p} ${g} L ${m.x2} ${m.y2}`),v=l/8+h*3/8+u*3/8+p/8,x=c/8+a*3/8+d*3/8+g/8,b=Xt(n.label,v,x,this.theme.cssVar["--color"]);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));const y=performance.now();console.log(`DrawCustomLink Execution time: ${y-o} ms`)},Ut=function(t,e){const n={id:I(),label:"Custom Link",from:t.nodeObj.id,to:e.nodeObj.id,delta1:{x:0,y:-200},delta2:{x:0,y:-200}};this.drawCustomLink(t,e,n)},Gt=function(t){let e;if(t?e=t:e=this.currentLink,!e)return;this.hideLinkController();const n=e.linkObj.id;delete this.linkData[n],e.remove(),e=null},Jt=function(t){this.currentLink=t;const e=t.linkObj,n=E(e.from),i=E(e.to),o=ne(this,n,e.delta1),s=ne(this,i,e.delta2);this.showLinkController(e,o,s)},Qt=function(){this.linkController.style.display="none",this.P2.style.display="none",this.P3.style.display="none"},Zt=function(t,e,n){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);let{x:i,y:o}=W(e),{ctrlX:s,ctrlY:r}=e,{ctrlX:l,ctrlY:c}=n,{x:h,y:a}=W(n);this.P2.style.cssText=`top:${r}px;left:${s}px;`,this.P3.style.cssText=`top:${c}px;left:${l}px;`,w(this.line1,{x1:i+"",y1:o+"",x2:s+"",y2:r+""}),w(this.line2,{x1:l+"",y1:c+"",x2:h+"",y2:a+""}),this.helper1&&(this.helper1.destory(this.map),this.helper2.destory(this.map)),this.helper1=Be.create(this.P2),this.helper2=Be.create(this.P3),this.helper1.init(this.map,(u,d)=>{var f;s=s-u/this.scaleVal,r=r-d/this.scaleVal;const p=W({...e,ctrlX:s,ctrlY:r});i=p.x,o=p.y;const g=i/8+s*3/8+l*3/8+h/8,m=o/8+r*3/8+c*3/8+a/8;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}`),w(this.currentLink.children[2],{x:g+"",y:m+""}),w(this.line1,{x1:i+"",y1:o+"",x2:s+"",y2:r+""}),t.delta1.x=s-e.cx,t.delta1.y=r-e.cy}),this.helper2.init(this.map,(u,d)=>{var v,x;l=l-u/this.scaleVal,c=c-d/this.scaleVal;const p=W({...n,ctrlX:l,ctrlY:c});h=p.x,a=p.y;const g=i/8+s*3/8+l*3/8+h/8,m=o/8+r*3/8+c*3/8+a/8,f=pe(l,c,h,a);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}`),w(this.currentLink.children[2],{x:g+"",y:m+""}),w(this.line2,{x1:l+"",y1:c+"",x2:h+"",y2:a+""}),t.delta2.x=l-n.cx,t.delta2.y=c-n.cy})};function en(){this.linkSvgGroup.innerHTML="";for(const t in this.linkData){const e=this.linkData[t];this.drawCustomLink(E(e.from),E(e.to),e,!0)}this.nodes.appendChild(this.linkSvgGroup)}function tn(t){if(console.time("editSummary"),!t)return;const e=t.children[2];console.log(e,t),ye(this,e,n=>{var s;const i=t.linkObj,o=((s=n.textContent)==null?void 0:s.trim())||"";o===""?i.label=origin:i.label=o,n.remove(),o!==origin&&(e.innerHTML=i.label,this.linkDiv())}),console.timeEnd("editSummary")}const nn=Object.freeze(Object.defineProperty({__proto__:null,createLink:Ut,drawCustomLink:Kt,editCutsomLinkLabel:tn,hideLinkController:Qt,removeLink:Gt,renderCustomLink:en,selectLink:Jt,showLinkController:Zt},Symbol.toStringTag,{value:"Module"})),on=function(t){var c,h;if(t.length===0)throw new Error("No selected node.");if(t.length===1){const a=t[0].nodeObj,u=t[0].nodeObj.parent;if(!u)throw new Error("Can not select root node.");const d=u.children.findIndex(p=>a===p);return{parent:u.id,start:d,end:d}}let e=0;const n=t.map(a=>{let u=a.nodeObj;const d=[];for(;u.parent;){const p=u.parent,g=p.children,m=g==null?void 0:g.indexOf(u);u=p,d.unshift({node:u,index:m})}return d.length>e&&(e=d.length),d});let i=0;e:for(;i<e;i++){const a=(c=n[0][i])==null?void 0:c.node;for(let u=1;u<n.length;u++)if(((h=n[u][i])==null?void 0:h.node)!==a)break e}if(!i)throw new Error("Can not select root node.");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;if(l.root)throw new Error("Please select nodes in the same main topic.");return{parent:l.id,start:s,end:r}},sn=function(t){const e=document.createElementNS("http://www.w3.org/2000/svg","g");return e.setAttribute("id",t),e},ze=function(t,e){const n=document.createElementNS("http://www.w3.org/2000/svg","path");return w(n,{d:t,stroke:e||"#666",fill:"none","stroke-linecap":"round","stroke-width":"2"}),n},Re=function(t,e,n,i,o){const s=document.createElementNS("http://www.w3.org/2000/svg","text");return w(s,{"text-anchor":i,x:e+"",y:n+"",fill:o||"#666"}),s.innerHTML=t,s},rn=t=>E(t).parentElement.parentElement,ln=function({parent:t,start:e}){var s,r;const n=E(t),i=n.nodeObj;let o;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},qe=function(t,e){var _;const{id:n,text:i,parent:o,start:s,end:r}=e,l=t.nodes,h=E(o).nodeObj,a=ln(e);let u=1/0,d=0,p=0,g=0;for(let U=s;U<=r;U++){const Ye=(_=h.children)==null?void 0:_[U];if(!Ye)return console.warn("Child not found"),t.removeSummary(n),null;const oe=rn(Ye.id),{offsetLeft:se,offsetTop:Ie}=q(l,oe);U===s&&(p=Ie),U===r&&(g=Ie+oe.offsetHeight),se<u&&(u=se),oe.offsetWidth+se>d&&(d=oe.offsetWidth+se)}let m,f;const v=p+10,x=g+10,b=(v+x)/2,y=t.theme.cssVar["--color"];a==="lhs"?(m=ze(`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=Re(i,u-20,b+6,"end",y)):(m=ze(`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=Re(i,d+20,b+6,"start",y));const C=sn("s-"+n);return C.appendChild(m),C.appendChild(f),C.summaryObj=e,t.summarySvg.appendChild(C),C},cn=Object.freeze(Object.defineProperty({__proto__:null,createSummary:function(){let t=[];this.currentNode?t=[this.currentNode]:this.currentNodes&&(t=this.currentNodes);const{parent:e,start:n,end:i}=on(t),o={id:I(),parent:e,start:n,end:i,text:"summary"},s=qe(this,o);this.summaries.push(o),this.editSummary(s)},editSummary:function(t){if(console.time("editSummary"),!t)return;const e=t.childNodes[1];ye(this,e,n=>{var s;const i=t.summaryObj,o=((s=n.textContent)==null?void 0:s.trim())||"";o===""?i.text=origin:i.text=o,n.remove(),o!==origin&&(e.innerHTML=i.text,this.linkDiv(),this.bus.fire("operation",{name:"finishEditSummary",obj:i,origin}))}),console.timeEnd("editSummary")},removeSummary:function(t){var n;const e=this.summaries.findIndex(i=>i.id===t);e>-1&&(this.summaries.splice(e,1),(n=document.querySelector("#s-"+t))==null||n.remove())},renderSummary:function(){this.summarySvg.innerHTML="",this.summaries.forEach(t=>{qe(this,t)}),this.nodes.insertAdjacentElement("beforeend",this.summarySvg)},selectSummary:function(t){const e=t.children[1].getBBox(),n=6,i=3,o=document.createElementNS("http://www.w3.org/2000/svg","rect");w(o,{x:e.x-n+"",y:e.y-n+"",width:e.width+n*2+"",height:e.height+n*2+"",rx:i+"",stroke:this.theme.cssVar["--selected"]||"#4dc4ff","stroke-width":"2",fill:"none"}),o.classList.add("selected"),t.appendChild(o),this.currentSummary=t},unselectSummary:function(){var t,e;(e=(t=this.currentSummary)==null?void 0:t.querySelector("rect"))==null||e.remove(),this.currentSummary=null}},Symbol.toStringTag,{value:"Module"}));function an(t,e){const n=document.createElementNS("http://www.w3.org/2000/svg","svg");return w(n,{version:"1.1",xmlns:"http://www.w3.org/2000/svg",height:t,width:e}),n}function dn(t,e){return(parseInt(t)-parseInt(e))/2}function hn(t,e,n,i){const o=document.createElementNS("http://www.w3.org/2000/svg","g");return t.childNodes[0].textContent.split(`
12
- `).forEach((l,c)=>{const h=document.createElementNS("http://www.w3.org/2000/svg","text");w(h,{x:n+parseInt(e.paddingLeft)+"",y:i+parseInt(e.paddingTop)+dn(e.lineHeight,e.fontSize)*(c+1)+parseFloat(e.fontSize)*(c+1)+"","text-anchor":"start","font-family":e.fontFamily,"font-size":`${e.fontSize}`,"font-weight":`${e.fontWeight}`,fill:`${e.color}`}),h.innerHTML=l,o.appendChild(h)}),o}function un(t,e,n,i){const o=t.childNodes[0].textContent,s=document.createElementNS("http://www.w3.org/2000/svg","foreignObject");w(s,{x:n+parseInt(e.paddingLeft)+"",y:i+parseInt(e.paddingTop)+"",width:e.width,height:e.height});const r=document.createElement("div");return w(r,{xmlns:"http://www.w3.org/1999/xhtml",style:`font-family: ${e.fontFamily}; font-size: ${e.fontSize}; font-weight: ${e.fontWeight}; color: ${e.color}; white-space: pre-wrap;`}),r.innerHTML=o,s.appendChild(r),s}function ae(t,e,n=!1){const i=getComputedStyle(e),{offsetLeft:o,offsetTop:s}=q(t.nodes,e),r=document.createElementNS("http://www.w3.org/2000/svg","rect");w(r,{x:o+"",y:s+"",rx:i.borderRadius,ry:i.borderRadius,width:i.width,height:i.height,fill:i.backgroundColor,stroke:i.borderColor,"stroke-width":i.borderWidth});const l=document.createElementNS("http://www.w3.org/2000/svg","g");l.appendChild(r);let c;return n?c=un(e,i,o,s):c=hn(e,i,o,s),l.appendChild(c),l}function fn(t,e){const n=getComputedStyle(e),{offsetLeft:i,offsetTop:o}=q(t.nodes,e),s=document.createElementNS("http://www.w3.org/2000/svg","a"),r=document.createElementNS("http://www.w3.org/2000/svg","text");return w(r,{x:i+"",y:o+parseInt(n.fontSize)+"","text-anchor":"start","font-family":n.fontFamily,"font-size":`${n.fontSize}`,"font-weight":`${n.fontWeight}`,fill:`${n.color}`}),r.innerHTML=e.textContent,s.appendChild(r),s.setAttribute("href",e.href),s}const ie=100,pn='<?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">',Fe=t=>{var a,u,d;const e=t.nodes,n=e.offsetHeight+ie*2,i=e.offsetWidth+ie*2,o=an(n+"px",i+"px"),s=document.createElementNS("http://www.w3.org/2000/svg","svg"),r=document.createElementNS("http://www.w3.org/2000/svg","rect");w(r,{x:"0",y:"0",width:`${i}`,height:`${n}`,fill:t.theme.cssVar["--bgcolor"]}),o.appendChild(r),e.querySelectorAll(".subLines").forEach(p=>{const g=p.cloneNode(!0),{offsetLeft:m,offsetTop:f}=q(e,p.parentElement);g.setAttribute("x",`${m}`),g.setAttribute("y",`${f}`),s.appendChild(g)});const l=(a=e.querySelector(".lines"))==null?void 0:a.cloneNode(!0);l&&s.appendChild(l);const c=(u=e.querySelector(".topiclinks"))==null?void 0:u.cloneNode(!0);c&&s.appendChild(c);const h=(d=e.querySelector(".summary"))==null?void 0:d.cloneNode(!0);return h&&s.appendChild(h),e.querySelectorAll("me-tpc").forEach(p=>{s.appendChild(ae(t,p,!0))}),e.querySelectorAll(".tags > span").forEach(p=>{s.appendChild(ae(t,p))}),e.querySelectorAll(".icons > span").forEach(p=>{s.appendChild(ae(t,p))}),e.querySelectorAll(".hyper-link").forEach(p=>{s.appendChild(fn(t,p))}),w(s,{x:ie+"",y:ie+"",overflow:"visible"}),o.appendChild(s),pn+o.outerHTML};function mn(t){return new Promise((e,n)=>{const i=new FileReader;i.onload=o=>{e(o.target.result)},i.onerror=o=>{n(o)},i.readAsDataURL(t)})}const gn=Object.freeze(Object.defineProperty({__proto__:null,exportPng:async function(){const t=Fe(this),e=new Blob([t],{type:"image/svg+xml"}),n=await mn(e);return new Promise((i,o)=>{const s=new Image;s.setAttribute("crossOrigin","anonymous"),s.onload=()=>{const r=document.createElement("canvas");r.width=s.width,r.height=s.height,r.getContext("2d").drawImage(s,0,0),r.toBlob(i,"image/png",1)},s.src=n,s.onerror=o})},exportSvg:function(){const t=Fe(this);return new Blob([t],{type:"image/svg+xml"})}},Symbol.toStringTag,{value:"Module"}));function vn(t,e){return async function(...n){const i=this.before[e];i&&!await i.apply(this,n)||t.apply(this,n)}}const Ve=Object.keys(He),We={};for(let t=0;t<Ve.length;t++){const e=Ve[t];We[e]=vn(He[e],e)}const bn={getObjById:ue,generateNewObj:Ue,layout:lt,linkDiv:bt,editTopic:pt,createWrapper:dt,createParent:ht,createChildren:ut,createTopic:ft,findEle:E,changeTheme:qt,...Ft,...We,...nn,...cn,...gn,init(t){if(!t||!t.nodeData)return new Error("MindElixir: `data` is required");t.direction!==void 0&&(this.direction=t.direction),this.changeTheme(t.theme||this.theme,!1),this.nodeData=t.nodeData,$(this.nodeData),this.linkData=t.linkData||{},this.summaries=t.summaries||[],this.toolBar&&Ot(this),this.keypress&&_t(this),this.editable&&Rt(this),Xe()&&this.mobileMenu?St(this):this.contextMenu&&Et(this,this.contextMenuOption),this.draggable&&Mt(this),this.allowUndo&&Tt(this),this.toCenter(),this.layout(),this.linkDiv()}},K=document;function L({el:t,direction:e,locale:n,draggable:i,editable:o,contextMenu:s,contextMenuOption:r,toolBar:l,keypress:c,before:h,newTopicName:a,allowUndo:u,mainLinkStyle:d,subLinkStyle:p,overflowHidden:g,mobileMenu:m,theme:f}){console.log("ME_version "+L.version,this);let v=null;const x=Object.prototype.toString.call(t);if(x==="[object HTMLDivElement]"?v=t:x==="[object String]"&&(v=document.querySelector(t)),!v)throw new Error("MindElixir: el is not a valid element");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=K.createElement("div"),this.container.className="map-container";const b=window.matchMedia("(prefers-color-scheme: dark)");this.theme=f||(b.matches?he:de);const y=K.createElement("div");y.className="map-canvas",this.map=y,this.map.setAttribute("tabindex","0"),this.container.appendChild(this.map),this.mindElixirBox.appendChild(this.container),this.nodes=K.createElement("me-nodes"),this.nodes.className="main-node-container",this.lines=X("lines"),this.summarySvg=X("summary"),this.linkController=X("linkcontroller"),this.P2=K.createElement("div"),this.P3=K.createElement("div"),this.P2.className=this.P3.className="circle",this.P2.style.display=this.P3.style.display="none",this.line1=be(),this.line2=be(),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)}return L.prototype=bn,L.LEFT=k,L.RIGHT=j,L.SIDE=Y,L.THEME=de,L.DARK_THEME=he,L.version="3.2.1",L.E=E,L.new=t=>({nodeData:{id:I(),topic:t||"new topic",root:!0,children:[]},linkData:{}}),L}();
11
+ `,i[s].children&&n(i[s].children||[],o+1)}return n(t.children||[],2),e},getDataString:function(){const t=Ae(this);return JSON.stringify(t,(e,n)=>{if(!(e==="parent"&&typeof n!="string"))return n})},initLeft:function(){this.direction=0,this.refresh()},initRight:function(){this.direction=1,this.refresh()},initSide:function(){this.direction=2,this.refresh()},install:function(t){t(this)},refresh:function(t){t&&(t=JSON.parse(JSON.stringify(t)),this.nodeData=t.nodeData,this.linkData=t.linkData||{}),$(this.nodeData),this.layout(),this.linkDiv()},scale:function(t){this.scaleVal=t,this.map.style.transform="scale("+t+")"},selectFirstChild:function(){if(!this.currentNode)return;const t=this.currentNode.parentElement.nextSibling;if(t&&t.firstChild){const e=t.firstChild.firstChild.firstChild;this.selectNode(e)}},selectNextSibling:function(){if(!this.currentNode||this.currentNode.dataset.nodeid==="meroot")return!1;const t=this.currentNode.parentElement.parentElement.nextSibling;let e;if(t)e=t.firstChild.firstChild;else return!1;return this.selectNode(e),!0},selectNode:function(t,e,n){if(t){if(console.time("selectNode"),typeof t=="string"){const i=E(t);return i?this.selectNode(i):void 0}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")}},selectNodes:function(t){if(t){console.time("selectNodes");for(const e of t)e.className="selected";this.currentNodes=t,this.bus.fire("selectNodes",t.map(e=>e.nodeObj)),console.timeEnd("selectNodes")}},selectParent:function(){if(!this.currentNode||this.currentNode.dataset.nodeid==="meroot")return;const t=this.currentNode.parentElement.parentElement.parentElement.previousSibling;if(t){const e=t.firstChild;this.selectNode(e)}},selectPrevSibling:function(){if(!this.currentNode||this.currentNode.dataset.nodeid==="meroot")return!1;const t=this.currentNode.parentElement.parentElement.previousSibling;let e;if(t)e=t.firstChild.firstChild;else return!1;return this.selectNode(e),!0},setLocale:function(t){this.locale=t,this.refresh()},toCenter:function(){this.container.scrollTo(1e4-this.container.offsetWidth/2,1e4-this.container.offsetHeight/2)},unselectNode:function(){this.currentNode&&(this.currentNode.className=""),this.currentNode=null,this.bus.fire("unselectNode")},unselectNodes:function(){if(this.currentNodes)for(const t of this.currentNodes)t.classList.remove("selected");this.currentNodes=null,this.bus.fire("unselectNodes")}},Symbol.toStringTag,{value:"Module"})),te=function(t){const n=t.parentElement.parentElement.lastElementChild;(n==null?void 0:n.tagName)==="svg"&&(n==null||n.remove())},Pe=function(t,e){var n,i;if(t===S)return S;if(t===j)return j;if(t===Y){const o=((n=document.querySelector(".lhs"))==null?void 0:n.childElementCount)||0,s=((i=document.querySelector(".rhs"))==null?void 0:i.childElementCount)||0;return o<=s?(e.direction=S,S):(e.direction=j,j)}},Vt=function(t,e){console.log(e);const n=t.nodeObj,i=me(n);i.style&&e.style&&(e.style=Object.assign(i.style,e.style));const o=Object.assign(n,e);re(t,o),this.linkDiv(),this.bus.fire("operation",{name:"reshapeNode",obj:o,origin:i})},Wt=function(t,e){var h,a,u;const n=t||this.currentNode;if(!n)return;const i=n.nodeObj;if(i.root===!0){this.addChild();return}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){this.addChild(E(i.parent.id));return}const o=e||this.generateNewObj();Ze(i,o),$(this.nodeData);const s=n.parentElement;console.time("insertSibling_DOM");const{grp:r,top:l}=this.createWrapper(o);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",{name:"insertSibling",obj:o})},Yt=function(t,e){const n=t||this.currentNode;if(!n)return;const i=n.nodeObj;if(i.root===!0){this.addChild();return}const o=e||this.generateNewObj();et(i,o),$(this.nodeData);const s=n.parentElement;console.time("insertSibling_DOM");const{grp:r,top:l}=this.createWrapper(o);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",{name:"insertBefore",obj:o})},It=function(t,e){const n=t||this.currentNode;if(!n)return;te(n);const i=n.nodeObj;if(i.root===!0)return;const o=e||this.generateNewObj();tt(i,o),$(this.nodeData);const s=n.parentElement.parentElement;console.time("insertParent_DOM");const{grp:r,top:l}=this.createWrapper(o,!0);l.appendChild(Z(!0)),s.insertAdjacentElement("afterend",r);const c=this.createChildren([s]);l.insertAdjacentElement("afterend",c),this.linkDiv(),e||this.editTopic(l.firstChild),this.selectNode(l.firstChild,!0),console.timeEnd("insertParent_DOM"),this.bus.fire("operation",{name:"insertParent",obj:o})},je=function(t,e){var l,c;if(!t)return null;const n=t.nodeObj;n.expanded===!1&&(this.expandNode(t,!0),t=E(n.id));const i=e||this.generateNewObj();n.children?n.children.push(i):n.children=[i],$(this.nodeData);const o=t.parentElement,{grp:s,top:r}=this.createWrapper(i);if(o.tagName==="ME-PARENT"){if(o.children[1])o.nextSibling.appendChild(s);else{const h=this.createChildren([s]);o.appendChild(Z(!0)),o.insertAdjacentElement("afterend",h)}this.linkDiv(s.offsetParent)}else o.tagName==="ME-ROOT"&&(Pe(this.direction,i)===S?(l=document.querySelector(".lhs"))==null||l.appendChild(s):(c=document.querySelector(".rhs"))==null||c.appendChild(s),this.linkDiv());return{newTop:r,newNodeObj:i}},He=Object.freeze(Object.defineProperty({__proto__:null,addChild:function(t,e){console.time("addChild");const n=t||this.currentNode;if(!n)return;const i=je.call(this,n,e);if(!i)return;const{newTop:o,newNodeObj:s}=i;this.bus.fire("operation",{name:"addChild",obj:s}),console.timeEnd("addChild"),e||this.editTopic(o.firstChild),this.selectNode(o.firstChild,!0)},beginEdit:function(t){const e=t||this.currentNode;e&&this.editTopic(e)},copyNode:function(t,e){console.time("copyNode");const n=me(t.nodeObj);fe(n);const i=je.call(this,e,n);if(!i)return;const{newNodeObj:o}=i;console.timeEnd("copyNode"),this.bus.fire("operation",{name:"copyNode",obj:o})},insertBefore:Yt,insertParent:It,insertSibling:Wt,moveDownNode:function(t){const e=t||this.currentNode;if(!e)return;const n=e.parentNode.parentNode,i=e.nodeObj;Qe(i),n.nextSibling?n.nextSibling.insertAdjacentElement("afterend",n):n.parentNode.prepend(n),this.linkDiv(),this.bus.fire("operation",{name:"moveDownNode",obj:i})},moveNode:function(t,e){var l;const n=t.nodeObj,i=e.nodeObj,o=(l=n==null?void 0:n.parent)==null?void 0:l.id;if(i.expanded===!1&&(this.expandNode(e,!0),t=E(n.id),e=E(i.id)),!Ge(n,i)){console.warn("Invalid move");return}console.time("moveNode"),nt(n,i),$(this.nodeData);const s=t.parentElement,r=e.parentElement;if(r.tagName==="ME-PARENT")if(te(t),r.children[1])r.nextSibling.appendChild(s.parentElement);else{const c=this.createChildren([s.parentElement]);r.appendChild(Z(!0)),r.parentElement.insertBefore(c,r.nextSibling)}else r.tagName==="ME-ROOT"&&(Pe(this.direction,n),r.nextSibling.appendChild(s.parentElement));this.linkDiv(),this.bus.fire("operation",{name:"moveNode",obj:n,toObj:i,originParentId:o}),console.timeEnd("moveNode")},moveNodeAfter:function(t,e){var h;const n=t.nodeObj,i=e.nodeObj,o=(h=n.parent)==null?void 0:h.id;ot(n,i),$(this.nodeData),te(t);const r=t.parentElement.parentElement;e.parentElement.parentElement.insertAdjacentElement("afterend",r),this.linkDiv(),this.bus.fire("operation",{name:"moveNodeAfter",obj:n,toObj:i,originParentId:o})},moveNodeBefore:function(t,e){var h;const n=t.nodeObj,i=e.nodeObj,o=(h=n.parent)==null?void 0:h.id;it(n,i),$(this.nodeData),te(t);const r=t.parentElement.parentNode;e.parentElement.parentNode.insertAdjacentElement("beforebegin",r),this.linkDiv(),this.bus.fire("operation",{name:"moveNodeBefore",obj:n,toObj:i,originParentId:o})},moveUpNode:function(t){const e=t||this.currentNode;if(!e)return;const n=e.parentNode.parentNode,i=e.nodeObj;Je(i),n.parentNode.insertBefore(n,n.previousSibling),this.linkDiv(),this.bus.fire("operation",{name:"moveUpNode",obj:i})},removeNode:function(t){var l;const e=t||this.currentNode;if(!e)return;const n=e.nodeObj;if(n.root===!0)throw new Error("Can not remove root node");const i=n.parent.children,o=i.findIndex(c=>c===n),s=J(n),r=e.parentNode;if(s===0){const c=r.parentNode.parentNode;c.tagName!=="ME-MAIN"&&c.previousSibling.children[1].remove()}if(i.length!==0){const c=i[o]||i[o-1];this.selectNode(E(c.id))}else this.selectNode(E(n.parent.id));for(const c in this.linkData){const h=this.linkData[c];if(h.from===n.id||h.to===n.id){const a=this.mindElixirBox.querySelector(`[data-linkid=${this.linkData[c].id}]`);this.removeLink(a)}}r.parentNode.remove(),this.linkDiv(),this.bus.fire("operation",{name:"removeNode",obj:n,originIndex:o,originParentId:(l=n==null?void 0:n.parent)==null?void 0:l.id})},reshapeNode:Vt,setNodeTopic:function(t,e){t.childNodes[0].textContent=e,t.nodeObj.topic=e,this.linkDiv()}},Symbol.toStringTag,{value:"Module"})),Be={create:function(t){return{dom:t,mousedown:!1,lastX:0,lastY:0,handleMouseMove(e){if(this.mousedown){if(!this.lastX){this.lastX=e.pageX,this.lastY=e.pageY;return}const n=this.lastX-e.pageX,i=this.lastY-e.pageY;this.cb&&this.cb(n,i),this.lastX=e.pageX,this.lastY=e.pageY}},handleMouseDown(e){this.mousedown=!0},handleClear(e){this.clear()},cb:null,init(e,n){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)},destory(e){e.removeEventListener("mousemove",this.handleMouseMove),e.removeEventListener("mouseleave",this.handleClear),e.removeEventListener("mouseup",this.handleClear),this.dom.removeEventListener("mousedown",this.handleMouseDown)},clear(){this.mousedown=!1,this.lastX=0,this.lastY=0}}}};function ne(t,e,n){const{offsetLeft:i,offsetTop:o}=q(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;return{w:s,h:r,cx:l,cy:c,ctrlX:h,ctrlY:a}}function W(t){let e,n;const i=(t.cy-t.ctrlY)/(t.ctrlX-t.cx);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),{x:e,y:n}}const Xt=function(t,e,n,i){const o=document.createElementNS("http://www.w3.org/2000/svg","text");return w(o,{"text-anchor":"middle",x:e+"",y:n+"",fill:i||"#666"}),o.dataset.type="custom-link",o.innerHTML=t,o},Kt=function(t,e,n,i){if(!t||!e)return;const o=performance.now();this.hideLinkController();const s=ne(this,t,n.delta1),r=ne(this,e,n.delta2),{x:l,y:c}=W(s),{ctrlX:h,ctrlY:a}=s,{ctrlX:u,ctrlY:d}=r,{x:p,y:g}=W(r),m=pe(u,d,p,g),f=vt(`M ${l} ${c} C ${h} ${a} ${u} ${d} ${p} ${g}`,`M ${m.x1} ${m.y1} L ${p} ${g} L ${m.x2} ${m.y2}`),v=l/8+h*3/8+u*3/8+p/8,x=c/8+a*3/8+d*3/8+g/8,b=Xt(n.label,v,x,this.theme.cssVar["--color"]);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));const y=performance.now();console.log(`DrawCustomLink Execution time: ${y-o} ms`)},Ut=function(t,e){const n={id:I(),label:"Custom Link",from:t.nodeObj.id,to:e.nodeObj.id,delta1:{x:0,y:-200},delta2:{x:0,y:-200}};this.drawCustomLink(t,e,n)},Gt=function(t){let e;if(t?e=t:e=this.currentLink,!e)return;this.hideLinkController();const n=e.linkObj.id;delete this.linkData[n],e.remove(),e=null},Jt=function(t){this.currentLink=t;const e=t.linkObj,n=E(e.from),i=E(e.to),o=ne(this,n,e.delta1),s=ne(this,i,e.delta2);this.showLinkController(e,o,s)},Qt=function(){this.currentLink=null,this.hideLinkController()},Zt=function(){this.linkController.style.display="none",this.P2.style.display="none",this.P3.style.display="none"},en=function(t,e,n){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);let{x:i,y:o}=W(e),{ctrlX:s,ctrlY:r}=e,{ctrlX:l,ctrlY:c}=n,{x:h,y:a}=W(n);this.P2.style.cssText=`top:${r}px;left:${s}px;`,this.P3.style.cssText=`top:${c}px;left:${l}px;`,w(this.line1,{x1:i+"",y1:o+"",x2:s+"",y2:r+""}),w(this.line2,{x1:l+"",y1:c+"",x2:h+"",y2:a+""}),this.helper1&&(this.helper1.destory(this.map),this.helper2.destory(this.map)),this.helper1=Be.create(this.P2),this.helper2=Be.create(this.P3),this.helper1.init(this.map,(u,d)=>{var f;s=s-u/this.scaleVal,r=r-d/this.scaleVal;const p=W({...e,ctrlX:s,ctrlY:r});i=p.x,o=p.y;const g=i/8+s*3/8+l*3/8+h/8,m=o/8+r*3/8+c*3/8+a/8;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}`),w(this.currentLink.children[2],{x:g+"",y:m+""}),w(this.line1,{x1:i+"",y1:o+"",x2:s+"",y2:r+""}),t.delta1.x=s-e.cx,t.delta1.y=r-e.cy}),this.helper2.init(this.map,(u,d)=>{var v,x;l=l-u/this.scaleVal,c=c-d/this.scaleVal;const p=W({...n,ctrlX:l,ctrlY:c});h=p.x,a=p.y;const g=i/8+s*3/8+l*3/8+h/8,m=o/8+r*3/8+c*3/8+a/8,f=pe(l,c,h,a);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}`),w(this.currentLink.children[2],{x:g+"",y:m+""}),w(this.line2,{x1:l+"",y1:c+"",x2:h+"",y2:a+""}),t.delta2.x=l-n.cx,t.delta2.y=c-n.cy})};function tn(){this.linkSvgGroup.innerHTML="";for(const t in this.linkData){const e=this.linkData[t];this.drawCustomLink(E(e.from),E(e.to),e,!0)}this.nodes.appendChild(this.linkSvgGroup)}function nn(t){if(console.time("editSummary"),!t)return;const e=t.children[2];console.log(e,t),ye(this,e,n=>{var s;const i=t.linkObj,o=((s=n.textContent)==null?void 0:s.trim())||"";o===""?i.label=origin:i.label=o,n.remove(),o!==origin&&(e.innerHTML=i.label,this.linkDiv())}),console.timeEnd("editSummary")}const on=Object.freeze(Object.defineProperty({__proto__:null,createLink:Ut,drawCustomLink:Kt,editCutsomLinkLabel:nn,hideLinkController:Zt,removeLink:Gt,renderCustomLink:tn,selectLink:Jt,showLinkController:en,unselectLink:Qt},Symbol.toStringTag,{value:"Module"})),sn=function(t){var c,h;if(t.length===0)throw new Error("No selected node.");if(t.length===1){const a=t[0].nodeObj,u=t[0].nodeObj.parent;if(!u)throw new Error("Can not select root node.");const d=u.children.findIndex(p=>a===p);return{parent:u.id,start:d,end:d}}let e=0;const n=t.map(a=>{let u=a.nodeObj;const d=[];for(;u.parent;){const p=u.parent,g=p.children,m=g==null?void 0:g.indexOf(u);u=p,d.unshift({node:u,index:m})}return d.length>e&&(e=d.length),d});let i=0;e:for(;i<e;i++){const a=(c=n[0][i])==null?void 0:c.node;for(let u=1;u<n.length;u++)if(((h=n[u][i])==null?void 0:h.node)!==a)break e}if(!i)throw new Error("Can not select root node.");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;if(l.root)throw new Error("Please select nodes in the same main topic.");return{parent:l.id,start:s,end:r}},rn=function(t){const e=document.createElementNS("http://www.w3.org/2000/svg","g");return e.setAttribute("id",t),e},ze=function(t,e){const n=document.createElementNS("http://www.w3.org/2000/svg","path");return w(n,{d:t,stroke:e||"#666",fill:"none","stroke-linecap":"round","stroke-width":"2"}),n},Re=function(t,e,n,i,o){const s=document.createElementNS("http://www.w3.org/2000/svg","text");return w(s,{"text-anchor":i,x:e+"",y:n+"",fill:o||"#666"}),s.innerHTML=t,s},ln=t=>E(t).parentElement.parentElement,cn=function({parent:t,start:e}){var s,r;const n=E(t),i=n.nodeObj;let o;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},qe=function(t,e){var _;const{id:n,text:i,parent:o,start:s,end:r}=e,l=t.nodes,h=E(o).nodeObj,a=cn(e);let u=1/0,d=0,p=0,g=0;for(let U=s;U<=r;U++){const Ye=(_=h.children)==null?void 0:_[U];if(!Ye)return console.warn("Child not found"),t.removeSummary(n),null;const oe=ln(Ye.id),{offsetLeft:se,offsetTop:Ie}=q(l,oe);U===s&&(p=Ie),U===r&&(g=Ie+oe.offsetHeight),se<u&&(u=se),oe.offsetWidth+se>d&&(d=oe.offsetWidth+se)}let m,f;const v=p+10,x=g+10,b=(v+x)/2,y=t.theme.cssVar["--color"];a==="lhs"?(m=ze(`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=Re(i,u-20,b+6,"end",y)):(m=ze(`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=Re(i,d+20,b+6,"start",y));const C=rn("s-"+n);return C.appendChild(m),C.appendChild(f),C.summaryObj=e,t.summarySvg.appendChild(C),C},an=Object.freeze(Object.defineProperty({__proto__:null,createSummary:function(){let t=[];this.currentNode?t=[this.currentNode]:this.currentNodes&&(t=this.currentNodes);const{parent:e,start:n,end:i}=sn(t),o={id:I(),parent:e,start:n,end:i,text:"summary"},s=qe(this,o);this.summaries.push(o),this.editSummary(s)},editSummary:function(t){if(console.time("editSummary"),!t)return;const e=t.childNodes[1];ye(this,e,n=>{var s;const i=t.summaryObj,o=((s=n.textContent)==null?void 0:s.trim())||"";o===""?i.text=origin:i.text=o,n.remove(),o!==origin&&(e.innerHTML=i.text,this.linkDiv(),this.bus.fire("operation",{name:"finishEditSummary",obj:i,origin}))}),console.timeEnd("editSummary")},removeSummary:function(t){var n;const e=this.summaries.findIndex(i=>i.id===t);e>-1&&(this.summaries.splice(e,1),(n=document.querySelector("#s-"+t))==null||n.remove())},renderSummary:function(){this.summarySvg.innerHTML="",this.summaries.forEach(t=>{qe(this,t)}),this.nodes.insertAdjacentElement("beforeend",this.summarySvg)},selectSummary:function(t){const e=t.children[1].getBBox(),n=6,i=3,o=document.createElementNS("http://www.w3.org/2000/svg","rect");w(o,{x:e.x-n+"",y:e.y-n+"",width:e.width+n*2+"",height:e.height+n*2+"",rx:i+"",stroke:this.theme.cssVar["--selected"]||"#4dc4ff","stroke-width":"2",fill:"none"}),o.classList.add("selected"),t.appendChild(o),this.currentSummary=t},unselectSummary:function(){var t,e;(e=(t=this.currentSummary)==null?void 0:t.querySelector("rect"))==null||e.remove(),this.currentSummary=null}},Symbol.toStringTag,{value:"Module"}));function dn(t,e){const n=document.createElementNS("http://www.w3.org/2000/svg","svg");return w(n,{version:"1.1",xmlns:"http://www.w3.org/2000/svg",height:t,width:e}),n}function hn(t,e){return(parseInt(t)-parseInt(e))/2}function un(t,e,n,i){const o=document.createElementNS("http://www.w3.org/2000/svg","g");return t.childNodes[0].textContent.split(`
12
+ `).forEach((l,c)=>{const h=document.createElementNS("http://www.w3.org/2000/svg","text");w(h,{x:n+parseInt(e.paddingLeft)+"",y:i+parseInt(e.paddingTop)+hn(e.lineHeight,e.fontSize)*(c+1)+parseFloat(e.fontSize)*(c+1)+"","text-anchor":"start","font-family":e.fontFamily,"font-size":`${e.fontSize}`,"font-weight":`${e.fontWeight}`,fill:`${e.color}`}),h.innerHTML=l,o.appendChild(h)}),o}function fn(t,e,n,i){const o=t.childNodes[0].textContent,s=document.createElementNS("http://www.w3.org/2000/svg","foreignObject");w(s,{x:n+parseInt(e.paddingLeft)+"",y:i+parseInt(e.paddingTop)+"",width:e.width,height:e.height});const r=document.createElement("div");return w(r,{xmlns:"http://www.w3.org/1999/xhtml",style:`font-family: ${e.fontFamily}; font-size: ${e.fontSize}; font-weight: ${e.fontWeight}; color: ${e.color}; white-space: pre-wrap;`}),r.innerHTML=o,s.appendChild(r),s}function ae(t,e,n=!1){const i=getComputedStyle(e),{offsetLeft:o,offsetTop:s}=q(t.nodes,e),r=document.createElementNS("http://www.w3.org/2000/svg","rect");w(r,{x:o+"",y:s+"",rx:i.borderRadius,ry:i.borderRadius,width:i.width,height:i.height,fill:i.backgroundColor,stroke:i.borderColor,"stroke-width":i.borderWidth});const l=document.createElementNS("http://www.w3.org/2000/svg","g");l.appendChild(r);let c;return n?c=fn(e,i,o,s):c=un(e,i,o,s),l.appendChild(c),l}function pn(t,e){const n=getComputedStyle(e),{offsetLeft:i,offsetTop:o}=q(t.nodes,e),s=document.createElementNS("http://www.w3.org/2000/svg","a"),r=document.createElementNS("http://www.w3.org/2000/svg","text");return w(r,{x:i+"",y:o+parseInt(n.fontSize)+"","text-anchor":"start","font-family":n.fontFamily,"font-size":`${n.fontSize}`,"font-weight":`${n.fontWeight}`,fill:`${n.color}`}),r.innerHTML=e.textContent,s.appendChild(r),s.setAttribute("href",e.href),s}const ie=100,mn='<?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">',Fe=t=>{var a,u,d;const e=t.nodes,n=e.offsetHeight+ie*2,i=e.offsetWidth+ie*2,o=dn(n+"px",i+"px"),s=document.createElementNS("http://www.w3.org/2000/svg","svg"),r=document.createElementNS("http://www.w3.org/2000/svg","rect");w(r,{x:"0",y:"0",width:`${i}`,height:`${n}`,fill:t.theme.cssVar["--bgcolor"]}),o.appendChild(r),e.querySelectorAll(".subLines").forEach(p=>{const g=p.cloneNode(!0),{offsetLeft:m,offsetTop:f}=q(e,p.parentElement);g.setAttribute("x",`${m}`),g.setAttribute("y",`${f}`),s.appendChild(g)});const l=(a=e.querySelector(".lines"))==null?void 0:a.cloneNode(!0);l&&s.appendChild(l);const c=(u=e.querySelector(".topiclinks"))==null?void 0:u.cloneNode(!0);c&&s.appendChild(c);const h=(d=e.querySelector(".summary"))==null?void 0:d.cloneNode(!0);return h&&s.appendChild(h),e.querySelectorAll("me-tpc").forEach(p=>{s.appendChild(ae(t,p,!0))}),e.querySelectorAll(".tags > span").forEach(p=>{s.appendChild(ae(t,p))}),e.querySelectorAll(".icons > span").forEach(p=>{s.appendChild(ae(t,p))}),e.querySelectorAll(".hyper-link").forEach(p=>{s.appendChild(pn(t,p))}),w(s,{x:ie+"",y:ie+"",overflow:"visible"}),o.appendChild(s),mn+o.outerHTML};function gn(t){return new Promise((e,n)=>{const i=new FileReader;i.onload=o=>{e(o.target.result)},i.onerror=o=>{n(o)},i.readAsDataURL(t)})}const vn=Object.freeze(Object.defineProperty({__proto__:null,exportPng:async function(){const t=Fe(this),e=new Blob([t],{type:"image/svg+xml"}),n=await gn(e);return new Promise((i,o)=>{const s=new Image;s.setAttribute("crossOrigin","anonymous"),s.onload=()=>{const r=document.createElement("canvas");r.width=s.width,r.height=s.height,r.getContext("2d").drawImage(s,0,0),r.toBlob(i,"image/png",1)},s.src=n,s.onerror=o})},exportSvg:function(){const t=Fe(this);return new Blob([t],{type:"image/svg+xml"})}},Symbol.toStringTag,{value:"Module"}));function bn(t,e){return async function(...n){const i=this.before[e];i&&!await i.apply(this,n)||t.apply(this,n)}}const Ve=Object.keys(He),We={};for(let t=0;t<Ve.length;t++){const e=Ve[t];We[e]=bn(He[e],e)}const yn={getObjById:ue,generateNewObj:Ue,layout:lt,linkDiv:bt,editTopic:pt,createWrapper:dt,createParent:ht,createChildren:ut,createTopic:ft,findEle:E,changeTheme:qt,...Ft,...We,...on,...an,...vn,init(t){if(!t||!t.nodeData)return new Error("MindElixir: `data` is required");t.direction!==void 0&&(this.direction=t.direction),this.changeTheme(t.theme||this.theme,!1),this.nodeData=t.nodeData,$(this.nodeData),this.linkData=t.linkData||{},this.summaries=t.summaries||[],this.toolBar&&Ot(this),this.keypress&&_t(this),this.editable&&Rt(this),Xe()&&this.mobileMenu?kt(this):this.contextMenu&&Et(this,this.contextMenuOption),this.draggable&&Mt(this),this.allowUndo&&Tt(this),this.toCenter(),this.layout(),this.linkDiv()}},K=document;function L({el:t,direction:e,locale:n,draggable:i,editable:o,contextMenu:s,contextMenuOption:r,toolBar:l,keypress:c,before:h,newTopicName:a,allowUndo:u,mainLinkStyle:d,subLinkStyle:p,overflowHidden:g,mobileMenu:m,theme:f}){console.log("ME_version "+L.version,this);let v=null;const x=Object.prototype.toString.call(t);if(x==="[object HTMLDivElement]"?v=t:x==="[object String]"&&(v=document.querySelector(t)),!v)throw new Error("MindElixir: el is not a valid element");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=K.createElement("div"),this.container.className="map-container";const b=window.matchMedia("(prefers-color-scheme: dark)");this.theme=f||(b.matches?he:de);const y=K.createElement("div");y.className="map-canvas",this.map=y,this.map.setAttribute("tabindex","0"),this.container.appendChild(this.map),this.mindElixirBox.appendChild(this.container),this.nodes=K.createElement("me-nodes"),this.nodes.className="main-node-container",this.lines=X("lines"),this.summarySvg=X("summary"),this.linkController=X("linkcontroller"),this.P2=K.createElement("div"),this.P3=K.createElement("div"),this.P2.className=this.P3.className="circle",this.P2.style.display=this.P3.style.display="none",this.line1=be(),this.line2=be(),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)}return L.prototype=yn,L.LEFT=S,L.RIGHT=j,L.SIDE=Y,L.THEME=de,L.DARK_THEME=he,L.version="3.2.2",L.E=E,L.new=t=>({nodeData:{id:I(),topic:t||"new topic",root:!0,children:[]},linkData:{}}),L}();