gitnexus 1.6.11-rc.9 → 1.6.11

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 (529) hide show
  1. package/README.md +94 -25
  2. package/dist/_shared/graph/types.d.ts +81 -2
  3. package/dist/_shared/graph/types.d.ts.map +1 -1
  4. package/dist/_shared/integrations/circuit-breaker.d.ts.map +1 -1
  5. package/dist/_shared/integrations/circuit-breaker.js.map +1 -1
  6. package/dist/_shared/integrations/resilient-fetch.d.ts.map +1 -1
  7. package/dist/_shared/integrations/resilient-fetch.js.map +1 -1
  8. package/dist/_shared/language-detection.d.ts.map +1 -1
  9. package/dist/_shared/language-detection.js +2 -0
  10. package/dist/_shared/language-detection.js.map +1 -1
  11. package/dist/_shared/languages.d.ts +2 -1
  12. package/dist/_shared/languages.d.ts.map +1 -1
  13. package/dist/_shared/languages.js +1 -0
  14. package/dist/_shared/languages.js.map +1 -1
  15. package/dist/_shared/lbug/schema-constants.d.ts +2 -2
  16. package/dist/_shared/lbug/schema-constants.d.ts.map +1 -1
  17. package/dist/_shared/lbug/schema-constants.js +4 -0
  18. package/dist/_shared/lbug/schema-constants.js.map +1 -1
  19. package/dist/_shared/scope-resolution/evidence-weights.d.ts.map +1 -1
  20. package/dist/_shared/scope-resolution/finalize-algorithm.js +1 -0
  21. package/dist/_shared/scope-resolution/finalize-algorithm.js.map +1 -1
  22. package/dist/_shared/scope-resolution/language-classification.d.ts +3 -0
  23. package/dist/_shared/scope-resolution/language-classification.d.ts.map +1 -1
  24. package/dist/_shared/scope-resolution/language-classification.js +4 -0
  25. package/dist/_shared/scope-resolution/language-classification.js.map +1 -1
  26. package/dist/_shared/scope-resolution/reference-site.d.ts +10 -0
  27. package/dist/_shared/scope-resolution/reference-site.d.ts.map +1 -1
  28. package/dist/_shared/scope-resolution/registries/field-registry.js.map +1 -1
  29. package/dist/_shared/scope-resolution/registries/method-registry.js.map +1 -1
  30. package/dist/_shared/scope-resolution/scope-tree.d.ts.map +1 -1
  31. package/dist/_shared/scope-resolution/scope-tree.js.map +1 -1
  32. package/dist/_shared/scope-resolution/types.d.ts +15 -0
  33. package/dist/_shared/scope-resolution/types.d.ts.map +1 -1
  34. package/dist/cli/ai-context.d.ts +4 -0
  35. package/dist/cli/ai-context.js +90 -14
  36. package/dist/cli/analyze-config.js +14 -0
  37. package/dist/cli/analyze-options.d.ts +14 -0
  38. package/dist/cli/analyze-watch.d.ts +20 -0
  39. package/dist/cli/analyze-watch.js +434 -0
  40. package/dist/cli/analyze.js +27 -9
  41. package/dist/cli/auto-sync.d.ts +1 -0
  42. package/dist/cli/auto-sync.js +107 -0
  43. package/dist/cli/command-banner.d.ts +15 -0
  44. package/dist/cli/command-banner.js +42 -0
  45. package/dist/cli/detect-changes-format.js +21 -0
  46. package/dist/cli/doctor.d.ts +7 -0
  47. package/dist/cli/doctor.js +14 -0
  48. package/dist/cli/group.js +7 -1
  49. package/dist/cli/help-i18n.js +4 -0
  50. package/dist/cli/i18n/en.d.ts +18 -3
  51. package/dist/cli/i18n/en.js +18 -3
  52. package/dist/cli/i18n/resources.d.ts +33 -3
  53. package/dist/cli/i18n/zh-CN.d.ts +15 -0
  54. package/dist/cli/i18n/zh-CN.js +18 -3
  55. package/dist/cli/index.js +34 -7
  56. package/dist/cli/mcp.d.ts +15 -0
  57. package/dist/cli/mcp.js +44 -0
  58. package/dist/cli/optional-grammars.d.ts +3 -2
  59. package/dist/cli/optional-grammars.js +19 -3
  60. package/dist/cli/setup.js +41 -15
  61. package/dist/cli/update-notice.d.ts +34 -0
  62. package/dist/cli/update-notice.js +91 -0
  63. package/dist/cli/update.d.ts +21 -0
  64. package/dist/cli/update.js +93 -0
  65. package/dist/cli/watch.d.ts +1 -20
  66. package/dist/cli/watch.js +5 -371
  67. package/dist/core/analysis-feature-registry.d.ts +2 -0
  68. package/dist/core/analysis-feature-registry.js +15 -0
  69. package/dist/core/analyzer-identity.js +21 -3
  70. package/dist/core/auto-sync/analysis-worker-launch.d.ts +30 -0
  71. package/dist/core/auto-sync/analysis-worker-launch.js +166 -0
  72. package/dist/core/auto-sync/config.d.ts +33 -0
  73. package/dist/core/auto-sync/config.js +320 -0
  74. package/dist/core/auto-sync/index.d.ts +6 -0
  75. package/dist/core/auto-sync/index.js +6 -0
  76. package/dist/core/auto-sync/path-security.d.ts +9 -0
  77. package/dist/core/auto-sync/path-security.js +251 -0
  78. package/dist/core/auto-sync/repo.d.ts +1 -0
  79. package/dist/core/auto-sync/repo.js +6 -0
  80. package/dist/core/auto-sync/runner.d.ts +44 -0
  81. package/dist/core/auto-sync/runner.js +428 -0
  82. package/dist/core/auto-sync/starter.d.ts +50 -0
  83. package/dist/core/auto-sync/starter.js +497 -0
  84. package/dist/core/auto-sync/state.d.ts +37 -0
  85. package/dist/core/auto-sync/state.js +119 -0
  86. package/dist/core/group/config-parser.js +8 -1
  87. package/dist/core/group/cross-impact.d.ts +3 -0
  88. package/dist/core/group/cross-impact.js +36 -4
  89. package/dist/core/group/extractors/http-patterns/java.js +22 -8
  90. package/dist/core/group/extractors/http-patterns/kotlin.js +86 -31
  91. package/dist/core/group/extractors/http-patterns/node.js +145 -8
  92. package/dist/core/group/extractors/http-patterns/python.js +11 -7
  93. package/dist/core/group/extractors/http-route-extractor.js +63 -17
  94. package/dist/core/group/extractors/java-workspace-extractor.js +244 -31
  95. package/dist/core/group/group-lock.js +5 -6
  96. package/dist/core/group/normalization.d.ts +38 -1
  97. package/dist/core/group/normalization.js +59 -3
  98. package/dist/core/group/service.d.ts +11 -0
  99. package/dist/core/group/service.js +13 -1
  100. package/dist/core/group/storage.js +2 -2
  101. package/dist/core/group/sync.d.ts +24 -1
  102. package/dist/core/group/sync.js +46 -8
  103. package/dist/core/group/types.d.ts +13 -0
  104. package/dist/core/incremental/derived-writeback.d.ts +36 -0
  105. package/dist/core/incremental/derived-writeback.js +68 -0
  106. package/dist/core/incremental/spring-config-drift.d.ts +12 -0
  107. package/dist/core/incremental/spring-config-drift.js +46 -0
  108. package/dist/core/incremental/subgraph-extract.d.ts +7 -4
  109. package/dist/core/incremental/subgraph-extract.js +30 -5
  110. package/dist/core/ingestion/asyncapi/document.d.ts +226 -0
  111. package/dist/core/ingestion/asyncapi/document.js +758 -0
  112. package/dist/core/ingestion/asyncapi/protocol.d.ts +79 -0
  113. package/dist/core/ingestion/asyncapi/protocol.js +203 -0
  114. package/dist/core/ingestion/call-extractors/configs/zig.d.ts +2 -0
  115. package/dist/core/ingestion/call-extractors/configs/zig.js +4 -0
  116. package/dist/core/ingestion/call-extractors/zig-static-gating.d.ts +100 -0
  117. package/dist/core/ingestion/call-extractors/zig-static-gating.js +319 -0
  118. package/dist/core/ingestion/call-processor.js +3 -1
  119. package/dist/core/ingestion/class-extractors/configs/zig.d.ts +2 -0
  120. package/dist/core/ingestion/class-extractors/configs/zig.js +32 -0
  121. package/dist/core/ingestion/class-extractors/generic.js +4 -1
  122. package/dist/core/ingestion/class-types.d.ts +6 -2
  123. package/dist/core/ingestion/destination-key.d.ts +59 -0
  124. package/dist/core/ingestion/destination-key.js +61 -0
  125. package/dist/core/ingestion/entry-point-scoring.d.ts +6 -2
  126. package/dist/core/ingestion/entry-point-scoring.js +8 -44
  127. package/dist/core/ingestion/export-detection.d.ts +37 -0
  128. package/dist/core/ingestion/export-detection.js +60 -0
  129. package/dist/core/ingestion/field-extractors/configs/zig.d.ts +8 -0
  130. package/dist/core/ingestion/field-extractors/configs/zig.js +49 -0
  131. package/dist/core/ingestion/field-extractors/generic.d.ts +1 -1
  132. package/dist/core/ingestion/field-extractors/generic.js +12 -1
  133. package/dist/core/ingestion/frameworks/spring/actuator-runtime.d.ts +26 -0
  134. package/dist/core/ingestion/frameworks/spring/actuator-runtime.js +843 -0
  135. package/dist/core/ingestion/frameworks/spring/analysis-features.d.ts +5 -0
  136. package/dist/core/ingestion/frameworks/spring/analysis-features.js +9 -0
  137. package/dist/core/ingestion/frameworks/spring/annotation-arguments.js +8 -1
  138. package/dist/core/ingestion/frameworks/spring/argument-facts.d.ts +80 -0
  139. package/dist/core/ingestion/frameworks/spring/argument-facts.js +85 -0
  140. package/dist/core/ingestion/frameworks/spring/config-bindings.d.ts +1 -0
  141. package/dist/core/ingestion/frameworks/spring/config-bindings.js +2 -1
  142. package/dist/core/ingestion/frameworks/spring/destinations.d.ts +539 -0
  143. package/dist/core/ingestion/frameworks/spring/destinations.js +840 -0
  144. package/dist/core/ingestion/frameworks/spring/dynamic-lookups.d.ts +22 -0
  145. package/dist/core/ingestion/frameworks/spring/dynamic-lookups.js +124 -0
  146. package/dist/core/ingestion/frameworks/spring/message-producers.d.ts +78 -0
  147. package/dist/core/ingestion/frameworks/spring/message-producers.js +90 -0
  148. package/dist/core/ingestion/frameworks/spring/non-http-handlers.d.ts +29 -0
  149. package/dist/core/ingestion/frameworks/spring/vendor-prefixes.d.ts +7 -0
  150. package/dist/core/ingestion/frameworks/spring/vendor-prefixes.js +22 -0
  151. package/dist/core/ingestion/import-resolvers/configs/zig.d.ts +13 -0
  152. package/dist/core/ingestion/import-resolvers/configs/zig.js +26 -0
  153. package/dist/core/ingestion/import-resolvers/zig.d.ts +34 -0
  154. package/dist/core/ingestion/import-resolvers/zig.js +193 -0
  155. package/dist/core/ingestion/language-config.d.ts +177 -0
  156. package/dist/core/ingestion/language-config.js +719 -0
  157. package/dist/core/ingestion/language-provider.d.ts +178 -1
  158. package/dist/core/ingestion/language-provider.js +22 -0
  159. package/dist/core/ingestion/languages/csharp/razor-view-components.d.ts +62 -0
  160. package/dist/core/ingestion/languages/csharp/razor-view-components.js +954 -0
  161. package/dist/core/ingestion/languages/csharp/resolution-config.d.ts +3 -0
  162. package/dist/core/ingestion/languages/csharp/resolution-config.js +6 -1
  163. package/dist/core/ingestion/languages/csharp/scope-resolver.js +8 -0
  164. package/dist/core/ingestion/languages/index.d.ts +1 -0
  165. package/dist/core/ingestion/languages/index.js +2 -0
  166. package/dist/core/ingestion/languages/java/analysis-features.d.ts +1 -1
  167. package/dist/core/ingestion/languages/java/analysis-features.js +14 -6
  168. package/dist/core/ingestion/languages/java/capture-side-channel.d.ts +8 -0
  169. package/dist/core/ingestion/languages/java/capture-side-channel.js +34 -0
  170. package/dist/core/ingestion/languages/java/captures.js +22 -1
  171. package/dist/core/ingestion/languages/java/lombok-synthesizer.d.ts +42 -0
  172. package/dist/core/ingestion/languages/java/lombok-synthesizer.js +439 -0
  173. package/dist/core/ingestion/languages/java/scope-resolver.js +2 -0
  174. package/dist/core/ingestion/languages/java/spring-actuator.d.ts +2 -0
  175. package/dist/core/ingestion/languages/java/spring-actuator.js +62 -0
  176. package/dist/core/ingestion/languages/java/spring-di.d.ts +17 -1
  177. package/dist/core/ingestion/languages/java/spring-di.js +44 -2
  178. package/dist/core/ingestion/languages/java/spring-dynamic-lookup.d.ts +8 -0
  179. package/dist/core/ingestion/languages/java/spring-dynamic-lookup.js +62 -0
  180. package/dist/core/ingestion/languages/java/spring-message-producers.d.ts +20 -0
  181. package/dist/core/ingestion/languages/java/spring-message-producers.js +83 -0
  182. package/dist/core/ingestion/languages/java/spring-non-http-handlers.d.ts +11 -1
  183. package/dist/core/ingestion/languages/java/spring-non-http-handlers.js +13 -3
  184. package/dist/core/ingestion/languages/java.js +18 -8
  185. package/dist/core/ingestion/languages/jvm/accessor-synthesis.d.ts +99 -0
  186. package/dist/core/ingestion/languages/jvm/accessor-synthesis.js +173 -0
  187. package/dist/core/ingestion/languages/jvm/beanspec.d.ts +17 -0
  188. package/dist/core/ingestion/languages/jvm/beanspec.js +42 -0
  189. package/dist/core/ingestion/languages/kotlin/capture-side-channel.d.ts +15 -0
  190. package/dist/core/ingestion/languages/kotlin/capture-side-channel.js +50 -0
  191. package/dist/core/ingestion/languages/kotlin/captures.js +24 -1
  192. package/dist/core/ingestion/languages/kotlin/lombok-synthesizer.d.ts +26 -0
  193. package/dist/core/ingestion/languages/kotlin/lombok-synthesizer.js +417 -0
  194. package/dist/core/ingestion/languages/kotlin/scope-resolver.js +4 -0
  195. package/dist/core/ingestion/languages/kotlin/spring-actuator.d.ts +4 -0
  196. package/dist/core/ingestion/languages/kotlin/spring-actuator.js +172 -0
  197. package/dist/core/ingestion/languages/kotlin/spring-config-bindings.d.ts +18 -0
  198. package/dist/core/ingestion/languages/kotlin/spring-config-bindings.js +411 -0
  199. package/dist/core/ingestion/languages/kotlin/spring-di.d.ts +51 -1
  200. package/dist/core/ingestion/languages/kotlin/spring-di.js +86 -6
  201. package/dist/core/ingestion/languages/kotlin/spring-dynamic-lookup.d.ts +8 -0
  202. package/dist/core/ingestion/languages/kotlin/spring-dynamic-lookup.js +77 -0
  203. package/dist/core/ingestion/languages/kotlin/spring-message-producers.d.ts +17 -0
  204. package/dist/core/ingestion/languages/kotlin/spring-message-producers.js +119 -0
  205. package/dist/core/ingestion/languages/kotlin/spring-non-http-handlers.d.ts +16 -0
  206. package/dist/core/ingestion/languages/kotlin/spring-non-http-handlers.js +77 -2
  207. package/dist/core/ingestion/languages/kotlin.js +24 -0
  208. package/dist/core/ingestion/languages/python.js +2 -0
  209. package/dist/core/ingestion/languages/rust/query.js +8 -8
  210. package/dist/core/ingestion/languages/zig/captures.d.ts +260 -0
  211. package/dist/core/ingestion/languages/zig/captures.js +2070 -0
  212. package/dist/core/ingestion/languages/zig/index.d.ts +4 -0
  213. package/dist/core/ingestion/languages/zig/index.js +4 -0
  214. package/dist/core/ingestion/languages/zig/interpret.d.ts +36 -0
  215. package/dist/core/ingestion/languages/zig/interpret.js +176 -0
  216. package/dist/core/ingestion/languages/zig/query.d.ts +3 -0
  217. package/dist/core/ingestion/languages/zig/query.js +426 -0
  218. package/dist/core/ingestion/languages/zig/range-binding.d.ts +37 -0
  219. package/dist/core/ingestion/languages/zig/range-binding.js +373 -0
  220. package/dist/core/ingestion/languages/zig/scope-resolver.d.ts +12 -0
  221. package/dist/core/ingestion/languages/zig/scope-resolver.js +58 -0
  222. package/dist/core/ingestion/languages/zig/simple-hooks.d.ts +25 -0
  223. package/dist/core/ingestion/languages/zig/simple-hooks.js +143 -0
  224. package/dist/core/ingestion/languages/zig.d.ts +32 -0
  225. package/dist/core/ingestion/languages/zig.js +130 -0
  226. package/dist/core/ingestion/method-extractors/configs/zig.d.ts +2 -0
  227. package/dist/core/ingestion/method-extractors/configs/zig.js +120 -0
  228. package/dist/core/ingestion/method-extractors/generic.js +16 -4
  229. package/dist/core/ingestion/method-types.d.ts +10 -4
  230. package/dist/core/ingestion/model/field-registry.d.ts +3 -3
  231. package/dist/core/ingestion/model/field-registry.js +11 -7
  232. package/dist/core/ingestion/model/method-registry.d.ts +3 -3
  233. package/dist/core/ingestion/model/method-registry.js +13 -8
  234. package/dist/core/ingestion/model/registration-table.js +3 -0
  235. package/dist/core/ingestion/model/type-registry.js +8 -4
  236. package/dist/core/ingestion/pipeline-phases/di.js +47 -14
  237. package/dist/core/ingestion/pipeline-phases/index.d.ts +1 -0
  238. package/dist/core/ingestion/pipeline-phases/index.js +1 -0
  239. package/dist/core/ingestion/pipeline-phases/parse-impl.d.ts +7 -1
  240. package/dist/core/ingestion/pipeline-phases/parse-impl.js +79 -91
  241. package/dist/core/ingestion/pipeline-phases/parse.d.ts +17 -0
  242. package/dist/core/ingestion/pipeline-phases/processes.d.ts +2 -1
  243. package/dist/core/ingestion/pipeline-phases/processes.js +39 -4
  244. package/dist/core/ingestion/pipeline-phases/routes.js +27 -18
  245. package/dist/core/ingestion/pipeline-phases/runner.d.ts +4 -1
  246. package/dist/core/ingestion/pipeline-phases/runner.js +34 -14
  247. package/dist/core/ingestion/pipeline-phases/scan.js +82 -1
  248. package/dist/core/ingestion/pipeline-phases/spring-auto-configuration.d.ts +2 -0
  249. package/dist/core/ingestion/pipeline-phases/spring-auto-configuration.js +8 -0
  250. package/dist/core/ingestion/pipeline-phases/spring-destinations.d.ts +123 -0
  251. package/dist/core/ingestion/pipeline-phases/spring-destinations.js +688 -0
  252. package/dist/core/ingestion/pipeline.d.ts +30 -1
  253. package/dist/core/ingestion/pipeline.js +52 -14
  254. package/dist/core/ingestion/resolve-references.js +5 -0
  255. package/dist/core/ingestion/route-extractors/constant-resolver.d.ts +16 -0
  256. package/dist/core/ingestion/route-extractors/constant-resolver.js +10 -0
  257. package/dist/core/ingestion/route-extractors/java-const-resolver.d.ts +27 -1
  258. package/dist/core/ingestion/route-extractors/java-const-resolver.js +161 -13
  259. package/dist/core/ingestion/route-extractors/kotlin-const-resolver.d.ts +12 -18
  260. package/dist/core/ingestion/route-extractors/kotlin-const-resolver.js +214 -33
  261. package/dist/core/ingestion/route-extractors/kotlin-spring.d.ts +13 -0
  262. package/dist/core/ingestion/route-extractors/kotlin-spring.js +259 -0
  263. package/dist/core/ingestion/route-extractors/python-decorator-handler.d.ts +6 -0
  264. package/dist/core/ingestion/route-extractors/python-decorator-handler.js +16 -0
  265. package/dist/core/ingestion/route-extractors/spring-shared.d.ts +30 -1
  266. package/dist/core/ingestion/route-extractors/spring-shared.js +77 -9
  267. package/dist/core/ingestion/route-extractors/spring.js +9 -5
  268. package/dist/core/ingestion/scope-extractor.js +8 -0
  269. package/dist/core/ingestion/scope-resolution/contract/scope-resolver.d.ts +62 -0
  270. package/dist/core/ingestion/scope-resolution/graph-bridge/edges.d.ts +4 -0
  271. package/dist/core/ingestion/scope-resolution/graph-bridge/edges.js +2 -0
  272. package/dist/core/ingestion/scope-resolution/graph-bridge/ids.js +28 -0
  273. package/dist/core/ingestion/scope-resolution/graph-bridge/node-lookup.js +11 -2
  274. package/dist/core/ingestion/scope-resolution/graph-bridge/references-to-edges.d.ts +23 -2
  275. package/dist/core/ingestion/scope-resolution/graph-bridge/references-to-edges.js +24 -3
  276. package/dist/core/ingestion/scope-resolution/passes/callable-value-flow.d.ts +11 -1
  277. package/dist/core/ingestion/scope-resolution/passes/callable-value-flow.js +26 -6
  278. package/dist/core/ingestion/scope-resolution/passes/compound-receiver.d.ts +11 -0
  279. package/dist/core/ingestion/scope-resolution/passes/compound-receiver.js +29 -3
  280. package/dist/core/ingestion/scope-resolution/passes/free-call-fallback.d.ts +8 -1
  281. package/dist/core/ingestion/scope-resolution/passes/free-call-fallback.js +35 -9
  282. package/dist/core/ingestion/scope-resolution/passes/receiver-bound-calls.d.ts +1 -4
  283. package/dist/core/ingestion/scope-resolution/passes/receiver-bound-calls.js +277 -9
  284. package/dist/core/ingestion/scope-resolution/pipeline/registry.js +2 -0
  285. package/dist/core/ingestion/scope-resolution/pipeline/run.js +7 -3
  286. package/dist/core/ingestion/scope-resolution/scope/walkers.d.ts +43 -9
  287. package/dist/core/ingestion/scope-resolution/scope/walkers.js +71 -10
  288. package/dist/core/ingestion/tree-sitter-queries.d.ts +1 -0
  289. package/dist/core/ingestion/tree-sitter-queries.js +161 -0
  290. package/dist/core/ingestion/type-extractors/zig.d.ts +2 -0
  291. package/dist/core/ingestion/type-extractors/zig.js +17 -0
  292. package/dist/core/ingestion/utils/ast-helpers.d.ts +40 -1
  293. package/dist/core/ingestion/utils/ast-helpers.js +124 -6
  294. package/dist/core/ingestion/utils/callable-flow-captures.d.ts +9 -0
  295. package/dist/core/ingestion/utils/callable-flow-captures.js +75 -14
  296. package/dist/core/ingestion/utils/test-file-path.d.ts +28 -0
  297. package/dist/core/ingestion/utils/test-file-path.js +87 -0
  298. package/dist/core/ingestion/variable-extractors/configs/zig.d.ts +2 -0
  299. package/dist/core/ingestion/variable-extractors/configs/zig.js +71 -0
  300. package/dist/core/ingestion/workers/parse-worker.js +85 -14
  301. package/dist/core/install-context.d.ts +4 -0
  302. package/dist/core/install-context.js +152 -0
  303. package/dist/core/lbug/csv-generator.d.ts +10 -1
  304. package/dist/core/lbug/csv-generator.js +92 -22
  305. package/dist/core/lbug/graph-emit-sink.d.ts +3 -2
  306. package/dist/core/lbug/graph-emit-sink.js +4 -2
  307. package/dist/core/lbug/lbug-adapter.d.ts +100 -5
  308. package/dist/core/lbug/lbug-adapter.js +236 -24
  309. package/dist/core/lbug/schema.d.ts +6 -5
  310. package/dist/core/lbug/schema.js +84 -22
  311. package/dist/core/net/url-guard.d.ts +6 -0
  312. package/dist/core/net/url-guard.js +147 -0
  313. package/dist/core/package-version.d.ts +5 -0
  314. package/dist/core/package-version.js +10 -0
  315. package/dist/core/run-analyze.d.ts +21 -4
  316. package/dist/core/run-analyze.js +426 -117
  317. package/dist/core/search/fts-indexes.d.ts +19 -1
  318. package/dist/core/search/fts-indexes.js +28 -1
  319. package/dist/core/tree-sitter/parser-loader.js +16 -0
  320. package/dist/core/update-cache.d.ts +39 -0
  321. package/dist/core/update-cache.js +141 -0
  322. package/dist/core/update-check.d.ts +31 -0
  323. package/dist/core/update-check.js +274 -0
  324. package/dist/mcp/local/local-backend.d.ts +3 -6
  325. package/dist/mcp/local/local-backend.js +70 -29
  326. package/dist/mcp/resources.js +8 -0
  327. package/dist/mcp/server.js +2 -4
  328. package/dist/mcp/tools.js +6 -6
  329. package/dist/server/analyze-launch.d.ts +2 -0
  330. package/dist/server/analyze-launch.js +2 -0
  331. package/dist/server/analyze-worker-protocol.d.ts +6 -1
  332. package/dist/server/analyze-worker.d.ts +1 -0
  333. package/dist/server/analyze-worker.js +38 -20
  334. package/dist/server/api.d.ts +5 -1
  335. package/dist/server/api.js +105 -88
  336. package/dist/server/git-clone.d.ts +40 -16
  337. package/dist/server/git-clone.js +253 -199
  338. package/dist/server/grep-params.d.ts +18 -0
  339. package/dist/server/grep-params.js +83 -0
  340. package/dist/server/grep-scan.d.ts +23 -0
  341. package/dist/server/grep-scan.js +107 -0
  342. package/dist/server/grep-worker.d.ts +1 -0
  343. package/dist/server/grep-worker.js +12 -0
  344. package/dist/server/mcp-http.d.ts +8 -0
  345. package/dist/server/mcp-http.js +16 -1
  346. package/dist/server/update-controller.d.ts +29 -0
  347. package/dist/server/update-controller.js +82 -0
  348. package/dist/storage/file-lock.d.ts +15 -0
  349. package/dist/storage/file-lock.js +155 -0
  350. package/dist/storage/fs-atomic.d.ts +24 -0
  351. package/dist/storage/fs-atomic.js +86 -2
  352. package/dist/storage/global-dir.d.ts +2 -0
  353. package/dist/storage/global-dir.js +6 -0
  354. package/dist/storage/parse-cache.d.ts +45 -7
  355. package/dist/storage/parse-cache.js +189 -42
  356. package/dist/storage/parsedfile-store.d.ts +41 -60
  357. package/dist/storage/parsedfile-store.js +247 -171
  358. package/dist/storage/repo-manager.d.ts +10 -4
  359. package/dist/storage/repo-manager.js +35 -25
  360. package/dist/storage/repo-meta.d.ts +34 -0
  361. package/dist/storage/v8-sidecar.d.ts +48 -0
  362. package/dist/storage/v8-sidecar.js +347 -0
  363. package/dist/types/pipeline.d.ts +14 -0
  364. package/dist/utils/process-identity.d.ts +2 -0
  365. package/dist/utils/process-identity.js +35 -0
  366. package/package.json +10 -4
  367. package/scripts/assert-web-assets.mjs +35 -0
  368. package/scripts/build-web.js +72 -0
  369. package/scripts/build.js +31 -28
  370. package/scripts/cross-platform-tests.ts +2 -0
  371. package/skills/gitnexus-cli.md +5 -1
  372. package/web/assets/ProcessFlowModal-DAeX2BHW.js +24 -0
  373. package/web/assets/{abnfDiagram-QNN2D4NM-Cq2djWWe.js → abnfDiagram-PAR5IXJI-J3OdeHLl.js} +1 -1
  374. package/web/assets/{agent-BWAXPjC5.js → agent-BMRqXorA.js} +6 -4
  375. package/web/assets/architecture-7GRP2DOG-M7G3SWCO-G3sWyX6M.js +1 -0
  376. package/web/assets/architectureDiagram-2PNWDENW-ysKcRlGT.js +36 -0
  377. package/web/assets/blockDiagram-PUWGUBOA-oLXTa1lY.js +129 -0
  378. package/web/assets/c4Diagram-3NLNHZP5-D3iu4eC0.js +38 -0
  379. package/web/assets/{chunk-2SREHG4O-Dip42xOq.js → chunk-2NMSUPJH-B24w-wng.js} +1 -1
  380. package/web/assets/{chunk-VJFVEZTB-CX66F2ep.js → chunk-32MCUW2P-ByUyt0Sa.js} +3 -3
  381. package/web/assets/{chunk-4RFN2BYJ-DHHWuC-n.js → chunk-3NPNU5GP-DocZ07Sg.js} +1 -1
  382. package/web/assets/{chunk-XNMVGMAZ-Cg_LnPtj.js → chunk-3SMGFRGC-CAu4JRLv.js} +1 -1
  383. package/web/assets/{chunk-W44A43WB-BN8EQc_u.js → chunk-4CAJECRU-DRYMwG9z.js} +1 -1
  384. package/web/assets/chunk-4OADUZ5Q-CxrSvOwZ.js +10 -0
  385. package/web/assets/{chunk-DMV4VAQV-Bn6WXDSX.js → chunk-5IQCK5RY-CCMhl4so.js} +2 -2
  386. package/web/assets/{chunk-RRFMTAIC-CMN0wcYA.js → chunk-5MVFYWFU-Db9KvrYO.js} +1 -1
  387. package/web/assets/chunk-CLS4B6BI-Uvx5QNsu.js +168 -0
  388. package/web/assets/chunk-DZP67EKU-B3Mt380j.js +70 -0
  389. package/web/assets/{chunk-6L755F7B-CMhLBxi2.js → chunk-EICP7K5X-CqwE9hui.js} +1 -1
  390. package/web/assets/{chunk-BI6VK774-D0oaWk8V.js → chunk-GDY2UAB4-CtQQR0a8.js} +1 -1
  391. package/web/assets/chunk-H7VHZCWX-CE1nAmt6.js +1 -0
  392. package/web/assets/chunk-IJBDOHL6-BUKtY6oF.js +1 -0
  393. package/web/assets/{chunk-OIYT25JQ-CQ6KOZGX.js → chunk-JFFVMJIA-0fJenqia.js} +1 -1
  394. package/web/assets/{chunk-HNC4WDU7-DoU3KnA7.js → chunk-JZGDI5JK-BeTMSSkJ.js} +1 -1
  395. package/web/assets/{chunk-EQFTRU2I-1ix7TzW9.js → chunk-KD6SPIPN-Qp1Pflah.js} +1 -1
  396. package/web/assets/chunk-NF366YI6-CpSpya3n.js +231 -0
  397. package/web/assets/chunk-NUDPKBEF-CU1-BQIW.js +34 -0
  398. package/web/assets/{chunk-SATU7PGQ-B1zhgOvc.js → chunk-OJINMHTS-zOCQe4eI.js} +1 -1
  399. package/web/assets/{chunk-E5QJAATJ-dh-5CtIV.js → chunk-Q6NGPIAH-yyBomb63.js} +1 -1
  400. package/web/assets/chunk-QJSWEUOL-D_rf9gPD.js +128 -0
  401. package/web/assets/chunk-R7JDMUKV-CRoqKpD6.js +1 -0
  402. package/web/assets/{chunk-VE5CLXGZ-C1vB7wpY.js → chunk-RCXAM2GK-CUqrWQDV.js} +1 -1
  403. package/web/assets/{chunk-66DQ2XMT-CM0xjFAN.js → chunk-RT4MAWR3-zXy9-Lvt.js} +1 -1
  404. package/web/assets/{chunk-TZUXEDM2-B7p9AcTw.js → chunk-SFMINX4W-J2UrvMpD.js} +1 -1
  405. package/web/assets/{chunk-LORZLZWG-B57uGw2N.js → chunk-SLDQ463B-CHY6e_bQ.js} +2 -2
  406. package/web/assets/{chunk-FWYVLQTC-BgDItRzJ.js → chunk-TCEHX7R3-CXPDEVbm.js} +1 -1
  407. package/web/assets/{chunk-224SPVON-B8gxtXpy.js → chunk-VQC2EELJ-Dc8fIy4R.js} +1 -1
  408. package/web/assets/chunk-VRZKL3EH-DB3KixTQ.js +1 -0
  409. package/web/assets/{chunk-A7VWPJGB-B4O3oQdQ.js → chunk-VTHDQ7BV-b7FsPQZO.js} +1 -1
  410. package/web/assets/chunk-VY2OSTJR-Dkgc3Brg.js +2 -0
  411. package/web/assets/chunk-WUBWJARI-7FwILJ3k.js +2 -0
  412. package/web/assets/{chunk-D6VWDJW2-BxcBdZ9c.js → chunk-YBMQ5JGJ-BSnyWZmd.js} +1 -1
  413. package/web/assets/chunk-YDMLL4PJ-IHhMngTz.js +2 -0
  414. package/web/assets/chunk-Z6V44ARX-BjCEsF0Q.js +62 -0
  415. package/web/assets/chunk-ZJJ7VQJP-Dz089b-K.js +321 -0
  416. package/web/assets/chunk-ZNLK7HRR-B0iFpmW4.js +1 -0
  417. package/web/assets/chunk-ZQN7UHIL-Cy7KAjQt.js +1 -0
  418. package/web/assets/{chunk-L5GCOVLC-CE2w8Nm_.js → chunk-ZS6VBONO-DBjJO0w9.js} +2 -2
  419. package/web/assets/{chunk-NV3KIAZN-5yvcpMiu.js → chunk-ZUNWM646-DNRJyNPe.js} +1 -1
  420. package/web/assets/classDiagram-FGAMPOII-C5Ibyode.js +1 -0
  421. package/web/assets/classDiagram-v2-AI5RJEK4-C5Ibyode.js +1 -0
  422. package/web/assets/{cose-bilkent-RZA4XIPR-BHpK4Crp.js → cose-bilkent-Q72C2OJ3-DMeFXnK8.js} +1 -1
  423. package/web/assets/cynefin-OW5HDTMX-6OCTWOGG-vlqakYcO.js +1 -0
  424. package/web/assets/{cynefinDiagram-TR7LZUCG-C3Iar9lZ.js → cynefinDiagram-2OOWUY4M-BY6DZkTt.js} +1 -1
  425. package/web/assets/dagre-MPVFI544-DWO70fy_.js +4 -0
  426. package/web/assets/diagram-AE4NWXFW-f7JRVRUL.js +24 -0
  427. package/web/assets/{diagram-L7DVE3PN-GIRyVUtt.js → diagram-BUJID5UG-BXZv1rCS.js} +2 -2
  428. package/web/assets/{diagram-JCD7PQ7C-DC5-9FRr.js → diagram-C44CZ5NI-CRNfvjCq.js} +1 -1
  429. package/web/assets/diagram-EYOLEXXS-DZOjKQVE.js +30 -0
  430. package/web/assets/diagram-P7B6PWOJ-D3SQmw3_.js +3 -0
  431. package/web/assets/{ebnfDiagram-DRHRQJWO-D8_CI4ZF.js → ebnfDiagram-FTPZ3PV6-jKWpIDN2.js} +1 -1
  432. package/web/assets/erDiagram-H3ERR26V-BqJntEuJ.js +99 -0
  433. package/web/assets/eventmodeling-NTZA5JFV-WKSWQHFS-Bq4FqtBL.js +1 -0
  434. package/web/assets/flowDiagram-YHGXBVSY-Dnlk2bEu.js +1 -0
  435. package/web/assets/ganttDiagram-RWFTB7ED-Bl6Y1K5T.js +292 -0
  436. package/web/assets/gitGraph-4MIJSDKK-JH2HKYUO-B3yc4GkH.js +1 -0
  437. package/web/assets/gitGraphDiagram-MAR6GKOP-CkNvsrdw.js +106 -0
  438. package/web/assets/{index-CJDpyH-n.css → index-C2_aej58.css} +1 -1
  439. package/web/assets/{index-DDRie6_8.js → index-Dj3vQOHK.js} +51 -51
  440. package/web/assets/info-A6RAGUB7-3TX3OFWW-BM3N5_Dv.js +1 -0
  441. package/web/assets/infoDiagram-LV547AFH-COkFutAf.js +2 -0
  442. package/web/assets/{ishikawaDiagram-4JDSWWDM-DmqWtjkl.js → ishikawaDiagram-PUJQGNDS-Bb8FylSR.js} +2 -2
  443. package/web/assets/{journeyDiagram-QUS3FAKT-XAzVzrQW.js → journeyDiagram-EW5QJT4W-BzoHUBhM.js} +4 -4
  444. package/web/assets/{kanban-definition-D4L7SQKK-YurRnmYn.js → kanban-definition-JSQERAZB-Uy2Pi0yQ.js} +4 -4
  445. package/web/assets/katex-CZ4GXH2S-C0Fcou7U.js +257 -0
  446. package/web/assets/{mindmap-definition-66QP5TD6-ChrWWnil.js → mindmap-definition-VBJCLQLM-B-CnOnt_.js} +3 -3
  447. package/web/assets/packet-AYTQ26CC-MKII6P3Y-Bd52ZE3V.js +1 -0
  448. package/web/assets/{pegDiagram-YKIO5C6U-QGeQLEq2.js → pegDiagram-7WILOQTJ-D9sneKXg.js} +1 -1
  449. package/web/assets/pie-WAS4IAKB-6B4OPMJ5-DW5Xy69Z.js +1 -0
  450. package/web/assets/pieDiagram-EFA7CBSB-Dx2NQofL.js +39 -0
  451. package/web/assets/{quadrantDiagram-VO5QLCXA-B7098wSc.js → quadrantDiagram-WARVYA7P-DPKL9_0A.js} +3 -3
  452. package/web/assets/radar-RG4KPBEZ-UPTR3XUL-CkzibT2h.js +1 -0
  453. package/web/assets/railroad-74A4TZTK-MEFUPFMS-D9zF-mDN.js +1 -0
  454. package/web/assets/railroad-abnf-HS5TGJTU-R5YG2S5D-ruacjUbX.js +1 -0
  455. package/web/assets/railroad-ebnf-LZEXJU2U-G5QEX2L6-S1zc5OiO.js +1 -0
  456. package/web/assets/railroad-peg-WCYAUIDC-H5I2ZRY2-Cbcr0XzY.js +1 -0
  457. package/web/assets/{railroadDiagram-M77LTMSB-AXu4vxk_.js → railroadDiagram-5NIQVNLQ-DsweTo14.js} +1 -1
  458. package/web/assets/{requirementDiagram-RASO5HTO-B-l8InpK.js → requirementDiagram-SXREGOKZ-CXwdNSVR.js} +4 -4
  459. package/web/assets/{sankeyDiagram-F32LOJ6L-Kd7zjJgX.js → sankeyDiagram-VV74M2VP-CA6jtP9P.js} +3 -3
  460. package/web/assets/{sequenceDiagram-URATNSBD-BlcdY9DS.js → sequenceDiagram-52ZFIFDL-k_5rEbzm.js} +15 -15
  461. package/web/assets/src-Df5C1Nz4.js +1 -0
  462. package/web/assets/stateDiagram-3QAKPIVI-BejHTf31.js +1 -0
  463. package/web/assets/stateDiagram-v2-HN2P4RDZ-BrfoRuOc.js +1 -0
  464. package/web/assets/swimlanes-QLVP42QD-CQSVO5D6.js +1 -0
  465. package/web/assets/swimlanesDiagram-JKPDBFCN-DrWB9kcD.js +8 -0
  466. package/web/assets/{timeline-definition-WJXWRH4I-DUfp1R3E.js → timeline-definition-GS45XAXW-C0Ks8rPP.js} +4 -4
  467. package/web/assets/treeView-Q6P3EWNA-ZRJGANNQ-DmKOCo6L.js +1 -0
  468. package/web/assets/treemap-WGGIJYW6-K64VN5AS-DO3xY92U.js +1 -0
  469. package/web/assets/{vennDiagram-K3VCMQLI-Bj-FN-XS.js → vennDiagram-QIQU2ZRJ-rgPiS837.js} +3 -3
  470. package/web/assets/wardley-WFR3VGLG-D67OWCCH-DiDPBNft.js +1 -0
  471. package/web/assets/wardleyDiagram-U6YNM66N-DRVr7SPi.js +78 -0
  472. package/web/assets/{xychartDiagram-5VRUVLCW-CK_rbSWE.js → xychartDiagram-XJAZEDNM-COtlZzYb.js} +3 -3
  473. package/web/index.html +19 -17
  474. package/web/assets/ProcessFlowModal-Badh2Pbg.js +0 -24
  475. package/web/assets/architecture-TIHT7OUA-V6N4J3SY-fTePvLoe.js +0 -1
  476. package/web/assets/architectureDiagram-OT7VKSJ7-mKEXxkeF.js +0 -36
  477. package/web/assets/blockDiagram-54WLDVWM-Dg_hrRWE.js +0 -132
  478. package/web/assets/c4Diagram-X2LASM7V-CnhoT4aV.js +0 -10
  479. package/web/assets/chunk-2AEHWXPW-CV4r6-1I.js +0 -127
  480. package/web/assets/chunk-5VCL7Z4A-CQ-2dYWj.js +0 -1
  481. package/web/assets/chunk-6BELYETK-ChsYtfHW.js +0 -1
  482. package/web/assets/chunk-7CWYLC5S-DRgGkkpF.js +0 -2
  483. package/web/assets/chunk-7FYTHRHK-CsmYIswB.js +0 -32
  484. package/web/assets/chunk-KRXBNO2N-C-UNuKKf.js +0 -1
  485. package/web/assets/chunk-LAHSG3N2-Bz4hcn0N.js +0 -321
  486. package/web/assets/chunk-LIEV3EAG-pyKGssV3.js +0 -1
  487. package/web/assets/chunk-NLANEA3F-XpH_NPA5.js +0 -62
  488. package/web/assets/chunk-PE7DX7ZZ-CCvRVj43.js +0 -10
  489. package/web/assets/chunk-Q67WD55A-BWCH2SVz.js +0 -156
  490. package/web/assets/chunk-SZD42YQK-ijyKKVr1.js +0 -70
  491. package/web/assets/chunk-TFPGFQPA-Dj6a-0pC.js +0 -231
  492. package/web/assets/chunk-TGVD4F4B-BMc31Gj2.js +0 -2
  493. package/web/assets/chunk-UAT7B5JY-DW-A_fpI.js +0 -1
  494. package/web/assets/chunk-VY5UBI4V-yxPQAWxw.js +0 -1
  495. package/web/assets/chunk-WJBAP47W-BckNkuEN.js +0 -1
  496. package/web/assets/classDiagram-VPOSVPXH-BjOiXA_C.js +0 -1
  497. package/web/assets/classDiagram-v2-5VFNUXQA-BjOiXA_C.js +0 -1
  498. package/web/assets/cynefin-VYW2F7L2-2VAHYKR6-DAsF6GZv.js +0 -1
  499. package/web/assets/dagre-K64A6Z3X-CUwi79mA.js +0 -4
  500. package/web/assets/diagram-2TLGJV2N-C2F5Nfym.js +0 -30
  501. package/web/assets/diagram-KFBZAVDW-Dfmf_4ti.js +0 -3
  502. package/web/assets/diagram-YP3FGXHI-CyNFYtkd.js +0 -24
  503. package/web/assets/erDiagram-SZLJLQMB-CohQjznC.js +0 -85
  504. package/web/assets/eventmodeling-45OFAUF4-AOUJWSLX-BvTc6iQi.js +0 -1
  505. package/web/assets/flowDiagram-BWE6NHOH-B6RnEvD9.js +0 -1
  506. package/web/assets/ganttDiagram-2QTCJSNI-Cks_mEcF.js +0 -292
  507. package/web/assets/gitGraph-TEB2WS4Q-U5VWYIBC-Dy7CCSZ5.js +0 -1
  508. package/web/assets/gitGraphDiagram-VVZAVV5G-CG41cIVc.js +0 -106
  509. package/web/assets/info-DKCQHKI2-DX6KST54-BLJg1ikX.js +0 -1
  510. package/web/assets/infoDiagram-FY4PZKRE-BJ3vPVwW.js +0 -2
  511. package/web/assets/katex-C5OPUE3Q-Bnbavtmu.js +0 -257
  512. package/web/assets/packet-7NZHBO7P-5WG45QPS-KUxcuvaA.js +0 -1
  513. package/web/assets/pie-RZYD4A2V-2OCZ2VTD-DPs08kJY.js +0 -1
  514. package/web/assets/pieDiagram-YPY3TKG5-BuT3MYzm.js +0 -39
  515. package/web/assets/radar-I7S5WNFK-EPLSA35B-w5F0K3a7.js +0 -1
  516. package/web/assets/railroad-3IZDKUUU-PWFQV6Y6-Bu668yqY.js +0 -1
  517. package/web/assets/railroad-abnf-AHOZXSZD-JYYJX3BS-B6ghpETS.js +0 -1
  518. package/web/assets/railroad-ebnf-EBAXGLYW-RBZ4ONAP-D-XmHh3M.js +0 -1
  519. package/web/assets/railroad-peg-LSFZ7HO6-KHNPXGPG-mhkrhzEn.js +0 -1
  520. package/web/assets/src-C5sx_gMp.js +0 -1
  521. package/web/assets/stateDiagram-DODFXNG5-DTdHc-fF.js +0 -1
  522. package/web/assets/stateDiagram-v2-JNMM5JRA-DioNLDDo.js +0 -1
  523. package/web/assets/swimlanes-OSWOYLSK-CA0ofdwY.js +0 -2
  524. package/web/assets/swimlanesDiagram-RHGX2RDE-PkwUdckC.js +0 -8
  525. package/web/assets/treeView-QDETBFTQ-EHYTSQNO-C5lpBgPm.js +0 -1
  526. package/web/assets/treemap-6X3UGDF4-CCWCF7EK-BB0ZyO-B.js +0 -1
  527. package/web/assets/wardley-OPB4EBWU-6OWERDVT-CEA3Nq0j.js +0 -1
  528. package/web/assets/wardleyDiagram-XK6FUAWV-CVV0dHFr.js +0 -78
  529. /package/web/assets/{sizeCapture-5GORAGP4-BEqQzsxs.js → sizeCapture-FGA5AGYP-BEqQzsxs.js} +0 -0
@@ -0,0 +1,292 @@
1
+ import{i as e,n as t,t as n}from"./chunk-AQ6EADP3-CZhslHi-.js";import{A as r,B as i,C as a,E as o,G as s,H as c,J as l,N as u,P as d,R as f,U as p,V as m,X as h,Z as g,et as _,i as v,k as y,l as b,m as x,q as S,s as C,v as w,w as T,y as E}from"./chunk-H7VHZCWX-CE1nAmt6.js";import{B as D,F as O,O as k,Q as A,R as j,V as M,X as N,Y as P,h as F,q as I}from"./chunk-QJSWEUOL-D_rf9gPD.js";import{t as ee}from"./chunk-STOV2HOB-GnExfzIX.js";import{o as te}from"./chunk-VY2OSTJR-Dkgc3Brg.js";var ne=t((e,t)=>{(function(n,r){typeof e==`object`&&typeof t<`u`?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_isoWeek=r()})(e,(function(){return function(e,t,r){var i=n(function(e){return e.add(4-e.isoWeekday(),`day`)},`a`),a=t.prototype;a.isoWeekYear=function(){return i(this).year()},a.isoWeek=function(e){if(!this.$utils().u(e))return this.add(7*(e-this.isoWeek()),`day`);var t,n,a,o,s=i(this),c=(t=this.isoWeekYear(),n=this.$u,a=(n?r.utc:r)().year(t).startOf(`year`),o=4-a.isoWeekday(),a.isoWeekday()>4&&(o+=7),a.add(o,`day`));return s.diff(c,`week`)+1},a.isoWeekday=function(e){return this.$utils().u(e)?this.day()||7:this.day(this.day()%7?e:e-7)};var o=a.startOf;a.startOf=function(e,t){var n=this.$utils(),r=!!n.u(t)||t;return n.p(e)===`isoweek`?r?this.date(this.date()-(this.isoWeekday()-1)).startOf(`day`):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf(`day`):o.bind(this)(e,t)}}}))}),re=t((e,t)=>{(function(n,r){typeof e==`object`&&typeof t<`u`?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_customParseFormat=r()})(e,(function(){var e={LTS:`h:mm:ss A`,LT:`h:mm A`,L:`MM/DD/YYYY`,LL:`MMMM D, YYYY`,LLL:`MMMM D, YYYY h:mm A`,LLLL:`dddd, MMMM D, YYYY h:mm A`},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d/,i=/\d\d/,a=/\d\d?/,o=/\d*[^-_:/,()\s\d]+/,s={},c=n(function(e){return(e=+e)+(e>68?1900:2e3)},`a`),l=n(function(e){return function(t){this[e]=+t}},`f`),u=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||={}).offset=(function(e){if(!e||e===`Z`)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return n===0?0:t[0]===`+`?-n:n})(e)}],d=n(function(e){var t=s[e];return t&&(t.indexOf?t:t.s.concat(t.f))},`u`),f=n(function(e,t){var n,r=s.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?`pm`:`PM`);return n},`d`),p={A:[o,function(e){this.afternoon=f(e,!1)}],a:[o,function(e){this.afternoon=f(e,!0)}],Q:[r,function(e){this.month=3*(e-1)+1}],S:[r,function(e){this.milliseconds=100*e}],SS:[i,function(e){this.milliseconds=10*e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[a,l(`seconds`)],ss:[a,l(`seconds`)],m:[a,l(`minutes`)],mm:[a,l(`minutes`)],H:[a,l(`hours`)],h:[a,l(`hours`)],HH:[a,l(`hours`)],hh:[a,l(`hours`)],D:[a,l(`day`)],DD:[i,l(`day`)],Do:[o,function(e){var t=s.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,``)===e&&(this.day=r)}],w:[a,l(`week`)],ww:[i,l(`week`)],M:[a,l(`month`)],MM:[i,l(`month`)],MMM:[o,function(e){var t=d(`months`),n=(d(`monthsShort`)||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw Error();this.month=n%12||n}],MMMM:[o,function(e){var t=d(`months`).indexOf(e)+1;if(t<1)throw Error();this.month=t%12||t}],Y:[/[+-]?\d+/,l(`year`)],YY:[i,function(e){this.year=c(e)}],YYYY:[/\d{4}/,l(`year`)],Z:u,ZZ:u};function m(n){for(var r=n,i=s&&s.formats,a=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var a=r&&r.toUpperCase();return n||i[r]||e[r]||i[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),o=a.length,c=0;c<o;c+=1){var l=a[c],u=p[l],d=u&&u[0],f=u&&u[1];a[c]=f?{regex:d,parser:f}:l.replace(/^\[|\]$/g,``)}return function(e){for(var t={},n=0,r=0;n<o;n+=1){var i=a[n];if(typeof i==`string`)r+=i.length;else{var s=i.regex,c=i.parser,l=e.slice(r),u=s.exec(l)[0];c.call(t,u),e=e.replace(u,``)}}return(function(e){var t=e.afternoon;if(t!==void 0){var n=e.hours;t?n<12&&(e.hours+=12):n===12&&(e.hours=0),delete e.afternoon}})(t),t}}return n(m,`l`),function(e,t,n){n.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(c=e.parseTwoDigitYear);var r=t.prototype,i=r.parse;r.parse=function(e){var t=e.date,r=e.utc,a=e.args;this.$u=r;var o=a[1];if(typeof o==`string`){var c=a[2]===!0,l=a[3]===!0,u=c||l,d=a[2];l&&(d=a[2]),s=this.$locale(),!c&&d&&(s=n.Ls[d]),this.$d=(function(e,t,n,r){try{if([`x`,`X`].indexOf(t)>-1)return new Date((t===`X`?1e3:1)*e);var i=m(t)(e),a=i.year,o=i.month,s=i.day,c=i.hours,l=i.minutes,u=i.seconds,d=i.milliseconds,f=i.zone,p=i.week,h=new Date,g=s||(a||o?1:h.getDate()),_=a||h.getFullYear(),v=0;a&&!o||(v=o>0?o-1:h.getMonth());var y,b=c||0,x=l||0,S=u||0,C=d||0;return f?new Date(Date.UTC(_,v,g,b,x,S,C+60*f.offset*1e3)):n?new Date(Date.UTC(_,v,g,b,x,S,C)):(y=new Date(_,v,g,b,x,S,C),p&&(y=r(y).week(p).toDate()),y)}catch{return new Date(``)}})(t,o,r,n),this.init(),d&&d!==!0&&(this.$L=this.locale(d).$L),u&&t!=this.format(o)&&(this.$d=new Date(``)),s={}}else if(o instanceof Array)for(var f=o.length,p=1;p<=f;p+=1){a[1]=o[p-1];var h=n.apply(this,a);if(h.isValid()){this.$d=h.$d,this.$L=h.$L,this.init();break}p===f&&(this.$d=new Date(``))}else i.call(this,e)}}}))}),L=t((e,t)=>{(function(n,r){typeof e==`object`&&typeof t<`u`?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)}}}))}),ie=t((e,t)=>{(function(n,r){typeof e==`object`&&typeof t<`u`?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,r=1e3,i=6e4,a=36e5,o=864e5,s=31536e6,c=2628e6,l=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,u=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,d={years:s,months:c,days:o,hours:a,minutes:i,seconds:r,milliseconds:1,weeks:6048e5},f=n(function(e){return e instanceof y},`c`),p=n(function(e,t,n){return new y(e,n,t.$l)},`f`),m=n(function(e){return t.p(e)+`s`},`m`),h=n(function(e){return e<0},`l`),g=n(function(e){return h(e)?Math.ceil(e):Math.floor(e)},`$`),_=n(function(e){return Math.abs(e)},`y`),v=n(function(e,t){return e?h(e)?{negative:!0,format:``+_(e)+t}:{negative:!1,format:``+e+t}:{negative:!1,format:``}},`v`),y=(function(){function h(e,t,n){var r=this;if(this.$d={},this.$l=n,e===void 0&&(this.$ms=0,this.parseFromMilliseconds()),t)return p(e*d[m(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[m(t)]=e[t]})),this.calMilliseconds(),this;if(typeof e==`string`){var i=e.match(l);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}n(h,`l`);var _=h.prototype;return _.calMilliseconds=function(){var e=this;this.$ms=Object.keys(this.$d).reduce((function(t,n){return t+(e.$d[n]||0)*d[n]}),0)},_.parseFromMilliseconds=function(){var e=this.$ms;this.$d.years=g(e/s),e%=s,this.$d.months=g(e/c),e%=c,this.$d.days=g(e/o),e%=o,this.$d.hours=g(e/a),e%=a,this.$d.minutes=g(e/i),e%=i,this.$d.seconds=g(e/r),e%=r,this.$d.milliseconds=e},_.toISOString=function(){var e=v(this.$d.years,`Y`),t=v(this.$d.months,`M`),n=+this.$d.days||0;this.$d.weeks&&(n+=7*this.$d.weeks);var r=v(n,`D`),i=v(this.$d.hours,`H`),a=v(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=v(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},_.toJSON=function(){return this.toISOString()},_.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(u,(function(e,t){return t||String(r[e])}))},_.as=function(e){return this.$ms/d[m(e)]},_.get=function(e){var t=this.$ms,n=m(e);return n===`milliseconds`?t%=1e3:t=n===`weeks`?g(t/d[n]):this.$d[n],t||0},_.add=function(e,t,n){var r;return r=t?e*d[m(t)]:f(e)?e.$ms:p(e,this).$ms,p(this.$ms+r*(n?-1:1),this)},_.subtract=function(e,t){return this.add(e,t,!0)},_.locale=function(e){var t=this.clone();return t.$l=e,t},_.clone=function(){return p(this.$ms,this)},_.humanize=function(t){return e().add(this.$ms,`ms`).locale(this.$l).fromNow(!t)},_.valueOf=function(){return this.asMilliseconds()},_.milliseconds=function(){return this.get(`milliseconds`)},_.asMilliseconds=function(){return this.as(`milliseconds`)},_.seconds=function(){return this.get(`seconds`)},_.asSeconds=function(){return this.as(`seconds`)},_.minutes=function(){return this.get(`minutes`)},_.asMinutes=function(){return this.as(`minutes`)},_.hours=function(){return this.get(`hours`)},_.asHours=function(){return this.as(`hours`)},_.days=function(){return this.get(`days`)},_.asDays=function(){return this.as(`days`)},_.weeks=function(){return this.get(`weeks`)},_.asWeeks=function(){return this.as(`weeks`)},_.months=function(){return this.get(`months`)},_.asMonths=function(){return this.as(`months`)},_.years=function(){return this.get(`years`)},_.asYears=function(){return this.as(`years`)},h})(),b=n(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`)},`p`);return function(n,r,i){e=i,t=i().$utils(),i.duration=function(e,t){return p(e,{$l:i.locale()},t)},i.isDuration=f;var a=r.prototype.add,o=r.prototype.subtract;r.prototype.add=function(e,t){return f(e)?b(this,e,1):a.bind(this)(e,t)},r.prototype.subtract=function(e,t){return f(e)?b(this,e,-1):o.bind(this)(e,t)}}}))}),R=(function(){var e=n(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],r=[1,26],i=[1,27],a=[1,28],o=[1,29],s=[1,30],c=[1,31],l=[1,32],u=[1,33],d=[1,34],f=[1,9],p=[1,10],m=[1,11],h=[1,12],g=[1,13],_=[1,14],v=[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:n(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:n(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];break}},`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:r,13:i,14:a,15:o,16:s,17:c,18:l,19:18,20:u,21:d,22:f,23:p,24:m,25:h,26:g,27:_,28:v,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:r,13:i,14:a,15:o,16:s,17:c,18:l,19:18,20:u,21:d,22:f,23:p,24:m,25:h,26:g,27:_,28:v,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:n(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:n(function(e){var t=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,typeof h.yylloc>`u`&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}n(b,`popStack`);function x(){var e;return e=i.pop()||h.lex()||p,typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=t.symbols_[e]||e),e}n(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===null||typeof S>`u`)&&(S=x()),T=s[w]&&s[w][S]),typeof T>`u`||!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
+ `+h.showPosition()+`
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)),typeof E<`u`)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`)};D.lexer=(function(){return{EOF:1,parseError:n(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:n(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:n(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:n(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:n(function(){return this._more=!0,this},`more`),reject:n(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
+ `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:n(function(e){this.unput(this.match.slice(e))},`less`),pastInput:n(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:n(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:n(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
5
+ `+t+`^`},`showPosition`),test_match:n(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:n(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}else return!1}else if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:n(function(){return this.next()||this.lex()},`lex`),begin:n(function(e){this.conditionStack.push(e)},`begin`),popState:n(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:n(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:n(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:n(function(e){this.begin(e)},`pushState`),stateStackSize:n(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:n(function(e,t,n,r){switch(n){case 0:return this.begin(`open_directive`),`open_directive`;case 1:return this.begin(`acc_title`),31;case 2:return this.popState(),`acc_title_value`;case 3:return this.begin(`acc_descr`),33;case 4:return this.popState(),`acc_descr_value`;case 5:this.begin(`acc_descr_multiline`);break;case 6:this.popState();break;case 7:return`acc_descr_multiline_value`;case 8:break;case 9:break;case 10:break;case 11:return 10;case 12:break;case 13:break;case 14:this.begin(`href`);break;case 15:this.popState();break;case 16:return 43;case 17:this.begin(`callbackname`);break;case 18:this.popState();break;case 19:this.popState(),this.begin(`callbackargs`);break;case 20:return 41;case 21:this.popState();break;case 22:return 42;case 23:this.begin(`click`);break;case 24:this.popState();break;case 25:return 40;case 26:return 4;case 27:return 22;case 28:return 23;case 29:return 24;case 30:return 25;case 31:return 26;case 32:return 28;case 33:return 27;case 34:return 29;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return 20;case 43:return 21;case 44:return`date`;case 45:return 30;case 46:return`accDescription`;case 47:return 36;case 48:return 38;case 49:return 39;case 50:return`:`;case 51:return 6;case 52:return`INVALID`}},`anonymous`),rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:weekend\s+friday\b)/i,/^(?:weekend\s+saturday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^\n]+)/i,/^(?:[^:\n]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[21,22],inclusive:!1},callbackname:{rules:[18,19,20],inclusive:!1},href:{rules:[15,16],inclusive:!1},click:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,17,23,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}}})();function O(){this.yy={}}return n(O,`Parser`),O.prototype=D,D.Parser=O,new O})();R.parser=R;var ae=R,oe=e(ee(),1),z=e(C(),1),se=e(ne(),1),ce=e(re(),1),le=e(L(),1);z.default.extend(se.default),z.default.extend(ce.default),z.default.extend(le.default);var ue={friday:5,saturday:6},B=``,de=``,fe,pe=``,V=[],H=[],me=new Map,he=[],U=[],W=``,ge=``,_e=[`active`,`done`,`crit`,`milestone`,`vert`],ve=[],G=``,K=!1,ye=!1,be=`sunday`,q=`saturday`,xe=0,Se=n(function(){he=[],U=[],W=``,ve=[],nt=0,at=void 0,Y=void 0,X=[],B=``,de=``,ge=``,fe=void 0,pe=``,V=[],H=[],K=!1,ye=!1,xe=0,me=new Map,G=``,F(),be=`sunday`,q=`saturday`},`clear`),Ce=n(function(e){G=e},`setDiagramId`),we=n(function(e){de=e},`setAxisFormat`),Te=n(function(){return de},`getAxisFormat`),Ee=n(function(e){fe=e},`setTickInterval`),De=n(function(){return fe},`getTickInterval`),Oe=n(function(e){pe=e},`setTodayMarker`),ke=n(function(){return pe},`getTodayMarker`),Ae=n(function(e){B=e},`setDateFormat`),je=n(function(){K=!0},`enableInclusiveEndDates`),Me=n(function(){return K},`endDatesAreInclusive`),Ne=n(function(){ye=!0},`enableTopAxis`),Pe=n(function(){return ye},`topAxisEnabled`),Fe=n(function(e){ge=e},`setDisplayMode`),Ie=n(function(){return ge},`getDisplayMode`),Le=n(function(){return B},`getDateFormat`),Re=n((e,t)=>{let n=t.toLowerCase().split(/[\s,]+/).filter(e=>e!==``);return[...new Set([...e,...n])]},`mergeTokens`),ze=n(function(e){V=Re(V,e)},`setIncludes`),Be=n(function(){return V},`getIncludes`),Ve=n(function(e){H=Re(H,e)},`setExcludes`),He=n(function(){return H},`getExcludes`),Ue=n(function(){return me},`getLinks`),We=n(function(e){W=e,he.push(e)},`addSection`),Ge=n(function(){return he},`getSections`),Ke=n(function(){let e=lt(),t=0;for(;!e&&t<10;)e=lt(),t++;return U=X,U},`getTasks`),qe=n(function(e,t,n,r){let i=e.format(t.trim()),a=e.format(`YYYY-MM-DD`);return r.includes(i)||r.includes(a)?!1:n.includes(`weekends`)&&(e.isoWeekday()===ue[q]||e.isoWeekday()===ue[q]+1)||n.includes(e.format(`dddd`).toLowerCase())?!0:n.includes(i)||n.includes(a)},`isInvalidDate`),Je=n(function(e){be=e},`setWeekday`),Ye=n(function(){return be},`getWeekday`),Xe=n(function(e){q=e},`setWeekend`),Ze=n(function(e,t,n,r){if(!n.length||e.manualEndTime)return;let i;i=e.startTime instanceof Date?(0,z.default)(e.startTime):(0,z.default)(e.startTime,t,!0),i=i.add(1,`d`);let a;a=e.endTime instanceof Date?(0,z.default)(e.endTime):(0,z.default)(e.endTime,t,!0);let[o,s]=Qe(i,a,t,n,r);e.endTime=o.toDate(),e.renderEndTime=s},`checkTaskDates`),Qe=n(function(e,t,n,r,i){let a=!1,o=null,s=t.add(1e4,`d`);for(;e<=t;){if(a||(o=t.toDate()),a=qe(e,n,r,i),a&&(t=t.add(1,`d`),t>s))throw Error("Failed to find a valid date that was not excluded by `excludes` after 10,000 iterations.");e=e.add(1,`d`)}return[t,o]},`fixTaskDates`),$e=n(function(e,t,r){if(r=r.trim(),n(e=>{let t=e.trim();return t===`x`||t===`X`},`isTimestampFormat`)(t)&&/^\d+$/.test(r))return new Date(Number(r));let i=/^after\s+(?<ids>[\d\w- ]+)/.exec(r);if(i!==null){let e=null;for(let t of i.groups.ids.split(` `)){let n=Z(t);n!==void 0&&(!e||n.endTime>e.endTime)&&(e=n)}if(e)return e.endTime;let t=new Date;return t.setHours(0,0,0,0),t}let a=(0,z.default)(r,t.trim(),!0);if(a.isValid())return a.toDate();{S.debug(`Invalid date:`+r),S.debug(`With date format:`+t.trim());let e=new Date(r);if(e===void 0||isNaN(e.getTime())||e.getFullYear()<-1e4||e.getFullYear()>1e4)throw Error(`Invalid date:`+r);return e}},`getStartDate`),et=n(function(e){let t=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(e.trim());return t===null?[NaN,`ms`]:[Number.parseFloat(t[1]),t[2]]},`parseDuration`),tt=n(function(e,t,n,r=!1){n=n.trim();let i=/^until\s+(?<ids>[\d\w- ]+)/.exec(n);if(i!==null){let e=null;for(let t of i.groups.ids.split(` `)){let n=Z(t);n!==void 0&&(!e||n.startTime<e.startTime)&&(e=n)}if(e)return e.startTime;let t=new Date;return t.setHours(0,0,0,0),t}let a=(0,z.default)(n,t.trim(),!0);if(a.isValid())return r&&(a=a.add(1,`d`)),a.toDate();let o=(0,z.default)(e),[s,c]=et(n);if(!Number.isNaN(s)){let e=o.add(s,c);e.isValid()&&(o=e)}return o.toDate()},`getEndDate`),nt=0,J=n(function(e){return e===void 0?(nt+=1,`task`+nt):e},`parseId`),rt=n(function(e,t){let n;n=t.substr(0,1)===`:`?t.substr(1,t.length):t;let r=n.split(`,`),i={};_t(r,i,_e);for(let e=0;e<r.length;e++)r[e]=r[e].trim();let a=``;switch(r.length){case 1:i.id=J(),i.startTime=e.endTime,a=r[0];break;case 2:i.id=J(),i.startTime=$e(void 0,B,r[0]),a=r[1];break;case 3:i.id=J(r[0]),i.startTime=$e(void 0,B,r[1]),a=r[2];break;default:}return a&&(i.endTime=tt(i.startTime,B,a,K),i.manualEndTime=(0,z.default)(a,`YYYY-MM-DD`,!0).isValid(),Ze(i,B,H,V)),i},`compileData`),it=n(function(e,t){let n;n=t.substr(0,1)===`:`?t.substr(1,t.length):t;let r=n.split(`,`),i={};_t(r,i,_e);for(let e=0;e<r.length;e++)r[e]=r[e].trim();switch(r.length){case 1:i.id=J(),i.startTime={type:`prevTaskEnd`,id:e},i.endTime={data:r[0]};break;case 2:i.id=J(),i.startTime={type:`getStartDate`,startData:r[0]},i.endTime={data:r[1]};break;case 3:i.id=J(r[0]),i.startTime={type:`getStartDate`,startData:r[1]},i.endTime={data:r[2]};break;default:}return i},`parseData`),at,Y,X=[],ot={},st=n(function(e,t){let n={section:W,type:W,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:t},task:e,classes:[]},r=it(Y,t);n.raw.startTime=r.startTime,n.raw.endTime=r.endTime,n.id=r.id,n.prevTaskId=Y,n.active=r.active,n.done=r.done,n.crit=r.crit,n.milestone=r.milestone,n.vert=r.vert,n.vert?n.order=-1:(n.order=xe,xe++);let i=X.push(n);Y=n.id,ot[n.id]=i-1},`addTask`),Z=n(function(e){let t=ot[e];return X[t]},`findTaskById`),ct=n(function(e,t){let n={section:W,type:W,description:e,task:e,classes:[]},r=rt(at,t);n.startTime=r.startTime,n.endTime=r.endTime,n.id=r.id,n.active=r.active,n.done=r.done,n.crit=r.crit,n.milestone=r.milestone,n.vert=r.vert,at=n,U.push(n)},`addTaskOrg`),lt=n(function(){let e=n(function(e){let t=X[e],n=``;switch(X[e].raw.startTime.type){case`prevTaskEnd`:t.startTime=Z(t.prevTaskId).endTime;break;case`getStartDate`:n=$e(void 0,B,X[e].raw.startTime.startData),n&&(X[e].startTime=n);break}return X[e].startTime&&(X[e].endTime=tt(X[e].startTime,B,X[e].raw.endTime.data,K),X[e].endTime&&(X[e].processed=!0,X[e].manualEndTime=(0,z.default)(X[e].raw.endTime.data,`YYYY-MM-DD`,!0).isValid(),Ze(X[e],B,H,V))),X[e].processed},`compileTask`),t=!0;for(let[n,r]of X.entries())e(n),t&&=r.processed;return t},`compileTasks`),ut=n(function(e,t){let n=t;D().securityLevel!==`loose`&&(n=(0,oe.sanitizeUrl)(t)),e.split(`,`).forEach(function(e){Z(e)!==void 0&&(pt(e,()=>{window.open(n,`_self`)}),me.set(e,n))}),dt(e,`clickable`)},`setLink`),dt=n(function(e,t){e.split(`,`).forEach(function(e){let n=Z(e);n!==void 0&&n.classes.push(t)})},`setClass`),ft=n(function(e,t,n){if(D().securityLevel!==`loose`||t===void 0)return;let r=[];if(typeof n==`string`){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let e=0;e<r.length;e++){let t=r[e].trim();t.startsWith(`"`)&&t.endsWith(`"`)&&(t=t.substr(1,t.length-2)),r[e]=t}}r.length===0&&r.push(e),Z(e)!==void 0&&pt(e,()=>{te.runFunc(t,...r)})},`setClickFun`),pt=n(function(e,t){ve.push(function(){let n=G?`${G}-${e}`:e,r=document.querySelector(`[id="${n}"]`);r!==null&&r.addEventListener(`click`,function(){t()})},function(){let n=G?`${G}-${e}`:e,r=document.querySelector(`[id="${n}-text"]`);r!==null&&r.addEventListener(`click`,function(){t()})})},`pushFun`),mt=n(function(e,t,n){e.split(`,`).forEach(function(e){ft(e,t,n)}),dt(e,`clickable`)},`setClickEvent`),ht=n(function(e){ve.forEach(function(t){t(e)})},`bindFunctions`),gt={getConfig:n(()=>D().gantt,`getConfig`),clear:Se,setDateFormat:Ae,getDateFormat:Le,enableInclusiveEndDates:je,endDatesAreInclusive:Me,enableTopAxis:Ne,topAxisEnabled:Pe,setAxisFormat:we,getAxisFormat:Te,setTickInterval:Ee,getTickInterval:De,setTodayMarker:Oe,getTodayMarker:ke,setAccTitle:A,getAccTitle:M,setDiagramTitle:O,getDiagramTitle:N,setDiagramId:Ce,setDisplayMode:Fe,getDisplayMode:Ie,setAccDescription:P,getAccDescription:I,addSection:We,getSections:Ge,getTasks:Ke,addTask:st,findTaskById:Z,addTaskOrg:ct,setIncludes:ze,getIncludes:Be,setExcludes:Ve,getExcludes:He,setClickEvent:mt,setLink:ut,getLinks:Ue,bindFunctions:ht,parseDuration:et,isInvalidDate:qe,setWeekday:Je,getWeekday:Ye,setWeekend:Xe};function _t(e,t,n){let r=!0;for(;r;)r=!1,n.forEach(function(n){let i=`^\\s*`+n+`\\s*$`,a=new RegExp(i);e[0].match(a)&&(t[n]=!0,e.shift(1),r=!0)})}n(_t,`getTaskTags`);var Q=e(C(),1),vt=e(ie(),1);Q.default.extend(vt.default);var yt=n(function(){S.debug(`Something is calling, setConf, remove the call`)},`setConf`),bt={monday:w,tuesday:l,wednesday:r,thursday:_,friday:o,saturday:d,sunday:v},xt=n((e,t)=>{let n=[...e].map(()=>-1/0),r=[...e].sort((e,t)=>e.startTime-t.startTime||e.order-t.order),i=0;for(let e of r)for(let r=0;r<n.length;r++)if(e.startTime>=n[r]){n[r]=e.endTime,e.order=r+t,r>i&&(i=r);break}return i},`getMaxIntersections`),$,St=1e4,Ct={parser:ae,db:gt,renderer:{setConf:yt,draw:n(function(e,t,r,o){let l=D().gantt;o.db.setDiagramId(t);let d=D().securityLevel,_;d===`sandbox`&&(_=m(`#i`+t));let v=m(d===`sandbox`?_.nodes()[0].contentDocument.body:`body`),C=d===`sandbox`?_.nodes()[0].contentDocument:document,w=C.getElementById(t);$=w.parentElement.offsetWidth,$===void 0&&($=1200),l.useWidth!==void 0&&($=l.useWidth);let O=o.db.getTasks(),A=O.filter(e=>!e.vert),M=[];for(let e of A)M.push(e.type);M=oe(M);let N={},P=2*l.topPadding;if(o.db.getDisplayMode()===`compact`||l.displayMode===`compact`){let e={};for(let t of A)e[t.section]===void 0?e[t.section]=[t]:e[t.section].push(t);let t=0;for(let n of Object.keys(e)){let r=xt(e[n],t)+1;t+=r,P+=r*(l.barHeight+l.barGap),N[n]=r}}else{P+=A.length*(l.barHeight+l.barGap);for(let e of M)N[e]=A.filter(t=>t.type===e).length}w.setAttribute(`viewBox`,`0 0 `+$+` `+P);let F=v.select(`[id="${t}"]`),I=h().domain([y(O,function(e){return e.startTime}),u(O,function(e){return e.endTime})]).rangeRound([0,$-l.leftPadding-l.rightPadding]);function ee(e,t){let n=e.startTime,r=t.startTime,i=0;return n>r?i=1:n<r&&(i=-1),i}n(ee,`taskCompare`),O.sort(ee),te(O,$,P),k(F,P,$,l.useMaxWidth),F.append(`text`).text(o.db.getDiagramTitle()).attr(`x`,$/2).attr(`y`,l.titleTopMargin).attr(`class`,`titleText`);function te(e,t,n){let r=l.barHeight,i=r+l.barGap,a=l.topPadding,s=l.leftPadding,c=f().domain([0,M.length]).range([`#00B9FA`,`#F95002`]).interpolate(E);re(i,a,s,t,n,e,o.db.getExcludes(),o.db.getIncludes()),ie(s,a,t,n),ne(e,i,a,s,r,c,t,n),R(i,a,s,r,c),ae(s,a,t,n)}n(te,`makeGantt`);function ne(e,n,r,i,a,s,c){e.sort((e,t)=>e.vert===t.vert?0:e.vert?1:-1);let u=e.filter(e=>!e.vert),d=[...new Set(u.map(e=>e.order))].map(e=>u.find(t=>t.order===e));F.append(`g`).selectAll(`rect`).data(d).enter().append(`rect`).attr(`x`,0).attr(`y`,function(e,t){return t=e.order,t*n+r-2}).attr(`width`,function(){return c-l.rightPadding/2}).attr(`height`,n).attr(`class`,function(e){for(let[t,n]of M.entries())if(e.type===n)return`section section`+t%l.numberSectionStyles;return`section section0`}).enter();let f=F.append(`g`).selectAll(`rect`).data(e).enter(),p=o.db.getLinks();if(f.append(`rect`).attr(`id`,function(e){return t+`-`+e.id}).attr(`rx`,3).attr(`ry`,3).attr(`x`,function(e){return e.milestone?I(e.startTime)+i+.5*(I(e.endTime)-I(e.startTime))-.5*a:I(e.startTime)+i}).attr(`y`,function(e,t){return t=e.order,e.vert?l.gridLineStartPadding:t*n+r}).attr(`width`,function(e){return e.milestone?a:e.vert?.08*a:I(e.renderEndTime||e.endTime)-I(e.startTime)}).attr(`height`,function(e){return e.vert?u.length*(l.barHeight+l.barGap)+l.barHeight*2:a}).attr(`transform-origin`,function(e,t){return t=e.order,(I(e.startTime)+i+.5*(I(e.endTime)-I(e.startTime))).toString()+`px `+(t*n+r+.5*a).toString()+`px`}).attr(`class`,function(e){let t=``;e.classes.length>0&&(t=e.classes.join(` `));let n=0;for(let[t,r]of M.entries())e.type===r&&(n=t%l.numberSectionStyles);let r=``;return e.active?e.crit?r+=` activeCrit`:r=` active`:e.done?r=e.crit?` doneCrit`:` done`:e.crit&&(r+=` crit`),r.length===0&&(r=` task`),e.milestone&&(r=` milestone `+r),e.vert&&(r=` vert `+r),r+=n,r+=` `+t,`task`+r}),f.append(`text`).attr(`id`,function(e){return t+`-`+e.id+`-text`}).text(function(e){return e.task}).attr(`font-size`,l.fontSize).attr(`x`,function(e){let t=I(e.startTime),n=I(e.renderEndTime||e.endTime);if(e.milestone&&(t+=.5*(I(e.endTime)-I(e.startTime))-.5*a,n=t+a),e.vert)return I(e.startTime)+i;let r=this.getBBox().width;return r>n-t?n+r+1.5*l.leftPadding>c?t+i-5:n+i+5:(n-t)/2+t+i}).attr(`y`,function(e,t){return e.vert?l.gridLineStartPadding+u.length*(l.barHeight+l.barGap)+60:(t=e.order,t*n+l.barHeight/2+(l.fontSize/2-2)+r)}).attr(`text-height`,a).attr(`class`,function(e){let t=I(e.startTime),n=I(e.endTime);e.milestone&&(n=t+a);let r=this.getBBox().width,i=``;e.classes.length>0&&(i=e.classes.join(` `));let o=0;for(let[t,n]of M.entries())e.type===n&&(o=t%l.numberSectionStyles);let s=``;return e.active&&(s=e.crit?`activeCritText`+o:`activeText`+o),e.done?s=e.crit?s+` doneCritText`+o:s+` doneText`+o:e.crit&&(s=s+` critText`+o),e.milestone&&(s+=` milestoneText`),e.vert&&(s+=` vertText`),r>n-t?n+r+1.5*l.leftPadding>c?i+` taskTextOutsideLeft taskTextOutside`+o+` `+s:i+` taskTextOutsideRight taskTextOutside`+o+` `+s+` width-`+r:i+` taskText taskText`+o+` `+s+` width-`+r}),D().securityLevel===`sandbox`){let e;e=m(`#i`+t);let n=e.nodes()[0].contentDocument;f.filter(function(e){return p.has(e.id)}).each(function(e){var r=n.querySelector(`#`+CSS.escape(t+`-`+e.id)),i=n.querySelector(`#`+CSS.escape(t+`-`+e.id+`-text`));let a=r.parentNode;var o=n.createElement(`a`);o.setAttribute(`xlink:href`,p.get(e.id)),o.setAttribute(`target`,`_top`),a.appendChild(o),o.appendChild(r),o.appendChild(i)})}}n(ne,`drawRects`);function re(e,n,r,i,a,s,c,u){if(c.length===0&&u.length===0)return;let d,f;for(let{startTime:e,endTime:t}of s)(d===void 0||e<d)&&(d=e),(f===void 0||t>f)&&(f=t);if(!d||!f)return;if((0,Q.default)(f).diff((0,Q.default)(d),`year`)>5){S.warn(`The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.`);return}let p=o.db.getDateFormat(),m=[],h=null,g=(0,Q.default)(d);for(;g.valueOf()<=f;)o.db.isInvalidDate(g,p,c,u)?h?h.end=g:h={start:g,end:g}:h&&=(m.push(h),null),g=g.add(1,`d`);F.append(`g`).selectAll(`rect`).data(m).enter().append(`rect`).attr(`id`,e=>t+`-exclude-`+e.start.format(`YYYY-MM-DD`)).attr(`x`,e=>I(e.start.startOf(`day`))+r).attr(`y`,l.gridLineStartPadding).attr(`width`,e=>I(e.end.endOf(`day`))-I(e.start.startOf(`day`))).attr(`height`,a-n-l.gridLineStartPadding).attr(`transform-origin`,function(t,n){return(I(t.start)+r+.5*(I(t.end)-I(t.start))).toString()+`px `+(n*e+.5*a).toString()+`px`}).attr(`class`,`exclude-range`)}n(re,`drawExcludeDays`);function L(e,t,n,r){if(n<=0||e>t)return 1/0;let i=t-e,a=Q.default.duration({[r??`day`]:n}).asMilliseconds();return a<=0?1/0:Math.ceil(i/a)}n(L,`getEstimatedTickCount`);function ie(e,t,n,r){let u=o.db.getDateFormat(),d=o.db.getAxisFormat(),f;f=d||(u===`D`?`%d`:l.axisFormat??`%Y-%m-%d`);let m=a(I).tickSize(-r+t+l.gridLineStartPadding).tickFormat(x(f)),h=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(o.db.getTickInterval()||l.tickInterval);if(h!==null){let e=parseInt(h[1],10);if(isNaN(e)||e<=0)S.warn(`Invalid tick interval value: "${h[1]}". Skipping custom tick interval.`);else{let t=h[2],n=o.db.getWeekday()||l.weekday,r=I.domain(),a=r[0],s=r[1],u=L(a,s,e,t);if(u>St)S.warn(`The tick interval "${e}${t}" would generate ${u} ticks, which exceeds the maximum allowed (${St}). This may indicate an invalid date or time range. Skipping custom tick interval.`);else switch(t){case`millisecond`:m.ticks(c.every(e));break;case`second`:m.ticks(T.every(e));break;case`minute`:m.ticks(g.every(e));break;case`hour`:m.ticks(i.every(e));break;case`day`:m.ticks(b.every(e));break;case`week`:m.ticks(bt[n].every(e));break;case`month`:m.ticks(p.every(e));break}}}if(F.append(`g`).attr(`class`,`grid`).attr(`transform`,`translate(`+e+`, `+(r-50)+`)`).call(m).selectAll(`text`).style(`text-anchor`,`middle`).attr(`fill`,`#000`).attr(`stroke`,`none`).attr(`font-size`,10).attr(`dy`,`1em`),o.db.topAxisEnabled()||l.topAxis){let n=s(I).tickSize(-r+t+l.gridLineStartPadding).tickFormat(x(f));if(h!==null){let e=parseInt(h[1],10);if(isNaN(e)||e<=0)S.warn(`Invalid tick interval value: "${h[1]}". Skipping custom tick interval.`);else{let t=h[2],r=o.db.getWeekday()||l.weekday,a=I.domain(),s=a[0],u=a[1];if(L(s,u,e,t)<=St)switch(t){case`millisecond`:n.ticks(c.every(e));break;case`second`:n.ticks(T.every(e));break;case`minute`:n.ticks(g.every(e));break;case`hour`:n.ticks(i.every(e));break;case`day`:n.ticks(b.every(e));break;case`week`:n.ticks(bt[r].every(e));break;case`month`:n.ticks(p.every(e));break}}}F.append(`g`).attr(`class`,`grid`).attr(`transform`,`translate(`+e+`, `+t+`)`).call(n).selectAll(`text`).style(`text-anchor`,`middle`).attr(`fill`,`#000`).attr(`stroke`,`none`).attr(`font-size`,10)}}n(ie,`makeGrid`);function R(e,t){let n=0,r=Object.keys(N).map(e=>[e,N[e]]);F.append(`g`).selectAll(`text`).data(r).enter().append(function(e){let t=e[0].split(j.lineBreakRegex),n=-(t.length-1)/2,r=C.createElementNS(`http://www.w3.org/2000/svg`,`text`);r.setAttribute(`dy`,n+`em`);for(let[e,n]of t.entries()){let t=C.createElementNS(`http://www.w3.org/2000/svg`,`tspan`);t.setAttribute(`alignment-baseline`,`central`),t.setAttribute(`x`,`10`),e>0&&t.setAttribute(`dy`,`1em`),t.textContent=n,r.appendChild(t)}return r}).attr(`x`,10).attr(`y`,function(i,a){if(a>0)for(let o=0;o<a;o++)return n+=r[a-1][1],i[1]*e/2+n*e+t;else return i[1]*e/2+t}).attr(`font-size`,l.sectionFontSize).attr(`class`,function(e){for(let[t,n]of M.entries())if(e[0]===n)return`sectionTitle sectionTitle`+t%l.numberSectionStyles;return`sectionTitle`})}n(R,`vertLabels`);function ae(e,t,n,r){let i=o.db.getTodayMarker();if(i===`off`)return;let a=F.append(`g`).attr(`class`,`today`),s=new Date,c=a.append(`line`);c.attr(`x1`,I(s)+e).attr(`x2`,I(s)+e).attr(`y1`,l.titleTopMargin).attr(`y2`,r-l.titleTopMargin).attr(`class`,`today`),i!==``&&c.attr(`style`,i.replace(/,/g,`;`))}n(ae,`drawToday`);function oe(e){let t={},n=[];for(let r=0,i=e.length;r<i;++r)Object.prototype.hasOwnProperty.call(t,e[r])||(t[e[r]]=!0,n.push(e[r]));return n}n(oe,`checkUnique`)},`draw`)},styles:n(e=>`
7
+ .mermaid-main-font {
8
+ font-family: ${e.fontFamily};
9
+ }
10
+
11
+ .exclude-range {
12
+ fill: ${e.excludeBkgColor};
13
+ }
14
+
15
+ .section {
16
+ stroke: none;
17
+ opacity: 0.2;
18
+ }
19
+
20
+ .section0 {
21
+ fill: ${e.sectionBkgColor};
22
+ }
23
+
24
+ .section2 {
25
+ fill: ${e.sectionBkgColor2};
26
+ }
27
+
28
+ .section1,
29
+ .section3 {
30
+ fill: ${e.altSectionBkgColor};
31
+ opacity: 0.2;
32
+ }
33
+
34
+ .sectionTitle0 {
35
+ fill: ${e.titleColor};
36
+ }
37
+
38
+ .sectionTitle1 {
39
+ fill: ${e.titleColor};
40
+ }
41
+
42
+ .sectionTitle2 {
43
+ fill: ${e.titleColor};
44
+ }
45
+
46
+ .sectionTitle3 {
47
+ fill: ${e.titleColor};
48
+ }
49
+
50
+ .sectionTitle {
51
+ text-anchor: start;
52
+ font-family: ${e.fontFamily};
53
+ }
54
+
55
+
56
+ /* Grid and axis */
57
+
58
+ .grid .tick {
59
+ stroke: ${e.gridColor};
60
+ opacity: 0.8;
61
+ shape-rendering: crispEdges;
62
+ }
63
+
64
+ .grid .tick text {
65
+ font-family: ${e.fontFamily};
66
+ fill: ${e.textColor};
67
+ }
68
+
69
+ .grid path {
70
+ stroke-width: 0;
71
+ }
72
+
73
+
74
+ /* Today line */
75
+
76
+ .today {
77
+ fill: none;
78
+ stroke: ${e.todayLineColor};
79
+ stroke-width: 2px;
80
+ }
81
+
82
+
83
+ /* Task styling */
84
+
85
+ /* Default task */
86
+
87
+ .task {
88
+ stroke-width: 2;
89
+ }
90
+
91
+ .taskText {
92
+ text-anchor: middle;
93
+ font-family: ${e.fontFamily};
94
+ }
95
+
96
+ .taskTextOutsideRight {
97
+ fill: ${e.taskTextDarkColor};
98
+ text-anchor: start;
99
+ font-family: ${e.fontFamily};
100
+ }
101
+
102
+ .taskTextOutsideLeft {
103
+ fill: ${e.taskTextDarkColor};
104
+ text-anchor: end;
105
+ }
106
+
107
+
108
+ /* Special case clickable */
109
+
110
+ .task.clickable {
111
+ cursor: pointer;
112
+ }
113
+
114
+ .taskText.clickable {
115
+ cursor: pointer;
116
+ fill: ${e.taskTextClickableColor} !important;
117
+ font-weight: bold;
118
+ }
119
+
120
+ .taskTextOutsideLeft.clickable {
121
+ cursor: pointer;
122
+ fill: ${e.taskTextClickableColor} !important;
123
+ font-weight: bold;
124
+ }
125
+
126
+ .taskTextOutsideRight.clickable {
127
+ cursor: pointer;
128
+ fill: ${e.taskTextClickableColor} !important;
129
+ font-weight: bold;
130
+ }
131
+
132
+
133
+ /* Specific task settings for the sections*/
134
+
135
+ .taskText0,
136
+ .taskText1,
137
+ .taskText2,
138
+ .taskText3 {
139
+ fill: ${e.taskTextColor};
140
+ }
141
+
142
+ .task0,
143
+ .task1,
144
+ .task2,
145
+ .task3 {
146
+ fill: ${e.taskBkgColor};
147
+ stroke: ${e.taskBorderColor};
148
+ }
149
+
150
+ .taskTextOutside0,
151
+ .taskTextOutside2
152
+ {
153
+ fill: ${e.taskTextOutsideColor};
154
+ }
155
+
156
+ .taskTextOutside1,
157
+ .taskTextOutside3 {
158
+ fill: ${e.taskTextOutsideColor};
159
+ }
160
+
161
+
162
+ /* Active task */
163
+
164
+ .active0,
165
+ .active1,
166
+ .active2,
167
+ .active3 {
168
+ fill: ${e.activeTaskBkgColor};
169
+ stroke: ${e.activeTaskBorderColor};
170
+ }
171
+
172
+ .activeText0,
173
+ .activeText1,
174
+ .activeText2,
175
+ .activeText3 {
176
+ fill: ${e.taskTextDarkColor} !important;
177
+ }
178
+
179
+
180
+ /* Completed task */
181
+
182
+ .done0,
183
+ .done1,
184
+ .done2,
185
+ .done3 {
186
+ stroke: ${e.doneTaskBorderColor};
187
+ fill: ${e.doneTaskBkgColor};
188
+ stroke-width: 2;
189
+ }
190
+
191
+ .doneText0,
192
+ .doneText1,
193
+ .doneText2,
194
+ .doneText3 {
195
+ fill: ${e.taskTextDarkColor} !important;
196
+ }
197
+
198
+ /* Done task text displayed outside the bar sits against the diagram background,
199
+ not against the done-task bar, so it must use the outside/contrast color. */
200
+ .doneText0.taskTextOutsideLeft,
201
+ .doneText0.taskTextOutsideRight,
202
+ .doneText1.taskTextOutsideLeft,
203
+ .doneText1.taskTextOutsideRight,
204
+ .doneText2.taskTextOutsideLeft,
205
+ .doneText2.taskTextOutsideRight,
206
+ .doneText3.taskTextOutsideLeft,
207
+ .doneText3.taskTextOutsideRight {
208
+ fill: ${e.taskTextOutsideColor} !important;
209
+ }
210
+
211
+
212
+ /* Tasks on the critical line */
213
+
214
+ .crit0,
215
+ .crit1,
216
+ .crit2,
217
+ .crit3 {
218
+ stroke: ${e.critBorderColor};
219
+ fill: ${e.critBkgColor};
220
+ stroke-width: 2;
221
+ }
222
+
223
+ .activeCrit0,
224
+ .activeCrit1,
225
+ .activeCrit2,
226
+ .activeCrit3 {
227
+ stroke: ${e.critBorderColor};
228
+ fill: ${e.activeTaskBkgColor};
229
+ stroke-width: 2;
230
+ }
231
+
232
+ .doneCrit0,
233
+ .doneCrit1,
234
+ .doneCrit2,
235
+ .doneCrit3 {
236
+ stroke: ${e.critBorderColor};
237
+ fill: ${e.doneTaskBkgColor};
238
+ stroke-width: 2;
239
+ cursor: pointer;
240
+ shape-rendering: crispEdges;
241
+ }
242
+
243
+ .milestone {
244
+ transform: rotate(45deg) scale(0.8,0.8);
245
+ }
246
+
247
+ .milestoneText {
248
+ font-style: italic;
249
+ }
250
+ .doneCritText0,
251
+ .doneCritText1,
252
+ .doneCritText2,
253
+ .doneCritText3 {
254
+ fill: ${e.taskTextDarkColor} !important;
255
+ }
256
+
257
+ /* Done-crit task text outside the bar \u2014 same reasoning as doneText above. */
258
+ .doneCritText0.taskTextOutsideLeft,
259
+ .doneCritText0.taskTextOutsideRight,
260
+ .doneCritText1.taskTextOutsideLeft,
261
+ .doneCritText1.taskTextOutsideRight,
262
+ .doneCritText2.taskTextOutsideLeft,
263
+ .doneCritText2.taskTextOutsideRight,
264
+ .doneCritText3.taskTextOutsideLeft,
265
+ .doneCritText3.taskTextOutsideRight {
266
+ fill: ${e.taskTextOutsideColor} !important;
267
+ }
268
+
269
+ .vert {
270
+ stroke: ${e.vertLineColor};
271
+ }
272
+
273
+ .vertText {
274
+ font-size: 15px;
275
+ text-anchor: middle;
276
+ fill: ${e.vertLineColor} !important;
277
+ }
278
+
279
+ .activeCritText0,
280
+ .activeCritText1,
281
+ .activeCritText2,
282
+ .activeCritText3 {
283
+ fill: ${e.taskTextDarkColor} !important;
284
+ }
285
+
286
+ .titleText {
287
+ text-anchor: middle;
288
+ font-size: 18px;
289
+ fill: ${e.titleColor||e.textColor};
290
+ font-family: ${e.fontFamily};
291
+ }
292
+ `,`getStyles`)};export{Ct as diagram};
@@ -0,0 +1 @@
1
+ import"./chunk-ZS6VBONO-DBjJO0w9.js";import{n as e}from"./chunk-ZUNWM646-DNRJyNPe.js";export{e as createGitGraphServices};
@@ -0,0 +1,106 @@
1
+ import{t as e}from"./chunk-AQ6EADP3-CZhslHi-.js";import{V as t,q as n}from"./chunk-H7VHZCWX-CE1nAmt6.js";import{B as r,F as i,Q as a,R as o,V as s,X as c,Y as l,h as u,l as d,q as f,v as p,z as m}from"./chunk-QJSWEUOL-D_rf9gPD.js";import"./chunk-STOV2HOB-GnExfzIX.js";import{a as h,o as g,s as _}from"./chunk-VY2OSTJR-Dkgc3Brg.js";import{t as v}from"./chunk-JQRUD6KW-Dbva2Z17.js";import"./chunk-ZS6VBONO-DBjJO0w9.js";import{t as y}from"./chunk-5IQCK5RY-CCMhl4so.js";import"./chunk-JZGDI5JK-BeTMSSkJ.js";import"./chunk-OJINMHTS-zOCQe4eI.js";import"./chunk-VQC2EELJ-Dc8fIy4R.js";import"./chunk-KD6SPIPN-Qp1Pflah.js";import"./chunk-Q6NGPIAH-yyBomb63.js";import"./chunk-RT4MAWR3-zXy9-Lvt.js";import"./chunk-YBMQ5JGJ-BSnyWZmd.js";import"./chunk-GDY2UAB4-CtQQR0a8.js";import"./chunk-3SMGFRGC-CAu4JRLv.js";import"./chunk-3NPNU5GP-DocZ07Sg.js";import"./chunk-TCEHX7R3-CXPDEVbm.js";import"./chunk-5MVFYWFU-Db9KvrYO.js";import"./chunk-SFMINX4W-J2UrvMpD.js";import"./chunk-JFFVMJIA-0fJenqia.js";import"./chunk-ZUNWM646-DNRJyNPe.js";import{t as b}from"./chunk-T5OCTHI4-DdZvN-9i.js";var x={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},ee=p.gitGraph,S=e(()=>h({...ee,...d().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 _({length:7})}e(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},[])}e(T,`uniqBy`);var te=e(function(e){C.records.direction=e},`setDirection`),ne=e(function(e){n.debug(`options str`,e),e=e?.trim(),e||=`{}`;try{C.records.options=JSON.parse(e)}catch(e){n.error(`error while parsing gitGraph options`,e.message)}},`setOptions`),re=e(function(){return C.records.options},`getOptions`),ie=e(function(e){let t=e.msg,r=e.id,i=e.type,a=e.tags;n.info(`commit`,t,r,i,a),n.debug(`Entering commit:`,t,r,i,a);let s=S();r=o.sanitizeText(r,s),t=o.sanitizeText(t,s),a=a?.map(e=>o.sanitizeText(e,s));let c={id:r||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=c,n.info(`main branch`,s.mainBranchName),C.records.commits.has(c.id)&&n.warn(`Commit ID ${c.id} already exists`),C.records.commits.set(c.id,c),C.records.branches.set(C.records.currBranch,c.id),n.debug(`in pushCommit `+c.id)},`commit`),ae=e(function(e){let t=e.name,r=e.order;if(t=o.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:r}),E(t),n.debug(`in createBranch`)},`branch`),oe=e(e=>{let t=e.branch,r=e.id,i=e.type,a=e.tags,s=S();t=o.sanitizeText(t,s),r&&=o.sanitizeText(r,s);let c=C.records.branches.get(C.records.currBranch),l=C.records.branches.get(t),u=c?C.records.commits.get(c):void 0,d=l?C.records.commits.get(l):void 0;if(u&&d&&u.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(u===void 0||!u){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(d===void 0||!d){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(u===d){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(r&&C.records.commits.has(r)){let e=Error(`Incorrect usage of "merge". Commit with id:`+r+` already exists, use different custom id`);throw e.hash={text:`merge ${t} ${r} ${i} ${a?.join(` `)}`,token:`merge ${t} ${r} ${i} ${a?.join(` `)}`,expected:[`merge ${t} ${r}_UNIQUE ${i} ${a?.join(` `)}`]},e}let f=l||``,p={id:r||`${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:!!r,tags:a??[]};C.records.head=p,C.records.commits.set(p.id,p),C.records.branches.set(C.records.currBranch,p.id),n.debug(C.records.branches),n.debug(`in mergeBranch`)},`merge`),se=e(function(e){let t=e.id,r=e.targetId,i=e.tags,a=e.parent;n.debug(`Entering cherryPick:`,t,r,i);let s=S();if(t=o.sanitizeText(t,s),r=o.sanitizeText(r,s),i=i?.map(e=>o.sanitizeText(e,s)),a=o.sanitizeText(a,s),!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} ${r}`,token:`cherryPick ${t} ${r}`,expected:[`cherry-pick abc`]},e}let c=C.records.commits.get(t);if(c===void 0||!c)throw Error(`Incorrect usage of "cherryPick". Source commit id should exist and provided`);if(a&&!(Array.isArray(c.parents)&&c.parents.includes(a)))throw Error(`Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.`);let l=c.branch;if(c.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(!r||!C.records.commits.has(r)){if(l===C.records.currBranch){let e=Error(`Incorrect usage of "cherryPick". Source commit is already on current branch`);throw e.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,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} ${r}`,token:`cherryPick ${t} ${r}`,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} ${r}`,token:`cherryPick ${t} ${r}`,expected:[`cherry-pick abc`]},e}let s={id:C.records.seq+`-`+w(),message:`cherry-picked ${c?.message} into ${C.records.currBranch}`,seq:C.records.seq++,parents:C.records.head==null?[]:[C.records.head.id,c.id],branch:C.records.currBranch,type:x.CHERRY_PICK,tags:i?i.filter(Boolean):[`cherry-pick:${c.id}${c.type===x.MERGE?`|parent:${a}`:``}`]};C.records.head=s,C.records.commits.set(s.id,s),C.records.branches.set(C.records.currBranch,s.id),n.debug(C.records.branches),n.debug(`in cherryPick`)}},`cherryPick`),E=e(function(e){if(e=o.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)}e(D,`upsert`);function O(e){let t=e.reduce((e,t)=>e.seq>t.seq?e:t,e[0]),r=``;e.forEach(function(e){e===t?r+=` *`:r+=` |`});let i=[r,t.id,t.seq];for(let e in C.records.branches)C.records.branches.get(e)===t.id&&i.push(e);if(n.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;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)}e(O,`prettyPrintCommitHistory`);var ce=e(function(){n.debug(C.records.commits);let e=k()[0];O([e])},`prettyPrint`),le=e(function(){C.reset(),u()},`clear`),ue=e(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=e(function(){return C.records.branches},`getBranches`),fe=e(function(){return C.records.commits},`getCommits`),k=e(function(){let e=[...C.records.commits.values()];return e.forEach(function(e){n.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:e(function(){return C.records.currBranch},`getCurrentBranch`),getDirection:e(function(){return C.records.direction},`getDirection`),getHead:e(function(){return C.records.head},`getHead`),setAccTitle:a,getAccTitle:s,getAccDescription:f,setAccDescription:l,setDiagramTitle:i,getDiagramTitle:c},pe=e((e,t)=>{v(e,t),e.dir&&t.setDirection(e.dir);for(let n of e.statements)me(n,t)},`populate`),me=e((t,r)=>{let i={Commit:e(e=>r.commit(he(e)),`Commit`),Branch:e(e=>r.branch(ge(e)),`Branch`),Merge:e(e=>r.merge(_e(e)),`Merge`),Checkout:e(e=>r.checkout(ve(e)),`Checkout`),CherryPicking:e(e=>r.cherryPick(ye(e)),`CherryPicking`)}[t.$type];i?i(t):n.error(`Unknown statement type: ${t.$type}`)},`parseStatement`),he=e(e=>({id:e.id,msg:e.message??``,type:e.type===void 0?x.NORMAL:x[e.type],tags:e.tags??void 0}),`parseCommit`),ge=e(e=>({name:e.name,order:e.order??0}),`parseBranch`),_e=e(e=>({branch:e.branch,id:e.id??``,type:e.type===void 0?void 0:x[e.type],tags:e.tags??void 0}),`parseMerge`),ve=e(e=>e.branch,`parseCheckout`),ye=e(e=>({id:e.id,targetId:``,tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),`parseCherryPicking`),be={parse:e(async e=>{let t=await y(`gitGraph`,e);n.debug(t),pe(t,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=e((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=e(()=>{B.clear(),V.clear(),U.clear(),G=0,W=[],K=`LR`},`clear`),q=e(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=e(t=>{let n,r,i;return K===`BT`?(r=e((e,t)=>e<=t,`comparisonFunc`),i=1/0):(r=e((e,t)=>e>=t,`comparisonFunc`),i=0),t.forEach(e=>{let t=K===`TB`||K==`BT`?V.get(e)?.y:V.get(e)?.x;t!==void 0&&r(t,i)&&(n=e,i=t)}),n},`findClosestParent`),Ce=e(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=e((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=e(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=e(e=>Te(e)+M,`calculateCommitPosition`),De=e((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=e((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=e((e,t,n,i,a,o)=>{let{theme:s}=r(),c=I.has(s??``),l=R.has(s??``),u=xe.has(s??``);if(o===x.HIGHLIGHT)e.append(`rect`).attr(`x`,n.x-10+(c?3:0)).attr(`y`,n.y-10+(c?3:0)).attr(`width`,c?14:20).attr(`height`,c?14:20).attr(`class`,`commit ${t.id} commit-highlight${z(a,F,l)} ${i}-outer`),e.append(`rect`).attr(`x`,n.x-6+(c?2:0)).attr(`y`,n.y-6+(c?2:0)).attr(`width`,c?8:12).attr(`height`,c?8:12).attr(`class`,`commit ${t.id} commit${z(a,F,l)} ${i}-inner`);else if(o===x.CHERRY_PICK)e.append(`circle`).attr(`cx`,n.x).attr(`cy`,n.y).attr(`r`,c?7:10).attr(`class`,`commit ${t.id} ${i}`),e.append(`circle`).attr(`cx`,n.x-3).attr(`cy`,n.y+2).attr(`r`,c?2.5:2.75).attr(`fill`,u?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${i}`),e.append(`circle`).attr(`cx`,n.x+3).attr(`cy`,n.y+2).attr(`r`,c?2.5:2.75).attr(`fill`,u?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${i}`),e.append(`line`).attr(`x1`,n.x+3).attr(`y1`,n.y+1).attr(`x2`,n.x).attr(`y2`,n.y-5).attr(`stroke`,u?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${i}`),e.append(`line`).attr(`x1`,n.x-3).attr(`y1`,n.y+1).attr(`x2`,n.x).attr(`y2`,n.y-5).attr(`stroke`,u?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${i}`);else{let r=e.append(`circle`);if(r.attr(`cx`,n.x),r.attr(`cy`,n.y),r.attr(`r`,c?7:10),r.attr(`class`,`commit ${t.id} commit${z(a,F,l)}`),o===x.MERGE){let r=e.append(`circle`);r.attr(`cx`,n.x),r.attr(`cy`,n.y),r.attr(`r`,c?5:6),r.attr(`class`,`commit ${i} ${t.id} commit${z(a,F,l)}`)}if(o===x.REVERSE){let r=e.append(`path`),o=c?4:5;r.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 ${i} ${t.id} commit${z(a,F,l)}`)}}},`drawCommitBullet`),Ae=e((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=e((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
+ ${r-a/2-N/2},${l+P}
3
+ ${r-a/2-N/2},${l-P}
4
+ ${n.posWithOffset-a/2-N},${l-s-P}
5
+ ${n.posWithOffset+a/2+N},${l-s-P}
6
+ ${n.posWithOffset+a/2+N},${l+s+P}
7
+ ${n.posWithOffset-a/2-N},${l+s+P}`),t.attr(`cy`,l).attr(`cx`,r-a/2+N/2).attr(`r`,1.5).attr(`class`,`tag-hole`),K===`TB`||K===`BT`){let o=r+c;i.attr(`class`,`tag-label-bkg`).attr(`points`,`
8
+ ${n.x},${o+2}
9
+ ${n.x},${o-2}
10
+ ${n.x+j},${o-s-2}
11
+ ${n.x+j+a+4},${o-s-2}
12
+ ${n.x+j+a+4},${o+s+2}
13
+ ${n.x+j},${o+s+2}`).attr(`transform`,`translate(12,12) rotate(45, `+n.x+`,`+r+`)`),t.attr(`cx`,n.x+N/2).attr(`cy`,o).attr(`transform`,`translate(12,12) rotate(45, `+n.x+`,`+r+`)`),e.attr(`x`,n.x+5).attr(`y`,o+3).attr(`transform`,`translate(14,14) rotate(45, `+n.x+`,`+r+`)`)}}}},`drawCommitTags`),Me=e(e=>{switch(e.customType??e.type){case x.NORMAL:return`commit-normal`;case x.REVERSE:return`commit-reverse`;case x.HIGHLIGHT:return`commit-highlight`;case x.MERGE:return`commit-merge`;case x.CHERRY_PICK:return`commit-cherry-pick`;default:return`commit-normal`}},`getCommitClassType`),Ne=e((e,t,n,r)=>{let i={x:0,y:0};if(e.parents.length>0){let n=J(e.parents);if(n){let a=r.get(n)??i;return t===`TB`?a.y+M:t===`BT`?(r.get(e.id)??i).y-M:a.x+M}}else return t===`TB`?H:t===`BT`?(r.get(e.id)??i).y-M:0;return 0},`calculatePosition`),Pe=e((e,t,n)=>{let i=K===`BT`&&n?t:t+j,a=B.get(e.branch)?.pos,o=K===`TB`||K===`BT`?B.get(e.branch)?.pos:i;if(o===void 0||a===void 0)throw Error(`Position were undefined for commit ${e.id}`);let s=I.has(r().theme??``);return{x:o,y:K===`TB`||K===`BT`?i:a+(s?L/2+1:-2),posWithOffset:i}},`getCommitPosition`),Y=e((t,n,r,i)=>{let a=t.append(`g`).attr(`class`,`commit-bullets`),o=t.append(`g`).attr(`class`,`commit-labels`),s=K===`TB`||K===`BT`?H:0,c=[...n.keys()],l=i.parallelCommits??!1,u=e((e,t)=>{let r=n.get(e)?.seq,i=n.get(t)?.seq;return r!==void 0&&i!==void 0?r-i:0},`sortKeys`),d=c.sort(u);K===`BT`&&(l&&we(d,n,s),d=d.reverse()),d.forEach(e=>{let t=n.get(e);if(!t)throw Error(`Commit not found for key ${e}`);l&&(s=Ne(t,K,s,V));let c=Pe(t,s,l);if(r){let e=Me(t),n=t.customType??t.type,r=B.get(t.branch)?.index??0;ke(a,t,c,e,r,n),Ae(o,t,c,s,i),je(o,t,c,s)}K===`TB`||K===`BT`?V.set(t.id,{x:c.x,y:c.posWithOffset}):V.set(t.id,{x:c.posWithOffset,y:c.y}),s=K===`BT`&&l?s+M:s+M+j,s>G&&(G=s)})},`drawCommits`),Fe=e((t,n,r,i,a)=>{let o=(K===`TB`||K===`BT`?r.x<i.x:r.y<i.y)?n.branch:t.branch,s=e(e=>e.branch===o,`isOnBranchToGetCurve`),c=e(e=>e.seq>t.seq&&e.seq<n.seq,`isBetweenCommits`);return[...a.values()].some(e=>c(e)&&s(e))},`shouldRerouteArrow`),X=e((e,t,n=0)=>{let r=e+Math.abs(e-t)/2;return n>5?r:W.every(e=>Math.abs(e-r)>=10)?(W.push(r),r):X(e,t-Math.abs(e-t)/5,n+1)},`findLane`),Ie=e((e,t,n,i)=>{let{theme:a}=r(),o=R.has(a??``),s=V.get(t.id),c=V.get(n.id);if(s===void 0||c===void 0)throw Error(`Commit positions not found for commits ${t.id} and ${n.id}`);let l=Fe(t,n,s,c,i),u=``,d=``,f=0,p=0,m=B.get(n.branch)?.index;n.type===x.MERGE&&t.id!==n.parents[0]&&(m=B.get(t.branch)?.index);let h;if(l){u=`A 10 10, 0, 0, 0,`,d=`A 10 10, 0, 0, 1,`,f=10,p=10;let e=s.y<c.y?X(s.y,c.y):X(c.y,s.y),n=s.x<c.x?X(s.x,c.x):X(c.x,s.x);K===`TB`?s.x<c.x?h=`M ${s.x} ${s.y} L ${n-f} ${s.y} ${d} ${n} ${s.y+p} L ${n} ${c.y-f} ${u} ${n+p} ${c.y} L ${c.x} ${c.y}`:(m=B.get(t.branch)?.index,h=`M ${s.x} ${s.y} L ${n+f} ${s.y} ${u} ${n} ${s.y+p} L ${n} ${c.y-f} ${d} ${n-p} ${c.y} L ${c.x} ${c.y}`):K===`BT`?s.x<c.x?h=`M ${s.x} ${s.y} L ${n-f} ${s.y} ${u} ${n} ${s.y-p} L ${n} ${c.y+f} ${d} ${n+p} ${c.y} L ${c.x} ${c.y}`:(m=B.get(t.branch)?.index,h=`M ${s.x} ${s.y} L ${n+f} ${s.y} ${d} ${n} ${s.y-p} L ${n} ${c.y+f} ${u} ${n-p} ${c.y} L ${c.x} ${c.y}`):s.y<c.y?h=`M ${s.x} ${s.y} L ${s.x} ${e-f} ${u} ${s.x+p} ${e} L ${c.x-f} ${e} ${d} ${c.x} ${e+p} L ${c.x} ${c.y}`:(m=B.get(t.branch)?.index,h=`M ${s.x} ${s.y} L ${s.x} ${e+f} ${d} ${s.x+p} ${e} L ${c.x-f} ${e} ${u} ${c.x} ${e-p} L ${c.x} ${c.y}`)}else u=`A 20 20, 0, 0, 0,`,d=`A 20 20, 0, 0, 1,`,f=20,p=20,K===`TB`?(s.x<c.x&&(h=n.type===x.MERGE&&t.id!==n.parents[0]?`M ${s.x} ${s.y} L ${s.x} ${c.y-f} ${u} ${s.x+p} ${c.y} L ${c.x} ${c.y}`:`M ${s.x} ${s.y} L ${c.x-f} ${s.y} ${d} ${c.x} ${s.y+p} L ${c.x} ${c.y}`),s.x>c.x&&(u=`A 20 20, 0, 0, 0,`,d=`A 20 20, 0, 0, 1,`,f=20,p=20,h=n.type===x.MERGE&&t.id!==n.parents[0]?`M ${s.x} ${s.y} L ${s.x} ${c.y-f} ${d} ${s.x-p} ${c.y} L ${c.x} ${c.y}`:`M ${s.x} ${s.y} L ${c.x+f} ${s.y} ${u} ${c.x} ${s.y+p} L ${c.x} ${c.y}`),s.x===c.x&&(h=`M ${s.x} ${s.y} L ${c.x} ${c.y}`)):K===`BT`?(s.x<c.x&&(h=n.type===x.MERGE&&t.id!==n.parents[0]?`M ${s.x} ${s.y} L ${s.x} ${c.y+f} ${d} ${s.x+p} ${c.y} L ${c.x} ${c.y}`:`M ${s.x} ${s.y} L ${c.x-f} ${s.y} ${u} ${c.x} ${s.y-p} L ${c.x} ${c.y}`),s.x>c.x&&(u=`A 20 20, 0, 0, 0,`,d=`A 20 20, 0, 0, 1,`,f=20,p=20,h=n.type===x.MERGE&&t.id!==n.parents[0]?`M ${s.x} ${s.y} L ${s.x} ${c.y+f} ${u} ${s.x-p} ${c.y} L ${c.x} ${c.y}`:`M ${s.x} ${s.y} L ${c.x+f} ${s.y} ${d} ${c.x} ${s.y-p} L ${c.x} ${c.y}`),s.x===c.x&&(h=`M ${s.x} ${s.y} L ${c.x} ${c.y}`)):(s.y<c.y&&(h=n.type===x.MERGE&&t.id!==n.parents[0]?`M ${s.x} ${s.y} L ${c.x-f} ${s.y} ${d} ${c.x} ${s.y+p} L ${c.x} ${c.y}`:`M ${s.x} ${s.y} L ${s.x} ${c.y-f} ${u} ${s.x+p} ${c.y} L ${c.x} ${c.y}`),s.y>c.y&&(h=n.type===x.MERGE&&t.id!==n.parents[0]?`M ${s.x} ${s.y} L ${c.x-f} ${s.y} ${u} ${c.x} ${s.y-p} L ${c.x} ${c.y}`:`M ${s.x} ${s.y} L ${s.x} ${c.y+f} ${d} ${s.x+p} ${c.y} L ${c.x} ${c.y}`),s.y===c.y&&(h=`M ${s.x} ${s.y} L ${c.x} ${c.y}`));if(h===void 0)throw Error(`Line definition not found`);e.append(`path`).attr(`d`,h).attr(`class`,`arrow arrow`+z(m,F,o))},`drawArrow`),Le=e((e,t)=>{let n=e.append(`g`).attr(`class`,`commit-arrows`);[...t.keys()].forEach(e=>{let r=t.get(e);r.parents&&r.parents.length>0&&r.parents.forEach(e=>{Ie(n,t.get(e),r,t)})})},`drawArrows`),Re=e((e,t,n,i)=>{let{look:a,theme:o,themeVariables:s}=r(),{dropShadow:c,THEME_COLOR_LIMIT:l}=s,u=I.has(o??``),d=R.has(o??``),f=e.append(`g`);t.forEach((e,t)=>{let r=z(t,u?l:F,d),o=B.get(e.name)?.pos;if(o===void 0)throw Error(`Position not found for branch ${e.name}`);let s=K===`TB`||K===`BT`?o:u?o+L/2+1:o-2,p=f.append(`line`);p.attr(`x1`,0),p.attr(`y1`,s),p.attr(`x2`,G),p.attr(`y2`,s),p.attr(`class`,`branch branch`+r),K===`TB`?(p.attr(`y1`,H),p.attr(`x1`,o),p.attr(`y2`,G),p.attr(`x2`,o)):K===`BT`&&(p.attr(`y1`,G),p.attr(`x1`,o),p.attr(`y2`,H),p.attr(`x2`,o)),W.push(s);let m=e.name,h=q(m),g=f.insert(`rect`),_=f.insert(`g`).attr(`class`,`branchLabel`).insert(`g`).attr(`class`,`label branch-label`+r);_.node().appendChild(h);let v=h.getBBox(),y=u?0:4,b=u?16:0,x=u?L:0;a===`neo`&&g.attr(`data-look`,`neo`),g.attr(`class`,`branchLabelBkg label`+r).attr(`style`,a===`neo`?`filter:${u?`url(#${i}-drop-shadow)`:c}`:``).attr(`rx`,y).attr(`ry`,y).attr(`x`,-v.width-4-(n.rotateCommitLabel===!0?30:0)).attr(`y`,-v.height/2+10).attr(`width`,v.width+18+b).attr(`height`,v.height+4+x),_.attr(`transform`,`translate(`+(-v.width-14-(n.rotateCommitLabel===!0?30:0)+b/2)+`, `+(s-v.height/2-2)+`)`),K===`TB`?(g.attr(`x`,o-v.width/2-10).attr(`y`,0),_.attr(`transform`,`translate(`+(o-v.width/2-5)+`, 0)`),u&&(g.attr(`transform`,`translate(${-b/2-3}, ${-x-10})`),_.attr(`transform`,`translate(`+(o-v.width/2-5)+`, `+(-x*2+7)+`)`))):K===`BT`?(g.attr(`x`,o-v.width/2-10).attr(`y`,G),_.attr(`transform`,`translate(`+(o-v.width/2-5)+`, `+G+`)`),u&&(g.attr(`transform`,`translate(${-b/2-3}, ${x+10})`),_.attr(`transform`,`translate(`+(o-v.width/2-5)+`, `+(G+x*2+4)+`)`))):g.attr(`transform`,`translate(-19, `+(s-12-x/2)+`)`)})},`drawBranches`),ze=e(function(e,t,n,r,i){return B.set(e,{pos:t,index:n}),t+=50+(i?40:0)+(K===`TB`||K===`BT`?r.width/2:0),t},`setBranchPosition`),Be={draw:e(function(e,i,a,o){Se(),n.debug(`in gitgraph renderer`,e+`
14
+ `,`id:`,i,a);let s=o.db;if(!s.getConfig){n.error(`getConfig method is not available on db`);return}let c=s.getConfig(),l=c.rotateCommitLabel??!1;U=s.getCommits();let u=s.getBranchesAsObjArray();K=s.getDirection();let d=t(`[id="${i}"]`),{look:f,theme:p,themeVariables:h}=r(),{useGradient:_,gradientStart:v,gradientStop:y,filterColor:b}=h;if(_){let e=d.append(`defs`).append(`linearGradient`).attr(`id`,i+`-gradient`).attr(`gradientUnits`,`objectBoundingBox`).attr(`x1`,`0%`).attr(`y1`,`0%`).attr(`x2`,`100%`).attr(`y2`,`0%`);e.append(`stop`).attr(`offset`,`0%`).attr(`stop-color`,v).attr(`stop-opacity`,1),e.append(`stop`).attr(`offset`,`100%`).attr(`stop-color`,y).attr(`stop-opacity`,1)}f===`neo`&&I.has(p??``)&&d.append(`defs`).append(`filter`).attr(`id`,i+`-drop-shadow`).attr(`height`,`130%`).attr(`width`,`130%`).append(`feDropShadow`).attr(`dx`,`4`).attr(`dy`,`4`).attr(`stdDeviation`,0).attr(`flood-opacity`,`0.06`).attr(`flood-color`,b);let x=0;u.forEach((e,t)=>{let n=q(e.name),r=d.append(`g`),i=r.insert(`g`).attr(`class`,`branchLabel`),a=i.insert(`g`).attr(`class`,`label branch-label`);a.node()?.appendChild(n);let o=n.getBBox();x=ze(e.name,x,t,o,l),a.remove(),i.remove(),r.remove()}),Y(d,U,!1,c),c.showBranches&&Re(d,u,c,i),Le(d,U),Y(d,U,!0,c),g.insertTitle(d,`gitTitleText`,c.titleTopMargin??0,s.getDiagramTitle()),m(void 0,d,c.diagramPadding,c.useMaxWidth)},`draw`)},Z=8,Q=new Set([`redux`,`redux-dark`,`redux-color`,`redux-dark-color`]),Ve=new Set([`redux-color`,`redux-dark-color`]),$=new Set([`neo`,`neo-dark`]),He=new Set([`dark`,`redux-dark`,`redux-dark-color`,`neo-dark`]),Ue=new Set([`redux`,`redux-dark`,`redux-color`,`redux-dark-color`,`neo`,`neo-dark`]),We=e(e=>{let{svgId:t}=e,n=``;if(e.useGradient&&t)for(let r=0;r<e.THEME_COLOR_LIMIT;r++)n+=`
15
+ .label${r} { fill: ${e.mainBkg}; stroke: url(${t}-gradient); stroke-width: ${e.strokeWidth};}
16
+ `;return n},`genGitGraphGradient`),Ge=e(e=>{let{theme:t,themeVariables:n}=d(),{borderColorArray:r}=n,i=Q.has(t);if($.has(t)){let t=``;for(let n=0;n<e.THEME_COLOR_LIMIT;n++)if(n===0)t+=`
17
+ .branch-label${n} { fill: ${e.nodeBorder};}
18
+ .commit${n} { stroke: ${e.nodeBorder}; }
19
+ .commit-highlight${n} { stroke: ${e.nodeBorder}; fill: ${e.nodeBorder}; }
20
+ .arrow${n} { stroke: ${e.nodeBorder}; }
21
+ .commit-bullets { fill: ${e.nodeBorder}; }
22
+ .commit-cherry-pick${n} { stroke: ${e.nodeBorder}; }
23
+ ${We(e)}`;else{let r=n%Z;t+=`
24
+ .branch-label${n} { fill: ${e[`gitBranchLabel`+r]}; }
25
+ .commit${n} { stroke: ${e[`git`+r]}; fill: ${e[`git`+r]}; }
26
+ .commit-highlight${n} { stroke: ${e[`gitInv`+r]}; fill: ${e[`gitInv`+r]}; }
27
+ .arrow${n} { stroke: ${e[`git`+r]}; }
28
+ `}return t}else if(Ve.has(t)){let n=``;for(let a=0;a<e.THEME_COLOR_LIMIT;a++)if(a===0)n+=`
29
+ .branch-label${a} { fill: ${e.nodeBorder}; ${i?`font-weight:${e.noteFontWeight}`:``} }
30
+ .commit${a} { stroke: ${e.nodeBorder}; }
31
+ .commit-highlight${a} { stroke: ${e.nodeBorder}; fill: ${e.mainBkg}; }
32
+ .label${a} { fill: ${e.mainBkg}; stroke: ${e.nodeBorder}; stroke-width: ${e.strokeWidth}; ${i?`font-weight:${e.noteFontWeight}`:``} }
33
+ .arrow${a} { stroke: ${e.nodeBorder}; }
34
+ .commit-bullets { fill: ${e.nodeBorder}; }
35
+ `;else{let o=a%r.length;n+=`
36
+ .branch-label${a} { fill: ${e.nodeBorder}; ${i?`font-weight:${e.noteFontWeight}`:``} }
37
+ .commit${a} { stroke: ${r[o]}; fill: ${r[o]}; }
38
+ .commit-highlight${a} { stroke: ${r[o]}; fill: ${r[o]}; }
39
+ .label${a} { fill: ${He.has(t)?e.mainBkg:r[o]}; stroke: ${r[o]}; stroke-width: ${e.strokeWidth}; }
40
+ .arrow${a} { stroke: ${r[o]}; }
41
+ `}return n}else{let t=``;for(let n=0;n<e.THEME_COLOR_LIMIT;n++)t+=`
42
+ .branch-label${n} { fill: ${e.nodeBorder}; ${i?`font-weight:${e.noteFontWeight}`:``} }
43
+ .commit${n} { stroke: ${e.nodeBorder}; }
44
+ .commit-highlight${n} { stroke: ${e.nodeBorder}; fill: ${e.nodeBorder}; }
45
+ .label${n} { fill: ${e.mainBkg}; stroke: ${e.nodeBorder}; stroke-width: ${e.strokeWidth}; ${i?`font-weight:${e.noteFontWeight}`:``}}
46
+ .arrow${n} { stroke: ${e.nodeBorder}; }
47
+ .commit-bullets { fill: ${e.nodeBorder}; }
48
+ .commit-cherry-pick${n} { stroke: ${e.nodeBorder}; }
49
+ `;return t}},`genColor`),Ke=e(e=>`${Array.from({length:e.THEME_COLOR_LIMIT},(e,t)=>t).map(t=>{let n=t%Z;return`
50
+ .branch-label${t} { fill: ${e[`gitBranchLabel`+n]}; }
51
+ .commit${t} { stroke: ${e[`git`+n]}; fill: ${e[`git`+n]}; }
52
+ .commit-highlight${t} { stroke: ${e[`gitInv`+n]}; fill: ${e[`gitInv`+n]}; }
53
+ .label${t} { fill: ${e[`git`+n]}; }
54
+ .arrow${t} { stroke: ${e[`git`+n]}; }
55
+ `}).join(`
56
+ `)}`,`normalTheme`),qe={parser:be,db:A,renderer:Be,styles:e(e=>{let{theme:t}=d(),n=Ue.has(t);return`
57
+ .commit-id,
58
+ .commit-msg,
59
+ .branch-label {
60
+ fill: lightgrey;
61
+ color: lightgrey;
62
+ font-family: 'trebuchet ms', verdana, arial, sans-serif;
63
+ font-family: var(--mermaid-font-family);
64
+ }
65
+
66
+ ${n?Ge(e):Ke(e)}
67
+
68
+ .branch {
69
+ stroke-width: ${e.strokeWidth};
70
+ stroke: ${e.commitLineColor??e.lineColor};
71
+ stroke-dasharray: ${n?`4 2`:`2`};
72
+ }
73
+ .commit-label { font-size: ${e.commitLabelFontSize}; fill: ${n?e.nodeBorder:e.commitLabelColor}; ${n?`font-weight:${e.noteFontWeight};`:``}}
74
+ .commit-label-bkg { font-size: ${e.commitLabelFontSize}; fill: ${n?`transparent`:e.commitLabelBackground}; opacity: ${n?``:.5}; }
75
+ .tag-label { font-size: ${e.tagLabelFontSize}; fill: ${e.tagLabelColor};}
76
+ .tag-label-bkg { fill: ${n?e.mainBkg:e.tagLabelBackground}; stroke: ${n?e.nodeBorder:e.tagLabelBorder}; ${n?`filter:${e.dropShadow}`:``} }
77
+ .tag-hole { fill: ${e.textColor}; }
78
+
79
+ .commit-merge {
80
+ stroke: ${n?e.mainBkg:e.primaryColor};
81
+ fill: ${n?e.mainBkg:e.primaryColor};
82
+ }
83
+ .commit-reverse {
84
+ stroke: ${n?e.mainBkg:e.primaryColor};
85
+ fill: ${n?e.mainBkg:e.primaryColor};
86
+ stroke-width: ${n?e.strokeWidth:3};
87
+ }
88
+ .commit-highlight-outer {
89
+ }
90
+ .commit-highlight-inner {
91
+ stroke: ${n?e.mainBkg:e.primaryColor};
92
+ fill: ${n?e.mainBkg:e.primaryColor};
93
+ }
94
+
95
+ .arrow {
96
+ /* Intentional: neo themes keep the bold 8px arrow (like classic themes); only redux-geometry themes use the thinner options.strokeWidth. */
97
+ stroke-width: ${Q.has(t)?e.strokeWidth:8};
98
+ stroke-linecap: round;
99
+ fill: none
100
+ }
101
+ .gitTitleText {
102
+ text-anchor: middle;
103
+ font-size: 18px;
104
+ fill: ${e.textColor};
105
+ }
106
+ `},`getStyles`)};export{qe as diagram};