@cardstack/boxel-cli 0.3.2-unstable.59 → 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 +2 -2
  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
@@ -1,2833 +0,0 @@
1
- import "./chunk-CGdGNDIi.js";
2
- import { h as __name$1, p as select_default } from "./src-CdPyB7gY.js";
3
- import { $ as darken, H as setAccDescription, K as setDiagramTitle, U as setAccTitle, a as clear, b as getConfig, c as configureSvgSize, et as lighten, f as defaultConfig_default, nt as isDark, tt as adjustChannel, v as getAccDescription, w as getDiagramTitle, y as getAccTitle } from "./chunk-CSCIHK7Q-DnRAp6Bv.js";
4
- import { i as cleanAndMerge } from "./chunk-5ZQYHXKU-BeETnugr.js";
5
- import { t as selectSvgElement } from "./chunk-WU5MYG2G-CtItCLbE.js";
6
- import { t as at } from "./rough.esm-D8VnzNsL.js";
7
- //#region ../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/methods/transparentize.js
8
- var transparentize = (color, amount) => {
9
- return adjustChannel(color, "a", -amount);
10
- };
11
- //#endregion
12
- //#region ../../node_modules/.pnpm/@upsetjs+venn.js@2.0.0/node_modules/@upsetjs/venn.js/build/venn.esm.js
13
- var SMALL$1 = 1e-10;
14
- /**
15
- * Returns the intersection area of a bunch of circles (where each circle
16
- * is an object having an x,y and radius property)
17
- * @param {ReadonlyArray<{x: number, y: number, radius: number}>} circles
18
- * @param {undefined | { area?: number, arcArea?: number, polygonArea?: number, arcs?: ReadonlyArray<{ circle: {x: number, y: number, radius: number}, width: number, p1: {x: number, y: number}, p2: {x: number, y: number} }>, innerPoints: ReadonlyArray<{
19
- x: number;
20
- y: number;
21
- parentIndex: [number, number];
22
- }>, intersectionPoints: ReadonlyArray<{
23
- x: number;
24
- y: number;
25
- parentIndex: [number, number];
26
- }> }} stats
27
- * @returns {number}
28
- */
29
- function intersectionArea(circles, stats) {
30
- const intersectionPoints = getIntersectionPoints(circles);
31
- const innerPoints = intersectionPoints.filter((p) => containedInCircles(p, circles));
32
- let arcArea = 0;
33
- let polygonArea = 0;
34
- /** @type {{ circle: {x: number, y: number, radius: number}, width: number, p1: {x: number, y: number}, p2: {x: number, y: number} }[]} */
35
- const arcs = [];
36
- if (innerPoints.length > 1) {
37
- const center = getCenter(innerPoints);
38
- for (let i = 0; i < innerPoints.length; ++i) {
39
- const p = innerPoints[i];
40
- p.angle = Math.atan2(p.x - center.x, p.y - center.y);
41
- }
42
- innerPoints.sort((a, b) => b.angle - a.angle);
43
- let p2 = innerPoints[innerPoints.length - 1];
44
- for (let i = 0; i < innerPoints.length; ++i) {
45
- const p1 = innerPoints[i];
46
- polygonArea += (p2.x + p1.x) * (p1.y - p2.y);
47
- const midPoint = {
48
- x: (p1.x + p2.x) / 2,
49
- y: (p1.y + p2.y) / 2
50
- };
51
- /** @types null | { circle: {x: number, y: number, radius: number}, width: number, p1: {x: number, y: number}, p2: {x: number, y: number} } */
52
- let arc = null;
53
- for (let j = 0; j < p1.parentIndex.length; ++j) if (p2.parentIndex.includes(p1.parentIndex[j])) {
54
- const circle = circles[p1.parentIndex[j]];
55
- const a1 = Math.atan2(p1.x - circle.x, p1.y - circle.y);
56
- const a2 = Math.atan2(p2.x - circle.x, p2.y - circle.y);
57
- let angleDiff = a2 - a1;
58
- if (angleDiff < 0) angleDiff += 2 * Math.PI;
59
- const a = a2 - angleDiff / 2;
60
- let width = distance(midPoint, {
61
- x: circle.x + circle.radius * Math.sin(a),
62
- y: circle.y + circle.radius * Math.cos(a)
63
- });
64
- if (width > circle.radius * 2) width = circle.radius * 2;
65
- if (arc == null || arc.width > width) arc = {
66
- circle,
67
- width,
68
- p1,
69
- p2,
70
- large: width > circle.radius,
71
- sweep: true
72
- };
73
- }
74
- if (arc != null) {
75
- arcs.push(arc);
76
- arcArea += circleArea(arc.circle.radius, arc.width);
77
- p2 = p1;
78
- }
79
- }
80
- } else {
81
- let smallest = circles[0];
82
- for (let i = 1; i < circles.length; ++i) if (circles[i].radius < smallest.radius) smallest = circles[i];
83
- let disjoint = false;
84
- for (let i = 0; i < circles.length; ++i) if (distance(circles[i], smallest) > Math.abs(smallest.radius - circles[i].radius)) {
85
- disjoint = true;
86
- break;
87
- }
88
- if (disjoint) arcArea = polygonArea = 0;
89
- else {
90
- arcArea = smallest.radius * smallest.radius * Math.PI;
91
- arcs.push({
92
- circle: smallest,
93
- p1: {
94
- x: smallest.x,
95
- y: smallest.y + smallest.radius
96
- },
97
- p2: {
98
- x: smallest.x - SMALL$1,
99
- y: smallest.y + smallest.radius
100
- },
101
- width: smallest.radius * 2,
102
- large: true,
103
- sweep: true
104
- });
105
- }
106
- }
107
- polygonArea /= 2;
108
- if (stats) {
109
- stats.area = arcArea + polygonArea;
110
- stats.arcArea = arcArea;
111
- stats.polygonArea = polygonArea;
112
- stats.arcs = arcs;
113
- stats.innerPoints = innerPoints;
114
- stats.intersectionPoints = intersectionPoints;
115
- }
116
- return arcArea + polygonArea;
117
- }
118
- /**
119
- * returns whether a point is contained by all of a list of circles
120
- * @param {{x: number, y: number}} point
121
- * @param {ReadonlyArray<{x: number, y: number, radius: number}>} circles
122
- * @returns {boolean}
123
- */
124
- function containedInCircles(point, circles) {
125
- return circles.every((circle) => distance(point, circle) < circle.radius + SMALL$1);
126
- }
127
- /**
128
- * Gets all intersection points between a bunch of circles
129
- * @param {ReadonlyArray<{x: number, y: number, radius: number}>} circles
130
- * @returns {ReadonlyArray<{x: number, y: number, parentIndex: [number, number]}>}
131
- */
132
- function getIntersectionPoints(circles) {
133
- /** @type {{x: number, y: number, parentIndex: [number, number]}[]} */
134
- const ret = [];
135
- for (let i = 0; i < circles.length; ++i) for (let j = i + 1; j < circles.length; ++j) {
136
- const intersect = circleCircleIntersection(circles[i], circles[j]);
137
- for (const p of intersect) {
138
- p.parentIndex = [i, j];
139
- ret.push(p);
140
- }
141
- }
142
- return ret;
143
- }
144
- /**
145
- * Circular segment area calculation. See http://mathworld.wolfram.com/CircularSegment.html
146
- * @param {number} r
147
- * @param {number} width
148
- * @returns {number}
149
- **/
150
- function circleArea(r, width) {
151
- return r * r * Math.acos(1 - width / r) - (r - width) * Math.sqrt(width * (2 * r - width));
152
- }
153
- /**
154
- * euclidean distance between two points
155
- * @param {{x: number, y: number}} p1
156
- * @param {{x: number, y: number}} p2
157
- * @returns {number}
158
- **/
159
- function distance(p1, p2) {
160
- return Math.sqrt((p1.x - p2.x) * (p1.x - p2.x) + (p1.y - p2.y) * (p1.y - p2.y));
161
- }
162
- /**
163
- * Returns the overlap area of two circles of radius r1 and r2 - that
164
- * have their centers separated by distance d. Simpler faster
165
- * circle intersection for only two circles
166
- * @param {number} r1
167
- * @param {number} r2
168
- * @param {number} d
169
- * @returns {number}
170
- */
171
- function circleOverlap(r1, r2, d) {
172
- if (d >= r1 + r2) return 0;
173
- if (d <= Math.abs(r1 - r2)) return Math.PI * Math.min(r1, r2) * Math.min(r1, r2);
174
- const w1 = r1 - (d * d - r2 * r2 + r1 * r1) / (2 * d);
175
- const w2 = r2 - (d * d - r1 * r1 + r2 * r2) / (2 * d);
176
- return circleArea(r1, w1) + circleArea(r2, w2);
177
- }
178
- /**
179
- * Given two circles (containing a x/y/radius attributes),
180
- * returns the intersecting points if possible
181
- * note: doesn't handle cases where there are infinitely many
182
- * intersection points (circles are equivalent):, or only one intersection point
183
- * @param {{x: number, y: number, radius: number}} p1
184
- * @param {{x: number, y: number, radius: number}} p2
185
- * @returns {ReadonlyArray<{x: number, y: number}>}
186
- **/
187
- function circleCircleIntersection(p1, p2) {
188
- const d = distance(p1, p2);
189
- const r1 = p1.radius;
190
- const r2 = p2.radius;
191
- if (d >= r1 + r2 || d <= Math.abs(r1 - r2)) return [];
192
- const a = (r1 * r1 - r2 * r2 + d * d) / (2 * d);
193
- const h = Math.sqrt(r1 * r1 - a * a);
194
- const x0 = p1.x + a * (p2.x - p1.x) / d;
195
- const y0 = p1.y + a * (p2.y - p1.y) / d;
196
- const rx = -(p2.y - p1.y) * (h / d);
197
- const ry = -(p2.x - p1.x) * (h / d);
198
- return [{
199
- x: x0 + rx,
200
- y: y0 - ry
201
- }, {
202
- x: x0 - rx,
203
- y: y0 + ry
204
- }];
205
- }
206
- /**
207
- * Returns the center of a bunch of points
208
- * @param {ReadonlyArray<{x: number, y: number}>} points
209
- * @returns {{x: number, y: number}}
210
- */
211
- function getCenter(points) {
212
- const center = {
213
- x: 0,
214
- y: 0
215
- };
216
- for (const point of points) {
217
- center.x += point.x;
218
- center.y += point.y;
219
- }
220
- center.x /= points.length;
221
- center.y /= points.length;
222
- return center;
223
- }
224
- /** finds the zeros of a function, given two starting points (which must
225
- * have opposite signs */
226
- function bisect(f, a, b, parameters) {
227
- parameters = parameters || {};
228
- const maxIterations = parameters.maxIterations || 100;
229
- const tolerance = parameters.tolerance || 1e-10;
230
- const fA = f(a);
231
- const fB = f(b);
232
- let delta = b - a;
233
- if (fA * fB > 0) throw "Initial bisect points must have opposite signs";
234
- if (fA === 0) return a;
235
- if (fB === 0) return b;
236
- for (let i = 0; i < maxIterations; ++i) {
237
- delta /= 2;
238
- const mid = a + delta;
239
- const fMid = f(mid);
240
- if (fMid * fA >= 0) a = mid;
241
- if (Math.abs(delta) < tolerance || fMid === 0) return mid;
242
- }
243
- return a + delta;
244
- }
245
- function zeros(x) {
246
- const r = new Array(x);
247
- for (let i = 0; i < x; ++i) r[i] = 0;
248
- return r;
249
- }
250
- function zerosM(x, y) {
251
- return zeros(x).map(() => zeros(y));
252
- }
253
- function dot(a, b) {
254
- let ret = 0;
255
- for (let i = 0; i < a.length; ++i) ret += a[i] * b[i];
256
- return ret;
257
- }
258
- function norm2(a) {
259
- return Math.sqrt(dot(a, a));
260
- }
261
- function scale(ret, value, c) {
262
- for (let i = 0; i < value.length; ++i) ret[i] = value[i] * c;
263
- }
264
- function weightedSum(ret, w1, v1, w2, v2) {
265
- for (let j = 0; j < ret.length; ++j) ret[j] = w1 * v1[j] + w2 * v2[j];
266
- }
267
- /** minimizes a function using the downhill simplex method */
268
- function nelderMead(f, x0, parameters) {
269
- parameters = parameters || {};
270
- const maxIterations = parameters.maxIterations || x0.length * 200;
271
- const nonZeroDelta = parameters.nonZeroDelta || 1.05;
272
- const zeroDelta = parameters.zeroDelta || .001;
273
- const minErrorDelta = parameters.minErrorDelta || 1e-6;
274
- const minTolerance = parameters.minErrorDelta || 1e-5;
275
- const rho = parameters.rho !== void 0 ? parameters.rho : 1;
276
- const chi = parameters.chi !== void 0 ? parameters.chi : 2;
277
- const psi = parameters.psi !== void 0 ? parameters.psi : -.5;
278
- const sigma = parameters.sigma !== void 0 ? parameters.sigma : .5;
279
- let maxDiff;
280
- const N = x0.length;
281
- const simplex = new Array(N + 1);
282
- simplex[0] = x0;
283
- simplex[0].fx = f(x0);
284
- simplex[0].id = 0;
285
- for (let i = 0; i < N; ++i) {
286
- const point = x0.slice();
287
- point[i] = point[i] ? point[i] * nonZeroDelta : zeroDelta;
288
- simplex[i + 1] = point;
289
- simplex[i + 1].fx = f(point);
290
- simplex[i + 1].id = i + 1;
291
- }
292
- function updateSimplex(value) {
293
- for (let i = 0; i < value.length; i++) simplex[N][i] = value[i];
294
- simplex[N].fx = value.fx;
295
- }
296
- const sortOrder = (a, b) => a.fx - b.fx;
297
- const centroid = x0.slice();
298
- const reflected = x0.slice();
299
- const contracted = x0.slice();
300
- const expanded = x0.slice();
301
- for (let iteration = 0; iteration < maxIterations; ++iteration) {
302
- simplex.sort(sortOrder);
303
- if (parameters.history) {
304
- const sortedSimplex = simplex.map((x) => {
305
- const state = x.slice();
306
- state.fx = x.fx;
307
- state.id = x.id;
308
- return state;
309
- });
310
- sortedSimplex.sort((a, b) => a.id - b.id);
311
- parameters.history.push({
312
- x: simplex[0].slice(),
313
- fx: simplex[0].fx,
314
- simplex: sortedSimplex
315
- });
316
- }
317
- maxDiff = 0;
318
- for (let i = 0; i < N; ++i) maxDiff = Math.max(maxDiff, Math.abs(simplex[0][i] - simplex[1][i]));
319
- if (Math.abs(simplex[0].fx - simplex[N].fx) < minErrorDelta && maxDiff < minTolerance) break;
320
- for (let i = 0; i < N; ++i) {
321
- centroid[i] = 0;
322
- for (let j = 0; j < N; ++j) centroid[i] += simplex[j][i];
323
- centroid[i] /= N;
324
- }
325
- const worst = simplex[N];
326
- weightedSum(reflected, 1 + rho, centroid, -rho, worst);
327
- reflected.fx = f(reflected);
328
- if (reflected.fx < simplex[0].fx) {
329
- weightedSum(expanded, 1 + chi, centroid, -chi, worst);
330
- expanded.fx = f(expanded);
331
- if (expanded.fx < reflected.fx) updateSimplex(expanded);
332
- else updateSimplex(reflected);
333
- } else if (reflected.fx >= simplex[N - 1].fx) {
334
- let shouldReduce = false;
335
- if (reflected.fx > worst.fx) {
336
- weightedSum(contracted, 1 + psi, centroid, -psi, worst);
337
- contracted.fx = f(contracted);
338
- if (contracted.fx < worst.fx) updateSimplex(contracted);
339
- else shouldReduce = true;
340
- } else {
341
- weightedSum(contracted, 1 - psi * rho, centroid, psi * rho, worst);
342
- contracted.fx = f(contracted);
343
- if (contracted.fx < reflected.fx) updateSimplex(contracted);
344
- else shouldReduce = true;
345
- }
346
- if (shouldReduce) {
347
- if (sigma >= 1) break;
348
- for (let i = 1; i < simplex.length; ++i) {
349
- weightedSum(simplex[i], 1 - sigma, simplex[0], sigma, simplex[i]);
350
- simplex[i].fx = f(simplex[i]);
351
- }
352
- }
353
- } else updateSimplex(reflected);
354
- }
355
- simplex.sort(sortOrder);
356
- return {
357
- fx: simplex[0].fx,
358
- x: simplex[0]
359
- };
360
- }
361
- function wolfeLineSearch(f, pk, current, next, a, c1, c2) {
362
- const phi0 = current.fx;
363
- const phiPrime0 = dot(current.fxprime, pk);
364
- let phi = phi0;
365
- let phi_old = phi0;
366
- let phiPrime = phiPrime0;
367
- let a0 = 0;
368
- a = a || 1;
369
- c1 = c1 || 1e-6;
370
- c2 = c2 || .1;
371
- function zoom(a_lo, a_high, phi_lo) {
372
- for (let iteration = 0; iteration < 16; ++iteration) {
373
- a = (a_lo + a_high) / 2;
374
- weightedSum(next.x, 1, current.x, a, pk);
375
- phi = next.fx = f(next.x, next.fxprime);
376
- phiPrime = dot(next.fxprime, pk);
377
- if (phi > phi0 + c1 * a * phiPrime0 || phi >= phi_lo) a_high = a;
378
- else {
379
- if (Math.abs(phiPrime) <= -c2 * phiPrime0) return a;
380
- if (phiPrime * (a_high - a_lo) >= 0) a_high = a_lo;
381
- a_lo = a;
382
- phi_lo = phi;
383
- }
384
- }
385
- return 0;
386
- }
387
- for (let iteration = 0; iteration < 10; ++iteration) {
388
- weightedSum(next.x, 1, current.x, a, pk);
389
- phi = next.fx = f(next.x, next.fxprime);
390
- phiPrime = dot(next.fxprime, pk);
391
- if (phi > phi0 + c1 * a * phiPrime0 || iteration && phi >= phi_old) return zoom(a0, a, phi_old);
392
- if (Math.abs(phiPrime) <= -c2 * phiPrime0) return a;
393
- if (phiPrime >= 0) return zoom(a, a0, phi);
394
- phi_old = phi;
395
- a0 = a;
396
- a *= 2;
397
- }
398
- return a;
399
- }
400
- function conjugateGradient(f, initial, params) {
401
- let current = {
402
- x: initial.slice(),
403
- fx: 0,
404
- fxprime: initial.slice()
405
- };
406
- let next = {
407
- x: initial.slice(),
408
- fx: 0,
409
- fxprime: initial.slice()
410
- };
411
- const yk = initial.slice();
412
- let pk;
413
- let temp;
414
- let a = 1;
415
- let maxIterations;
416
- params = params || {};
417
- maxIterations = params.maxIterations || initial.length * 20;
418
- current.fx = f(current.x, current.fxprime);
419
- pk = current.fxprime.slice();
420
- scale(pk, current.fxprime, -1);
421
- for (let i = 0; i < maxIterations; ++i) {
422
- a = wolfeLineSearch(f, pk, current, next, a);
423
- if (params.history) params.history.push({
424
- x: current.x.slice(),
425
- fx: current.fx,
426
- fxprime: current.fxprime.slice(),
427
- alpha: a
428
- });
429
- if (!a) scale(pk, current.fxprime, -1);
430
- else {
431
- weightedSum(yk, 1, next.fxprime, -1, current.fxprime);
432
- const delta_k = dot(current.fxprime, current.fxprime);
433
- const beta_k = Math.max(0, dot(yk, next.fxprime) / delta_k);
434
- weightedSum(pk, beta_k, pk, -1, next.fxprime);
435
- temp = current;
436
- current = next;
437
- next = temp;
438
- }
439
- if (norm2(current.fxprime) <= 1e-5) break;
440
- }
441
- if (params.history) params.history.push({
442
- x: current.x.slice(),
443
- fx: current.fx,
444
- fxprime: current.fxprime.slice(),
445
- alpha: a
446
- });
447
- return current;
448
- }
449
- /**
450
- * given a list of set objects, and their corresponding overlaps
451
- * updates the (x, y, radius) attribute on each set such that their positions
452
- * roughly correspond to the desired overlaps
453
- * @param {readonly {sets: readonly string[]; size: number; weight?: number}[]} sets
454
- * @returns {{[setid: string]: {x: number, y: number, radius: number}}}
455
- */
456
- function venn(sets, parameters = {}) {
457
- parameters.maxIterations = parameters.maxIterations || 500;
458
- const initialLayout = parameters.initialLayout || bestInitialLayout;
459
- const loss = parameters.lossFunction || lossFunction;
460
- const areas = addMissingAreas(sets, parameters);
461
- const circles = initialLayout(areas, parameters);
462
- const setids = Object.keys(circles);
463
- /** @type {number[]} */
464
- const initial = [];
465
- for (const setid of setids) {
466
- initial.push(circles[setid].x);
467
- initial.push(circles[setid].y);
468
- }
469
- const positions = nelderMead((values) => {
470
- const current = {};
471
- for (let i = 0; i < setids.length; ++i) {
472
- const setid = setids[i];
473
- current[setid] = {
474
- x: values[2 * i],
475
- y: values[2 * i + 1],
476
- radius: circles[setid].radius
477
- };
478
- }
479
- return loss(current, areas);
480
- }, initial, parameters).x;
481
- for (let i = 0; i < setids.length; ++i) {
482
- const setid = setids[i];
483
- circles[setid].x = positions[2 * i];
484
- circles[setid].y = positions[2 * i + 1];
485
- }
486
- return circles;
487
- }
488
- var SMALL = 1e-10;
489
- /**
490
- * Returns the distance necessary for two circles of radius r1 + r2 to
491
- * have the overlap area 'overlap'
492
- * @param {number} r1
493
- * @param {number} r2
494
- * @param {number} overlap
495
- * @returns {number}
496
- */
497
- function distanceFromIntersectArea(r1, r2, overlap) {
498
- if (Math.min(r1, r2) * Math.min(r1, r2) * Math.PI <= overlap + SMALL) return Math.abs(r1 - r2);
499
- return bisect((distance) => circleOverlap(r1, r2, distance) - overlap, 0, r1 + r2);
500
- }
501
- /**
502
- * Missing pair-wise intersection area data can cause problems:
503
- * treating as an unknown means that sets will be laid out overlapping,
504
- * which isn't what people expect. To reflect that we want disjoint sets
505
- * here, set the overlap to 0 for all missing pairwise set intersections
506
- * @param {ReadonlyArray<{sets: ReadonlyArray<string>, size: number}>} areas
507
- * @returns {ReadonlyArray<{sets: ReadonlyArray<string>, size: number}>}
508
- */
509
- function addMissingAreas(areas, parameters = {}) {
510
- const distinct = parameters.distinct;
511
- const r = areas.map((s) => Object.assign({}, s));
512
- function toKey(arr) {
513
- return arr.join(";");
514
- }
515
- if (distinct) {
516
- /** @types Map<string, number> */
517
- const count = /* @__PURE__ */ new Map();
518
- for (const area of r) for (let i = 0; i < area.sets.length; i++) {
519
- const si = String(area.sets[i]);
520
- count.set(si, area.size + (count.get(si) || 0));
521
- for (let j = i + 1; j < area.sets.length; j++) {
522
- const sj = String(area.sets[j]);
523
- const k1 = `${si};${sj}`;
524
- const k2 = `${sj};${si}`;
525
- count.set(k1, area.size + (count.get(k1) || 0));
526
- count.set(k2, area.size + (count.get(k2) || 0));
527
- }
528
- }
529
- for (const area of r) if (area.sets.length < 3) area.size = count.get(toKey(area.sets));
530
- }
531
- const ids = [];
532
- /** @type {Set<string>} */
533
- const pairs = /* @__PURE__ */ new Set();
534
- for (const area of r) if (area.sets.length === 1) ids.push(area.sets[0]);
535
- else if (area.sets.length === 2) {
536
- const a = area.sets[0];
537
- const b = area.sets[1];
538
- pairs.add(toKey(area.sets));
539
- pairs.add(toKey([b, a]));
540
- }
541
- ids.sort((a, b) => a === b ? 0 : a < b ? -1 : 1);
542
- for (let i = 0; i < ids.length; ++i) {
543
- const a = ids[i];
544
- for (let j = i + 1; j < ids.length; ++j) {
545
- const b = ids[j];
546
- if (!pairs.has(toKey([a, b]))) r.push({
547
- sets: [a, b],
548
- size: 0
549
- });
550
- }
551
- }
552
- return r;
553
- }
554
- /**
555
- * Returns two matrices, one of the euclidean distances between the sets
556
- * and the other indicating if there are subset or disjoint set relationships
557
- * @param {ReadonlyArray<{sets: ReadonlyArray<number>}>} areas
558
- * @param {ReadonlyArray<{size: number}>} sets
559
- * @param {ReadonlyArray<number>} setids
560
- */
561
- function getDistanceMatrices(areas, sets, setids) {
562
- /**
563
- * @type {number[][]}
564
- */
565
- const distances = zerosM(sets.length, sets.length);
566
- /**
567
- * @type {number[][]}
568
- */
569
- const constraints = zerosM(sets.length, sets.length);
570
- areas.filter((x) => x.sets.length === 2).forEach((current) => {
571
- const left = setids[current.sets[0]];
572
- const right = setids[current.sets[1]];
573
- const distance = distanceFromIntersectArea(Math.sqrt(sets[left].size / Math.PI), Math.sqrt(sets[right].size / Math.PI), current.size);
574
- distances[left][right] = distances[right][left] = distance;
575
- let c = 0;
576
- if (current.size + 1e-10 >= Math.min(sets[left].size, sets[right].size)) c = 1;
577
- else if (current.size <= 1e-10) c = -1;
578
- constraints[left][right] = constraints[right][left] = c;
579
- });
580
- return {
581
- distances,
582
- constraints
583
- };
584
- }
585
- function constrainedMDSGradient(x, fxprime, distances, constraints) {
586
- for (let i = 0; i < fxprime.length; ++i) fxprime[i] = 0;
587
- let loss = 0;
588
- for (let i = 0; i < distances.length; ++i) {
589
- const xi = x[2 * i];
590
- const yi = x[2 * i + 1];
591
- for (let j = i + 1; j < distances.length; ++j) {
592
- const xj = x[2 * j];
593
- const yj = x[2 * j + 1];
594
- const dij = distances[i][j];
595
- const constraint = constraints[i][j];
596
- const squaredDistance = (xj - xi) * (xj - xi) + (yj - yi) * (yj - yi);
597
- const distance = Math.sqrt(squaredDistance);
598
- const delta = squaredDistance - dij * dij;
599
- if (constraint > 0 && distance <= dij || constraint < 0 && distance >= dij) continue;
600
- loss += 2 * delta * delta;
601
- fxprime[2 * i] += 4 * delta * (xi - xj);
602
- fxprime[2 * i + 1] += 4 * delta * (yi - yj);
603
- fxprime[2 * j] += 4 * delta * (xj - xi);
604
- fxprime[2 * j + 1] += 4 * delta * (yj - yi);
605
- }
606
- }
607
- return loss;
608
- }
609
- /**
610
- * takes the best working variant of either constrained MDS or greedy
611
- * @param {ReadonlyArray<{sets: ReadonlyArray<string>, size: number}>} areas
612
- */
613
- function bestInitialLayout(areas, params = {}) {
614
- let initial = greedyLayout(areas, params);
615
- const loss = params.lossFunction || lossFunction;
616
- if (areas.length >= 8) {
617
- const constrained = constrainedMDSLayout(areas, params);
618
- const constrainedLoss = loss(constrained, areas);
619
- const greedyLoss = loss(initial, areas);
620
- if (constrainedLoss + 1e-8 < greedyLoss) initial = constrained;
621
- }
622
- return initial;
623
- }
624
- /**
625
- * use the constrained MDS variant to generate an initial layout
626
- * @param {ReadonlyArray<{sets: ReadonlyArray<string>, size: number}>} areas
627
- * @returns {{[key: string]: {x: number, y: number, radius: number}}}
628
- */
629
- function constrainedMDSLayout(areas, params = {}) {
630
- const restarts = params.restarts || 10;
631
- const sets = [];
632
- const setids = {};
633
- for (const area of areas) if (area.sets.length === 1) {
634
- setids[area.sets[0]] = sets.length;
635
- sets.push(area);
636
- }
637
- let { distances, constraints } = getDistanceMatrices(areas, sets, setids);
638
- const norm = norm2(distances.map(norm2)) / distances.length;
639
- distances = distances.map((row) => row.map((value) => value / norm));
640
- const obj = (x, fxprime) => constrainedMDSGradient(x, fxprime, distances, constraints);
641
- let best = null;
642
- for (let i = 0; i < restarts; ++i) {
643
- const current = conjugateGradient(obj, zeros(distances.length * 2).map(Math.random), params);
644
- if (!best || current.fx < best.fx) best = current;
645
- }
646
- const positions = best.x;
647
- /** @type {{[key: string]: {x: number, y: number, radius: number}}} */
648
- const circles = {};
649
- for (let i = 0; i < sets.length; ++i) {
650
- const set = sets[i];
651
- circles[set.sets[0]] = {
652
- x: positions[2 * i] * norm,
653
- y: positions[2 * i + 1] * norm,
654
- radius: Math.sqrt(set.size / Math.PI)
655
- };
656
- }
657
- if (params.history) for (const h of params.history) scale(h.x, norm);
658
- return circles;
659
- }
660
- /**
661
- * Lays out a Venn diagram greedily, going from most overlapped sets to
662
- * least overlapped, attempting to position each new set such that the
663
- * overlapping areas to already positioned sets are basically right
664
- * @param {ReadonlyArray<{size: number, sets: ReadonlyArray<string>}>} areas
665
- * @return {{[key: string]: {x: number, y: number, radius: number}}}
666
- */
667
- function greedyLayout(areas, params) {
668
- const loss = params && params.lossFunction ? params.lossFunction : lossFunction;
669
- /** @type {{[key: string]: {x: number, y: number, radius: number}}} */
670
- const circles = {};
671
- /** @type {{[key: string]: {set: string, size: number, weight: number}[]}} */
672
- const setOverlaps = {};
673
- for (const area of areas) if (area.sets.length === 1) {
674
- const set = area.sets[0];
675
- circles[set] = {
676
- x: 1e10,
677
- y: 1e10,
678
- rowid: circles.length,
679
- size: area.size,
680
- radius: Math.sqrt(area.size / Math.PI)
681
- };
682
- setOverlaps[set] = [];
683
- }
684
- areas = areas.filter((a) => a.sets.length === 2);
685
- for (const current of areas) {
686
- let weight = current.weight != null ? current.weight : 1;
687
- const left = current.sets[0];
688
- const right = current.sets[1];
689
- if (current.size + SMALL >= Math.min(circles[left].size, circles[right].size)) weight = 0;
690
- setOverlaps[left].push({
691
- set: right,
692
- size: current.size,
693
- weight
694
- });
695
- setOverlaps[right].push({
696
- set: left,
697
- size: current.size,
698
- weight
699
- });
700
- }
701
- const mostOverlapped = [];
702
- Object.keys(setOverlaps).forEach((set) => {
703
- let size = 0;
704
- for (let i = 0; i < setOverlaps[set].length; ++i) size += setOverlaps[set][i].size * setOverlaps[set][i].weight;
705
- mostOverlapped.push({
706
- set,
707
- size
708
- });
709
- });
710
- function sortOrder(a, b) {
711
- return b.size - a.size;
712
- }
713
- mostOverlapped.sort(sortOrder);
714
- const positioned = {};
715
- function isPositioned(element) {
716
- return element.set in positioned;
717
- }
718
- /**
719
- * adds a point to the output
720
- * @param {{x: number, y: number}} point
721
- * @param {number} index
722
- */
723
- function positionSet(point, index) {
724
- circles[index].x = point.x;
725
- circles[index].y = point.y;
726
- positioned[index] = true;
727
- }
728
- positionSet({
729
- x: 0,
730
- y: 0
731
- }, mostOverlapped[0].set);
732
- for (let i = 1; i < mostOverlapped.length; ++i) {
733
- const setIndex = mostOverlapped[i].set;
734
- const overlap = setOverlaps[setIndex].filter(isPositioned);
735
- const set = circles[setIndex];
736
- overlap.sort(sortOrder);
737
- if (overlap.length === 0) throw "ERROR: missing pairwise overlap information";
738
- /** @type {{x: number, y: number}[]} */
739
- const points = [];
740
- for (var j = 0; j < overlap.length; ++j) {
741
- const p1 = circles[overlap[j].set];
742
- const d1 = distanceFromIntersectArea(set.radius, p1.radius, overlap[j].size);
743
- points.push({
744
- x: p1.x + d1,
745
- y: p1.y
746
- });
747
- points.push({
748
- x: p1.x - d1,
749
- y: p1.y
750
- });
751
- points.push({
752
- y: p1.y + d1,
753
- x: p1.x
754
- });
755
- points.push({
756
- y: p1.y - d1,
757
- x: p1.x
758
- });
759
- for (let k = j + 1; k < overlap.length; ++k) {
760
- const p2 = circles[overlap[k].set];
761
- const d2 = distanceFromIntersectArea(set.radius, p2.radius, overlap[k].size);
762
- const extraPoints = circleCircleIntersection({
763
- x: p1.x,
764
- y: p1.y,
765
- radius: d1
766
- }, {
767
- x: p2.x,
768
- y: p2.y,
769
- radius: d2
770
- });
771
- points.push(...extraPoints);
772
- }
773
- }
774
- let bestLoss = 1e50;
775
- let bestPoint = points[0];
776
- for (const point of points) {
777
- circles[setIndex].x = point.x;
778
- circles[setIndex].y = point.y;
779
- const localLoss = loss(circles, areas);
780
- if (localLoss < bestLoss) {
781
- bestLoss = localLoss;
782
- bestPoint = point;
783
- }
784
- }
785
- positionSet(bestPoint, setIndex);
786
- }
787
- return circles;
788
- }
789
- /**
790
- * Given a bunch of sets, and the desired overlaps between these sets - computes
791
- * the distance from the actual overlaps to the desired overlaps. Note that
792
- * this method ignores overlaps of more than 2 circles
793
- * @param {{[key: string]: <{x: number, y: number, radius: number}>}} circles
794
- * @param {ReadonlyArray<{size: number, sets: ReadonlyArray<string>, weight?: number}>} overlaps
795
- * @returns {number}
796
- */
797
- function lossFunction(circles, overlaps) {
798
- let output = 0;
799
- for (const area of overlaps) {
800
- if (area.sets.length === 1) continue;
801
- /** @type {number} */
802
- let overlap;
803
- if (area.sets.length === 2) {
804
- const left = circles[area.sets[0]];
805
- const right = circles[area.sets[1]];
806
- overlap = circleOverlap(left.radius, right.radius, distance(left, right));
807
- } else overlap = intersectionArea(area.sets.map((d) => circles[d]));
808
- const weight = area.weight != null ? area.weight : 1;
809
- output += weight * (overlap - area.size) * (overlap - area.size);
810
- }
811
- return output;
812
- }
813
- function logRatioLossFunction(circles, overlaps) {
814
- let output = 0;
815
- for (const area of overlaps) {
816
- if (area.sets.length === 1) continue;
817
- /** @type {number} */
818
- let overlap;
819
- if (area.sets.length === 2) {
820
- const left = circles[area.sets[0]];
821
- const right = circles[area.sets[1]];
822
- overlap = circleOverlap(left.radius, right.radius, distance(left, right));
823
- } else overlap = intersectionArea(area.sets.map((d) => circles[d]));
824
- const weight = area.weight != null ? area.weight : 1;
825
- const differenceFromIdeal = Math.log((overlap + 1) / (area.size + 1));
826
- output += weight * differenceFromIdeal * differenceFromIdeal;
827
- }
828
- return output;
829
- }
830
- /**
831
- * orientates a bunch of circles to point in orientation
832
- * @param {{x :number, y: number, radius: number}[]} circles
833
- * @param {number | undefined} orientation
834
- * @param {((a: {x :number, y: number, radius: number}, b: {x :number, y: number, radius: number}) => number) | undefined} orientationOrder
835
- */
836
- function orientateCircles(circles, orientation, orientationOrder) {
837
- if (orientationOrder == null) circles.sort((a, b) => b.radius - a.radius);
838
- else circles.sort(orientationOrder);
839
- if (circles.length > 0) {
840
- const largestX = circles[0].x;
841
- const largestY = circles[0].y;
842
- for (const circle of circles) {
843
- circle.x -= largestX;
844
- circle.y -= largestY;
845
- }
846
- }
847
- if (circles.length === 2) {
848
- if (distance(circles[0], circles[1]) < Math.abs(circles[1].radius - circles[0].radius)) {
849
- circles[1].x = circles[0].x + circles[0].radius - circles[1].radius - 1e-10;
850
- circles[1].y = circles[0].y;
851
- }
852
- }
853
- if (circles.length > 1) {
854
- const rotation = Math.atan2(circles[1].x, circles[1].y) - orientation;
855
- const c = Math.cos(rotation);
856
- const s = Math.sin(rotation);
857
- for (const circle of circles) {
858
- const x = circle.x;
859
- const y = circle.y;
860
- circle.x = c * x - s * y;
861
- circle.y = s * x + c * y;
862
- }
863
- }
864
- if (circles.length > 2) {
865
- let angle = Math.atan2(circles[2].x, circles[2].y) - orientation;
866
- while (angle < 0) angle += 2 * Math.PI;
867
- while (angle > 2 * Math.PI) angle -= 2 * Math.PI;
868
- if (angle > Math.PI) {
869
- const slope = circles[1].y / (1e-10 + circles[1].x);
870
- for (const circle of circles) {
871
- var d = (circle.x + slope * circle.y) / (1 + slope * slope);
872
- circle.x = 2 * d - circle.x;
873
- circle.y = 2 * d * slope - circle.y;
874
- }
875
- }
876
- }
877
- }
878
- /**
879
- *
880
- * @param {ReadonlyArray<{x: number, y: number, radius: number}>} circles
881
- * @returns {{x: number, y: number, radius: number}[][]}
882
- */
883
- function disjointCluster(circles) {
884
- circles.forEach((circle) => {
885
- circle.parent = circle;
886
- });
887
- function find(circle) {
888
- if (circle.parent !== circle) circle.parent = find(circle.parent);
889
- return circle.parent;
890
- }
891
- function union(x, y) {
892
- const xRoot = find(x);
893
- xRoot.parent = find(y);
894
- }
895
- for (let i = 0; i < circles.length; ++i) for (let j = i + 1; j < circles.length; ++j) {
896
- const maxDistance = circles[i].radius + circles[j].radius;
897
- if (distance(circles[i], circles[j]) + 1e-10 < maxDistance) union(circles[j], circles[i]);
898
- }
899
- /** @type {Map<string, {x: number, y: number, radius: number}[]>} */
900
- const disjointClusters = /* @__PURE__ */ new Map();
901
- for (let i = 0; i < circles.length; ++i) {
902
- const setid = find(circles[i]).parent.setid;
903
- if (!disjointClusters.has(setid)) disjointClusters.set(setid, []);
904
- disjointClusters.get(setid).push(circles[i]);
905
- }
906
- circles.forEach((circle) => {
907
- delete circle.parent;
908
- });
909
- return Array.from(disjointClusters.values());
910
- }
911
- /**
912
- * @param {ReadonlyArray<{x :number, y: number, radius: number}>} circles
913
- * @returns {{xRange: [number, number], yRange: [number, number]}}
914
- */
915
- function getBoundingBox(circles) {
916
- const minMax = (d) => {
917
- return {
918
- max: circles.reduce((acc, c) => Math.max(acc, c[d] + c.radius), Number.NEGATIVE_INFINITY),
919
- min: circles.reduce((acc, c) => Math.min(acc, c[d] - c.radius), Number.POSITIVE_INFINITY)
920
- };
921
- };
922
- return {
923
- xRange: minMax("x"),
924
- yRange: minMax("y")
925
- };
926
- }
927
- /**
928
- *
929
- * @param {{[setid: string]: {x: number, y: number, radius: number}}} solution
930
- * @param {undefined | number} orientation
931
- * @param {((a: {x :number, y: number, radius: number}, b: {x :number, y: number, radius: number}) => number) | undefined} orientationOrder
932
- * @returns {{[setid: string]: {x: number, y: number, radius: number}}}
933
- */
934
- function normalizeSolution(solution, orientation, orientationOrder) {
935
- if (orientation == null) orientation = Math.PI / 2;
936
- let circles = fromObjectNotation(solution).map((d) => Object.assign({}, d));
937
- const clusters = disjointCluster(circles);
938
- for (const cluster of clusters) {
939
- orientateCircles(cluster, orientation, orientationOrder);
940
- const bounds = getBoundingBox(cluster);
941
- cluster.size = (bounds.xRange.max - bounds.xRange.min) * (bounds.yRange.max - bounds.yRange.min);
942
- cluster.bounds = bounds;
943
- }
944
- clusters.sort((a, b) => b.size - a.size);
945
- circles = clusters[0];
946
- let returnBounds = circles.bounds;
947
- const spacing = (returnBounds.xRange.max - returnBounds.xRange.min) / 50;
948
- /**
949
- * @param {ReadonlyArray<{x: number, y: number, radius: number, setid: string}>} cluster
950
- * @param {boolean} right
951
- * @param {boolean} bottom
952
- */
953
- function addCluster(cluster, right, bottom) {
954
- if (!cluster) return;
955
- const bounds = cluster.bounds;
956
- /** @type {number} */
957
- let xOffset;
958
- /** @type {number} */
959
- let yOffset;
960
- if (right) xOffset = returnBounds.xRange.max - bounds.xRange.min + spacing;
961
- else {
962
- xOffset = returnBounds.xRange.max - bounds.xRange.max;
963
- const centreing = (bounds.xRange.max - bounds.xRange.min) / 2 - (returnBounds.xRange.max - returnBounds.xRange.min) / 2;
964
- if (centreing < 0) xOffset += centreing;
965
- }
966
- if (bottom) yOffset = returnBounds.yRange.max - bounds.yRange.min + spacing;
967
- else {
968
- yOffset = returnBounds.yRange.max - bounds.yRange.max;
969
- const centreing = (bounds.yRange.max - bounds.yRange.min) / 2 - (returnBounds.yRange.max - returnBounds.yRange.min) / 2;
970
- if (centreing < 0) yOffset += centreing;
971
- }
972
- for (const c of cluster) {
973
- c.x += xOffset;
974
- c.y += yOffset;
975
- circles.push(c);
976
- }
977
- }
978
- let index = 1;
979
- while (index < clusters.length) {
980
- addCluster(clusters[index], true, false);
981
- addCluster(clusters[index + 1], false, true);
982
- addCluster(clusters[index + 2], true, true);
983
- index += 3;
984
- returnBounds = getBoundingBox(circles);
985
- }
986
- return toObjectNotation(circles);
987
- }
988
- /**
989
- * Scales a solution from venn.venn or venn.greedyLayout such that it fits in
990
- * a rectangle of width/height - with padding around the borders. also
991
- * centers the diagram in the available space at the same time.
992
- * If the scale parameter is not null, this automatic scaling is ignored in favor of this custom one
993
- * @param {{[setid: string]: {x: number, y: number, radius: number}}} solution
994
- * @param {number} width
995
- * @param {number} height
996
- * @param {number} padding
997
- * @param {boolean} scaleToFit
998
- * @returns {{[setid: string]: {x: number, y: number, radius: number}}}
999
- */
1000
- function scaleSolution(solution, width, height, padding, scaleToFit) {
1001
- const circles = fromObjectNotation(solution);
1002
- width -= 2 * padding;
1003
- height -= 2 * padding;
1004
- const { xRange, yRange } = getBoundingBox(circles);
1005
- if (xRange.max === xRange.min || yRange.max === yRange.min) {
1006
- console.log("not scaling solution: zero size detected");
1007
- return solution;
1008
- }
1009
- /** @type {number} */
1010
- let xScaling;
1011
- /** @type {number} */
1012
- let yScaling;
1013
- if (scaleToFit) {
1014
- const toScaleDiameter = Math.sqrt(scaleToFit / Math.PI) * 2;
1015
- xScaling = width / toScaleDiameter;
1016
- yScaling = height / toScaleDiameter;
1017
- } else {
1018
- xScaling = width / (xRange.max - xRange.min);
1019
- yScaling = height / (yRange.max - yRange.min);
1020
- }
1021
- const scaling = Math.min(yScaling, xScaling);
1022
- const xOffset = (width - (xRange.max - xRange.min) * scaling) / 2;
1023
- const yOffset = (height - (yRange.max - yRange.min) * scaling) / 2;
1024
- return toObjectNotation(circles.map((circle) => ({
1025
- radius: scaling * circle.radius,
1026
- x: padding + xOffset + (circle.x - xRange.min) * scaling,
1027
- y: padding + yOffset + (circle.y - yRange.min) * scaling,
1028
- setid: circle.setid
1029
- })));
1030
- }
1031
- /**
1032
- * @param {readonly {x: number, y: number, radius: number, setid: string}[]} circles
1033
- * @returns {{[setid: string]: {x: number, y: number, radius: number, setid: string}}}
1034
- */
1035
- function toObjectNotation(circles) {
1036
- /** @type {{[setid: string]: {x: number, y: number, radius: number, setid: string}}} */
1037
- const r = {};
1038
- for (const circle of circles) r[circle.setid] = circle;
1039
- return r;
1040
- }
1041
- /**
1042
- * @param {{[setid: string]: {x: number, y: number, radius: number}}} solution
1043
- * @returns {{x: number, y: number, radius: number, setid: string}[]}}
1044
- */
1045
- function fromObjectNotation(solution) {
1046
- return Object.keys(solution).map((id) => Object.assign(solution[id], { setid: id }));
1047
- }
1048
- /**
1049
- * VennDiagram includes an optional `options` parameter containing the following option(s):
1050
- *
1051
- * `colourScheme: Array<String>`
1052
- * A list of color values to be applied when coloring diagram circles.
1053
- *
1054
- * `symmetricalTextCentre: Boolean`
1055
- * Whether to symmetrically center each circle's text horizontally and vertically.
1056
- * Defaults to `false`.
1057
- *
1058
- * `textFill: String`
1059
- * The color to be applied to the text within each circle.
1060
- *
1061
- * @param {object} options
1062
- */
1063
- function VennDiagram(options = {}) {
1064
- let useViewBox = false;
1065
- let width = 600;
1066
- let height = 350;
1067
- let padding = 15;
1068
- let duration = 1e3;
1069
- let orientation = Math.PI / 2;
1070
- let normalize = true;
1071
- let scaleToFit = null;
1072
- let wrap = true;
1073
- let styled = true;
1074
- let fontSize = null;
1075
- let orientationOrder = null;
1076
- let distinct = false;
1077
- let round = null;
1078
- let symmetricalTextCentre = options && options.symmetricalTextCentre ? options.symmetricalTextCentre : false;
1079
- let colourMap = {};
1080
- let colourScheme = options && options.colourScheme ? options.colourScheme : options && options.colorScheme ? options.colorScheme : [
1081
- "#1f77b4",
1082
- "#ff7f0e",
1083
- "#2ca02c",
1084
- "#d62728",
1085
- "#9467bd",
1086
- "#8c564b",
1087
- "#e377c2",
1088
- "#7f7f7f",
1089
- "#bcbd22",
1090
- "#17becf"
1091
- ];
1092
- let colourIndex = 0;
1093
- let colours = function(key) {
1094
- if (key in colourMap) return colourMap[key];
1095
- var ret = colourMap[key] = colourScheme[colourIndex];
1096
- colourIndex += 1;
1097
- if (colourIndex >= colourScheme.length) colourIndex = 0;
1098
- return ret;
1099
- };
1100
- let layoutFunction = venn;
1101
- let loss = lossFunction;
1102
- function chart(selection) {
1103
- let data = selection.datum();
1104
- const toRemove = /* @__PURE__ */ new Set();
1105
- data.forEach((datum) => {
1106
- if (datum.size == 0 && datum.sets.length == 1) toRemove.add(datum.sets[0]);
1107
- });
1108
- data = data.filter((datum) => !datum.sets.some((set) => toRemove.has(set)));
1109
- let circles = {};
1110
- let textCentres = {};
1111
- if (data.length > 0) {
1112
- let solution = layoutFunction(data, {
1113
- lossFunction: loss,
1114
- distinct
1115
- });
1116
- if (normalize) solution = normalizeSolution(solution, orientation, orientationOrder);
1117
- circles = scaleSolution(solution, width, height, padding, scaleToFit);
1118
- textCentres = computeTextCentres(circles, data, symmetricalTextCentre);
1119
- }
1120
- const labels = {};
1121
- data.forEach((datum) => {
1122
- if (datum.label) labels[datum.sets] = datum.label;
1123
- });
1124
- function label(d) {
1125
- if (d.sets in labels) return labels[d.sets];
1126
- if (d.sets.length == 1) return "" + d.sets[0];
1127
- }
1128
- selection.selectAll("svg").data([circles]).enter().append("svg");
1129
- const svg = selection.select("svg");
1130
- if (useViewBox) svg.attr("viewBox", `0 0 ${width} ${height}`);
1131
- else svg.attr("width", width).attr("height", height);
1132
- const previous = {};
1133
- let hasPrevious = false;
1134
- svg.selectAll(".venn-area path").each(function(d) {
1135
- const path = this.getAttribute("d");
1136
- if (d.sets.length == 1 && path && !distinct) {
1137
- hasPrevious = true;
1138
- previous[d.sets[0]] = circleFromPath(path);
1139
- }
1140
- });
1141
- function pathTween(d) {
1142
- return (t) => {
1143
- return intersectionAreaPath(d.sets.map((set) => {
1144
- let start = previous[set];
1145
- let end = circles[set];
1146
- if (!start) start = {
1147
- x: width / 2,
1148
- y: height / 2,
1149
- radius: 1
1150
- };
1151
- if (!end) end = {
1152
- x: width / 2,
1153
- y: height / 2,
1154
- radius: 1
1155
- };
1156
- return {
1157
- x: start.x * (1 - t) + end.x * t,
1158
- y: start.y * (1 - t) + end.y * t,
1159
- radius: start.radius * (1 - t) + end.radius * t
1160
- };
1161
- }), round);
1162
- };
1163
- }
1164
- const nodes = svg.selectAll(".venn-area").data(data, (d) => d.sets);
1165
- const enter = nodes.enter().append("g").attr("class", (d) => `venn-area venn-${d.sets.length == 1 ? "circle" : "intersection"}${d.colour || d.color ? " venn-coloured" : ""}`).attr("data-venn-sets", (d) => d.sets.join("_"));
1166
- const enterPath = enter.append("path");
1167
- const enterText = enter.append("text").attr("class", "label").text((d) => label(d)).attr("text-anchor", "middle").attr("dy", ".35em").attr("x", width / 2).attr("y", height / 2);
1168
- if (styled) {
1169
- enterPath.style("fill-opacity", "0").filter((d) => d.sets.length == 1).style("fill", (d) => d.colour ? d.colour : d.color ? d.color : colours(d.sets)).style("fill-opacity", ".25");
1170
- enterText.style("fill", (d) => {
1171
- if (d.colour || d.color) return "#FFF";
1172
- if (options.textFill) return options.textFill;
1173
- return d.sets.length == 1 ? colours(d.sets) : "#444";
1174
- });
1175
- }
1176
- function asTransition(s) {
1177
- if (typeof s.transition === "function") return s.transition("venn").duration(duration);
1178
- return s;
1179
- }
1180
- let update = selection;
1181
- if (hasPrevious && typeof update.transition === "function") {
1182
- update = asTransition(selection);
1183
- update.selectAll("path").attrTween("d", pathTween);
1184
- } else update.selectAll("path").attr("d", (d) => intersectionAreaPath(d.sets.map((set) => circles[set])), round);
1185
- const updateText = update.selectAll("text").filter((d) => d.sets in textCentres).text((d) => label(d)).attr("x", (d) => Math.floor(textCentres[d.sets].x)).attr("y", (d) => Math.floor(textCentres[d.sets].y));
1186
- if (wrap) if (hasPrevious) if ("on" in updateText) updateText.on("end", wrapText(circles, label));
1187
- else updateText.each("end", wrapText(circles, label));
1188
- else updateText.each(wrapText(circles, label));
1189
- const exit = asTransition(nodes.exit()).remove();
1190
- if (typeof nodes.transition === "function") exit.selectAll("path").attrTween("d", pathTween);
1191
- const exitText = exit.selectAll("text").attr("x", width / 2).attr("y", height / 2);
1192
- if (fontSize !== null) {
1193
- enterText.style("font-size", "0px");
1194
- updateText.style("font-size", fontSize);
1195
- exitText.style("font-size", "0px");
1196
- }
1197
- return {
1198
- circles,
1199
- textCentres,
1200
- nodes,
1201
- enter,
1202
- update,
1203
- exit
1204
- };
1205
- }
1206
- chart.wrap = function(_) {
1207
- if (!arguments.length) return wrap;
1208
- wrap = _;
1209
- return chart;
1210
- };
1211
- chart.useViewBox = function() {
1212
- useViewBox = true;
1213
- return chart;
1214
- };
1215
- chart.width = function(_) {
1216
- if (!arguments.length) return width;
1217
- width = _;
1218
- return chart;
1219
- };
1220
- chart.height = function(_) {
1221
- if (!arguments.length) return height;
1222
- height = _;
1223
- return chart;
1224
- };
1225
- chart.padding = function(_) {
1226
- if (!arguments.length) return padding;
1227
- padding = _;
1228
- return chart;
1229
- };
1230
- chart.distinct = function(_) {
1231
- if (!arguments.length) return distinct;
1232
- distinct = _;
1233
- return chart;
1234
- };
1235
- chart.colours = function(_) {
1236
- if (!arguments.length) return colours;
1237
- colours = _;
1238
- return chart;
1239
- };
1240
- chart.colors = function(_) {
1241
- if (!arguments.length) return colours;
1242
- colours = _;
1243
- return chart;
1244
- };
1245
- chart.fontSize = function(_) {
1246
- if (!arguments.length) return fontSize;
1247
- fontSize = _;
1248
- return chart;
1249
- };
1250
- chart.round = function(_) {
1251
- if (!arguments.length) return round;
1252
- round = _;
1253
- return chart;
1254
- };
1255
- chart.duration = function(_) {
1256
- if (!arguments.length) return duration;
1257
- duration = _;
1258
- return chart;
1259
- };
1260
- chart.layoutFunction = function(_) {
1261
- if (!arguments.length) return layoutFunction;
1262
- layoutFunction = _;
1263
- return chart;
1264
- };
1265
- chart.normalize = function(_) {
1266
- if (!arguments.length) return normalize;
1267
- normalize = _;
1268
- return chart;
1269
- };
1270
- chart.scaleToFit = function(_) {
1271
- if (!arguments.length) return scaleToFit;
1272
- scaleToFit = _;
1273
- return chart;
1274
- };
1275
- chart.styled = function(_) {
1276
- if (!arguments.length) return styled;
1277
- styled = _;
1278
- return chart;
1279
- };
1280
- chart.orientation = function(_) {
1281
- if (!arguments.length) return orientation;
1282
- orientation = _;
1283
- return chart;
1284
- };
1285
- chart.orientationOrder = function(_) {
1286
- if (!arguments.length) return orientationOrder;
1287
- orientationOrder = _;
1288
- return chart;
1289
- };
1290
- chart.lossFunction = function(_) {
1291
- if (!arguments.length) return loss;
1292
- loss = _ === "default" ? lossFunction : _ === "logRatio" ? logRatioLossFunction : _;
1293
- return chart;
1294
- };
1295
- return chart;
1296
- }
1297
- function wrapText(circles, labeller) {
1298
- return function(data) {
1299
- const text = this;
1300
- const width = circles[data.sets[0]].radius || 50;
1301
- const label = labeller(data) || "";
1302
- const words = label.split(/\s+/).reverse();
1303
- const minChars = (label.length + words.length) / 3;
1304
- let word = words.pop();
1305
- let line = [word];
1306
- let lineNumber = 0;
1307
- const lineHeight = 1.1;
1308
- text.textContent = null;
1309
- const tspans = [];
1310
- function append(word) {
1311
- const tspan = text.ownerDocument.createElementNS(text.namespaceURI, "tspan");
1312
- tspan.textContent = word;
1313
- tspans.push(tspan);
1314
- text.append(tspan);
1315
- return tspan;
1316
- }
1317
- let tspan = append(word);
1318
- while (true) {
1319
- word = words.pop();
1320
- if (!word) break;
1321
- line.push(word);
1322
- const joined = line.join(" ");
1323
- tspan.textContent = joined;
1324
- if (joined.length > minChars && tspan.getComputedTextLength() > width) {
1325
- line.pop();
1326
- tspan.textContent = line.join(" ");
1327
- line = [word];
1328
- tspan = append(word);
1329
- lineNumber++;
1330
- }
1331
- }
1332
- const initial = .35 - lineNumber * lineHeight / 2;
1333
- const x = text.getAttribute("x");
1334
- const y = text.getAttribute("y");
1335
- tspans.forEach((t, i) => {
1336
- t.setAttribute("x", x);
1337
- t.setAttribute("y", y);
1338
- t.setAttribute("dy", `${initial + i * lineHeight}em`);
1339
- });
1340
- };
1341
- }
1342
- /**
1343
- *
1344
- * @param {{x: number, y: number}} current
1345
- * @param {ReadonlyArray<{x: number, y: number}>} interior
1346
- * @param {ReadonlyArray<{x: number, y: number}>} exterior
1347
- * @returns {number}
1348
- */
1349
- function circleMargin(current, interior, exterior) {
1350
- let margin = interior[0].radius - distance(interior[0], current);
1351
- for (let i = 1; i < interior.length; ++i) {
1352
- const m = interior[i].radius - distance(interior[i], current);
1353
- if (m <= margin) margin = m;
1354
- }
1355
- for (let i = 0; i < exterior.length; ++i) {
1356
- const m = distance(exterior[i], current) - exterior[i].radius;
1357
- if (m <= margin) margin = m;
1358
- }
1359
- return margin;
1360
- }
1361
- /**
1362
- * compute the center of some circles by maximizing the margin of
1363
- * the center point relative to the circles (interior) after subtracting
1364
- * nearby circles (exterior)
1365
- * @param {readonly {x: number, y: number, radius: number}[]} interior
1366
- * @param {readonly {x: number, y: number, radius: number}[]} exterior
1367
- * @param {boolean} symmetricalTextCentre
1368
- * @returns {{x:number, y: number}}
1369
- */
1370
- function computeTextCentre(interior, exterior, symmetricalTextCentre) {
1371
- /** @type {{x: number, y: number}[]} */
1372
- const points = [];
1373
- for (const c of interior) {
1374
- points.push({
1375
- x: c.x,
1376
- y: c.y
1377
- });
1378
- points.push({
1379
- x: c.x + c.radius / 2,
1380
- y: c.y
1381
- });
1382
- points.push({
1383
- x: c.x - c.radius / 2,
1384
- y: c.y
1385
- });
1386
- points.push({
1387
- x: c.x,
1388
- y: c.y + c.radius / 2
1389
- });
1390
- points.push({
1391
- x: c.x,
1392
- y: c.y - c.radius / 2
1393
- });
1394
- }
1395
- let initial = points[0];
1396
- let margin = circleMargin(points[0], interior, exterior);
1397
- for (let i = 1; i < points.length; ++i) {
1398
- const m = circleMargin(points[i], interior, exterior);
1399
- if (m >= margin) {
1400
- initial = points[i];
1401
- margin = m;
1402
- }
1403
- }
1404
- const solution = nelderMead((p) => -1 * circleMargin({
1405
- x: p[0],
1406
- y: p[1]
1407
- }, interior, exterior), [initial.x, initial.y], {
1408
- maxIterations: 500,
1409
- minErrorDelta: 1e-10
1410
- }).x;
1411
- const ret = {
1412
- x: symmetricalTextCentre ? 0 : solution[0],
1413
- y: solution[1]
1414
- };
1415
- let valid = true;
1416
- for (const i of interior) if (distance(ret, i) > i.radius) {
1417
- valid = false;
1418
- break;
1419
- }
1420
- for (const e of exterior) if (distance(ret, e) < e.radius) {
1421
- valid = false;
1422
- break;
1423
- }
1424
- if (valid) return ret;
1425
- if (interior.length == 1) return {
1426
- x: interior[0].x,
1427
- y: interior[0].y
1428
- };
1429
- const areaStats = {};
1430
- intersectionArea(interior, areaStats);
1431
- if (areaStats.arcs.length === 0) return {
1432
- x: 0,
1433
- y: -1e3,
1434
- disjoint: true
1435
- };
1436
- if (areaStats.arcs.length == 1) return {
1437
- x: areaStats.arcs[0].circle.x,
1438
- y: areaStats.arcs[0].circle.y
1439
- };
1440
- if (exterior.length) return computeTextCentre(interior, []);
1441
- return getCenter(areaStats.arcs.map((a) => a.p1));
1442
- }
1443
- function getOverlappingCircles(circles) {
1444
- const ret = {};
1445
- const circleids = Object.keys(circles);
1446
- for (const circleid of circleids) ret[circleid] = [];
1447
- for (let i = 0; i < circleids.length; i++) {
1448
- const ci = circleids[i];
1449
- const a = circles[ci];
1450
- for (let j = i + 1; j < circleids.length; ++j) {
1451
- const cj = circleids[j];
1452
- const b = circles[cj];
1453
- const d = distance(a, b);
1454
- if (d + b.radius <= a.radius + 1e-10) ret[cj].push(ci);
1455
- else if (d + a.radius <= b.radius + 1e-10) ret[ci].push(cj);
1456
- }
1457
- }
1458
- return ret;
1459
- }
1460
- function computeTextCentres(circles, areas, symmetricalTextCentre) {
1461
- const ret = {};
1462
- const overlapped = getOverlappingCircles(circles);
1463
- for (let i = 0; i < areas.length; ++i) {
1464
- const area = areas[i].sets;
1465
- const areaids = {};
1466
- const exclude = {};
1467
- for (let j = 0; j < area.length; ++j) {
1468
- areaids[area[j]] = true;
1469
- const overlaps = overlapped[area[j]];
1470
- for (let k = 0; k < overlaps.length; ++k) exclude[overlaps[k]] = true;
1471
- }
1472
- const interior = [];
1473
- const exterior = [];
1474
- for (let setid in circles) if (setid in areaids) interior.push(circles[setid]);
1475
- else if (!(setid in exclude)) exterior.push(circles[setid]);
1476
- const centre = computeTextCentre(interior, exterior, symmetricalTextCentre);
1477
- ret[area] = centre;
1478
- if (centre.disjoint && areas[i].size > 0) console.log("WARNING: area " + area + " not represented on screen");
1479
- }
1480
- return ret;
1481
- }
1482
- /**
1483
- * @param {number} x
1484
- * @param {number} y
1485
- * @param {number} r
1486
- * @returns {string}
1487
- */
1488
- function circlePath(x, y, r) {
1489
- const ret = [];
1490
- ret.push("\nM", x, y);
1491
- ret.push("\nm", -r, 0);
1492
- ret.push("\na", r, r, 0, 1, 0, r * 2, 0);
1493
- ret.push("\na", r, r, 0, 1, 0, -r * 2, 0);
1494
- return ret.join(" ");
1495
- }
1496
- /**
1497
- * inverse of the circlePath function, returns a circle object from an svg path
1498
- * @param {string} path
1499
- * @returns {{x: number, y: number, radius: number}}
1500
- */
1501
- function circleFromPath(path) {
1502
- const tokens = path.split(" ");
1503
- return {
1504
- x: Number.parseFloat(tokens[1]),
1505
- y: Number.parseFloat(tokens[2]),
1506
- radius: -Number.parseFloat(tokens[4])
1507
- };
1508
- }
1509
- function intersectionAreaArcs(circles) {
1510
- if (circles.length === 0) return [];
1511
- const stats = {};
1512
- intersectionArea(circles, stats);
1513
- return stats.arcs;
1514
- }
1515
- function arcsToPath(arcs, round) {
1516
- if (arcs.length === 0) return "M 0 0";
1517
- const rFactor = Math.pow(10, round || 0);
1518
- const r = round != null ? (v) => Math.round(v * rFactor) / rFactor : (v) => v;
1519
- if (arcs.length == 1) {
1520
- const circle = arcs[0].circle;
1521
- return circlePath(r(circle.x), r(circle.y), r(circle.radius));
1522
- }
1523
- const ret = [
1524
- "\nM",
1525
- r(arcs[0].p2.x),
1526
- r(arcs[0].p2.y)
1527
- ];
1528
- for (const arc of arcs) {
1529
- const radius = r(arc.circle.radius);
1530
- ret.push("\nA", radius, radius, 0, arc.large ? 1 : 0, arc.sweep ? 1 : 0, r(arc.p1.x), r(arc.p1.y));
1531
- }
1532
- return ret.join(" ");
1533
- }
1534
- /**
1535
- * returns a svg path of the intersection area of a bunch of circles
1536
- * @param {ReadonlyArray<{x: number, y: number, radius: number}>} circles
1537
- * @returns {string}
1538
- */
1539
- function intersectionAreaPath(circles, round) {
1540
- return arcsToPath(intersectionAreaArcs(circles), round);
1541
- }
1542
- function layout(data, options = {}) {
1543
- const { lossFunction: loss, layoutFunction: layout = venn, normalize = true, orientation = Math.PI / 2, orientationOrder, width = 600, height = 350, padding = 15, scaleToFit = false, symmetricalTextCentre = false, distinct, round = 2 } = options;
1544
- let solution = layout(data, {
1545
- lossFunction: loss === "default" || !loss ? lossFunction : loss === "logRatio" ? logRatioLossFunction : loss,
1546
- distinct
1547
- });
1548
- if (normalize) solution = normalizeSolution(solution, orientation, orientationOrder);
1549
- const circles = scaleSolution(solution, width, height, padding, scaleToFit);
1550
- const textCentres = computeTextCentres(circles, data, symmetricalTextCentre);
1551
- const circleLookup = new Map(Object.keys(circles).map((set) => [set, {
1552
- set,
1553
- x: circles[set].x,
1554
- y: circles[set].y,
1555
- radius: circles[set].radius
1556
- }]));
1557
- const helpers = data.map((area) => {
1558
- const circles = area.sets.map((s) => circleLookup.get(s));
1559
- const arcs = intersectionAreaArcs(circles);
1560
- return {
1561
- circles,
1562
- arcs,
1563
- path: arcsToPath(arcs, round),
1564
- area,
1565
- has: new Set(area.sets)
1566
- };
1567
- });
1568
- function genDistinctPath(sets) {
1569
- let r = "";
1570
- for (const e of helpers) if (e.has.size > sets.length && sets.every((s) => e.has.has(s))) r += " " + e.path;
1571
- return r;
1572
- }
1573
- return helpers.map(({ circles, arcs, path, area }) => {
1574
- return {
1575
- data: area,
1576
- text: textCentres[area.sets],
1577
- circles,
1578
- arcs,
1579
- path,
1580
- distinctPath: path + genDistinctPath(area.sets)
1581
- };
1582
- });
1583
- }
1584
- //#endregion
1585
- //#region ../../node_modules/.pnpm/mermaid@11.15.0/node_modules/mermaid/dist/chunks/mermaid.core/vennDiagram-CIIHVFJN.mjs
1586
- var parser = function() {
1587
- var o = /* @__PURE__ */ __name$1(function(k, v, o2, l) {
1588
- for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v);
1589
- return o2;
1590
- }, "o");
1591
- var $V0 = [5, 8];
1592
- var $V1 = [
1593
- 7,
1594
- 8,
1595
- 11,
1596
- 12,
1597
- 17,
1598
- 19,
1599
- 22,
1600
- 24
1601
- ];
1602
- var $V2 = [1, 17];
1603
- var $V3 = [1, 18];
1604
- var $V4 = [
1605
- 7,
1606
- 8,
1607
- 11,
1608
- 12,
1609
- 14,
1610
- 15,
1611
- 16,
1612
- 17,
1613
- 19,
1614
- 20,
1615
- 21,
1616
- 22,
1617
- 24,
1618
- 27
1619
- ];
1620
- var $V5 = [1, 31];
1621
- var $V6 = [1, 39];
1622
- var $V7 = [
1623
- 7,
1624
- 8,
1625
- 11,
1626
- 12,
1627
- 17,
1628
- 19,
1629
- 22,
1630
- 24,
1631
- 27
1632
- ];
1633
- var $V8 = [1, 57];
1634
- var $V9 = [1, 56];
1635
- var $Va = [1, 58];
1636
- var $Vb = [1, 59];
1637
- var $Vc = [1, 60];
1638
- var $Vd = [
1639
- 7,
1640
- 8,
1641
- 11,
1642
- 12,
1643
- 16,
1644
- 17,
1645
- 19,
1646
- 20,
1647
- 22,
1648
- 24,
1649
- 27,
1650
- 31,
1651
- 32,
1652
- 33
1653
- ];
1654
- var parser2 = {
1655
- trace: /* @__PURE__ */ __name$1(function trace() {}, "trace"),
1656
- yy: {},
1657
- symbols_: {
1658
- "error": 2,
1659
- "start": 3,
1660
- "optNewlines": 4,
1661
- "VENN": 5,
1662
- "document": 6,
1663
- "EOF": 7,
1664
- "NEWLINE": 8,
1665
- "line": 9,
1666
- "statement": 10,
1667
- "TITLE": 11,
1668
- "SET": 12,
1669
- "identifier": 13,
1670
- "BRACKET_LABEL": 14,
1671
- "COLON": 15,
1672
- "NUMERIC": 16,
1673
- "UNION": 17,
1674
- "identifierList": 18,
1675
- "TEXT": 19,
1676
- "IDENTIFIER": 20,
1677
- "STRING": 21,
1678
- "INDENT_TEXT": 22,
1679
- "indentedTextTail": 23,
1680
- "STYLE": 24,
1681
- "stylesOpt": 25,
1682
- "styleField": 26,
1683
- "COMMA": 27,
1684
- "styleValue": 28,
1685
- "valueTokens": 29,
1686
- "valueToken": 30,
1687
- "HEXCOLOR": 31,
1688
- "RGBCOLOR": 32,
1689
- "RGBACOLOR": 33,
1690
- "$accept": 0,
1691
- "$end": 1
1692
- },
1693
- terminals_: {
1694
- 2: "error",
1695
- 5: "VENN",
1696
- 7: "EOF",
1697
- 8: "NEWLINE",
1698
- 11: "TITLE",
1699
- 12: "SET",
1700
- 14: "BRACKET_LABEL",
1701
- 15: "COLON",
1702
- 16: "NUMERIC",
1703
- 17: "UNION",
1704
- 19: "TEXT",
1705
- 20: "IDENTIFIER",
1706
- 21: "STRING",
1707
- 22: "INDENT_TEXT",
1708
- 24: "STYLE",
1709
- 27: "COMMA",
1710
- 31: "HEXCOLOR",
1711
- 32: "RGBCOLOR",
1712
- 33: "RGBACOLOR"
1713
- },
1714
- productions_: [
1715
- 0,
1716
- [3, 4],
1717
- [4, 0],
1718
- [4, 2],
1719
- [6, 0],
1720
- [6, 2],
1721
- [9, 1],
1722
- [9, 1],
1723
- [10, 1],
1724
- [10, 2],
1725
- [10, 3],
1726
- [10, 4],
1727
- [10, 5],
1728
- [10, 2],
1729
- [10, 3],
1730
- [10, 4],
1731
- [10, 5],
1732
- [10, 3],
1733
- [10, 3],
1734
- [10, 3],
1735
- [10, 4],
1736
- [10, 4],
1737
- [10, 2],
1738
- [10, 3],
1739
- [23, 1],
1740
- [23, 1],
1741
- [23, 1],
1742
- [23, 2],
1743
- [23, 2],
1744
- [25, 1],
1745
- [25, 3],
1746
- [26, 3],
1747
- [28, 1],
1748
- [28, 1],
1749
- [29, 1],
1750
- [29, 2],
1751
- [30, 1],
1752
- [30, 1],
1753
- [30, 1],
1754
- [30, 1],
1755
- [30, 1],
1756
- [18, 1],
1757
- [18, 3],
1758
- [13, 1],
1759
- [13, 1]
1760
- ],
1761
- performAction: /* @__PURE__ */ __name$1(function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
1762
- var $0 = $$.length - 1;
1763
- switch (yystate) {
1764
- case 1: return $$[$0 - 1];
1765
- case 2:
1766
- case 3:
1767
- case 4:
1768
- this.$ = [];
1769
- break;
1770
- case 5:
1771
- $$[$0 - 1].push($$[$0]);
1772
- this.$ = $$[$0 - 1];
1773
- break;
1774
- case 6:
1775
- this.$ = [];
1776
- break;
1777
- case 7:
1778
- case 22:
1779
- case 32:
1780
- case 36:
1781
- case 37:
1782
- case 38:
1783
- case 39:
1784
- case 40:
1785
- this.$ = $$[$0];
1786
- break;
1787
- case 8:
1788
- yy.setDiagramTitle($$[$0].substr(6));
1789
- this.$ = $$[$0].substr(6);
1790
- break;
1791
- case 9:
1792
- yy.addSubsetData([$$[$0]], void 0, void 0);
1793
- if (yy.setIndentMode) yy.setIndentMode(true);
1794
- break;
1795
- case 10:
1796
- yy.addSubsetData([$$[$0 - 1]], $$[$0], void 0);
1797
- if (yy.setIndentMode) yy.setIndentMode(true);
1798
- break;
1799
- case 11:
1800
- yy.addSubsetData([$$[$0 - 2]], void 0, parseFloat($$[$0]));
1801
- if (yy.setIndentMode) yy.setIndentMode(true);
1802
- break;
1803
- case 12:
1804
- yy.addSubsetData([$$[$0 - 3]], $$[$0 - 2], parseFloat($$[$0]));
1805
- if (yy.setIndentMode) yy.setIndentMode(true);
1806
- break;
1807
- case 13:
1808
- if ($$[$0].length < 2) throw new Error("union requires multiple identifiers");
1809
- if (yy.validateUnionIdentifiers) yy.validateUnionIdentifiers($$[$0]);
1810
- yy.addSubsetData($$[$0], void 0, void 0);
1811
- if (yy.setIndentMode) yy.setIndentMode(true);
1812
- break;
1813
- case 14:
1814
- if ($$[$0 - 1].length < 2) throw new Error("union requires multiple identifiers");
1815
- if (yy.validateUnionIdentifiers) yy.validateUnionIdentifiers($$[$0 - 1]);
1816
- yy.addSubsetData($$[$0 - 1], $$[$0], void 0);
1817
- if (yy.setIndentMode) yy.setIndentMode(true);
1818
- break;
1819
- case 15:
1820
- if ($$[$0 - 2].length < 2) throw new Error("union requires multiple identifiers");
1821
- if (yy.validateUnionIdentifiers) yy.validateUnionIdentifiers($$[$0 - 2]);
1822
- yy.addSubsetData($$[$0 - 2], void 0, parseFloat($$[$0]));
1823
- if (yy.setIndentMode) yy.setIndentMode(true);
1824
- break;
1825
- case 16:
1826
- if ($$[$0 - 3].length < 2) throw new Error("union requires multiple identifiers");
1827
- if (yy.validateUnionIdentifiers) yy.validateUnionIdentifiers($$[$0 - 3]);
1828
- yy.addSubsetData($$[$0 - 3], $$[$0 - 2], parseFloat($$[$0]));
1829
- if (yy.setIndentMode) yy.setIndentMode(true);
1830
- break;
1831
- case 17:
1832
- case 18:
1833
- case 19:
1834
- yy.addTextData($$[$0 - 1], $$[$0], void 0);
1835
- break;
1836
- case 20:
1837
- case 21:
1838
- yy.addTextData($$[$0 - 2], $$[$0 - 1], $$[$0]);
1839
- break;
1840
- case 23:
1841
- yy.addStyleData($$[$0 - 1], $$[$0]);
1842
- break;
1843
- case 24:
1844
- case 25:
1845
- case 26:
1846
- var cs = yy.getCurrentSets();
1847
- if (!cs) throw new Error("text requires set");
1848
- yy.addTextData(cs, $$[$0], void 0);
1849
- break;
1850
- case 27:
1851
- case 28:
1852
- var cs = yy.getCurrentSets();
1853
- if (!cs) throw new Error("text requires set");
1854
- yy.addTextData(cs, $$[$0 - 1], $$[$0]);
1855
- break;
1856
- case 29:
1857
- case 41:
1858
- this.$ = [$$[$0]];
1859
- break;
1860
- case 30:
1861
- case 42:
1862
- this.$ = [...$$[$0 - 2], $$[$0]];
1863
- break;
1864
- case 31:
1865
- this.$ = [$$[$0 - 2], $$[$0]];
1866
- break;
1867
- case 33:
1868
- this.$ = $$[$0].join(" ");
1869
- break;
1870
- case 34:
1871
- this.$ = [$$[$0]];
1872
- break;
1873
- case 35:
1874
- $$[$0 - 1].push($$[$0]);
1875
- this.$ = $$[$0 - 1];
1876
- break;
1877
- case 43:
1878
- case 44:
1879
- this.$ = $$[$0];
1880
- break;
1881
- }
1882
- }, "anonymous"),
1883
- table: [
1884
- o($V0, [2, 2], {
1885
- 3: 1,
1886
- 4: 2
1887
- }),
1888
- { 1: [3] },
1889
- {
1890
- 5: [1, 3],
1891
- 8: [1, 4]
1892
- },
1893
- o($V1, [2, 4], { 6: 5 }),
1894
- o($V0, [2, 3]),
1895
- {
1896
- 7: [1, 6],
1897
- 8: [1, 8],
1898
- 9: 7,
1899
- 10: 9,
1900
- 11: [1, 10],
1901
- 12: [1, 11],
1902
- 17: [1, 12],
1903
- 19: [1, 13],
1904
- 22: [1, 14],
1905
- 24: [1, 15]
1906
- },
1907
- { 1: [2, 1] },
1908
- o($V1, [2, 5]),
1909
- o($V1, [2, 6]),
1910
- o($V1, [2, 7]),
1911
- o($V1, [2, 8]),
1912
- {
1913
- 13: 16,
1914
- 20: $V2,
1915
- 21: $V3
1916
- },
1917
- {
1918
- 13: 20,
1919
- 18: 19,
1920
- 20: $V2,
1921
- 21: $V3
1922
- },
1923
- {
1924
- 13: 20,
1925
- 18: 21,
1926
- 20: $V2,
1927
- 21: $V3
1928
- },
1929
- {
1930
- 16: [1, 25],
1931
- 20: [1, 23],
1932
- 21: [1, 24],
1933
- 23: 22
1934
- },
1935
- {
1936
- 13: 20,
1937
- 18: 26,
1938
- 20: $V2,
1939
- 21: $V3
1940
- },
1941
- o($V1, [2, 9], {
1942
- 14: [1, 27],
1943
- 15: [1, 28]
1944
- }),
1945
- o($V4, [2, 43]),
1946
- o($V4, [2, 44]),
1947
- o($V1, [2, 13], {
1948
- 14: [1, 29],
1949
- 15: [1, 30],
1950
- 27: $V5
1951
- }),
1952
- o($V4, [2, 41]),
1953
- {
1954
- 16: [1, 34],
1955
- 20: [1, 32],
1956
- 21: [1, 33],
1957
- 27: $V5
1958
- },
1959
- o($V1, [2, 22]),
1960
- o($V1, [2, 24], { 14: [1, 35] }),
1961
- o($V1, [2, 25], { 14: [1, 36] }),
1962
- o($V1, [2, 26]),
1963
- {
1964
- 20: $V6,
1965
- 25: 37,
1966
- 26: 38,
1967
- 27: $V5
1968
- },
1969
- o($V1, [2, 10], { 15: [1, 40] }),
1970
- { 16: [1, 41] },
1971
- o($V1, [2, 14], { 15: [1, 42] }),
1972
- { 16: [1, 43] },
1973
- {
1974
- 13: 44,
1975
- 20: $V2,
1976
- 21: $V3
1977
- },
1978
- o($V1, [2, 17], { 14: [1, 45] }),
1979
- o($V1, [2, 18], { 14: [1, 46] }),
1980
- o($V1, [2, 19]),
1981
- o($V1, [2, 27]),
1982
- o($V1, [2, 28]),
1983
- o($V1, [2, 23], { 27: [1, 47] }),
1984
- o($V7, [2, 29]),
1985
- { 15: [1, 48] },
1986
- { 16: [1, 49] },
1987
- o($V1, [2, 11]),
1988
- { 16: [1, 50] },
1989
- o($V1, [2, 15]),
1990
- o($V4, [2, 42]),
1991
- o($V1, [2, 20]),
1992
- o($V1, [2, 21]),
1993
- {
1994
- 20: $V6,
1995
- 26: 51
1996
- },
1997
- {
1998
- 16: $V8,
1999
- 20: $V9,
2000
- 21: [1, 53],
2001
- 28: 52,
2002
- 29: 54,
2003
- 30: 55,
2004
- 31: $Va,
2005
- 32: $Vb,
2006
- 33: $Vc
2007
- },
2008
- o($V1, [2, 12]),
2009
- o($V1, [2, 16]),
2010
- o($V7, [2, 30]),
2011
- o($V7, [2, 31]),
2012
- o($V7, [2, 32]),
2013
- o($V7, [2, 33], {
2014
- 30: 61,
2015
- 16: $V8,
2016
- 20: $V9,
2017
- 31: $Va,
2018
- 32: $Vb,
2019
- 33: $Vc
2020
- }),
2021
- o($Vd, [2, 34]),
2022
- o($Vd, [2, 36]),
2023
- o($Vd, [2, 37]),
2024
- o($Vd, [2, 38]),
2025
- o($Vd, [2, 39]),
2026
- o($Vd, [2, 40]),
2027
- o($Vd, [2, 35])
2028
- ],
2029
- defaultActions: { 6: [2, 1] },
2030
- parseError: /* @__PURE__ */ __name$1(function parseError(str, hash) {
2031
- if (hash.recoverable) this.trace(str);
2032
- else {
2033
- var error = new Error(str);
2034
- error.hash = hash;
2035
- throw error;
2036
- }
2037
- }, "parseError"),
2038
- parse: /* @__PURE__ */ __name$1(function parse(input) {
2039
- var self = this;
2040
- var stack = [0];
2041
- var tstack = [];
2042
- var vstack = [null];
2043
- var lstack = [];
2044
- var table = this.table;
2045
- var yytext = "";
2046
- var yylineno = 0;
2047
- var yyleng = 0;
2048
- var recovering = 0;
2049
- var TERROR = 2;
2050
- var EOF = 1;
2051
- var args = lstack.slice.call(arguments, 1);
2052
- var lexer2 = Object.create(this.lexer);
2053
- var sharedState = { yy: {} };
2054
- for (var k in this.yy) if (Object.prototype.hasOwnProperty.call(this.yy, k)) sharedState.yy[k] = this.yy[k];
2055
- lexer2.setInput(input, sharedState.yy);
2056
- sharedState.yy.lexer = lexer2;
2057
- sharedState.yy.parser = this;
2058
- if (typeof lexer2.yylloc == "undefined") lexer2.yylloc = {};
2059
- var yyloc = lexer2.yylloc;
2060
- lstack.push(yyloc);
2061
- var ranges = lexer2.options && lexer2.options.ranges;
2062
- if (typeof sharedState.yy.parseError === "function") this.parseError = sharedState.yy.parseError;
2063
- else this.parseError = Object.getPrototypeOf(this).parseError;
2064
- function popStack(n) {
2065
- stack.length = stack.length - 2 * n;
2066
- vstack.length = vstack.length - n;
2067
- lstack.length = lstack.length - n;
2068
- }
2069
- __name$1(popStack, "popStack");
2070
- function lex() {
2071
- var token = tstack.pop() || lexer2.lex() || EOF;
2072
- if (typeof token !== "number") {
2073
- if (token instanceof Array) {
2074
- tstack = token;
2075
- token = tstack.pop();
2076
- }
2077
- token = self.symbols_[token] || token;
2078
- }
2079
- return token;
2080
- }
2081
- __name$1(lex, "lex");
2082
- var symbol;
2083
- var preErrorSymbol;
2084
- var state;
2085
- var action;
2086
- var r;
2087
- var yyval = {};
2088
- var p;
2089
- var len;
2090
- var newState;
2091
- var expected;
2092
- while (true) {
2093
- state = stack[stack.length - 1];
2094
- if (this.defaultActions[state]) action = this.defaultActions[state];
2095
- else {
2096
- if (symbol === null || typeof symbol == "undefined") symbol = lex();
2097
- action = table[state] && table[state][symbol];
2098
- }
2099
- if (typeof action === "undefined" || !action.length || !action[0]) {
2100
- var errStr = "";
2101
- expected = [];
2102
- for (p in table[state]) if (this.terminals_[p] && p > TERROR) expected.push("'" + this.terminals_[p] + "'");
2103
- if (lexer2.showPosition) errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
2104
- else errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
2105
- this.parseError(errStr, {
2106
- text: lexer2.match,
2107
- token: this.terminals_[symbol] || symbol,
2108
- line: lexer2.yylineno,
2109
- loc: yyloc,
2110
- expected
2111
- });
2112
- }
2113
- if (action[0] instanceof Array && action.length > 1) throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
2114
- switch (action[0]) {
2115
- case 1:
2116
- stack.push(symbol);
2117
- vstack.push(lexer2.yytext);
2118
- lstack.push(lexer2.yylloc);
2119
- stack.push(action[1]);
2120
- symbol = null;
2121
- if (!preErrorSymbol) {
2122
- yyleng = lexer2.yyleng;
2123
- yytext = lexer2.yytext;
2124
- yylineno = lexer2.yylineno;
2125
- yyloc = lexer2.yylloc;
2126
- if (recovering > 0) recovering--;
2127
- } else {
2128
- symbol = preErrorSymbol;
2129
- preErrorSymbol = null;
2130
- }
2131
- break;
2132
- case 2:
2133
- len = this.productions_[action[1]][1];
2134
- yyval.$ = vstack[vstack.length - len];
2135
- yyval._$ = {
2136
- first_line: lstack[lstack.length - (len || 1)].first_line,
2137
- last_line: lstack[lstack.length - 1].last_line,
2138
- first_column: lstack[lstack.length - (len || 1)].first_column,
2139
- last_column: lstack[lstack.length - 1].last_column
2140
- };
2141
- if (ranges) yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];
2142
- r = this.performAction.apply(yyval, [
2143
- yytext,
2144
- yyleng,
2145
- yylineno,
2146
- sharedState.yy,
2147
- action[1],
2148
- vstack,
2149
- lstack
2150
- ].concat(args));
2151
- if (typeof r !== "undefined") return r;
2152
- if (len) {
2153
- stack = stack.slice(0, -1 * len * 2);
2154
- vstack = vstack.slice(0, -1 * len);
2155
- lstack = lstack.slice(0, -1 * len);
2156
- }
2157
- stack.push(this.productions_[action[1]][0]);
2158
- vstack.push(yyval.$);
2159
- lstack.push(yyval._$);
2160
- newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
2161
- stack.push(newState);
2162
- break;
2163
- case 3: return true;
2164
- }
2165
- }
2166
- return true;
2167
- }, "parse")
2168
- };
2169
- parser2.lexer = /* @__PURE__ */ function() {
2170
- return {
2171
- EOF: 1,
2172
- parseError: /* @__PURE__ */ __name$1(function parseError(str, hash) {
2173
- if (this.yy.parser) this.yy.parser.parseError(str, hash);
2174
- else throw new Error(str);
2175
- }, "parseError"),
2176
- setInput: /* @__PURE__ */ __name$1(function(input, yy) {
2177
- this.yy = yy || this.yy || {};
2178
- this._input = input;
2179
- this._more = this._backtrack = this.done = false;
2180
- this.yylineno = this.yyleng = 0;
2181
- this.yytext = this.matched = this.match = "";
2182
- this.conditionStack = ["INITIAL"];
2183
- this.yylloc = {
2184
- first_line: 1,
2185
- first_column: 0,
2186
- last_line: 1,
2187
- last_column: 0
2188
- };
2189
- if (this.options.ranges) this.yylloc.range = [0, 0];
2190
- this.offset = 0;
2191
- return this;
2192
- }, "setInput"),
2193
- input: /* @__PURE__ */ __name$1(function() {
2194
- var ch = this._input[0];
2195
- this.yytext += ch;
2196
- this.yyleng++;
2197
- this.offset++;
2198
- this.match += ch;
2199
- this.matched += ch;
2200
- if (ch.match(/(?:\r\n?|\n).*/g)) {
2201
- this.yylineno++;
2202
- this.yylloc.last_line++;
2203
- } else this.yylloc.last_column++;
2204
- if (this.options.ranges) this.yylloc.range[1]++;
2205
- this._input = this._input.slice(1);
2206
- return ch;
2207
- }, "input"),
2208
- unput: /* @__PURE__ */ __name$1(function(ch) {
2209
- var len = ch.length;
2210
- var lines = ch.split(/(?:\r\n?|\n)/g);
2211
- this._input = ch + this._input;
2212
- this.yytext = this.yytext.substr(0, this.yytext.length - len);
2213
- this.offset -= len;
2214
- var oldLines = this.match.split(/(?:\r\n?|\n)/g);
2215
- this.match = this.match.substr(0, this.match.length - 1);
2216
- this.matched = this.matched.substr(0, this.matched.length - 1);
2217
- if (lines.length - 1) this.yylineno -= lines.length - 1;
2218
- var r = this.yylloc.range;
2219
- this.yylloc = {
2220
- first_line: this.yylloc.first_line,
2221
- last_line: this.yylineno + 1,
2222
- first_column: this.yylloc.first_column,
2223
- 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
2224
- };
2225
- if (this.options.ranges) this.yylloc.range = [r[0], r[0] + this.yyleng - len];
2226
- this.yyleng = this.yytext.length;
2227
- return this;
2228
- }, "unput"),
2229
- more: /* @__PURE__ */ __name$1(function() {
2230
- this._more = true;
2231
- return this;
2232
- }, "more"),
2233
- reject: /* @__PURE__ */ __name$1(function() {
2234
- if (this.options.backtrack_lexer) this._backtrack = true;
2235
- 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(), {
2236
- text: "",
2237
- token: null,
2238
- line: this.yylineno
2239
- });
2240
- return this;
2241
- }, "reject"),
2242
- less: /* @__PURE__ */ __name$1(function(n) {
2243
- this.unput(this.match.slice(n));
2244
- }, "less"),
2245
- pastInput: /* @__PURE__ */ __name$1(function() {
2246
- var past = this.matched.substr(0, this.matched.length - this.match.length);
2247
- return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
2248
- }, "pastInput"),
2249
- upcomingInput: /* @__PURE__ */ __name$1(function() {
2250
- var next = this.match;
2251
- if (next.length < 20) next += this._input.substr(0, 20 - next.length);
2252
- return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
2253
- }, "upcomingInput"),
2254
- showPosition: /* @__PURE__ */ __name$1(function() {
2255
- var pre = this.pastInput();
2256
- var c = new Array(pre.length + 1).join("-");
2257
- return pre + this.upcomingInput() + "\n" + c + "^";
2258
- }, "showPosition"),
2259
- test_match: /* @__PURE__ */ __name$1(function(match, indexed_rule) {
2260
- var token;
2261
- var lines;
2262
- var backup;
2263
- if (this.options.backtrack_lexer) {
2264
- backup = {
2265
- yylineno: this.yylineno,
2266
- yylloc: {
2267
- first_line: this.yylloc.first_line,
2268
- last_line: this.last_line,
2269
- first_column: this.yylloc.first_column,
2270
- last_column: this.yylloc.last_column
2271
- },
2272
- yytext: this.yytext,
2273
- match: this.match,
2274
- matches: this.matches,
2275
- matched: this.matched,
2276
- yyleng: this.yyleng,
2277
- offset: this.offset,
2278
- _more: this._more,
2279
- _input: this._input,
2280
- yy: this.yy,
2281
- conditionStack: this.conditionStack.slice(0),
2282
- done: this.done
2283
- };
2284
- if (this.options.ranges) backup.yylloc.range = this.yylloc.range.slice(0);
2285
- }
2286
- lines = match[0].match(/(?:\r\n?|\n).*/g);
2287
- if (lines) this.yylineno += lines.length;
2288
- this.yylloc = {
2289
- first_line: this.yylloc.last_line,
2290
- last_line: this.yylineno + 1,
2291
- first_column: this.yylloc.last_column,
2292
- last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
2293
- };
2294
- this.yytext += match[0];
2295
- this.match += match[0];
2296
- this.matches = match;
2297
- this.yyleng = this.yytext.length;
2298
- if (this.options.ranges) this.yylloc.range = [this.offset, this.offset += this.yyleng];
2299
- this._more = false;
2300
- this._backtrack = false;
2301
- this._input = this._input.slice(match[0].length);
2302
- this.matched += match[0];
2303
- token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
2304
- if (this.done && this._input) this.done = false;
2305
- if (token) return token;
2306
- else if (this._backtrack) {
2307
- for (var k in backup) this[k] = backup[k];
2308
- return false;
2309
- }
2310
- return false;
2311
- }, "test_match"),
2312
- next: /* @__PURE__ */ __name$1(function() {
2313
- if (this.done) return this.EOF;
2314
- if (!this._input) this.done = true;
2315
- var token;
2316
- var match;
2317
- var tempMatch;
2318
- var index;
2319
- if (!this._more) {
2320
- this.yytext = "";
2321
- this.match = "";
2322
- }
2323
- var rules = this._currentRules();
2324
- for (var i = 0; i < rules.length; i++) {
2325
- tempMatch = this._input.match(this.rules[rules[i]]);
2326
- if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
2327
- match = tempMatch;
2328
- index = i;
2329
- if (this.options.backtrack_lexer) {
2330
- token = this.test_match(tempMatch, rules[i]);
2331
- if (token !== false) return token;
2332
- else if (this._backtrack) {
2333
- match = false;
2334
- continue;
2335
- } else return false;
2336
- } else if (!this.options.flex) break;
2337
- }
2338
- }
2339
- if (match) {
2340
- token = this.test_match(match, rules[index]);
2341
- if (token !== false) return token;
2342
- return false;
2343
- }
2344
- if (this._input === "") return this.EOF;
2345
- else return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
2346
- text: "",
2347
- token: null,
2348
- line: this.yylineno
2349
- });
2350
- }, "next"),
2351
- lex: /* @__PURE__ */ __name$1(function lex() {
2352
- var r = this.next();
2353
- if (r) return r;
2354
- else return this.lex();
2355
- }, "lex"),
2356
- begin: /* @__PURE__ */ __name$1(function begin(condition) {
2357
- this.conditionStack.push(condition);
2358
- }, "begin"),
2359
- popState: /* @__PURE__ */ __name$1(function popState() {
2360
- if (this.conditionStack.length - 1 > 0) return this.conditionStack.pop();
2361
- else return this.conditionStack[0];
2362
- }, "popState"),
2363
- _currentRules: /* @__PURE__ */ __name$1(function _currentRules() {
2364
- if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
2365
- else return this.conditions["INITIAL"].rules;
2366
- }, "_currentRules"),
2367
- topState: /* @__PURE__ */ __name$1(function topState(n) {
2368
- n = this.conditionStack.length - 1 - Math.abs(n || 0);
2369
- if (n >= 0) return this.conditionStack[n];
2370
- else return "INITIAL";
2371
- }, "topState"),
2372
- pushState: /* @__PURE__ */ __name$1(function pushState(condition) {
2373
- this.begin(condition);
2374
- }, "pushState"),
2375
- stateStackSize: /* @__PURE__ */ __name$1(function stateStackSize() {
2376
- return this.conditionStack.length;
2377
- }, "stateStackSize"),
2378
- options: { "case-insensitive": true },
2379
- performAction: /* @__PURE__ */ __name$1(function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
2380
- switch ($avoiding_name_collisions) {
2381
- case 0: break;
2382
- case 1: break;
2383
- case 2: break;
2384
- case 3:
2385
- if (yy.getIndentMode && yy.getIndentMode()) {
2386
- yy.consumeIndentText = true;
2387
- this.begin("INITIAL");
2388
- return 22;
2389
- }
2390
- break;
2391
- case 4: break;
2392
- case 5:
2393
- if (yy.setIndentMode) yy.setIndentMode(false);
2394
- this.begin("INITIAL");
2395
- this.unput(yy_.yytext);
2396
- break;
2397
- case 6:
2398
- this.begin("bol");
2399
- return 8;
2400
- case 7: break;
2401
- case 8: break;
2402
- case 9: return 7;
2403
- case 10: return 11;
2404
- case 11: return 5;
2405
- case 12: return 12;
2406
- case 13: return 17;
2407
- case 14:
2408
- if (yy.consumeIndentText) yy.consumeIndentText = false;
2409
- else return 19;
2410
- break;
2411
- case 15: return 24;
2412
- case 16:
2413
- yy_.yytext = yy_.yytext.slice(2, -2);
2414
- return 14;
2415
- case 17:
2416
- yy_.yytext = yy_.yytext.slice(1, -1).trim();
2417
- return 14;
2418
- case 18: return 16;
2419
- case 19: return 31;
2420
- case 20: return 33;
2421
- case 21: return 32;
2422
- case 22: return 20;
2423
- case 23: return 21;
2424
- case 24: return 27;
2425
- case 25: return 15;
2426
- }
2427
- }, "anonymous"),
2428
- rules: [
2429
- /^(?:%%(?!\{)[^\n]*)/i,
2430
- /^(?:[^\}]%%[^\n]*)/i,
2431
- /^(?:[ \t]+(?=[\n\r]))/i,
2432
- /^(?:[ \t]+(?=text\b))/i,
2433
- /^(?:[ \t]+)/i,
2434
- /^(?:[^ \t\n\r])/i,
2435
- /^(?:[\n\r]+)/i,
2436
- /^(?:%%[^\n]*)/i,
2437
- /^(?:[ \t]+)/i,
2438
- /^(?:$)/i,
2439
- /^(?:title\s[^#\n;]+)/i,
2440
- /^(?:venn-beta\b)/i,
2441
- /^(?:set\b)/i,
2442
- /^(?:union\b)/i,
2443
- /^(?:text\b)/i,
2444
- /^(?:style\b)/i,
2445
- /^(?:\["[^\"]*"\])/i,
2446
- /^(?:\[[^\]\"]+\])/i,
2447
- /^(?:[+-]?(\d+(\.\d+)?|\.\d+))/i,
2448
- /^(?:#[0-9a-fA-F]{3,8})/i,
2449
- /^(?:rgba\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,
2450
- /^(?:rgb\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,
2451
- /^(?:[A-Za-z_][A-Za-z0-9\-_]*)/i,
2452
- /^(?:"[^\"]*")/i,
2453
- /^(?:,)/i,
2454
- /^(?::)/i
2455
- ],
2456
- conditions: {
2457
- "bol": {
2458
- "rules": [
2459
- 0,
2460
- 1,
2461
- 2,
2462
- 3,
2463
- 4,
2464
- 5,
2465
- 6,
2466
- 7,
2467
- 8,
2468
- 9,
2469
- 10,
2470
- 11,
2471
- 12,
2472
- 13,
2473
- 14,
2474
- 15,
2475
- 16,
2476
- 17,
2477
- 18,
2478
- 19,
2479
- 20,
2480
- 21,
2481
- 22,
2482
- 23,
2483
- 24,
2484
- 25
2485
- ],
2486
- "inclusive": true
2487
- },
2488
- "INITIAL": {
2489
- "rules": [
2490
- 0,
2491
- 1,
2492
- 6,
2493
- 7,
2494
- 8,
2495
- 9,
2496
- 10,
2497
- 11,
2498
- 12,
2499
- 13,
2500
- 14,
2501
- 15,
2502
- 16,
2503
- 17,
2504
- 18,
2505
- 19,
2506
- 20,
2507
- 21,
2508
- 22,
2509
- 23,
2510
- 24,
2511
- 25
2512
- ],
2513
- "inclusive": true
2514
- }
2515
- }
2516
- };
2517
- }();
2518
- function Parser() {
2519
- this.yy = {};
2520
- }
2521
- __name$1(Parser, "Parser");
2522
- Parser.prototype = parser2;
2523
- parser2.Parser = Parser;
2524
- return new Parser();
2525
- }();
2526
- parser.parser = parser;
2527
- var venn_default = parser;
2528
- var subsets = [];
2529
- var textNodes = [];
2530
- var styleEntries = [];
2531
- var knownSets = /* @__PURE__ */ new Set();
2532
- var currentSets;
2533
- var indentMode = false;
2534
- var addSubsetData = /* @__PURE__ */ __name$1((identifierList, label, size) => {
2535
- const sets = normalizeIdentifierList(identifierList).sort();
2536
- const resolvedSize = size ?? 10 / Math.pow(identifierList.length, 2);
2537
- currentSets = sets;
2538
- if (sets.length === 1) knownSets.add(sets[0]);
2539
- subsets.push({
2540
- sets,
2541
- size: resolvedSize,
2542
- label: label ? normalizeText(label) : void 0
2543
- });
2544
- }, "addSubsetData");
2545
- var getSubsetData = /* @__PURE__ */ __name$1(() => {
2546
- return subsets;
2547
- }, "getSubsetData");
2548
- var normalizeText = /* @__PURE__ */ __name$1((text) => {
2549
- const trimmed = text.trim();
2550
- if (trimmed.length >= 2 && trimmed.startsWith("\"") && trimmed.endsWith("\"")) return trimmed.slice(1, -1);
2551
- return trimmed;
2552
- }, "normalizeText");
2553
- var normalizeStyleValue = /* @__PURE__ */ __name$1((value) => {
2554
- return value ? normalizeText(value) : value;
2555
- }, "normalizeStyleValue");
2556
- var addTextData = /* @__PURE__ */ __name$1((identifierList, id, label) => {
2557
- const normalizedId = normalizeText(id);
2558
- textNodes.push({
2559
- sets: normalizeIdentifierList(identifierList).sort(),
2560
- id: normalizedId,
2561
- label: label ? normalizeText(label) : void 0
2562
- });
2563
- }, "addTextData");
2564
- var addStyleData = /* @__PURE__ */ __name$1((identifierList, data) => {
2565
- const targets = normalizeIdentifierList(identifierList).sort();
2566
- const styles = {};
2567
- for (const [key, value] of data) styles[key] = normalizeStyleValue(value) ?? value;
2568
- styleEntries.push({
2569
- targets,
2570
- styles
2571
- });
2572
- }, "addStyleData");
2573
- var getStyleData = /* @__PURE__ */ __name$1(() => {
2574
- return styleEntries;
2575
- }, "getStyleData");
2576
- var normalizeIdentifierList = /* @__PURE__ */ __name$1((identifierList) => {
2577
- return identifierList.map((identifier) => normalizeText(identifier));
2578
- }, "normalizeIdentifierList");
2579
- var validateUnionIdentifiers = /* @__PURE__ */ __name$1((identifierList) => {
2580
- const unknown = normalizeIdentifierList(identifierList).filter((identifier) => !knownSets.has(identifier));
2581
- if (unknown.length > 0) throw new Error(`unknown set identifier: ${unknown.join(", ")}`);
2582
- }, "validateUnionIdentifiers");
2583
- var getTextData = /* @__PURE__ */ __name$1(() => {
2584
- return textNodes;
2585
- }, "getTextData");
2586
- var getCurrentSets = /* @__PURE__ */ __name$1(() => currentSets, "getCurrentSets");
2587
- var getIndentMode = /* @__PURE__ */ __name$1(() => indentMode, "getIndentMode");
2588
- var setIndentMode = /* @__PURE__ */ __name$1((enabled) => {
2589
- indentMode = enabled;
2590
- }, "setIndentMode");
2591
- var DEFAULT_VENN_CONFIG = defaultConfig_default.venn;
2592
- function getConfig2() {
2593
- return cleanAndMerge(DEFAULT_VENN_CONFIG, getConfig().venn);
2594
- }
2595
- __name$1(getConfig2, "getConfig");
2596
- var db = {
2597
- getConfig: getConfig2,
2598
- clear: /* @__PURE__ */ __name$1(() => {
2599
- clear();
2600
- subsets.length = 0;
2601
- textNodes.length = 0;
2602
- styleEntries.length = 0;
2603
- knownSets.clear();
2604
- currentSets = void 0;
2605
- indentMode = false;
2606
- }, "customClear"),
2607
- setAccTitle,
2608
- getAccTitle,
2609
- setDiagramTitle,
2610
- getDiagramTitle,
2611
- getAccDescription,
2612
- setAccDescription,
2613
- addSubsetData,
2614
- getSubsetData,
2615
- addTextData,
2616
- addStyleData,
2617
- validateUnionIdentifiers,
2618
- getTextData,
2619
- getStyleData,
2620
- getCurrentSets,
2621
- getIndentMode,
2622
- setIndentMode
2623
- };
2624
- var styles_default = /* @__PURE__ */ __name$1((options) => `
2625
- .venn-title {
2626
- font-size: 32px;
2627
- fill: ${options.vennTitleTextColor};
2628
- font-family: ${options.fontFamily};
2629
- }
2630
-
2631
- .venn-circle text {
2632
- font-size: 48px;
2633
- font-family: ${options.fontFamily};
2634
- }
2635
-
2636
- .venn-intersection text {
2637
- font-size: 48px;
2638
- fill: ${options.vennSetTextColor};
2639
- font-family: ${options.fontFamily};
2640
- }
2641
-
2642
- .venn-text-node {
2643
- font-family: ${options.fontFamily};
2644
- color: ${options.vennSetTextColor};
2645
- }
2646
- `, "getStyles");
2647
- function buildStyleByKey(styleData) {
2648
- const map = /* @__PURE__ */ new Map();
2649
- for (const entry of styleData) {
2650
- const key = entry.targets.join("|");
2651
- const existing = map.get(key);
2652
- if (existing) Object.assign(existing, entry.styles);
2653
- else map.set(key, { ...entry.styles });
2654
- }
2655
- return map;
2656
- }
2657
- __name$1(buildStyleByKey, "buildStyleByKey");
2658
- var draw = /* @__PURE__ */ __name$1((_text, id, _version, diagObj) => {
2659
- const db2 = diagObj.db;
2660
- const config = db2.getConfig?.();
2661
- const { themeVariables, look, handDrawnSeed } = getConfig();
2662
- const isHandDrawn = look === "handDrawn";
2663
- const themeColors = [
2664
- themeVariables.venn1,
2665
- themeVariables.venn2,
2666
- themeVariables.venn3,
2667
- themeVariables.venn4,
2668
- themeVariables.venn5,
2669
- themeVariables.venn6,
2670
- themeVariables.venn7,
2671
- themeVariables.venn8
2672
- ].filter(Boolean);
2673
- const title = db2.getDiagramTitle?.();
2674
- const sets = db2.getSubsetData();
2675
- const textNodes2 = db2.getTextData();
2676
- const styleByKey = buildStyleByKey(db2.getStyleData());
2677
- const svgWidth = config?.width ?? 800;
2678
- const svgHeight = config?.height ?? 450;
2679
- const scale = svgWidth / 1600;
2680
- const titleHeight = title ? 48 * scale : 0;
2681
- const defaultTextColor = themeVariables.primaryTextColor ?? themeVariables.textColor;
2682
- const svg = selectSvgElement(id);
2683
- svg.attr("viewBox", `0 0 ${svgWidth} ${svgHeight}`);
2684
- if (title) svg.append("text").text(title).attr("class", "venn-title").attr("font-size", `${32 * scale}px`).attr("text-anchor", "middle").attr("dominant-baseline", "middle").attr("x", "50%").attr("y", 32 * scale).style("fill", themeVariables.vennTitleTextColor || themeVariables.titleColor);
2685
- const dummyD3root = select_default(document.createElement("div"));
2686
- const vennDiagram = VennDiagram().width(svgWidth).height(svgHeight - titleHeight);
2687
- dummyD3root.datum(sets).call(vennDiagram);
2688
- const roughSvg = isHandDrawn ? at.svg(dummyD3root.select("svg").node()) : void 0;
2689
- const layoutAreas = layout(sets, {
2690
- width: svgWidth,
2691
- height: svgHeight - titleHeight,
2692
- padding: config?.padding ?? 15
2693
- });
2694
- const layoutByKey = /* @__PURE__ */ new Map();
2695
- for (const area of layoutAreas) {
2696
- const key = stableSetsKey([...area.data.sets].sort());
2697
- layoutByKey.set(key, area);
2698
- }
2699
- if (textNodes2.length > 0) renderTextNodes(config, layoutByKey, dummyD3root, textNodes2, scale, styleByKey);
2700
- const themeDark = isDark(themeVariables.background || "#f4f4f4");
2701
- dummyD3root.selectAll(".venn-circle").each(function(d, i) {
2702
- const group = select_default(this);
2703
- const setsKey = stableSetsKey([...d.sets].sort());
2704
- const customStyle = styleByKey.get(setsKey);
2705
- const baseColor = customStyle?.fill || themeColors[i % themeColors.length] || themeVariables.primaryColor;
2706
- group.classed(`venn-set-${i % 8}`, true);
2707
- const fillOpacity = customStyle?.["fill-opacity"] ?? .1;
2708
- const strokeColor = customStyle?.stroke || baseColor;
2709
- const strokeWidthVal = customStyle?.["stroke-width"] || `${5 * scale}`;
2710
- if (isHandDrawn && roughSvg) {
2711
- const layoutArea = layoutByKey.get(setsKey);
2712
- if (layoutArea && layoutArea.circles.length > 0) {
2713
- const c = layoutArea.circles[0];
2714
- const roughNode = roughSvg.circle(c.x, c.y, c.radius * 2, {
2715
- roughness: .7,
2716
- seed: handDrawnSeed,
2717
- fill: transparentize(baseColor, .7),
2718
- fillStyle: "hachure",
2719
- fillWeight: 2,
2720
- hachureGap: 8,
2721
- hachureAngle: -41 + i * 60,
2722
- stroke: strokeColor,
2723
- strokeWidth: parseFloat(String(strokeWidthVal))
2724
- });
2725
- group.select("path").remove();
2726
- group.node()?.insertBefore(roughNode, group.select("text").node());
2727
- }
2728
- } else group.select("path").style("fill", baseColor).style("fill-opacity", fillOpacity).style("stroke", strokeColor).style("stroke-width", strokeWidthVal).style("stroke-opacity", .95);
2729
- const textColor = customStyle?.color || (themeDark ? lighten(baseColor, 30) : darken(baseColor, 30));
2730
- group.select("text").style("font-size", `${48 * scale}px`).style("fill", textColor);
2731
- });
2732
- if (isHandDrawn && roughSvg) dummyD3root.selectAll(".venn-intersection").each(function(d) {
2733
- const group = select_default(this);
2734
- const setsKey = stableSetsKey([...d.sets].sort());
2735
- const customStyle = styleByKey.get(setsKey);
2736
- const customFill = customStyle?.fill;
2737
- if (customFill) {
2738
- const pathEl = group.select("path");
2739
- const pathD = pathEl.attr("d");
2740
- if (pathD) {
2741
- const roughNode = roughSvg.path(pathD, {
2742
- roughness: .7,
2743
- seed: handDrawnSeed,
2744
- fill: transparentize(customFill, .3),
2745
- fillStyle: "cross-hatch",
2746
- fillWeight: 2,
2747
- hachureGap: 6,
2748
- hachureAngle: 60,
2749
- stroke: "none"
2750
- });
2751
- const existingPath = pathEl.node();
2752
- existingPath?.parentNode?.insertBefore(roughNode, existingPath);
2753
- pathEl.remove();
2754
- }
2755
- } else group.select("path").style("fill-opacity", 0);
2756
- group.select("text").style("font-size", `${48 * scale}px`).style("fill", customStyle?.color ?? themeVariables.vennSetTextColor ?? defaultTextColor);
2757
- });
2758
- else {
2759
- dummyD3root.selectAll(".venn-intersection text").style("font-size", `${48 * scale}px`).style("fill", (e) => {
2760
- const setsKey = stableSetsKey([...e.sets].sort());
2761
- return styleByKey.get(setsKey)?.color ?? themeVariables.vennSetTextColor ?? defaultTextColor;
2762
- });
2763
- dummyD3root.selectAll(".venn-intersection path").style("fill-opacity", (e) => {
2764
- const setsKey = stableSetsKey([...e.sets].sort());
2765
- return styleByKey.get(setsKey)?.fill ? 1 : 0;
2766
- }).style("fill", (e) => {
2767
- const setsKey = stableSetsKey([...e.sets].sort());
2768
- return styleByKey.get(setsKey)?.fill ?? "transparent";
2769
- });
2770
- }
2771
- const vennGroup = svg.append("g").attr("transform", `translate(0, ${titleHeight})`);
2772
- const dummySvg = dummyD3root.select("svg").node();
2773
- if (dummySvg && "childNodes" in dummySvg) for (const child of [...dummySvg.childNodes]) vennGroup.node()?.appendChild(child);
2774
- configureSvgSize(svg, svgHeight, svgWidth, config?.useMaxWidth ?? true);
2775
- }, "draw");
2776
- function stableSetsKey(setIds) {
2777
- return setIds.join("|");
2778
- }
2779
- __name$1(stableSetsKey, "stableSetsKey");
2780
- function renderTextNodes(config, layoutByKey, dummyD3root, textNodes2, scale, styleByKey) {
2781
- const useDebugLayout = config?.useDebugLayout ?? false;
2782
- const textGroup = dummyD3root.select("svg").append("g").attr("class", "venn-text-nodes");
2783
- const nodesByArea = /* @__PURE__ */ new Map();
2784
- for (const node of textNodes2) {
2785
- const key = stableSetsKey(node.sets);
2786
- const existing = nodesByArea.get(key);
2787
- if (existing) existing.push(node);
2788
- else nodesByArea.set(key, [node]);
2789
- }
2790
- for (const [key, nodes] of nodesByArea.entries()) {
2791
- const area = layoutByKey.get(key);
2792
- if (!area?.text) continue;
2793
- const centerX = area.text.x;
2794
- const centerY = area.text.y;
2795
- const minCircleRadius = Math.min(...area.circles.map((c) => c.radius));
2796
- const innerRadiusRaw = Math.min(...area.circles.map((c) => c.radius - Math.hypot(centerX - c.x, centerY - c.y)));
2797
- let innerRadius = Number.isFinite(innerRadiusRaw) ? Math.max(0, innerRadiusRaw) : 0;
2798
- if (innerRadius === 0 && Number.isFinite(minCircleRadius)) innerRadius = minCircleRadius * .6;
2799
- const areaGroup = textGroup.append("g").attr("class", "venn-text-area").attr("font-size", `${40 * scale}px`);
2800
- if (useDebugLayout) areaGroup.append("circle").attr("class", "venn-text-debug-circle").attr("cx", centerX).attr("cy", centerY).attr("r", innerRadius).attr("fill", "none").attr("stroke", "purple").attr("stroke-width", 1.5 * scale).attr("stroke-dasharray", `${6 * scale} ${4 * scale}`);
2801
- const innerWidth = Math.max(80 * scale, innerRadius * 2 * .95);
2802
- const innerHeight = Math.max(60 * scale, innerRadius * 2 * .95);
2803
- const labelOffset = (area.data.label && area.data.label.length > 0 ? Math.min(32 * scale, innerRadius * .25) : 0) + (nodes.length <= 2 ? 30 * scale : 0);
2804
- const startX = centerX - innerWidth / 2;
2805
- const startY = centerY - innerHeight / 2 + labelOffset;
2806
- const cols = Math.max(1, Math.ceil(Math.sqrt(nodes.length)));
2807
- const rows = Math.max(1, Math.ceil(nodes.length / cols));
2808
- const cellWidth = innerWidth / cols;
2809
- const cellHeight = innerHeight / rows;
2810
- for (const [i, node] of nodes.entries()) {
2811
- const col = i % cols;
2812
- const row = Math.floor(i / cols);
2813
- const x = startX + cellWidth * (col + .5);
2814
- const y = startY + cellHeight * (row + .5);
2815
- if (useDebugLayout) areaGroup.append("rect").attr("class", "venn-text-debug-cell").attr("x", startX + cellWidth * col).attr("y", startY + cellHeight * row).attr("width", cellWidth).attr("height", cellHeight).attr("fill", "none").attr("stroke", "teal").attr("stroke-width", 1 * scale).attr("stroke-dasharray", `${4 * scale} ${3 * scale}`);
2816
- const boxWidth = cellWidth * .9;
2817
- const boxHeight = cellHeight * .9;
2818
- const container = areaGroup.append("foreignObject").attr("class", "venn-text-node-fo").attr("width", boxWidth).attr("height", boxHeight).attr("x", x - boxWidth / 2).attr("y", y - boxHeight / 2).attr("overflow", "visible");
2819
- const textColor = styleByKey.get(node.id)?.color;
2820
- const text = container.append("xhtml:span").attr("class", "venn-text-node").style("display", "flex").style("width", "100%").style("height", "100%").style("white-space", "normal").style("align-items", "center").style("justify-content", "center").style("text-align", "center").style("overflow-wrap", "normal").style("word-break", "normal").text(node.label ?? node.id);
2821
- if (textColor) text.style("color", textColor);
2822
- }
2823
- }
2824
- }
2825
- __name$1(renderTextNodes, "renderTextNodes");
2826
- var diagram = {
2827
- parser: venn_default,
2828
- db,
2829
- renderer: { draw },
2830
- styles: styles_default
2831
- };
2832
- //#endregion
2833
- export { diagram };