@legionworks/facet 1.9.0

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 (327) hide show
  1. package/LICENSE-APACHE +202 -0
  2. package/LICENSE-MIT +23 -0
  3. package/README.md +158 -0
  4. package/dist/gallery/chunk-4g8rem85.css +656 -0
  5. package/dist/gallery/chunk-c6s9k9ty.js +5970 -0
  6. package/dist/gallery/frame/artifact.css +8424 -0
  7. package/dist/gallery/frame/chunks/abnfDiagram-N423BO3Z-jj74szbm.js +155 -0
  8. package/dist/gallery/frame/chunks/architecture-TIHT7OUA-cvdjn7dt.js +10 -0
  9. package/dist/gallery/frame/chunks/architectureDiagram-T3A2C74G-n4z77eg6.js +8675 -0
  10. package/dist/gallery/frame/chunks/blockDiagram-VBNYF7ZC-7xsqzrd1.js +3529 -0
  11. package/dist/gallery/frame/chunks/c4Diagram-5PPSVZJV-z2zjs7wx.js +2413 -0
  12. package/dist/gallery/frame/chunks/classDiagram-JCYQIIEL-ve8rngqp.js +47 -0
  13. package/dist/gallery/frame/chunks/classDiagram-v2-OCEON4UE-8cfaxb8z.js +47 -0
  14. package/dist/gallery/frame/chunks/cose-bilkent-JH36ORCC-sn92qexx.js +4822 -0
  15. package/dist/gallery/frame/chunks/cynefin-VYW2F7L2-tqjv913d.js +10 -0
  16. package/dist/gallery/frame/chunks/cynefinDiagram-MW4NZA55-c1c0dj12.js +500 -0
  17. package/dist/gallery/frame/chunks/dagre-VZM6K2ZE-7tyg4yt2.js +476 -0
  18. package/dist/gallery/frame/chunks/diagram-7IWD3JNH-y4eng9sc.js +526 -0
  19. package/dist/gallery/frame/chunks/diagram-B4RE2ZJO-rn3p7j5h.js +673 -0
  20. package/dist/gallery/frame/chunks/diagram-LBJQPF4R-w4a2cm9q.js +255 -0
  21. package/dist/gallery/frame/chunks/diagram-Q27KOJAE-aqc2v7wy.js +575 -0
  22. package/dist/gallery/frame/chunks/diagram-UB23O5K3-xncy8nyd.js +355 -0
  23. package/dist/gallery/frame/chunks/ebnfDiagram-BXEA7PRR-acwgxz16.js +175 -0
  24. package/dist/gallery/frame/chunks/erDiagram-JOGREHBK-mzp5nswt.js +1332 -0
  25. package/dist/gallery/frame/chunks/eventmodeling-45OFAUF4-sg07qr0c.js +10 -0
  26. package/dist/gallery/frame/chunks/flowDiagram-UKHOOZJN-2e5ygs44.js +29 -0
  27. package/dist/gallery/frame/chunks/ganttDiagram-PKOTCBZU-p2hhh7hr.js +2620 -0
  28. package/dist/gallery/frame/chunks/gitGraph-TEB2WS4Q-j6kw0naa.js +10 -0
  29. package/dist/gallery/frame/chunks/gitGraphDiagram-DS77QQ5N-4z9z8wjm.js +1347 -0
  30. package/dist/gallery/frame/chunks/info-DKCQHKI2-mpt80jd3.js +10 -0
  31. package/dist/gallery/frame/chunks/infoDiagram-6WML65LV-5rqm3mgg.js +65 -0
  32. package/dist/gallery/frame/chunks/ishikawaDiagram-WSZJBQD7-b51z96jy.js +975 -0
  33. package/dist/gallery/frame/chunks/journeyDiagram-NVQOT4AX-9jbfp0pk.js +1272 -0
  34. package/dist/gallery/frame/chunks/kanban-definition-27J2QSJJ-4x0vx4se.js +1116 -0
  35. package/dist/gallery/frame/chunks/katex-xfgk95tv.js +14034 -0
  36. package/dist/gallery/frame/chunks/markdown-1s5vwkf2.js +9 -0
  37. package/dist/gallery/frame/chunks/markdown-2h6bwsms.js +3239 -0
  38. package/dist/gallery/frame/chunks/markdown-2x113yh8.js +107 -0
  39. package/dist/gallery/frame/chunks/markdown-30b7rwmp.js +1943 -0
  40. package/dist/gallery/frame/chunks/markdown-356bfj4g.js +2031 -0
  41. package/dist/gallery/frame/chunks/markdown-44n9ea69.js +2406 -0
  42. package/dist/gallery/frame/chunks/markdown-56enrf2r.js +39 -0
  43. package/dist/gallery/frame/chunks/markdown-5avymm8t.js +725 -0
  44. package/dist/gallery/frame/chunks/markdown-6r4svars.js +33 -0
  45. package/dist/gallery/frame/chunks/markdown-6zz8efx2.js +24 -0
  46. package/dist/gallery/frame/chunks/markdown-7jp6prnb.js +19 -0
  47. package/dist/gallery/frame/chunks/markdown-809k7q41.js +55 -0
  48. package/dist/gallery/frame/chunks/markdown-82xmzhzd.js +1076 -0
  49. package/dist/gallery/frame/chunks/markdown-92n37gd4.js +7627 -0
  50. package/dist/gallery/frame/chunks/markdown-ag2sssf8.js +36 -0
  51. package/dist/gallery/frame/chunks/markdown-b4s7ntq2.js +19 -0
  52. package/dist/gallery/frame/chunks/markdown-c9k0fvp1.js +100 -0
  53. package/dist/gallery/frame/chunks/markdown-ceefymn8.js +125 -0
  54. package/dist/gallery/frame/chunks/markdown-d1wfbs70.js +243 -0
  55. package/dist/gallery/frame/chunks/markdown-dy5sgjhc.js +11022 -0
  56. package/dist/gallery/frame/chunks/markdown-dz3z5w30.js +30868 -0
  57. package/dist/gallery/frame/chunks/markdown-eg6ngz7y.js +30340 -0
  58. package/dist/gallery/frame/chunks/markdown-ff5wvb43.js +1149 -0
  59. package/dist/gallery/frame/chunks/markdown-ffg06nfz.js +86 -0
  60. package/dist/gallery/frame/chunks/markdown-fvfncadf.js +472 -0
  61. package/dist/gallery/frame/chunks/markdown-gvyszqpv.js +19 -0
  62. package/dist/gallery/frame/chunks/markdown-gx1p0ew0.js +88 -0
  63. package/dist/gallery/frame/chunks/markdown-gxye5frz.js +65 -0
  64. package/dist/gallery/frame/chunks/markdown-h7pzv34e.js +105 -0
  65. package/dist/gallery/frame/chunks/markdown-hab789t9.js +47 -0
  66. package/dist/gallery/frame/chunks/markdown-hjp6sj8t.js +125 -0
  67. package/dist/gallery/frame/chunks/markdown-jka64qgp.js +1993 -0
  68. package/dist/gallery/frame/chunks/markdown-k8xkn8mw.js +56 -0
  69. package/dist/gallery/frame/chunks/markdown-m7frq8x8.js +112 -0
  70. package/dist/gallery/frame/chunks/markdown-p740v4qm.js +36 -0
  71. package/dist/gallery/frame/chunks/markdown-pxfeh231.js +57 -0
  72. package/dist/gallery/frame/chunks/markdown-pzgd8z3s.js +87 -0
  73. package/dist/gallery/frame/chunks/markdown-qx3cngz2.js +1673 -0
  74. package/dist/gallery/frame/chunks/markdown-rawhfvvc.js +85 -0
  75. package/dist/gallery/frame/chunks/markdown-rd8w0ng9.js +49 -0
  76. package/dist/gallery/frame/chunks/markdown-rm2yxfjj.js +2773 -0
  77. package/dist/gallery/frame/chunks/markdown-s1jatrnk.js +993 -0
  78. package/dist/gallery/frame/chunks/markdown-sgfg5vvq.js +59 -0
  79. package/dist/gallery/frame/chunks/markdown-t4ethv9d.js +409 -0
  80. package/dist/gallery/frame/chunks/markdown-tnmabqvz.js +36 -0
  81. package/dist/gallery/frame/chunks/markdown-tvdpppw8.js +5292 -0
  82. package/dist/gallery/frame/chunks/markdown-v0x27twr.js +22 -0
  83. package/dist/gallery/frame/chunks/markdown-v14td68x.js +36 -0
  84. package/dist/gallery/frame/chunks/markdown-w6sgd54z.js +36 -0
  85. package/dist/gallery/frame/chunks/markdown-xw8dsk8b.js +2125 -0
  86. package/dist/gallery/frame/chunks/markdown-y18mve73.js +85 -0
  87. package/dist/gallery/frame/chunks/markdown-yengsms5.js +427 -0
  88. package/dist/gallery/frame/chunks/markdown-z1wc0v0d.js +1826 -0
  89. package/dist/gallery/frame/chunks/markdown-zazx9h4n.js +329 -0
  90. package/dist/gallery/frame/chunks/mermaid-de7p4v0x.js +30 -0
  91. package/dist/gallery/frame/chunks/mindmap-definition-FAOFIHXS-ra44cbem.js +1216 -0
  92. package/dist/gallery/frame/chunks/packet-7NZHBO7P-xppm5913.js +10 -0
  93. package/dist/gallery/frame/chunks/pegDiagram-VL7TDLO6-a2a4wg03.js +163 -0
  94. package/dist/gallery/frame/chunks/pie-RZYD4A2V-hnbxk152.js +10 -0
  95. package/dist/gallery/frame/chunks/pieDiagram-7S7Q4E2Y-f1vxjtmx.js +311 -0
  96. package/dist/gallery/frame/chunks/quadrantDiagram-CIZ2JOQS-ywafa6kh.js +1390 -0
  97. package/dist/gallery/frame/chunks/radar-I7S5WNFK-ewqd27se.js +10 -0
  98. package/dist/gallery/frame/chunks/railroad-3IZDKUUU-5hy4bdx3.js +10 -0
  99. package/dist/gallery/frame/chunks/railroad-abnf-AHOZXSZD-bh5sxz0d.js +10 -0
  100. package/dist/gallery/frame/chunks/railroad-ebnf-EBAXGLYW-6b9c3zeh.js +10 -0
  101. package/dist/gallery/frame/chunks/railroad-peg-LSFZ7HO6-avc8v39s.js +10 -0
  102. package/dist/gallery/frame/chunks/railroadDiagram-AXF67PYL-qc61wax4.js +131 -0
  103. package/dist/gallery/frame/chunks/requirementDiagram-LRYGKXZP-9bs4786c.js +1295 -0
  104. package/dist/gallery/frame/chunks/sankeyDiagram-W5VNT64P-awt1em8b.js +1339 -0
  105. package/dist/gallery/frame/chunks/sequenceDiagram-SI44F4Z6-qaf9mz3t.js +4324 -0
  106. package/dist/gallery/frame/chunks/sizeCapture-X5ZJPWSS-9fq685xd.js +64 -0
  107. package/dist/gallery/frame/chunks/stateDiagram-OKZ733FA-vx7a7hh0.js +456 -0
  108. package/dist/gallery/frame/chunks/stateDiagram-v2-UEYNNEHI-x4m6ws5t.js +46 -0
  109. package/dist/gallery/frame/chunks/swimlanes-SLNWSIFB-e4mxm1gh.js +8287 -0
  110. package/dist/gallery/frame/chunks/swimlanesDiagram-ULZ7WXOC-0h93e2qq.js +42 -0
  111. package/dist/gallery/frame/chunks/timeline-definition-Z64GVDOM-wp0bhbzg.js +1549 -0
  112. package/dist/gallery/frame/chunks/treeView-QDETBFTQ-hcx7n0vt.js +10 -0
  113. package/dist/gallery/frame/chunks/treemap-6X3UGDF4-av02skdw.js +10 -0
  114. package/dist/gallery/frame/chunks/vennDiagram-T6HMQDX7-pmvk1p7n.js +2566 -0
  115. package/dist/gallery/frame/chunks/wardley-OPB4EBWU-njsp6e40.js +10 -0
  116. package/dist/gallery/frame/chunks/wardleyDiagram-T6FBY63Y-eggmnv4z.js +979 -0
  117. package/dist/gallery/frame/chunks/xychartDiagram-ELKLHX3M-q40tnpe5.js +1954 -0
  118. package/dist/gallery/frame/frame.css +183 -0
  119. package/dist/gallery/frame/runtime/chart.js +42744 -0
  120. package/dist/gallery/frame/runtime/html.js +14 -0
  121. package/dist/gallery/frame/runtime/markdown.js +1403 -0
  122. package/dist/gallery/frame/runtime/mermaid.js +32 -0
  123. package/dist/gallery/frame/runtime/svg.js +14 -0
  124. package/dist/gallery/frame/runtime/tsx.js +52 -0
  125. package/dist/gallery/index.html +104 -0
  126. package/docs/reference/cli.md +163 -0
  127. package/docs/reference/export.md +106 -0
  128. package/docs/reference/html.md +215 -0
  129. package/docs/reference/http.md +85 -0
  130. package/docs/reference/mcp.md +78 -0
  131. package/docs/reference/security.md +119 -0
  132. package/docs/reference/storage.md +93 -0
  133. package/docs/reference/tsx.md +101 -0
  134. package/docs/reference/validation.md +212 -0
  135. package/package.json +89 -0
  136. package/scripts/build-gallery.ts +127 -0
  137. package/scripts/launch-netns.sh +67 -0
  138. package/skills/facet/SKILL.md +100 -0
  139. package/src/cli/client.ts +311 -0
  140. package/src/cli/commands/create.ts +49 -0
  141. package/src/cli/commands/doctor.ts +249 -0
  142. package/src/cli/commands/export.ts +179 -0
  143. package/src/cli/commands/instantiate.ts +35 -0
  144. package/src/cli/commands/list.ts +49 -0
  145. package/src/cli/commands/open.ts +75 -0
  146. package/src/cli/commands/pin.ts +39 -0
  147. package/src/cli/commands/promote.ts +49 -0
  148. package/src/cli/commands/publish.ts +122 -0
  149. package/src/cli/commands/read-back.ts +56 -0
  150. package/src/cli/commands/status.ts +114 -0
  151. package/src/cli/commands/watch.ts +146 -0
  152. package/src/cli/main.ts +522 -0
  153. package/src/cli/output.ts +106 -0
  154. package/src/cli/parser.ts +376 -0
  155. package/src/cli/presenter.ts +212 -0
  156. package/src/cli/service-metadata.ts +134 -0
  157. package/src/cli/spawn-service.ts +326 -0
  158. package/src/css.d.ts +4 -0
  159. package/src/gallery-web/app.ts +1581 -0
  160. package/src/gallery-web/export-menu.ts +121 -0
  161. package/src/gallery-web/export.ts +112 -0
  162. package/src/gallery-web/favicon.ts +54 -0
  163. package/src/gallery-web/frame/entries/chart.ts +6 -0
  164. package/src/gallery-web/frame/entries/html.ts +6 -0
  165. package/src/gallery-web/frame/entries/markdown.ts +6 -0
  166. package/src/gallery-web/frame/entries/mermaid.ts +6 -0
  167. package/src/gallery-web/frame/entries/svg.ts +6 -0
  168. package/src/gallery-web/frame/entries/tsx.ts +6 -0
  169. package/src/gallery-web/frame/frame-payload.ts +91 -0
  170. package/src/gallery-web/frame/renderer-validation.ts +13 -0
  171. package/src/gallery-web/frame/renderers/chart.ts +182 -0
  172. package/src/gallery-web/frame/renderers/dompurify-shim.ts +112 -0
  173. package/src/gallery-web/frame/renderers/html.ts +48 -0
  174. package/src/gallery-web/frame/renderers/markdown.ts +81 -0
  175. package/src/gallery-web/frame/renderers/mermaid.ts +120 -0
  176. package/src/gallery-web/frame/renderers/registry.ts +260 -0
  177. package/src/gallery-web/frame/renderers/svg.ts +393 -0
  178. package/src/gallery-web/frame/renderers/tsx.ts +61 -0
  179. package/src/gallery-web/frame/runtime.ts +501 -0
  180. package/src/gallery-web/frame/styles/artifact.css +8424 -0
  181. package/src/gallery-web/frame/styles/frame.css +183 -0
  182. package/src/gallery-web/frame/styles/html-source.css +23 -0
  183. package/src/gallery-web/frame/view-box.ts +33 -0
  184. package/src/gallery-web/frame-html.ts +72 -0
  185. package/src/gallery-web/index.html +104 -0
  186. package/src/gallery-web/session.ts +107 -0
  187. package/src/gallery-web/sse-client.ts +212 -0
  188. package/src/gallery-web/styles/app.css +420 -0
  189. package/src/gallery-web/styles/tokens.css +112 -0
  190. package/src/gallery-web/styles/verdict.css +186 -0
  191. package/src/gallery-web/swap.ts +64 -0
  192. package/src/gallery-web/theme.ts +40 -0
  193. package/src/gallery-web/view-state.ts +93 -0
  194. package/src/harness-adapters/claude-code/README.md +10 -0
  195. package/src/harness-adapters/claude-code/facet.sh +4 -0
  196. package/src/harness-adapters/codex/README.md +10 -0
  197. package/src/harness-adapters/codex/facet.sh +4 -0
  198. package/src/harness-adapters/mcp/README.md +13 -0
  199. package/src/harness-adapters/mcp/cli-bridge.ts +216 -0
  200. package/src/harness-adapters/mcp/main.ts +15 -0
  201. package/src/harness-adapters/mcp/server.ts +164 -0
  202. package/src/harness-adapters/mcp/tool-schemas.ts +53 -0
  203. package/src/harness-adapters/opencode/README.md +10 -0
  204. package/src/harness-adapters/opencode/facet.sh +4 -0
  205. package/src/runtime/compiled-entrypoints.ts +69 -0
  206. package/src/service/dispatcher.ts +717 -0
  207. package/src/service/export.ts +218 -0
  208. package/src/service/http-utils.ts +55 -0
  209. package/src/service/lexical/expectations.ts +210 -0
  210. package/src/service/lifecycle/idle-controller.ts +125 -0
  211. package/src/service/lifecycle/orphan-cleanup.ts +128 -0
  212. package/src/service/lifecycle/process-lock.ts +235 -0
  213. package/src/service/main.ts +136 -0
  214. package/src/service/process.ts +240 -0
  215. package/src/service/router-guards.ts +239 -0
  216. package/src/service/router.ts +627 -0
  217. package/src/service/security/auth.ts +168 -0
  218. package/src/service/security/host-origin.ts +138 -0
  219. package/src/service/security/http-guards.ts +13 -0
  220. package/src/service/security/leases.ts +182 -0
  221. package/src/service/security/token-store.ts +138 -0
  222. package/src/service/server.ts +356 -0
  223. package/src/service/store/database.ts +61 -0
  224. package/src/service/store/evidence-retention.ts +234 -0
  225. package/src/service/store/migrations.ts +167 -0
  226. package/src/service/store/repository-lifecycle.ts +121 -0
  227. package/src/service/store/repository.ts +732 -0
  228. package/src/service/store/schema.ts +218 -0
  229. package/src/service/stored-verdict.ts +97 -0
  230. package/src/service/stream.ts +301 -0
  231. package/src/service/verdict-enrichment.ts +45 -0
  232. package/src/shared/build/frame-bundle-plugins.ts +61 -0
  233. package/src/shared/build-mode.ts +28 -0
  234. package/src/shared/config/evidence-read.ts +98 -0
  235. package/src/shared/config/limits.ts +56 -0
  236. package/src/shared/config/paths.ts +96 -0
  237. package/src/shared/contracts/artifact-types.ts +2 -0
  238. package/src/shared/contracts/artifact.ts +98 -0
  239. package/src/shared/contracts/commands/_shared.ts +59 -0
  240. package/src/shared/contracts/commands/guards.ts +86 -0
  241. package/src/shared/contracts/commands/index.ts +204 -0
  242. package/src/shared/contracts/commands/names.ts +35 -0
  243. package/src/shared/contracts/commands/requests.ts +149 -0
  244. package/src/shared/contracts/commands/results.ts +200 -0
  245. package/src/shared/contracts/envelope.ts +140 -0
  246. package/src/shared/contracts/events.ts +41 -0
  247. package/src/shared/contracts/observed-counts.ts +19 -0
  248. package/src/shared/contracts/renderers.ts +6 -0
  249. package/src/shared/contracts/validation.ts +296 -0
  250. package/src/shared/errors/facet-error.ts +127 -0
  251. package/src/shared/errors/store-error.ts +68 -0
  252. package/src/shared/evidence-image.ts +37 -0
  253. package/src/shared/export.ts +31 -0
  254. package/src/shared/html/policy.ts +108 -0
  255. package/src/shared/html/style-vocabulary.ts +352 -0
  256. package/src/shared/logging/logger.ts +108 -0
  257. package/src/shared/logging/redact.ts +49 -0
  258. package/src/shared/security/frozen-csp.ts +13 -0
  259. package/src/shared/storage-version.ts +2 -0
  260. package/src/shared/tsx/execution.ts +29 -0
  261. package/src/shared/tsx/import-policy.ts +94 -0
  262. package/src/shared/util/dir-permissions.ts +94 -0
  263. package/src/shared/util/mermaid-nodes.ts +230 -0
  264. package/src/shared/util/process.ts +67 -0
  265. package/src/shared/util/time.ts +21 -0
  266. package/src/shared/version.ts +3 -0
  267. package/src/validation/sandbox/limits.ts +41 -0
  268. package/src/validation/sandbox/netns.ts +177 -0
  269. package/src/validation/tier0/chart.ts +177 -0
  270. package/src/validation/tier0/dom-shim.ts +54 -0
  271. package/src/validation/tier0/html.ts +408 -0
  272. package/src/validation/tier0/markdown.ts +285 -0
  273. package/src/validation/tier0/mermaid.ts +98 -0
  274. package/src/validation/tier0/runner.ts +504 -0
  275. package/src/validation/tier0/svg.ts +321 -0
  276. package/src/validation/tier0/tsx/allowlist-resolver.ts +77 -0
  277. package/src/validation/tier0/tsx/ast-policy-capabilities.ts +238 -0
  278. package/src/validation/tier0/tsx/ast-policy-shared.ts +71 -0
  279. package/src/validation/tier0/tsx/ast-policy.ts +181 -0
  280. package/src/validation/tier0/tsx/compiler.ts +156 -0
  281. package/src/validation/tier0/worker-dispatch.ts +211 -0
  282. package/src/validation/tier0/worker-entry.ts +96 -0
  283. package/src/validation/tier0/worker-input.ts +75 -0
  284. package/src/validation/tier1/browser-process.ts +147 -0
  285. package/src/validation/tier1/cdp-pipe.ts +281 -0
  286. package/src/validation/tier1/entries/chart.ts +5 -0
  287. package/src/validation/tier1/entries/html.ts +6 -0
  288. package/src/validation/tier1/entries/markdown.ts +5 -0
  289. package/src/validation/tier1/entries/mermaid.ts +5 -0
  290. package/src/validation/tier1/entries/svg.ts +5 -0
  291. package/src/validation/tier1/entries/tsx.ts +5 -0
  292. package/src/validation/tier1/frame-target.ts +162 -0
  293. package/src/validation/tier1/harness-entry.ts +261 -0
  294. package/src/validation/tier1/harness.ts +215 -0
  295. package/src/validation/tier1/isolated-probe.ts +94 -0
  296. package/src/validation/tier1/launcher.ts +177 -0
  297. package/src/validation/tier1/limits.ts +80 -0
  298. package/src/validation/tier1/nonce.ts +17 -0
  299. package/src/validation/tier1/protocol-probe.ts +519 -0
  300. package/src/validation/tier1/runner.ts +1122 -0
  301. package/src/validation/tier1/verdict.ts +246 -0
  302. package/src/validation/tier1/webp.ts +69 -0
  303. package/templates/README.md +88 -0
  304. package/templates/bar-compare.vl.json +63 -0
  305. package/templates/capacity-report.tsx +102 -0
  306. package/templates/decision-record.md +24 -0
  307. package/templates/deployment-state.mmd +40 -0
  308. package/templates/exemplar.md +91 -0
  309. package/templates/facet-story.tsx +799 -0
  310. package/templates/fleet-dashboard.html +141 -0
  311. package/templates/html-release-ledger.html +91 -0
  312. package/templates/html-status-report.html +114 -0
  313. package/templates/incident-console.tsx +147 -0
  314. package/templates/legion-boundaries.mmd +23 -0
  315. package/templates/legion-flow.mmd +15 -0
  316. package/templates/legion-sequence.mmd +14 -0
  317. package/templates/legion-state.mmd +7 -0
  318. package/templates/metric-card.svg +29 -0
  319. package/templates/observability-map.svg +101 -0
  320. package/templates/pipeline-audit.md +108 -0
  321. package/templates/release-metrics.vl.json +98 -0
  322. package/templates/service-topology.mmd +47 -0
  323. package/templates/status-report.md +32 -0
  324. package/templates/system-map.svg +53 -0
  325. package/templates/timeseries.vl.json +71 -0
  326. package/templates/tsx-interactive-counter.tsx +19 -0
  327. package/templates/tsx-status-report.tsx +31 -0
@@ -0,0 +1,1295 @@
1
+ import {
2
+ getDiagramElement
3
+ } from "./markdown-gvyszqpv.js";
4
+ import {
5
+ setupViewPortForSVG
6
+ } from "./markdown-6r4svars.js";
7
+ import {
8
+ getRegisteredLayoutAlgorithm,
9
+ render
10
+ } from "./markdown-h7pzv34e.js";
11
+ import"./markdown-s1jatrnk.js";
12
+ import"./markdown-m7frq8x8.js";
13
+ import"./markdown-tvdpppw8.js";
14
+ import"./markdown-sgfg5vvq.js";
15
+ import"./markdown-82xmzhzd.js";
16
+ import"./markdown-c9k0fvp1.js";
17
+ import"./markdown-qx3cngz2.js";
18
+ import"./markdown-yengsms5.js";
19
+ import {
20
+ utils_default
21
+ } from "./markdown-ff5wvb43.js";
22
+ import"./markdown-pzgd8z3s.js";
23
+ import {
24
+ clear,
25
+ getAccDescription,
26
+ getAccTitle,
27
+ getConfig,
28
+ getConfig2,
29
+ getDiagramTitle,
30
+ setAccDescription,
31
+ setAccTitle,
32
+ setDiagramTitle
33
+ } from "./markdown-92n37gd4.js";
34
+ import {
35
+ log
36
+ } from "./markdown-xw8dsk8b.js";
37
+ import {
38
+ __export,
39
+ __name
40
+ } from "./markdown-1s5vwkf2.js";
41
+ import"./markdown-dy5sgjhc.js";
42
+ import"./markdown-809k7q41.js";
43
+
44
+ // node_modules/mermaid/dist/chunks/mermaid.core/requirementDiagram-LRYGKXZP.mjs
45
+ var parser = function() {
46
+ var o = /* @__PURE__ */ __name(function(k, v, o2, l) {
47
+ for (o2 = o2 || {}, l = k.length;l--; o2[k[l]] = v)
48
+ ;
49
+ return o2;
50
+ }, "o"), $V0 = [1, 3], $V1 = [1, 4], $V2 = [1, 5], $V3 = [1, 6], $V4 = [5, 6, 8, 9, 11, 13, 21, 22, 23, 24, 41, 42, 43, 44, 45, 46, 54, 72, 74, 77, 89, 90], $V5 = [1, 22], $V6 = [2, 7], $V7 = [1, 26], $V8 = [1, 27], $V9 = [1, 28], $Va = [1, 29], $Vb = [1, 33], $Vc = [1, 34], $Vd = [1, 35], $Ve = [1, 36], $Vf = [1, 37], $Vg = [1, 38], $Vh = [1, 24], $Vi = [1, 31], $Vj = [1, 32], $Vk = [1, 30], $Vl = [1, 39], $Vm = [1, 40], $Vn = [5, 8, 9, 11, 13, 21, 22, 23, 24, 41, 42, 43, 44, 45, 46, 54, 72, 74, 77, 89, 90], $Vo = [1, 61], $Vp = [89, 90], $Vq = [5, 8, 9, 11, 13, 21, 22, 23, 24, 27, 29, 41, 42, 43, 44, 45, 46, 54, 61, 63, 72, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], $Vr = [27, 29], $Vs = [1, 70], $Vt = [1, 71], $Vu = [1, 72], $Vv = [1, 73], $Vw = [1, 74], $Vx = [1, 75], $Vy = [1, 76], $Vz = [1, 83], $VA = [1, 80], $VB = [1, 84], $VC = [1, 85], $VD = [1, 86], $VE = [1, 87], $VF = [1, 88], $VG = [1, 89], $VH = [1, 90], $VI = [1, 91], $VJ = [1, 92], $VK = [5, 8, 9, 11, 13, 21, 22, 23, 24, 27, 41, 42, 43, 44, 45, 46, 54, 72, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], $VL = [63, 64], $VM = [1, 101], $VN = [5, 8, 9, 11, 13, 21, 22, 23, 24, 41, 42, 43, 44, 45, 46, 54, 72, 74, 76, 77, 89, 90], $VO = [5, 8, 9, 11, 13, 21, 22, 23, 24, 41, 42, 43, 44, 45, 46, 54, 72, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], $VP = [1, 110], $VQ = [1, 106], $VR = [1, 107], $VS = [1, 108], $VT = [1, 109], $VU = [1, 111], $VV = [1, 116], $VW = [1, 117], $VX = [1, 114], $VY = [1, 115];
51
+ var parser2 = {
52
+ trace: /* @__PURE__ */ __name(function trace() {}, "trace"),
53
+ yy: {},
54
+ symbols_: { error: 2, start: 3, directive: 4, NEWLINE: 5, RD: 6, diagram: 7, EOF: 8, acc_title: 9, acc_title_value: 10, acc_descr: 11, acc_descr_value: 12, acc_descr_multiline_value: 13, requirementDef: 14, elementDef: 15, relationshipDef: 16, direction: 17, styleStatement: 18, classDefStatement: 19, classStatement: 20, direction_tb: 21, direction_bt: 22, direction_rl: 23, direction_lr: 24, requirementType: 25, requirementName: 26, STRUCT_START: 27, requirementBody: 28, STYLE_SEPARATOR: 29, idList: 30, ID: 31, COLONSEP: 32, id: 33, TEXT: 34, text: 35, RISK: 36, riskLevel: 37, VERIFYMTHD: 38, verifyType: 39, STRUCT_STOP: 40, REQUIREMENT: 41, FUNCTIONAL_REQUIREMENT: 42, INTERFACE_REQUIREMENT: 43, PERFORMANCE_REQUIREMENT: 44, PHYSICAL_REQUIREMENT: 45, DESIGN_CONSTRAINT: 46, LOW_RISK: 47, MED_RISK: 48, HIGH_RISK: 49, VERIFY_ANALYSIS: 50, VERIFY_DEMONSTRATION: 51, VERIFY_INSPECTION: 52, VERIFY_TEST: 53, ELEMENT: 54, elementName: 55, elementBody: 56, TYPE: 57, type: 58, DOCREF: 59, ref: 60, END_ARROW_L: 61, relationship: 62, LINE: 63, END_ARROW_R: 64, CONTAINS: 65, COPIES: 66, DERIVES: 67, SATISFIES: 68, VERIFIES: 69, REFINES: 70, TRACES: 71, CLASSDEF: 72, stylesOpt: 73, CLASS: 74, ALPHA: 75, COMMA: 76, STYLE: 77, style: 78, styleComponent: 79, NUM: 80, COLON: 81, UNIT: 82, SPACE: 83, BRKT: 84, PCT: 85, MINUS: 86, LABEL: 87, SEMICOLON: 88, unqString: 89, qString: 90, $accept: 0, $end: 1 },
55
+ terminals_: { 2: "error", 5: "NEWLINE", 6: "RD", 8: "EOF", 9: "acc_title", 10: "acc_title_value", 11: "acc_descr", 12: "acc_descr_value", 13: "acc_descr_multiline_value", 21: "direction_tb", 22: "direction_bt", 23: "direction_rl", 24: "direction_lr", 27: "STRUCT_START", 29: "STYLE_SEPARATOR", 31: "ID", 32: "COLONSEP", 34: "TEXT", 36: "RISK", 38: "VERIFYMTHD", 40: "STRUCT_STOP", 41: "REQUIREMENT", 42: "FUNCTIONAL_REQUIREMENT", 43: "INTERFACE_REQUIREMENT", 44: "PERFORMANCE_REQUIREMENT", 45: "PHYSICAL_REQUIREMENT", 46: "DESIGN_CONSTRAINT", 47: "LOW_RISK", 48: "MED_RISK", 49: "HIGH_RISK", 50: "VERIFY_ANALYSIS", 51: "VERIFY_DEMONSTRATION", 52: "VERIFY_INSPECTION", 53: "VERIFY_TEST", 54: "ELEMENT", 57: "TYPE", 59: "DOCREF", 61: "END_ARROW_L", 63: "LINE", 64: "END_ARROW_R", 65: "CONTAINS", 66: "COPIES", 67: "DERIVES", 68: "SATISFIES", 69: "VERIFIES", 70: "REFINES", 71: "TRACES", 72: "CLASSDEF", 74: "CLASS", 75: "ALPHA", 76: "COMMA", 77: "STYLE", 80: "NUM", 81: "COLON", 82: "UNIT", 83: "SPACE", 84: "BRKT", 85: "PCT", 86: "MINUS", 87: "LABEL", 88: "SEMICOLON", 89: "unqString", 90: "qString" },
56
+ productions_: [0, [3, 3], [3, 2], [3, 4], [4, 2], [4, 2], [4, 1], [7, 0], [7, 2], [7, 2], [7, 2], [7, 2], [7, 2], [7, 2], [7, 2], [7, 2], [7, 2], [17, 1], [17, 1], [17, 1], [17, 1], [14, 5], [14, 7], [28, 5], [28, 5], [28, 5], [28, 5], [28, 2], [28, 1], [25, 1], [25, 1], [25, 1], [25, 1], [25, 1], [25, 1], [37, 1], [37, 1], [37, 1], [39, 1], [39, 1], [39, 1], [39, 1], [15, 5], [15, 7], [56, 5], [56, 5], [56, 2], [56, 1], [16, 5], [16, 5], [62, 1], [62, 1], [62, 1], [62, 1], [62, 1], [62, 1], [62, 1], [19, 3], [20, 3], [20, 3], [30, 1], [30, 3], [30, 1], [30, 3], [18, 3], [73, 1], [73, 3], [78, 1], [78, 2], [79, 1], [79, 1], [79, 1], [79, 1], [79, 1], [79, 1], [79, 1], [79, 1], [79, 1], [79, 1], [26, 1], [26, 1], [33, 1], [33, 1], [35, 1], [35, 1], [55, 1], [55, 1], [58, 1], [58, 1], [60, 1], [60, 1]],
57
+ performAction: /* @__PURE__ */ __name(function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
58
+ var $0 = $$.length - 1;
59
+ switch (yystate) {
60
+ case 4:
61
+ this.$ = $$[$0].trim();
62
+ yy.setAccTitle(this.$);
63
+ break;
64
+ case 5:
65
+ case 6:
66
+ this.$ = $$[$0].trim();
67
+ yy.setAccDescription(this.$);
68
+ break;
69
+ case 7:
70
+ this.$ = [];
71
+ break;
72
+ case 17:
73
+ yy.setDirection("TB");
74
+ break;
75
+ case 18:
76
+ yy.setDirection("BT");
77
+ break;
78
+ case 19:
79
+ yy.setDirection("RL");
80
+ break;
81
+ case 20:
82
+ yy.setDirection("LR");
83
+ break;
84
+ case 21:
85
+ yy.addRequirement($$[$0 - 3], $$[$0 - 4]);
86
+ break;
87
+ case 22:
88
+ yy.addRequirement($$[$0 - 5], $$[$0 - 6]);
89
+ yy.setClass([$$[$0 - 5]], $$[$0 - 3]);
90
+ break;
91
+ case 23:
92
+ yy.setNewReqId($$[$0 - 2]);
93
+ break;
94
+ case 24:
95
+ yy.setNewReqText($$[$0 - 2]);
96
+ break;
97
+ case 25:
98
+ yy.setNewReqRisk($$[$0 - 2]);
99
+ break;
100
+ case 26:
101
+ yy.setNewReqVerifyMethod($$[$0 - 2]);
102
+ break;
103
+ case 29:
104
+ this.$ = yy.RequirementType.REQUIREMENT;
105
+ break;
106
+ case 30:
107
+ this.$ = yy.RequirementType.FUNCTIONAL_REQUIREMENT;
108
+ break;
109
+ case 31:
110
+ this.$ = yy.RequirementType.INTERFACE_REQUIREMENT;
111
+ break;
112
+ case 32:
113
+ this.$ = yy.RequirementType.PERFORMANCE_REQUIREMENT;
114
+ break;
115
+ case 33:
116
+ this.$ = yy.RequirementType.PHYSICAL_REQUIREMENT;
117
+ break;
118
+ case 34:
119
+ this.$ = yy.RequirementType.DESIGN_CONSTRAINT;
120
+ break;
121
+ case 35:
122
+ this.$ = yy.RiskLevel.LOW_RISK;
123
+ break;
124
+ case 36:
125
+ this.$ = yy.RiskLevel.MED_RISK;
126
+ break;
127
+ case 37:
128
+ this.$ = yy.RiskLevel.HIGH_RISK;
129
+ break;
130
+ case 38:
131
+ this.$ = yy.VerifyType.VERIFY_ANALYSIS;
132
+ break;
133
+ case 39:
134
+ this.$ = yy.VerifyType.VERIFY_DEMONSTRATION;
135
+ break;
136
+ case 40:
137
+ this.$ = yy.VerifyType.VERIFY_INSPECTION;
138
+ break;
139
+ case 41:
140
+ this.$ = yy.VerifyType.VERIFY_TEST;
141
+ break;
142
+ case 42:
143
+ yy.addElement($$[$0 - 3]);
144
+ break;
145
+ case 43:
146
+ yy.addElement($$[$0 - 5]);
147
+ yy.setClass([$$[$0 - 5]], $$[$0 - 3]);
148
+ break;
149
+ case 44:
150
+ yy.setNewElementType($$[$0 - 2]);
151
+ break;
152
+ case 45:
153
+ yy.setNewElementDocRef($$[$0 - 2]);
154
+ break;
155
+ case 48:
156
+ yy.addRelationship($$[$0 - 2], $$[$0], $$[$0 - 4]);
157
+ break;
158
+ case 49:
159
+ yy.addRelationship($$[$0 - 2], $$[$0 - 4], $$[$0]);
160
+ break;
161
+ case 50:
162
+ this.$ = yy.Relationships.CONTAINS;
163
+ break;
164
+ case 51:
165
+ this.$ = yy.Relationships.COPIES;
166
+ break;
167
+ case 52:
168
+ this.$ = yy.Relationships.DERIVES;
169
+ break;
170
+ case 53:
171
+ this.$ = yy.Relationships.SATISFIES;
172
+ break;
173
+ case 54:
174
+ this.$ = yy.Relationships.VERIFIES;
175
+ break;
176
+ case 55:
177
+ this.$ = yy.Relationships.REFINES;
178
+ break;
179
+ case 56:
180
+ this.$ = yy.Relationships.TRACES;
181
+ break;
182
+ case 57:
183
+ this.$ = $$[$0 - 2];
184
+ yy.defineClass($$[$0 - 1], $$[$0]);
185
+ break;
186
+ case 58:
187
+ yy.setClass($$[$0 - 1], $$[$0]);
188
+ break;
189
+ case 59:
190
+ yy.setClass([$$[$0 - 2]], $$[$0]);
191
+ break;
192
+ case 60:
193
+ case 62:
194
+ this.$ = [$$[$0]];
195
+ break;
196
+ case 61:
197
+ case 63:
198
+ this.$ = $$[$0 - 2].concat([$$[$0]]);
199
+ break;
200
+ case 64:
201
+ this.$ = $$[$0 - 2];
202
+ yy.setCssStyle($$[$0 - 1], $$[$0]);
203
+ break;
204
+ case 65:
205
+ this.$ = [$$[$0]];
206
+ break;
207
+ case 66:
208
+ $$[$0 - 2].push($$[$0]);
209
+ this.$ = $$[$0 - 2];
210
+ break;
211
+ case 68:
212
+ this.$ = $$[$0 - 1] + $$[$0];
213
+ break;
214
+ }
215
+ }, "anonymous"),
216
+ table: [{ 3: 1, 4: 2, 6: $V0, 9: $V1, 11: $V2, 13: $V3 }, { 1: [3] }, { 3: 8, 4: 2, 5: [1, 7], 6: $V0, 9: $V1, 11: $V2, 13: $V3 }, { 5: [1, 9] }, { 10: [1, 10] }, { 12: [1, 11] }, o($V4, [2, 6]), { 3: 12, 4: 2, 6: $V0, 9: $V1, 11: $V2, 13: $V3 }, { 1: [2, 2] }, { 4: 17, 5: $V5, 7: 13, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 18, 18: 19, 19: 20, 20: 21, 21: $V7, 22: $V8, 23: $V9, 24: $Va, 25: 23, 33: 25, 41: $Vb, 42: $Vc, 43: $Vd, 44: $Ve, 45: $Vf, 46: $Vg, 54: $Vh, 72: $Vi, 74: $Vj, 77: $Vk, 89: $Vl, 90: $Vm }, o($V4, [2, 4]), o($V4, [2, 5]), { 1: [2, 1] }, { 8: [1, 41] }, { 4: 17, 5: $V5, 7: 42, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 18, 18: 19, 19: 20, 20: 21, 21: $V7, 22: $V8, 23: $V9, 24: $Va, 25: 23, 33: 25, 41: $Vb, 42: $Vc, 43: $Vd, 44: $Ve, 45: $Vf, 46: $Vg, 54: $Vh, 72: $Vi, 74: $Vj, 77: $Vk, 89: $Vl, 90: $Vm }, { 4: 17, 5: $V5, 7: 43, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 18, 18: 19, 19: 20, 20: 21, 21: $V7, 22: $V8, 23: $V9, 24: $Va, 25: 23, 33: 25, 41: $Vb, 42: $Vc, 43: $Vd, 44: $Ve, 45: $Vf, 46: $Vg, 54: $Vh, 72: $Vi, 74: $Vj, 77: $Vk, 89: $Vl, 90: $Vm }, { 4: 17, 5: $V5, 7: 44, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 18, 18: 19, 19: 20, 20: 21, 21: $V7, 22: $V8, 23: $V9, 24: $Va, 25: 23, 33: 25, 41: $Vb, 42: $Vc, 43: $Vd, 44: $Ve, 45: $Vf, 46: $Vg, 54: $Vh, 72: $Vi, 74: $Vj, 77: $Vk, 89: $Vl, 90: $Vm }, { 4: 17, 5: $V5, 7: 45, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 18, 18: 19, 19: 20, 20: 21, 21: $V7, 22: $V8, 23: $V9, 24: $Va, 25: 23, 33: 25, 41: $Vb, 42: $Vc, 43: $Vd, 44: $Ve, 45: $Vf, 46: $Vg, 54: $Vh, 72: $Vi, 74: $Vj, 77: $Vk, 89: $Vl, 90: $Vm }, { 4: 17, 5: $V5, 7: 46, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 18, 18: 19, 19: 20, 20: 21, 21: $V7, 22: $V8, 23: $V9, 24: $Va, 25: 23, 33: 25, 41: $Vb, 42: $Vc, 43: $Vd, 44: $Ve, 45: $Vf, 46: $Vg, 54: $Vh, 72: $Vi, 74: $Vj, 77: $Vk, 89: $Vl, 90: $Vm }, { 4: 17, 5: $V5, 7: 47, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 18, 18: 19, 19: 20, 20: 21, 21: $V7, 22: $V8, 23: $V9, 24: $Va, 25: 23, 33: 25, 41: $Vb, 42: $Vc, 43: $Vd, 44: $Ve, 45: $Vf, 46: $Vg, 54: $Vh, 72: $Vi, 74: $Vj, 77: $Vk, 89: $Vl, 90: $Vm }, { 4: 17, 5: $V5, 7: 48, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 18, 18: 19, 19: 20, 20: 21, 21: $V7, 22: $V8, 23: $V9, 24: $Va, 25: 23, 33: 25, 41: $Vb, 42: $Vc, 43: $Vd, 44: $Ve, 45: $Vf, 46: $Vg, 54: $Vh, 72: $Vi, 74: $Vj, 77: $Vk, 89: $Vl, 90: $Vm }, { 4: 17, 5: $V5, 7: 49, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 18, 18: 19, 19: 20, 20: 21, 21: $V7, 22: $V8, 23: $V9, 24: $Va, 25: 23, 33: 25, 41: $Vb, 42: $Vc, 43: $Vd, 44: $Ve, 45: $Vf, 46: $Vg, 54: $Vh, 72: $Vi, 74: $Vj, 77: $Vk, 89: $Vl, 90: $Vm }, { 4: 17, 5: $V5, 7: 50, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 18, 18: 19, 19: 20, 20: 21, 21: $V7, 22: $V8, 23: $V9, 24: $Va, 25: 23, 33: 25, 41: $Vb, 42: $Vc, 43: $Vd, 44: $Ve, 45: $Vf, 46: $Vg, 54: $Vh, 72: $Vi, 74: $Vj, 77: $Vk, 89: $Vl, 90: $Vm }, { 26: 51, 89: [1, 52], 90: [1, 53] }, { 55: 54, 89: [1, 55], 90: [1, 56] }, { 29: [1, 59], 61: [1, 57], 63: [1, 58] }, o($Vn, [2, 17]), o($Vn, [2, 18]), o($Vn, [2, 19]), o($Vn, [2, 20]), { 30: 60, 33: 62, 75: $Vo, 89: $Vl, 90: $Vm }, { 30: 63, 33: 62, 75: $Vo, 89: $Vl, 90: $Vm }, { 30: 64, 33: 62, 75: $Vo, 89: $Vl, 90: $Vm }, o($Vp, [2, 29]), o($Vp, [2, 30]), o($Vp, [2, 31]), o($Vp, [2, 32]), o($Vp, [2, 33]), o($Vp, [2, 34]), o($Vq, [2, 81]), o($Vq, [2, 82]), { 1: [2, 3] }, { 8: [2, 8] }, { 8: [2, 9] }, { 8: [2, 10] }, { 8: [2, 11] }, { 8: [2, 12] }, { 8: [2, 13] }, { 8: [2, 14] }, { 8: [2, 15] }, { 8: [2, 16] }, { 27: [1, 65], 29: [1, 66] }, o($Vr, [2, 79]), o($Vr, [2, 80]), { 27: [1, 67], 29: [1, 68] }, o($Vr, [2, 85]), o($Vr, [2, 86]), { 62: 69, 65: $Vs, 66: $Vt, 67: $Vu, 68: $Vv, 69: $Vw, 70: $Vx, 71: $Vy }, { 62: 77, 65: $Vs, 66: $Vt, 67: $Vu, 68: $Vv, 69: $Vw, 70: $Vx, 71: $Vy }, { 30: 78, 33: 62, 75: $Vo, 89: $Vl, 90: $Vm }, { 73: 79, 75: $Vz, 76: $VA, 78: 81, 79: 82, 80: $VB, 81: $VC, 82: $VD, 83: $VE, 84: $VF, 85: $VG, 86: $VH, 87: $VI, 88: $VJ }, o($VK, [2, 60]), o($VK, [2, 62]), { 73: 93, 75: $Vz, 76: $VA, 78: 81, 79: 82, 80: $VB, 81: $VC, 82: $VD, 83: $VE, 84: $VF, 85: $VG, 86: $VH, 87: $VI, 88: $VJ }, { 30: 94, 33: 62, 75: $Vo, 76: $VA, 89: $Vl, 90: $Vm }, { 5: [1, 95] }, { 30: 96, 33: 62, 75: $Vo, 89: $Vl, 90: $Vm }, { 5: [1, 97] }, { 30: 98, 33: 62, 75: $Vo, 89: $Vl, 90: $Vm }, { 63: [1, 99] }, o($VL, [2, 50]), o($VL, [2, 51]), o($VL, [2, 52]), o($VL, [2, 53]), o($VL, [2, 54]), o($VL, [2, 55]), o($VL, [2, 56]), { 64: [1, 100] }, o($Vn, [2, 59], { 76: $VA }), o($Vn, [2, 64], { 76: $VM }), { 33: 103, 75: [1, 102], 89: $Vl, 90: $Vm }, o($VN, [2, 65], { 79: 104, 75: $Vz, 80: $VB, 81: $VC, 82: $VD, 83: $VE, 84: $VF, 85: $VG, 86: $VH, 87: $VI, 88: $VJ }), o($VO, [2, 67]), o($VO, [2, 69]), o($VO, [2, 70]), o($VO, [2, 71]), o($VO, [2, 72]), o($VO, [2, 73]), o($VO, [2, 74]), o($VO, [2, 75]), o($VO, [2, 76]), o($VO, [2, 77]), o($VO, [2, 78]), o($Vn, [2, 57], { 76: $VM }), o($Vn, [2, 58], { 76: $VA }), { 5: $VP, 28: 105, 31: $VQ, 34: $VR, 36: $VS, 38: $VT, 40: $VU }, { 27: [1, 112], 76: $VA }, { 5: $VV, 40: $VW, 56: 113, 57: $VX, 59: $VY }, { 27: [1, 118], 76: $VA }, { 33: 119, 89: $Vl, 90: $Vm }, { 33: 120, 89: $Vl, 90: $Vm }, { 75: $Vz, 78: 121, 79: 82, 80: $VB, 81: $VC, 82: $VD, 83: $VE, 84: $VF, 85: $VG, 86: $VH, 87: $VI, 88: $VJ }, o($VK, [2, 61]), o($VK, [2, 63]), o($VO, [2, 68]), o($Vn, [2, 21]), { 32: [1, 122] }, { 32: [1, 123] }, { 32: [1, 124] }, { 32: [1, 125] }, { 5: $VP, 28: 126, 31: $VQ, 34: $VR, 36: $VS, 38: $VT, 40: $VU }, o($Vn, [2, 28]), { 5: [1, 127] }, o($Vn, [2, 42]), { 32: [1, 128] }, { 32: [1, 129] }, { 5: $VV, 40: $VW, 56: 130, 57: $VX, 59: $VY }, o($Vn, [2, 47]), { 5: [1, 131] }, o($Vn, [2, 48]), o($Vn, [2, 49]), o($VN, [2, 66], { 79: 104, 75: $Vz, 80: $VB, 81: $VC, 82: $VD, 83: $VE, 84: $VF, 85: $VG, 86: $VH, 87: $VI, 88: $VJ }), { 33: 132, 89: $Vl, 90: $Vm }, { 35: 133, 89: [1, 134], 90: [1, 135] }, { 37: 136, 47: [1, 137], 48: [1, 138], 49: [1, 139] }, { 39: 140, 50: [1, 141], 51: [1, 142], 52: [1, 143], 53: [1, 144] }, o($Vn, [2, 27]), { 5: $VP, 28: 145, 31: $VQ, 34: $VR, 36: $VS, 38: $VT, 40: $VU }, { 58: 146, 89: [1, 147], 90: [1, 148] }, { 60: 149, 89: [1, 150], 90: [1, 151] }, o($Vn, [2, 46]), { 5: $VV, 40: $VW, 56: 152, 57: $VX, 59: $VY }, { 5: [1, 153] }, { 5: [1, 154] }, { 5: [2, 83] }, { 5: [2, 84] }, { 5: [1, 155] }, { 5: [2, 35] }, { 5: [2, 36] }, { 5: [2, 37] }, { 5: [1, 156] }, { 5: [2, 38] }, { 5: [2, 39] }, { 5: [2, 40] }, { 5: [2, 41] }, o($Vn, [2, 22]), { 5: [1, 157] }, { 5: [2, 87] }, { 5: [2, 88] }, { 5: [1, 158] }, { 5: [2, 89] }, { 5: [2, 90] }, o($Vn, [2, 43]), { 5: $VP, 28: 159, 31: $VQ, 34: $VR, 36: $VS, 38: $VT, 40: $VU }, { 5: $VP, 28: 160, 31: $VQ, 34: $VR, 36: $VS, 38: $VT, 40: $VU }, { 5: $VP, 28: 161, 31: $VQ, 34: $VR, 36: $VS, 38: $VT, 40: $VU }, { 5: $VP, 28: 162, 31: $VQ, 34: $VR, 36: $VS, 38: $VT, 40: $VU }, { 5: $VV, 40: $VW, 56: 163, 57: $VX, 59: $VY }, { 5: $VV, 40: $VW, 56: 164, 57: $VX, 59: $VY }, o($Vn, [2, 23]), o($Vn, [2, 24]), o($Vn, [2, 25]), o($Vn, [2, 26]), o($Vn, [2, 44]), o($Vn, [2, 45])],
217
+ defaultActions: { 8: [2, 2], 12: [2, 1], 41: [2, 3], 42: [2, 8], 43: [2, 9], 44: [2, 10], 45: [2, 11], 46: [2, 12], 47: [2, 13], 48: [2, 14], 49: [2, 15], 50: [2, 16], 134: [2, 83], 135: [2, 84], 137: [2, 35], 138: [2, 36], 139: [2, 37], 141: [2, 38], 142: [2, 39], 143: [2, 40], 144: [2, 41], 147: [2, 87], 148: [2, 88], 150: [2, 89], 151: [2, 90] },
218
+ parseError: /* @__PURE__ */ __name(function parseError(str, hash) {
219
+ if (hash.recoverable) {
220
+ this.trace(str);
221
+ } else {
222
+ var error = new Error(str);
223
+ error.hash = hash;
224
+ throw error;
225
+ }
226
+ }, "parseError"),
227
+ parse: /* @__PURE__ */ __name(function parse(input) {
228
+ var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
229
+ var args = lstack.slice.call(arguments, 1);
230
+ var lexer2 = Object.create(this.lexer);
231
+ var sharedState = { yy: {} };
232
+ for (var k in this.yy) {
233
+ if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
234
+ sharedState.yy[k] = this.yy[k];
235
+ }
236
+ }
237
+ lexer2.setInput(input, sharedState.yy);
238
+ sharedState.yy.lexer = lexer2;
239
+ sharedState.yy.parser = this;
240
+ if (typeof lexer2.yylloc == "undefined") {
241
+ lexer2.yylloc = {};
242
+ }
243
+ var yyloc = lexer2.yylloc;
244
+ lstack.push(yyloc);
245
+ var ranges = lexer2.options && lexer2.options.ranges;
246
+ if (typeof sharedState.yy.parseError === "function") {
247
+ this.parseError = sharedState.yy.parseError;
248
+ } else {
249
+ this.parseError = Object.getPrototypeOf(this).parseError;
250
+ }
251
+ function popStack(n) {
252
+ stack.length = stack.length - 2 * n;
253
+ vstack.length = vstack.length - n;
254
+ lstack.length = lstack.length - n;
255
+ }
256
+ __name(popStack, "popStack");
257
+ function lex() {
258
+ var token;
259
+ token = tstack.pop() || lexer2.lex() || EOF;
260
+ if (typeof token !== "number") {
261
+ if (token instanceof Array) {
262
+ tstack = token;
263
+ token = tstack.pop();
264
+ }
265
+ token = self.symbols_[token] || token;
266
+ }
267
+ return token;
268
+ }
269
+ __name(lex, "lex");
270
+ var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;
271
+ while (true) {
272
+ state = stack[stack.length - 1];
273
+ if (this.defaultActions[state]) {
274
+ action = this.defaultActions[state];
275
+ } else {
276
+ if (symbol === null || typeof symbol == "undefined") {
277
+ symbol = lex();
278
+ }
279
+ action = table[state] && table[state][symbol];
280
+ }
281
+ if (typeof action === "undefined" || !action.length || !action[0]) {
282
+ var errStr = "";
283
+ expected = [];
284
+ for (p in table[state]) {
285
+ if (this.terminals_[p] && p > TERROR) {
286
+ expected.push("'" + this.terminals_[p] + "'");
287
+ }
288
+ }
289
+ if (lexer2.showPosition) {
290
+ errStr = "Parse error on line " + (yylineno + 1) + `:
291
+ ` + lexer2.showPosition() + `
292
+ Expecting ` + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
293
+ } else {
294
+ errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
295
+ }
296
+ this.parseError(errStr, {
297
+ text: lexer2.match,
298
+ token: this.terminals_[symbol] || symbol,
299
+ line: lexer2.yylineno,
300
+ loc: yyloc,
301
+ expected
302
+ });
303
+ }
304
+ if (action[0] instanceof Array && action.length > 1) {
305
+ throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
306
+ }
307
+ switch (action[0]) {
308
+ case 1:
309
+ stack.push(symbol);
310
+ vstack.push(lexer2.yytext);
311
+ lstack.push(lexer2.yylloc);
312
+ stack.push(action[1]);
313
+ symbol = null;
314
+ if (!preErrorSymbol) {
315
+ yyleng = lexer2.yyleng;
316
+ yytext = lexer2.yytext;
317
+ yylineno = lexer2.yylineno;
318
+ yyloc = lexer2.yylloc;
319
+ if (recovering > 0) {
320
+ recovering--;
321
+ }
322
+ } else {
323
+ symbol = preErrorSymbol;
324
+ preErrorSymbol = null;
325
+ }
326
+ break;
327
+ case 2:
328
+ len = this.productions_[action[1]][1];
329
+ yyval.$ = vstack[vstack.length - len];
330
+ yyval._$ = {
331
+ first_line: lstack[lstack.length - (len || 1)].first_line,
332
+ last_line: lstack[lstack.length - 1].last_line,
333
+ first_column: lstack[lstack.length - (len || 1)].first_column,
334
+ last_column: lstack[lstack.length - 1].last_column
335
+ };
336
+ if (ranges) {
337
+ yyval._$.range = [
338
+ lstack[lstack.length - (len || 1)].range[0],
339
+ lstack[lstack.length - 1].range[1]
340
+ ];
341
+ }
342
+ r = this.performAction.apply(yyval, [
343
+ yytext,
344
+ yyleng,
345
+ yylineno,
346
+ sharedState.yy,
347
+ action[1],
348
+ vstack,
349
+ lstack
350
+ ].concat(args));
351
+ if (typeof r !== "undefined") {
352
+ return r;
353
+ }
354
+ if (len) {
355
+ stack = stack.slice(0, -1 * len * 2);
356
+ vstack = vstack.slice(0, -1 * len);
357
+ lstack = lstack.slice(0, -1 * len);
358
+ }
359
+ stack.push(this.productions_[action[1]][0]);
360
+ vstack.push(yyval.$);
361
+ lstack.push(yyval._$);
362
+ newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
363
+ stack.push(newState);
364
+ break;
365
+ case 3:
366
+ return true;
367
+ }
368
+ }
369
+ return true;
370
+ }, "parse")
371
+ };
372
+ var lexer = /* @__PURE__ */ function() {
373
+ var lexer2 = {
374
+ EOF: 1,
375
+ parseError: /* @__PURE__ */ __name(function parseError(str, hash) {
376
+ if (this.yy.parser) {
377
+ this.yy.parser.parseError(str, hash);
378
+ } else {
379
+ throw new Error(str);
380
+ }
381
+ }, "parseError"),
382
+ setInput: /* @__PURE__ */ __name(function(input, yy) {
383
+ this.yy = yy || this.yy || {};
384
+ this._input = input;
385
+ this._more = this._backtrack = this.done = false;
386
+ this.yylineno = this.yyleng = 0;
387
+ this.yytext = this.matched = this.match = "";
388
+ this.conditionStack = ["INITIAL"];
389
+ this.yylloc = {
390
+ first_line: 1,
391
+ first_column: 0,
392
+ last_line: 1,
393
+ last_column: 0
394
+ };
395
+ if (this.options.ranges) {
396
+ this.yylloc.range = [0, 0];
397
+ }
398
+ this.offset = 0;
399
+ return this;
400
+ }, "setInput"),
401
+ input: /* @__PURE__ */ __name(function() {
402
+ var ch = this._input[0];
403
+ this.yytext += ch;
404
+ this.yyleng++;
405
+ this.offset++;
406
+ this.match += ch;
407
+ this.matched += ch;
408
+ var lines = ch.match(/(?:\r\n?|\n).*/g);
409
+ if (lines) {
410
+ this.yylineno++;
411
+ this.yylloc.last_line++;
412
+ } else {
413
+ this.yylloc.last_column++;
414
+ }
415
+ if (this.options.ranges) {
416
+ this.yylloc.range[1]++;
417
+ }
418
+ this._input = this._input.slice(1);
419
+ return ch;
420
+ }, "input"),
421
+ unput: /* @__PURE__ */ __name(function(ch) {
422
+ var len = ch.length;
423
+ var lines = ch.split(/(?:\r\n?|\n)/g);
424
+ this._input = ch + this._input;
425
+ this.yytext = this.yytext.substr(0, this.yytext.length - len);
426
+ this.offset -= len;
427
+ var oldLines = this.match.split(/(?:\r\n?|\n)/g);
428
+ this.match = this.match.substr(0, this.match.length - 1);
429
+ this.matched = this.matched.substr(0, this.matched.length - 1);
430
+ if (lines.length - 1) {
431
+ this.yylineno -= lines.length - 1;
432
+ }
433
+ var r = this.yylloc.range;
434
+ this.yylloc = {
435
+ first_line: this.yylloc.first_line,
436
+ last_line: this.yylineno + 1,
437
+ first_column: this.yylloc.first_column,
438
+ last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
439
+ };
440
+ if (this.options.ranges) {
441
+ this.yylloc.range = [r[0], r[0] + this.yyleng - len];
442
+ }
443
+ this.yyleng = this.yytext.length;
444
+ return this;
445
+ }, "unput"),
446
+ more: /* @__PURE__ */ __name(function() {
447
+ this._more = true;
448
+ return this;
449
+ }, "more"),
450
+ reject: /* @__PURE__ */ __name(function() {
451
+ if (this.options.backtrack_lexer) {
452
+ this._backtrack = true;
453
+ } else {
454
+ 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).
455
+ ` + this.showPosition(), {
456
+ text: "",
457
+ token: null,
458
+ line: this.yylineno
459
+ });
460
+ }
461
+ return this;
462
+ }, "reject"),
463
+ less: /* @__PURE__ */ __name(function(n) {
464
+ this.unput(this.match.slice(n));
465
+ }, "less"),
466
+ pastInput: /* @__PURE__ */ __name(function() {
467
+ var past = this.matched.substr(0, this.matched.length - this.match.length);
468
+ return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
469
+ }, "pastInput"),
470
+ upcomingInput: /* @__PURE__ */ __name(function() {
471
+ var next = this.match;
472
+ if (next.length < 20) {
473
+ next += this._input.substr(0, 20 - next.length);
474
+ }
475
+ return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
476
+ }, "upcomingInput"),
477
+ showPosition: /* @__PURE__ */ __name(function() {
478
+ var pre = this.pastInput();
479
+ var c = new Array(pre.length + 1).join("-");
480
+ return pre + this.upcomingInput() + `
481
+ ` + c + "^";
482
+ }, "showPosition"),
483
+ test_match: /* @__PURE__ */ __name(function(match, indexed_rule) {
484
+ var token, lines, backup;
485
+ if (this.options.backtrack_lexer) {
486
+ backup = {
487
+ yylineno: this.yylineno,
488
+ yylloc: {
489
+ first_line: this.yylloc.first_line,
490
+ last_line: this.last_line,
491
+ first_column: this.yylloc.first_column,
492
+ last_column: this.yylloc.last_column
493
+ },
494
+ yytext: this.yytext,
495
+ match: this.match,
496
+ matches: this.matches,
497
+ matched: this.matched,
498
+ yyleng: this.yyleng,
499
+ offset: this.offset,
500
+ _more: this._more,
501
+ _input: this._input,
502
+ yy: this.yy,
503
+ conditionStack: this.conditionStack.slice(0),
504
+ done: this.done
505
+ };
506
+ if (this.options.ranges) {
507
+ backup.yylloc.range = this.yylloc.range.slice(0);
508
+ }
509
+ }
510
+ lines = match[0].match(/(?:\r\n?|\n).*/g);
511
+ if (lines) {
512
+ this.yylineno += lines.length;
513
+ }
514
+ this.yylloc = {
515
+ first_line: this.yylloc.last_line,
516
+ last_line: this.yylineno + 1,
517
+ first_column: this.yylloc.last_column,
518
+ last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
519
+ };
520
+ this.yytext += match[0];
521
+ this.match += match[0];
522
+ this.matches = match;
523
+ this.yyleng = this.yytext.length;
524
+ if (this.options.ranges) {
525
+ this.yylloc.range = [this.offset, this.offset += this.yyleng];
526
+ }
527
+ this._more = false;
528
+ this._backtrack = false;
529
+ this._input = this._input.slice(match[0].length);
530
+ this.matched += match[0];
531
+ token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
532
+ if (this.done && this._input) {
533
+ this.done = false;
534
+ }
535
+ if (token) {
536
+ return token;
537
+ } else if (this._backtrack) {
538
+ for (var k in backup) {
539
+ this[k] = backup[k];
540
+ }
541
+ return false;
542
+ }
543
+ return false;
544
+ }, "test_match"),
545
+ next: /* @__PURE__ */ __name(function() {
546
+ if (this.done) {
547
+ return this.EOF;
548
+ }
549
+ if (!this._input) {
550
+ this.done = true;
551
+ }
552
+ var token, match, tempMatch, index;
553
+ if (!this._more) {
554
+ this.yytext = "";
555
+ this.match = "";
556
+ }
557
+ var rules = this._currentRules();
558
+ for (var i = 0;i < rules.length; i++) {
559
+ tempMatch = this._input.match(this.rules[rules[i]]);
560
+ if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
561
+ match = tempMatch;
562
+ index = i;
563
+ if (this.options.backtrack_lexer) {
564
+ token = this.test_match(tempMatch, rules[i]);
565
+ if (token !== false) {
566
+ return token;
567
+ } else if (this._backtrack) {
568
+ match = false;
569
+ continue;
570
+ } else {
571
+ return false;
572
+ }
573
+ } else if (!this.options.flex) {
574
+ break;
575
+ }
576
+ }
577
+ }
578
+ if (match) {
579
+ token = this.test_match(match, rules[index]);
580
+ if (token !== false) {
581
+ return token;
582
+ }
583
+ return false;
584
+ }
585
+ if (this._input === "") {
586
+ return this.EOF;
587
+ } else {
588
+ return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
589
+ ` + this.showPosition(), {
590
+ text: "",
591
+ token: null,
592
+ line: this.yylineno
593
+ });
594
+ }
595
+ }, "next"),
596
+ lex: /* @__PURE__ */ __name(function lex() {
597
+ var r = this.next();
598
+ if (r) {
599
+ return r;
600
+ } else {
601
+ return this.lex();
602
+ }
603
+ }, "lex"),
604
+ begin: /* @__PURE__ */ __name(function begin(condition) {
605
+ this.conditionStack.push(condition);
606
+ }, "begin"),
607
+ popState: /* @__PURE__ */ __name(function popState() {
608
+ var n = this.conditionStack.length - 1;
609
+ if (n > 0) {
610
+ return this.conditionStack.pop();
611
+ } else {
612
+ return this.conditionStack[0];
613
+ }
614
+ }, "popState"),
615
+ _currentRules: /* @__PURE__ */ __name(function _currentRules() {
616
+ if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
617
+ return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
618
+ } else {
619
+ return this.conditions["INITIAL"].rules;
620
+ }
621
+ }, "_currentRules"),
622
+ topState: /* @__PURE__ */ __name(function topState(n) {
623
+ n = this.conditionStack.length - 1 - Math.abs(n || 0);
624
+ if (n >= 0) {
625
+ return this.conditionStack[n];
626
+ } else {
627
+ return "INITIAL";
628
+ }
629
+ }, "topState"),
630
+ pushState: /* @__PURE__ */ __name(function pushState(condition) {
631
+ this.begin(condition);
632
+ }, "pushState"),
633
+ stateStackSize: /* @__PURE__ */ __name(function stateStackSize() {
634
+ return this.conditionStack.length;
635
+ }, "stateStackSize"),
636
+ options: { "case-insensitive": true },
637
+ performAction: /* @__PURE__ */ __name(function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
638
+ var YYSTATE = YY_START;
639
+ switch ($avoiding_name_collisions) {
640
+ case 0:
641
+ return "title";
642
+ break;
643
+ case 1:
644
+ this.begin("acc_title");
645
+ return 9;
646
+ break;
647
+ case 2:
648
+ this.popState();
649
+ return "acc_title_value";
650
+ break;
651
+ case 3:
652
+ this.begin("acc_descr");
653
+ return 11;
654
+ break;
655
+ case 4:
656
+ this.popState();
657
+ return "acc_descr_value";
658
+ break;
659
+ case 5:
660
+ this.begin("acc_descr_multiline");
661
+ break;
662
+ case 6:
663
+ this.popState();
664
+ break;
665
+ case 7:
666
+ return "acc_descr_multiline_value";
667
+ break;
668
+ case 8:
669
+ return 21;
670
+ break;
671
+ case 9:
672
+ return 22;
673
+ break;
674
+ case 10:
675
+ return 23;
676
+ break;
677
+ case 11:
678
+ return 24;
679
+ break;
680
+ case 12:
681
+ return 5;
682
+ break;
683
+ case 13:
684
+ break;
685
+ case 14:
686
+ break;
687
+ case 15:
688
+ break;
689
+ case 16:
690
+ return 8;
691
+ break;
692
+ case 17:
693
+ return 6;
694
+ break;
695
+ case 18:
696
+ return 27;
697
+ break;
698
+ case 19:
699
+ return 40;
700
+ break;
701
+ case 20:
702
+ return 29;
703
+ break;
704
+ case 21:
705
+ return 32;
706
+ break;
707
+ case 22:
708
+ return 31;
709
+ break;
710
+ case 23:
711
+ return 34;
712
+ break;
713
+ case 24:
714
+ return 36;
715
+ break;
716
+ case 25:
717
+ return 38;
718
+ break;
719
+ case 26:
720
+ return 41;
721
+ break;
722
+ case 27:
723
+ return 42;
724
+ break;
725
+ case 28:
726
+ return 43;
727
+ break;
728
+ case 29:
729
+ return 44;
730
+ break;
731
+ case 30:
732
+ return 45;
733
+ break;
734
+ case 31:
735
+ return 46;
736
+ break;
737
+ case 32:
738
+ return 47;
739
+ break;
740
+ case 33:
741
+ return 48;
742
+ break;
743
+ case 34:
744
+ return 49;
745
+ break;
746
+ case 35:
747
+ return 50;
748
+ break;
749
+ case 36:
750
+ return 51;
751
+ break;
752
+ case 37:
753
+ return 52;
754
+ break;
755
+ case 38:
756
+ return 53;
757
+ break;
758
+ case 39:
759
+ return 54;
760
+ break;
761
+ case 40:
762
+ return 65;
763
+ break;
764
+ case 41:
765
+ return 66;
766
+ break;
767
+ case 42:
768
+ return 67;
769
+ break;
770
+ case 43:
771
+ return 68;
772
+ break;
773
+ case 44:
774
+ return 69;
775
+ break;
776
+ case 45:
777
+ return 70;
778
+ break;
779
+ case 46:
780
+ return 71;
781
+ break;
782
+ case 47:
783
+ return 57;
784
+ break;
785
+ case 48:
786
+ return 59;
787
+ break;
788
+ case 49:
789
+ this.begin("style");
790
+ return 77;
791
+ break;
792
+ case 50:
793
+ return 75;
794
+ break;
795
+ case 51:
796
+ return 81;
797
+ break;
798
+ case 52:
799
+ return 88;
800
+ break;
801
+ case 53:
802
+ return "PERCENT";
803
+ break;
804
+ case 54:
805
+ return 86;
806
+ break;
807
+ case 55:
808
+ return 84;
809
+ break;
810
+ case 56:
811
+ break;
812
+ case 57:
813
+ this.begin("string");
814
+ break;
815
+ case 58:
816
+ this.popState();
817
+ break;
818
+ case 59:
819
+ this.begin("style");
820
+ return 72;
821
+ break;
822
+ case 60:
823
+ this.begin("style");
824
+ return 74;
825
+ break;
826
+ case 61:
827
+ return 61;
828
+ break;
829
+ case 62:
830
+ return 64;
831
+ break;
832
+ case 63:
833
+ return 63;
834
+ break;
835
+ case 64:
836
+ this.begin("string");
837
+ break;
838
+ case 65:
839
+ this.popState();
840
+ break;
841
+ case 66:
842
+ return "qString";
843
+ break;
844
+ case 67:
845
+ yy_.yytext = yy_.yytext.trim();
846
+ return 89;
847
+ break;
848
+ case 68:
849
+ return 75;
850
+ break;
851
+ case 69:
852
+ return 80;
853
+ break;
854
+ case 70:
855
+ return 76;
856
+ break;
857
+ }
858
+ }, "anonymous"),
859
+ rules: [/^(?:title\s[^#\n;]+)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:.*direction\s+TB[^\n]*)/i, /^(?:.*direction\s+BT[^\n]*)/i, /^(?:.*direction\s+RL[^\n]*)/i, /^(?:.*direction\s+LR[^\n]*)/i, /^(?:(\r?\n)+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:%[^\n]*)/i, /^(?:$)/i, /^(?:requirementDiagram\b)/i, /^(?:\{)/i, /^(?:\})/i, /^(?::{3})/i, /^(?::)/i, /^(?:id\b)/i, /^(?:text\b)/i, /^(?:risk\b)/i, /^(?:verifyMethod\b)/i, /^(?:requirement\b)/i, /^(?:functionalRequirement\b)/i, /^(?:interfaceRequirement\b)/i, /^(?:performanceRequirement\b)/i, /^(?:physicalRequirement\b)/i, /^(?:designConstraint\b)/i, /^(?:low\b)/i, /^(?:medium\b)/i, /^(?:high\b)/i, /^(?:analysis\b)/i, /^(?:demonstration\b)/i, /^(?:inspection\b)/i, /^(?:test\b)/i, /^(?:element\b)/i, /^(?:contains\b)/i, /^(?:copies\b)/i, /^(?:derives\b)/i, /^(?:satisfies\b)/i, /^(?:verifies\b)/i, /^(?:refines\b)/i, /^(?:traces\b)/i, /^(?:type\b)/i, /^(?:docref\b)/i, /^(?:style\b)/i, /^(?:\w+)/i, /^(?::)/i, /^(?:;)/i, /^(?:%)/i, /^(?:-)/i, /^(?:#)/i, /^(?: )/i, /^(?:["])/i, /^(?:\n)/i, /^(?:classDef\b)/i, /^(?:class\b)/i, /^(?:<-)/i, /^(?:->)/i, /^(?:-)/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[\w][^:,\r\n\{\<\>\-\=]*)/i, /^(?:\w+)/i, /^(?:[0-9]+)/i, /^(?:,)/i],
860
+ conditions: { acc_descr_multiline: { rules: [6, 7, 68, 69, 70], inclusive: false }, acc_descr: { rules: [4, 68, 69, 70], inclusive: false }, acc_title: { rules: [2, 68, 69, 70], inclusive: false }, style: { rules: [50, 51, 52, 53, 54, 55, 56, 57, 58, 68, 69, 70], inclusive: false }, unqString: { rules: [68, 69, 70], inclusive: false }, token: { rules: [68, 69, 70], inclusive: false }, string: { rules: [65, 66, 68, 69, 70], inclusive: false }, INITIAL: { rules: [0, 1, 3, 5, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 59, 60, 61, 62, 63, 64, 67, 68, 69, 70], inclusive: true } }
861
+ };
862
+ return lexer2;
863
+ }();
864
+ parser2.lexer = lexer;
865
+ function Parser() {
866
+ this.yy = {};
867
+ }
868
+ __name(Parser, "Parser");
869
+ Parser.prototype = parser2;
870
+ parser2.Parser = Parser;
871
+ return new Parser;
872
+ }();
873
+ parser.parser = parser;
874
+ var requirementDiagram_default = parser;
875
+ var RequirementDB = class {
876
+ constructor() {
877
+ this.relations = [];
878
+ this.latestRequirement = this.getInitialRequirement();
879
+ this.requirements = /* @__PURE__ */ new Map;
880
+ this.latestElement = this.getInitialElement();
881
+ this.elements = /* @__PURE__ */ new Map;
882
+ this.classes = /* @__PURE__ */ new Map;
883
+ this.direction = "TB";
884
+ this.RequirementType = {
885
+ REQUIREMENT: "Requirement",
886
+ FUNCTIONAL_REQUIREMENT: "Functional Requirement",
887
+ INTERFACE_REQUIREMENT: "Interface Requirement",
888
+ PERFORMANCE_REQUIREMENT: "Performance Requirement",
889
+ PHYSICAL_REQUIREMENT: "Physical Requirement",
890
+ DESIGN_CONSTRAINT: "Design Constraint"
891
+ };
892
+ this.RiskLevel = {
893
+ LOW_RISK: "Low",
894
+ MED_RISK: "Medium",
895
+ HIGH_RISK: "High"
896
+ };
897
+ this.VerifyType = {
898
+ VERIFY_ANALYSIS: "Analysis",
899
+ VERIFY_DEMONSTRATION: "Demonstration",
900
+ VERIFY_INSPECTION: "Inspection",
901
+ VERIFY_TEST: "Test"
902
+ };
903
+ this.Relationships = {
904
+ CONTAINS: "contains",
905
+ COPIES: "copies",
906
+ DERIVES: "derives",
907
+ SATISFIES: "satisfies",
908
+ VERIFIES: "verifies",
909
+ REFINES: "refines",
910
+ TRACES: "traces"
911
+ };
912
+ this.setAccTitle = setAccTitle;
913
+ this.getAccTitle = getAccTitle;
914
+ this.setAccDescription = setAccDescription;
915
+ this.getAccDescription = getAccDescription;
916
+ this.setDiagramTitle = setDiagramTitle;
917
+ this.getDiagramTitle = getDiagramTitle;
918
+ this.getConfig = /* @__PURE__ */ __name(() => getConfig2().requirement, "getConfig");
919
+ this.clear();
920
+ this.setDirection = this.setDirection.bind(this);
921
+ this.addRequirement = this.addRequirement.bind(this);
922
+ this.setNewReqId = this.setNewReqId.bind(this);
923
+ this.setNewReqRisk = this.setNewReqRisk.bind(this);
924
+ this.setNewReqText = this.setNewReqText.bind(this);
925
+ this.setNewReqVerifyMethod = this.setNewReqVerifyMethod.bind(this);
926
+ this.addElement = this.addElement.bind(this);
927
+ this.setNewElementType = this.setNewElementType.bind(this);
928
+ this.setNewElementDocRef = this.setNewElementDocRef.bind(this);
929
+ this.addRelationship = this.addRelationship.bind(this);
930
+ this.setCssStyle = this.setCssStyle.bind(this);
931
+ this.setClass = this.setClass.bind(this);
932
+ this.defineClass = this.defineClass.bind(this);
933
+ this.setAccTitle = this.setAccTitle.bind(this);
934
+ this.setAccDescription = this.setAccDescription.bind(this);
935
+ }
936
+ static {
937
+ __name(this, "RequirementDB");
938
+ }
939
+ getDirection() {
940
+ return this.direction;
941
+ }
942
+ setDirection(dir) {
943
+ this.direction = dir;
944
+ }
945
+ resetLatestRequirement() {
946
+ this.latestRequirement = this.getInitialRequirement();
947
+ }
948
+ resetLatestElement() {
949
+ this.latestElement = this.getInitialElement();
950
+ }
951
+ getInitialRequirement() {
952
+ return {
953
+ requirementId: "",
954
+ text: "",
955
+ risk: "",
956
+ verifyMethod: "",
957
+ name: "",
958
+ type: "",
959
+ cssStyles: [],
960
+ classes: ["default"]
961
+ };
962
+ }
963
+ getInitialElement() {
964
+ return {
965
+ name: "",
966
+ type: "",
967
+ docRef: "",
968
+ cssStyles: [],
969
+ classes: ["default"]
970
+ };
971
+ }
972
+ addRequirement(name, type) {
973
+ if (!this.requirements.has(name)) {
974
+ this.requirements.set(name, {
975
+ name,
976
+ type,
977
+ requirementId: this.latestRequirement.requirementId,
978
+ text: this.latestRequirement.text,
979
+ risk: this.latestRequirement.risk,
980
+ verifyMethod: this.latestRequirement.verifyMethod,
981
+ cssStyles: [],
982
+ classes: ["default"]
983
+ });
984
+ }
985
+ this.resetLatestRequirement();
986
+ return this.requirements.get(name);
987
+ }
988
+ getRequirements() {
989
+ return this.requirements;
990
+ }
991
+ setNewReqId(id) {
992
+ if (this.latestRequirement !== undefined) {
993
+ this.latestRequirement.requirementId = id;
994
+ }
995
+ }
996
+ setNewReqText(text) {
997
+ if (this.latestRequirement !== undefined) {
998
+ this.latestRequirement.text = text;
999
+ }
1000
+ }
1001
+ setNewReqRisk(risk) {
1002
+ if (this.latestRequirement !== undefined) {
1003
+ this.latestRequirement.risk = risk;
1004
+ }
1005
+ }
1006
+ setNewReqVerifyMethod(verifyMethod) {
1007
+ if (this.latestRequirement !== undefined) {
1008
+ this.latestRequirement.verifyMethod = verifyMethod;
1009
+ }
1010
+ }
1011
+ addElement(name) {
1012
+ if (!this.elements.has(name)) {
1013
+ this.elements.set(name, {
1014
+ name,
1015
+ type: this.latestElement.type,
1016
+ docRef: this.latestElement.docRef,
1017
+ cssStyles: [],
1018
+ classes: ["default"]
1019
+ });
1020
+ log.info("Added new element: ", name);
1021
+ }
1022
+ this.resetLatestElement();
1023
+ return this.elements.get(name);
1024
+ }
1025
+ getElements() {
1026
+ return this.elements;
1027
+ }
1028
+ setNewElementType(type) {
1029
+ if (this.latestElement !== undefined) {
1030
+ this.latestElement.type = type;
1031
+ }
1032
+ }
1033
+ setNewElementDocRef(docRef) {
1034
+ if (this.latestElement !== undefined) {
1035
+ this.latestElement.docRef = docRef;
1036
+ }
1037
+ }
1038
+ addRelationship(type, src, dst) {
1039
+ this.relations.push({
1040
+ type,
1041
+ src,
1042
+ dst
1043
+ });
1044
+ }
1045
+ getRelationships() {
1046
+ return this.relations;
1047
+ }
1048
+ clear() {
1049
+ this.relations = [];
1050
+ this.resetLatestRequirement();
1051
+ this.requirements = /* @__PURE__ */ new Map;
1052
+ this.resetLatestElement();
1053
+ this.elements = /* @__PURE__ */ new Map;
1054
+ this.classes = /* @__PURE__ */ new Map;
1055
+ clear();
1056
+ }
1057
+ setCssStyle(ids, styles) {
1058
+ for (const id of ids) {
1059
+ const node = this.requirements.get(id) ?? this.elements.get(id);
1060
+ if (!styles || !node) {
1061
+ return;
1062
+ }
1063
+ for (const s of styles) {
1064
+ if (s.includes(",")) {
1065
+ node.cssStyles.push(...s.split(","));
1066
+ } else {
1067
+ node.cssStyles.push(s);
1068
+ }
1069
+ }
1070
+ }
1071
+ }
1072
+ setClass(ids, classNames) {
1073
+ for (const id of ids) {
1074
+ const node = this.requirements.get(id) ?? this.elements.get(id);
1075
+ if (node) {
1076
+ for (const _class of classNames) {
1077
+ node.classes.push(_class);
1078
+ const styles = this.classes.get(_class)?.styles;
1079
+ if (styles) {
1080
+ node.cssStyles.push(...styles);
1081
+ }
1082
+ }
1083
+ }
1084
+ }
1085
+ }
1086
+ defineClass(ids, style) {
1087
+ for (const id of ids) {
1088
+ let styleClass = this.classes.get(id);
1089
+ if (styleClass === undefined) {
1090
+ styleClass = { id, styles: [], textStyles: [] };
1091
+ this.classes.set(id, styleClass);
1092
+ }
1093
+ if (style) {
1094
+ style.forEach(function(s) {
1095
+ if (/color/.exec(s)) {
1096
+ const newStyle = s.replace("fill", "bgFill");
1097
+ styleClass.textStyles.push(newStyle);
1098
+ }
1099
+ styleClass.styles.push(s);
1100
+ });
1101
+ }
1102
+ this.requirements.forEach((value) => {
1103
+ if (value.classes.includes(id)) {
1104
+ value.cssStyles.push(...style.flatMap((s) => s.split(",")));
1105
+ }
1106
+ });
1107
+ this.elements.forEach((value) => {
1108
+ if (value.classes.includes(id)) {
1109
+ value.cssStyles.push(...style.flatMap((s) => s.split(",")));
1110
+ }
1111
+ });
1112
+ }
1113
+ }
1114
+ getClasses() {
1115
+ return this.classes;
1116
+ }
1117
+ getData() {
1118
+ const config = getConfig2();
1119
+ const nodes = [];
1120
+ const edges = [];
1121
+ for (const requirement of this.requirements.values()) {
1122
+ const node = requirement;
1123
+ node.id = requirement.name;
1124
+ node.cssStyles = requirement.cssStyles;
1125
+ node.cssClasses = requirement.classes.join(" ");
1126
+ node.shape = "requirementBox";
1127
+ node.look = config.look;
1128
+ node.colorIndex = nodes.length;
1129
+ nodes.push(node);
1130
+ }
1131
+ for (const element of this.elements.values()) {
1132
+ const node = element;
1133
+ node.shape = "requirementBox";
1134
+ node.look = config.look;
1135
+ node.id = element.name;
1136
+ node.cssStyles = element.cssStyles;
1137
+ node.cssClasses = element.classes.join(" ");
1138
+ node.colorIndex = nodes.length;
1139
+ nodes.push(node);
1140
+ }
1141
+ for (const relation of this.relations) {
1142
+ let counter = 0;
1143
+ const isContains = relation.type === this.Relationships.CONTAINS;
1144
+ const edge = {
1145
+ id: `${relation.src}-${relation.dst}-${counter}`,
1146
+ start: this.requirements.get(relation.src)?.name ?? this.elements.get(relation.src)?.name,
1147
+ end: this.requirements.get(relation.dst)?.name ?? this.elements.get(relation.dst)?.name,
1148
+ label: `&lt;&lt;${relation.type}&gt;&gt;`,
1149
+ classes: "relationshipLine",
1150
+ style: ["fill:none", isContains ? "" : "stroke-dasharray: 10,7"],
1151
+ labelpos: "c",
1152
+ thickness: "normal",
1153
+ type: "normal",
1154
+ pattern: isContains ? "normal" : "dashed",
1155
+ arrowTypeStart: isContains ? "requirement_contains" : "",
1156
+ arrowTypeEnd: isContains ? "" : "requirement_arrow",
1157
+ look: config.look,
1158
+ labelType: "markdown"
1159
+ };
1160
+ edges.push(edge);
1161
+ counter++;
1162
+ }
1163
+ return { nodes, edges, other: {}, config, direction: this.getDirection() };
1164
+ }
1165
+ };
1166
+ var genColor = /* @__PURE__ */ __name((options) => {
1167
+ const config = getConfig();
1168
+ const { themeVariables, look } = config;
1169
+ const { bkgColorArray, borderColorArray } = themeVariables;
1170
+ if (!borderColorArray?.length) {
1171
+ return "";
1172
+ }
1173
+ let sections = "";
1174
+ for (let i = 0;i < options.THEME_COLOR_LIMIT; i++) {
1175
+ sections += `
1176
+
1177
+ [data-look="${look}"][data-color-id="color-${i}"].node path {
1178
+ stroke: ${borderColorArray[i]};
1179
+ fill: ${bkgColorArray?.length ? bkgColorArray[i] : ""};
1180
+ }
1181
+
1182
+ [data-look="${look}"][data-color-id="color-${i}"].node rect {
1183
+ stroke: ${borderColorArray[i]};
1184
+ fill: ${bkgColorArray?.length ? bkgColorArray[i] : ""};
1185
+ }
1186
+ `;
1187
+ }
1188
+ return sections;
1189
+ }, "genColor");
1190
+ var getStyles = /* @__PURE__ */ __name((options) => {
1191
+ const config = getConfig();
1192
+ const { look, themeVariables } = config;
1193
+ const { requirementEdgeLabelBackground } = themeVariables;
1194
+ return `
1195
+ ${genColor(options)}
1196
+ marker {
1197
+ fill: ${options.relationColor};
1198
+ stroke: ${options.relationColor};
1199
+ }
1200
+
1201
+ marker.cross {
1202
+ stroke: ${options.lineColor};
1203
+ }
1204
+
1205
+ svg {
1206
+ font-family: ${options.fontFamily};
1207
+ font-size: ${options.fontSize};
1208
+ }
1209
+
1210
+ .reqBox {
1211
+ fill: ${options.requirementBackground};
1212
+ fill-opacity: 1.0;
1213
+ stroke: ${options.requirementBorderColor};
1214
+ stroke-width: ${options.requirementBorderSize};
1215
+ }
1216
+
1217
+ .reqTitle, .reqLabel{
1218
+ fill: ${options.requirementTextColor};
1219
+ }
1220
+ .reqLabelBox {
1221
+ fill: ${options.relationLabelBackground};
1222
+ fill-opacity: 1.0;
1223
+ }
1224
+
1225
+ .req-title-line {
1226
+ stroke: ${options.requirementBorderColor};
1227
+ stroke-width: ${options.requirementBorderSize};
1228
+ }
1229
+ .relationshipLine {
1230
+ stroke: ${options.relationColor};
1231
+ stroke-width: ${look === "neo" ? options.strokeWidth : "1px"};
1232
+ }
1233
+ .relationshipLabel {
1234
+ fill: ${options.relationLabelColor};
1235
+ }
1236
+ .edgeLabel {
1237
+ background-color: ${options.edgeLabelBackground};
1238
+ }
1239
+ .edgeLabel .label rect {
1240
+ fill: ${options.edgeLabelBackground};
1241
+ }
1242
+ .edgeLabel .label text {
1243
+ fill: ${options.relationLabelColor};
1244
+ }
1245
+ .divider {
1246
+ stroke: ${options.nodeBorder};
1247
+ stroke-width: 1;
1248
+ }
1249
+ .label {
1250
+ font-family: ${options.fontFamily};
1251
+ color: ${options.nodeTextColor || options.textColor};
1252
+ }
1253
+ .label text,span {
1254
+ fill: ${options.nodeTextColor || options.textColor};
1255
+ color: ${options.nodeTextColor || options.textColor};
1256
+ }
1257
+ .labelBkg {
1258
+ background-color: ${requirementEdgeLabelBackground ?? options.edgeLabelBackground};
1259
+ }
1260
+
1261
+ `;
1262
+ }, "getStyles");
1263
+ var styles_default = getStyles;
1264
+ var requirementRenderer_exports = {};
1265
+ __export(requirementRenderer_exports, {
1266
+ draw: () => draw
1267
+ });
1268
+ var draw = /* @__PURE__ */ __name(async function(text, id, _version, diag) {
1269
+ log.info("REF0:");
1270
+ log.info("Drawing requirement diagram (unified)", id);
1271
+ const { securityLevel, state: conf, layout, look } = getConfig2();
1272
+ const data4Layout = diag.db.getData();
1273
+ const svg = getDiagramElement(id, securityLevel);
1274
+ data4Layout.type = diag.type;
1275
+ data4Layout.layoutAlgorithm = getRegisteredLayoutAlgorithm(layout);
1276
+ data4Layout.nodeSpacing = conf?.nodeSpacing ?? 50;
1277
+ data4Layout.rankSpacing = conf?.rankSpacing ?? 50;
1278
+ data4Layout.markers = look === "neo" ? ["requirement_contains_neo", "requirement_arrow_neo"] : ["requirement_contains", "requirement_arrow"];
1279
+ data4Layout.diagramId = id;
1280
+ await render(data4Layout, svg);
1281
+ const padding = 8;
1282
+ utils_default.insertTitle(svg, "requirementDiagramTitleText", conf?.titleTopMargin ?? 25, diag.db.getDiagramTitle());
1283
+ setupViewPortForSVG(svg, padding, "requirementDiagram", conf?.useMaxWidth ?? true);
1284
+ }, "draw");
1285
+ var diagram = {
1286
+ parser: requirementDiagram_default,
1287
+ get db() {
1288
+ return new RequirementDB;
1289
+ },
1290
+ renderer: requirementRenderer_exports,
1291
+ styles: styles_default
1292
+ };
1293
+ export {
1294
+ diagram
1295
+ };