@pikku/cli 0.12.111 → 0.12.112

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 (218) hide show
  1. package/CHANGELOG.md +151 -0
  2. package/console-app/assets/{abnfDiagram-N423BO3Z-Bz2Ycfpe.js → abnfDiagram-N423BO3Z-Bltf5dmS.js} +1 -1
  3. package/console-app/assets/architecture-TIHT7OUA-DgRqRaqo.js +1 -0
  4. package/console-app/assets/{architectureDiagram-T3A2C74G-CvAkxhy0.js → architectureDiagram-T3A2C74G-BTtx6R7-.js} +1 -1
  5. package/console-app/assets/{blockDiagram-VBNYF7ZC-CuVOo2PB.js → blockDiagram-VBNYF7ZC-DgeTIOaM.js} +1 -1
  6. package/console-app/assets/{c4Diagram-5PPSVZJV-4Vg8SxCa.js → c4Diagram-5PPSVZJV-CaswnNob.js} +1 -1
  7. package/console-app/assets/channel-37lNznWk.js +1 -0
  8. package/console-app/assets/{chunk-2GRJ4B5K-CKKR4_dC.js → chunk-2GRJ4B5K-OnpnkpQT.js} +1 -1
  9. package/console-app/assets/{chunk-4I5QYGJK-C-m_kVjm.js → chunk-4I5QYGJK-CWmfNXFr.js} +1 -1
  10. package/console-app/assets/{chunk-5RXB4S5H-CyUGtd0h.js → chunk-5RXB4S5H-M8QmKeuk.js} +1 -1
  11. package/console-app/assets/{chunk-6Q2QTUOP-BuzItInf.js → chunk-6Q2QTUOP-C_h5lS68.js} +1 -1
  12. package/console-app/assets/{chunk-7Z6QIM7H-BGiBPuWt.js → chunk-7Z6QIM7H-DSnVb09k.js} +1 -1
  13. package/console-app/assets/{chunk-GF5L2VYU-D8jaliB9.js → chunk-GF5L2VYU-BkX038sq.js} +1 -1
  14. package/console-app/assets/{chunk-I66GZJ75-C-Lq_UXl.js → chunk-I66GZJ75-b3yMIljX.js} +1 -1
  15. package/console-app/assets/{chunk-JQJVKLGR-D7viK-tf.js → chunk-JQJVKLGR-Bihcz4nv.js} +1 -1
  16. package/console-app/assets/{chunk-KBJHAD2P-BS9N9gG4.js → chunk-KBJHAD2P-CS7eflbk.js} +1 -1
  17. package/console-app/assets/{chunk-NSK5VX7P-Fi_H0vaS.js → chunk-NSK5VX7P-CfigFGDQ.js} +1 -1
  18. package/console-app/assets/{chunk-QR6OTTB3-BJdg-tcL.js → chunk-QR6OTTB3-BBy8NfTW.js} +1 -1
  19. package/console-app/assets/{chunk-RYQCIY6F-CVbGA6YZ.js → chunk-RYQCIY6F-BCfZVQef.js} +1 -1
  20. package/console-app/assets/{chunk-UBXNYLIW-BF-sAqEK.js → chunk-UBXNYLIW-DkMKDHW4.js} +1 -1
  21. package/console-app/assets/{chunk-W5SLKNZC-CXrJJ0BX.js → chunk-W5SLKNZC-BSLytTSJ.js} +1 -1
  22. package/console-app/assets/{chunk-WRU74C26-CGzysGBy.js → chunk-WRU74C26-Dic7ZP8H.js} +1 -1
  23. package/console-app/assets/chunk-XXDRQBXY-B1prMCvW.js +1 -0
  24. package/console-app/assets/classDiagram-JCYQIIEL-BDCX9ZLm.js +1 -0
  25. package/console-app/assets/classDiagram-v2-OCEON4UE-BDCX9ZLm.js +1 -0
  26. package/console-app/assets/{cose-bilkent-JH36ORCC-BvFZIDHb.js → cose-bilkent-JH36ORCC-CEpWcE3M.js} +1 -1
  27. package/console-app/assets/{cynefin-VYW2F7L2-DRQ8xGmN.js → cynefin-VYW2F7L2-irPiPhgz.js} +1 -1
  28. package/console-app/assets/{cynefinDiagram-MW4NZA55-BwxQ4C1z.js → cynefinDiagram-MW4NZA55-CIkqQ912.js} +1 -1
  29. package/console-app/assets/{dagre-J22zmNeE.js → dagre-FZyyw3H3.js} +1 -1
  30. package/console-app/assets/{dagre-VZM6K2ZE-DPtUyvjD.js → dagre-VZM6K2ZE-Dxnnu7Rh.js} +1 -1
  31. package/console-app/assets/{diagram-7IWD3JNH-DGAzJ2Ln.js → diagram-7IWD3JNH-DaT47sVs.js} +1 -1
  32. package/console-app/assets/{diagram-B4RE2ZJO-D14cIfto.js → diagram-B4RE2ZJO-Dmht03tx.js} +1 -1
  33. package/console-app/assets/{diagram-LBJQPF4R-CUscJ_pO.js → diagram-LBJQPF4R-B--jwILh.js} +1 -1
  34. package/console-app/assets/{diagram-Q27KOJAE-CehBHMt3.js → diagram-Q27KOJAE-D9H0euUr.js} +1 -1
  35. package/console-app/assets/{diagram-UB23O5K3-BvazI_qH.js → diagram-UB23O5K3-DloUQ8tO.js} +1 -1
  36. package/console-app/assets/{ebnfDiagram-BXEA7PRR-CBZPYFwZ.js → ebnfDiagram-BXEA7PRR-gaOXzNBU.js} +1 -1
  37. package/console-app/assets/{erDiagram-JOGREHBK-BN3FevvT.js → erDiagram-JOGREHBK-3X9eTLsh.js} +1 -1
  38. package/console-app/assets/eventmodeling-45OFAUF4-BarrKD55.js +1 -0
  39. package/console-app/assets/flowDiagram-UKHOOZJN-B6RiRjcD.js +1 -0
  40. package/console-app/assets/{ganttDiagram-PKOTCBZU-03mWH2kB.js → ganttDiagram-PKOTCBZU-khAFwSBy.js} +1 -1
  41. package/console-app/assets/{gitGraph-TEB2WS4Q-By2486wn.js → gitGraph-TEB2WS4Q-Bb7uENmk.js} +1 -1
  42. package/console-app/assets/{gitGraphDiagram-DS77QQ5N-CCzKPRBJ.js → gitGraphDiagram-DS77QQ5N-OkSBM0h0.js} +1 -1
  43. package/console-app/assets/{index-snBzz_U8.js → index-Bn1BoT3w.js} +184 -184
  44. package/console-app/assets/{info-DKCQHKI2-C_vsavqC.js → info-DKCQHKI2-BH5dbX2B.js} +1 -1
  45. package/console-app/assets/{infoDiagram-6WML65LV-BKvU8du7.js → infoDiagram-6WML65LV-IbUl8J2C.js} +1 -1
  46. package/console-app/assets/{ishikawaDiagram-WSZJBQD7-CnF0qm0n.js → ishikawaDiagram-WSZJBQD7-CX0gA3de.js} +1 -1
  47. package/console-app/assets/{journeyDiagram-NVQOT4AX-DxKe9OZ7.js → journeyDiagram-NVQOT4AX--k2etXu8.js} +1 -1
  48. package/console-app/assets/{kanban-definition-27J2QSJJ-CB8lgPxU.js → kanban-definition-27J2QSJJ-D1FvtPpN.js} +1 -1
  49. package/console-app/assets/{line-DFNLso1I.js → line-JLMY_DDK.js} +1 -1
  50. package/console-app/assets/{linear-D1cspVtk.js → linear-CSvLB3cd.js} +1 -1
  51. package/console-app/assets/{mermaid-parser.core-BtmN233C.js → mermaid-parser.core-CwwjcAjz.js} +3 -3
  52. package/console-app/assets/{mermaid.core-37H5_HoB.js → mermaid.core-hmS_M4K5.js} +4 -4
  53. package/console-app/assets/{mindmap-definition-FAOFIHXS-Czf82JOB.js → mindmap-definition-FAOFIHXS-rTDa_CTp.js} +1 -1
  54. package/console-app/assets/{packet-7NZHBO7P-CErYxAQM.js → packet-7NZHBO7P-DBUJcYfI.js} +1 -1
  55. package/console-app/assets/{pegDiagram-VL7TDLO6-CRKX6HOt.js → pegDiagram-VL7TDLO6-D42PxXnS.js} +1 -1
  56. package/console-app/assets/{pie-RZYD4A2V-YmMmh6Nq.js → pie-RZYD4A2V-dM0uFAE4.js} +1 -1
  57. package/console-app/assets/{pieDiagram-7S7Q4E2Y-Cot0Fu5q.js → pieDiagram-7S7Q4E2Y-wCln1ucl.js} +1 -1
  58. package/console-app/assets/{quadrantDiagram-CIZ2JOQS-DPEonVYT.js → quadrantDiagram-CIZ2JOQS-DrRwS1g5.js} +1 -1
  59. package/console-app/assets/{radar-I7S5WNFK-Pf_KiQJM.js → radar-I7S5WNFK-BW0V-EGR.js} +1 -1
  60. package/console-app/assets/{railroad-3IZDKUUU-BYoOMoQY.js → railroad-3IZDKUUU-FiTHaDbb.js} +1 -1
  61. package/console-app/assets/railroad-abnf-AHOZXSZD-lmUjOixE.js +1 -0
  62. package/console-app/assets/railroad-ebnf-EBAXGLYW-ZjdA7OHp.js +1 -0
  63. package/console-app/assets/railroad-peg-LSFZ7HO6-VHSlvwI8.js +1 -0
  64. package/console-app/assets/{railroadDiagram-AXF67PYL-Di8N9tHD.js → railroadDiagram-AXF67PYL-9ef7j5U7.js} +1 -1
  65. package/console-app/assets/{requirementDiagram-LRYGKXZP-2yZZ753q.js → requirementDiagram-LRYGKXZP-Cu90DbEZ.js} +1 -1
  66. package/console-app/assets/{sankeyDiagram-W5VNT64P-BwYA-xq1.js → sankeyDiagram-W5VNT64P-Bhxmyxaw.js} +1 -1
  67. package/console-app/assets/{sequenceDiagram-SI44F4Z6-odIxlx8J.js → sequenceDiagram-SI44F4Z6-CBsbRTz8.js} +1 -1
  68. package/console-app/assets/{src-CxJwpjvz.js → src-BR8qR3lM.js} +1 -1
  69. package/console-app/assets/{stateDiagram-OKZ733FA-Du2S0qU9.js → stateDiagram-OKZ733FA-Dr0frETZ.js} +1 -1
  70. package/console-app/assets/stateDiagram-v2-UEYNNEHI-BSXWhCvf.js +1 -0
  71. package/console-app/assets/{swimlanes-SLNWSIFB-JZ3swzI2.js → swimlanes-SLNWSIFB-CXMjvd_a.js} +1 -1
  72. package/console-app/assets/swimlanesDiagram-ULZ7WXOC-BUdsPDKC.js +8 -0
  73. package/console-app/assets/{timeline-definition-Z64GVDOM-CsppAEWi.js → timeline-definition-Z64GVDOM-DpmEZPV0.js} +1 -1
  74. package/console-app/assets/{treeView-QDETBFTQ-DkkO8peQ.js → treeView-QDETBFTQ-CjmuinMk.js} +1 -1
  75. package/console-app/assets/{treemap-6X3UGDF4-hjLkPCJI.js → treemap-6X3UGDF4-BP_fU6Cn.js} +1 -1
  76. package/console-app/assets/{vennDiagram-T6HMQDX7-BOfgM1xp.js → vennDiagram-T6HMQDX7-DgZS7iuW.js} +1 -1
  77. package/console-app/assets/{wardley-OPB4EBWU-C5ZtGfBa.js → wardley-OPB4EBWU-CgMPoouN.js} +1 -1
  78. package/console-app/assets/{wardleyDiagram-T6FBY63Y-ymf3Vm6A.js → wardleyDiagram-T6FBY63Y-6y-xxP1R.js} +1 -1
  79. package/console-app/assets/{xychartDiagram-ELKLHX3M-DdxXIoKz.js → xychartDiagram-ELKLHX3M-DOeIQjYI.js} +1 -1
  80. package/console-app/index.html +1 -1
  81. package/dist/.pikku/addon/index.d.ts +1 -1
  82. package/dist/.pikku/addon/index.js +1 -1
  83. package/dist/.pikku/addon/pikku-addon-types.gen.d.ts +1 -1
  84. package/dist/.pikku/addon/pikku-addon-types.gen.js +1 -1
  85. package/dist/.pikku/agent/index.d.ts +1 -1
  86. package/dist/.pikku/agent/index.js +1 -1
  87. package/dist/.pikku/agent/pikku-agent-types.gen.d.ts +1 -1
  88. package/dist/.pikku/agent/pikku-model-aliases.gen.js +1 -1
  89. package/dist/.pikku/auth/index.d.ts +1 -1
  90. package/dist/.pikku/auth/index.js +1 -1
  91. package/dist/.pikku/auth/pikku-auth-types.gen.d.ts +1 -1
  92. package/dist/.pikku/auth/pikku-auth-types.gen.js +1 -1
  93. package/dist/.pikku/channel/index.d.ts +1 -1
  94. package/dist/.pikku/channel/index.js +1 -1
  95. package/dist/.pikku/channel/pikku-channel-types.gen.d.ts +1 -1
  96. package/dist/.pikku/channel/pikku-channel-types.gen.js +1 -1
  97. package/dist/.pikku/cli/index.d.ts +1 -1
  98. package/dist/.pikku/cli/index.js +1 -1
  99. package/dist/.pikku/cli/pikku-cli-channel.js +1 -1
  100. package/dist/.pikku/cli/pikku-cli-client.gen.d.ts +1 -1
  101. package/dist/.pikku/cli/pikku-cli-client.gen.js +1 -1
  102. package/dist/.pikku/cli/pikku-cli-contracts-meta.gen.d.ts +1 -1
  103. package/dist/.pikku/cli/pikku-cli-contracts-meta.gen.js +1 -1
  104. package/dist/.pikku/cli/pikku-cli-types.gen.d.ts +1 -1
  105. package/dist/.pikku/cli/pikku-cli-types.gen.js +1 -1
  106. package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.js +1 -1
  107. package/dist/.pikku/cli/pikku-cli-wirings.gen.d.ts +1 -1
  108. package/dist/.pikku/cli/pikku-cli-wirings.gen.js +1 -1
  109. package/dist/.pikku/cli/pikku-cli.gen.d.ts +1 -1
  110. package/dist/.pikku/cli/pikku-cli.gen.js +1 -1
  111. package/dist/.pikku/error/index.d.ts +1 -1
  112. package/dist/.pikku/error/index.js +1 -1
  113. package/dist/.pikku/error/pikku-error-types.gen.d.ts +1 -1
  114. package/dist/.pikku/error/pikku-error-types.gen.js +1 -1
  115. package/dist/.pikku/function/index.d.ts +1 -1
  116. package/dist/.pikku/function/index.js +1 -1
  117. package/dist/.pikku/function/pikku-function-types.gen.d.ts +1 -1
  118. package/dist/.pikku/function/pikku-function-types.gen.js +1 -1
  119. package/dist/.pikku/function/pikku-functions-meta.gen.js +1 -1
  120. package/dist/.pikku/function/pikku-functions-meta.gen.json +1 -1
  121. package/dist/.pikku/function/pikku-functions.gen.js +1 -1
  122. package/dist/.pikku/gateway/index.d.ts +1 -1
  123. package/dist/.pikku/gateway/index.js +1 -1
  124. package/dist/.pikku/gateway/pikku-gateway-types.gen.d.ts +1 -1
  125. package/dist/.pikku/gateway/pikku-gateway-types.gen.js +1 -1
  126. package/dist/.pikku/http/index.d.ts +1 -1
  127. package/dist/.pikku/http/index.js +1 -1
  128. package/dist/.pikku/http/pikku-http-types.gen.d.ts +1 -1
  129. package/dist/.pikku/http/pikku-http-types.gen.js +1 -1
  130. package/dist/.pikku/mcp/index.d.ts +1 -1
  131. package/dist/.pikku/mcp/index.js +1 -1
  132. package/dist/.pikku/mcp/pikku-mcp-types.gen.d.ts +1 -1
  133. package/dist/.pikku/mcp/pikku-mcp-types.gen.js +1 -1
  134. package/dist/.pikku/middleware/index.d.ts +1 -1
  135. package/dist/.pikku/middleware/index.js +1 -1
  136. package/dist/.pikku/middleware/pikku-middleware-types.gen.d.ts +1 -1
  137. package/dist/.pikku/middleware/pikku-middleware-types.gen.js +1 -1
  138. package/dist/.pikku/pikku-bootstrap-scenarios.gen.d.ts +1 -1
  139. package/dist/.pikku/pikku-bootstrap-scenarios.gen.js +1 -1
  140. package/dist/.pikku/pikku-bootstrap.gen.d.ts +1 -1
  141. package/dist/.pikku/pikku-bootstrap.gen.js +1 -1
  142. package/dist/.pikku/pikku-services.gen.d.ts +2 -1
  143. package/dist/.pikku/pikku-services.gen.js +1 -0
  144. package/dist/.pikku/queue/index.d.ts +1 -1
  145. package/dist/.pikku/queue/index.js +1 -1
  146. package/dist/.pikku/queue/pikku-queue-types.gen.d.ts +1 -1
  147. package/dist/.pikku/queue/pikku-queue-types.gen.js +1 -1
  148. package/dist/.pikku/queue/pikku-queue-workers-wirings-meta.gen.js +1 -1
  149. package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.d.ts +1 -1
  150. package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.js +1 -1
  151. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js +1 -1
  152. package/dist/.pikku/scenarios/index.d.ts +1 -1
  153. package/dist/.pikku/scenarios/index.js +1 -1
  154. package/dist/.pikku/scenarios/pikku-personas.gen.js +1 -1
  155. package/dist/.pikku/scenarios/pikku-scenario-functions-meta.gen.js +1 -1
  156. package/dist/.pikku/scenarios/pikku-scenario-functions.gen.d.ts +1 -1
  157. package/dist/.pikku/scenarios/pikku-scenario-types.gen.d.ts +1 -1
  158. package/dist/.pikku/scenarios/pikku-scenario-wirings-meta.gen.js +1 -1
  159. package/dist/.pikku/scenarios/pikku-scenario-wirings.gen.d.ts +1 -1
  160. package/dist/.pikku/scenarios/schemas/register.gen.d.ts +1 -1
  161. package/dist/.pikku/scenarios/schemas/register.gen.js +1 -1
  162. package/dist/.pikku/scheduler/index.d.ts +1 -1
  163. package/dist/.pikku/scheduler/index.js +1 -1
  164. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.d.ts +1 -1
  165. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js +1 -1
  166. package/dist/.pikku/schemas/register.gen.js +1 -1
  167. package/dist/.pikku/scopes/index.d.ts +1 -1
  168. package/dist/.pikku/scopes/index.js +1 -1
  169. package/dist/.pikku/scopes/pikku-personas.gen.js +1 -1
  170. package/dist/.pikku/scopes/pikku-roles.gen.d.ts +1 -1
  171. package/dist/.pikku/scopes/pikku-scope-types.gen.d.ts +1 -1
  172. package/dist/.pikku/scopes/pikku-scope-types.gen.js +1 -1
  173. package/dist/.pikku/scopes/pikku-scopes.gen.d.ts +1 -1
  174. package/dist/.pikku/secrets/index.d.ts +1 -1
  175. package/dist/.pikku/secrets/index.js +1 -1
  176. package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts +1 -1
  177. package/dist/.pikku/secrets/pikku-secret-types.gen.js +1 -1
  178. package/dist/.pikku/secrets/pikku-secrets.gen.d.ts +1 -1
  179. package/dist/.pikku/secrets/pikku-secrets.gen.js +1 -1
  180. package/dist/.pikku/services/pikku-meta-service.gen.d.ts +1 -1
  181. package/dist/.pikku/services/pikku-meta-service.gen.js +1 -1
  182. package/dist/.pikku/setup/index.d.ts +1 -1
  183. package/dist/.pikku/setup/index.js +1 -1
  184. package/dist/.pikku/setup/pikku-setup-types.gen.d.ts +1 -1
  185. package/dist/.pikku/setup/pikku-setup-types.gen.js +1 -1
  186. package/dist/.pikku/trigger/index.d.ts +1 -1
  187. package/dist/.pikku/trigger/index.js +1 -1
  188. package/dist/.pikku/trigger/pikku-trigger-types.gen.d.ts +1 -1
  189. package/dist/.pikku/trigger/pikku-trigger-types.gen.js +1 -1
  190. package/dist/.pikku/variables/index.d.ts +1 -1
  191. package/dist/.pikku/variables/index.js +1 -1
  192. package/dist/.pikku/variables/pikku-variable-types.gen.d.ts +1 -1
  193. package/dist/.pikku/variables/pikku-variable-types.gen.js +1 -1
  194. package/dist/.pikku/variables/pikku-variables.gen.d.ts +1 -1
  195. package/dist/.pikku/variables/pikku-variables.gen.js +1 -1
  196. package/dist/.pikku/workflow/index.d.ts +1 -1
  197. package/dist/.pikku/workflow/index.js +1 -1
  198. package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +1 -1
  199. package/dist/.pikku/workflow/pikku-workflow-types.gen.js +1 -1
  200. package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +1 -1
  201. package/dist/.pikku/workflow/pikku-workflow-wirings.gen.js +1 -1
  202. package/dist/bin/pikku-bin.mjs +2 -2
  203. package/dist/src/functions/commands/persona.js +6 -0
  204. package/dist/src/functions/wirings/virtual-user/serialize-virtual-user-functions.js +485 -102
  205. package/package.json +4 -4
  206. package/surface.json +1 -1
  207. package/console-app/assets/architecture-TIHT7OUA-5QhJKy4P.js +0 -1
  208. package/console-app/assets/channel-DoE3nnYB.js +0 -1
  209. package/console-app/assets/chunk-XXDRQBXY-BDALKVU4.js +0 -1
  210. package/console-app/assets/classDiagram-JCYQIIEL-BgrrHQtN.js +0 -1
  211. package/console-app/assets/classDiagram-v2-OCEON4UE-BgrrHQtN.js +0 -1
  212. package/console-app/assets/eventmodeling-45OFAUF4-D2SxzJUl.js +0 -1
  213. package/console-app/assets/flowDiagram-UKHOOZJN-CQXuJ0z2.js +0 -1
  214. package/console-app/assets/railroad-abnf-AHOZXSZD-CCRXsRRD.js +0 -1
  215. package/console-app/assets/railroad-ebnf-EBAXGLYW-DVRSVgn8.js +0 -1
  216. package/console-app/assets/railroad-peg-LSFZ7HO6-COUBoNH3.js +0 -1
  217. package/console-app/assets/stateDiagram-v2-UEYNNEHI-CTXOGDRR.js +0 -1
  218. package/console-app/assets/swimlanesDiagram-ULZ7WXOC-DRrggQgK.js +0 -8
@@ -1,4 +1,4 @@
1
- import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{t}from"./src-CxJwpjvz.js";import{x as n}from"./chunk-I66GZJ75-C-Lq_UXl.js";import"./chunk-NSK5VX7P-Fi_H0vaS.js";import"./chunk-4I5QYGJK-C-m_kVjm.js";import"./chunk-WRU74C26-CGzysGBy.js";import"./chunk-7BUUIJ7U-Bb538aSH.js";import{n as r}from"./chunk-UBXNYLIW-BF-sAqEK.js";import{t as i}from"./dagre-J22zmNeE.js";import{a,i as o,n as s,o as c,r as l,t as u}from"./chunk-RYQCIY6F-CVbGA6YZ.js";import{t as d}from"./graphlib-IlWVLY3o.js";import"./chunk-W5SLKNZC-CXrJJ0BX.js";import{a as f,c as p,i as m,l as h,n as g,t as _,u as v}from"./chunk-QR6OTTB3-BJdg-tcL.js";import{a as y,i as b,o as x,r as S,t as C}from"./chunk-7Z6QIM7H-BGiBPuWt.js";var w=e((e,t,n)=>Math.max(t,Math.min(n,e)),`clamp`),T=e((e=`TB`)=>{switch(e){case`BT`:return`bottom`;case`LR`:return`right`;case`RL`:return`left`;default:return`top`}},`getDefaultSelfLoopSide`),E=e(e=>e===`flowchart`||e===`flowchart-v2`||e===`stateDiagram`,`shouldMergeSelfLoopSegments`),D=e((e,t,n,r,i)=>{let a=[],o=new Set;if(n.forEach(({start:e,end:t})=>{e!==r&&o.add(e),t!==r&&o.add(t)}),o.forEach(t=>{let n=e.node(t);typeof n?.x==`number`&&typeof n?.y==`number`&&a.push(n)}),a.length===0&&n.forEach(({edge:e})=>{(e.points??[]).forEach(e=>{typeof e?.x==`number`&&typeof e?.y==`number`&&a.push(e)})}),a.length===0)return T(i);let s=a.reduce((e,t)=>({x:e.x+t.x/a.length,y:e.y+t.y/a.length}),{x:0,y:0}),c=s.x-t.x,l=s.y-t.y;return Math.abs(c)>Math.abs(l)?c>0?`right`:`left`:Math.abs(l)>0?l>0?`bottom`:`top`:T(i)},`getSelfLoopSide`),O=e((e,t=`top`,n=0,r=0)=>{let i=e.x,a=e.y-n,o=e.width/2,s=e.height/2,c=Math.max(36,Math.min(100,e.width*.8)),l=w(Math.max(r,e.width*.35),36,c),u=w(Math.min(e.width,e.height)*.45,24,48);switch(t){case`bottom`:{let e=a+s;return[{x:i-l/2,y:e},{x:i-l/2,y:e+u},{x:i+l/2,y:e+u},{x:i+l/2,y:e}]}case`right`:{let e=i+o;return[{x:e,y:a-l/2},{x:e+u,y:a-l/2},{x:e+u,y:a+l/2},{x:e,y:a+l/2}]}case`left`:{let e=i-o;return[{x:e,y:a-l/2},{x:e-u,y:a-l/2},{x:e-u,y:a+l/2},{x:e,y:a+l/2}]}default:{let e=a-s;return[{x:i-l/2,y:e},{x:i-l/2,y:e-u},{x:i+l/2,y:e-u},{x:i+l/2,y:e}]}}},`getSelfLoopPoints`),k=e((e,t,n=`top`,r=0,i={})=>{let a=e.x,o=e.y-r,s=i.width??0,c=i.height??0;switch(n){case`bottom`:return{x:a,y:Math.max(...t.map(e=>e.y))+c/2+4};case`right`:return{x:Math.max(...t.map(e=>e.x))+s/2+4,y:o};case`left`:return{x:Math.min(...t.map(e=>e.x))-s/2-4,y:o};default:return{x:a,y:Math.min(...t.map(e=>e.y))-c/2-4}}},`getSelfLoopLabelPosition`),A=e((e,t=0,{mergeSelfLoops:n=!0}={})=>{let r=new Map,i=[],a=e.graph()?.rankdir;return e.edges().forEach(t=>{let a=e.edge(t);if(n&&a.selfLoop){let e=a.selfLoop.id;r.has(e)||r.set(e,[]),r.get(e).push({edge:a,start:t.v,end:t.w})}else i.push({edge:a,start:t.v,end:t.w})}),r.forEach(n=>{if(n.length!==3){n.forEach(e=>i.push(e));return}n.sort((e,t)=>e.edge.selfLoop.order-t.edge.selfLoop.order);let[r,o,s]=n,c=r.edge.originalEdge??o.edge.originalEdge??s.edge.originalEdge??o.edge,l=e.node(c.start);if(!l){n.forEach(e=>i.push(e));return}let u={width:o.edge.width,height:o.edge.height},d=D(e,l,n,c.start,a),f=O(l,d,t,u.width??0),p=k(l,f,d,t,u),m={...o.edge,...c,id:c.id,points:f,start:c.start,end:c.end,x:p.x,y:p.y,width:u.width,height:u.height,labelStyle:o.edge.labelStyle,fromCluster:r.edge.fromCluster??o.edge.fromCluster??s.edge.fromCluster,toCluster:r.edge.toCluster??o.edge.toCluster??s.edge.toCluster};delete m.selfLoop,delete m.originalEdge,i.push({edge:m,start:m.start,end:m.end})}),i},`getEdgesToRender`),j=e(async(n,s,u,d,g,_)=>{t.warn(`Graph in recursive render:XAX`,c(s),g);let y=s.graph().rankdir;t.trace(`Dir in recursive render - dir:`,y);let C=n.insert(`g`).attr(`class`,`root`);s.nodes()?t.info(`Recursive render XXX`,s.nodes()):t.info(`No nodes found for`,s),s.edges().length>0&&t.info(`Recursive edges`,s.edge(s.edges()[0]));let w=C.insert(`g`).attr(`class`,`clusters`),T=C.insert(`g`).attr(`class`,`edgePaths`),D=C.insert(`g`).attr(`class`,`edgeLabels`),O=C.insert(`g`).attr(`class`,`nodes`),k=E(u);await Promise.all(s.nodes().map(async function(e){let n=s.node(e);if(g!==void 0){let n=JSON.parse(JSON.stringify(g.clusterData));t.trace(`Setting data for parent cluster XXX
1
+ import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{t}from"./src-BR8qR3lM.js";import{x as n}from"./chunk-I66GZJ75-b3yMIljX.js";import"./chunk-NSK5VX7P-CfigFGDQ.js";import"./chunk-4I5QYGJK-CWmfNXFr.js";import"./chunk-WRU74C26-Dic7ZP8H.js";import"./chunk-7BUUIJ7U-Bb538aSH.js";import{n as r}from"./chunk-UBXNYLIW-DkMKDHW4.js";import{t as i}from"./dagre-FZyyw3H3.js";import{a,i as o,n as s,o as c,r as l,t as u}from"./chunk-RYQCIY6F-BCfZVQef.js";import{t as d}from"./graphlib-IlWVLY3o.js";import"./chunk-W5SLKNZC-BSLytTSJ.js";import{a as f,c as p,i as m,l as h,n as g,t as _,u as v}from"./chunk-QR6OTTB3-BBy8NfTW.js";import{a as y,i as b,o as x,r as S,t as C}from"./chunk-7Z6QIM7H-DSnVb09k.js";var w=e((e,t,n)=>Math.max(t,Math.min(n,e)),`clamp`),T=e((e=`TB`)=>{switch(e){case`BT`:return`bottom`;case`LR`:return`right`;case`RL`:return`left`;default:return`top`}},`getDefaultSelfLoopSide`),E=e(e=>e===`flowchart`||e===`flowchart-v2`||e===`stateDiagram`,`shouldMergeSelfLoopSegments`),D=e((e,t,n,r,i)=>{let a=[],o=new Set;if(n.forEach(({start:e,end:t})=>{e!==r&&o.add(e),t!==r&&o.add(t)}),o.forEach(t=>{let n=e.node(t);typeof n?.x==`number`&&typeof n?.y==`number`&&a.push(n)}),a.length===0&&n.forEach(({edge:e})=>{(e.points??[]).forEach(e=>{typeof e?.x==`number`&&typeof e?.y==`number`&&a.push(e)})}),a.length===0)return T(i);let s=a.reduce((e,t)=>({x:e.x+t.x/a.length,y:e.y+t.y/a.length}),{x:0,y:0}),c=s.x-t.x,l=s.y-t.y;return Math.abs(c)>Math.abs(l)?c>0?`right`:`left`:Math.abs(l)>0?l>0?`bottom`:`top`:T(i)},`getSelfLoopSide`),O=e((e,t=`top`,n=0,r=0)=>{let i=e.x,a=e.y-n,o=e.width/2,s=e.height/2,c=Math.max(36,Math.min(100,e.width*.8)),l=w(Math.max(r,e.width*.35),36,c),u=w(Math.min(e.width,e.height)*.45,24,48);switch(t){case`bottom`:{let e=a+s;return[{x:i-l/2,y:e},{x:i-l/2,y:e+u},{x:i+l/2,y:e+u},{x:i+l/2,y:e}]}case`right`:{let e=i+o;return[{x:e,y:a-l/2},{x:e+u,y:a-l/2},{x:e+u,y:a+l/2},{x:e,y:a+l/2}]}case`left`:{let e=i-o;return[{x:e,y:a-l/2},{x:e-u,y:a-l/2},{x:e-u,y:a+l/2},{x:e,y:a+l/2}]}default:{let e=a-s;return[{x:i-l/2,y:e},{x:i-l/2,y:e-u},{x:i+l/2,y:e-u},{x:i+l/2,y:e}]}}},`getSelfLoopPoints`),k=e((e,t,n=`top`,r=0,i={})=>{let a=e.x,o=e.y-r,s=i.width??0,c=i.height??0;switch(n){case`bottom`:return{x:a,y:Math.max(...t.map(e=>e.y))+c/2+4};case`right`:return{x:Math.max(...t.map(e=>e.x))+s/2+4,y:o};case`left`:return{x:Math.min(...t.map(e=>e.x))-s/2-4,y:o};default:return{x:a,y:Math.min(...t.map(e=>e.y))-c/2-4}}},`getSelfLoopLabelPosition`),A=e((e,t=0,{mergeSelfLoops:n=!0}={})=>{let r=new Map,i=[],a=e.graph()?.rankdir;return e.edges().forEach(t=>{let a=e.edge(t);if(n&&a.selfLoop){let e=a.selfLoop.id;r.has(e)||r.set(e,[]),r.get(e).push({edge:a,start:t.v,end:t.w})}else i.push({edge:a,start:t.v,end:t.w})}),r.forEach(n=>{if(n.length!==3){n.forEach(e=>i.push(e));return}n.sort((e,t)=>e.edge.selfLoop.order-t.edge.selfLoop.order);let[r,o,s]=n,c=r.edge.originalEdge??o.edge.originalEdge??s.edge.originalEdge??o.edge,l=e.node(c.start);if(!l){n.forEach(e=>i.push(e));return}let u={width:o.edge.width,height:o.edge.height},d=D(e,l,n,c.start,a),f=O(l,d,t,u.width??0),p=k(l,f,d,t,u),m={...o.edge,...c,id:c.id,points:f,start:c.start,end:c.end,x:p.x,y:p.y,width:u.width,height:u.height,labelStyle:o.edge.labelStyle,fromCluster:r.edge.fromCluster??o.edge.fromCluster??s.edge.fromCluster,toCluster:r.edge.toCluster??o.edge.toCluster??s.edge.toCluster};delete m.selfLoop,delete m.originalEdge,i.push({edge:m,start:m.start,end:m.end})}),i},`getEdgesToRender`),j=e(async(n,s,u,d,g,_)=>{t.warn(`Graph in recursive render:XAX`,c(s),g);let y=s.graph().rankdir;t.trace(`Dir in recursive render - dir:`,y);let C=n.insert(`g`).attr(`class`,`root`);s.nodes()?t.info(`Recursive render XXX`,s.nodes()):t.info(`No nodes found for`,s),s.edges().length>0&&t.info(`Recursive edges`,s.edge(s.edges()[0]));let w=C.insert(`g`).attr(`class`,`clusters`),T=C.insert(`g`).attr(`class`,`edgePaths`),D=C.insert(`g`).attr(`class`,`edgeLabels`),O=C.insert(`g`).attr(`class`,`nodes`),k=E(u);await Promise.all(s.nodes().map(async function(e){let n=s.node(e);if(g!==void 0){let n=JSON.parse(JSON.stringify(g.clusterData));t.trace(`Setting data for parent cluster XXX
2
2
  Node.id = `,e,`
3
3
  data=`,n.height,`
4
4
  Parent cluster`,g.height),s.setNode(g.id,n),s.parent(e)||(t.trace(`Setting parent`,e,g.id),s.setParent(e,g.id,n))}if(t.info(`(Insert) Node XXX`+e+`: `+JSON.stringify(s.node(e))),n?.clusterNode){t.info(`Cluster identified XBX`,e,n.width,s.node(e));let{ranksep:r,nodesep:i}=s.graph();n.graph.setGraph({...n.graph.graph(),ranksep:r+25,nodesep:i});let a=await j(O,n.graph,u,d,s.node(e),_),o=a.elem;v(n,o),n.diff=a.diff||0,t.info(`New compound node after recursive render XAX`,e,`width`,n.width,`height`,n.height),h(o,n)}else s.children(e).length>0?(t.trace(`Cluster - the non recursive path XBX`,e,n.id,n,n.width,`Graph:`,s),t.trace(o(n.id,s)),l.set(n.id,{id:o(n.id,s),node:n})):(t.trace(`Node - the non recursive path XAX`,e,O,s.node(e),y),await f(O,s.node(e),{config:_,dir:y}))})),await e(async()=>{let e=s.edges().map(async function(e){let n=s.edge(e.v,e.w,e.name);if(t.info(`Edge `+e.v+` -> `+e.w+`: `+JSON.stringify(e)),t.info(`Edge `+e.v+` -> `+e.w+`: `,e,` `,JSON.stringify(s.edge(e))),t.info(`Fix`,l,`ids:`,e.v,e.w,`Translating: `,l.get(e.v),l.get(e.w)),k&&n.selfLoop){if(n.selfLoop.order!==1)return;let e=n.id;n.id=n.selfLoop.id,await b(D,n),n.id=e;return}await b(D,n)});await Promise.all(e)},`processEdges`)(),t.info(`Graph before layout:`,JSON.stringify(c(s))),t.info(`############################################# XXX`),t.info(`### Layout ### XXX`),t.info(`############################################# XXX`),i(s),t.info(`Graph after layout:`,JSON.stringify(c(s)));let M=0,{subGraphTitleTotalMargin:N}=r(_);await Promise.all(a(s).map(async function(e){let n=s.node(e);if(t.info(`Position XBX => `+e+`: (`+n.x,`,`+n.y,`) width: `,n.width,` height: `,n.height),n?.clusterNode)n.y+=N,t.info(`A tainted cluster node XBX1`,e,n.id,n.width,n.height,n.x,n.y,s.parent(e)),l.get(n.id).node=n,p(n);else if(s.children(e).length>0){t.info(`A pure cluster node XBX1`,e,n.id,n.x,n.y,n.width,n.height,s.parent(e)),n.height+=N,s.node(n.parentId);let r=n?.padding/2||0,i=n?.labelBBox?.height||0,a=i-r||0;t.debug(`OffsetY`,a,`labelHeight`,i,`halfPadding`,r),await m(w,n),l.get(n.id).node=n}else{let e=s.node(n.parentId);n.y+=N/2,t.info(`A regular node XBX1 - using the padding`,n.id,`parent`,n.parentId,n.width,n.height,n.x,n.y,`offsetY`,n.offsetY,`parent`,e,e?.offsetY,n),p(n)}}));let P=N/2;return A(s,P,{mergeSelfLoops:k}).forEach(function({edge:e,start:n,end:r}){t.info(`Edge `+n+` -> `+r+`: `+JSON.stringify(e),e),e.points.forEach(e=>e.y+=P);let i=s.node(n),a=s.node(r),o=S(T,e,l,u,i,a,d);x(e,o)}),s.nodes().forEach(function(e){let n=s.node(e);t.info(e,n.type,n.diff),n.isGroup&&(M=n.diff)}),t.warn(`Returning from recursive render XAX`,C,M),{elem:C,diff:M}},`recursiveRender`),M=e(async(e,r)=>{let i=new d({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:e.config?.nodeSpacing||e.config?.flowchart?.nodeSpacing||e.nodeSpacing,ranksep:e.config?.rankSpacing||e.config?.flowchart?.rankSpacing||e.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),a=r.select(`g`);y(a,e.markers,e.type,e.diagramId),g(),C(),_(),s(),e.nodes.forEach(e=>{i.setNode(e.id,{...e}),e.parentId&&i.setParent(e.id,e.parentId)}),t.debug(`Edges:`,e.edges),e.edges.forEach(e=>{if(e.start===e.end){let t=e.start,n=t+`---`+t+`---1`,r=t+`---`+t+`---2`,a=i.node(t);i.setNode(n,{domId:n,id:n,parentId:a.parentId,labelStyle:``,label:``,padding:0,shape:`labelRect`,style:``,width:10,height:10}),i.setParent(n,a.parentId),i.setNode(r,{domId:r,id:r,parentId:a.parentId,labelStyle:``,padding:0,shape:`labelRect`,label:``,style:``,width:10,height:10}),i.setParent(r,a.parentId);let o=structuredClone(e),s=structuredClone(e),c=structuredClone(e),l=structuredClone(e);s.originalEdge=o,s.selfLoop={id:o.id,order:0},c.originalEdge=o,c.selfLoop={id:o.id,order:1},l.originalEdge=o,l.selfLoop={id:o.id,order:2},s.label=``,s.arrowTypeEnd=`none`,s.endLabelLeft=``,s.endLabelRight=``,s.startLabelLeft=``,s.id=t+`-cyclic-special-1`,c.startLabelRight=``,c.startLabelLeft=``,c.endLabelLeft=``,c.endLabelRight=``,c.arrowTypeStart=`none`,c.arrowTypeEnd=`none`,c.id=t+`-cyclic-special-mid`,l.label=``,l.startLabelRight=``,l.startLabelLeft=``,l.arrowTypeStart=`none`,a.isGroup&&(s.fromCluster=t,l.toCluster=t),l.id=t+`-cyclic-special-2`,l.arrowTypeStart=`none`,i.setEdge(t,n,s,t+`-cyclic-special-0`),i.setEdge(n,r,c,t+`-cyclic-special-1`),i.setEdge(r,t,l,t+`-cyclic-special-2`)}else i.setEdge(e.start,e.end,{...e},e.id)}),t.warn(`Graph at first:`,JSON.stringify(c(i))),u(i),t.warn(`Graph after XAX:`,JSON.stringify(c(i)));let o=n();await j(a,i,e.type,e.diagramId,void 0,o)},`render`);export{A as getEdgesToRender,M as render};
@@ -1,4 +1,4 @@
1
- import{n as e}from"./mermaid-parser.core-BtmN233C.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{t as n}from"./src-CxJwpjvz.js";import{H as r,K as i,U as a,a as o,b as s,c,f as l,v as u,w as d,y as f,z as p}from"./chunk-I66GZJ75-C-Lq_UXl.js";import{i as m}from"./chunk-NSK5VX7P-Fi_H0vaS.js";import{t as h}from"./chunk-JWPE2WC7-DVXcaiue.js";import{r as g,t as _}from"./chunk-4I5QYGJK-C-m_kVjm.js";import{t as v}from"./chunk-2Q5K7J3B-C1jixKkw.js";import{a as y}from"./mermaid.core-37H5_HoB.js";var b=/[─━│┃└┗├┣]/,x=/[└┗├┣]/,S=/[─━]/,C=/^[\s│┃]+$/,w=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,T=/^\s*%%/,E=` `;function D(e){return e.some(e=>b.test(e))}t(D,`isBoxDrawingFormat`);function O(e){for(let t of e){let e=x.exec(t);if(e?.index&&e.index>0)return e.index}return 4}t(O,`inferSegmentWidth`);function k(e,t){return e.replace(/\bline\s+(\d+)\b/gi,(e,n)=>{let r=parseInt(n,10),i=t.get(r);return i?`line ${i}`:e})}t(k,`remapErrorLines`);function A(e){let t=e.split(`
1
+ import{n as e}from"./mermaid-parser.core-CwwjcAjz.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{t as n}from"./src-BR8qR3lM.js";import{H as r,K as i,U as a,a as o,b as s,c,f as l,v as u,w as d,y as f,z as p}from"./chunk-I66GZJ75-b3yMIljX.js";import{i as m}from"./chunk-NSK5VX7P-CfigFGDQ.js";import{t as h}from"./chunk-JWPE2WC7-DVXcaiue.js";import{r as g,t as _}from"./chunk-4I5QYGJK-CWmfNXFr.js";import{t as v}from"./chunk-2Q5K7J3B-C1jixKkw.js";import{a as y}from"./mermaid.core-hmS_M4K5.js";var b=/[─━│┃└┗├┣]/,x=/[└┗├┣]/,S=/[─━]/,C=/^[\s│┃]+$/,w=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,T=/^\s*%%/,E=` `;function D(e){return e.some(e=>b.test(e))}t(D,`isBoxDrawingFormat`);function O(e){for(let t of e){let e=x.exec(t);if(e?.index&&e.index>0)return e.index}return 4}t(O,`inferSegmentWidth`);function k(e,t){return e.replace(/\bline\s+(\d+)\b/gi,(e,n)=>{let r=parseInt(n,10),i=t.get(r);return i?`line ${i}`:e})}t(k,`remapErrorLines`);function A(e){let t=e.split(`
2
2
  `),n=new Map,r=-1;for(let[e,n]of t.entries())if(n.trim()===`treeView-beta`){r=e;break}if(r===-1)return{text:e,lineMap:n};let i=[];for(let e=r+1;e<t.length;e++){let n=t[e];n.trim()===``||T.test(n)||w.test(n)||C.test(n)||i.push(n.replace(/\t/g,` `))}if(!D(i))return{text:e,lineMap:n};let a=O(i),o=[],s=0;for(let e=0;e<=r;e++)o.push(t[e]),s++,n.set(s,e+1);for(let e=r+1;e<t.length;e++){let r=t[e],i=r.trim(),c=e+1;if(i===``){o.push(r),s++,n.set(s,c);continue}if(T.test(r)){o.push(r),s++,n.set(s,c);continue}if(w.test(r)){o.push(r),s++,n.set(s,c);continue}if(C.test(r))continue;let l=r.replace(/\t/g,` `),u=x.exec(l);if(u?.index!==void 0){let e=u.index,t=Math.round(e/a)+1,r=e+1;for(;r<l.length&&S.test(l[r]);)r++;for(;r<l.length&&l[r]===` `;)r++;let i=l.slice(r).trimEnd();if(!i)throw Error(`Line ${c}: Empty node \u2014 expected a filename or directory name after the box-drawing prefix`);let d=E.repeat(t);o.push(d+i),s++,n.set(s,c)}else if(/^[\s─━│┃└┗├┣]+$/.test(l))continue;else if(b.test(l))o.push(r),s++,n.set(s,c);else if(/^\s+/.test(l))throw Error(`Line ${c}: Unexpected indentation without box-drawing characters. In box-drawing format, use \u251C\u2500\u2500 or \u2514\u2500\u2500 prefixes for indented nodes.`);else o.push(r),s++,n.set(s,c)}return{text:o.join(`
3
3
  `),lineMap:n}}t(A,`preprocessBoxDrawing`);var j=new v(()=>({cnt:1,stack:[{id:0,level:-1,name:`/`,nodeType:`directory`,children:[]}]})),M=t(()=>{j.reset(),o()},`clear`),N=t(()=>j.records.stack[0],`getRoot`),P=t(()=>j.records.cnt,`getCount`),F=l.treeView,I={clear:M,addNode:t((e,t,n,r,i,a)=>{for(;e<=j.records.stack[j.records.stack.length-1].level;)j.records.stack.pop();let o={id:j.records.cnt++,level:e,name:t,nodeType:n,icon:i,cssClass:r,description:a,children:[]};j.records.stack[j.records.stack.length-1].children.push(o),j.records.stack.push(o)},`addNode`),getRoot:N,getCount:P,getConfig:t(()=>m(F,s().treeView),`getConfig`),getAccTitle:f,getAccDescription:u,getDiagramTitle:d,setAccDescription:r,setAccTitle:a,setDiagramTitle:i},L=t(e=>{h(e,I);for(let t of e.nodes){let e=typeof t.indent==`number`?t.indent:0,n=t.name,r=n.endsWith(`/`);r&&(n=n.slice(0,-1));let i=r?`directory`:`file`,a=t.classAnnotation||void 0,o=t.iconAnnotation,c=o===void 0?void 0:o||`none`,l=t.descAnnotation||void 0,u=l?p(l,s()):void 0;I.addNode(e,n,i,a,c,u)}},`populate`),R={parse:t(async t=>{let{text:r,lineMap:i}=A(t);try{let t=await e(`treeView`,r);n.debug(t),L(t)}catch(e){throw i.size>0&&e instanceof Error&&(e.message=k(e.message,i)),e}},`parse`)},z={prefix:`mermaid-treeview`,height:24,width:24,icons:{folder:{body:`<path fill="currentColor" d="M10.59 4.59A2 2 0 0 0 9.17 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.17z"/>`},file:{body:`<path fill="currentColor" fill-rule="evenodd" d="M6 2a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8.83a2 2 0 0 0-.59-1.42l-4.82-4.82A2 2 0 0 0 13.17 2H6Zm7.5 1.9l4.6 4.6h-3.6a1 1 0 0 1-1-1V3.9Z" clip-rule="evenodd"/>`}}};function B(e,t){let n=t?.filenameIcons?.[e];if(n)return n;let r=e.lastIndexOf(`.`);if(r>0){let n=e.substring(r).toLowerCase(),i=t?.extensionIcons;return i?.[n]??i?.[n.slice(1)]}}t(B,`detectIcon`);function V(e,t){return e.includes(`:`)?e:e in z.icons||!t?`${z.prefix}:${e}`:`${t}:${e}`}t(V,`qualifyIcon`);function H(e,t){if(e.icon!==`none`){if(e.icon)return V(e.icon,t.defaultIconPack);if(t.showIcons){if(e.nodeType===`file`){let n=B(e.name,t);if(n===`none`)return;if(n)return V(n,t.defaultIconPack)}return`${z.prefix}:${e.nodeType===`directory`?`folder`:`file`}`}}}t(H,`getNodeIcon`),g([{name:z.prefix,icons:z}]);var U=14,W=4,G=16,K=t((e,t)=>`tv-icon-${e}-${t.replace(/[^\w-]/g,`-`)}`,`iconSymbolId`),q=t(async(e,n,r,i)=>{let a=new Set,o=t(e=>{let t=H(e,r);t&&a.add(t),e.children.forEach(o)},`collect`);if(o(n),a.size===0)return;let s=await Promise.all([...a].map(async e=>({icon:e,svg:await _(e,{height:U,width:U})}))),c=e.append(`defs`);for(let{icon:e,svg:t}of s)c.append(`g`).attr(`id`,K(i,e)).html(t)},`injectIconDefs`),J=t((e,t,n,r,i,a)=>{let o=r.append(`g`),s=`treeView-node-label`;n.nodeType===`directory`&&(s+=` treeView-node-dir`),n.cssClass&&(s+=` ${n.cssClass}`);let c=U+W,l=H(n,i),u=l!==void 0;l&&o.append(`use`).attr(`xlink:href`,`#${K(a,l)}`).attr(`x`,e+i.paddingX).attr(`y`,t+i.paddingY).attr(`class`,`treeView-node-icon`);let d=o.append(`text`).text(n.name).attr(`dominant-baseline`,`middle`).attr(`class`,s),{height:f,width:p}=d.node().getBBox(),m=f+i.paddingY*2,h=e+i.paddingX+(u?c:0);d.attr(`x`,h),d.attr(`y`,t+m/2);let g=h+p;return n.BBox={x:e,y:t,width:p+i.paddingX*2+(u?c:0),height:m},n.cssClass?.split(/\s+/).includes(`highlight`)&&o.insert(`rect`,`:first-child`).attr(`x`,e).attr(`y`,t+1).attr(`width`,0).attr(`height`,m-2).attr(`rx`,3).attr(`class`,`treeView-highlight-bg`),{node:n,nodeGroup:o,labelRightEdge:g,centerY:t+m/2}},`positionLabel`),Y=t((e,t,n,r,i,a)=>e.append(`line`).attr(`x1`,t).attr(`y1`,n).attr(`x2`,r).attr(`y2`,i).attr(`stroke-width`,a).attr(`class`,`treeView-node-line`),`positionLine`),X=t((e,n,r,i)=>{let a=0,o=0,s=[],c=t((e,t,n,r)=>{let c=r*(n.rowIndent+n.paddingX),l=J(c,a,t,e,n,i);s.push(l);let{height:u,width:d}=t.BBox;Y(e,c-n.rowIndent,a+u/2,c,a+u/2,n.lineThickness),o=Math.max(o,c+d),a+=u},`drawNode`),l=t((t,n=0)=>{c(e,t,r,n),t.children.forEach(e=>{l(e,n+1)});let{x:i,y:a,height:o}=t.BBox;if(t.children.length){let{y:n,height:s}=t.children[t.children.length-1].BBox;Y(e,i+r.paddingX,a+o,i+r.paddingX,n+s/2+r.lineThickness/2,r.lineThickness)}},`processNode`);l(n);let u=s.filter(e=>e.node.description);if(u.length>0){let e=Math.max(...s.map(e=>e.labelRightEdge))+G;for(let t of u){let n=t.nodeGroup.append(`text`).text(t.node.description).attr(`dominant-baseline`,`middle`).attr(`class`,`treeView-node-description`).attr(`x`,e).attr(`y`,t.centerY).node().getBBox();o=Math.max(o,e+n.width+r.paddingX)}}for(let e of s)if(e.node.cssClass?.split(/\s+/).includes(`highlight`)){let t=e.nodeGroup.select(`.treeView-highlight-bg`);if(!t.empty()){let n=o-e.node.BBox.x+8;t.attr(`width`,n),o=Math.max(o,e.node.BBox.x+n+2)}}return{totalHeight:a,totalWidth:o}},`drawTree`),Z={draw:t(async(e,t,r,i)=>{n.debug(`Rendering treeView diagram
4
4
  `+e);let a=i.db,o=a.getRoot(),s=a.getConfig(),l=y(t);await q(l,o,s,t);let u=l.append(`g`);u.attr(`class`,`tree-view`);let{totalHeight:d,totalWidth:f}=X(u,o,s,t);l.attr(`viewBox`,`-${s.lineThickness/2} 0 ${f} ${d}`),c(l,d,f,s.useMaxWidth)},`draw`)},Q={labelFontSize:`16px`,labelColor:`black`,lineColor:`black`,iconColor:`#546e7a`,descriptionColor:`#6a9955`,highlightBg:`rgba(255, 193, 7, 0.15)`,highlightStroke:`#ffc107`},$={db:I,renderer:Z,parser:R,styles:t(({treeView:e})=>{let{labelFontSize:t,labelColor:n,lineColor:r,iconColor:i,descriptionColor:a,highlightBg:o,highlightStroke:s}=m(Q,e);return`
@@ -1,3 +1,3 @@
1
- import{p as e}from"./index-snBzz_U8.js";import{T as t}from"./chunk-KEIR6QF5-BICK3FdT.js";import{n}from"./mermaid-parser.core-BtmN233C.js";import{n as r}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{t as i}from"./src-CxJwpjvz.js";import{H as a,K as o,U as s,Y as c,a as l,b as u,f as d,v as f,w as p,x as m,y as h,z as g}from"./chunk-I66GZJ75-C-Lq_UXl.js";import{_,i as ee,t as te}from"./chunk-NSK5VX7P-Fi_H0vaS.js";import{t as ne}from"./chunk-JWPE2WC7-DVXcaiue.js";var v=`position frame`,y=`frame positioned`,b=`position relation`,x=`relation positioned`,re=r(function(e){i.debug(`options str`,e)},`setOptions`),ie=r(function(){return{}},`getOptions`),ae=r(function(){S(),l()},`clear`);function S(){C={}}r(S,`reset`);var oe=d.eventmodeling,se=r(()=>ee({...oe,...u().eventmodeling}),`getConfig`),C={};function w(){let e=ce,{ast:t}=C,n=D();if(!t)throw Error(`No data for EventModel`);return t.frames.forEach((r,a)=>{let o=P(r,t.dataEntities,n);e=J(e,{$kind:v,index:a,frame:r,textProps:o});let s;V(r)?(i.debug(`source frame`,r.sourceFrames),s=t.frames.filter(e=>r.sourceFrames.some(t=>t.$refText===e.name)),s.forEach(t=>{e=J(e,{$kind:b,index:a,frame:r,sourceFrame:t})})):e=J(e,{$kind:b,index:a,frame:r})}),e={...e,sortedSwimlanesArray:R(e.swimlanes)},e}r(w,`getState`);function T(e){C.ast=e}r(T,`setAst`);var E={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:`bold`,boxTextPadding:10,swimlaneTextFontWeight:`bold`,labelUiAutomation:`UI/Automation`,labelUiAutomationPrefix:`UI/A: `,labelCommandReadModel:`Command/Read Model`,labelCommandReadModelPrefix:`C/RM: `,labelEvents:`Events`,labelEventsPrefix:`Stream: `};function D(){return E}r(D,`getDiagramProps`);var ce={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function O(e){let t=e.split(`.`);if(t.length===2)return t[0]}r(O,`extractNamespace`);function k(e){let t=e.split(`.`);return t.length===2?t[1]:e}r(k,`extractName`);function A(e,t){if(!(!t||t.length===0))return Object.values(e).find(e=>e.namespace===t)}r(A,`findSwimlaneByNamespace`);function j(e,t,n){return Math.max(t,...Object.keys(e).filter(e=>{let r=Number.parseInt(e);return r>t&&r<n}).map(e=>Number.parseInt(e)))+1}r(j,`findNextAvailableIndex`);function M(e,t){let n=O(e.entityIdentifier),r=A(t,n);switch(e.modelEntityType){case`ui`:case`pcr`:case`processor`:return r?{index:r.index,label:r.namespace||E.labelUiAutomation}:n?{index:j(t,0,100),label:E.labelUiAutomationPrefix+n}:{index:0,label:E.labelUiAutomation};case`rmo`:case`readmodel`:case`cmd`:case`command`:return r?{index:r.index,label:r.namespace||E.labelCommandReadModel}:n?{index:j(t,100,200),label:E.labelCommandReadModelPrefix+n}:{index:100,label:E.labelCommandReadModel};default:return r?{index:r.index,label:r.namespace||E.labelEvents}:n?{index:j(t,200,300),label:E.labelEventsPrefix+n}:{index:200,label:E.labelEvents}}}r(M,`calculateSwimlaneProps`);function N(e){let{themeVariables:t}=u();switch(e.modelEntityType){case`ui`:return{fill:t.emUiFill??`white`,stroke:t.emUiStroke??`#dbdada`};case`pcr`:case`processor`:return{fill:t.emProcessorFill??`#edb3f6`,stroke:t.emProcessorStroke??`#b88cbf`};case`rmo`:case`readmodel`:return{fill:t.emReadModelFill??`#d3f1a2`,stroke:t.emReadModelStroke??`#a3b732`};case`cmd`:case`command`:return{fill:t.emCommandFill??`#bcd6fe`,stroke:t.emCommandStroke??`#679ac3`};case`evt`:case`event`:return{fill:t.emEventFill??`#ffb778`,stroke:t.emEventStroke??`#c19a0f`};default:return{fill:`red`,stroke:`black`}}}r(N,`calculateEntityVisualProps`);function P(e,t,n){let r=u(),a=g(k(e.entityIdentifier)??``,r),o,s={fontSize:16,fontWeight:700,fontFamily:`"trebuchet ms", verdana, arial, sans-serif`,joinWith:`<br/>`},c=`<b>${_(a,n.textMaxWidth,s)}</b>`;if(e.dataInlineValue&&(o=e.dataInlineValue,o=o.substring(o.indexOf(`{`)+1),o=o.substring(0,o.lastIndexOf(`}`)-1),o=g(o,r),o=_(o,n.textMaxWidth,s),o=o.replaceAll(` `,`&nbsp;`)),e.dataReference){let i=t.find(t=>t.name===e.dataReference?.$refText);i&&(o=i.dataBlockValue,o=o.substring(o.indexOf(`{
1
+ import{p as e}from"./index-Bn1BoT3w.js";import{T as t}from"./chunk-KEIR6QF5-BICK3FdT.js";import{n}from"./mermaid-parser.core-CwwjcAjz.js";import{n as r}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{t as i}from"./src-BR8qR3lM.js";import{H as a,K as o,U as s,Y as c,a as l,b as u,f as d,v as f,w as p,x as m,y as h,z as g}from"./chunk-I66GZJ75-b3yMIljX.js";import{_,i as ee,t as te}from"./chunk-NSK5VX7P-CfigFGDQ.js";import{t as ne}from"./chunk-JWPE2WC7-DVXcaiue.js";var v=`position frame`,y=`frame positioned`,b=`position relation`,x=`relation positioned`,re=r(function(e){i.debug(`options str`,e)},`setOptions`),ie=r(function(){return{}},`getOptions`),ae=r(function(){S(),l()},`clear`);function S(){C={}}r(S,`reset`);var oe=d.eventmodeling,se=r(()=>ee({...oe,...u().eventmodeling}),`getConfig`),C={};function w(){let e=ce,{ast:t}=C,n=D();if(!t)throw Error(`No data for EventModel`);return t.frames.forEach((r,a)=>{let o=P(r,t.dataEntities,n);e=J(e,{$kind:v,index:a,frame:r,textProps:o});let s;V(r)?(i.debug(`source frame`,r.sourceFrames),s=t.frames.filter(e=>r.sourceFrames.some(t=>t.$refText===e.name)),s.forEach(t=>{e=J(e,{$kind:b,index:a,frame:r,sourceFrame:t})})):e=J(e,{$kind:b,index:a,frame:r})}),e={...e,sortedSwimlanesArray:R(e.swimlanes)},e}r(w,`getState`);function T(e){C.ast=e}r(T,`setAst`);var E={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:`bold`,boxTextPadding:10,swimlaneTextFontWeight:`bold`,labelUiAutomation:`UI/Automation`,labelUiAutomationPrefix:`UI/A: `,labelCommandReadModel:`Command/Read Model`,labelCommandReadModelPrefix:`C/RM: `,labelEvents:`Events`,labelEventsPrefix:`Stream: `};function D(){return E}r(D,`getDiagramProps`);var ce={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function O(e){let t=e.split(`.`);if(t.length===2)return t[0]}r(O,`extractNamespace`);function k(e){let t=e.split(`.`);return t.length===2?t[1]:e}r(k,`extractName`);function A(e,t){if(!(!t||t.length===0))return Object.values(e).find(e=>e.namespace===t)}r(A,`findSwimlaneByNamespace`);function j(e,t,n){return Math.max(t,...Object.keys(e).filter(e=>{let r=Number.parseInt(e);return r>t&&r<n}).map(e=>Number.parseInt(e)))+1}r(j,`findNextAvailableIndex`);function M(e,t){let n=O(e.entityIdentifier),r=A(t,n);switch(e.modelEntityType){case`ui`:case`pcr`:case`processor`:return r?{index:r.index,label:r.namespace||E.labelUiAutomation}:n?{index:j(t,0,100),label:E.labelUiAutomationPrefix+n}:{index:0,label:E.labelUiAutomation};case`rmo`:case`readmodel`:case`cmd`:case`command`:return r?{index:r.index,label:r.namespace||E.labelCommandReadModel}:n?{index:j(t,100,200),label:E.labelCommandReadModelPrefix+n}:{index:100,label:E.labelCommandReadModel};default:return r?{index:r.index,label:r.namespace||E.labelEvents}:n?{index:j(t,200,300),label:E.labelEventsPrefix+n}:{index:200,label:E.labelEvents}}}r(M,`calculateSwimlaneProps`);function N(e){let{themeVariables:t}=u();switch(e.modelEntityType){case`ui`:return{fill:t.emUiFill??`white`,stroke:t.emUiStroke??`#dbdada`};case`pcr`:case`processor`:return{fill:t.emProcessorFill??`#edb3f6`,stroke:t.emProcessorStroke??`#b88cbf`};case`rmo`:case`readmodel`:return{fill:t.emReadModelFill??`#d3f1a2`,stroke:t.emReadModelStroke??`#a3b732`};case`cmd`:case`command`:return{fill:t.emCommandFill??`#bcd6fe`,stroke:t.emCommandStroke??`#679ac3`};case`evt`:case`event`:return{fill:t.emEventFill??`#ffb778`,stroke:t.emEventStroke??`#c19a0f`};default:return{fill:`red`,stroke:`black`}}}r(N,`calculateEntityVisualProps`);function P(e,t,n){let r=u(),a=g(k(e.entityIdentifier)??``,r),o,s={fontSize:16,fontWeight:700,fontFamily:`"trebuchet ms", verdana, arial, sans-serif`,joinWith:`<br/>`},c=`<b>${_(a,n.textMaxWidth,s)}</b>`;if(e.dataInlineValue&&(o=e.dataInlineValue,o=o.substring(o.indexOf(`{`)+1),o=o.substring(0,o.lastIndexOf(`}`)-1),o=g(o,r),o=_(o,n.textMaxWidth,s),o=o.replaceAll(` `,`&nbsp;`)),e.dataReference){let i=t.find(t=>t.name===e.dataReference?.$refText);i&&(o=i.dataBlockValue,o=o.substring(o.indexOf(`{
2
2
  `)+2),o=o.substring(0,o.lastIndexOf(`}`)-1),o=g(o,r),o=_(o,n.textMaxWidth,s),o=o.replaceAll(` `,`&nbsp;`),o+=`<br/>`)}let l=o!==void 0;l&&(c+=`<br/><br/><code style="text-align: left; display: block;max-width:${n.textMaxWidth}px">${o}</code>`);let d={fontSize:s.fontSize,fontWeight:s.fontWeight,fontFamily:s.fontFamily},f=te(c,d),p=l?f.width/3:f.width,m={content:c,width:p,height:f.height};return i.debug(`[${e.name}] ${e.entityIdentifier} text`,m),m}r(P,`calculateTextProps`);function F(e,t){let n=t,r=N(n.frame),i={width:n.textProps.width+2*E.boxTextPadding,height:n.textProps.height+2*E.boxTextPadding};return[{$kind:y,frame:n.frame,index:n.index,visual:r,dimension:i,textProps:n.textProps}]}r(F,`decidePositionFrame`);function I(e,t,n){return t===void 0?E.contentStartX:t.index===e.index&&e.r?e.r+E.boxPadding:n===void 0?E.contentStartX:n.r-E.boxOverlap+E.boxPadding}r(I,`calculateX`);function L(e,t){let n=[...e.map(e=>e.r),t];return Math.max(...n)}r(L,`calculateMaxRight`);function R(e){return Object.values(e).sort((e,t)=>e.index-t.index)}r(R,`sortedSwimlanesArray`);function z(e,t){let n=t,r=M(n.frame,e.swimlanes),i;i=r.index in e.swimlanes?e.swimlanes[r.index]:{index:r.index,label:r.label,r:0,y:r.index*E.swimlaneMinHeight+E.swimlaneGap,height:E.swimlaneMinHeight,maxHeight:E.swimlaneMinHeight};let a=e.boxes.length>0?e.boxes[e.boxes.length-1]:void 0,o=e.previousSwimlaneNumber===void 0?void 0:e.swimlanes[e.previousSwimlaneNumber],s={width:Math.max(E.boxMinWidth,Math.min(E.boxMaxWidth,n.dimension.width))+2*E.boxPadding,height:Math.max(E.boxMinHeight,Math.min(E.boxMaxHeight,n.dimension.height))+2*E.boxPadding},c=I(i,o,a),l=c+s.width+E.boxPadding,u=L(Object.values(e.swimlanes),l);i.r=c+s.width,i.maxHeight=Math.max(i.maxHeight,s.height),i.height=Math.max(E.swimlaneMinHeight,i.maxHeight)+2*E.swimlanePadding;let d={x:c,y:E.swimlanePadding+i.y,r:l,dimension:s,leftSibling:!1,swimlane:i,visual:n.visual,text:n.textProps.content,frame:n.frame,index:n.index},f={...e,boxes:[...e.boxes,d],swimlanes:{...e.swimlanes,[`${i.index}`]:i},previousSwimlaneNumber:r.index,previousFrame:n.frame,maxR:u},p=R(f.swimlanes);p.length>0&&(p[0].y=0);for(let e=1;e<p.length;e++){let t=p[e],n=p[e-1];t.y=n.y+n.height+E.swimlaneGap}return f}r(z,`evolveFramePositioned`);function B(e,t){return e===0&&t.sourceFrames.length===0}r(B,`isFirstFrame`);function V(e){return e.sourceFrames!==void 0&&e.sourceFrames!==null&&e.sourceFrames.length>0}r(V,`hasSourceFrame`);function H(e,t){if(t!=null)return e.find(e=>e.frame.name===t.name)}r(H,`findBoxByFrame`);function U(e,t,n){if(!(n<0))for(let r=n;r>=0;r--){let n=e[r];if(n.swimlane.index!==t)return n}}r(U,`findBoxByLineIndex`);function W(e,n){let r=n;if(t(r.frame)||B(r.index,r.frame))return[];let i=H(e.boxes,r.frame);if(i===void 0)throw Error(`Target box not found for frame ${r.frame.name}`);let a;return a=r.sourceFrame?H(e.boxes,r.sourceFrame):U(e.boxes,i.swimlane.index,r.index-1),a===void 0?[]:[{$kind:x,frame:r.frame,index:r.index,sourceBox:a,targetBox:i}]}r(W,`decidePositionRelation`);function G(e,t){let n=t,r={visual:{fill:`none`,stroke:`#000`},source:{x:n.sourceBox.x,y:n.sourceBox.y},target:{x:n.targetBox.x,y:n.targetBox.y},sourceBox:n.sourceBox,targetBox:n.targetBox};return{...e,relations:[...e.relations,r]}}r(G,`evolveRelationPositioned`);var le={[v]:F,[b]:W},ue={[y]:z,[x]:G};function K(e,t){let n=le[t.$kind];if(n==null)return[];let r=n(e,t);return i.debug(`decided events`,r),r}r(K,`decide`);function q(e,t){let n=t.reduce((e,t)=>{let n=ue[t.$kind];return n==null?e:n(e,t)},e);return i.debug(`evolve events`,{state:e,newState:n,events:t}),n}r(q,`evolve`);function J(e,t){return q(e,K(e,t))}r(J,`dispatch`);var Y={getConfig:se,setOptions:re,getOptions:ie,clear:ae,setAccTitle:s,getAccTitle:h,getAccDescription:f,setAccDescription:a,setDiagramTitle:o,getDiagramTitle:p,setAst:T,getDiagramProps:D,getState:w},de={parse:r(async e=>{let t=await n(`eventmodeling`,e);i.debug(t),Y.setAst(t),ne(t,Y)},`parse`)},fe=m()?.eventmodeling;function X(e,t){return n=>{let r=n.swimlane.y+t.swimlanePadding,i=e.append(`g`).attr(`class`,`em-box`);i.append(`rect`).attr(`x`,n.x).attr(`y`,r).attr(`rx`,`3`).attr(`width`,n.dimension.width).attr(`height`,n.dimension.height).attr(`stroke`,n.visual.stroke).attr(`fill`,n.visual.fill),i.append(`foreignObject`).attr(`x`,n.x+t.boxPadding).attr(`y`,r+10).attr(`width`,n.dimension.width-2*t.boxPadding).attr(`height`,n.dimension.height-2*t.boxPadding).append(`xhtml:div`).style(`display`,`table`).style(`height`,`100%`).style(`width`,`100%`).append(`span`).style(`display`,`table-cell`).style(`text-align`,`center`).style(`vertical-align`,`middle`).html(n.text)}}r(X,`renderD3Box`);function Z(e,t){return e>t}r(Z,`dirUpwards`);function Q(e,t,n,r){return a=>{let o=a.sourceBox.swimlane.y+t.swimlanePadding,s=a.targetBox.swimlane.y+t.swimlanePadding,c=Z(o,s),l=a.sourceBox.x+a.sourceBox.dimension.width*2/3,u=a.targetBox.x+a.targetBox.dimension.width/3,d,f;i.debug(`rendering relation up=${c} for `,{sourceBox:a.sourceBox,targetBox:a.targetBox}),c?(d=o,f=s+a.targetBox.dimension.height):(d=o+a.sourceBox.dimension.height,f=s);let p=r.emRelationStroke??a.visual.stroke;e.append(`path`).attr(`class`,`em-relation`).attr(`fill`,a.visual.fill).attr(`stroke`,p).attr(`stroke-width`,`1`).attr(`marker-end`,`url(#${n})`).attr(`d`,`M${l} ${d} L${u} ${f}`)}}r(Q,`renderD3Relation`);function $(e,t,n,r){return i=>{let a=e.append(`g`).attr(`class`,`em-swimlane`),o=r.emSwimlaneBackgroundOdd??`rgb(250,250,250)`,s=r.emSwimlaneBackgroundStroke??`rgb(240,240,240)`;a.append(`rect`).attr(`x`,0).attr(`y`,i.y).attr(`rx`,`3`).attr(`width`,t+n.swimlanePadding).attr(`height`,i.height).attr(`fill`,o).attr(`stroke`,s),a.append(`text`).attr(`font-weight`,n.swimlaneTextFontWeight).attr(`x`,30).attr(`y`,i.y+30).text(i.label)}}r($,`renderD3Swimlane`);var pe={parser:de,db:Y,renderer:{draw:r(function(t,n,r,a){if(i.debug(`in eventmodeling renderer`,t+`
3
3
  `,`id:`,n,r),!fe)throw Error(`EventModeling config not found`);let o=a.db,{themeVariables:s,eventmodeling:l}=m(),u=e(`[id="${n}"]`),d=o.getDiagramProps(),f=o.getState(),p=`em-arrowhead-${n}`,h=s.emArrowhead??`#000000`;f.sortedSwimlanesArray.forEach($(u,f.maxR,d,s)),f.boxes.forEach(X(u,d)),f.relations.forEach(Q(u,d,p,s)),u.append(`defs`).append(`marker`).attr(`id`,p).attr(`markerWidth`,`10`).attr(`markerHeight`,`7`).attr(`refX`,`10`).attr(`refY`,`3.5`).attr(`orient`,`auto`).append(`polygon`).attr(`points`,`0 0, 10 3.5, 0 7`).attr(`fill`,h),c(void 0,u,l?.padding??30,l?.useMaxWidth)},`draw`)},styles:r(e=>``,`getStyles`)};export{pe as diagram};
@@ -1,4 +1,4 @@
1
- import{n as e}from"./mermaid-parser.core-BtmN233C.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{t as n}from"./src-CxJwpjvz.js";import{H as r,K as i,U as a,a as o,b as s,c,f as l,v as u,w as d,y as f}from"./chunk-I66GZJ75-C-Lq_UXl.js";import{i as p}from"./chunk-NSK5VX7P-Fi_H0vaS.js";import{t as m}from"./chunk-JWPE2WC7-DVXcaiue.js";import{a as h}from"./mermaid.core-37H5_HoB.js";var g=l.packet,_=class{constructor(){this.packet=[],this.setAccTitle=a,this.getAccTitle=f,this.setDiagramTitle=i,this.getDiagramTitle=d,this.getAccDescription=u,this.setAccDescription=r}static{t(this,`PacketDB`)}getConfig(){let e=p({...g,...s().packet});return e.showBits&&(e.paddingY+=10),e}getPacket(){return this.packet}pushWord(e){e.length>0&&this.packet.push(e)}clear(){o(),this.packet=[]}},v=1e4,y=t((e,t)=>{m(e,t);let r=-1,i=[],a=1,{bitsPerRow:o}=t.getConfig();for(let{start:s,end:c,bits:l,label:u}of e.blocks){if(s!==void 0&&c!==void 0&&c<s)throw Error(`Packet block ${s} - ${c} is invalid. End must be greater than start.`);if(s??=r+1,s!==r+1)throw Error(`Packet block ${s} - ${c??s} is not contiguous. It should start from ${r+1}.`);if(l===0)throw Error(`Packet block ${s} is invalid. Cannot have a zero bit field.`);for(c??=s+(l??1)-1,l??=c-s+1,r=c,n.debug(`Packet block ${s} - ${r} with label ${u}`);i.length<=o+1&&t.getPacket().length<v;){let[e,n]=b({start:s,end:c,bits:l,label:u},a,o);if(i.push(e),e.end+1===a*o&&(t.pushWord(i),i=[],a++),!n)break;({start:s,end:c,bits:l,label:u}=n)}}t.pushWord(i)},`populate`),b=t((e,t,n)=>{if(e.start===void 0)throw Error(`start should have been set during first phase`);if(e.end===void 0)throw Error(`end should have been set during first phase`);if(e.start>e.end)throw Error(`Block start ${e.start} is greater than block end ${e.end}.`);if(e.end+1<=t*n)return[e,void 0];let r=t*n-1,i=t*n;return[{start:e.start,end:r,label:e.label,bits:r-e.start},{start:i,end:e.end,label:e.label,bits:e.end-i}]},`getNextFittingBlock`),x={parser:{yy:void 0},parse:t(async t=>{let r=await e(`packet`,t),i=x.parser?.yy;if(!(i instanceof _))throw Error(`parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);n.debug(r),y(r,i)},`parse`)},S=t((e,t,n,r)=>{let i=r.db,a=i.getConfig(),{rowHeight:o,paddingY:s,bitWidth:l,bitsPerRow:u}=a,d=i.getPacket(),f=i.getDiagramTitle(),p=o+s,m=p*(d.length+1)-(f?0:o),g=l*u+2,_=h(t);_.attr(`viewBox`,`0 0 ${g} ${m}`),c(_,m,g,a.useMaxWidth);for(let[e,t]of d.entries())C(_,t,e,a);_.append(`text`).text(f).attr(`x`,g/2).attr(`y`,m-p/2).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`).attr(`class`,`packetTitle`)},`draw`),C=t((e,t,n,{rowHeight:r,paddingX:i,paddingY:a,bitWidth:o,bitsPerRow:s,showBits:c})=>{let l=e.append(`g`),u=n*(r+a)+a;for(let e of t){let t=e.start%s*o+1,n=(e.end-e.start+1)*o-i;if(l.append(`rect`).attr(`x`,t).attr(`y`,u).attr(`width`,n).attr(`height`,r).attr(`class`,`packetBlock`),l.append(`text`).attr(`x`,t+n/2).attr(`y`,u+r/2).attr(`class`,`packetLabel`).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`).text(e.label),!c)continue;let a=e.end===e.start,d=u-2;l.append(`text`).attr(`x`,t+(a?n/2:0)).attr(`y`,d).attr(`class`,`packetByte start`).attr(`dominant-baseline`,`auto`).attr(`text-anchor`,a?`middle`:`start`).text(e.start),a||l.append(`text`).attr(`x`,t+n).attr(`y`,d).attr(`class`,`packetByte end`).attr(`dominant-baseline`,`auto`).attr(`text-anchor`,`end`).text(e.end)}},`drawWord`),w={draw:S},T={byteFontSize:`10px`,startByteColor:`black`,endByteColor:`black`,labelColor:`black`,labelFontSize:`12px`,titleColor:`black`,titleFontSize:`14px`,blockStrokeColor:`black`,blockStrokeWidth:`1`,blockFillColor:`#efefef`},E={parser:x,get db(){return new _},renderer:w,styles:t(({packet:e}={})=>{let t=p(T,e);return`
1
+ import{n as e}from"./mermaid-parser.core-CwwjcAjz.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{t as n}from"./src-BR8qR3lM.js";import{H as r,K as i,U as a,a as o,b as s,c,f as l,v as u,w as d,y as f}from"./chunk-I66GZJ75-b3yMIljX.js";import{i as p}from"./chunk-NSK5VX7P-CfigFGDQ.js";import{t as m}from"./chunk-JWPE2WC7-DVXcaiue.js";import{a as h}from"./mermaid.core-hmS_M4K5.js";var g=l.packet,_=class{constructor(){this.packet=[],this.setAccTitle=a,this.getAccTitle=f,this.setDiagramTitle=i,this.getDiagramTitle=d,this.getAccDescription=u,this.setAccDescription=r}static{t(this,`PacketDB`)}getConfig(){let e=p({...g,...s().packet});return e.showBits&&(e.paddingY+=10),e}getPacket(){return this.packet}pushWord(e){e.length>0&&this.packet.push(e)}clear(){o(),this.packet=[]}},v=1e4,y=t((e,t)=>{m(e,t);let r=-1,i=[],a=1,{bitsPerRow:o}=t.getConfig();for(let{start:s,end:c,bits:l,label:u}of e.blocks){if(s!==void 0&&c!==void 0&&c<s)throw Error(`Packet block ${s} - ${c} is invalid. End must be greater than start.`);if(s??=r+1,s!==r+1)throw Error(`Packet block ${s} - ${c??s} is not contiguous. It should start from ${r+1}.`);if(l===0)throw Error(`Packet block ${s} is invalid. Cannot have a zero bit field.`);for(c??=s+(l??1)-1,l??=c-s+1,r=c,n.debug(`Packet block ${s} - ${r} with label ${u}`);i.length<=o+1&&t.getPacket().length<v;){let[e,n]=b({start:s,end:c,bits:l,label:u},a,o);if(i.push(e),e.end+1===a*o&&(t.pushWord(i),i=[],a++),!n)break;({start:s,end:c,bits:l,label:u}=n)}}t.pushWord(i)},`populate`),b=t((e,t,n)=>{if(e.start===void 0)throw Error(`start should have been set during first phase`);if(e.end===void 0)throw Error(`end should have been set during first phase`);if(e.start>e.end)throw Error(`Block start ${e.start} is greater than block end ${e.end}.`);if(e.end+1<=t*n)return[e,void 0];let r=t*n-1,i=t*n;return[{start:e.start,end:r,label:e.label,bits:r-e.start},{start:i,end:e.end,label:e.label,bits:e.end-i}]},`getNextFittingBlock`),x={parser:{yy:void 0},parse:t(async t=>{let r=await e(`packet`,t),i=x.parser?.yy;if(!(i instanceof _))throw Error(`parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);n.debug(r),y(r,i)},`parse`)},S=t((e,t,n,r)=>{let i=r.db,a=i.getConfig(),{rowHeight:o,paddingY:s,bitWidth:l,bitsPerRow:u}=a,d=i.getPacket(),f=i.getDiagramTitle(),p=o+s,m=p*(d.length+1)-(f?0:o),g=l*u+2,_=h(t);_.attr(`viewBox`,`0 0 ${g} ${m}`),c(_,m,g,a.useMaxWidth);for(let[e,t]of d.entries())C(_,t,e,a);_.append(`text`).text(f).attr(`x`,g/2).attr(`y`,m-p/2).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`).attr(`class`,`packetTitle`)},`draw`),C=t((e,t,n,{rowHeight:r,paddingX:i,paddingY:a,bitWidth:o,bitsPerRow:s,showBits:c})=>{let l=e.append(`g`),u=n*(r+a)+a;for(let e of t){let t=e.start%s*o+1,n=(e.end-e.start+1)*o-i;if(l.append(`rect`).attr(`x`,t).attr(`y`,u).attr(`width`,n).attr(`height`,r).attr(`class`,`packetBlock`),l.append(`text`).attr(`x`,t+n/2).attr(`y`,u+r/2).attr(`class`,`packetLabel`).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`).text(e.label),!c)continue;let a=e.end===e.start,d=u-2;l.append(`text`).attr(`x`,t+(a?n/2:0)).attr(`y`,d).attr(`class`,`packetByte start`).attr(`dominant-baseline`,`auto`).attr(`text-anchor`,a?`middle`:`start`).text(e.start),a||l.append(`text`).attr(`x`,t+n).attr(`y`,d).attr(`class`,`packetByte end`).attr(`dominant-baseline`,`auto`).attr(`text-anchor`,`end`).text(e.end)}},`drawWord`),w={draw:S},T={byteFontSize:`10px`,startByteColor:`black`,endByteColor:`black`,labelColor:`black`,labelFontSize:`12px`,titleColor:`black`,titleFontSize:`14px`,blockStrokeColor:`black`,blockStrokeWidth:`1`,blockFillColor:`#efefef`},E={parser:x,get db(){return new _},renderer:w,styles:t(({packet:e}={})=>{let t=p(T,e);return`
2
2
  .packetByte {
3
3
  font-size: ${t.byteFontSize};
4
4
  }
@@ -1,4 +1,4 @@
1
- import{p as e}from"./index-snBzz_U8.js";import{n as t}from"./mermaid-parser.core-BtmN233C.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{t as r}from"./src-CxJwpjvz.js";import{D as i,H as a,K as o,U as s,a as c,b as l,c as u,f as d,v as f,w as p,y as m}from"./chunk-I66GZJ75-C-Lq_UXl.js";import{t as h}from"./ordinal-BDEzSJ7C.js";import{t as g}from"./defaultLocale-BFoDCU3G.js";import{i as _}from"./chunk-NSK5VX7P-Fi_H0vaS.js";import{t as v}from"./chunk-JWPE2WC7-DVXcaiue.js";import{t as y}from"./chunk-KBJHAD2P-BS9N9gG4.js";import{i as b,n as x}from"./chunk-W5SLKNZC-CXrJJ0BX.js";import{a as S}from"./mermaid.core-37H5_HoB.js";function C(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function w(){return this.eachAfter(C)}function T(e,t){let n=-1;for(let r of this)e.call(t,r,++n,this);return this}function E(e,t){for(var n=this,r=[n],i,a,o=-1;n=r.pop();)if(e.call(t,n,++o,this),i=n.children)for(a=i.length-1;a>=0;--a)r.push(i[a]);return this}function D(e,t){for(var n=this,r=[n],i=[],a,o,s,c=-1;n=r.pop();)if(i.push(n),a=n.children)for(o=0,s=a.length;o<s;++o)r.push(a[o]);for(;n=i.pop();)e.call(t,n,++c,this);return this}function O(e,t){let n=-1;for(let r of this)if(e.call(t,r,++n,this))return r}function k(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})}function A(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function j(e){for(var t=this,n=M(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function M(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function N(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function P(){return Array.from(this)}function F(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function I(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*L(){var e=this,t,n=[e],r,i,a;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,r=e.children)for(i=0,a=r.length;i<a;++i)n.push(r[i]);while(n.length)}function R(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=V)):t===void 0&&(t=B);for(var n=new W(e),r,i=[n],a,o,s,c;r=i.pop();)if((o=t(r.data))&&(c=(o=Array.from(o)).length))for(r.children=o,s=c-1;s>=0;--s)i.push(a=o[s]=new W(o[s])),a.parent=r,a.depth=r.depth+1;return n.eachBefore(U)}function z(){return R(this).eachBefore(H)}function B(e){return e.children}function V(e){return Array.isArray(e)?e[1]:null}function H(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function U(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function W(e){this.data=e,this.depth=this.height=0,this.parent=null}W.prototype=R.prototype={constructor:W,count:w,each:T,eachAfter:D,eachBefore:E,find:O,sum:k,sort:A,path:j,ancestors:N,descendants:P,leaves:F,links:I,copy:z,[Symbol.iterator]:L};function G(e){if(typeof e!=`function`)throw Error();return e}function K(){return 0}function q(e){return function(){return e}}function ee(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function te(e,t,n,r,i){for(var a=e.children,o,s=-1,c=a.length,l=e.value&&(r-t)/e.value;++s<c;)o=a[s],o.y0=n,o.y1=i,o.x0=t,o.x1=t+=o.value*l}function ne(e,t,n,r,i){for(var a=e.children,o,s=-1,c=a.length,l=e.value&&(i-n)/e.value;++s<c;)o=a[s],o.x0=t,o.x1=r,o.y0=n,o.y1=n+=o.value*l}var re=(1+Math.sqrt(5))/2;function ie(e,t,n,r,i,a){for(var o=[],s=t.children,c,l,u=0,d=0,f=s.length,p,m,h=t.value,g,_,v,y,b,x,S;u<f;){p=i-n,m=a-r;do g=s[d++].value;while(!g&&d<f);for(_=v=g,x=Math.max(m/p,p/m)/(h*e),S=g*g*x,b=Math.max(v/S,S/_);d<f;++d){if(g+=l=s[d].value,l<_&&(_=l),l>v&&(v=l),S=g*g*x,y=Math.max(v/S,S/_),y>b){g-=l;break}b=y}o.push(c={value:g,dice:p<m,children:s.slice(u,d)}),c.dice?te(c,n,r,i,h?r+=m*g/h:a):ne(c,n,r,h?n+=p*g/h:i,a),h-=g,u=d}return o}var ae=(function e(t){function n(e,n,r,i,a){ie(t,e,n,r,i,a)}return n.ratio=function(t){return e((t=+t)>1?t:1)},n})(re);function oe(){var e=ae,t=!1,n=1,r=1,i=[0],a=K,o=K,s=K,c=K,l=K;function u(e){return e.x0=e.y0=0,e.x1=n,e.y1=r,e.eachBefore(d),i=[0],t&&e.eachBefore(ee),e}function d(t){var n=i[t.depth],r=t.x0+n,u=t.y0+n,d=t.x1-n,f=t.y1-n;d<r&&(r=d=(r+d)/2),f<u&&(u=f=(u+f)/2),t.x0=r,t.y0=u,t.x1=d,t.y1=f,t.children&&(n=i[t.depth+1]=a(t)/2,r+=l(t)-n,u+=o(t)-n,d-=s(t)-n,f-=c(t)-n,d<r&&(r=d=(r+d)/2),f<u&&(u=f=(u+f)/2),e(t,r,u,d,f))}return u.round=function(e){return arguments.length?(t=!!e,u):t},u.size=function(e){return arguments.length?(n=+e[0],r=+e[1],u):[n,r]},u.tile=function(t){return arguments.length?(e=G(t),u):e},u.padding=function(e){return arguments.length?u.paddingInner(e).paddingOuter(e):u.paddingInner()},u.paddingInner=function(e){return arguments.length?(a=typeof e==`function`?e:q(+e),u):a},u.paddingOuter=function(e){return arguments.length?u.paddingTop(e).paddingRight(e).paddingBottom(e).paddingLeft(e):u.paddingTop()},u.paddingTop=function(e){return arguments.length?(o=typeof e==`function`?e:q(+e),u):o},u.paddingRight=function(e){return arguments.length?(s=typeof e==`function`?e:q(+e),u):s},u.paddingBottom=function(e){return arguments.length?(c=typeof e==`function`?e:q(+e),u):c},u.paddingLeft=function(e){return arguments.length?(l=typeof e==`function`?e:q(+e),u):l},u}var J=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=s,this.getAccTitle=m,this.setDiagramTitle=o,this.getDiagramTitle=p,this.getAccDescription=f,this.setAccDescription=a}static{n(this,`TreeMapDB`)}getNodes(){return this.nodes}getConfig(){let e=d,t=l();return _({...e.treemap,...t.treemap??{}})}addNode(e,t){this.nodes.push(e),this.levels.set(e,t),t===0&&(this.outerNodes.push(e),this.root??=e)}getRoot(){return{name:``,children:this.outerNodes}}addClass(e,t){let n=this.classes.get(e)??{id:e,styles:[],textStyles:[]},r=t.replace(/\\,/g,`§§§`).replace(/,/g,`;`).replace(/§§§/g,`,`).split(`;`);r&&r.forEach(e=>{x(e)&&(n?.textStyles?n.textStyles.push(e):n.textStyles=[e]),n?.styles?n.styles.push(e):n.styles=[e]}),this.classes.set(e,n)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){c(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function Y(e){if(!e.length)return[];let t=[],n=[];return e.forEach(e=>{let r={name:e.name,children:e.type===`Leaf`?void 0:[]};for(r.classSelector=e?.classSelector,e?.cssCompiledStyles&&(r.cssCompiledStyles=e.cssCompiledStyles),e.type===`Leaf`&&e.value!==void 0&&(r.value=e.value);n.length>0&&n[n.length-1].level>=e.level;)n.pop();if(n.length===0)t.push(r);else{let e=n[n.length-1].node;e.children?e.children.push(r):e.children=[r]}e.type!==`Leaf`&&n.push({node:r,level:e.level})}),t}n(Y,`buildHierarchy`);var se=n((e,t)=>{v(e,t);let r=[];for(let n of e.TreemapRows??[])n.$type===`ClassDefStatement`&&t.addClass(n.className??``,n.styleText??``);for(let n of e.TreemapRows??[]){let e=n.item;if(!e)continue;let i=n.indent?parseInt(n.indent):0,a=ce(e),o=e.classSelector?t.getStylesForClass(e.classSelector):[],s=o.length>0?o:void 0,c={level:i,name:a,type:e.$type,value:e.value,classSelector:e.classSelector,cssCompiledStyles:s};r.push(c)}let i=Y(r),a=n((e,n)=>{for(let r of e)t.addNode(r,n),r.children&&r.children.length>0&&a(r.children,n+1)},`addNodesRecursively`);a(i,0)},`populate`),ce=n(e=>e.name?String(e.name):``,`getItemName`),X={parser:{yy:void 0},parse:n(async e=>{try{let n=await t(`treemap`,e);r.debug(`Treemap AST:`,n);let i=X.parser?.yy;if(!(i instanceof J))throw Error(`parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);se(n,i)}catch(e){throw r.error(`Error parsing treemap:`,e),e}},`parse`)},Z=10,Q=10,$=25,le={draw:n((t,i,a,o)=>{let s=o.db,c=s.getConfig(),d=c.padding??Z,f=s.getDiagramTitle(),p=s.getRoot(),{themeVariables:m}=l();if(!p)return;let _=f?30:0,v=S(i),x=c.nodeWidth?c.nodeWidth*Q:960,C=c.nodeHeight?c.nodeHeight*Q:500,w=x,T=C+_;v.attr(`viewBox`,`0 0 ${w} ${T}`),u(v,T,w,c.useMaxWidth);let E;try{let e=c.valueFormat||`,`;if(e===`$0,0`)E=n(e=>`$`+g(`,`)(e),`valueFormat`);else if(e.startsWith(`$`)&&e.includes(`,`)){let t=/\.\d+/.exec(e),r=t?t[0]:``;E=n(e=>`$`+g(`,`+r)(e),`valueFormat`)}else if(e.startsWith(`$`)){let t=e.substring(1);E=n(e=>`$`+g(t||``)(e),`valueFormat`)}else E=g(e)}catch(e){r.error(`Error creating format function:`,e),E=g(`,`)}let D=h().range([`transparent`,m.cScale0,m.cScale1,m.cScale2,m.cScale3,m.cScale4,m.cScale5,m.cScale6,m.cScale7,m.cScale8,m.cScale9,m.cScale10,m.cScale11]),O=h().range([`transparent`,m.cScalePeer0,m.cScalePeer1,m.cScalePeer2,m.cScalePeer3,m.cScalePeer4,m.cScalePeer5,m.cScalePeer6,m.cScalePeer7,m.cScalePeer8,m.cScalePeer9,m.cScalePeer10,m.cScalePeer11]),k=h().range([m.cScaleLabel0,m.cScaleLabel1,m.cScaleLabel2,m.cScaleLabel3,m.cScaleLabel4,m.cScaleLabel5,m.cScaleLabel6,m.cScaleLabel7,m.cScaleLabel8,m.cScaleLabel9,m.cScaleLabel10,m.cScaleLabel11]);f&&v.append(`text`).attr(`x`,w/2).attr(`y`,_/2).attr(`class`,`treemapTitle`).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(f);let A=v.append(`g`).attr(`transform`,`translate(0, ${_})`).attr(`class`,`treemapContainer`),j=R(p).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),M=oe().size([x,C]).paddingTop(e=>e.children&&e.children.length>0?$+Q:0).paddingInner(d).paddingLeft(e=>e.children&&e.children.length>0?Q:0).paddingRight(e=>e.children&&e.children.length>0?Q:0).paddingBottom(e=>e.children&&e.children.length>0?Q:0).round(!0)(j),N=M.descendants().filter(e=>e.children&&e.children.length>0),P=A.selectAll(`.treemapSection`).data(N).enter().append(`g`).attr(`class`,`treemapSection`).attr(`transform`,e=>`translate(${e.x0},${e.y0})`);P.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,$).attr(`class`,`treemapSectionHeader`).attr(`fill`,`none`).attr(`fill-opacity`,.6).attr(`stroke-width`,.6).attr(`style`,e=>e.depth===0?`display: none;`:``),P.append(`clipPath`).attr(`id`,(e,t)=>`clip-section-${i}-${t}`).append(`rect`).attr(`width`,e=>Math.max(0,e.x1-e.x0-12)).attr(`height`,$),P.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,e=>e.y1-e.y0).attr(`class`,(e,t)=>`treemapSection section${t}`).attr(`fill`,e=>D(e.data.name)).attr(`fill-opacity`,.6).attr(`stroke`,e=>O(e.data.name)).attr(`stroke-width`,2).attr(`stroke-opacity`,.4).attr(`style`,e=>{if(e.depth===0)return`display: none;`;let t=b({cssCompiledStyles:e.data.cssCompiledStyles});return t.nodeStyles+`;`+t.borderStyles.join(`;`)}),P.append(`text`).attr(`class`,`treemapSectionLabel`).attr(`x`,6).attr(`y`,$/2).attr(`dominant-baseline`,`middle`).text(e=>e.depth===0?``:e.data.name).attr(`font-weight`,`bold`).attr(`clip-path`,(e,t)=>`url(#clip-section-${i}-${t})`).attr(`style`,e=>e.depth===0?`display: none;`:`dominant-baseline: middle; font-size: 12px; fill:`+k(e.data.name)+`; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;`+b({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).each(function(t){if(t.depth===0)return;let n=e(this),r=t.data.name;n.text(r);let i=t.x1-t.x0,a;a=c.showValues!==!1&&t.value?i-10-30-10-6:i-6-6;let o=Math.max(15,a),s=n.node();if(s.getComputedTextLength()>o){let e=r;for(;e.length>0;){if(e=r.substring(0,e.length-1),e.length===0){n.text(`...`),s.getComputedTextLength()>o&&n.text(``);break}if(n.text(e+`...`),s.getComputedTextLength()<=o)break}}}),c.showValues!==!1&&P.append(`text`).attr(`class`,`treemapSectionValue`).attr(`x`,e=>e.x1-e.x0-10).attr(`y`,$/2).attr(`text-anchor`,`end`).attr(`dominant-baseline`,`middle`).text(e=>e.value?E(e.value):``).attr(`font-style`,`italic`).attr(`style`,e=>e.depth===0?`display: none;`:`text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:`+k(e.data.name)+`; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;`+b({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`));let F=M.leaves(),I=F.length>20,L=I?16:38,z=I?14:28,B=I?4:8,V=I?4:6,H=I?2:4,U=I?8:10,W=I?1:2,G=A.selectAll(`.treemapLeafGroup`).data(F).enter().append(`g`).attr(`class`,(e,t)=>`treemapNode treemapLeafGroup leaf${t}${e.data.classSelector?` ${e.data.classSelector}`:``}x`).attr(`transform`,e=>`translate(${e.x0},${e.y0})`);G.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,e=>e.y1-e.y0).attr(`class`,`treemapLeaf`).attr(`fill`,e=>e.parent?D(e.parent.data.name):D(e.data.name)).attr(`style`,e=>b({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr(`fill-opacity`,.3).attr(`stroke`,e=>e.parent?D(e.parent.data.name):D(e.data.name)).attr(`stroke-width`,3),G.append(`clipPath`).attr(`id`,(e,t)=>`clip-${i}-${t}`).append(`rect`).attr(`width`,e=>Math.max(0,e.x1-e.x0-4)).attr(`height`,e=>Math.max(0,e.y1-e.y0-4)),G.append(`text`).attr(`class`,`treemapLabel`).attr(`x`,e=>(e.x1-e.x0)/2).attr(`y`,e=>(e.y1-e.y0)/2).attr(`style`,e=>`text-anchor: middle; dominant-baseline: middle; font-size: ${L}px;fill:`+k(e.data.name)+`;`+b({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).attr(`clip-path`,(e,t)=>`url(#clip-${i}-${t})`).text(e=>e.data.name).each(function(t){let n=e(this),r=t.x1-t.x0,i=t.y1-t.y0,a=n.node(),o=r-2*H,s=i-2*H;if(o<U||s<U){n.style(`display`,`none`);return}let c=parseInt(n.style(`font-size`),10),l=.6;for(;a.getComputedTextLength()>o&&c>B;)c--,n.style(`font-size`,`${c}px`);let u=Math.max(V,Math.min(z,Math.round(c*l))),d=c+W+u;for(;d>s&&c>B&&(c--,u=Math.max(V,Math.min(z,Math.round(c*l))),!(u<V&&c===B));)n.style(`font-size`,`${c}px`),d=c+W+u;n.style(`font-size`,`${c}px`),I?(c<B||s<B)&&n.style(`display`,`none`):(a.getComputedTextLength()>o||c<B||s<c)&&n.style(`display`,`none`)}),c.showValues!==!1&&G.append(`text`).attr(`class`,`treemapValue`).attr(`x`,e=>(e.x1-e.x0)/2).attr(`y`,function(e){return(e.y1-e.y0)/2}).attr(`style`,e=>`text-anchor: middle; dominant-baseline: hanging; font-size: ${z}px;fill:`+k(e.data.name)+`;`+b({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).attr(`clip-path`,(e,t)=>`url(#clip-${i}-${t})`).text(e=>e.value?E(e.value):``).each(function(t){let n=e(this),r=this.parentNode;if(!r){n.style(`display`,`none`);return}let i=e(r).select(`.treemapLabel`);if(i.empty()||i.style(`display`)===`none`){n.style(`display`,`none`);return}let a=parseFloat(i.style(`font-size`)),o=Math.max(V,Math.min(z,Math.round(a*.6)));n.style(`font-size`,`${o}px`);let s=(t.y1-t.y0)/2+a/2+W;n.attr(`y`,s);let c=t.x1-t.x0,l=t.y1-t.y0-4,u=c-2*H;n.node().getComputedTextLength()>u||s+o>l||o<V?n.style(`display`,`none`):n.style(`display`,null)});let K=c.diagramPadding??8;y(v,K,`flowchart`,c?.useMaxWidth||!1)},`draw`),getClasses:n(function(e,t){return t.db.getClasses()},`getClasses`)},ue={sectionStrokeColor:`black`,sectionStrokeWidth:`1`,sectionFillColor:`#efefef`,leafStrokeColor:`black`,leafStrokeWidth:`1`,leafFillColor:`#efefef`,labelFontSize:`12px`,valueFontSize:`10px`,titleFontSize:`14px`},de={parser:X,get db(){return new J},renderer:le,styles:n(({treemap:e}={})=>{let t=i(),n=l(),r=_(t,n.themeVariables),a=_(ue,e),o=a.titleColor??r.titleColor,s=a.labelColor??r.textColor,c=a.valueColor??r.textColor;return`
1
+ import{p as e}from"./index-Bn1BoT3w.js";import{n as t}from"./mermaid-parser.core-CwwjcAjz.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{t as r}from"./src-BR8qR3lM.js";import{D as i,H as a,K as o,U as s,a as c,b as l,c as u,f as d,v as f,w as p,y as m}from"./chunk-I66GZJ75-b3yMIljX.js";import{t as h}from"./ordinal-BDEzSJ7C.js";import{t as g}from"./defaultLocale-BFoDCU3G.js";import{i as _}from"./chunk-NSK5VX7P-CfigFGDQ.js";import{t as v}from"./chunk-JWPE2WC7-DVXcaiue.js";import{t as y}from"./chunk-KBJHAD2P-CS7eflbk.js";import{i as b,n as x}from"./chunk-W5SLKNZC-BSLytTSJ.js";import{a as S}from"./mermaid.core-hmS_M4K5.js";function C(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function w(){return this.eachAfter(C)}function T(e,t){let n=-1;for(let r of this)e.call(t,r,++n,this);return this}function E(e,t){for(var n=this,r=[n],i,a,o=-1;n=r.pop();)if(e.call(t,n,++o,this),i=n.children)for(a=i.length-1;a>=0;--a)r.push(i[a]);return this}function D(e,t){for(var n=this,r=[n],i=[],a,o,s,c=-1;n=r.pop();)if(i.push(n),a=n.children)for(o=0,s=a.length;o<s;++o)r.push(a[o]);for(;n=i.pop();)e.call(t,n,++c,this);return this}function O(e,t){let n=-1;for(let r of this)if(e.call(t,r,++n,this))return r}function k(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})}function A(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function j(e){for(var t=this,n=M(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function M(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function N(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function P(){return Array.from(this)}function F(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function I(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*L(){var e=this,t,n=[e],r,i,a;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,r=e.children)for(i=0,a=r.length;i<a;++i)n.push(r[i]);while(n.length)}function R(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=V)):t===void 0&&(t=B);for(var n=new W(e),r,i=[n],a,o,s,c;r=i.pop();)if((o=t(r.data))&&(c=(o=Array.from(o)).length))for(r.children=o,s=c-1;s>=0;--s)i.push(a=o[s]=new W(o[s])),a.parent=r,a.depth=r.depth+1;return n.eachBefore(U)}function z(){return R(this).eachBefore(H)}function B(e){return e.children}function V(e){return Array.isArray(e)?e[1]:null}function H(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function U(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function W(e){this.data=e,this.depth=this.height=0,this.parent=null}W.prototype=R.prototype={constructor:W,count:w,each:T,eachAfter:D,eachBefore:E,find:O,sum:k,sort:A,path:j,ancestors:N,descendants:P,leaves:F,links:I,copy:z,[Symbol.iterator]:L};function G(e){if(typeof e!=`function`)throw Error();return e}function K(){return 0}function q(e){return function(){return e}}function ee(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function te(e,t,n,r,i){for(var a=e.children,o,s=-1,c=a.length,l=e.value&&(r-t)/e.value;++s<c;)o=a[s],o.y0=n,o.y1=i,o.x0=t,o.x1=t+=o.value*l}function ne(e,t,n,r,i){for(var a=e.children,o,s=-1,c=a.length,l=e.value&&(i-n)/e.value;++s<c;)o=a[s],o.x0=t,o.x1=r,o.y0=n,o.y1=n+=o.value*l}var re=(1+Math.sqrt(5))/2;function ie(e,t,n,r,i,a){for(var o=[],s=t.children,c,l,u=0,d=0,f=s.length,p,m,h=t.value,g,_,v,y,b,x,S;u<f;){p=i-n,m=a-r;do g=s[d++].value;while(!g&&d<f);for(_=v=g,x=Math.max(m/p,p/m)/(h*e),S=g*g*x,b=Math.max(v/S,S/_);d<f;++d){if(g+=l=s[d].value,l<_&&(_=l),l>v&&(v=l),S=g*g*x,y=Math.max(v/S,S/_),y>b){g-=l;break}b=y}o.push(c={value:g,dice:p<m,children:s.slice(u,d)}),c.dice?te(c,n,r,i,h?r+=m*g/h:a):ne(c,n,r,h?n+=p*g/h:i,a),h-=g,u=d}return o}var ae=(function e(t){function n(e,n,r,i,a){ie(t,e,n,r,i,a)}return n.ratio=function(t){return e((t=+t)>1?t:1)},n})(re);function oe(){var e=ae,t=!1,n=1,r=1,i=[0],a=K,o=K,s=K,c=K,l=K;function u(e){return e.x0=e.y0=0,e.x1=n,e.y1=r,e.eachBefore(d),i=[0],t&&e.eachBefore(ee),e}function d(t){var n=i[t.depth],r=t.x0+n,u=t.y0+n,d=t.x1-n,f=t.y1-n;d<r&&(r=d=(r+d)/2),f<u&&(u=f=(u+f)/2),t.x0=r,t.y0=u,t.x1=d,t.y1=f,t.children&&(n=i[t.depth+1]=a(t)/2,r+=l(t)-n,u+=o(t)-n,d-=s(t)-n,f-=c(t)-n,d<r&&(r=d=(r+d)/2),f<u&&(u=f=(u+f)/2),e(t,r,u,d,f))}return u.round=function(e){return arguments.length?(t=!!e,u):t},u.size=function(e){return arguments.length?(n=+e[0],r=+e[1],u):[n,r]},u.tile=function(t){return arguments.length?(e=G(t),u):e},u.padding=function(e){return arguments.length?u.paddingInner(e).paddingOuter(e):u.paddingInner()},u.paddingInner=function(e){return arguments.length?(a=typeof e==`function`?e:q(+e),u):a},u.paddingOuter=function(e){return arguments.length?u.paddingTop(e).paddingRight(e).paddingBottom(e).paddingLeft(e):u.paddingTop()},u.paddingTop=function(e){return arguments.length?(o=typeof e==`function`?e:q(+e),u):o},u.paddingRight=function(e){return arguments.length?(s=typeof e==`function`?e:q(+e),u):s},u.paddingBottom=function(e){return arguments.length?(c=typeof e==`function`?e:q(+e),u):c},u.paddingLeft=function(e){return arguments.length?(l=typeof e==`function`?e:q(+e),u):l},u}var J=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=s,this.getAccTitle=m,this.setDiagramTitle=o,this.getDiagramTitle=p,this.getAccDescription=f,this.setAccDescription=a}static{n(this,`TreeMapDB`)}getNodes(){return this.nodes}getConfig(){let e=d,t=l();return _({...e.treemap,...t.treemap??{}})}addNode(e,t){this.nodes.push(e),this.levels.set(e,t),t===0&&(this.outerNodes.push(e),this.root??=e)}getRoot(){return{name:``,children:this.outerNodes}}addClass(e,t){let n=this.classes.get(e)??{id:e,styles:[],textStyles:[]},r=t.replace(/\\,/g,`§§§`).replace(/,/g,`;`).replace(/§§§/g,`,`).split(`;`);r&&r.forEach(e=>{x(e)&&(n?.textStyles?n.textStyles.push(e):n.textStyles=[e]),n?.styles?n.styles.push(e):n.styles=[e]}),this.classes.set(e,n)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){c(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function Y(e){if(!e.length)return[];let t=[],n=[];return e.forEach(e=>{let r={name:e.name,children:e.type===`Leaf`?void 0:[]};for(r.classSelector=e?.classSelector,e?.cssCompiledStyles&&(r.cssCompiledStyles=e.cssCompiledStyles),e.type===`Leaf`&&e.value!==void 0&&(r.value=e.value);n.length>0&&n[n.length-1].level>=e.level;)n.pop();if(n.length===0)t.push(r);else{let e=n[n.length-1].node;e.children?e.children.push(r):e.children=[r]}e.type!==`Leaf`&&n.push({node:r,level:e.level})}),t}n(Y,`buildHierarchy`);var se=n((e,t)=>{v(e,t);let r=[];for(let n of e.TreemapRows??[])n.$type===`ClassDefStatement`&&t.addClass(n.className??``,n.styleText??``);for(let n of e.TreemapRows??[]){let e=n.item;if(!e)continue;let i=n.indent?parseInt(n.indent):0,a=ce(e),o=e.classSelector?t.getStylesForClass(e.classSelector):[],s=o.length>0?o:void 0,c={level:i,name:a,type:e.$type,value:e.value,classSelector:e.classSelector,cssCompiledStyles:s};r.push(c)}let i=Y(r),a=n((e,n)=>{for(let r of e)t.addNode(r,n),r.children&&r.children.length>0&&a(r.children,n+1)},`addNodesRecursively`);a(i,0)},`populate`),ce=n(e=>e.name?String(e.name):``,`getItemName`),X={parser:{yy:void 0},parse:n(async e=>{try{let n=await t(`treemap`,e);r.debug(`Treemap AST:`,n);let i=X.parser?.yy;if(!(i instanceof J))throw Error(`parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);se(n,i)}catch(e){throw r.error(`Error parsing treemap:`,e),e}},`parse`)},Z=10,Q=10,$=25,le={draw:n((t,i,a,o)=>{let s=o.db,c=s.getConfig(),d=c.padding??Z,f=s.getDiagramTitle(),p=s.getRoot(),{themeVariables:m}=l();if(!p)return;let _=f?30:0,v=S(i),x=c.nodeWidth?c.nodeWidth*Q:960,C=c.nodeHeight?c.nodeHeight*Q:500,w=x,T=C+_;v.attr(`viewBox`,`0 0 ${w} ${T}`),u(v,T,w,c.useMaxWidth);let E;try{let e=c.valueFormat||`,`;if(e===`$0,0`)E=n(e=>`$`+g(`,`)(e),`valueFormat`);else if(e.startsWith(`$`)&&e.includes(`,`)){let t=/\.\d+/.exec(e),r=t?t[0]:``;E=n(e=>`$`+g(`,`+r)(e),`valueFormat`)}else if(e.startsWith(`$`)){let t=e.substring(1);E=n(e=>`$`+g(t||``)(e),`valueFormat`)}else E=g(e)}catch(e){r.error(`Error creating format function:`,e),E=g(`,`)}let D=h().range([`transparent`,m.cScale0,m.cScale1,m.cScale2,m.cScale3,m.cScale4,m.cScale5,m.cScale6,m.cScale7,m.cScale8,m.cScale9,m.cScale10,m.cScale11]),O=h().range([`transparent`,m.cScalePeer0,m.cScalePeer1,m.cScalePeer2,m.cScalePeer3,m.cScalePeer4,m.cScalePeer5,m.cScalePeer6,m.cScalePeer7,m.cScalePeer8,m.cScalePeer9,m.cScalePeer10,m.cScalePeer11]),k=h().range([m.cScaleLabel0,m.cScaleLabel1,m.cScaleLabel2,m.cScaleLabel3,m.cScaleLabel4,m.cScaleLabel5,m.cScaleLabel6,m.cScaleLabel7,m.cScaleLabel8,m.cScaleLabel9,m.cScaleLabel10,m.cScaleLabel11]);f&&v.append(`text`).attr(`x`,w/2).attr(`y`,_/2).attr(`class`,`treemapTitle`).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(f);let A=v.append(`g`).attr(`transform`,`translate(0, ${_})`).attr(`class`,`treemapContainer`),j=R(p).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),M=oe().size([x,C]).paddingTop(e=>e.children&&e.children.length>0?$+Q:0).paddingInner(d).paddingLeft(e=>e.children&&e.children.length>0?Q:0).paddingRight(e=>e.children&&e.children.length>0?Q:0).paddingBottom(e=>e.children&&e.children.length>0?Q:0).round(!0)(j),N=M.descendants().filter(e=>e.children&&e.children.length>0),P=A.selectAll(`.treemapSection`).data(N).enter().append(`g`).attr(`class`,`treemapSection`).attr(`transform`,e=>`translate(${e.x0},${e.y0})`);P.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,$).attr(`class`,`treemapSectionHeader`).attr(`fill`,`none`).attr(`fill-opacity`,.6).attr(`stroke-width`,.6).attr(`style`,e=>e.depth===0?`display: none;`:``),P.append(`clipPath`).attr(`id`,(e,t)=>`clip-section-${i}-${t}`).append(`rect`).attr(`width`,e=>Math.max(0,e.x1-e.x0-12)).attr(`height`,$),P.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,e=>e.y1-e.y0).attr(`class`,(e,t)=>`treemapSection section${t}`).attr(`fill`,e=>D(e.data.name)).attr(`fill-opacity`,.6).attr(`stroke`,e=>O(e.data.name)).attr(`stroke-width`,2).attr(`stroke-opacity`,.4).attr(`style`,e=>{if(e.depth===0)return`display: none;`;let t=b({cssCompiledStyles:e.data.cssCompiledStyles});return t.nodeStyles+`;`+t.borderStyles.join(`;`)}),P.append(`text`).attr(`class`,`treemapSectionLabel`).attr(`x`,6).attr(`y`,$/2).attr(`dominant-baseline`,`middle`).text(e=>e.depth===0?``:e.data.name).attr(`font-weight`,`bold`).attr(`clip-path`,(e,t)=>`url(#clip-section-${i}-${t})`).attr(`style`,e=>e.depth===0?`display: none;`:`dominant-baseline: middle; font-size: 12px; fill:`+k(e.data.name)+`; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;`+b({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).each(function(t){if(t.depth===0)return;let n=e(this),r=t.data.name;n.text(r);let i=t.x1-t.x0,a;a=c.showValues!==!1&&t.value?i-10-30-10-6:i-6-6;let o=Math.max(15,a),s=n.node();if(s.getComputedTextLength()>o){let e=r;for(;e.length>0;){if(e=r.substring(0,e.length-1),e.length===0){n.text(`...`),s.getComputedTextLength()>o&&n.text(``);break}if(n.text(e+`...`),s.getComputedTextLength()<=o)break}}}),c.showValues!==!1&&P.append(`text`).attr(`class`,`treemapSectionValue`).attr(`x`,e=>e.x1-e.x0-10).attr(`y`,$/2).attr(`text-anchor`,`end`).attr(`dominant-baseline`,`middle`).text(e=>e.value?E(e.value):``).attr(`font-style`,`italic`).attr(`style`,e=>e.depth===0?`display: none;`:`text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:`+k(e.data.name)+`; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;`+b({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`));let F=M.leaves(),I=F.length>20,L=I?16:38,z=I?14:28,B=I?4:8,V=I?4:6,H=I?2:4,U=I?8:10,W=I?1:2,G=A.selectAll(`.treemapLeafGroup`).data(F).enter().append(`g`).attr(`class`,(e,t)=>`treemapNode treemapLeafGroup leaf${t}${e.data.classSelector?` ${e.data.classSelector}`:``}x`).attr(`transform`,e=>`translate(${e.x0},${e.y0})`);G.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,e=>e.y1-e.y0).attr(`class`,`treemapLeaf`).attr(`fill`,e=>e.parent?D(e.parent.data.name):D(e.data.name)).attr(`style`,e=>b({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr(`fill-opacity`,.3).attr(`stroke`,e=>e.parent?D(e.parent.data.name):D(e.data.name)).attr(`stroke-width`,3),G.append(`clipPath`).attr(`id`,(e,t)=>`clip-${i}-${t}`).append(`rect`).attr(`width`,e=>Math.max(0,e.x1-e.x0-4)).attr(`height`,e=>Math.max(0,e.y1-e.y0-4)),G.append(`text`).attr(`class`,`treemapLabel`).attr(`x`,e=>(e.x1-e.x0)/2).attr(`y`,e=>(e.y1-e.y0)/2).attr(`style`,e=>`text-anchor: middle; dominant-baseline: middle; font-size: ${L}px;fill:`+k(e.data.name)+`;`+b({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).attr(`clip-path`,(e,t)=>`url(#clip-${i}-${t})`).text(e=>e.data.name).each(function(t){let n=e(this),r=t.x1-t.x0,i=t.y1-t.y0,a=n.node(),o=r-2*H,s=i-2*H;if(o<U||s<U){n.style(`display`,`none`);return}let c=parseInt(n.style(`font-size`),10),l=.6;for(;a.getComputedTextLength()>o&&c>B;)c--,n.style(`font-size`,`${c}px`);let u=Math.max(V,Math.min(z,Math.round(c*l))),d=c+W+u;for(;d>s&&c>B&&(c--,u=Math.max(V,Math.min(z,Math.round(c*l))),!(u<V&&c===B));)n.style(`font-size`,`${c}px`),d=c+W+u;n.style(`font-size`,`${c}px`),I?(c<B||s<B)&&n.style(`display`,`none`):(a.getComputedTextLength()>o||c<B||s<c)&&n.style(`display`,`none`)}),c.showValues!==!1&&G.append(`text`).attr(`class`,`treemapValue`).attr(`x`,e=>(e.x1-e.x0)/2).attr(`y`,function(e){return(e.y1-e.y0)/2}).attr(`style`,e=>`text-anchor: middle; dominant-baseline: hanging; font-size: ${z}px;fill:`+k(e.data.name)+`;`+b({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).attr(`clip-path`,(e,t)=>`url(#clip-${i}-${t})`).text(e=>e.value?E(e.value):``).each(function(t){let n=e(this),r=this.parentNode;if(!r){n.style(`display`,`none`);return}let i=e(r).select(`.treemapLabel`);if(i.empty()||i.style(`display`)===`none`){n.style(`display`,`none`);return}let a=parseFloat(i.style(`font-size`)),o=Math.max(V,Math.min(z,Math.round(a*.6)));n.style(`font-size`,`${o}px`);let s=(t.y1-t.y0)/2+a/2+W;n.attr(`y`,s);let c=t.x1-t.x0,l=t.y1-t.y0-4,u=c-2*H;n.node().getComputedTextLength()>u||s+o>l||o<V?n.style(`display`,`none`):n.style(`display`,null)});let K=c.diagramPadding??8;y(v,K,`flowchart`,c?.useMaxWidth||!1)},`draw`),getClasses:n(function(e,t){return t.db.getClasses()},`getClasses`)},ue={sectionStrokeColor:`black`,sectionStrokeWidth:`1`,sectionFillColor:`#efefef`,leafStrokeColor:`black`,leafStrokeWidth:`1`,leafFillColor:`#efefef`,labelFontSize:`12px`,valueFontSize:`10px`,titleFontSize:`14px`},de={parser:X,get db(){return new J},renderer:le,styles:n(({treemap:e}={})=>{let t=i(),n=l(),r=_(t,n.themeVariables),a=_(ue,e),o=a.titleColor??r.titleColor,s=a.labelColor??r.textColor,c=a.valueColor??r.textColor;return`
2
2
  .treemapNode.section {
3
3
  stroke: ${a.sectionStrokeColor};
4
4
  stroke-width: ${a.sectionStrokeWidth};
@@ -1,4 +1,4 @@
1
- import{n as e}from"./mermaid-parser.core-BtmN233C.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{t as n}from"./src-CxJwpjvz.js";import{D as r,H as i,K as a,U as o,a as s,b as c,c as l,f as u,v as d,w as f,y as p}from"./chunk-I66GZJ75-C-Lq_UXl.js";import{i as m}from"./chunk-NSK5VX7P-Fi_H0vaS.js";import{t as h}from"./chunk-JWPE2WC7-DVXcaiue.js";import{a as g}from"./mermaid.core-37H5_HoB.js";var _={showLegend:!0,ticks:5,max:null,min:0,graticule:`circle`},v=32,y={axes:[],curves:[],options:_},b=structuredClone(y),x=u.radar,S=t(()=>m({...x,...c().radar}),`getConfig`),C=t(()=>b.axes,`getAxes`),w=t(()=>b.curves,`getCurves`),T=t(()=>b.options,`getOptions`),E=t(e=>{b.axes=e.map(e=>({name:e.name,label:e.label??e.name}))},`setAxes`),D=t(e=>{b.curves=e.map(e=>({name:e.name,label:e.label??e.name,entries:O(e.entries)}))},`setCurves`),O=t(e=>{if(e[0].axis==null)return e.map(e=>e.value);let t=C();if(t.length===0)throw Error(`Axes must be populated before curves for reference entries`);return t.map(t=>{let n=e.find(e=>e.axis?.$refText===t.name);if(n===void 0)throw Error(`Missing entry for axis `+t.label);return n.value})},`computeCurveEntries`),k={getAxes:C,getCurves:w,getOptions:T,setAxes:E,setCurves:D,setOptions:t(e=>{let t=e.reduce((e,t)=>(e[t.name]=t,e),{});b.options={showLegend:t.showLegend?.value??_.showLegend,ticks:t.ticks?.value??_.ticks,max:t.max?.value??_.max,min:t.min?.value??_.min,graticule:t.graticule?.value??_.graticule},b.options.ticks>v&&(n.warn(`Radar diagram ticks (${b.options.ticks}) exceeds maximum allowed (${v}). Using ${v} instead.`),b.options.ticks=v)},`setOptions`),getConfig:S,clear:t(()=>{s(),b=structuredClone(y)},`clear`),setAccTitle:o,getAccTitle:p,setDiagramTitle:a,getDiagramTitle:f,getAccDescription:d,setAccDescription:i},A=t(e=>{h(e,k);let{axes:t,curves:n,options:r}=e;k.setAxes(t),k.setCurves(n),k.setOptions(r)},`populate`),j={parse:t(async t=>{let r=await e(`radar`,t);n.debug(r),A(r)},`parse`)},M=t((e,t,n,r)=>{let i=r.db,a=i.getAxes(),o=i.getCurves(),s=i.getOptions(),c=i.getConfig(),l=i.getDiagramTitle(),u=N(g(t),c),d=s.max??Math.max(...o.map(e=>Math.max(...e.entries))),f=s.min,p=Math.min(c.width,c.height)/2;P(u,a,p,s.ticks,s.graticule),F(u,a,p,c),I(u,a,o,f,d,s.graticule,c),z(u,o,s.showLegend,c),u.append(`text`).attr(`class`,`radarTitle`).text(l).attr(`x`,0).attr(`y`,-c.height/2-c.marginTop)},`draw`),N=t((e,t)=>{let n=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,i={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return l(e,r,n,t.useMaxWidth??!0),e.attr(`viewBox`,`0 0 ${n} ${r}`).attr(`overflow`,`visible`),e.append(`g`).attr(`transform`,`translate(${i.x}, ${i.y})`)},`drawFrame`),P=t((e,t,n,r,i)=>{if(i===`circle`)for(let t=0;t<r;t++){let i=n*(t+1)/r;e.append(`circle`).attr(`r`,i).attr(`class`,`radarGraticule`)}else if(i===`polygon`){let i=t.length;for(let a=0;a<r;a++){let o=n*(a+1)/r,s=t.map((e,t)=>{let n=2*t*Math.PI/i-Math.PI/2;return`${o*Math.cos(n)},${o*Math.sin(n)}`}).join(` `);e.append(`polygon`).attr(`points`,s).attr(`class`,`radarGraticule`)}}},`drawGraticule`),F=t((e,t,n,r)=>{let i=t.length;for(let a=0;a<i;a++){let o=t[a].label,s=2*a*Math.PI/i-Math.PI/2,c=Math.cos(s),l=Math.sin(s);e.append(`line`).attr(`x1`,0).attr(`y1`,0).attr(`x2`,n*r.axisScaleFactor*c).attr(`y2`,n*r.axisScaleFactor*l).attr(`class`,`radarAxisLine`);let u=c>.01?`start`:c<-.01?`end`:`middle`,d=l>.01?`hanging`:l<-.01?`auto`:`central`;e.append(`text`).text(o).attr(`x`,n*r.axisLabelFactor*c+4*c).attr(`y`,n*r.axisLabelFactor*l+4*l).attr(`text-anchor`,u).attr(`dominant-baseline`,d).attr(`class`,`radarAxisLabel`)}},`drawAxes`);function I(e,t,n,r,i,a,o){let s=t.length,c=Math.min(o.width,o.height)/2;n.forEach((t,n)=>{if(t.entries.length!==s)return;let l=t.entries.map((e,t)=>{let n=2*Math.PI*t/s-Math.PI/2,a=L(e,r,i,c);return{x:a*Math.cos(n),y:a*Math.sin(n)}});a===`circle`?e.append(`path`).attr(`d`,R(l,o.curveTension)).attr(`class`,`radarCurve-${n}`):a===`polygon`&&e.append(`polygon`).attr(`points`,l.map(e=>`${e.x},${e.y}`).join(` `)).attr(`class`,`radarCurve-${n}`)})}t(I,`drawCurves`);function L(e,t,n,r){return r*(Math.min(Math.max(e,t),n)-t)/(n-t)}t(L,`relativeRadius`);function R(e,t){let n=e.length,r=`M${e[0].x},${e[0].y}`;for(let i=0;i<n;i++){let a=e[(i-1+n)%n],o=e[i],s=e[(i+1)%n],c=e[(i+2)%n],l={x:o.x+(s.x-a.x)*t,y:o.y+(s.y-a.y)*t},u={x:s.x-(c.x-o.x)*t,y:s.y-(c.y-o.y)*t};r+=` C${l.x},${l.y} ${u.x},${u.y} ${s.x},${s.y}`}return`${r} Z`}t(R,`closedRoundCurve`);function z(e,t,n,r){if(!n)return;let i=(r.width/2+r.marginRight)*3/4,a=-(r.height/2+r.marginTop)*3/4;t.forEach((t,n)=>{let r=e.append(`g`).attr(`transform`,`translate(${i}, ${a+n*20})`);r.append(`rect`).attr(`width`,12).attr(`height`,12).attr(`class`,`radarLegendBox-${n}`),r.append(`text`).attr(`x`,16).attr(`y`,0).attr(`class`,`radarLegendText`).text(t.label)})}t(z,`drawLegend`);var B={draw:M},V=t((e,t)=>{let n=``;for(let r=0;r<e.THEME_COLOR_LIMIT;r++){let i=e[`cScale${r}`];n+=`
1
+ import{n as e}from"./mermaid-parser.core-CwwjcAjz.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{t as n}from"./src-BR8qR3lM.js";import{D as r,H as i,K as a,U as o,a as s,b as c,c as l,f as u,v as d,w as f,y as p}from"./chunk-I66GZJ75-b3yMIljX.js";import{i as m}from"./chunk-NSK5VX7P-CfigFGDQ.js";import{t as h}from"./chunk-JWPE2WC7-DVXcaiue.js";import{a as g}from"./mermaid.core-hmS_M4K5.js";var _={showLegend:!0,ticks:5,max:null,min:0,graticule:`circle`},v=32,y={axes:[],curves:[],options:_},b=structuredClone(y),x=u.radar,S=t(()=>m({...x,...c().radar}),`getConfig`),C=t(()=>b.axes,`getAxes`),w=t(()=>b.curves,`getCurves`),T=t(()=>b.options,`getOptions`),E=t(e=>{b.axes=e.map(e=>({name:e.name,label:e.label??e.name}))},`setAxes`),D=t(e=>{b.curves=e.map(e=>({name:e.name,label:e.label??e.name,entries:O(e.entries)}))},`setCurves`),O=t(e=>{if(e[0].axis==null)return e.map(e=>e.value);let t=C();if(t.length===0)throw Error(`Axes must be populated before curves for reference entries`);return t.map(t=>{let n=e.find(e=>e.axis?.$refText===t.name);if(n===void 0)throw Error(`Missing entry for axis `+t.label);return n.value})},`computeCurveEntries`),k={getAxes:C,getCurves:w,getOptions:T,setAxes:E,setCurves:D,setOptions:t(e=>{let t=e.reduce((e,t)=>(e[t.name]=t,e),{});b.options={showLegend:t.showLegend?.value??_.showLegend,ticks:t.ticks?.value??_.ticks,max:t.max?.value??_.max,min:t.min?.value??_.min,graticule:t.graticule?.value??_.graticule},b.options.ticks>v&&(n.warn(`Radar diagram ticks (${b.options.ticks}) exceeds maximum allowed (${v}). Using ${v} instead.`),b.options.ticks=v)},`setOptions`),getConfig:S,clear:t(()=>{s(),b=structuredClone(y)},`clear`),setAccTitle:o,getAccTitle:p,setDiagramTitle:a,getDiagramTitle:f,getAccDescription:d,setAccDescription:i},A=t(e=>{h(e,k);let{axes:t,curves:n,options:r}=e;k.setAxes(t),k.setCurves(n),k.setOptions(r)},`populate`),j={parse:t(async t=>{let r=await e(`radar`,t);n.debug(r),A(r)},`parse`)},M=t((e,t,n,r)=>{let i=r.db,a=i.getAxes(),o=i.getCurves(),s=i.getOptions(),c=i.getConfig(),l=i.getDiagramTitle(),u=N(g(t),c),d=s.max??Math.max(...o.map(e=>Math.max(...e.entries))),f=s.min,p=Math.min(c.width,c.height)/2;P(u,a,p,s.ticks,s.graticule),F(u,a,p,c),I(u,a,o,f,d,s.graticule,c),z(u,o,s.showLegend,c),u.append(`text`).attr(`class`,`radarTitle`).text(l).attr(`x`,0).attr(`y`,-c.height/2-c.marginTop)},`draw`),N=t((e,t)=>{let n=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,i={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return l(e,r,n,t.useMaxWidth??!0),e.attr(`viewBox`,`0 0 ${n} ${r}`).attr(`overflow`,`visible`),e.append(`g`).attr(`transform`,`translate(${i.x}, ${i.y})`)},`drawFrame`),P=t((e,t,n,r,i)=>{if(i===`circle`)for(let t=0;t<r;t++){let i=n*(t+1)/r;e.append(`circle`).attr(`r`,i).attr(`class`,`radarGraticule`)}else if(i===`polygon`){let i=t.length;for(let a=0;a<r;a++){let o=n*(a+1)/r,s=t.map((e,t)=>{let n=2*t*Math.PI/i-Math.PI/2;return`${o*Math.cos(n)},${o*Math.sin(n)}`}).join(` `);e.append(`polygon`).attr(`points`,s).attr(`class`,`radarGraticule`)}}},`drawGraticule`),F=t((e,t,n,r)=>{let i=t.length;for(let a=0;a<i;a++){let o=t[a].label,s=2*a*Math.PI/i-Math.PI/2,c=Math.cos(s),l=Math.sin(s);e.append(`line`).attr(`x1`,0).attr(`y1`,0).attr(`x2`,n*r.axisScaleFactor*c).attr(`y2`,n*r.axisScaleFactor*l).attr(`class`,`radarAxisLine`);let u=c>.01?`start`:c<-.01?`end`:`middle`,d=l>.01?`hanging`:l<-.01?`auto`:`central`;e.append(`text`).text(o).attr(`x`,n*r.axisLabelFactor*c+4*c).attr(`y`,n*r.axisLabelFactor*l+4*l).attr(`text-anchor`,u).attr(`dominant-baseline`,d).attr(`class`,`radarAxisLabel`)}},`drawAxes`);function I(e,t,n,r,i,a,o){let s=t.length,c=Math.min(o.width,o.height)/2;n.forEach((t,n)=>{if(t.entries.length!==s)return;let l=t.entries.map((e,t)=>{let n=2*Math.PI*t/s-Math.PI/2,a=L(e,r,i,c);return{x:a*Math.cos(n),y:a*Math.sin(n)}});a===`circle`?e.append(`path`).attr(`d`,R(l,o.curveTension)).attr(`class`,`radarCurve-${n}`):a===`polygon`&&e.append(`polygon`).attr(`points`,l.map(e=>`${e.x},${e.y}`).join(` `)).attr(`class`,`radarCurve-${n}`)})}t(I,`drawCurves`);function L(e,t,n,r){return r*(Math.min(Math.max(e,t),n)-t)/(n-t)}t(L,`relativeRadius`);function R(e,t){let n=e.length,r=`M${e[0].x},${e[0].y}`;for(let i=0;i<n;i++){let a=e[(i-1+n)%n],o=e[i],s=e[(i+1)%n],c=e[(i+2)%n],l={x:o.x+(s.x-a.x)*t,y:o.y+(s.y-a.y)*t},u={x:s.x-(c.x-o.x)*t,y:s.y-(c.y-o.y)*t};r+=` C${l.x},${l.y} ${u.x},${u.y} ${s.x},${s.y}`}return`${r} Z`}t(R,`closedRoundCurve`);function z(e,t,n,r){if(!n)return;let i=(r.width/2+r.marginRight)*3/4,a=-(r.height/2+r.marginTop)*3/4;t.forEach((t,n)=>{let r=e.append(`g`).attr(`transform`,`translate(${i}, ${a+n*20})`);r.append(`rect`).attr(`width`,12).attr(`height`,12).attr(`class`,`radarLegendBox-${n}`),r.append(`text`).attr(`x`,16).attr(`y`,0).attr(`class`,`radarLegendText`).text(t.label)})}t(z,`drawLegend`);var B={draw:M},V=t((e,t)=>{let n=``;for(let r=0;r<e.THEME_COLOR_LIMIT;r++){let i=e[`cScale${r}`];n+=`
2
2
  .radarCurve-${r} {
3
3
  color: ${i};
4
4
  fill: ${i};
@@ -1 +1 @@
1
- import{f as e,t}from"./mermaid-parser.core-BtmN233C.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{t as r}from"./src-CxJwpjvz.js";import"./chunk-I66GZJ75-C-Lq_UXl.js";import{n as i,r as a,t as o}from"./chunk-6Q2QTUOP-BuzItInf.js";import{t as s}from"./chunk-JWPE2WC7-DVXcaiue.js";import"./mermaid.core-37H5_HoB.js";var c=e().RailroadEbnf.parser.LangiumParser,l=n(e=>{let t=e.alternatives.map(u);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformChoice`),u=n(e=>{let t=e.elements.map(p);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformSequence`),d=n(e=>{switch(e.$type){case`EbnfTerminal`:return{type:`terminal`,value:e.value};case`EbnfNonTerminal`:return{type:`nonterminal`,name:e.name};case`EbnfSpecial`:return{type:`special`,text:e.text};case`EbnfGroup`:return l(e.element);case`EbnfOptional`:return{type:`optional`,element:l(e.element)};case`EbnfRepetition`:return{type:`repetition`,element:l(e.element),min:0,max:1/0};default:throw Error(`Unsupported EBNF primary node: ${e.$type}`)}},`transformPrimary`),f=n((e,t)=>{switch(t.$type){case`EbnfOptionalPostfix`:return{type:`optional`,element:e};case`EbnfZeroOrMorePostfix`:return{type:`repetition`,element:e,min:0,max:1/0};case`EbnfOneOrMorePostfix`:return{type:`repetition`,element:e,min:1,max:1/0};case`EbnfExceptionPostfix`:return{type:`sequence`,elements:[e,{type:`terminal`,value:`-`},d(t.except)]};default:throw Error(`Unsupported EBNF postfix node: ${t.$type}`)}},`transformPostfix`),p=n(e=>e.postfixes.reduce((e,t)=>f(e,t),d(e.base)),`transformTerm`),m=n(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),h=n(e=>{s(e,o),e.title&&o.setTitle(e.title),e.rules.map(e=>o.addRule(m(e)))},`populateDb`),g={parser:{parse:n(e=>{o.clear(),r.debug(`[EBNF Parser] Starting Langium parse`);let n=c.parse(e);if(n.lexerErrors.length>0||n.parserErrors.length>0)throw new t(n);let i=n.value;r.debug(`[EBNF Parser] Parsed rules:`,i.rules.length),h(i),r.debug(`[EBNF Parser] Parse complete`)},`parse`),parser:{yy:o}},db:o,renderer:a,styles:i};export{g as diagram};
1
+ import{f as e,t}from"./mermaid-parser.core-CwwjcAjz.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{t as r}from"./src-BR8qR3lM.js";import"./chunk-I66GZJ75-b3yMIljX.js";import{n as i,r as a,t as o}from"./chunk-6Q2QTUOP-C_h5lS68.js";import{t as s}from"./chunk-JWPE2WC7-DVXcaiue.js";import"./mermaid.core-hmS_M4K5.js";var c=e().RailroadEbnf.parser.LangiumParser,l=n(e=>{let t=e.alternatives.map(u);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformChoice`),u=n(e=>{let t=e.elements.map(p);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformSequence`),d=n(e=>{switch(e.$type){case`EbnfTerminal`:return{type:`terminal`,value:e.value};case`EbnfNonTerminal`:return{type:`nonterminal`,name:e.name};case`EbnfSpecial`:return{type:`special`,text:e.text};case`EbnfGroup`:return l(e.element);case`EbnfOptional`:return{type:`optional`,element:l(e.element)};case`EbnfRepetition`:return{type:`repetition`,element:l(e.element),min:0,max:1/0};default:throw Error(`Unsupported EBNF primary node: ${e.$type}`)}},`transformPrimary`),f=n((e,t)=>{switch(t.$type){case`EbnfOptionalPostfix`:return{type:`optional`,element:e};case`EbnfZeroOrMorePostfix`:return{type:`repetition`,element:e,min:0,max:1/0};case`EbnfOneOrMorePostfix`:return{type:`repetition`,element:e,min:1,max:1/0};case`EbnfExceptionPostfix`:return{type:`sequence`,elements:[e,{type:`terminal`,value:`-`},d(t.except)]};default:throw Error(`Unsupported EBNF postfix node: ${t.$type}`)}},`transformPostfix`),p=n(e=>e.postfixes.reduce((e,t)=>f(e,t),d(e.base)),`transformTerm`),m=n(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),h=n(e=>{s(e,o),e.title&&o.setTitle(e.title),e.rules.map(e=>o.addRule(m(e)))},`populateDb`),g={parser:{parse:n(e=>{o.clear(),r.debug(`[EBNF Parser] Starting Langium parse`);let n=c.parse(e);if(n.lexerErrors.length>0||n.parserErrors.length>0)throw new t(n);let i=n.value;r.debug(`[EBNF Parser] Parsed rules:`,i.rules.length),h(i),r.debug(`[EBNF Parser] Parse complete`)},`parse`),parser:{yy:o}},db:o,renderer:a,styles:i};export{g as diagram};
@@ -1,4 +1,4 @@
1
- import{p as e}from"./index-snBzz_U8.js";import{n as t,t as n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{t as r}from"./src-CxJwpjvz.js";import{H as i,K as a,U as o,a as s,it as c,v as l,w as u,x as d,y as f}from"./chunk-I66GZJ75-C-Lq_UXl.js";import{t as p}from"./channel-DoE3nnYB.js";import{c as m,g as h}from"./chunk-NSK5VX7P-Fi_H0vaS.js";import"./chunk-4I5QYGJK-C-m_kVjm.js";import"./chunk-WRU74C26-CGzysGBy.js";import"./chunk-7BUUIJ7U-Bb538aSH.js";import"./chunk-UBXNYLIW-BF-sAqEK.js";import{t as g}from"./chunk-XXDRQBXY-BDALKVU4.js";import{t as _}from"./chunk-KBJHAD2P-BS9N9gG4.js";import"./chunk-W5SLKNZC-CXrJJ0BX.js";import"./chunk-QR6OTTB3-BJdg-tcL.js";import"./chunk-7Z6QIM7H-BGiBPuWt.js";import{i as v,r as y}from"./mermaid.core-37H5_HoB.js";var b=(function(){var e=t(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52],r=[1,10],i=[1,11],a=[1,12],o=[1,13],s=[1,23],c=[1,24],l=[1,25],u=[1,26],d=[1,27],f=[1,19],p=[1,28],m=[1,29],h=[1,20],g=[1,18],_=[1,21],v=[1,22],y=[1,36],b=[1,37],x=[1,38],S=[1,39],C=[1,40],w=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52,66,67,68,69,70],T=[1,45],E=[1,46],D=[1,55],O=[40,48,50,51,52,71,72],k=[1,66],A=[1,64],j=[1,61],M=[1,65],N=[1,67],P=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,51,52,66,67,68,69,70],F=[66,67,68,69,70],I=[1,85],L=[1,84],R=[1,82],z=[1,83],B=[6,10,42,47],V=[6,10,13,41,42,47,48,49],H=[1,93],U=[1,92],W=[1,91],G=[19,58],K=[1,102],q=[1,101],J=[19,58,61,63],Y={trace:t(function(){},`trace`),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,DECIMAL_NUM:51,ENTITY_ONE:52,attribute:53,attributeType:54,attributeName:55,attributeKeyTypeList:56,attributeComment:57,ATTRIBUTE_WORD:58,"?":59,attributeKeyType:60,",":61,ATTRIBUTE_KEY:62,COMMENT:63,cardinality:64,relType:65,ZERO_OR_ONE:66,ZERO_OR_MORE:67,ONE_OR_MORE:68,ONLY_ONE:69,MD_PARENT:70,NON_IDENTIFYING:71,IDENTIFYING:72,WORD:73,$accept:0,$end:1},terminals_:{2:`error`,4:`ER_DIAGRAM`,6:`EOF`,8:`SPACE`,10:`NEWLINE`,13:`COLON`,15:`STYLE_SEPARATOR`,17:`BLOCK_START`,19:`BLOCK_STOP`,20:`SQS`,21:`SQE`,22:`title`,23:`title_value`,24:`acc_title`,25:`acc_title_value`,26:`acc_descr`,27:`acc_descr_value`,28:`acc_descr_multiline_value`,33:`direction_tb`,34:`direction_bt`,35:`direction_rl`,36:`direction_lr`,37:`CLASSDEF`,40:`UNICODE_TEXT`,41:`STYLE_TEXT`,42:`COMMA`,43:`CLASS`,44:`STYLE`,47:`SEMI`,48:`NUM`,49:`BRKT`,50:`ENTITY_NAME`,51:`DECIMAL_NUM`,52:`ENTITY_ONE`,58:`ATTRIBUTE_WORD`,59:`?`,61:`,`,62:`ATTRIBUTE_KEY`,63:`COMMENT`,66:`ZERO_OR_ONE`,67:`ZERO_OR_MORE`,68:`ONE_OR_MORE`,69:`ONLY_ONE`,70:`MD_PARENT`,71:`NON_IDENTIFYING`,72:`IDENTIFYING`,73:`WORD`},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[11,1],[11,1],[11,1],[18,1],[18,2],[53,2],[53,3],[53,3],[53,4],[54,1],[54,2],[55,1],[56,1],[56,3],[60,1],[57,1],[12,3],[64,1],[64,1],[64,1],[64,1],[64,1],[65,1],[65,1],[14,1],[14,1],[14,1]],performAction:t(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:break;case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:r.addEntity(a[s-4]),r.addEntity(a[s-2]),r.addRelationship(a[s-4],a[s],a[s-2],a[s-3]);break;case 9:r.addEntity(a[s-8]),r.addEntity(a[s-4]),r.addRelationship(a[s-8],a[s],a[s-4],a[s-5]),r.setClass([a[s-8]],a[s-6]),r.setClass([a[s-4]],a[s-2]);break;case 10:r.addEntity(a[s-6]),r.addEntity(a[s-2]),r.addRelationship(a[s-6],a[s],a[s-2],a[s-3]),r.setClass([a[s-6]],a[s-4]);break;case 11:r.addEntity(a[s-6]),r.addEntity(a[s-4]),r.addRelationship(a[s-6],a[s],a[s-4],a[s-5]),r.setClass([a[s-4]],a[s-2]);break;case 12:r.addEntity(a[s-3]),r.addAttributes(a[s-3],a[s-1]);break;case 13:r.addEntity(a[s-5]),r.addAttributes(a[s-5],a[s-1]),r.setClass([a[s-5]],a[s-3]);break;case 14:r.addEntity(a[s-2]);break;case 15:r.addEntity(a[s-4]),r.setClass([a[s-4]],a[s-2]);break;case 16:r.addEntity(a[s]);break;case 17:r.addEntity(a[s-2]),r.setClass([a[s-2]],a[s]);break;case 18:r.addEntity(a[s-6],a[s-4]),r.addAttributes(a[s-6],a[s-1]);break;case 19:r.addEntity(a[s-8],a[s-6]),r.addAttributes(a[s-8],a[s-1]),r.setClass([a[s-8]],a[s-3]);break;case 20:r.addEntity(a[s-5],a[s-3]);break;case 21:r.addEntity(a[s-7],a[s-5]),r.setClass([a[s-7]],a[s-2]);break;case 22:r.addEntity(a[s-3],a[s-1]);break;case 23:r.addEntity(a[s-5],a[s-3]),r.setClass([a[s-5]],a[s]);break;case 24:case 25:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 26:case 27:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 32:r.setDirection(`TB`);break;case 33:r.setDirection(`BT`);break;case 34:r.setDirection(`RL`);break;case 35:r.setDirection(`LR`);break;case 36:this.$=a[s-3],r.addClass(a[s-2],a[s-1]);break;case 37:case 38:case 59:case 68:this.$=[a[s]];break;case 39:case 40:this.$=a[s-2].concat([a[s]]);break;case 41:this.$=a[s-2],r.setClass(a[s-1],a[s]);break;case 42:this.$=a[s-3],r.addCssStyles(a[s-2],a[s-1]);break;case 43:this.$=[a[s]];break;case 44:a[s-2].push(a[s]),this.$=a[s-2];break;case 46:this.$=a[s-1]+a[s];break;case 54:case 80:case 81:this.$=a[s].replace(/"/g,``);break;case 55:case 56:case 57:case 58:case 82:this.$=a[s];break;case 60:a[s].push(a[s-1]),this.$=a[s];break;case 61:this.$={type:a[s-1],name:a[s]};break;case 62:this.$={type:a[s-2],name:a[s-1],keys:a[s]};break;case 63:this.$={type:a[s-2],name:a[s-1],comment:a[s]};break;case 64:this.$={type:a[s-3],name:a[s-2],keys:a[s-1],comment:a[s]};break;case 65:case 67:case 70:this.$=a[s];break;case 66:this.$=a[s-1]+a[s];break;case 69:a[s-2].push(a[s]),this.$=a[s-2];break;case 71:this.$=a[s].replace(/"/g,``);break;case 72:this.$={cardA:a[s],relType:a[s-1],cardB:a[s-2]};break;case 73:this.$=r.Cardinality.ZERO_OR_ONE;break;case 74:this.$=r.Cardinality.ZERO_OR_MORE;break;case 75:this.$=r.Cardinality.ONE_OR_MORE;break;case 76:this.$=r.Cardinality.ONLY_ONE;break;case 77:this.$=r.Cardinality.MD_PARENT;break;case 78:this.$=r.Identification.NON_IDENTIFYING;break;case 79:this.$=r.Identification.IDENTIFYING}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},e(n,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:r,24:i,26:a,28:o,29:14,30:15,31:16,32:17,33:s,34:c,35:l,36:u,37:d,40:f,43:p,44:m,48:h,50:g,51:_,52:v},e(n,[2,7],{1:[2,1]}),e(n,[2,3]),{9:30,11:9,22:r,24:i,26:a,28:o,29:14,30:15,31:16,32:17,33:s,34:c,35:l,36:u,37:d,40:f,43:p,44:m,48:h,50:g,51:_,52:v},e(n,[2,5]),e(n,[2,6]),e(n,[2,16],{12:31,64:35,15:[1,32],17:[1,33],20:[1,34],66:y,67:b,68:x,69:S,70:C}),{23:[1,41]},{25:[1,42]},{27:[1,43]},e(n,[2,27]),e(n,[2,28]),e(n,[2,29]),e(n,[2,30]),e(n,[2,31]),e(w,[2,54]),e(w,[2,55]),e(w,[2,56]),e(w,[2,57]),e(w,[2,58]),e(n,[2,32]),e(n,[2,33]),e(n,[2,34]),e(n,[2,35]),{16:44,40:T,41:E},{16:47,40:T,41:E},{16:48,40:T,41:E},e(n,[2,4]),{11:49,40:f,48:h,50:g,51:_,52:v},{16:50,40:T,41:E},{18:51,19:[1,52],53:53,54:54,58:D},{11:56,40:f,48:h,50:g,51:_,52:v},{65:57,71:[1,58],72:[1,59]},e(O,[2,73]),e(O,[2,74]),e(O,[2,75]),e(O,[2,76]),e(O,[2,77]),e(n,[2,24]),e(n,[2,25]),e(n,[2,26]),{13:k,38:60,41:A,42:j,45:62,46:63,48:M,49:N},e(P,[2,37]),e(P,[2,38]),{16:68,40:T,41:E,42:j},{13:k,38:69,41:A,42:j,45:62,46:63,48:M,49:N},{13:[1,70],15:[1,71]},e(n,[2,17],{64:35,12:72,17:[1,73],42:j,66:y,67:b,68:x,69:S,70:C}),{19:[1,74]},e(n,[2,14]),{18:75,19:[2,59],53:53,54:54,58:D},{55:76,58:[1,77]},{58:[2,65],59:[1,78]},{21:[1,79]},{64:80,66:y,67:b,68:x,69:S,70:C},e(F,[2,78]),e(F,[2,79]),{6:I,10:L,39:81,42:R,47:z},{40:[1,86],41:[1,87]},e(B,[2,43],{46:88,13:k,41:A,48:M,49:N}),e(V,[2,45]),e(V,[2,50]),e(V,[2,51]),e(V,[2,52]),e(V,[2,53]),e(n,[2,41],{42:j}),{6:I,10:L,39:89,42:R,47:z},{14:90,40:H,50:U,73:W},{16:94,40:T,41:E},{11:95,40:f,48:h,50:g,51:_,52:v},{18:96,19:[1,97],53:53,54:54,58:D},e(n,[2,12]),{19:[2,60]},e(G,[2,61],{56:98,57:99,60:100,62:K,63:q}),e([19,58,62,63],[2,67]),{58:[2,66]},e(n,[2,22],{15:[1,104],17:[1,103]}),e([40,48,50,51,52],[2,72]),e(n,[2,36]),{13:k,41:A,45:105,46:63,48:M,49:N},e(n,[2,47]),e(n,[2,48]),e(n,[2,49]),e(P,[2,39]),e(P,[2,40]),e(V,[2,46]),e(n,[2,42]),e(n,[2,8]),e(n,[2,80]),e(n,[2,81]),e(n,[2,82]),{13:[1,106],42:j},{13:[1,108],15:[1,107]},{19:[1,109]},e(n,[2,15]),e(G,[2,62],{57:110,61:[1,111],63:q}),e(G,[2,63]),e(J,[2,68]),e(G,[2,71]),e(J,[2,70]),{18:112,19:[1,113],53:53,54:54,58:D},{16:114,40:T,41:E},e(B,[2,44],{46:88,13:k,41:A,48:M,49:N}),{14:115,40:H,50:U,73:W},{16:116,40:T,41:E},{14:117,40:H,50:U,73:W},e(n,[2,13]),e(G,[2,64]),{60:118,62:K},{19:[1,119]},e(n,[2,20]),e(n,[2,23],{17:[1,120],42:j}),e(n,[2,11]),{13:[1,121],42:j},e(n,[2,10]),e(J,[2,69]),e(n,[2,18]),{18:122,19:[1,123],53:53,54:54,58:D},{14:124,40:H,50:U,73:W},{19:[1,125]},e(n,[2,21]),e(n,[2,9]),e(n,[2,19])],defaultActions:{75:[2,60],78:[2,66]},parseError:t(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:t(function(e){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}t(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}t(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
1
+ import{p as e}from"./index-Bn1BoT3w.js";import{n as t,t as n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{t as r}from"./src-BR8qR3lM.js";import{H as i,K as a,U as o,a as s,it as c,v as l,w as u,x as d,y as f}from"./chunk-I66GZJ75-b3yMIljX.js";import{t as p}from"./channel-37lNznWk.js";import{c as m,g as h}from"./chunk-NSK5VX7P-CfigFGDQ.js";import"./chunk-4I5QYGJK-CWmfNXFr.js";import"./chunk-WRU74C26-Dic7ZP8H.js";import"./chunk-7BUUIJ7U-Bb538aSH.js";import"./chunk-UBXNYLIW-DkMKDHW4.js";import{t as g}from"./chunk-XXDRQBXY-B1prMCvW.js";import{t as _}from"./chunk-KBJHAD2P-CS7eflbk.js";import"./chunk-W5SLKNZC-BSLytTSJ.js";import"./chunk-QR6OTTB3-BBy8NfTW.js";import"./chunk-7Z6QIM7H-DSnVb09k.js";import{i as v,r as y}from"./mermaid.core-hmS_M4K5.js";var b=(function(){var e=t(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52],r=[1,10],i=[1,11],a=[1,12],o=[1,13],s=[1,23],c=[1,24],l=[1,25],u=[1,26],d=[1,27],f=[1,19],p=[1,28],m=[1,29],h=[1,20],g=[1,18],_=[1,21],v=[1,22],y=[1,36],b=[1,37],x=[1,38],S=[1,39],C=[1,40],w=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52,66,67,68,69,70],T=[1,45],E=[1,46],D=[1,55],O=[40,48,50,51,52,71,72],k=[1,66],A=[1,64],j=[1,61],M=[1,65],N=[1,67],P=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,51,52,66,67,68,69,70],F=[66,67,68,69,70],I=[1,85],L=[1,84],R=[1,82],z=[1,83],B=[6,10,42,47],V=[6,10,13,41,42,47,48,49],H=[1,93],U=[1,92],W=[1,91],G=[19,58],K=[1,102],q=[1,101],J=[19,58,61,63],Y={trace:t(function(){},`trace`),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,DECIMAL_NUM:51,ENTITY_ONE:52,attribute:53,attributeType:54,attributeName:55,attributeKeyTypeList:56,attributeComment:57,ATTRIBUTE_WORD:58,"?":59,attributeKeyType:60,",":61,ATTRIBUTE_KEY:62,COMMENT:63,cardinality:64,relType:65,ZERO_OR_ONE:66,ZERO_OR_MORE:67,ONE_OR_MORE:68,ONLY_ONE:69,MD_PARENT:70,NON_IDENTIFYING:71,IDENTIFYING:72,WORD:73,$accept:0,$end:1},terminals_:{2:`error`,4:`ER_DIAGRAM`,6:`EOF`,8:`SPACE`,10:`NEWLINE`,13:`COLON`,15:`STYLE_SEPARATOR`,17:`BLOCK_START`,19:`BLOCK_STOP`,20:`SQS`,21:`SQE`,22:`title`,23:`title_value`,24:`acc_title`,25:`acc_title_value`,26:`acc_descr`,27:`acc_descr_value`,28:`acc_descr_multiline_value`,33:`direction_tb`,34:`direction_bt`,35:`direction_rl`,36:`direction_lr`,37:`CLASSDEF`,40:`UNICODE_TEXT`,41:`STYLE_TEXT`,42:`COMMA`,43:`CLASS`,44:`STYLE`,47:`SEMI`,48:`NUM`,49:`BRKT`,50:`ENTITY_NAME`,51:`DECIMAL_NUM`,52:`ENTITY_ONE`,58:`ATTRIBUTE_WORD`,59:`?`,61:`,`,62:`ATTRIBUTE_KEY`,63:`COMMENT`,66:`ZERO_OR_ONE`,67:`ZERO_OR_MORE`,68:`ONE_OR_MORE`,69:`ONLY_ONE`,70:`MD_PARENT`,71:`NON_IDENTIFYING`,72:`IDENTIFYING`,73:`WORD`},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[11,1],[11,1],[11,1],[18,1],[18,2],[53,2],[53,3],[53,3],[53,4],[54,1],[54,2],[55,1],[56,1],[56,3],[60,1],[57,1],[12,3],[64,1],[64,1],[64,1],[64,1],[64,1],[65,1],[65,1],[14,1],[14,1],[14,1]],performAction:t(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:break;case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:r.addEntity(a[s-4]),r.addEntity(a[s-2]),r.addRelationship(a[s-4],a[s],a[s-2],a[s-3]);break;case 9:r.addEntity(a[s-8]),r.addEntity(a[s-4]),r.addRelationship(a[s-8],a[s],a[s-4],a[s-5]),r.setClass([a[s-8]],a[s-6]),r.setClass([a[s-4]],a[s-2]);break;case 10:r.addEntity(a[s-6]),r.addEntity(a[s-2]),r.addRelationship(a[s-6],a[s],a[s-2],a[s-3]),r.setClass([a[s-6]],a[s-4]);break;case 11:r.addEntity(a[s-6]),r.addEntity(a[s-4]),r.addRelationship(a[s-6],a[s],a[s-4],a[s-5]),r.setClass([a[s-4]],a[s-2]);break;case 12:r.addEntity(a[s-3]),r.addAttributes(a[s-3],a[s-1]);break;case 13:r.addEntity(a[s-5]),r.addAttributes(a[s-5],a[s-1]),r.setClass([a[s-5]],a[s-3]);break;case 14:r.addEntity(a[s-2]);break;case 15:r.addEntity(a[s-4]),r.setClass([a[s-4]],a[s-2]);break;case 16:r.addEntity(a[s]);break;case 17:r.addEntity(a[s-2]),r.setClass([a[s-2]],a[s]);break;case 18:r.addEntity(a[s-6],a[s-4]),r.addAttributes(a[s-6],a[s-1]);break;case 19:r.addEntity(a[s-8],a[s-6]),r.addAttributes(a[s-8],a[s-1]),r.setClass([a[s-8]],a[s-3]);break;case 20:r.addEntity(a[s-5],a[s-3]);break;case 21:r.addEntity(a[s-7],a[s-5]),r.setClass([a[s-7]],a[s-2]);break;case 22:r.addEntity(a[s-3],a[s-1]);break;case 23:r.addEntity(a[s-5],a[s-3]),r.setClass([a[s-5]],a[s]);break;case 24:case 25:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 26:case 27:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 32:r.setDirection(`TB`);break;case 33:r.setDirection(`BT`);break;case 34:r.setDirection(`RL`);break;case 35:r.setDirection(`LR`);break;case 36:this.$=a[s-3],r.addClass(a[s-2],a[s-1]);break;case 37:case 38:case 59:case 68:this.$=[a[s]];break;case 39:case 40:this.$=a[s-2].concat([a[s]]);break;case 41:this.$=a[s-2],r.setClass(a[s-1],a[s]);break;case 42:this.$=a[s-3],r.addCssStyles(a[s-2],a[s-1]);break;case 43:this.$=[a[s]];break;case 44:a[s-2].push(a[s]),this.$=a[s-2];break;case 46:this.$=a[s-1]+a[s];break;case 54:case 80:case 81:this.$=a[s].replace(/"/g,``);break;case 55:case 56:case 57:case 58:case 82:this.$=a[s];break;case 60:a[s].push(a[s-1]),this.$=a[s];break;case 61:this.$={type:a[s-1],name:a[s]};break;case 62:this.$={type:a[s-2],name:a[s-1],keys:a[s]};break;case 63:this.$={type:a[s-2],name:a[s-1],comment:a[s]};break;case 64:this.$={type:a[s-3],name:a[s-2],keys:a[s-1],comment:a[s]};break;case 65:case 67:case 70:this.$=a[s];break;case 66:this.$=a[s-1]+a[s];break;case 69:a[s-2].push(a[s]),this.$=a[s-2];break;case 71:this.$=a[s].replace(/"/g,``);break;case 72:this.$={cardA:a[s],relType:a[s-1],cardB:a[s-2]};break;case 73:this.$=r.Cardinality.ZERO_OR_ONE;break;case 74:this.$=r.Cardinality.ZERO_OR_MORE;break;case 75:this.$=r.Cardinality.ONE_OR_MORE;break;case 76:this.$=r.Cardinality.ONLY_ONE;break;case 77:this.$=r.Cardinality.MD_PARENT;break;case 78:this.$=r.Identification.NON_IDENTIFYING;break;case 79:this.$=r.Identification.IDENTIFYING}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},e(n,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:r,24:i,26:a,28:o,29:14,30:15,31:16,32:17,33:s,34:c,35:l,36:u,37:d,40:f,43:p,44:m,48:h,50:g,51:_,52:v},e(n,[2,7],{1:[2,1]}),e(n,[2,3]),{9:30,11:9,22:r,24:i,26:a,28:o,29:14,30:15,31:16,32:17,33:s,34:c,35:l,36:u,37:d,40:f,43:p,44:m,48:h,50:g,51:_,52:v},e(n,[2,5]),e(n,[2,6]),e(n,[2,16],{12:31,64:35,15:[1,32],17:[1,33],20:[1,34],66:y,67:b,68:x,69:S,70:C}),{23:[1,41]},{25:[1,42]},{27:[1,43]},e(n,[2,27]),e(n,[2,28]),e(n,[2,29]),e(n,[2,30]),e(n,[2,31]),e(w,[2,54]),e(w,[2,55]),e(w,[2,56]),e(w,[2,57]),e(w,[2,58]),e(n,[2,32]),e(n,[2,33]),e(n,[2,34]),e(n,[2,35]),{16:44,40:T,41:E},{16:47,40:T,41:E},{16:48,40:T,41:E},e(n,[2,4]),{11:49,40:f,48:h,50:g,51:_,52:v},{16:50,40:T,41:E},{18:51,19:[1,52],53:53,54:54,58:D},{11:56,40:f,48:h,50:g,51:_,52:v},{65:57,71:[1,58],72:[1,59]},e(O,[2,73]),e(O,[2,74]),e(O,[2,75]),e(O,[2,76]),e(O,[2,77]),e(n,[2,24]),e(n,[2,25]),e(n,[2,26]),{13:k,38:60,41:A,42:j,45:62,46:63,48:M,49:N},e(P,[2,37]),e(P,[2,38]),{16:68,40:T,41:E,42:j},{13:k,38:69,41:A,42:j,45:62,46:63,48:M,49:N},{13:[1,70],15:[1,71]},e(n,[2,17],{64:35,12:72,17:[1,73],42:j,66:y,67:b,68:x,69:S,70:C}),{19:[1,74]},e(n,[2,14]),{18:75,19:[2,59],53:53,54:54,58:D},{55:76,58:[1,77]},{58:[2,65],59:[1,78]},{21:[1,79]},{64:80,66:y,67:b,68:x,69:S,70:C},e(F,[2,78]),e(F,[2,79]),{6:I,10:L,39:81,42:R,47:z},{40:[1,86],41:[1,87]},e(B,[2,43],{46:88,13:k,41:A,48:M,49:N}),e(V,[2,45]),e(V,[2,50]),e(V,[2,51]),e(V,[2,52]),e(V,[2,53]),e(n,[2,41],{42:j}),{6:I,10:L,39:89,42:R,47:z},{14:90,40:H,50:U,73:W},{16:94,40:T,41:E},{11:95,40:f,48:h,50:g,51:_,52:v},{18:96,19:[1,97],53:53,54:54,58:D},e(n,[2,12]),{19:[2,60]},e(G,[2,61],{56:98,57:99,60:100,62:K,63:q}),e([19,58,62,63],[2,67]),{58:[2,66]},e(n,[2,22],{15:[1,104],17:[1,103]}),e([40,48,50,51,52],[2,72]),e(n,[2,36]),{13:k,41:A,45:105,46:63,48:M,49:N},e(n,[2,47]),e(n,[2,48]),e(n,[2,49]),e(P,[2,39]),e(P,[2,40]),e(V,[2,46]),e(n,[2,42]),e(n,[2,8]),e(n,[2,80]),e(n,[2,81]),e(n,[2,82]),{13:[1,106],42:j},{13:[1,108],15:[1,107]},{19:[1,109]},e(n,[2,15]),e(G,[2,62],{57:110,61:[1,111],63:q}),e(G,[2,63]),e(J,[2,68]),e(G,[2,71]),e(J,[2,70]),{18:112,19:[1,113],53:53,54:54,58:D},{16:114,40:T,41:E},e(B,[2,44],{46:88,13:k,41:A,48:M,49:N}),{14:115,40:H,50:U,73:W},{16:116,40:T,41:E},{14:117,40:H,50:U,73:W},e(n,[2,13]),e(G,[2,64]),{60:118,62:K},{19:[1,119]},e(n,[2,20]),e(n,[2,23],{17:[1,120],42:j}),e(n,[2,11]),{13:[1,121],42:j},e(n,[2,10]),e(J,[2,69]),e(n,[2,18]),{18:122,19:[1,123],53:53,54:54,58:D},{14:124,40:H,50:U,73:W},{19:[1,125]},e(n,[2,21]),e(n,[2,9]),e(n,[2,19])],defaultActions:{75:[2,60],78:[2,66]},parseError:t(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:t(function(e){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}t(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}t(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
2
2
  `+h.showPosition()+`
3
3
  Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};Y.lexer=(function(){return{EOF:1,parseError:t(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:t(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:t(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:t(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:t(function(){return this._more=!0,this},`more`),reject:t(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:t(function(e){this.unput(this.match.slice(e))},`less`),pastInput:t(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:t(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:t(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
@@ -0,0 +1 @@
1
+ import"./chunk-KEIR6QF5-BICK3FdT.js";import{O as e}from"./mermaid-parser.core-CwwjcAjz.js";export{e as createEventModelingServices};
@@ -0,0 +1 @@
1
+ import"./src-BR8qR3lM.js";import"./chunk-I66GZJ75-b3yMIljX.js";import"./chunk-NSK5VX7P-CfigFGDQ.js";import"./chunk-4I5QYGJK-CWmfNXFr.js";import"./chunk-WRU74C26-Dic7ZP8H.js";import"./chunk-7BUUIJ7U-Bb538aSH.js";import"./chunk-UBXNYLIW-DkMKDHW4.js";import"./chunk-2GRJ4B5K-OnpnkpQT.js";import"./chunk-XXDRQBXY-B1prMCvW.js";import"./chunk-KBJHAD2P-CS7eflbk.js";import"./chunk-W5SLKNZC-BSLytTSJ.js";import"./chunk-QR6OTTB3-BBy8NfTW.js";import"./chunk-7Z6QIM7H-DSnVb09k.js";import{n as e}from"./chunk-JQJVKLGR-Bihcz4nv.js";import"./mermaid.core-hmS_M4K5.js";export{e as diagram};
@@ -1,4 +1,4 @@
1
- import{s as e,t}from"./rolldown-runtime-BcKkbAw3.js";import{a as n,i as r,n as i,r as a,t as o}from"./linear-D1cspVtk.js";import{A as s,a as c,c as l,d as u,f as d,i as f,j as p,m,p as h,s as g,u as _}from"./index-snBzz_U8.js";import{n as v}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{t as y}from"./src-CxJwpjvz.js";import{H as b,K as x,U as S,a as C,c as w,s as T,v as E,w as D,x as O,y as k}from"./chunk-I66GZJ75-C-Lq_UXl.js";import{t as A}from"./init-C-OQMol4.js";import{t as j}from"./dist-CsdsWTxp.js";import{g as ee}from"./chunk-NSK5VX7P-Fi_H0vaS.js";var te=Math.PI/180,ne=180/Math.PI,re=18,ie=.96422,ae=1,oe=.82521,se=4/29,M=6/29,ce=3*M*M,le=M*M*M;function ue(e){if(e instanceof N)return new N(e.l,e.a,e.b,e.opacity);if(e instanceof P)return ve(e);e instanceof l||(e=_(e));var t=he(e.r),n=he(e.g),r=he(e.b),i=fe((.2225045*t+.7168786*n+.0606169*r)/ae),a,o;return t===n&&n===r?a=o=i:(a=fe((.4360747*t+.3850649*n+.1430804*r)/ie),o=fe((.0139322*t+.0971045*n+.7141733*r)/oe)),new N(116*i-16,500*(a-i),200*(i-o),e.opacity)}function de(e,t,n,r){return arguments.length===1?ue(e):new N(e,t,n,r??1)}function N(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}u(N,de,d(g,{brighter(e){return new N(this.l+re*(e??1),this.a,this.b,this.opacity)},darker(e){return new N(this.l-re*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return t=ie*pe(t),e=ae*pe(e),n=oe*pe(n),new l(me(3.1338561*t-1.6168667*e-.4906146*n),me(-.9787684*t+1.9161415*e+.033454*n),me(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}}));function fe(e){return e>le?e**(1/3):e/ce+se}function pe(e){return e>M?e*e*e:ce*(e-se)}function me(e){return 255*(e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055)}function he(e){return(e/=255)<=.04045?e/12.92:((e+.055)/1.055)**2.4}function ge(e){if(e instanceof P)return new P(e.h,e.c,e.l,e.opacity);if(e instanceof N||(e=ue(e)),e.a===0&&e.b===0)return new P(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*ne;return new P(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function _e(e,t,n,r){return arguments.length===1?ge(e):new P(e,t,n,r??1)}function P(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function ve(e){if(isNaN(e.h))return new N(e.l,0,0,e.opacity);var t=e.h*te;return new N(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}u(P,_e,d(g,{brighter(e){return new P(this.h,this.c,this.l+re*(e??1),this.opacity)},darker(e){return new P(this.h,this.c,this.l-re*(e??1),this.opacity)},rgb(){return ve(this).rgb()}}));function ye(e){return function(t,n){var r=e((t=_e(t)).h,(n=_e(n)).h),i=c(t.c,n.c),a=c(t.l,n.l),o=c(t.opacity,n.opacity);return function(e){return t.h=r(e),t.c=i(e),t.l=a(e),t.opacity=o(e),t+``}}}var be=ye(f);function xe(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n<t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function Se(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n>t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function Ce(e){return e}var we=1,Te=2,Ee=3,De=4,Oe=1e-6;function ke(e){return`translate(`+e+`,0)`}function Ae(e){return`translate(0,`+e+`)`}function je(e){return t=>+e(t)}function Me(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function Ne(){return!this.__axis}function Pe(e,t){var n=[],r=null,i=null,a=6,o=6,s=3,c=typeof window<`u`&&window.devicePixelRatio>1?0:.5,l=e===we||e===De?-1:1,u=e===De||e===Te?`x`:`y`,d=e===we||e===Ee?ke:Ae;function f(f){var p=r??(t.ticks?t.ticks.apply(t,n):t.domain()),m=i??(t.tickFormat?t.tickFormat.apply(t,n):Ce),h=Math.max(a,0)+s,g=t.range(),_=+g[0]+c,v=+g[g.length-1]+c,y=(t.bandwidth?Me:je)(t.copy(),c),b=f.selection?f.selection():f,x=b.selectAll(`.domain`).data([null]),S=b.selectAll(`.tick`).data(p,t).order(),C=S.exit(),w=S.enter().append(`g`).attr(`class`,`tick`),T=S.select(`line`),E=S.select(`text`);x=x.merge(x.enter().insert(`path`,`.tick`).attr(`class`,`domain`).attr(`stroke`,`currentColor`)),S=S.merge(w),T=T.merge(w.append(`line`).attr(`stroke`,`currentColor`).attr(u+`2`,l*a)),E=E.merge(w.append(`text`).attr(`fill`,`currentColor`).attr(u,l*h).attr(`dy`,e===we?`0em`:e===Ee?`0.71em`:`0.32em`)),f!==b&&(x=x.transition(f),S=S.transition(f),T=T.transition(f),E=E.transition(f),C=C.transition(f).attr(`opacity`,Oe).attr(`transform`,function(e){return isFinite(e=y(e))?d(e+c):this.getAttribute(`transform`)}),w.attr(`opacity`,Oe).attr(`transform`,function(e){var t=this.parentNode.__axis;return d((t&&isFinite(t=t(e))?t:y(e))+c)})),C.remove(),x.attr(`d`,e===De||e===Te?o?`M`+l*o+`,`+_+`H`+c+`V`+v+`H`+l*o:`M`+c+`,`+_+`V`+v:o?`M`+_+`,`+l*o+`V`+c+`H`+v+`V`+l*o:`M`+_+`,`+c+`H`+v),S.attr(`opacity`,1).attr(`transform`,function(e){return d(y(e)+c)}),T.attr(u+`2`,l*a),E.attr(u,l*h).text(m),b.filter(Ne).attr(`fill`,`none`).attr(`font-size`,10).attr(`font-family`,`sans-serif`).attr(`text-anchor`,e===Te?`start`:e===De?`end`:`middle`),b.each(function(){this.__axis=y})}return f.scale=function(e){return arguments.length?(t=e,f):t},f.ticks=function(){return n=Array.from(arguments),f},f.tickArguments=function(e){return arguments.length?(n=e==null?[]:Array.from(e),f):n.slice()},f.tickValues=function(e){return arguments.length?(r=e==null?null:Array.from(e),f):r&&r.slice()},f.tickFormat=function(e){return arguments.length?(i=e,f):i},f.tickSize=function(e){return arguments.length?(a=o=+e,f):a},f.tickSizeInner=function(e){return arguments.length?(a=+e,f):a},f.tickSizeOuter=function(e){return arguments.length?(o=+e,f):o},f.tickPadding=function(e){return arguments.length?(s=+e,f):s},f.offset=function(e){return arguments.length?(c=+e,f):c},f}function Fe(e){return Pe(we,e)}function Ie(e){return Pe(Ee,e)}function Le(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],o;return a<i&&(o=n,n=r,r=o,o=i,i=a,a=o),e[n]=t.floor(i),e[r]=t.ceil(a),e}var Re=new Date,ze=new Date;function F(e,t,n,r){function i(t){return e(t=arguments.length===0?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{let t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=(e,n)=>(t(e=new Date(+e),n==null?1:Math.floor(n)),e),i.range=(n,r,a)=>{let o=[];if(n=i.ceil(n),a=a==null?1:Math.floor(a),!(n<r)||!(a>0))return o;let s;do o.push(s=new Date(+n)),t(n,a),e(n);while(s<n&&n<r);return o},i.filter=n=>F(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e){if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}}),n&&(i.count=(t,r)=>(Re.setTime(+t),ze.setTime(+r),e(Re),e(ze),Math.floor(n(Re,ze))),i.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?i.filter(r?t=>r(t)%e===0:t=>i.count(0,t)%e===0):i)),i}var Be=F(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Be.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?F(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Be),Be.range;var I=1e3,L=I*60,R=L*60,z=R*24,Ve=z*7,He=z*30,Ue=z*365,B=F(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*I)},(e,t)=>(t-e)/I,e=>e.getUTCSeconds());B.range;var We=F(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*I)},(e,t)=>{e.setTime(+e+t*L)},(e,t)=>(t-e)/L,e=>e.getMinutes());We.range;var Ge=F(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*L)},(e,t)=>(t-e)/L,e=>e.getUTCMinutes());Ge.range;var Ke=F(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*I-e.getMinutes()*L)},(e,t)=>{e.setTime(+e+t*R)},(e,t)=>(t-e)/R,e=>e.getHours());Ke.range;var qe=F(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*R)},(e,t)=>(t-e)/R,e=>e.getUTCHours());qe.range;var V=F(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*L)/z,e=>e.getDate()-1);V.range;var Je=F(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/z,e=>e.getUTCDate()-1);Je.range;var Ye=F(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/z,e=>Math.floor(e/z));Ye.range;function H(e){return F(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+t*7)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*L)/Ve)}var Xe=H(0),Ze=H(1),Qe=H(2),$e=H(3),U=H(4),et=H(5),tt=H(6);Xe.range,Ze.range,Qe.range,$e.range,U.range,et.range,tt.range;function W(e){return F(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t*7)},(e,t)=>(t-e)/Ve)}var nt=W(0),rt=W(1),it=W(2),at=W(3),ot=W(4),st=W(5),ct=W(6);nt.range,rt.range,it.range,at.range,ot.range,st.range,ct.range;var lt=F(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());lt.range;var ut=F(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());ut.range;var G=F(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());G.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:F(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}),G.range;var K=F(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());K.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:F(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}),K.range;function dt(e,t,i,a,o,s){let c=[[B,1,I],[B,5,5*I],[B,15,15*I],[B,30,30*I],[s,1,L],[s,5,5*L],[s,15,15*L],[s,30,30*L],[o,1,R],[o,3,3*R],[o,6,6*R],[o,12,12*R],[a,1,z],[a,2,2*z],[i,1,Ve],[t,1,He],[t,3,3*He],[e,1,Ue]];function l(e,t,n){let r=t<e;r&&([e,t]=[t,e]);let i=n&&typeof n.range==`function`?n:u(e,t,n),a=i?i.range(e,+t+1):[];return r?a.reverse():a}function u(t,i,a){let o=Math.abs(i-t)/a,s=n(([,,e])=>e).right(c,o);if(s===c.length)return e.every(r(t/Ue,i/Ue,a));if(s===0)return Be.every(Math.max(r(t,i,a),1));let[l,u]=c[o/c[s-1][2]<c[s][2]/o?s-1:s];return l.every(u)}return[l,u]}var[ft,pt]=dt(K,ut,nt,Ye,qe,Ge),[mt,ht]=dt(G,lt,Xe,V,Ke,We);function gt(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function _t(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function vt(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function yt(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,c=e.shortMonths,l=wt(i),u=Tt(i),d=wt(a),f=Tt(a),p=wt(o),m=Tt(o),h=wt(s),g=Tt(s),_=wt(c),v=Tt(c),y={a:te,A:ne,b:re,B:ie,c:null,d:Kt,e:Kt,f:Zt,g:ln,G:dn,H:qt,I:Jt,j:Yt,L:Xt,m:Qt,M:$t,p:ae,q:oe,Q:Pn,s:Fn,S:en,u:tn,U:nn,V:an,w:on,W:sn,x:null,X:null,y:cn,Y:un,Z:fn,"%":Nn},b={a:se,A:M,b:ce,B:le,c:null,d:pn,e:pn,f:vn,g:kn,G:jn,H:mn,I:hn,j:gn,L:_n,m:yn,M:bn,p:ue,q:de,Q:Pn,s:Fn,S:xn,u:Sn,U:Cn,V:Tn,w:En,W:Dn,x:null,X:null,y:On,Y:An,Z:Mn,"%":Nn},x={a:E,A:D,b:O,B:k,c:A,d:It,e:It,f:Ht,g:Mt,G:jt,H:Rt,I:Rt,j:Lt,L:Vt,m:Ft,M:zt,p:T,q:Pt,Q:Wt,s:Gt,S:Bt,u:Dt,U:Ot,V:kt,w:Et,W:At,x:j,X:ee,y:Mt,Y:jt,Z:Nt,"%":Ut};y.x=S(n,y),y.X=S(r,y),y.c=S(t,y),b.x=S(n,b),b.X=S(r,b),b.c=S(t,b);function S(e,t){return function(n){var r=[],i=-1,a=0,o=e.length,s,c,l;for(n instanceof Date||(n=new Date(+n));++i<o;)e.charCodeAt(i)===37&&(r.push(e.slice(a,i)),(c=bt[s=e.charAt(++i)])==null?c=s===`e`?` `:`0`:s=e.charAt(++i),(l=t[s])&&(s=l(n,c)),r.push(s),a=i+1);return r.push(e.slice(a,i)),r.join(``)}}function C(e,t){return function(n){var r=vt(1900,void 0,1),i=w(r,e,n+=``,0),a,o;if(i!=n.length)return null;if(`Q`in r)return new Date(r.Q);if(`s`in r)return new Date(r.s*1e3+(`L`in r?r.L:0));if(t&&!(`Z`in r)&&(r.Z=0),`p`in r&&(r.H=r.H%12+r.p*12),r.m===void 0&&(r.m=`q`in r?r.q:0),`V`in r){if(r.V<1||r.V>53)return null;`w`in r||(r.w=1),`Z`in r?(a=_t(vt(r.y,0,1)),o=a.getUTCDay(),a=o>4||o===0?rt.ceil(a):rt(a),a=Je.offset(a,(r.V-1)*7),r.y=a.getUTCFullYear(),r.m=a.getUTCMonth(),r.d=a.getUTCDate()+(r.w+6)%7):(a=gt(vt(r.y,0,1)),o=a.getDay(),a=o>4||o===0?Ze.ceil(a):Ze(a),a=V.offset(a,(r.V-1)*7),r.y=a.getFullYear(),r.m=a.getMonth(),r.d=a.getDate()+(r.w+6)%7)}else(`W`in r||`U`in r)&&(`w`in r||(r.w=`u`in r?r.u%7:+(`W`in r)),o=`Z`in r?_t(vt(r.y,0,1)).getUTCDay():gt(vt(r.y,0,1)).getDay(),r.m=0,r.d=`W`in r?(r.w+6)%7+r.W*7-(o+5)%7:r.w+r.U*7-(o+6)%7);return`Z`in r?(r.H+=r.Z/100|0,r.M+=r.Z%100,_t(r)):gt(r)}}function w(e,t,n,r){for(var i=0,a=t.length,o=n.length,s,c;i<a;){if(r>=o)return-1;if(s=t.charCodeAt(i++),s===37){if(s=t.charAt(i++),c=x[s in bt?t.charAt(i++):s],!c||(r=c(e,n,r))<0)return-1}else if(s!=n.charCodeAt(r++))return-1}return r}function T(e,t,n){var r=l.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1}function E(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=m.get(r[0].toLowerCase()),n+r[0].length):-1}function D(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1}function O(e,t,n){var r=_.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1}function k(e,t,n){var r=h.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1}function A(e,n,r){return w(e,t,n,r)}function j(e,t,r){return w(e,n,t,r)}function ee(e,t,n){return w(e,r,t,n)}function te(e){return o[e.getDay()]}function ne(e){return a[e.getDay()]}function re(e){return c[e.getMonth()]}function ie(e){return s[e.getMonth()]}function ae(e){return i[+(e.getHours()>=12)]}function oe(e){return 1+~~(e.getMonth()/3)}function se(e){return o[e.getUTCDay()]}function M(e){return a[e.getUTCDay()]}function ce(e){return c[e.getUTCMonth()]}function le(e){return s[e.getUTCMonth()]}function ue(e){return i[+(e.getUTCHours()>=12)]}function de(e){return 1+~~(e.getUTCMonth()/3)}return{format:function(e){var t=S(e+=``,y);return t.toString=function(){return e},t},parse:function(e){var t=C(e+=``,!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=S(e+=``,b);return t.toString=function(){return e},t},utcParse:function(e){var t=C(e+=``,!0);return t.toString=function(){return e},t}}}var bt={"-":``,_:` `,0:`0`},q=/^\s*\d+/,xt=/^%/,St=/[\\^$*+?|[\]().{}]/g;function J(e,t,n){var r=e<0?`-`:``,i=(r?-e:e)+``,a=i.length;return r+(a<n?Array(n-a+1).join(t)+i:i)}function Ct(e){return e.replace(St,`\\$&`)}function wt(e){return RegExp(`^(?:`+e.map(Ct).join(`|`)+`)`,`i`)}function Tt(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function Et(e,t,n){var r=q.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Dt(e,t,n){var r=q.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Ot(e,t,n){var r=q.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function kt(e,t,n){var r=q.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function At(e,t,n){var r=q.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function jt(e,t,n){var r=q.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Mt(e,t,n){var r=q.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Nt(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||`00`)),n+r[0].length):-1}function Pt(e,t,n){var r=q.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function Ft(e,t,n){var r=q.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function It(e,t,n){var r=q.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Lt(e,t,n){var r=q.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Rt(e,t,n){var r=q.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function zt(e,t,n){var r=q.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Bt(e,t,n){var r=q.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Vt(e,t,n){var r=q.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Ht(e,t,n){var r=q.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Ut(e,t,n){var r=xt.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Wt(e,t,n){var r=q.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Gt(e,t,n){var r=q.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Kt(e,t){return J(e.getDate(),t,2)}function qt(e,t){return J(e.getHours(),t,2)}function Jt(e,t){return J(e.getHours()%12||12,t,2)}function Yt(e,t){return J(1+V.count(G(e),e),t,3)}function Xt(e,t){return J(e.getMilliseconds(),t,3)}function Zt(e,t){return Xt(e,t)+`000`}function Qt(e,t){return J(e.getMonth()+1,t,2)}function $t(e,t){return J(e.getMinutes(),t,2)}function en(e,t){return J(e.getSeconds(),t,2)}function tn(e){var t=e.getDay();return t===0?7:t}function nn(e,t){return J(Xe.count(G(e)-1,e),t,2)}function rn(e){var t=e.getDay();return t>=4||t===0?U(e):U.ceil(e)}function an(e,t){return e=rn(e),J(U.count(G(e),e)+(G(e).getDay()===4),t,2)}function on(e){return e.getDay()}function sn(e,t){return J(Ze.count(G(e)-1,e),t,2)}function cn(e,t){return J(e.getFullYear()%100,t,2)}function ln(e,t){return e=rn(e),J(e.getFullYear()%100,t,2)}function un(e,t){return J(e.getFullYear()%1e4,t,4)}function dn(e,t){var n=e.getDay();return e=n>=4||n===0?U(e):U.ceil(e),J(e.getFullYear()%1e4,t,4)}function fn(e){var t=e.getTimezoneOffset();return(t>0?`-`:(t*=-1,`+`))+J(t/60|0,`0`,2)+J(t%60,`0`,2)}function pn(e,t){return J(e.getUTCDate(),t,2)}function mn(e,t){return J(e.getUTCHours(),t,2)}function hn(e,t){return J(e.getUTCHours()%12||12,t,2)}function gn(e,t){return J(1+Je.count(K(e),e),t,3)}function _n(e,t){return J(e.getUTCMilliseconds(),t,3)}function vn(e,t){return _n(e,t)+`000`}function yn(e,t){return J(e.getUTCMonth()+1,t,2)}function bn(e,t){return J(e.getUTCMinutes(),t,2)}function xn(e,t){return J(e.getUTCSeconds(),t,2)}function Sn(e){var t=e.getUTCDay();return t===0?7:t}function Cn(e,t){return J(nt.count(K(e)-1,e),t,2)}function wn(e){var t=e.getUTCDay();return t>=4||t===0?ot(e):ot.ceil(e)}function Tn(e,t){return e=wn(e),J(ot.count(K(e),e)+(K(e).getUTCDay()===4),t,2)}function En(e){return e.getUTCDay()}function Dn(e,t){return J(rt.count(K(e)-1,e),t,2)}function On(e,t){return J(e.getUTCFullYear()%100,t,2)}function kn(e,t){return e=wn(e),J(e.getUTCFullYear()%100,t,2)}function An(e,t){return J(e.getUTCFullYear()%1e4,t,4)}function jn(e,t){var n=e.getUTCDay();return e=n>=4||n===0?ot(e):ot.ceil(e),J(e.getUTCFullYear()%1e4,t,4)}function Mn(){return`+0000`}function Nn(){return`%`}function Pn(e){return+e}function Fn(e){return Math.floor(e/1e3)}var In,Ln;Rn({dateTime:`%x, %X`,date:`%-m/%-d/%Y`,time:`%-I:%M:%S %p`,periods:[`AM`,`PM`],days:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],shortDays:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],months:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],shortMonths:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`]});function Rn(e){return In=yt(e),Ln=In.format,In.parse,In.utcFormat,In.utcParse,In}function zn(e){return new Date(e)}function Bn(e){return e instanceof Date?+e:+new Date(+e)}function Vn(e,t,n,r,o,s,c,l,u,d){var f=i(),p=f.invert,m=f.domain,h=d(`.%L`),g=d(`:%S`),_=d(`%I:%M`),v=d(`%I %p`),y=d(`%a %d`),b=d(`%b %d`),x=d(`%B`),S=d(`%Y`);function C(e){return(u(e)<e?h:l(e)<e?g:c(e)<e?_:s(e)<e?v:r(e)<e?o(e)<e?y:b:n(e)<e?x:S)(e)}return f.invert=function(e){return new Date(p(e))},f.domain=function(e){return arguments.length?m(Array.from(e,Bn)):m().map(zn)},f.ticks=function(t){var n=m();return e(n[0],n[n.length-1],t??10)},f.tickFormat=function(e,t){return t==null?C:d(t)},f.nice=function(e){var n=m();return(!e||typeof e.range!=`function`)&&(e=t(n[0],n[n.length-1],e??10)),e?m(Le(n,e)):f},f.copy=function(){return a(f,Vn(e,t,n,r,o,s,c,l,u,d))},f}function Hn(){return A.apply(Vn(mt,ht,G,lt,Xe,V,Ke,We,B,Ln).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var Un=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_advancedFormat=r()})(e,(function(){return function(e,t){var n=t.prototype,r=n.format;n.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return r.bind(this)(e);var i=this.$utils(),a=(e||`YYYY-MM-DDTHH:mm:ssZ`).replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(e){switch(e){case`Q`:return Math.ceil((t.$M+1)/3);case`Do`:return n.ordinal(t.$D);case`gggg`:return t.weekYear();case`GGGG`:return t.isoWeekYear();case`wo`:return n.ordinal(t.week(),`W`);case`w`:case`ww`:return i.s(t.week(),e===`w`?1:2,`0`);case`W`:case`WW`:return i.s(t.isoWeek(),e===`W`?1:2,`0`);case`k`:case`kk`:return i.s(String(t.$H===0?24:t.$H),e===`k`?1:2,`0`);case`X`:return Math.floor(t.$d.getTime()/1e3);case`x`:return t.$d.getTime();case`z`:return`[`+t.offsetName()+`]`;case`zzz`:return`[`+t.offsetName(`long`)+`]`;default:return e}}));return r.bind(this)(a)}}}))})),Wn=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_duration=r()})(e,(function(){var e,t,n=1e3,r=6e4,i=36e5,a=864e5,o=31536e6,s=2628e6,c=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,l=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,u={years:o,months:s,days:a,hours:i,minutes:r,seconds:n,milliseconds:1,weeks:6048e5},d=function(e){return e instanceof v},f=function(e,t,n){return new v(e,n,t.$l)},p=function(e){return t.p(e)+`s`},m=function(e){return e<0},h=function(e){return m(e)?Math.ceil(e):Math.floor(e)},g=function(e){return Math.abs(e)},_=function(e,t){return e?m(e)?{negative:!0,format:``+g(e)+t}:{negative:!1,format:``+e+t}:{negative:!1,format:``}},v=function(){function m(e,t,n){var r=this;if(this.$d={},this.$l=n,e===void 0&&(this.$ms=0,this.parseFromMilliseconds()),t)return f(e*u[p(t)],this);if(typeof e==`number`)return this.$ms=e,this.parseFromMilliseconds(),this;if(typeof e==`object`)return Object.keys(e).forEach((function(t){r.$d[p(t)]=e[t]})),this.calMilliseconds(),this;if(typeof e==`string`){var i=e.match(c);if(i){var a=i.slice(2).map((function(e){return e==null?0:Number(e)}));return this.$d.years=a[0],this.$d.months=a[1],this.$d.weeks=a[2],this.$d.days=a[3],this.$d.hours=a[4],this.$d.minutes=a[5],this.$d.seconds=a[6],this.calMilliseconds(),this}}return this}var g=m.prototype;return g.calMilliseconds=function(){var e=this;this.$ms=Object.keys(this.$d).reduce((function(t,n){return t+(e.$d[n]||0)*u[n]}),0)},g.parseFromMilliseconds=function(){var e=this.$ms;this.$d.years=h(e/o),e%=o,this.$d.months=h(e/s),e%=s,this.$d.days=h(e/a),e%=a,this.$d.hours=h(e/i),e%=i,this.$d.minutes=h(e/r),e%=r,this.$d.seconds=h(e/n),e%=n,this.$d.milliseconds=e},g.toISOString=function(){var e=_(this.$d.years,`Y`),t=_(this.$d.months,`M`),n=+this.$d.days||0;this.$d.weeks&&(n+=7*this.$d.weeks);var r=_(n,`D`),i=_(this.$d.hours,`H`),a=_(this.$d.minutes,`M`),o=this.$d.seconds||0;this.$d.milliseconds&&(o+=this.$d.milliseconds/1e3,o=Math.round(1e3*o)/1e3);var s=_(o,`S`),c=e.negative||t.negative||r.negative||i.negative||a.negative||s.negative,l=i.format||a.format||s.format?`T`:``,u=(c?`-`:``)+`P`+e.format+t.format+r.format+l+i.format+a.format+s.format;return u===`P`||u===`-P`?`P0D`:u},g.toJSON=function(){return this.toISOString()},g.format=function(e){var n=e||`YYYY-MM-DDTHH:mm:ss`,r={Y:this.$d.years,YY:t.s(this.$d.years,2,`0`),YYYY:t.s(this.$d.years,4,`0`),M:this.$d.months,MM:t.s(this.$d.months,2,`0`),D:this.$d.days,DD:t.s(this.$d.days,2,`0`),H:this.$d.hours,HH:t.s(this.$d.hours,2,`0`),m:this.$d.minutes,mm:t.s(this.$d.minutes,2,`0`),s:this.$d.seconds,ss:t.s(this.$d.seconds,2,`0`),SSS:t.s(this.$d.milliseconds,3,`0`)};return n.replace(l,(function(e,t){return t||String(r[e])}))},g.as=function(e){return this.$ms/u[p(e)]},g.get=function(e){var t=this.$ms,n=p(e);return n===`milliseconds`?t%=1e3:t=n===`weeks`?h(t/u[n]):this.$d[n],t||0},g.add=function(e,t,n){var r;return r=t?e*u[p(t)]:d(e)?e.$ms:f(e,this).$ms,f(this.$ms+r*(n?-1:1),this)},g.subtract=function(e,t){return this.add(e,t,!0)},g.locale=function(e){var t=this.clone();return t.$l=e,t},g.clone=function(){return f(this.$ms,this)},g.humanize=function(t){return e().add(this.$ms,`ms`).locale(this.$l).fromNow(!t)},g.valueOf=function(){return this.asMilliseconds()},g.milliseconds=function(){return this.get(`milliseconds`)},g.asMilliseconds=function(){return this.as(`milliseconds`)},g.seconds=function(){return this.get(`seconds`)},g.asSeconds=function(){return this.as(`seconds`)},g.minutes=function(){return this.get(`minutes`)},g.asMinutes=function(){return this.as(`minutes`)},g.hours=function(){return this.get(`hours`)},g.asHours=function(){return this.as(`hours`)},g.days=function(){return this.get(`days`)},g.asDays=function(){return this.as(`days`)},g.weeks=function(){return this.get(`weeks`)},g.asWeeks=function(){return this.as(`weeks`)},g.months=function(){return this.get(`months`)},g.asMonths=function(){return this.as(`months`)},g.years=function(){return this.get(`years`)},g.asYears=function(){return this.as(`years`)},m}(),y=function(e,t,n){return e.add(t.years()*n,`y`).add(t.months()*n,`M`).add(t.days()*n,`d`).add(t.hours()*n,`h`).add(t.minutes()*n,`m`).add(t.seconds()*n,`s`).add(t.milliseconds()*n,`ms`)};return function(n,r,i){e=i,t=i().$utils(),i.duration=function(e,t){return f(e,{$l:i.locale()},t)},i.isDuration=d;var a=r.prototype.add,o=r.prototype.subtract;r.prototype.add=function(e,t){return d(e)?y(this,e,1):a.bind(this)(e,t)},r.prototype.subtract=function(e,t){return d(e)?y(this,e,-1):o.bind(this)(e,t)}}}))})),Gn=j(),Y=e(p(),1),Kn=e(s(),1),qn=e(m(),1),Jn=e(Un(),1),Yn=e(Wn(),1),Xn=(function(){var e=v(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],n=[1,26],r=[1,27],i=[1,28],a=[1,29],o=[1,30],s=[1,31],c=[1,32],l=[1,33],u=[1,34],d=[1,9],f=[1,10],p=[1,11],m=[1,12],h=[1,13],g=[1,14],_=[1,15],y=[1,16],b=[1,19],x=[1,20],S=[1,21],C=[1,22],w=[1,23],T=[1,25],E=[1,35],D={trace:v(function(){},`trace`),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:`error`,4:`gantt`,6:`EOF`,8:`SPACE`,10:`NL`,12:`weekday_monday`,13:`weekday_tuesday`,14:`weekday_wednesday`,15:`weekday_thursday`,16:`weekday_friday`,17:`weekday_saturday`,18:`weekday_sunday`,20:`weekend_friday`,21:`weekend_saturday`,22:`dateFormat`,23:`inclusiveEndDates`,24:`topAxis`,25:`axisFormat`,26:`tickInterval`,27:`excludes`,28:`includes`,29:`todayMarker`,30:`title`,31:`acc_title`,32:`acc_title_value`,33:`acc_descr`,34:`acc_descr_value`,35:`acc_descr_multiline_value`,36:`section`,38:`taskTxt`,39:`taskData`,40:`click`,41:`callbackname`,42:`callbackargs`,43:`href`},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:v(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:r.setWeekday(`monday`);break;case 9:r.setWeekday(`tuesday`);break;case 10:r.setWeekday(`wednesday`);break;case 11:r.setWeekday(`thursday`);break;case 12:r.setWeekday(`friday`);break;case 13:r.setWeekday(`saturday`);break;case 14:r.setWeekday(`sunday`);break;case 15:r.setWeekend(`friday`);break;case 16:r.setWeekend(`saturday`);break;case 17:r.setDateFormat(a[s].substr(11)),this.$=a[s].substr(11);break;case 18:r.enableInclusiveEndDates(),this.$=a[s].substr(18);break;case 19:r.TopAxis(),this.$=a[s].substr(8);break;case 20:r.setAxisFormat(a[s].substr(11)),this.$=a[s].substr(11);break;case 21:r.setTickInterval(a[s].substr(13)),this.$=a[s].substr(13);break;case 22:r.setExcludes(a[s].substr(9)),this.$=a[s].substr(9);break;case 23:r.setIncludes(a[s].substr(9)),this.$=a[s].substr(9);break;case 24:r.setTodayMarker(a[s].substr(12)),this.$=a[s].substr(12);break;case 27:r.setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 28:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 29:case 30:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 31:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 33:r.addTask(a[s-1],a[s]),this.$=`task`;break;case 34:this.$=a[s-1],r.setClickEvent(a[s-1],a[s],null);break;case 35:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 36:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],null),r.setLink(a[s-2],a[s]);break;case 37:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-2],a[s-1]),r.setLink(a[s-3],a[s]);break;case 38:this.$=a[s-2],r.setClickEvent(a[s-2],a[s],null),r.setLink(a[s-2],a[s-1]);break;case 39:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-1],a[s]),r.setLink(a[s-3],a[s-2]);break;case 40:this.$=a[s-1],r.setLink(a[s-1],a[s]);break;case 41:case 47:this.$=a[s-1]+` `+a[s];break;case 42:case 43:case 45:this.$=a[s-2]+` `+a[s-1]+` `+a[s];break;case 44:case 46:this.$=a[s-3]+` `+a[s-2]+` `+a[s-1]+` `+a[s]}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},e(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:r,14:i,15:a,16:o,17:s,18:c,19:18,20:l,21:u,22:d,23:f,24:p,25:m,26:h,27:g,28:_,29:y,30:b,31:x,33:S,35:C,36:w,37:24,38:T,40:E},e(t,[2,7],{1:[2,1]}),e(t,[2,3]),{9:36,11:17,12:n,13:r,14:i,15:a,16:o,17:s,18:c,19:18,20:l,21:u,22:d,23:f,24:p,25:m,26:h,27:g,28:_,29:y,30:b,31:x,33:S,35:C,36:w,37:24,38:T,40:E},e(t,[2,5]),e(t,[2,6]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,20]),e(t,[2,21]),e(t,[2,22]),e(t,[2,23]),e(t,[2,24]),e(t,[2,25]),e(t,[2,26]),e(t,[2,27]),{32:[1,37]},{34:[1,38]},e(t,[2,30]),e(t,[2,31]),e(t,[2,32]),{39:[1,39]},e(t,[2,8]),e(t,[2,9]),e(t,[2,10]),e(t,[2,11]),e(t,[2,12]),e(t,[2,13]),e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),{41:[1,40],43:[1,41]},e(t,[2,4]),e(t,[2,28]),e(t,[2,29]),e(t,[2,33]),e(t,[2,34],{42:[1,42],43:[1,43]}),e(t,[2,40],{41:[1,44]}),e(t,[2,35],{43:[1,45]}),e(t,[2,36]),e(t,[2,38],{42:[1,46]}),e(t,[2,37]),e(t,[2,39])],defaultActions:{},parseError:v(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:v(function(e){var t=this,n=[0],r=[],i=[null],a=[],o=this.table,s=``,c=0,l=0,u=0,d=2,f=1,p=a.slice.call(arguments,1),m=Object.create(this.lexer),h={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(h.yy[g]=this.yy[g]);m.setInput(e,h.yy),h.yy.lexer=m,h.yy.parser=this,m.yylloc===void 0&&(m.yylloc={});var _=m.yylloc;a.push(_);var y=m.options&&m.options.ranges;this.parseError=typeof h.yy.parseError==`function`?h.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){n.length-=2*e,i.length-=e,a.length-=e}v(b,`popStack`);function x(){var e=r.pop()||m.lex()||f;return typeof e!=`number`&&(e instanceof Array&&(r=e,e=r.pop()),e=t.symbols_[e]||e),e}v(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=o[w]&&o[w][S]),T===void 0||!T.length||!T[0]){var ee=``;for(O in j=[],o[w])this.terminals_[O]&&O>d&&j.push(`'`+this.terminals_[O]+`'`);ee=m.showPosition?`Parse error on line `+(c+1)+`:
1
+ import{s as e,t}from"./rolldown-runtime-BcKkbAw3.js";import{a as n,i as r,n as i,r as a,t as o}from"./linear-CSvLB3cd.js";import{A as s,a as c,c as l,d as u,f as d,i as f,j as p,m,p as h,s as g,u as _}from"./index-Bn1BoT3w.js";import{n as v}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{t as y}from"./src-BR8qR3lM.js";import{H as b,K as x,U as S,a as C,c as w,s as T,v as E,w as D,x as O,y as k}from"./chunk-I66GZJ75-b3yMIljX.js";import{t as A}from"./init-C-OQMol4.js";import{t as j}from"./dist-CsdsWTxp.js";import{g as ee}from"./chunk-NSK5VX7P-CfigFGDQ.js";var te=Math.PI/180,ne=180/Math.PI,re=18,ie=.96422,ae=1,oe=.82521,se=4/29,M=6/29,ce=3*M*M,le=M*M*M;function ue(e){if(e instanceof N)return new N(e.l,e.a,e.b,e.opacity);if(e instanceof P)return ve(e);e instanceof l||(e=_(e));var t=he(e.r),n=he(e.g),r=he(e.b),i=fe((.2225045*t+.7168786*n+.0606169*r)/ae),a,o;return t===n&&n===r?a=o=i:(a=fe((.4360747*t+.3850649*n+.1430804*r)/ie),o=fe((.0139322*t+.0971045*n+.7141733*r)/oe)),new N(116*i-16,500*(a-i),200*(i-o),e.opacity)}function de(e,t,n,r){return arguments.length===1?ue(e):new N(e,t,n,r??1)}function N(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}u(N,de,d(g,{brighter(e){return new N(this.l+re*(e??1),this.a,this.b,this.opacity)},darker(e){return new N(this.l-re*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return t=ie*pe(t),e=ae*pe(e),n=oe*pe(n),new l(me(3.1338561*t-1.6168667*e-.4906146*n),me(-.9787684*t+1.9161415*e+.033454*n),me(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}}));function fe(e){return e>le?e**(1/3):e/ce+se}function pe(e){return e>M?e*e*e:ce*(e-se)}function me(e){return 255*(e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055)}function he(e){return(e/=255)<=.04045?e/12.92:((e+.055)/1.055)**2.4}function ge(e){if(e instanceof P)return new P(e.h,e.c,e.l,e.opacity);if(e instanceof N||(e=ue(e)),e.a===0&&e.b===0)return new P(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*ne;return new P(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function _e(e,t,n,r){return arguments.length===1?ge(e):new P(e,t,n,r??1)}function P(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function ve(e){if(isNaN(e.h))return new N(e.l,0,0,e.opacity);var t=e.h*te;return new N(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}u(P,_e,d(g,{brighter(e){return new P(this.h,this.c,this.l+re*(e??1),this.opacity)},darker(e){return new P(this.h,this.c,this.l-re*(e??1),this.opacity)},rgb(){return ve(this).rgb()}}));function ye(e){return function(t,n){var r=e((t=_e(t)).h,(n=_e(n)).h),i=c(t.c,n.c),a=c(t.l,n.l),o=c(t.opacity,n.opacity);return function(e){return t.h=r(e),t.c=i(e),t.l=a(e),t.opacity=o(e),t+``}}}var be=ye(f);function xe(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n<t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function Se(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n>t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function Ce(e){return e}var we=1,Te=2,Ee=3,De=4,Oe=1e-6;function ke(e){return`translate(`+e+`,0)`}function Ae(e){return`translate(0,`+e+`)`}function je(e){return t=>+e(t)}function Me(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function Ne(){return!this.__axis}function Pe(e,t){var n=[],r=null,i=null,a=6,o=6,s=3,c=typeof window<`u`&&window.devicePixelRatio>1?0:.5,l=e===we||e===De?-1:1,u=e===De||e===Te?`x`:`y`,d=e===we||e===Ee?ke:Ae;function f(f){var p=r??(t.ticks?t.ticks.apply(t,n):t.domain()),m=i??(t.tickFormat?t.tickFormat.apply(t,n):Ce),h=Math.max(a,0)+s,g=t.range(),_=+g[0]+c,v=+g[g.length-1]+c,y=(t.bandwidth?Me:je)(t.copy(),c),b=f.selection?f.selection():f,x=b.selectAll(`.domain`).data([null]),S=b.selectAll(`.tick`).data(p,t).order(),C=S.exit(),w=S.enter().append(`g`).attr(`class`,`tick`),T=S.select(`line`),E=S.select(`text`);x=x.merge(x.enter().insert(`path`,`.tick`).attr(`class`,`domain`).attr(`stroke`,`currentColor`)),S=S.merge(w),T=T.merge(w.append(`line`).attr(`stroke`,`currentColor`).attr(u+`2`,l*a)),E=E.merge(w.append(`text`).attr(`fill`,`currentColor`).attr(u,l*h).attr(`dy`,e===we?`0em`:e===Ee?`0.71em`:`0.32em`)),f!==b&&(x=x.transition(f),S=S.transition(f),T=T.transition(f),E=E.transition(f),C=C.transition(f).attr(`opacity`,Oe).attr(`transform`,function(e){return isFinite(e=y(e))?d(e+c):this.getAttribute(`transform`)}),w.attr(`opacity`,Oe).attr(`transform`,function(e){var t=this.parentNode.__axis;return d((t&&isFinite(t=t(e))?t:y(e))+c)})),C.remove(),x.attr(`d`,e===De||e===Te?o?`M`+l*o+`,`+_+`H`+c+`V`+v+`H`+l*o:`M`+c+`,`+_+`V`+v:o?`M`+_+`,`+l*o+`V`+c+`H`+v+`V`+l*o:`M`+_+`,`+c+`H`+v),S.attr(`opacity`,1).attr(`transform`,function(e){return d(y(e)+c)}),T.attr(u+`2`,l*a),E.attr(u,l*h).text(m),b.filter(Ne).attr(`fill`,`none`).attr(`font-size`,10).attr(`font-family`,`sans-serif`).attr(`text-anchor`,e===Te?`start`:e===De?`end`:`middle`),b.each(function(){this.__axis=y})}return f.scale=function(e){return arguments.length?(t=e,f):t},f.ticks=function(){return n=Array.from(arguments),f},f.tickArguments=function(e){return arguments.length?(n=e==null?[]:Array.from(e),f):n.slice()},f.tickValues=function(e){return arguments.length?(r=e==null?null:Array.from(e),f):r&&r.slice()},f.tickFormat=function(e){return arguments.length?(i=e,f):i},f.tickSize=function(e){return arguments.length?(a=o=+e,f):a},f.tickSizeInner=function(e){return arguments.length?(a=+e,f):a},f.tickSizeOuter=function(e){return arguments.length?(o=+e,f):o},f.tickPadding=function(e){return arguments.length?(s=+e,f):s},f.offset=function(e){return arguments.length?(c=+e,f):c},f}function Fe(e){return Pe(we,e)}function Ie(e){return Pe(Ee,e)}function Le(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],o;return a<i&&(o=n,n=r,r=o,o=i,i=a,a=o),e[n]=t.floor(i),e[r]=t.ceil(a),e}var Re=new Date,ze=new Date;function F(e,t,n,r){function i(t){return e(t=arguments.length===0?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{let t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=(e,n)=>(t(e=new Date(+e),n==null?1:Math.floor(n)),e),i.range=(n,r,a)=>{let o=[];if(n=i.ceil(n),a=a==null?1:Math.floor(a),!(n<r)||!(a>0))return o;let s;do o.push(s=new Date(+n)),t(n,a),e(n);while(s<n&&n<r);return o},i.filter=n=>F(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e){if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}}),n&&(i.count=(t,r)=>(Re.setTime(+t),ze.setTime(+r),e(Re),e(ze),Math.floor(n(Re,ze))),i.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?i.filter(r?t=>r(t)%e===0:t=>i.count(0,t)%e===0):i)),i}var Be=F(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Be.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?F(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Be),Be.range;var I=1e3,L=I*60,R=L*60,z=R*24,Ve=z*7,He=z*30,Ue=z*365,B=F(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*I)},(e,t)=>(t-e)/I,e=>e.getUTCSeconds());B.range;var We=F(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*I)},(e,t)=>{e.setTime(+e+t*L)},(e,t)=>(t-e)/L,e=>e.getMinutes());We.range;var Ge=F(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*L)},(e,t)=>(t-e)/L,e=>e.getUTCMinutes());Ge.range;var Ke=F(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*I-e.getMinutes()*L)},(e,t)=>{e.setTime(+e+t*R)},(e,t)=>(t-e)/R,e=>e.getHours());Ke.range;var qe=F(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*R)},(e,t)=>(t-e)/R,e=>e.getUTCHours());qe.range;var V=F(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*L)/z,e=>e.getDate()-1);V.range;var Je=F(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/z,e=>e.getUTCDate()-1);Je.range;var Ye=F(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/z,e=>Math.floor(e/z));Ye.range;function H(e){return F(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+t*7)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*L)/Ve)}var Xe=H(0),Ze=H(1),Qe=H(2),$e=H(3),U=H(4),et=H(5),tt=H(6);Xe.range,Ze.range,Qe.range,$e.range,U.range,et.range,tt.range;function W(e){return F(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t*7)},(e,t)=>(t-e)/Ve)}var nt=W(0),rt=W(1),it=W(2),at=W(3),ot=W(4),st=W(5),ct=W(6);nt.range,rt.range,it.range,at.range,ot.range,st.range,ct.range;var lt=F(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());lt.range;var ut=F(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());ut.range;var G=F(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());G.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:F(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}),G.range;var K=F(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());K.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:F(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}),K.range;function dt(e,t,i,a,o,s){let c=[[B,1,I],[B,5,5*I],[B,15,15*I],[B,30,30*I],[s,1,L],[s,5,5*L],[s,15,15*L],[s,30,30*L],[o,1,R],[o,3,3*R],[o,6,6*R],[o,12,12*R],[a,1,z],[a,2,2*z],[i,1,Ve],[t,1,He],[t,3,3*He],[e,1,Ue]];function l(e,t,n){let r=t<e;r&&([e,t]=[t,e]);let i=n&&typeof n.range==`function`?n:u(e,t,n),a=i?i.range(e,+t+1):[];return r?a.reverse():a}function u(t,i,a){let o=Math.abs(i-t)/a,s=n(([,,e])=>e).right(c,o);if(s===c.length)return e.every(r(t/Ue,i/Ue,a));if(s===0)return Be.every(Math.max(r(t,i,a),1));let[l,u]=c[o/c[s-1][2]<c[s][2]/o?s-1:s];return l.every(u)}return[l,u]}var[ft,pt]=dt(K,ut,nt,Ye,qe,Ge),[mt,ht]=dt(G,lt,Xe,V,Ke,We);function gt(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function _t(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function vt(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function yt(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,c=e.shortMonths,l=wt(i),u=Tt(i),d=wt(a),f=Tt(a),p=wt(o),m=Tt(o),h=wt(s),g=Tt(s),_=wt(c),v=Tt(c),y={a:te,A:ne,b:re,B:ie,c:null,d:Kt,e:Kt,f:Zt,g:ln,G:dn,H:qt,I:Jt,j:Yt,L:Xt,m:Qt,M:$t,p:ae,q:oe,Q:Pn,s:Fn,S:en,u:tn,U:nn,V:an,w:on,W:sn,x:null,X:null,y:cn,Y:un,Z:fn,"%":Nn},b={a:se,A:M,b:ce,B:le,c:null,d:pn,e:pn,f:vn,g:kn,G:jn,H:mn,I:hn,j:gn,L:_n,m:yn,M:bn,p:ue,q:de,Q:Pn,s:Fn,S:xn,u:Sn,U:Cn,V:Tn,w:En,W:Dn,x:null,X:null,y:On,Y:An,Z:Mn,"%":Nn},x={a:E,A:D,b:O,B:k,c:A,d:It,e:It,f:Ht,g:Mt,G:jt,H:Rt,I:Rt,j:Lt,L:Vt,m:Ft,M:zt,p:T,q:Pt,Q:Wt,s:Gt,S:Bt,u:Dt,U:Ot,V:kt,w:Et,W:At,x:j,X:ee,y:Mt,Y:jt,Z:Nt,"%":Ut};y.x=S(n,y),y.X=S(r,y),y.c=S(t,y),b.x=S(n,b),b.X=S(r,b),b.c=S(t,b);function S(e,t){return function(n){var r=[],i=-1,a=0,o=e.length,s,c,l;for(n instanceof Date||(n=new Date(+n));++i<o;)e.charCodeAt(i)===37&&(r.push(e.slice(a,i)),(c=bt[s=e.charAt(++i)])==null?c=s===`e`?` `:`0`:s=e.charAt(++i),(l=t[s])&&(s=l(n,c)),r.push(s),a=i+1);return r.push(e.slice(a,i)),r.join(``)}}function C(e,t){return function(n){var r=vt(1900,void 0,1),i=w(r,e,n+=``,0),a,o;if(i!=n.length)return null;if(`Q`in r)return new Date(r.Q);if(`s`in r)return new Date(r.s*1e3+(`L`in r?r.L:0));if(t&&!(`Z`in r)&&(r.Z=0),`p`in r&&(r.H=r.H%12+r.p*12),r.m===void 0&&(r.m=`q`in r?r.q:0),`V`in r){if(r.V<1||r.V>53)return null;`w`in r||(r.w=1),`Z`in r?(a=_t(vt(r.y,0,1)),o=a.getUTCDay(),a=o>4||o===0?rt.ceil(a):rt(a),a=Je.offset(a,(r.V-1)*7),r.y=a.getUTCFullYear(),r.m=a.getUTCMonth(),r.d=a.getUTCDate()+(r.w+6)%7):(a=gt(vt(r.y,0,1)),o=a.getDay(),a=o>4||o===0?Ze.ceil(a):Ze(a),a=V.offset(a,(r.V-1)*7),r.y=a.getFullYear(),r.m=a.getMonth(),r.d=a.getDate()+(r.w+6)%7)}else(`W`in r||`U`in r)&&(`w`in r||(r.w=`u`in r?r.u%7:+(`W`in r)),o=`Z`in r?_t(vt(r.y,0,1)).getUTCDay():gt(vt(r.y,0,1)).getDay(),r.m=0,r.d=`W`in r?(r.w+6)%7+r.W*7-(o+5)%7:r.w+r.U*7-(o+6)%7);return`Z`in r?(r.H+=r.Z/100|0,r.M+=r.Z%100,_t(r)):gt(r)}}function w(e,t,n,r){for(var i=0,a=t.length,o=n.length,s,c;i<a;){if(r>=o)return-1;if(s=t.charCodeAt(i++),s===37){if(s=t.charAt(i++),c=x[s in bt?t.charAt(i++):s],!c||(r=c(e,n,r))<0)return-1}else if(s!=n.charCodeAt(r++))return-1}return r}function T(e,t,n){var r=l.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1}function E(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=m.get(r[0].toLowerCase()),n+r[0].length):-1}function D(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1}function O(e,t,n){var r=_.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1}function k(e,t,n){var r=h.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1}function A(e,n,r){return w(e,t,n,r)}function j(e,t,r){return w(e,n,t,r)}function ee(e,t,n){return w(e,r,t,n)}function te(e){return o[e.getDay()]}function ne(e){return a[e.getDay()]}function re(e){return c[e.getMonth()]}function ie(e){return s[e.getMonth()]}function ae(e){return i[+(e.getHours()>=12)]}function oe(e){return 1+~~(e.getMonth()/3)}function se(e){return o[e.getUTCDay()]}function M(e){return a[e.getUTCDay()]}function ce(e){return c[e.getUTCMonth()]}function le(e){return s[e.getUTCMonth()]}function ue(e){return i[+(e.getUTCHours()>=12)]}function de(e){return 1+~~(e.getUTCMonth()/3)}return{format:function(e){var t=S(e+=``,y);return t.toString=function(){return e},t},parse:function(e){var t=C(e+=``,!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=S(e+=``,b);return t.toString=function(){return e},t},utcParse:function(e){var t=C(e+=``,!0);return t.toString=function(){return e},t}}}var bt={"-":``,_:` `,0:`0`},q=/^\s*\d+/,xt=/^%/,St=/[\\^$*+?|[\]().{}]/g;function J(e,t,n){var r=e<0?`-`:``,i=(r?-e:e)+``,a=i.length;return r+(a<n?Array(n-a+1).join(t)+i:i)}function Ct(e){return e.replace(St,`\\$&`)}function wt(e){return RegExp(`^(?:`+e.map(Ct).join(`|`)+`)`,`i`)}function Tt(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function Et(e,t,n){var r=q.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Dt(e,t,n){var r=q.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Ot(e,t,n){var r=q.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function kt(e,t,n){var r=q.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function At(e,t,n){var r=q.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function jt(e,t,n){var r=q.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Mt(e,t,n){var r=q.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Nt(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||`00`)),n+r[0].length):-1}function Pt(e,t,n){var r=q.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function Ft(e,t,n){var r=q.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function It(e,t,n){var r=q.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Lt(e,t,n){var r=q.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Rt(e,t,n){var r=q.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function zt(e,t,n){var r=q.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Bt(e,t,n){var r=q.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Vt(e,t,n){var r=q.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Ht(e,t,n){var r=q.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Ut(e,t,n){var r=xt.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Wt(e,t,n){var r=q.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Gt(e,t,n){var r=q.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Kt(e,t){return J(e.getDate(),t,2)}function qt(e,t){return J(e.getHours(),t,2)}function Jt(e,t){return J(e.getHours()%12||12,t,2)}function Yt(e,t){return J(1+V.count(G(e),e),t,3)}function Xt(e,t){return J(e.getMilliseconds(),t,3)}function Zt(e,t){return Xt(e,t)+`000`}function Qt(e,t){return J(e.getMonth()+1,t,2)}function $t(e,t){return J(e.getMinutes(),t,2)}function en(e,t){return J(e.getSeconds(),t,2)}function tn(e){var t=e.getDay();return t===0?7:t}function nn(e,t){return J(Xe.count(G(e)-1,e),t,2)}function rn(e){var t=e.getDay();return t>=4||t===0?U(e):U.ceil(e)}function an(e,t){return e=rn(e),J(U.count(G(e),e)+(G(e).getDay()===4),t,2)}function on(e){return e.getDay()}function sn(e,t){return J(Ze.count(G(e)-1,e),t,2)}function cn(e,t){return J(e.getFullYear()%100,t,2)}function ln(e,t){return e=rn(e),J(e.getFullYear()%100,t,2)}function un(e,t){return J(e.getFullYear()%1e4,t,4)}function dn(e,t){var n=e.getDay();return e=n>=4||n===0?U(e):U.ceil(e),J(e.getFullYear()%1e4,t,4)}function fn(e){var t=e.getTimezoneOffset();return(t>0?`-`:(t*=-1,`+`))+J(t/60|0,`0`,2)+J(t%60,`0`,2)}function pn(e,t){return J(e.getUTCDate(),t,2)}function mn(e,t){return J(e.getUTCHours(),t,2)}function hn(e,t){return J(e.getUTCHours()%12||12,t,2)}function gn(e,t){return J(1+Je.count(K(e),e),t,3)}function _n(e,t){return J(e.getUTCMilliseconds(),t,3)}function vn(e,t){return _n(e,t)+`000`}function yn(e,t){return J(e.getUTCMonth()+1,t,2)}function bn(e,t){return J(e.getUTCMinutes(),t,2)}function xn(e,t){return J(e.getUTCSeconds(),t,2)}function Sn(e){var t=e.getUTCDay();return t===0?7:t}function Cn(e,t){return J(nt.count(K(e)-1,e),t,2)}function wn(e){var t=e.getUTCDay();return t>=4||t===0?ot(e):ot.ceil(e)}function Tn(e,t){return e=wn(e),J(ot.count(K(e),e)+(K(e).getUTCDay()===4),t,2)}function En(e){return e.getUTCDay()}function Dn(e,t){return J(rt.count(K(e)-1,e),t,2)}function On(e,t){return J(e.getUTCFullYear()%100,t,2)}function kn(e,t){return e=wn(e),J(e.getUTCFullYear()%100,t,2)}function An(e,t){return J(e.getUTCFullYear()%1e4,t,4)}function jn(e,t){var n=e.getUTCDay();return e=n>=4||n===0?ot(e):ot.ceil(e),J(e.getUTCFullYear()%1e4,t,4)}function Mn(){return`+0000`}function Nn(){return`%`}function Pn(e){return+e}function Fn(e){return Math.floor(e/1e3)}var In,Ln;Rn({dateTime:`%x, %X`,date:`%-m/%-d/%Y`,time:`%-I:%M:%S %p`,periods:[`AM`,`PM`],days:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],shortDays:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],months:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],shortMonths:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`]});function Rn(e){return In=yt(e),Ln=In.format,In.parse,In.utcFormat,In.utcParse,In}function zn(e){return new Date(e)}function Bn(e){return e instanceof Date?+e:+new Date(+e)}function Vn(e,t,n,r,o,s,c,l,u,d){var f=i(),p=f.invert,m=f.domain,h=d(`.%L`),g=d(`:%S`),_=d(`%I:%M`),v=d(`%I %p`),y=d(`%a %d`),b=d(`%b %d`),x=d(`%B`),S=d(`%Y`);function C(e){return(u(e)<e?h:l(e)<e?g:c(e)<e?_:s(e)<e?v:r(e)<e?o(e)<e?y:b:n(e)<e?x:S)(e)}return f.invert=function(e){return new Date(p(e))},f.domain=function(e){return arguments.length?m(Array.from(e,Bn)):m().map(zn)},f.ticks=function(t){var n=m();return e(n[0],n[n.length-1],t??10)},f.tickFormat=function(e,t){return t==null?C:d(t)},f.nice=function(e){var n=m();return(!e||typeof e.range!=`function`)&&(e=t(n[0],n[n.length-1],e??10)),e?m(Le(n,e)):f},f.copy=function(){return a(f,Vn(e,t,n,r,o,s,c,l,u,d))},f}function Hn(){return A.apply(Vn(mt,ht,G,lt,Xe,V,Ke,We,B,Ln).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var Un=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_advancedFormat=r()})(e,(function(){return function(e,t){var n=t.prototype,r=n.format;n.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return r.bind(this)(e);var i=this.$utils(),a=(e||`YYYY-MM-DDTHH:mm:ssZ`).replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(e){switch(e){case`Q`:return Math.ceil((t.$M+1)/3);case`Do`:return n.ordinal(t.$D);case`gggg`:return t.weekYear();case`GGGG`:return t.isoWeekYear();case`wo`:return n.ordinal(t.week(),`W`);case`w`:case`ww`:return i.s(t.week(),e===`w`?1:2,`0`);case`W`:case`WW`:return i.s(t.isoWeek(),e===`W`?1:2,`0`);case`k`:case`kk`:return i.s(String(t.$H===0?24:t.$H),e===`k`?1:2,`0`);case`X`:return Math.floor(t.$d.getTime()/1e3);case`x`:return t.$d.getTime();case`z`:return`[`+t.offsetName()+`]`;case`zzz`:return`[`+t.offsetName(`long`)+`]`;default:return e}}));return r.bind(this)(a)}}}))})),Wn=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_duration=r()})(e,(function(){var e,t,n=1e3,r=6e4,i=36e5,a=864e5,o=31536e6,s=2628e6,c=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,l=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,u={years:o,months:s,days:a,hours:i,minutes:r,seconds:n,milliseconds:1,weeks:6048e5},d=function(e){return e instanceof v},f=function(e,t,n){return new v(e,n,t.$l)},p=function(e){return t.p(e)+`s`},m=function(e){return e<0},h=function(e){return m(e)?Math.ceil(e):Math.floor(e)},g=function(e){return Math.abs(e)},_=function(e,t){return e?m(e)?{negative:!0,format:``+g(e)+t}:{negative:!1,format:``+e+t}:{negative:!1,format:``}},v=function(){function m(e,t,n){var r=this;if(this.$d={},this.$l=n,e===void 0&&(this.$ms=0,this.parseFromMilliseconds()),t)return f(e*u[p(t)],this);if(typeof e==`number`)return this.$ms=e,this.parseFromMilliseconds(),this;if(typeof e==`object`)return Object.keys(e).forEach((function(t){r.$d[p(t)]=e[t]})),this.calMilliseconds(),this;if(typeof e==`string`){var i=e.match(c);if(i){var a=i.slice(2).map((function(e){return e==null?0:Number(e)}));return this.$d.years=a[0],this.$d.months=a[1],this.$d.weeks=a[2],this.$d.days=a[3],this.$d.hours=a[4],this.$d.minutes=a[5],this.$d.seconds=a[6],this.calMilliseconds(),this}}return this}var g=m.prototype;return g.calMilliseconds=function(){var e=this;this.$ms=Object.keys(this.$d).reduce((function(t,n){return t+(e.$d[n]||0)*u[n]}),0)},g.parseFromMilliseconds=function(){var e=this.$ms;this.$d.years=h(e/o),e%=o,this.$d.months=h(e/s),e%=s,this.$d.days=h(e/a),e%=a,this.$d.hours=h(e/i),e%=i,this.$d.minutes=h(e/r),e%=r,this.$d.seconds=h(e/n),e%=n,this.$d.milliseconds=e},g.toISOString=function(){var e=_(this.$d.years,`Y`),t=_(this.$d.months,`M`),n=+this.$d.days||0;this.$d.weeks&&(n+=7*this.$d.weeks);var r=_(n,`D`),i=_(this.$d.hours,`H`),a=_(this.$d.minutes,`M`),o=this.$d.seconds||0;this.$d.milliseconds&&(o+=this.$d.milliseconds/1e3,o=Math.round(1e3*o)/1e3);var s=_(o,`S`),c=e.negative||t.negative||r.negative||i.negative||a.negative||s.negative,l=i.format||a.format||s.format?`T`:``,u=(c?`-`:``)+`P`+e.format+t.format+r.format+l+i.format+a.format+s.format;return u===`P`||u===`-P`?`P0D`:u},g.toJSON=function(){return this.toISOString()},g.format=function(e){var n=e||`YYYY-MM-DDTHH:mm:ss`,r={Y:this.$d.years,YY:t.s(this.$d.years,2,`0`),YYYY:t.s(this.$d.years,4,`0`),M:this.$d.months,MM:t.s(this.$d.months,2,`0`),D:this.$d.days,DD:t.s(this.$d.days,2,`0`),H:this.$d.hours,HH:t.s(this.$d.hours,2,`0`),m:this.$d.minutes,mm:t.s(this.$d.minutes,2,`0`),s:this.$d.seconds,ss:t.s(this.$d.seconds,2,`0`),SSS:t.s(this.$d.milliseconds,3,`0`)};return n.replace(l,(function(e,t){return t||String(r[e])}))},g.as=function(e){return this.$ms/u[p(e)]},g.get=function(e){var t=this.$ms,n=p(e);return n===`milliseconds`?t%=1e3:t=n===`weeks`?h(t/u[n]):this.$d[n],t||0},g.add=function(e,t,n){var r;return r=t?e*u[p(t)]:d(e)?e.$ms:f(e,this).$ms,f(this.$ms+r*(n?-1:1),this)},g.subtract=function(e,t){return this.add(e,t,!0)},g.locale=function(e){var t=this.clone();return t.$l=e,t},g.clone=function(){return f(this.$ms,this)},g.humanize=function(t){return e().add(this.$ms,`ms`).locale(this.$l).fromNow(!t)},g.valueOf=function(){return this.asMilliseconds()},g.milliseconds=function(){return this.get(`milliseconds`)},g.asMilliseconds=function(){return this.as(`milliseconds`)},g.seconds=function(){return this.get(`seconds`)},g.asSeconds=function(){return this.as(`seconds`)},g.minutes=function(){return this.get(`minutes`)},g.asMinutes=function(){return this.as(`minutes`)},g.hours=function(){return this.get(`hours`)},g.asHours=function(){return this.as(`hours`)},g.days=function(){return this.get(`days`)},g.asDays=function(){return this.as(`days`)},g.weeks=function(){return this.get(`weeks`)},g.asWeeks=function(){return this.as(`weeks`)},g.months=function(){return this.get(`months`)},g.asMonths=function(){return this.as(`months`)},g.years=function(){return this.get(`years`)},g.asYears=function(){return this.as(`years`)},m}(),y=function(e,t,n){return e.add(t.years()*n,`y`).add(t.months()*n,`M`).add(t.days()*n,`d`).add(t.hours()*n,`h`).add(t.minutes()*n,`m`).add(t.seconds()*n,`s`).add(t.milliseconds()*n,`ms`)};return function(n,r,i){e=i,t=i().$utils(),i.duration=function(e,t){return f(e,{$l:i.locale()},t)},i.isDuration=d;var a=r.prototype.add,o=r.prototype.subtract;r.prototype.add=function(e,t){return d(e)?y(this,e,1):a.bind(this)(e,t)},r.prototype.subtract=function(e,t){return d(e)?y(this,e,-1):o.bind(this)(e,t)}}}))})),Gn=j(),Y=e(p(),1),Kn=e(s(),1),qn=e(m(),1),Jn=e(Un(),1),Yn=e(Wn(),1),Xn=(function(){var e=v(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],n=[1,26],r=[1,27],i=[1,28],a=[1,29],o=[1,30],s=[1,31],c=[1,32],l=[1,33],u=[1,34],d=[1,9],f=[1,10],p=[1,11],m=[1,12],h=[1,13],g=[1,14],_=[1,15],y=[1,16],b=[1,19],x=[1,20],S=[1,21],C=[1,22],w=[1,23],T=[1,25],E=[1,35],D={trace:v(function(){},`trace`),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:`error`,4:`gantt`,6:`EOF`,8:`SPACE`,10:`NL`,12:`weekday_monday`,13:`weekday_tuesday`,14:`weekday_wednesday`,15:`weekday_thursday`,16:`weekday_friday`,17:`weekday_saturday`,18:`weekday_sunday`,20:`weekend_friday`,21:`weekend_saturday`,22:`dateFormat`,23:`inclusiveEndDates`,24:`topAxis`,25:`axisFormat`,26:`tickInterval`,27:`excludes`,28:`includes`,29:`todayMarker`,30:`title`,31:`acc_title`,32:`acc_title_value`,33:`acc_descr`,34:`acc_descr_value`,35:`acc_descr_multiline_value`,36:`section`,38:`taskTxt`,39:`taskData`,40:`click`,41:`callbackname`,42:`callbackargs`,43:`href`},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:v(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:r.setWeekday(`monday`);break;case 9:r.setWeekday(`tuesday`);break;case 10:r.setWeekday(`wednesday`);break;case 11:r.setWeekday(`thursday`);break;case 12:r.setWeekday(`friday`);break;case 13:r.setWeekday(`saturday`);break;case 14:r.setWeekday(`sunday`);break;case 15:r.setWeekend(`friday`);break;case 16:r.setWeekend(`saturday`);break;case 17:r.setDateFormat(a[s].substr(11)),this.$=a[s].substr(11);break;case 18:r.enableInclusiveEndDates(),this.$=a[s].substr(18);break;case 19:r.TopAxis(),this.$=a[s].substr(8);break;case 20:r.setAxisFormat(a[s].substr(11)),this.$=a[s].substr(11);break;case 21:r.setTickInterval(a[s].substr(13)),this.$=a[s].substr(13);break;case 22:r.setExcludes(a[s].substr(9)),this.$=a[s].substr(9);break;case 23:r.setIncludes(a[s].substr(9)),this.$=a[s].substr(9);break;case 24:r.setTodayMarker(a[s].substr(12)),this.$=a[s].substr(12);break;case 27:r.setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 28:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 29:case 30:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 31:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 33:r.addTask(a[s-1],a[s]),this.$=`task`;break;case 34:this.$=a[s-1],r.setClickEvent(a[s-1],a[s],null);break;case 35:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 36:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],null),r.setLink(a[s-2],a[s]);break;case 37:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-2],a[s-1]),r.setLink(a[s-3],a[s]);break;case 38:this.$=a[s-2],r.setClickEvent(a[s-2],a[s],null),r.setLink(a[s-2],a[s-1]);break;case 39:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-1],a[s]),r.setLink(a[s-3],a[s-2]);break;case 40:this.$=a[s-1],r.setLink(a[s-1],a[s]);break;case 41:case 47:this.$=a[s-1]+` `+a[s];break;case 42:case 43:case 45:this.$=a[s-2]+` `+a[s-1]+` `+a[s];break;case 44:case 46:this.$=a[s-3]+` `+a[s-2]+` `+a[s-1]+` `+a[s]}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},e(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:r,14:i,15:a,16:o,17:s,18:c,19:18,20:l,21:u,22:d,23:f,24:p,25:m,26:h,27:g,28:_,29:y,30:b,31:x,33:S,35:C,36:w,37:24,38:T,40:E},e(t,[2,7],{1:[2,1]}),e(t,[2,3]),{9:36,11:17,12:n,13:r,14:i,15:a,16:o,17:s,18:c,19:18,20:l,21:u,22:d,23:f,24:p,25:m,26:h,27:g,28:_,29:y,30:b,31:x,33:S,35:C,36:w,37:24,38:T,40:E},e(t,[2,5]),e(t,[2,6]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,20]),e(t,[2,21]),e(t,[2,22]),e(t,[2,23]),e(t,[2,24]),e(t,[2,25]),e(t,[2,26]),e(t,[2,27]),{32:[1,37]},{34:[1,38]},e(t,[2,30]),e(t,[2,31]),e(t,[2,32]),{39:[1,39]},e(t,[2,8]),e(t,[2,9]),e(t,[2,10]),e(t,[2,11]),e(t,[2,12]),e(t,[2,13]),e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),{41:[1,40],43:[1,41]},e(t,[2,4]),e(t,[2,28]),e(t,[2,29]),e(t,[2,33]),e(t,[2,34],{42:[1,42],43:[1,43]}),e(t,[2,40],{41:[1,44]}),e(t,[2,35],{43:[1,45]}),e(t,[2,36]),e(t,[2,38],{42:[1,46]}),e(t,[2,37]),e(t,[2,39])],defaultActions:{},parseError:v(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:v(function(e){var t=this,n=[0],r=[],i=[null],a=[],o=this.table,s=``,c=0,l=0,u=0,d=2,f=1,p=a.slice.call(arguments,1),m=Object.create(this.lexer),h={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(h.yy[g]=this.yy[g]);m.setInput(e,h.yy),h.yy.lexer=m,h.yy.parser=this,m.yylloc===void 0&&(m.yylloc={});var _=m.yylloc;a.push(_);var y=m.options&&m.options.ranges;this.parseError=typeof h.yy.parseError==`function`?h.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){n.length-=2*e,i.length-=e,a.length-=e}v(b,`popStack`);function x(){var e=r.pop()||m.lex()||f;return typeof e!=`number`&&(e instanceof Array&&(r=e,e=r.pop()),e=t.symbols_[e]||e),e}v(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=o[w]&&o[w][S]),T===void 0||!T.length||!T[0]){var ee=``;for(O in j=[],o[w])this.terminals_[O]&&O>d&&j.push(`'`+this.terminals_[O]+`'`);ee=m.showPosition?`Parse error on line `+(c+1)+`:
2
2
  `+m.showPosition()+`
3
3
  Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(c+1)+`: Unexpected `+(S==f?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(ee,{text:m.match,token:this.terminals_[S]||S,line:m.yylineno,loc:_,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:n.push(S),i.push(m.yytext),a.push(m.yylloc),n.push(T[1]),S=null,C?(S=C,C=null):(l=m.yyleng,s=m.yytext,c=m.yylineno,_=m.yylloc,u>0&&u--);break;case 2:if(k=this.productions_[T[1]][1],D.$=i[i.length-k],D._$={first_line:a[a.length-(k||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(k||1)].first_column,last_column:a[a.length-1].last_column},y&&(D._$.range=[a[a.length-(k||1)].range[0],a[a.length-1].range[1]]),E=this.performAction.apply(D,[s,l,c,h.yy,T[1],i,a].concat(p)),E!==void 0)return E;k&&(n=n.slice(0,-1*k*2),i=i.slice(0,-1*k),a=a.slice(0,-1*k)),n.push(this.productions_[T[1]][0]),i.push(D.$),a.push(D._$),A=o[n[n.length-2]][n[n.length-1]],n.push(A);break;case 3:return!0}}return!0},`parse`)};D.lexer=(function(){return{EOF:1,parseError:v(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:v(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:v(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:v(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:v(function(){return this._more=!0,this},`more`),reject:v(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:v(function(e){this.unput(this.match.slice(e))},`less`),pastInput:v(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:v(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:v(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
@@ -1 +1 @@
1
- import"./chunk-KEIR6QF5-BICK3FdT.js";import{E as e}from"./mermaid-parser.core-BtmN233C.js";export{e as createGitGraphServices};
1
+ import"./chunk-KEIR6QF5-BICK3FdT.js";import{E as e}from"./mermaid-parser.core-CwwjcAjz.js";export{e as createGitGraphServices};
@@ -1,4 +1,4 @@
1
- import{p as e}from"./index-snBzz_U8.js";import{n as t}from"./mermaid-parser.core-BtmN233C.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{t as r}from"./src-CxJwpjvz.js";import{H as i,K as a,U as o,Y as s,a as c,b as l,f as u,s as d,v as f,w as p,x as m,y as h}from"./chunk-I66GZJ75-C-Lq_UXl.js";import{g,i as _,m as v}from"./chunk-NSK5VX7P-Fi_H0vaS.js";import{t as y}from"./chunk-JWPE2WC7-DVXcaiue.js";import{t as b}from"./chunk-2Q5K7J3B-C1jixKkw.js";var x={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},ee=u.gitGraph,S=n(()=>_({...ee,...l().gitGraph}),`getConfig`),C=new b(()=>{let e=S(),t=e.mainBranchName,n=e.mainBranchOrder;return{mainBranchName:t,commits:new Map,head:null,branchConfig:new Map([[t,{name:t,order:n}]]),branches:new Map([[t,null]]),currBranch:t,direction:`LR`,seq:0,options:{}}});function w(){return v({length:7})}n(w,`getID`);function T(e,t){let n=Object.create(null);return e.reduce((e,r)=>{let i=t(r);return n[i]||(n[i]=!0,e.push(r)),e},[])}n(T,`uniqBy`);var te=n(function(e){C.records.direction=e},`setDirection`),ne=n(function(e){r.debug(`options str`,e),e=e?.trim(),e||=`{}`;try{C.records.options=JSON.parse(e)}catch(e){r.error(`error while parsing gitGraph options`,e.message)}},`setOptions`),re=n(function(){return C.records.options},`getOptions`),ie=n(function(e){let t=e.msg,n=e.id,i=e.type,a=e.tags;r.info(`commit`,t,n,i,a),r.debug(`Entering commit:`,t,n,i,a);let o=S();n=d.sanitizeText(n,o),t=d.sanitizeText(t,o),a=a?.map(e=>d.sanitizeText(e,o));let s={id:n||C.records.seq+`-`+w(),message:t,seq:C.records.seq++,type:i??x.NORMAL,tags:a??[],parents:C.records.head==null?[]:[C.records.head.id],branch:C.records.currBranch};C.records.head=s,r.info(`main branch`,o.mainBranchName),C.records.commits.has(s.id)&&r.warn(`Commit ID ${s.id} already exists`),C.records.commits.set(s.id,s),C.records.branches.set(C.records.currBranch,s.id),r.debug(`in pushCommit `+s.id)},`commit`),ae=n(function(e){let t=e.name,n=e.order;if(t=d.sanitizeText(t,S()),C.records.branches.has(t))throw Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${t}")`);C.records.branches.set(t,C.records.head==null?null:C.records.head.id),C.records.branchConfig.set(t,{name:t,order:n}),E(t),r.debug(`in createBranch`)},`branch`),oe=n(e=>{let t=e.branch,n=e.id,i=e.type,a=e.tags,o=S();t=d.sanitizeText(t,o),n&&=d.sanitizeText(n,o);let s=C.records.branches.get(C.records.currBranch),c=C.records.branches.get(t),l=s?C.records.commits.get(s):void 0,u=c?C.records.commits.get(c):void 0;if(l&&u&&l.branch===t)throw Error(`Cannot merge branch '${t}' into itself.`);if(C.records.currBranch===t){let e=Error(`Incorrect usage of "merge". Cannot merge a branch to itself`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch abc`]},e}if(l===void 0||!l){let e=Error(`Incorrect usage of "merge". Current branch (${C.records.currBranch})has no commits`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`commit`]},e}if(!C.records.branches.has(t)){let e=Error(`Incorrect usage of "merge". Branch to be merged (`+t+`) does not exist`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch ${t}`]},e}if(u===void 0||!u){let e=Error(`Incorrect usage of "merge". Branch to be merged (`+t+`) has no commits`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`"commit"`]},e}if(l===u){let e=Error(`Incorrect usage of "merge". Both branches have same head`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch abc`]},e}if(n&&C.records.commits.has(n)){let e=Error(`Incorrect usage of "merge". Commit with id:`+n+` already exists, use different custom id`);throw e.hash={text:`merge ${t} ${n} ${i} ${a?.join(` `)}`,token:`merge ${t} ${n} ${i} ${a?.join(` `)}`,expected:[`merge ${t} ${n}_UNIQUE ${i} ${a?.join(` `)}`]},e}let f=c||``,p={id:n||`${C.records.seq}-${w()}`,message:`merged branch ${t} into ${C.records.currBranch}`,seq:C.records.seq++,parents:C.records.head==null?[]:[C.records.head.id,f],branch:C.records.currBranch,type:x.MERGE,customType:i,customId:!!n,tags:a??[]};C.records.head=p,C.records.commits.set(p.id,p),C.records.branches.set(C.records.currBranch,p.id),r.debug(C.records.branches),r.debug(`in mergeBranch`)},`merge`),se=n(function(e){let t=e.id,n=e.targetId,i=e.tags,a=e.parent;r.debug(`Entering cherryPick:`,t,n,i);let o=S();if(t=d.sanitizeText(t,o),n=d.sanitizeText(n,o),i=i?.map(e=>d.sanitizeText(e,o)),a=d.sanitizeText(a,o),!t||!C.records.commits.has(t)){let e=Error(`Incorrect usage of "cherryPick". Source commit id should exist and provided`);throw e.hash={text:`cherryPick ${t} ${n}`,token:`cherryPick ${t} ${n}`,expected:[`cherry-pick abc`]},e}let s=C.records.commits.get(t);if(s===void 0||!s)throw Error(`Incorrect usage of "cherryPick". Source commit id should exist and provided`);if(a&&!(Array.isArray(s.parents)&&s.parents.includes(a)))throw Error(`Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.`);let c=s.branch;if(s.type===x.MERGE&&!a)throw Error(`Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.`);if(!n||!C.records.commits.has(n)){if(c===C.records.currBranch){let e=Error(`Incorrect usage of "cherryPick". Source commit is already on current branch`);throw e.hash={text:`cherryPick ${t} ${n}`,token:`cherryPick ${t} ${n}`,expected:[`cherry-pick abc`]},e}let e=C.records.branches.get(C.records.currBranch);if(e===void 0||!e){let e=Error(`Incorrect usage of "cherry-pick". Current branch (${C.records.currBranch})has no commits`);throw e.hash={text:`cherryPick ${t} ${n}`,token:`cherryPick ${t} ${n}`,expected:[`cherry-pick abc`]},e}let o=C.records.commits.get(e);if(o===void 0||!o){let e=Error(`Incorrect usage of "cherry-pick". Current branch (${C.records.currBranch})has no commits`);throw e.hash={text:`cherryPick ${t} ${n}`,token:`cherryPick ${t} ${n}`,expected:[`cherry-pick abc`]},e}let l={id:C.records.seq+`-`+w(),message:`cherry-picked ${s?.message} into ${C.records.currBranch}`,seq:C.records.seq++,parents:C.records.head==null?[]:[C.records.head.id,s.id],branch:C.records.currBranch,type:x.CHERRY_PICK,tags:i?i.filter(Boolean):[`cherry-pick:${s.id}${s.type===x.MERGE?`|parent:${a}`:``}`]};C.records.head=l,C.records.commits.set(l.id,l),C.records.branches.set(C.records.currBranch,l.id),r.debug(C.records.branches),r.debug(`in cherryPick`)}},`cherryPick`),E=n(function(e){if(e=d.sanitizeText(e,S()),C.records.branches.has(e)){C.records.currBranch=e;let t=C.records.branches.get(C.records.currBranch);t===void 0||!t?C.records.head=null:C.records.head=C.records.commits.get(t)??null}else{let t=Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw t.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},t}},`checkout`);function D(e,t,n){let r=e.indexOf(t);r===-1?e.push(n):e.splice(r,1,n)}n(D,`upsert`);function O(e){let t=e.reduce((e,t)=>e.seq>t.seq?e:t,e[0]),n=``;e.forEach(function(e){n+=e===t?` *`:` |`});let i=[n,t.id,t.seq];for(let e in C.records.branches)C.records.branches.get(e)===t.id&&i.push(e);if(r.debug(i.join(` `)),t.parents&&t.parents.length==2&&t.parents[0]&&t.parents[1]){let n=C.records.commits.get(t.parents[0]);D(e,t,n),t.parents[1]&&e.push(C.records.commits.get(t.parents[1]))}else if(t.parents.length==0)return;else if(t.parents[0]){let n=C.records.commits.get(t.parents[0]);D(e,t,n)}e=T(e,e=>e.id),O(e)}n(O,`prettyPrintCommitHistory`);var ce=n(function(){r.debug(C.records.commits);let e=k()[0];O([e])},`prettyPrint`),le=n(function(){C.reset(),c()},`clear`),ue=n(function(){return[...C.records.branchConfig.values()].map((e,t)=>e.order!==null&&e.order!==void 0?e:{...e,order:parseFloat(`0.${t}`)}).sort((e,t)=>(e.order??0)-(t.order??0)).map(({name:e})=>({name:e}))},`getBranchesAsObjArray`),de=n(function(){return C.records.branches},`getBranches`),fe=n(function(){return C.records.commits},`getCommits`),k=n(function(){let e=[...C.records.commits.values()];return e.forEach(function(e){r.debug(e.id)}),e.sort((e,t)=>e.seq-t.seq),e},`getCommitsArray`),A={commitType:x,getConfig:S,setDirection:te,setOptions:ne,getOptions:re,commit:ie,branch:ae,merge:oe,cherryPick:se,checkout:E,prettyPrint:ce,clear:le,getBranchesAsObjArray:ue,getBranches:de,getCommits:fe,getCommitsArray:k,getCurrentBranch:n(function(){return C.records.currBranch},`getCurrentBranch`),getDirection:n(function(){return C.records.direction},`getDirection`),getHead:n(function(){return C.records.head},`getHead`),setAccTitle:o,getAccTitle:h,getAccDescription:f,setAccDescription:i,setDiagramTitle:a,getDiagramTitle:p},pe=n((e,t)=>{y(e,t),e.dir&&t.setDirection(e.dir);for(let n of e.statements)me(n,t)},`populate`),me=n((e,t)=>{let i={Commit:n(e=>t.commit(he(e)),`Commit`),Branch:n(e=>t.branch(ge(e)),`Branch`),Merge:n(e=>t.merge(_e(e)),`Merge`),Checkout:n(e=>t.checkout(ve(e)),`Checkout`),CherryPicking:n(e=>t.cherryPick(ye(e)),`CherryPicking`)}[e.$type];i?i(e):r.error(`Unknown statement type: ${e.$type}`)},`parseStatement`),he=n(e=>({id:e.id,msg:e.message??``,type:e.type===void 0?x.NORMAL:x[e.type],tags:e.tags??void 0}),`parseCommit`),ge=n(e=>({name:e.name,order:e.order??0}),`parseBranch`),_e=n(e=>({branch:e.branch,id:e.id??``,type:e.type===void 0?void 0:x[e.type],tags:e.tags??void 0}),`parseMerge`),ve=n(e=>e.branch,`parseCheckout`),ye=n(e=>({id:e.id,targetId:``,tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),`parseCherryPicking`),be={parse:n(async e=>{let n=await t(`gitGraph`,e);r.debug(n),pe(n,A)},`parse`)},j=10,M=40,N=4,P=2,F=8,I=new Set([`redux`,`redux-dark`,`redux-color`,`redux-dark-color`]),L=12,R=new Set([`redux-color`,`redux-dark-color`]),xe=new Set([`dark`,`redux-dark`,`redux-dark-color`,`neo-dark`]),z=n((e,t,n=!1)=>n&&e>0?(e-1)%(t-1)+1:e%t,`calcColorIndex`),B=new Map,V=new Map,H=30,U=new Map,W=[],G=0,K=`LR`,Se=n(()=>{B.clear(),V.clear(),U.clear(),G=0,W=[],K=`LR`},`clear`),q=n(e=>{let t=document.createElementNS(`http://www.w3.org/2000/svg`,`text`);return(typeof e==`string`?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(e=>{let n=document.createElementNS(`http://www.w3.org/2000/svg`,`tspan`);n.setAttributeNS(`http://www.w3.org/XML/1998/namespace`,`xml:space`,`preserve`),n.setAttribute(`dy`,`1em`),n.setAttribute(`x`,`0`),n.setAttribute(`class`,`row`),n.textContent=e.trim(),t.appendChild(n)}),t},`drawText`),J=n(e=>{let t,r,i;return K===`BT`?(r=n((e,t)=>e<=t,`comparisonFunc`),i=1/0):(r=n((e,t)=>e>=t,`comparisonFunc`),i=0),e.forEach(e=>{let n=K===`TB`||K==`BT`?V.get(e)?.y:V.get(e)?.x;n!==void 0&&r(n,i)&&(t=e,i=n)}),t},`findClosestParent`),Ce=n(e=>{let t=``,n=1/0;return e.forEach(e=>{let r=V.get(e).y;r<=n&&(t=e,n=r)}),t||void 0},`findClosestParentBT`),we=n((e,t,n)=>{let r=n,i=n,a=[];e.forEach(e=>{let n=t.get(e);if(!n)throw Error(`Commit not found for key ${e}`);n.parents.length?(r=Ee(n),i=Math.max(r,i)):a.push(n),De(n,r)}),r=i,a.forEach(e=>{Oe(e,r,n)}),e.forEach(e=>{let n=t.get(e);if(n?.parents.length){let e=Ce(n.parents);r=V.get(e).y-M,r<=i&&(i=r);let t=B.get(n.branch).pos,a=r-j;V.set(n.id,{x:t,y:a})}})},`setParallelBTPos`),Te=n(e=>{let t=J(e.parents.filter(e=>e!==null));if(!t)throw Error(`Closest parent not found for commit ${e.id}`);let n=V.get(t)?.y;if(n===void 0)throw Error(`Closest parent position not found for commit ${e.id}`);return n},`findClosestParentPos`),Ee=n(e=>Te(e)+M,`calculateCommitPosition`),De=n((e,t)=>{let n=B.get(e.branch);if(!n)throw Error(`Branch not found for commit ${e.id}`);let r=n.pos,i=t+j;return V.set(e.id,{x:r,y:i}),{x:r,y:i}},`setCommitPosition`),Oe=n((e,t,n)=>{let r=B.get(e.branch);if(!r)throw Error(`Branch not found for commit ${e.id}`);let i=t+n,a=r.pos;V.set(e.id,{x:a,y:i})},`setRootPosition`),ke=n((e,t,n,r,i,a)=>{let{theme:o}=m(),s=I.has(o??``),c=R.has(o??``),l=xe.has(o??``);if(a===x.HIGHLIGHT)e.append(`rect`).attr(`x`,n.x-10+(s?3:0)).attr(`y`,n.y-10+(s?3:0)).attr(`width`,s?14:20).attr(`height`,s?14:20).attr(`class`,`commit ${t.id} commit-highlight${z(i,F,c)} ${r}-outer`),e.append(`rect`).attr(`x`,n.x-6+(s?2:0)).attr(`y`,n.y-6+(s?2:0)).attr(`width`,s?8:12).attr(`height`,s?8:12).attr(`class`,`commit ${t.id} commit${z(i,F,c)} ${r}-inner`);else if(a===x.CHERRY_PICK)e.append(`circle`).attr(`cx`,n.x).attr(`cy`,n.y).attr(`r`,s?7:10).attr(`class`,`commit ${t.id} ${r}`),e.append(`circle`).attr(`cx`,n.x-3).attr(`cy`,n.y+2).attr(`r`,s?2.5:2.75).attr(`fill`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`circle`).attr(`cx`,n.x+3).attr(`cy`,n.y+2).attr(`r`,s?2.5:2.75).attr(`fill`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`line`).attr(`x1`,n.x+3).attr(`y1`,n.y+1).attr(`x2`,n.x).attr(`y2`,n.y-5).attr(`stroke`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`line`).attr(`x1`,n.x-3).attr(`y1`,n.y+1).attr(`x2`,n.x).attr(`y2`,n.y-5).attr(`stroke`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`);else{let o=e.append(`circle`);if(o.attr(`cx`,n.x),o.attr(`cy`,n.y),o.attr(`r`,s?7:10),o.attr(`class`,`commit ${t.id} commit${z(i,F,c)}`),a===x.MERGE){let a=e.append(`circle`);a.attr(`cx`,n.x),a.attr(`cy`,n.y),a.attr(`r`,s?5:6),a.attr(`class`,`commit ${r} ${t.id} commit${z(i,F,c)}`)}if(a===x.REVERSE){let a=e.append(`path`),o=s?4:5;a.attr(`d`,`M ${n.x-o},${n.y-o}L${n.x+o},${n.y+o}M${n.x-o},${n.y+o}L${n.x+o},${n.y-o}`).attr(`class`,`commit ${r} ${t.id} commit${z(i,F,c)}`)}}},`drawCommitBullet`),Ae=n((e,t,n,r,i)=>{if(t.type!==x.CHERRY_PICK&&(t.customId&&t.type===x.MERGE||t.type!==x.MERGE)&&i.showCommitLabel){let a=e.append(`g`),o=a.insert(`rect`).attr(`class`,`commit-label-bkg`),s=a.append(`text`).attr(`x`,r).attr(`y`,n.y+25).attr(`class`,`commit-label`).text(t.id),c=s.node()?.getBBox();if(c&&(o.attr(`x`,n.posWithOffset-c.width/2-P).attr(`y`,n.y+13.5).attr(`width`,c.width+2*P).attr(`height`,c.height+2*P),K===`TB`||K===`BT`?(o.attr(`x`,n.x-(c.width+4*N+5)).attr(`y`,n.y-12),s.attr(`x`,n.x-(c.width+4*N)).attr(`y`,n.y+c.height-12)):s.attr(`x`,n.posWithOffset-c.width/2),i.rotateCommitLabel)){if(K===`TB`||K===`BT`)s.attr(`transform`,`rotate(-45, `+n.x+`, `+n.y+`)`),o.attr(`transform`,`rotate(-45, `+n.x+`, `+n.y+`)`);else{let e=-7.5-(c.width+10)/25*9.5,t=10+c.width/25*8.5;a.attr(`transform`,`translate(`+e+`, `+t+`) rotate(-45, `+r+`, `+n.y+`)`)}}}},`drawCommitLabel`),je=n((e,t,n,r)=>{if(t.tags.length>0){let i=0,a=0,o=0,s=[];for(let r of t.tags.reverse()){let t=e.insert(`polygon`),c=e.append(`circle`),l=e.append(`text`).attr(`y`,n.y-16-i).attr(`class`,`tag-label`).text(r),u=l.node()?.getBBox();if(!u)throw Error(`Tag bbox not found`);a=Math.max(a,u.width),o=Math.max(o,u.height),l.attr(`x`,n.posWithOffset-u.width/2),s.push({tag:l,hole:c,rect:t,yOffset:i}),i+=20}for(let{tag:e,hole:t,rect:i,yOffset:c}of s){let s=o/2,l=n.y-19.2-c;if(i.attr(`class`,`tag-label-bkg`).attr(`points`,`
1
+ import{p as e}from"./index-Bn1BoT3w.js";import{n as t}from"./mermaid-parser.core-CwwjcAjz.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{t as r}from"./src-BR8qR3lM.js";import{H as i,K as a,U as o,Y as s,a as c,b as l,f as u,s as d,v as f,w as p,x as m,y as h}from"./chunk-I66GZJ75-b3yMIljX.js";import{g,i as _,m as v}from"./chunk-NSK5VX7P-CfigFGDQ.js";import{t as y}from"./chunk-JWPE2WC7-DVXcaiue.js";import{t as b}from"./chunk-2Q5K7J3B-C1jixKkw.js";var x={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},ee=u.gitGraph,S=n(()=>_({...ee,...l().gitGraph}),`getConfig`),C=new b(()=>{let e=S(),t=e.mainBranchName,n=e.mainBranchOrder;return{mainBranchName:t,commits:new Map,head:null,branchConfig:new Map([[t,{name:t,order:n}]]),branches:new Map([[t,null]]),currBranch:t,direction:`LR`,seq:0,options:{}}});function w(){return v({length:7})}n(w,`getID`);function T(e,t){let n=Object.create(null);return e.reduce((e,r)=>{let i=t(r);return n[i]||(n[i]=!0,e.push(r)),e},[])}n(T,`uniqBy`);var te=n(function(e){C.records.direction=e},`setDirection`),ne=n(function(e){r.debug(`options str`,e),e=e?.trim(),e||=`{}`;try{C.records.options=JSON.parse(e)}catch(e){r.error(`error while parsing gitGraph options`,e.message)}},`setOptions`),re=n(function(){return C.records.options},`getOptions`),ie=n(function(e){let t=e.msg,n=e.id,i=e.type,a=e.tags;r.info(`commit`,t,n,i,a),r.debug(`Entering commit:`,t,n,i,a);let o=S();n=d.sanitizeText(n,o),t=d.sanitizeText(t,o),a=a?.map(e=>d.sanitizeText(e,o));let s={id:n||C.records.seq+`-`+w(),message:t,seq:C.records.seq++,type:i??x.NORMAL,tags:a??[],parents:C.records.head==null?[]:[C.records.head.id],branch:C.records.currBranch};C.records.head=s,r.info(`main branch`,o.mainBranchName),C.records.commits.has(s.id)&&r.warn(`Commit ID ${s.id} already exists`),C.records.commits.set(s.id,s),C.records.branches.set(C.records.currBranch,s.id),r.debug(`in pushCommit `+s.id)},`commit`),ae=n(function(e){let t=e.name,n=e.order;if(t=d.sanitizeText(t,S()),C.records.branches.has(t))throw Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${t}")`);C.records.branches.set(t,C.records.head==null?null:C.records.head.id),C.records.branchConfig.set(t,{name:t,order:n}),E(t),r.debug(`in createBranch`)},`branch`),oe=n(e=>{let t=e.branch,n=e.id,i=e.type,a=e.tags,o=S();t=d.sanitizeText(t,o),n&&=d.sanitizeText(n,o);let s=C.records.branches.get(C.records.currBranch),c=C.records.branches.get(t),l=s?C.records.commits.get(s):void 0,u=c?C.records.commits.get(c):void 0;if(l&&u&&l.branch===t)throw Error(`Cannot merge branch '${t}' into itself.`);if(C.records.currBranch===t){let e=Error(`Incorrect usage of "merge". Cannot merge a branch to itself`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch abc`]},e}if(l===void 0||!l){let e=Error(`Incorrect usage of "merge". Current branch (${C.records.currBranch})has no commits`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`commit`]},e}if(!C.records.branches.has(t)){let e=Error(`Incorrect usage of "merge". Branch to be merged (`+t+`) does not exist`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch ${t}`]},e}if(u===void 0||!u){let e=Error(`Incorrect usage of "merge". Branch to be merged (`+t+`) has no commits`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`"commit"`]},e}if(l===u){let e=Error(`Incorrect usage of "merge". Both branches have same head`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch abc`]},e}if(n&&C.records.commits.has(n)){let e=Error(`Incorrect usage of "merge". Commit with id:`+n+` already exists, use different custom id`);throw e.hash={text:`merge ${t} ${n} ${i} ${a?.join(` `)}`,token:`merge ${t} ${n} ${i} ${a?.join(` `)}`,expected:[`merge ${t} ${n}_UNIQUE ${i} ${a?.join(` `)}`]},e}let f=c||``,p={id:n||`${C.records.seq}-${w()}`,message:`merged branch ${t} into ${C.records.currBranch}`,seq:C.records.seq++,parents:C.records.head==null?[]:[C.records.head.id,f],branch:C.records.currBranch,type:x.MERGE,customType:i,customId:!!n,tags:a??[]};C.records.head=p,C.records.commits.set(p.id,p),C.records.branches.set(C.records.currBranch,p.id),r.debug(C.records.branches),r.debug(`in mergeBranch`)},`merge`),se=n(function(e){let t=e.id,n=e.targetId,i=e.tags,a=e.parent;r.debug(`Entering cherryPick:`,t,n,i);let o=S();if(t=d.sanitizeText(t,o),n=d.sanitizeText(n,o),i=i?.map(e=>d.sanitizeText(e,o)),a=d.sanitizeText(a,o),!t||!C.records.commits.has(t)){let e=Error(`Incorrect usage of "cherryPick". Source commit id should exist and provided`);throw e.hash={text:`cherryPick ${t} ${n}`,token:`cherryPick ${t} ${n}`,expected:[`cherry-pick abc`]},e}let s=C.records.commits.get(t);if(s===void 0||!s)throw Error(`Incorrect usage of "cherryPick". Source commit id should exist and provided`);if(a&&!(Array.isArray(s.parents)&&s.parents.includes(a)))throw Error(`Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.`);let c=s.branch;if(s.type===x.MERGE&&!a)throw Error(`Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.`);if(!n||!C.records.commits.has(n)){if(c===C.records.currBranch){let e=Error(`Incorrect usage of "cherryPick". Source commit is already on current branch`);throw e.hash={text:`cherryPick ${t} ${n}`,token:`cherryPick ${t} ${n}`,expected:[`cherry-pick abc`]},e}let e=C.records.branches.get(C.records.currBranch);if(e===void 0||!e){let e=Error(`Incorrect usage of "cherry-pick". Current branch (${C.records.currBranch})has no commits`);throw e.hash={text:`cherryPick ${t} ${n}`,token:`cherryPick ${t} ${n}`,expected:[`cherry-pick abc`]},e}let o=C.records.commits.get(e);if(o===void 0||!o){let e=Error(`Incorrect usage of "cherry-pick". Current branch (${C.records.currBranch})has no commits`);throw e.hash={text:`cherryPick ${t} ${n}`,token:`cherryPick ${t} ${n}`,expected:[`cherry-pick abc`]},e}let l={id:C.records.seq+`-`+w(),message:`cherry-picked ${s?.message} into ${C.records.currBranch}`,seq:C.records.seq++,parents:C.records.head==null?[]:[C.records.head.id,s.id],branch:C.records.currBranch,type:x.CHERRY_PICK,tags:i?i.filter(Boolean):[`cherry-pick:${s.id}${s.type===x.MERGE?`|parent:${a}`:``}`]};C.records.head=l,C.records.commits.set(l.id,l),C.records.branches.set(C.records.currBranch,l.id),r.debug(C.records.branches),r.debug(`in cherryPick`)}},`cherryPick`),E=n(function(e){if(e=d.sanitizeText(e,S()),C.records.branches.has(e)){C.records.currBranch=e;let t=C.records.branches.get(C.records.currBranch);t===void 0||!t?C.records.head=null:C.records.head=C.records.commits.get(t)??null}else{let t=Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw t.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},t}},`checkout`);function D(e,t,n){let r=e.indexOf(t);r===-1?e.push(n):e.splice(r,1,n)}n(D,`upsert`);function O(e){let t=e.reduce((e,t)=>e.seq>t.seq?e:t,e[0]),n=``;e.forEach(function(e){n+=e===t?` *`:` |`});let i=[n,t.id,t.seq];for(let e in C.records.branches)C.records.branches.get(e)===t.id&&i.push(e);if(r.debug(i.join(` `)),t.parents&&t.parents.length==2&&t.parents[0]&&t.parents[1]){let n=C.records.commits.get(t.parents[0]);D(e,t,n),t.parents[1]&&e.push(C.records.commits.get(t.parents[1]))}else if(t.parents.length==0)return;else if(t.parents[0]){let n=C.records.commits.get(t.parents[0]);D(e,t,n)}e=T(e,e=>e.id),O(e)}n(O,`prettyPrintCommitHistory`);var ce=n(function(){r.debug(C.records.commits);let e=k()[0];O([e])},`prettyPrint`),le=n(function(){C.reset(),c()},`clear`),ue=n(function(){return[...C.records.branchConfig.values()].map((e,t)=>e.order!==null&&e.order!==void 0?e:{...e,order:parseFloat(`0.${t}`)}).sort((e,t)=>(e.order??0)-(t.order??0)).map(({name:e})=>({name:e}))},`getBranchesAsObjArray`),de=n(function(){return C.records.branches},`getBranches`),fe=n(function(){return C.records.commits},`getCommits`),k=n(function(){let e=[...C.records.commits.values()];return e.forEach(function(e){r.debug(e.id)}),e.sort((e,t)=>e.seq-t.seq),e},`getCommitsArray`),A={commitType:x,getConfig:S,setDirection:te,setOptions:ne,getOptions:re,commit:ie,branch:ae,merge:oe,cherryPick:se,checkout:E,prettyPrint:ce,clear:le,getBranchesAsObjArray:ue,getBranches:de,getCommits:fe,getCommitsArray:k,getCurrentBranch:n(function(){return C.records.currBranch},`getCurrentBranch`),getDirection:n(function(){return C.records.direction},`getDirection`),getHead:n(function(){return C.records.head},`getHead`),setAccTitle:o,getAccTitle:h,getAccDescription:f,setAccDescription:i,setDiagramTitle:a,getDiagramTitle:p},pe=n((e,t)=>{y(e,t),e.dir&&t.setDirection(e.dir);for(let n of e.statements)me(n,t)},`populate`),me=n((e,t)=>{let i={Commit:n(e=>t.commit(he(e)),`Commit`),Branch:n(e=>t.branch(ge(e)),`Branch`),Merge:n(e=>t.merge(_e(e)),`Merge`),Checkout:n(e=>t.checkout(ve(e)),`Checkout`),CherryPicking:n(e=>t.cherryPick(ye(e)),`CherryPicking`)}[e.$type];i?i(e):r.error(`Unknown statement type: ${e.$type}`)},`parseStatement`),he=n(e=>({id:e.id,msg:e.message??``,type:e.type===void 0?x.NORMAL:x[e.type],tags:e.tags??void 0}),`parseCommit`),ge=n(e=>({name:e.name,order:e.order??0}),`parseBranch`),_e=n(e=>({branch:e.branch,id:e.id??``,type:e.type===void 0?void 0:x[e.type],tags:e.tags??void 0}),`parseMerge`),ve=n(e=>e.branch,`parseCheckout`),ye=n(e=>({id:e.id,targetId:``,tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),`parseCherryPicking`),be={parse:n(async e=>{let n=await t(`gitGraph`,e);r.debug(n),pe(n,A)},`parse`)},j=10,M=40,N=4,P=2,F=8,I=new Set([`redux`,`redux-dark`,`redux-color`,`redux-dark-color`]),L=12,R=new Set([`redux-color`,`redux-dark-color`]),xe=new Set([`dark`,`redux-dark`,`redux-dark-color`,`neo-dark`]),z=n((e,t,n=!1)=>n&&e>0?(e-1)%(t-1)+1:e%t,`calcColorIndex`),B=new Map,V=new Map,H=30,U=new Map,W=[],G=0,K=`LR`,Se=n(()=>{B.clear(),V.clear(),U.clear(),G=0,W=[],K=`LR`},`clear`),q=n(e=>{let t=document.createElementNS(`http://www.w3.org/2000/svg`,`text`);return(typeof e==`string`?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(e=>{let n=document.createElementNS(`http://www.w3.org/2000/svg`,`tspan`);n.setAttributeNS(`http://www.w3.org/XML/1998/namespace`,`xml:space`,`preserve`),n.setAttribute(`dy`,`1em`),n.setAttribute(`x`,`0`),n.setAttribute(`class`,`row`),n.textContent=e.trim(),t.appendChild(n)}),t},`drawText`),J=n(e=>{let t,r,i;return K===`BT`?(r=n((e,t)=>e<=t,`comparisonFunc`),i=1/0):(r=n((e,t)=>e>=t,`comparisonFunc`),i=0),e.forEach(e=>{let n=K===`TB`||K==`BT`?V.get(e)?.y:V.get(e)?.x;n!==void 0&&r(n,i)&&(t=e,i=n)}),t},`findClosestParent`),Ce=n(e=>{let t=``,n=1/0;return e.forEach(e=>{let r=V.get(e).y;r<=n&&(t=e,n=r)}),t||void 0},`findClosestParentBT`),we=n((e,t,n)=>{let r=n,i=n,a=[];e.forEach(e=>{let n=t.get(e);if(!n)throw Error(`Commit not found for key ${e}`);n.parents.length?(r=Ee(n),i=Math.max(r,i)):a.push(n),De(n,r)}),r=i,a.forEach(e=>{Oe(e,r,n)}),e.forEach(e=>{let n=t.get(e);if(n?.parents.length){let e=Ce(n.parents);r=V.get(e).y-M,r<=i&&(i=r);let t=B.get(n.branch).pos,a=r-j;V.set(n.id,{x:t,y:a})}})},`setParallelBTPos`),Te=n(e=>{let t=J(e.parents.filter(e=>e!==null));if(!t)throw Error(`Closest parent not found for commit ${e.id}`);let n=V.get(t)?.y;if(n===void 0)throw Error(`Closest parent position not found for commit ${e.id}`);return n},`findClosestParentPos`),Ee=n(e=>Te(e)+M,`calculateCommitPosition`),De=n((e,t)=>{let n=B.get(e.branch);if(!n)throw Error(`Branch not found for commit ${e.id}`);let r=n.pos,i=t+j;return V.set(e.id,{x:r,y:i}),{x:r,y:i}},`setCommitPosition`),Oe=n((e,t,n)=>{let r=B.get(e.branch);if(!r)throw Error(`Branch not found for commit ${e.id}`);let i=t+n,a=r.pos;V.set(e.id,{x:a,y:i})},`setRootPosition`),ke=n((e,t,n,r,i,a)=>{let{theme:o}=m(),s=I.has(o??``),c=R.has(o??``),l=xe.has(o??``);if(a===x.HIGHLIGHT)e.append(`rect`).attr(`x`,n.x-10+(s?3:0)).attr(`y`,n.y-10+(s?3:0)).attr(`width`,s?14:20).attr(`height`,s?14:20).attr(`class`,`commit ${t.id} commit-highlight${z(i,F,c)} ${r}-outer`),e.append(`rect`).attr(`x`,n.x-6+(s?2:0)).attr(`y`,n.y-6+(s?2:0)).attr(`width`,s?8:12).attr(`height`,s?8:12).attr(`class`,`commit ${t.id} commit${z(i,F,c)} ${r}-inner`);else if(a===x.CHERRY_PICK)e.append(`circle`).attr(`cx`,n.x).attr(`cy`,n.y).attr(`r`,s?7:10).attr(`class`,`commit ${t.id} ${r}`),e.append(`circle`).attr(`cx`,n.x-3).attr(`cy`,n.y+2).attr(`r`,s?2.5:2.75).attr(`fill`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`circle`).attr(`cx`,n.x+3).attr(`cy`,n.y+2).attr(`r`,s?2.5:2.75).attr(`fill`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`line`).attr(`x1`,n.x+3).attr(`y1`,n.y+1).attr(`x2`,n.x).attr(`y2`,n.y-5).attr(`stroke`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`line`).attr(`x1`,n.x-3).attr(`y1`,n.y+1).attr(`x2`,n.x).attr(`y2`,n.y-5).attr(`stroke`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`);else{let o=e.append(`circle`);if(o.attr(`cx`,n.x),o.attr(`cy`,n.y),o.attr(`r`,s?7:10),o.attr(`class`,`commit ${t.id} commit${z(i,F,c)}`),a===x.MERGE){let a=e.append(`circle`);a.attr(`cx`,n.x),a.attr(`cy`,n.y),a.attr(`r`,s?5:6),a.attr(`class`,`commit ${r} ${t.id} commit${z(i,F,c)}`)}if(a===x.REVERSE){let a=e.append(`path`),o=s?4:5;a.attr(`d`,`M ${n.x-o},${n.y-o}L${n.x+o},${n.y+o}M${n.x-o},${n.y+o}L${n.x+o},${n.y-o}`).attr(`class`,`commit ${r} ${t.id} commit${z(i,F,c)}`)}}},`drawCommitBullet`),Ae=n((e,t,n,r,i)=>{if(t.type!==x.CHERRY_PICK&&(t.customId&&t.type===x.MERGE||t.type!==x.MERGE)&&i.showCommitLabel){let a=e.append(`g`),o=a.insert(`rect`).attr(`class`,`commit-label-bkg`),s=a.append(`text`).attr(`x`,r).attr(`y`,n.y+25).attr(`class`,`commit-label`).text(t.id),c=s.node()?.getBBox();if(c&&(o.attr(`x`,n.posWithOffset-c.width/2-P).attr(`y`,n.y+13.5).attr(`width`,c.width+2*P).attr(`height`,c.height+2*P),K===`TB`||K===`BT`?(o.attr(`x`,n.x-(c.width+4*N+5)).attr(`y`,n.y-12),s.attr(`x`,n.x-(c.width+4*N)).attr(`y`,n.y+c.height-12)):s.attr(`x`,n.posWithOffset-c.width/2),i.rotateCommitLabel)){if(K===`TB`||K===`BT`)s.attr(`transform`,`rotate(-45, `+n.x+`, `+n.y+`)`),o.attr(`transform`,`rotate(-45, `+n.x+`, `+n.y+`)`);else{let e=-7.5-(c.width+10)/25*9.5,t=10+c.width/25*8.5;a.attr(`transform`,`translate(`+e+`, `+t+`) rotate(-45, `+r+`, `+n.y+`)`)}}}},`drawCommitLabel`),je=n((e,t,n,r)=>{if(t.tags.length>0){let i=0,a=0,o=0,s=[];for(let r of t.tags.reverse()){let t=e.insert(`polygon`),c=e.append(`circle`),l=e.append(`text`).attr(`y`,n.y-16-i).attr(`class`,`tag-label`).text(r),u=l.node()?.getBBox();if(!u)throw Error(`Tag bbox not found`);a=Math.max(a,u.width),o=Math.max(o,u.height),l.attr(`x`,n.posWithOffset-u.width/2),s.push({tag:l,hole:c,rect:t,yOffset:i}),i+=20}for(let{tag:e,hole:t,rect:i,yOffset:c}of s){let s=o/2,l=n.y-19.2-c;if(i.attr(`class`,`tag-label-bkg`).attr(`points`,`
2
2
  ${r-a/2-N/2},${l+P}
3
3
  ${r-a/2-N/2},${l-P}
4
4
  ${n.posWithOffset-a/2-N},${l-s-P}