@vunk/plus 1.6.11 → 1.7.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 (321) hide show
  1. package/components/_baseUniq-BXtq6_NW.mjs +239 -0
  2. package/components/abap-B7h4dtBh.mjs +6 -0
  3. package/components/actionscript-3-Bmm7RA3Y.mjs +6 -0
  4. package/components/ada-BZS802Se.mjs +6 -0
  5. package/components/agent-chat-provider/index.d.ts +1 -0
  6. package/components/agent-chat-provider/index.mjs +74 -39
  7. package/components/agent-chat-provider/src/MessageView.d.ts +29 -0
  8. package/components/agent-chat-provider/src/types.d.ts +12 -6
  9. package/components/agent-chat-provider/src/use.d.ts +5 -4
  10. package/components/andromeeda-CrngpmZk.mjs +3 -0
  11. package/components/apache-D4roVlsU.mjs +6 -0
  12. package/components/apex-D6mfw0H5.mjs +6 -0
  13. package/components/apl-DDK-VObo.mjs +18 -0
  14. package/components/applescript-C43Knf0G.mjs +6 -0
  15. package/components/ara-DRBH84ND.mjs +6 -0
  16. package/components/arc-Js_tyW10.mjs +131 -0
  17. package/components/architecture-O4VJ6CD3-ZoZ2IAk2.mjs +13 -0
  18. package/components/architectureDiagram-SUXI7LT5-kyYGGrHN.mjs +8676 -0
  19. package/components/asm-3tg4MVib.mjs +6 -0
  20. package/components/astro-v4FYbRud.mjs +19 -0
  21. package/components/aurora-x-wJ4-eM2h.mjs +3 -0
  22. package/components/awk-ChreaG-G.mjs +6 -0
  23. package/components/ayu-dark-BEKp3oqs.mjs +3 -0
  24. package/components/ballerina-B0yt0TYU.mjs +6 -0
  25. package/components/batch-Ce_EX3Sx.mjs +14 -0
  26. package/components/beancount-BRIsdQEB.mjs +6 -0
  27. package/components/berry-Brv4WWdL.mjs +14 -0
  28. package/components/bibtex-BLeFwAes.mjs +6 -0
  29. package/components/bicep-BVrgfErX.mjs +6 -0
  30. package/components/blade-By3Sw_Ex.mjs +22 -0
  31. package/components/blockDiagram-6J76NXCF-IAr4zDV3.mjs +3608 -0
  32. package/components/broadcasting-markdown/src/howler-speech.vue.d.ts +1 -1
  33. package/components/broadcasting-markdown/src/index.vue.d.ts +3 -3
  34. package/components/bubble-list/index.css +22 -0
  35. package/components/bubble-list/index.mjs +7 -134
  36. package/components/bubble-list/src/ctx.d.ts +0 -4
  37. package/components/bubble-list/src/index.vue.d.ts +169 -525
  38. package/components/bubble-templates/index.d.ts +2 -1
  39. package/components/bubble-templates/index.mjs +11438 -101
  40. package/components/bubble-templates/src/core.d.ts +69 -0
  41. package/components/bubble-templates/src/index.vue.d.ts +133 -486
  42. package/components/bubble-templates/src/legacy.vue.d.ts +153 -0
  43. package/components/bubble-templates/src/types.d.ts +13 -8
  44. package/components/c-C4VtT7JA.mjs +6 -0
  45. package/components/c4Diagram-6F6E4RAY-Dv27rXcJ.mjs +2490 -0
  46. package/components/catppuccin-frappe-zLMNRRUx.mjs +3 -0
  47. package/components/catppuccin-latte-CdF5jC3c.mjs +3 -0
  48. package/components/catppuccin-macchiato-DyjXeyRt.mjs +3 -0
  49. package/components/catppuccin-mocha-66IdYxR8.mjs +3 -0
  50. package/components/cdc-30ktANo3.mjs +14 -0
  51. package/components/channel-BBZy6zOT.mjs +7 -0
  52. package/components/chat-independent/index.mjs +4 -4
  53. package/components/chat-independent/src/index.vue.d.ts +194 -550
  54. package/components/chunk-353BL4L5-Dn_Y_Yna.mjs +17 -0
  55. package/components/chunk-67H74DCK-Br5U8bfD.mjs +102 -0
  56. package/components/chunk-AACKK3MU-DH_MKxca.mjs +17 -0
  57. package/components/chunk-BFAMUDN2-DHLCoYMN.mjs +13 -0
  58. package/components/chunk-E2GYISFI-DQPHyyga.mjs +19 -0
  59. package/components/chunk-OW32GOEJ-CQOSE6Bn.mjs +1924 -0
  60. package/components/chunk-SKB7J2MH-BlwHRDiW.mjs +25 -0
  61. package/components/chunk-SZ463SBG-DEp8buKJ.mjs +1823 -0
  62. package/components/clarity-6uBl6Vpb.mjs +6 -0
  63. package/components/classDiagram-M3E45YP4-D0ySDe-v.mjs +30 -0
  64. package/components/classDiagram-v2-YAWTLIQI-D0ySDe-v.mjs +30 -0
  65. package/components/clojure-COBRmwo8.mjs +14 -0
  66. package/components/clone-CEJtuQzg.mjs +8 -0
  67. package/components/cmake-CDfQILeU.mjs +6 -0
  68. package/components/cobol-BOOIiISO.mjs +13 -0
  69. package/components/coffee-DO_RGoZp.mjs +9 -0
  70. package/components/cpp-DAK8ktHO.mjs +25 -0
  71. package/components/crystal-CBGbbyVp.mjs +19 -0
  72. package/components/cs-h3ksD6-P.mjs +14 -0
  73. package/components/css-BtVcDqlU.mjs +6 -0
  74. package/components/cue-BFSVLV6N.mjs +6 -0
  75. package/components/cypher-Dl2CXoXF.mjs +14 -0
  76. package/components/cytoscape.esm-BojS1z60.mjs +30216 -0
  77. package/components/d-9qSZPw74.mjs +6 -0
  78. package/components/dagre-JOIXM2OF-5zx0JY2T.mjs +705 -0
  79. package/components/dark-plus-DmZ1Dzd4.mjs +3 -0
  80. package/components/dart-CCSsOg9l.mjs +6 -0
  81. package/components/dax-CvsmLV-B.mjs +6 -0
  82. package/components/defaultLocale-DVr69WTU.mjs +202 -0
  83. package/components/diagram-5UYTHUR4-C19nyAKc.mjs +213 -0
  84. package/components/diagram-VMROVX33-DkGwo-hj.mjs +859 -0
  85. package/components/diagram-ZTM2IBQH-CBgHCu9L.mjs +315 -0
  86. package/components/diff-BEdzuHlE.mjs +6 -0
  87. package/components/dockerfile-B3DP334t.mjs +14 -0
  88. package/components/dracula-B8-AVrwI.mjs +3 -0
  89. package/components/dracula-soft-BHeefow7.mjs +3 -0
  90. package/components/dream-maker-CNLQpoF-.mjs +6 -0
  91. package/components/elixir-0rTCSSfp.mjs +11 -0
  92. package/components/elm-BhwiZPvf.mjs +10 -0
  93. package/components/erDiagram-3M52JZNH-cttdAJXW.mjs +1167 -0
  94. package/components/erb-Lra8TlYM.mjs +27 -0
  95. package/components/erlang-D2NNgvtR.mjs +17 -0
  96. package/components/everforest-dark-Cg1xdODP.mjs +3 -0
  97. package/components/everforest-light-BmTD3bxe.mjs +3 -0
  98. package/components/fish-BU5HSdZy.mjs +6 -0
  99. package/components/flowDiagram-KYDEHFYC-9HpsqDdB.mjs +2343 -0
  100. package/components/fs-CdBSddpF.mjs +17 -0
  101. package/components/ganttDiagram-EK5VF46D-8QB3ofs6.mjs +3495 -0
  102. package/components/gdresource-CAbkn6H_.mjs +11 -0
  103. package/components/gdscript-Be_cubqt.mjs +6 -0
  104. package/components/gdshader-BEzE4j_3.mjs +6 -0
  105. package/components/gherkin-xCNF9gh8.mjs +6 -0
  106. package/components/git-commit-PP9xCApN.mjs +9 -0
  107. package/components/git-rebase-DqdGofLo.mjs +9 -0
  108. package/components/gitGraph-ZV4HHKMB-BSmtVGRu.mjs +13 -0
  109. package/components/gitGraphDiagram-GW3U2K7C-DNzc0Vx_.mjs +1225 -0
  110. package/components/github-dark-O22yVQaY.mjs +3 -0
  111. package/components/github-dark-default-DB2Hkvqn.mjs +3 -0
  112. package/components/github-dark-dimmed-CMZ_OfqC.mjs +3 -0
  113. package/components/github-dark-high-contrast-DmxWVmCU.mjs +3 -0
  114. package/components/github-light-BTbR9xVK.mjs +3 -0
  115. package/components/github-light-default-DWEonwFe.mjs +3 -0
  116. package/components/github-light-high-contrast-WJ_cPDts.mjs +3 -0
  117. package/components/glimmer-js-BkPYTyD4.mjs +23 -0
  118. package/components/glsl-CGsiYPcu.mjs +9 -0
  119. package/components/gnuplot-tV8vezdE.mjs +6 -0
  120. package/components/go-CBmVHZBz.mjs +6 -0
  121. package/components/graph-3zJxsO-i.mjs +425 -0
  122. package/components/graphql-D4pgneW3.mjs +15 -0
  123. package/components/groovy-Bn4MhXgW.mjs +6 -0
  124. package/components/gruvbox-dark-hard-C89wZ4s3.mjs +3 -0
  125. package/components/gruvbox-dark-medium-swz85q_b.mjs +3 -0
  126. package/components/gruvbox-dark-soft-BYHBHQJW.mjs +3 -0
  127. package/components/gruvbox-light-hard-DEF_ZxYZ.mjs +3 -0
  128. package/components/gruvbox-light-medium-ziUMnHJx.mjs +3 -0
  129. package/components/gruvbox-light-soft-Cuwp0tsB.mjs +3 -0
  130. package/components/gts-d3WsqAZM.mjs +23 -0
  131. package/components/hack-CwaBuF5l.mjs +13 -0
  132. package/components/haml-gLijj4rW.mjs +11 -0
  133. package/components/hbs-CFi5SpI3.mjs +23 -0
  134. package/components/hcl-axoq0Ycu.mjs +6 -0
  135. package/components/hjson-I7LcauIB.mjs +6 -0
  136. package/components/hlsl-TRzjajlb.mjs +6 -0
  137. package/components/houston-CF_ws8Cq.mjs +3 -0
  138. package/components/hs-DXSGqUFF.mjs +14 -0
  139. package/components/html-CLq-n30c.mjs +11 -0
  140. package/components/html-derivative-C8POX8SL.mjs +9 -0
  141. package/components/http-BYUKZ6kX.mjs +20 -0
  142. package/components/imba-C4923lSV.mjs +6 -0
  143. package/components/index3.mjs +79526 -0
  144. package/components/info-63CPKGFF-C8sYWczU.mjs +13 -0
  145. package/components/infoDiagram-LHK5PUON-C-vFFPTf.mjs +42 -0
  146. package/components/init-ZxktEp_H.mjs +15 -0
  147. package/components/java-BfXh-0uJ.mjs +6 -0
  148. package/components/jinja-html-BmW4v_vu.mjs +11 -0
  149. package/components/jison-C9kAT_Oj.mjs +9 -0
  150. package/components/journeyDiagram-EWQZEKCU-BJrw4-AG.mjs +1262 -0
  151. package/components/js-CN_xSsjU.mjs +14 -0
  152. package/components/json-TjWBGEk1.mjs +6 -0
  153. package/components/json5-DCGCKrmX.mjs +6 -0
  154. package/components/jsonc-DLVLp8id.mjs +6 -0
  155. package/components/jsonl-B-R_pDGg.mjs +6 -0
  156. package/components/jsonnet-Cs8BnnC6.mjs +6 -0
  157. package/components/jssm-D_YBQ_cM.mjs +14 -0
  158. package/components/jsx-BPmvoin2.mjs +6 -0
  159. package/components/julia-C-JjBobP.mjs +19 -0
  160. package/components/kanagawa-dragon-DU8n2NNT.mjs +3 -0
  161. package/components/kanagawa-lotus-Byd0CDet.mjs +3 -0
  162. package/components/kanagawa-wave-DExoagcR.mjs +3 -0
  163. package/components/kanban-definition-ZSS6B67P-BptAnqU-.mjs +1057 -0
  164. package/components/kotlin-BM2ZNTMh.mjs +6 -0
  165. package/components/kusto-D9MF7CZf.mjs +14 -0
  166. package/components/laserwave-DF03wMlf.mjs +3 -0
  167. package/components/latex-BsqkLZB_.mjs +10 -0
  168. package/components/layout-sGZIJplX.mjs +2043 -0
  169. package/components/less-BAzLMJNR.mjs +6 -0
  170. package/components/light-plus-DS08Xg5J.mjs +3 -0
  171. package/components/linear-DqgVh5FN.mjs +336 -0
  172. package/components/liquid-f2VHt0dg.mjs +15 -0
  173. package/components/lisp-DAq1kaby.mjs +6 -0
  174. package/components/logo-D9l7oEJ8.mjs +6 -0
  175. package/components/lua-CH3ttzl_.mjs +9 -0
  176. package/components/makefile-D2qLe7q0.mjs +14 -0
  177. package/components/marko-DwRyI_--.mjs +15 -0
  178. package/components/material-theme-B8B2U48Q.mjs +3 -0
  179. package/components/material-theme-darker-BV0iY_T3.mjs +3 -0
  180. package/components/material-theme-lighter-DrzybSTF.mjs +3 -0
  181. package/components/material-theme-ocean-BRPLVReX.mjs +3 -0
  182. package/components/material-theme-palenight-DSJwsR_D.mjs +3 -0
  183. package/components/matlab-7XHduepk.mjs +6 -0
  184. package/components/md-BIvDPr-W.mjs +14 -0
  185. package/components/mdc-Rx6hWSHn.mjs +16 -0
  186. package/components/mdx-D5wExp-O.mjs +6 -0
  187. package/components/mermaid-CUjtoYEe.mjs +6 -0
  188. package/components/mermaid-parser.core-CH9ryA1K.mjs +16987 -0
  189. package/components/mermaid.core-CAqkCmS1.mjs +20975 -0
  190. package/components/metahuman-broadcasting/src/index.vue.d.ts +3 -3
  191. package/components/min-BngCxx8g.mjs +109 -0
  192. package/components/min-dark-BNaN9fWk.mjs +3 -0
  193. package/components/min-light-CMrjentn.mjs +3 -0
  194. package/components/mindmap-definition-6CBA2TL7-Cp_EeEsh.mjs +5854 -0
  195. package/components/mojo-CrbF881p.mjs +6 -0
  196. package/components/monokai-DelygWXa.mjs +3 -0
  197. package/components/narrat-DOwkIbBe.mjs +14 -0
  198. package/components/nf-DHfvJ2gH.mjs +14 -0
  199. package/components/nginx-B_jWsywZ.mjs +10 -0
  200. package/components/night-owl-DSS199ra.mjs +3 -0
  201. package/components/nim-yzbnZKJd.mjs +22 -0
  202. package/components/nix--3K2gyjg.mjs +6 -0
  203. package/components/nord-CvDbBq5M.mjs +3 -0
  204. package/components/objective-c-DkOBZg1J.mjs +14 -0
  205. package/components/objective-cpp-DEoN9Fe5.mjs +6 -0
  206. package/components/ocaml-B1kfGk9Y.mjs +6 -0
  207. package/components/one-dark-pro-CsMf0BoJ.mjs +3 -0
  208. package/components/one-light-BwwAsfsj.mjs +3 -0
  209. package/components/ordinal-DSZU4PqD.mjs +76 -0
  210. package/components/packet-HUATNLJX-bfFWFja0.mjs +13 -0
  211. package/components/pascal-CU8Kjkr_.mjs +6 -0
  212. package/components/perl-FH6su6vZ.mjs +18 -0
  213. package/components/php-Dnl1TfYH.mjs +20 -0
  214. package/components/pie-WTHONI2E-QPrWs3SR.mjs +13 -0
  215. package/components/pieDiagram-NIOCPIFQ-C46Y_4C6.mjs +248 -0
  216. package/components/plastic-BjwMpBc0.mjs +3 -0
  217. package/components/plsql-B3Na24V4.mjs +6 -0
  218. package/components/poimandres-ChWyhPrn.mjs +3 -0
  219. package/components/postcss-kj1IbjVd.mjs +6 -0
  220. package/components/powerquery-B-e1fO-k.mjs +6 -0
  221. package/components/prisma-bmxcSDxq.mjs +6 -0
  222. package/components/prolog-BT9GCzqD.mjs +6 -0
  223. package/components/properties-D6yKO1eW.mjs +14 -0
  224. package/components/proto-BIXM0k1a.mjs +6 -0
  225. package/components/ps1-aFyNx8UH.mjs +18 -0
  226. package/components/pug-BrOx0bSt.mjs +21 -0
  227. package/components/puppet-N15G4Usj.mjs +6 -0
  228. package/components/purescript-DrwsEYNH.mjs +6 -0
  229. package/components/python-D2s92fRP.mjs +14 -0
  230. package/components/ql-DTm-NCRo.mjs +14 -0
  231. package/components/quadrantDiagram-2OG54O6I-Dgf6d6F_.mjs +1347 -0
  232. package/components/r-oprfD2-9.mjs +6 -0
  233. package/components/radar-NJJJXTRR-BnUCJhQL.mjs +13 -0
  234. package/components/raku-xArQd_rF.mjs +14 -0
  235. package/components/razor-BoXCAbWQ.mjs +13 -0
  236. package/components/red-DByOl5N0.mjs +3 -0
  237. package/components/reg-CULnG2WX.mjs +6 -0
  238. package/components/rel-CHRwzjd4.mjs +6 -0
  239. package/components/requirementDiagram-QOLK2EJ7-CSF6N7HA.mjs +1171 -0
  240. package/components/riscv-BNQ9cVpw.mjs +6 -0
  241. package/components/rose-pine-LL9gXmP2.mjs +3 -0
  242. package/components/rose-pine-dawn-CH9zdisO.mjs +3 -0
  243. package/components/rose-pine-moon-B1oKSfEJ.mjs +3 -0
  244. package/components/rst-bEtD1v7N.mjs +36 -0
  245. package/components/ruby-BmfBy6EV.mjs +44 -0
  246. package/components/rust-Bf_fdNdL.mjs +14 -0
  247. package/components/sankeyDiagram-4UZDY2LN-BAHB7dMS.mjs +1199 -0
  248. package/components/sas-BLBgC3TA.mjs +9 -0
  249. package/components/sass-BheygBdF.mjs +6 -0
  250. package/components/scala-B-_7vFVn.mjs +6 -0
  251. package/components/scheme-BSHdPinv.mjs +6 -0
  252. package/components/scss-Dq-LbI_c.mjs +9 -0
  253. package/components/sender/src/index.vue.d.ts +3 -3
  254. package/components/sequenceDiagram-SKLFT4DO-10gLJ50N.mjs +3422 -0
  255. package/components/shaderlab-BOQRTiQi.mjs +17 -0
  256. package/components/shellsession-Cu3c0QAc.mjs +17 -0
  257. package/components/slack-dark-BEe10hxO.mjs +3 -0
  258. package/components/slack-ochin-BKmu9pBc.mjs +3 -0
  259. package/components/smalltalk-qxcGy4fT.mjs +6 -0
  260. package/components/snazzy-light-Dcvd-ZyI.mjs +3 -0
  261. package/components/solarized-dark-BBl5y5sR.mjs +3 -0
  262. package/components/solarized-light-DW9b_AY8.mjs +3 -0
  263. package/components/solidity-CewKZgp-.mjs +6 -0
  264. package/components/sparql-DswowMAp.mjs +9 -0
  265. package/components/splunk-gK6Iw_P9.mjs +14 -0
  266. package/components/sql-DzUuSofg.mjs +6 -0
  267. package/components/ssh-config-Bk_I5wDR.mjs +6 -0
  268. package/components/stata-Dl7wDdBE.mjs +9 -0
  269. package/components/stateDiagram-MI5ZYTHO-D6p6nCaj.mjs +459 -0
  270. package/components/stateDiagram-v2-5AN5P6BG-DaN5hC-t.mjs +29 -0
  271. package/components/stylus-qRNkxrFU.mjs +14 -0
  272. package/components/svelte-B9qv3vkS.mjs +15 -0
  273. package/components/swift-BRQRsam8.mjs +6 -0
  274. package/components/synthwave-84-CoUef9sh.mjs +3 -0
  275. package/components/system-verilog-BcESSvRn.mjs +6 -0
  276. package/components/table-columns/src/ctx.d.ts +2 -2
  277. package/components/table-columns/src/el-ctx.d.ts +2 -2
  278. package/components/table-columns/src/index.vue.d.ts +4 -4
  279. package/components/tables-v1/src/ctx.d.ts +3 -3
  280. package/components/tables-v1/src/index.vue.d.ts +9 -9
  281. package/components/tables-v1-checkbox/src/ctx.d.ts +3 -3
  282. package/components/tables-v1-checkbox/src/index.vue.d.ts +17 -17
  283. package/components/tasl-DfOr2qHi.mjs +6 -0
  284. package/components/tcl-CTsc4-t7.mjs +6 -0
  285. package/components/tex-CumJx1zu.mjs +9 -0
  286. package/components/text/src/ctx.d.ts +1 -1
  287. package/components/text/src/index.vue.d.ts +1 -1
  288. package/components/timeline-definition-MYPXXCX6-gLqnWxDu.mjs +1234 -0
  289. package/components/tokyo-night-DjtLpAEY.mjs +3 -0
  290. package/components/toml-vHPzWDj6.mjs +6 -0
  291. package/components/treemap-75Q7IDZK-B2atdfMH.mjs +13 -0
  292. package/components/tsx-CmGGo4Hm.mjs +6 -0
  293. package/components/turtle-BnC7StHY.mjs +6 -0
  294. package/components/twig-0XKNpXN1.mjs +35 -0
  295. package/components/typescript-CgxwwAuC.mjs +14 -0
  296. package/components/v-Bmdjo9cy.mjs +6 -0
  297. package/components/vb-DuF6ZenW.mjs +14 -0
  298. package/components/verilog-CCb_iTfF.mjs +6 -0
  299. package/components/vesper-4Q1cEwPL.mjs +3 -0
  300. package/components/vhdl-DMqk4T2s.mjs +6 -0
  301. package/components/vimscript-aKp9YbYm.mjs +18 -0
  302. package/components/vitesse-black-BqNLki8b.mjs +3 -0
  303. package/components/vitesse-dark-jJ32WhwH.mjs +3 -0
  304. package/components/vitesse-light-476zM4e6.mjs +3 -0
  305. package/components/vue-DVNNTw2l.mjs +40 -0
  306. package/components/vue-html-Cr5wciIP.mjs +16 -0
  307. package/components/vyper-DYedWgAE.mjs +14 -0
  308. package/components/wasm-BBh6f151.mjs +6 -0
  309. package/components/wasm-DDgzZJey.mjs +7 -0
  310. package/components/wenyan-BdqozpMZ.mjs +6 -0
  311. package/components/wgsl-Vo-hHVWH.mjs +6 -0
  312. package/components/wolfram-CRmjUoI4.mjs +6 -0
  313. package/components/xml-BMzZeaqs.mjs +9 -0
  314. package/components/xsl-CAhvzxWv.mjs +10 -0
  315. package/components/xychartDiagram-H2YORKM3-Whqa4ezL.mjs +1893 -0
  316. package/components/yml-BhSrWWMS.mjs +14 -0
  317. package/components/zenscript-DFINJL6j.mjs +6 -0
  318. package/components/zig-CS4FMAZp.mjs +6 -0
  319. package/components/zsh-hcK4TBd7.mjs +26 -0
  320. package/index.css +23 -0
  321. package/package.json +4 -1
@@ -0,0 +1,1262 @@
1
+ import { d as drawRect, f as drawText, g as getNoteRect, b as drawBackgroundRect } from './chunk-67H74DCK-Br5U8bfD.mjs';
2
+ import { g as getIconStyles } from './chunk-E2GYISFI-DQPHyyga.mjs';
3
+ import { _ as __name, c as getConfig2, q as setDiagramTitle, t as getDiagramTitle, b as setAccTitle, a as getAccTitle, s as setAccDescription, g as getAccDescription, z as clear$2, d as select, e as configureSvgSize } from './mermaid.core-CAqkCmS1.mjs';
4
+ import { d as d3arc } from './arc-Js_tyW10.mjs';
5
+ import './index3.mjs';
6
+ import 'vue';
7
+ import '@vunk/plus/components/bubble-templates';
8
+ import '@vunk/core/components/spread-to';
9
+ import 'element-plus';
10
+ import '@vunk/shared/function';
11
+ import './_plugin-vue_export-helper.mjs';
12
+ import '@vunk/plus/components/agent-chat-provider';
13
+
14
+ var parser = function() {
15
+ var o = /* @__PURE__ */ __name(function(k, v, o2, l) {
16
+ for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) ;
17
+ return o2;
18
+ }, "o"), $V0 = [6, 8, 10, 11, 12, 14, 16, 17, 18], $V1 = [1, 9], $V2 = [1, 10], $V3 = [1, 11], $V4 = [1, 12], $V5 = [1, 13], $V6 = [1, 14];
19
+ var parser2 = {
20
+ trace: /* @__PURE__ */ __name(function trace() {
21
+ }, "trace"),
22
+ yy: {},
23
+ symbols_: { "error": 2, "start": 3, "journey": 4, "document": 5, "EOF": 6, "line": 7, "SPACE": 8, "statement": 9, "NEWLINE": 10, "title": 11, "acc_title": 12, "acc_title_value": 13, "acc_descr": 14, "acc_descr_value": 15, "acc_descr_multiline_value": 16, "section": 17, "taskName": 18, "taskData": 19, "$accept": 0, "$end": 1 },
24
+ terminals_: { 2: "error", 4: "journey", 6: "EOF", 8: "SPACE", 10: "NEWLINE", 11: "title", 12: "acc_title", 13: "acc_title_value", 14: "acc_descr", 15: "acc_descr_value", 16: "acc_descr_multiline_value", 17: "section", 18: "taskName", 19: "taskData" },
25
+ productions_: [0, [3, 3], [5, 0], [5, 2], [7, 2], [7, 1], [7, 1], [7, 1], [9, 1], [9, 2], [9, 2], [9, 1], [9, 1], [9, 2]],
26
+ performAction: /* @__PURE__ */ __name(function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
27
+ var $0 = $$.length - 1;
28
+ switch (yystate) {
29
+ case 1:
30
+ return $$[$0 - 1];
31
+ case 2:
32
+ this.$ = [];
33
+ break;
34
+ case 3:
35
+ $$[$0 - 1].push($$[$0]);
36
+ this.$ = $$[$0 - 1];
37
+ break;
38
+ case 4:
39
+ case 5:
40
+ this.$ = $$[$0];
41
+ break;
42
+ case 6:
43
+ case 7:
44
+ this.$ = [];
45
+ break;
46
+ case 8:
47
+ yy.setDiagramTitle($$[$0].substr(6));
48
+ this.$ = $$[$0].substr(6);
49
+ break;
50
+ case 9:
51
+ this.$ = $$[$0].trim();
52
+ yy.setAccTitle(this.$);
53
+ break;
54
+ case 10:
55
+ case 11:
56
+ this.$ = $$[$0].trim();
57
+ yy.setAccDescription(this.$);
58
+ break;
59
+ case 12:
60
+ yy.addSection($$[$0].substr(8));
61
+ this.$ = $$[$0].substr(8);
62
+ break;
63
+ case 13:
64
+ yy.addTask($$[$0 - 1], $$[$0]);
65
+ this.$ = "task";
66
+ break;
67
+ }
68
+ }, "anonymous"),
69
+ table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, o($V0, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: $V1, 12: $V2, 14: $V3, 16: $V4, 17: $V5, 18: $V6 }, o($V0, [2, 7], { 1: [2, 1] }), o($V0, [2, 3]), { 9: 15, 11: $V1, 12: $V2, 14: $V3, 16: $V4, 17: $V5, 18: $V6 }, o($V0, [2, 5]), o($V0, [2, 6]), o($V0, [2, 8]), { 13: [1, 16] }, { 15: [1, 17] }, o($V0, [2, 11]), o($V0, [2, 12]), { 19: [1, 18] }, o($V0, [2, 4]), o($V0, [2, 9]), o($V0, [2, 10]), o($V0, [2, 13])],
70
+ defaultActions: {},
71
+ parseError: /* @__PURE__ */ __name(function parseError(str, hash) {
72
+ if (hash.recoverable) {
73
+ this.trace(str);
74
+ } else {
75
+ var error = new Error(str);
76
+ error.hash = hash;
77
+ throw error;
78
+ }
79
+ }, "parseError"),
80
+ parse: /* @__PURE__ */ __name(function parse(input) {
81
+ var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1;
82
+ var args = lstack.slice.call(arguments, 1);
83
+ var lexer2 = Object.create(this.lexer);
84
+ var sharedState = { yy: {} };
85
+ for (var k in this.yy) {
86
+ if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
87
+ sharedState.yy[k] = this.yy[k];
88
+ }
89
+ }
90
+ lexer2.setInput(input, sharedState.yy);
91
+ sharedState.yy.lexer = lexer2;
92
+ sharedState.yy.parser = this;
93
+ if (typeof lexer2.yylloc == "undefined") {
94
+ lexer2.yylloc = {};
95
+ }
96
+ var yyloc = lexer2.yylloc;
97
+ lstack.push(yyloc);
98
+ var ranges = lexer2.options && lexer2.options.ranges;
99
+ if (typeof sharedState.yy.parseError === "function") {
100
+ this.parseError = sharedState.yy.parseError;
101
+ } else {
102
+ this.parseError = Object.getPrototypeOf(this).parseError;
103
+ }
104
+ function popStack(n) {
105
+ stack.length = stack.length - 2 * n;
106
+ vstack.length = vstack.length - n;
107
+ lstack.length = lstack.length - n;
108
+ }
109
+ __name(popStack, "popStack");
110
+ function lex() {
111
+ var token;
112
+ token = tstack.pop() || lexer2.lex() || EOF;
113
+ if (typeof token !== "number") {
114
+ if (token instanceof Array) {
115
+ tstack = token;
116
+ token = tstack.pop();
117
+ }
118
+ token = self.symbols_[token] || token;
119
+ }
120
+ return token;
121
+ }
122
+ __name(lex, "lex");
123
+ var symbol, state, action, r, yyval = {}, p, len, newState, expected;
124
+ while (true) {
125
+ state = stack[stack.length - 1];
126
+ if (this.defaultActions[state]) {
127
+ action = this.defaultActions[state];
128
+ } else {
129
+ if (symbol === null || typeof symbol == "undefined") {
130
+ symbol = lex();
131
+ }
132
+ action = table[state] && table[state][symbol];
133
+ }
134
+ if (typeof action === "undefined" || !action.length || !action[0]) {
135
+ var errStr = "";
136
+ expected = [];
137
+ for (p in table[state]) {
138
+ if (this.terminals_[p] && p > TERROR) {
139
+ expected.push("'" + this.terminals_[p] + "'");
140
+ }
141
+ }
142
+ if (lexer2.showPosition) {
143
+ errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
144
+ } else {
145
+ errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
146
+ }
147
+ this.parseError(errStr, {
148
+ text: lexer2.match,
149
+ token: this.terminals_[symbol] || symbol,
150
+ line: lexer2.yylineno,
151
+ loc: yyloc,
152
+ expected
153
+ });
154
+ }
155
+ if (action[0] instanceof Array && action.length > 1) {
156
+ throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
157
+ }
158
+ switch (action[0]) {
159
+ case 1:
160
+ stack.push(symbol);
161
+ vstack.push(lexer2.yytext);
162
+ lstack.push(lexer2.yylloc);
163
+ stack.push(action[1]);
164
+ symbol = null;
165
+ {
166
+ yyleng = lexer2.yyleng;
167
+ yytext = lexer2.yytext;
168
+ yylineno = lexer2.yylineno;
169
+ yyloc = lexer2.yylloc;
170
+ }
171
+ break;
172
+ case 2:
173
+ len = this.productions_[action[1]][1];
174
+ yyval.$ = vstack[vstack.length - len];
175
+ yyval._$ = {
176
+ first_line: lstack[lstack.length - (len || 1)].first_line,
177
+ last_line: lstack[lstack.length - 1].last_line,
178
+ first_column: lstack[lstack.length - (len || 1)].first_column,
179
+ last_column: lstack[lstack.length - 1].last_column
180
+ };
181
+ if (ranges) {
182
+ yyval._$.range = [
183
+ lstack[lstack.length - (len || 1)].range[0],
184
+ lstack[lstack.length - 1].range[1]
185
+ ];
186
+ }
187
+ r = this.performAction.apply(yyval, [
188
+ yytext,
189
+ yyleng,
190
+ yylineno,
191
+ sharedState.yy,
192
+ action[1],
193
+ vstack,
194
+ lstack
195
+ ].concat(args));
196
+ if (typeof r !== "undefined") {
197
+ return r;
198
+ }
199
+ if (len) {
200
+ stack = stack.slice(0, -1 * len * 2);
201
+ vstack = vstack.slice(0, -1 * len);
202
+ lstack = lstack.slice(0, -1 * len);
203
+ }
204
+ stack.push(this.productions_[action[1]][0]);
205
+ vstack.push(yyval.$);
206
+ lstack.push(yyval._$);
207
+ newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
208
+ stack.push(newState);
209
+ break;
210
+ case 3:
211
+ return true;
212
+ }
213
+ }
214
+ return true;
215
+ }, "parse")
216
+ };
217
+ var lexer = /* @__PURE__ */ function() {
218
+ var lexer2 = {
219
+ EOF: 1,
220
+ parseError: /* @__PURE__ */ __name(function parseError(str, hash) {
221
+ if (this.yy.parser) {
222
+ this.yy.parser.parseError(str, hash);
223
+ } else {
224
+ throw new Error(str);
225
+ }
226
+ }, "parseError"),
227
+ // resets the lexer, sets new input
228
+ setInput: /* @__PURE__ */ __name(function(input, yy) {
229
+ this.yy = yy || this.yy || {};
230
+ this._input = input;
231
+ this._more = this._backtrack = this.done = false;
232
+ this.yylineno = this.yyleng = 0;
233
+ this.yytext = this.matched = this.match = "";
234
+ this.conditionStack = ["INITIAL"];
235
+ this.yylloc = {
236
+ first_line: 1,
237
+ first_column: 0,
238
+ last_line: 1,
239
+ last_column: 0
240
+ };
241
+ if (this.options.ranges) {
242
+ this.yylloc.range = [0, 0];
243
+ }
244
+ this.offset = 0;
245
+ return this;
246
+ }, "setInput"),
247
+ // consumes and returns one char from the input
248
+ input: /* @__PURE__ */ __name(function() {
249
+ var ch = this._input[0];
250
+ this.yytext += ch;
251
+ this.yyleng++;
252
+ this.offset++;
253
+ this.match += ch;
254
+ this.matched += ch;
255
+ var lines = ch.match(/(?:\r\n?|\n).*/g);
256
+ if (lines) {
257
+ this.yylineno++;
258
+ this.yylloc.last_line++;
259
+ } else {
260
+ this.yylloc.last_column++;
261
+ }
262
+ if (this.options.ranges) {
263
+ this.yylloc.range[1]++;
264
+ }
265
+ this._input = this._input.slice(1);
266
+ return ch;
267
+ }, "input"),
268
+ // unshifts one char (or a string) into the input
269
+ unput: /* @__PURE__ */ __name(function(ch) {
270
+ var len = ch.length;
271
+ var lines = ch.split(/(?:\r\n?|\n)/g);
272
+ this._input = ch + this._input;
273
+ this.yytext = this.yytext.substr(0, this.yytext.length - len);
274
+ this.offset -= len;
275
+ var oldLines = this.match.split(/(?:\r\n?|\n)/g);
276
+ this.match = this.match.substr(0, this.match.length - 1);
277
+ this.matched = this.matched.substr(0, this.matched.length - 1);
278
+ if (lines.length - 1) {
279
+ this.yylineno -= lines.length - 1;
280
+ }
281
+ var r = this.yylloc.range;
282
+ this.yylloc = {
283
+ first_line: this.yylloc.first_line,
284
+ last_line: this.yylineno + 1,
285
+ first_column: this.yylloc.first_column,
286
+ 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
287
+ };
288
+ if (this.options.ranges) {
289
+ this.yylloc.range = [r[0], r[0] + this.yyleng - len];
290
+ }
291
+ this.yyleng = this.yytext.length;
292
+ return this;
293
+ }, "unput"),
294
+ // When called from action, caches matched text and appends it on next action
295
+ more: /* @__PURE__ */ __name(function() {
296
+ this._more = true;
297
+ return this;
298
+ }, "more"),
299
+ // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
300
+ reject: /* @__PURE__ */ __name(function() {
301
+ if (this.options.backtrack_lexer) {
302
+ this._backtrack = true;
303
+ } else {
304
+ 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).\n" + this.showPosition(), {
305
+ text: "",
306
+ token: null,
307
+ line: this.yylineno
308
+ });
309
+ }
310
+ return this;
311
+ }, "reject"),
312
+ // retain first n characters of the match
313
+ less: /* @__PURE__ */ __name(function(n) {
314
+ this.unput(this.match.slice(n));
315
+ }, "less"),
316
+ // displays already matched input, i.e. for error messages
317
+ pastInput: /* @__PURE__ */ __name(function() {
318
+ var past = this.matched.substr(0, this.matched.length - this.match.length);
319
+ return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
320
+ }, "pastInput"),
321
+ // displays upcoming input, i.e. for error messages
322
+ upcomingInput: /* @__PURE__ */ __name(function() {
323
+ var next = this.match;
324
+ if (next.length < 20) {
325
+ next += this._input.substr(0, 20 - next.length);
326
+ }
327
+ return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
328
+ }, "upcomingInput"),
329
+ // displays the character position where the lexing error occurred, i.e. for error messages
330
+ showPosition: /* @__PURE__ */ __name(function() {
331
+ var pre = this.pastInput();
332
+ var c = new Array(pre.length + 1).join("-");
333
+ return pre + this.upcomingInput() + "\n" + c + "^";
334
+ }, "showPosition"),
335
+ // test the lexed token: return FALSE when not a match, otherwise return token
336
+ test_match: /* @__PURE__ */ __name(function(match, indexed_rule) {
337
+ var token, lines, backup;
338
+ if (this.options.backtrack_lexer) {
339
+ backup = {
340
+ yylineno: this.yylineno,
341
+ yylloc: {
342
+ first_line: this.yylloc.first_line,
343
+ last_line: this.last_line,
344
+ first_column: this.yylloc.first_column,
345
+ last_column: this.yylloc.last_column
346
+ },
347
+ yytext: this.yytext,
348
+ match: this.match,
349
+ matches: this.matches,
350
+ matched: this.matched,
351
+ yyleng: this.yyleng,
352
+ offset: this.offset,
353
+ _more: this._more,
354
+ _input: this._input,
355
+ yy: this.yy,
356
+ conditionStack: this.conditionStack.slice(0),
357
+ done: this.done
358
+ };
359
+ if (this.options.ranges) {
360
+ backup.yylloc.range = this.yylloc.range.slice(0);
361
+ }
362
+ }
363
+ lines = match[0].match(/(?:\r\n?|\n).*/g);
364
+ if (lines) {
365
+ this.yylineno += lines.length;
366
+ }
367
+ this.yylloc = {
368
+ first_line: this.yylloc.last_line,
369
+ last_line: this.yylineno + 1,
370
+ first_column: this.yylloc.last_column,
371
+ last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
372
+ };
373
+ this.yytext += match[0];
374
+ this.match += match[0];
375
+ this.matches = match;
376
+ this.yyleng = this.yytext.length;
377
+ if (this.options.ranges) {
378
+ this.yylloc.range = [this.offset, this.offset += this.yyleng];
379
+ }
380
+ this._more = false;
381
+ this._backtrack = false;
382
+ this._input = this._input.slice(match[0].length);
383
+ this.matched += match[0];
384
+ token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
385
+ if (this.done && this._input) {
386
+ this.done = false;
387
+ }
388
+ if (token) {
389
+ return token;
390
+ } else if (this._backtrack) {
391
+ for (var k in backup) {
392
+ this[k] = backup[k];
393
+ }
394
+ return false;
395
+ }
396
+ return false;
397
+ }, "test_match"),
398
+ // return next match in input
399
+ next: /* @__PURE__ */ __name(function() {
400
+ if (this.done) {
401
+ return this.EOF;
402
+ }
403
+ if (!this._input) {
404
+ this.done = true;
405
+ }
406
+ var token, match, tempMatch, index;
407
+ if (!this._more) {
408
+ this.yytext = "";
409
+ this.match = "";
410
+ }
411
+ var rules = this._currentRules();
412
+ for (var i = 0; i < rules.length; i++) {
413
+ tempMatch = this._input.match(this.rules[rules[i]]);
414
+ if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
415
+ match = tempMatch;
416
+ index = i;
417
+ if (this.options.backtrack_lexer) {
418
+ token = this.test_match(tempMatch, rules[i]);
419
+ if (token !== false) {
420
+ return token;
421
+ } else if (this._backtrack) {
422
+ match = false;
423
+ continue;
424
+ } else {
425
+ return false;
426
+ }
427
+ } else if (!this.options.flex) {
428
+ break;
429
+ }
430
+ }
431
+ }
432
+ if (match) {
433
+ token = this.test_match(match, rules[index]);
434
+ if (token !== false) {
435
+ return token;
436
+ }
437
+ return false;
438
+ }
439
+ if (this._input === "") {
440
+ return this.EOF;
441
+ } else {
442
+ return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
443
+ text: "",
444
+ token: null,
445
+ line: this.yylineno
446
+ });
447
+ }
448
+ }, "next"),
449
+ // return next match that has a token
450
+ lex: /* @__PURE__ */ __name(function lex() {
451
+ var r = this.next();
452
+ if (r) {
453
+ return r;
454
+ } else {
455
+ return this.lex();
456
+ }
457
+ }, "lex"),
458
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
459
+ begin: /* @__PURE__ */ __name(function begin(condition) {
460
+ this.conditionStack.push(condition);
461
+ }, "begin"),
462
+ // pop the previously active lexer condition state off the condition stack
463
+ popState: /* @__PURE__ */ __name(function popState() {
464
+ var n = this.conditionStack.length - 1;
465
+ if (n > 0) {
466
+ return this.conditionStack.pop();
467
+ } else {
468
+ return this.conditionStack[0];
469
+ }
470
+ }, "popState"),
471
+ // produce the lexer rule set which is active for the currently active lexer condition state
472
+ _currentRules: /* @__PURE__ */ __name(function _currentRules() {
473
+ if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
474
+ return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
475
+ } else {
476
+ return this.conditions["INITIAL"].rules;
477
+ }
478
+ }, "_currentRules"),
479
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
480
+ topState: /* @__PURE__ */ __name(function topState(n) {
481
+ n = this.conditionStack.length - 1 - Math.abs(n || 0);
482
+ if (n >= 0) {
483
+ return this.conditionStack[n];
484
+ } else {
485
+ return "INITIAL";
486
+ }
487
+ }, "topState"),
488
+ // alias for begin(condition)
489
+ pushState: /* @__PURE__ */ __name(function pushState(condition) {
490
+ this.begin(condition);
491
+ }, "pushState"),
492
+ // return the number of states currently on the stack
493
+ stateStackSize: /* @__PURE__ */ __name(function stateStackSize() {
494
+ return this.conditionStack.length;
495
+ }, "stateStackSize"),
496
+ options: { "case-insensitive": true },
497
+ performAction: /* @__PURE__ */ __name(function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
498
+ switch ($avoiding_name_collisions) {
499
+ case 0:
500
+ break;
501
+ case 1:
502
+ break;
503
+ case 2:
504
+ return 10;
505
+ case 3:
506
+ break;
507
+ case 4:
508
+ break;
509
+ case 5:
510
+ return 4;
511
+ case 6:
512
+ return 11;
513
+ case 7:
514
+ this.begin("acc_title");
515
+ return 12;
516
+ case 8:
517
+ this.popState();
518
+ return "acc_title_value";
519
+ case 9:
520
+ this.begin("acc_descr");
521
+ return 14;
522
+ case 10:
523
+ this.popState();
524
+ return "acc_descr_value";
525
+ case 11:
526
+ this.begin("acc_descr_multiline");
527
+ break;
528
+ case 12:
529
+ this.popState();
530
+ break;
531
+ case 13:
532
+ return "acc_descr_multiline_value";
533
+ case 14:
534
+ return 17;
535
+ case 15:
536
+ return 18;
537
+ case 16:
538
+ return 19;
539
+ case 17:
540
+ return ":";
541
+ case 18:
542
+ return 6;
543
+ case 19:
544
+ return "INVALID";
545
+ }
546
+ }, "anonymous"),
547
+ rules: [/^(?:%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:journey\b)/i, /^(?:title\s[^#\n;]+)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:section\s[^#:\n;]+)/i, /^(?:[^#:\n;]+)/i, /^(?::[^#\n;]+)/i, /^(?::)/i, /^(?:$)/i, /^(?:.)/i],
548
+ conditions: { "acc_descr_multiline": { "rules": [12, 13], "inclusive": false }, "acc_descr": { "rules": [10], "inclusive": false }, "acc_title": { "rules": [8], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 18, 19], "inclusive": true } }
549
+ };
550
+ return lexer2;
551
+ }();
552
+ parser2.lexer = lexer;
553
+ function Parser() {
554
+ this.yy = {};
555
+ }
556
+ __name(Parser, "Parser");
557
+ Parser.prototype = parser2;
558
+ parser2.Parser = Parser;
559
+ return new Parser();
560
+ }();
561
+ parser.parser = parser;
562
+ var journey_default = parser;
563
+ var currentSection = "";
564
+ var sections = [];
565
+ var tasks = [];
566
+ var rawTasks = [];
567
+ var clear2 = /* @__PURE__ */ __name(function() {
568
+ sections.length = 0;
569
+ tasks.length = 0;
570
+ currentSection = "";
571
+ rawTasks.length = 0;
572
+ clear$2();
573
+ }, "clear");
574
+ var addSection = /* @__PURE__ */ __name(function(txt) {
575
+ currentSection = txt;
576
+ sections.push(txt);
577
+ }, "addSection");
578
+ var getSections = /* @__PURE__ */ __name(function() {
579
+ return sections;
580
+ }, "getSections");
581
+ var getTasks = /* @__PURE__ */ __name(function() {
582
+ let allItemsProcessed = compileTasks();
583
+ const maxDepth = 100;
584
+ let iterationCount = 0;
585
+ while (!allItemsProcessed && iterationCount < maxDepth) {
586
+ allItemsProcessed = compileTasks();
587
+ iterationCount++;
588
+ }
589
+ tasks.push(...rawTasks);
590
+ return tasks;
591
+ }, "getTasks");
592
+ var updateActors = /* @__PURE__ */ __name(function() {
593
+ const tempActors = [];
594
+ tasks.forEach((task) => {
595
+ if (task.people) {
596
+ tempActors.push(...task.people);
597
+ }
598
+ });
599
+ const unique = new Set(tempActors);
600
+ return [...unique].sort();
601
+ }, "updateActors");
602
+ var addTask = /* @__PURE__ */ __name(function(descr, taskData) {
603
+ const pieces = taskData.substr(1).split(":");
604
+ let score = 0;
605
+ let peeps = [];
606
+ if (pieces.length === 1) {
607
+ score = Number(pieces[0]);
608
+ peeps = [];
609
+ } else {
610
+ score = Number(pieces[0]);
611
+ peeps = pieces[1].split(",");
612
+ }
613
+ const peopleList = peeps.map((s) => s.trim());
614
+ const rawTask = {
615
+ section: currentSection,
616
+ type: currentSection,
617
+ people: peopleList,
618
+ task: descr,
619
+ score
620
+ };
621
+ rawTasks.push(rawTask);
622
+ }, "addTask");
623
+ var addTaskOrg = /* @__PURE__ */ __name(function(descr) {
624
+ const newTask = {
625
+ section: currentSection,
626
+ type: currentSection,
627
+ description: descr,
628
+ task: descr,
629
+ classes: []
630
+ };
631
+ tasks.push(newTask);
632
+ }, "addTaskOrg");
633
+ var compileTasks = /* @__PURE__ */ __name(function() {
634
+ const compileTask = /* @__PURE__ */ __name(function(pos) {
635
+ return rawTasks[pos].processed;
636
+ }, "compileTask");
637
+ let allProcessed = true;
638
+ for (const [i, rawTask] of rawTasks.entries()) {
639
+ compileTask(i);
640
+ allProcessed = allProcessed && rawTask.processed;
641
+ }
642
+ return allProcessed;
643
+ }, "compileTasks");
644
+ var getActors = /* @__PURE__ */ __name(function() {
645
+ return updateActors();
646
+ }, "getActors");
647
+ var journeyDb_default = {
648
+ getConfig: /* @__PURE__ */ __name(() => getConfig2().journey, "getConfig"),
649
+ clear: clear2,
650
+ setDiagramTitle,
651
+ getDiagramTitle,
652
+ setAccTitle,
653
+ getAccTitle,
654
+ setAccDescription,
655
+ getAccDescription,
656
+ addSection,
657
+ getSections,
658
+ getTasks,
659
+ addTask,
660
+ addTaskOrg,
661
+ getActors
662
+ };
663
+ var getStyles = /* @__PURE__ */ __name((options) => `.label {
664
+ font-family: ${options.fontFamily};
665
+ color: ${options.textColor};
666
+ }
667
+ .mouth {
668
+ stroke: #666;
669
+ }
670
+
671
+ line {
672
+ stroke: ${options.textColor}
673
+ }
674
+
675
+ .legend {
676
+ fill: ${options.textColor};
677
+ font-family: ${options.fontFamily};
678
+ }
679
+
680
+ .label text {
681
+ fill: #333;
682
+ }
683
+ .label {
684
+ color: ${options.textColor}
685
+ }
686
+
687
+ .face {
688
+ ${options.faceColor ? `fill: ${options.faceColor}` : "fill: #FFF8DC"};
689
+ stroke: #999;
690
+ }
691
+
692
+ .node rect,
693
+ .node circle,
694
+ .node ellipse,
695
+ .node polygon,
696
+ .node path {
697
+ fill: ${options.mainBkg};
698
+ stroke: ${options.nodeBorder};
699
+ stroke-width: 1px;
700
+ }
701
+
702
+ .node .label {
703
+ text-align: center;
704
+ }
705
+ .node.clickable {
706
+ cursor: pointer;
707
+ }
708
+
709
+ .arrowheadPath {
710
+ fill: ${options.arrowheadColor};
711
+ }
712
+
713
+ .edgePath .path {
714
+ stroke: ${options.lineColor};
715
+ stroke-width: 1.5px;
716
+ }
717
+
718
+ .flowchart-link {
719
+ stroke: ${options.lineColor};
720
+ fill: none;
721
+ }
722
+
723
+ .edgeLabel {
724
+ background-color: ${options.edgeLabelBackground};
725
+ rect {
726
+ opacity: 0.5;
727
+ }
728
+ text-align: center;
729
+ }
730
+
731
+ .cluster rect {
732
+ }
733
+
734
+ .cluster text {
735
+ fill: ${options.titleColor};
736
+ }
737
+
738
+ div.mermaidTooltip {
739
+ position: absolute;
740
+ text-align: center;
741
+ max-width: 200px;
742
+ padding: 2px;
743
+ font-family: ${options.fontFamily};
744
+ font-size: 12px;
745
+ background: ${options.tertiaryColor};
746
+ border: 1px solid ${options.border2};
747
+ border-radius: 2px;
748
+ pointer-events: none;
749
+ z-index: 100;
750
+ }
751
+
752
+ .task-type-0, .section-type-0 {
753
+ ${options.fillType0 ? `fill: ${options.fillType0}` : ""};
754
+ }
755
+ .task-type-1, .section-type-1 {
756
+ ${options.fillType0 ? `fill: ${options.fillType1}` : ""};
757
+ }
758
+ .task-type-2, .section-type-2 {
759
+ ${options.fillType0 ? `fill: ${options.fillType2}` : ""};
760
+ }
761
+ .task-type-3, .section-type-3 {
762
+ ${options.fillType0 ? `fill: ${options.fillType3}` : ""};
763
+ }
764
+ .task-type-4, .section-type-4 {
765
+ ${options.fillType0 ? `fill: ${options.fillType4}` : ""};
766
+ }
767
+ .task-type-5, .section-type-5 {
768
+ ${options.fillType0 ? `fill: ${options.fillType5}` : ""};
769
+ }
770
+ .task-type-6, .section-type-6 {
771
+ ${options.fillType0 ? `fill: ${options.fillType6}` : ""};
772
+ }
773
+ .task-type-7, .section-type-7 {
774
+ ${options.fillType0 ? `fill: ${options.fillType7}` : ""};
775
+ }
776
+
777
+ .actor-0 {
778
+ ${options.actor0 ? `fill: ${options.actor0}` : ""};
779
+ }
780
+ .actor-1 {
781
+ ${options.actor1 ? `fill: ${options.actor1}` : ""};
782
+ }
783
+ .actor-2 {
784
+ ${options.actor2 ? `fill: ${options.actor2}` : ""};
785
+ }
786
+ .actor-3 {
787
+ ${options.actor3 ? `fill: ${options.actor3}` : ""};
788
+ }
789
+ .actor-4 {
790
+ ${options.actor4 ? `fill: ${options.actor4}` : ""};
791
+ }
792
+ .actor-5 {
793
+ ${options.actor5 ? `fill: ${options.actor5}` : ""};
794
+ }
795
+ ${getIconStyles()}
796
+ `, "getStyles");
797
+ var styles_default = getStyles;
798
+ var drawRect2 = /* @__PURE__ */ __name(function(elem, rectData) {
799
+ return drawRect(elem, rectData);
800
+ }, "drawRect");
801
+ var drawFace = /* @__PURE__ */ __name(function(element, faceData) {
802
+ const radius = 15;
803
+ const circleElement = element.append("circle").attr("cx", faceData.cx).attr("cy", faceData.cy).attr("class", "face").attr("r", radius).attr("stroke-width", 2).attr("overflow", "visible");
804
+ const face = element.append("g");
805
+ face.append("circle").attr("cx", faceData.cx - radius / 3).attr("cy", faceData.cy - radius / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666");
806
+ face.append("circle").attr("cx", faceData.cx + radius / 3).attr("cy", faceData.cy - radius / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666");
807
+ function smile(face2) {
808
+ const arc = d3arc().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(radius / 2).outerRadius(radius / 2.2);
809
+ face2.append("path").attr("class", "mouth").attr("d", arc).attr("transform", "translate(" + faceData.cx + "," + (faceData.cy + 2) + ")");
810
+ }
811
+ __name(smile, "smile");
812
+ function sad(face2) {
813
+ const arc = d3arc().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(radius / 2).outerRadius(radius / 2.2);
814
+ face2.append("path").attr("class", "mouth").attr("d", arc).attr("transform", "translate(" + faceData.cx + "," + (faceData.cy + 7) + ")");
815
+ }
816
+ __name(sad, "sad");
817
+ function ambivalent(face2) {
818
+ face2.append("line").attr("class", "mouth").attr("stroke", 2).attr("x1", faceData.cx - 5).attr("y1", faceData.cy + 7).attr("x2", faceData.cx + 5).attr("y2", faceData.cy + 7).attr("class", "mouth").attr("stroke-width", "1px").attr("stroke", "#666");
819
+ }
820
+ __name(ambivalent, "ambivalent");
821
+ if (faceData.score > 3) {
822
+ smile(face);
823
+ } else if (faceData.score < 3) {
824
+ sad(face);
825
+ } else {
826
+ ambivalent(face);
827
+ }
828
+ return circleElement;
829
+ }, "drawFace");
830
+ var drawCircle = /* @__PURE__ */ __name(function(element, circleData) {
831
+ const circleElement = element.append("circle");
832
+ circleElement.attr("cx", circleData.cx);
833
+ circleElement.attr("cy", circleData.cy);
834
+ circleElement.attr("class", "actor-" + circleData.pos);
835
+ circleElement.attr("fill", circleData.fill);
836
+ circleElement.attr("stroke", circleData.stroke);
837
+ circleElement.attr("r", circleData.r);
838
+ if (circleElement.class !== void 0) {
839
+ circleElement.attr("class", circleElement.class);
840
+ }
841
+ if (circleData.title !== void 0) {
842
+ circleElement.append("title").text(circleData.title);
843
+ }
844
+ return circleElement;
845
+ }, "drawCircle");
846
+ var drawText2 = /* @__PURE__ */ __name(function(elem, textData) {
847
+ return drawText(elem, textData);
848
+ }, "drawText");
849
+ var drawLabel = /* @__PURE__ */ __name(function(elem, txtObject) {
850
+ function genPoints(x, y, width, height, cut) {
851
+ return x + "," + y + " " + (x + width) + "," + y + " " + (x + width) + "," + (y + height - cut) + " " + (x + width - cut * 1.2) + "," + (y + height) + " " + x + "," + (y + height);
852
+ }
853
+ __name(genPoints, "genPoints");
854
+ const polygon = elem.append("polygon");
855
+ polygon.attr("points", genPoints(txtObject.x, txtObject.y, 50, 20, 7));
856
+ polygon.attr("class", "labelBox");
857
+ txtObject.y = txtObject.y + txtObject.labelMargin;
858
+ txtObject.x = txtObject.x + 0.5 * txtObject.labelMargin;
859
+ drawText2(elem, txtObject);
860
+ }, "drawLabel");
861
+ var drawSection = /* @__PURE__ */ __name(function(elem, section, conf2) {
862
+ const g = elem.append("g");
863
+ const rect = getNoteRect();
864
+ rect.x = section.x;
865
+ rect.y = section.y;
866
+ rect.fill = section.fill;
867
+ rect.width = conf2.width * section.taskCount + // width of the tasks
868
+ conf2.diagramMarginX * (section.taskCount - 1);
869
+ rect.height = conf2.height;
870
+ rect.class = "journey-section section-type-" + section.num;
871
+ rect.rx = 3;
872
+ rect.ry = 3;
873
+ drawRect2(g, rect);
874
+ _drawTextCandidateFunc(conf2)(
875
+ section.text,
876
+ g,
877
+ rect.x,
878
+ rect.y,
879
+ rect.width,
880
+ rect.height,
881
+ { class: "journey-section section-type-" + section.num },
882
+ conf2,
883
+ section.colour
884
+ );
885
+ }, "drawSection");
886
+ var taskCount = -1;
887
+ var drawTask = /* @__PURE__ */ __name(function(elem, task, conf2) {
888
+ const center = task.x + conf2.width / 2;
889
+ const g = elem.append("g");
890
+ taskCount++;
891
+ const maxHeight = 300 + 5 * 30;
892
+ g.append("line").attr("id", "task" + taskCount).attr("x1", center).attr("y1", task.y).attr("x2", center).attr("y2", maxHeight).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666");
893
+ drawFace(g, {
894
+ cx: center,
895
+ cy: 300 + (5 - task.score) * 30,
896
+ score: task.score
897
+ });
898
+ const rect = getNoteRect();
899
+ rect.x = task.x;
900
+ rect.y = task.y;
901
+ rect.fill = task.fill;
902
+ rect.width = conf2.width;
903
+ rect.height = conf2.height;
904
+ rect.class = "task task-type-" + task.num;
905
+ rect.rx = 3;
906
+ rect.ry = 3;
907
+ drawRect2(g, rect);
908
+ let xPos = task.x + 14;
909
+ task.people.forEach((person) => {
910
+ const colour = task.actors[person].color;
911
+ const circle = {
912
+ cx: xPos,
913
+ cy: task.y,
914
+ r: 7,
915
+ fill: colour,
916
+ stroke: "#000",
917
+ title: person,
918
+ pos: task.actors[person].position
919
+ };
920
+ drawCircle(g, circle);
921
+ xPos += 10;
922
+ });
923
+ _drawTextCandidateFunc(conf2)(
924
+ task.task,
925
+ g,
926
+ rect.x,
927
+ rect.y,
928
+ rect.width,
929
+ rect.height,
930
+ { class: "task" },
931
+ conf2,
932
+ task.colour
933
+ );
934
+ }, "drawTask");
935
+ var drawBackgroundRect2 = /* @__PURE__ */ __name(function(elem, bounds2) {
936
+ drawBackgroundRect(elem, bounds2);
937
+ }, "drawBackgroundRect");
938
+ var _drawTextCandidateFunc = /* @__PURE__ */ function() {
939
+ function byText(content, g, x, y, width, height, textAttrs, colour) {
940
+ const text = g.append("text").attr("x", x + width / 2).attr("y", y + height / 2 + 5).style("font-color", colour).style("text-anchor", "middle").text(content);
941
+ _setTextAttrs(text, textAttrs);
942
+ }
943
+ __name(byText, "byText");
944
+ function byTspan(content, g, x, y, width, height, textAttrs, conf2, colour) {
945
+ const { taskFontSize, taskFontFamily } = conf2;
946
+ const lines = content.split(/<br\s*\/?>/gi);
947
+ for (let i = 0; i < lines.length; i++) {
948
+ const dy = i * taskFontSize - taskFontSize * (lines.length - 1) / 2;
949
+ const text = g.append("text").attr("x", x + width / 2).attr("y", y).attr("fill", colour).style("text-anchor", "middle").style("font-size", taskFontSize).style("font-family", taskFontFamily);
950
+ text.append("tspan").attr("x", x + width / 2).attr("dy", dy).text(lines[i]);
951
+ text.attr("y", y + height / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central");
952
+ _setTextAttrs(text, textAttrs);
953
+ }
954
+ }
955
+ __name(byTspan, "byTspan");
956
+ function byFo(content, g, x, y, width, height, textAttrs, conf2) {
957
+ const body = g.append("switch");
958
+ const f = body.append("foreignObject").attr("x", x).attr("y", y).attr("width", width).attr("height", height).attr("position", "fixed");
959
+ const text = f.append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
960
+ text.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(content);
961
+ byTspan(content, body, x, y, width, height, textAttrs, conf2);
962
+ _setTextAttrs(text, textAttrs);
963
+ }
964
+ __name(byFo, "byFo");
965
+ function _setTextAttrs(toText, fromTextAttrsDict) {
966
+ for (const key in fromTextAttrsDict) {
967
+ if (key in fromTextAttrsDict) {
968
+ toText.attr(key, fromTextAttrsDict[key]);
969
+ }
970
+ }
971
+ }
972
+ __name(_setTextAttrs, "_setTextAttrs");
973
+ return function(conf2) {
974
+ return conf2.textPlacement === "fo" ? byFo : conf2.textPlacement === "old" ? byText : byTspan;
975
+ };
976
+ }();
977
+ var initGraphics = /* @__PURE__ */ __name(function(graphics) {
978
+ graphics.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 5).attr("refY", 2).attr("markerWidth", 6).attr("markerHeight", 4).attr("orient", "auto").append("path").attr("d", "M 0,0 V 4 L6,2 Z");
979
+ }, "initGraphics");
980
+ var svgDraw_default = {
981
+ drawRect: drawRect2,
982
+ drawCircle,
983
+ drawSection,
984
+ drawText: drawText2,
985
+ drawLabel,
986
+ drawTask,
987
+ drawBackgroundRect: drawBackgroundRect2,
988
+ initGraphics
989
+ };
990
+ var setConf = /* @__PURE__ */ __name(function(cnf) {
991
+ const keys = Object.keys(cnf);
992
+ keys.forEach(function(key) {
993
+ conf[key] = cnf[key];
994
+ });
995
+ }, "setConf");
996
+ var actors = {};
997
+ var maxWidth = 0;
998
+ function drawActorLegend(diagram2) {
999
+ const conf2 = getConfig2().journey;
1000
+ const maxLabelWidth = conf2.maxLabelWidth;
1001
+ maxWidth = 0;
1002
+ let yPos = 60;
1003
+ Object.keys(actors).forEach((person) => {
1004
+ const colour = actors[person].color;
1005
+ const circleData = {
1006
+ cx: 20,
1007
+ cy: yPos,
1008
+ r: 7,
1009
+ fill: colour,
1010
+ stroke: "#000",
1011
+ pos: actors[person].position
1012
+ };
1013
+ svgDraw_default.drawCircle(diagram2, circleData);
1014
+ let measureText = diagram2.append("text").attr("visibility", "hidden").text(person);
1015
+ const fullTextWidth = measureText.node().getBoundingClientRect().width;
1016
+ measureText.remove();
1017
+ let lines = [];
1018
+ if (fullTextWidth <= maxLabelWidth) {
1019
+ lines = [person];
1020
+ } else {
1021
+ const words = person.split(" ");
1022
+ let currentLine = "";
1023
+ measureText = diagram2.append("text").attr("visibility", "hidden");
1024
+ words.forEach((word) => {
1025
+ const testLine = currentLine ? `${currentLine} ${word}` : word;
1026
+ measureText.text(testLine);
1027
+ const textWidth = measureText.node().getBoundingClientRect().width;
1028
+ if (textWidth > maxLabelWidth) {
1029
+ if (currentLine) {
1030
+ lines.push(currentLine);
1031
+ }
1032
+ currentLine = word;
1033
+ measureText.text(word);
1034
+ if (measureText.node().getBoundingClientRect().width > maxLabelWidth) {
1035
+ let brokenWord = "";
1036
+ for (const char of word) {
1037
+ brokenWord += char;
1038
+ measureText.text(brokenWord + "-");
1039
+ if (measureText.node().getBoundingClientRect().width > maxLabelWidth) {
1040
+ lines.push(brokenWord.slice(0, -1) + "-");
1041
+ brokenWord = char;
1042
+ }
1043
+ }
1044
+ currentLine = brokenWord;
1045
+ }
1046
+ } else {
1047
+ currentLine = testLine;
1048
+ }
1049
+ });
1050
+ if (currentLine) {
1051
+ lines.push(currentLine);
1052
+ }
1053
+ measureText.remove();
1054
+ }
1055
+ lines.forEach((line, index) => {
1056
+ const labelData = {
1057
+ x: 40,
1058
+ y: yPos + 7 + index * 20,
1059
+ fill: "#666",
1060
+ text: line,
1061
+ textMargin: conf2.boxTextMargin ?? 5
1062
+ };
1063
+ const textElement = svgDraw_default.drawText(diagram2, labelData);
1064
+ const lineWidth = textElement.node().getBoundingClientRect().width;
1065
+ if (lineWidth > maxWidth && lineWidth > conf2.leftMargin - lineWidth) {
1066
+ maxWidth = lineWidth;
1067
+ }
1068
+ });
1069
+ yPos += Math.max(20, lines.length * 20);
1070
+ });
1071
+ }
1072
+ __name(drawActorLegend, "drawActorLegend");
1073
+ var conf = getConfig2().journey;
1074
+ var leftMargin = 0;
1075
+ var draw = /* @__PURE__ */ __name(function(text, id, version, diagObj) {
1076
+ const configObject = getConfig2();
1077
+ const titleColor = configObject.journey.titleColor;
1078
+ const titleFontSize = configObject.journey.titleFontSize;
1079
+ const titleFontFamily = configObject.journey.titleFontFamily;
1080
+ const securityLevel = configObject.securityLevel;
1081
+ let sandboxElement;
1082
+ if (securityLevel === "sandbox") {
1083
+ sandboxElement = select("#i" + id);
1084
+ }
1085
+ const root = securityLevel === "sandbox" ? select(sandboxElement.nodes()[0].contentDocument.body) : select("body");
1086
+ bounds.init();
1087
+ const diagram2 = root.select("#" + id);
1088
+ svgDraw_default.initGraphics(diagram2);
1089
+ const tasks2 = diagObj.db.getTasks();
1090
+ const title = diagObj.db.getDiagramTitle();
1091
+ const actorNames = diagObj.db.getActors();
1092
+ for (const member in actors) {
1093
+ delete actors[member];
1094
+ }
1095
+ let actorPos = 0;
1096
+ actorNames.forEach((actorName) => {
1097
+ actors[actorName] = {
1098
+ color: conf.actorColours[actorPos % conf.actorColours.length],
1099
+ position: actorPos
1100
+ };
1101
+ actorPos++;
1102
+ });
1103
+ drawActorLegend(diagram2);
1104
+ leftMargin = conf.leftMargin + maxWidth;
1105
+ bounds.insert(0, 0, leftMargin, Object.keys(actors).length * 50);
1106
+ drawTasks(diagram2, tasks2, 0);
1107
+ const box = bounds.getBounds();
1108
+ if (title) {
1109
+ diagram2.append("text").text(title).attr("x", leftMargin).attr("font-size", titleFontSize).attr("font-weight", "bold").attr("y", 25).attr("fill", titleColor).attr("font-family", titleFontFamily);
1110
+ }
1111
+ const height = box.stopy - box.starty + 2 * conf.diagramMarginY;
1112
+ const width = leftMargin + box.stopx + 2 * conf.diagramMarginX;
1113
+ configureSvgSize(diagram2, height, width, conf.useMaxWidth);
1114
+ diagram2.append("line").attr("x1", leftMargin).attr("y1", conf.height * 4).attr("x2", width - leftMargin - 4).attr("y2", conf.height * 4).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)");
1115
+ const extraVertForTitle = title ? 70 : 0;
1116
+ diagram2.attr("viewBox", `${box.startx} -25 ${width} ${height + extraVertForTitle}`);
1117
+ diagram2.attr("preserveAspectRatio", "xMinYMin meet");
1118
+ diagram2.attr("height", height + extraVertForTitle + 25);
1119
+ }, "draw");
1120
+ var bounds = {
1121
+ data: {
1122
+ startx: void 0,
1123
+ stopx: void 0,
1124
+ starty: void 0,
1125
+ stopy: void 0
1126
+ },
1127
+ verticalPos: 0,
1128
+ sequenceItems: [],
1129
+ init: /* @__PURE__ */ __name(function() {
1130
+ this.sequenceItems = [];
1131
+ this.data = {
1132
+ startx: void 0,
1133
+ stopx: void 0,
1134
+ starty: void 0,
1135
+ stopy: void 0
1136
+ };
1137
+ this.verticalPos = 0;
1138
+ }, "init"),
1139
+ updateVal: /* @__PURE__ */ __name(function(obj, key, val, fun) {
1140
+ if (obj[key] === void 0) {
1141
+ obj[key] = val;
1142
+ } else {
1143
+ obj[key] = fun(val, obj[key]);
1144
+ }
1145
+ }, "updateVal"),
1146
+ updateBounds: /* @__PURE__ */ __name(function(startx, starty, stopx, stopy) {
1147
+ const conf2 = getConfig2().journey;
1148
+ const _self = this;
1149
+ let cnt = 0;
1150
+ function updateFn(type) {
1151
+ return /* @__PURE__ */ __name(function updateItemBounds(item) {
1152
+ cnt++;
1153
+ const n = _self.sequenceItems.length - cnt + 1;
1154
+ _self.updateVal(item, "starty", starty - n * conf2.boxMargin, Math.min);
1155
+ _self.updateVal(item, "stopy", stopy + n * conf2.boxMargin, Math.max);
1156
+ _self.updateVal(bounds.data, "startx", startx - n * conf2.boxMargin, Math.min);
1157
+ _self.updateVal(bounds.data, "stopx", stopx + n * conf2.boxMargin, Math.max);
1158
+ if (!(type === "activation")) {
1159
+ _self.updateVal(item, "startx", startx - n * conf2.boxMargin, Math.min);
1160
+ _self.updateVal(item, "stopx", stopx + n * conf2.boxMargin, Math.max);
1161
+ _self.updateVal(bounds.data, "starty", starty - n * conf2.boxMargin, Math.min);
1162
+ _self.updateVal(bounds.data, "stopy", stopy + n * conf2.boxMargin, Math.max);
1163
+ }
1164
+ }, "updateItemBounds");
1165
+ }
1166
+ __name(updateFn, "updateFn");
1167
+ this.sequenceItems.forEach(updateFn());
1168
+ }, "updateBounds"),
1169
+ insert: /* @__PURE__ */ __name(function(startx, starty, stopx, stopy) {
1170
+ const _startx = Math.min(startx, stopx);
1171
+ const _stopx = Math.max(startx, stopx);
1172
+ const _starty = Math.min(starty, stopy);
1173
+ const _stopy = Math.max(starty, stopy);
1174
+ this.updateVal(bounds.data, "startx", _startx, Math.min);
1175
+ this.updateVal(bounds.data, "starty", _starty, Math.min);
1176
+ this.updateVal(bounds.data, "stopx", _stopx, Math.max);
1177
+ this.updateVal(bounds.data, "stopy", _stopy, Math.max);
1178
+ this.updateBounds(_startx, _starty, _stopx, _stopy);
1179
+ }, "insert"),
1180
+ bumpVerticalPos: /* @__PURE__ */ __name(function(bump) {
1181
+ this.verticalPos = this.verticalPos + bump;
1182
+ this.data.stopy = this.verticalPos;
1183
+ }, "bumpVerticalPos"),
1184
+ getVerticalPos: /* @__PURE__ */ __name(function() {
1185
+ return this.verticalPos;
1186
+ }, "getVerticalPos"),
1187
+ getBounds: /* @__PURE__ */ __name(function() {
1188
+ return this.data;
1189
+ }, "getBounds")
1190
+ };
1191
+ var fills = conf.sectionFills;
1192
+ var textColours = conf.sectionColours;
1193
+ var drawTasks = /* @__PURE__ */ __name(function(diagram2, tasks2, verticalPos) {
1194
+ const conf2 = getConfig2().journey;
1195
+ let lastSection = "";
1196
+ const sectionVHeight = conf2.height * 2 + conf2.diagramMarginY;
1197
+ const taskPos = verticalPos + sectionVHeight;
1198
+ let sectionNumber = 0;
1199
+ let fill = "#CCC";
1200
+ let colour = "black";
1201
+ let num = 0;
1202
+ for (const [i, task] of tasks2.entries()) {
1203
+ if (lastSection !== task.section) {
1204
+ fill = fills[sectionNumber % fills.length];
1205
+ num = sectionNumber % fills.length;
1206
+ colour = textColours[sectionNumber % textColours.length];
1207
+ let taskInSectionCount = 0;
1208
+ const currentSection2 = task.section;
1209
+ for (let taskIndex = i; taskIndex < tasks2.length; taskIndex++) {
1210
+ if (tasks2[taskIndex].section == currentSection2) {
1211
+ taskInSectionCount = taskInSectionCount + 1;
1212
+ } else {
1213
+ break;
1214
+ }
1215
+ }
1216
+ const section = {
1217
+ x: i * conf2.taskMargin + i * conf2.width + leftMargin,
1218
+ y: 50,
1219
+ text: task.section,
1220
+ fill,
1221
+ num,
1222
+ colour,
1223
+ taskCount: taskInSectionCount
1224
+ };
1225
+ svgDraw_default.drawSection(diagram2, section, conf2);
1226
+ lastSection = task.section;
1227
+ sectionNumber++;
1228
+ }
1229
+ const taskActors = task.people.reduce((acc, actorName) => {
1230
+ if (actors[actorName]) {
1231
+ acc[actorName] = actors[actorName];
1232
+ }
1233
+ return acc;
1234
+ }, {});
1235
+ task.x = i * conf2.taskMargin + i * conf2.width + leftMargin;
1236
+ task.y = taskPos;
1237
+ task.width = conf2.diagramMarginX;
1238
+ task.height = conf2.diagramMarginY;
1239
+ task.colour = colour;
1240
+ task.fill = fill;
1241
+ task.num = num;
1242
+ task.actors = taskActors;
1243
+ svgDraw_default.drawTask(diagram2, task, conf2);
1244
+ bounds.insert(task.x, task.y, task.x + task.width + conf2.taskMargin, 300 + 5 * 30);
1245
+ }
1246
+ }, "drawTasks");
1247
+ var journeyRenderer_default = {
1248
+ setConf,
1249
+ draw
1250
+ };
1251
+ var diagram = {
1252
+ parser: journey_default,
1253
+ db: journeyDb_default,
1254
+ renderer: journeyRenderer_default,
1255
+ styles: styles_default,
1256
+ init: /* @__PURE__ */ __name((cnf) => {
1257
+ journeyRenderer_default.setConf(cnf.journey);
1258
+ journeyDb_default.clear();
1259
+ }, "init")
1260
+ };
1261
+
1262
+ export { diagram };