@kimicode/cli 1.0.40 → 1.0.41

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 (597) hide show
  1. package/README.md +621 -38
  2. package/bin/stt/requirements.txt +7 -19
  3. package/bin/stt/stt_server.py +18 -93
  4. package/install.cjs +156 -2
  5. package/llms.txt +34 -7
  6. package/package.json +9 -9
  7. package/web/dist/assets/AssistantsView-dhdYVIy0.js +1 -0
  8. package/web/dist/assets/AutomationView-D1dU5ZV7.js +1 -0
  9. package/web/dist/assets/ChannelConfigView-CEPVZntU.js +8 -0
  10. package/web/dist/assets/ChartsView-DdN-beHW.js +1 -0
  11. package/web/dist/assets/ConnectorsView-CseCss9C.js +1 -0
  12. package/web/dist/assets/FileTreeView-Dnc3-gRF.js +1 -0
  13. package/web/dist/assets/HookConfigView-DA2h4HdJ.js +1 -0
  14. package/web/dist/assets/InputArea-DAgOOjOc.js +14 -0
  15. package/web/dist/assets/MemoryView-D6OUBi4-.js +1 -0
  16. package/web/dist/assets/MessageBubble-CCTRbIMZ.css +1 -0
  17. package/web/dist/assets/MessageBubble-CV16DZMG.js +453 -0
  18. package/web/dist/assets/ModelsView-BuqD9vWl.js +1 -0
  19. package/web/dist/assets/PluginsView-CIziDHFJ.js +2 -0
  20. package/web/dist/assets/ProjectsView-c6faWy32.js +1 -0
  21. package/web/dist/assets/SessionGrid-BZJHcklh.js +4 -0
  22. package/web/dist/assets/SessionGrid-Bk5CAXEn.css +1 -0
  23. package/web/dist/assets/SettingsModal-BqdGEGW-.js +4 -0
  24. package/web/dist/assets/SkillsView-CB6CKkmb.js +1 -0
  25. package/web/dist/assets/TemplatesTab-B8efVwVZ.js +1 -0
  26. package/web/dist/assets/ThreadsView-CDoM0aNb.js +2 -0
  27. package/web/dist/assets/ToolsView-BG-xsWsO.js +1 -0
  28. package/web/dist/assets/abnfDiagram-WEYOIA3C-DGUPHfRO.js +1 -0
  29. package/web/dist/assets/agentIconSet-Btsb_SC4.js +1 -0
  30. package/web/dist/assets/api-CCt9DRQm.js +1 -0
  31. package/web/dist/assets/arc-Y1ARJVZ4.js +1 -0
  32. package/web/dist/assets/architecture-WOLXFQ4H-BUERx_-B.js +1 -0
  33. package/web/dist/assets/architectureDiagram-ZHVYKT53-BPsQL7O5.js +36 -0
  34. package/web/dist/assets/array-BifhSqXX.js +1 -0
  35. package/web/dist/assets/blockDiagram-RJAE7QA3-pB7EXp6p.js +140 -0
  36. package/web/dist/assets/c4Diagram-XDPPPE54-BnPeCq_L.js +38 -0
  37. package/web/dist/assets/channel-CSrLW66f.js +1 -0
  38. package/web/dist/assets/channelMeta-BGQXQxgj.js +1 -0
  39. package/web/dist/assets/chunk-2E7WHVMD-xX282MrC.js +88 -0
  40. package/web/dist/assets/chunk-2Q5K7J3B-C1jixKkw.js +1 -0
  41. package/web/dist/assets/chunk-4EMNKR2T-BAQDLVqt.js +1 -0
  42. package/web/dist/assets/chunk-55XCU76K-BwAE3Eqq.js +1 -0
  43. package/web/dist/assets/{chunk-5VM5RSS4-CYl9mwa-.js → chunk-5VM5RSS4-ZNzvKenW.js} +2 -2
  44. package/web/dist/assets/chunk-7S6XSTFO-DwwaClMo.js +2 -0
  45. package/web/dist/assets/chunk-AQDTSKZB-DHG5Km_p.js +72 -0
  46. package/web/dist/assets/chunk-DSNLSHJZ-a6-B52h-.js +129 -0
  47. package/web/dist/assets/chunk-DUW6YSOI-Dgx8z5s3.js +1 -0
  48. package/web/dist/assets/chunk-HAGFOTED-DZMcAj3o.js +62 -0
  49. package/web/dist/assets/chunk-HNE4Q36P-gl_4xI6B.js +1 -0
  50. package/web/dist/assets/chunk-J5ZVWO5B-oDCd-gWO.js +1 -0
  51. package/web/dist/assets/chunk-JWPE2WC7-DVXcaiue.js +1 -0
  52. package/web/dist/assets/chunk-NGNAAXSQ-Bw6tHVuc.js +136 -0
  53. package/web/dist/assets/chunk-NQOKRVIF-B8Q-YmhL.js +213 -0
  54. package/web/dist/assets/chunk-UHW7PFBP-isP5lYMB.js +1 -0
  55. package/web/dist/assets/chunk-VQ5W62QI-Bn68syIc.js +1 -0
  56. package/web/dist/assets/chunk-WQQL4CDK-CdZpmEYA.js +10 -0
  57. package/web/dist/assets/chunk-XXDRQBXY-CnbRkih_.js +1 -0
  58. package/web/dist/assets/chunk-Y2CYZVJY-DsF7k-Jl.js +1 -0
  59. package/web/dist/assets/chunk-YZO67HFG-DX9GhJkR.js +1 -0
  60. package/web/dist/assets/chunk-ZAUX2LTX-Ki22UlYp.js +1 -0
  61. package/web/dist/assets/chunk-ZCHMQSOR-BVj0Zx6L.js +2 -0
  62. package/web/dist/assets/classDiagram-v2-4MYWR3UA-C7PV1veb.js +217 -0
  63. package/web/dist/assets/cn-rx4uumOJ.js +1 -0
  64. package/web/dist/assets/common-BHXgEvgk.js +192 -0
  65. package/web/dist/assets/cose-bilkent-JH36ORCC-DHFtpmij.js +1 -0
  66. package/web/dist/assets/cynefin-EF2NZ3EQ-1rI2T0cc.js +1 -0
  67. package/web/dist/assets/cynefinDiagram-WF24UDRP-C8O_v8xU.js +62 -0
  68. package/web/dist/assets/cytoscape.esm-BY277UBX.js +321 -0
  69. package/web/dist/assets/dagre-NK4GIZVX-BWGoHIUd.js +4 -0
  70. package/web/dist/assets/defaultLocale-BFoDCU3G.js +1 -0
  71. package/web/dist/assets/diagram-CBK3MWTC-kf9v35RN.js +24 -0
  72. package/web/dist/assets/diagram-I5XIIV2D-Ro-ig56_.js +24 -0
  73. package/web/dist/assets/diagram-ODIL2UCW-CtGga01G.js +30 -0
  74. package/web/dist/assets/diagram-PFBEJUXE-C14lcR-6.js +3 -0
  75. package/web/dist/assets/diagram-RJA3I4VV-BBbqaSKU.js +41 -0
  76. package/web/dist/assets/diagram-TYUNFSNR-BynvjQsr.js +200 -0
  77. package/web/dist/assets/dist-CumnGVmJ.js +1 -0
  78. package/web/dist/assets/ebnfDiagram-V4P3TTPT-BdqUCZnk.js +1 -0
  79. package/web/dist/assets/elk-QONTBCTQ-CYCP_9Jy.js +27 -0
  80. package/web/dist/assets/erDiagram-KYQIGQAA-C3L55l_F.js +99 -0
  81. package/web/dist/assets/eventmodeling-K75KTNOO-CTQdA_1v.js +1 -0
  82. package/web/dist/assets/flowDiagram-IUGLLWBU-COLKOzBg.js +1 -0
  83. package/web/dist/assets/ganttDiagram-R7GPNTJY-Be4Qk8Hx.js +292 -0
  84. package/web/dist/assets/gitGraph-VSP46ZUC-B59HXvj1.js +1 -0
  85. package/web/dist/assets/gitGraphDiagram-PDYL7XHY-C2A0VA6q.js +106 -0
  86. package/web/dist/assets/graphlib-DS17s2tU.js +1 -0
  87. package/web/dist/assets/icons-BvYhTENi.js +1 -0
  88. package/web/dist/assets/index-BNI6CNsY.css +1 -0
  89. package/web/dist/assets/index-BX-d2OBW.js +130 -0
  90. package/web/dist/assets/info-OHQRW6UA-DWlkKvmi.js +1 -0
  91. package/web/dist/assets/infoDiagram-MVDRKAX5-B8e6dTjN.js +2 -0
  92. package/web/dist/assets/init-C-OQMol4.js +1 -0
  93. package/web/dist/assets/ishikawaDiagram-HPEHV2GE-udXPYi9H.js +70 -0
  94. package/web/dist/assets/journeyDiagram-BOSHW7O7-DTyDkf5d.js +139 -0
  95. package/web/dist/assets/kanban-definition-FNSA4HC5-BXgV20qe.js +89 -0
  96. package/web/dist/assets/katex-B940_AAO.js +257 -0
  97. package/web/dist/assets/line-DVabuQAu.js +1 -0
  98. package/web/dist/assets/linear-gLkGxN9m.js +1 -0
  99. package/web/dist/assets/markdown-DAQZeY5V.js +14 -0
  100. package/web/dist/assets/mermaid-parser.core-BrXnuEs7.js +7 -0
  101. package/web/dist/assets/mermaid.core-BGbz3k1k.js +44 -0
  102. package/web/dist/assets/mindmap-definition-6OY57UG3-DbtP-bmk.js +98 -0
  103. package/web/dist/assets/ordinal-BDEzSJ7C.js +1 -0
  104. package/web/dist/assets/packet-JDAUHWVQ-iW8w3JF5.js +1 -0
  105. package/web/dist/assets/panels-DYiQiVWh.js +1 -0
  106. package/web/dist/assets/path-fybaL0A-.js +1 -0
  107. package/web/dist/assets/pegDiagram-ECIUJNBX-rBWJbaq4.js +1 -0
  108. package/web/dist/assets/pie-XZMESJXO-KHXEq-Yx.js +1 -0
  109. package/web/dist/assets/pieDiagram-GNMPY74T-DsW7yHm0.js +39 -0
  110. package/web/dist/assets/preload-helper-BLdHbfdN.js +1 -0
  111. package/web/dist/assets/profileChange-xrd7jkii.js +1 -0
  112. package/web/dist/assets/quadrantDiagram-D57K4MC3-DF_pwNhM.js +7 -0
  113. package/web/dist/assets/radar-ABXABTNO-BkAUJ_Zd.js +1 -0
  114. package/web/dist/assets/railroad-I3PHUGI6-BdnWRdGt.js +1 -0
  115. package/web/dist/assets/railroad-abnf-LNEFI6M7-C8K36-8b.js +1 -0
  116. package/web/dist/assets/railroad-ebnf-DWYD2UWJ-BlS25T3f.js +1 -0
  117. package/web/dist/assets/railroad-peg-JR7BVNR7-CBKGDi75.js +1 -0
  118. package/web/dist/assets/railroadDiagram-Y72NRBL7-DmrlMIvv.js +1 -0
  119. package/web/dist/assets/react-vendor-BlngCquv.js +19 -0
  120. package/web/dist/assets/requirementDiagram-EQYSW5RA-cvUq9H3I.js +84 -0
  121. package/web/dist/assets/rolldown-runtime-COiEfhsA.js +1 -0
  122. package/web/dist/assets/rough.esm-Dy-Kn_BL.js +1 -0
  123. package/web/dist/assets/sankeyDiagram-SY24JHO5-BdxXAbER.js +40 -0
  124. package/web/dist/assets/sequenceDiagram-BLEHNHQU-Druumi0k.js +169 -0
  125. package/web/dist/assets/settingsStore-RLUAWgIk.js +1 -0
  126. package/web/dist/assets/sizeCapture-INFHLROL-3uHXrFqA.js +1 -0
  127. package/web/dist/assets/src-49LUQhkG.js +1 -0
  128. package/web/dist/assets/src-BWF7jMDv.js +1 -0
  129. package/web/dist/assets/state-_ZfNVAsd.js +1 -0
  130. package/web/dist/assets/stateDiagram-v2-A6IESKWZ-Jgh6qlrr.js +291 -0
  131. package/web/dist/assets/sttLanguages-aqoVC79g.js +2 -0
  132. package/web/dist/assets/swimlanes-B3ENRKFQ-4xKumvXQ.js +1 -0
  133. package/web/dist/assets/swimlanesDiagram-AYQRV4AK-bHcLKL3d.js +8 -0
  134. package/web/dist/assets/timeline-definition-JXYKGLGB-BYKhga9x.js +120 -0
  135. package/web/dist/assets/treeView-D4JQ5SDB-6-eTVUuH.js +1 -0
  136. package/web/dist/assets/treemap-SAJKECNS-Dxl8yCLE.js +1 -0
  137. package/web/dist/assets/ttsSettings-DHo3OsOq.js +15 -0
  138. package/web/dist/assets/types-JssxRFJn.js +1 -0
  139. package/web/dist/assets/useTranslation-BGmCDuQI.js +1 -0
  140. package/web/dist/assets/usecaseDiagram-WPOLBNNX-BaQ8nAv9.js +328 -0
  141. package/web/dist/assets/vennDiagram-Q3Y3IDCW-DkPvfmfT.js +34 -0
  142. package/web/dist/assets/wardley-7MLQ67FV-CZtI22aa.js +1 -0
  143. package/web/dist/assets/wardleyDiagram-IVAIDKWA-Dgi2OWQ4.js +78 -0
  144. package/web/dist/assets/websocket-C9e3h7VU.js +1 -0
  145. package/web/dist/assets/whatsNewStore-Bf_7lW8o.js +1 -0
  146. package/web/dist/assets/workspaceSemantics-RaIRer76.js +3 -0
  147. package/web/dist/assets/xychartDiagram-4URNHDU4-Ch96dep-.js +7 -0
  148. package/web/dist/favicon.svg +18 -39
  149. package/web/dist/icons/icon-1024.png +0 -0
  150. package/web/dist/icons/icon-180.png +0 -0
  151. package/web/dist/icons/icon-192.png +0 -0
  152. package/web/dist/icons/icon-512.png +0 -0
  153. package/web/dist/icons/icon-maskable-512.png +0 -0
  154. package/web/dist/index.html +46 -12
  155. package/web/dist/logo.svg +25 -39
  156. package/web/dist/manifest.webmanifest +2 -2
  157. package/web/dist/assets/AssistantsView-BiUiWjhF.js +0 -1
  158. package/web/dist/assets/AutomationView-Dcf_yNaI.js +0 -1
  159. package/web/dist/assets/ChannelConfigView-BLnxsMGm.js +0 -8
  160. package/web/dist/assets/ConnectorsView-CX3E6X6c.js +0 -1
  161. package/web/dist/assets/DesignSystemView--x-P-lpD.js +0 -1
  162. package/web/dist/assets/Drawer-CjAgqH3B.js +0 -1
  163. package/web/dist/assets/FileTreeView-Chb_fzTK.js +0 -11
  164. package/web/dist/assets/HookConfigView-EafYlWdN.js +0 -1
  165. package/web/dist/assets/InputArea-BbHslX7b.js +0 -50
  166. package/web/dist/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
  167. package/web/dist/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
  168. package/web/dist/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
  169. package/web/dist/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
  170. package/web/dist/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
  171. package/web/dist/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
  172. package/web/dist/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
  173. package/web/dist/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
  174. package/web/dist/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
  175. package/web/dist/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
  176. package/web/dist/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
  177. package/web/dist/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
  178. package/web/dist/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
  179. package/web/dist/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
  180. package/web/dist/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
  181. package/web/dist/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
  182. package/web/dist/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
  183. package/web/dist/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
  184. package/web/dist/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
  185. package/web/dist/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
  186. package/web/dist/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
  187. package/web/dist/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
  188. package/web/dist/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
  189. package/web/dist/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
  190. package/web/dist/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
  191. package/web/dist/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
  192. package/web/dist/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
  193. package/web/dist/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
  194. package/web/dist/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
  195. package/web/dist/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
  196. package/web/dist/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
  197. package/web/dist/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
  198. package/web/dist/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
  199. package/web/dist/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
  200. package/web/dist/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
  201. package/web/dist/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
  202. package/web/dist/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
  203. package/web/dist/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
  204. package/web/dist/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
  205. package/web/dist/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
  206. package/web/dist/assets/ModelsView-CGN5Nljr.js +0 -1
  207. package/web/dist/assets/PluginsView-CDiJgvI8.js +0 -2
  208. package/web/dist/assets/ProjectsView-C5Usmwqy.js +0 -1
  209. package/web/dist/assets/SessionGrid-BGpz0-op.css +0 -1
  210. package/web/dist/assets/SessionGrid-Drxg0r_u.js +0 -4
  211. package/web/dist/assets/SettingsModal-Cmts6aBG.js +0 -10
  212. package/web/dist/assets/Skeleton-Dsk6B0U3.js +0 -1
  213. package/web/dist/assets/SkillsView-TEDR_3XX.js +0 -1
  214. package/web/dist/assets/TemplatesTab-DtN5Kdgh.js +0 -1
  215. package/web/dist/assets/ToolsView-VukZnIt1.js +0 -1
  216. package/web/dist/assets/VizCardsSkeleton-C_GaEfXd.js +0 -1
  217. package/web/dist/assets/abap-BdImnpbu.js +0 -1
  218. package/web/dist/assets/abnfDiagram-YUKMZFIV-BIFw6B_N.js +0 -1
  219. package/web/dist/assets/actionscript-3-B3316cI-.js +0 -1
  220. package/web/dist/assets/ada-bCR0ucgS.js +0 -1
  221. package/web/dist/assets/ahk-CsyLZFj1.js +0 -1
  222. package/web/dist/assets/ahk2-8Zs4aa1G.js +0 -1
  223. package/web/dist/assets/andromeeda-C4gqWexZ.js +0 -1
  224. package/web/dist/assets/angular-html-DA-rfuFy.js +0 -1
  225. package/web/dist/assets/angular-ts-BrjP3tb8.js +0 -1
  226. package/web/dist/assets/apache-Pmp26Uib.js +0 -1
  227. package/web/dist/assets/apex-DhZFqWV2.js +0 -1
  228. package/web/dist/assets/apl-CORt7UWP.js +0 -1
  229. package/web/dist/assets/applescript-Co6uUVPk.js +0 -1
  230. package/web/dist/assets/ara-BRHolxvo.js +0 -1
  231. package/web/dist/assets/arc-BZQ951h9.js +0 -1
  232. package/web/dist/assets/architectureDiagram-47P4ROYG-BP5qiXzf.js +0 -36
  233. package/web/dist/assets/asciidoc-CSVQ5wI8.js +0 -1
  234. package/web/dist/assets/asm-D_Q5rh1f.js +0 -1
  235. package/web/dist/assets/astro-HNnZUWAn.js +0 -1
  236. package/web/dist/assets/aurora-x-D-2ljcwZ.js +0 -1
  237. package/web/dist/assets/awk-DMzUqQB5.js +0 -1
  238. package/web/dist/assets/ayu-dark-DYE7WIF3.js +0 -1
  239. package/web/dist/assets/ayu-light-BA47KaF1.js +0 -1
  240. package/web/dist/assets/ayu-mirage-32ctXXKs.js +0 -1
  241. package/web/dist/assets/ballerina-BFfxhgS-.js +0 -1
  242. package/web/dist/assets/bat-CickPsom.js +0 -1
  243. package/web/dist/assets/beancount-k_qm7-4y.js +0 -1
  244. package/web/dist/assets/berry-uYugtg8r.js +0 -1
  245. package/web/dist/assets/bibtex-CHM0blh-.js +0 -1
  246. package/web/dist/assets/bicep-Bmn6On1c.js +0 -1
  247. package/web/dist/assets/bird2-Bx8U0n9b.js +0 -1
  248. package/web/dist/assets/blade-2xfisSek.js +0 -1
  249. package/web/dist/assets/blockDiagram-E7TT5TSB-DtRpcE7F.js +0 -140
  250. package/web/dist/assets/bsl-DlhNcFeZ.js +0 -1
  251. package/web/dist/assets/c-BIGW1oBm.js +0 -1
  252. package/web/dist/assets/c3-Dp5svz6Z.js +0 -1
  253. package/web/dist/assets/c4Diagram-CRA5TL53-Gdzn8UBh.js +0 -38
  254. package/web/dist/assets/cadence-Bv_4Rxtq.js +0 -1
  255. package/web/dist/assets/cairo-KRGpt6FW.js +0 -1
  256. package/web/dist/assets/catppuccin-frappe-CZL1YF0i.js +0 -1
  257. package/web/dist/assets/catppuccin-latte-DH-8KZSZ.js +0 -1
  258. package/web/dist/assets/catppuccin-macchiato-B7yYVSCf.js +0 -1
  259. package/web/dist/assets/catppuccin-mocha-Ct7hS0mc.js +0 -1
  260. package/web/dist/assets/channel-BND6_KSH.js +0 -1
  261. package/web/dist/assets/chapel-DTp_pixX.js +0 -1
  262. package/web/dist/assets/chunk-2Q5K7J3B-3U6HMlsm.js +0 -1
  263. package/web/dist/assets/chunk-7TKQ45FW-Dn6ktcY5.js +0 -1
  264. package/web/dist/assets/chunk-AW2ZBBNX-De0QX6p1.js +0 -88
  265. package/web/dist/assets/chunk-FVRAUYC3-CpXDfvz4.js +0 -2
  266. package/web/dist/assets/chunk-HTAEGDNF-D1KDvcDd.js +0 -1
  267. package/web/dist/assets/chunk-JWPE2WC7-umm4A-fq.js +0 -1
  268. package/web/dist/assets/chunk-KQW6MTUR-JYH94hpE.js +0 -1
  269. package/web/dist/assets/chunk-XXDRQBXY-CSlCFByc.js +0 -1
  270. package/web/dist/assets/clarity-Dn5IMItf.js +0 -1
  271. package/web/dist/assets/classDiagram-v2-K4WV4PDN-DnFwS0qN.js +0 -217
  272. package/web/dist/assets/clojure-P80f7IUj.js +0 -1
  273. package/web/dist/assets/cmake-D1j8_8rp.js +0 -1
  274. package/web/dist/assets/cobol-nBiQ_Alo.js +0 -1
  275. package/web/dist/assets/codeowners-Bp6g37R7.js +0 -1
  276. package/web/dist/assets/codeql-DsOJ9woJ.js +0 -1
  277. package/web/dist/assets/coffee-Ch7k5sss.js +0 -1
  278. package/web/dist/assets/common-lisp-Cg-RD9OK.js +0 -1
  279. package/web/dist/assets/coq-C7JzOVbR.js +0 -1
  280. package/web/dist/assets/cose-bilkent-JH36ORCC-BxUTUyep.js +0 -1
  281. package/web/dist/assets/cpp-BMRokrvK.js +0 -1
  282. package/web/dist/assets/crystal-DGywbUpC.js +0 -1
  283. package/web/dist/assets/csharp-DSvCPggb.js +0 -1
  284. package/web/dist/assets/css-CLj8gQPS.js +0 -1
  285. package/web/dist/assets/csv-fuZLfV_i.js +0 -1
  286. package/web/dist/assets/cue-D82EKSYY.js +0 -1
  287. package/web/dist/assets/cynefin-EF2NZ3EQ-CiMvulJr.js +0 -141
  288. package/web/dist/assets/cynefinDiagram-3GCD6N5R-DuXFORdW.js +0 -62
  289. package/web/dist/assets/cypher-COkxafJQ.js +0 -1
  290. package/web/dist/assets/cytoscape.esm-Ix0LnXOy.js +0 -331
  291. package/web/dist/assets/d-85-TOEBH.js +0 -1
  292. package/web/dist/assets/dagre-W4DXFKR2-DzMZHXci.js +0 -4
  293. package/web/dist/assets/dark-plus-C3mMm8J8.js +0 -1
  294. package/web/dist/assets/dart-bE4Kk8sk.js +0 -1
  295. package/web/dist/assets/dax-CEL-wOlO.js +0 -1
  296. package/web/dist/assets/defaultLocale-DX6XiGOO.js +0 -1
  297. package/web/dist/assets/desktop-BmXAJ9_W.js +0 -1
  298. package/web/dist/assets/diagram-2UJZ2QOL-B6tO5G1v.js +0 -200
  299. package/web/dist/assets/diagram-OVF4WLC6-DRZt8tGc.js +0 -24
  300. package/web/dist/assets/diagram-PFPMY2P6-DGh6IecR.js +0 -30
  301. package/web/dist/assets/diagram-UMYRVEAY-BLbnt0yT.js +0 -24
  302. package/web/dist/assets/diagram-YEKJPTXX-C-S5DVhj.js +0 -41
  303. package/web/dist/assets/diagram-ZIFT7M5P-JrGHTWbo.js +0 -3
  304. package/web/dist/assets/diff-D97Zzqfu.js +0 -1
  305. package/web/dist/assets/docker-BcOcwvcX.js +0 -1
  306. package/web/dist/assets/dotenv-Da5cRb03.js +0 -1
  307. package/web/dist/assets/dracula-BzJJZx-M.js +0 -1
  308. package/web/dist/assets/dracula-soft-BXkSAIEj.js +0 -1
  309. package/web/dist/assets/dream-maker-BtqSS_iP.js +0 -1
  310. package/web/dist/assets/ebnfDiagram-VR2GEFS7-DPXA-YOi.js +0 -1
  311. package/web/dist/assets/edge-FbVlp4U3.js +0 -1
  312. package/web/dist/assets/elixir-CkH2-t6x.js +0 -1
  313. package/web/dist/assets/elk-IJKZMXRS-CINeWt2W.js +0 -27
  314. package/web/dist/assets/elm-DbKCFpqz.js +0 -1
  315. package/web/dist/assets/emacs-lisp-C_m_b--Z.js +0 -1
  316. package/web/dist/assets/erDiagram-O2IAPWRE-PPaHmqA1.js +0 -99
  317. package/web/dist/assets/erb-DXfck5VN.js +0 -1
  318. package/web/dist/assets/erlang-DsQrWhSR.js +0 -1
  319. package/web/dist/assets/everforest-dark-BgDCqdQA.js +0 -1
  320. package/web/dist/assets/everforest-light-C8M2exoo.js +0 -1
  321. package/web/dist/assets/fennel-BYunw83y.js +0 -1
  322. package/web/dist/assets/fish-BvzEVeQv.js +0 -1
  323. package/web/dist/assets/flowDiagram-OXPTDLAJ-t-u0QXEA.js +0 -213
  324. package/web/dist/assets/fluent-C4IJs8-o.js +0 -1
  325. package/web/dist/assets/fortran-fixed-form-CkoXwp7k.js +0 -1
  326. package/web/dist/assets/fortran-free-form-BxgE0vQu.js +0 -1
  327. package/web/dist/assets/fsharp-CXgrBDvD.js +0 -1
  328. package/web/dist/assets/ganttDiagram-R7TSEDQI-Bw49ZD_b.js +0 -292
  329. package/web/dist/assets/gdresource-TyuKm33G.js +0 -1
  330. package/web/dist/assets/gdscript-DqcFQ5yU.js +0 -1
  331. package/web/dist/assets/gdshader-DkwncUOv.js +0 -1
  332. package/web/dist/assets/genie-D0YGMca9.js +0 -1
  333. package/web/dist/assets/gherkin-DyxjwDmM.js +0 -1
  334. package/web/dist/assets/git-commit-F4YmCXRG.js +0 -1
  335. package/web/dist/assets/git-rebase-r7XF79zn.js +0 -1
  336. package/web/dist/assets/gitGraphDiagram-XJZIOB7I-BAfOqeeg.js +0 -106
  337. package/web/dist/assets/github-dark-DHJKELXO.js +0 -1
  338. package/web/dist/assets/github-dark-default-Cuk6v7N8.js +0 -1
  339. package/web/dist/assets/github-dark-dimmed-DH5Ifo-i.js +0 -1
  340. package/web/dist/assets/github-dark-high-contrast-E3gJ1_iC.js +0 -1
  341. package/web/dist/assets/github-light-DAi9KRSo.js +0 -1
  342. package/web/dist/assets/github-light-default-D7oLnXFd.js +0 -1
  343. package/web/dist/assets/github-light-high-contrast-BfjtVDDH.js +0 -1
  344. package/web/dist/assets/gleam-BspZqrRM.js +0 -1
  345. package/web/dist/assets/glimmer-js-ByusRIyA.js +0 -1
  346. package/web/dist/assets/glimmer-ts-BfAWNZQY.js +0 -1
  347. package/web/dist/assets/glsl-DplSGwfg.js +0 -1
  348. package/web/dist/assets/gn-n2N0HUVH.js +0 -1
  349. package/web/dist/assets/gnuplot-DdkO51Og.js +0 -1
  350. package/web/dist/assets/go-C27-OAKa.js +0 -1
  351. package/web/dist/assets/graph-Bn3Yngep.js +0 -1
  352. package/web/dist/assets/graphql-ChdNCCLP.js +0 -1
  353. package/web/dist/assets/groovy-gcz8RCvz.js +0 -1
  354. package/web/dist/assets/gruvbox-dark-hard-CFHQjOhq.js +0 -1
  355. package/web/dist/assets/gruvbox-dark-medium-GsRaNv29.js +0 -1
  356. package/web/dist/assets/gruvbox-dark-soft-CVdnzihN.js +0 -1
  357. package/web/dist/assets/gruvbox-light-hard-CH1njM8p.js +0 -1
  358. package/web/dist/assets/gruvbox-light-medium-DRw_LuNl.js +0 -1
  359. package/web/dist/assets/gruvbox-light-soft-hJgmCMqR.js +0 -1
  360. package/web/dist/assets/hack-BWmVpMyf.js +0 -1
  361. package/web/dist/assets/haml-D5jkg6IW.js +0 -1
  362. package/web/dist/assets/handlebars-BpdQsYii.js +0 -1
  363. package/web/dist/assets/haskell-Df6bDoY_.js +0 -1
  364. package/web/dist/assets/haxe-CfZj7gIn.js +0 -1
  365. package/web/dist/assets/hcl-BWvSN4gD.js +0 -1
  366. package/web/dist/assets/hjson-D5-asLiD.js +0 -1
  367. package/web/dist/assets/hlsl-D3lLCCz7.js +0 -1
  368. package/web/dist/assets/horizon-BUw7H-hv.js +0 -1
  369. package/web/dist/assets/horizon-bright-CUuTKBJd.js +0 -1
  370. package/web/dist/assets/houston-DnULxvSX.js +0 -1
  371. package/web/dist/assets/html-derivative-DlHx6ybY.js +0 -1
  372. package/web/dist/assets/html-pp8916En.js +0 -1
  373. package/web/dist/assets/http-jrhK8wxY.js +0 -1
  374. package/web/dist/assets/hurl-irOxFIW8.js +0 -1
  375. package/web/dist/assets/hxml-2-FPmUDs.js +0 -1
  376. package/web/dist/assets/hy-DFXneXwc.js +0 -1
  377. package/web/dist/assets/icons-Bm_ZzSAy.js +0 -964
  378. package/web/dist/assets/imba-DGztddWO.js +0 -1
  379. package/web/dist/assets/index-CeeLdENM.js +0 -677
  380. package/web/dist/assets/index-Ceez9lYk.css +0 -1
  381. package/web/dist/assets/infoDiagram-5W2HQ5XZ-Bv4RBxYW.js +0 -2
  382. package/web/dist/assets/ini-BEwlwnbL.js +0 -1
  383. package/web/dist/assets/init-Gi6I4Gst.js +0 -1
  384. package/web/dist/assets/ishikawaDiagram-K3B6WC7H-DEpj0bRp.js +0 -70
  385. package/web/dist/assets/java-CylS5w8V.js +0 -1
  386. package/web/dist/assets/javascript-wDzz0qaB.js +0 -1
  387. package/web/dist/assets/jinja-f2NsQr07.js +0 -1
  388. package/web/dist/assets/jison-wvAkD_A8.js +0 -1
  389. package/web/dist/assets/journeyDiagram-COXZFDF6-MJu84Iiz.js +0 -139
  390. package/web/dist/assets/json-Cp-IABpG.js +0 -1
  391. package/web/dist/assets/json5-C9tS-k6U.js +0 -1
  392. package/web/dist/assets/jsonc-Des-eS-w.js +0 -1
  393. package/web/dist/assets/jsonl-DcaNXYhu.js +0 -1
  394. package/web/dist/assets/jsonnet-DFQXde-d.js +0 -1
  395. package/web/dist/assets/jssm-C2t-YnRu.js +0 -1
  396. package/web/dist/assets/jsx-g9-lgVsj.js +0 -1
  397. package/web/dist/assets/julia-5Bft2YPA.js +0 -1
  398. package/web/dist/assets/just-Cwhn7H3k.js +0 -1
  399. package/web/dist/assets/kanagawa-dragon-BuwD2xS4.js +0 -1
  400. package/web/dist/assets/kanagawa-lotus-C3DzagqV.js +0 -1
  401. package/web/dist/assets/kanagawa-wave-DFGoQZhC.js +0 -1
  402. package/web/dist/assets/kanban-definition-P3RFRI5V-mlYSRALK.js +0 -89
  403. package/web/dist/assets/kdl-DV7GczEv.js +0 -1
  404. package/web/dist/assets/kotlin-BdnUsdx6.js +0 -1
  405. package/web/dist/assets/kusto-wEQ09or8.js +0 -1
  406. package/web/dist/assets/laserwave-DUszq2jm.js +0 -1
  407. package/web/dist/assets/latex-D5pSuvFb.js +0 -1
  408. package/web/dist/assets/lean-BZvkOJ9d.js +0 -1
  409. package/web/dist/assets/less-B1dDrJ26.js +0 -1
  410. package/web/dist/assets/light-plus-B7mTdjB0.js +0 -1
  411. package/web/dist/assets/linear-5j9gt8MV.js +0 -1
  412. package/web/dist/assets/liquid-C0sCDyMI.js +0 -1
  413. package/web/dist/assets/llvm-BZoOZj88.js +0 -1
  414. package/web/dist/assets/log-2UxHyX5q.js +0 -1
  415. package/web/dist/assets/logo-BtOb2qkB.js +0 -1
  416. package/web/dist/assets/lua-BaeVxFsk.js +0 -1
  417. package/web/dist/assets/luau-BnpPk5vE.js +0 -1
  418. package/web/dist/assets/make-CHLpvVh8.js +0 -1
  419. package/web/dist/assets/markdown-BWXjRrSw.js +0 -30
  420. package/web/dist/assets/markdown-Cvjx9yec.js +0 -1
  421. package/web/dist/assets/marko-DjSrsDqO.js +0 -1
  422. package/web/dist/assets/material-theme-D5KoaKCx.js +0 -1
  423. package/web/dist/assets/material-theme-darker-BfHTSMKl.js +0 -1
  424. package/web/dist/assets/material-theme-lighter-B0m2ddpp.js +0 -1
  425. package/web/dist/assets/material-theme-ocean-CyktbL80.js +0 -1
  426. package/web/dist/assets/material-theme-palenight-Csfq5Kiy.js +0 -1
  427. package/web/dist/assets/matlab-D7o27uSR.js +0 -1
  428. package/web/dist/assets/mdc-D1_yUvq7.js +0 -1
  429. package/web/dist/assets/mdx-Cmh6b_Ma.js +0 -1
  430. package/web/dist/assets/mermaid-CQcHuHx7.js +0 -1
  431. package/web/dist/assets/mermaid.core-DLb6eAON.js +0 -314
  432. package/web/dist/assets/min-dark-CafNBF8u.js +0 -1
  433. package/web/dist/assets/min-light-CTRr51gU.js +0 -1
  434. package/web/dist/assets/mindmap-definition-LZFPQGKD-C9v_57Ex.js +0 -96
  435. package/web/dist/assets/mipsasm-CKIfxQSi.js +0 -1
  436. package/web/dist/assets/mojo-DJz3ZmWd.js +0 -1
  437. package/web/dist/assets/monokai-BRVnQi9A.js +0 -1
  438. package/web/dist/assets/moonbit-CHtswR0a.js +0 -1
  439. package/web/dist/assets/move-el3G9tDJ.js +0 -1
  440. package/web/dist/assets/narrat-DRg8JJMk.js +0 -1
  441. package/web/dist/assets/nextflow-C-mBbutL.js +0 -1
  442. package/web/dist/assets/nextflow-groovy-vE_lwT2v.js +0 -1
  443. package/web/dist/assets/nginx-BpAMiNFr.js +0 -1
  444. package/web/dist/assets/night-owl-C39BiMTA.js +0 -1
  445. package/web/dist/assets/night-owl-light-CMTm3GFP.js +0 -1
  446. package/web/dist/assets/nim-BIad80T-.js +0 -1
  447. package/web/dist/assets/nix-CwoSXNpI.js +0 -1
  448. package/web/dist/assets/nord-Ddv68eIx.js +0 -1
  449. package/web/dist/assets/nsis-BlV79W_Q.js +0 -1
  450. package/web/dist/assets/nushell-D3jzshHO.js +0 -1
  451. package/web/dist/assets/objective-c-DXmwc3jG.js +0 -1
  452. package/web/dist/assets/objective-cpp-CLxacb5B.js +0 -1
  453. package/web/dist/assets/ocaml-C0hk2d4L.js +0 -1
  454. package/web/dist/assets/odin-BBf5iR-q.js +0 -1
  455. package/web/dist/assets/one-dark-pro-DVMEJ2y_.js +0 -1
  456. package/web/dist/assets/one-light-C3Wv6jpd.js +0 -1
  457. package/web/dist/assets/openscad-C4EeE6gA.js +0 -1
  458. package/web/dist/assets/ordinal-Cboi1Yqb.js +0 -1
  459. package/web/dist/assets/org-DM6o9KBp.js +0 -1
  460. package/web/dist/assets/panels-BQOvnbWH.js +0 -1
  461. package/web/dist/assets/pascal-D93ZcfNL.js +0 -1
  462. package/web/dist/assets/pegDiagram-BGZESJAR-KQP26s3-.js +0 -1
  463. package/web/dist/assets/perl-B9cMNwum.js +0 -1
  464. package/web/dist/assets/php-Csjmro_R.js +0 -1
  465. package/web/dist/assets/pieDiagram-CAPJLFHJ-DN3RQ_ih.js +0 -39
  466. package/web/dist/assets/pkl-u5AG7uiY.js +0 -1
  467. package/web/dist/assets/plastic-3e1v2bzS.js +0 -1
  468. package/web/dist/assets/plsql-ChMvpjG-.js +0 -1
  469. package/web/dist/assets/po-BTJTHyun.js +0 -1
  470. package/web/dist/assets/poimandres-CS3Unz2-.js +0 -1
  471. package/web/dist/assets/polar-C0HS_06l.js +0 -1
  472. package/web/dist/assets/postcss-CXtECtnM.js +0 -1
  473. package/web/dist/assets/powerquery-CEu0bR-o.js +0 -1
  474. package/web/dist/assets/powershell-BmBUJMz7.js +0 -1
  475. package/web/dist/assets/prisma-Vru482bI.js +0 -1
  476. package/web/dist/assets/profileChange-B7TaQ18u.js +0 -1
  477. package/web/dist/assets/prolog-CbFg5uaA.js +0 -1
  478. package/web/dist/assets/proto-C7zT0LnQ.js +0 -1
  479. package/web/dist/assets/pug-DKIMFp6K.js +0 -1
  480. package/web/dist/assets/puppet-BMWR74SV.js +0 -1
  481. package/web/dist/assets/purescript-CklMAg4u.js +0 -1
  482. package/web/dist/assets/python-B6aJPvgy.js +0 -1
  483. package/web/dist/assets/qml-3beO22l8.js +0 -1
  484. package/web/dist/assets/qmldir-C8lEn-DE.js +0 -1
  485. package/web/dist/assets/qss-IeuSbFQv.js +0 -1
  486. package/web/dist/assets/quadrantDiagram-GDMTTRAM-BpL_ZL76.js +0 -7
  487. package/web/dist/assets/r-Cf5RLm7j.js +0 -1
  488. package/web/dist/assets/racket-BqYA7rlc.js +0 -1
  489. package/web/dist/assets/railroadDiagram-SM67HX2B-DZ-fPU85.js +0 -1
  490. package/web/dist/assets/raku-DXvB9xmW.js +0 -1
  491. package/web/dist/assets/razor-BjBPvh-w.js +0 -1
  492. package/web/dist/assets/rbs-CpoqiR4B.js +0 -1
  493. package/web/dist/assets/react-vendor-C0HIWSpf.js +0 -9
  494. package/web/dist/assets/red-hvxz__6c.js +0 -1
  495. package/web/dist/assets/reg-C-SQnVFl.js +0 -1
  496. package/web/dist/assets/regexp-CDVJQ6XC.js +0 -1
  497. package/web/dist/assets/rel-C3B-1QV4.js +0 -1
  498. package/web/dist/assets/requirementDiagram-X7JNWC4A-mKPGj64L.js +0 -84
  499. package/web/dist/assets/riscv-BM1_JUlF.js +0 -1
  500. package/web/dist/assets/ron-D8l8udqQ.js +0 -1
  501. package/web/dist/assets/rose-pine-5qJOZa0Y.js +0 -1
  502. package/web/dist/assets/rose-pine-dawn-zx0QlTCp.js +0 -1
  503. package/web/dist/assets/rose-pine-moon-C9pEdX9L.js +0 -1
  504. package/web/dist/assets/rosmsg-BJDFO7_C.js +0 -1
  505. package/web/dist/assets/rst-bs7f0vWN.js +0 -1
  506. package/web/dist/assets/ruby-C0TQ7zu5.js +0 -1
  507. package/web/dist/assets/rust-B1yitclQ.js +0 -1
  508. package/web/dist/assets/sankeyDiagram-UM26HJRW-Bs4xfjQP.js +0 -40
  509. package/web/dist/assets/sas-DEy46yEz.js +0 -1
  510. package/web/dist/assets/sass-Cj5Yp3dK.js +0 -1
  511. package/web/dist/assets/scala-CqE71os6.js +0 -1
  512. package/web/dist/assets/scheme-C98Dy4si.js +0 -1
  513. package/web/dist/assets/scss-D5BDwBP9.js +0 -1
  514. package/web/dist/assets/sdbl-DVxCFoDh.js +0 -1
  515. package/web/dist/assets/sequenceDiagram-ZO4K6R2Y-BjUmzZaO.js +0 -169
  516. package/web/dist/assets/shaderlab-Dg9Lc6iA.js +0 -1
  517. package/web/dist/assets/shellscript-Yzrsuije.js +0 -1
  518. package/web/dist/assets/shellsession-BADoaaVG.js +0 -1
  519. package/web/dist/assets/sizeCapture-INFHLROL-BXBM3j_Q.js +0 -1
  520. package/web/dist/assets/slack-dark-BthQWCQV.js +0 -1
  521. package/web/dist/assets/slack-ochin-DqwNpetd.js +0 -1
  522. package/web/dist/assets/smalltalk-BOQMe2GC.js +0 -1
  523. package/web/dist/assets/smithy-cds9vsN8.js +0 -1
  524. package/web/dist/assets/snazzy-light-Bw305WKR.js +0 -1
  525. package/web/dist/assets/solarized-dark-CpvCGNkr.js +0 -1
  526. package/web/dist/assets/solarized-light-Dlz6yCKv.js +0 -1
  527. package/web/dist/assets/solidity-DijEV5ha.js +0 -1
  528. package/web/dist/assets/soy-8wufbnw4.js +0 -1
  529. package/web/dist/assets/sparql-rVzFXLq3.js +0 -1
  530. package/web/dist/assets/splunk-BtCnVYZw.js +0 -1
  531. package/web/dist/assets/sql-CRqJ_cUM.js +0 -1
  532. package/web/dist/assets/ssh-config-_ykCGR6B.js +0 -1
  533. package/web/dist/assets/stata-DI20mbqo.js +0 -1
  534. package/web/dist/assets/state-Kfon1nTr.js +0 -17
  535. package/web/dist/assets/stateDiagram-v2-TBUQTH76-FGgFDGUU.js +0 -291
  536. package/web/dist/assets/sttLanguages-C7kVulzY.js +0 -1
  537. package/web/dist/assets/stylus-BEDo0Tqx.js +0 -1
  538. package/web/dist/assets/surrealql-Cjom0U5J.js +0 -1
  539. package/web/dist/assets/svelte-Cy7k_4gC.js +0 -1
  540. package/web/dist/assets/swift-C2oV4EkX.js +0 -1
  541. package/web/dist/assets/swimlanes-N4OXWK64-wkd_n4HU.js +0 -1
  542. package/web/dist/assets/swimlanesDiagram-K3J5GTZL-CKnwEuq_.js +0 -8
  543. package/web/dist/assets/synthwave-84-CbfX1IO0.js +0 -1
  544. package/web/dist/assets/system-verilog-0hqHdDBg.js +0 -1
  545. package/web/dist/assets/systemd-4A_iFExJ.js +0 -1
  546. package/web/dist/assets/talonscript-CkByrt1z.js +0 -1
  547. package/web/dist/assets/tasl-QIJgUcNo.js +0 -1
  548. package/web/dist/assets/tcl-dwOrl1Do.js +0 -1
  549. package/web/dist/assets/templ-DhtptRzy.js +0 -1
  550. package/web/dist/assets/terraform-BETggiCN.js +0 -1
  551. package/web/dist/assets/tex-D96PA37w.js +0 -1
  552. package/web/dist/assets/timeline-definition-YOQAKGHF-DyBln1jw.js +0 -120
  553. package/web/dist/assets/tokyo-night-hegEt444.js +0 -1
  554. package/web/dist/assets/toml-vGWfd6FD.js +0 -1
  555. package/web/dist/assets/ts-tags-D351s5mN.js +0 -1
  556. package/web/dist/assets/tsv-B_m7g4N7.js +0 -1
  557. package/web/dist/assets/tsx-COt5Ahok.js +0 -1
  558. package/web/dist/assets/turtle-BsS91CYL.js +0 -1
  559. package/web/dist/assets/twig-27uCiNez.js +0 -1
  560. package/web/dist/assets/typescript-BPQ3VLAy.js +0 -1
  561. package/web/dist/assets/typespec-CAFt9gP4.js +0 -1
  562. package/web/dist/assets/typst-BUadGCkm.js +0 -1
  563. package/web/dist/assets/usecaseDiagram-VIAY4XPW-Cqis3XHX.js +0 -370
  564. package/web/dist/assets/v-BGw2Nkan.js +0 -1
  565. package/web/dist/assets/vala-CsfeWuGM.js +0 -1
  566. package/web/dist/assets/vb-Cu-pLBUe.js +0 -1
  567. package/web/dist/assets/vennDiagram-BLWOH2XV-BaiFLOVS.js +0 -34
  568. package/web/dist/assets/verilog-nZwndyjY.js +0 -1
  569. package/web/dist/assets/vesper-DRje8inN.js +0 -1
  570. package/web/dist/assets/vhdl-CeAyd5Ju.js +0 -1
  571. package/web/dist/assets/viml-CJc9bBzg.js +0 -1
  572. package/web/dist/assets/vitesse-black-Bkuqu6BP.js +0 -1
  573. package/web/dist/assets/vitesse-dark-D0r3Knsf.js +0 -1
  574. package/web/dist/assets/vitesse-light-CVO1_9PV.js +0 -1
  575. package/web/dist/assets/vue-BqiEGhQt.js +0 -1
  576. package/web/dist/assets/vue-html-AaS7Mt5G.js +0 -1
  577. package/web/dist/assets/vue-vine-BoDAl6tE.js +0 -1
  578. package/web/dist/assets/vyper-CDx5xZoG.js +0 -1
  579. package/web/dist/assets/wardleyDiagram-YMQ3BMBF-C4CzpJto.js +0 -78
  580. package/web/dist/assets/wasm-CG6Dc4jp.js +0 -1
  581. package/web/dist/assets/wasm-MzD3tlZU.js +0 -1
  582. package/web/dist/assets/wenyan-BV7otONQ.js +0 -1
  583. package/web/dist/assets/wgsl-Dx-B1_4e.js +0 -1
  584. package/web/dist/assets/wikitext-BhOHFoWU.js +0 -1
  585. package/web/dist/assets/wit-5i3qLPDT.js +0 -1
  586. package/web/dist/assets/wolfram-lXgVvXCa.js +0 -1
  587. package/web/dist/assets/xml-sdJ4AIDG.js +0 -1
  588. package/web/dist/assets/xsl-CtQFsRM5.js +0 -1
  589. package/web/dist/assets/xychartDiagram-TAQBALBS-Dp1hfe3-.js +0 -7
  590. package/web/dist/assets/yaml-Buea-lGh.js +0 -1
  591. package/web/dist/assets/zenscript-DVFEvuxE.js +0 -1
  592. package/web/dist/assets/zig-VOosw3JB.js +0 -1
  593. package/web/dist/figma-demo/product-1.jpg +0 -0
  594. package/web/dist/figma-demo/product-2.jpg +0 -0
  595. package/web/dist/figma-demo/trail-1.jpg +0 -0
  596. package/web/dist/figma-demo/trail-2.jpg +0 -0
  597. package/web/dist/figma-demo/trail-3.jpg +0 -0
@@ -1 +0,0 @@
1
- const e=Object.freeze(JSON.parse('{"displayName":"Swift","fileTypes":["swift"],"firstLineMatch":"^#!/.*\\\\bswift","name":"swift","patterns":[{"include":"#root"}],"repository":{"async-throws":{"captures":{"1":{"name":"invalid.illegal.await-must-precede-throws.swift"},"2":{"name":"storage.modifier.exception.swift"},"3":{"name":"storage.modifier.async.swift"}},"match":"\\\\b(?:((?:throws\\\\s+|rethrows\\\\s+)async)|((?:|re)throws)|(async))\\\\b"},"attributes":{"patterns":[{"begin":"((@)available)(\\\\()","beginCaptures":{"1":{"name":"storage.modifier.attribute.swift"},"2":{"name":"punctuation.definition.attribute.swift"},"3":{"name":"punctuation.definition.arguments.begin.swift"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.arguments.end.swift"}},"name":"meta.attribute.available.swift","patterns":[{"captures":{"1":{"name":"keyword.other.platform.os.swift"},"2":{"name":"constant.numeric.swift"}},"match":"\\\\b(swift|(?:iOS|macOS|OSX|watchOS|tvOS|visionOS|UIKitForMac)(?:ApplicationExtension)?)\\\\b(?:\\\\s+([0-9]+(?:\\\\.[0-9]+)*)\\\\b)?"},{"begin":"\\\\b((?:introduc|deprecat|obsolet)ed)\\\\s*(:)\\\\s*","beginCaptures":{"1":{"name":"keyword.other.swift"},"2":{"name":"punctuation.separator.key-value.swift"}},"end":"(?!\\\\G)","patterns":[{"match":"\\\\b[0-9]+(?:\\\\.[0-9]+)*\\\\b","name":"constant.numeric.swift"}]},{"begin":"\\\\b(message|renamed)\\\\s*(:)\\\\s*(?=\\")","beginCaptures":{"1":{"name":"keyword.other.swift"},"2":{"name":"punctuation.separator.key-value.swift"}},"end":"(?!\\\\G)","patterns":[{"include":"#literals"}]},{"captures":{"1":{"name":"keyword.other.platform.all.swift"},"2":{"name":"keyword.other.swift"},"3":{"name":"invalid.illegal.character-not-allowed-here.swift"}},"match":"(?:(\\\\*)|\\\\b(deprecated|unavailable|noasync)\\\\b)\\\\s*(.*?)(?=[),])"}]},{"begin":"((@)objc)(\\\\()","beginCaptures":{"1":{"name":"storage.modifier.attribute.swift"},"2":{"name":"punctuation.definition.attribute.swift"},"3":{"name":"punctuation.definition.arguments.begin.swift"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.arguments.end.swift"}},"name":"meta.attribute.objc.swift","patterns":[{"captures":{"1":{"name":"invalid.illegal.missing-colon-after-selector-piece.swift"}},"match":"\\\\w*(?::(?:\\\\w*:)*(\\\\w*))?","name":"entity.name.function.swift"}]},{"begin":"(@)(?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>)","beginCaptures":{"0":{"name":"storage.modifier.attribute.swift"},"1":{"name":"punctuation.definition.attribute.swift"},"2":{"name":"punctuation.definition.identifier.swift"},"3":{"name":"punctuation.definition.identifier.swift"}},"end":"(?!\\\\G\\\\()","name":"meta.attribute.swift","patterns":[{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.definition.arguments.begin.swift"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.arguments.end.swift"}},"name":"meta.arguments.attribute.swift","patterns":[{"include":"#expressions"}]}]}]},"builtin-functions":{"patterns":[{"match":"(?<=\\\\.)(?:s(?:ort(?:ed)?|plit)|contains|index|partition|f(?:i(?:lter|rst)|orEach|latMap)|with(?:MutableCharacters|CString|U(?:nsafe(?:Mutable(?:BufferPointer|Pointer(?:s|To(?:Header|Elements)))|BufferPointer)|TF8Buffer))|m(?:in|a[px]))(?=\\\\s*[({])\\\\b","name":"support.function.swift"},{"match":"(?<=\\\\.)(?:s(?:ymmetricDifference|t(?:oreBytes|arts|ride)|ortInPlace|u(?:ccessor|ffix|btract(?:ing|InPlace|WithOverflow)?)|quareRoot|amePosition)|h(?:oldsUnique(?:|OrPinned)Reference|as(?:Suf|Pre)fix)|ne(?:gated?|xt)|c(?:o(?:untByEnumerating|py(?:Bytes)?)|lamp(?:ed)?|reate)|t(?:o(?:IntMax|Opaque|UIntMax)|ake(?:R|Unr)etainedValue|r(?:uncatingRemainder|a(?:nscodedLength|ilSurrogate)))|i(?:s(?:MutableAndUniquelyReferenced(?:OrPinned)?|S(?:trictSu(?:perset(?:Of)?|bset(?:Of)?)|u(?:perset(?:Of)?|bset(?:Of)?))|Continuation|T(?:otallyOrdered|railSurrogate)|Disjoint(?:With)?|Unique(?:Reference|lyReferenced(?:OrPinned)?)|Equal|Le(?:ss(?:ThanOrEqualTo)?|adSurrogate))|n(?:sert(?:ContentsOf)?|tersect(?:ion|InPlace)?|itialize(?:Memory|From)?|dex(?:Of|ForKey)))|o(?:verlaps|bjectAt)|d(?:i(?:stance(?:To)?|vide(?:d|WithOverflow)?)|e(?:s(?:cendant|troy)|code(?:CString)?|initialize|alloc(?:ate(?:Capacity)?)?)|rop(?:First|Last))|u(?:n(?:ion(?:InPlace)?|derestimateCount|wrappedOrError)|p(?:date(?:Value)?|percased))|join(?:ed|WithSeparator)|p(?:op(?:First|Last)|ass(?:R|Unr)etained|re(?:decessor|fix))|e(?:scaped?|n(?:code|umerated?)|lementsEqual|xclusiveOr(?:InPlace)?)|f(?:orm(?:Remainder|S(?:ymmetricDifference|quareRoot)|TruncatingRemainder|In(?:tersection|dex)|Union)|latten|rom(?:CString(?:RepairingIllFormedUTF8)?|Opaque))|w(?:i(?:thMemoryRebound|dth)|rite(?:To)?)|l(?:o(?:wercased|ad)|e(?:adSurrogate|xicographical(?:Compare|lyPrecedes)))|a(?:ss(?:ign(?:(?:Backward|)From)?|umingMemoryBound)|d(?:d(?:ing(?:Product)?|Product|WithOverflow)?|vanced(?:By)?)|utorelease|ppend(?:ContentsOf)?|lloc(?:ate)?|bs)|r(?:ound(?:ed)?|e(?:serveCapacity|tain|duce|place(?:(?:R|Subr)ange)?|versed?|quest(?:Native|UniqueMutableBacking)Buffer|lease|m(?:ove(?:Range|Subrange|Value(?:ForKey)?|First|Last|A(?:tIndex|ll))?|ainder(?:WithOverflow)?)))|ge(?:nerate|t(?:Objects|Element))|m(?:in(?:imum(?:Magnitude)?|Element)|ove(?:Initialize(?:Memory|BackwardFrom|From)?|Assign(?:From)?)?|ultipl(?:y(?:WithOverflow)?|ied)|easure|a(?:ke(?:Iterator|Description)|x(?:imum(?:Magnitude)?|Element)))|bindMemory)(?=\\\\s*\\\\()","name":"support.function.swift"},{"match":"(?<=\\\\.)(?:s(?:uperclassMirror|amePositionIn|tartsWith)|nextObject|c(?:haracterAtIndex|o(?:untByEnumeratingWithState|pyWithZone)|ustom(?:Mirror|PlaygroundQuickLook))|is(?:EmptyInput|ASCII)|object(?:Enumerator|ForKey|AtIndex)|join|put|keyEnumerator|withUnsafeMutablePointerToValue|length|getMirror|m(?:oveInitializeAssignFrom|ember))(?=\\\\s*\\\\()","name":"support.function.swift"}]},"builtin-global-functions":{"patterns":[{"begin":"\\\\b(type)(\\\\()\\\\s*(of)(:)","beginCaptures":{"1":{"name":"support.function.dynamic-type.swift"},"2":{"name":"punctuation.definition.arguments.begin.swift"},"3":{"name":"support.variable.parameter.swift"},"4":{"name":"punctuation.separator.argument-label.begin.swift"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.arguments.end.swift"}},"patterns":[{"include":"#expressions"}]},{"match":"\\\\ba(?:nyGenerator|utoreleasepool)(?=\\\\s*[({])\\\\b","name":"support.function.swift"},{"match":"\\\\b(?:s(?:tride(?:of(?:Value)?)?|izeof(?:Value)?|equence|wap)|numericCast|transcode|is(?:UniquelyReferenced(?:NonObjC)?|KnownUniquelyReferenced)|zip|d(?:ump|ebugPrint)|unsafe(?:BitCast|Downcast|Unwrap|Address(?:Of)?)|pr(?:int|econdition(?:Failure)?)|fatalError|with(?:Unsafe(?:Mutable|)Pointer|ExtendedLifetime|VaList)|a(?:ssert(?:ionFailure)?|lignof(?:Value)?|bs)|re(?:peatElement|adLine)|getVaList|m(?:in|ax))(?=\\\\s*\\\\()","name":"support.function.swift"},{"match":"\\\\b(?:s(?:ort|uffix|pli(?:ce|t))|insert|overlaps|d(?:istance|rop(?:First|Last))|join|prefix|extend|withUnsafe(?:Mutable|)Pointers|lazy|advance|re(?:flect|move(?:Range|Last|A(?:tIndex|ll))))(?=\\\\s*\\\\()","name":"support.function.swift"}]},"builtin-properties":{"patterns":[{"match":"(?<=(?:^|\\\\W)(?:Process\\\\.|CommandLine\\\\.))(arguments|argc|unsafeArgv)","name":"support.variable.swift"},{"match":"(?<=\\\\.)(?:s(?:t(?:artIndex|ri(?:ngValue|de))|i(?:ze|gn(?:BitIndex|ificand(?:Bit(?:Count|Pattern)|Width)?|alingNaN)?)|u(?:perclassMirror|mmary|bscriptBaseAddress))|h(?:eader|as(?:hValue|PointerRepresentation))|n(?:ulTerminatedUTF8|ext(?:Down|Up)|a(?:n|tiveOwner))|c(?:haracters|ount(?:TrailingZeros)?|ustom(?:Mirror|PlaygroundQuickLook)|apacity)|i(?:s(?:S(?:ign(?:Minus|aling(?:NaN)?)|ubnormal)|N(?:ormal|aN)|Canonical|Infinite|Zero|Empty|Finite|ASCII)|n(?:dices|finity)|dentity)|owner|de(?:|bugDe)scription|u(?:n(?:safelyUnwrapped|icodeScalars?|derestimatedCount)|tf(?:16|8(?:Start|C(?:String|odeUnitCount))?)|intValue|ppercaseString|lp(?:OfOne)?)|p(?:i|ointee)|e(?:ndIndex|lements|xponent(?:Bit(?:Count|Pattern))?)|values?|keys|quietNaN|f(?:irst(?:ElementAddress(?:IfContiguous)?)?|loatingPointClass)|l(?:ittleEndian|owercaseString|eastNo(?:nzero|rmal)Magnitude|a(?:st|zy))|a(?:l(?:ignment|l(?:ocatedElementCount|Zeros))|rray(?:PropertyIsNativeTypeChecked)?)|ra(?:dix|wValue)|greatestFiniteMagnitude|m(?:in|emory|ax)|b(?:yteS(?:ize|wapped)|i(?:nade|tPattern|gEndian)|uffer|ase(?:Address)?))\\\\b","name":"support.variable.swift"},{"match":"(?<=\\\\.)(?:boolValue|disposition|end|objectIdentifier|quickLookObject|start|valueType)\\\\b","name":"support.variable.swift"},{"match":"(?<=\\\\.)(?:s(?:calarValue|i(?:ze|gnalingNaN)|o(?:und|me)|uppressed|prite|et)|n(?:one|egative(?:Subnormal|Normal|Infinity|Zero))|c(?:ol(?:or|lection)|ustomized)|t(?:o(?:NearestOr(?:Even|AwayFromZero)|wardZero)|uple|ext)|i(?:nt|mage)|optional|d(?:ictionary|o(?:uble|wn))|u(?:Int|p|rl)|p(?:o(?:sitive(?:Subnormal|Normal|Infinity|Zero)|int)|lus)|e(?:rror|mptyInput)|view|quietNaN|float|a(?:ttributedString|wayFromZero)|r(?:ectangle|ange)|generated|minus|b(?:ool|ezierPath))\\\\b","name":"support.variable.swift"}]},"builtin-types":{"patterns":[{"include":"#builtin-types-builtin-class-type"},{"include":"#builtin-types-builtin-enum-type"},{"include":"#builtin-types-builtin-protocol-type"},{"include":"#builtin-types-builtin-struct-type"},{"include":"#builtin-types-builtin-typealias"},{"match":"\\\\bAny\\\\b","name":"support.type.any.swift"}]},"builtin-types-builtin-class-type":{"match":"\\\\b(Managed((?:|Proto)Buffer)|NonObjectiveCBase|AnyGenerator)\\\\b","name":"support.class.swift"},"builtin-types-builtin-enum-type":{"patterns":[{"match":"\\\\b(?:CommandLine|Process(?=\\\\.))\\\\b","name":"support.constant.swift"},{"match":"\\\\bNever\\\\b","name":"support.constant.never.swift"},{"match":"\\\\b(?:ImplicitlyUnwrappedOptional|Representation|MemoryLayout|FloatingPointClassification|SetIndexRepresentation|SetIteratorRepresentation|FloatingPointRoundingRule|UnicodeDecodingResult|Optional|DictionaryIndexRepresentation|AncestorRepresentation|DisplayStyle|PlaygroundQuickLook|Never|FloatingPointSign|Bit|DictionaryIteratorRepresentation)\\\\b","name":"support.type.swift"},{"match":"\\\\b(?:MirrorDisposition|QuickLookObject)\\\\b","name":"support.type.swift"}]},"builtin-types-builtin-protocol-type":{"patterns":[{"match":"\\\\bActor\\\\b","name":"support.type.swift"},{"match":"\\\\b(?:Ra(?:n(?:domAccess(?:Collection|Indexable)|geReplaceable(?:Collection|Indexable))|wRepresentable)|M(?:irrorPath|utable(?:Collection|Indexable))|Bi(?:naryFloatingPoint|twiseOperations|directional(?:Collection|Indexable))|S(?:tr(?:ide|eam)able|igned(?:Number|Integer)|e(?:tAlgebra|quence))|Hashable|C(?:o(?:llection|mparable)|ustom(?:Reflecta|StringConverti|DebugStringConverti|PlaygroundQuickLooka|LeafReflecta)ble|VarArg)|TextOutputStream|I(?:n(?:teger(?:Arithmetic)?|dexable(?:Base)?)|teratorProtocol)|OptionSet|Un(?:signedInteger|icodeCodec)|E(?:quatable|rror|xpressibleBy(?:BooleanLiteral|String(?:Interpolation|Literal)|NilLiteral|IntegerLiteral|DictionaryLiteral|UnicodeScalarLiteral|ExtendedGraphemeClusterLiteral|FloatLiteral|ArrayLiteral))|FloatingPoint|L(?:osslessStringConvertible|azy(?:Sequence|Collection)Protocol)|A(?:nyObject|bsoluteValuable))\\\\b","name":"support.type.swift"},{"match":"\\\\b(?:Ran(?:domAccessIndex|geReplaceableCollection)Type|GeneratorType|M(?:irror(?:|Path)Type|utable(?:Sliceable|CollectionType))|B(?:i(?:twiseOperations|directionalIndex)Type|oolean(?:Type|LiteralConvertible))|S(?:tring(?:Interpolation|Literal)Convertible|i(?:nk|gned(?:Numb|Integ)er)Type|e(?:tAlgebra|quence)Type|liceable)|NilLiteralConvertible|C(?:ollection|VarArg)Type|Inte(?:rvalType|ger(?:Type|LiteralConvertible|ArithmeticType))|O(?:utputStream|ptionSet)Type|DictionaryLiteralConvertible|Un(?:signedIntegerType|icode(?:ScalarLiteralConvertible|CodecType))|E(?:rrorType|xten(?:sibleCollectionType|dedGraphemeClusterLiteralConvertible))|F(?:orwardIndexType|loat(?:ingPointType|LiteralConvertible))|A(?:nyCollectionType|rrayLiteralConvertible))\\\\b","name":"support.type.swift"}]},"builtin-types-builtin-struct-type":{"patterns":[{"match":"\\\\b(?:R(?:e(?:peat(?:ed)?|versed(?:RandomAccess(?:Collection|Index)|Collection|Index))|an(?:domAccessSlice|ge(?:Replaceable(?:RandomAccess|Bidirectional|)Slice|Generator)?))|Generator(?:Sequence|OfOne)|M(?:irror|utable(?:Ran(?:domAccess|geReplaceable(?:RandomAccess|Bidirectional|))|Bidirectional|)Slice|anagedBufferPointer)|B(?:idirectionalSlice|ool)|S(?:t(?:aticString|ri(?:ng|deT(?:hrough(?:(?:Gen|It)erator)?|o(?:(?:Gen|It)erator)?)))|et(?:I(?:ndex|terator))?|lice)|HalfOpenInterval|C(?:haracter(?:View)?|o(?:ntiguousArray|untable(?:|Closed)Range|llectionOfOne)|OpaquePointer|losed(?:Range(?:I(?:ndex|terator))?|Interval)|VaListPointer)|I(?:n(?:t(?:16|8|32|64)?|d(?:ices|ex(?:ing(?:Gen|It)erator)?))|terator(?:Sequence|OverOne)?)|Zip2(?:Sequence|Iterator)|O(?:paquePointer|bjectIdentifier)|D(?:ictionary(?:I(?:ndex|terator)|Literal)?|ouble|efault(?:RandomAccess|Bidirectional|)Indices)|U(?:n(?:safe(?:RawPointer|Mutable(?:Raw|Buffer|)Pointer|BufferPointer(?:(?:Gen|It)erator)?|Pointer)|icodeScalar(?:View)?|foldSequence|managed)|TF(?:16(?:View)?|8(?:View)?|32)|Int(?:16|8|32|64)?)|Join(?:Generator|ed(?:Sequence|Iterator))|PermutationGenerator|E(?:numerate(?:Generator|Sequence|d(?:Sequence|Iterator))|mpty(?:Generator|Collection|Iterator))|Fl(?:oat(?:80)?|atten(?:Generator|BidirectionalCollection(?:Index)?|Sequence|Collection(?:Index)?|Iterator))|L(?:egacyChildren|azy(?:RandomAccessCollection|Map(?:RandomAccessCollection|Generator|BidirectionalCollection|Sequence|Collection|Iterator)|BidirectionalCollection|Sequence|Collection|Filter(?:Generator|BidirectionalCollection|Sequence|Collection|I(?:ndex|terator))))|A(?:ny(?:RandomAccessCollection|Generator|BidirectionalCollection|Sequence|Hashable|Collection|I(?:ndex|terator))|utoreleasingUnsafeMutablePointer|rray(?:Slice)?))\\\\b","name":"support.type.swift"},{"match":"\\\\b(?:R(?:everse(?:RandomAccess(?:Collection|Index)|Collection|Index)|awByte)|Map(?:Generator|Sequence|Collection)|S(?:inkOf|etGenerator)|Zip2Generator|DictionaryGenerator|Filter(?:Generator|Sequence|Collection(?:Index)?)|LazyForwardCollection|Any(?:RandomAccessIndex|BidirectionalIndex|Forward(?:Collection|Index)))\\\\b","name":"support.type.swift"}]},"builtin-types-builtin-typealias":{"patterns":[{"match":"\\\\b(?:Raw(?:Significand|Exponent|Value)|B(?:ooleanLiteralType|uffer|ase)|S(?:t(?:orage|r(?:i(?:ngLiteralType|de)|eam[12]))|ubSequence)|NativeBuffer|C(?:hild(?:ren)?|Bool|S(?:hort|ignedChar)|odeUnit|Char(?:16|32)?|Int|Double|Unsigned(?:Short|Char|Int|Long(?:Long)?)|Float|WideChar|Long(?:Long)?)|I(?:n(?:t(?:Max|egerLiteralType)|d(?:ices|ex(?:Distance)?))|terator)|Distance|U(?:n(?:icodeScalar(?:Type|Index|View|LiteralType)|foldFirstSequence)|TF(?:16(?:Index|View)|8Index)|IntMax)|E(?:lements?|x(?:tendedGraphemeCluster(?:|Literal)Type|ponent))|V(?:oid|alue)|Key|Float(?:32|LiteralType|64)|AnyClass)\\\\b","name":"support.type.swift"},{"match":"\\\\b(?:Generator|PlaygroundQuickLook|UWord|Word)\\\\b","name":"support.type.swift"}]},"code-block":{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.scope.begin.swift"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.scope.end.swift"}},"patterns":[{"include":"$self"}]},"comments":{"patterns":[{"captures":{"1":{"name":"punctuation.definition.comment.swift"}},"match":"\\\\A^(#!).*$\\\\n?","name":"comment.line.number-sign.swift"},{"begin":"/\\\\*\\\\*(?!/)","beginCaptures":{"0":{"name":"punctuation.definition.comment.begin.swift"}},"end":"\\\\*/","endCaptures":{"0":{"name":"punctuation.definition.comment.end.swift"}},"name":"comment.block.documentation.swift","patterns":[{"include":"#comments-nested"}]},{"begin":"/\\\\*:","beginCaptures":{"0":{"name":"punctuation.definition.comment.begin.swift"}},"end":"\\\\*/","endCaptures":{"0":{"name":"punctuation.definition.comment.end.swift"}},"name":"comment.block.documentation.playground.swift","patterns":[{"include":"#comments-nested"}]},{"begin":"/\\\\*","beginCaptures":{"0":{"name":"punctuation.definition.comment.begin.swift"}},"end":"\\\\*/","endCaptures":{"0":{"name":"punctuation.definition.comment.end.swift"}},"name":"comment.block.swift","patterns":[{"include":"#comments-nested"}]},{"match":"\\\\*/","name":"invalid.illegal.unexpected-end-of-block-comment.swift"},{"begin":"(^[\\\\t ]+)?(?=//)","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.swift"}},"end":"(?!\\\\G)","patterns":[{"begin":"///","beginCaptures":{"0":{"name":"punctuation.definition.comment.swift"}},"end":"$","name":"comment.line.triple-slash.documentation.swift"},{"begin":"//:","beginCaptures":{"0":{"name":"punctuation.definition.comment.swift"}},"end":"$","name":"comment.line.double-slash.documentation.swift"},{"begin":"//","beginCaptures":{"0":{"name":"punctuation.definition.comment.swift"}},"end":"$","name":"comment.line.double-slash.swift"}]}]},"comments-nested":{"begin":"/\\\\*","end":"\\\\*/","patterns":[{"include":"#comments-nested"}]},"compiler-control":{"patterns":[{"begin":"^\\\\s*(#)(if|elseif)\\\\s+(false)\\\\b.*?(?=$|//|/\\\\*)","beginCaptures":{"0":{"name":"meta.preprocessor.conditional.swift"},"1":{"name":"punctuation.definition.preprocessor.swift"},"2":{"name":"keyword.control.import.preprocessor.conditional.swift"},"3":{"name":"constant.language.boolean.swift"}},"contentName":"comment.block.preprocessor.swift","end":"(?=^\\\\s*(#(e(?:lseif|lse|ndif)))\\\\b)"},{"begin":"^\\\\s*(#)(if|elseif)\\\\s+","captures":{"1":{"name":"punctuation.definition.preprocessor.swift"},"2":{"name":"keyword.control.import.preprocessor.conditional.swift"}},"end":"(?=\\\\s*/[*/])|$","name":"meta.preprocessor.conditional.swift","patterns":[{"match":"(&&|\\\\|\\\\|)","name":"keyword.operator.logical.swift"},{"match":"\\\\b(true|false)\\\\b","name":"constant.language.boolean.swift"},{"captures":{"1":{"name":"keyword.other.condition.swift"},"2":{"name":"punctuation.definition.parameters.begin.swift"},"3":{"name":"support.constant.platform.architecture.swift"},"4":{"name":"punctuation.definition.parameters.end.swift"}},"match":"\\\\b(arch)\\\\s*(\\\\()\\\\s*(?:(arm|arm64|powerpc64|powerpc64le|i386|x86_64|s390x)|\\\\w+)\\\\s*(\\\\))"},{"captures":{"1":{"name":"keyword.other.condition.swift"},"2":{"name":"punctuation.definition.parameters.begin.swift"},"3":{"name":"support.constant.platform.os.swift"},"4":{"name":"punctuation.definition.parameters.end.swift"}},"match":"\\\\b(os)\\\\s*(\\\\()\\\\s*(?:(macOS|OSX|iOS|tvOS|watchOS|visionOS|Android|Linux|FreeBSD|Windows|PS4)|\\\\w+)\\\\s*(\\\\))"},{"captures":{"1":{"name":"keyword.other.condition.swift"},"2":{"name":"punctuation.definition.parameters.begin.swift"},"3":{"name":"entity.name.type.module.swift"},"4":{"name":"punctuation.definition.parameters.end.swift"}},"match":"\\\\b(canImport)\\\\s*(\\\\()([_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*)(\\\\))"},{"begin":"\\\\b(targetEnvironment)\\\\s*(\\\\()","beginCaptures":{"1":{"name":"keyword.other.condition.swift"},"2":{"name":"punctuation.definition.parameters.begin.swift"}},"end":"(\\\\))|$","endCaptures":{"1":{"name":"punctuation.definition.parameters.end.swift"}},"patterns":[{"match":"\\\\b(simulator|UIKitForMac)\\\\b","name":"support.constant.platform.environment.swift"}]},{"begin":"\\\\b(swift|compiler)\\\\s*(\\\\()","beginCaptures":{"1":{"name":"keyword.other.condition.swift"},"2":{"name":"punctuation.definition.parameters.begin.swift"}},"end":"(\\\\))|$","endCaptures":{"1":{"name":"punctuation.definition.parameters.end.swift"}},"patterns":[{"match":">=|<","name":"keyword.operator.comparison.swift"},{"match":"\\\\b[0-9]+(?:\\\\.[0-9]+)*\\\\b","name":"constant.numeric.swift"}]}]},{"captures":{"1":{"name":"punctuation.definition.preprocessor.swift"},"2":{"name":"keyword.control.import.preprocessor.conditional.swift"},"3":{"patterns":[{"match":"\\\\S+","name":"invalid.illegal.character-not-allowed-here.swift"}]}},"match":"^\\\\s*(#)(e(?:lse|ndif))(.*?)(?=$|//|/\\\\*)","name":"meta.preprocessor.conditional.swift"},{"captures":{"1":{"name":"punctuation.definition.preprocessor.swift"},"2":{"name":"keyword.control.import.preprocessor.sourcelocation.swift"},"4":{"name":"punctuation.definition.parameters.begin.swift"},"5":{"patterns":[{"begin":"(file)\\\\s*(:)\\\\s*(?=\\")","beginCaptures":{"1":{"name":"support.variable.parameter.swift"},"2":{"name":"punctuation.separator.key-value.swift"}},"end":"(?!\\\\G)","patterns":[{"include":"#literals"}]},{"captures":{"1":{"name":"support.variable.parameter.swift"},"2":{"name":"punctuation.separator.key-value.swift"},"3":{"name":"constant.numeric.integer.swift"}},"match":"(line)\\\\s*(:)\\\\s*([0-9]+)"},{"match":",","name":"punctuation.separator.parameters.swift"},{"match":"\\\\S+","name":"invalid.illegal.character-not-allowed-here.swift"}]},"6":{"name":"punctuation.definition.parameters.begin.swift"},"7":{"patterns":[{"match":"\\\\S+","name":"invalid.illegal.character-not-allowed-here.swift"}]}},"match":"^\\\\s*(#)(sourceLocation)((\\\\()([^)]*)(\\\\)))(.*?)(?=$|//|/\\\\*)","name":"meta.preprocessor.sourcelocation.swift"}]},"conditionals":{"patterns":[{"begin":"(?<!\\\\.)\\\\b(if|guard|switch|for)\\\\b","beginCaptures":{"1":{"patterns":[{"include":"#keywords"}]}},"end":"(?=\\\\{)","patterns":[{"include":"#expressions-without-trailing-closures"}]},{"begin":"(?<!\\\\.)\\\\b(while)\\\\b","beginCaptures":{"1":{"patterns":[{"include":"#keywords"}]}},"end":"(?=\\\\{)|$","patterns":[{"include":"#expressions-without-trailing-closures"}]}]},"declarations":{"patterns":[{"include":"#declarations-function"},{"include":"#declarations-function-initializer"},{"include":"#declarations-function-subscript"},{"include":"#declarations-typed-variable-declaration"},{"include":"#declarations-import"},{"include":"#declarations-operator"},{"include":"#declarations-precedencegroup"},{"include":"#declarations-protocol"},{"include":"#declarations-type"},{"include":"#declarations-extension"},{"include":"#declarations-typealias"},{"include":"#declarations-macro"}]},"declarations-available-types":{"patterns":[{"include":"#comments"},{"include":"#builtin-types"},{"include":"#attributes"},{"match":"\\\\basync\\\\b","name":"storage.modifier.async.swift"},{"match":"\\\\b(?:|re)throws\\\\b","name":"storage.modifier.exception.swift"},{"match":"\\\\bsome\\\\b","name":"keyword.other.operator.type.opaque.swift"},{"match":"\\\\bany\\\\b","name":"keyword.other.operator.type.existential.swift"},{"match":"\\\\b(?:repeat|each)\\\\b","name":"keyword.control.loop.swift"},{"match":"\\\\b(?:inout|isolated|borrowing|consuming)\\\\b","name":"storage.modifier.swift"},{"match":"\\\\bnonisolated(?:\\\\(nonsending\\\\)|\\\\b)","name":"storage.modifier.swift"},{"match":"\\\\bSelf\\\\b","name":"variable.language.swift"},{"captures":{"1":{"name":"keyword.operator.type.function.swift"}},"match":"(?<![-!%\\\\&*+./<=>^|~])(->)(?![-!%\\\\&*+./<=>^|~])"},{"captures":{"1":{"name":"keyword.operator.type.composition.swift"}},"match":"(?<![-!%\\\\&*+./<=>^|~])(&)(?![-!%\\\\&*+./<=>^|~])"},{"match":"[!?]","name":"keyword.operator.type.optional.swift"},{"match":"\\\\.\\\\.\\\\.","name":"keyword.operator.function.variadic-parameter.swift"},{"match":"\\\\bprotocol\\\\b","name":"keyword.other.type.composition.swift"},{"match":"(?<=\\\\.)(?:Protocol|Type)\\\\b","name":"keyword.other.type.metatype.swift"},{"include":"#declarations-available-types-tuple-type"},{"include":"#declarations-available-types-collection-type"},{"include":"#declarations-generic-argument-clause"}]},"declarations-available-types-collection-type":{"begin":"\\\\[","beginCaptures":{"0":{"name":"punctuation.section.collection-type.begin.swift"}},"end":"]|(?=[)>{}])","endCaptures":{"0":{"name":"punctuation.section.collection-type.end.swift"}},"patterns":[{"include":"#declarations-available-types"},{"include":"#literals-numeric"},{"match":"\\\\b_\\\\b","name":"support.variable.inferred.swift"},{"match":"(?<=\\\\s)\\\\bof\\\\b(?=\\\\s+[(\\\\[_\\\\p{L}\\\\d\\\\p{N}\\\\p{M}])","name":"keyword.other.inline-array.swift"},{"begin":":","beginCaptures":{"0":{"name":"punctuation.separator.key-value.swift"}},"end":"(?=[])>{}])","patterns":[{"match":":","name":"invalid.illegal.extra-colon-in-dictionary-type.swift"},{"include":"#declarations-available-types"}]}]},"declarations-available-types-tuple-type":{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.section.tuple-type.begin.swift"}},"end":"\\\\)|(?=[]>{}])","endCaptures":{"0":{"name":"punctuation.section.tuple-type.end.swift"}},"patterns":[{"include":"#declarations-available-types"}]},"declarations-extension":{"begin":"\\\\b(extension)\\\\s+","beginCaptures":{"1":{"name":"storage.type.$1.swift"}},"end":"(?<=})","name":"meta.definition.type.$1.swift","patterns":[{"begin":"\\\\G(?!\\\\s*[\\\\n:{])","end":"(?=\\\\s*[\\\\n:{])|(?!\\\\G)(?=\\\\s*where\\\\b)","name":"entity.name.type.swift","patterns":[{"include":"#declarations-available-types"}]},{"include":"#comments"},{"include":"#declarations-generic-where-clause"},{"include":"#declarations-inheritance-clause"},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.type.begin.swift"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.type.end.swift"}},"name":"meta.definition.type.body.swift","patterns":[{"include":"$self"}]}]},"declarations-function":{"begin":"\\\\b(func)\\\\s+((?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>)|(?:((?<oph>[-!%\\\\&*+/<-?^|~¡-§©«¬®°±¶»¿×÷‖‗†-‧‰-‾⁁-⁓⁕-⁞←-⏿─-❵➔-⯿⸀-⹿、。〃〈-〰])(\\\\g<oph>|(?<opc>[̀-ͯ᷀-᷿⃐-⃿︀-️︠-︯\\\\x{E0100}-\\\\x{E01EF}]))*)|(\\\\.(\\\\g<oph>|\\\\g<opc>|\\\\.)+)))\\\\s*(?=[(<])","beginCaptures":{"1":{"name":"storage.type.function.swift"},"2":{"name":"entity.name.function.swift"},"3":{"name":"punctuation.definition.identifier.swift"},"4":{"name":"punctuation.definition.identifier.swift"}},"end":"(?<=})|$","name":"meta.definition.function.swift","patterns":[{"include":"#comments"},{"include":"#declarations-generic-parameter-clause"},{"include":"#declarations-parameter-clause"},{"include":"#declarations-function-result"},{"include":"#async-throws"},{"include":"#declarations-generic-where-clause"},{"begin":"(\\\\{)","beginCaptures":{"1":{"name":"punctuation.section.function.begin.swift"}},"end":"(})","endCaptures":{"1":{"name":"punctuation.section.function.end.swift"}},"name":"meta.definition.function.body.swift","patterns":[{"include":"$self"}]}]},"declarations-function-initializer":{"begin":"(?<!\\\\.)\\\\b(init[!?]*)\\\\s*(?=[(<])","beginCaptures":{"1":{"name":"storage.type.function.swift","patterns":[{"match":"(?<=[!?])[!?]+","name":"invalid.illegal.character-not-allowed-here.swift"}]}},"end":"(?<=})|$","name":"meta.definition.function.initializer.swift","patterns":[{"include":"#comments"},{"include":"#declarations-generic-parameter-clause"},{"include":"#declarations-parameter-clause"},{"include":"#async-throws"},{"include":"#declarations-generic-where-clause"},{"begin":"(\\\\{)","beginCaptures":{"1":{"name":"punctuation.section.function.begin.swift"}},"end":"(})","endCaptures":{"1":{"name":"punctuation.section.function.end.swift"}},"name":"meta.definition.function.body.swift","patterns":[{"include":"$self"}]}]},"declarations-function-result":{"begin":"(?<![-!%\\\\&*+./<=>^|~])(->)(?![-!%\\\\&*+./<=>^|~])\\\\s*","beginCaptures":{"1":{"name":"keyword.operator.function-result.swift"}},"end":"(?!\\\\G)(?=\\\\{|\\\\bwhere\\\\b|[;=])|$","name":"meta.function-result.swift","patterns":[{"match":"\\\\bsending\\\\b","name":"storage.modifier.swift"},{"include":"#declarations-available-types"}]},"declarations-function-subscript":{"begin":"(?<!\\\\.)\\\\b(subscript)\\\\s*(?=[(<])","beginCaptures":{"1":{"name":"storage.type.function.swift"}},"end":"(?<=})|$","name":"meta.definition.function.subscript.swift","patterns":[{"include":"#comments"},{"include":"#declarations-generic-parameter-clause"},{"include":"#declarations-parameter-clause"},{"include":"#declarations-function-result"},{"include":"#async-throws"},{"include":"#declarations-generic-where-clause"},{"begin":"(\\\\{)","beginCaptures":{"1":{"name":"punctuation.section.function.begin.swift"}},"end":"(})","endCaptures":{"1":{"name":"punctuation.section.function.end.swift"}},"name":"meta.definition.function.body.swift","patterns":[{"include":"$self"}]}]},"declarations-generic-argument-clause":{"begin":"<","beginCaptures":{"0":{"name":"punctuation.separator.generic-argument-clause.begin.swift"}},"end":">|(?=[]){}])","endCaptures":{"0":{"name":"punctuation.separator.generic-argument-clause.end.swift"}},"name":"meta.generic-argument-clause.swift","patterns":[{"include":"#literals-numeric"},{"include":"#declarations-available-types"}]},"declarations-generic-parameter-clause":{"begin":"<","beginCaptures":{"0":{"name":"punctuation.separator.generic-parameter-clause.begin.swift"}},"end":">|(?=[^\\\\&,:<=>`\\\\w\\\\d\\\\s])","endCaptures":{"0":{"name":"punctuation.separator.generic-parameter-clause.end.swift"}},"name":"meta.generic-parameter-clause.swift","patterns":[{"include":"#comments"},{"include":"#declarations-generic-where-clause"},{"match":"\\\\blet\\\\b","name":"keyword.other.declaration-specifier.swift"},{"match":"\\\\beach\\\\b","name":"keyword.control.loop.swift"},{"captures":{"1":{"name":"variable.language.generic-parameter.swift"}},"match":"\\\\b((?!\\\\d)\\\\w[\\\\w\\\\d]*)\\\\b"},{"match":",","name":"punctuation.separator.generic-parameters.swift"},{"begin":"(:)\\\\s*","beginCaptures":{"1":{"name":"punctuation.separator.generic-parameter-constraint.swift"}},"end":"(?=[,>]|(?!\\\\G)\\\\bwhere\\\\b)","name":"meta.generic-parameter-constraint.swift","patterns":[{"begin":"\\\\G","end":"(?=[,>]|(?!\\\\G)\\\\bwhere\\\\b)","name":"entity.other.inherited-class.swift","patterns":[{"include":"#declarations-type-identifier"},{"include":"#declarations-type-operators"}]}]}]},"declarations-generic-where-clause":{"begin":"\\\\b(where)\\\\b\\\\s*","beginCaptures":{"1":{"name":"keyword.other.generic-constraint-introducer.swift"}},"end":"(?!\\\\G)$|(?=[\\\\n;>{}]|//|/\\\\*)","name":"meta.generic-where-clause.swift","patterns":[{"include":"#comments"},{"include":"#declarations-generic-where-clause-requirement-list"}]},"declarations-generic-where-clause-requirement-list":{"begin":"\\\\G|,\\\\s*","end":"(?=[\\\\n,;>{}]|//|/\\\\*)","patterns":[{"include":"#comments"},{"include":"#constraint"},{"include":"#declarations-available-types"},{"begin":"(?<![-!%\\\\&*+./<=>^|~])(==)(?![-!%\\\\&*+./<=>^|~])","beginCaptures":{"1":{"name":"keyword.operator.generic-constraint.same-type.swift"}},"end":"(?=\\\\s*[\\\\n,;>{}]|//|/\\\\*)","name":"meta.generic-where-clause.same-type-requirement.swift","patterns":[{"include":"#declarations-available-types"}]},{"begin":"(?<![-!%\\\\&*+./<=>^|~])(:)(?![-!%\\\\&*+./<=>^|~])","beginCaptures":{"1":{"name":"keyword.operator.generic-constraint.conforms-to.swift"}},"end":"(?=\\\\s*[\\\\n,;>{}]|//|/\\\\*)","name":"meta.generic-where-clause.conformance-requirement.swift","patterns":[{"begin":"\\\\G\\\\s*","contentName":"entity.other.inherited-class.swift","end":"(?=\\\\s*[\\\\n,;>{}]|//|/\\\\*)","patterns":[{"include":"#declarations-available-types"}]}]}]},"declarations-import":{"begin":"(?<!\\\\.)\\\\b(import)\\\\s+","beginCaptures":{"1":{"name":"keyword.control.import.swift"}},"end":"(;)|$\\\\n?|(?=/[*/])","endCaptures":{"1":{"name":"punctuation.terminator.statement.swift"}},"name":"meta.import.swift","patterns":[{"begin":"\\\\G(?!;|$|//|/\\\\*)(?:(typealias|struct|class|actor|enum|protocol|var|func)\\\\s+)?","beginCaptures":{"1":{"name":"storage.modifier.swift"}},"end":"(?=;|$|//|/\\\\*)","patterns":[{"captures":{"1":{"name":"punctuation.definition.identifier.swift"},"2":{"name":"punctuation.definition.identifier.swift"}},"match":"(?<=\\\\G|\\\\.)(?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>)","name":"entity.name.type.swift"},{"match":"(?<=\\\\G|\\\\.)\\\\$[0-9]+","name":"entity.name.type.swift"},{"captures":{"1":{"patterns":[{"match":"\\\\.","name":"invalid.illegal.dot-not-allowed-here.swift"}]}},"match":"(?<=\\\\G|\\\\.)(?:((?<oph>[-!%\\\\&*+/<-?^|~¡-§©«¬®°±¶»¿×÷‖‗†-‧‰-‾⁁-⁓⁕-⁞←-⏿─-❵➔-⯿⸀-⹿、。〃〈-〰])(\\\\g<oph>|(?<opc>[̀-ͯ᷀-᷿⃐-⃿︀-️︠-︯\\\\x{E0100}-\\\\x{E01EF}]))*)|(\\\\.(\\\\g<oph>|\\\\g<opc>|\\\\.)+))(?=[.;]|$|//|/\\\\*|\\\\s)","name":"entity.name.type.swift"},{"match":"\\\\.","name":"punctuation.separator.import.swift"},{"begin":"(?!\\\\s*(;|$|//|/\\\\*))","end":"(?=\\\\s*(;|$|//|/\\\\*))","name":"invalid.illegal.character-not-allowed-here.swift"}]}]},"declarations-inheritance-clause":{"begin":"(:)(?=\\\\s*\\\\{)|(:)\\\\s*","beginCaptures":{"1":{"name":"invalid.illegal.empty-inheritance-clause.swift"},"2":{"name":"punctuation.separator.inheritance-clause.swift"}},"end":"(?!\\\\G)$|(?=[={}]|(?!\\\\G)\\\\bwhere\\\\b)","name":"meta.inheritance-clause.swift","patterns":[{"begin":"\\\\bclass\\\\b","beginCaptures":{"0":{"name":"storage.type.class.swift"}},"end":"(?=[={}]|(?!\\\\G)\\\\bwhere\\\\b)","patterns":[{"include":"#comments"},{"include":"#declarations-inheritance-clause-more-types"}]},{"begin":"\\\\G","end":"(?!\\\\G)$|(?=[={}]|(?!\\\\G)\\\\bwhere\\\\b)","patterns":[{"include":"#attributes"},{"include":"#comments"},{"include":"#declarations-inheritance-clause-inherited-type"},{"include":"#declarations-inheritance-clause-more-types"},{"include":"#declarations-type-operators"}]}]},"declarations-inheritance-clause-inherited-type":{"begin":"(?=[_`\\\\p{L}])","end":"(?!\\\\G)","name":"entity.other.inherited-class.swift","patterns":[{"include":"#declarations-type-identifier"}]},"declarations-inheritance-clause-more-types":{"begin":",\\\\s*","end":"(?!\\\\G)(?!/[*/])|(?=[,={}]|(?!\\\\G)\\\\bwhere\\\\b)","name":"meta.inheritance-list.more-types","patterns":[{"include":"#attributes"},{"include":"#comments"},{"include":"#declarations-inheritance-clause-inherited-type"},{"include":"#declarations-inheritance-clause-more-types"},{"include":"#declarations-type-operators"}]},"declarations-macro":{"begin":"\\\\b(macro)\\\\s+((?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>))\\\\s*(?=[(<=])","beginCaptures":{"1":{"name":"storage.type.function.swift"},"2":{"name":"entity.name.function.swift"},"3":{"name":"punctuation.definition.identifier.swift"},"4":{"name":"punctuation.definition.identifier.swift"}},"end":"$|(?=;|//|/\\\\*|[=}])","name":"meta.definition.macro.swift","patterns":[{"include":"#comments"},{"include":"#declarations-generic-parameter-clause"},{"include":"#declarations-parameter-clause"},{"include":"#declarations-function-result"},{"include":"#async-throws"},{"include":"#declarations-generic-where-clause"}]},"declarations-operator":{"begin":"(?:\\\\b((?:pre|in|post)fix)\\\\s+)?\\\\b(operator)\\\\s+(((?<oph>[-!%\\\\&*+/<-?^|~¡-§©«¬®°±¶»¿×÷‖‗†-‧‰-‾⁁-⁓⁕-⁞←-⏿─-❵➔-⯿⸀-⹿、。〃〈-〰])(\\\\g<oph>|\\\\.|(?<opc>[̀-ͯ᷀-᷿⃐-⃿︀-️︠-︯\\\\x{E0100}-\\\\x{E01EF}]))*+)|(\\\\.(\\\\g<oph>|\\\\g<opc>|\\\\.)++))\\\\s*","beginCaptures":{"1":{"name":"storage.modifier.swift"},"2":{"name":"storage.type.function.operator.swift"},"3":{"name":"entity.name.function.operator.swift"},"4":{"name":"entity.name.function.operator.swift","patterns":[{"match":"\\\\.","name":"invalid.illegal.dot-not-allowed-here.swift"}]}},"end":"(;)|$\\\\n?|(?=/[*/])","endCaptures":{"1":{"name":"punctuation.terminator.statement.swift"}},"name":"meta.definition.operator.swift","patterns":[{"include":"#declarations-operator-swift2"},{"include":"#declarations-operator-swift3"},{"match":"((?!$|;|//|/\\\\*)\\\\S)+","name":"invalid.illegal.character-not-allowed-here.swift"}]},"declarations-operator-swift2":{"begin":"\\\\G(\\\\{)","beginCaptures":{"1":{"name":"punctuation.definition.operator.begin.swift"}},"end":"(})","endCaptures":{"1":{"name":"punctuation.definition.operator.end.swift"}},"patterns":[{"include":"#comments"},{"captures":{"1":{"name":"storage.modifier.swift"},"2":{"name":"keyword.other.operator.associativity.swift"}},"match":"\\\\b(associativity)\\\\s+(left|right)\\\\b"},{"captures":{"1":{"name":"storage.modifier.swift"},"2":{"name":"constant.numeric.integer.swift"}},"match":"\\\\b(precedence)\\\\s+([0-9]+)\\\\b"},{"captures":{"1":{"name":"storage.modifier.swift"}},"match":"\\\\b(assignment)\\\\b"}]},"declarations-operator-swift3":{"captures":{"2":{"name":"entity.other.inherited-class.swift","patterns":[{"include":"#declarations-types-precedencegroup"}]},"3":{"name":"punctuation.definition.identifier.swift"},"4":{"name":"punctuation.definition.identifier.swift"}},"match":"\\\\G(:)\\\\s*((?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>))"},"declarations-parameter-clause":{"begin":"(\\\\()","beginCaptures":{"1":{"name":"punctuation.definition.parameters.begin.swift"}},"end":"(\\\\))(?:\\\\s*(async)\\\\b)?","endCaptures":{"1":{"name":"punctuation.definition.parameters.end.swift"},"2":{"name":"storage.modifier.async.swift"}},"name":"meta.parameter-clause.swift","patterns":[{"include":"#declarations-parameter-list"}]},"declarations-parameter-list":{"patterns":[{"captures":{"1":{"name":"entity.name.function.swift"},"2":{"name":"punctuation.definition.identifier.swift"},"3":{"name":"punctuation.definition.identifier.swift"},"4":{"name":"variable.parameter.function.swift"},"5":{"name":"punctuation.definition.identifier.swift"},"6":{"name":"punctuation.definition.identifier.swift"}},"match":"((?<q1>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q1>))\\\\s+((?<q2>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q2>))(?=\\\\s*:)"},{"captures":{"1":{"name":"variable.parameter.function.swift"},"2":{"name":"entity.name.function.swift"},"3":{"name":"punctuation.definition.identifier.swift"},"4":{"name":"punctuation.definition.identifier.swift"}},"match":"(((?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>)))(?=\\\\s*:)"},{"begin":":\\\\s*(?!\\\\s)","end":"(?=[),])","patterns":[{"match":"\\\\bsending\\\\b","name":"storage.modifier.swift"},{"include":"#declarations-available-types"},{"match":":","name":"invalid.illegal.extra-colon-in-parameter-list.swift"},{"begin":"=","beginCaptures":{"0":{"name":"keyword.operator.assignment.swift"}},"end":"(?=[),])","patterns":[{"include":"#expressions"}]}]}]},"declarations-precedencegroup":{"begin":"\\\\b(precedencegroup)\\\\s+((?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>))\\\\s*(?=\\\\{)","beginCaptures":{"1":{"name":"storage.type.precedencegroup.swift"},"2":{"name":"entity.name.type.precedencegroup.swift"},"3":{"name":"punctuation.definition.identifier.swift"},"4":{"name":"punctuation.definition.identifier.swift"}},"end":"(?!\\\\G)","name":"meta.definition.precedencegroup.swift","patterns":[{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.precedencegroup.begin.swift"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.precedencegroup.end.swift"}},"patterns":[{"include":"#comments"},{"captures":{"1":{"name":"storage.modifier.swift"},"2":{"name":"entity.other.inherited-class.swift","patterns":[{"include":"#declarations-types-precedencegroup"}]},"3":{"name":"punctuation.definition.identifier.swift"},"4":{"name":"punctuation.definition.identifier.swift"}},"match":"\\\\b((?:high|low)erThan)\\\\s*:\\\\s*((?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>))"},{"captures":{"1":{"name":"storage.modifier.swift"},"2":{"name":"keyword.other.operator.associativity.swift"}},"match":"\\\\b(associativity)\\\\b(?:\\\\s*:\\\\s*(right|left|none)\\\\b)?"},{"captures":{"1":{"name":"storage.modifier.swift"},"2":{"name":"constant.language.boolean.swift"}},"match":"\\\\b(assignment)\\\\b(?:\\\\s*:\\\\s*(true|false)\\\\b)?"}]}]},"declarations-protocol":{"begin":"\\\\b(protocol)\\\\s+((?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>))","beginCaptures":{"1":{"name":"storage.type.$1.swift"},"2":{"name":"entity.name.type.$1.swift"},"3":{"name":"punctuation.definition.identifier.swift"},"4":{"name":"punctuation.definition.identifier.swift"}},"end":"(?<=})","name":"meta.definition.type.protocol.swift","patterns":[{"include":"#comments"},{"include":"#declarations-inheritance-clause"},{"include":"#declarations-generic-where-clause"},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.type.begin.swift"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.type.end.swift"}},"name":"meta.definition.type.body.swift","patterns":[{"include":"#declarations-protocol-protocol-method"},{"include":"#declarations-protocol-protocol-initializer"},{"include":"#declarations-protocol-associated-type"},{"include":"$self"}]}]},"declarations-protocol-associated-type":{"begin":"\\\\b(associatedtype)\\\\s+((?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>))\\\\s*","beginCaptures":{"1":{"name":"keyword.other.declaration-specifier.swift"},"2":{"name":"variable.language.associatedtype.swift"},"3":{"name":"punctuation.definition.identifier.swift"},"4":{"name":"punctuation.definition.identifier.swift"}},"end":"(?!\\\\G)$|(?=[;}]|$)","name":"meta.definition.associatedtype.swift","patterns":[{"include":"#declarations-inheritance-clause"},{"include":"#declarations-generic-where-clause"},{"include":"#declarations-typealias-assignment"}]},"declarations-protocol-protocol-initializer":{"begin":"(?<!\\\\.)\\\\b(init[!?]*)\\\\s*(?=[(<])","beginCaptures":{"1":{"name":"storage.type.function.swift","patterns":[{"match":"(?<=[!?])[!?]+","name":"invalid.illegal.character-not-allowed-here.swift"}]}},"end":"$|(?=;|//|/\\\\*|})","name":"meta.definition.function.initializer.swift","patterns":[{"include":"#comments"},{"include":"#declarations-generic-parameter-clause"},{"include":"#declarations-parameter-clause"},{"include":"#async-throws"},{"include":"#declarations-generic-where-clause"},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.function.begin.swift"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.function.end.swift"}},"name":"invalid.illegal.function-body-not-allowed-in-protocol.swift","patterns":[{"include":"$self"}]}]},"declarations-protocol-protocol-method":{"begin":"\\\\b(func)\\\\s+((?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>)|(?:((?<oph>[-!%\\\\&*+/<-?^|~¡-§©«¬®°±¶»¿×÷‖‗†-‧‰-‾⁁-⁓⁕-⁞←-⏿─-❵➔-⯿⸀-⹿、。〃〈-〰])(\\\\g<oph>|(?<opc>[̀-ͯ᷀-᷿⃐-⃿︀-️︠-︯\\\\x{E0100}-\\\\x{E01EF}]))*)|(\\\\.(\\\\g<oph>|\\\\g<opc>|\\\\.)+)))\\\\s*(?=[(<])","beginCaptures":{"1":{"name":"storage.type.function.swift"},"2":{"name":"entity.name.function.swift"},"3":{"name":"punctuation.definition.identifier.swift"},"4":{"name":"punctuation.definition.identifier.swift"}},"end":"$|(?=;|//|/\\\\*|})","name":"meta.definition.function.swift","patterns":[{"include":"#comments"},{"include":"#declarations-generic-parameter-clause"},{"include":"#declarations-parameter-clause"},{"include":"#declarations-function-result"},{"include":"#async-throws"},{"include":"#declarations-generic-where-clause"},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.function.begin.swift"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.function.end.swift"}},"name":"invalid.illegal.function-body-not-allowed-in-protocol.swift","patterns":[{"include":"$self"}]}]},"declarations-type":{"patterns":[{"begin":"\\\\b(class(?!\\\\s+(?:func|var|let)\\\\b)|struct|actor)\\\\b\\\\s*((?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>))","beginCaptures":{"1":{"name":"storage.type.$1.swift"},"2":{"name":"entity.name.type.$1.swift"},"3":{"name":"punctuation.definition.identifier.swift"},"4":{"name":"punctuation.definition.identifier.swift"}},"end":"(?<=})","name":"meta.definition.type.$1.swift","patterns":[{"include":"#comments"},{"include":"#declarations-generic-parameter-clause"},{"include":"#declarations-generic-where-clause"},{"include":"#declarations-inheritance-clause"},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.type.begin.swift"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.type.end.swift"}},"name":"meta.definition.type.body.swift","patterns":[{"include":"$self"}]}]},{"include":"#declarations-type-enum"}]},"declarations-type-enum":{"begin":"\\\\b(enum)\\\\s+((?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>))","beginCaptures":{"1":{"name":"storage.type.$1.swift"},"2":{"name":"entity.name.type.$1.swift"},"3":{"name":"punctuation.definition.identifier.swift"},"4":{"name":"punctuation.definition.identifier.swift"}},"end":"(?<=})","name":"meta.definition.type.$1.swift","patterns":[{"include":"#comments"},{"include":"#declarations-generic-parameter-clause"},{"include":"#declarations-generic-where-clause"},{"include":"#declarations-inheritance-clause"},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.type.begin.swift"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.type.end.swift"}},"name":"meta.definition.type.body.swift","patterns":[{"include":"#declarations-type-enum-enum-case-clause"},{"include":"$self"}]}]},"declarations-type-enum-associated-values":{"begin":"\\\\G\\\\(","beginCaptures":{"0":{"name":"punctuation.definition.parameters.begin.swift"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.parameters.end.swift"}},"patterns":[{"include":"#comments"},{"begin":"(?:(_)|((?<q1>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*\\\\k<q1>))\\\\s+(((?<q2>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*\\\\k<q2>))\\\\s*(:)","beginCaptures":{"1":{"name":"entity.name.function.swift"},"2":{"name":"invalid.illegal.distinct-labels-not-allowed.swift"},"5":{"name":"variable.parameter.function.swift"},"7":{"name":"punctuation.separator.argument-label.swift"}},"end":"(?=[]),])","patterns":[{"include":"#declarations-available-types"}]},{"begin":"(((?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*\\\\k<q>))\\\\s*(:)","beginCaptures":{"1":{"name":"entity.name.function.swift"},"2":{"name":"variable.parameter.function.swift"},"4":{"name":"punctuation.separator.argument-label.swift"}},"end":"(?=[]),])","patterns":[{"include":"#declarations-available-types"}]},{"begin":"(?![]),])(?=\\\\S)","end":"(?=[]),])","patterns":[{"include":"#declarations-available-types"},{"match":":","name":"invalid.illegal.extra-colon-in-parameter-list.swift"}]}]},"declarations-type-enum-enum-case":{"begin":"((?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>))\\\\s*","beginCaptures":{"1":{"name":"variable.other.enummember.swift"}},"end":"(?<=\\\\))|(?![(=])","patterns":[{"include":"#comments"},{"include":"#declarations-type-enum-associated-values"},{"include":"#declarations-type-enum-raw-value-assignment"}]},"declarations-type-enum-enum-case-clause":{"begin":"\\\\b(case)\\\\b\\\\s*","beginCaptures":{"1":{"name":"storage.type.enum.case.swift"}},"end":"(?=[;}])|(?!\\\\G)(?!/[*/])(?=[^,\\\\s])","patterns":[{"include":"#comments"},{"include":"#declarations-type-enum-enum-case"},{"include":"#declarations-type-enum-more-cases"}]},"declarations-type-enum-more-cases":{"begin":",\\\\s*","end":"(?!\\\\G)(?!/[*/])(?=[;}[^,\\\\s]])","name":"meta.enum-case.more-cases","patterns":[{"include":"#comments"},{"include":"#declarations-type-enum-enum-case"},{"include":"#declarations-type-enum-more-cases"}]},"declarations-type-enum-raw-value-assignment":{"begin":"(=)\\\\s*","beginCaptures":{"1":{"name":"keyword.operator.assignment.swift"}},"end":"(?!\\\\G)","patterns":[{"include":"#comments"},{"include":"#literals"}]},"declarations-type-identifier":{"begin":"((?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>))\\\\s*","beginCaptures":{"1":{"name":"meta.type-name.swift","patterns":[{"include":"#builtin-types"}]},"2":{"name":"punctuation.definition.identifier.swift"},"3":{"name":"punctuation.definition.identifier.swift"}},"end":"(?!<)","patterns":[{"begin":"(?=<)","end":"(?!\\\\G)","patterns":[{"include":"#declarations-generic-argument-clause"}]}]},"declarations-type-operators":{"patterns":[{"captures":{"1":{"name":"keyword.operator.type.composition.swift"}},"match":"(?<![-!%\\\\&*+./<=>^|~])(&)(?![-!%\\\\&*+./<=>^|~])"},{"captures":{"1":{"name":"keyword.operator.type.requirement-suppression.swift"}},"match":"(?<![-!%\\\\&*+./<=>^|~])(~)(?![-!%\\\\&*+./<=>^|~])"}]},"declarations-typealias":{"begin":"\\\\b(typealias)\\\\s+((?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>))\\\\s*","beginCaptures":{"1":{"name":"keyword.other.declaration-specifier.swift"},"2":{"name":"entity.name.type.typealias.swift"},"3":{"name":"punctuation.definition.identifier.swift"},"4":{"name":"punctuation.definition.identifier.swift"}},"end":"(?!\\\\G)$|(?=;|//|/\\\\*|$)","name":"meta.definition.typealias.swift","patterns":[{"begin":"\\\\G(?=<)","end":"(?!\\\\G)","patterns":[{"include":"#declarations-generic-parameter-clause"}]},{"include":"#declarations-typealias-assignment"}]},"declarations-typealias-assignment":{"begin":"(=)\\\\s*","beginCaptures":{"1":{"name":"keyword.operator.assignment.swift"}},"end":"(?!\\\\G)$|(?=;|//|/\\\\*|$)","patterns":[{"include":"#declarations-available-types"}]},"declarations-typed-variable-declaration":{"begin":"\\\\b(?:(async)\\\\s+)?(let|var)\\\\b\\\\s+(?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>)\\\\s*:","beginCaptures":{"1":{"name":"storage.modifier.async.swift"},"2":{"name":"keyword.other.declaration-specifier.swift"}},"end":"(?=$|[={])","patterns":[{"include":"#declarations-available-types"}]},"declarations-types-precedencegroup":{"patterns":[{"match":"\\\\b(?:BitwiseShift|Assignment|RangeFormation|Casting|Addition|NilCoalescing|Comparison|LogicalConjunction|LogicalDisjunction|Default|Ternary|Multiplication|FunctionArrow)Precedence\\\\b","name":"support.type.swift"}]},"expressions":{"patterns":[{"include":"#expressions-without-trailing-closures-or-member-references"},{"include":"#expressions-trailing-closure"},{"include":"#member-reference"}]},"expressions-trailing-closure":{"patterns":[{"captures":{"1":{"name":"support.function.any-method.swift"},"2":{"name":"punctuation.definition.identifier.swift"},"3":{"name":"punctuation.definition.identifier.swift"}},"match":"(#?(?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>))(?=\\\\s*\\\\{)","name":"meta.function-call.trailing-closure-only.swift"},{"captures":{"1":{"name":"support.function.any-method.trailing-closure-label.swift"},"2":{"name":"punctuation.definition.identifier.swift"},"3":{"name":"punctuation.definition.identifier.swift"},"4":{"name":"punctuation.separator.argument-label.swift"}},"match":"((?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>))\\\\s*(:)(?=\\\\s*\\\\{)"}]},"expressions-without-trailing-closures":{"patterns":[{"include":"#expressions-without-trailing-closures-or-member-references"},{"include":"#member-references"}]},"expressions-without-trailing-closures-or-member-references":{"patterns":[{"include":"#comments"},{"include":"#code-block"},{"include":"#attributes"},{"include":"#expressions-without-trailing-closures-or-member-references-closure-parameter"},{"include":"#literals"},{"include":"#operators"},{"include":"#builtin-types"},{"include":"#builtin-functions"},{"include":"#builtin-global-functions"},{"include":"#builtin-properties"},{"include":"#expressions-without-trailing-closures-or-member-references-compound-name"},{"include":"#conditionals"},{"include":"#keywords"},{"include":"#expressions-without-trailing-closures-or-member-references-availability-condition"},{"include":"#expressions-without-trailing-closures-or-member-references-function-or-macro-call-expression"},{"include":"#expressions-without-trailing-closures-or-member-references-macro-expansion"},{"include":"#expressions-without-trailing-closures-or-member-references-subscript-expression"},{"include":"#expressions-without-trailing-closures-or-member-references-parenthesized-expression"},{"match":"\\\\b_\\\\b","name":"support.variable.discard-value.swift"}]},"expressions-without-trailing-closures-or-member-references-availability-condition":{"begin":"\\\\B(#(?:un)?available)(\\\\()","beginCaptures":{"1":{"name":"support.function.availability-condition.swift"},"2":{"name":"punctuation.definition.arguments.begin.swift"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.arguments.end.swift"}},"patterns":[{"captures":{"1":{"name":"keyword.other.platform.os.swift"},"2":{"name":"constant.numeric.swift"}},"match":"\\\\s*\\\\b((?:iOS|macOS|OSX|watchOS|tvOS|visionOS|UIKitForMac)(?:ApplicationExtension)?)\\\\b\\\\s+([0-9]+(?:\\\\.[0-9]+)*)\\\\b"},{"captures":{"1":{"name":"keyword.other.platform.all.swift"},"2":{"name":"invalid.illegal.character-not-allowed-here.swift"}},"match":"(\\\\*)\\\\s*(.*?)(?=[),])"},{"match":"[^),\\\\s]+","name":"invalid.illegal.character-not-allowed-here.swift"}]},"expressions-without-trailing-closures-or-member-references-closure-parameter":{"match":"\\\\$[0-9]+","name":"variable.language.closure-parameter.swift"},"expressions-without-trailing-closures-or-member-references-compound-name":{"captures":{"1":{"name":"entity.name.function.compound-name.swift"},"2":{"name":"punctuation.definition.entity.swift"},"3":{"name":"punctuation.definition.entity.swift"},"4":{"patterns":[{"captures":{"1":{"name":"punctuation.definition.entity.swift"},"2":{"name":"punctuation.definition.entity.swift"}},"match":"(?<q>`?)(?!_:)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>):","name":"entity.name.function.compound-name.swift"}]}},"match":"((?<q1>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q1>))\\\\(((((?<q2>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q2>)):)+)\\\\)"},"expressions-without-trailing-closures-or-member-references-expression-element-list":{"patterns":[{"include":"#comments"},{"begin":"((?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>))\\\\s*(:)","beginCaptures":{"1":{"name":"support.function.any-method.swift"},"2":{"name":"punctuation.definition.identifier.swift"},"3":{"name":"punctuation.definition.identifier.swift"},"4":{"name":"punctuation.separator.argument-label.swift"}},"end":"(?=[]),])","patterns":[{"include":"#expressions"}]},{"begin":"(?![]),])(?=\\\\S)","end":"(?=[]),])","patterns":[{"include":"#expressions"}]}]},"expressions-without-trailing-closures-or-member-references-function-or-macro-call-expression":{"patterns":[{"begin":"(#?(?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>))\\\\s*(\\\\()","beginCaptures":{"1":{"name":"support.function.any-method.swift"},"2":{"name":"punctuation.definition.identifier.swift"},"3":{"name":"punctuation.definition.identifier.swift"},"4":{"name":"punctuation.definition.arguments.begin.swift"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.arguments.end.swift"}},"name":"meta.function-call.swift","patterns":[{"include":"#expressions-without-trailing-closures-or-member-references-expression-element-list"}]},{"begin":"(?<=[])>_`}\\\\p{L}\\\\p{N}\\\\p{M}])\\\\s*(\\\\()","beginCaptures":{"1":{"name":"punctuation.definition.arguments.begin.swift"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.arguments.end.swift"}},"name":"meta.function-call.swift","patterns":[{"include":"#expressions-without-trailing-closures-or-member-references-expression-element-list"}]}]},"expressions-without-trailing-closures-or-member-references-macro-expansion":{"match":"(#(?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>))","name":"support.function.any-method.swift"},"expressions-without-trailing-closures-or-member-references-parenthesized-expression":{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.section.tuple.begin.swift"}},"end":"(\\\\))\\\\s*((?:\\\\b(?:async|throws|rethrows)\\\\s)*)","endCaptures":{"1":{"name":"punctuation.section.tuple.end.swift"},"2":{"patterns":[{"match":"\\\\brethrows\\\\b","name":"invalid.illegal.rethrows-only-allowed-on-function-declarations.swift"},{"include":"#async-throws"}]}},"patterns":[{"include":"#expressions-without-trailing-closures-or-member-references-expression-element-list"}]},"expressions-without-trailing-closures-or-member-references-subscript-expression":{"begin":"(?<=[_`\\\\p{L}\\\\p{N}\\\\p{M}])\\\\s*(\\\\[)","beginCaptures":{"1":{"name":"punctuation.definition.arguments.begin.swift"}},"end":"]","endCaptures":{"0":{"name":"punctuation.definition.arguments.end.swift"}},"name":"meta.subscript-expression.swift","patterns":[{"include":"#expressions-without-trailing-closures-or-member-references-expression-element-list"}]},"keywords":{"patterns":[{"match":"(?<!\\\\.)\\\\b(?:if|else|guard|where|switch|case|default|fallthrough)\\\\b","name":"keyword.control.branch.swift"},{"match":"(?<!\\\\.)\\\\b(?:continue|break|fallthrough|return|yield)\\\\b","name":"keyword.control.transfer.swift"},{"match":"(?<!\\\\.)\\\\b(?:while|for|in|each)\\\\b","name":"keyword.control.loop.swift"},{"match":"(?<=\\\\s)\\\\bof\\\\b(?=\\\\s+[(\\\\[_\\\\p{L}\\\\d\\\\p{N}\\\\p{M}])","name":"keyword.other.inline-array.swift"},{"match":"\\\\bany\\\\b(?=\\\\s*`?[_\\\\p{L}])","name":"keyword.other.operator.type.existential.swift"},{"captures":{"1":{"name":"keyword.control.loop.swift"},"2":{"name":"punctuation.whitespace.trailing.repeat.swift"}},"match":"(?<!\\\\.)\\\\b(repeat)\\\\b(\\\\s*)"},{"match":"(?<!\\\\.)\\\\bdefer\\\\b","name":"keyword.control.defer.swift"},{"captures":{"1":{"name":"invalid.illegal.try-must-precede-await.swift"},"2":{"name":"keyword.control.await.swift"}},"match":"(?<!\\\\.)\\\\b(?:(await\\\\s+try)|(await))\\\\b"},{"match":"(?<!\\\\.)\\\\b(?:catch|throw|try)\\\\b|\\\\btry[!?]\\\\B","name":"keyword.control.exception.swift"},{"match":"(?<!\\\\.)\\\\b(?:|re)throws\\\\b","name":"storage.modifier.exception.swift"},{"captures":{"1":{"name":"keyword.control.exception.swift"},"2":{"name":"punctuation.whitespace.trailing.do.swift"}},"match":"(?<!\\\\.)\\\\b(do)\\\\b(\\\\s*)"},{"captures":{"1":{"name":"storage.modifier.async.swift"},"2":{"name":"keyword.other.declaration-specifier.swift"}},"match":"(?<!\\\\.)\\\\b(?:(async)\\\\s+)?(let|var)\\\\b"},{"match":"(?<!\\\\.)\\\\b(?:associatedtype|operator|typealias)\\\\b","name":"keyword.other.declaration-specifier.swift"},{"match":"(?<!\\\\.)\\\\b(class|enum|extension|precedencegroup|protocol|struct|actor)\\\\b(?=\\\\s*`?[_\\\\p{L}])","name":"storage.type.$1.swift"},{"match":"(?<!\\\\.)\\\\b(?:inout|static|final|lazy|mutating|nonmutating|optional|indirect|required|override|dynamic|convenience|infix|prefix|postfix|distributed|borrowing|consuming)\\\\b","name":"storage.modifier.swift"},{"match":"(?<!\\\\.)\\\\bnonisolated(?:\\\\(nonsending\\\\)|\\\\b)","name":"storage.modifier.swift"},{"match":"\\\\binit[!?]|\\\\binit\\\\b|(?<!\\\\.)\\\\b(?:func|deinit|subscript|didSet|set|willSet|yielding\\\\s+borrow|yielding\\\\s+mutate)\\\\b","name":"storage.type.function.swift"},{"captures":{"1":{"name":"storage.type.function.swift"},"2":{"name":"invalid.illegal.async-must-precede-throws.swift"},"3":{"name":"storage.modifier.async.swift"},"4":{"name":"storage.modifier.exception.swift"}},"match":"\\\\b(get)(?:\\\\s+(throws\\\\s+async)|\\\\s+(async)(?:\\\\s+(throws))?)?\\\\b"},{"match":"(?<!\\\\.)\\\\b(?:fileprivate|private|internal|public|open|package)\\\\b","name":"keyword.other.declaration-specifier.accessibility.swift"},{"match":"(?<!\\\\.)\\\\bunowned\\\\((?:|un)safe\\\\)|(?<!\\\\.)\\\\b(?:weak|unowned)\\\\b","name":"keyword.other.capture-specifier.swift"},{"captures":{"1":{"name":"keyword.other.type.swift"},"2":{"name":"keyword.other.type.metatype.swift"}},"match":"(?<=\\\\.)(?:(dynamicType|self)|(Protocol|Type))\\\\b"},{"match":"(?<!\\\\.)\\\\b(?:super|self|Self)\\\\b","name":"variable.language.swift"},{"match":"(?:\\\\B#(?:file|filePath|fileID|line|column|function|dsohandle|isolation)|\\\\b__(?:FILE|LINE|COLUMN|FUNCTION|DSO_HANDLE)__)\\\\b","name":"support.variable.swift"},{"match":"(?<!\\\\.)\\\\bimport\\\\b","name":"keyword.control.import.swift"},{"match":"(?<!\\\\.)\\\\bconsume(?=\\\\s+`?[_\\\\p{L}])","name":"keyword.control.consume.swift"},{"match":"(?<!\\\\.)\\\\bcopy(?=\\\\s+`?[_\\\\p{L}])","name":"keyword.control.copy.swift"}]},"literals":{"patterns":[{"include":"#literals-boolean"},{"include":"#literals-numeric"},{"include":"#literals-string"},{"match":"\\\\bnil\\\\b","name":"constant.language.nil.swift"},{"match":"\\\\B#((?:color|image|file)Literal)\\\\b","name":"support.function.object-literal.swift"},{"match":"\\\\B#externalMacro\\\\b","name":"support.function.builtin-macro.swift"},{"match":"\\\\B#keyPath\\\\b","name":"support.function.key-path.swift"},{"begin":"\\\\B(#selector)(\\\\()(?:\\\\s*([gs]etter)\\\\s*(:))?","beginCaptures":{"1":{"name":"support.function.selector-reference.swift"},"2":{"name":"punctuation.definition.arguments.begin.swift"},"3":{"name":"support.variable.parameter.swift"},"4":{"name":"punctuation.separator.argument-label.swift"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.arguments.end.swift"}},"patterns":[{"include":"#expressions"}]},{"include":"#literals-regular-expression-literal"}]},"literals-boolean":{"match":"\\\\b(true|false)\\\\b","name":"constant.language.boolean.swift"},"literals-numeric":{"patterns":[{"match":"(\\\\B-|\\\\b)(?<![]()\\\\[_{}\\\\p{L}\\\\p{N}\\\\p{M}]\\\\.)[0-9][0-9_]*(?=\\\\.[0-9]|[Ee])(?:\\\\.[0-9][0-9_]*)?(?:[Ee][-+]?[0-9][0-9_]*)?\\\\b(?!\\\\.[0-9])","name":"constant.numeric.float.decimal.swift"},{"match":"(\\\\B-|\\\\b)(?<![]()\\\\[_{}\\\\p{L}\\\\p{N}\\\\p{M}]\\\\.)(0x\\\\h[_\\\\h]*)(?:\\\\.\\\\h[_\\\\h]*)?[Pp][-+]?[0-9][0-9_]*\\\\b(?!\\\\.[0-9])","name":"constant.numeric.float.hexadecimal.swift"},{"match":"(\\\\B-|\\\\b)(?<![]()\\\\[_{}\\\\p{L}\\\\p{N}\\\\p{M}]\\\\.)(0x\\\\h[_\\\\h]*)(?:\\\\.\\\\h[_\\\\h]*)?[Pp][-+]?\\\\w*\\\\b(?!\\\\.[0-9])","name":"invalid.illegal.numeric.float.invalid-exponent.swift"},{"match":"(\\\\B-|\\\\b)(?<![]()\\\\[_{}\\\\p{L}\\\\p{N}\\\\p{M}]\\\\.)(0x\\\\h[_\\\\h]*)\\\\.[0-9][.\\\\w]*","name":"invalid.illegal.numeric.float.missing-exponent.swift"},{"match":"(?<=\\\\s|^)-?\\\\.[0-9][.\\\\w]*","name":"invalid.illegal.numeric.float.missing-leading-zero.swift"},{"match":"(\\\\B-|\\\\b)0[box]_[_\\\\h]*(?:[EPep][-+]?\\\\w+)?[.\\\\w]+","name":"invalid.illegal.numeric.leading-underscore.swift"},{"match":"(?<=[]()\\\\[_{}\\\\p{L}\\\\p{N}\\\\p{M}]\\\\.)[0-9]+\\\\b"},{"match":"(\\\\B-|\\\\b)(?<![]()\\\\[_{}\\\\p{L}\\\\p{N}\\\\p{M}]\\\\.)0b[01][01_]*\\\\b(?!\\\\.[0-9])","name":"constant.numeric.integer.binary.swift"},{"match":"(\\\\B-|\\\\b)(?<![]()\\\\[_{}\\\\p{L}\\\\p{N}\\\\p{M}]\\\\.)0o[0-7][0-7_]*\\\\b(?!\\\\.[0-9])","name":"constant.numeric.integer.octal.swift"},{"match":"(\\\\B-|\\\\b)(?<![]()\\\\[_{}\\\\p{L}\\\\p{N}\\\\p{M}]\\\\.)[0-9][0-9_]*\\\\b(?!\\\\.[0-9])","name":"constant.numeric.integer.decimal.swift"},{"match":"(\\\\B-|\\\\b)(?<![]()\\\\[_{}\\\\p{L}\\\\p{N}\\\\p{M}]\\\\.)0x\\\\h[_\\\\h]*\\\\b(?!\\\\.[0-9])","name":"constant.numeric.integer.hexadecimal.swift"},{"match":"(\\\\B-|\\\\b)[0-9][.\\\\w]*","name":"invalid.illegal.numeric.other.swift"}]},"literals-regular-expression-literal":{"patterns":[{"begin":"(#+)/\\\\n","end":"/\\\\1","name":"string.regexp.block.swift","patterns":[{"include":"#literals-regular-expression-literal-regex-guts"},{"include":"#literals-regular-expression-literal-line-comment"}]},{"captures":{"0":{"patterns":[{"include":"#literals-regular-expression-literal-regex-guts"}]},"1":{"name":"punctuation.definition.string.begin.regexp.swift"},"3":{"name":"punctuation.definition.string.end.regexp.swift"}},"match":"(/)(?!\\\\s)(?!/)(?:\\\\\\\\\\\\s(?=/)|(?<guts>(?>(?:\\\\\\\\Q(?:(?!\\\\\\\\E)(?!/).)*+(?:\\\\\\\\E|(?=/))|\\\\\\\\.|\\\\(\\\\?#[^)]*\\\\)|\\\\(\\\\?(?>\\\\{(?:[^{].*?|\\\\{[^{].*?}|\\\\{\\\\{[^{].*?}}|\\\\{\\\\{\\\\{[^{].*?}}}|\\\\{\\\\{\\\\{\\\\{[^{].*?}}}}|\\\\{\\\\{\\\\{\\\\{\\\\{.+?}}}}})})(?:\\\\[(?!\\\\d)\\\\w+])?[<>X]?\\\\)|\\\\[(?:\\\\\\\\.|[^]\\\\[\\\\\\\\]|\\\\[(?:\\\\\\\\.|[^]\\\\[\\\\\\\\]|\\\\[(?:\\\\\\\\.|[^]\\\\[\\\\\\\\]|\\\\[(?:\\\\\\\\.|[^]\\\\[\\\\\\\\])+])+])+])+]|\\\\(\\\\g<guts>?+\\\\)|(?:(?!/)[^()\\\\[\\\\\\\\])+)+))?+(?<!\\\\s))(/)","name":"string.regexp.line.swift"},{"captures":{"0":{"patterns":[{"include":"#literals-regular-expression-literal-regex-guts"}]},"1":{"name":"punctuation.definition.string.begin.regexp.swift"},"4":{"name":"punctuation.definition.string.end.regexp.swift"},"5":{"name":"invalid.illegal.returns-not-allowed.regexp"}},"match":"((#+)/)(?<guts>(?>(?:\\\\\\\\Q(?:(?!\\\\\\\\E)(?!/\\\\2).)*+(?:\\\\\\\\E|(?=/\\\\2))|\\\\\\\\.|\\\\(\\\\?#[^)]*\\\\)|\\\\(\\\\?(?>\\\\{(?:[^{].*?|\\\\{[^{].*?}|\\\\{\\\\{[^{].*?}}|\\\\{\\\\{\\\\{[^{].*?}}}|\\\\{\\\\{\\\\{\\\\{[^{].*?}}}}|\\\\{\\\\{\\\\{\\\\{\\\\{.+?}}}}})})(?:\\\\[(?!\\\\d)\\\\w+])?[<>X]?\\\\)|\\\\[(?:\\\\\\\\.|[^]\\\\[\\\\\\\\]|\\\\[(?:\\\\\\\\.|[^]\\\\[\\\\\\\\]|\\\\[(?:\\\\\\\\.|[^]\\\\[\\\\\\\\]|\\\\[(?:\\\\\\\\.|[^]\\\\[\\\\\\\\])+])+])+])+]|\\\\(\\\\g<guts>?+\\\\)|(?:(?!/\\\\2)[^()\\\\[\\\\\\\\])+)+))?+(/\\\\2)|#+/.+(\\\\n)","name":"string.regexp.line.extended.swift"}]},"literals-regular-expression-literal-backreference-or-subpattern":{"patterns":[{"captures":{"1":{"name":"constant.character.escape.backslash.regexp"},"2":{"name":"variable.other.group-name.regexp"},"3":{"name":"keyword.operator.recursion-level.regexp"},"4":{"name":"constant.numeric.integer.decimal.regexp"},"5":{"name":"constant.numeric.integer.decimal.regexp"},"6":{"name":"keyword.operator.recursion-level.regexp"},"7":{"name":"constant.numeric.integer.decimal.regexp"},"8":{"name":"constant.character.escape.backslash.regexp"}},"match":"(\\\\\\\\g\\\\{)(?:((?!\\\\d)\\\\w+)(?:([-+])(\\\\d+))?|([-+]?\\\\d+)(?:([-+])(\\\\d+))?)(})"},{"captures":{"1":{"name":"constant.character.escape.backslash.regexp"},"2":{"name":"constant.numeric.integer.decimal.regexp"},"3":{"name":"keyword.operator.recursion-level.regexp"},"4":{"name":"constant.numeric.integer.decimal.regexp"}},"match":"(\\\\\\\\g)([-+]?\\\\d+)(?:([-+])(\\\\d+))?"},{"captures":{"1":{"name":"constant.character.escape.backslash.regexp"},"2":{"name":"variable.other.group-name.regexp"},"3":{"name":"keyword.operator.recursion-level.regexp"},"4":{"name":"constant.numeric.integer.decimal.regexp"},"5":{"name":"constant.numeric.integer.decimal.regexp"},"6":{"name":"keyword.operator.recursion-level.regexp"},"7":{"name":"constant.numeric.integer.decimal.regexp"},"8":{"name":"constant.character.escape.backslash.regexp"}},"match":"(\\\\\\\\[gk]<)(?:((?!\\\\d)\\\\w+)(?:([-+])(\\\\d+))?|([-+]?\\\\d+)(?:([-+])(\\\\d+))?)(>)"},{"captures":{"1":{"name":"constant.character.escape.backslash.regexp"},"2":{"name":"variable.other.group-name.regexp"},"3":{"name":"keyword.operator.recursion-level.regexp"},"4":{"name":"constant.numeric.integer.decimal.regexp"},"5":{"name":"constant.numeric.integer.decimal.regexp"},"6":{"name":"keyword.operator.recursion-level.regexp"},"7":{"name":"constant.numeric.integer.decimal.regexp"},"8":{"name":"constant.character.escape.backslash.regexp"}},"match":"(\\\\\\\\[gk]\')(?:((?!\\\\d)\\\\w+)(?:([-+])(\\\\d+))?|([-+]?\\\\d+)(?:([-+])(\\\\d+))?)(\')"},{"captures":{"1":{"name":"constant.character.escape.backslash.regexp"},"2":{"name":"variable.other.group-name.regexp"},"3":{"name":"keyword.operator.recursion-level.regexp"},"4":{"name":"constant.numeric.integer.decimal.regexp"},"5":{"name":"constant.character.escape.backslash.regexp"}},"match":"(\\\\\\\\k\\\\{)((?!\\\\d)\\\\w+)(?:([-+])(\\\\d+))?(})"},{"match":"\\\\\\\\[1-9][0-9]+","name":"keyword.other.back-reference.regexp"},{"captures":{"1":{"name":"keyword.other.back-reference.regexp"},"2":{"name":"variable.other.group-name.regexp"},"3":{"name":"keyword.operator.recursion-level.regexp"},"4":{"name":"constant.numeric.integer.decimal.regexp"},"5":{"name":"keyword.other.back-reference.regexp"}},"match":"(\\\\(\\\\?(?:P[=>]|&))((?!\\\\d)\\\\w+)(?:([-+])(\\\\d+))?(\\\\))"},{"match":"\\\\(\\\\?R\\\\)","name":"keyword.other.back-reference.regexp"},{"captures":{"1":{"name":"keyword.other.back-reference.regexp"},"2":{"name":"constant.numeric.integer.decimal.regexp"},"3":{"name":"keyword.operator.recursion-level.regexp"},"4":{"name":"constant.numeric.integer.decimal.regexp"},"5":{"name":"keyword.other.back-reference.regexp"}},"match":"(\\\\(\\\\?)([-+]?\\\\d+)(?:([-+])(\\\\d+))?(\\\\))"}]},"literals-regular-expression-literal-backtracking-directive-or-global-matching-option":{"captures":{"1":{"name":"keyword.control.directive.regexp"},"2":{"name":"keyword.control.directive.regexp"},"3":{"name":"keyword.control.directive.regexp"},"4":{"name":"variable.language.tag.regexp"},"5":{"name":"keyword.control.directive.regexp"},"6":{"name":"keyword.operator.assignment.regexp"},"7":{"name":"constant.numeric.integer.decimal.regexp"},"8":{"name":"keyword.control.directive.regexp"},"9":{"name":"keyword.control.directive.regexp"}},"match":"(\\\\(\\\\*)(?:(ACCEPT|FAIL|F|MARK(?=:)|(?=:)|COMMIT|PRUNE|SKIP|THEN)(?:(:)([^)]+))?|(LIMIT_(?:DEPTH|HEAP|MATCH))(=)(\\\\d+)|(CRLF|CR|ANYCRLF|ANY|LF|NUL|BSR_ANYCRLF|BSR_UNICODE|NOTEMPTY_ATSTART|NOTEMPTY|NO_AUTO_POSSESS|NO_DOTSTAR_ANCHOR|NO_JIT|NO_START_OPT|UTF|UCP))(\\\\))"},"literals-regular-expression-literal-callout":{"captures":{"1":{"name":"punctuation.definition.group.regexp"},"2":{"name":"keyword.control.callout.regexp"},"3":{"name":"constant.numeric.integer.decimal.regexp"},"4":{"name":"entity.name.function.callout.regexp"},"5":{"name":"entity.name.function.callout.regexp"},"6":{"name":"entity.name.function.callout.regexp"},"7":{"name":"entity.name.function.callout.regexp"},"8":{"name":"entity.name.function.callout.regexp"},"9":{"name":"entity.name.function.callout.regexp"},"10":{"name":"entity.name.function.callout.regexp"},"11":{"name":"entity.name.function.callout.regexp"},"12":{"name":"punctuation.definition.group.regexp"},"13":{"name":"punctuation.definition.group.regexp"},"14":{"name":"keyword.control.callout.regexp"},"15":{"name":"entity.name.function.callout.regexp"},"16":{"name":"variable.language.tag-name.regexp"},"17":{"name":"punctuation.definition.group.regexp"},"18":{"name":"punctuation.definition.group.regexp"},"19":{"name":"keyword.control.callout.regexp"},"21":{"name":"variable.language.tag-name.regexp"},"22":{"name":"keyword.control.callout.regexp"},"23":{"name":"punctuation.definition.group.regexp"}},"match":"(\\\\()(?<keyw>\\\\?C)(?:(?<num>\\\\d+)|`(?<name>(?:[^`]|``)*)`|\'(?<name>(?:[^\']|\'\')*)\'|\\"(?<name>(?:[^\\"]|\\"\\")*)\\"|\\\\^(?<name>(?:[^^]|\\\\^\\\\^)*)\\\\^|%(?<name>(?:[^%]|%%)*)%|#(?<name>(?:[^#]|##)*)#|\\\\$(?<name>(?:[^$]|\\\\$\\\\$)*)\\\\$|\\\\{(?<name>(?:[^}]|}})*)})?(\\\\))|(\\\\()(?<keyw>\\\\*)(?<name>(?!\\\\d)\\\\w+)(?:\\\\[(?<tag>(?!\\\\d)\\\\w+)])?(?:\\\\{[^,}]+(?:,[^,}]+)*})?(\\\\))|(\\\\()(?<keyw>\\\\?)(?>(\\\\{(?:\\\\g<20>|(?!\\\\{).*?)}))(?:\\\\[(?<tag>(?!\\\\d)\\\\w+)])?(?<keyw>[<>X]?)(\\\\))","name":"meta.callout.regexp"},"literals-regular-expression-literal-character-properties":{"captures":{"1":{"name":"support.variable.character-property.regexp"},"2":{"name":"punctuation.definition.character-class.regexp"},"3":{"name":"support.variable.character-property.regexp"},"4":{"name":"punctuation.definition.character-class.regexp"}},"match":"\\\\\\\\[Pp]\\\\{([-\\\\s\\\\w]+(?:=[-\\\\s\\\\w]+)?)}|(\\\\[:)([-\\\\s\\\\w]+(?:=[-\\\\s\\\\w]+)?)(:])","name":"constant.other.character-class.set.regexp"},"literals-regular-expression-literal-custom-char-class":{"patterns":[{"begin":"(\\\\[)(\\\\^)?","beginCaptures":{"1":{"name":"punctuation.definition.character-class.regexp"},"2":{"name":"keyword.operator.negation.regexp"}},"end":"]","endCaptures":{"0":{"name":"punctuation.definition.character-class.regexp"}},"name":"constant.other.character-class.set.regexp","patterns":[{"include":"#literals-regular-expression-literal-custom-char-class-members"}]}]},"literals-regular-expression-literal-custom-char-class-members":{"patterns":[{"match":"\\\\\\\\b","name":"constant.character.escape.backslash.regexp"},{"include":"#literals-regular-expression-literal-custom-char-class"},{"include":"#literals-regular-expression-literal-quote"},{"include":"#literals-regular-expression-literal-set-operators"},{"include":"#literals-regular-expression-literal-unicode-scalars"},{"include":"#literals-regular-expression-literal-character-properties"}]},"literals-regular-expression-literal-group-option-toggle":{"match":"\\\\(\\\\?(?:\\\\^(?:[DJPSUWimnswx]|xx|y\\\\{[gw]})*|(?:[DJPSUWimnswx]|xx|y\\\\{[gw]})+|(?:[DJPSUWimnswx]|xx|y\\\\{[gw]})*-(?:[DJPSUWimnswx]|xx|y\\\\{[gw]})*)\\\\)","name":"keyword.other.option-toggle.regexp"},"literals-regular-expression-literal-group-or-conditional":{"patterns":[{"begin":"(\\\\()(\\\\?~)","beginCaptures":{"1":{"name":"punctuation.definition.group.regexp"},"2":{"name":"keyword.control.conditional.absent.regexp"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.group.regexp"}},"name":"meta.group.absent.regexp","patterns":[{"include":"#literals-regular-expression-literal-regex-guts"}]},{"begin":"(\\\\()(?<cond>\\\\?\\\\()(?:(?<NumberRef>(?<num>[-+]?\\\\d+)(?:(?<op>[-+])(?<num>\\\\d+))?)|(?<cond>R)\\\\g<NumberRef>?|(?<cond>R&)(?<NamedRef>(?<name>(?!\\\\d)\\\\w+)(?:(?<op>[-+])(?<num>\\\\d+))?)|(?<cond><)(?:\\\\g<NamedRef>|\\\\g<NumberRef>)(?<cond>>)|(?<cond>\')(?:\\\\g<NamedRef>|\\\\g<NumberRef>)(?<cond>\')|(?<cond>DEFINE)|(?<cond>VERSION)(?<compar>>?=)(?<num>\\\\d+\\\\.\\\\d+))(?<cond>\\\\))|(\\\\()(?<cond>\\\\?)(?=\\\\()","beginCaptures":{"1":{"name":"punctuation.definition.group.regexp"},"2":{"name":"keyword.control.conditional.regexp"},"4":{"name":"constant.numeric.integer.decimal.regexp"},"5":{"name":"keyword.operator.recursion-level.regexp"},"6":{"name":"constant.numeric.integer.decimal.regexp"},"7":{"name":"keyword.control.conditional.regexp"},"8":{"name":"keyword.control.conditional.regexp"},"10":{"name":"variable.other.group-name.regexp"},"11":{"name":"keyword.operator.recursion-level.regexp"},"12":{"name":"constant.numeric.integer.decimal.regexp"},"13":{"name":"keyword.control.conditional.regexp"},"14":{"name":"keyword.control.conditional.regexp"},"15":{"name":"keyword.control.conditional.regexp"},"16":{"name":"keyword.control.conditional.regexp"},"17":{"name":"keyword.control.conditional.regexp"},"18":{"name":"keyword.control.conditional.regexp"},"19":{"name":"keyword.operator.comparison.regexp"},"20":{"name":"constant.numeric.integer.decimal.regexp"},"21":{"name":"keyword.control.conditional.regexp"},"22":{"name":"punctuation.definition.group.regexp"},"23":{"name":"keyword.control.conditional.regexp"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.group.regexp"}},"name":"meta.group.conditional.regexp","patterns":[{"include":"#literals-regular-expression-literal-regex-guts"}]},{"begin":"(\\\\()((\\\\?)(?:([!*:=>|]|<[!*=])|P?<(?:((?!\\\\d)\\\\w+)(-))?((?!\\\\d)\\\\w+)>|\'(?:((?!\\\\d)\\\\w+)(-))?((?!\\\\d)\\\\w+)\'|(?:\\\\^(?:[DJPSUWimnswx]|xx|y\\\\{[gw]})*|(?:[DJPSUWimnswx]|xx|y\\\\{[gw]})+|(?:[DJPSUWimnswx]|xx|y\\\\{[gw]})*-(?:[DJPSUWimnswx]|xx|y\\\\{[gw]})*):)|\\\\*(atomic|pla|positive_lookahead|nla|negative_lookahead|plb|positive_lookbehind|nlb|negative_lookbehind|napla|non_atomic_positive_lookahead|naplb|non_atomic_positive_lookbehind|sr|script_run|asr|atomic_script_run):)?+","beginCaptures":{"1":{"name":"punctuation.definition.group.regexp"},"2":{"name":"keyword.other.group-options.regexp"},"3":{"name":"punctuation.definition.group.regexp"},"4":{"name":"punctuation.definition.group.regexp"},"5":{"name":"variable.other.group-name.regexp"},"6":{"name":"keyword.operator.balancing-group.regexp"},"7":{"name":"variable.other.group-name.regexp"},"8":{"name":"variable.other.group-name.regexp"},"9":{"name":"keyword.operator.balancing-group.regexp"},"10":{"name":"variable.other.group-name.regexp"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.group.regexp"}},"name":"meta.group.regexp","patterns":[{"include":"#literals-regular-expression-literal-regex-guts"}]}]},"literals-regular-expression-literal-line-comment":{"captures":{"1":{"name":"punctuation.definition.comment.regexp"}},"match":"(#).*$","name":"comment.line.regexp"},"literals-regular-expression-literal-quote":{"begin":"\\\\\\\\Q","beginCaptures":{"0":{"name":"constant.character.escape.backslash.regexp"}},"end":"\\\\\\\\E|(\\\\n)","endCaptures":{"0":{"name":"constant.character.escape.backslash.regexp"},"1":{"name":"invalid.illegal.returns-not-allowed.regexp"}},"name":"string.quoted.other.regexp.swift"},"literals-regular-expression-literal-regex-guts":{"patterns":[{"include":"#literals-regular-expression-literal-quote"},{"begin":"\\\\(\\\\?#","beginCaptures":{"0":{"name":"punctuation.definition.comment.begin.regexp"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.comment.end.regexp"}},"name":"comment.block.regexp"},{"begin":"<\\\\{","beginCaptures":{"0":{"name":"punctuation.section.embedded.begin.regexp"}},"end":"}>","endCaptures":{"0":{"name":"punctuation.section.embedded.end.regexp"}},"name":"meta.embedded.expression.regexp"},{"include":"#literals-regular-expression-literal-unicode-scalars"},{"include":"#literals-regular-expression-literal-character-properties"},{"match":"[$^]|\\\\\\\\[ABGYZbyz]|\\\\\\\\K","name":"keyword.control.anchor.regexp"},{"include":"#literals-regular-expression-literal-backtracking-directive-or-global-matching-option"},{"include":"#literals-regular-expression-literal-callout"},{"include":"#literals-regular-expression-literal-backreference-or-subpattern"},{"match":"\\\\.|\\\\\\\\[CDHNORSVWXdhsvw]","name":"constant.character.character-class.regexp"},{"match":"\\\\\\\\c.","name":"constant.character.entity.control-character.regexp"},{"match":"\\\\\\\\[^c]","name":"constant.character.escape.backslash.regexp"},{"match":"\\\\|","name":"keyword.operator.or.regexp"},{"match":"[*+?]","name":"keyword.operator.quantifier.regexp"},{"match":"\\\\{(?:\\\\s*\\\\d+\\\\s*(?:,\\\\s*\\\\d*\\\\s*)?}|\\\\s*,\\\\s*\\\\d+\\\\s*})","name":"keyword.operator.quantifier.regexp"},{"include":"#literals-regular-expression-literal-custom-char-class"},{"include":"#literals-regular-expression-literal-group-option-toggle"},{"include":"#literals-regular-expression-literal-group-or-conditional"}]},"literals-regular-expression-literal-set-operators":{"patterns":[{"match":"&&","name":"keyword.operator.intersection.regexp.swift"},{"match":"--","name":"keyword.operator.subtraction.regexp.swift"},{"match":"~~","name":"keyword.operator.symmetric-difference.regexp.swift"}]},"literals-regular-expression-literal-unicode-scalars":{"match":"\\\\\\\\(?:u\\\\{\\\\s*(?:\\\\h+\\\\s*)+}|u\\\\h{4}|x\\\\{\\\\h+}|x\\\\h{0,2}|U\\\\h{8}|o\\\\{[0-7]+}|0[0-7]{0,3}|N\\\\{(?:U\\\\+\\\\h{1,8}|[-\\\\s\\\\w]+)})","name":"constant.character.numeric.regexp"},"literals-string":{"patterns":[{"begin":"\\"\\"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.swift"}},"end":"\\"\\"\\"(#*)","endCaptures":{"0":{"name":"punctuation.definition.string.end.swift"},"1":{"name":"invalid.illegal.extra-closing-delimiter.swift"}},"name":"string.quoted.double.block.swift","patterns":[{"match":"\\\\G(?:.+(?=\\"\\"\\")|.+)","name":"invalid.illegal.content-after-opening-delimiter.swift"},{"match":"\\\\\\\\\\\\s*\\\\n","name":"constant.character.escape.newline.swift"},{"include":"#literals-string-string-guts"},{"match":"\\\\S((?!\\\\\\\\\\\\().)*(?=\\"\\"\\")","name":"invalid.illegal.content-before-closing-delimiter.swift"}]},{"begin":"#\\"\\"\\"(?!#)(?=(?:[^\\"]|\\"(?!#))*$)","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.swift"}},"end":"\\"\\"\\"#(#*)","endCaptures":{"0":{"name":"punctuation.definition.string.end.swift"},"1":{"name":"invalid.illegal.extra-closing-delimiter.swift"}},"name":"string.quoted.double.block.raw.swift","patterns":[{"match":"\\\\G(?:.+(?=\\"\\"\\")|.+)","name":"invalid.illegal.content-after-opening-delimiter.swift"},{"match":"\\\\\\\\#\\\\s*\\\\n","name":"constant.character.escape.newline.swift"},{"include":"#literals-string-raw-string-guts"},{"match":"\\\\S((?!\\\\\\\\#\\\\().)*(?=\\"\\"\\")","name":"invalid.illegal.content-before-closing-delimiter.swift"}]},{"begin":"(?<!#)(##+)\\"\\"\\"(?!\\\\1)(?=(?:[^\\"]|\\"(?!\\\\1))*$)","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.swift"}},"end":"\\"\\"\\"\\\\1(#*)","endCaptures":{"0":{"name":"punctuation.definition.string.end.swift"},"1":{"name":"invalid.illegal.extra-closing-delimiter.swift"}},"name":"string.quoted.double.block.raw.swift","patterns":[{"match":"\\\\G(?:.+(?=\\"\\"\\")|.+)","name":"invalid.illegal.content-after-opening-delimiter.swift"}]},{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.swift"}},"end":"\\"(#*)","endCaptures":{"0":{"name":"punctuation.definition.string.end.swift"},"1":{"name":"invalid.illegal.extra-closing-delimiter.swift"}},"name":"string.quoted.double.single-line.swift","patterns":[{"match":"[\\\\n\\\\r]","name":"invalid.illegal.returns-not-allowed.swift"},{"include":"#literals-string-string-guts"}]},{"begin":"(?<!#)(##+)\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.raw.swift"}},"end":"\\"\\\\1(#*)","endCaptures":{"0":{"name":"punctuation.definition.string.end.raw.swift"},"1":{"name":"invalid.illegal.extra-closing-delimiter.swift"}},"name":"string.quoted.double.single-line.raw.swift","patterns":[{"match":"[\\\\n\\\\r]","name":"invalid.illegal.returns-not-allowed.swift"}]},{"begin":"#\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.raw.swift"}},"end":"\\"#(#*)","endCaptures":{"0":{"name":"punctuation.definition.string.end.raw.swift"},"1":{"name":"invalid.illegal.extra-closing-delimiter.swift"}},"name":"string.quoted.double.single-line.raw.swift","patterns":[{"match":"[\\\\n\\\\r]","name":"invalid.illegal.returns-not-allowed.swift"},{"include":"#literals-string-raw-string-guts"}]}]},"literals-string-raw-string-guts":{"patterns":[{"match":"\\\\\\\\#[\\"\'0\\\\\\\\nrt]","name":"constant.character.escape.swift"},{"match":"\\\\\\\\#u\\\\{\\\\h{1,8}}","name":"constant.character.escape.unicode.swift"},{"begin":"\\\\\\\\#\\\\(","beginCaptures":{"0":{"name":"punctuation.section.embedded.begin.swift"}},"contentName":"source.swift","end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.embedded.end.swift"}},"name":"meta.embedded.line.swift","patterns":[{"include":"$self"},{"begin":"\\\\(","end":"\\\\)"}]},{"match":"\\\\\\\\#.","name":"invalid.illegal.escape-not-recognized"}]},"literals-string-string-guts":{"patterns":[{"match":"\\\\\\\\[\\"\'0\\\\\\\\nrt]","name":"constant.character.escape.swift"},{"match":"\\\\\\\\u\\\\{\\\\h{1,8}}","name":"constant.character.escape.unicode.swift"},{"begin":"\\\\\\\\\\\\(","beginCaptures":{"0":{"name":"punctuation.section.embedded.begin.swift"}},"contentName":"source.swift","end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.embedded.end.swift"}},"name":"meta.embedded.line.swift","patterns":[{"include":"$self"},{"begin":"\\\\(","end":"\\\\)"}]},{"match":"\\\\\\\\.","name":"invalid.illegal.escape-not-recognized"}]},"member-reference":{"patterns":[{"captures":{"1":{"name":"variable.other.swift"},"2":{"name":"punctuation.definition.identifier.swift"},"3":{"name":"punctuation.definition.identifier.swift"}},"match":"(?<=\\\\.)((?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>))"}]},"operators":{"patterns":[{"match":"\\\\b(is\\\\b|as([!?]\\\\B|\\\\b))","name":"keyword.operator.type-casting.swift"},{"begin":"(?=(?<oph>[-!%\\\\&*+/<-?^|~¡-§©«¬®°±¶»¿×÷‖‗†-‧‰-‾⁁-⁓⁕-⁞←-⏿─-❵➔-⯿⸀-⹿、。〃〈-〰])|\\\\.(\\\\g<oph>|[.̀-ͯ᷀-᷿⃐-⃿︀-️︠-︯\\\\x{E0100}-\\\\x{E01EF}]))","end":"(?!\\\\G)","patterns":[{"captures":{"0":{"patterns":[{"match":"\\\\G(\\\\+\\\\+|--)$","name":"keyword.operator.increment-or-decrement.swift"},{"match":"\\\\G([-+])$","name":"keyword.operator.arithmetic.unary.swift"},{"match":"\\\\G!$","name":"keyword.operator.logical.not.swift"},{"match":"\\\\G~$","name":"keyword.operator.bitwise.not.swift"},{"match":".+","name":"keyword.operator.custom.prefix.swift"}]}},"match":"\\\\G(?<=^|[(,:;\\\\[{\\\\s])((?!(//|/\\\\*|\\\\*/))([-!%\\\\&*+/<-?^|~¡-§©«¬®°±¶»¿×÷̀-ͯ᷀-᷿‖‗†-‧‰-‾⁁-⁓⁕-⁞⃐-⃿←-⏿─-❵➔-⯿⸀-⹿、。〃〈-〰︀-️︠-︯\\\\x{E0100}-\\\\x{E01EF}]))++(?![]),:;}\\\\s]|\\\\z)"},{"captures":{"0":{"patterns":[{"match":"\\\\G(\\\\+\\\\+|--)$","name":"keyword.operator.increment-or-decrement.swift"},{"match":"\\\\G!$","name":"keyword.operator.increment-or-decrement.swift"},{"match":".+","name":"keyword.operator.custom.postfix.swift"}]}},"match":"\\\\G(?<!^|[(,:;\\\\[{\\\\s])((?!(//|/\\\\*|\\\\*/))([-!%\\\\&*+/<-?^|~¡-§©«¬®°±¶»¿×÷̀-ͯ᷀-᷿‖‗†-‧‰-‾⁁-⁓⁕-⁞⃐-⃿←-⏿─-❵➔-⯿⸀-⹿、。〃〈-〰︀-️︠-︯\\\\x{E0100}-\\\\x{E01EF}]))++(?=[]),:;}\\\\s]|\\\\z)"},{"captures":{"0":{"patterns":[{"match":"\\\\G=$","name":"keyword.operator.assignment.swift"},{"match":"\\\\G([-%*+/]|<<|>>|[\\\\&^|]|&&|\\\\|\\\\|)=$","name":"keyword.operator.assignment.compound.swift"},{"match":"\\\\G([-*+/])$","name":"keyword.operator.arithmetic.swift"},{"match":"\\\\G&([-*+])$","name":"keyword.operator.arithmetic.overflow.swift"},{"match":"\\\\G%$","name":"keyword.operator.arithmetic.remainder.swift"},{"match":"\\\\G(==|!=|[<>]|>=|<=|~=)$","name":"keyword.operator.comparison.swift"},{"match":"\\\\G\\\\?\\\\?$","name":"keyword.operator.coalescing.swift"},{"match":"\\\\G(&&|\\\\|\\\\|)$","name":"keyword.operator.logical.swift"},{"match":"\\\\G([\\\\&^|]|<<|>>)$","name":"keyword.operator.bitwise.swift"},{"match":"\\\\G([!=]==)$","name":"keyword.operator.bitwise.swift"},{"match":"\\\\G\\\\?$","name":"keyword.operator.ternary.swift"},{"match":".+","name":"keyword.operator.custom.infix.swift"}]}},"match":"\\\\G((?!(//|/\\\\*|\\\\*/))([-!%\\\\&*+/<-?^|~¡-§©«¬®°±¶»¿×÷̀-ͯ᷀-᷿‖‗†-‧‰-‾⁁-⁓⁕-⁞⃐-⃿←-⏿─-❵➔-⯿⸀-⹿、。〃〈-〰︀-️︠-︯\\\\x{E0100}-\\\\x{E01EF}]))++"},{"captures":{"0":{"patterns":[{"match":".+","name":"keyword.operator.custom.prefix.dot.swift"}]}},"match":"\\\\G(?<=^|[(,:;\\\\[{\\\\s])\\\\.((?!(//|/\\\\*|\\\\*/))([-!%\\\\&*+./<-?^|~¡-§©«¬®°±¶»¿×÷̀-ͯ᷀-᷿‖‗†-‧‰-‾⁁-⁓⁕-⁞⃐-⃿←-⏿─-❵➔-⯿⸀-⹿、。〃〈-〰︀-️︠-︯\\\\x{E0100}-\\\\x{E01EF}]))++(?![]),:;}\\\\s]|\\\\z)"},{"captures":{"0":{"patterns":[{"match":".+","name":"keyword.operator.custom.postfix.dot.swift"}]}},"match":"\\\\G(?<!^|[(,:;\\\\[{\\\\s])\\\\.((?!(//|/\\\\*|\\\\*/))([-!%\\\\&*+./<-?^|~¡-§©«¬®°±¶»¿×÷̀-ͯ᷀-᷿‖‗†-‧‰-‾⁁-⁓⁕-⁞⃐-⃿←-⏿─-❵➔-⯿⸀-⹿、。〃〈-〰︀-️︠-︯\\\\x{E0100}-\\\\x{E01EF}]))++(?=[]),:;}\\\\s]|\\\\z)"},{"captures":{"0":{"patterns":[{"match":"\\\\G\\\\.\\\\.[.<]$","name":"keyword.operator.range.swift"},{"match":".+","name":"keyword.operator.custom.infix.dot.swift"}]}},"match":"\\\\G\\\\.((?!(//|/\\\\*|\\\\*/))([-!%\\\\&*+./<-?^|~¡-§©«¬®°±¶»¿×÷̀-ͯ᷀-᷿‖‗†-‧‰-‾⁁-⁓⁕-⁞⃐-⃿←-⏿─-❵➔-⯿⸀-⹿、。〃〈-〰︀-️︠-︯\\\\x{E0100}-\\\\x{E01EF}]))++"}]},{"match":":","name":"keyword.operator.ternary.swift"}]},"root":{"patterns":[{"include":"#compiler-control"},{"include":"#declarations"},{"include":"#expressions"}]}},"scopeName":"source.swift"}')),t=[e];export{t as default};
@@ -1 +0,0 @@
1
- import{a as ar}from"./chunk-HTAEGDNF-D1KDvcDd.js";import{c as lr}from"./chunk-FVRAUYC3-CpXDfvz4.js";import{_ as l,l as Mn}from"./mermaid.core-DLb6eAON.js";import"./index-CeeLdENM.js";import"./markdown-BWXjRrSw.js";import"./icons-Bm_ZzSAy.js";import"./react-vendor-C0HIWSpf.js";import"./state-Kfon1nTr.js";import"./panels-BQOvnbWH.js";import"./graph-Bn3Yngep.js";function Ao(t,{measure:e}){var r,c;const n=(c=(r=t.config)==null?void 0:r.swimlane)==null?void 0:c.lineHops;if(n===!1)return;const o=n==="gap"?"gap":"arc",s=t.edges.filter(a=>Array.isArray(a.points)&&a.points.length>=2).map(a=>({id:a.id,points:a.points,curve:a.curve,arrowTypeStart:a.arrowTypeStart,arrowTypeEnd:a.arrowTypeEnd}));ar(e.groups.edgePaths,s,{enabled:!0,jumpRadius:6,jumpStyle:o})}l(Ao,"applySwimlaneLineJumps");var yn="__swimlane_default__",fr=21,vo=20;function Sn(t){return Math.max(t.padding??vo,vo)}l(Sn,"topLaneHorizontalPadding");function Ro(t){const{x:e,y:n,width:o,height:s}=t,r=t.swimlaneContentTop;if(typeof e!="number"||typeof n!="number"||typeof o!="number"||typeof s!="number"||typeof r!="number"||!Number.isFinite(e)||!Number.isFinite(n)||!Number.isFinite(o)||!Number.isFinite(s)||!Number.isFinite(r)||o<=0||s<=0){delete t.groupTitleRect;return}const c=n-s/2,a=Math.min(r,n+s/2),f=Math.min(fr,Math.max(0,a-c)),h=c+f;if(h<=c){delete t.groupTitleRect;return}t.groupTitleRect={left:e-o/2,right:e+o/2,top:c,bottom:h}}l(Ro,"assignTopLaneTitleRect");function No(t){var r;const e=t.direction,n=t.nodes??(t.nodes=[]);for(const c of t.nodes??[])c.isGroup&&!c.parentId&&(c.shape="swimlane",e&&(c.direction=e));const o=n.filter(c=>!c.isGroup&&!c.parentId);if(o.length===0)return;let s=n.find(c=>c.id===yn);s?s.isGroup&&(s.shape="swimlane",e&&(s.direction=e)):(s={id:yn,label:"",isGroup:!0,shape:"swimlane",padding:20,look:(r=t.config)==null?void 0:r.look,colorIndex:n.reduce((c,a)=>Math.max(c,a.colorIndex??-1),-1)+1,...e?{direction:e}:{}},n.push(s));for(const c of o)c.parentId=yn}l(No,"prepareLayoutForSwimlanes");function Oo(t){const e=new Map;for(const f of t.nodes??[])e.set(f.id,f);const n=[];for(const f of t.edges??[]){const h=typeof f.start=="string"?f.start:void 0,p=typeof f.end=="string"?f.end:void 0;!h||!p||f.labelNodeId||n.push({id:f.id,src:h,dst:p,ref:f})}const o=t.nodes??[],s=o.filter(f=>f.isGroup),r=o.filter(f=>!f.isGroup);return{nodes:[...[...s].reverse(),...r].map(f=>f.id),edges:n,layout:t,nodeById:e}}l(Oo,"toGraphView");function Bo(t,e,n,o){const{layout:s}=t,r=t.nodeById,c=(o==null?void 0:o.layerGap)??100,a=(o==null?void 0:o.nodeGap)??40;let f=0;for(const S of e.layers){let d=0;for(const u of S){const i=r.get(u);if(!i){d++;continue}i.layer=f,i.order=d;const y=n.x[u]??d*a,C=n.y[u]??f*c;i.x=y,i.y=C,d++}f++}const h=s.nodes??[],p=new Map,x=[];for(const S of h){if(!(S!=null&&S.isGroup))continue;S.parentId||x.push(S);const d=h.filter(b=>b.parentId===S.id);let u=1/0,i=-1/0,y=1/0,C=-1/0;for(const b of d){const L=b.x??n.x[b.id],v=b.y??n.y[b.id],m=b.width??0,I=b.height??0;L!=null&&v!=null&&(u=Math.min(u,L-m/2),i=Math.max(i,L+m/2),y=Math.min(y,v-I/2),C=Math.max(C,v+I/2))}if(u===1/0||y===1/0)S.x=S.x??0,S.y=S.y??0,S.width=S.width??0,S.height=S.height??0;else{const b=S.padding??20,L=S.parentId?b:2*Sn(S),v=b,m=Math.max(0,i-u)+L,I=Math.max(0,C-y)+v,T=(u+i)/2,A=(y+C)/2;S.x=T,S.y=A,S.width=m,S.height=I,p.set(S.id,{minX:u,maxX:i,minY:y,maxY:C})}}if(x.length>0&&p.size>0){let S=1/0,d=-1/0,u=0;for(const i of x){const y=i.padding??20;y>u&&(u=y);const C=p.get(i.id);C&&(S=Math.min(S,C.minY),d=Math.max(d,C.maxY))}if(S!==1/0&&d!==-1/0){const i=Math.max(0,d-S),C=Math.max(u,36),b=i+2*C,L=(S+d)/2;for(const P of x)P.y=L,P.height=b,P.swimlaneContentTop=S;const v=[...x].sort((P,O)=>{const k=P.x??0,D=O.x??0;return k-D}),m=[],I=[],T=[];for(const P of v){const O=p.get(P.id);if(!O)continue;const k=Math.max(0,O.maxX-O.minX)+2*Sn(P),D=(O.minX+O.maxX)/2;m.push(P.id),I.push(D),T.push(k)}const A=m.length;if(A>0){const P=new Map;if(A===1)P.set(m[0],T[0]);else{const O=[];for(let j=0;j<A-1;j++)O.push(I[j+1]-I[j]);const k=new Array(A);k[0]=0;for(let j=0;j<A-1;j++)k[j+1]=2*O[j]-k[j];let D=0,B=Number.POSITIVE_INFINITY;for(let j=0;j<A;j++){const tt=T[j];j%2===0?D=Math.max(D,tt-k[j]):B=Math.min(B,k[j]-tt)}let G=D;D<=B?G=(D+B)/2:G=D;for(let j=0;j<A;j++){const tt=k[j]+(j%2===0?G:-G),ft=Math.max(T[j],tt);P.set(m[j],ft)}}for(const O of x){const k=P.get(O.id);k!=null&&(O.width=k),Ro(O)}}}}}l(Bo,"writeBackToLayoutData");var dr="[EdgeLabelNodes]";function Po(t){const e=[],n=[],o=new Map;for(const c of t.nodes)o.set(c.id,c);for(const c of t.edges){if(!c.label||c.label.length===0||c.isLayoutOnly||c.labelNodeId)continue;const a=c.start?o.get(c.start):void 0,f=c.end?o.get(c.end):void 0;if(!a||!f){Mn.warn(dr,`Edge ${c.id} has missing source or target node`);continue}const h=`edge-label-${c.start}-${c.end}-${c.id}`,x=a.parentId!==f.parentId?f.parentId:a.parentId,S={id:h,label:c.label,edgeStart:c.start??"",edgeEnd:c.end??"",shape:"labelRect",width:0,height:0,isEdgeLabel:!0,isDummy:!0,parentId:x,isGroup:!1,labelStyle:Array.isArray(c.labelStyle)?c.labelStyle[0]:c.labelStyle??"",...a.dir?{dir:a.dir}:{}};e.push(S),c.labelNodeId=h,c.label=void 0,c.text=void 0;const d={id:`${c.id}-to-label`,start:c.start,end:h,type:"normal",isLayoutOnly:!0},u={id:`${c.id}-from-label`,start:h,end:c.end,type:"normal",isLayoutOnly:!0};n.push(d,u)}const s=[...t.nodes,...e],r=[...t.edges,...n];return{...t,nodes:s,edges:r}}l(Po,"createEdgeLabelNodes");var Yt=.001;function Qn(t){const e=t.x??0,n=t.y??0,o=t.width??0,s=t.height??0;return o>0&&s>0?{cx:e,cy:n,rect:Ne(e,n,o,s)}:void 0}l(Qn,"measuredNodeRect");function to(t){if(t.isGroup)return;const e=Qn(t);return e?{id:String(t.id??""),cx:e.cx,cy:e.cy,rect:e.rect}:void 0}l(to,"nodeBoundsInfoFor");function ce(t,e,n=Yt){return Math.abs(t.x-e.x)<n&&Math.abs(t.y-e.y)<n}l(ce,"samePoint");function gt(t,e,n=Yt){return Math.abs(t.x-e.x)<n}l(gt,"sameX");function xt(t,e,n=Yt){return Math.abs(t.y-e.y)<n}l(xt,"sameY");function Nt(t,e,n=Yt){return xt(t,e,n)&&Math.abs(t.x-e.x)>n}l(Nt,"isHorizontalSegment");function Ot(t,e,n=Yt){return gt(t,e,n)&&Math.abs(t.y-e.y)>n}l(Ot,"isVerticalSegment");function Wt(t,e,n,o){return Math.max(0,Math.min(Math.max(t,e),Math.max(n,o))-Math.max(Math.min(t,e),Math.min(n,o)))}l(Wt,"overlapLength");function fe(t,e,n=Yt){return t.horizontal&&e.horizontal&&xt(t.a,e.a,n)?Wt(t.a.x,t.b.x,e.a.x,e.b.x):t.vertical&&e.vertical&&gt(t.a,e.a,n)?Wt(t.a.y,t.b.y,e.a.y,e.b.y):0}l(fe,"sameAxisSegmentOverlapLength");function Oe(t,e=Yt){const n=[];for(let o=0;o<t.length-1;o++){const s=t[o],r=t[o+1],c=Nt(s,r,e),a=Ot(s,r,e);(c||a)&&n.push({index:o,a:s,b:r,horizontal:c,vertical:a})}return n}l(Oe,"orthogonalSegmentsForPoints");function oe(t,e=Yt){const n=Oe(t,e);let o=0;for(let s=1;s<n.length;s++)n[s-1].horizontal!==n[s].horizontal&&o++;return o}l(oe,"countOrthogonalBends");function pt(t,e=Yt){const n=[];for(const o of t){const s=n.length>0?n[n.length-1]:void 0;(!s||!ce(s,o,e))&&n.push({x:o.x,y:o.y})}return n}l(pt,"dedupeConsecutivePoints");function eo(t,e=Yt){if(!t||t.length!==4)return;const[n,o,s,r]=t;return Nt(n,o,e)&&Ot(o,s,e)&&Nt(s,r,e)?{kind:"HVH",p0:n,p1:o,p2:s,p3:r}:Ot(n,o,e)&&Nt(o,s,e)&&Ot(s,r,e)?{kind:"VHV",p0:n,p1:o,p2:s,p3:r}:void 0}l(eo,"classifyThreeSegmentRoute");function nn(t,e,n,o=0){const s=Math.min(t.x,e.x),r=Math.max(t.x,e.x),c=Math.min(t.y,e.y),a=Math.max(t.y,e.y);return r>n.left-o&&s<n.right+o&&a>n.top-o&&c<n.bottom+o}l(nn,"segmentBoundsOverlapRect");function no(t,e,n=0){return t.x>e.left+n&&t.x<e.right-n&&t.y>e.top+n&&t.y<e.bottom-n}l(no,"pointInsideRect");function ko(t,e){return t.left<=e.left&&t.right>=e.right&&t.top<=e.top&&t.bottom>=e.bottom}l(ko,"rectContainsRect");function Ue(t,e){return t.left<e.right&&t.right>e.left&&t.top<e.bottom&&t.bottom>e.top}l(Ue,"rectsOverlap");function Cn(t,e){return{left:t.left-e,right:t.right+e,top:t.top-e,bottom:t.bottom+e}}l(Cn,"inflateRect");function Ne(t,e,n,o){return{left:t-n/2,right:t+n/2,top:e-o/2,bottom:e+o/2}}l(Ne,"rectFromCenterSize");function te(t){var e;return(e=Qn(t))==null?void 0:e.rect}l(te,"rectOfNodeBounds");function ve(t,e){switch(e){case"top":return{x:t.cx,y:t.rect.top};case"bottom":return{x:t.cx,y:t.rect.bottom};case"left":return{x:t.rect.left,y:t.cy};case"right":return{x:t.rect.right,y:t.cy}}}l(ve,"portForRectSide");function oo(t,e,n,o,s,r=Yt){const c=e==="left"||e==="right",a=o==="left"||o==="right";if(c&&a){if(e==="right"&&o==="left"&&t.x<n.x||e==="left"&&o==="right"&&t.x>n.x){if(xt(t,n,r))return[t,n];const x=(t.x+n.x)/2;return[t,{x,y:t.y},{x,y:n.y},n]}if(e===o){if(xt(t,n,r))return;const x=e==="left"?Math.min(t.x,n.x)-s:Math.max(t.x,n.x)+s;return[t,{x,y:t.y},{x,y:n.y},n]}return}if(!c&&!a){if(e===o){if(gt(t,n,r))return;const S=e==="top"?Math.min(t.y,n.y)-s:Math.max(t.y,n.y)+s;return[t,{x:t.x,y:S},{x:n.x,y:S},n]}if(!(e==="bottom"&&o==="top"&&t.y<n.y||e==="top"&&o==="bottom"&&t.y>n.y))return;if(gt(t,n,r))return[t,n];const x=(t.y+n.y)/2;return[t,{x:t.x,y:x},{x:n.x,y:x},n]}if(c&&!a){const p=e==="right"&&n.x>t.x||e==="left"&&n.x<t.x,x=o==="top"&&t.y<n.y||o==="bottom"&&t.y>n.y;return p&&x?[t,{x:n.x,y:t.y},n]:void 0}const f=e==="bottom"&&n.y>t.y||e==="top"&&n.y<t.y,h=o==="left"&&t.x<n.x||o==="right"&&t.x>n.x;return f&&h?[t,{x:t.x,y:n.y},n]:void 0}l(oo,"buildOrthogonalPortPath");function so(t,e,n,o){return e==="left"||e==="right"?[t,{x:o,y:t.y},{x:o,y:n.y},n]:[t,{x:t.x,y:o},{x:n.x,y:o},n]}l(so,"buildSameSideTrackPath");function on(t){const e=new Map,n=[];for(const o of t){if(o.isEdgeLabel)continue;const s=to(o);s&&(e.set(s.id,s),n.push({id:s.id,rect:s.rect}))}return{nodeInfoById:e,realNodeRects:n}}l(on,"collectRealNodeBounds");function be(t){const e=[],n=[];for(const o of t){const s=to(o);if(!s)continue;const r={id:s.id,rect:s.rect};o.isEdgeLabel?n.push(r):e.push(r)}return{realNodeRects:e,labelNodeRects:n}}l(be,"collectNodeRectEntries");function Fo(t,{includeEdgeLabels:e=!0}={}){const n=[];for(const o of t){if(o.isGroup||!e&&o.isEdgeLabel)continue;const s=o.x??0,r=o.y??0,c=o.width??0,a=o.height??0;n.push({nodeId:o.id,...Ne(s,r,c,a)})}return n}l(Fo,"collectLayoutNodeRects");function ro(t,e,n=Yt){const o=t.start,s=t.end;if(!o||!s)return;const r=e.get(o),c=e.get(s);if(!(!r||!c))return{srcId:o,dstId:s,srcInfo:r,dstInfo:c,collinearX:Math.abs(r.cx-c.cx)<n,collinearY:Math.abs(r.cy-c.cy)<n}}l(ro,"getNodePairGeometry");function Bt(t,e,n,o=[],s=0){for(const r of n)if(!o.includes(r.id)&&nn(t,e,r.rect,-s))return!0;return!1}l(Bt,"segmentHitsAnyRect");function io(t,e,n,o,s=Yt,r=1e-6){const c=xt(t,e,s),a=gt(t,e,s),f=xt(n,o,s),h=gt(n,o,s);if(c&&f||a&&h||!(c||a)||!(f||h))return!1;const p=c?{a:t,b:e}:{a:n,b:o},x=a?{a:t,b:e}:{a:n,b:o},S=p.a.y,d=Math.min(p.a.x,p.b.x),u=Math.max(p.a.x,p.b.x),i=x.a.x,y=Math.min(x.a.y,x.b.y),C=Math.max(x.a.y,x.b.y);if(i<d||i>u||S<y||S>C)return!1;const b=Math.abs(i-p.a.x)<r&&Math.abs(S-p.a.y)<r||Math.abs(i-p.b.x)<r&&Math.abs(S-p.b.y)<r,L=Math.abs(i-x.a.x)<r&&Math.abs(S-x.a.y)<r||Math.abs(i-x.b.x)<r&&Math.abs(S-x.b.y)<r;return!(b&&L)}l(io,"orthogonalSegmentsCross");function _o(t,e,n,o,s=Yt){const r=xt(t,e,s),c=gt(t,e,s),a=xt(n,o,s),f=gt(n,o,s);return c&&f&&gt(t,n,s)?Wt(t.y,e.y,n.y,o.y)>s:r&&a&&xt(t,n,s)?Wt(t.x,e.x,n.x,o.x)>s:!1}l(_o,"sameAxisSegmentsOverlap");function We(t,e,n,o,{epsilon:s=Yt,skipDegenerateOther:r=!1}={}){for(const c of n){if(c===o||c.isLayoutOnly)continue;const a=c.points;if(!(!a||a.length<2))for(let f=0;f<a.length-1;f++){const h=a[f],p=a[f+1];if(!(r&&ce(h,p,s))&&(io(t,e,h,p,s)||_o(t,e,h,p,s)))return!0}}return!1}l(We,"segmentConflictsWithAnyEdge");function ue(t,e,n,o,s=Yt){const r=xt(t,e,s),c=gt(t,e,s),a=xt(n,o,s),f=gt(n,o,s);if(!(r&&f||c&&a))return!1;const h=r?{a:t,b:e}:{a:n,b:o},p=r?{a:n,b:o}:{a:t,b:e},x=h.a.y,S=Math.min(h.a.x,h.b.x),d=Math.max(h.a.x,h.b.x),u=p.a.x,i=Math.min(p.a.y,p.b.y),y=Math.max(p.a.y,p.b.y);return u>S+s&&u<d-s&&x>i+s&&x<y-s}l(ue,"orthogonalSegmentsStrictlyCross");function vn(t,e,n){const o=Math.min(e,n),s=Math.max(e,n);return t>o+Yt&&t<s-Yt}l(vn,"strictlyBetween");function Ho(t,e,n){return gt(t,e)&&gt(e,n)?vn(e.y,t.y,n.y):xt(t,e)&&xt(e,n)?vn(e.x,t.x,n.x):!1}l(Ho,"isCollinearIntermediate");function Do(t){let e=!1;const n=[];for(let o=0;o<t.length;o++){const s=n[n.length-1],r=t[o],c=o+1<t.length?t[o+1]:void 0;if(s&&c){if(ce(s,c)){o++,e=!0;continue}if(Ho(s,r,c)){e=!0;continue}}n.push(r)}return{points:n,changed:e}}l(Do,"simplifyPolylineOnce");function Ke(t){const e=[t[0]];for(let o=1;o<t.length;o++){const s=e[e.length-1],r=t[o];if(!gt(s,r)&&!xt(s,r)){const c=e.length>=2?e[e.length-2]:void 0,f=(c?gt(c,s):!1)?{x:s.x,y:r.y}:{x:r.x,y:s.y};e.push(f)}e.push(r)}const n=[];for(const o of e){const s=n[n.length-1];(!s||!ce(s,o))&&n.push(o)}return n}l(Ke,"orthogonalizePolyline");function de(t){if(t.length<3)return t;let e=[...t];for(let n=0;n<32;n++){const o=Do(e);if(e=o.points,!o.changed)break}return e}l(de,"simplifyPolyline");var it=.001,ur=.5,Lo=4;function co(t,e,n){const o=t;if(o.isLayoutOnly||!o.points||o.points.length<n)return;const s=o.start?e.get(o.start):void 0,r=o.end?e.get(o.end):void 0;return{edge:o,points:o.points,srcRect:s?te(s):void 0,dstRect:r?te(r):void 0}}l(co,"endpointContextFor");function Xo(t,e,n){if(xt(t,e,it))return{x:t.x<n.left?n.left:n.right,y:t.y};if(gt(t,e,it)){const o=t.y<n.top?n.top:n.bottom;return{x:t.x,y:o}}return{x:Math.min(n.right,Math.max(n.left,t.x)),y:Math.min(n.bottom,Math.max(n.top,t.y))}}l(Xo,"segmentEnterPoint");function Ln(t,e,n){const o=n?1:-1;let s=n?0:t.length-1;for(;s>=0&&s<t.length&&no(t[s],e,ur);)s+=o;if(s<0||s>=t.length)return t;const r=s-o;if(r<0||r>=t.length)return t;const c=Xo(t[s],t[r],e);return n?[c,...t.slice(s)]:[...t.slice(0,s+1),c]}l(Ln,"clipEndpoint");function Yo(t,e){for(const n of t){const o=co(n,e,2);if(!o)continue;let s=[...o.points];o.srcRect&&(s=Ln(s,o.srcRect,!0)),o.dstRect&&(s=Ln(s,o.dstRect,!1)),s=de(Ke(s)),s=ao(s,o.srcRect,o.dstRect),o.edge.points=de(Ke(s))}}l(Yo,"clipEdgeEndpointsToNodeBoundaries");function Tn(t,e,n,o=!1){if(xt(t,e,it)){if(e.y<n.top-it||e.y>n.bottom+it)return e;if(o){if(t.x<n.left-it)return{x:n.left,y:t.y};if(t.x>n.right+it)return{x:n.right,y:t.y}}return{x:Math.abs(e.x-n.left)<=Math.abs(e.x-n.right)?n.left:n.right,y:t.y}}if(gt(t,e,it)){if(e.x<n.left-it||e.x>n.right+it)return e;if(o){if(t.y<n.top-it)return{x:t.x,y:n.top};if(t.y>n.bottom+it)return{x:t.x,y:n.bottom}}const s=Math.abs(e.y-n.top)<=Math.abs(e.y-n.bottom);return{x:t.x,y:s?n.top:n.bottom}}return e}l(Tn,"snapEndpointToBoundary");function qe(t,e,n){const o=t[e];for(let s=e+n;s>=0&&s<t.length;s+=n){const r=t[s];if(!ce(r,o,it))return r}return t[e+n]}l(qe,"firstDistinctAdjacent");function Ze(t,e){const n=t+Lo,o=e-Lo;return n<=o?{lo:n,hi:o}:{lo:(t+e)/2,hi:(t+e)/2}}l(Ze,"cornerClearanceRange");function wn(t,e,n){const{lo:o,hi:s}=Ze(e,n);return Math.min(s,Math.max(o,t))}l(wn,"clampToCornerClearance");function Go(t){const e=Math.max(...t.map(o=>o.lo)),n=Math.min(...t.map(o=>o.hi));if(!(e>n))return{lo:e,hi:n}}l(Go,"intersectRanges");function En(t,e){return e==="left"||e==="right"?Ze(t.top,t.bottom):Ze(t.left,t.right)}l(En,"clearanceRangeForSide");function Je(t,e,n){const o=t.y>=n.top-it&&t.y<=n.bottom+it,s=t.x>=n.left-it&&t.x<=n.right+it;if(xt(t,e,it)&&o){if(Math.abs(t.x-n.left)<it)return"left";if(Math.abs(t.x-n.right)<it)return"right"}if(gt(t,e,it)&&s){if(Math.abs(t.y-n.top)<it)return"top";if(Math.abs(t.y-n.bottom)<it)return"bottom"}}l(Je,"terminalSideForSegment");function Pe(t){return t==="left"||t==="right"}l(Pe,"isHorizontalSide");function zo(t,e,n,o,s){const r=[],c=n?Je(t,e,n):void 0,a=o?Je(e,t,o):void 0;return n&&c&&Pe(c)===s&&r.push(En(n,c)),o&&a&&Pe(a)===s&&r.push(En(o,a)),r.length>0?Go(r):void 0}l(zo,"straightClearanceRange");function An(t,e,n,o,s){const r=zo(t,e,n,o,s);if(!r)return;const c=s?t.y:t.x,a=Math.min(r.hi,Math.max(r.lo,c));if(!(Math.abs(a-c)<it))return s?[{x:t.x,y:a},{x:e.x,y:a}]:[{x:a,y:t.y},{x:a,y:e.y}]}l(An,"clearStraightEndpointCornerAxis");function ao(t,e,n){if(t.length!==2)return t;const[o,s]=t;return xt(o,s,it)?An(o,s,e,n,!0)??t:gt(o,s,it)?An(o,s,e,n,!1)??t:t}l(ao,"clearStraightEndpointCornerConnections");function $o(t,e,n){return Pe(n)?{x:t.x,y:wn(t.y,e.top,e.bottom)}:{x:wn(t.x,e.left,e.right),y:t.y}}l($o,"cornerClearedEndpoint");function Vo(t,e,n,o,s,r){const c=t.map(a=>({...a}));for(let a=e;a>=0&&a<t.length;a+=n){const f=t[a];if(r&&!xt(f,o,it)||!r&&!gt(f,o,it))break;r?c[a].y=s.y:c[a].x=s.x}return c}l(Vo,"moveCollinearEndpointRun");function Rn(t,e,n){if(t.length<2)return t;const o=n?0:t.length-1,s=n?1:-1,r=t[o],c=qe(t,o,s);if(!c)return t;const a=Je(r,c,e);if(!a)return t;const f=Pe(a),h=$o(r,e,a);return ce(r,h,it)?t:Vo(t,o,s,r,h,f)}l(Rn,"clearEndpointCornerConnection");function Nn(t,e,n){const o=Math.min(t.x,e.x)>=n.left-it&&Math.max(t.x,e.x)<=n.right+it,s=Math.min(t.y,e.y)>=n.top-it&&Math.max(t.y,e.y)<=n.bottom+it;if(Math.abs(t.y-n.top)<it&&Math.abs(e.y-n.top)<it&&o)return"top";if(Math.abs(t.y-n.bottom)<it&&Math.abs(e.y-n.bottom)<it&&o)return"bottom";if(Math.abs(t.x-n.left)<it&&Math.abs(e.x-n.left)<it&&s)return"left";if(Math.abs(t.x-n.right)<it&&Math.abs(e.x-n.right)<it&&s)return"right"}l(Nn,"borderSideForSegment");function On(t,e,n,o){switch(t){case"top":return gt(e,n,it)&&n.y<o.top-it;case"bottom":return gt(e,n,it)&&n.y>o.bottom+it;case"left":return xt(e,n,it)&&n.x<o.left-it;case"right":return xt(e,n,it)&&n.x>o.right+it}}l(On,"leavesOutward");function Bn(t,e,n){if(t.length<3)return t;if(n){const r=Nn(t[0],t[1],e);return r&&On(r,t[1],t[2],e)?t.slice(1):t}const o=t.length-1,s=Nn(t[o-1],t[o],e);return s&&On(s,t[o-1],t[o-2],e)?t.slice(0,o):t}l(Bn,"collapseOwnBorderStub");function jo(t,e,n){let o=t;if(e){const r=qe(o,0,1);if(r){const c=Tn(r,o[0],e);c!==o[0]&&(o=[c,...o.slice(1)])}o=Bn(o,e,!0)}if(n){const r=o.length-1,c=qe(o,r,-1);if(c){const a=Tn(c,o[r],n,!0);a!==o[r]&&(o=[...o.slice(0,r),a])}o=Bn(o,n,!1)}const s=ao(o,e,n);return s!==o||o.length===2?s:(e&&(o=Rn(o,e,!0)),n&&(o=Rn(o,n,!1)),o)}l(jo,"snapAndCollapseEndpoints");function Pn(t,e){for(const n of t){const o=co(n,e,2);if(!o)continue;const s=pt(o.points,it),r=jo(s,o.srcRect,o.dstRect);if(r.length<3){o.edge.points=r;continue}const c=[r[0],{...r[0]},...r.slice(1,-1),r[r.length-1],{...r[r.length-1]}];o.edge.points=c}}l(Pn,"prepareEdgeEndpointsForRenderer");function lo(t){return new Map(t.map(e=>[e.id,e]))}l(lo,"buildNodeMap");function Uo(t,e){let n=t.parentId,o=null;for(;n;){const s=e.get(n);if(!(s!=null&&s.isGroup))break;o=s.id,n=s.parentId}return o}l(Uo,"resolveTopLevelGroupId");function kn(t,e){let n=0,o=t.parentId;for(;o;){const s=e.get(o);if(!(s!=null&&s.isGroup))break;n++,o=s.parentId}return n}l(kn,"groupDepth");function fo(t){let e=1/0,n=-1/0,o=1/0,s=-1/0;for(const r of t){const c=r.x,a=r.y;if(typeof c!="number"||typeof a!="number")continue;const f=r.width??0,h=r.height??0;e=Math.min(e,c-f/2),n=Math.max(n,c+f/2),o=Math.min(o,a-h/2),s=Math.max(s,a+h/2)}return e===1/0||o===1/0?null:{minX:e,maxX:n,minY:o,maxY:s}}l(fo,"boundsForChildren");function Wo(t,e){const n=t.padding??20;t.x=(e.minX+e.maxX)/2,t.y=(e.minY+e.maxY)/2,t.width=Math.max(0,e.maxX-e.minX)+n,t.height=Math.max(0,e.maxY-e.minY)+n}l(Wo,"applyGroupBounds");function Ko(t){const e=lo(t),n=t.filter(o=>o.isGroup&&o.parentId).sort((o,s)=>kn(s,e)-kn(o,e));for(const o of n){const s=t.filter(c=>c.parentId===o.id),r=fo(s);r&&Wo(o,r)}}l(Ko,"recomputeNestedGroupBounds");function Qe(t,e){const n=t.nodes??[],o=t.edges??[],s=n.filter(f=>!f.isGroup);let r=1/0,c=-1/0;for(const f of s){const h=f[e];typeof h=="number"&&(r=Math.min(r,h),c=Math.max(c,h))}if(!Number.isFinite(r)||!Number.isFinite(c))return!1;const a=l(f=>r+c-f,"mirror");for(const f of n){const h=f[e];typeof h=="number"&&(f[e]=a(h));const p=f.groupTitleRect;p&&(f.groupTitleRect=e==="x"?{...p,left:a(p.right),right:a(p.left)}:{...p,top:a(p.bottom),bottom:a(p.top)})}for(const f of o)for(const h of f.points??[])h[e]=a(h[e]);return!0}l(Qe,"mirrorAxis");function qo(t){return(t.nodes??[]).some(n=>!n.isGroup)?Qe(t,"y"):!0}l(qo,"applyBtDirectionTransform");function Zo(t,e="LR"){const n=t.nodes??[],o=t.edges??[],s=n.filter(B=>!B.isGroup);let r=1/0,c=1/0;for(const B of s){const G=B.x??0,j=B.y??0;G<r&&(r=G),j<c&&(c=j)}if(!Number.isFinite(r)||!Number.isFinite(c))return!1;const a=36;let f=0,h=0;for(const B of s)f+=B.width??0,h+=B.height??0;const p=f/s.length,x=h/s.length,S=x>0?Math.max(1,p/x):1;for(const B of s){const G=B.x??0,tt=((B.y??0)-c)*S+a,ft=G-r;B.x=tt,B.y=ft}for(const B of o)if(B.points)for(const G of B.points){const j=G.x,ft=(G.y-c)*S+a,It=j-r;G.x=ft,G.y=It}Ko(n);const d=n.filter(B=>B.isGroup&&!B.parentId);if(d.length===0)return e==="RL"&&Qe(t,"x"),!0;const u=lo(n),i=new Map;for(const B of n){if(B.isGroup)continue;const G=Uo(B,u);if(!G)continue;const j=i.get(G)??[];j.push(B),i.set(G,j)}let y=0;for(const B of d){const G=B.padding??0;G>y&&(y=G)}const C=[];let b=1/0,L=-1/0;for(const B of d){const G=i.get(B.id)??[],j=fo(G);j&&(b=Math.min(b,j.minX),L=Math.max(L,j.maxX),C.push({lane:B,contentTop:j.minY,contentBottom:j.maxY,centerY:(j.minY+j.maxY)/2}))}if(b===1/0||L===-1/0)return!0;const v=Math.max(0,L-b),m=Math.max(y,10),I=v+2*m,T=a+I,O=(b+L)/2-I/2-a,k=O+T/2,D=Math.max(y,a);C.sort((B,G)=>B.centerY-G.centerY);for(let B=0;B<C.length;B++){const G=C[B];let j,tt;if(B===0?j=G.contentTop-D:j=(C[B-1].contentBottom+G.contentTop)/2,B===C.length-1)tt=G.contentBottom+D;else{const Dt=C[B+1];tt=(G.contentBottom+Dt.contentTop)/2}const ft=Math.max(0,tt-j),It=(j+tt)/2;G.lane.x=k,G.lane.y=It,G.lane.width=T,G.lane.height=ft,G.lane.swimlaneContentTop=G.contentTop,G.lane.groupTitleRect={left:O,right:O+a,top:j,bottom:tt}}return e==="RL"&&Qe(t,"x"),!0}l(Zo,"applyLrDirectionTransform");var ae=1e-6,hr=8,Ge=hr,gr=[0,Ge,-Ge,2*Ge,-2*Ge];function Jo(t,e){const{nodeInfoById:n,realNodeRects:o}=on(e);for(const s of t){if(s.isLayoutOnly)continue;const r=s.points;if(!r||r.length<4)continue;const c=eo(pt(r,ae),ae);if(!c)continue;const{p3:a}=c,f=c.kind==="HVH",h=ro(s,n,ae);if(!h)continue;const{srcId:p,dstId:x,srcInfo:S,dstInfo:d,collinearX:u,collinearY:i}=h;if(u||i)continue;let y;const C=S.rect;for(const b of gr){let L,v,m;if(f){const k=d.cy>S.cy?C.bottom:C.top,D=S.cx+b;if(D<=C.left+ae||D>=C.right-ae)continue;L={x:D,y:k},v={x:D,y:a.y},m={x:a.x,y:a.y}}else{const k=d.cx>S.cx?C.right:C.left,D=S.cy+b;if(D<=C.top+ae||D>=C.bottom-ae)continue;L={x:k,y:D},v={x:a.x,y:D},m={x:a.x,y:a.y}}const I=ce(L,v,ae),T=ce(v,m,ae);if(I&&T||!I&&Bt(L,v,o,[p],1)||!T&&Bt(v,m,o,[x],1))continue;const A=!I&&We(L,v,t,s,{epsilon:ae,skipDegenerateOther:!0}),P=!T&&We(v,m,t,s,{epsilon:ae,skipDegenerateOther:!0});if(!(A||P)){I?y=[v,m]:T?y=[L,v]:y=[L,v,m];break}}y&&(s.points=y)}}l(Jo,"portSwapToLShape");function Qo(t,e){const{realNodeRects:r,labelNodeRects:c}=be(e.values());for(const a of t){if(a.isLayoutOnly)continue;const f=a.points;if(!f||f.length<4)continue;const h=pt(f,.001);if(h.length<4)continue;const p=h.length-1,x=h[p],S=h[p-1],d=h[p-2],u=x.x-S.x,i=x.y-S.y,y=Math.hypot(u,i);if(y>=10||y<.001)continue;const C=S.x-d.x,b=S.y-d.y;if(Math.hypot(C,b)<.001)continue;const v=Nt(S,x,.001),m=Ot(S,x,.001),I=Nt(d,S,.001),T=Ot(d,S,.001);if(!(v&&T||m&&I))continue;const A=a.end,P=a.start,O=A?e.get(A):void 0;if(!O)continue;const k=O.x??0,D=O.y??0,B=te(O);if(!B)continue;let G,j;if(T){const Z=b<0;G={x:k,y:d.y},j={x:k,y:Z?B.bottom:B.top}}else{const Z=C>0;G={x:d.x,y:D},j={x:Z?B.right:B.left,y:D}}if(Bt(G,j,r,A?[A]:[],-2)||Bt(G,j,c,[],-2))continue;if(P){const Z=e.get(P),rt=Z?te(Z):void 0;if(rt&&no(G,rt,2))continue}const tt=l((Z,rt)=>`${Z.x.toFixed(3)},${Z.y.toFixed(3)}|${rt.x.toFixed(3)},${rt.y.toFixed(3)}`,"ownSegmentKey"),ft=new Set;for(let Z=0;Z<h.length-1;Z++)ft.add(tt(h[Z],h[Z+1]));const It=l((Z,rt)=>{for(const ut of t){if(ut===a||ut.isLayoutOnly)continue;const yt=ut.points;if(!(!yt||yt.length<2))for(let St=0;St<yt.length-1;St++){const Et=yt[St],Kt=yt[St+1];if(!ft.has(tt(Et,Kt))&&ue(Z,rt,Et,Kt,.001))return!0}}return!1},"segmentCrossesOtherEdge");if(It(G,j))continue;if(p-3>=0){const Z=h[p-3],rt=[P,A].filter(ut=>!!ut);if(Bt(Z,G,r,rt,-2)||It(Z,G))continue}const _t=[...h.slice(0,p-2),G,j];a.points=_t;const nt=a.labelNodeId;if(nt){const Z=e.get(nt);if(Z){const rt=Z.width??0,ut=Z.height??0;if(rt>0&&ut>0){let yt,St,Et=-1;for(let Kt=0;Kt<_t.length-1;Kt++){const qt=_t[Kt],Zt=_t[Kt+1],se=Math.hypot(Zt.x-qt.x,Zt.y-qt.y),Le=xt(qt,Zt,.001),ge=gt(qt,Zt,.001);(Le&&se>=rt+2||ge&&se>=ut+2)&&se>Et&&(Et=se,yt=(qt.x+Zt.x)/2,St=(qt.y+Zt.y)/2)}yt!==void 0&&St!==void 0&&(Z.x=yt,Z.y=St)}}}}}l(Qo,"collapseShortTerminalStub");var et=.001,Xt=8,at=Oe,pn=l((t,e)=>gt(t,e,et)||xt(t,e,et),"orthogonallyAligned");function ts(t,e){const s=l((d,u)=>{const i=d.x??0,y=d.y??0,C=u.x-i,b=u.y-y;let L=(d.width??0)/2,v=(d.height??0)/2;return Math.abs(b)*L>Math.abs(C)*v?(b<0&&(v=-v),{x:i+(b===0?0:v*C/b),y:y+v}):(C<0&&(L=-L),{x:i+L,y:y+(C===0?0:L*b/C)})},"rectIntersect"),r=l((d,u)=>{const i=pt(d.points??[]);if(i.length<2)return;const y=u?d.start:d.end,C=y?e.get(y):void 0,b=C?te(C):void 0;if(!C||!y||!b)return;const L=u?i[0]:i[i.length-1],v=u?i[1]:i[i.length-2],m=s(C,L);let I=L;if(pn(v,m)&&(I=v),gt(m,I,et))return{edge:d,edgeId:String(d.id??""),nodeId:y,atStart:u,orientation:"V",coord:m.x,min:Math.min(m.y,I.y),max:Math.max(m.y,I.y),boundary:m,railEnd:I,rect:b};if(xt(m,I,et))return{edge:d,edgeId:String(d.id??""),nodeId:y,atStart:u,orientation:"H",coord:m.y,min:Math.min(m.x,I.x),max:Math.max(m.x,I.x),boundary:m,railEnd:I,rect:b}},"terminalLaneFor"),c=l((d,u)=>Math.max(0,Math.min(d.max,u.max)-Math.max(d.min,u.min)),"projectedOverlapLength"),a=l((d,u)=>d.nodeId!==u.nodeId||d.orientation!==u.orientation?!1:d.orientation==="H"?(Math.abs(d.boundary.x-d.rect.left)<1||Math.abs(d.boundary.x-d.rect.right)<1)&&gt(d.boundary,u.boundary,1):(Math.abs(d.boundary.y-d.rect.top)<1||Math.abs(d.boundary.y-d.rect.bottom)<1)&&xt(d.boundary,u.boundary,1),"sameTerminalFace"),f=l((d,u)=>d.nodeId!==u.nodeId||d.orientation!==u.orientation?!1:c(d,u)>=Xt&&Math.abs(d.coord-u.coord)<.5,"exactTerminalLaneConflict"),h=l((d,u)=>{if(d.nodeId!==u.nodeId||d.orientation!==u.orientation||d.orientation!=="H"||d.atStart===u.atStart)return!1;const i=c(d,u);if(i<Xt)return!1;const y=d.rect.bottom-d.rect.top;return i<y||i>2*y?!1:a(d,u)&&Math.abs(d.coord-u.coord)<16},"nearTerminalLaneConflict"),p=l((d,u)=>{const i=pt(d.edge.points??[]);if(i.length<2)return;const y=d.orientation==="V"?{x:d.boundary.x+u,y:d.boundary.y}:{x:d.boundary.x,y:d.boundary.y+u},C=d.orientation==="V"?{x:d.railEnd.x+u,y:d.railEnd.y}:{x:d.railEnd.x,y:d.railEnd.y+u};if(!l(()=>Math.abs(d.boundary.y-d.rect.top)<1||Math.abs(d.boundary.y-d.rect.bottom)<1?xt(y,d.boundary,et)&&y.x>=d.rect.left+1&&y.x<=d.rect.right-1:Math.abs(d.boundary.x-d.rect.left)<1||Math.abs(d.boundary.x-d.rect.right)<1?gt(y,d.boundary,et)&&y.y>=d.rect.top+1&&y.y<=d.rect.bottom-1:!1,"boundaryStaysOnSameFace")())return;if(d.atStart){const I=i.length>1&&ce(i[1],d.railEnd,et),T=i.slice(I?2:1),A=T[0];return A&&!pn(A,C)?void 0:[y,C,...T]}const L=i.length>1&&ce(i[i.length-2],d.railEnd,et),v=i.slice(0,L?-2:-1),m=v[v.length-1];if(!(m&&!pn(m,C)))return[...v,C,y]},"shiftedCandidate"),x=l(d=>{const u=d.edge,i=pt(u.points??[]);if(i.length!==2)return!1;const y=u.start,C=u.end,b=y?e.get(y):void 0,L=C?e.get(C):void 0;if(!b||!L)return!1;const v=b.x??0,m=b.y??0,I=L.x??0,T=L.y??0,[A,P]=i;return xt(A,P,et)&&Math.abs(m-T)<1&&Math.abs(v-I)>1||gt(A,P,et)&&Math.abs(v-I)<1&&Math.abs(m-T)>1},"laneIsStraightCollinearConnector"),S=[-7,7,-14,14,-21,21];for(let d=0;d<8;d++){const u=t.filter(y=>!y.isLayoutOnly).flatMap(y=>[r(y,!0),r(y,!1)]).filter(y=>!!y);let i=!1;for(let y=0;y<u.length&&!i;y++)for(let C=y+1;C<u.length&&!i;C++){const b=u[y],L=u[C];if(b.edge===L.edge||!(f(b,L)||h(b,L)))continue;const v=!f(b,L),m=[b,L].sort((I,T)=>{const A=x(I),P=x(T);return A!==P?Number(A)-Number(P):+!T.atStart-+!I.atStart});for(const I of m){for(const T of S){const A=p(I,T);if(!A)continue;const P=r({...I.edge,points:A},I.atStart);if(!(!P||u.some(O=>O.edge!==I.edge&&(f(P,O)||v&&h(P,O))))){I.edge.points=A,i=!0;break}}if(i)break}}if(!i)return}}l(ts,"separateSharedRenderedTerminalLanes");function es(t,e){const{realNodeRects:o,labelNodeRects:s}=be(e.values()),r=l((a,f)=>{const h=a.start,p=a.end,x=at(f);if(x.length!==f.length-1)return!1;const S=[h,p].filter(d=>!!d);for(const d of x)if(Bt(d.a,d.b,o,S,-2)||Bt(d.a,d.b,s,[],-2))return!1;for(const d of t){if(d===a||d.isLayoutOnly)continue;const u=d.points;if(!(!u||u.length<2)){for(const i of x)for(const y of at(pt(u)))if(fe(i,y,.5)>=Xt||ue(i.a,i.b,y.a,y.b,et))return!1}}return!0},"candidateIsSafe"),c=l((a,f)=>{if(f+4>=a.length)return;const h=a[f],p=a[f+1],x=a[f+2],S=a[f+3],d=a[f+4],u=Nt(h,p)&&Ot(p,x)&&Nt(x,S)&&Ot(S,d)&&gt(h,S,et)&&gt(h,d,et)&&gt(p,x,et)&&(p.x-h.x)*(S.x-x.x)<0,i=Ot(h,p)&&Nt(p,x)&&Ot(x,S)&&Nt(S,d)&&xt(h,S,et)&&xt(h,d,et)&&xt(p,x,et)&&(p.y-h.y)*(S.y-x.y)<0;if(u||i)return pt([...a.slice(0,f+1),d,...a.slice(f+5)]);if(f+5>=a.length)return;const y=a[f+5],C=Ot(h,p)&&Nt(p,x)&&Ot(x,S)&&Nt(S,d)&&Ot(d,y)&&gt(h,d,et)&&gt(h,y,et)&&gt(x,S,et)&&(x.x-p.x)*(d.x-S.x)<0,b=Nt(h,p)&&Ot(p,x)&&Nt(x,S)&&Ot(S,d)&&Nt(d,y)&&xt(h,d,et)&&xt(h,y,et)&&xt(x,S,et)&&(x.y-p.y)*(d.y-S.y)<0;if(!(!C&&!b))return pt([...a.slice(0,f+1),y,...a.slice(f+6)])},"withoutDogleg");for(let a=0;a<8;a++){let f=!1;for(const h of t){if(h.isLayoutOnly)continue;const p=pt(h.points??[]);for(let x=0;x<=p.length-5;x++){const S=c(p,x);if(!(!S||!r(h,S))){h.points=S,f=!0;break}}if(f)break}if(!f)return}}l(es,"collapseRedundantRectangularDoglegs");function Fn(t,e){const{realNodeRects:r,labelNodeRects:c}=be(e.values()),a=t.filter(u=>!u.isLayoutOnly),f=l((u,i,y)=>pt(u===i?y??[]:u.points??[]),"pointsFor"),h=l((u,i)=>{let y=0;for(let C=0;C<a.length;C++){const b=at(f(a[C],u,i));for(let L=C+1;L<a.length;L++){const v=at(f(a[L],u,i));for(const m of b)for(const I of v)ue(m.a,m.b,I.a,I.b,et)&&y++}}return y},"strictCrossingCount"),p=l(u=>{const i=at(u);if(i.length!==3)return;const y=i[1];if(!(i[0].horizontal===y.horizontal||i[2].horizontal===y.horizontal))return{index:y.index,horizontal:y.horizontal,vertical:y.vertical,segment:y}},"middleRail"),x=l((u,i)=>{const y=[u.start,u.end].filter(C=>!!C);return r.filter(C=>{if(y.includes(C.id))return!1;const b=C.rect;return i.horizontal?Wt(i.a.x,i.b.x,b.left,b.right)>=Xt&&i.a.y>=b.top-2&&i.a.y<=b.bottom+2:Wt(i.a.y,i.b.y,b.top,b.bottom)>=Xt&&i.a.x>=b.left-2&&i.a.x<=b.right+2})},"blockingRectsFor"),S=l((u,i,y)=>{const C=u.map(L=>({...L}));if(i.horizontal)C[i.index].y=y,C[i.index+1].y=y;else if(i.vertical)C[i.index].x=y,C[i.index+1].x=y;else return;const b=de(pt(C));return at(b).length===b.length-1?b:void 0},"candidateByMovingRail"),d=l((u,i,y)=>{const C=[u.start,u.end].filter(L=>!!L),b=at(i);if(b.length!==i.length-1)return!1;for(const L of b)if(Bt(L.a,L.b,r,C,-2)||Bt(L.a,L.b,c,[],-2))return!1;for(const L of a)if(L!==u){for(const v of b)for(const m of at(f(L)))if(fe(v,m,.5)>=Xt)return!1}return h(u,i)<=y},"candidateIsSafe");for(let u=0;u<8;u++){const i=h();let y=!1;for(const C of a){const b=f(C),L=p(b);if(!L)continue;const v=x(C,L.segment);if(v.length===0)continue;const m=L.horizontal?[Math.min(...v.map(I=>I.rect.top))-20,Math.max(...v.map(I=>I.rect.bottom))+20]:[Math.min(...v.map(I=>I.rect.left))-20,Math.max(...v.map(I=>I.rect.right))+20];for(const I of m){const T=S(b,L.segment,I);if(!(!T||!d(C,T,i))){C.points=T,y=!0;break}}if(y)break}if(!y)return}}l(Fn,"liftObstacleHuggingSameSideRails");function _n(t,e){const o=l(f=>{const h=f.groupTitleRect;if(!(!h||typeof h.left!="number"||typeof h.right!="number"||typeof h.top!="number"||typeof h.bottom!="number"||!Number.isFinite(h.left)||!Number.isFinite(h.right)||!Number.isFinite(h.top)||!Number.isFinite(h.bottom)||h.right<=h.left||h.bottom<=h.top))return{left:h.left,right:h.right,top:h.top,bottom:h.bottom}},"validTitleRect"),s=l(f=>{if(!f.isGroup||f.parentId)return;const h=f.direction,p=typeof h=="string"?h.toUpperCase():"";if(p==="LR"||p==="RL"||p==="BT")return;const x=o(f),S=f.y,d=f.height;if(!x||typeof S!="number"||typeof d!="number"||!Number.isFinite(S)||!Number.isFinite(d)||d<=0)return;const u=x.right-x.left,i=x.bottom-x.top;if(!(i<=0||u<i))return{node:f,rect:x}},"topLaneTitleFor"),r=l((f,h)=>{if(!f.horizontal)return!1;const p=f.a.y;return p<=h.top+et||p>=h.bottom-et?!1:Wt(f.a.x,f.b.x,h.left,h.right)>=Xt},"horizontalSegmentIntersectsTitle"),c=[...e.values()].map(s).filter(f=>!!f);if(c.length===0)return;let a=0;for(const f of t){if(f.isLayoutOnly)continue;const h=pt(f.points??[]);for(const p of at(h))for(const x of c)r(p,x.rect)&&(a=Math.max(a,x.rect.bottom-p.a.y+4))}if(!(a<=et))for(const f of c){const h=f.node.y,p=f.node.height;typeof h!="number"||typeof p!="number"||!Number.isFinite(h)||!Number.isFinite(p)||p<=0||(f.node.y=h-a/2,f.node.height=p+a,f.node.groupTitleRect={...f.rect,top:f.rect.top-a,bottom:f.rect.bottom-a})}}l(_n,"liftTopLaneTitleBandsAboveRails");function Hn(t,e){const o=l(h=>{const p=h.groupTitleRect;if(!(!p||typeof p.left!="number"||typeof p.right!="number"||typeof p.top!="number"||typeof p.bottom!="number"||!Number.isFinite(p.left)||!Number.isFinite(p.right)||!Number.isFinite(p.top)||!Number.isFinite(p.bottom)||p.right<=p.left||p.bottom<=p.top))return{left:p.left,right:p.right,top:p.top,bottom:p.bottom}},"validTitleRect"),s=l(h=>{if(!h.isGroup||h.parentId||h.direction!=="LR")return;const x=o(h),S=h.x,d=h.width;if(!x||typeof S!="number"||typeof d!="number"||!Number.isFinite(S)||!Number.isFinite(d)||d<=0)return;const u=x.right-x.left,i=x.bottom-x.top;if(!(u<=0||i<u))return{node:h,rect:x}},"leftLaneTitleFor"),r=l((h,p)=>{if(!h.vertical)return!1;const x=h.a.x;return x<=p.left+et||x>=p.right-et?!1:Wt(h.a.y,h.b.y,p.top,p.bottom)>=Xt},"verticalSegmentIntersectsTitle"),c=l((h,p)=>{if(!h.horizontal)return!1;const x=h.a.y;return x<=p.top+et||x>=p.bottom-et?!1:Wt(h.a.x,h.b.x,p.left,p.right)>=Xt},"horizontalSegmentIntersectsTitle"),a=[...e.values()].map(s).filter(h=>!!h);if(a.length===0)return;let f=0;for(const h of t){if(h.isLayoutOnly)continue;const p=pt(h.points??[]);for(const x of at(p))for(const S of a)if(r(x,S.rect))f=Math.max(f,S.rect.right-x.a.x+4);else if(c(x,S.rect)){const d=Math.min(x.a.x,x.b.x);f=Math.max(f,S.rect.right-d+4)}}if(!(f<=et))for(const h of a){const p=h.node.x,x=h.node.width;typeof p!="number"||typeof x!="number"||!Number.isFinite(p)||!Number.isFinite(x)||x<=0||(h.node.x=p-f/2,h.node.width=x+f,h.node.groupTitleRect={...h.rect,left:h.rect.left-f,right:h.rect.right-f})}}l(Hn,"shiftLeftLaneTitleBandsLeftOfRails");function ns(t,e){const{realNodeRects:o}=be(e.values()),s=t.filter(u=>!u.isLayoutOnly),r=l((u,i=new Map)=>pt(i.get(u)??u.points??[]),"replacementPointsFor"),c=l((u=new Map)=>{let i=0;for(let y=0;y<s.length;y++){const C=at(r(s[y],u));for(let b=y+1;b<s.length;b++){const L=at(r(s[b],u));for(const v of C)for(const m of L)ue(v.a,v.b,m.a,m.b,et)&&i++}}return i},"crossingCount"),a=l((u=new Map)=>s.reduce((i,y)=>i+oe(r(y,u)),0),"totalBends"),f=l(u=>{const i=r(u);if(i.length<4)return;const y=i[i.length-2],C=i[i.length-1];if(!(!Nt(y,C,et)&&!Ot(y,C,et)))return{tailStart:y,terminal:C}},"terminalTailFor"),h=l((u,i)=>{const y=r(u);if(y.length<3)return;const C=y[0],b=y[1];let L;if(Nt(C,b,et))L={x:b.x,y:i.tailStart.y};else if(Ot(C,b,et))L={x:i.tailStart.x,y:b.y};else return;const v=de(pt([C,b,L,i.tailStart,i.terminal]));return at(v).length===v.length-1?v:void 0},"candidateWithDestinationTail"),p=l((u,i)=>{const y=[u.start,u.end].filter(C=>!!C);for(const C of at(i))if(Bt(C.a,C.b,o,y,-2))return!0;return!1},"pathHasNodeHit"),x=l((u,i,y)=>{for(const C of s)if(C!==u){for(const b of at(i))for(const L of at(r(C,y)))if(fe(b,L,.5)>=Xt)return!0}return!1},"pathHasSharedTrack"),S=l((u,i,y)=>!p(u,i)&&!x(u,i,y),"candidateIsSafe"),d=l(()=>{const u=new Map;for(const i of s){const y=i.end;if(!y||!e.has(y)||r(i).length<4)continue;const b=u.get(y)??[];b.push(i),u.set(y,b)}return u},"edgesByDestination");for(let u=0;u<4;u++){const i=c();if(i===0)return;const y=a();let C,b=i,L=y;for(const v of d().values())for(let m=0;m<v.length;m++)for(let I=m+1;I<v.length;I++){const T=v[m],A=v[I],P=f(T),O=f(A);if(!P||!O)continue;const k=h(T,O),D=h(A,P);if(!k||!D)continue;const B=new Map([[T,k],[A,D]]);if(!S(T,k,B)||!S(A,D,B))continue;const G=c(B),j=a(B);G>=i||G>b||G===b&&j>=L||(C=B,b=G,L=j)}if(!C)return;for(const[v,m]of C)v.points=m}}l(ns,"swapDestinationTerminalTailsToReduceCrossings");function os(t,e){const{realNodeRects:r,labelNodeRects:c}=be(e.values()),a=t.filter(v=>!v.isLayoutOnly),f=l((v,m=new Map)=>pt(m.get(v)??v.points??[]),"replacementPointsFor"),h=l((v=new Map)=>{let m=0;for(let I=0;I<a.length;I++){const T=at(f(a[I],v));for(let A=I+1;A<a.length;A++){const P=at(f(a[A],v));for(const O of T)for(const k of P)ue(O.a,O.b,k.a,k.b,et)&&m++}}return m},"strictCrossingCount"),p=l((v=new Map)=>a.reduce((m,I)=>m+oe(f(I,v)),0),"totalBends"),x=l(v=>{const m=v.start,I=v.end,T=m?e.get(m):void 0,A=I?e.get(I):void 0,P=T?te(T):void 0,O=A?te(A):void 0;return P&&O?{src:P,dst:O}:void 0},"endpointRectsFor"),S=l((v,m,I)=>{if(I.index<=0||I.index+1>=m.length-1)return;const T=x(v);if(T){if(I.vertical){const A=I.a.x,P=Math.min(T.src.left,T.dst.left),O=Math.max(T.src.right,T.dst.right),k=A<P-et?"left":A>O+et?"right":void 0;return k?{edge:v,points:m,segmentIndex:I.index,axis:"vertical",side:k,coord:A,min:Math.min(I.a.y,I.b.y),max:Math.max(I.a.y,I.b.y)}:void 0}if(I.horizontal){const A=I.a.y,P=Math.min(T.src.top,T.dst.top),O=Math.max(T.src.bottom,T.dst.bottom),k=A<P-et?"top":A>O+et?"bottom":void 0;return k?{edge:v,points:m,segmentIndex:I.index,axis:"horizontal",side:k,coord:A,min:Math.min(I.a.x,I.b.x),max:Math.max(I.a.x,I.b.x)}:void 0}}},"externalRailForSegment"),d=l(()=>{const v=[];for(const m of a){const I=f(m);for(const T of at(I)){const A=S(m,I,T);A&&v.push(A)}}return v},"collectExternalRails"),u=l((v,m)=>v.edge!==m.edge&&v.axis===m.axis&&v.side===m.side&&Wt(v.min,v.max,m.min,m.max)>=Xt,"railsInteract"),i=l(v=>{const m=[],I=new Set;for(const T of v){if(I.has(T))continue;const A=[T],P=[];for(I.add(T);A.length>0;){const O=A.pop();P.push(O);for(const k of v)!I.has(k)&&u(O,k)&&(I.add(k),A.push(k))}P.length>1&&m.push(P)}return m},"connectedComponents"),y=l(v=>{const m=[];for(const I of v)m.some(T=>Math.abs(T-I.coord)<et)||m.push(I.coord);for(;m.length<v.length;){const I=Math.min(...m),T=Math.max(...m),A=v[0].side;m.push(A==="left"||A==="top"?I-12*(v.length-m.length):T+12*(v.length-m.length))}return m},"uniqueCoordsFor"),C=l(v=>{const m=v.map(A=>A.coord),I=y(v),T=[];if(v.length<=6){const A=new Array(I.length).fill(!1),P=[],O=l(()=>{if(P.length===v.length){P.some((k,D)=>Math.abs(k-m[D])>=et)&&T.push([...P]);return}for(const[k,D]of I.entries())A[k]||(A[k]=!0,P.push(D),O(),P.pop(),A[k]=!1)},"visit");return O(),T}for(let A=0;A<m.length;A++)for(let P=A+1;P<m.length;P++){const O=[...m];[O[A],O[P]]=[O[P],O[A]],T.push(O)}return T},"coordinateAssignmentsFor"),b=l((v,m)=>{const I=new Map;for(const[A,P]of v.entries()){const O=m[A],k=I.get(P.edge)??P.points.map(D=>({x:D.x,y:D.y}));P.axis==="vertical"?(k[P.segmentIndex].x=O,k[P.segmentIndex+1].x=O):(k[P.segmentIndex].y=O,k[P.segmentIndex+1].y=O),I.set(P.edge,k)}const T=new Map;for(const[A,P]of I){const O=de(pt(P));if(at(O).length!==O.length-1)return;T.set(A,O)}return T},"replacementsForAssignment"),L=l(v=>{for(const[m,I]of v){const T=[m.start,m.end].filter(A=>!!A);for(const A of at(I))if(Bt(A.a,A.b,r,T,-2)||Bt(A.a,A.b,c,[],-2))return!1}for(let m=0;m<a.length;m++){const I=a[m],T=v.has(I),A=at(f(I,v));for(let P=m+1;P<a.length;P++){const O=a[P];if(!T&&!v.has(O))continue;const k=at(f(O,v));for(const D of A)for(const B of k)if(fe(D,B,.5)>=Xt)return!1}}return!0},"candidateIsSafe");for(let v=0;v<4;v++){const m=h();if(m===0)return;let I,T=m,A=p(),P=Number.POSITIVE_INFINITY;for(const O of i(d()))for(const k of C(O)){const D=b(O,k);if(!D||!L(D))continue;const B=h(D);if(B>=m)continue;const G=p(D),j=O.reduce((tt,ft,It)=>tt+Math.abs(k[It]-ft.coord),0);B>T||B===T&&(G>A||G===A&&j>=P)||(I=D,T=B,A=G,P=j)}if(!I)return;for(const[O,k]of I)O.points=k}}l(os,"reassignCrossingExternalRailChannels");function ss(t,e){const{realNodeRects:o,labelNodeRects:s}=be(e.values()),r=t.filter(d=>!d.isLayoutOnly),c=l((d,u,i)=>pt(d===u?i??[]:d.points??[]),"pointsFor"),a=l(d=>at(d).reduce((u,i)=>{const y=i.a.x-i.b.x,C=i.a.y-i.b.y;return u+Math.hypot(y,C)},0),"pathLength"),f=l((d,u)=>{let i=0;for(let y=0;y<r.length;y++){const C=at(c(r[y],d,u));for(let b=y+1;b<r.length;b++){const L=at(c(r[b],d,u));for(const v of C)for(const m of L)ue(v.a,v.b,m.a,m.b,et)&&i++}}return i},"strictCrossingCount"),h=l((d,u)=>{if(d.horizontal){const i=d.a.y;return(Math.abs(i-u.top)<1||Math.abs(i-u.bottom)<1)&&Wt(d.a.x,d.b.x,u.left,u.right)>=Xt}if(d.vertical){const i=d.a.x;return(Math.abs(i-u.left)<1||Math.abs(i-u.right)<1)&&Wt(d.a.y,d.b.y,u.top,u.bottom)>=Xt}return!1},"segmentRunsAlongRectBorder"),p=l(d=>{const u=[d.start,d.end].filter(y=>!!y),i=[];for(const y of u){const C=e.get(y),b=C?te(C):void 0;b&&i.push(b)}return i},"endpointRectsFor"),x=l((d,u)=>{if(u+3>=d.length)return[];const i=d[u],y=d[u+1],C=d[u+2],b=d[u+3],L=Nt(i,y,et)&&Ot(y,C,et)&&Nt(C,b,et),v=Ot(i,y,et)&&Nt(y,C,et)&&Ot(C,b,et);if(!L&&!v)return[];if(!(L?Math.sign(y.x-i.x)!==Math.sign(b.x-C.x):Math.sign(y.y-i.y)!==Math.sign(b.y-C.y)))return[];const I=gt(i,b,et)||xt(i,b,et)?[]:[{x:i.x,y:b.y},{x:b.x,y:i.y}],T=I.length===0?[[...d.slice(0,u+1),...d.slice(u+3)]]:I.map(P=>[...d.slice(0,u+1),P,...d.slice(u+3)]),A=new Set;return T.map(P=>de(pt(P))).filter(P=>{if(at(P).length!==P.length-1||!P.some(k=>ce(k,b,et)))return!1;const O=P.map(k=>`${k.x.toFixed(3)},${k.y.toFixed(3)}`).join("|");return A.has(O)?!1:(A.add(O),!0)})},"shortcutCandidatesAt"),S=l((d,u,i)=>{const y=[d.start,d.end].filter(b=>!!b),C=p(d);for(const b of at(u))if(Bt(b.a,b.b,o,y,-2)||Bt(b.a,b.b,s,[],-2)||C.some(L=>h(b,L)))return!1;for(const b of r)if(b!==d){for(const L of at(u))for(const v of at(c(b)))if(fe(L,v,.5)>=Xt)return!1}return f(d,u)<=i},"candidateIsSafe");for(let d=0;d<8;d++){const u=f();let i,y,C=u,b=Number.POSITIVE_INFINITY,L=Number.POSITIVE_INFINITY;for(const v of r){const m=c(v),I=oe(m,et),T=a(m);for(let A=0;A<=m.length-4;A++)for(const P of x(m,A)){const O=oe(P,et),k=a(P);if(!(O<I||O===I&&k<T-et)||!S(v,P,u))continue;const B=f(v,P);B>C||B===C&&(O>b||O===b&&k>=L)||(i=v,y=P,C=B,b=O,L=k)}}if(!i||!y)return;i.points=y}}l(ss,"shortcutRedundantOrthogonalJogs");function rs(t,e){const c=[];for(const R of e.values()){if(R.isGroup||R.isEdgeLabel)continue;const F=R.x??0,_=R.y??0,V=te(R);V&&c.push({id:String(R.id??""),cx:F,cy:_,rect:V})}if(c.length===0)return;const a=new Map(c.map(R=>[R.id,R])),f=c.map(R=>({id:R.id,rect:R.rect})),h=["top","bottom","left","right"],p={top:Math.min(...c.map(R=>R.rect.top))-20,bottom:Math.max(...c.map(R=>R.rect.bottom))+20,left:Math.min(...c.map(R=>R.rect.left))-20,right:Math.max(...c.map(R=>R.rect.right))+20},x=t.filter(R=>!R.isLayoutOnly),S=new Map(x.map((R,F)=>[R,F])),d=l(R=>{const F=R==="left"||R==="top"?-1:1,_=[];for(let V=0;V<=2;V++)_.push(p[R]+F*20*V);return _},"outwardTracksForSide"),u=l((R,F=new Map)=>pt(F.get(R)??R.points??[]),"replacementPointsFor"),i=l((R,F)=>{let _=0;for(const V of R)for(const K of F)ue(V.a,V.b,K.a,K.b,et)&&_++;return _},"crossingCountBetweenSegments"),y=l((R,F)=>i(at(R),at(F)),"crossingCountBetweenPaths"),C=l((R=new Map)=>{let F=0;const _=[],V=new Set,K=[],J=l(Y=>{V.has(Y)||(V.add(Y),K.push(Y))},"addEdge");for(let Y=0;Y<x.length;Y++){const q=x[Y],g=u(q,R);for(let M=Y+1;M<x.length;M++){const E=x[M],w=y(g,u(E,R));w>0&&(F+=w,_.push({first:q,second:E,count:w}),J(q),J(E))}}return K.sort((Y,q)=>(S.get(Y)??0)-(S.get(q)??0)),{count:F,pairs:_,edgeSet:V,edges:K}},"crossingSnapshot"),b=l((R,F)=>{const _=new Set(F.keys());if(_.size===0)return R.count;let V=0;for(const J of R.pairs)(_.has(J.first)||_.has(J.second))&&(V+=J.count);let K=0;for(let J=0;J<x.length;J++){const Y=x[J],q=_.has(Y),g=u(Y,F);for(let M=J+1;M<x.length;M++){const E=x[M];!q&&!_.has(E)||(K+=y(g,u(E,F)))}}return R.count-V+K},"crossingCountWithReplacements"),L=l(R=>{const F=new Map;for(const K of R.pairs){const J=F.get(K.first)??new Set;J.add(K.second),F.set(K.first,J);const Y=F.get(K.second)??new Set;Y.add(K.first),F.set(K.second,Y)}const _=[],V=new Set;for(const K of R.edges){if(V.has(K))continue;const J=[K],Y=[];for(V.add(K);J.length>0;){const q=J.pop();Y.push(q);for(const g of F.get(q)??[])V.has(g)||(V.add(g),J.push(g))}Y.sort((q,g)=>(S.get(q)??0)-(S.get(g)??0)),Y.length>1&&_.push(Y)}return _},"crossingComponents"),v=l(R=>[R.start,R.end].filter(F=>!!F),"endpointIdsFor"),m=l(R=>{const F=[];for(const _ of L(R)){const V=new Set(_),K=new Set(_.flatMap(Y=>v(Y))),J=[..._];for(const Y of x)V.has(Y)||v(Y).some(q=>K.has(q))&&J.push(Y);J.sort((Y,q)=>(S.get(Y)??0)-(S.get(q)??0)),F.push(J)}return F},"pairSearchGroups"),I=l((R,F,_)=>b(R,new Map([[F,_]])),"crossingCountWithSingleReplacement"),T=l(R=>{const F=new Map;for(const _ of R.pairs)F.set(_.first,(F.get(_.first)??0)+_.count),F.set(_.second,(F.get(_.second)??0)+_.count);return F},"currentCrossingsByEdge"),A=l(R=>R.slice(1).reduce((F,_,V)=>{const K=R[V];return F+Math.abs(_.x-K.x)+Math.abs(_.y-K.y)},0),"pathLength"),P=l((R=new Map)=>x.reduce((F,_)=>F+oe(u(_,R)),0),"totalBends"),O=l((R=new Map)=>x.reduce((F,_)=>F+A(u(_,R)),0),"totalLength"),k=l((R,F,_=new Map)=>{const V=at(F);for(const K of x)if(K!==R){for(const J of V)for(const Y of at(u(K,_)))if(fe(J,Y,.5)>=Xt)return!0}return!1},"pathHasSegmentConflict"),D=l((R,F)=>{const _=[R.start,R.end].filter(V=>!!V);for(const V of at(F))if(Bt(V.a,V.b,f,_,-2))return!0;return!1},"pathHitsNode"),B=l((R,F)=>{const _=de(pt(F));at(_).length===_.length-1&&R.push(_)},"pushOrthogonalCandidate"),G=l(R=>R==="left"||R==="right","sideIsHorizontal"),j=l((R,F,_)=>{switch(F){case"left":return Math.min(R.x,_.x)-20;case"right":return Math.max(R.x,_.x)+20;case"top":return Math.min(R.y,_.y)-20;case"bottom":return Math.max(R.y,_.y)+20}},"localTrackForSameSide"),tt=l((R,F,_,V)=>{const K=_==="left"||_==="top"?-1:1,J=[j(F,_,V),p[_]];for(const Y of J)for(let q=0;q<=2;q++)B(R,so(F,_,V,Y+K*20*q))},"addSameSideCandidates"),ft=l((R,F,_,V,K)=>{for(const J of d(_))for(const Y of d(K))B(R,[F,{x:J,y:F.y},{x:J,y:Y},{x:V.x,y:Y},V])},"addHorizontalToVerticalCandidates"),It=l((R,F,_,V,K)=>{for(const J of d(_))for(const Y of d(K))B(R,[F,{x:F.x,y:J},{x:Y,y:J},{x:Y,y:V.y},V])},"addVerticalToHorizontalCandidates"),Dt=l((R,F,_,V,K)=>{const J=[...d("top"),...d("bottom")];for(const Y of d(_))for(const q of d(K))for(const g of J)B(R,[F,{x:Y,y:F.y},{x:Y,y:g},{x:q,y:g},{x:q,y:V.y},V])},"addHorizontalPairCandidates"),_t=l((R,F,_,V,K)=>{const J=[...d("left"),...d("right")];for(const Y of d(_))for(const q of d(K))for(const g of J)B(R,[F,{x:F.x,y:Y},{x:g,y:Y},{x:g,y:q},{x:V.x,y:q},V])},"addVerticalPairCandidates"),nt=l(R=>{const F=new Set;return R.map(_=>pt(_)).filter(_=>{const V=_.map(K=>`${K.x.toFixed(3)},${K.y.toFixed(3)}`).join("|");return F.has(V)||_.length<2?!1:(F.add(V),!0)})},"dedupeCandidatePaths"),Z=l((R,F,_,V)=>{const K=[],J=oo(R,F,_,V,20,et);J&&B(K,J),F===V&&tt(K,R,F,_);const Y=G(F),q=G(V);return Y&&!q?ft(K,R,F,_,V):!Y&&q?It(K,R,F,_,V):Y?Dt(K,R,F,_,V):_t(K,R,F,_,V),nt(K)},"buildCandidatesForSides"),rt=l((R,F,_,V)=>{const K=[...d("left"),...d("right")],J=[...d("top"),...d("bottom")];for(const Y of h){const q=ve(V,Y),g=Y==="top"||Y==="bottom"?d(Y):J;for(const M of K){B(R,[F,_,{x:M,y:_.y},{x:M,y:q.y},q]);for(const E of g)B(R,[F,_,{x:M,y:_.y},{x:M,y:E},{x:q.x,y:E},q])}}},"addVerticalDepartureOuterTrackCandidates"),ut=l((R,F,_,V)=>{const K=[...d("left"),...d("right")],J=[...d("top"),...d("bottom")];for(const Y of h){const q=ve(V,Y),g=Y==="left"||Y==="right"?d(Y):K;for(const M of J){B(R,[F,_,{x:_.x,y:M},{x:q.x,y:M},q]);for(const E of g)B(R,[F,_,{x:_.x,y:M},{x:E,y:M},{x:E,y:q.y},q])}}},"addHorizontalDepartureOuterTrackCandidates"),yt=l(R=>{const F=R.start,_=R.end,V=_?a.get(_):void 0;if(!F||!V)return[];const K=pt(R.points??[]);if(K.length<4)return[];const J=K[0],Y=K[1],q=[];return Ot(J,Y,et)?rt(q,J,Y,V):Nt(J,Y,et)&&ut(q,J,Y,V),q},"terminalPreservingOuterTrackCandidates"),St=l(R=>{const F=R.start,_=R.end,V=F?a.get(F):void 0,K=_?a.get(_):void 0;if(!V||!K)return[];const J=[];for(const Y of h){const q=ve(V,Y);for(const g of h)J.push(...Z(q,Y,ve(K,g),g))}return J.push(...yt(R)),J},"candidatePathsFor"),Et=l(()=>new Map(x.map(R=>[R,at(u(R))])),"currentSegmentsByEdge"),Kt=l((R,F,_)=>{const V=new Set;for(const K of x){if(K===R)continue;const J=_.get(K)??at(u(K));F.some(Y=>J.some(q=>fe(Y,q,.5)>=Xt))&&V.add(K)}return V},"sharedTrackConflictsFor"),qt=l((R,F,_,V)=>{const K=new Set;return St(R).map(Y=>de(pt(Y))).filter(Y=>{if(D(R,Y))return!1;const q=Y.map(g=>`${g.x.toFixed(3)},${g.y.toFixed(3)}`).join("|");return K.has(q)||Y.length<2?!1:(K.add(q),!0)}).map(Y=>{const q=at(Y);let g=0;for(const M of x)M!==R&&(g+=i(q,_.get(M)??at(u(M))));return{candidate:Y,candidateSegments:q,crossings:F.count-(V.get(R)??0)+g,bends:oe(Y,et),totalBends:oe(Y),length:A(Y)}}).filter(({crossings:Y})=>Y<=F.count).sort((Y,q)=>Y.crossings-q.crossings||Y.bends-q.bends||Y.length-q.length).slice(0,48).map(Y=>({path:Y.candidate,segments:Y.candidateSegments,sharedTrackConflicts:Kt(R,Y.candidateSegments,_),totalBends:Y.totalBends,length:Y.length}))},"pairCandidatesFor"),Zt=l((R,F,_,V,K,J)=>{let Y=0;for(const g of R.pairs)(g.first===F||g.second===F||g.first===V||g.second===V)&&(Y+=g.count);let q=i(_.segments,K.segments);for(const g of x){if(g===F||g===V)continue;const M=J.get(g)??at(u(g));q+=i(_.segments,M)+i(K.segments,M)}return R.count-Y+q},"pairCrossingCount"),se=l((R,F)=>{for(const _ of R.sharedTrackConflicts)if(_!==F)return!1;return!0},"conflictsOnlyWith"),Le=l((R,F)=>R.segments.some(_=>F.segments.some(V=>fe(_,V,.5)>=Xt)),"candidatesShareTrack"),ge=l((R,F,_,V)=>se(F,_.edge)&&se(V,R.edge)&&!Le(F,V),"pairCandidatesAreCompatible"),Te=l((R,F,_,V,K)=>{const J=Zt(R.current,F.edge,_,V.edge,K,R.baseSegments);if(!(J>=R.current.count))return{replacements:new Map([[F.edge,_.path],[V.edge,K.path]]),crossings:J,bends:R.currentBends-(R.baseBendsByEdge.get(F.edge)??0)-(R.baseBendsByEdge.get(V.edge)??0)+_.totalBends+K.totalBends,length:R.currentLength-(R.baseLengthByEdge.get(F.edge)??0)-(R.baseLengthByEdge.get(V.edge)??0)+_.length+K.length}},"scorePairReplacement"),an=l((R,F)=>R.crossings<F.crossings||R.crossings===F.crossings&&(R.bends<F.bends||R.bends===F.bends&&R.length<F.length),"pairScoreIsBetter"),ln=l((R,F,_,V)=>{let K=V;for(const J of F.candidates)for(const Y of _.candidates){if(!ge(F,J,_,Y))continue;const q=Te(R,F,J,_,Y);q&&an(q,K)&&(K=q)}return K},"bestScoreForOptionPair"),fn=l(R=>{const F=P(),_=O(),V=Et(),K=T(R),J=new Map(x.map(w=>[w,oe(u(w))])),Y=new Map(x.map(w=>[w,A(u(w))])),q=new Map,g=m(R);for(const w of g)for(const N of w){if(q.has(N))continue;const H=qt(N,R,V,K);H.length>0&&q.set(N,{edge:N,candidates:H})}let M={replacements:new Map,crossings:R.count,bends:F,length:_};const E={current:R,currentBends:F,currentLength:_,baseBendsByEdge:J,baseLengthByEdge:Y,baseSegments:V};for(const w of g){const N=new Set(w.filter(W=>R.edgeSet.has(W))),H=w.map(W=>q.get(W)).filter(W=>!!W);for(let W=0;W<H.length;W++){const ot=H[W];for(let U=W+1;U<H.length;U++){const $=H[U];!N.has(ot.edge)&&!N.has($.edge)||(M=ln(E,ot,$,M))}}}return M.replacements.size>0?M.replacements:void 0},"bestPairedReplacement");for(let R=0;R<4;R++){const F=C(),_=F.count;if(_===0)return;let V,K,J=_,Y=Number.POSITIVE_INFINITY;for(const g of F.edges){const M=oe(u(g),et);for(const E of St(g)){const w=D(g,E),N=!w&&k(g,E),H=I(F,g,E),W=oe(E,et);w||N||!(H<_||H===_&&W<M)||H>J||H===J&&W>=Y||(V=g,K=E,J=H,Y=W)}}if(V&&K){V.points=K;continue}const q=fn(F);if(!q)return;for(const[g,M]of q)g.points=M}}l(rs,"resolveRenderedOrthogonalCrossings");var pe=.001,mr=8;function is(t,e){const{nodeInfoById:n,realNodeRects:o}=on(e),s=["top","bottom","left","right"],r=20,c={top:Math.min(...o.map(i=>i.rect.top))-r,bottom:Math.max(...o.map(i=>i.rect.bottom))+r,left:Math.min(...o.map(i=>i.rect.left))-r,right:Math.max(...o.map(i=>i.rect.right))+r},a=l((i,y,C,b)=>{const L=[],v=oo(i,y,C,b,r,pe);return v&&L.push(v),y===b&&L.push(so(i,y,C,c[y])),L},"buildOrthogonalPathCandidates"),f=l((i,y)=>{for(let C=0;C<i.length-1;C++){const b=i[C],L=i[C+1];if(Bt(b,L,o,y,1))return!0}return!1},"pathHitsNode"),h=l((i,y,C=!1)=>{let b=0;const L=Oe(i,pe),v=y.start,m=y.end;for(const I of t){if(I===y||I.isLayoutOnly)continue;const T=I.start,A=I.end;if(!C&&v&&m&&(T===v||T===m||A===v||A===m))continue;const P=I.points;if(!(!P||P.length<2))for(const O of L)for(const k of Oe(P,pe)){if(io(O.a,O.b,k.a,k.b,pe,pe)){b++;continue}fe(O,k,pe)>=mr&&b++}}return b},"pathConflictCount"),p=4,x=l((i,y)=>{const C=Math.abs(i.y-y.rect.top),b=Math.abs(i.y-y.rect.bottom),L=Math.abs(i.x-y.rect.left),v=Math.abs(i.x-y.rect.right);let m="top",I=C;return b<I&&(m="bottom",I=b),L<I&&(m="left",I=L),v<I&&(m="right",I=v),m},"nearestSideOfRect"),S=new Map,d=l((i,y,C)=>{const b=S.get(i)??[];b.push({side:y,edgeId:C}),S.set(i,b)},"addFaceClaim");for(const i of t){if(i.isLayoutOnly)continue;const y=i.points??[];if(y.length<1)continue;const C=i.id??"",b=i.start,L=i.end;if(b){const v=n.get(b);v&&d(b,x(y[0],v),C)}if(L){const v=n.get(L);v&&d(L,x(y[y.length-1],v),C)}}const u=l((i,y,C)=>{var b;return((b=S.get(i))==null?void 0:b.some(L=>L.edgeId!==C&&L.side===y))??!1},"faceIsClaimed");for(const i of t){if(i.isLayoutOnly)continue;const y=i.points;if(!y||y.length<2)continue;const C=oe(y,pe);if(C<p)continue;const b=i.start,L=i.end;if(!b||!L)continue;const v=n.get(b),m=n.get(L);if(!v||!m)continue;const I=i.id??"",T=h(y,i,!0),A=h(y,i);let P,O=T,k=C;for(const D of s){if(u(b,D,I))continue;const B=ve(v,D);for(const G of s){if(u(L,G,I))continue;const j=ve(m,G);for(const tt of a(B,D,j,G)){if(f(tt,[b,L]))continue;const ft=oe(tt,pe);if(T>0){const It=h(tt,i,!0);if(It>O||It===O&&ft>=k)continue;O=It,k=ft,P=tt;continue}h(tt,i)>A||ft<k&&(k=ft,P=tt)}}}if(P){i.points=P;const D=S.get(b);D&&S.set(b,D.filter(G=>G.edgeId!==I));const B=S.get(L);B&&S.set(L,B.filter(G=>G.edgeId!==I)),d(b,x(P[0],v),I),d(L,x(P[P.length-1],m),I)}}}l(is,"simplifyDetouredEdges");var Qt=.001,To=10,ze=7;function Dn(t,e){const n=e?0:t.length-1,o=e?1:-1,s=t[n],r=t[n+o];if(!s||!r)return;const c=r.x-s.x,a=r.y-s.y;if(!(Math.abs(c)+Math.abs(a)<Qt)){if(Math.abs(a)<=Qt){const h=s.x+Math.sign(c)*To;return{left:Math.min(s.x,h),right:Math.max(s.x,h),top:s.y-ze,bottom:s.y+ze}}if(Math.abs(c)<=Qt){const h=s.y+Math.sign(a)*To;return{left:s.x-ze,right:s.x+ze,top:Math.min(s.y,h),bottom:Math.max(s.y,h)}}return{left:Math.min(s.x,r.x),right:Math.max(s.x,r.x),top:Math.min(s.y,r.y),bottom:Math.max(s.y,r.y)}}}l(Dn,"markerClearanceRectFor");function cs(t){return{left:Math.min(t.left,t.right),right:Math.max(t.left,t.right),top:Math.min(t.top,t.bottom),bottom:Math.max(t.top,t.bottom)}}l(cs,"normalizeRect");function Xn(t,e){const n=pt(e),o=Dn(n,!0),s=Dn(n,!1);return[o,s].some(r=>r&&Ue(t,cs(r)))}l(Xn,"labelOverlapsOwnMarker");function Ve(t,e){const n=[];for(const u of t){if(u.isLayoutOnly)continue;const i=u.points;if(!(!i||i.length<2))for(let y=0;y<i.length-1;y++)n.push({edgeId:u.id,p1:i[y],p2:i[y+1]})}const o=[],s=[];for(const u of e.values()){const i=u.isGroup,y=u.parentId;if(i&&!y){const b=te(u);b&&s.push({id:u.id,rect:b});continue}if(i||u.isEdgeLabel)continue;const C=te(u);C&&o.push({nodeId:u.id,rect:C})}const r=3,c=1,a=12,f=l((u,i)=>{const y=Cn(i,r);for(const{nodeId:C,rect:b}of o)if(C!==u&&Ue(y,b))return!0;return!1},"labelOverlapsForeignNode"),h=l((u,i)=>{const y=Cn(i,r);for(const C of n)if(C.edgeId!==u&&nn(C.p1,C.p2,y))return!0;return!1},"labelOverlapsForeignEdge"),p=l((u,i,y)=>f(u,y)||h(i,y),"labelOverlapsAnything"),x=[],S=l(u=>{for(const{id:i,rect:y}of s)if(ko(y,u))return i},"findContainingLane"),d=l((u,i)=>x.some(y=>y.labelId!==u&&Ue(i,y.rect)),"overlapsPlacedLabel");for(const u of t){if(u.isLayoutOnly)continue;const i=u.labelNodeId;if(!i)continue;const y=e.get(i);if(!y)continue;const C=u.points;if(!C||C.length<2)continue;const b=y.width??0,L=y.height??0;if(b<=0||L<=0)continue;const v=[];for(let nt=0;nt<C.length-1;nt++){const Z=C[nt],rt=C[nt+1],ut=Math.abs(Z.x-rt.x),yt=Math.abs(Z.y-rt.y);ut<Qt&&yt<Qt||ut>=Qt&&yt>=Qt||v.push({idx:nt,length:ut+yt,orientation:ut>=Qt?"horizontal":"vertical",midX:(Z.x+rt.x)/2,midY:(Z.y+rt.y)/2})}if(v.length===0)continue;const m=v.length>=3?v.filter(nt=>nt.idx>0&&nt.idx<v.length-1):v,I=m.length>0?m:v,T=b>=L?"horizontal":"vertical",A=l(nt=>[...nt].sort((Z,rt)=>{const ut=Z.orientation===T,yt=rt.orientation===T;if(ut!==yt)return ut?-1:1;const St=Z.length>=(Z.orientation==="horizontal"?b:L)+2,Et=rt.length>=(rt.orientation==="horizontal"?b:L)+2;return St!==Et?St?-1:1:rt.length-Z.length}),"rankSegments"),P=v[0],O=v[v.length-1],k=[.5,.25,.75,.05,.95,.15,.85,.1,.9],D=l((nt,Z)=>{const rt=C[nt.idx],ut=C[nt.idx+1];return{midX:rt.x+(ut.x-rt.x)*Z,midY:rt.y+(ut.y-rt.y)*Z}},"anchorAtT"),B=l((nt,Z,rt)=>Math.min(rt,Math.max(Z,nt)),"clamp"),G=l((nt,Z)=>nt.midX>=Z.left-Qt&&nt.midX<=Z.right+Qt&&nt.midY>=Z.top-Qt&&nt.midY<=Z.bottom+Qt,"pointInsideRectInclusive"),j=l(nt=>{const Z=Ne(nt.midX,nt.midY,b,L),rt=S(Z);if(rt)return{laneId:rt,anchor:nt,rect:Z};const ut=s.find(({rect:se})=>G(nt,se));if(!ut)return;const yt=ut.rect.left+b/2+c,St=ut.rect.right-b/2-c,Et=ut.rect.top+L/2+c,Kt=ut.rect.bottom-L/2-c;if(yt>St||Et>Kt)return;const qt={midX:B(nt.midX,yt,St),midY:B(nt.midY,Et,Kt)},Zt=Ne(qt.midX,qt.midY,b,L);return G(nt,Zt)?{laneId:ut.id,anchor:qt,rect:Zt}:void 0},"placementForAnchor"),tt=l((nt,Z,rt)=>nt.orientation==="horizontal"?Math.abs(Z.midX-rt.x):Math.abs(Z.midY-rt.y),"distanceAlongSegment"),ft=l((nt,Z)=>{const ut=(nt.orientation==="horizontal"?b/2:L/2)+a;if(nt===P){const yt=C[nt.idx];if(tt(nt,Z,yt)+Qt<ut)return!1}if(nt===O){const yt=C[nt.idx+1];if(tt(nt,Z,yt)+Qt<ut)return!1}return!0},"labelClearsTerminalEndpoints"),It=l(nt=>{const Z=A(nt);for(const rt of Z)for(const ut of k){const yt=D(rt,ut);if(!ft(rt,yt))continue;const St=j(yt);if(St&&!Xn(St.rect,C)&&!d(i,St.rect)&&!p(i,u.id,St.rect))return{laneId:St.laneId,anchor:St.anchor}}},"tryPool"),Dt=l((nt,Z,rt=!1)=>{const ut=A(nt);for(const yt of ut){const St={midX:yt.midX,midY:yt.midY};if(Z&&!ft(yt,St))continue;const Et=j(St);if(Et&&!Xn(Et.rect,C)&&!d(i,Et.rect)&&!f(i,Et.rect)&&(rt||!h(u.id,Et.rect)))return{laneId:Et.laneId,anchor:Et.anchor}}},"findLaneContainingFallback"),_t=It(I)??(I.length<v.length?It(v):void 0)??Dt(v,!0)??Dt(v,!1)??Dt(v,!1,!0);if(_t){y.x=_t.anchor.midX,y.y=_t.anchor.midY,y.parentId=_t.laneId;const nt=Ne(_t.anchor.midX,_t.anchor.midY,b,L),Z=x.findIndex(rt=>rt.labelId===i);Z>=0?x[Z]={labelId:i,rect:nt}:x.push({labelId:i,rect:nt})}}}l(Ve,"anchorLabelsToPolyline");var bn=1e-6,xr=8,wo=xr/2,yr=3;function Yn(t,e){return t<e?`${t}::${e}`:`${e}::${t}`}l(Yn,"pairKey");function as(t,e){const{nodeInfoById:n,realNodeRects:o}=on(e),s=new Map;for(const c of e){const a=c.id;if(!c.isGroup&&c.isEdgeLabel){s.set(a,{w:c.width??0,h:c.height??0});continue}}const r=l((c,a,f,h)=>{const p=Yn(a,f);let x=0;const S=l(d=>{if(!d)return;const u=s.get(d);if(!u)return;const i=h==="x"?u.w/2:u.h/2;i>x&&(x=i)},"consider");S(c.labelNodeId);for(const d of t){if(d===c||d.isLayoutOnly)continue;const u=d.start,i=d.end;!u||!i||Yn(u,i)===p&&S(d.labelNodeId)}return x>0?x+yr:0},"labelClearanceFor");for(const c of t){if(c.isLayoutOnly)continue;const a=c.points;if(!eo(a,bn))continue;const f=ro(c,n,bn);if(!f)continue;const{srcId:h,dstId:p,srcInfo:x,dstInfo:S,collinearX:d,collinearY:u}=f;if(d===u)continue;let i,y;if(d){const m=S.cy>x.cy;i={x:x.cx,y:m?x.rect.bottom:x.rect.top},y={x:S.cx,y:m?S.rect.top:S.rect.bottom}}else{const m=S.cx>x.cx;i={x:m?x.rect.right:x.rect.left,y:x.cy},y={x:m?S.rect.left:S.rect.right,y:S.cy}}if(Bt(i,y,o,[h,p],1))continue;const b=r(c,h,p,d?"x":"y"),L=b>wo?b:wo,v=[0,L,-L];for(const m of v){const I={...i},T={...y};if(d){if(I.x+=m,T.x+=m,I.x<=x.rect.left||I.x>=x.rect.right||T.x<=S.rect.left||T.x>=S.rect.right)continue}else if(I.y+=m,T.y+=m,I.y<=x.rect.top||I.y>=x.rect.bottom||T.y<=S.rect.top||T.y>=S.rect.bottom)continue;if(!Bt(I,T,o,[h,p],1)&&!We(I,T,t,c,{epsilon:bn})){c.points=[I,T];break}}}}l(as,"straightenCollinearSiblingDetours");function Gn(t,e){const{realNodeRects:f,labelNodeRects:h}=be(e.values()),p=l((m,I)=>Oe(I,.001).map(T=>({...T,edge:m,interior:T.index>=1&&T.index<=I.length-3})),"segmentsFor"),x=l(()=>{const m=[];for(const I of t){if(I.isLayoutOnly)continue;const T=I.points;!T||T.length<2||m.push(...p(I,pt(T)))}return m},"allSegments"),S=l((m,I)=>m.horizontal&&I.horizontal?Wt(m.a.x,m.b.x,I.a.x,I.b.x)>=8&&Math.abs(m.a.y-I.a.y)<7:m.vertical&&I.vertical?Wt(m.a.y,m.b.y,I.a.y,I.b.y)>=8&&Math.abs(m.a.x-I.a.x)<7:!1,"hasCrowdedParallelTrack"),d=l((m,I)=>{const T=m.start,A=m.end,P=p(m,I);if(P.length!==I.length-1)return!1;const O=[T,A].filter(D=>!!D),k=m.labelNodeId?[m.labelNodeId]:[];for(const D of P)if(Bt(D.a,D.b,f,O,-2)||Bt(D.a,D.b,h,k,-2))return!1;for(const D of t){if(D===m||D.isLayoutOnly)continue;const B=D.points;if(!(!B||B.length<2)){for(const G of P)for(const j of p(D,pt(B)))if(S(G,j)||ue(G.a,G.b,j.a,j.b,.001))return!1}}return!0},"candidateIsSafe"),u=l((m,I)=>{const T=pt(m.edge.points??[]);if(T.length<4||m.index>=T.length-1)return;const A=T.map(P=>({...P}));if(m.horizontal)A[m.index].y+=I,A[m.index+1].y+=I;else if(m.vertical)A[m.index].x+=I,A[m.index+1].x+=I;else return;return p(m.edge,A).length===A.length-1?A:void 0},"shiftedCandidate"),i=l((m,I)=>({x:m.x??(I.left+I.right)/2,y:m.y??(I.top+I.bottom)/2}),"nodeCenter"),y=l(m=>{const I=m.edge,T=pt(I.points??[]);if(T.length!==4||m.index!==1)return;const A=I.start?e.get(I.start):void 0,P=I.end?e.get(I.end):void 0,O=A?te(A):void 0,k=P?te(P):void 0,D=T.slice(m.index+2);if(!(!A||!P||!O||!k||D.length===0))return{sourceCenter:i(A,O),targetCenter:i(P,k),sourceRect:O,tail:D}},"sourceDetourContextFor"),C=l((m,I,T,A,P,O)=>{const k=A.y>=T.y,D=k?P.bottom:P.top,B=D+(k?20:-20);if(k&&m.b.y<=B+.001||!k&&m.b.y>=B-.001)return;const G=m.a.x+I;return pt([{x:T.x,y:D},{x:T.x,y:B},{x:G,y:B},{x:G,y:m.b.y},...O],.001)},"verticalSourceDetour"),b=l((m,I,T,A,P,O)=>{const k=A.x>=T.x,D=k?P.right:P.left,B=D+(k?20:-20);if(k&&m.b.x<=B+.001||!k&&m.b.x>=B-.001)return;const G=m.a.y+I;return pt([{x:D,y:T.y},{x:B,y:T.y},{x:B,y:G},{x:m.b.x,y:G},...O],.001)},"horizontalSourceDetour"),L=l((m,I)=>{const T=y(m);if(T){if(m.vertical)return C(m,I,T.sourceCenter,T.targetCenter,T.sourceRect,T.tail);if(m.horizontal)return b(m,I,T.sourceCenter,T.targetCenter,T.sourceRect,T.tail)}},"sourceDetourCandidate"),v=[-7,7,-14,14,-21,21];for(let m=0;m<12;m++){const I=x();let T=!1;for(let A=0;A<I.length&&!T;A++)for(let P=A+1;P<I.length&&!T;P++){const O=I[A],k=I[P];if(O.edge===k.edge||!S(O,k))continue;const D=[O,k].filter(B=>B.interior);for(const B of D){for(const G of v){const j=u(B,G);if(j&&d(B.edge,j)){B.edge.points=j,T=!0;break}const tt=L(B,G);if(tt&&d(B.edge,tt)){B.edge.points=tt,T=!0;break}}if(T)break}}if(!T)return}}l(Gn,"nudgeSharedInteriorSubpaths");function ls(t,e,n,o){const s=e.x-t.x,r=e.y-t.y,c=o.x-n.x,a=o.y-n.y,f=s*a-r*c;if(Math.abs(f)<1e-10)return!1;const h=n.x-t.x,p=n.y-t.y,x=(h*a-p*c)/f,S=(h*r-p*s)/f,d=.01;return x>d&&x<1-d&&S>d&&S<1-d}l(ls,"segmentsIntersect");function fs(t){const e=t.nodes??[],n=t.edges??[],o=[];if(!n.length||!e.length)return o;const s=Fo(e),r=[];for(const a of n){if(a.isLayoutOnly)continue;const f=a.points;if(!f||f.length<2)continue;const h=a.start,p=a.end,x=a.labelNodeId,S=a.id??`${h}->${p}`;for(const d of s)if(!(d.nodeId===h||d.nodeId===p)&&!(x&&d.nodeId===x)){for(let u=0;u<f.length-1;u++)if(nn(f[u],f[u+1],d,-1)){o.push({type:"edge-node-overlap",edgeId:S,targetId:d.nodeId,detail:`segment ${u} passes through node "${d.nodeId}"`});break}}for(let d=0;d<f.length-1;d++)r.push({edgeId:S,start:h,end:p,p1:f[d],p2:f[d+1]})}const c=new Set;for(let a=0;a<r.length;a++)for(let f=a+1;f<r.length;f++){const h=r[a],p=r[f];if(h.edgeId!==p.edgeId&&!(h.start===p.start||h.start===p.end||h.end===p.start||h.end===p.end)&&ls(h.p1,h.p2,p.p1,p.p2)){const x=h.edgeId<p.edgeId?`${h.edgeId}|${p.edgeId}`:`${p.edgeId}|${h.edgeId}`;c.has(x)||(c.add(x),o.push({type:"edge-edge-crossing",edgeId:h.edgeId,targetId:p.edgeId,detail:`edges "${h.edgeId}" and "${p.edgeId}" cross`}))}}if(o.length>0){const a=o.filter(h=>h.type==="edge-node-overlap").length,f=o.filter(h=>h.type==="edge-edge-crossing").length;Mn.warn(`[SWIMLANE_VALIDATE] ${o.length} issue(s) detected: ${a} edge-node overlap(s), ${f} edge crossing(s)`);for(const h of o)Mn.warn(`[SWIMLANE_VALIDATE] ${h.type}: ${h.detail}`)}return o}l(fs,"validateSwimlanesLayout");function ds(t,e){const n=t.nodes??[],o=t.edges??[],s=n.filter(a=>!a.isGroup);if((e==="LR"||e==="RL")&&s.length>0&&!Zo(t,e)||e==="BT"&&s.length>0&&!qo(t))return;for(const a of o){if(a.isLayoutOnly)continue;const f=a.points;!f||f.length<2||(a.points=de(Ke(f)))}is(o,n),as(o,n),Jo(o,n);const r=new Map;for(const a of n)r.set(String(a.id),a);Ve(o,r),Yo(o,r),Qo(o,r),Gn(o,r),ts(o,r),es(o,r),Fn(o,r),ns(o,r);const c=l(()=>{rs(o,r),os(o,r),ss(o,r),Ve(o,r),Pn(o,r),Fn(o,r),Ve(o,r),Pn(o,r)},"finalizeRenderedEdges");c(),Gn(o,r),c(),_n(o,r),Hn(o,r),_n(o,r),Hn(o,r)}l(ds,"postProcessSwimlaneLayout");function Ie(t){const e=new Map(t.nodeById),n=new Set,o=[];for(const r of t.edges){if(!e.has(r.src)||!e.has(r.dst))continue;const c=`${r.id}:${r.src}->${r.dst}`;n.has(c)||(n.add(c),o.push(r))}return{nodes:[...e.keys()],edges:o,layout:t.layout,nodeById:e}}l(Ie,"normalizeGraph");function uo(t,e){return t.edges.filter(n=>n.dst===e)}l(uo,"incoming");function us(t){const e=new Map;for(const n of t.nodes)e.set(n,[]);for(const n of t.edges)e.get(n.src).push(n.dst);return e}l(us,"buildSuccessorMap");function ho(t){const e=us(t);for(const n of e.values())n.sort((o,s)=>o.localeCompare(s));return e}l(ho,"buildSortedSuccessorMap");function sn(t){const e=new Map;for(const n of t.nodes)e.set(n,0);for(const n of t.edges)e.set(n.dst,(e.get(n.dst)??0)+1);return e}l(sn,"buildInDegreeMap");function go(t){return[...t.entries()].filter(([,e])=>e===0).map(([e])=>e).sort((e,n)=>e.localeCompare(n))}l(go,"sortedZeroInDegreeNodes");function rn(t,e=()=>!0){const n=new Map,o=new Map;for(const s of t.nodes)n.set(s,[]),o.set(s,[]);for(const s of t.edges)e(s)&&(o.get(s.src).push(s.dst),n.get(s.dst).push(s.src));return{preds:n,succs:o}}l(rn,"buildPredecessorSuccessorMaps");function mo(t,e,n,o){var c,a;let s=0;for(const f of t.nodes)o!=null&&o.skipGroups&&((c=t.nodeById.get(f))!=null&&c.isGroup)||(s=Math.max(s,n[f]??0));const r=Array.from({length:s+1},()=>[]);for(const f of e)o!=null&&o.skipGroups&&((a=t.nodeById.get(f))!=null&&a.isGroup)||r[Math.max(0,n[f]??0)].push(f);return r}l(mo,"buildLayersFromRanks");function ke(t){const e=sn(t),n=go(e),o=[],s=ho(t);for(;n.length;){const r=n.shift();o.push(r);for(const c of s.get(r)??[])if(e.set(c,(e.get(c)??0)-1),(e.get(c)??0)===0){let a=0;for(;a<n.length&&n[a]<c;)a++;n.splice(a,0,c)}}return o.length===t.nodes.length?o:null}l(ke,"topoSortIfAcyclic");function Be(t){const e=new Map;let n=0;for(const o of t)e.set(o,n),n++;return e}l(Be,"buildLayerIndex");function xo(t){const e=new Array(t.length),n=l((o,s)=>{if(s-o<=1)return 0;const r=o+s>>1;let c=n(o,r)+n(r,s),a=o,f=r,h=o;for(;a<r||f<s;)f>=s||a<r&&t[a]<=t[f]?e[h++]=t[a++]:(e[h++]=t[f++],c+=r-a);for(let p=o;p<s;p++)t[p]=e[p];return c},"count");return n(0,t.length)}l(xo,"countInversions");function hs(t){const e=Ie(t),n=new Map;for(const x of e.nodes)n.set(x,[]);for(const x of e.edges)n.get(x.src).push(x);for(const x of n.values())x.sort((S,d)=>S.dst===d.dst?S.id.localeCompare(d.id):S.dst.localeCompare(d.dst));const o=Object.create(null);for(const x of e.nodes)o[x]=0;const s=[],r=l(x=>{o[x]=1;for(const S of n.get(x)??[]){const d=S.dst;o[d]===0?r(d):o[d]===1&&s.push(S)}o[x]=2},"dfs"),c=sn(e),a=[...e.nodes.filter(x=>(c.get(x)??0)===0),...e.nodes.filter(x=>(c.get(x)??0)!==0)];for(const x of a)o[x]===0&&r(x);const f=new Set(s.map(x=>`${x.id}:${x.src}->${x.dst}`)),h=e.edges.map(x=>f.has(`${x.id}:${x.src}->${x.dst}`)?{id:x.id,src:x.dst,dst:x.src,weight:x.weight,ref:x.ref}:x);return{acyclic:{nodes:[...e.nodes],edges:h,layout:e.layout,nodeById:new Map(e.nodeById)},reversed:s}}l(hs,"removeCycles_DFS");function gs(t){const e=new Map,n=l(o=>{if(e.has(o))return e.get(o);const s=t.nodeById.get(o);if(!s)return e.set(o,null),null;const r=s.parentId;if(!r)return e.set(o,null),null;const a=n(r)??r;return e.set(o,a),a},"resolve");for(const o of t.nodes)n(o);return e}l(gs,"buildTopLaneMap");function he(t){const e=gs(t);return n=>e.get(n)??null}l(he,"createTopLaneResolver");function cn(t){const e=[];for(const n of t.layout.nodes??[])n.isGroup&&!n.parentId&&e.push(n.id);return[...new Set(e)].reverse()}l(cn,"buildTopLaneOrder");function yo(t,e){const n=cn(t);if(!e||e.length===0)return n;const o=new Set(n),s=new Set,r=[];for(const c of e)!o.has(c)||s.has(c)||(s.add(c),r.push(c));for(const c of n)s.has(c)||r.push(c);return r}l(yo,"resolveTopLaneOrder");var pr={EPSILON:1e-6},tn={GRAVITY_ITERATIONS:8,MAX_CROSSING_OPTIMIZATION_PASSES:4,DEFAULT_COMPACT_SINGLE_INPUT:!0},Eo={DEFAULT_LAYER_GAP:100,DEFAULT_NODE_GAP:40};function ms(t,e){const n=Ie(t),o=(e==null?void 0:e.laneOf)??(()=>null),s=e==null?void 0:e.rankHint,{preds:r}=rn(n);for(const m of r.values())m.sort((I,T)=>I.localeCompare(T));const c=ke(n)??[...n.nodes].sort((m,I)=>m.localeCompare(I)),a=new Map;for(const[m,I]of c.entries())a.set(I,m);const f=new Map,h=new Map;for(const m of n.nodes)h.set(m,[]);for(const m of c){const I=(r.get(m)??[]).filter(T=>f.has(T));if(I.length>0){const T=xs(m,I,{laneOf:o,rankHint:s,topoIndex:a});f.set(m,T),h.get(T).push(m)}else f.has(m)||f.set(m,null)}for(const m of n.nodes)f.has(m)||f.set(m,null);const p=new Set;for(const m of n.nodes)(f.get(m)??null)===null&&p.add(m);const x=[...p].sort((m,I)=>{const T=a.get(m)??0,A=a.get(I)??0;return T===A?m.localeCompare(I):T-A}),S=ys(n),d=new Map;for(const[m,I]of S.entries())d.set(m,[...I].sort((T,A)=>T.localeCompare(A)));const u=ps(d),i=bs(d),y=new Map;for(const m of n.nodes)y.set(m,[]);for(const m of i)for(const I of m.nodes){const T=y.get(I);T?T.push(m.id):y.set(I,[m.id])}const C=[],b=[],L=new Set,v=l(m=>{if(!L.has(m)){L.add(m),C.push(m);for(const I of h.get(m)??[])v(I);b.push(m)}},"walk");for(const m of x)v(m);for(const m of c)v(m);return{parent:f,children:h,roots:x,componentOf:u,blocks:i,nodeBlocks:y,adjacency:d,preorder:C,postorder:b,topologicalOrder:c}}l(ms,"buildDrivingTree");function xs(t,e,n){const o=n.laneOf(t);return[...e].sort((r,c)=>{var i,y;const a=n.laneOf(r),f=n.laneOf(c),h=a!=null&&a===o,p=f!=null&&f===o;if(h!==p)return h?-1:1;const x=(i=n.rankHint)==null?void 0:i[r],S=(y=n.rankHint)==null?void 0:y[c];if(x!=null&&S!=null&&x!==S)return S-x;const d=n.topoIndex.get(r)??0,u=n.topoIndex.get(c)??0;return d!==u?d-u:r.localeCompare(c)})[0]}l(xs,"chooseParent");function ys(t){const e=new Map;for(const n of t.nodes)e.set(n,new Set);for(const n of t.edges)e.get(n.src).add(n.dst),e.get(n.dst).add(n.src);return e}l(ys,"buildAdjacency");function ps(t){const e=new Map;let n=0;for(const o of t.keys()){if(e.has(o))continue;const s=[o];for(;s.length>0;){const r=s.pop();if(!e.has(r)){e.set(r,n);for(const c of t.get(r)??[])e.has(c)||s.push(c)}}n++}return e}l(ps,"assignComponents");function bs(t){const e=new Map,n=new Map,o=[],s=[];let r=0;const c=l((a,f)=>{e.set(a,++r),n.set(a,r);for(const h of t.get(a)??[])h!==f&&(e.has(h)?(e.get(h)??0)<(e.get(a)??0)&&(o.push([a,h]),n.set(a,Math.min(n.get(a)??r,e.get(h)??r))):(o.push([a,h]),c(h,a),n.set(a,Math.min(n.get(a)??r,n.get(h)??r)),(n.get(h)??0)>=(e.get(a)??0)&&s.push(Is(a,h,o,s.length))))},"visit");for(const a of t.keys())e.has(a)||c(a,null);return s}l(bs,"computeBlocks");function Is(t,e,n,o){const s=[],r=new Set;for(;n.length>0;){const c=n.pop();if(s.push(c),r.add(c[0]),r.add(c[1]),c[0]===t&&c[1]===e||c[0]===e&&c[1]===t)break}return{id:o,edges:s,nodes:[...r]}}l(Is,"popBlock");function Ms(t,e,n){const o=[...t.nodes],s=new Map;for(const[b,L]of o.entries())s.set(L,b);const r=o.length,c=new Array(r).fill(-1),a=new Array(r).fill(0),f=[],h=new Set;for(const b of o){const L=n.parent.get(b)??null,v=s.get(b);v!=null&&L==null&&(c[v]=-1,a[v]=0,h.has(b)||(h.add(b),f.push(b)))}for(;f.length>0;){const b=f.shift(),L=s.get(b);if(L==null)continue;const v=n.children.get(b)??[];for(const m of v){if(h.has(m))continue;const I=s.get(m);I!=null&&(c[I]=L,a[I]=a[L]+1,h.add(m),f.push(m))}}for(const b of o){if(h.has(b))continue;const L=s.get(b);L!=null&&(c[L]=-1,a[L]=0,h.add(b))}const p=Math.max(1,Math.ceil(Math.log2(Math.max(1,r)))+1),x=Array.from({length:p},()=>new Array(r).fill(-1));for(let b=0;b<r;b++)x[0][b]=c[b];for(let b=1;b<p;b++)for(let L=0;L<r;L++){const v=x[b-1][L];x[b][L]=v===-1?-1:x[b-1][v]}const S=l((b,L)=>{if(b===-1||L===-1)return-1;a[b]<a[L]&&([b,L]=[L,b]);const v=a[b]-a[L];for(let m=0;m<p;m++)if(v>>m&1&&(b=x[m][b],b===-1))return-1;if(b===L)return b;for(let m=p-1;m>=0;m--){const I=x[m][b],T=x[m][L];I===-1||T===-1||I!==T&&(b=I,L=T)}return x[0][b]},"lcaIndex"),d=Array.from({length:r},()=>new Map);for(const b of t.edges){let L=b.src,v=b.dst,m=e[L],I=e[v];if(m==null||I==null||(m>I&&([L,v]=[v,L],[m,I]=[I,m]),m==null||I==null||m===I))continue;const T=s.get(L),A=s.get(v);if(T==null||A==null)continue;const P=S(T,A);if(P===-1)continue;const O=d[P];for(let k=m;k<I;k++)O.set(k,(O.get(k)??0)+1)}const u=new Map,i=l((b,L)=>{if(L.size!==0)for(const[v,m]of L)b.set(v,(b.get(v)??0)+m)},"mergeInto"),y=new Set,C=l(b=>{const L=s.get(b);y.add(b);const v=L==null?void 0:d[L],m=v?new Map(v):new Map,I=n.children.get(b)??[];for(const T of I){const A=C(T),P=e[b];if(P!=null){let O=u.get(b);O||(O=new Map,u.set(b,O));let k=A.get(P)??0;const D=e[T];D!=null&&D>P&&(k+=1),O.set(T,k)}i(m,A)}return m},"dfs");for(const b of n.roots)y.has(b)||C(b);for(const b of o)y.has(b)||C(b);return u}l(Ms,"computeSubtreeCrossCounts");function Ss(t,e,n){const o=new Map,s=l(r=>{let c=n[r]??0;const a=[...e.get(r)??[]];a.sort(po(n));for(const f of a){s(f);const h=o.get(f);h!=null&&(c=Math.min(c,h))}o.set(r,c)},"annotate");for(const r of t)s(r);return o}l(Ss,"annotateMinimumLayers");function po(t){return(e,n)=>{const o=t[e]??0,s=t[n]??0;return o===s?e.localeCompare(n):o-s}}l(po,"compareByRankThenId");function Cs(t,e,n,o){let s=0;for(const f of e){const h=n[f]??0;h>s&&(s=h)}const r=Array.from({length:s+1},()=>[]),c=new Set,a=l(f=>{if(c.has(f))return;c.add(f);const h=n[f]??0;r[h]||(r[h]=[]),r[h].push(f);for(const p of o(f))a(p)},"emit");for(const f of t)a(f);for(const f of e)if(!c.has(f)){const h=n[f]??0;r[h]||(r[h]=[]),r[h].push(f),c.add(f)}return r}l(Cs,"emitNodesInTreeOrder");function vs(t){const e=[];for(const n of t){const o=new Set,s=[];for(const r of n)o.has(r)||(o.add(r),s.push(r));e.push(s)}return e}l(vs,"deduplicateLayers");function Ls(t,e,n,o){return s=>{const r=t.get(s)??[];if(r.length===0)return[];const c=e[s]??0,a=[],f=[],h=n.get(s);for(const p of r){const x=o.get(p)??c;x>c?a.push({child:p,min:x}):f.push(p)}return a.sort((p,x)=>p.min===x.min?p.child.localeCompare(x.child):p.min-x.min),f.sort((p,x)=>{const S=(h==null?void 0:h.get(p))??0,d=(h==null?void 0:h.get(x))??0;if(S!==d)return S-d;const u=o.get(p)??c,i=o.get(x)??c;return u!==i?u-i:p.localeCompare(x)}),[...a.map(p=>p.child),...f]}}l(Ls,"createChildOrderer");function en(t,e,n){const o=ms(t,{rankHint:e,laneOf:n}),{children:s,roots:r}=o;for(const x of t.nodes)s.has(x)||s.set(x,[]);const c=Ms(t,e,o),a=[...r].sort(po(e)),f=Ss(a,s,e),h=Ls(s,e,c,f);let p=Cs(a,t.nodes,e,h);return p=vs(p),p}l(en,"buildMultitreeLayerOrder");function Ts(t,e,n){const o=new Set(t),s=new Set(e),r=Be(e),c=[];for(const a of n)o.has(a.src)&&s.has(a.dst)&&c.push(r.get(a.dst));return xo(c)}l(Ts,"countCrossingsBetweenAdjacent");function zn(t,e,n){const o=[];for(const r of e){const c=n[r.src],a=n[r.dst];if(c==null||a==null||c===a)continue;let f=r.src,h=r.dst,p=c,x=a;c>a&&(f=r.dst,h=r.src,p=a,x=c);for(let S=p;S<x;S++)o.push({id:`${r.id}@${S}`,src:f,dst:h,ref:r.ref})}let s=0;for(let r=0;r+1<t.length;r++)s+=Ts(t[r],t[r+1],o);return s}l(zn,"totalCrossings");function ws(t,e){const n={...e},{preds:o}=rn(t),s=he(t),r=en(t,n,s);let c=zn(r,t.edges,n);const a=tn.MAX_CROSSING_OPTIMIZATION_PASSES;for(let f=0;f<a;f++){let h=!1;const p=[...t.nodes].sort((x,S)=>(n[S]??0)-(n[x]??0));for(const x of p){const S=n[x]??0;if(S===0)continue;let d=0;for(const C of o.get(x)??[])d=Math.max(d,(n[C]??0)+1);if(d>=S)continue;const u=S;n[x]=d;const i=en(t,n,s),y=zn(i,t.edges,n);y<c?(c=y,h=!0):n[x]=u}if(!h)break}return n}l(ws,"optimizeRanksByCrossings");function Es(t,e){const n=he(t),o=[...t.nodes].sort((s,r)=>(e[s]??0)-(e[r]??0)||s.localeCompare(r));for(const s of o){const r=n(s);if(!r)continue;const c=t.edges.filter(i=>i.src===s);if(c.length===0)continue;let a=!1,f=0;for(const i of c){const y=n(i.dst);y==null||y===r?a=!0:f++}if(f===0||a)continue;let h=0,p=!1;for(const i of t.edges){if(i.dst!==s)continue;const y=n(i.src);y&&(y===r?p=!0:h++)}if(h>0||!p)continue;const x=e[s]??0,S=x+f;let d=0;for(const i of t.edges)i.dst===s&&(d=Math.max(d,(e[i.src]??0)+1));const u=Math.max(x,d,S);u!==x&&(e[s]=u)}}l(Es,"adjustCrossLaneSources");function As(t,e){const n=Ie(t),o=ke(n)??[...n.nodes].sort(),s=(e==null?void 0:e.compactSingleInput)??!1,r=he(n);let c=Object.create(null);for(const f of o){const h=uo(n,f),p=e!=null&&e.ignoreCrossLaneEdges?h.filter(x=>{const S=r(x.src),d=r(f);return!S||!d?!0:S===d}):h;if(p.length===0)c[f]=0;else if(s&&p.length===1){const x=p[0].src,S=r(x),d=r(f);S!==d?c[f]=c[x]??0:c[f]=(c[x]??0)+1}else{let x=-1/0;for(const S of p)x=Math.max(x,(c[S.src]??0)+1);c[f]=x===-1/0?0:x}}return((e==null?void 0:e.optimizeRanksByCrossings)??!1)&&(c=ws(n,c)),e!=null&&e.ignoreCrossLaneEdges&&Es(n,c),{layers:en(n,c,r),rankOf:c,dummy:new Set}}l(As,"assignLayers_LongestPath");function Rs(t,e){const n=Ie(t),s={...As(n,{compactSingleInput:e==null?void 0:e.compactSingleInput,ignoreCrossLaneEdges:e==null?void 0:e.ignoreCrossLaneEdges,optimizeRanksByCrossings:e==null?void 0:e.optimizeRanksByCrossings}).rankOf},r=he(n),{preds:c,succs:a}=rn(n,u=>{if(e!=null&&e.ignoreCrossLaneEdges){const i=r(u.src),y=r(u.dst);if(i&&y&&i!==y)return!1}return!0}),f=ke(n)??[...n.nodes],h=[...f].reverse(),p=l((u,i)=>{let y=0;for(const L of c.get(u)??[])y=Math.max(y,(s[L]??0)+1);let C=Number.POSITIVE_INFINITY;const b=a.get(u)??[];return b.length>0&&(C=Math.min(...b.map(L=>(s[L]??0)-1))),Number.isFinite(C)||(C=Math.max(y,i)),Math.min(Math.max(i,y),C)},"clampFeasible"),x=tn.GRAVITY_ITERATIONS,S=l(u=>{let i=!1;for(const y of u){const C=c.get(y)??[],b=a.get(y)??[];if(C.length===0&&b.length===0)continue;const L=C.length>0?C.reduce((T,A)=>T+(s[A]??0)+1,0)/C.length:s[y]??0,v=b.length>0?b.reduce((T,A)=>T+(s[A]??0)-1,0)/b.length:s[y]??0,m=Math.round((L+v)/2),I=p(y,m);I!==s[y]&&(s[y]=I,i=!0)}return i},"relaxOrder");for(let u=0;u<x;u++){const i=S(f),y=S(h);if(!i&&!y)break}for(const u of f){let i=0;for(const y of c.get(u)??[])i=Math.max(i,(s[y]??0)+1);(s[u]??0)<i&&(s[u]=i)}for(const u of h){const i=a.get(u)??[];if(i.length>0){const y=Math.min(...i.map(C=>(s[C]??0)-1));(s[u]??0)>y&&(s[u]=y)}}return{layers:mo(n,f,s),rankOf:s,dummy:new Set}}l(Rs,"assignLayers_Gravity");function Ns(t){const e=sn(t),n=ho(t);let o=go(e);const s=[];for(;o.length>0;){const r=[];for(const c of o){s.push(c);for(const a of n.get(c)??[])e.set(a,(e.get(a)??0)-1),(e.get(a)??0)===0&&r.push(a)}o=r.sort((c,a)=>c.localeCompare(a))}return s.length===t.nodes.length?s:null}l(Ns,"topoSortByGenerationIfAcyclic");function Os(t,e){const n=Ie(t),o=(e==null?void 0:e.direction)==="LR"?Ns(n)??[...n.nodes].sort():ke(n)??[...n.nodes].sort(),s=he(n),r=l(p=>s(p)??p,"laneOf"),c=Object.create(null),a=new Map,f=l((p,x)=>(e==null?void 0:e.ignoreCrossLaneEdges)??!0?r(p)===r(x)?1:0:1,"edgeWeight");for(const p of o){const x=n.nodeById.get(p);if(x!=null&&x.isGroup)continue;const S=uo(n,p);let d=0;if(S.length>0)for(const C of S){const b=C.src,L=c[b]??0;d=Math.max(d,L+f(b,p))}const u=r(p),i=a.get(u)??0,y=Math.max(d,i);c[p]=y,a.set(u,y+1)}return{layers:mo(n,o,c,{skipGroups:!0}),rankOf:c,dummy:new Set}}l(Os,"assignLayers_LaneAwareCompact");function Bs(t,e){const n=Ie(e),{rankOf:o}=t,s=t.layers.map(d=>[...d]),r=new Set(t.dummy?[...t.dummy]:[]);let c=0;const a=new Map(n.nodeById),f=l(d=>{const u=`placeholder-${c++}`,i={id:u,isGroup:!1,isDummy:!0,width:0,height:0};for(a.set(u,i),r.add(u);s.length<=d;)s.push([]);return s[d].push(u),o[u]=d,u},"addDummyAt"),h=[...n.edges].sort((d,u)=>d.id===u.id?d.src===u.src?d.dst.localeCompare(u.dst):d.src.localeCompare(u.src):d.id.localeCompare(u.id)),p=[];for(const d of h){const u=o[d.src]??0,i=o[d.dst]??0;if(i-u<=1){p.push(d);continue}let y=d.src;for(let b=u+1,L=0;b<i;b++,L++){const v=f(b);p.push({id:`${d.id}#${L}`,src:y,dst:v,weight:d.weight,ref:d.ref}),y=v}const C=i-u-2;p.push({id:`${d.id}#${Math.max(C+1,0)}`,src:y,dst:d.dst,weight:d.weight,ref:d.ref})}const S={nodes:[...n.nodes,...[...r].filter(d=>!n.nodes.includes(d))],edges:p,layout:n.layout,nodeById:a};return{layering:{layers:s,rankOf:o,dummy:r},graphWithDummies:S}}l(Bs,"makeProperLayering");function $n(t){const e=t.length;if(e===0)return Number.POSITIVE_INFINITY;const n=[...t].sort((o,s)=>o-s);return e%2===1?n[(e-1)/2]:.5*(n[e/2-1]+n[e/2])}l($n,"median");function Vn(t){return t.length===0?Number.POSITIVE_INFINITY:t.reduce((n,o)=>n+o,0)/t.length}l(Vn,"barycenter");function Ps(t,e,n,o){const s=new Map;for(const r of t)s.set(r,[]);for(const r of n)o==="down"?e.has(r.src)&&s.has(r.dst)&&s.get(r.dst).push(e.get(r.src)):e.has(r.dst)&&s.has(r.src)&&s.get(r.src).push(e.get(r.dst));return s}l(Ps,"neighborPositionsFor");function ks(t,e,n){const o=n.get(t)??0,s=n.get(e)??0;return o!==s?o-s:t.localeCompare(e)}l(ks,"currentOrderTieBreak");function jn(t,e,n){const o=new Set(t),s=new Set(e),r=Be(t),c=Be(e),a=[];for(const h of n)o.has(h.src)&&s.has(h.dst)&&a.push({u:r.get(h.src),v:c.get(h.dst)});a.sort((h,p)=>h.u===p.u?h.v-p.v:h.u-p.u);const f=a.map(h=>h.v);return xo(f)}l(jn,"countCrossingsBetweenAdjacent");function je(t,e,n){return[...t].sort((o,s)=>{const r=$n(e.get(o)??[]),c=$n(e.get(s)??[]);return r===c?ks(o,s,n):isFinite(r)?isFinite(c)?r-c:-1:1})}l(je,"sortByHeuristic");function Un(t,e,n,o,s,r){const c=Be(t),a=Be(e),f=Ps(e,c,n,o);if(!s||!r||r.length===0)return je(e,f,a);const h=new Map;for(const S of e){const d=s(S),u=h.get(d)??[];u.push(S),h.set(d,u)}const p=[];for(const S of r){const d=h.get(S);if(!d||d.length===0)continue;const u=je(d,f,a);p.push(...u)}const x=h.get(null);if(x&&x.length>0){const S=je(x,f,a);for(const d of S){const u=Vn(f.get(d)??[]);let i=p.length;if(isFinite(u))for(const[y,C]of p.entries()){const b=Vn(f.get(C)??[]);if(u<b){i=y;break}}p.splice(i,0,d)}}return p}l(Un,"reorderLayer");function Wn(t,e,n,o,s){const r=[...e],c=new Set(t),a=new Set(e),f=o?new Set(o):null,h=n.filter(i=>c.has(i.src)&&a.has(i.dst)),p=f?n.filter(i=>a.has(i.src)&&f.has(i.dst)):void 0,x=l(i=>{let y=jn(t,i,h);return p&&o&&(y+=jn(i,o,p)),y},"crossingScore"),S=s?new Map:null;if(s&&S)for(const i of e)S.set(i,s(i));let d=!0,u=x(r);for(;d;){d=!1;for(let i=0;i+1<r.length;i++){if(S){const b=S.get(r[i]),L=S.get(r[i+1]);if(b!==L)continue}const y=u;[r[i],r[i+1]]=[r[i+1],r[i]];const C=x(r);C<y?(u=C,d=!0):[r[i],r[i+1]]=[r[i+1],r[i]]}}return r}l(Wn,"transposeImprove");function Fs(t,e,n){const o=t.layers.map(a=>[...a]),s=e.edges,r=he(e),c=yo(e,n==null?void 0:n.laneOrder);for(let a=0;a<3;a++){for(let f=1;f<o.length;f++)o[f]=Un(o[f-1],o[f],s,"down",r,c),o[f]=Wn(o[f-1],o[f],s,o[f+1],r);for(let f=o.length-2;f>=0;f--)o[f]=Un(o[f+1],o[f],s,"up",r,c),o[f]=Wn(o[f+1],o[f],s,o[f-1],r)}return{layers:o}}l(Fs,"orderLayers");function _s(t,e,n){const o=(n==null?void 0:n.layerGap)??Eo.DEFAULT_LAYER_GAP,s=(n==null?void 0:n.nodeGap)??Eo.DEFAULT_NODE_GAP,r=(n==null?void 0:n.laneGap)??s*2,c=(n==null?void 0:n.direction)??"TB",a=c==="LR"||c==="RL",f=t.layers,h=Object.create(null),p=Object.create(null),x=l(O=>e.nodeById.get(O),"getNode"),S=l(O=>{var k;return((k=x(O))==null?void 0:k.width)??0},"getWidth"),d=l(O=>{var k;return((k=x(O))==null?void 0:k.height)??0},"getHeight"),u=he(e),i=yo(e,n==null?void 0:n.laneOrder),y=f.map(O=>O.reduce((k,D)=>Math.max(k,d(D)),0)),C=[];if(a)for(let O=0;O+1<f.length;O++){const k=f[O].reduce((It,Dt)=>Math.max(It,S(Dt)),0),D=f[O+1].reduce((It,Dt)=>Math.max(It,S(Dt)),0),B=y[O],G=y[O+1],j=B/2+G/2,tt=(k+D)/2,ft=Math.max(0,tt-j-o);C.push(ft)}const b=new Set;for(const O of f)for(const k of O)b.add(u(k));const L=b.has(null),v=i.filter(O=>b.has(O)),m=[...L?[null]:[],...v],I=Object.create(null);for(const O of v)I[O]=0;L&&(I.null=0);for(const O of f){const k=Object.create(null),D=[];for(const B of O){const G=u(B);G===null?D.push(B):(k[G]||(k[G]=[])).push(B)}for(const[B,G]of Object.entries(k)){const j=G.reduce((tt,ft)=>tt+S(ft),0)+s*Math.max(0,G.length-1);I[B]=Math.max(I[B]??0,j)}if(L&&D.length){const B=D.reduce((G,j)=>G+S(j),0)+s*Math.max(0,D.length-1);I.null=Math.max(I.null??0,B)}}const T=new Map;{const O=m.map(B=>(B===null?I.null:I[B])??0);let D=-(O.reduce((B,G)=>B+G,0)+r*Math.max(0,m.length-1))/2;for(let B=0;B<m.length;B++){const G=m[B],j=O[B]??0,tt=D+j/2;T.set(G,tt),D+=j,B<m.length-1&&(D+=r)}}let A=0;for(const[O,k]of f.entries()){const D=y[O]??0,B=new Map;for(const j of k){const tt=u(j),ft=B.get(tt)??[];ft.push(j),B.set(tt,ft)}for(const j of m){const tt=B.get(j)??[];if(tt.length===0)continue;const ft=T.get(j);if(tt.length===1){const It=tt[0];h[It]=ft,p[It]=A+D/2}else{const It=tt.map(nt=>S(nt)),Dt=It.reduce((nt,Z)=>nt+Z,0)+s*(tt.length-1);let _t=ft-Dt/2;for(const[nt,Z]of tt.entries()){const rt=It[nt];h[Z]=_t+rt/2,p[Z]=A+D/2,_t+=rt+s}}}const G=C[O]??0;A+=D+o+G}const P=new Map;for(const O of e.edges){const k=O.ref.id;P.has(k)||P.set(k,[]),P.get(k).push(O)}for(const[,O]of P){if(O.length===0)continue;const k=O[0].ref,D=k.start,B=k.end;if(D==null||B==null)continue;const G=Math.round(((h[D]??0)+(h[B]??0))/2),j=new Set;for(const tt of O)j.add(tt.src),j.add(tt.dst);for(const tt of j){if(tt===D||tt===B)continue;const ft=e.nodeById.get(tt);ft!=null&&ft.isDummy&&(h[tt]=G)}}return{x:h,y:p}}l(_s,"assignCoordinates");var Hs=8;function Ds(t){let e=2166136261;for(let n=0;n<t.length;n++)e^=t.charCodeAt(n),e=Math.imul(e,16777619);return e>>>0}l(Ds,"hashString");function Xs(t){let e=t>>>0;return()=>{e+=1831565813;let n=e;return n=Math.imul(n^n>>>15,n|1),n^=n+Math.imul(n^n>>>7,n|61),((n^n>>>14)>>>0)/4294967296}}l(Xs,"mulberry32");function Ys(t,e){const n=[...t],o=Xs(e);for(let s=n.length-1;s>0;s--){const r=Math.floor(o()*(s+1));[n[s],n[r]]=[n[r],n[s]]}return n}l(Ys,"deterministicShuffle");function Gs(t,e){let n=0;for(const[o,s]of t.entries())n+=Math.abs(o-(e.get(s)??o));return n}l(Gs,"sourceDistance");function Kn(t,e){const n=new Map;for(const[s,r]of t.entries())n.set(r,s);let o=0;for(const{a:s,b:r,weight:c}of e){const a=n.get(s),f=n.get(r);a==null||f==null||(o+=c*Math.abs(a-f))}return o}l(Kn,"laneArrangementCost");function zs(t){const e=cn(t);if(e.length<2)return[];const n=new Map(e.map((r,c)=>[r,c])),o=he(t),s=new Map;for(const r of t.layout.edges??[]){if(r.isLayoutOnly)continue;const c=typeof r.start=="string"?r.start:void 0,a=typeof r.end=="string"?r.end:void 0;if(!c||!a||!t.nodeById.has(c)||!t.nodeById.has(a))continue;const f=o(c),h=o(a);if(!f||!h||f===h)continue;const p=n.get(f),x=n.get(h);if(p==null||x==null)continue;const[S,d]=p<=x?[f,h]:[h,f],u=`${S}\0${d}`,i=s.get(u);i?i.weight++:s.set(u,{a:S,b:d,weight:1})}return[...s.values()]}l(zs,"buildWeightedLaneEdges");function qn(t,e,n){const o=[...t];let s=Kn(o,e),r=!0,c=0;const a=Math.max(1,o.length);for(;r&&c<a;){r=!1,c++;for(let f=0;f+1<o.length;f++){[o[f],o[f+1]]=[o[f+1],o[f]];const h=Kn(o,e);h<s?(s=h,r=!0):[o[f],o[f+1]]=[o[f+1],o[f]]}}return{order:o,cost:s,sourceDistance:Gs(o,n)}}l(qn,"greedySwitch");function $s(t,e){return t.cost!==e.cost?t.cost<e.cost:t.sourceDistance<e.sourceDistance}l($s,"isBetterCandidate");function Vs(t,e,n){const o=[...e].sort((s,r)=>s.a===r.a?s.b.localeCompare(r.b):s.a.localeCompare(r.a)).map(({a:s,b:r,weight:c})=>`${s}:${r}:${c}`).join("|");return Ds(`${t.join("|")}#${o}#${n}`)}l(Vs,"seedForRestart");function js(t,e={}){const n=cn(t);if(n.length<2)return n;const o=zs(t);if(o.length===0)return n;const s=new Map(n.map((a,f)=>[a,f]));let r=qn(n,o,s);const c=Math.max(0,e.restarts??Hs);for(let a=0;a<c;a++){const f=Vs(n,o,a),h=Ys(n,f),p=qn(h,o,s);$s(p,r)&&(r=p)}return r.order}l(js,"optimizeTopLaneOrder");function Us(t,e){const n=(e==null?void 0:e.ignoreCrossLaneEdges)??!0,o=(e==null?void 0:e.optimizeRanksByCrossings)??!0,s=Ie(t),r=e!=null&&e.automaticLaneOrdering?js(s,{restarts:Hs}):void 0,c=hs(s),a=c.acyclic,f=n?Os(a,{compactSingleInput:(e==null?void 0:e.compactSingleInput)??tn.DEFAULT_COMPACT_SINGLE_INPUT,ignoreCrossLaneEdges:!0,direction:e==null?void 0:e.direction}):Rs(a,{compactSingleInput:(e==null?void 0:e.compactSingleInput)??tn.DEFAULT_COMPACT_SINGLE_INPUT,ignoreCrossLaneEdges:!1,optimizeRanksByCrossings:o}),{layering:h,graphWithDummies:p}=Bs(f,a),x=Fs(h,p,{laneOrder:r}),S=_s(x,p,{layerGap:e==null?void 0:e.layerGap,nodeGap:e==null?void 0:e.nodeGap,direction:e==null?void 0:e.direction,laneOrder:r});return{acyclic:a,reversed:c.reversed,layering:h,ordered:x,coordinates:S}}l(Us,"sugiyamaLayout");var lt=pr.EPSILON,br=8,Se=15,Re=15,$e=25,ie=20,In=10;function Zn(t,e,n){const o=t.x??0,s=t.y??0,r=e.x-o,c=e.y-s,a=Math.abs(r),f=Math.abs(c);return a<lt&&f<lt?n:f>lt&&f*3>=a?c>0?"bottom":"top":a>lt?r>0?"right":"left":n}l(Zn,"chooseOrthogonalSide");function Jn(t,e){return Math.abs(t.to-e.from)<lt||Math.abs(t.to-e.to)<lt?t.to:t.from}l(Jn,"sharedLineEndpointCoord");function Ce(t,e){return t.orient==="vertical"?{x:t.coord,y:e}:{x:e,y:t.coord}}l(Ce,"pointOnLine");function Ws(t,e){var K,J,Y,q;const n=t.nodes??[],o=t.edges??[],s=[];for(const g of o)g.isLayoutOnly||s.push({...g,__originalEdge:g});const r=new Map,c=new Map,a=[],f=e==="LR";for(const g of n)r.set(g.id,g);const h=n.filter(g=>g.isGroup&&!g.parentId);for(const g of h){const M={id:g.id},E=l(w=>{c.set(w.id,M),n.filter(N=>N.parentId===w.id).forEach(E)},"assignLane");E(g)}const p=n.filter(g=>!g.isGroup&&!g.isEdgeLabel).map(g=>{const M=g.width??10,E=g.height??10,w=g.x??0,N=g.y??0,H=br;return{nodeId:g.id,minX:w-M/2-H,maxX:w+M/2+H,minY:N-E/2-H,maxY:N+E/2+H,visualXHalfExtent:f?E/2+H:M/2+H}}),x=l((g,M,E,w)=>{let N=a.find(H=>H.orientation===g&&Math.abs(H.coord-M)<1);return N||(N={id:`pipe-${g}-${M.toFixed(0)}`,orientation:g,coord:M,spanMin:E,spanMax:w,tracks:[]},a.push(N)),N.spanMin=Math.min(N.spanMin,E),N.spanMax=Math.max(N.spanMax,w),N},"getOrAddPipe"),S=l((g,M)=>{const E=g.width??10,w=g.height??10,N=g.x??0,H=g.y??0;switch(M){case"top":return{x:N,y:H-w/2};case"bottom":return{x:N,y:H+w/2};case"left":return{x:N-E/2,y:H};case"right":return{x:N+E/2,y:H}}},"portForSide"),d=l((g,M,E)=>S(g,Zn(g,M,E?"bottom":"top")),"getOrthogonalPort"),u=[],i=[],y=new Set,C=1e3,b=l((g,M,E)=>{if(u.length===0)return 0;const w=Math.abs(M.y-E.y)<lt,N=Math.abs(M.x-E.x)<lt;if(!w&&!N)return 0;let H=0;if(w){const W=M.y,ot=Math.min(M.x,E.x)-lt,U=Math.max(M.x,E.x)+lt;if(U<=ot)return 0;for(const $ of u)$.edgeIndex===g||$.orientation!=="vertical"||$.pipe.coord<ot||$.pipe.coord>U||$.from-lt<=W&&$.to+lt>=W&&(H+=C)}else if(N){const W=M.x,ot=Math.min(M.y,E.y)-lt,U=Math.max(M.y,E.y)+lt;if(U<=ot)return 0;for(const $ of u)$.edgeIndex===g||$.orientation!=="horizontal"||$.pipe.coord<ot||$.pipe.coord>U||$.from-lt<=W&&$.to+lt>=W&&(H+=C)}return H},"crossingPenalty"),L=s.map((g,M)=>{if(!g.start||!g.end)return{idx:M,crossLane:0,dx:0,dy:0};const E=r.get(g.start),w=r.get(g.end),N=c.get(g.start),H=c.get(g.end),W=N&&H&&N.id!==H.id?1:0,ot=E&&w?Math.abs((w.x??0)-(E.x??0)):0,U=E&&w?Math.abs((w.y??0)-(E.y??0)):0;return{idx:M,crossLane:W,dx:ot,dy:U}}).sort((g,M)=>{if(g.crossLane!==M.crossLane)return M.crossLane-g.crossLane;const E=g.dx+g.dy,w=M.dx+M.dy;return Math.abs(E-w)>1?E-w:g.idx-M.idx}).map(g=>g.idx),v=l((g,M,E,w)=>{const N=Math.min(g.x,M.x),H=Math.max(g.x,M.x),W=Math.min(g.y,M.y),ot=Math.max(g.y,M.y);return!!p.find($=>E&&$.nodeId===E||w&&$.nodeId===w?!1:Math.abs(g.x-M.x)>lt?$.minY<g.y&&$.maxY>g.y&&$.maxX>N&&$.minX<H:$.minX<g.x&&$.maxX>g.x&&$.maxY>W&&$.minY<ot)},"isSegmentBlocked"),m=new Map,I=new Map;for(const g of s)!g.start||!g.end||g.start===g.end||(I.set(g.start,(I.get(g.start)??0)+1),I.set(g.end,(I.get(g.end)??0)+1));const T=l((g,M)=>Zn(g,M,"bottom"),"determineSide"),A=new Map;for(const[g,M]of s.entries()){if(!M.start||!M.end||M.start===M.end||M.points&&M.points.length>0)continue;const E=r.get(M.start),w=r.get(M.end);if(!E||!w)continue;const N=(w.x??0)-(E.x??0),H=(w.y??0)-(E.y??0);A.set(g,{edgeIdx:g,srcId:M.start,dstId:M.end,srcSide:T(E,{x:w.x??0,y:w.y??0}),dstSide:T(w,{x:E.x??0,y:E.y??0}),absDx:Math.abs(N),absDy:Math.abs(H),dxSign:Math.sign(N),dySign:Math.sign(H)})}const P=l(g=>g.srcSide==="top"||g.srcSide==="bottom"?g.absDx===0?1/0:g.absDy/g.absDx:g.absDy===0?1/0:g.absDx/g.absDy,"preferenceStrength"),O=l(g=>g.srcSide==="top"||g.srcSide==="bottom"?g.dxSign>=0?"right":"left":g.dySign>=0?"bottom":"top","secondarySide"),k=new Map;for(const g of A.values()){const M=`${g.srcId}:${g.srcSide}`;k.has(M)||k.set(M,[]),k.get(M).push(g)}const D=new Map,B=l((g,M)=>`${g}:${M}`,"loadKey");for(const g of A.values())D.set(B(g.srcId,g.srcSide),(D.get(B(g.srcId,g.srcSide))??0)+1),D.set(B(g.dstId,g.dstSide),(D.get(B(g.dstId,g.dstSide))??0)+1);for(const g of k.values())if(!(g.length<2)){g.sort((M,E)=>{const w=P(M),N=P(E);return Math.abs(w-N)>1e-9?N-w:M.edgeIdx-E.edgeIdx});for(let M=1;M<g.length;M++){const E=g[M],w=O(E),N=D.get(B(E.srcId,E.srcSide))??0,H=D.get(B(E.srcId,w))??0;H>=N||(D.set(B(E.srcId,E.srcSide),N-1),D.set(B(E.srcId,w),H+1),E.srcSide=w)}}const G=l(g=>{const M=g==null?void 0:g.shape;return M==="question"||M==="diamond"},"isDiamondNode"),j=new Map;for(const g of A.values())j.has(g.dstId)||j.set(g.dstId,new Set),j.get(g.dstId).add(g.dstSide);for(const g of A.values()){if(!G(r.get(g.srcId)))continue;const M=j.get(g.srcId);if(!(M!=null&&M.has(g.srcSide)))continue;const E=O(g);if(M.has(E)||(D.get(B(g.srcId,E))??0)>0)continue;const w=D.get(B(g.srcId,g.srcSide))??0;D.set(B(g.srcId,g.srcSide),Math.max(0,w-1)),D.set(B(g.srcId,E),1),g.srcSide=E}for(const g of A.values()){const{edgeIdx:M,srcId:E,dstId:w,srcSide:N,dstSide:H}=g,W=r.get(E),ot=r.get(w),U=`${E}:${N}:src`,$=N==="top"||N==="bottom"?ot.x??0:ot.y??0;m.has(U)||m.set(U,[]),m.get(U).push({edgeIdx:M,oppositeCoord:$});const bt=`${w}:${H}:dst`,dt=H==="top"||H==="bottom"?W.x??0:W.y??0;m.has(bt)||m.set(bt,[]),m.get(bt).push({edgeIdx:M,oppositeCoord:dt})}const tt=new Map,ft=8;for(const[g,M]of m){if(M.length<2)continue;M.sort((At,Gt)=>At.oppositeCoord-Gt.oppositeCoord);const E=g.split(":"),w=E.slice(0,-2).join(":"),N=E[E.length-2],H=E[E.length-1],W=r.get(w);if(!W)continue;const U=N==="left"||N==="right"?W.height??10:W.width??10,$=W.shape,dt=$==="question"||$==="diamond"?U*.3:U,st=Math.min(20,Math.max(ft,dt/(M.length+1))),Pt=-(st*(M.length-1))/2;for(const[At,Gt]of M.entries()){const ee=Pt+At*st,dn=`${Gt.edgeIdx}:${H}`;tt.set(dn,ee)}}const It=l(g=>{var M;return!!((M=s[g])!=null&&M.labelNodeId)},"edgeHasLabelNode"),Dt=l((g,M)=>g?(m.get(`${g}:${M}:src`)??[]).some(({edgeIdx:E})=>It(E))||(m.get(`${g}:${M}:dst`)??[]).some(({edgeIdx:E})=>It(E)):!1,"faceHasLabelNode"),_t=l((g,M,E)=>M==="top"||M==="bottom"?{x:g.x+E,y:g.y}:{x:g.x,y:g.y+E},"applyPortOffset"),nt=l((g,M,E)=>{const w=A.get(g),N={x:E.x??0,y:E.y??0},H={x:M.x??0,y:M.y??0},W=(w==null?void 0:w.srcSide)??T(M,N),ot=(w==null?void 0:w.dstSide)??T(E,H);let U=w?S(M,w.srcSide):d(M,N,!0),$=w?S(E,w.dstSide):d(E,H,!1);const bt=tt.get(`${g}:src`),dt=tt.get(`${g}:dst`);return bt!==void 0&&(U=_t(U,W,bt)),dt!==void 0&&($=_t($,ot,dt)),{pSrcPort:U,pDstPort:$,srcSide:W,dstSide:ot}},"portsForEdge");for(const g of L){const M=s[g];if(i[g]=[],!M.start||!M.end||M.points&&M.points.length>0||M.start===M.end)continue;const E=r.get(M.start),w=r.get(M.end);if(!E||!w)continue;const{pSrcPort:N,pDstPort:H,srcSide:W,dstSide:ot}=nt(g,E,w),U={...N},$={...H},bt=W==="top"||W==="bottom",dt=ot==="top"||ot==="bottom";if(bt){const X=N.y>(E.y??0);U.y=X?N.y+ie:N.y-ie}else{const X=N.x>(E.x??0);U.x=X?N.x+ie:N.x-ie}if(dt){const X=H.y>(w.y??0);$.y=X?H.y+ie:H.y-ie}else{const X=H.x>(w.x??0);$.x=X?H.x+ie:H.x-ie}const ct=l((X,z)=>{for(const Q of p)if(!z.includes(Q.nodeId)&&X.x>Q.minX&&X.x<Q.maxX&&X.y>Q.minY&&X.y<Q.maxY)return{inside:!0,obstacle:Q};return{inside:!1}},"isPointInObstacle"),st=l((X,z,Q,ht,wt)=>{if(wt){const kt=X.y>(z.y??0);return{x:(Q.x??0)>=X.x?ht.maxX+Se:ht.minX-Se,y:kt?ht.maxY+Re:ht.minY-Re,leavesPositiveSide:kt}}const Ct=X.x>(z.x??0),Rt=(Q.y??0)>=X.y;return{x:Ct?ht.maxX+Se:ht.minX-Se,y:Rt?ht.maxY+Re:ht.minY-Re,leavesPositiveSide:Ct}},"obstacleDetour");let Mt=[];const Pt=[M.start,M.end],At=ct(U,Pt);if(At.inside&&At.obstacle){const X=At.obstacle;if(bt){const z=st(N,E,w,X,!0);U.x=z.x,U.y=z.y;const Q=z.leavesPositiveSide?Math.min(X.minY-2,N.y+ie):Math.max(X.maxY+2,N.y-ie);Mt=[{x:N.x,y:Q},{x:z.x,y:Q},{x:z.x,y:z.y}]}else{const z=st(N,E,w,X,!1),Q=z.leavesPositiveSide?Math.min(X.minX-2,N.x+ie):Math.max(X.maxX+2,N.x-ie);U.x=z.x,U.y=z.y,Mt=[{x:Q,y:N.y},{x:Q,y:z.y},{x:z.x,y:z.y}]}}let Gt=[];const ee=ct($,Pt);if(ee.inside&&ee.obstacle){const X=ee.obstacle;if(dt){const z=st(H,w,E,X,!0);$.x=z.x,$.y=z.y,Gt=[{x:z.x,y:z.y},{x:H.x,y:z.y}]}else{const z=st(H,w,E,X,!1);$.x=z.x,$.y=z.y,Gt=[{x:z.x,y:z.y},{x:z.x,y:H.y}]}}if(Mt.length===0&&Gt.length===0){const X=Se,z=Math.abs(U.x-$.x)<X,Q=Math.abs(U.y-$.y)<X,ht=tt.get(`${g}:src`)!==void 0||tt.get(`${g}:dst`)!==void 0,wt=(((K=m.get(`${M.start??""}:${W}:src`))==null?void 0:K.length)??0)+(((J=m.get(`${M.start??""}:${W}:dst`))==null?void 0:J.length)??0),Ct=(((Y=m.get(`${M.end??""}:${ot}:src`))==null?void 0:Y.length)??0)+(((q=m.get(`${M.end??""}:${ot}:dst`))==null?void 0:q.length)??0),Rt=wt>1||Ct>1,kt=I.get(M.start??"")??0,mt=I.get(M.end??"")??0,Vt=wt>1&&Dt(M.start,W)||Ct>1&&Dt(M.end,ot),re=wt<=1||kt<=2,Ht=Ct<=1||mt<=2;if((z||Q)&&!ht&&(!Rt||Rt&&!Vt&&re&&Ht)&&!v(N,H,M.start,M.end)){M.points=[{...N},{...U},{...$},{...H}],y.add(g);const vt=Q?"horizontal":"vertical",Ut=Q?N.y:N.x,Lt=Q?Math.min(N.x,H.x):Math.min(N.y,H.y),Tt=Q?Math.max(N.x,H.x):Math.max(N.y,H.y),Jt={id:`fast-path-${vt}-${Ut.toFixed(0)}-${g}`,orientation:vt,coord:Ut,spanMin:Lt,spanMax:Tt,tracks:[]};u.push({edgeIndex:g,segmentIndex:0,orientation:vt,pipe:Jt,trackIndex:0,from:Lt,to:Tt});continue}}const dn=x("vertical",U.x,U.y,U.y);U.x=dn.coord;const Js=x("vertical",$.x,$.y,$.y);$.x=Js.coord;let me=Math.min(U.x,$.x)-50,xe=Math.max(U.x,$.x)+50,we=Math.min(U.y,$.y)-50,Ee=Math.max(U.y,$.y)+50;for(const X of p){const z=Math.min(U.x,$.x),Q=Math.max(U.x,$.x),ht=Math.min(U.y,$.y),wt=Math.max(U.y,$.y);X.minX<Q&&X.maxX>z&&X.minY<wt&&X.maxY>ht&&(me=Math.min(me,X.minX-$e),xe=Math.max(xe,X.maxX+$e),we=Math.min(we,X.minY-$e),Ee=Math.max(Ee,X.maxY+$e))}for(const X of p){if(X.maxX<me||X.minX>xe||X.maxY<we||X.minY>Ee)continue;const z=Se;x("horizontal",X.minY-z,me,xe),x("horizontal",X.maxY+z,me,xe);const Q=Re;x("vertical",X.minX-Q,we,Ee),x("vertical",X.maxX+Q,we,Ee)}x("horizontal",U.y,me,xe),x("horizontal",$.y,me,xe);const Qs=a.filter(X=>X.orientation==="horizontal"&&X.coord>=we&&X.coord<=Ee),tr=a.filter(X=>X.orientation==="vertical"&&X.coord>=me&&X.coord<=xe),Fe=l((X,z)=>`${X.toFixed(1)},${z.toFixed(1)}`,"getKey"),_e=Fe(U.x,U.y),bo=Fe($.x,$.y),He=new Map,un=new Map,hn=new Map,De=new Set,Me=[];He.set(_e,0),hn.set(_e,"n"),Me.push({key:_e,f:Math.hypot($.x-U.x,$.y-U.y),pt:U}),De.add(_e);let zt=[];const ye=l((X,z)=>v(X,z,M.start,M.end),"checkSegmentBlocked"),gn={x:$.x,y:U.y},er=ye(U,gn),nr=ye(gn,$),or=er||nr,mn={x:U.x,y:$.y},sr=ye(U,mn),rr=ye(mn,$);if(or?sr||rr||(Math.abs(U.x-$.x)<lt?zt=[U,$]:zt=[U,mn,$]):Math.abs(U.y-$.y)<lt||Math.abs(U.x-$.x)<lt?zt=[U,$]:zt=[U,gn,$],zt.length===0)for(;Me.length>0;){Me.sort((mt,Vt)=>mt.f-Vt.f);const X=Me.shift();if(De.delete(X.key),X.key===bo){let mt=bo,Vt=$;for(zt=[Vt];un.has(mt);){const re=un.get(mt);zt.unshift(re),Vt=re,mt=Fe(re.x,re.y)}break}const z=X.pt.x,Q=X.pt.y,ht=tr.sort((mt,Vt)=>mt.coord-Vt.coord),wt=ht.findIndex(mt=>Math.abs(mt.coord-z)<1),Ct=Qs.sort((mt,Vt)=>mt.coord-Vt.coord),Rt=Ct.findIndex(mt=>Math.abs(mt.coord-Q)<1),kt=[];wt>0&&kt.push({x:ht[wt-1].coord,y:Q}),wt>=0&&wt<ht.length-1&&kt.push({x:ht[wt+1].coord,y:Q}),Rt>0&&kt.push({x:z,y:Ct[Rt-1].coord}),Rt>=0&&Rt<Ct.length-1&&kt.push({x:z,y:Ct[Rt+1].coord});for(const mt of kt){const Vt=Math.min(z,mt.x),re=Math.max(z,mt.x),Ht=Math.min(Q,mt.y),jt=Math.max(Q,mt.y);if(p.some(ne=>ne.nodeId===M.start||ne.nodeId===M.end?!1:Vt!==re?ne.minY<Q&&ne.maxY>Q&&ne.maxX>Vt&&ne.minX<re:ne.minX<z&&ne.maxX>z&&ne.maxY>Ht&&ne.minY<jt))continue;const vt=Fe(mt.x,mt.y),Ut=Math.abs(mt.x-z)+Math.abs(mt.y-Q),Lt=b(g,X.pt,mt);let Tt=0;const Jt=$.x-U.x,Ae=$.y-U.y,Xe=mt.x-z,xn=mt.y-Q;(Ae>10&&xn<-5||Ae<-10&&xn>5)&&(Tt=Math.abs(xn)*100),(Jt>10&&Xe<-5||Jt<-10&&Xe>5)&&(Tt+=Math.abs(Xe)*50);let Io=0;const Mo=hn.get(X.key)??"n",So=Math.abs(Xe)>lt?"h":"v";Mo!=="n"&&Mo!==So&&(Io=50);const ir=Ut+Lt+Tt+Io,Ye=(He.get(X.key)??1/0)+ir,Co=Math.abs($.x-mt.x)+Math.abs($.y-mt.y);if(Ye<(He.get(vt)??1/0))if(un.set(vt,X.pt),He.set(vt,Ye),hn.set(vt,So),!De.has(vt))Me.push({key:vt,f:Ye+Co,pt:mt}),De.add(vt);else{const ne=Me.findIndex(cr=>cr.key===vt);ne!==-1&&(Me[ne].f=Ye+Co)}}}if(zt.length===0&&(zt=[U,{x:U.x,y:$.y},$]),zt.length>4){const X=zt[0],z=zt[zt.length-1];let Q=Math.min(X.x,z.x),ht=Math.max(X.x,z.x),wt=Math.min(X.y,z.y),Ct=Math.max(X.y,z.y);for(const Ht of zt)Q=Math.min(Q,Ht.x),ht=Math.max(ht,Ht.x),wt=Math.min(wt,Ht.y),Ct=Math.max(Ct,Ht.y);const Rt=ht>Math.max(X.x,z.x),kt=Q<Math.min(X.x,z.x);if(f){const Ht=Re;if(Rt){const jt=Math.max(X.x,z.x),Ft=Math.min(X.y,z.y),vt=Math.max(X.y,z.y),Ut=p.filter(Lt=>Lt.minX<jt&&Lt.maxX>jt&&Lt.minY<vt&&Lt.maxY>Ft);if(Ut.length>0){let Lt=Math.max(X.x,z.x);for(const Tt of Ut){const Jt=(Tt.minX+Tt.maxX)/2;if(Tt.visualXHalfExtent===void 0||isNaN(Tt.visualXHalfExtent))continue;const Ae=Jt+Tt.visualXHalfExtent+Ht;Lt=Math.max(Lt,Ae)}isNaN(Lt)||(ht=Lt)}}if(kt){const jt=p.filter(Ft=>Ft.minX<Math.min(X.x,z.x)+Ht&&Ft.minY<Math.max(X.y,z.y)&&Ft.maxY>Math.min(X.y,z.y));if(jt.length>0){let Ft=Math.min(X.x,z.x);for(const vt of jt){const Lt=(vt.minX+vt.maxX)/2-vt.visualXHalfExtent-Ht;Ft=Math.min(Ft,Lt)}Q=Ft}}}const mt=l(Ht=>{const jt=z.y>X.y,Ft=p.filter(Lt=>{const Tt=Math.min(X.x,z.x)<Lt.maxX&&Math.max(X.x,z.x)>Lt.minX,Jt=Math.min(X.y,z.y)<Lt.maxY&&Math.max(X.y,z.y)>Lt.minY;return Tt&&Jt});let vt=Ft;if(f&&Ft.length>0){const Lt=Ft.filter(Tt=>Tt.minX<Ht&&Tt.maxX>Ht);Lt.length>0&&(vt=Lt)}if(vt.length===0)return z.y;const Ut=Se;if(jt){const Tt=Math.max(...vt.map(Jt=>Jt.maxY))+Ut;if(Tt<z.y-lt)return Tt}else{const Tt=Math.min(...vt.map(Jt=>Jt.minY))-Ut;if(Tt>z.y+lt)return Tt}return z.y},"findBestReturnY"),Vt=l(Ht=>{const jt=mt(Ht),Ft={x:Ht,y:X.y},vt={x:Ht,y:jt},Ut={x:z.x,y:jt},Lt=ye(X,Ft),Tt=ye(Ft,vt),Jt=ye(vt,Ut),Ae=jt!==z.y?ye(Ut,z):!1;return!Lt&&!Tt&&!Jt&&!Ae?Math.abs(jt-z.y)<lt?[X,Ft,vt,z]:[X,Ft,vt,Ut,z]:null},"trySimplifyWithDetourX"),re=Rt&&!kt?Vt(ht):kt&&!Rt?Vt(Q):null;re&&(zt=re)}const $t=[N,...Mt,...zt,...Gt.reverse(),H];if($t.length>=3){const X=$t[$t.length-1],z=$t[$t.length-2],Q=$t[$t.length-3],ht=Math.abs(Q.y-z.y)<lt&&Math.abs(z.y-X.y)<lt,wt=Math.abs(Q.x-z.x)<lt&&Math.abs(z.x-X.x)<lt;if(ht){const Ct=Math.sign(z.x-Q.x),Rt=Math.sign(X.x-Q.x);Ct!==0&&Ct===Rt&&Math.abs(z.x-Q.x)>Math.abs(X.x-Q.x)&&$t.splice(-2,1)}else if(wt){const Ct=Math.sign(z.y-Q.y),Rt=Math.sign(X.y-Q.y);Ct!==0&&Ct===Rt&&Math.abs(z.y-Q.y)>Math.abs(X.y-Q.y)&&$t.splice(-2,1)}}const le=[$t[0]];for(let X=1;X<$t.length-1;X++){if(X===1){le.push($t[X]);continue}const z=le[le.length-1],Q=$t[X],ht=$t[X+1];if(Math.abs(z.y-Q.y)<lt&&Math.abs(Q.y-ht.y)<lt){const wt=Q.x>z.x,Ct=ht.x>Q.x;if(wt!==Ct){le.push(Q);continue}continue}if(Math.abs(z.x-Q.x)<lt&&Math.abs(Q.x-ht.x)<lt){const wt=Q.y>z.y,Ct=ht.y>Q.y;if(wt!==Ct){le.push(Q);continue}continue}le.push(Q)}le.push($t[$t.length-1]);for(let X=0;X<le.length-1;X++){const z=le[X],Q=le[X+1],ht=Math.abs(z.x-Q.x)<lt?"vertical":"horizontal",wt=ht==="vertical"?z.x:z.y,Ct=ht==="vertical"?Math.min(z.y,Q.y):Math.min(z.x,Q.x),Rt=ht==="vertical"?Math.max(z.y,Q.y):Math.max(z.x,Q.x),kt=x(ht,wt,Ct,Rt),mt={edgeIndex:g,segmentIndex:X,orientation:ht,pipe:kt,trackIndex:0,from:Ct,to:Rt};u.push(mt),i[g].push(u.length-1),kt.tracks[0]||(kt.tracks[0]={index:0,coord:kt.coord,segments:[]}),kt.tracks[0].segments.push({edgeIndex:g,segmentIndex:X,from:Ct,to:Rt})}}const Z=l((g,M)=>g.from<M.to&&M.from<g.to,"segmentsOverlap"),rt=l((g,M,E,w)=>{const N=!w.segments.some(W=>(W.edgeIndex!==M.edgeIndex||W.segmentIndex!==M.segmentIndex)&&Z(W,g)),H=!E.segments.some(W=>(W.edgeIndex!==g.edgeIndex||W.segmentIndex!==g.segmentIndex)&&Z(W,M));return N&&H?(g.trackIndex=w.index,M.trackIndex=E.index,E.segments=[...E.segments.filter(W=>W.edgeIndex!==g.edgeIndex||W.segmentIndex!==g.segmentIndex),{edgeIndex:M.edgeIndex,segmentIndex:M.segmentIndex,from:M.from,to:M.to}],w.segments=[...w.segments.filter(W=>W.edgeIndex!==M.edgeIndex||W.segmentIndex!==M.segmentIndex),{edgeIndex:g.edgeIndex,segmentIndex:g.segmentIndex,from:g.from,to:g.to}],!0):!1},"trySwapSegmentsAcrossTracks"),ut=l(g=>{const M=g.tracks.length;return g.tracks[M]={index:M,coord:g.coord,segments:[]},M},"createNewTrack"),yt=l((g,M)=>{const E=g.pipe.tracks[g.trackIndex];E.segments=E.segments.filter(N=>N.edgeIndex!==g.edgeIndex||N.segmentIndex!==g.segmentIndex),g.trackIndex=M,g.pipe.tracks[M].segments.push({edgeIndex:g.edgeIndex,segmentIndex:g.segmentIndex,from:g.from,to:g.to})},"moveSegmentToTrack"),St=l((g,M)=>{const E=i[g.edgeIndex];for(const w of E){const N=u[w];N.pipe===g.pipe&&yt(N,M)}},"moveSegmentChainToTrack"),Et=l(g=>{const M=i[g.edgeIndex],E=M.indexOf(u.indexOf(g)),w=[];return E>0&&w.push(u[M[E-1]]),E<M.length-1&&w.push(u[M[E+1]]),w},"getAdjacentSegmentsAlongEdge"),Kt=l((g,M)=>{if(g.orientation===M.orientation)return!1;const E=g.orientation==="horizontal"?g:M,w=g.orientation==="horizontal"?M:g;return w.pipe.coord>E.from&&w.pipe.coord<E.to&&E.pipe.coord>w.from&&E.pipe.coord<w.to},"haveAnyCrossing"),qt=l((g,M)=>{for(const E of g.tracks)if(!E.segments.some(N=>(N.edgeIndex!==M.edgeIndex||N.segmentIndex!==M.segmentIndex)&&Z(N,M)))return E.index;return-1},"findAvailableTrack"),Zt=l((g,M)=>{if(g.trackIndex===M.trackIndex)return Z(g,M);const E=Et(g),w=Et(M);return E.some(N=>w.some(H=>Kt(N,H)))},"segmentsConflict"),se=l((g,M,E)=>{if(rt(g,M,g.pipe.tracks[g.trackIndex],M.pipe.tracks[M.trackIndex]))return;const w=qt(g.pipe,M);E(M,w!==-1?w:ut(g.pipe))},"resolveTrackConflict"),Le=l(g=>{let M=0;for(let E=0;E<g.length;E++)for(let w=E+1;w<g.length;w++){const N=g[E],H=g[w];N.pipe===H.pipe&&Zt(N,H)&&(M++,se(N,H,St))}return M},"resolveHandleConflicts"),ge=new Map,Te=l(g=>{if(ge.has(g))return ge.get(g);const M=i[g];if(M.length===0){const ot={dest:0,deviation:0,base:0,delta:0};return ge.set(g,ot),ot}const w=u[M[0]].pipe.coord;let N=w;for(let ot=1;ot<M.length;ot++){const U=u[M[ot]];if(U.orientation==="horizontal"){const $=U.from,bt=U.to;N=Math.abs($-w)>Math.abs(bt-w)?$:bt;break}}const H=Math.abs(N-w),W={dest:N,deviation:H,base:w,delta:N-w};return ge.set(g,W),W},"getDestInfo"),an=l(()=>{let g=0;const M=new Map;for(const[w,N]of s.entries())i[w].length!==0&&N.start&&(M.has(N.start)||M.set(N.start,[]),M.get(N.start).push(w));const E=l(w=>{const N=s[w];if(!N.start||!N.end)return 0;const H=r.get(N.start),W=r.get(N.end);if(!H||!W)return 0;const ot=(W.x??0)-(H.x??0),U=(W.y??0)-(H.y??0);return Math.abs(ot)+Math.abs(U)},"getEdgeDistance");for(const w of M.values()){w.sort((H,W)=>{const ot=Te(H),U=Te(W);if(Math.abs(ot.deviation-U.deviation)>1)return ot.deviation-U.deviation;if(Math.abs(ot.dest-U.dest)>1)return ot.dest-U.dest;const $=E(H),bt=E(W);if(Math.abs($-bt)>1)return bt-$;const dt=i[H].length,ct=i[W].length;if(dt!==ct)return dt-ct;if(dt===1){const st=i[H][0],Mt=i[W][0];if(u[st]&&u[Mt]){const Pt=u[st],At=u[Mt],Gt=Math.abs(Pt.to-Pt.from),ee=Math.abs(At.to-At.from);if(Math.abs(Gt-ee)>1)return Gt-ee}}return 0});const N=w.map(H=>u[i[H][0]]);g+=Le(N)}return g},"fixSourceHandleCrossings"),ln=l(()=>{let g=0;const M=new Map;for(const[E,w]of s.entries())i[E].length!==0&&w.end&&(M.has(w.end)||M.set(w.end,[]),M.get(w.end).push(E));for(const E of M.values()){E.sort((N,H)=>{const W=l($=>{const bt=i[$];if(bt.length<2)return 0;const dt=u[bt[bt.length-2]];return Math.abs(dt.to-dt.from)},"getDist"),ot=W(N),U=W(H);return Math.abs(ot-U)>.1?ot-U:N-H});const w=E.map(N=>u[i[N][i[N].length-1]]);g+=Le(w)}return g},"fixTargetHandleCrossings"),fn=l(()=>{let g=0;for(const M of a){const E=[];for(const w of M.tracks)for(const N of w.segments){const H=i[N.edgeIndex].find(W=>u[W].segmentIndex===N.segmentIndex);H!==void 0&&E.push(u[H])}E.sort((w,N)=>w.edgeIndex-N.edgeIndex||w.segmentIndex-N.segmentIndex);for(let w=0;w<E.length;w++)for(let N=w+1;N<E.length;N++){const H=E[w],W=E[N];Zt(H,W)&&(g++,se(H,W,yt))}}return g},"fixPipeCrossings");let R=0;const F=10;for(;R<F;){let g=0;if(g+=an(),g+=ln(),g+=fn(),g===0)break;R++}const _=new Map;for(const g of a){const M=[];g.tracks.forEach(w=>{w.segments.forEach(N=>{M.push({edgeIndex:N.edgeIndex,segmentIndex:N.segmentIndex,trackIndex:w.index,from:N.from,to:N.to})})}),M.sort((w,N)=>w.from-N.from);const E=[];if(M.length>0){let w=[M[0]],N=M[0].to;for(let H=1;H<M.length;H++){const W=M[H];W.from<N?(w.push(W),N=Math.max(N,W.to)):(E.push(w),w=[W],N=W.to)}E.push(w)}for(const w of E){const N=new Set;w.forEach(st=>N.add(st.trackIndex));const H=new Map;w.forEach(st=>{const Mt=Te(st.edgeIndex);H.set(st.trackIndex,(H.get(st.trackIndex)??0)+Mt.delta)});const W=[...N].filter(st=>(H.get(st)??0)<-1),ot=[...N].filter(st=>(H.get(st)??0)>1),U=[...N].filter(st=>Math.abs(H.get(st)??0)<=1);W.sort((st,Mt)=>(H.get(Mt)??0)-(H.get(st)??0)),ot.sort((st,Mt)=>(H.get(st)??0)-(H.get(Mt)??0));const $=l((st,Mt)=>{w.filter(Pt=>Pt.trackIndex===st).forEach(Pt=>{const At=y.has(Pt.edgeIndex)?g.coord:Mt;_.set(`${Pt.edgeIndex}-${Pt.segmentIndex}`,At)})},"assignCoord");let bt=0;for(const st of W)bt++,$(st,g.coord-bt*In);if(U.length===0&&N.size>0){const st=[...N].sort((At,Gt)=>Math.abs(H.get(At)??0)-Math.abs(H.get(Gt)??0))[0],Mt=W.indexOf(st);Mt!==-1&&W.splice(Mt,1);const Pt=ot.indexOf(st);Pt!==-1&&ot.splice(Pt,1),U.push(st)}let dt=0;for(const st of U){if(dt===0)$(st,g.coord);else{const Mt=dt%2===1?1:-1,Pt=Math.ceil(dt/2);$(st,g.coord+Mt*Pt*In*.5)}dt++}let ct=0;for(const st of ot)ct++,$(st,g.coord+ct*In)}}for(const[g,M]of s.entries()){const E=i[g]??[];if(E.length===0)continue;const w=[],N=r.get(M.start),H=r.get(M.end),{pSrcPort:W,pDstPort:ot}=nt(g,N,H),U=E.map(dt=>{const ct=u[dt],st=_.get(`${ct.edgeIndex}-${ct.segmentIndex}`)??ct.pipe.coord;return{orient:ct.orientation,coord:st,from:ct.from,to:ct.to}});w.push(W);for(let dt=0;dt<U.length;dt++){const ct=U[dt],st=w[w.length-1],Mt=ct.orient==="vertical"?st.y:st.x,Pt=ct.orient==="vertical"?st.x:st.y,At=U[dt+1],Gt=dt<U.length-1;if(Math.abs(Pt-ct.coord)>lt&&w.push(Ce(ct,Mt)),Gt&&At.orient===ct.orient)if(Math.abs(ct.coord-At.coord)>lt){const ee=ct.orient==="vertical"?(Mt+At.from)/2:Jn(ct,At);w.push(Ce(ct,ee),Ce(At,ee))}else(dt===0||dt===U.length-2)&&w.push(Ce(ct,Jn(ct,At)));else if(Gt)w.push(Ce(ct,At.coord));else{const ee=Math.abs(ct.from-Mt)<Math.abs(ct.to-Mt)?ct.to:ct.from;w.push(Ce(ct,ee))}}const $=w[w.length-1];(Math.abs($.x-ot.x)>lt||Math.abs($.y-ot.y)>lt)&&w.push(ot);const bt=[];w.length>0&&bt.push(w[0]);for(let dt=1;dt<w.length;dt++){const ct=w[dt],st=bt[bt.length-1];(Math.abs(ct.x-st.x)>lt||Math.abs(ct.y-st.y)>lt)&&bt.push(ct)}M.points=bt}for(const g of s){const M=g.__originalEdge;M&&g.points&&(M.points=g.points)}t.edges=(t.edges??[]).filter(g=>!g.isLayoutOnly);const V=l((g,M)=>{const E=M.x??0,w=M.y??0,N=M.width??0,H=M.height??0;if(N<=0||H<=0)return g;const W=E-N/2,ot=E+N/2,U=w-H/2,$=w+H/2;if(g.x<W||g.x>ot||g.y<U||g.y>$)return g;const bt=g.x-W,dt=ot-g.x,ct=g.y-U,st=$-g.y,Mt=Math.min(bt,dt,ct,st);return Mt===bt?{x:W,y:g.y}:Mt===dt?{x:ot,y:g.y}:Mt===ct?{x:g.x,y:U}:{x:g.x,y:$}},"nodeBoundaryClamp");for(const g of t.edges){const M=g.points;if(!M||M.length<2)continue;const E=g.start,w=g.end,N=E?r.get(E):void 0,H=w?r.get(w):void 0;N&&(M[0]=V(M[0],N)),H&&(M[M.length-1]=V(M[M.length-1],H))}return t}l(Ws,"routeEdgesOrthogonal");function Ks(t){return t.direction??"TB"}l(Ks,"getSwimlaneDirection");function qs(t){var p,x,S,d,u;const e=Oo(t),n=((p=t.config.flowchart)==null?void 0:p.nodeSpacing)??40,o=((x=t.config.flowchart)==null?void 0:x.rankSpacing)??100,s=((S=t.config.swimlane)==null?void 0:S.ignoreCrossLaneEdges)??!0,r=((d=t.config.swimlane)==null?void 0:d.optimizeRanksByCrossings)??!0,c=((u=t.config.swimlane)==null?void 0:u.automaticLaneOrdering)??!1,a=Ks(t),{ordered:f,coordinates:h}=Us(e,{nodeGap:n,layerGap:o,ignoreCrossLaneEdges:s,optimizeRanksByCrossings:r,automaticLaneOrdering:c,direction:a});Bo(e,f,h,{nodeGap:n,layerGap:o});for(const i of t.edges??[])delete i.points;Ws(t,a);for(const i of t.edges??[])(!i.curve||i.curve==="basis")&&(i.curve="rounded");return ds(t,a),fs(t),a}l(qs,"runSwimlaneLayoutCore");function Zs(t){No(t);const e=Po(t);t.nodes=e.nodes,t.edges=e.edges}l(Zs,"prepareSwimlaneLayout");var Nr=lr({prepareLayout:Zs,runLayoutCore:qs,afterPaint:Ao});export{Nr as render};
@@ -1,8 +0,0 @@
1
- import{c as r,s as o}from"./flowDiagram-OXPTDLAJ-t-u0QXEA.js";import{_ as e}from"./mermaid.core-DLb6eAON.js";import"./chunk-5VM5RSS4-CYl9mwa-.js";import"./chunk-XXDRQBXY-CSlCFByc.js";import"./chunk-KQW6MTUR-JYH94hpE.js";import"./chunk-7TKQ45FW-Dn6ktcY5.js";import"./channel-BND6_KSH.js";import"./index-CeeLdENM.js";import"./markdown-BWXjRrSw.js";import"./icons-Bm_ZzSAy.js";import"./react-vendor-C0HIWSpf.js";import"./state-Kfon1nTr.js";import"./panels-BQOvnbWH.js";var a=e(t=>`${o(t)}
2
- .swimlane.cluster:not([data-color-id]) rect {
3
- stroke: ${t.clusterBorder} !important;
4
- }
5
- [data-look="neo"].cluster rect {
6
- filter: none;
7
- }
8
- `,"getStyles"),m=a,k=r({styles:m});export{k as diagram};