@cardstack/boxel-cli 0.3.2-unstable.58 → 0.3.2-unstable.60

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 (921) hide show
  1. package/api.ts +3 -3
  2. package/bundled-realms/base/command.gts +73 -0
  3. package/bundled-test-harness/assets/adapter-TgpmkD23.js +2 -0
  4. package/bundled-test-harness/assets/add-field-to-card-definition-command-test-BVVD6_Wq.js +111 -0
  5. package/bundled-test-harness/assets/add-workspace-test-BvvYJ2Fk.js +71 -0
  6. package/bundled-test-harness/assets/ai-assistant-Ba_RBqf6.js +129 -0
  7. package/bundled-test-harness/assets/ai-assistant-panel-service-test-DK87n1hh.js +95 -0
  8. package/bundled-test-harness/assets/ai-assistant-test-CZATBlJS.js +2137 -0
  9. package/bundled-test-harness/assets/ai-function-generation-test-e58MHziu.js +996 -0
  10. package/bundled-test-harness/assets/ai-module-creation-test-CEieL3Fa.js +150 -0
  11. package/bundled-test-harness/assets/aibot-message-DhTbAqNk.js +1185 -0
  12. package/bundled-test-harness/assets/amd-transpile-test-CSk5COu7.js +425 -0
  13. package/bundled-test-harness/assets/app-Btfy4HWI.js +21464 -0
  14. package/bundled-test-harness/assets/apply-boxel-formatting-test-BHTP9NBp.js +134 -0
  15. package/bundled-test-harness/assets/apply-markdown-edit-test-BETCndeK.js +230 -0
  16. package/bundled-test-harness/assets/apply-search-replace-block-test-KNolar0-.js +630 -0
  17. package/bundled-test-harness/assets/arc-CA8yZ0zo.js +199 -0
  18. package/bundled-test-harness/assets/architecture-7EHR7CIX-C5JFMGdb.js +3 -0
  19. package/bundled-test-harness/assets/architectureDiagram-3BPJPVTR-CmVPjKgm.js +7400 -0
  20. package/bundled-test-harness/assets/auth-error-guard-test-D0rKESg_.js +30 -0
  21. package/bundled-test-harness/assets/auth-service-worker-test-DGg_vbKo.js +538 -0
  22. package/bundled-test-harness/assets/authed-fetch-test-CHF3eh_H.js +75 -0
  23. package/bundled-test-harness/assets/avif-image-def-test-p9tiyh4_.js +186 -0
  24. package/bundled-test-harness/assets/base-realm-Chjzrp6m.js +2 -0
  25. package/bundled-test-harness/assets/base-realm-DpSTsZxD.js +140 -0
  26. package/bundled-test-harness/assets/basic-test-D7qEz4hw.js +128 -0
  27. package/bundled-test-harness/assets/bfm-card-references-test-D-m1YnL8.js +577 -0
  28. package/bundled-test-harness/assets/binary-upload-dedupe-test-8RKK73EG.js +308 -0
  29. package/bundled-test-harness/assets/blockDiagram-GPEHLZMM-BdVFTa2C.js +4355 -0
  30. package/bundled-test-harness/assets/bot-registration-test-9zYny2wR.js +99 -0
  31. package/bundled-test-harness/assets/box-test-0T92xi3A.js +51 -0
  32. package/bundled-test-harness/assets/brand-guide-attachments-test-5ZtPn4cC.js +87 -0
  33. package/bundled-test-harness/assets/brand-guide-custom-css-test-CKKSgKyp.js +135 -0
  34. package/bundled-test-harness/assets/brand-logo-mark-field-test-nlNNQ3rw.js +87 -0
  35. package/bundled-test-harness/assets/broken-link-template-test-BGIExVof.js +345 -0
  36. package/bundled-test-harness/assets/browser-index-BaR-gTqG.js +3 -0
  37. package/bundled-test-harness/assets/browser-index-G4NKYBAj.js +8802 -0
  38. package/bundled-test-harness/assets/c4Diagram-AAUBKEIU-DyugX7zz.js +3764 -0
  39. package/bundled-test-harness/assets/cached-fetch-test-MtqvDphJ.js +93 -0
  40. package/bundled-test-harness/assets/can-read-realm-test-BZmwIOqS.js +58 -0
  41. package/bundled-test-harness/assets/cancel-indexing-job-test-BsQtQbDu.js +71 -0
  42. package/bundled-test-harness/assets/card-api-test-BxQ8f0-c.js +196 -0
  43. package/bundled-test-harness/assets/card-basics-test-B-uBZ8o4.js +4895 -0
  44. package/bundled-test-harness/assets/card-catalog-test-YmwmyIKf.js +377 -0
  45. package/bundled-test-harness/assets/card-copy-test-LoqdH1CQ.js +777 -0
  46. package/bundled-test-harness/assets/card-def-field-def-relationships-test-DvtBA1jv.js +560 -0
  47. package/bundled-test-harness/assets/card-def-menu-items-test-DHnd0LuM.js +182 -0
  48. package/bundled-test-harness/assets/card-delete-test-vKF0Jf1X.js +412 -0
  49. package/bundled-test-harness/assets/card-directory-name-test-CbCuPwSz.js +71 -0
  50. package/bundled-test-harness/assets/card-playground-test-CRIP3b5-.js +1497 -0
  51. package/bundled-test-harness/assets/card-prerender-ClYlSOBU.js +12661 -0
  52. package/bundled-test-harness/assets/card-search-adorn-test-Mggk5ZgY.js +128 -0
  53. package/bundled-test-harness/assets/card-search-query-builder-test-Cdl12s50.js +88 -0
  54. package/bundled-test-harness/assets/card-search-selection-menu-test-CtuCCLoB.js +108 -0
  55. package/bundled-test-harness/assets/channel-BKUMepxs.js +8 -0
  56. package/bundled-test-harness/assets/check-correctness-test-DBh8DT_f.js +252 -0
  57. package/bundled-test-harness/assets/chunk-2J33WTMH-ClrRoNQU.js +31 -0
  58. package/bundled-test-harness/assets/chunk-3OPIFGDE-g_0Oh8jN.js +5548 -0
  59. package/bundled-test-harness/assets/chunk-4BX2VUAB-D2LCc7Y9.js +11 -0
  60. package/bundled-test-harness/assets/chunk-4EGX6M5U-D8vRS5IG.js +44 -0
  61. package/bundled-test-harness/assets/chunk-55IACEB6-C5j4VAmb.js +10 -0
  62. package/bundled-test-harness/assets/chunk-5DO6E6H7-CPb3jsP0.js +27 -0
  63. package/bundled-test-harness/assets/chunk-5ZQYHXKU-BlVb7vgG.js +1767 -0
  64. package/bundled-test-harness/assets/chunk-727SXJPM-C_NVCDMC.js +3877 -0
  65. package/bundled-test-harness/assets/chunk-AQP2D5EJ-CpwrMix_.js +2622 -0
  66. package/bundled-test-harness/assets/chunk-BR22UD5L-AF0NWdjT.js +85 -0
  67. package/bundled-test-harness/assets/chunk-BSJP7CBP-Dgun5vYb.js +114 -0
  68. package/bundled-test-harness/assets/chunk-CSCIHK7Q-D7nFiAZ-.js +6144 -0
  69. package/bundled-test-harness/assets/chunk-FHYWG6QK-2nuXS9PL.js +27 -0
  70. package/bundled-test-harness/assets/chunk-FMBD7UC4-O-Y8VK1S.js +20 -0
  71. package/bundled-test-harness/assets/chunk-KSCS5N6A-Du5-DprU.js +871 -0
  72. package/bundled-test-harness/assets/chunk-L5ZTLDWV-C2lDtkix.js +43 -0
  73. package/bundled-test-harness/assets/chunk-LZXEDZCA-qAMsMZkF.js +65 -0
  74. package/bundled-test-harness/assets/chunk-MPE355IW-DcT_60Oq.js +27 -0
  75. package/bundled-test-harness/assets/chunk-MZUSXYTE-BsH_YmnC.js +36 -0
  76. package/bundled-test-harness/assets/chunk-N66VUXT2-DMyMHgoS.js +70 -0
  77. package/bundled-test-harness/assets/chunk-ND2GUHAM-DO1Znn8O.js +93 -0
  78. package/bundled-test-harness/assets/chunk-NZK2D7GU-B1YWBxHm.js +89 -0
  79. package/bundled-test-harness/assets/chunk-O5CBEL6O-CZVSBsRq.js +2395 -0
  80. package/bundled-test-harness/assets/chunk-PUPMXCY4-DzOK-Vbt.js +27 -0
  81. package/bundled-test-harness/assets/chunk-QZHKN3VN-DJFnRn99.js +20 -0
  82. package/bundled-test-harness/assets/chunk-UIBZB4QT-5KIxBxjk.js +27 -0
  83. package/bundled-test-harness/assets/chunk-WCWK7LTN-BsQwhliq.js +36 -0
  84. package/bundled-test-harness/assets/chunk-WU5MYG2G-DUVb5MAo.js +12 -0
  85. package/bundled-test-harness/assets/chunk-XPW4576I-DLaJYAOU.js +2341 -0
  86. package/bundled-test-harness/assets/classDiagram-4FO5ZUOK-DjP2uozG.js +31 -0
  87. package/bundled-test-harness/assets/classDiagram-v2-Q7XG4LA2-Dt6ps5uz.js +31 -0
  88. package/bundled-test-harness/assets/code-equality-assertion-BBezFT13.js +474 -0
  89. package/bundled-test-harness/assets/code-patches-test-DzoQGARM.js +1128 -0
  90. package/bundled-test-harness/assets/code-patching-test-D8r-pJ5w.js +114 -0
  91. package/bundled-test-harness/assets/code-ref-test-DU3HChNz.js +138 -0
  92. package/bundled-test-harness/assets/code-semantics-service-test-DArUotKy.js +65 -0
  93. package/bundled-test-harness/assets/code-submode-test-h5wWKsz2.js +1762 -0
  94. package/bundled-test-harness/assets/codeblocks-test-FbuwTy5v.js +492 -0
  95. package/bundled-test-harness/assets/codemirror-context-DVlC9C78.js +2 -0
  96. package/bundled-test-harness/assets/codemirror-editor-test-JDT9uwqM.js +1176 -0
  97. package/bundled-test-harness/assets/color-field-test-BssRlQAX.js +213 -0
  98. package/bundled-test-harness/assets/command-definitions-test-J21kOxBs.js +72 -0
  99. package/bundled-test-harness/assets/commands-DAo0DgCX.js +1379 -0
  100. package/bundled-test-harness/assets/commands-calling-test-C3deVvv_.js +200 -0
  101. package/bundled-test-harness/assets/commands-test--0zViqs2.js +1041 -0
  102. package/bundled-test-harness/assets/commands-test-BwNn2npL.js +1145 -0
  103. package/bundled-test-harness/assets/computed-test-BD_KrZmc.js +882 -0
  104. package/bundled-test-harness/assets/container-C8gu0I0Q.js +14605 -0
  105. package/bundled-test-harness/assets/convert-to-class-name-test-CX21VRzM.js +17 -0
  106. package/bundled-test-harness/assets/copy-and-edit-test-BUy_o8XJ.js +291 -0
  107. package/bundled-test-harness/assets/copy-card-test-LWbugEPe.js +156 -0
  108. package/bundled-test-harness/assets/copy-file-to-realm-test-BS25EUGV.js +99 -0
  109. package/bundled-test-harness/assets/copy-source-test-Dh33cqM8.js +56 -0
  110. package/bundled-test-harness/assets/cose-bilkent-S5V4N54A-CjAFDdpS.js +4275 -0
  111. package/bundled-test-harness/assets/create-file-test-DOc3YYij.js +963 -0
  112. package/bundled-test-harness/assets/create-file-test-DgUya7-i.js +397 -0
  113. package/bundled-test-harness/assets/create-listing-modal-test-DZxZBYS7.js +194 -0
  114. package/bundled-test-harness/assets/create-listing-pr-request-Aw0ms76l.js +64 -0
  115. package/bundled-test-harness/assets/create-listing-pr-request-test-CFvqkgky.js +117 -0
  116. package/bundled-test-harness/assets/create-spec-test-BTRt8oe8.js +239 -0
  117. package/bundled-test-harness/assets/csv-file-def-test-BVffg8wL.js +101 -0
  118. package/bundled-test-harness/assets/dagre-BM42HDAG-GoRrN65x.js +606 -0
  119. package/bundled-test-harness/assets/dagre-ByxOOmYM.js +4195 -0
  120. package/bundled-test-harness/assets/date-time-fields-test-BEcfCqgB.js +322 -0
  121. package/bundled-test-harness/assets/debug-message-test-CAxbe6x2.js +119 -0
  122. package/bundled-test-harness/assets/diagram-2AECGRRQ-B6-pvp9H.js +279 -0
  123. package/bundled-test-harness/assets/diagram-5GNKFQAL-C9M7hXIc.js +142 -0
  124. package/bundled-test-harness/assets/diagram-KO2AKTUF-BNJvCLGK.js +551 -0
  125. package/bundled-test-harness/assets/diagram-LMA3HP47-hlJyTtqP.js +184 -0
  126. package/bundled-test-harness/assets/diagram-OG6HWLK6-BvPoB3IH.js +857 -0
  127. package/bundled-test-harness/assets/diffing-test-De9Ev_Fr.js +210 -0
  128. package/bundled-test-harness/assets/dist-BsEojs3T.js +232 -0
  129. package/bundled-test-harness/assets/dist-CY3T64Hs.js +105 -0
  130. package/bundled-test-harness/assets/dist-q2xz8RMj.js +2 -0
  131. package/bundled-test-harness/assets/editor-test-DOI_TvWQ.js +551 -0
  132. package/bundled-test-harness/assets/editor.main-CpuM6HrX.js +43566 -0
  133. package/bundled-test-harness/assets/editor.main-DkMgS1qm.js +3 -0
  134. package/bundled-test-harness/assets/email-field-test-t-80Z94b.js +74 -0
  135. package/bundled-test-harness/assets/enum-field-test-DVp-2pip.js +909 -0
  136. package/bundled-test-harness/assets/erDiagram-TEJ5UH35-CYniRkua.js +2041 -0
  137. package/bundled-test-harness/assets/error-display-test-IuRxKyLz.js +343 -0
  138. package/bundled-test-harness/assets/evaluate-module-test-DdnfbFp-.js +66 -0
  139. package/bundled-test-harness/assets/eventmodeling-FCH6USID-BO089-Cs.js +3 -0
  140. package/bundled-test-harness/assets/execute-atomic-operations-test-CgbvrBlu.js +75 -0
  141. package/bundled-test-harness/assets/externals-5atxeNU4.js +5533 -0
  142. package/bundled-test-harness/assets/extract-css-variables-test-Cii-CYfc.js +169 -0
  143. package/bundled-test-harness/assets/fallback-banner-test-CUUd-Wuu.js +227 -0
  144. package/bundled-test-harness/assets/fallback-banner-test-D4NWyahM.js +53 -0
  145. package/bundled-test-harness/assets/fallback-models-test-2MJ1jAs8.js +163 -0
  146. package/bundled-test-harness/assets/fetch-card-json-test-Cruqsq6S.js +63 -0
  147. package/bundled-test-harness/assets/fetcher-test-CkHlbTzz.js +85 -0
  148. package/bundled-test-harness/assets/field-configuration-test-CqwsGNib.js +535 -0
  149. package/bundled-test-harness/assets/field-markdown-domain-test-DPjz8i4Y.js +615 -0
  150. package/bundled-test-harness/assets/field-markdown-primitives-test-Dw07UtT7.js +362 -0
  151. package/bundled-test-harness/assets/field-markdown-specialized-test-C-t34PAw.js +527 -0
  152. package/bundled-test-harness/assets/field-path-parser-test-BeNjacPu.js +387 -0
  153. package/bundled-test-harness/assets/field-playground-test-BILTGxqr.js +902 -0
  154. package/bundled-test-harness/assets/field-support-predicates-test-Df24w0Wa.js +170 -0
  155. package/bundled-test-harness/assets/field-test-helpers-P22hxBNz.js +45 -0
  156. package/bundled-test-harness/assets/file-attachment-test-Cjg4NBeM.js +635 -0
  157. package/bundled-test-harness/assets/file-chooser-test-Cl0XujPT.js +439 -0
  158. package/bundled-test-harness/assets/file-def-live-reload-test-D4Obzi12.js +50 -0
  159. package/bundled-test-harness/assets/file-def-manager-DUgR-gjs.js +470 -0
  160. package/bundled-test-harness/assets/file-def-manager-canonicalize-test-D_LWVsvz.js +451 -0
  161. package/bundled-test-harness/assets/file-def-menu-items-test-xvsUTOK4.js +114 -0
  162. package/bundled-test-harness/assets/file-def-navigation-test-DxPceB7E.js +109 -0
  163. package/bundled-test-harness/assets/file-def-serialization-test-CpwbDb8p.js +87 -0
  164. package/bundled-test-harness/assets/file-def-test-CEnKcvW9.js +219 -0
  165. package/bundled-test-harness/assets/file-tree-test-DE2aH6iq.js +773 -0
  166. package/bundled-test-harness/assets/flac-audio-def-test-BCg7LnR6.js +138 -0
  167. package/bundled-test-harness/assets/flowDiagram-I6XJVG4X-Xv8-LIxQ.js +4883 -0
  168. package/bundled-test-harness/assets/formatted-aibot-message-test-CsxFn62P.js +366 -0
  169. package/bundled-test-harness/assets/formatted-user-message-test-DjZc8qnA.js +43 -0
  170. package/bundled-test-harness/assets/freestyle-test-QEZaZCNJ.js +17 -0
  171. package/bundled-test-harness/assets/full-reindex-realm-test-C_c2OTTD.js +103 -0
  172. package/bundled-test-harness/assets/ganttDiagram-6RSMTGT7-DmvkzS5w.js +4060 -0
  173. package/bundled-test-harness/assets/garbage-collection-test-BVuvfidI.js +373 -0
  174. package/bundled-test-harness/assets/general-test-Ydis4jEq.js +926 -0
  175. package/bundled-test-harness/assets/generate-css-variables-test-CZCmgTAO.js +88 -0
  176. package/bundled-test-harness/assets/generate-example-cards-one-shot-test-x_szhkSN.js +67 -0
  177. package/bundled-test-harness/assets/get-available-realm-identifiers-test-DvRnwCHR.js +49 -0
  178. package/bundled-test-harness/assets/get-catalog-realm-identifiers-test-46TE-XA0.js +49 -0
  179. package/bundled-test-harness/assets/get-default-writable-realm-test-DaAkxTNh.js +56 -0
  180. package/bundled-test-harness/assets/get-realm-of-resource-identifier-test-9XEGHVOV.js +55 -0
  181. package/bundled-test-harness/assets/get-relationship-membership-state-test-BY4gk5JZ.js +1306 -0
  182. package/bundled-test-harness/assets/get-type-refs-from-filter-test-BynlX0JE.js +136 -0
  183. package/bundled-test-harness/assets/get-user-system-card-test-D98Xxn1k.js +52 -0
  184. package/bundled-test-harness/assets/gif-image-def-test-FwKGFGWw.js +161 -0
  185. package/bundled-test-harness/assets/gitGraph-WXDBUCRP-Bmn0Z_Xi.js +3 -0
  186. package/bundled-test-harness/assets/gitGraphDiagram-PVQCEYII-BAo0G82W.js +1150 -0
  187. package/bundled-test-harness/assets/gts-file-def-test-ivEk8Muv.js +99 -0
  188. package/bundled-test-harness/assets/head-format-preview-test-CNhvk724.js +156 -0
  189. package/bundled-test-harness/assets/helpers-BH4Yfo_2.js +5 -0
  190. package/bundled-test-harness/assets/host-mode-test-BRNndb2h.js +391 -0
  191. package/bundled-test-harness/assets/host-submode-test-DHd0x-6x.js +904 -0
  192. package/bundled-test-harness/assets/index-query-engine-test-7Fzc09fG.js +2548 -0
  193. package/bundled-test-harness/assets/index-writer-test-D3cL2q2N.js +1842 -0
  194. package/bundled-test-harness/assets/indexeddb-crypto-store-C09Shau-.js +49434 -0
  195. package/bundled-test-harness/assets/info-J43DQDTF-Dz5b1Xgc.js +3 -0
  196. package/bundled-test-harness/assets/infoDiagram-5YYISTIA-Dl8XvIfi.js +23 -0
  197. package/bundled-test-harness/assets/inspector-test-CVZVQdIJ.js +1776 -0
  198. package/bundled-test-harness/assets/instance-filter-matcher-test-C-4z6qUt.js +564 -0
  199. package/bundled-test-harness/assets/instantiate-card-test-eQ22Vt_m.js +104 -0
  200. package/bundled-test-harness/assets/interact-submode-creation-and-permissions-test-hXPsRPMU.js +497 -0
  201. package/bundled-test-harness/assets/interact-submode-setup-D55IIVc5.js +558 -0
  202. package/bundled-test-harness/assets/interact-submode-test-BwrtFe2m.js +725 -0
  203. package/bundled-test-harness/assets/invalidate-realm-identifiers-test-BMk7yd-D.js +101 -0
  204. package/bundled-test-harness/assets/invite-user-to-room-test-B5B0umJQ.js +67 -0
  205. package/bundled-test-harness/assets/ishikawaDiagram-YF4QCWOH-BrO7NAng.js +1009 -0
  206. package/bundled-test-harness/assets/isolated-render-test-DX1wdHoS.js +51 -0
  207. package/bundled-test-harness/assets/item-button-QkVr-FW0.js +203 -0
  208. package/bundled-test-harness/assets/javascript-BWNQhcCY.js +75 -0
  209. package/bundled-test-harness/assets/job-priority-header-test-CuBZloLK.js +81 -0
  210. package/bundled-test-harness/assets/journeyDiagram-JHISSGLW-B7BT66v0.js +1256 -0
  211. package/bundled-test-harness/assets/jpg-image-def-test-DEx462nY.js +430 -0
  212. package/bundled-test-harness/assets/json-file-def-test-Cray6ly6.js +92 -0
  213. package/bundled-test-harness/assets/kanban-definition-UN3LZRKU-C0E5Vmr_.js +1284 -0
  214. package/bundled-test-harness/assets/last-modified-date-test-BzE25NOB.js +18 -0
  215. package/bundled-test-harness/assets/limited-set-test-NwGNoXKc.js +123 -0
  216. package/bundled-test-harness/assets/line-BbGOk93s.js +55 -0
  217. package/bundled-test-harness/assets/linear-CHTo-YQl.js +417 -0
  218. package/bundled-test-harness/assets/linksto-broken-link-placeholder-test-CZdgRM1b.js +315 -0
  219. package/bundled-test-harness/assets/linksto-error-sentinel-test-DhsHO7Xs.js +236 -0
  220. package/bundled-test-harness/assets/linksto-many-broken-link-placeholder-test-mt-RrRta.js +303 -0
  221. package/bundled-test-harness/assets/linksto-many-per-slot-access-test-CdGUXZsi.js +301 -0
  222. package/bundled-test-harness/assets/linksto-sentinel-roundtrip-test-DOJ_6Gwf.js +258 -0
  223. package/bundled-test-harness/assets/linksto-singular-js-access-contract-test-BZC-gslF.js +194 -0
  224. package/bundled-test-harness/assets/live-prerendered-search-BSkwf5AH.js +639 -0
  225. package/bundled-test-harness/assets/live-test-DTfxZnsy.js +100 -0
  226. package/bundled-test-harness/assets/live-test-WOMYpc1I.js +2 -0
  227. package/bundled-test-harness/assets/loader-icon-error-test-F_ukQytn.js +62 -0
  228. package/bundled-test-harness/assets/loader-parallel-prefetch-test-DpNaFnhc.js +257 -0
  229. package/bundled-test-harness/assets/loader-retry-test-EQ2X0bFS.js +173 -0
  230. package/bundled-test-harness/assets/loader-test-BYkWAwc4.js +245 -0
  231. package/bundled-test-harness/assets/loading-test-jfWH_OpH.js +63 -0
  232. package/bundled-test-harness/assets/login-error-text-test-Cldr1X6h.js +51 -0
  233. package/bundled-test-harness/assets/m4a-audio-def-test-BQ1WKApD.js +185 -0
  234. package/bundled-test-harness/assets/main-ByAsLO_g.js +5 -0
  235. package/bundled-test-harness/assets/markdown-fallback-test-dtTaGP1s.js +316 -0
  236. package/bundled-test-harness/assets/markdown-file-def-test-shW9Xxd1.js +286 -0
  237. package/bundled-test-harness/assets/markdown-helpers-test-B6H7p4ay.js +183 -0
  238. package/bundled-test-harness/assets/markdown-highlighting-test-ZIrFNHRe.js +244 -0
  239. package/bundled-test-harness/assets/markdown-preview-KII3nJ2M.js +69 -0
  240. package/bundled-test-harness/assets/markdown-preview-test-De-IaUbK.js +237 -0
  241. package/bundled-test-harness/assets/marked-sync-CGSehq4u.js +2 -0
  242. package/bundled-test-harness/assets/marked-sync-DenC7QgC.js +2561 -0
  243. package/bundled-test-harness/assets/marked-sync-test-jZBr20Hq.js +146 -0
  244. package/bundled-test-harness/assets/matrix-service-sliding-sync-test-Ax4kyAMt.js +33 -0
  245. package/bundled-test-harness/assets/mermaid-parser.core-B_3tzKUl.js +114 -0
  246. package/bundled-test-harness/assets/mermaid.core-D2hqA7Hq.js +1700 -0
  247. package/bundled-test-harness/assets/message-service-subscription-test-B42KnJ91.js +113 -0
  248. package/bundled-test-harness/assets/mindmap-definition-RKZ34NQL-IZz7Qpd0.js +1347 -0
  249. package/bundled-test-harness/assets/mock-matrix-BhFWlMMr.js +14292 -0
  250. package/bundled-test-harness/assets/mock-matrix-CrtMntcN.js +2 -0
  251. package/bundled-test-harness/assets/module-transpile-cache-test-BtWN4OiM.js +66 -0
  252. package/bundled-test-harness/assets/monaco.contribution-B1hOUP3w.js +2 -0
  253. package/bundled-test-harness/assets/monaco.contribution-DhNsYtZe.js +2 -0
  254. package/bundled-test-harness/assets/monaco.contribution-DvJDImx2.js +103 -0
  255. package/bundled-test-harness/assets/monaco.contribution-yXcOyzue.js +243 -0
  256. package/bundled-test-harness/assets/mp3-audio-def-test-D365TuA7.js +129 -0
  257. package/bundled-test-harness/assets/mutex-test-DY09HLvv.js +71 -0
  258. package/bundled-test-harness/assets/number-field-test-wYaQjnzA.js +153 -0
  259. package/bundled-test-harness/assets/ogg-audio-def-test-Dl01PP31.js +191 -0
  260. package/bundled-test-harness/assets/open-create-listing-modal-test-D8C2PUFv.js +117 -0
  261. package/bundled-test-harness/assets/open-workspace-test-DN2n8IkC.js +48 -0
  262. package/bundled-test-harness/assets/operator-mode-acceptance-test-B_hzJZo4.js +1044 -0
  263. package/bundled-test-harness/assets/operator-mode-card-catalog-test-Hrrnkdt9.js +989 -0
  264. package/bundled-test-harness/assets/operator-mode-links-test-DC6sc9TZ.js +797 -0
  265. package/bundled-test-harness/assets/operator-mode-state-service-test-Aqz9_v0U.js +122 -0
  266. package/bundled-test-harness/assets/operator-mode-test-CLgpZGEM.js +617 -0
  267. package/bundled-test-harness/assets/operator-mode-ui-test-CDRrORfC.js +985 -0
  268. package/bundled-test-harness/assets/ordinal-BIRuJQBH.js +85 -0
  269. package/bundled-test-harness/assets/overlay-menu-items-test-of24KuXp.js +316 -0
  270. package/bundled-test-harness/assets/packet-YPE3B663-hs92geQG.js +3 -0
  271. package/bundled-test-harness/assets/panel-rIdTMDfK.js +3371 -0
  272. package/bundled-test-harness/assets/past-sessions-test-ZKr4ACF0.js +321 -0
  273. package/bundled-test-harness/assets/patch-code-test-BZa-Itrt.js +203 -0
  274. package/bundled-test-harness/assets/patch-fields-test-BkaHs-zo.js +992 -0
  275. package/bundled-test-harness/assets/patch-instance-test-CRMgg52p.js +287 -0
  276. package/bundled-test-harness/assets/persist-module-inspector-view-test-CqNy2RXR.js +62 -0
  277. package/bundled-test-harness/assets/phone-number-field-test-CV6gntON.js +72 -0
  278. package/bundled-test-harness/assets/pie-LRSECV5Y-DcM5pWE3.js +3 -0
  279. package/bundled-test-harness/assets/pieDiagram-4H26LBE5-CtO8RHpU.js +253 -0
  280. package/bundled-test-harness/assets/plan-install-test-lfBTuWXU.js +417 -0
  281. package/bundled-test-harness/assets/playground-VscW9KdT.js +57 -0
  282. package/bundled-test-harness/assets/png-image-def-test-CRspcIHP.js +222 -0
  283. package/bundled-test-harness/assets/prerender-file-extract-test-D3SpxfMI.js +176 -0
  284. package/bundled-test-harness/assets/prerender-html-test-WWptGXJ0.js +615 -0
  285. package/bundled-test-harness/assets/prerender-meta-test-DwQEGN6j.js +388 -0
  286. package/bundled-test-harness/assets/prerender-module-test-BM1AOwRF.js +195 -0
  287. package/bundled-test-harness/assets/prerendered-card-search-test-BVJ8IHLe.js +708 -0
  288. package/bundled-test-harness/assets/preview-format-test-DDpiXDN_.js +103 -0
  289. package/bundled-test-harness/assets/preview-test-D2UV1C5D.js +455 -0
  290. package/bundled-test-harness/assets/published-realm-url-DUIZzAJ5.js +52 -0
  291. package/bundled-test-harness/assets/published-realm-url-test-CIgSf4Ub.js +137 -0
  292. package/bundled-test-harness/assets/qs-test-Bi679H5w.js +36 -0
  293. package/bundled-test-harness/assets/quadrantDiagram-W4KKPZXB-GOTAKsCo.js +2324 -0
  294. package/bundled-test-harness/assets/query-field-barrier-test-BlOuVxdS.js +118 -0
  295. package/bundled-test-harness/assets/query-field-error-sentinel-test-BsB76iUQ.js +202 -0
  296. package/bundled-test-harness/assets/query-field-normalization-test-B2YodJCr.js +271 -0
  297. package/bundled-test-harness/assets/query-field-schema-test-CQhJASFx.js +231 -0
  298. package/bundled-test-harness/assets/query-fields-test-CaZ19leM.js +535 -0
  299. package/bundled-test-harness/assets/queue-test-DrSip6mJ.js +216 -0
  300. package/bundled-test-harness/assets/radar-GUYGQ44K-BkAe1nkp.js +3 -0
  301. package/bundled-test-harness/assets/read-card-for-ai-assistant-test-D8yB-OL9.js +91 -0
  302. package/bundled-test-harness/assets/read-file-for-ai-assistant-test-K3M0-lBD.js +45 -0
  303. package/bundled-test-harness/assets/read-source-test-CKlb0ORb.js +67 -0
  304. package/bundled-test-harness/assets/read-text-file-test-CJdasDDU.js +124 -0
  305. package/bundled-test-harness/assets/realm-DhUCLR5r.js +884 -0
  306. package/bundled-test-harness/assets/realm-field-test-kFgxphDI.js +101 -0
  307. package/bundled-test-harness/assets/realm-index-card-id-test-DAnMAqw4.js +18 -0
  308. package/bundled-test-harness/assets/realm-indexing-test-BQkX-Dat.js +4018 -0
  309. package/bundled-test-harness/assets/realm-paths-test-CmEi9rzu.js +33 -0
  310. package/bundled-test-harness/assets/realm-querying-test-eq3qSXLu.js +1062 -0
  311. package/bundled-test-harness/assets/realm-test-DLQAtdMt.js +2409 -0
  312. package/bundled-test-harness/assets/reasoning-test-CwTfyDlj.js +234 -0
  313. package/bundled-test-harness/assets/recent-files-test-MVIGLp8S.js +449 -0
  314. package/bundled-test-harness/assets/reindex-realm-test-BwLgJeB3.js +119 -0
  315. package/bundled-test-harness/assets/relationship-loading-state-test-B4Ca43yD.js +289 -0
  316. package/bundled-test-harness/assets/render-component-BKEihV4U.js +2 -0
  317. package/bundled-test-harness/assets/render-error-test-DWD6tfNe.js +22 -0
  318. package/bundled-test-harness/assets/render-service-test-BjuoVrUK.js +87 -0
  319. package/bundled-test-harness/assets/render-timer-stub-test-BgUY5u3X.js +84 -0
  320. package/bundled-test-harness/assets/rendered-markdown-DOP-s6fW.js +211 -0
  321. package/bundled-test-harness/assets/rendered-markdown-test-CD02UYwA.js +360 -0
  322. package/bundled-test-harness/assets/requirementDiagram-4Y6WPE33-DJIy7eR9.js +2550 -0
  323. package/bundled-test-harness/assets/rich-markdown-field-test-BJeQx1tL.js +806 -0
  324. package/bundled-test-harness/assets/room-message-test-CjD7FlPD.js +171 -0
  325. package/bundled-test-harness/assets/rust-crypto-GS0FFZ7H.js +16141 -0
  326. package/bundled-test-harness/assets/sanitize-module-list-test-gi0pcqSy.js +68 -0
  327. package/bundled-test-harness/assets/sankeyDiagram-5OEKKPKP-wBsbt1Mr.js +1357 -0
  328. package/bundled-test-harness/assets/schema-editor-test-BSqu8W3e.js +784 -0
  329. package/bundled-test-harness/assets/schema-generation-test-DVFuSsLl.js +28 -0
  330. package/bundled-test-harness/assets/scrolling-test-CpzkRiBS.js +292 -0
  331. package/bundled-test-harness/assets/search-and-choose-test-DVWX4XRb.js +156 -0
  332. package/bundled-test-harness/assets/search-cache-key-test-BMnYM4a5.js +79 -0
  333. package/bundled-test-harness/assets/search-command-test-kEfT0AO7.js +135 -0
  334. package/bundled-test-harness/assets/search-correlation-id-test-D08FtVUZ.js +101 -0
  335. package/bundled-test-harness/assets/search-data-test-CTrBEc1m.js +243 -0
  336. package/bundled-test-harness/assets/search-google-images-test-UnKG8qCp.js +168 -0
  337. package/bundled-test-harness/assets/search-in-flight-key-test-9Va-JXFz.js +79 -0
  338. package/bundled-test-harness/assets/search-test-COlO2lZi.js +847 -0
  339. package/bundled-test-harness/assets/send-ai-assistant-message-test-BPjOjt2R.js +52 -0
  340. package/bundled-test-harness/assets/send-bot-trigger-event-test-BB4lHbB_.js +56 -0
  341. package/bundled-test-harness/assets/send-request-via-proxy-test-U8frmHZA.js +333 -0
  342. package/bundled-test-harness/assets/sending-test-DjEzksEX.js +317 -0
  343. package/bundled-test-harness/assets/sequenceDiagram-3UESZ5HK-QAEjhoay.js +5551 -0
  344. package/bundled-test-harness/assets/serialization-test-DHdLriC8.js +8283 -0
  345. package/bundled-test-harness/assets/set-user-system-card-test-C8I1lDBh.js +59 -0
  346. package/bundled-test-harness/assets/setup-BkuybBki.js +769 -0
  347. package/bundled-test-harness/assets/setup-gxkWJKID.js +2 -0
  348. package/bundled-test-harness/assets/show-card-test-DHKQ6AI4.js +362 -0
  349. package/bundled-test-harness/assets/skills-test-DlMgZrPV.js +568 -0
  350. package/bundled-test-harness/assets/spec-test-s9Zj7x2E.js +1012 -0
  351. package/bundled-test-harness/assets/stateDiagram-AJRCARHV-nEhf3efZ.js +363 -0
  352. package/bundled-test-harness/assets/stateDiagram-v2-BHNVJYJU-tZz_3w-7.js +29 -0
  353. package/bundled-test-harness/assets/store-add-test-D44FWRl3.js +52 -0
  354. package/bundled-test-harness/assets/store-test-TTmNBs5v.js +1562 -0
  355. package/bundled-test-harness/assets/summarize-session-test-DHAuNb5K.js +169 -0
  356. package/bundled-test-harness/assets/svg-image-def-test-C2_GGzR6.js +164 -0
  357. package/bundled-test-harness/assets/switch-submode-test-CfGaoxVe.js +168 -0
  358. package/bundled-test-harness/assets/test-realm-service-worker-C21o7yvW.js +73 -0
  359. package/bundled-test-harness/assets/tests-BSt6h9iC.js +2771 -0
  360. package/bundled-test-harness/assets/text-file-def-test-CR4QO7e_.js +93 -0
  361. package/bundled-test-harness/assets/text-input-validator-test-DYS3mFj9.js +155 -0
  362. package/bundled-test-harness/assets/text-suggestion-test-GUxJ7WtF.js +339 -0
  363. package/bundled-test-harness/assets/theme-card-test-Ba2KqFB8.js +573 -0
  364. package/bundled-test-harness/assets/timeline-definition-PNZ67QCA-BQYyTIei.js +1545 -0
  365. package/bundled-test-harness/assets/transform-cards-test-DyA8eCom.js +341 -0
  366. package/bundled-test-harness/assets/treeView-BLDUP644-Z4ezSvef.js +3 -0
  367. package/bundled-test-harness/assets/treemap-LRROVOQU-Bf5rk_He.js +3 -0
  368. package/bundled-test-harness/assets/ts-file-def-test-Cxnc6H74.js +90 -0
  369. package/bundled-test-harness/assets/tsMode-oJEHe-CR.js +968 -0
  370. package/bundled-test-harness/assets/typescript-DLbb7q56.js +2 -0
  371. package/bundled-test-harness/assets/update-room-skills-test-B7VLHU3-.js +197 -0
  372. package/bundled-test-harness/assets/url-test-w-69Zycf.js +103 -0
  373. package/bundled-test-harness/assets/use-ai-assistant-test-DJkFz7_b.js +330 -0
  374. package/bundled-test-harness/assets/validate-realm-test-BioLutB8.js +53 -0
  375. package/bundled-test-harness/assets/vennDiagram-CIIHVFJN-9eLwsQET.js +2833 -0
  376. package/bundled-test-harness/assets/wardley-L42UT6IY-qNP5_917.js +3 -0
  377. package/bundled-test-harness/assets/wardleyDiagram-YWT4CUSO-DZhEm4N4.js +872 -0
  378. package/bundled-test-harness/assets/wav-audio-def-test-DqsTEBw8.js +155 -0
  379. package/bundled-test-harness/assets/webp-image-def-test-23wOLPMu.js +225 -0
  380. package/bundled-test-harness/assets/workspace-chooser-delete-test-Q6S_nGDT.js +189 -0
  381. package/bundled-test-harness/assets/workspace-chooser-test-CzsvY1v_.js +235 -0
  382. package/bundled-test-harness/assets/workspace-delete-multiple-test-BNFHkJpQ.js +213 -0
  383. package/bundled-test-harness/assets/workspace-delete-summary-test-DLzNdjvC.js +63 -0
  384. package/bundled-test-harness/assets/write-binary-file-test-PHHt9fVI.js +100 -0
  385. package/bundled-test-harness/assets/write-text-file-test-DuHe6tR5.js +172 -0
  386. package/bundled-test-harness/assets/xychartDiagram-2RQKCTM6-bflHQbEv.js +2551 -0
  387. package/bundled-test-harness/index.html +24 -23
  388. package/bundled-test-harness/tests/index.html +31 -30
  389. package/bundled-types/base/command.d.ts +48 -0
  390. package/bundled-types/host-app/components/operator-mode/publish-realm-modal.gts +17 -26
  391. package/bundled-types/host-app/lib/published-realm-url.ts +135 -0
  392. package/package.json +3 -3
  393. package/src/build-program.ts +12 -12
  394. package/src/commands/consolidate-workspaces.ts +1 -1
  395. package/src/commands/file/delete.ts +4 -4
  396. package/src/commands/file/index.ts +6 -6
  397. package/src/commands/file/lint.ts +4 -4
  398. package/src/commands/file/list.ts +3 -3
  399. package/src/commands/file/read.ts +3 -3
  400. package/src/commands/file/touch.ts +6 -6
  401. package/src/commands/file/write.ts +3 -3
  402. package/src/commands/lint.ts +6 -6
  403. package/src/commands/parse.ts +6 -6
  404. package/src/commands/profile.ts +4 -4
  405. package/src/commands/read-transpiled.ts +6 -3
  406. package/src/commands/realm/cancel-indexing.ts +3 -3
  407. package/src/commands/realm/create.ts +2 -2
  408. package/src/commands/realm/history.ts +4 -4
  409. package/src/commands/realm/index.ts +15 -15
  410. package/src/commands/realm/indexing-errors.ts +3 -3
  411. package/src/commands/realm/list.ts +2 -2
  412. package/src/commands/realm/milestone.ts +4 -4
  413. package/src/commands/realm/publish.ts +4 -4
  414. package/src/commands/realm/pull.ts +6 -6
  415. package/src/commands/realm/push.ts +7 -7
  416. package/src/commands/realm/remove.ts +3 -3
  417. package/src/commands/realm/status.ts +8 -8
  418. package/src/commands/realm/sync.ts +9 -9
  419. package/src/commands/realm/unpublish.ts +3 -3
  420. package/src/commands/realm/wait-for-ready.ts +2 -2
  421. package/src/commands/realm/watch/index.ts +2 -2
  422. package/src/commands/realm/watch/start.ts +13 -10
  423. package/src/commands/realm/watch/stop.ts +2 -2
  424. package/src/commands/run-command.ts +6 -3
  425. package/src/commands/search.ts +3 -3
  426. package/src/commands/test.ts +5 -5
  427. package/src/index.ts +2 -2
  428. package/src/lib/auth-resolver.ts +3 -3
  429. package/src/lib/boxel-cli-client.ts +18 -15
  430. package/src/lib/checkpoint-manager.ts +1 -1
  431. package/src/lib/find-checkpoint.ts +1 -1
  432. package/src/lib/profile-manager.ts +4 -4
  433. package/src/lib/realm-local-paths.ts +1 -1
  434. package/src/lib/realm-sync-base.ts +1 -1
  435. package/src/lib/seed-auth.ts +1 -1
  436. package/src/lib/sync-logic.ts +1 -1
  437. package/src/lib/watch-process-registry.ts +1 -1
  438. package/bundled-test-harness/assets/adapter-C8oDflNN.js +0 -2
  439. package/bundled-test-harness/assets/add-field-to-card-definition-command-test-Cs670972.js +0 -111
  440. package/bundled-test-harness/assets/add-workspace-test-BviDAUBK.js +0 -71
  441. package/bundled-test-harness/assets/ai-assistant-B5fp2iOz.js +0 -129
  442. package/bundled-test-harness/assets/ai-assistant-panel-service-test-NpHZzZAz.js +0 -95
  443. package/bundled-test-harness/assets/ai-assistant-test-jPV29jEw.js +0 -2137
  444. package/bundled-test-harness/assets/ai-function-generation-test-QRPcE9tQ.js +0 -996
  445. package/bundled-test-harness/assets/ai-module-creation-test-DyuyfnkY.js +0 -150
  446. package/bundled-test-harness/assets/aibot-message-Dwxp5hTW.js +0 -1185
  447. package/bundled-test-harness/assets/amd-transpile-test-CF7Lkbif.js +0 -425
  448. package/bundled-test-harness/assets/app-CgP2IpNG.js +0 -21464
  449. package/bundled-test-harness/assets/apply-boxel-formatting-test-BXyZ3z0I.js +0 -134
  450. package/bundled-test-harness/assets/apply-markdown-edit-test-C6bcaj3a.js +0 -230
  451. package/bundled-test-harness/assets/apply-search-replace-block-test-BSwC4J9g.js +0 -630
  452. package/bundled-test-harness/assets/arc-DNRb_8LA.js +0 -199
  453. package/bundled-test-harness/assets/architecture-7EHR7CIX-BtVh_LBJ.js +0 -3
  454. package/bundled-test-harness/assets/architectureDiagram-3BPJPVTR-D9UYbaKj.js +0 -7400
  455. package/bundled-test-harness/assets/auth-error-guard-test-Bvu8E7Wy.js +0 -30
  456. package/bundled-test-harness/assets/auth-service-worker-test-CC6DzdfK.js +0 -538
  457. package/bundled-test-harness/assets/authed-fetch-test-CfF-IBHI.js +0 -75
  458. package/bundled-test-harness/assets/avif-image-def-test-B9L2z0nR.js +0 -186
  459. package/bundled-test-harness/assets/base-realm-43wjttN2.js +0 -140
  460. package/bundled-test-harness/assets/base-realm-CJ5x9iyX.js +0 -2
  461. package/bundled-test-harness/assets/basic-test-B64a5zCK.js +0 -128
  462. package/bundled-test-harness/assets/bfm-card-references-test-cLQVLpth.js +0 -577
  463. package/bundled-test-harness/assets/binary-upload-dedupe-test-By7Y1iQ3.js +0 -308
  464. package/bundled-test-harness/assets/blockDiagram-GPEHLZMM-LgOorG2O.js +0 -4355
  465. package/bundled-test-harness/assets/bot-registration-test-DOjf0P1R.js +0 -99
  466. package/bundled-test-harness/assets/box-test-Cd1-RcXg.js +0 -51
  467. package/bundled-test-harness/assets/brand-guide-attachments-test-DxRqP8fo.js +0 -87
  468. package/bundled-test-harness/assets/brand-guide-custom-css-test-DBpZiHzJ.js +0 -135
  469. package/bundled-test-harness/assets/brand-logo-mark-field-test-61k4e5Om.js +0 -87
  470. package/bundled-test-harness/assets/broken-link-template-test-A1P4flQ5.js +0 -345
  471. package/bundled-test-harness/assets/browser-index-Bzhpucwe.js +0 -3
  472. package/bundled-test-harness/assets/browser-index-D0mzSWYV.js +0 -8802
  473. package/bundled-test-harness/assets/c4Diagram-AAUBKEIU-1iq94vGa.js +0 -3764
  474. package/bundled-test-harness/assets/cached-fetch-test-ByQ-5OQI.js +0 -93
  475. package/bundled-test-harness/assets/can-read-realm-test-VFLHJdEv.js +0 -58
  476. package/bundled-test-harness/assets/cancel-indexing-job-test-n3Os4ZaX.js +0 -71
  477. package/bundled-test-harness/assets/card-api-test-DvNfLv3V.js +0 -196
  478. package/bundled-test-harness/assets/card-basics-test-CKzZuFdw.js +0 -4895
  479. package/bundled-test-harness/assets/card-catalog-test-JFvkVHED.js +0 -377
  480. package/bundled-test-harness/assets/card-copy-test-iwrFA72s.js +0 -777
  481. package/bundled-test-harness/assets/card-def-field-def-relationships-test-D5s2RH5t.js +0 -560
  482. package/bundled-test-harness/assets/card-def-menu-items-test-XcmkT4NF.js +0 -182
  483. package/bundled-test-harness/assets/card-delete-test-jtAOHk1Y.js +0 -412
  484. package/bundled-test-harness/assets/card-directory-name-test-veQEp5FJ.js +0 -71
  485. package/bundled-test-harness/assets/card-playground-test-P7Ed0tO4.js +0 -1497
  486. package/bundled-test-harness/assets/card-prerender-DXG8cQEv.js +0 -12661
  487. package/bundled-test-harness/assets/card-search-adorn-test-BX0-IJHB.js +0 -128
  488. package/bundled-test-harness/assets/card-search-query-builder-test-D01uixke.js +0 -88
  489. package/bundled-test-harness/assets/card-search-selection-menu-test-DMTeZFmW.js +0 -108
  490. package/bundled-test-harness/assets/channel-BvoW_rbI.js +0 -8
  491. package/bundled-test-harness/assets/check-correctness-test-D7QB1GTo.js +0 -252
  492. package/bundled-test-harness/assets/chunk-2J33WTMH-BbxCvOlt.js +0 -31
  493. package/bundled-test-harness/assets/chunk-3OPIFGDE-DHY3s0oT.js +0 -5548
  494. package/bundled-test-harness/assets/chunk-4BX2VUAB-CRivrLQ6.js +0 -11
  495. package/bundled-test-harness/assets/chunk-4EGX6M5U-qWzlMeqd.js +0 -44
  496. package/bundled-test-harness/assets/chunk-55IACEB6-DOl6NECJ.js +0 -10
  497. package/bundled-test-harness/assets/chunk-5DO6E6H7-scwNnzDb.js +0 -27
  498. package/bundled-test-harness/assets/chunk-5ZQYHXKU-BeETnugr.js +0 -1767
  499. package/bundled-test-harness/assets/chunk-727SXJPM-BlycTxFE.js +0 -3877
  500. package/bundled-test-harness/assets/chunk-AQP2D5EJ-BE3Clw-g.js +0 -2622
  501. package/bundled-test-harness/assets/chunk-BR22UD5L-BTPKlhWA.js +0 -85
  502. package/bundled-test-harness/assets/chunk-BSJP7CBP-BIhtUfvc.js +0 -114
  503. package/bundled-test-harness/assets/chunk-CSCIHK7Q-DnRAp6Bv.js +0 -6144
  504. package/bundled-test-harness/assets/chunk-FHYWG6QK-DpIXIGDC.js +0 -27
  505. package/bundled-test-harness/assets/chunk-FMBD7UC4-B36w3LIg.js +0 -20
  506. package/bundled-test-harness/assets/chunk-KSCS5N6A-gbz9p9BU.js +0 -871
  507. package/bundled-test-harness/assets/chunk-L5ZTLDWV-HNfH9U8K.js +0 -43
  508. package/bundled-test-harness/assets/chunk-LZXEDZCA-CbKHJfzx.js +0 -65
  509. package/bundled-test-harness/assets/chunk-MPE355IW-BGVbCTZH.js +0 -27
  510. package/bundled-test-harness/assets/chunk-MZUSXYTE-DoCjuxcJ.js +0 -36
  511. package/bundled-test-harness/assets/chunk-N66VUXT2-BX17MI-i.js +0 -70
  512. package/bundled-test-harness/assets/chunk-ND2GUHAM-IpeiJZYz.js +0 -93
  513. package/bundled-test-harness/assets/chunk-NZK2D7GU-CH-Gg7qc.js +0 -89
  514. package/bundled-test-harness/assets/chunk-O5CBEL6O-D2JbLgI8.js +0 -2395
  515. package/bundled-test-harness/assets/chunk-PUPMXCY4-DS4ZxM2V.js +0 -27
  516. package/bundled-test-harness/assets/chunk-QZHKN3VN-WLHeRUJ3.js +0 -20
  517. package/bundled-test-harness/assets/chunk-UIBZB4QT-DNIJBpkq.js +0 -27
  518. package/bundled-test-harness/assets/chunk-WCWK7LTN-CqRJ3WOy.js +0 -36
  519. package/bundled-test-harness/assets/chunk-WU5MYG2G-CtItCLbE.js +0 -12
  520. package/bundled-test-harness/assets/chunk-XPW4576I-D2Q7Qo8n.js +0 -2341
  521. package/bundled-test-harness/assets/classDiagram-4FO5ZUOK-CnNFReKQ.js +0 -31
  522. package/bundled-test-harness/assets/classDiagram-v2-Q7XG4LA2-BlhpbohY.js +0 -31
  523. package/bundled-test-harness/assets/code-equality-assertion-C-2g5YGf.js +0 -474
  524. package/bundled-test-harness/assets/code-patches-test-DaV4Mon_.js +0 -1128
  525. package/bundled-test-harness/assets/code-patching-test-CcbWlImN.js +0 -114
  526. package/bundled-test-harness/assets/code-ref-test-8Yj8gbww.js +0 -138
  527. package/bundled-test-harness/assets/code-semantics-service-test-C3srTfDz.js +0 -65
  528. package/bundled-test-harness/assets/code-submode-test-BUhjvWtB.js +0 -1762
  529. package/bundled-test-harness/assets/codeblocks-test-3zAp0_GA.js +0 -492
  530. package/bundled-test-harness/assets/codemirror-context-C7KmSAyy.js +0 -2
  531. package/bundled-test-harness/assets/codemirror-editor-test-WojU4k2h.js +0 -1176
  532. package/bundled-test-harness/assets/color-field-test-yESUakoE.js +0 -213
  533. package/bundled-test-harness/assets/command-definitions-test-UsXsAhn7.js +0 -72
  534. package/bundled-test-harness/assets/commands-CBDBujm_.js +0 -1379
  535. package/bundled-test-harness/assets/commands-calling-test-DJTl0EbL.js +0 -200
  536. package/bundled-test-harness/assets/commands-test-DW2gupNS.js +0 -1041
  537. package/bundled-test-harness/assets/commands-test-DjLnuojW.js +0 -1145
  538. package/bundled-test-harness/assets/computed-test-0n5g8Ez5.js +0 -882
  539. package/bundled-test-harness/assets/container-D8y7fmir.js +0 -14602
  540. package/bundled-test-harness/assets/convert-to-class-name-test-DSIflIV2.js +0 -17
  541. package/bundled-test-harness/assets/copy-and-edit-test-BuK1ZHr-.js +0 -291
  542. package/bundled-test-harness/assets/copy-card-test-DnDC4_7J.js +0 -156
  543. package/bundled-test-harness/assets/copy-file-to-realm-test-CFd_3Iff.js +0 -99
  544. package/bundled-test-harness/assets/copy-source-test-38yUGJor.js +0 -56
  545. package/bundled-test-harness/assets/cose-bilkent-S5V4N54A-DXA1S87S.js +0 -4275
  546. package/bundled-test-harness/assets/create-file-test-B2oem0-V.js +0 -963
  547. package/bundled-test-harness/assets/create-file-test-BHk00RtD.js +0 -397
  548. package/bundled-test-harness/assets/create-listing-modal-test-L-71-Uo2.js +0 -194
  549. package/bundled-test-harness/assets/create-listing-pr-request-CZaLsHhE.js +0 -64
  550. package/bundled-test-harness/assets/create-listing-pr-request-test-OGzk4Q2E.js +0 -117
  551. package/bundled-test-harness/assets/create-spec-test-BsM7VKuH.js +0 -239
  552. package/bundled-test-harness/assets/csv-file-def-test-BhJalhE-.js +0 -101
  553. package/bundled-test-harness/assets/dagre-BIk_r1iU.js +0 -4195
  554. package/bundled-test-harness/assets/dagre-BM42HDAG-FaUWeGOj.js +0 -606
  555. package/bundled-test-harness/assets/date-time-fields-test-Cs5T6Xk1.js +0 -322
  556. package/bundled-test-harness/assets/debug-message-test-WlHe7pJF.js +0 -119
  557. package/bundled-test-harness/assets/diagram-2AECGRRQ-DLve-IVM.js +0 -279
  558. package/bundled-test-harness/assets/diagram-5GNKFQAL-CJG1RTLk.js +0 -142
  559. package/bundled-test-harness/assets/diagram-KO2AKTUF-DYGDq3dD.js +0 -551
  560. package/bundled-test-harness/assets/diagram-LMA3HP47-BNRYdpMl.js +0 -184
  561. package/bundled-test-harness/assets/diagram-OG6HWLK6-BlJH5g83.js +0 -857
  562. package/bundled-test-harness/assets/diffing-test-DO54USSm.js +0 -210
  563. package/bundled-test-harness/assets/dist-BDRmXkWl.js +0 -232
  564. package/bundled-test-harness/assets/dist-BfNSLd0O.js +0 -105
  565. package/bundled-test-harness/assets/dist-BoireClP.js +0 -2
  566. package/bundled-test-harness/assets/editor-test-DChC9LuR.js +0 -551
  567. package/bundled-test-harness/assets/editor.main-BiohyrHK.js +0 -3
  568. package/bundled-test-harness/assets/editor.main-CMU_0pR1.js +0 -43566
  569. package/bundled-test-harness/assets/email-field-test-DWIFSfZ-.js +0 -74
  570. package/bundled-test-harness/assets/enum-field-test-BUc6l4us.js +0 -909
  571. package/bundled-test-harness/assets/erDiagram-TEJ5UH35-pOJ2novh.js +0 -2041
  572. package/bundled-test-harness/assets/error-display-test-CHSE6h6Z.js +0 -343
  573. package/bundled-test-harness/assets/evaluate-module-test-Caa5n0B9.js +0 -66
  574. package/bundled-test-harness/assets/eventmodeling-FCH6USID-B6XXU7R3.js +0 -3
  575. package/bundled-test-harness/assets/execute-atomic-operations-test-CT060oDk.js +0 -75
  576. package/bundled-test-harness/assets/externals-Do1fVZ4j.js +0 -5533
  577. package/bundled-test-harness/assets/extract-css-variables-test-DzjAsMgg.js +0 -169
  578. package/bundled-test-harness/assets/fallback-banner-test-CmxysrDn.js +0 -227
  579. package/bundled-test-harness/assets/fallback-banner-test-DJ4cO8PB.js +0 -53
  580. package/bundled-test-harness/assets/fallback-models-test-r5upJFeA.js +0 -163
  581. package/bundled-test-harness/assets/fetch-card-json-test-Di1wmvy5.js +0 -63
  582. package/bundled-test-harness/assets/fetcher-test-DjzNl_7F.js +0 -85
  583. package/bundled-test-harness/assets/field-configuration-test-C3vr-HhG.js +0 -535
  584. package/bundled-test-harness/assets/field-markdown-domain-test-DG2U4qIm.js +0 -615
  585. package/bundled-test-harness/assets/field-markdown-primitives-test-Bay2v8nT.js +0 -362
  586. package/bundled-test-harness/assets/field-markdown-specialized-test-Bl0Sl4sc.js +0 -527
  587. package/bundled-test-harness/assets/field-path-parser-test-bxxwUjcm.js +0 -387
  588. package/bundled-test-harness/assets/field-playground-test-Bcjfws4m.js +0 -902
  589. package/bundled-test-harness/assets/field-support-predicates-test-DYTqOGvv.js +0 -170
  590. package/bundled-test-harness/assets/field-test-helpers-DYSfSGdh.js +0 -45
  591. package/bundled-test-harness/assets/file-attachment-test-6ypDRDS7.js +0 -635
  592. package/bundled-test-harness/assets/file-chooser-test-mtmcHTFP.js +0 -439
  593. package/bundled-test-harness/assets/file-def-live-reload-test-CX1-lOv6.js +0 -50
  594. package/bundled-test-harness/assets/file-def-manager-DNHII2oj.js +0 -470
  595. package/bundled-test-harness/assets/file-def-manager-canonicalize-test-i_7UVakF.js +0 -451
  596. package/bundled-test-harness/assets/file-def-menu-items-test-Dw458iku.js +0 -114
  597. package/bundled-test-harness/assets/file-def-navigation-test-B3Ztr1Rd.js +0 -109
  598. package/bundled-test-harness/assets/file-def-serialization-test-C_gV8AkU.js +0 -87
  599. package/bundled-test-harness/assets/file-def-test-vXXJmtxX.js +0 -219
  600. package/bundled-test-harness/assets/file-tree-test-BJCiw9jm.js +0 -773
  601. package/bundled-test-harness/assets/flac-audio-def-test-BX3SE1vW.js +0 -138
  602. package/bundled-test-harness/assets/flowDiagram-I6XJVG4X-7Q5ROn4X.js +0 -4883
  603. package/bundled-test-harness/assets/formatted-aibot-message-test-DyqUz2nt.js +0 -366
  604. package/bundled-test-harness/assets/formatted-user-message-test-aqAzqvBP.js +0 -43
  605. package/bundled-test-harness/assets/freestyle-test-CLRrZkAE.js +0 -17
  606. package/bundled-test-harness/assets/full-reindex-realm-test-ClqPVQ0c.js +0 -103
  607. package/bundled-test-harness/assets/ganttDiagram-6RSMTGT7-BkDoIAAE.js +0 -4060
  608. package/bundled-test-harness/assets/garbage-collection-test-Ba2dD3qS.js +0 -373
  609. package/bundled-test-harness/assets/general-test-D0zhs14K.js +0 -926
  610. package/bundled-test-harness/assets/generate-css-variables-test-CKrXSlHs.js +0 -88
  611. package/bundled-test-harness/assets/generate-example-cards-one-shot-test-fSAdGJeT.js +0 -67
  612. package/bundled-test-harness/assets/get-available-realm-identifiers-test-BXMUW65I.js +0 -49
  613. package/bundled-test-harness/assets/get-catalog-realm-identifiers-test-DKEq6Zcq.js +0 -49
  614. package/bundled-test-harness/assets/get-default-writable-realm-test-Dp4nBIRP.js +0 -56
  615. package/bundled-test-harness/assets/get-realm-of-resource-identifier-test-DYNnMgD-.js +0 -55
  616. package/bundled-test-harness/assets/get-relationship-membership-state-test-k9EUNWeq.js +0 -1306
  617. package/bundled-test-harness/assets/get-type-refs-from-filter-test-BPuivF-v.js +0 -136
  618. package/bundled-test-harness/assets/get-user-system-card-test-DSHv00O7.js +0 -52
  619. package/bundled-test-harness/assets/gif-image-def-test-LuDSr5Kz.js +0 -161
  620. package/bundled-test-harness/assets/gitGraph-WXDBUCRP-BrG_LYEh.js +0 -3
  621. package/bundled-test-harness/assets/gitGraphDiagram-PVQCEYII-QJjQcX4J.js +0 -1150
  622. package/bundled-test-harness/assets/gts-file-def-test-bS3ML062.js +0 -99
  623. package/bundled-test-harness/assets/head-format-preview-test-B8IPh71E.js +0 -156
  624. package/bundled-test-harness/assets/helpers-wSIq-bau.js +0 -5
  625. package/bundled-test-harness/assets/host-mode-test-D44nXoQZ.js +0 -391
  626. package/bundled-test-harness/assets/host-submode-test-CefkXg9F.js +0 -904
  627. package/bundled-test-harness/assets/index-query-engine-test-DJnDqmfK.js +0 -2548
  628. package/bundled-test-harness/assets/index-writer-test-BcrCMj37.js +0 -1842
  629. package/bundled-test-harness/assets/indexeddb-crypto-store-RTTNdynf.js +0 -49434
  630. package/bundled-test-harness/assets/info-J43DQDTF-DhDzvz9k.js +0 -3
  631. package/bundled-test-harness/assets/infoDiagram-5YYISTIA-8TmRFIRz.js +0 -23
  632. package/bundled-test-harness/assets/inspector-test-D4iMBlbL.js +0 -1776
  633. package/bundled-test-harness/assets/instance-filter-matcher-test-CYT6N3hN.js +0 -564
  634. package/bundled-test-harness/assets/instantiate-card-test-j1JS5lDe.js +0 -104
  635. package/bundled-test-harness/assets/interact-submode-creation-and-permissions-test-B-aXzOh6.js +0 -497
  636. package/bundled-test-harness/assets/interact-submode-setup-VMwOUl3u.js +0 -558
  637. package/bundled-test-harness/assets/interact-submode-test-D5lNNXdq.js +0 -725
  638. package/bundled-test-harness/assets/invalidate-realm-identifiers-test-71Ze8eGV.js +0 -101
  639. package/bundled-test-harness/assets/invite-user-to-room-test-UfjsvwVp.js +0 -67
  640. package/bundled-test-harness/assets/ishikawaDiagram-YF4QCWOH-7UALIGwM.js +0 -1009
  641. package/bundled-test-harness/assets/isolated-render-test-C2IL-Fz3.js +0 -51
  642. package/bundled-test-harness/assets/item-button-6g7XYj56.js +0 -203
  643. package/bundled-test-harness/assets/javascript-BwLQ7_Nc.js +0 -75
  644. package/bundled-test-harness/assets/job-priority-header-test-C3FfKLPP.js +0 -81
  645. package/bundled-test-harness/assets/journeyDiagram-JHISSGLW-t4gEZYup.js +0 -1256
  646. package/bundled-test-harness/assets/jpg-image-def-test-BTBk9lk5.js +0 -430
  647. package/bundled-test-harness/assets/json-file-def-test-BpU_Eidn.js +0 -92
  648. package/bundled-test-harness/assets/kanban-definition-UN3LZRKU-C_KHB3_r.js +0 -1284
  649. package/bundled-test-harness/assets/last-modified-date-test-fE7IP0q0.js +0 -18
  650. package/bundled-test-harness/assets/limited-set-test-uu2vX1Sv.js +0 -123
  651. package/bundled-test-harness/assets/line-BiZHXOjs.js +0 -55
  652. package/bundled-test-harness/assets/linear-DUaMMmmA.js +0 -417
  653. package/bundled-test-harness/assets/linksto-broken-link-placeholder-test-qZeqQ1gt.js +0 -315
  654. package/bundled-test-harness/assets/linksto-error-sentinel-test-BaV3I8Xx.js +0 -236
  655. package/bundled-test-harness/assets/linksto-many-broken-link-placeholder-test-BvJi1vCb.js +0 -303
  656. package/bundled-test-harness/assets/linksto-many-per-slot-access-test-CK60Cugk.js +0 -301
  657. package/bundled-test-harness/assets/linksto-sentinel-roundtrip-test-BWxdEO9D.js +0 -258
  658. package/bundled-test-harness/assets/linksto-singular-js-access-contract-test-CIsLhqR2.js +0 -194
  659. package/bundled-test-harness/assets/live-prerendered-search-jZe3I16p.js +0 -639
  660. package/bundled-test-harness/assets/live-test-CF_R5WGr.js +0 -2
  661. package/bundled-test-harness/assets/live-test-jO7lXuyB.js +0 -100
  662. package/bundled-test-harness/assets/loader-icon-error-test-N4JYZuTx.js +0 -62
  663. package/bundled-test-harness/assets/loader-parallel-prefetch-test-DteeG7mU.js +0 -257
  664. package/bundled-test-harness/assets/loader-retry-test-DYVgpS_I.js +0 -173
  665. package/bundled-test-harness/assets/loader-test-DLI8JIx-.js +0 -245
  666. package/bundled-test-harness/assets/loading-test-D4ZBtRYf.js +0 -63
  667. package/bundled-test-harness/assets/login-error-text-test-Dcq7q3EY.js +0 -51
  668. package/bundled-test-harness/assets/m4a-audio-def-test-BKqGO-CW.js +0 -185
  669. package/bundled-test-harness/assets/main-BjBdsiQT.js +0 -5
  670. package/bundled-test-harness/assets/markdown-fallback-test-BBj80dZZ.js +0 -316
  671. package/bundled-test-harness/assets/markdown-file-def-test-BnMF5rQF.js +0 -286
  672. package/bundled-test-harness/assets/markdown-helpers-test-DnuuSLfS.js +0 -183
  673. package/bundled-test-harness/assets/markdown-highlighting-test-CWRp2Rce.js +0 -244
  674. package/bundled-test-harness/assets/markdown-preview-test-Bf5OqKGf.js +0 -237
  675. package/bundled-test-harness/assets/markdown-preview-yYHtwNeI.js +0 -69
  676. package/bundled-test-harness/assets/marked-sync-2EfimW4i.js +0 -2
  677. package/bundled-test-harness/assets/marked-sync-DZOVFLjK.js +0 -2561
  678. package/bundled-test-harness/assets/marked-sync-test-BaaYbZNF.js +0 -146
  679. package/bundled-test-harness/assets/matrix-service-sliding-sync-test-CdEy3ASW.js +0 -33
  680. package/bundled-test-harness/assets/mermaid-parser.core-CKNAdXJW.js +0 -114
  681. package/bundled-test-harness/assets/mermaid.core-C0mfwy8A.js +0 -1700
  682. package/bundled-test-harness/assets/message-service-subscription-test-pGz_7rz3.js +0 -113
  683. package/bundled-test-harness/assets/mindmap-definition-RKZ34NQL-ClcHxkdY.js +0 -1347
  684. package/bundled-test-harness/assets/mock-matrix-D7JHfFtT.js +0 -2
  685. package/bundled-test-harness/assets/mock-matrix-DqDbNhEj.js +0 -14292
  686. package/bundled-test-harness/assets/module-transpile-cache-test-D0M-fPxs.js +0 -66
  687. package/bundled-test-harness/assets/monaco.contribution-BEs3qwfd.js +0 -103
  688. package/bundled-test-harness/assets/monaco.contribution-Dpx8UiPl.js +0 -2
  689. package/bundled-test-harness/assets/monaco.contribution-RF_qxJYG.js +0 -2
  690. package/bundled-test-harness/assets/monaco.contribution-jPVrF29f.js +0 -243
  691. package/bundled-test-harness/assets/mp3-audio-def-test-CxeRk1bl.js +0 -129
  692. package/bundled-test-harness/assets/mutex-test-D1xyxTj2.js +0 -71
  693. package/bundled-test-harness/assets/number-field-test-gjAGDy6P.js +0 -153
  694. package/bundled-test-harness/assets/ogg-audio-def-test-B6Ww3Ixr.js +0 -191
  695. package/bundled-test-harness/assets/open-create-listing-modal-test-uN58T3rI.js +0 -117
  696. package/bundled-test-harness/assets/open-workspace-test-DXVsvBFJ.js +0 -48
  697. package/bundled-test-harness/assets/operator-mode-acceptance-test-BxIq2xSS.js +0 -1044
  698. package/bundled-test-harness/assets/operator-mode-card-catalog-test-xFYx9_ng.js +0 -989
  699. package/bundled-test-harness/assets/operator-mode-links-test-qhXWmz-S.js +0 -797
  700. package/bundled-test-harness/assets/operator-mode-state-service-test-BdA_uvaY.js +0 -122
  701. package/bundled-test-harness/assets/operator-mode-test-D3EyTwq3.js +0 -617
  702. package/bundled-test-harness/assets/operator-mode-ui-test-CSrk6Q0A.js +0 -985
  703. package/bundled-test-harness/assets/ordinal-DO1mUmjg.js +0 -85
  704. package/bundled-test-harness/assets/overlay-menu-items-test-CuqqLsQT.js +0 -316
  705. package/bundled-test-harness/assets/packet-YPE3B663--JkMNy78.js +0 -3
  706. package/bundled-test-harness/assets/panel-C2rtbx32.js +0 -3371
  707. package/bundled-test-harness/assets/past-sessions-test-B9SCbbXz.js +0 -316
  708. package/bundled-test-harness/assets/patch-code-test-CcFr9pDb.js +0 -203
  709. package/bundled-test-harness/assets/patch-fields-test-BW1gzcJM.js +0 -992
  710. package/bundled-test-harness/assets/patch-instance-test-DKqA9gQ6.js +0 -287
  711. package/bundled-test-harness/assets/persist-module-inspector-view-test-D1eKBUkt.js +0 -62
  712. package/bundled-test-harness/assets/phone-number-field-test-D1is5RWv.js +0 -72
  713. package/bundled-test-harness/assets/pie-LRSECV5Y-BDVv8Wdy.js +0 -3
  714. package/bundled-test-harness/assets/pieDiagram-4H26LBE5-CSYI-nMz.js +0 -253
  715. package/bundled-test-harness/assets/plan-install-test-DB-PrjPR.js +0 -417
  716. package/bundled-test-harness/assets/playground-B0iQV7dU.js +0 -57
  717. package/bundled-test-harness/assets/png-image-def-test-DnOsJGs6.js +0 -222
  718. package/bundled-test-harness/assets/prerender-file-extract-test-DhOLozj2.js +0 -176
  719. package/bundled-test-harness/assets/prerender-html-test-DKVhQZA9.js +0 -615
  720. package/bundled-test-harness/assets/prerender-meta-test-CnRNyqSz.js +0 -388
  721. package/bundled-test-harness/assets/prerender-module-test-D163QcrZ.js +0 -195
  722. package/bundled-test-harness/assets/prerendered-card-search-test-DX-8yabJ.js +0 -708
  723. package/bundled-test-harness/assets/preview-format-test-H7bnpdlC.js +0 -103
  724. package/bundled-test-harness/assets/preview-test-B7u6uWJR.js +0 -455
  725. package/bundled-test-harness/assets/qs-test-COb0mre6.js +0 -36
  726. package/bundled-test-harness/assets/quadrantDiagram-W4KKPZXB-2Y2ben29.js +0 -2324
  727. package/bundled-test-harness/assets/query-field-barrier-test-Cypj-MhK.js +0 -118
  728. package/bundled-test-harness/assets/query-field-error-sentinel-test-Dnqn8TdN.js +0 -202
  729. package/bundled-test-harness/assets/query-field-normalization-test-B7D8SHBP.js +0 -271
  730. package/bundled-test-harness/assets/query-field-schema-test-DIYY3-c8.js +0 -231
  731. package/bundled-test-harness/assets/query-fields-test-k-VBF9PE.js +0 -535
  732. package/bundled-test-harness/assets/queue-test-B_74vXZE.js +0 -216
  733. package/bundled-test-harness/assets/radar-GUYGQ44K-Cn2A0VBR.js +0 -3
  734. package/bundled-test-harness/assets/read-card-for-ai-assistant-test-SyL9F_La.js +0 -91
  735. package/bundled-test-harness/assets/read-file-for-ai-assistant-test-nLPp49U2.js +0 -45
  736. package/bundled-test-harness/assets/read-source-test-DBELJkhN.js +0 -67
  737. package/bundled-test-harness/assets/read-text-file-test-CP1JuWlX.js +0 -124
  738. package/bundled-test-harness/assets/realm-Dr4iygv_.js +0 -884
  739. package/bundled-test-harness/assets/realm-field-test-Cice2mYk.js +0 -101
  740. package/bundled-test-harness/assets/realm-index-card-id-test-BzpozdWc.js +0 -18
  741. package/bundled-test-harness/assets/realm-indexing-test-C0YSXziR.js +0 -4018
  742. package/bundled-test-harness/assets/realm-paths-test-DV_g07rF.js +0 -33
  743. package/bundled-test-harness/assets/realm-querying-test-B526abM0.js +0 -1062
  744. package/bundled-test-harness/assets/realm-test-D8UN5X-w.js +0 -2409
  745. package/bundled-test-harness/assets/reasoning-test-ClIOvdkX.js +0 -234
  746. package/bundled-test-harness/assets/recent-files-test-C2J_dJUD.js +0 -449
  747. package/bundled-test-harness/assets/reindex-realm-test-DMphy1g6.js +0 -119
  748. package/bundled-test-harness/assets/relationship-loading-state-test-BWrZdLlZ.js +0 -289
  749. package/bundled-test-harness/assets/render-component-BII_KnyK.js +0 -2
  750. package/bundled-test-harness/assets/render-error-test-BUAJJlUi.js +0 -22
  751. package/bundled-test-harness/assets/render-service-test-BKkCjErY.js +0 -87
  752. package/bundled-test-harness/assets/render-timer-stub-test-TUDMWJ8v.js +0 -84
  753. package/bundled-test-harness/assets/rendered-markdown-ColekGTF.js +0 -211
  754. package/bundled-test-harness/assets/rendered-markdown-test-B4CWIo02.js +0 -360
  755. package/bundled-test-harness/assets/requirementDiagram-4Y6WPE33-CTICatxk.js +0 -2550
  756. package/bundled-test-harness/assets/rich-markdown-field-test-B5u6D3Nk.js +0 -806
  757. package/bundled-test-harness/assets/room-message-test-0eJSqQfu.js +0 -171
  758. package/bundled-test-harness/assets/rust-crypto-B0m3j_yZ.js +0 -16141
  759. package/bundled-test-harness/assets/sanitize-module-list-test-rH6OqjKh.js +0 -68
  760. package/bundled-test-harness/assets/sankeyDiagram-5OEKKPKP-hBIg6-LP.js +0 -1357
  761. package/bundled-test-harness/assets/schema-editor-test-DH4MLFCD.js +0 -784
  762. package/bundled-test-harness/assets/schema-generation-test-BZMkX7VA.js +0 -28
  763. package/bundled-test-harness/assets/scrolling-test-CFTyLG8X.js +0 -292
  764. package/bundled-test-harness/assets/search-and-choose-test-CcbVyp4c.js +0 -156
  765. package/bundled-test-harness/assets/search-cache-key-test-BYt46iNT.js +0 -79
  766. package/bundled-test-harness/assets/search-command-test-BRIJPr54.js +0 -135
  767. package/bundled-test-harness/assets/search-correlation-id-test-B298Tfux.js +0 -101
  768. package/bundled-test-harness/assets/search-data-test-DHV2Fd4S.js +0 -243
  769. package/bundled-test-harness/assets/search-google-images-test-CNrazllP.js +0 -168
  770. package/bundled-test-harness/assets/search-in-flight-key-test-Dy3bU2c1.js +0 -79
  771. package/bundled-test-harness/assets/search-test-DL1-gD-G.js +0 -847
  772. package/bundled-test-harness/assets/send-ai-assistant-message-test-CyEkQ5pD.js +0 -52
  773. package/bundled-test-harness/assets/send-bot-trigger-event-test-CAsK28m-.js +0 -56
  774. package/bundled-test-harness/assets/send-request-via-proxy-test-DpMlRvPv.js +0 -333
  775. package/bundled-test-harness/assets/sending-test-BOeGYcTU.js +0 -317
  776. package/bundled-test-harness/assets/sequenceDiagram-3UESZ5HK-DQMiI040.js +0 -5551
  777. package/bundled-test-harness/assets/serialization-test-gY2QQVxS.js +0 -8283
  778. package/bundled-test-harness/assets/set-user-system-card-test-BE3y5GNK.js +0 -59
  779. package/bundled-test-harness/assets/setup-B8O9JQKq.js +0 -769
  780. package/bundled-test-harness/assets/setup-BMqGUBDK.js +0 -2
  781. package/bundled-test-harness/assets/show-card-test-BfJNnWMy.js +0 -362
  782. package/bundled-test-harness/assets/skills-test-CqhnZxBi.js +0 -568
  783. package/bundled-test-harness/assets/spec-test-BUKNn_1q.js +0 -1012
  784. package/bundled-test-harness/assets/stateDiagram-AJRCARHV-BoOij2yt.js +0 -363
  785. package/bundled-test-harness/assets/stateDiagram-v2-BHNVJYJU-Dosil5p2.js +0 -29
  786. package/bundled-test-harness/assets/store-add-test-BR1M-IDR.js +0 -52
  787. package/bundled-test-harness/assets/store-test-DaqI-HRh.js +0 -1562
  788. package/bundled-test-harness/assets/summarize-session-test-BMg54JGF.js +0 -169
  789. package/bundled-test-harness/assets/svg-image-def-test-xNyIKRPV.js +0 -164
  790. package/bundled-test-harness/assets/switch-submode-test-BKvpODUD.js +0 -168
  791. package/bundled-test-harness/assets/test-realm-service-worker-DK4SmTM5.js +0 -73
  792. package/bundled-test-harness/assets/tests-x4_eRjiT.js +0 -2770
  793. package/bundled-test-harness/assets/text-file-def-test-CsXiyVfI.js +0 -93
  794. package/bundled-test-harness/assets/text-input-validator-test-D4s_laO7.js +0 -155
  795. package/bundled-test-harness/assets/text-suggestion-test-CkLf1xuS.js +0 -339
  796. package/bundled-test-harness/assets/theme-card-test-D-6L6OfD.js +0 -573
  797. package/bundled-test-harness/assets/timeline-definition-PNZ67QCA-DD2d81uJ.js +0 -1545
  798. package/bundled-test-harness/assets/transform-cards-test-CRZF2gqZ.js +0 -341
  799. package/bundled-test-harness/assets/treeView-BLDUP644-CUm8wuM-.js +0 -3
  800. package/bundled-test-harness/assets/treemap-LRROVOQU-lbLrY2PE.js +0 -3
  801. package/bundled-test-harness/assets/ts-file-def-test-CDo6ojCf.js +0 -90
  802. package/bundled-test-harness/assets/tsMode-BPQoRibc.js +0 -968
  803. package/bundled-test-harness/assets/typescript-BaU6yDhK.js +0 -2
  804. package/bundled-test-harness/assets/update-room-skills-test-BnSgVFwT.js +0 -197
  805. package/bundled-test-harness/assets/url-test-CK-HB0qu.js +0 -103
  806. package/bundled-test-harness/assets/use-ai-assistant-test-BuJXEP8H.js +0 -330
  807. package/bundled-test-harness/assets/validate-realm-test-Cx7MOtS8.js +0 -53
  808. package/bundled-test-harness/assets/vennDiagram-CIIHVFJN-DtXtzGwZ.js +0 -2833
  809. package/bundled-test-harness/assets/wardley-L42UT6IY-D8aCp_Ox.js +0 -3
  810. package/bundled-test-harness/assets/wardleyDiagram-YWT4CUSO-D-73g3bB.js +0 -872
  811. package/bundled-test-harness/assets/wav-audio-def-test-DIo2GzQL.js +0 -155
  812. package/bundled-test-harness/assets/webp-image-def-test-BQsV0_De.js +0 -225
  813. package/bundled-test-harness/assets/workspace-chooser-delete-test-peDXmnQf.js +0 -189
  814. package/bundled-test-harness/assets/workspace-chooser-test-DS2RtTEF.js +0 -235
  815. package/bundled-test-harness/assets/workspace-delete-multiple-test-DTbjRSzN.js +0 -213
  816. package/bundled-test-harness/assets/workspace-delete-summary-test-B--ink4m.js +0 -63
  817. package/bundled-test-harness/assets/write-binary-file-test-A3TQ5lFn.js +0 -100
  818. package/bundled-test-harness/assets/write-text-file-test-D_rjNDsT.js +0 -172
  819. package/bundled-test-harness/assets/xychartDiagram-2RQKCTM6-D1aoqDp-.js +0 -2551
  820. /package/bundled-test-harness/assets/{abap-CLdVBGqB.js → abap-FZAuBTMl.js} +0 -0
  821. /package/bundled-test-harness/assets/{apex-DV8eHjgQ.js → apex-CAO3qFTc.js} +0 -0
  822. /package/bundled-test-harness/assets/{array-DsDWWqmW.js → array-CRfHnEm4.js} +0 -0
  823. /package/bundled-test-harness/assets/{azcli-C4pZYsiJ.js → azcli-Bnu7jG0Y.js} +0 -0
  824. /package/bundled-test-harness/assets/{bat-DBoaeFpB.js → bat-DdE54Pqq.js} +0 -0
  825. /package/bundled-test-harness/assets/{bicep-VlrJhbeK.js → bicep-Dp4vFp3K.js} +0 -0
  826. /package/bundled-test-harness/assets/{cameligo-jyzrvLUm.js → cameligo-Cym4x98m.js} +0 -0
  827. /package/bundled-test-harness/assets/{chunk-NNHCCRGN-Be15HUz2.js → chunk-NNHCCRGN-PWOfDYpb.js} +0 -0
  828. /package/bundled-test-harness/assets/{clojure-bzahmEtz.js → clojure-B47IJ25u.js} +0 -0
  829. /package/bundled-test-harness/assets/{codemirror-context-BauLYUNt.js → codemirror-context-oJy03XqC.js} +0 -0
  830. /package/bundled-test-harness/assets/{coffee-CMADdzOH.js → coffee-CZlkBXT8.js} +0 -0
  831. /package/bundled-test-harness/assets/{cpp-CEJwzcLE.js → cpp-mX4KaA7p.js} +0 -0
  832. /package/bundled-test-harness/assets/{csharp-XYqm0UE0.js → csharp-C-OeDGwk.js} +0 -0
  833. /package/bundled-test-harness/assets/{csp-82fNWQc2.js → csp-AS2OEE8R.js} +0 -0
  834. /package/bundled-test-harness/assets/{css-B5b0ooFS.js → css-C-TQxhWe.js} +0 -0
  835. /package/bundled-test-harness/assets/{cssMode-DTKuqAkO.js → cssMode-C87GnEsk.js} +0 -0
  836. /package/bundled-test-harness/assets/{cypher-Df9GkdDY.js → cypher-T6F_0eIM.js} +0 -0
  837. /package/bundled-test-harness/assets/{cytoscape.esm-D0iwZ9Jj.js → cytoscape.esm-Bc2V-MhP.js} +0 -0
  838. /package/bundled-test-harness/assets/{dart-C4JY9dMc.js → dart-DzVesk0n.js} +0 -0
  839. /package/bundled-test-harness/assets/{defaultLocale-BtLxQtxy.js → defaultLocale-CAoL4lzt.js} +0 -0
  840. /package/bundled-test-harness/assets/{dist-D-PuK2H3.js → dist-BZ5MfZEJ.js} +0 -0
  841. /package/bundled-test-harness/assets/{dockerfile-Ck0tNttO.js → dockerfile-BH0_bQxC.js} +0 -0
  842. /package/bundled-test-harness/assets/{ecl-BpeXqJR_.js → ecl-KIxjxrJo.js} +0 -0
  843. /package/bundled-test-harness/assets/{elixir-HmBzrXaX.js → elixir-CPPdtCW1.js} +0 -0
  844. /package/bundled-test-harness/assets/{flow9-DhsfsDhH.js → flow9-Dxho7Ldf.js} +0 -0
  845. /package/bundled-test-harness/assets/{freemarker2-D3Yd6nGl.js → freemarker2-DP1aOr3_.js} +0 -0
  846. /package/bundled-test-harness/assets/{fsharp-D56OprHc.js → fsharp-ozN53Joe.js} +0 -0
  847. /package/bundled-test-harness/assets/{go-BITsFLfX.js → go-DPj6Rbqe.js} +0 -0
  848. /package/bundled-test-harness/assets/{graphlib-qkaQhadO.js → graphlib-DOITgaas.js} +0 -0
  849. /package/bundled-test-harness/assets/{graphql-CJJVsEX1.js → graphql-C8_-AnBG.js} +0 -0
  850. /package/bundled-test-harness/assets/{handlebars-Dvw6QbL7.js → handlebars-B2gYBZpU.js} +0 -0
  851. /package/bundled-test-harness/assets/{hcl-DSTZcJuq.js → hcl-r3d7BhXB.js} +0 -0
  852. /package/bundled-test-harness/assets/{helpers-D_JZYUOQ.js → helpers-CItTycq2.js} +0 -0
  853. /package/bundled-test-harness/assets/{html-Bik3qLmc.js → html-DhN1Nxr0.js} +0 -0
  854. /package/bundled-test-harness/assets/{htmlMode-DPCaR3Ab.js → htmlMode-BnBg5hCh.js} +0 -0
  855. /package/bundled-test-harness/assets/{ini-li-kC8ZU.js → ini-CzzRigmS.js} +0 -0
  856. /package/bundled-test-harness/assets/{init-Bq7IGMcH.js → init-Bd2YUhsG.js} +0 -0
  857. /package/bundled-test-harness/assets/{java-CETpuNN7.js → java-BgeDsIoV.js} +0 -0
  858. /package/bundled-test-harness/assets/{jsonMode-CZ3hOG-W.js → jsonMode-sRb0gsB8.js} +0 -0
  859. /package/bundled-test-harness/assets/{julia-hgihs1aN.js → julia-u3K1H5Ts.js} +0 -0
  860. /package/bundled-test-harness/assets/{katex-DqhsSYO4.js → katex-CHY7BUZt.js} +0 -0
  861. /package/bundled-test-harness/assets/{kotlin-CKfyb82K.js → kotlin-DfqmlJ10.js} +0 -0
  862. /package/bundled-test-harness/assets/{less-xB5yXbw8.js → less-CSzH7DPY.js} +0 -0
  863. /package/bundled-test-harness/assets/{lexon-BLwrXVrI.js → lexon-DwPTpxXt.js} +0 -0
  864. /package/bundled-test-harness/assets/{liquid-Bf2lpknJ.js → liquid-95J9g5Vk.js} +0 -0
  865. /package/bundled-test-harness/assets/{lua-Ch5i3IrF.js → lua-CGw6zbeh.js} +0 -0
  866. /package/bundled-test-harness/assets/{m3-D5tNlhaF.js → m3-BfgwloGF.js} +0 -0
  867. /package/bundled-test-harness/assets/{markdown-Dzc9uMky.js → markdown-RZRK7Mc9.js} +0 -0
  868. /package/bundled-test-harness/assets/{mdx-xsI4TJrf.js → mdx-BYD-W2sn.js} +0 -0
  869. /package/bundled-test-harness/assets/{mips-CmdzHkQm.js → mips-DAySN5Lp.js} +0 -0
  870. /package/bundled-test-harness/assets/{msdax-CAZvxB9E.js → msdax-Cy0COjTJ.js} +0 -0
  871. /package/bundled-test-harness/assets/{mysql-CyVS-z5H.js → mysql-CfGw9jyw.js} +0 -0
  872. /package/bundled-test-harness/assets/{objective-c-CCG8cTc_.js → objective-c-B4uU-8T-.js} +0 -0
  873. /package/bundled-test-harness/assets/{pascal-c8B45FOC.js → pascal-CGDuZzXi.js} +0 -0
  874. /package/bundled-test-harness/assets/{pascaligo-CCqwSqBv.js → pascaligo-eg02k4VJ.js} +0 -0
  875. /package/bundled-test-harness/assets/{path-CsS38UoK.js → path-Dxiz9G2t.js} +0 -0
  876. /package/bundled-test-harness/assets/{perl-JUICYbO2.js → perl-BiT-JJJw.js} +0 -0
  877. /package/bundled-test-harness/assets/{pgsql-aNRiL0Cg.js → pgsql-DAMjrVBF.js} +0 -0
  878. /package/bundled-test-harness/assets/{php-B0YZj_Vw.js → php-kOSUYQyc.js} +0 -0
  879. /package/bundled-test-harness/assets/{pla-D3Zb3KCn.js → pla-BShYV-HC.js} +0 -0
  880. /package/bundled-test-harness/assets/{postiats-ks1KABlA.js → postiats-9Xamd4W2.js} +0 -0
  881. /package/bundled-test-harness/assets/{powerquery-D35K_osc.js → powerquery-l2Nw525Q.js} +0 -0
  882. /package/bundled-test-harness/assets/{powershell-DXQo6KTk.js → powershell-B5rdEn86.js} +0 -0
  883. /package/bundled-test-harness/assets/{protobuf-CFDvn49_.js → protobuf-DjFcruCV.js} +0 -0
  884. /package/bundled-test-harness/assets/{pug-CGdWzJm1.js → pug-d79Nz4-Z.js} +0 -0
  885. /package/bundled-test-harness/assets/{python-BHLYjYlP.js → python-d8oxFZIM.js} +0 -0
  886. /package/bundled-test-harness/assets/{qsharp-BIq3i63T.js → qsharp-CeTlfxZW.js} +0 -0
  887. /package/bundled-test-harness/assets/{qunit-2hoQyeAZ.js → qunit-Cqwmt9Vl.js} +0 -0
  888. /package/bundled-test-harness/assets/{r-CBvzvDSA.js → r-BOu7JTro.js} +0 -0
  889. /package/bundled-test-harness/assets/{razor-JQ0RiIvo.js → razor-ZatoG_Is.js} +0 -0
  890. /package/bundled-test-harness/assets/{recent-files-cards-BQMviQb1.js → recent-files-cards-C3vIjaKb.js} +0 -0
  891. /package/bundled-test-harness/assets/{redis-BmSHTqTU.js → redis-DdXYPyQE.js} +0 -0
  892. /package/bundled-test-harness/assets/{redshift-B1NmQEH7.js → redshift-DswnW-YX.js} +0 -0
  893. /package/bundled-test-harness/assets/{render-component-g_fhz2dX.js → render-component-Bs21y6iv.js} +0 -0
  894. /package/bundled-test-harness/assets/{restructuredtext-Br9BtTbk.js → restructuredtext-C75vUmvX.js} +0 -0
  895. /package/bundled-test-harness/assets/{rough.esm-D8VnzNsL.js → rough.esm-B83ARgx6.js} +0 -0
  896. /package/bundled-test-harness/assets/{ruby-D9_-y1I3.js → ruby-D77950a-.js} +0 -0
  897. /package/bundled-test-harness/assets/{rust-1Jjr1EOs.js → rust-C_G4PKsG.js} +0 -0
  898. /package/bundled-test-harness/assets/{sb-X2JE4zEr.js → sb-Cz3P8_Gp.js} +0 -0
  899. /package/bundled-test-harness/assets/{scala-qFJERKkR.js → scala-DYqUg04P.js} +0 -0
  900. /package/bundled-test-harness/assets/{scheme-D-WJPStO.js → scheme-B31XEGu5.js} +0 -0
  901. /package/bundled-test-harness/assets/{scss-DysfZiXA.js → scss-CtvB8On5.js} +0 -0
  902. /package/bundled-test-harness/assets/{shell-C0Iu3NNJ.js → shell-C2QqpcPN.js} +0 -0
  903. /package/bundled-test-harness/assets/{solidity-Bato3Qrk.js → solidity-FHrhZFd-.js} +0 -0
  904. /package/bundled-test-harness/assets/{sophia-DI0cKdK8.js → sophia-Cxv5FOXb.js} +0 -0
  905. /package/bundled-test-harness/assets/{sparql-BTJMtwoD.js → sparql-CgGkGeQB.js} +0 -0
  906. /package/bundled-test-harness/assets/{sql-R6uHqFYU.js → sql-S6Dos2P0.js} +0 -0
  907. /package/bundled-test-harness/assets/{src-CdPyB7gY.js → src-CvuaVSsl.js} +0 -0
  908. /package/bundled-test-harness/assets/{st-CoyBvq37.js → st-Bfa7LAWp.js} +0 -0
  909. /package/bundled-test-harness/assets/{swift-Bj-haAlF.js → swift-BQD5Ef-A.js} +0 -0
  910. /package/bundled-test-harness/assets/{systemverilog-B-x1NEFI.js → systemverilog-DaNkPux4.js} +0 -0
  911. /package/bundled-test-harness/assets/{tcl-DAUdSQgz.js → tcl-gOPgCDyb.js} +0 -0
  912. /package/bundled-test-harness/assets/{test-support-BHjxBpDK.js → test-support-BEQX5x9U.js} +0 -0
  913. /package/bundled-test-harness/assets/{test-support-yKvYEh-u.js → test-support-BL4XKobD.js} +0 -0
  914. /package/bundled-test-harness/assets/{twig-B0sJ-GzS.js → twig-Bk4gPn5b.js} +0 -0
  915. /package/bundled-test-harness/assets/{typescript-DTMIM5Gl.js → typescript-pPYlxWzr.js} +0 -0
  916. /package/bundled-test-harness/assets/{typespec-6yo9VQxY.js → typespec-D9Zz743B.js} +0 -0
  917. /package/bundled-test-harness/assets/{vb-Bh2IfdtJ.js → vb-ziqHIsJV.js} +0 -0
  918. /package/bundled-test-harness/assets/{view-card-demo-U_AOj-RK.js → view-card-demo-CSIVYD3T.js} +0 -0
  919. /package/bundled-test-harness/assets/{wgsl-DsvJnCCt.js → wgsl-BXiwkiJL.js} +0 -0
  920. /package/bundled-test-harness/assets/{xml-CisPXcjD.js → xml-a_tUOik-.js} +0 -0
  921. /package/bundled-test-harness/assets/{yaml-DkHUoYI5.js → yaml-B3H8LDzK.js} +0 -0
@@ -0,0 +1,4355 @@
1
+ import "./chunk-CGdGNDIi.js";
2
+ import { g as log, h as __name$1, p as select_default } from "./src-CvuaVSsl.js";
3
+ import { O as getUrl, T as getEffectiveHtmlLabels, a as clear, b as getConfig, c as configureSvgSize, rt as rgba, s as common_default, x as getConfig2, z as sanitizeText } from "./chunk-CSCIHK7Q-D7nFiAZ-.js";
4
+ import { t as channel } from "./channel-BKUMepxs.js";
5
+ import { A as int32ArrayTag, B as uint32ArrayTag, C as arrayTag, D as float32ArrayTag, E as dateTag, F as regexpTag, H as uint8ClampedArrayTag, I as setTag, L as stringTag, M as mapTag, N as numberTag, O as float64ArrayTag, P as objectTag, R as symbolTag, S as arrayBufferTag, T as dataViewTag, U as getTag, V as uint8ArrayTag, W as isPrimitive, a as decodeEntities, et as basis_default, g as utils_default, j as int8ArrayTag, k as int16ArrayTag, l as getStylesFromArray, v as isTypedArray, w as booleanTag, x as argumentsTag, z as uint16ArrayTag } from "./chunk-5ZQYHXKU-BlVb7vgG.js";
6
+ import { t as line_default } from "./line-BbGOk93s.js";
7
+ import { n as createText } from "./chunk-O5CBEL6O-CZVSBsRq.js";
8
+ import { t as getIconStyles } from "./chunk-FMBD7UC4-O-Y8VK1S.js";
9
+ import { n as getLineFunctionsWithOffset, t as computeLabelTransform } from "./chunk-BSJP7CBP-Dgun5vYb.js";
10
+ import { n as getSubGraphTitleMargins, t as configureLabelImages } from "./chunk-L5ZTLDWV-C2lDtkix.js";
11
+ import { t as Graph } from "./graphlib-DOITgaas.js";
12
+ //#region ../../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/predicate/isArray.mjs
13
+ function isArray(value) {
14
+ return Array.isArray(value);
15
+ }
16
+ //#endregion
17
+ //#region ../../node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/object/clone.mjs
18
+ function clone(obj) {
19
+ if (isPrimitive(obj)) return obj;
20
+ const tag = getTag(obj);
21
+ if (!isCloneableObject(obj)) return {};
22
+ if (isArray(obj)) {
23
+ const result = Array.from(obj);
24
+ if (obj.length > 0 && typeof obj[0] === "string" && Object.hasOwn(obj, "index")) {
25
+ result.index = obj.index;
26
+ result.input = obj.input;
27
+ }
28
+ return result;
29
+ }
30
+ if (isTypedArray(obj)) {
31
+ const typedArray = obj;
32
+ const Ctor = typedArray.constructor;
33
+ return new Ctor(typedArray.buffer, typedArray.byteOffset, typedArray.length);
34
+ }
35
+ if (tag === "[object ArrayBuffer]") return new ArrayBuffer(obj.byteLength);
36
+ if (tag === "[object DataView]") {
37
+ const dataView = obj;
38
+ const buffer = dataView.buffer;
39
+ const byteOffset = dataView.byteOffset;
40
+ const byteLength = dataView.byteLength;
41
+ const clonedBuffer = new ArrayBuffer(byteLength);
42
+ const srcView = new Uint8Array(buffer, byteOffset, byteLength);
43
+ new Uint8Array(clonedBuffer).set(srcView);
44
+ return new DataView(clonedBuffer);
45
+ }
46
+ if (tag === "[object Boolean]" || tag === "[object Number]" || tag === "[object String]") {
47
+ const Ctor = obj.constructor;
48
+ const clone = new Ctor(obj.valueOf());
49
+ if (tag === "[object String]") cloneStringObjectProperties(clone, obj);
50
+ else copyOwnProperties(clone, obj);
51
+ return clone;
52
+ }
53
+ if (tag === "[object Date]") return new Date(Number(obj));
54
+ if (tag === "[object RegExp]") {
55
+ const regExp = obj;
56
+ const clone = new RegExp(regExp.source, regExp.flags);
57
+ clone.lastIndex = regExp.lastIndex;
58
+ return clone;
59
+ }
60
+ if (tag === "[object Symbol]") return Object(Symbol.prototype.valueOf.call(obj));
61
+ if (tag === "[object Map]") {
62
+ const map = obj;
63
+ const result = /* @__PURE__ */ new Map();
64
+ map.forEach((obj, key) => {
65
+ result.set(key, obj);
66
+ });
67
+ return result;
68
+ }
69
+ if (tag === "[object Set]") {
70
+ const set = obj;
71
+ const result = /* @__PURE__ */ new Set();
72
+ set.forEach((obj) => {
73
+ result.add(obj);
74
+ });
75
+ return result;
76
+ }
77
+ if (tag === "[object Arguments]") {
78
+ const args = obj;
79
+ const result = {};
80
+ copyOwnProperties(result, args);
81
+ result.length = args.length;
82
+ result[Symbol.iterator] = args[Symbol.iterator];
83
+ return result;
84
+ }
85
+ const result = {};
86
+ copyPrototype(result, obj);
87
+ copyOwnProperties(result, obj);
88
+ copySymbolProperties(result, obj);
89
+ return result;
90
+ }
91
+ function isCloneableObject(object) {
92
+ switch (getTag(object)) {
93
+ case argumentsTag:
94
+ case arrayTag:
95
+ case arrayBufferTag:
96
+ case dataViewTag:
97
+ case booleanTag:
98
+ case dateTag:
99
+ case float32ArrayTag:
100
+ case float64ArrayTag:
101
+ case int8ArrayTag:
102
+ case int16ArrayTag:
103
+ case int32ArrayTag:
104
+ case mapTag:
105
+ case numberTag:
106
+ case objectTag:
107
+ case regexpTag:
108
+ case setTag:
109
+ case stringTag:
110
+ case symbolTag:
111
+ case uint8ArrayTag:
112
+ case uint8ClampedArrayTag:
113
+ case uint16ArrayTag:
114
+ case uint32ArrayTag: return true;
115
+ default: return false;
116
+ }
117
+ }
118
+ function copyOwnProperties(target, source) {
119
+ for (const key in source) if (Object.hasOwn(source, key)) target[key] = source[key];
120
+ }
121
+ function copySymbolProperties(target, source) {
122
+ const symbols = Object.getOwnPropertySymbols(source);
123
+ for (let i = 0; i < symbols.length; i++) {
124
+ const symbol = symbols[i];
125
+ if (Object.prototype.propertyIsEnumerable.call(source, symbol)) target[symbol] = source[symbol];
126
+ }
127
+ }
128
+ function cloneStringObjectProperties(target, source) {
129
+ const stringLength = source.valueOf().length;
130
+ for (const key in source) if (Object.hasOwn(source, key) && (Number.isNaN(Number(key)) || Number(key) >= stringLength)) target[key] = source[key];
131
+ }
132
+ function copyPrototype(target, source) {
133
+ const proto = Object.getPrototypeOf(source);
134
+ if (proto !== null) {
135
+ if (typeof source.constructor === "function") Object.setPrototypeOf(target, proto);
136
+ }
137
+ }
138
+ //#endregion
139
+ //#region ../../node_modules/.pnpm/mermaid@11.15.0/node_modules/mermaid/dist/chunks/mermaid.core/blockDiagram-GPEHLZMM.mjs
140
+ var parser = function() {
141
+ var o = /* @__PURE__ */ __name$1(function(k, v, o2, l) {
142
+ for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v);
143
+ return o2;
144
+ }, "o");
145
+ var $V0 = [1, 15];
146
+ var $V1 = [1, 7];
147
+ var $V2 = [1, 13];
148
+ var $V3 = [1, 14];
149
+ var $V4 = [1, 19];
150
+ var $V5 = [1, 16];
151
+ var $V6 = [1, 17];
152
+ var $V7 = [1, 18];
153
+ var $V8 = [8, 30];
154
+ var $V9 = [
155
+ 8,
156
+ 10,
157
+ 21,
158
+ 28,
159
+ 29,
160
+ 30,
161
+ 31,
162
+ 39,
163
+ 43,
164
+ 46
165
+ ];
166
+ var $Va = [1, 23];
167
+ var $Vb = [1, 24];
168
+ var $Vc = [
169
+ 8,
170
+ 10,
171
+ 15,
172
+ 16,
173
+ 21,
174
+ 28,
175
+ 29,
176
+ 30,
177
+ 31,
178
+ 39,
179
+ 43,
180
+ 46
181
+ ];
182
+ var $Vd = [
183
+ 8,
184
+ 10,
185
+ 15,
186
+ 16,
187
+ 21,
188
+ 27,
189
+ 28,
190
+ 29,
191
+ 30,
192
+ 31,
193
+ 39,
194
+ 43,
195
+ 46
196
+ ];
197
+ var $Ve = [1, 49];
198
+ var parser2 = {
199
+ trace: /* @__PURE__ */ __name$1(function trace() {}, "trace"),
200
+ yy: {},
201
+ symbols_: {
202
+ "error": 2,
203
+ "spaceLines": 3,
204
+ "SPACELINE": 4,
205
+ "NL": 5,
206
+ "separator": 6,
207
+ "SPACE": 7,
208
+ "EOF": 8,
209
+ "start": 9,
210
+ "BLOCK_DIAGRAM_KEY": 10,
211
+ "document": 11,
212
+ "stop": 12,
213
+ "statement": 13,
214
+ "link": 14,
215
+ "LINK": 15,
216
+ "START_LINK": 16,
217
+ "LINK_LABEL": 17,
218
+ "STR": 18,
219
+ "nodeStatement": 19,
220
+ "columnsStatement": 20,
221
+ "SPACE_BLOCK": 21,
222
+ "blockStatement": 22,
223
+ "classDefStatement": 23,
224
+ "cssClassStatement": 24,
225
+ "styleStatement": 25,
226
+ "node": 26,
227
+ "SIZE": 27,
228
+ "COLUMNS": 28,
229
+ "id-block": 29,
230
+ "end": 30,
231
+ "NODE_ID": 31,
232
+ "nodeShapeNLabel": 32,
233
+ "dirList": 33,
234
+ "DIR": 34,
235
+ "NODE_DSTART": 35,
236
+ "NODE_DEND": 36,
237
+ "BLOCK_ARROW_START": 37,
238
+ "BLOCK_ARROW_END": 38,
239
+ "classDef": 39,
240
+ "CLASSDEF_ID": 40,
241
+ "CLASSDEF_STYLEOPTS": 41,
242
+ "DEFAULT": 42,
243
+ "class": 43,
244
+ "CLASSENTITY_IDS": 44,
245
+ "STYLECLASS": 45,
246
+ "style": 46,
247
+ "STYLE_ENTITY_IDS": 47,
248
+ "STYLE_DEFINITION_DATA": 48,
249
+ "$accept": 0,
250
+ "$end": 1
251
+ },
252
+ terminals_: {
253
+ 2: "error",
254
+ 4: "SPACELINE",
255
+ 5: "NL",
256
+ 7: "SPACE",
257
+ 8: "EOF",
258
+ 10: "BLOCK_DIAGRAM_KEY",
259
+ 15: "LINK",
260
+ 16: "START_LINK",
261
+ 17: "LINK_LABEL",
262
+ 18: "STR",
263
+ 21: "SPACE_BLOCK",
264
+ 27: "SIZE",
265
+ 28: "COLUMNS",
266
+ 29: "id-block",
267
+ 30: "end",
268
+ 31: "NODE_ID",
269
+ 34: "DIR",
270
+ 35: "NODE_DSTART",
271
+ 36: "NODE_DEND",
272
+ 37: "BLOCK_ARROW_START",
273
+ 38: "BLOCK_ARROW_END",
274
+ 39: "classDef",
275
+ 40: "CLASSDEF_ID",
276
+ 41: "CLASSDEF_STYLEOPTS",
277
+ 42: "DEFAULT",
278
+ 43: "class",
279
+ 44: "CLASSENTITY_IDS",
280
+ 45: "STYLECLASS",
281
+ 46: "style",
282
+ 47: "STYLE_ENTITY_IDS",
283
+ 48: "STYLE_DEFINITION_DATA"
284
+ },
285
+ productions_: [
286
+ 0,
287
+ [3, 1],
288
+ [3, 2],
289
+ [3, 2],
290
+ [6, 1],
291
+ [6, 1],
292
+ [6, 1],
293
+ [9, 3],
294
+ [12, 1],
295
+ [12, 1],
296
+ [12, 2],
297
+ [12, 2],
298
+ [11, 1],
299
+ [11, 2],
300
+ [14, 1],
301
+ [14, 4],
302
+ [13, 1],
303
+ [13, 1],
304
+ [13, 1],
305
+ [13, 1],
306
+ [13, 1],
307
+ [13, 1],
308
+ [13, 1],
309
+ [19, 3],
310
+ [19, 2],
311
+ [19, 1],
312
+ [20, 1],
313
+ [22, 4],
314
+ [22, 3],
315
+ [26, 1],
316
+ [26, 2],
317
+ [33, 1],
318
+ [33, 2],
319
+ [32, 3],
320
+ [32, 4],
321
+ [23, 3],
322
+ [23, 3],
323
+ [24, 3],
324
+ [25, 3]
325
+ ],
326
+ performAction: /* @__PURE__ */ __name$1(function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
327
+ var $0 = $$.length - 1;
328
+ switch (yystate) {
329
+ case 4:
330
+ yy.getLogger().debug("Rule: separator (NL) ");
331
+ break;
332
+ case 5:
333
+ yy.getLogger().debug("Rule: separator (Space) ");
334
+ break;
335
+ case 6:
336
+ yy.getLogger().debug("Rule: separator (EOF) ");
337
+ break;
338
+ case 7:
339
+ yy.getLogger().debug("Rule: hierarchy: ", $$[$0 - 1]);
340
+ yy.setHierarchy($$[$0 - 1]);
341
+ break;
342
+ case 8:
343
+ yy.getLogger().debug("Stop NL ");
344
+ break;
345
+ case 9:
346
+ yy.getLogger().debug("Stop EOF ");
347
+ break;
348
+ case 10:
349
+ yy.getLogger().debug("Stop NL2 ");
350
+ break;
351
+ case 11:
352
+ yy.getLogger().debug("Stop EOF2 ");
353
+ break;
354
+ case 12:
355
+ yy.getLogger().debug("Rule: statement: ", $$[$0]);
356
+ typeof $$[$0].length === "number" ? this.$ = $$[$0] : this.$ = [$$[$0]];
357
+ break;
358
+ case 13:
359
+ yy.getLogger().debug("Rule: statement #2: ", $$[$0 - 1]);
360
+ this.$ = [$$[$0 - 1]].concat($$[$0]);
361
+ break;
362
+ case 14:
363
+ yy.getLogger().debug("Rule: link: ", $$[$0], yytext);
364
+ this.$ = {
365
+ edgeTypeStr: $$[$0],
366
+ label: ""
367
+ };
368
+ break;
369
+ case 15:
370
+ yy.getLogger().debug("Rule: LABEL link: ", $$[$0 - 3], $$[$0 - 1], $$[$0]);
371
+ this.$ = {
372
+ edgeTypeStr: $$[$0],
373
+ label: $$[$0 - 1]
374
+ };
375
+ break;
376
+ case 18:
377
+ const num = parseInt($$[$0]);
378
+ const spaceId = yy.generateId();
379
+ this.$ = {
380
+ id: spaceId,
381
+ type: "space",
382
+ label: "",
383
+ width: num,
384
+ children: []
385
+ };
386
+ break;
387
+ case 23:
388
+ yy.getLogger().debug("Rule: (nodeStatement link node) ", $$[$0 - 2], $$[$0 - 1], $$[$0], " typestr: ", $$[$0 - 1].edgeTypeStr);
389
+ const edgeData = yy.edgeStrToEdgeData($$[$0 - 1].edgeTypeStr);
390
+ const startEdgeData = yy.edgeStrToEdgeStartData($$[$0 - 1].edgeTypeStr);
391
+ const lineThickness = yy.edgeStrToThickness($$[$0 - 1].edgeTypeStr);
392
+ const linePattern = yy.edgeStrToPattern($$[$0 - 1].edgeTypeStr);
393
+ this.$ = [
394
+ {
395
+ id: $$[$0 - 2].id,
396
+ label: $$[$0 - 2].label,
397
+ type: $$[$0 - 2].type,
398
+ directions: $$[$0 - 2].directions
399
+ },
400
+ {
401
+ id: $$[$0 - 2].id + "-" + $$[$0].id,
402
+ start: $$[$0 - 2].id,
403
+ end: $$[$0].id,
404
+ label: $$[$0 - 1].label,
405
+ type: "edge",
406
+ thickness: lineThickness,
407
+ pattern: linePattern,
408
+ directions: $$[$0].directions,
409
+ arrowTypeEnd: edgeData,
410
+ arrowTypeStart: startEdgeData
411
+ },
412
+ {
413
+ id: $$[$0].id,
414
+ label: $$[$0].label,
415
+ type: yy.typeStr2Type($$[$0].typeStr),
416
+ directions: $$[$0].directions
417
+ }
418
+ ];
419
+ break;
420
+ case 24:
421
+ yy.getLogger().debug("Rule: nodeStatement (abc88 node size) ", $$[$0 - 1], $$[$0]);
422
+ this.$ = {
423
+ id: $$[$0 - 1].id,
424
+ label: $$[$0 - 1].label,
425
+ type: yy.typeStr2Type($$[$0 - 1].typeStr),
426
+ directions: $$[$0 - 1].directions,
427
+ widthInColumns: parseInt($$[$0], 10)
428
+ };
429
+ break;
430
+ case 25:
431
+ yy.getLogger().debug("Rule: nodeStatement (node) ", $$[$0]);
432
+ this.$ = {
433
+ id: $$[$0].id,
434
+ label: $$[$0].label,
435
+ type: yy.typeStr2Type($$[$0].typeStr),
436
+ directions: $$[$0].directions,
437
+ widthInColumns: 1
438
+ };
439
+ break;
440
+ case 26:
441
+ yy.getLogger().debug("APA123", this ? this : "na");
442
+ yy.getLogger().debug("COLUMNS: ", $$[$0]);
443
+ this.$ = {
444
+ type: "column-setting",
445
+ columns: $$[$0] === "auto" ? -1 : parseInt($$[$0])
446
+ };
447
+ break;
448
+ case 27:
449
+ yy.getLogger().debug("Rule: id-block statement : ", $$[$0 - 2], $$[$0 - 1]);
450
+ yy.generateId();
451
+ this.$ = {
452
+ ...$$[$0 - 2],
453
+ type: "composite",
454
+ children: $$[$0 - 1]
455
+ };
456
+ break;
457
+ case 28:
458
+ yy.getLogger().debug("Rule: blockStatement : ", $$[$0 - 2], $$[$0 - 1], $$[$0]);
459
+ const id = yy.generateId();
460
+ this.$ = {
461
+ id,
462
+ type: "composite",
463
+ label: "",
464
+ children: $$[$0 - 1]
465
+ };
466
+ break;
467
+ case 29:
468
+ yy.getLogger().debug("Rule: node (NODE_ID separator): ", $$[$0]);
469
+ this.$ = { id: $$[$0] };
470
+ break;
471
+ case 30:
472
+ yy.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ", $$[$0 - 1], $$[$0]);
473
+ this.$ = {
474
+ id: $$[$0 - 1],
475
+ label: $$[$0].label,
476
+ typeStr: $$[$0].typeStr,
477
+ directions: $$[$0].directions
478
+ };
479
+ break;
480
+ case 31:
481
+ yy.getLogger().debug("Rule: dirList: ", $$[$0]);
482
+ this.$ = [$$[$0]];
483
+ break;
484
+ case 32:
485
+ yy.getLogger().debug("Rule: dirList: ", $$[$0 - 1], $$[$0]);
486
+ this.$ = [$$[$0 - 1]].concat($$[$0]);
487
+ break;
488
+ case 33:
489
+ yy.getLogger().debug("Rule: nodeShapeNLabel: ", $$[$0 - 2], $$[$0 - 1], $$[$0]);
490
+ this.$ = {
491
+ typeStr: $$[$0 - 2] + $$[$0],
492
+ label: $$[$0 - 1]
493
+ };
494
+ break;
495
+ case 34:
496
+ yy.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ", $$[$0 - 3], $$[$0 - 2], " #3:", $$[$0 - 1], $$[$0]);
497
+ this.$ = {
498
+ typeStr: $$[$0 - 3] + $$[$0],
499
+ label: $$[$0 - 2],
500
+ directions: $$[$0 - 1]
501
+ };
502
+ break;
503
+ case 35:
504
+ case 36:
505
+ this.$ = {
506
+ type: "classDef",
507
+ id: $$[$0 - 1].trim(),
508
+ css: $$[$0].trim()
509
+ };
510
+ break;
511
+ case 37:
512
+ this.$ = {
513
+ type: "applyClass",
514
+ id: $$[$0 - 1].trim(),
515
+ styleClass: $$[$0].trim()
516
+ };
517
+ break;
518
+ case 38:
519
+ this.$ = {
520
+ type: "applyStyles",
521
+ id: $$[$0 - 1].trim(),
522
+ stylesStr: $$[$0].trim()
523
+ };
524
+ break;
525
+ }
526
+ }, "anonymous"),
527
+ table: [
528
+ {
529
+ 9: 1,
530
+ 10: [1, 2]
531
+ },
532
+ { 1: [3] },
533
+ {
534
+ 10: $V0,
535
+ 11: 3,
536
+ 13: 4,
537
+ 19: 5,
538
+ 20: 6,
539
+ 21: $V1,
540
+ 22: 8,
541
+ 23: 9,
542
+ 24: 10,
543
+ 25: 11,
544
+ 26: 12,
545
+ 28: $V2,
546
+ 29: $V3,
547
+ 31: $V4,
548
+ 39: $V5,
549
+ 43: $V6,
550
+ 46: $V7
551
+ },
552
+ { 8: [1, 20] },
553
+ o($V8, [2, 12], {
554
+ 13: 4,
555
+ 19: 5,
556
+ 20: 6,
557
+ 22: 8,
558
+ 23: 9,
559
+ 24: 10,
560
+ 25: 11,
561
+ 26: 12,
562
+ 11: 21,
563
+ 10: $V0,
564
+ 21: $V1,
565
+ 28: $V2,
566
+ 29: $V3,
567
+ 31: $V4,
568
+ 39: $V5,
569
+ 43: $V6,
570
+ 46: $V7
571
+ }),
572
+ o($V9, [2, 16], {
573
+ 14: 22,
574
+ 15: $Va,
575
+ 16: $Vb
576
+ }),
577
+ o($V9, [2, 17]),
578
+ o($V9, [2, 18]),
579
+ o($V9, [2, 19]),
580
+ o($V9, [2, 20]),
581
+ o($V9, [2, 21]),
582
+ o($V9, [2, 22]),
583
+ o($Vc, [2, 25], { 27: [1, 25] }),
584
+ o($V9, [2, 26]),
585
+ {
586
+ 19: 26,
587
+ 26: 12,
588
+ 31: $V4
589
+ },
590
+ {
591
+ 10: $V0,
592
+ 11: 27,
593
+ 13: 4,
594
+ 19: 5,
595
+ 20: 6,
596
+ 21: $V1,
597
+ 22: 8,
598
+ 23: 9,
599
+ 24: 10,
600
+ 25: 11,
601
+ 26: 12,
602
+ 28: $V2,
603
+ 29: $V3,
604
+ 31: $V4,
605
+ 39: $V5,
606
+ 43: $V6,
607
+ 46: $V7
608
+ },
609
+ {
610
+ 40: [1, 28],
611
+ 42: [1, 29]
612
+ },
613
+ { 44: [1, 30] },
614
+ { 47: [1, 31] },
615
+ o($Vd, [2, 29], {
616
+ 32: 32,
617
+ 35: [1, 33],
618
+ 37: [1, 34]
619
+ }),
620
+ { 1: [2, 7] },
621
+ o($V8, [2, 13]),
622
+ {
623
+ 26: 35,
624
+ 31: $V4
625
+ },
626
+ { 31: [2, 14] },
627
+ { 17: [1, 36] },
628
+ o($Vc, [2, 24]),
629
+ {
630
+ 10: $V0,
631
+ 11: 37,
632
+ 13: 4,
633
+ 14: 22,
634
+ 15: $Va,
635
+ 16: $Vb,
636
+ 19: 5,
637
+ 20: 6,
638
+ 21: $V1,
639
+ 22: 8,
640
+ 23: 9,
641
+ 24: 10,
642
+ 25: 11,
643
+ 26: 12,
644
+ 28: $V2,
645
+ 29: $V3,
646
+ 31: $V4,
647
+ 39: $V5,
648
+ 43: $V6,
649
+ 46: $V7
650
+ },
651
+ { 30: [1, 38] },
652
+ { 41: [1, 39] },
653
+ { 41: [1, 40] },
654
+ { 45: [1, 41] },
655
+ { 48: [1, 42] },
656
+ o($Vd, [2, 30]),
657
+ { 18: [1, 43] },
658
+ { 18: [1, 44] },
659
+ o($Vc, [2, 23]),
660
+ { 18: [1, 45] },
661
+ { 30: [1, 46] },
662
+ o($V9, [2, 28]),
663
+ o($V9, [2, 35]),
664
+ o($V9, [2, 36]),
665
+ o($V9, [2, 37]),
666
+ o($V9, [2, 38]),
667
+ { 36: [1, 47] },
668
+ {
669
+ 33: 48,
670
+ 34: $Ve
671
+ },
672
+ { 15: [1, 50] },
673
+ o($V9, [2, 27]),
674
+ o($Vd, [2, 33]),
675
+ { 38: [1, 51] },
676
+ {
677
+ 33: 52,
678
+ 34: $Ve,
679
+ 38: [2, 31]
680
+ },
681
+ { 31: [2, 15] },
682
+ o($Vd, [2, 34]),
683
+ { 38: [2, 32] }
684
+ ],
685
+ defaultActions: {
686
+ 20: [2, 7],
687
+ 23: [2, 14],
688
+ 50: [2, 15],
689
+ 52: [2, 32]
690
+ },
691
+ parseError: /* @__PURE__ */ __name$1(function parseError(str, hash) {
692
+ if (hash.recoverable) this.trace(str);
693
+ else {
694
+ var error = new Error(str);
695
+ error.hash = hash;
696
+ throw error;
697
+ }
698
+ }, "parseError"),
699
+ parse: /* @__PURE__ */ __name$1(function parse(input) {
700
+ var self = this;
701
+ var stack = [0];
702
+ var tstack = [];
703
+ var vstack = [null];
704
+ var lstack = [];
705
+ var table = this.table;
706
+ var yytext = "";
707
+ var yylineno = 0;
708
+ var yyleng = 0;
709
+ var recovering = 0;
710
+ var TERROR = 2;
711
+ var EOF = 1;
712
+ var args = lstack.slice.call(arguments, 1);
713
+ var lexer2 = Object.create(this.lexer);
714
+ var sharedState = { yy: {} };
715
+ for (var k in this.yy) if (Object.prototype.hasOwnProperty.call(this.yy, k)) sharedState.yy[k] = this.yy[k];
716
+ lexer2.setInput(input, sharedState.yy);
717
+ sharedState.yy.lexer = lexer2;
718
+ sharedState.yy.parser = this;
719
+ if (typeof lexer2.yylloc == "undefined") lexer2.yylloc = {};
720
+ var yyloc = lexer2.yylloc;
721
+ lstack.push(yyloc);
722
+ var ranges = lexer2.options && lexer2.options.ranges;
723
+ if (typeof sharedState.yy.parseError === "function") this.parseError = sharedState.yy.parseError;
724
+ else this.parseError = Object.getPrototypeOf(this).parseError;
725
+ function popStack(n) {
726
+ stack.length = stack.length - 2 * n;
727
+ vstack.length = vstack.length - n;
728
+ lstack.length = lstack.length - n;
729
+ }
730
+ __name$1(popStack, "popStack");
731
+ function lex() {
732
+ var token = tstack.pop() || lexer2.lex() || EOF;
733
+ if (typeof token !== "number") {
734
+ if (token instanceof Array) {
735
+ tstack = token;
736
+ token = tstack.pop();
737
+ }
738
+ token = self.symbols_[token] || token;
739
+ }
740
+ return token;
741
+ }
742
+ __name$1(lex, "lex");
743
+ var symbol;
744
+ var preErrorSymbol;
745
+ var state;
746
+ var action;
747
+ var r;
748
+ var yyval = {};
749
+ var p;
750
+ var len;
751
+ var newState;
752
+ var expected;
753
+ while (true) {
754
+ state = stack[stack.length - 1];
755
+ if (this.defaultActions[state]) action = this.defaultActions[state];
756
+ else {
757
+ if (symbol === null || typeof symbol == "undefined") symbol = lex();
758
+ action = table[state] && table[state][symbol];
759
+ }
760
+ if (typeof action === "undefined" || !action.length || !action[0]) {
761
+ var errStr = "";
762
+ expected = [];
763
+ for (p in table[state]) if (this.terminals_[p] && p > TERROR) expected.push("'" + this.terminals_[p] + "'");
764
+ if (lexer2.showPosition) errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
765
+ else errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
766
+ this.parseError(errStr, {
767
+ text: lexer2.match,
768
+ token: this.terminals_[symbol] || symbol,
769
+ line: lexer2.yylineno,
770
+ loc: yyloc,
771
+ expected
772
+ });
773
+ }
774
+ if (action[0] instanceof Array && action.length > 1) throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
775
+ switch (action[0]) {
776
+ case 1:
777
+ stack.push(symbol);
778
+ vstack.push(lexer2.yytext);
779
+ lstack.push(lexer2.yylloc);
780
+ stack.push(action[1]);
781
+ symbol = null;
782
+ if (!preErrorSymbol) {
783
+ yyleng = lexer2.yyleng;
784
+ yytext = lexer2.yytext;
785
+ yylineno = lexer2.yylineno;
786
+ yyloc = lexer2.yylloc;
787
+ if (recovering > 0) recovering--;
788
+ } else {
789
+ symbol = preErrorSymbol;
790
+ preErrorSymbol = null;
791
+ }
792
+ break;
793
+ case 2:
794
+ len = this.productions_[action[1]][1];
795
+ yyval.$ = vstack[vstack.length - len];
796
+ yyval._$ = {
797
+ first_line: lstack[lstack.length - (len || 1)].first_line,
798
+ last_line: lstack[lstack.length - 1].last_line,
799
+ first_column: lstack[lstack.length - (len || 1)].first_column,
800
+ last_column: lstack[lstack.length - 1].last_column
801
+ };
802
+ if (ranges) yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];
803
+ r = this.performAction.apply(yyval, [
804
+ yytext,
805
+ yyleng,
806
+ yylineno,
807
+ sharedState.yy,
808
+ action[1],
809
+ vstack,
810
+ lstack
811
+ ].concat(args));
812
+ if (typeof r !== "undefined") return r;
813
+ if (len) {
814
+ stack = stack.slice(0, -1 * len * 2);
815
+ vstack = vstack.slice(0, -1 * len);
816
+ lstack = lstack.slice(0, -1 * len);
817
+ }
818
+ stack.push(this.productions_[action[1]][0]);
819
+ vstack.push(yyval.$);
820
+ lstack.push(yyval._$);
821
+ newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
822
+ stack.push(newState);
823
+ break;
824
+ case 3: return true;
825
+ }
826
+ }
827
+ return true;
828
+ }, "parse")
829
+ };
830
+ parser2.lexer = /* @__PURE__ */ function() {
831
+ return {
832
+ EOF: 1,
833
+ parseError: /* @__PURE__ */ __name$1(function parseError(str, hash) {
834
+ if (this.yy.parser) this.yy.parser.parseError(str, hash);
835
+ else throw new Error(str);
836
+ }, "parseError"),
837
+ setInput: /* @__PURE__ */ __name$1(function(input, yy) {
838
+ this.yy = yy || this.yy || {};
839
+ this._input = input;
840
+ this._more = this._backtrack = this.done = false;
841
+ this.yylineno = this.yyleng = 0;
842
+ this.yytext = this.matched = this.match = "";
843
+ this.conditionStack = ["INITIAL"];
844
+ this.yylloc = {
845
+ first_line: 1,
846
+ first_column: 0,
847
+ last_line: 1,
848
+ last_column: 0
849
+ };
850
+ if (this.options.ranges) this.yylloc.range = [0, 0];
851
+ this.offset = 0;
852
+ return this;
853
+ }, "setInput"),
854
+ input: /* @__PURE__ */ __name$1(function() {
855
+ var ch = this._input[0];
856
+ this.yytext += ch;
857
+ this.yyleng++;
858
+ this.offset++;
859
+ this.match += ch;
860
+ this.matched += ch;
861
+ if (ch.match(/(?:\r\n?|\n).*/g)) {
862
+ this.yylineno++;
863
+ this.yylloc.last_line++;
864
+ } else this.yylloc.last_column++;
865
+ if (this.options.ranges) this.yylloc.range[1]++;
866
+ this._input = this._input.slice(1);
867
+ return ch;
868
+ }, "input"),
869
+ unput: /* @__PURE__ */ __name$1(function(ch) {
870
+ var len = ch.length;
871
+ var lines = ch.split(/(?:\r\n?|\n)/g);
872
+ this._input = ch + this._input;
873
+ this.yytext = this.yytext.substr(0, this.yytext.length - len);
874
+ this.offset -= len;
875
+ var oldLines = this.match.split(/(?:\r\n?|\n)/g);
876
+ this.match = this.match.substr(0, this.match.length - 1);
877
+ this.matched = this.matched.substr(0, this.matched.length - 1);
878
+ if (lines.length - 1) this.yylineno -= lines.length - 1;
879
+ var r = this.yylloc.range;
880
+ this.yylloc = {
881
+ first_line: this.yylloc.first_line,
882
+ last_line: this.yylineno + 1,
883
+ first_column: this.yylloc.first_column,
884
+ last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
885
+ };
886
+ if (this.options.ranges) this.yylloc.range = [r[0], r[0] + this.yyleng - len];
887
+ this.yyleng = this.yytext.length;
888
+ return this;
889
+ }, "unput"),
890
+ more: /* @__PURE__ */ __name$1(function() {
891
+ this._more = true;
892
+ return this;
893
+ }, "more"),
894
+ reject: /* @__PURE__ */ __name$1(function() {
895
+ if (this.options.backtrack_lexer) this._backtrack = true;
896
+ else 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).\n" + this.showPosition(), {
897
+ text: "",
898
+ token: null,
899
+ line: this.yylineno
900
+ });
901
+ return this;
902
+ }, "reject"),
903
+ less: /* @__PURE__ */ __name$1(function(n) {
904
+ this.unput(this.match.slice(n));
905
+ }, "less"),
906
+ pastInput: /* @__PURE__ */ __name$1(function() {
907
+ var past = this.matched.substr(0, this.matched.length - this.match.length);
908
+ return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
909
+ }, "pastInput"),
910
+ upcomingInput: /* @__PURE__ */ __name$1(function() {
911
+ var next = this.match;
912
+ if (next.length < 20) next += this._input.substr(0, 20 - next.length);
913
+ return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
914
+ }, "upcomingInput"),
915
+ showPosition: /* @__PURE__ */ __name$1(function() {
916
+ var pre = this.pastInput();
917
+ var c = new Array(pre.length + 1).join("-");
918
+ return pre + this.upcomingInput() + "\n" + c + "^";
919
+ }, "showPosition"),
920
+ test_match: /* @__PURE__ */ __name$1(function(match, indexed_rule) {
921
+ var token;
922
+ var lines;
923
+ var backup;
924
+ if (this.options.backtrack_lexer) {
925
+ backup = {
926
+ yylineno: this.yylineno,
927
+ yylloc: {
928
+ first_line: this.yylloc.first_line,
929
+ last_line: this.last_line,
930
+ first_column: this.yylloc.first_column,
931
+ last_column: this.yylloc.last_column
932
+ },
933
+ yytext: this.yytext,
934
+ match: this.match,
935
+ matches: this.matches,
936
+ matched: this.matched,
937
+ yyleng: this.yyleng,
938
+ offset: this.offset,
939
+ _more: this._more,
940
+ _input: this._input,
941
+ yy: this.yy,
942
+ conditionStack: this.conditionStack.slice(0),
943
+ done: this.done
944
+ };
945
+ if (this.options.ranges) backup.yylloc.range = this.yylloc.range.slice(0);
946
+ }
947
+ lines = match[0].match(/(?:\r\n?|\n).*/g);
948
+ if (lines) this.yylineno += lines.length;
949
+ this.yylloc = {
950
+ first_line: this.yylloc.last_line,
951
+ last_line: this.yylineno + 1,
952
+ first_column: this.yylloc.last_column,
953
+ last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
954
+ };
955
+ this.yytext += match[0];
956
+ this.match += match[0];
957
+ this.matches = match;
958
+ this.yyleng = this.yytext.length;
959
+ if (this.options.ranges) this.yylloc.range = [this.offset, this.offset += this.yyleng];
960
+ this._more = false;
961
+ this._backtrack = false;
962
+ this._input = this._input.slice(match[0].length);
963
+ this.matched += match[0];
964
+ token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
965
+ if (this.done && this._input) this.done = false;
966
+ if (token) return token;
967
+ else if (this._backtrack) {
968
+ for (var k in backup) this[k] = backup[k];
969
+ return false;
970
+ }
971
+ return false;
972
+ }, "test_match"),
973
+ next: /* @__PURE__ */ __name$1(function() {
974
+ if (this.done) return this.EOF;
975
+ if (!this._input) this.done = true;
976
+ var token;
977
+ var match;
978
+ var tempMatch;
979
+ var index;
980
+ if (!this._more) {
981
+ this.yytext = "";
982
+ this.match = "";
983
+ }
984
+ var rules = this._currentRules();
985
+ for (var i = 0; i < rules.length; i++) {
986
+ tempMatch = this._input.match(this.rules[rules[i]]);
987
+ if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
988
+ match = tempMatch;
989
+ index = i;
990
+ if (this.options.backtrack_lexer) {
991
+ token = this.test_match(tempMatch, rules[i]);
992
+ if (token !== false) return token;
993
+ else if (this._backtrack) {
994
+ match = false;
995
+ continue;
996
+ } else return false;
997
+ } else if (!this.options.flex) break;
998
+ }
999
+ }
1000
+ if (match) {
1001
+ token = this.test_match(match, rules[index]);
1002
+ if (token !== false) return token;
1003
+ return false;
1004
+ }
1005
+ if (this._input === "") return this.EOF;
1006
+ else return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
1007
+ text: "",
1008
+ token: null,
1009
+ line: this.yylineno
1010
+ });
1011
+ }, "next"),
1012
+ lex: /* @__PURE__ */ __name$1(function lex() {
1013
+ var r = this.next();
1014
+ if (r) return r;
1015
+ else return this.lex();
1016
+ }, "lex"),
1017
+ begin: /* @__PURE__ */ __name$1(function begin(condition) {
1018
+ this.conditionStack.push(condition);
1019
+ }, "begin"),
1020
+ popState: /* @__PURE__ */ __name$1(function popState() {
1021
+ if (this.conditionStack.length - 1 > 0) return this.conditionStack.pop();
1022
+ else return this.conditionStack[0];
1023
+ }, "popState"),
1024
+ _currentRules: /* @__PURE__ */ __name$1(function _currentRules() {
1025
+ if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
1026
+ else return this.conditions["INITIAL"].rules;
1027
+ }, "_currentRules"),
1028
+ topState: /* @__PURE__ */ __name$1(function topState(n) {
1029
+ n = this.conditionStack.length - 1 - Math.abs(n || 0);
1030
+ if (n >= 0) return this.conditionStack[n];
1031
+ else return "INITIAL";
1032
+ }, "topState"),
1033
+ pushState: /* @__PURE__ */ __name$1(function pushState(condition) {
1034
+ this.begin(condition);
1035
+ }, "pushState"),
1036
+ stateStackSize: /* @__PURE__ */ __name$1(function stateStackSize() {
1037
+ return this.conditionStack.length;
1038
+ }, "stateStackSize"),
1039
+ options: {},
1040
+ performAction: /* @__PURE__ */ __name$1(function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
1041
+ switch ($avoiding_name_collisions) {
1042
+ case 0:
1043
+ yy.getLogger().debug("Found block-beta");
1044
+ return 10;
1045
+ case 1:
1046
+ yy.getLogger().debug("Found id-block");
1047
+ return 29;
1048
+ case 2:
1049
+ yy.getLogger().debug("Found block");
1050
+ return 10;
1051
+ case 3:
1052
+ yy.getLogger().debug(".", yy_.yytext);
1053
+ break;
1054
+ case 4:
1055
+ yy.getLogger().debug("_", yy_.yytext);
1056
+ break;
1057
+ case 5: return 5;
1058
+ case 6:
1059
+ yy_.yytext = -1;
1060
+ return 28;
1061
+ case 7:
1062
+ yy_.yytext = yy_.yytext.replace(/columns\s+/, "");
1063
+ yy.getLogger().debug("COLUMNS (LEX)", yy_.yytext);
1064
+ return 28;
1065
+ case 8:
1066
+ this.pushState("md_string");
1067
+ break;
1068
+ case 9: return "MD_STR";
1069
+ case 10:
1070
+ this.popState();
1071
+ break;
1072
+ case 11:
1073
+ this.pushState("string");
1074
+ break;
1075
+ case 12:
1076
+ yy.getLogger().debug("LEX: POPPING STR:", yy_.yytext);
1077
+ this.popState();
1078
+ break;
1079
+ case 13:
1080
+ yy.getLogger().debug("LEX: STR end:", yy_.yytext);
1081
+ return "STR";
1082
+ case 14:
1083
+ yy_.yytext = yy_.yytext.replace(/space\:/, "");
1084
+ yy.getLogger().debug("SPACE NUM (LEX)", yy_.yytext);
1085
+ return 21;
1086
+ case 15:
1087
+ yy_.yytext = "1";
1088
+ yy.getLogger().debug("COLUMNS (LEX)", yy_.yytext);
1089
+ return 21;
1090
+ case 16: return 42;
1091
+ case 17: return "LINKSTYLE";
1092
+ case 18: return "INTERPOLATE";
1093
+ case 19:
1094
+ this.pushState("CLASSDEF");
1095
+ return 39;
1096
+ case 20:
1097
+ this.popState();
1098
+ this.pushState("CLASSDEFID");
1099
+ return "DEFAULT_CLASSDEF_ID";
1100
+ case 21:
1101
+ this.popState();
1102
+ this.pushState("CLASSDEFID");
1103
+ return 40;
1104
+ case 22:
1105
+ this.popState();
1106
+ return 41;
1107
+ case 23:
1108
+ this.pushState("CLASS");
1109
+ return 43;
1110
+ case 24:
1111
+ this.popState();
1112
+ this.pushState("CLASS_STYLE");
1113
+ return 44;
1114
+ case 25:
1115
+ this.popState();
1116
+ return 45;
1117
+ case 26:
1118
+ this.pushState("STYLE_STMNT");
1119
+ return 46;
1120
+ case 27:
1121
+ this.popState();
1122
+ this.pushState("STYLE_DEFINITION");
1123
+ return 47;
1124
+ case 28:
1125
+ this.popState();
1126
+ return 48;
1127
+ case 29:
1128
+ this.pushState("acc_title");
1129
+ return "acc_title";
1130
+ case 30:
1131
+ this.popState();
1132
+ return "acc_title_value";
1133
+ case 31:
1134
+ this.pushState("acc_descr");
1135
+ return "acc_descr";
1136
+ case 32:
1137
+ this.popState();
1138
+ return "acc_descr_value";
1139
+ case 33:
1140
+ this.pushState("acc_descr_multiline");
1141
+ break;
1142
+ case 34:
1143
+ this.popState();
1144
+ break;
1145
+ case 35: return "acc_descr_multiline_value";
1146
+ case 36: return 30;
1147
+ case 37:
1148
+ this.popState();
1149
+ yy.getLogger().debug("Lex: ((");
1150
+ return "NODE_DEND";
1151
+ case 38:
1152
+ this.popState();
1153
+ yy.getLogger().debug("Lex: ((");
1154
+ return "NODE_DEND";
1155
+ case 39:
1156
+ this.popState();
1157
+ yy.getLogger().debug("Lex: ))");
1158
+ return "NODE_DEND";
1159
+ case 40:
1160
+ this.popState();
1161
+ yy.getLogger().debug("Lex: ((");
1162
+ return "NODE_DEND";
1163
+ case 41:
1164
+ this.popState();
1165
+ yy.getLogger().debug("Lex: ((");
1166
+ return "NODE_DEND";
1167
+ case 42:
1168
+ this.popState();
1169
+ yy.getLogger().debug("Lex: (-");
1170
+ return "NODE_DEND";
1171
+ case 43:
1172
+ this.popState();
1173
+ yy.getLogger().debug("Lex: -)");
1174
+ return "NODE_DEND";
1175
+ case 44:
1176
+ this.popState();
1177
+ yy.getLogger().debug("Lex: ((");
1178
+ return "NODE_DEND";
1179
+ case 45:
1180
+ this.popState();
1181
+ yy.getLogger().debug("Lex: ]]");
1182
+ return "NODE_DEND";
1183
+ case 46:
1184
+ this.popState();
1185
+ yy.getLogger().debug("Lex: (");
1186
+ return "NODE_DEND";
1187
+ case 47:
1188
+ this.popState();
1189
+ yy.getLogger().debug("Lex: ])");
1190
+ return "NODE_DEND";
1191
+ case 48:
1192
+ this.popState();
1193
+ yy.getLogger().debug("Lex: /]");
1194
+ return "NODE_DEND";
1195
+ case 49:
1196
+ this.popState();
1197
+ yy.getLogger().debug("Lex: /]");
1198
+ return "NODE_DEND";
1199
+ case 50:
1200
+ this.popState();
1201
+ yy.getLogger().debug("Lex: )]");
1202
+ return "NODE_DEND";
1203
+ case 51:
1204
+ this.popState();
1205
+ yy.getLogger().debug("Lex: )");
1206
+ return "NODE_DEND";
1207
+ case 52:
1208
+ this.popState();
1209
+ yy.getLogger().debug("Lex: ]>");
1210
+ return "NODE_DEND";
1211
+ case 53:
1212
+ this.popState();
1213
+ yy.getLogger().debug("Lex: ]");
1214
+ return "NODE_DEND";
1215
+ case 54:
1216
+ yy.getLogger().debug("Lexa: -)");
1217
+ this.pushState("NODE");
1218
+ return 35;
1219
+ case 55:
1220
+ yy.getLogger().debug("Lexa: (-");
1221
+ this.pushState("NODE");
1222
+ return 35;
1223
+ case 56:
1224
+ yy.getLogger().debug("Lexa: ))");
1225
+ this.pushState("NODE");
1226
+ return 35;
1227
+ case 57:
1228
+ yy.getLogger().debug("Lexa: )");
1229
+ this.pushState("NODE");
1230
+ return 35;
1231
+ case 58:
1232
+ yy.getLogger().debug("Lex: (((");
1233
+ this.pushState("NODE");
1234
+ return 35;
1235
+ case 59:
1236
+ yy.getLogger().debug("Lexa: )");
1237
+ this.pushState("NODE");
1238
+ return 35;
1239
+ case 60:
1240
+ yy.getLogger().debug("Lexa: )");
1241
+ this.pushState("NODE");
1242
+ return 35;
1243
+ case 61:
1244
+ yy.getLogger().debug("Lexa: )");
1245
+ this.pushState("NODE");
1246
+ return 35;
1247
+ case 62:
1248
+ yy.getLogger().debug("Lexc: >");
1249
+ this.pushState("NODE");
1250
+ return 35;
1251
+ case 63:
1252
+ yy.getLogger().debug("Lexa: ([");
1253
+ this.pushState("NODE");
1254
+ return 35;
1255
+ case 64:
1256
+ yy.getLogger().debug("Lexa: )");
1257
+ this.pushState("NODE");
1258
+ return 35;
1259
+ case 65:
1260
+ this.pushState("NODE");
1261
+ return 35;
1262
+ case 66:
1263
+ this.pushState("NODE");
1264
+ return 35;
1265
+ case 67:
1266
+ this.pushState("NODE");
1267
+ return 35;
1268
+ case 68:
1269
+ this.pushState("NODE");
1270
+ return 35;
1271
+ case 69:
1272
+ this.pushState("NODE");
1273
+ return 35;
1274
+ case 70:
1275
+ this.pushState("NODE");
1276
+ return 35;
1277
+ case 71:
1278
+ this.pushState("NODE");
1279
+ return 35;
1280
+ case 72:
1281
+ yy.getLogger().debug("Lexa: [");
1282
+ this.pushState("NODE");
1283
+ return 35;
1284
+ case 73:
1285
+ this.pushState("BLOCK_ARROW");
1286
+ yy.getLogger().debug("LEX ARR START");
1287
+ return 37;
1288
+ case 74:
1289
+ yy.getLogger().debug("Lex: NODE_ID", yy_.yytext);
1290
+ return 31;
1291
+ case 75:
1292
+ yy.getLogger().debug("Lex: EOF", yy_.yytext);
1293
+ return 8;
1294
+ case 76:
1295
+ this.pushState("md_string");
1296
+ break;
1297
+ case 77:
1298
+ this.pushState("md_string");
1299
+ break;
1300
+ case 78: return "NODE_DESCR";
1301
+ case 79:
1302
+ this.popState();
1303
+ break;
1304
+ case 80:
1305
+ yy.getLogger().debug("Lex: Starting string");
1306
+ this.pushState("string");
1307
+ break;
1308
+ case 81:
1309
+ yy.getLogger().debug("LEX ARR: Starting string");
1310
+ this.pushState("string");
1311
+ break;
1312
+ case 82:
1313
+ yy.getLogger().debug("LEX: NODE_DESCR:", yy_.yytext);
1314
+ return "NODE_DESCR";
1315
+ case 83:
1316
+ yy.getLogger().debug("LEX POPPING");
1317
+ this.popState();
1318
+ break;
1319
+ case 84:
1320
+ yy.getLogger().debug("Lex: =>BAE");
1321
+ this.pushState("ARROW_DIR");
1322
+ break;
1323
+ case 85:
1324
+ yy_.yytext = yy_.yytext.replace(/^,\s*/, "");
1325
+ yy.getLogger().debug("Lex (right): dir:", yy_.yytext);
1326
+ return "DIR";
1327
+ case 86:
1328
+ yy_.yytext = yy_.yytext.replace(/^,\s*/, "");
1329
+ yy.getLogger().debug("Lex (left):", yy_.yytext);
1330
+ return "DIR";
1331
+ case 87:
1332
+ yy_.yytext = yy_.yytext.replace(/^,\s*/, "");
1333
+ yy.getLogger().debug("Lex (x):", yy_.yytext);
1334
+ return "DIR";
1335
+ case 88:
1336
+ yy_.yytext = yy_.yytext.replace(/^,\s*/, "");
1337
+ yy.getLogger().debug("Lex (y):", yy_.yytext);
1338
+ return "DIR";
1339
+ case 89:
1340
+ yy_.yytext = yy_.yytext.replace(/^,\s*/, "");
1341
+ yy.getLogger().debug("Lex (up):", yy_.yytext);
1342
+ return "DIR";
1343
+ case 90:
1344
+ yy_.yytext = yy_.yytext.replace(/^,\s*/, "");
1345
+ yy.getLogger().debug("Lex (down):", yy_.yytext);
1346
+ return "DIR";
1347
+ case 91:
1348
+ yy_.yytext = "]>";
1349
+ yy.getLogger().debug("Lex (ARROW_DIR end):", yy_.yytext);
1350
+ this.popState();
1351
+ this.popState();
1352
+ return "BLOCK_ARROW_END";
1353
+ case 92:
1354
+ yy.getLogger().debug("Lex: LINK", "#" + yy_.yytext + "#");
1355
+ return 15;
1356
+ case 93:
1357
+ yy.getLogger().debug("Lex: LINK", yy_.yytext);
1358
+ return 15;
1359
+ case 94:
1360
+ yy.getLogger().debug("Lex: LINK", yy_.yytext);
1361
+ return 15;
1362
+ case 95:
1363
+ yy.getLogger().debug("Lex: LINK", yy_.yytext);
1364
+ return 15;
1365
+ case 96:
1366
+ yy.getLogger().debug("Lex: START_LINK", yy_.yytext);
1367
+ this.pushState("LLABEL");
1368
+ return 16;
1369
+ case 97:
1370
+ yy.getLogger().debug("Lex: START_LINK", yy_.yytext);
1371
+ this.pushState("LLABEL");
1372
+ return 16;
1373
+ case 98:
1374
+ yy.getLogger().debug("Lex: START_LINK", yy_.yytext);
1375
+ this.pushState("LLABEL");
1376
+ return 16;
1377
+ case 99:
1378
+ this.pushState("md_string");
1379
+ break;
1380
+ case 100:
1381
+ yy.getLogger().debug("Lex: Starting string");
1382
+ this.pushState("string");
1383
+ return "LINK_LABEL";
1384
+ case 101:
1385
+ this.popState();
1386
+ yy.getLogger().debug("Lex: LINK", "#" + yy_.yytext + "#");
1387
+ return 15;
1388
+ case 102:
1389
+ this.popState();
1390
+ yy.getLogger().debug("Lex: LINK", yy_.yytext);
1391
+ return 15;
1392
+ case 103:
1393
+ this.popState();
1394
+ yy.getLogger().debug("Lex: LINK", yy_.yytext);
1395
+ return 15;
1396
+ case 104:
1397
+ yy.getLogger().debug("Lex: COLON", yy_.yytext);
1398
+ yy_.yytext = yy_.yytext.slice(1);
1399
+ return 27;
1400
+ }
1401
+ }, "anonymous"),
1402
+ rules: [
1403
+ /^(?:block-beta\b)/,
1404
+ /^(?:block:)/,
1405
+ /^(?:block\b)/,
1406
+ /^(?:[\s]+)/,
1407
+ /^(?:[\n]+)/,
1408
+ /^(?:((\u000D\u000A)|(\u000A)))/,
1409
+ /^(?:columns\s+auto\b)/,
1410
+ /^(?:columns\s+[\d]+)/,
1411
+ /^(?:["][`])/,
1412
+ /^(?:[^`"]+)/,
1413
+ /^(?:[`]["])/,
1414
+ /^(?:["])/,
1415
+ /^(?:["])/,
1416
+ /^(?:[^"]*)/,
1417
+ /^(?:space[:]\d+)/,
1418
+ /^(?:space\b)/,
1419
+ /^(?:default\b)/,
1420
+ /^(?:linkStyle\b)/,
1421
+ /^(?:interpolate\b)/,
1422
+ /^(?:classDef\s+)/,
1423
+ /^(?:DEFAULT\s+)/,
1424
+ /^(?:\w+\s+)/,
1425
+ /^(?:[^\n]*)/,
1426
+ /^(?:class\s+)/,
1427
+ /^(?:(\w+)+((,\s*\w+)*))/,
1428
+ /^(?:[^\n]*)/,
1429
+ /^(?:style\s+)/,
1430
+ /^(?:(\w+)+((,\s*\w+)*))/,
1431
+ /^(?:[^\n]*)/,
1432
+ /^(?:accTitle\s*:\s*)/,
1433
+ /^(?:(?!\n||)*[^\n]*)/,
1434
+ /^(?:accDescr\s*:\s*)/,
1435
+ /^(?:(?!\n||)*[^\n]*)/,
1436
+ /^(?:accDescr\s*\{\s*)/,
1437
+ /^(?:[\}])/,
1438
+ /^(?:[^\}]*)/,
1439
+ /^(?:end\b\s*)/,
1440
+ /^(?:\(\(\()/,
1441
+ /^(?:\)\)\))/,
1442
+ /^(?:[\)]\))/,
1443
+ /^(?:\}\})/,
1444
+ /^(?:\})/,
1445
+ /^(?:\(-)/,
1446
+ /^(?:-\))/,
1447
+ /^(?:\(\()/,
1448
+ /^(?:\]\])/,
1449
+ /^(?:\()/,
1450
+ /^(?:\]\))/,
1451
+ /^(?:\\\])/,
1452
+ /^(?:\/\])/,
1453
+ /^(?:\)\])/,
1454
+ /^(?:[\)])/,
1455
+ /^(?:\]>)/,
1456
+ /^(?:[\]])/,
1457
+ /^(?:-\))/,
1458
+ /^(?:\(-)/,
1459
+ /^(?:\)\))/,
1460
+ /^(?:\))/,
1461
+ /^(?:\(\(\()/,
1462
+ /^(?:\(\()/,
1463
+ /^(?:\{\{)/,
1464
+ /^(?:\{)/,
1465
+ /^(?:>)/,
1466
+ /^(?:\(\[)/,
1467
+ /^(?:\()/,
1468
+ /^(?:\[\[)/,
1469
+ /^(?:\[\|)/,
1470
+ /^(?:\[\()/,
1471
+ /^(?:\)\)\))/,
1472
+ /^(?:\[\\)/,
1473
+ /^(?:\[\/)/,
1474
+ /^(?:\[\\)/,
1475
+ /^(?:\[)/,
1476
+ /^(?:<\[)/,
1477
+ /^(?:[^\(\[\n\-\)\{\}\s\<\>:=]+)/,
1478
+ /^(?:$)/,
1479
+ /^(?:["][`])/,
1480
+ /^(?:["][`])/,
1481
+ /^(?:[^`"]+)/,
1482
+ /^(?:[`]["])/,
1483
+ /^(?:["])/,
1484
+ /^(?:["])/,
1485
+ /^(?:[^"]+)/,
1486
+ /^(?:["])/,
1487
+ /^(?:\]>\s*\()/,
1488
+ /^(?:,?\s*right\s*)/,
1489
+ /^(?:,?\s*left\s*)/,
1490
+ /^(?:,?\s*x\s*)/,
1491
+ /^(?:,?\s*y\s*)/,
1492
+ /^(?:,?\s*up\s*)/,
1493
+ /^(?:,?\s*down\s*)/,
1494
+ /^(?:\)\s*)/,
1495
+ /^(?:\s*[xo<]?--+[-xo>]\s*)/,
1496
+ /^(?:\s*[xo<]?==+[=xo>]\s*)/,
1497
+ /^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,
1498
+ /^(?:\s*~~[\~]+\s*)/,
1499
+ /^(?:\s*[xo<]?--\s*)/,
1500
+ /^(?:\s*[xo<]?==\s*)/,
1501
+ /^(?:\s*[xo<]?-\.\s*)/,
1502
+ /^(?:["][`])/,
1503
+ /^(?:["])/,
1504
+ /^(?:\s*[xo<]?--+[-xo>]\s*)/,
1505
+ /^(?:\s*[xo<]?==+[=xo>]\s*)/,
1506
+ /^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,
1507
+ /^(?::\d+)/
1508
+ ],
1509
+ conditions: {
1510
+ "STYLE_DEFINITION": {
1511
+ "rules": [28],
1512
+ "inclusive": false
1513
+ },
1514
+ "STYLE_STMNT": {
1515
+ "rules": [27],
1516
+ "inclusive": false
1517
+ },
1518
+ "CLASSDEFID": {
1519
+ "rules": [22],
1520
+ "inclusive": false
1521
+ },
1522
+ "CLASSDEF": {
1523
+ "rules": [20, 21],
1524
+ "inclusive": false
1525
+ },
1526
+ "CLASS_STYLE": {
1527
+ "rules": [25],
1528
+ "inclusive": false
1529
+ },
1530
+ "CLASS": {
1531
+ "rules": [24],
1532
+ "inclusive": false
1533
+ },
1534
+ "LLABEL": {
1535
+ "rules": [
1536
+ 99,
1537
+ 100,
1538
+ 101,
1539
+ 102,
1540
+ 103
1541
+ ],
1542
+ "inclusive": false
1543
+ },
1544
+ "ARROW_DIR": {
1545
+ "rules": [
1546
+ 85,
1547
+ 86,
1548
+ 87,
1549
+ 88,
1550
+ 89,
1551
+ 90,
1552
+ 91
1553
+ ],
1554
+ "inclusive": false
1555
+ },
1556
+ "BLOCK_ARROW": {
1557
+ "rules": [
1558
+ 76,
1559
+ 81,
1560
+ 84
1561
+ ],
1562
+ "inclusive": false
1563
+ },
1564
+ "NODE": {
1565
+ "rules": [
1566
+ 37,
1567
+ 38,
1568
+ 39,
1569
+ 40,
1570
+ 41,
1571
+ 42,
1572
+ 43,
1573
+ 44,
1574
+ 45,
1575
+ 46,
1576
+ 47,
1577
+ 48,
1578
+ 49,
1579
+ 50,
1580
+ 51,
1581
+ 52,
1582
+ 53,
1583
+ 77,
1584
+ 80
1585
+ ],
1586
+ "inclusive": false
1587
+ },
1588
+ "md_string": {
1589
+ "rules": [
1590
+ 9,
1591
+ 10,
1592
+ 78,
1593
+ 79
1594
+ ],
1595
+ "inclusive": false
1596
+ },
1597
+ "space": {
1598
+ "rules": [],
1599
+ "inclusive": false
1600
+ },
1601
+ "string": {
1602
+ "rules": [
1603
+ 12,
1604
+ 13,
1605
+ 82,
1606
+ 83
1607
+ ],
1608
+ "inclusive": false
1609
+ },
1610
+ "acc_descr_multiline": {
1611
+ "rules": [34, 35],
1612
+ "inclusive": false
1613
+ },
1614
+ "acc_descr": {
1615
+ "rules": [32],
1616
+ "inclusive": false
1617
+ },
1618
+ "acc_title": {
1619
+ "rules": [30],
1620
+ "inclusive": false
1621
+ },
1622
+ "INITIAL": {
1623
+ "rules": [
1624
+ 0,
1625
+ 1,
1626
+ 2,
1627
+ 3,
1628
+ 4,
1629
+ 5,
1630
+ 6,
1631
+ 7,
1632
+ 8,
1633
+ 11,
1634
+ 14,
1635
+ 15,
1636
+ 16,
1637
+ 17,
1638
+ 18,
1639
+ 19,
1640
+ 23,
1641
+ 26,
1642
+ 29,
1643
+ 31,
1644
+ 33,
1645
+ 36,
1646
+ 54,
1647
+ 55,
1648
+ 56,
1649
+ 57,
1650
+ 58,
1651
+ 59,
1652
+ 60,
1653
+ 61,
1654
+ 62,
1655
+ 63,
1656
+ 64,
1657
+ 65,
1658
+ 66,
1659
+ 67,
1660
+ 68,
1661
+ 69,
1662
+ 70,
1663
+ 71,
1664
+ 72,
1665
+ 73,
1666
+ 74,
1667
+ 75,
1668
+ 92,
1669
+ 93,
1670
+ 94,
1671
+ 95,
1672
+ 96,
1673
+ 97,
1674
+ 98,
1675
+ 104
1676
+ ],
1677
+ "inclusive": true
1678
+ }
1679
+ }
1680
+ };
1681
+ }();
1682
+ function Parser() {
1683
+ this.yy = {};
1684
+ }
1685
+ __name$1(Parser, "Parser");
1686
+ Parser.prototype = parser2;
1687
+ parser2.Parser = Parser;
1688
+ return new Parser();
1689
+ }();
1690
+ parser.parser = parser;
1691
+ var block_default = parser;
1692
+ var blockDatabase = /* @__PURE__ */ new Map();
1693
+ var edgeList = [];
1694
+ var edgeCount = /* @__PURE__ */ new Map();
1695
+ var COLOR_KEYWORD = "color";
1696
+ var FILL_KEYWORD = "fill";
1697
+ var BG_FILL = "bgFill";
1698
+ var STYLECLASS_SEP = ",";
1699
+ var config = getConfig2();
1700
+ var classes = /* @__PURE__ */ new Map();
1701
+ var diagramId = "";
1702
+ var sanitizeText2 = /* @__PURE__ */ __name$1((txt) => common_default.sanitizeText(txt, config), "sanitizeText");
1703
+ var addStyleClass = /* @__PURE__ */ __name$1(function(id, styleAttributes = "") {
1704
+ let foundClass = classes.get(id);
1705
+ if (!foundClass) {
1706
+ foundClass = {
1707
+ id,
1708
+ styles: [],
1709
+ textStyles: []
1710
+ };
1711
+ classes.set(id, foundClass);
1712
+ }
1713
+ if (styleAttributes !== void 0 && styleAttributes !== null) styleAttributes.split(STYLECLASS_SEP).forEach((attrib) => {
1714
+ const fixedAttrib = attrib.replace(/([^;]*);/, "$1").trim();
1715
+ if (RegExp(COLOR_KEYWORD).exec(attrib)) {
1716
+ const newStyle2 = fixedAttrib.replace(FILL_KEYWORD, BG_FILL).replace(COLOR_KEYWORD, FILL_KEYWORD);
1717
+ foundClass.textStyles.push(newStyle2);
1718
+ }
1719
+ foundClass.styles.push(fixedAttrib);
1720
+ });
1721
+ }, "addStyleClass");
1722
+ var addStyle2Node = /* @__PURE__ */ __name$1(function(id, styles = "") {
1723
+ const foundBlock = blockDatabase.get(id);
1724
+ if (styles !== void 0 && styles !== null) foundBlock.styles = styles.split(STYLECLASS_SEP);
1725
+ }, "addStyle2Node");
1726
+ var setCssClass = /* @__PURE__ */ __name$1(function(itemIds, cssClassName) {
1727
+ itemIds.split(",").forEach(function(id) {
1728
+ let foundBlock = blockDatabase.get(id);
1729
+ if (foundBlock === void 0) {
1730
+ const trimmedId = id.trim();
1731
+ foundBlock = {
1732
+ id: trimmedId,
1733
+ type: "na",
1734
+ children: []
1735
+ };
1736
+ blockDatabase.set(trimmedId, foundBlock);
1737
+ }
1738
+ if (!foundBlock.classes) foundBlock.classes = [];
1739
+ foundBlock.classes.push(cssClassName);
1740
+ });
1741
+ }, "setCssClass");
1742
+ var populateBlockDatabase = /* @__PURE__ */ __name$1((_blockList, parent) => {
1743
+ const blockList = _blockList.flat();
1744
+ const children = [];
1745
+ const column = blockList.find((b) => b?.type === "column-setting")?.columns ?? -1;
1746
+ for (const block of blockList) {
1747
+ if (typeof column === "number" && column > 0 && block.type !== "column-setting" && typeof block.widthInColumns === "number" && block.widthInColumns > column) log.warn(`Block ${block.id} width ${block.widthInColumns} exceeds configured column width ${column}`);
1748
+ if (block.label) block.label = sanitizeText2(block.label);
1749
+ if (block.type === "classDef") {
1750
+ addStyleClass(block.id, block.css);
1751
+ continue;
1752
+ }
1753
+ if (block.type === "applyClass") {
1754
+ setCssClass(block.id, block?.styleClass ?? "");
1755
+ continue;
1756
+ }
1757
+ if (block.type === "applyStyles") {
1758
+ if (block?.stylesStr) addStyle2Node(block.id, block?.stylesStr);
1759
+ continue;
1760
+ }
1761
+ if (block.type === "column-setting") parent.columns = block.columns ?? -1;
1762
+ else if (block.type === "edge") {
1763
+ const count = (edgeCount.get(block.id) ?? 0) + 1;
1764
+ edgeCount.set(block.id, count);
1765
+ block.id = count + "-" + block.id;
1766
+ edgeList.push(block);
1767
+ } else {
1768
+ if (!block.label) if (block.type === "composite") block.label = "";
1769
+ else block.label = block.id;
1770
+ const existingBlock = blockDatabase.get(block.id);
1771
+ if (existingBlock === void 0) blockDatabase.set(block.id, block);
1772
+ else {
1773
+ if (block.type !== "na") existingBlock.type = block.type;
1774
+ if (block.label !== block.id) existingBlock.label = block.label;
1775
+ }
1776
+ if (block.children) populateBlockDatabase(block.children, block);
1777
+ if (block.type === "space") {
1778
+ const w = block.width ?? 1;
1779
+ for (let j = 0; j < w; j++) {
1780
+ const newBlock = clone(block);
1781
+ newBlock.id = newBlock.id + "-" + j;
1782
+ blockDatabase.set(newBlock.id, newBlock);
1783
+ children.push(newBlock);
1784
+ }
1785
+ } else if (existingBlock === void 0) children.push(block);
1786
+ }
1787
+ }
1788
+ parent.children = children;
1789
+ }, "populateBlockDatabase");
1790
+ var blocks = [];
1791
+ var rootBlock = {
1792
+ id: "root",
1793
+ type: "composite",
1794
+ children: [],
1795
+ columns: -1
1796
+ };
1797
+ var clear2 = /* @__PURE__ */ __name$1(() => {
1798
+ log.debug("Clear called");
1799
+ clear();
1800
+ rootBlock = {
1801
+ id: "root",
1802
+ type: "composite",
1803
+ children: [],
1804
+ columns: -1
1805
+ };
1806
+ blockDatabase = /* @__PURE__ */ new Map([["root", rootBlock]]);
1807
+ blocks = [];
1808
+ classes = /* @__PURE__ */ new Map();
1809
+ edgeList = [];
1810
+ edgeCount = /* @__PURE__ */ new Map();
1811
+ diagramId = "";
1812
+ }, "clear");
1813
+ function typeStr2Type(typeStr) {
1814
+ log.debug("typeStr2Type", typeStr);
1815
+ switch (typeStr) {
1816
+ case "[]": return "square";
1817
+ case "()":
1818
+ log.debug("we have a round");
1819
+ return "round";
1820
+ case "(())": return "circle";
1821
+ case ">]": return "rect_left_inv_arrow";
1822
+ case "{}": return "diamond";
1823
+ case "{{}}": return "hexagon";
1824
+ case "([])": return "stadium";
1825
+ case "[[]]": return "subroutine";
1826
+ case "[()]": return "cylinder";
1827
+ case "((()))": return "doublecircle";
1828
+ case "[//]": return "lean_right";
1829
+ case "[\\\\]": return "lean_left";
1830
+ case "[/\\]": return "trapezoid";
1831
+ case "[\\/]": return "inv_trapezoid";
1832
+ case "<[]>": return "block_arrow";
1833
+ default: return "na";
1834
+ }
1835
+ }
1836
+ __name$1(typeStr2Type, "typeStr2Type");
1837
+ function edgeTypeStr2Type(typeStr) {
1838
+ log.debug("typeStr2Type", typeStr);
1839
+ switch (typeStr) {
1840
+ case "==": return "thick";
1841
+ default: return "normal";
1842
+ }
1843
+ }
1844
+ __name$1(edgeTypeStr2Type, "edgeTypeStr2Type");
1845
+ function edgeStrToEdgeData(typeStr) {
1846
+ switch (typeStr.trim().slice(-1)) {
1847
+ case "x": return "arrow_cross";
1848
+ case "o": return "arrow_circle";
1849
+ case ">": return "arrow_point";
1850
+ default: return "";
1851
+ }
1852
+ }
1853
+ __name$1(edgeStrToEdgeData, "edgeStrToEdgeData");
1854
+ function edgeStrToEdgeStartData(typeStr) {
1855
+ switch (typeStr.trim().charAt(0)) {
1856
+ case "x": return "arrow_cross";
1857
+ case "o": return "arrow_circle";
1858
+ case "<": return "arrow_point";
1859
+ default: return "arrow_open";
1860
+ }
1861
+ }
1862
+ __name$1(edgeStrToEdgeStartData, "edgeStrToEdgeStartData");
1863
+ function edgeStrToThickness(typeStr) {
1864
+ return typeStr.includes("==") ? "thick" : "normal";
1865
+ }
1866
+ __name$1(edgeStrToThickness, "edgeStrToThickness");
1867
+ function edgeStrToPattern(typeStr) {
1868
+ if (typeStr.includes(".-")) return "dotted";
1869
+ return "solid";
1870
+ }
1871
+ __name$1(edgeStrToPattern, "edgeStrToPattern");
1872
+ var cnt = 0;
1873
+ var blockDB_default = {
1874
+ getConfig: /* @__PURE__ */ __name$1(() => getConfig().block, "getConfig"),
1875
+ typeStr2Type,
1876
+ edgeTypeStr2Type,
1877
+ edgeStrToEdgeData,
1878
+ edgeStrToEdgeStartData,
1879
+ edgeStrToThickness,
1880
+ edgeStrToPattern,
1881
+ getLogger: /* @__PURE__ */ __name$1(() => log, "getLogger"),
1882
+ getBlocksFlat: /* @__PURE__ */ __name$1(() => {
1883
+ return [...blockDatabase.values()];
1884
+ }, "getBlocksFlat"),
1885
+ getBlocks: /* @__PURE__ */ __name$1(() => {
1886
+ return blocks || [];
1887
+ }, "getBlocks"),
1888
+ getEdges: /* @__PURE__ */ __name$1(() => {
1889
+ return edgeList;
1890
+ }, "getEdges"),
1891
+ setHierarchy: /* @__PURE__ */ __name$1((block) => {
1892
+ rootBlock.children = block;
1893
+ populateBlockDatabase(block, rootBlock);
1894
+ blocks = rootBlock.children;
1895
+ }, "setHierarchy"),
1896
+ getBlock: /* @__PURE__ */ __name$1((id) => {
1897
+ return blockDatabase.get(id);
1898
+ }, "getBlock"),
1899
+ setBlock: /* @__PURE__ */ __name$1((block) => {
1900
+ blockDatabase.set(block.id, block);
1901
+ }, "setBlock"),
1902
+ getColumns: /* @__PURE__ */ __name$1((blockId) => {
1903
+ const block = blockDatabase.get(blockId);
1904
+ if (!block) return -1;
1905
+ if (block.columns) return block.columns;
1906
+ if (!block.children) return -1;
1907
+ return block.children.length;
1908
+ }, "getColumns"),
1909
+ getClasses: /* @__PURE__ */ __name$1(function() {
1910
+ return classes;
1911
+ }, "getClasses"),
1912
+ clear: clear2,
1913
+ generateId: /* @__PURE__ */ __name$1(() => {
1914
+ cnt++;
1915
+ return "id-" + Math.random().toString(36).substr(2, 12) + "-" + cnt;
1916
+ }, "generateId"),
1917
+ setDiagramId: /* @__PURE__ */ __name$1((id) => {
1918
+ diagramId = id;
1919
+ }, "setDiagramId"),
1920
+ getDiagramId: /* @__PURE__ */ __name$1(() => diagramId, "getDiagramId")
1921
+ };
1922
+ var fade = /* @__PURE__ */ __name$1((color, opacity) => {
1923
+ const channel2 = channel;
1924
+ return rgba(channel2(color, "r"), channel2(color, "g"), channel2(color, "b"), opacity);
1925
+ }, "fade");
1926
+ var styles_default = /* @__PURE__ */ __name$1((options) => `.label {
1927
+ font-family: ${options.fontFamily};
1928
+ color: ${options.nodeTextColor || options.textColor};
1929
+ }
1930
+ .cluster-label text {
1931
+ fill: ${options.titleColor};
1932
+ }
1933
+ .cluster-label span,p {
1934
+ color: ${options.titleColor};
1935
+ }
1936
+
1937
+
1938
+
1939
+ .label text,span,p {
1940
+ fill: ${options.nodeTextColor || options.textColor};
1941
+ color: ${options.nodeTextColor || options.textColor};
1942
+ }
1943
+
1944
+ .node rect,
1945
+ .node circle,
1946
+ .node ellipse,
1947
+ .node polygon,
1948
+ .node path {
1949
+ fill: ${options.mainBkg};
1950
+ stroke: ${options.nodeBorder};
1951
+ stroke-width: 1px;
1952
+ }
1953
+ .flowchart-label text {
1954
+ text-anchor: middle;
1955
+ }
1956
+ // .flowchart-label .text-outer-tspan {
1957
+ // text-anchor: middle;
1958
+ // }
1959
+ // .flowchart-label .text-inner-tspan {
1960
+ // text-anchor: start;
1961
+ // }
1962
+
1963
+ .node .label {
1964
+ text-align: center;
1965
+ }
1966
+ .node.clickable {
1967
+ cursor: pointer;
1968
+ }
1969
+
1970
+ .arrowheadPath {
1971
+ fill: ${options.arrowheadColor};
1972
+ }
1973
+
1974
+ .edgePath .path {
1975
+ stroke: ${options.lineColor};
1976
+ stroke-width: 2.0px;
1977
+ }
1978
+
1979
+ .flowchart-link {
1980
+ stroke: ${options.lineColor};
1981
+ fill: none;
1982
+ }
1983
+
1984
+ .edgeLabel {
1985
+ background-color: ${options.edgeLabelBackground};
1986
+ /*
1987
+ * This is for backward compatibility with existing code that didn't
1988
+ * add a \`<p>\` around edge labels.
1989
+ *
1990
+ * TODO: We should probably remove this in a future release.
1991
+ */
1992
+ p {
1993
+ margin: 0;
1994
+ padding: 0;
1995
+ display: inline;
1996
+ }
1997
+ rect {
1998
+ opacity: 0.5;
1999
+ background-color: ${options.edgeLabelBackground};
2000
+ fill: ${options.edgeLabelBackground};
2001
+ }
2002
+ text-align: center;
2003
+ }
2004
+
2005
+ /* For html labels only */
2006
+ .labelBkg {
2007
+ background-color: ${options.edgeLabelBackground};
2008
+ }
2009
+
2010
+ .node .cluster {
2011
+ // fill: ${fade(options.mainBkg, .5)};
2012
+ fill: ${fade(options.clusterBkg, .5)};
2013
+ stroke: ${fade(options.clusterBorder, .2)};
2014
+ box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
2015
+ stroke-width: 1px;
2016
+ }
2017
+
2018
+ .cluster text {
2019
+ fill: ${options.titleColor};
2020
+ }
2021
+
2022
+ .cluster span,p {
2023
+ color: ${options.titleColor};
2024
+ }
2025
+ /* .cluster div {
2026
+ color: ${options.titleColor};
2027
+ } */
2028
+
2029
+ div.mermaidTooltip {
2030
+ position: absolute;
2031
+ text-align: center;
2032
+ max-width: 200px;
2033
+ padding: 2px;
2034
+ font-family: ${options.fontFamily};
2035
+ font-size: 12px;
2036
+ background: ${options.tertiaryColor};
2037
+ border: 1px solid ${options.border2};
2038
+ border-radius: 2px;
2039
+ pointer-events: none;
2040
+ z-index: 100;
2041
+ }
2042
+
2043
+ .flowchartTitleText {
2044
+ text-anchor: middle;
2045
+ font-size: 18px;
2046
+ fill: ${options.textColor};
2047
+ }
2048
+ ${getIconStyles()}
2049
+ `, "getStyles");
2050
+ var insertMarkers = /* @__PURE__ */ __name$1((elem, markerArray, type, id) => {
2051
+ markerArray.forEach((markerName) => {
2052
+ markers[markerName](elem, type, id);
2053
+ });
2054
+ }, "insertMarkers");
2055
+ var markers = {
2056
+ extension: /* @__PURE__ */ __name$1((elem, type, id) => {
2057
+ log.trace("Making markers for ", id);
2058
+ elem.append("defs").append("marker").attr("id", id + "_" + type + "-extensionStart").attr("class", "marker extension " + type).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z");
2059
+ elem.append("defs").append("marker").attr("id", id + "_" + type + "-extensionEnd").attr("class", "marker extension " + type).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z");
2060
+ }, "extension"),
2061
+ composition: /* @__PURE__ */ __name$1((elem, type, id) => {
2062
+ elem.append("defs").append("marker").attr("id", id + "_" + type + "-compositionStart").attr("class", "marker composition " + type).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
2063
+ elem.append("defs").append("marker").attr("id", id + "_" + type + "-compositionEnd").attr("class", "marker composition " + type).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
2064
+ }, "composition"),
2065
+ aggregation: /* @__PURE__ */ __name$1((elem, type, id) => {
2066
+ elem.append("defs").append("marker").attr("id", id + "_" + type + "-aggregationStart").attr("class", "marker aggregation " + type).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
2067
+ elem.append("defs").append("marker").attr("id", id + "_" + type + "-aggregationEnd").attr("class", "marker aggregation " + type).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
2068
+ }, "aggregation"),
2069
+ dependency: /* @__PURE__ */ __name$1((elem, type, id) => {
2070
+ elem.append("defs").append("marker").attr("id", id + "_" + type + "-dependencyStart").attr("class", "marker dependency " + type).attr("refX", 6).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z");
2071
+ elem.append("defs").append("marker").attr("id", id + "_" + type + "-dependencyEnd").attr("class", "marker dependency " + type).attr("refX", 13).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
2072
+ }, "dependency"),
2073
+ lollipop: /* @__PURE__ */ __name$1((elem, type, id) => {
2074
+ elem.append("defs").append("marker").attr("id", id + "_" + type + "-lollipopStart").attr("class", "marker lollipop " + type).attr("refX", 13).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6);
2075
+ elem.append("defs").append("marker").attr("id", id + "_" + type + "-lollipopEnd").attr("class", "marker lollipop " + type).attr("refX", 1).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6);
2076
+ }, "lollipop"),
2077
+ point: /* @__PURE__ */ __name$1((elem, type, id) => {
2078
+ elem.append("marker").attr("id", id + "_" + type + "-pointEnd").attr("class", "marker " + type).attr("viewBox", "0 0 10 10").attr("refX", 6).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
2079
+ elem.append("marker").attr("id", id + "_" + type + "-pointStart").attr("class", "marker " + type).attr("viewBox", "0 0 10 10").attr("refX", 4.5).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 5 L 10 10 L 10 0 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
2080
+ }, "point"),
2081
+ circle: /* @__PURE__ */ __name$1((elem, type, id) => {
2082
+ elem.append("marker").attr("id", id + "_" + type + "-circleEnd").attr("class", "marker " + type).attr("viewBox", "0 0 10 10").attr("refX", 11).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
2083
+ elem.append("marker").attr("id", id + "_" + type + "-circleStart").attr("class", "marker " + type).attr("viewBox", "0 0 10 10").attr("refX", -1).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
2084
+ }, "circle"),
2085
+ cross: /* @__PURE__ */ __name$1((elem, type, id) => {
2086
+ elem.append("marker").attr("id", id + "_" + type + "-crossEnd").attr("class", "marker cross " + type).attr("viewBox", "0 0 11 11").attr("refX", 12).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0");
2087
+ elem.append("marker").attr("id", id + "_" + type + "-crossStart").attr("class", "marker cross " + type).attr("viewBox", "0 0 11 11").attr("refX", -1).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0");
2088
+ }, "cross"),
2089
+ barb: /* @__PURE__ */ __name$1((elem, type, id) => {
2090
+ elem.append("defs").append("marker").attr("id", id + "_" + type + "-barbEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 14).attr("markerUnits", "strokeWidth").attr("orient", "auto").append("path").attr("d", "M 19,7 L9,13 L14,7 L9,1 Z");
2091
+ }, "barb")
2092
+ };
2093
+ var markers_default = insertMarkers;
2094
+ var padding = getConfig2()?.block?.padding ?? 8;
2095
+ function calculateBlockPosition(columns, position) {
2096
+ if (columns === 0 || !Number.isInteger(columns)) throw new Error("Columns must be an integer !== 0.");
2097
+ if (position < 0 || !Number.isInteger(position)) throw new Error("Position must be a non-negative integer." + position);
2098
+ if (columns < 0) return {
2099
+ px: position,
2100
+ py: 0
2101
+ };
2102
+ if (columns === 1) return {
2103
+ px: 0,
2104
+ py: position
2105
+ };
2106
+ return {
2107
+ px: position % columns,
2108
+ py: Math.floor(position / columns)
2109
+ };
2110
+ }
2111
+ __name$1(calculateBlockPosition, "calculateBlockPosition");
2112
+ var getMaxChildSize = /* @__PURE__ */ __name$1((block) => {
2113
+ let maxWidth = 0;
2114
+ let maxHeight = 0;
2115
+ for (const child of block.children) {
2116
+ const { width, height, x, y } = child.size ?? {
2117
+ width: 0,
2118
+ height: 0,
2119
+ x: 0,
2120
+ y: 0
2121
+ };
2122
+ log.debug("getMaxChildSize abc95 child:", child.id, "width:", width, "height:", height, "x:", x, "y:", y, child.type);
2123
+ if (child.type === "space") continue;
2124
+ const normalizedWidth = width / (child.widthInColumns ?? 1);
2125
+ if (normalizedWidth > maxWidth) maxWidth = normalizedWidth;
2126
+ if (height > maxHeight) maxHeight = height;
2127
+ }
2128
+ return {
2129
+ width: maxWidth,
2130
+ height: maxHeight
2131
+ };
2132
+ }, "getMaxChildSize");
2133
+ function setBlockSizes(block, db2, siblingWidth = 0, siblingHeight = 0) {
2134
+ log.debug("setBlockSizes abc95 (start)", block.id, block?.size?.x, "block width =", block?.size, "siblingWidth", siblingWidth);
2135
+ if (!block?.size?.width) block.size = {
2136
+ width: siblingWidth,
2137
+ height: siblingHeight,
2138
+ x: 0,
2139
+ y: 0
2140
+ };
2141
+ let maxWidth = 0;
2142
+ let maxHeight = 0;
2143
+ if (block.children?.length > 0) {
2144
+ for (const child of block.children) setBlockSizes(child, db2);
2145
+ const childSize = getMaxChildSize(block);
2146
+ maxWidth = childSize.width;
2147
+ maxHeight = childSize.height;
2148
+ log.debug("setBlockSizes abc95 maxWidth of", block.id, ":s children is ", maxWidth, maxHeight);
2149
+ for (const child of block.children) if (child.size) {
2150
+ log.debug(`abc95 Setting size of children of ${block.id} id=${child.id} ${maxWidth} ${maxHeight} ${JSON.stringify(child.size)}`);
2151
+ child.size.width = maxWidth * (child.widthInColumns ?? 1) + padding * ((child.widthInColumns ?? 1) - 1);
2152
+ child.size.height = maxHeight;
2153
+ child.size.x = 0;
2154
+ child.size.y = 0;
2155
+ log.debug(`abc95 updating size of ${block.id} children child:${child.id} maxWidth:${maxWidth} maxHeight:${maxHeight}`);
2156
+ }
2157
+ for (const child of block.children) setBlockSizes(child, db2, maxWidth, maxHeight);
2158
+ const columns = block.columns ?? -1;
2159
+ let numItems = 0;
2160
+ for (const child of block.children) numItems += child.widthInColumns ?? 1;
2161
+ let xSize = block.children.length;
2162
+ if (columns > 0 && columns < numItems) xSize = columns;
2163
+ const ySize = Math.ceil(numItems / xSize);
2164
+ let width = xSize * (maxWidth + padding) + padding;
2165
+ let height = ySize * (maxHeight + padding) + padding;
2166
+ if (width < siblingWidth) {
2167
+ log.debug(`Detected to small sibling: abc95 ${block.id} siblingWidth ${siblingWidth} siblingHeight ${siblingHeight} width ${width}`);
2168
+ width = siblingWidth;
2169
+ height = siblingHeight;
2170
+ const childWidth = (siblingWidth - xSize * padding - padding) / xSize;
2171
+ const childHeight = (siblingHeight - ySize * padding - padding) / ySize;
2172
+ log.debug("Size indata abc88", block.id, "childWidth", childWidth, "maxWidth", maxWidth);
2173
+ log.debug("Size indata abc88", block.id, "childHeight", childHeight, "maxHeight", maxHeight);
2174
+ log.debug("Size indata abc88 xSize", xSize, "padding", padding);
2175
+ for (const child of block.children) if (child.size) {
2176
+ child.size.width = childWidth;
2177
+ child.size.height = childHeight;
2178
+ child.size.x = 0;
2179
+ child.size.y = 0;
2180
+ }
2181
+ }
2182
+ log.debug(`abc95 (finale calc) ${block.id} xSize ${xSize} ySize ${ySize} columns ${columns}${block.children.length} width=${Math.max(width, block.size?.width || 0)}`);
2183
+ if (width < (block?.size?.width || 0)) {
2184
+ width = block?.size?.width || 0;
2185
+ const num = columns > 0 ? Math.min(block.children.length, columns) : block.children.length;
2186
+ if (num > 0) {
2187
+ const childWidth = (width - num * padding - padding) / num;
2188
+ log.debug("abc95 (growing to fit) width", block.id, width, block.size?.width, childWidth);
2189
+ for (const child of block.children) if (child.size) child.size.width = childWidth;
2190
+ }
2191
+ }
2192
+ block.size = {
2193
+ width,
2194
+ height,
2195
+ x: 0,
2196
+ y: 0
2197
+ };
2198
+ }
2199
+ log.debug("setBlockSizes abc94 (done)", block.id, block?.size?.x, block?.size?.width, block?.size?.y, block?.size?.height);
2200
+ }
2201
+ __name$1(setBlockSizes, "setBlockSizes");
2202
+ function layoutBlocks(block, db2) {
2203
+ log.debug(`abc85 layout blocks (=>layoutBlocks) ${block.id} x: ${block?.size?.x} y: ${block?.size?.y} width: ${block?.size?.width}`);
2204
+ const columns = block.columns ?? -1;
2205
+ log.debug("layoutBlocks columns abc95", block.id, "=>", columns, block);
2206
+ if (block.children && block.children.length > 0) {
2207
+ const width = block?.children[0]?.size?.width ?? 0;
2208
+ const widthOfChildren = block.children.length * width + (block.children.length - 1) * padding;
2209
+ log.debug("widthOfChildren 88", widthOfChildren, "posX");
2210
+ const rowHeights = /* @__PURE__ */ new Map();
2211
+ {
2212
+ let colPos = 0;
2213
+ for (const child of block.children) {
2214
+ if (!child.size) continue;
2215
+ const { py } = calculateBlockPosition(columns, colPos);
2216
+ const currentMax = rowHeights.get(py) ?? 0;
2217
+ if (child.size.height > currentMax) rowHeights.set(py, child.size.height);
2218
+ let filled = child?.widthInColumns ?? 1;
2219
+ if (columns > 0) filled = Math.min(filled, columns - colPos % columns);
2220
+ colPos += filled;
2221
+ }
2222
+ }
2223
+ const rowYOffsets = /* @__PURE__ */ new Map();
2224
+ {
2225
+ let offset = 0;
2226
+ const rows = [...rowHeights.keys()].sort((a, b) => a - b);
2227
+ for (const row of rows) {
2228
+ rowYOffsets.set(row, offset);
2229
+ offset += (rowHeights.get(row) ?? 0) + padding;
2230
+ }
2231
+ }
2232
+ let columnPos = 0;
2233
+ log.debug("abc91 block?.size?.x", block.id, block?.size?.x);
2234
+ let startingPosX = block?.size?.x ? block?.size?.x + (-block?.size?.width / 2 || 0) : -padding;
2235
+ let rowPos = 0;
2236
+ for (const child of block.children) {
2237
+ const parent = block;
2238
+ if (!child.size) continue;
2239
+ const { width: width2, height } = child.size;
2240
+ const { px, py } = calculateBlockPosition(columns, columnPos);
2241
+ if (py != rowPos) {
2242
+ rowPos = py;
2243
+ startingPosX = block?.size?.x ? block?.size?.x + (-block?.size?.width / 2 || 0) : -padding;
2244
+ log.debug("New row in layout for block", block.id, " and child ", child.id, rowPos);
2245
+ }
2246
+ log.debug(`abc89 layout blocks (child) id: ${child.id} Pos: ${columnPos} (px, py) ${px},${py} (${parent?.size?.x},${parent?.size?.y}) parent: ${parent.id} width: ${width2}${padding}`);
2247
+ if (parent.size) {
2248
+ const halfWidth = width2 / 2;
2249
+ child.size.x = startingPosX + padding + halfWidth;
2250
+ log.debug(`abc91 layout blocks (calc) px, pyid:${child.id} startingPos=X${startingPosX} new startingPosX${child.size.x} ${halfWidth} padding=${padding} width=${width2} halfWidth=${halfWidth} => x:${child.size.x} y:${child.size.y} ${child.widthInColumns} (width * (child?.w || 1)) / 2 ${width2 * (child?.widthInColumns ?? 1) / 2}`);
2251
+ startingPosX = child.size.x + halfWidth;
2252
+ const rowYOffset = rowYOffsets.get(py) ?? 0;
2253
+ const rowHeight = rowHeights.get(py) ?? height;
2254
+ child.size.y = parent.size.y - parent.size.height / 2 + rowYOffset + rowHeight / 2 + padding;
2255
+ log.debug(`abc88 layout blocks (calc) px, pyid:${child.id}startingPosX${startingPosX}${padding}${halfWidth}=>x:${child.size.x}y:${child.size.y}${child.widthInColumns}(width * (child?.w || 1)) / 2${width2 * (child?.widthInColumns ?? 1) / 2}`);
2256
+ }
2257
+ if (child.children) layoutBlocks(child, db2);
2258
+ let columnsFilled = child?.widthInColumns ?? 1;
2259
+ if (columns > 0) columnsFilled = Math.min(columnsFilled, columns - columnPos % columns);
2260
+ columnPos += columnsFilled;
2261
+ log.debug("abc88 columnsPos", child, columnPos);
2262
+ }
2263
+ }
2264
+ log.debug(`layout blocks (<==layoutBlocks) ${block.id} x: ${block?.size?.x} y: ${block?.size?.y} width: ${block?.size?.width}`);
2265
+ }
2266
+ __name$1(layoutBlocks, "layoutBlocks");
2267
+ function findBounds(block, { minX, minY, maxX, maxY } = {
2268
+ minX: 0,
2269
+ minY: 0,
2270
+ maxX: 0,
2271
+ maxY: 0
2272
+ }) {
2273
+ if (block.size && block.id !== "root") {
2274
+ const { x, y, width, height } = block.size;
2275
+ if (x - width / 2 < minX) minX = x - width / 2;
2276
+ if (y - height / 2 < minY) minY = y - height / 2;
2277
+ if (x + width / 2 > maxX) maxX = x + width / 2;
2278
+ if (y + height / 2 > maxY) maxY = y + height / 2;
2279
+ }
2280
+ if (block.children) for (const child of block.children) ({minX, minY, maxX, maxY} = findBounds(child, {
2281
+ minX,
2282
+ minY,
2283
+ maxX,
2284
+ maxY
2285
+ }));
2286
+ return {
2287
+ minX,
2288
+ minY,
2289
+ maxX,
2290
+ maxY
2291
+ };
2292
+ }
2293
+ __name$1(findBounds, "findBounds");
2294
+ function layout(db2) {
2295
+ const root = db2.getBlock("root");
2296
+ if (!root) return;
2297
+ setBlockSizes(root, db2, 0, 0);
2298
+ layoutBlocks(root, db2);
2299
+ log.debug("getBlocks", JSON.stringify(root, null, 2));
2300
+ const { minX, minY, maxX, maxY } = findBounds(root);
2301
+ const height = maxY - minY;
2302
+ return {
2303
+ x: minX,
2304
+ y: minY,
2305
+ width: maxX - minX,
2306
+ height
2307
+ };
2308
+ }
2309
+ __name$1(layout, "layout");
2310
+ var createLabel_default = /* @__PURE__ */ __name$1(async (element, _vertexText, style, isTitle = false, isNode = false) => {
2311
+ let vertexText = _vertexText || "";
2312
+ if (typeof vertexText === "object") vertexText = vertexText[0];
2313
+ const config2 = getConfig2();
2314
+ const useHtmlLabels = getEffectiveHtmlLabels(config2);
2315
+ return await createText(element, vertexText, {
2316
+ style,
2317
+ isTitle,
2318
+ useHtmlLabels,
2319
+ markdown: false,
2320
+ isNode,
2321
+ width: Number.POSITIVE_INFINITY
2322
+ }, config2);
2323
+ }, "createLabel");
2324
+ var addEdgeMarkers = /* @__PURE__ */ __name$1((svgPath, edge, url, id, diagramType) => {
2325
+ if (edge.arrowTypeStart) addEdgeMarker(svgPath, "start", edge.arrowTypeStart, url, id, diagramType);
2326
+ if (edge.arrowTypeEnd) addEdgeMarker(svgPath, "end", edge.arrowTypeEnd, url, id, diagramType);
2327
+ }, "addEdgeMarkers");
2328
+ var arrowTypesMap = {
2329
+ arrow_cross: "cross",
2330
+ arrow_point: "point",
2331
+ arrow_barb: "barb",
2332
+ arrow_circle: "circle",
2333
+ aggregation: "aggregation",
2334
+ extension: "extension",
2335
+ composition: "composition",
2336
+ dependency: "dependency",
2337
+ lollipop: "lollipop"
2338
+ };
2339
+ var addEdgeMarker = /* @__PURE__ */ __name$1((svgPath, position, arrowType, url, id, diagramType) => {
2340
+ const endMarkerType = arrowTypesMap[arrowType];
2341
+ if (!endMarkerType) {
2342
+ log.warn(`Unknown arrow type: ${arrowType}`);
2343
+ return;
2344
+ }
2345
+ const suffix = position === "start" ? "Start" : "End";
2346
+ svgPath.attr(`marker-${position}`, `url(${url}#${id}_${diagramType}-${endMarkerType}${suffix})`);
2347
+ }, "addEdgeMarker");
2348
+ var edgeLabels = {};
2349
+ var terminalLabels = {};
2350
+ var insertEdgeLabel = /* @__PURE__ */ __name$1(async (elem, edge) => {
2351
+ const config2 = getConfig2();
2352
+ const useHtmlLabels = getEffectiveHtmlLabels(config2);
2353
+ const edgeLabel = elem.insert("g").attr("class", "edgeLabel");
2354
+ const label = edgeLabel.insert("g").attr("class", "label");
2355
+ const isMarkdown = edge.labelType === "markdown";
2356
+ const labelElement = await createText(elem, edge.label, {
2357
+ style: edge.labelStyle,
2358
+ useHtmlLabels,
2359
+ addSvgBackground: isMarkdown,
2360
+ isNode: false,
2361
+ markdown: isMarkdown,
2362
+ width: isMarkdown ? void 0 : Number.POSITIVE_INFINITY
2363
+ }, config2);
2364
+ label.node().appendChild(labelElement);
2365
+ let bbox = labelElement.getBBox();
2366
+ let transformBbox = bbox;
2367
+ if (useHtmlLabels) {
2368
+ const div = labelElement.children[0];
2369
+ const dv = select_default(labelElement);
2370
+ bbox = div.getBoundingClientRect();
2371
+ transformBbox = bbox;
2372
+ dv.attr("width", bbox.width);
2373
+ dv.attr("height", bbox.height);
2374
+ } else {
2375
+ const textEl = select_default(labelElement).select("text").node();
2376
+ if (textEl && typeof textEl.getBBox === "function") transformBbox = textEl.getBBox();
2377
+ }
2378
+ label.attr("transform", computeLabelTransform(transformBbox, useHtmlLabels));
2379
+ edgeLabels[edge.id] = edgeLabel;
2380
+ edge.width = bbox.width;
2381
+ edge.height = bbox.height;
2382
+ let fo;
2383
+ if (edge.startLabelLeft) {
2384
+ const startEdgeLabelLeft = elem.insert("g").attr("class", "edgeTerminals");
2385
+ const inner = startEdgeLabelLeft.insert("g").attr("class", "inner");
2386
+ const startLabelElement = await createLabel_default(inner, edge.startLabelLeft, edge.labelStyle);
2387
+ fo = startLabelElement;
2388
+ let slBox = startLabelElement.getBBox();
2389
+ if (useHtmlLabels) {
2390
+ const div = startLabelElement.children[0];
2391
+ const dv = select_default(startLabelElement);
2392
+ slBox = div.getBoundingClientRect();
2393
+ dv.attr("width", slBox.width);
2394
+ dv.attr("height", slBox.height);
2395
+ }
2396
+ inner.attr("transform", computeLabelTransform(slBox, useHtmlLabels));
2397
+ if (!terminalLabels[edge.id]) terminalLabels[edge.id] = {};
2398
+ terminalLabels[edge.id].startLeft = startEdgeLabelLeft;
2399
+ setTerminalWidth(fo, edge.startLabelLeft);
2400
+ }
2401
+ if (edge.startLabelRight) {
2402
+ const startEdgeLabelRight = elem.insert("g").attr("class", "edgeTerminals");
2403
+ const inner = startEdgeLabelRight.insert("g").attr("class", "inner");
2404
+ const startLabelElement = await createLabel_default(inner, edge.startLabelRight, edge.labelStyle);
2405
+ fo = startLabelElement;
2406
+ let slBox = startLabelElement.getBBox();
2407
+ if (useHtmlLabels) {
2408
+ const div = startLabelElement.children[0];
2409
+ const dv = select_default(startLabelElement);
2410
+ slBox = div.getBoundingClientRect();
2411
+ dv.attr("width", slBox.width);
2412
+ dv.attr("height", slBox.height);
2413
+ }
2414
+ inner.attr("transform", computeLabelTransform(slBox, useHtmlLabels));
2415
+ if (!terminalLabels[edge.id]) terminalLabels[edge.id] = {};
2416
+ terminalLabels[edge.id].startRight = startEdgeLabelRight;
2417
+ setTerminalWidth(fo, edge.startLabelRight);
2418
+ }
2419
+ if (edge.endLabelLeft) {
2420
+ const endEdgeLabelLeft = elem.insert("g").attr("class", "edgeTerminals");
2421
+ const inner = endEdgeLabelLeft.insert("g").attr("class", "inner");
2422
+ const endLabelElement = await createLabel_default(endEdgeLabelLeft, edge.endLabelLeft, edge.labelStyle);
2423
+ fo = endLabelElement;
2424
+ let slBox = endLabelElement.getBBox();
2425
+ if (useHtmlLabels) {
2426
+ const div = endLabelElement.children[0];
2427
+ const dv = select_default(endLabelElement);
2428
+ slBox = div.getBoundingClientRect();
2429
+ dv.attr("width", slBox.width);
2430
+ dv.attr("height", slBox.height);
2431
+ }
2432
+ inner.attr("transform", computeLabelTransform(slBox, useHtmlLabels));
2433
+ if (!terminalLabels[edge.id]) terminalLabels[edge.id] = {};
2434
+ terminalLabels[edge.id].endLeft = endEdgeLabelLeft;
2435
+ setTerminalWidth(fo, edge.endLabelLeft);
2436
+ }
2437
+ if (edge.endLabelRight) {
2438
+ const endEdgeLabelRight = elem.insert("g").attr("class", "edgeTerminals");
2439
+ const inner = endEdgeLabelRight.insert("g").attr("class", "inner");
2440
+ const endLabelElement = await createLabel_default(endEdgeLabelRight, edge.endLabelRight, edge.labelStyle);
2441
+ fo = endLabelElement;
2442
+ let slBox = endLabelElement.getBBox();
2443
+ if (useHtmlLabels) {
2444
+ const div = endLabelElement.children[0];
2445
+ const dv = select_default(endLabelElement);
2446
+ slBox = div.getBoundingClientRect();
2447
+ dv.attr("width", slBox.width);
2448
+ dv.attr("height", slBox.height);
2449
+ }
2450
+ inner.attr("transform", computeLabelTransform(slBox, useHtmlLabels));
2451
+ if (!terminalLabels[edge.id]) terminalLabels[edge.id] = {};
2452
+ terminalLabels[edge.id].endRight = endEdgeLabelRight;
2453
+ setTerminalWidth(fo, edge.endLabelRight);
2454
+ }
2455
+ return labelElement;
2456
+ }, "insertEdgeLabel");
2457
+ function setTerminalWidth(fo, value) {
2458
+ if (getEffectiveHtmlLabels(getConfig2()) && fo) {
2459
+ fo.style.width = value.length * 9 + "px";
2460
+ fo.style.height = "12px";
2461
+ }
2462
+ }
2463
+ __name$1(setTerminalWidth, "setTerminalWidth");
2464
+ var positionEdgeLabel = /* @__PURE__ */ __name$1((edge, paths) => {
2465
+ log.debug("Moving label abc88 ", edge.id, edge.label, edgeLabels[edge.id], paths);
2466
+ let path = paths.updatedPath ? paths.updatedPath : paths.originalPath;
2467
+ const { subGraphTitleTotalMargin } = getSubGraphTitleMargins(getConfig2());
2468
+ if (edge.label) {
2469
+ const el = edgeLabels[edge.id];
2470
+ let x = edge.x;
2471
+ let y = edge.y;
2472
+ if (path) {
2473
+ const pos = utils_default.calcLabelPosition(path);
2474
+ log.debug("Moving label " + edge.label + " from (", x, ",", y, ") to (", pos.x, ",", pos.y, ") abc88");
2475
+ if (paths.updatedPath) {
2476
+ x = pos.x;
2477
+ y = pos.y;
2478
+ }
2479
+ }
2480
+ el.attr("transform", `translate(${x}, ${y + subGraphTitleTotalMargin / 2})`);
2481
+ }
2482
+ if (edge.startLabelLeft) {
2483
+ const el = terminalLabels[edge.id].startLeft;
2484
+ let x = edge.x;
2485
+ let y = edge.y;
2486
+ if (path) {
2487
+ const pos = utils_default.calcTerminalLabelPosition(edge.arrowTypeStart ? 10 : 0, "start_left", path);
2488
+ x = pos.x;
2489
+ y = pos.y;
2490
+ }
2491
+ el.attr("transform", `translate(${x}, ${y})`);
2492
+ }
2493
+ if (edge.startLabelRight) {
2494
+ const el = terminalLabels[edge.id].startRight;
2495
+ let x = edge.x;
2496
+ let y = edge.y;
2497
+ if (path) {
2498
+ const pos = utils_default.calcTerminalLabelPosition(edge.arrowTypeStart ? 10 : 0, "start_right", path);
2499
+ x = pos.x;
2500
+ y = pos.y;
2501
+ }
2502
+ el.attr("transform", `translate(${x}, ${y})`);
2503
+ }
2504
+ if (edge.endLabelLeft) {
2505
+ const el = terminalLabels[edge.id].endLeft;
2506
+ let x = edge.x;
2507
+ let y = edge.y;
2508
+ if (path) {
2509
+ const pos = utils_default.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, "end_left", path);
2510
+ x = pos.x;
2511
+ y = pos.y;
2512
+ }
2513
+ el.attr("transform", `translate(${x}, ${y})`);
2514
+ }
2515
+ if (edge.endLabelRight) {
2516
+ const el = terminalLabels[edge.id].endRight;
2517
+ let x = edge.x;
2518
+ let y = edge.y;
2519
+ if (path) {
2520
+ const pos = utils_default.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, "end_right", path);
2521
+ x = pos.x;
2522
+ y = pos.y;
2523
+ }
2524
+ el.attr("transform", `translate(${x}, ${y})`);
2525
+ }
2526
+ }, "positionEdgeLabel");
2527
+ var outsideNode = /* @__PURE__ */ __name$1((node, point2) => {
2528
+ const x = node.x;
2529
+ const y = node.y;
2530
+ const dx = Math.abs(point2.x - x);
2531
+ const dy = Math.abs(point2.y - y);
2532
+ const w = node.width / 2;
2533
+ const h = node.height / 2;
2534
+ if (dx >= w || dy >= h) return true;
2535
+ return false;
2536
+ }, "outsideNode");
2537
+ var intersection = /* @__PURE__ */ __name$1((node, outsidePoint, insidePoint) => {
2538
+ log.debug(`intersection calc abc89:
2539
+ outsidePoint: ${JSON.stringify(outsidePoint)}
2540
+ insidePoint : ${JSON.stringify(insidePoint)}
2541
+ node : x:${node.x} y:${node.y} w:${node.width} h:${node.height}`);
2542
+ const x = node.x;
2543
+ const y = node.y;
2544
+ const dx = Math.abs(x - insidePoint.x);
2545
+ const w = node.width / 2;
2546
+ let r = insidePoint.x < outsidePoint.x ? w - dx : w + dx;
2547
+ const h = node.height / 2;
2548
+ const Q = Math.abs(outsidePoint.y - insidePoint.y);
2549
+ const R = Math.abs(outsidePoint.x - insidePoint.x);
2550
+ if (Math.abs(y - outsidePoint.y) * w > Math.abs(x - outsidePoint.x) * h) {
2551
+ let q = insidePoint.y < outsidePoint.y ? outsidePoint.y - h - y : y - h - outsidePoint.y;
2552
+ r = R * q / Q;
2553
+ const res = {
2554
+ x: insidePoint.x < outsidePoint.x ? insidePoint.x + r : insidePoint.x - R + r,
2555
+ y: insidePoint.y < outsidePoint.y ? insidePoint.y + Q - q : insidePoint.y - Q + q
2556
+ };
2557
+ if (r === 0) {
2558
+ res.x = outsidePoint.x;
2559
+ res.y = outsidePoint.y;
2560
+ }
2561
+ if (R === 0) res.x = outsidePoint.x;
2562
+ if (Q === 0) res.y = outsidePoint.y;
2563
+ log.debug(`abc89 topp/bott calc, Q ${Q}, q ${q}, R ${R}, r ${r}`, res);
2564
+ return res;
2565
+ } else {
2566
+ if (insidePoint.x < outsidePoint.x) r = outsidePoint.x - w - x;
2567
+ else r = x - w - outsidePoint.x;
2568
+ let q = Q * r / R;
2569
+ let _x = insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : insidePoint.x - R + r;
2570
+ let _y = insidePoint.y < outsidePoint.y ? insidePoint.y + q : insidePoint.y - q;
2571
+ log.debug(`sides calc abc89, Q ${Q}, q ${q}, R ${R}, r ${r}`, {
2572
+ _x,
2573
+ _y
2574
+ });
2575
+ if (r === 0) {
2576
+ _x = outsidePoint.x;
2577
+ _y = outsidePoint.y;
2578
+ }
2579
+ if (R === 0) _x = outsidePoint.x;
2580
+ if (Q === 0) _y = outsidePoint.y;
2581
+ return {
2582
+ x: _x,
2583
+ y: _y
2584
+ };
2585
+ }
2586
+ }, "intersection");
2587
+ var cutPathAtIntersect = /* @__PURE__ */ __name$1((_points, boundaryNode) => {
2588
+ log.debug("abc88 cutPathAtIntersect", _points, boundaryNode);
2589
+ let points = [];
2590
+ let lastPointOutside = _points[0];
2591
+ let isInside = false;
2592
+ _points.forEach((point2) => {
2593
+ if (!outsideNode(boundaryNode, point2) && !isInside) {
2594
+ const inter = intersection(boundaryNode, lastPointOutside, point2);
2595
+ let pointPresent = false;
2596
+ points.forEach((p) => {
2597
+ pointPresent = pointPresent || p.x === inter.x && p.y === inter.y;
2598
+ });
2599
+ if (!points.some((e) => e.x === inter.x && e.y === inter.y)) points.push(inter);
2600
+ isInside = true;
2601
+ } else {
2602
+ lastPointOutside = point2;
2603
+ if (!isInside) points.push(point2);
2604
+ }
2605
+ });
2606
+ return points;
2607
+ }, "cutPathAtIntersect");
2608
+ var insertEdge = /* @__PURE__ */ __name$1(function(elem, e, edge, clusterDb, diagramType, graph, id) {
2609
+ let points = edge.points;
2610
+ log.debug("abc88 InsertEdge: edge=", edge, "e=", e);
2611
+ let pointsHasChanged = false;
2612
+ const tail = graph.node(e.v);
2613
+ var head = graph.node(e.w);
2614
+ if (head?.intersect && tail?.intersect) {
2615
+ points = points.slice(1, edge.points.length - 1);
2616
+ points.unshift(tail.intersect(points[0]));
2617
+ points.push(head.intersect(points[points.length - 1]));
2618
+ }
2619
+ if (edge.toCluster) {
2620
+ log.debug("to cluster abc88", clusterDb[edge.toCluster]);
2621
+ points = cutPathAtIntersect(edge.points, clusterDb[edge.toCluster].node);
2622
+ pointsHasChanged = true;
2623
+ }
2624
+ if (edge.fromCluster) {
2625
+ log.debug("from cluster abc88", clusterDb[edge.fromCluster]);
2626
+ points = cutPathAtIntersect(points.reverse(), clusterDb[edge.fromCluster].node).reverse();
2627
+ pointsHasChanged = true;
2628
+ }
2629
+ const lineData = points.filter((p) => !Number.isNaN(p.y));
2630
+ let curve = basis_default;
2631
+ if (edge.curve && (diagramType === "graph" || diagramType === "flowchart")) curve = edge.curve;
2632
+ const { x, y } = getLineFunctionsWithOffset(edge);
2633
+ const lineFunction = line_default().x(x).y(y).curve(curve);
2634
+ let strokeClasses;
2635
+ switch (edge.thickness) {
2636
+ case "normal":
2637
+ strokeClasses = "edge-thickness-normal";
2638
+ break;
2639
+ case "thick":
2640
+ strokeClasses = "edge-thickness-thick";
2641
+ break;
2642
+ case "invisible":
2643
+ strokeClasses = "edge-thickness-thick";
2644
+ break;
2645
+ default: strokeClasses = "";
2646
+ }
2647
+ switch (edge.pattern) {
2648
+ case "solid":
2649
+ strokeClasses += " edge-pattern-solid";
2650
+ break;
2651
+ case "dotted":
2652
+ strokeClasses += " edge-pattern-dotted";
2653
+ break;
2654
+ case "dashed":
2655
+ strokeClasses += " edge-pattern-dashed";
2656
+ break;
2657
+ }
2658
+ const svgPath = elem.append("path").attr("d", lineFunction(lineData)).attr("id", edge.id).attr("class", " " + strokeClasses + (edge.classes ? " " + edge.classes : "")).attr("style", edge.style);
2659
+ let url = "";
2660
+ if (getConfig2().flowchart.arrowMarkerAbsolute || getConfig2().state.arrowMarkerAbsolute) url = getUrl(true);
2661
+ addEdgeMarkers(svgPath, edge, url, id, diagramType);
2662
+ let paths = {};
2663
+ if (pointsHasChanged) paths.updatedPath = points;
2664
+ paths.originalPath = edge.points;
2665
+ return paths;
2666
+ }, "insertEdge");
2667
+ var expandAndDeduplicateDirections = /* @__PURE__ */ __name$1((directions) => {
2668
+ const uniqueDirections = /* @__PURE__ */ new Set();
2669
+ for (const direction of directions) switch (direction) {
2670
+ case "x":
2671
+ uniqueDirections.add("right");
2672
+ uniqueDirections.add("left");
2673
+ break;
2674
+ case "y":
2675
+ uniqueDirections.add("up");
2676
+ uniqueDirections.add("down");
2677
+ break;
2678
+ default:
2679
+ uniqueDirections.add(direction);
2680
+ break;
2681
+ }
2682
+ return uniqueDirections;
2683
+ }, "expandAndDeduplicateDirections");
2684
+ var getArrowPoints = /* @__PURE__ */ __name$1((duplicatedDirections, bbox, node, totalWidth) => {
2685
+ const directions = expandAndDeduplicateDirections(duplicatedDirections);
2686
+ const f = 2;
2687
+ const height = bbox.height + 2 * node.padding;
2688
+ const midpoint = height / f;
2689
+ const width = totalWidth ?? bbox.width + 2 * midpoint + node.padding;
2690
+ const padding2 = node.padding / 2;
2691
+ if (directions.has("right") && directions.has("left") && directions.has("up") && directions.has("down")) return [
2692
+ {
2693
+ x: 0,
2694
+ y: 0
2695
+ },
2696
+ {
2697
+ x: midpoint,
2698
+ y: 0
2699
+ },
2700
+ {
2701
+ x: width / 2,
2702
+ y: 2 * padding2
2703
+ },
2704
+ {
2705
+ x: width - midpoint,
2706
+ y: 0
2707
+ },
2708
+ {
2709
+ x: width,
2710
+ y: 0
2711
+ },
2712
+ {
2713
+ x: width,
2714
+ y: -height / 3
2715
+ },
2716
+ {
2717
+ x: width + 2 * padding2,
2718
+ y: -height / 2
2719
+ },
2720
+ {
2721
+ x: width,
2722
+ y: -2 * height / 3
2723
+ },
2724
+ {
2725
+ x: width,
2726
+ y: -height
2727
+ },
2728
+ {
2729
+ x: width - midpoint,
2730
+ y: -height
2731
+ },
2732
+ {
2733
+ x: width / 2,
2734
+ y: -height - 2 * padding2
2735
+ },
2736
+ {
2737
+ x: midpoint,
2738
+ y: -height
2739
+ },
2740
+ {
2741
+ x: 0,
2742
+ y: -height
2743
+ },
2744
+ {
2745
+ x: 0,
2746
+ y: -2 * height / 3
2747
+ },
2748
+ {
2749
+ x: -2 * padding2,
2750
+ y: -height / 2
2751
+ },
2752
+ {
2753
+ x: 0,
2754
+ y: -height / 3
2755
+ }
2756
+ ];
2757
+ if (directions.has("right") && directions.has("left") && directions.has("up")) return [
2758
+ {
2759
+ x: midpoint,
2760
+ y: 0
2761
+ },
2762
+ {
2763
+ x: width - midpoint,
2764
+ y: 0
2765
+ },
2766
+ {
2767
+ x: width,
2768
+ y: -height / 2
2769
+ },
2770
+ {
2771
+ x: width - midpoint,
2772
+ y: -height
2773
+ },
2774
+ {
2775
+ x: midpoint,
2776
+ y: -height
2777
+ },
2778
+ {
2779
+ x: 0,
2780
+ y: -height / 2
2781
+ }
2782
+ ];
2783
+ if (directions.has("right") && directions.has("left") && directions.has("down")) return [
2784
+ {
2785
+ x: 0,
2786
+ y: 0
2787
+ },
2788
+ {
2789
+ x: midpoint,
2790
+ y: -height
2791
+ },
2792
+ {
2793
+ x: width - midpoint,
2794
+ y: -height
2795
+ },
2796
+ {
2797
+ x: width,
2798
+ y: 0
2799
+ }
2800
+ ];
2801
+ if (directions.has("right") && directions.has("up") && directions.has("down")) return [
2802
+ {
2803
+ x: 0,
2804
+ y: 0
2805
+ },
2806
+ {
2807
+ x: width,
2808
+ y: -midpoint
2809
+ },
2810
+ {
2811
+ x: width,
2812
+ y: -height + midpoint
2813
+ },
2814
+ {
2815
+ x: 0,
2816
+ y: -height
2817
+ }
2818
+ ];
2819
+ if (directions.has("left") && directions.has("up") && directions.has("down")) return [
2820
+ {
2821
+ x: width,
2822
+ y: 0
2823
+ },
2824
+ {
2825
+ x: 0,
2826
+ y: -midpoint
2827
+ },
2828
+ {
2829
+ x: 0,
2830
+ y: -height + midpoint
2831
+ },
2832
+ {
2833
+ x: width,
2834
+ y: -height
2835
+ }
2836
+ ];
2837
+ if (directions.has("right") && directions.has("left")) return [
2838
+ {
2839
+ x: midpoint,
2840
+ y: 0
2841
+ },
2842
+ {
2843
+ x: midpoint,
2844
+ y: -padding2
2845
+ },
2846
+ {
2847
+ x: width - midpoint,
2848
+ y: -padding2
2849
+ },
2850
+ {
2851
+ x: width - midpoint,
2852
+ y: 0
2853
+ },
2854
+ {
2855
+ x: width,
2856
+ y: -height / 2
2857
+ },
2858
+ {
2859
+ x: width - midpoint,
2860
+ y: -height
2861
+ },
2862
+ {
2863
+ x: width - midpoint,
2864
+ y: -height + padding2
2865
+ },
2866
+ {
2867
+ x: midpoint,
2868
+ y: -height + padding2
2869
+ },
2870
+ {
2871
+ x: midpoint,
2872
+ y: -height
2873
+ },
2874
+ {
2875
+ x: 0,
2876
+ y: -height / 2
2877
+ }
2878
+ ];
2879
+ if (directions.has("up") && directions.has("down")) return [
2880
+ {
2881
+ x: width / 2,
2882
+ y: 0
2883
+ },
2884
+ {
2885
+ x: 0,
2886
+ y: -padding2
2887
+ },
2888
+ {
2889
+ x: midpoint,
2890
+ y: -padding2
2891
+ },
2892
+ {
2893
+ x: midpoint,
2894
+ y: -height + padding2
2895
+ },
2896
+ {
2897
+ x: 0,
2898
+ y: -height + padding2
2899
+ },
2900
+ {
2901
+ x: width / 2,
2902
+ y: -height
2903
+ },
2904
+ {
2905
+ x: width,
2906
+ y: -height + padding2
2907
+ },
2908
+ {
2909
+ x: width - midpoint,
2910
+ y: -height + padding2
2911
+ },
2912
+ {
2913
+ x: width - midpoint,
2914
+ y: -padding2
2915
+ },
2916
+ {
2917
+ x: width,
2918
+ y: -padding2
2919
+ }
2920
+ ];
2921
+ if (directions.has("right") && directions.has("up")) return [
2922
+ {
2923
+ x: 0,
2924
+ y: 0
2925
+ },
2926
+ {
2927
+ x: width,
2928
+ y: -midpoint
2929
+ },
2930
+ {
2931
+ x: 0,
2932
+ y: -height
2933
+ }
2934
+ ];
2935
+ if (directions.has("right") && directions.has("down")) return [
2936
+ {
2937
+ x: 0,
2938
+ y: 0
2939
+ },
2940
+ {
2941
+ x: width,
2942
+ y: 0
2943
+ },
2944
+ {
2945
+ x: 0,
2946
+ y: -height
2947
+ }
2948
+ ];
2949
+ if (directions.has("left") && directions.has("up")) return [
2950
+ {
2951
+ x: width,
2952
+ y: 0
2953
+ },
2954
+ {
2955
+ x: 0,
2956
+ y: -midpoint
2957
+ },
2958
+ {
2959
+ x: width,
2960
+ y: -height
2961
+ }
2962
+ ];
2963
+ if (directions.has("left") && directions.has("down")) return [
2964
+ {
2965
+ x: width,
2966
+ y: 0
2967
+ },
2968
+ {
2969
+ x: 0,
2970
+ y: 0
2971
+ },
2972
+ {
2973
+ x: width,
2974
+ y: -height
2975
+ }
2976
+ ];
2977
+ if (directions.has("right")) return [
2978
+ {
2979
+ x: midpoint,
2980
+ y: -padding2
2981
+ },
2982
+ {
2983
+ x: midpoint,
2984
+ y: -padding2
2985
+ },
2986
+ {
2987
+ x: width - midpoint,
2988
+ y: -padding2
2989
+ },
2990
+ {
2991
+ x: width - midpoint,
2992
+ y: 0
2993
+ },
2994
+ {
2995
+ x: width,
2996
+ y: -height / 2
2997
+ },
2998
+ {
2999
+ x: width - midpoint,
3000
+ y: -height
3001
+ },
3002
+ {
3003
+ x: width - midpoint,
3004
+ y: -height + padding2
3005
+ },
3006
+ {
3007
+ x: midpoint,
3008
+ y: -height + padding2
3009
+ },
3010
+ {
3011
+ x: midpoint,
3012
+ y: -height + padding2
3013
+ }
3014
+ ];
3015
+ if (directions.has("left")) return [
3016
+ {
3017
+ x: midpoint,
3018
+ y: 0
3019
+ },
3020
+ {
3021
+ x: midpoint,
3022
+ y: -padding2
3023
+ },
3024
+ {
3025
+ x: width - midpoint,
3026
+ y: -padding2
3027
+ },
3028
+ {
3029
+ x: width - midpoint,
3030
+ y: -height + padding2
3031
+ },
3032
+ {
3033
+ x: midpoint,
3034
+ y: -height + padding2
3035
+ },
3036
+ {
3037
+ x: midpoint,
3038
+ y: -height
3039
+ },
3040
+ {
3041
+ x: 0,
3042
+ y: -height / 2
3043
+ }
3044
+ ];
3045
+ if (directions.has("up")) return [
3046
+ {
3047
+ x: midpoint,
3048
+ y: -padding2
3049
+ },
3050
+ {
3051
+ x: midpoint,
3052
+ y: -height + padding2
3053
+ },
3054
+ {
3055
+ x: 0,
3056
+ y: -height + padding2
3057
+ },
3058
+ {
3059
+ x: width / 2,
3060
+ y: -height
3061
+ },
3062
+ {
3063
+ x: width,
3064
+ y: -height + padding2
3065
+ },
3066
+ {
3067
+ x: width - midpoint,
3068
+ y: -height + padding2
3069
+ },
3070
+ {
3071
+ x: width - midpoint,
3072
+ y: -padding2
3073
+ }
3074
+ ];
3075
+ if (directions.has("down")) return [
3076
+ {
3077
+ x: width / 2,
3078
+ y: 0
3079
+ },
3080
+ {
3081
+ x: 0,
3082
+ y: -padding2
3083
+ },
3084
+ {
3085
+ x: midpoint,
3086
+ y: -padding2
3087
+ },
3088
+ {
3089
+ x: midpoint,
3090
+ y: -height + padding2
3091
+ },
3092
+ {
3093
+ x: width - midpoint,
3094
+ y: -height + padding2
3095
+ },
3096
+ {
3097
+ x: width - midpoint,
3098
+ y: -padding2
3099
+ },
3100
+ {
3101
+ x: width,
3102
+ y: -padding2
3103
+ }
3104
+ ];
3105
+ return [{
3106
+ x: 0,
3107
+ y: 0
3108
+ }];
3109
+ }, "getArrowPoints");
3110
+ function intersectNode(node, point2) {
3111
+ return node.intersect(point2);
3112
+ }
3113
+ __name$1(intersectNode, "intersectNode");
3114
+ var intersect_node_default = intersectNode;
3115
+ function intersectEllipse(node, rx, ry, point2) {
3116
+ var cx = node.x;
3117
+ var cy = node.y;
3118
+ var px = cx - point2.x;
3119
+ var py = cy - point2.y;
3120
+ var det = Math.sqrt(rx * rx * py * py + ry * ry * px * px);
3121
+ var dx = Math.abs(rx * ry * px / det);
3122
+ if (point2.x < cx) dx = -dx;
3123
+ var dy = Math.abs(rx * ry * py / det);
3124
+ if (point2.y < cy) dy = -dy;
3125
+ return {
3126
+ x: cx + dx,
3127
+ y: cy + dy
3128
+ };
3129
+ }
3130
+ __name$1(intersectEllipse, "intersectEllipse");
3131
+ var intersect_ellipse_default = intersectEllipse;
3132
+ function intersectCircle(node, rx, point2) {
3133
+ return intersect_ellipse_default(node, rx, rx, point2);
3134
+ }
3135
+ __name$1(intersectCircle, "intersectCircle");
3136
+ var intersect_circle_default = intersectCircle;
3137
+ function intersectLine(p1, p2, q1, q2) {
3138
+ var a1;
3139
+ var a2;
3140
+ var b1;
3141
+ var b2;
3142
+ var c1;
3143
+ var c2;
3144
+ var r1;
3145
+ var r2;
3146
+ var r3;
3147
+ var r4;
3148
+ var denom;
3149
+ var offset;
3150
+ var num;
3151
+ var x;
3152
+ var y;
3153
+ a1 = p2.y - p1.y;
3154
+ b1 = p1.x - p2.x;
3155
+ c1 = p2.x * p1.y - p1.x * p2.y;
3156
+ r3 = a1 * q1.x + b1 * q1.y + c1;
3157
+ r4 = a1 * q2.x + b1 * q2.y + c1;
3158
+ if (r3 !== 0 && r4 !== 0 && sameSign(r3, r4)) return;
3159
+ a2 = q2.y - q1.y;
3160
+ b2 = q1.x - q2.x;
3161
+ c2 = q2.x * q1.y - q1.x * q2.y;
3162
+ r1 = a2 * p1.x + b2 * p1.y + c2;
3163
+ r2 = a2 * p2.x + b2 * p2.y + c2;
3164
+ if (r1 !== 0 && r2 !== 0 && sameSign(r1, r2)) return;
3165
+ denom = a1 * b2 - a2 * b1;
3166
+ if (denom === 0) return;
3167
+ offset = Math.abs(denom / 2);
3168
+ num = b1 * c2 - b2 * c1;
3169
+ x = num < 0 ? (num - offset) / denom : (num + offset) / denom;
3170
+ num = a2 * c1 - a1 * c2;
3171
+ y = num < 0 ? (num - offset) / denom : (num + offset) / denom;
3172
+ return {
3173
+ x,
3174
+ y
3175
+ };
3176
+ }
3177
+ __name$1(intersectLine, "intersectLine");
3178
+ function sameSign(r1, r2) {
3179
+ return r1 * r2 > 0;
3180
+ }
3181
+ __name$1(sameSign, "sameSign");
3182
+ var intersect_line_default = intersectLine;
3183
+ var intersect_polygon_default = intersectPolygon;
3184
+ function intersectPolygon(node, polyPoints, point2) {
3185
+ var x1 = node.x;
3186
+ var y1 = node.y;
3187
+ var intersections = [];
3188
+ var minX = Number.POSITIVE_INFINITY;
3189
+ var minY = Number.POSITIVE_INFINITY;
3190
+ if (typeof polyPoints.forEach === "function") polyPoints.forEach(function(entry) {
3191
+ minX = Math.min(minX, entry.x);
3192
+ minY = Math.min(minY, entry.y);
3193
+ });
3194
+ else {
3195
+ minX = Math.min(minX, polyPoints.x);
3196
+ minY = Math.min(minY, polyPoints.y);
3197
+ }
3198
+ var left = x1 - node.width / 2 - minX;
3199
+ var top = y1 - node.height / 2 - minY;
3200
+ for (var i = 0; i < polyPoints.length; i++) {
3201
+ var p1 = polyPoints[i];
3202
+ var p2 = polyPoints[i < polyPoints.length - 1 ? i + 1 : 0];
3203
+ var intersect = intersect_line_default(node, point2, {
3204
+ x: left + p1.x,
3205
+ y: top + p1.y
3206
+ }, {
3207
+ x: left + p2.x,
3208
+ y: top + p2.y
3209
+ });
3210
+ if (intersect) intersections.push(intersect);
3211
+ }
3212
+ if (!intersections.length) return node;
3213
+ if (intersections.length > 1) intersections.sort(function(p, q) {
3214
+ var pdx = p.x - point2.x;
3215
+ var pdy = p.y - point2.y;
3216
+ var distp = Math.sqrt(pdx * pdx + pdy * pdy);
3217
+ var qdx = q.x - point2.x;
3218
+ var qdy = q.y - point2.y;
3219
+ var distq = Math.sqrt(qdx * qdx + qdy * qdy);
3220
+ return distp < distq ? -1 : distp === distq ? 0 : 1;
3221
+ });
3222
+ return intersections[0];
3223
+ }
3224
+ __name$1(intersectPolygon, "intersectPolygon");
3225
+ var intersect_default = {
3226
+ node: intersect_node_default,
3227
+ circle: intersect_circle_default,
3228
+ ellipse: intersect_ellipse_default,
3229
+ polygon: intersect_polygon_default,
3230
+ rect: /* @__PURE__ */ __name$1((node, point2) => {
3231
+ var x = node.x;
3232
+ var y = node.y;
3233
+ var dx = point2.x - x;
3234
+ var dy = point2.y - y;
3235
+ var w = node.width / 2;
3236
+ var h = node.height / 2;
3237
+ var sx;
3238
+ var sy;
3239
+ if (Math.abs(dy) * w > Math.abs(dx) * h) {
3240
+ if (dy < 0) h = -h;
3241
+ sx = dy === 0 ? 0 : h * dx / dy;
3242
+ sy = h;
3243
+ } else {
3244
+ if (dx < 0) w = -w;
3245
+ sx = w;
3246
+ sy = dx === 0 ? 0 : w * dy / dx;
3247
+ }
3248
+ return {
3249
+ x: x + sx,
3250
+ y: y + sy
3251
+ };
3252
+ }, "intersectRect")
3253
+ };
3254
+ var labelHelper = /* @__PURE__ */ __name$1(async (parent, node, _classes, isNode) => {
3255
+ const config2 = getConfig2();
3256
+ let classes2;
3257
+ const useHtmlLabels = node.useHtmlLabels || getEffectiveHtmlLabels(config2);
3258
+ if (!_classes) classes2 = "node default";
3259
+ else classes2 = _classes;
3260
+ const shapeSvg = parent.insert("g").attr("class", classes2).attr("id", node.domId || node.id);
3261
+ const label = shapeSvg.insert("g").attr("class", "label").attr("style", node.labelStyle);
3262
+ let labelText;
3263
+ if (node.labelText === void 0) labelText = "";
3264
+ else labelText = typeof node.labelText === "string" ? node.labelText : node.labelText[0];
3265
+ let text;
3266
+ if (node.labelType === "markdown") text = createText(label, sanitizeText(decodeEntities(labelText), config2), {
3267
+ useHtmlLabels,
3268
+ width: node.width || config2.flowchart.wrappingWidth,
3269
+ classes: "markdown-node-label"
3270
+ }, config2);
3271
+ else text = await createLabel_default(label, sanitizeText(decodeEntities(labelText), config2), node.labelStyle, false, isNode);
3272
+ let bbox = text.getBBox();
3273
+ const halfPadding = node.padding / 2;
3274
+ if (getEffectiveHtmlLabels(config2)) {
3275
+ const div = text.children[0];
3276
+ const dv = select_default(text);
3277
+ await configureLabelImages(div, labelText);
3278
+ bbox = div.getBoundingClientRect();
3279
+ dv.attr("width", bbox.width);
3280
+ dv.attr("height", bbox.height);
3281
+ }
3282
+ if (useHtmlLabels) label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")");
3283
+ else label.attr("transform", "translate(0, " + -bbox.height / 2 + ")");
3284
+ if (node.centerLabel) label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")");
3285
+ label.insert("rect", ":first-child");
3286
+ return {
3287
+ shapeSvg,
3288
+ bbox,
3289
+ halfPadding,
3290
+ label
3291
+ };
3292
+ }, "labelHelper");
3293
+ var updateNodeBounds = /* @__PURE__ */ __name$1((node, element) => {
3294
+ const bbox = element.node().getBBox();
3295
+ node.width = bbox.width;
3296
+ node.height = bbox.height;
3297
+ }, "updateNodeBounds");
3298
+ function insertPolygonShape(parent, w, h, points) {
3299
+ return parent.insert("polygon", ":first-child").attr("points", points.map(function(d) {
3300
+ return d.x + "," + d.y;
3301
+ }).join(" ")).attr("class", "label-container").attr("transform", "translate(" + -w / 2 + "," + h / 2 + ")");
3302
+ }
3303
+ __name$1(insertPolygonShape, "insertPolygonShape");
3304
+ var note_default = /* @__PURE__ */ __name$1(async (parent, node) => {
3305
+ if (!(node.useHtmlLabels || getEffectiveHtmlLabels(getConfig2()))) node.centerLabel = true;
3306
+ const { shapeSvg, bbox, halfPadding } = await labelHelper(parent, node, "node " + node.classes, true);
3307
+ log.info("Classes = ", node.classes);
3308
+ const rect2 = shapeSvg.insert("rect", ":first-child");
3309
+ rect2.attr("rx", node.rx).attr("ry", node.ry).attr("x", -bbox.width / 2 - halfPadding).attr("y", -bbox.height / 2 - halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding);
3310
+ updateNodeBounds(node, rect2);
3311
+ node.intersect = function(point2) {
3312
+ return intersect_default.rect(node, point2);
3313
+ };
3314
+ return shapeSvg;
3315
+ }, "note");
3316
+ var formatClass = /* @__PURE__ */ __name$1((str) => {
3317
+ if (str) return " " + str;
3318
+ return "";
3319
+ }, "formatClass");
3320
+ var getClassesFromNode = /* @__PURE__ */ __name$1((node, otherClasses) => {
3321
+ return `${otherClasses ? otherClasses : "node default"}${formatClass(node.classes)} ${formatClass(node.class)}`;
3322
+ }, "getClassesFromNode");
3323
+ var question = /* @__PURE__ */ __name$1(async (parent, node) => {
3324
+ const { shapeSvg, bbox } = await labelHelper(parent, node, getClassesFromNode(node, void 0), true);
3325
+ const s = bbox.width + node.padding + (bbox.height + node.padding);
3326
+ const points = [
3327
+ {
3328
+ x: s / 2,
3329
+ y: 0
3330
+ },
3331
+ {
3332
+ x: s,
3333
+ y: -s / 2
3334
+ },
3335
+ {
3336
+ x: s / 2,
3337
+ y: -s
3338
+ },
3339
+ {
3340
+ x: 0,
3341
+ y: -s / 2
3342
+ }
3343
+ ];
3344
+ log.info("Question main (Circle)");
3345
+ const questionElem = insertPolygonShape(shapeSvg, s, s, points);
3346
+ questionElem.attr("style", node.style);
3347
+ updateNodeBounds(node, questionElem);
3348
+ node.intersect = function(point2) {
3349
+ log.warn("Intersect called");
3350
+ return intersect_default.polygon(node, points, point2);
3351
+ };
3352
+ return shapeSvg;
3353
+ }, "question");
3354
+ var choice = /* @__PURE__ */ __name$1((parent, node) => {
3355
+ const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id);
3356
+ const s = 28;
3357
+ const points = [
3358
+ {
3359
+ x: 0,
3360
+ y: s / 2
3361
+ },
3362
+ {
3363
+ x: s / 2,
3364
+ y: 0
3365
+ },
3366
+ {
3367
+ x: 0,
3368
+ y: -s / 2
3369
+ },
3370
+ {
3371
+ x: -s / 2,
3372
+ y: 0
3373
+ }
3374
+ ];
3375
+ shapeSvg.insert("polygon", ":first-child").attr("points", points.map(function(d) {
3376
+ return d.x + "," + d.y;
3377
+ }).join(" ")).attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28);
3378
+ node.width = 28;
3379
+ node.height = 28;
3380
+ node.intersect = function(point2) {
3381
+ return intersect_default.circle(node, 14, point2);
3382
+ };
3383
+ return shapeSvg;
3384
+ }, "choice");
3385
+ var hexagon = /* @__PURE__ */ __name$1(async (parent, node) => {
3386
+ const { shapeSvg, bbox } = await labelHelper(parent, node, getClassesFromNode(node, void 0), true);
3387
+ const f = 4;
3388
+ const h = node.positioned ? node.height : bbox.height + node.padding;
3389
+ const m = h / f;
3390
+ const w = node.positioned ? node.width : bbox.width + 2 * m + node.padding;
3391
+ const points = [
3392
+ {
3393
+ x: m,
3394
+ y: 0
3395
+ },
3396
+ {
3397
+ x: w - m,
3398
+ y: 0
3399
+ },
3400
+ {
3401
+ x: w,
3402
+ y: -h / 2
3403
+ },
3404
+ {
3405
+ x: w - m,
3406
+ y: -h
3407
+ },
3408
+ {
3409
+ x: m,
3410
+ y: -h
3411
+ },
3412
+ {
3413
+ x: 0,
3414
+ y: -h / 2
3415
+ }
3416
+ ];
3417
+ const hex = insertPolygonShape(shapeSvg, w, h, points);
3418
+ hex.attr("style", node.style);
3419
+ updateNodeBounds(node, hex);
3420
+ node.intersect = function(point2) {
3421
+ return intersect_default.polygon(node, points, point2);
3422
+ };
3423
+ return shapeSvg;
3424
+ }, "hexagon");
3425
+ var block_arrow = /* @__PURE__ */ __name$1(async (parent, node) => {
3426
+ const { shapeSvg, bbox } = await labelHelper(parent, node, void 0, true);
3427
+ const f = 2;
3428
+ const h = bbox.height + 2 * node.padding;
3429
+ const m = h / f;
3430
+ const naturalW = bbox.width + 2 * m + node.padding;
3431
+ const w = node.positioned && (node.widthInColumns ?? 1) > 1 && node.width > naturalW ? node.width : naturalW;
3432
+ const points = getArrowPoints(node.directions, bbox, node, w);
3433
+ const blockArrow = insertPolygonShape(shapeSvg, w, h, points);
3434
+ blockArrow.attr("style", node.style);
3435
+ updateNodeBounds(node, blockArrow);
3436
+ node.intersect = function(point2) {
3437
+ return intersect_default.polygon(node, points, point2);
3438
+ };
3439
+ return shapeSvg;
3440
+ }, "block_arrow");
3441
+ var rect_left_inv_arrow = /* @__PURE__ */ __name$1(async (parent, node) => {
3442
+ const { shapeSvg, bbox } = await labelHelper(parent, node, getClassesFromNode(node, void 0), true);
3443
+ const w = bbox.width + node.padding;
3444
+ const h = bbox.height + node.padding;
3445
+ const points = [
3446
+ {
3447
+ x: -h / 2,
3448
+ y: 0
3449
+ },
3450
+ {
3451
+ x: w,
3452
+ y: 0
3453
+ },
3454
+ {
3455
+ x: w,
3456
+ y: -h
3457
+ },
3458
+ {
3459
+ x: -h / 2,
3460
+ y: -h
3461
+ },
3462
+ {
3463
+ x: 0,
3464
+ y: -h / 2
3465
+ }
3466
+ ];
3467
+ insertPolygonShape(shapeSvg, w, h, points).attr("style", node.style);
3468
+ node.width = w + h;
3469
+ node.height = h;
3470
+ node.intersect = function(point2) {
3471
+ return intersect_default.polygon(node, points, point2);
3472
+ };
3473
+ return shapeSvg;
3474
+ }, "rect_left_inv_arrow");
3475
+ var lean_right = /* @__PURE__ */ __name$1(async (parent, node) => {
3476
+ const { shapeSvg, bbox } = await labelHelper(parent, node, getClassesFromNode(node), true);
3477
+ const w = bbox.width + node.padding;
3478
+ const h = bbox.height + node.padding;
3479
+ const points = [
3480
+ {
3481
+ x: -2 * h / 6,
3482
+ y: 0
3483
+ },
3484
+ {
3485
+ x: w - h / 6,
3486
+ y: 0
3487
+ },
3488
+ {
3489
+ x: w + 2 * h / 6,
3490
+ y: -h
3491
+ },
3492
+ {
3493
+ x: h / 6,
3494
+ y: -h
3495
+ }
3496
+ ];
3497
+ const el = insertPolygonShape(shapeSvg, w, h, points);
3498
+ el.attr("style", node.style);
3499
+ updateNodeBounds(node, el);
3500
+ node.intersect = function(point2) {
3501
+ return intersect_default.polygon(node, points, point2);
3502
+ };
3503
+ return shapeSvg;
3504
+ }, "lean_right");
3505
+ var lean_left = /* @__PURE__ */ __name$1(async (parent, node) => {
3506
+ const { shapeSvg, bbox } = await labelHelper(parent, node, getClassesFromNode(node, void 0), true);
3507
+ const w = bbox.width + node.padding;
3508
+ const h = bbox.height + node.padding;
3509
+ const points = [
3510
+ {
3511
+ x: 2 * h / 6,
3512
+ y: 0
3513
+ },
3514
+ {
3515
+ x: w + h / 6,
3516
+ y: 0
3517
+ },
3518
+ {
3519
+ x: w - 2 * h / 6,
3520
+ y: -h
3521
+ },
3522
+ {
3523
+ x: -h / 6,
3524
+ y: -h
3525
+ }
3526
+ ];
3527
+ const el = insertPolygonShape(shapeSvg, w, h, points);
3528
+ el.attr("style", node.style);
3529
+ updateNodeBounds(node, el);
3530
+ node.intersect = function(point2) {
3531
+ return intersect_default.polygon(node, points, point2);
3532
+ };
3533
+ return shapeSvg;
3534
+ }, "lean_left");
3535
+ var trapezoid = /* @__PURE__ */ __name$1(async (parent, node) => {
3536
+ const { shapeSvg, bbox } = await labelHelper(parent, node, getClassesFromNode(node, void 0), true);
3537
+ const w = bbox.width + node.padding;
3538
+ const h = bbox.height + node.padding;
3539
+ const points = [
3540
+ {
3541
+ x: -2 * h / 6,
3542
+ y: 0
3543
+ },
3544
+ {
3545
+ x: w + 2 * h / 6,
3546
+ y: 0
3547
+ },
3548
+ {
3549
+ x: w - h / 6,
3550
+ y: -h
3551
+ },
3552
+ {
3553
+ x: h / 6,
3554
+ y: -h
3555
+ }
3556
+ ];
3557
+ const el = insertPolygonShape(shapeSvg, w, h, points);
3558
+ el.attr("style", node.style);
3559
+ updateNodeBounds(node, el);
3560
+ node.intersect = function(point2) {
3561
+ return intersect_default.polygon(node, points, point2);
3562
+ };
3563
+ return shapeSvg;
3564
+ }, "trapezoid");
3565
+ var inv_trapezoid = /* @__PURE__ */ __name$1(async (parent, node) => {
3566
+ const { shapeSvg, bbox } = await labelHelper(parent, node, getClassesFromNode(node, void 0), true);
3567
+ const w = bbox.width + node.padding;
3568
+ const h = bbox.height + node.padding;
3569
+ const points = [
3570
+ {
3571
+ x: h / 6,
3572
+ y: 0
3573
+ },
3574
+ {
3575
+ x: w - h / 6,
3576
+ y: 0
3577
+ },
3578
+ {
3579
+ x: w + 2 * h / 6,
3580
+ y: -h
3581
+ },
3582
+ {
3583
+ x: -2 * h / 6,
3584
+ y: -h
3585
+ }
3586
+ ];
3587
+ const el = insertPolygonShape(shapeSvg, w, h, points);
3588
+ el.attr("style", node.style);
3589
+ updateNodeBounds(node, el);
3590
+ node.intersect = function(point2) {
3591
+ return intersect_default.polygon(node, points, point2);
3592
+ };
3593
+ return shapeSvg;
3594
+ }, "inv_trapezoid");
3595
+ var rect_right_inv_arrow = /* @__PURE__ */ __name$1(async (parent, node) => {
3596
+ const { shapeSvg, bbox } = await labelHelper(parent, node, getClassesFromNode(node, void 0), true);
3597
+ const w = bbox.width + node.padding;
3598
+ const h = bbox.height + node.padding;
3599
+ const points = [
3600
+ {
3601
+ x: 0,
3602
+ y: 0
3603
+ },
3604
+ {
3605
+ x: w + h / 2,
3606
+ y: 0
3607
+ },
3608
+ {
3609
+ x: w,
3610
+ y: -h / 2
3611
+ },
3612
+ {
3613
+ x: w + h / 2,
3614
+ y: -h
3615
+ },
3616
+ {
3617
+ x: 0,
3618
+ y: -h
3619
+ }
3620
+ ];
3621
+ const el = insertPolygonShape(shapeSvg, w, h, points);
3622
+ el.attr("style", node.style);
3623
+ updateNodeBounds(node, el);
3624
+ node.intersect = function(point2) {
3625
+ return intersect_default.polygon(node, points, point2);
3626
+ };
3627
+ return shapeSvg;
3628
+ }, "rect_right_inv_arrow");
3629
+ var cylinder = /* @__PURE__ */ __name$1(async (parent, node) => {
3630
+ const { shapeSvg, bbox } = await labelHelper(parent, node, getClassesFromNode(node, void 0), true);
3631
+ const w = bbox.width + node.padding;
3632
+ const rx = w / 2;
3633
+ const ry = rx / (2.5 + w / 50);
3634
+ const h = bbox.height + ry + node.padding;
3635
+ const shape = "M 0," + ry + " a " + rx + "," + ry + " 0,0,0 " + w + " 0 a " + rx + "," + ry + " 0,0,0 " + -w + " 0 l 0," + h + " a " + rx + "," + ry + " 0,0,0 " + w + " 0 l 0," + -h;
3636
+ updateNodeBounds(node, shapeSvg.attr("label-offset-y", ry).insert("path", ":first-child").attr("style", node.style).attr("d", shape).attr("transform", "translate(" + -w / 2 + "," + -(h / 2 + ry) + ")"));
3637
+ node.intersect = function(point2) {
3638
+ const pos = intersect_default.rect(node, point2);
3639
+ const x = pos.x - node.x;
3640
+ if (rx != 0 && (Math.abs(x) < node.width / 2 || Math.abs(x) == node.width / 2 && Math.abs(pos.y - node.y) > node.height / 2 - ry)) {
3641
+ let y = ry * ry * (1 - x * x / (rx * rx));
3642
+ if (y != 0) y = Math.sqrt(y);
3643
+ y = ry - y;
3644
+ if (point2.y - node.y > 0) y = -y;
3645
+ pos.y += y;
3646
+ }
3647
+ return pos;
3648
+ };
3649
+ return shapeSvg;
3650
+ }, "cylinder");
3651
+ var rect = /* @__PURE__ */ __name$1(async (parent, node) => {
3652
+ const { shapeSvg, bbox, halfPadding } = await labelHelper(parent, node, "node " + node.classes + " " + node.class, true);
3653
+ const rect2 = shapeSvg.insert("rect", ":first-child");
3654
+ const totalWidth = node.positioned ? node.width : bbox.width + node.padding;
3655
+ const totalHeight = node.positioned ? node.height : bbox.height + node.padding;
3656
+ const x = node.positioned ? -totalWidth / 2 : -bbox.width / 2 - halfPadding;
3657
+ const y = node.positioned ? -totalHeight / 2 : -bbox.height / 2 - halfPadding;
3658
+ rect2.attr("class", "basic label-container").attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("x", x).attr("y", y).attr("width", totalWidth).attr("height", totalHeight);
3659
+ if (node.props) {
3660
+ const propKeys = new Set(Object.keys(node.props));
3661
+ if (node.props.borders) {
3662
+ applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight);
3663
+ propKeys.delete("borders");
3664
+ }
3665
+ propKeys.forEach((propKey) => {
3666
+ log.warn(`Unknown node property ${propKey}`);
3667
+ });
3668
+ }
3669
+ updateNodeBounds(node, rect2);
3670
+ node.intersect = function(point2) {
3671
+ return intersect_default.rect(node, point2);
3672
+ };
3673
+ return shapeSvg;
3674
+ }, "rect");
3675
+ var composite = /* @__PURE__ */ __name$1(async (parent, node) => {
3676
+ const { shapeSvg, bbox, halfPadding } = await labelHelper(parent, node, "node " + node.classes, true);
3677
+ const rect2 = shapeSvg.insert("rect", ":first-child");
3678
+ const totalWidth = node.positioned ? node.width : bbox.width + node.padding;
3679
+ const totalHeight = node.positioned ? node.height : bbox.height + node.padding;
3680
+ const x = node.positioned ? -totalWidth / 2 : -bbox.width / 2 - halfPadding;
3681
+ const y = node.positioned ? -totalHeight / 2 : -bbox.height / 2 - halfPadding;
3682
+ rect2.attr("class", "basic cluster composite label-container").attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("x", x).attr("y", y).attr("width", totalWidth).attr("height", totalHeight);
3683
+ if (node.props) {
3684
+ const propKeys = new Set(Object.keys(node.props));
3685
+ if (node.props.borders) {
3686
+ applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight);
3687
+ propKeys.delete("borders");
3688
+ }
3689
+ propKeys.forEach((propKey) => {
3690
+ log.warn(`Unknown node property ${propKey}`);
3691
+ });
3692
+ }
3693
+ updateNodeBounds(node, rect2);
3694
+ node.intersect = function(point2) {
3695
+ return intersect_default.rect(node, point2);
3696
+ };
3697
+ return shapeSvg;
3698
+ }, "composite");
3699
+ var labelRect = /* @__PURE__ */ __name$1(async (parent, node) => {
3700
+ const { shapeSvg } = await labelHelper(parent, node, "label", true);
3701
+ log.trace("Classes = ", node.class);
3702
+ const rect2 = shapeSvg.insert("rect", ":first-child");
3703
+ const totalWidth = 0;
3704
+ const totalHeight = 0;
3705
+ rect2.attr("width", totalWidth).attr("height", totalHeight);
3706
+ shapeSvg.attr("class", "label edgeLabel");
3707
+ if (node.props) {
3708
+ const propKeys = new Set(Object.keys(node.props));
3709
+ if (node.props.borders) {
3710
+ applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight);
3711
+ propKeys.delete("borders");
3712
+ }
3713
+ propKeys.forEach((propKey) => {
3714
+ log.warn(`Unknown node property ${propKey}`);
3715
+ });
3716
+ }
3717
+ updateNodeBounds(node, rect2);
3718
+ node.intersect = function(point2) {
3719
+ return intersect_default.rect(node, point2);
3720
+ };
3721
+ return shapeSvg;
3722
+ }, "labelRect");
3723
+ function applyNodePropertyBorders(rect2, borders, totalWidth, totalHeight) {
3724
+ const strokeDashArray = [];
3725
+ const addBorder = /* @__PURE__ */ __name$1((length) => {
3726
+ strokeDashArray.push(length, 0);
3727
+ }, "addBorder");
3728
+ const skipBorder = /* @__PURE__ */ __name$1((length) => {
3729
+ strokeDashArray.push(0, length);
3730
+ }, "skipBorder");
3731
+ if (borders.includes("t")) {
3732
+ log.debug("add top border");
3733
+ addBorder(totalWidth);
3734
+ } else skipBorder(totalWidth);
3735
+ if (borders.includes("r")) {
3736
+ log.debug("add right border");
3737
+ addBorder(totalHeight);
3738
+ } else skipBorder(totalHeight);
3739
+ if (borders.includes("b")) {
3740
+ log.debug("add bottom border");
3741
+ addBorder(totalWidth);
3742
+ } else skipBorder(totalWidth);
3743
+ if (borders.includes("l")) {
3744
+ log.debug("add left border");
3745
+ addBorder(totalHeight);
3746
+ } else skipBorder(totalHeight);
3747
+ rect2.attr("stroke-dasharray", strokeDashArray.join(" "));
3748
+ }
3749
+ __name$1(applyNodePropertyBorders, "applyNodePropertyBorders");
3750
+ var rectWithTitle = /* @__PURE__ */ __name$1(async (parent, node) => {
3751
+ let classes2;
3752
+ if (!node.classes) classes2 = "node default";
3753
+ else classes2 = "node " + node.classes;
3754
+ const shapeSvg = parent.insert("g").attr("class", classes2).attr("id", node.domId || node.id);
3755
+ const rect2 = shapeSvg.insert("rect", ":first-child");
3756
+ const innerLine = shapeSvg.insert("line");
3757
+ const label = shapeSvg.insert("g").attr("class", "label");
3758
+ const text2 = node.labelText.flat ? node.labelText.flat() : node.labelText;
3759
+ let title = "";
3760
+ if (typeof text2 === "object") title = text2[0];
3761
+ else title = text2;
3762
+ log.info("Label text abc79", title, text2, typeof text2 === "object");
3763
+ const text = await createLabel_default(label, title, node.labelStyle, true, true);
3764
+ let bbox = {
3765
+ width: 0,
3766
+ height: 0
3767
+ };
3768
+ if (getEffectiveHtmlLabels(getConfig2())) {
3769
+ const div = text.children[0];
3770
+ const dv = select_default(text);
3771
+ bbox = div.getBoundingClientRect();
3772
+ dv.attr("width", bbox.width);
3773
+ dv.attr("height", bbox.height);
3774
+ }
3775
+ log.info("Text 2", text2);
3776
+ const textRows = text2.slice(1, text2.length);
3777
+ let titleBox = text.getBBox();
3778
+ const descr = await createLabel_default(label, textRows.join ? textRows.join("<br/>") : textRows, node.labelStyle, true, true);
3779
+ if (getEffectiveHtmlLabels(getConfig2())) {
3780
+ const div = descr.children[0];
3781
+ const dv = select_default(descr);
3782
+ bbox = div.getBoundingClientRect();
3783
+ dv.attr("width", bbox.width);
3784
+ dv.attr("height", bbox.height);
3785
+ }
3786
+ const halfPadding = node.padding / 2;
3787
+ select_default(descr).attr("transform", "translate( " + (bbox.width > titleBox.width ? 0 : (titleBox.width - bbox.width) / 2) + ", " + (titleBox.height + halfPadding + 5) + ")");
3788
+ select_default(text).attr("transform", "translate( " + (bbox.width < titleBox.width ? 0 : -(titleBox.width - bbox.width) / 2) + ", 0)");
3789
+ bbox = label.node().getBBox();
3790
+ label.attr("transform", "translate(" + -bbox.width / 2 + ", " + (-bbox.height / 2 - halfPadding + 3) + ")");
3791
+ rect2.attr("class", "outer title-state").attr("x", -bbox.width / 2 - halfPadding).attr("y", -bbox.height / 2 - halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding);
3792
+ innerLine.attr("class", "divider").attr("x1", -bbox.width / 2 - halfPadding).attr("x2", bbox.width / 2 + halfPadding).attr("y1", -bbox.height / 2 - halfPadding + titleBox.height + halfPadding).attr("y2", -bbox.height / 2 - halfPadding + titleBox.height + halfPadding);
3793
+ updateNodeBounds(node, rect2);
3794
+ node.intersect = function(point2) {
3795
+ return intersect_default.rect(node, point2);
3796
+ };
3797
+ return shapeSvg;
3798
+ }, "rectWithTitle");
3799
+ var stadium = /* @__PURE__ */ __name$1(async (parent, node) => {
3800
+ const { shapeSvg, bbox } = await labelHelper(parent, node, getClassesFromNode(node, void 0), true);
3801
+ const h = bbox.height + node.padding;
3802
+ const w = bbox.width + h / 4 + node.padding;
3803
+ updateNodeBounds(node, shapeSvg.insert("rect", ":first-child").attr("style", node.style).attr("rx", h / 2).attr("ry", h / 2).attr("x", -w / 2).attr("y", -h / 2).attr("width", w).attr("height", h));
3804
+ node.intersect = function(point2) {
3805
+ return intersect_default.rect(node, point2);
3806
+ };
3807
+ return shapeSvg;
3808
+ }, "stadium");
3809
+ var circle2 = /* @__PURE__ */ __name$1(async (parent, node) => {
3810
+ const { shapeSvg, bbox, halfPadding } = await labelHelper(parent, node, getClassesFromNode(node, void 0), true);
3811
+ const circle3 = shapeSvg.insert("circle", ":first-child");
3812
+ circle3.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("r", bbox.width / 2 + halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding);
3813
+ log.info("Circle main");
3814
+ updateNodeBounds(node, circle3);
3815
+ node.intersect = function(point2) {
3816
+ log.info("Circle intersect", node, bbox.width / 2 + halfPadding, point2);
3817
+ return intersect_default.circle(node, bbox.width / 2 + halfPadding, point2);
3818
+ };
3819
+ return shapeSvg;
3820
+ }, "circle");
3821
+ var doublecircle = /* @__PURE__ */ __name$1(async (parent, node) => {
3822
+ const { shapeSvg, bbox, halfPadding } = await labelHelper(parent, node, getClassesFromNode(node, void 0), true);
3823
+ const gap = 5;
3824
+ const circleGroup = shapeSvg.insert("g", ":first-child");
3825
+ const outerCircle = circleGroup.insert("circle");
3826
+ const innerCircle = circleGroup.insert("circle");
3827
+ circleGroup.attr("class", node.class);
3828
+ outerCircle.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("r", bbox.width / 2 + halfPadding + gap).attr("width", bbox.width + node.padding + gap * 2).attr("height", bbox.height + node.padding + gap * 2);
3829
+ innerCircle.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("r", bbox.width / 2 + halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding);
3830
+ log.info("DoubleCircle main");
3831
+ updateNodeBounds(node, outerCircle);
3832
+ node.intersect = function(point2) {
3833
+ log.info("DoubleCircle intersect", node, bbox.width / 2 + halfPadding + gap, point2);
3834
+ return intersect_default.circle(node, bbox.width / 2 + halfPadding + gap, point2);
3835
+ };
3836
+ return shapeSvg;
3837
+ }, "doublecircle");
3838
+ var subroutine = /* @__PURE__ */ __name$1(async (parent, node) => {
3839
+ const { shapeSvg, bbox } = await labelHelper(parent, node, getClassesFromNode(node, void 0), true);
3840
+ const w = bbox.width + node.padding;
3841
+ const h = bbox.height + node.padding;
3842
+ const points = [
3843
+ {
3844
+ x: 0,
3845
+ y: 0
3846
+ },
3847
+ {
3848
+ x: w,
3849
+ y: 0
3850
+ },
3851
+ {
3852
+ x: w,
3853
+ y: -h
3854
+ },
3855
+ {
3856
+ x: 0,
3857
+ y: -h
3858
+ },
3859
+ {
3860
+ x: 0,
3861
+ y: 0
3862
+ },
3863
+ {
3864
+ x: -8,
3865
+ y: 0
3866
+ },
3867
+ {
3868
+ x: w + 8,
3869
+ y: 0
3870
+ },
3871
+ {
3872
+ x: w + 8,
3873
+ y: -h
3874
+ },
3875
+ {
3876
+ x: -8,
3877
+ y: -h
3878
+ },
3879
+ {
3880
+ x: -8,
3881
+ y: 0
3882
+ }
3883
+ ];
3884
+ const el = insertPolygonShape(shapeSvg, w, h, points);
3885
+ el.attr("style", node.style);
3886
+ updateNodeBounds(node, el);
3887
+ node.intersect = function(point2) {
3888
+ return intersect_default.polygon(node, points, point2);
3889
+ };
3890
+ return shapeSvg;
3891
+ }, "subroutine");
3892
+ var start = /* @__PURE__ */ __name$1((parent, node) => {
3893
+ const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id);
3894
+ const circle3 = shapeSvg.insert("circle", ":first-child");
3895
+ circle3.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14);
3896
+ updateNodeBounds(node, circle3);
3897
+ node.intersect = function(point2) {
3898
+ return intersect_default.circle(node, 7, point2);
3899
+ };
3900
+ return shapeSvg;
3901
+ }, "start");
3902
+ var forkJoin = /* @__PURE__ */ __name$1((parent, node, dir) => {
3903
+ const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id);
3904
+ let width = 70;
3905
+ let height = 10;
3906
+ if (dir === "LR") {
3907
+ width = 10;
3908
+ height = 70;
3909
+ }
3910
+ updateNodeBounds(node, shapeSvg.append("rect").attr("x", -1 * width / 2).attr("y", -1 * height / 2).attr("width", width).attr("height", height).attr("class", "fork-join"));
3911
+ node.height = node.height + node.padding / 2;
3912
+ node.width = node.width + node.padding / 2;
3913
+ node.intersect = function(point2) {
3914
+ return intersect_default.rect(node, point2);
3915
+ };
3916
+ return shapeSvg;
3917
+ }, "forkJoin");
3918
+ var shapes = {
3919
+ rhombus: question,
3920
+ composite,
3921
+ question,
3922
+ rect,
3923
+ labelRect,
3924
+ rectWithTitle,
3925
+ choice,
3926
+ circle: circle2,
3927
+ doublecircle,
3928
+ stadium,
3929
+ hexagon,
3930
+ block_arrow,
3931
+ rect_left_inv_arrow,
3932
+ lean_right,
3933
+ lean_left,
3934
+ trapezoid,
3935
+ inv_trapezoid,
3936
+ rect_right_inv_arrow,
3937
+ cylinder,
3938
+ start,
3939
+ end: /* @__PURE__ */ __name$1((parent, node) => {
3940
+ const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id);
3941
+ const innerCircle = shapeSvg.insert("circle", ":first-child");
3942
+ const circle3 = shapeSvg.insert("circle", ":first-child");
3943
+ circle3.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14);
3944
+ innerCircle.attr("class", "state-end").attr("r", 5).attr("width", 10).attr("height", 10);
3945
+ updateNodeBounds(node, circle3);
3946
+ node.intersect = function(point2) {
3947
+ return intersect_default.circle(node, 7, point2);
3948
+ };
3949
+ return shapeSvg;
3950
+ }, "end"),
3951
+ note: note_default,
3952
+ subroutine,
3953
+ fork: forkJoin,
3954
+ join: forkJoin,
3955
+ class_box: /* @__PURE__ */ __name$1(async (parent, node) => {
3956
+ const halfPadding = node.padding / 2;
3957
+ const rowPadding = 4;
3958
+ const lineHeight = 8;
3959
+ let classes2;
3960
+ if (!node.classes) classes2 = "node default";
3961
+ else classes2 = "node " + node.classes;
3962
+ const shapeSvg = parent.insert("g").attr("class", classes2).attr("id", node.domId || node.id);
3963
+ const rect2 = shapeSvg.insert("rect", ":first-child");
3964
+ const topLine = shapeSvg.insert("line");
3965
+ const bottomLine = shapeSvg.insert("line");
3966
+ let maxWidth = 0;
3967
+ let maxHeight = rowPadding;
3968
+ const labelContainer = shapeSvg.insert("g").attr("class", "label");
3969
+ let verticalPos = 0;
3970
+ const hasInterface = node.classData.annotations?.[0];
3971
+ const interfaceLabel = await createLabel_default(labelContainer, node.classData.annotations[0] ? "«" + node.classData.annotations[0] + "»" : "", node.labelStyle, true, true);
3972
+ let interfaceBBox = interfaceLabel.getBBox();
3973
+ if (getEffectiveHtmlLabels(getConfig2())) {
3974
+ const div = interfaceLabel.children[0];
3975
+ const dv = select_default(interfaceLabel);
3976
+ interfaceBBox = div.getBoundingClientRect();
3977
+ dv.attr("width", interfaceBBox.width);
3978
+ dv.attr("height", interfaceBBox.height);
3979
+ }
3980
+ if (node.classData.annotations[0]) {
3981
+ maxHeight += interfaceBBox.height + rowPadding;
3982
+ maxWidth += interfaceBBox.width;
3983
+ }
3984
+ let classTitleString = node.classData.label;
3985
+ if (node.classData.type !== void 0 && node.classData.type !== "") if (getEffectiveHtmlLabels(getConfig2())) classTitleString += "&lt;" + node.classData.type + "&gt;";
3986
+ else classTitleString += "<" + node.classData.type + ">";
3987
+ const classTitleLabel = await createLabel_default(labelContainer, classTitleString, node.labelStyle, true, true);
3988
+ select_default(classTitleLabel).attr("class", "classTitle");
3989
+ let classTitleBBox = classTitleLabel.getBBox();
3990
+ if (getEffectiveHtmlLabels(getConfig2())) {
3991
+ const div = classTitleLabel.children[0];
3992
+ const dv = select_default(classTitleLabel);
3993
+ classTitleBBox = div.getBoundingClientRect();
3994
+ dv.attr("width", classTitleBBox.width);
3995
+ dv.attr("height", classTitleBBox.height);
3996
+ }
3997
+ maxHeight += classTitleBBox.height + rowPadding;
3998
+ if (classTitleBBox.width > maxWidth) maxWidth = classTitleBBox.width;
3999
+ const classAttributes = [];
4000
+ node.classData.members.forEach(async (member) => {
4001
+ const parsedInfo = member.getDisplayDetails();
4002
+ let parsedText = parsedInfo.displayText;
4003
+ if (getEffectiveHtmlLabels(getConfig2())) parsedText = parsedText.replace(/</g, "&lt;").replace(/>/g, "&gt;");
4004
+ const lbl = await createLabel_default(labelContainer, parsedText, parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle, true, true);
4005
+ let bbox = lbl.getBBox();
4006
+ if (getEffectiveHtmlLabels(getConfig2())) {
4007
+ const div = lbl.children[0];
4008
+ const dv = select_default(lbl);
4009
+ bbox = div.getBoundingClientRect();
4010
+ dv.attr("width", bbox.width);
4011
+ dv.attr("height", bbox.height);
4012
+ }
4013
+ if (bbox.width > maxWidth) maxWidth = bbox.width;
4014
+ maxHeight += bbox.height + rowPadding;
4015
+ classAttributes.push(lbl);
4016
+ });
4017
+ maxHeight += lineHeight;
4018
+ const classMethods = [];
4019
+ node.classData.methods.forEach(async (member) => {
4020
+ const parsedInfo = member.getDisplayDetails();
4021
+ let displayText = parsedInfo.displayText;
4022
+ if (getEffectiveHtmlLabels(getConfig2())) displayText = displayText.replace(/</g, "&lt;").replace(/>/g, "&gt;");
4023
+ const lbl = await createLabel_default(labelContainer, displayText, parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle, true, true);
4024
+ let bbox = lbl.getBBox();
4025
+ if (getEffectiveHtmlLabels(getConfig2())) {
4026
+ const div = lbl.children[0];
4027
+ const dv = select_default(lbl);
4028
+ bbox = div.getBoundingClientRect();
4029
+ dv.attr("width", bbox.width);
4030
+ dv.attr("height", bbox.height);
4031
+ }
4032
+ if (bbox.width > maxWidth) maxWidth = bbox.width;
4033
+ maxHeight += bbox.height + rowPadding;
4034
+ classMethods.push(lbl);
4035
+ });
4036
+ maxHeight += lineHeight;
4037
+ if (hasInterface) {
4038
+ let diffX2 = (maxWidth - interfaceBBox.width) / 2;
4039
+ select_default(interfaceLabel).attr("transform", "translate( " + (-1 * maxWidth / 2 + diffX2) + ", " + -1 * maxHeight / 2 + ")");
4040
+ verticalPos = interfaceBBox.height + rowPadding;
4041
+ }
4042
+ let diffX = (maxWidth - classTitleBBox.width) / 2;
4043
+ select_default(classTitleLabel).attr("transform", "translate( " + (-1 * maxWidth / 2 + diffX) + ", " + (-1 * maxHeight / 2 + verticalPos) + ")");
4044
+ verticalPos += classTitleBBox.height + rowPadding;
4045
+ topLine.attr("class", "divider").attr("x1", -maxWidth / 2 - halfPadding).attr("x2", maxWidth / 2 + halfPadding).attr("y1", -maxHeight / 2 - halfPadding + lineHeight + verticalPos).attr("y2", -maxHeight / 2 - halfPadding + lineHeight + verticalPos);
4046
+ verticalPos += lineHeight;
4047
+ classAttributes.forEach((lbl) => {
4048
+ select_default(lbl).attr("transform", "translate( " + -maxWidth / 2 + ", " + (-1 * maxHeight / 2 + verticalPos + lineHeight / 2) + ")");
4049
+ const memberBBox = lbl?.getBBox();
4050
+ verticalPos += (memberBBox?.height ?? 0) + rowPadding;
4051
+ });
4052
+ verticalPos += lineHeight;
4053
+ bottomLine.attr("class", "divider").attr("x1", -maxWidth / 2 - halfPadding).attr("x2", maxWidth / 2 + halfPadding).attr("y1", -maxHeight / 2 - halfPadding + lineHeight + verticalPos).attr("y2", -maxHeight / 2 - halfPadding + lineHeight + verticalPos);
4054
+ verticalPos += lineHeight;
4055
+ classMethods.forEach((lbl) => {
4056
+ select_default(lbl).attr("transform", "translate( " + -maxWidth / 2 + ", " + (-1 * maxHeight / 2 + verticalPos) + ")");
4057
+ const memberBBox = lbl?.getBBox();
4058
+ verticalPos += (memberBBox?.height ?? 0) + rowPadding;
4059
+ });
4060
+ rect2.attr("style", node.style).attr("class", "outer title-state").attr("x", -maxWidth / 2 - halfPadding).attr("y", -(maxHeight / 2) - halfPadding).attr("width", maxWidth + node.padding).attr("height", maxHeight + node.padding);
4061
+ updateNodeBounds(node, rect2);
4062
+ node.intersect = function(point2) {
4063
+ return intersect_default.rect(node, point2);
4064
+ };
4065
+ return shapeSvg;
4066
+ }, "class_box")
4067
+ };
4068
+ var nodeElems = {};
4069
+ var insertNode = /* @__PURE__ */ __name$1(async (elem, node, renderOptions) => {
4070
+ let newEl;
4071
+ let el;
4072
+ if (node.link) {
4073
+ let target;
4074
+ if (getConfig2().securityLevel === "sandbox") target = "_top";
4075
+ else if (node.linkTarget) target = node.linkTarget || "_blank";
4076
+ newEl = elem.insert("svg:a").attr("xlink:href", node.link).attr("target", target);
4077
+ el = await shapes[node.shape](newEl, node, renderOptions);
4078
+ } else {
4079
+ el = await shapes[node.shape](elem, node, renderOptions);
4080
+ newEl = el;
4081
+ }
4082
+ if (node.tooltip) el.attr("title", node.tooltip);
4083
+ if (node.class) el.attr("class", "node default " + node.class);
4084
+ nodeElems[node.id] = newEl;
4085
+ if (node.haveCallback) nodeElems[node.id].attr("class", nodeElems[node.id].attr("class") + " clickable");
4086
+ return newEl;
4087
+ }, "insertNode");
4088
+ var positionNode = /* @__PURE__ */ __name$1((node) => {
4089
+ const el = nodeElems[node.id];
4090
+ log.trace("Transforming node", node.diff, node, "translate(" + (node.x - node.width / 2 - 5) + ", " + node.width / 2 + ")");
4091
+ const padding2 = 8;
4092
+ const diff = node.diff || 0;
4093
+ if (node.clusterNode) el.attr("transform", "translate(" + (node.x + diff - node.width / 2) + ", " + (node.y - node.height / 2 - padding2) + ")");
4094
+ else el.attr("transform", "translate(" + node.x + ", " + node.y + ")");
4095
+ return diff;
4096
+ }, "positionNode");
4097
+ function getNodeFromBlock(block, db2, positioned = false) {
4098
+ const vertex = block;
4099
+ let classStr = "default";
4100
+ if ((vertex?.classes?.length || 0) > 0) classStr = (vertex?.classes ?? []).join(" ");
4101
+ classStr = classStr + " flowchart-label";
4102
+ let radius = 0;
4103
+ let shape = "";
4104
+ let padding2;
4105
+ switch (vertex.type) {
4106
+ case "round":
4107
+ radius = 5;
4108
+ shape = "rect";
4109
+ break;
4110
+ case "composite":
4111
+ radius = 0;
4112
+ shape = "composite";
4113
+ padding2 = 0;
4114
+ break;
4115
+ case "square":
4116
+ shape = "rect";
4117
+ break;
4118
+ case "diamond":
4119
+ shape = "question";
4120
+ break;
4121
+ case "hexagon":
4122
+ shape = "hexagon";
4123
+ break;
4124
+ case "block_arrow":
4125
+ shape = "block_arrow";
4126
+ break;
4127
+ case "odd":
4128
+ shape = "rect_left_inv_arrow";
4129
+ break;
4130
+ case "lean_right":
4131
+ shape = "lean_right";
4132
+ break;
4133
+ case "lean_left":
4134
+ shape = "lean_left";
4135
+ break;
4136
+ case "trapezoid":
4137
+ shape = "trapezoid";
4138
+ break;
4139
+ case "inv_trapezoid":
4140
+ shape = "inv_trapezoid";
4141
+ break;
4142
+ case "rect_left_inv_arrow":
4143
+ shape = "rect_left_inv_arrow";
4144
+ break;
4145
+ case "circle":
4146
+ shape = "circle";
4147
+ break;
4148
+ case "ellipse":
4149
+ shape = "ellipse";
4150
+ break;
4151
+ case "stadium":
4152
+ shape = "stadium";
4153
+ break;
4154
+ case "subroutine":
4155
+ shape = "subroutine";
4156
+ break;
4157
+ case "cylinder":
4158
+ shape = "cylinder";
4159
+ break;
4160
+ case "group":
4161
+ shape = "rect";
4162
+ break;
4163
+ case "doublecircle":
4164
+ shape = "doublecircle";
4165
+ break;
4166
+ default: shape = "rect";
4167
+ }
4168
+ const styles = getStylesFromArray(vertex?.styles ?? []);
4169
+ const vertexText = vertex.label;
4170
+ const bounds = vertex.size ?? {
4171
+ width: 0,
4172
+ height: 0,
4173
+ x: 0,
4174
+ y: 0
4175
+ };
4176
+ const dbDiagramId = db2.getDiagramId();
4177
+ return {
4178
+ labelStyle: styles.labelStyle,
4179
+ shape,
4180
+ labelText: vertexText,
4181
+ rx: radius,
4182
+ ry: radius,
4183
+ class: classStr,
4184
+ style: styles.style,
4185
+ id: vertex.id,
4186
+ domId: dbDiagramId ? `${dbDiagramId}-${vertex.id}` : vertex.id,
4187
+ directions: vertex.directions,
4188
+ width: bounds.width,
4189
+ height: bounds.height,
4190
+ x: bounds.x,
4191
+ y: bounds.y,
4192
+ positioned,
4193
+ intersect: void 0,
4194
+ type: vertex.type,
4195
+ padding: padding2 ?? getConfig()?.block?.padding ?? 0,
4196
+ widthInColumns: vertex.widthInColumns ?? 1
4197
+ };
4198
+ }
4199
+ __name$1(getNodeFromBlock, "getNodeFromBlock");
4200
+ async function calculateBlockSize(elem, block, db2) {
4201
+ const node = getNodeFromBlock(block, db2, false);
4202
+ if (node.type === "group") return;
4203
+ const nodeEl = await insertNode(elem, node, { config: getConfig() });
4204
+ const boundingBox = nodeEl.node().getBBox();
4205
+ const obj = db2.getBlock(node.id);
4206
+ obj.size = {
4207
+ width: boundingBox.width,
4208
+ height: boundingBox.height,
4209
+ x: 0,
4210
+ y: 0,
4211
+ node: nodeEl
4212
+ };
4213
+ db2.setBlock(obj);
4214
+ nodeEl.remove();
4215
+ }
4216
+ __name$1(calculateBlockSize, "calculateBlockSize");
4217
+ async function insertBlockPositioned(elem, block, db2) {
4218
+ const node = getNodeFromBlock(block, db2, true);
4219
+ if (db2.getBlock(node.id).type !== "space") {
4220
+ await insertNode(elem, node, { config: getConfig() });
4221
+ block.intersect = node?.intersect;
4222
+ positionNode(node);
4223
+ }
4224
+ }
4225
+ __name$1(insertBlockPositioned, "insertBlockPositioned");
4226
+ async function performOperations(elem, blocks2, db2, operation) {
4227
+ for (const block of blocks2) {
4228
+ await operation(elem, block, db2);
4229
+ if (block.children) await performOperations(elem, block.children, db2, operation);
4230
+ }
4231
+ }
4232
+ __name$1(performOperations, "performOperations");
4233
+ async function calculateBlockSizes(elem, blocks2, db2) {
4234
+ await performOperations(elem, blocks2, db2, calculateBlockSize);
4235
+ }
4236
+ __name$1(calculateBlockSizes, "calculateBlockSizes");
4237
+ async function insertBlocks(elem, blocks2, db2) {
4238
+ await performOperations(elem, blocks2, db2, insertBlockPositioned);
4239
+ }
4240
+ __name$1(insertBlocks, "insertBlocks");
4241
+ async function insertEdges(elem, edges, blocks2, db2, id) {
4242
+ const g = new Graph({
4243
+ multigraph: true,
4244
+ compound: true
4245
+ });
4246
+ g.setGraph({
4247
+ rankdir: "TB",
4248
+ nodesep: 10,
4249
+ ranksep: 10,
4250
+ marginx: 8,
4251
+ marginy: 8
4252
+ });
4253
+ for (const block of blocks2) if (block.size) g.setNode(block.id, {
4254
+ width: block.size.width,
4255
+ height: block.size.height,
4256
+ intersect: block.intersect
4257
+ });
4258
+ for (const edge of edges) if (edge.start && edge.end) {
4259
+ const startBlock = db2.getBlock(edge.start);
4260
+ const endBlock = db2.getBlock(edge.end);
4261
+ if (startBlock?.size && endBlock?.size) {
4262
+ const start2 = startBlock.size;
4263
+ const end2 = endBlock.size;
4264
+ const points = [
4265
+ {
4266
+ x: start2.x,
4267
+ y: start2.y
4268
+ },
4269
+ {
4270
+ x: start2.x + (end2.x - start2.x) / 2,
4271
+ y: start2.y + (end2.y - start2.y) / 2
4272
+ },
4273
+ {
4274
+ x: end2.x,
4275
+ y: end2.y
4276
+ }
4277
+ ];
4278
+ const prefixedEdgeId = id ? `${id}-${edge.id}` : edge.id;
4279
+ const dynamicClasses = `${edge.thickness === "thick" ? "edge-thickness-thick" : "edge-thickness-normal"} ${edge.pattern === "dotted" ? "edge-pattern-dotted" : "edge-pattern-solid"} flowchart-link LS-a1 LE-b1`;
4280
+ insertEdge(elem, {
4281
+ v: edge.start,
4282
+ w: edge.end,
4283
+ name: prefixedEdgeId
4284
+ }, {
4285
+ ...edge,
4286
+ id: prefixedEdgeId,
4287
+ arrowTypeEnd: edge.arrowTypeEnd,
4288
+ arrowTypeStart: edge.arrowTypeStart,
4289
+ points,
4290
+ classes: dynamicClasses
4291
+ }, void 0, "block", g, id);
4292
+ if (edge.label) {
4293
+ await insertEdgeLabel(elem, {
4294
+ ...edge,
4295
+ label: edge.label,
4296
+ labelStyle: "stroke: #333; stroke-width: 1.5px;fill:none;",
4297
+ arrowTypeEnd: edge.arrowTypeEnd,
4298
+ arrowTypeStart: edge.arrowTypeStart,
4299
+ points,
4300
+ classes: dynamicClasses
4301
+ });
4302
+ positionEdgeLabel({
4303
+ ...edge,
4304
+ x: points[1].x,
4305
+ y: points[1].y
4306
+ }, { originalPath: points });
4307
+ }
4308
+ }
4309
+ }
4310
+ }
4311
+ __name$1(insertEdges, "insertEdges");
4312
+ var diagram = {
4313
+ parser: block_default,
4314
+ db: blockDB_default,
4315
+ renderer: {
4316
+ draw: /* @__PURE__ */ __name$1(async function(text, id, _version, diagObj) {
4317
+ const { securityLevel, block: conf } = getConfig();
4318
+ const db2 = diagObj.db;
4319
+ db2.setDiagramId(id);
4320
+ let sandboxElement;
4321
+ if (securityLevel === "sandbox") sandboxElement = select_default("#i" + id);
4322
+ const root = securityLevel === "sandbox" ? select_default(sandboxElement.nodes()[0].contentDocument.body) : select_default("body");
4323
+ const svg = securityLevel === "sandbox" ? root.select(`[id="${id}"]`) : select_default(`[id="${id}"]`);
4324
+ markers_default(svg, [
4325
+ "point",
4326
+ "circle",
4327
+ "cross"
4328
+ ], diagObj.type, id);
4329
+ const bl = db2.getBlocks();
4330
+ const blArr = db2.getBlocksFlat();
4331
+ const edges = db2.getEdges();
4332
+ const nodes = svg.insert("g").attr("class", "block");
4333
+ await calculateBlockSizes(nodes, bl, db2);
4334
+ const bounds = layout(db2);
4335
+ await insertBlocks(nodes, bl, db2);
4336
+ await insertEdges(nodes, edges, blArr, db2, id);
4337
+ if (bounds) {
4338
+ const bounds2 = bounds;
4339
+ const magicFactor = Math.max(1, Math.round(.125 * (bounds2.width / bounds2.height)));
4340
+ const height = bounds2.height + magicFactor + 10;
4341
+ const width = bounds2.width + 10;
4342
+ const { useMaxWidth } = conf;
4343
+ configureSvgSize(svg, height, width, !!useMaxWidth);
4344
+ log.debug("Here Bounds", bounds, bounds2);
4345
+ svg.attr("viewBox", `${bounds2.x - 5} ${bounds2.y - 5} ${bounds2.width + 10} ${bounds2.height + 10}`);
4346
+ }
4347
+ }, "draw"),
4348
+ getClasses: /* @__PURE__ */ __name$1(function(text, diagObj) {
4349
+ return diagObj.db.getClasses();
4350
+ }, "getClasses")
4351
+ },
4352
+ styles: styles_default
4353
+ };
4354
+ //#endregion
4355
+ export { diagram };