@marimo-team/frontend 0.14.5 → 0.14.7

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 (152) hide show
  1. package/dist/assets/{ConnectedDataExplorerComponent-Cd8OePNL.js → ConnectedDataExplorerComponent-BdQW-gwg.js} +2 -2
  2. package/dist/assets/{ImageComparisonComponent-BaounMqb.js → ImageComparisonComponent-BIBfPPuz.js} +1 -1
  3. package/dist/assets/{VegaLite-BThNu01F.js → VegaLite-GVqhQbDs.js} +4 -4
  4. package/dist/assets/_baseEach-DtUk7cBy.js +1 -0
  5. package/dist/assets/_baseMap-zXgLfXUO.js +1 -0
  6. package/dist/assets/_baseUniq-BuhsH2Gw.js +1 -0
  7. package/dist/assets/_createAggregator-CCTzDuxr.js +1 -0
  8. package/dist/assets/{any-language-editor-BwrzhW9s.js → any-language-editor-C16cE8Sc.js} +1 -1
  9. package/dist/assets/architectureDiagram-IEHRJDOE-A6ZwaSTM.js +36 -0
  10. package/dist/assets/{blockDiagram-JOT3LUYC-D5tDE05w.js → blockDiagram-JOT3LUYC-CGgOmZ6q.js} +1 -1
  11. package/dist/assets/{c4Diagram-VJAJSXHY-D2EVIFPE.js → c4Diagram-VJAJSXHY-21Uq3Dg7.js} +1 -1
  12. package/dist/assets/channel-BAvRfsic.js +1 -0
  13. package/dist/assets/{chunk-4BMEZGHF-CADZZMGY.js → chunk-4BMEZGHF-DLcqo-x9.js} +1 -1
  14. package/dist/assets/{chunk-A2AXSNBT-CfEZbXlN.js → chunk-A2AXSNBT-ClwGv4ej.js} +1 -1
  15. package/dist/assets/{chunk-AEK57VVT-BQlr57ae.js → chunk-AEK57VVT-DXU_Eu70.js} +1 -1
  16. package/dist/assets/{chunk-D6G4REZN-CcnlvIsn.js → chunk-D6G4REZN-CdJcmRtu.js} +1 -1
  17. package/dist/assets/{chunk-RZ5BOZE2-BQ7pJY-M.js → chunk-RZ5BOZE2-BjqSfcQg.js} +1 -1
  18. package/dist/assets/{chunk-XZIHB7SX-BuiqX9Aw.js → chunk-XZIHB7SX-XW5eSvGR.js} +1 -1
  19. package/dist/assets/{circle-play-Bxr4QwIa.js → circle-play-CxSSFgdO.js} +1 -1
  20. package/dist/assets/classDiagram-GIVACNV2-CK_KuAvj.js +1 -0
  21. package/dist/assets/classDiagram-v2-COTLJTTW-CK_KuAvj.js +1 -0
  22. package/dist/assets/clone-Cho8ekmu.js +1 -0
  23. package/dist/assets/compile-DnHFbvjV.js +3 -0
  24. package/dist/assets/cytoscape.esm-UYyVlru8.js +10 -0
  25. package/dist/assets/dagre-OKDRZEBW-D75XrYB0.js +4 -0
  26. package/dist/assets/{data-editor-rukfgV6c.js → data-editor-DOJVcXVY.js} +29 -29
  27. package/dist/assets/diagram-SSKATNLV-BTff3VIp.js +43 -0
  28. package/dist/assets/diagram-VNBRO52H-LnHBmUxh.js +24 -0
  29. package/dist/assets/edit-page-CM7Z6do2.js +144 -0
  30. package/dist/assets/{erDiagram-Q7BY3M3F-DjRQ_etL.js → erDiagram-Q7BY3M3F-DPuHBTLc.js} +5 -5
  31. package/dist/assets/{flowDiagram-4HSFHLVR-CeFuqcbl.js → flowDiagram-4HSFHLVR-DyJAEc--.js} +1 -1
  32. package/dist/assets/{ganttDiagram-APWFNJXF-ByTTg73J.js → ganttDiagram-APWFNJXF-CuNs6GsL.js} +3 -3
  33. package/dist/assets/gitGraphDiagram-7IBYFJ6S-B8RjSR7Y.js +65 -0
  34. package/dist/assets/{graph-DNRj_GT8.js → graph-DfO_3t8f.js} +1 -1
  35. package/dist/assets/{home-page-PkK2rOsj.js → home-page-DNroMY0L.js} +3 -3
  36. package/dist/assets/index-7fo-bO1b.css +1 -0
  37. package/dist/assets/{index-CfDLJuRd.js → index-BGV64nJA.js} +1 -1
  38. package/dist/assets/{index-BLEx_XmQ.js → index-BLhUKus3.js} +1 -1
  39. package/dist/assets/index-BWJPY1iW.js +1 -0
  40. package/dist/assets/index-BWLBzXjn.js +1 -0
  41. package/dist/assets/{index-RvePnxjR.js → index-BWRJuAq5.js} +1 -1
  42. package/dist/assets/{index-D8_wOrAS.js → index-B_2-onrX.js} +1 -1
  43. package/dist/assets/{index-C4zeEHGR.js → index-Bhxhykeb.js} +1 -1
  44. package/dist/assets/{index-Dqale_LJ.js → index-BkG9SImY.js} +1 -1
  45. package/dist/assets/{index-unIeHe6K.js → index-CFqFJcvv.js} +1 -1
  46. package/dist/assets/index-CSVJhvPj.js +1 -0
  47. package/dist/assets/index-ChJ6MVK4.js +1 -0
  48. package/dist/assets/{index-DmNMHBkh.js → index-Ckjkc_22.js} +1 -1
  49. package/dist/assets/{index-BgLoMO85.js → index-Cu42ofZQ.js} +1 -1
  50. package/dist/assets/{index-CTa3U4be.js → index-DLz0HVCk.js} +1 -1
  51. package/dist/assets/{index-Cxi469si.js → index-DhhQl-OJ.js} +1 -1
  52. package/dist/assets/index-DlQKt39j.js +507 -0
  53. package/dist/assets/{index-C15JFT_c.js → index-DyyuCOy7.js} +1 -1
  54. package/dist/assets/{index-DFFTVPrS.js → index-TycZpXM8.js} +1 -1
  55. package/dist/assets/{index-DUYmArTl.js → index-cyG9KqdX.js} +1 -1
  56. package/dist/assets/infoDiagram-PH2N3AL5-Dh9JpBgC.js +2 -0
  57. package/dist/assets/{journeyDiagram-U35MCT3I-BmSbbdbZ.js → journeyDiagram-U35MCT3I-D0z4rhTA.js} +6 -6
  58. package/dist/assets/{kanban-definition-NDS4AKOZ-wn14wHeG.js → kanban-definition-NDS4AKOZ-0mBTqXp8.js} +1 -1
  59. package/dist/assets/{katex-BsnJiHtx.js → katex-LV4FpwlL.js} +26 -26
  60. package/dist/assets/layout-DJLBNR64.js +1 -0
  61. package/dist/assets/{mermaid-D9TTXveo.js → mermaid-BgCxVw2J.js} +30 -30
  62. package/dist/assets/{mhchem-C_nT2J_7.js → mhchem-DFRC5yJY.js} +1 -1
  63. package/dist/assets/min-DTkssK90.js +1 -0
  64. package/dist/assets/mindmap-definition-ALO5MXBD-LCnJv2FH.js +95 -0
  65. package/dist/assets/pieDiagram-IB7DONF6-B4-ZhPJf.js +30 -0
  66. package/dist/assets/{pug-_kJOm_E2.js → pug-BTvK5tSS.js} +1 -1
  67. package/dist/assets/{quadrantDiagram-7GDLP6J5-CgsaXk59.js → quadrantDiagram-7GDLP6J5-DKB7UlL9.js} +4 -4
  68. package/dist/assets/{radar-MK3ICKWK-DpxMM0Qw.js → radar-MK3ICKWK-FyfW4UKQ.js} +33 -33
  69. package/dist/assets/react-plotly-Cq47c_fP.js +4074 -0
  70. package/dist/assets/{requirementDiagram-KVF5MWMF-rD1Xtg0C.js → requirementDiagram-KVF5MWMF-Kkhfwu0p.js} +1 -1
  71. package/dist/assets/run-page-GUDMiyk3.js +1 -0
  72. package/dist/assets/sankeyDiagram-QLVOVGJD-BZ4xSd22.js +10 -0
  73. package/dist/assets/save-worker-Bm3BvYpV.js +1 -0
  74. package/dist/assets/{sequenceDiagram-X6HHIX6F-DOr7opXd.js → sequenceDiagram-X6HHIX6F-Dj06cd6Y.js} +1 -1
  75. package/dist/assets/{shutdown-button-CNHmqusO.js → shutdown-button-D56z6eVx.js} +13 -13
  76. package/dist/assets/slides-component-CDu4ZSzE.js +1 -0
  77. package/dist/assets/sortBy-CDXarBT-.js +1 -0
  78. package/dist/assets/stateDiagram-DGXRK772-j06SHL3p.js +1 -0
  79. package/dist/assets/stateDiagram-v2-YXO3MK2T-DuT23alC.js +1 -0
  80. package/dist/assets/storage-Dz2fUeWr.js +27 -0
  81. package/dist/assets/{terminal-C9AM9Ufr.js → terminal-DZLrrul6.js} +1 -1
  82. package/dist/assets/{timeline-definition-BDJGKUSR-BQjvgKyo.js → timeline-definition-BDJGKUSR-BQyRy1s7.js} +1 -1
  83. package/dist/assets/tracing-CDEeF17U.js +2 -0
  84. package/dist/assets/transform-C5148Z0S.js +1 -0
  85. package/dist/assets/vega-component-CUPLtVbZ.js +1 -0
  86. package/dist/assets/worker-CJ614ngf.js +1 -0
  87. package/dist/assets/worker-C_uu8t-8.js +1 -0
  88. package/dist/assets/{xychartDiagram-VJFVF3MP-D6G5YXc9.js → xychartDiagram-VJFVF3MP--8SfVdNT.js} +3 -3
  89. package/dist/index.html +2 -2
  90. package/package.json +3 -4
  91. package/dist/assets/_baseEach-AMF-7d2J.js +0 -1
  92. package/dist/assets/_baseMap-CtLb1-E9.js +0 -1
  93. package/dist/assets/_baseUniq-DmGC0EvQ.js +0 -1
  94. package/dist/assets/_createAggregator-nAviCUEI.js +0 -1
  95. package/dist/assets/arc-ZB5pDULS.js +0 -1
  96. package/dist/assets/architectureDiagram-IEHRJDOE-DELkI6j7.js +0 -36
  97. package/dist/assets/channel-Bsq91aIP.js +0 -1
  98. package/dist/assets/classDiagram-GIVACNV2-uoJGO3VQ.js +0 -1
  99. package/dist/assets/classDiagram-v2-COTLJTTW-uoJGO3VQ.js +0 -1
  100. package/dist/assets/clone-Yb_iboYC.js +0 -1
  101. package/dist/assets/colors-bszWmPJw.js +0 -1
  102. package/dist/assets/compile-D71Q4H3R.js +0 -10
  103. package/dist/assets/cytoscape.esm-C11VZyMT.js +0 -10
  104. package/dist/assets/dagre-OKDRZEBW-DarkVs9y.js +0 -4
  105. package/dist/assets/diagram-SSKATNLV-D4OT3ifx.js +0 -43
  106. package/dist/assets/diagram-VNBRO52H-BUvUJmDs.js +0 -24
  107. package/dist/assets/edit-page-DCGyJssF.js +0 -144
  108. package/dist/assets/gitGraphDiagram-7IBYFJ6S-DzfS7fCx.js +0 -65
  109. package/dist/assets/index-9wcEzf6r.js +0 -1
  110. package/dist/assets/index-BVt8Dtzn.css +0 -1
  111. package/dist/assets/index-CsvxUqpa.js +0 -1
  112. package/dist/assets/index-OXxabNuL.js +0 -1
  113. package/dist/assets/index-g8LxgBK2.js +0 -500
  114. package/dist/assets/index-rl-fndXu.js +0 -1
  115. package/dist/assets/infoDiagram-PH2N3AL5-C2E2NFkV.js +0 -2
  116. package/dist/assets/init-DLRA0X12.js +0 -1
  117. package/dist/assets/layout-BVHTL_z5.js +0 -1
  118. package/dist/assets/linear-BCVS3STf.js +0 -1
  119. package/dist/assets/min-DHnRmciI.js +0 -1
  120. package/dist/assets/mindmap-definition-ALO5MXBD-a8I3m_98.js +0 -95
  121. package/dist/assets/ordinal-DDUp3AbE.js +0 -1
  122. package/dist/assets/pieDiagram-IB7DONF6-DUDocndn.js +0 -30
  123. package/dist/assets/range-CtcPcB_L.js +0 -1
  124. package/dist/assets/react-plotly-DvB1Xb5a.js +0 -4074
  125. package/dist/assets/run-page-B0Hx0CMC.js +0 -1
  126. package/dist/assets/sankeyDiagram-QLVOVGJD-C0DUUjQG.js +0 -10
  127. package/dist/assets/save-worker-BDcz2hJn.js +0 -1
  128. package/dist/assets/slides-component-c1dc16jM.js +0 -1
  129. package/dist/assets/sortBy-ozOfSDdJ.js +0 -1
  130. package/dist/assets/stateDiagram-DGXRK772-Ez0EwtuH.js +0 -1
  131. package/dist/assets/stateDiagram-v2-YXO3MK2T-DzizQt5g.js +0 -1
  132. package/dist/assets/step-BwsUM5iJ.js +0 -1
  133. package/dist/assets/storage-DmZs9OBM.js +0 -27
  134. package/dist/assets/time-Bto2Pv9Y.js +0 -1
  135. package/dist/assets/timer-B5eI7Tcu.js +0 -1
  136. package/dist/assets/tracing-42w5ahGA.js +0 -2
  137. package/dist/assets/transform-BzDy4yXW.js +0 -1
  138. package/dist/assets/vega-component-DPpmBYts.js +0 -1
  139. package/dist/assets/worker-BoGc2ntD.js +0 -1
  140. package/dist/assets/worker-D9uxCaRv.js +0 -1
  141. package/dist/assets/zoom-COrs4lFh.js +0 -1
  142. /package/dist/assets/{clojure-DR_hEDJv.js → clojure-DiuoqK-z.js} +0 -0
  143. /package/dist/assets/{dylan-CHJ5qNM_.js → dylan-DkEP81N9.js} +0 -0
  144. /package/dist/assets/{elm-D7xaZ7Da.js → elm-DompmV0j.js} +0 -0
  145. /package/dist/assets/{forth-Dri_5nFc.js → forth-POgR1ypr.js} +0 -0
  146. /package/dist/assets/{gas-5kEe4nk0.js → gas-bV0CklSb.js} +0 -0
  147. /package/dist/assets/{haskell-CmdsSjFB.js → haskell-CLQs6EAM.js} +0 -0
  148. /package/dist/assets/{javascript-D48wDJXV.js → javascript-BpzJj0-u.js} +0 -0
  149. /package/dist/assets/{ntriples-FFvkTduk.js → ntriples-BSwWqoLa.js} +0 -0
  150. /package/dist/assets/{stylus-OdhglgkO.js → stylus-Bdo_Aemu.js} +0 -0
  151. /package/dist/assets/{toml-BQXy8elZ.js → toml-wcPdHu67.js} +0 -0
  152. /package/dist/assets/{web-vitals-Buym0gfC.js → web-vitals-qptAEYGW.js} +0 -0
@@ -1 +1 @@
1
- import y from"./katex-BsnJiHtx.js";y.__defineMacro("\\ce",function(t){return k(t.consumeArgs(1)[0],"ce")}),y.__defineMacro("\\pu",function(t){return k(t.consumeArgs(1)[0],"pu")}),y.__defineMacro("\\tripledash","{\\vphantom{-}\\raisebox{2.56mu}{$\\mkern2mu\\tiny\\text{-}\\mkern1mu\\text{-}\\mkern1mu\\text{-}\\mkern2mu$}}");var k=function(t,e){for(var a="",n=t.length&&t[t.length-1].loc.start,r=t.length-1;r>=0;r--)t[r].loc.start>n&&(a+=" ",n=t[r].loc.start),a+=t[r].text,n+=t[r].text.length;return c.go(o.go(a,e))},o={go:function(t,e){if(!t)return[];e===void 0&&(e="ce");var a,n="0",r={};r.parenthesisLevel=0,t=(t=(t=t.replace(/\n/g," ")).replace(/[\u2212\u2013\u2014\u2010]/g,"-")).replace(/[\u2026]/g,"...");for(var i=10,u=[];;){a!==t?(i=10,a=t):i--;var _=o.stateMachines[e],p=_.transitions[n]||_.transitions["*"];t:for(var m=0;m<p.length;m++){var h=o.patterns.match_(p[m].pattern,t);if(h){for(var s=p[m].task,d=0;d<s.action_.length;d++){var f;if(_.actions[s.action_[d].type_])f=_.actions[s.action_[d].type_](r,h.match_,s.action_[d].option);else{if(!o.actions[s.action_[d].type_])throw["MhchemBugA","mhchem bug A. Please report. ("+s.action_[d].type_+")"];f=o.actions[s.action_[d].type_](r,h.match_,s.action_[d].option)}o.concatArray(u,f)}if(n=s.nextState||n,!(t.length>0))return u;if(s.revisit||(t=h.remainder),!s.toContinue)break t}}if(i<=0)throw["MhchemBugU","mhchem bug U. Please report."]}},concatArray:function(t,e){if(e)if(Array.isArray(e))for(var a=0;a<e.length;a++)t.push(e[a]);else t.push(e)},patterns:{patterns:{empty:/^$/,else:/^./,else2:/^./,space:/^\s/,"space A":/^\s(?=[A-Z\\$])/,space$:/^\s$/,"a-z":/^[a-z]/,x:/^x/,x$:/^x$/,i$:/^i$/,letters:/^(?:[a-zA-Z\u03B1-\u03C9\u0391-\u03A9?@]|(?:\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))))+/,"\\greek":/^\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))/,"one lowercase latin letter $":/^(?:([a-z])(?:$|[^a-zA-Z]))$/,"$one lowercase latin letter$ $":/^\$(?:([a-z])(?:$|[^a-zA-Z]))\$$/,"one lowercase greek letter $":/^(?:\$?[\u03B1-\u03C9]\$?|\$?\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega)\s*\$?)(?:\s+|\{\}|(?![a-zA-Z]))$/,digits:/^[0-9]+/,"-9.,9":/^[+\-]?(?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))/,"-9.,9 no missing 0":/^[+\-]?[0-9]+(?:[.,][0-9]+)?/,"(-)(9.,9)(e)(99)":function(t){var e=t.match(/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))?(\((?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))\))?(?:([eE]|\s*(\*|x|\\times|\u00D7)\s*10\^)([+\-]?[0-9]+|\{[+\-]?[0-9]+\}))?/);return e&&e[0]?{match_:e.splice(1),remainder:t.substr(e[0].length)}:null},"(-)(9)^(-9)":function(t){var e=t.match(/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+)?)\^([+\-]?[0-9]+|\{[+\-]?[0-9]+\})/);return e&&e[0]?{match_:e.splice(1),remainder:t.substr(e[0].length)}:null},"state of aggregation $":function(t){var e=o.patterns.findObserveGroups(t,"",/^\([a-z]{1,3}(?=[\),])/,")","");if(e&&e.remainder.match(/^($|[\s,;\)\]\}])/))return e;var a=t.match(/^(?:\((?:\\ca\s?)?\$[amothc]\$\))/);return a?{match_:a[0],remainder:t.substr(a[0].length)}:null},"_{(state of aggregation)}$":/^_\{(\([a-z]{1,3}\))\}/,"{[(":/^(?:\\\{|\[|\()/,")]}":/^(?:\)|\]|\\\})/,", ":/^[,;]\s*/,",":/^[,;]/,".":/^[.]/,". ":/^([.\u22C5\u00B7\u2022])\s*/,"...":/^\.\.\.(?=$|[^.])/,"* ":/^([*])\s*/,"^{(...)}":function(t){return o.patterns.findObserveGroups(t,"^{","","","}")},"^($...$)":function(t){return o.patterns.findObserveGroups(t,"^","$","$","")},"^a":/^\^([0-9]+|[^\\_])/,"^\\x{}{}":function(t){return o.patterns.findObserveGroups(t,"^",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"^\\x{}":function(t){return o.patterns.findObserveGroups(t,"^",/^\\[a-zA-Z]+\{/,"}","")},"^\\x":/^\^(\\[a-zA-Z]+)\s*/,"^(-1)":/^\^(-?\d+)/,"'":/^'/,"_{(...)}":function(t){return o.patterns.findObserveGroups(t,"_{","","","}")},"_($...$)":function(t){return o.patterns.findObserveGroups(t,"_","$","$","")},_9:/^_([+\-]?[0-9]+|[^\\])/,"_\\x{}{}":function(t){return o.patterns.findObserveGroups(t,"_",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"_\\x{}":function(t){return o.patterns.findObserveGroups(t,"_",/^\\[a-zA-Z]+\{/,"}","")},"_\\x":/^_(\\[a-zA-Z]+)\s*/,"^_":/^(?:\^(?=_)|\_(?=\^)|[\^_]$)/,"{}":/^\{\}/,"{...}":function(t){return o.patterns.findObserveGroups(t,"","{","}","")},"{(...)}":function(t){return o.patterns.findObserveGroups(t,"{","","","}")},"$...$":function(t){return o.patterns.findObserveGroups(t,"","$","$","")},"${(...)}$":function(t){return o.patterns.findObserveGroups(t,"${","","","}$")},"$(...)$":function(t){return o.patterns.findObserveGroups(t,"$","","","$")},"=<>":/^[=<>]/,"#":/^[#\u2261]/,"+":/^\+/,"-$":/^-(?=[\s_},;\]/]|$|\([a-z]+\))/,"-9":/^-(?=[0-9])/,"- orbital overlap":/^-(?=(?:[spd]|sp)(?:$|[\s,;\)\]\}]))/,"-":/^-/,"pm-operator":/^(?:\\pm|\$\\pm\$|\+-|\+\/-)/,operator:/^(?:\+|(?:[\-=<>]|<<|>>|\\approx|\$\\approx\$)(?=\s|$|-?[0-9]))/,arrowUpDown:/^(?:v|\(v\)|\^|\(\^\))(?=$|[\s,;\)\]\}])/,"\\bond{(...)}":function(t){return o.patterns.findObserveGroups(t,"\\bond{","","","}")},"->":/^(?:<->|<-->|->|<-|<=>>|<<=>|<=>|[\u2192\u27F6\u21CC])/,CMT:/^[CMT](?=\[)/,"[(...)]":function(t){return o.patterns.findObserveGroups(t,"[","","","]")},"1st-level escape":/^(&|\\\\|\\hline)\s*/,"\\,":/^(?:\\[,\ ;:])/,"\\x{}{}":function(t){return o.patterns.findObserveGroups(t,"",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"\\x{}":function(t){return o.patterns.findObserveGroups(t,"",/^\\[a-zA-Z]+\{/,"}","")},"\\ca":/^\\ca(?:\s+|(?![a-zA-Z]))/,"\\x":/^(?:\\[a-zA-Z]+\s*|\\[_&{}%])/,orbital:/^(?:[0-9]{1,2}[spdfgh]|[0-9]{0,2}sp)(?=$|[^a-zA-Z])/,others:/^[\/~|]/,"\\frac{(...)}":function(t){return o.patterns.findObserveGroups(t,"\\frac{","","","}","{","","","}")},"\\overset{(...)}":function(t){return o.patterns.findObserveGroups(t,"\\overset{","","","}","{","","","}")},"\\underset{(...)}":function(t){return o.patterns.findObserveGroups(t,"\\underset{","","","}","{","","","}")},"\\underbrace{(...)}":function(t){return o.patterns.findObserveGroups(t,"\\underbrace{","","","}_","{","","","}")},"\\color{(...)}0":function(t){return o.patterns.findObserveGroups(t,"\\color{","","","}")},"\\color{(...)}{(...)}1":function(t){return o.patterns.findObserveGroups(t,"\\color{","","","}","{","","","}")},"\\color(...){(...)}2":function(t){return o.patterns.findObserveGroups(t,"\\color","\\","",/^(?=\{)/,"{","","","}")},"\\ce{(...)}":function(t){return o.patterns.findObserveGroups(t,"\\ce{","","","}")},oxidation$:/^(?:[+-][IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"d-oxidation$":/^(?:[+-]?\s?[IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"roman numeral":/^[IVX]+/,"1/2$":/^[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+(?:\$[a-z]\$|[a-z])?$/,amount:function(t){var e;if(e=t.match(/^(?:(?:(?:\([+\-]?[0-9]+\/[0-9]+\)|[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+|[+\-]?[0-9]+[.,][0-9]+|[+\-]?\.[0-9]+|[+\-]?[0-9]+)(?:[a-z](?=\s*[A-Z]))?)|[+\-]?[a-z](?=\s*[A-Z])|\+(?!\s))/))return{match_:e[0],remainder:t.substr(e[0].length)};var a=o.patterns.findObserveGroups(t,"","$","$","");return a&&(e=a.match_.match(/^\$(?:\(?[+\-]?(?:[0-9]*[a-z]?[+\-])?[0-9]*[a-z](?:[+\-][0-9]*[a-z]?)?\)?|\+|-)\$$/))?{match_:e[0],remainder:t.substr(e[0].length)}:null},amount2:function(t){return this.amount(t)},"(KV letters),":/^(?:[A-Z][a-z]{0,2}|i)(?=,)/,formula$:function(t){if(t.match(/^\([a-z]+\)$/))return null;var e=t.match(/^(?:[a-z]|(?:[0-9\ \+\-\,\.\(\)]+[a-z])+[0-9\ \+\-\,\.\(\)]*|(?:[a-z][0-9\ \+\-\,\.\(\)]+)+[a-z]?)$/);return e?{match_:e[0],remainder:t.substr(e[0].length)}:null},uprightEntities:/^(?:pH|pOH|pC|pK|iPr|iBu)(?=$|[^a-zA-Z])/,"/":/^\s*(\/)\s*/,"//":/^\s*(\/\/)\s*/,"*":/^\s*[*.]\s*/},findObserveGroups:function(t,e,a,n,r,i,u,_,p,m){var h=function(x,l){if(typeof l=="string")return x.indexOf(l)!==0?null:l;var g=x.match(l);return g?g[0]:null},s=h(t,e);if(s===null||(t=t.substr(s.length),(s=h(t,a))===null))return null;var d=function(x,l,g){for(var b=0;l<x.length;){var q=x.charAt(l),S=h(x.substr(l),g);if(S!==null&&b===0)return{endMatchBegin:l,endMatchEnd:l+S.length};if(q==="{")b++;else if(q==="}"){if(b===0)throw["ExtraCloseMissingOpen","Extra close brace or missing open brace"];b--}l++}return null}(t,s.length,n||r);if(d===null)return null;var f=t.substring(0,n?d.endMatchEnd:d.endMatchBegin);if(i||u){var v=this.findObserveGroups(t.substr(d.endMatchEnd),i,u,_,p);if(v===null)return null;var $=[f,v.match_];return{match_:m?$.join(""):$,remainder:v.remainder}}return{match_:f,remainder:t.substr(d.endMatchEnd)}},match_:function(t,e){var a=o.patterns.patterns[t];if(a===void 0)throw["MhchemBugP","mhchem bug P. Please report. ("+t+")"];if(typeof a=="function")return o.patterns.patterns[t](e);var n=e.match(a);return n?{match_:n[2]?[n[1],n[2]]:n[1]?n[1]:n[0],remainder:e.substr(n[0].length)}:null}},actions:{"a=":function(t,e){t.a=(t.a||"")+e},"b=":function(t,e){t.b=(t.b||"")+e},"p=":function(t,e){t.p=(t.p||"")+e},"o=":function(t,e){t.o=(t.o||"")+e},"q=":function(t,e){t.q=(t.q||"")+e},"d=":function(t,e){t.d=(t.d||"")+e},"rm=":function(t,e){t.rm=(t.rm||"")+e},"text=":function(t,e){t.text_=(t.text_||"")+e},insert:function(t,e,a){return{type_:a}},"insert+p1":function(t,e,a){return{type_:a,p1:e}},"insert+p1+p2":function(t,e,a){return{type_:a,p1:e[0],p2:e[1]}},copy:function(t,e){return e},rm:function(t,e){return{type_:"rm",p1:e||""}},text:function(t,e){return o.go(e,"text")},"{text}":function(t,e){var a=["{"];return o.concatArray(a,o.go(e,"text")),a.push("}"),a},"tex-math":function(t,e){return o.go(e,"tex-math")},"tex-math tight":function(t,e){return o.go(e,"tex-math tight")},bond:function(t,e,a){return{type_:"bond",kind_:a||e}},"color0-output":function(t,e){return{type_:"color0",color:e[0]}},ce:function(t,e){return o.go(e)},"1/2":function(t,e){var a=[];e.match(/^[+\-]/)&&(a.push(e.substr(0,1)),e=e.substr(1));var n=e.match(/^([0-9]+|\$[a-z]\$|[a-z])\/([0-9]+)(\$[a-z]\$|[a-z])?$/);return n[1]=n[1].replace(/\$/g,""),a.push({type_:"frac",p1:n[1],p2:n[2]}),n[3]&&(n[3]=n[3].replace(/\$/g,""),a.push({type_:"tex-math",p1:n[3]})),a},"9,9":function(t,e){return o.go(e,"9,9")}},createTransitions:function(t){var e,a,n,r,i={};for(e in t)for(a in t[e])for(n=a.split("|"),t[e][a].stateArray=n,r=0;r<n.length;r++)i[n[r]]=[];for(e in t)for(a in t[e])for(n=t[e][a].stateArray||[],r=0;r<n.length;r++){var u=t[e][a];if(u.action_){u.action_=[].concat(u.action_);for(var _=0;_<u.action_.length;_++)typeof u.action_[_]=="string"&&(u.action_[_]={type_:u.action_[_]})}else u.action_=[];for(var p=e.split("|"),m=0;m<p.length;m++)if(n[r]==="*")for(var h in i)i[h].push({pattern:p[m],task:u});else i[n[r]].push({pattern:p[m],task:u})}return i},stateMachines:{}};o.stateMachines={ce:{transitions:o.createTransitions({empty:{"*":{action_:"output"}},else:{"0|1|2":{action_:"beginsWithBond=false",revisit:!0,toContinue:!0}},oxidation$:{0:{action_:"oxidation-output"}},CMT:{r:{action_:"rdt=",nextState:"rt"},rd:{action_:"rqt=",nextState:"rdt"}},arrowUpDown:{"0|1|2|as":{action_:["sb=false","output","operator"],nextState:"1"}},uprightEntities:{"0|1|2":{action_:["o=","output"],nextState:"1"}},orbital:{"0|1|2|3":{action_:"o=",nextState:"o"}},"->":{"0|1|2|3":{action_:"r=",nextState:"r"},"a|as":{action_:["output","r="],nextState:"r"},"*":{action_:["output","r="],nextState:"r"}},"+":{o:{action_:"d= kv",nextState:"d"},"d|D":{action_:"d=",nextState:"d"},q:{action_:"d=",nextState:"qd"},"qd|qD":{action_:"d=",nextState:"qd"},dq:{action_:["output","d="],nextState:"d"},3:{action_:["sb=false","output","operator"],nextState:"0"}},amount:{"0|2":{action_:"a=",nextState:"a"}},"pm-operator":{"0|1|2|a|as":{action_:["sb=false","output",{type_:"operator",option:"\\pm"}],nextState:"0"}},operator:{"0|1|2|a|as":{action_:["sb=false","output","operator"],nextState:"0"}},"-$":{"o|q":{action_:["charge or bond","output"],nextState:"qd"},d:{action_:"d=",nextState:"d"},D:{action_:["output",{type_:"bond",option:"-"}],nextState:"3"},q:{action_:"d=",nextState:"qd"},qd:{action_:"d=",nextState:"qd"},"qD|dq":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},"-9":{"3|o":{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"3"}},"- orbital overlap":{o:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},d:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"}},"-":{"0|1|2":{action_:[{type_:"output",option:1},"beginsWithBond=true",{type_:"bond",option:"-"}],nextState:"3"},3:{action_:{type_:"bond",option:"-"}},a:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},as:{action_:[{type_:"output",option:2},{type_:"bond",option:"-"}],nextState:"3"},b:{action_:"b="},o:{action_:{type_:"- after o/d",option:!1},nextState:"2"},q:{action_:{type_:"- after o/d",option:!1},nextState:"2"},"d|qd|dq":{action_:{type_:"- after o/d",option:!0},nextState:"2"},"D|qD|p":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},amount2:{"1|3":{action_:"a=",nextState:"a"}},letters:{"0|1|2|3|a|as|b|p|bp|o":{action_:"o=",nextState:"o"},"q|dq":{action_:["output","o="],nextState:"o"},"d|D|qd|qD":{action_:"o after d",nextState:"o"}},digits:{o:{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},q:{action_:["output","o="],nextState:"o"},a:{action_:"o=",nextState:"o"}},"space A":{"b|p|bp":{}},space:{a:{nextState:"as"},0:{action_:"sb=false"},"1|2":{action_:"sb=true"},"r|rt|rd|rdt|rdq":{action_:"output",nextState:"0"},"*":{action_:["output","sb=true"],nextState:"1"}},"1st-level escape":{"1|2":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}]},"*":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}],nextState:"0"}},"[(...)]":{"r|rt":{action_:"rd=",nextState:"rd"},"rd|rdt":{action_:"rq=",nextState:"rdq"}},"...":{"o|d|D|dq|qd|qD":{action_:["output",{type_:"bond",option:"..."}],nextState:"3"},"*":{action_:[{type_:"output",option:1},{type_:"insert",option:"ellipsis"}],nextState:"1"}},". |* ":{"*":{action_:["output",{type_:"insert",option:"addition compound"}],nextState:"1"}},"state of aggregation $":{"*":{action_:["output","state of aggregation"],nextState:"1"}},"{[(":{"a|as|o":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"0|1|2|3":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"*":{action_:["output","o=","output","parenthesisLevel++"],nextState:"2"}},")]}":{"0|1|2|3|b|p|bp|o":{action_:["o=","parenthesisLevel--"],nextState:"o"},"a|as|d|D|q|qd|qD|dq":{action_:["output","o=","parenthesisLevel--"],nextState:"o"}},", ":{"*":{action_:["output","comma"],nextState:"0"}},"^_":{"*":{}},"^{(...)}|^($...$)":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"D"},q:{action_:"d=",nextState:"qD"},"d|D|qd|qD|dq":{action_:["output","d="],nextState:"D"}},"^a|^\\x{}{}|^\\x{}|^\\x|'":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"d"},q:{action_:"d=",nextState:"qd"},"d|qd|D|qD":{action_:"d="},dq:{action_:["output","d="],nextState:"d"}},"_{(state of aggregation)}$":{"d|D|q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"_{(...)}|_($...$)|_9|_\\x{}{}|_\\x{}|_\\x":{"0|1|2|as":{action_:"p=",nextState:"p"},b:{action_:"p=",nextState:"bp"},"3|o":{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},"q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"=<>":{"0|1|2|3|a|as|o|q|d|D|qd|qD|dq":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"#":{"0|1|2|3|a|as|o":{action_:[{type_:"output",option:2},{type_:"bond",option:"#"}],nextState:"3"}},"{}":{"*":{action_:{type_:"output",option:1},nextState:"1"}},"{...}":{"0|1|2|3|a|as|b|p|bp":{action_:"o=",nextState:"o"},"o|d|D|q|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"$...$":{a:{action_:"a="},"0|1|2|3|as|b|p|bp|o":{action_:"o=",nextState:"o"},"as|o":{action_:"o="},"q|d|D|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"\\bond{(...)}":{"*":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"\\frac{(...)}":{"*":{action_:[{type_:"output",option:1},"frac-output"],nextState:"3"}},"\\overset{(...)}":{"*":{action_:[{type_:"output",option:2},"overset-output"],nextState:"3"}},"\\underset{(...)}":{"*":{action_:[{type_:"output",option:2},"underset-output"],nextState:"3"}},"\\underbrace{(...)}":{"*":{action_:[{type_:"output",option:2},"underbrace-output"],nextState:"3"}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:[{type_:"output",option:2},"color-output"],nextState:"3"}},"\\color{(...)}0":{"*":{action_:[{type_:"output",option:2},"color0-output"]}},"\\ce{(...)}":{"*":{action_:[{type_:"output",option:2},"ce"],nextState:"3"}},"\\,":{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"1"}},"\\x{}{}|\\x{}|\\x":{"0|1|2|3|a|as|b|p|bp|o|c0":{action_:["o=","output"],nextState:"3"},"*":{action_:["output","o=","output"],nextState:"3"}},others:{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"3"}},else2:{a:{action_:"a to o",nextState:"o",revisit:!0},as:{action_:["output","sb=true"],nextState:"1",revisit:!0},"r|rt|rd|rdt|rdq":{action_:["output"],nextState:"0",revisit:!0},"*":{action_:["output","copy"],nextState:"3"}}}),actions:{"o after d":function(t,e){var a;if((t.d||"").match(/^[0-9]+$/)){var n=t.d;t.d=void 0,a=this.output(t),t.b=n}else a=this.output(t);return o.actions["o="](t,e),a},"d= kv":function(t,e){t.d=e,t.dType="kv"},"charge or bond":function(t,e){if(t.beginsWithBond){var a=[];return o.concatArray(a,this.output(t)),o.concatArray(a,o.actions.bond(t,e,"-")),a}t.d=e},"- after o/d":function(t,e,a){var n=o.patterns.match_("orbital",t.o||""),r=o.patterns.match_("one lowercase greek letter $",t.o||""),i=o.patterns.match_("one lowercase latin letter $",t.o||""),u=o.patterns.match_("$one lowercase latin letter$ $",t.o||""),_=e==="-"&&(n&&n.remainder===""||r||i||u);!_||t.a||t.b||t.p||t.d||t.q||n||!i||(t.o="$"+t.o+"$");var p=[];return _?(o.concatArray(p,this.output(t)),p.push({type_:"hyphen"})):(n=o.patterns.match_("digits",t.d||""),a&&n&&n.remainder===""?(o.concatArray(p,o.actions["d="](t,e)),o.concatArray(p,this.output(t))):(o.concatArray(p,this.output(t)),o.concatArray(p,o.actions.bond(t,e,"-")))),p},"a to o":function(t){t.o=t.a,t.a=void 0},"sb=true":function(t){t.sb=!0},"sb=false":function(t){t.sb=!1},"beginsWithBond=true":function(t){t.beginsWithBond=!0},"beginsWithBond=false":function(t){t.beginsWithBond=!1},"parenthesisLevel++":function(t){t.parenthesisLevel++},"parenthesisLevel--":function(t){t.parenthesisLevel--},"state of aggregation":function(t,e){return{type_:"state of aggregation",p1:o.go(e,"o")}},comma:function(t,e){var a=e.replace(/\s*$/,"");return a!==e&&t.parenthesisLevel===0?{type_:"comma enumeration L",p1:a}:{type_:"comma enumeration M",p1:a}},output:function(t,e,a){var n,r,i;t.r?(r=t.rdt==="M"?o.go(t.rd,"tex-math"):t.rdt==="T"?[{type_:"text",p1:t.rd||""}]:o.go(t.rd),i=t.rqt==="M"?o.go(t.rq,"tex-math"):t.rqt==="T"?[{type_:"text",p1:t.rq||""}]:o.go(t.rq),n={type_:"arrow",r:t.r,rd:r,rq:i}):(n=[],(t.a||t.b||t.p||t.o||t.q||t.d||a)&&(t.sb&&n.push({type_:"entitySkip"}),t.o||t.q||t.d||t.b||t.p||a===2?t.o||t.q||t.d||!t.b&&!t.p?t.o&&t.dType==="kv"&&o.patterns.match_("d-oxidation$",t.d||"")?t.dType="oxidation":t.o&&t.dType==="kv"&&!t.q&&(t.dType=void 0):(t.o=t.a,t.d=t.b,t.q=t.p,t.a=t.b=t.p=void 0):(t.o=t.a,t.a=void 0),n.push({type_:"chemfive",a:o.go(t.a,"a"),b:o.go(t.b,"bd"),p:o.go(t.p,"pq"),o:o.go(t.o,"o"),q:o.go(t.q,"pq"),d:o.go(t.d,t.dType==="oxidation"?"oxidation":"bd"),dType:t.dType})));for(var u in t)u!=="parenthesisLevel"&&u!=="beginsWithBond"&&delete t[u];return n},"oxidation-output":function(t,e){var a=["{"];return o.concatArray(a,o.go(e,"oxidation")),a.push("}"),a},"frac-output":function(t,e){return{type_:"frac-ce",p1:o.go(e[0]),p2:o.go(e[1])}},"overset-output":function(t,e){return{type_:"overset",p1:o.go(e[0]),p2:o.go(e[1])}},"underset-output":function(t,e){return{type_:"underset",p1:o.go(e[0]),p2:o.go(e[1])}},"underbrace-output":function(t,e){return{type_:"underbrace",p1:o.go(e[0]),p2:o.go(e[1])}},"color-output":function(t,e){return{type_:"color",color1:e[0],color2:o.go(e[1])}},"r=":function(t,e){t.r=e},"rdt=":function(t,e){t.rdt=e},"rd=":function(t,e){t.rd=e},"rqt=":function(t,e){t.rqt=e},"rq=":function(t,e){t.rq=e},operator:function(t,e,a){return{type_:"operator",kind_:a||e}}}},a:{transitions:o.createTransitions({empty:{"*":{}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"1",revisit:!0}},"$(...)$":{"*":{action_:"tex-math tight",nextState:"1"}},",":{"*":{action_:{type_:"insert",option:"commaDecimal"}}},else2:{"*":{action_:"copy"}}}),actions:{}},o:{transitions:o.createTransitions({empty:{"*":{}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"1",revisit:!0}},letters:{"*":{action_:"rm"}},"\\ca":{"*":{action_:{type_:"insert",option:"circa"}}},"\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"{text}"}},else2:{"*":{action_:"copy"}}}),actions:{}},text:{transitions:o.createTransitions({empty:{"*":{action_:"output"}},"{...}":{"*":{action_:"text="}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"\\greek":{"*":{action_:["output","rm"]}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:["output","copy"]}},else:{"*":{action_:"text="}}}),actions:{output:function(t){if(t.text_){var e={type_:"text",p1:t.text_};for(var a in t)delete t[a];return e}}}},pq:{transitions:o.createTransitions({empty:{"*":{}},"state of aggregation $":{"*":{action_:"state of aggregation"}},i$:{0:{nextState:"!f",revisit:!0}},"(KV letters),":{0:{action_:"rm",nextState:"0"}},formula$:{0:{nextState:"f",revisit:!0}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"!f",revisit:!0}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"a-z":{f:{action_:"tex-math"}},letters:{"*":{action_:"rm"}},"-9.,9":{"*":{action_:"9,9"}},",":{"*":{action_:{type_:"insert+p1",option:"comma enumeration S"}}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:"color-output"}},"\\color{(...)}0":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"state of aggregation":function(t,e){return{type_:"state of aggregation subscript",p1:o.go(e,"o")}},"color-output":function(t,e){return{type_:"color",color1:e[0],color2:o.go(e[1],"pq")}}}},bd:{transitions:o.createTransitions({empty:{"*":{}},x$:{0:{nextState:"!f",revisit:!0}},formula$:{0:{nextState:"f",revisit:!0}},else:{0:{nextState:"!f",revisit:!0}},"-9.,9 no missing 0":{"*":{action_:"9,9"}},".":{"*":{action_:{type_:"insert",option:"electron dot"}}},"a-z":{f:{action_:"tex-math"}},x:{"*":{action_:{type_:"insert",option:"KV x"}}},letters:{"*":{action_:"rm"}},"'":{"*":{action_:{type_:"insert",option:"prime"}}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:"color-output"}},"\\color{(...)}0":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"color-output":function(t,e){return{type_:"color",color1:e[0],color2:o.go(e[1],"bd")}}}},oxidation:{transitions:o.createTransitions({empty:{"*":{}},"roman numeral":{"*":{action_:"roman-numeral"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},else:{"*":{action_:"copy"}}}),actions:{"roman-numeral":function(t,e){return{type_:"roman numeral",p1:e||""}}}},"tex-math":{transitions:o.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},else:{"*":{action_:"o="}}}),actions:{output:function(t){if(t.o){var e={type_:"tex-math",p1:t.o};for(var a in t)delete t[a];return e}}}},"tex-math tight":{transitions:o.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},"-|+":{"*":{action_:"tight operator"}},else:{"*":{action_:"o="}}}),actions:{"tight operator":function(t,e){t.o=(t.o||"")+"{"+e+"}"},output:function(t){if(t.o){var e={type_:"tex-math",p1:t.o};for(var a in t)delete t[a];return e}}}},"9,9":{transitions:o.createTransitions({empty:{"*":{}},",":{"*":{action_:"comma"}},else:{"*":{action_:"copy"}}}),actions:{comma:function(){return{type_:"commaDecimal"}}}},pu:{transitions:o.createTransitions({empty:{"*":{action_:"output"}},space$:{"*":{action_:["output","space"]}},"{[(|)]}":{"0|a":{action_:"copy"}},"(-)(9)^(-9)":{0:{action_:"number^",nextState:"a"}},"(-)(9.,9)(e)(99)":{0:{action_:"enumber",nextState:"a"}},space:{"0|a":{}},"pm-operator":{"0|a":{action_:{type_:"operator",option:"\\pm"},nextState:"0"}},operator:{"0|a":{action_:"copy",nextState:"0"}},"//":{d:{action_:"o=",nextState:"/"}},"/":{d:{action_:"o=",nextState:"/"}},"{...}|else":{"0|d":{action_:"d=",nextState:"d"},a:{action_:["space","d="],nextState:"d"},"/|q":{action_:"q=",nextState:"q"}}}),actions:{enumber:function(t,e){var a=[];return e[0]==="+-"||e[0]==="+/-"?a.push("\\pm "):e[0]&&a.push(e[0]),e[1]&&(o.concatArray(a,o.go(e[1],"pu-9,9")),e[2]&&(e[2].match(/[,.]/)?o.concatArray(a,o.go(e[2],"pu-9,9")):a.push(e[2])),e[3]=e[4]||e[3],e[3]&&(e[3]=e[3].trim(),e[3]==="e"||e[3].substr(0,1)==="*"?a.push({type_:"cdot"}):a.push({type_:"times"}))),e[3]&&a.push("10^{"+e[5]+"}"),a},"number^":function(t,e){var a=[];return e[0]==="+-"||e[0]==="+/-"?a.push("\\pm "):e[0]&&a.push(e[0]),o.concatArray(a,o.go(e[1],"pu-9,9")),a.push("^{"+e[2]+"}"),a},operator:function(t,e,a){return{type_:"operator",kind_:a||e}},space:function(){return{type_:"pu-space-1"}},output:function(t){var e,a=o.patterns.match_("{(...)}",t.d||"");a&&a.remainder===""&&(t.d=a.match_);var n=o.patterns.match_("{(...)}",t.q||"");if(n&&n.remainder===""&&(t.q=n.match_),t.d&&(t.d=t.d.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),t.d=t.d.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F")),t.q){t.q=t.q.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),t.q=t.q.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F");var r={d:o.go(t.d,"pu"),q:o.go(t.q,"pu")};t.o==="//"?e={type_:"pu-frac",p1:r.d,p2:r.q}:(e=r.d,r.d.length>1||r.q.length>1?e.push({type_:" / "}):e.push({type_:"/"}),o.concatArray(e,r.q))}else e=o.go(t.d,"pu-2");for(var i in t)delete t[i];return e}}},"pu-2":{transitions:o.createTransitions({empty:{"*":{action_:"output"}},"*":{"*":{action_:["output","cdot"],nextState:"0"}},"\\x":{"*":{action_:"rm="}},space:{"*":{action_:["output","space"],nextState:"0"}},"^{(...)}|^(-1)":{1:{action_:"^(-1)"}},"-9.,9":{0:{action_:"rm=",nextState:"0"},1:{action_:"^(-1)",nextState:"0"}},"{...}|else":{"*":{action_:"rm=",nextState:"1"}}}),actions:{cdot:function(){return{type_:"tight cdot"}},"^(-1)":function(t,e){t.rm+="^{"+e+"}"},space:function(){return{type_:"pu-space-2"}},output:function(t){var e=[];if(t.rm){var a=o.patterns.match_("{(...)}",t.rm||"");e=a&&a.remainder===""?o.go(a.match_,"pu"):{type_:"rm",p1:t.rm}}for(var n in t)delete t[n];return e}}},"pu-9,9":{transitions:o.createTransitions({empty:{0:{action_:"output-0"},o:{action_:"output-o"}},",":{0:{action_:["output-0","comma"],nextState:"o"}},".":{0:{action_:["output-0","copy"],nextState:"o"}},else:{"*":{action_:"text="}}}),actions:{comma:function(){return{type_:"commaDecimal"}},"output-0":function(t){var e=[];if(t.text_=t.text_||"",t.text_.length>4){var a=t.text_.length%3;a===0&&(a=3);for(var n=t.text_.length-3;n>0;n-=3)e.push(t.text_.substr(n,3)),e.push({type_:"1000 separator"});e.push(t.text_.substr(0,a)),e.reverse()}else e.push(t.text_);for(var r in t)delete t[r];return e},"output-o":function(t){var e=[];if(t.text_=t.text_||"",t.text_.length>4){for(var a=t.text_.length-3,n=0;n<a;n+=3)e.push(t.text_.substr(n,3)),e.push({type_:"1000 separator"});e.push(t.text_.substr(n))}else e.push(t.text_);for(var r in t)delete t[r];return e}}}};var c={go:function(t,e){if(!t)return"";for(var a="",n=!1,r=0;r<t.length;r++){var i=t[r];typeof i=="string"?a+=i:(a+=c._go2(i),i.type_==="1st-level escape"&&(n=!0))}return e||n||!a||(a="{"+a+"}"),a},_goInner:function(t){return t&&c.go(t,!0)},_go2:function(t){var e;switch(t.type_){case"chemfive":e="";var a={a:c._goInner(t.a),b:c._goInner(t.b),p:c._goInner(t.p),o:c._goInner(t.o),q:c._goInner(t.q),d:c._goInner(t.d)};a.a&&(a.a.match(/^[+\-]/)&&(a.a="{"+a.a+"}"),e+=a.a+"\\,"),(a.b||a.p)&&(e+="{\\vphantom{X}}",e+="^{\\hphantom{"+(a.b||"")+"}}_{\\hphantom{"+(a.p||"")+"}}",e+="{\\vphantom{X}}",e+="^{\\smash[t]{\\vphantom{2}}\\mathllap{"+(a.b||"")+"}}",e+="_{\\vphantom{2}\\mathllap{\\smash[t]{"+(a.p||"")+"}}}"),a.o&&(a.o.match(/^[+\-]/)&&(a.o="{"+a.o+"}"),e+=a.o),t.dType==="kv"?((a.d||a.q)&&(e+="{\\vphantom{X}}"),a.d&&(e+="^{"+a.d+"}"),a.q&&(e+="_{\\smash[t]{"+a.q+"}}")):t.dType==="oxidation"?(a.d&&(e+="{\\vphantom{X}}",e+="^{"+a.d+"}"),a.q&&(e+="{\\vphantom{X}}",e+="_{\\smash[t]{"+a.q+"}}")):(a.q&&(e+="{\\vphantom{X}}",e+="_{\\smash[t]{"+a.q+"}}"),a.d&&(e+="{\\vphantom{X}}",e+="^{"+a.d+"}"));break;case"rm":case"roman numeral":e="\\mathrm{"+t.p1+"}";break;case"text":t.p1.match(/[\^_]/)?(t.p1=t.p1.replace(" ","~").replace("-","\\text{-}"),e="\\mathrm{"+t.p1+"}"):e="\\text{"+t.p1+"}";break;case"state of aggregation":e="\\mskip2mu "+c._goInner(t.p1);break;case"state of aggregation subscript":e="\\mskip1mu "+c._goInner(t.p1);break;case"bond":if(!(e=c._getBond(t.kind_)))throw["MhchemErrorBond","mhchem Error. Unknown bond type ("+t.kind_+")"];break;case"frac":var n="\\frac{"+t.p1+"}{"+t.p2+"}";e="\\mathchoice{\\textstyle"+n+"}{"+n+"}{"+n+"}{"+n+"}";break;case"pu-frac":var r="\\frac{"+c._goInner(t.p1)+"}{"+c._goInner(t.p2)+"}";e="\\mathchoice{\\textstyle"+r+"}{"+r+"}{"+r+"}{"+r+"}";break;case"tex-math":case"1st-level escape":e=t.p1+" ";break;case"frac-ce":e="\\frac{"+c._goInner(t.p1)+"}{"+c._goInner(t.p2)+"}";break;case"overset":e="\\overset{"+c._goInner(t.p1)+"}{"+c._goInner(t.p2)+"}";break;case"underset":e="\\underset{"+c._goInner(t.p1)+"}{"+c._goInner(t.p2)+"}";break;case"underbrace":e="\\underbrace{"+c._goInner(t.p1)+"}_{"+c._goInner(t.p2)+"}";break;case"color":e="{\\color{"+t.color1+"}{"+c._goInner(t.color2)+"}}";break;case"color0":e="\\color{"+t.color+"}";break;case"arrow":var i={rd:c._goInner(t.rd),rq:c._goInner(t.rq)},u="\\x"+c._getArrow(t.r);i.rq&&(u+="[{"+i.rq+"}]"),e=u+=i.rd?"{"+i.rd+"}":"{}";break;case"operator":e=c._getOperator(t.kind_);break;case"space":e=" ";break;case"entitySkip":case"pu-space-1":e="~";break;case"pu-space-2":e="\\mkern3mu ";break;case"1000 separator":e="\\mkern2mu ";break;case"commaDecimal":e="{,}";break;case"comma enumeration L":e="{"+t.p1+"}\\mkern6mu ";break;case"comma enumeration M":e="{"+t.p1+"}\\mkern3mu ";break;case"comma enumeration S":e="{"+t.p1+"}\\mkern1mu ";break;case"hyphen":e="\\text{-}";break;case"addition compound":e="\\,{\\cdot}\\,";break;case"electron dot":e="\\mkern1mu \\bullet\\mkern1mu ";break;case"KV x":e="{\\times}";break;case"prime":e="\\prime ";break;case"cdot":e="\\cdot ";break;case"tight cdot":e="\\mkern1mu{\\cdot}\\mkern1mu ";break;case"times":e="\\times ";break;case"circa":e="{\\sim}";break;case"^":e="uparrow";break;case"v":e="downarrow";break;case"ellipsis":e="\\ldots ";break;case"/":e="/";break;case" / ":e="\\,/\\,";break;default:throw["MhchemBugT","mhchem bug T. Please report."]}return e},_getArrow:function(t){switch(t){case"->":case"\u2192":case"\u27F6":return"rightarrow";case"<-":return"leftarrow";case"<->":return"leftrightarrow";case"<-->":return"rightleftarrows";case"<=>":case"\u21CC":return"rightleftharpoons";case"<=>>":return"rightequilibrium";case"<<=>":return"leftequilibrium";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getBond:function(t){switch(t){case"-":case"1":return"{-}";case"=":case"2":return"{=}";case"#":case"3":return"{\\equiv}";case"~":return"{\\tripledash}";case"~-":return"{\\mathrlap{\\raisebox{-.1em}{$-$}}\\raisebox{.1em}{$\\tripledash$}}";case"~=":case"~--":return"{\\mathrlap{\\raisebox{-.2em}{$-$}}\\mathrlap{\\raisebox{.2em}{$\\tripledash$}}-}";case"-~-":return"{\\mathrlap{\\raisebox{-.2em}{$-$}}\\mathrlap{\\raisebox{.2em}{$-$}}\\tripledash}";case"...":return"{{\\cdot}{\\cdot}{\\cdot}}";case"....":return"{{\\cdot}{\\cdot}{\\cdot}{\\cdot}}";case"->":return"{\\rightarrow}";case"<-":return"{\\leftarrow}";case"<":return"{<}";case">":return"{>}";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getOperator:function(t){switch(t){case"+":return" {}+{} ";case"-":return" {}-{} ";case"=":return" {}={} ";case"<":return" {}<{} ";case">":return" {}>{} ";case"<<":return" {}\\ll{} ";case">>":return" {}\\gg{} ";case"\\pm":return" {}\\pm{} ";case"\\approx":case"$\\approx$":return" {}\\approx{} ";case"v":case"(v)":return" \\downarrow{} ";case"^":case"(^)":return" \\uparrow{} ";default:throw["MhchemBugT","mhchem bug T. Please report."]}}};
1
+ import y from"./katex-LV4FpwlL.js";y.__defineMacro("\\ce",function(t){return k(t.consumeArgs(1)[0],"ce")}),y.__defineMacro("\\pu",function(t){return k(t.consumeArgs(1)[0],"pu")}),y.__defineMacro("\\tripledash","{\\vphantom{-}\\raisebox{2.56mu}{$\\mkern2mu\\tiny\\text{-}\\mkern1mu\\text{-}\\mkern1mu\\text{-}\\mkern2mu$}}");var k=function(t,e){for(var a="",n=t.length&&t[t.length-1].loc.start,r=t.length-1;r>=0;r--)t[r].loc.start>n&&(a+=" ",n=t[r].loc.start),a+=t[r].text,n+=t[r].text.length;return c.go(o.go(a,e))},o={go:function(t,e){if(!t)return[];e===void 0&&(e="ce");var a,n="0",r={};r.parenthesisLevel=0,t=(t=(t=t.replace(/\n/g," ")).replace(/[\u2212\u2013\u2014\u2010]/g,"-")).replace(/[\u2026]/g,"...");for(var i=10,u=[];;){a!==t?(i=10,a=t):i--;var _=o.stateMachines[e],p=_.transitions[n]||_.transitions["*"];t:for(var m=0;m<p.length;m++){var h=o.patterns.match_(p[m].pattern,t);if(h){for(var s=p[m].task,d=0;d<s.action_.length;d++){var f;if(_.actions[s.action_[d].type_])f=_.actions[s.action_[d].type_](r,h.match_,s.action_[d].option);else{if(!o.actions[s.action_[d].type_])throw["MhchemBugA","mhchem bug A. Please report. ("+s.action_[d].type_+")"];f=o.actions[s.action_[d].type_](r,h.match_,s.action_[d].option)}o.concatArray(u,f)}if(n=s.nextState||n,!(t.length>0))return u;if(s.revisit||(t=h.remainder),!s.toContinue)break t}}if(i<=0)throw["MhchemBugU","mhchem bug U. Please report."]}},concatArray:function(t,e){if(e)if(Array.isArray(e))for(var a=0;a<e.length;a++)t.push(e[a]);else t.push(e)},patterns:{patterns:{empty:/^$/,else:/^./,else2:/^./,space:/^\s/,"space A":/^\s(?=[A-Z\\$])/,space$:/^\s$/,"a-z":/^[a-z]/,x:/^x/,x$:/^x$/,i$:/^i$/,letters:/^(?:[a-zA-Z\u03B1-\u03C9\u0391-\u03A9?@]|(?:\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))))+/,"\\greek":/^\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))/,"one lowercase latin letter $":/^(?:([a-z])(?:$|[^a-zA-Z]))$/,"$one lowercase latin letter$ $":/^\$(?:([a-z])(?:$|[^a-zA-Z]))\$$/,"one lowercase greek letter $":/^(?:\$?[\u03B1-\u03C9]\$?|\$?\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega)\s*\$?)(?:\s+|\{\}|(?![a-zA-Z]))$/,digits:/^[0-9]+/,"-9.,9":/^[+\-]?(?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))/,"-9.,9 no missing 0":/^[+\-]?[0-9]+(?:[.,][0-9]+)?/,"(-)(9.,9)(e)(99)":function(t){var e=t.match(/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))?(\((?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))\))?(?:([eE]|\s*(\*|x|\\times|\u00D7)\s*10\^)([+\-]?[0-9]+|\{[+\-]?[0-9]+\}))?/);return e&&e[0]?{match_:e.splice(1),remainder:t.substr(e[0].length)}:null},"(-)(9)^(-9)":function(t){var e=t.match(/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+)?)\^([+\-]?[0-9]+|\{[+\-]?[0-9]+\})/);return e&&e[0]?{match_:e.splice(1),remainder:t.substr(e[0].length)}:null},"state of aggregation $":function(t){var e=o.patterns.findObserveGroups(t,"",/^\([a-z]{1,3}(?=[\),])/,")","");if(e&&e.remainder.match(/^($|[\s,;\)\]\}])/))return e;var a=t.match(/^(?:\((?:\\ca\s?)?\$[amothc]\$\))/);return a?{match_:a[0],remainder:t.substr(a[0].length)}:null},"_{(state of aggregation)}$":/^_\{(\([a-z]{1,3}\))\}/,"{[(":/^(?:\\\{|\[|\()/,")]}":/^(?:\)|\]|\\\})/,", ":/^[,;]\s*/,",":/^[,;]/,".":/^[.]/,". ":/^([.\u22C5\u00B7\u2022])\s*/,"...":/^\.\.\.(?=$|[^.])/,"* ":/^([*])\s*/,"^{(...)}":function(t){return o.patterns.findObserveGroups(t,"^{","","","}")},"^($...$)":function(t){return o.patterns.findObserveGroups(t,"^","$","$","")},"^a":/^\^([0-9]+|[^\\_])/,"^\\x{}{}":function(t){return o.patterns.findObserveGroups(t,"^",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"^\\x{}":function(t){return o.patterns.findObserveGroups(t,"^",/^\\[a-zA-Z]+\{/,"}","")},"^\\x":/^\^(\\[a-zA-Z]+)\s*/,"^(-1)":/^\^(-?\d+)/,"'":/^'/,"_{(...)}":function(t){return o.patterns.findObserveGroups(t,"_{","","","}")},"_($...$)":function(t){return o.patterns.findObserveGroups(t,"_","$","$","")},_9:/^_([+\-]?[0-9]+|[^\\])/,"_\\x{}{}":function(t){return o.patterns.findObserveGroups(t,"_",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"_\\x{}":function(t){return o.patterns.findObserveGroups(t,"_",/^\\[a-zA-Z]+\{/,"}","")},"_\\x":/^_(\\[a-zA-Z]+)\s*/,"^_":/^(?:\^(?=_)|\_(?=\^)|[\^_]$)/,"{}":/^\{\}/,"{...}":function(t){return o.patterns.findObserveGroups(t,"","{","}","")},"{(...)}":function(t){return o.patterns.findObserveGroups(t,"{","","","}")},"$...$":function(t){return o.patterns.findObserveGroups(t,"","$","$","")},"${(...)}$":function(t){return o.patterns.findObserveGroups(t,"${","","","}$")},"$(...)$":function(t){return o.patterns.findObserveGroups(t,"$","","","$")},"=<>":/^[=<>]/,"#":/^[#\u2261]/,"+":/^\+/,"-$":/^-(?=[\s_},;\]/]|$|\([a-z]+\))/,"-9":/^-(?=[0-9])/,"- orbital overlap":/^-(?=(?:[spd]|sp)(?:$|[\s,;\)\]\}]))/,"-":/^-/,"pm-operator":/^(?:\\pm|\$\\pm\$|\+-|\+\/-)/,operator:/^(?:\+|(?:[\-=<>]|<<|>>|\\approx|\$\\approx\$)(?=\s|$|-?[0-9]))/,arrowUpDown:/^(?:v|\(v\)|\^|\(\^\))(?=$|[\s,;\)\]\}])/,"\\bond{(...)}":function(t){return o.patterns.findObserveGroups(t,"\\bond{","","","}")},"->":/^(?:<->|<-->|->|<-|<=>>|<<=>|<=>|[\u2192\u27F6\u21CC])/,CMT:/^[CMT](?=\[)/,"[(...)]":function(t){return o.patterns.findObserveGroups(t,"[","","","]")},"1st-level escape":/^(&|\\\\|\\hline)\s*/,"\\,":/^(?:\\[,\ ;:])/,"\\x{}{}":function(t){return o.patterns.findObserveGroups(t,"",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"\\x{}":function(t){return o.patterns.findObserveGroups(t,"",/^\\[a-zA-Z]+\{/,"}","")},"\\ca":/^\\ca(?:\s+|(?![a-zA-Z]))/,"\\x":/^(?:\\[a-zA-Z]+\s*|\\[_&{}%])/,orbital:/^(?:[0-9]{1,2}[spdfgh]|[0-9]{0,2}sp)(?=$|[^a-zA-Z])/,others:/^[\/~|]/,"\\frac{(...)}":function(t){return o.patterns.findObserveGroups(t,"\\frac{","","","}","{","","","}")},"\\overset{(...)}":function(t){return o.patterns.findObserveGroups(t,"\\overset{","","","}","{","","","}")},"\\underset{(...)}":function(t){return o.patterns.findObserveGroups(t,"\\underset{","","","}","{","","","}")},"\\underbrace{(...)}":function(t){return o.patterns.findObserveGroups(t,"\\underbrace{","","","}_","{","","","}")},"\\color{(...)}0":function(t){return o.patterns.findObserveGroups(t,"\\color{","","","}")},"\\color{(...)}{(...)}1":function(t){return o.patterns.findObserveGroups(t,"\\color{","","","}","{","","","}")},"\\color(...){(...)}2":function(t){return o.patterns.findObserveGroups(t,"\\color","\\","",/^(?=\{)/,"{","","","}")},"\\ce{(...)}":function(t){return o.patterns.findObserveGroups(t,"\\ce{","","","}")},oxidation$:/^(?:[+-][IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"d-oxidation$":/^(?:[+-]?\s?[IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"roman numeral":/^[IVX]+/,"1/2$":/^[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+(?:\$[a-z]\$|[a-z])?$/,amount:function(t){var e;if(e=t.match(/^(?:(?:(?:\([+\-]?[0-9]+\/[0-9]+\)|[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+|[+\-]?[0-9]+[.,][0-9]+|[+\-]?\.[0-9]+|[+\-]?[0-9]+)(?:[a-z](?=\s*[A-Z]))?)|[+\-]?[a-z](?=\s*[A-Z])|\+(?!\s))/))return{match_:e[0],remainder:t.substr(e[0].length)};var a=o.patterns.findObserveGroups(t,"","$","$","");return a&&(e=a.match_.match(/^\$(?:\(?[+\-]?(?:[0-9]*[a-z]?[+\-])?[0-9]*[a-z](?:[+\-][0-9]*[a-z]?)?\)?|\+|-)\$$/))?{match_:e[0],remainder:t.substr(e[0].length)}:null},amount2:function(t){return this.amount(t)},"(KV letters),":/^(?:[A-Z][a-z]{0,2}|i)(?=,)/,formula$:function(t){if(t.match(/^\([a-z]+\)$/))return null;var e=t.match(/^(?:[a-z]|(?:[0-9\ \+\-\,\.\(\)]+[a-z])+[0-9\ \+\-\,\.\(\)]*|(?:[a-z][0-9\ \+\-\,\.\(\)]+)+[a-z]?)$/);return e?{match_:e[0],remainder:t.substr(e[0].length)}:null},uprightEntities:/^(?:pH|pOH|pC|pK|iPr|iBu)(?=$|[^a-zA-Z])/,"/":/^\s*(\/)\s*/,"//":/^\s*(\/\/)\s*/,"*":/^\s*[*.]\s*/},findObserveGroups:function(t,e,a,n,r,i,u,_,p,m){var h=function(x,l){if(typeof l=="string")return x.indexOf(l)!==0?null:l;var g=x.match(l);return g?g[0]:null},s=h(t,e);if(s===null||(t=t.substr(s.length),(s=h(t,a))===null))return null;var d=function(x,l,g){for(var b=0;l<x.length;){var q=x.charAt(l),S=h(x.substr(l),g);if(S!==null&&b===0)return{endMatchBegin:l,endMatchEnd:l+S.length};if(q==="{")b++;else if(q==="}"){if(b===0)throw["ExtraCloseMissingOpen","Extra close brace or missing open brace"];b--}l++}return null}(t,s.length,n||r);if(d===null)return null;var f=t.substring(0,n?d.endMatchEnd:d.endMatchBegin);if(i||u){var v=this.findObserveGroups(t.substr(d.endMatchEnd),i,u,_,p);if(v===null)return null;var $=[f,v.match_];return{match_:m?$.join(""):$,remainder:v.remainder}}return{match_:f,remainder:t.substr(d.endMatchEnd)}},match_:function(t,e){var a=o.patterns.patterns[t];if(a===void 0)throw["MhchemBugP","mhchem bug P. Please report. ("+t+")"];if(typeof a=="function")return o.patterns.patterns[t](e);var n=e.match(a);return n?{match_:n[2]?[n[1],n[2]]:n[1]?n[1]:n[0],remainder:e.substr(n[0].length)}:null}},actions:{"a=":function(t,e){t.a=(t.a||"")+e},"b=":function(t,e){t.b=(t.b||"")+e},"p=":function(t,e){t.p=(t.p||"")+e},"o=":function(t,e){t.o=(t.o||"")+e},"q=":function(t,e){t.q=(t.q||"")+e},"d=":function(t,e){t.d=(t.d||"")+e},"rm=":function(t,e){t.rm=(t.rm||"")+e},"text=":function(t,e){t.text_=(t.text_||"")+e},insert:function(t,e,a){return{type_:a}},"insert+p1":function(t,e,a){return{type_:a,p1:e}},"insert+p1+p2":function(t,e,a){return{type_:a,p1:e[0],p2:e[1]}},copy:function(t,e){return e},rm:function(t,e){return{type_:"rm",p1:e||""}},text:function(t,e){return o.go(e,"text")},"{text}":function(t,e){var a=["{"];return o.concatArray(a,o.go(e,"text")),a.push("}"),a},"tex-math":function(t,e){return o.go(e,"tex-math")},"tex-math tight":function(t,e){return o.go(e,"tex-math tight")},bond:function(t,e,a){return{type_:"bond",kind_:a||e}},"color0-output":function(t,e){return{type_:"color0",color:e[0]}},ce:function(t,e){return o.go(e)},"1/2":function(t,e){var a=[];e.match(/^[+\-]/)&&(a.push(e.substr(0,1)),e=e.substr(1));var n=e.match(/^([0-9]+|\$[a-z]\$|[a-z])\/([0-9]+)(\$[a-z]\$|[a-z])?$/);return n[1]=n[1].replace(/\$/g,""),a.push({type_:"frac",p1:n[1],p2:n[2]}),n[3]&&(n[3]=n[3].replace(/\$/g,""),a.push({type_:"tex-math",p1:n[3]})),a},"9,9":function(t,e){return o.go(e,"9,9")}},createTransitions:function(t){var e,a,n,r,i={};for(e in t)for(a in t[e])for(n=a.split("|"),t[e][a].stateArray=n,r=0;r<n.length;r++)i[n[r]]=[];for(e in t)for(a in t[e])for(n=t[e][a].stateArray||[],r=0;r<n.length;r++){var u=t[e][a];if(u.action_){u.action_=[].concat(u.action_);for(var _=0;_<u.action_.length;_++)typeof u.action_[_]=="string"&&(u.action_[_]={type_:u.action_[_]})}else u.action_=[];for(var p=e.split("|"),m=0;m<p.length;m++)if(n[r]==="*")for(var h in i)i[h].push({pattern:p[m],task:u});else i[n[r]].push({pattern:p[m],task:u})}return i},stateMachines:{}};o.stateMachines={ce:{transitions:o.createTransitions({empty:{"*":{action_:"output"}},else:{"0|1|2":{action_:"beginsWithBond=false",revisit:!0,toContinue:!0}},oxidation$:{0:{action_:"oxidation-output"}},CMT:{r:{action_:"rdt=",nextState:"rt"},rd:{action_:"rqt=",nextState:"rdt"}},arrowUpDown:{"0|1|2|as":{action_:["sb=false","output","operator"],nextState:"1"}},uprightEntities:{"0|1|2":{action_:["o=","output"],nextState:"1"}},orbital:{"0|1|2|3":{action_:"o=",nextState:"o"}},"->":{"0|1|2|3":{action_:"r=",nextState:"r"},"a|as":{action_:["output","r="],nextState:"r"},"*":{action_:["output","r="],nextState:"r"}},"+":{o:{action_:"d= kv",nextState:"d"},"d|D":{action_:"d=",nextState:"d"},q:{action_:"d=",nextState:"qd"},"qd|qD":{action_:"d=",nextState:"qd"},dq:{action_:["output","d="],nextState:"d"},3:{action_:["sb=false","output","operator"],nextState:"0"}},amount:{"0|2":{action_:"a=",nextState:"a"}},"pm-operator":{"0|1|2|a|as":{action_:["sb=false","output",{type_:"operator",option:"\\pm"}],nextState:"0"}},operator:{"0|1|2|a|as":{action_:["sb=false","output","operator"],nextState:"0"}},"-$":{"o|q":{action_:["charge or bond","output"],nextState:"qd"},d:{action_:"d=",nextState:"d"},D:{action_:["output",{type_:"bond",option:"-"}],nextState:"3"},q:{action_:"d=",nextState:"qd"},qd:{action_:"d=",nextState:"qd"},"qD|dq":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},"-9":{"3|o":{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"3"}},"- orbital overlap":{o:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},d:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"}},"-":{"0|1|2":{action_:[{type_:"output",option:1},"beginsWithBond=true",{type_:"bond",option:"-"}],nextState:"3"},3:{action_:{type_:"bond",option:"-"}},a:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},as:{action_:[{type_:"output",option:2},{type_:"bond",option:"-"}],nextState:"3"},b:{action_:"b="},o:{action_:{type_:"- after o/d",option:!1},nextState:"2"},q:{action_:{type_:"- after o/d",option:!1},nextState:"2"},"d|qd|dq":{action_:{type_:"- after o/d",option:!0},nextState:"2"},"D|qD|p":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},amount2:{"1|3":{action_:"a=",nextState:"a"}},letters:{"0|1|2|3|a|as|b|p|bp|o":{action_:"o=",nextState:"o"},"q|dq":{action_:["output","o="],nextState:"o"},"d|D|qd|qD":{action_:"o after d",nextState:"o"}},digits:{o:{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},q:{action_:["output","o="],nextState:"o"},a:{action_:"o=",nextState:"o"}},"space A":{"b|p|bp":{}},space:{a:{nextState:"as"},0:{action_:"sb=false"},"1|2":{action_:"sb=true"},"r|rt|rd|rdt|rdq":{action_:"output",nextState:"0"},"*":{action_:["output","sb=true"],nextState:"1"}},"1st-level escape":{"1|2":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}]},"*":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}],nextState:"0"}},"[(...)]":{"r|rt":{action_:"rd=",nextState:"rd"},"rd|rdt":{action_:"rq=",nextState:"rdq"}},"...":{"o|d|D|dq|qd|qD":{action_:["output",{type_:"bond",option:"..."}],nextState:"3"},"*":{action_:[{type_:"output",option:1},{type_:"insert",option:"ellipsis"}],nextState:"1"}},". |* ":{"*":{action_:["output",{type_:"insert",option:"addition compound"}],nextState:"1"}},"state of aggregation $":{"*":{action_:["output","state of aggregation"],nextState:"1"}},"{[(":{"a|as|o":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"0|1|2|3":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"*":{action_:["output","o=","output","parenthesisLevel++"],nextState:"2"}},")]}":{"0|1|2|3|b|p|bp|o":{action_:["o=","parenthesisLevel--"],nextState:"o"},"a|as|d|D|q|qd|qD|dq":{action_:["output","o=","parenthesisLevel--"],nextState:"o"}},", ":{"*":{action_:["output","comma"],nextState:"0"}},"^_":{"*":{}},"^{(...)}|^($...$)":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"D"},q:{action_:"d=",nextState:"qD"},"d|D|qd|qD|dq":{action_:["output","d="],nextState:"D"}},"^a|^\\x{}{}|^\\x{}|^\\x|'":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"d"},q:{action_:"d=",nextState:"qd"},"d|qd|D|qD":{action_:"d="},dq:{action_:["output","d="],nextState:"d"}},"_{(state of aggregation)}$":{"d|D|q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"_{(...)}|_($...$)|_9|_\\x{}{}|_\\x{}|_\\x":{"0|1|2|as":{action_:"p=",nextState:"p"},b:{action_:"p=",nextState:"bp"},"3|o":{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},"q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"=<>":{"0|1|2|3|a|as|o|q|d|D|qd|qD|dq":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"#":{"0|1|2|3|a|as|o":{action_:[{type_:"output",option:2},{type_:"bond",option:"#"}],nextState:"3"}},"{}":{"*":{action_:{type_:"output",option:1},nextState:"1"}},"{...}":{"0|1|2|3|a|as|b|p|bp":{action_:"o=",nextState:"o"},"o|d|D|q|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"$...$":{a:{action_:"a="},"0|1|2|3|as|b|p|bp|o":{action_:"o=",nextState:"o"},"as|o":{action_:"o="},"q|d|D|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"\\bond{(...)}":{"*":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"\\frac{(...)}":{"*":{action_:[{type_:"output",option:1},"frac-output"],nextState:"3"}},"\\overset{(...)}":{"*":{action_:[{type_:"output",option:2},"overset-output"],nextState:"3"}},"\\underset{(...)}":{"*":{action_:[{type_:"output",option:2},"underset-output"],nextState:"3"}},"\\underbrace{(...)}":{"*":{action_:[{type_:"output",option:2},"underbrace-output"],nextState:"3"}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:[{type_:"output",option:2},"color-output"],nextState:"3"}},"\\color{(...)}0":{"*":{action_:[{type_:"output",option:2},"color0-output"]}},"\\ce{(...)}":{"*":{action_:[{type_:"output",option:2},"ce"],nextState:"3"}},"\\,":{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"1"}},"\\x{}{}|\\x{}|\\x":{"0|1|2|3|a|as|b|p|bp|o|c0":{action_:["o=","output"],nextState:"3"},"*":{action_:["output","o=","output"],nextState:"3"}},others:{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"3"}},else2:{a:{action_:"a to o",nextState:"o",revisit:!0},as:{action_:["output","sb=true"],nextState:"1",revisit:!0},"r|rt|rd|rdt|rdq":{action_:["output"],nextState:"0",revisit:!0},"*":{action_:["output","copy"],nextState:"3"}}}),actions:{"o after d":function(t,e){var a;if((t.d||"").match(/^[0-9]+$/)){var n=t.d;t.d=void 0,a=this.output(t),t.b=n}else a=this.output(t);return o.actions["o="](t,e),a},"d= kv":function(t,e){t.d=e,t.dType="kv"},"charge or bond":function(t,e){if(t.beginsWithBond){var a=[];return o.concatArray(a,this.output(t)),o.concatArray(a,o.actions.bond(t,e,"-")),a}t.d=e},"- after o/d":function(t,e,a){var n=o.patterns.match_("orbital",t.o||""),r=o.patterns.match_("one lowercase greek letter $",t.o||""),i=o.patterns.match_("one lowercase latin letter $",t.o||""),u=o.patterns.match_("$one lowercase latin letter$ $",t.o||""),_=e==="-"&&(n&&n.remainder===""||r||i||u);!_||t.a||t.b||t.p||t.d||t.q||n||!i||(t.o="$"+t.o+"$");var p=[];return _?(o.concatArray(p,this.output(t)),p.push({type_:"hyphen"})):(n=o.patterns.match_("digits",t.d||""),a&&n&&n.remainder===""?(o.concatArray(p,o.actions["d="](t,e)),o.concatArray(p,this.output(t))):(o.concatArray(p,this.output(t)),o.concatArray(p,o.actions.bond(t,e,"-")))),p},"a to o":function(t){t.o=t.a,t.a=void 0},"sb=true":function(t){t.sb=!0},"sb=false":function(t){t.sb=!1},"beginsWithBond=true":function(t){t.beginsWithBond=!0},"beginsWithBond=false":function(t){t.beginsWithBond=!1},"parenthesisLevel++":function(t){t.parenthesisLevel++},"parenthesisLevel--":function(t){t.parenthesisLevel--},"state of aggregation":function(t,e){return{type_:"state of aggregation",p1:o.go(e,"o")}},comma:function(t,e){var a=e.replace(/\s*$/,"");return a!==e&&t.parenthesisLevel===0?{type_:"comma enumeration L",p1:a}:{type_:"comma enumeration M",p1:a}},output:function(t,e,a){var n,r,i;t.r?(r=t.rdt==="M"?o.go(t.rd,"tex-math"):t.rdt==="T"?[{type_:"text",p1:t.rd||""}]:o.go(t.rd),i=t.rqt==="M"?o.go(t.rq,"tex-math"):t.rqt==="T"?[{type_:"text",p1:t.rq||""}]:o.go(t.rq),n={type_:"arrow",r:t.r,rd:r,rq:i}):(n=[],(t.a||t.b||t.p||t.o||t.q||t.d||a)&&(t.sb&&n.push({type_:"entitySkip"}),t.o||t.q||t.d||t.b||t.p||a===2?t.o||t.q||t.d||!t.b&&!t.p?t.o&&t.dType==="kv"&&o.patterns.match_("d-oxidation$",t.d||"")?t.dType="oxidation":t.o&&t.dType==="kv"&&!t.q&&(t.dType=void 0):(t.o=t.a,t.d=t.b,t.q=t.p,t.a=t.b=t.p=void 0):(t.o=t.a,t.a=void 0),n.push({type_:"chemfive",a:o.go(t.a,"a"),b:o.go(t.b,"bd"),p:o.go(t.p,"pq"),o:o.go(t.o,"o"),q:o.go(t.q,"pq"),d:o.go(t.d,t.dType==="oxidation"?"oxidation":"bd"),dType:t.dType})));for(var u in t)u!=="parenthesisLevel"&&u!=="beginsWithBond"&&delete t[u];return n},"oxidation-output":function(t,e){var a=["{"];return o.concatArray(a,o.go(e,"oxidation")),a.push("}"),a},"frac-output":function(t,e){return{type_:"frac-ce",p1:o.go(e[0]),p2:o.go(e[1])}},"overset-output":function(t,e){return{type_:"overset",p1:o.go(e[0]),p2:o.go(e[1])}},"underset-output":function(t,e){return{type_:"underset",p1:o.go(e[0]),p2:o.go(e[1])}},"underbrace-output":function(t,e){return{type_:"underbrace",p1:o.go(e[0]),p2:o.go(e[1])}},"color-output":function(t,e){return{type_:"color",color1:e[0],color2:o.go(e[1])}},"r=":function(t,e){t.r=e},"rdt=":function(t,e){t.rdt=e},"rd=":function(t,e){t.rd=e},"rqt=":function(t,e){t.rqt=e},"rq=":function(t,e){t.rq=e},operator:function(t,e,a){return{type_:"operator",kind_:a||e}}}},a:{transitions:o.createTransitions({empty:{"*":{}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"1",revisit:!0}},"$(...)$":{"*":{action_:"tex-math tight",nextState:"1"}},",":{"*":{action_:{type_:"insert",option:"commaDecimal"}}},else2:{"*":{action_:"copy"}}}),actions:{}},o:{transitions:o.createTransitions({empty:{"*":{}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"1",revisit:!0}},letters:{"*":{action_:"rm"}},"\\ca":{"*":{action_:{type_:"insert",option:"circa"}}},"\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"{text}"}},else2:{"*":{action_:"copy"}}}),actions:{}},text:{transitions:o.createTransitions({empty:{"*":{action_:"output"}},"{...}":{"*":{action_:"text="}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"\\greek":{"*":{action_:["output","rm"]}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:["output","copy"]}},else:{"*":{action_:"text="}}}),actions:{output:function(t){if(t.text_){var e={type_:"text",p1:t.text_};for(var a in t)delete t[a];return e}}}},pq:{transitions:o.createTransitions({empty:{"*":{}},"state of aggregation $":{"*":{action_:"state of aggregation"}},i$:{0:{nextState:"!f",revisit:!0}},"(KV letters),":{0:{action_:"rm",nextState:"0"}},formula$:{0:{nextState:"f",revisit:!0}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"!f",revisit:!0}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"a-z":{f:{action_:"tex-math"}},letters:{"*":{action_:"rm"}},"-9.,9":{"*":{action_:"9,9"}},",":{"*":{action_:{type_:"insert+p1",option:"comma enumeration S"}}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:"color-output"}},"\\color{(...)}0":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"state of aggregation":function(t,e){return{type_:"state of aggregation subscript",p1:o.go(e,"o")}},"color-output":function(t,e){return{type_:"color",color1:e[0],color2:o.go(e[1],"pq")}}}},bd:{transitions:o.createTransitions({empty:{"*":{}},x$:{0:{nextState:"!f",revisit:!0}},formula$:{0:{nextState:"f",revisit:!0}},else:{0:{nextState:"!f",revisit:!0}},"-9.,9 no missing 0":{"*":{action_:"9,9"}},".":{"*":{action_:{type_:"insert",option:"electron dot"}}},"a-z":{f:{action_:"tex-math"}},x:{"*":{action_:{type_:"insert",option:"KV x"}}},letters:{"*":{action_:"rm"}},"'":{"*":{action_:{type_:"insert",option:"prime"}}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:"color-output"}},"\\color{(...)}0":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"color-output":function(t,e){return{type_:"color",color1:e[0],color2:o.go(e[1],"bd")}}}},oxidation:{transitions:o.createTransitions({empty:{"*":{}},"roman numeral":{"*":{action_:"roman-numeral"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},else:{"*":{action_:"copy"}}}),actions:{"roman-numeral":function(t,e){return{type_:"roman numeral",p1:e||""}}}},"tex-math":{transitions:o.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},else:{"*":{action_:"o="}}}),actions:{output:function(t){if(t.o){var e={type_:"tex-math",p1:t.o};for(var a in t)delete t[a];return e}}}},"tex-math tight":{transitions:o.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},"-|+":{"*":{action_:"tight operator"}},else:{"*":{action_:"o="}}}),actions:{"tight operator":function(t,e){t.o=(t.o||"")+"{"+e+"}"},output:function(t){if(t.o){var e={type_:"tex-math",p1:t.o};for(var a in t)delete t[a];return e}}}},"9,9":{transitions:o.createTransitions({empty:{"*":{}},",":{"*":{action_:"comma"}},else:{"*":{action_:"copy"}}}),actions:{comma:function(){return{type_:"commaDecimal"}}}},pu:{transitions:o.createTransitions({empty:{"*":{action_:"output"}},space$:{"*":{action_:["output","space"]}},"{[(|)]}":{"0|a":{action_:"copy"}},"(-)(9)^(-9)":{0:{action_:"number^",nextState:"a"}},"(-)(9.,9)(e)(99)":{0:{action_:"enumber",nextState:"a"}},space:{"0|a":{}},"pm-operator":{"0|a":{action_:{type_:"operator",option:"\\pm"},nextState:"0"}},operator:{"0|a":{action_:"copy",nextState:"0"}},"//":{d:{action_:"o=",nextState:"/"}},"/":{d:{action_:"o=",nextState:"/"}},"{...}|else":{"0|d":{action_:"d=",nextState:"d"},a:{action_:["space","d="],nextState:"d"},"/|q":{action_:"q=",nextState:"q"}}}),actions:{enumber:function(t,e){var a=[];return e[0]==="+-"||e[0]==="+/-"?a.push("\\pm "):e[0]&&a.push(e[0]),e[1]&&(o.concatArray(a,o.go(e[1],"pu-9,9")),e[2]&&(e[2].match(/[,.]/)?o.concatArray(a,o.go(e[2],"pu-9,9")):a.push(e[2])),e[3]=e[4]||e[3],e[3]&&(e[3]=e[3].trim(),e[3]==="e"||e[3].substr(0,1)==="*"?a.push({type_:"cdot"}):a.push({type_:"times"}))),e[3]&&a.push("10^{"+e[5]+"}"),a},"number^":function(t,e){var a=[];return e[0]==="+-"||e[0]==="+/-"?a.push("\\pm "):e[0]&&a.push(e[0]),o.concatArray(a,o.go(e[1],"pu-9,9")),a.push("^{"+e[2]+"}"),a},operator:function(t,e,a){return{type_:"operator",kind_:a||e}},space:function(){return{type_:"pu-space-1"}},output:function(t){var e,a=o.patterns.match_("{(...)}",t.d||"");a&&a.remainder===""&&(t.d=a.match_);var n=o.patterns.match_("{(...)}",t.q||"");if(n&&n.remainder===""&&(t.q=n.match_),t.d&&(t.d=t.d.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),t.d=t.d.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F")),t.q){t.q=t.q.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),t.q=t.q.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F");var r={d:o.go(t.d,"pu"),q:o.go(t.q,"pu")};t.o==="//"?e={type_:"pu-frac",p1:r.d,p2:r.q}:(e=r.d,r.d.length>1||r.q.length>1?e.push({type_:" / "}):e.push({type_:"/"}),o.concatArray(e,r.q))}else e=o.go(t.d,"pu-2");for(var i in t)delete t[i];return e}}},"pu-2":{transitions:o.createTransitions({empty:{"*":{action_:"output"}},"*":{"*":{action_:["output","cdot"],nextState:"0"}},"\\x":{"*":{action_:"rm="}},space:{"*":{action_:["output","space"],nextState:"0"}},"^{(...)}|^(-1)":{1:{action_:"^(-1)"}},"-9.,9":{0:{action_:"rm=",nextState:"0"},1:{action_:"^(-1)",nextState:"0"}},"{...}|else":{"*":{action_:"rm=",nextState:"1"}}}),actions:{cdot:function(){return{type_:"tight cdot"}},"^(-1)":function(t,e){t.rm+="^{"+e+"}"},space:function(){return{type_:"pu-space-2"}},output:function(t){var e=[];if(t.rm){var a=o.patterns.match_("{(...)}",t.rm||"");e=a&&a.remainder===""?o.go(a.match_,"pu"):{type_:"rm",p1:t.rm}}for(var n in t)delete t[n];return e}}},"pu-9,9":{transitions:o.createTransitions({empty:{0:{action_:"output-0"},o:{action_:"output-o"}},",":{0:{action_:["output-0","comma"],nextState:"o"}},".":{0:{action_:["output-0","copy"],nextState:"o"}},else:{"*":{action_:"text="}}}),actions:{comma:function(){return{type_:"commaDecimal"}},"output-0":function(t){var e=[];if(t.text_=t.text_||"",t.text_.length>4){var a=t.text_.length%3;a===0&&(a=3);for(var n=t.text_.length-3;n>0;n-=3)e.push(t.text_.substr(n,3)),e.push({type_:"1000 separator"});e.push(t.text_.substr(0,a)),e.reverse()}else e.push(t.text_);for(var r in t)delete t[r];return e},"output-o":function(t){var e=[];if(t.text_=t.text_||"",t.text_.length>4){for(var a=t.text_.length-3,n=0;n<a;n+=3)e.push(t.text_.substr(n,3)),e.push({type_:"1000 separator"});e.push(t.text_.substr(n))}else e.push(t.text_);for(var r in t)delete t[r];return e}}}};var c={go:function(t,e){if(!t)return"";for(var a="",n=!1,r=0;r<t.length;r++){var i=t[r];typeof i=="string"?a+=i:(a+=c._go2(i),i.type_==="1st-level escape"&&(n=!0))}return e||n||!a||(a="{"+a+"}"),a},_goInner:function(t){return t&&c.go(t,!0)},_go2:function(t){var e;switch(t.type_){case"chemfive":e="";var a={a:c._goInner(t.a),b:c._goInner(t.b),p:c._goInner(t.p),o:c._goInner(t.o),q:c._goInner(t.q),d:c._goInner(t.d)};a.a&&(a.a.match(/^[+\-]/)&&(a.a="{"+a.a+"}"),e+=a.a+"\\,"),(a.b||a.p)&&(e+="{\\vphantom{X}}",e+="^{\\hphantom{"+(a.b||"")+"}}_{\\hphantom{"+(a.p||"")+"}}",e+="{\\vphantom{X}}",e+="^{\\smash[t]{\\vphantom{2}}\\mathllap{"+(a.b||"")+"}}",e+="_{\\vphantom{2}\\mathllap{\\smash[t]{"+(a.p||"")+"}}}"),a.o&&(a.o.match(/^[+\-]/)&&(a.o="{"+a.o+"}"),e+=a.o),t.dType==="kv"?((a.d||a.q)&&(e+="{\\vphantom{X}}"),a.d&&(e+="^{"+a.d+"}"),a.q&&(e+="_{\\smash[t]{"+a.q+"}}")):t.dType==="oxidation"?(a.d&&(e+="{\\vphantom{X}}",e+="^{"+a.d+"}"),a.q&&(e+="{\\vphantom{X}}",e+="_{\\smash[t]{"+a.q+"}}")):(a.q&&(e+="{\\vphantom{X}}",e+="_{\\smash[t]{"+a.q+"}}"),a.d&&(e+="{\\vphantom{X}}",e+="^{"+a.d+"}"));break;case"rm":case"roman numeral":e="\\mathrm{"+t.p1+"}";break;case"text":t.p1.match(/[\^_]/)?(t.p1=t.p1.replace(" ","~").replace("-","\\text{-}"),e="\\mathrm{"+t.p1+"}"):e="\\text{"+t.p1+"}";break;case"state of aggregation":e="\\mskip2mu "+c._goInner(t.p1);break;case"state of aggregation subscript":e="\\mskip1mu "+c._goInner(t.p1);break;case"bond":if(!(e=c._getBond(t.kind_)))throw["MhchemErrorBond","mhchem Error. Unknown bond type ("+t.kind_+")"];break;case"frac":var n="\\frac{"+t.p1+"}{"+t.p2+"}";e="\\mathchoice{\\textstyle"+n+"}{"+n+"}{"+n+"}{"+n+"}";break;case"pu-frac":var r="\\frac{"+c._goInner(t.p1)+"}{"+c._goInner(t.p2)+"}";e="\\mathchoice{\\textstyle"+r+"}{"+r+"}{"+r+"}{"+r+"}";break;case"tex-math":case"1st-level escape":e=t.p1+" ";break;case"frac-ce":e="\\frac{"+c._goInner(t.p1)+"}{"+c._goInner(t.p2)+"}";break;case"overset":e="\\overset{"+c._goInner(t.p1)+"}{"+c._goInner(t.p2)+"}";break;case"underset":e="\\underset{"+c._goInner(t.p1)+"}{"+c._goInner(t.p2)+"}";break;case"underbrace":e="\\underbrace{"+c._goInner(t.p1)+"}_{"+c._goInner(t.p2)+"}";break;case"color":e="{\\color{"+t.color1+"}{"+c._goInner(t.color2)+"}}";break;case"color0":e="\\color{"+t.color+"}";break;case"arrow":var i={rd:c._goInner(t.rd),rq:c._goInner(t.rq)},u="\\x"+c._getArrow(t.r);i.rq&&(u+="[{"+i.rq+"}]"),e=u+=i.rd?"{"+i.rd+"}":"{}";break;case"operator":e=c._getOperator(t.kind_);break;case"space":e=" ";break;case"entitySkip":case"pu-space-1":e="~";break;case"pu-space-2":e="\\mkern3mu ";break;case"1000 separator":e="\\mkern2mu ";break;case"commaDecimal":e="{,}";break;case"comma enumeration L":e="{"+t.p1+"}\\mkern6mu ";break;case"comma enumeration M":e="{"+t.p1+"}\\mkern3mu ";break;case"comma enumeration S":e="{"+t.p1+"}\\mkern1mu ";break;case"hyphen":e="\\text{-}";break;case"addition compound":e="\\,{\\cdot}\\,";break;case"electron dot":e="\\mkern1mu \\bullet\\mkern1mu ";break;case"KV x":e="{\\times}";break;case"prime":e="\\prime ";break;case"cdot":e="\\cdot ";break;case"tight cdot":e="\\mkern1mu{\\cdot}\\mkern1mu ";break;case"times":e="\\times ";break;case"circa":e="{\\sim}";break;case"^":e="uparrow";break;case"v":e="downarrow";break;case"ellipsis":e="\\ldots ";break;case"/":e="/";break;case" / ":e="\\,/\\,";break;default:throw["MhchemBugT","mhchem bug T. Please report."]}return e},_getArrow:function(t){switch(t){case"->":case"\u2192":case"\u27F6":return"rightarrow";case"<-":return"leftarrow";case"<->":return"leftrightarrow";case"<-->":return"rightleftarrows";case"<=>":case"\u21CC":return"rightleftharpoons";case"<=>>":return"rightequilibrium";case"<<=>":return"leftequilibrium";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getBond:function(t){switch(t){case"-":case"1":return"{-}";case"=":case"2":return"{=}";case"#":case"3":return"{\\equiv}";case"~":return"{\\tripledash}";case"~-":return"{\\mathrlap{\\raisebox{-.1em}{$-$}}\\raisebox{.1em}{$\\tripledash$}}";case"~=":case"~--":return"{\\mathrlap{\\raisebox{-.2em}{$-$}}\\mathrlap{\\raisebox{.2em}{$\\tripledash$}}-}";case"-~-":return"{\\mathrlap{\\raisebox{-.2em}{$-$}}\\mathrlap{\\raisebox{.2em}{$-$}}\\tripledash}";case"...":return"{{\\cdot}{\\cdot}{\\cdot}}";case"....":return"{{\\cdot}{\\cdot}{\\cdot}{\\cdot}}";case"->":return"{\\rightarrow}";case"<-":return"{\\leftarrow}";case"<":return"{<}";case">":return"{>}";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getOperator:function(t){switch(t){case"+":return" {}+{} ";case"-":return" {}-{} ";case"=":return" {}={} ";case"<":return" {}<{} ";case">":return" {}>{} ";case"<<":return" {}\\ll{} ";case">>":return" {}\\gg{} ";case"\\pm":return" {}\\pm{} ";case"\\approx":case"$\\approx$":return" {}\\approx{} ";case"v":case"(v)":return" \\downarrow{} ";case"^":case"(^)":return" \\uparrow{} ";default:throw["MhchemBugT","mhchem bug T. Please report."]}}};
@@ -0,0 +1 @@
1
+ import{S as b,aN as d,bH as g,bI as O,x as j,X as y,bJ as x,aJ as w,a3 as I,bK as J,aI as K,aL as M}from"./index-DlQKt39j.js";import{a as v}from"./_baseEach-DtUk7cBy.js";import{d as P}from"./_baseUniq-BuhsH2Gw.js";import{b as H}from"./_baseMap-zXgLfXUO.js";var c=Object.prototype,L=c.hasOwnProperty,N=b(function(a,n){a=Object(a);var u=-1,t=n.length,r=t>2?n[2]:void 0;for(r&&d(n[0],n[1],r)&&(t=1);++u<t;)for(var s=n[u],o=g(s),i=-1,l=o.length;++i<l;){var e=o[i],f=a[e];(f===void 0||O(f,c[e])&&!L.call(a,e))&&(a[e]=s[e])}return a});function S(a){var n=a==null?0:a.length;return n?a[n-1]:void 0}var X=Math.max,p,_=(p=function(a,n,u){var t=a==null?0:a.length;if(!t)return-1;var r=u==null?0:x(u);return r<0&&(r=X(t+r,0)),P(a,v(n),r)},function(a,n,u){var t=Object(a);if(!j(a)){var r=v(n);a=y(a),n=function(o){return r(t[o],o,t)}}var s=p(a,n,u);return s>-1?t[r?a[s]:s]:void 0});function k(a,n){return(I(a)?w:H)(a,v(n))}var q=Object.prototype.hasOwnProperty;function z(a,n){return a!=null&&q.call(a,n)}function A(a,n){return a!=null&&J(a,n,z)}function h(a,n){return a<n}function m(a,n,u){for(var t=-1,r=a.length;++t<r;){var s=a[t],o=n(s);if(o!=null&&(i===void 0?o==o&&!K(o):u(o,i)))var i=o,l=s}return l}function B(a){return a&&a.length?m(a,M,h):void 0}export{h as a,m as b,B as c,N as d,_ as f,A as h,S as l,k as m};
@@ -0,0 +1,95 @@
1
+ import{_ as x,l as j,c as J,I as mt,S as _t,G as Q,h as K,T as vt,V as Nt,W as At,a3 as Tt,O as Lt}from"./mermaid-BgCxVw2J.js";import{c as ot}from"./cytoscape.esm-UYyVlru8.js";import{D as Ot}from"./index-DlQKt39j.js";import{s as Dt}from"./transform-C5148Z0S.js";var st,at={exports:{}},ht={exports:{}},lt={exports:{}};function It(){return st?lt.exports:(st=1,N=function(){return function(A){var f={};function p(e){if(f[e])return f[e].exports;var t=f[e]={i:e,l:!1,exports:{}};return A[e].call(t.exports,t,t.exports,p),t.l=!0,t.exports}return p.m=A,p.c=f,p.i=function(e){return e},p.d=function(e,t,i){p.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},p.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return p.d(t,"a",t),t},p.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},p.p="",p(p.s=26)}([function(A,f,p){function e(){}e.QUALITY=1,e.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,e.DEFAULT_INCREMENTAL=!1,e.DEFAULT_ANIMATION_ON_LAYOUT=!0,e.DEFAULT_ANIMATION_DURING_LAYOUT=!1,e.DEFAULT_ANIMATION_PERIOD=50,e.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,e.DEFAULT_GRAPH_MARGIN=15,e.NODE_DIMENSIONS_INCLUDE_LABELS=!1,e.SIMPLE_NODE_SIZE=40,e.SIMPLE_NODE_HALF_SIZE=e.SIMPLE_NODE_SIZE/2,e.EMPTY_COMPOUND_NODE_SIZE=40,e.MIN_EDGE_LENGTH=1,e.WORLD_BOUNDARY=1e6,e.INITIAL_WORLD_BOUNDARY=e.WORLD_BOUNDARY/1e3,e.WORLD_CENTER_X=1200,e.WORLD_CENTER_Y=900,A.exports=e},function(A,f,p){var e=p(2),t=p(8),i=p(9);function r(o,h,a){e.call(this,a),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=a,this.bendpoints=[],this.source=o,this.target=h}for(var n in r.prototype=Object.create(e.prototype),e)r[n]=e[n];r.prototype.getSource=function(){return this.source},r.prototype.getTarget=function(){return this.target},r.prototype.isInterGraph=function(){return this.isInterGraph},r.prototype.getLength=function(){return this.length},r.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},r.prototype.getBendpoints=function(){return this.bendpoints},r.prototype.getLca=function(){return this.lca},r.prototype.getSourceInLca=function(){return this.sourceInLca},r.prototype.getTargetInLca=function(){return this.targetInLca},r.prototype.getOtherEnd=function(o){if(this.source===o)return this.target;if(this.target===o)return this.source;throw"Node is not incident with this edge"},r.prototype.getOtherEndInGraph=function(o,h){for(var a=this.getOtherEnd(o),l=h.getGraphManager().getRoot();;){if(a.getOwner()==h)return a;if(a.getOwner()==l)break;a=a.getOwner().getParent()}return null},r.prototype.updateLength=function(){var o=new Array(4);this.isOverlapingSourceAndTarget=t.getIntersection(this.target.getRect(),this.source.getRect(),o),this.isOverlapingSourceAndTarget||(this.lengthX=o[0]-o[2],this.lengthY=o[1]-o[3],Math.abs(this.lengthX)<1&&(this.lengthX=i.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=i.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},r.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=i.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=i.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},A.exports=r},function(A,f,p){A.exports=function(e){this.vGraphObject=e}},function(A,f,p){var e=p(2),t=p(10),i=p(13),r=p(0),n=p(16),o=p(4);function h(l,E,m,g){m==null&&g==null&&(g=E),e.call(this,g),l.graphManager!=null&&(l=l.graphManager),this.estimatedSize=t.MIN_VALUE,this.inclusionTreeDepth=t.MAX_VALUE,this.vGraphObject=g,this.edges=[],this.graphManager=l,this.rect=m!=null&&E!=null?new i(E.x,E.y,m.width,m.height):new i}for(var a in h.prototype=Object.create(e.prototype),e)h[a]=e[a];h.prototype.getEdges=function(){return this.edges},h.prototype.getChild=function(){return this.child},h.prototype.getOwner=function(){return this.owner},h.prototype.getWidth=function(){return this.rect.width},h.prototype.setWidth=function(l){this.rect.width=l},h.prototype.getHeight=function(){return this.rect.height},h.prototype.setHeight=function(l){this.rect.height=l},h.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},h.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},h.prototype.getCenter=function(){return new o(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},h.prototype.getLocation=function(){return new o(this.rect.x,this.rect.y)},h.prototype.getRect=function(){return this.rect},h.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},h.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},h.prototype.setRect=function(l,E){this.rect.x=l.x,this.rect.y=l.y,this.rect.width=E.width,this.rect.height=E.height},h.prototype.setCenter=function(l,E){this.rect.x=l-this.rect.width/2,this.rect.y=E-this.rect.height/2},h.prototype.setLocation=function(l,E){this.rect.x=l,this.rect.y=E},h.prototype.moveBy=function(l,E){this.rect.x+=l,this.rect.y+=E},h.prototype.getEdgeListToNode=function(l){var E=[],m=this;return m.edges.forEach(function(g){if(g.target==l){if(g.source!=m)throw"Incorrect edge source!";E.push(g)}}),E},h.prototype.getEdgesBetween=function(l){var E=[],m=this;return m.edges.forEach(function(g){if(g.source!=m&&g.target!=m)throw"Incorrect edge source and/or target";g.target!=l&&g.source!=l||E.push(g)}),E},h.prototype.getNeighborsList=function(){var l=new Set,E=this;return E.edges.forEach(function(m){if(m.source==E)l.add(m.target);else{if(m.target!=E)throw"Incorrect incidency!";l.add(m.source)}}),l},h.prototype.withChildren=function(){var l=new Set;if(l.add(this),this.child!=null)for(var E=this.child.getNodes(),m=0;m<E.length;m++)E[m].withChildren().forEach(function(g){l.add(g)});return l},h.prototype.getNoOfChildren=function(){var l=0;if(this.child==null)l=1;else for(var E=this.child.getNodes(),m=0;m<E.length;m++)l+=E[m].getNoOfChildren();return l==0&&(l=1),l},h.prototype.getEstimatedSize=function(){if(this.estimatedSize==t.MIN_VALUE)throw"assert failed";return this.estimatedSize},h.prototype.calcEstimatedSize=function(){return this.child==null?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},h.prototype.scatter=function(){var l,E,m=-r.INITIAL_WORLD_BOUNDARY,g=r.INITIAL_WORLD_BOUNDARY;l=r.WORLD_CENTER_X+n.nextDouble()*(g-m)+m;var _=-r.INITIAL_WORLD_BOUNDARY,L=r.INITIAL_WORLD_BOUNDARY;E=r.WORLD_CENTER_Y+n.nextDouble()*(L-_)+_,this.rect.x=l,this.rect.y=E},h.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var l=this.getChild();if(l.updateBounds(!0),this.rect.x=l.getLeft(),this.rect.y=l.getTop(),this.setWidth(l.getRight()-l.getLeft()),this.setHeight(l.getBottom()-l.getTop()),r.NODE_DIMENSIONS_INCLUDE_LABELS){var E=l.getRight()-l.getLeft(),m=l.getBottom()-l.getTop();this.labelWidth>E&&(this.rect.x-=(this.labelWidth-E)/2,this.setWidth(this.labelWidth)),this.labelHeight>m&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-m)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-m),this.setHeight(this.labelHeight))}}},h.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==t.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},h.prototype.transform=function(l){var E=this.rect.x;E>r.WORLD_BOUNDARY?E=r.WORLD_BOUNDARY:E<-r.WORLD_BOUNDARY&&(E=-r.WORLD_BOUNDARY);var m=this.rect.y;m>r.WORLD_BOUNDARY?m=r.WORLD_BOUNDARY:m<-r.WORLD_BOUNDARY&&(m=-r.WORLD_BOUNDARY);var g=new o(E,m),_=l.inverseTransformPoint(g);this.setLocation(_.x,_.y)},h.prototype.getLeft=function(){return this.rect.x},h.prototype.getRight=function(){return this.rect.x+this.rect.width},h.prototype.getTop=function(){return this.rect.y},h.prototype.getBottom=function(){return this.rect.y+this.rect.height},h.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},A.exports=h},function(A,f,p){function e(t,i){t==null&&i==null?(this.x=0,this.y=0):(this.x=t,this.y=i)}e.prototype.getX=function(){return this.x},e.prototype.getY=function(){return this.y},e.prototype.setX=function(t){this.x=t},e.prototype.setY=function(t){this.y=t},e.prototype.getDifference=function(t){return new DimensionD(this.x-t.x,this.y-t.y)},e.prototype.getCopy=function(){return new e(this.x,this.y)},e.prototype.translate=function(t){return this.x+=t.width,this.y+=t.height,this},A.exports=e},function(A,f,p){var e=p(2),t=p(10),i=p(0),r=p(6),n=p(3),o=p(1),h=p(13),a=p(12),l=p(11);function E(g,_,L){e.call(this,L),this.estimatedSize=t.MIN_VALUE,this.margin=i.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=g,_!=null&&_ instanceof r?this.graphManager=_:_!=null&&_ instanceof Layout&&(this.graphManager=_.graphManager)}for(var m in E.prototype=Object.create(e.prototype),e)E[m]=e[m];E.prototype.getNodes=function(){return this.nodes},E.prototype.getEdges=function(){return this.edges},E.prototype.getGraphManager=function(){return this.graphManager},E.prototype.getParent=function(){return this.parent},E.prototype.getLeft=function(){return this.left},E.prototype.getRight=function(){return this.right},E.prototype.getTop=function(){return this.top},E.prototype.getBottom=function(){return this.bottom},E.prototype.isConnected=function(){return this.isConnected},E.prototype.add=function(g,_,L){if(_==null&&L==null){var v=g;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(v)>-1)throw"Node already in graph!";return v.owner=this,this.getNodes().push(v),v}var T=g;if(!(this.getNodes().indexOf(_)>-1&&this.getNodes().indexOf(L)>-1))throw"Source or target not in graph!";if(_.owner!=L.owner||_.owner!=this)throw"Both owners must be this graph!";return _.owner!=L.owner?null:(T.source=_,T.target=L,T.isInterGraph=!1,this.getEdges().push(T),_.edges.push(T),L!=_&&L.edges.push(T),T)},E.prototype.remove=function(g){var _=g;if(g instanceof n){if(_==null)throw"Node is null!";if(_.owner==null||_.owner!=this)throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var L=_.edges.slice(),v=L.length,T=0;T<v;T++)(u=L[T]).isInterGraph?this.graphManager.remove(u):u.source.owner.remove(u);if((I=this.nodes.indexOf(_))==-1)throw"Node not in owner node list!";this.nodes.splice(I,1)}else if(g instanceof o){var u;if((u=g)==null)throw"Edge is null!";if(u.source==null||u.target==null)throw"Source and/or target is null!";if(u.source.owner==null||u.target.owner==null||u.source.owner!=this||u.target.owner!=this)throw"Source and/or target owner is invalid!";var I,s=u.source.edges.indexOf(u),c=u.target.edges.indexOf(u);if(!(s>-1&&c>-1))throw"Source and/or target doesn't know this edge!";if(u.source.edges.splice(s,1),u.target!=u.source&&u.target.edges.splice(c,1),(I=u.source.owner.getEdges().indexOf(u))==-1)throw"Not in owner's edge list!";u.source.owner.getEdges().splice(I,1)}},E.prototype.updateLeftTop=function(){for(var g,_,L,v=t.MAX_VALUE,T=t.MAX_VALUE,u=this.getNodes(),I=u.length,s=0;s<I;s++){var c=u[s];v>(g=c.getTop())&&(v=g),T>(_=c.getLeft())&&(T=_)}return v==t.MAX_VALUE?null:(L=u[0].getParent().paddingLeft!=null?u[0].getParent().paddingLeft:this.margin,this.left=T-L,this.top=v-L,new a(this.left,this.top))},E.prototype.updateBounds=function(g){for(var _,L,v,T,u,I=t.MAX_VALUE,s=-t.MAX_VALUE,c=t.MAX_VALUE,d=-t.MAX_VALUE,y=this.nodes,O=y.length,D=0;D<O;D++){var w=y[D];g&&w.child!=null&&w.updateBounds(),I>(_=w.getLeft())&&(I=_),s<(L=w.getRight())&&(s=L),c>(v=w.getTop())&&(c=v),d<(T=w.getBottom())&&(d=T)}var R=new h(I,c,s-I,d-c);I==t.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),u=y[0].getParent().paddingLeft!=null?y[0].getParent().paddingLeft:this.margin,this.left=R.x-u,this.right=R.x+R.width+u,this.top=R.y-u,this.bottom=R.y+R.height+u},E.calculateBounds=function(g){for(var _,L,v,T,u=t.MAX_VALUE,I=-t.MAX_VALUE,s=t.MAX_VALUE,c=-t.MAX_VALUE,d=g.length,y=0;y<d;y++){var O=g[y];u>(_=O.getLeft())&&(u=_),I<(L=O.getRight())&&(I=L),s>(v=O.getTop())&&(s=v),c<(T=O.getBottom())&&(c=T)}return new h(u,s,I-u,c-s)},E.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},E.prototype.getEstimatedSize=function(){if(this.estimatedSize==t.MIN_VALUE)throw"assert failed";return this.estimatedSize},E.prototype.calcEstimatedSize=function(){for(var g=0,_=this.nodes,L=_.length,v=0;v<L;v++)g+=_[v].calcEstimatedSize();return this.estimatedSize=g==0?i.EMPTY_COMPOUND_NODE_SIZE:g/Math.sqrt(this.nodes.length),this.estimatedSize},E.prototype.updateConnected=function(){var g=this;if(this.nodes.length!=0){var _,L,v=new l,T=new Set,u=this.nodes[0];for(u.withChildren().forEach(function(d){v.push(d),T.add(d)});v.length!==0;)for(var I=(_=(u=v.shift()).getEdges()).length,s=0;s<I;s++)(L=_[s].getOtherEndInGraph(u,this))==null||T.has(L)||L.withChildren().forEach(function(d){v.push(d),T.add(d)});if(this.isConnected=!1,T.size>=this.nodes.length){var c=0;T.forEach(function(d){d.owner==g&&c++}),c==this.nodes.length&&(this.isConnected=!0)}}else this.isConnected=!0},A.exports=E},function(A,f,p){var e,t=p(1);function i(r){e=p(5),this.layout=r,this.graphs=[],this.edges=[]}i.prototype.addRoot=function(){var r=this.layout.newGraph(),n=this.layout.newNode(null),o=this.add(r,n);return this.setRootGraph(o),this.rootGraph},i.prototype.add=function(r,n,o,h,a){if(o==null&&h==null&&a==null){if(r==null)throw"Graph is null!";if(n==null)throw"Parent node is null!";if(this.graphs.indexOf(r)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(r),r.parent!=null)throw"Already has a parent!";if(n.child!=null)throw"Already has a child!";return r.parent=n,n.child=r,r}a=o,o=r;var l=(h=n).getOwner(),E=a.getOwner();if(l==null||l.getGraphManager()!=this)throw"Source not in this graph mgr!";if(E==null||E.getGraphManager()!=this)throw"Target not in this graph mgr!";if(l==E)return o.isInterGraph=!1,l.add(o,h,a);if(o.isInterGraph=!0,o.source=h,o.target=a,this.edges.indexOf(o)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(o),o.source==null||o.target==null)throw"Edge source and/or target is null!";if(o.source.edges.indexOf(o)!=-1||o.target.edges.indexOf(o)!=-1)throw"Edge already in source and/or target incidency list!";return o.source.edges.push(o),o.target.edges.push(o),o},i.prototype.remove=function(r){if(r instanceof e){var n=r;if(n.getGraphManager()!=this)throw"Graph not in this graph mgr";if(n!=this.rootGraph&&(n.parent==null||n.parent.graphManager!=this))throw"Invalid parent node!";for(var o,h=[],a=(h=h.concat(n.getEdges())).length,l=0;l<a;l++)o=h[l],n.remove(o);var E,m=[];for(a=(m=m.concat(n.getNodes())).length,l=0;l<a;l++)E=m[l],n.remove(E);n==this.rootGraph&&this.setRootGraph(null);var g=this.graphs.indexOf(n);this.graphs.splice(g,1),n.parent=null}else if(r instanceof t){if((o=r)==null)throw"Edge is null!";if(!o.isInterGraph)throw"Not an inter-graph edge!";if(o.source==null||o.target==null)throw"Source and/or target is null!";if(o.source.edges.indexOf(o)==-1||o.target.edges.indexOf(o)==-1)throw"Source and/or target doesn't know this edge!";if(g=o.source.edges.indexOf(o),o.source.edges.splice(g,1),g=o.target.edges.indexOf(o),o.target.edges.splice(g,1),o.source.owner==null||o.source.owner.getGraphManager()==null)throw"Edge owner graph or owner graph manager is null!";if(o.source.owner.getGraphManager().edges.indexOf(o)==-1)throw"Not in owner graph manager's edge list!";g=o.source.owner.getGraphManager().edges.indexOf(o),o.source.owner.getGraphManager().edges.splice(g,1)}},i.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},i.prototype.getGraphs=function(){return this.graphs},i.prototype.getAllNodes=function(){if(this.allNodes==null){for(var r=[],n=this.getGraphs(),o=n.length,h=0;h<o;h++)r=r.concat(n[h].getNodes());this.allNodes=r}return this.allNodes},i.prototype.resetAllNodes=function(){this.allNodes=null},i.prototype.resetAllEdges=function(){this.allEdges=null},i.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},i.prototype.getAllEdges=function(){if(this.allEdges==null){var r=[],n=this.getGraphs();n.length;for(var o=0;o<n.length;o++)r=r.concat(n[o].getEdges());r=r.concat(this.edges),this.allEdges=r}return this.allEdges},i.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},i.prototype.setAllNodesToApplyGravitation=function(r){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=r},i.prototype.getRoot=function(){return this.rootGraph},i.prototype.setRootGraph=function(r){if(r.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=r,r.parent==null&&(r.parent=this.layout.newNode("Root node"))},i.prototype.getLayout=function(){return this.layout},i.prototype.isOneAncestorOfOther=function(r,n){if(r==null||n==null)throw"assert failed";if(r==n)return!0;for(var o,h=r.getOwner();(o=h.getParent())!=null;){if(o==n)return!0;if((h=o.getOwner())==null)break}for(h=n.getOwner();(o=h.getParent())!=null;){if(o==r)return!0;if((h=o.getOwner())==null)break}return!1},i.prototype.calcLowestCommonAncestors=function(){for(var r,n,o,h,a,l=this.getAllEdges(),E=l.length,m=0;m<E;m++)if(n=(r=l[m]).source,o=r.target,r.lca=null,r.sourceInLca=n,r.targetInLca=o,n!=o){for(h=n.getOwner();r.lca==null;){for(r.targetInLca=o,a=o.getOwner();r.lca==null;){if(a==h){r.lca=a;break}if(a==this.rootGraph)break;if(r.lca!=null)throw"assert failed";r.targetInLca=a.getParent(),a=r.targetInLca.getOwner()}if(h==this.rootGraph)break;r.lca==null&&(r.sourceInLca=h.getParent(),h=r.sourceInLca.getOwner())}if(r.lca==null)throw"assert failed"}else r.lca=n.getOwner()},i.prototype.calcLowestCommonAncestor=function(r,n){if(r==n)return r.getOwner();for(var o=r.getOwner();o!=null;){for(var h=n.getOwner();h!=null;){if(h==o)return h;h=h.getParent().getOwner()}o=o.getParent().getOwner()}return o},i.prototype.calcInclusionTreeDepths=function(r,n){var o;r==null&&n==null&&(r=this.rootGraph,n=1);for(var h=r.getNodes(),a=h.length,l=0;l<a;l++)(o=h[l]).inclusionTreeDepth=n,o.child!=null&&this.calcInclusionTreeDepths(o.child,n+1)},i.prototype.includesInvalidEdge=function(){for(var r,n=this.edges.length,o=0;o<n;o++)if(r=this.edges[o],this.isOneAncestorOfOther(r.source,r.target))return!0;return!1},A.exports=i},function(A,f,p){var e=p(0);function t(){}for(var i in e)t[i]=e[i];t.MAX_ITERATIONS=2500,t.DEFAULT_EDGE_LENGTH=50,t.DEFAULT_SPRING_STRENGTH=.45,t.DEFAULT_REPULSION_STRENGTH=4500,t.DEFAULT_GRAVITY_STRENGTH=.4,t.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,t.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,t.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,t.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,t.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,t.COOLING_ADAPTATION_FACTOR=.33,t.ADAPTATION_LOWER_NODE_LIMIT=1e3,t.ADAPTATION_UPPER_NODE_LIMIT=5e3,t.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,t.MAX_NODE_DISPLACEMENT=3*t.MAX_NODE_DISPLACEMENT_INCREMENTAL,t.MIN_REPULSION_DIST=t.DEFAULT_EDGE_LENGTH/10,t.CONVERGENCE_CHECK_PERIOD=100,t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,t.MIN_EDGE_LENGTH=1,t.GRID_CALCULATION_CHECK_PERIOD=10,A.exports=t},function(A,f,p){var e=p(12);function t(){}t.calcSeparationAmount=function(i,r,n,o){if(!i.intersects(r))throw"assert failed";var h=new Array(2);this.decideDirectionsForOverlappingNodes(i,r,h),n[0]=Math.min(i.getRight(),r.getRight())-Math.max(i.x,r.x),n[1]=Math.min(i.getBottom(),r.getBottom())-Math.max(i.y,r.y),i.getX()<=r.getX()&&i.getRight()>=r.getRight()?n[0]+=Math.min(r.getX()-i.getX(),i.getRight()-r.getRight()):r.getX()<=i.getX()&&r.getRight()>=i.getRight()&&(n[0]+=Math.min(i.getX()-r.getX(),r.getRight()-i.getRight())),i.getY()<=r.getY()&&i.getBottom()>=r.getBottom()?n[1]+=Math.min(r.getY()-i.getY(),i.getBottom()-r.getBottom()):r.getY()<=i.getY()&&r.getBottom()>=i.getBottom()&&(n[1]+=Math.min(i.getY()-r.getY(),r.getBottom()-i.getBottom()));var a=Math.abs((r.getCenterY()-i.getCenterY())/(r.getCenterX()-i.getCenterX()));r.getCenterY()===i.getCenterY()&&r.getCenterX()===i.getCenterX()&&(a=1);var l=a*n[0],E=n[1]/a;n[0]<E?E=n[0]:l=n[1],n[0]=-1*h[0]*(E/2+o),n[1]=-1*h[1]*(l/2+o)},t.decideDirectionsForOverlappingNodes=function(i,r,n){i.getCenterX()<r.getCenterX()?n[0]=-1:n[0]=1,i.getCenterY()<r.getCenterY()?n[1]=-1:n[1]=1},t.getIntersection2=function(i,r,n){var o=i.getCenterX(),h=i.getCenterY(),a=r.getCenterX(),l=r.getCenterY();if(i.intersects(r))return n[0]=o,n[1]=h,n[2]=a,n[3]=l,!0;var E=i.getX(),m=i.getY(),g=i.getRight(),_=i.getX(),L=i.getBottom(),v=i.getRight(),T=i.getWidthHalf(),u=i.getHeightHalf(),I=r.getX(),s=r.getY(),c=r.getRight(),d=r.getX(),y=r.getBottom(),O=r.getRight(),D=r.getWidthHalf(),w=r.getHeightHalf(),R=!1,C=!1;if(o===a){if(h>l)return n[0]=o,n[1]=m,n[2]=a,n[3]=y,!1;if(h<l)return n[0]=o,n[1]=L,n[2]=a,n[3]=s,!1}else if(h===l){if(o>a)return n[0]=E,n[1]=h,n[2]=c,n[3]=l,!1;if(o<a)return n[0]=g,n[1]=h,n[2]=I,n[3]=l,!1}else{var M=i.height/i.width,S=r.height/r.width,G=(l-h)/(a-o),Y=void 0,F=void 0,P=void 0,b=void 0,k=void 0,U=void 0;if(-M===G?o>a?(n[0]=_,n[1]=L,R=!0):(n[0]=g,n[1]=m,R=!0):M===G&&(o>a?(n[0]=E,n[1]=m,R=!0):(n[0]=v,n[1]=L,R=!0)),-S===G?a>o?(n[2]=d,n[3]=y,C=!0):(n[2]=c,n[3]=s,C=!0):S===G&&(a>o?(n[2]=I,n[3]=s,C=!0):(n[2]=O,n[3]=y,C=!0)),R&&C)return!1;if(o>a?h>l?(Y=this.getCardinalDirection(M,G,4),F=this.getCardinalDirection(S,G,2)):(Y=this.getCardinalDirection(-M,G,3),F=this.getCardinalDirection(-S,G,1)):h>l?(Y=this.getCardinalDirection(-M,G,1),F=this.getCardinalDirection(-S,G,3)):(Y=this.getCardinalDirection(M,G,2),F=this.getCardinalDirection(S,G,4)),!R)switch(Y){case 1:b=m,P=o+-u/G,n[0]=P,n[1]=b;break;case 2:P=v,b=h+T*G,n[0]=P,n[1]=b;break;case 3:b=L,P=o+u/G,n[0]=P,n[1]=b;break;case 4:P=_,b=h+-T*G,n[0]=P,n[1]=b}if(!C)switch(F){case 1:U=s,k=a+-w/G,n[2]=k,n[3]=U;break;case 2:k=O,U=l+D*G,n[2]=k,n[3]=U;break;case 3:U=y,k=a+w/G,n[2]=k,n[3]=U;break;case 4:k=d,U=l+-D*G,n[2]=k,n[3]=U}}return!1},t.getCardinalDirection=function(i,r,n){return i>r?n:1+n%4},t.getIntersection=function(i,r,n,o){if(o==null)return this.getIntersection2(i,r,n);var h,a,l,E,m,g,_,L=i.x,v=i.y,T=r.x,u=r.y,I=n.x,s=n.y,c=o.x,d=o.y;return(_=(h=u-v)*(E=I-c)-(a=d-s)*(l=L-T))===0?null:new e((l*(g=c*s-I*d)-E*(m=T*v-L*u))/_,(a*m-h*g)/_)},t.angleOfVector=function(i,r,n,o){var h=void 0;return i!==n?(h=Math.atan((o-r)/(n-i)),n<i?h+=Math.PI:o<r&&(h+=this.TWO_PI)):h=o<r?this.ONE_AND_HALF_PI:this.HALF_PI,h},t.doIntersect=function(i,r,n,o){var h=i.x,a=i.y,l=r.x,E=r.y,m=n.x,g=n.y,_=o.x,L=o.y,v=(l-h)*(L-g)-(_-m)*(E-a);if(v===0)return!1;var T=((L-g)*(_-h)+(m-_)*(L-a))/v,u=((a-E)*(_-h)+(l-h)*(L-a))/v;return 0<T&&T<1&&0<u&&u<1},t.HALF_PI=.5*Math.PI,t.ONE_AND_HALF_PI=1.5*Math.PI,t.TWO_PI=2*Math.PI,t.THREE_PI=3*Math.PI,A.exports=t},function(A,f,p){function e(){}e.sign=function(t){return t>0?1:t<0?-1:0},e.floor=function(t){return t<0?Math.ceil(t):Math.floor(t)},e.ceil=function(t){return t<0?Math.floor(t):Math.ceil(t)},A.exports=e},function(A,f,p){function e(){}e.MAX_VALUE=2147483647,e.MIN_VALUE=-2147483648,A.exports=e},function(A,f,p){var e=function(){function o(h,a){for(var l=0;l<a.length;l++){var E=a[l];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(h,E.key,E)}}return function(h,a,l){return a&&o(h.prototype,a),l&&o(h,l),h}}(),t=function(o){return{value:o,next:null,prev:null}},i=function(o,h,a,l){return o!==null?o.next=h:l.head=h,a!==null?a.prev=h:l.tail=h,h.prev=o,h.next=a,l.length++,h},r=function(o,h){var a=o.prev,l=o.next;return a!==null?a.next=l:h.head=l,l!==null?l.prev=a:h.tail=a,o.prev=o.next=null,h.length--,o},n=function(){function o(h){var a=this;(function(l,E){if(!(l instanceof E))throw new TypeError("Cannot call a class as a function")})(this,o),this.length=0,this.head=null,this.tail=null,h!=null&&h.forEach(function(l){return a.push(l)})}return e(o,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(h,a){return i(a.prev,t(h),a,this)}},{key:"insertAfter",value:function(h,a){return i(a,t(h),a.next,this)}},{key:"insertNodeBefore",value:function(h,a){return i(a.prev,h,a,this)}},{key:"insertNodeAfter",value:function(h,a){return i(a,h,a.next,this)}},{key:"push",value:function(h){return i(this.tail,t(h),null,this)}},{key:"unshift",value:function(h){return i(null,t(h),this.head,this)}},{key:"remove",value:function(h){return r(h,this)}},{key:"pop",value:function(){return r(this.tail,this).value}},{key:"popNode",value:function(){return r(this.tail,this)}},{key:"shift",value:function(){return r(this.head,this).value}},{key:"shiftNode",value:function(){return r(this.head,this)}},{key:"get_object_at",value:function(h){if(h<=this.length()){for(var a=1,l=this.head;a<h;)l=l.next,a++;return l.value}}},{key:"set_object_at",value:function(h,a){if(h<=this.length()){for(var l=1,E=this.head;l<h;)E=E.next,l++;E.value=a}}}]),o}();A.exports=n},function(A,f,p){function e(t,i,r){this.x=null,this.y=null,t==null&&i==null&&r==null?(this.x=0,this.y=0):typeof t=="number"&&typeof i=="number"&&r==null?(this.x=t,this.y=i):t.constructor.name=="Point"&&i==null&&r==null&&(r=t,this.x=r.x,this.y=r.y)}e.prototype.getX=function(){return this.x},e.prototype.getY=function(){return this.y},e.prototype.getLocation=function(){return new e(this.x,this.y)},e.prototype.setLocation=function(t,i,r){t.constructor.name=="Point"&&i==null&&r==null?(r=t,this.setLocation(r.x,r.y)):typeof t=="number"&&typeof i=="number"&&r==null&&(parseInt(t)==t&&parseInt(i)==i?this.move(t,i):(this.x=Math.floor(t+.5),this.y=Math.floor(i+.5)))},e.prototype.move=function(t,i){this.x=t,this.y=i},e.prototype.translate=function(t,i){this.x+=t,this.y+=i},e.prototype.equals=function(t){if(t.constructor.name=="Point"){var i=t;return this.x==i.x&&this.y==i.y}return this==t},e.prototype.toString=function(){return new e().constructor.name+"[x="+this.x+",y="+this.y+"]"},A.exports=e},function(A,f,p){function e(t,i,r,n){this.x=0,this.y=0,this.width=0,this.height=0,t!=null&&i!=null&&r!=null&&n!=null&&(this.x=t,this.y=i,this.width=r,this.height=n)}e.prototype.getX=function(){return this.x},e.prototype.setX=function(t){this.x=t},e.prototype.getY=function(){return this.y},e.prototype.setY=function(t){this.y=t},e.prototype.getWidth=function(){return this.width},e.prototype.setWidth=function(t){this.width=t},e.prototype.getHeight=function(){return this.height},e.prototype.setHeight=function(t){this.height=t},e.prototype.getRight=function(){return this.x+this.width},e.prototype.getBottom=function(){return this.y+this.height},e.prototype.intersects=function(t){return!(this.getRight()<t.x||this.getBottom()<t.y||t.getRight()<this.x||t.getBottom()<this.y)},e.prototype.getCenterX=function(){return this.x+this.width/2},e.prototype.getMinX=function(){return this.getX()},e.prototype.getMaxX=function(){return this.getX()+this.width},e.prototype.getCenterY=function(){return this.y+this.height/2},e.prototype.getMinY=function(){return this.getY()},e.prototype.getMaxY=function(){return this.getY()+this.height},e.prototype.getWidthHalf=function(){return this.width/2},e.prototype.getHeightHalf=function(){return this.height/2},A.exports=e},function(A,f,p){var e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i};function t(){}t.lastID=0,t.createID=function(i){return t.isPrimitive(i)?i:(i.uniqueID!=null||(i.uniqueID=t.getString(),t.lastID++),i.uniqueID)},t.getString=function(i){return i==null&&(i=t.lastID),"Object#"+i},t.isPrimitive=function(i){var r=i===void 0?"undefined":e(i);return i==null||r!="object"&&r!="function"},A.exports=t},function(A,f,p){function e(m){if(Array.isArray(m)){for(var g=0,_=Array(m.length);g<m.length;g++)_[g]=m[g];return _}return Array.from(m)}var t=p(0),i=p(6),r=p(3),n=p(1),o=p(5),h=p(4),a=p(17),l=p(27);function E(m){l.call(this),this.layoutQuality=t.QUALITY,this.createBendsAsNeeded=t.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=t.DEFAULT_INCREMENTAL,this.animationOnLayout=t.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=t.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=t.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=t.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new i(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,m!=null&&(this.isRemoteUse=m)}E.RANDOM_SEED=1,E.prototype=Object.create(l.prototype),E.prototype.getGraphManager=function(){return this.graphManager},E.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},E.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},E.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},E.prototype.newGraphManager=function(){var m=new i(this);return this.graphManager=m,m},E.prototype.newGraph=function(m){return new o(null,this.graphManager,m)},E.prototype.newNode=function(m){return new r(this.graphManager,m)},E.prototype.newEdge=function(m){return new n(null,null,m)},E.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},E.prototype.runLayout=function(){var m;return this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters(),m=!this.checkLayoutSuccess()&&this.layout(),t.ANIMATE!=="during"&&(m&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,m)},E.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},E.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var m=this.graphManager.getAllEdges(),g=0;g<m.length;g++)m[g];var _=this.graphManager.getRoot().getNodes();for(g=0;g<_.length;g++)_[g];this.update(this.graphManager.getRoot())}},E.prototype.update=function(m){if(m==null)this.update2();else if(m instanceof r){var g=m;if(g.getChild()!=null)for(var _=g.getChild().getNodes(),L=0;L<_.length;L++)update(_[L]);g.vGraphObject!=null&&g.vGraphObject.update(g)}else if(m instanceof n){var v=m;v.vGraphObject!=null&&v.vGraphObject.update(v)}else if(m instanceof o){var T=m;T.vGraphObject!=null&&T.vGraphObject.update(T)}},E.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=t.QUALITY,this.animationDuringLayout=t.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=t.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=t.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=t.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=t.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=t.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},E.prototype.transform=function(m){if(m==null)this.transform(new h(0,0));else{var g=new a,_=this.graphManager.getRoot().updateLeftTop();if(_!=null){g.setWorldOrgX(m.x),g.setWorldOrgY(m.y),g.setDeviceOrgX(_.x),g.setDeviceOrgY(_.y);for(var L=this.getAllNodes(),v=0;v<L.length;v++)L[v].transform(g)}}},E.prototype.positionNodesRandomly=function(m){if(m==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var g,_,L=m.getNodes(),v=0;v<L.length;v++)(_=(g=L[v]).getChild())==null||_.getNodes().length==0?g.scatter():(this.positionNodesRandomly(_),g.updateBounds())},E.prototype.getFlatForest=function(){for(var m=[],g=!0,_=this.graphManager.getRoot().getNodes(),L=!0,v=0;v<_.length;v++)_[v].getChild()!=null&&(L=!1);if(!L)return m;var T=new Set,u=[],I=new Map,s=[];for(s=s.concat(_);s.length>0&&g;){for(u.push(s[0]);u.length>0&&g;){var c=u[0];u.splice(0,1),T.add(c);var d=c.getEdges();for(v=0;v<d.length;v++){var y=d[v].getOtherEnd(c);if(I.get(c)!=y){if(T.has(y)){g=!1;break}u.push(y),I.set(y,c)}}}if(g){var O=[].concat(e(T));for(m.push(O),v=0;v<O.length;v++){var D=O[v],w=s.indexOf(D);w>-1&&s.splice(w,1)}T=new Set,I=new Map}else m=[]}return m},E.prototype.createDummyNodesForBendpoints=function(m){for(var g=[],_=m.source,L=this.graphManager.calcLowestCommonAncestor(m.source,m.target),v=0;v<m.bendpoints.length;v++){var T=this.newNode(null);T.setRect(new Point(0,0),new Dimension(1,1)),L.add(T);var u=this.newEdge(null);this.graphManager.add(u,_,T),g.add(T),_=T}return u=this.newEdge(null),this.graphManager.add(u,_,m.target),this.edgeToDummyNodes.set(m,g),m.isInterGraph()?this.graphManager.remove(m):L.remove(m),g},E.prototype.createBendpointsFromDummyNodes=function(){var m=[];m=m.concat(this.graphManager.getAllEdges()),m=[].concat(e(this.edgeToDummyNodes.keys())).concat(m);for(var g=0;g<m.length;g++){var _=m[g];if(_.bendpoints.length>0){for(var L=this.edgeToDummyNodes.get(_),v=0;v<L.length;v++){var T=L[v],u=new h(T.getCenterX(),T.getCenterY()),I=_.bendpoints.get(v);I.x=u.x,I.y=u.y,T.getOwner().remove(T)}this.graphManager.add(_,_.source,_.target)}}},E.transform=function(m,g,_,L){if(_!=null&&L!=null){var v=g;return m<=50?v-=(g-g/_)/50*(50-m):v+=(g*L-g)/50*(m-50),v}var T,u;return m<=50?(T=9*g/500,u=g/10):(T=9*g/50,u=-8*g),T*m+u},E.findCenterOfTree=function(m){var g=[];g=g.concat(m);var _=[],L=new Map,v=!1,T=null;g.length!=1&&g.length!=2||(v=!0,T=g[0]);for(var u=0;u<g.length;u++){var I=(d=g[u]).getNeighborsList().size;L.set(d,d.getNeighborsList().size),I==1&&_.push(d)}var s=[];for(s=s.concat(_);!v;){var c=[];for(c=c.concat(s),s=[],u=0;u<g.length;u++){var d=g[u],y=g.indexOf(d);y>=0&&g.splice(y,1),d.getNeighborsList().forEach(function(O){if(_.indexOf(O)<0){var D=L.get(O)-1;D==1&&s.push(O),L.set(O,D)}})}_=_.concat(s),g.length!=1&&g.length!=2||(v=!0,T=g[0])}return T},E.prototype.setGraphManager=function(m){this.graphManager=m},A.exports=E},function(A,f,p){function e(){}e.seed=1,e.x=0,e.nextDouble=function(){return e.x=1e4*Math.sin(e.seed++),e.x-Math.floor(e.x)},A.exports=e},function(A,f,p){var e=p(4);function t(i,r){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}t.prototype.getWorldOrgX=function(){return this.lworldOrgX},t.prototype.setWorldOrgX=function(i){this.lworldOrgX=i},t.prototype.getWorldOrgY=function(){return this.lworldOrgY},t.prototype.setWorldOrgY=function(i){this.lworldOrgY=i},t.prototype.getWorldExtX=function(){return this.lworldExtX},t.prototype.setWorldExtX=function(i){this.lworldExtX=i},t.prototype.getWorldExtY=function(){return this.lworldExtY},t.prototype.setWorldExtY=function(i){this.lworldExtY=i},t.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},t.prototype.setDeviceOrgX=function(i){this.ldeviceOrgX=i},t.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},t.prototype.setDeviceOrgY=function(i){this.ldeviceOrgY=i},t.prototype.getDeviceExtX=function(){return this.ldeviceExtX},t.prototype.setDeviceExtX=function(i){this.ldeviceExtX=i},t.prototype.getDeviceExtY=function(){return this.ldeviceExtY},t.prototype.setDeviceExtY=function(i){this.ldeviceExtY=i},t.prototype.transformX=function(i){var r=0,n=this.lworldExtX;return n!=0&&(r=this.ldeviceOrgX+(i-this.lworldOrgX)*this.ldeviceExtX/n),r},t.prototype.transformY=function(i){var r=0,n=this.lworldExtY;return n!=0&&(r=this.ldeviceOrgY+(i-this.lworldOrgY)*this.ldeviceExtY/n),r},t.prototype.inverseTransformX=function(i){var r=0,n=this.ldeviceExtX;return n!=0&&(r=this.lworldOrgX+(i-this.ldeviceOrgX)*this.lworldExtX/n),r},t.prototype.inverseTransformY=function(i){var r=0,n=this.ldeviceExtY;return n!=0&&(r=this.lworldOrgY+(i-this.ldeviceOrgY)*this.lworldExtY/n),r},t.prototype.inverseTransformPoint=function(i){return new e(this.inverseTransformX(i.x),this.inverseTransformY(i.y))},A.exports=t},function(A,f,p){var e=p(15),t=p(7),i=p(0),r=p(8),n=p(9);function o(){e.call(this),this.useSmartIdealEdgeLengthCalculation=t.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=t.DEFAULT_EDGE_LENGTH,this.springConstant=t.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=t.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=t.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=t.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=t.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*t.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=t.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=t.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=t.MAX_ITERATIONS}for(var h in o.prototype=Object.create(e.prototype),e)o[h]=e[h];o.prototype.initParameters=function(){e.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=t.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},o.prototype.calcIdealEdgeLengths=function(){for(var a,l,E,m,g,_,L=this.getGraphManager().getAllEdges(),v=0;v<L.length;v++)(a=L[v]).idealLength=this.idealEdgeLength,a.isInterGraph&&(E=a.getSource(),m=a.getTarget(),g=a.getSourceInLca().getEstimatedSize(),_=a.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(a.idealLength+=g+_-2*i.SIMPLE_NODE_SIZE),l=a.getLca().getInclusionTreeDepth(),a.idealLength+=t.DEFAULT_EDGE_LENGTH*t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(E.getInclusionTreeDepth()+m.getInclusionTreeDepth()-2*l))},o.prototype.initSpringEmbedder=function(){var a=this.getAllNodes().length;this.incremental?(a>t.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*t.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(a-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-t.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT_INCREMENTAL):(a>t.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(t.COOLING_ADAPTATION_FACTOR,1-(a-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*(1-t.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},o.prototype.calcSpringForces=function(){for(var a,l=this.getAllEdges(),E=0;E<l.length;E++)a=l[E],this.calcSpringForce(a,a.idealLength)},o.prototype.calcRepulsionForces=function(){var a,l,E,m,g,_=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],L=arguments.length>1&&arguments[1]!==void 0&&arguments[1],v=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&_&&this.updateGrid(),g=new Set,a=0;a<v.length;a++)E=v[a],this.calculateRepulsionForceOfANode(E,g,_,L),g.add(E);else for(a=0;a<v.length;a++)for(E=v[a],l=a+1;l<v.length;l++)m=v[l],E.getOwner()==m.getOwner()&&this.calcRepulsionForce(E,m)},o.prototype.calcGravitationalForces=function(){for(var a,l=this.getAllNodesToApplyGravitation(),E=0;E<l.length;E++)a=l[E],this.calcGravitationalForce(a)},o.prototype.moveNodes=function(){for(var a=this.getAllNodes(),l=0;l<a.length;l++)a[l].move()},o.prototype.calcSpringForce=function(a,l){var E,m,g,_,L=a.getSource(),v=a.getTarget();if(this.uniformLeafNodeSizes&&L.getChild()==null&&v.getChild()==null)a.updateLengthSimple();else if(a.updateLength(),a.isOverlapingSourceAndTarget)return;(E=a.getLength())!=0&&(g=(m=this.springConstant*(E-l))*(a.lengthX/E),_=m*(a.lengthY/E),L.springForceX+=g,L.springForceY+=_,v.springForceX-=g,v.springForceY-=_)},o.prototype.calcRepulsionForce=function(a,l){var E,m,g,_,L,v,T,u=a.getRect(),I=l.getRect(),s=new Array(2),c=new Array(4);if(u.intersects(I)){r.calcSeparationAmount(u,I,s,t.DEFAULT_EDGE_LENGTH/2),v=2*s[0],T=2*s[1];var d=a.noOfChildren*l.noOfChildren/(a.noOfChildren+l.noOfChildren);a.repulsionForceX-=d*v,a.repulsionForceY-=d*T,l.repulsionForceX+=d*v,l.repulsionForceY+=d*T}else this.uniformLeafNodeSizes&&a.getChild()==null&&l.getChild()==null?(E=I.getCenterX()-u.getCenterX(),m=I.getCenterY()-u.getCenterY()):(r.getIntersection(u,I,c),E=c[2]-c[0],m=c[3]-c[1]),Math.abs(E)<t.MIN_REPULSION_DIST&&(E=n.sign(E)*t.MIN_REPULSION_DIST),Math.abs(m)<t.MIN_REPULSION_DIST&&(m=n.sign(m)*t.MIN_REPULSION_DIST),g=E*E+m*m,_=Math.sqrt(g),v=(L=this.repulsionConstant*a.noOfChildren*l.noOfChildren/g)*E/_,T=L*m/_,a.repulsionForceX-=v,a.repulsionForceY-=T,l.repulsionForceX+=v,l.repulsionForceY+=T},o.prototype.calcGravitationalForce=function(a){var l,E,m,g,_,L,v,T;E=((l=a.getOwner()).getRight()+l.getLeft())/2,m=(l.getTop()+l.getBottom())/2,g=a.getCenterX()-E,_=a.getCenterY()-m,L=Math.abs(g)+a.getWidth()/2,v=Math.abs(_)+a.getHeight()/2,a.getOwner()==this.graphManager.getRoot()?(L>(T=l.getEstimatedSize()*this.gravityRangeFactor)||v>T)&&(a.gravitationForceX=-this.gravityConstant*g,a.gravitationForceY=-this.gravityConstant*_):(L>(T=l.getEstimatedSize()*this.compoundGravityRangeFactor)||v>T)&&(a.gravitationForceX=-this.gravityConstant*g*this.compoundGravityConstant,a.gravitationForceY=-this.gravityConstant*_*this.compoundGravityConstant)},o.prototype.isConverged=function(){var a,l=!1;return this.totalIterations>this.maxIterations/3&&(l=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),a=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,a||l},o.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},o.prototype.calcNoOfChildrenForAllNodes=function(){for(var a,l=this.graphManager.getAllNodes(),E=0;E<l.length;E++)(a=l[E]).noOfChildren=a.getNoOfChildren()},o.prototype.calcGrid=function(a){var l,E;l=parseInt(Math.ceil((a.getRight()-a.getLeft())/this.repulsionRange)),E=parseInt(Math.ceil((a.getBottom()-a.getTop())/this.repulsionRange));for(var m=new Array(l),g=0;g<l;g++)m[g]=new Array(E);for(g=0;g<l;g++)for(var _=0;_<E;_++)m[g][_]=new Array;return m},o.prototype.addNodeToGrid=function(a,l,E){var m,g,_,L;m=parseInt(Math.floor((a.getRect().x-l)/this.repulsionRange)),g=parseInt(Math.floor((a.getRect().width+a.getRect().x-l)/this.repulsionRange)),_=parseInt(Math.floor((a.getRect().y-E)/this.repulsionRange)),L=parseInt(Math.floor((a.getRect().height+a.getRect().y-E)/this.repulsionRange));for(var v=m;v<=g;v++)for(var T=_;T<=L;T++)this.grid[v][T].push(a),a.setGridCoordinates(m,g,_,L)},o.prototype.updateGrid=function(){var a,l,E=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),a=0;a<E.length;a++)l=E[a],this.addNodeToGrid(l,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},o.prototype.calculateRepulsionForceOfANode=function(a,l,E,m){if(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&E||m){var g,_=new Set;a.surrounding=new Array;for(var L=this.grid,v=a.startX-1;v<a.finishX+2;v++)for(var T=a.startY-1;T<a.finishY+2;T++)if(!(v<0||T<0||v>=L.length||T>=L[0].length)){for(var u=0;u<L[v][T].length;u++)if(g=L[v][T][u],a.getOwner()==g.getOwner()&&a!=g&&!l.has(g)&&!_.has(g)){var I=Math.abs(a.getCenterX()-g.getCenterX())-(a.getWidth()/2+g.getWidth()/2),s=Math.abs(a.getCenterY()-g.getCenterY())-(a.getHeight()/2+g.getHeight()/2);I<=this.repulsionRange&&s<=this.repulsionRange&&_.add(g)}}a.surrounding=[].concat(function(c){if(Array.isArray(c)){for(var d=0,y=Array(c.length);d<c.length;d++)y[d]=c[d];return y}return Array.from(c)}(_))}for(v=0;v<a.surrounding.length;v++)this.calcRepulsionForce(a,a.surrounding[v])},o.prototype.calcRepulsionRange=function(){return 0},A.exports=o},function(A,f,p){var e=p(1),t=p(7);function i(n,o,h){e.call(this,n,o,h),this.idealLength=t.DEFAULT_EDGE_LENGTH}for(var r in i.prototype=Object.create(e.prototype),e)i[r]=e[r];A.exports=i},function(A,f,p){var e=p(3);function t(r,n,o,h){e.call(this,r,n,o,h),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}for(var i in t.prototype=Object.create(e.prototype),e)t[i]=e[i];t.prototype.setGridCoordinates=function(r,n,o,h){this.startX=r,this.finishX=n,this.startY=o,this.finishY=h},A.exports=t},function(A,f,p){function e(t,i){this.width=0,this.height=0,t!==null&&i!==null&&(this.height=i,this.width=t)}e.prototype.getWidth=function(){return this.width},e.prototype.setWidth=function(t){this.width=t},e.prototype.getHeight=function(){return this.height},e.prototype.setHeight=function(t){this.height=t},A.exports=e},function(A,f,p){var e=p(14);function t(){this.map={},this.keys=[]}t.prototype.put=function(i,r){var n=e.createID(i);this.contains(n)||(this.map[n]=r,this.keys.push(i))},t.prototype.contains=function(i){return e.createID(i),this.map[i]!=null},t.prototype.get=function(i){var r=e.createID(i);return this.map[r]},t.prototype.keySet=function(){return this.keys},A.exports=t},function(A,f,p){var e=p(14);function t(){this.set={}}t.prototype.add=function(i){var r=e.createID(i);this.contains(r)||(this.set[r]=i)},t.prototype.remove=function(i){delete this.set[e.createID(i)]},t.prototype.clear=function(){this.set={}},t.prototype.contains=function(i){return this.set[e.createID(i)]==i},t.prototype.isEmpty=function(){return this.size()===0},t.prototype.size=function(){return Object.keys(this.set).length},t.prototype.addAllTo=function(i){for(var r=Object.keys(this.set),n=r.length,o=0;o<n;o++)i.push(this.set[r[o]])},t.prototype.size=function(){return Object.keys(this.set).length},t.prototype.addAll=function(i){for(var r=i.length,n=0;n<r;n++){var o=i[n];this.add(o)}},A.exports=t},function(A,f,p){var e=function(){function r(n,o){for(var h=0;h<o.length;h++){var a=o[h];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(n,a.key,a)}}return function(n,o,h){return o&&r(n.prototype,o),h&&r(n,h),n}}(),t=p(11),i=function(){function r(n,o){(function(a,l){if(!(a instanceof l))throw new TypeError("Cannot call a class as a function")})(this,r),o===null&&o===void 0||(this.compareFunction=this._defaultCompareFunction);var h=void 0;h=n instanceof t?n.size():n.length,this._quicksort(n,0,h-1)}return e(r,[{key:"_quicksort",value:function(n,o,h){if(o<h){var a=this._partition(n,o,h);this._quicksort(n,o,a),this._quicksort(n,a+1,h)}}},{key:"_partition",value:function(n,o,h){for(var a=this._get(n,o),l=o,E=h;;){for(;this.compareFunction(a,this._get(n,E));)E--;for(;this.compareFunction(this._get(n,l),a);)l++;if(!(l<E))return E;this._swap(n,l,E),l++,E--}}},{key:"_get",value:function(n,o){return n instanceof t?n.get_object_at(o):n[o]}},{key:"_set",value:function(n,o,h){n instanceof t?n.set_object_at(o,h):n[o]=h}},{key:"_swap",value:function(n,o,h){var a=this._get(n,o);this._set(n,o,this._get(n,h)),this._set(n,h,a)}},{key:"_defaultCompareFunction",value:function(n,o){return o>n}}]),r}();A.exports=i},function(A,f,p){var e=function(){function i(r,n){for(var o=0;o<n.length;o++){var h=n[o];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(r,h.key,h)}}return function(r,n,o){return n&&i(r.prototype,n),o&&i(r,o),r}}(),t=function(){function i(r,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;(function(_,L){if(!(_ instanceof L))throw new TypeError("Cannot call a class as a function")})(this,i),this.sequence1=r,this.sequence2=n,this.match_score=o,this.mismatch_penalty=h,this.gap_penalty=a,this.iMax=r.length+1,this.jMax=n.length+1,this.grid=new Array(this.iMax);for(var l=0;l<this.iMax;l++){this.grid[l]=new Array(this.jMax);for(var E=0;E<this.jMax;E++)this.grid[l][E]=0}this.tracebackGrid=new Array(this.iMax);for(var m=0;m<this.iMax;m++){this.tracebackGrid[m]=new Array(this.jMax);for(var g=0;g<this.jMax;g++)this.tracebackGrid[m][g]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return e(i,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var r=1;r<this.jMax;r++)this.grid[0][r]=this.grid[0][r-1]+this.gap_penalty,this.tracebackGrid[0][r]=[!1,!1,!0];for(var n=1;n<this.iMax;n++)this.grid[n][0]=this.grid[n-1][0]+this.gap_penalty,this.tracebackGrid[n][0]=[!1,!0,!1];for(var o=1;o<this.iMax;o++)for(var h=1;h<this.jMax;h++){var a=[this.sequence1[o-1]===this.sequence2[h-1]?this.grid[o-1][h-1]+this.match_score:this.grid[o-1][h-1]+this.mismatch_penalty,this.grid[o-1][h]+this.gap_penalty,this.grid[o][h-1]+this.gap_penalty],l=this.arrayAllMaxIndexes(a);this.grid[o][h]=a[l[0]],this.tracebackGrid[o][h]=[l.includes(0),l.includes(1),l.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var r=[];for(r.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});r[0];){var n=r[0],o=this.tracebackGrid[n.pos[0]][n.pos[1]];o[0]&&r.push({pos:[n.pos[0]-1,n.pos[1]-1],seq1:this.sequence1[n.pos[0]-1]+n.seq1,seq2:this.sequence2[n.pos[1]-1]+n.seq2}),o[1]&&r.push({pos:[n.pos[0]-1,n.pos[1]],seq1:this.sequence1[n.pos[0]-1]+n.seq1,seq2:"-"+n.seq2}),o[2]&&r.push({pos:[n.pos[0],n.pos[1]-1],seq1:"-"+n.seq1,seq2:this.sequence2[n.pos[1]-1]+n.seq2}),n.pos[0]===0&&n.pos[1]===0&&this.alignments.push({sequence1:n.seq1,sequence2:n.seq2}),r.shift()}return this.alignments}},{key:"getAllIndexes",value:function(r,n){for(var o=[],h=-1;(h=r.indexOf(n,h+1))!==-1;)o.push(h);return o}},{key:"arrayAllMaxIndexes",value:function(r){return this.getAllIndexes(r,Math.max.apply(null,r))}}]),i}();A.exports=t},function(A,f,p){var e=function(){};e.FDLayout=p(18),e.FDLayoutConstants=p(7),e.FDLayoutEdge=p(19),e.FDLayoutNode=p(20),e.DimensionD=p(21),e.HashMap=p(22),e.HashSet=p(23),e.IGeometry=p(8),e.IMath=p(9),e.Integer=p(10),e.Point=p(12),e.PointD=p(4),e.RandomSeed=p(16),e.RectangleD=p(13),e.Transform=p(17),e.UniqueIDGeneretor=p(14),e.Quicksort=p(24),e.LinkedList=p(11),e.LGraphObject=p(2),e.LGraph=p(5),e.LEdge=p(1),e.LGraphManager=p(6),e.LNode=p(3),e.Layout=p(15),e.LayoutConstants=p(0),e.NeedlemanWunsch=p(25),A.exports=e},function(A,f,p){function e(){this.listeners=[]}var t=e.prototype;t.addListener=function(i,r){this.listeners.push({event:i,callback:r})},t.removeListener=function(i,r){for(var n=this.listeners.length;n>=0;n--){var o=this.listeners[n];o.event===i&&o.callback===r&&this.listeners.splice(n,1)}},t.emit=function(i,r){for(var n=0;n<this.listeners.length;n++){var o=this.listeners[n];i===o.event&&o.callback(r)}},A.exports=e}])},lt.exports=N());var N}var gt,ct,ut,wt=(ct||(ct=1,ut=function(N){return function(A){var f={};function p(e){if(f[e])return f[e].exports;var t=f[e]={i:e,l:!1,exports:{}};return A[e].call(t.exports,t,t.exports,p),t.l=!0,t.exports}return p.m=A,p.c=f,p.i=function(e){return e},p.d=function(e,t,i){p.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},p.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return p.d(t,"a",t),t},p.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},p.p="",p(p.s=1)}([function(A,f){A.exports=N},function(A,f,p){var e=p(0).layoutBase.LayoutConstants,t=p(0).layoutBase.FDLayoutConstants,i=p(0).CoSEConstants,r=p(0).CoSELayout,n=p(0).CoSENode,o=p(0).layoutBase.PointD,h=p(0).layoutBase.DimensionD,a={ready:function(){},stop:function(){},quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function l(g){this.options=function(_,L){var v={};for(var T in _)v[T]=_[T];for(var T in L)v[T]=L[T];return v}(a,g),E(this.options)}var E=function(g){g.nodeRepulsion!=null&&(i.DEFAULT_REPULSION_STRENGTH=t.DEFAULT_REPULSION_STRENGTH=g.nodeRepulsion),g.idealEdgeLength!=null&&(i.DEFAULT_EDGE_LENGTH=t.DEFAULT_EDGE_LENGTH=g.idealEdgeLength),g.edgeElasticity!=null&&(i.DEFAULT_SPRING_STRENGTH=t.DEFAULT_SPRING_STRENGTH=g.edgeElasticity),g.nestingFactor!=null&&(i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=g.nestingFactor),g.gravity!=null&&(i.DEFAULT_GRAVITY_STRENGTH=t.DEFAULT_GRAVITY_STRENGTH=g.gravity),g.numIter!=null&&(i.MAX_ITERATIONS=t.MAX_ITERATIONS=g.numIter),g.gravityRange!=null&&(i.DEFAULT_GRAVITY_RANGE_FACTOR=t.DEFAULT_GRAVITY_RANGE_FACTOR=g.gravityRange),g.gravityCompound!=null&&(i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.DEFAULT_COMPOUND_GRAVITY_STRENGTH=g.gravityCompound),g.gravityRangeCompound!=null&&(i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=g.gravityRangeCompound),g.initialEnergyOnIncremental!=null&&(i.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.DEFAULT_COOLING_FACTOR_INCREMENTAL=g.initialEnergyOnIncremental),g.quality=="draft"?e.QUALITY=0:g.quality=="proof"?e.QUALITY=2:e.QUALITY=1,i.NODE_DIMENSIONS_INCLUDE_LABELS=t.NODE_DIMENSIONS_INCLUDE_LABELS=e.NODE_DIMENSIONS_INCLUDE_LABELS=g.nodeDimensionsIncludeLabels,i.DEFAULT_INCREMENTAL=t.DEFAULT_INCREMENTAL=e.DEFAULT_INCREMENTAL=!g.randomize,i.ANIMATE=t.ANIMATE=e.ANIMATE=g.animate,i.TILE=g.tile,i.TILING_PADDING_VERTICAL=typeof g.tilingPaddingVertical=="function"?g.tilingPaddingVertical.call():g.tilingPaddingVertical,i.TILING_PADDING_HORIZONTAL=typeof g.tilingPaddingHorizontal=="function"?g.tilingPaddingHorizontal.call():g.tilingPaddingHorizontal};l.prototype.run=function(){var g,_,L=this.options;this.idToLNode={};var v=this.layout=new r,T=this;T.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var u=v.newGraphManager();this.gm=u;var I=this.options.eles.nodes(),s=this.options.eles.edges();this.root=u.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(I),v);for(var c=0;c<s.length;c++){var d=s[c],y=this.idToLNode[d.data("source")],O=this.idToLNode[d.data("target")];y!==O&&y.getEdgesBetween(O).length==0&&(u.add(v.newEdge(),y,O).id=d.id())}var D=function(R,C){typeof R=="number"&&(R=C);var M=R.data("id"),S=T.idToLNode[M];return{x:S.getRect().getCenterX(),y:S.getRect().getCenterY()}},w=function R(){for(var C,M=function(){L.fit&&L.cy.fit(L.eles,L.padding),g||(g=!0,T.cy.one("layoutready",L.ready),T.cy.trigger({type:"layoutready",layout:T}))},S=T.options.refresh,G=0;G<S&&!C;G++)C=T.stopped||T.layout.tick();if(C)return v.checkLayoutSuccess()&&!v.isSubLayout&&v.doPostLayout(),v.tilingPostLayout&&v.tilingPostLayout(),v.isLayoutFinished=!0,T.options.eles.nodes().positions(D),M(),T.cy.one("layoutstop",T.options.stop),T.cy.trigger({type:"layoutstop",layout:T}),_&&cancelAnimationFrame(_),void(g=!1);var Y=T.layout.getPositionsData();L.eles.nodes().positions(function(F,P){if(typeof F=="number"&&(F=P),!F.isParent()){for(var b=F.id(),k=Y[b],U=F;k==null&&(k=Y[U.data("parent")]||Y["DummyCompound_"+U.data("parent")],Y[b]=k,(U=U.parent()[0])!=null););return k!=null?{x:k.x,y:k.y}:{x:F.position("x"),y:F.position("y")}}}),M(),_=requestAnimationFrame(R)};return v.addListener("layoutstarted",function(){T.options.animate==="during"&&(_=requestAnimationFrame(w))}),v.runLayout(),this.options.animate!=="during"&&(T.options.eles.nodes().not(":parent").layoutPositions(T,T.options,D),g=!1),this},l.prototype.getTopMostNodes=function(g){for(var _={},L=0;L<g.length;L++)_[g[L].id()]=!0;var v=g.filter(function(T,u){typeof T=="number"&&(T=u);for(var I=T.parent()[0];I!=null;){if(_[I.id()])return!1;I=I.parent()[0]}return!0});return v},l.prototype.processChildrenList=function(g,_,L){for(var v=_.length,T=0;T<v;T++){var u,I,s=_[T],c=s.children(),d=s.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if((u=s.outerWidth()!=null&&s.outerHeight()!=null?g.add(new n(L.graphManager,new o(s.position("x")-d.w/2,s.position("y")-d.h/2),new h(parseFloat(d.w),parseFloat(d.h)))):g.add(new n(this.graphManager))).id=s.data("id"),u.paddingLeft=parseInt(s.css("padding")),u.paddingTop=parseInt(s.css("padding")),u.paddingRight=parseInt(s.css("padding")),u.paddingBottom=parseInt(s.css("padding")),this.options.nodeDimensionsIncludeLabels&&s.isParent()){var y=s.boundingBox({includeLabels:!0,includeNodes:!1}).w,O=s.boundingBox({includeLabels:!0,includeNodes:!1}).h,D=s.css("text-halign");u.labelWidth=y,u.labelHeight=O,u.labelPos=D}this.idToLNode[s.data("id")]=u,isNaN(u.rect.x)&&(u.rect.x=0),isNaN(u.rect.y)&&(u.rect.y=0),c!=null&&c.length>0&&(I=L.getGraphManager().add(L.newGraph(),u),this.processChildrenList(I,c,L))}},l.prototype.stop=function(){return this.stopped=!0,this};var m=function(g){g("layout","cose-bilkent",l)};typeof cytoscape<"u"&&m(cytoscape),A.exports=m}])},at.exports=ut(function(){return gt?ht.exports:(gt=1,N=function(A){return function(f){var p={};function e(t){if(p[t])return p[t].exports;var i=p[t]={i:t,l:!1,exports:{}};return f[t].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=f,e.c=p,e.i=function(t){return t},e.d=function(t,i,r){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},e.p="",e(e.s=7)}([function(f,p){f.exports=A},function(f,p,e){var t=e(0).FDLayoutConstants;function i(){}for(var r in t)i[r]=t[r];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=t.DEFAULT_EDGE_LENGTH,i.DEFAULT_COMPONENT_SEPERATION=60,i.TILE=!0,i.TILING_PADDING_VERTICAL=10,i.TILING_PADDING_HORIZONTAL=10,i.TREE_REDUCTION_ON_INCREMENTAL=!1,f.exports=i},function(f,p,e){var t=e(0).FDLayoutEdge;function i(n,o,h){t.call(this,n,o,h)}for(var r in i.prototype=Object.create(t.prototype),t)i[r]=t[r];f.exports=i},function(f,p,e){var t=e(0).LGraph;function i(n,o,h){t.call(this,n,o,h)}for(var r in i.prototype=Object.create(t.prototype),t)i[r]=t[r];f.exports=i},function(f,p,e){var t=e(0).LGraphManager;function i(n){t.call(this,n)}for(var r in i.prototype=Object.create(t.prototype),t)i[r]=t[r];f.exports=i},function(f,p,e){var t=e(0).FDLayoutNode,i=e(0).IMath;function r(o,h,a,l){t.call(this,o,h,a,l)}for(var n in r.prototype=Object.create(t.prototype),t)r[n]=t[n];r.prototype.move=function(){var o=this.graphManager.getLayout();this.displacementX=o.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=o.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>o.coolingFactor*o.maxNodeDisplacement&&(this.displacementX=o.coolingFactor*o.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>o.coolingFactor*o.maxNodeDisplacement&&(this.displacementY=o.coolingFactor*o.maxNodeDisplacement*i.sign(this.displacementY)),this.child==null||this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),o.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},r.prototype.propogateDisplacementToChildren=function(o,h){for(var a,l=this.getChild().getNodes(),E=0;E<l.length;E++)(a=l[E]).getChild()==null?(a.moveBy(o,h),a.displacementX+=o,a.displacementY+=h):a.propogateDisplacementToChildren(o,h)},r.prototype.setPred1=function(o){this.pred1=o},r.prototype.getPred1=function(){return pred1},r.prototype.getPred2=function(){return pred2},r.prototype.setNext=function(o){this.next=o},r.prototype.getNext=function(){return next},r.prototype.setProcessed=function(o){this.processed=o},r.prototype.isProcessed=function(){return processed},f.exports=r},function(f,p,e){var t=e(0).FDLayout,i=e(4),r=e(3),n=e(5),o=e(2),h=e(1),a=e(0).FDLayoutConstants,l=e(0).LayoutConstants,E=e(0).Point,m=e(0).PointD,g=e(0).Layout,_=e(0).Integer,L=e(0).IGeometry,v=e(0).LGraph,T=e(0).Transform;function u(){t.call(this),this.toBeTiled={}}for(var I in u.prototype=Object.create(t.prototype),t)u[I]=t[I];u.prototype.newGraphManager=function(){var s=new i(this);return this.graphManager=s,s},u.prototype.newGraph=function(s){return new r(null,this.graphManager,s)},u.prototype.newNode=function(s){return new n(this.graphManager,s)},u.prototype.newEdge=function(s){return new o(null,null,s)},u.prototype.initParameters=function(){t.prototype.initParameters.call(this,arguments),this.isSubLayout||(h.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=h.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=a.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=a.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=a.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=a.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=a.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/a.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=a.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},u.prototype.layout=function(){return l.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},u.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental)h.TREE_REDUCTION_ON_INCREMENTAL&&(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),c=new Set(this.getAllNodes()),d=this.nodesWithGravity.filter(function(y){return c.has(y)}),this.graphManager.setAllNodesToApplyGravitation(d));else{var s=this.getFlatForest();if(s.length>0)this.positionNodesRadially(s);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var c=new Set(this.getAllNodes()),d=this.nodesWithGravity.filter(function(y){return c.has(y)});this.graphManager.setAllNodesToApplyGravitation(d),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},u.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}if(this.totalIterations%a.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var s=new Set(this.getAllNodes()),c=this.nodesWithGravity.filter(function(O){return s.has(O)});this.graphManager.setAllNodesToApplyGravitation(c),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var d=!this.isTreeGrowing&&!this.isGrowthFinished,y=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(d,y),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},u.prototype.getPositionsData=function(){for(var s=this.graphManager.getAllNodes(),c={},d=0;d<s.length;d++){var y=s[d].rect,O=s[d].id;c[O]={id:O,x:y.getCenterX(),y:y.getCenterY(),w:y.width,h:y.height}}return c},u.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var s=!1;if(a.ANIMATE==="during")this.emit("layoutstarted");else{for(;!s;)s=this.tick();this.graphManager.updateBounds()}},u.prototype.calculateNodesToApplyGravitationTo=function(){var s,c,d=[],y=this.graphManager.getGraphs(),O=y.length;for(c=0;c<O;c++)(s=y[c]).updateConnected(),s.isConnected||(d=d.concat(s.getNodes()));return d},u.prototype.createBendpoints=function(){var s=[];s=s.concat(this.graphManager.getAllEdges());var c,d=new Set;for(c=0;c<s.length;c++){var y=s[c];if(!d.has(y)){var O=y.getSource(),D=y.getTarget();if(O==D)y.getBendpoints().push(new m),y.getBendpoints().push(new m),this.createDummyNodesForBendpoints(y),d.add(y);else{var w=[];if(w=(w=w.concat(O.getEdgeListToNode(D))).concat(D.getEdgeListToNode(O)),!d.has(w[0])){var R;if(w.length>1)for(R=0;R<w.length;R++){var C=w[R];C.getBendpoints().push(new m),this.createDummyNodesForBendpoints(C)}w.forEach(function(M){d.add(M)})}}}if(d.size==s.length)break}},u.prototype.positionNodesRadially=function(s){for(var c=new E(0,0),d=Math.ceil(Math.sqrt(s.length)),y=0,O=0,D=0,w=new m(0,0),R=0;R<s.length;R++){R%d==0&&(D=0,O=y,R!=0&&(O+=h.DEFAULT_COMPONENT_SEPERATION),y=0);var C=s[R],M=g.findCenterOfTree(C);c.x=D,c.y=O,(w=u.radialLayout(C,M,c)).y>y&&(y=Math.floor(w.y)),D=Math.floor(w.x+h.DEFAULT_COMPONENT_SEPERATION)}this.transform(new m(l.WORLD_CENTER_X-w.x/2,l.WORLD_CENTER_Y-w.y/2))},u.radialLayout=function(s,c,d){var y=Math.max(this.maxDiagonalInTree(s),h.DEFAULT_RADIAL_SEPARATION);u.branchRadialLayout(c,null,0,359,0,y);var O=v.calculateBounds(s),D=new T;D.setDeviceOrgX(O.getMinX()),D.setDeviceOrgY(O.getMinY()),D.setWorldOrgX(d.x),D.setWorldOrgY(d.y);for(var w=0;w<s.length;w++)s[w].transform(D);var R=new m(O.getMaxX(),O.getMaxY());return D.inverseTransformPoint(R)},u.branchRadialLayout=function(s,c,d,y,O,D){var w=(y-d+1)/2;w<0&&(w+=180);var R=(w+d)%360*L.TWO_PI/360,C=O*Math.cos(R),M=O*Math.sin(R);s.setCenter(C,M);var S=[],G=(S=S.concat(s.getEdges())).length;c!=null&&G--;for(var Y,F=0,P=S.length,b=s.getEdgesBetween(c);b.length>1;){var k=b[0];b.splice(0,1);var U=S.indexOf(k);U>=0&&S.splice(U,1),P--,G--}Y=c!=null?(S.indexOf(b[0])+1)%P:0;for(var q=Math.abs(y-d)/G,W=Y;F!=G;W=++W%P){var B=S[W].getOtherEnd(s);if(B!=c){var Z=(d+F*q)%360,V=(Z+q)%360;u.branchRadialLayout(B,s,Z,V,O+D,D),F++}}},u.maxDiagonalInTree=function(s){for(var c=_.MIN_VALUE,d=0;d<s.length;d++){var y=s[d].getDiagonal();y>c&&(c=y)}return c},u.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},u.prototype.groupZeroDegreeMembers=function(){var s=this,c={};this.memberGroups={},this.idToDummyNode={};for(var d=[],y=this.graphManager.getAllNodes(),O=0;O<y.length;O++){var D=(w=y[O]).getParent();this.getNodeDegreeWithChildren(w)!==0||D.id!=null&&this.getToBeTiled(D)||d.push(w)}for(O=0;O<d.length;O++){var w,R=(w=d[O]).getParent().id;c[R]===void 0&&(c[R]=[]),c[R]=c[R].concat(w)}Object.keys(c).forEach(function(C){if(c[C].length>1){var M="DummyCompound_"+C;s.memberGroups[M]=c[C];var S=c[C][0].getParent(),G=new n(s.graphManager);G.id=M,G.paddingLeft=S.paddingLeft||0,G.paddingRight=S.paddingRight||0,G.paddingBottom=S.paddingBottom||0,G.paddingTop=S.paddingTop||0,s.idToDummyNode[M]=G;var Y=s.getGraphManager().add(s.newGraph(),G),F=S.getChild();F.add(G);for(var P=0;P<c[C].length;P++){var b=c[C][P];F.remove(b),Y.add(b)}}})},u.prototype.clearCompounds=function(){var s={},c={};this.performDFSOnCompounds();for(var d=0;d<this.compoundOrder.length;d++)c[this.compoundOrder[d].id]=this.compoundOrder[d],s[this.compoundOrder[d].id]=[].concat(this.compoundOrder[d].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[d].getChild()),this.compoundOrder[d].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(s,c)},u.prototype.clearZeroDegreeMembers=function(){var s=this,c=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(d){var y=s.idToDummyNode[d];c[d]=s.tileNodes(s.memberGroups[d],y.paddingLeft+y.paddingRight),y.rect.width=c[d].width,y.rect.height=c[d].height})},u.prototype.repopulateCompounds=function(){for(var s=this.compoundOrder.length-1;s>=0;s--){var c=this.compoundOrder[s],d=c.id,y=c.paddingLeft,O=c.paddingTop;this.adjustLocations(this.tiledMemberPack[d],c.rect.x,c.rect.y,y,O)}},u.prototype.repopulateZeroDegreeMembers=function(){var s=this,c=this.tiledZeroDegreePack;Object.keys(c).forEach(function(d){var y=s.idToDummyNode[d],O=y.paddingLeft,D=y.paddingTop;s.adjustLocations(c[d],y.rect.x,y.rect.y,O,D)})},u.prototype.getToBeTiled=function(s){var c=s.id;if(this.toBeTiled[c]!=null)return this.toBeTiled[c];var d=s.getChild();if(d==null)return this.toBeTiled[c]=!1,!1;for(var y=d.getNodes(),O=0;O<y.length;O++){var D=y[O];if(this.getNodeDegree(D)>0)return this.toBeTiled[c]=!1,!1;if(D.getChild()!=null){if(!this.getToBeTiled(D))return this.toBeTiled[c]=!1,!1}else this.toBeTiled[D.id]=!1}return this.toBeTiled[c]=!0,!0},u.prototype.getNodeDegree=function(s){s.id;for(var c=s.getEdges(),d=0,y=0;y<c.length;y++){var O=c[y];O.getSource().id!==O.getTarget().id&&(d+=1)}return d},u.prototype.getNodeDegreeWithChildren=function(s){var c=this.getNodeDegree(s);if(s.getChild()==null)return c;for(var d=s.getChild().getNodes(),y=0;y<d.length;y++){var O=d[y];c+=this.getNodeDegreeWithChildren(O)}return c},u.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},u.prototype.fillCompexOrderByDFS=function(s){for(var c=0;c<s.length;c++){var d=s[c];d.getChild()!=null&&this.fillCompexOrderByDFS(d.getChild().getNodes()),this.getToBeTiled(d)&&this.compoundOrder.push(d)}},u.prototype.adjustLocations=function(s,c,d,y,O){d+=O;for(var D=c+=y,w=0;w<s.rows.length;w++){var R=s.rows[w];c=D;for(var C=0,M=0;M<R.length;M++){var S=R[M];S.rect.x=c,S.rect.y=d,c+=S.rect.width+s.horizontalPadding,S.rect.height>C&&(C=S.rect.height)}d+=C+s.verticalPadding}},u.prototype.tileCompoundMembers=function(s,c){var d=this;this.tiledMemberPack=[],Object.keys(s).forEach(function(y){var O=c[y];d.tiledMemberPack[y]=d.tileNodes(s[y],O.paddingLeft+O.paddingRight),O.rect.width=d.tiledMemberPack[y].width,O.rect.height=d.tiledMemberPack[y].height})},u.prototype.tileNodes=function(s,c){var d={rows:[],rowWidth:[],rowHeight:[],width:0,height:c,verticalPadding:h.TILING_PADDING_VERTICAL,horizontalPadding:h.TILING_PADDING_HORIZONTAL};s.sort(function(D,w){return D.rect.width*D.rect.height>w.rect.width*w.rect.height?-1:D.rect.width*D.rect.height<w.rect.width*w.rect.height?1:0});for(var y=0;y<s.length;y++){var O=s[y];d.rows.length==0?this.insertNodeToRow(d,O,0,c):this.canAddHorizontal(d,O.rect.width,O.rect.height)?this.insertNodeToRow(d,O,this.getShortestRowIndex(d),c):this.insertNodeToRow(d,O,d.rows.length,c),this.shiftToLastRow(d)}return d},u.prototype.insertNodeToRow=function(s,c,d,y){var O=y;d==s.rows.length&&(s.rows.push([]),s.rowWidth.push(O),s.rowHeight.push(0));var D=s.rowWidth[d]+c.rect.width;s.rows[d].length>0&&(D+=s.horizontalPadding),s.rowWidth[d]=D,s.width<D&&(s.width=D);var w=c.rect.height;d>0&&(w+=s.verticalPadding);var R=0;w>s.rowHeight[d]&&(R=s.rowHeight[d],s.rowHeight[d]=w,R=s.rowHeight[d]-R),s.height+=R,s.rows[d].push(c)},u.prototype.getShortestRowIndex=function(s){for(var c=-1,d=Number.MAX_VALUE,y=0;y<s.rows.length;y++)s.rowWidth[y]<d&&(c=y,d=s.rowWidth[y]);return c},u.prototype.getLongestRowIndex=function(s){for(var c=-1,d=Number.MIN_VALUE,y=0;y<s.rows.length;y++)s.rowWidth[y]>d&&(c=y,d=s.rowWidth[y]);return c},u.prototype.canAddHorizontal=function(s,c,d){var y=this.getShortestRowIndex(s);if(y<0)return!0;var O=s.rowWidth[y];if(O+s.horizontalPadding+c<=s.width)return!0;var D,w,R=0;return s.rowHeight[y]<d&&y>0&&(R=d+s.verticalPadding-s.rowHeight[y]),D=s.width-O>=c+s.horizontalPadding?(s.height+R)/(O+c+s.horizontalPadding):(s.height+R)/s.width,R=d+s.verticalPadding,(w=s.width<c?(s.height+R)/c:(s.height+R)/s.width)<1&&(w=1/w),D<1&&(D=1/D),D<w},u.prototype.shiftToLastRow=function(s){var c=this.getLongestRowIndex(s),d=s.rowWidth.length-1,y=s.rows[c],O=y[y.length-1],D=O.width+s.horizontalPadding;if(s.width-s.rowWidth[d]>D&&c!=d){y.splice(-1,1),s.rows[d].push(O),s.rowWidth[c]=s.rowWidth[c]-D,s.rowWidth[d]=s.rowWidth[d]+D,s.width=s.rowWidth[instance.getLongestRowIndex(s)];for(var w=Number.MIN_VALUE,R=0;R<y.length;R++)y[R].height>w&&(w=y[R].height);c>0&&(w+=s.verticalPadding);var C=s.rowHeight[c]+s.rowHeight[d];s.rowHeight[c]=w,s.rowHeight[d]<O.height+s.verticalPadding&&(s.rowHeight[d]=O.height+s.verticalPadding);var M=s.rowHeight[c]+s.rowHeight[d];s.height+=M-C,this.shiftToLastRow(s)}},u.prototype.tilingPreLayout=function(){h.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},u.prototype.tilingPostLayout=function(){h.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},u.prototype.reduceTrees=function(){for(var s,c=[],d=!0;d;){var y=this.graphManager.getAllNodes(),O=[];d=!1;for(var D=0;D<y.length;D++)(s=y[D]).getEdges().length!=1||s.getEdges()[0].isInterGraph||s.getChild()!=null||(O.push([s,s.getEdges()[0],s.getOwner()]),d=!0);if(d==1){for(var w=[],R=0;R<O.length;R++)O[R][0].getEdges().length==1&&(w.push(O[R]),O[R][0].getOwner().remove(O[R][0]));c.push(w),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=c},u.prototype.growTree=function(s){for(var c,d=s[s.length-1],y=0;y<d.length;y++)c=d[y],this.findPlaceforPrunedNode(c),c[2].add(c[0]),c[2].add(c[1],c[1].source,c[1].target);s.splice(s.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},u.prototype.findPlaceforPrunedNode=function(s){var c,d,y=s[0],O=(d=y==s[1].source?s[1].target:s[1].source).startX,D=d.finishX,w=d.startY,R=d.finishY,C=[0,0,0,0];if(w>0)for(var M=O;M<=D;M++)C[0]+=this.grid[M][w-1].length+this.grid[M][w].length-1;if(D<this.grid.length-1)for(M=w;M<=R;M++)C[1]+=this.grid[D+1][M].length+this.grid[D][M].length-1;if(R<this.grid[0].length-1)for(M=O;M<=D;M++)C[2]+=this.grid[M][R+1].length+this.grid[M][R].length-1;if(O>0)for(M=w;M<=R;M++)C[3]+=this.grid[O-1][M].length+this.grid[O][M].length-1;for(var S,G,Y=_.MAX_VALUE,F=0;F<C.length;F++)C[F]<Y?(Y=C[F],S=1,G=F):C[F]==Y&&S++;if(S==3&&Y==0)C[0]==0&&C[1]==0&&C[2]==0?c=1:C[0]==0&&C[1]==0&&C[3]==0?c=0:C[0]==0&&C[2]==0&&C[3]==0?c=3:C[1]==0&&C[2]==0&&C[3]==0&&(c=2);else if(S==2&&Y==0){var P=Math.floor(2*Math.random());c=C[0]==0&&C[1]==0?P==0?0:1:C[0]==0&&C[2]==0?P==0?0:2:C[0]==0&&C[3]==0?P==0?0:3:C[1]==0&&C[2]==0?P==0?1:2:C[1]==0&&C[3]==0?P==0?1:3:P==0?2:3}else c=S==4&&Y==0?P=Math.floor(4*Math.random()):G;c==0?y.setCenter(d.getCenterX(),d.getCenterY()-d.getHeight()/2-a.DEFAULT_EDGE_LENGTH-y.getHeight()/2):c==1?y.setCenter(d.getCenterX()+d.getWidth()/2+a.DEFAULT_EDGE_LENGTH+y.getWidth()/2,d.getCenterY()):c==2?y.setCenter(d.getCenterX(),d.getCenterY()+d.getHeight()/2+a.DEFAULT_EDGE_LENGTH+y.getHeight()/2):y.setCenter(d.getCenterX()-d.getWidth()/2-a.DEFAULT_EDGE_LENGTH-y.getWidth()/2,d.getCenterY())},f.exports=u},function(f,p,e){var t={};t.layoutBase=e(0),t.CoSEConstants=e(1),t.CoSEEdge=e(2),t.CoSEGraph=e(3),t.CoSEGraphManager=e(4),t.CoSELayout=e(6),t.CoSENode=e(5),f.exports=t}])},ht.exports=N(It()));var N}())),at.exports);const Rt=Ot(wt);var tt=function(){var N=x(function(u,I,s,c){for(s=s||{},c=u.length;c--;s[u[c]]=I);return s},"o"),A=[1,4],f=[1,13],p=[1,12],e=[1,15],t=[1,16],i=[1,20],r=[1,19],n=[6,7,8],o=[1,26],h=[1,24],a=[1,25],l=[6,7,11],E=[1,6,13,15,16,19,22],m=[1,33],g=[1,34],_=[1,6,7,11,13,15,16,19,22],L={trace:x(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:x(function(u,I,s,c,d,y,O){var D=y.length-1;switch(d){case 6:case 7:return c;case 8:c.getLogger().trace("Stop NL ");break;case 9:c.getLogger().trace("Stop EOF ");break;case 11:c.getLogger().trace("Stop NL2 ");break;case 12:c.getLogger().trace("Stop EOF2 ");break;case 15:c.getLogger().info("Node: ",y[D].id),c.addNode(y[D-1].length,y[D].id,y[D].descr,y[D].type);break;case 16:c.getLogger().trace("Icon: ",y[D]),c.decorateNode({icon:y[D]});break;case 17:case 21:c.decorateNode({class:y[D]});break;case 18:c.getLogger().trace("SPACELIST");break;case 19:c.getLogger().trace("Node: ",y[D].id),c.addNode(0,y[D].id,y[D].descr,y[D].type);break;case 20:c.decorateNode({icon:y[D]});break;case 25:c.getLogger().trace("node found ..",y[D-2]),this.$={id:y[D-1],descr:y[D-1],type:c.getType(y[D-2],y[D])};break;case 26:this.$={id:y[D],descr:y[D],type:c.nodeType.DEFAULT};break;case 27:c.getLogger().trace("node found ..",y[D-3]),this.$={id:y[D-3],descr:y[D-1],type:c.getType(y[D-2],y[D])}}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:A},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:A},{6:f,7:[1,10],9:9,12:11,13:p,14:14,15:e,16:t,17:17,18:18,19:i,22:r},N(n,[2,3]),{1:[2,2]},N(n,[2,4]),N(n,[2,5]),{1:[2,6],6:f,12:21,13:p,14:14,15:e,16:t,17:17,18:18,19:i,22:r},{6:f,9:22,12:11,13:p,14:14,15:e,16:t,17:17,18:18,19:i,22:r},{6:o,7:h,10:23,11:a},N(l,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:i,22:r}),N(l,[2,18]),N(l,[2,19]),N(l,[2,20]),N(l,[2,21]),N(l,[2,23]),N(l,[2,24]),N(l,[2,26],{19:[1,30]}),{20:[1,31]},{6:o,7:h,10:32,11:a},{1:[2,7],6:f,12:21,13:p,14:14,15:e,16:t,17:17,18:18,19:i,22:r},N(E,[2,14],{7:m,11:g}),N(_,[2,8]),N(_,[2,9]),N(_,[2,10]),N(l,[2,15]),N(l,[2,16]),N(l,[2,17]),{20:[1,35]},{21:[1,36]},N(E,[2,13],{7:m,11:g}),N(_,[2,11]),N(_,[2,12]),{21:[1,37]},N(l,[2,25]),N(l,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:x(function(u,I){if(!I.recoverable){var s=new Error(u);throw s.hash=I,s}this.trace(u)},"parseError"),parse:x(function(u){var I=this,s=[0],c=[],d=[null],y=[],O=this.table,D="",w=0,R=0,C=y.slice.call(arguments,1),M=Object.create(this.lexer),S={yy:{}};for(var G in this.yy)Object.prototype.hasOwnProperty.call(this.yy,G)&&(S.yy[G]=this.yy[G]);M.setInput(u,S.yy),S.yy.lexer=M,S.yy.parser=this,M.yylloc===void 0&&(M.yylloc={});var Y=M.yylloc;y.push(Y);var F=M.options&&M.options.ranges;function P(){var $;return typeof($=c.pop()||M.lex()||1)!="number"&&($ instanceof Array&&($=(c=$).pop()),$=I.symbols_[$]||$),$}typeof S.yy.parseError=="function"?this.parseError=S.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,x(function($){s.length=s.length-2*$,d.length=d.length-$,y.length=y.length-$},"popStack"),x(P,"lex");for(var b,k,U,q,W,B,Z,V,z={};;){if(k=s[s.length-1],this.defaultActions[k]?U=this.defaultActions[k]:(b==null&&(b=P()),U=O[k]&&O[k][b]),U===void 0||!U.length||!U[0]){var nt="";for(W in V=[],O[k])this.terminals_[W]&&W>2&&V.push("'"+this.terminals_[W]+"'");nt=M.showPosition?"Parse error on line "+(w+1)+`:
2
+ `+M.showPosition()+`
3
+ Expecting `+V.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(w+1)+": Unexpected "+(b==1?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(nt,{text:M.match,token:this.terminals_[b]||b,line:M.yylineno,loc:Y,expected:V})}if(U[0]instanceof Array&&U.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+b);switch(U[0]){case 1:s.push(b),d.push(M.yytext),y.push(M.yylloc),s.push(U[1]),b=null,R=M.yyleng,D=M.yytext,w=M.yylineno,Y=M.yylloc;break;case 2:if(B=this.productions_[U[1]][1],z.$=d[d.length-B],z._$={first_line:y[y.length-(B||1)].first_line,last_line:y[y.length-1].last_line,first_column:y[y.length-(B||1)].first_column,last_column:y[y.length-1].last_column},F&&(z._$.range=[y[y.length-(B||1)].range[0],y[y.length-1].range[1]]),(q=this.performAction.apply(z,[D,R,w,S.yy,U[1],d,y].concat(C)))!==void 0)return q;B&&(s=s.slice(0,-1*B*2),d=d.slice(0,-1*B),y=y.slice(0,-1*B)),s.push(this.productions_[U[1]][0]),d.push(z.$),y.push(z._$),Z=O[s[s.length-2]][s[s.length-1]],s.push(Z);break;case 3:return!0}}return!0},"parse")},v=function(){return{EOF:1,parseError:x(function(u,I){if(!this.yy.parser)throw new Error(u);this.yy.parser.parseError(u,I)},"parseError"),setInput:x(function(u,I){return this.yy=I||this.yy||{},this._input=u,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:x(function(){var u=this._input[0];return this.yytext+=u,this.yyleng++,this.offset++,this.match+=u,this.matched+=u,u.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),u},"input"),unput:x(function(u){var I=u.length,s=u.split(/(?:\r\n?|\n)/g);this._input=u+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-I),this.offset-=I;var c=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var d=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===c.length?this.yylloc.first_column:0)+c[c.length-s.length].length-s[0].length:this.yylloc.first_column-I},this.options.ranges&&(this.yylloc.range=[d[0],d[0]+this.yyleng-I]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:x(function(u){this.unput(this.match.slice(u))},"less"),pastInput:x(function(){var u=this.matched.substr(0,this.matched.length-this.match.length);return(u.length>20?"...":"")+u.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var u=this.match;return u.length<20&&(u+=this._input.substr(0,20-u.length)),(u.substr(0,20)+(u.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var u=this.pastInput(),I=new Array(u.length+1).join("-");return u+this.upcomingInput()+`
5
+ `+I+"^"},"showPosition"),test_match:x(function(u,I){var s,c,d;if(this.options.backtrack_lexer&&(d={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(d.yylloc.range=this.yylloc.range.slice(0))),(c=u[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=c.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:c?c[c.length-1].length-c[c.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+u[0].length},this.yytext+=u[0],this.match+=u[0],this.matches=u,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(u[0].length),this.matched+=u[0],s=this.performAction.call(this,this.yy,this,I,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var y in d)this[y]=d[y];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;var u,I,s,c;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var d=this._currentRules(),y=0;y<d.length;y++)if((s=this._input.match(this.rules[d[y]]))&&(!I||s[0].length>I[0].length)){if(I=s,c=y,this.options.backtrack_lexer){if((u=this.test_match(s,d[y]))!==!1)return u;if(this._backtrack){I=!1;continue}return!1}if(!this.options.flex)break}return I?(u=this.test_match(I,d[c]))!==!1&&u:this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(function(){var u=this.next();return u||this.lex()},"lex"),begin:x(function(u){this.conditionStack.push(u)},"begin"),popState:x(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:x(function(u){return(u=this.conditionStack.length-1-Math.abs(u||0))>=0?this.conditionStack[u]:"INITIAL"},"topState"),pushState:x(function(u){this.begin(u)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:x(function(u,I,s,c){switch(s){case 0:return u.getLogger().trace("Found comment",I.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:case 23:case 26:this.popState();break;case 5:u.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return u.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:u.getLogger().trace("end icon"),this.popState();break;case 10:return u.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return u.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return u.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return u.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:case 15:case 16:case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 24:u.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return u.getLogger().trace("description:",I.yytext),"NODE_DESCR";case 27:return this.popState(),u.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),u.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),u.getLogger().trace("node end ...",I.yytext),"NODE_DEND";case 30:case 33:case 34:return this.popState(),u.getLogger().trace("node end (("),"NODE_DEND";case 31:case 32:return this.popState(),u.getLogger().trace("node end (-"),"NODE_DEND";case 35:case 36:return u.getLogger().trace("Long description:",I.yytext),20}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}}}();function T(){this.yy={}}return L.lexer=v,x(T,"Parser"),T.prototype=L,L.Parser=T,new T}();tt.parser=tt;var Ct=tt,H=[],dt=0,et={},Mt=x(()=>{H=[],dt=0,et={}},"clear"),xt=x(function(N){for(let A=H.length-1;A>=0;A--)if(H[A].level<N)return H[A];return null},"getParent"),St=x(()=>H.length>0?H[0]:null,"getMindmap"),Gt=x((N,A,f,p)=>{var n,o;j.info("addNode",N,A,f,p);const e=J();let t=((n=e.mindmap)==null?void 0:n.padding)??Q.mindmap.padding;switch(p){case X.ROUNDED_RECT:case X.RECT:case X.HEXAGON:t*=2}const i={id:dt++,nodeId:K(A,e),level:N,descr:K(f,e),type:p,children:[],width:((o=e.mindmap)==null?void 0:o.maxNodeWidth)??Q.mindmap.maxNodeWidth,padding:t},r=xt(N);if(r)r.children.push(i),H.push(i);else{if(H.length!==0)throw new Error('There can be only one root. No parent could be found for ("'+i.descr+'")');H.push(i)}},"addNode"),X={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},bt={clear:Mt,addNode:Gt,getMindmap:St,nodeType:X,getType:x((N,A)=>{switch(j.debug("In get type",N,A),N){case"[":return X.RECT;case"(":return A===")"?X.ROUNDED_RECT:X.CLOUD;case"((":return X.CIRCLE;case")":return X.CLOUD;case"))":return X.BANG;case"{{":return X.HEXAGON;default:return X.DEFAULT}},"getType"),setElementForId:x((N,A)=>{et[N]=A},"setElementForId"),decorateNode:x(N=>{if(!N)return;const A=J(),f=H[H.length-1];N.icon&&(f.icon=K(N.icon,A)),N.class&&(f.class=K(N.class,A))},"decorateNode"),type2Str:x(N=>{switch(N){case X.DEFAULT:return"no-border";case X.RECT:return"rect";case X.ROUNDED_RECT:return"rounded-rect";case X.CIRCLE:return"circle";case X.CLOUD:return"cloud";case X.BANG:return"bang";case X.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),getLogger:x(()=>j,"getLogger"),getElementById:x(N=>et[N],"getElementById")},Ft=x(function(N,A,f,p){A.append("path").attr("id","node-"+f.id).attr("class","node-bkg node-"+N.type2Str(f.type)).attr("d",`M0 ${f.height-5} v${10-f.height} q0,-5 5,-5 h${f.width-10} q5,0 5,5 v${f.height-5} H0 Z`),A.append("line").attr("class","node-line-"+p).attr("x1",0).attr("y1",f.height).attr("x2",f.width).attr("y2",f.height)},"defaultBkg"),Pt=x(function(N,A,f){A.append("rect").attr("id","node-"+f.id).attr("class","node-bkg node-"+N.type2Str(f.type)).attr("height",f.height).attr("width",f.width)},"rectBkg"),Ut=x(function(N,A,f){const p=f.width,e=f.height,t=.15*p,i=.25*p,r=.35*p,n=.2*p;A.append("path").attr("id","node-"+f.id).attr("class","node-bkg node-"+N.type2Str(f.type)).attr("d",`M0 0 a${t},${t} 0 0,1 ${.25*p},${-1*p*.1}
7
+ a${r},${r} 1 0,1 ${.4*p},${-1*p*.1}
8
+ a${i},${i} 1 0,1 ${.35*p},${1*p*.2}
9
+
10
+ a${t},${t} 1 0,1 ${.15*p},${1*e*.35}
11
+ a${n},${n} 1 0,1 ${-1*p*.15},${1*e*.65}
12
+
13
+ a${i},${t} 1 0,1 ${-1*p*.25},${.15*p}
14
+ a${r},${r} 1 0,1 ${-1*p*.5},0
15
+ a${t},${t} 1 0,1 ${-1*p*.25},${-1*p*.15}
16
+
17
+ a${t},${t} 1 0,1 ${-1*p*.1},${-1*e*.35}
18
+ a${n},${n} 1 0,1 ${.1*p},${-1*e*.65}
19
+
20
+ H0 V0 Z`)},"cloudBkg"),Yt=x(function(N,A,f){const p=f.width,e=f.height,t=.15*p;A.append("path").attr("id","node-"+f.id).attr("class","node-bkg node-"+N.type2Str(f.type)).attr("d",`M0 0 a${t},${t} 1 0,0 ${.25*p},${-1*e*.1}
21
+ a${t},${t} 1 0,0 ${.25*p},0
22
+ a${t},${t} 1 0,0 ${.25*p},0
23
+ a${t},${t} 1 0,0 ${.25*p},${1*e*.1}
24
+
25
+ a${t},${t} 1 0,0 ${.15*p},${1*e*.33}
26
+ a${.8*t},${.8*t} 1 0,0 0,${1*e*.34}
27
+ a${t},${t} 1 0,0 ${-1*p*.15},${1*e*.33}
28
+
29
+ a${t},${t} 1 0,0 ${-1*p*.25},${.15*e}
30
+ a${t},${t} 1 0,0 ${-1*p*.25},0
31
+ a${t},${t} 1 0,0 ${-1*p*.25},0
32
+ a${t},${t} 1 0,0 ${-1*p*.25},${-1*e*.15}
33
+
34
+ a${t},${t} 1 0,0 ${-1*p*.1},${-1*e*.33}
35
+ a${.8*t},${.8*t} 1 0,0 0,${-1*e*.34}
36
+ a${t},${t} 1 0,0 ${.1*p},${-1*e*.33}
37
+
38
+ H0 V0 Z`)},"bangBkg"),kt=x(function(N,A,f){A.append("circle").attr("id","node-"+f.id).attr("class","node-bkg node-"+N.type2Str(f.type)).attr("r",f.width/2)},"circleBkg");function pt(N,A,f,p,e){return N.insert("polygon",":first-child").attr("points",p.map(function(t){return t.x+","+t.y}).join(" ")).attr("transform","translate("+(e.width-A)/2+", "+f+")")}x(pt,"insertPolygonShape");var Xt=x(function(N,A,f){const p=f.height,e=p/4,t=f.width-f.padding+2*e;pt(A,t,p,[{x:e,y:0},{x:t-e,y:0},{x:t,y:-p/2},{x:t-e,y:-p},{x:e,y:-p},{x:0,y:-p/2}],f)},"hexagonBkg"),Bt=x(function(N,A,f){A.append("rect").attr("id","node-"+f.id).attr("class","node-bkg node-"+N.type2Str(f.type)).attr("height",f.height).attr("rx",f.padding).attr("ry",f.padding).attr("width",f.width)},"roundedRectBkg"),$t=x(async function(N,A,f,p,e){const t=e.htmlLabels,i=p%11,r=A.append("g");f.section=i;let n="section-"+i;i<0&&(n+=" section-root"),r.attr("class",(f.class?f.class+" ":"")+"mindmap-node "+n);const o=r.append("g"),h=r.append("g"),a=f.descr.replace(/(<br\/*>)/g,`
39
+ `);await Tt(h,a,{useHtmlLabels:t,width:f.width,classes:"mindmap-node-label"},e),t||h.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle");const l=h.node().getBBox(),[E]=Lt(e.fontSize);if(f.height=l.height+1.1*E*.5+f.padding,f.width=l.width+2*f.padding,f.icon)if(f.type===N.nodeType.CIRCLE)f.height+=50,f.width+=50,r.append("foreignObject").attr("height","50px").attr("width",f.width).attr("style","text-align: center;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+i+" "+f.icon),h.attr("transform","translate("+f.width/2+", "+(f.height/2-1.5*f.padding)+")");else{f.width+=50;const m=f.height;f.height=Math.max(m,60);const g=Math.abs(f.height-m);r.append("foreignObject").attr("width","60px").attr("height",f.height).attr("style","text-align: center;margin-top:"+g/2+"px;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+i+" "+f.icon),h.attr("transform","translate("+(25+f.width/2)+", "+(g/2+f.padding/2)+")")}else if(t){const m=(f.width-l.width)/2,g=(f.height-l.height)/2;h.attr("transform","translate("+m+", "+g+")")}else{const m=f.width/2,g=f.padding/2;h.attr("transform","translate("+m+", "+g+")")}switch(f.type){case N.nodeType.DEFAULT:Ft(N,o,f,i);break;case N.nodeType.ROUNDED_RECT:Bt(N,o,f,i);break;case N.nodeType.RECT:Pt(N,o,f,i);break;case N.nodeType.CIRCLE:o.attr("transform","translate("+f.width/2+", "+ +f.height/2+")"),kt(N,o,f,i);break;case N.nodeType.CLOUD:Ut(N,o,f,i);break;case N.nodeType.BANG:Yt(N,o,f,i);break;case N.nodeType.HEXAGON:Xt(N,o,f,i)}return N.setElementForId(f.id,r),f.height},"drawNode"),Ht=x(function(N,A){const f=N.getElementById(A.id),p=A.x||0,e=A.y||0;f.attr("transform","translate("+p+","+e+")")},"positionNode");async function it(N,A,f,p,e){await $t(N,A,f,p,e),f.children&&await Promise.all(f.children.map((t,i)=>it(N,A,t,p<0?i:p,e)))}function ft(N,A){A.edges().map((f,p)=>{const e=f.data();if(f[0]._private.bodyBounds){const t=f[0]._private.rscratch;j.trace("Edge: ",p,e),N.insert("path").attr("d",`M ${t.startX},${t.startY} L ${t.midX},${t.midY} L${t.endX},${t.endY} `).attr("class","edge section-edge-"+e.section+" edge-depth-"+e.depth)}})}function rt(N,A,f,p){A.add({group:"nodes",data:{id:N.id.toString(),labelText:N.descr,height:N.height,width:N.width,level:p,nodeId:N.id,padding:N.padding,type:N.type},position:{x:N.x,y:N.y}}),N.children&&N.children.forEach(e=>{rt(e,A,f,p+1),A.add({group:"edges",data:{id:`${N.id}_${e.id}`,source:N.id,target:e.id,depth:p,section:e.section}})})}function yt(N,A){return new Promise(f=>{const p=Dt("body").append("div").attr("id","cy").attr("style","display:none"),e=ot({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});p.remove(),rt(N,e,A,0),e.nodes().forEach(function(t){t.layoutDimensions=()=>{const i=t.data();return{w:i.width,h:i.height}}}),e.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),e.ready(t=>{j.info("Ready",t),f(e)})})}function Et(N,A){A.nodes().map((f,p)=>{const e=f.data();e.x=f.position().x,e.y=f.position().y,Ht(N,e);const t=N.getElementById(e.nodeId);j.info("Id:",p,"Position: (",f.position().x,", ",f.position().y,")",e),t.attr("transform",`translate(${f.position().x-e.width/2}, ${f.position().y-e.height/2})`),t.attr("attr",`apa-${p})`)})}ot.use(Rt),x(it,"drawNodes"),x(ft,"drawEdges"),x(rt,"addNodes"),x(yt,"layoutMindmap"),x(Et,"positionNodes");var Wt={draw:x(async(N,A,f,p)=>{var a,l;j.debug(`Rendering mindmap diagram
40
+ `+N);const e=p.db,t=e.getMindmap();if(!t)return;const i=J();i.htmlLabels=!1;const r=mt(A),n=r.append("g");n.attr("class","mindmap-edges");const o=r.append("g");o.attr("class","mindmap-nodes"),await it(e,o,t,-1,i);const h=await yt(t,i);ft(n,h),Et(e,h),_t(void 0,r,((a=i.mindmap)==null?void 0:a.padding)??Q.mindmap.padding,((l=i.mindmap)==null?void 0:l.useMaxWidth)??Q.mindmap.useMaxWidth)},"draw")},jt=x(N=>{let A="";for(let f=0;f<N.THEME_COLOR_LIMIT;f++)N["lineColor"+f]=N["lineColor"+f]||N["cScaleInv"+f],vt(N["lineColor"+f])?N["lineColor"+f]=Nt(N["lineColor"+f],20):N["lineColor"+f]=At(N["lineColor"+f],20);for(let f=0;f<N.THEME_COLOR_LIMIT;f++){const p=""+(17-3*f);A+=`
41
+ .section-${f-1} rect, .section-${f-1} path, .section-${f-1} circle, .section-${f-1} polygon, .section-${f-1} path {
42
+ fill: ${N["cScale"+f]};
43
+ }
44
+ .section-${f-1} text {
45
+ fill: ${N["cScaleLabel"+f]};
46
+ }
47
+ .node-icon-${f-1} {
48
+ font-size: 40px;
49
+ color: ${N["cScaleLabel"+f]};
50
+ }
51
+ .section-edge-${f-1}{
52
+ stroke: ${N["cScale"+f]};
53
+ }
54
+ .edge-depth-${f-1}{
55
+ stroke-width: ${p};
56
+ }
57
+ .section-${f-1} line {
58
+ stroke: ${N["cScaleInv"+f]} ;
59
+ stroke-width: 3;
60
+ }
61
+
62
+ .disabled, .disabled circle, .disabled text {
63
+ fill: lightgray;
64
+ }
65
+ .disabled text {
66
+ fill: #efefef;
67
+ }
68
+ `}return A},"genSections"),Vt={db:bt,renderer:Wt,parser:Ct,styles:x(N=>`
69
+ .edge {
70
+ stroke-width: 3;
71
+ }
72
+ ${jt(N)}
73
+ .section-root rect, .section-root path, .section-root circle, .section-root polygon {
74
+ fill: ${N.git0};
75
+ }
76
+ .section-root text {
77
+ fill: ${N.gitBranchLabel0};
78
+ }
79
+ .icon-container {
80
+ height:100%;
81
+ display: flex;
82
+ justify-content: center;
83
+ align-items: center;
84
+ }
85
+ .edge {
86
+ fill: none;
87
+ }
88
+ .mindmap-node-label {
89
+ dy: 1em;
90
+ alignment-baseline: middle;
91
+ text-anchor: middle;
92
+ dominant-baseline: middle;
93
+ text-align: center;
94
+ }
95
+ `,"getStyles")};export{Vt as diagram};
@@ -0,0 +1,30 @@
1
+ import{p as E}from"./chunk-4BMEZGHF-DLcqo-x9.js";import{_ as c,g as G,s as L,a as N,b as P,q as V,p as q,l as O,c as H,E as I,I as _,O as J,d as K,y as Q,G as U}from"./mermaid-BgCxVw2J.js";import{p as X}from"./radar-MK3ICKWK-FyfW4UKQ.js";import"./transform-C5148Z0S.js";import{aF as y,aG as z,aH as Y,B as W,O as Z}from"./index-DlQKt39j.js";import"./_baseEach-DtUk7cBy.js";import"./_baseUniq-BuhsH2Gw.js";import"./min-DTkssK90.js";import"./_baseMap-zXgLfXUO.js";import"./clone-Cho8ekmu.js";import"./_createAggregator-CCTzDuxr.js";function ee(e,a){return a<e?-1:a>e?1:a>=e?0:NaN}function te(e){return e}var ae=U.pie,F={sections:new Map,showData:!1},M=F.sections,R=F.showData,ne=structuredClone(ae),B={getConfig:c(()=>structuredClone(ne),"getConfig"),clear:c(()=>{M=new Map,R=F.showData,Q()},"clear"),setDiagramTitle:q,getDiagramTitle:V,setAccTitle:P,getAccTitle:N,setAccDescription:L,getAccDescription:G,addSection:c(({label:e,value:a})=>{M.has(e)||(M.set(e,a),O.debug(`added new section: ${e}, with value: ${a}`))},"addSection"),getSections:c(()=>M,"getSections"),setShowData:c(e=>{R=e},"setShowData"),getShowData:c(()=>R,"getShowData")},re=c((e,a)=>{E(e,a),a.setShowData(e.showData),e.sections.map(a.addSection)},"populateDb"),ie={parse:c(async e=>{const a=await X("pie",e);O.debug(a),re(a,B)},"parse")},oe=c(e=>`
2
+ .pieCircle{
3
+ stroke: ${e.pieStrokeColor};
4
+ stroke-width : ${e.pieStrokeWidth};
5
+ opacity : ${e.pieOpacity};
6
+ }
7
+ .pieOuterCircle{
8
+ stroke: ${e.pieOuterStrokeColor};
9
+ stroke-width: ${e.pieOuterStrokeWidth};
10
+ fill: none;
11
+ }
12
+ .pieTitleText {
13
+ text-anchor: middle;
14
+ font-size: ${e.pieTitleTextSize};
15
+ fill: ${e.pieTitleTextColor};
16
+ font-family: ${e.fontFamily};
17
+ }
18
+ .slice {
19
+ font-family: ${e.fontFamily};
20
+ fill: ${e.pieSectionTextColor};
21
+ font-size:${e.pieSectionTextSize};
22
+ // fill: white;
23
+ }
24
+ .legend text {
25
+ fill: ${e.pieLegendTextColor};
26
+ font-family: ${e.fontFamily};
27
+ font-size: ${e.pieLegendTextSize};
28
+ }
29
+ `,"getStyles"),le=c(e=>{const a=[...e.entries()].map(l=>({label:l[0],value:l[1]})).sort((l,d)=>d.value-l.value);return function(){var l=te,d=ee,u=null,w=y(0),S=y(z),$=y(0);function n(t){var r,s,i,A,m,p=(t=Y(t)).length,v=0,T=new Array(p),g=new Array(p),f=+w.apply(this,arguments),C=Math.min(z,Math.max(-z,S.apply(this,arguments)-f)),h=Math.min(Math.abs(C)/p,$.apply(this,arguments)),b=h*(C<0?-1:1);for(r=0;r<p;++r)(m=g[T[r]=r]=+l(t[r],r,t))>0&&(v+=m);for(d!=null?T.sort(function(x,D){return d(g[x],g[D])}):u!=null&&T.sort(function(x,D){return u(t[x],t[D])}),r=0,i=v?(C-p*b)/v:0;r<p;++r,f=A)s=T[r],A=f+((m=g[s])>0?m*i:0)+b,g[s]={data:t[s],index:r,value:m,startAngle:f,endAngle:A,padAngle:h};return g}return n.value=function(t){return arguments.length?(l=typeof t=="function"?t:y(+t),n):l},n.sortValues=function(t){return arguments.length?(d=t,u=null,n):d},n.sort=function(t){return arguments.length?(u=t,d=null,n):u},n.startAngle=function(t){return arguments.length?(w=typeof t=="function"?t:y(+t),n):w},n.endAngle=function(t){return arguments.length?(S=typeof t=="function"?t:y(+t),n):S},n.padAngle=function(t){return arguments.length?($=typeof t=="function"?t:y(+t),n):$},n}().value(l=>l.value)(a)},"createPieArcs"),se={parser:ie,db:B,renderer:{draw:c((e,a,l,d)=>{O.debug(`rendering pie chart
30
+ `+e);const u=d.db,w=H(),S=I(u.getConfig(),w.pie),$=18,n=450,t=n,r=_(a),s=r.append("g");s.attr("transform","translate(225,225)");const{themeVariables:i}=w;let[A]=J(i.pieOuterStrokeWidth);A??(A=2);const m=S.textPosition,p=Math.min(t,n)/2-40,v=W().innerRadius(0).outerRadius(p),T=W().innerRadius(p*m).outerRadius(p*m);s.append("circle").attr("cx",0).attr("cy",0).attr("r",p+A/2).attr("class","pieOuterCircle");const g=u.getSections(),f=le(g),C=[i.pie1,i.pie2,i.pie3,i.pie4,i.pie5,i.pie6,i.pie7,i.pie8,i.pie9,i.pie10,i.pie11,i.pie12],h=Z(C);s.selectAll("mySlices").data(f).enter().append("path").attr("d",v).attr("fill",o=>h(o.data.label)).attr("class","pieCircle");let b=0;g.forEach(o=>{b+=o}),s.selectAll("mySlices").data(f).enter().append("text").text(o=>(o.data.value/b*100).toFixed(0)+"%").attr("transform",o=>"translate("+T.centroid(o)+")").style("text-anchor","middle").attr("class","slice"),s.append("text").text(u.getDiagramTitle()).attr("x",0).attr("y",-200).attr("class","pieTitleText");const x=s.selectAll(".legend").data(h.domain()).enter().append("g").attr("class","legend").attr("transform",(o,k)=>"translate(216,"+(22*k-22*h.domain().length/2)+")");x.append("rect").attr("width",$).attr("height",$).style("fill",h).style("stroke",h),x.data(f).append("text").attr("x",22).attr("y",14).text(o=>{const{label:k,value:j}=o.data;return u.getShowData()?`${k} [${j}]`:k});const D=512+Math.max(...x.selectAll("text").nodes().map(o=>(o==null?void 0:o.getBoundingClientRect().width)??0));r.attr("viewBox",`0 0 ${D} 450`),K(r,n,D,S.useMaxWidth)},"draw")},styles:oe};export{se as diagram};