@inkeep/open-knowledge 0.46.0-beta.3 → 0.46.0-beta.5

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 (367) hide show
  1. package/dist/{acp-harness-probe-BfAZQjw4.mjs → acp-harness-probe-z0k-zB9k.mjs} +2 -2
  2. package/dist/assets/skills/discovery/SKILL.md +1 -1
  3. package/dist/assets/skills/project/SKILL.md +1 -1
  4. package/dist/cli.mjs +20 -20
  5. package/dist/constants-tslCao45.mjs +2 -0
  6. package/dist/{fs-traced-DDm-belY.mjs → fs-traced-B-x7hAhD.mjs} +2 -2
  7. package/dist/fs-traced-Bi88qem0.mjs +1 -0
  8. package/dist/{git-handle-CZzO__rr.mjs → git-handle-CK_JXuyw.mjs} +2 -2
  9. package/dist/git-handle-DyS9-xsk.mjs +1 -0
  10. package/dist/index.mjs +1 -1
  11. package/dist/{init-BbpX_tfM.mjs → init-B0r5j8e-.mjs} +4 -4
  12. package/dist/init-CZkiXXqU.mjs +1 -0
  13. package/dist/{launch-json-removal-BJBj0U4b.mjs → launch-json-removal-DuEviY27.mjs} +2 -2
  14. package/dist/{loader-B21NAhXF.mjs → loader-17-u4oG7.mjs} +2 -2
  15. package/dist/loader-BUBYD2vK.mjs +1 -0
  16. package/dist/md-manager-BWTSpVXC.mjs +2 -0
  17. package/dist/{open-browser-B9YVDd4n.mjs → open-browser-BHXl6F9O.mjs} +2 -2
  18. package/dist/parse-worker.mjs +1 -1
  19. package/dist/preview-B82KOKlR.mjs +1 -0
  20. package/dist/{preview-CIemkVcT.mjs → preview-D9rdyPNb.mjs} +2 -2
  21. package/dist/public/assets/{ActivityModeContent-CUdU1LSM.js → ActivityModeContent-BquAhT5x.js} +1 -1
  22. package/dist/public/assets/{AgentDiffPane-C406On9h.js → AgentDiffPane-6bk9bV9U.js} +2 -2
  23. package/dist/public/assets/{AgentThreadClientBinder-B69qnNWb.js → AgentThreadClientBinder-u3ZVSSHE.js} +1 -1
  24. package/dist/public/assets/{BugReportHistory-DrMLEEP8.js → BugReportHistory-D_60pb7r.js} +1 -1
  25. package/dist/public/assets/{BugReportHistoryDialog-Cf_ZrCjH.js → BugReportHistoryDialog-BzJsPoev.js} +1 -1
  26. package/dist/public/assets/CodeMirrorPropInput-DOcEkWLX.js +3 -0
  27. package/dist/public/assets/{ConsentDialogBody-CiXNBNFL.js → ConsentDialogBody-DWXqUhzJ.js} +1 -1
  28. package/dist/public/assets/{DocumentContext-Bwk1Rcb4.js → DocumentContext-uE-Jpe8-.js} +11 -11
  29. package/dist/public/assets/{EditorModeToggle-Cc_1CSwt.js → EditorModeToggle-DBmNyzRU.js} +2 -2
  30. package/dist/public/assets/{EnableSyncConfirmDialog-CUbRSvVb.js → EnableSyncConfirmDialog-Dufpw3Xm.js} +1 -1
  31. package/dist/public/assets/FeedbackForm-BieBWPdz.js +1 -0
  32. package/dist/public/assets/GraphPanel-DZMLD8ni.js +44 -0
  33. package/dist/public/assets/{LintConfigEditor-CQvHNEOM.js → LintConfigEditor-k9WOKYkq.js} +1 -1
  34. package/dist/public/assets/{ManagedArtifactProperties-t_bI4fe1.js → ManagedArtifactProperties-DJqeSv57.js} +1 -1
  35. package/dist/public/assets/{McpConsentDialogBody-CajikYp7.js → McpConsentDialogBody-CHmK7aXE.js} +1 -1
  36. package/dist/public/assets/{MermaidDocEditor-CftPmzt6.js → MermaidDocEditor-CGsfhioE.js} +1 -1
  37. package/dist/public/assets/PropertyPanel-D_XAZl4d.js +2 -0
  38. package/dist/public/assets/{RegisteredAgentIcon-DplzDEhh.js → RegisteredAgentIcon-CyQDojW_.js} +1 -1
  39. package/dist/public/assets/{ReportBugDialogBody-CYyFn3-x.js → ReportBugDialogBody-CdEV6nCR.js} +2 -2
  40. package/dist/public/assets/{SchemaConfigEditor-BpLYvsCk.js → SchemaConfigEditor-BFx4ZhVm.js} +1 -1
  41. package/dist/public/assets/{SettingsDialogBody-C_wnfFY5.js → SettingsDialogBody-Chz13SZG.js} +4 -4
  42. package/dist/public/assets/{ShareBranchSwitchDialog-5gKA4BCe.js → ShareBranchSwitchDialog-jGb4KF7T.js} +1 -1
  43. package/dist/public/assets/{ShareReceiveDialog-DCFP2qk5.js → ShareReceiveDialog-C7_nVZOF.js} +1 -1
  44. package/dist/public/assets/{ShareReceiveMissDialog-CcEXE75K.js → ShareReceiveMissDialog-Dv1nzqQa.js} +1 -1
  45. package/dist/public/assets/{SkillEditorActions-BUn81ISW.js → SkillEditorActions-2WrfNbQp.js} +1 -1
  46. package/dist/public/assets/{SourceEditor-DF-FFwuv.js → SourceEditor-CmpVF187.js} +1 -1
  47. package/dist/public/assets/{TerminalPanel-CEIHsphK.js → TerminalPanel-BHN2VN4r.js} +3 -3
  48. package/dist/public/assets/TerminalSessionsHost-Yz2cECTk.js +2 -0
  49. package/dist/public/assets/{TerminalWindowApp-B1hXJvlw.js → TerminalWindowApp-CntBjoWb.js} +1 -1
  50. package/dist/public/assets/ThreadView-loAOfVAD.js +6 -0
  51. package/dist/public/assets/{TimelineDiffPane-D-69ryad.js → TimelineDiffPane-C5gRZMQN.js} +2 -2
  52. package/dist/public/assets/{abnfDiagram-VRR7QNED-BA0sca5y.js → abnfDiagram-VRR7QNED-Cyah47m9.js} +1 -1
  53. package/dist/public/assets/{agent-diff-store-qaTtNJLp.js → agent-diff-store-BvRAZqCN.js} +1 -1
  54. package/dist/public/assets/{agent-visibility-CANQ951p.js → agent-visibility-DJ6Bc0aU.js} +1 -1
  55. package/dist/public/assets/{arc-DIcYIkPb.js → arc-B3aheyNj.js} +1 -1
  56. package/dist/public/assets/architecture-TIHT7OUA-BfFQVb2N.js +1 -0
  57. package/dist/public/assets/{architectureDiagram-ZJ3FMSHR-CyZsfJqr.js → architectureDiagram-ZJ3FMSHR-lZYHIfAt.js} +1 -1
  58. package/dist/public/assets/auth-state-cache-CEu3ZBI_.js +11 -0
  59. package/dist/public/assets/{blockDiagram-677ZJIJ3-BL4J4ddi.js → blockDiagram-677ZJIJ3-mULu-3uH.js} +1 -1
  60. package/dist/public/assets/{c4Diagram-LMCZKHZV-DtpyWL_l.js → c4Diagram-LMCZKHZV-DN4YpCzk.js} +1 -1
  61. package/dist/public/assets/{calendar-2iQWonjM.js → calendar-DqGTQwGe.js} +1 -1
  62. package/dist/public/assets/channel-D04u7HkE.js +1 -0
  63. package/dist/public/assets/{checkbox-DY-vIhnZ.js → checkbox-BkZH9Oy1.js} +1 -1
  64. package/dist/public/assets/chunk-2Q5K7J3B-Cczs20mb.js +1 -0
  65. package/dist/public/assets/{chunk-32BRIVSS-J_rdnOiy.js → chunk-32BRIVSS-DqkgLIEw.js} +1 -1
  66. package/dist/public/assets/{chunk-52WLFC77-BOMCKXNP.js → chunk-52WLFC77-9s8UsQXp.js} +1 -1
  67. package/dist/public/assets/{chunk-5FCAYU7R-8Y9BJKC-.js → chunk-5FCAYU7R-CkSFjjQr.js} +1 -1
  68. package/dist/public/assets/{chunk-5HE753X5-CQEApaqU.js → chunk-5HE753X5-C1Ig4mMr.js} +1 -1
  69. package/dist/public/assets/{chunk-5JV3BV7I-Wp4ieThX.js → chunk-5JV3BV7I-CIggZV0d.js} +1 -1
  70. package/dist/public/assets/{chunk-5TONJI2A-Dht2oB5p.js → chunk-5TONJI2A-BklATmUd.js} +1 -1
  71. package/dist/public/assets/{chunk-5VM5RSS4-BtUIXst7.js → chunk-5VM5RSS4-g5HeYq-z.js} +1 -1
  72. package/dist/public/assets/{chunk-7BUUIJ7U-B7ItXXvn.js → chunk-7BUUIJ7U-Dw__VSpN.js} +1 -1
  73. package/dist/public/assets/{chunk-BIQX33UG-B4CjyNhu.js → chunk-BIQX33UG-CRLx_yn0.js} +1 -1
  74. package/dist/public/assets/{chunk-BO2N2NFS-DMgXoikU.js → chunk-BO2N2NFS-BptiXfus.js} +3 -3
  75. package/dist/public/assets/{chunk-C7G6YPKG-Bhzd4FsL.js → chunk-C7G6YPKG-CmP7ozUj.js} +1 -1
  76. package/dist/public/assets/{chunk-CQNSW5MT-CVrDoms_.js → chunk-CQNSW5MT-BZUHEMrz.js} +1 -1
  77. package/dist/public/assets/{chunk-CYSBUYHQ-N9puYKAt.js → chunk-CYSBUYHQ-BRTRwmYZ.js} +1 -1
  78. package/dist/public/assets/{chunk-EMLP6XTP-ACA6yW7o.js → chunk-EMLP6XTP-DHUO1B6Q.js} +1 -1
  79. package/dist/public/assets/{chunk-EX3LRPZG-BIvLDOrf.js → chunk-EX3LRPZG-aq_XJzX2.js} +1 -1
  80. package/dist/public/assets/{chunk-FWX5IMBZ-1CESfm5O.js → chunk-FWX5IMBZ-rnR9hrS_.js} +2 -2
  81. package/dist/public/assets/{chunk-HOUHSVGY-DTcG17JD.js → chunk-HOUHSVGY-D0096-9K.js} +1 -1
  82. package/dist/public/assets/{chunk-ICXQ74PX-CDyWyZCQ.js → chunk-ICXQ74PX-BUnmDgqa.js} +1 -1
  83. package/dist/public/assets/{chunk-JG7HCLWE-gt52jYPR.js → chunk-JG7HCLWE-BwRUs0j6.js} +1 -1
  84. package/dist/public/assets/{chunk-JWPE2WC7-BIGkO1cG.js → chunk-JWPE2WC7-BOwE-mq8.js} +1 -1
  85. package/dist/public/assets/{chunk-MOJQB5TN-dX_Ns_6-.js → chunk-MOJQB5TN-CYyw3U64.js} +1 -1
  86. package/dist/public/assets/{chunk-MOZMSUNE-DtIvb1II.js → chunk-MOZMSUNE-_aAOLW1j.js} +1 -1
  87. package/dist/public/assets/{chunk-OGEWGWER-BgCGYbch.js → chunk-OGEWGWER-DLH_3q-Z.js} +1 -1
  88. package/dist/public/assets/{chunk-OSBZ3O6U-BjU8eaT1.js → chunk-OSBZ3O6U-BOkYzK-N.js} +1 -1
  89. package/dist/public/assets/{chunk-PUDLZKDR-BtLyPGmD.js → chunk-PUDLZKDR-Co9OjZVi.js} +1 -1
  90. package/dist/public/assets/{chunk-Q4XR5HBZ-B32WTAPs.js → chunk-Q4XR5HBZ-CjNiHUWo.js} +1 -1
  91. package/dist/public/assets/{chunk-QBLGF6JB-CprENtRb.js → chunk-QBLGF6JB-Cf-f1lin.js} +1 -1
  92. package/dist/public/assets/{chunk-R7FJI6CG-DCV9Dvbs.js → chunk-R7FJI6CG-C_nyMdyL.js} +1 -1
  93. package/dist/public/assets/{chunk-RYQCIY6F-DAyLri1b.js → chunk-RYQCIY6F-DXXN4Rzo.js} +1 -1
  94. package/dist/public/assets/{chunk-U6XO7XAA-DSdpZQB7.js → chunk-U6XO7XAA-Hw5M1kkd.js} +1 -1
  95. package/dist/public/assets/{chunk-V7JOEXUC-9lX7N0EN.js → chunk-V7JOEXUC-CLdet7qK.js} +1 -1
  96. package/dist/public/assets/chunk-VAUOI2AC-D9H5NlkH.js +1 -0
  97. package/dist/public/assets/{chunk-VR4S4FIN-CcTJJ1HA.js → chunk-VR4S4FIN-CnZ3Jw81.js} +1 -1
  98. package/dist/public/assets/{chunk-WYO6CB5R-9yPqK9ib.js → chunk-WYO6CB5R-C-c-Ja6D.js} +1 -1
  99. package/dist/public/assets/chunk-XXDRQBXY-BjAUTr8E.js +1 -0
  100. package/dist/public/assets/{chunk-YOTPTUD7-DBti7bK5.js → chunk-YOTPTUD7-CBowI675.js} +1 -1
  101. package/dist/public/assets/{chunk-ZGVPDNZ5-5ruaVNfo.js → chunk-ZGVPDNZ5-DfBSa8vW.js} +1 -1
  102. package/dist/public/assets/{chunk-ZIRB5QZD-DmY1977n.js → chunk-ZIRB5QZD-Cas2Em51.js} +1 -1
  103. package/dist/public/assets/classDiagram-OUVF2IWQ-BCgYs9Pk.js +1 -0
  104. package/dist/public/assets/classDiagram-v2-EOCWNBFH-BpVLL4-U.js +1 -0
  105. package/dist/public/assets/{client-version-BCgL1GiY.js → client-version-MIkctMik.js} +1 -1
  106. package/dist/public/assets/comment-chips-BYH7v5tl.js +7 -0
  107. package/dist/public/assets/{config-provider-CJmVSUcR.js → config-provider-B9kQH9zn.js} +2 -2
  108. package/dist/public/assets/{cose-bilkent-JH36ORCC-D8nyC_t4.js → cose-bilkent-JH36ORCC-CzZaHQ2l.js} +1 -1
  109. package/dist/public/assets/cynefin-VYW2F7L2-BVFEANjh.js +1 -0
  110. package/dist/public/assets/{cynefinDiagram-TSTJHNR4-B4B58YEO.js → cynefinDiagram-TSTJHNR4-7PYslCmH.js} +1 -1
  111. package/dist/public/assets/{dagre-DjTdhlGF.js → dagre-BeM31D08.js} +1 -1
  112. package/dist/public/assets/{dagre-VKFMJZFB-DQHmtQOE.js → dagre-VKFMJZFB-DsY-o9S9.js} +1 -1
  113. package/dist/public/assets/{diagram-FQU43EPY-B28ABQG6.js → diagram-FQU43EPY-Cc40Oq-m.js} +1 -1
  114. package/dist/public/assets/{diagram-G47NLZAW-1MthGQcj.js → diagram-G47NLZAW-DdbiGkJk.js} +1 -1
  115. package/dist/public/assets/{diagram-NH7WQ7WH-B_Fhjw29.js → diagram-NH7WQ7WH-BoEA_7qN.js} +1 -1
  116. package/dist/public/assets/{diagram-OA4YK3LP-1B7_yz5p.js → diagram-OA4YK3LP-ChsGI8c4.js} +1 -1
  117. package/dist/public/assets/{diagram-WEI45ONY-DzfuKRxf.js → diagram-WEI45ONY-znZ94tAq.js} +1 -1
  118. package/dist/public/assets/{dialog-TkFkuYVg.js → dialog-6-bc7qPg.js} +1 -1
  119. package/dist/public/assets/{dist-BObw0jPE.js → dist-B25wDFyk.js} +1 -1
  120. package/dist/public/assets/{dist-C7rVxfRB.js → dist-BMMI5Kdg.js} +1 -1
  121. package/dist/public/assets/{dist-DGzvBIzr.js → dist-C4Kl8QaT.js} +1 -1
  122. package/dist/public/assets/{dist-D1zECWv_.js → dist-C7VIqwIG.js} +1 -1
  123. package/dist/public/assets/{dist-BR00oFrA2.js → dist-CsRIthsw2.js} +1 -1
  124. package/dist/public/assets/{dist-CP0xcBf_.js → dist-CxGvJvCN.js} +1 -1
  125. package/dist/public/assets/{dist-Dhbvx6Ut.js → dist-DJbbCXtB.js} +184 -176
  126. package/dist/public/assets/{dist-DifRwKW-.js → dist-DPWWCZ4h.js} +1 -1
  127. package/dist/public/assets/{dist-Cqbn6bM9.js → dist-Dcu3hl7e.js} +1 -1
  128. package/dist/public/assets/{dist-CiPafPDy.js → dist-DdFyq-YY.js} +1 -1
  129. package/dist/public/assets/{dist-ChSSPf9y.js → dist-DlSSwTCj.js} +1 -1
  130. package/dist/public/assets/{dist-CslAqn54.js → dist-DmIoqGC0.js} +1 -1
  131. package/dist/public/assets/{dist-DL8cni8v.js → dist-Dolq1sN0.js} +1 -1
  132. package/dist/public/assets/{dist-ioWbCXab.js → dist-P9LB04An.js} +1 -1
  133. package/dist/public/assets/{doc-hash-BzYXjFJp.js → doc-hash-BbU2eA08.js} +1 -1
  134. package/dist/public/assets/{documents-events-NL4RG6fU.js → documents-events-C-mYs64z.js} +1 -1
  135. package/dist/public/assets/{ebnfDiagram-CCIWWBDH-BjazoYYO.js → ebnfDiagram-CCIWWBDH-DX6whEUG.js} +1 -1
  136. package/dist/public/assets/{erDiagram-Q63AITRT-DvgiLWl5.js → erDiagram-Q63AITRT-CgloxApp.js} +1 -1
  137. package/dist/public/assets/{esm-HV7Pxfbn.js → esm-QF0-_nlB.js} +1 -1
  138. package/dist/public/assets/eventmodeling-45OFAUF4-usNuB_rF.js +1 -0
  139. package/dist/public/assets/{file-tree-adapter-C3r5x-03.js → file-tree-adapter-c4ru9pmD.js} +1 -1
  140. package/dist/public/assets/{file-tree-utils-DnNGot8D.js → file-tree-utils-Lc0SvgnU.js} +1 -1
  141. package/dist/public/assets/flowDiagram-23GEKE2U-CDs0Vlps.js +1 -0
  142. package/dist/public/assets/{follow-file-BghdVu5J.js → follow-file-BVJ6G9Hs.js} +1 -1
  143. package/dist/public/assets/{ganttDiagram-NO4QXBWP-CJgOU-j1.js → ganttDiagram-NO4QXBWP-BZQXYXPf.js} +1 -1
  144. package/dist/public/assets/gitGraph-TEB2WS4Q-DXc_YvuI.js +1 -0
  145. package/dist/public/assets/{gitGraphDiagram-IHSO6WYX-DYP87cJL.js → gitGraphDiagram-IHSO6WYX-DnT15zfc.js} +1 -1
  146. package/dist/public/assets/{globals-C7y6kfQ9.js → globals-CdX3jOLC.js} +2 -2
  147. package/dist/public/assets/globals-Cf_md-qZ.css +1 -0
  148. package/dist/public/assets/{graphlib-DYCc0Y9o.js → graphlib-CIYGRnfF.js} +1 -1
  149. package/dist/public/assets/{highlighted-body-OFNGDK62-C9GzQB8c.js → highlighted-body-OFNGDK62-DN5QVB2g.js} +1 -1
  150. package/dist/public/assets/index-CSZTqzu0.js +2014 -0
  151. package/dist/public/assets/info-DKCQHKI2-C0DL9Ht0.js +1 -0
  152. package/dist/public/assets/{infoDiagram-FWYZ7A6U-CbZOQ254.js → infoDiagram-FWYZ7A6U-CPJF9vn1.js} +1 -1
  153. package/dist/public/assets/{ishikawaDiagram-FXEZZL3T-CUWPHUOP.js → ishikawaDiagram-FXEZZL3T-CPmyb7Oh.js} +1 -1
  154. package/dist/public/assets/{journeyDiagram-5HDEW3XC-RLUp44OU.js → journeyDiagram-5HDEW3XC-DHsl5S9z.js} +1 -1
  155. package/dist/public/assets/{kanban-definition-HUTT4EX6-D4TPhDQW.js → kanban-definition-HUTT4EX6-BS2xX-qh.js} +1 -1
  156. package/dist/public/assets/{line-KTG0S8eM.js → line-PfwSO0Y4.js} +1 -1
  157. package/dist/public/assets/{linear-D6fTctUn.js → linear-DY7zcaob.js} +1 -1
  158. package/dist/public/assets/{lint-config-client-CrVQnAJl.js → lint-config-client-DJg7YDu3.js} +1 -1
  159. package/dist/public/assets/{map-Rw6uJqFR.js → map-B5g_BAkn.js} +1 -1
  160. package/dist/public/assets/{markdownlint-rule-browser-Cb6F_hct.js → markdownlint-rule-browser-6yvn3dt6.js} +1 -1
  161. package/dist/public/assets/mermaid-GHXKKRXX-C9klxgAS.js +1 -0
  162. package/dist/public/assets/{mermaid-parser.core-CusxBOjy.js → mermaid-parser.core-DtiAO5KW.js} +2 -2
  163. package/dist/public/assets/{mermaid.core-okCkIUps.js → mermaid.core-2-fa7F6R.js} +3 -3
  164. package/dist/public/assets/{mindmap-definition-LN4V7U3C-D-eGlMvq.js → mindmap-definition-LN4V7U3C-CTVrQgzc.js} +1 -1
  165. package/dist/public/assets/{navigation-targets-CILnJhFW.js → navigation-targets-DwSgIIy0.js} +1 -1
  166. package/dist/public/assets/{now-DRL8tqfF.js → now-bAD2ZsK-.js} +1 -1
  167. package/dist/public/assets/{open-managed-artifact-tab-CoiXLY4g.js → open-managed-artifact-tab-Dpz9X1m_.js} +1 -1
  168. package/dist/public/assets/{ordinal-DnmHW-WD.js → ordinal-Dj8tTCMd.js} +1 -1
  169. package/dist/public/assets/packet-7NZHBO7P-BpFruX6n.js +1 -0
  170. package/dist/public/assets/{panel-C8ZhM4q-.js → panel-BbxjQP3-.js} +1 -1
  171. package/dist/public/assets/{pegDiagram-2B236MQR-Bjnm3xCN.js → pegDiagram-2B236MQR-DVy6JL4F.js} +1 -1
  172. package/dist/public/assets/{pending-receive-nav-store-BYGxrnRS.js → pending-receive-nav-store-t5K6mYGs.js} +1 -1
  173. package/dist/public/assets/pie-RZYD4A2V-lVpCCOkJ.js +1 -0
  174. package/dist/public/assets/{pieDiagram-ENE6RG2P-BkLpbnFN.js → pieDiagram-ENE6RG2P-Kxbx45IP.js} +1 -1
  175. package/dist/public/assets/{project-paths-Dwo4Of8C.js → project-paths-DdZAF_-I.js} +1 -1
  176. package/dist/public/assets/{prop-types-BX5rHy8u.js → prop-types-65NJPmd-.js} +1 -1
  177. package/dist/public/assets/{quadrantDiagram-ABIIQ3AL-eMGNkhp-.js → quadrantDiagram-ABIIQ3AL-BbCFEjhq.js} +1 -1
  178. package/dist/public/assets/radar-I7S5WNFK-Bd-i9axl.js +1 -0
  179. package/dist/public/assets/railroad-3IZDKUUU-D6ewe_eA.js +1 -0
  180. package/dist/public/assets/railroad-abnf-AHOZXSZD-DKqyYXL-.js +1 -0
  181. package/dist/public/assets/railroad-ebnf-EBAXGLYW-CtMezBX2.js +1 -0
  182. package/dist/public/assets/railroad-peg-LSFZ7HO6-DJ-63J6n.js +1 -0
  183. package/dist/public/assets/{railroadDiagram-RFXS5EU6-Cs70gdc4.js → railroadDiagram-RFXS5EU6-6SEpaCgo.js} +1 -1
  184. package/dist/public/assets/{receive-store-Cuer2-MQ.js → receive-store-C8NL_Ow-.js} +1 -1
  185. package/dist/public/assets/{requirementDiagram-TGXJPOKE-yQhnovOU.js → requirementDiagram-TGXJPOKE-brbJ6VUS.js} +1 -1
  186. package/dist/public/assets/{sankeyDiagram-HTMAVEWB-C7R3anws.js → sankeyDiagram-HTMAVEWB-DT0MK3ep.js} +1 -1
  187. package/dist/public/assets/{schema-fields-view-intent-D_s-Cynn.js → schema-fields-view-intent-CDu72Aty.js} +1 -1
  188. package/dist/public/assets/{selection-context-BLRRQXPM.js → selection-context-BNYOSYyM.js} +1 -1
  189. package/dist/public/assets/{sequenceDiagram-DBY2YBRQ-CEdbVotz.js → sequenceDiagram-DBY2YBRQ-BPJt9blB.js} +1 -1
  190. package/dist/public/assets/{sizeCapture-X5ZJPWSS-DAh96RVo.js → sizeCapture-X5ZJPWSS-1l7G4SwD.js} +1 -1
  191. package/dist/public/assets/skill-actions-ByBHG3Gh.js +1 -0
  192. package/dist/public/assets/{skills-api-By8un6BC.js → skills-api-DWPhWBud.js} +1 -1
  193. package/dist/public/assets/{src--OxBHrEw.js → src-CaBa9Z1L.js} +1 -1
  194. package/dist/public/assets/{src-oESxEYNL.js → src-U1RHfo7d.js} +1 -1
  195. package/dist/public/assets/{stateDiagram-2N3HPSRC-q96Dmt4i.js → stateDiagram-2N3HPSRC-QGlUFt6h.js} +1 -1
  196. package/dist/public/assets/stateDiagram-v2-6OUMAXLB-D_6D-nLI.js +1 -0
  197. package/dist/public/assets/{swimlanes-5IMT3BWC--g7Ac5Wk.js → swimlanes-5IMT3BWC-BHsr6MBF.js} +2 -2
  198. package/dist/public/assets/swimlanesDiagram-G3AALYLV-cqXTLbrM.js +8 -0
  199. package/dist/public/assets/{tag-pill-input-BIioVLJo.js → tag-pill-input-BHj4spSb.js} +1 -1
  200. package/dist/public/assets/{target-navigation-intent-YwxjtaLV.js → target-navigation-intent-B5jnqgZ_.js} +1 -1
  201. package/dist/public/assets/{telemetry-impl-BFTBY40l.js → telemetry-impl-DV07MMfz.js} +2 -2
  202. package/dist/public/assets/{telemetry-startup-DI3YRseI.js → telemetry-startup-Cy1VVosp.js} +1 -1
  203. package/dist/public/assets/terminal-launch-events-CtZeptxC.js +1 -0
  204. package/dist/public/assets/{terminal-telemetry-BLN1ghOs.js → terminal-telemetry-CvNM4wYv.js} +1 -1
  205. package/dist/public/assets/{thread-client-C0O75Kza.js → thread-client-CSOJeVWW.js} +1 -1
  206. package/dist/public/assets/{timeline-definition-FHXFAJF6-DqrkK_6w.js → timeline-definition-FHXFAJF6-DitS4FqW.js} +1 -1
  207. package/dist/public/assets/treeView-QDETBFTQ-CuznZlQn.js +1 -0
  208. package/dist/public/assets/treemap-6X3UGDF4-DCd6umeO.js +1 -0
  209. package/dist/public/assets/typing-burst-detector-CZREoy8B.js +8 -0
  210. package/dist/public/assets/{uninstall-ousBF288.js → uninstall-CA1cQCnA.js} +1 -1
  211. package/dist/public/assets/use-activity-panel-DWxDopZd.js +1 -0
  212. package/dist/public/assets/{use-apply-config-color-theme-VdlJaZ0G.js → use-apply-config-color-theme-DSCn9I0W.js} +2 -2
  213. package/dist/public/assets/{use-collab-url-DU2XMK58.js → use-collab-url-CE02D4PJ.js} +1 -1
  214. package/dist/public/assets/{use-live-xterm-theme-DVzY8LXJ.js → use-live-xterm-theme-B2MdP4nP.js} +1 -1
  215. package/dist/public/assets/use-settings-route-BX1P2p9-.js +1 -0
  216. package/dist/public/assets/{use-terminal-enabled-BoKa-wLe.js → use-terminal-enabled-BlXFMDFQ.js} +1 -1
  217. package/dist/public/assets/use-timeline-entry-diff-BI1BVnmy.js +6 -0
  218. package/dist/public/assets/{use-workspace-DwK7HqI3.js → use-workspace-DcPrrukl.js} +1 -1
  219. package/dist/public/assets/{vennDiagram-L72KCM5P-DFSXk11G.js → vennDiagram-L72KCM5P-D7jabRjK.js} +1 -1
  220. package/dist/public/assets/wardley-OPB4EBWU-DH0Qf9r4.js +1 -0
  221. package/dist/public/assets/{wardleyDiagram-EHGQE667-Bw65HviB.js → wardleyDiagram-EHGQE667-C3olh_ef.js} +1 -1
  222. package/dist/public/assets/{workspace-paths-DSoqUSNl.js → workspace-paths-CU85-ZRd.js} +1 -1
  223. package/dist/public/assets/{xychartDiagram-FW5EYKEG-CEVfZ0d5.js → xychartDiagram-FW5EYKEG-WqIWQJdh.js} +1 -1
  224. package/dist/public/index.html +93 -92
  225. package/dist/public/uninstall.html +10 -10
  226. package/dist/{repair-launch-json-DcxpqtPk.mjs → repair-launch-json-DuW7FPUd.mjs} +2 -2
  227. package/dist/{repair-mcp-configs-CR0w_9a_.mjs → repair-mcp-configs-BQGk6jEy.mjs} +2 -2
  228. package/dist/{repair-skills-SFM8UbHd.mjs → repair-skills-BHY_AeM4.mjs} +2 -2
  229. package/dist/repair-skills-CUT1NbJx.mjs +1 -0
  230. package/dist/server-lock-CG809RrD.mjs +1 -0
  231. package/dist/{server-lock-DKdlkhpB.mjs → server-lock-D7crxuP7.mjs} +2 -2
  232. package/dist/{sleep-DDnWCWup.mjs → sleep-IcuyYCzq.mjs} +24 -24
  233. package/dist/{src-D5b5YKY3.mjs → src-D4iCDwsy.mjs} +1 -1
  234. package/dist/{src-CBz1zxch.mjs → src-Dgr9qydu.mjs} +6 -6
  235. package/dist/{src-BK8Vvk9Y.mjs → src-DmtkLnli.mjs} +129 -121
  236. package/dist/src-T1lGYBC1.mjs +3275 -0
  237. package/dist/{start-BgSe0IWK.mjs → start-BCUq2L4a.mjs} +3 -3
  238. package/dist/start-p5gJUJY6.mjs +1 -0
  239. package/dist/{write-project-skill-IitZHJK2.mjs → write-project-skill-BzhJIXSv.mjs} +4 -4
  240. package/package.json +5 -5
  241. package/dist/constants-CrnIZ43q.mjs +0 -2
  242. package/dist/fs-traced-CeWo_16n.mjs +0 -1
  243. package/dist/git-handle-CEBr8e47.mjs +0 -1
  244. package/dist/init-DUJ-mhxU.mjs +0 -1
  245. package/dist/loader-D4TBMIRP.mjs +0 -1
  246. package/dist/md-manager-R-9E_3qL.mjs +0 -2
  247. package/dist/preview-EXWt03kG.mjs +0 -1
  248. package/dist/public/assets/CodeMirrorPropInput-BQX8xzkZ.js +0 -3
  249. package/dist/public/assets/FeedbackForm-DyWcK0_u.js +0 -1
  250. package/dist/public/assets/GraphPanel-C0b5lyLq.js +0 -44
  251. package/dist/public/assets/PropertyPanel-DjnXiFVP.js +0 -2
  252. package/dist/public/assets/TerminalSessionsHost-fGKRakWG.js +0 -2
  253. package/dist/public/assets/ThreadView-CQui3mRB.js +0 -6
  254. package/dist/public/assets/architecture-TIHT7OUA-DhKVyAdC.js +0 -1
  255. package/dist/public/assets/auth-state-cache-WFzLfVsU.js +0 -11
  256. package/dist/public/assets/channel-D7XYjy4a.js +0 -1
  257. package/dist/public/assets/chunk-2Q5K7J3B-BpVQiBsM.js +0 -1
  258. package/dist/public/assets/chunk-VAUOI2AC-buA1NS7h.js +0 -1
  259. package/dist/public/assets/chunk-XXDRQBXY-Dpdm1nrz.js +0 -1
  260. package/dist/public/assets/classDiagram-OUVF2IWQ-BdRcUr99.js +0 -1
  261. package/dist/public/assets/classDiagram-v2-EOCWNBFH-4fffeoHu.js +0 -1
  262. package/dist/public/assets/cynefin-VYW2F7L2-BlrdxSfe.js +0 -1
  263. package/dist/public/assets/eventmodeling-45OFAUF4-D8s6Yevv.js +0 -1
  264. package/dist/public/assets/flowDiagram-23GEKE2U-hlKdkNzZ.js +0 -1
  265. package/dist/public/assets/gitGraph-TEB2WS4Q-B-5iqxxO.js +0 -1
  266. package/dist/public/assets/globals-BtCTpjIr.css +0 -1
  267. package/dist/public/assets/index-DuOqh37t.js +0 -2013
  268. package/dist/public/assets/info-DKCQHKI2-CkzkGEPY.js +0 -1
  269. package/dist/public/assets/mermaid-GHXKKRXX-WtDC9WMV.js +0 -1
  270. package/dist/public/assets/packet-7NZHBO7P-DDIvLOTX.js +0 -1
  271. package/dist/public/assets/pie-RZYD4A2V-DnssmCEa.js +0 -1
  272. package/dist/public/assets/radar-I7S5WNFK-0J5y2_MO.js +0 -1
  273. package/dist/public/assets/railroad-3IZDKUUU-BgsONsxl.js +0 -1
  274. package/dist/public/assets/railroad-abnf-AHOZXSZD-BhBo_9j9.js +0 -1
  275. package/dist/public/assets/railroad-ebnf-EBAXGLYW-B5mHA2IL.js +0 -1
  276. package/dist/public/assets/railroad-peg-LSFZ7HO6-BV4uZ4WL.js +0 -1
  277. package/dist/public/assets/skill-actions-DEa7Mqcd.js +0 -1
  278. package/dist/public/assets/stateDiagram-v2-6OUMAXLB-BCNHhMpC.js +0 -1
  279. package/dist/public/assets/swimlanesDiagram-G3AALYLV-hRuoLGg3.js +0 -8
  280. package/dist/public/assets/terminal-launch-events-7D-deCwp.js +0 -1
  281. package/dist/public/assets/treeView-QDETBFTQ-N2YNex2I.js +0 -1
  282. package/dist/public/assets/treemap-6X3UGDF4-DkzYKeau.js +0 -1
  283. package/dist/public/assets/typing-burst-detector-CaC_du54.js +0 -8
  284. package/dist/public/assets/use-activity-panel-CVU0EVdO.js +0 -1
  285. package/dist/public/assets/use-settings-route-FnSIe1ir.js +0 -1
  286. package/dist/public/assets/use-timeline-entry-diff-CF4QQ4Me.js +0 -6
  287. package/dist/public/assets/wardley-OPB4EBWU-OOiOMSoP.js +0 -1
  288. package/dist/repair-skills-Zy_JOsHR.mjs +0 -1
  289. package/dist/server-lock-Dp1Aw6AQ.mjs +0 -1
  290. package/dist/src-BIJtc8LA.mjs +0 -3275
  291. package/dist/start-D2rWspqr.mjs +0 -1
  292. /package/dist/public/assets/{ActivityPanelDiffView-B03Wzvap.js → ActivityPanelDiffView-DYFlG61N.js} +0 -0
  293. /package/dist/public/assets/{AppMenubar-Bisp0k8X.js → AppMenubar-DHWqgWXl.js} +0 -0
  294. /package/dist/public/assets/{ConfigSharingInfoTooltip-DMbsfWD9.js → ConfigSharingInfoTooltip-BMJ7SIjf.js} +0 -0
  295. /package/dist/public/assets/{__vite-browser-external-BckCY-VI.js → __vite-browser-external-z7jTWlYs.js} +0 -0
  296. /package/dist/public/assets/{agent-presence-CEfNcJUY.js → agent-presence-BdWbAeV-.js} +0 -0
  297. /package/dist/public/assets/{array-D9gZmznT.js → array-CC6md2n_.js} +0 -0
  298. /package/dist/public/assets/{badge-Dba4cvJR.js → badge-DXHoKHez.js} +0 -0
  299. /package/dist/public/assets/{chunk-KEIR6QF5-zkgbDrf9.js → chunk-KEIR6QF5-BppCe61B.js} +0 -0
  300. /package/dist/public/assets/{chunk-Y2CYZVJY-BAUBUeAF.js → chunk-Y2CYZVJY-CP7lNZai.js} +0 -0
  301. /package/dist/public/assets/{clike-ccBqxK3t.js → clike-BAopx-wt.js} +0 -0
  302. /package/dist/public/assets/{clipboard-adapter-Cxzkvc1d.js → clipboard-adapter-ZCy01ehf.js} +0 -0
  303. /package/dist/public/assets/{colors-BZ7r12jC.js → colors-QyrgP4ww.js} +0 -0
  304. /package/dist/public/assets/{config-context-gd3BC-iY.js → config-context-D3FvmHZm.js} +0 -0
  305. /package/dist/public/assets/{copilot-CjOGWDvv.js → copilot-BiqH8PgI.js} +0 -0
  306. /package/dist/public/assets/{cursor-B8rehP9c.js → cursor-BDHSyD-9.js} +0 -0
  307. /package/dist/public/assets/{cytoscape.esm-GtliGICm.js → cytoscape.esm-Ci36Fm6r.js} +0 -0
  308. /package/dist/public/assets/{defaultLocale-CqKPYlUZ.js → defaultLocale-ByXO85kN.js} +0 -0
  309. /package/dist/public/assets/{desktop-bridge-types--ZPzhkC9.js → desktop-bridge-types-DHaZbwZ0.js} +0 -0
  310. /package/dist/public/assets/{diff-oW0nWZgn.js → diff-KHO8LkSI.js} +0 -0
  311. /package/dist/public/assets/{dist-BLAMau9Z.js → dist-B8I5m7M1.js} +0 -0
  312. /package/dist/public/assets/{dist-q14fBS3T.js → dist-BCZq3DKc.js} +0 -0
  313. /package/dist/public/assets/{dist-zCmaEyrL.js → dist-Bpk5HQQh.js} +0 -0
  314. /package/dist/public/assets/{dist-B1Jbz0yl.js → dist-Cljnhi3D.js} +0 -0
  315. /package/dist/public/assets/{dist-DNwOaDhC.js → dist-D7mv9smG.js} +0 -0
  316. /package/dist/public/assets/{documents-fetch-CLL0O1of.js → documents-fetch-Db-Ikele.js} +0 -0
  317. /package/dist/public/assets/{external-link-T4Nj1gcG.js → external-link-Ct0_ujyY.js} +0 -0
  318. /package/dist/public/assets/{field-DVIFAnvR.js → field-BNyAQHKf.js} +0 -0
  319. /package/dist/public/assets/{file-tree-rename-validation-wADtjYEi.js → file-tree-rename-validation-DDA1ck2Y.js} +0 -0
  320. /package/dist/public/assets/{form-coxG-8Qw.js → form-gDsa08Xi.js} +0 -0
  321. /package/dist/public/assets/{format-CejNFduS.js → format-4tjAvLkN.js} +0 -0
  322. /package/dist/public/assets/{go-CCS4kWKN.js → go-7c8IMl4m.js} +0 -0
  323. /package/dist/public/assets/{init-CMTNTj66.js → init-CL1Yxhhi.js} +0 -0
  324. /package/dist/public/assets/{input-D0ZW0Opq.js → input-D4OPkja2.js} +0 -0
  325. /package/dist/public/assets/{isObject-Ho9jn-6g.js → isObject-5PVyZ800.js} +0 -0
  326. /package/dist/public/assets/{libesm-Db-3Gx3Z.js → libesm-WVpTb_tB.js} +0 -0
  327. /package/dist/public/assets/{lint-plugin-meta-DKTiO7RO.js → lint-plugin-meta-BoxMoaxR.js} +0 -0
  328. /package/dist/public/assets/{lru-string-cache-BZxOuxTi.js → lru-string-cache-7Y9kMeow.js} +0 -0
  329. /package/dist/public/assets/{lua-DgAwqJ0D.js → lua-DnREcbBQ.js} +0 -0
  330. /package/dist/public/assets/{mcp-consent-store-wvrClpLC.js → mcp-consent-store-CDAQY6Np.js} +0 -0
  331. /package/dist/public/assets/{min-BQPeeNfF.js → min-DVq-2erP.js} +0 -0
  332. /package/dist/public/assets/{minus-SecfYzeQ.js → minus-CI_HyT1V.js} +0 -0
  333. /package/dist/public/assets/{overlay-layers-y-dNUWSd.js → overlay-layers-Dhz8IqAf.js} +0 -0
  334. /package/dist/public/assets/{panel-right-open-B7ziq39V.js → panel-right-open-CWgBRlZa.js} +0 -0
  335. /package/dist/public/assets/{panzoom.es-CxTS7ZPP.js → panzoom.es-D0o6IaL6.js} +0 -0
  336. /package/dist/public/assets/{paperclip-CX7J_G-w.js → paperclip-FiPqbd6f.js} +0 -0
  337. /package/dist/public/assets/{parse-api-error-C_gwkKmG.js → parse-api-error-BtEL2kxi.js} +0 -0
  338. /package/dist/public/assets/{path-DoEWlp6O.js → path-BGTOauh6.js} +0 -0
  339. /package/dist/public/assets/{pdf-Da_O_GF5.js → pdf-DLVdEoR9.js} +0 -0
  340. /package/dist/public/assets/{pdf.worker-Pbs_-93C.js → pdf.worker-Cuhr1SjJ.js} +0 -0
  341. /package/dist/public/assets/{perl-DMwerdcj.js → perl-D6YK7dbe.js} +0 -0
  342. /package/dist/public/assets/{properties-Du1Kuwqc.js → properties-BPzWpIa7.js} +0 -0
  343. /package/dist/public/assets/{r-wSvpRg5h.js → r-tzVlUzeq.js} +0 -0
  344. /package/dist/public/assets/{refresh-cw-BfeWGCsv.js → refresh-cw-DClG_qgN.js} +0 -0
  345. /package/dist/public/assets/{rough.esm-esi5HKC4.js → rough.esm-kQd3CdGR.js} +0 -0
  346. /package/dist/public/assets/{ruby-DuM6hMQW.js → ruby-_eAC-08N.js} +0 -0
  347. /package/dist/public/assets/{share-metadata-rows-CbXHISQ4.js → share-metadata-rows-Ds3RIKZ4.js} +0 -0
  348. /package/dist/public/assets/{shell-BZ7mgeL0.js → shell-CRkrz4LQ.js} +0 -0
  349. /package/dist/public/assets/{skeleton-BG12Hmzn.js → skeleton-Mo1oLtEu.js} +0 -0
  350. /package/dist/public/assets/{sliders-horizontal-34K0eDW2.js → sliders-horizontal-BNv-Koqw.js} +0 -0
  351. /package/dist/public/assets/{sortable.esm-C565D25d.js → sortable.esm-_jt9EfAF.js} +0 -0
  352. /package/dist/public/assets/{sql-BXdRuz6d.js → sql-BtxU5QDI.js} +0 -0
  353. /package/dist/public/assets/{src-DNE52RZP.js → src-BJaEWo8x.js} +0 -0
  354. /package/dist/public/assets/{startup-marks-CqVzdU1y.js → startup-marks-CyxDWRgR.js} +0 -0
  355. /package/dist/public/assets/{stex-CniH6-Mv.js → stex-EWGki41Z.js} +0 -0
  356. /package/dist/public/assets/{swift-DZwxTp-L.js → swift-BmtuXdIg.js} +0 -0
  357. /package/dist/public/assets/{textarea-tdCJViKf.js → textarea-bScbzsdX.js} +0 -0
  358. /package/dist/public/assets/{thread-draft-staging-BuvCYJwg.js → thread-draft-staging-CKJIG41d.js} +0 -0
  359. /package/dist/public/assets/{timeline-diff-store-CYckprSS.js → timeline-diff-store-BwCud4Ug.js} +0 -0
  360. /package/dist/public/assets/{toml-C5KR4pi6.js → toml-yD0H4nkp.js} +0 -0
  361. /package/dist/public/assets/{trash-2-BUuL4OCw.js → trash-2-DE3a7L75.js} +0 -0
  362. /package/dist/public/assets/{triangle-alert-Clgvyc7B.js → triangle-alert-Bcc1P5yx.js} +0 -0
  363. /package/dist/public/assets/{use-installed-clis-UlK7P1aH.js → use-installed-clis-8r2iSkgN.js} +0 -0
  364. /package/dist/public/assets/{useLintConfigViewMode-DKPENttR.js → useLintConfigViewMode-CyzSEZ5z.js} +0 -0
  365. /package/dist/public/assets/{worktree-store-LSx9q9Ga.js → worktree-store-B-NxI13K.js} +0 -0
  366. /package/dist/public/assets/{wrench-BfoTvqT9.js → wrench-4e3jxe5l.js} +0 -0
  367. /package/dist/public/assets/{x-DVkpYo5d.js → x-Du5jsNHa.js} +0 -0
@@ -1,4 +1,4 @@
1
- import{n as e}from"./chunk-Y2CYZVJY-BAUBUeAF.js";import{t}from"./src--OxBHrEw.js";import{A as n,B as r,M as i,T as a,b as o,g as s,x as c,z as l}from"./chunk-WYO6CB5R-9yPqK9ib.js";import{C as u}from"./src-DNE52RZP.js";import{a as d,r as f,u as p}from"./chunk-ICXQ74PX-CDyWyZCQ.js";import{t as m}from"./chunk-HOUHSVGY-DTcG17JD.js";import{n as h}from"./chunk-Q4XR5HBZ-B32WTAPs.js";import{n as g,t as _}from"./chunk-OGEWGWER-BgCGYbch.js";import{a as v,i as y,r as b,t as x}from"./chunk-C7G6YPKG-Bhzd4FsL.js";import{t as S}from"./rough.esm-esi5HKC4.js";var C=e(async(e,t,n)=>{let r,i=t.useHtmlLabels||s(c()?.htmlLabels);r=n||`node default`;let a=e.insert(`g`).attr(`class`,r).attr(`id`,t.domId||t.id),o=a.insert(`g`).attr(`class`,`label`).attr(`style`,p(t.labelStyle)),f;f=t.label===void 0?``:typeof t.label==`string`?t.label:t.label[0];let m=!!t.icon||!!t.img,g=t.labelType===`markdown`,v=await h(o,l(d(f),c()),{useHtmlLabels:i,width:t.width||c().flowchart?.wrappingWidth,classes:g?`markdown-node-label`:``,style:t.labelStyle,addSvgBackground:m,markdown:g},c()),y=v.getBBox(),b=(t?.padding??0)/2;if(i){let e=v.children[0],t=u(v);await _(e,f),y=e.getBoundingClientRect(),t.attr(`width`,y.width),t.attr(`height`,y.height)}return i?o.attr(`transform`,`translate(`+-y.width/2+`, `+-y.height/2+`)`):o.attr(`transform`,`translate(0, `+-y.height/2+`)`),t.centerLabel&&o.attr(`transform`,`translate(`+-y.width/2+`, `+-y.height/2+`)`),o.insert(`rect`,`:first-child`),{shapeSvg:a,bbox:y,halfPadding:b,label:o}},`labelHelper`),w=e(async(e,t,n)=>{let r=n.useHtmlLabels??a(c()),i=e.insert(`g`).attr(`class`,`label`).attr(`style`,n.labelStyle||``),o=await h(i,l(d(t),c()),{useHtmlLabels:r,width:n.width||c()?.flowchart?.wrappingWidth,style:n.labelStyle,addSvgBackground:!!n.icon||!!n.img}),s=o.getBBox(),f=n.padding/2;if(a(c())){let e=o.children[0],t=u(o);s=e.getBoundingClientRect(),t.attr(`width`,s.width),t.attr(`height`,s.height)}return r?i.attr(`transform`,`translate(`+-s.width/2+`, `+-s.height/2+`)`):i.attr(`transform`,`translate(0, `+-s.height/2+`)`),n.centerLabel&&i.attr(`transform`,`translate(`+-s.width/2+`, `+-s.height/2+`)`),i.insert(`rect`,`:first-child`),{shapeSvg:e,bbox:s,halfPadding:f,label:i}},`insertLabel`),T=e((e,t)=>{let n=t.node().getBBox();e.width=n.width,e.height=n.height},`updateNodeBounds`),E=e((e,t)=>(e.look===`handDrawn`?`rough-node`:`node`)+` `+e.cssClasses+` `+(t||``),`getNodeClasses`);function D(e){let t=e.map((e,t)=>`${t===0?`M`:`L`}${e.x},${e.y}`);return t.push(`Z`),t.join(` `)}e(D,`createPathFromPoints`);function O(e,t,n,r,i,a){let o=[],s=n-e,c=r-t,l=s/a,u=2*Math.PI/l,d=t+c/2;for(let t=0;t<=50;t++){let n=e+t/50*s,r=d+i*Math.sin(u*(n-e));o.push({x:n,y:r})}return o}e(O,`generateFullSineWavePoints`);function k(e,t,n,r,i,a){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}e(k,`generateCirclePoints`);function A(t){let n=Array.from(t.childNodes).filter(e=>e.tagName===`path`),r=document.createElementNS(`http://www.w3.org/2000/svg`,`path`),i=n.map(e=>e.getAttribute(`d`)).filter(e=>e!==null).join(` `);r.setAttribute(`d`,i);let a=n.find(e=>e.getAttribute(`fill`)!==`none`),o=n.find(e=>e.getAttribute(`stroke`)!==`none`),s=e((e,t)=>e?.getAttribute(t)??void 0,`getAttr`);if(a){let e={fill:s(a,`fill`),"fill-opacity":s(a,`fill-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&r.setAttribute(e,t)})}if(o){let e={stroke:s(o,`stroke`),"stroke-width":s(o,`stroke-width`)??`1`,"stroke-opacity":s(o,`stroke-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&r.setAttribute(e,t)})}let c=document.createElementNS(`http://www.w3.org/2000/svg`,`g`);return c.appendChild(r),c}e(A,`mergePaths`);var j=e((e,t)=>{var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2,c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=a===0?0:s*i/a,l=s):(i<0&&(o=-o),c=o,l=i===0?0:o*a/i),{x:n+c,y:r+l}},`intersectRect`),M=e(async(e,t,n,r=!1,i=!1)=>{let o=t||``;typeof o==`object`&&(o=o[0]);let s=c(),l=a(s);return await h(e,o,{style:n,isTitle:r,useHtmlLabels:l,markdown:!1,isNode:i,width:1/0},s)},`createLabel`),N=e((e,t,n,r,i)=>[`M`,e+i,t,`H`,e+n-i,`A`,i,i,0,0,1,e+n,t+i,`V`,t+r-i,`A`,i,i,0,0,1,e+n-i,t+r,`H`,e+i,`A`,i,i,0,0,1,e,t+r-i,`V`,t+i,`A`,i,i,0,0,1,e+i,t,`Z`].join(` `),`createRoundedRectPathD`),P=e(async(e,n)=>{let r=c(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:o,clusterBorder:l}=i,d=l,{labelStyles:f,nodeStyles:p,borderStyles:m,backgroundStyles:g}=y(n),_=e.insert(`g`).attr(`class`,`cluster swimlane `+(n.cssClasses||``)).attr(`id`,n.id).attr(`data-id`,n.id).attr(`data-et`,`cluster`).attr(`data-look`,n.look),b=s(r.flowchart.htmlLabels),x=n.direction===`LR`,C=_.insert(`g`).attr(`class`,`cluster-label swimlane-label`),w=await h(C,n.label,{style:n.labelStyle,useHtmlLabels:b,isNode:!0,width:n.width}),T=w.getBBox();if(b){let e=w.children[0],t=u(w);T=e.getBoundingClientRect(),t.attr(`width`,T.width),t.attr(`height`,T.height)}let E=n.padding??0,D=n.width<=T.width+E?T.width+E:n.width;n.width<=T.width+E?n.diff=(D-n.width)/2-E:n.diff=-E;let O=n.height,k=n.y-O/2,A=n.y+O/2,M=n.x-D/2,N=n.swimlaneContentTop===void 0?k+O/3:n.swimlaneContentTop,P=x?4:0,F=T.height+2*P,I,L;if(x){let e=Math.max(F,T.height+2*P),t=M+e,r=Math.max(0,D-e);if(n.look===`handDrawn`){let i=S.svg(_),s=v(n,{roughness:.7,fill:o,stroke:d,fillWeight:3,seed:a}),c=v(n,{roughness:.7,fill:`none`,stroke:d,seed:a}),l=i.rectangle(M,k,e,O,s);I=_.insert(()=>l,`:first-child`);let u=i.rectangle(t,k,r,O,c);L=_.insert(()=>u,`:first-child`),I.select(`path:nth-child(2)`).attr(`style`,m.join(`;`)),I.select(`path`).attr(`style`,g.join(`;`).replace(`fill`,`stroke`))}else I=_.insert(`rect`,`:first-child`),L=_.insert(`rect`,`:first-child`),I.attr(`class`,`swimlane-title`).attr(`style`,p).attr(`x`,M).attr(`y`,k).attr(`width`,e).attr(`height`,O).attr(`fill`,o).attr(`stroke`,d),L.attr(`class`,`swimlane-body`).attr(`style`,p).attr(`x`,t).attr(`y`,k).attr(`width`,r).attr(`height`,O).attr(`fill`,`none`).attr(`stroke`,d);let i=M+e/2,s=n.y;C.attr(`transform`,`translate(${i}, ${s}) rotate(-90) translate(${-T.width/2}, ${-T.height/2})`)}else{let e=Math.max(0,N-k),t=Math.min(F,e),r=k+t,i=Math.max(0,A-r),s=n.x-D/2;if(n.look===`handDrawn`){let e=S.svg(_),c=v(n,{roughness:.7,fill:o,stroke:d,fillWeight:3,seed:a}),l=v(n,{roughness:.7,fill:`none`,stroke:d,seed:a}),u=e.rectangle(s,k,D,t,c);I=_.insert(()=>u,`:first-child`);let f=e.rectangle(s,r,D,i,l);L=_.insert(()=>f,`:first-child`),I.select(`path:nth-child(2)`).attr(`style`,m.join(`;`)),I.select(`path`).attr(`style`,g.join(`;`).replace(`fill`,`stroke`))}else I=_.insert(`rect`,`:first-child`),L=_.insert(`rect`,`:first-child`),I.attr(`class`,`swimlane-title`).attr(`style`,p).attr(`x`,s).attr(`y`,k).attr(`width`,D).attr(`height`,t).attr(`fill`,o).attr(`stroke`,d),L.attr(`class`,`swimlane-body`).attr(`style`,p).attr(`x`,s).attr(`y`,r).attr(`width`,D).attr(`height`,i).attr(`fill`,`none`).attr(`stroke`,d);let c=n.x-T.width/2,l=k+(t-T.height)/2;C.attr(`transform`,`translate(${c}, ${l})`)}if(t.trace(`Swimlane data `,n,JSON.stringify(n)),f){let e=C.select(`span`);e&&e.attr(`style`,f)}return n.offsetX=0,n.width=D,n.height=O,n.offsetY=T.height-E/2,n.intersect=function(e){return j(n,e)},{cluster:_,labelBBox:T}},`swimlane`),F=e(async(e,n)=>{t.info(`Creating subgraph rect for `,n.id,n);let r=c(),{themeVariables:i,handDrawnSeed:o}=r,{clusterBkg:s,clusterBorder:l}=i,{labelStyles:d,nodeStyles:f,borderStyles:p,backgroundStyles:m}=y(n),_=e.insert(`g`).attr(`class`,`cluster `+n.cssClasses).attr(`id`,n.domId).attr(`data-look`,n.look),b=a(r),x=_.insert(`g`).attr(`class`,`cluster-label `),C;C=n.labelType===`markdown`?await h(x,n.label,{style:n.labelStyle,useHtmlLabels:b,isNode:!0,width:n.width}):await M(x,n.label,n.labelStyle||``,!1,!0);let w=C.getBBox();if(a(r)){let e=C.children[0],t=u(C);w=e.getBoundingClientRect(),t.attr(`width`,w.width),t.attr(`height`,w.height)}let T=n.width<=w.width+n.padding?w.width+n.padding:n.width;n.width<=w.width+n.padding?n.diff=(T-n.width)/2-n.padding:n.diff=-n.padding;let E=n.height,D=n.x-T/2,O=n.y-E/2;t.trace(`Data `,n,JSON.stringify(n));let k;if(n.look===`handDrawn`){let e=S.svg(_),r=v(n,{roughness:.7,fill:s,stroke:l,fillWeight:3,seed:o}),i=e.path(N(D,O,T,E,0),r);k=_.insert(()=>(t.debug(`Rough node insert CXC`,i),i),`:first-child`),k.select(`path:nth-child(2)`).attr(`style`,p.join(`;`)),k.select(`path`).attr(`style`,m.join(`;`).replace(`fill`,`stroke`))}else k=_.insert(`rect`,`:first-child`),k.attr(`style`,f).attr(`rx`,n.rx).attr(`ry`,n.ry).attr(`x`,D).attr(`y`,O).attr(`width`,T).attr(`height`,E);let{subGraphTitleTopMargin:A}=g(r);if(x.attr(`transform`,`translate(${n.x-w.width/2}, ${n.y-n.height/2+A})`),d){let e=x.select(`span`);e&&e.attr(`style`,d)}let P=k.node().getBBox();return n.offsetX=0,n.width=P.width,n.height=P.height,n.offsetY=w.height-n.padding/2,n.intersect=function(e){return j(n,e)},{cluster:_,labelBBox:w}},`rect`),I={rect:F,squareRect:F,roundedWithTitle:e(async(e,t)=>{let n=c(),{themeVariables:r,handDrawnSeed:i}=n,{altBackground:o,compositeBackground:s,compositeTitleBackground:l,nodeBorder:d}=r,f=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.domId).attr(`data-id`,t.id).attr(`data-look`,t.look),p=f.insert(`g`,`:first-child`),m=f.insert(`g`).attr(`class`,`cluster-label`),h=f.append(`rect`),g=await M(m,t.label,t.labelStyle,void 0,!0),_=g.getBBox();if(a(n)){let e=g.children[0],t=u(g);_=e.getBoundingClientRect(),t.attr(`width`,_.width),t.attr(`height`,_.height)}let v=0*t.padding,y=v/2,b=(t.width<=_.width+t.padding?_.width+t.padding:t.width)+v;t.width<=_.width+t.padding?t.diff=(b-t.width)/2-t.padding:t.diff=-t.padding;let x=t.height+v,C=t.height+v-_.height-6,w=t.x-b/2,T=t.y-x/2;t.width=b;let E=t.y-t.height/2-y+_.height+2,D;if(t.look===`handDrawn`){let e=t.cssClasses.includes(`statediagram-cluster-alt`),n=S.svg(f),r=t.rx||t.ry?n.path(N(w,T,b,x,10),{roughness:.7,fill:l,fillStyle:`solid`,stroke:d,seed:i}):n.rectangle(w,T,b,x,{seed:i});D=f.insert(()=>r,`:first-child`);let a=n.rectangle(w,E,b,C,{fill:e?o:s,fillStyle:e?`hachure`:`solid`,stroke:d,seed:i});D=f.insert(()=>r,`:first-child`),h=f.insert(()=>a)}else D=p.insert(`rect`,`:first-child`),D.attr(`class`,`outer`).attr(`x`,w).attr(`y`,T).attr(`width`,b).attr(`height`,x).attr(`data-look`,t.look),h.attr(`class`,`inner`).attr(`x`,w).attr(`y`,E).attr(`width`,b).attr(`height`,C);return m.attr(`transform`,`translate(${t.x-_.width/2}, ${T+1-(a(n)?0:3)})`),t.height=D.node().getBBox().height,t.offsetX=0,t.offsetY=_.height-t.padding/2,t.labelBBox=_,t.intersect=function(e){return j(t,e)},{cluster:f,labelBBox:_}},`roundedWithTitle`),noteGroup:e((e,t)=>{let n=e.insert(`g`).attr(`class`,`note-cluster`).attr(`id`,t.domId),r=n.insert(`rect`,`:first-child`),i=0*t.padding,a=i/2;r.attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`x`,t.x-t.width/2-a).attr(`y`,t.y-t.height/2-a).attr(`width`,t.width+i).attr(`height`,t.height+i).attr(`fill`,`none`);let o=r.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(e){return j(t,e)},{cluster:n,labelBBox:{width:0,height:0}}},`noteGroup`),divider:e((e,t)=>{let{themeVariables:n,handDrawnSeed:r}=c(),{nodeBorder:i}=n,a=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.domId).attr(`data-look`,t.look),o=a.insert(`g`,`:first-child`),s=0*t.padding,l=t.width+s;t.diff=-t.padding;let u=t.height+s,d=t.x-l/2,f=t.y-u/2;t.width=l;let p;if(t.look===`handDrawn`){let e=S.svg(a).rectangle(d,f,l,u,{fill:`lightgrey`,roughness:.5,strokeLineDash:[5],stroke:i,seed:r});p=a.insert(()=>e,`:first-child`)}else{p=o.insert(`rect`,`:first-child`);let e=`outer`;e=(t.look,`divider`),p.attr(`class`,e).attr(`x`,d).attr(`y`,f).attr(`width`,l).attr(`height`,u).attr(`data-look`,t.look)}return t.height=p.node().getBBox().height,t.offsetX=0,t.offsetY=0,t.intersect=function(e){return j(t,e)},{cluster:a,labelBBox:{}}},`divider`),kanbanSection:e(async(e,n)=>{t.info(`Creating subgraph rect for `,n.id,n);let r=c(),{themeVariables:i,handDrawnSeed:o}=r,{clusterBkg:s,clusterBorder:l}=i,{labelStyles:d,nodeStyles:f,borderStyles:p,backgroundStyles:m}=y(n),_=e.insert(`g`).attr(`class`,`cluster `+n.cssClasses).attr(`id`,n.domId).attr(`data-look`,n.look),b=a(r),x=_.insert(`g`).attr(`class`,`cluster-label `),C=await h(x,n.label,{style:n.labelStyle,useHtmlLabels:b,isNode:!0,width:n.width}),w=C.getBBox();if(a(r)){let e=C.children[0],t=u(C);w=e.getBoundingClientRect(),t.attr(`width`,w.width),t.attr(`height`,w.height)}let T=n.width<=w.width+n.padding?w.width+n.padding:n.width;n.width<=w.width+n.padding?n.diff=(T-n.width)/2-n.padding:n.diff=-n.padding;let E=n.height,D=n.x-T/2,O=n.y-E/2;t.trace(`Data `,n,JSON.stringify(n));let k;if(n.look===`handDrawn`){let e=S.svg(_),r=v(n,{roughness:.7,fill:s,stroke:l,fillWeight:4,seed:o}),i=e.path(N(D,O,T,E,n.rx),r);k=_.insert(()=>(t.debug(`Rough node insert CXC`,i),i),`:first-child`),k.select(`path:nth-child(2)`).attr(`style`,p.join(`;`)),k.select(`path`).attr(`style`,m.join(`;`).replace(`fill`,`stroke`))}else k=_.insert(`rect`,`:first-child`),k.attr(`style`,f).attr(`rx`,n.rx).attr(`ry`,n.ry).attr(`x`,D).attr(`y`,O).attr(`width`,T).attr(`height`,E);let{subGraphTitleTopMargin:A}=g(r);if(x.attr(`transform`,`translate(${n.x-w.width/2}, ${n.y-n.height/2+A})`),d){let e=x.select(`span`);e&&e.attr(`style`,d)}let M=k.node().getBBox();return n.offsetX=0,n.width=M.width,n.height=M.height,n.offsetY=w.height-n.padding/2,n.intersect=function(e){return j(n,e)},{cluster:_,labelBBox:w}},`kanbanSection`),swimlane:P},L=new Map,ee=e(async(e,t)=>{let n=await I[t.shape||`rect`](e,t);return L.set(t.id,n),n},`insertCluster`),R=e(()=>{L=new Map},`clear`);function z(e,t){return e.intersect(t)}e(z,`intersectNode`);var te=z;function B(e,t,n,r){var i=e.x,a=e.y,o=i-r.x,s=a-r.y,c=Math.sqrt(t*t*s*s+n*n*o*o),l=Math.abs(t*n*o/c);r.x<i&&(l=-l);var u=Math.abs(t*n*s/c);return r.y<a&&(u=-u),{x:i+l,y:a+u}}e(B,`intersectEllipse`);var V=B;function H(e,t,n){return V(e,t,t,n)}e(H,`intersectCircle`);var U=H;function ne(e,t,n,r){{let i=t.y-e.y,a=e.x-t.x,o=t.x*e.y-e.x*t.y,s=i*n.x+a*n.y+o,c=i*r.x+a*r.y+o,l=1e-6;if(s!==0&&c!==0&&re(s,c))return;let u=r.y-n.y,d=n.x-r.x,f=r.x*n.y-n.x*r.y,p=u*e.x+d*e.y+f,m=u*t.x+d*t.y+f;if(Math.abs(p)<l&&Math.abs(m)<l&&re(p,m))return;let h=i*d-u*a;if(h===0)return;let g=Math.abs(h/2),_=a*f-d*o,v=_<0?(_-g)/h:(_+g)/h;return _=u*o-i*f,{x:v,y:_<0?(_-g)/h:(_+g)/h}}}e(ne,`intersectLine`);function re(e,t){return e*t>0}e(re,`sameSign`);var ie=ne;function W(e,t,n){let r=e.x,i=e.y,a=[],o=1/0,s=1/0;typeof t.forEach==`function`?t.forEach(function(e){o=Math.min(o,e.x),s=Math.min(s,e.y)}):(o=Math.min(o,t.x),s=Math.min(s,t.y));let c=r-e.width/2-o,l=i-e.height/2-s;for(let r=0;r<t.length;r++){let i=t[r],o=t[r<t.length-1?r+1:0],s=ie(e,n,{x:c+i.x,y:l+i.y},{x:c+o.x,y:l+o.y});s&&a.push(s)}return a.length?(a.length>1&&a.sort(function(e,t){let r=e.x-n.x,i=e.y-n.y,a=Math.sqrt(r*r+i*i),o=t.x-n.x,s=t.y-n.y,c=Math.sqrt(o*o+s*s);return a<c?-1:a===c?0:1}),a[0]):e}e(W,`intersectPolygon`);var G={node:te,circle:U,ellipse:V,polygon:W,rect:j};function K(e,n){let{labelStyles:r}=y(n);n.labelStyle=r;let i=E(n),a=i;i||(a=`anchor`);let o=e.insert(`g`).attr(`class`,a).attr(`id`,n.domId||n.id),{cssStyles:s}=n,c=S.svg(o),l=v(n,{fill:`black`,stroke:`none`,fillStyle:`solid`});n.look!==`handDrawn`&&(l.roughness=0);let u=c.circle(0,0,2,l),d=o.insert(()=>u,`:first-child`);return d.attr(`class`,`anchor`).attr(`style`,p(s)),T(n,d),n.intersect=function(e){return t.info(`Circle intersect`,n,1,e),G.circle(n,1,e)},o}e(K,`anchor`);function ae(e,t,n,r,i,a,o){let s=(e+n)/2,c=(t+r)/2,l=Math.atan2(r-t,n-e),u=(n-e)/2,d=(r-t)/2,f=u/i,p=d/a,m=Math.sqrt(f**2+p**2);if(m>1)throw Error(`The given radii are too small to create an arc between the points.`);let h=Math.sqrt(1-m**2),g=s+h*a*Math.sin(l)*(o?-1:1),_=c-h*i*Math.cos(l)*(o?-1:1),v=Math.atan2((t-_)/a,(e-g)/i),y=Math.atan2((r-_)/a,(n-g)/i)-v;o&&y<0&&(y+=2*Math.PI),!o&&y>0&&(y-=2*Math.PI);let b=[];for(let e=0;e<20;e++){let t=v+e/19*y,n=g+i*Math.cos(t),r=_+a*Math.sin(t);b.push({x:n,y:r})}return b}e(ae,`generateArcPoints`);function oe(e,t,n){let[r,i]=[t,n].sort((e,t)=>t-e);return i*(1-Math.sqrt(1-(e/r/2)**2))}e(oe,`calculateArcSagitta`);async function se(t,n){let{labelStyles:r,nodeStyles:i}=y(n);n.labelStyle=r;let a=n.padding??0,o=n.look===`neo`?16:a,s=n.look===`neo`?12:a,c=e(e=>e+s,`calcTotalHeight`),l=e(e=>{let t=e/2;return[t/(2.5+e/50),t]},`calcEllipseRadius`),{shapeSvg:u,bbox:d}=await C(t,n,E(n)),f=c(n?.height?n?.height:d.height),[p,m]=l(f),h=oe(f,p,m),g=(n?.width?n?.width:d.width)+o*2+h-h,_=f,{cssStyles:b}=n,x=[{x:g/2,y:-_/2},{x:-g/2,y:-_/2},...ae(-g/2,-_/2,-g/2,_/2,p,m,!1),{x:g/2,y:_/2},...ae(g/2,_/2,g/2,-_/2,p,m,!0)],w=S.svg(u),O=v(n,{});n.look!==`handDrawn`&&(O.roughness=0,O.fillStyle=`solid`);let k=D(x),A=w.path(k,O),j=u.insert(()=>A,`:first-child`);return j.attr(`class`,`basic label-container outer-path`),b&&n.look!==`handDrawn`&&j.selectAll(`path`).attr(`style`,b),i&&n.look!==`handDrawn`&&j.selectAll(`path`).attr(`style`,i),j.attr(`transform`,`translate(${p/2}, 0)`),T(n,j),n.intersect=function(e){return G.polygon(n,x,e)},u}e(se,`bowTieRect`);function q(e,t,n,r){return e.insert(`polygon`,`:first-child`).attr(`points`,r.map(function(e){return e.x+`,`+e.y}).join(` `)).attr(`class`,`label-container`).attr(`transform`,`translate(`+-t/2+`,`+n/2+`)`)}e(q,`insertPolygonShape`);var ce=12;async function le(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?28:i,o=t.look===`neo`?24:i,{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=(t?.width??c.width)+(t.look===`neo`?a*2:a+ce),u=(t?.height??c.height)+(t.look===`neo`?o*2:o),d=l,f=-u,p=[{x:0+ce,y:f},{x:d,y:f},{x:d,y:0},{x:0,y:0},{x:0,y:f+ce},{x:0+ce,y:f}],m,{cssStyles:h}=t;if(t.look===`handDrawn`){let e=S.svg(s),n=v(t,{}),r=D(p),i=e.path(r,n);m=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-l/2}, ${u/2})`),h&&m.attr(`style`,h)}else m=q(s,l,u,p);return r&&m.attr(`style`,r),T(t,m),t.intersect=function(e){return G.polygon(t,p,e)},s}e(le,`card`);function ue(e,t){let{nodeStyles:n}=y(t);t.label=``;let r=e.insert(`g`).attr(`class`,E(t)).attr(`id`,t.domId??t.id),{cssStyles:i}=t,a=Math.max(28,t.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],s=S.svg(r),c=v(t,{});t.look!==`handDrawn`&&(c.roughness=0,c.fillStyle=`solid`);let l=D(o),u=s.path(l,c),d=r.insert(()=>u,`:first-child`);return i&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,i),n&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,n),t.width=28,t.height=28,t.intersect=function(e){return G.polygon(t,o,e)},r}e(ue,`choice`);async function de(e,n,r){let{labelStyles:i,nodeStyles:a}=y(n);n.labelStyle=i;let{shapeSvg:o,bbox:s,halfPadding:c}=await C(e,n,E(n)),l=r?.padding??c,u=n.look===`neo`?s.width/2+32:s.width/2+l,d,{cssStyles:f}=n;if(n.look===`handDrawn`){let e=S.svg(o),t=v(n,{}),r=e.circle(0,0,u*2,t);d=o.insert(()=>r,`:first-child`),d.attr(`class`,`basic label-container`).attr(`style`,p(f))}else d=o.insert(`circle`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,a).attr(`r`,u).attr(`cx`,0).attr(`cy`,0);return T(n,d),n.calcIntersect=function(e,t){let n=e.width/2;return G.circle(e,n,t)},n.intersect=function(e){return t.info(`Circle intersect`,n,u,e),G.circle(n,u,e)},o}e(de,`circle`);function fe(e){let t=Math.cos(Math.PI/4),n=Math.sin(Math.PI/4),r=e*2,i={x:r/2*t,y:r/2*n},a={x:-(r/2)*t,y:r/2*n},o={x:-(r/2)*t,y:-(r/2)*n},s={x:r/2*t,y:-(r/2)*n};return`M ${a.x},${a.y} L ${s.x},${s.y}
1
+ import{n as e}from"./chunk-Y2CYZVJY-CP7lNZai.js";import{t}from"./src-CaBa9Z1L.js";import{A as n,B as r,M as i,T as a,b as o,g as s,x as c,z as l}from"./chunk-WYO6CB5R-C-c-Ja6D.js";import{C as u}from"./src-BJaEWo8x.js";import{a as d,r as f,u as p}from"./chunk-ICXQ74PX-BUnmDgqa.js";import{t as m}from"./chunk-HOUHSVGY-D0096-9K.js";import{n as h}from"./chunk-Q4XR5HBZ-CjNiHUWo.js";import{n as g,t as _}from"./chunk-OGEWGWER-DLH_3q-Z.js";import{a as v,i as y,r as b,t as x}from"./chunk-C7G6YPKG-CmP7ozUj.js";import{t as S}from"./rough.esm-kQd3CdGR.js";var C=e(async(e,t,n)=>{let r,i=t.useHtmlLabels||s(c()?.htmlLabels);r=n||`node default`;let a=e.insert(`g`).attr(`class`,r).attr(`id`,t.domId||t.id),o=a.insert(`g`).attr(`class`,`label`).attr(`style`,p(t.labelStyle)),f;f=t.label===void 0?``:typeof t.label==`string`?t.label:t.label[0];let m=!!t.icon||!!t.img,g=t.labelType===`markdown`,v=await h(o,l(d(f),c()),{useHtmlLabels:i,width:t.width||c().flowchart?.wrappingWidth,classes:g?`markdown-node-label`:``,style:t.labelStyle,addSvgBackground:m,markdown:g},c()),y=v.getBBox(),b=(t?.padding??0)/2;if(i){let e=v.children[0],t=u(v);await _(e,f),y=e.getBoundingClientRect(),t.attr(`width`,y.width),t.attr(`height`,y.height)}return i?o.attr(`transform`,`translate(`+-y.width/2+`, `+-y.height/2+`)`):o.attr(`transform`,`translate(0, `+-y.height/2+`)`),t.centerLabel&&o.attr(`transform`,`translate(`+-y.width/2+`, `+-y.height/2+`)`),o.insert(`rect`,`:first-child`),{shapeSvg:a,bbox:y,halfPadding:b,label:o}},`labelHelper`),w=e(async(e,t,n)=>{let r=n.useHtmlLabels??a(c()),i=e.insert(`g`).attr(`class`,`label`).attr(`style`,n.labelStyle||``),o=await h(i,l(d(t),c()),{useHtmlLabels:r,width:n.width||c()?.flowchart?.wrappingWidth,style:n.labelStyle,addSvgBackground:!!n.icon||!!n.img}),s=o.getBBox(),f=n.padding/2;if(a(c())){let e=o.children[0],t=u(o);s=e.getBoundingClientRect(),t.attr(`width`,s.width),t.attr(`height`,s.height)}return r?i.attr(`transform`,`translate(`+-s.width/2+`, `+-s.height/2+`)`):i.attr(`transform`,`translate(0, `+-s.height/2+`)`),n.centerLabel&&i.attr(`transform`,`translate(`+-s.width/2+`, `+-s.height/2+`)`),i.insert(`rect`,`:first-child`),{shapeSvg:e,bbox:s,halfPadding:f,label:i}},`insertLabel`),T=e((e,t)=>{let n=t.node().getBBox();e.width=n.width,e.height=n.height},`updateNodeBounds`),E=e((e,t)=>(e.look===`handDrawn`?`rough-node`:`node`)+` `+e.cssClasses+` `+(t||``),`getNodeClasses`);function D(e){let t=e.map((e,t)=>`${t===0?`M`:`L`}${e.x},${e.y}`);return t.push(`Z`),t.join(` `)}e(D,`createPathFromPoints`);function O(e,t,n,r,i,a){let o=[],s=n-e,c=r-t,l=s/a,u=2*Math.PI/l,d=t+c/2;for(let t=0;t<=50;t++){let n=e+t/50*s,r=d+i*Math.sin(u*(n-e));o.push({x:n,y:r})}return o}e(O,`generateFullSineWavePoints`);function k(e,t,n,r,i,a){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}e(k,`generateCirclePoints`);function A(t){let n=Array.from(t.childNodes).filter(e=>e.tagName===`path`),r=document.createElementNS(`http://www.w3.org/2000/svg`,`path`),i=n.map(e=>e.getAttribute(`d`)).filter(e=>e!==null).join(` `);r.setAttribute(`d`,i);let a=n.find(e=>e.getAttribute(`fill`)!==`none`),o=n.find(e=>e.getAttribute(`stroke`)!==`none`),s=e((e,t)=>e?.getAttribute(t)??void 0,`getAttr`);if(a){let e={fill:s(a,`fill`),"fill-opacity":s(a,`fill-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&r.setAttribute(e,t)})}if(o){let e={stroke:s(o,`stroke`),"stroke-width":s(o,`stroke-width`)??`1`,"stroke-opacity":s(o,`stroke-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&r.setAttribute(e,t)})}let c=document.createElementNS(`http://www.w3.org/2000/svg`,`g`);return c.appendChild(r),c}e(A,`mergePaths`);var j=e((e,t)=>{var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2,c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=a===0?0:s*i/a,l=s):(i<0&&(o=-o),c=o,l=i===0?0:o*a/i),{x:n+c,y:r+l}},`intersectRect`),M=e(async(e,t,n,r=!1,i=!1)=>{let o=t||``;typeof o==`object`&&(o=o[0]);let s=c(),l=a(s);return await h(e,o,{style:n,isTitle:r,useHtmlLabels:l,markdown:!1,isNode:i,width:1/0},s)},`createLabel`),N=e((e,t,n,r,i)=>[`M`,e+i,t,`H`,e+n-i,`A`,i,i,0,0,1,e+n,t+i,`V`,t+r-i,`A`,i,i,0,0,1,e+n-i,t+r,`H`,e+i,`A`,i,i,0,0,1,e,t+r-i,`V`,t+i,`A`,i,i,0,0,1,e+i,t,`Z`].join(` `),`createRoundedRectPathD`),P=e(async(e,n)=>{let r=c(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:o,clusterBorder:l}=i,d=l,{labelStyles:f,nodeStyles:p,borderStyles:m,backgroundStyles:g}=y(n),_=e.insert(`g`).attr(`class`,`cluster swimlane `+(n.cssClasses||``)).attr(`id`,n.id).attr(`data-id`,n.id).attr(`data-et`,`cluster`).attr(`data-look`,n.look),b=s(r.flowchart.htmlLabels),x=n.direction===`LR`,C=_.insert(`g`).attr(`class`,`cluster-label swimlane-label`),w=await h(C,n.label,{style:n.labelStyle,useHtmlLabels:b,isNode:!0,width:n.width}),T=w.getBBox();if(b){let e=w.children[0],t=u(w);T=e.getBoundingClientRect(),t.attr(`width`,T.width),t.attr(`height`,T.height)}let E=n.padding??0,D=n.width<=T.width+E?T.width+E:n.width;n.width<=T.width+E?n.diff=(D-n.width)/2-E:n.diff=-E;let O=n.height,k=n.y-O/2,A=n.y+O/2,M=n.x-D/2,N=n.swimlaneContentTop===void 0?k+O/3:n.swimlaneContentTop,P=x?4:0,F=T.height+2*P,I,L;if(x){let e=Math.max(F,T.height+2*P),t=M+e,r=Math.max(0,D-e);if(n.look===`handDrawn`){let i=S.svg(_),s=v(n,{roughness:.7,fill:o,stroke:d,fillWeight:3,seed:a}),c=v(n,{roughness:.7,fill:`none`,stroke:d,seed:a}),l=i.rectangle(M,k,e,O,s);I=_.insert(()=>l,`:first-child`);let u=i.rectangle(t,k,r,O,c);L=_.insert(()=>u,`:first-child`),I.select(`path:nth-child(2)`).attr(`style`,m.join(`;`)),I.select(`path`).attr(`style`,g.join(`;`).replace(`fill`,`stroke`))}else I=_.insert(`rect`,`:first-child`),L=_.insert(`rect`,`:first-child`),I.attr(`class`,`swimlane-title`).attr(`style`,p).attr(`x`,M).attr(`y`,k).attr(`width`,e).attr(`height`,O).attr(`fill`,o).attr(`stroke`,d),L.attr(`class`,`swimlane-body`).attr(`style`,p).attr(`x`,t).attr(`y`,k).attr(`width`,r).attr(`height`,O).attr(`fill`,`none`).attr(`stroke`,d);let i=M+e/2,s=n.y;C.attr(`transform`,`translate(${i}, ${s}) rotate(-90) translate(${-T.width/2}, ${-T.height/2})`)}else{let e=Math.max(0,N-k),t=Math.min(F,e),r=k+t,i=Math.max(0,A-r),s=n.x-D/2;if(n.look===`handDrawn`){let e=S.svg(_),c=v(n,{roughness:.7,fill:o,stroke:d,fillWeight:3,seed:a}),l=v(n,{roughness:.7,fill:`none`,stroke:d,seed:a}),u=e.rectangle(s,k,D,t,c);I=_.insert(()=>u,`:first-child`);let f=e.rectangle(s,r,D,i,l);L=_.insert(()=>f,`:first-child`),I.select(`path:nth-child(2)`).attr(`style`,m.join(`;`)),I.select(`path`).attr(`style`,g.join(`;`).replace(`fill`,`stroke`))}else I=_.insert(`rect`,`:first-child`),L=_.insert(`rect`,`:first-child`),I.attr(`class`,`swimlane-title`).attr(`style`,p).attr(`x`,s).attr(`y`,k).attr(`width`,D).attr(`height`,t).attr(`fill`,o).attr(`stroke`,d),L.attr(`class`,`swimlane-body`).attr(`style`,p).attr(`x`,s).attr(`y`,r).attr(`width`,D).attr(`height`,i).attr(`fill`,`none`).attr(`stroke`,d);let c=n.x-T.width/2,l=k+(t-T.height)/2;C.attr(`transform`,`translate(${c}, ${l})`)}if(t.trace(`Swimlane data `,n,JSON.stringify(n)),f){let e=C.select(`span`);e&&e.attr(`style`,f)}return n.offsetX=0,n.width=D,n.height=O,n.offsetY=T.height-E/2,n.intersect=function(e){return j(n,e)},{cluster:_,labelBBox:T}},`swimlane`),F=e(async(e,n)=>{t.info(`Creating subgraph rect for `,n.id,n);let r=c(),{themeVariables:i,handDrawnSeed:o}=r,{clusterBkg:s,clusterBorder:l}=i,{labelStyles:d,nodeStyles:f,borderStyles:p,backgroundStyles:m}=y(n),_=e.insert(`g`).attr(`class`,`cluster `+n.cssClasses).attr(`id`,n.domId).attr(`data-look`,n.look),b=a(r),x=_.insert(`g`).attr(`class`,`cluster-label `),C;C=n.labelType===`markdown`?await h(x,n.label,{style:n.labelStyle,useHtmlLabels:b,isNode:!0,width:n.width}):await M(x,n.label,n.labelStyle||``,!1,!0);let w=C.getBBox();if(a(r)){let e=C.children[0],t=u(C);w=e.getBoundingClientRect(),t.attr(`width`,w.width),t.attr(`height`,w.height)}let T=n.width<=w.width+n.padding?w.width+n.padding:n.width;n.width<=w.width+n.padding?n.diff=(T-n.width)/2-n.padding:n.diff=-n.padding;let E=n.height,D=n.x-T/2,O=n.y-E/2;t.trace(`Data `,n,JSON.stringify(n));let k;if(n.look===`handDrawn`){let e=S.svg(_),r=v(n,{roughness:.7,fill:s,stroke:l,fillWeight:3,seed:o}),i=e.path(N(D,O,T,E,0),r);k=_.insert(()=>(t.debug(`Rough node insert CXC`,i),i),`:first-child`),k.select(`path:nth-child(2)`).attr(`style`,p.join(`;`)),k.select(`path`).attr(`style`,m.join(`;`).replace(`fill`,`stroke`))}else k=_.insert(`rect`,`:first-child`),k.attr(`style`,f).attr(`rx`,n.rx).attr(`ry`,n.ry).attr(`x`,D).attr(`y`,O).attr(`width`,T).attr(`height`,E);let{subGraphTitleTopMargin:A}=g(r);if(x.attr(`transform`,`translate(${n.x-w.width/2}, ${n.y-n.height/2+A})`),d){let e=x.select(`span`);e&&e.attr(`style`,d)}let P=k.node().getBBox();return n.offsetX=0,n.width=P.width,n.height=P.height,n.offsetY=w.height-n.padding/2,n.intersect=function(e){return j(n,e)},{cluster:_,labelBBox:w}},`rect`),I={rect:F,squareRect:F,roundedWithTitle:e(async(e,t)=>{let n=c(),{themeVariables:r,handDrawnSeed:i}=n,{altBackground:o,compositeBackground:s,compositeTitleBackground:l,nodeBorder:d}=r,f=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.domId).attr(`data-id`,t.id).attr(`data-look`,t.look),p=f.insert(`g`,`:first-child`),m=f.insert(`g`).attr(`class`,`cluster-label`),h=f.append(`rect`),g=await M(m,t.label,t.labelStyle,void 0,!0),_=g.getBBox();if(a(n)){let e=g.children[0],t=u(g);_=e.getBoundingClientRect(),t.attr(`width`,_.width),t.attr(`height`,_.height)}let v=0*t.padding,y=v/2,b=(t.width<=_.width+t.padding?_.width+t.padding:t.width)+v;t.width<=_.width+t.padding?t.diff=(b-t.width)/2-t.padding:t.diff=-t.padding;let x=t.height+v,C=t.height+v-_.height-6,w=t.x-b/2,T=t.y-x/2;t.width=b;let E=t.y-t.height/2-y+_.height+2,D;if(t.look===`handDrawn`){let e=t.cssClasses.includes(`statediagram-cluster-alt`),n=S.svg(f),r=t.rx||t.ry?n.path(N(w,T,b,x,10),{roughness:.7,fill:l,fillStyle:`solid`,stroke:d,seed:i}):n.rectangle(w,T,b,x,{seed:i});D=f.insert(()=>r,`:first-child`);let a=n.rectangle(w,E,b,C,{fill:e?o:s,fillStyle:e?`hachure`:`solid`,stroke:d,seed:i});D=f.insert(()=>r,`:first-child`),h=f.insert(()=>a)}else D=p.insert(`rect`,`:first-child`),D.attr(`class`,`outer`).attr(`x`,w).attr(`y`,T).attr(`width`,b).attr(`height`,x).attr(`data-look`,t.look),h.attr(`class`,`inner`).attr(`x`,w).attr(`y`,E).attr(`width`,b).attr(`height`,C);return m.attr(`transform`,`translate(${t.x-_.width/2}, ${T+1-(a(n)?0:3)})`),t.height=D.node().getBBox().height,t.offsetX=0,t.offsetY=_.height-t.padding/2,t.labelBBox=_,t.intersect=function(e){return j(t,e)},{cluster:f,labelBBox:_}},`roundedWithTitle`),noteGroup:e((e,t)=>{let n=e.insert(`g`).attr(`class`,`note-cluster`).attr(`id`,t.domId),r=n.insert(`rect`,`:first-child`),i=0*t.padding,a=i/2;r.attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`x`,t.x-t.width/2-a).attr(`y`,t.y-t.height/2-a).attr(`width`,t.width+i).attr(`height`,t.height+i).attr(`fill`,`none`);let o=r.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(e){return j(t,e)},{cluster:n,labelBBox:{width:0,height:0}}},`noteGroup`),divider:e((e,t)=>{let{themeVariables:n,handDrawnSeed:r}=c(),{nodeBorder:i}=n,a=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.domId).attr(`data-look`,t.look),o=a.insert(`g`,`:first-child`),s=0*t.padding,l=t.width+s;t.diff=-t.padding;let u=t.height+s,d=t.x-l/2,f=t.y-u/2;t.width=l;let p;if(t.look===`handDrawn`){let e=S.svg(a).rectangle(d,f,l,u,{fill:`lightgrey`,roughness:.5,strokeLineDash:[5],stroke:i,seed:r});p=a.insert(()=>e,`:first-child`)}else{p=o.insert(`rect`,`:first-child`);let e=`outer`;e=(t.look,`divider`),p.attr(`class`,e).attr(`x`,d).attr(`y`,f).attr(`width`,l).attr(`height`,u).attr(`data-look`,t.look)}return t.height=p.node().getBBox().height,t.offsetX=0,t.offsetY=0,t.intersect=function(e){return j(t,e)},{cluster:a,labelBBox:{}}},`divider`),kanbanSection:e(async(e,n)=>{t.info(`Creating subgraph rect for `,n.id,n);let r=c(),{themeVariables:i,handDrawnSeed:o}=r,{clusterBkg:s,clusterBorder:l}=i,{labelStyles:d,nodeStyles:f,borderStyles:p,backgroundStyles:m}=y(n),_=e.insert(`g`).attr(`class`,`cluster `+n.cssClasses).attr(`id`,n.domId).attr(`data-look`,n.look),b=a(r),x=_.insert(`g`).attr(`class`,`cluster-label `),C=await h(x,n.label,{style:n.labelStyle,useHtmlLabels:b,isNode:!0,width:n.width}),w=C.getBBox();if(a(r)){let e=C.children[0],t=u(C);w=e.getBoundingClientRect(),t.attr(`width`,w.width),t.attr(`height`,w.height)}let T=n.width<=w.width+n.padding?w.width+n.padding:n.width;n.width<=w.width+n.padding?n.diff=(T-n.width)/2-n.padding:n.diff=-n.padding;let E=n.height,D=n.x-T/2,O=n.y-E/2;t.trace(`Data `,n,JSON.stringify(n));let k;if(n.look===`handDrawn`){let e=S.svg(_),r=v(n,{roughness:.7,fill:s,stroke:l,fillWeight:4,seed:o}),i=e.path(N(D,O,T,E,n.rx),r);k=_.insert(()=>(t.debug(`Rough node insert CXC`,i),i),`:first-child`),k.select(`path:nth-child(2)`).attr(`style`,p.join(`;`)),k.select(`path`).attr(`style`,m.join(`;`).replace(`fill`,`stroke`))}else k=_.insert(`rect`,`:first-child`),k.attr(`style`,f).attr(`rx`,n.rx).attr(`ry`,n.ry).attr(`x`,D).attr(`y`,O).attr(`width`,T).attr(`height`,E);let{subGraphTitleTopMargin:A}=g(r);if(x.attr(`transform`,`translate(${n.x-w.width/2}, ${n.y-n.height/2+A})`),d){let e=x.select(`span`);e&&e.attr(`style`,d)}let M=k.node().getBBox();return n.offsetX=0,n.width=M.width,n.height=M.height,n.offsetY=w.height-n.padding/2,n.intersect=function(e){return j(n,e)},{cluster:_,labelBBox:w}},`kanbanSection`),swimlane:P},L=new Map,ee=e(async(e,t)=>{let n=await I[t.shape||`rect`](e,t);return L.set(t.id,n),n},`insertCluster`),R=e(()=>{L=new Map},`clear`);function z(e,t){return e.intersect(t)}e(z,`intersectNode`);var te=z;function B(e,t,n,r){var i=e.x,a=e.y,o=i-r.x,s=a-r.y,c=Math.sqrt(t*t*s*s+n*n*o*o),l=Math.abs(t*n*o/c);r.x<i&&(l=-l);var u=Math.abs(t*n*s/c);return r.y<a&&(u=-u),{x:i+l,y:a+u}}e(B,`intersectEllipse`);var V=B;function H(e,t,n){return V(e,t,t,n)}e(H,`intersectCircle`);var U=H;function ne(e,t,n,r){{let i=t.y-e.y,a=e.x-t.x,o=t.x*e.y-e.x*t.y,s=i*n.x+a*n.y+o,c=i*r.x+a*r.y+o,l=1e-6;if(s!==0&&c!==0&&re(s,c))return;let u=r.y-n.y,d=n.x-r.x,f=r.x*n.y-n.x*r.y,p=u*e.x+d*e.y+f,m=u*t.x+d*t.y+f;if(Math.abs(p)<l&&Math.abs(m)<l&&re(p,m))return;let h=i*d-u*a;if(h===0)return;let g=Math.abs(h/2),_=a*f-d*o,v=_<0?(_-g)/h:(_+g)/h;return _=u*o-i*f,{x:v,y:_<0?(_-g)/h:(_+g)/h}}}e(ne,`intersectLine`);function re(e,t){return e*t>0}e(re,`sameSign`);var ie=ne;function W(e,t,n){let r=e.x,i=e.y,a=[],o=1/0,s=1/0;typeof t.forEach==`function`?t.forEach(function(e){o=Math.min(o,e.x),s=Math.min(s,e.y)}):(o=Math.min(o,t.x),s=Math.min(s,t.y));let c=r-e.width/2-o,l=i-e.height/2-s;for(let r=0;r<t.length;r++){let i=t[r],o=t[r<t.length-1?r+1:0],s=ie(e,n,{x:c+i.x,y:l+i.y},{x:c+o.x,y:l+o.y});s&&a.push(s)}return a.length?(a.length>1&&a.sort(function(e,t){let r=e.x-n.x,i=e.y-n.y,a=Math.sqrt(r*r+i*i),o=t.x-n.x,s=t.y-n.y,c=Math.sqrt(o*o+s*s);return a<c?-1:a===c?0:1}),a[0]):e}e(W,`intersectPolygon`);var G={node:te,circle:U,ellipse:V,polygon:W,rect:j};function K(e,n){let{labelStyles:r}=y(n);n.labelStyle=r;let i=E(n),a=i;i||(a=`anchor`);let o=e.insert(`g`).attr(`class`,a).attr(`id`,n.domId||n.id),{cssStyles:s}=n,c=S.svg(o),l=v(n,{fill:`black`,stroke:`none`,fillStyle:`solid`});n.look!==`handDrawn`&&(l.roughness=0);let u=c.circle(0,0,2,l),d=o.insert(()=>u,`:first-child`);return d.attr(`class`,`anchor`).attr(`style`,p(s)),T(n,d),n.intersect=function(e){return t.info(`Circle intersect`,n,1,e),G.circle(n,1,e)},o}e(K,`anchor`);function ae(e,t,n,r,i,a,o){let s=(e+n)/2,c=(t+r)/2,l=Math.atan2(r-t,n-e),u=(n-e)/2,d=(r-t)/2,f=u/i,p=d/a,m=Math.sqrt(f**2+p**2);if(m>1)throw Error(`The given radii are too small to create an arc between the points.`);let h=Math.sqrt(1-m**2),g=s+h*a*Math.sin(l)*(o?-1:1),_=c-h*i*Math.cos(l)*(o?-1:1),v=Math.atan2((t-_)/a,(e-g)/i),y=Math.atan2((r-_)/a,(n-g)/i)-v;o&&y<0&&(y+=2*Math.PI),!o&&y>0&&(y-=2*Math.PI);let b=[];for(let e=0;e<20;e++){let t=v+e/19*y,n=g+i*Math.cos(t),r=_+a*Math.sin(t);b.push({x:n,y:r})}return b}e(ae,`generateArcPoints`);function oe(e,t,n){let[r,i]=[t,n].sort((e,t)=>t-e);return i*(1-Math.sqrt(1-(e/r/2)**2))}e(oe,`calculateArcSagitta`);async function se(t,n){let{labelStyles:r,nodeStyles:i}=y(n);n.labelStyle=r;let a=n.padding??0,o=n.look===`neo`?16:a,s=n.look===`neo`?12:a,c=e(e=>e+s,`calcTotalHeight`),l=e(e=>{let t=e/2;return[t/(2.5+e/50),t]},`calcEllipseRadius`),{shapeSvg:u,bbox:d}=await C(t,n,E(n)),f=c(n?.height?n?.height:d.height),[p,m]=l(f),h=oe(f,p,m),g=(n?.width?n?.width:d.width)+o*2+h-h,_=f,{cssStyles:b}=n,x=[{x:g/2,y:-_/2},{x:-g/2,y:-_/2},...ae(-g/2,-_/2,-g/2,_/2,p,m,!1),{x:g/2,y:_/2},...ae(g/2,_/2,g/2,-_/2,p,m,!0)],w=S.svg(u),O=v(n,{});n.look!==`handDrawn`&&(O.roughness=0,O.fillStyle=`solid`);let k=D(x),A=w.path(k,O),j=u.insert(()=>A,`:first-child`);return j.attr(`class`,`basic label-container outer-path`),b&&n.look!==`handDrawn`&&j.selectAll(`path`).attr(`style`,b),i&&n.look!==`handDrawn`&&j.selectAll(`path`).attr(`style`,i),j.attr(`transform`,`translate(${p/2}, 0)`),T(n,j),n.intersect=function(e){return G.polygon(n,x,e)},u}e(se,`bowTieRect`);function q(e,t,n,r){return e.insert(`polygon`,`:first-child`).attr(`points`,r.map(function(e){return e.x+`,`+e.y}).join(` `)).attr(`class`,`label-container`).attr(`transform`,`translate(`+-t/2+`,`+n/2+`)`)}e(q,`insertPolygonShape`);var ce=12;async function le(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?28:i,o=t.look===`neo`?24:i,{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=(t?.width??c.width)+(t.look===`neo`?a*2:a+ce),u=(t?.height??c.height)+(t.look===`neo`?o*2:o),d=l,f=-u,p=[{x:0+ce,y:f},{x:d,y:f},{x:d,y:0},{x:0,y:0},{x:0,y:f+ce},{x:0+ce,y:f}],m,{cssStyles:h}=t;if(t.look===`handDrawn`){let e=S.svg(s),n=v(t,{}),r=D(p),i=e.path(r,n);m=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-l/2}, ${u/2})`),h&&m.attr(`style`,h)}else m=q(s,l,u,p);return r&&m.attr(`style`,r),T(t,m),t.intersect=function(e){return G.polygon(t,p,e)},s}e(le,`card`);function ue(e,t){let{nodeStyles:n}=y(t);t.label=``;let r=e.insert(`g`).attr(`class`,E(t)).attr(`id`,t.domId??t.id),{cssStyles:i}=t,a=Math.max(28,t.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],s=S.svg(r),c=v(t,{});t.look!==`handDrawn`&&(c.roughness=0,c.fillStyle=`solid`);let l=D(o),u=s.path(l,c),d=r.insert(()=>u,`:first-child`);return i&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,i),n&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,n),t.width=28,t.height=28,t.intersect=function(e){return G.polygon(t,o,e)},r}e(ue,`choice`);async function de(e,n,r){let{labelStyles:i,nodeStyles:a}=y(n);n.labelStyle=i;let{shapeSvg:o,bbox:s,halfPadding:c}=await C(e,n,E(n)),l=r?.padding??c,u=n.look===`neo`?s.width/2+32:s.width/2+l,d,{cssStyles:f}=n;if(n.look===`handDrawn`){let e=S.svg(o),t=v(n,{}),r=e.circle(0,0,u*2,t);d=o.insert(()=>r,`:first-child`),d.attr(`class`,`basic label-container`).attr(`style`,p(f))}else d=o.insert(`circle`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,a).attr(`r`,u).attr(`cx`,0).attr(`cy`,0);return T(n,d),n.calcIntersect=function(e,t){let n=e.width/2;return G.circle(e,n,t)},n.intersect=function(e){return t.info(`Circle intersect`,n,u,e),G.circle(n,u,e)},o}e(de,`circle`);function fe(e){let t=Math.cos(Math.PI/4),n=Math.sin(Math.PI/4),r=e*2,i={x:r/2*t,y:r/2*n},a={x:-(r/2)*t,y:r/2*n},o={x:-(r/2)*t,y:-(r/2)*n},s={x:r/2*t,y:-(r/2)*n};return`M ${a.x},${a.y} L ${s.x},${s.y}
2
2
  M ${i.x},${i.y} L ${o.x},${o.y}`}e(fe,`createLine`);function pe(e,n){let{labelStyles:r,nodeStyles:i}=y(n);n.labelStyle=r,n.label=``;let a=e.insert(`g`).attr(`class`,E(n)).attr(`id`,n.domId??n.id),o=Math.max(30,n?.width??0),{cssStyles:s}=n,c=S.svg(a),l=v(n,{});n.look!==`handDrawn`&&(l.roughness=0,l.fillStyle=`solid`);let u=c.circle(0,0,o*2,l),d=fe(o),f=c.path(d,l),p=a.insert(()=>u,`:first-child`);return p.insert(()=>f),p.attr(`class`,`outer-path`),s&&n.look!==`handDrawn`&&p.selectAll(`path`).attr(`style`,s),i&&n.look!==`handDrawn`&&p.selectAll(`path`).attr(`style`,i),T(n,p),n.intersect=function(e){return t.info(`crossedCircle intersect`,n,{radius:o,point:e}),G.circle(n,o,e)},a}e(pe,`crossedCircle`);function J(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}e(J,`generateCirclePoints`);async function me(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await C(e,t,E(t)),s=t.look===`neo`?18:t.padding??0,c=t.look===`neo`?12:t.padding??0,l=a.width+s,u=a.height+c,d=Math.max(5,u*.1),{cssStyles:f}=t,p=[...J(l/2,-u/2,d,30,-90,0),{x:-l/2-d,y:d},...J(l/2+d*2,-d,d,20,-180,-270),...J(l/2+d*2,d,d,20,-90,-180),{x:-l/2-d,y:-u/2},...J(l/2,u/2,d,20,0,90)],m=[{x:l/2,y:-u/2-d},{x:-l/2,y:-u/2-d},...J(l/2,-u/2,d,20,-90,0),{x:-l/2-d,y:-d},...J(l/2+l*.1,-d,d,20,-180,-270),...J(l/2+l*.1,d,d,20,-90,-180),{x:-l/2-d,y:u/2},...J(l/2,u/2,d,20,0,90),{x:-l/2,y:u/2+d},{x:l/2,y:u/2+d}],h=S.svg(i),g=v(t,{fill:`none`});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=D(p).replace(`Z`,``),b=h.path(_,g),x=D(m),w=h.path(x,{...g}),O=i.insert(`g`,`:first-child`);return O.insert(()=>w,`:first-child`).attr(`stroke-opacity`,0),O.insert(()=>b,`:first-child`),O.attr(`class`,`text`),f&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,r),O.attr(`transform`,`translate(${d}, 0)`),o.attr(`transform`,`translate(${-l/2+d-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),T(t,O),t.intersect=function(e){return G.polygon(t,m,e)},i}e(me,`curlyBraceLeft`);function Y(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:a,y:l})}return o}e(Y,`generateCirclePoints`);async function he(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await C(e,t,E(t)),s=t.look===`neo`?18:t.padding??0,c=t.look===`neo`?12:t.padding??0,l=a.width+(t.look===`neo`?s*2:s),u=a.height+(t.look===`neo`?c*2:c),d=Math.max(5,u*.1),{cssStyles:f}=t,p=[...Y(l/2,-u/2,d,20,-90,0),{x:l/2+d,y:-d},...Y(l/2+d*2,-d,d,20,-180,-270),...Y(l/2+d*2,d,d,20,-90,-180),{x:l/2+d,y:u/2},...Y(l/2,u/2,d,20,0,90)],m=[{x:-l/2,y:-u/2-d},{x:l/2,y:-u/2-d},...Y(l/2,-u/2,d,20,-90,0),{x:l/2+d,y:-d},...Y(l/2+d*2,-d,d,20,-180,-270),...Y(l/2+d*2,d,d,20,-90,-180),{x:l/2+d,y:u/2},...Y(l/2,u/2,d,20,0,90),{x:l/2,y:u/2+d},{x:-l/2,y:u/2+d}],h=S.svg(i),g=v(t,{fill:`none`});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=D(p).replace(`Z`,``),b=h.path(_,g),x=D(m),w=h.path(x,{...g}),O=i.insert(`g`,`:first-child`);return O.insert(()=>w,`:first-child`).attr(`stroke-opacity`,0),O.insert(()=>b,`:first-child`),O.attr(`class`,`text`),f&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,r),O.attr(`transform`,`translate(${-d}, 0)`),o.attr(`transform`,`translate(${-l/2+(t.padding??0)/2-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),T(t,O),t.intersect=function(e){return G.polygon(t,m,e)},i}e(he,`curlyBraceRight`);function X(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}e(X,`generateCirclePoints`);async function ge(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await C(e,t,E(t)),s=t.look===`neo`?18:t.padding??0,c=t.look===`neo`?12:t.padding??0,l=a.width+(t.look===`neo`?s*2:s),u=a.height+(t.look===`neo`?c*2:c),d=Math.max(5,u*.1),{cssStyles:f}=t,p=[...X(l/2,-u/2,d,30,-90,0),{x:-l/2-d,y:d},...X(l/2+d*2,-d,d,20,-180,-270),...X(l/2+d*2,d,d,20,-90,-180),{x:-l/2-d,y:-u/2},...X(l/2,u/2,d,20,0,90)],m=[...X(-l/2+d+d/2,-u/2,d,20,-90,-180),{x:l/2-d/2,y:d},...X(-l/2-d/2,-d,d,20,0,90),...X(-l/2-d/2,d,d,20,-90,0),{x:l/2-d/2,y:-d},...X(-l/2+d+d/2,u/2,d,30,-180,-270)],h=[{x:l/2,y:-u/2-d},{x:-l/2,y:-u/2-d},...X(l/2,-u/2,d,20,-90,0),{x:-l/2-d,y:-d},...X(l/2+d*2,-d,d,20,-180,-270),...X(l/2+d*2,d,d,20,-90,-180),{x:-l/2-d,y:u/2},...X(l/2,u/2,d,20,0,90),{x:-l/2,y:u/2+d},{x:l/2-d-d/2,y:u/2+d},...X(-l/2+d+d/2,-u/2,d,20,-90,-180),{x:l/2-d/2,y:d},...X(-l/2-d/2,-d,d,20,0,90),...X(-l/2-d/2,d,d,20,-90,0),{x:l/2-d/2,y:-d},...X(-l/2+d+d/2,u/2,d,30,-180,-270)],g=S.svg(i),_=v(t,{fill:`none`});t.look!==`handDrawn`&&(_.roughness=0,_.fillStyle=`solid`);let b=D(p).replace(`Z`,``),x=g.path(b,_),w=D(m).replace(`Z`,``),O=g.path(w,_),k=D(h),A=g.path(k,{..._}),j=i.insert(`g`,`:first-child`);return j.insert(()=>A,`:first-child`).attr(`stroke-opacity`,0),j.insert(()=>x,`:first-child`),j.insert(()=>O,`:first-child`),j.attr(`class`,`text`),f&&t.look!==`handDrawn`&&j.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&j.selectAll(`path`).attr(`style`,r),j.attr(`transform`,`translate(${d-d/4}, 0)`),o.attr(`transform`,`translate(${-l/2+(t.padding??0)/2-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),T(t,j),t.intersect=function(e){return G.polygon(t,h,e)},i}e(ge,`curlyBraces`);async function _e(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=Math.max(20,(c.width+a*2)*1.25,t?.width??0),u=Math.max(5,c.height+o*2,t?.height??0),d=u/2,{cssStyles:f}=t,p=S.svg(s),m=v(t,{});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=l,g=u,_=h-d,b=g/4,x=[{x:_,y:0},{x:b,y:0},{x:0,y:g/2},{x:b,y:g},{x:_,y:g},...k(-_,-g/2,d,50,270,90)],w=D(x),O=p.path(w,m),A=s.insert(()=>O,`:first-child`);return A.attr(`class`,`basic label-container outer-path`),f&&t.look!==`handDrawn`&&A.selectChildren(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&A.selectChildren(`path`).attr(`style`,r),A.attr(`transform`,`translate(${-l/2}, ${-u/2})`),T(t,A),t.intersect=function(e){return G.polygon(t,x,e)},s}e(_e,`curvedTrapezoid`);var ve=e((e,t,n,r,i,a)=>[`M${e},${t+a}`,`a${i},${a} 0,0,0 ${n},0`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`].join(` `),`createCylinderPathD`),ye=e((e,t,n,r,i,a)=>[`M${e},${t+a}`,`M${e+n},${t+a}`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`].join(` `),`createOuterCylinderPathD`),be=e((e,t,n,r,i,a)=>[`M${e-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createInnerCylinderPathD`),xe=8,Se=8;async function Ce(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?24:i,o=t.look===`neo`?24:i;if(t.width||t.height){let e=t.width??0;t.width=(t.width??0)-o,t.width<Se&&(t.width=Se);let n=e/2/(2.5+e/50);t.height=(t.height??0)-a-n*3,t.height<xe&&(t.height=xe)}let{shapeSvg:s,bbox:c,label:l}=await C(e,t,E(t)),u=(t.width?t.width:c.width)+o,d=u/2,f=d/(2.5+u/50),m=(t.height?t.height:c.height)+a+f,h,{cssStyles:g}=t;if(t.look===`handDrawn`){let e=S.svg(s),n=ye(0,0,u,m,d,f),r=be(0,f,u,m,d,f),i=v(t,{}),a=e.path(n,i),o=e.path(r,v(t,{fill:`none`}));h=s.insert(()=>o,`:first-child`),h=s.insert(()=>a,`:first-child`),h.attr(`class`,`basic label-container`),g&&h.attr(`style`,g)}else{let e=ve(0,0,u,m,d,f);h=s.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container outer-path`).attr(`style`,p(g)).attr(`style`,r)}return h.attr(`label-offset-y`,f),h.attr(`transform`,`translate(${-u/2}, ${-(m/2+f)})`),T(t,h),l.attr(`transform`,`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${-(c.height/2)+(t.padding??0)/1.5-(c.y-(c.top??0))})`),t.intersect=function(e){let n=G.rect(t,e),r=n.x-(t.x??0);if(d!=0&&(Math.abs(r)<(t.width??0)/2||Math.abs(r)==(t.width??0)/2&&Math.abs(n.y-(t.y??0))>(t.height??0)/2-f)){let i=f*f*(1-r*r/(d*d));i>0&&(i=Math.sqrt(i)),i=f-i,e.y-(t.y??0)>0&&(i=-i),n.y+=i}return n},s}e(Ce,`cylinder`);async function we(e,t,n){let{labelStyles:r,nodeStyles:i}=y(t);t.labelStyle=r;let{shapeSvg:a,bbox:o}=await C(e,t,E(t)),s=Math.max(o.width+n.labelPaddingX*2,t?.width||0),c=Math.max(o.height+n.labelPaddingY*2,t?.height||0),l=-s/2,u=-c/2,d,{rx:f,ry:m}=t,{cssStyles:h}=t;if(n?.rx&&n.ry&&(f=n.rx,m=n.ry),t.look===`handDrawn`){let e=S.svg(a),n=v(t,{}),r=f||m?e.path(N(l,u,s,c,f||0),n):e.rectangle(l,u,s,c,n);d=a.insert(()=>r,`:first-child`),d.attr(`class`,`basic label-container`).attr(`style`,p(h))}else d=a.insert(`rect`,`:first-child`),d.attr(`class`,`basic label-container`).attr(`style`,i).attr(`rx`,p(f)).attr(`ry`,p(m)).attr(`x`,l).attr(`y`,u).attr(`width`,s).attr(`height`,c);return T(t,d),t.calcIntersect=function(e,t){return G.rect(e,t)},t.intersect=function(e){return G.rect(t,e)},a}e(we,`drawRect`);async function Te(e,t){let{cssClasses:n,labelPaddingX:r,labelPaddingY:i,padding:a,width:o,height:s}=t,c=await we(e,t,{rx:0,ry:0,classes:n??``,labelPaddingX:r??(a??0)*2,labelPaddingY:i??a??0});if(t.look===`handDrawn`){let e=S.svg(c),n=v(t,{}),r=c.select(`.basic.label-container > path:nth-child(2)`),i=r.node();if(!i)return c;let a=null;if(i instanceof SVGGraphicsElement)a=i.getBBox();else return c;return c.insert(()=>e.line(a.x,a.y,a.x+a.width,a.y,n),`.basic.label-container g.label`),c.insert(()=>e.line(a.x,a.y+a.height,a.x+a.width,a.y+a.height,n),`.basic.label-container g.label`),r.remove(),c}let l=c.select(`.basic.label-container`),u=(Number(l.attr(`width`))||o)??0,d=(Number(l.attr(`height`))||s)??0;return u>0&&d>0&&l.attr(`stroke-dasharray`,`${u} ${d}`),c}e(Te,`datastore`);async function Ee(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let i=t.look===`neo`?16:t.padding??0,a=t.look===`neo`?16:t.padding??0,{shapeSvg:o,bbox:s,label:c}=await C(e,t,E(t)),l=s.width+i,u=s.height+a,d=u*.2,f=-l/2,p=-u/2-d/2,{cssStyles:m}=t,h=S.svg(o),g=v(t,{});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=[{x:f,y:p+d},{x:-f,y:p+d},{x:-f,y:-p},{x:f,y:-p},{x:f,y:p},{x:-f,y:p},{x:-f,y:p+d}],b=h.polygon(_.map(e=>[e.x,e.y]),g),x=o.insert(()=>b,`:first-child`);return x.attr(`class`,`basic label-container outer-path`),m&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,m),r&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,r),c.attr(`transform`,`translate(${f+(t.padding??0)/2-(s.x-(s.left??0))}, ${p+d+(t.padding??0)/2-(s.y-(s.top??0))})`),T(t,x),t.intersect=function(e){return G.rect(t,e)},o}e(Ee,`dividedRectangle`);async function De(e,n){let{labelStyles:r,nodeStyles:i}=y(n),a=n.look===`neo`?12:5;n.labelStyle=r;let o=n.padding??0,s=n.look===`neo`?16:o,{shapeSvg:c,bbox:l}=await C(e,n,E(n)),u=(n?.width?n?.width/2:l.width/2)+(s??0),d=u-a,f,{cssStyles:m}=n;if(n.look===`handDrawn`){let e=S.svg(c),t=v(n,{roughness:.2,strokeWidth:2.5}),r=v(n,{roughness:.2,strokeWidth:1.5}),i=e.circle(0,0,u*2,t),a=e.circle(0,0,d*2,r);f=c.insert(`g`,`:first-child`),f.attr(`class`,p(n.cssClasses)).attr(`style`,p(m)),f.node()?.appendChild(i),f.node()?.appendChild(a)}else{f=c.insert(`g`,`:first-child`);let e=f.insert(`circle`,`:first-child`),t=f.insert(`circle`);f.attr(`class`,`basic label-container`).attr(`style`,i),e.attr(`class`,`outer-circle`).attr(`style`,i).attr(`r`,u).attr(`cx`,0).attr(`cy`,0),t.attr(`class`,`inner-circle`).attr(`style`,i).attr(`r`,d).attr(`cx`,0).attr(`cy`,0)}return T(n,f),n.intersect=function(e){return t.info(`DoubleCircle intersect`,n,u,e),G.circle(n,u,e)},c}e(De,`doublecircle`);function Oe(e,n,{config:{themeVariables:r}}){let{labelStyles:i,nodeStyles:a}=y(n);n.label=``,n.labelStyle=i;let o=e.insert(`g`).attr(`class`,E(n)).attr(`id`,n.domId??n.id),{cssStyles:s}=n,c=S.svg(o),{nodeBorder:l}=r,u=v(n,{fillStyle:`solid`});n.look!==`handDrawn`&&(u.roughness=0);let d=c.circle(0,0,14,u),f=o.insert(()=>d,`:first-child`);return f.selectAll(`path`).attr(`style`,`fill: ${l} !important;`),s&&s.length>0&&n.look!==`handDrawn`&&f.selectAll(`path`).attr(`style`,s),a&&n.look!==`handDrawn`&&f.selectAll(`path`).attr(`style`,a),T(n,f),n.intersect=function(e){return t.info(`filledCircle intersect`,n,{radius:7,point:e}),G.circle(n,7,e)},o}e(Oe,`filledCircle`);var ke=10,Ae=10;async function je(e,n){let{labelStyles:r,nodeStyles:i}=y(n);n.labelStyle=r;let a=n.padding??0,o=n.look===`neo`?a*2:a;(n.width||n.height)&&(n.height=n?.height??0,n.height<ke&&(n.height=ke),n.width=(n?.width??0)-o-o/2,n.width<Ae&&(n.width=Ae));let{shapeSvg:s,bbox:c,label:l}=await C(e,n,E(n)),u=(n?.width?n?.width:c.width)+(o??0),d=n?.height?n?.height:u+c.height,f=d,p=[{x:0,y:-d},{x:f,y:-d},{x:f/2,y:0}],{cssStyles:m}=n,h=S.svg(s),g=v(n,{});n.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=D(p),b=h.path(_,g),x=s.insert(()=>b,`:first-child`).attr(`transform`,`translate(${-d/2}, ${d/2})`).attr(`class`,`outer-path`);return m&&n.look!==`handDrawn`&&x.selectChildren(`path`).attr(`style`,m),i&&n.look!==`handDrawn`&&x.selectChildren(`path`).attr(`style`,i),n.width=u,n.height=d,T(n,x),l.attr(`transform`,`translate(${-c.width/2-(c.x-(c.left??0))}, ${-d/2+(n.padding??0)/2+(c.y-(c.top??0))})`),n.intersect=function(e){return t.info(`Triangle intersect`,n,p,e),G.polygon(n,p,e)},s}e(je,`flippedTriangle`);function Me(e,t,{dir:n,config:{state:r,themeVariables:i}}){let{nodeStyles:a}=y(t);t.label=``;let o=e.insert(`g`).attr(`class`,E(t)).attr(`id`,t.domId??t.id),{cssStyles:s}=t,c=Math.max(70,t?.width??0),l=Math.max(10,t?.height??0);n===`LR`&&(c=Math.max(10,t?.width??0),l=Math.max(70,t?.height??0));let u=-1*c/2,d=-1*l/2,f=S.svg(o),p=v(t,{stroke:i.lineColor,fill:i.lineColor});t.look!==`handDrawn`&&(p.roughness=0,p.fillStyle=`solid`);let m=f.rectangle(u,d,c,l,p),h=o.insert(()=>m,`:first-child`);s&&t.look!==`handDrawn`&&h.selectAll(`path`).attr(`style`,s),a&&t.look!==`handDrawn`&&h.selectAll(`path`).attr(`style`,a),T(t,h);let g=r?.padding??0;return t.width&&t.height&&(t.width+=g/2||0,t.height+=g/2||0),t.intersect=function(e){return G.rect(t,e)},o}e(Me,`forkJoin`);async function Ne(e,n){let{labelStyles:r,nodeStyles:i}=y(n);n.labelStyle=r;let a=n.look===`neo`?16:n.padding??0,o=n.look===`neo`?12:n.padding??0;(n.width||n.height)&&(n.height=(n?.height??0)-o*2,n.height<10&&(n.height=10),n.width=(n?.width??0)-a*2,n.width<15&&(n.width=15));let{shapeSvg:s,bbox:c}=await C(e,n,E(n)),l=(n?.width?n?.width:Math.max(15,c.width))+a*2,u=(n?.height?n?.height:Math.max(10,c.height))+o*2,d=u/2,{cssStyles:f}=n,p=S.svg(s),m=v(n,{});n.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=[{x:-l/2,y:-u/2},{x:l/2-d,y:-u/2},...k(-l/2+d,0,d,50,90,270),{x:l/2-d,y:u/2},{x:-l/2,y:u/2}],g=D(h),_=p.path(g,m),b=s.insert(()=>_,`:first-child`);return b.attr(`class`,`basic label-container outer-path`),f&&n.look!==`handDrawn`&&b.selectChildren(`path`).attr(`style`,f),i&&n.look!==`handDrawn`&&b.selectChildren(`path`).attr(`style`,i),T(n,b),n.intersect=function(e){return t.info(`Pill intersect`,n,{radius:d,point:e}),G.polygon(n,h,e)},s}e(Ne,`halfRoundedRectangle`);var Pe=e((e,t,n,r,i)=>[`M${e+i},${t}`,`L${e+n-i},${t}`,`L${e+n},${t-r/2}`,`L${e+n-i},${t-r}`,`L${e+i},${t-r}`,`L${e},${t-r/2}`,`Z`].join(` `),`createHexagonPathD`);async function Fe(e,t){let{labelStyles:n,nodeStyles:r}=y(t),i=t.look===`neo`?3.5:4;t.labelStyle=n;let a=t.padding??0,o=t.look===`neo`?70:a,s=t.look===`neo`?32:a;if(t.width||t.height){let e=(t.height??0)/i;t.width=(t?.width??0)-2*e-s,t.height=(t.height??0)-o}let{shapeSvg:c,bbox:l}=await C(e,t,E(t)),u=(t?.height?t?.height:l.height)+o,d=u/i,f=(t?.width?t?.width:l.width)+2*d+s,p=[{x:d,y:0},{x:f-d,y:0},{x:f,y:-u/2},{x:f-d,y:-u},{x:d,y:-u},{x:0,y:-u/2}],m,{cssStyles:h}=t;if(t.look===`handDrawn`){let e=S.svg(c),n=v(t,{}),r=Pe(0,0,f,u,d),i=e.path(r,n);m=c.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-f/2}, ${u/2})`),h&&m.attr(`style`,h)}else m=q(c,f,u,p);return r&&m.attr(`style`,r),t.width=f,t.height=u,T(t,m),t.intersect=function(e){return G.polygon(t,p,e)},c}e(Fe,`hexagon`);async function Ie(e,n){let{labelStyles:r,nodeStyles:i}=y(n);n.label=``,n.labelStyle=r;let{shapeSvg:a}=await C(e,n,E(n)),o=Math.max(30,n?.width??0),s=Math.max(30,n?.height??0),{cssStyles:c}=n,l=S.svg(a),u=v(n,{});n.look!==`handDrawn`&&(u.roughness=0,u.fillStyle=`solid`);let d=[{x:0,y:0},{x:o,y:0},{x:0,y:s},{x:o,y:s}],f=D(d),p=l.path(f,u),m=a.insert(()=>p,`:first-child`);return m.attr(`class`,`basic label-container outer-path`),c&&n.look!==`handDrawn`&&m.selectChildren(`path`).attr(`style`,c),i&&n.look!==`handDrawn`&&m.selectChildren(`path`).attr(`style`,i),m.attr(`transform`,`translate(${-o/2}, ${-s/2})`),T(n,m),n.intersect=function(e){return t.info(`Pill intersect`,n,{points:d}),G.polygon(n,d,e)},a}e(Ie,`hourglass`);async function Le(e,n,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=y(n);n.labelStyle=a;let o=n.assetHeight??48,s=n.assetWidth??48,c=Math.max(o,s),l=i?.wrappingWidth;n.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,label:f}=await C(e,n,`icon-shape default`),p=n.pos===`t`,h=c,g=c,{nodeBorder:_}=r,{stylesMap:b}=x(n),w=-g/2,E=-h/2,D=n.label?8:0,O=S.svg(u),k=v(n,{stroke:`none`,fill:`none`});n.look!==`handDrawn`&&(k.roughness=0,k.fillStyle=`solid`);let A=O.rectangle(w,E,g,h,k),j=Math.max(g,d.width),M=h+d.height+D,N=O.rectangle(-j/2,-M/2,j,M,{...k,fill:`transparent`,stroke:`none`}),P=u.insert(()=>A,`:first-child`),F=u.insert(()=>N);if(n.icon){let e=u.append(`g`);e.html(`<g>${await m(n.icon,{height:c,width:c,fallbackPrefix:``})}</g>`);let t=e.node().getBBox(),r=t.width,i=t.height,a=t.x,o=t.y;e.attr(`transform`,`translate(${-r/2-a},${p?d.height/2+D/2-i/2-o:-d.height/2-D/2-i/2-o})`),e.attr(`style`,`color: ${b.get(`stroke`)??_};`)}return f.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${p?-M/2:M/2-d.height})`),P.attr(`transform`,`translate(0,${p?d.height/2+D/2:-d.height/2-D/2})`),T(n,F),n.intersect=function(e){if(t.info(`iconSquare intersect`,n,e),!n.label)return G.rect(n,e);let r=n.x??0,i=n.y??0,a=n.height??0,o=[];return o=p?[{x:r-d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2+d.height+D},{x:r+g/2,y:i-a/2+d.height+D},{x:r+g/2,y:i+a/2},{x:r-g/2,y:i+a/2},{x:r-g/2,y:i-a/2+d.height+D},{x:r-d.width/2,y:i-a/2+d.height+D}]:[{x:r-g/2,y:i-a/2},{x:r+g/2,y:i-a/2},{x:r+g/2,y:i-a/2+h},{x:r+d.width/2,y:i-a/2+h},{x:r+d.width/2/2,y:i+a/2},{x:r-d.width/2,y:i+a/2},{x:r-d.width/2,y:i-a/2+h},{x:r-g/2,y:i-a/2+h}],G.polygon(n,o,e)},u}e(Le,`icon`);async function Re(e,n,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=y(n);n.labelStyle=a;let o=n.assetHeight??48,s=n.assetWidth??48,c=Math.max(o,s),l=i?.wrappingWidth;n.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,label:f}=await C(e,n,`icon-shape default`),p=n.label?8:0,h=n.pos===`t`,{nodeBorder:g,mainBkg:_}=r,{stylesMap:b}=x(n),w=S.svg(u),E=v(n,{});n.look!==`handDrawn`&&(E.roughness=0,E.fillStyle=`solid`),E.stroke=b.get(`fill`)??_;let D=u.append(`g`);n.icon&&D.html(`<g>${await m(n.icon,{height:c,width:c,fallbackPrefix:``})}</g>`);let O=D.node().getBBox(),k=O.width,A=O.height,j=O.x,M=O.y,N=Math.max(k,A)*Math.SQRT2+40,P=w.circle(0,0,N,E),F=Math.max(N,d.width),I=N+d.height+p,L=w.rectangle(-F/2,-I/2,F,I,{...E,fill:`transparent`,stroke:`none`}),ee=u.insert(()=>P,`:first-child`),R=u.insert(()=>L);return D.attr(`transform`,`translate(${-k/2-j},${h?d.height/2+p/2-A/2-M:-d.height/2-p/2-A/2-M})`),D.attr(`style`,`color: ${b.get(`stroke`)??g};`),f.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${h?-I/2:I/2-d.height})`),ee.attr(`transform`,`translate(0,${h?d.height/2+p/2:-d.height/2-p/2})`),T(n,R),n.intersect=function(e){return t.info(`iconSquare intersect`,n,e),G.rect(n,e)},u}e(Re,`iconCircle`);async function ze(e,n,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=y(n);n.labelStyle=a;let o=n.assetHeight??48,s=n.assetWidth??48,c=Math.max(o,s),l=i?.wrappingWidth;n.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,halfPadding:f,label:p}=await C(e,n,`icon-shape default`),h=n.pos===`t`,g=c+f*2,_=c+f*2,{nodeBorder:b,mainBkg:w}=r,{stylesMap:E}=x(n),D=-_/2,O=-g/2,k=n.label?8:0,A=S.svg(u),j=v(n,{});n.look!==`handDrawn`&&(j.roughness=0,j.fillStyle=`solid`),j.stroke=E.get(`fill`)??w;let M=A.path(N(D,O,_,g,5),j),P=Math.max(_,d.width),F=g+d.height+k,I=A.rectangle(-P/2,-F/2,P,F,{...j,fill:`transparent`,stroke:`none`}),L=u.insert(()=>M,`:first-child`).attr(`class`,`icon-shape2`),ee=u.insert(()=>I);if(n.icon){let e=u.append(`g`);e.html(`<g>${await m(n.icon,{height:c,width:c,fallbackPrefix:``})}</g>`);let t=e.node().getBBox(),r=t.width,i=t.height,a=t.x,o=t.y;e.attr(`transform`,`translate(${-r/2-a},${h?d.height/2+k/2-i/2-o:-d.height/2-k/2-i/2-o})`),e.attr(`style`,`color: ${E.get(`stroke`)??b};`)}return p.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${h?-F/2:F/2-d.height})`),L.attr(`transform`,`translate(0,${h?d.height/2+k/2:-d.height/2-k/2})`),T(n,ee),n.intersect=function(e){if(t.info(`iconSquare intersect`,n,e),!n.label)return G.rect(n,e);let r=n.x??0,i=n.y??0,a=n.height??0,o=[];return o=h?[{x:r-d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2+d.height+k},{x:r+_/2,y:i-a/2+d.height+k},{x:r+_/2,y:i+a/2},{x:r-_/2,y:i+a/2},{x:r-_/2,y:i-a/2+d.height+k},{x:r-d.width/2,y:i-a/2+d.height+k}]:[{x:r-_/2,y:i-a/2},{x:r+_/2,y:i-a/2},{x:r+_/2,y:i-a/2+g},{x:r+d.width/2,y:i-a/2+g},{x:r+d.width/2/2,y:i+a/2},{x:r-d.width/2,y:i+a/2},{x:r-d.width/2,y:i-a/2+g},{x:r-_/2,y:i-a/2+g}],G.polygon(n,o,e)},u}e(ze,`iconRounded`);async function Be(e,n,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=y(n);n.labelStyle=a;let o=n.assetHeight??48,s=n.assetWidth??48,c=Math.max(o,s),l=i?.wrappingWidth;n.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,halfPadding:f,label:p}=await C(e,n,`icon-shape default`),h=n.pos===`t`,g=c+f*2,_=c+f*2,{nodeBorder:b,mainBkg:w}=r,{stylesMap:E}=x(n),D=-_/2,O=-g/2,k=n.label?8:0,A=S.svg(u),j=v(n,{});n.look!==`handDrawn`&&(j.roughness=0,j.fillStyle=`solid`),j.stroke=E.get(`fill`)??w;let M=A.path(N(D,O,_,g,.1),j),P=Math.max(_,d.width),F=g+d.height+k,I=A.rectangle(-P/2,-F/2,P,F,{...j,fill:`transparent`,stroke:`none`}),L=u.insert(()=>M,`:first-child`),ee=u.insert(()=>I);if(n.icon){let e=u.append(`g`);e.html(`<g>${await m(n.icon,{height:c,width:c,fallbackPrefix:``})}</g>`);let t=e.node().getBBox(),r=t.width,i=t.height,a=t.x,o=t.y;e.attr(`transform`,`translate(${-r/2-a},${h?d.height/2+k/2-i/2-o:-d.height/2-k/2-i/2-o})`),e.attr(`style`,`color: ${E.get(`stroke`)??b};`)}return p.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${h?-F/2:F/2-d.height})`),L.attr(`transform`,`translate(0,${h?d.height/2+k/2:-d.height/2-k/2})`),T(n,ee),n.intersect=function(e){if(t.info(`iconSquare intersect`,n,e),!n.label)return G.rect(n,e);let r=n.x??0,i=n.y??0,a=n.height??0,o=[];return o=h?[{x:r-d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2+d.height+k},{x:r+_/2,y:i-a/2+d.height+k},{x:r+_/2,y:i+a/2},{x:r-_/2,y:i+a/2},{x:r-_/2,y:i-a/2+d.height+k},{x:r-d.width/2,y:i-a/2+d.height+k}]:[{x:r-_/2,y:i-a/2},{x:r+_/2,y:i-a/2},{x:r+_/2,y:i-a/2+g},{x:r+d.width/2,y:i-a/2+g},{x:r+d.width/2/2,y:i+a/2},{x:r-d.width/2,y:i+a/2},{x:r-d.width/2,y:i-a/2+g},{x:r-_/2,y:i-a/2+g}],G.polygon(n,o,e)},u}e(Be,`iconSquare`);async function Ve(e,n,{config:{flowchart:r}}){let i=new Image;i.src=n?.img??``,await i.decode();let a=Number(i.naturalWidth.toString().replace(`px`,``)),o=Number(i.naturalHeight.toString().replace(`px`,``));n.imageAspectRatio=a/o;let{labelStyles:s}=y(n);n.labelStyle=s;let c=r?.wrappingWidth;n.defaultWidth=r?.wrappingWidth;let l=Math.max(n.label?c??0:0,n?.assetWidth??a),u=n.constraint===`on`&&n?.assetHeight?n.assetHeight*n.imageAspectRatio:l,d=n.constraint===`on`?u/n.imageAspectRatio:n?.assetHeight??o;n.width=Math.max(u,c??0);let{shapeSvg:f,bbox:p,label:m}=await C(e,n,`image-shape default`),h=n.pos===`t`,g=-u/2,_=-d/2,b=n.label?8:0,x=S.svg(f),w=v(n,{});n.look!==`handDrawn`&&(w.roughness=0,w.fillStyle=`solid`);let E=x.rectangle(g,_,u,d,w),D=Math.max(u,p.width),O=d+p.height+b,k=x.rectangle(-D/2,-O/2,D,O,{...w,fill:`none`,stroke:`none`}),A=f.insert(()=>E,`:first-child`),j=f.insert(()=>k);if(n.img){let e=f.append(`image`);e.attr(`href`,n.img),e.attr(`width`,u),e.attr(`height`,d),e.attr(`preserveAspectRatio`,`none`),e.attr(`transform`,`translate(${-u/2},${h?O/2-d:-O/2})`)}return m.attr(`transform`,`translate(${-p.width/2-(p.x-(p.left??0))},${h?-d/2-p.height/2-b/2:d/2-p.height/2+b/2})`),A.attr(`transform`,`translate(0,${h?p.height/2+b/2:-p.height/2-b/2})`),T(n,j),n.intersect=function(e){if(t.info(`iconSquare intersect`,n,e),!n.label)return G.rect(n,e);let r=n.x??0,i=n.y??0,a=n.height??0,o=[];return o=h?[{x:r-p.width/2,y:i-a/2},{x:r+p.width/2,y:i-a/2},{x:r+p.width/2,y:i-a/2+p.height+b},{x:r+u/2,y:i-a/2+p.height+b},{x:r+u/2,y:i+a/2},{x:r-u/2,y:i+a/2},{x:r-u/2,y:i-a/2+p.height+b},{x:r-p.width/2,y:i-a/2+p.height+b}]:[{x:r-u/2,y:i-a/2},{x:r+u/2,y:i-a/2},{x:r+u/2,y:i-a/2+d},{x:r+p.width/2,y:i-a/2+d},{x:r+p.width/2/2,y:i+a/2},{x:r-p.width/2,y:i+a/2},{x:r-p.width/2,y:i-a/2+d},{x:r-u/2,y:i-a/2+d}],G.polygon(n,o,e)},f}e(Ve,`imageSquare`);async function He(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=Math.max(c.width+(o??0)*2,t?.width??0),u=Math.max(c.height+(a??0)*2,t?.height??0),d=[{x:0,y:0},{x:l,y:0},{x:l+3*u/6,y:-u},{x:-3*u/6,y:-u}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=S.svg(s),n=v(t,{}),r=D(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-l/2}, ${u/2})`),p&&f.attr(`style`,p)}else f=q(s,l,u,d);return r&&f.attr(`style`,r),t.width=l,t.height=u,T(t,f),t.intersect=function(e){return G.polygon(t,d,e)},s}e(He,`inv_trapezoid`);async function Ue(e,t){let{shapeSvg:n,bbox:r,label:i}=await C(e,t,`label`),a=n.insert(`rect`,`:first-child`);return a.attr(`width`,.1).attr(`height`,.1),n.attr(`class`,`label edgeLabel`),i.attr(`transform`,`translate(${-(r.width/2)-(r.x-(r.left??0))}, ${-(r.height/2)-(r.y-(r.top??0))})`),T(t,a),t.intersect=function(e){return G.rect(t,e)},n}e(Ue,`labelRect`);async function We(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=(t?.height??c.height)+a,u=(t?.width??c.width)+o,d=[{x:0,y:0},{x:u+3*l/6,y:0},{x:u,y:-l},{x:-(3*l)/6,y:-l}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=S.svg(s),n=v(t,{}),r=D(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),p&&f.attr(`style`,p)}else f=q(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,T(t,f),t.intersect=function(e){return G.polygon(t,d,e)},s}e(We,`lean_left`);async function Ge(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=(t?.height??c.height)+a,u=(t?.width??c.width)+o,d=[{x:-3*l/6,y:0},{x:u,y:0},{x:u+3*l/6,y:-l},{x:0,y:-l}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=S.svg(s),n=v(t,{}),r=D(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),p&&f.attr(`style`,p)}else f=q(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,T(t,f),t.intersect=function(e){return G.polygon(t,d,e)},s}e(Ge,`lean_right`);function Ke(e,n){let{labelStyles:r,nodeStyles:i}=y(n);n.label=``,n.labelStyle=r;let a=e.insert(`g`).attr(`class`,E(n)).attr(`id`,n.domId??n.id),{cssStyles:o}=n,s=Math.max(35,n?.width??0),c=Math.max(35,n?.height??0),l=[{x:s,y:0},{x:0,y:c+7/2},{x:s-14,y:c+7/2},{x:0,y:2*c},{x:s,y:c-7/2},{x:14,y:c-7/2}],u=S.svg(a),d=v(n,{});n.look!==`handDrawn`&&(d.roughness=0,d.fillStyle=`solid`);let f=D(l),p=u.path(f,d),m=a.insert(()=>p,`:first-child`);return m.attr(`class`,`outer-path`),o&&n.look!==`handDrawn`&&m.selectAll(`path`).attr(`style`,o),i&&n.look!==`handDrawn`&&m.selectAll(`path`).attr(`style`,i),m.attr(`transform`,`translate(-${s/2},${-c})`),T(n,m),n.intersect=function(e){return t.info(`lightningBolt intersect`,n,e),G.polygon(n,l,e)},a}e(Ke,`lightningBolt`);var qe=e((e,t,n,r,i,a,o)=>[`M${e},${t+a}`,`a${i},${a} 0,0,0 ${n},0`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`,`M${e},${t+a+o}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createCylinderPathD`),Je=e((e,t,n,r,i,a,o)=>[`M${e},${t+a}`,`M${e+n},${t+a}`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`,`M${e},${t+a+o}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createOuterCylinderPathD`),Ye=e((e,t,n,r,i,a)=>[`M${e-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createInnerCylinderPathD`),Xe=10,Ze=10;async function Qe(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?24:i;if(t.width||t.height){let e=t.width??0;t.width=(t.width??0)-a,t.width<Ze&&(t.width=Ze);let n=e/2/(2.5+e/50);t.height=(t.height??0)-o-n*3,t.height<Xe&&(t.height=Xe)}let{shapeSvg:s,bbox:c,label:l}=await C(e,t,E(t)),u=(t?.width?t?.width:c.width)+a*2,d=u/2,f=d/(2.5+u/50),m=(t?.height?t?.height:c.height)+f+o*2,h=m*.1,g,{cssStyles:_}=t;if(t.look===`handDrawn`){let e=S.svg(s),n=Je(0,0,u,m,d,f,h),r=Ye(0,f,u,m,d,f),i=v(t,{}),a=e.path(n,i),o=e.path(r,i);s.insert(()=>o,`:first-child`).attr(`class`,`line`),g=s.insert(()=>a,`:first-child`),g.attr(`class`,`basic label-container`),_&&g.attr(`style`,_)}else{let e=qe(0,0,u,m,d,f,h);g=s.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container outer-path`).attr(`style`,p(_)).attr(`style`,r)}return g.attr(`label-offset-y`,f),g.attr(`transform`,`translate(${-u/2}, ${-(m/2+f)})`),T(t,g),l.attr(`transform`,`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${-(c.height/2)+f-(c.y-(c.top??0))})`),t.intersect=function(e){let n=G.rect(t,e),r=n.x-(t.x??0);if(d!=0&&(Math.abs(r)<(t.width??0)/2||Math.abs(r)==(t.width??0)/2&&Math.abs(n.y-(t.y??0))>(t.height??0)/2-f)){let i=f*f*(1-r*r/(d*d));i>0&&(i=Math.sqrt(i)),i=f-i,e.y-(t.y??0)>0&&(i=-i),n.y+=i}return n},s}e(Qe,`linedCylinder`);async function $e(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.width=(t.width??0)*10/11-a*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-o*2,t.height<10&&(t.height=10));let{shapeSvg:s,bbox:c,label:l}=await C(e,t,E(t)),u=(t?.width?t?.width:c.width)+(a??0)*2,d=(t?.height?t?.height:c.height)+(o??0)*2,f=t.look===`neo`?d/4:d/8,p=d+f,{cssStyles:m}=t,h=S.svg(s),g=v(t,{});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=[{x:-u/2-u/2*.1,y:-p/2},{x:-u/2-u/2*.1,y:p/2},...O(-u/2-u/2*.1,p/2,u/2+u/2*.1,p/2,f,.8),{x:u/2+u/2*.1,y:-p/2},{x:-u/2-u/2*.1,y:-p/2},{x:-u/2,y:-p/2},{x:-u/2,y:p/2*1.1},{x:-u/2,y:-p/2}],b=h.polygon(_.map(e=>[e.x,e.y]),g),x=s.insert(()=>b,`:first-child`);return x.attr(`class`,`basic label-container outer-path`),m&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,m),r&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,r),x.attr(`transform`,`translate(0,${-f/2})`),l.attr(`transform`,`translate(${-u/2+(t.padding??0)+u/2*.1/2-(c.x-(c.left??0))},${-d/2+(t.padding??0)-f/2-(c.y-(c.top??0))})`),T(t,x),t.intersect=function(e){return G.polygon(t,_,e)},s}e($e,`linedWaveEdgedRect`);async function et(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,s=t.look===`neo`?10:5;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-a*2-2*s,10),t.height=Math.max((t?.height??0)-o*2-2*s,10));let{shapeSvg:c,bbox:l,label:u}=await C(e,t,E(t)),d=(t?.width?t?.width:l.width)+a*2+2*s,f=(t?.height?t?.height:l.height)+o*2+2*s,p=d-2*s,m=f-2*s,h=-p/2,g=-m/2,{cssStyles:_}=t,b=S.svg(c),x=v(t,{}),w=[{x:h-s,y:g+s},{x:h-s,y:g+m+s},{x:h+p-s,y:g+m+s},{x:h+p-s,y:g+m},{x:h+p,y:g+m},{x:h+p,y:g+m-s},{x:h+p+s,y:g+m-s},{x:h+p+s,y:g-s},{x:h+s,y:g-s},{x:h+s,y:g},{x:h,y:g},{x:h,y:g+s}],O=[{x:h,y:g+s},{x:h+p-s,y:g+s},{x:h+p-s,y:g+m},{x:h+p,y:g+m},{x:h+p,y:g},{x:h,y:g}];t.look!==`handDrawn`&&(x.roughness=0,x.fillStyle=`solid`);let k=D(w),j=b.path(k,x),M=D(O),N=b.path(M,x);t.look!==`handDrawn`&&(j=A(j),N=A(N));let P=c.insert(`g`,`:first-child`);return P.insert(()=>j),P.insert(()=>N),P.attr(`class`,`basic label-container outer-path`),_&&t.look!==`handDrawn`&&P.selectAll(`path`).attr(`style`,_),r&&t.look!==`handDrawn`&&P.selectAll(`path`).attr(`style`,r),u.attr(`transform`,`translate(${-(l.width/2)-s-(l.x-(l.left??0))}, ${-(l.height/2)+s-(l.y-(l.top??0))})`),T(t,P),t.intersect=function(e){return G.polygon(t,w,e)},c}e(et,`multiRect`);async function tt(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await C(e,t,E(t)),s=t.padding??0,c=t.look===`neo`?16:s,l=t.look===`neo`?12:s,u=!0;(t.width||t.height)&&(u=!1,t.width=(t?.width??0)-c*2,t.height=(t?.height??0)-l*3);let d=Math.max(a.width,t?.width??0)+c*2,f=Math.max(a.height,t?.height??0)+l*3,p=t.look===`neo`?f/4:f/8,m=f+(u?p/2:-p/2),h=-d/2,g=-m/2,{cssStyles:_}=t,b=O(h-10,g+m+10,h+d-10,g+m+10,p,.8),x=b?.[b.length-1],w=[{x:h-10,y:g+10},{x:h-10,y:g+m+10},...b,{x:h+d-10,y:x.y-10},{x:h+d,y:x.y-10},{x:h+d,y:x.y-20},{x:h+d+10,y:x.y-20},{x:h+d+10,y:g-10},{x:h+10,y:g-10},{x:h+10,y:g},{x:h,y:g},{x:h,y:g+10}],k=[{x:h,y:g+10},{x:h+d-10,y:g+10},{x:h+d-10,y:x.y-10},{x:h+d,y:x.y-10},{x:h+d,y:g},{x:h,y:g}],A=S.svg(i),j=v(t,{});t.look!==`handDrawn`&&(j.roughness=0,j.fillStyle=`solid`);let M=D(w),N=A.path(M,j),P=D(k),F=A.path(P,j),I=i.insert(()=>N,`:first-child`);return I.insert(()=>F),I.attr(`class`,`basic label-container outer-path`),_&&t.look!==`handDrawn`&&I.selectAll(`path`).attr(`style`,_),r&&t.look!==`handDrawn`&&I.selectAll(`path`).attr(`style`,r),I.attr(`transform`,`translate(0,${-p/2})`),o.attr(`transform`,`translate(${-(a.width/2)-10-(a.x-(a.left??0))}, ${-(a.height/2)+10-p/2-(a.y-(a.top??0))})`),T(t,I),t.intersect=function(e){return G.polygon(t,w,e)},i}e(tt,`multiWaveEdgedRectangle`);async function nt(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=y(t);t.labelStyle=r,t.useHtmlLabels||a(o())||(t.centerLabel=!0);let{shapeSvg:s,bbox:c,label:l}=await C(e,t,E(t)),u=Math.max(c.width+(t.padding??0)*2,t?.width??0),d=Math.max(c.height+(t.padding??0)*2,t?.height??0),f=-u/2,p=-d/2,{cssStyles:m}=t,h=S.svg(s),g=v(t,{fill:n.noteBkgColor,stroke:n.noteBorderColor});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=h.rectangle(f,p,u,d,g),b=s.insert(()=>_,`:first-child`);return b.attr(`class`,`basic label-container outer-path`),l.attr(`class`,`label noteLabel`),m&&t.look!==`handDrawn`&&b.selectAll(`path`).attr(`style`,m),i&&t.look!==`handDrawn`&&b.selectAll(`path`).attr(`style`,i),l.attr(`transform`,`translate(${-c.width/2-(c.x-(c.left??0))}, ${-(c.height/2)-(c.y-(c.top??0))})`),T(t,b),t.intersect=function(e){return G.rect(t,e)},s}e(nt,`note`);var rt=e((e,t,n)=>[`M${e+n/2},${t}`,`L${e+n},${t-n/2}`,`L${e+n/2},${t-n}`,`L${e},${t-n/2}`,`Z`].join(` `),`createDecisionBoxPathD`);async function it(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await C(e,t,E(t)),o=a.width+(t.padding??0)+(a.height+(t.padding??0)),s=.5,c=[{x:o/2,y:0},{x:o,y:-o/2},{x:o/2,y:-o},{x:0,y:-o/2}],l,{cssStyles:u}=t;if(t.look===`handDrawn`){let e=S.svg(i),n=v(t,{}),r=rt(0,0,o),a=e.path(r,n);l=i.insert(()=>a,`:first-child`).attr(`transform`,`translate(${-o/2+s}, ${o/2})`),u&&l.attr(`style`,u)}else l=q(i,o,o,c),l.attr(`transform`,`translate(${-o/2+s}, ${o/2})`);return r&&l.attr(`style`,r),T(t,l),t.calcIntersect=function(e,t){let n=e.width,r=[{x:n/2,y:0},{x:n,y:-n/2},{x:n/2,y:-n},{x:0,y:-n/2}],i=G.polygon(e,r,t);return{x:i.x-.5,y:i.y-.5}},t.intersect=function(e){return this.calcIntersect(t,e)},i}e(it,`question`);async function at(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?21:i??0,o=t.look===`neo`?12:i??0,{shapeSvg:s,bbox:c,label:l}=await C(e,t,E(t)),u=(t?.width??c.width)+(t.look===`neo`?a*2:a),d=(t?.height??c.height)+(t.look===`neo`?o*2:o),f=-u/2,p=-d/2,m=p/2,h=[{x:f+m,y:p},{x:f,y:0},{x:f+m,y:-p},{x:-f,y:-p},{x:-f,y:p}],{cssStyles:g}=t,_=S.svg(s),b=v(t,{});t.look!==`handDrawn`&&(b.roughness=0,b.fillStyle=`solid`);let x=D(h),w=_.path(x,b),O=s.insert(()=>w,`:first-child`);return O.attr(`class`,`basic label-container outer-path`),g&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,g),r&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,r),O.attr(`transform`,`translate(${-m/2},0)`),l.attr(`transform`,`translate(${-m/2-c.width/2-(c.x-(c.left??0))}, ${-(c.height/2)-(c.y-(c.top??0))})`),T(t,O),t.intersect=function(e){return G.polygon(t,h,e)},s}e(at,`rect_left_inv_arrow`);async function ot(e,n){let{labelStyles:r,nodeStyles:i}=y(n);n.labelStyle=r;let o;o=n.cssClasses?`node `+n.cssClasses:`node default`;let s=e.insert(`g`).attr(`class`,o).attr(`id`,n.domId||n.id),l=s.insert(`g`),d=s.insert(`g`).attr(`class`,`label`).attr(`style`,i),f=n.description,p=n.label,m=await M(d,p,n.labelStyle,!0,!0),h={width:0,height:0};if(a(c())){let e=m.children[0],t=u(m);h=e.getBoundingClientRect(),t.attr(`width`,h.width),t.attr(`height`,h.height)}t.info(`Text 2`,f);let g=f||[],_=m.getBBox(),b=await M(d,Array.isArray(g)?g.join(`<br/>`):g,n.labelStyle,!0,!0),x=b.children[0],C=u(b);h=x.getBoundingClientRect(),C.attr(`width`,h.width),C.attr(`height`,h.height);let w=(n.padding||0)/2;u(b).attr(`transform`,`translate( `+(h.width>_.width?0:(_.width-h.width)/2)+`, `+(_.height+w+5)+`)`),u(m).attr(`transform`,`translate( `+(h.width<_.width?0:-(_.width-h.width)/2)+`, 0)`),h=d.node().getBBox(),d.attr(`transform`,`translate(`+-h.width/2+`, `+(-h.height/2-w+3)+`)`);let E=h.width+(n.padding||0),D=h.height+(n.padding||0),O=-h.width/2-w,k=-h.height/2-w,A,j;if(n.look===`handDrawn`){let e=S.svg(s),r=v(n,{}),i=e.path(N(O,k,E,D,n.rx||0),r),a=e.line(-h.width/2-w,-h.height/2-w+_.height+w,h.width/2+w,-h.height/2-w+_.height+w,r);j=s.insert(()=>(t.debug(`Rough node insert CXC`,i),a),`:first-child`),A=s.insert(()=>(t.debug(`Rough node insert CXC`,i),i),`:first-child`)}else A=l.insert(`rect`,`:first-child`),j=l.insert(`line`),A.attr(`class`,`outer title-state`).attr(`style`,i).attr(`x`,-h.width/2-w).attr(`y`,-h.height/2-w).attr(`width`,h.width+(n.padding||0)).attr(`height`,h.height+(n.padding||0)),j.attr(`class`,`divider`).attr(`x1`,-h.width/2-w).attr(`x2`,h.width/2+w).attr(`y1`,-h.height/2-w+_.height+w).attr(`y2`,-h.height/2-w+_.height+w);return T(n,A),n.intersect=function(e){return G.rect(n,e)},s}e(ot,`rectWithTitle`);async function st(e,t,{config:{themeVariables:n}}){let r=n?.radius??5;return we(e,t,{rx:r,ry:r,classes:``,labelPaddingX:(t?.padding??0)*1,labelPaddingY:(t?.padding??0)*1})}e(st,`roundedRect`);var Z=8;async function ct(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let i=t.look===`neo`?16:t.padding??0,a=t.look===`neo`?12:t.padding??0,{shapeSvg:o,bbox:s,label:c}=await C(e,t,E(t)),l=(t?.width??s.width)+i*2+(t.look===`neo`?Z:Z*2),u=(t?.height??s.height)+a*2,d=l-Z,f=u,m=Z-l/2,h=-u/2,{cssStyles:g}=t,_=S.svg(o),b=v(t,{});t.look!==`handDrawn`&&(b.roughness=0,b.fillStyle=`solid`);let x=[{x:m,y:h},{x:m+d,y:h},{x:m+d,y:h+f},{x:m-Z,y:h+f},{x:m-Z,y:h},{x:m,y:h},{x:m,y:h+f}],w=_.polygon(x.map(e=>[e.x,e.y]),b),D=o.insert(()=>w,`:first-child`);return D.attr(`class`,`basic label-container outer-path`).attr(`style`,p(g)),r&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,r),g&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,r),c.attr(`transform`,`translate(${Z/2-s.width/2-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),T(t,D),t.intersect=function(e){return G.rect(t,e)},o}e(ct,`shadedProcess`);async function lt(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-a*2,10),t.height=Math.max((t?.height??0)/1.5-o*2,10));let{shapeSvg:s,bbox:c,label:l}=await C(e,t,E(t)),u=(t?.width?t?.width:c.width)+a*2,d=((t?.height?t?.height:c.height)+o*2)*1.5,f=u,p=d/1.5,m=-f/2,h=-p/2,{cssStyles:g}=t,_=S.svg(s),b=v(t,{});t.look!==`handDrawn`&&(b.roughness=0,b.fillStyle=`solid`);let x=[{x:m,y:h},{x:m,y:h+p},{x:m+f,y:h+p},{x:m+f,y:h-p/2}],w=D(x),O=_.path(w,b),k=s.insert(()=>O,`:first-child`);return k.attr(`class`,`basic label-container outer-path`),g&&t.look!==`handDrawn`&&k.selectChildren(`path`).attr(`style`,g),r&&t.look!==`handDrawn`&&k.selectChildren(`path`).attr(`style`,r),k.attr(`transform`,`translate(0, ${p/4})`),l.attr(`transform`,`translate(${-f/2+(t.padding??0)-(c.x-(c.left??0))}, ${-p/4+(t.padding??0)-(c.y-(c.top??0))})`),T(t,k),t.intersect=function(e){return G.polygon(t,x,e)},s}e(lt,`slopedRect`);async function ut(e,t){let n=t.padding??0,r=t.look===`neo`?16:n*2,i=t.look===`neo`?12:n;return we(e,t,{rx:0,ry:0,classes:``,labelPaddingX:t.labelPaddingX??r,labelPaddingY:i})}e(ut,`squareRect`);async function dt(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?20:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=c.height+(t.look===`neo`?o*2:o),u=c.width+l/4+(t.look===`neo`?a*2:a),d=l/2,{cssStyles:f}=t,p=S.svg(s),m=v(t,{});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=[{x:-u/2+d,y:-l/2},{x:u/2-d,y:-l/2},...k(-u/2+d,0,d,50,90,270),{x:u/2-d,y:l/2},...k(u/2-d,0,d,50,270,450)],g=D(h),_=p.path(g,m),b=s.insert(()=>_,`:first-child`);return b.attr(`class`,`basic label-container outer-path`),f&&t.look!==`handDrawn`&&b.selectChildren(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&b.selectChildren(`path`).attr(`style`,r),T(t,b),t.intersect=function(e){return G.polygon(t,h,e)},s}e(dt,`stadium`);async function ft(e,t){return we(e,t,{rx:t.look===`neo`?3:5,ry:t.look===`neo`?3:5,classes:`flowchart-node`})}e(ft,`state`);function pt(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=y(t);t.labelStyle=r;let{cssStyles:a}=t,{lineColor:o,stateBorder:s,nodeBorder:c,nodeShadow:l}=n;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||=14,t.height||=14;let u=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId??t.id),d=S.svg(u),f=v(t,{});t.look!==`handDrawn`&&(f.roughness=0,f.fillStyle=`solid`);let p=d.circle(0,0,t.width,{...f,stroke:o,strokeWidth:2}),m=s??c,h=(t.width??0)*5/14,g=d.circle(0,0,h,{...f,fill:m,stroke:m,strokeWidth:2,fillStyle:`solid`}),_=u.insert(()=>p,`:first-child`);if(_.insert(()=>g),t.look!==`handDrawn`&&_.attr(`class`,`outer-path`),a&&_.selectAll(`path`).attr(`style`,a),i&&_.selectAll(`path`).attr(`style`,i),t.width<25&&l&&t.look!==`handDrawn`){let t=e.node()?.ownerSVGElement?.id??``,n=t?`${t}-drop-shadow-small`:`drop-shadow-small`;_.attr(`style`,`filter:url(#${n})`)}return T(t,_),t.intersect=function(e){return G.circle(t,(t.width??0)/2,e)},u}e(pt,`stateEnd`);function mt(e,t,{config:{themeVariables:n}}){let{lineColor:r,nodeShadow:i}=n;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||=14,t.height||=14;let a=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId||t.id),o;if(t.look===`handDrawn`){let e=S.svg(a).circle(0,0,t.width,b(r));o=a.insert(()=>e),o.attr(`class`,`state-start`).attr(`r`,(t.width??7)/2).attr(`width`,t.width??14).attr(`height`,t.height??14)}else o=a.insert(`circle`,`:first-child`),o.attr(`class`,`state-start`).attr(`r`,(t.width??7)/2).attr(`width`,t.width??14).attr(`height`,t.height??14);if(t.width<25&&i&&t.look!==`handDrawn`){let t=e.node()?.ownerSVGElement?.id??``,n=t?`${t}-drop-shadow-small`:`drop-shadow-small`;o.attr(`style`,`filter:url(#${n})`)}return T(t,o),t.intersect=function(e){return G.circle(t,(t.width??7)/2,e)},a}e(mt,`stateStart`);var ht=8;async function gt(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let i=t?.padding??8,a=t.look===`neo`?28:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=(t?.width??c.width)+2*ht+a,u=(t?.height??c.height)+o,d=l-2*ht,f=u,m=-l/2,h=-u/2,g=[{x:0,y:0},{x:d,y:0},{x:d,y:-f},{x:0,y:-f},{x:0,y:0},{x:-8,y:0},{x:d+8,y:0},{x:d+8,y:-f},{x:-8,y:-f},{x:-8,y:0}];if(t.look===`handDrawn`){let e=S.svg(s),n=v(t,{}),r=e.rectangle(m,h,d+16,f,n),i=e.line(m+ht,h,m+ht,h+f,n),a=e.line(m+ht+d,h,m+ht+d,h+f,n);s.insert(()=>i,`:first-child`),s.insert(()=>a,`:first-child`);let o=s.insert(()=>r,`:first-child`),{cssStyles:c}=t;o.attr(`class`,`basic label-container`).attr(`style`,p(c)),T(t,o)}else{let e=q(s,d,f,g);r&&e.attr(`style`,r),T(t,e)}return t.intersect=function(e){return G.polygon(t,g,e)},s}e(gt,`subroutine`);var _t=.2;async function vt(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.height=Math.max((t?.height??0)-o*2,10),t.width=Math.max((t?.width??0)-a*2-_t*(t.height+o*2),10));let{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=(t?.height?t?.height:c.height)+o*2,u=_t*l,d=_t*l,f=(t?.width?t?.width:c.width)+a*2+u-u,p=l,m=-f/2,h=-p/2,{cssStyles:g}=t,_=S.svg(s),b=v(t,{}),x=[{x:m-u/2,y:h},{x:m+f+u/2,y:h},{x:m+f+u/2,y:h+p},{x:m-u/2,y:h+p}],w=[{x:m+f-u/2,y:h+p},{x:m+f+u/2,y:h+p},{x:m+f+u/2,y:h+p-d}];t.look!==`handDrawn`&&(b.roughness=0,b.fillStyle=`solid`);let O=D(x),k=_.path(O,b),A=D(w),j=_.path(A,{...b,fillStyle:`solid`}),M=s.insert(()=>j,`:first-child`);return M.insert(()=>k,`:first-child`),M.attr(`class`,`basic label-container outer-path`),g&&t.look!==`handDrawn`&&M.selectAll(`path`).attr(`style`,g),r&&t.look!==`handDrawn`&&M.selectAll(`path`).attr(`style`,r),T(t,M),t.intersect=function(e){return G.polygon(t,x,e)},s}e(vt,`taggedRect`);async function yt(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await C(e,t,E(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),c=Math.max(a.height+(t.padding??0)*2,t?.height??0),l=c/8,u=.2*s,d=.2*c,f=c+l,{cssStyles:p}=t,m=S.svg(i),h=v(t,{});t.look!==`handDrawn`&&(h.roughness=0,h.fillStyle=`solid`);let g=[{x:-s/2-s/2*.1,y:f/2},...O(-s/2-s/2*.1,f/2,s/2+s/2*.1,f/2,l,.8),{x:s/2+s/2*.1,y:-f/2},{x:-s/2-s/2*.1,y:-f/2}],_=-s/2+s/2*.1,b=-f/2-d*.4,x=[{x:_+s-u,y:(b+c)*1.3},{x:_+s,y:b+c-d},{x:_+s,y:(b+c)*.9},...O(_+s,(b+c)*1.25,_+s-u,(b+c)*1.3,-c*.02,.5)],w=D(g),k=m.path(w,h),A=D(x),j=m.path(A,{...h,fillStyle:`solid`}),M=i.insert(()=>j,`:first-child`);return M.insert(()=>k,`:first-child`),M.attr(`class`,`basic label-container outer-path`),p&&t.look!==`handDrawn`&&M.selectAll(`path`).attr(`style`,p),r&&t.look!==`handDrawn`&&M.selectAll(`path`).attr(`style`,r),M.attr(`transform`,`translate(0,${-l/2})`),o.attr(`transform`,`translate(${-s/2+(t.padding??0)-(a.x-(a.left??0))},${-c/2+(t.padding??0)-l/2-(a.y-(a.top??0))})`),T(t,M),t.intersect=function(e){return G.polygon(t,g,e)},i}e(yt,`taggedWaveEdgedRectangle`);async function bt(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await C(e,t,E(t)),o=Math.max(a.width+(t.padding??0),t?.width||0),s=Math.max(a.height+(t.padding??0),t?.height||0),c=-o/2,l=-s/2,u=i.insert(`rect`,`:first-child`);return u.attr(`class`,`text`).attr(`style`,r).attr(`rx`,0).attr(`ry`,0).attr(`x`,c).attr(`y`,l).attr(`width`,o).attr(`height`,s),T(t,u),t.intersect=function(e){return G.rect(t,e)},i}e(bt,`text`);var xt=e((e,t,n,r,i,a)=>`M${e},${t}
3
3
  a${i},${a} 0,0,1 0,${-r}
4
4
  l${n},0
@@ -1,4 +1,4 @@
1
- import{n as e}from"./chunk-Y2CYZVJY-BAUBUeAF.js";function t(e){return e==null}e(t,`isNothing`);function n(e){return typeof e==`object`&&!!e}e(n,`isObject`);function r(e){return Array.isArray(e)?e:t(e)?[]:[e]}e(r,`toArray`);function i(e,t){var n,r,i,a;if(t)for(a=Object.keys(t),n=0,r=a.length;n<r;n+=1)i=a[n],e[i]=t[i];return e}e(i,`extend`);function a(e,t){var n=``,r;for(r=0;r<t;r+=1)n+=e;return n}e(a,`repeat`);function o(e){return e===0&&1/e==-1/0}e(o,`isNegativeZero`);var s={isNothing:t,isObject:n,toArray:r,repeat:a,isNegativeZero:o,extend:i};function c(e,t){var n=``,r=e.reason||`(unknown reason)`;return e.mark?(e.mark.name&&(n+=`in "`+e.mark.name+`" `),n+=`(`+(e.mark.line+1)+`:`+(e.mark.column+1)+`)`,!t&&e.mark.snippet&&(n+=`
1
+ import{n as e}from"./chunk-Y2CYZVJY-CP7lNZai.js";function t(e){return e==null}e(t,`isNothing`);function n(e){return typeof e==`object`&&!!e}e(n,`isObject`);function r(e){return Array.isArray(e)?e:t(e)?[]:[e]}e(r,`toArray`);function i(e,t){var n,r,i,a;if(t)for(a=Object.keys(t),n=0,r=a.length;n<r;n+=1)i=a[n],e[i]=t[i];return e}e(i,`extend`);function a(e,t){var n=``,r;for(r=0;r<t;r+=1)n+=e;return n}e(a,`repeat`);function o(e){return e===0&&1/e==-1/0}e(o,`isNegativeZero`);var s={isNothing:t,isObject:n,toArray:r,repeat:a,isNegativeZero:o,extend:i};function c(e,t){var n=``,r=e.reason||`(unknown reason)`;return e.mark?(e.mark.name&&(n+=`in "`+e.mark.name+`" `),n+=`(`+(e.mark.line+1)+`:`+(e.mark.column+1)+`)`,!t&&e.mark.snippet&&(n+=`
2
2
 
3
3
  `+e.mark.snippet),r+` `+n):r}e(c,`formatError`);function l(e,t){Error.call(this),this.name=`YAMLException`,this.reason=e,this.mark=t,this.message=c(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error().stack||``}e(l,`YAMLException$1`),l.prototype=Object.create(Error.prototype),l.prototype.constructor=l,l.prototype.toString=e(function(e){return this.name+`: `+c(this,e)},`toString`);var u=l;function d(e,t,n,r,i){var a=``,o=``,s=Math.floor(i/2)-1;return r-t>s&&(a=` ... `,t=r-s+a.length),n-r>s&&(o=` ...`,n=r+s-o.length),{str:a+e.slice(t,n).replace(/\t/g,`→`)+o,pos:r-t+a.length}}e(d,`getLine`);function f(e,t){return s.repeat(` `,t-e.length)+e}e(f,`padStart`);function p(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||=79,typeof t.indent!=`number`&&(t.indent=1),typeof t.linesBefore!=`number`&&(t.linesBefore=3),typeof t.linesAfter!=`number`&&(t.linesAfter=2);for(var n=/\r?\n|\r|\0/g,r=[0],i=[],a,o=-1;a=n.exec(e.buffer);)i.push(a.index),r.push(a.index+a[0].length),e.position<=a.index&&o<0&&(o=r.length-2);o<0&&(o=r.length-1);var c=``,l,u,p=Math.min(e.line+t.linesAfter,i.length).toString().length,m=t.maxLength-(t.indent+p+3);for(l=1;l<=t.linesBefore&&!(o-l<0);l++)u=d(e.buffer,r[o-l],i[o-l],e.position-(r[o]-r[o-l]),m),c=s.repeat(` `,t.indent)+f((e.line-l+1).toString(),p)+` | `+u.str+`
4
4
  `+c;for(u=d(e.buffer,r[o],i[o],e.position,m),c+=s.repeat(` `,t.indent)+f((e.line+1).toString(),p)+` | `+u.str+`
@@ -0,0 +1 @@
1
+ import{n as e}from"./chunk-Y2CYZVJY-CP7lNZai.js";import"./src-CaBa9Z1L.js";import"./chunk-WYO6CB5R-C-c-Ja6D.js";import"./chunk-ICXQ74PX-BUnmDgqa.js";import"./chunk-HOUHSVGY-D0096-9K.js";import"./chunk-Q4XR5HBZ-CjNiHUWo.js";import"./chunk-7BUUIJ7U-Dw__VSpN.js";import"./chunk-OGEWGWER-DLH_3q-Z.js";import"./chunk-32BRIVSS-DqkgLIEw.js";import"./chunk-XXDRQBXY-BjAUTr8E.js";import"./chunk-VR4S4FIN-CnZ3Jw81.js";import"./chunk-C7G6YPKG-CmP7ozUj.js";import"./chunk-ZGVPDNZ5-DfBSa8vW.js";import"./chunk-52WLFC77-9s8UsQXp.js";import"./chunk-FWX5IMBZ-rnR9hrS_.js";import{i as t,n,r,t as i}from"./chunk-V7JOEXUC-CLdet7qK.js";var a={parser:n,get db(){return new i},renderer:r,styles:t,init:e(e=>{e.class||={},e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram};
@@ -0,0 +1 @@
1
+ import{n as e}from"./chunk-Y2CYZVJY-CP7lNZai.js";import"./src-CaBa9Z1L.js";import"./chunk-WYO6CB5R-C-c-Ja6D.js";import"./chunk-ICXQ74PX-BUnmDgqa.js";import"./chunk-HOUHSVGY-D0096-9K.js";import"./chunk-Q4XR5HBZ-CjNiHUWo.js";import"./chunk-7BUUIJ7U-Dw__VSpN.js";import"./chunk-OGEWGWER-DLH_3q-Z.js";import"./chunk-32BRIVSS-DqkgLIEw.js";import"./chunk-XXDRQBXY-BjAUTr8E.js";import"./chunk-VR4S4FIN-CnZ3Jw81.js";import"./chunk-C7G6YPKG-CmP7ozUj.js";import"./chunk-ZGVPDNZ5-DfBSa8vW.js";import"./chunk-52WLFC77-9s8UsQXp.js";import"./chunk-FWX5IMBZ-rnR9hrS_.js";import{i as t,n,r,t as i}from"./chunk-V7JOEXUC-CLdet7qK.js";var a={parser:n,get db(){return new i},renderer:r,styles:t,init:e(e=>{e.class||={},e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram};
@@ -1 +1 @@
1
- import{_n as e,gn as t}from"./dist-Dhbvx6Ut.js";var n={BASE_URL:`./`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_APP_VERSION:`0.45.0`}?.VITE_APP_VERSION??`0.0.0-unknown`;function r(){return t({kind:`web`,runtimeVersion:n})}function i(){return e({kind:`web`,runtimeVersion:n})}export{r as n,i as r,n as t};
1
+ import{Sn as e,xn as t}from"./dist-DJbbCXtB.js";var n={BASE_URL:`./`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_APP_VERSION:`0.45.0`}?.VITE_APP_VERSION??`0.0.0-unknown`;function r(){return t({kind:`web`,runtimeVersion:n})}function i(){return e({kind:`web`,runtimeVersion:n})}export{r as n,i as r,n as t};
@@ -0,0 +1,7 @@
1
+ import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{Kt as n,Wt as r}from"./DocumentContext-uE-Jpe8-.js";import{t as i}from"./react-f2sANaYj.js";import{n as a,r as o}from"./dist-Nvb76hAm.js";import{t as s}from"./compiler-runtime-BfE3aGVn.js";import{l as c}from"./terminal-input-events-C5UuEsAB.js";import{s as l,t as u}from"./createLucideIcon-DAkhoPjT.js";import{t as d}from"./button-Gol9BgNB.js";import{E as f,ct as p}from"./CodeMirrorPropInput-DOcEkWLX.js";import{t as m}from"./checkbox-BkZH9Oy1.js";import{Ct as h,D as g,E as _,N as v,Qn as y,wt as b,xt as x}from"./dist-DJbbCXtB.js";import{t as ee}from"./chevron-down-Bx9f3tW-.js";import{t as te}from"./x-Du5jsNHa.js";import{n as S}from"./dist-B8I5m7M1.js";import{t as C}from"./dist-BCZq3DKc.js";import{c as w}from"./documents-events-C-mYs64z.js";import{s as T}from"./doc-hash-BbU2eA08.js";var ne=u(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]),re=u(`unlink`,[[`path`,{d:`m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71`,key:`yqzxt4`}],[`path`,{d:`m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71`,key:`4qinb0`}],[`line`,{x1:`8`,x2:`8`,y1:`2`,y2:`5`,key:`1041cp`}],[`line`,{x1:`2`,x2:`5`,y1:`8`,y2:`8`,key:`14m1p5`}],[`line`,{x1:`16`,x2:`16`,y1:`19`,y2:`22`,key:`rzdirn`}],[`line`,{x1:`19`,x2:`22`,y1:`16`,y2:`16`,key:`ox905f`}]]),E=s(),D=`open-knowledge:doc-panel-tab`,ie=null;function ae(){let e=ie;return ie=null,e}function O(e,t=typeof window>`u`?new EventTarget:window){ie=e,t.dispatchEvent(new CustomEvent(D,{detail:{tab:e}}))}function oe(e,t=typeof window>`u`?new EventTarget:window){let n=t=>{let n=t instanceof CustomEvent?t.detail?.tab:void 0;n&&e(n)};return t.addEventListener(D,n),()=>t.removeEventListener(D,n)}var se=`245,158,11`,ce=se,le={fill:.22,line:.7},ue={fill:.45,line:1},de=.45;function fe(e,t){let n=ce,{fill:r,line:i}=t?ue:le;return[`border-radius:2px`,`padding-bottom:1px`,...e.id===null?[]:[`cursor:pointer`],`background-color:rgba(${n},${r})`,`box-shadow:inset 0 -2px 0 rgba(${n},${i})`,``].join(`;`)}function pe(e){return e.map(e=>e.id??`·`).join(`|`)}function me(e){let t=null;for(let n of e)n.id!==null&&(t===null||n.to-n.from<t.to-t.from)&&(t=n);return t?.id??null}function he(e,t){return e.id===null||e.id===t}function ge(e,t=null){let n=[...e].filter(e=>e.from<e.to).sort((e,t)=>e.from-t.from||e.to-t.to||(e.id??``).localeCompare(t.id??``));if(n.length===0)return[];let r=[...new Set(n.flatMap(e=>[e.from,e.to]))].sort((e,t)=>e-t),i=[],a=null,o=()=>{if(a===null)return;let e=a.covering.find(e=>he(e,t));i.push({from:a.from,to:a.to,style:fe(e??a.covering[0],e!==void 0),threadId:me(a.covering)}),a=null};for(let e=0;e<r.length-1;e++){let t=r[e],i=r[e+1],s=n.filter(e=>e.from<=t&&e.to>=i);if(s.length===0){o();continue}if(a!==null&&a.to===t&&pe(a.covering)===pe(s)){a.to=i;continue}o(),a={from:t,to:i,covering:s}}return o(),i}var _e=`data-comment-reveal`;function ve(e){return typeof CSS<`u`&&CSS.escape?CSS.escape(e):e}function ye(e){return e===``?null:document.querySelector(`[data-testid="property-row"][data-key="${ve(e)}"]`)}function be(e){let t=ye(e);if(t===null)return null;let n=t.getBoundingClientRect();return n.height===0&&n.width===0?null:n}function xe(e){ye(e)?.scrollIntoView({block:`center`,behavior:`smooth`})}function Se(e){if(e.quote===``)return!1;let t=e.path.length===0?e.key:e.path[e.path.length-1],n=Array.from(document.querySelectorAll(`[data-testid="property-row"][data-key="${ve(String(t))}"]`)),r=Array.from(document.querySelectorAll(`[data-testid="property-row"]`));for(let t of[...n,...r]){let n=t.querySelector(`textarea, input`);if(n===null)continue;let r=Ce(n.value,e.quote,e.start,e.end);if(r!==null)return t.scrollIntoView({block:`center`,behavior:`smooth`}),n.focus(),n.setSelectionRange(r.start,r.end),we(n),!0}return!1}function Ce(e,t,n,r){if(n!==void 0&&r!==void 0&&e.slice(n,r)===t)return{start:n,end:r};let i=e.indexOf(t);return i<0?null:{start:i,end:i+t.length}}function we(e){e.style.setProperty(`--comment-reveal-fill`,`rgba(${se},${de})`),e.setAttribute(_e,`true`);let t=()=>{e.removeAttribute(_e),e.style.removeProperty(`--comment-reveal-fill`)};e.addEventListener(`blur`,t,{once:!0}),e.addEventListener(`pointerdown`,t,{once:!0}),e.addEventListener(`keydown`,t,{once:!0})}function Te(e){let t=``,n=[];return e.descendants((e,r)=>{if(e.isText&&e.text)for(let i=0;i<e.text.length;i++)t+=e.text[i],n.push(r+i);return!0}),{text:t,positions:n}}function Ee(e,t){let n=[];if(t===``)return n;let r=e.indexOf(t);for(;r!==-1;)n.push(r),r=e.indexOf(t,r+1);return n}function De(e,t){let n=Math.min(e.length,t.length),r=0;for(;r<n&&e[e.length-1-r]===t[t.length-1-r];)r+=1;return r}function Oe(e,t){let n=Math.min(e.length,t.length),r=0;for(;r<n&&e[r]===t[r];)r+=1;return r}var ke=4,Ae=64;function je(e,t,n){let r=n?.prefix??``,i=n?.suffix??``;if(r===``&&i===``)return null;let a=r===``?[0]:y(e,r,{syntaxIn:`needle`}).map(e=>e.end),o=i===``?[e.length]:y(e,i,{syntaxIn:`needle`}).map(e=>e.start);if(a.length!==1||o.length!==1)return null;let s=a[0],c=o[0];for(;s<c&&/\s/.test(e[s]??``);)s+=1;for(;c>s&&/\s/.test(e[c-1]??``);)--c;if(c<=s)return null;let l=Math.max(t.length*ke,t.length+Ae);return c-s>l?null:{start:s,end:c}}function k(e,t){let n=e.positions[t.start],r=e.positions[t.end-1];return n==null||r==null?null:{from:n,to:r+1}}function Me(e,t,n){if(t.length===0)return null;let r=Ee(e.text,t).map(e=>({start:e,end:e+t.length}));if(r.length===0&&(r=y(e.text,t,{syntaxIn:`needle`})),r.length===0){let r=je(e.text,t,n);return r===null?null:k(e,r)}if(r.length===1)return k(e,r[0]);let i=n?.prefix??``,a=n?.suffix??``,o=[],s=-1;for(let t of r){let n=De(i,e.text.slice(0,t.start))+Oe(a,e.text.slice(t.end));n>s?(s=n,o=[t]):n===s&&o.push(t)}if(o.length===1)return k(e,o[0]);let c=n?.start;if(c===void 0)return k(e,o[0]);let l=o[0],u=1/0;for(let e of o){let t=Math.abs(e.start-c);t<u&&(u=t,l=e)}return k(e,l)}var Ne=64;function Pe(e,t,n){return{prefix:e.textBetween(Math.max(0,t-Ne),t,`
2
+ `),suffix:e.textBetween(n,Math.min(e.content.size,n+Ne),`
3
+ `)}}function Fe(e,t,n){return Me(Te(e),t,n)}var Ie=220,Le=24;function Re(e){let t=e.viewTop+e.insetTop,n=e.viewBottom-Ie;return e.anchorTop>=t&&e.anchorBottom<=n?0:e.anchorTop-(t+Le)}function ze(e){let t=e?.parentElement??null;for(;t;){let e=getComputedStyle(t).overflowY;if(e===`auto`||e===`scroll`)return t;t=t.parentElement}return null}function Be(e){let t=Number.parseFloat(getComputedStyle(e).scrollPaddingTop);return Number.isFinite(t)?t:0}function Ve(e,t){let n=f(e);if(!n)return;let r=ze(n.dom);if(!r){e.commands.scrollIntoView();return}let i,a;try{i=n.coordsAtPos(t.from),a=n.coordsAtPos(t.to)}catch{return}let o=r.getBoundingClientRect(),s=Re({anchorTop:i.top,anchorBottom:Math.max(i.bottom,a.bottom),viewTop:o.top,viewBottom:o.bottom,insetTop:Be(r)});if(s===0)return;let c=window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches;r.scrollTo({top:r.scrollTop+s,behavior:c?`auto`:`smooth`})}var He=e(i(),1);async function A(e,t){let n=await fetch(e,{...t,headers:{"content-type":`application/json`,...t?.headers}}),r=await n.json().catch(()=>null);if(!n.ok){let e=h.safeParse(r);throw Error(e.success?e.data.title??e.data.detail:`comments request failed (${n.status})`)}return r}function j(e){return A(`/api/comment`,{method:`POST`,body:JSON.stringify(e)})}function M(e,t){let n=e.safeParse(t);if(!n.success)throw Error(`The server returned a response this build cannot read.`);return n.data}function N(e){let t=_.safeParse(e);if(!t.success)throw Error(`The server returned a comment thread this build cannot read.`);return t.data}function Ue(e){let t=[];for(let n of e){let e=_.safeParse(n);e.success?t.push(e.data):console.warn(`[comments] skipped a thread this build cannot read`,e.error.issues)}return t}async function We(e){let{threads:t}=await A(e===void 0?`/api/comments`:`/api/comments?doc=${encodeURIComponent(e)}`);return Ue(t)}function Ge(e){return A(`/api/comments`,{method:`POST`,body:JSON.stringify(e)}).then(N)}function Ke(e,t){return j({action:`edit`,id:e,body:t}).then(N)}function qe(e){return j({action:`resolve`,id:e}).then(N)}function Je(e){return j({action:`reopen`,id:e}).then(N)}function Ye(e,t){return j({action:`replace`,id:e,...t}).then(N)}function Xe(e){return j({action:`queue`,id:e}).then(e=>M(b,e))}function Ze(e){return j({action:`unqueue`,id:e}).then(N)}function Qe(e){return A(`/api/comment?id=${encodeURIComponent(e)}`,{method:`DELETE`}).then(e=>M(v,e))}function $e(e){return j({action:`dispatch-prepare-batch`,ids:e}).then(e=>M(x,e))}function et(e){return j({action:`dispatch-complete-batch`,ids:e}).then(e=>M(g,e))}var tt=`open-knowledge:comments-queue-scope`,nt=typeof window>`u`?new EventTarget:window,P=!1;function rt(){let e=P;return P=!1,e}function it(e){let t=()=>{P=!1,e()};return nt.addEventListener(tt,t),()=>nt.removeEventListener(tt,t)}function at(){P=!0,O(`comments`),nt.dispatchEvent(new Event(tt))}var ot=Object.freeze([]),F=Object.freeze([]),I=new Map,L=[],R=new Set,z=new Set,B=!1,V=new Set,H=0,st=0;function ct(){for(let e of R)e()}function lt(){H+=1,ct()}function U(){st+=1,ct()}function ut(e){return{id:e.threadId,docName:e.docName,target:e.target,anchor:e.anchor===null?null:{quote:e.anchor.exact,prefix:e.anchor.prefix,suffix:e.anchor.suffix,start:e.anchor.start,end:e.anchor.end},status:e.state===`anchored`?`open`:e.state,body:e.latestComment,createdAt:e.createdAt,queued:e.queued}}async function dt(){return(await We()).map(ut).sort((e,t)=>t.createdAt-e.createdAt)}async function W(e){e!==void 0&&z.add(e);let t=await dt();L=t,B=!0;for(let e of z)I.set(e,t.filter(t=>t.docName===e));lt()}var ft=!1;function pt(){ft||typeof window>`u`||(ft=!0,w(e=>{e.includes(`comments`)&&W().catch(()=>void 0)}))}function mt(e){pt(),!z.has(e)&&(z.add(e),W(e).catch(()=>{z.delete(e)}))}function ht(){pt(),!B&&(B=!0,W().catch(()=>{B=!1}))}function gt(e){return mt(e),I.get(e)??ot}function G(e){return R.add(e),()=>{R.delete(e)}}function _t(e){let t=(0,E.c)(2),n;return t[0]===e?n=t[1]:(n=()=>gt(e),t[0]=e,t[1]=n),(0,He.useSyncExternalStore)(G,n,vt)}function vt(){return ot}function K(e){for(let t of I.values()){let n=t.find(t=>t.id===e);if(n)return n}return L.find(t=>t.id===e)??null}function yt(e){Ge({docName:e.docName,quote:e.quote,prefix:e.prefix,suffix:e.suffix,body:e.body,queue:!0}).then(t=>{if(W(e.docName).catch(()=>void 0),e.onCreated!==void 0){e.onCreated(t.threadId);return}at(),cn()}).catch(e=>{S.error(e instanceof Error&&e.message?C._({id:`q3W2nd`,values:{0:e.message}}):C._({id:`SRBk2G`}))})}function bt(e){Ge({docName:e.docName,propertyKey:e.propertyKey,propertyPath:e.propertyPath,quote:e.quote,body:e.body,queue:!0}).then(()=>{W(e.docName).catch(()=>void 0),at(),cn()}).catch(e=>{S.error(e instanceof Error&&e.message?C._({id:`q3W2nd`,values:{0:e.message}}):C._({id:`SRBk2G`}))})}function q(e,t,n){e.then(()=>W(t)).catch(e=>{S.error(e instanceof Error&&e.message?`${n} ${e.message}`:n),W(t).catch(()=>void 0)})}function xt(e,t){let n=K(e)?.docName;q(Ke(e,t),n,C._({id:`kzpkcn`}))}function St(e){let t=K(e)?.docName;q(qe(e),t,C._({id:`eoEUI3`}))}function Ct(e){let t=K(e)?.docName;q(Je(e),t,C._({id:`lISYEX`}))}function wt(e){let t=K(e)?.docName;q(Qe(e),t,C._({id:`IxHMdF`}))}function Tt(e,t,n){let r=K(e)?.docName;q(Ye(e,{quote:t,prefix:n?.prefix,suffix:n?.suffix}),r,C._({id:`mlvM8g`}))}var Et=F,Dt=-1,Ot=F,kt=-1,At=-1;function J(){if(ht(),Dt!==H){let e=L.filter(e=>e.queued&&e.status!==`resolved`).sort((e,t)=>e.createdAt-t.createdAt).map(e=>e.id);Et=e.length===0?F:e,Dt=H}return Et}function jt(){return(0,He.useSyncExternalStore)(G,J,Mt)}function Mt(){return F}function Nt(){let e=J();if(kt!==H||At!==st){let t=e.filter(e=>!V.has(e));Ot=t.length===0?F:t,kt=H,At=st}return Ot}function Pt(){return(0,He.useSyncExternalStore)(G,Nt,Ft)}function Ft(){return F}function It(e){return J().includes(e)}function Lt(e){let t=K(e)?.docName;if(V.has(e)){let t=new Set(V);t.delete(e),V=t,U()}q(Xe(e),t,C._({id:`Hhe73G`}))}function Rt(e){let t=K(e)?.docName;q(Ze(e),t,C._({id:`os6dRM`}))}function zt(e){It(e)?Rt(e):Lt(e)}function Bt(){V.size!==0&&(V=new Set,U())}function Vt(e){let t=new Set(V);t.has(e)?t.delete(e):t.add(e),V=t,U()}function Ht(){let e=J();e.length!==0&&Promise.all(e.map(e=>Ze(e).then(()=>!0).catch(()=>!1))).then(t=>{let n=t.filter(e=>!e).length;n>0&&S.error(C._({id:`4_5_n5`,values:{0:e.length,failed:n}})),W().catch(()=>void 0)})}var Ut=!1;async function Wt({compose:e,threadIds:t,resolve:n=!0}){let r=t??Nt();if(r.length===0||Ut)return[];Ut=!0;try{return await Gt(r,e,n)}finally{Ut=!1}}async function Gt(e,t,n){let r;try{r=await $e(e)}catch(e){return S.error(e instanceof Error&&e.message?C._({id:`VIiaFH`,values:{0:e.message}}):C._({id:`LvoXJX`})),[]}lt();let i=r.results.flatMap(e=>e.ok?[{threadId:e.threadId,payload:e.payload}]:[]);if(i.length===0)return await W().catch(()=>void 0),[];let a=!1;try{a=await t(i)}catch{a=!1}let o=a?i.map(e=>e.threadId):[];return o.length>0&&n&&await et(o).catch(()=>{S.error(C._({id:`siXSpl`}))}),await W().catch(()=>void 0),o}var Kt=`ok:comment-focus-thread`,qt=`ok:comment-open-popover`,Y=`ok:comment-start`,Jt=`ok:comment-posted`,X=typeof window>`u`?new EventTarget:window;function Yt(e){X.dispatchEvent(new CustomEvent(Kt,{detail:e}))}function Xt(e){let t=t=>e(t.detail);return X.addEventListener(Kt,t),()=>X.removeEventListener(Kt,t)}var Zt=null,Z=null,Qt=null,$t=new Set;function en(){let e=Z??Zt;if(e!==Qt){Qt=e;for(let e of $t)e()}}function tn(){return Qt}function nn(e){Z=e,en()}function rn(e){Z===e&&(Z=null,en())}function an(e){return $t.add(e),()=>{$t.delete(e)}}function on(e){Zt=e,en(),X.dispatchEvent(new CustomEvent(qt,{detail:e}))}function sn(e){let t=t=>e(t.detail);return X.addEventListener(qt,t),()=>X.removeEventListener(qt,t)}function cn(){X.dispatchEvent(new CustomEvent(Jt))}function ln(e){let t=()=>e();return X.addEventListener(Jt,t),()=>X.removeEventListener(Jt,t)}function un(){X.dispatchEvent(new CustomEvent(Y))}function dn(e){let t=()=>e();return X.addEventListener(Y,t),()=>X.removeEventListener(Y,t)}var fn=1e4;function pn(e){let t=()=>{let t=r(e.docName);if(!t||t.isDestroyed)return!1;let n=Fe(t.state.doc,e.quote,e.context);return n&&(t.chain().focus().setTextSelection(n).run(),Ve(t,n)),Yt(e.threadId),!0};if(O(`comments`),t())return;window.location.assign(T(e.docName));let i=!1,a=()=>{i||(i=!0,o(),window.clearTimeout(s))},o=n(()=>{t()&&a()}),s=window.setTimeout(a,fn);t()&&a()}var Q=t();function mn(){let e=(0,E.c)(2),t=jt(),n;if(e[0]!==t){n=[];for(let e of t){let t=K(e);t!==null&&n.push(t)}e[0]=t,e[1]=n}else n=e[1];return n}function hn(){return Pt().length}function gn(e){let t=(0,E.c)(34),{count:n,attached:r,expanded:i,onAttach:s,onToggleExpanded:u,onDismiss:f}=e,{_:p}=o();if(n===0)return null;if(!r){let e;t[0]===p?e=t[1]:(e=p({id:`8ycqHY`}),t[0]=p,t[1]=e);let n,r,i;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(n=l(`h-auto min-h-0 gap-1 rounded-md border border-dashed bg-transparent px-1.5 py-0.5`,`text-xs font-normal text-muted-foreground hover:bg-muted/60 hover:text-foreground`),r=(0,Q.jsx)(c,{className:`size-3`}),i=(0,Q.jsx)(a,{id:`b24kPi`}),t[2]=n,t[3]=r,t[4]=i):(n=t[2],r=t[3],i=t[4]);let o;return t[5]!==s||t[6]!==e?(o=(0,Q.jsxs)(d,{type:`button`,size:`sm`,variant:`ghost`,"aria-pressed":!1,"aria-label":e,onClick:s,"data-testid":`composer-context-chip-comments`,className:n,children:[r,i]}),t[5]=s,t[6]=e,t[7]=o):o=t[7],o}let m;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(m=l(`inline-flex items-center gap-1 rounded-md border bg-muted/60 py-0.5 pr-0.5 pl-1.5`,`text-xs text-muted-foreground`),t[8]=m):m=t[8];let h;t[9]!==p||t[10]!==i?(h=p(i?{id:`HFqQui`}:{id:`qokN44`}),t[9]=p,t[10]=i,t[11]=h):h=t[11];let g;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,Q.jsx)(ne,{className:`size-3`}),t[12]=g):g=t[12];let _;t[13]===n?_=t[14]:(_=(0,Q.jsx)(a,{id:`eiUA4k`,values:{count:n}}),t[13]=n,t[14]=_);let v=i&&`rotate-180`,y;t[15]===v?y=t[16]:(y=l(`size-3 transition-transform`,v),t[15]=v,t[16]=y);let b;t[17]===y?b=t[18]:(b=(0,Q.jsx)(ee,{className:y}),t[17]=y,t[18]=b);let x;t[19]!==i||t[20]!==u||t[21]!==h||t[22]!==_||t[23]!==b?(x=(0,Q.jsxs)(d,{type:`button`,size:`sm`,variant:`ghost`,"aria-expanded":i,"aria-label":h,onClick:u,"data-testid":`composer-comments-peek`,className:`h-auto min-h-0 gap-1 px-0.5 py-0 text-xs font-normal text-muted-foreground hover:text-foreground`,children:[g,_,b]}),t[19]=i,t[20]=u,t[21]=h,t[22]=_,t[23]=b,t[24]=x):x=t[24];let S;t[25]===p?S=t[26]:(S=p({id:`pFRz_E`}),t[25]=p,t[26]=S);let C;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,Q.jsx)(te,{className:`size-3`}),t[27]=C):C=t[27];let w;t[28]!==f||t[29]!==S?(w=(0,Q.jsx)(d,{type:`button`,size:`sm`,variant:`ghost`,"aria-label":S,onClick:f,className:`size-4 p-0 text-muted-foreground hover:text-foreground`,children:C}),t[28]=f,t[29]=S,t[30]=w):w=t[30];let T;return t[31]!==w||t[32]!==x?(T=(0,Q.jsxs)(`span`,{"data-testid":`composer-context-chip-comments`,className:m,children:[x,w]}),t[31]=w,t[32]=x,t[33]=T):T=t[33],T}function _n(e){let t=e.lastIndexOf(`/`);return t>=0?e.slice(t+1):e}function vn(e,t){let n=e;for(let e of t)n+=typeof e==`number`?`[${e}]`:`.${e}`;return n}function yn(e){let t=(0,E.c)(14),{thread:n,className:r}=e,i=n.anchor?.quote??``;if(n.target.kind===`property`){let e;t[0]!==n.target.key||t[1]!==n.target.path?(e=vn(n.target.key,n.target.path),t[0]=n.target.key,t[1]=n.target.path,t[2]=e):e=t[2];let a=e,o;t[3]===r?o=t[4]:(o=l(`w-full truncate font-mono text-[11px] text-muted-foreground`,r),t[3]=r,t[4]=o);let s=i===``?``:` “${i}”`,c;return t[5]!==a||t[6]!==o||t[7]!==s?(c=(0,Q.jsxs)(`span`,{className:o,children:[a,`:`,s]}),t[5]=a,t[6]=o,t[7]=s,t[8]=c):c=t[8],c}let a;t[9]===r?a=t[10]:(a=l(`w-full truncate font-mono text-[11px] text-muted-foreground`,r),t[9]=r,t[10]=a);let o;return t[11]!==i||t[12]!==a?(o=(0,Q.jsxs)(`span`,{className:a,children:[`“`,i,`”`]}),t[11]=i,t[12]=a,t[13]=o):o=t[13],o}function bn(e){pn({docName:e.docName,quote:e.target.kind===`property`?``:e.anchor?.quote??``,threadId:e.id,context:e.anchor??void 0});let{target:t,anchor:n}=e;if(t.kind!==`property`||n===null)return;let r=0,i=()=>{Se({key:t.key,path:t.path,quote:n.quote,start:n.start,end:n.end})||(r+=1,!(r>=xn)&&requestAnimationFrame(i))};requestAnimationFrame(i)}var xn=30;function Sn(e){let t=(0,E.c)(9),{threads:n}=e,{_:r}=o(),i=Pt();if(n.length===0)return null;let s;if(t[0]!==r||t[1]!==i||t[2]!==n){let e;t[4]!==r||t[5]!==i?(e=e=>{let t=e.status===`orphaned`,n=i.includes(e.id);return(0,Q.jsxs)(`li`,{className:l(`flex items-start gap-2 rounded-md border bg-background/60 px-2 py-1.5`,!n&&`opacity-50`),children:[(0,Q.jsx)(m,{checked:n,onCheckedChange:()=>Vt(e.id),"aria-label":r({id:`Uoux8m`}),className:`mt-0.5`}),(0,Q.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-1`,children:[(0,Q.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,Q.jsxs)(`span`,{className:`inline-flex min-w-0 items-center gap-1 rounded border px-1 py-px text-[10px] text-muted-foreground`,title:e.docName,children:[(0,Q.jsx)(p,{className:`size-2.5 shrink-0`}),(0,Q.jsx)(`span`,{className:`truncate`,children:_n(e.docName)})]}),t&&(0,Q.jsxs)(`span`,{className:`inline-flex shrink-0 items-center gap-1 text-[10px] text-amber-600 dark:text-amber-500`,title:r({id:`MBe6TE`}),children:[(0,Q.jsx)(re,{className:`size-2.5`}),(0,Q.jsx)(a,{id:`2UgoBZ`})]})]}),(0,Q.jsxs)(d,{type:`button`,variant:`ghost`,"aria-label":r({id:`rscgd_`,values:{0:_n(e.docName)}}),onClick:()=>bn(e),className:`h-auto min-h-0 w-full min-w-0 flex-col items-start gap-1 px-0 py-0 text-left font-normal hover:bg-transparent`,children:[(0,Q.jsx)(yn,{thread:e}),(0,Q.jsx)(`span`,{className:`line-clamp-2 w-full text-xs whitespace-normal text-foreground/90`,children:e.body})]})]}),(0,Q.jsx)(d,{type:`button`,size:`sm`,variant:`ghost`,"aria-label":r({id:`YDX9lo`}),onClick:()=>Rt(e.id),className:`size-5 shrink-0 p-0 text-muted-foreground hover:text-foreground`,children:(0,Q.jsx)(te,{className:`size-3`})})]},e.id)},t[4]=r,t[5]=i,t[6]=e):e=t[6],s=n.map(e),t[0]=r,t[1]=i,t[2]=n,t[3]=s}else s=t[3];let c;return t[7]===s?c=t[8]:(c=(0,Q.jsx)(`ul`,{"data-testid":`composer-comments-list`,className:`mt-1 flex max-h-64 basis-full list-none flex-col gap-1 overflow-y-auto subtle-scrollbar`,children:s}),t[7]=s,t[8]=c),c}function Cn(e){return{docName:e.docName,body:e.instruction,propertyKey:e.property,quote:e.passage?.exact??``,anchorLost:e.anchorLost,prefix:e.passage?.prefix??``,suffix:e.passage?.suffix??``,repeats:e.passageRepeats}}var $=48;function wn(e){let t=e.replace(/\s+/g,` `).trimStart();return t.length>$?`…${t.slice(-$)}`:t}function Tn(e){let t=e.replace(/\s+/g,` `).trimEnd();return t.length>$?`${t.slice(0,$)}…`:t}function En(e){if(!e.repeats)return null;let t=wn(e.prefix),n=Tn(e.suffix);return t===``&&n===``?null:`(This text appears more than once in the file. The one meant is ${t===``?`at the start of the file, followed by "${n}"`:n===``?`at the end of the file, preceded by "${t}"`:`between "${t}" and "${n}"`} — match that context rather than the first occurrence.)`}function Dn(e,t,n){let r=t.trim(),i=[];if(i.push(r.length>0?r:`Address the following review comments by editing the documents directly.`),i.push(``),i.push(e.length===1?`The comment:`:`The ${e.length} comments:`),e.forEach((e,t)=>{if(i.push(``),e.propertyKey){let n=e.quote.trim();if(n===``)i.push(`${t+1}. In \`${e.docName}\`, on the \`${e.propertyKey}\` property (frontmatter):`),i.push(``),i.push(` ${e.body.trim()}`);else{i.push(`${t+1}. In \`${e.docName}\`, on this text within the \`${e.propertyKey}\` property (frontmatter):`),i.push(``);for(let e of n.split(`
4
+ `))i.push(` > ${e}`);i.push(``),i.push(` ${e.body.trim()}`)}e.anchorLost&&(i.push(``),i.push(n===``?` (Note: \`${e.propertyKey}\` is no longer in this document's frontmatter — it was renamed or removed since the comment was written. Do not apply this to a different property; if you cannot tell what it now refers to, say so instead of guessing.)`:` (Note: that text is no longer in \`${e.propertyKey}\` — the value was edited, reshaped, or removed since the comment was written. Do not apply this to a different property or a different part of the value; if you cannot tell what it now refers to, say so instead of guessing.)`));return}i.push(`${t+1}. In \`${e.docName}\`, on this passage:`),i.push(``);for(let t of e.quote.split(`
5
+ `))i.push(` > ${t}`);i.push(``),i.push(` ${e.body.trim()}`);let n=En(e);n!==null&&(i.push(``),i.push(` ${n}`)),e.anchorLost&&(i.push(``),i.push(` (Note: this passage is no longer in the document — it was edited or removed since the comment was written. Do not apply this to a different passage; if you cannot tell what it now refers to, say so instead of guessing.)`))}),n&&n.markdown.trim().length>0){i.push(``),i.push(`Also in scope, selected in \`${n.docName}\` (not a comment):`),i.push(``);for(let e of n.markdown.trim().split(`
6
+ `))i.push(`> ${e}`)}return i.join(`
7
+ `)}export{xe as $,nn as A,jt as B,gt as C,Tt as D,Ct as E,sn as F,ze as G,rt as H,dn as I,Pe as J,Ve as K,zt as L,an as M,ln as N,St as O,Xt as P,Se as Q,Vt as R,K as S,Rt as T,it as U,Pt as V,$e as W,Me as X,Fe as Y,be as Z,xt as _,_n as a,ne as at,tn as b,Cn as c,rn as d,ge as et,Ht as f,Wt as g,wt as h,Dn as i,re as it,G as j,Bt as k,mn as l,yt as m,Sn as n,O as nt,vn as o,bt as p,Te as q,yn as r,oe as rt,bn as s,gn as t,ae as tt,hn as u,on as v,W as w,Nt as x,un as y,_t as z};