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,1212 @@
1
+ import { r as getConfig, v as log$1, u as select, ak as setupGraphViewbox$1, ap as commonDb, aq as isDark, ar as lighten, as as darken, M as clear$1 } from "./MilkdownMarkdownEditor-bLPxrCVb.js";
2
+ import { a as arc } from "./arc-J47ePHZ2.js";
3
+ import "./index-BqDyyRCx.js";
4
+ import "./path-Cp2qmpkd.js";
5
+ var parser = function() {
6
+ var o = function(k, v, o2, l) {
7
+ for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v)
8
+ ;
9
+ return o2;
10
+ }, $V0 = [6, 8, 10, 11, 12, 14, 16, 17, 20, 21], $V1 = [1, 9], $V2 = [1, 10], $V3 = [1, 11], $V4 = [1, 12], $V5 = [1, 13], $V6 = [1, 16], $V7 = [1, 17];
11
+ var parser2 = {
12
+ trace: function trace() {
13
+ },
14
+ yy: {},
15
+ symbols_: { "error": 2, "start": 3, "timeline": 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, "period_statement": 18, "event_statement": 19, "period": 20, "event": 21, "$accept": 0, "$end": 1 },
16
+ terminals_: { 2: "error", 4: "timeline", 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", 20: "period", 21: "event" },
17
+ 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, 1], [9, 1], [18, 1], [19, 1]],
18
+ performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
19
+ var $0 = $$.length - 1;
20
+ switch (yystate) {
21
+ case 1:
22
+ return $$[$0 - 1];
23
+ case 2:
24
+ this.$ = [];
25
+ break;
26
+ case 3:
27
+ $$[$0 - 1].push($$[$0]);
28
+ this.$ = $$[$0 - 1];
29
+ break;
30
+ case 4:
31
+ case 5:
32
+ this.$ = $$[$0];
33
+ break;
34
+ case 6:
35
+ case 7:
36
+ this.$ = [];
37
+ break;
38
+ case 8:
39
+ yy.getCommonDb().setDiagramTitle($$[$0].substr(6));
40
+ this.$ = $$[$0].substr(6);
41
+ break;
42
+ case 9:
43
+ this.$ = $$[$0].trim();
44
+ yy.getCommonDb().setAccTitle(this.$);
45
+ break;
46
+ case 10:
47
+ case 11:
48
+ this.$ = $$[$0].trim();
49
+ yy.getCommonDb().setAccDescription(this.$);
50
+ break;
51
+ case 12:
52
+ yy.addSection($$[$0].substr(8));
53
+ this.$ = $$[$0].substr(8);
54
+ break;
55
+ case 15:
56
+ yy.addTask($$[$0], 0, "");
57
+ this.$ = $$[$0];
58
+ break;
59
+ case 16:
60
+ yy.addEvent($$[$0].substr(2));
61
+ this.$ = $$[$0];
62
+ break;
63
+ }
64
+ },
65
+ 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: 14, 19: 15, 20: $V6, 21: $V7 }, o($V0, [2, 7], { 1: [2, 1] }), o($V0, [2, 3]), { 9: 18, 11: $V1, 12: $V2, 14: $V3, 16: $V4, 17: $V5, 18: 14, 19: 15, 20: $V6, 21: $V7 }, o($V0, [2, 5]), o($V0, [2, 6]), o($V0, [2, 8]), { 13: [1, 19] }, { 15: [1, 20] }, o($V0, [2, 11]), o($V0, [2, 12]), o($V0, [2, 13]), o($V0, [2, 14]), o($V0, [2, 15]), o($V0, [2, 16]), o($V0, [2, 4]), o($V0, [2, 9]), o($V0, [2, 10])],
66
+ defaultActions: {},
67
+ parseError: function parseError(str, hash) {
68
+ if (hash.recoverable) {
69
+ this.trace(str);
70
+ } else {
71
+ var error = new Error(str);
72
+ error.hash = hash;
73
+ throw error;
74
+ }
75
+ },
76
+ parse: function parse(input) {
77
+ var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1;
78
+ var args = lstack.slice.call(arguments, 1);
79
+ var lexer2 = Object.create(this.lexer);
80
+ var sharedState = { yy: {} };
81
+ for (var k in this.yy) {
82
+ if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
83
+ sharedState.yy[k] = this.yy[k];
84
+ }
85
+ }
86
+ lexer2.setInput(input, sharedState.yy);
87
+ sharedState.yy.lexer = lexer2;
88
+ sharedState.yy.parser = this;
89
+ if (typeof lexer2.yylloc == "undefined") {
90
+ lexer2.yylloc = {};
91
+ }
92
+ var yyloc = lexer2.yylloc;
93
+ lstack.push(yyloc);
94
+ var ranges = lexer2.options && lexer2.options.ranges;
95
+ if (typeof sharedState.yy.parseError === "function") {
96
+ this.parseError = sharedState.yy.parseError;
97
+ } else {
98
+ this.parseError = Object.getPrototypeOf(this).parseError;
99
+ }
100
+ function lex() {
101
+ var token;
102
+ token = tstack.pop() || lexer2.lex() || EOF;
103
+ if (typeof token !== "number") {
104
+ if (token instanceof Array) {
105
+ tstack = token;
106
+ token = tstack.pop();
107
+ }
108
+ token = self.symbols_[token] || token;
109
+ }
110
+ return token;
111
+ }
112
+ var symbol, state, action, r, yyval = {}, p, len, newState, expected;
113
+ while (true) {
114
+ state = stack[stack.length - 1];
115
+ if (this.defaultActions[state]) {
116
+ action = this.defaultActions[state];
117
+ } else {
118
+ if (symbol === null || typeof symbol == "undefined") {
119
+ symbol = lex();
120
+ }
121
+ action = table[state] && table[state][symbol];
122
+ }
123
+ if (typeof action === "undefined" || !action.length || !action[0]) {
124
+ var errStr = "";
125
+ expected = [];
126
+ for (p in table[state]) {
127
+ if (this.terminals_[p] && p > TERROR) {
128
+ expected.push("'" + this.terminals_[p] + "'");
129
+ }
130
+ }
131
+ if (lexer2.showPosition) {
132
+ errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
133
+ } else {
134
+ errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
135
+ }
136
+ this.parseError(errStr, {
137
+ text: lexer2.match,
138
+ token: this.terminals_[symbol] || symbol,
139
+ line: lexer2.yylineno,
140
+ loc: yyloc,
141
+ expected
142
+ });
143
+ }
144
+ if (action[0] instanceof Array && action.length > 1) {
145
+ throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
146
+ }
147
+ switch (action[0]) {
148
+ case 1:
149
+ stack.push(symbol);
150
+ vstack.push(lexer2.yytext);
151
+ lstack.push(lexer2.yylloc);
152
+ stack.push(action[1]);
153
+ symbol = null;
154
+ {
155
+ yyleng = lexer2.yyleng;
156
+ yytext = lexer2.yytext;
157
+ yylineno = lexer2.yylineno;
158
+ yyloc = lexer2.yylloc;
159
+ }
160
+ break;
161
+ case 2:
162
+ len = this.productions_[action[1]][1];
163
+ yyval.$ = vstack[vstack.length - len];
164
+ yyval._$ = {
165
+ first_line: lstack[lstack.length - (len || 1)].first_line,
166
+ last_line: lstack[lstack.length - 1].last_line,
167
+ first_column: lstack[lstack.length - (len || 1)].first_column,
168
+ last_column: lstack[lstack.length - 1].last_column
169
+ };
170
+ if (ranges) {
171
+ yyval._$.range = [
172
+ lstack[lstack.length - (len || 1)].range[0],
173
+ lstack[lstack.length - 1].range[1]
174
+ ];
175
+ }
176
+ r = this.performAction.apply(yyval, [
177
+ yytext,
178
+ yyleng,
179
+ yylineno,
180
+ sharedState.yy,
181
+ action[1],
182
+ vstack,
183
+ lstack
184
+ ].concat(args));
185
+ if (typeof r !== "undefined") {
186
+ return r;
187
+ }
188
+ if (len) {
189
+ stack = stack.slice(0, -1 * len * 2);
190
+ vstack = vstack.slice(0, -1 * len);
191
+ lstack = lstack.slice(0, -1 * len);
192
+ }
193
+ stack.push(this.productions_[action[1]][0]);
194
+ vstack.push(yyval.$);
195
+ lstack.push(yyval._$);
196
+ newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
197
+ stack.push(newState);
198
+ break;
199
+ case 3:
200
+ return true;
201
+ }
202
+ }
203
+ return true;
204
+ }
205
+ };
206
+ var lexer = /* @__PURE__ */ function() {
207
+ var lexer2 = {
208
+ EOF: 1,
209
+ parseError: function parseError(str, hash) {
210
+ if (this.yy.parser) {
211
+ this.yy.parser.parseError(str, hash);
212
+ } else {
213
+ throw new Error(str);
214
+ }
215
+ },
216
+ // resets the lexer, sets new input
217
+ setInput: function(input, yy) {
218
+ this.yy = yy || this.yy || {};
219
+ this._input = input;
220
+ this._more = this._backtrack = this.done = false;
221
+ this.yylineno = this.yyleng = 0;
222
+ this.yytext = this.matched = this.match = "";
223
+ this.conditionStack = ["INITIAL"];
224
+ this.yylloc = {
225
+ first_line: 1,
226
+ first_column: 0,
227
+ last_line: 1,
228
+ last_column: 0
229
+ };
230
+ if (this.options.ranges) {
231
+ this.yylloc.range = [0, 0];
232
+ }
233
+ this.offset = 0;
234
+ return this;
235
+ },
236
+ // consumes and returns one char from the input
237
+ input: function() {
238
+ var ch = this._input[0];
239
+ this.yytext += ch;
240
+ this.yyleng++;
241
+ this.offset++;
242
+ this.match += ch;
243
+ this.matched += ch;
244
+ var lines = ch.match(/(?:\r\n?|\n).*/g);
245
+ if (lines) {
246
+ this.yylineno++;
247
+ this.yylloc.last_line++;
248
+ } else {
249
+ this.yylloc.last_column++;
250
+ }
251
+ if (this.options.ranges) {
252
+ this.yylloc.range[1]++;
253
+ }
254
+ this._input = this._input.slice(1);
255
+ return ch;
256
+ },
257
+ // unshifts one char (or a string) into the input
258
+ unput: function(ch) {
259
+ var len = ch.length;
260
+ var lines = ch.split(/(?:\r\n?|\n)/g);
261
+ this._input = ch + this._input;
262
+ this.yytext = this.yytext.substr(0, this.yytext.length - len);
263
+ this.offset -= len;
264
+ var oldLines = this.match.split(/(?:\r\n?|\n)/g);
265
+ this.match = this.match.substr(0, this.match.length - 1);
266
+ this.matched = this.matched.substr(0, this.matched.length - 1);
267
+ if (lines.length - 1) {
268
+ this.yylineno -= lines.length - 1;
269
+ }
270
+ var r = this.yylloc.range;
271
+ this.yylloc = {
272
+ first_line: this.yylloc.first_line,
273
+ last_line: this.yylineno + 1,
274
+ first_column: this.yylloc.first_column,
275
+ 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
276
+ };
277
+ if (this.options.ranges) {
278
+ this.yylloc.range = [r[0], r[0] + this.yyleng - len];
279
+ }
280
+ this.yyleng = this.yytext.length;
281
+ return this;
282
+ },
283
+ // When called from action, caches matched text and appends it on next action
284
+ more: function() {
285
+ this._more = true;
286
+ return this;
287
+ },
288
+ // 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.
289
+ reject: function() {
290
+ if (this.options.backtrack_lexer) {
291
+ this._backtrack = true;
292
+ } else {
293
+ 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(), {
294
+ text: "",
295
+ token: null,
296
+ line: this.yylineno
297
+ });
298
+ }
299
+ return this;
300
+ },
301
+ // retain first n characters of the match
302
+ less: function(n) {
303
+ this.unput(this.match.slice(n));
304
+ },
305
+ // displays already matched input, i.e. for error messages
306
+ pastInput: function() {
307
+ var past = this.matched.substr(0, this.matched.length - this.match.length);
308
+ return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
309
+ },
310
+ // displays upcoming input, i.e. for error messages
311
+ upcomingInput: function() {
312
+ var next = this.match;
313
+ if (next.length < 20) {
314
+ next += this._input.substr(0, 20 - next.length);
315
+ }
316
+ return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
317
+ },
318
+ // displays the character position where the lexing error occurred, i.e. for error messages
319
+ showPosition: function() {
320
+ var pre = this.pastInput();
321
+ var c = new Array(pre.length + 1).join("-");
322
+ return pre + this.upcomingInput() + "\n" + c + "^";
323
+ },
324
+ // test the lexed token: return FALSE when not a match, otherwise return token
325
+ test_match: function(match, indexed_rule) {
326
+ var token, lines, backup;
327
+ if (this.options.backtrack_lexer) {
328
+ backup = {
329
+ yylineno: this.yylineno,
330
+ yylloc: {
331
+ first_line: this.yylloc.first_line,
332
+ last_line: this.last_line,
333
+ first_column: this.yylloc.first_column,
334
+ last_column: this.yylloc.last_column
335
+ },
336
+ yytext: this.yytext,
337
+ match: this.match,
338
+ matches: this.matches,
339
+ matched: this.matched,
340
+ yyleng: this.yyleng,
341
+ offset: this.offset,
342
+ _more: this._more,
343
+ _input: this._input,
344
+ yy: this.yy,
345
+ conditionStack: this.conditionStack.slice(0),
346
+ done: this.done
347
+ };
348
+ if (this.options.ranges) {
349
+ backup.yylloc.range = this.yylloc.range.slice(0);
350
+ }
351
+ }
352
+ lines = match[0].match(/(?:\r\n?|\n).*/g);
353
+ if (lines) {
354
+ this.yylineno += lines.length;
355
+ }
356
+ this.yylloc = {
357
+ first_line: this.yylloc.last_line,
358
+ last_line: this.yylineno + 1,
359
+ first_column: this.yylloc.last_column,
360
+ last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
361
+ };
362
+ this.yytext += match[0];
363
+ this.match += match[0];
364
+ this.matches = match;
365
+ this.yyleng = this.yytext.length;
366
+ if (this.options.ranges) {
367
+ this.yylloc.range = [this.offset, this.offset += this.yyleng];
368
+ }
369
+ this._more = false;
370
+ this._backtrack = false;
371
+ this._input = this._input.slice(match[0].length);
372
+ this.matched += match[0];
373
+ token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
374
+ if (this.done && this._input) {
375
+ this.done = false;
376
+ }
377
+ if (token) {
378
+ return token;
379
+ } else if (this._backtrack) {
380
+ for (var k in backup) {
381
+ this[k] = backup[k];
382
+ }
383
+ return false;
384
+ }
385
+ return false;
386
+ },
387
+ // return next match in input
388
+ next: function() {
389
+ if (this.done) {
390
+ return this.EOF;
391
+ }
392
+ if (!this._input) {
393
+ this.done = true;
394
+ }
395
+ var token, match, tempMatch, index;
396
+ if (!this._more) {
397
+ this.yytext = "";
398
+ this.match = "";
399
+ }
400
+ var rules = this._currentRules();
401
+ for (var i = 0; i < rules.length; i++) {
402
+ tempMatch = this._input.match(this.rules[rules[i]]);
403
+ if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
404
+ match = tempMatch;
405
+ index = i;
406
+ if (this.options.backtrack_lexer) {
407
+ token = this.test_match(tempMatch, rules[i]);
408
+ if (token !== false) {
409
+ return token;
410
+ } else if (this._backtrack) {
411
+ match = false;
412
+ continue;
413
+ } else {
414
+ return false;
415
+ }
416
+ } else if (!this.options.flex) {
417
+ break;
418
+ }
419
+ }
420
+ }
421
+ if (match) {
422
+ token = this.test_match(match, rules[index]);
423
+ if (token !== false) {
424
+ return token;
425
+ }
426
+ return false;
427
+ }
428
+ if (this._input === "") {
429
+ return this.EOF;
430
+ } else {
431
+ return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
432
+ text: "",
433
+ token: null,
434
+ line: this.yylineno
435
+ });
436
+ }
437
+ },
438
+ // return next match that has a token
439
+ lex: function lex() {
440
+ var r = this.next();
441
+ if (r) {
442
+ return r;
443
+ } else {
444
+ return this.lex();
445
+ }
446
+ },
447
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
448
+ begin: function begin(condition) {
449
+ this.conditionStack.push(condition);
450
+ },
451
+ // pop the previously active lexer condition state off the condition stack
452
+ popState: function popState() {
453
+ var n = this.conditionStack.length - 1;
454
+ if (n > 0) {
455
+ return this.conditionStack.pop();
456
+ } else {
457
+ return this.conditionStack[0];
458
+ }
459
+ },
460
+ // produce the lexer rule set which is active for the currently active lexer condition state
461
+ _currentRules: function _currentRules() {
462
+ if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
463
+ return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
464
+ } else {
465
+ return this.conditions["INITIAL"].rules;
466
+ }
467
+ },
468
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
469
+ topState: function topState(n) {
470
+ n = this.conditionStack.length - 1 - Math.abs(n || 0);
471
+ if (n >= 0) {
472
+ return this.conditionStack[n];
473
+ } else {
474
+ return "INITIAL";
475
+ }
476
+ },
477
+ // alias for begin(condition)
478
+ pushState: function pushState(condition) {
479
+ this.begin(condition);
480
+ },
481
+ // return the number of states currently on the stack
482
+ stateStackSize: function stateStackSize() {
483
+ return this.conditionStack.length;
484
+ },
485
+ options: { "case-insensitive": true },
486
+ performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
487
+ switch ($avoiding_name_collisions) {
488
+ case 0:
489
+ break;
490
+ case 1:
491
+ break;
492
+ case 2:
493
+ return 10;
494
+ case 3:
495
+ break;
496
+ case 4:
497
+ break;
498
+ case 5:
499
+ return 4;
500
+ case 6:
501
+ return 11;
502
+ case 7:
503
+ this.begin("acc_title");
504
+ return 12;
505
+ case 8:
506
+ this.popState();
507
+ return "acc_title_value";
508
+ case 9:
509
+ this.begin("acc_descr");
510
+ return 14;
511
+ case 10:
512
+ this.popState();
513
+ return "acc_descr_value";
514
+ case 11:
515
+ this.begin("acc_descr_multiline");
516
+ break;
517
+ case 12:
518
+ this.popState();
519
+ break;
520
+ case 13:
521
+ return "acc_descr_multiline_value";
522
+ case 14:
523
+ return 17;
524
+ case 15:
525
+ return 21;
526
+ case 16:
527
+ return 20;
528
+ case 17:
529
+ return 6;
530
+ case 18:
531
+ return "INVALID";
532
+ }
533
+ },
534
+ rules: [/^(?:%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:timeline\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, /^(?::\s[^#:\n;]+)/i, /^(?:[^#:\n;]+)/i, /^(?:$)/i, /^(?:.)/i],
535
+ 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], "inclusive": true } }
536
+ };
537
+ return lexer2;
538
+ }();
539
+ parser2.lexer = lexer;
540
+ function Parser() {
541
+ this.yy = {};
542
+ }
543
+ Parser.prototype = parser2;
544
+ parser2.Parser = Parser;
545
+ return new Parser();
546
+ }();
547
+ parser.parser = parser;
548
+ const parser$1 = parser;
549
+ let currentSection = "";
550
+ let currentTaskId = 0;
551
+ const sections = [];
552
+ const tasks = [];
553
+ const rawTasks = [];
554
+ const getCommonDb = () => commonDb;
555
+ const clear = function() {
556
+ sections.length = 0;
557
+ tasks.length = 0;
558
+ currentSection = "";
559
+ rawTasks.length = 0;
560
+ clear$1();
561
+ };
562
+ const addSection = function(txt) {
563
+ currentSection = txt;
564
+ sections.push(txt);
565
+ };
566
+ const getSections = function() {
567
+ return sections;
568
+ };
569
+ const getTasks = function() {
570
+ let allItemsProcessed = compileTasks();
571
+ const maxDepth = 100;
572
+ let iterationCount = 0;
573
+ while (!allItemsProcessed && iterationCount < maxDepth) {
574
+ allItemsProcessed = compileTasks();
575
+ iterationCount++;
576
+ }
577
+ tasks.push(...rawTasks);
578
+ return tasks;
579
+ };
580
+ const addTask = function(period, length, event) {
581
+ const rawTask = {
582
+ id: currentTaskId++,
583
+ section: currentSection,
584
+ type: currentSection,
585
+ task: period,
586
+ score: length ? length : 0,
587
+ //if event is defined, then add it the events array
588
+ events: event ? [event] : []
589
+ };
590
+ rawTasks.push(rawTask);
591
+ };
592
+ const addEvent = function(event) {
593
+ const currentTask = rawTasks.find((task) => task.id === currentTaskId - 1);
594
+ currentTask.events.push(event);
595
+ };
596
+ const addTaskOrg = function(descr) {
597
+ const newTask = {
598
+ section: currentSection,
599
+ type: currentSection,
600
+ description: descr,
601
+ task: descr,
602
+ classes: []
603
+ };
604
+ tasks.push(newTask);
605
+ };
606
+ const compileTasks = function() {
607
+ const compileTask = function(pos) {
608
+ return rawTasks[pos].processed;
609
+ };
610
+ let allProcessed = true;
611
+ for (const [i, rawTask] of rawTasks.entries()) {
612
+ compileTask(i);
613
+ allProcessed = allProcessed && rawTask.processed;
614
+ }
615
+ return allProcessed;
616
+ };
617
+ const timelineDb = {
618
+ clear,
619
+ getCommonDb,
620
+ addSection,
621
+ getSections,
622
+ getTasks,
623
+ addTask,
624
+ addTaskOrg,
625
+ addEvent
626
+ };
627
+ const db = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
628
+ __proto__: null,
629
+ addEvent,
630
+ addSection,
631
+ addTask,
632
+ addTaskOrg,
633
+ clear,
634
+ default: timelineDb,
635
+ getCommonDb,
636
+ getSections,
637
+ getTasks
638
+ }, Symbol.toStringTag, { value: "Module" }));
639
+ const MAX_SECTIONS = 12;
640
+ const drawRect = function(elem, rectData) {
641
+ const rectElem = elem.append("rect");
642
+ rectElem.attr("x", rectData.x);
643
+ rectElem.attr("y", rectData.y);
644
+ rectElem.attr("fill", rectData.fill);
645
+ rectElem.attr("stroke", rectData.stroke);
646
+ rectElem.attr("width", rectData.width);
647
+ rectElem.attr("height", rectData.height);
648
+ rectElem.attr("rx", rectData.rx);
649
+ rectElem.attr("ry", rectData.ry);
650
+ if (rectData.class !== void 0) {
651
+ rectElem.attr("class", rectData.class);
652
+ }
653
+ return rectElem;
654
+ };
655
+ const drawFace = function(element, faceData) {
656
+ const radius = 15;
657
+ 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");
658
+ const face = element.append("g");
659
+ 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");
660
+ 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");
661
+ function smile(face2) {
662
+ const arc$1 = arc().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(radius / 2).outerRadius(radius / 2.2);
663
+ face2.append("path").attr("class", "mouth").attr("d", arc$1).attr("transform", "translate(" + faceData.cx + "," + (faceData.cy + 2) + ")");
664
+ }
665
+ function sad(face2) {
666
+ const arc$1 = arc().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(radius / 2).outerRadius(radius / 2.2);
667
+ face2.append("path").attr("class", "mouth").attr("d", arc$1).attr("transform", "translate(" + faceData.cx + "," + (faceData.cy + 7) + ")");
668
+ }
669
+ function ambivalent(face2) {
670
+ 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");
671
+ }
672
+ if (faceData.score > 3) {
673
+ smile(face);
674
+ } else if (faceData.score < 3) {
675
+ sad(face);
676
+ } else {
677
+ ambivalent(face);
678
+ }
679
+ return circleElement;
680
+ };
681
+ const drawCircle = function(element, circleData) {
682
+ const circleElement = element.append("circle");
683
+ circleElement.attr("cx", circleData.cx);
684
+ circleElement.attr("cy", circleData.cy);
685
+ circleElement.attr("class", "actor-" + circleData.pos);
686
+ circleElement.attr("fill", circleData.fill);
687
+ circleElement.attr("stroke", circleData.stroke);
688
+ circleElement.attr("r", circleData.r);
689
+ if (circleElement.class !== void 0) {
690
+ circleElement.attr("class", circleElement.class);
691
+ }
692
+ if (circleData.title !== void 0) {
693
+ circleElement.append("title").text(circleData.title);
694
+ }
695
+ return circleElement;
696
+ };
697
+ const drawText = function(elem, textData) {
698
+ const nText = textData.text.replace(/<br\s*\/?>/gi, " ");
699
+ const textElem = elem.append("text");
700
+ textElem.attr("x", textData.x);
701
+ textElem.attr("y", textData.y);
702
+ textElem.attr("class", "legend");
703
+ textElem.style("text-anchor", textData.anchor);
704
+ if (textData.class !== void 0) {
705
+ textElem.attr("class", textData.class);
706
+ }
707
+ const span = textElem.append("tspan");
708
+ span.attr("x", textData.x + textData.textMargin * 2);
709
+ span.text(nText);
710
+ return textElem;
711
+ };
712
+ const drawLabel = function(elem, txtObject) {
713
+ function genPoints(x, y, width, height, cut) {
714
+ return x + "," + y + " " + (x + width) + "," + y + " " + (x + width) + "," + (y + height - cut) + " " + (x + width - cut * 1.2) + "," + (y + height) + " " + x + "," + (y + height);
715
+ }
716
+ const polygon = elem.append("polygon");
717
+ polygon.attr("points", genPoints(txtObject.x, txtObject.y, 50, 20, 7));
718
+ polygon.attr("class", "labelBox");
719
+ txtObject.y = txtObject.y + txtObject.labelMargin;
720
+ txtObject.x = txtObject.x + 0.5 * txtObject.labelMargin;
721
+ drawText(elem, txtObject);
722
+ };
723
+ const drawSection = function(elem, section, conf) {
724
+ const g = elem.append("g");
725
+ const rect = getNoteRect();
726
+ rect.x = section.x;
727
+ rect.y = section.y;
728
+ rect.fill = section.fill;
729
+ rect.width = conf.width;
730
+ rect.height = conf.height;
731
+ rect.class = "journey-section section-type-" + section.num;
732
+ rect.rx = 3;
733
+ rect.ry = 3;
734
+ drawRect(g, rect);
735
+ _drawTextCandidateFunc(conf)(
736
+ section.text,
737
+ g,
738
+ rect.x,
739
+ rect.y,
740
+ rect.width,
741
+ rect.height,
742
+ { class: "journey-section section-type-" + section.num },
743
+ conf,
744
+ section.colour
745
+ );
746
+ };
747
+ let taskCount = -1;
748
+ const drawTask = function(elem, task, conf) {
749
+ const center = task.x + conf.width / 2;
750
+ const g = elem.append("g");
751
+ taskCount++;
752
+ const maxHeight = 300 + 5 * 30;
753
+ 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");
754
+ drawFace(g, {
755
+ cx: center,
756
+ cy: 300 + (5 - task.score) * 30,
757
+ score: task.score
758
+ });
759
+ const rect = getNoteRect();
760
+ rect.x = task.x;
761
+ rect.y = task.y;
762
+ rect.fill = task.fill;
763
+ rect.width = conf.width;
764
+ rect.height = conf.height;
765
+ rect.class = "task task-type-" + task.num;
766
+ rect.rx = 3;
767
+ rect.ry = 3;
768
+ drawRect(g, rect);
769
+ task.x + 14;
770
+ _drawTextCandidateFunc(conf)(
771
+ task.task,
772
+ g,
773
+ rect.x,
774
+ rect.y,
775
+ rect.width,
776
+ rect.height,
777
+ { class: "task" },
778
+ conf,
779
+ task.colour
780
+ );
781
+ };
782
+ const drawBackgroundRect = function(elem, bounds) {
783
+ const rectElem = drawRect(elem, {
784
+ x: bounds.startx,
785
+ y: bounds.starty,
786
+ width: bounds.stopx - bounds.startx,
787
+ height: bounds.stopy - bounds.starty,
788
+ fill: bounds.fill,
789
+ class: "rect"
790
+ });
791
+ rectElem.lower();
792
+ };
793
+ const getTextObj = function() {
794
+ return {
795
+ x: 0,
796
+ y: 0,
797
+ fill: void 0,
798
+ "text-anchor": "start",
799
+ width: 100,
800
+ height: 100,
801
+ textMargin: 0,
802
+ rx: 0,
803
+ ry: 0
804
+ };
805
+ };
806
+ const getNoteRect = function() {
807
+ return {
808
+ x: 0,
809
+ y: 0,
810
+ width: 100,
811
+ anchor: "start",
812
+ height: 100,
813
+ rx: 0,
814
+ ry: 0
815
+ };
816
+ };
817
+ const _drawTextCandidateFunc = /* @__PURE__ */ function() {
818
+ function byText(content, g, x, y, width, height, textAttrs, colour) {
819
+ 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);
820
+ _setTextAttrs(text, textAttrs);
821
+ }
822
+ function byTspan(content, g, x, y, width, height, textAttrs, conf, colour) {
823
+ const { taskFontSize, taskFontFamily } = conf;
824
+ const lines = content.split(/<br\s*\/?>/gi);
825
+ for (let i = 0; i < lines.length; i++) {
826
+ const dy = i * taskFontSize - taskFontSize * (lines.length - 1) / 2;
827
+ 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);
828
+ text.append("tspan").attr("x", x + width / 2).attr("dy", dy).text(lines[i]);
829
+ text.attr("y", y + height / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central");
830
+ _setTextAttrs(text, textAttrs);
831
+ }
832
+ }
833
+ function byFo(content, g, x, y, width, height, textAttrs, conf) {
834
+ const body = g.append("switch");
835
+ const f = body.append("foreignObject").attr("x", x).attr("y", y).attr("width", width).attr("height", height).attr("position", "fixed");
836
+ const text = f.append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
837
+ text.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(content);
838
+ byTspan(content, body, x, y, width, height, textAttrs, conf);
839
+ _setTextAttrs(text, textAttrs);
840
+ }
841
+ function _setTextAttrs(toText, fromTextAttrsDict) {
842
+ for (const key in fromTextAttrsDict) {
843
+ if (key in fromTextAttrsDict) {
844
+ toText.attr(key, fromTextAttrsDict[key]);
845
+ }
846
+ }
847
+ }
848
+ return function(conf) {
849
+ return conf.textPlacement === "fo" ? byFo : conf.textPlacement === "old" ? byText : byTspan;
850
+ };
851
+ }();
852
+ const initGraphics = function(graphics) {
853
+ 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");
854
+ };
855
+ function wrap(text, width) {
856
+ text.each(function() {
857
+ var text2 = select(this), words = text2.text().split(/(\s+|<br>)/).reverse(), word, line = [], lineHeight = 1.1, y = text2.attr("y"), dy = parseFloat(text2.attr("dy")), tspan = text2.text(null).append("tspan").attr("x", 0).attr("y", y).attr("dy", dy + "em");
858
+ for (let j = 0; j < words.length; j++) {
859
+ word = words[words.length - 1 - j];
860
+ line.push(word);
861
+ tspan.text(line.join(" ").trim());
862
+ if (tspan.node().getComputedTextLength() > width || word === "<br>") {
863
+ line.pop();
864
+ tspan.text(line.join(" ").trim());
865
+ if (word === "<br>") {
866
+ line = [""];
867
+ } else {
868
+ line = [word];
869
+ }
870
+ tspan = text2.append("tspan").attr("x", 0).attr("y", y).attr("dy", lineHeight + "em").text(word);
871
+ }
872
+ }
873
+ });
874
+ }
875
+ const drawNode = function(elem, node, fullSection, conf) {
876
+ const section = fullSection % MAX_SECTIONS - 1;
877
+ const nodeElem = elem.append("g");
878
+ node.section = section;
879
+ nodeElem.attr(
880
+ "class",
881
+ (node.class ? node.class + " " : "") + "timeline-node " + ("section-" + section)
882
+ );
883
+ const bkgElem = nodeElem.append("g");
884
+ const textElem = nodeElem.append("g");
885
+ const txt = textElem.append("text").text(node.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(wrap, node.width);
886
+ const bbox = txt.node().getBBox();
887
+ const fontSize = conf.fontSize && conf.fontSize.replace ? conf.fontSize.replace("px", "") : conf.fontSize;
888
+ node.height = bbox.height + fontSize * 1.1 * 0.5 + node.padding;
889
+ node.height = Math.max(node.height, node.maxHeight);
890
+ node.width = node.width + 2 * node.padding;
891
+ textElem.attr("transform", "translate(" + node.width / 2 + ", " + node.padding / 2 + ")");
892
+ defaultBkg(bkgElem, node, section);
893
+ return node;
894
+ };
895
+ const getVirtualNodeHeight = function(elem, node, conf) {
896
+ const textElem = elem.append("g");
897
+ const txt = textElem.append("text").text(node.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(wrap, node.width);
898
+ const bbox = txt.node().getBBox();
899
+ const fontSize = conf.fontSize && conf.fontSize.replace ? conf.fontSize.replace("px", "") : conf.fontSize;
900
+ textElem.remove();
901
+ return bbox.height + fontSize * 1.1 * 0.5 + node.padding;
902
+ };
903
+ const defaultBkg = function(elem, node, section) {
904
+ const rd = 5;
905
+ elem.append("path").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + node.type).attr(
906
+ "d",
907
+ `M0 ${node.height - rd} v${-node.height + 2 * rd} q0,-5 5,-5 h${node.width - 2 * rd} q5,0 5,5 v${node.height - rd} H0 Z`
908
+ );
909
+ elem.append("line").attr("class", "node-line-" + section).attr("x1", 0).attr("y1", node.height).attr("x2", node.width).attr("y2", node.height);
910
+ };
911
+ const svgDraw = {
912
+ drawRect,
913
+ drawCircle,
914
+ drawSection,
915
+ drawText,
916
+ drawLabel,
917
+ drawTask,
918
+ drawBackgroundRect,
919
+ getTextObj,
920
+ getNoteRect,
921
+ initGraphics,
922
+ drawNode,
923
+ getVirtualNodeHeight
924
+ };
925
+ const draw = function(text, id, version, diagObj) {
926
+ var _a, _b;
927
+ const conf = getConfig();
928
+ const LEFT_MARGIN = conf.leftMargin ?? 50;
929
+ log$1.debug("timeline", diagObj.db);
930
+ const securityLevel = conf.securityLevel;
931
+ let sandboxElement;
932
+ if (securityLevel === "sandbox") {
933
+ sandboxElement = select("#i" + id);
934
+ }
935
+ const root = securityLevel === "sandbox" ? select(sandboxElement.nodes()[0].contentDocument.body) : select("body");
936
+ const svg = root.select("#" + id);
937
+ svg.append("g");
938
+ const tasks2 = diagObj.db.getTasks();
939
+ const title = diagObj.db.getCommonDb().getDiagramTitle();
940
+ log$1.debug("task", tasks2);
941
+ svgDraw.initGraphics(svg);
942
+ const sections2 = diagObj.db.getSections();
943
+ log$1.debug("sections", sections2);
944
+ let maxSectionHeight = 0;
945
+ let maxTaskHeight = 0;
946
+ let depthY = 0;
947
+ let sectionBeginY = 0;
948
+ let masterX = 50 + LEFT_MARGIN;
949
+ let masterY = 50;
950
+ sectionBeginY = 50;
951
+ let sectionNumber = 0;
952
+ let hasSections = true;
953
+ sections2.forEach(function(section) {
954
+ const sectionNode = {
955
+ number: sectionNumber,
956
+ descr: section,
957
+ section: sectionNumber,
958
+ width: 150,
959
+ padding: 20,
960
+ maxHeight: maxSectionHeight
961
+ };
962
+ const sectionHeight = svgDraw.getVirtualNodeHeight(svg, sectionNode, conf);
963
+ log$1.debug("sectionHeight before draw", sectionHeight);
964
+ maxSectionHeight = Math.max(maxSectionHeight, sectionHeight + 20);
965
+ });
966
+ let maxEventCount = 0;
967
+ let maxEventLineLength = 0;
968
+ log$1.debug("tasks.length", tasks2.length);
969
+ for (const [i, task] of tasks2.entries()) {
970
+ const taskNode = {
971
+ number: i,
972
+ descr: task,
973
+ section: task.section,
974
+ width: 150,
975
+ padding: 20,
976
+ maxHeight: maxTaskHeight
977
+ };
978
+ const taskHeight = svgDraw.getVirtualNodeHeight(svg, taskNode, conf);
979
+ log$1.debug("taskHeight before draw", taskHeight);
980
+ maxTaskHeight = Math.max(maxTaskHeight, taskHeight + 20);
981
+ maxEventCount = Math.max(maxEventCount, task.events.length);
982
+ let maxEventLineLengthTemp = 0;
983
+ for (let j = 0; j < task.events.length; j++) {
984
+ const event = task.events[j];
985
+ const eventNode = {
986
+ descr: event,
987
+ section: task.section,
988
+ number: task.section,
989
+ width: 150,
990
+ padding: 20,
991
+ maxHeight: 50
992
+ };
993
+ maxEventLineLengthTemp += svgDraw.getVirtualNodeHeight(svg, eventNode, conf);
994
+ }
995
+ maxEventLineLength = Math.max(maxEventLineLength, maxEventLineLengthTemp);
996
+ }
997
+ log$1.debug("maxSectionHeight before draw", maxSectionHeight);
998
+ log$1.debug("maxTaskHeight before draw", maxTaskHeight);
999
+ if (sections2 && sections2.length > 0) {
1000
+ sections2.forEach((section) => {
1001
+ const tasksForSection = tasks2.filter((task) => task.section === section);
1002
+ const sectionNode = {
1003
+ number: sectionNumber,
1004
+ descr: section,
1005
+ section: sectionNumber,
1006
+ width: 200 * Math.max(tasksForSection.length, 1) - 50,
1007
+ padding: 20,
1008
+ maxHeight: maxSectionHeight
1009
+ };
1010
+ log$1.debug("sectionNode", sectionNode);
1011
+ const sectionNodeWrapper = svg.append("g");
1012
+ const node = svgDraw.drawNode(sectionNodeWrapper, sectionNode, sectionNumber, conf);
1013
+ log$1.debug("sectionNode output", node);
1014
+ sectionNodeWrapper.attr("transform", `translate(${masterX}, ${sectionBeginY})`);
1015
+ masterY += maxSectionHeight + 50;
1016
+ if (tasksForSection.length > 0) {
1017
+ drawTasks(
1018
+ svg,
1019
+ tasksForSection,
1020
+ sectionNumber,
1021
+ masterX,
1022
+ masterY,
1023
+ maxTaskHeight,
1024
+ conf,
1025
+ maxEventCount,
1026
+ maxEventLineLength,
1027
+ maxSectionHeight,
1028
+ false
1029
+ );
1030
+ }
1031
+ masterX += 200 * Math.max(tasksForSection.length, 1);
1032
+ masterY = sectionBeginY;
1033
+ sectionNumber++;
1034
+ });
1035
+ } else {
1036
+ hasSections = false;
1037
+ drawTasks(
1038
+ svg,
1039
+ tasks2,
1040
+ sectionNumber,
1041
+ masterX,
1042
+ masterY,
1043
+ maxTaskHeight,
1044
+ conf,
1045
+ maxEventCount,
1046
+ maxEventLineLength,
1047
+ maxSectionHeight,
1048
+ true
1049
+ );
1050
+ }
1051
+ const box = svg.node().getBBox();
1052
+ log$1.debug("bounds", box);
1053
+ if (title) {
1054
+ svg.append("text").text(title).attr("x", box.width / 2 - LEFT_MARGIN).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 20);
1055
+ }
1056
+ depthY = hasSections ? maxSectionHeight + maxTaskHeight + 150 : maxTaskHeight + 100;
1057
+ const lineWrapper = svg.append("g").attr("class", "lineWrapper");
1058
+ lineWrapper.append("line").attr("x1", LEFT_MARGIN).attr("y1", depthY).attr("x2", box.width + 3 * LEFT_MARGIN).attr("y2", depthY).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)");
1059
+ setupGraphViewbox$1(
1060
+ void 0,
1061
+ svg,
1062
+ ((_a = conf.timeline) == null ? void 0 : _a.padding) ?? 50,
1063
+ ((_b = conf.timeline) == null ? void 0 : _b.useMaxWidth) ?? false
1064
+ );
1065
+ };
1066
+ const drawTasks = function(diagram2, tasks2, sectionColor, masterX, masterY, maxTaskHeight, conf, maxEventCount, maxEventLineLength, maxSectionHeight, isWithoutSections) {
1067
+ var _a;
1068
+ for (const task of tasks2) {
1069
+ const taskNode = {
1070
+ descr: task.task,
1071
+ section: sectionColor,
1072
+ number: sectionColor,
1073
+ width: 150,
1074
+ padding: 20,
1075
+ maxHeight: maxTaskHeight
1076
+ };
1077
+ log$1.debug("taskNode", taskNode);
1078
+ const taskWrapper = diagram2.append("g").attr("class", "taskWrapper");
1079
+ const node = svgDraw.drawNode(taskWrapper, taskNode, sectionColor, conf);
1080
+ const taskHeight = node.height;
1081
+ log$1.debug("taskHeight after draw", taskHeight);
1082
+ taskWrapper.attr("transform", `translate(${masterX}, ${masterY})`);
1083
+ maxTaskHeight = Math.max(maxTaskHeight, taskHeight);
1084
+ if (task.events) {
1085
+ const lineWrapper = diagram2.append("g").attr("class", "lineWrapper");
1086
+ let lineLength = maxTaskHeight;
1087
+ masterY += 100;
1088
+ lineLength = lineLength + drawEvents(diagram2, task.events, sectionColor, masterX, masterY, conf);
1089
+ masterY -= 100;
1090
+ lineWrapper.append("line").attr("x1", masterX + 190 / 2).attr("y1", masterY + maxTaskHeight).attr("x2", masterX + 190 / 2).attr(
1091
+ "y2",
1092
+ masterY + maxTaskHeight + (isWithoutSections ? maxTaskHeight : maxSectionHeight) + maxEventLineLength + 120
1093
+ ).attr("stroke-width", 2).attr("stroke", "black").attr("marker-end", "url(#arrowhead)").attr("stroke-dasharray", "5,5");
1094
+ }
1095
+ masterX = masterX + 200;
1096
+ if (isWithoutSections && !((_a = conf.timeline) == null ? void 0 : _a.disableMulticolor)) {
1097
+ sectionColor++;
1098
+ }
1099
+ }
1100
+ masterY = masterY - 10;
1101
+ };
1102
+ const drawEvents = function(diagram2, events, sectionColor, masterX, masterY, conf) {
1103
+ let maxEventHeight = 0;
1104
+ const eventBeginY = masterY;
1105
+ masterY = masterY + 100;
1106
+ for (const event of events) {
1107
+ const eventNode = {
1108
+ descr: event,
1109
+ section: sectionColor,
1110
+ number: sectionColor,
1111
+ width: 150,
1112
+ padding: 20,
1113
+ maxHeight: 50
1114
+ };
1115
+ log$1.debug("eventNode", eventNode);
1116
+ const eventWrapper = diagram2.append("g").attr("class", "eventWrapper");
1117
+ const node = svgDraw.drawNode(eventWrapper, eventNode, sectionColor, conf);
1118
+ const eventHeight = node.height;
1119
+ maxEventHeight = maxEventHeight + eventHeight;
1120
+ eventWrapper.attr("transform", `translate(${masterX}, ${masterY})`);
1121
+ masterY = masterY + 10 + eventHeight;
1122
+ }
1123
+ masterY = eventBeginY;
1124
+ return maxEventHeight;
1125
+ };
1126
+ const renderer = {
1127
+ setConf: () => {
1128
+ },
1129
+ draw
1130
+ };
1131
+ const genSections = (options) => {
1132
+ let sections2 = "";
1133
+ for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) {
1134
+ options["lineColor" + i] = options["lineColor" + i] || options["cScaleInv" + i];
1135
+ if (isDark(options["lineColor" + i])) {
1136
+ options["lineColor" + i] = lighten(options["lineColor" + i], 20);
1137
+ } else {
1138
+ options["lineColor" + i] = darken(options["lineColor" + i], 20);
1139
+ }
1140
+ }
1141
+ for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) {
1142
+ const sw = "" + (17 - 3 * i);
1143
+ sections2 += `
1144
+ .section-${i - 1} rect, .section-${i - 1} path, .section-${i - 1} circle, .section-${i - 1} path {
1145
+ fill: ${options["cScale" + i]};
1146
+ }
1147
+ .section-${i - 1} text {
1148
+ fill: ${options["cScaleLabel" + i]};
1149
+ }
1150
+ .node-icon-${i - 1} {
1151
+ font-size: 40px;
1152
+ color: ${options["cScaleLabel" + i]};
1153
+ }
1154
+ .section-edge-${i - 1}{
1155
+ stroke: ${options["cScale" + i]};
1156
+ }
1157
+ .edge-depth-${i - 1}{
1158
+ stroke-width: ${sw};
1159
+ }
1160
+ .section-${i - 1} line {
1161
+ stroke: ${options["cScaleInv" + i]} ;
1162
+ stroke-width: 3;
1163
+ }
1164
+
1165
+ .lineWrapper line{
1166
+ stroke: ${options["cScaleLabel" + i]} ;
1167
+ }
1168
+
1169
+ .disabled, .disabled circle, .disabled text {
1170
+ fill: lightgray;
1171
+ }
1172
+ .disabled text {
1173
+ fill: #efefef;
1174
+ }
1175
+ `;
1176
+ }
1177
+ return sections2;
1178
+ };
1179
+ const getStyles = (options) => `
1180
+ .edge {
1181
+ stroke-width: 3;
1182
+ }
1183
+ ${genSections(options)}
1184
+ .section-root rect, .section-root path, .section-root circle {
1185
+ fill: ${options.git0};
1186
+ }
1187
+ .section-root text {
1188
+ fill: ${options.gitBranchLabel0};
1189
+ }
1190
+ .icon-container {
1191
+ height:100%;
1192
+ display: flex;
1193
+ justify-content: center;
1194
+ align-items: center;
1195
+ }
1196
+ .edge {
1197
+ fill: none;
1198
+ }
1199
+ .eventWrapper {
1200
+ filter: brightness(120%);
1201
+ }
1202
+ `;
1203
+ const styles = getStyles;
1204
+ const diagram = {
1205
+ db,
1206
+ renderer,
1207
+ parser: parser$1,
1208
+ styles
1209
+ };
1210
+ export {
1211
+ diagram
1212
+ };