research-copilot 0.1.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 (395) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +190 -0
  3. package/app/build/icon.icns +0 -0
  4. package/app/build/icon.ico +0 -0
  5. package/app/build/icon.png +0 -0
  6. package/app/out/main/index.mjs +6719 -0
  7. package/app/out/preload/index.js +141 -0
  8. package/app/out/renderer/assets/Inter-Variable-Latin-8kRkwJBP.woff2 +0 -0
  9. package/app/out/renderer/assets/Inter-Variable-LatinExt-B_-bZUTo.woff2 +0 -0
  10. package/app/out/renderer/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
  11. package/app/out/renderer/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
  12. package/app/out/renderer/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
  13. package/app/out/renderer/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
  14. package/app/out/renderer/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
  15. package/app/out/renderer/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
  16. package/app/out/renderer/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
  17. package/app/out/renderer/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
  18. package/app/out/renderer/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
  19. package/app/out/renderer/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
  20. package/app/out/renderer/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
  21. package/app/out/renderer/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
  22. package/app/out/renderer/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
  23. package/app/out/renderer/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
  24. package/app/out/renderer/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
  25. package/app/out/renderer/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
  26. package/app/out/renderer/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
  27. package/app/out/renderer/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
  28. package/app/out/renderer/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
  29. package/app/out/renderer/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
  30. package/app/out/renderer/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
  31. package/app/out/renderer/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
  32. package/app/out/renderer/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
  33. package/app/out/renderer/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
  34. package/app/out/renderer/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
  35. package/app/out/renderer/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
  36. package/app/out/renderer/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
  37. package/app/out/renderer/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
  38. package/app/out/renderer/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
  39. package/app/out/renderer/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
  40. package/app/out/renderer/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
  41. package/app/out/renderer/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
  42. package/app/out/renderer/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
  43. package/app/out/renderer/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
  44. package/app/out/renderer/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
  45. package/app/out/renderer/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
  46. package/app/out/renderer/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
  47. package/app/out/renderer/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
  48. package/app/out/renderer/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
  49. package/app/out/renderer/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
  50. package/app/out/renderer/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
  51. package/app/out/renderer/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
  52. package/app/out/renderer/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
  53. package/app/out/renderer/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
  54. package/app/out/renderer/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
  55. package/app/out/renderer/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
  56. package/app/out/renderer/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
  57. package/app/out/renderer/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
  58. package/app/out/renderer/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
  59. package/app/out/renderer/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
  60. package/app/out/renderer/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
  61. package/app/out/renderer/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
  62. package/app/out/renderer/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
  63. package/app/out/renderer/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
  64. package/app/out/renderer/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
  65. package/app/out/renderer/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
  66. package/app/out/renderer/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
  67. package/app/out/renderer/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
  68. package/app/out/renderer/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
  69. package/app/out/renderer/assets/MilkdownMarkdownEditor-bLPxrCVb.js +89821 -0
  70. package/app/out/renderer/assets/MilkdownMarkdownEditor-tTNRIB2K.css +2555 -0
  71. package/app/out/renderer/assets/Tableau10-BqnYsPR6.js +9 -0
  72. package/app/out/renderer/assets/apl-fqmucPXA.js +140 -0
  73. package/app/out/renderer/assets/arc-J47ePHZ2.js +132 -0
  74. package/app/out/renderer/assets/array-DgktLKBx.js +6 -0
  75. package/app/out/renderer/assets/asciiarmor-DucZyvP0.js +56 -0
  76. package/app/out/renderer/assets/asn1-BnOEsgAm.js +144 -0
  77. package/app/out/renderer/assets/asterisk-QAlztEwS.js +345 -0
  78. package/app/out/renderer/assets/blockDiagram-c4efeb88-5uRQXgQJ.js +1817 -0
  79. package/app/out/renderer/assets/brainfuck-DZVCuF_t.js +53 -0
  80. package/app/out/renderer/assets/c4Diagram-c83219d4-C4iCTPEL.js +2464 -0
  81. package/app/out/renderer/assets/channel-ZAmhHE3g.js +7 -0
  82. package/app/out/renderer/assets/classDiagram-beda092f-7NOZxq_W.js +357 -0
  83. package/app/out/renderer/assets/classDiagram-v2-2358418a-5fPT-cUH.js +291 -0
  84. package/app/out/renderer/assets/clike-xqXYL6ge.js +805 -0
  85. package/app/out/renderer/assets/clojure-BhXMqnxz.js +849 -0
  86. package/app/out/renderer/assets/clone-CsnzsYXQ.js +8 -0
  87. package/app/out/renderer/assets/cmake-BGaNd9E7.js +71 -0
  88. package/app/out/renderer/assets/cobol-4yqQntpt.js +120 -0
  89. package/app/out/renderer/assets/coffeescript-D2dXvhEc.js +308 -0
  90. package/app/out/renderer/assets/commonlisp-CF_VNHQR.js +130 -0
  91. package/app/out/renderer/assets/createText-1719965b-Cji7KN4K.js +4904 -0
  92. package/app/out/renderer/assets/crystal-DyuLTqLs.js +398 -0
  93. package/app/out/renderer/assets/css-c-jst79C.js +1783 -0
  94. package/app/out/renderer/assets/cypher-Dlu_3r4V.js +121 -0
  95. package/app/out/renderer/assets/d-UURgV0Ux.js +179 -0
  96. package/app/out/renderer/assets/diff-B_Bi2Crb.js +25 -0
  97. package/app/out/renderer/assets/dockerfile-Bvk733Ga.js +201 -0
  98. package/app/out/renderer/assets/dtd-Dy74G54E.js +114 -0
  99. package/app/out/renderer/assets/dylan-TSb-Nfix.js +314 -0
  100. package/app/out/renderer/assets/ebnf-DAomQUbD.js +139 -0
  101. package/app/out/renderer/assets/ecl-B59qGGVg.js +178 -0
  102. package/app/out/renderer/assets/edges-96097737-CD0EvAZQ.js +1844 -0
  103. package/app/out/renderer/assets/eiffel-Dze7nlu3.js +134 -0
  104. package/app/out/renderer/assets/elm-DG7jkhNZ.js +176 -0
  105. package/app/out/renderer/assets/erDiagram-0228fc6a-DRYXBpi7.js +1321 -0
  106. package/app/out/renderer/assets/erlang-BO6gOnGA.js +674 -0
  107. package/app/out/renderer/assets/factor-CMxFHDqz.js +65 -0
  108. package/app/out/renderer/assets/fcl-CDDUNjTj.js +141 -0
  109. package/app/out/renderer/assets/flowDb-c6c81e3f-CuoIN-Cy.js +1713 -0
  110. package/app/out/renderer/assets/flowDiagram-50d868cf-CPWPLOml.js +1272 -0
  111. package/app/out/renderer/assets/flowDiagram-v2-4f6560a1-C_R12s4S.js +33 -0
  112. package/app/out/renderer/assets/flowchart-elk-definition-6af322e1-BdKUSFpi.js +92921 -0
  113. package/app/out/renderer/assets/forth-B9D2JCeE.js +116 -0
  114. package/app/out/renderer/assets/fortran-CAG2BFbe.js +467 -0
  115. package/app/out/renderer/assets/ganttDiagram-a2739b55-ygqT5HlG.js +3399 -0
  116. package/app/out/renderer/assets/gas-d3KEcW3x.js +294 -0
  117. package/app/out/renderer/assets/gherkin-DhZlEZiy.js +115 -0
  118. package/app/out/renderer/assets/gitGraphDiagram-82fe8481-D97GT4iA.js +1791 -0
  119. package/app/out/renderer/assets/graph-DpC13d95.js +1237 -0
  120. package/app/out/renderer/assets/groovy-CpwJiBl7.js +223 -0
  121. package/app/out/renderer/assets/haskell-BlGBCCe3.js +459 -0
  122. package/app/out/renderer/assets/haxe-7MlzfeYV.js +514 -0
  123. package/app/out/renderer/assets/http-BqypyemW.js +79 -0
  124. package/app/out/renderer/assets/idl-4HIGJlDI.js +985 -0
  125. package/app/out/renderer/assets/index-4-ziknCv.js +292 -0
  126. package/app/out/renderer/assets/index-5325376f-Bbs7Fbqr.js +663 -0
  127. package/app/out/renderer/assets/index-B2jip-rk.js +2489 -0
  128. package/app/out/renderer/assets/index-BKTVfokE.js +312 -0
  129. package/app/out/renderer/assets/index-BiJbFgVG.js +118 -0
  130. package/app/out/renderer/assets/index-Bn433Fat.js +83 -0
  131. package/app/out/renderer/assets/index-BqDyyRCx.js +39679 -0
  132. package/app/out/renderer/assets/index-BzFMeMPn.js +158 -0
  133. package/app/out/renderer/assets/index-C-_uCjZJ.css +2701 -0
  134. package/app/out/renderer/assets/index-C1ithNW1.js +1765 -0
  135. package/app/out/renderer/assets/index-CAJkRYkO.js +407 -0
  136. package/app/out/renderer/assets/index-CleO0-yj.js +690 -0
  137. package/app/out/renderer/assets/index-Cq4MH3sY.js +1020 -0
  138. package/app/out/renderer/assets/index-CtA0Xj22.js +705 -0
  139. package/app/out/renderer/assets/index-CvAZkqBZ.js +83 -0
  140. package/app/out/renderer/assets/index-D3UDN-5c.js +152 -0
  141. package/app/out/renderer/assets/index-D4F9R5ao.js +179 -0
  142. package/app/out/renderer/assets/index-D6RguhZ5.js +328 -0
  143. package/app/out/renderer/assets/index-DnEowqXv.js +386 -0
  144. package/app/out/renderer/assets/index-K8c8Mqdy.js +98 -0
  145. package/app/out/renderer/assets/index-Kh14gO6K.js +62 -0
  146. package/app/out/renderer/assets/index-WFd2jRnA.js +333 -0
  147. package/app/out/renderer/assets/index-WgMfkRFp.js +313 -0
  148. package/app/out/renderer/assets/index-Y4lKyF6t.js +1042 -0
  149. package/app/out/renderer/assets/index-fx307_f1.js +643 -0
  150. package/app/out/renderer/assets/infoDiagram-8eee0895-ptaVSwzq.js +511 -0
  151. package/app/out/renderer/assets/init-ZxktEp_H.js +16 -0
  152. package/app/out/renderer/assets/javascript-C3MnDRiU.js +994 -0
  153. package/app/out/renderer/assets/journeyDiagram-c64418c1-aloEGOQp.js +1184 -0
  154. package/app/out/renderer/assets/julia-Bs6JJhYG.js +407 -0
  155. package/app/out/renderer/assets/layout-ZeuHE_aY.js +2217 -0
  156. package/app/out/renderer/assets/line-CAgaGl-S.js +45 -0
  157. package/app/out/renderer/assets/linear-DIg7lTe1.js +539 -0
  158. package/app/out/renderer/assets/livescript-DmzgM3Yt.js +296 -0
  159. package/app/out/renderer/assets/lua-8cJgIlqe.js +256 -0
  160. package/app/out/renderer/assets/mathematica-DNLOL9PQ.js +110 -0
  161. package/app/out/renderer/assets/mbox-Ga7d4MMN.js +117 -0
  162. package/app/out/renderer/assets/mindmap-definition-8da855dc-B8XVoUxz.js +36054 -0
  163. package/app/out/renderer/assets/mirc-Dma3B8rS.js +107 -0
  164. package/app/out/renderer/assets/mllike-DHn7xckP.js +334 -0
  165. package/app/out/renderer/assets/modelica-0d55jYY0.js +147 -0
  166. package/app/out/renderer/assets/mscgen-DdqZYINH.js +135 -0
  167. package/app/out/renderer/assets/mumps-Btr8VblO.js +93 -0
  168. package/app/out/renderer/assets/nginx-DTDtBDVN.js +141 -0
  169. package/app/out/renderer/assets/nsis-3zG7tgur.js +62 -0
  170. package/app/out/renderer/assets/ntriples-CvgOYMpL.js +153 -0
  171. package/app/out/renderer/assets/octave-DYBj3-tl.js +200 -0
  172. package/app/out/renderer/assets/ordinal-DSZU4PqD.js +76 -0
  173. package/app/out/renderer/assets/oz-R_e8WMIi.js +231 -0
  174. package/app/out/renderer/assets/pascal-GD8iposT.js +105 -0
  175. package/app/out/renderer/assets/path-Cp2qmpkd.js +109 -0
  176. package/app/out/renderer/assets/perl-DL9mHpoi.js +1105 -0
  177. package/app/out/renderer/assets/pieDiagram-a8764435-DlwoeBU2.js +770 -0
  178. package/app/out/renderer/assets/pig-C_4T4YIV.js +101 -0
  179. package/app/out/renderer/assets/powershell-B0suO7Vd.js +328 -0
  180. package/app/out/renderer/assets/properties-BR-vP1aU.js +58 -0
  181. package/app/out/renderer/assets/protobuf-BxgpyhoW.js +77 -0
  182. package/app/out/renderer/assets/pug-By0kVCfm.js +405 -0
  183. package/app/out/renderer/assets/puppet-Bdao66PW.js +137 -0
  184. package/app/out/renderer/assets/python-CvWbmiX4.js +427 -0
  185. package/app/out/renderer/assets/q-CrbCVq4a.js +131 -0
  186. package/app/out/renderer/assets/quadrantDiagram-1e28029f-BaSi1XB4.js +1200 -0
  187. package/app/out/renderer/assets/r-V7nswm59.js +170 -0
  188. package/app/out/renderer/assets/requirementDiagram-08caed73-D3EFyegZ.js +1092 -0
  189. package/app/out/renderer/assets/rpm-C-DLY-If.js +109 -0
  190. package/app/out/renderer/assets/ruby-JDKLJNK0.js +330 -0
  191. package/app/out/renderer/assets/sankeyDiagram-a04cb91d-Cv44AsnM.js +1174 -0
  192. package/app/out/renderer/assets/sas-D2UG-yhZ.js +207 -0
  193. package/app/out/renderer/assets/scheme-BKzrkGJD.js +222 -0
  194. package/app/out/renderer/assets/sequenceDiagram-c5b8d532-CuUBu-x4.js +3337 -0
  195. package/app/out/renderer/assets/shell-BlsXDxCn.js +222 -0
  196. package/app/out/renderer/assets/sieve-CjwBwOY5.js +135 -0
  197. package/app/out/renderer/assets/simple-mode-DMneyfDu.js +130 -0
  198. package/app/out/renderer/assets/smalltalk-BOIGQuhN.js +121 -0
  199. package/app/out/renderer/assets/solr-CwD7U71z.js +69 -0
  200. package/app/out/renderer/assets/sparql-DYskk2vE.js +249 -0
  201. package/app/out/renderer/assets/spreadsheet-Bgtt3oLP.js +87 -0
  202. package/app/out/renderer/assets/sql-BSrOzCRI.js +354 -0
  203. package/app/out/renderer/assets/stateDiagram-1ecb1508-BOU34Zp4.js +454 -0
  204. package/app/out/renderer/assets/stateDiagram-v2-c2b004d7-BgRoffou.js +326 -0
  205. package/app/out/renderer/assets/stex-B6LNC55o.js +231 -0
  206. package/app/out/renderer/assets/styles-b4e223ce-BMr9TPuj.js +1483 -0
  207. package/app/out/renderer/assets/styles-ca3715f6-DgbNw99p.js +1363 -0
  208. package/app/out/renderer/assets/styles-d45a18b0-DtRYKYKf.js +574 -0
  209. package/app/out/renderer/assets/stylus-BkS-boTH.js +565 -0
  210. package/app/out/renderer/assets/svgDrawCommon-b86b1483-Bein03PD.js +100 -0
  211. package/app/out/renderer/assets/swift-FRZi1uvB.js +291 -0
  212. package/app/out/renderer/assets/tcl-CUcaCdmq.js +114 -0
  213. package/app/out/renderer/assets/textile-BnFpjsrl.js +414 -0
  214. package/app/out/renderer/assets/tiddlywiki-CjprD-Qp.js +218 -0
  215. package/app/out/renderer/assets/tiki-B4EPSQ1G.js +265 -0
  216. package/app/out/renderer/assets/timeline-definition-faaaa080-BlWpLE_4.js +1212 -0
  217. package/app/out/renderer/assets/toml-BOuWGMcf.js +76 -0
  218. package/app/out/renderer/assets/troff-E1bJ0PPL.js +61 -0
  219. package/app/out/renderer/assets/ttcn-cfg-Dc39-fIP.js +133 -0
  220. package/app/out/renderer/assets/ttcn-tKd4HLu4.js +192 -0
  221. package/app/out/renderer/assets/turtle-Dq7-1WAf.js +124 -0
  222. package/app/out/renderer/assets/vb-Dp90gtsv.js +196 -0
  223. package/app/out/renderer/assets/vbscript-CI6_mxxU.js +479 -0
  224. package/app/out/renderer/assets/velocity-BwIZK1TH.js +149 -0
  225. package/app/out/renderer/assets/verilog-DDCYnHN8.js +430 -0
  226. package/app/out/renderer/assets/vhdl-DCkMIyT9.js +158 -0
  227. package/app/out/renderer/assets/webidl-BTLTThCm.js +204 -0
  228. package/app/out/renderer/assets/xquery-BgiOC5Ce.js +525 -0
  229. package/app/out/renderer/assets/xychartDiagram-f5964ef8-Bhga-YXm.js +1799 -0
  230. package/app/out/renderer/assets/yacas-b5lAVEIl.js +130 -0
  231. package/app/out/renderer/assets/z80-BZV19vqv.js +93 -0
  232. package/app/out/renderer/index.html +13 -0
  233. package/app/out/skills/community-builtin/README.md +29 -0
  234. package/app/out/skills/community-builtin/document-docx/SKILL.md +44 -0
  235. package/app/out/skills/community-builtin/document-docx/scripts/docx-to-markdown.sh +20 -0
  236. package/app/out/skills/community-builtin/document-docx/scripts/extract-docx-text.sh +28 -0
  237. package/app/out/skills/community-builtin/document-docx/scripts/init-docx-template.sh +32 -0
  238. package/app/out/skills/community-builtin/document-docx/scripts/setup-docx-tools.sh +10 -0
  239. package/app/out/skills/community-builtin/markitdown/SKILL.md +105 -0
  240. package/app/out/skills/community-builtin/markitdown/scripts/batch-convert.sh +40 -0
  241. package/app/out/skills/community-builtin/markitdown/scripts/convert-file.sh +24 -0
  242. package/app/out/skills/community-builtin/markitdown/scripts/setup-markitdown.sh +10 -0
  243. package/app/out/skills/community-builtin/repo-quick-audit/SKILL.md +27 -0
  244. package/app/out/skills/community-builtin/repo-quick-audit/scripts/audit-basics.sh +19 -0
  245. package/app/out/skills/research-pilot-default-project-skills/README.md +23 -0
  246. package/app/out/skills/research-pilot-default-project-skills/citation-management/SKILL.md +39 -0
  247. package/app/out/skills/research-pilot-default-project-skills/citation-management/scripts/doi-to-bibtex.sh +25 -0
  248. package/app/out/skills/research-pilot-default-project-skills/citation-management/scripts/normalize-bibtex-keys.sh +51 -0
  249. package/app/out/skills/research-pilot-default-project-skills/citation-management/scripts/setup-citation-tools.sh +10 -0
  250. package/app/out/skills/research-pilot-default-project-skills/citation-management/scripts/validate-bib.sh +31 -0
  251. package/app/out/skills/research-pilot-default-project-skills/matplotlib/SKILL.md +34 -0
  252. package/app/out/skills/research-pilot-default-project-skills/matplotlib/references/api_reference.md +412 -0
  253. package/app/out/skills/research-pilot-default-project-skills/matplotlib/references/common_issues.md +563 -0
  254. package/app/out/skills/research-pilot-default-project-skills/matplotlib/references/plot_types.md +476 -0
  255. package/app/out/skills/research-pilot-default-project-skills/matplotlib/references/styling_guide.md +589 -0
  256. package/app/out/skills/research-pilot-default-project-skills/matplotlib/references/subagent_quickstart.md +30 -0
  257. package/app/out/skills/research-pilot-default-project-skills/matplotlib/scripts/plot_template.py +401 -0
  258. package/app/out/skills/research-pilot-default-project-skills/matplotlib/scripts/style_configurator.py +409 -0
  259. package/app/out/skills/research-pilot-default-project-skills/research-grants/SKILL.md +38 -0
  260. package/app/out/skills/research-pilot-default-project-skills/research-grants/scripts/check-grant-compliance.sh +40 -0
  261. package/app/out/skills/research-pilot-default-project-skills/research-grants/scripts/grant-summary-card.sh +32 -0
  262. package/app/out/skills/research-pilot-default-project-skills/research-grants/scripts/init-grant-structure.sh +70 -0
  263. package/app/package.json +77 -0
  264. package/bin/cli.mjs +56 -0
  265. package/lib/README.md +145 -0
  266. package/lib/skills/_generated.ts +13 -0
  267. package/lib/skills/builtin/brainstorming-research-ideas/SKILL.md +280 -0
  268. package/lib/skills/builtin/coding/SKILL.md +114 -0
  269. package/lib/skills/builtin/creative-thinking-for-research/SKILL.md +273 -0
  270. package/lib/skills/builtin/matplotlib/SKILL.md +361 -0
  271. package/lib/skills/builtin/matplotlib/references/api_reference.md +412 -0
  272. package/lib/skills/builtin/matplotlib/references/common_issues.md +563 -0
  273. package/lib/skills/builtin/matplotlib/references/plot_types.md +476 -0
  274. package/lib/skills/builtin/matplotlib/references/styling_guide.md +589 -0
  275. package/lib/skills/builtin/matplotlib/scripts/plot_template.py +401 -0
  276. package/lib/skills/builtin/matplotlib/scripts/style_configurator.py +409 -0
  277. package/lib/skills/builtin/paper-writing/SKILL.md +554 -0
  278. package/lib/skills/builtin/paper-writing/references/checklists.md +524 -0
  279. package/lib/skills/builtin/paper-writing/references/citation-workflow.md +562 -0
  280. package/lib/skills/builtin/paper-writing/references/reviewer-guidelines.md +462 -0
  281. package/lib/skills/builtin/paper-writing/references/sources.md +189 -0
  282. package/lib/skills/builtin/paper-writing/references/systems-conferences.md +260 -0
  283. package/lib/skills/builtin/paper-writing/references/writing-guide.md +476 -0
  284. package/lib/skills/builtin/paper-writing/templates/README.md +408 -0
  285. package/lib/skills/builtin/paper-writing/templates/aaai2026/README.md +534 -0
  286. package/lib/skills/builtin/paper-writing/templates/aaai2026/aaai2026-unified-supp.tex +144 -0
  287. package/lib/skills/builtin/paper-writing/templates/aaai2026/aaai2026-unified-template.tex +952 -0
  288. package/lib/skills/builtin/paper-writing/templates/aaai2026/aaai2026.bib +111 -0
  289. package/lib/skills/builtin/paper-writing/templates/aaai2026/aaai2026.bst +1493 -0
  290. package/lib/skills/builtin/paper-writing/templates/aaai2026/aaai2026.sty +315 -0
  291. package/lib/skills/builtin/paper-writing/templates/acl/README.md +50 -0
  292. package/lib/skills/builtin/paper-writing/templates/acl/acl.sty +312 -0
  293. package/lib/skills/builtin/paper-writing/templates/acl/acl_latex.tex +377 -0
  294. package/lib/skills/builtin/paper-writing/templates/acl/acl_lualatex.tex +101 -0
  295. package/lib/skills/builtin/paper-writing/templates/acl/acl_natbib.bst +1940 -0
  296. package/lib/skills/builtin/paper-writing/templates/acl/anthology.bib.txt +26 -0
  297. package/lib/skills/builtin/paper-writing/templates/acl/custom.bib +70 -0
  298. package/lib/skills/builtin/paper-writing/templates/acl/formatting.md +326 -0
  299. package/lib/skills/builtin/paper-writing/templates/asplos2027/main.tex +459 -0
  300. package/lib/skills/builtin/paper-writing/templates/asplos2027/references.bib +135 -0
  301. package/lib/skills/builtin/paper-writing/templates/colm2025/README.md +3 -0
  302. package/lib/skills/builtin/paper-writing/templates/colm2025/colm2025_conference.bib +11 -0
  303. package/lib/skills/builtin/paper-writing/templates/colm2025/colm2025_conference.bst +1440 -0
  304. package/lib/skills/builtin/paper-writing/templates/colm2025/colm2025_conference.pdf +0 -0
  305. package/lib/skills/builtin/paper-writing/templates/colm2025/colm2025_conference.sty +218 -0
  306. package/lib/skills/builtin/paper-writing/templates/colm2025/colm2025_conference.tex +305 -0
  307. package/lib/skills/builtin/paper-writing/templates/colm2025/fancyhdr.sty +485 -0
  308. package/lib/skills/builtin/paper-writing/templates/colm2025/math_commands.tex +508 -0
  309. package/lib/skills/builtin/paper-writing/templates/colm2025/natbib.sty +1246 -0
  310. package/lib/skills/builtin/paper-writing/templates/iclr2026/fancyhdr.sty +485 -0
  311. package/lib/skills/builtin/paper-writing/templates/iclr2026/iclr2026_conference.bib +24 -0
  312. package/lib/skills/builtin/paper-writing/templates/iclr2026/iclr2026_conference.bst +1440 -0
  313. package/lib/skills/builtin/paper-writing/templates/iclr2026/iclr2026_conference.pdf +0 -0
  314. package/lib/skills/builtin/paper-writing/templates/iclr2026/iclr2026_conference.sty +246 -0
  315. package/lib/skills/builtin/paper-writing/templates/iclr2026/iclr2026_conference.tex +414 -0
  316. package/lib/skills/builtin/paper-writing/templates/iclr2026/math_commands.tex +508 -0
  317. package/lib/skills/builtin/paper-writing/templates/iclr2026/natbib.sty +1246 -0
  318. package/lib/skills/builtin/paper-writing/templates/icml2026/algorithm.sty +79 -0
  319. package/lib/skills/builtin/paper-writing/templates/icml2026/algorithmic.sty +201 -0
  320. package/lib/skills/builtin/paper-writing/templates/icml2026/example_paper.bib +75 -0
  321. package/lib/skills/builtin/paper-writing/templates/icml2026/example_paper.pdf +0 -0
  322. package/lib/skills/builtin/paper-writing/templates/icml2026/example_paper.tex +662 -0
  323. package/lib/skills/builtin/paper-writing/templates/icml2026/fancyhdr.sty +864 -0
  324. package/lib/skills/builtin/paper-writing/templates/icml2026/icml2026.bst +1443 -0
  325. package/lib/skills/builtin/paper-writing/templates/icml2026/icml2026.sty +767 -0
  326. package/lib/skills/builtin/paper-writing/templates/icml2026/icml_numpapers.pdf +0 -0
  327. package/lib/skills/builtin/paper-writing/templates/neurips2025/Makefile +36 -0
  328. package/lib/skills/builtin/paper-writing/templates/neurips2025/extra_pkgs.tex +53 -0
  329. package/lib/skills/builtin/paper-writing/templates/neurips2025/main.tex +38 -0
  330. package/lib/skills/builtin/paper-writing/templates/neurips2025/neurips.sty +382 -0
  331. package/lib/skills/builtin/paper-writing/templates/nsdi2027/main.tex +426 -0
  332. package/lib/skills/builtin/paper-writing/templates/nsdi2027/references.bib +151 -0
  333. package/lib/skills/builtin/paper-writing/templates/nsdi2027/usenix-2020-09.sty +83 -0
  334. package/lib/skills/builtin/paper-writing/templates/osdi2026/main.tex +429 -0
  335. package/lib/skills/builtin/paper-writing/templates/osdi2026/references.bib +150 -0
  336. package/lib/skills/builtin/paper-writing/templates/osdi2026/usenix-2020-09.sty +83 -0
  337. package/lib/skills/builtin/paper-writing/templates/sosp2026/main.tex +532 -0
  338. package/lib/skills/builtin/paper-writing/templates/sosp2026/references.bib +148 -0
  339. package/lib/skills/builtin/research-grants/SKILL.md +958 -0
  340. package/lib/skills/builtin/research-grants/assets/budget_justification_template.md +453 -0
  341. package/lib/skills/builtin/research-grants/assets/nih_specific_aims_template.md +166 -0
  342. package/lib/skills/builtin/research-grants/assets/nsf_project_summary_template.md +92 -0
  343. package/lib/skills/builtin/research-grants/references/README.md +285 -0
  344. package/lib/skills/builtin/research-grants/references/broader_impacts.md +392 -0
  345. package/lib/skills/builtin/research-grants/references/darpa_guidelines.md +636 -0
  346. package/lib/skills/builtin/research-grants/references/doe_guidelines.md +586 -0
  347. package/lib/skills/builtin/research-grants/references/nih_guidelines.md +851 -0
  348. package/lib/skills/builtin/research-grants/references/nsf_guidelines.md +570 -0
  349. package/lib/skills/builtin/research-grants/references/nstc_guidelines.md +733 -0
  350. package/lib/skills/builtin/research-grants/references/specific_aims_guide.md +458 -0
  351. package/lib/skills/builtin/rewrite-humanize/SKILL.md +116 -0
  352. package/lib/skills/builtin/rewrite-humanize/references/cs-venue-tone.md +57 -0
  353. package/lib/skills/builtin/rewrite-humanize/references/lexicon.md +50 -0
  354. package/lib/skills/builtin/scholar-evaluation/SKILL.md +300 -0
  355. package/lib/skills/builtin/scholar-evaluation/references/evaluation_framework.md +663 -0
  356. package/lib/skills/builtin/scholar-evaluation/scripts/calculate_scores.py +379 -0
  357. package/lib/skills/builtin/scientific-schematics/SKILL.md +603 -0
  358. package/lib/skills/builtin/scientific-schematics/references/QUICK_REFERENCE.md +182 -0
  359. package/lib/skills/builtin/scientific-schematics/references/README.md +292 -0
  360. package/lib/skills/builtin/scientific-schematics/references/best_practices.md +560 -0
  361. package/lib/skills/builtin/scientific-schematics/scripts/__pycache__/generate_schematic.cpython-312.pyc +0 -0
  362. package/lib/skills/builtin/scientific-schematics/scripts/__pycache__/generate_schematic_ai.cpython-312.pyc +0 -0
  363. package/lib/skills/builtin/scientific-schematics/scripts/example_usage.sh +85 -0
  364. package/lib/skills/builtin/scientific-schematics/scripts/generate_schematic.py +141 -0
  365. package/lib/skills/builtin/scientific-schematics/scripts/generate_schematic_ai.py +910 -0
  366. package/lib/skills/builtin/scientific-visualization/SKILL.md +749 -0
  367. package/lib/skills/builtin/scientific-visualization/assets/color_palettes.py +197 -0
  368. package/lib/skills/builtin/scientific-visualization/assets/nature.mplstyle +63 -0
  369. package/lib/skills/builtin/scientific-visualization/assets/presentation.mplstyle +61 -0
  370. package/lib/skills/builtin/scientific-visualization/assets/publication.mplstyle +68 -0
  371. package/lib/skills/builtin/scientific-visualization/references/color_palettes.md +348 -0
  372. package/lib/skills/builtin/scientific-visualization/references/journal_requirements.md +320 -0
  373. package/lib/skills/builtin/scientific-visualization/references/matplotlib_examples.md +620 -0
  374. package/lib/skills/builtin/scientific-visualization/references/publication_guidelines.md +205 -0
  375. package/lib/skills/builtin/scientific-visualization/scripts/figure_export.py +343 -0
  376. package/lib/skills/builtin/scientific-visualization/scripts/style_presets.py +416 -0
  377. package/lib/skills/builtin/scientific-writing/SKILL.md +745 -0
  378. package/lib/skills/builtin/scientific-writing/assets/REPORT_FORMATTING_GUIDE.md +574 -0
  379. package/lib/skills/builtin/scientific-writing/assets/scientific_report.sty +606 -0
  380. package/lib/skills/builtin/scientific-writing/assets/scientific_report_template.tex +449 -0
  381. package/lib/skills/builtin/scientific-writing/references/citation_styles.md +720 -0
  382. package/lib/skills/builtin/scientific-writing/references/figures_tables.md +806 -0
  383. package/lib/skills/builtin/scientific-writing/references/imrad_structure.md +686 -0
  384. package/lib/skills/builtin/scientific-writing/references/professional_report_formatting.md +664 -0
  385. package/lib/skills/builtin/scientific-writing/references/reporting_guidelines.md +748 -0
  386. package/lib/skills/builtin/scientific-writing/references/writing_principles.md +824 -0
  387. package/lib/skills/builtin/seaborn/SKILL.md +674 -0
  388. package/lib/skills/builtin/seaborn/references/examples.md +822 -0
  389. package/lib/skills/builtin/seaborn/references/function_reference.md +770 -0
  390. package/lib/skills/builtin/seaborn/references/objects_interface.md +964 -0
  391. package/lib/skills/data-analysis/SKILL.md +285 -0
  392. package/lib/skills/generate-skill-content.mjs +58 -0
  393. package/lib/skills/index.ts +34 -0
  394. package/lib/skills/loader.ts +452 -0
  395. package/package.json +62 -0
@@ -0,0 +1,1184 @@
1
+ import { n as getAccDescription, m as setAccDescription, o as getAccTitle, q as setAccTitle, H as getDiagramTitle, J as setDiagramTitle, r as getConfig, u as select, w as configureSvgSize, M as clear$1 } from "./MilkdownMarkdownEditor-bLPxrCVb.js";
2
+ import { a as drawBackgroundRect$1, f as drawText$1, d as drawRect$1, g as getNoteRect } from "./svgDrawCommon-b86b1483-Bein03PD.js";
3
+ import { a as arc } from "./arc-J47ePHZ2.js";
4
+ import "./index-BqDyyRCx.js";
5
+ import "./path-Cp2qmpkd.js";
6
+ var parser = function() {
7
+ var o = function(k, v, o2, l) {
8
+ for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v)
9
+ ;
10
+ return o2;
11
+ }, $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];
12
+ var parser2 = {
13
+ trace: function trace() {
14
+ },
15
+ yy: {},
16
+ 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 },
17
+ 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" },
18
+ 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]],
19
+ performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
20
+ var $0 = $$.length - 1;
21
+ switch (yystate) {
22
+ case 1:
23
+ return $$[$0 - 1];
24
+ case 2:
25
+ this.$ = [];
26
+ break;
27
+ case 3:
28
+ $$[$0 - 1].push($$[$0]);
29
+ this.$ = $$[$0 - 1];
30
+ break;
31
+ case 4:
32
+ case 5:
33
+ this.$ = $$[$0];
34
+ break;
35
+ case 6:
36
+ case 7:
37
+ this.$ = [];
38
+ break;
39
+ case 8:
40
+ yy.setDiagramTitle($$[$0].substr(6));
41
+ this.$ = $$[$0].substr(6);
42
+ break;
43
+ case 9:
44
+ this.$ = $$[$0].trim();
45
+ yy.setAccTitle(this.$);
46
+ break;
47
+ case 10:
48
+ case 11:
49
+ this.$ = $$[$0].trim();
50
+ yy.setAccDescription(this.$);
51
+ break;
52
+ case 12:
53
+ yy.addSection($$[$0].substr(8));
54
+ this.$ = $$[$0].substr(8);
55
+ break;
56
+ case 13:
57
+ yy.addTask($$[$0 - 1], $$[$0]);
58
+ this.$ = "task";
59
+ break;
60
+ }
61
+ },
62
+ 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])],
63
+ defaultActions: {},
64
+ parseError: function parseError(str, hash) {
65
+ if (hash.recoverable) {
66
+ this.trace(str);
67
+ } else {
68
+ var error = new Error(str);
69
+ error.hash = hash;
70
+ throw error;
71
+ }
72
+ },
73
+ parse: function parse(input) {
74
+ var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1;
75
+ var args = lstack.slice.call(arguments, 1);
76
+ var lexer2 = Object.create(this.lexer);
77
+ var sharedState = { yy: {} };
78
+ for (var k in this.yy) {
79
+ if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
80
+ sharedState.yy[k] = this.yy[k];
81
+ }
82
+ }
83
+ lexer2.setInput(input, sharedState.yy);
84
+ sharedState.yy.lexer = lexer2;
85
+ sharedState.yy.parser = this;
86
+ if (typeof lexer2.yylloc == "undefined") {
87
+ lexer2.yylloc = {};
88
+ }
89
+ var yyloc = lexer2.yylloc;
90
+ lstack.push(yyloc);
91
+ var ranges = lexer2.options && lexer2.options.ranges;
92
+ if (typeof sharedState.yy.parseError === "function") {
93
+ this.parseError = sharedState.yy.parseError;
94
+ } else {
95
+ this.parseError = Object.getPrototypeOf(this).parseError;
96
+ }
97
+ function lex() {
98
+ var token;
99
+ token = tstack.pop() || lexer2.lex() || EOF;
100
+ if (typeof token !== "number") {
101
+ if (token instanceof Array) {
102
+ tstack = token;
103
+ token = tstack.pop();
104
+ }
105
+ token = self.symbols_[token] || token;
106
+ }
107
+ return token;
108
+ }
109
+ var symbol, state, action, r, yyval = {}, p, len, newState, expected;
110
+ while (true) {
111
+ state = stack[stack.length - 1];
112
+ if (this.defaultActions[state]) {
113
+ action = this.defaultActions[state];
114
+ } else {
115
+ if (symbol === null || typeof symbol == "undefined") {
116
+ symbol = lex();
117
+ }
118
+ action = table[state] && table[state][symbol];
119
+ }
120
+ if (typeof action === "undefined" || !action.length || !action[0]) {
121
+ var errStr = "";
122
+ expected = [];
123
+ for (p in table[state]) {
124
+ if (this.terminals_[p] && p > TERROR) {
125
+ expected.push("'" + this.terminals_[p] + "'");
126
+ }
127
+ }
128
+ if (lexer2.showPosition) {
129
+ errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
130
+ } else {
131
+ errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
132
+ }
133
+ this.parseError(errStr, {
134
+ text: lexer2.match,
135
+ token: this.terminals_[symbol] || symbol,
136
+ line: lexer2.yylineno,
137
+ loc: yyloc,
138
+ expected
139
+ });
140
+ }
141
+ if (action[0] instanceof Array && action.length > 1) {
142
+ throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
143
+ }
144
+ switch (action[0]) {
145
+ case 1:
146
+ stack.push(symbol);
147
+ vstack.push(lexer2.yytext);
148
+ lstack.push(lexer2.yylloc);
149
+ stack.push(action[1]);
150
+ symbol = null;
151
+ {
152
+ yyleng = lexer2.yyleng;
153
+ yytext = lexer2.yytext;
154
+ yylineno = lexer2.yylineno;
155
+ yyloc = lexer2.yylloc;
156
+ }
157
+ break;
158
+ case 2:
159
+ len = this.productions_[action[1]][1];
160
+ yyval.$ = vstack[vstack.length - len];
161
+ yyval._$ = {
162
+ first_line: lstack[lstack.length - (len || 1)].first_line,
163
+ last_line: lstack[lstack.length - 1].last_line,
164
+ first_column: lstack[lstack.length - (len || 1)].first_column,
165
+ last_column: lstack[lstack.length - 1].last_column
166
+ };
167
+ if (ranges) {
168
+ yyval._$.range = [
169
+ lstack[lstack.length - (len || 1)].range[0],
170
+ lstack[lstack.length - 1].range[1]
171
+ ];
172
+ }
173
+ r = this.performAction.apply(yyval, [
174
+ yytext,
175
+ yyleng,
176
+ yylineno,
177
+ sharedState.yy,
178
+ action[1],
179
+ vstack,
180
+ lstack
181
+ ].concat(args));
182
+ if (typeof r !== "undefined") {
183
+ return r;
184
+ }
185
+ if (len) {
186
+ stack = stack.slice(0, -1 * len * 2);
187
+ vstack = vstack.slice(0, -1 * len);
188
+ lstack = lstack.slice(0, -1 * len);
189
+ }
190
+ stack.push(this.productions_[action[1]][0]);
191
+ vstack.push(yyval.$);
192
+ lstack.push(yyval._$);
193
+ newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
194
+ stack.push(newState);
195
+ break;
196
+ case 3:
197
+ return true;
198
+ }
199
+ }
200
+ return true;
201
+ }
202
+ };
203
+ var lexer = /* @__PURE__ */ function() {
204
+ var lexer2 = {
205
+ EOF: 1,
206
+ parseError: function parseError(str, hash) {
207
+ if (this.yy.parser) {
208
+ this.yy.parser.parseError(str, hash);
209
+ } else {
210
+ throw new Error(str);
211
+ }
212
+ },
213
+ // resets the lexer, sets new input
214
+ setInput: function(input, yy) {
215
+ this.yy = yy || this.yy || {};
216
+ this._input = input;
217
+ this._more = this._backtrack = this.done = false;
218
+ this.yylineno = this.yyleng = 0;
219
+ this.yytext = this.matched = this.match = "";
220
+ this.conditionStack = ["INITIAL"];
221
+ this.yylloc = {
222
+ first_line: 1,
223
+ first_column: 0,
224
+ last_line: 1,
225
+ last_column: 0
226
+ };
227
+ if (this.options.ranges) {
228
+ this.yylloc.range = [0, 0];
229
+ }
230
+ this.offset = 0;
231
+ return this;
232
+ },
233
+ // consumes and returns one char from the input
234
+ input: function() {
235
+ var ch = this._input[0];
236
+ this.yytext += ch;
237
+ this.yyleng++;
238
+ this.offset++;
239
+ this.match += ch;
240
+ this.matched += ch;
241
+ var lines = ch.match(/(?:\r\n?|\n).*/g);
242
+ if (lines) {
243
+ this.yylineno++;
244
+ this.yylloc.last_line++;
245
+ } else {
246
+ this.yylloc.last_column++;
247
+ }
248
+ if (this.options.ranges) {
249
+ this.yylloc.range[1]++;
250
+ }
251
+ this._input = this._input.slice(1);
252
+ return ch;
253
+ },
254
+ // unshifts one char (or a string) into the input
255
+ unput: function(ch) {
256
+ var len = ch.length;
257
+ var lines = ch.split(/(?:\r\n?|\n)/g);
258
+ this._input = ch + this._input;
259
+ this.yytext = this.yytext.substr(0, this.yytext.length - len);
260
+ this.offset -= len;
261
+ var oldLines = this.match.split(/(?:\r\n?|\n)/g);
262
+ this.match = this.match.substr(0, this.match.length - 1);
263
+ this.matched = this.matched.substr(0, this.matched.length - 1);
264
+ if (lines.length - 1) {
265
+ this.yylineno -= lines.length - 1;
266
+ }
267
+ var r = this.yylloc.range;
268
+ this.yylloc = {
269
+ first_line: this.yylloc.first_line,
270
+ last_line: this.yylineno + 1,
271
+ first_column: this.yylloc.first_column,
272
+ 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
273
+ };
274
+ if (this.options.ranges) {
275
+ this.yylloc.range = [r[0], r[0] + this.yyleng - len];
276
+ }
277
+ this.yyleng = this.yytext.length;
278
+ return this;
279
+ },
280
+ // When called from action, caches matched text and appends it on next action
281
+ more: function() {
282
+ this._more = true;
283
+ return this;
284
+ },
285
+ // 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.
286
+ reject: function() {
287
+ if (this.options.backtrack_lexer) {
288
+ this._backtrack = true;
289
+ } else {
290
+ 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(), {
291
+ text: "",
292
+ token: null,
293
+ line: this.yylineno
294
+ });
295
+ }
296
+ return this;
297
+ },
298
+ // retain first n characters of the match
299
+ less: function(n) {
300
+ this.unput(this.match.slice(n));
301
+ },
302
+ // displays already matched input, i.e. for error messages
303
+ pastInput: function() {
304
+ var past = this.matched.substr(0, this.matched.length - this.match.length);
305
+ return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
306
+ },
307
+ // displays upcoming input, i.e. for error messages
308
+ upcomingInput: function() {
309
+ var next = this.match;
310
+ if (next.length < 20) {
311
+ next += this._input.substr(0, 20 - next.length);
312
+ }
313
+ return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
314
+ },
315
+ // displays the character position where the lexing error occurred, i.e. for error messages
316
+ showPosition: function() {
317
+ var pre = this.pastInput();
318
+ var c = new Array(pre.length + 1).join("-");
319
+ return pre + this.upcomingInput() + "\n" + c + "^";
320
+ },
321
+ // test the lexed token: return FALSE when not a match, otherwise return token
322
+ test_match: function(match, indexed_rule) {
323
+ var token, lines, backup;
324
+ if (this.options.backtrack_lexer) {
325
+ backup = {
326
+ yylineno: this.yylineno,
327
+ yylloc: {
328
+ first_line: this.yylloc.first_line,
329
+ last_line: this.last_line,
330
+ first_column: this.yylloc.first_column,
331
+ last_column: this.yylloc.last_column
332
+ },
333
+ yytext: this.yytext,
334
+ match: this.match,
335
+ matches: this.matches,
336
+ matched: this.matched,
337
+ yyleng: this.yyleng,
338
+ offset: this.offset,
339
+ _more: this._more,
340
+ _input: this._input,
341
+ yy: this.yy,
342
+ conditionStack: this.conditionStack.slice(0),
343
+ done: this.done
344
+ };
345
+ if (this.options.ranges) {
346
+ backup.yylloc.range = this.yylloc.range.slice(0);
347
+ }
348
+ }
349
+ lines = match[0].match(/(?:\r\n?|\n).*/g);
350
+ if (lines) {
351
+ this.yylineno += lines.length;
352
+ }
353
+ this.yylloc = {
354
+ first_line: this.yylloc.last_line,
355
+ last_line: this.yylineno + 1,
356
+ first_column: this.yylloc.last_column,
357
+ last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
358
+ };
359
+ this.yytext += match[0];
360
+ this.match += match[0];
361
+ this.matches = match;
362
+ this.yyleng = this.yytext.length;
363
+ if (this.options.ranges) {
364
+ this.yylloc.range = [this.offset, this.offset += this.yyleng];
365
+ }
366
+ this._more = false;
367
+ this._backtrack = false;
368
+ this._input = this._input.slice(match[0].length);
369
+ this.matched += match[0];
370
+ token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
371
+ if (this.done && this._input) {
372
+ this.done = false;
373
+ }
374
+ if (token) {
375
+ return token;
376
+ } else if (this._backtrack) {
377
+ for (var k in backup) {
378
+ this[k] = backup[k];
379
+ }
380
+ return false;
381
+ }
382
+ return false;
383
+ },
384
+ // return next match in input
385
+ next: function() {
386
+ if (this.done) {
387
+ return this.EOF;
388
+ }
389
+ if (!this._input) {
390
+ this.done = true;
391
+ }
392
+ var token, match, tempMatch, index;
393
+ if (!this._more) {
394
+ this.yytext = "";
395
+ this.match = "";
396
+ }
397
+ var rules = this._currentRules();
398
+ for (var i = 0; i < rules.length; i++) {
399
+ tempMatch = this._input.match(this.rules[rules[i]]);
400
+ if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
401
+ match = tempMatch;
402
+ index = i;
403
+ if (this.options.backtrack_lexer) {
404
+ token = this.test_match(tempMatch, rules[i]);
405
+ if (token !== false) {
406
+ return token;
407
+ } else if (this._backtrack) {
408
+ match = false;
409
+ continue;
410
+ } else {
411
+ return false;
412
+ }
413
+ } else if (!this.options.flex) {
414
+ break;
415
+ }
416
+ }
417
+ }
418
+ if (match) {
419
+ token = this.test_match(match, rules[index]);
420
+ if (token !== false) {
421
+ return token;
422
+ }
423
+ return false;
424
+ }
425
+ if (this._input === "") {
426
+ return this.EOF;
427
+ } else {
428
+ return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
429
+ text: "",
430
+ token: null,
431
+ line: this.yylineno
432
+ });
433
+ }
434
+ },
435
+ // return next match that has a token
436
+ lex: function lex() {
437
+ var r = this.next();
438
+ if (r) {
439
+ return r;
440
+ } else {
441
+ return this.lex();
442
+ }
443
+ },
444
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
445
+ begin: function begin(condition) {
446
+ this.conditionStack.push(condition);
447
+ },
448
+ // pop the previously active lexer condition state off the condition stack
449
+ popState: function popState() {
450
+ var n = this.conditionStack.length - 1;
451
+ if (n > 0) {
452
+ return this.conditionStack.pop();
453
+ } else {
454
+ return this.conditionStack[0];
455
+ }
456
+ },
457
+ // produce the lexer rule set which is active for the currently active lexer condition state
458
+ _currentRules: function _currentRules() {
459
+ if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
460
+ return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
461
+ } else {
462
+ return this.conditions["INITIAL"].rules;
463
+ }
464
+ },
465
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
466
+ topState: function topState(n) {
467
+ n = this.conditionStack.length - 1 - Math.abs(n || 0);
468
+ if (n >= 0) {
469
+ return this.conditionStack[n];
470
+ } else {
471
+ return "INITIAL";
472
+ }
473
+ },
474
+ // alias for begin(condition)
475
+ pushState: function pushState(condition) {
476
+ this.begin(condition);
477
+ },
478
+ // return the number of states currently on the stack
479
+ stateStackSize: function stateStackSize() {
480
+ return this.conditionStack.length;
481
+ },
482
+ options: { "case-insensitive": true },
483
+ performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
484
+ switch ($avoiding_name_collisions) {
485
+ case 0:
486
+ break;
487
+ case 1:
488
+ break;
489
+ case 2:
490
+ return 10;
491
+ case 3:
492
+ break;
493
+ case 4:
494
+ break;
495
+ case 5:
496
+ return 4;
497
+ case 6:
498
+ return 11;
499
+ case 7:
500
+ this.begin("acc_title");
501
+ return 12;
502
+ case 8:
503
+ this.popState();
504
+ return "acc_title_value";
505
+ case 9:
506
+ this.begin("acc_descr");
507
+ return 14;
508
+ case 10:
509
+ this.popState();
510
+ return "acc_descr_value";
511
+ case 11:
512
+ this.begin("acc_descr_multiline");
513
+ break;
514
+ case 12:
515
+ this.popState();
516
+ break;
517
+ case 13:
518
+ return "acc_descr_multiline_value";
519
+ case 14:
520
+ return 17;
521
+ case 15:
522
+ return 18;
523
+ case 16:
524
+ return 19;
525
+ case 17:
526
+ return ":";
527
+ case 18:
528
+ return 6;
529
+ case 19:
530
+ return "INVALID";
531
+ }
532
+ },
533
+ 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],
534
+ 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 } }
535
+ };
536
+ return lexer2;
537
+ }();
538
+ parser2.lexer = lexer;
539
+ function Parser() {
540
+ this.yy = {};
541
+ }
542
+ Parser.prototype = parser2;
543
+ parser2.Parser = Parser;
544
+ return new Parser();
545
+ }();
546
+ parser.parser = parser;
547
+ const parser$1 = parser;
548
+ let currentSection = "";
549
+ const sections = [];
550
+ const tasks = [];
551
+ const rawTasks = [];
552
+ const clear = function() {
553
+ sections.length = 0;
554
+ tasks.length = 0;
555
+ currentSection = "";
556
+ rawTasks.length = 0;
557
+ clear$1();
558
+ };
559
+ const addSection = function(txt) {
560
+ currentSection = txt;
561
+ sections.push(txt);
562
+ };
563
+ const getSections = function() {
564
+ return sections;
565
+ };
566
+ const getTasks = function() {
567
+ let allItemsProcessed = compileTasks();
568
+ const maxDepth = 100;
569
+ let iterationCount = 0;
570
+ while (!allItemsProcessed && iterationCount < maxDepth) {
571
+ allItemsProcessed = compileTasks();
572
+ iterationCount++;
573
+ }
574
+ tasks.push(...rawTasks);
575
+ return tasks;
576
+ };
577
+ const updateActors = function() {
578
+ const tempActors = [];
579
+ tasks.forEach((task) => {
580
+ if (task.people) {
581
+ tempActors.push(...task.people);
582
+ }
583
+ });
584
+ const unique = new Set(tempActors);
585
+ return [...unique].sort();
586
+ };
587
+ const addTask = function(descr, taskData) {
588
+ const pieces = taskData.substr(1).split(":");
589
+ let score = 0;
590
+ let peeps = [];
591
+ if (pieces.length === 1) {
592
+ score = Number(pieces[0]);
593
+ peeps = [];
594
+ } else {
595
+ score = Number(pieces[0]);
596
+ peeps = pieces[1].split(",");
597
+ }
598
+ const peopleList = peeps.map((s) => s.trim());
599
+ const rawTask = {
600
+ section: currentSection,
601
+ type: currentSection,
602
+ people: peopleList,
603
+ task: descr,
604
+ score
605
+ };
606
+ rawTasks.push(rawTask);
607
+ };
608
+ const addTaskOrg = function(descr) {
609
+ const newTask = {
610
+ section: currentSection,
611
+ type: currentSection,
612
+ description: descr,
613
+ task: descr,
614
+ classes: []
615
+ };
616
+ tasks.push(newTask);
617
+ };
618
+ const compileTasks = function() {
619
+ const compileTask = function(pos) {
620
+ return rawTasks[pos].processed;
621
+ };
622
+ let allProcessed = true;
623
+ for (const [i, rawTask] of rawTasks.entries()) {
624
+ compileTask(i);
625
+ allProcessed = allProcessed && rawTask.processed;
626
+ }
627
+ return allProcessed;
628
+ };
629
+ const getActors = function() {
630
+ return updateActors();
631
+ };
632
+ const db = {
633
+ getConfig: () => getConfig().journey,
634
+ clear,
635
+ setDiagramTitle,
636
+ getDiagramTitle,
637
+ setAccTitle,
638
+ getAccTitle,
639
+ setAccDescription,
640
+ getAccDescription,
641
+ addSection,
642
+ getSections,
643
+ getTasks,
644
+ addTask,
645
+ addTaskOrg,
646
+ getActors
647
+ };
648
+ const getStyles = (options) => `.label {
649
+ font-family: 'trebuchet ms', verdana, arial, sans-serif;
650
+ font-family: var(--mermaid-font-family);
651
+ color: ${options.textColor};
652
+ }
653
+ .mouth {
654
+ stroke: #666;
655
+ }
656
+
657
+ line {
658
+ stroke: ${options.textColor}
659
+ }
660
+
661
+ .legend {
662
+ fill: ${options.textColor};
663
+ }
664
+
665
+ .label text {
666
+ fill: #333;
667
+ }
668
+ .label {
669
+ color: ${options.textColor}
670
+ }
671
+
672
+ .face {
673
+ ${options.faceColor ? `fill: ${options.faceColor}` : "fill: #FFF8DC"};
674
+ stroke: #999;
675
+ }
676
+
677
+ .node rect,
678
+ .node circle,
679
+ .node ellipse,
680
+ .node polygon,
681
+ .node path {
682
+ fill: ${options.mainBkg};
683
+ stroke: ${options.nodeBorder};
684
+ stroke-width: 1px;
685
+ }
686
+
687
+ .node .label {
688
+ text-align: center;
689
+ }
690
+ .node.clickable {
691
+ cursor: pointer;
692
+ }
693
+
694
+ .arrowheadPath {
695
+ fill: ${options.arrowheadColor};
696
+ }
697
+
698
+ .edgePath .path {
699
+ stroke: ${options.lineColor};
700
+ stroke-width: 1.5px;
701
+ }
702
+
703
+ .flowchart-link {
704
+ stroke: ${options.lineColor};
705
+ fill: none;
706
+ }
707
+
708
+ .edgeLabel {
709
+ background-color: ${options.edgeLabelBackground};
710
+ rect {
711
+ opacity: 0.5;
712
+ }
713
+ text-align: center;
714
+ }
715
+
716
+ .cluster rect {
717
+ }
718
+
719
+ .cluster text {
720
+ fill: ${options.titleColor};
721
+ }
722
+
723
+ div.mermaidTooltip {
724
+ position: absolute;
725
+ text-align: center;
726
+ max-width: 200px;
727
+ padding: 2px;
728
+ font-family: 'trebuchet ms', verdana, arial, sans-serif;
729
+ font-family: var(--mermaid-font-family);
730
+ font-size: 12px;
731
+ background: ${options.tertiaryColor};
732
+ border: 1px solid ${options.border2};
733
+ border-radius: 2px;
734
+ pointer-events: none;
735
+ z-index: 100;
736
+ }
737
+
738
+ .task-type-0, .section-type-0 {
739
+ ${options.fillType0 ? `fill: ${options.fillType0}` : ""};
740
+ }
741
+ .task-type-1, .section-type-1 {
742
+ ${options.fillType0 ? `fill: ${options.fillType1}` : ""};
743
+ }
744
+ .task-type-2, .section-type-2 {
745
+ ${options.fillType0 ? `fill: ${options.fillType2}` : ""};
746
+ }
747
+ .task-type-3, .section-type-3 {
748
+ ${options.fillType0 ? `fill: ${options.fillType3}` : ""};
749
+ }
750
+ .task-type-4, .section-type-4 {
751
+ ${options.fillType0 ? `fill: ${options.fillType4}` : ""};
752
+ }
753
+ .task-type-5, .section-type-5 {
754
+ ${options.fillType0 ? `fill: ${options.fillType5}` : ""};
755
+ }
756
+ .task-type-6, .section-type-6 {
757
+ ${options.fillType0 ? `fill: ${options.fillType6}` : ""};
758
+ }
759
+ .task-type-7, .section-type-7 {
760
+ ${options.fillType0 ? `fill: ${options.fillType7}` : ""};
761
+ }
762
+
763
+ .actor-0 {
764
+ ${options.actor0 ? `fill: ${options.actor0}` : ""};
765
+ }
766
+ .actor-1 {
767
+ ${options.actor1 ? `fill: ${options.actor1}` : ""};
768
+ }
769
+ .actor-2 {
770
+ ${options.actor2 ? `fill: ${options.actor2}` : ""};
771
+ }
772
+ .actor-3 {
773
+ ${options.actor3 ? `fill: ${options.actor3}` : ""};
774
+ }
775
+ .actor-4 {
776
+ ${options.actor4 ? `fill: ${options.actor4}` : ""};
777
+ }
778
+ .actor-5 {
779
+ ${options.actor5 ? `fill: ${options.actor5}` : ""};
780
+ }
781
+ `;
782
+ const styles = getStyles;
783
+ const drawRect = function(elem, rectData) {
784
+ return drawRect$1(elem, rectData);
785
+ };
786
+ const drawFace = function(element, faceData) {
787
+ const radius = 15;
788
+ 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");
789
+ const face = element.append("g");
790
+ 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");
791
+ 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");
792
+ function smile(face2) {
793
+ const arc$1 = arc().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(radius / 2).outerRadius(radius / 2.2);
794
+ face2.append("path").attr("class", "mouth").attr("d", arc$1).attr("transform", "translate(" + faceData.cx + "," + (faceData.cy + 2) + ")");
795
+ }
796
+ function sad(face2) {
797
+ const arc$1 = arc().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(radius / 2).outerRadius(radius / 2.2);
798
+ face2.append("path").attr("class", "mouth").attr("d", arc$1).attr("transform", "translate(" + faceData.cx + "," + (faceData.cy + 7) + ")");
799
+ }
800
+ function ambivalent(face2) {
801
+ 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");
802
+ }
803
+ if (faceData.score > 3) {
804
+ smile(face);
805
+ } else if (faceData.score < 3) {
806
+ sad(face);
807
+ } else {
808
+ ambivalent(face);
809
+ }
810
+ return circleElement;
811
+ };
812
+ const drawCircle = function(element, circleData) {
813
+ const circleElement = element.append("circle");
814
+ circleElement.attr("cx", circleData.cx);
815
+ circleElement.attr("cy", circleData.cy);
816
+ circleElement.attr("class", "actor-" + circleData.pos);
817
+ circleElement.attr("fill", circleData.fill);
818
+ circleElement.attr("stroke", circleData.stroke);
819
+ circleElement.attr("r", circleData.r);
820
+ if (circleElement.class !== void 0) {
821
+ circleElement.attr("class", circleElement.class);
822
+ }
823
+ if (circleData.title !== void 0) {
824
+ circleElement.append("title").text(circleData.title);
825
+ }
826
+ return circleElement;
827
+ };
828
+ const drawText = function(elem, textData) {
829
+ return drawText$1(elem, textData);
830
+ };
831
+ const drawLabel = function(elem, txtObject) {
832
+ function genPoints(x, y, width, height, cut) {
833
+ return x + "," + y + " " + (x + width) + "," + y + " " + (x + width) + "," + (y + height - cut) + " " + (x + width - cut * 1.2) + "," + (y + height) + " " + x + "," + (y + height);
834
+ }
835
+ const polygon = elem.append("polygon");
836
+ polygon.attr("points", genPoints(txtObject.x, txtObject.y, 50, 20, 7));
837
+ polygon.attr("class", "labelBox");
838
+ txtObject.y = txtObject.y + txtObject.labelMargin;
839
+ txtObject.x = txtObject.x + 0.5 * txtObject.labelMargin;
840
+ drawText(elem, txtObject);
841
+ };
842
+ const drawSection = function(elem, section, conf2) {
843
+ const g = elem.append("g");
844
+ const rect = getNoteRect();
845
+ rect.x = section.x;
846
+ rect.y = section.y;
847
+ rect.fill = section.fill;
848
+ rect.width = conf2.width * section.taskCount + // width of the tasks
849
+ conf2.diagramMarginX * (section.taskCount - 1);
850
+ rect.height = conf2.height;
851
+ rect.class = "journey-section section-type-" + section.num;
852
+ rect.rx = 3;
853
+ rect.ry = 3;
854
+ drawRect(g, rect);
855
+ _drawTextCandidateFunc(conf2)(
856
+ section.text,
857
+ g,
858
+ rect.x,
859
+ rect.y,
860
+ rect.width,
861
+ rect.height,
862
+ { class: "journey-section section-type-" + section.num },
863
+ conf2,
864
+ section.colour
865
+ );
866
+ };
867
+ let taskCount = -1;
868
+ const drawTask = function(elem, task, conf2) {
869
+ const center = task.x + conf2.width / 2;
870
+ const g = elem.append("g");
871
+ taskCount++;
872
+ const maxHeight = 300 + 5 * 30;
873
+ 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");
874
+ drawFace(g, {
875
+ cx: center,
876
+ cy: 300 + (5 - task.score) * 30,
877
+ score: task.score
878
+ });
879
+ const rect = getNoteRect();
880
+ rect.x = task.x;
881
+ rect.y = task.y;
882
+ rect.fill = task.fill;
883
+ rect.width = conf2.width;
884
+ rect.height = conf2.height;
885
+ rect.class = "task task-type-" + task.num;
886
+ rect.rx = 3;
887
+ rect.ry = 3;
888
+ drawRect(g, rect);
889
+ let xPos = task.x + 14;
890
+ task.people.forEach((person) => {
891
+ const colour = task.actors[person].color;
892
+ const circle = {
893
+ cx: xPos,
894
+ cy: task.y,
895
+ r: 7,
896
+ fill: colour,
897
+ stroke: "#000",
898
+ title: person,
899
+ pos: task.actors[person].position
900
+ };
901
+ drawCircle(g, circle);
902
+ xPos += 10;
903
+ });
904
+ _drawTextCandidateFunc(conf2)(
905
+ task.task,
906
+ g,
907
+ rect.x,
908
+ rect.y,
909
+ rect.width,
910
+ rect.height,
911
+ { class: "task" },
912
+ conf2,
913
+ task.colour
914
+ );
915
+ };
916
+ const drawBackgroundRect = function(elem, bounds2) {
917
+ drawBackgroundRect$1(elem, bounds2);
918
+ };
919
+ const _drawTextCandidateFunc = /* @__PURE__ */ function() {
920
+ function byText(content, g, x, y, width, height, textAttrs, colour) {
921
+ 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);
922
+ _setTextAttrs(text, textAttrs);
923
+ }
924
+ function byTspan(content, g, x, y, width, height, textAttrs, conf2, colour) {
925
+ const { taskFontSize, taskFontFamily } = conf2;
926
+ const lines = content.split(/<br\s*\/?>/gi);
927
+ for (let i = 0; i < lines.length; i++) {
928
+ const dy = i * taskFontSize - taskFontSize * (lines.length - 1) / 2;
929
+ 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);
930
+ text.append("tspan").attr("x", x + width / 2).attr("dy", dy).text(lines[i]);
931
+ text.attr("y", y + height / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central");
932
+ _setTextAttrs(text, textAttrs);
933
+ }
934
+ }
935
+ function byFo(content, g, x, y, width, height, textAttrs, conf2) {
936
+ const body = g.append("switch");
937
+ const f = body.append("foreignObject").attr("x", x).attr("y", y).attr("width", width).attr("height", height).attr("position", "fixed");
938
+ const text = f.append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
939
+ text.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(content);
940
+ byTspan(content, body, x, y, width, height, textAttrs, conf2);
941
+ _setTextAttrs(text, textAttrs);
942
+ }
943
+ function _setTextAttrs(toText, fromTextAttrsDict) {
944
+ for (const key in fromTextAttrsDict) {
945
+ if (key in fromTextAttrsDict) {
946
+ toText.attr(key, fromTextAttrsDict[key]);
947
+ }
948
+ }
949
+ }
950
+ return function(conf2) {
951
+ return conf2.textPlacement === "fo" ? byFo : conf2.textPlacement === "old" ? byText : byTspan;
952
+ };
953
+ }();
954
+ const initGraphics = function(graphics) {
955
+ 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");
956
+ };
957
+ const svgDraw = {
958
+ drawRect,
959
+ drawCircle,
960
+ drawSection,
961
+ drawText,
962
+ drawLabel,
963
+ drawTask,
964
+ drawBackgroundRect,
965
+ initGraphics
966
+ };
967
+ const setConf = function(cnf) {
968
+ const keys = Object.keys(cnf);
969
+ keys.forEach(function(key) {
970
+ conf[key] = cnf[key];
971
+ });
972
+ };
973
+ const actors = {};
974
+ function drawActorLegend(diagram2) {
975
+ const conf2 = getConfig().journey;
976
+ let yPos = 60;
977
+ Object.keys(actors).forEach((person) => {
978
+ const colour = actors[person].color;
979
+ const circleData = {
980
+ cx: 20,
981
+ cy: yPos,
982
+ r: 7,
983
+ fill: colour,
984
+ stroke: "#000",
985
+ pos: actors[person].position
986
+ };
987
+ svgDraw.drawCircle(diagram2, circleData);
988
+ const labelData = {
989
+ x: 40,
990
+ y: yPos + 7,
991
+ fill: "#666",
992
+ text: person,
993
+ textMargin: conf2.boxTextMargin | 5
994
+ };
995
+ svgDraw.drawText(diagram2, labelData);
996
+ yPos += 20;
997
+ });
998
+ }
999
+ const conf = getConfig().journey;
1000
+ const LEFT_MARGIN = conf.leftMargin;
1001
+ const draw = function(text, id, version, diagObj) {
1002
+ const conf2 = getConfig().journey;
1003
+ const securityLevel = getConfig().securityLevel;
1004
+ let sandboxElement;
1005
+ if (securityLevel === "sandbox") {
1006
+ sandboxElement = select("#i" + id);
1007
+ }
1008
+ const root = securityLevel === "sandbox" ? select(sandboxElement.nodes()[0].contentDocument.body) : select("body");
1009
+ bounds.init();
1010
+ const diagram2 = root.select("#" + id);
1011
+ svgDraw.initGraphics(diagram2);
1012
+ const tasks2 = diagObj.db.getTasks();
1013
+ const title = diagObj.db.getDiagramTitle();
1014
+ const actorNames = diagObj.db.getActors();
1015
+ for (const member in actors) {
1016
+ delete actors[member];
1017
+ }
1018
+ let actorPos = 0;
1019
+ actorNames.forEach((actorName) => {
1020
+ actors[actorName] = {
1021
+ color: conf2.actorColours[actorPos % conf2.actorColours.length],
1022
+ position: actorPos
1023
+ };
1024
+ actorPos++;
1025
+ });
1026
+ drawActorLegend(diagram2);
1027
+ bounds.insert(0, 0, LEFT_MARGIN, Object.keys(actors).length * 50);
1028
+ drawTasks(diagram2, tasks2, 0);
1029
+ const box = bounds.getBounds();
1030
+ if (title) {
1031
+ diagram2.append("text").text(title).attr("x", LEFT_MARGIN).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 25);
1032
+ }
1033
+ const height = box.stopy - box.starty + 2 * conf2.diagramMarginY;
1034
+ const width = LEFT_MARGIN + box.stopx + 2 * conf2.diagramMarginX;
1035
+ configureSvgSize(diagram2, height, width, conf2.useMaxWidth);
1036
+ diagram2.append("line").attr("x1", LEFT_MARGIN).attr("y1", conf2.height * 4).attr("x2", width - LEFT_MARGIN - 4).attr("y2", conf2.height * 4).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)");
1037
+ const extraVertForTitle = title ? 70 : 0;
1038
+ diagram2.attr("viewBox", `${box.startx} -25 ${width} ${height + extraVertForTitle}`);
1039
+ diagram2.attr("preserveAspectRatio", "xMinYMin meet");
1040
+ diagram2.attr("height", height + extraVertForTitle + 25);
1041
+ };
1042
+ const bounds = {
1043
+ data: {
1044
+ startx: void 0,
1045
+ stopx: void 0,
1046
+ starty: void 0,
1047
+ stopy: void 0
1048
+ },
1049
+ verticalPos: 0,
1050
+ sequenceItems: [],
1051
+ init: function() {
1052
+ this.sequenceItems = [];
1053
+ this.data = {
1054
+ startx: void 0,
1055
+ stopx: void 0,
1056
+ starty: void 0,
1057
+ stopy: void 0
1058
+ };
1059
+ this.verticalPos = 0;
1060
+ },
1061
+ updateVal: function(obj, key, val, fun) {
1062
+ if (obj[key] === void 0) {
1063
+ obj[key] = val;
1064
+ } else {
1065
+ obj[key] = fun(val, obj[key]);
1066
+ }
1067
+ },
1068
+ updateBounds: function(startx, starty, stopx, stopy) {
1069
+ const conf2 = getConfig().journey;
1070
+ const _self = this;
1071
+ let cnt = 0;
1072
+ function updateFn(type) {
1073
+ return function updateItemBounds(item) {
1074
+ cnt++;
1075
+ const n = _self.sequenceItems.length - cnt + 1;
1076
+ _self.updateVal(item, "starty", starty - n * conf2.boxMargin, Math.min);
1077
+ _self.updateVal(item, "stopy", stopy + n * conf2.boxMargin, Math.max);
1078
+ _self.updateVal(bounds.data, "startx", startx - n * conf2.boxMargin, Math.min);
1079
+ _self.updateVal(bounds.data, "stopx", stopx + n * conf2.boxMargin, Math.max);
1080
+ {
1081
+ _self.updateVal(item, "startx", startx - n * conf2.boxMargin, Math.min);
1082
+ _self.updateVal(item, "stopx", stopx + n * conf2.boxMargin, Math.max);
1083
+ _self.updateVal(bounds.data, "starty", starty - n * conf2.boxMargin, Math.min);
1084
+ _self.updateVal(bounds.data, "stopy", stopy + n * conf2.boxMargin, Math.max);
1085
+ }
1086
+ };
1087
+ }
1088
+ this.sequenceItems.forEach(updateFn());
1089
+ },
1090
+ insert: function(startx, starty, stopx, stopy) {
1091
+ const _startx = Math.min(startx, stopx);
1092
+ const _stopx = Math.max(startx, stopx);
1093
+ const _starty = Math.min(starty, stopy);
1094
+ const _stopy = Math.max(starty, stopy);
1095
+ this.updateVal(bounds.data, "startx", _startx, Math.min);
1096
+ this.updateVal(bounds.data, "starty", _starty, Math.min);
1097
+ this.updateVal(bounds.data, "stopx", _stopx, Math.max);
1098
+ this.updateVal(bounds.data, "stopy", _stopy, Math.max);
1099
+ this.updateBounds(_startx, _starty, _stopx, _stopy);
1100
+ },
1101
+ bumpVerticalPos: function(bump) {
1102
+ this.verticalPos = this.verticalPos + bump;
1103
+ this.data.stopy = this.verticalPos;
1104
+ },
1105
+ getVerticalPos: function() {
1106
+ return this.verticalPos;
1107
+ },
1108
+ getBounds: function() {
1109
+ return this.data;
1110
+ }
1111
+ };
1112
+ const fills = conf.sectionFills;
1113
+ const textColours = conf.sectionColours;
1114
+ const drawTasks = function(diagram2, tasks2, verticalPos) {
1115
+ const conf2 = getConfig().journey;
1116
+ let lastSection = "";
1117
+ const sectionVHeight = conf2.height * 2 + conf2.diagramMarginY;
1118
+ const taskPos = verticalPos + sectionVHeight;
1119
+ let sectionNumber = 0;
1120
+ let fill = "#CCC";
1121
+ let colour = "black";
1122
+ let num = 0;
1123
+ for (const [i, task] of tasks2.entries()) {
1124
+ if (lastSection !== task.section) {
1125
+ fill = fills[sectionNumber % fills.length];
1126
+ num = sectionNumber % fills.length;
1127
+ colour = textColours[sectionNumber % textColours.length];
1128
+ let taskInSectionCount = 0;
1129
+ const currentSection2 = task.section;
1130
+ for (let taskIndex = i; taskIndex < tasks2.length; taskIndex++) {
1131
+ if (tasks2[taskIndex].section == currentSection2) {
1132
+ taskInSectionCount = taskInSectionCount + 1;
1133
+ } else {
1134
+ break;
1135
+ }
1136
+ }
1137
+ const section = {
1138
+ x: i * conf2.taskMargin + i * conf2.width + LEFT_MARGIN,
1139
+ y: 50,
1140
+ text: task.section,
1141
+ fill,
1142
+ num,
1143
+ colour,
1144
+ taskCount: taskInSectionCount
1145
+ };
1146
+ svgDraw.drawSection(diagram2, section, conf2);
1147
+ lastSection = task.section;
1148
+ sectionNumber++;
1149
+ }
1150
+ const taskActors = task.people.reduce((acc, actorName) => {
1151
+ if (actors[actorName]) {
1152
+ acc[actorName] = actors[actorName];
1153
+ }
1154
+ return acc;
1155
+ }, {});
1156
+ task.x = i * conf2.taskMargin + i * conf2.width + LEFT_MARGIN;
1157
+ task.y = taskPos;
1158
+ task.width = conf2.diagramMarginX;
1159
+ task.height = conf2.diagramMarginY;
1160
+ task.colour = colour;
1161
+ task.fill = fill;
1162
+ task.num = num;
1163
+ task.actors = taskActors;
1164
+ svgDraw.drawTask(diagram2, task, conf2);
1165
+ bounds.insert(task.x, task.y, task.x + task.width + conf2.taskMargin, 300 + 5 * 30);
1166
+ }
1167
+ };
1168
+ const renderer = {
1169
+ setConf,
1170
+ draw
1171
+ };
1172
+ const diagram = {
1173
+ parser: parser$1,
1174
+ db,
1175
+ renderer,
1176
+ styles,
1177
+ init: (cnf) => {
1178
+ renderer.setConf(cnf.journey);
1179
+ db.clear();
1180
+ }
1181
+ };
1182
+ export {
1183
+ diagram
1184
+ };