@bkm016/basalt 0.1.8 → 0.1.9

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 (252) hide show
  1. package/{chunk-0039s4jt.js → chunk-02d3x4mj.js} +3 -3
  2. package/{chunk-ky55taar.js → chunk-0xd9mnc2.js} +327 -316
  3. package/{chunk-ckjw3b61.js → chunk-13gvs0ax.js} +2 -2
  4. package/{chunk-0d51ggzj.js → chunk-1n7dat03.js} +4 -4
  5. package/{chunk-ppxv5q7y.js → chunk-1zj3zvw5.js} +3 -3
  6. package/{chunk-2ek3wq4b.js → chunk-29qrxygd.js} +1 -1
  7. package/{chunk-7p6e2f5s.js → chunk-30rjf7my.js} +3 -3
  8. package/{chunk-v2srrqcv.js → chunk-38g3gctw.js} +2 -2
  9. package/{chunk-3j2kkgsc.js → chunk-4dw43syb.js} +1 -1
  10. package/{chunk-t66jqz12.js → chunk-4gtgqcct.js} +2 -2
  11. package/chunk-66h5qpc6.js +479 -0
  12. package/{chunk-qmdpgbg3.js → chunk-755sy11p.js} +1 -1
  13. package/{chunk-n015c8nx.js → chunk-7zkswxvk.js} +1 -1
  14. package/{chunk-91r5nvth.js → chunk-82v8jh1h.js} +2 -2
  15. package/{chunk-12trygzx.js → chunk-95964592.js} +16 -16
  16. package/{chunk-nmtk9xra.js → chunk-9as0p561.js} +2 -2
  17. package/{chunk-pn413hjw.js → chunk-a1352w87.js} +1 -1
  18. package/{chunk-rnt1ckk9.js → chunk-a1rb1a48.js} +5 -5
  19. package/{chunk-fzcmzbsq.js → chunk-a98wma9j.js} +1 -1
  20. package/{chunk-kgkrccr1.js → chunk-asyr3gnq.js} +2 -2
  21. package/{chunk-5gxj9560.js → chunk-ax04trym.js} +1 -1
  22. package/chunk-b2bxqeb4.js +2 -0
  23. package/{chunk-xjw78yey.js → chunk-bdjr0kfr.js} +4 -4
  24. package/{chunk-7kjr9gdx.js → chunk-bk4rpnm8.js} +2 -2
  25. package/{chunk-47vf66t6.js → chunk-c0zfefq8.js} +1 -1
  26. package/{chunk-kpvaqb7c.js → chunk-c6q04xrd.js} +2 -2
  27. package/chunk-c71173py.js +25 -0
  28. package/{chunk-adys4qq4.js → chunk-cmwdjes8.js} +5 -5
  29. package/{chunk-dcwdmpw2.js → chunk-d0a1jxk5.js} +1 -1
  30. package/{chunk-2nrkqq45.js → chunk-d5j74pcp.js} +7 -7
  31. package/{chunk-pkpj7s2k.js → chunk-dfh9m9n7.js} +1 -1
  32. package/{chunk-26cz8et8.js → chunk-dq01v5eq.js} +1 -1
  33. package/{chunk-fpxc6qjr.js → chunk-e1x629v0.js} +2 -2
  34. package/{chunk-86xhmz7k.js → chunk-en218k4y.js} +1 -1
  35. package/{chunk-3hg7yn1t.js → chunk-fgwda4m0.js} +1 -1
  36. package/chunk-gbjn6d81.js +2 -0
  37. package/{chunk-x496kg3v.js → chunk-gkf5jwvj.js} +1 -1
  38. package/{chunk-k3q5jqjj.js → chunk-hb4f2v34.js} +2 -2
  39. package/{chunk-mr807v9n.js → chunk-hbnmymaq.js} +1 -1
  40. package/{chunk-818nd6s1.js → chunk-jj4hqbrx.js} +2 -2
  41. package/{chunk-jyv9cae6.js → chunk-jn5pqy5v.js} +1 -1
  42. package/{chunk-yyy2yp6f.js → chunk-jtsve11b.js} +9 -9
  43. package/chunk-m1eam0s5.js +2 -0
  44. package/{chunk-6vnjg5x9.js → chunk-mbpb5c7w.js} +1 -1
  45. package/{chunk-t40fag3z.js → chunk-msm9hmk9.js} +1 -1
  46. package/{chunk-j781n7ca.js → chunk-n0ybj4h9.js} +2 -2
  47. package/{chunk-jp5afrwm.js → chunk-n2jcx65v.js} +2 -2
  48. package/{chunk-2ks2tnac.js → chunk-nrsd810j.js} +2 -2
  49. package/chunk-pnspvnyd.js +2 -0
  50. package/chunk-pz2afna8.js +2 -0
  51. package/{chunk-d37gemt2.js → chunk-q9f4xb0w.js} +3 -3
  52. package/{chunk-hd3x1w46.js → chunk-qaeyhe65.js} +1 -1
  53. package/chunk-qnkrrwmg.js +2 -0
  54. package/{chunk-e6c2mzxc.js → chunk-r4ttdkrz.js} +2 -2
  55. package/{chunk-r9aatvwm.js → chunk-stj493dn.js} +2 -2
  56. package/{chunk-g3ed130w.js → chunk-tevejprz.js} +4 -4
  57. package/{chunk-k3rmjrf1.js → chunk-v3ee9z3f.js} +1 -1
  58. package/{chunk-4n49ptbz.js → chunk-vtqr7dm8.js} +2 -2
  59. package/{chunk-z3ch1wg6.js → chunk-xh444pfn.js} +14 -14
  60. package/{chunk-pehyqj8k.js → chunk-zc9ar0r4.js} +1 -1
  61. package/{chunk-ef9yhnk3.js → chunk-zyyzk5ha.js} +1 -1
  62. package/compiled.js +9 -9
  63. package/package.json +1 -1
  64. package/ui-test-worker.js +8 -8
  65. package/web/chunk-08sq3cwm.js +1 -0
  66. package/web/chunk-0pghpg4y.js +2 -0
  67. package/web/chunk-12qf1r6m.js +1 -0
  68. package/web/chunk-24fjnnee.js +1 -0
  69. package/web/chunk-24jhbz82.js +24 -0
  70. package/web/{chunk-v14s4vgc.js → chunk-2dvbeqt0.js} +1 -1
  71. package/web/chunk-2hrswh3d.js +2 -0
  72. package/web/chunk-2j2atyjw.js +1 -0
  73. package/web/{chunk-s7e93552.js → chunk-2x4g9t37.js} +4 -4
  74. package/web/{chunk-hstbgb83.js → chunk-3ak5dg10.js} +5 -5
  75. package/web/chunk-3ecrkvr3.js +106 -0
  76. package/web/chunk-3h3g3ca3.js +1 -0
  77. package/web/chunk-3hr3ew9w.js +1 -0
  78. package/web/chunk-3pcrxg6m.js +1 -0
  79. package/web/{chunk-7a4xk6j9.js → chunk-3pd0qt83.js} +5 -5
  80. package/web/chunk-3txxt0a7.js +1 -0
  81. package/web/chunk-43g4wd7a.js +1 -0
  82. package/web/{chunk-nky3bqfg.js → chunk-4a6gdrbs.js} +1 -1
  83. package/web/{chunk-d0m0h0eb.js → chunk-5a4mj3qz.js} +1 -1
  84. package/web/{chunk-rkjkynm3.js → chunk-5baeh8q7.js} +11 -11
  85. package/web/{chunk-qq2v8h6d.js → chunk-5dr4tkem.js} +4 -4
  86. package/web/chunk-5jdrev9p.js +36 -0
  87. package/web/{chunk-p0cjvjdx.js → chunk-5v2c0aqk.js} +1 -1
  88. package/web/chunk-5z2n4z9x.css +1 -0
  89. package/web/{chunk-6e38yf3a.js → chunk-601k823s.js} +4 -4
  90. package/web/{chunk-8dp7h6w8.js → chunk-60axh4sa.js} +16 -16
  91. package/web/chunk-66wb0p6e.js +62 -0
  92. package/web/{chunk-qcge7d6s.js → chunk-6e87m0nm.js} +2 -2
  93. package/web/chunk-6y55gk1n.js +1 -0
  94. package/web/{chunk-8wg44w91.js → chunk-79e08rk1.js} +2 -2
  95. package/web/{chunk-svh2gkx8.js → chunk-7qkav30b.js} +1 -1
  96. package/web/chunk-814kkkmq.js +8 -0
  97. package/web/chunk-8jcvdd5d.js +2 -0
  98. package/web/{chunk-rbdvc8x7.js → chunk-8w7fyb3v.js} +1 -1
  99. package/web/chunk-8w8atrdh.js +1 -0
  100. package/web/{chunk-sda7cyrt.js → chunk-8z0r0wtk.js} +21 -21
  101. package/web/chunk-935mjq1c.js +39 -0
  102. package/web/chunk-942g3eqn.js +1 -0
  103. package/web/{chunk-1gx0zpmp.js → chunk-98y92vmh.js} +9 -9
  104. package/web/chunk-9ctg0f30.js +3 -0
  105. package/web/chunk-9fnr00kv.js +4 -0
  106. package/web/{chunk-fe31sv6t.js → chunk-9yfftz38.js} +1 -1
  107. package/web/chunk-a0ryzdnp.js +7 -0
  108. package/web/chunk-a61zrp66.js +1 -0
  109. package/web/{chunk-dtg5yhhs.js → chunk-af9evdza.js} +1 -1
  110. package/web/chunk-arnzrqnm.js +1 -0
  111. package/web/chunk-avxk6jpc.js +2 -0
  112. package/web/{chunk-c01176kn.js → chunk-awkdw9rw.js} +2 -2
  113. package/web/{chunk-tkp72r9b.js → chunk-b5h52neg.js} +1 -1
  114. package/web/chunk-bwy3e58v.js +1 -0
  115. package/web/{chunk-ja7w629n.js → chunk-c57f714b.js} +2 -2
  116. package/web/chunk-c6yacwbc.js +30 -0
  117. package/web/{chunk-823b7866.js → chunk-ctzkqx2g.js} +18 -18
  118. package/web/{chunk-w37n09px.js → chunk-db3twjvk.js} +10 -10
  119. package/web/{chunk-hbkasy6c.js → chunk-ddyyc20r.js} +22 -22
  120. package/web/{chunk-z0zrp8n8.js → chunk-dnv8dx72.js} +1 -1
  121. package/web/{chunk-jzte2phh.js → chunk-dwjmr0zj.js} +1 -1
  122. package/web/chunk-dz7g1gnv.js +2 -0
  123. package/web/{chunk-cez1k71m.js → chunk-eadfxfkw.js} +1 -1
  124. package/web/{chunk-d9wdsjkk.js → chunk-eqndhs21.js} +2 -2
  125. package/web/{chunk-cyjnert7.js → chunk-ewx42c11.js} +16 -16
  126. package/web/chunk-f7jpakwh.js +1 -0
  127. package/web/{chunk-r4ffr96e.js → chunk-ff1pmd3g.js} +1 -1
  128. package/web/chunk-fjb3ksfd.js +78 -0
  129. package/web/chunk-fpb2dd2d.js +2 -0
  130. package/web/{chunk-fv6vm14n.js → chunk-frnh4zqf.js} +2 -2
  131. package/web/{chunk-0j9a7811.js → chunk-gn8kyz76.js} +6 -6
  132. package/web/chunk-gv99c8zv.js +1 -0
  133. package/web/chunk-h0767tjv.js +1 -0
  134. package/web/chunk-hqynf99g.js +1 -0
  135. package/web/{chunk-jam45rqg.js → chunk-jccz14ye.js} +2 -2
  136. package/web/{chunk-33w36n91.js → chunk-kcjz03h5.js} +2 -2
  137. package/web/chunk-ket6g0yd.js +1 -0
  138. package/web/chunk-m9q5nr8f.js +1 -0
  139. package/web/chunk-mdfksj61.js +1 -0
  140. package/web/chunk-me7dza1c.js +1 -0
  141. package/web/{chunk-8773nwdc.js → chunk-myd6sc76.js} +1 -1
  142. package/web/{chunk-sf101c23.js → chunk-mykrm8ba.js} +2 -2
  143. package/web/chunk-mzzaet63.js +1 -0
  144. package/web/chunk-n0wazxgz.js +1 -0
  145. package/web/{chunk-1s8zg6fb.js → chunk-nnyc889n.js} +5 -5
  146. package/web/{chunk-xabcx3ry.js → chunk-nvpp0ghj.js} +3 -3
  147. package/web/chunk-nvt9tkt4.js +1139 -0
  148. package/web/{chunk-dgwkqcz6.js → chunk-p9hfcamx.js} +2 -2
  149. package/web/chunk-ph1dgffm.js +1 -0
  150. package/web/chunk-q34as3v6.js +1 -0
  151. package/web/{chunk-sd3cdqcm.js → chunk-qh62nkem.js} +2 -2
  152. package/web/{chunk-j1bw5v1g.js → chunk-qq6m2my8.js} +2 -2
  153. package/web/{chunk-f93pe4kb.js → chunk-qsqtwf34.js} +4 -4
  154. package/web/{chunk-85gdsmt4.js → chunk-qz6r9v1z.js} +1 -1
  155. package/web/chunk-rad2s9ha.js +1 -0
  156. package/web/{chunk-8nv7q5ac.js → chunk-rasjtvsb.js} +15 -15
  157. package/web/{chunk-s38s9ff9.js → chunk-rayf24gy.js} +28 -28
  158. package/web/{chunk-cn0tmwjs.js → chunk-rrpn5r5w.js} +2 -2
  159. package/web/{chunk-m5y2d4zv.js → chunk-s37beysw.js} +1 -1
  160. package/web/chunk-s60s09mb.js +1 -0
  161. package/web/chunk-sk1wkgjw.js +4 -0
  162. package/web/{chunk-xqyazzm7.js → chunk-spbs56wz.js} +5 -5
  163. package/web/{chunk-h5cfg3vv.js → chunk-t893141g.js} +2 -2
  164. package/web/chunk-tftc5v89.js +24 -0
  165. package/web/chunk-tfvcs2xx.js +1 -0
  166. package/web/{chunk-q1xxs319.js → chunk-ts6jsfdk.js} +4 -4
  167. package/web/{chunk-xsz1dfm2.js → chunk-v1exk5wd.js} +20 -20
  168. package/web/{chunk-3q0v8w45.js → chunk-veam6vk4.js} +79 -79
  169. package/web/{chunk-xb9m0092.js → chunk-vqmj6peg.js} +1 -1
  170. package/web/{chunk-cn1xpg3q.js → chunk-vsjpnwsr.js} +2 -2
  171. package/web/{chunk-et8q775x.js → chunk-w3w18stt.js} +5 -5
  172. package/web/chunk-wdq2tp9e.js +1 -0
  173. package/web/chunk-wkf5xfyr.js +1 -0
  174. package/web/{chunk-fx4mackk.js → chunk-wzd2a4k5.js} +4 -4
  175. package/web/{chunk-jjjtv2r1.js → chunk-xa43ndfj.js} +2 -2
  176. package/web/chunk-xh4xn1az.js +1 -0
  177. package/web/{chunk-2axwda8c.js → chunk-xx11yv61.js} +7 -7
  178. package/web/chunk-xzwxcxb4.js +1 -0
  179. package/web/chunk-y1qty77a.js +1 -0
  180. package/web/{chunk-4anjs6yp.js → chunk-y2rzeb4v.js} +2 -2
  181. package/web/chunk-ys2tns0p.js +1 -0
  182. package/web/chunk-z05x9cbm.js +1 -0
  183. package/web/{chunk-mf6xng5b.js → chunk-zb2bkr7f.js} +2 -2
  184. package/web/{chunk-wj3ymejj.js → chunk-zdyys4ar.js} +3 -3
  185. package/web/chunk-zgavhnt8.js +1 -0
  186. package/web/index.html +1 -1
  187. package/worker.js +1 -1
  188. package/chunk-2gcp3xdc.js +0 -2
  189. package/chunk-320174qe.js +0 -2
  190. package/chunk-dvb5nd2x.js +0 -2
  191. package/chunk-frt9k18g.js +0 -480
  192. package/chunk-ndt6rjt9.js +0 -2
  193. package/chunk-xy2bxwq8.js +0 -2
  194. package/chunk-yzevjkms.js +0 -25
  195. package/chunk-zdyd8hbn.js +0 -2
  196. package/web/chunk-0jfda4jw.js +0 -2
  197. package/web/chunk-2p3fkhy8.js +0 -1
  198. package/web/chunk-3sz5qcwj.js +0 -1
  199. package/web/chunk-433c80pc.js +0 -1
  200. package/web/chunk-48cnmhvd.js +0 -106
  201. package/web/chunk-5r37rwq1.js +0 -4
  202. package/web/chunk-6bwgdvf6.js +0 -1
  203. package/web/chunk-7f1t7z72.js +0 -2
  204. package/web/chunk-7x35g67d.js +0 -78
  205. package/web/chunk-8pzg8qw4.js +0 -1
  206. package/web/chunk-8r0s8tx7.js +0 -1
  207. package/web/chunk-9p5dfvav.js +0 -1
  208. package/web/chunk-9q9w9pay.js +0 -1
  209. package/web/chunk-a3teqvz2.js +0 -39
  210. package/web/chunk-ahztazsg.js +0 -1
  211. package/web/chunk-bd8ftfxn.js +0 -3
  212. package/web/chunk-c03bt2pz.js +0 -1
  213. package/web/chunk-c1ha2xg6.js +0 -8
  214. package/web/chunk-cgng31df.js +0 -1
  215. package/web/chunk-cvd4f51j.js +0 -1
  216. package/web/chunk-cybvxssy.js +0 -1
  217. package/web/chunk-d22wq71s.js +0 -1
  218. package/web/chunk-dynajx8x.js +0 -2
  219. package/web/chunk-f3vv7n52.js +0 -1
  220. package/web/chunk-fpa81dv7.js +0 -62
  221. package/web/chunk-g17n6asp.js +0 -1
  222. package/web/chunk-g9dzaw9e.js +0 -30
  223. package/web/chunk-gcwhx3av.js +0 -1139
  224. package/web/chunk-gf8vm6b5.js +0 -1
  225. package/web/chunk-gnmeyy4h.js +0 -1
  226. package/web/chunk-hn7mhsbg.js +0 -1
  227. package/web/chunk-jfvxxp5c.js +0 -1
  228. package/web/chunk-k8h8zx6r.js +0 -24
  229. package/web/chunk-m3ajw575.js +0 -1
  230. package/web/chunk-mz9b5bsa.js +0 -1
  231. package/web/chunk-np33kmn4.js +0 -1
  232. package/web/chunk-nvk8mazs.js +0 -1
  233. package/web/chunk-nyw5ewgv.js +0 -1
  234. package/web/chunk-p56dcqpr.js +0 -1
  235. package/web/chunk-pdn4r8x4.js +0 -1
  236. package/web/chunk-qpt34d8d.js +0 -1
  237. package/web/chunk-qskt3tqa.js +0 -1
  238. package/web/chunk-qt3n897m.js +0 -4
  239. package/web/chunk-r1rt48h9.js +0 -1
  240. package/web/chunk-r7tgd2fm.js +0 -7
  241. package/web/chunk-rznszqmy.js +0 -1
  242. package/web/chunk-s1pefd34.js +0 -1
  243. package/web/chunk-sc29azev.js +0 -1
  244. package/web/chunk-t4jc4nac.js +0 -1
  245. package/web/chunk-t7g366a5.js +0 -24
  246. package/web/chunk-thbqwq6b.js +0 -1
  247. package/web/chunk-v94v68xg.js +0 -36
  248. package/web/chunk-wcphswcx.js +0 -2
  249. package/web/chunk-wwcnvyjh.css +0 -1
  250. package/web/chunk-xce8n339.js +0 -1
  251. package/web/chunk-xfd3b01q.js +0 -1
  252. package/web/chunk-xtss82z2.js +0 -1
@@ -1,2 +1,2 @@
1
- import{t,a,x,l,M,P,Tt,Et,yo,yt,tn,vo,Hn,Me,bo,Wi,At,Gi,nn,Zn}from"./chunk-3q0v8w45.js";import{re}from"./chunk-33w36n91.js";import{_}from"./chunk-gcwhx3av.js";function ia(e,{edgePathsClass:r="edges edgePaths"}={}){let n=e.insert("g").attr("class","root"),i=n.insert("g").attr("class","clusters"),s=n.insert("g").attr("class",r),o=n.insert("g").attr("class","edgeLabels"),u=n.insert("g").attr("class","nodes");return{clusters:i,edgePaths:s,edgeLabels:o,nodes:u,rootGroups:n}}t(ia,"createLayoutElementGroups");async function L(e,r,n){if(r.label){let{shapeSvg:i,bbox:s}=await P(e,n===void 0?r:{...r,width:n});r.labelBBox={width:s.width,height:s.height},i.remove()}else r.labelBBox={width:0,height:0}}t(L,"measureGroupLabel");async function oa(e,r,n){let i=await Et(e,r,n),s=i.node()?.getBBox()??{width:0,height:0};return r.width=s.width,r.height=s.height,i}t(oa,"insertMeasuredNode");function D(e,r,n){let i=e,s=new Set;while(i){if(i.dir)return i.dir;if(!i.parentId||s.has(i.parentId))break;s.add(i.parentId),i=r.get(i.parentId)}return n}t(D,"resolveNodeDir");async function S(e,r,n={}){let i=new re({multigraph:!0,compound:!0}),s=[...r.edges],o=l(),u=ia(e),{edgeLabels:d,nodes:c}=u,g=new Map,b=new Map(r.nodes.map((f)=>[f.id,f])),E=r.direction,h=e.node()!=null;await Promise.all(r.nodes.map(async(f)=>{if(f.isGroup){if(h){let w=n.unwrapGroupLabels&&f.labelType!=="markdown";await L(c,f,w?Number.POSITIVE_INFINITY:void 0)}i.setNode(f.id,{...f})}else{if(h){let w=await oa(c,f,{config:o,dir:D(f,b,E)});g.set(f.id,w)}i.setNode(f.id,{...f})}}));for(let f of s){if(h&&Wi(f))await At(d,f);if(i.setEdge(f.start,f.end,{...f},f.id),!r.edges.some((v)=>v.id===f.id))r.edges.push(f)}if(globalThis.mermaidCaptureSizes){let{captureNodeSizes:f}=await (_("nky3bqfg"),import("./chunk-nky3bqfg.js"));f(e,r)}return{graph:i,groups:u,nodeElements:g}}t(S,"createGraphWithElements");var W=new Map,m=new Map,k=new Map,U=t(()=>{m.clear(),k.clear(),W.clear()},"clear"),p=t((e,r)=>{let n=m.get(r)||[];return a.trace("In isDescendant",r," ",e," = ",n.includes(e)),n.includes(e)},"isDescendant"),Z=t((e,r)=>{let n=m.get(r)||[];if(a.info("Descendants of ",r," is ",n),a.info("Edge is ",e),e.v===r||e.w===r)return!1;if(!n)return a.debug("Tilt, ",r,",not in descendants"),!1;return n.includes(e.v)||p(e.v,r)||p(e.w,r)||n.includes(e.w)},"edgeInCluster"),R=t((e,r,n,i)=>{a.debug("Copying children of ",e,"root",i,"data",r.node(e),i);let s=r.children(e)||[];if(e!==i)s.push(e);a.debug("Copying (nodes) clusterId",e,"nodes",s),s.forEach((o)=>{if(r.children(o).length>0)R(o,r,n,i);else{let u=r.node(o);if(a.info("cp ",o," to ",i," with parent ",e),n.setNode(o,u),i!==r.parent(o))a.debug("Setting parent",o,r.parent(o)),n.setParent(o,r.parent(o));if(e!==i&&o!==e)a.debug("Setting parent",o,e),n.setParent(o,e);else a.info("In copy ",e,"root",i,"data",r.node(e),i),a.debug("Not Setting parent for node=",o,"cluster!==rootId",e!==i,"node!==clusterId",o!==e);let d=r.edges(o);a.debug("Copying Edges",d),d.forEach((c)=>{a.info("Edge",c);let g=r.edge(c.v,c.w,c.name);a.info("Edge data",g,i);try{if(Z(c,i))a.info("Copying as ",c.v,c.w,g,c.name),n.setEdge(c.v,c.w,g,c.name),a.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]));else a.info("Skipping copy of edge ",c.v,"-->",c.w," rootId: ",i," clusterId:",e)}catch(b){a.error(b)}})}a.debug("Removing node",o),r.removeNode(o)})},"copy"),T=t((e,r)=>{let n=r.children(e),i=[...n];for(let s of n)k.set(s,e),i=[...i,...T(s,r)];return i},"extractDescendants"),I=t((e,r,n)=>{let i=e.edges().filter((c)=>c.v===r||c.w===r),s=e.edges().filter((c)=>c.v===n||c.w===n),o=i.map((c)=>({v:c.v===r?n:c.v,w:c.w===r?r:c.w})),u=s.map((c)=>({v:c.v,w:c.w}));return o.filter((c)=>u.some((g)=>c.v===g.v&&c.w===g.w))},"findCommonEdges"),Bn=t((e,r,n)=>{let i=r.children(e);if(a.trace("Searching children of id ",e,i),i.length<1)return e;let s;for(let o of i){let u=Bn(o,r,n),d=I(r,n,u);if(u)if(d.length>0)s=u;else return u}return s},"findNonClusterChild"),y=t((e)=>{if(!W.has(e))return e;if(!W.get(e).externalConnections)return e;if(W.has(e))return W.get(e).id;return e},"getAnchorId"),eo=t((e,r)=>{if(!e||r>10){a.debug("Opting out, no graph ");return}else a.debug("Opting in, graph ");e.nodes().forEach(function(n){if(e.children(n).length>0)a.debug("Cluster identified",n," Replacement id in edges: ",Bn(n,e,n)),m.set(n,T(n,e)),W.set(n,{id:Bn(n,e,n),clusterData:e.node(n)})}),e.nodes().forEach(function(n){let i=e.children(n),s=e.edges();if(i.length>0)a.debug("Cluster identified",n,m),s.forEach((o)=>{let u=p(o.v,n),d=p(o.w,n);if(u^d)a.debug("Edge: ",o," leaves cluster ",n),a.debug("Descendants of XXX ",n,": ",m.get(n)),W.get(n).externalConnections=!0});else a.debug("Not a cluster ",n,m)});for(let n of W.keys()){let i=W.get(n).id,s=e.parent(i);if(s!==n&&W.has(s)&&!W.get(s).externalConnections)W.get(n).id=s;let o=e.edges().some((u)=>u.v===n);if(i&&W.get(n)?.externalConnections&&o&&X(e,i,n)){let u=ee(e,n,e.parent(i));if(u)W.get(n).id=u}}e.edges().forEach(function(n){let i=e.edge(n);a.debug("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),a.debug("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(e.edge(n)));let{v:s,w:o}=n;if(a.debug("Fix XXX",W,"ids:",n.v,n.w,"Translating: ",W.get(n.v)," --- ",W.get(n.w)),W.get(n.v)||W.get(n.w)){if(a.debug("Fixing and trying - removing XXX",n.v,n.w,n.name),s=y(n.v),o=y(n.w),e.removeEdge(n.v,n.w,n.name),s!==n.v){let u=e.parent(s);W.get(u).externalConnections=!0,i.fromCluster=n.v}if(o!==n.w){let u=e.parent(o);W.get(u).externalConnections=!0,i.toCluster=n.w}a.debug("Fix Replacing with XXX",s,o,n.name),e.setEdge(s,o,i,n.name)}}),B(e,0),a.trace(W)},"adjustClustersAndEdges"),B=t((e,r)=>{if(r>10){a.error("Bailing out");return}let n=e.nodes(),i=!1;for(let s of n){let o=e.children(s);i=i||o.length>0}if(!i){a.debug("Done, no node has children",e.nodes());return}a.debug("Nodes = ",n,r);for(let s of n)if(a.debug("Extracting node",s,W,W.has(s)&&!W.get(s).externalConnections,!e.parent(s),e.node(s),e.children("D")," Depth ",r),!W.has(s))a.debug("Not a cluster",s,r);else if(!W.get(s).externalConnections&&e.children(s)&&e.children(s).length>0){a.debug("Cluster without external connections, without a parent and with children",s,r);let u=e.graph().rankdir==="TB"?"LR":"TB";if(W.get(s)?.clusterData?.dir)u=W.get(s).clusterData.dir,a.debug("Fixing dir",W.get(s).clusterData.dir,u);let d=new re({multigraph:!0,compound:!0}).setGraph({rankdir:u,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});R(s,e,d,s),e.setNode(s,{clusterNode:!0,id:s,clusterData:W.get(s).clusterData,label:W.get(s).label,graph:d})}else a.debug("Cluster ** ",s," **not meeting the criteria !externalConnections:",!W.get(s).externalConnections," no parent: ",!e.parent(s)," children ",e.children(s)&&e.children(s).length>0,e.children("D"),r),a.debug(W);n=e.nodes(),a.debug("New list of nodes",n);for(let s of n){let o=e.node(s);if(a.debug(" Now next level",s,o),o?.clusterNode)B(o.graph,r+1)}},"extractor"),A=t((e,r)=>{if(r.length===0)return[];let n=Object.assign([],r);return r.forEach((i)=>{let s=e.children(i),o=A(e,s);n=[...n,...o]}),n},"sorter"),sa=t((e)=>A(e,e.children()),"sortNodesByHierarchy"),X=t((e,r,n)=>{let i=e.parent(r);while(i&&i!==n){let s=W.get(i);if(s&&!s.externalConnections)return!0;i=e.parent(i)}return!1},"isNodeInExtractableCluster"),ee=t((e,r,n)=>{let i=e.children(r)??[];for(let s of i){if(s===n||p(s,n))continue;let o=Bn(s,e,r);if(!o)continue;if(!X(e,o,r))return o}return null},"findSafeAnchorNode");function lr({prepareLayout:e,measureLayout:r,runLayoutCore:n,paintLayout:i,afterPaint:s,paintOptions:o}){let u=r??O;return t(async function(c,g,b,E){let h=g.select("g");(b?.insertMarkers??Zn)(h,c.markers,c.type,c.diagramId),G();let f={element:h,helpers:b,options:E};f.preparedLayout=await e?.(c,f);let w=await u(c,f),v=await n(c,f),C={...f,measure:w};if(i)await i(c,C,v);else await F(c,C,o);await s?.(c,C,v)},"render")}t(lr,"createCommonLayoutRenderer");function G(){yo(),bo(),vo(),U()}t(G,"clearLayoutRenderState");async function O(e,{element:r},n){return await S(r,e,n)}t(O,"defaultMeasureLayout");async function F(e,r,n={}){let{measure:i}=r,{groups:s}=i;for(let u of n.getNodes?.(e,r)??e.nodes){if(n.skipNode?.(u,r))continue;await j(s,u,r,n)}let o=z(e.nodes);for(let u of e.edges){if(J(u,n))continue;await V(s,u,o,e,n,r)}}t(F,"paintLayoutData");async function j(e,r,n,i){if(r.clusterNode)yt(r);else if(H(r,n,i))await tn(e.clusters,r);else yt(r)}t(j,"paintLayoutNode");function H(e,r,n){return e.isGroup===!0&&(n.isCluster?.(e,r)??!0)}t(H,"shouldPaintAsCluster");function z(e){let r=new Map;for(let n of e)if(n?.id)r.set(n.id,n);return r}t(z,"buildNodeLookup");function J(e,r){return e.isLayoutOnly||Boolean(r.skipEdge?.(e))}t(J,"shouldSkipPaintEdge");async function V(e,r,n,i,s,o){let u=nn(e.edgePaths,{...r},s.clusterDb??new Map,i.type,N(r.start,r,n,o,s),N(r.end,r,n,o,s),i.diagramId,Y(r,s),i.layoutAlgorithm);if(Wi(r)){if(!Hn.has(r.id))await At(e.edgeLabels,r);q(r,u)}}t(V,"paintLayoutEdge");function N(e,r,n,i,s){return s.getEdgeNode?.(e,r,i)??(e?n.get(e)??{}:{})}t(N,"getRenderedNode");function Y(e,r){return typeof r.skipIntersect==="function"?r.skipIntersect(e):r.skipIntersect??!1}t(Y,"shouldSkipIntersect");function q(e,r){let n=r?.updatedPath??r?.originalPath,i=x(),{subGraphTitleTotalMargin:s}=Tt({flowchart:i.flowchart??{}});if(e.label){let o=Hn.get(e.id),{x:u,y:d}=Gi(e,r);o.attr("transform",`translate(${u}, ${d+s/2})`)}for(let[o,u]of[["startLeft",e.startLabelLeft],["startRight",e.startLabelRight],["endLeft",e.endLabelLeft],["endRight",e.endLabelRight]])if(u){let{x:d,y:c}=K(e,o,n);Me.get(e.id)[o].attr("transform",`translate(${d}, ${c})`)}}t(q,"positionRenderedEdgeLabel");var te={startLeft:"start_left",startRight:"start_right",endLeft:"end_left",endRight:"end_right"};function K(e,r,n){let i=e.terminalLabelCenters?.[r];if(i)return{...i};if(!n)return{x:e.x,y:e.y};let s=r.startsWith("start")?e.arrowTypeStart:e.arrowTypeEnd;return M.calcTerminalLabelPosition(s?10:0,te[r],n)}t(K,"terminalLabelTranslate");
2
- export{ia,oa,W,Bn,eo,sa,lr};
1
+ import{t,a,x,l,M,P,Tt,Et,Co,yt,en,So,Hn,Me,To,Qi,At,Ji,tn,Zn}from"./chunk-veam6vk4.js";import{re}from"./chunk-kcjz03h5.js";import{_}from"./chunk-nvt9tkt4.js";function pa(e,{edgePathsClass:r="edges edgePaths"}={}){let n=e.insert("g").attr("class","root"),i=n.insert("g").attr("class","clusters"),s=n.insert("g").attr("class",r),o=n.insert("g").attr("class","edgeLabels"),u=n.insert("g").attr("class","nodes");return{clusters:i,edgePaths:s,edgeLabels:o,nodes:u,rootGroups:n}}t(pa,"createLayoutElementGroups");async function L(e,r,n){if(r.label){let{shapeSvg:i,bbox:s}=await P(e,n===void 0?r:{...r,width:n});r.labelBBox={width:s.width,height:s.height},i.remove()}else r.labelBBox={width:0,height:0}}t(L,"measureGroupLabel");async function ma(e,r,n){let i=await Et(e,r,n),s=i.node()?.getBBox()??{width:0,height:0};return r.width=s.width,r.height=s.height,i}t(ma,"insertMeasuredNode");function D(e,r,n){let i=e,s=new Set;while(i){if(i.dir)return i.dir;if(!i.parentId||s.has(i.parentId))break;s.add(i.parentId),i=r.get(i.parentId)}return n}t(D,"resolveNodeDir");async function S(e,r,n={}){let i=new re({multigraph:!0,compound:!0}),s=[...r.edges],o=l(),u=pa(e),{edgeLabels:d,nodes:c}=u,g=new Map,b=new Map(r.nodes.map((f)=>[f.id,f])),E=r.direction,h=e.node()!=null;await Promise.all(r.nodes.map(async(f)=>{if(f.isGroup){if(h){let w=n.unwrapGroupLabels&&f.labelType!=="markdown";await L(c,f,w?Number.POSITIVE_INFINITY:void 0)}i.setNode(f.id,{...f})}else{if(h){let w=await ma(c,f,{config:o,dir:D(f,b,E)});g.set(f.id,w)}i.setNode(f.id,{...f})}}));for(let f of s){if(h&&Qi(f))await At(d,f);if(i.setEdge(f.start,f.end,{...f},f.id),!r.edges.some((v)=>v.id===f.id))r.edges.push(f)}if(globalThis.mermaidCaptureSizes){let{captureNodeSizes:f}=await (_("4a6gdrbs"),import("./chunk-4a6gdrbs.js"));f(e,r)}return{graph:i,groups:u,nodeElements:g}}t(S,"createGraphWithElements");var W=new Map,m=new Map,k=new Map,U=t(()=>{m.clear(),k.clear(),W.clear()},"clear"),p=t((e,r)=>{let n=m.get(r)||[];return a.trace("In isDescendant",r," ",e," = ",n.includes(e)),n.includes(e)},"isDescendant"),Z=t((e,r)=>{let n=m.get(r)||[];if(a.info("Descendants of ",r," is ",n),a.info("Edge is ",e),e.v===r||e.w===r)return!1;if(!n)return a.debug("Tilt, ",r,",not in descendants"),!1;return n.includes(e.v)||p(e.v,r)||p(e.w,r)||n.includes(e.w)},"edgeInCluster"),R=t((e,r,n,i)=>{a.debug("Copying children of ",e,"root",i,"data",r.node(e),i);let s=r.children(e)||[];if(e!==i)s.push(e);a.debug("Copying (nodes) clusterId",e,"nodes",s),s.forEach((o)=>{if(r.children(o).length>0)R(o,r,n,i);else{let u=r.node(o);if(a.info("cp ",o," to ",i," with parent ",e),n.setNode(o,u),i!==r.parent(o))a.debug("Setting parent",o,r.parent(o)),n.setParent(o,r.parent(o));if(e!==i&&o!==e)a.debug("Setting parent",o,e),n.setParent(o,e);else a.info("In copy ",e,"root",i,"data",r.node(e),i),a.debug("Not Setting parent for node=",o,"cluster!==rootId",e!==i,"node!==clusterId",o!==e);let d=r.edges(o);a.debug("Copying Edges",d),d.forEach((c)=>{a.info("Edge",c);let g=r.edge(c.v,c.w,c.name);a.info("Edge data",g,i);try{if(Z(c,i))a.info("Copying as ",c.v,c.w,g,c.name),n.setEdge(c.v,c.w,g,c.name),a.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]));else a.info("Skipping copy of edge ",c.v,"-->",c.w," rootId: ",i," clusterId:",e)}catch(b){a.error(b)}})}a.debug("Removing node",o),r.removeNode(o)})},"copy"),T=t((e,r)=>{let n=r.children(e),i=[...n];for(let s of n)k.set(s,e),i=[...i,...T(s,r)];return i},"extractDescendants"),I=t((e,r,n)=>{let i=e.edges().filter((c)=>c.v===r||c.w===r),s=e.edges().filter((c)=>c.v===n||c.w===n),o=i.map((c)=>({v:c.v===r?n:c.v,w:c.w===r?r:c.w})),u=s.map((c)=>({v:c.v,w:c.w}));return o.filter((c)=>u.some((g)=>c.v===g.v&&c.w===g.w))},"findCommonEdges"),Bn=t((e,r,n)=>{let i=r.children(e);if(a.trace("Searching children of id ",e,i),i.length<1)return e;let s;for(let o of i){let u=Bn(o,r,n),d=I(r,n,u);if(u)if(d.length>0)s=u;else return u}return s},"findNonClusterChild"),y=t((e)=>{if(!W.has(e))return e;if(!W.get(e).externalConnections)return e;if(W.has(e))return W.get(e).id;return e},"getAnchorId"),so=t((e,r)=>{if(!e||r>10){a.debug("Opting out, no graph ");return}else a.debug("Opting in, graph ");e.nodes().forEach(function(n){if(e.children(n).length>0)a.debug("Cluster identified",n," Replacement id in edges: ",Bn(n,e,n)),m.set(n,T(n,e)),W.set(n,{id:Bn(n,e,n),clusterData:e.node(n)})}),e.nodes().forEach(function(n){let i=e.children(n),s=e.edges();if(i.length>0)a.debug("Cluster identified",n,m),s.forEach((o)=>{let u=p(o.v,n),d=p(o.w,n);if(u^d)a.debug("Edge: ",o," leaves cluster ",n),a.debug("Descendants of XXX ",n,": ",m.get(n)),W.get(n).externalConnections=!0});else a.debug("Not a cluster ",n,m)});for(let n of W.keys()){let i=W.get(n).id,s=e.parent(i);if(s!==n&&W.has(s)&&!W.get(s).externalConnections)W.get(n).id=s;let o=e.edges().some((u)=>u.v===n);if(i&&W.get(n)?.externalConnections&&o&&X(e,i,n)){let u=ee(e,n,e.parent(i));if(u)W.get(n).id=u}}e.edges().forEach(function(n){let i=e.edge(n);a.debug("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),a.debug("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(e.edge(n)));let{v:s,w:o}=n;if(a.debug("Fix XXX",W,"ids:",n.v,n.w,"Translating: ",W.get(n.v)," --- ",W.get(n.w)),W.get(n.v)||W.get(n.w)){if(a.debug("Fixing and trying - removing XXX",n.v,n.w,n.name),s=y(n.v),o=y(n.w),e.removeEdge(n.v,n.w,n.name),s!==n.v){let u=e.parent(s);W.get(u).externalConnections=!0,i.fromCluster=n.v}if(o!==n.w){let u=e.parent(o);W.get(u).externalConnections=!0,i.toCluster=n.w}a.debug("Fix Replacing with XXX",s,o,n.name),e.setEdge(s,o,i,n.name)}}),B(e,0),a.trace(W)},"adjustClustersAndEdges"),B=t((e,r)=>{if(r>10){a.error("Bailing out");return}let n=e.nodes(),i=!1;for(let s of n){let o=e.children(s);i=i||o.length>0}if(!i){a.debug("Done, no node has children",e.nodes());return}a.debug("Nodes = ",n,r);for(let s of n)if(a.debug("Extracting node",s,W,W.has(s)&&!W.get(s).externalConnections,!e.parent(s),e.node(s),e.children("D")," Depth ",r),!W.has(s))a.debug("Not a cluster",s,r);else if(!W.get(s).externalConnections&&e.children(s)&&e.children(s).length>0){a.debug("Cluster without external connections, without a parent and with children",s,r);let u=e.graph().rankdir==="TB"?"LR":"TB";if(W.get(s)?.clusterData?.dir)u=W.get(s).clusterData.dir,a.debug("Fixing dir",W.get(s).clusterData.dir,u);let d=new re({multigraph:!0,compound:!0}).setGraph({rankdir:u,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});R(s,e,d,s),e.setNode(s,{clusterNode:!0,id:s,clusterData:W.get(s).clusterData,label:W.get(s).label,graph:d})}else a.debug("Cluster ** ",s," **not meeting the criteria !externalConnections:",!W.get(s).externalConnections," no parent: ",!e.parent(s)," children ",e.children(s)&&e.children(s).length>0,e.children("D"),r),a.debug(W);n=e.nodes(),a.debug("New list of nodes",n);for(let s of n){let o=e.node(s);if(a.debug(" Now next level",s,o),o?.clusterNode)B(o.graph,r+1)}},"extractor"),A=t((e,r)=>{if(r.length===0)return[];let n=Object.assign([],r);return r.forEach((i)=>{let s=e.children(i),o=A(e,s);n=[...n,...o]}),n},"sorter"),fa=t((e)=>A(e,e.children()),"sortNodesByHierarchy"),X=t((e,r,n)=>{let i=e.parent(r);while(i&&i!==n){let s=W.get(i);if(s&&!s.externalConnections)return!0;i=e.parent(i)}return!1},"isNodeInExtractableCluster"),ee=t((e,r,n)=>{let i=e.children(r)??[];for(let s of i){if(s===n||p(s,n))continue;let o=Bn(s,e,r);if(!o)continue;if(!X(e,o,r))return o}return null},"findSafeAnchorNode");function lr({prepareLayout:e,measureLayout:r,runLayoutCore:n,paintLayout:i,afterPaint:s,paintOptions:o}){let u=r??O;return t(async function(c,g,b,E){let h=g.select("g");(b?.insertMarkers??Zn)(h,c.markers,c.type,c.diagramId),G();let f={element:h,helpers:b,options:E};f.preparedLayout=await e?.(c,f);let w=await u(c,f),v=await n(c,f),C={...f,measure:w};if(i)await i(c,C,v);else await F(c,C,o);await s?.(c,C,v)},"render")}t(lr,"createCommonLayoutRenderer");function G(){Co(),To(),So(),U()}t(G,"clearLayoutRenderState");async function O(e,{element:r},n){return await S(r,e,n)}t(O,"defaultMeasureLayout");async function F(e,r,n={}){let{measure:i}=r,{groups:s}=i;for(let u of n.getNodes?.(e,r)??e.nodes){if(n.skipNode?.(u,r))continue;await j(s,u,r,n)}let o=z(e.nodes);for(let u of e.edges){if(J(u,n))continue;await V(s,u,o,e,n,r)}}t(F,"paintLayoutData");async function j(e,r,n,i){if(r.clusterNode)yt(r);else if(H(r,n,i))await en(e.clusters,r);else yt(r)}t(j,"paintLayoutNode");function H(e,r,n){return e.isGroup===!0&&(n.isCluster?.(e,r)??!0)}t(H,"shouldPaintAsCluster");function z(e){let r=new Map;for(let n of e)if(n?.id)r.set(n.id,n);return r}t(z,"buildNodeLookup");function J(e,r){return e.isLayoutOnly||Boolean(r.skipEdge?.(e))}t(J,"shouldSkipPaintEdge");async function V(e,r,n,i,s,o){let u=tn(e.edgePaths,{...r},s.clusterDb??new Map,i.type,N(r.start,r,n,o,s),N(r.end,r,n,o,s),i.diagramId,Y(r,s),i.layoutAlgorithm);if(Qi(r)){if(!Hn.has(r.id))await At(e.edgeLabels,r);q(r,u)}}t(V,"paintLayoutEdge");function N(e,r,n,i,s){return s.getEdgeNode?.(e,r,i)??(e?n.get(e)??{}:{})}t(N,"getRenderedNode");function Y(e,r){return typeof r.skipIntersect==="function"?r.skipIntersect(e):r.skipIntersect??!1}t(Y,"shouldSkipIntersect");function q(e,r){let n=r?.updatedPath??r?.originalPath,i=x(),{subGraphTitleTotalMargin:s}=Tt({flowchart:i.flowchart??{}});if(e.label){let o=Hn.get(e.id),{x:u,y:d}=Ji(e,r);o.attr("transform",`translate(${u}, ${d+s/2})`)}for(let[o,u]of[["startLeft",e.startLabelLeft],["startRight",e.startLabelRight],["endLeft",e.endLabelLeft],["endRight",e.endLabelRight]])if(u){let{x:d,y:c}=K(e,o,n);Me.get(e.id)[o].attr("transform",`translate(${d}, ${c})`)}}t(q,"positionRenderedEdgeLabel");var te={startLeft:"start_left",startRight:"start_right",endLeft:"end_left",endRight:"end_right"};function K(e,r,n){let i=e.terminalLabelCenters?.[r];if(i)return{...i};if(!n)return{x:e.x,y:e.y};let s=r.startsWith("start")?e.arrowTypeStart:e.arrowTypeEnd;return M.calcTerminalLabelPosition(s?10:0,te[r],n)}t(K,"terminalLabelTranslate");
2
+ export{pa,ma,W,Bn,so,fa,lr};
@@ -1,6 +1,6 @@
1
- import{t,Qt,a,x,C,S,E,T,A,L,R,l,M,pe,se,le,gt,ye,ve}from"./chunk-3q0v8w45.js";import{ge}from"./chunk-cn0tmwjs.js";import{ue}from"./chunk-svh2gkx8.js";var He=function(){var e=t(function(X,n,o,h){for(o=o||{},h=X.length;h--;o[X[h]]=n);return o},"o"),d=[1,3],f=[1,4],m=[1,5],r=[1,6],u=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],I=[1,22],v=[2,7],b=[1,26],N=[1,27],q=[1,28],F=[1,29],P=[1,33],U=[1,34],Y=[1,35],B=[1,36],Q=[1,37],H=[1,38],K=[1,24],W=[1,31],j=[1,32],G=[1,30],g=[1,39],y=[1,40],k=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],J=[1,61],me=[89,90],Ke=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],xe=[27,29],We=[1,70],je=[1,71],Ge=[1,72],ze=[1,73],Xe=[1,74],Je=[1,75],Ze=[1,76],de=[1,83],Z=[1,80],Ee=[1,84],be=[1,85],Re=[1,86],ke=[1,87],_e=[1,88],Se=[1,89],Ie=[1,90],Te=[1,91],Ne=[1,92],we=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],ee=[63,64],et=[1,101],tt=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],w=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],te=[1,110],ie=[1,106],re=[1,107],ne=[1,108],ae=[1,109],oe=[1,111],qe=[1,116],Ce=[1,117],Ae=[1,114],Ve=[1,115],$e={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:t(function(n,o,h,i,p,s,Le){var c=s.length-1;switch(p){case 4:this.$=s[c].trim(),i.setAccTitle(this.$);break;case 5:case 6:this.$=s[c].trim(),i.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:i.setDirection("TB");break;case 18:i.setDirection("BT");break;case 19:i.setDirection("RL");break;case 20:i.setDirection("LR");break;case 21:i.addRequirement(s[c-3],s[c-4]);break;case 22:i.addRequirement(s[c-5],s[c-6]),i.setClass([s[c-5]],s[c-3]);break;case 23:i.setNewReqId(s[c-2]);break;case 24:i.setNewReqText(s[c-2]);break;case 25:i.setNewReqRisk(s[c-2]);break;case 26:i.setNewReqVerifyMethod(s[c-2]);break;case 29:this.$=i.RequirementType.REQUIREMENT;break;case 30:this.$=i.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=i.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=i.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=i.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=i.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=i.RiskLevel.LOW_RISK;break;case 36:this.$=i.RiskLevel.MED_RISK;break;case 37:this.$=i.RiskLevel.HIGH_RISK;break;case 38:this.$=i.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=i.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=i.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=i.VerifyType.VERIFY_TEST;break;case 42:i.addElement(s[c-3]);break;case 43:i.addElement(s[c-5]),i.setClass([s[c-5]],s[c-3]);break;case 44:i.setNewElementType(s[c-2]);break;case 45:i.setNewElementDocRef(s[c-2]);break;case 48:i.addRelationship(s[c-2],s[c],s[c-4]);break;case 49:i.addRelationship(s[c-2],s[c-4],s[c]);break;case 50:this.$=i.Relationships.CONTAINS;break;case 51:this.$=i.Relationships.COPIES;break;case 52:this.$=i.Relationships.DERIVES;break;case 53:this.$=i.Relationships.SATISFIES;break;case 54:this.$=i.Relationships.VERIFIES;break;case 55:this.$=i.Relationships.REFINES;break;case 56:this.$=i.Relationships.TRACES;break;case 57:this.$=s[c-2],i.defineClass(s[c-1],s[c]);break;case 58:i.setClass(s[c-1],s[c]);break;case 59:i.setClass([s[c-2]],s[c]);break;case 60:case 62:this.$=[s[c]];break;case 61:case 63:this.$=s[c-2].concat([s[c]]);break;case 64:this.$=s[c-2],i.setCssStyle(s[c-1],s[c]);break;case 65:this.$=[s[c]];break;case 66:s[c-2].push(s[c]),this.$=s[c-2];break;case 68:this.$=s[c-1]+s[c];break}},"anonymous"),table:[{3:1,4:2,6:d,9:f,11:m,13:r},{1:[3]},{3:8,4:2,5:[1,7],6:d,9:f,11:m,13:r},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(u,[2,6]),{3:12,4:2,6:d,9:f,11:m,13:r},{1:[2,2]},{4:17,5:I,7:13,8:v,9:f,11:m,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:b,22:N,23:q,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},e(u,[2,4]),e(u,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:I,7:42,8:v,9:f,11:m,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:b,22:N,23:q,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:I,7:43,8:v,9:f,11:m,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:b,22:N,23:q,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:I,7:44,8:v,9:f,11:m,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:b,22:N,23:q,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:I,7:45,8:v,9:f,11:m,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:b,22:N,23:q,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:I,7:46,8:v,9:f,11:m,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:b,22:N,23:q,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:I,7:47,8:v,9:f,11:m,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:b,22:N,23:q,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:I,7:48,8:v,9:f,11:m,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:b,22:N,23:q,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:I,7:49,8:v,9:f,11:m,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:b,22:N,23:q,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:I,7:50,8:v,9:f,11:m,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:b,22:N,23:q,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(k,[2,17]),e(k,[2,18]),e(k,[2,19]),e(k,[2,20]),{30:60,33:62,75:J,89:g,90:y},{30:63,33:62,75:J,89:g,90:y},{30:64,33:62,75:J,89:g,90:y},e(me,[2,29]),e(me,[2,30]),e(me,[2,31]),e(me,[2,32]),e(me,[2,33]),e(me,[2,34]),e(Ke,[2,81]),e(Ke,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(xe,[2,79]),e(xe,[2,80]),{27:[1,67],29:[1,68]},e(xe,[2,85]),e(xe,[2,86]),{62:69,65:We,66:je,67:Ge,68:ze,69:Xe,70:Je,71:Ze},{62:77,65:We,66:je,67:Ge,68:ze,69:Xe,70:Je,71:Ze},{30:78,33:62,75:J,89:g,90:y},{73:79,75:de,76:Z,78:81,79:82,80:Ee,81:be,82:Re,83:ke,84:_e,85:Se,86:Ie,87:Te,88:Ne},e(we,[2,60]),e(we,[2,62]),{73:93,75:de,76:Z,78:81,79:82,80:Ee,81:be,82:Re,83:ke,84:_e,85:Se,86:Ie,87:Te,88:Ne},{30:94,33:62,75:J,76:Z,89:g,90:y},{5:[1,95]},{30:96,33:62,75:J,89:g,90:y},{5:[1,97]},{30:98,33:62,75:J,89:g,90:y},{63:[1,99]},e(ee,[2,50]),e(ee,[2,51]),e(ee,[2,52]),e(ee,[2,53]),e(ee,[2,54]),e(ee,[2,55]),e(ee,[2,56]),{64:[1,100]},e(k,[2,59],{76:Z}),e(k,[2,64],{76:et}),{33:103,75:[1,102],89:g,90:y},e(tt,[2,65],{79:104,75:de,80:Ee,81:be,82:Re,83:ke,84:_e,85:Se,86:Ie,87:Te,88:Ne}),e(w,[2,67]),e(w,[2,69]),e(w,[2,70]),e(w,[2,71]),e(w,[2,72]),e(w,[2,73]),e(w,[2,74]),e(w,[2,75]),e(w,[2,76]),e(w,[2,77]),e(w,[2,78]),e(k,[2,57],{76:et}),e(k,[2,58],{76:Z}),{5:te,28:105,31:ie,34:re,36:ne,38:ae,40:oe},{27:[1,112],76:Z},{5:qe,40:Ce,56:113,57:Ae,59:Ve},{27:[1,118],76:Z},{33:119,89:g,90:y},{33:120,89:g,90:y},{75:de,78:121,79:82,80:Ee,81:be,82:Re,83:ke,84:_e,85:Se,86:Ie,87:Te,88:Ne},e(we,[2,61]),e(we,[2,63]),e(w,[2,68]),e(k,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:te,28:126,31:ie,34:re,36:ne,38:ae,40:oe},e(k,[2,28]),{5:[1,127]},e(k,[2,42]),{32:[1,128]},{32:[1,129]},{5:qe,40:Ce,56:130,57:Ae,59:Ve},e(k,[2,47]),{5:[1,131]},e(k,[2,48]),e(k,[2,49]),e(tt,[2,66],{79:104,75:de,80:Ee,81:be,82:Re,83:ke,84:_e,85:Se,86:Ie,87:Te,88:Ne}),{33:132,89:g,90:y},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(k,[2,27]),{5:te,28:145,31:ie,34:re,36:ne,38:ae,40:oe},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(k,[2,46]),{5:qe,40:Ce,56:152,57:Ae,59:Ve},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(k,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(k,[2,43]),{5:te,28:159,31:ie,34:re,36:ne,38:ae,40:oe},{5:te,28:160,31:ie,34:re,36:ne,38:ae,40:oe},{5:te,28:161,31:ie,34:re,36:ne,38:ae,40:oe},{5:te,28:162,31:ie,34:re,36:ne,38:ae,40:oe},{5:qe,40:Ce,56:163,57:Ae,59:Ve},{5:qe,40:Ce,56:164,57:Ae,59:Ve},e(k,[2,23]),e(k,[2,24]),e(k,[2,25]),e(k,[2,26]),e(k,[2,44]),e(k,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:t(function(n,o){if(o.recoverable)this.trace(n);else{var h=Error(n);throw h.hash=o,h}},"parseError"),parse:t(function(n){var o=this,h=[0],i=[],p=[null],s=[],Le=this.table,c="",Oe=0,st=0,it=0,ct=2,rt=1,ht=s.slice.call(arguments,1),_=Object.create(this.lexer),ce={yy:{}};for(var Pe in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,Pe))ce.yy[Pe]=this.yy[Pe];if(_.setInput(n,ce.yy),ce.yy.lexer=_,ce.yy.parser=this,typeof _.yylloc>"u")_.yylloc={};var Ue=_.yylloc;s.push(Ue);var ut=_.options&&_.options.ranges;if(typeof ce.yy.parseError==="function")this.parseError=ce.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function mt(O){h.length=h.length-2*O,p.length=p.length-O,s.length=s.length-O}t(mt,"popStack");function nt(){var O=i.pop()||_.lex()||rt;if(typeof O!=="number"){if(O instanceof Array)i=O,O=i.pop();O=o.symbols_[O]||O}return O}t(nt,"lex");var V,Ye,he,D,kt,Be,fe={},Me,z,at,Fe;while(!0){if(he=h[h.length-1],this.defaultActions[he])D=this.defaultActions[he];else{if(V===null||typeof V>"u")V=nt();D=Le[he]&&Le[he][V]}if(typeof D>"u"||!D.length||!D[0]){var Qe="";Fe=[];for(Me in Le[he])if(this.terminals_[Me]&&Me>ct)Fe.push("'"+this.terminals_[Me]+"'");if(_.showPosition)Qe="Parse error on line "+(Oe+1)+`:
1
+ import{t,Kt,a,x,C,S,E,T,A,L,R,l,M,pe,se,le,gt,ge,ye}from"./chunk-veam6vk4.js";import{he}from"./chunk-rrpn5r5w.js";import{ue}from"./chunk-7qkav30b.js";var He=function(){var e=t(function(X,n,o,h){for(o=o||{},h=X.length;h--;o[X[h]]=n);return o},"o"),d=[1,3],f=[1,4],m=[1,5],r=[1,6],u=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],I=[1,22],v=[2,7],b=[1,26],N=[1,27],q=[1,28],F=[1,29],P=[1,33],U=[1,34],Y=[1,35],B=[1,36],Q=[1,37],H=[1,38],K=[1,24],W=[1,31],j=[1,32],G=[1,30],g=[1,39],y=[1,40],k=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],J=[1,61],fe=[89,90],Ke=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],xe=[27,29],We=[1,70],je=[1,71],Ge=[1,72],ze=[1,73],Xe=[1,74],Je=[1,75],Ze=[1,76],Ee=[1,83],Z=[1,80],be=[1,84],Re=[1,85],ke=[1,86],_e=[1,87],Se=[1,88],Ie=[1,89],Te=[1,90],Ne=[1,91],qe=[1,92],we=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],ee=[63,64],et=[1,101],tt=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],w=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],te=[1,110],ie=[1,106],re=[1,107],ne=[1,108],ae=[1,109],oe=[1,111],Ce=[1,116],Ae=[1,117],Ve=[1,114],ve=[1,115],$e={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:t(function(n,o,h,i,p,s,Le){var c=s.length-1;switch(p){case 4:this.$=s[c].trim(),i.setAccTitle(this.$);break;case 5:case 6:this.$=s[c].trim(),i.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:i.setDirection("TB");break;case 18:i.setDirection("BT");break;case 19:i.setDirection("RL");break;case 20:i.setDirection("LR");break;case 21:i.addRequirement(s[c-3],s[c-4]);break;case 22:i.addRequirement(s[c-5],s[c-6]),i.setClass([s[c-5]],s[c-3]);break;case 23:i.setNewReqId(s[c-2]);break;case 24:i.setNewReqText(s[c-2]);break;case 25:i.setNewReqRisk(s[c-2]);break;case 26:i.setNewReqVerifyMethod(s[c-2]);break;case 29:this.$=i.RequirementType.REQUIREMENT;break;case 30:this.$=i.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=i.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=i.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=i.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=i.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=i.RiskLevel.LOW_RISK;break;case 36:this.$=i.RiskLevel.MED_RISK;break;case 37:this.$=i.RiskLevel.HIGH_RISK;break;case 38:this.$=i.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=i.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=i.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=i.VerifyType.VERIFY_TEST;break;case 42:i.addElement(s[c-3]);break;case 43:i.addElement(s[c-5]),i.setClass([s[c-5]],s[c-3]);break;case 44:i.setNewElementType(s[c-2]);break;case 45:i.setNewElementDocRef(s[c-2]);break;case 48:i.addRelationship(s[c-2],s[c],s[c-4]);break;case 49:i.addRelationship(s[c-2],s[c-4],s[c]);break;case 50:this.$=i.Relationships.CONTAINS;break;case 51:this.$=i.Relationships.COPIES;break;case 52:this.$=i.Relationships.DERIVES;break;case 53:this.$=i.Relationships.SATISFIES;break;case 54:this.$=i.Relationships.VERIFIES;break;case 55:this.$=i.Relationships.REFINES;break;case 56:this.$=i.Relationships.TRACES;break;case 57:this.$=s[c-2],i.defineClass(s[c-1],s[c]);break;case 58:i.setClass(s[c-1],s[c]);break;case 59:i.setClass([s[c-2]],s[c]);break;case 60:case 62:this.$=[s[c]];break;case 61:case 63:this.$=s[c-2].concat([s[c]]);break;case 64:this.$=s[c-2],i.setCssStyle(s[c-1],s[c]);break;case 65:this.$=[s[c]];break;case 66:s[c-2].push(s[c]),this.$=s[c-2];break;case 68:this.$=s[c-1]+s[c];break}},"anonymous"),table:[{3:1,4:2,6:d,9:f,11:m,13:r},{1:[3]},{3:8,4:2,5:[1,7],6:d,9:f,11:m,13:r},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(u,[2,6]),{3:12,4:2,6:d,9:f,11:m,13:r},{1:[2,2]},{4:17,5:I,7:13,8:v,9:f,11:m,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:b,22:N,23:q,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},e(u,[2,4]),e(u,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:I,7:42,8:v,9:f,11:m,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:b,22:N,23:q,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:I,7:43,8:v,9:f,11:m,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:b,22:N,23:q,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:I,7:44,8:v,9:f,11:m,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:b,22:N,23:q,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:I,7:45,8:v,9:f,11:m,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:b,22:N,23:q,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:I,7:46,8:v,9:f,11:m,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:b,22:N,23:q,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:I,7:47,8:v,9:f,11:m,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:b,22:N,23:q,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:I,7:48,8:v,9:f,11:m,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:b,22:N,23:q,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:I,7:49,8:v,9:f,11:m,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:b,22:N,23:q,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:I,7:50,8:v,9:f,11:m,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:b,22:N,23:q,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(k,[2,17]),e(k,[2,18]),e(k,[2,19]),e(k,[2,20]),{30:60,33:62,75:J,89:g,90:y},{30:63,33:62,75:J,89:g,90:y},{30:64,33:62,75:J,89:g,90:y},e(fe,[2,29]),e(fe,[2,30]),e(fe,[2,31]),e(fe,[2,32]),e(fe,[2,33]),e(fe,[2,34]),e(Ke,[2,81]),e(Ke,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(xe,[2,79]),e(xe,[2,80]),{27:[1,67],29:[1,68]},e(xe,[2,85]),e(xe,[2,86]),{62:69,65:We,66:je,67:Ge,68:ze,69:Xe,70:Je,71:Ze},{62:77,65:We,66:je,67:Ge,68:ze,69:Xe,70:Je,71:Ze},{30:78,33:62,75:J,89:g,90:y},{73:79,75:Ee,76:Z,78:81,79:82,80:be,81:Re,82:ke,83:_e,84:Se,85:Ie,86:Te,87:Ne,88:qe},e(we,[2,60]),e(we,[2,62]),{73:93,75:Ee,76:Z,78:81,79:82,80:be,81:Re,82:ke,83:_e,84:Se,85:Ie,86:Te,87:Ne,88:qe},{30:94,33:62,75:J,76:Z,89:g,90:y},{5:[1,95]},{30:96,33:62,75:J,89:g,90:y},{5:[1,97]},{30:98,33:62,75:J,89:g,90:y},{63:[1,99]},e(ee,[2,50]),e(ee,[2,51]),e(ee,[2,52]),e(ee,[2,53]),e(ee,[2,54]),e(ee,[2,55]),e(ee,[2,56]),{64:[1,100]},e(k,[2,59],{76:Z}),e(k,[2,64],{76:et}),{33:103,75:[1,102],89:g,90:y},e(tt,[2,65],{79:104,75:Ee,80:be,81:Re,82:ke,83:_e,84:Se,85:Ie,86:Te,87:Ne,88:qe}),e(w,[2,67]),e(w,[2,69]),e(w,[2,70]),e(w,[2,71]),e(w,[2,72]),e(w,[2,73]),e(w,[2,74]),e(w,[2,75]),e(w,[2,76]),e(w,[2,77]),e(w,[2,78]),e(k,[2,57],{76:et}),e(k,[2,58],{76:Z}),{5:te,28:105,31:ie,34:re,36:ne,38:ae,40:oe},{27:[1,112],76:Z},{5:Ce,40:Ae,56:113,57:Ve,59:ve},{27:[1,118],76:Z},{33:119,89:g,90:y},{33:120,89:g,90:y},{75:Ee,78:121,79:82,80:be,81:Re,82:ke,83:_e,84:Se,85:Ie,86:Te,87:Ne,88:qe},e(we,[2,61]),e(we,[2,63]),e(w,[2,68]),e(k,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:te,28:126,31:ie,34:re,36:ne,38:ae,40:oe},e(k,[2,28]),{5:[1,127]},e(k,[2,42]),{32:[1,128]},{32:[1,129]},{5:Ce,40:Ae,56:130,57:Ve,59:ve},e(k,[2,47]),{5:[1,131]},e(k,[2,48]),e(k,[2,49]),e(tt,[2,66],{79:104,75:Ee,80:be,81:Re,82:ke,83:_e,84:Se,85:Ie,86:Te,87:Ne,88:qe}),{33:132,89:g,90:y},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(k,[2,27]),{5:te,28:145,31:ie,34:re,36:ne,38:ae,40:oe},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(k,[2,46]),{5:Ce,40:Ae,56:152,57:Ve,59:ve},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(k,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(k,[2,43]),{5:te,28:159,31:ie,34:re,36:ne,38:ae,40:oe},{5:te,28:160,31:ie,34:re,36:ne,38:ae,40:oe},{5:te,28:161,31:ie,34:re,36:ne,38:ae,40:oe},{5:te,28:162,31:ie,34:re,36:ne,38:ae,40:oe},{5:Ce,40:Ae,56:163,57:Ve,59:ve},{5:Ce,40:Ae,56:164,57:Ve,59:ve},e(k,[2,23]),e(k,[2,24]),e(k,[2,25]),e(k,[2,26]),e(k,[2,44]),e(k,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:t(function(n,o){if(o.recoverable)this.trace(n);else{var h=Error(n);throw h.hash=o,h}},"parseError"),parse:t(function(n){var o=this,h=[0],i=[],p=[null],s=[],Le=this.table,c="",Oe=0,st=0,it=0,ct=2,rt=1,ht=s.slice.call(arguments,1),_=Object.create(this.lexer),ce={yy:{}};for(var Pe in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,Pe))ce.yy[Pe]=this.yy[Pe];if(_.setInput(n,ce.yy),ce.yy.lexer=_,ce.yy.parser=this,typeof _.yylloc>"u")_.yylloc={};var Ue=_.yylloc;s.push(Ue);var ut=_.options&&_.options.ranges;if(typeof ce.yy.parseError==="function")this.parseError=ce.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function mt(O){h.length=h.length-2*O,p.length=p.length-O,s.length=s.length-O}t(mt,"popStack");function nt(){var O=i.pop()||_.lex()||rt;if(typeof O!=="number"){if(O instanceof Array)i=O,O=i.pop();O=o.symbols_[O]||O}return O}t(nt,"lex");var V,Ye,me,D,kt,Be,de={},Me,z,at,Fe;while(!0){if(me=h[h.length-1],this.defaultActions[me])D=this.defaultActions[me];else{if(V===null||typeof V>"u")V=nt();D=Le[me]&&Le[me][V]}if(typeof D>"u"||!D.length||!D[0]){var Qe="";Fe=[];for(Me in Le[me])if(this.terminals_[Me]&&Me>ct)Fe.push("'"+this.terminals_[Me]+"'");if(_.showPosition)Qe="Parse error on line "+(Oe+1)+`:
2
2
  `+_.showPosition()+`
3
- Expecting `+Fe.join(", ")+", got '"+(this.terminals_[V]||V)+"'";else Qe="Parse error on line "+(Oe+1)+": Unexpected "+(V==rt?"end of input":"'"+(this.terminals_[V]||V)+"'");this.parseError(Qe,{text:_.match,token:this.terminals_[V]||V,line:_.yylineno,loc:Ue,expected:Fe})}if(D[0]instanceof Array&&D.length>1)throw Error("Parse Error: multiple actions possible at state: "+he+", token: "+V);switch(D[0]){case 1:if(h.push(V),p.push(_.yytext),s.push(_.yylloc),h.push(D[1]),V=null,!Ye){if(st=_.yyleng,c=_.yytext,Oe=_.yylineno,Ue=_.yylloc,it>0)it--}else V=Ye,Ye=null;break;case 2:if(z=this.productions_[D[1]][1],fe.$=p[p.length-z],fe._$={first_line:s[s.length-(z||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(z||1)].first_column,last_column:s[s.length-1].last_column},ut)fe._$.range=[s[s.length-(z||1)].range[0],s[s.length-1].range[1]];if(Be=this.performAction.apply(fe,[c,st,Oe,ce.yy,D[1],p,s].concat(ht)),typeof Be<"u")return Be;if(z)h=h.slice(0,-1*z*2),p=p.slice(0,-1*z),s=s.slice(0,-1*z);h.push(this.productions_[D[1]][0]),p.push(fe.$),s.push(fe._$),at=Le[h[h.length-2]][h[h.length-1]],h.push(at);break;case 3:return!0}}return!0},"parse")},ot=function(){var X={EOF:1,parseError:t(function(o,h){if(this.yy.parser)this.yy.parser.parseError(o,h);else throw Error(o)},"parseError"),setInput:t(function(n,o){if(this.yy=o||this.yy||{},this._input=n,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges)this.yylloc.range=[0,0];return this.offset=0,this},"setInput"),input:t(function(){var n=this._input[0];this.yytext+=n,this.yyleng++,this.offset++,this.match+=n,this.matched+=n;var o=n.match(/(?:\r\n?|\n).*/g);if(o)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),n},"input"),unput:t(function(n){var o=n.length,h=n.split(/(?:\r\n?|\n)/g);this._input=n+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-o),this.offset-=o;var i=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),h.length-1)this.yylineno-=h.length-1;var p=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:h?(h.length===i.length?this.yylloc.first_column:0)+i[i.length-h.length].length-h[0].length:this.yylloc.first_column-o},this.options.ranges)this.yylloc.range=[p[0],p[0]+this.yyleng-o];return this.yyleng=this.yytext.length,this},"unput"),more:t(function(){return this._more=!0,this},"more"),reject:t(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
3
+ Expecting `+Fe.join(", ")+", got '"+(this.terminals_[V]||V)+"'";else Qe="Parse error on line "+(Oe+1)+": Unexpected "+(V==rt?"end of input":"'"+(this.terminals_[V]||V)+"'");this.parseError(Qe,{text:_.match,token:this.terminals_[V]||V,line:_.yylineno,loc:Ue,expected:Fe})}if(D[0]instanceof Array&&D.length>1)throw Error("Parse Error: multiple actions possible at state: "+me+", token: "+V);switch(D[0]){case 1:if(h.push(V),p.push(_.yytext),s.push(_.yylloc),h.push(D[1]),V=null,!Ye){if(st=_.yyleng,c=_.yytext,Oe=_.yylineno,Ue=_.yylloc,it>0)it--}else V=Ye,Ye=null;break;case 2:if(z=this.productions_[D[1]][1],de.$=p[p.length-z],de._$={first_line:s[s.length-(z||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(z||1)].first_column,last_column:s[s.length-1].last_column},ut)de._$.range=[s[s.length-(z||1)].range[0],s[s.length-1].range[1]];if(Be=this.performAction.apply(de,[c,st,Oe,ce.yy,D[1],p,s].concat(ht)),typeof Be<"u")return Be;if(z)h=h.slice(0,-1*z*2),p=p.slice(0,-1*z),s=s.slice(0,-1*z);h.push(this.productions_[D[1]][0]),p.push(de.$),s.push(de._$),at=Le[h[h.length-2]][h[h.length-1]],h.push(at);break;case 3:return!0}}return!0},"parse")},ot=function(){var X={EOF:1,parseError:t(function(o,h){if(this.yy.parser)this.yy.parser.parseError(o,h);else throw Error(o)},"parseError"),setInput:t(function(n,o){if(this.yy=o||this.yy||{},this._input=n,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges)this.yylloc.range=[0,0];return this.offset=0,this},"setInput"),input:t(function(){var n=this._input[0];this.yytext+=n,this.yyleng++,this.offset++,this.match+=n,this.matched+=n;var o=n.match(/(?:\r\n?|\n).*/g);if(o)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),n},"input"),unput:t(function(n){var o=n.length,h=n.split(/(?:\r\n?|\n)/g);this._input=n+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-o),this.offset-=o;var i=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),h.length-1)this.yylineno-=h.length-1;var p=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:h?(h.length===i.length?this.yylloc.first_column:0)+i[i.length-h.length].length-h[0].length:this.yylloc.first_column-o},this.options.ranges)this.yylloc.range=[p[0],p[0]+this.yyleng-o];return this.yyleng=this.yytext.length,this},"unput"),more:t(function(){return this._more=!0,this},"more"),reject:t(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:t(function(n){this.unput(this.match.slice(n))},"less"),pastInput:t(function(){var n=this.matched.substr(0,this.matched.length-this.match.length);return(n.length>20?"...":"")+n.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:t(function(){var n=this.match;if(n.length<20)n+=this._input.substr(0,20-n.length);return(n.substr(0,20)+(n.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:t(function(){var n=this.pastInput(),o=Array(n.length+1).join("-");return n+this.upcomingInput()+`
5
5
  `+o+"^"},"showPosition"),test_match:t(function(n,o){var h,i,p;if(this.options.backtrack_lexer){if(p={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)p.yylloc.range=this.yylloc.range.slice(0)}if(i=n[0].match(/(?:\r\n?|\n).*/g),i)this.yylineno+=i.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+n[0].length},this.yytext+=n[0],this.match+=n[0],this.matches=n,this.yyleng=this.yytext.length,this.options.ranges)this.yylloc.range=[this.offset,this.offset+=this.yyleng];if(this._more=!1,this._backtrack=!1,this._input=this._input.slice(n[0].length),this.matched+=n[0],h=this.performAction.call(this,this.yy,this,o,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(h)return h;else if(this._backtrack){for(var s in p)this[s]=p[s];return!1}return!1},"test_match"),next:t(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var n,o,h,i;if(!this._more)this.yytext="",this.match="";var p=this._currentRules();for(var s=0;s<p.length;s++)if(h=this._input.match(this.rules[p[s]]),h&&(!o||h[0].length>o[0].length)){if(o=h,i=s,this.options.backtrack_lexer)if(n=this.test_match(h,p[s]),n!==!1)return n;else if(this._backtrack){o=!1;continue}else return!1;else if(!this.options.flex)break}if(o){if(n=this.test_match(o,p[i]),n!==!1)return n;return!1}if(this._input==="")return this.EOF;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
6
  `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:t(function(){var o=this.next();if(o)return o;else return this.lex()},"lex"),begin:t(function(o){this.conditionStack.push(o)},"begin"),popState:t(function(){var o=this.conditionStack.length-1;if(o>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:t(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:t(function(o){if(o=this.conditionStack.length-1-Math.abs(o||0),o>=0)return this.conditionStack[o];else return"INITIAL"},"topState"),pushState:t(function(o){this.begin(o)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:t(function(o,h,i,p){var s=p;switch(i){case 0:return"title";case 1:return this.begin("acc_title"),9;break;case 2:return this.popState(),"acc_title_value";break;case 3:return this.begin("acc_descr"),11;break;case 4:return this.popState(),"acc_descr_value";break;case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 21;case 9:return 22;case 10:return 23;case 11:return 24;case 12:return 5;case 13:break;case 14:break;case 15:break;case 16:return 8;case 17:return 6;case 18:return 27;case 19:return 40;case 20:return 29;case 21:return 32;case 22:return 31;case 23:return 34;case 24:return 36;case 25:return 38;case 26:return 41;case 27:return 42;case 28:return 43;case 29:return 44;case 30:return 45;case 31:return 46;case 32:return 47;case 33:return 48;case 34:return 49;case 35:return 50;case 36:return 51;case 37:return 52;case 38:return 53;case 39:return 54;case 40:return 65;case 41:return 66;case 42:return 67;case 43:return 68;case 44:return 69;case 45:return 70;case 46:return 71;case 47:return 57;case 48:return 59;case 49:return this.begin("style"),77;break;case 50:return 75;case 51:return 81;case 52:return 88;case 53:return"PERCENT";case 54:return 86;case 55:return 84;case 56:break;case 57:this.begin("string");break;case 58:this.popState();break;case 59:return this.begin("style"),72;break;case 60:return this.begin("style"),74;break;case 61:return 61;case 62:return 64;case 63:return 63;case 64:this.begin("string");break;case 65:this.popState();break;case 66:return"qString";case 67:return h.yytext=h.yytext.trim(),89;break;case 68:return 75;case 69:return 80;case 70:return 76}},"anonymous"),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::{3})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:style\b)/i,/^(?:\w+)/i,/^(?::)/i,/^(?:;)/i,/^(?:%)/i,/^(?:-)/i,/^(?:#)/i,/^(?: )/i,/^(?:["])/i,/^(?:\n)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^:,\r\n\{\<\>\-\=]*)/i,/^(?:\w+)/i,/^(?:[0-9]+)/i,/^(?:,)/i],conditions:{acc_descr_multiline:{rules:[6,7,68,69,70],inclusive:!1},acc_descr:{rules:[4,68,69,70],inclusive:!1},acc_title:{rules:[2,68,69,70],inclusive:!1},style:{rules:[50,51,52,53,54,55,56,57,58,68,69,70],inclusive:!1},unqString:{rules:[68,69,70],inclusive:!1},token:{rules:[68,69,70],inclusive:!1},string:{rules:[65,66,68,69,70],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,59,60,61,62,63,64,67,68,69,70],inclusive:!0}}};return X}();$e.lexer=ot;function De(){this.yy={}}return t(De,"Parser"),De.prototype=$e,$e.Parser=De,new De}();He.parser=He;var ft=He,dt=class{constructor(){this.relations=[],this.latestRequirement=this.getInitialRequirement(),this.requirements=new Map,this.latestElement=this.getInitialElement(),this.elements=new Map,this.classes=new Map,this.direction="TB",this.RequirementType={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},this.RiskLevel={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},this.VerifyType={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},this.Relationships={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},this.setAccTitle=S,this.getAccTitle=E,this.setAccDescription=T,this.getAccDescription=A,this.setDiagramTitle=L,this.getDiagramTitle=R,this.getConfig=t(()=>l().requirement,"getConfig"),this.clear(),this.setDirection=this.setDirection.bind(this),this.addRequirement=this.addRequirement.bind(this),this.setNewReqId=this.setNewReqId.bind(this),this.setNewReqRisk=this.setNewReqRisk.bind(this),this.setNewReqText=this.setNewReqText.bind(this),this.setNewReqVerifyMethod=this.setNewReqVerifyMethod.bind(this),this.addElement=this.addElement.bind(this),this.setNewElementType=this.setNewElementType.bind(this),this.setNewElementDocRef=this.setNewElementDocRef.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setCssStyle=this.setCssStyle.bind(this),this.setClass=this.setClass.bind(this),this.defineClass=this.defineClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}static{t(this,"RequirementDB")}getDirection(){return this.direction}setDirection(e){this.direction=e}resetLatestRequirement(){this.latestRequirement=this.getInitialRequirement()}resetLatestElement(){this.latestElement=this.getInitialElement()}getInitialRequirement(){return{requirementId:"",text:"",risk:"",verifyMethod:"",name:"",type:"",cssStyles:[],classes:["default"]}}getInitialElement(){return{name:"",type:"",docRef:"",cssStyles:[],classes:["default"]}}addRequirement(e,d){if(!this.requirements.has(e))this.requirements.set(e,{name:e,type:d,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:["default"]});return this.resetLatestRequirement(),this.requirements.get(e)}getRequirements(){return this.requirements}setNewReqId(e){if(this.latestRequirement!==void 0)this.latestRequirement.requirementId=e}setNewReqText(e){if(this.latestRequirement!==void 0)this.latestRequirement.text=e}setNewReqRisk(e){if(this.latestRequirement!==void 0)this.latestRequirement.risk=e}setNewReqVerifyMethod(e){if(this.latestRequirement!==void 0)this.latestRequirement.verifyMethod=e}addElement(e){if(!this.elements.has(e))this.elements.set(e,{name:e,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:["default"]}),a.info("Added new element: ",e);return this.resetLatestElement(),this.elements.get(e)}getElements(){return this.elements}setNewElementType(e){if(this.latestElement!==void 0)this.latestElement.type=e}setNewElementDocRef(e){if(this.latestElement!==void 0)this.latestElement.docRef=e}addRelationship(e,d,f){this.relations.push({type:e,src:d,dst:f})}getRelationships(){return this.relations}clear(){this.relations=[],this.resetLatestRequirement(),this.requirements=new Map,this.resetLatestElement(),this.elements=new Map,this.classes=new Map,C()}setCssStyle(e,d){for(let f of e){let m=this.requirements.get(f)??this.elements.get(f);if(!d||!m)return;for(let r of d)if(r.includes(","))m.cssStyles.push(...r.split(","));else m.cssStyles.push(r)}}setClass(e,d){for(let f of e){let m=this.requirements.get(f)??this.elements.get(f);if(m)for(let r of d){m.classes.push(r);let u=this.classes.get(r)?.styles;if(u)m.cssStyles.push(...u)}}}defineClass(e,d){for(let f of e){let m=this.classes.get(f);if(m===void 0)m={id:f,styles:[],textStyles:[]},this.classes.set(f,m);if(d)d.forEach(function(r){if(/color/.exec(r)){let u=r.replace("fill","bgFill");m.textStyles.push(u)}m.styles.push(r)});this.requirements.forEach((r)=>{if(r.classes.includes(f))r.cssStyles.push(...d.flatMap((u)=>u.split(",")))}),this.elements.forEach((r)=>{if(r.classes.includes(f))r.cssStyles.push(...d.flatMap((u)=>u.split(",")))})}}getClasses(){return this.classes}getData(){let e=l(),d=[],f=[];for(let r of this.requirements.values()){let u=r;u.id=r.name,u.cssStyles=r.cssStyles,u.cssClasses=r.classes.join(" "),u.shape="requirementBox",u.look=e.look,u.colorIndex=d.length,d.push(u)}for(let r of this.elements.values()){let u=r;u.shape="requirementBox",u.look=e.look,u.id=r.name,u.cssStyles=r.cssStyles,u.cssClasses=r.classes.join(" "),u.colorIndex=d.length,d.push(u)}let m=0;for(let r of this.relations){let u=r.type===this.Relationships.CONTAINS,I={id:`${r.src}-${r.dst}-${m++}`,start:this.requirements.get(r.src)?.name??this.elements.get(r.src)?.name,end:this.requirements.get(r.dst)?.name??this.elements.get(r.dst)?.name,label:`&lt;&lt;${r.type}&gt;&gt;`,classes:"relationshipLine",style:["fill:none",u?"":"stroke-dasharray: 10,7"],labelpos:"c",thickness:"normal",type:"normal",pattern:u?"normal":"dashed",arrowTypeStart:u?"requirement_contains":"",arrowTypeEnd:u?"":"requirement_arrow",look:e.look,labelType:"markdown"};f.push(I)}return{nodes:d,edges:f,other:{},config:e,direction:this.getDirection()}}},pt=t(()=>{let e=x(),{theme:d,themeVariables:f}=e,{bkgColorArray:m,borderColorArray:r}=f;if(!se(d,r))return"";let u=le(e.look),I="",v=pe(m);for(let b=0;b<gt(r);b++){let N=r[b],q=v?`fill: ${m[b%m.length]};`:"";I+=`
@@ -81,4 +81,4 @@ Expecting `+Fe.join(", ")+", got '"+(this.terminals_[V]||V)+"'";else Qe="Parse e
81
81
  background-color: ${r??e.edgeLabelBackground};
82
82
  }
83
83
 
84
- `},"getStyles"),bt=Et,lt={};Qt(lt,{draw:()=>Rt});var Rt=t(async function(e,d,f,m){a.info("REF0:"),a.info("Drawing requirement diagram (unified)",d);let{securityLevel:r,state:u,layout:I,look:v}=l(),b=m.db.getData(),N=ge(d,r);b.type=m.type,b.layoutAlgorithm=ve(I),b.nodeSpacing=u?.nodeSpacing??50,b.rankSpacing=u?.rankSpacing??50,b.markers=v==="neo"?["requirement_contains_neo","requirement_arrow_neo"]:["requirement_contains","requirement_arrow"],b.diagramId=d,await ye(b,N);let q=8;M.insertTitle(N,"requirementDiagramTitleText",u?.titleTopMargin??25,m.db.getDiagramTitle()),ue(N,q,"requirementDiagram",u?.useMaxWidth??!0)},"draw"),Mt={parser:ft,get db(){return new dt},renderer:lt,styles:bt};export{Mt as diagram};
84
+ `},"getStyles"),bt=Et,lt={};Kt(lt,{draw:()=>Rt});var Rt=t(async function(e,d,f,m){a.info("REF0:"),a.info("Drawing requirement diagram (unified)",d);let{securityLevel:r,state:u,layout:I,look:v}=l(),b=m.db.getData(),N=he(d,r);b.type=m.type,b.layoutAlgorithm=ye(I),b.nodeSpacing=u?.nodeSpacing??50,b.rankSpacing=u?.rankSpacing??50,b.markers=v==="neo"?["requirement_contains_neo","requirement_arrow_neo"]:["requirement_contains","requirement_arrow"],b.diagramId=d,await ge(b,N);let q=8;M.insertTitle(N,"requirementDiagramTitleText",u?.titleTopMargin??25,m.db.getDiagramTitle()),ue(N,q,"requirementDiagram",u?.useMaxWidth??!0)},"draw"),Mt={parser:ft,get db(){return new dt},renderer:lt,styles:bt};export{Mt as diagram};
@@ -0,0 +1 @@
1
+ import{Ai}from"./chunk-60axh4sa.js";export{Ai as createGitGraphServices};
package/web/index.html CHANGED
@@ -15,7 +15,7 @@
15
15
  <link rel="icon" href="./icon-1wgy7kzy.svg" type="image/svg+xml" />
16
16
  <link rel="apple-touch-icon" href="./apple-touch-icon-7dkm33qp.png" />
17
17
 
18
- <link rel="stylesheet" crossorigin href="./chunk-wwcnvyjh.css"><script type="module" crossorigin src="./chunk-gcwhx3av.js"></script></head>
18
+ <link rel="stylesheet" crossorigin href="./chunk-5z2n4z9x.css"><script type="module" crossorigin src="./chunk-nvt9tkt4.js"></script></head>
19
19
  <body>
20
20
  <div id="root"></div>
21
21
 
package/worker.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{He,Tt,Yr,qt,Ai,Ko,Qo}from"./chunk-yzevjkms.js";var S="backfill";function c(t){return t.query("SELECT sum((SELECT max(seq) FROM store.entries WHERE session_id = sessions.id)) AS n FROM store.sessions").get()?.n??0}function k(t){let e=Yr(t,S);return e?JSON.parse(e):void 0}function y(t,e){qt(t,S,JSON.stringify(e))}class b{db;indexer;batch;todo;page;state;constructor(t,e,s=500){this.db=t;this.indexer=e;this.batch=s;this.todo=t.query("SELECT session_id FROM main.backfill_todo WHERE ord = ?"),this.page=t.query("SELECT seq, time, body FROM store.entries WHERE session_id = ? AND seq > ? ORDER BY seq LIMIT ?"),this.state=k(t)}get running(){return this.state?.state==="running"}begin(t){this.db.transaction(()=>{let e=this.db.query("SELECT max(id) AS id FROM store.search_queue").get()?.id??0;qt(this.db,"queue_done",e),this.db.run("DELETE FROM main.backfill_todo"),this.db.run("INSERT INTO main.backfill_todo (ord, session_id) SELECT row_number() OVER (ORDER BY updated DESC, id), id FROM store.sessions");let s=this.db.query("SELECT count(*) AS n FROM main.backfill_todo").get()?.n??0,r=c(this.db);this.state={state:s?"running":"done",reason:t,ord:1,seq:-1,total:r,sessionsTotal:s,done:0,sessionsDone:0,startedAt:Date.now()},y(this.db,this.state)})()}step(t){let e=this.state;if(e?.state!=="running")return!1;let s={...e};return this.db.transaction(()=>{let r=this.batch;while(r>0&&s.state==="running"){let n=this.todo.get(s.ord)?.session_id;if(n===void 0){s.state="done",this.db.run("DELETE FROM main.backfill_todo");break}if(s.seq<0)this.indexer.reindex(n,0),s.seq=0;let a=this.page.all(n,s.seq,r);for(let i of a)if(this.indexer.indexRow(n,i.seq,i.time,i.body),s.seq=i.seq,s.done++,r--,performance.now()>t){r=0;break}if(r>0)s.ord++,s.seq=-1,s.sessionsDone++;if(performance.now()>t)break}y(this.db,s)})(),this.state=s,!0}}var T=2000,M=30000;class E{options;db;layout;reset;indexer;backfill;terms;queueRows;queueMax;sliceMs;backfillSliceMs;queueBatch;termRefreshMs;queueDone;termCursor;termStale;lastTermRefresh=Number.NEGATIVE_INFINITY;rateStart;estimate;closed=!1;constructor(t){this.options=t;let e=Ai(t.indexPath,t.storePath,t.features);if(this.db=e.db,this.layout=e.layout,this.reset=e.reset,this.sliceMs=t.sliceMs??20,this.backfillSliceMs=t.backfillSliceMs??200,this.queueBatch=t.queueBatch??200,this.termRefreshMs=t.termRefreshMs??60000,this.indexer=new Ko(this.db,this.layout),this.terms=new Qo(this.db),this.backfill=new b(this.db,this.indexer,t.batch??500),this.queueRows=this.db.query("SELECT id, session_id, seq FROM store.search_queue WHERE id > ? ORDER BY id LIMIT ?"),this.queueMax=this.db.query("SELECT max(id) AS id FROM store.search_queue"),!this.backfill.state)this.backfill.begin(this.reset?"rebuild":"initial");this.queueDone=Number(Yr(this.db,"queue_done")??0),this.termStale=Number(Yr(this.db,"term_stale")??0)===1}step(t){if(this.closed)return!1;if(this.drainQueue(t??performance.now()+this.sliceMs))return!0;if(this.backfill.running){this.rateStart??={time:performance.now(),done:this.backfill.state?.done??0};let e=this.indexer.outChanges;if(this.backfill.step(t??performance.now()+this.backfillSliceMs),this.markTerms(e),!this.backfill.running)this.lastTermRefresh=Number.NEGATIVE_INFINITY;return!0}return this.refreshTerms(t??performance.now()+this.sliceMs)}drain(){while(this.step());}drainQueue(t){let e=!1;return this.db.transaction(()=>{let s=this.queueRows.all(this.queueDone,this.queueBatch);if(!s.length)return;e=!0;let r=this.indexer.outChanges,n=new Set,a=this.queueDone;for(let i of s){let h=`${i.seq}\x00${i.session_id}`;if(!n.has(h))n.add(h),this.indexer.reindex(i.session_id,i.seq);if(a=i.id,performance.now()>t)break}qt(this.db,"queue_done",a),this.markTerms(r),this.queueDone=a})(),e}markTerms(t){if(this.indexer.outChanges===t||this.termStale)return;this.termStale=!0,qt(this.db,"term_stale",1)}refreshTerms(t){if(this.termCursor===void 0){if(!this.termStale||performance.now()-this.lastTermRefresh<this.termRefreshMs)return!1;this.termCursor="",this.termStale=!1,this.indexer.outChanges=0,qt(this.db,"term_stale",0)}while(this.termCursor!==void 0&&performance.now()<=t){let e=this.termCursor;this.db.transaction(()=>{this.termCursor=this.terms.step(e,T)})()}if(this.termCursor===void 0)this.lastTermRefresh=performance.now();return!0}status(){let t=this.queueMax.get()?.id??this.queueDone,e=this.backfill.state,s;if(e?.state==="running"&&this.rateStart){let n=(performance.now()-this.rateStart.time)/1000,a=(e.done-this.rateStart.done)/n;if(n>0.5&&a>0)s=Math.max(0,Math.round(Math.max(0,e.total-e.done)/a))}let r=e?{state:e.state,reason:e.reason,total:e.total,done:e.done,sessionsTotal:e.sessionsTotal,sessionsDone:e.sessionsDone,startedAt:e.startedAt}:void 0;if(!this.estimate||performance.now()-this.estimate.time>M)this.estimate={time:performance.now(),entries:c(this.db)};return{queueDone:this.queueDone,lag:Math.max(0,t-this.queueDone),entries:this.estimate.entries,...r?{backfill:r}:{},...s!==void 0?{etaSec:s}:{},layout:this.layout,reset:this.reset}}withIndex(t){return t(this.db)}close(){if(this.closed)return;this.closed=!0,this.db.close()}}var g=1000,x=100;function R(t){let e,s,r,n=!1,a=!1,i=0,h=[],l=(u)=>t.postMessage(u),d=(u)=>{if(a)return;if(r)clearTimeout(r);r=setTimeout(q,u)},p=()=>{if(!s||Atomics.load(s,He)!==1)return;Atomics.store(s,Tt,1),Atomics.notify(s,Tt);while(Atomics.load(s,He)===1)Atomics.wait(s,He,1,1e4);Atomics.store(s,Tt,0)};function q(){if(r=void 0,a||!e)return;p();let u=!1;try{u=e.step()}catch(f){l({type:"error",message:f instanceof Error?f.message:String(f),fatal:!1}),n=!1,d(g);return}let o=performance.now();if(u){if(n=!0,o-i>=x)i=o,l({type:"status",status:e.status()});d(0);return}n=!1,i=o;let m=e.status();l({type:"status",status:m});for(let f of h.splice(0))l({type:"flushed",id:f,status:m});d(g)}t.onmessage=(u)=>{let o=u.data;if(o.type==="init"){s=new Int32Array(o.flags);try{e=new E(o.options)}catch(m){l({type:"error",message:m instanceof Error?m.message:String(m),fatal:!0});return}l({type:"status",status:e.status()}),d(0)}else if(o.type==="dirty"){if(!n)d(0)}else if(o.type==="pause")p();else if(o.type==="flush"){if(h.push(o.id),!n)d(0)}else if(o.type==="stop"){if(a=!0,r)clearTimeout(r);e?.close(),l({type:"stopped"})}}}if(!Bun.isMainThread)R(globalThis);export{E as SearchEngine};
2
+ import{He,Et,Yr,qt,xi,Ei,Zn,Pi,Ne,ki,Ke,Ri}from"./chunk-c71173py.js";var S="backfill";function c(e){return e.query("SELECT sum((SELECT max(seq) FROM store.entries WHERE session_id = sessions.id)) AS n FROM store.sessions").get()?.n??0}function q(e){let t=Yr(e,S);return t?JSON.parse(t):void 0}function g(e,t){qt(e,S,JSON.stringify(t))}class b{db;indexer;batch;todo;page;state;constructor(e,t,s=500){this.db=e;this.indexer=t;this.batch=s;this.todo=e.query("SELECT session_id FROM main.backfill_todo WHERE ord = ?"),this.page=e.query("SELECT seq, time, body FROM store.entries WHERE session_id = ? AND seq > ? ORDER BY seq LIMIT ?"),this.state=q(e)}get running(){return this.state?.state==="running"}begin(e){this.db.transaction(()=>{let t=this.db.query("SELECT max(id) AS id FROM store.search_queue").get()?.id??0;qt(this.db,"queue_done",t),this.db.run("DELETE FROM main.backfill_todo"),this.db.run("INSERT INTO main.backfill_todo (ord, session_id) SELECT row_number() OVER (ORDER BY updated DESC, id), id FROM store.sessions");let s=this.db.query("SELECT count(*) AS n FROM main.backfill_todo").get()?.n??0,r=c(this.db);this.state={state:s?"running":"done",reason:e,ord:1,seq:-1,total:r,sessionsTotal:s,done:0,sessionsDone:0,startedAt:Date.now()},g(this.db,this.state)})()}step(e){let t=this.state;if(t?.state!=="running")return!1;let s={...t};return this.db.transaction(()=>{let r=this.batch;while(r>0&&s.state==="running"){let n=this.todo.get(s.ord)?.session_id;if(n===void 0){s.state="done",this.db.run("DELETE FROM main.backfill_todo");break}if(s.seq<0)this.indexer.reindex(n,0),s.seq=0;let i=this.page.all(n,s.seq,r);for(let a of i)if(this.indexer.indexRow(n,a.seq,a.time,a.body),s.seq=a.seq,s.done++,r--,performance.now()>e){r=0;break}if(r>0)s.ord++,s.seq=-1,s.sessionsDone++;if(performance.now()>e)break}g(this.db,s)})(),this.state=s,!0}}function M(e,t){return BigInt.asIntN(64,Bun.hash.wyhash(`${e?"B":"M"}${t}`))}class p{db;layout;readEntry;readTitle;previousModel;selectRefs;deleteRefs;insertRef;findDoc;insertDoc;increment;decrement;docRefs;deleteDoc;insertMsg;insertOut;deleteMsg;deleteOut;stats={entries:0,fields:0,bytes:0,newDocs:0,newBytes:0};outChanges=0;constructor(e,t){this.db=e;this.layout=t;this.readEntry=e.query("SELECT time, body FROM store.entries WHERE session_id = ? AND seq = ?"),this.readTitle=e.query("SELECT title, created FROM store.sessions WHERE id = ?"),this.previousModel=e.query("SELECT json_extract(body, '$.model') AS model FROM store.entries WHERE session_id = ? AND seq < ? AND json_extract(body, '$.type') = 'assistant' ORDER BY seq DESC LIMIT 1"),this.selectRefs=e.query("SELECT doc FROM main.ref WHERE session_id = ? AND seq = ?"),this.deleteRefs=e.query("DELETE FROM main.ref WHERE session_id = ? AND seq = ?"),this.insertRef=e.query("INSERT INTO main.ref (session_id, seq, part, doc, kind, tool, err, model, time) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)"),this.findDoc=e.query("SELECT id FROM main.doc WHERE hash = ?"),this.insertDoc=e.query("INSERT INTO main.doc (hash, refs, len, bulk) VALUES (?, 1, ?, ?)"),this.increment=e.query("UPDATE main.doc SET refs = refs + 1 WHERE id = ?"),this.decrement=e.query("UPDATE main.doc SET refs = refs - 1 WHERE id = ?"),this.docRefs=e.query("SELECT refs, bulk FROM main.doc WHERE id = ?"),this.deleteDoc=e.query("DELETE FROM main.doc WHERE id = ?"),this.insertMsg=e.query("INSERT INTO main.fts (rowid, text) VALUES (?, ?)"),this.insertOut=e.query("INSERT INTO main.fts_out (rowid, text) VALUES (?, ?)"),this.deleteMsg=e.query("DELETE FROM main.fts WHERE rowid = ?"),this.deleteOut=e.query("DELETE FROM main.fts_out WHERE rowid = ?")}reindex(e,t){let s=0,r=[];if(t===0){let n=this.readTitle.get(e);if(n)s=n.created,r=Ri(n.title)}else{let n=this.readEntry.get(e,t);if(n)s=n.time,r=this.fields(e,t,n.body)}this.apply(e,t,s,r)}indexRow(e,t,s,r){this.apply(e,t,s,this.fields(e,t,r))}fields(e,t,s){let r;try{r=JSON.parse(s)}catch{return[]}if(!r||typeof r!=="object")return[];let n=Ke(r);if(r.type==="tool_result"&&n.length){let i=this.previousModel.get(e,t)?.model??void 0;if(i)for(let a of n)a.model=i}return n}apply(e,t,s,r){let n=this.selectRefs.all(e,t);if(n.length)this.deleteRefs.run(e,t);this.stats.entries++;for(let i of r){let a=ki(i.kind),l=M(a,i.text);this.stats.fields++,this.stats.bytes+=i.text.length;let o=this.findDoc.get(l)?.id;if(o===void 0){if(o=Number(this.insertDoc.run(l,i.text.length,a?1:0).lastInsertRowid),a)this.insertOut.run(o,Zn(i.text)),this.outChanges++;else this.insertMsg.run(o,this.layout.msg==="trigram"?Pi(i.text):Zn(i.text));this.stats.newDocs++,this.stats.newBytes+=i.text.length}else this.increment.run(o);this.insertRef.run(e,t,i.part,o,Ne[i.kind],i.tool??null,i.err?1:0,i.model??null,s)}for(let{doc:i}of n)this.release(i)}release(e){this.decrement.run(e);let t=this.docRefs.get(e);if(!t||t.refs>0)return;if(this.deleteDoc.run(e),t.bulk)this.deleteOut.run(e),this.outChanges++;else this.deleteMsg.run(e)}}class y{db;page;clearRange;clearTail;upsert;constructor(e){this.db=e;this.page=e.query("SELECT term, doc FROM main.fts_out_vocab WHERE term > ? ORDER BY term LIMIT ?"),this.clearRange=e.query("DELETE FROM main.term WHERE t > ? AND t <= ?"),this.clearTail=e.query("DELETE FROM main.term WHERE t > ?"),this.upsert=e.query("INSERT OR REPLACE INTO main.term (t, n) VALUES (?, ?)")}step(e,t){let s=this.page.all(e,t),r=s.at(-1)?.term;if(s.length<t||r===void 0)this.clearTail.run(e);else this.clearRange.run(e,r);for(let{term:n,doc:i}of s)if(n.length<=Ei)this.upsert.run(n,i);return s.length<t?void 0:r}}var w=2000,x=30000;class T{options;db;layout;reset;indexer;backfill;terms;queueRows;queueMax;sliceMs;backfillSliceMs;queueBatch;termRefreshMs;queueDone;termCursor;termStale;lastTermRefresh=Number.NEGATIVE_INFINITY;rateStart;estimate;closed=!1;constructor(e){this.options=e;let t=xi(e.indexPath,e.storePath,e.features);if(this.db=t.db,this.layout=t.layout,this.reset=t.reset,this.sliceMs=e.sliceMs??20,this.backfillSliceMs=e.backfillSliceMs??200,this.queueBatch=e.queueBatch??200,this.termRefreshMs=e.termRefreshMs??60000,this.indexer=new p(this.db,this.layout),this.terms=new y(this.db),this.backfill=new b(this.db,this.indexer,e.batch??500),this.queueRows=this.db.query("SELECT id, session_id, seq FROM store.search_queue WHERE id > ? ORDER BY id LIMIT ?"),this.queueMax=this.db.query("SELECT max(id) AS id FROM store.search_queue"),!this.backfill.state)this.backfill.begin(this.reset?"rebuild":"initial");this.queueDone=Number(Yr(this.db,"queue_done")??0),this.termStale=Number(Yr(this.db,"term_stale")??0)===1}step(e){if(this.closed)return!1;if(this.drainQueue(e??performance.now()+this.sliceMs))return!0;if(this.backfill.running){this.rateStart??={time:performance.now(),done:this.backfill.state?.done??0};let t=this.indexer.outChanges;if(this.backfill.step(e??performance.now()+this.backfillSliceMs),this.markTerms(t),!this.backfill.running)this.lastTermRefresh=Number.NEGATIVE_INFINITY;return!0}return this.refreshTerms(e??performance.now()+this.sliceMs)}drain(){while(this.step());}drainQueue(e){let t=!1;return this.db.transaction(()=>{let s=this.queueRows.all(this.queueDone,this.queueBatch);if(!s.length)return;t=!0;let r=this.indexer.outChanges,n=new Set,i=this.queueDone;for(let a of s){let l=`${a.seq}\x00${a.session_id}`;if(!n.has(l))n.add(l),this.indexer.reindex(a.session_id,a.seq);if(i=a.id,performance.now()>e)break}qt(this.db,"queue_done",i),this.markTerms(r),this.queueDone=i})(),t}markTerms(e){if(this.indexer.outChanges===e||this.termStale)return;this.termStale=!0,qt(this.db,"term_stale",1)}refreshTerms(e){if(this.termCursor===void 0){if(!this.termStale||performance.now()-this.lastTermRefresh<this.termRefreshMs)return!1;this.termCursor="",this.termStale=!1,this.indexer.outChanges=0,qt(this.db,"term_stale",0)}while(this.termCursor!==void 0&&performance.now()<=e){let t=this.termCursor;this.db.transaction(()=>{this.termCursor=this.terms.step(t,w)})()}if(this.termCursor===void 0)this.lastTermRefresh=performance.now();return!0}status(){let e=this.queueMax.get()?.id??this.queueDone,t=this.backfill.state,s;if(t?.state==="running"&&this.rateStart){let n=(performance.now()-this.rateStart.time)/1000,i=(t.done-this.rateStart.done)/n;if(n>0.5&&i>0)s=Math.max(0,Math.round(Math.max(0,t.total-t.done)/i))}let r=t?{state:t.state,reason:t.reason,total:t.total,done:t.done,sessionsTotal:t.sessionsTotal,sessionsDone:t.sessionsDone,startedAt:t.startedAt}:void 0;if(!this.estimate||performance.now()-this.estimate.time>x)this.estimate={time:performance.now(),entries:c(this.db)};return{queueDone:this.queueDone,lag:Math.max(0,e-this.queueDone),entries:this.estimate.entries,...r?{backfill:r}:{},...s!==void 0?{etaSec:s}:{},layout:this.layout,reset:this.reset}}withIndex(e){return e(this.db)}close(){if(this.closed)return;this.closed=!0,this.db.close()}}var R=1000,v=100;function D(e){let t,s,r,n=!1,i=!1,a=0,l=[],o=(d)=>e.postMessage(d),m=(d)=>{if(i)return;if(r)clearTimeout(r);r=setTimeout(k,d)},E=()=>{if(!s||Atomics.load(s,He)!==1)return;Atomics.store(s,Et,1),Atomics.notify(s,Et);while(Atomics.load(s,He)===1)Atomics.wait(s,He,1,1e4);Atomics.store(s,Et,0)};function k(){if(r=void 0,i||!t)return;E();let d=!1;try{d=t.step()}catch(f){o({type:"error",message:f instanceof Error?f.message:String(f),fatal:!1}),n=!1,m(R);return}let u=performance.now();if(d){if(n=!0,u-a>=v)a=u,o({type:"status",status:t.status()});m(0);return}n=!1,a=u;let h=t.status();o({type:"status",status:h});for(let f of l.splice(0))o({type:"flushed",id:f,status:h});m(R)}e.onmessage=(d)=>{let u=d.data;if(u.type==="init"){s=new Int32Array(u.flags);try{t=new T(u.options)}catch(h){o({type:"error",message:h instanceof Error?h.message:String(h),fatal:!0});return}o({type:"status",status:t.status()}),m(0)}else if(u.type==="dirty"){if(!n)m(0)}else if(u.type==="pause")E();else if(u.type==="flush"){if(l.push(u.id),!n)m(0)}else if(u.type==="stop"){if(i=!0,r)clearTimeout(r);t?.close(),o({type:"stopped"})}}}if(!Bun.isMainThread)D(globalThis);export{T as SearchEngine};
package/chunk-2gcp3xdc.js DELETED
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{bo,wt,at,w,pn,So}from"./chunk-320174qe.js";export{bo as child_process,wt as crypto,at as fs,w as path,pn as stream,So as util};
package/chunk-320174qe.js DELETED
@@ -1,2 +0,0 @@
1
- // @bun
2
- import*as bo from"child_process";import*as wt from"crypto";import*as at from"fs";import*as w from"path";import*as pn from"stream";import*as So from"util";export{bo,wt,at,w,pn,So};
package/chunk-dvb5nd2x.js DELETED
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Mn,Ii}from"./chunk-7kjr9gdx.js";export{Mn as runUIWorker,Ii as uiTest};