@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,10 +1,10 @@
1
- import{t,v,B,C,S,E,T,A,L,R,l,V,We,m}from"./chunk-3q0v8w45.js";var dt=function(){var e=t(function(H,i,n,s){for(n=n||{},s=H.length;s--;n[H[s]]=i);return n},"o"),y=[1,4],r=[1,14],o=[1,12],h=[1,13],f=[6,7,8],g=[1,20],d=[1,18],_=[1,19],u=[6,7,11],b=[1,6,13,14],w=[1,23],I=[1,24],M=[1,6,7,11,13,14],Z={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:t(function(i,n,s,c,p,a,P){var x=a.length-1;switch(p){case 6:case 7:return c;case 15:c.addNode(a[x-1].length,a[x].trim());break;case 16:c.addNode(0,a[x].trim());break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:y},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:y},{6:r,7:[1,10],9:9,12:11,13:o,14:h},e(f,[2,3]),{1:[2,2]},e(f,[2,4]),e(f,[2,5]),{1:[2,6],6:r,12:15,13:o,14:h},{6:r,9:16,12:11,13:o,14:h},{6:g,7:d,10:17,11:_},e(u,[2,18],{14:[1,21]}),e(u,[2,16]),e(u,[2,17]),{6:g,7:d,10:22,11:_},{1:[2,7],6:r,12:15,13:o,14:h},e(b,[2,14],{7:w,11:I}),e(M,[2,8]),e(M,[2,9]),e(M,[2,10]),e(u,[2,15]),e(b,[2,13],{7:w,11:I}),e(M,[2,11]),e(M,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:t(function(i,n){if(n.recoverable)this.trace(i);else{var s=Error(i);throw s.hash=n,s}},"parseError"),parse:t(function(i){var n=this,s=[0],c=[],p=[null],a=[],P=this.table,x="",F=0,N=0,W=0,j=2,Y=1,rt=a.slice.call(arguments,1),k=Object.create(this.lexer),D={yy:{}};for(var q in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,q))D.yy[q]=this.yy[q];if(k.setInput(i,D.yy),D.yy.lexer=k,D.yy.parser=this,typeof k.yylloc>"u")k.yylloc={};var Q=k.yylloc;a.push(Q);var lt=k.options&&k.options.ranges;if(typeof D.yy.parseError==="function")this.parseError=D.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function xt(U){s.length=s.length-2*U,p.length=p.length-U,a.length=a.length-U}t(xt,"popStack");function yt(){var U=c.pop()||k.lex()||Y;if(typeof U!=="number"){if(U instanceof Array)c=U,U=c.pop();U=n.symbols_[U]||U}return U}t(yt,"lex");var z,ot,J,G,Vt,ht,tt={},st,K,ft,nt;while(!0){if(J=s[s.length-1],this.defaultActions[J])G=this.defaultActions[J];else{if(z===null||typeof z>"u")z=yt();G=P[J]&&P[J][z]}if(typeof G>"u"||!G.length||!G[0]){var ct="";nt=[];for(st in P[J])if(this.terminals_[st]&&st>j)nt.push("'"+this.terminals_[st]+"'");if(k.showPosition)ct="Parse error on line "+(F+1)+`:
1
+ import{t,b,F,C,S,E,T,A,L,R,l,V,We,m}from"./chunk-veam6vk4.js";var dt=function(){var e=t(function(H,i,n,s){for(n=n||{},s=H.length;s--;n[H[s]]=i);return n},"o"),y=[1,4],r=[1,14],o=[1,12],h=[1,13],f=[6,7,8],g=[1,20],d=[1,18],x=[1,19],u=[6,7,11],_=[1,6,13,14],w=[1,23],I=[1,24],M=[1,6,7,11,13,14],Z={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:t(function(i,n,s,c,p,a,P){var v=a.length-1;switch(p){case 6:case 7:return c;case 15:c.addNode(a[v-1].length,a[v].trim());break;case 16:c.addNode(0,a[v].trim());break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:y},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:y},{6:r,7:[1,10],9:9,12:11,13:o,14:h},e(f,[2,3]),{1:[2,2]},e(f,[2,4]),e(f,[2,5]),{1:[2,6],6:r,12:15,13:o,14:h},{6:r,9:16,12:11,13:o,14:h},{6:g,7:d,10:17,11:x},e(u,[2,18],{14:[1,21]}),e(u,[2,16]),e(u,[2,17]),{6:g,7:d,10:22,11:x},{1:[2,7],6:r,12:15,13:o,14:h},e(_,[2,14],{7:w,11:I}),e(M,[2,8]),e(M,[2,9]),e(M,[2,10]),e(u,[2,15]),e(_,[2,13],{7:w,11:I}),e(M,[2,11]),e(M,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:t(function(i,n){if(n.recoverable)this.trace(i);else{var s=Error(i);throw s.hash=n,s}},"parseError"),parse:t(function(i){var n=this,s=[0],c=[],p=[null],a=[],P=this.table,v="",W=0,B=0,O=0,j=2,Y=1,rt=a.slice.call(arguments,1),k=Object.create(this.lexer),N={yy:{}};for(var q in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,q))N.yy[q]=this.yy[q];if(k.setInput(i,N.yy),N.yy.lexer=k,N.yy.parser=this,typeof k.yylloc>"u")k.yylloc={};var Q=k.yylloc;a.push(Q);var lt=k.options&&k.options.ranges;if(typeof N.yy.parseError==="function")this.parseError=N.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function xt(U){s.length=s.length-2*U,p.length=p.length-U,a.length=a.length-U}t(xt,"popStack");function yt(){var U=c.pop()||k.lex()||Y;if(typeof U!=="number"){if(U instanceof Array)c=U,U=c.pop();U=n.symbols_[U]||U}return U}t(yt,"lex");var z,ot,J,G,Vt,ht,tt={},st,K,ft,nt;while(!0){if(J=s[s.length-1],this.defaultActions[J])G=this.defaultActions[J];else{if(z===null||typeof z>"u")z=yt();G=P[J]&&P[J][z]}if(typeof G>"u"||!G.length||!G[0]){var ct="";nt=[];for(st in P[J])if(this.terminals_[st]&&st>j)nt.push("'"+this.terminals_[st]+"'");if(k.showPosition)ct="Parse error on line "+(W+1)+`:
2
2
  `+k.showPosition()+`
3
- Expecting `+nt.join(", ")+", got '"+(this.terminals_[z]||z)+"'";else ct="Parse error on line "+(F+1)+": Unexpected "+(z==Y?"end of input":"'"+(this.terminals_[z]||z)+"'");this.parseError(ct,{text:k.match,token:this.terminals_[z]||z,line:k.yylineno,loc:Q,expected:nt})}if(G[0]instanceof Array&&G.length>1)throw Error("Parse Error: multiple actions possible at state: "+J+", token: "+z);switch(G[0]){case 1:if(s.push(z),p.push(k.yytext),a.push(k.yylloc),s.push(G[1]),z=null,!ot){if(N=k.yyleng,x=k.yytext,F=k.yylineno,Q=k.yylloc,W>0)W--}else z=ot,ot=null;break;case 2:if(K=this.productions_[G[1]][1],tt.$=p[p.length-K],tt._$={first_line:a[a.length-(K||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(K||1)].first_column,last_column:a[a.length-1].last_column},lt)tt._$.range=[a[a.length-(K||1)].range[0],a[a.length-1].range[1]];if(ht=this.performAction.apply(tt,[x,N,F,D.yy,G[1],p,a].concat(rt)),typeof ht<"u")return ht;if(K)s=s.slice(0,-1*K*2),p=p.slice(0,-1*K),a=a.slice(0,-1*K);s.push(this.productions_[G[1]][0]),p.push(tt.$),a.push(tt._$),ft=P[s[s.length-2]][s[s.length-1]],s.push(ft);break;case 3:return!0}}return!0},"parse")},X=function(){var H={EOF:1,parseError:t(function(n,s){if(this.yy.parser)this.yy.parser.parseError(n,s);else throw Error(n)},"parseError"),setInput:t(function(i,n){if(this.yy=n||this.yy||{},this._input=i,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 i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var n=i.match(/(?:\r\n?|\n).*/g);if(n)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),i},"input"),unput:t(function(i){var n=i.length,s=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var c=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),s.length-1)this.yylineno-=s.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:s?(s.length===c.length?this.yylloc.first_column:0)+c[c.length-s.length].length-s[0].length:this.yylloc.first_column-n},this.options.ranges)this.yylloc.range=[p[0],p[0]+this.yyleng-n];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 `+nt.join(", ")+", got '"+(this.terminals_[z]||z)+"'";else ct="Parse error on line "+(W+1)+": Unexpected "+(z==Y?"end of input":"'"+(this.terminals_[z]||z)+"'");this.parseError(ct,{text:k.match,token:this.terminals_[z]||z,line:k.yylineno,loc:Q,expected:nt})}if(G[0]instanceof Array&&G.length>1)throw Error("Parse Error: multiple actions possible at state: "+J+", token: "+z);switch(G[0]){case 1:if(s.push(z),p.push(k.yytext),a.push(k.yylloc),s.push(G[1]),z=null,!ot){if(B=k.yyleng,v=k.yytext,W=k.yylineno,Q=k.yylloc,O>0)O--}else z=ot,ot=null;break;case 2:if(K=this.productions_[G[1]][1],tt.$=p[p.length-K],tt._$={first_line:a[a.length-(K||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(K||1)].first_column,last_column:a[a.length-1].last_column},lt)tt._$.range=[a[a.length-(K||1)].range[0],a[a.length-1].range[1]];if(ht=this.performAction.apply(tt,[v,B,W,N.yy,G[1],p,a].concat(rt)),typeof ht<"u")return ht;if(K)s=s.slice(0,-1*K*2),p=p.slice(0,-1*K),a=a.slice(0,-1*K);s.push(this.productions_[G[1]][0]),p.push(tt.$),a.push(tt._$),ft=P[s[s.length-2]][s[s.length-1]],s.push(ft);break;case 3:return!0}}return!0},"parse")},X=function(){var H={EOF:1,parseError:t(function(n,s){if(this.yy.parser)this.yy.parser.parseError(n,s);else throw Error(n)},"parseError"),setInput:t(function(i,n){if(this.yy=n||this.yy||{},this._input=i,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 i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var n=i.match(/(?:\r\n?|\n).*/g);if(n)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),i},"input"),unput:t(function(i){var n=i.length,s=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var c=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),s.length-1)this.yylineno-=s.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:s?(s.length===c.length?this.yylloc.first_column:0)+c[c.length-s.length].length-s[0].length:this.yylloc.first_column-n},this.options.ranges)this.yylloc.range=[p[0],p[0]+this.yyleng-n];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(i){this.unput(this.match.slice(i))},"less"),pastInput:t(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:t(function(){var i=this.match;if(i.length<20)i+=this._input.substr(0,20-i.length);return(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:t(function(){var i=this.pastInput(),n=Array(i.length+1).join("-");return i+this.upcomingInput()+`
5
5
  `+n+"^"},"showPosition"),test_match:t(function(i,n){var s,c,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(c=i[0].match(/(?:\r\n?|\n).*/g),c)this.yylineno+=c.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:c?c[c.length-1].length-c[c.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,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(i[0].length),this.matched+=i[0],s=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(s)return s;else if(this._backtrack){for(var a in p)this[a]=p[a];return!1}return!1},"test_match"),next:t(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var i,n,s,c;if(!this._more)this.yytext="",this.match="";var p=this._currentRules();for(var a=0;a<p.length;a++)if(s=this._input.match(this.rules[p[a]]),s&&(!n||s[0].length>n[0].length)){if(n=s,c=a,this.options.backtrack_lexer)if(i=this.test_match(s,p[a]),i!==!1)return i;else if(this._backtrack){n=!1;continue}else return!1;else if(!this.options.flex)break}if(n){if(i=this.test_match(n,p[c]),i!==!1)return i;return!1}if(this._input==="")return this.EOF;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:t(function(){var n=this.next();if(n)return n;else return this.lex()},"lex"),begin:t(function(n){this.conditionStack.push(n)},"begin"),popState:t(function(){var n=this.conditionStack.length-1;if(n>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(n){if(n=this.conditionStack.length-1-Math.abs(n||0),n>=0)return this.conditionStack[n];else return"INITIAL"},"topState"),pushState:t(function(n){this.begin(n)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:t(function(n,s,c,p){var a=p;switch(c){case 0:return 6;case 1:return 8;case 2:return 8;case 3:return 6;case 4:return 7;case 5:return 13;case 6:return 14;case 7:return 11}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:ishikawa-beta\b)/i,/^(?:ishikawa\b)/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:[^\n]+)/i,/^(?:$)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}};return H}();Z.lexer=X;function O(){this.yy={}}return t(O,"Parser"),O.prototype=Z,Z.Parser=O,new O}();dt.parser=dt;var vt=dt,St=class{constructor(){this.stack=[],this.clear=this.clear.bind(this),this.addNode=this.addNode.bind(this),this.getRoot=this.getRoot.bind(this)}static{t(this,"IshikawaDB")}clear(){this.root=void 0,this.stack=[],this.baseLevel=void 0,C()}getRoot(){return this.root}addNode(e,y){let r=v.sanitizeText(y,l());if(!this.root){this.root={text:r,children:[]},this.stack=[{level:0,node:this.root}],L(r);return}this.baseLevel??=e;let o=e-this.baseLevel+1;if(o<=0)o=1;while(this.stack.length>1&&this.stack[this.stack.length-1].level>=o)this.stack.pop();let h=this.stack[this.stack.length-1].node,f={text:r,children:[]};h.children.push(f),this.stack.push({level:o,node:f})}getAccTitle(){return E()}setAccTitle(e){S(e)}getAccDescription(){return A()}setAccDescription(e){T(e)}getDiagramTitle(){return R()}setDiagramTitle(e){L(e)}},Et=14,et=250,$t=30,At=60,It=5,bt=82*Math.PI/180,pt=Math.cos(bt),gt=Math.sin(bt),kt=t((e,y,r)=>{let o=e.node().getBBox(),h=o.width+y*2,f=o.height+y*2;B(e,f,h,r),e.attr("viewBox",`${o.x-y} ${o.y-y} ${h} ${f}`)},"applyPaddedViewBox"),Lt=t((e,y,r,o)=>{let f=o.db.getRoot();if(!f)return;let g=l(),{look:d,handDrawnSeed:_,themeVariables:u}=g,b=We(g.fontSize)[0]??Et,w=d==="handDrawn",I=f.children??[],M=g.ishikawa?.diagramPadding??20,Z=g.ishikawa?.useMaxWidth??!1,X=V(y),O=X.append("g").attr("class","ishikawa"),H=w?m.svg(X.node()):void 0,i=H?{roughSvg:H,seed:_??0,lineColor:u?.lineColor??"#333",fillColor:u?.mainBkg??"#fff"}:void 0,n=`ishikawa-arrow-${y}`;if(!w)O.append("defs").append("marker").attr("id",n).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 Z").attr("class","ishikawa-arrow");let s=0,c=et,p=w?void 0:it(O,s,c,s,c,"ishikawa-spine");if(Tt(O,s,c,f.text,b,i),!I.length){if(w)it(O,s,c,s,c,"ishikawa-spine",i);kt(X,M,Z);return}s-=20;let a=I.filter((k,D)=>D%2===0),P=I.filter((k,D)=>D%2===1),x=mt(a),F=mt(P),N=x.total+F.total,W=et,j=et;if(N>0){let k=et*2,D=et*0.3;W=Math.max(D,k*(x.total/N)),j=Math.max(D,k*(F.total/N))}let Y=b*2;if(W=Math.max(W,x.max*Y),j=Math.max(j,F.max*Y),c=Math.max(W,et),p)p.attr("y1",c).attr("y2",c);O.select(".ishikawa-head-group").attr("transform",`translate(0,${c})`);let rt=Math.ceil(I.length/2);for(let k=0;k<rt;k++){let D=O.append("g").attr("class","ishikawa-pair");for(let[q,Q,lt]of[[I[k*2],-1,W],[I[k*2+1],1,j]])if(q)Bt(D,q,s,c,Q,lt,b,i);s=D.selectAll("text").nodes().reduce((q,Q)=>Math.min(q,Q.getBBox().x),1/0)}if(w)it(O,s,c,0,c,"ishikawa-spine",i);else{p.attr("x1",s);let k=`url(#${n})`;O.selectAll("line.ishikawa-branch, line.ishikawa-sub-branch").attr("marker-start",k)}kt(X,M,Z)},"draw"),mt=t((e)=>{let y=t((r)=>r.children.reduce((o,h)=>o+1+y(h),0),"countDescendants");return e.reduce((r,o)=>{let h=y(o);return r.total+=h,r.max=Math.max(r.max,h),r},{total:0,max:0})},"sideStats"),Tt=t((e,y,r,o,h,f)=>{let g=Math.max(6,Math.floor(110/(h*0.6))),d=e.append("g").attr("class","ishikawa-head-group").attr("transform",`translate(${y},${r})`),_=at(d,_t(o,g),0,0,"ishikawa-head-label","start",h),u=_.node().getBBox(),b=Math.max(60,u.width+6),w=Math.max(40,u.height*2+40),I=`M 0 ${-w/2} L 0 ${w/2} Q ${b*2.4} 0 0 ${-w/2} Z`;if(f){let M=f.roughSvg.path(I,{roughness:1.5,seed:f.seed,fill:f.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:f.lineColor,strokeWidth:2});d.insert(()=>M,":first-child").attr("class","ishikawa-head")}else d.insert("path",":first-child").attr("class","ishikawa-head").attr("d",I);_.attr("transform",`translate(${(b-u.width)/2-u.x+3},${-u.y-u.height/2})`)},"drawHead"),Mt=t((e,y)=>{let r=[],o=[],h=t((f,g,d)=>{let _=y===-1?[...f].reverse():f;for(let u of _){let b=r.length,w=u.children??[];if(r.push({depth:d,text:_t(u.text,15),parentIndex:g,childCount:w.length}),d%2===0){if(o.push(b),w.length)h(w,b,d+1)}else{if(w.length)h(w,b,d+1);o.push(b)}}},"walk");return h(e,-1,2),{entries:r,yOrder:o}},"flattenTree"),Pt=t((e,y,r,o,h,f,g)=>{let d=e.append("g").attr("class","ishikawa-label-group"),u=at(d,y,r,o+11*h,"ishikawa-label cause","middle",f).node().getBBox();if(g){let b=g.roughSvg.rectangle(u.x-20,u.y-2,u.width+40,u.height+4,{roughness:1.5,seed:g.seed,fill:g.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:g.lineColor,strokeWidth:2});d.insert(()=>b,":first-child").attr("class","ishikawa-label-box")}else d.insert("rect",":first-child").attr("class","ishikawa-label-box").attr("x",u.x-20).attr("y",u.y-2).attr("width",u.width+40).attr("height",u.height+4)},"drawCauseLabel"),ut=t((e,y,r,o,h,f)=>{let g=Math.sqrt(o*o+h*h);if(g===0)return;let d=o/g,_=h/g,u=6,b=-_*u,w=d*u,I=y,M=r,Z=`M ${I} ${M} L ${I-d*u*2+b} ${M-_*u*2+w} L ${I-d*u*2-b} ${M-_*u*2-w} Z`,X=f.roughSvg.path(Z,{roughness:1,seed:f.seed,fill:f.lineColor,fillStyle:"solid",stroke:f.lineColor,strokeWidth:1});e.append(()=>X)},"drawArrowMarker"),Bt=t((e,y,r,o,h,f,g,d)=>{let _=y.children??[],u=f*(_.length?1:0.2),b=-pt*u,w=gt*u*h,I=r+b,M=o+w;if(it(e,r,o,I,M,"ishikawa-branch",d),d)ut(e,r,o,r-I,o-M,d);if(Pt(e,y.text,I,M,h,g,d),!_.length)return;let{entries:Z,yOrder:X}=Mt(_,h),O=Z.length,H=Array(O);for(let[p,a]of X.entries())H[a]=o+w*((p+1)/(O+1));let i=new Map;i.set(-1,{x0:r,y0:o,x1:I,y1:M,childCount:_.length,childrenDrawn:0});let n=-pt,s=gt*h,c=h<0?"ishikawa-label up":"ishikawa-label down";for(let[p,a]of Z.entries()){let P=H[p],x=i.get(a.parentIndex),F=e.append("g").attr("class","ishikawa-sub-group"),N=0,W=0,j=0;if(a.depth%2===0){let Y=x.y1-x.y0;if(N=wt(x.x0,x.x1,Y?(P-x.y0)/Y:0.5),W=P,j=N-(a.childCount>0?At+a.childCount*It:$t),it(F,N,P,j,P,"ishikawa-sub-branch",d),d)ut(F,N,P,1,0,d);at(F,a.text,j,P,"ishikawa-label align","end",g)}else{let Y=x.childrenDrawn++;if(N=wt(x.x0,x.x1,(x.childCount-Y)/(x.childCount+1)),W=x.y0,j=N+n*((P-W)/s),it(F,N,W,j,P,"ishikawa-sub-branch",d),d)ut(F,N,W,N-j,W-P,d);at(F,a.text,j,P,c,"end",g)}if(a.childCount>0)i.set(p,{x0:N,y0:W,x1:j,y1:P,childCount:a.childCount,childrenDrawn:0})}},"drawBranch"),Nt=t((e)=>e.split(/<br\s*\/?>|\n/),"splitLines"),_t=t((e,y)=>{if(e.length<=y)return e;let r=[];for(let o of e.split(/\s+/)){let h=r.length-1;if(h>=0&&r[h].length+1+o.length<=y)r[h]+=" "+o;else r.push(o)}return r.join(`
7
- `)},"wrapText"),at=t((e,y,r,o,h,f,g)=>{let d=Nt(y),_=g*1.05,u=e.append("text").attr("class",h).attr("text-anchor",f).attr("x",r).attr("y",o-(d.length-1)*_/2);for(let[b,w]of d.entries())u.append("tspan").attr("x",r).attr("dy",b===0?0:_).text(w);return u},"drawMultilineText"),wt=t((e,y,r)=>e+(y-e)*r,"lerp"),it=t((e,y,r,o,h,f,g)=>{if(g){let d=g.roughSvg.line(y,r,o,h,{roughness:1.5,seed:g.seed,stroke:g.lineColor,strokeWidth:2});e.append(()=>d).attr("class",f);return}return e.append("line").attr("class",f).attr("x1",y).attr("y1",r).attr("x2",o).attr("y2",h)},"drawLine"),Dt={draw:Lt},Ot=t((e)=>`
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:t(function(){var n=this.next();if(n)return n;else return this.lex()},"lex"),begin:t(function(n){this.conditionStack.push(n)},"begin"),popState:t(function(){var n=this.conditionStack.length-1;if(n>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(n){if(n=this.conditionStack.length-1-Math.abs(n||0),n>=0)return this.conditionStack[n];else return"INITIAL"},"topState"),pushState:t(function(n){this.begin(n)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:t(function(n,s,c,p){var a=p;switch(c){case 0:return 6;case 1:return 8;case 2:return 8;case 3:return 6;case 4:return 7;case 5:return 13;case 6:return 14;case 7:return 11}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:ishikawa-beta\b)/i,/^(?:ishikawa\b)/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:[^\n]+)/i,/^(?:$)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}};return H}();Z.lexer=X;function D(){this.yy={}}return t(D,"Parser"),D.prototype=Z,Z.Parser=D,new D}();dt.parser=dt;var vt=dt,St=class{constructor(){this.stack=[],this.clear=this.clear.bind(this),this.addNode=this.addNode.bind(this),this.getRoot=this.getRoot.bind(this)}static{t(this,"IshikawaDB")}clear(){this.root=void 0,this.stack=[],this.baseLevel=void 0,C()}getRoot(){return this.root}addNode(e,y){let r=b.sanitizeText(y,l());if(!this.root){this.root={text:r,children:[]},this.stack=[{level:0,node:this.root}],L(r);return}this.baseLevel??=e;let o=e-this.baseLevel+1;if(o<=0)o=1;while(this.stack.length>1&&this.stack[this.stack.length-1].level>=o)this.stack.pop();let h=this.stack[this.stack.length-1].node,f={text:r,children:[]};h.children.push(f),this.stack.push({level:o,node:f})}getAccTitle(){return E()}setAccTitle(e){S(e)}getAccDescription(){return A()}setAccDescription(e){T(e)}getDiagramTitle(){return R()}setDiagramTitle(e){L(e)}},Et=14,et=250,$t=30,At=60,It=5,bt=82*Math.PI/180,pt=Math.cos(bt),gt=Math.sin(bt),kt=t((e,y,r)=>{let o=e.node().getBBox(),h=o.width+y*2,f=o.height+y*2;F(e,f,h,r),e.attr("viewBox",`${o.x-y} ${o.y-y} ${h} ${f}`)},"applyPaddedViewBox"),Lt=t((e,y,r,o)=>{let f=o.db.getRoot();if(!f)return;let g=l(),{look:d,handDrawnSeed:x,themeVariables:u}=g,_=We(g.fontSize)[0]??Et,w=d==="handDrawn",I=f.children??[],M=g.ishikawa?.diagramPadding??20,Z=g.ishikawa?.useMaxWidth??!1,X=V(y),D=X.append("g").attr("class","ishikawa"),H=w?m.svg(X.node()):void 0,i=H?{roughSvg:H,seed:x??0,lineColor:u?.lineColor??"#333",fillColor:u?.mainBkg??"#fff"}:void 0,n=`ishikawa-arrow-${y}`;if(!w)D.append("defs").append("marker").attr("id",n).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 Z").attr("class","ishikawa-arrow");let s=0,c=et,p=w?void 0:it(D,s,c,s,c,"ishikawa-spine");if(Tt(D,s,c,f.text,_,i),!I.length){if(w)it(D,s,c,s,c,"ishikawa-spine",i);kt(X,M,Z);return}s-=20;let a=I.filter((k,N)=>N%2===0),P=I.filter((k,N)=>N%2===1),v=mt(a),W=mt(P),B=v.total+W.total,O=et,j=et;if(B>0){let k=et*2,N=et*0.3;O=Math.max(N,k*(v.total/B)),j=Math.max(N,k*(W.total/B))}let Y=_*2;if(O=Math.max(O,v.max*Y),j=Math.max(j,W.max*Y),c=Math.max(O,et),p)p.attr("y1",c).attr("y2",c);D.select(".ishikawa-head-group").attr("transform",`translate(0,${c})`);let rt=Math.ceil(I.length/2);for(let k=0;k<rt;k++){let N=D.append("g").attr("class","ishikawa-pair");for(let[q,Q,lt]of[[I[k*2],-1,O],[I[k*2+1],1,j]])if(q)Bt(N,q,s,c,Q,lt,_,i);s=N.selectAll("text").nodes().reduce((q,Q)=>Math.min(q,Q.getBBox().x),1/0)}if(w)it(D,s,c,0,c,"ishikawa-spine",i);else{p.attr("x1",s);let k=`url(#${n})`;D.selectAll("line.ishikawa-branch, line.ishikawa-sub-branch").attr("marker-start",k)}kt(X,M,Z)},"draw"),mt=t((e)=>{let y=t((r)=>r.children.reduce((o,h)=>o+1+y(h),0),"countDescendants");return e.reduce((r,o)=>{let h=y(o);return r.total+=h,r.max=Math.max(r.max,h),r},{total:0,max:0})},"sideStats"),Tt=t((e,y,r,o,h,f)=>{let g=Math.max(6,Math.floor(110/(h*0.6))),d=e.append("g").attr("class","ishikawa-head-group").attr("transform",`translate(${y},${r})`),x=at(d,_t(o,g),0,0,"ishikawa-head-label","start",h),u=x.node().getBBox(),_=Math.max(60,u.width+6),w=Math.max(40,u.height*2+40),I=`M 0 ${-w/2} L 0 ${w/2} Q ${_*2.4} 0 0 ${-w/2} Z`;if(f){let M=f.roughSvg.path(I,{roughness:1.5,seed:f.seed,fill:f.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:f.lineColor,strokeWidth:2});d.insert(()=>M,":first-child").attr("class","ishikawa-head")}else d.insert("path",":first-child").attr("class","ishikawa-head").attr("d",I);x.attr("transform",`translate(${(_-u.width)/2-u.x+3},${-u.y-u.height/2})`)},"drawHead"),Mt=t((e,y)=>{let r=[],o=[],h=t((f,g,d)=>{let x=y===-1?[...f].reverse():f;for(let u of x){let _=r.length,w=u.children??[];if(r.push({depth:d,text:_t(u.text,15),parentIndex:g,childCount:w.length}),d%2===0){if(o.push(_),w.length)h(w,_,d+1)}else{if(w.length)h(w,_,d+1);o.push(_)}}},"walk");return h(e,-1,2),{entries:r,yOrder:o}},"flattenTree"),Pt=t((e,y,r,o,h,f,g)=>{let d=e.append("g").attr("class","ishikawa-label-group"),u=at(d,y,r,o+11*h,"ishikawa-label cause","middle",f).node().getBBox();if(g){let _=g.roughSvg.rectangle(u.x-20,u.y-2,u.width+40,u.height+4,{roughness:1.5,seed:g.seed,fill:g.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:g.lineColor,strokeWidth:2});d.insert(()=>_,":first-child").attr("class","ishikawa-label-box")}else d.insert("rect",":first-child").attr("class","ishikawa-label-box").attr("x",u.x-20).attr("y",u.y-2).attr("width",u.width+40).attr("height",u.height+4)},"drawCauseLabel"),ut=t((e,y,r,o,h,f)=>{let g=Math.sqrt(o*o+h*h);if(g===0)return;let d=o/g,x=h/g,u=6,_=-x*u,w=d*u,I=y,M=r,Z=`M ${I} ${M} L ${I-d*u*2+_} ${M-x*u*2+w} L ${I-d*u*2-_} ${M-x*u*2-w} Z`,X=f.roughSvg.path(Z,{roughness:1,seed:f.seed,fill:f.lineColor,fillStyle:"solid",stroke:f.lineColor,strokeWidth:1});e.append(()=>X)},"drawArrowMarker"),Bt=t((e,y,r,o,h,f,g,d)=>{let x=y.children??[],u=f*(x.length?1:0.2),_=-pt*u,w=gt*u*h,I=r+_,M=o+w;if(it(e,r,o,I,M,"ishikawa-branch",d),d)ut(e,r,o,r-I,o-M,d);if(Pt(e,y.text,I,M,h,g,d),!x.length)return;let{entries:Z,yOrder:X}=Mt(x,h),D=Z.length,H=Array(D);for(let[p,a]of X.entries())H[a]=o+w*((p+1)/(D+1));let i=new Map;i.set(-1,{x0:r,y0:o,x1:I,y1:M,childCount:x.length,childrenDrawn:0});let n=-pt,s=gt*h,c=h<0?"ishikawa-label up":"ishikawa-label down";for(let[p,a]of Z.entries()){let P=H[p],v=i.get(a.parentIndex),W=e.append("g").attr("class","ishikawa-sub-group"),B=0,O=0,j=0;if(a.depth%2===0){let Y=v.y1-v.y0;if(B=wt(v.x0,v.x1,Y?(P-v.y0)/Y:0.5),O=P,j=B-(a.childCount>0?At+a.childCount*It:$t),it(W,B,P,j,P,"ishikawa-sub-branch",d),d)ut(W,B,P,1,0,d);at(W,a.text,j,P,"ishikawa-label align","end",g)}else{let Y=v.childrenDrawn++;if(B=wt(v.x0,v.x1,(v.childCount-Y)/(v.childCount+1)),O=v.y0,j=B+n*((P-O)/s),it(W,B,O,j,P,"ishikawa-sub-branch",d),d)ut(W,B,O,B-j,O-P,d);at(W,a.text,j,P,c,"end",g)}if(a.childCount>0)i.set(p,{x0:B,y0:O,x1:j,y1:P,childCount:a.childCount,childrenDrawn:0})}},"drawBranch"),Nt=t((e)=>e.split(/<br\s*\/?>|\n/),"splitLines"),_t=t((e,y)=>{if(e.length<=y)return e;let r=[];for(let o of e.split(/\s+/)){let h=r.length-1;if(h>=0&&r[h].length+1+o.length<=y)r[h]+=" "+o;else r.push(o)}return r.join(`
7
+ `)},"wrapText"),at=t((e,y,r,o,h,f,g)=>{let d=Nt(y),x=g*1.05,u=e.append("text").attr("class",h).attr("text-anchor",f).attr("x",r).attr("y",o-(d.length-1)*x/2);for(let[_,w]of d.entries())u.append("tspan").attr("x",r).attr("dy",_===0?0:x).text(w);return u},"drawMultilineText"),wt=t((e,y,r)=>e+(y-e)*r,"lerp"),it=t((e,y,r,o,h,f,g)=>{if(g){let d=g.roughSvg.line(y,r,o,h,{roughness:1.5,seed:g.seed,stroke:g.lineColor,strokeWidth:2});e.append(()=>d).attr("class",f);return}return e.append("line").attr("class",f).attr("x1",y).attr("y1",r).attr("x2",o).attr("y2",h)},"drawLine"),Dt={draw:Lt},Ot=t((e)=>`
8
8
  .ishikawa .ishikawa-spine,
9
9
  .ishikawa .ishikawa-branch,
10
10
  .ishikawa .ishikawa-sub-branch {
@@ -1 +1 @@
1
- import{t,a}from"./chunk-3q0v8w45.js";import{te,Dt,Nt}from"./chunk-2axwda8c.js";import{G}from"./chunk-jzte2phh.js";import{or,wt}from"./chunk-8dp7h6w8.js";var i=or().RailroadPeg.parser.LangiumParser,s=t((e)=>{let r=e.alternatives.map(l);if(r.length===1)return r[0];return{type:"choice",alternatives:r}},"transformOrderedChoice"),l=t((e)=>{let r=e.elements.map(m);if(r.length===1)return r[0];return{type:"sequence",elements:r}},"transformSequence"),m=t((e)=>{let r=p(e.suffix);if(!e.operator)return r;return{type:"special",text:e.operator==="&"?`&${o(r)}`:`!${o(r)}`}},"transformPrefix"),o=t((e)=>{switch(e.type){case"terminal":return`"${e.value}"`;case"nonterminal":return e.name;case"special":return e.text;default:return"(...)"}},"nodeToLabel"),p=t((e)=>{let r=u(e.primary);if(!e.operator)return r;switch(e.operator){case"?":return{type:"optional",element:r};case"*":return{type:"repetition",element:r,min:0,max:1/0};case"+":return{type:"repetition",element:r,min:1,max:1/0};default:throw Error(`Unsupported PEG suffix operator: ${e.operator}`)}},"transformSuffix"),u=t((e)=>{switch(e.$type){case"PegLiteral":return{type:"terminal",value:e.value};case"PegIdentifier":return{type:"nonterminal",name:e.name};case"PegGroup":return s(e.element);case"PegAny":return{type:"special",text:e.dot};default:throw Error(`Unsupported PEG primary node: ${e.$type}`)}},"transformPrimary"),c=t((e)=>({name:e.name,definition:s(e.definition)}),"transformRule"),f=t((e)=>{if(G(e,te),e.title)te.setTitle(e.title);e.rules.map((r)=>te.addRule(c(r)))},"populateDb"),d={parse:t((e)=>{te.clear(),a.debug("[PEG Parser] Starting Langium parse");let r=i.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new wt(r);let n=r.value;a.debug("[PEG Parser] Parsed rules:",n.rules.length),f(n),a.debug("[PEG Parser] Parse complete")},"parse"),parser:{yy:te}},w={parser:d,db:te,renderer:Nt,styles:Dt};export{w as diagram};
1
+ import{t,a}from"./chunk-veam6vk4.js";import{ee,Dt,Nt}from"./chunk-xx11yv61.js";import{G}from"./chunk-dwjmr0zj.js";import{or,wt}from"./chunk-60axh4sa.js";var i=or().RailroadPeg.parser.LangiumParser,s=t((e)=>{let r=e.alternatives.map(l);if(r.length===1)return r[0];return{type:"choice",alternatives:r}},"transformOrderedChoice"),l=t((e)=>{let r=e.elements.map(m);if(r.length===1)return r[0];return{type:"sequence",elements:r}},"transformSequence"),m=t((e)=>{let r=p(e.suffix);if(!e.operator)return r;return{type:"special",text:e.operator==="&"?`&${o(r)}`:`!${o(r)}`}},"transformPrefix"),o=t((e)=>{switch(e.type){case"terminal":return`"${e.value}"`;case"nonterminal":return e.name;case"special":return e.text;default:return"(...)"}},"nodeToLabel"),p=t((e)=>{let r=u(e.primary);if(!e.operator)return r;switch(e.operator){case"?":return{type:"optional",element:r};case"*":return{type:"repetition",element:r,min:0,max:1/0};case"+":return{type:"repetition",element:r,min:1,max:1/0};default:throw Error(`Unsupported PEG suffix operator: ${e.operator}`)}},"transformSuffix"),u=t((e)=>{switch(e.$type){case"PegLiteral":return{type:"terminal",value:e.value};case"PegIdentifier":return{type:"nonterminal",name:e.name};case"PegGroup":return s(e.element);case"PegAny":return{type:"special",text:e.dot};default:throw Error(`Unsupported PEG primary node: ${e.$type}`)}},"transformPrimary"),c=t((e)=>({name:e.name,definition:s(e.definition)}),"transformRule"),f=t((e)=>{if(G(e,ee),e.title)ee.setTitle(e.title);e.rules.map((r)=>ee.addRule(c(r)))},"populateDb"),d={parse:t((e)=>{ee.clear(),a.debug("[PEG Parser] Starting Langium parse");let r=i.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new wt(r);let n=r.value;a.debug("[PEG Parser] Parsed rules:",n.rules.length),f(n),a.debug("[PEG Parser] Parse complete")},"parse"),parser:{yy:ee}},w={parser:d,db:ee,renderer:Nt,styles:Dt};export{w as diagram};
@@ -0,0 +1 @@
1
+ import{Ri}from"./chunk-60axh4sa.js";export{Ri as createInfoServices};
@@ -1,20 +1,20 @@
1
- import{t,Qt,a,de,v,C,S,E,T,A,L,R,l,p,M,ze,Xr,pe,se,le,gt,ye,ve}from"./chunk-3q0v8w45.js";import{Bt}from"./chunk-dynajx8x.js";import{ge}from"./chunk-cn0tmwjs.js";import{ue}from"./chunk-svh2gkx8.js";var Ue=function(){var s=t(function(q,o,h,f){for(h=h||{},f=q.length;f--;h[q[f]]=o);return h},"o"),c=[6,9,21,23,25,27,34,37,38,39,40,41,43,46,47,51,53,54,55],b=[2,2],n=[1,7],u=[1,9],g=[1,10],N=[1,11],y=[1,12],x=[1,30],k=[1,23],_=[1,24],B=[1,25],W=[1,26],X=[1,27],I=[1,19],Y=[1,28],te=[1,29],G=[1,20],P=[1,18],z=[1,21],U=[1,22],Ke=[2,6],d=[6,9,21,23,25,27,33,34,37,38,39,40,41,43,46,47,51,53,54,55],Ie=[1,36],Re=[1,37],De=[1,38],Le=[1,39],we=[1,40],ie=[6,9,12,14,16,19,20,21,23,25,27,33,34,37,38,39,40,41,43,46,47,50,51,53,54,55,69,70,71,72,73],K=[1,46],Z=[1,47],re=[1,57],ae=[43,51,53,54,55,74,75],ne=[1,70],oe=[1,68],j=[1,65],ce=[1,69],he=[1,71],ke=[6,9,12,16,21,23,25,27,33,34,37,38,39,40,41,43,44,45,46,47,51,52,53,54,55,69,70,71,72,73],_e=[1,78],me=[1,77],Ee=[1,76],Ze=[69,70,71,72,73],je=[1,91],qe=[6,9,45,50],J=[6,9,12,44,45,50,51,52],Se=[1,101],Te=[1,100],Ce=[1,99],be=[18,61],We=[1,110],He=[1,109],Qe=[20,43,51,53,54,55],Ve=[18,61,64,66],Me={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,statement:8,NEWLINE:9,entityName:10,relSpec:11,COLON:12,role:13,STYLE_SEPARATOR:14,idList:15,BLOCK_START:16,attributes:17,BLOCK_STOP:18,SQS:19,SQE:20,title:21,title_value:22,acc_title:23,acc_title_value:24,acc_descr:25,acc_descr_value:26,acc_descr_multiline_value:27,direction:28,classDefStatement:29,classStatement:30,styleStatement:31,subgraphHeader:32,END:33,SUBGRAPH:34,separator:35,subgraphTitle:36,direction_tb:37,direction_bt:38,direction_rl:39,direction_lr:40,CLASSDEF:41,stylesOpt:42,UNICODE_TEXT:43,STYLE_TEXT:44,COMMA:45,CLASS:46,STYLE:47,style:48,styleComponent:49,SEMI:50,NUM:51,BRKT:52,ENTITY_NAME:53,DECIMAL_NUM:54,ENTITY_ONE:55,attribute:56,attributeType:57,attributeName:58,attributeKeyTypeList:59,attributeComment:60,ATTRIBUTE_WORD:61,"?":62,attributeKeyType:63,",":64,ATTRIBUTE_KEY:65,COMMENT:66,cardinality:67,relType:68,ZERO_OR_ONE:69,ZERO_OR_MORE:70,ONE_OR_MORE:71,ONLY_ONE:72,MD_PARENT:73,NON_IDENTIFYING:74,IDENTIFYING:75,WORD:76,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"NEWLINE",12:"COLON",14:"STYLE_SEPARATOR",16:"BLOCK_START",18:"BLOCK_STOP",19:"SQS",20:"SQE",21:"title",22:"title_value",23:"acc_title",24:"acc_title_value",25:"acc_descr",26:"acc_descr_value",27:"acc_descr_multiline_value",33:"END",34:"SUBGRAPH",37:"direction_tb",38:"direction_bt",39:"direction_rl",40:"direction_lr",41:"CLASSDEF",43:"UNICODE_TEXT",44:"STYLE_TEXT",45:"COMMA",46:"CLASS",47:"STYLE",50:"SEMI",51:"NUM",52:"BRKT",53:"ENTITY_NAME",54:"DECIMAL_NUM",55:"ENTITY_ONE",61:"ATTRIBUTE_WORD",62:"?",64:",",65:"ATTRIBUTE_KEY",66:"COMMENT",69:"ZERO_OR_ONE",70:"ZERO_OR_MORE",71:"ONE_OR_MORE",72:"ONLY_ONE",73:"MD_PARENT",74:"NON_IDENTIFYING",75:"IDENTIFYING",76:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[7,1],[8,5],[8,9],[8,7],[8,7],[8,4],[8,6],[8,3],[8,5],[8,1],[8,3],[8,7],[8,9],[8,6],[8,8],[8,4],[8,6],[8,2],[8,2],[8,2],[8,1],[8,1],[8,1],[8,1],[8,1],[8,3],[32,3],[32,6],[36,1],[36,2],[28,1],[28,1],[28,1],[28,1],[29,4],[15,1],[15,1],[15,3],[15,3],[30,3],[31,4],[42,1],[42,3],[48,1],[48,2],[35,1],[35,1],[35,1],[49,1],[49,1],[49,1],[49,1],[10,1],[10,1],[10,1],[10,1],[10,1],[17,1],[17,2],[56,2],[56,3],[56,3],[56,4],[57,1],[57,2],[58,1],[59,1],[59,3],[63,1],[60,1],[11,3],[67,1],[67,1],[67,1],[67,1],[67,1],[68,1],[68,1],[13,1],[13,1],[13,1]],performAction:t(function(o,h,f,r,m,e,fe){var i=e.length-1;switch(m){case 1:break;case 2:this.$=[];break;case 3:this.$=e[i-1].concat(e[i]);break;case 4:this.$=e[i];break;case 5:case 6:this.$=[];break;case 7:r.addEntity(e[i-4]),r.addEntity(e[i-2]),r.addRelationship(e[i-4],e[i],e[i-2],e[i-3]),this.$=[e[i-4],e[i-2]];break;case 8:r.addEntity(e[i-8]),r.addEntity(e[i-4]),r.addRelationship(e[i-8],e[i],e[i-4],e[i-5]),r.setClass([e[i-8]],e[i-6]),r.setClass([e[i-4]],e[i-2]),this.$=[e[i-8],e[i-4]];break;case 9:r.addEntity(e[i-6]),r.addEntity(e[i-2]),r.addRelationship(e[i-6],e[i],e[i-2],e[i-3]),r.setClass([e[i-6]],e[i-4]),this.$=[e[i-6],e[i-2]];break;case 10:r.addEntity(e[i-6]),r.addEntity(e[i-4]),r.addRelationship(e[i-6],e[i],e[i-4],e[i-5]),r.setClass([e[i-4]],e[i-2]),this.$=[e[i-6],e[i-4]];break;case 11:r.addEntity(e[i-3]),r.addAttributes(e[i-3],e[i-1]),this.$=[e[i-3]];break;case 12:r.addEntity(e[i-5]),r.addAttributes(e[i-5],e[i-1]),r.setClass([e[i-5]],e[i-3]),this.$=[e[i-5]];break;case 13:r.addEntity(e[i-2]),this.$=[e[i-2]];break;case 14:r.addEntity(e[i-4]),r.setClass([e[i-4]],e[i-2]),this.$=[e[i-4]];break;case 15:r.addEntity(e[i]),this.$=[e[i]];break;case 16:r.addEntity(e[i-2]),r.setClass([e[i-2]],e[i]),this.$=[e[i-2]];break;case 17:r.addEntity(e[i-6],e[i-4]),r.addAttributes(e[i-6],e[i-1]),this.$=[e[i-6]];break;case 18:r.addEntity(e[i-8],e[i-6]),r.addAttributes(e[i-8],e[i-1]),r.setClass([e[i-8]],e[i-3]),this.$=[e[i-8]];break;case 19:r.addEntity(e[i-5],e[i-3]),this.$=[e[i-5]];break;case 20:r.addEntity(e[i-7],e[i-5]),r.setClass([e[i-7]],e[i-2]),this.$=[e[i-7]];break;case 21:r.addEntity(e[i-3],e[i-1]);break;case 22:r.addEntity(e[i-5],e[i-3]),r.setClass([e[i-5]],e[i]);break;case 23:case 24:this.$=e[i].trim(),r.setAccTitle(this.$);break;case 25:case 26:this.$=e[i].trim(),r.setAccDescription(this.$);break;case 27:if(!r.subgraphDepth)r.setDirection(e[i].value),this.$=[];else this.$=e[i];break;case 31:r.subgraphDepth=(r.subgraphDepth||1)-1,this.$=r.addSubGraph({text:e[i-2].id},e[i-1],{text:e[i-2].text});break;case 32:r.subgraphDepth=(r.subgraphDepth||0)+1,this.$={id:e[i-1],text:e[i-1]};break;case 33:r.subgraphDepth=(r.subgraphDepth||0)+1,this.$={id:e[i-4],text:e[i-2]};break;case 34:case 59:case 60:case 61:case 62:case 86:this.$=e[i];break;case 35:this.$=e[i-1]+" "+e[i];break;case 36:this.$={stmt:"dir",value:"TB"};break;case 37:this.$={stmt:"dir",value:"BT"};break;case 38:this.$={stmt:"dir",value:"RL"};break;case 39:this.$={stmt:"dir",value:"LR"};break;case 40:this.$=e[i-3],r.addClass(e[i-2],e[i-1]);break;case 41:case 42:case 63:case 72:this.$=[e[i]];break;case 43:case 44:this.$=e[i-2].concat([e[i]]);break;case 45:this.$=e[i-2],r.setClass(e[i-1],e[i]);break;case 46:this.$=e[i-3],r.addCssStyles(e[i-2],e[i-1]);break;case 47:this.$=[e[i]];break;case 48:e[i-2].push(e[i]),this.$=e[i-2];break;case 50:this.$=e[i-1]+e[i];break;case 58:case 84:case 85:this.$=e[i].replace(/"/g,"");break;case 64:e[i].push(e[i-1]),this.$=e[i];break;case 65:this.$={type:e[i-1],name:e[i]};break;case 66:this.$={type:e[i-2],name:e[i-1],keys:e[i]};break;case 67:this.$={type:e[i-2],name:e[i-1],comment:e[i]};break;case 68:this.$={type:e[i-3],name:e[i-2],keys:e[i-1],comment:e[i]};break;case 69:case 71:case 74:this.$=e[i];break;case 70:this.$=e[i-1]+e[i];break;case 73:e[i-2].push(e[i]),this.$=e[i-2];break;case 75:this.$=e[i].replace(/"/g,"");break;case 76:this.$={cardA:e[i],relType:e[i-1],cardB:e[i-2]};break;case 77:this.$=r.Cardinality.ZERO_OR_ONE;break;case 78:this.$=r.Cardinality.ZERO_OR_MORE;break;case 79:this.$=r.Cardinality.ONE_OR_MORE;break;case 80:this.$=r.Cardinality.ONLY_ONE;break;case 81:this.$=r.Cardinality.MD_PARENT;break;case 82:this.$=r.Identification.NON_IDENTIFYING;break;case 83:this.$=r.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},s(c,b,{5:3}),{6:[1,4],7:5,8:6,9:n,10:8,21:u,23:g,25:N,27:y,28:13,29:14,30:15,31:16,32:17,34:x,37:k,38:_,39:B,40:W,41:X,43:I,46:Y,47:te,51:G,53:P,54:z,55:U},s(c,Ke,{1:[2,1]}),s(d,[2,3]),s(d,[2,4]),s(d,[2,5]),s(d,[2,15],{11:31,67:35,14:[1,32],16:[1,33],19:[1,34],69:Ie,70:Re,71:De,72:Le,73:we}),{22:[1,41]},{24:[1,42]},{26:[1,43]},s(d,[2,26]),s(d,[2,27]),s(d,[2,28]),s(d,[2,29]),s(d,[2,30]),s(d,b,{5:44}),s(ie,[2,58]),s(ie,[2,59]),s(ie,[2,60]),s(ie,[2,61]),s(ie,[2,62]),s(d,[2,36]),s(d,[2,37]),s(d,[2,38]),s(d,[2,39]),{15:45,43:K,44:Z},{15:48,43:K,44:Z},{15:49,43:K,44:Z},{10:50,43:I,51:G,53:P,54:z,55:U},{10:51,43:I,51:G,53:P,54:z,55:U},{15:52,43:K,44:Z},{17:53,18:[1,54],56:55,57:56,61:re},{10:58,43:I,51:G,53:P,54:z,55:U},{68:59,74:[1,60],75:[1,61]},s(ae,[2,77]),s(ae,[2,78]),s(ae,[2,79]),s(ae,[2,80]),s(ae,[2,81]),s(d,[2,23]),s(d,[2,24]),s(d,[2,25]),{6:[1,63],7:5,8:6,9:n,10:8,21:u,23:g,25:N,27:y,28:13,29:14,30:15,31:16,32:17,33:[1,62],34:x,37:k,38:_,39:B,40:W,41:X,43:I,46:Y,47:te,51:G,53:P,54:z,55:U},{12:ne,42:64,44:oe,45:j,48:66,49:67,51:ce,52:he},s(ke,[2,41]),s(ke,[2,42]),{15:72,43:K,44:Z,45:j},{12:ne,42:73,44:oe,45:j,48:66,49:67,51:ce,52:he},{6:_e,9:me,19:[1,75],35:74,50:Ee},{12:[1,79],14:[1,80]},s(d,[2,16],{67:35,11:81,16:[1,82],45:j,69:Ie,70:Re,71:De,72:Le,73:we}),{18:[1,83]},s(d,[2,13]),{17:84,18:[2,63],56:55,57:56,61:re},{58:85,61:[1,86]},{61:[2,69],62:[1,87]},{20:[1,88]},{67:89,69:Ie,70:Re,71:De,72:Le,73:we},s(Ze,[2,82]),s(Ze,[2,83]),s(d,[2,31]),s(d,Ke),{6:_e,9:me,35:90,45:je,50:Ee},{43:[1,92],44:[1,93]},s(qe,[2,47],{49:94,12:ne,44:oe,51:ce,52:he}),s(J,[2,49]),s(J,[2,54]),s(J,[2,55]),s(J,[2,56]),s(J,[2,57]),s(d,[2,45],{45:j}),{6:_e,9:me,35:95,45:je,50:Ee},s(d,[2,32]),{10:97,36:96,43:I,51:G,53:P,54:z,55:U},s(d,[2,51]),s(d,[2,52]),s(d,[2,53]),{13:98,43:Se,53:Te,76:Ce},{15:102,43:K,44:Z},{10:103,43:I,51:G,53:P,54:z,55:U},{17:104,18:[1,105],56:55,57:56,61:re},s(d,[2,11]),{18:[2,64]},s(be,[2,65],{59:106,60:107,63:108,65:We,66:He}),s([18,61,65,66],[2,71]),{61:[2,70]},s(d,[2,21],{14:[1,112],16:[1,111]}),s([43,51,53,54,55],[2,76]),s(d,[2,40]),{12:ne,44:oe,48:113,49:67,51:ce,52:he},s(ke,[2,43]),s(ke,[2,44]),s(J,[2,50]),s(d,[2,46]),{10:115,20:[1,114],43:I,51:G,53:P,54:z,55:U},s(Qe,[2,34]),s(d,[2,7]),s(d,[2,84]),s(d,[2,85]),s(d,[2,86]),{12:[1,116],45:j},{12:[1,118],14:[1,117]},{18:[1,119]},s(d,[2,14]),s(be,[2,66],{60:120,64:[1,121],66:He}),s(be,[2,67]),s(Ve,[2,72]),s(be,[2,75]),s(Ve,[2,74]),{17:122,18:[1,123],56:55,57:56,61:re},{15:124,43:K,44:Z},s(qe,[2,48],{49:94,12:ne,44:oe,51:ce,52:he}),{6:_e,9:me,35:125,50:Ee},s(Qe,[2,35]),{13:126,43:Se,53:Te,76:Ce},{15:127,43:K,44:Z},{13:128,43:Se,53:Te,76:Ce},s(d,[2,12]),s(be,[2,68]),{63:129,65:We},{18:[1,130]},s(d,[2,19]),s(d,[2,22],{16:[1,131],45:j}),s(d,[2,33]),s(d,[2,10]),{12:[1,132],45:j},s(d,[2,9]),s(Ve,[2,73]),s(d,[2,17]),{17:133,18:[1,134],56:55,57:56,61:re},{13:135,43:Se,53:Te,76:Ce},{18:[1,136]},s(d,[2,20]),s(d,[2,8]),s(d,[2,18])],defaultActions:{84:[2,64],87:[2,70]},parseError:t(function(o,h){if(h.recoverable)this.trace(o);else{var f=Error(o);throw f.hash=h,f}},"parseError"),parse:t(function(o){var h=this,f=[0],r=[],m=[null],e=[],fe=this.table,i="",Ne=0,Xe=0,Je=0,at=2,$e=1,nt=e.slice.call(arguments,1),O=Object.create(this.lexer),H={yy:{}};for(var Be in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,Be))H.yy[Be]=this.yy[Be];if(O.setInput(o,H.yy),H.yy.lexer=O,H.yy.parser=this,typeof O.yylloc>"u")O.yylloc={};var Ge=O.yylloc;e.push(Ge);var ot=O.options&&O.options.ranges;if(typeof H.yy.parseError==="function")this.parseError=H.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function lt(V){f.length=f.length-2*V,m.length=m.length-V,e.length=e.length-V}t(lt,"popStack");function et(){var V=r.pop()||O.lex()||$e;if(typeof V!=="number"){if(V instanceof Array)r=V,V=r.pop();V=h.symbols_[V]||V}return V}t(et,"lex");var D,Fe,Q,w,ft,Ye,ee={},xe,F,tt,Ae;while(!0){if(Q=f[f.length-1],this.defaultActions[Q])w=this.defaultActions[Q];else{if(D===null||typeof D>"u")D=et();w=fe[Q]&&fe[Q][D]}if(typeof w>"u"||!w.length||!w[0]){var Pe="";Ae=[];for(xe in fe[Q])if(this.terminals_[xe]&&xe>at)Ae.push("'"+this.terminals_[xe]+"'");if(O.showPosition)Pe="Parse error on line "+(Ne+1)+`:
2
- `+O.showPosition()+`
3
- Expecting `+Ae.join(", ")+", got '"+(this.terminals_[D]||D)+"'";else Pe="Parse error on line "+(Ne+1)+": Unexpected "+(D==$e?"end of input":"'"+(this.terminals_[D]||D)+"'");this.parseError(Pe,{text:O.match,token:this.terminals_[D]||D,line:O.yylineno,loc:Ge,expected:Ae})}if(w[0]instanceof Array&&w.length>1)throw Error("Parse Error: multiple actions possible at state: "+Q+", token: "+D);switch(w[0]){case 1:if(f.push(D),m.push(O.yytext),e.push(O.yylloc),f.push(w[1]),D=null,!Fe){if(Xe=O.yyleng,i=O.yytext,Ne=O.yylineno,Ge=O.yylloc,Je>0)Je--}else D=Fe,Fe=null;break;case 2:if(F=this.productions_[w[1]][1],ee.$=m[m.length-F],ee._$={first_line:e[e.length-(F||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(F||1)].first_column,last_column:e[e.length-1].last_column},ot)ee._$.range=[e[e.length-(F||1)].range[0],e[e.length-1].range[1]];if(Ye=this.performAction.apply(ee,[i,Xe,Ne,H.yy,w[1],m,e].concat(nt)),typeof Ye<"u")return Ye;if(F)f=f.slice(0,-1*F*2),m=m.slice(0,-1*F),e=e.slice(0,-1*F);f.push(this.productions_[w[1]][0]),m.push(ee.$),e.push(ee._$),tt=fe[f[f.length-2]][f[f.length-1]],f.push(tt);break;case 3:return!0}}return!0},"parse")},rt=function(){var q={EOF:1,parseError:t(function(h,f){if(this.yy.parser)this.yy.parser.parseError(h,f);else throw Error(h)},"parseError"),setInput:t(function(o,h){if(this.yy=h||this.yy||{},this._input=o,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 o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var h=o.match(/(?:\r\n?|\n).*/g);if(h)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),o},"input"),unput:t(function(o){var h=o.length,f=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h),this.offset-=h;var r=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),f.length-1)this.yylineno-=f.length-1;var m=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:f?(f.length===r.length?this.yylloc.first_column:0)+r[r.length-f.length].length-f[0].length:this.yylloc.first_column-h},this.options.ranges)this.yylloc.range=[m[0],m[0]+this.yyleng-h];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).
1
+ import{t,Kt,a,de,b,C,S,E,T,A,L,R,l,p,M,ze,Jr,pe,se,le,gt,ge,ye}from"./chunk-veam6vk4.js";import{Bt}from"./chunk-avxk6jpc.js";import{he}from"./chunk-rrpn5r5w.js";import{ue}from"./chunk-7qkav30b.js";var Ue=function(){var s=t(function(q,o,h,k){for(h=h||{},k=q.length;k--;h[q[k]]=o);return h},"o"),c=[6,9,21,23,25,27,34,37,38,39,40,41,43,46,47,51,53,54,55],f=[2,2],n=[1,7],u=[1,9],y=[1,10],x=[1,11],_=[1,12],I=[1,30],g=[1,23],m=[1,24],B=[1,25],W=[1,26],X=[1,27],v=[1,19],Y=[1,28],te=[1,29],G=[1,20],P=[1,18],z=[1,21],U=[1,22],Ke=[2,6],d=[6,9,21,23,25,27,33,34,37,38,39,40,41,43,46,47,51,53,54,55],Re=[1,36],ve=[1,37],De=[1,38],Le=[1,39],we=[1,40],ie=[6,9,12,14,16,19,20,21,23,25,27,33,34,37,38,39,40,41,43,46,47,50,51,53,54,55,69,70,71,72,73],K=[1,46],Z=[1,47],re=[1,57],ae=[43,51,53,54,55,74,75],ne=[1,70],oe=[1,68],j=[1,65],ce=[1,69],be=[1,71],_e=[6,9,12,16,21,23,25,27,33,34,37,38,39,40,41,43,44,45,46,47,51,52,53,54,55,69,70,71,72,73],me=[1,78],Ee=[1,77],Se=[1,76],Ze=[69,70,71,72,73],je=[1,91],qe=[6,9,45,50],J=[6,9,12,44,45,50,51,52],Te=[1,101],Ce=[1,100],Oe=[1,99],fe=[18,61],We=[1,110],He=[1,109],Qe=[20,43,51,53,54,55],Ve=[18,61,64,66],Me={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,statement:8,NEWLINE:9,entityName:10,relSpec:11,COLON:12,role:13,STYLE_SEPARATOR:14,idList:15,BLOCK_START:16,attributes:17,BLOCK_STOP:18,SQS:19,SQE:20,title:21,title_value:22,acc_title:23,acc_title_value:24,acc_descr:25,acc_descr_value:26,acc_descr_multiline_value:27,direction:28,classDefStatement:29,classStatement:30,styleStatement:31,subgraphHeader:32,END:33,SUBGRAPH:34,separator:35,subgraphTitle:36,direction_tb:37,direction_bt:38,direction_rl:39,direction_lr:40,CLASSDEF:41,stylesOpt:42,UNICODE_TEXT:43,STYLE_TEXT:44,COMMA:45,CLASS:46,STYLE:47,style:48,styleComponent:49,SEMI:50,NUM:51,BRKT:52,ENTITY_NAME:53,DECIMAL_NUM:54,ENTITY_ONE:55,attribute:56,attributeType:57,attributeName:58,attributeKeyTypeList:59,attributeComment:60,ATTRIBUTE_WORD:61,"?":62,attributeKeyType:63,",":64,ATTRIBUTE_KEY:65,COMMENT:66,cardinality:67,relType:68,ZERO_OR_ONE:69,ZERO_OR_MORE:70,ONE_OR_MORE:71,ONLY_ONE:72,MD_PARENT:73,NON_IDENTIFYING:74,IDENTIFYING:75,WORD:76,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"NEWLINE",12:"COLON",14:"STYLE_SEPARATOR",16:"BLOCK_START",18:"BLOCK_STOP",19:"SQS",20:"SQE",21:"title",22:"title_value",23:"acc_title",24:"acc_title_value",25:"acc_descr",26:"acc_descr_value",27:"acc_descr_multiline_value",33:"END",34:"SUBGRAPH",37:"direction_tb",38:"direction_bt",39:"direction_rl",40:"direction_lr",41:"CLASSDEF",43:"UNICODE_TEXT",44:"STYLE_TEXT",45:"COMMA",46:"CLASS",47:"STYLE",50:"SEMI",51:"NUM",52:"BRKT",53:"ENTITY_NAME",54:"DECIMAL_NUM",55:"ENTITY_ONE",61:"ATTRIBUTE_WORD",62:"?",64:",",65:"ATTRIBUTE_KEY",66:"COMMENT",69:"ZERO_OR_ONE",70:"ZERO_OR_MORE",71:"ONE_OR_MORE",72:"ONLY_ONE",73:"MD_PARENT",74:"NON_IDENTIFYING",75:"IDENTIFYING",76:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[7,1],[8,5],[8,9],[8,7],[8,7],[8,4],[8,6],[8,3],[8,5],[8,1],[8,3],[8,7],[8,9],[8,6],[8,8],[8,4],[8,6],[8,2],[8,2],[8,2],[8,1],[8,1],[8,1],[8,1],[8,1],[8,3],[32,3],[32,6],[36,1],[36,2],[28,1],[28,1],[28,1],[28,1],[29,4],[15,1],[15,1],[15,3],[15,3],[30,3],[31,4],[42,1],[42,3],[48,1],[48,2],[35,1],[35,1],[35,1],[49,1],[49,1],[49,1],[49,1],[10,1],[10,1],[10,1],[10,1],[10,1],[17,1],[17,2],[56,2],[56,3],[56,3],[56,4],[57,1],[57,2],[58,1],[59,1],[59,3],[63,1],[60,1],[11,3],[67,1],[67,1],[67,1],[67,1],[67,1],[68,1],[68,1],[13,1],[13,1],[13,1]],performAction:t(function(o,h,k,r,O,e,ke){var i=e.length-1;switch(O){case 1:break;case 2:this.$=[];break;case 3:this.$=e[i-1].concat(e[i]);break;case 4:this.$=e[i];break;case 5:case 6:this.$=[];break;case 7:r.addEntity(e[i-4]),r.addEntity(e[i-2]),r.addRelationship(e[i-4],e[i],e[i-2],e[i-3]),this.$=[e[i-4],e[i-2]];break;case 8:r.addEntity(e[i-8]),r.addEntity(e[i-4]),r.addRelationship(e[i-8],e[i],e[i-4],e[i-5]),r.setClass([e[i-8]],e[i-6]),r.setClass([e[i-4]],e[i-2]),this.$=[e[i-8],e[i-4]];break;case 9:r.addEntity(e[i-6]),r.addEntity(e[i-2]),r.addRelationship(e[i-6],e[i],e[i-2],e[i-3]),r.setClass([e[i-6]],e[i-4]),this.$=[e[i-6],e[i-2]];break;case 10:r.addEntity(e[i-6]),r.addEntity(e[i-4]),r.addRelationship(e[i-6],e[i],e[i-4],e[i-5]),r.setClass([e[i-4]],e[i-2]),this.$=[e[i-6],e[i-4]];break;case 11:r.addEntity(e[i-3]),r.addAttributes(e[i-3],e[i-1]),this.$=[e[i-3]];break;case 12:r.addEntity(e[i-5]),r.addAttributes(e[i-5],e[i-1]),r.setClass([e[i-5]],e[i-3]),this.$=[e[i-5]];break;case 13:r.addEntity(e[i-2]),this.$=[e[i-2]];break;case 14:r.addEntity(e[i-4]),r.setClass([e[i-4]],e[i-2]),this.$=[e[i-4]];break;case 15:r.addEntity(e[i]),this.$=[e[i]];break;case 16:r.addEntity(e[i-2]),r.setClass([e[i-2]],e[i]),this.$=[e[i-2]];break;case 17:r.addEntity(e[i-6],e[i-4]),r.addAttributes(e[i-6],e[i-1]),this.$=[e[i-6]];break;case 18:r.addEntity(e[i-8],e[i-6]),r.addAttributes(e[i-8],e[i-1]),r.setClass([e[i-8]],e[i-3]),this.$=[e[i-8]];break;case 19:r.addEntity(e[i-5],e[i-3]),this.$=[e[i-5]];break;case 20:r.addEntity(e[i-7],e[i-5]),r.setClass([e[i-7]],e[i-2]),this.$=[e[i-7]];break;case 21:r.addEntity(e[i-3],e[i-1]);break;case 22:r.addEntity(e[i-5],e[i-3]),r.setClass([e[i-5]],e[i]);break;case 23:case 24:this.$=e[i].trim(),r.setAccTitle(this.$);break;case 25:case 26:this.$=e[i].trim(),r.setAccDescription(this.$);break;case 27:if(!r.subgraphDepth)r.setDirection(e[i].value),this.$=[];else this.$=e[i];break;case 31:r.subgraphDepth=(r.subgraphDepth||1)-1,this.$=r.addSubGraph({text:e[i-2].id},e[i-1],{text:e[i-2].text});break;case 32:r.subgraphDepth=(r.subgraphDepth||0)+1,this.$={id:e[i-1],text:e[i-1]};break;case 33:r.subgraphDepth=(r.subgraphDepth||0)+1,this.$={id:e[i-4],text:e[i-2]};break;case 34:case 59:case 60:case 61:case 62:case 86:this.$=e[i];break;case 35:this.$=e[i-1]+" "+e[i];break;case 36:this.$={stmt:"dir",value:"TB"};break;case 37:this.$={stmt:"dir",value:"BT"};break;case 38:this.$={stmt:"dir",value:"RL"};break;case 39:this.$={stmt:"dir",value:"LR"};break;case 40:this.$=e[i-3],r.addClass(e[i-2],e[i-1]);break;case 41:case 42:case 63:case 72:this.$=[e[i]];break;case 43:case 44:this.$=e[i-2].concat([e[i]]);break;case 45:this.$=e[i-2],r.setClass(e[i-1],e[i]);break;case 46:this.$=e[i-3],r.addCssStyles(e[i-2],e[i-1]);break;case 47:this.$=[e[i]];break;case 48:e[i-2].push(e[i]),this.$=e[i-2];break;case 50:this.$=e[i-1]+e[i];break;case 58:case 84:case 85:this.$=e[i].replace(/"/g,"");break;case 64:e[i].push(e[i-1]),this.$=e[i];break;case 65:this.$={type:e[i-1],name:e[i]};break;case 66:this.$={type:e[i-2],name:e[i-1],keys:e[i]};break;case 67:this.$={type:e[i-2],name:e[i-1],comment:e[i]};break;case 68:this.$={type:e[i-3],name:e[i-2],keys:e[i-1],comment:e[i]};break;case 69:case 71:case 74:this.$=e[i];break;case 70:this.$=e[i-1]+e[i];break;case 73:e[i-2].push(e[i]),this.$=e[i-2];break;case 75:this.$=e[i].replace(/"/g,"");break;case 76:this.$={cardA:e[i],relType:e[i-1],cardB:e[i-2]};break;case 77:this.$=r.Cardinality.ZERO_OR_ONE;break;case 78:this.$=r.Cardinality.ZERO_OR_MORE;break;case 79:this.$=r.Cardinality.ONE_OR_MORE;break;case 80:this.$=r.Cardinality.ONLY_ONE;break;case 81:this.$=r.Cardinality.MD_PARENT;break;case 82:this.$=r.Identification.NON_IDENTIFYING;break;case 83:this.$=r.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},s(c,f,{5:3}),{6:[1,4],7:5,8:6,9:n,10:8,21:u,23:y,25:x,27:_,28:13,29:14,30:15,31:16,32:17,34:I,37:g,38:m,39:B,40:W,41:X,43:v,46:Y,47:te,51:G,53:P,54:z,55:U},s(c,Ke,{1:[2,1]}),s(d,[2,3]),s(d,[2,4]),s(d,[2,5]),s(d,[2,15],{11:31,67:35,14:[1,32],16:[1,33],19:[1,34],69:Re,70:ve,71:De,72:Le,73:we}),{22:[1,41]},{24:[1,42]},{26:[1,43]},s(d,[2,26]),s(d,[2,27]),s(d,[2,28]),s(d,[2,29]),s(d,[2,30]),s(d,f,{5:44}),s(ie,[2,58]),s(ie,[2,59]),s(ie,[2,60]),s(ie,[2,61]),s(ie,[2,62]),s(d,[2,36]),s(d,[2,37]),s(d,[2,38]),s(d,[2,39]),{15:45,43:K,44:Z},{15:48,43:K,44:Z},{15:49,43:K,44:Z},{10:50,43:v,51:G,53:P,54:z,55:U},{10:51,43:v,51:G,53:P,54:z,55:U},{15:52,43:K,44:Z},{17:53,18:[1,54],56:55,57:56,61:re},{10:58,43:v,51:G,53:P,54:z,55:U},{68:59,74:[1,60],75:[1,61]},s(ae,[2,77]),s(ae,[2,78]),s(ae,[2,79]),s(ae,[2,80]),s(ae,[2,81]),s(d,[2,23]),s(d,[2,24]),s(d,[2,25]),{6:[1,63],7:5,8:6,9:n,10:8,21:u,23:y,25:x,27:_,28:13,29:14,30:15,31:16,32:17,33:[1,62],34:I,37:g,38:m,39:B,40:W,41:X,43:v,46:Y,47:te,51:G,53:P,54:z,55:U},{12:ne,42:64,44:oe,45:j,48:66,49:67,51:ce,52:be},s(_e,[2,41]),s(_e,[2,42]),{15:72,43:K,44:Z,45:j},{12:ne,42:73,44:oe,45:j,48:66,49:67,51:ce,52:be},{6:me,9:Ee,19:[1,75],35:74,50:Se},{12:[1,79],14:[1,80]},s(d,[2,16],{67:35,11:81,16:[1,82],45:j,69:Re,70:ve,71:De,72:Le,73:we}),{18:[1,83]},s(d,[2,13]),{17:84,18:[2,63],56:55,57:56,61:re},{58:85,61:[1,86]},{61:[2,69],62:[1,87]},{20:[1,88]},{67:89,69:Re,70:ve,71:De,72:Le,73:we},s(Ze,[2,82]),s(Ze,[2,83]),s(d,[2,31]),s(d,Ke),{6:me,9:Ee,35:90,45:je,50:Se},{43:[1,92],44:[1,93]},s(qe,[2,47],{49:94,12:ne,44:oe,51:ce,52:be}),s(J,[2,49]),s(J,[2,54]),s(J,[2,55]),s(J,[2,56]),s(J,[2,57]),s(d,[2,45],{45:j}),{6:me,9:Ee,35:95,45:je,50:Se},s(d,[2,32]),{10:97,36:96,43:v,51:G,53:P,54:z,55:U},s(d,[2,51]),s(d,[2,52]),s(d,[2,53]),{13:98,43:Te,53:Ce,76:Oe},{15:102,43:K,44:Z},{10:103,43:v,51:G,53:P,54:z,55:U},{17:104,18:[1,105],56:55,57:56,61:re},s(d,[2,11]),{18:[2,64]},s(fe,[2,65],{59:106,60:107,63:108,65:We,66:He}),s([18,61,65,66],[2,71]),{61:[2,70]},s(d,[2,21],{14:[1,112],16:[1,111]}),s([43,51,53,54,55],[2,76]),s(d,[2,40]),{12:ne,44:oe,48:113,49:67,51:ce,52:be},s(_e,[2,43]),s(_e,[2,44]),s(J,[2,50]),s(d,[2,46]),{10:115,20:[1,114],43:v,51:G,53:P,54:z,55:U},s(Qe,[2,34]),s(d,[2,7]),s(d,[2,84]),s(d,[2,85]),s(d,[2,86]),{12:[1,116],45:j},{12:[1,118],14:[1,117]},{18:[1,119]},s(d,[2,14]),s(fe,[2,66],{60:120,64:[1,121],66:He}),s(fe,[2,67]),s(Ve,[2,72]),s(fe,[2,75]),s(Ve,[2,74]),{17:122,18:[1,123],56:55,57:56,61:re},{15:124,43:K,44:Z},s(qe,[2,48],{49:94,12:ne,44:oe,51:ce,52:be}),{6:me,9:Ee,35:125,50:Se},s(Qe,[2,35]),{13:126,43:Te,53:Ce,76:Oe},{15:127,43:K,44:Z},{13:128,43:Te,53:Ce,76:Oe},s(d,[2,12]),s(fe,[2,68]),{63:129,65:We},{18:[1,130]},s(d,[2,19]),s(d,[2,22],{16:[1,131],45:j}),s(d,[2,33]),s(d,[2,10]),{12:[1,132],45:j},s(d,[2,9]),s(Ve,[2,73]),s(d,[2,17]),{17:133,18:[1,134],56:55,57:56,61:re},{13:135,43:Te,53:Ce,76:Oe},{18:[1,136]},s(d,[2,20]),s(d,[2,8]),s(d,[2,18])],defaultActions:{84:[2,64],87:[2,70]},parseError:t(function(o,h){if(h.recoverable)this.trace(o);else{var k=Error(o);throw k.hash=h,k}},"parseError"),parse:t(function(o){var h=this,k=[0],r=[],O=[null],e=[],ke=this.table,i="",xe=0,Xe=0,Je=0,at=2,$e=1,nt=e.slice.call(arguments,1),N=Object.create(this.lexer),H={yy:{}};for(var Be in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,Be))H.yy[Be]=this.yy[Be];if(N.setInput(o,H.yy),H.yy.lexer=N,H.yy.parser=this,typeof N.yylloc>"u")N.yylloc={};var Ge=N.yylloc;e.push(Ge);var ot=N.options&&N.options.ranges;if(typeof H.yy.parseError==="function")this.parseError=H.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function lt(V){k.length=k.length-2*V,O.length=O.length-V,e.length=e.length-V}t(lt,"popStack");function et(){var V=r.pop()||N.lex()||$e;if(typeof V!=="number"){if(V instanceof Array)r=V,V=r.pop();V=h.symbols_[V]||V}return V}t(et,"lex");var D,Fe,Q,w,ft,Ye,ee={},Ae,F,tt,Ie;while(!0){if(Q=k[k.length-1],this.defaultActions[Q])w=this.defaultActions[Q];else{if(D===null||typeof D>"u")D=et();w=ke[Q]&&ke[Q][D]}if(typeof w>"u"||!w.length||!w[0]){var Pe="";Ie=[];for(Ae in ke[Q])if(this.terminals_[Ae]&&Ae>at)Ie.push("'"+this.terminals_[Ae]+"'");if(N.showPosition)Pe="Parse error on line "+(xe+1)+`:
2
+ `+N.showPosition()+`
3
+ Expecting `+Ie.join(", ")+", got '"+(this.terminals_[D]||D)+"'";else Pe="Parse error on line "+(xe+1)+": Unexpected "+(D==$e?"end of input":"'"+(this.terminals_[D]||D)+"'");this.parseError(Pe,{text:N.match,token:this.terminals_[D]||D,line:N.yylineno,loc:Ge,expected:Ie})}if(w[0]instanceof Array&&w.length>1)throw Error("Parse Error: multiple actions possible at state: "+Q+", token: "+D);switch(w[0]){case 1:if(k.push(D),O.push(N.yytext),e.push(N.yylloc),k.push(w[1]),D=null,!Fe){if(Xe=N.yyleng,i=N.yytext,xe=N.yylineno,Ge=N.yylloc,Je>0)Je--}else D=Fe,Fe=null;break;case 2:if(F=this.productions_[w[1]][1],ee.$=O[O.length-F],ee._$={first_line:e[e.length-(F||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(F||1)].first_column,last_column:e[e.length-1].last_column},ot)ee._$.range=[e[e.length-(F||1)].range[0],e[e.length-1].range[1]];if(Ye=this.performAction.apply(ee,[i,Xe,xe,H.yy,w[1],O,e].concat(nt)),typeof Ye<"u")return Ye;if(F)k=k.slice(0,-1*F*2),O=O.slice(0,-1*F),e=e.slice(0,-1*F);k.push(this.productions_[w[1]][0]),O.push(ee.$),e.push(ee._$),tt=ke[k[k.length-2]][k[k.length-1]],k.push(tt);break;case 3:return!0}}return!0},"parse")},rt=function(){var q={EOF:1,parseError:t(function(h,k){if(this.yy.parser)this.yy.parser.parseError(h,k);else throw Error(h)},"parseError"),setInput:t(function(o,h){if(this.yy=h||this.yy||{},this._input=o,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 o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var h=o.match(/(?:\r\n?|\n).*/g);if(h)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),o},"input"),unput:t(function(o){var h=o.length,k=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h),this.offset-=h;var r=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),k.length-1)this.yylineno-=k.length-1;var O=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:k?(k.length===r.length?this.yylloc.first_column:0)+r[r.length-k.length].length-k[0].length:this.yylloc.first_column-h},this.options.ranges)this.yylloc.range=[O[0],O[0]+this.yyleng-h];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(o){this.unput(this.match.slice(o))},"less"),pastInput:t(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:t(function(){var o=this.match;if(o.length<20)o+=this._input.substr(0,20-o.length);return(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:t(function(){var o=this.pastInput(),h=Array(o.length+1).join("-");return o+this.upcomingInput()+`
5
- `+h+"^"},"showPosition"),test_match:t(function(o,h){var f,r,m;if(this.options.backtrack_lexer){if(m={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)m.yylloc.range=this.yylloc.range.slice(0)}if(r=o[0].match(/(?:\r\n?|\n).*/g),r)this.yylineno+=r.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+o[0].length},this.yytext+=o[0],this.match+=o[0],this.matches=o,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(o[0].length),this.matched+=o[0],f=this.performAction.call(this,this.yy,this,h,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(f)return f;else if(this._backtrack){for(var e in m)this[e]=m[e];return!1}return!1},"test_match"),next:t(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var o,h,f,r;if(!this._more)this.yytext="",this.match="";var m=this._currentRules();for(var e=0;e<m.length;e++)if(f=this._input.match(this.rules[m[e]]),f&&(!h||f[0].length>h[0].length)){if(h=f,r=e,this.options.backtrack_lexer)if(o=this.test_match(f,m[e]),o!==!1)return o;else if(this._backtrack){h=!1;continue}else return!1;else if(!this.options.flex)break}if(h){if(o=this.test_match(h,m[r]),o!==!1)return o;return!1}if(this._input==="")return this.EOF;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:t(function(){var h=this.next();if(h)return h;else return this.lex()},"lex"),begin:t(function(h){this.conditionStack.push(h)},"begin"),popState:t(function(){var h=this.conditionStack.length-1;if(h>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(h){if(h=this.conditionStack.length-1-Math.abs(h||0),h>=0)return this.conditionStack[h];else return"INITIAL"},"topState"),pushState:t(function(h){this.begin(h)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:t(function(h,f,r,m){var e=m;switch(r){case 0:return this.begin("acc_title"),23;break;case 1:return this.popState(),"acc_title_value";break;case 2:return this.begin("acc_descr"),25;break;case 3:return this.popState(),"acc_descr_value";break;case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 37;case 8:return 38;case 9:return 39;case 10:return 40;case 11:break;case 12:return 9;case 13:return 53;case 14:return 76;case 15:return 4;case 16:return this.begin("block"),16;break;case 17:return 52;case 18:return 52;case 19:return 45;case 20:return 14;case 21:return 12;case 22:break;case 23:return 65;case 24:return 61;case 25:return 61;case 26:this.begin("block_bq");break;case 27:return 61;case 28:this.popState();break;case 29:return 66;case 30:break;case 31:return this.popState(),18;break;case 32:return f.yytext[0];case 33:return 19;case 34:return 20;case 35:return this.begin("style"),47;break;case 36:return this.popState(),9;break;case 37:break;case 38:return 12;case 39:return 45;case 40:return 52;case 41:return this.begin("style"),41;break;case 42:return 46;case 43:return 34;case 44:return 33;case 45:return 69;case 46:return 71;case 47:return 71;case 48:return 71;case 49:return 69;case 50:return 69;case 51:return 70;case 52:return 70;case 53:return 70;case 54:return 70;case 55:return 70;case 56:return 71;case 57:return 70;case 58:return 71;case 59:return 72;case 60:return 72;case 61:return 54;case 62:return 72;case 63:return 72;case 64:return 72;case 65:return 55;case 66:return 51;case 67:return 72;case 68:return 69;case 69:return 70;case 70:return 71;case 71:return 73;case 72:return 74;case 73:return 75;case 74:return 75;case 75:return 74;case 76:return 74;case 77:return 74;case 78:return 44;case 79:return 50;case 80:return 43;case 81:return f.yytext[0];case 82:return 6}},"anonymous"),rules:[/^(?: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,/^(?:[ \t\r]+)/i,/^(?:[\n]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:#)/i,/^(?:#)/i,/^(?:,)/i,/^(?::::)/i,/^(?::)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:([^\s]*)[~].*[~]([^\s]*))/i,/^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\.,\u00C0-\uFFFF\*]*))/i,/^(?:[`])/i,/^(?:[^`]+)/i,/^(?:[`])/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:style\b)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?::)/i,/^(?:,)/i,/^(?:#)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:subgraph\b)/i,/^(?:end\b\s*)/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:[0-9]+\.[0-9]+)/i,/^(?:1(?=\s+[A-Za-z_"']))/i,/^(?:1(?=\s+[0-9]))/i,/^(?:1(?=(--|\.\.|\.-|-\.)))/i,/^(?:1\b)/i,/^(?:[0-9]+)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:u(?=[\.\-\|]))/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:;)/i,/^(?:([^\x00-\x7F]|\w|-|\*|\.)+)/i,/^(?:.)/i,/^(?:$)/i],conditions:{style:{rules:[36,37,38,39,40,78,79],inclusive:!1},acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block_bq:{rules:[27,28],inclusive:!1},block:{rules:[22,23,24,25,26,29,30,31,32],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,33,34,35,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,80,81,82],inclusive:!0}}};return q}();Me.lexer=rt;function Oe(){this.yy={}}return t(Oe,"Parser"),Oe.prototype=Me,Me.Parser=Oe,new Oe}();Ue.parser=Ue;var ct=Ue,ht=class{constructor(){this.entities=new Map,this.relationships=[],this.classes=new Map,this.subgraphDepth=0,this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.direction="TB",this.Cardinality={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},this.Identification={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},this.setAccTitle=S,this.getAccTitle=E,this.setAccDescription=T,this.getAccDescription=A,this.setDiagramTitle=L,this.getDiagramTitle=R,this.getConfig=t(()=>l().er,"getConfig"),this.clear(),this.addEntity=this.addEntity.bind(this),this.addAttributes=this.addAttributes.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setDirection=this.setDirection.bind(this),this.addCssStyles=this.addCssStyles.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this),this.addSubGraph=this.addSubGraph.bind(this)}static{t(this,"ErDB")}addEntity(s,c=""){if(!this.entities.has(s))this.entities.set(s,{id:`entity-${s}-${this.entities.size}`,label:s,attributes:[],alias:c,shape:"erBox",look:l().look??"default",cssClasses:"default",cssStyles:[],labelType:"markdown"}),a.info("Added new entity :",s);else if(!this.entities.get(s)?.alias&&c)this.entities.get(s).alias=c,a.info(`Add alias '${c}' to entity '${s}'`);return this.entities.get(s)}getEntity(s){return this.entities.get(s)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(s,c){let b=this.addEntity(s),n;for(n=c.length-1;n>=0;n--){if(!c[n].keys)c[n].keys=[];if(!c[n].comment)c[n].comment="";b.attributes.push(c[n]),a.debug("Added attribute ",c[n].name)}}addRelationship(s,c,b,n){let u;if(this.subGraphLookup.has(s))u=s;else{let y=this.addEntity(s);if(!y)return;u=y.id}let g;if(this.subGraphLookup.has(b))g=b;else{let y=this.addEntity(b);if(!y)return;g=y.id}let N={entityA:u,roleA:c,entityB:g,relSpec:n};this.relationships.push(N),a.debug("Added new relationship :",N)}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(s){this.direction=s}getCompiledStyles(s){let c=[];for(let b of s){let n=this.classes.get(b);if(n?.styles)c=[...c,...n.styles??[]].map((u)=>u.trim());if(n?.textStyles)c=[...c,...n.textStyles??[]].map((u)=>u.trim())}return c}addCssStyles(s,c){for(let b of s){let n=this.entities.get(b),u=this.subGraphLookup.get(b);if(!c)continue;if(n)for(let g of c)n.cssStyles.push(g);if(u){if(!u.cssStyles)u.cssStyles=[];for(let g of c)u.cssStyles.push(g)}}}addClass(s,c){s.forEach((b)=>{let n=this.classes.get(b);if(n===void 0)n={id:b,styles:[],textStyles:[]},this.classes.set(b,n);if(c)c.forEach(function(u){if(/color/.exec(u)){let g=u.replace("fill","bgFill");n.textStyles.push(g)}n.styles.push(u)})})}addSubGraph(s,c,b){let n=s.text.trim(),u=b.text,N=t((_)=>{let B=new Set,W;return{nodeList:_.filter((I)=>{if(I?.stmt){if(I.stmt==="dir")W=I.value;return!1}if(typeof I!=="string")return!1;let Y=I.trim();if(!Y)return!1;if(B.has(Y))return!1;return B.add(Y),!0}),dir:W}},"uniq")(c.flat()),{nodeList:y,dir:x}=N;n=n??"subGraph"+this.subCount,u=u||"",u=this.sanitizeText(u),this.subCount=this.subCount+1;let k={id:n,nodes:y,title:u.trim(),classes:[],cssStyles:[],dir:x,labelType:this.sanitizeNodeLabelType(b?.type)};return a.info("Adding",k.id,k.nodes,k.dir),k.nodes=this.makeUniq(k,this.subGraphs).nodes,this.subGraphs.push(k),this.subGraphLookup.set(n,k),n}getSubGraphs(){return this.subGraphs}setClass(s,c){for(let b of s){let n=this.entities.get(b);if(n)for(let g of c)n.cssClasses+=" "+g;let u=this.subGraphLookup.get(b);if(u)for(let g of c)u.classes.push(g)}}subgraphNodeCache(s){let c=new Set;for(let b of s)for(let n of b.nodes)c.add(n);return c}makeUniq(s,c){let b=this.subgraphNodeCache(c),n=[];return s.nodes.forEach((u,g)=>{if(b.has(u))a.warn(`Entity '${u}' already belongs to another subgraph and will be ignored`);else n.push(s.nodes[g])}),{nodes:n}}sanitizeText(s){return v.sanitizeText(s,l())}sanitizeNodeLabelType(s){switch(s){case"markdown":case"string":case"text":return s;default:return"markdown"}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.subgraphDepth=0,C()}getData(){let s=[],c=[],b=l(),n=this.getSubGraphs(),u=new Map,g=new Map;for(let k=n.length-1;k>=0;k--){let _=n[k];if(_.nodes.length>0)g.set(_.id,!0);for(let B of _.nodes)u.set(B,_.id)}for(let k=n.length-1;k>=0;k--){let _=n[k];s.push({id:_.id,label:_.title,labelStyle:"",labelType:_.labelType,parentId:u.get(_.id),padding:8,cssCompiledStyles:this.getCompiledStyles(_.classes),cssStyles:_.cssStyles,cssClasses:_.classes.join(" "),shape:"rect",dir:_.dir,isGroup:!0,look:b.look})}let N=new Set(n.map((k)=>k.id)),y=0;for(let k of this.entities.keys()){if(N.has(k))continue;let _=this.entities.get(k);if(_)_.cssCompiledStyles=this.getCompiledStyles(_.cssClasses.split(" ")),_.colorIndex=y++,s.push({..._,parentId:u.get(k),isGroup:!1})}let x=0;for(let k of this.relationships){let _={id:ze(k.entityA,k.entityB,{prefix:"id",counter:x++}),type:"normal",curve:"basis",start:k.entityA,end:k.entityB,label:k.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:k.relSpec.cardB.toLowerCase(),arrowTypeEnd:k.relSpec.cardA.toLowerCase(),pattern:k.relSpec.relType=="IDENTIFYING"?"solid":"dashed",look:b.look,labelType:"markdown"};c.push(_)}return{nodes:s,edges:c,other:{},config:b,direction:this.direction}}},it={};Qt(it,{draw:()=>ut});var ut=t(async function(s,c,b,n){a.info("REF0:"),a.info("Drawing er diagram (unified)",c);let{securityLevel:u,er:g,layout:N}=l(),y=n.db.getData(),x=ge(c,u);y.type=n.type,y.layoutAlgorithm=ve(N),y.config.flowchart.nodeSpacing=g?.nodeSpacing||140,y.config.flowchart.rankSpacing=g?.rankSpacing||80,y.direction=n.db.getDirection();let{config:k}=y,{look:_}=k;if(_==="neo")y.markers=["only_one_neo","zero_or_one_neo","one_or_more_neo","zero_or_more_neo"];else y.markers=["only_one","zero_or_one","one_or_more","zero_or_more"];y.diagramId=c,await ye(y,x);let B=x.selectAll('[id*="-background"]');if(Array.from(B).length>0)B.each(function(){let X=p(this),Y=X.attr("id").replace("-background",""),te=x.select(`#${CSS.escape(Y)}`);if(!te.empty()){let G=te.attr("transform");X.attr("transform",G)}});let W=8;M.insertTitle(x,"erDiagramTitleText",g?.titleTopMargin??25,n.db.getDiagramTitle()),ue(x,W,"erDiagram",g?.useMaxWidth??!0)},"draw"),st=t((s,c)=>{let b=Bt,n=b(s,"r"),u=b(s,"g"),g=b(s,"b");return de(n,u,g,c)},"fade"),dt=t((s)=>{let{theme:c,bkgColorArray:b,borderColorArray:n}=s;if(!se(c,n))return"";let u=le(s.look),g=pe(b),N="";for(let y=0;y<gt(n);y++){let x=n[y],k=g?`fill: ${b[y%b.length]};`:"";N+=`
5
+ `+h+"^"},"showPosition"),test_match:t(function(o,h){var k,r,O;if(this.options.backtrack_lexer){if(O={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)O.yylloc.range=this.yylloc.range.slice(0)}if(r=o[0].match(/(?:\r\n?|\n).*/g),r)this.yylineno+=r.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+o[0].length},this.yytext+=o[0],this.match+=o[0],this.matches=o,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(o[0].length),this.matched+=o[0],k=this.performAction.call(this,this.yy,this,h,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(k)return k;else if(this._backtrack){for(var e in O)this[e]=O[e];return!1}return!1},"test_match"),next:t(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var o,h,k,r;if(!this._more)this.yytext="",this.match="";var O=this._currentRules();for(var e=0;e<O.length;e++)if(k=this._input.match(this.rules[O[e]]),k&&(!h||k[0].length>h[0].length)){if(h=k,r=e,this.options.backtrack_lexer)if(o=this.test_match(k,O[e]),o!==!1)return o;else if(this._backtrack){h=!1;continue}else return!1;else if(!this.options.flex)break}if(h){if(o=this.test_match(h,O[r]),o!==!1)return o;return!1}if(this._input==="")return this.EOF;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:t(function(){var h=this.next();if(h)return h;else return this.lex()},"lex"),begin:t(function(h){this.conditionStack.push(h)},"begin"),popState:t(function(){var h=this.conditionStack.length-1;if(h>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(h){if(h=this.conditionStack.length-1-Math.abs(h||0),h>=0)return this.conditionStack[h];else return"INITIAL"},"topState"),pushState:t(function(h){this.begin(h)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:t(function(h,k,r,O){var e=O;switch(r){case 0:return this.begin("acc_title"),23;break;case 1:return this.popState(),"acc_title_value";break;case 2:return this.begin("acc_descr"),25;break;case 3:return this.popState(),"acc_descr_value";break;case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 37;case 8:return 38;case 9:return 39;case 10:return 40;case 11:break;case 12:return 9;case 13:return 53;case 14:return 76;case 15:return 4;case 16:return this.begin("block"),16;break;case 17:return 52;case 18:return 52;case 19:return 45;case 20:return 14;case 21:return 12;case 22:break;case 23:return 65;case 24:return 61;case 25:return 61;case 26:this.begin("block_bq");break;case 27:return 61;case 28:this.popState();break;case 29:return 66;case 30:break;case 31:return this.popState(),18;break;case 32:return k.yytext[0];case 33:return 19;case 34:return 20;case 35:return this.begin("style"),47;break;case 36:return this.popState(),9;break;case 37:break;case 38:return 12;case 39:return 45;case 40:return 52;case 41:return this.begin("style"),41;break;case 42:return 46;case 43:return 34;case 44:return 33;case 45:return 69;case 46:return 71;case 47:return 71;case 48:return 71;case 49:return 69;case 50:return 69;case 51:return 70;case 52:return 70;case 53:return 70;case 54:return 70;case 55:return 70;case 56:return 71;case 57:return 70;case 58:return 71;case 59:return 72;case 60:return 72;case 61:return 54;case 62:return 72;case 63:return 72;case 64:return 72;case 65:return 55;case 66:return 51;case 67:return 72;case 68:return 69;case 69:return 70;case 70:return 71;case 71:return 73;case 72:return 74;case 73:return 75;case 74:return 75;case 75:return 74;case 76:return 74;case 77:return 74;case 78:return 44;case 79:return 50;case 80:return 43;case 81:return k.yytext[0];case 82:return 6}},"anonymous"),rules:[/^(?: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,/^(?:[ \t\r]+)/i,/^(?:[\n]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:#)/i,/^(?:#)/i,/^(?:,)/i,/^(?::::)/i,/^(?::)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:([^\s]*)[~].*[~]([^\s]*))/i,/^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\.,\u00C0-\uFFFF\*]*))/i,/^(?:[`])/i,/^(?:[^`]+)/i,/^(?:[`])/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:style\b)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?::)/i,/^(?:,)/i,/^(?:#)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:subgraph\b)/i,/^(?:end\b\s*)/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:[0-9]+\.[0-9]+)/i,/^(?:1(?=\s+[A-Za-z_"']))/i,/^(?:1(?=\s+[0-9]))/i,/^(?:1(?=(--|\.\.|\.-|-\.)))/i,/^(?:1\b)/i,/^(?:[0-9]+)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:u(?=[\.\-\|]))/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:;)/i,/^(?:([^\x00-\x7F]|\w|-|\*|\.)+)/i,/^(?:.)/i,/^(?:$)/i],conditions:{style:{rules:[36,37,38,39,40,78,79],inclusive:!1},acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block_bq:{rules:[27,28],inclusive:!1},block:{rules:[22,23,24,25,26,29,30,31,32],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,33,34,35,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,80,81,82],inclusive:!0}}};return q}();Me.lexer=rt;function Ne(){this.yy={}}return t(Ne,"Parser"),Ne.prototype=Me,Me.Parser=Ne,new Ne}();Ue.parser=Ue;var ct=Ue,ht=class{constructor(){this.entities=new Map,this.relationships=[],this.classes=new Map,this.subgraphDepth=0,this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.direction="TB",this.Cardinality={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},this.Identification={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},this.setAccTitle=S,this.getAccTitle=E,this.setAccDescription=T,this.getAccDescription=A,this.setDiagramTitle=L,this.getDiagramTitle=R,this.getConfig=t(()=>l().er,"getConfig"),this.clear(),this.addEntity=this.addEntity.bind(this),this.addAttributes=this.addAttributes.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setDirection=this.setDirection.bind(this),this.addCssStyles=this.addCssStyles.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this),this.addSubGraph=this.addSubGraph.bind(this)}static{t(this,"ErDB")}addEntity(s,c=""){if(!this.entities.has(s))this.entities.set(s,{id:`entity-${s}-${this.entities.size}`,label:s,attributes:[],alias:c,shape:"erBox",look:l().look??"default",cssClasses:"default",cssStyles:[],labelType:"markdown"}),a.info("Added new entity :",s);else if(!this.entities.get(s)?.alias&&c)this.entities.get(s).alias=c,a.info(`Add alias '${c}' to entity '${s}'`);return this.entities.get(s)}getEntity(s){return this.entities.get(s)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(s,c){let f=this.addEntity(s),n;for(n=c.length-1;n>=0;n--){if(!c[n].keys)c[n].keys=[];if(!c[n].comment)c[n].comment="";f.attributes.push(c[n]),a.debug("Added attribute ",c[n].name)}}addRelationship(s,c,f,n){let u;if(this.subGraphLookup.has(s))u=s;else{let _=this.addEntity(s);if(!_)return;u=_.id}let y;if(this.subGraphLookup.has(f))y=f;else{let _=this.addEntity(f);if(!_)return;y=_.id}let x={entityA:u,roleA:c,entityB:y,relSpec:n};this.relationships.push(x),a.debug("Added new relationship :",x)}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(s){this.direction=s}getCompiledStyles(s){let c=[];for(let f of s){let n=this.classes.get(f);if(n?.styles)c=[...c,...n.styles??[]].map((u)=>u.trim());if(n?.textStyles)c=[...c,...n.textStyles??[]].map((u)=>u.trim())}return c}addCssStyles(s,c){for(let f of s){let n=this.entities.get(f),u=this.subGraphLookup.get(f);if(!c)continue;if(n)for(let y of c)n.cssStyles.push(y);if(u){if(!u.cssStyles)u.cssStyles=[];for(let y of c)u.cssStyles.push(y)}}}addClass(s,c){s.forEach((f)=>{let n=this.classes.get(f);if(n===void 0)n={id:f,styles:[],textStyles:[]},this.classes.set(f,n);if(c)c.forEach(function(u){if(/color/.exec(u)){let y=u.replace("fill","bgFill");n.textStyles.push(y)}n.styles.push(u)})})}addSubGraph(s,c,f){let n=s.text.trim(),u=f.text,x=t((m)=>{let B=new Set,W;return{nodeList:m.filter((v)=>{if(v?.stmt){if(v.stmt==="dir")W=v.value;return!1}if(typeof v!=="string")return!1;let Y=v.trim();if(!Y)return!1;if(B.has(Y))return!1;return B.add(Y),!0}),dir:W}},"uniq")(c.flat()),{nodeList:_,dir:I}=x;n=n??"subGraph"+this.subCount,u=u||"",u=this.sanitizeText(u),this.subCount=this.subCount+1;let g={id:n,nodes:_,title:u.trim(),classes:[],cssStyles:[],dir:I,labelType:this.sanitizeNodeLabelType(f?.type)};return a.info("Adding",g.id,g.nodes,g.dir),g.nodes=this.makeUniq(g,this.subGraphs).nodes,this.subGraphs.push(g),this.subGraphLookup.set(n,g),n}getSubGraphs(){return this.subGraphs}setClass(s,c){for(let f of s){let n=this.entities.get(f);if(n)for(let y of c)n.cssClasses+=" "+y;let u=this.subGraphLookup.get(f);if(u)for(let y of c)u.classes.push(y)}}subgraphNodeCache(s){let c=new Set;for(let f of s)for(let n of f.nodes)c.add(n);return c}makeUniq(s,c){let f=this.subgraphNodeCache(c),n=[];return s.nodes.forEach((u,y)=>{if(f.has(u))a.warn(`Entity '${u}' already belongs to another subgraph and will be ignored`);else n.push(s.nodes[y])}),{nodes:n}}sanitizeText(s){return b.sanitizeText(s,l())}sanitizeNodeLabelType(s){switch(s){case"markdown":case"string":case"text":return s;default:return"markdown"}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.subgraphDepth=0,C()}getData(){let s=[],c=[],f=l(),n=this.getSubGraphs(),u=new Map,y=new Map;for(let g=n.length-1;g>=0;g--){let m=n[g];if(m.nodes.length>0)y.set(m.id,!0);for(let B of m.nodes)u.set(B,m.id)}for(let g=n.length-1;g>=0;g--){let m=n[g];s.push({id:m.id,label:m.title,labelStyle:"",labelType:m.labelType,parentId:u.get(m.id),padding:8,cssCompiledStyles:this.getCompiledStyles(m.classes),cssStyles:m.cssStyles,cssClasses:m.classes.join(" "),shape:"rect",dir:m.dir,isGroup:!0,look:f.look})}let x=new Set(n.map((g)=>g.id)),_=0;for(let g of this.entities.keys()){if(x.has(g))continue;let m=this.entities.get(g);if(m)m.cssCompiledStyles=this.getCompiledStyles(m.cssClasses.split(" ")),m.colorIndex=_++,s.push({...m,parentId:u.get(g),isGroup:!1})}let I=0;for(let g of this.relationships){let m={id:ze(g.entityA,g.entityB,{prefix:"id",counter:I++}),type:"normal",curve:"basis",start:g.entityA,end:g.entityB,label:g.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:g.relSpec.cardB.toLowerCase(),arrowTypeEnd:g.relSpec.cardA.toLowerCase(),pattern:g.relSpec.relType=="IDENTIFYING"?"solid":"dashed",look:f.look,labelType:"markdown"};c.push(m)}return{nodes:s,edges:c,other:{},config:f,direction:this.direction}}},it={};Kt(it,{draw:()=>ut});var ut=t(async function(s,c,f,n){a.info("REF0:"),a.info("Drawing er diagram (unified)",c);let{securityLevel:u,er:y,layout:x}=l(),_=n.db.getData(),I=he(c,u);_.type=n.type,_.layoutAlgorithm=ye(x),_.config.flowchart.nodeSpacing=y?.nodeSpacing||140,_.config.flowchart.rankSpacing=y?.rankSpacing||80,_.direction=n.db.getDirection();let{config:g}=_,{look:m}=g;if(m==="neo")_.markers=["only_one_neo","zero_or_one_neo","one_or_more_neo","zero_or_more_neo"];else _.markers=["only_one","zero_or_one","one_or_more","zero_or_more"];_.diagramId=c,await ge(_,I);let B=I.selectAll('[id*="-background"]');if(Array.from(B).length>0)B.each(function(){let X=p(this),Y=X.attr("id").replace("-background",""),te=I.select(`#${CSS.escape(Y)}`);if(!te.empty()){let G=te.attr("transform");X.attr("transform",G)}});let W=8;M.insertTitle(I,"erDiagramTitleText",y?.titleTopMargin??25,n.db.getDiagramTitle()),ue(I,W,"erDiagram",y?.useMaxWidth??!0)},"draw"),st=t((s,c)=>{let f=Bt,n=f(s,"r"),u=f(s,"g"),y=f(s,"b");return de(n,u,y,c)},"fade"),dt=t((s)=>{let{theme:c,bkgColorArray:f,borderColorArray:n}=s;if(!se(c,n))return"";let u=le(s.look),y=pe(f),x="";for(let _=0;_<gt(n);_++){let I=n[_],g=y?`fill: ${f[_%f.length]};`:"";x+=`
7
7
 
8
- [data-look="${u}"][data-color-id="color-${y}"].node path {
9
- stroke: ${x};
10
- ${k}
8
+ [data-look="${u}"][data-color-id="color-${_}"].node path {
9
+ stroke: ${I};
10
+ ${g}
11
11
  }
12
12
 
13
- [data-look="${u}"][data-color-id="color-${y}"].node rect {
14
- stroke: ${x};
15
- ${k}
13
+ [data-look="${u}"][data-color-id="color-${_}"].node rect {
14
+ stroke: ${I};
15
+ ${g}
16
16
  }
17
- `}return N},"genColor"),bt=t((s)=>{let{look:c,theme:b,erEdgeLabelBackground:n,strokeWidth:u}=s;return`
17
+ `}return x},"genColor"),bt=t((s)=>{let{look:c,theme:f,erEdgeLabelBackground:n,strokeWidth:u}=s;return`
18
18
  ${dt(s)}
19
19
  .entityBox {
20
20
  fill: ${s.mainBkg};
@@ -31,14 +31,14 @@ Expecting `+Ae.join(", ")+", got '"+(this.terminals_[D]||D)+"'";else Pe="Parse e
31
31
  }
32
32
 
33
33
  .labelBkg {
34
- background-color: ${Xr.has(b)&&n?n:st(s.tertiaryColor,0.5)};
34
+ background-color: ${Jr.has(f)&&n?n:st(s.tertiaryColor,0.5)};
35
35
  }
36
36
 
37
37
  .edgeLabel {
38
- background-color: ${Xr.has(b)&&n?n:s.edgeLabelBackground};
38
+ background-color: ${Jr.has(f)&&n?n:s.edgeLabelBackground};
39
39
  }
40
40
  .edgeLabel .label rect {
41
- fill: ${Xr.has(b)&&n?n:s.edgeLabelBackground};
41
+ fill: ${Jr.has(f)&&n?n:s.edgeLabelBackground};
42
42
  }
43
43
  .edgeLabel .label text {
44
44
  fill: ${s.textColor};