filecat 7.8.0 → 7.10.1

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.
Files changed (130) hide show
  1. package/LICENSE +201 -201
  2. package/README.md +182 -182
  3. package/build/dist/{4967.3fd3bd40a2b5a3b52428.js → 1060.198d91e2dfc174317c3a.js} +1 -1
  4. package/build/dist/1075.05eed88707339ca32044.js +1 -0
  5. package/build/dist/{1142.121454b1de53689b7367.js → 1142.bc43fae2e5e38d9359df.js} +1 -1
  6. package/build/dist/1384.edbad9c24d883a59724d.js +1 -0
  7. package/build/dist/1417.d390b18dd58ff5c28160.js +1 -0
  8. package/build/dist/1448.4db495e1389c0c8445b3.js +1 -0
  9. package/build/dist/{3324.22efcb1c431177b1cf5f.js → 1455.26a021eb94e5bdd5bec2.js} +1 -1
  10. package/build/dist/{1636.b6a17252dfd0d22f09a7.js → 1636.b80b1883358e132d3424.js} +1 -1
  11. package/build/dist/{1832.8ea5c3e8288df0b7fd5c.js → 1832.a01933ba5df99576ecc2.js} +1 -1
  12. package/build/dist/2300.c99b1dd4e752cdfd5e32.js +2 -0
  13. package/build/dist/{2300.9e1baa1c0368abe53d96.js.LICENSE.txt → 2300.c99b1dd4e752cdfd5e32.js.LICENSE.txt} +1 -1
  14. package/build/dist/239.f570f06d4b9c020f1013.js +1 -0
  15. package/build/dist/2479.294792ef5d360ad64abc.js +1 -0
  16. package/build/dist/2542.26cb302b60de23166227.js +1 -0
  17. package/build/dist/{259.81bb9e049e5ef587a96f.js → 259.3c0eb22e9b43ffb63c9c.js} +1 -1
  18. package/build/dist/2626.3bcfe1f26d9cb796a925.js +1 -0
  19. package/build/dist/2674.15ca3c6ac911cf6e6e2f.js +1 -0
  20. package/build/dist/3233.43bdd7c12ca829d56116.js +1 -0
  21. package/build/dist/3299.6ab0d94f02171cd762cc.js +1 -0
  22. package/build/dist/{6992.f6a07311a638794c24f7.js → 3471.ef3b5dcfe37963034187.js} +1 -1
  23. package/build/dist/{3528.56eeefab6fca5884e2a6.js → 3528.0f8f34028d92fa87c518.js} +1 -1
  24. package/build/dist/{3659.8a31495bb8f38c0ffa7c.js → 3659.dd03dc2ac52a3ff19105.js} +1 -1
  25. package/build/dist/4004.f0193c43fb891fdfb0e4.js +1 -0
  26. package/build/dist/{4560.8ef2e4b60cc86d019dd6.js → 4560.fd9f8cf2d6022b1d3a94.js} +1 -1
  27. package/build/dist/{4903.407cafe944a297471f5a.js → 4903.070aaa53a243baf05133.js} +1 -1
  28. package/build/dist/{4946.c95d4f426146e0180172.js → 4946.d578f6ba367a742d80bf.js} +2 -2
  29. package/build/dist/4986.f244efce9cf6be21f846.js +1 -0
  30. package/build/dist/5272.1f0dfac07ba202e7d323.js +1 -0
  31. package/build/dist/{5308.052f45c15785487b3766.js → 5308.d1e5ccb49396fc1b026d.js} +1 -1
  32. package/build/dist/{5516.645e4a900df9bdc1806c.js → 5516.88521f3a3c7101c46df3.js} +1 -1
  33. package/build/dist/5614.43bdd7c12ca829d56116.js +1 -0
  34. package/build/dist/{5139.adf9574d9b54a216e041.js → 5709.81f43e3c021fafdfe36f.js} +1 -1
  35. package/build/dist/{5744.e9f1efb88a617b05b709.js → 5744.0f8a0432b73b2eb0a7ff.js} +1 -1
  36. package/build/dist/{5877.ca081c4798194230243c.js → 5877.98d0475aaf4058b9a715.js} +1 -1
  37. package/build/dist/6010.5400c344149450c83284.js +1 -0
  38. package/build/dist/{6247.917e3fbef5dc5fbaf937.js → 6247.525b0b68872036ac2fa6.js} +1 -1
  39. package/build/dist/{7520.fbb0bc2a05cf94e15418.js → 6322.552511b5cb12cd0c821c.js} +1 -1
  40. package/build/dist/6492.17ecd8515fa512ce9306.js +1 -0
  41. package/build/dist/{676.a75318a8b598d8daadf0.js → 676.356039ef6f28f96b8c8b.js} +1 -1
  42. package/build/dist/{6805.bf0c964ab84f0fcc78be.js → 6805.373ac0e7d6555e4a6459.js} +1 -1
  43. package/build/dist/{6919.8cf13c01184b7148b28e.js → 6919.c7cc8617b658198d4924.js} +1 -1
  44. package/build/dist/{7038.4e4fc8e405c56d3080e2.js → 7038.166f915547d27e4dc5e4.js} +1 -1
  45. package/build/dist/{7759.0b68912ff9ef10869f59.js → 7759.7cd3fe8e5d37df25804c.js} +1 -1
  46. package/build/dist/7873.e3098bc6f510e5bea55f.js +1 -0
  47. package/build/dist/7923.d44556578af4d3d7cea3.js +2 -0
  48. package/build/dist/7943.acf25a5e98dd13290985.js +1 -0
  49. package/build/dist/8090.8977224618a14ae42159.js +2 -0
  50. package/build/dist/8302.ce97557b7cf7c8387942.js +1 -0
  51. package/build/dist/8319.6a6b9651c87a1bb4cbb9.js +1 -0
  52. package/build/dist/{8603.4142ce42c1635f493eca.js → 8603.f1cbcfd64cde885f9809.js} +1 -1
  53. package/build/dist/8649.d6055ad75975b803bbc1.js +1 -0
  54. package/build/dist/{8727.3628c746061aed7a4077.js → 8727.8658835acb7e0b6e5acc.js} +1 -1
  55. package/build/dist/{8765.a5633d054abb67142fc3.js → 8765.8758c290a6b132f2ce7f.js} +1 -1
  56. package/build/dist/8772.2c35012c25ac9eb5f74d.js +2 -0
  57. package/build/dist/{8772.e8f9731c1c061f1cdf56.js.LICENSE.txt → 8772.2c35012c25ac9eb5f74d.js.LICENSE.txt} +1 -1
  58. package/build/dist/8781.6bd14487d172e004e3d3.js +1 -0
  59. package/build/dist/9299.7358ccf05b1415ed7959.js +1 -0
  60. package/build/dist/9334.a25983aafdcbde63ae5e.js +1 -0
  61. package/build/dist/{9546.e7206c968e92371ae2b1.js → 9546.2cecad04cf676a6616cd.js} +1 -1
  62. package/build/dist/dark.css +839 -839
  63. package/build/dist/filerobot-image-editor.min.js +42445 -42445
  64. package/build/dist/google-dark.css +2032 -2032
  65. package/build/dist/google.css +1719 -1719
  66. package/build/dist/index.html +1 -1
  67. package/build/dist/main.ab3398f34c41e61310ae.js +2 -0
  68. package/build/dist/{main.98bb29605335d9b2219f.js.LICENSE.txt → main.ab3398f34c41e61310ae.js.LICENSE.txt} +1 -1
  69. package/build/dist/rle.js +17867 -17867
  70. package/build/main.js +1 -1
  71. package/build/plugin/core.type.d.ts +62 -0
  72. package/build/threads.work.filecat.js +1 -1
  73. package/env +26 -26
  74. package/package.json +211 -211
  75. package/shell/build.js +161 -161
  76. package/shell/config/.babelrc +14 -14
  77. package/shell/config/base.webpack.config.js +78 -78
  78. package/shell/config/common-bin.config.js +44 -44
  79. package/shell/config/env.js +10 -10
  80. package/shell/config/prebuild-file-path.js +17 -17
  81. package/shell/config/webpack.exe.config.js +36 -36
  82. package/shell/config/webpack.npm.config.js +44 -44
  83. package/shell/config/webpack.web.config.js +152 -152
  84. package/shell/dev.js +51 -51
  85. package/shell/docker-build.sh +2 -2
  86. package/shell/filecat +1 -1
  87. package/shell/filecat-watch +1 -1
  88. package/shell/install.js +48 -48
  89. package/shell/net-agent/git-clone.bat +23 -23
  90. package/shell/net-agent/git-pull.bat +17 -17
  91. package/shell/net-agent/git-push.bat +17 -17
  92. package/shell/pkg.ts +50 -50
  93. package/shell/postinstall-optional.js +29 -29
  94. package/shell/start/filecat-install.sh +22 -22
  95. package/shell/start/filecat-run.sh +2 -2
  96. package/shell/start/windows-install.js +178 -178
  97. package/shell/start/windows-uninstall.js +131 -131
  98. package/shell/util/file.js +46 -46
  99. package/build/dist/1075.493acb74297c1e753de2.js +0 -1
  100. package/build/dist/1384.0d0fc5faa899c9eddcbe.js +0 -1
  101. package/build/dist/1448.0710f04bed1c52e6a5db.js +0 -1
  102. package/build/dist/2300.9e1baa1c0368abe53d96.js +0 -2
  103. package/build/dist/2479.15722ac55b05c521f4f7.js +0 -1
  104. package/build/dist/2542.23fb13b1623c9f7c3fc1.js +0 -1
  105. package/build/dist/2626.05d1faa293e0a3318b9b.js +0 -1
  106. package/build/dist/2674.0c822a9c458f923a4eff.js +0 -1
  107. package/build/dist/2851.2195b5906b2c224c7bf7.js +0 -1
  108. package/build/dist/3140.794a212da633caf38b3a.js +0 -2
  109. package/build/dist/3233.fb6bffd5e097e4ac9423.js +0 -1
  110. package/build/dist/3299.d01f5a742d80f4e6e25b.js +0 -1
  111. package/build/dist/4004.de90f1192487a24a0a9a.js +0 -1
  112. package/build/dist/4437.4d5a0965043471411a00.js +0 -1
  113. package/build/dist/4986.78047106f3a0d2d71199.js +0 -1
  114. package/build/dist/5272.0b70ee8ec5f083fb9f5b.js +0 -1
  115. package/build/dist/5614.fb6bffd5e097e4ac9423.js +0 -1
  116. package/build/dist/6010.2da6f8c2fce5292557cb.js +0 -1
  117. package/build/dist/6492.3ee4060598de873d8e8f.js +0 -1
  118. package/build/dist/7756.2f851693ba030c42dde8.js +0 -1
  119. package/build/dist/7873.11d04b741d2b499d9cb9.js +0 -1
  120. package/build/dist/7923.861345fd55941e8089a1.js +0 -2
  121. package/build/dist/7943.54c702542d55f576a576.js +0 -1
  122. package/build/dist/7954.6ce241a8ed27cb26efc6.js +0 -1
  123. package/build/dist/8302.c1c381630b4ec76bf8ab.js +0 -1
  124. package/build/dist/8319.c15a3674ec7abc493595.js +0 -1
  125. package/build/dist/8772.e8f9731c1c061f1cdf56.js +0 -2
  126. package/build/dist/9299.ed4de6cd4f4bfa0a966a.js +0 -1
  127. package/build/dist/main.98bb29605335d9b2219f.js +0 -2
  128. /package/build/dist/{4946.c95d4f426146e0180172.js.LICENSE.txt → 4946.d578f6ba367a742d80bf.js.LICENSE.txt} +0 -0
  129. /package/build/dist/{7923.861345fd55941e8089a1.js.LICENSE.txt → 7923.d44556578af4d3d7cea3.js.LICENSE.txt} +0 -0
  130. /package/build/dist/{3140.794a212da633caf38b3a.js.LICENSE.txt → 8090.8977224618a14ae42159.js.LICENSE.txt} +0 -0
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[4437],{4926(t,e,i){i.d(e,{A:()=>a});var n=i(31601),s=i.n(n),o=i(76314),r=i.n(o)()(s());r.push([t.id,'/* ../simple-mind-map/node_modules/quill/dist/quill.snow.css */\n.ql-container {\n box-sizing: border-box;\n font-family:\n Helvetica,\n Arial,\n sans-serif;\n font-size: 13px;\n height: 100%;\n margin: 0;\n position: relative;\n}\n.ql-container.ql-disabled .ql-tooltip {\n visibility: hidden;\n}\n.ql-container:not(.ql-disabled) li[data-list=checked] > .ql-ui,\n.ql-container:not(.ql-disabled) li[data-list=unchecked] > .ql-ui {\n cursor: pointer;\n}\n.ql-clipboard {\n left: -100000px;\n height: 1px;\n overflow-y: hidden;\n position: absolute;\n top: 50%;\n}\n.ql-clipboard p {\n margin: 0;\n padding: 0;\n}\n.ql-editor {\n box-sizing: border-box;\n counter-reset: list-0 list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\n line-height: 1.42;\n height: 100%;\n outline: none;\n overflow-y: auto;\n padding: 12px 15px;\n tab-size: 4;\n -moz-tab-size: 4;\n text-align: left;\n white-space: pre-wrap;\n word-wrap: break-word;\n}\n.ql-editor > * {\n cursor: text;\n}\n.ql-editor p,\n.ql-editor ol,\n.ql-editor pre,\n.ql-editor blockquote,\n.ql-editor h1,\n.ql-editor h2,\n.ql-editor h3,\n.ql-editor h4,\n.ql-editor h5,\n.ql-editor h6 {\n margin: 0;\n padding: 0;\n}\n@supports (counter-set:none) {\n .ql-editor p,\n .ql-editor h1,\n .ql-editor h2,\n .ql-editor h3,\n .ql-editor h4,\n .ql-editor h5,\n .ql-editor h6 {\n counter-set: list-0 list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\n }\n}\n@supports not (counter-set:none) {\n .ql-editor p,\n .ql-editor h1,\n .ql-editor h2,\n .ql-editor h3,\n .ql-editor h4,\n .ql-editor h5,\n .ql-editor h6 {\n counter-reset: list-0 list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\n }\n}\n.ql-editor table {\n border-collapse: collapse;\n}\n.ql-editor td {\n border: 1px solid #000;\n padding: 2px 5px;\n}\n.ql-editor ol {\n padding-left: 1.5em;\n}\n.ql-editor li {\n list-style-type: none;\n padding-left: 1.5em;\n position: relative;\n}\n.ql-editor li > .ql-ui:before {\n display: inline-block;\n margin-left: -1.5em;\n margin-right: .3em;\n text-align: right;\n white-space: nowrap;\n width: 1.2em;\n}\n.ql-editor li[data-list=checked] > .ql-ui,\n.ql-editor li[data-list=unchecked] > .ql-ui {\n color: #777;\n}\n.ql-editor li[data-list=bullet] > .ql-ui:before {\n content: "\\2022";\n}\n.ql-editor li[data-list=checked] > .ql-ui:before {\n content: "\\2611";\n}\n.ql-editor li[data-list=unchecked] > .ql-ui:before {\n content: "\\2610";\n}\n@supports (counter-set:none) {\n .ql-editor li[data-list] {\n counter-set: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\n }\n}\n@supports not (counter-set:none) {\n .ql-editor li[data-list] {\n counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\n }\n}\n.ql-editor li[data-list=ordered] {\n counter-increment: list-0;\n}\n.ql-editor li[data-list=ordered] > .ql-ui:before {\n content: counter(list-0, decimal) ". ";\n}\n.ql-editor li[data-list=ordered].ql-indent-1 {\n counter-increment: list-1;\n}\n.ql-editor li[data-list=ordered].ql-indent-1 > .ql-ui:before {\n content: counter(list-1, lower-alpha) ". ";\n}\n@supports (counter-set:none) {\n .ql-editor li[data-list].ql-indent-1 {\n counter-set: list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\n }\n}\n@supports not (counter-set:none) {\n .ql-editor li[data-list].ql-indent-1 {\n counter-reset: list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\n }\n}\n.ql-editor li[data-list=ordered].ql-indent-2 {\n counter-increment: list-2;\n}\n.ql-editor li[data-list=ordered].ql-indent-2 > .ql-ui:before {\n content: counter(list-2, lower-roman) ". ";\n}\n@supports (counter-set:none) {\n .ql-editor li[data-list].ql-indent-2 {\n counter-set: list-3 list-4 list-5 list-6 list-7 list-8 list-9;\n }\n}\n@supports not (counter-set:none) {\n .ql-editor li[data-list].ql-indent-2 {\n counter-reset: list-3 list-4 list-5 list-6 list-7 list-8 list-9;\n }\n}\n.ql-editor li[data-list=ordered].ql-indent-3 {\n counter-increment: list-3;\n}\n.ql-editor li[data-list=ordered].ql-indent-3 > .ql-ui:before {\n content: counter(list-3, decimal) ". ";\n}\n@supports (counter-set:none) {\n .ql-editor li[data-list].ql-indent-3 {\n counter-set: list-4 list-5 list-6 list-7 list-8 list-9;\n }\n}\n@supports not (counter-set:none) {\n .ql-editor li[data-list].ql-indent-3 {\n counter-reset: list-4 list-5 list-6 list-7 list-8 list-9;\n }\n}\n.ql-editor li[data-list=ordered].ql-indent-4 {\n counter-increment: list-4;\n}\n.ql-editor li[data-list=ordered].ql-indent-4 > .ql-ui:before {\n content: counter(list-4, lower-alpha) ". ";\n}\n@supports (counter-set:none) {\n .ql-editor li[data-list].ql-indent-4 {\n counter-set: list-5 list-6 list-7 list-8 list-9;\n }\n}\n@supports not (counter-set:none) {\n .ql-editor li[data-list].ql-indent-4 {\n counter-reset: list-5 list-6 list-7 list-8 list-9;\n }\n}\n.ql-editor li[data-list=ordered].ql-indent-5 {\n counter-increment: list-5;\n}\n.ql-editor li[data-list=ordered].ql-indent-5 > .ql-ui:before {\n content: counter(list-5, lower-roman) ". ";\n}\n@supports (counter-set:none) {\n .ql-editor li[data-list].ql-indent-5 {\n counter-set: list-6 list-7 list-8 list-9;\n }\n}\n@supports not (counter-set:none) {\n .ql-editor li[data-list].ql-indent-5 {\n counter-reset: list-6 list-7 list-8 list-9;\n }\n}\n.ql-editor li[data-list=ordered].ql-indent-6 {\n counter-increment: list-6;\n}\n.ql-editor li[data-list=ordered].ql-indent-6 > .ql-ui:before {\n content: counter(list-6, decimal) ". ";\n}\n@supports (counter-set:none) {\n .ql-editor li[data-list].ql-indent-6 {\n counter-set: list-7 list-8 list-9;\n }\n}\n@supports not (counter-set:none) {\n .ql-editor li[data-list].ql-indent-6 {\n counter-reset: list-7 list-8 list-9;\n }\n}\n.ql-editor li[data-list=ordered].ql-indent-7 {\n counter-increment: list-7;\n}\n.ql-editor li[data-list=ordered].ql-indent-7 > .ql-ui:before {\n content: counter(list-7, lower-alpha) ". ";\n}\n@supports (counter-set:none) {\n .ql-editor li[data-list].ql-indent-7 {\n counter-set: list-8 list-9;\n }\n}\n@supports not (counter-set:none) {\n .ql-editor li[data-list].ql-indent-7 {\n counter-reset: list-8 list-9;\n }\n}\n.ql-editor li[data-list=ordered].ql-indent-8 {\n counter-increment: list-8;\n}\n.ql-editor li[data-list=ordered].ql-indent-8 > .ql-ui:before {\n content: counter(list-8, lower-roman) ". ";\n}\n@supports (counter-set:none) {\n .ql-editor li[data-list].ql-indent-8 {\n counter-set: list-9;\n }\n}\n@supports not (counter-set:none) {\n .ql-editor li[data-list].ql-indent-8 {\n counter-reset: list-9;\n }\n}\n.ql-editor li[data-list=ordered].ql-indent-9 {\n counter-increment: list-9;\n}\n.ql-editor li[data-list=ordered].ql-indent-9 > .ql-ui:before {\n content: counter(list-9, decimal) ". ";\n}\n.ql-editor .ql-indent-1:not(.ql-direction-rtl) {\n padding-left: 3em;\n}\n.ql-editor li.ql-indent-1:not(.ql-direction-rtl) {\n padding-left: 4.5em;\n}\n.ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right {\n padding-right: 3em;\n}\n.ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right {\n padding-right: 4.5em;\n}\n.ql-editor .ql-indent-2:not(.ql-direction-rtl) {\n padding-left: 6em;\n}\n.ql-editor li.ql-indent-2:not(.ql-direction-rtl) {\n padding-left: 7.5em;\n}\n.ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right {\n padding-right: 6em;\n}\n.ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right {\n padding-right: 7.5em;\n}\n.ql-editor .ql-indent-3:not(.ql-direction-rtl) {\n padding-left: 9em;\n}\n.ql-editor li.ql-indent-3:not(.ql-direction-rtl) {\n padding-left: 10.5em;\n}\n.ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right {\n padding-right: 9em;\n}\n.ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right {\n padding-right: 10.5em;\n}\n.ql-editor .ql-indent-4:not(.ql-direction-rtl) {\n padding-left: 12em;\n}\n.ql-editor li.ql-indent-4:not(.ql-direction-rtl) {\n padding-left: 13.5em;\n}\n.ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right {\n padding-right: 12em;\n}\n.ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right {\n padding-right: 13.5em;\n}\n.ql-editor .ql-indent-5:not(.ql-direction-rtl) {\n padding-left: 15em;\n}\n.ql-editor li.ql-indent-5:not(.ql-direction-rtl) {\n padding-left: 16.5em;\n}\n.ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right {\n padding-right: 15em;\n}\n.ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right {\n padding-right: 16.5em;\n}\n.ql-editor .ql-indent-6:not(.ql-direction-rtl) {\n padding-left: 18em;\n}\n.ql-editor li.ql-indent-6:not(.ql-direction-rtl) {\n padding-left: 19.5em;\n}\n.ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right {\n padding-right: 18em;\n}\n.ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right {\n padding-right: 19.5em;\n}\n.ql-editor .ql-indent-7:not(.ql-direction-rtl) {\n padding-left: 21em;\n}\n.ql-editor li.ql-indent-7:not(.ql-direction-rtl) {\n padding-left: 22.5em;\n}\n.ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right {\n padding-right: 21em;\n}\n.ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right {\n padding-right: 22.5em;\n}\n.ql-editor .ql-indent-8:not(.ql-direction-rtl) {\n padding-left: 24em;\n}\n.ql-editor li.ql-indent-8:not(.ql-direction-rtl) {\n padding-left: 25.5em;\n}\n.ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right {\n padding-right: 24em;\n}\n.ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right {\n padding-right: 25.5em;\n}\n.ql-editor .ql-indent-9:not(.ql-direction-rtl) {\n padding-left: 27em;\n}\n.ql-editor li.ql-indent-9:not(.ql-direction-rtl) {\n padding-left: 28.5em;\n}\n.ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right {\n padding-right: 27em;\n}\n.ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right {\n padding-right: 28.5em;\n}\n.ql-editor li.ql-direction-rtl {\n padding-right: 1.5em;\n}\n.ql-editor li.ql-direction-rtl > .ql-ui:before {\n margin-left: .3em;\n margin-right: -1.5em;\n text-align: left;\n}\n.ql-editor table {\n table-layout: fixed;\n width: 100%;\n}\n.ql-editor table td {\n outline: none;\n}\n.ql-editor .ql-code-block-container {\n font-family: monospace;\n}\n.ql-editor .ql-video {\n display: block;\n max-width: 100%;\n}\n.ql-editor .ql-video.ql-align-center {\n margin: 0 auto;\n}\n.ql-editor .ql-video.ql-align-right {\n margin: 0 0 0 auto;\n}\n.ql-editor .ql-bg-black {\n background-color: #000;\n}\n.ql-editor .ql-bg-red {\n background-color: #e60000;\n}\n.ql-editor .ql-bg-orange {\n background-color: #f90;\n}\n.ql-editor .ql-bg-yellow {\n background-color: #ff0;\n}\n.ql-editor .ql-bg-green {\n background-color: #008a00;\n}\n.ql-editor .ql-bg-blue {\n background-color: #06c;\n}\n.ql-editor .ql-bg-purple {\n background-color: #93f;\n}\n.ql-editor .ql-color-white {\n color: #fff;\n}\n.ql-editor .ql-color-red {\n color: #e60000;\n}\n.ql-editor .ql-color-orange {\n color: #f90;\n}\n.ql-editor .ql-color-yellow {\n color: #ff0;\n}\n.ql-editor .ql-color-green {\n color: #008a00;\n}\n.ql-editor .ql-color-blue {\n color: #06c;\n}\n.ql-editor .ql-color-purple {\n color: #93f;\n}\n.ql-editor .ql-font-serif {\n font-family:\n Georgia,\n Times New Roman,\n serif;\n}\n.ql-editor .ql-font-monospace {\n font-family:\n Monaco,\n Courier New,\n monospace;\n}\n.ql-editor .ql-size-small {\n font-size: .75em;\n}\n.ql-editor .ql-size-large {\n font-size: 1.5em;\n}\n.ql-editor .ql-size-huge {\n font-size: 2.5em;\n}\n.ql-editor .ql-direction-rtl {\n direction: rtl;\n text-align: inherit;\n}\n.ql-editor .ql-align-center {\n text-align: center;\n}\n.ql-editor .ql-align-justify {\n text-align: justify;\n}\n.ql-editor .ql-align-right {\n text-align: right;\n}\n.ql-editor .ql-ui {\n position: absolute;\n}\n.ql-editor.ql-blank::before {\n color: rgba(0, 0, 0, 0.6);\n content: attr(data-placeholder);\n font-style: italic;\n left: 15px;\n pointer-events: none;\n position: absolute;\n right: 15px;\n}\n.ql-snow.ql-toolbar:after,\n.ql-snow .ql-toolbar:after {\n clear: both;\n content: "";\n display: table;\n}\n.ql-snow.ql-toolbar button,\n.ql-snow .ql-toolbar button {\n background: none;\n border: none;\n cursor: pointer;\n display: inline-block;\n float: left;\n height: 24px;\n padding: 3px 5px;\n width: 28px;\n}\n.ql-snow.ql-toolbar button svg,\n.ql-snow .ql-toolbar button svg {\n float: left;\n height: 100%;\n}\n.ql-snow.ql-toolbar button:active:hover,\n.ql-snow .ql-toolbar button:active:hover {\n outline: none;\n}\n.ql-snow.ql-toolbar input.ql-image[type=file],\n.ql-snow .ql-toolbar input.ql-image[type=file] {\n display: none;\n}\n.ql-snow.ql-toolbar button:hover,\n.ql-snow .ql-toolbar button:hover,\n.ql-snow.ql-toolbar button:focus,\n.ql-snow .ql-toolbar button:focus,\n.ql-snow.ql-toolbar button.ql-active,\n.ql-snow .ql-toolbar button.ql-active,\n.ql-snow.ql-toolbar .ql-picker-label:hover,\n.ql-snow .ql-toolbar .ql-picker-label:hover,\n.ql-snow.ql-toolbar .ql-picker-label.ql-active,\n.ql-snow .ql-toolbar .ql-picker-label.ql-active,\n.ql-snow.ql-toolbar .ql-picker-item:hover,\n.ql-snow .ql-toolbar .ql-picker-item:hover,\n.ql-snow.ql-toolbar .ql-picker-item.ql-selected,\n.ql-snow .ql-toolbar .ql-picker-item.ql-selected {\n color: #06c;\n}\n.ql-snow.ql-toolbar button:hover .ql-fill,\n.ql-snow .ql-toolbar button:hover .ql-fill,\n.ql-snow.ql-toolbar button:focus .ql-fill,\n.ql-snow .ql-toolbar button:focus .ql-fill,\n.ql-snow.ql-toolbar button.ql-active .ql-fill,\n.ql-snow .ql-toolbar button.ql-active .ql-fill,\n.ql-snow.ql-toolbar .ql-picker-label:hover .ql-fill,\n.ql-snow .ql-toolbar .ql-picker-label:hover .ql-fill,\n.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-fill,\n.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-fill,\n.ql-snow.ql-toolbar .ql-picker-item:hover .ql-fill,\n.ql-snow .ql-toolbar .ql-picker-item:hover .ql-fill,\n.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-fill,\n.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-fill,\n.ql-snow.ql-toolbar button:hover .ql-stroke.ql-fill,\n.ql-snow .ql-toolbar button:hover .ql-stroke.ql-fill,\n.ql-snow.ql-toolbar button:focus .ql-stroke.ql-fill,\n.ql-snow .ql-toolbar button:focus .ql-stroke.ql-fill,\n.ql-snow.ql-toolbar button.ql-active .ql-stroke.ql-fill,\n.ql-snow .ql-toolbar button.ql-active .ql-stroke.ql-fill,\n.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,\n.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,\n.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,\n.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,\n.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,\n.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,\n.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill,\n.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill {\n fill: #06c;\n}\n.ql-snow.ql-toolbar button:hover .ql-stroke,\n.ql-snow .ql-toolbar button:hover .ql-stroke,\n.ql-snow.ql-toolbar button:focus .ql-stroke,\n.ql-snow .ql-toolbar button:focus .ql-stroke,\n.ql-snow.ql-toolbar button.ql-active .ql-stroke,\n.ql-snow .ql-toolbar button.ql-active .ql-stroke,\n.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke,\n.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke,\n.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke,\n.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke,\n.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke,\n.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke,\n.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke,\n.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke,\n.ql-snow.ql-toolbar button:hover .ql-stroke-miter,\n.ql-snow .ql-toolbar button:hover .ql-stroke-miter,\n.ql-snow.ql-toolbar button:focus .ql-stroke-miter,\n.ql-snow .ql-toolbar button:focus .ql-stroke-miter,\n.ql-snow.ql-toolbar button.ql-active .ql-stroke-miter,\n.ql-snow .ql-toolbar button.ql-active .ql-stroke-miter,\n.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke-miter,\n.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke-miter,\n.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,\n.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,\n.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke-miter,\n.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke-miter,\n.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter,\n.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter {\n stroke: #06c;\n}\n@media (pointer:coarse) {\n .ql-snow.ql-toolbar button:hover:not(.ql-active),\n .ql-snow .ql-toolbar button:hover:not(.ql-active) {\n color: #444;\n }\n .ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-fill,\n .ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-fill,\n .ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill,\n .ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill {\n fill: #444;\n }\n .ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke,\n .ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke,\n .ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter,\n .ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter {\n stroke: #444;\n }\n}\n.ql-snow {\n box-sizing: border-box;\n}\n.ql-snow * {\n box-sizing: border-box;\n}\n.ql-snow .ql-hidden {\n display: none;\n}\n.ql-snow .ql-out-bottom,\n.ql-snow .ql-out-top {\n visibility: hidden;\n}\n.ql-snow .ql-tooltip {\n position: absolute;\n transform: translateY(10px);\n}\n.ql-snow .ql-tooltip a {\n cursor: pointer;\n text-decoration: none;\n}\n.ql-snow .ql-tooltip.ql-flip {\n transform: translateY(-10px);\n}\n.ql-snow .ql-formats {\n display: inline-block;\n vertical-align: middle;\n}\n.ql-snow .ql-formats:after {\n clear: both;\n content: "";\n display: table;\n}\n.ql-snow .ql-stroke {\n fill: none;\n stroke: #444;\n stroke-linecap: round;\n stroke-linejoin: round;\n stroke-width: 2;\n}\n.ql-snow .ql-stroke-miter {\n fill: none;\n stroke: #444;\n stroke-miterlimit: 10;\n stroke-width: 2;\n}\n.ql-snow .ql-fill,\n.ql-snow .ql-stroke.ql-fill {\n fill: #444;\n}\n.ql-snow .ql-empty {\n fill: none;\n}\n.ql-snow .ql-even {\n fill-rule: evenodd;\n}\n.ql-snow .ql-thin,\n.ql-snow .ql-stroke.ql-thin {\n stroke-width: 1;\n}\n.ql-snow .ql-transparent {\n opacity: .4;\n}\n.ql-snow .ql-direction svg:last-child {\n display: none;\n}\n.ql-snow .ql-direction.ql-active svg:last-child {\n display: inline;\n}\n.ql-snow .ql-direction.ql-active svg:first-child {\n display: none;\n}\n.ql-snow .ql-editor h1 {\n font-size: 2em;\n}\n.ql-snow .ql-editor h2 {\n font-size: 1.5em;\n}\n.ql-snow .ql-editor h3 {\n font-size: 1.17em;\n}\n.ql-snow .ql-editor h4 {\n font-size: 1em;\n}\n.ql-snow .ql-editor h5 {\n font-size: .83em;\n}\n.ql-snow .ql-editor h6 {\n font-size: .67em;\n}\n.ql-snow .ql-editor a {\n text-decoration: underline;\n}\n.ql-snow .ql-editor blockquote {\n border-left: 4px solid #ccc;\n margin-bottom: 5px;\n margin-top: 5px;\n padding-left: 16px;\n}\n.ql-snow .ql-editor code,\n.ql-snow .ql-editor .ql-code-block-container {\n background-color: #f0f0f0;\n border-radius: 3px;\n}\n.ql-snow .ql-editor .ql-code-block-container {\n margin-bottom: 5px;\n margin-top: 5px;\n padding: 5px 10px;\n}\n.ql-snow .ql-editor code {\n font-size: 85%;\n padding: 2px 4px;\n}\n.ql-snow .ql-editor .ql-code-block-container {\n background-color: #23241f;\n color: #f8f8f2;\n overflow: visible;\n}\n.ql-snow .ql-editor img {\n max-width: 100%;\n}\n.ql-snow .ql-picker {\n color: #444;\n display: inline-block;\n float: left;\n font-size: 14px;\n font-weight: 500;\n height: 24px;\n position: relative;\n vertical-align: middle;\n}\n.ql-snow .ql-picker-label {\n cursor: pointer;\n display: inline-block;\n height: 100%;\n padding-left: 8px;\n padding-right: 2px;\n position: relative;\n width: 100%;\n}\n.ql-snow .ql-picker-label::before {\n display: inline-block;\n line-height: 22px;\n}\n.ql-snow .ql-picker-options {\n background-color: #fff;\n display: none;\n min-width: 100%;\n padding: 4px 8px;\n position: absolute;\n white-space: nowrap;\n}\n.ql-snow .ql-picker-options .ql-picker-item {\n cursor: pointer;\n display: block;\n padding-bottom: 5px;\n padding-top: 5px;\n}\n.ql-snow .ql-picker.ql-expanded .ql-picker-label {\n color: #ccc;\n z-index: 2;\n}\n.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-fill {\n fill: #ccc;\n}\n.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-stroke {\n stroke: #ccc;\n}\n.ql-snow .ql-picker.ql-expanded .ql-picker-options {\n display: block;\n margin-top: -1px;\n top: 100%;\n z-index: 1;\n}\n.ql-snow .ql-color-picker,\n.ql-snow .ql-icon-picker {\n width: 28px;\n}\n.ql-snow .ql-color-picker .ql-picker-label,\n.ql-snow .ql-icon-picker .ql-picker-label {\n padding: 2px 4px;\n}\n.ql-snow .ql-color-picker .ql-picker-label svg,\n.ql-snow .ql-icon-picker .ql-picker-label svg {\n right: 4px;\n}\n.ql-snow .ql-icon-picker .ql-picker-options {\n padding: 4px 0;\n}\n.ql-snow .ql-icon-picker .ql-picker-item {\n height: 24px;\n width: 24px;\n padding: 2px 4px;\n}\n.ql-snow .ql-color-picker .ql-picker-options {\n padding: 3px 5px;\n width: 152px;\n}\n.ql-snow .ql-color-picker .ql-picker-item {\n border: 1px solid transparent;\n float: left;\n height: 16px;\n margin: 2px;\n padding: 0;\n width: 16px;\n}\n.ql-snow .ql-picker:not(.ql-color-picker):not(.ql-icon-picker) svg {\n position: absolute;\n margin-top: -9px;\n right: 0;\n top: 50%;\n width: 18px;\n}\n.ql-snow .ql-picker.ql-header .ql-picker-label[data-label]:not([data-label=""])::before,\n.ql-snow .ql-picker.ql-font .ql-picker-label[data-label]:not([data-label=""])::before,\n.ql-snow .ql-picker.ql-size .ql-picker-label[data-label]:not([data-label=""])::before,\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-label]:not([data-label=""])::before,\n.ql-snow .ql-picker.ql-font .ql-picker-item[data-label]:not([data-label=""])::before,\n.ql-snow .ql-picker.ql-size .ql-picker-item[data-label]:not([data-label=""])::before {\n content: attr(data-label);\n}\n.ql-snow .ql-picker.ql-header {\n width: 98px;\n}\n.ql-snow .ql-picker.ql-header .ql-picker-label::before,\n.ql-snow .ql-picker.ql-header .ql-picker-item::before {\n content: "Normal";\n}\n.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="1"]::before,\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before {\n content: "Heading 1";\n}\n.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]::before,\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before {\n content: "Heading 2";\n}\n.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]::before,\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before {\n content: "Heading 3";\n}\n.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="4"]::before,\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before {\n content: "Heading 4";\n}\n.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="5"]::before,\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]::before {\n content: "Heading 5";\n}\n.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="6"]::before,\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]::before {\n content: "Heading 6";\n}\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before {\n font-size: 2em;\n}\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before {\n font-size: 1.5em;\n}\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before {\n font-size: 1.17em;\n}\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before {\n font-size: 1em;\n}\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]::before {\n font-size: .83em;\n}\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]::before {\n font-size: .67em;\n}\n.ql-snow .ql-picker.ql-font {\n width: 108px;\n}\n.ql-snow .ql-picker.ql-font .ql-picker-label::before,\n.ql-snow .ql-picker.ql-font .ql-picker-item::before {\n content: "Sans Serif";\n}\n.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=serif]::before,\n.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]::before {\n content: "Serif";\n}\n.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=monospace]::before,\n.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]::before {\n content: "Monospace";\n}\n.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]::before {\n font-family:\n Georgia,\n Times New Roman,\n serif;\n}\n.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]::before {\n font-family:\n Monaco,\n Courier New,\n monospace;\n}\n.ql-snow .ql-picker.ql-size {\n width: 98px;\n}\n.ql-snow .ql-picker.ql-size .ql-picker-label::before,\n.ql-snow .ql-picker.ql-size .ql-picker-item::before {\n content: "Normal";\n}\n.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=small]::before,\n.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]::before {\n content: "Small";\n}\n.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=large]::before,\n.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]::before {\n content: "Large";\n}\n.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=huge]::before,\n.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]::before {\n content: "Huge";\n}\n.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]::before {\n font-size: 10px;\n}\n.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]::before {\n font-size: 18px;\n}\n.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]::before {\n font-size: 32px;\n}\n.ql-snow .ql-color-picker.ql-background .ql-picker-item {\n background-color: #fff;\n}\n.ql-snow .ql-color-picker.ql-color .ql-picker-item {\n background-color: #000;\n}\n.ql-code-block-container {\n position: relative;\n}\n.ql-code-block-container .ql-ui {\n right: 5px;\n top: 5px;\n}\n.ql-toolbar.ql-snow {\n border: 1px solid #ccc;\n box-sizing: border-box;\n font-family:\n "Helvetica Neue",\n "Helvetica",\n "Arial",\n sans-serif;\n padding: 8px;\n}\n.ql-toolbar.ql-snow .ql-formats {\n margin-right: 15px;\n}\n.ql-toolbar.ql-snow .ql-picker-label {\n border: 1px solid transparent;\n}\n.ql-toolbar.ql-snow .ql-picker-options {\n border: 1px solid transparent;\n box-shadow: rgba(0, 0, 0, 0.2) 0 2px 8px;\n}\n.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-label {\n border-color: #ccc;\n}\n.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-options {\n border-color: #ccc;\n}\n.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item.ql-selected,\n.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item:hover {\n border-color: #000;\n}\n.ql-toolbar.ql-snow + .ql-container.ql-snow {\n border-top: 0;\n}\n.ql-snow .ql-tooltip {\n background-color: #fff;\n border: 1px solid #ccc;\n box-shadow: 0 0 5px #ddd;\n color: #444;\n padding: 5px 12px;\n white-space: nowrap;\n}\n.ql-snow .ql-tooltip::before {\n content: "Visit URL:";\n line-height: 26px;\n margin-right: 8px;\n}\n.ql-snow .ql-tooltip input[type=text] {\n display: none;\n border: 1px solid #ccc;\n font-size: 13px;\n height: 26px;\n margin: 0;\n padding: 3px 5px;\n width: 170px;\n}\n.ql-snow .ql-tooltip a.ql-preview {\n display: inline-block;\n max-width: 200px;\n overflow-x: hidden;\n text-overflow: ellipsis;\n vertical-align: top;\n}\n.ql-snow .ql-tooltip a.ql-action::after {\n border-right: 1px solid #ccc;\n content: "Edit";\n margin-left: 16px;\n padding-right: 8px;\n}\n.ql-snow .ql-tooltip a.ql-remove::before {\n content: "Remove";\n margin-left: 8px;\n}\n.ql-snow .ql-tooltip a {\n line-height: 26px;\n}\n.ql-snow .ql-tooltip.ql-editing a.ql-preview,\n.ql-snow .ql-tooltip.ql-editing a.ql-remove {\n display: none;\n}\n.ql-snow .ql-tooltip.ql-editing input[type=text] {\n display: inline-block;\n}\n.ql-snow .ql-tooltip.ql-editing a.ql-action::after {\n border-right: 0;\n content: "Save";\n padding-right: 0;\n}\n.ql-snow .ql-tooltip[data-mode=link]::before {\n content: "Enter link:";\n}\n.ql-snow .ql-tooltip[data-mode=formula]::before {\n content: "Enter formula:";\n}\n.ql-snow .ql-tooltip[data-mode=video]::before {\n content: "Enter video:";\n}\n.ql-snow a {\n color: #06c;\n}\n.ql-container.ql-snow {\n border: 1px solid #ccc;\n}\n/*! Bundled license information:\n\nquill/dist/quill.snow.css:\n (*!\n * Quill Editor v2.0.3\n * https://quilljs.com\n * Copyright (c) 2017-2024, Slab\n * Copyright (c) 2014, Jason Chen\n * Copyright (c) 2013, salesforce.com\n *)\n*/\n',""]);const a=r},14744(t){var e=function(t){return function(t){return!!t&&"object"==typeof t}(t)&&!function(t){var e=Object.prototype.toString.call(t);return"[object RegExp]"===e||"[object Date]"===e||function(t){return t.$$typeof===i}(t)}(t)};var i="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(t,i){var n;return i&&!0===i.clone&&e(t)?o((n=t,Array.isArray(n)?[]:{}),t,i):t}function s(t,i,s){var r=t.slice();return i.forEach(function(i,a){void 0===r[a]?r[a]=n(i,s):e(i)?r[a]=o(t[a],i,s):-1===t.indexOf(i)&&r.push(n(i,s))}),r}function o(t,i,r){var a=Array.isArray(i);return a===Array.isArray(t)?a?((r||{arrayMerge:s}).arrayMerge||s)(t,i,r):function(t,i,s){var r={};return e(t)&&Object.keys(t).forEach(function(e){r[e]=n(t[e],s)}),Object.keys(i).forEach(function(a){e(i[a])&&t[a]?r[a]=o(t[a],i[a],s):r[a]=n(i[a],s)}),r}(t,i,r):n(i,r)}o.all=function(t,e){if(!Array.isArray(t)||t.length<2)throw new Error("first argument should be an array with at least two elements");return t.reduce(function(t,i){return o(t,i,e)})};var r=o;t.exports=r},30228(t){var e=Object.prototype.hasOwnProperty,i="~";function n(){}function s(t,e,i){this.fn=t,this.context=e,this.once=i||!1}function o(t,e,n,o,r){if("function"!=typeof n)throw new TypeError("The listener must be a function");var a=new s(n,o||t,r),h=i?i+e:e;return t._events[h]?t._events[h].fn?t._events[h]=[t._events[h],a]:t._events[h].push(a):(t._events[h]=a,t._eventsCount++),t}function r(t,e){0===--t._eventsCount?t._events=new n:delete t._events[e]}function a(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(i=!1)),a.prototype.eventNames=function(){var t,n,s=[];if(0===this._eventsCount)return s;for(n in t=this._events)e.call(t,n)&&s.push(i?n.slice(1):n);return Object.getOwnPropertySymbols?s.concat(Object.getOwnPropertySymbols(t)):s},a.prototype.listeners=function(t){var e=i?i+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var s=0,o=n.length,r=new Array(o);s<o;s++)r[s]=n[s].fn;return r},a.prototype.listenerCount=function(t){var e=i?i+t:t,n=this._events[e];return n?n.fn?1:n.length:0},a.prototype.emit=function(t,e,n,s,o,r){var a=i?i+t:t;if(!this._events[a])return!1;var h,l,d=this._events[a],c=arguments.length;if(d.fn){switch(d.once&&this.removeListener(t,d.fn,void 0,!0),c){case 1:return d.fn.call(d.context),!0;case 2:return d.fn.call(d.context,e),!0;case 3:return d.fn.call(d.context,e,n),!0;case 4:return d.fn.call(d.context,e,n,s),!0;case 5:return d.fn.call(d.context,e,n,s,o),!0;case 6:return d.fn.call(d.context,e,n,s,o,r),!0}for(l=1,h=new Array(c-1);l<c;l++)h[l-1]=arguments[l];d.fn.apply(d.context,h)}else{var u,p=d.length;for(l=0;l<p;l++)switch(d[l].once&&this.removeListener(t,d[l].fn,void 0,!0),c){case 1:d[l].fn.call(d[l].context);break;case 2:d[l].fn.call(d[l].context,e);break;case 3:d[l].fn.call(d[l].context,e,n);break;case 4:d[l].fn.call(d[l].context,e,n,s);break;default:if(!h)for(u=1,h=new Array(c-1);u<c;u++)h[u-1]=arguments[u];d[l].fn.apply(d[l].context,h)}}return!0},a.prototype.on=function(t,e,i){return o(this,t,e,i,!1)},a.prototype.once=function(t,e,i){return o(this,t,e,i,!0)},a.prototype.removeListener=function(t,e,n,s){var o=i?i+t:t;if(!this._events[o])return this;if(!e)return r(this,o),this;var a=this._events[o];if(a.fn)a.fn!==e||s&&!a.once||n&&a.context!==n||r(this,o);else{for(var h=0,l=[],d=a.length;h<d;h++)(a[h].fn!==e||s&&!a[h].once||n&&a[h].context!==n)&&l.push(a[h]);l.length?this._events[o]=1===l.length?l[0]:l:r(this,o)}return this},a.prototype.removeAllListeners=function(t){var e;return t?(e=i?i+t:t,this._events[e]&&r(this,e)):(this._events=new n,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=i,a.EventEmitter=a,t.exports=a},21417(t,e,i){i.d(e,{A:()=>cs});const n={CHANGE_THEME:"changeTheme",CHANGE_LAYOUT:"changeLayout",MODE:{READONLY:"readonly",EDIT:"edit"},LAYOUT:{LOGICAL_STRUCTURE:"logicalStructure",LOGICAL_STRUCTURE_LEFT:"logicalStructureLeft",MIND_MAP:"mindMap",ORGANIZATION_STRUCTURE:"organizationStructure",CATALOG_ORGANIZATION:"catalogOrganization",TIMELINE:"timeline",TIMELINE2:"timeline2",FISHBONE:"fishbone",FISHBONE2:"fishbone2",RIGHT_FISHBONE:"rightFishbone",RIGHT_FISHBONE2:"rightFishbone2",VERTICAL_TIMELINE:"verticalTimeline",VERTICAL_TIMELINE2:"verticalTimeline2",VERTICAL_TIMELINE3:"verticalTimeline3"},DIR:{UP:"up",LEFT:"left",DOWN:"down",RIGHT:"right"},KEY_DIR:{LEFT:"Left",UP:"Up",RIGHT:"Right",DOWN:"Down"},SHAPE:{RECTANGLE:"rectangle",DIAMOND:"diamond",PARALLELOGRAM:"parallelogram",ROUNDED_RECTANGLE:"roundedRectangle",OCTAGONAL_RECTANGLE:"octagonalRectangle",OUTER_TRIANGULAR_RECTANGLE:"outerTriangularRectangle",INNER_TRIANGULAR_RECTANGLE:"innerTriangularRectangle",ELLIPSE:"ellipse",CIRCLE:"circle"},MOUSE_WHEEL_ACTION:{ZOOM:"zoom",MOVE:"move"},INIT_ROOT_NODE_POSITION:{LEFT:"left",TOP:"top",RIGHT:"right",BOTTOM:"bottom",CENTER:"center"},LAYOUT_GROW_DIR:{LEFT:"left",TOP:"top",RIGHT:"right",BOTTOM:"bottom"},PASTE_TYPE:{CLIP_BOARD:"clipBoard",CANVAS:"canvas"},SCROLL_BAR_DIR:{VERTICAL:"vertical",HORIZONTAL:"horizontal"},CREATE_NEW_NODE_BEHAVIOR:{DEFAULT:"default",NOT_ACTIVE:"notActive",ACTIVE_ONLY:"activeOnly"},TAG_PLACEMENT:{RIGHT:"right",BOTTOM:"bottom"},IMG_PLACEMENT:{LEFT:"left",TOP:"top",RIGHT:"right",BOTTOM:"bottom"}},s={[n.INIT_ROOT_NODE_POSITION.LEFT]:0,[n.INIT_ROOT_NODE_POSITION.TOP]:0,[n.INIT_ROOT_NODE_POSITION.RIGHT]:1,[n.INIT_ROOT_NODE_POSITION.BOTTOM]:1,[n.INIT_ROOT_NODE_POSITION.CENTER]:.5},o=(n.LAYOUT.LOGICAL_STRUCTURE,n.LAYOUT.LOGICAL_STRUCTURE_LEFT,n.LAYOUT.MIND_MAP,n.LAYOUT.ORGANIZATION_STRUCTURE,n.LAYOUT.CATALOG_ORGANIZATION,n.LAYOUT.TIMELINE,n.LAYOUT.TIMELINE2,n.LAYOUT.VERTICAL_TIMELINE,n.LAYOUT.VERTICAL_TIMELINE2,n.LAYOUT.VERTICAL_TIMELINE3,n.LAYOUT.FISHBONE,n.LAYOUT.FISHBONE2,n.LAYOUT.RIGHT_FISHBONE,n.LAYOUT.RIGHT_FISHBONE2,[n.LAYOUT.LOGICAL_STRUCTURE,n.LAYOUT.LOGICAL_STRUCTURE_LEFT,n.LAYOUT.MIND_MAP,n.LAYOUT.CATALOG_ORGANIZATION,n.LAYOUT.ORGANIZATION_STRUCTURE,n.LAYOUT.TIMELINE,n.LAYOUT.TIMELINE2,n.LAYOUT.VERTICAL_TIMELINE,n.LAYOUT.VERTICAL_TIMELINE2,n.LAYOUT.VERTICAL_TIMELINE3,n.LAYOUT.FISHBONE,n.LAYOUT.FISHBONE2,n.LAYOUT.RIGHT_FISHBONE,n.LAYOUT.RIGHT_FISHBONE2]),r=["text","image","imageTitle","imageSize","icon","tag","hyperlink","hyperlinkTitle","note","expand","isActive","generalization","richText","resetRichText","uid","activeStyle","associativeLineTargets","associativeLineTargetControlOffsets","associativeLinePoint","associativeLineText","attachmentUrl","attachmentName","notation","outerFrame","number","range","customLeft","customTop","customTextWidth","checkbox","dir","needUpdate","imgMap","nodeLink"],a="read_clipboard_error",h="custom_handle_clipboard_text_error",l="load_clipboard_image_error",d="before_text_edit_error",c="export_error",u="data_change_detail_event_error",p=1.2,m=["fontFamily","fontSize","fontWeight","fontStyle","textDecoration","color","textAlign"];const f=class{constructor(t={}){this.opt=t,this.mindMap=this.opt.mindMap,this.scale=1,this.sx=0,this.sy=0,this.x=0,this.y=0,this.firstDrag=!0,this.setTransformData(this.mindMap.opt.viewData),this.bind()}bind(){this.mindMap.keyCommand.addShortcut("Control+=",()=>{this.enlarge()}),this.mindMap.keyCommand.addShortcut("Control+-",()=>{this.narrow()}),this.mindMap.keyCommand.addShortcut("Control+i",()=>{this.fit()}),this.mindMap.event.on("mousedown",t=>{const{isDisableDrag:e,mousedownEventPreventDefault:i}=this.mindMap.opt;e||(i&&t.preventDefault(),this.sx=this.x,this.sy=this.y)}),this.mindMap.event.on("drag",(t,e)=>{t.ctrlKey||t.metaKey||this.mindMap.opt.isDisableDrag||(this.firstDrag&&(this.firstDrag=!1,this.mindMap.renderer.activeNodeList.length>0&&this.mindMap.execCommand("CLEAR_ACTIVE_NODE")),this.x=this.sx+e.mousemoveOffset.x,this.y=this.sy+e.mousemoveOffset.y,this.transform())}),this.mindMap.event.on("mouseup",()=>{this.firstDrag=!0}),this.mindMap.event.on("mousewheel",(t,e,i,s)=>{const{customHandleMousewheel:o,mousewheelAction:r,mouseScaleCenterUseMousePosition:a,mousewheelMoveStep:h,mousewheelZoomActionReverse:l,disableMouseWheelZoom:d,translateRatio:c}=this.mindMap.opt;if(o&&"function"==typeof o)return o(t);if(r===n.MOUSE_WHEEL_ACTION.ZOOM||t.ctrlKey||t.metaKey){if(d)return;const{x:i,y:o}=this.mindMap.toPos(t.clientX,t.clientY),r=a?i:void 0,h=a?o:void 0;switch(s&&(e.includes(n.DIR.LEFT)||e.includes(n.DIR.RIGHT))&&(e=e.filter(t=>![n.DIR.LEFT,n.DIR.RIGHT].includes(t))),!0){case e.includes(n.DIR.UP||n.DIR.LEFT):l?this.enlarge(r,h,s):this.narrow(r,h,s);break;case e.includes(n.DIR.DOWN||n.DIR.RIGHT):l?this.narrow(r,h,s):this.enlarge(r,h,s)}}else{let i=0,o=0;s?(i=Math.abs(t.wheelDeltaX),o=Math.abs(t.wheelDeltaY)):i=o=h;let r=0,a=0;e.includes(n.DIR.DOWN)&&(a=-o),e.includes(n.DIR.UP)&&(a=o),e.includes(n.DIR.LEFT)&&(r=i),e.includes(n.DIR.RIGHT)&&(r=-i),this.translateXY(r*c,a*c)}}),this.mindMap.on("resize",()=>{this.checkNeedMindMapInCanvas()&&this.transform()})}getTransformData(){return{transform:this.mindMap.draw.transform(),state:{scale:this.scale,x:this.x,y:this.y,sx:this.sx,sy:this.sy}}}setTransformData(t){t&&(Object.keys(t.state).forEach(e=>{this[e]=t.state[e]}),this.mindMap.draw.transform({...t.transform}),this.mindMap.emit("view_data_change",this.getTransformData()),this.emitEvent("scale"),this.emitEvent("translate"))}translateXY(t,e){0===t&&0===e||(this.x+=t,this.y+=e,this.transform(),this.emitEvent("translate"))}translateX(t){0!==t&&(this.x+=t,this.transform(),this.emitEvent("translate"))}translateXTo(t){this.x=t,this.transform(),this.emitEvent("translate")}translateY(t){0!==t&&(this.y+=t,this.transform(),this.emitEvent("translate"))}translateYTo(t){this.y=t,this.transform(),this.emitEvent("translate")}transform(){try{this.limitMindMapInCanvas()}catch(t){}this.mindMap.draw.transform({origin:[0,0],scale:this.scale,translate:[this.x,this.y]}),this.mindMap.emit("view_data_change",this.getTransformData())}reset(){const t=1!==this.scale,e=0!==this.x||0!==this.y;this.scale=1,this.x=0,this.y=0,this.transform(),t&&this.emitEvent("scale"),e&&this.emitEvent("translate")}narrow(t,e,i){let{scaleRatio:n,minZoomRatio:s}=this.mindMap.opt;n/=i?5:1;const o=Math.max(this.scale-n,s/100);this.scaleInCenter(o,t,e),this.transform(),this.emitEvent("scale")}enlarge(t,e,i){let{scaleRatio:n,maxZoomRatio:s}=this.mindMap.opt;n/=i?5:1;let o=0;o=-1===s?this.scale+n:Math.min(this.scale+n,s/100),this.scaleInCenter(o,t,e),this.transform(),this.emitEvent("scale")}scaleInCenter(t,e,i){void 0!==e&&void 0!==i||(e=this.mindMap.width/2,i=this.mindMap.height/2);const n=1-t/this.scale,s=(e-this.x)*n,o=(i-this.y)*n;this.x+=s,this.y+=o,this.scale=t}setScale(t,e,i){void 0!==e&&void 0!==i?this.scaleInCenter(t,e,i):this.scale=t,this.transform(),this.emitEvent("scale")}fit(t=()=>{},e=!1,i){i=void 0===i?this.mindMap.opt.fitPadding:i;const n=this.mindMap.draw,s=n.transform(),o=t()||n.rbox(),r=o.width/s.scaleX,a=o.height/s.scaleY,h=r/a;let{width:l,height:d}=this.mindMap.elRect;l-=2*i,d-=2*i;let c=0,u="";if(r<=l&&a<=d&&!e)c=1,u=1;else{let t=0,e=0;h>l/d?(t=l,e=l/h,u=2):(e=d,t=d*h,u=3),c=t/r}this.setScale(c);const p=t()||n.rbox();p.x-=this.mindMap.elRect.left,p.y-=this.mindMap.elRect.top;let m=0,f=0;1===u?(m=-p.x+i+(l-p.width)/2,f=-p.y+i+(d-p.height)/2):2===u?(m=-p.x+i,f=-p.y+i+(d-p.height)/2):3===u&&(m=-p.x+i+(l-p.width)/2,f=-p.y+i),this.translateXY(m,f)}checkNeedMindMapInCanvas(){if(this.mindMap.demonstrate&&this.mindMap.demonstrate.isInDemonstrate)return!1;const{isLimitMindMapInCanvasWhenHasScrollbar:t,isLimitMindMapInCanvas:e}=this.mindMap.opt;return this.mindMap.scrollbar?t:e}limitMindMapInCanvas(){if(!this.checkNeedMindMapInCanvas())return;let{scale:t,left:e,top:i,right:n,bottom:s}=this.getPositionLimit();const o=(this.mindMap.width-this.mindMap.initWidth)/2*t,r=(this.mindMap.height-this.mindMap.initHeight)/2*t,a=this.scale/t;e*=a,n*=a,i*=a,s*=a;const h=this.mindMap.width/2,l=this.mindMap.height/2,d=this.scale-1;e-=d*h-o,n-=d*h-o,i-=d*l-r,s-=d*l-r,this.x>e&&(this.x=e),this.x<n&&(this.x=n),this.y>i&&(this.y=i),this.y<s&&(this.y=s)}getPositionLimit(){const{scaleX:t,scaleY:e}=this.mindMap.draw.transform(),i=this.mindMap.draw.rbox(),n=this.mindMap.renderer.root.group.rbox(),s=this.mindMap.renderer.layout.getRootCenterOffset(n.width,n.height);return{scale:t,left:n.x-i.x-s.x*t,right:n.x-i.x2-s.x*t,top:n.y-i.y-s.y*e,bottom:n.y-i.y2-s.y*e}}emitEvent(t){switch(t){case"scale":this.mindMap.emit("scale",this.scale);case"translate":this.mindMap.emit("translate",this.x,this.y)}}};var g=i(30228),x=i.n(g);class w extends(x()){constructor(t={}){super(),this.opt=t,this.mindMap=t.mindMap,this.isLeftMousedown=!1,this.isRightMousedown=!1,this.isMiddleMousedown=!1,this.mousedownPos={x:0,y:0},this.mousemovePos={x:0,y:0},this.mousemoveOffset={x:0,y:0},this.bindFn(),this.bind()}bindFn(){this.onBodyMousedown=this.onBodyMousedown.bind(this),this.onBodyClick=this.onBodyClick.bind(this),this.onDrawClick=this.onDrawClick.bind(this),this.onMousedown=this.onMousedown.bind(this),this.onMousemove=this.onMousemove.bind(this),this.onMouseup=this.onMouseup.bind(this),this.onNodeMouseup=this.onNodeMouseup.bind(this),this.onMousewheel=this.onMousewheel.bind(this),this.onContextmenu=this.onContextmenu.bind(this),this.onSvgMousedown=this.onSvgMousedown.bind(this),this.onKeyup=this.onKeyup.bind(this),this.onMouseenter=this.onMouseenter.bind(this),this.onMouseleave=this.onMouseleave.bind(this)}bind(){document.body.addEventListener("mousedown",this.onBodyMousedown),document.body.addEventListener("click",this.onBodyClick),this.mindMap.svg.on("click",this.onDrawClick),this.mindMap.el.addEventListener("mousedown",this.onMousedown),this.mindMap.svg.on("mousedown",this.onSvgMousedown),window.addEventListener("mousemove",this.onMousemove),window.addEventListener("mouseup",this.onMouseup),this.on("node_mouseup",this.onNodeMouseup),this.mindMap.el.addEventListener("wheel",this.onMousewheel),this.mindMap.svg.on("contextmenu",this.onContextmenu),this.mindMap.svg.on("mouseenter",this.onMouseenter),this.mindMap.svg.on("mouseleave",this.onMouseleave),window.addEventListener("keyup",this.onKeyup)}unbind(){document.body.removeEventListener("mousedown",this.onBodyMousedown),document.body.removeEventListener("click",this.onBodyClick),this.mindMap.svg.off("click",this.onDrawClick),this.mindMap.el.removeEventListener("mousedown",this.onMousedown),window.removeEventListener("mousemove",this.onMousemove),window.removeEventListener("mouseup",this.onMouseup),this.off("node_mouseup",this.onNodeMouseup),this.mindMap.el.removeEventListener("wheel",this.onMousewheel),this.mindMap.svg.off("contextmenu",this.onContextmenu),this.mindMap.svg.off("mouseenter",this.onMouseenter),this.mindMap.svg.off("mouseleave",this.onMouseleave),window.removeEventListener("keyup",this.onKeyup)}onDrawClick(t){this.emit("draw_click",t)}onBodyMousedown(t){this.emit("body_mousedown",t)}onBodyClick(t){this.emit("body_click",t)}onSvgMousedown(t){this.emit("svg_mousedown",t)}onMousedown(t){1===t.which?this.isLeftMousedown=!0:3===t.which?this.isRightMousedown=!0:2===t.which&&(this.isMiddleMousedown=!0),this.mousedownPos.x=t.clientX,this.mousedownPos.y=t.clientY,this.emit("mousedown",t,this)}onMousemove(t){let{useLeftKeySelectionRightKeyDrag:e}=this.mindMap.opt;this.mousemovePos.x=t.clientX,this.mousemovePos.y=t.clientY,this.mousemoveOffset.x=t.clientX-this.mousedownPos.x,this.mousemoveOffset.y=t.clientY-this.mousedownPos.y,this.emit("mousemove",t,this),(this.isMiddleMousedown||(e?this.isRightMousedown:this.isLeftMousedown))&&(t.preventDefault(),this.emit("drag",t,this))}onMouseup(t){this.onNodeMouseup(),this.emit("mouseup",t,this)}onNodeMouseup(){this.isLeftMousedown=!1,this.isRightMousedown=!1,this.isMiddleMousedown=!1}onMousewheel(t){t.stopPropagation(),t.preventDefault();const e=[];t.deltaY<0&&e.push(n.DIR.UP),t.deltaY>0&&e.push(n.DIR.DOWN),t.deltaX<0&&e.push(n.DIR.LEFT),t.deltaX>0&&e.push(n.DIR.RIGHT);let i=!1;const{customCheckIsTouchPad:s}=this.mindMap.opt;i="function"==typeof s?s(t):Math.abs(t.deltaY)<=10,this.emit("mousewheel",t,e,this,i)}onContextmenu(t){t.preventDefault(),t.ctrlKey||this.emit("contextmenu",t)}onKeyup(t){this.emit("keyup",t)}onMouseenter(t){this.emit("svg_mouseenter",t)}onMouseleave(t){this.emit("svg_mouseleave",t)}}const v=w;var y=i(14744),_=i.n(y);const M={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let E;const N=new Uint8Array(16);function b(){if(!E&&(E="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!E))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return E(N)}const T=[];for(let t=0;t<256;++t)T.push((t+256).toString(16).slice(1));function C(t,e=0){return T[t[e+0]]+T[t[e+1]]+T[t[e+2]]+T[t[e+3]]+"-"+T[t[e+4]]+T[t[e+5]]+"-"+T[t[e+6]]+T[t[e+7]]+"-"+T[t[e+8]]+T[t[e+9]]+"-"+T[t[e+10]]+T[t[e+11]]+T[t[e+12]]+T[t[e+13]]+T[t[e+14]]+T[t[e+15]]}const q=function(t,e,i){if(M.randomUUID&&!e&&!t)return M.randomUUID();const n=(t=t||{}).random||(t.rng||b)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,e){i=i||0;for(let t=0;t<16;++t)e[i+t]=n[t];return e}return C(n)};function L(t){this.N=624,this.M=397,this.MATRIX_A=2567483615,this.UPPER_MASK=2147483648,this.LOWER_MASK=2147483647,this.mt=new Array(this.N),this.mti=this.N+1,this.init_genrand(t)}L.prototype.init_genrand=function(t){for(this.mt[0]=t>>>0,this.mti=1;this.mti<this.N;this.mti++)t=this.mt[this.mti-1]^this.mt[this.mti-1]>>>30,this.mt[this.mti]=(1812433253*((4294901760&t)>>>16)<<16)+1812433253*(65535&t)+this.mti,this.mt[this.mti]>>>=0},L.prototype.genrand_int32=function(){var t,e=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var i;for(this.mti==this.N+1&&this.init_genrand(5489),i=0;i<this.N-this.M;i++)t=this.mt[i]&this.UPPER_MASK|this.mt[i+1]&this.LOWER_MASK,this.mt[i]=this.mt[i+this.M]^t>>>1^e[1&t];for(;i<this.N-1;i++)t=this.mt[i]&this.UPPER_MASK|this.mt[i+1]&this.LOWER_MASK,this.mt[i]=this.mt[i+(this.M-this.N)]^t>>>1^e[1&t];t=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^t>>>1^e[1&t],this.mti=0}return t=this.mt[this.mti++],t^=t>>>11,t^=t<<7&2636928640,t^=t<<15&4022730752,(t^=t>>>18)>>>0};const D={},S=[];function A(t,e){if(Array.isArray(t))for(const i of t)A(i,e);else if("object"!=typeof t)R(Object.getOwnPropertyNames(e)),D[t]=Object.assign(D[t]||{},e);else for(const e in t)A(e,t[e])}function k(t){return D[t]||{}}function R(t){S.push(...t)}function z(t,e){let i;const n=t.length,s=[];for(i=0;i<n;i++)s.push(e(t[i]));return s}function O(t,e){let i;const n=t.length,s=[];for(i=0;i<n;i++)e(t[i])&&s.push(t[i]);return s}function I(t){return t%360*Math.PI/180}function F(t){return t.toLowerCase().replace(/-(.)/g,function(t,e){return e.toUpperCase()})}function B(t){return t.replace(/([A-Z])/g,function(t,e){return"-"+e.toLowerCase()})}function P(t){return t.charAt(0).toUpperCase()+t.slice(1)}function H(t,e,i,n){return null!=e&&null!=i||(n=n||t.bbox(),null==e?e=n.width/n.height*i:null==i&&(i=n.height/n.width*e)),{width:e,height:i}}function U(t,e){const i=t.origin;let n=null!=t.ox?t.ox:null!=t.originX?t.originX:"center",s=null!=t.oy?t.oy:null!=t.originY?t.originY:"center";null!=i&&([n,s]=Array.isArray(i)?i:"object"==typeof i?[i.x,i.y]:[i,i]);const o="string"==typeof n,r="string"==typeof s;if(o||r){const{height:t,width:i,x:a,y:h}=e.bbox();o&&(n=n.includes("left")?a:n.includes("right")?a+i:a+i/2),r&&(s=s.includes("top")?h:s.includes("bottom")?h+t:h+t/2)}return[n,s]}const G="http://www.w3.org/2000/svg",$="http://www.w3.org/1999/xhtml",Y="http://www.w3.org/2000/xmlns/",W="http://www.w3.org/1999/xlink",V="http://svgjs.dev/svgjs";const j={window:"undefined"==typeof window?null:window,document:"undefined"==typeof document?null:document};class X{}const K={},Z="___SYMBOL___ROOT___";function Q(t,e=G){return j.document.createElementNS(e,t)}function J(t,e=!1){if(t instanceof X)return t;if("object"==typeof t)return it(t);if(null==t)return new K[Z];if("string"==typeof t&&"<"!==t.charAt(0))return it(j.document.querySelector(t));const i=e?j.document.createElement("div"):Q("svg");return i.innerHTML=t,t=it(i.firstChild),i.removeChild(i.firstChild),t}function tt(t,e){return e&&e.ownerDocument&&e instanceof e.ownerDocument.defaultView.Node?e:Q(t)}function et(t){if(!t)return null;if(t.instance instanceof X)return t.instance;if("#document-fragment"===t.nodeName)return new K.Fragment(t);let e=P(t.nodeName||"Dom");return"LinearGradient"===e||"RadialGradient"===e?e="Gradient":K[e]||(e="Dom"),new K[e](t)}let it=et;function nt(t,e=t.name,i=!1){return K[e]=t,i&&(K[Z]=t),R(Object.getOwnPropertyNames(t.prototype)),t}let st=1e3;function ot(t){return"Svgjs"+P(t)+st++}function rt(t){for(let e=t.children.length-1;e>=0;e--)rt(t.children[e]);return t.id?(t.id=ot(t.nodeName),t):t}function at(t,e){let i,n;for(n=(t=Array.isArray(t)?t:[t]).length-1;n>=0;n--)for(i in e)t[n].prototype[i]=e[i]}function ht(t){return function(...e){const i=e[e.length-1];return!i||i.constructor!==Object||i instanceof Array?t.apply(this,e):t.apply(this,e.slice(0,-1)).attr(i)}}A("Dom",{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},prev:function(){return this.siblings()[this.position()-1]},forward:function(){const t=this.position();return this.parent().add(this.remove(),t+1),this},backward:function(){const t=this.position();return this.parent().add(this.remove(),t?t-1:0),this},front:function(){return this.parent().add(this.remove()),this},back:function(){return this.parent().add(this.remove(),0),this},before:function(t){(t=J(t)).remove();const e=this.position();return this.parent().add(t,e),this},after:function(t){(t=J(t)).remove();const e=this.position();return this.parent().add(t,e+1),this},insertBefore:function(t){return(t=J(t)).before(this),this},insertAfter:function(t){return(t=J(t)).after(this),this}});const lt=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,dt=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,ct=/rgb\((\d+),(\d+),(\d+)\)/,ut=/(#[a-z_][a-z0-9\-_]*)/i,pt=/\)\s*,?\s*/,mt=/\s/g,ft=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,gt=/^rgb\(/,xt=/^(\s+)?$/,wt=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,vt=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,yt=/[\s,]+/,_t=/[MLHVCSQTAZ]/i;function Mt(t){const e=Math.round(t),i=Math.max(0,Math.min(255,e)).toString(16);return 1===i.length?"0"+i:i}function Et(t,e){for(let i=e.length;i--;)if(null==t[e[i]])return!1;return!0}function Nt(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}A("Dom",{classes:function(){const t=this.attr("class");return null==t?[]:t.trim().split(yt)},hasClass:function(t){return-1!==this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){const e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter(function(e){return e!==t}).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}}),A("Dom",{css:function(t,e){const i={};if(0===arguments.length)return this.node.style.cssText.split(/\s*;\s*/).filter(function(t){return!!t.length}).forEach(function(t){const e=t.split(/\s*:\s*/);i[e[0]]=e[1]}),i;if(arguments.length<2){if(Array.isArray(t)){for(const e of t){const t=F(e);i[e]=this.node.style[t]}return i}if("string"==typeof t)return this.node.style[F(t)];if("object"==typeof t)for(const e in t)this.node.style[F(e)]=null==t[e]||xt.test(t[e])?"":t[e]}return 2===arguments.length&&(this.node.style[F(t)]=null==e||xt.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return"none"!==this.css("display")}}),A("Dom",{data:function(t,e,i){if(null==t)return this.data(z(O(this.node.attributes,t=>0===t.nodeName.indexOf("data-")),t=>t.nodeName.slice(5)));if(t instanceof Array){const e={};for(const i of t)e[i]=this.data(i);return e}if("object"==typeof t)for(e in t)this.data(e,t[e]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+t))}catch(e){return this.attr("data-"+t)}else this.attr("data-"+t,null===e?null:!0===i||"string"==typeof e||"number"==typeof e?e:JSON.stringify(e));return this}}),A("Dom",{remember:function(t,e){if("object"==typeof arguments[0])for(const e in t)this.remember(e,t[e]);else{if(1===arguments.length)return this.memory()[t];this.memory()[t]=e}return this},forget:function(){if(0===arguments.length)this._memory={};else for(let t=arguments.length-1;t>=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory=this._memory||{}}});class bt{constructor(...t){this.init(...t)}static isColor(t){return t&&(t instanceof bt||this.isRgb(t)||this.test(t))}static isRgb(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b}static random(t="vibrant",e,i){const{random:n,round:s,sin:o,PI:r}=Math;if("vibrant"===t){const t=24*n()+57,e=38*n()+45,i=360*n();return new bt(t,e,i,"lch")}if("sine"===t){const t=s(80*o(2*r*(e=e??n())/.5+.01)+150),i=s(50*o(2*r*e/.5+4.6)+200),a=s(100*o(2*r*e/.5+2.3)+150);return new bt(t,i,a)}if("pastel"===t){const t=8*n()+86,e=17*n()+9,i=360*n();return new bt(t,e,i,"lch")}if("dark"===t){const t=10+10*n(),e=50*n()+86,i=360*n();return new bt(t,e,i,"lch")}if("rgb"===t){const t=255*n(),e=255*n(),i=255*n();return new bt(t,e,i)}if("lab"===t){const t=100*n(),e=256*n()-128,i=256*n()-128;return new bt(t,e,i,"lab")}if("grey"===t){const t=255*n();return new bt(t,t,t)}throw new Error("Unsupported random color mode")}static test(t){return"string"==typeof t&&(ft.test(t)||gt.test(t))}cmyk(){const{_a:t,_b:e,_c:i}=this.rgb(),[n,s,o]=[t,e,i].map(t=>t/255),r=Math.min(1-n,1-s,1-o);if(1===r)return new bt(0,0,0,1,"cmyk");return new bt((1-n-r)/(1-r),(1-s-r)/(1-r),(1-o-r)/(1-r),r,"cmyk")}hsl(){const{_a:t,_b:e,_c:i}=this.rgb(),[n,s,o]=[t,e,i].map(t=>t/255),r=Math.max(n,s,o),a=Math.min(n,s,o),h=(r+a)/2,l=r===a,d=r-a;return new bt(360*(l?0:r===n?((s-o)/d+(s<o?6:0))/6:r===s?((o-n)/d+2)/6:r===o?((n-s)/d+4)/6:0),100*(l?0:h>.5?d/(2-r-a):d/(r+a)),100*h,"hsl")}init(t=0,e=0,i=0,n=0,s="rgb"){if(t=t||0,this.space)for(const t in this.space)delete this[this.space[t]];if("number"==typeof t)s="string"==typeof n?n:s,n="string"==typeof n?0:n,Object.assign(this,{_a:t,_b:e,_c:i,_d:n,space:s});else if(t instanceof Array)this.space=e||("string"==typeof t[3]?t[3]:t[4])||"rgb",Object.assign(this,{_a:t[0],_b:t[1],_c:t[2],_d:t[3]||0});else if(t instanceof Object){const i=function(t,e){const i=Et(t,"rgb")?{_a:t.r,_b:t.g,_c:t.b,_d:0,space:"rgb"}:Et(t,"xyz")?{_a:t.x,_b:t.y,_c:t.z,_d:0,space:"xyz"}:Et(t,"hsl")?{_a:t.h,_b:t.s,_c:t.l,_d:0,space:"hsl"}:Et(t,"lab")?{_a:t.l,_b:t.a,_c:t.b,_d:0,space:"lab"}:Et(t,"lch")?{_a:t.l,_b:t.c,_c:t.h,_d:0,space:"lch"}:Et(t,"cmyk")?{_a:t.c,_b:t.m,_c:t.y,_d:t.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"};return i.space=e||i.space,i}(t,e);Object.assign(this,i)}else if("string"==typeof t)if(gt.test(t)){const e=t.replace(mt,""),[i,n,s]=ct.exec(e).slice(1,4).map(t=>parseInt(t));Object.assign(this,{_a:i,_b:n,_c:s,_d:0,space:"rgb"})}else{if(!ft.test(t))throw Error("Unsupported string format, can't construct Color");{const e=t=>parseInt(t,16),[,i,n,s]=dt.exec(function(t){return 4===t.length?["#",t.substring(1,2),t.substring(1,2),t.substring(2,3),t.substring(2,3),t.substring(3,4),t.substring(3,4)].join(""):t}(t)).map(e);Object.assign(this,{_a:i,_b:n,_c:s,_d:0,space:"rgb"})}}const{_a:o,_b:r,_c:a,_d:h}=this,l="rgb"===this.space?{r:o,g:r,b:a}:"xyz"===this.space?{x:o,y:r,z:a}:"hsl"===this.space?{h:o,s:r,l:a}:"lab"===this.space?{l:o,a:r,b:a}:"lch"===this.space?{l:o,c:r,h:a}:"cmyk"===this.space?{c:o,m:r,y:a,k:h}:{};Object.assign(this,l)}lab(){const{x:t,y:e,z:i}=this.xyz();return new bt(116*e-16,500*(t-e),200*(e-i),"lab")}lch(){const{l:t,a:e,b:i}=this.lab(),n=Math.sqrt(e**2+i**2);let s=180*Math.atan2(i,e)/Math.PI;s<0&&(s*=-1,s=360-s);return new bt(t,n,s,"lch")}rgb(){if("rgb"===this.space)return this;if("lab"===(t=this.space)||"xyz"===t||"lch"===t){let{x:t,y:e,z:i}=this;if("lab"===this.space||"lch"===this.space){let{l:n,a:s,b:o}=this;if("lch"===this.space){const{c:t,h:e}=this,i=Math.PI/180;s=t*Math.cos(i*e),o=t*Math.sin(i*e)}const r=(n+16)/116,a=s/500+r,h=r-o/200,l=16/116,d=.008856,c=7.787;t=.95047*(a**3>d?a**3:(a-l)/c),e=1*(r**3>d?r**3:(r-l)/c),i=1.08883*(h**3>d?h**3:(h-l)/c)}const n=3.2406*t+-1.5372*e+-.4986*i,s=-.9689*t+1.8758*e+.0415*i,o=.0557*t+-.204*e+1.057*i,r=Math.pow,a=.0031308,h=n>a?1.055*r(n,1/2.4)-.055:12.92*n,l=s>a?1.055*r(s,1/2.4)-.055:12.92*s,d=o>a?1.055*r(o,1/2.4)-.055:12.92*o;return new bt(255*h,255*l,255*d)}if("hsl"===this.space){let{h:t,s:e,l:i}=this;if(t/=360,e/=100,i/=100,0===e){i*=255;return new bt(i,i,i)}const n=i<.5?i*(1+e):i+e-i*e,s=2*i-n,o=255*Nt(s,n,t+1/3),r=255*Nt(s,n,t),a=255*Nt(s,n,t-1/3);return new bt(o,r,a)}if("cmyk"===this.space){const{c:t,m:e,y:i,k:n}=this,s=255*(1-Math.min(1,t*(1-n)+n)),o=255*(1-Math.min(1,e*(1-n)+n)),r=255*(1-Math.min(1,i*(1-n)+n));return new bt(s,o,r)}return this;var t}toArray(){const{_a:t,_b:e,_c:i,_d:n,space:s}=this;return[t,e,i,n,s]}toHex(){const[t,e,i]=this._clamped().map(Mt);return`#${t}${e}${i}`}toRgb(){const[t,e,i]=this._clamped();return`rgb(${t},${e},${i})`}toString(){return this.toHex()}xyz(){const{_a:t,_b:e,_c:i}=this.rgb(),[n,s,o]=[t,e,i].map(t=>t/255),r=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92,a=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92,h=o>.04045?Math.pow((o+.055)/1.055,2.4):o/12.92,l=(.4124*r+.3576*a+.1805*h)/.95047,d=(.2126*r+.7152*a+.0722*h)/1,c=(.0193*r+.1192*a+.9505*h)/1.08883,u=l>.008856?Math.pow(l,1/3):7.787*l+16/116,p=d>.008856?Math.pow(d,1/3):7.787*d+16/116,m=c>.008856?Math.pow(c,1/3):7.787*c+16/116;return new bt(u,p,m,"xyz")}_clamped(){const{_a:t,_b:e,_c:i}=this.rgb(),{max:n,min:s,round:o}=Math;return[t,e,i].map(t=>n(0,s(o(t),255)))}}class Tt{constructor(...t){this.init(...t)}clone(){return new Tt(this)}init(t,e){const i=0,n=0,s=Array.isArray(t)?{x:t[0],y:t[1]}:"object"==typeof t?{x:t.x,y:t.y}:{x:t,y:e};return this.x=s.x??i,this.y=s.y??n,this}toArray(){return[this.x,this.y]}transform(t){return this.clone().transformO(t)}transformO(t){qt.isMatrixLike(t)||(t=new qt(t));const{x:e,y:i}=this;return this.x=t.a*e+t.c*i+t.e,this.y=t.b*e+t.d*i+t.f,this}}function Ct(t,e,i){return Math.abs(e-t)<(i||1e-6)}class qt{constructor(...t){this.init(...t)}static formatTransforms(t){const e="both"===t.flip||!0===t.flip,i=t.flip&&(e||"x"===t.flip)?-1:1,n=t.flip&&(e||"y"===t.flip)?-1:1,s=t.skew&&t.skew.length?t.skew[0]:isFinite(t.skew)?t.skew:isFinite(t.skewX)?t.skewX:0,o=t.skew&&t.skew.length?t.skew[1]:isFinite(t.skew)?t.skew:isFinite(t.skewY)?t.skewY:0,r=t.scale&&t.scale.length?t.scale[0]*i:isFinite(t.scale)?t.scale*i:isFinite(t.scaleX)?t.scaleX*i:i,a=t.scale&&t.scale.length?t.scale[1]*n:isFinite(t.scale)?t.scale*n:isFinite(t.scaleY)?t.scaleY*n:n,h=t.shear||0,l=t.rotate||t.theta||0,d=new Tt(t.origin||t.around||t.ox||t.originX,t.oy||t.originY),c=d.x,u=d.y,p=new Tt(t.position||t.px||t.positionX||NaN,t.py||t.positionY||NaN),m=p.x,f=p.y,g=new Tt(t.translate||t.tx||t.translateX,t.ty||t.translateY),x=g.x,w=g.y,v=new Tt(t.relative||t.rx||t.relativeX,t.ry||t.relativeY);return{scaleX:r,scaleY:a,skewX:s,skewY:o,shear:h,theta:l,rx:v.x,ry:v.y,tx:x,ty:w,ox:c,oy:u,px:m,py:f}}static fromArray(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}static isMatrixLike(t){return null!=t.a||null!=t.b||null!=t.c||null!=t.d||null!=t.e||null!=t.f}static matrixMultiply(t,e,i){const n=t.a*e.a+t.c*e.b,s=t.b*e.a+t.d*e.b,o=t.a*e.c+t.c*e.d,r=t.b*e.c+t.d*e.d,a=t.e+t.a*e.e+t.c*e.f,h=t.f+t.b*e.e+t.d*e.f;return i.a=n,i.b=s,i.c=o,i.d=r,i.e=a,i.f=h,i}around(t,e,i){return this.clone().aroundO(t,e,i)}aroundO(t,e,i){const n=t||0,s=e||0;return this.translateO(-n,-s).lmultiplyO(i).translateO(n,s)}clone(){return new qt(this)}decompose(t=0,e=0){const i=this.a,n=this.b,s=this.c,o=this.d,r=this.e,a=this.f,h=i*o-n*s,l=h>0?1:-1,d=l*Math.sqrt(i*i+n*n),c=Math.atan2(l*n,l*i),u=180/Math.PI*c,p=Math.cos(c),m=Math.sin(c),f=(i*s+n*o)/h,g=s*d/(f*i-n)||o*d/(f*n+i);return{scaleX:d,scaleY:g,shear:f,rotate:u,translateX:r-t+t*p*d+e*(f*p*d-m*g),translateY:a-e+t*m*d+e*(f*m*d+p*g),originX:t,originY:e,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}equals(t){if(t===this)return!0;const e=new qt(t);return Ct(this.a,e.a)&&Ct(this.b,e.b)&&Ct(this.c,e.c)&&Ct(this.d,e.d)&&Ct(this.e,e.e)&&Ct(this.f,e.f)}flip(t,e){return this.clone().flipO(t,e)}flipO(t,e){return"x"===t?this.scaleO(-1,1,e,0):"y"===t?this.scaleO(1,-1,0,e):this.scaleO(-1,-1,t,e||t)}init(t){const e=qt.fromArray([1,0,0,1,0,0]);return t=t instanceof Kt?t.matrixify():"string"==typeof t?qt.fromArray(t.split(yt).map(parseFloat)):Array.isArray(t)?qt.fromArray(t):"object"==typeof t&&qt.isMatrixLike(t)?t:"object"==typeof t?(new qt).transform(t):6===arguments.length?qt.fromArray([].slice.call(arguments)):e,this.a=null!=t.a?t.a:e.a,this.b=null!=t.b?t.b:e.b,this.c=null!=t.c?t.c:e.c,this.d=null!=t.d?t.d:e.d,this.e=null!=t.e?t.e:e.e,this.f=null!=t.f?t.f:e.f,this}inverse(){return this.clone().inverseO()}inverseO(){const t=this.a,e=this.b,i=this.c,n=this.d,s=this.e,o=this.f,r=t*n-e*i;if(!r)throw new Error("Cannot invert "+this);const a=n/r,h=-e/r,l=-i/r,d=t/r,c=-(a*s+l*o),u=-(h*s+d*o);return this.a=a,this.b=h,this.c=l,this.d=d,this.e=c,this.f=u,this}lmultiply(t){return this.clone().lmultiplyO(t)}lmultiplyO(t){const e=t instanceof qt?t:new qt(t);return qt.matrixMultiply(e,this,this)}multiply(t){return this.clone().multiplyO(t)}multiplyO(t){const e=t instanceof qt?t:new qt(t);return qt.matrixMultiply(this,e,this)}rotate(t,e,i){return this.clone().rotateO(t,e,i)}rotateO(t,e=0,i=0){t=I(t);const n=Math.cos(t),s=Math.sin(t),{a:o,b:r,c:a,d:h,e:l,f:d}=this;return this.a=o*n-r*s,this.b=r*n+o*s,this.c=a*n-h*s,this.d=h*n+a*s,this.e=l*n-d*s+i*s-e*n+e,this.f=d*n+l*s-e*s-i*n+i,this}scale(t,e,i,n){return this.clone().scaleO(...arguments)}scaleO(t,e=t,i=0,n=0){3===arguments.length&&(n=i,i=e,e=t);const{a:s,b:o,c:r,d:a,e:h,f:l}=this;return this.a=s*t,this.b=o*e,this.c=r*t,this.d=a*e,this.e=h*t-i*t+i,this.f=l*e-n*e+n,this}shear(t,e,i){return this.clone().shearO(t,e,i)}shearO(t,e=0,i=0){const{a:n,b:s,c:o,d:r,e:a,f:h}=this;return this.a=n+s*t,this.c=o+r*t,this.e=a+h*t-i*t,this}skew(t,e,i,n){return this.clone().skewO(...arguments)}skewO(t,e=t,i=0,n=0){3===arguments.length&&(n=i,i=e,e=t),t=I(t),e=I(e);const s=Math.tan(t),o=Math.tan(e),{a:r,b:a,c:h,d:l,e:d,f:c}=this;return this.a=r+a*s,this.b=a+r*o,this.c=h+l*s,this.d=l+h*o,this.e=d+c*s-n*s,this.f=c+d*o-i*o,this}skewX(t,e,i){return this.skew(t,0,e,i)}skewY(t,e,i){return this.skew(0,t,e,i)}toArray(){return[this.a,this.b,this.c,this.d,this.e,this.f]}toString(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}transform(t){if(qt.isMatrixLike(t)){return new qt(t).multiplyO(this)}const e=qt.formatTransforms(t),{x:i,y:n}=new Tt(e.ox,e.oy).transform(this),s=(new qt).translateO(e.rx,e.ry).lmultiplyO(this).translateO(-i,-n).scaleO(e.scaleX,e.scaleY).skewO(e.skewX,e.skewY).shearO(e.shear).rotateO(e.theta).translateO(i,n);if(isFinite(e.px)||isFinite(e.py)){const t=new Tt(i,n).transform(s),o=isFinite(e.px)?e.px-t.x:0,r=isFinite(e.py)?e.py-t.y:0;s.translateO(o,r)}return s.translateO(e.tx,e.ty),s}translate(t,e){return this.clone().translateO(t,e)}translateO(t,e){return this.e+=t||0,this.f+=e||0,this}valueOf(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}}function Lt(){if(!Lt.nodes){const t=J().size(2,0);t.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),t.attr("focusable","false"),t.attr("aria-hidden","true");const e=t.path().node;Lt.nodes={svg:t,path:e}}if(!Lt.nodes.svg.node.parentNode){const t=j.document.body||j.document.documentElement;Lt.nodes.svg.addTo(t)}return Lt.nodes}function Dt(t){return!(t.width||t.height||t.x||t.y)}nt(qt,"Matrix");class St{constructor(...t){this.init(...t)}addOffset(){return this.x+=j.window.pageXOffset,this.y+=j.window.pageYOffset,new St(this)}init(t){return t="string"==typeof t?t.split(yt).map(parseFloat):Array.isArray(t)?t:"object"==typeof t?[null!=t.left?t.left:t.x,null!=t.top?t.top:t.y,t.width,t.height]:4===arguments.length?[].slice.call(arguments):[0,0,0,0],this.x=t[0]||0,this.y=t[1]||0,this.width=this.w=t[2]||0,this.height=this.h=t[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}isNulled(){return Dt(this)}merge(t){const e=Math.min(this.x,t.x),i=Math.min(this.y,t.y),n=Math.max(this.x+this.width,t.x+t.width)-e,s=Math.max(this.y+this.height,t.y+t.height)-i;return new St(e,i,n,s)}toArray(){return[this.x,this.y,this.width,this.height]}toString(){return this.x+" "+this.y+" "+this.width+" "+this.height}transform(t){t instanceof qt||(t=new qt(t));let e=1/0,i=-1/0,n=1/0,s=-1/0;return[new Tt(this.x,this.y),new Tt(this.x2,this.y),new Tt(this.x,this.y2),new Tt(this.x2,this.y2)].forEach(function(o){o=o.transform(t),e=Math.min(e,o.x),i=Math.max(i,o.x),n=Math.min(n,o.y),s=Math.max(s,o.y)}),new St(e,n,i-e,s-n)}}function At(t,e,i){let n;try{if(n=e(t.node),Dt(n)&&((s=t.node)!==j.document&&!(j.document.documentElement.contains||function(t){for(;t.parentNode;)t=t.parentNode;return t===j.document}).call(j.document.documentElement,s)))throw new Error("Element not in the dom")}catch(e){n=i(t)}var s;return n}A({viewbox:{viewbox(t,e,i,n){return null==t?new St(this.attr("viewBox")):this.attr("viewBox",new St(t,e,i,n))},zoom(t,e){let{width:i,height:n}=this.attr(["width","height"]);if((i||n)&&"string"!=typeof i&&"string"!=typeof n||(i=this.node.clientWidth,n=this.node.clientHeight),!i||!n)throw new Error("Impossible to get absolute width and height. Please provide an absolute width and height attribute on the zooming element");const s=this.viewbox(),o=i/s.width,r=n/s.height,a=Math.min(o,r);if(null==t)return a;let h=a/t;h===1/0&&(h=Number.MAX_SAFE_INTEGER/100),e=e||new Tt(i/2/o+s.x,n/2/r+s.y);const l=new St(s).transform(new qt({scale:h,origin:e}));return this.viewbox(l)}}}),nt(St,"Box");class kt extends Array{constructor(t=[],...e){if(super(t,...e),"number"==typeof t)return this;this.length=0,this.push(...t)}}at([kt],{each(t,...e){return"function"==typeof t?this.map((e,i,n)=>t.call(e,e,i,n)):this.map(i=>i[t](...e))},toArray(){return Array.prototype.concat.apply([],this)}});const Rt=["toArray","constructor","each"];function zt(t,e){return new kt(z((e||j.document).querySelectorAll(t),function(t){return et(t)}))}kt.extend=function(t){t=t.reduce((t,e)=>(Rt.includes(e)||"_"===e[0]||(t[e]=function(...t){return this.each(e,...t)}),t),{}),at([kt],t)};let Ot=0;const It={};function Ft(t){let e=t.getEventHolder();return e===j.window&&(e=It),e.events||(e.events={}),e.events}function Bt(t){return t.getEventTarget()}function Pt(t,e,i,n,s){const o=i.bind(n||t),r=J(t),a=Ft(r),h=Bt(r);e=Array.isArray(e)?e:e.split(yt),i._svgjsListenerId||(i._svgjsListenerId=++Ot),e.forEach(function(t){const e=t.split(".")[0],n=t.split(".")[1]||"*";a[e]=a[e]||{},a[e][n]=a[e][n]||{},a[e][n][i._svgjsListenerId]=o,h.addEventListener(e,o,s||!1)})}function Ht(t,e,i,n){const s=J(t),o=Ft(s),r=Bt(s);("function"!=typeof i||(i=i._svgjsListenerId))&&(e=Array.isArray(e)?e:(e||"").split(yt)).forEach(function(t){const e=t&&t.split(".")[0],a=t&&t.split(".")[1];let h,l;if(i)o[e]&&o[e][a||"*"]&&(r.removeEventListener(e,o[e][a||"*"][i],n||!1),delete o[e][a||"*"][i]);else if(e&&a){if(o[e]&&o[e][a]){for(l in o[e][a])Ht(r,[e,a].join("."),l);delete o[e][a]}}else if(a)for(t in o)for(h in o[t])a===h&&Ht(r,[t,a].join("."));else if(e){if(o[e]){for(h in o[e])Ht(r,[e,h].join("."));delete o[e]}}else{for(t in o)Ht(r,t);!function(t){let e=t.getEventHolder();e===j.window&&(e=It),e.events&&(e.events={})}(s)}})}class Ut extends X{addEventListener(){}dispatch(t,e,i){return function(t,e,i,n){const s=Bt(t);return e instanceof j.window.Event||(e=new j.window.CustomEvent(e,{detail:i,cancelable:!0,...n})),s.dispatchEvent(e),e}(this,t,e,i)}dispatchEvent(t){const e=this.getEventHolder().events;if(!e)return!0;const i=e[t.type];for(const e in i)for(const n in i[e])i[e][n](t);return!t.defaultPrevented}fire(t,e,i){return this.dispatch(t,e,i),this}getEventHolder(){return this}getEventTarget(){return this}off(t,e,i){return Ht(this,t,e,i),this}on(t,e,i,n){return Pt(this,t,e,i,n),this}removeEventListener(){}}function Gt(){}nt(Ut,"EventTarget");const $t={duration:400,ease:">",delay:0},Yt={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","text-anchor":"start"};class Wt extends Array{constructor(...t){super(...t),this.init(...t)}clone(){return new this.constructor(this)}init(t){return"number"==typeof t||(this.length=0,this.push(...this.parse(t))),this}parse(t=[]){return t instanceof Array?t:t.trim().split(yt).map(parseFloat)}toArray(){return Array.prototype.concat.apply([],this)}toSet(){return new Set(this)}toString(){return this.join(" ")}valueOf(){const t=[];return t.push(...this),t}}class Vt{constructor(...t){this.init(...t)}convert(t){return new Vt(this.value,t)}divide(t){return t=new Vt(t),new Vt(this/t,this.unit||t.unit)}init(t,e){return e=Array.isArray(t)?t[1]:e,t=Array.isArray(t)?t[0]:t,this.value=0,this.unit=e||"","number"==typeof t?this.value=isNaN(t)?0:isFinite(t)?t:t<0?-34e37:34e37:"string"==typeof t?(e=t.match(lt))&&(this.value=parseFloat(e[1]),"%"===e[5]?this.value/=100:"s"===e[5]&&(this.value*=1e3),this.unit=e[5]):t instanceof Vt&&(this.value=t.valueOf(),this.unit=t.unit),this}minus(t){return t=new Vt(t),new Vt(this-t,this.unit||t.unit)}plus(t){return t=new Vt(t),new Vt(this+t,this.unit||t.unit)}times(t){return t=new Vt(t),new Vt(this*t,this.unit||t.unit)}toArray(){return[this.value,this.unit]}toJSON(){return this.toString()}toString(){return("%"===this.unit?~~(1e8*this.value)/1e6:"s"===this.unit?this.value/1e3:this.value)+this.unit}valueOf(){return this.value}}const jt=[];class Xt extends Ut{constructor(t,e){super(),this.node=t,this.type=t.nodeName,e&&t!==e&&this.attr(e)}add(t,e){return(t=J(t)).removeNamespace&&this.node instanceof j.window.SVGElement&&t.removeNamespace(),null==e?this.node.appendChild(t.node):t.node!==this.node.childNodes[e]&&this.node.insertBefore(t.node,this.node.childNodes[e]),this}addTo(t,e){return J(t).put(this,e)}children(){return new kt(z(this.node.children,function(t){return et(t)}))}clear(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}clone(t=!0,e=!0){this.writeDataToDom();let i=this.node.cloneNode(t);return e&&(i=rt(i)),new this.constructor(i)}each(t,e){const i=this.children();let n,s;for(n=0,s=i.length;n<s;n++)t.apply(i[n],[n,i]),e&&i[n].each(t,e);return this}element(t,e){return this.put(new Xt(Q(t),e))}first(){return et(this.node.firstChild)}get(t){return et(this.node.childNodes[t])}getEventHolder(){return this.node}getEventTarget(){return this.node}has(t){return this.index(t)>=0}html(t,e){return this.xml(t,e,$)}id(t){return void 0!==t||this.node.id||(this.node.id=ot(this.type)),this.attr("id",t)}index(t){return[].slice.call(this.node.childNodes).indexOf(t.node)}last(){return et(this.node.lastChild)}matches(t){const e=this.node,i=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector||null;return i&&i.call(e,t)}parent(t){let e=this;if(!e.node.parentNode)return null;if(e=et(e.node.parentNode),!t)return e;do{if("string"==typeof t?e.matches(t):e instanceof t)return e}while(e=et(e.node.parentNode));return e}put(t,e){return t=J(t),this.add(t,e),t}putIn(t,e){return J(t).add(this,e)}remove(){return this.parent()&&this.parent().removeElement(this),this}removeElement(t){return this.node.removeChild(t.node),this}replace(t){return t=J(t),this.node.parentNode&&this.node.parentNode.replaceChild(t.node,this.node),t}round(t=2,e=null){const i=10**t,n=this.attr(e);for(const t in n)"number"==typeof n[t]&&(n[t]=Math.round(n[t]*i)/i);return this.attr(n),this}svg(t,e){return this.xml(t,e,G)}toString(){return this.id()}words(t){return this.node.textContent=t,this}wrap(t){const e=this.parent();if(!e)return this.addTo(t);const i=e.index(this);return e.put(t,i).put(this)}writeDataToDom(){return this.each(function(){this.writeDataToDom()}),this}xml(t,e,i){if("boolean"==typeof t&&(i=e,e=t,t=null),null==t||"function"==typeof t){e=e??!0,this.writeDataToDom();let i=this;if(null!=t){if(i=et(i.node.cloneNode(!0)),e){const e=t(i);if(i=e||i,!1===e)return""}i.each(function(){const e=t(this),i=e||this;!1===e?this.remove():e&&this!==i&&this.replace(i)},!0)}return e?i.node.outerHTML:i.node.innerHTML}e=e??!1;const n=Q("wrapper",i),s=j.document.createDocumentFragment();n.innerHTML=t;for(let t=n.children.length;t--;)s.appendChild(n.firstElementChild);const o=this.parent();return e?this.replace(s)&&o:this.add(s)}}at(Xt,{attr:function(t,e,i){if(null==t){t={},e=this.node.attributes;for(const i of e)t[i.nodeName]=wt.test(i.nodeValue)?parseFloat(i.nodeValue):i.nodeValue;return t}if(t instanceof Array)return t.reduce((t,e)=>(t[e]=this.attr(e),t),{});if("object"==typeof t&&t.constructor===Object)for(e in t)this.attr(e,t[e]);else if(null===e)this.node.removeAttribute(t);else{if(null==e)return null==(e=this.node.getAttribute(t))?Yt[t]:wt.test(e)?parseFloat(e):e;"number"==typeof(e=jt.reduce((e,i)=>i(t,e,this),e))?e=new Vt(e):bt.isColor(e)?e=new bt(e):e.constructor===Array&&(e=new Wt(e)),"leading"===t?this.leading&&this.leading(e):"string"==typeof i?this.node.setAttributeNS(i,t,e.toString()):this.node.setAttribute(t,e.toString()),!this.rebuild||"font-size"!==t&&"x"!==t||this.rebuild()}return this},find:function(t){return zt(t,this.node)},findOne:function(t){return et(this.node.querySelector(t))}}),nt(Xt,"Dom");class Kt extends Xt{constructor(t,e){super(t,e),this.dom={},this.node.instance=this,t.hasAttribute("svgjs:data")&&this.setData(JSON.parse(t.getAttribute("svgjs:data"))||{})}center(t,e){return this.cx(t).cy(e)}cx(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)}cy(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)}defs(){const t=this.root();return t&&t.defs()}dmove(t,e){return this.dx(t).dy(e)}dx(t=0){return this.x(new Vt(t).plus(this.x()))}dy(t=0){return this.y(new Vt(t).plus(this.y()))}getEventHolder(){return this}height(t){return this.attr("height",t)}move(t,e){return this.x(t).y(e)}parents(t=this.root()){const e="string"==typeof t;e||(t=J(t));const i=new kt;let n=this;for(;(n=n.parent())&&n.node!==j.document&&"#document-fragment"!==n.nodeName&&(i.push(n),e||n.node!==t.node)&&(!e||!n.matches(t));)if(n.node===this.root().node)return null;return i}reference(t){if(!(t=this.attr(t)))return null;const e=(t+"").match(ut);return e?J(e[1]):null}root(){const t=this.parent(K[Z]);return t&&t.root()}setData(t){return this.dom=t,this}size(t,e){const i=H(this,t,e);return this.width(new Vt(i.width)).height(new Vt(i.height))}width(t){return this.attr("width",t)}writeDataToDom(){return this.node.removeAttribute("svgjs:data"),Object.keys(this.dom).length&&this.node.setAttribute("svgjs:data",JSON.stringify(this.dom)),super.writeDataToDom()}x(t){return this.attr("x",t)}y(t){return this.attr("y",t)}}at(Kt,{bbox:function(){const t=At(this,t=>t.getBBox(),t=>{try{const e=t.clone().addTo(Lt().svg).show(),i=e.node.getBBox();return e.remove(),i}catch(e){throw new Error(`Getting bbox of element "${t.node.nodeName}" is not possible: ${e.toString()}`)}});return new St(t)},rbox:function(t){const e=At(this,t=>t.getBoundingClientRect(),t=>{throw new Error(`Getting rbox of element "${t.node.nodeName}" is not possible`)}),i=new St(e);return t?i.transform(t.screenCTM().inverseO()):i.addOffset()},inside:function(t,e){const i=this.bbox();return t>i.x&&e>i.y&&t<i.x+i.width&&e<i.y+i.height},point:function(t,e){return new Tt(t,e).transformO(this.screenCTM().inverseO())},ctm:function(){return new qt(this.node.getCTM())},screenCTM:function(){if("function"==typeof this.isRoot&&!this.isRoot()){const t=this.rect(1,1),e=t.node.getScreenCTM();return t.remove(),new qt(e)}return new qt(this.node.getScreenCTM())}}),nt(Kt,"Element");const Zt={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(t,e){return"color"===e?t:t+"-"+e}};["fill","stroke"].forEach(function(t){const e={};let i;e[t]=function(e){if(void 0===e)return this.attr(t);if("string"==typeof e||e instanceof bt||bt.isRgb(e)||e instanceof Kt)this.attr(t,e);else for(i=Zt[t].length-1;i>=0;i--)null!=e[Zt[t][i]]&&this.attr(Zt.prefix(t,Zt[t][i]),e[Zt[t][i]]);return this},A(["Element","Runner"],e)}),A(["Element","Runner"],{matrix:function(t,e,i,n,s,o){return null==t?new qt(this):this.attr("transform",new qt(t,e,i,n,s,o))},rotate:function(t,e,i){return this.transform({rotate:t,ox:e,oy:i},!0)},skew:function(t,e,i,n){return 1===arguments.length||3===arguments.length?this.transform({skew:t,ox:e,oy:i},!0):this.transform({skew:[t,e],ox:i,oy:n},!0)},shear:function(t,e,i){return this.transform({shear:t,ox:e,oy:i},!0)},scale:function(t,e,i,n){return 1===arguments.length||3===arguments.length?this.transform({scale:t,ox:e,oy:i},!0):this.transform({scale:[t,e],ox:i,oy:n},!0)},translate:function(t,e){return this.transform({translate:[t,e]},!0)},relative:function(t,e){return this.transform({relative:[t,e]},!0)},flip:function(t="both",e="center"){return-1==="xybothtrue".indexOf(t)&&(e=t,t="both"),this.transform({flip:t,origin:e},!0)},opacity:function(t){return this.attr("opacity",t)}}),A("radius",{radius:function(t,e=t){return"radialGradient"===(this._element||this).type?this.attr("r",new Vt(t)):this.rx(t).ry(e)}}),A("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new Tt(this.node.getPointAtLength(t))}}),A(["Element","Runner"],{font:function(t,e){if("object"==typeof t){for(e in t)this.font(e,t[e]);return this}return"leading"===t?this.leading(e):"anchor"===t?this.attr("text-anchor",e):"size"===t||"family"===t||"weight"===t||"stretch"===t||"variant"===t||"style"===t?this.attr("font-"+t,e):this.attr(t,e)}});A("Element",["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel"].reduce(function(t,e){return t[e]=function(t){return null===t?this.off(e):this.on(e,t),this},t},{})),A("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){const t=(this.attr("transform")||"").split(pt).slice(0,-1).map(function(t){const e=t.trim().split("(");return[e[0],e[1].split(yt).map(function(t){return parseFloat(t)})]}).reverse().reduce(function(t,e){return"matrix"===e[0]?t.lmultiply(qt.fromArray(e[1])):t[e[0]].apply(t,e[1])},new qt);return t},toParent:function(t,e){if(this===t)return this;const i=this.screenCTM(),n=t.screenCTM().inverse();return this.addTo(t,e).untransform().transform(n.multiply(i)),this},toRoot:function(t){return this.toParent(this.root(),t)},transform:function(t,e){if(null==t||"string"==typeof t){const e=new qt(this).decompose();return null==t?e:e[t]}qt.isMatrixLike(t)||(t={...t,origin:U(t,this)});const i=new qt(!0===e?this:e||!1).transform(t);return this.attr("transform",i)}});class Qt extends Kt{flatten(t=this,e){return this.each(function(){if(this instanceof Qt)return this.flatten().ungroup()}),this}ungroup(t=this.parent(),e=t.index(this)){return e=-1===e?t.children().length:e,this.each(function(i,n){return n[n.length-i-1].toParent(t,e)}),this.remove()}}nt(Qt,"Container");class Jt extends Qt{constructor(t,e=t){super(tt("defs",t),e)}flatten(){return this}ungroup(){return this}}nt(Jt,"Defs");class te extends Kt{}function ee(t){return this.attr("rx",t)}function ie(t){return this.attr("ry",t)}function ne(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())}function se(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())}function oe(t){return this.attr("cx",t)}function re(t){return this.attr("cy",t)}function ae(t){return null==t?2*this.rx():this.rx(new Vt(t).divide(2))}function he(t){return null==t?2*this.ry():this.ry(new Vt(t).divide(2))}nt(te,"Shape");var le={__proto__:null,rx:ee,ry:ie,x:ne,y:se,cx:oe,cy:re,width:ae,height:he};class de extends te{constructor(t,e=t){super(tt("ellipse",t),e)}size(t,e){const i=H(this,t,e);return this.rx(new Vt(i.width).divide(2)).ry(new Vt(i.height).divide(2))}}at(de,le),A("Container",{ellipse:ht(function(t=0,e=t){return this.put(new de).size(t,e).move(0,0)})}),nt(de,"Ellipse");class ce extends Xt{constructor(t=j.document.createDocumentFragment()){super(t)}xml(t,e,i){if("boolean"==typeof t&&(i=e,e=t,t=null),null==t||"function"==typeof t){const t=new Xt(Q("wrapper",i));return t.add(this.node.cloneNode(!0)),t.xml(!1,i)}return super.xml(t,!1,i)}}function ue(t,e){return"radialGradient"===(this._element||this).type?this.attr({fx:new Vt(t),fy:new Vt(e)}):this.attr({x1:new Vt(t),y1:new Vt(e)})}function pe(t,e){return"radialGradient"===(this._element||this).type?this.attr({cx:new Vt(t),cy:new Vt(e)}):this.attr({x2:new Vt(t),y2:new Vt(e)})}nt(ce,"Fragment");var me,fe={__proto__:null,from:ue,to:pe};class ge extends Qt{constructor(t,e){super(tt(t+"Gradient","string"==typeof t?null:t),e)}attr(t,e,i){return"transform"===t&&(t="gradientTransform"),super.attr(t,e,i)}bbox(){return new St}targets(){return zt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}at(ge,fe),A({Container:{gradient(...t){return this.defs().gradient(...t)}},Defs:{gradient:ht(function(t,e){return this.put(new ge(t)).update(e)})}}),nt(ge,"Gradient");class xe extends Qt{constructor(t,e=t){super(tt("pattern",t),e)}attr(t,e,i){return"transform"===t&&(t="patternTransform"),super.attr(t,e,i)}bbox(){return new St}targets(){return zt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}A({Container:{pattern(...t){return this.defs().pattern(...t)}},Defs:{pattern:ht(function(t,e,i){return this.put(new xe).update(i).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})})}}),nt(xe,"Pattern");class we extends te{constructor(t,e=t){super(tt("image",t),e)}load(t,e){if(!t)return this;const i=new j.window.Image;return Pt(i,"load",function(t){const n=this.parent(xe);0===this.width()&&0===this.height()&&this.size(i.width,i.height),n instanceof xe&&0===n.width()&&0===n.height()&&n.size(this.width(),this.height()),"function"==typeof e&&e.call(this,t)},this),Pt(i,"load error",function(){Ht(i)}),this.attr("href",i.src=t,W)}}me=function(t,e,i){return"fill"!==t&&"stroke"!==t||vt.test(e)&&(e=i.root().defs().image(e)),e instanceof we&&(e=i.root().defs().pattern(0,0,t=>{t.add(e)})),e},jt.push(me),A({Container:{image:ht(function(t,e){return this.put(new we).size(0,0).load(t,e)})}}),nt(we,"Image");class ve extends Wt{bbox(){let t=-1/0,e=-1/0,i=1/0,n=1/0;return this.forEach(function(s){t=Math.max(s[0],t),e=Math.max(s[1],e),i=Math.min(s[0],i),n=Math.min(s[1],n)}),new St(i,n,t-i,e-n)}move(t,e){const i=this.bbox();if(t-=i.x,e-=i.y,!isNaN(t)&&!isNaN(e))for(let i=this.length-1;i>=0;i--)this[i]=[this[i][0]+t,this[i][1]+e];return this}parse(t=[0,0]){const e=[];(t=t instanceof Array?Array.prototype.concat.apply([],t):t.trim().split(yt).map(parseFloat)).length%2!=0&&t.pop();for(let i=0,n=t.length;i<n;i+=2)e.push([t[i],t[i+1]]);return e}size(t,e){let i;const n=this.bbox();for(i=this.length-1;i>=0;i--)n.width&&(this[i][0]=(this[i][0]-n.x)*t/n.width+n.x),n.height&&(this[i][1]=(this[i][1]-n.y)*e/n.height+n.y);return this}toLine(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}toString(){const t=[];for(let e=0,i=this.length;e<i;e++)t.push(this[e].join(","));return t.join(" ")}transform(t){return this.clone().transformO(t)}transformO(t){qt.isMatrixLike(t)||(t=new qt(t));for(let e=this.length;e--;){const[i,n]=this[e];this[e][0]=t.a*i+t.c*n+t.e,this[e][1]=t.b*i+t.d*n+t.f}return this}}var ye={__proto__:null,MorphArray:ve,x:function(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)},y:function(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)},width:function(t){const e=this.bbox();return null==t?e.width:this.size(t,e.height)},height:function(t){const e=this.bbox();return null==t?e.height:this.size(e.width,t)}};class _e extends te{constructor(t,e=t){super(tt("line",t),e)}array(){return new ve([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])}move(t,e){return this.attr(this.array().move(t,e).toLine())}plot(t,e,i,n){return null==t?this.array():(t=void 0!==e?{x1:t,y1:e,x2:i,y2:n}:new ve(t).toLine(),this.attr(t))}size(t,e){const i=H(this,t,e);return this.attr(this.array().size(i.width,i.height).toLine())}}at(_e,ye),A({Container:{line:ht(function(...t){return _e.prototype.plot.apply(this.put(new _e),null!=t[0]?t:[0,0,0,0])})}}),nt(_e,"Line");class Me extends Qt{constructor(t,e=t){super(tt("marker",t),e)}height(t){return this.attr("markerHeight",t)}orient(t){return this.attr("orient",t)}ref(t,e){return this.attr("refX",t).attr("refY",e)}toString(){return"url(#"+this.id()+")"}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}width(t){return this.attr("markerWidth",t)}}function Ee(t,e){return function(i){return null==i?this[t]:(this[t]=i,e&&e.call(this),this)}}A({Container:{marker(...t){return this.defs().marker(...t)}},Defs:{marker:ht(function(t,e,i){return this.put(new Me).size(t,e).ref(t/2,e/2).viewbox(0,0,t,e).attr("orient","auto").update(i)})},marker:{marker(t,e,i,n){let s=["marker"];return"all"!==t&&s.push(t),s=s.join("-"),t=arguments[1]instanceof Me?arguments[1]:this.defs().marker(e,i,n),this.attr(s,t)}}}),nt(Me,"Marker");const Ne={"-":function(t){return t},"<>":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)},bezier:function(t,e,i,n){return function(s){return s<0?t>0?e/t*s:i>0?n/i*s:0:s>1?i<1?(1-n)/(1-i)*s+(n-i)/(1-i):t<1?(1-e)/(1-t)*s+(e-t)/(1-t):1:3*s*(1-s)**2*e+3*s**2*(1-s)*n+s**3}},steps:function(t,e="end"){e=e.split("-").reverse()[0];let i=t;return"none"===e?--i:"both"===e&&++i,(n,s=!1)=>{let o=Math.floor(n*t);const r=n*o%1==0;return"start"!==e&&"both"!==e||++o,s&&r&&--o,n>=0&&o<0&&(o=0),n<=1&&o>i&&(o=i),o/i}}};class be{done(){return!1}}class Te extends be{constructor(t=$t.ease){super(),this.ease=Ne[t]||t}step(t,e,i){return"number"!=typeof t?i<1?t:e:t+(e-t)*this.ease(i)}}class Ce extends be{constructor(t){super(),this.stepper=t}done(t){return t.done}step(t,e,i,n){return this.stepper(t,e,i,n)}}function qe(){const t=(this._duration||500)/1e3,e=this._overshoot||0,i=Math.PI,n=Math.log(e/100+1e-10),s=-n/Math.sqrt(i*i+n*n),o=3.9/(s*t);this.d=2*s*o,this.k=o*o}at(class extends Ce{constructor(t=500,e=0){super(),this.duration(t).overshoot(e)}step(t,e,i,n){if("string"==typeof t)return t;if(n.done=i===1/0,i===1/0)return e;if(0===i)return t;i>100&&(i=16),i/=1e3;const s=n.velocity||0,o=-this.d*s-this.k*(t-e),r=t+s*i+o*i*i/2;return n.velocity=s+o*i,n.done=Math.abs(e-r)+Math.abs(s)<.002,n.done?e:r}},{duration:Ee("_duration",qe),overshoot:Ee("_overshoot",qe)});at(class extends Ce{constructor(t=.1,e=.01,i=0,n=1e3){super(),this.p(t).i(e).d(i).windup(n)}step(t,e,i,n){if("string"==typeof t)return t;if(n.done=i===1/0,i===1/0)return e;if(0===i)return t;const s=e-t;let o=(n.integral||0)+s*i;const r=(s-(n.error||0))/i,a=this._windup;return!1!==a&&(o=Math.max(-a,Math.min(o,a))),n.error=s,n.integral=o,n.done=Math.abs(s)<.001,n.done?e:t+(this.P*s+this.I*o+this.D*r)}},{windup:Ee("_windup"),p:Ee("P"),i:Ee("I"),d:Ee("D")});const Le={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},De={M:function(t,e,i){return e.x=i.x=t[0],e.y=i.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,e){return e.x=t[2],e.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,e){return e.x=t[0],e.y=t[1],["T",t[0],t[1]]},Z:function(t,e,i){return e.x=i.x,e.y=i.y,["Z"]},A:function(t,e){return e.x=t[5],e.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},Se="mlhvqtcsaz".split("");for(let t=0,e=Se.length;t<e;++t)De[Se[t]]=function(t){return function(e,i,n){if("H"===t)e[0]=e[0]+i.x;else if("V"===t)e[0]=e[0]+i.y;else if("A"===t)e[5]=e[5]+i.x,e[6]=e[6]+i.y;else for(let t=0,n=e.length;t<n;++t)e[t]=e[t]+(t%2?i.y:i.x);return De[t](e,i,n)}}(Se[t].toUpperCase());function Ae(t){return t.segment.length&&t.segment.length-1===Le[t.segment[0].toUpperCase()]}function ke(t,e){t.inNumber&&Re(t,!1);const i=_t.test(e);if(i)t.segment=[e];else{const e=t.lastCommand,i=e.toLowerCase(),n=e===i;t.segment=["m"===i?n?"l":"L":e]}return t.inSegment=!0,t.lastCommand=t.segment[0],i}function Re(t,e){if(!t.inNumber)throw new Error("Parser Error");t.number&&t.segment.push(parseFloat(t.number)),t.inNumber=e,t.number="",t.pointSeen=!1,t.hasExponent=!1,Ae(t)&&ze(t)}function ze(t){t.inSegment=!1,t.absolute&&(t.segment=function(t){const e=t.segment[0];return De[e](t.segment.slice(1),t.p,t.p0)}(t)),t.segments.push(t.segment)}function Oe(t){if(!t.segment.length)return!1;const e="A"===t.segment[0].toUpperCase(),i=t.segment.length;return e&&(4===i||5===i)}function Ie(t){return"E"===t.lastToken.toUpperCase()}class Fe extends Wt{bbox(){return Lt().path.setAttribute("d",this.toString()),new St(Lt.nodes.path.getBBox())}move(t,e){const i=this.bbox();if(t-=i.x,e-=i.y,!isNaN(t)&&!isNaN(e))for(let i,n=this.length-1;n>=0;n--)i=this[n][0],"M"===i||"L"===i||"T"===i?(this[n][1]+=t,this[n][2]+=e):"H"===i?this[n][1]+=t:"V"===i?this[n][1]+=e:"C"===i||"S"===i||"Q"===i?(this[n][1]+=t,this[n][2]+=e,this[n][3]+=t,this[n][4]+=e,"C"===i&&(this[n][5]+=t,this[n][6]+=e)):"A"===i&&(this[n][6]+=t,this[n][7]+=e);return this}parse(t="M0 0"){return Array.isArray(t)&&(t=Array.prototype.concat.apply([],t).toString()),function(t,e=!0){let i=0,n="";const s={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:e,p0:new Tt,p:new Tt};for(;s.lastToken=n,n=t.charAt(i++);)if(s.inSegment||!ke(s,n))if("."!==n)if(isNaN(parseInt(n)))if(" "!==n&&","!==n)if("-"!==n)if("E"!==n.toUpperCase()){if(_t.test(n)){if(s.inNumber)Re(s,!1);else{if(!Ae(s))throw new Error("parser Error");ze(s)}--i}}else s.number+=n,s.hasExponent=!0;else{if(s.inNumber&&!Ie(s)){Re(s,!1),--i;continue}s.number+=n,s.inNumber=!0}else s.inNumber&&Re(s,!1);else{if("0"===s.number||Oe(s)){s.inNumber=!0,s.number=n,Re(s,!0);continue}s.inNumber=!0,s.number+=n}else{if(s.pointSeen||s.hasExponent){Re(s,!1),--i;continue}s.inNumber=!0,s.pointSeen=!0,s.number+=n}return s.inNumber&&Re(s,!1),s.inSegment&&Ae(s)&&ze(s),s.segments}(t)}size(t,e){const i=this.bbox();let n,s;for(i.width=0===i.width?1:i.width,i.height=0===i.height?1:i.height,n=this.length-1;n>=0;n--)s=this[n][0],"M"===s||"L"===s||"T"===s?(this[n][1]=(this[n][1]-i.x)*t/i.width+i.x,this[n][2]=(this[n][2]-i.y)*e/i.height+i.y):"H"===s?this[n][1]=(this[n][1]-i.x)*t/i.width+i.x:"V"===s?this[n][1]=(this[n][1]-i.y)*e/i.height+i.y:"C"===s||"S"===s||"Q"===s?(this[n][1]=(this[n][1]-i.x)*t/i.width+i.x,this[n][2]=(this[n][2]-i.y)*e/i.height+i.y,this[n][3]=(this[n][3]-i.x)*t/i.width+i.x,this[n][4]=(this[n][4]-i.y)*e/i.height+i.y,"C"===s&&(this[n][5]=(this[n][5]-i.x)*t/i.width+i.x,this[n][6]=(this[n][6]-i.y)*e/i.height+i.y)):"A"===s&&(this[n][1]=this[n][1]*t/i.width,this[n][2]=this[n][2]*e/i.height,this[n][6]=(this[n][6]-i.x)*t/i.width+i.x,this[n][7]=(this[n][7]-i.y)*e/i.height+i.y);return this}toString(){return function(t){let e="";for(let i=0,n=t.length;i<n;i++)e+=t[i][0],null!=t[i][1]&&(e+=t[i][1],null!=t[i][2]&&(e+=" ",e+=t[i][2],null!=t[i][3]&&(e+=" ",e+=t[i][3],e+=" ",e+=t[i][4],null!=t[i][5]&&(e+=" ",e+=t[i][5],e+=" ",e+=t[i][6],null!=t[i][7]&&(e+=" ",e+=t[i][7])))));return e+" "}(this)}}const Be=t=>{const e=typeof t;return"number"===e?Vt:"string"===e?bt.isColor(t)?bt:yt.test(t)?_t.test(t)?Fe:Wt:lt.test(t)?Vt:He:Ye.indexOf(t.constructor)>-1?t.constructor:Array.isArray(t)?Wt:"object"===e?$e:He};class Pe{constructor(t){this._stepper=t||new Te("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}at(t){return this._morphObj.morph(this._from,this._to,t,this._stepper,this._context)}done(){return this._context.map(this._stepper.done).reduce(function(t,e){return t&&e},!0)}from(t){return null==t?this._from:(this._from=this._set(t),this)}stepper(t){return null==t?this._stepper:(this._stepper=t,this)}to(t){return null==t?this._to:(this._to=this._set(t),this)}type(t){return null==t?this._type:(this._type=t,this)}_set(t){this._type||this.type(Be(t));let e=new this._type(t);return this._type===bt&&(e=this._to?e[this._to[4]]():this._from?e[this._from[4]]():e),this._type===$e&&(e=this._to?e.align(this._to):this._from?e.align(this._from):e),e=e.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(e.length)).map(Object).map(function(t){return t.done=!0,t}),e}}class He{constructor(...t){this.init(...t)}init(t){return t=Array.isArray(t)?t[0]:t,this.value=t,this}toArray(){return[this.value]}valueOf(){return this.value}}class Ue{constructor(...t){this.init(...t)}init(t){return Array.isArray(t)&&(t={scaleX:t[0],scaleY:t[1],shear:t[2],rotate:t[3],translateX:t[4],translateY:t[5],originX:t[6],originY:t[7]}),Object.assign(this,Ue.defaults,t),this}toArray(){const t=this;return[t.scaleX,t.scaleY,t.shear,t.rotate,t.translateX,t.translateY,t.originX,t.originY]}}Ue.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const Ge=(t,e)=>t[0]<e[0]?-1:t[0]>e[0]?1:0;class $e{constructor(...t){this.init(...t)}align(t){const e=this.values;for(let i=0,n=e.length;i<n;++i){if(e[i+1]===t[i+1]){if(e[i+1]===bt&&t[i+7]!==e[i+7]){const e=t[i+7],n=new bt(this.values.splice(i+3,5))[e]().toArray();this.values.splice(i+3,0,...n)}i+=e[i+2]+2;continue}if(!t[i+1])return this;const n=(new t[i+1]).toArray(),s=e[i+2]+3;e.splice(i,s,t[i],t[i+1],t[i+2],...n),i+=e[i+2]+2}return this}init(t){if(this.values=[],Array.isArray(t))return void(this.values=t.slice());t=t||{};const e=[];for(const i in t){const n=Be(t[i]),s=new n(t[i]).toArray();e.push([i,n,s.length,...s])}return e.sort(Ge),this.values=e.reduce((t,e)=>t.concat(e),[]),this}toArray(){return this.values}valueOf(){const t={},e=this.values;for(;e.length;){const i=e.shift(),n=e.shift(),s=e.shift(),o=e.splice(0,s);t[i]=new n(o)}return t}}const Ye=[He,Ue,$e];class We extends te{constructor(t,e=t){super(tt("path",t),e)}array(){return this._array||(this._array=new Fe(this.attr("d")))}clear(){return delete this._array,this}height(t){return null==t?this.bbox().height:this.size(this.bbox().width,t)}move(t,e){return this.attr("d",this.array().move(t,e))}plot(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new Fe(t))}size(t,e){const i=H(this,t,e);return this.attr("d",this.array().size(i.width,i.height))}width(t){return null==t?this.bbox().width:this.size(t,this.bbox().height)}x(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}y(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}}We.prototype.MorphArray=Fe,A({Container:{path:ht(function(t){return this.put(new We).plot(t||new Fe)})}}),nt(We,"Path");var Ve={__proto__:null,array:function(){return this._array||(this._array=new ve(this.attr("points")))},clear:function(){return delete this._array,this},move:function(t,e){return this.attr("points",this.array().move(t,e))},plot:function(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new ve(t))},size:function(t,e){const i=H(this,t,e);return this.attr("points",this.array().size(i.width,i.height))}};class je extends te{constructor(t,e=t){super(tt("polygon",t),e)}}A({Container:{polygon:ht(function(t){return this.put(new je).plot(t||new ve)})}}),at(je,ye),at(je,Ve),nt(je,"Polygon");class Xe extends te{constructor(t,e=t){super(tt("polyline",t),e)}}A({Container:{polyline:ht(function(t){return this.put(new Xe).plot(t||new ve)})}}),at(Xe,ye),at(Xe,Ve),nt(Xe,"Polyline");class Ke extends te{constructor(t,e=t){super(tt("rect",t),e)}}at(Ke,{rx:ee,ry:ie}),A({Container:{rect:ht(function(t,e){return this.put(new Ke).size(t,e)})}}),nt(Ke,"Rect");class Ze{constructor(){this._first=null,this._last=null}first(){return this._first&&this._first.value}last(){return this._last&&this._last.value}push(t){const e=void 0!==t.next?t:{value:t,next:null,prev:null};return this._last?(e.prev=this._last,this._last.next=e,this._last=e):(this._last=e,this._first=e),e}remove(t){t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t===this._last&&(this._last=t.prev),t===this._first&&(this._first=t.next),t.prev=null,t.next=null}shift(){const t=this._first;return t?(this._first=t.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,t.value):null}}const Qe={nextDraw:null,frames:new Ze,timeouts:new Ze,immediates:new Ze,timer:()=>j.window.performance||j.window.Date,transforms:[],frame(t){const e=Qe.frames.push({run:t});return null===Qe.nextDraw&&(Qe.nextDraw=j.window.requestAnimationFrame(Qe._draw)),e},timeout(t,e){e=e||0;const i=Qe.timer().now()+e,n=Qe.timeouts.push({run:t,time:i});return null===Qe.nextDraw&&(Qe.nextDraw=j.window.requestAnimationFrame(Qe._draw)),n},immediate(t){const e=Qe.immediates.push(t);return null===Qe.nextDraw&&(Qe.nextDraw=j.window.requestAnimationFrame(Qe._draw)),e},cancelFrame(t){null!=t&&Qe.frames.remove(t)},clearTimeout(t){null!=t&&Qe.timeouts.remove(t)},cancelImmediate(t){null!=t&&Qe.immediates.remove(t)},_draw(t){let e=null;const i=Qe.timeouts.last();for(;(e=Qe.timeouts.shift())&&(t>=e.time?e.run():Qe.timeouts.push(e),e!==i););let n=null;const s=Qe.frames.last();for(;n!==s&&(n=Qe.frames.shift());)n.run(t);let o=null;for(;o=Qe.immediates.shift();)o();Qe.nextDraw=Qe.timeouts.first()||Qe.frames.first()?j.window.requestAnimationFrame(Qe._draw):null}},Je=function(t){const e=t.start,i=t.runner.duration();return{start:e,duration:i,end:e+i,runner:t.runner}},ti=function(){const t=j.window;return(t.performance||t.Date).now()};class ei extends Ut{constructor(t=ti){super(),this._timeSource=t,this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}active(){return!!this._nextFrame}finish(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}getEndTime(){const t=this.getLastRunnerInfo(),e=t?t.runner.duration():0;return(t?t.start:this._time)+e}getEndTimeOfTimeline(){const t=this._runners.map(t=>t.start+t.runner.duration());return Math.max(0,...t)}getLastRunnerInfo(){return this.getRunnerInfoById(this._lastRunnerId)}getRunnerInfoById(t){return this._runners[this._runnerIds.indexOf(t)]||null}pause(){return this._paused=!0,this._continue()}persist(t){return null==t?this._persist:(this._persist=t,this)}play(){return this._paused=!1,this.updateTime()._continue()}reverse(t){const e=this.speed();if(null==t)return this.speed(-e);const i=Math.abs(e);return this.speed(t?-i:i)}schedule(t,e,i){if(null==t)return this._runners.map(Je);let n=0;const s=this.getEndTime();if(e=e||0,null==i||"last"===i||"after"===i)n=s;else if("absolute"===i||"start"===i)n=e,e=0;else if("now"===i)n=this._time;else if("relative"===i){const i=this.getRunnerInfoById(t.id);i&&(n=i.start+e,e=0)}else{if("with-last"!==i)throw new Error('Invalid value for the "when" parameter');{const t=this.getLastRunnerInfo();n=t?t.start:this._time}}t.unschedule(),t.timeline(this);const o=t.persist(),r={persist:null===o?this._persist:o,start:n+e,runner:t};return this._lastRunnerId=t.id,this._runners.push(r),this._runners.sort((t,e)=>t.start-e.start),this._runnerIds=this._runners.map(t=>t.runner.id),this.updateTime()._continue(),this}seek(t){return this.time(this._time+t)}source(t){return null==t?this._timeSource:(this._timeSource=t,this)}speed(t){return null==t?this._speed:(this._speed=t,this)}stop(){return this.time(0),this.pause()}time(t){return null==t?this._time:(this._time=t,this._continue(!0))}unschedule(t){const e=this._runnerIds.indexOf(t.id);return e<0||(this._runners.splice(e,1),this._runnerIds.splice(e,1),t.timeline(null)),this}updateTime(){return this.active()||(this._lastSourceTime=this._timeSource()),this}_continue(t=!1){return Qe.cancelFrame(this._nextFrame),this._nextFrame=null,t?this._stepImmediate():(this._paused||(this._nextFrame=Qe.frame(this._step)),this)}_stepFn(t=!1){const e=this._timeSource();let i=e-this._lastSourceTime;t&&(i=0);const n=this._speed*i+(this._time-this._lastStepTime);this._lastSourceTime=e,t||(this._time+=n,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(let t=this._runners.length;t--;){const e=this._runners[t],i=e.runner;this._time-e.start<=0&&i.reset()}let s=!1;for(let t=0,e=this._runners.length;t<e;t++){const i=this._runners[t],o=i.runner;let r=n;const a=this._time-i.start;if(a<=0){s=!0;continue}if(a<r&&(r=a),!o.active())continue;if(o.step(r).done){if(!0!==i.persist){o.duration()-o.time()+this._time+i.persist<this._time&&(o.unschedule(),--t,--e)}}else s=!0}return s&&!(this._speed<0&&0===this._time)||this._runnerIds.length&&this._speed<0&&this._time>0?this._continue():(this.pause(),this.fire("finished")),this}}A({Element:{timeline:function(t){return null==t?(this._timeline=this._timeline||new ei,this._timeline):(this._timeline=t,this)}}});class ii extends Ut{constructor(t){super(),this.id=ii.id++,t="function"==typeof(t=t??$t.duration)?new Ce(t):t,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration="number"==typeof t&&t,this._isDeclarative=t instanceof Ce,this._stepper=this._isDeclarative?t:new Te,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new qt,this.transformId=1,this._haveReversed=!1,this._reverse=!1,this._loopsDone=0,this._swing=!1,this._wait=0,this._times=1,this._frameId=null,this._persist=!!this._isDeclarative||null}static sanitise(t,e,i){let n=1,s=!1,o=0;return e=e||$t.delay,i=i||"last","object"!=typeof(t=t||$t.duration)||t instanceof be||(e=t.delay||e,i=t.when||i,s=t.swing||s,n=t.times||n,o=t.wait||o,t=t.duration||$t.duration),{duration:t,delay:e,swing:s,times:n,wait:o,when:i}}active(t){return null==t?this.enabled:(this.enabled=t,this)}addTransform(t,e){return this.transforms.lmultiplyO(t),this}after(t){return this.on("finished",t)}animate(t,e,i){const n=ii.sanitise(t,e,i),s=new ii(n.duration);return this._timeline&&s.timeline(this._timeline),this._element&&s.element(this._element),s.loop(n).schedule(n.delay,n.when)}clearTransform(){return this.transforms=new qt,this}clearTransformsFromQueue(){this.done&&this._timeline&&this._timeline._runnerIds.includes(this.id)||(this._queue=this._queue.filter(t=>!t.isTransform))}delay(t){return this.animate(0,t)}duration(){return this._times*(this._wait+this._duration)-this._wait}during(t){return this.queue(null,t)}ease(t){return this._stepper=new Te(t),this}element(t){return null==t?this._element:(this._element=t,t._prepareRunner(),this)}finish(){return this.step(1/0)}loop(t,e,i){return"object"==typeof t&&(e=t.swing,i=t.wait,t=t.times),this._times=t||1/0,this._swing=e||!1,this._wait=i||0,!0===this._times&&(this._times=1/0),this}loops(t){const e=this._duration+this._wait;if(null==t){const t=Math.floor(this._time/e),i=(this._time-t*e)/this._duration;return Math.min(t+i,this._times)}const i=t%1,n=e*Math.floor(t)+this._duration*i;return this.time(n)}persist(t){return null==t?this._persist:(this._persist=t,this)}position(t){const e=this._time,i=this._duration,n=this._wait,s=this._times,o=this._swing,r=this._reverse;let a;if(null==t){const t=function(t){const e=o*Math.floor(t%(2*(n+i))/(n+i)),s=e&&!r||!e&&r,a=Math.pow(-1,s)*(t%(n+i))/i+s;return Math.max(Math.min(a,1),0)},h=s*(n+i)-n;return a=e<=0?Math.round(t(1e-5)):e<h?t(e):Math.round(t(h-1e-5)),a}const h=Math.floor(this.loops()),l=o&&h%2==0;return a=h+(l&&!r||r&&l?t:1-t),this.loops(a)}progress(t){return null==t?Math.min(1,this._time/this.duration()):this.time(t*this.duration())}queue(t,e,i,n){this._queue.push({initialiser:t||Gt,runner:e||Gt,retarget:i,isTransform:n,initialised:!1,finished:!1});return this.timeline()&&this.timeline()._continue(),this}reset(){return this._reseted||(this.time(0),this._reseted=!0),this}reverse(t){return this._reverse=t??!this._reverse,this}schedule(t,e,i){if(t instanceof ei||(i=e,e=t,t=this.timeline()),!t)throw Error("Runner cannot be scheduled without timeline");return t.schedule(this,e,i),this}step(t){if(!this.enabled)return this;t=t??16,this._time+=t;const e=this.position(),i=this._lastPosition!==e&&this._time>=0;this._lastPosition=e;const n=this.duration(),s=this._lastTime<=0&&this._time>0,o=this._lastTime<n&&this._time>=n;this._lastTime=this._time,s&&this.fire("start",this);const r=this._isDeclarative;this.done=!r&&!o&&this._time>=n,this._reseted=!1;let a=!1;return(i||r)&&(this._initialise(i),this.transforms=new qt,a=this._run(r?t:e),this.fire("step",this)),this.done=this.done||a&&r,o&&this.fire("finished",this),this}time(t){if(null==t)return this._time;const e=t-this._time;return this.step(e),this}timeline(t){return void 0===t?this._timeline:(this._timeline=t,this)}unschedule(){const t=this.timeline();return t&&t.unschedule(this),this}_initialise(t){if(t||this._isDeclarative)for(let e=0,i=this._queue.length;e<i;++e){const i=this._queue[e],n=this._isDeclarative||!i.initialised&&t;t=!i.finished,n&&t&&(i.initialiser.call(this),i.initialised=!0)}}_rememberMorpher(t,e){if(this._history[t]={morpher:e,caller:this._queue[this._queue.length-1]},this._isDeclarative){const t=this.timeline();t&&t.play()}}_run(t){let e=!0;for(let i=0,n=this._queue.length;i<n;++i){const n=this._queue[i],s=n.runner.call(this,t);n.finished=n.finished||!0===s,e=e&&n.finished}return e}_tryRetarget(t,e,i){if(this._history[t]){if(!this._history[t].caller.initialised){const e=this._queue.indexOf(this._history[t].caller);return this._queue.splice(e,1),!1}this._history[t].caller.retarget?this._history[t].caller.retarget.call(this,e,i):this._history[t].morpher.to(e),this._history[t].caller.finished=!1;const n=this.timeline();return n&&n.play(),!0}return!1}}ii.id=0;class ni{constructor(t=new qt,e=-1,i=!0){this.transforms=t,this.id=e,this.done=i}clearTransformsFromQueue(){}}at([ii,ni],{mergeWith(t){return new ni(t.transforms.lmultiply(this.transforms),t.id)}});const si=(t,e)=>t.lmultiplyO(e),oi=t=>t.transforms;function ri(){const t=this._transformationRunners.runners.map(oi).reduce(si,new qt);this.transform(t),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}class ai{constructor(){this.runners=[],this.ids=[]}add(t){if(this.runners.includes(t))return;const e=t.id+1;return this.runners.push(t),this.ids.push(e),this}clearBefore(t){const e=this.ids.indexOf(t+1)||1;return this.ids.splice(0,e,0),this.runners.splice(0,e,new ni).forEach(t=>t.clearTransformsFromQueue()),this}edit(t,e){const i=this.ids.indexOf(t+1);return this.ids.splice(i,1,t+1),this.runners.splice(i,1,e),this}getByID(t){return this.runners[this.ids.indexOf(t+1)]}length(){return this.ids.length}merge(){let t=null;for(let e=0;e<this.runners.length;++e){const i=this.runners[e];if(t&&i.done&&t.done&&(!i._timeline||!i._timeline._runnerIds.includes(i.id))&&(!t._timeline||!t._timeline._runnerIds.includes(t.id))){this.remove(i.id);const n=i.mergeWith(t);this.edit(t.id,n),t=n,--e}else t=i}return this}remove(t){const e=this.ids.indexOf(t+1);return this.ids.splice(e,1),this.runners.splice(e,1),this}}A({Element:{animate(t,e,i){const n=ii.sanitise(t,e,i),s=this.timeline();return new ii(n.duration).loop(n).element(this).timeline(s.play()).schedule(n.delay,n.when)},delay(t,e){return this.animate(0,t,e)},_clearTransformRunnersBefore(t){this._transformationRunners.clearBefore(t.id)},_currentTransform(t){return this._transformationRunners.runners.filter(e=>e.id<=t.id).map(oi).reduce(si,new qt)},_addRunner(t){this._transformationRunners.add(t),Qe.cancelImmediate(this._frameId),this._frameId=Qe.immediate(ri.bind(this))},_prepareRunner(){null==this._frameId&&(this._transformationRunners=(new ai).add(new ni(new qt(this))))}}});at(ii,{attr(t,e){return this.styleAttr("attr",t,e)},css(t,e){return this.styleAttr("css",t,e)},styleAttr(t,e,i){if("string"==typeof e)return this.styleAttr(t,{[e]:i});let n=e;if(this._tryRetarget(t,n))return this;let s=new Pe(this._stepper).to(n),o=Object.keys(n);return this.queue(function(){s=s.from(this.element()[t](o))},function(e){return this.element()[t](s.at(e).valueOf()),s.done()},function(e){const i=Object.keys(e),r=(a=o,i.filter(t=>!a.includes(t)));var a;if(r.length){const e=this.element()[t](r),i=new $e(s.from()).valueOf();Object.assign(i,e),s.from(i)}const h=new $e(s.to()).valueOf();Object.assign(h,e),s.to(h),o=i,n=e}),this._rememberMorpher(t,s),this},zoom(t,e){if(this._tryRetarget("zoom",t,e))return this;let i=new Pe(this._stepper).to(new Vt(t));return this.queue(function(){i=i.from(this.element().zoom())},function(t){return this.element().zoom(i.at(t),e),i.done()},function(t,n){e=n,i.to(t)}),this._rememberMorpher("zoom",i),this},transform(t,e,i){if(e=t.relative||e,this._isDeclarative&&!e&&this._tryRetarget("transform",t))return this;const n=qt.isMatrixLike(t);i=null!=t.affine?t.affine:null!=i?i:!n;const s=new Pe(this._stepper).type(i?Ue:qt);let o,r,a,h,l;return this.queue(function(){r=r||this.element(),o=o||U(t,r),l=new qt(e?void 0:r),r._addRunner(this),e||r._clearTransformRunnersBefore(this)},function(d){e||this.clearTransform();const{x:c,y:u}=new Tt(o).transform(r._currentTransform(this));let p=new qt({...t,origin:[c,u]}),m=this._isDeclarative&&a?a:l;if(i){p=p.decompose(c,u),m=m.decompose(c,u);const t=p.rotate,e=m.rotate,i=[t-360,t,t+360],n=i.map(t=>Math.abs(t-e)),s=Math.min(...n),o=n.indexOf(s);p.rotate=i[o]}e&&(n||(p.rotate=t.rotate||0),this._isDeclarative&&h&&(m.rotate=h)),s.from(m),s.to(p);const f=s.at(d);return h=f.rotate,a=new qt(f),this.addTransform(a),r._addRunner(this),s.done()},function(e){(e.origin||"center").toString()!==(t.origin||"center").toString()&&(o=U(e,r)),t={...e,origin:o}},!0),this._isDeclarative&&this._rememberMorpher("transform",s),this},x(t,e){return this._queueNumber("x",t)},y(t){return this._queueNumber("y",t)},dx(t=0){return this._queueNumberDelta("x",t)},dy(t=0){return this._queueNumberDelta("y",t)},dmove(t,e){return this.dx(t).dy(e)},_queueNumberDelta(t,e){if(e=new Vt(e),this._tryRetarget(t,e))return this;const i=new Pe(this._stepper).to(e);let n=null;return this.queue(function(){n=this.element()[t](),i.from(n),i.to(n+e)},function(e){return this.element()[t](i.at(e)),i.done()},function(t){i.to(n+new Vt(t))}),this._rememberMorpher(t,i),this},_queueObject(t,e){if(this._tryRetarget(t,e))return this;const i=new Pe(this._stepper).to(e);return this.queue(function(){i.from(this.element()[t]())},function(e){return this.element()[t](i.at(e)),i.done()}),this._rememberMorpher(t,i),this},_queueNumber(t,e){return this._queueObject(t,new Vt(e))},cx(t){return this._queueNumber("cx",t)},cy(t){return this._queueNumber("cy",t)},move(t,e){return this.x(t).y(e)},center(t,e){return this.cx(t).cy(e)},size(t,e){let i;return t&&e||(i=this._element.bbox()),t||(t=i.width/i.height*e),e||(e=i.height/i.width*t),this.width(t).height(e)},width(t){return this._queueNumber("width",t)},height(t){return this._queueNumber("height",t)},plot(t,e,i,n){if(4===arguments.length)return this.plot([t,e,i,n]);if(this._tryRetarget("plot",t))return this;const s=new Pe(this._stepper).type(this._element.MorphArray).to(t);return this.queue(function(){s.from(this._element.array())},function(t){return this._element.plot(s.at(t)),s.done()}),this._rememberMorpher("plot",s),this},leading(t){return this._queueNumber("leading",t)},viewbox(t,e,i,n){return this._queueObject("viewbox",new St(t,e,i,n))},update(t){return"object"!=typeof t?this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]}):(null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",t.offset),this)}}),at(ii,{rx:ee,ry:ie,from:ue,to:pe}),nt(ii,"Runner");class hi extends Qt{constructor(t,e=t){super(tt("svg",t),e),this.namespace()}defs(){return this.isRoot()?et(this.node.querySelector("defs"))||this.put(new Jt):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof j.window.SVGElement)&&"#document-fragment"!==this.node.parentNode.nodeName}namespace(){return this.isRoot()?this.attr({xmlns:G,version:"1.1"}).attr("xmlns:xlink",W,Y).attr("xmlns:svgjs",V,Y):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,Y).attr("xmlns:svgjs",null,Y)}root(){return this.isRoot()?this:super.root()}}A({Container:{nested:ht(function(){return this.put(new hi)})}}),nt(hi,"Svg",!0);class li extends Qt{constructor(t,e=t){super(tt("symbol",t),e)}}A({Container:{symbol:ht(function(){return this.put(new li)})}}),nt(li,"Symbol");var di={__proto__:null,plain:function(t){return!1===this._build&&this.clear(),this.node.appendChild(j.document.createTextNode(t)),this},length:function(){return this.node.getComputedTextLength()},x:function(t,e=this.bbox()){return null==t?e.x:this.attr("x",this.attr("x")+t-e.x)},y:function(t,e=this.bbox()){return null==t?e.y:this.attr("y",this.attr("y")+t-e.y)},move:function(t,e,i=this.bbox()){return this.x(t,i).y(e,i)},cx:function(t,e=this.bbox()){return null==t?e.cx:this.attr("x",this.attr("x")+t-e.cx)},cy:function(t,e=this.bbox()){return null==t?e.cy:this.attr("y",this.attr("y")+t-e.cy)},center:function(t,e,i=this.bbox()){return this.cx(t,i).cy(e,i)},ax:function(t){return this.attr("x",t)},ay:function(t){return this.attr("y",t)},amove:function(t,e){return this.ax(t).ay(e)},build:function(t){return this._build=!!t,this}};class ci extends te{constructor(t,e=t){super(tt("text",t),e),this.dom.leading=new Vt(1.3),this._rebuild=!0,this._build=!1}leading(t){return null==t?this.dom.leading:(this.dom.leading=new Vt(t),this.rebuild())}rebuild(t){if("boolean"==typeof t&&(this._rebuild=t),this._rebuild){const t=this;let e=0;const i=this.dom.leading;this.each(function(n){const s=j.window.getComputedStyle(this.node).getPropertyValue("font-size"),o=i*new Vt(s);this.dom.newLined&&(this.attr("x",t.attr("x")),"\n"===this.text()?e+=o:(this.attr("dy",n?o+e:0),e=0))}),this.fire("rebuild")}return this}setData(t){return this.dom=t,this.dom.leading=new Vt(t.leading||1.3),this}text(t){if(void 0===t){const e=this.node.childNodes;let i=0;t="";for(let n=0,s=e.length;n<s;++n)"textPath"!==e[n].nodeName?(n!==i&&3!==e[n].nodeType&&!0===et(e[n]).dom.newLined&&(t+="\n"),t+=e[n].textContent):0===n&&(i=1);return t}if(this.clear().build(!0),"function"==typeof t)t.call(this,this);else for(let e=0,i=(t=(t+"").split("\n")).length;e<i;e++)this.newLine(t[e]);return this.build(!1).rebuild()}}at(ci,di),A({Container:{text:ht(function(t=""){return this.put(new ci).text(t)}),plain:ht(function(t=""){return this.put(new ci).plain(t)})}}),nt(ci,"Text");class ui extends te{constructor(t,e=t){super(tt("tspan",t),e),this._build=!1}dx(t){return this.attr("dx",t)}dy(t){return this.attr("dy",t)}newLine(){this.dom.newLined=!0;const t=this.parent();if(!(t instanceof ci))return this;const e=t.index(this),i=j.window.getComputedStyle(this.node).getPropertyValue("font-size"),n=t.dom.leading*new Vt(i);return this.dy(e?n:0).attr("x",t.x())}text(t){return null==t?this.node.textContent+(this.dom.newLined?"\n":""):("function"==typeof t?(this.clear().build(!0),t.call(this,this),this.build(!1)):this.plain(t),this)}}at(ui,di),A({Tspan:{tspan:ht(function(t=""){const e=new ui;return this._build||this.clear(),this.put(e).text(t)})},Text:{newLine:function(t=""){return this.tspan(t).newLine()}}}),nt(ui,"Tspan");class pi extends te{constructor(t,e=t){super(tt("circle",t),e)}radius(t){return this.attr("r",t)}rx(t){return this.attr("r",t)}ry(t){return this.rx(t)}size(t){return this.radius(new Vt(t).divide(2))}}at(pi,{x:ne,y:se,cx:oe,cy:re,width:ae,height:he}),A({Container:{circle:ht(function(t=0){return this.put(new pi).size(t).move(0,0)})}}),nt(pi,"Circle");class mi extends Qt{constructor(t,e=t){super(tt("clipPath",t),e)}remove(){return this.targets().forEach(function(t){t.unclip()}),super.remove()}targets(){return zt("svg [clip-path*="+this.id()+"]")}}A({Container:{clip:ht(function(){return this.defs().put(new mi)})},Element:{clipper(){return this.reference("clip-path")},clipWith(t){const e=t instanceof mi?t:this.parent().clip().add(t);return this.attr("clip-path","url(#"+e.id()+")")},unclip(){return this.attr("clip-path",null)}}}),nt(mi,"ClipPath");class fi extends Kt{constructor(t,e=t){super(tt("foreignObject",t),e)}}A({Container:{foreignObject:ht(function(t,e){return this.put(new fi).size(t,e)})}}),nt(fi,"ForeignObject");var gi={__proto__:null,dmove:function(t,e){return this.children().forEach((i,n)=>{let s;try{s=i.bbox()}catch(t){return}const o=new qt(i),r=o.translate(t,e).transform(o.inverse()),a=new Tt(s.x,s.y).transform(r);i.move(a.x,a.y)}),this},dx:function(t){return this.dmove(t,0)},dy:function(t){return this.dmove(0,t)},height:function(t,e=this.bbox()){return null==t?e.height:this.size(e.width,t,e)},move:function(t=0,e=0,i=this.bbox()){const n=t-i.x,s=e-i.y;return this.dmove(n,s)},size:function(t,e,i=this.bbox()){const n=H(this,t,e,i),s=n.width/i.width,o=n.height/i.height;return this.children().forEach((t,e)=>{const n=new Tt(i).transform(new qt(t).inverse());t.scale(s,o,n.x,n.y)}),this},width:function(t,e=this.bbox()){return null==t?e.width:this.size(t,e.height,e)},x:function(t,e=this.bbox()){return null==t?e.x:this.move(t,e.y,e)},y:function(t,e=this.bbox()){return null==t?e.y:this.move(e.x,t,e)}};class xi extends Qt{constructor(t,e=t){super(tt("g",t),e)}}at(xi,gi),A({Container:{group:ht(function(){return this.put(new xi)})}}),nt(xi,"G");class wi extends Qt{constructor(t,e=t){super(tt("a",t),e)}target(t){return this.attr("target",t)}to(t){return this.attr("href",t,W)}}at(wi,gi),A({Container:{link:ht(function(t){return this.put(new wi).to(t)})},Element:{unlink(){const t=this.linker();if(!t)return this;const e=t.parent();if(!e)return this.remove();const i=e.index(t);return e.add(this,i),t.remove(),this},linkTo(t){let e=this.linker();return e||(e=new wi,this.wrap(e)),"function"==typeof t?t.call(e,e):e.to(t),this},linker(){const t=this.parent();return t&&"a"===t.node.nodeName.toLowerCase()?t:null}}}),nt(wi,"A");class vi extends Qt{constructor(t,e=t){super(tt("mask",t),e)}remove(){return this.targets().forEach(function(t){t.unmask()}),super.remove()}targets(){return zt("svg [mask*="+this.id()+"]")}}A({Container:{mask:ht(function(){return this.defs().put(new vi)})},Element:{masker(){return this.reference("mask")},maskWith(t){const e=t instanceof vi?t:this.parent().mask().add(t);return this.attr("mask","url(#"+e.id()+")")},unmask(){return this.attr("mask",null)}}}),nt(vi,"Mask");class yi extends Kt{constructor(t,e=t){super(tt("stop",t),e)}update(t){return("number"==typeof t||t instanceof Vt)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",new Vt(t.offset)),this}}A({Gradient:{stop:function(t,e,i){return this.put(new yi).update(t,e,i)}}}),nt(yi,"Stop");class _i extends Kt{constructor(t,e=t){super(tt("style",t),e)}addText(t=""){return this.node.textContent+=t,this}font(t,e,i={}){return this.rule("@font-face",{fontFamily:t,src:e,...i})}rule(t,e){return this.addText(function(t,e){if(!t)return"";if(!e)return t;let i=t+"{";for(const t in e)i+=B(t)+":"+e[t]+";";return i+="}",i}(t,e))}}A("Dom",{style(t,e){return this.put(new _i).rule(t,e)},fontface(t,e,i){return this.put(new _i).font(t,e,i)}}),nt(_i,"Style");class Mi extends ci{constructor(t,e=t){super(tt("textPath",t),e)}array(){const t=this.track();return t?t.array():null}plot(t){const e=this.track();let i=null;return e&&(i=e.plot(t)),null==t?i:this}track(){return this.reference("href")}}A({Container:{textPath:ht(function(t,e){return t instanceof ci||(t=this.text(t)),t.path(e)})},Text:{path:ht(function(t,e=!0){const i=new Mi;let n;if(t instanceof We||(t=this.defs().path(t)),i.attr("href","#"+t,W),e)for(;n=this.node.firstChild;)i.node.appendChild(n);return this.put(i)}),textPath(){return this.findOne("textPath")}},Path:{text:ht(function(t){return t instanceof ci||(t=(new ci).addTo(this.parent()).text(t)),t.path(this)}),targets(){return zt("svg textPath").filter(t=>(t.attr("href")||"").includes(this.id()))}}}),Mi.prototype.MorphArray=Fe,nt(Mi,"TextPath");class Ei extends te{constructor(t,e=t){super(tt("use",t),e)}use(t,e){return this.attr("href",(e||"")+"#"+t,W)}}A({Container:{use:ht(function(t,e){return this.put(new Ei).use(t,e)})}}),nt(Ei,"Use");const Ni=J;at([hi,li,we,xe,Me],k("viewbox")),at([_e,Xe,je,We],k("marker")),at(ci,k("Text")),at(We,k("Path")),at(Jt,k("Defs")),at([ci,ui],k("Tspan")),at([Ke,de,ge,ii],k("radius")),at(Ut,k("EventTarget")),at(Xt,k("Dom")),at(Kt,k("Element")),at(te,k("Shape")),at([Qt,ce],k("Container")),at(ge,k("Gradient")),at(ii,k("Runner")),kt.extend([...new Set(S)]),function(t=[]){Ye.push(...[].concat(t))}([Vt,bt,St,qt,Wt,ve,Fe,Tt]),at(Ye,{to(t){return(new Pe).type(this.constructor).from(this.toArray()).to(t)},fromArray(t){return this.init(t),this},toConsumable(){return this.toArray()},morph(t,e,i,n,s){return this.fromArray(t.map(function(t,o){return n.step(t,e[o],i,s[o],s)}))}});const bi={paddingX:15,paddingY:5,imgMaxWidth:200,imgMaxHeight:100,iconSize:20,lineWidth:1,lineColor:"#549688",lineDasharray:"none",lineFlow:!1,lineFlowDuration:1,lineFlowForward:!0,lineStyle:"straight",rootLineKeepSameInCurve:!0,rootLineStartPositionKeepSameInCurve:!1,lineRadius:5,showLineMarker:!1,generalizationLineWidth:1,generalizationLineColor:"#549688",generalizationLineMargin:0,generalizationNodeMargin:20,associativeLineWidth:2,associativeLineColor:"rgb(51, 51, 51)",associativeLineActiveWidth:8,associativeLineActiveColor:"rgba(2, 167, 240, 1)",associativeLineDasharray:"6,4",associativeLineTextColor:"rgb(51, 51, 51)",associativeLineTextFontSize:14,associativeLineTextLineHeight:1.2,associativeLineTextFontFamily:"微软雅黑, Microsoft YaHei",backgroundColor:"#fafafa",backgroundImage:"none",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundSize:"cover",nodeUseLineStyle:!1,root:{shape:"rectangle",fillColor:"#549688",fontFamily:"微软雅黑, Microsoft YaHei",color:"#fff",fontSize:16,fontWeight:"bold",fontStyle:"normal",borderColor:"transparent",borderWidth:0,borderDasharray:"none",borderRadius:5,textDecoration:"none",gradientStyle:!1,startColor:"#549688",endColor:"#fff",startDir:[0,0],endDir:[1,0],lineMarkerDir:"end",hoverRectColor:"",hoverRectRadius:5,textAlign:"left",imgPlacement:"top",tagPlacement:"right"},second:{shape:"rectangle",marginX:100,marginY:40,fillColor:"#fff",fontFamily:"微软雅黑, Microsoft YaHei",color:"#565656",fontSize:16,fontWeight:"normal",fontStyle:"normal",borderColor:"#549688",borderWidth:1,borderDasharray:"none",borderRadius:5,textDecoration:"none",gradientStyle:!1,startColor:"#549688",endColor:"#fff",startDir:[0,0],endDir:[1,0],lineMarkerDir:"end",hoverRectColor:"",hoverRectRadius:5,textAlign:"left",imgPlacement:"top",tagPlacement:"right"},node:{shape:"rectangle",marginX:50,marginY:0,fillColor:"transparent",fontFamily:"微软雅黑, Microsoft YaHei",color:"#6a6d6c",fontSize:14,fontWeight:"normal",fontStyle:"normal",borderColor:"transparent",borderWidth:0,borderRadius:5,borderDasharray:"none",textDecoration:"none",gradientStyle:!1,startColor:"#549688",endColor:"#fff",startDir:[0,0],endDir:[1,0],lineMarkerDir:"end",hoverRectColor:"",hoverRectRadius:5,textAlign:"left",imgPlacement:"top",tagPlacement:"right"},generalization:{shape:"rectangle",marginX:100,marginY:40,fillColor:"#fff",fontFamily:"微软雅黑, Microsoft YaHei",color:"#565656",fontSize:16,fontWeight:"normal",fontStyle:"normal",borderColor:"#549688",borderWidth:1,borderDasharray:"none",borderRadius:5,textDecoration:"none",gradientStyle:!1,startColor:"#549688",endColor:"#fff",startDir:[0,0],endDir:[1,0],hoverRectColor:"",hoverRectRadius:5,textAlign:"left",imgPlacement:"top",tagPlacement:"right"}},Ti=["lineWidth","lineColor","lineDasharray","lineStyle","generalizationLineWidth","generalizationLineColor","associativeLineWidth","associativeLineColor","associativeLineActiveWidth","associativeLineActiveColor","associativeLineTextColor","associativeLineTextFontSize","associativeLineTextLineHeight","associativeLineTextFontFamily","backgroundColor","backgroundImage","backgroundRepeat","backgroundPosition","backgroundSize","rootLineKeepSameInCurve","rootLineStartPositionKeepSameInCurve","showLineMarker","lineRadius","hoverRectColor","hoverRectRadius","lineFlow","lineFlowDuration","lineFlowForward","textAlign"],Ci=["lineColor","lineDasharray","lineWidth","lineMarkerDir","lineFlow","lineFlowDuration","lineFlowForward"];const qi=(t,e,i,n,s,o=0,r=0,a=[])=>{let h=!1;if(i&&(h=i(t,e,s,o,r,a)),!h&&t.children&&t.children.length>0){let e=o+1;t.children.forEach((s,o)=>{qi(s,t,i,n,!1,e,o,[...a,t])})}n&&n(t,e,s,o,r,a)},Li=(t,e,i,n)=>{let s=t/e,o=[];if(i&&n)if(t<=i&&e<=n)o=[t,e];else{o=s>i/n?[i,i/s]:[s*n,n]}else i?o=t<=i?[t,e]:[i,i/s]:n&&(o=e<=n?[t,e]:[s*n,n]);return o},Di=t=>{try{return JSON.parse(JSON.stringify(t))}catch(t){return null}},Si=(t,e,i=!1)=>{if(t.data=Di(e.data),i){t.data.isActive=!1;un(t.data).forEach(t=>{t.isActive=!1})}return t.children=[],e.children&&e.children.length>0&&e.children.forEach((e,n)=>{t.children[n]=Si({},e,i)}),Object.keys(e).forEach(i=>{["data","children"].includes(i)||/^_/.test(i)||(t[i]=e[i])}),t},Ai=(t,e,i=!1,n=!0)=>{const s=e.nodeData?e.nodeData:e;return t.data=Di(s.data),n?delete t.data.uid:t.data.uid||(t.data.uid=Fi()),i&&(t.data.isActive=!1),t.children=[],e.children&&e.children.length>0?e.children.forEach((e,s)=>{t.children[s]=Ai({},e,i,n)}):e.nodeData&&e.nodeData.children&&e.nodeData.children.length>0&&e.nodeData.children.forEach((e,s)=>{t.children[s]=Ai({},e,i,n)}),Object.keys(s).forEach(e=>{["data","children"].includes(e)||/^_/.test(e)||(t[e]=s[e])}),t},ki=(t,e=300,i)=>{let n=null;return(...s)=>{n||(n=setTimeout(()=>{t.call(i,...s),n=null},e))}},Ri=(t,e=()=>{})=>{let i=0,n=t.length;if(n<=0)return e();let s=()=>{i>=n?e():(t[i](),setTimeout(()=>{i++,s()},0))};s()},zi=t=>t*(Math.PI/180);let Oi=null;const Ii=t=>(Oi||(Oi=document.createElement("div")),Oi.innerHTML=t,Oi.textContent);const Fi=()=>q(),Bi=t=>new Promise((e,i)=>{let n=new FileReader;n.readAsDataURL(t),n.onload=async t=>{let i=t.target.result,n=await(s=i,new Promise(t=>{let e=new Image;e.src=s,e.onload=()=>{t({width:e.width,height:e.height})},e.onerror=()=>{t({width:0,height:0})}}));var s;e({url:i,size:n})},n.onerror=t=>{i(t)}}),Pi=t=>Object.prototype.toString.call(t).slice(8,-1),Hi=t=>null==t||""===t;let Ui=null;const Gi=t=>(t=String(t).replace(/\s+/g,""),["#fff","#ffffff","#FFF","#FFFFFF","rgb(255,255,255)"].includes(t)||/rgba\(255,255,255,[^)]+\)/.test(t)),$i=t=>(t=String(t).replace(/\s+/g,""),["","transparent"].includes(t)||/rgba\(\d+,\d+,\d+,0\)/.test(t));let Yi=null;const Wi=t=>!/^_/.test(t)&&!r.includes(t),Vi=t=>{let e=[];return t.forEach(i=>{t.find(t=>t.uid!==i.uid&&t.isAncestor(i))||e.push(i)}),e},ji=(t,e={})=>{(e={...e})&&e.richText&&e.resetRichText&&delete e.resetRichText;const i=t=>{t.forEach(t=>{t.data={...t.data,...e},t.children&&t.children.length>0&&i(t.children)})};return i(t),t},Xi=(t,e=!1,i=null,n=!1)=>{const s=t=>{t.forEach(t=>{if(t.data||(t.data={}),(e||Hi(t.data.uid))&&(t.data.uid=Fi()),n){un(t.data).forEach(t=>{(e||Hi(t.uid))&&(t.uid=Fi())})}i&&i(t),t.children&&t.children.length>0&&s(t.children)})};return s(t),t},Ki=t=>t?Array.isArray(t)?t:[t]:[],Zi=t=>t.parent?t.parent.nodeData.children.findIndex(e=>e.data.uid===t.uid):0,Qi=(t,e)=>e.findIndex(e=>e.uid===t.uid),Ji=t=>{let e=0;for(let i=0;i<t.length;i++)e=t.charCodeAt(i)+((e<<5)-e);return"hsla("+new L(e).genrand_int32()%360+", 50%, 50%, 1)"},tn=t=>([["&","&amp;"],["<","&lt;"],[">","&gt;"]].forEach(e=>{t=t.replace(new RegExp(e[0],"g"),e[1])}),t),en=(t,e)=>{const i=Pi(t);if(i!==Pi(e))return!1;if("Object"===i){const i=Object.keys(t),n=Object.keys(e);if(i.length!==n.length)return!1;for(let s=0;s<i.length;s++){const o=i[s];if(!n.includes(o))return!1;if(!en(t[o],e[o]))return!1}return!0}if("Array"===i){if(t.length!==e.length)return!1;for(let i=0;i<t.length;i++){const n=t[i],s=e[i];if(Pi(n)!==Pi(s))return!1;if(!en(n,s))return!1}return!0}return t===e},nn=()=>navigator.clipboard&&"function"==typeof navigator.clipboard.read,sn=t=>{navigator.clipboard&&navigator.clipboard.writeText&&navigator.clipboard.writeText(JSON.stringify(t))},on=t=>{if(!t||!t.parent)return;const e=Zi(t);-1!==e&&t.parent.nodeData.children.splice(e,1)},rn=t=>({simpleMindMap:!0,data:t}),an=t=>{let e=null;if("string"==typeof t)try{const i=JSON.parse(t);"object"==typeof i&&i.simpleMindMap&&(e=i.data)}catch(t){}else"object"==typeof t&&t.simpleMindMap&&(e=t.data);const i=!!e;return{isSmm:i,data:i?e:String(t)}},hn=(t,e)=>{t.preventDefault();const i=window.getSelection();if(!i.rangeCount)return;i.deleteFromDocument(),e=e||t.clipboardData.getData("text"),e=tn(e);const n=(e=Ii(e)).split(/\n/g),s=document.createDocumentFragment();n.forEach((t,e)=>{const i=document.createTextNode(t);if(s.appendChild(i),e<n.length-1){const t=document.createElement("br");s.appendChild(t)}}),i.getRangeAt(0).insertNode(s),i.collapseToEnd()},ln=t=>{const e={},i=(t,n)=>{const s=t.data.uid;n&&n.children.push(s),e[s]={isRoot:!n,data:{...t.data},children:[]},t.children&&t.children.length>0&&t.children.forEach(t=>{i(t,e[s])})};return i(t,null),e},dn=(t,e=0,i=0,n=0,s=0,o=!1,r=!1)=>{let a=1/0,h=-1/0,l=1/0,d=-1/0;const c=(t,e)=>{if((!e||!o)&&t.group)try{const{x:e,y:i,width:n,height:s}=t.group.findOne(".smm-node-shape").rbox();e<a&&(a=e),e+n>h&&(h=e+n),i<l&&(l=i),i+s>d&&(d=i+s)}catch(t){}!r&&t._generalizationList.length>0&&t._generalizationList.forEach(t=>{c(t.generalizationNode)}),t.children&&t.children.forEach(t=>{c(t)})};return c(t,!0),a=a-e+n,l=l-i+s,h=h-e+n,d=d-i+s,{left:a,top:l,width:h-a,height:d-l}},cn=(document.documentElement.requestFullScreen||(document.documentElement.webkitRequestFullScreen||(document.documentElement.mozRequestFullScreen||document.documentElement.msRequestFullscreen)),({el:t,width:e,height:i})=>{const n=new fi;return void 0!==e&&n.width(e),void 0!==i&&n.height(i),n.add(t),n}),un=t=>{const e=t.generalization;return e?Array.isArray(e)?e:[e]:[]},pn=t=>{t.setAttribute("xmlns","http://www.w3.org/1999/xhtml")},mn=t=>((t=[...t]).sort((t,e)=>t.sortIndex-e.sortIndex),t),fn=(t,e)=>_()(t,e,{arrayMerge:(t,e)=>e}),gn=["backgroundColor","backgroundImage","backgroundRepeat","backgroundPosition","backgroundSize"],xn=["gradientStyle","startColor","endColor","startDir","endDir","fillColor","borderColor","borderWidth","borderDasharray"];class wn{static setBackgroundStyle(t,e){if(!t)return;if(!wn.cacheStyle){wn.cacheStyle={};let e=window.getComputedStyle(t);gn.forEach(t=>{wn.cacheStyle[t]=e[t]})}let{backgroundColor:i,backgroundImage:n,backgroundRepeat:s,backgroundPosition:o,backgroundSize:r}=e;t.style.backgroundColor=i,n&&"none"!==n?(t.style.backgroundImage=`url(${n})`,t.style.backgroundRepeat=s,t.style.backgroundPosition=o,t.style.backgroundSize=r):t.style.backgroundImage="none"}static removeBackgroundStyle(t){wn.cacheStyle&&(gn.forEach(e=>{t.style[e]=wn.cacheStyle[e]}),wn.cacheStyle=null)}constructor(t){this.ctx=t,this._markerPath=null,this._marker=null,this._gradient=null}merge(t,e){let i=this.ctx.mindMap.themeConfig,n=null,s=!1;e?(s=!0,n=i):n=this.ctx.isGeneralization?i.generalization:0===this.ctx.layerIndex?i.root:1===this.ctx.layerIndex?i.second:i.node;let o="";return o=void 0!==this.getSelfStyle(t)?this.getSelfStyle(t):void 0!==n[t]?n[t]:i[t],s||this.addToEffectiveStyles({[t]:o}),o}getStyle(t,e){return this.merge(t,e)}getSelfStyle(t){return this.ctx.getData(t)}addToEffectiveStyles(t){this.ctx.mindMap.painter&&(this.ctx.effectiveStyles={...this.ctx.effectiveStyles,...t})}rect(t){this.shape(t),t.radius(this.merge("borderRadius"))}shape(t){const e={};xn.forEach(t=>{e[t]=this.merge(t)}),e.gradientStyle?(this._gradient||(this._gradient=this.ctx.nodeDraw.gradient("linear")),this._gradient.update(t=>{t.stop(0,e.startColor),t.stop(1,e.endColor)}),this._gradient.from(...e.startDir).to(...e.endDir),t.fill(this._gradient)):t.fill({color:e.fillColor}),t.stroke({color:e.borderColor,width:e.borderWidth,dasharray:e.borderDasharray})}text(t){const e={color:this.merge("color"),fontFamily:this.merge("fontFamily"),fontSize:this.merge("fontSize"),fontWeight:this.merge("fontWeight"),fontStyle:this.merge("fontStyle"),textDecoration:this.merge("textDecoration")};t.fill({color:e.color}).css({"font-family":e.fontFamily,"font-size":e.fontSize+"px","font-weight":e.fontWeight,"font-style":e.fontStyle,"text-decoration":e.textDecoration})}domText(t,e=1){const i={color:this.merge("color"),fontFamily:this.merge("fontFamily"),fontSize:this.merge("fontSize"),fontWeight:this.merge("fontWeight"),fontStyle:this.merge("fontStyle"),textDecoration:this.merge("textDecoration"),textAlign:this.merge("textAlign")};t.style.color=i.color,t.style.textDecoration=i.textDecoration,t.style.fontFamily=i.fontFamily,t.style.fontSize=i.fontSize*e+"px",t.style.fontWeight=i.fontWeight||"normal",t.style.fontStyle=i.fontStyle,t.style.textAlign=i.textAlign}tagText(t,e){t.fill({color:"#fff"}).css({"font-size":e.fontSize+"px"})}tagRect(t,e){t.fill({color:e.fill}),e.radius&&t.radius(e.radius)}iconNode(t,e){t.attr({fill:e||this.merge("color")})}line(t,{width:e,color:i,dasharray:n}={},s,o){const{customHandleLine:r}=this.ctx.mindMap.opt;if("function"==typeof r&&r(this.ctx,t,{width:e,color:i,dasharray:n}),t.stroke({color:i,dasharray:n,width:e}).fill({color:"none"}),s){const e=this.merge("showLineMarker",!0),n=o.style;if(e){n._marker=n._marker||n.createMarker(),n._markerPath.stroke({color:i}).fill({color:i}),t.attr("marker-start",""),t.attr("marker-end","");const e=n.merge("lineMarkerDir");t.marker(e,n._marker)}else n._marker&&(t.attr("marker-start",""),t.attr("marker-end",""),n._marker.remove(),n._marker=null)}}createMarker(){return this.ctx.lineDraw.marker(20,20,t=>{t.ref(8,5),t.size(20,20),t.attr("markerUnits","userSpaceOnUse"),t.attr("orient","auto-start-reverse"),this._markerPath=t.path("M0,0 L2,5 L0,10 L10,5 Z")})}generalizationLine(t){t.stroke({width:this.merge("generalizationLineWidth",!0),color:this.merge("generalizationLineColor",!0)}).fill({color:"none"})}iconBtn(t,e,i){let{color:n,fill:s,fontSize:o,fontColor:r}=this.ctx.mindMap.opt.expandBtnStyle||{color:"#808080",fill:"#fff",fontSize:12,strokeColor:"#333333",fontColor:"#333333"};t.fill({color:n}),e.fill({color:n}),i.fill({color:s}),this.ctx.mindMap.opt.isShowExpandNum&&t.attr({"font-size":o+"px","font-color":r})}hasCustomStyle(){let t=!1;return Object.keys(this.ctx.getData()).forEach(e=>{Wi(e)&&(t=!0)}),t}getCustomStyle(){const t={};return Object.keys(this.ctx.getData()).forEach(e=>{Wi(e)&&(t[e]=this.ctx.getData(e))}),t}hoverNode(t){const e=this.merge("hoverRectColor")||this.ctx.mindMap.opt.hoverRectColor,i=this.merge("hoverRectRadius");t.radius(i).fill("none").stroke({color:e})}onRemove(){this._marker&&(this._marker.remove(),this._marker=null),this._markerPath&&(this._markerPath.remove(),this._markerPath=null),this._gradient&&(this._gradient.remove(),this._gradient=null)}}wn.cacheStyle=null;const vn=wn;class yn{constructor(t){this.node=t,this.mindMap=t.mindMap}getShapePadding(t,e,i,s){const o=this.node.getShape(),r=t+2*i,a=e+2*s,h=Math.abs(r-a);switch(o){case n.SHAPE.ROUNDED_RECTANGLE:return{paddingX:e>t?(e-t)/2:0,paddingY:0};case n.SHAPE.DIAMOND:return{paddingX:t/2,paddingY:e/2};case n.SHAPE.PARALLELOGRAM:case n.SHAPE.OUTER_TRIANGULAR_RECTANGLE:case n.SHAPE.INNER_TRIANGULAR_RECTANGLE:return{paddingX:i<=0?15:0,paddingY:0};case n.SHAPE.ELLIPSE:return{paddingX:i<=0?15:0,paddingY:s<=0?5:0};case n.SHAPE.CIRCLE:return{paddingX:a>r?h/2:0,paddingY:a<r?h/2:0}}const l=this.getShapeFromExtendList(o);return l&&l.getPadding({node:this.node,width:t,height:e,paddingX:i,paddingY:s})||{paddingX:0,paddingY:0}}getShapeFromExtendList(t){return this.mindMap.extendShapeList.find(e=>e.name===t)}createShape(){const t=this.node.getShape();let e=null;if(t===n.SHAPE.RECTANGLE?e=this.createRect():t===n.SHAPE.DIAMOND?e=this.createDiamond():t===n.SHAPE.PARALLELOGRAM?e=this.createParallelogram():t===n.SHAPE.ROUNDED_RECTANGLE?e=this.createRoundedRectangle():t===n.SHAPE.OCTAGONAL_RECTANGLE?e=this.createOctagonalRectangle():t===n.SHAPE.OUTER_TRIANGULAR_RECTANGLE?e=this.createOuterTriangularRectangle():t===n.SHAPE.INNER_TRIANGULAR_RECTANGLE?e=this.createInnerTriangularRectangle():t===n.SHAPE.ELLIPSE?e=this.createEllipse():t===n.SHAPE.CIRCLE&&(e=this.createCircle()),!e){const i=this.getShapeFromExtendList(t);i&&(e=i.createShape(this.node))}return e||this.createRect()}getNodeSize(){const t=this.node.getBorderWidth();let{width:e,height:i}=this.node;return e-=t,i-=t,{width:e,height:i}}createPath(t){const{customCreateNodePath:e}=this.mindMap.opt;return e?Ni(e(t)):(new We).plot(t)}createPolygon(t){const{customCreateNodePolygon:e}=this.mindMap.opt;return e?Ni(e(t)):(new je).plot(t)}createRect(){let{width:t,height:e}=this.getNodeSize(),i=this.node.style.merge("borderRadius");const n=`\n M${i},0\n L${t-i},0\n C${t-i},0 ${t},0 ${t},${i}\n L${t},${e-i}\n C${t},${e-i} ${t},${e} ${t-i},${e}\n L${i},${e}\n C${i},${e} 0,${e} 0,${e-i}\n L0,${i}\n C0,${i} 0,0 ${i},0\n Z\n `;return this.createPath(n)}createDiamond(){let{width:t,height:e}=this.getNodeSize(),i=t/2,n=e/2;const s=[[i,0],[t,n],[i,e],[0,n]];return this.createPolygon(s)}createParallelogram(){let{paddingX:t}=this.node.getPaddingVale();t=t||this.node.shapePadding.paddingX;let{width:e,height:i}=this.getNodeSize();const n=[[t,0],[e,0],[e-t,i],[0,i]];return this.createPolygon(n)}createRoundedRectangle(){let{width:t,height:e}=this.getNodeSize(),i=e/2;const n=`\n M${i},0\n L${t-i},0\n A${e/2},${e/2} 0 0,1 ${t-i},${e} \n L${i},${e}\n A${e/2},${e/2} 0 0,1 ${i},0\n `;return this.createPath(n)}createOctagonalRectangle(){let{width:t,height:e}=this.getNodeSize();const i=[[0,5],[5,0],[t-5,0],[t,5],[t,e-5],[t-5,e],[5,e],[0,e-5]];return this.createPolygon(i)}createOuterTriangularRectangle(){let{paddingX:t}=this.node.getPaddingVale();t=t||this.node.shapePadding.paddingX;let{width:e,height:i}=this.getNodeSize();const n=[[t,0],[e-t,0],[e,i/2],[e-t,i],[t,i],[0,i/2]];return this.createPolygon(n)}createInnerTriangularRectangle(){let{paddingX:t}=this.node.getPaddingVale();t=t||this.node.shapePadding.paddingX;let{width:e,height:i}=this.getNodeSize();const n=[[0,0],[e,0],[e-t/2,i/2],[e,i],[0,i],[t/2,i/2]];return this.createPolygon(n)}createEllipse(){let{width:t,height:e}=this.getNodeSize(),i=t/2,n=e/2;const s=`\n M${i},0\n A${i},${n} 0 0,1 ${i},${e} \n M${i},${e} \n A${i},${n} 0 0,1 ${i},0 \n `;return this.createPath(s)}createCircle(){let{width:t,height:e}=this.getNodeSize(),i=t/2,n=e/2;const s=`\n M${i},0\n A${i},${n} 0 0,1 ${i},${e} \n M${i},${e} \n A${i},${n} 0 0,1 ${i},0 \n `;return this.createPath(s)}}const _n=[n.SHAPE.RECTANGLE,n.SHAPE.DIAMOND,n.SHAPE.PARALLELOGRAM,n.SHAPE.ROUNDED_RECTANGLE,n.SHAPE.OCTAGONAL_RECTANGLE,n.SHAPE.OUTER_TRIANGULAR_RECTANGLE,n.SHAPE.INNER_TRIANGULAR_RECTANGLE,n.SHAPE.ELLIPSE,n.SHAPE.CIRCLE];const Mn={formatGetGeneralization:function(){const t=this.getData("generalization");return Array.isArray(t)?t:t?[t]:[]},checkHasGeneralization:function(){return this.formatGetGeneralization().length>0},checkHasSelfGeneralization:function(){return!!this.formatGetGeneralization().find(t=>!t.range||t.range.length<=0)},getGeneralizationNodeIndex:function(t){return this._generalizationList.findIndex(e=>e.generalizationNode.uid===t.uid)},createGeneralizationNode:function(){if(this.isGeneralization||!this.checkHasGeneralization())return;let t=0,e=0;this.formatGetGeneralization().forEach((i,n)=>{let s=this._generalizationList[n];s||(s=this._generalizationList[n]={}),s.node=this,s.range=i.range,s.generalizationLine||(s.generalizationLine=this.lineDraw.path()),s.generalizationNode||(s.generalizationNode=new Pn({data:{inserting:i.inserting,data:i},uid:Fi(),renderer:this.renderer,mindMap:this.mindMap,isGeneralization:!0})),delete i.inserting,s.generalizationNode.generalizationBelongNode=this,s.generalizationNode.width>t&&(t=s.generalizationNode.width),s.generalizationNode.height>e&&(e=s.generalizationNode.height),i.isActive&&this.renderer.addNodeToActiveList(s.generalizationNode)}),this._generalizationNodeWidth=t,this._generalizationNodeHeight=e},updateGeneralization:function(){this.isGeneralization||(this.removeGeneralization(),this.createGeneralizationNode())},updateGeneralizationData:function(){const t=this.getChildrenLength(),e=this.formatGetGeneralization(),i=[];e.forEach(e=>{e.range?e.range.length>0&&e.range[0]<=t-1&&e.range[1]<=t-1&&i.push(e):i.push(e)}),i.length!==e.length&&this.setData({generalization:i})},renderGeneralization:function(t){if(this.isGeneralization)return;this.updateGeneralizationData();const e=this.formatGetGeneralization();e.length<=0||!1===this.getData("expand")?this.removeGeneralization():(e.length!==this._generalizationList.length&&this.removeGeneralization(),this.createGeneralizationNode(),this.renderer.layout.renderGeneralization(this._generalizationList),this._generalizationList.forEach(e=>{this.style.generalizationLine(e.generalizationLine),e.generalizationNode.render(()=>{},t)}))},removeGeneralization:function(){this.isGeneralization||(this._generalizationList.forEach(t=>{t.generalizationNode.style.onRemove(),t.generalizationLine&&(t.generalizationLine.remove(),t.generalizationLine=null),t.generalizationNode&&(this.renderer.removeNodeFromActiveList(t.generalizationNode),t.generalizationNode.remove(),t.generalizationNode=null)}),this._generalizationList=[],this.generalizationBelongNode&&this.nodeDraw.find(".generalization_"+this.generalizationBelongNode.uid).remove())},hideGeneralization:function(){this.isGeneralization||this._generalizationList.forEach(t=>{t.generalizationLine&&t.generalizationLine.hide(),t.generalizationNode&&t.generalizationNode.hide()})},showGeneralization:function(){this.isGeneralization||this._generalizationList.forEach(t=>{t.generalizationLine&&t.generalizationLine.show(),t.generalizationNode&&t.generalizationNode.show()})},setGeneralizationOpacity:function(t){this._generalizationList.forEach(e=>{e.generalizationLine.opacity(t),e.generalizationNode.group.opacity(t)})},handleGeneralizationMouseenter:function(){const t=this.generalizationBelongNode,e=t.formatGetGeneralization()[t.getGeneralizationNodeIndex(this)],i=this.getStyle("hoverRectColor")||this.mindMap.opt.hoverRectColor,n=i?{stroke:i}:null;Array.isArray(e.range)&&e.range.length>0?this.mindMap.renderer.highlightNode(t,e.range,n):this.mindMap.renderer.highlightNode(t,null,n)},handleGeneralizationMouseleave:function(){this.mindMap.renderer.closeHighlightNode()}},En={open:'<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><path d="M475.136 327.168v147.968h-147.968v74.24h147.968v147.968h74.24v-147.968h147.968v-74.24h-147.968v-147.968h-74.24z m36.864-222.208c225.28 0 407.04 181.76 407.04 407.04s-181.76 407.04-407.04 407.04-407.04-181.76-407.04-407.04 181.76-407.04 407.04-407.04z m0-74.24c-265.216 0-480.768 215.552-480.768 480.768s215.552 480.768 480.768 480.768 480.768-215.552 480.768-480.768-215.552-480.768-480.768-480.768z"></path></svg>',close:'<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><path d="M512 105.472c225.28 0 407.04 181.76 407.04 407.04s-181.76 407.04-407.04 407.04-407.04-181.76-407.04-407.04 181.76-407.04 407.04-407.04z m0-74.24c-265.216 0-480.768 215.552-480.768 480.768s215.552 480.768 480.768 480.768 480.768-215.552 480.768-480.768-215.552-480.768-480.768-480.768z"></path><path d="M252.928 474.624h518.144v74.24h-518.144z"></path></svg>',remove:'<svg width="14px" height="14px" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><path fill="#ffffff" d="M512 105.472c225.28 0 407.04 181.76 407.04 407.04s-181.76 407.04-407.04 407.04-407.04-181.76-407.04-407.04 181.76-407.04 407.04-407.04z m0-74.24c-265.216 0-480.768 215.552-480.768 480.768s215.552 480.768 480.768 480.768 480.768-215.552 480.768-480.768-215.552-480.768-480.768-480.768z"></path><path fill="#ffffff" d="M252.928 474.624h518.144v74.24h-518.144z"></path></svg>',imgAdjust:'<svg width="12px" height="12px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#ffffff" d="M1008.128 614.4a25.6 25.6 0 0 0-27.648 5.632l-142.848 142.848L259.072 186.88 401.92 43.52A25.6 25.6 0 0 0 384 0h-358.4a25.6 25.6 0 0 0-25.6 25.6v358.4a25.6 25.6 0 0 0 43.52 17.92l143.36-142.848 578.048 578.048-142.848 142.848a25.6 25.6 0 0 0 17.92 43.52h358.4a25.6 25.6 0 0 0 25.6-25.6v-358.4a25.6 25.6 0 0 0-15.872-25.088z" /></svg>',quickCreateChild:'<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="48" height="48"><path d="M514.048 62.464q93.184 0 175.616 35.328t143.872 96.768 96.768 143.872 35.328 175.616q0 94.208-35.328 176.128t-96.768 143.36-143.872 96.768-175.616 35.328q-94.208 0-176.64-35.328t-143.872-96.768-96.768-143.36-35.328-176.128q0-93.184 35.328-175.616t96.768-143.872 143.872-96.768 176.64-35.328zM772.096 576.512q26.624 0 45.056-18.944t18.432-45.568-18.432-45.056-45.056-18.432l-192.512 0 0-192.512q0-26.624-18.944-45.568t-45.568-18.944-45.056 18.944-18.432 45.568l0 192.512-192.512 0q-26.624 0-45.056 18.432t-18.432 45.056 18.432 45.568 45.056 18.944l192.512 0 0 191.488q0 26.624 18.432 45.568t45.056 18.944 45.568-18.944 18.944-45.568l0-191.488 192.512 0z"></path></svg>'};const Nn={createExpandNodeContent:function(){if(this._openExpandNode)return;const{expandBtnSize:t,expandBtnIcon:e,isShowExpandNum:i}=this.mindMap.opt;let{close:n,open:s}=e||{};i?(this._openExpandNode=new ci,this._openExpandNode.addClass("smm-expand-btn-text"),this._openExpandNode.attr({"text-anchor":"middle","dominant-baseline":"middle",x:t/2,y:2})):(this._openExpandNode=Ni(s||En.open).size(t,t),this._openExpandNode.x(0).y(-t/2)),this._closeExpandNode=Ni(n||En.close).size(t,t),this._closeExpandNode.x(0).y(-t/2),this._fillExpandNode=(new pi).size(t),this._fillExpandNode.x(0).y(-t/2),this.style.iconBtn(this._openExpandNode,this._closeExpandNode,this._fillExpandNode)},updateExpandBtnNode:function(){let t,{expand:e}=this.getData();if(e!==this._lastExpandBtnType&&(this._expandBtn&&this._expandBtn.clear(),this.createExpandNodeContent(),!1===e?(t=this._openExpandNode,this._lastExpandBtnType=!1):(t=this._closeExpandNode,this._lastExpandBtnType=!0),this._expandBtn)){let{isShowExpandNum:i,expandBtnStyle:n,expandBtnNumHandler:s}=this.mindMap.opt;if(i)if(e)this._fillExpandNode.stroke("none");else{this._fillExpandNode.stroke({color:n.strokeColor});let e=this.sumNode(this.nodeData.children||[]);if("function"==typeof s){const t=s(e,this);Hi(t)||(e=t)}t.text(String(e))}this._expandBtn.add(this._fillExpandNode).add(t)}},updateExpandBtnPos:function(){this._expandBtn&&this.renderer.layout.renderExpandBtn(this,this._expandBtn)},renderExpandBtn:function(){this.getChildrenLength()<=0||this.isRoot||(this._expandBtn||(this._expandBtn=new xi,this._expandBtn.on("mouseover",t=>{t.stopPropagation(),this._expandBtn.css({cursor:"pointer"})}),this._expandBtn.on("mouseout",t=>{t.stopPropagation(),this._expandBtn.css({cursor:"auto"})}),this._expandBtn.on("click",t=>{t.stopPropagation(),this.mindMap.execCommand("SET_NODE_EXPAND",this,!this.getData("expand")),this.mindMap.emit("expand_btn_click",this)}),this._expandBtn.on("dblclick",t=>{t.stopPropagation()}),this._expandBtn.addClass("smm-expand-btn")),this.group.add(this._expandBtn),this._showExpandBtn=!0,this.updateExpandBtnNode(),this.updateExpandBtnPos())},removeExpandBtn:function(){this._expandBtn&&this._showExpandBtn&&(this._expandBtn.remove(),this._showExpandBtn=!1)},showExpandBtn:function(){const{alwaysShowExpandBtn:t,notShowExpandBtn:e}=this.mindMap.opt;t||e||setTimeout(()=>{this.renderExpandBtn()},0)},hideExpandBtn:function(){const{alwaysShowExpandBtn:t,notShowExpandBtn:e}=this.mindMap.opt;if(t||this._isMouseenter||e)return;let{isActive:i,expand:n}=this.getData();!i&&n&&setTimeout(()=>{this.removeExpandBtn()},0)},sumNode:function(t=[]){return t.reduce((t,e)=>t+this.sumNode(e.children||[]),t.length)}};const bn={setData:function(t={}){this.mindMap.execCommand("SET_NODE_DATA",this,t)},setText:function(t,e,i){this.mindMap.execCommand("SET_NODE_TEXT",this,t,e,i)},setImage:function(t){this.mindMap.execCommand("SET_NODE_IMAGE",this,t)},setIcon:function(t){this.mindMap.execCommand("SET_NODE_ICON",this,t)},setHyperlink:function(t,e){this.mindMap.execCommand("SET_NODE_HYPERLINK",this,t,e)},setNote:function(t){this.mindMap.execCommand("SET_NODE_NOTE",this,t)},setAttachment:function(t,e){this.mindMap.execCommand("SET_NODE_ATTACHMENT",this,t,e)},setTag:function(t){this.mindMap.execCommand("SET_NODE_TAG",this,t)},setShape:function(t){this.mindMap.execCommand("SET_NODE_SHAPE",this,t)},setStyle:function(t,e){this.mindMap.execCommand("SET_NODE_STYLE",this,t,e)},setStyles:function(t){this.mindMap.execCommand("SET_NODE_STYLES",this,t)}},Tn=[{name:"优先级图标",type:"priority",list:[{name:"1",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512.042667 1024C229.248 1024 0 794.794667 0 511.957333 0 229.205333 229.248 0 512.042667 0 794.752 0 1024 229.205333 1024 511.957333 1024 794.794667 794.752 1024 512.042667 1024z" fill="#E93B30"></path><path d="M580.309333 256h-75.52c-10.666667 29.824-30.165333 55.765333-58.709333 78.165333-28.416 22.314667-54.869333 37.418667-79.146667 45.397334v84.608a320 320 0 0 0 120.234667-70.698667v352.085333H580.266667V256z" fill="#FFFFFF"></path></svg>'},{name:"2",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M511.957333 1024C229.248 1024 0 794.752 0 512S229.248 0 511.957333 0C794.752 0 1024 229.248 1024 512s-229.248 512-512.042667 512z" fill="#FA8D2E"></path><path d="M667.946667 658.602667h-185.301334c4.864-8.533333 11.178667-17.066667 19.072-25.984 7.808-8.874667 26.453333-26.837333 55.936-53.888 29.525333-27.008 49.877333-47.786667 61.226667-62.165334 16.981333-21.717333 29.44-42.453333 37.290667-62.293333 7.808-19.84 11.776-40.746667 11.776-62.677333 0-38.570667-13.738667-70.741333-41.088-96.725334C599.466667 268.928 561.706667 256 513.834667 256c-43.690667 0-80.128 11.136-109.354667 33.578667-29.098667 22.4-46.506667 59.306667-52.010667 110.805333l93.184 9.301333c1.792-27.349333 8.405333-46.890667 19.754667-58.624 11.434667-11.776 26.837333-17.664 46.165333-17.664 19.541333 0 34.858667 5.589333 45.909334 16.768 11.136 11.264 16.682667 27.221333 16.682666 48.042667 0 18.858667-6.4 37.930667-19.242666 57.258667-9.472 14.037333-35.157333 40.533333-77.098667 79.872-52.096 48.554667-87.04 87.509333-104.704 116.821333A226.688 226.688 0 0 0 341.333333 745.429333h326.613334v-86.826666z" fill="#FFFFFF"></path></svg>'},{name:"3",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 0C229.248 0 0 229.248 0 512s229.248 512 512 512 512-229.248 512-512S794.752 0 512 0z" fill="#2E66FA"></path><path d="M627.754667 731.733333c-29.354667 25.088-66.901333 37.632-112.725334 37.632-44.928 0-81.792-11.52-110.592-34.773333-33.066667-26.538667-49.877333-64.469333-50.304-114.133333h92.16c0.426667 21.76 7.552 38.314667 21.333334 49.664 12.288 10.88 28.117333 16.341333 47.402666 16.341333 20.309333 0 36.778667-6.101333 49.322667-18.432 12.544-12.330667 18.773333-29.568 18.773333-51.797333 0-21.290667-6.229333-38.186667-18.773333-50.773334-12.544-12.501333-29.866667-18.773333-52.138667-18.773333h-13.525333v-80.042667H512c42.112 0 63.274667-21.034667 63.274667-63.146666 0-20.309333-5.888-36.096-17.706667-47.445334a60.757333 60.757333 0 0 0-43.818667-17.066666c-17.493333 0-32 5.504-43.434666 16.298666-11.562667 10.88-17.792 25.728-18.773334 44.714667H359.68c0.981333-43.946667 16.042667-78.976 45.397333-104.96 29.354667-25.941333 65.706667-39.04 109.226667-39.04 44.928 0 81.792 13.525333 110.592 40.490667 28.8 26.922667 43.306667 61.610667 43.306667 104.149333 0 48.213333-19.413333 82.688-58.154667 103.552 43.52 23.125333 65.28 61.44 65.28 114.858667 0 48.128-15.957333 85.76-47.573333 112.682666z" fill="#FFFFFF"></path></svg>'},{name:"4",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512.042667 1024C229.248 1024 0 794.794667 0 512.042667 0 229.205333 229.248 0 512.042667 0 794.752 0 1024 229.205333 1024 512.042667 1024 794.794667 794.752 1024 512.042667 1024z" fill="#6D768D"></path><path d="M600.96 256v309.802667h60.117333v81.536h-60.16v98.218666h-90.154666v-98.218666H311.466667v-81.237334L522.666667 256h78.293333zM510.72 399.104l-112.042667 166.698667h112.042667V399.104z" fill="#FFFFFF"></path></svg>'},{name:"5",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512.042667 1024C229.248 1024 0 794.794667 0 512.042667 0 229.205333 229.248 0 512.042667 0 794.752 0 1024 229.205333 1024 512.042667 1024 794.794667 794.752 1024 512.042667 1024z" fill="#6D768D"></path><path d="M470.912 343.552h175.786667V256H400.256l-47.786667 253.952 75.434667 10.837333c21.205333-23.552 45.269333-35.413333 72.021333-35.413333 21.546667 0 38.997333 7.509333 52.437334 22.4 13.312 15.018667 20.053333 37.418667 20.053333 67.328 0 31.872-6.741333 55.765333-20.181333 71.552-13.397333 15.872-29.866667 23.765333-49.237334 23.765333-17.066667 0-32.085333-6.186667-45.013333-18.432-13.013333-12.373333-20.821333-29.013333-23.466667-50.133333L341.333333 611.498667c5.546667 40.874667 22.485333 73.429333 50.730667 97.621333 28.330667 24.32 64.938667 36.437333 109.866667 36.437333 56.149333 0 100.053333-21.546667 131.754666-64.554666a176.64 176.64 0 0 0 34.816-107.52c0-48.042667-14.378667-87.210667-43.221333-117.333334-28.8-30.208-63.957333-45.312-105.514667-45.312-21.674667 0-42.922667 5.248-63.829333 15.616l14.976-82.901333z" fill="#FFFFFF"></path></svg>'},{name:"6",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 1024C229.248 1024 0 794.794667 0 512.042667 0 229.205333 229.248 0 512 0c282.88 0 512 229.205333 512 512.042667C1024 794.794667 794.88 1024 512 1024z" fill="#6D768D"></path><path d="M519.210667 256c36.992 0 67.626667 10.368 91.776 31.189333 24.192 20.821333 39.68 51.029333 46.293333 90.709334l-90.197333 9.984c-2.176-18.56-7.978667-32.298667-17.28-41.173334-9.258667-8.874667-21.418667-13.226667-36.224-13.226666-19.754667 0-36.437333 8.789333-50.048 26.453333-13.696 17.664-22.314667 54.613333-25.856 110.549333 23.296-27.52 52.138667-41.258667 86.656-41.258666 38.997333 0 72.362667 14.805333 100.181333 44.544 27.733333 29.696 41.685333 68.010667 41.685333 114.858666 0 49.877333-14.634667 89.856-43.818666 119.936-29.226667 30.208-66.730667 45.226667-112.554667 45.226667-49.066667 0-89.429333-19.072-121.130667-57.344C357.12 658.218667 341.333333 595.541333 341.333333 508.416c0-89.344 16.469333-153.813333 49.493334-193.194667C423.722667 275.754667 466.56 256 519.168 256z m-9.472 241.834667c-17.962667 0-33.066667 6.997333-45.525334 21.12-12.330667 14.037333-18.56 34.858667-18.56 62.293333 0 30.421333 6.912 53.76 20.906667 70.4 13.952 16.469333 29.866667 24.746667 47.786667 24.746667 17.28 0 31.701333-6.826667 43.178666-20.309334 11.52-13.525333 17.237333-35.669333 17.237334-66.56 0-31.658667-6.186667-54.869333-18.517334-69.546666a58.197333 58.197333 0 0 0-46.506666-22.144z" fill="#FFFFFF"></path></svg>'},{name:"7",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512.042667 1024C229.248 1024 0 794.752 0 512S229.248 0 512.042667 0C794.752 0 1024 229.248 1024 512s-229.248 512-511.957333 512z" fill="#6D768D"></path><path d="M673.024 273.066667H354.133333v86.869333h212.224a691.2 691.2 0 0 0-104.746666 187.989333c-26.026667 70.101333-39.978667 138.88-41.429334 206.293334h89.6c-0.298667-42.922667 6.698667-91.776 21.034667-146.474667a654.72 654.72 0 0 1 62.08-154.965333c27.136-48.554667 53.888-85.76 80.128-111.701334V273.066667z" fill="#FFFFFF"></path></svg>'},{name:"8",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 1024C229.248 1024 0 794.752 0 512S229.248 0 512 0s512 229.248 512 512-229.248 512-512 512z" fill="#6D768D"></path><path d="M512.426667 256c46.208 0 82.048 11.861333 107.605333 35.541333 25.6 23.68 38.314667 53.674667 38.314667 89.898667 0 22.613333-5.802667 42.666667-17.578667 60.330667a111.445333 111.445333 0 0 1-49.450667 40.277333c26.965333 10.837333 47.36 26.752 61.312 47.658667 13.994667 20.906667 21.034667 45.013333 21.034667 72.362666 0 45.098667-14.336 81.834667-42.965333 109.952-28.586667 28.245333-66.602667 42.368-114.090667 42.368-44.245333 0-81.066667-11.648-110.464-34.986666-34.645333-27.52-52.010667-65.28-52.010667-113.365334 0-26.368 6.528-50.645333 19.626667-72.746666 13.056-22.144 33.578667-39.210667 61.696-51.242667-24.064-10.154667-41.557333-24.192-52.48-41.941333a109.824 109.824 0 0 1-16.512-58.666667c0-36.224 12.757333-66.218667 37.973333-89.898667 25.386667-23.68 61.354667-35.541333 108.032-35.541333z m1.28 265.429333c-22.784 0-39.722667 7.978667-50.901334 23.893334-11.136 15.786667-16.64 33.066667-16.64 51.498666 0 25.984 6.485333 46.208 19.712 60.714667 13.098667 14.506667 29.525333 21.802667 49.152 21.802667 19.242667 0 35.157333-6.997333 47.786667-20.992 12.629333-13.909333 18.858667-34.048 18.858667-60.416 0-23.082667-6.314667-41.557333-19.2-55.466667a63.274667 63.274667 0 0 0-48.725334-21.034667z m-0.341334-191.488c-17.792 0-32 5.333333-42.581333 16-10.538667 10.666667-15.872 24.746667-15.872 42.325334 0 18.645333 5.248 33.152 15.701333 43.648 10.453333 10.453333 24.362667 15.658667 41.770667 15.658666 17.664 0 31.658667-5.290667 42.24-15.872 10.538667-10.581333 15.872-25.173333 15.872-43.818666 0-17.493333-5.248-31.573333-15.701333-42.154667s-24.277333-15.786667-41.429334-15.786667z" fill="#FFFFFF"></path></svg>'},{name:"9",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 1024C229.248 1024 0 794.794667 0 512.042667 0 229.333333 229.248 0 512 0c282.88 0 512 229.333333 512 512.042667C1024 794.794667 794.88 1024 512 1024z" fill="#6D768D"></path><path d="M497.28 256c49.365333 0 89.856 19.157333 121.429333 57.429333 31.701333 38.229333 47.488 101.205333 47.488 188.842667 0 89.173333-16.384 153.386667-49.365333 192.853333-32.853333 39.594667-75.605333 59.264-128.426667 59.264-37.888 0-68.608-10.154667-91.989333-30.506666s-38.4-50.816-45.013333-91.306667l90.112-9.984c2.261333 18.474667 8.021333 32.085333 17.28 41.088 9.173333 8.874667 21.418667 13.312 36.608 13.312 19.2 0 35.541333-8.874667 48.981333-26.752 13.44-17.749333 22.016-54.613333 25.770667-110.549333-23.466667 27.264-52.821333 40.874667-88.064 40.874666-38.314667 0-71.253333-14.72-99.114667-44.330666C355.242667 506.709333 341.333333 468.224 341.333333 420.864c0-49.493333 14.592-89.258667 43.946667-119.466667C414.549333 271.104 451.925333 256 497.237333 256z m-4.352 77.482667c-17.237333 0-31.658667 6.826667-43.008 20.437333-11.477333 13.653333-17.194667 35.84-17.194667 66.816 0 31.402667 6.229333 54.485333 18.645334 69.205333 12.458667 14.72 27.946667 22.101333 46.592 22.101334 18.005333 0 33.066667-7.082667 45.44-21.205334 12.330667-14.208 18.432-35.029333 18.432-62.506666 0-29.994667-6.912-53.376-20.821334-69.973334-13.824-16.597333-29.866667-24.874667-48.085333-24.874666z" fill="#FFFFFF"></path></svg>'},{name:"10",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512.042667 1024C229.248 1024 0 794.794667 0 511.957333 0 229.205333 229.248 0 512.042667 0 794.752 0 1024 229.205333 1024 511.957333 1024 794.794667 794.752 1024 512.042667 1024z" fill="#6D768D"></path><path d="M619.946667 273.066667c46.976 0 83.754667 16.042667 110.250666 48.042666 31.573333 37.973333 47.36 100.864 47.36 188.672 0 87.722667-15.829333 150.698667-47.658666 189.056-26.325333 31.616-62.976 47.36-109.952 47.36-47.274667 0-85.418667-17.237333-114.346667-51.968-28.885333-34.602667-43.392-96.426667-43.392-185.386666 0-87.168 15.872-150.016 47.701333-188.416 26.282667-31.488 62.933333-47.36 110.037334-47.36z m-207.488 12.8v452.266666H325.504V411.690667A299.904 299.904 0 0 1 213.333333 476.373333V398.933333c22.656-7.296 47.36-21.12 73.856-41.514666 26.624-20.522667 44.842667-44.288 54.784-71.552h70.485334z m207.488 60.842666c-11.306667 0-21.461333 3.413333-30.336 10.24-8.874667 6.826667-15.786667 19.157333-20.693334 36.864-6.4 22.997333-9.642667 61.653333-9.642666 115.968 0 54.442667 2.944 91.733333 8.661333 112.128 5.802667 20.352 13.098667 33.877333 21.845333 40.618667 8.789333 6.741333 18.858667 10.154667 30.165334 10.154667 11.349333 0 21.376-3.498667 30.250666-10.325334 8.874667-6.826667 15.786667-19.157333 20.693334-36.778666 6.4-22.826667 9.642667-61.354667 9.642666-115.797334 0-54.314667-2.858667-91.648-8.661333-112.042666-5.802667-20.352-13.013333-33.962667-21.76-40.789334a47.616 47.616 0 0 0-30.165333-10.24z" fill="#FFFFFF"></path></svg>'}]},{name:"进度图标",type:"progress",list:[{name:"1",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 0C229.248 0 0 229.248 0 512s229.248 512 512 512 512-229.248 512-512S794.752 0 512 0z" fill="#12BB37"></path><path d="M512 928c-229.76 0-416-186.24-416-416S282.24 96 512 96V512l294.144-294.144A414.72 414.72 0 0 1 928 512c0 229.76-186.24 416-416 416z" fill="#FFFFFF"></path></svg>'},{name:"2",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 0C229.248 0 0 229.248 0 512s229.248 512 512 512 512-229.248 512-512S794.752 0 512 0z" fill="#12BB37"></path><path d="M512 928c-229.76 0-416-186.24-416-416S282.24 96 512 96V512h416c0 229.76-186.24 416-416 416z" fill="#FFFFFF"></path></svg>'},{name:"3",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 0C229.248 0 0 229.248 0 512s229.248 512 512 512 512-229.248 512-512S794.752 0 512 0z" fill="#12BB37"></path><path d="M512 928c-229.76 0-416-186.24-416-416S282.24 96 512 96V512l294.144 294.144A414.72 414.72 0 0 1 512 928z" fill="#FFFFFF"></path></svg>'},{name:"4",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 0C229.248 0 0 229.248 0 512s229.248 512 512 512 512-229.248 512-512S794.752 0 512 0z" fill="#12BB37"></path><path d="M512 928c-229.76 0-416-186.24-416-416S282.24 96 512 96v832z" fill="#FFFFFF"></path></svg>'},{name:"5",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 0C229.248 0 0 229.248 0 512s229.248 512 512 512 512-229.248 512-512S794.752 0 512 0z" fill="#12BB37"></path><path d="M512 512l-294.144 294.144A414.72 414.72 0 0 1 96 512c0-229.76 186.24-416 416-416V512z" fill="#FFFFFF"></path></svg>'},{name:"6",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 0C229.248 0 0 229.248 0 512s229.248 512 512 512 512-229.248 512-512S794.752 0 512 0z" fill="#12BB37"></path><path d="M512 512H96c0-229.76 186.24-416 416-416V512z" fill="#FFFFFF"></path></svg>'},{name:"7",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 0C229.248 0 0 229.248 0 512s229.248 512 512 512 512-229.248 512-512S794.752 0 512 0z" fill="#12BB37"></path><path d="M512 512L217.856 217.856A414.72 414.72 0 0 1 512 96V512z" fill="#FFFFFF"></path></svg>'},{name:"8",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M0 512c0 282.752 229.248 512 512 512s512-229.248 512-512S794.752 0 512 0 0 229.248 0 512z" fill="#12BB37"></path><path d="M716.629333 341.333333h-51.328a35.072 35.072 0 0 0-28.330666 14.293334l-171.989334 233.984-77.909333-106.026667a35.2 35.2 0 0 0-28.330667-14.293333H307.413333c-7.082667 0-11.264 7.936-7.082666 13.653333l136.32 185.472a35.2 35.2 0 0 0 56.533333 0l230.4-313.429333a8.533333 8.533333 0 0 0-6.954667-13.653334z" fill="#FFFFFF"></path></svg>'}]},{name:"表情图标",type:"expression",list:[{name:"1",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1026 1024"><path d="M1.097856 1.097642h1021.804717v1021.804716H1.097856z" fill="#F09495" ></path><path d="M1024.000214 1024H0.000214V0h1024v1024z m-1021.804716-2.195284h1019.609433V2.195284H2.195498v1019.609432z" fill="#FFFFFF" ></path><path d="M234.695985 335.179887m-27.341259 0a27.341259 27.341259 0 1 0 54.682518 0 27.341259 27.341259 0 1 0-54.682518 0Z" fill="#040000" ></path><path d="M234.695985 363.519002c-15.666342 0-28.339115-12.772559-28.339115-28.339115 0-15.666342 12.772559-28.339115 28.339115-28.339115s28.339115 12.772559 28.339115 28.339115c0.099786 15.666342-12.672773 28.339115-28.339115 28.339115z m0-54.582732c-14.468914 0-26.243617 11.774703-26.243617 26.243617s11.774703 26.243617 26.243617 26.243617 26.243617-11.774703 26.243617-26.243617-11.774703-26.243617-26.243617-26.243617z" fill="#FFFFFF" ></path><path d="M776.232528 335.179887m-27.341259 0a27.341259 27.341259 0 1 0 54.682518 0 27.341259 27.341259 0 1 0-54.682518 0Z" fill="#040000" ></path><path d="M776.232528 363.519002c-15.666342 0-28.339115-12.772559-28.339115-28.339115 0-15.666342 12.772559-28.339115 28.339115-28.339115 15.666342 0 28.339115 12.772559 28.339115 28.339115 0 15.666342-12.772559 28.339115-28.339115 28.339115z m0-54.582732c-14.468914 0-26.243617 11.774703-26.243617 26.243617s11.774703 26.243617 26.243617 26.243617 26.243617-11.774703 26.243617-26.243617c-0.099786-14.468914-11.874488-26.243617-26.243617-26.243617z" fill="#FFFFFF" ></path><path d="M512.000214 671.656987c-52.58702 0-105.872539-17.961411-105.872539-52.387449S459.413194 566.882089 512.000214 566.882089s105.872539 17.961411 105.87254 52.387449S564.587234 671.656987 512.000214 671.656987z m0-74.240499c-21.952836 0-43.207172 3.592282-58.2748 9.77899-13.870201 5.68778-17.06334 11.275775-17.06334 12.07406s3.19314 6.386279 17.06334 12.07406c15.067628 6.186708 36.321965 9.77899 58.2748 9.77899s43.207172-3.592282 58.274801-9.77899c13.870201-5.68778 17.06334-11.275775 17.06334-12.07406s-3.19314-6.386279-17.06334-12.07406c-15.067628-6.286494-36.321965-9.77899-58.274801-9.77899z" fill="#040000" ></path></svg>'},{name:"2",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M0 0h1024v1024H0z" fill="#E6A6C9" ></path><path d="M315.1 368.1c-23.9 0-43.3-19.4-43.3-43.3s19.4-43.3 43.3-43.3 43.3 19.4 43.3 43.3-19.4 43.3-43.3 43.3z m0-74.7c-17.3 0-31.3 14.1-31.3 31.3 0 17.3 14.1 31.3 31.3 31.3 17.3 0 31.3-14.1 31.3-31.3 0-17.2-14-31.3-31.3-31.3zM738.7 368.1c-23.9 0-43.3-19.4-43.3-43.3s19.4-43.3 43.3-43.3 43.3 19.4 43.3 43.3-19.4 43.3-43.3 43.3z m0-74.7c-17.3 0-31.3 14.1-31.3 31.3 0 17.3 14.1 31.3 31.3 31.3 17.3 0 31.3-14.1 31.3-31.3 0-17.2-14-31.3-31.3-31.3zM293.5 698.8l-14.5-1.3c0.1-0.6 1.5-14.6 15.1-27.9 17.2-16.7 45-24.8 82.7-24 4.9-0.1 10.9-10.5 16.1-19.6 8.4-14.7 19-33.1 37.9-34.3 19.4-1.2 42.2 16.4 71.5 55.4 9.9 5.2 16.5 11.2 21.8 16.1 8.4 7.7 13.1 11.9 25.1 10.8 14.9-1.4 38.9-11.1 77.5-31.4 26.8-28.4 56.4-41.4 83.5-36.6 27.9 4.9 50.6 27.6 67.5 67.5l-13.4 5.7c-14.7-34.5-34.3-54.9-56.7-58.8-22.3-3.9-47.6 7.8-71.2 33.1l-0.8 0.9-1.1 0.6c-85.6 45.1-99.4 38-120.2 19.1-5.5-5-11.2-10.2-20.1-14.7l-1.5-0.8-1-1.4c-32.2-43.2-50.4-51.6-60-51-11.1 0.7-18.8 14-26.2 27-7.6 13.2-15.4 26.9-28.8 26.9h-0.2c-78.4-1.6-83 38.3-83 38.7z" fill="#040000" ></path></svg>'},{name:"3",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1026 1024" ><path d="M1.1 1.097642h1021.804716v1021.804716H1.1z" fill="#F7E983" ></path><path d="M1024.002358 1024H0.002358V0h1024v1024z m-1021.804716-2.195284h1019.609433V2.195284H2.197642v1019.609432z" fill="#FFFFFF" ></path><path d="M329.174412 344.491728a38.118106 10.277919 57.6 1 0 17.355867-11.014369 38.118106 10.277919 57.6 1 0-17.355867 11.014369Z" fill="#040000" ></path><path d="M644.769475 355.956059a11.175989 36.321965 30 1 0 36.321965-62.911488 11.175989 36.321965 30 1 0-36.321965 62.911488Z" fill="#040000" ></path><path d="M569.678445 671.158059c-26.343403 0-51.190021-5.288638-70.049503-14.967843-20.755408-10.577275-32.230754-25.445332-32.230755-41.710388 0-16.265056 11.475346-31.133112 32.230755-41.710387 18.859482-9.579419 43.805886-14.967843 70.049503-14.967843s51.190021 5.288638 70.049503 14.967843c20.755408 10.577275 32.230754 25.445332 32.230754 41.710387 0 16.265056-11.475346 31.133112-32.230754 41.710388-18.859482 9.679205-43.805886 14.967843-70.049503 14.967843z m0-95.095693c-49.693237 0-84.318846 20.356266-84.318846 38.517248s34.625609 38.517248 84.318846 38.517248 84.318846-20.356266 84.318846-38.517248-34.725395-38.517248-84.318846-38.517248z" fill="#040000" ></path></svg>'},{name:"4",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1026 1024" ><path d="M1.1 1.097642h1021.804716v1021.804716H1.1z" fill="#A6D9E2" ></path><path d="M1024.002358 1024H0.002358V0h1024v1024z m-1021.804716-2.195284h1019.609433V2.195284H2.197642v1019.609432z" fill="#FFFFFF" ></path><path d="M376.194134 348.950302m-23.44962 0a23.44962 23.44962 0 1 0 46.89924 0 23.44962 23.44962 0 1 0-46.89924 0Z" fill="#040000" ></path><path d="M629.150672 348.950302m-24.647047 0a24.647047 24.647047 0 1 0 49.294095 0 24.647047 24.647047 0 1 0-49.294095 0Z" fill="#040000" ></path><path d="M397.847613 603.503411c13.471058 8.282206 28.738258 14.468914 43.7061 19.458195 29.835899 9.978562 62.266225 14.169558 93.299551 7.483921 21.054765-4.490353 40.213604-14.369129 56.778016-28.039758 6.785422-5.587995-2.893783-15.167414-9.579419-9.579419-46.999026 38.916391-112.258819 31.033327-163.847983 6.086922-4.590138-2.195284-9.080491-4.490353-13.371272-7.184564-7.583707-4.590138-14.468914 7.184564-6.984993 11.774703z" fill="#040000" ></path><path d="M627.753674 534.052621c-31.033327 24.048334-58.474371 68.253362-37.419607 106.970182 10.577275 19.35841 29.835899 32.629897 48.795167 42.708244 7.982849 4.190996 15.067628-7.883064 7.084779-12.07406-25.245761-13.271487-53.485091-35.324108-49.094524-66.557006 2.793997-20.156695 15.766127-37.319821 29.736114-51.190022 3.392711-3.392711 6.984993-6.785422 10.776847-9.77899 2.993569-2.295069 2.394855-7.483921 0-9.878776-2.893783-3.19314-6.885208-2.49464-9.878776-0.199572z" fill="#040000" ></path></svg>'},{name:"5",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1026 1024" ><path d="M1.1 1.097642h1021.804716v1021.804716H1.1z" fill="#AD6F59" ></path><path d="M1024.002358 1024H0.002358V0h1024v1024z m-1021.804716-2.195284h1019.609433V2.195284H2.197642v1019.609432z" fill="#FFFFFF" ></path><path d="M411.829832 330.730879a38.118106 10.277919 57.6 1 0 17.355867-11.014368 38.118106 10.277919 57.6 1 0-17.355867 11.014368Z" fill="#040000" ></path><path d="M480.669675 609.989476c11.774703-25.844475 27.740401-51.788735 44.60417-73.342429 13.770415-17.462483 29.237186-33.92711 47.897096-44.803742 17.262912-10.078347 35.324108-13.67063 54.283376-6.58585 11.974274 4.390567 23.948548 14.468914 33.128825 24.547261 14.369129 15.865913 25.145975 34.625609 34.725394 53.684662 4.290782 8.581563 17.262912 0.997856 12.972131-7.583707-15.167414-30.334828-35.224323-63.763009-66.157864-80.327421-21.054765-11.37556-44.504385-11.475346-66.157864-1.895927-21.054765 9.280062-38.617034 25.644904-53.485091 42.907815-14.468914 16.863769-27.041902 35.324108-38.217891 54.582733-5.887351 10.178133-11.674917 20.555837-16.464627 31.232898-1.696355 3.692068-0.997856 7.982849 2.694212 10.277918 3.19314 1.895927 8.581563 0.898071 10.178133-2.694211z" fill="#040000" ></path><path d="M663.863649 338.091735a14.468914 33.727538 30 1 0 33.727538-58.417811 14.468914 33.727538 30 1 0-33.727538 58.417811Z" fill="#040000" ></path></svg>'},{name:"6",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M762.9 77.4H261.1L10.2 512l250.9 434.6h501.8L1013.8 512z" fill="#83CEE3" ></path><path d="M369 375.8m-34.6 0a34.6 34.6 0 1 0 69.2 0 34.6 34.6 0 1 0-69.2 0Z" fill="#040000" ></path><path d="M369 411.7c-19.8 0-36-16.1-36-36s16.1-36 36-36 36 16.1 36 36-16.1 36-36 36z m0-69.1c-18.3 0-33.2 14.9-33.2 33.2S350.7 409 369 409s33.2-14.9 33.2-33.2-14.9-33.2-33.2-33.2z" fill="#FFFFFF" ></path><path d="M672.2 333.6c-15.1 7.6-30.2 15.6-44.3 25-5.9 3.9-17 10.4-14.6 19.1 1.8 6.5 12 11.2 17.3 14.3 15.7 9.3 32.1 17.6 48.3 25.9 8.6 4.4 16.2-8.5 7.6-13-14.1-7.3-28.3-14.5-42.1-22.3-3.9-2.2-7.9-4.5-11.7-6.9-1.2-0.8-2.4-1.5-3.5-2.4-0.6-0.4-1.1-0.8-1.6-1.2 2.2 1.7-0.3-0.3-0.3-0.3-0.9 0.1-1.5-3.2-0.2 0.5 0.9 2.4 1.1 3.8 0.3 5.8 0.6-1.5-0.9 0.8-0.1 0 0.5-0.5 1-1.1 1.6-1.6 0.5-0.5 1-0.9 1.6-1.3 0.6-0.5 0 0 1.2-0.9 1.7-1.3 3.5-2.5 5.3-3.6 8.4-5.5 17.2-10.4 26-15.2 5.6-3 11.2-6 16.8-8.9 8.6-4.4 1-17.3-7.6-13zM578.2 720.9c-12.5-96.7-33.3-154.7-55.6-155.6-8.8 3.9-22.3 17.5-37.7 60.1-10.8 29.8-18.4 62.2-23 81.6-1.2 5.1-2.1 9.1-2.9 11.8l-9.3-2.4c0.7-2.6 1.6-6.6 2.8-11.6 14.9-63 36-136.8 67.5-148.8l0.8-0.3h0.8c18.2-0.4 33.2 19.5 45.8 60.8 10.2 33.3 16.7 74.6 20.5 103.3l-9.7 1.1z" fill="#040000" ></path></svg>'},{name:"7",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M762.9 77.4H261.1L10.2 512l250.9 434.6h501.8L1013.8 512z" fill="#8CC66D" ></path><path d="M375.778679 404.47473a14.5 33.8 30 1 0 33.8-58.543317 14.5 33.8 30 1 0-33.8 58.543317Z" fill="#040000" ></path><path d="M627.220263 374.211388a43.1 11.6 57.6 1 0 19.588408-12.431182 43.1 11.6 57.6 1 0-19.588408 12.431182Z" fill="#040000" ></path><path d="M451.1 548.5c17.6-9.3 63.9-30 105.3-16.2 17 20.3 32.7 98.8 28.8 138.1-27.5 10.2-82.5 10.2-106.1 5.8-8.3-10.5-32.7-81.8-35.3-114.6-0.4-5.5 2.5-10.6 7.3-13.1z" fill="#040000" ></path></svg>'},{name:"8",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M762.9 77.4H261.1L10.2 512l250.9 434.6h501.8L1013.8 512z" fill="#5A74B8" ></path><path d="M357.7 400m-34.6 0a34.6 34.6 0 1 0 69.2 0 34.6 34.6 0 1 0-69.2 0Z" fill="#040000" ></path><path d="M357.7 436c-19.8 0-36-16.1-36-36s16.1-36 36-36 36 16.1 36 36-16.2 36-36 36z m0-69.2c-18.3 0-33.2 14.9-33.2 33.2s14.9 33.2 33.2 33.2 33.2-14.9 33.2-33.2-14.9-33.2-33.2-33.2z" fill="#FFFFFF" ></path><path d="M676 400m-34.6 0a34.6 34.6 0 1 0 69.2 0 34.6 34.6 0 1 0-69.2 0Z" fill="#040000" ></path><path d="M676 436c-19.8 0-36-16.1-36-36s16.1-36 36-36 36 16.1 36 36-16.2 36-36 36z m0-69.2c-18.3 0-33.2 14.9-33.2 33.2s14.9 33.2 33.2 33.2c18.3 0 33.2-14.9 33.2-33.2s-14.9-33.2-33.2-33.2z" fill="#FFFFFF" ></path><path d="M347.6 684.1c0.3-0.9 0.6-1.7 0.9-2.6 0.2-0.5 1.4-3.2 0.3-0.8 0.6-1.4 1.3-2.9 2-4.3 3.2-6.3 6-10.7 10.9-15.3 4.3-4 10.8-7.5 17.1-6.1 3.9 0.9 7.9 4.9 11.1 7.2 3.1 2.2 6.3 4.5 9.7 6.2 7.5 3.8 15.3 4.4 23.4 1.9 4.7-1.5 9.2-3.6 13.6-5.9 5-2.6 10.7-5 14.2-9.5 4.5-5.7 6.1-8.5 11.4-14.1 1-1 2-2 3.1-3 0.2-0.2 2.2-1.7 0.6-0.5 0.6-0.4 1.2-0.9 1.8-1.3 1-0.6 2.1-1.3 3.2-1.7-2 0.8 0.2 0 0.6-0.1 2.3-0.7-0.3-0.2 1.2-0.3 2.8-0.1 3.6 0 5.5 1 3.8 1.9 6.6 4.7 9.5 7.8 4.5 5 7.5 11.1 11.7 16.2 1.8 2.2 3.7 4.3 5.4 6.5 8.1 10.3 17.7 22.2 32.2 22 8.8-0.1 16.6-5.2 22.6-11.2 4.2-4.1 7.7-8.9 11-13.7 2.9-4.2 4.6-9.9 6.2-13.5 3.2-7.1 7.2-13.1 13-18.1 4.8-4.2 11.1-6.5 16.7-5.3 10.5 2.4 17.2 12.1 23.1 20.2 4.7 6.5 9.8 13 16 18.2 7.8 6.4 17.1 11.4 27.5 11.1 14.1-0.4 25.5-9.5 34.2-19.9 3-3.6 3.6-8.8 0-12.4-3.1-3.1-9.4-3.7-12.4 0-6.3 7.6-14.7 15.9-24.9 14.7-2.2-0.3-5.3-1.5-7.9-3.1-3.5-2.1-6.1-4.4-9.1-7.5-4.9-5.1-6.8-8.1-10.9-13.8-7.3-10.1-16.1-19.6-28.2-23.7-18.5-6.3-35.7 5.6-46 20.1-2.4 3.3-4.4 6.9-6.1 10.6-1.8 3.9-2.7 8.5-5.2 11.9-3.1 4.4-6.2 8.8-10.2 12.5-3 2.8-5.7 4.4-8.6 5.1-0.4 0.1-1.7 0.1 0.1 0h-2.2c2.1 0.1 0 0-0.5-0.1-0.7-0.2-1.4-0.4-2-0.6 1.8 0.7-1.8-1.1-2.4-1.5l-1.2-0.9c1.5 1.2-0.9-0.9-1.2-1.1-4.7-4.3-8.4-9.5-12.3-14.4-10.9-13.6-20.9-34-41-34.9-14.2-0.6-24.5 10.6-32.4 20.8-1.2 1.6-2.5 3.2-3.7 4.8-1.5 1.9 1.1-1.4-0.4 0.5-0.4 0.5-0.8 1.2-1.3 1.6-1.7 1.4-4.6 2.6-6.6 3.6-2.9 1.6-5.9 3.2-9 4.5-1.6 0.7-3.4 1.2-5.1 1.7-2.2 0.6-0.7 0.5-2.8 0.4-2.8 0-3.9-0.4-6.6-1.9-3.9-2.2-7.5-4.9-11.1-7.5-5.6-4-10-6.9-17-7.5-10.5-0.9-20.3 3.2-28.2 9.9-9.4 8.1-16.4 20.2-20.1 32-3.6 11.2 13.3 15.8 16.8 5.1z" fill="#040000" ></path></svg>'},{name:"9",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M762.9 77.4H261.1L10.2 512l250.9 434.6h501.8L1013.8 512z" fill="#F0884F" ></path><path d="M287.2 382c6.4 2.3 11.6-3.7 15.4-7.9 5.1-5.5 10.2-11 16-15.9 0.8-0.7 1.7-1.4 2.5-2.1 1.2-0.9-1.7 1.3 0.2-0.2l1.2-0.9c2.1-1.5 4.3-2.9 6.5-4.3 2-1.2 4-2.2 6.1-3.2 0.6-0.3 1.2-0.6 1.9-0.9-0.3 0.2-1.5 0.6 0.2-0.1 1.3-0.5 2.6-1 4-1.5 11.2-3.7 21.8-4 33.4-1.1 19.5 4.9 36.4 17 51.2 30.2 8.6 7.7 21.4-5 12.7-12.7-25.2-22.6-57.1-42.1-92.2-36.2-20.4 3.4-37.7 16.1-51.6 30.9-2.3 2.4-4.5 5-6.8 7.4-0.7 0.7-1.9 1.5-2.4 2.4-0.5 0.8 2.3-1.5 0.8-0.7 1.3-0.7 3.9-1.4 5.8-0.7-11.1-3.7-15.8 13.7-4.9 17.5zM598 382c6.4 2.3 11.6-3.7 15.4-7.9 5.1-5.5 10.2-11 16-15.9 0.8-0.7 1.7-1.4 2.5-2.1 1.2-0.9-1.7 1.3 0.2-0.2l1.2-0.9c2.1-1.5 4.3-2.9 6.5-4.3 2-1.2 4-2.2 6.1-3.2 0.6-0.3 1.2-0.6 1.9-0.9-0.3 0.2-1.5 0.6 0.2-0.1 1.3-0.5 2.6-1 4-1.5 11.2-3.7 21.8-4 33.4-1.1 19.5 4.9 36.4 17 51.2 30.2 8.6 7.7 21.4-5 12.7-12.7-25.2-22.6-57.1-42.1-92.2-36.2-20.4 3.4-37.7 16.1-51.6 30.9-2.3 2.4-4.5 5-6.8 7.4-0.7 0.7-1.9 1.5-2.4 2.4-0.5 0.8 2.3-1.5 0.8-0.7 1.3-0.7 3.9-1.4 5.8-0.7-11.1-3.7-15.8 13.7-4.9 17.5zM505.9 527.1c3.4 0.7 6.8 1.7 10.2 2.8 6.7 2.2 10.4 3.5 16.6 7.7 1.6 1.1-0.5-0.5 0.6 0.5 0.6 0.5 1.1 1.1 1.7 1.6 1.5 1.4-0.1-0.4 0.5 0.6 0.4 0.6 0.7 1.2 1 1.8-1-2 0.1 0 0 0.5 0.1-2-0.1 0-0.1 0-0.1 0.8 0 0.7 0.1-0.5-0.1 0.4-0.1 0.7-0.3 1.1-0.6 1 0.7-0.9-0.4 1-1.6 2.5-4.6 5.4-8.1 7.8-6.8 4.6-14.4 8.2-22 11.4-7 3-7.4 11.9 0 14.8 7.4 2.8 15 5.3 22.4 8.1 3.1 1.1 4.2 1.5 6.9 2.9 1.1 0.6 2.1 1.2 3.2 1.8 1.2 0.8-0.7-0.5 0.1 0 0.4 0.3 0.8 0.7 1.1 1.1 0.6 0.8-1.1-1.2-0.2-0.2 0.8 0.9-0.3-1.4-0.1-0.2 0.1 0.9 0.2-1.9 0-0.9-0.1 0.5-0.8 1.8 0 0.2-0.2 0.5-0.5 1-0.8 1.4-0.3 0.3-0.9 1.3-0.3 0.5-0.5 0.7-1.1 1.3-1.7 1.9-6.9 7.3-15.9 12.8-24.4 18.1-8.3 5.3-0.6 18.5 7.7 13.2 9.9-6.3 20.9-12.8 28.6-21.8 4.8-5.5 8.1-12.9 4.2-19.9-3.4-6-10.5-8.9-16.6-11.4-8.6-3.5-17.5-6.2-26.2-9.5v14.8c14.4-6.1 47.2-18.8 41.2-40.3-3.5-12.9-19.4-18.9-30.8-22.6-3.4-1.1-6.9-2.1-10.5-2.9-9.1-2.2-13.3 12.5-3.6 14.6z" fill="#040000" ></path></svg>'},{name:"10",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M762.9 77.4H261.1L10.2 512l250.9 434.6h501.8L1013.8 512z" fill="#F6F180" ></path><path d="M342.9 400.6m-29.5 0a29.5 29.5 0 1 0 59 0 29.5 29.5 0 1 0-59 0Z" fill="#040000" ></path><path d="M342.9 431.3c-16.9 0-30.7-13.8-30.7-30.7s13.8-30.7 30.7-30.7 30.7 13.8 30.7 30.7-13.7 30.7-30.7 30.7z m0-59c-15.6 0-28.3 12.7-28.3 28.3s12.7 28.3 28.3 28.3 28.3-12.7 28.3-28.3-12.6-28.3-28.3-28.3z" fill="#FFFFFF" ></path><path d="M702 400.6m-29.5 0a29.5 29.5 0 1 0 59 0 29.5 29.5 0 1 0-59 0Z" fill="#040000" ></path><path d="M702 431.3c-16.9 0-30.7-13.8-30.7-30.7s13.8-30.7 30.7-30.7 30.7 13.8 30.7 30.7-13.8 30.7-30.7 30.7z m0-59c-15.6 0-28.3 12.7-28.3 28.3s12.7 28.3 28.3 28.3 28.3-12.7 28.3-28.3-12.7-28.3-28.3-28.3z" fill="#FFFFFF" ></path><path d="M358.7 519.9c20 22 45.5 40.4 71.3 54.8 51.2 28.5 111.7 39.9 168 19.5 44.3-16.1 80.7-47.8 110.2-83.9 3-3.7 3.6-8.9 0-12.5-3.1-3.1-9.5-3.7-12.5 0-25.5 31.4-56.2 59.7-93.7 76-27.1 11.7-56.6 15.7-85.8 12.2-24.7-2.9-49.5-11.8-71.5-23.4-18.7-9.8-36.6-22.2-51.1-34.3-7.8-6.5-15.5-13.3-22.4-20.9-7.7-8.5-20.1 4.1-12.5 12.5z" ></path></svg>'},{name:"11",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M48.2 844.9c-68.5-210.6 186-782.1 409.1-795.4 6.3-0.4 12.5 0.2 18.6 1.6C665.1 94.6 985.4 515 987.1 821.3c0.1 20-12.9 37.9-22.4 43.1-162.7 89.8-605.8 179.7-884.4 30.9-15-7.9-24.2-26.1-32.1-50.4z" fill="#F0884F" ></path><path d="M401 352.1m-52.4 0a52.4 52.4 0 1 0 104.8 0 52.4 52.4 0 1 0-104.8 0Z" fill="#FFFFFF" ></path><path d="M408.7 329m-29.3 0a29.3 29.3 0 1 0 58.6 0 29.3 29.3 0 1 0-58.6 0Z" fill="#040000" ></path><path d="M527.5 352.1m-52.4 0a52.4 52.4 0 1 0 104.8 0 52.4 52.4 0 1 0-104.8 0Z" fill="#FFFFFF" ></path><path d="M527.5 329m-29.3 0a29.3 29.3 0 1 0 58.6 0 29.3 29.3 0 1 0-58.6 0Z" fill="#040000" ></path><path d="M450.7 517c1.1-8.2 3.2-16.4 6.1-24.1 0.1-0.3 1-2.5 0.5-1.4s0.3-0.7 0.5-1c0.7-1.4 1.4-2.8 2.2-4.1 0.4-0.8 2.8-3.9 1.3-2.1 0.8-1 1.7-1.9 2.6-2.8 1-1-1.5 1 0.1 0 0.5-0.3 1-0.6 1.5-0.8-1.3 0.7-1.2 0.3 0 0.1 1.9-0.3-1.8 0.3 0.1 0 1.2-0.2 1.5 0.3 0-0.1 0.6 0.2 1.3 0.3 1.9 0.5 0.3 0.1-1.3-0.7 0.2 0.1 0.8 0.5 1.6 0.9 2.4 1.4 1.4 1 0-0.1 1.4 1.1 0.9 0.8 1.8 1.7 2.6 2.6 1.8 1.9 3.5 3.9 5 6.1 5.1 7.1 9.3 14.8 13.2 22.6 3.5 6.9 13.7 4.7 15.8-2.1 2.6-8.7 4.8-17.4 7.4-26.1 0.9-3.2 1.9-6.4 3.2-9.4-0.7 1.6 0.8-1.6 1.2-2.2l0.9-1.5c0.7-1.2-1.4 0.7 0.1-0.1 1.7-0.9-1.2 0.3-0.3 0.1 0.8-0.2 1-1.2 0.3-0.3-0.6 0.8 0.6 0-0.5 0.2-2 0.3 2.4 0.5-1.1 0 0.5 0.1 1.2 0.2 1.6 0.4-1.1-0.8-0.8-0.4 0.2 0.2 0.7 0.4 3.4 2.3 2.7 1.8 8.9 7.1 15.9 16.9 22.5 26 2.8 3.8 7.5 5.6 11.8 3.1 3.7-2.2 5.9-8 3.1-11.8-8.2-11.1-16.6-23-27.7-31.4-6.3-4.7-14.5-7.6-21.7-3-6.7 4.2-9.6 12.5-11.9 19.6-3.2 9.9-5.5 20-8.6 29.9 5.3-0.7 10.5-1.4 15.8-2.1-7.8-15.5-24.8-50.1-48-41.7-14.1 5.1-19.7 23-22.9 36.2-0.9 3.8-1.8 7.7-2.3 11.6-0.6 4.6 1.1 9.3 6 10.6 4.2 1 10.2-1.5 10.8-6.1z" fill="#040000" ></path></svg>'},{name:"12",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M485.538528 993.072489a362.00362 481.804818 3.149 1 0 52.933731-962.15464 362.00362 481.804818 3.149 1 0-52.933731 962.15464Z" fill="#AADCF0" ></path><path d="M688.2 334.1c-15.1 7.6-30.2 15.6-44.3 25-5.9 3.9-17 10.4-14.6 19.1 1.8 6.5 12 11.2 17.3 14.3 15.7 9.3 32.1 17.6 48.3 25.9 8.6 4.4 16.2-8.5 7.6-13-14.1-7.3-28.3-14.5-42.1-22.3-3.9-2.2-7.9-4.5-11.7-6.9-1.2-0.8-2.4-1.5-3.5-2.4-0.6-0.4-1.1-0.8-1.6-1.2 2.2 1.7-0.3-0.3-0.3-0.3-0.9 0.1-1.5-3.2-0.2 0.5 0.9 2.4 1.1 3.8 0.3 5.8 0.6-1.5-0.9 0.8-0.1 0 0.5-0.5 1-1.1 1.6-1.6 0.5-0.5 1-0.9 1.6-1.3 0.6-0.5 0 0 1.2-0.9 1.7-1.3 3.5-2.5 5.3-3.6 8.4-5.5 17.2-10.4 26-15.2 5.6-3 11.2-6 16.8-8.9 8.6-4.4 1-17.4-7.6-13zM375.8 347c13.4 6.8 26.7 14 39.5 21.9 1.8 1.2 3.7 2.3 5.5 3.5 0.9 0.6 1.7 1.2 2.6 1.8 0.9 0.6 1.9 1.4 1.6 1.1 1.1 0.9 2.1 1.9 3.1 2.8 1.2 1 0-0.3 0.1 0 0-0.2-0.8-2.4-0.3-4.1 1.5-5.5 2.3-2.7 0.8-2-0.4 0.2-0.9 0.8-1.3 1.1 1.7-1.4-1.6 1.1-2.3 1.6-3.4 2.3-6.9 4.4-10.4 6.4-14.9 8.6-30.3 16.4-45.6 24.3-8.6 4.4-1 17.4 7.6 13 15-7.7 30.1-15.4 44.8-23.8 6.2-3.6 13.8-7.3 18.7-12.7 7.6-8.3-3.8-16.6-9.9-20.9-8.7-6.1-18-11.3-27.3-16.4-6.5-3.6-13-7.1-19.6-10.4-8.6-4.5-16.3 8.5-7.6 12.8zM412.8 570.9c13.5 7.7 28.5 13.3 43.3 17.9 29.8 9.2 61.7 13.1 92.6 7.3 20.6-3.9 40-12.5 56.6-25.2 2.8-2.2 4.3-5.6 2.3-9-1.6-2.8-6.2-4.5-9-2.3-48.3 36.9-113.3 30-165.6 6.7-4.6-2.1-9.2-4.2-13.7-6.7-7.3-4.2-13.9 7.2-6.5 11.3z" fill="#040000" ></path><path d="M644.6 505.2c-30.1 21.5-60.6 62.5-39.1 99.8 10.7 18.6 30.3 30.9 49.1 40.1 7.8 3.8 14.6-7.9 6.8-11.7-23.6-11.5-53.7-31.4-49.4-60.9 2.8-18.9 15.8-34.6 29.5-47.2 2.5-2.3 5.1-4.6 7.8-6.7 0.5-0.4 0.9-0.7 1.4-1.1-0.4 0.3-1.2 0.9-0.1 0.1l0.9-0.6c6.9-5.1 0.2-16.8-6.9-11.8z" fill="#040000" ></path></svg>'},{name:"13",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M235.1 76.9c75.6-26.5 297.3-90.1 514.2-16.6 16.3 5.5 29.8 17.4 37.1 33 57.5 122.4 127.1 602.1 62.1 785.6a62.58 62.58 0 0 1-32.5 35.8c-109.5 51.8-428.1 136.7-609.3 37.2-14.4-7.9-25-21.3-29.7-37.1-41.9-140.6-37-627.7 19.1-798 6.1-18.7 20.5-33.4 39-39.9z" fill="#F9DABD" ></path><path d="M392.2 360.2m-35.2 0a35.2 35.2 0 1 0 70.4 0 35.2 35.2 0 1 0-70.4 0Z" fill="#040000" ></path><path d="M618.6 360.2m-35.2 0a35.2 35.2 0 1 0 70.4 0 35.2 35.2 0 1 0-70.4 0Z" fill="#040000" ></path><path d="M512 562.6c-36 0-65.3-29.3-65.3-65.3S476 432 512 432s65.3 29.3 65.3 65.3-29.3 65.3-65.3 65.3z m0-122.9c-31.7 0-57.6 25.8-57.6 57.6s25.8 57.6 57.6 57.6c31.7 0 57.6-25.8 57.6-57.6s-25.9-57.6-57.6-57.6z" fill="#040000" ></path></svg>'},{name:"14",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M178.1 971.5c38.1 15.9 98.7 26.6 171.3-12.3 3.7-2 8.4-1.6 11.6 1.1 43.3 35.9 123.3 80.8 236 10.9 3.8-2.4 8.7-2.4 12.6-0.2 41.8 23.9 191.6 58.2 246.6 14.2 4.4-3.5 9.1-6.6 14.5-8.5C1065 909.5 678.2-652 194.3 351c-37.5 77.8-38.4 94.1-71.9 211.3-27.6 96.3-29.1 231.3 1.4 348.1 7.2 27.3 27.3 49.9 54.3 61.1z" fill="#ABAAAA" ></path><path d="M468.9 349H418c-6.1 0-11.1-5-11.1-11.1V336c0-6.1 5-11.1 11.1-11.1h50.9c6.1 0 11.1 5 11.1 11.1v1.9c0 6.1-5 11.1-11.1 11.1zM643 471.9H390c-6.6 0-12-5.4-12-12s5.4-12 12-12h253c6.6 0 12 5.4 12 12s-5.4 12-12 12zM609 349h-61.2c-6 0-11-4.9-11-11v-2.1c0-6 4.9-11 11-11H609c6 0 11 4.9 11 11v2.1c0 6.1-4.9 11-11 11z" fill="#040000" ></path></svg>'},{name:"15",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M673.1 318.7c3.7-17.5 5.6-35.7 5.6-54.4 0-137.9-105.5-249.7-235.6-249.7S207.4 126.4 207.4 264.3c0 55.4 17.1 106.7 45.9 148.1-55.2 63.3-88.6 145.9-88.6 236.3 0 199.2 162.1 360.6 362.1 360.6 200 0 362.1-161.5 362.1-360.6 0.1-147.3-88.7-274-215.8-330z" fill="#4F8A54" ></path><path d="M392 246.2m-47.1 0a47.1 47.1 0 1 0 94.2 0 47.1 47.1 0 1 0-94.2 0Z" fill="#FFFFFF" ></path><path d="M386 252.8m-26.4 0a26.4 26.4 0 1 0 52.8 0 26.4 26.4 0 1 0-52.8 0Z" fill="#040000" ></path><path d="M505.6 246.2m-47.1 0a47.1 47.1 0 1 0 94.2 0 47.1 47.1 0 1 0-94.2 0Z" fill="#FFFFFF" ></path><path d="M501.4 252.8m-26.4 0a26.4 26.4 0 1 0 52.8 0 26.4 26.4 0 1 0-52.8 0Z" fill="#040000" ></path><path d="M474.3 364.8h-50.9c-6.1 0-11.1-5-11.1-11.1v-1.9c0-6.1 5-11.1 11.1-11.1h50.9c6.1 0 11.1 5 11.1 11.1v1.9c0 6.2-5 11.1-11.1 11.1z" fill="#040000" ></path></svg>'},{name:"16",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M246.4 227.6c-166.9 101.1-461.9 344 87 564.1 1.5 0.6 2.9 1.1 4.4 1.6 80.7 27.7 392.8 165.4 641-198.1 40-58.6 38.5-136.2-3.7-193.3C892 289.5 727 201.1 429.1 182.7c-64.1-4-127.8 11.6-182.7 44.9z" fill="#CF92BE" ></path><path d="M617.1 393.4c-17.4 8.8-34.9 18.1-51.2 28.9-6.9 4.6-20.3 12.3-17.4 22.6 1.2 4.3 5.6 7 9 9.5 3.7 2.7 7.6 5 11.5 7.3 18.2 10.8 37.1 20.3 55.9 30 10 5.1 18.9-10 8.8-15.1-16.4-8.4-32.9-16.9-49-26-4.5-2.6-9.1-5.2-13.5-8l-4.5-3c-0.7-0.5-1.3-1-2-1.5 1.6 1.2 0.7 0.4-0.2-0.2-1.3-0.9-0.3-0.9-0.5-0.3 0.2 0.2 0.4 0.5 0.6 0.7 1 1.9 1.3 3.7 0.8 5.7 0.1-0.6 0.7-1.4-0.6 1.3 0.7-1.5-0.1 0-0.2 0.1 0.6-0.6 1.2-1.3 1.9-1.9l1.8-1.5c1.8-1.6-0.6 0.3 1.2-0.9 2-1.5 4.1-2.9 6.2-4.3 10-6.5 20.4-12.4 30.9-18 6.5-3.5 13.1-7 19.7-10.4 9.6-5 0.8-20.1-9.2-15zM323.1 408.5c15.9 8.1 31.7 16.5 46.8 26 2.2 1.4 4.3 2.8 6.5 4.2 1 0.7 1.9 1.3 2.8 2 0.5 0.3 1 0.7 1.4 1.1-1.1-0.9-0.3-0.3 0.3 0.3 1.1 1 2.2 2.2 3.3 3.1 1.4 1.1-1-1.7-0.1-0.1-0.6-1.1-0.9-4.1 0.3-6.7 2.2-4.8 0.7 0.1 0-0.5 0 0-1.1 0.9-1.3 1 2.3-1.9 0 0-0.5 0.4-0.8 0.5-1.5 1.1-2.3 1.6-4 2.7-8.1 5.1-12.3 7.5-17.3 10-35.1 19.1-52.8 28.2-10 5.1-1.2 20.2 8.8 15.1 17.5-9 35-17.9 52-27.7 7.3-4.2 15.9-8.6 21.8-14.7 9.3-9.7-4.3-19.7-11.5-24.7-10.1-7.1-20.9-13.1-31.7-19-7.6-4.2-15.2-8.2-22.9-12.1-9.7-5.2-18.6 9.9-8.6 15zM513 592.1c-12.2 0-24.6-1.4-36.3-4.3-8-2-13.9-8.2-15.4-16.2s1.7-15.8 8.4-20.5c23.2-16.3 60.5-31.9 106.2-13 6.4 2.6 11 8.3 12.3 15.1 1.3 6.7-0.8 13.6-5.7 18.3-13.5 13.1-40.9 20.6-69.5 20.6z m-37.4-32.5c-3.4 2.4-4.9 6.2-4.2 10.2 0.8 4.1 3.6 7.1 7.7 8.1 39.1 9.7 81.2 0.7 96.1-13.7 2.4-2.3 3.4-5.6 2.7-8.9-0.7-3.4-2.9-6.2-6.1-7.5-41.2-17.2-75.1-3.1-96.2 11.8z" fill="#040000" ></path></svg>'},{name:"17",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M1008.6 465.7c0-124.9-95.5-226.2-213.4-226.2-12 0-23.8 1.1-35.2 3.1v-3.1c0-124.9-95.5-226.2-213.4-226.2S333.4 114.6 333.4 239.5c0 2.4 0 4.8 0.1 7.2-17.1-4.7-35-7.2-53.4-7.2-117.8 0-213.4 101.3-213.4 226.2 0 92.1 51.9 171.3 126.3 206.6-13.7 29.9-21.4 63.4-21.4 98.8 0 124.9 95.5 226.2 213.4 226.2 68.8 0 130-34.5 169-88.1 39 53.6 100.2 88.1 169 88.1 117.8 0 213.4-101.3 213.4-226.2 0-41.2-10.4-79.9-28.6-113.1 60.5-39.9 100.8-111.1 100.8-192.3z" fill="#8CC66D" ></path><path d="M437.8 400.7m-24.7 0a24.7 24.7 0 1 0 49.4 0 24.7 24.7 0 1 0-49.4 0Z" fill="#040000" ></path><path d="M649.7 400.7m-24.7 0a24.7 24.7 0 1 0 49.4 0 24.7 24.7 0 1 0-49.4 0Z" fill="#040000" ></path><path d="M527.3 625.9c6.3-14.2 13.1-28.3 17.9-43 6.2-19 8.3-38.6 10.5-58.3l2.1-19.2c0.7-6.2-9-6.1-9.7 0-1.7 16.3-2.8 32.8-5.7 48.9-4.2 23.7-13.8 45-23.5 66.7-2.5 5.6 5.9 10.5 8.4 4.9z" fill="#252525" ></path><path d="M447.7 522.3c20.3-0.1 40.6-0.2 61-0.4l96.6-0.6c7.5 0 14.9-0.1 22.4-0.1 16.6-0.1 16.7-25.9 0-25.8-20.3 0.1-40.6 0.2-61 0.4l-96.6 0.6c-7.5 0-14.9 0.1-22.4 0.1-16.6 0.1-16.7 25.9 0 25.8z" fill="#040000" ></path><path d="M495.4 508.2c-10.3 3.8-9.2 20.9-9.2 29.5 0.1 16 2.1 32.3 6.1 47.8 3.5 13.7 8.7 29.9 20.6 38.7 12.9 9.5 27.6 2.1 37.6-7.9 10.2-10.3 17.8-23 24.7-35.6 11.6-21.3 20.9-43.8 29.7-66.4 3-7.8-9.5-11.1-12.5-3.4-7.4 19.1-15.3 38.1-24.7 56.4-5.9 11.5-12.2 23-20.3 33.1-2.8 3.5-5.8 6.9-9.2 9.8-1.9 1.7-1.4 1.3-3.3 2.5-1.3 0.8-2.6 1.6-3.9 2.2-0.7 0.3 1-0.2-0.8 0.3-0.6 0.2-1.2 0.3-1.8 0.5-1.1 0.3-1.2 0.2-0.5 0.1-0.6 0-1.3 0-1.9 0.1-2.2 0.1 0.6 0.5-1.8-0.2l-1.8-0.6c1.5 0.5 0.2 0.1-0.5-0.3-0.8-0.5-2.9-2.1-1.7-1.1-1-0.9-2-1.7-2.8-2.7-0.4-0.5-0.9-1-1.3-1.5 0.4 0.5 0.1 0.2-0.5-0.7-0.8-1.3-1.7-2.5-2.4-3.9-0.7-1.3-1.4-2.5-2-3.8-0.4-0.8-0.8-1.6-1.1-2.4-0.1-0.2-0.5-1.1 0 0l-0.6-1.5a86.8 86.8 0 0 1-3.3-9.8c-4.4-14.9-6.2-27.9-6.8-42.8-0.3-6.6-0.3-13.1 0.4-19.7 0.2-1.5-0.3 1.5 0.1-0.5l0.3-1.8c0.2-0.9 0.5-1.8 0.7-2.8 0.4-1.9-0.7 1.1 0.3-0.7 0.5-1-1.3 1.2-0.3 0.5-0.3 0.3-1.1 0.8-2 1.1 7.7-2.9 4.3-15.4-3.5-12.5z" fill="#040000" ></path></svg>'},{name:"18",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M75.4 739.8c-78.7-134.4-194-455.7 401.4-579.6 9.8-2 19.2-6.2 29.2-7.5C656.8 133 947.3 205 1000.1 578.4c42.6 223.8 29.7 392.1-822 233.6-43.1-8-80.6-34.4-102.7-72.2z" fill="#F09495" ></path><path d="M704.6 875.4c-129 0-301.8-20.5-526.6-62.3-43.5-8.1-81.2-34.6-103.5-72.7-19.3-32.9-44.8-84.3-57.1-142.5-13.9-65.1-8.8-125.3 15.1-179.2 54.3-122.3 203.7-209.6 444-259.6 4.1-0.9 8.3-2.1 12.3-3.4 5.5-1.7 11.1-3.4 16.9-4.2 29-3.8 75.7-5.9 133.8 5.7 54.5 10.9 105.3 31 150.8 59.9C843.7 251 888.2 296 922.7 351c39.7 63.1 66.1 139.6 78.5 227.3 8.1 42.4 15.2 87.3 12.5 127.9-2.8 42.6-16.4 75.5-41.5 100.7-42.5 42.7-120.3 65-237.8 68.1-9.6 0.2-19.6 0.4-29.8 0.4zM76.3 739.3c22 37.6 59.2 63.7 102.1 71.7 242.5 45.1 424.4 65.3 556.1 61.9 116.9-3.1 194.1-25.2 236.3-67.5 55.4-55.6 44.4-142.5 28.3-226.7C976 415.8 903.4 291.5 789.2 219c-124-78.7-248.1-69.9-283.2-65.3-5.6 0.7-11.2 2.4-16.6 4.1-4.1 1.2-8.3 2.5-12.5 3.4C237.3 211.1 88.5 298 34.5 419.6c-54.6 122.8 2.8 253 41.8 319.7z" fill="#FFFFFF" ></path><path d="M424.1 442.5m-24.7 0a24.7 24.7 0 1 0 49.4 0 24.7 24.7 0 1 0-49.4 0Z" fill="#040000" ></path><path d="M635.9 442.5m-24.7 0a24.7 24.7 0 1 0 49.4 0 24.7 24.7 0 1 0-49.4 0Z" fill="#040000" ></path><path d="M426.2 543.3c17.1 7.9 36.6 26 25.5 46.1-6.9 12.5-19.8 21.2-31.7 28.4-4.5 2.7-0.4 9.8 4.1 7.1 17.4-10.5 41.6-27.6 39-51.1-1.6-14-12.4-24.8-23.5-32.3-3-2-6.1-3.9-9.3-5.4-4.8-2.1-8.9 5-4.1 7.2zM629.5 535.4c-21.8 11.7-40.6 37-25.7 61.3 8.2 13.4 22.2 22.7 35.7 30.3 4.7 2.7 8.9-4.6 4.2-7.2-15.5-8.7-39.9-23.9-36.9-45.2 1.6-11.4 10.7-20.7 19.6-27.2 2.4-1.7 4.8-3.4 7.4-4.8 4.7-2.5 0.4-9.8-4.3-7.2z" fill="#040000" ></path><path d="M457.2 584.6c25.6 25.6 66.7 41 101.8 28.3 18.2-6.6 33.2-19.1 45.5-33.8 4.2-5.1-3-12.4-7.3-7.3-18.5 22-43.3 38.1-73 35-18.6-1.9-36.2-10.8-50.9-22-2.9-2.2-6.1-4.8-8.8-7.5-4.7-4.7-12 2.6-7.3 7.3z" fill="#040000" ></path></svg>'},{name:"19",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M915.9 510.5c8.4-19 13.1-39.8 13.1-61.7 0-90-78.9-162.9-176.2-162.9-3.2 0-6.3 0.1-9.5 0.2v-0.2c0-94.8-116.2-171.6-259.6-171.6S224 191.2 224 286v2c-96.2 0-174.1 72-174.1 160.9 0 38 14.3 73 38.2 100.5-41.8 29.4-68.8 75.9-68.8 128.2 0 88.9 78 160.9 174.1 160.9 17.1 0 33.6-2.3 49.3-6.5 28.9 46.1 88.7 77.7 157.6 77.7 49.4 0 94-16.2 126-42.3 32 26.1 76.6 42.3 126 42.3 77.3 0 143-39.7 166.7-95 3.1 0.2 6.3 0.2 9.5 0.2 97.3 0 176.2-72.9 176.2-162.9 0-60.6-35.7-113.4-88.8-141.5z" fill="#5A74B8" ></path><path d="M357.6 449.5a46.6 73.2 0 1 0 93.2 0 46.6 73.2 0 1 0-93.2 0Z" fill="#FEFEFD" ></path><path d="M357.5 449.5a25.1 39.4 0 1 0 50.2 0 25.1 39.4 0 1 0-50.2 0Z" fill="#040000" ></path><path d="M531.3 449.5a46.6 73.2 0 1 0 93.2 0 46.6 73.2 0 1 0-93.2 0Z" fill="#FEFEFD" ></path><path d="M531.2 449.5a25.1 39.4 0 1 0 50.2 0 25.1 39.4 0 1 0-50.2 0Z" fill="#040000" ></path><path d="M426.7 574.6c20.9 29.9 59.7 52.2 96.2 38.6 19.2-7.2 34.7-21.2 47.6-36.9 2.8-3.5 3.4-8.3 0-11.7-2.9-2.9-8.9-3.5-11.7 0-16.5 20.2-40.9 40.9-68.1 35.5-17.3-3.4-31-13.2-42.9-25.9-2-2.2-3.9-4.4-5.8-6.7-1.6-1.9 1.1 1.5-0.4-0.6-0.2-0.2-0.3-0.5-0.5-0.7-6.2-8.7-20.6-0.4-14.4 8.4z" fill="#040000" ></path></svg>'},{name:"20",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M792.8 301.4c-8.2 0-16.2 0.4-24.2 1.3-12.3-81.8-129.2-145.9-271.8-145.9-137.1 0-250.5 59.3-269.9 136.6C105.3 295.5 7.4 391.2 7.4 508.9c0 119.1 100.2 215.6 223.7 215.6 5.3 0 10.6-0.2 15.8-0.5 14.4 80.5 130.4 143.2 271.3 143.2 135.9 0 248.6-58.3 269.4-134.6 1.7 0 3.4 0.1 5.1 0.1 123.6 0 223.7-96.5 223.7-215.6s-100-215.7-223.6-215.7z" fill="#F6CD50" ></path><path d="M435.9 431.5m-52.2 0a52.2 52.2 0 1 0 104.4 0 52.2 52.2 0 1 0-104.4 0Z" fill="#FAFAFA" ></path><path d="M588.1 431.5m-52.2 0a52.2 52.2 0 1 0 104.4 0 52.2 52.2 0 1 0-104.4 0Z" fill="#FAFAFA" ></path><path d="M435.9 431.5m-27.8 0a27.8 27.8 0 1 0 55.6 0 27.8 27.8 0 1 0-55.6 0Z" fill="#040000" ></path><path d="M601.9 407.4c-5.7 2.9-11.3 5.9-16.9 9-6.8 3.8-15.3 7.8-20.5 13.8-5.6 6.5 1.6 11.1 6.7 14.4 11.2 7.1 23.3 13 35.1 19 5.7 2.9 10.8-5.7 5.1-8.6-10.9-5.6-21.9-11.1-32.4-17.4-2.4-1.4-4.6-3.1-7-4.6 1 0.6-0.4-0.4-0.4-0.4-1.9-0.3-0.5 4.2 0.5 4.1-0.1 0-0.6 0.3 0.3-0.3 0.5-0.3 1-0.9 1.5-1.3 9.7-7.9 21.9-13.5 33.1-19.2 5.7-2.7 0.6-11.4-5.1-8.5zM406.6 547.6c11.5 14.4 27 26.7 42.7 36.3 32.2 19.8 71.2 27.2 107.6 15.4 29.5-9.6 54.6-29.1 75.5-51.6 10.8-11.6-6.6-29.1-17.5-17.5-9.4 10.1-19.5 19.7-30.8 27.7-4.6 3.2-9.3 6.2-14.2 8.9-5 2.8-9.9 5.1-14.1 6.7-4.6 1.7-9.3 3.2-14.1 4.4-2.2 0.5-4.4 1-6.6 1.4-1 0.2-2 0.3-2.9 0.5 2.6-0.4-2.1 0.2-2.5 0.3-4.1 0.4-8.3 0.5-12.5 0.4-2.2-0.1-4.4-0.2-6.6-0.4-1.1-0.1-2.2-0.2-3.2-0.3-1.5-0.2-1.4-0.2 0.1 0l-2.1-0.3c-7.8-1.3-15.4-3.4-22.8-6.2-0.9-0.4-1.8-0.7-2.8-1.1-3.1-1.2 2.3 1.1-0.7-0.3-1.5-0.7-2.9-1.3-4.4-2-3.7-1.8-7.2-3.7-10.8-5.8-5.7-3.4-11.1-7.1-16.4-11.1 3 2.3-1.1-0.9-1.8-1.5-1.1-0.9-2.1-1.7-3.1-2.6-2.1-1.8-4.2-3.7-6.3-5.6-4.4-4.1-8.7-8.4-12.4-13.1-4.2-5.2-13.1-4.3-17.5 0-5 5.1-4 12.2 0.2 17.4z" fill="#040000" ></path></svg>'}]},{name:"标记图标",type:"sign",list:[{name:"1",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M809.728 429.696a18.901333 18.901333 0 0 0-15.274667-12.885333l-183.466666-26.624-81.92-166.272a18.901333 18.901333 0 0 0-34.005334 0l-81.92 166.272-183.594666 26.624a19.029333 19.029333 0 0 0-10.496 32.298666l132.693333 129.536-31.274667 182.741334a18.816 18.816 0 0 0 27.477334 19.84l164.138666-86.186667 164.096 86.058667a18.773333 18.773333 0 1 0 27.434667-19.84l-31.36-182.741334 132.693333-129.408a18.901333 18.901333 0 0 0 4.778667-19.413333z" fill="#FFFFFF"></path></svg>'},{name:"2",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M644.565333 306.901333c32.128 0 65.834667-5.76 101.077334-17.237333a17.066667 17.066667 0 0 1 22.357333 16.213333v328.32c-1.109333 0.768 10.325333 27.093333-99.370667 19.84-109.653333-7.210667-181.76-45.098667-246.869333-45.098666-65.152 0-49.322667 2.688-74.154667 8.405333v168.064a24.746667 24.746667 0 0 1-24.490666 25.258667 22.528 22.528 0 0 1-17.28-7.253334 24.149333 24.149333 0 0 1-7.168-18.005333V281.258667C299.776 280.490667 328.106667 256 421.76 256s164.437333 50.901333 222.805333 50.901333z" fill="#FFFFFF"></path></svg>'},{name:"3",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M524.074667 225.408l274.517333 274.517333a17.066667 17.066667 0 0 1 0 24.149334l-274.517333 274.517333a17.066667 17.066667 0 0 1-24.149334 0l-274.517333-274.517333a17.066667 17.066667 0 0 1 0-24.149334l274.517333-274.517333a17.066667 17.066667 0 0 1 24.149334 0z" fill="#FFFFFF"></path></svg>'},{name:"4",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M317.866667 300.8h388.266666c9.386667 0 17.066667 7.68 17.066667 17.066667v388.266666a17.066667 17.066667 0 0 1-17.066667 17.066667h-388.266666a17.066667 17.066667 0 0 1-17.066667-17.066667v-388.266666c0-9.386667 7.68-17.066667 17.066667-17.066667z" fill="#FFFFFF"></path></svg>'},{name:"5",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M498.346667 279.082667L248.789333 701.44a15.829333 15.829333 0 0 0 13.653334 23.893333h499.114666a15.829333 15.829333 0 0 0 13.653334-23.893333l-249.6-422.357333a15.829333 15.829333 0 0 0-27.264 0z" fill="#FFFFFF"></path></svg>'},{name:"6",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M497.749333 798.549333l-31.445333-28.501333C313.941333 631.722667 213.333333 540.501333 213.333333 428.8a160.981333 160.981333 0 0 1 162.730667-162.730667c51.498667 0 100.906667 23.978667 133.12 61.696a177.536 177.536 0 0 1 133.162667-61.696 160.981333 160.981333 0 0 1 162.730666 162.730667c0 111.701333-100.608 202.965333-252.970666 341.333333l-31.445334 28.458667a17.066667 17.066667 0 0 1-22.912 0z" fill="#FFFFFF"></path><path d="M634.538667 487.808L555.050667 426.24 507.306667 256a201.002667 201.002667 0 0 0-23.594667 20.394667l-0.256-0.256L525.653333 426.666667l-133.290666 59.946666a14.08 14.08 0 0 0-8.021334 15.957334l28.757334 126.378666a14.208 14.208 0 0 0 27.733333-6.229333l-26.24-115.114667 126.037333-56.704 76.416 59.136a14.250667 14.250667 0 0 0 19.968-2.474666 14.08 14.08 0 0 0-2.474666-19.797334z" fill="#6D768D"></path></svg>'},{name:"7",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M497.749333 798.549333l-31.445333-28.501333C313.941333 631.722667 213.333333 540.501333 213.333333 428.8a160.981333 160.981333 0 0 1 162.730667-162.730667c51.498667 0 100.906667 23.978667 133.12 61.696a177.536 177.536 0 0 1 133.162667-61.696 160.981333 160.981333 0 0 1 162.730666 162.730667c0 111.701333-100.608 202.965333-252.970666 341.333333l-31.445334 28.458667a17.066667 17.066667 0 0 1-22.912 0z" fill="#FFFFFF"></path></svg>'},{name:"8",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M374.656 273.194667c5.973333 4.48 12.117333 9.6 18.346667 15.36 6.272 5.717333 11.904 12.373333 16.896 19.84 2.517333 4.010667 5.504 8.490667 9.002666 13.482666a529.493333 529.493333 0 0 1 20.266667 32.213334h155.221333a169.813333 169.813333 0 0 0 9.770667-15.744c2.474667-4.48 5.248-8.96 8.234667-13.482667a460.842667 460.842667 0 0 1 23.253333-31.829333c4.992-6.229333 12.245333-12.373333 21.76-18.346667a34.261333 34.261333 0 0 0 10.112-9.728 31.274667 31.274667 0 0 0 5.248-11.989333 18.56 18.56 0 0 0-1.536-11.605334 17.664 17.664 0 0 0-10.112-8.618666c-4.48-1.493333-8.362667-2.005333-11.605333-1.493334a46.933333 46.933333 0 0 0-9.770667 2.602667c-3.242667 1.28-6.613333 2.645333-10.112 4.138667a32.426667 32.426667 0 0 1-12.757333 2.261333 26.026667 26.026667 0 0 1-12.373334-2.645333 45.653333 45.653333 0 0 1-8.96-6.357334l-8.661333-7.850666a30.336 30.336 0 0 0-11.989333-6.4c-9.984-3.968-18.005333-4.693333-24.021334-2.218667-5.973333 2.474667-11.946667 6.485333-17.962666 11.946667a88.618667 88.618667 0 0 1-11.989334 10.496 7.338667 7.338667 0 0 1-3.754666 1.493333 46.165333 46.165333 0 0 1-8.277334-5.205333 71.808 71.808 0 0 1-7.125333-4.906667 37.973333 37.973333 0 0 1-6.4-6.357333c-3.968-3.968-9.941333-6.613333-17.92-7.850667a31.061333 31.061333 0 0 0-21.76 4.138667c-8.533333 5.461333-14.506667 10.069333-18.048 13.824a29.354667 29.354667 0 0 1-15.744 7.893333 23.978667 23.978667 0 0 1-13.098667-0.768 987.733333 987.733333 0 0 0-14.634666-4.48 80.725333 80.725333 0 0 0-14.250667-2.986667 16.768 16.768 0 0 0-11.989333 2.986667c-6.997333 5.461333-9.258667 12.074667-6.741334 19.84a34.56 34.56 0 0 0 13.482667 18.346667z" fill="#FFFFFF"></path><path d="M780.757333 545.152a219.306667 219.306667 0 0 0-19.882666-65.536 224.981333 224.981333 0 0 0-33.365334-49.792 430.336 430.336 0 0 0-37.12-37.12c-14.506667-11.946667-27.264-23.296-38.272-34.048a544.512 544.512 0 0 1-27.733333-28.842667 305.28 305.28 0 0 1-22.485333-26.197333h-168.746667c-6.485333 8.490667-13.994667 17.493333-22.485333 26.965333a360.96 360.96 0 0 1-26.24 28.074667c-10.538667 10.24-22.272 21.12-35.285334 32.597333a305.493333 305.493333 0 0 0-41.6 44.16 250.026667 250.026667 0 0 0-49.493333 117.589334 216.106667 216.106667 0 0 0 1.877333 70.4 220.586667 220.586667 0 0 0 75.349334 126.549333c21.248 18.005333 47.146667 32.597333 77.653333 43.818667 30.464 11.264 65.493333 16.853333 104.96 16.853333 38.528 0 72.874667-4.864 103.125333-14.592a265.045333 265.045333 0 0 0 78.378667-39.338667c21.973333-16.469333 39.594667-35.797333 52.864-58.026666 13.226667-22.186667 22.101333-45.824 26.624-70.784 4.992-30.421333 5.632-58.026667 1.877333-82.773334z" fill="#FFFFFF"></path><path d="M593.322667 647.509333a20.48 20.48 0 0 1-11.861334 3.2h-50.133333v14.165334c0 4.266667-1.792 8.362667-5.376 12.373333a15.914667 15.914667 0 0 1-13.952 5.333333 24.917333 24.917333 0 0 1-14.336-3.882666c-3.84-2.602667-5.973333-7.210667-6.4-13.824v-14.165334h-48.725333a17.792 17.792 0 0 1-11.818667-3.882666 10.24 10.24 0 0 1-3.968-9.6c0-4.266667 1.578667-7.68 4.693333-10.24a16.768 16.768 0 0 1 11.093334-3.925334h48.682666v-24.789333h-48.682666a15.573333 15.573333 0 0 1-11.52-4.266667 13.525333 13.525333 0 0 1-4.266667-9.941333 15.36 15.36 0 0 1 4.693333-10.624 14.72 14.72 0 0 1 11.093334-4.949333h48.682666l0.725334-14.890667a1053.568 1053.568 0 0 1-40.832-42.538667l-10.752-9.898666a41.216 41.216 0 0 1-6.442667-11.690667c-1.92-4.992-0.938667-10.069333 2.858667-15.274667a13.653333 13.653333 0 0 1 15.786666-3.84c6.186667 2.090667 11.221333 4.821333 15.018667 8.106667 1.92 2.389333 5.248 5.888 10.026667 10.666667l15.061333 14.848 19.328 19.157333 22.186667-20.565333a987.605333 987.605333 0 0 1 29.397333-25.514667 21.162667 21.162667 0 0 1 14.293333-5.674667c5.290667 0 9.557333 2.133333 12.928 6.4 6.186667 7.082667 3.84 15.36-7.168 24.789334a179.072 179.072 0 0 0-12.885333 12.373333c-5.76 5.973333-11.52 11.733333-17.194667 17.408-6.698667 7.082667-14.08 14.378667-22.186666 21.973333v13.44h46.506666c6.698667 0 11.605333 1.536 14.72 4.608a14.165333 14.165333 0 0 1 4.650667 10.282667c0 4.266667-1.450667 7.936-4.309333 11.008-2.858667 3.029333-7.637333 4.352-14.336 3.84l-46.506667 0.768-0.768 24.064h45.866667c13.354667 0 20.053333 4.992 20.053333 14.933333 0.469333 4.693333-0.853333 8.106667-3.925333 10.24z" fill="#6D768D"></path></svg>'},{name:"9",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M512 213.333333l234.666667 341.333334h-128v213.333333h-213.333334v-213.333333h-128L512 213.333333z" fill="#FFFFFF"></path></svg>'},{name:"10",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M533.333333 810.666667L298.666667 469.333333h128V256h213.333333v213.333333h128l-234.666667 341.333334z" fill="#FFFFFF"></path></svg>'},{name:"11",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M213.333333 533.333333L554.666667 298.666667v128h213.333333v213.333333h-213.333333v128l-341.333334-234.666667z" fill="#FFFFFF"></path></svg>'},{name:"12",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M810.666667 533.333333L469.333333 768v-128H256v-213.333333h213.333333V298.666667l341.333334 234.666666z" fill="#FFFFFF"></path></svg>'},{name:"13",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M0 512c0 282.752 229.248 512 512 512s512-229.248 512-512S794.752 0 512 0 0 229.248 0 512z" fill="#6D768D"></path><path d="M571.349333 508.586667l162.389334-162.346667a44.330667 44.330667 0 1 0-62.72-62.72l-162.389334 162.389333-162.517333-162.389333a44.330667 44.330667 0 1 0-62.72 62.72l162.389333 162.389333-162.389333 162.474667a44.330667 44.330667 0 1 0 62.72 62.72l162.389333-162.346667 162.389334 162.389334a44.330667 44.330667 0 1 0 62.72-62.72l-162.261334-162.56z" fill="#FFFFFF"></path></svg>'},{name:"14",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 0C233.386667 0 0 225.877333 0 512s225.877333 512 512 512 512-225.877333 512-512S790.613333 0 512 0z" fill="#6D768D"></path><path d="M726.144 311.210667l-277.333333 305.066666-124.8-124.8c-13.866667-13.866667-41.6-13.866667-55.466667 0-13.866667 13.866667-13.866667 41.6 0 55.466667l159.445333 152.533333c13.866667 13.866667 41.6 13.866667 55.466667 0l305.066667-332.8c13.866667-13.866667 13.866667-41.6 0-55.466666-20.778667-13.866667-48.512-13.866667-62.378667 0z" fill="#FFFFFF"></path></svg>'},{name:"15",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M541.952 755.626667a40.618667 40.618667 0 0 1-29.824 12.373333 41.344 41.344 0 0 1-30.122667-12.373333 40.106667 40.106667 0 0 1-12.672-30.122667c0-11.605333 4.096-21.845333 12.672-30.122667a40.405333 40.405333 0 0 1 30.122667-12.714666c11.605333 0 21.546667 4.138667 29.824 12.714666a40.32 40.32 0 0 1 12.714667 30.122667c0 11.861333-4.096 21.76-12.714667 30.122667zM450.986667 241.28A77.866667 77.866667 0 0 1 512.256 213.333333c24.874667 0 45.354667 8.917333 61.354667 27.946667 15.488 18.432 23.722667 41.685333 23.722666 69.674667 0 23.765333-33.152 200.533333-44.672 329.045333h-80.128C463.146667 511.402667 426.666667 334.677333 426.666667 310.954667c0-27.392 8.277333-50.645333 24.32-69.674667z" fill="#FFFFFF"></path></svg>'},{name:"16",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 0C229.248 0 0 229.248 0 512s229.248 512 512 512 512-229.248 512-512S794.794667 0 512 0z" fill="#6D768D"></path><path d="M490.666667 682.666667a64 64 0 1 1 0 128 64 64 0 0 1 0-128z m13.994666-490.752c61.397333 0 112.341333 14.634667 153.002667 43.946666 40.533333 29.269333 60.885333 72.618667 60.885333 130.133334 0 35.242667-12.373333 64.938667-29.952 89.045333-10.282667 14.677333-33.664 33.408-62.890666 56.192l-32.426667 22.357333c-15.701333 12.202667-29.696 26.453333-34.858667 42.666667-1.706667 5.546667-3.072 14.677333-3.968 24.533333-0.426667 4.949333-4.864 15.018667-15.232 15.018667h-83.328c-13.568 0-15.957333-10.581333-15.744-15.786667 1.493333-34.005333 4.608-64.213333 18.474667-80.469333 28.074667-32.896 91.904-73.813333 91.904-73.813333a104.106667 104.106667 0 0 0 23.552-24.021334c10.837333-14.933333 19.797333-31.317333 19.797333-49.237333 0-20.565333-6.016-39.338667-18.090666-56.32-12.032-16.938667-34.090667-25.386667-66.005334-25.386667-31.445333 0-53.76 10.410667-66.901333 31.274667-9.685333 15.445333-15.786667 29.610667-18.346667 45.013333-0.853333 5.461333-4.394667 16.981333-16.042666 16.981334H327.210667c-17.322667 0-21.12-11.221333-20.650667-16.64 6.272-68.138667 32.896-114.688 80-144.597334 32-20.565333 71.381333-30.890667 118.101333-30.890666z" fill="#FFFFFF"></path></svg>'},{name:"17",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M336.256 410.026667H253.312a40.021333 40.021333 0 0 0-39.850667 43.264l23.296 278.101333c1.706667 20.693333 19.072 36.608 39.850667 36.608h59.648c11.050667 0 20.010667-8.96 20.010667-19.968v-318.037333a19.968 19.968 0 0 0-20.010667-19.968z m434.432 0h-178.944C653.312 182.314667 548.949333 170.666667 548.949333 170.666667c-44.288 0-35.114667 34.986667-38.442666 40.832 0 84.48-68.010667 155.093333-101.034667 184.362666a39.552 39.552 0 0 0-13.226667 29.653334v322.56c0 11.008 8.96 19.925333 20.010667 19.925333h233.728c30.378667 0 58.154667-17.152 71.68-44.373333 18.176-36.736 40.448-90.112 54.656-133.973334 13.781333-42.410667 26.24-94.976 33.578667-131.968a39.850667 39.850667 0 0 0-39.253334-47.658666z" fill="#FFFFFF"></path></svg>'},{name:"18",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M796.16 413.909333c-31.146667-0.298667-115.626667-0.085333-146.858667-0.085333h-158.464c8.533333-7.68 15.914667-14.506667 23.594667-20.906667 29.781333-24.874667 25.813333-71.082667-14.208-88.874666-22.954667-10.24-44.970667-5.632-64 11.52-34.944 31.274667-69.632 62.677333-104.277333 93.994666a15.488 15.488 0 0 1-11.178667 4.437334c-11.221333-0.085333-26.88-0.128-46.933333-0.170667a17.066667 17.066667 0 0 0-17.109334 17.066667L256 719.701333a17.066667 17.066667 0 0 0 17.066667 17.152l49.578666-0.085333c3.968 0 7.466667 0.768 10.88 2.602667 15.829333 8.832 31.701333 17.493333 47.616 26.24a18.133333 18.133333 0 0 0 9.301334 2.346666h168.405333c6.186667 0 11.946667-0.981333 17.834667-2.56 29.44-7.253333 40.021333-30.293333 38.528-52.565333-0.768-9.728-4.266667-18.346667-9.984-26.24 19.626667-5.76 35.114667-16.213333 42.112-36.096 7.125333-20.394667 1.621333-38.4-12.672-53.333333 28.16-19.754667 34.858667-44.672 18.645333-75.648h140.458667c6.570667 0 13.013333-0.597333 19.370666-2.645334 31.957333-9.813333 48.810667-42.88 35.626667-71.552-10.154667-22.186667-28.629333-33.152-52.608-33.450666z" fill="#FFFFFF"></path></svg>'},{name:"19",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M270.506667 413.909333c31.146667-0.298667 115.626667-0.085333 146.858666-0.085333h158.464c-8.533333-7.68-15.914667-14.506667-23.594666-20.906667-29.781333-24.874667-25.813333-71.082667 14.208-88.874666 22.954667-10.24 44.970667-5.632 64 11.52 34.944 31.274667 69.632 62.677333 104.277333 93.994666 3.413333 2.986667 6.528 4.437333 11.178667 4.437334 11.221333-0.085333 26.88-0.128 46.933333-0.170667a17.066667 17.066667 0 0 1 17.109333 17.066667l0.682667 288.853333a17.066667 17.066667 0 0 1-17.066667 17.152l-49.578666-0.085333a22.101333 22.101333 0 0 0-10.88 2.602666c-15.829333 8.832-31.701333 17.493333-47.616 26.24a18.133333 18.133333 0 0 1-9.301334 2.346667h-168.405333a68.693333 68.693333 0 0 1-17.834667-2.56c-29.44-7.253333-40.021333-30.293333-38.528-52.565333 0.768-9.728 4.266667-18.346667 9.984-26.24-19.626667-5.76-35.114667-16.213333-42.112-36.096-7.125333-20.394667-1.621333-38.4 12.672-53.333334-28.16-19.754667-34.858667-44.672-18.645333-75.648H272.853333c-6.570667 0-13.013333-0.597333-19.370666-2.645333-31.957333-9.813333-48.810667-42.88-35.626667-71.552 10.154667-22.186667 28.629333-33.152 52.608-33.450667z" fill="#FFFFFF"></path></svg>'},{name:"20",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M667.733333 480.128H400v-111.36a97.706667 97.706667 0 0 1 97.621333-97.621333 97.706667 97.706667 0 0 1 97.578667 97.621333 28.885333 28.885333 0 0 0 57.813333 0A155.605333 155.605333 0 0 0 497.621333 213.333333a155.605333 155.605333 0 0 0-155.392 155.434667v111.36h-14.677333A28.885333 28.885333 0 0 0 298.666667 509.013333v292.010667a28.885333 28.885333 0 0 0 28.885333 28.885333h340.138667a28.885333 28.885333 0 0 0 28.928-28.885333V509.013333a28.885333 28.885333 0 0 0-28.928-28.885333z" fill="#FFFFFF"></path></svg>'},{name:"21",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M400.042667 437.461333v-111.36a97.706667 97.706667 0 0 1 97.621333-97.621333 97.706667 97.706667 0 0 1 97.578667 97.621333 28.885333 28.885333 0 0 0 57.813333 0A155.605333 155.605333 0 0 0 497.621333 170.666667a155.605333 155.605333 0 0 0-155.392 155.434666v111.36h-14.677333A28.885333 28.885333 0 0 0 298.666667 466.346667v292.010666a28.885333 28.885333 0 0 0 28.885333 28.885334h340.138667a28.885333 28.885333 0 0 0 28.928-28.885334V466.346667a28.885333 28.885333 0 0 0-28.928-28.885334H400.042667z" fill="#FFFFFF"></path><path d="M595.242667 437.461333v-111.36a97.706667 97.706667 0 0 0-97.621334-97.621333 97.706667 97.706667 0 0 0-97.578666 97.621333 28.885333 28.885333 0 0 1-57.813334 0A155.605333 155.605333 0 0 1 497.621333 170.666667a155.605333 155.605333 0 0 1 155.434667 155.434666v111.36h14.634667c16 0 28.928 12.928 28.928 28.885334v292.010666a28.885333 28.885333 0 0 1-28.928 28.885334H327.552A28.885333 28.885333 0 0 1 298.666667 758.357333V466.346667c0-15.957333 12.928-28.885333 28.885333-28.885334h267.690667z" fill="#FFFFFF"></path></svg>'},{name:"22",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M511.999787 512.000213m-511.999787 0a511.999787 511.999787 0 1 0 1023.999573 0 511.999787 511.999787 0 1 0-1023.999573 0Z" fill="#6D768D"></path><path d="M381.354508 364.586941c0 54.015977 29.013321 103.935957 75.946635 130.986613a152.53327 152.53327 0 0 0 151.935936 0 151.12527 151.12527 0 0 0 75.946636-130.986613A151.594604 151.594604 0 0 0 533.333111 213.333671a151.594604 151.594604 0 0 0-151.89327 151.25327zM660.479725 498.901552a185.258589 185.258589 0 0 1-127.146614 50.346646c-49.066646 0-93.866628-19.199992-127.06128-50.346646C317.141201 544.853533 255.999893 637.440161 255.999893 744.106783c0 13.183995 10.709329 23.850657 23.978657 23.850657h506.709122a23.893323 23.893323 0 0 0 23.978657-23.893323c0-106.538622-61.098641-199.25325-150.186604-245.205232z" fill="#FFFFFF"></path></svg>'},{name:"23",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M445.610667 401.578667a129.322667 129.322667 0 1 0 258.645333 0 129.322667 129.322667 0 0 0-258.645333 0z m237.568 114.901333a157.354667 157.354667 0 0 1-216.362667 0 236.373333 236.373333 0 0 0-127.957333 209.706667c0 11.264 9.130667 20.394667 20.394666 20.394666h431.402667a20.394667 20.394667 0 0 0 20.394667-20.394666 236.373333 236.373333 0 0 0-127.872-209.706667zM409.813333 401.578667c0-40.362667 14.592-77.397333 38.698667-106.112a112.725333 112.725333 0 0 0-29.013333-3.925334 112.64 112.64 0 0 0-112.426667 112.469334 112.64 112.64 0 0 0 144.853333 107.648 164.693333 164.693333 0 0 1-42.112-110.08z m-18.602666 136.704a136.533333 136.533333 0 0 1-65.706667-34.474667 205.44 205.44 0 0 0-111.232 182.4c0 9.813333 7.936 17.706667 17.706667 17.706667H303.36a273.621333 273.621333 0 0 1 87.893333-165.632z" fill="#FFFFFF"></path></svg>'}]}],Cn='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M435.484444 251.733333v68.892445L295.822222 320.682667a168.504889 168.504889 0 0 0-2.844444 336.952889h142.506666v68.892444H295.822222a237.397333 237.397333 0 0 1 0-474.794667h139.662222z m248.945778 0a237.397333 237.397333 0 0 1 0 474.851556H544.654222v-69.006222l139.776 0.056889a168.504889 168.504889 0 0 0 2.844445-336.952889H544.597333V251.676444h139.776z m-25.827555 203.946667a34.474667 34.474667 0 0 1 0 68.892444H321.649778a34.474667 34.474667 0 0 1 0-68.892444h336.952889z" ></path></svg>',qn='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M152.768 985.984 152.768 49.856l434.56 0 66.816 0 234.048 267.392 0 66.816 0 601.92L152.768 985.984 152.768 985.984zM654.144 193.088l0 124.16 108.736 0L654.144 193.088 654.144 193.088zM821.312 384.064l-167.168 0L587.328 384.064 587.328 317.312 587.328 116.736 219.584 116.736 219.584 919.04l601.728 0L821.312 384.064 821.312 384.064zM386.688 517.888 319.808 517.888 319.808 450.944l66.816 0L386.624 517.888 386.688 517.888zM386.688 651.584 319.808 651.584 319.808 584.704l66.816 0L386.624 651.584 386.688 651.584zM386.688 785.344 319.808 785.344l0-66.88 66.816 0L386.624 785.344 386.688 785.344zM721.024 517.888 453.632 517.888 453.632 450.944l267.392 0L721.024 517.888 721.024 517.888zM654.144 651.584 453.632 651.584 453.632 584.704l200.512 0L654.144 651.584 654.144 651.584zM620.672 785.344l-167.04 0 0-66.88 167.04 0L620.672 785.344 620.672 785.344z" ></path></svg>',Ln='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" width="128" height="128"><path d="M516.373333 375.978667l136.576-136.576a147.797333 147.797333 0 0 1 208.853334-0.021334 147.690667 147.690667 0 0 1-0.042667 208.832l-204.8 204.778667v0.021333l-153.621333 153.6c-85.973333 85.973333-225.28 85.973333-311.253334 0.021334-85.994667-85.973333-85.973333-225.216 0.149334-311.36L431.146667 256.362667a21.333333 21.333333 0 0 0-30.165334-30.165334L162.069333 465.066667c-102.805333 102.826667-102.826667 269.056-0.149333 371.733333 102.613333 102.613333 268.970667 102.613333 371.584 0l153.6-153.642667h0.021333l0.021334-0.021333 204.778666-204.778667c74.325333-74.325333 74.346667-194.858667 0.021334-269.184-74.24-74.24-194.88-74.24-269.162667 0.042667l-136.576 136.554667-187.626667 187.626666a117.845333 117.845333 0 0 0-0.106666 166.826667 118.037333 118.037333 0 0 0 166.826666-0.106667l255.850667-255.829333a21.333333 21.333333 0 0 0-30.165333-30.165333L435.136 669.973333a75.370667 75.370667 0 0 1-106.496 0.106667 75.178667 75.178667 0 0 1 0.128-106.496l187.605333-187.605333z" ></path></svg>',Dn=(t,e=[])=>{let i=t.split("_");const n=[...Tn,...e].reduce((t,e)=>{const i=t.find(t=>t.type===e.type);return i?e.list.forEach(t=>{const e=i.list.find(e=>e.name===t.name);e?e.icon=t.icon:i.list.push(t)}):t.push({...e}),t},[]);let s=n.find(t=>t.type===i[0]);if(s){let t=s.list.find(t=>t.name===i[1]);return t?t.icon:""}return""},Sn=(t,e)=>{const i=new xi,n=(new ci).text(t);return e.text(n),i.add(n),i.bbox()},An={radius:3,fontSize:12,fill:"",height:20,paddingX:8};const kn={getImageUrl:function(){const t=this.getData("image");return(this.mindMap.renderer.renderTree.data.imgMap||{})[t]||t},createImgNode:function(){let t=this.getImageUrl();if(!t)return;t=(this.mindMap.renderer.renderTree.data.imgMap||{})[t]||t;const e=this.getImgShowSize(),i=(new we).load(t).size(...e),{defaultNodeImage:n}=this.mindMap.opt;if(n){const e=new Image;e.onerror=()=>{i.load(n)},e.src=t}return this.getData("imageTitle")&&i.attr("title",this.getData("imageTitle")),i.on("click",t=>{this.mindMap.emit("node_img_click",this,i,t)}),i.on("dblclick",t=>{this.mindMap.emit("node_img_dblclick",this,t,i)}),i.on("mouseenter",t=>{this.mindMap.emit("node_img_mouseenter",this,i,t)}),i.on("mouseleave",t=>{this.mindMap.emit("node_img_mouseleave",this,i,t)}),i.on("mousemove",t=>{this.mindMap.emit("node_img_mousemove",this,i,t)}),{node:i,width:e[0],height:e[1]}},getImgShowSize:function(){const{custom:t,width:e,height:i}=this.getData("imageSize");return t?[e,i]:Li(e,i,this.mindMap.themeConfig.imgMaxWidth,this.mindMap.themeConfig.imgMaxHeight)},createIconNode:function(){let t=this.getData();if(!t.icon||t.icon.length<=0)return[];let e=this.mindMap.themeConfig.iconSize;return t.icon.map(t=>{let i=Dn(t,this.mindMap.opt.iconList||[]),n=null;return n=/^<svg/.test(i)?Ni(i):(new we).load(i),n.size(e,e),n.on("click",e=>{this.mindMap.emit("node_icon_click",this,t,e,n)}),n.on("mouseenter",e=>{this.mindMap.emit("node_icon_mouseenter",this,t,e,n)}),n.on("mouseleave",e=>{this.mindMap.emit("node_icon_mouseleave",this,t,e,n)}),{node:n,width:e,height:e}})},createRichTextNode:function(t){const e=this.hasCustomWidth();let i="string"==typeof t?t:this.getData("text"),{textAutoWrapWidth:n,emptyTextMeasureHeightText:s}=this.mindMap.opt;n=e?this.customTextWidth:n;const o=new xi;let r=!1;this.getData("resetRichText")&&(delete this.nodeData.data.resetRichText,r=!0),r&&!Hi(i)&&(i=(t=>{Ui||(Ui=document.createElement("div")),Ui.innerHTML=t;for(let t=Ui.childNodes,e=t.length;e--;)if(1==t[e].nodeType)return!0;return!1})(i)?(t=>{Yi||(Yi=document.createElement("div")),Yi.innerHTML=t;const e=Yi.querySelectorAll(".ql-formula");Array.from(e).forEach(t=>{const e=document.createTextNode("$smmformula$");t.parentNode.replaceChild(e,t)});const i=Yi.childNodes;let n=[];for(let t=0;t<i.length;t++){const e=i[t];1===e.nodeType?n.push(e.textContent):3===e.nodeType&&n.push(e.nodeValue)}if(t=n.map(t=>`<p><span>${tn(t)}</span></p>`).join(""),e.length>0){t=t.replace(/\$smmformula\$/g,'<span class="smmformula"></span>'),Yi.innerHTML=t;const i=Yi.querySelectorAll(".smmformula");Array.from(i).forEach((t,i)=>{t.parentNode.replaceChild(e[i],t)}),t=Yi.innerHTML}return t})(i):`<p>${i}</p>`,this.setData({text:i}));const a=[],h=(t=>{const e={};return m.forEach(i=>{let n=t.style.merge(i);"fontSize"===i&&(n+="px"),e[i]=n}),e})(this);Object.keys(h).forEach(t=>{a.push([t,h[t]])}),this.mindMap.commonCaches.measureRichtextNodeTextSizeEl||(this.mindMap.commonCaches.measureRichtextNodeTextSizeEl=document.createElement("div"),this.mindMap.commonCaches.measureRichtextNodeTextSizeEl.style.position="fixed",this.mindMap.commonCaches.measureRichtextNodeTextSizeEl.style.left="-999999px",this.mindMap.el.appendChild(this.mindMap.commonCaches.measureRichtextNodeTextSizeEl));const l=this.mindMap.commonCaches.measureRichtextNodeTextSizeEl;a.forEach(([t,e])=>{l.style[t]=e}),l.style.lineHeight=1.2;const d=`<div>${i}</div>`;l.innerHTML=d;const c=l.children[0];c.classList.add("smm-richtext-node-wrap"),pn(c),c.style.maxWidth=n+"px",c.style.width=e?this.customTextWidth+"px":"";let{width:u,height:p}=c.getBoundingClientRect();if(p<=0){l.innerHTML=`<p>${s}</p>`;let t=l.children[0];t.classList.add("smm-richtext-node-wrap"),p=t.getBoundingClientRect().height,l.innerHTML=d}u=Math.min(Math.ceil(u)+1,n),p=Math.ceil(p),o.attr("data-width",u),o.attr("data-height",p);const f=cn({el:l.children[0],width:u,height:p}),g={"line-height":1.2};return a.forEach(([t,e])=>{var i;g[i=t,i.replace(/([a-z])([A-Z])/g,(...t)=>t[1]+"-"+t[2].toLowerCase())]=e}),f.css(g),o.add(f),{node:o,nodeContent:f,width:u,height:p}},createTextNode:function(t){if(this.getData("needUpdate")&&delete this.nodeData.data.needUpdate,this.getData("richText"))return this.createRichTextNode(t);const e="string"==typeof t?t:this.getData("text");this.getData("resetRichText")&&delete this.nodeData.data.resetRichText;const i=new xi,n=this.getStyle("fontSize",!1),s=this.getStyle("textAlign",!1);let o=[];Hi(e)||(o=String(e).split(/\n/gim));const{textAutoWrapWidth:r,emptyTextMeasureHeightText:a}=this.mindMap.opt;let h=o.length>1;o.forEach((t,e)=>{let i=t.split(""),n=[],s=[];for(;i.length;){let t=i.shift(),e=[...s,t].join("");Sn(e,this.style).width<=r?s.push(t):(n.push(s.join("")),s=[t])}s.length>0&&n.push(s.join("")),n.length>1&&(h=!0),o[e]=n.join("\n")}),o=o.join("\n").replace(/\n$/g,"").split(/\n/gim),o.forEach((t,e)=>{""===t&&(t="\ufeff");const o=(new ci).text(t);o.addClass("smm-text-node-wrap"),o.attr("text-anchor",{left:"start",center:"middle",right:"end"}[s]||"start"),this.style.text(o),o.y(n*p*e+.19999999999999996*n/2),i.add(o)});let{width:l,height:d}=i.bbox();if(d<=0){const t=(new ci).text(a);this.style.text(t);d=t.bbox().height}return l=Math.min(Math.ceil(l),r),d=Math.ceil(d),i.attr("data-width",l),i.attr("data-height",d),i.attr("data-ismultiLine",h||o.length>1),{node:i,width:l,height:d}},createHyperlinkNode:function(){const{hyperlink:t,hyperlinkTitle:e}=this.getData();if(!t)return;const{customHyperlinkJump:i,hyperlinkIcon:n}=this.mindMap.opt,{icon:s,style:o}=n,r=this.getNodeIconSize("hyperlinkIcon"),a=(new Ni).size(r,r),h=(new wi).to(t).target("_blank");h.node.addEventListener("click",e=>{"function"==typeof i&&(e.preventDefault(),i(t,this))}),e&&a.add(Ni(`<title>${e}</title>`)),h.rect(r,r).fill({color:"transparent"});const l=Ni(s||Cn).size(r,r);return this.style.iconNode(l,o.color),h.add(l),a.add(h),{node:a,width:r,height:r}},createTagNode:function(){const t=this.getData("tag");if(!t||t.length<=0)return[];let{maxTag:e,tagsColorMap:i}=this.mindMap.opt;i=i||{};const n=[];return t.slice(0,e).forEach((t,e)=>{let s="",o={...An};"string"==typeof t?s=t:(s=t.text,o={...An,...t.style});const r=void 0!==o.width,a=new xi;a.on("click",()=>{this.mindMap.emit("node_tag_click",this,t,e,a)});const h=(new ci).text(s);this.style.tagText(h,o);const{width:l,height:d}=h.bbox(),c=r?o.width:l+2*o.paddingX,u=r?Math.max(c,l):c,p=Math.max(o.height,d);r?h.x((u-l)/2):h.x(r?0:o.paddingX),h.cy(-p/2);const m=(new Ke).size(c,o.height).cy(-p/2);r&&m.x((u-c)/2),this.style.tagRect(m,{...o,fill:o.fill||i[h.node.textContent]||Ji(h.node.textContent)}),a.add(m).add(h),n.push({node:a,width:u,height:p})}),n},createNoteNode:function(){if(!this.getData("note"))return null;const{icon:t,style:e}=this.mindMap.opt.noteIcon,i=this.getNodeIconSize("noteIcon"),n=(new Ni).attr("cursor","pointer").addClass("smm-node-note").size(i,i);n.add((new Ke).size(i,i).fill({color:"transparent"}));const s=Ni(t||qn).size(i,i);if(this.style.iconNode(s,e.color),n.add(s),!this.mindMap.opt.customNoteContentShow){if(!this.noteEl){this.noteEl=document.createElement("div"),this.noteEl.style.cssText=`\n position: fixed;\n padding: 10px;\n border-radius: 5px;\n box-shadow: 0 2px 5px rgb(0 0 0 / 10%);\n display: none;\n background-color: #fff;\n z-index: ${this.mindMap.opt.nodeNoteTooltipZIndex}\n `;(this.mindMap.opt.customInnerElsAppendTo||document.body).appendChild(this.noteEl)}this.noteEl.innerText=this.getData("note")}return n.on("mouseover",()=>{const{left:t,top:e}=this.getNoteContentPosition();this.mindMap.opt.customNoteContentShow?this.mindMap.opt.customNoteContentShow.show(this.getData("note"),t,e,this):(this.noteEl.style.left=t+"px",this.noteEl.style.top=e+"px",this.noteEl.style.display="block")}),n.on("mouseout",()=>{this.mindMap.opt.customNoteContentShow?this.mindMap.opt.customNoteContentShow.hide():this.noteEl.style.display="none"}),n.on("click",t=>{this.mindMap.emit("node_note_click",this,t,n)}),n.on("dblclick",t=>{this.mindMap.emit("node_note_dblclick",this,t,n)}),{node:n,width:i,height:i}},createAttachmentNode:function(){const{attachmentUrl:t,attachmentName:e}=this.getData();if(!t)return;const i=this.getNodeIconSize("attachmentIcon"),{icon:n,style:s}=this.mindMap.opt.attachmentIcon,o=(new Ni).attr("cursor","pointer").size(i,i);e&&o.add(Ni(`<title>${e}</title>`)),o.add((new Ke).size(i,i).fill({color:"transparent"}));const r=Ni(n||Ln).size(i,i);return this.style.iconNode(r,s.color),o.add(r),o.on("click",t=>{this.mindMap.emit("node_attachmentClick",this,t,o)}),o.on("contextmenu",t=>{this.mindMap.emit("node_attachmentContextmenu",this,t,o)}),{node:o,width:i,height:i}},getNoteContentPosition:function(){const t=this.getNodeIconSize("noteIcon"),{scaleY:e}=this.mindMap.view.getTransformData().transform,i=t*e;let{left:n,top:s}=this._noteData.node.node.getBoundingClientRect();return s+=i,{left:n,top:s}},getNodeIconSize:function(t){const{style:e}=this.mindMap.opt[t];return Hi(e.size)?this.mindMap.themeConfig.iconSize:e.size},measureCustomNodeContentSize:function(t){this.mindMap.commonCaches.measureCustomNodeContentSizeEl||(this.mindMap.commonCaches.measureCustomNodeContentSizeEl=document.createElement("div"),this.mindMap.commonCaches.measureCustomNodeContentSizeEl.style.cssText="\n position: fixed;\n left: -99999px;\n top: -99999px;\n ",this.mindMap.el.appendChild(this.mindMap.commonCaches.measureCustomNodeContentSizeEl)),this.mindMap.commonCaches.measureCustomNodeContentSizeEl.innerHTML="",this.mindMap.commonCaches.measureCustomNodeContentSizeEl.appendChild(t);let e=this.mindMap.commonCaches.measureCustomNodeContentSizeEl.getBoundingClientRect();return{width:e.width,height:e.height}},isUseCustomNodeContent:function(){return!!this._customNodeContent}};const Rn={renderExpandBtnPlaceholderRect:function(){if(this.getChildrenLength()<=0||this.isRoot)return;const{alwaysShowExpandBtn:t,notShowExpandBtn:e,expandBtnSize:i}=this.mindMap.opt;if(!t&&!e){let{width:t,height:e}=this;this._unVisibleRectRegionNode||(this._unVisibleRectRegionNode=new Ke,this._unVisibleRectRegionNode.fill({color:"transparent"})),this.group.add(this._unVisibleRectRegionNode),this.renderer.layout.renderExpandBtnRect(this._unVisibleRectRegionNode,i,t,e,this)}},clearExpandBtnPlaceholderRect:function(){this._unVisibleRectRegionNode&&(this._unVisibleRectRegionNode.remove(),this._unVisibleRectRegionNode=null)},updateExpandBtnPlaceholderRect:function(){this.needRerenderExpandBtnPlaceholderRect&&(this.needRerenderExpandBtnPlaceholderRect=!1,this.renderExpandBtnPlaceholderRect()),this.getChildrenLength()>0?this._unVisibleRectRegionNode||this.renderExpandBtnPlaceholderRect():this._unVisibleRectRegionNode&&this.clearExpandBtnPlaceholderRect()}};const zn={initDragHandle:function(){this.checkEnableDragModifyNodeWidth()&&(this._dragHandleNodes=null,this.dragHandleWidth=4,this.dragHandleMousedownX=0,this.isDragHandleMousedown=!1,this.dragHandleIndex=0,this.dragHandleMousedownCustomTextWidth=0,this.dragHandleMousedownBodyCursor="",this.dragHandleMousedownLeft=0,this.onDragMousemoveHandle=this.onDragMousemoveHandle.bind(this),window.addEventListener("mousemove",this.onDragMousemoveHandle),this.onDragMouseupHandle=this.onDragMouseupHandle.bind(this),window.addEventListener("mouseup",this.onDragMouseupHandle),this.mindMap.on("node_mouseup",this.onDragMouseupHandle))},onDragMousemoveHandle:function(t){if(!this.isDragHandleMousedown)return;t.stopPropagation(),t.preventDefault();let{minNodeTextModifyWidth:e,maxNodeTextModifyWidth:i,isUseCustomNodeContent:n,customCreateNodeContent:s}=this.mindMap.opt;const o=n&&s&&this._customNodeContent;document.body.style.cursor="ew-resize",this.group.css({cursor:"ew-resize"});const{scaleX:r}=this.mindMap.draw.transform(),a=t.clientX-this.dragHandleMousedownX;let h=this.dragHandleMousedownCustomTextWidth+(0===this.dragHandleIndex?-a:a)/r;if(h=Math.max(h,e),-1!==i&&(h=Math.min(h,i)),!o&&this.getData("image")){const t=this.getImgShowSize();this._rectInfo.textContentWidth-this.customTextWidth+h<=t[0]&&(h=t[0]+this.customTextWidth-this._rectInfo.textContentWidth)}this.customTextWidth=h,0===this.dragHandleIndex&&(this.left=this.dragHandleMousedownLeft+a/r),this.reRender(o?[]:["text"],{ignoreUpdateCustomTextWidth:!0})},onDragMouseupHandle:function(){this.isDragHandleMousedown&&(document.body.style.cursor=this.dragHandleMousedownBodyCursor,this.group.css({cursor:"default"}),this.isDragHandleMousedown=!1,this.dragHandleMousedownX=0,this.dragHandleIndex=0,this.dragHandleMousedownCustomTextWidth=0,this.setData({customTextWidth:this.customTextWidth}),this.mindMap.render(),this.mindMap.emit("dragModifyNodeWidthEnd",this))},createDragHandleNode:function(){const t=[new Ke,new Ke];return t.forEach((t,e)=>{t.size(this.dragHandleWidth,this.height).fill({color:"transparent"}).css({cursor:"ew-resize"}),t.on("mousedown",t=>{t.stopPropagation(),t.preventDefault(),this.dragHandleMousedownX=t.clientX,this.dragHandleIndex=e,this.dragHandleMousedownCustomTextWidth=void 0===this.customTextWidth?this._textData?this._textData.width:this.width:this.customTextWidth,this.dragHandleMousedownBodyCursor=document.body.style.cursor,this.dragHandleMousedownLeft=this.left,this.isDragHandleMousedown=!0})}),t},updateDragHandle:function(){this.checkEnableDragModifyNodeWidth()&&(this._dragHandleNodes||(this._dragHandleNodes=this.createDragHandleNode()),this.getData("isActive")?(this._dragHandleNodes.forEach(t=>{t.height(this.height),this.group.add(t)}),this._dragHandleNodes[1].x(this.width-this.dragHandleWidth)):this._dragHandleNodes.forEach(t=>{t.remove()}))}};const On={createUserListNode:function(){this.mindMap.cooperate&&(this._userListGroup=new xi,this.group.add(this._userListGroup))},updateUserListNode:function(){if(!this._userListGroup)return;const{avatarSize:t}=this.mindMap.opt.cooperateStyle;this._userListGroup.clear();const e=this.userList.length,i=Math.floor(this.width/t),n=[];e>i?n.push(...this.userList.slice(0,i-1),{isMore:!0,name:"+"+(e-i+1)}):n.push(...this.userList),n.forEach((e,i)=>{let n=null;n=e.avatar?this.createImageAvatar(e):this.createTextAvatar(e),n.on("click",t=>{this.mindMap.emit("node_cooperate_avatar_click",e,this,n,t)}),n.on("mouseenter",t=>{this.mindMap.emit("node_cooperate_avatar_mouseenter",e,this,n,t)}),n.on("mouseleave",t=>{this.mindMap.emit("node_cooperate_avatar_mouseleave",e,this,n,t)}),n.x(i*t).cy(-t/2),this._userListGroup.add(n)})},createTextAvatar:function(t){const{avatarSize:e,fontSize:i}=this.mindMap.opt.cooperateStyle,n=new xi,s=t.isMore?t.name:String(t.name)[0],o=(new pi).size(e,e);o.fill({color:t.color||Ji(s)});const r=(new ci).text(s).fill({color:"#fff"}).css({"font-size":i+"px"}).dx(-i/2).dy((e-i)/2);return n.add(o).add(r),n},createImageAvatar:function(t){const{avatarSize:e}=this.mindMap.opt.cooperateStyle;return(new we).load(t.avatar).size(e,e)},addUser:function(t){this.userList.find(e=>e.id==t.id)||(this.userList.push(t),this.updateUserListNode())},removeUser:function(t){const e=this.userList.findIndex(e=>e.id==t.id);-1!==e&&(this.userList.splice(e,1),this.updateUserListNode())},emptyUser:function(){this.userList=[],this.updateUserListNode()}};const In={initQuickCreateChildBtn:function(){this.isGeneralization||(this._quickCreateChildBtn=null,this._showQuickCreateChildBtn=!1)},showQuickCreateChildBtn:function(){if(!(this.isGeneralization||this.getChildrenLength()>0)){if(this._quickCreateChildBtn)this.group.add(this._quickCreateChildBtn);else{const{quickCreateChildBtnIcon:t,expandBtnStyle:e,expandBtnSize:i}=this.mindMap.opt,{icon:n,style:s}=t;let{color:o,fill:r}=e||{color:"#808080",fill:"#fff"};o=s.color||o;const a=Ni(n||En.quickCreateChild).size(i,i);a.css({cursor:"pointer"}),a.x(0).y(-i/2),this.style.iconNode(a,o);const h=(new pi).size(i);h.x(0).y(-i/2),h.fill({color:r}).css({cursor:"pointer"}),this._quickCreateChildBtn=new xi,this._quickCreateChildBtn.add(h).add(a),this._quickCreateChildBtn.on("click",t=>{t.stopPropagation(),this.mindMap.emit("quick_create_btn_click",this);const{customQuickCreateChildBtnClick:e}=this.mindMap.opt;"function"!=typeof e?this.mindMap.execCommand("INSERT_CHILD_NODE",!0,[this]):e(this)}),this._quickCreateChildBtn.on("dblclick",t=>{t.stopPropagation()}),this._quickCreateChildBtn.addClass("smm-quick-create-child-btn"),this.group.add(this._quickCreateChildBtn)}this._showQuickCreateChildBtn=!0,this.renderer.layout.renderExpandBtn(this,this._quickCreateChildBtn)}},removeQuickCreateChildBtn:function(){this.isGeneralization||this._quickCreateChildBtn&&this._showQuickCreateChildBtn&&(this._quickCreateChildBtn.remove(),this._showQuickCreateChildBtn=!1)},hideQuickCreateChildBtn:function(){if(this.isGeneralization)return;const{isActive:t}=this.getData();t||this.removeQuickCreateChildBtn()}};const Fn={getImgTextMarin:function(t,e,i,n,s){const{imgTextMargin:o}=this.mindMap.opt;return"v"===t?n>0&&s>0?o:0:e>0&&i>0?o:0},getTagContentSize:function(t){let e=0,i=this._tagData.reduce((t,i)=>(e=Math.max(e,i.height),t+i.width),0);return i+=(this._tagData.length-1)*t,{width:i,height:e}},getNodeRect:function(){if(this.isUseCustomNodeContent()){const t=this.measureCustomNodeContentSize(this._customNodeContent.cloneNode(!0));return{width:this.hasCustomWidth()?this.customTextWidth:t.width,height:t.height}}const{TAG_PLACEMENT:t,IMG_PLACEMENT:e}=n,{textContentMargin:i}=this.mindMap.opt,s=(this.getStyle("tagPlacement")||t.RIGHT)===t.BOTTOM,o=this.getStyle("imgPlacement")||e.TOP;let r=0,a=0,h=0,l=0,d=0,c=0,u=0;if(this._imgData&&(r=this._imgData.width,a=this._imgData.height),this.mindMap.nodeInnerPrefixList.forEach(t=>{const e=this[`_${t.name}Data`];e&&(h+=e.width,l=Math.max(l,e.height),u++)}),this._prefixData&&(h+=this._prefixData.width,l=Math.max(l,this._prefixData.height),u++),this._iconData.length>0&&(h+=this._iconData.reduce((t,e)=>(l=Math.max(l,e.height),t+e.width),0)+(this._iconData.length-1)*i,u++),this._textData&&(h+=this._textData.width,l=Math.max(l,this._textData.height),u++),this._hyperlinkData&&(h+=this._hyperlinkData.width,l=Math.max(l,this._hyperlinkData.height),u++),this._tagData.length>0){const{width:t,height:e}=this.getTagContentSize(i);s?(d=t,c=e):(h+=t,l=Math.max(l,e),u++)}this._noteData&&(h+=this._noteData.width,l=Math.max(l,this._noteData.height),u++),this._attachmentData&&(h+=this._attachmentData.width,l=Math.max(l,this._attachmentData.height),u++),this._postfixData&&(h+=this._postfixData.width,l=Math.max(l,this._postfixData.height),u++),this.mindMap.nodeInnerPostfixList.forEach(t=>{const e=this[`_${t.name}Data`];e&&(h+=e.width,l=Math.max(l,e.height),u++)}),h+=(u-1)*i,s&&h>0&&c>0&&(this._rectInfo.textContentWidthWithoutTag=h,h=Math.max(h,d),l=l+i+c),this._rectInfo.textContentWidth=h,this._rectInfo.textContentHeight=l;let p=0,m=0;[e.TOP,e.BOTTOM].includes(o)?(p=Math.max(r,h),m=a+l+this.getImgTextMarin("v",0,0,a,l)):(p=r+h+this.getImgTextMarin("h",r,h),m=Math.max(a,l));const{paddingX:f,paddingY:g}=this.getPaddingVale(),{paddingX:x,paddingY:w}=this.shapeInstance.getShapePadding(p,m,f,g);this.shapePadding.paddingX=x,this.shapePadding.paddingY=w;const v=this.getBorderWidth();return{width:p+2*f+2*x+v,height:m+2*g+2*w+v}},addHoverNode:function(t,e){const{hoverRectPadding:i}=this.mindMap.opt;this.hoverNode=(new Ke).size(t+2*i,e+2*i).x(-i).y(-i),this.hoverNode.addClass("smm-hover-node"),this.style.hoverNode(this.hoverNode,t,e),this.group.add(this.hoverNode)},layout:function(){if(!this.group)return;this.group.clear();const{openRealtimeRenderOnNodeTextEdit:t,textContentMargin:e,addCustomContentToNode:i}=this.mindMap.opt,{width:s,height:o}=this;let{paddingX:r,paddingY:a}=this.getPaddingVale();const h=this.getBorderWidth()/2;if(r+=this.shapePadding.paddingX+h,a+=this.shapePadding.paddingY+h,this.shapeNode=this.shapeInstance.createShape(),this.shapeNode.addClass("smm-node-shape"),this.shapeNode.translate(h,h),this.style.shape(this.shapeNode),this.group.add(this.shapeNode),this.renderExpandBtnPlaceholderRect(),this.createUserListNode&&this.createUserListNode(),this.isGeneralization&&this.generalizationBelongNode&&this.group.addClass("generalization_"+this.generalizationBelongNode.uid),this.isUseCustomNodeContent()){const t=cn({el:this._customNodeContent,width:s,height:o});return this.group.add(t),void this.addHoverNode(s,o)}const{IMG_PLACEMENT:l,TAG_PLACEMENT:d}=n,c=this.getStyle("imgPlacement")||l.TOP,u=(this.getStyle("tagPlacement")||d.RIGHT)===d.BOTTOM;let{textContentWidth:p,textContentHeight:m,textContentWidthWithoutTag:f}=this._rectInfo;const g=m;let x=0,w=0;const v=this._tagData&&this._tagData.length>0;if(v){const t=this.getTagContentSize(e);x=t.width,w=t.height,u&&(m-=w+e)}let y=0,_=0;if(this._imgData)switch(y=this._imgData.width,_=this._imgData.height,this.group.add(this._imgData.node),c){case l.TOP:this._imgData.node.cx(s/2).y(a);break;case l.BOTTOM:this._imgData.node.cx(s/2).y(o-a-_);break;case l.LEFT:this._imgData.node.x(r).cy(o/2);break;case l.RIGHT:this._imgData.node.x(s-r-y).cy(o/2)}let M=new xi,E=0;if(v&&u&&(E=f<p?(p-f)/2:0),this.mindMap.nodeInnerPrefixList.forEach(t=>{const i=this[`_${t.name}Data`];i&&(i.node.x(E).y((m-i.height)/2),M.add(i.node),E+=i.width+e)}),this._prefixData){const t=cn({el:this._prefixData.el,width:this._prefixData.width,height:this._prefixData.height});t.x(E).y((m-this._prefixData.height)/2),M.add(t),E+=this._prefixData.width+e}let N=new xi;if(this._iconData&&this._iconData.length>0){let t=0;this._iconData.forEach(i=>{i.node.x(E+t).y((m-i.height)/2),N.add(i.node),t+=i.width+e}),M.add(N),E+=t}if(this._textData){const i=this._textData.node.attr("data-offsetx")||0;this._textData.node.attr("data-offsetx",E),(this._textData.nodeContent||this._textData.node).x(-i).x(E).y((m-this._textData.height)/2),t&&this._textData.node.opacity(this.mindMap.renderer.textEdit.getCurrentEditNode()===this?0:1),M.add(this._textData.node),E+=this._textData.width+e}this._hyperlinkData&&(this._hyperlinkData.node.x(E).y((m-this._hyperlinkData.height)/2),M.add(this._hyperlinkData.node),E+=this._hyperlinkData.width+e);let b=new xi;if(v)if(u){let t=0;this._tagData.forEach(i=>{i.node.x(t).y((w-i.height)/2),b.add(i.node),t+=i.width+e}),b.x((p-x)/2).y(g-w),M.add(b)}else{let t=0;this._tagData.forEach(i=>{i.node.x(E+t).y((m-i.height)/2),b.add(i.node),t+=i.width+e}),M.add(b),E+=t}if(this._noteData&&(this._noteData.node.x(E).y((m-this._noteData.height)/2),M.add(this._noteData.node),E+=this._noteData.width+e),this._attachmentData&&(this._attachmentData.node.x(E).y((m-this._attachmentData.height)/2),M.add(this._attachmentData.node),E+=this._attachmentData.width+e),this._postfixData){const t=cn({el:this._postfixData.el,width:this._postfixData.width,height:this._postfixData.height});t.x(E).y((m-this._postfixData.height)/2),M.add(t),E+=this._postfixData.width+e}this.mindMap.nodeInnerPostfixList.forEach(t=>{const i=this[`_${t.name}Data`];i&&(i.node.x(E).y((m-i.height)/2),M.add(i.node),E+=i.width+e)}),this.group.add(M);const{width:T,height:C}=M.bbox();let q=0,L=0;switch(c){case l.TOP:q=s/2-T/2,L=a+_+this.getImgTextMarin("v",0,0,_,g);break;case l.BOTTOM:q=s/2-T/2,L=a;break;case l.LEFT:q=y+r+this.getImgTextMarin("h",y,p),L=o/2-C/2;break;case l.RIGHT:q=r,L=o/2-C/2}if(M.translate(q,L),this.addHoverNode(s,o),this._customContentAddToNodeAdd&&this._customContentAddToNodeAdd.el){const t=cn(this._customContentAddToNodeAdd);this.group.add(t),i&&"function"==typeof i.handle&&i.handle({content:this._customContentAddToNodeAdd,element:t,node:this})}this.mindMap.emit("node_layout_end",this)},customNodeContentRealtimeLayout:function(){if(!this.group)return;if(!this.isUseCustomNodeContent())return;this.shapeNode&&this.shapeNode.remove(),this._unVisibleRectRegionNode&&this._unVisibleRectRegionNode.remove(),this.hoverNode&&this.hoverNode.remove();const{width:t,height:e}=this,i=this.getBorderWidth()/2;this.shapeNode=this.shapeInstance.createShape(),this.shapeNode.addClass("smm-node-shape"),this.shapeNode.translate(i,i),this.style.shape(this.shapeNode),this.group.add(this.shapeNode),this.renderExpandBtnPlaceholderRect(),this.isGeneralization&&this.generalizationBelongNode&&this.group.addClass("generalization_"+this.generalizationBelongNode.uid),this.addHoverNode(t,e),this.shapeNode.back(),this.group.findOne("foreignObject").size(t,e)}};class Bn{constructor(t={}){this.opt=t,this.nodeData=this.handleData(t.data||{}),this.nodeDataSnapshot="",this.uid=t.uid,this.mindMap=t.mindMap,this.renderer=t.renderer,this.draw=this.mindMap.draw,this.nodeDraw=this.mindMap.nodeDraw,this.lineDraw=this.mindMap.lineDraw,this.style=new vn(this),this.effectiveStyles={},this.shapeInstance=new yn(this),this.shapePadding={paddingX:0,paddingY:0},this.isRoot=void 0!==t.isRoot&&t.isRoot,this.isGeneralization=void 0!==t.isGeneralization&&t.isGeneralization,this.generalizationBelongNode=null,this.layerIndex=void 0===t.layerIndex?0:t.layerIndex,this.width=t.width||0,this.height=t.height||0,this.customTextWidth=t.data.data.customTextWidth||void 0,this._left=t.left||0,this._top=t.top||0,this.customLeft=t.data.data.customLeft||void 0,this.customTop=t.data.data.customTop||void 0,this.isDrag=!1,this.parent=t.parent||null,this.children=t.children||[],this.userList=[],this.group=null,this.shapeNode=null,this.hoverNode=null,this._customNodeContent=null,this._imgData=null,this._iconData=null,this._textData=null,this._hyperlinkData=null,this._tagData=null,this._noteData=null,this.noteEl=null,this.noteContentIsShow=!1,this._attachmentData=null,this._prefixData=null,this._postfixData=null,this._expandBtn=null,this._lastExpandBtnType=null,this._showExpandBtn=!1,this._openExpandNode=null,this._closeExpandNode=null,this._fillExpandNode=null,this._userListGroup=null,this._lines=[],this._generalizationList=[],this._unVisibleRectRegionNode=null,this._isMouseenter=!1,this._customContentAddToNodeAdd=null,this._rectInfo={textContentWidth:0,textContentHeight:0,textContentWidthWithoutTag:0},this._generalizationNodeWidth=0,this._generalizationNodeHeight=0,this.expandBtnSize=this.mindMap.opt.expandBtnSize,this.isMultipleChoice=!1,this.needLayout=!1,this.isHide=!1;const e=Object.getPrototypeOf(this);e.bindEvent||(Object.keys(Fn).forEach(t=>{e[t]=Fn[t]}),Object.keys(Mn).forEach(t=>{e[t]=Mn[t]}),Object.keys(Nn).forEach(t=>{e[t]=Nn[t]}),Object.keys(Rn).forEach(t=>{e[t]=Rn[t]}),Object.keys(bn).forEach(t=>{e[t]=bn[t]}),Object.keys(kn).forEach(t=>{e[t]=kn[t]}),this.mindMap.cooperate&&Object.keys(On).forEach(t=>{e[t]=On[t]}),Object.keys(zn).forEach(t=>{e[t]=zn[t]}),this.mindMap.opt.isShowCreateChildBtnIcon&&(Object.keys(In).forEach(t=>{e[t]=In[t]}),this.initQuickCreateChildBtn()),e.bindEvent=!0),this.getSize(),this.updateGeneralization(),this.initDragHandle()}get left(){return this.customLeft||this._left}set left(t){this._left=t}get top(){return this.customTop||this._top}set top(t){this._top=t}reset(){this.children=[],this.parent=null,this.isRoot=!1,this.layerIndex=0,this.left=0,this.top=0}resetWhenDelete(){this._isMouseenter=!1}handleData(t){return t.data.expand=!1!==t.data.expand,t.data.isActive=!0===t.data.isActive,t.children=t.children||[],t}createNodeData(t){const{isUseCustomNodeContent:e,customCreateNodeContent:i,createNodePrefixContent:n,createNodePostfixContent:s,addCustomContentToNode:o}=this.mindMap.opt,r=["custom","image","icon","text","hyperlink","tag","note","attachment","prefix","postfix",...this.mindMap.nodeInnerPrefixList.map(t=>t.name),...this.mindMap.nodeInnerPostfixList.map(t=>t.name)],a={};Array.isArray(t)?r.forEach(e=>{t.includes(e)&&(a[e]=!0)}):r.forEach(t=>{a[t]=!0}),e&&i&&a.custom&&(this._customNodeContent=i(this)),this._customNodeContent?pn(this._customNodeContent):(a.image&&(this._imgData=this.createImgNode()),a.icon&&(this._iconData=this.createIconNode()),a.text&&(this._textData=this.createTextNode()),a.hyperlink&&(this._hyperlinkData=this.createHyperlinkNode()),a.tag&&(this._tagData=this.createTagNode()),a.note&&(this._noteData=this.createNoteNode()),a.attachment&&(this._attachmentData=this.createAttachmentNode()),this.mindMap.nodeInnerPrefixList.forEach(t=>{a[t.name]&&(this[`_${t.name}Data`]=t.createContent(this))}),a.prefix&&(this._prefixData=n?n(this):null,this._prefixData&&this._prefixData.el&&pn(this._prefixData.el)),a.postfix&&(this._postfixData=s?s(this):null,this._postfixData&&this._postfixData.el&&pn(this._postfixData.el)),this.mindMap.nodeInnerPostfixList.forEach(t=>{a[t.name]&&(this[`_${t.name}Data`]=t.createContent(this))}),o&&"function"==typeof o.create&&(this._customContentAddToNodeAdd=o.create(this),this._customContentAddToNodeAdd&&this._customContentAddToNodeAdd.el&&pn(this._customContentAddToNodeAdd.el)))}getSize(t,e={}){e.ignoreUpdateCustomTextWidth||!1||(this.customTextWidth=this.getData("customTextWidth")||void 0),this.customLeft=this.getData("customLeft")||void 0,this.customTop=this.getData("customTop")||void 0,this.createNodeData(t);const{width:i,height:n}=this.getNodeRect(),s=this.width!==i||this.height!==n;return this.width=i,this.height=n,s}bindGroupEvent(){this.group.on("click",t=>{if(this.mindMap.emit("node_click",this,t),this.isMultipleChoice)return t.stopPropagation(),void(this.isMultipleChoice=!1);this.mindMap.opt.onlyOneEnableActiveNodeOnCooperate&&this.userList.length>0||this.active(t)}),this.group.on("mousedown",t=>{const{readonly:e,enableCtrlKeyNodeSelection:i,useLeftKeySelectionRightKeyDrag:n,mousedownEventPreventDefault:s}=this.mindMap.opt;if(s&&t.preventDefault(),e||(this.isRoot?3!==t.which||n||t.stopPropagation():2!==t.which&&t.stopPropagation()),!e&&(t.ctrlKey||t.metaKey)&&i){this.isMultipleChoice=!0;const t=this.getData("isActive");t||this.mindMap.emit("before_node_active",this,this.renderer.activeNodeList),this.mindMap.renderer[t?"removeNodeFromActiveList":"addNodeToActiveList"](this,!0),this.renderer.emitNodeActiveEvent(t?null:this)}this.mindMap.emit("node_mousedown",this,t)}),this.group.on("mouseup",t=>{this.isRoot||2===t.which||this.mindMap.opt.readonly||t.stopPropagation(),this.mindMap.emit("node_mouseup",this,t)}),this.group.on("mouseenter",t=>{this.isDrag||(this._isMouseenter=!0,this.showExpandBtn(),this.isGeneralization&&this.handleGeneralizationMouseenter(),this.mindMap.emit("node_mouseenter",this,t))}),this.group.on("mouseleave",t=>{this._isMouseenter&&(this._isMouseenter=!1,this.hideExpandBtn(),this.isGeneralization&&this.handleGeneralizationMouseleave(),this.mindMap.emit("node_mouseleave",this,t))}),this.group.on("dblclick",t=>{const{readonly:e,onlyOneEnableActiveNodeOnCooperate:i}=this.mindMap.opt;e||t.ctrlKey||t.metaKey||(t.stopPropagation(),i&&this.userList.length>0||this.mindMap.emit("node_dblclick",this,t))}),this.group.on("contextmenu",t=>{const{readonly:e,useLeftKeySelectionRightKeyDrag:i}=this.mindMap.opt;e||t.ctrlKey||(t.stopPropagation(),t.preventDefault(),this.mindMap.select&&!i&&this.mindMap.select.hasSelectRange()||(this.getData("isActive")&&1===this.renderer.activeNodeList.length||(this.renderer.clearActiveNodeList(),this.active(t)),this.mindMap.emit("node_contextmenu",t,this)))})}active(t){this.mindMap.opt.readonly||(t&&t.stopPropagation(),this.getData("isActive")||(this.mindMap.emit("before_node_active",this,this.renderer.activeNodeList),this.renderer.clearActiveNodeList(),this.renderer.addNodeToActiveList(this,!0),this.renderer.emitNodeActiveEvent(this)))}deactivate(){this.mindMap.renderer.removeNodeFromActiveList(this),this.mindMap.renderer.emitNodeActiveEvent()}update(t){if(!this.group)return;this.updateNodeActiveClass();const{alwaysShowExpandBtn:e,notShowExpandBtn:i,isShowCreateChildBtnIcon:n,readonly:s}=this.mindMap.opt,o=this.getChildrenLength();if(!i)if(e)this._expandBtn&&o<=0?this.removeExpandBtn():this.renderExpandBtn();else{const{isActive:t,expand:e}=this.getData();o<=0?this.removeExpandBtn():!e||t||this._isMouseenter?this.showExpandBtn():this.hideExpandBtn()}if(n)if(o>0)this.removeQuickCreateChildBtn();else{const{isActive:t}=this.getData();t?this.showQuickCreateChildBtn():this.hideQuickCreateChildBtn()}this.updateDragHandle(),this.renderGeneralization(t),this.updateUserListNode&&this.updateUserListNode();const r=this.group.transform();this.nodeDataSnapshot=s?"":JSON.stringify(this.getData()),this.left===r.translateX&&this.top===r.translateY||this.group.translate(this.left-r.translateX,this.top-r.translateY)}getNodePosInClient(t,e){const i=this.mindMap.draw.transform(),{scaleX:n,scaleY:s,translateX:o,translateY:r}=i;return{left:t*n+o,top:e*s+r}}checkIsInClient(t=0){const{left:e,top:i}=this.getNodePosInClient(this.left,this.top);return e+this.width>0-t&&i+this.height>0-t&&e<this.mindMap.width+t&&i<this.mindMap.height+t}reRender(t,e){const i=this.getSize(t,e);return this.layout(),this.update(),i}updateNodeActiveClass(){if(!this.group)return;const t=this.getData("isActive");this.group[t?"addClass":"removeClass"]("active")}updateNodeByActive(t){if(this.group){const{isShowCreateChildBtnIcon:e}=this.mindMap.opt;t?(this.showExpandBtn(),e&&this.showQuickCreateChildBtn()):(this.hideExpandBtn(),e&&this.hideQuickCreateChildBtn()),this.updateNodeActiveClass(),this.updateDragHandle()}}render(t=()=>{},e=!1,i=!1){this.renderLine();const{openPerformance:n,performanceConfig:s}=this.mindMap.opt;if(e||!n||this.checkIsInClient(s.padding)||this.isRoot?this.group?(this.nodeDraw.has(this.group)||this.nodeDraw.add(this.group),this.needLayout&&(this.needLayout=!1,this.layout()),this.updateExpandBtnPlaceholderRect(),this.update(e)):(this.group=new xi,this.group.addClass("smm-node"),this.group.css({cursor:"default"}),this.bindGroupEvent(),this.nodeDraw.add(this.group),this.layout(),this.update(e)):n&&s.removeNodeWhenOutCanvas&&this.removeSelf(),this.children&&this.children.length&&!1!==this.getData("expand")){let n=0;this.children.forEach(s=>{const o=()=>{s.render(()=>{n++,n>=this.children.length&&t()},e,i)};i?setTimeout(o,0):o()})}else t();this.nodeData.inserting&&(delete this.nodeData.inserting,this.active(),this.mindMap.emit("node_dblclick",this,null,!0))}removeSelf(){this.group&&(this.group.remove(),this.removeGeneralization())}remove(){this.group&&(this.group.remove(),this.removeGeneralization(),this.removeLine(),this.children&&this.children.length&&this.children.forEach(t=>{t.remove()}))}destroy(){this.removeLine(),this.parent&&this.parent.removeLine(),this.group&&(this.emptyUser&&this.emptyUser(),this.resetWhenDelete(),this.group.remove(),this.removeGeneralization(),this.group=null,this.style.onRemove())}hide(){if(this.group&&this.group.hide(),this.hideGeneralization(),this.parent){const t=this.parent.children.indexOf(this);this.parent._lines[t]&&this.parent._lines[t].hide(),this._lines.forEach(t=>{t.hide()})}this.children&&this.children.length&&this.children.forEach(t=>{t.hide()})}show(){if(this.group){if(this.group.show(),this.showGeneralization(),this.parent){const t=this.parent.children.indexOf(this);this.parent._lines[t]&&this.parent._lines[t].show(),this._lines.forEach(t=>{t.show()})}this.children&&this.children.length&&this.children.forEach(t=>{t.show()})}}setOpacity(t){this.group&&this.group.opacity(t),this._lines.forEach(e=>{e.opacity(t)}),this.children.forEach(e=>{e.setOpacity(t)}),this.setGeneralizationOpacity(t)}hideChildren(){this._lines.forEach(t=>{t.hide()}),this.children&&this.children.length&&this.children.forEach(t=>{t.hide()})}showChildren(){this._lines.forEach(t=>{t.show()}),this.children&&this.children.length&&this.children.forEach(t=>{t.show()})}startDrag(){this.isDrag=!0,this.group&&this.group.addClass("smm-node-dragging")}endDrag(){this.isDrag=!1,this.group&&this.group.removeClass("smm-node-dragging")}renderLine(t=!1){if(!1===this.getData("expand"))return;let e=this.getChildrenLength();this.mindMap.renderer.layout.nodeIsRemoveAllLines&&this.mindMap.renderer.layout.nodeIsRemoveAllLines(this)&&(e=0),e>this._lines.length?new Array(e-this._lines.length).fill(0).forEach(()=>{this._lines.push(this.lineDraw.path())}):e<this._lines.length&&(this._lines.slice(e).forEach(t=>{t.remove()}),this._lines=this._lines.slice(0,e)),this.renderer.layout.renderLine(this,this._lines,(...t)=>{this.styleLine(...t)},this.style.getStyle("lineStyle",!0)),t&&this.children&&this.children.length>0&&this.children.forEach(e=>{e.renderLine(t)})}getShape(){return this.mindMap.themeConfig.nodeUseLineStyle?n.SHAPE.RECTANGLE:this.style.getStyle("shape",!1,!1)}hasCustomPosition(){return void 0!==this.customLeft&&void 0!==this.customTop}ancestorHasCustomPosition(){let t=this;for(;t;){if(t.hasCustomPosition())return!0;t=t.parent}return!1}ancestorHasGeneralization(){let t=this.parent;for(;t;){if(t.checkHasGeneralization())return!0;t=t.parent}return!1}addChildren(t){this.children.push(t)}styleLine(t,e,i){const{enableInheritAncestorLineStyle:n}=this.mindMap.opt,s=n?"getSelfInhertStyle":"getSelfStyle",o=e[s]("lineWidth")||e.getStyle("lineWidth",!0),r=e[s]("lineColor")||this.getRainbowLineColor(e)||e.getStyle("lineColor",!0),a=e[s]("lineDasharray")||e.getStyle("lineDasharray",!0);this.style.line(t,{width:o,color:r,dasharray:a},i,e)}getRainbowLineColor(t){return this.mindMap.rainbowLines?this.mindMap.rainbowLines.getNodeColor(t):""}removeLine(){this._lines.forEach(t=>{t.remove()}),this._lines=[]}isAncestor(t){if(this.uid===t.uid)return!1;let e=t.parent;for(;e;){if(this.uid===e.uid)return!0;e=e.parent}return!1}isParent(t){if(this.uid===t.uid)return!1;const e=t.parent;return!(!e||this.uid!==e.uid)}isBrother(t){return!(!this.parent||this.uid===t.uid)&&this.parent.children.find(e=>e.uid===t.uid)}getIndexInBrothers(){return this.parent&&this.parent.children?this.parent.children.findIndex(t=>t.uid===this.uid):-1}getPaddingVale(){return{paddingX:this.getStyle("paddingX"),paddingY:this.getStyle("paddingY")}}getStyle(t,e){const i=this.style.merge(t,e);return void 0===i?"":i}getSelfStyle(t){return this.style.getSelfStyle(t)}getParentSelfStyle(t){return this.parent?this.parent.getSelfStyle(t)||this.parent.getParentSelfStyle(t):null}getSelfInhertStyle(t){return this.getSelfStyle(t)||this.getParentSelfStyle(t)}getBorderWidth(){return this.style.merge("borderWidth",!1)||0}getData(t){return t?this.nodeData.data[t]:this.nodeData.data}getPureData(t=!0,e=!1){return Ai({},this,t,e)}getAncestorNodes(){const t=[];let e=this.parent;for(;e;)t.unshift(e),e=e.parent;return t}hasCustomStyle(){return this.style.hasCustomStyle()}getRect(){return this.group?this.group.rbox():null}getRectInSvg(){const{scaleX:t,scaleY:e,translateX:i,translateY:n}=this.mindMap.draw.transform();let{left:s,top:o,width:r,height:a}=this;const h=(s+r)*t+i,l=(o+a)*e+n;return s=s*t+i,o=o*e+n,{left:s,right:h,top:o,bottom:l,width:r*t,height:a*e}}highlight(){this.group&&this.group.addClass("smm-node-highlight")}closeHighlight(){this.group&&this.group.removeClass("smm-node-highlight")}fakeClone(){const t=new Bn({...this.opt,uid:Fi()});return Object.keys(this).forEach(e=>{t[e]=this[e]}),t}createSvgTextNode(t=""){return(new ci).text(t)}getSvgObjects(){return{SVG:Ni,G:xi,Rect:Ke}}checkEnableDragModifyNodeWidth(){const{enableDragModifyNodeWidth:t,isUseCustomNodeContent:e,customCreateNodeContent:i}=this.mindMap.opt;return t&&(this.mindMap.richText||e&&i)}hasCustomWidth(){return this.checkEnableDragModifyNodeWidth()&&void 0!==this.customTextWidth}getChildrenLength(){return this.nodeData.children?this.nodeData.children.length:0}}const Pn=Bn;class Hn{constructor(t){this.max=t||1e3,this.size=0,this.pool=new Map}add(t,e){return!(!this.has(t)&&this.size>=this.max)&&(this.delete(t),this.pool.set(t,e),this.size++,!0)}delete(t){this.pool.has(t)&&(this.pool.delete(t),this.size--)}has(t){return this.pool.has(t)}get(t){if(this.pool.has(t))return this.pool.get(t)}clear(){this.size=0,this.pool=new Map}}const Un=class{constructor(t){this.renderer=t,this.mindMap=t.mindMap,this.draw=this.mindMap.draw,this.lineDraw=this.mindMap.lineDraw,this.root=null,this.lru=new Hn(this.mindMap.opt.maxNodeCacheCount),this.rootNodeCenterOffset=null}doLayout(){throw new Error("【computed】方法为必要方法,需要子类进行重写!")}renderLine(){throw new Error("【renderLine】方法为必要方法,需要子类进行重写!")}renderExpandBtn(){throw new Error("【renderExpandBtn】方法为必要方法,需要子类进行重写!")}renderGeneralization(){}cacheNode(t,e){this.renderer.nodeCache[t]=e,this.lru.add(t,e)}checkIsNeedResizeSources(){return this.renderer.checkHasRenderSource(n.CHANGE_THEME)}checkIsLayerTypeChange(t,e){return!(t>=2&&e>=2)&&(t>=2&&e<2||(t<2&&e>=2||void 0))}checkIsLayoutChangeRerenderExpandBtnPlaceholderRect(t){this.renderer.checkHasRenderSource(n.CHANGE_LAYOUT)&&(t.needRerenderExpandBtnPlaceholderRect=!0)}checkIsNodeDataChange(t,e){return!!t&&((t="string"==typeof t?JSON.parse(t):t).isActive=e.isActive,t.expand=e.expand,(t=JSON.stringify(t))!==JSON.stringify(e))}checkNodeFixChange(t,e,i){let n=!1;this.mindMap.nodeInnerPrefixList.forEach(i=>{if(i.updateNodeData){const s=i.updateNodeData(t,e);s&&(n=s)}});let s=!1;return this.mindMap.nodeInnerPostfixList.forEach(e=>{if(e.updateNodeData){const n=e.updateNodeData(t,i);n&&(s=n)}}),n||s}createNode(t,e,i,n,s,o){const r={};this.mindMap.nodeInnerPrefixList.forEach(i=>{if(i.createNodeData){const[a,h]=i.createNodeData({data:t,parent:e,ancestors:o,layerIndex:n,index:s});r[a]=h}});const a={};this.mindMap.nodeInnerPostfixList.forEach(i=>{if(i.createNodeData){const[r,h]=i.createNodeData({data:t,parent:e,ancestors:o,layerIndex:n,index:s});a[r]=h}});const h=t.data.uid;let l=null;if(t&&t._node&&!this.renderer.reRender){l=t._node;const s=this.checkIsLayerTypeChange(l.layerIndex,n);l.reset(),l.layerIndex=n,i?l.isRoot=!0:l.parent=e._node,this.cacheNode(t._node.uid,l),this.checkIsLayoutChangeRerenderExpandBtnPlaceholderRect(l);const o=this.checkNodeFixChange(l,r,a),h=this.checkIsNeedResizeSources(),d=this.checkIsNodeDataChange(t._node.nodeDataSnapshot,t.data);(h||d||s||l.getData("resetRichText")&&!l.isUseCustomNodeContent()||l.getData("needUpdate")||o)&&(l.getSize(),l.needLayout=!0),this.checkGetGeneralizationChange(l,h)}else if(!this.lru.has(h)&&!this.renderer.lastNodeCache[h]||this.renderer.reRender){const s=h||Fi();l=new Pn({data:t,uid:s,renderer:this.renderer,mindMap:this.mindMap,draw:this.draw,layerIndex:n,isRoot:i,parent:i?null:e._node,...r}),t.data.uid=s,this.cacheNode(s,l),t._node=l}else{l=this.lru.get(h)||this.renderer.lastNodeCache[h];const s=JSON.stringify(l.getData()),o=this.checkIsLayerTypeChange(l.layerIndex,n);l.reset(),l.nodeData=l.handleData(t||{}),l.layerIndex=n,i?l.isRoot=!0:l.parent=e._node,this.cacheNode(h,l),this.checkIsLayoutChangeRerenderExpandBtnPlaceholderRect(l),t._node=l;const d=this.checkIsNeedResizeSources(),c=this.checkIsNodeDataChange(s,t.data),u=this.checkNodeFixChange(l,r,a);(d||c||o||l.getData("resetRichText")&&!l.isUseCustomNodeContent()||l.getData("needUpdate")||u)&&(l.getSize(),l.needLayout=!0),this.checkGetGeneralizationChange(l,d)}return t.data.isActive&&this.renderer.addNodeToActiveList(l),-1!==this.mindMap.renderer.findActiveNodeIndex(l)&&l.setData({isActive:!0}),i?this.root=l:e._node.addChildren(l),l}checkGetGeneralizationChange(t,e){const i=t.getData("generalization");i&&t._generalizationList&&t._generalizationList.length>0&&t._generalizationList.forEach((t,n)=>{const s=t.generalizationNode,o=s.getData(),r=i[n];(e||r&&JSON.stringify(o)!==JSON.stringify(r))&&(r&&(s.nodeData.data=r),s.getSize(),s.needLayout=!0)})}formatPosition(t,e,i){return"number"==typeof t?t:void 0!==s[t]?e*s[t]:/^\d\d*%$/.test(t)?Number.parseFloat(t)/100*e:(e-i)/2}formatInitRootNodePosition(t){const{CENTER:e}=n.INIT_ROOT_NODE_POSITION;return(!t||!Array.isArray(t)||t.length<2)&&(t=[e,e]),t}setNodeCenter(t,e){let{initRootNodePosition:i}=this.mindMap.opt;i=this.formatInitRootNodePosition(e||i),t.left=this.formatPosition(i[0],this.mindMap.width,t.width),t.top=this.formatPosition(i[1],this.mindMap.height,t.height)}getRootCenterOffset(t,e){if(this.rootNodeCenterOffset)return this.rootNodeCenterOffset;let{initRootNodePosition:i}=this.mindMap.opt;const{CENTER:s}=n.INIT_ROOT_NODE_POSITION;if(i=this.formatInitRootNodePosition(i),i[0]===s&&i[1]===s)this.rootNodeCenterOffset={x:0,y:0};else{const i={width:t,height:e},n={width:t,height:e};this.setNodeCenter(i,[s,s]),this.setNodeCenter(n),this.rootNodeCenterOffset={x:n.left-i.left,y:n.top-i.top}}return this.rootNodeCenterOffset}updateChildren(t,e,i){t.forEach(t=>{t[e]+=i,t.children&&t.children.length&&!t.hasCustomPosition()&&this.updateChildren(t.children,e,i)})}updateChildrenPro(t,e){t.forEach(t=>{Object.keys(e).forEach(i=>{t[i]+=e[i]}),t.children&&t.children.length&&!t.hasCustomPosition()&&this.updateChildrenPro(t.children,e)})}getNodeAreaWidth(t,e=!1){let i=[],n=0,s=(t,o)=>{e&&t.checkHasGeneralization()&&(n+=t._generalizationNodeWidth),t.children.length?(o+=t.width/2,t.children.forEach(t=>{s(t,o)})):(o+=t.width,i.push(o))};return s(t,0),Math.max(...i)+n}quadraticCurvePath(t,e,i,n,s=!1){let o,r;return s?(o=t+.8*(i-t),r=e+.2*(n-e)):(o=t+.2*(i-t),r=e+.8*(n-e)),`M ${t},${e} Q ${o},${r} ${i},${n}`}cubicBezierPath(t,e,i,n,s=!1){let o,r,a,h;return s?(o=t,r=e+(n-e)/2,a=i,h=r):(o=t+(i-t)/2,r=e,a=o,h=n),`M ${t},${e} C ${o},${r} ${a},${h} ${i},${n}`}computeNewPoint(t,e,i=0){return t[0]===e[0]?e[1]>t[1]?[e[0],e[1]-i]:[e[0],e[1]+i]:t[1]===e[1]?e[0]>t[0]?[e[0]-i,e[1]]:[e[0]+i,e[1]]:void 0}createFoldLine(t){const{lineRadius:e}=this.mindMap.themeConfig,i=t.length;let n="",s="";if(i>=3&&e>0){const n=t[i-3],o=t[i-2],r=t[i-1];if(!(n[0].toFixed(0)===o[0].toFixed(0)&&o[0].toFixed(0)===r[0].toFixed(0)||n[1].toFixed(0)===o[1].toFixed(0)&&o[1].toFixed(0)===r[1].toFixed(0))){const a=this.computeNewPoint(n,o,e),h=this.computeNewPoint(r,o,e);s=`Q ${o[0]},${o[1]} ${h[0]},${h[1]}`,t.splice(i-2,1,a,s)}}return t.forEach((t,e)=>{if("string"==typeof t)n+=t;else{const[i,s]=t;n+=0===e?`M ${i},${s}`:`L ${i},${s}`}}),n}getMarginX(t){const{themeConfig:e,opt:i}=this.mindMap,{second:n,node:s}=e,o=2*i.hoverRectPadding;return 1===t?n.marginX+o:s.marginX+o}getMarginY(t){const{themeConfig:e,opt:i}=this.mindMap,{second:n,node:s}=e,o=2*i.hoverRectPadding;return 1===t?n.marginY+o:s.marginY+o}getNodeWidthWithGeneralization(t){return Math.max(t.width,t.checkHasGeneralization()?t._generalizationNodeWidth:0)}getNodeHeightWithGeneralization(t){return Math.max(t.height,t.checkHasGeneralization()?t._generalizationNodeHeight:0)}getNodeBoundaries(t,e){let{generalizationLineMargin:i,generalizationNodeMargin:n}=this.mindMap.themeConfig,s=t=>{let i=1/0,o=-1/0,r=1/0,a=-1/0;t.children&&t.children.length>0&&t.children.forEach(t=>{let{left:h,right:l,top:d,bottom:c}=s(t),u=t.checkHasGeneralization()&&t.getData("expand")?t._generalizationNodeWidth+n:0,p=t.checkHasGeneralization()&&t.getData("expand")?t._generalizationNodeHeight+n:0;h-("h"===e?u:0)<i&&(i=h-("h"===e?u:0)),l+("h"===e?u:0)>o&&(o=l+("h"===e?u:0)),d<r&&(r=d),c+("v"===e?p:0)>a&&(a=c+("v"===e?p:0))});let h={left:t.left,right:t.left+t.width,top:t.top,bottom:t.top+t.height};return{left:h.left<i?h.left:i,right:h.right>o?h.right:o,top:h.top<r?h.top:r,bottom:h.bottom>a?h.bottom:a}},{left:o,right:r,top:a,bottom:h}=s(t);return{left:o,right:r,top:a,bottom:h,generalizationLineMargin:i,generalizationNodeMargin:n}}getChildrenBoundaries(t,e,i=0,n){let{generalizationLineMargin:s,generalizationNodeMargin:o}=this.mindMap.themeConfig;const r=t.children.slice(i,n+1);let a=1/0,h=-1/0,l=1/0,d=-1/0;return r.forEach(t=>{const i=this.getNodeBoundaries(t,e);a=i.left<a?i.left:a,h=i.right>h?i.right:h,l=i.top<l?i.top:l,d=i.bottom>d?i.bottom:d}),{left:a,right:h,top:l,bottom:d,generalizationLineMargin:s,generalizationNodeMargin:o}}getNodeGeneralizationRenderBoundaries(t,e){let i=null;return i=t.range?this.getChildrenBoundaries(t.node,e,t.range[0],t.range[1]):this.getNodeBoundaries(t.node,e),i}getNodeActChildrenLength(t){return t.nodeData.children&&t.nodeData.children.length}setLineStyle(t,e,i,n){e.plot(this.transformPath(i)),t&&t(e,n,!0)}transformPath(t){const{customTransformNodeLinePath:e}=this.mindMap.opt;return e?e(t):t}};const Gn=class extends Un{constructor(t={},e){super(t),this.isUseLeft=e===n.LAYOUT.LOGICAL_STRUCTURE_LEFT}doLayout(t){Ri([()=>{this.computedBaseValue()},()=>{this.computedTopValue()},()=>{this.adjustTopValue()},()=>{t(this.root)}])}computedBaseValue(){let t=0;qi(this.renderer.renderTree,null,(e,i,n,s,o,r)=>{let a=this.createNode(e,i,n,s,o,r);if(a.sortIndex=t,t++,n?this.setNodeCenter(a):this.isUseLeft?a.left=i._node.left-a.width-this.getMarginX(s):a.left=i._node.left+i._node.width+this.getMarginX(s),!e.data.expand)return!0},(t,e,i,n)=>{let s=!1===t.data.expand?0:t._node.children.length;t._node.childrenAreaHeight=s?t._node.children.reduce((t,e)=>t+e.height,0)+(s+1)*this.getMarginY(n+1):0;let o=t._node.checkHasGeneralization()?t._node._generalizationNodeHeight+this.getMarginY(n+1):0;t._node.childrenAreaHeight2=Math.max(t._node.childrenAreaHeight,o)},!0,0)}computedTopValue(){qi(this.root,null,(t,e,i,n)=>{if(t.getData("expand")&&t.children&&t.children.length){let e=this.getMarginY(n+1),i=t.top+t.height/2-t.childrenAreaHeight/2+e;t.children.forEach(t=>{t.top=i,i+=t.height+e})}},null,!0)}adjustTopValue(){qi(this.root,null,(t,e,i,n)=>{if(!t.getData("expand"))return;let s=t.childrenAreaHeight2-2*this.getMarginY(n+1)-t.height;s>0&&this.updateBrothers(t,s/2)},null,!0)}updateBrothers(t,e){if(t.parent){let i=t.parent.children,n=Qi(t,i);i.forEach((i,s)=>{if(i.uid===t.uid||i.hasCustomPosition())return;let o=0;s<n?o=-e:s>n&&(o=e),i.top+=o,i.children&&i.children.length&&this.updateChildren(i.children,"top",o)}),this.updateBrothers(t.parent,e)}}renderLine(t,e,i,n){"curve"===n?this.renderLineCurve(t,e,i):"direct"===n?this.renderLineDirect(t,e,i):this.renderLineStraight(t,e,i)}renderLineStraight(t,e,i){if(t.children.length<=0)return[];let{left:n,top:s,width:o,height:r,expandBtnSize:a}=t;const{alwaysShowExpandBtn:h,notShowExpandBtn:l}=this.mindMap.opt;h&&!l||(a=0);let d=.6*(this.getMarginX(t.layerIndex+1)-a);this.isUseLeft&&(d*=-1);let c=this.mindMap.themeConfig.nodeUseLineStyle;t.children.forEach((h,l)=>{let u;u=this.isUseLeft?0===t.layerIndex?n:n-a:0===t.layerIndex?n+o:n+o+a;let p=s+r/2,m=this.isUseLeft?h.left+h.width:h.left,f=h.top+h.height/2,g=c?h.width*(this.isUseLeft?-1:1):0;p=c&&!t.isRoot?p+r/2:p,f=c?f+h.height/2:f;let x=this.createFoldLine([[u,p],[u+d,p],[u+d,f],[m+g,f]]);this.setLineStyle(i,e[l],x,h)})}renderLineDirect(t,e,i){if(t.children.length<=0)return[];let{left:n,top:s,width:o,height:r,expandBtnSize:a}=t;const{alwaysShowExpandBtn:h,notShowExpandBtn:l}=this.mindMap.opt;h&&!l||(a=0);const{nodeUseLineStyle:d}=this.mindMap.themeConfig;t.children.forEach((h,l)=>{0===t.layerIndex&&(a=0);let c=this.isUseLeft?n-a:n+o+a,u=s+r/2,p=this.isUseLeft?h.left+h.width:h.left,m=h.top+h.height/2;u=d&&!t.isRoot?u+r/2:u,m=d?m+h.height/2:m;let f=`M ${c},${u} L ${p},${m}`+(d?` L ${this.isUseLeft?h.left:h.left+h.width},${m}`:"");this.setLineStyle(i,e[l],f,h)})}renderLineCurve(t,e,i){if(t.children.length<=0)return[];let{left:n,top:s,width:o,height:r,expandBtnSize:a}=t;const{alwaysShowExpandBtn:h,notShowExpandBtn:l}=this.mindMap.opt;h&&!l||(a=0);const{nodeUseLineStyle:d,rootLineStartPositionKeepSameInCurve:c,rootLineKeepSameInCurve:u}=this.mindMap.themeConfig;t.children.forEach((h,l)=>{let p;0===t.layerIndex&&(a=0),p=this.isUseLeft?0!==t.layerIndex||c?n-a:n+o/2:0!==t.layerIndex||c?n+o+a:n+o/2;let m,f=s+r/2,g=this.isUseLeft?h.left+h.width:h.left,x=h.top+h.height/2,w="";f=d&&!t.isRoot?f+r/2:f,x=d?x+h.height/2:x,m=this.isUseLeft?d?` L ${h.left},${x}`:"":d?` L ${h.left+h.width},${x}`:"",w=t.isRoot&&!u?this.quadraticCurvePath(p,f,g,x)+m:this.cubicBezierPath(p,f,g,x)+m,this.setLineStyle(i,e[l],w,h)})}renderExpandBtn(t,e){let{width:i,height:n,expandBtnSize:s,layerIndex:o}=t;0===o&&(s=0);let{translateX:r,translateY:a}=e.transform(),h=this.mindMap.themeConfig.nodeUseLineStyle?n/2:0,l=this.isUseLeft?0-s:i,d=n/2+h;l===r&&d===a||e.translate(l-r,d-a)}renderGeneralization(t){t.forEach(t=>{let{left:e,top:i,bottom:n,right:s,generalizationLineMargin:o,generalizationNodeMargin:r}=this.getNodeGeneralizationRenderBoundaries(t,"h"),a=this.isUseLeft?e-o:s+o,h=i,l=a,d=n,c=`M ${a},${h} Q ${a+(this.isUseLeft?-20:20)},${h+(d-h)/2} ${l},${d}`;t.generalizationLine.plot(c),t.generalizationNode.left=a+(this.isUseLeft?-r:r)-(this.isUseLeft?t.generalizationNode.width:0),t.generalizationNode.top=i+(n-i-t.generalizationNode.height)/2})}renderExpandBtnRect(t,e,i,n){this.isUseLeft?t.size(e,n).x(-e).y(0):t.size(e,n).x(i).y(0)}};const $n=class extends Un{constructor(t={}){super(t)}doLayout(t){Ri([()=>{this.computedBaseValue()},()=>{this.computedTopValue()},()=>{this.adjustTopValue()},()=>{t(this.root)}])}computedBaseValue(){qi(this.renderer.renderTree,null,(t,e,i,s,o,r)=>{let a=this.createNode(t,e,i,s,o,r);if(i?this.setNodeCenter(a):(e._node.dir?a.dir=e._node.dir:a.dir=a.getData("dir")||(o%2==0?n.LAYOUT_GROW_DIR.RIGHT:n.LAYOUT_GROW_DIR.LEFT),a.left=a.dir===n.LAYOUT_GROW_DIR.RIGHT?e._node.left+e._node.width+this.getMarginX(s):e._node.left-this.getMarginX(s)-a.width),!t.data.expand)return!0},(t,e,i,s)=>{if(!t.data.expand)return t._node.leftChildrenAreaHeight=0,void(t._node.rightChildrenAreaHeight=0);let o=0,r=0,a=0,h=0;t._node.children.forEach(t=>{t.dir===n.LAYOUT_GROW_DIR.LEFT?(o++,a+=t.height):(r++,h+=t.height)}),t._node.leftChildrenAreaHeight=a+(o+1)*this.getMarginY(s+1),t._node.rightChildrenAreaHeight=h+(r+1)*this.getMarginY(s+1);let l=t._node.checkHasGeneralization()?t._node._generalizationNodeHeight+this.getMarginY(s+1):0;t._node.leftChildrenAreaHeight2=Math.max(t._node.leftChildrenAreaHeight,l),t._node.rightChildrenAreaHeight2=Math.max(t._node.rightChildrenAreaHeight,l)},!0,0)}computedTopValue(){qi(this.root,null,(t,e,i,s)=>{if(t.getData("expand")&&t.children&&t.children.length){let e=this.getMarginY(s+1),i=t.top+t.height/2+e,o=i-t.leftChildrenAreaHeight/2,r=i-t.rightChildrenAreaHeight/2;t.children.forEach(t=>{t.dir===n.LAYOUT_GROW_DIR.LEFT?(t.top=o,o+=t.height+e):(t.top=r,r+=t.height+e)})}},null,!0)}adjustTopValue(){qi(this.root,null,(t,e,i,n)=>{if(!t.getData("expand"))return;let s=2*this.getMarginY(n+1)+t.height,o=t.leftChildrenAreaHeight2-s,r=t.rightChildrenAreaHeight2-s;(o>0||r>0)&&this.updateBrothers(t,o/2,r/2)},null,!0)}updateBrothers(t,e,i){if(t.parent){let s=t.parent.children.filter(e=>e.dir===t.dir),o=Qi(t,s);s.forEach((t,s)=>{if(t.hasCustomPosition())return;let r=0,a=t.dir===n.LAYOUT_GROW_DIR.LEFT?e:i;s<o?r=-a:s>o&&(r=a),t.top+=r,t.children&&t.children.length&&this.updateChildren(t.children,"top",r)}),this.updateBrothers(t.parent,e,i)}}renderLine(t,e,i,n){"curve"===n?this.renderLineCurve(t,e,i):"direct"===n?this.renderLineDirect(t,e,i):this.renderLineStraight(t,e,i)}renderLineStraight(t,e,i){if(t.children.length<=0)return[];let{left:s,top:o,width:r,height:a,expandBtnSize:h}=t;const{alwaysShowExpandBtn:l,notShowExpandBtn:d}=this.mindMap.opt;l&&!d||(h=0);let c=.6*(this.getMarginX(t.layerIndex+1)-h),u=this.mindMap.themeConfig.nodeUseLineStyle;t.children.forEach((l,d)=>{let p=0,m=0,f=u?l.width:0;l.dir===n.LAYOUT_GROW_DIR.LEFT?(m=-c,p=0===t.layerIndex?s:s-h,f=-f):(m=c,p=0===t.layerIndex?s+r:s+r+h);let g=o+a/2,x=l.dir===n.LAYOUT_GROW_DIR.LEFT?l.left+l.width:l.left,w=l.top+l.height/2;g=u&&!t.isRoot?g+a/2:g,w=u?w+l.height/2:w;let v=this.createFoldLine([[p,g],[p+m,g],[p+m,w],[x+f,w]]);this.setLineStyle(i,e[d],v,l)})}renderLineDirect(t,e,i){if(t.children.length<=0)return[];let{left:s,top:o,width:r,height:a,expandBtnSize:h}=t;const{alwaysShowExpandBtn:l,notShowExpandBtn:d}=this.mindMap.opt;l&&!d||(h=0);const{nodeUseLineStyle:c}=this.mindMap.themeConfig;t.children.forEach((l,d)=>{0===t.layerIndex&&(h=0);let u=l.dir===n.LAYOUT_GROW_DIR.LEFT?s-h:s+r+h,p=o+a/2,m=l.dir===n.LAYOUT_GROW_DIR.LEFT?l.left+l.width:l.left,f=l.top+l.height/2;p=c&&!t.isRoot?p+a/2:p,f=c?f+l.height/2:f;let g="";c&&(g=l.dir===n.LAYOUT_GROW_DIR.LEFT?` L ${l.left},${f}`:` L ${l.left+l.width},${f}`);let x=`M ${u},${p} L ${m},${f}`+g;this.setLineStyle(i,e[d],x,l)})}renderLineCurve(t,e,i){if(t.children.length<=0)return[];let{left:s,top:o,width:r,height:a,expandBtnSize:h}=t;const{alwaysShowExpandBtn:l,notShowExpandBtn:d}=this.mindMap.opt;l&&!d||(h=0);const{nodeUseLineStyle:c,rootLineKeepSameInCurve:u,rootLineStartPositionKeepSameInCurve:p}=this.mindMap.themeConfig;t.children.forEach((l,d)=>{0===t.layerIndex&&(h=0);let m=0!==t.layerIndex||p?l.dir===n.LAYOUT_GROW_DIR.LEFT?s-h:s+r+h:s+r/2,f=o+a/2,g=l.dir===n.LAYOUT_GROW_DIR.LEFT?l.left+l.width:l.left,x=l.top+l.height/2,w="";f=c&&!t.isRoot?f+a/2:f,x=c?x+l.height/2:x;let v="";c&&(v=l.dir===n.LAYOUT_GROW_DIR.LEFT?` L ${l.left},${x}`:` L ${l.left+l.width},${x}`),w=t.isRoot&&!u?this.quadraticCurvePath(m,f,g,x)+v:this.cubicBezierPath(m,f,g,x)+v,this.setLineStyle(i,e[d],w,l)})}renderExpandBtn(t,e){let{width:i,height:s,expandBtnSize:o}=t,{translateX:r,translateY:a}=e.transform(),h=this.mindMap.themeConfig.nodeUseLineStyle?s/2:0,l=t.dir===n.LAYOUT_GROW_DIR.LEFT?0-o:i,d=s/2+h;if(l===r&&d===a)return;let c=l-r,u=d-a;e.translate(c,u)}renderGeneralization(t){t.forEach(t=>{let e=t.node.dir===n.LAYOUT_GROW_DIR.LEFT,{top:i,bottom:s,left:o,right:r,generalizationLineMargin:a,generalizationNodeMargin:h}=this.getNodeGeneralizationRenderBoundaries(t,"h"),l=e?o-a:r+a,d=`M ${l},${i} Q ${l+(e?-20:20)},${i+(s-i)/2} ${l},${s}`;t.generalizationLine.plot(d),t.generalizationNode.left=l+(e?-h:h)-(e?t.generalizationNode.width:0),t.generalizationNode.top=i+(s-i-t.generalizationNode.height)/2})}renderExpandBtnRect(t,e,i,s,o){o.dir===n.LAYOUT_GROW_DIR.LEFT?t.size(e,s).x(-e).y(0):t.size(e,s).x(i).y(0)}};const Yn=class extends Un{constructor(t={}){super(t)}doLayout(t){Ri([()=>{this.computedBaseValue()},()=>{this.computedLeftTopValue()},()=>{this.adjustLeftTopValue()},()=>{t(this.root)}])}computedBaseValue(){qi(this.renderer.renderTree,null,(t,e,i,n,s,o)=>{let r=this.createNode(t,e,i,n,s,o);if(i?this.setNodeCenter(r):e._node.isRoot&&(r.top=e._node.top+e._node.height+this.getMarginX(n)),!t.data.expand)return!0},(t,e,i,n)=>{if(i){let e=!1===t.data.expand?0:t._node.children.length;t._node.childrenAreaWidth=e?t._node.children.reduce((t,e)=>t+e.width,0)+(e+1)*this.getMarginX(n+1):0}},!0,0)}computedLeftTopValue(){qi(this.root,null,(t,e,i,n)=>{if(t.getData("expand")&&t.children&&t.children.length){let e=this.getMarginX(n+1),s=this.getMarginY(n+1);if(i){let i=t.left+t.width/2-t.childrenAreaWidth/2+e;t.children.forEach(t=>{t.left=i,i+=t.width+e})}else{let e=t.top+this.getNodeHeightWithGeneralization(t)+s+(this.getNodeActChildrenLength(t)>0?t.expandBtnSize:0);t.children.forEach(i=>{i.left=t.left+.5*t.width,i.top=e,e+=this.getNodeHeightWithGeneralization(i)+s+(this.getNodeActChildrenLength(i)>0?i.expandBtnSize:0)})}}},null,!0)}adjustLeftTopValue(){qi(this.root,null,(t,e,i,n)=>{if(!t.getData("expand"))return;if(e&&e.isRoot){let e=this.getNodeAreaWidth(t,!0)-t.width;e>0&&this.updateBrothersLeft(t,e)}let s=t.children.length;if(e&&!e.isRoot&&s>0){let e=this.getMarginY(n+1),i=t.children.reduce((t,e)=>t+this.getNodeHeightWithGeneralization(e)+(this.getNodeActChildrenLength(e)>0?e.expandBtnSize:0),0)+s*e;this.updateBrothersTop(t,i)}},(t,e,i)=>{if(i){let{right:e,left:i}=this.getNodeBoundaries(t,"h"),n=e-i,s=t.left-i-(n-t.width)/2;this.updateChildren(t.children,"left",s)}},!0)}updateBrothersLeft(t,e){if(t.parent){let i=t.parent.children,n=Qi(t,i);i.forEach((t,i)=>{t.hasCustomPosition()||i<=n||(t.left+=e,t.children&&t.children.length&&this.updateChildren(t.children,"left",e))}),this.updateBrothersLeft(t.parent,e)}}updateBrothersTop(t,e){if(t.parent&&!t.parent.isRoot){let i=t.parent.children,n=Qi(t,i);i.forEach((t,i)=>{if(t.hasCustomPosition())return;let s=0;i>n&&(s=e),t.top+=s,t.children&&t.children.length&&this.updateChildren(t.children,"top",s)}),this.updateBrothersTop(t.parent,e)}}renderLine(t,e,i){if(t.children.length<=0)return[];let{left:n,top:s,width:o,height:r,expandBtnSize:a}=t;const{alwaysShowExpandBtn:h,notShowExpandBtn:l}=this.mindMap.opt;h&&!l||(a=0);let d=t.children.length,c=this.getMarginX(t.layerIndex+1);if(t.isRoot){let a=n+o/2,h=s+r,l=.7*c,u=1/0,p=-1/0;t.children.forEach((t,n)=>{let s=t.left+t.width/2,o=t.top;s<u&&(u=s),s>p&&(p=s);let r=this.mindMap.themeConfig.nodeUseLineStyle?` L ${t.left},${o} L ${t.left+t.width},${o}`:"",a=`M ${s},${h+l} L ${s},${h+l>o?o+t.height:o}`+r;this.setLineStyle(i,e[n],a,t)}),u=Math.min(u,a),p=Math.max(p,a);let m=this.lineDraw.path();if(t.style.line(m),m.plot(this.transformPath(`M ${a},${h} L ${a},${h+l}`)),t._lines.push(m),i&&i(m,t),d>0){let e=this.lineDraw.path();t.style.line(e),e.plot(this.transformPath(`M ${u},${h+l} L ${p},${h+l}`)),t._lines.push(e),i&&i(e,t)}}else{let n=s+r,o=-1/0,h=t.left+.3*t.width;if(t.children.forEach((r,a)=>{let l=r.top+r.height/2;l>o&&(o=l);let d="",c=r.left,u=r.left+r.width<h,p=!1;u?c=r.left+r.width:r.left<h&&r.left+r.width>h&&(p=!0,l=r.top,o=l),l>s&&l<n?d=`M ${u?t.left:t.left+t.width},${l} L ${c},${l}`:l<n?(p&&(l=r.top+r.height,c=h),d=`M ${h},${s} L ${h},${l} L ${c},${l}`):(p&&(c=h),d=`M ${h},${l} L ${c},${l}`),d+=this.mindMap.themeConfig.nodeUseLineStyle?` L ${c},${l-r.height/2} L ${c},${l+r.height/2}`:"",this.setLineStyle(i,e[a],d,r)}),d>0){let e=this.lineDraw.path();a=d>0?a:0,t.style.line(e),o<n+a?e.hide():(e.plot(this.transformPath(`M ${h},${n+a} L ${h},${o}`)),e.show()),t._lines.push(e),i&&i(e,t)}}}renderExpandBtn(t,e){let{width:i,height:n,expandBtnSize:s,isRoot:o}=t;if(!o){let{translateX:t,translateY:o}=e.transform();e.translate(.3*i-s/2-t,n+s/2-o)}}renderGeneralization(t){t.forEach(t=>{let{top:e,bottom:i,right:n,generalizationLineMargin:s,generalizationNodeMargin:o}=this.getNodeGeneralizationRenderBoundaries(t,"h"),r=n+s,a=`M ${r},${e} Q ${r+20},${e+(i-e)/2} ${n+s},${i}`;t.generalizationLine.plot(this.transformPath(a)),t.generalizationNode.left=n+o,t.generalizationNode.top=e+(i-e-t.generalizationNode.height)/2})}renderExpandBtnRect(t,e,i,n,s){t.size(i,e).x(0).y(n)}};const Wn=class extends Un{constructor(t={}){super(t)}doLayout(t){Ri([()=>{this.computedBaseValue()},()=>{this.computedLeftValue()},()=>{this.adjustLeftValue()},()=>{t(this.root)}])}computedBaseValue(){qi(this.renderer.renderTree,null,(t,e,i,n,s,o)=>{let r=this.createNode(t,e,i,n,s,o);if(i?this.setNodeCenter(r):r.top=e._node.top+e._node.height+this.getMarginX(n),!t.data.expand)return!0},(t,e,i,n)=>{let s=!1===t.data.expand?0:t._node.children.length;t._node.childrenAreaWidth=s?t._node.children.reduce((t,e)=>t+e.width,0)+(s+1)*this.getMarginY(n+1):0;let o=t._node.checkHasGeneralization()?t._node._generalizationNodeWidth+this.getMarginY(n+1):0;t._node.childrenAreaWidth2=Math.max(t._node.childrenAreaWidth,o)},!0,0)}computedLeftValue(){qi(this.root,null,(t,e,i,n)=>{if(t.getData("expand")&&t.children&&t.children.length){let e=this.getMarginY(n+1),i=t.left+t.width/2-t.childrenAreaWidth/2+e;t.children.forEach(t=>{t.left=i,i+=t.width+e})}},null,!0)}adjustLeftValue(){qi(this.root,null,(t,e,i,n)=>{if(!t.getData("expand"))return;let s=t.childrenAreaWidth2-2*this.getMarginY(n+1)-t.width;s>0&&this.updateBrothers(t,s/2)},null,!0)}updateBrothers(t,e){if(t.parent){let i=t.parent.children,n=Qi(t,i);i.forEach((t,i)=>{if(t.hasCustomPosition())return;let s=0;i<n?s=-e:i>n&&(s=e),t.left+=s,t.children&&t.children.length&&this.updateChildren(t.children,"left",s)}),this.updateBrothers(t.parent,e)}}renderLine(t,e,i,n){"curve"===n?this.renderLineCurve(t,e,i):"direct"===n?this.renderLineDirect(t,e,i):this.renderLineStraight(t,e,i)}renderLineCurve(t,e,i){if(t.children.length<=0)return[];let{left:n,top:s,width:o,height:r,expandBtnSize:a}=t;const{alwaysShowExpandBtn:h,notShowExpandBtn:l}=this.mindMap.opt;h&&!l||(a=0);const{nodeUseLineStyle:d,rootLineStartPositionKeepSameInCurve:c,rootLineKeepSameInCurve:u}=this.mindMap.themeConfig;t.children.forEach((h,l)=>{0===t.layerIndex&&(a=0);let p=n+o/2,m=0!==t.layerIndex||c?s+r+a:s+r/2,f=h.left+h.width/2,g=h.top,x="",w=d?` L ${h.left},${g} L ${h.left+h.width},${g}`:"";x=t.isRoot&&!u?this.quadraticCurvePath(p,m,f,g,!0)+w:this.cubicBezierPath(p,m,f,g,!0)+w,this.setLineStyle(i,e[l],x,h)})}renderLineDirect(t,e,i){if(t.children.length<=0)return[];let{left:n,top:s,width:o,height:r}=t;const{nodeUseLineStyle:a}=this.mindMap.themeConfig;let h=n+o/2,l=s+r;t.children.forEach((t,n)=>{let s=t.left+t.width/2,o=t.top,r=a?` L ${t.left},${o} L ${t.left+t.width},${o}`:"",d=`M ${h},${l} L ${s},${o}`+r;this.setLineStyle(i,e[n],d,t)})}renderLineStraight(t,e,i){if(t.children.length<=0)return[];let{left:n,top:s,width:o,height:r,expandBtnSize:a,isRoot:h}=t;const{alwaysShowExpandBtn:l,notShowExpandBtn:d}=this.mindMap.opt;l&&!d||(a=0);let c=n+o/2,u=s+r,p=.7*this.getMarginX(t.layerIndex+1),m=1/0,f=-1/0,g=t.children.length;t.children.forEach((t,n)=>{let s=t.left+t.width/2,o=u+p>t.top?t.top+t.height:t.top;s<m&&(m=s),s>f&&(f=s);let r=this.mindMap.themeConfig.nodeUseLineStyle?` L ${t.left},${o} L ${t.left+t.width},${o}`:"",a=`M ${s},${u+p} L ${s},${o}`+r;this.setLineStyle(i,e[n],a,t)}),m=Math.min(c,m),f=Math.max(c,f);let x=this.lineDraw.path();if(t.style.line(x),a=g>0&&!h?a:0,x.plot(this.transformPath(`M ${c},${u+a} L ${c},${u+p}`)),t._lines.push(x),i&&i(x,t),g>0){let e=this.lineDraw.path();t.style.line(e),e.plot(this.transformPath(`M ${m},${u+p} L ${f},${u+p}`)),t._lines.push(e),i&&i(e,t)}}renderExpandBtn(t,e){let{width:i,height:n,expandBtnSize:s}=t,{translateX:o,translateY:r}=e.transform();e.translate(i/2-s/2-o,n+s/2-r)}renderGeneralization(t){t.forEach(t=>{let{bottom:e,left:i,right:n,generalizationLineMargin:s,generalizationNodeMargin:o}=this.getNodeGeneralizationRenderBoundaries(t,"v"),r=e+s,a=`M ${i},${r} Q ${i+(n-i)/2},${r+20} ${n},${e+s}`;t.generalizationLine.plot(this.transformPath(a)),t.generalizationNode.top=e+o,t.generalizationNode.left=i+(n-i-t.generalizationNode.width)/2})}renderExpandBtnRect(t,e,i,n,s){t.size(i,e).x(0).y(n)}};const Vn=class extends Un{constructor(t={},e){super(t),this.layout=e}doLayout(t){Ri([()=>{this.computedBaseValue()},()=>{this.computedLeftTopValue()},()=>{this.adjustLeftTopValue()},()=>{t(this.root)}])}computedBaseValue(){qi(this.renderer.renderTree,null,(t,e,i,s,o,r)=>{let a=this.createNode(t,e,i,s,o,r);if(i?this.setNodeCenter(a):(this.layout===n.LAYOUT.TIMELINE2?e._node.dir?a.dir=e._node.dir:a.dir=o%2==0?n.LAYOUT_GROW_DIR.BOTTOM:n.LAYOUT_GROW_DIR.TOP:a.dir="",e._node.isRoot&&(a.top=e._node.top+(t._node.height>e._node.height?-(t._node.height-e._node.height)/2:(e._node.height-t._node.height)/2))),!t.data.expand)return!0},null,!0,0)}computedLeftTopValue(){qi(this.root,null,(t,e,i,n,s)=>{if(t.getData("expand")&&t.children&&t.children.length){let e=this.getMarginX(n+1),s=this.getMarginY(n+1);if(i){let i=t.left+t.width+e;t.children.forEach(t=>{t.left=i,i+=t.width+e})}else{let e=t.top+t.height+s+(this.getNodeActChildrenLength(t)>0?t.expandBtnSize:0);t.children.forEach(i=>{i.left=t.left+.5*t.width,i.top=e,e+=i.height+s+(this.getNodeActChildrenLength(i)>0?i.expandBtnSize:0)})}}},null,!0)}adjustLeftTopValue(){qi(this.root,null,(t,e,i,n)=>{if(!t.getData("expand"))return;t.isRoot&&this.updateBrothersLeft(t);let s=t.children.length;if(e&&!e.isRoot&&s>0){let e=this.getMarginY(n+1),i=t.children.reduce((t,e)=>t+e.height+(this.getNodeActChildrenLength(e)>0?e.expandBtnSize:0),0)+s*e;this.updateBrothersTop(t,i)}},(t,e,i,s)=>{e&&e.isRoot&&t.dir===n.LAYOUT_GROW_DIR.TOP&&t.children.forEach(e=>{let i=this.getNodeAreaHeight(e),n=e.top;e.top=t.top-(e.top-t.top)-i+t.height,this.updateChildren(e.children,"top",e.top-n)})},!0)}getNodeAreaHeight(t){let e=0,i=t=>{e+=t.height+(this.getNodeActChildrenLength(t)>0?t.expandBtnSize:0)+this.getMarginY(t.layerIndex),t.children.length&&t.children.forEach(t=>{i(t)})};return i(t),e}updateBrothersLeft(t){let e=t.children,i=0;e.forEach(t=>{t.left+=i,t.children&&t.children.length&&this.updateChildren(t.children,"left",i);let{left:e,right:n}=this.getNodeBoundaries(t,"h"),s=n-e-t.width;s>0&&(i+=s)})}updateBrothersTop(t,e){if(t.parent&&!t.parent.isRoot){let i=t.parent.children,n=Qi(t,i);i.forEach((t,i)=>{if(t.hasCustomPosition())return;let s=0;i>n&&(s=e),t.top+=s,t.children&&t.children.length&&this.updateChildren(t.children,"top",s)}),this.updateBrothersTop(t.parent,e)}}renderLine(t,e,i){if(t.children.length<=0)return[];let{left:s,top:o,width:r,height:a,expandBtnSize:h}=t;const{alwaysShowExpandBtn:l,notShowExpandBtn:d}=this.mindMap.opt;l&&!d||(h=0);let c=t.children.length;if(t.isRoot){let n=t;t.children.forEach((s,o)=>{let r=n.left+n.width,a=s.left,h=t.top+t.height/2,l=`M ${r},${h} L ${a},${h}`;this.setLineStyle(i,e[o],l,s),n=s})}else{let s=-1/0,r=1/0,l=t.left+.3*t.width;if(t.children.forEach((t,n)=>{let o=t.top+t.height/2;o>s&&(s=o),o<r&&(r=o);let a=`M ${l},${o} L ${t.left},${o}`;this.setLineStyle(i,e[n],a,t)}),c>0){let e=this.lineDraw.path();h=c>0?h:0,t.parent&&t.parent.isRoot&&t.dir===n.LAYOUT_GROW_DIR.TOP?e.plot(this.transformPath(`M ${l},${o} L ${l},${r}`)):e.plot(this.transformPath(`M ${l},${o+a+h} L ${l},${s}`)),t.style.line(e),t._lines.push(e),i&&i(e,t)}}}renderExpandBtn(t,e){let{width:i,height:s,expandBtnSize:o,isRoot:r}=t;if(!r){let{translateX:r,translateY:a}=e.transform();t.parent&&t.parent.isRoot&&t.dir===n.LAYOUT_GROW_DIR.TOP?e.translate(.3*i-o/2-r,-o/2-a):e.translate(.3*i-o/2-r,s+o/2-a)}}renderGeneralization(t){t.forEach(t=>{let{top:e,bottom:i,right:n,generalizationLineMargin:s,generalizationNodeMargin:o}=this.getNodeGeneralizationRenderBoundaries(t,"h"),r=n+s,a=`M ${r},${e} Q ${r+20},${e+(i-e)/2} ${n+s},${i}`;t.generalizationLine.plot(this.transformPath(a)),t.generalizationNode.left=n+o,t.generalizationNode.top=e+(i-e-t.generalizationNode.height)/2})}renderExpandBtnRect(t,e,i,s,o){if(this.layout===n.LAYOUT.TIMELINE)t.size(i,e).x(0).y(s);else{let r="";r=o.dir===n.LAYOUT_GROW_DIR.TOP&&1===o.layerIndex?n.LAYOUT_GROW_DIR.TOP:n.LAYOUT_GROW_DIR.BOTTOM,r===n.LAYOUT_GROW_DIR.TOP?t.size(i,e).x(0).y(-e):t.size(i,e).x(0).y(s)}}};const jn=class extends Un{constructor(t={},e){super(t),this.layout=e}doLayout(t){Ri([()=>{this.computedBaseValue()},()=>{this.computedTopValue()},()=>{this.adjustLeftTopValue()},()=>{t(this.root)}])}computedBaseValue(){qi(this.renderer.renderTree,null,(t,e,i,s,o,r)=>{let a=this.createNode(t,e,i,s,o,r);if(i?this.setNodeCenter(a):(e._node.dir?a.dir=e._node.dir:this.layout===n.LAYOUT.VERTICAL_TIMELINE2?a.dir=n.LAYOUT_GROW_DIR.LEFT:this.layout===n.LAYOUT.VERTICAL_TIMELINE3?a.dir=n.LAYOUT_GROW_DIR.RIGHT:a.dir=o%2==0?n.LAYOUT_GROW_DIR.RIGHT:n.LAYOUT_GROW_DIR.LEFT,e._node.isRoot?a.left=e._node.left+(t._node.width>e._node.width?-(t._node.width-e._node.width)/2:(e._node.width-t._node.width)/2):a.left=a.dir===n.LAYOUT_GROW_DIR.RIGHT?e._node.left+e._node.width+this.getMarginX(s):e._node.left-this.getMarginX(s)-a.width),!t.data.expand)return!0},(t,e,i,n)=>{if(i)return;let s=!1===t.data.expand?0:t._node.children.length;t._node.childrenAreaHeight=s?t._node.children.reduce((t,e)=>t+e.height,0)+(s+1)*this.getMarginY(n+1):0},!0,0)}computedTopValue(){qi(this.root,null,(t,e,i,n,s)=>{if(t.getData("expand")&&t.children&&t.children.length){let e=this.getMarginY(n+1);if(i){let i=t.top+t.height+e;t.children.forEach(t=>{t.top=i,i+=t.height+e})}else{let e=this.getMarginY(n+1),i=t.top+t.height/2+e-t.childrenAreaHeight/2;t.children.forEach(t=>{t.top=i,i+=t.height+e})}}},null,!0)}adjustLeftTopValue(){qi(this.root,null,(t,e,i,n)=>{if(!t.getData("expand"))return;if(i)return;let s=2*this.getMarginY(n+1)+t.height,o=t.childrenAreaHeight-s;o>0&&this.updateBrothers(t,o/2)},null,!0)}updateBrothers(t,e){if(t.parent){let i=t.parent.children,n=Qi(t,i);i.forEach((i,s)=>{if(i.hasCustomPosition())return;if(!t.parent.isRoot&&i.uid===t.uid)return;let o=0;t.parent.isRoot?o=s<n?0:s>n?2*e:e:s<n?o=-e:s>n&&(o=e),i.top+=o,i.children&&i.children.length&&this.updateChildren(i.children,"top",o)}),this.updateBrothers(t.parent,e)}}updateBrothersTop(t,e){if(t.parent&&!t.parent.isRoot){let i=t.parent.children,n=Qi(t,i);i.forEach((t,i)=>{if(t.hasCustomPosition())return;let s=0;i>n&&(s=e),t.top+=s,t.children&&t.children.length&&this.updateChildren(t.children,"top",s)}),this.updateBrothersTop(t.parent,e)}}renderLine(t,e,i,n){"curve"===n?this.renderLineCurve(t,e,i):"direct"===n?this.renderLineDirect(t,e,i):this.renderLineStraight(t,e,i)}renderLineStraight(t,e,i){if(t.children.length<=0)return[];let{expandBtnSize:s}=t;const{alwaysShowExpandBtn:o,notShowExpandBtn:r}=this.mindMap.opt;if(o&&!r||(s=0),t.isRoot){let n=t;t.children.forEach((s,o)=>{let r=n.top+n.height,a=s.top,h=t.left+t.width/2,l=`M ${h},${r} L ${h},${a}`;this.setLineStyle(i,e[o],l,s),n=s})}else if(t.dir===n.LAYOUT_GROW_DIR.RIGHT){let n=t.left+t.width,o=t.top+t.height/2,r=.6*(this.getMarginX(t.layerIndex+1)-s);t.children.forEach((t,s)=>{let a=t.left,h=t.top+t.height/2,l=this.createFoldLine([[n,o],[n+r,o],[n+r,h],[a,h]]);this.setLineStyle(i,e[s],l,t)})}else{let n=t.left,o=t.top+t.height/2,r=.6*(this.getMarginX(t.layerIndex+1)-s);t.children.forEach((t,s)=>{let a=t.left+t.width,h=t.top+t.height/2,l=this.createFoldLine([[n,o],[n-r,o],[n-r,h],[a,h]]);this.setLineStyle(i,e[s],l,t)})}}renderLineDirect(t,e,i){if(t.children.length<=0)return[];let{left:s,top:o,width:r,height:a,expandBtnSize:h}=t;const{alwaysShowExpandBtn:l,notShowExpandBtn:d}=this.mindMap.opt;l&&!d||(h=0),t.children.forEach((l,d)=>{if(t.isRoot){let n=t;t.children.forEach((s,o)=>{let r=n.top+n.height,a=s.top,h=t.left+t.width/2,l=`M ${h},${r} L ${h},${a}`;this.setLineStyle(i,e[o],l,s),n=s})}else{let t=`M ${l.dir===n.LAYOUT_GROW_DIR.LEFT?s-h:s+r+h},${o+a/2} L ${l.dir===n.LAYOUT_GROW_DIR.LEFT?l.left+l.width:l.left},${l.top+l.height/2}`;this.setLineStyle(i,e[d],t,l)}})}renderLineCurve(t,e,i){if(t.children.length<=0)return[];let{left:s,top:o,width:r,height:a,expandBtnSize:h}=t;const{alwaysShowExpandBtn:l,notShowExpandBtn:d}=this.mindMap.opt;l&&!d||(h=0),t.children.forEach((l,d)=>{if(t.isRoot){let n=t;t.children.forEach((s,o)=>{let r=n.top+n.height,a=s.top,h=t.left+t.width/2,l=`M ${h},${r} L ${h},${a}`;this.setLineStyle(i,e[o],l,s),n=s})}else{let t=l.dir===n.LAYOUT_GROW_DIR.LEFT?s-h:s+r+h,c=o+a/2,u=l.dir===n.LAYOUT_GROW_DIR.LEFT?l.left+l.width:l.left,p=l.top+l.height/2,m=this.cubicBezierPath(t,c,u,p);this.setLineStyle(i,e[d],m,l)}})}renderExpandBtn(t,e){let{width:i,height:s,expandBtnSize:o,isRoot:r}=t;if(!r){let{translateX:r,translateY:a}=e.transform();t.dir===n.LAYOUT_GROW_DIR.RIGHT?e.translate(i-r,s/2-a):e.translate(-o-r,s/2-a)}}renderGeneralization(t){t.forEach(t=>{let e=t.node.dir===n.LAYOUT_GROW_DIR.LEFT,{top:i,bottom:s,left:o,right:r,generalizationLineMargin:a,generalizationNodeMargin:h}=this.getNodeGeneralizationRenderBoundaries(t,"h"),l=e?o-a:r+a,d=`M ${l},${i} Q ${l+(e?-20:20)},${i+(s-i)/2} ${l},${s}`;t.generalizationLine.plot(this.transformPath(d)),t.generalizationNode.left=l+(e?-h:h)-(e?t.generalizationNode.width:0),t.generalizationNode.top=i+(s-i-t.generalizationNode.height)/2})}renderExpandBtnRect(t,e,i,s,o){o.dir===n.LAYOUT_GROW_DIR.LEFT?t.size(e,s).x(-e).y(0):t.size(e,s).x(i).y(0)}},Xn={top:{renderExpandBtn({node:t,btn:e,expandBtnSize:i,translateX:n,translateY:s,width:o,height:r}){t.parent&&t.parent.isRoot?e.translate(.3*o-i/2-n,-i/2-s):e.translate(.3*o-i/2-n,r+i/2-s)},renderLine({node:t,line:e,top:i,x:n,lineLength:s,height:o,expandBtnSize:r,maxy:a,ctx:h}){t.parent&&t.parent.isRoot?e.plot(h.transformPath(`M ${n},${i} L ${n+s},${i-Math.tan(zi(h.mindMap.opt.fishboneDeg))*s}`)):e.plot(h.transformPath(`M ${n},${i+o+r} L ${n},${a}`))},computedLeftTopValue({layerIndex:t,node:e,ctx:i}){if(t>=1&&e.children){let n=i.getMarginY(t+1),s=e.left+e.width*i.childIndent,o=e.top+e.height+(i.getNodeActChildrenLength(e)>0?e.expandBtnSize:0)+n;e.children.forEach(t=>{t.left=s,t.top+=o,o+=t.height+(i.getNodeActChildrenLength(t)>0?t.expandBtnSize:0)+n})}},adjustLeftTopValueBefore({node:t,parent:e,ctx:i,layerIndex:n}){let s=t.children.length,o=i.getMarginY(n+1);if(e&&!e.isRoot&&s>0){let e=t.children.reduce((t,e)=>t+e.height+(i.getNodeActChildrenLength(e)>0?e.expandBtnSize:0)+o,0);i.updateBrothersTop(t,e)}},adjustLeftTopValueAfter({parent:t,node:e,ctx:i}){if(t&&t.isRoot){let t=i.getMarginY(e.layerIndex+1),n=e.expandBtnSize+t;e.children.forEach(t=>{let s=i.getNodeAreaHeight(t),o=t.top,r=t.left;t.top=e.top-(t.top-e.top)-s+e.height,t.left=e.left+e.width*i.indent+(s+n)/Math.tan(zi(i.mindMap.opt.fishboneDeg)),n+=s,i.updateChildrenPro(t.children,{top:t.top-o,left:t.left-r})})}}},bottom:{renderExpandBtn({node:t,btn:e,expandBtnSize:i,translateX:n,translateY:s,width:o,height:r}){t.parent&&t.parent.isRoot?e.translate(.3*o-i/2-n,r+i/2-s):e.translate(.3*o-i/2-n,-i/2-s)},renderLine({node:t,line:e,top:i,x:n,lineLength:s,height:o,miny:r,ctx:a}){t.parent&&t.parent.isRoot?e.plot(a.transformPath(`M ${n},${i+o} L ${n+s},${i+o+Math.tan(zi(a.mindMap.opt.fishboneDeg))*s}`)):e.plot(a.transformPath(`M ${n},${i} L ${n},${r}`))},computedLeftTopValue({layerIndex:t,node:e,ctx:i}){let n=i.getMarginY(t+1);if(1===t&&e.children){let t=e.left+e.width*i.childIndent,s=e.top+e.height+(i.getNodeActChildrenLength(e)>0?e.expandBtnSize:0)+n;e.children.forEach(e=>{e.left=t,e.top=s+(i.getNodeActChildrenLength(e)>0?e.expandBtnSize:0),s+=e.height+(i.getNodeActChildrenLength(e)>0?e.expandBtnSize:0)+n})}if(t>1&&e.children){let t=e.left+e.width*i.childIndent,s=e.top-(i.getNodeActChildrenLength(e)>0?e.expandBtnSize:0)-n;e.children.forEach(e=>{e.left=t,e.top=s-e.height,s-=e.height+(i.getNodeActChildrenLength(e)>0?e.expandBtnSize:0)+n})}},adjustLeftTopValueBefore({node:t,ctx:e,layerIndex:i}){let n=e.getMarginY(i+1),s=t.children.length;if(i>2&&s>0){let i=t.children.reduce((t,i)=>t+i.height+(e.getNodeActChildrenLength(i)>0?i.expandBtnSize:0)+n,0);e.updateBrothersTop(t,-i)}},adjustLeftTopValueAfter({parent:t,node:e,ctx:i}){if(t&&t.isRoot){let t=i.getMarginY(e.layerIndex+1),n=0,s=e.expandBtnSize;e.children.forEach(o=>{let r=i.getNodeActChildrenLength(o)>0,a=i.getNodeAreaHeight(o),h=r?a-o.height-(r?o.expandBtnSize:0):0;h-=r?t:0;let l=n+h,d=o.left;o.top+=l,o.left=e.left+e.width*i.indent+(a+s)/Math.tan(zi(i.mindMap.opt.fishboneDeg)),n+=h,s+=a,i.updateChildrenPro(o.children,{top:l,left:o.left-d})})}}}};const Kn=class extends Un{constructor(t={},e){super(t),this.layout=e,this.indent=.3,this.childIndent=.5,this.fishTail=null,this.maxx=0,this.headRatio=1,this.tailRatio=.6,this.paddingXRatio=.3,this.fishHeadPathStr="M4,181 C4,181, 0,177, 4,173 Q 96.09523809523809,0, 288.2857142857143,0 L 288.2857142857143,354 Q 48.047619047619044,354, 8,218.18367346938777 C8,218.18367346938777, 6,214.18367346938777, 8,214.18367346938777 L 41.183673469387756,214.18367346938777 Z",this.fishTailPathStr="M 606.9342905223708 0 Q 713.1342905223709 -177 819.3342905223708 -177 L 766.2342905223709 0 L 819.3342905223708 177 Q 713.1342905223709 177 606.9342905223708 0 z",this.bindEvent(),this.extendShape(),this.beforeChange=this.beforeChange.bind(this)}nodeIsRemoveAllLines(t){return t.isRoot||1===t.layerIndex}isFishbone2(){return this.layout===n.LAYOUT.FISHBONE2}bindEvent(){this.isFishbone2()&&(this.onCheckUpdateFishTail=this.onCheckUpdateFishTail.bind(this),this.mindMap.on("afterExecCommand",this.onCheckUpdateFishTail))}unBindEvent(){this.mindMap.off("afterExecCommand",this.onCheckUpdateFishTail)}extendShape(){this.isFishbone2()&&this.mindMap.addShape({name:"fishHead",createShape:t=>{const e=Ni(`<path d="${this.fishHeadPathStr}"></path>`),{width:i,height:n}=t.shapeInstance.getNodeSize();return e.size(i,n),e},getPadding:({width:t,height:e,paddingX:i,paddingY:n})=>{t+=2*i,e+=2*n;let s=this.paddingXRatio*t,o=0;return o=((t+=2*s)/this.headRatio-e)/2,{paddingX:s,paddingY:o}}})}doLayout(t){Ri([()=>{this.computedBaseValue(),this.addFishTail()},()=>{this.computedLeftTopValue()},()=>{this.adjustLeftTopValue(),this.updateFishTailPosition()},()=>{t(this.root)}])}addFishTail(){if(!this.isFishbone2())return;const t=this.mindMap.lineDraw.findOne(".smm-layout-fishbone-tail");t?this.fishTail=t:(this.fishTail=Ni(`<path d="${this.fishTailPathStr}"></path>`),this.fishTail.addClass("smm-layout-fishbone-tail"));const e=this.root.height,i=e*this.tailRatio;this.fishTail.size(i,e),this.styleFishTail(),this.mindMap.lineDraw.add(this.fishTail)}onCheckUpdateFishTail(t,e,i){if("SET_NODE_DATA"===t){let t=!1;Object.keys(i).forEach(e=>{xn.includes(e)&&(t=!0)}),t&&this.styleFishTail()}}styleFishTail(){this.root.style.shape(this.fishTail)}removeFishTail(){const t=this.mindMap.lineDraw.findOne(".smm-layout-fishbone-tail");t&&t.remove()}updateFishTailPosition(){this.isFishbone2()&&this.fishTail.x(this.maxx).cy(this.root.top+this.root.height/2)}computedBaseValue(){qi(this.renderer.renderTree,null,(t,e,i,s,o,r)=>{i&&this.isFishbone2()&&(t.data.shape="fishHead");let a=this.createNode(t,e,i,s,o,r);if(i)this.setNodeCenter(a);else if(e._node.dir?a.dir=e._node.dir:a.dir=o%2==0?n.LAYOUT_GROW_DIR.TOP:n.LAYOUT_GROW_DIR.BOTTOM,e._node.isRoot){let t=this.getMarginY(s);const i=this.isFishbone2()?e._node.height/4:0;this.checkIsTop(a)?a.top=e._node.top-a.height-t+i:a.top=e._node.top+e._node.height+t-i}if(!t.data.expand)return!0},null,!0,0)}computedLeftTopValue(){qi(this.root,null,(t,e,i,n)=>{if(t.isRoot){let e=this.getMarginX(n+1);const i=this.isFishbone2()?2:1;let s=t.left+t.width+t.height/i+e,o=t.left+t.width+t.height/i+e;t.children.forEach(t=>{this.checkIsTop(t)?(t.left=s,s+=t.width+e):(t.left=o+20,o+=t.width+e)})}let s={layerIndex:n,node:t,ctx:this};this.checkIsTop(t)?Xn.top.computedLeftTopValue(s):Xn.bottom.computedLeftTopValue(s)},null,!0)}adjustLeftTopValue(){qi(this.root,null,(t,e,i,n)=>{if(!t.getData("expand"))return;let s={node:t,parent:e,layerIndex:n,ctx:this};this.checkIsTop(t)?Xn.top.adjustLeftTopValueBefore(s):Xn.bottom.adjustLeftTopValueBefore(s)},(t,e)=>{let i={parent:e,node:t,ctx:this};if(this.checkIsTop(t)?Xn.top.adjustLeftTopValueAfter(i):Xn.bottom.adjustLeftTopValueAfter(i),t.isRoot){let e=0,i=0,n=-1/0;t.children.forEach(t=>{if(this.checkIsTop(t)){t.left+=e,this.updateChildren(t.children,"left",e);let{left:i,right:s}=this.getNodeBoundaries(t,"h");s>n&&(n=s),e+=s-i}else{t.left+=i,this.updateChildren(t.children,"left",i);let{left:e,right:s}=this.getNodeBoundaries(t,"h");s>n&&(n=s),i+=s-e}}),this.maxx=n}},!0)}getNodeAreaHeight(t){let e=0,i=t=>{let n=this.getMarginY(t.layerIndex);e+=t.height+(this.getNodeActChildrenLength(t)>0?t.expandBtnSize:0)+n,t.children.length&&t.children.forEach(t=>{i(t)})};return i(t),e}updateBrothersLeft(t){let e=t.children,i=0;e.forEach(t=>{t.left+=i,t.children&&t.children.length&&this.updateChildren(t.children,"left",i);let{left:e,right:n}=this.getNodeBoundaries(t,"h"),s=n-e-t.width;s>0&&(i+=s)})}updateBrothersTop(t,e){if(t.parent&&!t.parent.isRoot){let i=t.parent.children,n=Qi(t,i);i.forEach((t,i)=>{if(t.hasCustomPosition())return;let s=0;i>n&&(s=e),t.top+=s,t.children&&t.children.length&&this.updateChildren(t.children,"top",s)}),this.checkIsTop(t)?this.updateBrothersTop(t.parent,e):this.updateBrothersTop(t.parent,3===t.layerIndex?0:e)}}checkIsTop(t){return t.dir===n.LAYOUT_GROW_DIR.TOP}renderLine(t,e,i){if(1!==t.layerIndex&&t.children.length<=0)return[];let{top:n,height:s,expandBtnSize:o}=t;const{alwaysShowExpandBtn:r,notShowExpandBtn:a}=this.mindMap.opt;r&&!a||(o=0);let h=t.children.length;if(t.isRoot){let e=-1/0;t.children.forEach(n=>{n.left>e&&(e=n.left);let s=this.getMarginY(n.layerIndex),o=n.left,r=t.height/2+s-(this.isFishbone2()?t.height/4:0),a=r/Math.tan(zi(this.mindMap.opt.fishboneDeg)),h=this.lineDraw.path();this.checkIsTop(n)?h.plot(this.transformPath(`M ${o-a},${n.top+n.height+r} L ${n.left},${n.top+n.height}`)):h.plot(this.transformPath(`M ${o-a},${n.top-r} L ${o},${n.top}`)),t.style.line(h),t._lines.push(h),i&&i(h,t)});let n=t.top+t.height/2,s=t.height/2+this.getMarginY(t.layerIndex+1),o=this.lineDraw.path();const r=this.isFishbone2()?this.maxx:e-s/Math.tan(zi(this.mindMap.opt.fishboneDeg));o.plot(this.transformPath(`M ${t.left+t.width},${n} L ${r},${n}`)),t.style.line(o),t._lines.push(o),i&&i(o,t)}else{let r=-1/0,a=1/0,l=-1/0,d=t.left+t.width*this.indent;if(t.children.forEach((n,s)=>{n.left>l&&(l=n.left);let o=n.top+n.height/2;if(o>r&&(r=o),o<a&&(a=o),t.layerIndex>1){let t=`M ${d},${o} L ${n.left},${o}`;this.setLineStyle(i,e[s],t,n)}}),h>=0){let e=this.lineDraw.path();o=h>0?o:0;let c=l-t.left-t.width*this.indent;c=Math.max(c,0);let u={node:t,line:e,top:n,x:d,lineLength:c,height:s,expandBtnSize:o,maxy:r,miny:a,ctx:this};this.checkIsTop(t)?Xn.top.renderLine(u):Xn.bottom.renderLine(u),t.style.line(e),t._lines.push(e),i&&i(e,t)}}}renderExpandBtn(t,e){let{width:i,height:n,expandBtnSize:s,isRoot:o}=t;if(!o){let{translateX:o,translateY:r}=e.transform(),a={node:t,btn:e,expandBtnSize:s,translateX:o,translateY:r,width:i,height:n};this.checkIsTop(t)?Xn.top.renderExpandBtn(a):Xn.bottom.renderExpandBtn(a)}}renderGeneralization(t){t.forEach(t=>{let{top:e,bottom:i,right:n,generalizationLineMargin:s,generalizationNodeMargin:o}=this.getNodeGeneralizationRenderBoundaries(t,"h"),r=n+s,a=`M ${r},${e} Q ${r+20},${e+(i-e)/2} ${n+s},${i}`;t.generalizationLine.plot(this.transformPath(a)),t.generalizationNode.left=n+o,t.generalizationNode.top=e+(i-e-t.generalizationNode.height)/2})}renderExpandBtnRect(t,e,i,s,o){let r="";r=o.dir===n.LAYOUT_GROW_DIR.TOP?1===o.layerIndex?n.LAYOUT_GROW_DIR.TOP:n.LAYOUT_GROW_DIR.BOTTOM:1===o.layerIndex?n.LAYOUT_GROW_DIR.BOTTOM:n.LAYOUT_GROW_DIR.TOP,r===n.LAYOUT_GROW_DIR.TOP?t.size(i,e).x(0).y(-e):t.size(i,e).x(0).y(s)}beforeChange(){this.isFishbone2()&&(this.root.nodeData.data.shape=n.SHAPE.RECTANGLE,this.removeFishTail(),this.unBindEvent(),this.mindMap.removeShape("fishHead"))}},Zn="smm-node-edit-wrap";class Qn{constructor(t){this.renderer=t,this.mindMap=t.mindMap,this.currentNode=null,this.textEditNode=null,this.showTextEdit=!1,this.cacheEditingText="",this.hasBodyMousedown=!1,this.textNodePaddingX=5,this.textNodePaddingY=3,this.isNeedUpdateTextEditNode=!1,this.mindMap.addEditNodeClass(Zn),this.bindEvent()}bindEvent(){this.show=this.show.bind(this),this.onScale=this.onScale.bind(this),this.onKeydown=this.onKeydown.bind(this),this.mindMap.on("node_dblclick",(t,e,i)=>{this.show({node:t,e,isInserting:i})}),this.mindMap.on("draw_click",()=>{this.hideEditTextBox()}),this.mindMap.on("body_mousedown",()=>{this.hasBodyMousedown=!0}),this.mindMap.on("body_click",()=>{this.hasBodyMousedown&&(this.hasBodyMousedown=!1,this.mindMap.opt.isEndNodeTextEditOnClickOuter&&this.hideEditTextBox())}),this.mindMap.on("svg_mousedown",()=>{this.hideEditTextBox()}),this.mindMap.on("expand_btn_click",()=>{this.hideEditTextBox()}),this.mindMap.on("before_node_active",()=>{this.hideEditTextBox()}),this.mindMap.on("mousewheel",()=>{this.mindMap.opt.mousewheelAction===n.MOUSE_WHEEL_ACTION.MOVE&&this.hideEditTextBox()}),this.mindMap.keyCommand.addShortcut("F2",()=>{this.renderer.activeNodeList.length<=0||this.show({node:this.renderer.activeNodeList[0]})}),this.mindMap.on("scale",this.onScale),this.mindMap.opt.enableAutoEnterTextEditWhenKeydown&&window.addEventListener("keydown",this.onKeydown),this.mindMap.on("beforeDestroy",()=>{this.unBindEvent()}),this.mindMap.on("after_update_config",(t,e)=>{t.openRealtimeRenderOnNodeTextEdit!==e.openRealtimeRenderOnNodeTextEdit&&(this.mindMap.richText?this.mindMap.richText.onOpenRealtimeRenderOnNodeTextEditConfigUpdate(t.openRealtimeRenderOnNodeTextEdit):this.onOpenRealtimeRenderOnNodeTextEditConfigUpdate(t.openRealtimeRenderOnNodeTextEdit)),t.enableAutoEnterTextEditWhenKeydown!==e.enableAutoEnterTextEditWhenKeydown&&window[t.enableAutoEnterTextEditWhenKeydown?"addEventListener":"removeEventListener"]("keydown",this.onKeydown)}),this.mindMap.on("afterExecCommand",()=>{this.isShowTextEdit()&&(this.isNeedUpdateTextEditNode=!0)}),this.mindMap.on("node_tree_render_end",()=>{this.isShowTextEdit()&&this.isNeedUpdateTextEditNode&&(this.isNeedUpdateTextEditNode=!1,this.updateTextEditNode())})}unBindEvent(){window.removeEventListener("keydown",this.onKeydown)}onKeydown(t){if(t.target!==document.body)return;const e=this.mindMap.renderer.activeNodeList;if(e.length<=0||e.length>1)return;const i=e[0];i&&this.checkIsAutoEnterTextEditKey(t)&&(t.preventDefault(),this.show({node:i,e:t,isInserting:!1,isFromKeyDown:!0}))}checkIsAutoEnterTextEditKey(t){const e=t.keyCode;return(229===e||e>=65&&e<=90||e>=48&&e<=57)&&!this.mindMap.keyCommand.hasCombinationKey(t)}registerTmpShortcut(){this.mindMap.keyCommand.addShortcut("Enter",()=>{this.hideEditTextBox()}),this.mindMap.keyCommand.addShortcut("Tab",()=>{this.hideEditTextBox()})}isShowTextEdit(){return this.mindMap.richText?this.mindMap.richText.showTextEdit:this.showTextEdit}setIsShowTextEdit(t){this.showTextEdit=t,t?this.mindMap.keyCommand.stopCheckInSvg():this.mindMap.keyCommand.recoveryCheckInSvg()}async show({node:t,isInserting:e=!1,isFromKeyDown:i=!1,isFromScale:n=!1}){if(t.isUseCustomNodeContent())return;this.getCurrentEditNode()&&this.hideEditTextBox();const{beforeTextEdit:s,openRealtimeRenderOnNodeTextEdit:o}=this.mindMap.opt;if("function"==typeof s){let i=!1;try{i=await s(t,e)}catch(t){i=!1,this.mindMap.opt.errorHandler(d,t)}if(!i)return}const{offsetLeft:r,offsetTop:a}=((t,e,i=0,n=0)=>{let s=t.elRect,{scaleX:o,scaleY:r,translateX:a,translateY:h}=t.draw.transform(),{left:l,top:d,width:c,height:u}=e,p=(l+c)*o+a,m=(d+u)*r+h;l=l*o+a,d=d*r+h;let f=0,g=0;return l<0+i&&(f=-l+i),p>s.width-i&&(f=-(p-s.width)-i),d<0+n&&(g=-d+n),m>s.height-n&&(g=-(m-s.height)-n),{isOuter:0!==f||0!==g,offsetLeft:f,offsetTop:g}})(this.mindMap,t);this.mindMap.view.translateXY(r,a);const h=t._textData.node;o&&h.show();const l=h.node.getBoundingClientRect();o&&h.hide();const c={node:t,rect:l,isInserting:e,isFromKeyDown:i,isFromScale:n};this.mindMap.richText?this.mindMap.richText.showEditText(c):(this.currentNode=t,this.showEditTextBox(c))}onOpenRealtimeRenderOnNodeTextEditConfigUpdate(t){this.textEditNode&&(this.textEditNode.style.background=t?"transparent":this.currentNode?this.getBackground(this.currentNode):"",this.textEditNode.style.boxShadow=t?"none":"0 0 20px rgba(0,0,0,.5)")}onScale(){const t=this.getCurrentEditNode();t&&(this.mindMap.richText?(this.mindMap.richText.cacheEditingText=this.mindMap.richText.getEditText(),this.mindMap.richText.showTextEdit=!1):(this.cacheEditingText=this.getEditText(),this.setIsShowTextEdit(!1)),this.show({node:t,isFromScale:!0}))}showEditTextBox({node:t,rect:e,isInserting:i,isFromKeyDown:n,isFromScale:s}){if(this.showTextEdit)return;const{nodeTextEditZIndex:o,textAutoWrapWidth:r,selectTextOnEnterEditText:a,openRealtimeRenderOnNodeTextEdit:h,autoEmptyTextWhenKeydownEnterEdit:l}=this.mindMap.opt;if(s||this.mindMap.emit("before_show_text_edit"),this.registerTmpShortcut(),!this.textEditNode){this.textEditNode=document.createElement("div"),this.textEditNode.classList.add(Zn),this.textEditNode.style.cssText=`\n position: fixed;\n box-sizing: border-box;\n ${h?"":"box-shadow: 0 0 20px rgba(0,0,0,.5);"}\n padding: ${this.textNodePaddingY}px ${this.textNodePaddingX}px;\n margin-left: -${this.textNodePaddingX}px;\n margin-top: -${this.textNodePaddingY}px;\n outline: none; \n word-break: break-all;\n line-break: anywhere;\n `,this.textEditNode.setAttribute("contenteditable",!0),this.textEditNode.addEventListener("keyup",t=>{t.stopPropagation()}),this.textEditNode.addEventListener("click",t=>{t.stopPropagation()}),this.textEditNode.addEventListener("mousedown",t=>{t.stopPropagation()}),this.textEditNode.addEventListener("keydown",t=>{this.checkIsAutoEnterTextEditKey(t)&&t.stopPropagation()}),this.textEditNode.addEventListener("paste",t=>{const e=t.clipboardData.getData("text"),{isSmm:i,data:n}=an(e);i&&n[0]&&n[0].data?hn(t,Ii(n[0].data.text)):hn(t),this.emitTextChangeEvent()}),this.textEditNode.addEventListener("input",()=>{this.emitTextChangeEvent()});(this.mindMap.opt.customInnerElsAppendTo||document.body).appendChild(this.textEditNode)}const d=this.mindMap.view.scale,c=t.style.merge("fontSize"),u=(this.cacheEditingText||t.getData("text")).split(/\n/gim).map(t=>tn(t)),m="true"===t._textData.node.attr("data-ismultiLine");t.style.domText(this.textEditNode,d),h||(this.textEditNode.style.background=this.getBackground(t)),this.textEditNode.style.zIndex=o,this.textEditNode.innerHTML=n&&l?"":u.join("<br>"),this.textEditNode.style.minWidth=e.width+2*this.textNodePaddingX+"px",this.textEditNode.style.minHeight=e.height+"px",this.textEditNode.style.left=Math.floor(e.left)+"px",this.textEditNode.style.top=Math.floor(e.top)+"px",this.textEditNode.style.display="block",this.textEditNode.style.maxWidth=r*d+"px",m?(this.textEditNode.style.lineHeight=p,this.textEditNode.style.transform=`translateY(${.19999999999999996*c/2*d}px)`):this.textEditNode.style.lineHeight="normal",this.setIsShowTextEdit(!0),i||a&&!n?(t=>{let e=window.getSelection(),i=document.createRange();i.selectNodeContents(t),e.removeAllRanges(),e.addRange(i)})(this.textEditNode):(t=>{let e=window.getSelection(),i=document.createRange();i.selectNodeContents(t),i.collapse(),e.removeAllRanges(),e.addRange(i)})(this.textEditNode),this.cacheEditingText=""}emitTextChangeEvent(){this.mindMap.emit("node_text_edit_change",{node:this.currentNode,text:this.getEditText(),richText:!1})}updateTextEditNode(){if(this.mindMap.richText)return void this.mindMap.richText.updateTextEditNode();if(!this.showTextEdit||!this.currentNode)return;const t=this.currentNode._textData.node.node.getBoundingClientRect();this.textEditNode.style.minWidth=t.width+2*this.textNodePaddingX+"px",this.textEditNode.style.minHeight=t.height+2*this.textNodePaddingY+"px",this.textEditNode.style.left=Math.floor(t.left)+"px",this.textEditNode.style.top=Math.floor(t.top)+"px"}getBackground(t){if(t.style.merge("gradientStyle")){return`linear-gradient(to right, ${t.style.merge("startColor")}, ${t.style.merge("endColor")})`}{const e=t.style.merge("fillColor"),i=t.style.merge("color");return"transparent"===e?Gi(i)?(t=>{let{lineColor:e,root:i,second:n,node:s}=t,o=[e,i.fillColor,i.color,n.fillColor,n.color,s.fillColor,s.color,i.borderColor,n.borderColor,s.borderColor];for(let t=0;t<o.length;t++){let e=o[t];if(!$i(e)&&!Gi(e))return e}})(this.mindMap.themeConfig):"#fff":e}}removeTextEditEl(){if(this.mindMap.richText)return void this.mindMap.richText.removeTextEditEl();if(!this.textEditNode)return;(this.mindMap.opt.customInnerElsAppendTo||document.body).removeChild(this.textEditNode)}getEditText(){return(t=>{t=t.replace(/<br>/gim,"\n");let e=document.createElement("div");return e.innerHTML=t,e.textContent})(this.textEditNode.innerHTML)}hideEditTextBox(){if(this.mindMap.richText)return this.mindMap.richText.hideEditText();if(!this.showTextEdit)return;const t=this.currentNode,e=this.getEditText();this.currentNode=null,this.textEditNode.style.display="none",this.textEditNode.innerHTML="",this.textEditNode.style.fontFamily="inherit",this.textEditNode.style.fontSize="inherit",this.textEditNode.style.fontWeight="normal",this.textEditNode.style.transform="translateY(0)",this.setIsShowTextEdit(!1),this.mindMap.execCommand("SET_NODE_TEXT",t,e),this.mindMap.render(),this.mindMap.emit("hide_text_edit",this.textEditNode,this.renderer.activeNodeList,t)}getCurrentEditNode(){return this.mindMap.richText?this.mindMap.richText.node:this.currentNode}}const Jn={[n.LAYOUT.LOGICAL_STRUCTURE]:Gn,[n.LAYOUT.LOGICAL_STRUCTURE_LEFT]:Gn,[n.LAYOUT.MIND_MAP]:$n,[n.LAYOUT.CATALOG_ORGANIZATION]:Yn,[n.LAYOUT.ORGANIZATION_STRUCTURE]:Wn,[n.LAYOUT.TIMELINE]:Vn,[n.LAYOUT.TIMELINE2]:Vn,[n.LAYOUT.VERTICAL_TIMELINE]:jn,[n.LAYOUT.VERTICAL_TIMELINE2]:jn,[n.LAYOUT.VERTICAL_TIMELINE3]:jn,[n.LAYOUT.FISHBONE]:Kn,[n.LAYOUT.FISHBONE2]:Kn};const ts=class{constructor(t={}){this.opt=t,this.mindMap=t.mindMap,this.themeConfig=this.mindMap.themeConfig,this.renderTree=this.mindMap.opt.data?_()({},this.mindMap.opt.data):null,this.reRender=!1,this.isRendering=!1,this.hasWaitRendering=!1,this.nodeCache={},this.lastNodeCache={},this.renderSourceList=[],this.renderCallbackList=[],this.activeNodeList=[],this.emitNodeActiveEventTimer=null,this.renderTimer=null,this.root=null,this.textEdit=new Qn(this),this.beingCopyData=null,this.highlightBoxNode=null,this.highlightBoxNodeStyle=null,this.lastActiveNodeList=[],this.setLayout(),this.bindEvent(),this.registerCommands(),this.registerShortcutKeys()}setLayout(){this.layout&&this.layout.beforeChange&&this.layout.beforeChange();const{layout:t}=this.mindMap.opt;let e=Jn[t]||this.mindMap[t];e||(e=Jn[n.LAYOUT.LOGICAL_STRUCTURE],this.mindMap.opt.layout=n.LAYOUT.LOGICAL_STRUCTURE),this.layout=new e(this,t)}setData(t){this.renderTree=t||null}bindEvent(){const{openPerformance:t,performanceConfig:e,openRealtimeRenderOnNodeTextEdit:i}=this.mindMap.opt;this.mindMap.on("draw_click",t=>{this.clearActiveNodeListOnDrawClick(t,"click")}),this.mindMap.on("contextmenu",t=>{this.clearActiveNodeListOnDrawClick(t,"contextmenu")}),this.mindMap.svg.on("dblclick",()=>{this.mindMap.opt.enableDblclickBackToRootNode&&this.setRootNodeCenter()});const n=ki(()=>{this.renderTree&&this.root&&(this.mindMap.emit("node_tree_render_start"),this.root.render(()=>{this.mindMap.emit("node_tree_render_end")},!1,!0))},e.time);t&&this.mindMap.on("view_data_change",n),this.onNodeTextEditChange=((t,e=300,i)=>{let n=null;return(...s)=>{n&&clearTimeout(n),n=setTimeout(()=>{n=null,t.apply(i,s)},e)}})(this.onNodeTextEditChange,100,this),i&&this.mindMap.on("node_text_edit_change",this.onNodeTextEditChange),this.mindMap.on("after_update_config",(t,e)=>{t.openPerformance!==e.openPerformance&&(this.mindMap[t.openPerformance?"on":"off"]("view_data_change",n),this.forceLoadNode()),t.openRealtimeRenderOnNodeTextEdit!==e.openRealtimeRenderOnNodeTextEdit&&this.mindMap[t.openRealtimeRenderOnNodeTextEdit?"on":"off"]("node_text_edit_change",this.onNodeTextEditChange)})}onNodeTextEditChange({node:t,text:e}){t._textData=t.createTextNode(e);const{width:i,height:n}=t.getNodeRect();t.width=i,t.height=n,t.layout(),this.mindMap.render(()=>{this.textEdit.updateTextEditNode()})}forceLoadNode(t){(t=t||this.root)&&(this.mindMap.emit("node_tree_render_start"),t.render(()=>{this.mindMap.emit("node_tree_render_end")},!0))}registerCommands(){this.selectAll=this.selectAll.bind(this),this.mindMap.command.add("SELECT_ALL",this.selectAll),this.back=this.back.bind(this),this.mindMap.command.add("BACK",this.back),this.forward=this.forward.bind(this),this.mindMap.command.add("FORWARD",this.forward),this.insertNode=this.insertNode.bind(this),this.mindMap.command.add("INSERT_NODE",this.insertNode),this.insertMultiNode=this.insertMultiNode.bind(this),this.mindMap.command.add("INSERT_MULTI_NODE",this.insertMultiNode),this.insertChildNode=this.insertChildNode.bind(this),this.mindMap.command.add("INSERT_CHILD_NODE",this.insertChildNode),this.insertMultiChildNode=this.insertMultiChildNode.bind(this),this.mindMap.command.add("INSERT_MULTI_CHILD_NODE",this.insertMultiChildNode),this.insertParentNode=this.insertParentNode.bind(this),this.mindMap.command.add("INSERT_PARENT_NODE",this.insertParentNode),this.upNode=this.upNode.bind(this),this.mindMap.command.add("UP_NODE",this.upNode),this.downNode=this.downNode.bind(this),this.mindMap.command.add("DOWN_NODE",this.downNode),this.moveUpOneLevel=this.moveUpOneLevel.bind(this),this.mindMap.command.add("MOVE_UP_ONE_LEVEL",this.moveUpOneLevel),this.insertAfter=this.insertAfter.bind(this),this.mindMap.command.add("INSERT_AFTER",this.insertAfter),this.insertBefore=this.insertBefore.bind(this),this.mindMap.command.add("INSERT_BEFORE",this.insertBefore),this.moveNodeTo=this.moveNodeTo.bind(this),this.mindMap.command.add("MOVE_NODE_TO",this.moveNodeTo),this.removeNode=this.removeNode.bind(this),this.mindMap.command.add("REMOVE_NODE",this.removeNode),this.removeCurrentNode=this.removeCurrentNode.bind(this),this.mindMap.command.add("REMOVE_CURRENT_NODE",this.removeCurrentNode),this.pasteNode=this.pasteNode.bind(this),this.mindMap.command.add("PASTE_NODE",this.pasteNode),this.cutNode=this.cutNode.bind(this),this.mindMap.command.add("CUT_NODE",this.cutNode),this.setNodeStyle=this.setNodeStyle.bind(this),this.mindMap.command.add("SET_NODE_STYLE",this.setNodeStyle),this.setNodeStyles=this.setNodeStyles.bind(this),this.mindMap.command.add("SET_NODE_STYLES",this.setNodeStyles),this.setNodeActive=this.setNodeActive.bind(this),this.mindMap.command.add("SET_NODE_ACTIVE",this.setNodeActive),this.clearActiveNode=this.clearActiveNode.bind(this),this.mindMap.command.add("CLEAR_ACTIVE_NODE",this.clearActiveNode),this.setNodeExpand=this.setNodeExpand.bind(this),this.mindMap.command.add("SET_NODE_EXPAND",this.setNodeExpand),this.expandAllNode=this.expandAllNode.bind(this),this.mindMap.command.add("EXPAND_ALL",this.expandAllNode),this.unexpandAllNode=this.unexpandAllNode.bind(this),this.mindMap.command.add("UNEXPAND_ALL",this.unexpandAllNode),this.expandToLevel=this.expandToLevel.bind(this),this.mindMap.command.add("UNEXPAND_TO_LEVEL",this.expandToLevel),this.setNodeData=this.setNodeData.bind(this),this.mindMap.command.add("SET_NODE_DATA",this.setNodeData),this.setNodeText=this.setNodeText.bind(this),this.mindMap.command.add("SET_NODE_TEXT",this.setNodeText),this.setNodeImage=this.setNodeImage.bind(this),this.mindMap.command.add("SET_NODE_IMAGE",this.setNodeImage),this.setNodeIcon=this.setNodeIcon.bind(this),this.mindMap.command.add("SET_NODE_ICON",this.setNodeIcon),this.setNodeHyperlink=this.setNodeHyperlink.bind(this),this.mindMap.command.add("SET_NODE_HYPERLINK",this.setNodeHyperlink),this.setNodeNote=this.setNodeNote.bind(this),this.mindMap.command.add("SET_NODE_NOTE",this.setNodeNote),this.setNodeAttachment=this.setNodeAttachment.bind(this),this.mindMap.command.add("SET_NODE_ATTACHMENT",this.setNodeAttachment),this.setNodeTag=this.setNodeTag.bind(this),this.mindMap.command.add("SET_NODE_TAG",this.setNodeTag),this.insertFormula=this.insertFormula.bind(this),this.mindMap.command.add("INSERT_FORMULA",this.insertFormula),this.addGeneralization=this.addGeneralization.bind(this),this.mindMap.command.add("ADD_GENERALIZATION",this.addGeneralization),this.removeGeneralization=this.removeGeneralization.bind(this),this.mindMap.command.add("REMOVE_GENERALIZATION",this.removeGeneralization),this.setNodeCustomPosition=this.setNodeCustomPosition.bind(this),this.mindMap.command.add("SET_NODE_CUSTOM_POSITION",this.setNodeCustomPosition),this.resetLayout=this.resetLayout.bind(this),this.mindMap.command.add("RESET_LAYOUT",this.resetLayout),this.setNodeShape=this.setNodeShape.bind(this),this.mindMap.command.add("SET_NODE_SHAPE",this.setNodeShape),this.goTargetNode=this.goTargetNode.bind(this),this.mindMap.command.add("GO_TARGET_NODE",this.goTargetNode),this.removeCustomStyles=this.removeCustomStyles.bind(this),this.mindMap.command.add("REMOVE_CUSTOM_STYLES",this.removeCustomStyles),this.removeAllNodeCustomStyles=this.removeAllNodeCustomStyles.bind(this),this.mindMap.command.add("REMOVE_ALL_NODE_CUSTOM_STYLES",this.removeAllNodeCustomStyles)}registerShortcutKeys(){this.mindMap.keyCommand.addShortcut("Tab",()=>{this.mindMap.execCommand("INSERT_CHILD_NODE")}),this.mindMap.keyCommand.addShortcut("Insert",()=>{this.mindMap.execCommand("INSERT_CHILD_NODE")}),this.mindMap.keyCommand.addShortcut("Enter",()=>{this.mindMap.execCommand("INSERT_NODE")}),this.mindMap.keyCommand.addShortcut("Shift+Tab",()=>{this.mindMap.execCommand("INSERT_PARENT_NODE")}),this.mindMap.keyCommand.addShortcut("Control+g",()=>{this.mindMap.execCommand("ADD_GENERALIZATION")}),this.toggleActiveExpand=this.toggleActiveExpand.bind(this),this.mindMap.keyCommand.addShortcut("/",this.toggleActiveExpand),this.mindMap.keyCommand.addShortcut("Del|Backspace",()=>{this.mindMap.execCommand("REMOVE_NODE")}),this.mindMap.keyCommand.addShortcut("Shift+Backspace",()=>{this.mindMap.execCommand("REMOVE_CURRENT_NODE")}),this.mindMap.on("before_show_text_edit",()=>{this.startTextEdit()}),this.mindMap.on("hide_text_edit",()=>{this.endTextEdit()}),this.mindMap.keyCommand.addShortcut("Control+a",()=>{this.mindMap.execCommand("SELECT_ALL")}),this.mindMap.keyCommand.addShortcut("Control+l",()=>{this.mindMap.execCommand("RESET_LAYOUT")}),this.mindMap.keyCommand.addShortcut("Control+Up",()=>{this.mindMap.execCommand("UP_NODE")}),this.mindMap.keyCommand.addShortcut("Control+Down",()=>{this.mindMap.execCommand("DOWN_NODE")}),this.mindMap.keyCommand.addShortcut("Control+c",()=>{this.copy()}),this.mindMap.keyCommand.addShortcut("Control+x",()=>{this.cut()}),this.mindMap.keyCommand.addShortcut("Control+v",()=>{this.paste()}),this.mindMap.keyCommand.addShortcut("Control+Enter",()=>{this.setRootNodeCenter()})}emitNodeActiveEvent(t=null,e=[...this.activeNodeList]){!((t,e)=>{if(t.length!==e.length)return!1;for(let i=0;i<t.length;i++)if(!e.find(e=>e.uid===t[i].uid))return!1;return!0})(this.lastActiveNodeList,e)&&(this.lastActiveNodeList=[...e],clearTimeout(this.emitNodeActiveEventTimer),this.emitNodeActiveEventTimer=setTimeout(()=>{this.mindMap.emit("node_active",t,e)},0))}clearActiveNodeListOnDrawClick(t,e){if(this.activeNodeList.length<=0)return;let i=!0;const{useLeftKeySelectionRightKeyDrag:n}=this.mindMap.opt;if("contextmenu"===e?!n:n){const e=this.mindMap.event.mousedownPos;i=Math.abs(t.clientX-e.x)<=5&&Math.abs(t.clientY-e.y)<=5}i&&this.mindMap.execCommand("CLEAR_ACTIVE_NODE")}startTextEdit(){this.mindMap.keyCommand.save()}endTextEdit(){this.mindMap.keyCommand.restore()}clearCache(){this.layout.lru.clear(),this.nodeCache={},this.lastNodeCache={}}addRenderParams(t,e){if(t){const e=this.renderCallbackList.findIndex(e=>e===t);-1===e&&this.renderCallbackList.push(t)}if(e){-1===this.renderSourceList.findIndex(t=>t===e)&&this.renderSourceList.push(e)}}checkHasRenderSource(t){t=Array.isArray(t)?t:[t];for(let e=0;e<this.renderSourceList.length;e++)if(t.includes(this.renderSourceList[e]))return!0;return!1}onRenderEnd(){this.renderCallbackList.forEach(t=>{t()}),this.isRendering=!1,this.reRender=!1,this.renderCallbackList=[],this.renderSourceList=[],this.mindMap.emit("node_tree_render_end")}render(t,e){this.addRenderParams(t,e),clearTimeout(this.renderTimer),this.renderTimer=setTimeout(()=>{this._render()},0)}_render(){this.checkHasRenderSource(n.CHANGE_THEME)&&this.resetUnExpandNodeStyle(),this.isRendering?this.hasWaitRendering=!0:(this.isRendering=!0,this.lastNodeCache=this.nodeCache,this.nodeCache={},this.reRender&&this.clearActiveNodeList(),this.renderTree?(this.mindMap.emit("node_tree_render_start"),this.root=null,this.layout.doLayout(t=>{Object.keys(this.lastNodeCache).forEach(t=>{this.nodeCache[t]||(this.removeNodeFromActiveList(this.lastNodeCache[t]),this.emitNodeActiveEvent(),this.lastNodeCache[t].destroy())}),this.root=t,this.root.render(()=>{if(this.isRendering=!1,this.hasWaitRendering)return this.hasWaitRendering=!1,void this.render();this.onRenderEnd()})}),this.emitNodeActiveEvent()):this.onRenderEnd())}renderByCustomNodeContentNode(t){t.getSize(),t.customNodeContentRealtimeLayout(),this.mindMap.render()}resetUnExpandNodeStyle(){this.renderTree&&qi(this.renderTree,null,t=>{if(!t.data.expand)return qi(t,null,t=>{t.data.needUpdate=!0}),!0})}clearActiveNode(){this.activeNodeList.length<=0||(this.clearActiveNodeList(),this.emitNodeActiveEvent(null,[]))}clearActiveNodeList(){this.activeNodeList.forEach(t=>{this.mindMap.execCommand("SET_NODE_ACTIVE",t,!1)}),this.activeNodeList=[]}addNodeToActiveList(t,e=!1){if(this.mindMap.opt.onlyOneEnableActiveNodeOnCooperate&&t.userList.length>0)return;-1===this.findActiveNodeIndex(t)&&(e||this.mindMap.emit("before_node_active",t,this.activeNodeList),this.mindMap.execCommand("SET_NODE_ACTIVE",t,!0),this.activeNodeList.push(t))}removeNodeFromActiveList(t){let e=this.findActiveNodeIndex(t);-1!==e&&(this.mindMap.execCommand("SET_NODE_ACTIVE",t,!1),this.activeNodeList.splice(e,1))}activeMultiNode(t=[]){t.forEach(t=>{this.mindMap.emit("before_node_active",t,this.activeNodeList),this.addNodeToActiveList(t,!0),this.emitNodeActiveEvent(t)})}cancelActiveMultiNode(t=[]){t.forEach(t=>{this.removeNodeFromActiveList(t),this.emitNodeActiveEvent(null)})}findActiveNodeIndex(t){return Qi(t,this.activeNodeList)}selectAll(){this.mindMap.opt.readonly||(qi(this.root,null,t=>{t.getData("isActive")||this.addNodeToActiveList(t),t._generalizationList&&t._generalizationList.length>0&&t._generalizationList.forEach(t=>{const e=t.generalizationNode;e.getData("isActive")||this.addNodeToActiveList(e)})},null,!0,0,0),this.emitNodeActiveEvent())}back(t){this.backForward("back",t)}forward(t){this.backForward("forward",t)}backForward(t,e){this.mindMap.execCommand("CLEAR_ACTIVE_NODE");const i=this.mindMap.command[t](e);i&&(this.renderTree=i,this.mindMap.render()),this.mindMap.emit("data_change",i)}getNewNodeBehavior(t=!1,e=!1){const{createNewNodeBehavior:i}=this.mindMap.opt;let s=!1,o=!1;switch(i){case n.CREATE_NEW_NODE_BEHAVIOR.DEFAULT:s=e||!t,o=!e&&t;break;case n.CREATE_NEW_NODE_BEHAVIOR.NOT_ACTIVE:s=!1,o=!1;break;case n.CREATE_NEW_NODE_BEHAVIOR.ACTIVE_ONLY:s=!0,o=!1}return{focusNewNode:s,inserting:o}}insertNode(t=!0,e=[],i=null,n=[]){if(e=Ki(e),this.activeNodeList.length<=0&&e.length<=0)return;this.textEdit.hideEditTextBox();const{defaultInsertSecondLevelNodeText:s,defaultInsertBelowSecondLevelNodeText:o}=this.mindMap.opt,r=e.length>0?e:this.activeNodeList,a=r.length>1,h=this.hasRichTextPlugin(),{focusNewNode:l,inserting:d}=this.getNewNodeBehavior(t,a),c={expand:!0,richText:h,isActive:l};h&&(c.resetRichText=!0),n=ji(n,c);const u=i&&i.richText;let p=!1;r.forEach(t=>{if(t.isGeneralization||t.isRoot)return;n=Di(n);const e=t.parent,r=1===t.layerIndex?s:o,a=Zi(t);u&&c.resetRichText&&delete c.resetRichText;const h={inserting:d,data:{text:r,...c,uid:Fi(),...i||{}},children:[...Xi(n,p)]};p=!0,e.nodeData.children.splice(a+1,0,h)}),l&&this.clearActiveNodeList(),this.mindMap.render()}insertMultiNode(t,e){if(!e||e.length<=0)return;if(t=Ki(t),this.activeNodeList.length<=0&&t.length<=0)return;this.textEdit.hideEditTextBox();const i=t.length>0?t:this.activeNodeList,n=this.hasRichTextPlugin(),{focusNewNode:s}=this.getNewNodeBehavior(!1,!0),o={expand:!0,richText:n,isActive:s};n&&(o.resetRichText=!0),e=ji(e,o);let r=!1;i.forEach(t=>{if(t.isGeneralization||t.isRoot)return;e=Di(e);const i=t.parent,n=Zi(t),s=Xi(e,r);r=!0,i.nodeData.children.splice(n+1,0,...s)}),s&&this.clearActiveNodeList(),this.mindMap.render()}insertChildNode(t=!0,e=[],i=null,n=[]){if(e=Ki(e),this.activeNodeList.length<=0&&e.length<=0)return;this.textEdit.hideEditTextBox();const{defaultInsertSecondLevelNodeText:s,defaultInsertBelowSecondLevelNodeText:o}=this.mindMap.opt,r=e.length>0?e:this.activeNodeList,a=r.length>1,h=this.hasRichTextPlugin(),{focusNewNode:l,inserting:d}=this.getNewNodeBehavior(t,a),c={expand:!0,richText:h,isActive:l};h&&(c.resetRichText=!0),n=ji(n,c);const u=i&&i.richText;let p=!1;r.forEach(t=>{if(t.isGeneralization)return;n=Di(n),t.nodeData.children||(t.nodeData.children=[]);const e=t.isRoot?s:o;u&&c.resetRichText&&delete c.resetRichText;const r={inserting:d,data:{text:e,uid:Fi(),...c,...i||{}},children:[...Xi(n,p)]};p=!0,t.nodeData.children.push(r),t.setData({expand:!0})}),l&&this.clearActiveNodeList(),this.mindMap.render()}insertMultiChildNode(t,e){if(!e||e.length<=0)return;if(t=Ki(t),this.activeNodeList.length<=0&&t.length<=0)return;this.textEdit.hideEditTextBox();const i=t.length>0?t:this.activeNodeList,n=this.hasRichTextPlugin(),{focusNewNode:s}=this.getNewNodeBehavior(!1,!0),o={expand:!0,richText:n,isActive:s};n&&(o.resetRichText=!0),e=ji(e,o);let r=!1;i.forEach(t=>{t.isGeneralization||(e=Di(e),t.nodeData.children||(t.nodeData.children=[]),e=Xi(e,r),r=!0,t.nodeData.children.push(...e),t.setData({expand:!0}))}),s&&this.clearActiveNodeList(),this.mindMap.render()}insertParentNode(t=!0,e,i){if(e=Ki(e),this.activeNodeList.length<=0&&e.length<=0)return;this.textEdit.hideEditTextBox();const{defaultInsertSecondLevelNodeText:n,defaultInsertBelowSecondLevelNodeText:s}=this.mindMap.opt,o=e.length>0?e:this.activeNodeList,r=o.length>1,a=this.hasRichTextPlugin(),{focusNewNode:h,inserting:l}=this.getNewNodeBehavior(t,r),d={expand:!0,richText:a,isActive:h};a&&(d.resetRichText=!0);const c=i&&i.richText;o.forEach(t=>{if(t.isGeneralization||t.isRoot)return;const e=1===t.layerIndex?n:s;c&&d.resetRichText&&delete d.resetRichText;const o={inserting:l,data:{text:e,uid:Fi(),...d,...i||{}},children:[t.nodeData]},r=t.parent,a=Zi(t);r.nodeData.children.splice(a,1,o)}),h&&this.clearActiveNodeList(),this.mindMap.render()}upNode(t){if(this.activeNodeList.length<=0&&!t)return;const e=(t?[t]:this.activeNodeList)[0];if(e.isRoot)return;let i=e.parent,n=i.children,s=Qi(e,n);if(-1===s||0===s)return;let o=s-1;n.splice(s,1),n.splice(o,0,e),i.nodeData.children.splice(s,1),i.nodeData.children.splice(o,0,e.nodeData),this.mindMap.render()}downNode(t){if(this.activeNodeList.length<=0&&!t)return;const e=(t?[t]:this.activeNodeList)[0];if(e.isRoot)return;let i=e.parent,n=i.children,s=Qi(e,n);if(-1===s||s===n.length-1)return;let o=s+1;n.splice(s,1),n.splice(o,0,e),i.nodeData.children.splice(s,1),i.nodeData.children.splice(o,0,e.nodeData),this.mindMap.render()}moveUpOneLevel(t){if(!(t=t||this.activeNodeList[0])||t.isRoot||t.layerIndex<=1)return;const e=t.parent,i=e.parent,n=Qi(t,e.children),s=Qi(e,i.children);e.nodeData.children.splice(n,1),i.nodeData.children.splice(s+1,0,t.nodeData),this.mindMap.render()}_handleRemoveCustomStyles(t){let e=!1;return Object.keys(t).forEach(i=>{Wi(i)&&(e=!0,delete t[i])}),this.hasRichTextPlugin()&&(e=!0,t.resetRichText=!0),e}removeCustomStyles(t){if(!(t=t||this.activeNodeList[0]))return;this._handleRemoveCustomStyles(t.getData())&&this.reRenderNodeCheckChange(t)}removeAllNodeCustomStyles(t){t=Ki(t);let e=!1;if(t.length>0)t.forEach(t=>{this._handleRemoveCustomStyles(t.getData())&&(e=!0)});else{if(!this.renderTree)return;qi(this.renderTree,null,t=>{this._handleRemoveCustomStyles(t.data)&&(e=!0);const i=un(t.data);i.length>0&&i.forEach(t=>{this._handleRemoveCustomStyles(t)&&(e=!0)})})}e&&this.mindMap.reRender()}copy(){this.beingCopyData=this.copyNode(),this.beingCopyData&&(this.mindMap.opt.disabledClipboard||sn(rn(this.beingCopyData)))}cut(){this.mindMap.execCommand("CUT_NODE",t=>{this.beingCopyData=t,this.mindMap.opt.disabledClipboard||sn(rn(t))})}handlePaste(t){const{disabledClipboard:e}=this.mindMap.opt;if(e)return;const i=t.clipboardData||t.originalEvent.clipboardData,n=i.items;let s=null,o="";Array.from(n).forEach(t=>{t.type.indexOf("image")>-1&&(s=t.getAsFile()),t.type.indexOf("text")>-1&&(o=i.getData("text"))}),this.paste()}async paste(){const{errorHandler:t,handleIsSplitByWrapOnPasteCreateNewNode:e,handleNodePasteImg:i,disabledClipboard:n,onlyPasteTextWhenHasImgAndText:s}=this.mindMap.opt;if(!n&&nn())try{const n=await(async()=>{let t=null,e=null;if(nn()){const i=await navigator.clipboard.read();if(i&&i.length>0)for(const n of i)for(const i of n.types)if(/^image\//.test(i))e=await n.getType(i);else if("text/plain"===i){const e=await n.getType(i);t=await e.text()}}return{text:t,img:e}})();let o=n.text||"",r=n.img||null;if(o){let i=null,n=!0;if(this.mindMap.opt.customHandleClipboardText)try{const t=await this.mindMap.opt.customHandleClipboardText(o);if(!Hi(t)){n=!1;const e=an(t);e.isSmm?i=e.data:o=e.data}}catch(e){t(h,e)}if(n){const t=an(o);t.isSmm?i=t.data:o=t.data}if(i)this.mindMap.execCommand("INSERT_MULTI_CHILD_NODE",[],Array.isArray(i)?i:[i]);else{this.hasRichTextPlugin()&&(o=tn(o));const t=o.split(new RegExp("\r?\n|(?<!\n)\r","g")).filter(t=>!!t);t.length>1&&e?e().then(()=>{this.mindMap.execCommand("INSERT_MULTI_CHILD_NODE",[],t.map(t=>({data:{text:t},children:[]})))}).catch(()=>{this.mindMap.execCommand("INSERT_CHILD_NODE",!1,[],{text:o})}):this.mindMap.execCommand("INSERT_CHILD_NODE",!1,[],{text:o})}}if(r&&(!o||!s))try{let t=null;t=i&&"function"==typeof i?await i(r):await Bi(r),this.activeNodeList.length>0&&this.activeNodeList.forEach(e=>{this.mindMap.execCommand("SET_NODE_IMAGE",e,{url:t.url,title:"",width:t.size.width,height:t.size.height})})}catch(e){t(l,e)}}catch(e){t(a,e)}else this.beingCopyData&&this.mindMap.execCommand("PASTE_NODE",this.beingCopyData)}insertBefore(t,e){this.insertTo(t,e,"before")}insertAfter(t,e){this.insertTo(t,e,"after")}insertTo(t,e,i="before"){let n=Ki(t);n=n.filter(t=>!t.isRoot),"after"===i&&n.reverse(),n.forEach(t=>{let n=t.parent,s=n.children,o=Qi(t,s);if(-1===o)return;s.splice(o,1),n.nodeData.children.splice(o,1);let r=e.parent,a=r.children,h=Qi(e,a);-1!==h&&("after"===i&&h++,a.splice(h,0,t),r.nodeData.children.splice(h,0,t.nodeData))}),this.mindMap.render()}removeNode(t=[]){if(t=Ki(t),this.activeNodeList.length<=0&&t.length<=0)return;let e=null,i=t.length>0,n=i?t:this.activeNodeList,s=n.find(t=>t.isRoot);if(s)this.clearActiveNodeList(),s.children=[],s.nodeData.children=[];else{e=this.getNextActiveNode(n);for(let t=0;t<n.length;t++){const e=n[t],s=this.textEdit.getCurrentEditNode();s&&s.getData("uid")===e.getData("uid")&&this.textEdit.hideEditTextBox(),i&&n.splice(t,1),e.isGeneralization?(this.deleteNodeGeneralization(e),this.removeNodeFromActiveList(e),t--):(this.removeNodeFromActiveList(e),on(e),t--)}}this.activeNodeList=[],e&&this.addNodeToActiveList(e),this.emitNodeActiveEvent(),this.mindMap.render()}deleteNodeGeneralization(t){const e=t.generalizationBelongNode,i=e.getGeneralizationNodeIndex(t);let n=e.getData("generalization");Array.isArray(n)?n.splice(i,1):n=null,this.mindMap.execCommand("SET_NODE_DATA",e,{generalization:n}),this.closeHighlightNode()}removeCurrentNode(t=[]){if(t=Ki(t),this.activeNodeList.length<=0&&t.length<=0)return;let e=t.length>0?t:this.activeNodeList;e=e.filter(t=>!t.isRoot);let i=this.getNextActiveNode(e);for(let t=0;t<e.length;t++){let i=e[t];if(i.isGeneralization)this.deleteNodeGeneralization(i);else{const t=i.parent,e=Zi(i);t.nodeData.children.splice(e,1,...i.nodeData.children||[])}}this.activeNodeList=[],i&&this.addNodeToActiveList(i),this.emitNodeActiveEvent(),this.mindMap.render()}getNextActiveNode(t){if(1!==t.length)return null;if(-1===this.findActiveNodeIndex(t[0]))return null;let e=null;if(1===this.activeNodeList.length&&!this.activeNodeList[0].isGeneralization&&this.mindMap.opt.deleteNodeActive){const t=this.activeNodeList[0],i=t.parent.children,n=Qi(t,i);e=n<i.length-1?i[n+1]:n>0?i[n-1]:t.parent}return e}copyNode(){if(this.activeNodeList.length<=0)return null;let t=Vi(this.activeNodeList);return t=mn(t),t.map(t=>Ai({},t,!0))}cutNode(t){if(this.activeNodeList.length<=0)return;let e=Vi(this.activeNodeList).filter(t=>!t.isRoot);e=mn(e);const i=e.map(t=>Ai({},t,!0));e.forEach(t=>{on(t)}),this.clearActiveNodeList(),this.mindMap.render(),t&&"function"==typeof t&&t(i)}moveNodeTo(t,e){let i=Ki(t);i=i.filter(t=>!t.isRoot),i.forEach(t=>{this.removeNodeFromActiveList(t),on(t),e.setData({expand:!0}),e.nodeData.children.push(t.nodeData)}),this.emitNodeActiveEvent(),this.mindMap.render()}pasteNode(t){t=Ki(t),this.mindMap.execCommand("INSERT_MULTI_CHILD_NODE",[],t)}setNodeStyle(t,e,i){const n={[e]:i};this.setNodeDataRender(t,n),Ci.includes(e)&&(t.parent||t).renderLine(!0)}setNodeStyles(t,e){const i={...e};this.setNodeDataRender(t,i);let n=Object.keys(e),s=!1;n.forEach(t=>{Ci.includes(t)&&(s=!0)}),s&&(t.parent||t).renderLine(!0)}setNodeActive(t,e){this.mindMap.execCommand("SET_NODE_DATA",t,{isActive:e}),t.updateNodeByActive(e)}setNodeExpand(t,e){this.mindMap.execCommand("SET_NODE_DATA",t,{expand:e}),this.mindMap.render()}expandAllNode(t=""){if(!this.renderTree)return;const e=(i,n)=>{n||i.data.uid!==t||(n=!0),n&&!i.data.expand&&(i.data.expand=!0),i.children&&i.children.length>0&&i.children.forEach(t=>{e(t,n)})};e(this.renderTree,!t),this.mindMap.render()}unexpandAllNode(t=!0,e=""){if(!this.renderTree)return;const i=(t,n,s)=>{s||t.data.uid!==e||(s=!0),s&&!n&&t.children&&t.children.length>0&&(t.data.expand=!1),t.children&&t.children.length>0&&t.children.forEach(t=>{i(t,!1,s)})};i(this.renderTree,!0,!e),this.mindMap.render(()=>{t&&this.setRootNodeCenter()})}expandToLevel(t){this.renderTree&&(qi(this.renderTree,null,(e,i,n,s)=>{s<t?e.data.expand=!0:!n&&e.children&&e.children.length>0&&(e.data.expand=!1)},null,!0,0,0),this.mindMap.render())}toggleActiveExpand(){this.activeNodeList.forEach(t=>{t.nodeData.children.length<=0||t.isRoot||this.toggleNodeExpand(t)})}toggleNodeExpand(t){this.mindMap.execCommand("SET_NODE_EXPAND",t,!t.getData("expand"))}setNodeText(t,e,i,n){i=void 0===i?t.getData("richText"):i,this.setNodeDataRender(t,{text:e,richText:i,resetRichText:n})}setNodeImage(t,e){const{url:i,title:n,width:s,height:o,custom:r=!1}=e||{url:"",title:"",width:0,height:0,custom:!1};this.setNodeDataRender(t,{image:i,imageTitle:n||"",imageSize:{width:s,height:o,custom:r}})}setNodeIcon(t,e){this.setNodeDataRender(t,{icon:e})}setNodeHyperlink(t,e,i=""){this.setNodeDataRender(t,{hyperlink:e,hyperlinkTitle:i})}setNodeNote(t,e){this.setNodeDataRender(t,{note:e})}setNodeAttachment(t,e,i=""){this.setNodeDataRender(t,{attachmentUrl:e,attachmentName:i})}setNodeTag(t,e){this.setNodeDataRender(t,{tag:e})}insertFormula(t,e=[]){if(!this.hasRichTextPlugin()||!this.mindMap.formula)return;((e=Ki(e)).length>0?e:this.activeNodeList).forEach(e=>{this.mindMap.formula.insertFormulaToNode(e,t)})}addGeneralization(t,e=!0){if(this.activeNodeList.length<=0)return;const i=(t=>{const e={},i={};t.forEach(t=>{const n=t.parent;if(n){const s=n.uid;i[s]=n;const o=t.getIndexInBrothers(),r={node:t,index:o};e[s]?e[s].find(t=>t.index===r.index)||e[s].push(r):e[s]=[r]}});const n=[];return Object.keys(e).forEach(t=>{if(e[t].length>1){const s=e[t].map(t=>t.index).sort((t,e)=>t-e);n.push({node:i[t],range:[s[0],s[s.length-1]]})}else n.push({node:e[t][0].node})}),n})(this.activeNodeList.filter(t=>!t.isRoot&&!t.isGeneralization&&!t.checkHasSelfGeneralization()));if(i.length<=0)return;const n=this.hasRichTextPlugin(),{focusNewNode:s,inserting:o}=this.getNewNodeBehavior(e,i.length>1);let r=!1;const a=t&&t.richText;i.forEach(e=>{const i={inserting:o,...t||{text:this.mindMap.opt.defaultGeneralizationText},range:e.range||null,uid:Fi(),richText:n,isActive:s};n&&!a&&(i.resetRichText=n);let h=e.node.getData("generalization");if(h=h?Array.isArray(h)?h:[h]:[],e.range){if(!!h.find(t=>t.range&&t.range[0]===e.range[0]&&t.range[1]===e.range[1]))return;h.push(i)}else h.push(i);r=!0,this.mindMap.execCommand("SET_NODE_DATA",e.node,{generalization:h}),e.node.setData({expand:!0})}),r&&(s&&this.clearActiveNodeList(),this.mindMap.render(()=>{this.mindMap.render()}))}removeGeneralization(){this.activeNodeList.length<=0||(this.activeNodeList.forEach(t=>{t.checkHasGeneralization()&&this.mindMap.execCommand("SET_NODE_DATA",t,{generalization:null})}),this.mindMap.render(),this.closeHighlightNode())}setNodeCustomPosition(t,e=void 0,i=void 0){([t]||0).forEach(t=>{this.mindMap.execCommand("SET_NODE_DATA",t,{customLeft:e,customTop:i})})}resetLayout(){qi(this.root,null,t=>{t.customLeft=void 0,t.customTop=void 0,this.mindMap.execCommand("SET_NODE_DATA",t,{customLeft:void 0,customTop:void 0}),this.mindMap.render()},null,!0,0,0)}setNodeShape(t,e){if(!e||!_n.includes(e))return;([t]||0).forEach(t=>{this.setNodeStyle(t,"shape",e)})}goTargetNode(t,e=()=>{}){let i="string"==typeof t?t:t.getData("uid");i&&this.expandToNodeUid(i,()=>{let t=this.findNodeByUid(i);t&&(t.active(),this.moveNodeToCenter(t),e(t))})}setNodeData(t,e){Object.keys(e).forEach(i=>{t.nodeData.data[i]=e[i]})}setNodeDataRender(t,e,i=!1){this.mindMap.execCommand("SET_NODE_DATA",t,e),(t=>{const e=[...Ci],i=Object.keys(t);for(let t=0;t<i.length;t++)if(!e.includes(i[t]))return!1;return!0})(e)?this.mindMap.emit("node_tree_render_end"):this.reRenderNodeCheckChange(t,i)}reRenderNodeCheckChange(t,e){t.reRender()?e||this.mindMap.render():this.mindMap.emit("node_tree_render_end")}moveNodeToCenter(t,e){let{resetScaleOnMoveNodeToCenter:i}=this.mindMap.opt;void 0!==e&&(i=e);let{transform:n,state:s}=this.mindMap.view.getTransformData(),{left:o,top:r,width:a,height:h}=t;i||(o*=n.scaleX,r*=n.scaleY,a*=n.scaleX,h*=n.scaleY);let l=this.mindMap.width/2,d=this.mindMap.height/2,c=o+a/2,u=r+h/2,p=l-s.x-c,m=d-s.y-u;this.mindMap.view.translateX(p),this.mindMap.view.translateY(m),i&&this.mindMap.view.setScale(1)}setRootNodeCenter(){this.moveNodeToCenter(this.root)}expandToNodeUid(t,e=()=>{}){if(!this.renderTree)return void e();let i=[],n=!1;const s={};((t,e)=>{let i=[t],n=!1;for("stop"===e(t,null)&&(n=!0);i.length&&!n;){let t=i.shift();t.children&&t.children.length&&t.children.forEach(s=>{n||(i.push(s),"stop"===e(s,t)&&(n=!0))})}})(this.renderTree,(e,o)=>{if(e.data.uid===t)return i=o?[...s[o.data.uid],o]:[],"stop";if(un(e.data).forEach(r=>{r.uid===t&&(i=o?[...s[o.data.uid],o,e]:[],n=!0)}),n)return"stop";s[e.data.uid]=o?[...s[o.data.uid],o]:[]});let o=!1;if(i.forEach(t=>{t.data.expand||(o=!0,t.data.expand=!0)}),n){const t=i[i.length-1];t&&qi(t,null,t=>{t.data.expand||(o=!0,t.data.expand=!0)})}o?this.mindMap.render(e):e()}findNodeByUid(t){if(!this.root)return;let e=null;return qi(this.root,null,i=>{if(i.getData("uid")===t)return e=i,!0;let n=!1;return(i._generalizationList||[]).forEach(i=>{i.generalizationNode.getData("uid")===t&&(e=i.generalizationNode,n=!0)}),!!n||void 0}),e}highlightNode(t,e,i){if(this.isRendering)return;i={stroke:"rgb(94, 200, 248)",fill:"transparent",...i||{}},this.highlightBoxNode?this.highlightBoxNodeStyle&&(this.highlightBoxNodeStyle.stroke===i.stroke&&this.highlightBoxNodeStyle.fill===i.fill||this.highlightBoxNode.stroke({color:i.stroke||"transparent"}).fill({color:i.fill||"transparent"})):this.highlightBoxNode=(new je).stroke({color:i.stroke||"transparent"}).fill({color:i.fill||"transparent"}),this.highlightBoxNodeStyle={...i};let n=1/0,s=1/0,o=-1/0,r=-1/0;if(e){t.children.slice(e[0],e[1]+1).forEach(t=>{t.left<n&&(n=t.left),t.top<s&&(s=t.top);const e=t.left+t.width,i=t.top+t.height;e>o&&(o=e),i>r&&(r=i)})}else n=t.left,s=t.top,o=t.left+t.width,r=t.top+t.height;this.highlightBoxNode.plot([[n,s],[o,s],[o,r],[n,r]]),this.mindMap.otherDraw.add(this.highlightBoxNode)}closeHighlightNode(){this.highlightBoxNode&&this.highlightBoxNode.remove()}hasRichTextPlugin(){return!!this.mindMap.richText}},es={default:bi},is={Backspace:8,Tab:9,Enter:13,Shift:16,Control:17,Alt:18,CapsLock:20,Esc:27,Spacebar:32,PageUp:33,PageDown:34,End:35,Home:36,Insert:45,Left:37,Up:38,Right:39,Down:40,Del:46,NumLock:144,Cmd:91,CmdFF:224,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,"`":192,"=":187,"-":189,"/":191,".":190};for(let t=0;t<=9;t++)is[t]=t+48;"abcdefghijklmnopqrstuvwxyz".split("").forEach((t,e)=>{is[t]=e+65});const ns=is;class ss{constructor(t){this.opt=t,this.mindMap=t.mindMap,this.shortcutMap={},this.shortcutMapCache={},this.isPause=!1,this.isInSvg=!1,this.isStopCheckInSvg=!1,this.defaultEnableCheck=this.defaultEnableCheck.bind(this),this.bindEvent()}extendKeyMap(t,e){ns[t]=e}removeKeyMap(t){void 0!==ns[t]&&delete ns[t]}pause(){this.isPause=!0}recovery(){this.isPause=!1}save(){Object.keys(this.shortcutMapCache).length>0||(this.shortcutMapCache=this.shortcutMap,this.shortcutMap={})}restore(){Object.keys(this.shortcutMapCache).length<=0||(this.shortcutMap=this.shortcutMapCache,this.shortcutMapCache={})}stopCheckInSvg(){const{enableShortcutOnlyWhenMouseInSvg:t}=this.mindMap.opt;t&&(this.isStopCheckInSvg=!0)}recoveryCheckInSvg(){const{enableShortcutOnlyWhenMouseInSvg:t}=this.mindMap.opt;t&&(this.isStopCheckInSvg=!0)}bindEvent(){this.onKeydown=this.onKeydown.bind(this),this.mindMap.on("svg_mouseenter",()=>{this.isInSvg=!0}),this.mindMap.on("svg_mouseleave",()=>{this.isInSvg=!1}),window.addEventListener("keydown",this.onKeydown),this.mindMap.on("beforeDestroy",()=>{this.unBindEvent()})}unBindEvent(){window.removeEventListener("keydown",this.onKeydown)}defaultEnableCheck(t){const e=t.target;if(e===document.body)return!0;for(let t=0;t<this.mindMap.editNodeClassList.length;t++){const i=this.mindMap.editNodeClassList[t];if(e.classList.contains(i))return!0}return!1}onKeydown(t){const{enableShortcutOnlyWhenMouseInSvg:e,beforeShortcutRun:i,customCheckEnableShortcut:n}=this.mindMap.opt;("function"==typeof n?n:this.defaultEnableCheck)(t)&&(this.isPause||e&&!this.isStopCheckInSvg&&!this.isInSvg||Object.keys(this.shortcutMap).forEach(e=>{if(this.checkKey(t,e)){if(this.checkKey(t,"Control+v")||(t.stopPropagation(),t.preventDefault()),"function"==typeof i){if(i(e,[...this.mindMap.renderer.activeNodeList]))return}this.shortcutMap[e].forEach(t=>{t()})}}))}checkKey(t,e){let i=this.getOriginEventCodeArr(t),n=this.getKeyCodeArr(e);if(i.length!==n.length)return!1;for(let t=0;t<i.length;t++){let e=n.findIndex(e=>e===i[t]);if(-1===e)return!1;n.splice(e,1)}return!0}getOriginEventCodeArr(t){let e=[];return(t.ctrlKey||t.metaKey)&&e.push(ns.Control),t.altKey&&e.push(ns.Alt),t.shiftKey&&e.push(ns.Shift),e.includes(t.keyCode)||e.push(t.keyCode),e}hasCombinationKey(t){return t.ctrlKey||t.metaKey||t.altKey||t.shiftKey}getKeyCodeArr(t){let e=t.split(/\s*\+\s*/),i=[];return e.forEach(t=>{i.push(ns[t])}),i}addShortcut(t,e){t.split(/\s*\|\s*/).forEach(t=>{this.shortcutMap[t]?this.shortcutMap[t].push(e):this.shortcutMap[t]=[e]})}removeShortcut(t,e){t.split(/\s*\|\s*/).forEach(t=>{if(this.shortcutMap[t])if(e){let i=this.shortcutMap[t].findIndex(t=>t===e);-1!==i&&this.shortcutMap[t].splice(i,1)}else this.shortcutMap[t]=[],delete this.shortcutMap[t]})}getShortcutFn(t){let e=[];return t.split(/\s*\|\s*/).forEach(t=>{e=this.shortcutMap[t]||[]}),e}}const os=JSON.parse('{"rE":"0.14.0-fix.3"}');const rs=class{constructor(t={}){this.opt=t,this.mindMap=t.mindMap,this.commands={},this.history=[],this.activeHistoryIndex=0,this.registerShortcutKeys(),this.originAddHistory=this.addHistory.bind(this),this.addHistory=ki(this.addHistory,this.mindMap.opt.addHistoryTime,this),this.isPause=!1}pause(){this.isPause=!0}recovery(){this.isPause=!1}clearHistory(){this.history=[],this.activeHistoryIndex=0,this.mindMap.emit("back_forward",0,0)}registerShortcutKeys(){this.mindMap.keyCommand.addShortcut("Control+z",()=>{this.mindMap.execCommand("BACK")}),this.mindMap.keyCommand.addShortcut("Control+y",()=>{this.mindMap.execCommand("FORWARD")})}exec(t,...e){if(this.commands[t]){if(this.commands[t].forEach(t=>{t(...e)}),this.mindMap.emit("afterExecCommand",t,...e),["BACK","FORWARD","SET_NODE_ACTIVE","CLEAR_ACTIVE_NODE"].includes(t))return;this.addHistory()}}add(t,e){this.commands[t]?this.commands[t].push(e):this.commands[t]=[e]}remove(t,e){if(this.commands[t])if(e){let i=this.commands[t].find(t=>t===e);-1!==i&&this.commands[t].splice(i,1)}else this.commands[t]=[],delete this.commands[t]}addHistory(){if(this.mindMap.opt.readonly||this.isPause)return;this.mindMap.emit("beforeAddHistory");const t=this.history.length>0?this.history[this.activeHistoryIndex]:null,e=this.getCopyData(),i=JSON.stringify(e);t&&t===i||(this.emitDataUpdatesEvent(t,i),this.history=this.history.slice(0,this.activeHistoryIndex+1),this.history.push(i),this.history.length>this.mindMap.opt.maxHistoryCount&&this.history.shift(),this.activeHistoryIndex=this.history.length-1,this.mindMap.emit("data_change",e),this.mindMap.emit("back_forward",this.activeHistoryIndex,this.history.length))}back(t=1){if(!this.mindMap.opt.readonly&&this.activeHistoryIndex-t>=0){const e=this.history[this.activeHistoryIndex];this.activeHistoryIndex-=t,this.mindMap.emit("back_forward",this.activeHistoryIndex,this.history.length);const i=this.history[this.activeHistoryIndex],n=JSON.parse(i);return this.emitDataUpdatesEvent(e,i),n}}forward(t=1){if(this.mindMap.opt.readonly)return;let e=this.history.length;if(this.activeHistoryIndex+t<=e-1){const e=this.history[this.activeHistoryIndex];this.activeHistoryIndex+=t,this.mindMap.emit("back_forward",this.activeHistoryIndex,this.history.length);const i=this.history[this.activeHistoryIndex],n=JSON.parse(i);return this.emitDataUpdatesEvent(e,i),n}}getCopyData(){if(!this.mindMap.renderer.renderTree)return null;const t=Si({},this.mindMap.renderer.renderTree,!0);return t.smmVersion=os.rE,t}removeDataUid(t){t=Di(t);let e=t=>{delete t.data.uid,t.children&&t.children.length>0&&t.children.forEach(t=>{e(t)})};return e(t),t}emitDataUpdatesEvent(t,e){try{const i="data_change_detail";if(this.mindMap.event.listenerCount(i)>0&&t&&e){const n=JSON.parse(t),s=JSON.parse(e),o=Di(ln(n)),r=Di(ln(s)),a=[],h=(t,e)=>(t.children&&t.children.length>0&&t.children.forEach((i,n)=>{t.children[n]="string"==typeof i?e[i]:e[i.data.uid],h(t.children[n],e)}),t);Object.keys(r).forEach(t=>{o[t]?en(o[t],r[t])||a.push({action:"update",oldData:h(o[t],o),data:h(r[t],r)}):a.push({action:"create",data:h(r[t],r)})}),Object.keys(o).forEach(t=>{r[t]||a.push({action:"delete",data:h(o[t],o)})}),this.mindMap.emit(i,a)}}catch(t){this.mindMap.opt.errorHandler(u,t)}}};const as=class{constructor(){this.has={},this.queue=[],this.nextTick=function(t,e){let i=!1,n=null,s=()=>{i=!1,e?t.call(e):t()};if("undefined"!=typeof MutationObserver){let t=1,e=new MutationObserver(s),i=document.createTextNode(t);e.observe(i,{characterData:!0}),n=function(){t=(t+1)%2,i.data=t}}else n=setTimeout;return function(){i||(i=!0,n(s,0))}}(this.flush,this)}push(t,e){this.has[t]?this.replaceTask(t,e):(this.has[t]=!0,this.queue.push({name:t,fn:e}),this.nextTick())}replaceTask(t,e){const i=this.queue.findIndex(e=>e.name===t);-1!==i&&(this.queue[i]={name:t,fn:e})}flush(){let t=this.queue.slice(0);this.queue=[],t.forEach(({name:t,fn:e})=>{this.has[t]=!1,e()})}},hs={el:null,data:null,viewData:null,readonly:!1,layout:n.LAYOUT.LOGICAL_STRUCTURE,fishboneDeg:45,theme:"default",themeConfig:{},scaleRatio:.2,translateRatio:1,minZoomRatio:20,maxZoomRatio:400,customCheckIsTouchPad:null,mouseScaleCenterUseMousePosition:!0,maxTag:5,expandBtnSize:20,imgTextMargin:5,textContentMargin:2,customNoteContentShow:null,textAutoWrapWidth:500,customHandleMousewheel:null,mousewheelAction:n.MOUSE_WHEEL_ACTION.MOVE,mousewheelMoveStep:100,mousewheelZoomActionReverse:!0,defaultInsertSecondLevelNodeText:"二级节点",defaultInsertBelowSecondLevelNodeText:"分支主题",expandBtnStyle:{color:"#808080",fill:"#fff",fontSize:13,strokeColor:"#333333"},expandBtnIcon:{open:"",close:""},expandBtnNumHandler:null,isShowExpandNum:!0,enableShortcutOnlyWhenMouseInSvg:!0,customCheckEnableShortcut:null,initRootNodePosition:null,nodeTextEditZIndex:3e3,nodeNoteTooltipZIndex:3e3,isEndNodeTextEditOnClickOuter:!0,maxHistoryCount:500,alwaysShowExpandBtn:!1,notShowExpandBtn:!1,iconList:[],maxNodeCacheCount:1e3,fitPadding:50,enableCtrlKeyNodeSelection:!0,useLeftKeySelectionRightKeyDrag:!1,beforeTextEdit:null,isUseCustomNodeContent:!1,customCreateNodeContent:null,customInnerElsAppendTo:null,enableAutoEnterTextEditWhenKeydown:!1,autoEmptyTextWhenKeydownEnterEdit:!1,customHandleClipboardText:null,disableMouseWheelZoom:!1,errorHandler:(t,e)=>{console.error(t,e)},enableDblclickBackToRootNode:!1,hoverRectColor:"rgb(94, 200, 248)",hoverRectPadding:2,selectTextOnEnterEditText:!1,deleteNodeActive:!0,fit:!1,tagsColorMap:{},cooperateStyle:{avatarSize:22,fontSize:12},onlyOneEnableActiveNodeOnCooperate:!1,defaultGeneralizationText:"概要",handleIsSplitByWrapOnPasteCreateNewNode:null,addHistoryTime:100,isDisableDrag:!1,createNewNodeBehavior:n.CREATE_NEW_NODE_BEHAVIOR.DEFAULT,defaultNodeImage:"",isLimitMindMapInCanvas:!1,handleNodePasteImg:null,customCreateNodePath:null,customCreateNodePolygon:null,customTransformNodeLinePath:null,beforeShortcutRun:null,resetScaleOnMoveNodeToCenter:!1,createNodePrefixContent:null,createNodePostfixContent:null,disabledClipboard:!1,customHyperlinkJump:null,openPerformance:!1,performanceConfig:{time:250,padding:100,removeNodeWhenOutCanvas:!0},emptyTextMeasureHeightText:"abc123我和你",openRealtimeRenderOnNodeTextEdit:!1,mousedownEventPreventDefault:!1,onlyPasteTextWhenHasImgAndText:!0,enableDragModifyNodeWidth:!0,minNodeTextModifyWidth:20,maxNodeTextModifyWidth:-1,customHandleLine:null,addHistoryOnInit:!0,noteIcon:{icon:"",style:{}},hyperlinkIcon:{icon:"",style:{}},attachmentIcon:{icon:"",style:{}},isShowCreateChildBtnIcon:!0,quickCreateChildBtnIcon:{icon:"",style:{}},customQuickCreateChildBtnClick:null,addCustomContentToNode:null,enableInheritAncestorLineStyle:!0,selectTranslateStep:3,selectTranslateLimit:20,enableFreeDrag:!1,autoMoveWhenMouseInEdgeOnDrag:!0,dragMultiNodeRectConfig:{width:40,height:20,fill:"rgb(94, 200, 248)"},dragPlaceholderRectFill:"rgb(94, 200, 248)",dragPlaceholderLineConfig:{color:"rgb(94, 200, 248)",width:2},dragOpacityConfig:{cloneNodeOpacity:.5,beingDragNodeOpacity:.3},handleDragCloneNode:null,beforeDragEnd:null,beforeDragStart:null,watermarkConfig:{onlyExport:!1,text:"",lineSpacing:100,textSpacing:100,angle:30,textStyle:{color:"#999",opacity:.5,fontSize:14},belowNode:!1},exportPaddingX:10,exportPaddingY:10,resetCss:"\n * {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n }\n ",minExportImgCanvasScale:2,addContentToHeader:null,addContentToFooter:null,handleBeingExportSvg:null,maxCanvasSize:16384,defaultAssociativeLineText:"关联",associativeLineIsAlwaysAboveNode:!0,associativeLineInitPointsPosition:{from:"",to:""},enableAdjustAssociativeLinePoints:!0,beforeAssociativeLineConnection:null,disableTouchZoom:!1,minTouchZoomScale:20,maxTouchZoomScale:-1,isLimitMindMapInCanvasWhenHasScrollbar:!0,isOnlySearchCurrentRenderNodes:!1,beforeCooperateUpdate:null,rainbowLinesConfig:{open:!1,colorsList:[]},demonstrateConfig:null,enableEditFormulaInRichTextEdit:!0,katexFontPath:"https://unpkg.com/katex@0.16.11/dist/",getKatexOutputType:null,transformRichTextOnEnterEdit:null,beforeHideRichTextEdit:null,outerFramePaddingX:10,outerFramePaddingY:10,defaultOuterFrameText:"外框",onlyPainterNodeCustomStyles:!1,beforeDeleteNodeImg:null,imgResizeBtnSize:25,minImgResizeWidth:50,minImgResizeHeight:50,maxImgResizeWidthInheritTheme:!1,maxImgResizeWidth:1/0,maxImgResizeHeight:1/0,customDeleteBtnInnerHTML:"",customResizeBtnInnerHTML:""};class ls{constructor(t={}){if(ls.instanceCount++,this.opt=this.handleOpt(_()(hs,t)),this.opt.data=this.handleData(this.opt.data),this.el=this.opt.el,!this.el)throw new Error("缺少容器元素el");this.getElRectInfo(),this.initWidth=this.width,this.initHeight=this.height,this.cssEl=null,this.cssTextMap={},this.nodeInnerPrefixList=[],this.nodeInnerPostfixList=[],this.editNodeClassList=[],this.extendShapeList=[],this.initContainer(),this.initTheme(),this.initCache(),ls.pluginList.filter(t=>t.preload).forEach(t=>{this.initPlugin(t)}),this.event=new v({mindMap:this}),this.keyCommand=new ss({mindMap:this}),this.command=new rs({mindMap:this}),this.renderer=new ts({mindMap:this}),this.view=new f({mindMap:this}),this.batchExecution=new as,ls.pluginList.filter(t=>!t.preload).forEach(t=>{this.initPlugin(t)}),this.addCss(),this.render(this.opt.fit?()=>this.view.fit():()=>{}),this.opt.addHistoryOnInit&&this.opt.data&&this.command.addHistory()}handleOpt(t){return o.includes(t.layout)||(t.layout=n.LAYOUT.LOGICAL_STRUCTURE),t.theme=t.theme&&es[t.theme]?t.theme:"default",t}handleData(t){return Hi(t)||Object.keys(t).length<=0?null:((t=Di(t||{})).data&&!t.data.expand&&(t.data.expand=!0),Xi([t],!1,null,!0),t)}initContainer(){const{associativeLineIsAlwaysAboveNode:t}=this.opt;this.el.classList.add("smm-mind-map-container");const e=()=>{this.associativeLineDraw=this.draw.group(),this.associativeLineDraw.addClass("smm-associative-line-container")};this.svg=Ni().addTo(this.el).size(this.width,this.height),this.draw=this.svg.group(),this.draw.addClass("smm-container"),this.lineDraw=this.draw.group(),this.lineDraw.addClass("smm-line-container"),t||e(),this.nodeDraw=this.draw.group(),this.nodeDraw.addClass("smm-node-container"),t&&e(),this.otherDraw=this.draw.group(),this.otherDraw.addClass("smm-other-container")}clearDraw(){this.lineDraw.clear(),this.associativeLineDraw.clear(),this.nodeDraw.clear(),this.otherDraw.clear()}appendCss(t,e){this.cssTextMap[t]=e,this.removeCss(),this.addCss()}removeAppendCss(t){this.cssTextMap[t]&&(delete this.cssTextMap[t],this.removeCss(),this.addCss())}joinCss(){return"\n /* 鼠标hover和激活时渲染的矩形 */\n .smm-hover-node{\n display: none;\n opacity: 0.6;\n stroke-width: 1;\n }\n\n .smm-node:not(.smm-node-dragging):hover .smm-hover-node{\n display: block;\n }\n\n .smm-node.active .smm-hover-node, .smm-node-highlight .smm-hover-node{\n display: block;\n opacity: 1;\n stroke-width: 2;\n }\n\n .smm-text-node-wrap, .smm-expand-btn-text {\n user-select: none;\n }\n"+Object.keys(this.cssTextMap).map(t=>this.cssTextMap[t]).join("\n")}addCss(){this.cssEl=document.createElement("style"),this.cssEl.type="text/css",this.cssEl.innerHTML=this.joinCss(),document.head.appendChild(this.cssEl)}removeCss(){this.cssEl&&document.head.removeChild(this.cssEl)}checkEditNodeClassIndex(t){return this.editNodeClassList.findIndex(e=>e===t)}addEditNodeClass(t){-1===this.checkEditNodeClassIndex(t)&&this.editNodeClassList.push(t)}deleteEditNodeClass(t){const e=this.checkEditNodeClassIndex(t);-1!==e&&this.editNodeClassList.splice(e,1)}render(t,e=""){this.initTheme(),this.renderer.render(t,e)}reRender(t,e=""){this.renderer.reRender=!0,this.renderer.clearCache(),this.clearDraw(),this.render(t,e)}getElRectInfo(){if(this.elRect=this.el.getBoundingClientRect(),this.width=this.elRect.width,this.height=this.elRect.height,this.width<=0||this.height<=0)throw new Error("容器元素el的宽高不能为0")}resize(){const t=this.width,e=this.height;this.getElRectInfo(),this.svg.size(this.width,this.height),t===this.width&&e===this.height||this.demonstrate&&this.demonstrate.isInDemonstrate||this.render(),this.emit("resize")}on(t,e){this.event.on(t,e)}emit(t,...e){this.event.emit(t,...e)}off(t,e){this.event.off(t,e)}initCache(){this.commonCaches={measureCustomNodeContentSizeEl:null,measureRichtextNodeTextSizeEl:null}}initTheme(){this.themeConfig=fn(es[this.opt.theme]||es.default,this.opt.themeConfig),vn.setBackgroundStyle(this.el,this.themeConfig)}setTheme(t,e=!1){this.execCommand("CLEAR_ACTIVE_NODE"),this.opt.theme=t,e||this.render(null,n.CHANGE_THEME),this.emit("view_theme_change",t)}getTheme(){return this.opt.theme}setThemeConfig(t,e=!1){const i=((t,e)=>{const i={};return Object.keys(e).forEach(n=>{const s=t[n],o=e[n];if(Pi(s)===Pi(o)){if("Object"===Pi(s)){if(JSON.stringify(s)!==JSON.stringify(o))return void(i[n]=o)}else if(s!==o)return void(i[n]=o)}else i[n]=o}),i})(this.themeConfig,t);if(this.opt.themeConfig=t,!e){const t=(t=>{let e=Object.keys(t);for(let t=0;t<e.length;t++)if(!Ti.find(i=>i===e[t]))return!1;return!0})(i);this.render(null,t?"":n.CHANGE_THEME)}}getCustomThemeConfig(){return this.opt.themeConfig}getThemeConfig(t){return void 0===t?this.themeConfig:this.themeConfig[t]}getConfig(t){return void 0===t?this.opt:this.opt[t]}updateConfig(t={}){this.emit("before_update_config",this.opt);const e={...this.opt};this.opt=this.handleOpt(_().all([hs,this.opt,t])),this.emit("after_update_config",this.opt,e)}getLayout(){return this.opt.layout}setLayout(t,e=!1){o.includes(t)||(t=n.LAYOUT.LOGICAL_STRUCTURE),this.opt.layout=t,this.view.reset(),this.renderer.setLayout(),e||this.render(null,n.CHANGE_LAYOUT),this.emit("layout_change",t)}execCommand(...t){this.command.exec(...t)}updateData(t){t=this.handleData(t),this.emit("before_update_data",t),this.renderer.setData(t),this.render(),this.command.addHistory(),this.emit("update_data",t)}setData(t){t=this.handleData(t),this.emit("before_set_data",t),this.opt.data=t,this.execCommand("CLEAR_ACTIVE_NODE"),this.command.clearHistory(),this.command.addHistory(),this.renderer.setData(t),this.reRender(),this.emit("set_data",t)}setFullData(t){t.root&&this.setData(t.root),t.layout&&this.setLayout(t.layout),t.theme&&(t.theme.template&&this.setTheme(t.theme.template),t.theme.config&&this.setThemeConfig(t.theme.config)),t.view&&this.view.setTransformData(t.view)}getData(t){let e=this.command.getCopyData(),i={};return i=t?{layout:this.getLayout(),root:e,theme:{template:this.getTheme(),config:this.getCustomThemeConfig()},view:this.view.getTransformData()}:e,Di(i)}async export(...t){try{if(!this.doExport)throw new Error("请注册Export插件!");return await this.doExport.export(...t)}catch(t){this.opt.errorHandler(c,t)}}toPos(t,e){return{x:t-this.elRect.left,y:e-this.elRect.top}}setMode(t){if(![n.MODE.READONLY,n.MODE.EDIT].includes(t))return;const e=t===n.MODE.READONLY;e!==this.opt.readonly&&(e&&(this.renderer.textEdit.isShowTextEdit()&&(this.renderer.textEdit.hideEditTextBox(),this.command.originAddHistory()),this.execCommand("CLEAR_ACTIVE_NODE")),this.opt.readonly=e,!e&&this.command.history.length<=0&&this.command.originAddHistory(),this.emit("mode_change",t))}getSvgData({paddingX:t=0,paddingY:e=0,ignoreWatermark:i=!1,addContentToHeader:n,addContentToFooter:s,node:o}={}){const{watermarkConfig:r,openPerformance:a}=this.opt;a&&this.renderer.forceLoadNode(o);const{cssTextList:h,header:l,headerHeight:d,footer:c,footerHeight:u}=(({addContentToHeader:t,addContentToFooter:e})=>{const i=[];let n=null,s=0,o=null,r=0;const a=(t,e)=>{if("function"==typeof t){const n=t();if(!n)return;const{el:s,cssText:o,height:r}=n;s instanceof HTMLElement&&(pn(s),e(cn({el:s,height:r}),r)),o&&i.push(o)}};return a(t,(t,e)=>{n=t,s=e}),a(e,(t,e)=>{o=t,r=e}),{cssTextList:i,header:n,headerHeight:s,footer:o,footerHeight:r}})({addContentToHeader:n,addContentToFooter:s}),p=this.svg,m=this.draw,f=p.width(),g=p.height(),x=m.transform(),w=this.elRect;m.scale(1/x.scaleX,1/x.scaleY);const v=m.rbox();let y=null;o&&(y=dn(o,v.x,v.y,t,e));v.width+=2*t,v.height+=2*e+0+d+u,m.translate(t,e),p.size(v.width,v.height),m.translate(-v.x+w.left,-v.y+w.top);let _=p.clone();const M=this.watermark&&this.watermark.hasWatermark();if(!i&&M){this.watermark.isInExport=!0;const{onlyExport:t}=r;v.width>f||v.height>g?(this.width=v.width,this.height=v.height,this.watermark.onResize(),_=p.clone(),this.width=f,this.height=g,this.watermark.onResize()):t&&(this.watermark.onResize(),_=p.clone()),t&&this.watermark.clear(),this.watermark.isInExport=!1}[this.joinCss(),...h].forEach(t=>{_.add(Ni(`<style>${t}</style>`))}),l&&d>0&&(_.findOne(".smm-container").translate(0,d),l.width(v.width),l.y(e),_.add(l,0)),c&&u>0&&(c.width(v.width),c.y(v.height-e-u),_.add(c));const E=p.find("defs"),N=_.find("defs");return E.forEach((t,e)=>{const i=N[e];if(!i)return;const n=t.children(),s=i.children();for(let t=0;t<n.length;t++){const e=n[t],i=s[t];e&&i&&i.attr("id",e.attr("id"))}}),p.size(f,g),m.transform(x),{svg:_,svgHTML:_.svg(),clipData:y,rect:{...v,ratio:v.width/v.height},origWidth:f,origHeight:g,scaleX:x.scaleX,scaleY:x.scaleY}}addShape(t){if(!t)return;this.extendShapeList.find(e=>e.name===t.name)||this.extendShapeList.push(t)}removeShape(t){const e=this.extendShapeList.findIndex(e=>e.name===t);-1!==e&&this.extendShapeList.splice(e,1)}getSvgObjects(){return{SVG:Ni,G:xi,Rect:Ke}}addPlugin(t,e){-1===ls.hasPlugin(t)&&ls.usePlugin(t,e),this.initPlugin(t)}removePlugin(t){let e=ls.hasPlugin(t);-1!==e&&(ls.pluginList.splice(e,1),this[t.instanceName]&&(this[t.instanceName].beforePluginRemove&&this[t.instanceName].beforePluginRemove(),delete this[t.instanceName]))}initPlugin(t){this[t.instanceName]||(this[t.instanceName]=new t({mindMap:this,pluginOpt:t.pluginOpt}))}destroy(){this.emit("beforeDestroy"),this.renderer.textEdit.hideEditTextBox(),this.renderer.textEdit.removeTextEditEl(),[...ls.pluginList].forEach(t=>{this[t.instanceName]&&this[t.instanceName].beforePluginDestroy&&this[t.instanceName].beforePluginDestroy(),this[t.instanceName]=null}),this.event.unbind(),this.svg.remove(),vn.removeBackgroundStyle(this.el),this.el.classList.remove("smm-mind-map-container"),this.el.innerHTML="",this.el=null,this.removeCss(),ls.instanceCount--}}let ds=[];ls.extendNodeDataNoStylePropList=(t=[])=>{ds.push(...t),r.push(...t)},ls.resetNodeDataNoStylePropList=()=>{ds.forEach(t=>{const e=r.findIndex(e=>e===t);-1!==e&&r.splice(e,1)}),ds=[]},ls.pluginList=[],ls.usePlugin=(t,e={})=>(-1!==ls.hasPlugin(t)||(t.pluginOpt=e,ls.pluginList.push(t)),ls),ls.hasPlugin=t=>ls.pluginList.findIndex(e=>e===t),ls.instanceCount=0,ls.defineTheme=(t,e={})=>{if(es[t])return new Error("该主题名称已存在");es[t]=fn(bi,e)},ls.removeTheme=t=>{es[t]&&(es[t]=null)};const cs=ls},88781(t,e,i){var n=i(85072),s=i.n(n),o=i(97825),r=i.n(o),a=i(77659),h=i.n(a),l=i(55056),d=i.n(l),c=i(10540),u=i.n(c),p=i(41113),m=i.n(p),f=i(4926),g={};g.styleTagTransform=m(),g.setAttributes=d(),g.insert=h().bind(null,"head"),g.domAPI=r(),g.insertStyleElement=u();s()(f.A,g),f.A&&f.A.locals&&f.A.locals}}]);