hexagon-editor 0.1.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (308) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +105 -0
  3. package/THIRD_PARTY_NOTICES.md +29 -0
  4. package/dist/MarkdownEditor.vue.d.ts +926 -0
  5. package/dist/MarkdownEditor.vue.d.ts.map +1 -0
  6. package/dist/MarkdownEditorLinkForm-mq-BVYM_.js +338 -0
  7. package/dist/MarkdownEditorLinkForm.css +1 -0
  8. package/dist/abnfDiagram-N423BO3Z-DCf6sPky.js +87 -0
  9. package/dist/arc-y6UeoJpJ.js +83 -0
  10. package/dist/architectureDiagram-T3A2C74G-Cc3_3-cI.js +4778 -0
  11. package/dist/base-Bnv2-Te4.js +13338 -0
  12. package/dist/base.css +1 -0
  13. package/dist/blockDiagram-VBNYF7ZC-DWVLZwXY.js +2419 -0
  14. package/dist/c4Diagram-5PPSVZJV-CaIN7qay.js +1577 -0
  15. package/dist/channel-BwXGcavV.js +5 -0
  16. package/dist/chunk-2GRJ4B5K-O75udjPr.js +68 -0
  17. package/dist/chunk-2Q5K7J3B-CySL0lOA.js +15 -0
  18. package/dist/chunk-5RXB4S5H-BKPnLCOJ.js +1408 -0
  19. package/dist/chunk-5VM5RSS4--it1VJIv.js +19 -0
  20. package/dist/chunk-6Q2QTUOP-DNiML-50.js +664 -0
  21. package/dist/chunk-GF5L2VYU-z7A-k0-V.js +1533 -0
  22. package/dist/chunk-JWPE2WC7-DAjx3Kjr.js +8 -0
  23. package/dist/chunk-KBJHAD2P-D4R1VW0r.js +19 -0
  24. package/dist/chunk-RYQCIY6F-DmJAYxq8.js +313 -0
  25. package/dist/chunk-XXDRQBXY-CK913N-t.js +8 -0
  26. package/dist/classDiagram-JCYQIIEL-Djipq_HJ.js +16 -0
  27. package/dist/classDiagram-v2-OCEON4UE-Djipq_HJ.js +16 -0
  28. package/dist/classname.d.ts +13 -0
  29. package/dist/classname.d.ts.map +1 -0
  30. package/dist/classname.js +17 -0
  31. package/dist/components/MarkdownEditorFloatingMenus.vue.d.ts +48 -0
  32. package/dist/components/MarkdownEditorFloatingMenus.vue.d.ts.map +1 -0
  33. package/dist/components/MarkdownEditorImageActions.vue.d.ts +20 -0
  34. package/dist/components/MarkdownEditorImageActions.vue.d.ts.map +1 -0
  35. package/dist/components/MarkdownEditorToolbar.vue.d.ts +62 -0
  36. package/dist/components/MarkdownEditorToolbar.vue.d.ts.map +1 -0
  37. package/dist/components/MarkdownEditorToolbarIcon.vue.d.ts +26 -0
  38. package/dist/components/MarkdownEditorToolbarIcon.vue.d.ts.map +1 -0
  39. package/dist/composables/useFloatingPanel.d.ts +13 -0
  40. package/dist/composables/useFloatingPanel.d.ts.map +1 -0
  41. package/dist/composables/useMarkdownEditorValue.d.ts +19 -0
  42. package/dist/composables/useMarkdownEditorValue.d.ts.map +1 -0
  43. package/dist/configure.d.ts +15 -0
  44. package/dist/configure.d.ts.map +1 -0
  45. package/dist/configure.js +19 -0
  46. package/dist/core/actions.d.ts +16 -0
  47. package/dist/core/actions.d.ts.map +1 -0
  48. package/dist/core/basic-editor-atomic-source.d.ts +9 -0
  49. package/dist/core/basic-editor-atomic-source.d.ts.map +1 -0
  50. package/dist/core/basic-editor-command-helpers.d.ts +11 -0
  51. package/dist/core/basic-editor-command-helpers.d.ts.map +1 -0
  52. package/dist/core/basic-editor-markdown.d.ts +7 -0
  53. package/dist/core/basic-editor-markdown.d.ts.map +1 -0
  54. package/dist/core/basic-editor-renderers.d.ts +6 -0
  55. package/dist/core/basic-editor-renderers.d.ts.map +1 -0
  56. package/dist/core/basic-editor-runtime-plugins.d.ts +7 -0
  57. package/dist/core/basic-editor-runtime-plugins.d.ts.map +1 -0
  58. package/dist/core/basic-editor-selection.d.ts +6 -0
  59. package/dist/core/basic-editor-selection.d.ts.map +1 -0
  60. package/dist/core/basic-editor-table-controls.d.ts +3 -0
  61. package/dist/core/basic-editor-table-controls.d.ts.map +1 -0
  62. package/dist/core/basic-editor-table-popover.d.ts +5 -0
  63. package/dist/core/basic-editor-table-popover.d.ts.map +1 -0
  64. package/dist/core/basic-editor-types.d.ts +96 -0
  65. package/dist/core/basic-editor-types.d.ts.map +1 -0
  66. package/dist/core/basic-editor.d.ts +14 -0
  67. package/dist/core/basic-editor.d.ts.map +1 -0
  68. package/dist/core/content-handler.d.ts +21 -0
  69. package/dist/core/content-handler.d.ts.map +1 -0
  70. package/dist/core/editor-instance.d.ts +38 -0
  71. package/dist/core/editor-instance.d.ts.map +1 -0
  72. package/dist/core/events.d.ts +22 -0
  73. package/dist/core/events.d.ts.map +1 -0
  74. package/dist/core/extension-builder.d.ts +86 -0
  75. package/dist/core/extension-builder.d.ts.map +1 -0
  76. package/dist/core/extensions-manager.d.ts +36 -0
  77. package/dist/core/extensions-manager.d.ts.map +1 -0
  78. package/dist/core/index.d.ts +30 -0
  79. package/dist/core/index.d.ts.map +1 -0
  80. package/dist/core/lists.d.ts +18 -0
  81. package/dist/core/lists.d.ts.map +1 -0
  82. package/dist/core/logger.d.ts +46 -0
  83. package/dist/core/logger.d.ts.map +1 -0
  84. package/dist/core/markdown-parser.d.ts +60 -0
  85. package/dist/core/markdown-parser.d.ts.map +1 -0
  86. package/dist/core/markdown.d.ts +23 -0
  87. package/dist/core/markdown.d.ts.map +1 -0
  88. package/dist/core/markup-editor.d.ts +22 -0
  89. package/dist/core/markup-editor.d.ts.map +1 -0
  90. package/dist/core/optional-renderers.d.ts +9 -0
  91. package/dist/core/optional-renderers.d.ts.map +1 -0
  92. package/dist/core/registries.d.ts +50 -0
  93. package/dist/core/registries.d.ts.map +1 -0
  94. package/dist/core/schema-dynamic-modifier.d.ts +13 -0
  95. package/dist/core/schema-dynamic-modifier.d.ts.map +1 -0
  96. package/dist/core/vue-renderer.d.ts +40 -0
  97. package/dist/core/vue-renderer.d.ts.map +1 -0
  98. package/dist/core.js +46 -0
  99. package/dist/cose-bilkent-JH36ORCC-CXuKFbXy.js +2608 -0
  100. package/dist/cynefin-VYW2F7L2-Bkk-F_Js.js +23766 -0
  101. package/dist/cynefinDiagram-MW4NZA55-DwOK40hm.js +299 -0
  102. package/dist/cytoscape.esm-3W4EOjxC.js +18756 -0
  103. package/dist/dagre-VZM6K2ZE-0VsGm8Ag.js +340 -0
  104. package/dist/defaultLocale-BgPVtth8.js +171 -0
  105. package/dist/diagram-7IWD3JNH-BrApu1hz.js +350 -0
  106. package/dist/diagram-B4RE2ZJO-CVXoBg2r.js +461 -0
  107. package/dist/diagram-LBJQPF4R-Dp0eSz2L.js +142 -0
  108. package/dist/diagram-Q27KOJAE-DWIltqIH.js +528 -0
  109. package/dist/diagram-UB23O5K3-B7z2Lj3K.js +219 -0
  110. package/dist/directives.d.ts +10 -0
  111. package/dist/directives.d.ts.map +1 -0
  112. package/dist/ebnfDiagram-BXEA7PRR-CYgE6z_2.js +109 -0
  113. package/dist/erDiagram-JOGREHBK-D3QWrPo-.js +910 -0
  114. package/dist/extensions/additional/folding-heading.d.ts +11 -0
  115. package/dist/extensions/additional/folding-heading.d.ts.map +1 -0
  116. package/dist/extensions/additional/math.d.ts +36 -0
  117. package/dist/extensions/additional/math.d.ts.map +1 -0
  118. package/dist/extensions/additional/mermaid.d.ts +21 -0
  119. package/dist/extensions/additional/mermaid.d.ts.map +1 -0
  120. package/dist/extensions/additional/quote-link.d.ts +19 -0
  121. package/dist/extensions/additional/quote-link.d.ts.map +1 -0
  122. package/dist/extensions/additional/yfm-html-block.d.ts +21 -0
  123. package/dist/extensions/additional/yfm-html-block.d.ts.map +1 -0
  124. package/dist/extensions/base.d.ts +9 -0
  125. package/dist/extensions/base.d.ts.map +1 -0
  126. package/dist/extensions/behavior/clicks-on-edges.d.ts +12 -0
  127. package/dist/extensions/behavior/clicks-on-edges.d.ts.map +1 -0
  128. package/dist/extensions/behavior/clipboard.d.ts +6 -0
  129. package/dist/extensions/behavior/clipboard.d.ts.map +1 -0
  130. package/dist/extensions/behavior/cursor.d.ts +29 -0
  131. package/dist/extensions/behavior/cursor.d.ts.map +1 -0
  132. package/dist/extensions/behavior/editor-mode-keymap.d.ts +8 -0
  133. package/dist/extensions/behavior/editor-mode-keymap.d.ts.map +1 -0
  134. package/dist/extensions/behavior/history.d.ts +21 -0
  135. package/dist/extensions/behavior/history.d.ts.map +1 -0
  136. package/dist/extensions/behavior/placeholder.d.ts +11 -0
  137. package/dist/extensions/behavior/placeholder.d.ts.map +1 -0
  138. package/dist/extensions/behavior/resizable.d.ts +4 -0
  139. package/dist/extensions/behavior/resizable.d.ts.map +1 -0
  140. package/dist/extensions/behavior/selection-commands.d.ts +24 -0
  141. package/dist/extensions/behavior/selection-commands.d.ts.map +1 -0
  142. package/dist/extensions/behavior/selection-context.d.ts +9 -0
  143. package/dist/extensions/behavior/selection-context.d.ts.map +1 -0
  144. package/dist/extensions/behavior/selection.d.ts +12 -0
  145. package/dist/extensions/behavior/selection.d.ts.map +1 -0
  146. package/dist/extensions/index.d.ts +34 -0
  147. package/dist/extensions/index.d.ts.map +1 -0
  148. package/dist/extensions/markdown/blockquote-specs.d.ts +15 -0
  149. package/dist/extensions/markdown/blockquote-specs.d.ts.map +1 -0
  150. package/dist/extensions/markdown/blockquote.d.ts +14 -0
  151. package/dist/extensions/markdown/blockquote.d.ts.map +1 -0
  152. package/dist/extensions/markdown/bold-specs.d.ts +12 -0
  153. package/dist/extensions/markdown/bold-specs.d.ts.map +1 -0
  154. package/dist/extensions/markdown/bold.d.ts +17 -0
  155. package/dist/extensions/markdown/bold.d.ts.map +1 -0
  156. package/dist/extensions/markdown/breaks-specs.d.ts +22 -0
  157. package/dist/extensions/markdown/breaks-specs.d.ts.map +1 -0
  158. package/dist/extensions/markdown/breaks.d.ts +11 -0
  159. package/dist/extensions/markdown/breaks.d.ts.map +1 -0
  160. package/dist/extensions/markdown/code-block-specs.d.ts +14 -0
  161. package/dist/extensions/markdown/code-block-specs.d.ts.map +1 -0
  162. package/dist/extensions/markdown/code-block.d.ts +14 -0
  163. package/dist/extensions/markdown/code-block.d.ts.map +1 -0
  164. package/dist/extensions/markdown/code-specs.d.ts +9 -0
  165. package/dist/extensions/markdown/code-specs.d.ts.map +1 -0
  166. package/dist/extensions/markdown/code.d.ts +11 -0
  167. package/dist/extensions/markdown/code.d.ts.map +1 -0
  168. package/dist/extensions/markdown/deflist-specs.d.ts +16 -0
  169. package/dist/extensions/markdown/deflist-specs.d.ts.map +1 -0
  170. package/dist/extensions/markdown/deflist.d.ts +14 -0
  171. package/dist/extensions/markdown/deflist.d.ts.map +1 -0
  172. package/dist/extensions/markdown/heading-specs.d.ts +11 -0
  173. package/dist/extensions/markdown/heading-specs.d.ts.map +1 -0
  174. package/dist/extensions/markdown/heading.d.ts +17 -0
  175. package/dist/extensions/markdown/heading.d.ts.map +1 -0
  176. package/dist/extensions/markdown/horizontal-rule-specs.d.ts +10 -0
  177. package/dist/extensions/markdown/horizontal-rule-specs.d.ts.map +1 -0
  178. package/dist/extensions/markdown/horizontal-rule.d.ts +8 -0
  179. package/dist/extensions/markdown/horizontal-rule.d.ts.map +1 -0
  180. package/dist/extensions/markdown/html.d.ts +15 -0
  181. package/dist/extensions/markdown/html.d.ts.map +1 -0
  182. package/dist/extensions/markdown/image.d.ts +39 -0
  183. package/dist/extensions/markdown/image.d.ts.map +1 -0
  184. package/dist/extensions/markdown/italic-specs.d.ts +12 -0
  185. package/dist/extensions/markdown/italic-specs.d.ts.map +1 -0
  186. package/dist/extensions/markdown/italic.d.ts +11 -0
  187. package/dist/extensions/markdown/italic.d.ts.map +1 -0
  188. package/dist/extensions/markdown/link-specs.d.ts +19 -0
  189. package/dist/extensions/markdown/link-specs.d.ts.map +1 -0
  190. package/dist/extensions/markdown/link.d.ts +21 -0
  191. package/dist/extensions/markdown/link.d.ts.map +1 -0
  192. package/dist/extensions/markdown/list-specs.d.ts +6 -0
  193. package/dist/extensions/markdown/list-specs.d.ts.map +1 -0
  194. package/dist/extensions/markdown/lists.d.ts +18 -0
  195. package/dist/extensions/markdown/lists.d.ts.map +1 -0
  196. package/dist/extensions/markdown/mark.d.ts +12 -0
  197. package/dist/extensions/markdown/mark.d.ts.map +1 -0
  198. package/dist/extensions/markdown/strike.d.ts +12 -0
  199. package/dist/extensions/markdown/strike.d.ts.map +1 -0
  200. package/dist/extensions/markdown/subscript.d.ts +12 -0
  201. package/dist/extensions/markdown/subscript.d.ts.map +1 -0
  202. package/dist/extensions/markdown/table-actions.d.ts +14 -0
  203. package/dist/extensions/markdown/table-actions.d.ts.map +1 -0
  204. package/dist/extensions/markdown/table-specs.d.ts +25 -0
  205. package/dist/extensions/markdown/table-specs.d.ts.map +1 -0
  206. package/dist/extensions/markdown/table.d.ts +6 -0
  207. package/dist/extensions/markdown/table.d.ts.map +1 -0
  208. package/dist/extensions/markdown/underline.d.ts +12 -0
  209. package/dist/extensions/markdown/underline.d.ts.map +1 -0
  210. package/dist/extensions/specs.d.ts +13 -0
  211. package/dist/extensions/specs.d.ts.map +1 -0
  212. package/dist/extensions.js +247 -0
  213. package/dist/flowDiagram-UKHOOZJN-CfjPcHNW.js +1638 -0
  214. package/dist/forms/MarkdownEditorForm.vue.d.ts +37 -0
  215. package/dist/forms/MarkdownEditorForm.vue.d.ts.map +1 -0
  216. package/dist/forms/MarkdownEditorImageForm.vue.d.ts +131 -0
  217. package/dist/forms/MarkdownEditorImageForm.vue.d.ts.map +1 -0
  218. package/dist/forms/MarkdownEditorLinkForm.vue.d.ts +119 -0
  219. package/dist/forms/MarkdownEditorLinkForm.vue.d.ts.map +1 -0
  220. package/dist/forms/MarkdownEditorTextInput.vue.d.ts +39 -0
  221. package/dist/forms/MarkdownEditorTextInput.vue.d.ts.map +1 -0
  222. package/dist/forms/index.d.ts +7 -0
  223. package/dist/forms/index.d.ts.map +1 -0
  224. package/dist/forms.js +7 -0
  225. package/dist/full-C-o2lPBX.js +16 -0
  226. package/dist/full-specs-Cl-ODShc.js +10 -0
  227. package/dist/ganttDiagram-PKOTCBZU-ECmaWI-9.js +2711 -0
  228. package/dist/gitGraphDiagram-DS77QQ5N-DgG1RGJ8.js +815 -0
  229. package/dist/graph-DAHC4kPm.js +1545 -0
  230. package/dist/heading-specs-D7Bj4aIM.js +489 -0
  231. package/dist/i18n/index.d.ts +70 -0
  232. package/dist/i18n/index.d.ts.map +1 -0
  233. package/dist/i18n.js +132 -0
  234. package/dist/index-CqpK5VVw.js +149 -0
  235. package/dist/index-uerphigI.js +82 -0
  236. package/dist/index.css +1 -0
  237. package/dist/index.d.ts +87 -0
  238. package/dist/index.d.ts.map +1 -0
  239. package/dist/index.js +1293 -0
  240. package/dist/infoDiagram-6WML65LV-B1Yl3nZV.js +24 -0
  241. package/dist/init-DjUOC4st.js +16 -0
  242. package/dist/ishikawaDiagram-WSZJBQD7-4sngaB5o.js +621 -0
  243. package/dist/journeyDiagram-NVQOT4AX-B_6AmR_j.js +834 -0
  244. package/dist/kanban-definition-27J2QSJJ-B8BO9o8J.js +724 -0
  245. package/dist/katex-ByXcxnHy.js +14436 -0
  246. package/dist/katex-DoRnZ_sp.js +11682 -0
  247. package/dist/layout-DBbo_M5I.js +1519 -0
  248. package/dist/linear-BEdRfKba.js +259 -0
  249. package/dist/map-DRdzG8Ho.js +224 -0
  250. package/dist/mermaid.core-CR0bA2Wa.js +16496 -0
  251. package/dist/mindmap-definition-FAOFIHXS-DnPz807N.js +827 -0
  252. package/dist/optional-renderers-BalvqqvY.js +11 -0
  253. package/dist/ordinal-B6-f3MAq.js +61 -0
  254. package/dist/pegDiagram-VL7TDLO6-csGWlzs8.js +95 -0
  255. package/dist/pieDiagram-7S7Q4E2Y-Bqs8j5FX.js +207 -0
  256. package/dist/presets/commonmark-specs.d.ts +9 -0
  257. package/dist/presets/commonmark-specs.d.ts.map +1 -0
  258. package/dist/presets/commonmark.d.ts +26 -0
  259. package/dist/presets/commonmark.d.ts.map +1 -0
  260. package/dist/presets/default.d.ts +6 -0
  261. package/dist/presets/default.d.ts.map +1 -0
  262. package/dist/presets/full-specs.d.ts +6 -0
  263. package/dist/presets/full-specs.d.ts.map +1 -0
  264. package/dist/presets/full.d.ts +17 -0
  265. package/dist/presets/full.d.ts.map +1 -0
  266. package/dist/presets/index.d.ts +13 -0
  267. package/dist/presets/index.d.ts.map +1 -0
  268. package/dist/presets/zero.d.ts +8 -0
  269. package/dist/presets/zero.d.ts.map +1 -0
  270. package/dist/presets.js +10 -0
  271. package/dist/public-types.d.ts +96 -0
  272. package/dist/public-types.d.ts.map +1 -0
  273. package/dist/quadrantDiagram-CIZ2JOQS-jzP4lRrY.js +1023 -0
  274. package/dist/railroadDiagram-AXF67PYL-BSCyR24u.js +77 -0
  275. package/dist/renderer/MarkdownRenderer.vue.d.ts +10 -0
  276. package/dist/renderer/MarkdownRenderer.vue.d.ts.map +1 -0
  277. package/dist/renderer/index.d.ts +3 -0
  278. package/dist/renderer/index.d.ts.map +1 -0
  279. package/dist/renderer/markdown.d.ts +2 -0
  280. package/dist/renderer/markdown.d.ts.map +1 -0
  281. package/dist/renderer/mermaid-runtime.d.ts +4 -0
  282. package/dist/renderer/mermaid-runtime.d.ts.map +1 -0
  283. package/dist/renderer.js +258 -0
  284. package/dist/requirementDiagram-LRYGKXZP-DmEkLYqX.js +882 -0
  285. package/dist/sankeyDiagram-W5VNT64P-CYvRYMTh.js +847 -0
  286. package/dist/schema-dynamic-modifier-Dhf0m6tE.js +21514 -0
  287. package/dist/schema-dynamic-modifier.css +1 -0
  288. package/dist/sequenceDiagram-SI44F4Z6-CyWbDtPA.js +2888 -0
  289. package/dist/sizeCapture-X5ZJPWSS-xKhYCY84.js +46 -0
  290. package/dist/specs.js +127 -0
  291. package/dist/stateDiagram-OKZ733FA-DP44R2Dd.js +263 -0
  292. package/dist/stateDiagram-v2-UEYNNEHI-BvlOisND.js +16 -0
  293. package/dist/swimlanes-SLNWSIFB-BKFp8twH.js +5332 -0
  294. package/dist/swimlanesDiagram-ULZ7WXOC-CTvIFuHq.js +13 -0
  295. package/dist/timeline-definition-Z64GVDOM-B4137uIl.js +1055 -0
  296. package/dist/toolbar/config.d.ts +45 -0
  297. package/dist/toolbar/config.d.ts.map +1 -0
  298. package/dist/toolbar/index.d.ts +3 -0
  299. package/dist/toolbar/index.d.ts.map +1 -0
  300. package/dist/toolbar.js +100 -0
  301. package/dist/use-markdown-editor.d.ts +14 -0
  302. package/dist/use-markdown-editor.d.ts.map +1 -0
  303. package/dist/vennDiagram-T6HMQDX7-CPs8gXjx.js +1578 -0
  304. package/dist/version.d.ts +3 -0
  305. package/dist/version.d.ts.map +1 -0
  306. package/dist/wardleyDiagram-T6FBY63Y-BYp13hbI.js +675 -0
  307. package/dist/xychartDiagram-ELKLHX3M-DTT37K2u.js +1388 -0
  308. package/package.json +110 -0
@@ -0,0 +1,1023 @@
1
+ import { s as Ae, g as ke, o as ae, n as Fe, a as Pe, b as ve, _ as o, c as zt, l as bt, d as Lt, e as Ce, p as Le, B as z, i as Ee, E as De } from "./mermaid.core-CR0bA2Wa.js";
2
+ import { l as ie } from "./linear-BEdRfKba.js";
3
+ var Et = (function() {
4
+ var t = /* @__PURE__ */ o(function(Y, r, l, x) {
5
+ for (l = l || {}, x = Y.length; x--; l[Y[x]] = r) ;
6
+ return l;
7
+ }, "o"), n = [1, 3], f = [1, 4], d = [1, 5], h = [1, 6], p = [1, 7], y = [1, 4, 5, 10, 12, 13, 14, 15, 18, 25, 35, 37, 39, 41, 42, 48, 50, 51, 52, 53, 54, 55, 56, 57, 60, 61, 63, 64, 65, 66, 67], _ = [1, 4, 5, 10, 12, 13, 14, 15, 18, 25, 28, 35, 37, 39, 41, 42, 48, 50, 51, 52, 53, 54, 55, 56, 57, 60, 61, 63, 64, 65, 66, 67], a = [55, 56, 57], k = [2, 36], u = [1, 37], T = [1, 36], q = [1, 38], m = [1, 35], b = [1, 43], g = [1, 41], A = [1, 45], ht = [1, 14], xt = [1, 23], ft = [1, 18], gt = [1, 19], ct = [1, 20], _t = [1, 21], dt = [1, 22], i = [1, 24], Vt = [1, 25], It = [1, 26], wt = [1, 27], Bt = [1, 28], Rt = [1, 29], U = [1, 32], Q = [1, 33], F = [1, 34], P = [1, 39], v = [1, 40], C = [1, 42], L = [1, 44], H = [1, 63], X = [1, 62], E = [4, 5, 8, 10, 12, 13, 14, 15, 18, 44, 47, 49, 55, 56, 57, 63, 64, 65, 66, 67], Nt = [1, 66], Wt = [1, 67], Ut = [1, 68], Qt = [1, 69], Ot = [1, 70], Ht = [1, 71], Xt = [1, 72], Mt = [1, 73], Yt = [1, 74], jt = [1, 75], Gt = [1, 76], Kt = [1, 77], w = [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 18], K = [1, 91], Z = [1, 92], J = [1, 93], $ = [1, 100], tt = [1, 94], et = [1, 97], it = [1, 95], at = [1, 96], nt = [1, 98], st = [1, 99], At = [1, 103], Zt = [10, 55, 56, 57], N = [4, 5, 6, 8, 10, 11, 13, 17, 18, 19, 20, 55, 56, 57], kt = {
8
+ trace: /* @__PURE__ */ o(function() {
9
+ }, "trace"),
10
+ yy: {},
11
+ symbols_: { error: 2, idStringToken: 3, ALPHA: 4, NUM: 5, NODE_STRING: 6, DOWN: 7, MINUS: 8, DEFAULT: 9, COMMA: 10, COLON: 11, AMP: 12, BRKT: 13, MULT: 14, UNICODE_TEXT: 15, styleComponent: 16, UNIT: 17, SPACE: 18, STYLE: 19, PCT: 20, idString: 21, style: 22, stylesOpt: 23, classDefStatement: 24, CLASSDEF: 25, start: 26, eol: 27, QUADRANT: 28, document: 29, line: 30, statement: 31, axisDetails: 32, quadrantDetails: 33, points: 34, title: 35, title_value: 36, acc_title: 37, acc_title_value: 38, acc_descr: 39, acc_descr_value: 40, acc_descr_multiline_value: 41, section: 42, text: 43, point_start: 44, point_x: 45, point_y: 46, class_name: 47, "X-AXIS": 48, "AXIS-TEXT-DELIMITER": 49, "Y-AXIS": 50, QUADRANT_1: 51, QUADRANT_2: 52, QUADRANT_3: 53, QUADRANT_4: 54, NEWLINE: 55, SEMI: 56, EOF: 57, alphaNumToken: 58, textNoTagsToken: 59, STR: 60, MD_STR: 61, alphaNum: 62, PUNCTUATION: 63, PLUS: 64, EQUALS: 65, DOT: 66, UNDERSCORE: 67, $accept: 0, $end: 1 },
12
+ terminals_: { 2: "error", 4: "ALPHA", 5: "NUM", 6: "NODE_STRING", 7: "DOWN", 8: "MINUS", 9: "DEFAULT", 10: "COMMA", 11: "COLON", 12: "AMP", 13: "BRKT", 14: "MULT", 15: "UNICODE_TEXT", 17: "UNIT", 18: "SPACE", 19: "STYLE", 20: "PCT", 25: "CLASSDEF", 28: "QUADRANT", 35: "title", 36: "title_value", 37: "acc_title", 38: "acc_title_value", 39: "acc_descr", 40: "acc_descr_value", 41: "acc_descr_multiline_value", 42: "section", 44: "point_start", 45: "point_x", 46: "point_y", 47: "class_name", 48: "X-AXIS", 49: "AXIS-TEXT-DELIMITER", 50: "Y-AXIS", 51: "QUADRANT_1", 52: "QUADRANT_2", 53: "QUADRANT_3", 54: "QUADRANT_4", 55: "NEWLINE", 56: "SEMI", 57: "EOF", 60: "STR", 61: "MD_STR", 63: "PUNCTUATION", 64: "PLUS", 65: "EQUALS", 66: "DOT", 67: "UNDERSCORE" },
13
+ productions_: [0, [3, 1], [3, 1], [3, 1], [3, 1], [3, 1], [3, 1], [3, 1], [3, 1], [3, 1], [3, 1], [3, 1], [3, 1], [16, 1], [16, 1], [16, 1], [16, 1], [16, 1], [16, 1], [16, 1], [16, 1], [16, 1], [16, 1], [21, 1], [21, 2], [22, 1], [22, 2], [23, 1], [23, 3], [24, 5], [26, 2], [26, 2], [26, 2], [29, 0], [29, 2], [30, 2], [31, 0], [31, 1], [31, 2], [31, 1], [31, 1], [31, 1], [31, 2], [31, 2], [31, 2], [31, 1], [31, 1], [34, 4], [34, 5], [34, 5], [34, 6], [32, 4], [32, 3], [32, 2], [32, 4], [32, 3], [32, 2], [33, 2], [33, 2], [33, 2], [33, 2], [27, 1], [27, 1], [27, 1], [43, 1], [43, 2], [43, 1], [43, 1], [62, 1], [62, 2], [58, 1], [58, 1], [58, 1], [58, 1], [58, 1], [58, 1], [58, 1], [58, 1], [58, 1], [58, 1], [58, 1], [58, 1], [59, 1], [59, 1], [59, 1]],
14
+ performAction: /* @__PURE__ */ o(function(r, l, x, c, S, e, ut) {
15
+ var s = e.length - 1;
16
+ switch (S) {
17
+ case 23:
18
+ this.$ = e[s];
19
+ break;
20
+ case 24:
21
+ this.$ = e[s - 1] + "" + e[s];
22
+ break;
23
+ case 26:
24
+ this.$ = e[s - 1] + e[s];
25
+ break;
26
+ case 27:
27
+ this.$ = [e[s].trim()];
28
+ break;
29
+ case 28:
30
+ e[s - 2].push(e[s].trim()), this.$ = e[s - 2];
31
+ break;
32
+ case 29:
33
+ this.$ = e[s - 4], c.addClass(e[s - 2], e[s]);
34
+ break;
35
+ case 37:
36
+ this.$ = [];
37
+ break;
38
+ case 42:
39
+ this.$ = e[s].trim(), c.setDiagramTitle(this.$);
40
+ break;
41
+ case 43:
42
+ this.$ = e[s].trim(), c.setAccTitle(this.$);
43
+ break;
44
+ case 44:
45
+ case 45:
46
+ this.$ = e[s].trim(), c.setAccDescription(this.$);
47
+ break;
48
+ case 46:
49
+ c.addSection(e[s].substr(8)), this.$ = e[s].substr(8);
50
+ break;
51
+ case 47:
52
+ c.addPoint(e[s - 3], "", e[s - 1], e[s], []);
53
+ break;
54
+ case 48:
55
+ c.addPoint(e[s - 4], e[s - 3], e[s - 1], e[s], []);
56
+ break;
57
+ case 49:
58
+ c.addPoint(e[s - 4], "", e[s - 2], e[s - 1], e[s]);
59
+ break;
60
+ case 50:
61
+ c.addPoint(e[s - 5], e[s - 4], e[s - 2], e[s - 1], e[s]);
62
+ break;
63
+ case 51:
64
+ c.setXAxisLeftText(e[s - 2]), c.setXAxisRightText(e[s]);
65
+ break;
66
+ case 52:
67
+ e[s - 1].text += " ⟶ ", c.setXAxisLeftText(e[s - 1]);
68
+ break;
69
+ case 53:
70
+ c.setXAxisLeftText(e[s]);
71
+ break;
72
+ case 54:
73
+ c.setYAxisBottomText(e[s - 2]), c.setYAxisTopText(e[s]);
74
+ break;
75
+ case 55:
76
+ e[s - 1].text += " ⟶ ", c.setYAxisBottomText(e[s - 1]);
77
+ break;
78
+ case 56:
79
+ c.setYAxisBottomText(e[s]);
80
+ break;
81
+ case 57:
82
+ c.setQuadrant1Text(e[s]);
83
+ break;
84
+ case 58:
85
+ c.setQuadrant2Text(e[s]);
86
+ break;
87
+ case 59:
88
+ c.setQuadrant3Text(e[s]);
89
+ break;
90
+ case 60:
91
+ c.setQuadrant4Text(e[s]);
92
+ break;
93
+ case 64:
94
+ this.$ = { text: e[s], type: "text" };
95
+ break;
96
+ case 65:
97
+ this.$ = { text: e[s - 1].text + "" + e[s], type: e[s - 1].type };
98
+ break;
99
+ case 66:
100
+ this.$ = { text: e[s], type: "text" };
101
+ break;
102
+ case 67:
103
+ this.$ = { text: e[s], type: "markdown" };
104
+ break;
105
+ case 68:
106
+ this.$ = e[s];
107
+ break;
108
+ case 69:
109
+ this.$ = e[s - 1] + "" + e[s];
110
+ break;
111
+ }
112
+ }, "anonymous"),
113
+ table: [{ 18: n, 26: 1, 27: 2, 28: f, 55: d, 56: h, 57: p }, { 1: [3] }, { 18: n, 26: 8, 27: 2, 28: f, 55: d, 56: h, 57: p }, { 18: n, 26: 9, 27: 2, 28: f, 55: d, 56: h, 57: p }, t(y, [2, 33], { 29: 10 }), t(_, [2, 61]), t(_, [2, 62]), t(_, [2, 63]), { 1: [2, 30] }, { 1: [2, 31] }, t(a, k, { 30: 11, 31: 12, 24: 13, 32: 15, 33: 16, 34: 17, 43: 30, 58: 31, 1: [2, 32], 4: u, 5: T, 10: q, 12: m, 13: b, 14: g, 15: A, 18: ht, 25: xt, 35: ft, 37: gt, 39: ct, 41: _t, 42: dt, 48: i, 50: Vt, 51: It, 52: wt, 53: Bt, 54: Rt, 60: U, 61: Q, 63: F, 64: P, 65: v, 66: C, 67: L }), t(y, [2, 34]), { 27: 46, 55: d, 56: h, 57: p }, t(a, [2, 37]), t(a, k, { 24: 13, 32: 15, 33: 16, 34: 17, 43: 30, 58: 31, 31: 47, 4: u, 5: T, 10: q, 12: m, 13: b, 14: g, 15: A, 18: ht, 25: xt, 35: ft, 37: gt, 39: ct, 41: _t, 42: dt, 48: i, 50: Vt, 51: It, 52: wt, 53: Bt, 54: Rt, 60: U, 61: Q, 63: F, 64: P, 65: v, 66: C, 67: L }), t(a, [2, 39]), t(a, [2, 40]), t(a, [2, 41]), { 36: [1, 48] }, { 38: [1, 49] }, { 40: [1, 50] }, t(a, [2, 45]), t(a, [2, 46]), { 18: [1, 51] }, { 4: u, 5: T, 10: q, 12: m, 13: b, 14: g, 15: A, 43: 52, 58: 31, 60: U, 61: Q, 63: F, 64: P, 65: v, 66: C, 67: L }, { 4: u, 5: T, 10: q, 12: m, 13: b, 14: g, 15: A, 43: 53, 58: 31, 60: U, 61: Q, 63: F, 64: P, 65: v, 66: C, 67: L }, { 4: u, 5: T, 10: q, 12: m, 13: b, 14: g, 15: A, 43: 54, 58: 31, 60: U, 61: Q, 63: F, 64: P, 65: v, 66: C, 67: L }, { 4: u, 5: T, 10: q, 12: m, 13: b, 14: g, 15: A, 43: 55, 58: 31, 60: U, 61: Q, 63: F, 64: P, 65: v, 66: C, 67: L }, { 4: u, 5: T, 10: q, 12: m, 13: b, 14: g, 15: A, 43: 56, 58: 31, 60: U, 61: Q, 63: F, 64: P, 65: v, 66: C, 67: L }, { 4: u, 5: T, 10: q, 12: m, 13: b, 14: g, 15: A, 43: 57, 58: 31, 60: U, 61: Q, 63: F, 64: P, 65: v, 66: C, 67: L }, { 4: u, 5: T, 8: H, 10: q, 12: m, 13: b, 14: g, 15: A, 18: X, 44: [1, 58], 47: [1, 59], 58: 61, 59: 60, 63: F, 64: P, 65: v, 66: C, 67: L }, t(E, [2, 64]), t(E, [2, 66]), t(E, [2, 67]), t(E, [2, 70]), t(E, [2, 71]), t(E, [2, 72]), t(E, [2, 73]), t(E, [2, 74]), t(E, [2, 75]), t(E, [2, 76]), t(E, [2, 77]), t(E, [2, 78]), t(E, [2, 79]), t(E, [2, 80]), t(E, [2, 81]), t(y, [2, 35]), t(a, [2, 38]), t(a, [2, 42]), t(a, [2, 43]), t(a, [2, 44]), { 3: 65, 4: Nt, 5: Wt, 6: Ut, 7: Qt, 8: Ot, 9: Ht, 10: Xt, 11: Mt, 12: Yt, 13: jt, 14: Gt, 15: Kt, 21: 64 }, t(a, [2, 53], { 59: 60, 58: 61, 4: u, 5: T, 8: H, 10: q, 12: m, 13: b, 14: g, 15: A, 18: X, 49: [1, 78], 63: F, 64: P, 65: v, 66: C, 67: L }), t(a, [2, 56], { 59: 60, 58: 61, 4: u, 5: T, 8: H, 10: q, 12: m, 13: b, 14: g, 15: A, 18: X, 49: [1, 79], 63: F, 64: P, 65: v, 66: C, 67: L }), t(a, [2, 57], { 59: 60, 58: 61, 4: u, 5: T, 8: H, 10: q, 12: m, 13: b, 14: g, 15: A, 18: X, 63: F, 64: P, 65: v, 66: C, 67: L }), t(a, [2, 58], { 59: 60, 58: 61, 4: u, 5: T, 8: H, 10: q, 12: m, 13: b, 14: g, 15: A, 18: X, 63: F, 64: P, 65: v, 66: C, 67: L }), t(a, [2, 59], { 59: 60, 58: 61, 4: u, 5: T, 8: H, 10: q, 12: m, 13: b, 14: g, 15: A, 18: X, 63: F, 64: P, 65: v, 66: C, 67: L }), t(a, [2, 60], { 59: 60, 58: 61, 4: u, 5: T, 8: H, 10: q, 12: m, 13: b, 14: g, 15: A, 18: X, 63: F, 64: P, 65: v, 66: C, 67: L }), { 45: [1, 80] }, { 44: [1, 81] }, t(E, [2, 65]), t(E, [2, 82]), t(E, [2, 83]), t(E, [2, 84]), { 3: 83, 4: Nt, 5: Wt, 6: Ut, 7: Qt, 8: Ot, 9: Ht, 10: Xt, 11: Mt, 12: Yt, 13: jt, 14: Gt, 15: Kt, 18: [1, 82] }, t(w, [2, 23]), t(w, [2, 1]), t(w, [2, 2]), t(w, [2, 3]), t(w, [2, 4]), t(w, [2, 5]), t(w, [2, 6]), t(w, [2, 7]), t(w, [2, 8]), t(w, [2, 9]), t(w, [2, 10]), t(w, [2, 11]), t(w, [2, 12]), t(a, [2, 52], { 58: 31, 43: 84, 4: u, 5: T, 10: q, 12: m, 13: b, 14: g, 15: A, 60: U, 61: Q, 63: F, 64: P, 65: v, 66: C, 67: L }), t(a, [2, 55], { 58: 31, 43: 85, 4: u, 5: T, 10: q, 12: m, 13: b, 14: g, 15: A, 60: U, 61: Q, 63: F, 64: P, 65: v, 66: C, 67: L }), { 46: [1, 86] }, { 45: [1, 87] }, { 4: K, 5: Z, 6: J, 8: $, 11: tt, 13: et, 16: 90, 17: it, 18: at, 19: nt, 20: st, 22: 89, 23: 88 }, t(w, [2, 24]), t(a, [2, 51], { 59: 60, 58: 61, 4: u, 5: T, 8: H, 10: q, 12: m, 13: b, 14: g, 15: A, 18: X, 63: F, 64: P, 65: v, 66: C, 67: L }), t(a, [2, 54], { 59: 60, 58: 61, 4: u, 5: T, 8: H, 10: q, 12: m, 13: b, 14: g, 15: A, 18: X, 63: F, 64: P, 65: v, 66: C, 67: L }), t(a, [2, 47], { 22: 89, 16: 90, 23: 101, 4: K, 5: Z, 6: J, 8: $, 11: tt, 13: et, 17: it, 18: at, 19: nt, 20: st }), { 46: [1, 102] }, t(a, [2, 29], { 10: At }), t(Zt, [2, 27], { 16: 104, 4: K, 5: Z, 6: J, 8: $, 11: tt, 13: et, 17: it, 18: at, 19: nt, 20: st }), t(N, [2, 25]), t(N, [2, 13]), t(N, [2, 14]), t(N, [2, 15]), t(N, [2, 16]), t(N, [2, 17]), t(N, [2, 18]), t(N, [2, 19]), t(N, [2, 20]), t(N, [2, 21]), t(N, [2, 22]), t(a, [2, 49], { 10: At }), t(a, [2, 48], { 22: 89, 16: 90, 23: 105, 4: K, 5: Z, 6: J, 8: $, 11: tt, 13: et, 17: it, 18: at, 19: nt, 20: st }), { 4: K, 5: Z, 6: J, 8: $, 11: tt, 13: et, 16: 90, 17: it, 18: at, 19: nt, 20: st, 22: 106 }, t(N, [2, 26]), t(a, [2, 50], { 10: At }), t(Zt, [2, 28], { 16: 104, 4: K, 5: Z, 6: J, 8: $, 11: tt, 13: et, 17: it, 18: at, 19: nt, 20: st })],
114
+ defaultActions: { 8: [2, 30], 9: [2, 31] },
115
+ parseError: /* @__PURE__ */ o(function(r, l) {
116
+ if (l.recoverable)
117
+ this.trace(r);
118
+ else {
119
+ var x = new Error(r);
120
+ throw x.hash = l, x;
121
+ }
122
+ }, "parseError"),
123
+ parse: /* @__PURE__ */ o(function(r) {
124
+ var l = this, x = [0], c = [], S = [null], e = [], ut = this.table, s = "", yt = 0, Jt = 0, me = 2, $t = 1, be = e.slice.call(arguments, 1), D = Object.create(this.lexer), j = { yy: {} };
125
+ for (var Ft in this.yy)
126
+ Object.prototype.hasOwnProperty.call(this.yy, Ft) && (j.yy[Ft] = this.yy[Ft]);
127
+ D.setInput(r, j.yy), j.yy.lexer = D, j.yy.parser = this, typeof D.yylloc > "u" && (D.yylloc = {});
128
+ var Pt = D.yylloc;
129
+ e.push(Pt);
130
+ var Se = D.options && D.options.ranges;
131
+ typeof j.yy.parseError == "function" ? this.parseError = j.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
132
+ function _e(R) {
133
+ x.length = x.length - 2 * R, S.length = S.length - R, e.length = e.length - R;
134
+ }
135
+ o(_e, "popStack");
136
+ function te() {
137
+ var R;
138
+ return R = c.pop() || D.lex() || $t, typeof R != "number" && (R instanceof Array && (c = R, R = c.pop()), R = l.symbols_[R] || R), R;
139
+ }
140
+ o(te, "lex");
141
+ for (var B, G, W, vt, rt = {}, Tt, M, ee, qt; ; ) {
142
+ if (G = x[x.length - 1], this.defaultActions[G] ? W = this.defaultActions[G] : ((B === null || typeof B > "u") && (B = te()), W = ut[G] && ut[G][B]), typeof W > "u" || !W.length || !W[0]) {
143
+ var Ct = "";
144
+ qt = [];
145
+ for (Tt in ut[G])
146
+ this.terminals_[Tt] && Tt > me && qt.push("'" + this.terminals_[Tt] + "'");
147
+ D.showPosition ? Ct = "Parse error on line " + (yt + 1) + `:
148
+ ` + D.showPosition() + `
149
+ Expecting ` + qt.join(", ") + ", got '" + (this.terminals_[B] || B) + "'" : Ct = "Parse error on line " + (yt + 1) + ": Unexpected " + (B == $t ? "end of input" : "'" + (this.terminals_[B] || B) + "'"), this.parseError(Ct, {
150
+ text: D.match,
151
+ token: this.terminals_[B] || B,
152
+ line: D.yylineno,
153
+ loc: Pt,
154
+ expected: qt
155
+ });
156
+ }
157
+ if (W[0] instanceof Array && W.length > 1)
158
+ throw new Error("Parse Error: multiple actions possible at state: " + G + ", token: " + B);
159
+ switch (W[0]) {
160
+ case 1:
161
+ x.push(B), S.push(D.yytext), e.push(D.yylloc), x.push(W[1]), B = null, Jt = D.yyleng, s = D.yytext, yt = D.yylineno, Pt = D.yylloc;
162
+ break;
163
+ case 2:
164
+ if (M = this.productions_[W[1]][1], rt.$ = S[S.length - M], rt._$ = {
165
+ first_line: e[e.length - (M || 1)].first_line,
166
+ last_line: e[e.length - 1].last_line,
167
+ first_column: e[e.length - (M || 1)].first_column,
168
+ last_column: e[e.length - 1].last_column
169
+ }, Se && (rt._$.range = [
170
+ e[e.length - (M || 1)].range[0],
171
+ e[e.length - 1].range[1]
172
+ ]), vt = this.performAction.apply(rt, [
173
+ s,
174
+ Jt,
175
+ yt,
176
+ j.yy,
177
+ W[1],
178
+ S,
179
+ e
180
+ ].concat(be)), typeof vt < "u")
181
+ return vt;
182
+ M && (x = x.slice(0, -1 * M * 2), S = S.slice(0, -1 * M), e = e.slice(0, -1 * M)), x.push(this.productions_[W[1]][0]), S.push(rt.$), e.push(rt._$), ee = ut[x[x.length - 2]][x[x.length - 1]], x.push(ee);
183
+ break;
184
+ case 3:
185
+ return !0;
186
+ }
187
+ }
188
+ return !0;
189
+ }, "parse")
190
+ }, qe = /* @__PURE__ */ (function() {
191
+ var Y = {
192
+ EOF: 1,
193
+ parseError: /* @__PURE__ */ o(function(l, x) {
194
+ if (this.yy.parser)
195
+ this.yy.parser.parseError(l, x);
196
+ else
197
+ throw new Error(l);
198
+ }, "parseError"),
199
+ // resets the lexer, sets new input
200
+ setInput: /* @__PURE__ */ o(function(r, l) {
201
+ return this.yy = l || this.yy || {}, this._input = r, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
202
+ first_line: 1,
203
+ first_column: 0,
204
+ last_line: 1,
205
+ last_column: 0
206
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
207
+ }, "setInput"),
208
+ // consumes and returns one char from the input
209
+ input: /* @__PURE__ */ o(function() {
210
+ var r = this._input[0];
211
+ this.yytext += r, this.yyleng++, this.offset++, this.match += r, this.matched += r;
212
+ var l = r.match(/(?:\r\n?|\n).*/g);
213
+ return l ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), r;
214
+ }, "input"),
215
+ // unshifts one char (or a string) into the input
216
+ unput: /* @__PURE__ */ o(function(r) {
217
+ var l = r.length, x = r.split(/(?:\r\n?|\n)/g);
218
+ this._input = r + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - l), this.offset -= l;
219
+ var c = this.match.split(/(?:\r\n?|\n)/g);
220
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), x.length - 1 && (this.yylineno -= x.length - 1);
221
+ var S = this.yylloc.range;
222
+ return this.yylloc = {
223
+ first_line: this.yylloc.first_line,
224
+ last_line: this.yylineno + 1,
225
+ first_column: this.yylloc.first_column,
226
+ last_column: x ? (x.length === c.length ? this.yylloc.first_column : 0) + c[c.length - x.length].length - x[0].length : this.yylloc.first_column - l
227
+ }, this.options.ranges && (this.yylloc.range = [S[0], S[0] + this.yyleng - l]), this.yyleng = this.yytext.length, this;
228
+ }, "unput"),
229
+ // When called from action, caches matched text and appends it on next action
230
+ more: /* @__PURE__ */ o(function() {
231
+ return this._more = !0, this;
232
+ }, "more"),
233
+ // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
234
+ reject: /* @__PURE__ */ o(function() {
235
+ if (this.options.backtrack_lexer)
236
+ this._backtrack = !0;
237
+ else
238
+ return 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).
239
+ ` + this.showPosition(), {
240
+ text: "",
241
+ token: null,
242
+ line: this.yylineno
243
+ });
244
+ return this;
245
+ }, "reject"),
246
+ // retain first n characters of the match
247
+ less: /* @__PURE__ */ o(function(r) {
248
+ this.unput(this.match.slice(r));
249
+ }, "less"),
250
+ // displays already matched input, i.e. for error messages
251
+ pastInput: /* @__PURE__ */ o(function() {
252
+ var r = this.matched.substr(0, this.matched.length - this.match.length);
253
+ return (r.length > 20 ? "..." : "") + r.substr(-20).replace(/\n/g, "");
254
+ }, "pastInput"),
255
+ // displays upcoming input, i.e. for error messages
256
+ upcomingInput: /* @__PURE__ */ o(function() {
257
+ var r = this.match;
258
+ return r.length < 20 && (r += this._input.substr(0, 20 - r.length)), (r.substr(0, 20) + (r.length > 20 ? "..." : "")).replace(/\n/g, "");
259
+ }, "upcomingInput"),
260
+ // displays the character position where the lexing error occurred, i.e. for error messages
261
+ showPosition: /* @__PURE__ */ o(function() {
262
+ var r = this.pastInput(), l = new Array(r.length + 1).join("-");
263
+ return r + this.upcomingInput() + `
264
+ ` + l + "^";
265
+ }, "showPosition"),
266
+ // test the lexed token: return FALSE when not a match, otherwise return token
267
+ test_match: /* @__PURE__ */ o(function(r, l) {
268
+ var x, c, S;
269
+ if (this.options.backtrack_lexer && (S = {
270
+ yylineno: this.yylineno,
271
+ yylloc: {
272
+ first_line: this.yylloc.first_line,
273
+ last_line: this.last_line,
274
+ first_column: this.yylloc.first_column,
275
+ last_column: this.yylloc.last_column
276
+ },
277
+ yytext: this.yytext,
278
+ match: this.match,
279
+ matches: this.matches,
280
+ matched: this.matched,
281
+ yyleng: this.yyleng,
282
+ offset: this.offset,
283
+ _more: this._more,
284
+ _input: this._input,
285
+ yy: this.yy,
286
+ conditionStack: this.conditionStack.slice(0),
287
+ done: this.done
288
+ }, this.options.ranges && (S.yylloc.range = this.yylloc.range.slice(0))), c = r[0].match(/(?:\r\n?|\n).*/g), c && (this.yylineno += c.length), this.yylloc = {
289
+ first_line: this.yylloc.last_line,
290
+ last_line: this.yylineno + 1,
291
+ first_column: this.yylloc.last_column,
292
+ last_column: c ? c[c.length - 1].length - c[c.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + r[0].length
293
+ }, this.yytext += r[0], this.match += r[0], this.matches = r, 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(r[0].length), this.matched += r[0], x = this.performAction.call(this, this.yy, this, l, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), x)
294
+ return x;
295
+ if (this._backtrack) {
296
+ for (var e in S)
297
+ this[e] = S[e];
298
+ return !1;
299
+ }
300
+ return !1;
301
+ }, "test_match"),
302
+ // return next match in input
303
+ next: /* @__PURE__ */ o(function() {
304
+ if (this.done)
305
+ return this.EOF;
306
+ this._input || (this.done = !0);
307
+ var r, l, x, c;
308
+ this._more || (this.yytext = "", this.match = "");
309
+ for (var S = this._currentRules(), e = 0; e < S.length; e++)
310
+ if (x = this._input.match(this.rules[S[e]]), x && (!l || x[0].length > l[0].length)) {
311
+ if (l = x, c = e, this.options.backtrack_lexer) {
312
+ if (r = this.test_match(x, S[e]), r !== !1)
313
+ return r;
314
+ if (this._backtrack) {
315
+ l = !1;
316
+ continue;
317
+ } else
318
+ return !1;
319
+ } else if (!this.options.flex)
320
+ break;
321
+ }
322
+ return l ? (r = this.test_match(l, S[c]), r !== !1 ? r : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
323
+ ` + this.showPosition(), {
324
+ text: "",
325
+ token: null,
326
+ line: this.yylineno
327
+ });
328
+ }, "next"),
329
+ // return next match that has a token
330
+ lex: /* @__PURE__ */ o(function() {
331
+ var l = this.next();
332
+ return l || this.lex();
333
+ }, "lex"),
334
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
335
+ begin: /* @__PURE__ */ o(function(l) {
336
+ this.conditionStack.push(l);
337
+ }, "begin"),
338
+ // pop the previously active lexer condition state off the condition stack
339
+ popState: /* @__PURE__ */ o(function() {
340
+ var l = this.conditionStack.length - 1;
341
+ return l > 0 ? this.conditionStack.pop() : this.conditionStack[0];
342
+ }, "popState"),
343
+ // produce the lexer rule set which is active for the currently active lexer condition state
344
+ _currentRules: /* @__PURE__ */ o(function() {
345
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
346
+ }, "_currentRules"),
347
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
348
+ topState: /* @__PURE__ */ o(function(l) {
349
+ return l = this.conditionStack.length - 1 - Math.abs(l || 0), l >= 0 ? this.conditionStack[l] : "INITIAL";
350
+ }, "topState"),
351
+ // alias for begin(condition)
352
+ pushState: /* @__PURE__ */ o(function(l) {
353
+ this.begin(l);
354
+ }, "pushState"),
355
+ // return the number of states currently on the stack
356
+ stateStackSize: /* @__PURE__ */ o(function() {
357
+ return this.conditionStack.length;
358
+ }, "stateStackSize"),
359
+ options: { "case-insensitive": !0 },
360
+ performAction: /* @__PURE__ */ o(function(l, x, c, S) {
361
+ switch (c) {
362
+ case 0:
363
+ break;
364
+ case 1:
365
+ break;
366
+ case 2:
367
+ return 55;
368
+ case 3:
369
+ break;
370
+ case 4:
371
+ return this.begin("title"), 35;
372
+ case 5:
373
+ return this.popState(), "title_value";
374
+ case 6:
375
+ return this.begin("acc_title"), 37;
376
+ case 7:
377
+ return this.popState(), "acc_title_value";
378
+ case 8:
379
+ return this.begin("acc_descr"), 39;
380
+ case 9:
381
+ return this.popState(), "acc_descr_value";
382
+ case 10:
383
+ this.begin("acc_descr_multiline");
384
+ break;
385
+ case 11:
386
+ this.popState();
387
+ break;
388
+ case 12:
389
+ return "acc_descr_multiline_value";
390
+ case 13:
391
+ return 48;
392
+ case 14:
393
+ return 50;
394
+ case 15:
395
+ return 49;
396
+ case 16:
397
+ return 51;
398
+ case 17:
399
+ return 52;
400
+ case 18:
401
+ return 53;
402
+ case 19:
403
+ return 54;
404
+ case 20:
405
+ return 25;
406
+ case 21:
407
+ this.begin("md_string");
408
+ break;
409
+ case 22:
410
+ return "MD_STR";
411
+ case 23:
412
+ this.popState();
413
+ break;
414
+ case 24:
415
+ this.begin("string");
416
+ break;
417
+ case 25:
418
+ this.popState();
419
+ break;
420
+ case 26:
421
+ return "STR";
422
+ case 27:
423
+ this.begin("class_name");
424
+ break;
425
+ case 28:
426
+ return this.popState(), 47;
427
+ case 29:
428
+ return this.begin("point_start"), 44;
429
+ case 30:
430
+ return this.begin("point_x"), 45;
431
+ case 31:
432
+ this.popState();
433
+ break;
434
+ case 32:
435
+ this.popState(), this.begin("point_y");
436
+ break;
437
+ case 33:
438
+ return this.popState(), 46;
439
+ case 34:
440
+ return 28;
441
+ case 35:
442
+ return 4;
443
+ case 36:
444
+ return 15;
445
+ case 37:
446
+ return 11;
447
+ case 38:
448
+ return 64;
449
+ case 39:
450
+ return 10;
451
+ case 40:
452
+ return 65;
453
+ case 41:
454
+ return 65;
455
+ case 42:
456
+ return 14;
457
+ case 43:
458
+ return 13;
459
+ case 44:
460
+ return 67;
461
+ case 45:
462
+ return 66;
463
+ case 46:
464
+ return 12;
465
+ case 47:
466
+ return 8;
467
+ case 48:
468
+ return 5;
469
+ case 49:
470
+ return 18;
471
+ case 50:
472
+ return 56;
473
+ case 51:
474
+ return 63;
475
+ case 52:
476
+ return 57;
477
+ }
478
+ }, "anonymous"),
479
+ rules: [/^(?:%%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n\r]+)/i, /^(?:%%[^\n]*)/i, /^(?:title\b)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?: *x-axis *)/i, /^(?: *y-axis *)/i, /^(?: *--+> *)/i, /^(?: *quadrant-1 *)/i, /^(?: *quadrant-2 *)/i, /^(?: *quadrant-3 *)/i, /^(?: *quadrant-4 *)/i, /^(?:classDef\b)/i, /^(?:["][`])/i, /^(?:[^`"]+)/i, /^(?:[`]["])/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?::::)/i, /^(?:^\w+)/i, /^(?:\s*:\s*\[\s*)/i, /^(?:(1)|(0(.\d+)?))/i, /^(?:\s*\] *)/i, /^(?:\s*,\s*)/i, /^(?:(1)|(0(.\d+)?))/i, /^(?: *quadrantChart *)/i, /^(?:[A-Za-z]+)/i, /^(?:[^\x00-\x7F]+)/i, /^(?::)/i, /^(?:\+)/i, /^(?:,)/i, /^(?:=)/i, /^(?:=)/i, /^(?:\*)/i, /^(?:#)/i, /^(?:[\_])/i, /^(?:\.)/i, /^(?:&)/i, /^(?:-)/i, /^(?:[0-9]+)/i, /^(?:\s)/i, /^(?:;)/i, /^(?:[!"#$%&'*+,-.`?\\_/])/i, /^(?:$)/i],
480
+ conditions: { class_name: { rules: [28], inclusive: !1 }, point_y: { rules: [33], inclusive: !1 }, point_x: { rules: [32], inclusive: !1 }, point_start: { rules: [30, 31], inclusive: !1 }, acc_descr_multiline: { rules: [11, 12], inclusive: !1 }, acc_descr: { rules: [9], inclusive: !1 }, acc_title: { rules: [7], inclusive: !1 }, title: { rules: [5], inclusive: !1 }, md_string: { rules: [22, 23], inclusive: !1 }, string: { rules: [25, 26], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 6, 8, 10, 13, 14, 15, 16, 17, 18, 19, 20, 21, 24, 27, 29, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52], inclusive: !0 } }
481
+ };
482
+ return Y;
483
+ })();
484
+ kt.lexer = qe;
485
+ function pt() {
486
+ this.yy = {};
487
+ }
488
+ return o(pt, "Parser"), pt.prototype = kt, kt.Parser = pt, new pt();
489
+ })();
490
+ Et.parser = Et;
491
+ var ze = Et, I = De(), ot, Ve = (ot = class {
492
+ constructor() {
493
+ this.classes = /* @__PURE__ */ new Map(), this.config = this.getDefaultConfig(), this.themeConfig = this.getDefaultThemeConfig(), this.data = this.getDefaultData();
494
+ }
495
+ getDefaultData() {
496
+ return {
497
+ titleText: "",
498
+ quadrant1Text: "",
499
+ quadrant2Text: "",
500
+ quadrant3Text: "",
501
+ quadrant4Text: "",
502
+ xAxisLeftText: "",
503
+ xAxisRightText: "",
504
+ yAxisBottomText: "",
505
+ yAxisTopText: "",
506
+ points: []
507
+ };
508
+ }
509
+ getDefaultConfig() {
510
+ return {
511
+ showXAxis: !0,
512
+ showYAxis: !0,
513
+ showTitle: !0,
514
+ chartHeight: z.quadrantChart?.chartWidth || 500,
515
+ chartWidth: z.quadrantChart?.chartHeight || 500,
516
+ titlePadding: z.quadrantChart?.titlePadding || 10,
517
+ titleFontSize: z.quadrantChart?.titleFontSize || 20,
518
+ quadrantPadding: z.quadrantChart?.quadrantPadding || 5,
519
+ xAxisLabelPadding: z.quadrantChart?.xAxisLabelPadding || 5,
520
+ yAxisLabelPadding: z.quadrantChart?.yAxisLabelPadding || 5,
521
+ xAxisLabelFontSize: z.quadrantChart?.xAxisLabelFontSize || 16,
522
+ yAxisLabelFontSize: z.quadrantChart?.yAxisLabelFontSize || 16,
523
+ quadrantLabelFontSize: z.quadrantChart?.quadrantLabelFontSize || 16,
524
+ quadrantTextTopPadding: z.quadrantChart?.quadrantTextTopPadding || 5,
525
+ pointTextPadding: z.quadrantChart?.pointTextPadding || 5,
526
+ pointLabelFontSize: z.quadrantChart?.pointLabelFontSize || 12,
527
+ pointRadius: z.quadrantChart?.pointRadius || 5,
528
+ xAxisPosition: z.quadrantChart?.xAxisPosition || "top",
529
+ yAxisPosition: z.quadrantChart?.yAxisPosition || "left",
530
+ quadrantInternalBorderStrokeWidth: z.quadrantChart?.quadrantInternalBorderStrokeWidth || 1,
531
+ quadrantExternalBorderStrokeWidth: z.quadrantChart?.quadrantExternalBorderStrokeWidth || 2
532
+ };
533
+ }
534
+ getDefaultThemeConfig() {
535
+ return {
536
+ quadrant1Fill: I.quadrant1Fill,
537
+ quadrant2Fill: I.quadrant2Fill,
538
+ quadrant3Fill: I.quadrant3Fill,
539
+ quadrant4Fill: I.quadrant4Fill,
540
+ quadrant1TextFill: I.quadrant1TextFill,
541
+ quadrant2TextFill: I.quadrant2TextFill,
542
+ quadrant3TextFill: I.quadrant3TextFill,
543
+ quadrant4TextFill: I.quadrant4TextFill,
544
+ quadrantPointFill: I.quadrantPointFill,
545
+ quadrantPointTextFill: I.quadrantPointTextFill,
546
+ quadrantXAxisTextFill: I.quadrantXAxisTextFill,
547
+ quadrantYAxisTextFill: I.quadrantYAxisTextFill,
548
+ quadrantTitleFill: I.quadrantTitleFill,
549
+ quadrantInternalBorderStrokeFill: I.quadrantInternalBorderStrokeFill,
550
+ quadrantExternalBorderStrokeFill: I.quadrantExternalBorderStrokeFill
551
+ };
552
+ }
553
+ clear() {
554
+ this.config = this.getDefaultConfig(), this.themeConfig = this.getDefaultThemeConfig(), this.data = this.getDefaultData(), this.classes = /* @__PURE__ */ new Map(), bt.info("clear called");
555
+ }
556
+ setData(n) {
557
+ this.data = { ...this.data, ...n };
558
+ }
559
+ addPoints(n) {
560
+ this.data.points = [...n, ...this.data.points];
561
+ }
562
+ addClass(n, f) {
563
+ this.classes.set(n, f);
564
+ }
565
+ setConfig(n) {
566
+ bt.trace("setConfig called with: ", n), this.config = { ...this.config, ...n };
567
+ }
568
+ setThemeConfig(n) {
569
+ bt.trace("setThemeConfig called with: ", n), this.themeConfig = { ...this.themeConfig, ...n };
570
+ }
571
+ calculateSpace(n, f, d, h) {
572
+ const p = this.config.xAxisLabelPadding * 2 + this.config.xAxisLabelFontSize, y = {
573
+ top: n === "top" && f ? p : 0,
574
+ bottom: n === "bottom" && f ? p : 0
575
+ }, _ = this.config.yAxisLabelPadding * 2 + this.config.yAxisLabelFontSize, a = {
576
+ left: this.config.yAxisPosition === "left" && d ? _ : 0,
577
+ right: this.config.yAxisPosition === "right" && d ? _ : 0
578
+ }, k = this.config.titleFontSize + this.config.titlePadding * 2, u = {
579
+ top: h ? k : 0
580
+ }, T = this.config.quadrantPadding + a.left, q = this.config.quadrantPadding + y.top + u.top, m = this.config.chartWidth - this.config.quadrantPadding * 2 - a.left - a.right, b = this.config.chartHeight - this.config.quadrantPadding * 2 - y.top - y.bottom - u.top, g = m / 2, A = b / 2;
581
+ return {
582
+ xAxisSpace: y,
583
+ yAxisSpace: a,
584
+ titleSpace: u,
585
+ quadrantSpace: {
586
+ quadrantLeft: T,
587
+ quadrantTop: q,
588
+ quadrantWidth: m,
589
+ quadrantHalfWidth: g,
590
+ quadrantHeight: b,
591
+ quadrantHalfHeight: A
592
+ }
593
+ };
594
+ }
595
+ getAxisLabels(n, f, d, h) {
596
+ const { quadrantSpace: p, titleSpace: y } = h, {
597
+ quadrantHalfHeight: _,
598
+ quadrantHeight: a,
599
+ quadrantLeft: k,
600
+ quadrantHalfWidth: u,
601
+ quadrantTop: T,
602
+ quadrantWidth: q
603
+ } = p, m = !!this.data.xAxisRightText, b = !!this.data.yAxisTopText, g = [];
604
+ return this.data.xAxisLeftText && f && g.push({
605
+ text: this.data.xAxisLeftText,
606
+ fill: this.themeConfig.quadrantXAxisTextFill,
607
+ x: k + (m ? u / 2 : 0),
608
+ y: n === "top" ? this.config.xAxisLabelPadding + y.top : this.config.xAxisLabelPadding + T + a + this.config.quadrantPadding,
609
+ fontSize: this.config.xAxisLabelFontSize,
610
+ verticalPos: m ? "center" : "left",
611
+ horizontalPos: "top",
612
+ rotation: 0
613
+ }), this.data.xAxisRightText && f && g.push({
614
+ text: this.data.xAxisRightText,
615
+ fill: this.themeConfig.quadrantXAxisTextFill,
616
+ x: k + u + (m ? u / 2 : 0),
617
+ y: n === "top" ? this.config.xAxisLabelPadding + y.top : this.config.xAxisLabelPadding + T + a + this.config.quadrantPadding,
618
+ fontSize: this.config.xAxisLabelFontSize,
619
+ verticalPos: m ? "center" : "left",
620
+ horizontalPos: "top",
621
+ rotation: 0
622
+ }), this.data.yAxisBottomText && d && g.push({
623
+ text: this.data.yAxisBottomText,
624
+ fill: this.themeConfig.quadrantYAxisTextFill,
625
+ x: this.config.yAxisPosition === "left" ? this.config.yAxisLabelPadding : this.config.yAxisLabelPadding + k + q + this.config.quadrantPadding,
626
+ y: T + a - (b ? _ / 2 : 0),
627
+ fontSize: this.config.yAxisLabelFontSize,
628
+ verticalPos: b ? "center" : "left",
629
+ horizontalPos: "top",
630
+ rotation: -90
631
+ }), this.data.yAxisTopText && d && g.push({
632
+ text: this.data.yAxisTopText,
633
+ fill: this.themeConfig.quadrantYAxisTextFill,
634
+ x: this.config.yAxisPosition === "left" ? this.config.yAxisLabelPadding : this.config.yAxisLabelPadding + k + q + this.config.quadrantPadding,
635
+ y: T + _ - (b ? _ / 2 : 0),
636
+ fontSize: this.config.yAxisLabelFontSize,
637
+ verticalPos: b ? "center" : "left",
638
+ horizontalPos: "top",
639
+ rotation: -90
640
+ }), g;
641
+ }
642
+ getQuadrants(n) {
643
+ const { quadrantSpace: f } = n, { quadrantHalfHeight: d, quadrantLeft: h, quadrantHalfWidth: p, quadrantTop: y } = f, _ = [
644
+ {
645
+ text: {
646
+ text: this.data.quadrant1Text,
647
+ fill: this.themeConfig.quadrant1TextFill,
648
+ x: 0,
649
+ y: 0,
650
+ fontSize: this.config.quadrantLabelFontSize,
651
+ verticalPos: "center",
652
+ horizontalPos: "middle",
653
+ rotation: 0
654
+ },
655
+ x: h + p,
656
+ y,
657
+ width: p,
658
+ height: d,
659
+ fill: this.themeConfig.quadrant1Fill
660
+ },
661
+ {
662
+ text: {
663
+ text: this.data.quadrant2Text,
664
+ fill: this.themeConfig.quadrant2TextFill,
665
+ x: 0,
666
+ y: 0,
667
+ fontSize: this.config.quadrantLabelFontSize,
668
+ verticalPos: "center",
669
+ horizontalPos: "middle",
670
+ rotation: 0
671
+ },
672
+ x: h,
673
+ y,
674
+ width: p,
675
+ height: d,
676
+ fill: this.themeConfig.quadrant2Fill
677
+ },
678
+ {
679
+ text: {
680
+ text: this.data.quadrant3Text,
681
+ fill: this.themeConfig.quadrant3TextFill,
682
+ x: 0,
683
+ y: 0,
684
+ fontSize: this.config.quadrantLabelFontSize,
685
+ verticalPos: "center",
686
+ horizontalPos: "middle",
687
+ rotation: 0
688
+ },
689
+ x: h,
690
+ y: y + d,
691
+ width: p,
692
+ height: d,
693
+ fill: this.themeConfig.quadrant3Fill
694
+ },
695
+ {
696
+ text: {
697
+ text: this.data.quadrant4Text,
698
+ fill: this.themeConfig.quadrant4TextFill,
699
+ x: 0,
700
+ y: 0,
701
+ fontSize: this.config.quadrantLabelFontSize,
702
+ verticalPos: "center",
703
+ horizontalPos: "middle",
704
+ rotation: 0
705
+ },
706
+ x: h + p,
707
+ y: y + d,
708
+ width: p,
709
+ height: d,
710
+ fill: this.themeConfig.quadrant4Fill
711
+ }
712
+ ];
713
+ for (const a of _)
714
+ a.text.x = a.x + a.width / 2, this.data.points.length === 0 ? (a.text.y = a.y + a.height / 2, a.text.horizontalPos = "middle") : (a.text.y = a.y + this.config.quadrantTextTopPadding, a.text.horizontalPos = "top");
715
+ return _;
716
+ }
717
+ getQuadrantPoints(n) {
718
+ const { quadrantSpace: f } = n, { quadrantHeight: d, quadrantLeft: h, quadrantTop: p, quadrantWidth: y } = f, _ = ie().domain([0, 1]).range([h, y + h]), a = ie().domain([0, 1]).range([d + p, p]);
719
+ return this.data.points.map((u) => {
720
+ const T = this.classes.get(u.className);
721
+ return T && (u = { ...T, ...u }), {
722
+ x: _(u.x),
723
+ y: a(u.y),
724
+ fill: u.color ?? this.themeConfig.quadrantPointFill,
725
+ radius: u.radius ?? this.config.pointRadius,
726
+ text: {
727
+ text: u.text,
728
+ fill: this.themeConfig.quadrantPointTextFill,
729
+ x: _(u.x),
730
+ y: a(u.y) + this.config.pointTextPadding,
731
+ verticalPos: "center",
732
+ horizontalPos: "top",
733
+ fontSize: this.config.pointLabelFontSize,
734
+ rotation: 0
735
+ },
736
+ strokeColor: u.strokeColor ?? this.themeConfig.quadrantPointFill,
737
+ strokeWidth: u.strokeWidth ?? "0px"
738
+ };
739
+ });
740
+ }
741
+ getBorders(n) {
742
+ const f = this.config.quadrantExternalBorderStrokeWidth / 2, { quadrantSpace: d } = n, {
743
+ quadrantHalfHeight: h,
744
+ quadrantHeight: p,
745
+ quadrantLeft: y,
746
+ quadrantHalfWidth: _,
747
+ quadrantTop: a,
748
+ quadrantWidth: k
749
+ } = d;
750
+ return [
751
+ // top border
752
+ {
753
+ strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill,
754
+ strokeWidth: this.config.quadrantExternalBorderStrokeWidth,
755
+ x1: y - f,
756
+ y1: a,
757
+ x2: y + k + f,
758
+ y2: a
759
+ },
760
+ // right border
761
+ {
762
+ strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill,
763
+ strokeWidth: this.config.quadrantExternalBorderStrokeWidth,
764
+ x1: y + k,
765
+ y1: a + f,
766
+ x2: y + k,
767
+ y2: a + p - f
768
+ },
769
+ // bottom border
770
+ {
771
+ strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill,
772
+ strokeWidth: this.config.quadrantExternalBorderStrokeWidth,
773
+ x1: y - f,
774
+ y1: a + p,
775
+ x2: y + k + f,
776
+ y2: a + p
777
+ },
778
+ // left border
779
+ {
780
+ strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill,
781
+ strokeWidth: this.config.quadrantExternalBorderStrokeWidth,
782
+ x1: y,
783
+ y1: a + f,
784
+ x2: y,
785
+ y2: a + p - f
786
+ },
787
+ // vertical inner border
788
+ {
789
+ strokeFill: this.themeConfig.quadrantInternalBorderStrokeFill,
790
+ strokeWidth: this.config.quadrantInternalBorderStrokeWidth,
791
+ x1: y + _,
792
+ y1: a + f,
793
+ x2: y + _,
794
+ y2: a + p - f
795
+ },
796
+ // horizontal inner border
797
+ {
798
+ strokeFill: this.themeConfig.quadrantInternalBorderStrokeFill,
799
+ strokeWidth: this.config.quadrantInternalBorderStrokeWidth,
800
+ x1: y + f,
801
+ y1: a + h,
802
+ x2: y + k - f,
803
+ y2: a + h
804
+ }
805
+ ];
806
+ }
807
+ getTitle(n) {
808
+ if (n)
809
+ return {
810
+ text: this.data.titleText,
811
+ fill: this.themeConfig.quadrantTitleFill,
812
+ fontSize: this.config.titleFontSize,
813
+ horizontalPos: "top",
814
+ verticalPos: "center",
815
+ rotation: 0,
816
+ y: this.config.titlePadding,
817
+ x: this.config.chartWidth / 2
818
+ };
819
+ }
820
+ build() {
821
+ const n = this.config.showXAxis && !!(this.data.xAxisLeftText || this.data.xAxisRightText), f = this.config.showYAxis && !!(this.data.yAxisTopText || this.data.yAxisBottomText), d = this.config.showTitle && !!this.data.titleText, h = this.data.points.length > 0 ? "bottom" : this.config.xAxisPosition, p = this.calculateSpace(h, n, f, d);
822
+ return {
823
+ points: this.getQuadrantPoints(p),
824
+ quadrants: this.getQuadrants(p),
825
+ axisLabels: this.getAxisLabels(h, n, f, p),
826
+ borderLines: this.getBorders(p),
827
+ title: this.getTitle(d)
828
+ };
829
+ }
830
+ }, o(ot, "QuadrantBuilder"), ot), lt, mt = (lt = class extends Error {
831
+ constructor(n, f, d) {
832
+ super(`value for ${n} ${f} is invalid, please use a valid ${d}`), this.name = "InvalidStyleError";
833
+ }
834
+ }, o(lt, "InvalidStyleError"), lt);
835
+ function Dt(t) {
836
+ return !/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(t);
837
+ }
838
+ o(Dt, "validateHexCode");
839
+ function ne(t) {
840
+ return !/^\d+$/.test(t);
841
+ }
842
+ o(ne, "validateNumber");
843
+ function se(t) {
844
+ return !/^\d+px$/.test(t);
845
+ }
846
+ o(se, "validateSizeInPixels");
847
+ function O(t) {
848
+ return Ee(t.trim(), zt());
849
+ }
850
+ o(O, "textSanitizer");
851
+ var V = new Ve();
852
+ function re(t) {
853
+ V.setData({ quadrant1Text: O(t.text) });
854
+ }
855
+ o(re, "setQuadrant1Text");
856
+ function oe(t) {
857
+ V.setData({ quadrant2Text: O(t.text) });
858
+ }
859
+ o(oe, "setQuadrant2Text");
860
+ function le(t) {
861
+ V.setData({ quadrant3Text: O(t.text) });
862
+ }
863
+ o(le, "setQuadrant3Text");
864
+ function he(t) {
865
+ V.setData({ quadrant4Text: O(t.text) });
866
+ }
867
+ o(he, "setQuadrant4Text");
868
+ function ce(t) {
869
+ V.setData({ xAxisLeftText: O(t.text) });
870
+ }
871
+ o(ce, "setXAxisLeftText");
872
+ function de(t) {
873
+ V.setData({ xAxisRightText: O(t.text) });
874
+ }
875
+ o(de, "setXAxisRightText");
876
+ function ue(t) {
877
+ V.setData({ yAxisTopText: O(t.text) });
878
+ }
879
+ o(ue, "setYAxisTopText");
880
+ function xe(t) {
881
+ V.setData({ yAxisBottomText: O(t.text) });
882
+ }
883
+ o(xe, "setYAxisBottomText");
884
+ function St(t) {
885
+ const n = {};
886
+ for (const f of t) {
887
+ const [d, h] = f.trim().split(/\s*:\s*/);
888
+ if (d === "radius") {
889
+ if (ne(h))
890
+ throw new mt(d, h, "number");
891
+ n.radius = parseInt(h);
892
+ } else if (d === "color") {
893
+ if (Dt(h))
894
+ throw new mt(d, h, "hex code");
895
+ n.color = h;
896
+ } else if (d === "stroke-color") {
897
+ if (Dt(h))
898
+ throw new mt(d, h, "hex code");
899
+ n.strokeColor = h;
900
+ } else if (d === "stroke-width") {
901
+ if (se(h))
902
+ throw new mt(d, h, "number of pixels (eg. 10px)");
903
+ n.strokeWidth = h;
904
+ } else
905
+ throw new Error(`style named ${d} is not supported.`);
906
+ }
907
+ return n;
908
+ }
909
+ o(St, "parseStyles");
910
+ function fe(t, n, f, d, h) {
911
+ const p = St(h);
912
+ V.addPoints([
913
+ {
914
+ x: f,
915
+ y: d,
916
+ text: O(t.text),
917
+ className: n,
918
+ ...p
919
+ }
920
+ ]);
921
+ }
922
+ o(fe, "addPoint");
923
+ function ge(t, n) {
924
+ V.addClass(t, St(n));
925
+ }
926
+ o(ge, "addClass");
927
+ function pe(t) {
928
+ V.setConfig({ chartWidth: t });
929
+ }
930
+ o(pe, "setWidth");
931
+ function ye(t) {
932
+ V.setConfig({ chartHeight: t });
933
+ }
934
+ o(ye, "setHeight");
935
+ function Te() {
936
+ const t = zt(), { themeVariables: n, quadrantChart: f } = t;
937
+ return f && V.setConfig(f), V.setThemeConfig({
938
+ quadrant1Fill: n.quadrant1Fill,
939
+ quadrant2Fill: n.quadrant2Fill,
940
+ quadrant3Fill: n.quadrant3Fill,
941
+ quadrant4Fill: n.quadrant4Fill,
942
+ quadrant1TextFill: n.quadrant1TextFill,
943
+ quadrant2TextFill: n.quadrant2TextFill,
944
+ quadrant3TextFill: n.quadrant3TextFill,
945
+ quadrant4TextFill: n.quadrant4TextFill,
946
+ quadrantPointFill: n.quadrantPointFill,
947
+ quadrantPointTextFill: n.quadrantPointTextFill,
948
+ quadrantXAxisTextFill: n.quadrantXAxisTextFill,
949
+ quadrantYAxisTextFill: n.quadrantYAxisTextFill,
950
+ quadrantExternalBorderStrokeFill: n.quadrantExternalBorderStrokeFill,
951
+ quadrantInternalBorderStrokeFill: n.quadrantInternalBorderStrokeFill,
952
+ quadrantTitleFill: n.quadrantTitleFill
953
+ }), V.setData({ titleText: ae() }), V.build();
954
+ }
955
+ o(Te, "getQuadrantData");
956
+ var Ie = /* @__PURE__ */ o(function() {
957
+ V.clear(), Le();
958
+ }, "clear"), we = {
959
+ setWidth: pe,
960
+ setHeight: ye,
961
+ setQuadrant1Text: re,
962
+ setQuadrant2Text: oe,
963
+ setQuadrant3Text: le,
964
+ setQuadrant4Text: he,
965
+ setXAxisLeftText: ce,
966
+ setXAxisRightText: de,
967
+ setYAxisTopText: ue,
968
+ setYAxisBottomText: xe,
969
+ parseStyles: St,
970
+ addPoint: fe,
971
+ addClass: ge,
972
+ getQuadrantData: Te,
973
+ clear: Ie,
974
+ setAccTitle: ve,
975
+ getAccTitle: Pe,
976
+ setDiagramTitle: Fe,
977
+ getDiagramTitle: ae,
978
+ getAccDescription: ke,
979
+ setAccDescription: Ae
980
+ }, Be = /* @__PURE__ */ o((t, n, f, d) => {
981
+ function h(i) {
982
+ return i === "top" ? "hanging" : "middle";
983
+ }
984
+ o(h, "getDominantBaseLine");
985
+ function p(i) {
986
+ return i === "left" ? "start" : "middle";
987
+ }
988
+ o(p, "getTextAnchor");
989
+ function y(i) {
990
+ return `translate(${i.x}, ${i.y}) rotate(${i.rotation || 0})`;
991
+ }
992
+ o(y, "getTransformation");
993
+ const _ = zt();
994
+ bt.debug(`Rendering quadrant chart
995
+ ` + t);
996
+ const a = _.securityLevel;
997
+ let k;
998
+ a === "sandbox" && (k = Lt("#i" + n));
999
+ const T = (a === "sandbox" ? Lt(k.nodes()[0].contentDocument.body) : Lt("body")).select(`[id="${n}"]`), q = T.append("g").attr("class", "main"), m = _.quadrantChart?.chartWidth ?? 500, b = _.quadrantChart?.chartHeight ?? 500;
1000
+ Ce(T, b, m, _.quadrantChart?.useMaxWidth ?? !0), T.attr("viewBox", "0 0 " + m + " " + b), d.db.setHeight(b), d.db.setWidth(m);
1001
+ const g = d.db.getQuadrantData(), A = q.append("g").attr("class", "quadrants"), ht = q.append("g").attr("class", "border"), xt = q.append("g").attr("class", "data-points"), ft = q.append("g").attr("class", "labels"), gt = q.append("g").attr("class", "title");
1002
+ g.title && gt.append("text").attr("x", 0).attr("y", 0).attr("fill", g.title.fill).attr("font-size", g.title.fontSize).attr("dominant-baseline", h(g.title.horizontalPos)).attr("text-anchor", p(g.title.verticalPos)).attr("transform", y(g.title)).text(g.title.text), g.borderLines && ht.selectAll("line").data(g.borderLines).enter().append("line").attr("x1", (i) => i.x1).attr("y1", (i) => i.y1).attr("x2", (i) => i.x2).attr("y2", (i) => i.y2).style("stroke", (i) => i.strokeFill).style("stroke-width", (i) => i.strokeWidth);
1003
+ const ct = A.selectAll("g.quadrant").data(g.quadrants).enter().append("g").attr("class", "quadrant");
1004
+ ct.append("rect").attr("x", (i) => i.x).attr("y", (i) => i.y).attr("width", (i) => i.width).attr("height", (i) => i.height).attr("fill", (i) => i.fill), ct.append("text").attr("x", 0).attr("y", 0).attr("fill", (i) => i.text.fill).attr("font-size", (i) => i.text.fontSize).attr(
1005
+ "dominant-baseline",
1006
+ (i) => h(i.text.horizontalPos)
1007
+ ).attr("text-anchor", (i) => p(i.text.verticalPos)).attr("transform", (i) => y(i.text)).text((i) => i.text.text), ft.selectAll("g.label").data(g.axisLabels).enter().append("g").attr("class", "label").append("text").attr("x", 0).attr("y", 0).text((i) => i.text).attr("fill", (i) => i.fill).attr("font-size", (i) => i.fontSize).attr("dominant-baseline", (i) => h(i.horizontalPos)).attr("text-anchor", (i) => p(i.verticalPos)).attr("transform", (i) => y(i));
1008
+ const dt = xt.selectAll("g.data-point").data(g.points).enter().append("g").attr("class", "data-point");
1009
+ dt.append("circle").attr("cx", (i) => i.x).attr("cy", (i) => i.y).attr("r", (i) => i.radius).attr("fill", (i) => i.fill).attr("stroke", (i) => i.strokeColor).attr("stroke-width", (i) => i.strokeWidth), dt.append("text").attr("x", 0).attr("y", 0).text((i) => i.text.text).attr("fill", (i) => i.text.fill).attr("font-size", (i) => i.text.fontSize).attr(
1010
+ "dominant-baseline",
1011
+ (i) => h(i.text.horizontalPos)
1012
+ ).attr("text-anchor", (i) => p(i.text.verticalPos)).attr("transform", (i) => y(i.text));
1013
+ }, "draw"), Re = {
1014
+ draw: Be
1015
+ }, Ue = {
1016
+ parser: ze,
1017
+ db: we,
1018
+ renderer: Re,
1019
+ styles: /* @__PURE__ */ o(() => "", "styles")
1020
+ };
1021
+ export {
1022
+ Ue as diagram
1023
+ };