@bkm016/basalt 0.1.5 → 0.1.7

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 (202) hide show
  1. package/README.md +12 -10
  2. package/{chunk-gw05p4g3.js → chunk-053vb71h.js} +1 -1
  3. package/{chunk-3c330qna.js → chunk-063vbmtp.js} +2 -2
  4. package/{chunk-bgkegf0k.js → chunk-0javrjcm.js} +4 -4
  5. package/{chunk-pjr91g6k.js → chunk-10p3mb40.js} +1 -1
  6. package/{chunk-mkp28k1x.js → chunk-39vwrg8n.js} +2 -2
  7. package/{chunk-dddsrff6.js → chunk-654cny9a.js} +123 -121
  8. package/{chunk-8xb636vr.js → chunk-6kdgk70p.js} +2 -2
  9. package/{chunk-9z7sdh5e.js → chunk-6ptv4g5e.js} +1 -1
  10. package/{chunk-zzwjt7fp.js → chunk-75434aay.js} +1 -1
  11. package/{chunk-ar3dbfp9.js → chunk-7hr6zw2m.js} +1 -1
  12. package/{chunk-h1rypb99.js → chunk-8gw5bvh3.js} +4 -4
  13. package/{chunk-a4b75ekk.js → chunk-8saewt61.js} +2 -2
  14. package/{chunk-sqaam5ak.js → chunk-8wj32837.js} +1 -1
  15. package/{chunk-539ekagy.js → chunk-8wv5t0w6.js} +5 -5
  16. package/{chunk-aw65h276.js → chunk-8x21n7y9.js} +1 -1
  17. package/{chunk-0n99m9m4.js → chunk-a0c989ky.js} +1 -1
  18. package/{chunk-srjgvdvs.js → chunk-a5apjjcn.js} +6 -6
  19. package/chunk-a81p46j7.js +2 -0
  20. package/chunk-agsfy9w7.js +2 -0
  21. package/{chunk-2qcpq99g.js → chunk-arcqjt91.js} +1 -1
  22. package/{chunk-rxj6tct8.js → chunk-bdy4jksd.js} +1 -1
  23. package/{chunk-zrkh5dw7.js → chunk-benrzwea.js} +1 -1
  24. package/chunk-bpw6q7g0.js +3 -0
  25. package/{chunk-36cqq0ga.js → chunk-c7rcw9fb.js} +5 -5
  26. package/{chunk-x89em726.js → chunk-ca982n62.js} +1 -1
  27. package/chunk-d20p02ny.js +2 -0
  28. package/{chunk-5v4g21rw.js → chunk-d6p2hgxh.js} +1 -1
  29. package/{chunk-t7sc0wwc.js → chunk-dnx91jrd.js} +2 -2
  30. package/{chunk-mat08ab1.js → chunk-dpz4hwqb.js} +2 -2
  31. package/{chunk-zn0g0859.js → chunk-ebpyvs1d.js} +2 -2
  32. package/{chunk-00gwse5r.js → chunk-ecf896fz.js} +1 -1
  33. package/{chunk-0stvywr8.js → chunk-ejsneb6f.js} +1 -1
  34. package/{chunk-7as47pcw.js → chunk-ey15ye2h.js} +1 -1
  35. package/{chunk-v4k3qmdm.js → chunk-f156y565.js} +1 -1
  36. package/{chunk-7tgqhveh.js → chunk-f544p9rh.js} +1 -1
  37. package/chunk-fmq3zwzk.js +2 -0
  38. package/{chunk-ebzkckyw.js → chunk-fx7f4m3c.js} +1 -1
  39. package/{chunk-3k7ejpkc.js → chunk-g0t9c3gv.js} +1 -1
  40. package/{chunk-7w0mefgk.js → chunk-gv7wqkey.js} +2 -2
  41. package/{chunk-1xa7d5mh.js → chunk-j7yvh0ae.js} +1 -1
  42. package/{chunk-0j0qggej.js → chunk-n85qs7cs.js} +1 -1
  43. package/{chunk-7qq99360.js → chunk-n981vx1t.js} +4 -4
  44. package/{chunk-0fwdxd45.js → chunk-peja51xv.js} +1 -1
  45. package/{chunk-6dsq0fns.js → chunk-pg5nkf1y.js} +1 -1
  46. package/{chunk-jyrwk08p.js → chunk-prgm07j4.js} +1 -1
  47. package/{chunk-jvwg4rn1.js → chunk-q9dd6fhj.js} +4 -4
  48. package/{chunk-nxkmd29x.js → chunk-r8vvcp6c.js} +1 -1
  49. package/{chunk-stj493dn.js → chunk-r9aatvwm.js} +2 -2
  50. package/chunk-rfb85nj7.js +2 -0
  51. package/{chunk-980drajf.js → chunk-rfdt992v.js} +12 -12
  52. package/{chunk-e63c1186.js → chunk-s6dejhfj.js} +1 -1
  53. package/{chunk-wfyrfvfn.js → chunk-s7skpgm2.js} +1 -1
  54. package/{chunk-2nkfxhef.js → chunk-sjjtxpg2.js} +247 -230
  55. package/{chunk-r0jc8e7t.js → chunk-w67dvqtb.js} +2 -2
  56. package/{chunk-b9fqretv.js → chunk-whj87h4r.js} +2 -2
  57. package/{chunk-vt1anydc.js → chunk-y8dkfpmj.js} +3 -3
  58. package/{chunk-nx3jnbv8.js → chunk-z02sj1je.js} +2 -2
  59. package/{chunk-hq5ke1yp.js → chunk-zxkq9m8e.js} +1 -1
  60. package/compiled.js +3 -3
  61. package/package.json +1 -1
  62. package/ui-test-worker.js +27 -27
  63. package/web/{chunk-7znyd1mj.js → chunk-079091ar.js} +1 -1
  64. package/web/{chunk-65nwc4cf.js → chunk-083r4f80.js} +1 -1
  65. package/web/{chunk-h2ag4kvz.js → chunk-0cng7r2x.js} +1 -1
  66. package/web/chunk-0k0ande6.js +1 -0
  67. package/web/{chunk-14bad871.js → chunk-14deqqhr.js} +1 -1
  68. package/web/{chunk-pyg1mr80.js → chunk-1s53190z.js} +20 -20
  69. package/web/{chunk-1pasbxwh.js → chunk-2b63adsj.js} +1 -1
  70. package/web/{chunk-zc1mk10n.js → chunk-2cem4sv7.js} +2 -2
  71. package/web/{chunk-y7jq61nv.js → chunk-30b33r2w.js} +2 -2
  72. package/web/{chunk-xsrvw7dt.js → chunk-3baypnwn.js} +3 -3
  73. package/web/{chunk-s24qs1bn.js → chunk-4067nwjp.js} +6 -6
  74. package/web/{chunk-paywgcf7.js → chunk-4fm55fgb.js} +2 -2
  75. package/web/{chunk-yvgs6bm3.js → chunk-4q7wf0wd.js} +1 -1
  76. package/web/{chunk-g5jxwkdh.js → chunk-4sve9xrj.js} +1 -1
  77. package/web/{chunk-56krfj3b.js → chunk-4vjnrz87.js} +1 -1
  78. package/web/chunk-59678wmg.js +1 -0
  79. package/web/chunk-5k8sv4f5.js +1 -0
  80. package/web/{chunk-tcp77cp2.js → chunk-5vjhvw1m.js} +1 -1
  81. package/web/{chunk-f9k3xrwb.js → chunk-5wbnjjhg.js} +1 -1
  82. package/web/chunk-6ft5pz3c.js +1 -0
  83. package/web/chunk-7c8rwqtx.js +1 -0
  84. package/web/chunk-7qzz025k.js +1 -0
  85. package/web/chunk-7xbaqqd7.css +1 -0
  86. package/web/chunk-80eyv2mk.js +1 -0
  87. package/web/chunk-89paytbk.js +4 -0
  88. package/web/chunk-8ceej2g7.js +1 -0
  89. package/web/chunk-8nyhy122.js +1 -0
  90. package/web/{chunk-01hcjafh.js → chunk-989jq2h8.js} +1 -1
  91. package/web/{chunk-bnb9xhgw.js → chunk-aangfjqc.js} +6 -6
  92. package/web/{chunk-1cfh0e2e.js → chunk-bdydzbqk.js} +7 -7
  93. package/web/chunk-cpwtt6ny.js +1 -0
  94. package/web/{chunk-dzg1pv80.js → chunk-czjk218p.js} +3 -3
  95. package/web/{chunk-m8knte9z.js → chunk-dg3p8db5.js} +1 -1
  96. package/web/chunk-dsw5t58p.js +1 -0
  97. package/web/{chunk-j34q5jn6.js → chunk-dv72fat3.js} +1 -1
  98. package/web/{chunk-affear07.js → chunk-dvvs1jjq.js} +1 -1
  99. package/web/{chunk-g9sqbafw.js → chunk-e131rg6p.js} +1 -1
  100. package/web/{chunk-4m3zdd41.js → chunk-e8yj05t1.js} +1 -1
  101. package/web/chunk-ekw54h1q.js +1 -0
  102. package/web/{chunk-0k9aec1s.js → chunk-femhej5w.js} +3 -3
  103. package/web/chunk-fmthkpff.js +1 -0
  104. package/web/{chunk-d60dpf69.js → chunk-geh05ghh.js} +1 -1
  105. package/web/{chunk-892nf39p.js → chunk-gksf7cek.js} +7 -7
  106. package/web/{chunk-abhad4zj.js → chunk-ht4mx2dt.js} +4 -4
  107. package/web/chunk-hwsvhst3.js +1 -0
  108. package/web/{chunk-d6ddkh6e.js → chunk-k02b36g1.js} +1 -1
  109. package/web/{chunk-2nht58dc.js → chunk-kjacapzd.js} +1 -1
  110. package/web/{chunk-zz397b0v.js → chunk-kkfrs7d1.js} +1 -1
  111. package/web/{chunk-aqt7kc3s.js → chunk-kkyn8yhj.js} +1 -1
  112. package/web/chunk-mh4rx5cf.js +1 -0
  113. package/web/{chunk-4a4j030b.js → chunk-n448vaba.js} +1 -1
  114. package/web/{chunk-k67v6dyg.js → chunk-n754s8xd.js} +2 -2
  115. package/web/chunk-n8j88qxy.js +1 -0
  116. package/web/{chunk-kza0t0gj.js → chunk-nfvqjzz5.js} +1 -1
  117. package/web/chunk-nmpbsvwb.js +2 -0
  118. package/web/chunk-nws1s56b.js +1 -0
  119. package/web/{chunk-12z7d0hp.js → chunk-p7126wwy.js} +2 -2
  120. package/web/chunk-phnqnhj9.js +1 -0
  121. package/web/{chunk-5shygfgb.js → chunk-pjz30xcp.js} +2 -2
  122. package/web/{chunk-vhzys0rr.js → chunk-q3jevm51.js} +1 -1
  123. package/web/{chunk-advfpyb9.js → chunk-q97hn4j5.js} +4 -4
  124. package/web/chunk-qg31p6cn.js +1 -0
  125. package/web/{chunk-jcdw85mv.js → chunk-qhm3cfq9.js} +1 -1
  126. package/web/chunk-qsd595b9.js +1 -0
  127. package/web/{chunk-9xgspn75.js → chunk-r7frwjqx.js} +2 -2
  128. package/web/chunk-rddft5ce.js +1139 -0
  129. package/web/{chunk-x7sb3bwf.js → chunk-rgbdf2m9.js} +22 -22
  130. package/web/{chunk-fnnrrzqa.js → chunk-rsbkbg6x.js} +1 -1
  131. package/web/chunk-s2bs5vxh.js +2 -0
  132. package/web/{chunk-sd22cnjy.js → chunk-sgwccs54.js} +1 -1
  133. package/web/{chunk-c53xmf48.js → chunk-sjh8gtm9.js} +1 -1
  134. package/web/{chunk-zqht0jzx.js → chunk-sn3tkwme.js} +1 -1
  135. package/web/{chunk-gcv91974.js → chunk-svh4n157.js} +1 -1
  136. package/web/{chunk-7a3c137d.js → chunk-sy7e4dmq.js} +1 -1
  137. package/web/{chunk-vttgyb5v.js → chunk-t3658ehb.js} +1 -1
  138. package/web/{chunk-h6gh63xj.js → chunk-t6sq85s6.js} +1 -1
  139. package/web/{chunk-z4aj066q.js → chunk-t81p4wqc.js} +1 -1
  140. package/web/{chunk-qq5gh5zr.js → chunk-tewmsd7t.js} +1 -1
  141. package/web/chunk-tf57s7ry.js +1 -0
  142. package/web/{chunk-gxqaa4sv.js → chunk-tfn0rqg9.js} +5 -5
  143. package/web/{chunk-0qr891eq.js → chunk-tmndcktk.js} +1 -1
  144. package/web/chunk-tqr80b5w.js +2 -0
  145. package/web/{chunk-mnzramhc.js → chunk-twdy2f67.js} +1 -1
  146. package/web/chunk-tz4twwmw.js +2 -0
  147. package/web/{chunk-crzseqbx.js → chunk-v282r683.js} +1 -1
  148. package/web/chunk-v4vjjtn7.js +1 -0
  149. package/web/chunk-vbwdwcdp.js +1 -0
  150. package/web/{chunk-6enn8p66.js → chunk-vjngfh0q.js} +1 -1
  151. package/web/{chunk-g8kkc6vz.js → chunk-wbgkwxrc.js} +1 -1
  152. package/web/{chunk-ybw6vgf6.js → chunk-wjbk50hn.js} +1 -1
  153. package/web/chunk-wjy848e2.js +1 -0
  154. package/web/{chunk-3hkgdw6f.js → chunk-wqsczy57.js} +3 -3
  155. package/web/chunk-wvfmmw1v.js +8 -0
  156. package/web/chunk-x1jm4zsg.js +1 -0
  157. package/web/{chunk-26bwh1sb.js → chunk-xbpc6x9m.js} +6 -6
  158. package/web/{chunk-xk1t58c4.js → chunk-xckxtfp8.js} +4 -4
  159. package/web/{chunk-qrdh9j62.js → chunk-xmsb2g71.js} +1 -1
  160. package/web/{chunk-ka7c5rhx.js → chunk-y99ed8rd.js} +6 -6
  161. package/web/{chunk-0p1nmj5n.js → chunk-z1geewdf.js} +1 -1
  162. package/web/index.html +1 -1
  163. package/worker.js +1 -1
  164. package/chunk-2nb3d92s.js +0 -2
  165. package/chunk-2pa1z37c.js +0 -2
  166. package/chunk-4g5f43ea.js +0 -3
  167. package/chunk-eegztdzb.js +0 -2
  168. package/chunk-wd3z74av.js +0 -2
  169. package/chunk-yna8bwqc.js +0 -2
  170. package/web/chunk-0ytga215.js +0 -1
  171. package/web/chunk-1amzv4ha.js +0 -1
  172. package/web/chunk-1s2hp6h1.js +0 -1
  173. package/web/chunk-2y0rc1fe.js +0 -1
  174. package/web/chunk-4w298aqs.js +0 -1
  175. package/web/chunk-6stt9d18.js +0 -1
  176. package/web/chunk-7e47b1sn.js +0 -1
  177. package/web/chunk-7pypx5h8.js +0 -2
  178. package/web/chunk-9dy7z3ej.js +0 -2
  179. package/web/chunk-9mq2cdtq.js +0 -1
  180. package/web/chunk-b5hah4mf.js +0 -1
  181. package/web/chunk-b8tfetd8.js +0 -1
  182. package/web/chunk-ckgpy4r4.js +0 -1
  183. package/web/chunk-dbnrfxt1.js +0 -8
  184. package/web/chunk-ddxf8e84.js +0 -1
  185. package/web/chunk-e8h45nyr.js +0 -1
  186. package/web/chunk-ej9vb61c.js +0 -1
  187. package/web/chunk-fjag6yg8.js +0 -2
  188. package/web/chunk-gxsb5tx3.js +0 -1
  189. package/web/chunk-jg6fmz2d.js +0 -1
  190. package/web/chunk-mpfgr049.js +0 -1
  191. package/web/chunk-mz1dabxh.js +0 -1
  192. package/web/chunk-p53n0hwr.js +0 -1
  193. package/web/chunk-pfcnr9tw.js +0 -1
  194. package/web/chunk-q7xkscc5.js +0 -1
  195. package/web/chunk-qmbgb79a.js +0 -1139
  196. package/web/chunk-sfq6cw45.js +0 -2
  197. package/web/chunk-svqj4az8.js +0 -1
  198. package/web/chunk-t7jwyvvr.js +0 -1
  199. package/web/chunk-tf18d2dk.css +0 -1
  200. package/web/chunk-v0g4cqc1.js +0 -4
  201. package/web/chunk-vqfz99ff.js +0 -1
  202. package/web/chunk-zazs8p6c.js +0 -1
@@ -1,9 +1,9 @@
1
- import{e,a,Re,v,C,S,E,T,A,R,L,l,p,Ui,M,ue,oe,se,ht,ye,ve}from"./chunk-pyg1mr80.js";import{$t}from"./chunk-tcp77cp2.js";import{ge}from"./chunk-9xgspn75.js";import{le}from"./chunk-01hcjafh.js";var Bt=function(){var t=e(function(Q,h,g,n){for(g=g||{},n=Q.length;n--;g[Q[n]]=h);return g},"o"),s=[1,2],c=[1,3],r=[1,4],u=[2,4],f=[1,9],m=[1,11],b=[1,16],o=[1,17],D=[1,18],x=[1,19],G=[1,33],Y=[1,20],j=[1,21],O=[1,22],y=[1,23],V=[1,24],F=[1,26],z=[1,27],W=[1,28],K=[1,29],N=[1,30],st=[1,31],St=[1,32],gt=[1,35],yt=[1,36],mt=[1,37],bt=[1,38],rt=[1,34],k=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],kt=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],Mt=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],Lt={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:e(function(h,g,n,_,w,i,it){var d=i.length-1;switch(w){case 3:return _.setRootDoc(i[d]),i[d];break;case 4:this.$=[];break;case 5:if(i[d]!="nl")i[d-1].push(i[d]),this.$=i[d-1];break;case 6:case 7:this.$=i[d];break;case 8:this.$="nl";break;case 12:this.$=i[d];break;case 13:let Et=i[d-1];Et.description=_.trimColon(i[d]),this.$=Et;break;case 14:this.$={stmt:"relation",state1:i[d-2],state2:i[d]};break;case 15:let _t=_.trimColon(i[d]);this.$={stmt:"relation",state1:i[d-3],state2:i[d-1],description:_t};break;case 19:this.$={stmt:"state",id:i[d-3],type:"default",description:"",doc:i[d-1]};break;case 20:var X=i[d],J=i[d-2].trim();if(i[d].match(":")){var lt=i[d].split(":");X=lt[0],J=[J,lt[1]]}this.$={stmt:"state",id:X,type:"default",description:J};break;case 21:this.$={stmt:"state",id:i[d-3],type:"default",description:i[d-5],doc:i[d-1]};break;case 22:this.$={stmt:"state",id:i[d],type:"fork"};break;case 23:this.$={stmt:"state",id:i[d],type:"join"};break;case 24:this.$={stmt:"state",id:i[d],type:"choice"};break;case 25:this.$={stmt:"state",id:_.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:i[d-1].trim(),note:{position:i[d-2].trim(),text:i[d].trim()}};break;case 29:this.$=i[d].trim(),_.setAccTitle(this.$);break;case 30:case 31:this.$=i[d].trim(),_.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:i[d-3],url:i[d-2],tooltip:i[d-1]};break;case 33:this.$={stmt:"click",id:i[d-3],url:i[d-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:i[d-1].trim(),classes:i[d].trim()};break;case 36:this.$={stmt:"style",id:i[d-1].trim(),styleClass:i[d].trim()};break;case 37:this.$={stmt:"applyClass",id:i[d-1].trim(),styleClass:i[d].trim()};break;case 38:_.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:_.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:_.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:_.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:i[d].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:i[d-2].trim(),classes:[i[d].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:i[d-2].trim(),classes:[i[d].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:s,5:c,6:r},{1:[3]},{3:5,4:s,5:c,6:r},{3:6,4:s,5:c,6:r},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],u,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:f,5:m,8:8,9:10,10:12,11:13,12:14,13:15,16:b,17:o,19:D,22:x,24:G,25:Y,26:j,27:O,28:y,29:V,32:25,33:F,35:z,37:W,38:K,41:N,45:st,48:St,51:gt,52:yt,53:mt,54:bt,57:rt},t(k,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:b,17:o,19:D,22:x,24:G,25:Y,26:j,27:O,28:y,29:V,32:25,33:F,35:z,37:W,38:K,41:N,45:st,48:St,51:gt,52:yt,53:mt,54:bt,57:rt},t(k,[2,7]),t(k,[2,8]),t(k,[2,9]),t(k,[2,10]),t(k,[2,11]),t(k,[2,12],{14:[1,40],15:[1,41]}),t(k,[2,16]),{18:[1,42]},t(k,[2,18],{20:[1,43]}),{23:[1,44]},t(k,[2,22]),t(k,[2,23]),t(k,[2,24]),t(k,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(k,[2,28]),{34:[1,49]},{36:[1,50]},t(k,[2,31]),{13:51,24:G,57:rt},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(kt,[2,44],{58:[1,56]}),t(kt,[2,45],{58:[1,57]}),t(k,[2,38]),t(k,[2,39]),t(k,[2,40]),t(k,[2,41]),t(k,[2,6]),t(k,[2,13]),{13:58,24:G,57:rt},t(k,[2,17]),t(Mt,u,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(k,[2,29]),t(k,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(k,[2,14],{14:[1,71]}),{4:f,5:m,8:8,9:10,10:12,11:13,12:14,13:15,16:b,17:o,19:D,21:[1,72],22:x,24:G,25:Y,26:j,27:O,28:y,29:V,32:25,33:F,35:z,37:W,38:K,41:N,45:st,48:St,51:gt,52:yt,53:mt,54:bt,57:rt},t(k,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(k,[2,34]),t(k,[2,35]),t(k,[2,36]),t(k,[2,37]),t(kt,[2,46]),t(kt,[2,47]),t(k,[2,15]),t(k,[2,19]),t(Mt,u,{7:78}),t(k,[2,26]),t(k,[2,27]),{5:[1,79]},{5:[1,80]},{4:f,5:m,8:8,9:10,10:12,11:13,12:14,13:15,16:b,17:o,19:D,21:[1,81],22:x,24:G,25:Y,26:j,27:O,28:y,29:V,32:25,33:F,35:z,37:W,38:K,41:N,45:st,48:St,51:gt,52:yt,53:mt,54:bt,57:rt},t(k,[2,32]),t(k,[2,33]),t(k,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:e(function(h,g){if(g.recoverable)this.trace(h);else{var n=Error(h);throw n.hash=g,n}},"parseError"),parse:e(function(h){var g=this,n=[0],_=[],w=[null],i=[],it=this.table,d="",X=0,J=0,lt=0,Et=2,_t=1,me=i.slice.call(arguments,1),I=Object.create(this.lexer),tt={yy:{}};for(var wt in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,wt))tt.yy[wt]=this.yy[wt];if(I.setInput(h,tt.yy),tt.yy.lexer=I,tt.yy.parser=this,typeof I.yylloc>"u")I.yylloc={};var It=I.yylloc;i.push(It);var be=I.options&&I.options.ranges;if(typeof tt.yy.parseError==="function")this.parseError=tt.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function ke(H){n.length=n.length-2*H,w.length=w.length-H,i.length=i.length-H}e(ke,"popStack");function Wt(){var H=_.pop()||I.lex()||_t;if(typeof H!=="number"){if(H instanceof Array)_=H,H=_.pop();H=g.symbols_[H]||H}return H}e(Wt,"lex");var P,Nt,et,U,ts,Ot,at={},vt,q,jt,Dt;while(!0){if(et=n[n.length-1],this.defaultActions[et])U=this.defaultActions[et];else{if(P===null||typeof P>"u")P=Wt();U=it[et]&&it[et][P]}if(typeof U>"u"||!U.length||!U[0]){var Rt="";Dt=[];for(vt in it[et])if(this.terminals_[vt]&&vt>Et)Dt.push("'"+this.terminals_[vt]+"'");if(I.showPosition)Rt="Parse error on line "+(X+1)+`:
1
+ import{e,a,Re,v,C,S,E,T,A,R,L,l,p,Ui,M,ue,oe,se,gt,ge,ye}from"./chunk-1s53190z.js";import{$t}from"./chunk-5vjhvw1m.js";import{he}from"./chunk-r7frwjqx.js";import{le}from"./chunk-989jq2h8.js";var Bt=function(){var t=e(function(Q,h,g,n){for(g=g||{},n=Q.length;n--;g[Q[n]]=h);return g},"o"),s=[1,2],c=[1,3],r=[1,4],u=[2,4],f=[1,9],m=[1,11],b=[1,16],o=[1,17],D=[1,18],x=[1,19],G=[1,33],Y=[1,20],j=[1,21],O=[1,22],y=[1,23],V=[1,24],F=[1,26],z=[1,27],W=[1,28],K=[1,29],N=[1,30],st=[1,31],pt=[1,32],St=[1,35],yt=[1,36],mt=[1,37],bt=[1,38],rt=[1,34],k=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],kt=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],Mt=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],Lt={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:e(function(h,g,n,_,w,i,it){var d=i.length-1;switch(w){case 3:return _.setRootDoc(i[d]),i[d];break;case 4:this.$=[];break;case 5:if(i[d]!="nl")i[d-1].push(i[d]),this.$=i[d-1];break;case 6:case 7:this.$=i[d];break;case 8:this.$="nl";break;case 12:this.$=i[d];break;case 13:let Et=i[d-1];Et.description=_.trimColon(i[d]),this.$=Et;break;case 14:this.$={stmt:"relation",state1:i[d-2],state2:i[d]};break;case 15:let _t=_.trimColon(i[d]);this.$={stmt:"relation",state1:i[d-3],state2:i[d-1],description:_t};break;case 19:this.$={stmt:"state",id:i[d-3],type:"default",description:"",doc:i[d-1]};break;case 20:var X=i[d],J=i[d-2].trim();if(i[d].match(":")){var lt=i[d].split(":");X=lt[0],J=[J,lt[1]]}this.$={stmt:"state",id:X,type:"default",description:J};break;case 21:this.$={stmt:"state",id:i[d-3],type:"default",description:i[d-5],doc:i[d-1]};break;case 22:this.$={stmt:"state",id:i[d],type:"fork"};break;case 23:this.$={stmt:"state",id:i[d],type:"join"};break;case 24:this.$={stmt:"state",id:i[d],type:"choice"};break;case 25:this.$={stmt:"state",id:_.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:i[d-1].trim(),note:{position:i[d-2].trim(),text:i[d].trim()}};break;case 29:this.$=i[d].trim(),_.setAccTitle(this.$);break;case 30:case 31:this.$=i[d].trim(),_.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:i[d-3],url:i[d-2],tooltip:i[d-1]};break;case 33:this.$={stmt:"click",id:i[d-3],url:i[d-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:i[d-1].trim(),classes:i[d].trim()};break;case 36:this.$={stmt:"style",id:i[d-1].trim(),styleClass:i[d].trim()};break;case 37:this.$={stmt:"applyClass",id:i[d-1].trim(),styleClass:i[d].trim()};break;case 38:_.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:_.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:_.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:_.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:i[d].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:i[d-2].trim(),classes:[i[d].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:i[d-2].trim(),classes:[i[d].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:s,5:c,6:r},{1:[3]},{3:5,4:s,5:c,6:r},{3:6,4:s,5:c,6:r},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],u,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:f,5:m,8:8,9:10,10:12,11:13,12:14,13:15,16:b,17:o,19:D,22:x,24:G,25:Y,26:j,27:O,28:y,29:V,32:25,33:F,35:z,37:W,38:K,41:N,45:st,48:pt,51:St,52:yt,53:mt,54:bt,57:rt},t(k,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:b,17:o,19:D,22:x,24:G,25:Y,26:j,27:O,28:y,29:V,32:25,33:F,35:z,37:W,38:K,41:N,45:st,48:pt,51:St,52:yt,53:mt,54:bt,57:rt},t(k,[2,7]),t(k,[2,8]),t(k,[2,9]),t(k,[2,10]),t(k,[2,11]),t(k,[2,12],{14:[1,40],15:[1,41]}),t(k,[2,16]),{18:[1,42]},t(k,[2,18],{20:[1,43]}),{23:[1,44]},t(k,[2,22]),t(k,[2,23]),t(k,[2,24]),t(k,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(k,[2,28]),{34:[1,49]},{36:[1,50]},t(k,[2,31]),{13:51,24:G,57:rt},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(kt,[2,44],{58:[1,56]}),t(kt,[2,45],{58:[1,57]}),t(k,[2,38]),t(k,[2,39]),t(k,[2,40]),t(k,[2,41]),t(k,[2,6]),t(k,[2,13]),{13:58,24:G,57:rt},t(k,[2,17]),t(Mt,u,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(k,[2,29]),t(k,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(k,[2,14],{14:[1,71]}),{4:f,5:m,8:8,9:10,10:12,11:13,12:14,13:15,16:b,17:o,19:D,21:[1,72],22:x,24:G,25:Y,26:j,27:O,28:y,29:V,32:25,33:F,35:z,37:W,38:K,41:N,45:st,48:pt,51:St,52:yt,53:mt,54:bt,57:rt},t(k,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(k,[2,34]),t(k,[2,35]),t(k,[2,36]),t(k,[2,37]),t(kt,[2,46]),t(kt,[2,47]),t(k,[2,15]),t(k,[2,19]),t(Mt,u,{7:78}),t(k,[2,26]),t(k,[2,27]),{5:[1,79]},{5:[1,80]},{4:f,5:m,8:8,9:10,10:12,11:13,12:14,13:15,16:b,17:o,19:D,21:[1,81],22:x,24:G,25:Y,26:j,27:O,28:y,29:V,32:25,33:F,35:z,37:W,38:K,41:N,45:st,48:pt,51:St,52:yt,53:mt,54:bt,57:rt},t(k,[2,32]),t(k,[2,33]),t(k,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:e(function(h,g){if(g.recoverable)this.trace(h);else{var n=Error(h);throw n.hash=g,n}},"parseError"),parse:e(function(h){var g=this,n=[0],_=[],w=[null],i=[],it=this.table,d="",X=0,J=0,lt=0,Et=2,_t=1,be=i.slice.call(arguments,1),I=Object.create(this.lexer),tt={yy:{}};for(var wt in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,wt))tt.yy[wt]=this.yy[wt];if(I.setInput(h,tt.yy),tt.yy.lexer=I,tt.yy.parser=this,typeof I.yylloc>"u")I.yylloc={};var It=I.yylloc;i.push(It);var ke=I.options&&I.options.ranges;if(typeof tt.yy.parseError==="function")this.parseError=tt.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function Te(H){n.length=n.length-2*H,w.length=w.length-H,i.length=i.length-H}e(Te,"popStack");function Wt(){var H=_.pop()||I.lex()||_t;if(typeof H!=="number"){if(H instanceof Array)_=H,H=_.pop();H=g.symbols_[H]||H}return H}e(Wt,"lex");var P,Nt,et,U,ts,Ot,at={},vt,q,jt,Dt;while(!0){if(et=n[n.length-1],this.defaultActions[et])U=this.defaultActions[et];else{if(P===null||typeof P>"u")P=Wt();U=it[et]&&it[et][P]}if(typeof U>"u"||!U.length||!U[0]){var Rt="";Dt=[];for(vt in it[et])if(this.terminals_[vt]&&vt>Et)Dt.push("'"+this.terminals_[vt]+"'");if(I.showPosition)Rt="Parse error on line "+(X+1)+`:
2
2
  `+I.showPosition()+`
3
- Expecting `+Dt.join(", ")+", got '"+(this.terminals_[P]||P)+"'";else Rt="Parse error on line "+(X+1)+": Unexpected "+(P==_t?"end of input":"'"+(this.terminals_[P]||P)+"'");this.parseError(Rt,{text:I.match,token:this.terminals_[P]||P,line:I.yylineno,loc:It,expected:Dt})}if(U[0]instanceof Array&&U.length>1)throw Error("Parse Error: multiple actions possible at state: "+et+", token: "+P);switch(U[0]){case 1:if(n.push(P),w.push(I.yytext),i.push(I.yylloc),n.push(U[1]),P=null,!Nt){if(J=I.yyleng,d=I.yytext,X=I.yylineno,It=I.yylloc,lt>0)lt--}else P=Nt,Nt=null;break;case 2:if(q=this.productions_[U[1]][1],at.$=w[w.length-q],at._$={first_line:i[i.length-(q||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(q||1)].first_column,last_column:i[i.length-1].last_column},be)at._$.range=[i[i.length-(q||1)].range[0],i[i.length-1].range[1]];if(Ot=this.performAction.apply(at,[d,J,X,tt.yy,U[1],w,i].concat(me)),typeof Ot<"u")return Ot;if(q)n=n.slice(0,-1*q*2),w=w.slice(0,-1*q),i=i.slice(0,-1*q);n.push(this.productions_[U[1]][0]),w.push(at.$),i.push(at._$),jt=it[n[n.length-2]][n[n.length-1]],n.push(jt);break;case 3:return!0}}return!0},"parse")},Se=function(){var Q={EOF:1,parseError:e(function(g,n){if(this.yy.parser)this.yy.parser.parseError(g,n);else throw Error(g)},"parseError"),setInput:e(function(h,g){if(this.yy=g||this.yy||{},this._input=h,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:e(function(){var h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var g=h.match(/(?:\r\n?|\n).*/g);if(g)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),h},"input"),unput:e(function(h){var g=h.length,n=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var _=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),n.length-1)this.yylineno-=n.length-1;var w=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:n?(n.length===_.length?this.yylloc.first_column:0)+_[_.length-n.length].length-n[0].length:this.yylloc.first_column-g},this.options.ranges)this.yylloc.range=[w[0],w[0]+this.yyleng-g];return this.yyleng=this.yytext.length,this},"unput"),more:e(function(){return this._more=!0,this},"more"),reject:e(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 `+Dt.join(", ")+", got '"+(this.terminals_[P]||P)+"'";else Rt="Parse error on line "+(X+1)+": Unexpected "+(P==_t?"end of input":"'"+(this.terminals_[P]||P)+"'");this.parseError(Rt,{text:I.match,token:this.terminals_[P]||P,line:I.yylineno,loc:It,expected:Dt})}if(U[0]instanceof Array&&U.length>1)throw Error("Parse Error: multiple actions possible at state: "+et+", token: "+P);switch(U[0]){case 1:if(n.push(P),w.push(I.yytext),i.push(I.yylloc),n.push(U[1]),P=null,!Nt){if(J=I.yyleng,d=I.yytext,X=I.yylineno,It=I.yylloc,lt>0)lt--}else P=Nt,Nt=null;break;case 2:if(q=this.productions_[U[1]][1],at.$=w[w.length-q],at._$={first_line:i[i.length-(q||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(q||1)].first_column,last_column:i[i.length-1].last_column},ke)at._$.range=[i[i.length-(q||1)].range[0],i[i.length-1].range[1]];if(Ot=this.performAction.apply(at,[d,J,X,tt.yy,U[1],w,i].concat(be)),typeof Ot<"u")return Ot;if(q)n=n.slice(0,-1*q*2),w=w.slice(0,-1*q),i=i.slice(0,-1*q);n.push(this.productions_[U[1]][0]),w.push(at.$),i.push(at._$),jt=it[n[n.length-2]][n[n.length-1]],n.push(jt);break;case 3:return!0}}return!0},"parse")},me=function(){var Q={EOF:1,parseError:e(function(g,n){if(this.yy.parser)this.yy.parser.parseError(g,n);else throw Error(g)},"parseError"),setInput:e(function(h,g){if(this.yy=g||this.yy||{},this._input=h,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:e(function(){var h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var g=h.match(/(?:\r\n?|\n).*/g);if(g)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),h},"input"),unput:e(function(h){var g=h.length,n=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var _=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),n.length-1)this.yylineno-=n.length-1;var w=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:n?(n.length===_.length?this.yylloc.first_column:0)+_[_.length-n.length].length-n[0].length:this.yylloc.first_column-g},this.options.ranges)this.yylloc.range=[w[0],w[0]+this.yyleng-g];return this.yyleng=this.yytext.length,this},"unput"),more:e(function(){return this._more=!0,this},"more"),reject:e(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:e(function(h){this.unput(this.match.slice(h))},"less"),pastInput:e(function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:e(function(){var h=this.match;if(h.length<20)h+=this._input.substr(0,20-h.length);return(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:e(function(){var h=this.pastInput(),g=Array(h.length+1).join("-");return h+this.upcomingInput()+`
5
5
  `+g+"^"},"showPosition"),test_match:e(function(h,g){var n,_,w;if(this.options.backtrack_lexer){if(w={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)w.yylloc.range=this.yylloc.range.slice(0)}if(_=h[0].match(/(?:\r\n?|\n).*/g),_)this.yylineno+=_.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:_?_[_.length-1].length-_[_.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+h[0].length},this.yytext+=h[0],this.match+=h[0],this.matches=h,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(h[0].length),this.matched+=h[0],n=this.performAction.call(this,this.yy,this,g,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(n)return n;else if(this._backtrack){for(var i in w)this[i]=w[i];return!1}return!1},"test_match"),next:e(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var h,g,n,_;if(!this._more)this.yytext="",this.match="";var w=this._currentRules();for(var i=0;i<w.length;i++)if(n=this._input.match(this.rules[w[i]]),n&&(!g||n[0].length>g[0].length)){if(g=n,_=i,this.options.backtrack_lexer)if(h=this.test_match(n,w[i]),h!==!1)return h;else if(this._backtrack){g=!1;continue}else return!1;else if(!this.options.flex)break}if(g){if(h=this.test_match(g,w[_]),h!==!1)return h;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:e(function(){var g=this.next();if(g)return g;else return this.lex()},"lex"),begin:e(function(g){this.conditionStack.push(g)},"begin"),popState:e(function(){var g=this.conditionStack.length-1;if(g>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:e(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:e(function(g){if(g=this.conditionStack.length-1-Math.abs(g||0),g>=0)return this.conditionStack[g];else return"INITIAL"},"topState"),pushState:e(function(g){this.begin(g)},"pushState"),stateStackSize:e(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:e(function(g,n,_,w){function i(){let d=n.yytext.indexOf("%%");if(d===0)return!1;if(d>0){let X=n.yytext.slice(0,d),J=n.yytext.slice(d);if(J)g.lexer.unput(J);n.yytext=X}return!0}e(i,"processId");var it=w;switch(_){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:return 51;case 5:return 52;case 6:return 53;case 7:return 54;case 8:return 5;case 9:break;case 10:break;case 11:break;case 12:break;case 13:return this.pushState("SCALE"),17;break;case 14:return 18;case 15:this.popState();break;case 16:return this.begin("acc_title"),33;break;case 17:return this.popState(),"acc_title_value";break;case 18:return this.begin("acc_descr"),35;break;case 19:return this.popState(),"acc_descr_value";break;case 20:this.begin("acc_descr_multiline");break;case 21:this.popState();break;case 22:return"acc_descr_multiline_value";case 23:return this.pushState("CLASSDEF"),41;break;case 24:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";break;case 25:return this.popState(),this.pushState("CLASSDEFID"),42;break;case 26:return this.popState(),43;break;case 27:return this.pushState("CLASS"),48;break;case 28:return this.popState(),this.pushState("CLASS_STYLE"),49;break;case 29:return this.popState(),50;break;case 30:return this.pushState("STYLE"),45;break;case 31:return this.popState(),this.pushState("STYLEDEF_STYLES"),46;break;case 32:return this.popState(),47;break;case 33:return this.pushState("SCALE"),17;break;case 34:return 18;case 35:this.popState();break;case 36:this.pushState("STATE");break;case 37:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),25;break;case 38:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),26;break;case 39:return this.popState(),n.yytext=n.yytext.slice(0,-10).trim(),27;break;case 40:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),25;break;case 41:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),26;break;case 42:return this.popState(),n.yytext=n.yytext.slice(0,-10).trim(),27;break;case 43:return 51;case 44:return 52;case 45:return 53;case 46:return 54;case 47:this.pushState("STATE_STRING");break;case 48:return this.pushState("STATE_ID"),"AS";break;case 49:if(!i())return;return this.popState(),"ID";break;case 50:this.popState();break;case 51:return"STATE_DESCR";case 52:throw Error('Error: State name must be a single word. Found: "'+n.yytext.trim()+'"');case 53:return 19;case 54:this.popState();break;case 55:return this.popState(),this.pushState("struct"),20;break;case 56:return this.popState(),21;break;case 57:break;case 58:return this.begin("NOTE"),29;break;case 59:return this.popState(),this.pushState("NOTE_ID"),59;break;case 60:return this.popState(),this.pushState("NOTE_ID"),60;break;case 61:this.popState(),this.pushState("FLOATING_NOTE");break;case 62:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";break;case 63:break;case 64:return"NOTE_TEXT";case 65:if(!i())return;return this.popState(),"ID";break;case 66:if(!i())return;return this.popState(),this.pushState("NOTE_TEXT"),24;break;case 67:return this.popState(),n.yytext=n.yytext.substr(2).trim(),31;break;case 68:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),31;break;case 69:return 6;case 70:return 6;case 71:return 16;case 72:return 57;case 73:if(!i())return;return 24;case 74:return n.yytext=n.yytext.trim(),14;break;case 75:return 15;case 76:return 28;case 77:return 58;case 78:return 5;case 79:return"INVALID"}},"anonymous"),rules:[/^(?:click\b)/i,/^(?:href\b)/i,/^(?:"[^"]*")/i,/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\w+\s+\w+.*?\{)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?\n\s*end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:(?:[^:\n;]|:[^:\n;])+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[10,11,12],inclusive:!1},struct:{rules:[10,11,12,23,27,30,36,43,44,45,46,56,57,58,72,73,74,75,76,77],inclusive:!1},FLOATING_NOTE_ID:{rules:[65],inclusive:!1},FLOATING_NOTE:{rules:[62,63,64],inclusive:!1},NOTE_TEXT:{rules:[67,68],inclusive:!1},NOTE_ID:{rules:[66],inclusive:!1},NOTE:{rules:[59,60,61],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[32],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[31],inclusive:!1},CLASS_STYLE:{rules:[29],inclusive:!1},CLASS:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[26],inclusive:!1},CLASSDEF:{rules:[24,25],inclusive:!1},acc_descr_multiline:{rules:[21,22],inclusive:!1},acc_descr:{rules:[19],inclusive:!1},acc_title:{rules:[17],inclusive:!1},SCALE:{rules:[14,15,34,35],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[49],inclusive:!1},STATE_STRING:{rules:[50,51],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[10,11,12,37,38,39,40,41,42,47,48,52,53,54,55],inclusive:!1},ID:{rules:[10,11,12],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,12,13,16,18,20,23,27,30,33,36,55,58,69,70,71,72,73,74,75,77,78,79],inclusive:!0}}};return Q}();Lt.lexer=Se;function Tt(){this.yy={}}return e(Tt,"Parser"),Tt.prototype=Lt,Lt.Parser=Tt,new Tt}();Bt.parser=Bt;var Te=Bt,Ee="TB",qt="TB",Ut="dir",ot="state",nt="root",Gt="relation",_e="classDef",De="style",Ce="applyClass",ft="default",Qt="divider",Zt="fill:none",te="fill: #333",ee="c",re="markdown",ie="normal",Ft="rect",Pt="rectWithTitle",Ae="stateStart",xe="stateEnd",Yt="divider",Ht="roundedWithTitle",Le="note",we="noteGroup",pt="statediagram",Ie="state",Ne=`${pt}-${Ie}`,ae="transition",Oe="note",$e="note-edge",Fe=`${ae} ${$e}`,Pe=`${pt}-${Oe}`,Be="cluster",Ge=`${pt}-${Be}`,Ye="cluster-alt",Ve=`${pt}-${Ye}`,ne="parent",ce="note",Me="state",Vt="----",We=`${Vt}${ce}`,zt=`${Vt}${ne}`,At=new Map,Z=0,he=0,ct=new Map,je=e((t,s,c,r)=>{if(t===Yt&&c?.id!==void 0&&ct.has(c.id)){let m=ct.get(c.id);return ct.set(s,m),m}let u=he++,f=r?void 0:u;return ct.set(s,f),f},"colorSlotFor");function xt(t="",s=0,c="",r=Vt){let u=c!==null&&c.length>0?`${r}${c}`:"";return`${Me}-${t}${u}-${s}`}e(xt,"stateDomId");var Ue=e((t,s,c,r,u,f,m,b)=>{a.trace("items",s),s.forEach((o)=>{switch(o.stmt){case ot:ut(t,o,c,r,u,f,m,b);break;case ft:ut(t,o,c,r,u,f,m,b);break;case Gt:{ut(t,o.state1,c,r,u,f,m,b),ut(t,o.state2,c,r,u,f,m,b);let D=m==="neo",x={id:"edge"+Z,start:o.state1.id,end:o.state2.id,arrowhead:"normal",arrowTypeEnd:D?"arrow_barb_neo":"arrow_barb",style:Zt,labelStyle:"",label:v.sanitizeText(o.description??"",l()),arrowheadStyle:te,labelpos:ee,labelType:re,thickness:ie,classes:ae,look:m};u.push(x),Z++}break}})},"setupDoc"),Kt=e((t,s=qt)=>{let c=s;if(t.doc){for(let r of t.doc)if(r.stmt==="dir")c=r.value}return c},"getDir");function dt(t,s,c){if(!s.id||s.id==="</join></fork>"||s.id==="</choice>")return;if(s.cssClasses){if(!Array.isArray(s.cssCompiledStyles))s.cssCompiledStyles=[];s.cssClasses.split(" ").forEach((u)=>{let f=c.get(u);if(f)s.cssCompiledStyles=[...s.cssCompiledStyles??[],...f.styles]})}let r=t.find((u)=>u.id===s.id);if(r)Object.assign(r,s);else t.push(s)}e(dt,"insertOrUpdateNode");function de(t){return t?.classes?.join(" ")??""}e(de,"getClassesFromDbInfo");function fe(t){return t?.styles??[]}e(fe,"getStylesFromDbInfo");var ut=e((t,s,c,r,u,f,m,b)=>{let o=s.id,D=c.get(o),x=de(D),G=fe(D),Y=l(),j=x.trim()!==""||G.length>0;if(a.info("dataFetcher parsedItem",s,D,G),o!=="root"){let O=Ft;if(s.start===!0)O=Ae;else if(s.start===!1)O=xe;if(s.type!==ft)O=s.type;if(!At.get(o))At.set(o,{id:o,shape:O,description:v.sanitizeText(o,Y),cssClasses:`${x} ${Ne}`,cssStyles:G});let y=At.get(o);if(s.description){if(Array.isArray(y.description))y.shape=Pt,y.description.push(s.description);else if(y.description?.length&&y.description.length>0)if(y.shape=Pt,y.description===o)y.description=[s.description];else y.description=[y.description,s.description];else y.shape=Ft,y.description=s.description;y.description=v.sanitizeTextOrArray(y.description,Y)}if(y.description?.length===1&&y.shape===Pt)if(y.type==="group")y.shape=Ht;else y.shape=Ft;if(!y.type&&s.doc)a.info("Setting cluster for XCX",o,Kt(s)),y.type="group",y.isGroup=!0,y.dir=Kt(s),y.shape=s.type===Qt?Yt:Ht,y.colorIndex=je(y.shape,o,t,j),y.cssClasses=`${y.cssClasses} ${Ge} ${f?Ve:""}`;let V={labelStyle:"",shape:y.shape,label:y.description,cssClasses:y.cssClasses,cssCompiledStyles:[],cssStyles:y.cssStyles,id:o,dir:y.dir,domId:xt(o,Z),type:y.type,isGroup:y.type==="group",colorIndex:y.colorIndex,padding:8,rx:10,ry:10,look:m,labelType:"markdown"};if(V.shape===Yt)V.label="";if(t&&t.id!=="root")a.trace("Setting node ",o," to be child of its parent ",t.id),V.parentId=t.id;if(V.centerLabel=!0,s.note){let F={labelStyle:"",shape:Le,label:s.note.text,labelType:"markdown",cssClasses:Pe,cssStyles:[],cssCompiledStyles:[],id:o+We+"-"+Z,domId:xt(o,Z,ce),type:"node",isGroup:!1,padding:Y.flowchart?.padding,look:m,position:s.note.position},z=o+zt,W={labelStyle:"",shape:we,label:s.note.text,cssClasses:y.cssClasses,cssStyles:[],id:o+zt,domId:xt(o,Z,ne),type:"group",isGroup:!0,padding:16,look:m,position:s.note.position};Z++,W.id=z,F.parentId=z,dt(r,W,b),dt(r,F,b),dt(r,V,b);let K=o,N=F.id;if(s.note.position==="left of")K=F.id,N=o;u.push({id:K+"-"+N,start:K,end:N,arrowhead:"none",arrowTypeEnd:"",style:Zt,labelStyle:"",classes:Fe,pattern:"dashed",arrowheadStyle:te,labelpos:ee,labelType:re,thickness:ie,look:m})}else dt(r,V,b)}if(s.doc)a.trace("Adding nodes children "),Ue(s,s.doc,c,r,u,!f,m,b)},"dataFetcher"),He=e(()=>{At.clear(),Z=0,he=0,ct.clear()},"reset"),pe=e((t,s=qt)=>{if(!t.doc)return s;let c=s;for(let r of t.doc)if(r.stmt==="dir")c=r.value;return c},"getDir"),ze=e(function(t,s){return s.db.getClasses()},"getClasses"),Ke=e(async function(t,s,c,r){a.info("REF0:"),a.info("Drawing state diagram (v2)",s);let{securityLevel:u,state:f,layout:m}=l();r.db.extract(r.db.getRootDocV2());let b=r.db.getData(),o=ge(s,u);if(b.type=r.type,b.layoutAlgorithm=ve(m),b.nodeSpacing=f?.nodeSpacing||50,b.rankSpacing=f?.rankSpacing||50,l().look==="neo")b.markers=["barbNeo"];else b.markers=["barb"];b.diagramId=s,await ye(b,o);let x=8;try{(typeof r.db.getLinks==="function"?r.db.getLinks():new Map).forEach((Y,j)=>{let O=typeof j==="string"?j:typeof j?.id==="string"?j.id:"",y=b.nodes.find((N)=>N.id===O);if(!O){a.warn("⚠️ Invalid or missing stateId from key:",JSON.stringify(j));return}let V=o.node()?.querySelectorAll("g.node, g.rough-node"),F;if(V?.forEach((N)=>{let st=N.textContent?.trim();if(N.id===y?.domId||st===O)F=N}),!F){a.warn("⚠️ Could not find node matching text:",O);return}let z=F.parentNode;if(!z){a.warn("⚠️ Node has no parent, cannot wrap:",O);return}let W=document.createElementNS("http://www.w3.org/2000/svg","a"),K=Y.url.replace(/^"+|"+$/g,"");if(W.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",K),W.setAttribute("target","_blank"),Y.tooltip){let N=Y.tooltip.replace(/^"+|"+$/g,"");W.setAttribute("title",N),F.setAttribute("title",N)}z.replaceChild(W,F),W.appendChild(F),a.info("\uD83D\uDD17 Wrapped node in <a> tag for:",O,Y.url)})}catch(G){a.error("❌ Error injecting clickable links:",G)}M.insertTitle(o,"statediagramTitleText",f?.titleTopMargin??25,r.db.getDiagramTitle()),le(o,x,pt,f?.useMaxWidth??!0)},"draw"),Xe={getClasses:ze,draw:Ke,getDir:pe},B={START_NODE:"[*]",START_TYPE:"start",END_NODE:"[*]",END_TYPE:"end",COLOR_KEYWORD:"color",FILL_KEYWORD:"fill",BG_FILL:"bgFill",STYLECLASS_SEP:","},Xt=e(()=>new Map,"newClassesList"),Jt=e(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),Ct=e((t)=>JSON.parse(JSON.stringify(t)),"clone"),Je=class{constructor(t){this.version=t,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=Xt(),this.documents={root:Jt()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.funs=[],this.getAccTitle=E,this.setAccTitle=S,this.getAccDescription=A,this.setAccDescription=T,this.setDiagramTitle=R,this.getDiagramTitle=L,this.clear(),this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this),this.bindFunctions=this.bindFunctions.bind(this)}static{e(this,"StateDB")}static{this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}}extract(t){this.clear(!0);for(let r of Array.isArray(t)?t:t.doc)switch(r.stmt){case ot:this.addState(r.id.trim(),r.type,r.doc,r.description,r.note);break;case Gt:this.addRelation(r.state1,r.state2,r.description);break;case _e:this.addStyleClass(r.id.trim(),r.classes);break;case De:this.handleStyleDef(r);break;case Ce:this.setCssClass(r.id.trim(),r.styleClass);break;case"click":this.addLink(r.id,r.url,r.tooltip);break}let s=this.getStates(),c=l();He(),ut(void 0,this.getRootDocV2(),s,this.nodes,this.edges,!0,c.look,this.classes);for(let r of this.nodes){if(!Array.isArray(r.label))continue;if(r.description=r.label.slice(1),r.isGroup&&r.description.length>0)throw Error(`Group nodes can only have label. Remove the additional description for node [${r.id}]`);r.label=r.label[0]}}handleStyleDef(t){let s=t.id.trim().split(","),c=t.styleClass.split(",");for(let r of s){let u=this.getState(r);if(!u){let f=r.trim();this.addState(f),u=this.getState(f)}if(u)u.styles=c.map((f)=>f.replace(/;/g,"")?.trim())}}setRootDoc(t){if(a.info("Setting root doc",t),this.rootDoc=t,this.version===1)this.extract(t);else this.extract(this.getRootDocV2())}docTranslator(t,s,c){if(s.stmt===Gt){this.docTranslator(t,s.state1,!0),this.docTranslator(t,s.state2,!1);return}if(s.stmt===ot)if(s.id===B.START_NODE)s.id=t.id+(c?"_start":"_end"),s.start=c;else s.id=s.id.trim();if(s.stmt!==nt&&s.stmt!==ot||!s.doc)return;let r=[],u=[];for(let f of s.doc)if(f.type===Qt){let m=Ct(f);m.doc=Ct(u),r.push(m),u=[]}else u.push(f);if(r.length>0&&u.length>0){let f={stmt:ot,id:Ui(),type:"divider",doc:Ct(u)};r.push(Ct(f)),s.doc=r}s.doc.forEach((f)=>this.docTranslator(s,f,!0))}getRootDocV2(){return this.docTranslator({id:nt,stmt:nt},{id:nt,stmt:nt,doc:this.rootDoc},!0),{id:nt,doc:this.rootDoc}}addState(t,s=ft,c=void 0,r=void 0,u=void 0,f=void 0,m=void 0,b=void 0){let o=t?.trim();if(!this.currentDocument.states.has(o))a.info("Adding state ",o,r),this.currentDocument.states.set(o,{stmt:ot,id:o,descriptions:[],type:s,doc:c,note:u,classes:[],styles:[],textStyles:[]});else{let D=this.currentDocument.states.get(o);if(!D)throw Error(`State not found: ${o}`);if(!D.doc)D.doc=c;if(!D.type)D.type=s}if(r)a.info("Setting state description",o,r),(Array.isArray(r)?r:[r]).forEach((x)=>this.addDescription(o,x.trim()));if(u){let D=this.currentDocument.states.get(o);if(!D)throw Error(`State not found: ${o}`);D.note=u,D.note.text=v.sanitizeText(D.note.text,l())}if(f)a.info("Setting state classes",o,f),(Array.isArray(f)?f:[f]).forEach((x)=>this.setCssClass(o,x.trim()));if(m)a.info("Setting state styles",o,m),(Array.isArray(m)?m:[m]).forEach((x)=>this.setStyle(o,x.trim()));if(b)a.info("Setting state styles",o,m),(Array.isArray(b)?b:[b]).forEach((x)=>this.setTextStyle(o,x.trim()))}clear(t){if(this.nodes=[],this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.documents={root:Jt()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=Xt(),!t)this.links=new Map,C()}getState(t){return this.currentDocument.states.get(t)}getStates(){return this.currentDocument.states}logDocuments(){a.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(t,s,c){this.links.set(t,{url:s,tooltip:c}),a.warn("Adding link",t,s,c)}getLinks(){return this.links}startIdIfNeeded(t=""){if(t===B.START_NODE)return this.startEndCount++,`${B.START_TYPE}${this.startEndCount}`;return t}startTypeIfNeeded(t="",s=ft){return t===B.START_NODE?B.START_TYPE:s}endIdIfNeeded(t=""){if(t===B.END_NODE)return this.startEndCount++,`${B.END_TYPE}${this.startEndCount}`;return t}endTypeIfNeeded(t="",s=ft){return t===B.END_NODE?B.END_TYPE:s}addRelationObjs(t,s,c=""){let r=this.startIdIfNeeded(t.id.trim()),u=this.startTypeIfNeeded(t.id.trim(),t.type),f=this.startIdIfNeeded(s.id.trim()),m=this.startTypeIfNeeded(s.id.trim(),s.type);this.addState(r,u,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),this.addState(f,m,s.doc,s.description,s.note,s.classes,s.styles,s.textStyles),this.currentDocument.relations.push({id1:r,id2:f,relationTitle:v.sanitizeText(c,l())})}addRelation(t,s,c){if(typeof t==="object"&&typeof s==="object")this.addRelationObjs(t,s,c);else if(typeof t==="string"&&typeof s==="string"){let r=this.startIdIfNeeded(t.trim()),u=this.startTypeIfNeeded(t),f=this.endIdIfNeeded(s.trim()),m=this.endTypeIfNeeded(s);this.addState(r,u),this.addState(f,m),this.currentDocument.relations.push({id1:r,id2:f,relationTitle:c?v.sanitizeText(c,l()):void 0})}}addDescription(t,s){let c=this.currentDocument.states.get(t),r=s.startsWith(":")?s.replace(":","").trim():s;c?.descriptions?.push(v.sanitizeText(r,l()))}cleanupLabel(t){return t.startsWith(":")?t.slice(2).trim():t.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(t,s=""){if(!this.classes.has(t))this.classes.set(t,{id:t,styles:[],textStyles:[]});let c=this.classes.get(t);if(s&&c)s.split(B.STYLECLASS_SEP).forEach((r)=>{let u=r.replace(/([^;]*);/,"$1").trim();if(RegExp(B.COLOR_KEYWORD).exec(r)){let m=u.replace(B.FILL_KEYWORD,B.BG_FILL).replace(B.COLOR_KEYWORD,B.FILL_KEYWORD);c.textStyles.push(m)}c.styles.push(u)})}getClasses(){return this.classes}setupToolTips(t){let s=$t();p(t).select("svg").selectAll("g.node, g.rough-node").on("mouseover",(u)=>{let f=p(u.currentTarget),m=f.attr("title");if(m===null)return;let b=u.currentTarget?.getBoundingClientRect();s.transition().duration(200).style("opacity",".9"),s.style("left",window.scrollX+b.left+(b.right-b.left)/2+"px").style("top",window.scrollY+b.bottom+"px"),s.html(Re.sanitize(m)),f.classed("hover",!0)}).on("mouseout",(u)=>{s.transition().duration(500).style("opacity",0),p(u.currentTarget).classed("hover",!1)})}setCssClass(t,s){t.split(",").forEach((c)=>{let r=this.getState(c);if(!r){let u=c.trim();this.addState(u),r=this.getState(u)}r?.classes?.push(s)})}setStyle(t,s){this.getState(t)?.styles?.push(s)}setTextStyle(t,s){this.getState(t)?.textStyles?.push(s)}bindFunctions(t){this.funs.forEach((s)=>{s(t)})}getDirectionStatement(){return this.rootDoc.find((t)=>t.stmt===Ut)}getDirection(){return this.getDirectionStatement()?.value??Ee}setDirection(t){let s=this.getDirectionStatement();if(s)s.value=t;else this.rootDoc.unshift({stmt:Ut,value:t})}trimColon(t){return t.startsWith(":")?t.slice(1).trim():t.trim()}getData(){let t=l();for(let s of this.nodes)if(s.wrappingWidth??=t.state?.wrappingWidth,!s.isGroup)s.minWidth??=t.state?.minNodeWidth;return{nodes:this.nodes,edges:this.edges,other:{},config:t,direction:pe(this.getRootDocV2())}}getConfig(){return l().state}},qe=e((t)=>{let{theme:s,bkgColorArray:c,borderColorArray:r}=t;if(!oe(s,r))return"";let u=se(t.look),f=ue(c),m="";for(let b=0;b<ht(r);b++){let o=r[b],D=f?`fill: ${c[b%c.length]};`:"",x=`[data-look="${u}"][data-color-id="color-${b}"]`;m+=`
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:e(function(){var g=this.next();if(g)return g;else return this.lex()},"lex"),begin:e(function(g){this.conditionStack.push(g)},"begin"),popState:e(function(){var g=this.conditionStack.length-1;if(g>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:e(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:e(function(g){if(g=this.conditionStack.length-1-Math.abs(g||0),g>=0)return this.conditionStack[g];else return"INITIAL"},"topState"),pushState:e(function(g){this.begin(g)},"pushState"),stateStackSize:e(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:e(function(g,n,_,w){function i(){let d=n.yytext.indexOf("%%");if(d===0)return!1;if(d>0){let X=n.yytext.slice(0,d),J=n.yytext.slice(d);if(J)g.lexer.unput(J);n.yytext=X}return!0}e(i,"processId");var it=w;switch(_){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:return 51;case 5:return 52;case 6:return 53;case 7:return 54;case 8:return 5;case 9:break;case 10:break;case 11:break;case 12:break;case 13:return this.pushState("SCALE"),17;break;case 14:return 18;case 15:this.popState();break;case 16:return this.begin("acc_title"),33;break;case 17:return this.popState(),"acc_title_value";break;case 18:return this.begin("acc_descr"),35;break;case 19:return this.popState(),"acc_descr_value";break;case 20:this.begin("acc_descr_multiline");break;case 21:this.popState();break;case 22:return"acc_descr_multiline_value";case 23:return this.pushState("CLASSDEF"),41;break;case 24:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";break;case 25:return this.popState(),this.pushState("CLASSDEFID"),42;break;case 26:return this.popState(),43;break;case 27:return this.pushState("CLASS"),48;break;case 28:return this.popState(),this.pushState("CLASS_STYLE"),49;break;case 29:return this.popState(),50;break;case 30:return this.pushState("STYLE"),45;break;case 31:return this.popState(),this.pushState("STYLEDEF_STYLES"),46;break;case 32:return this.popState(),47;break;case 33:return this.pushState("SCALE"),17;break;case 34:return 18;case 35:this.popState();break;case 36:this.pushState("STATE");break;case 37:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),25;break;case 38:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),26;break;case 39:return this.popState(),n.yytext=n.yytext.slice(0,-10).trim(),27;break;case 40:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),25;break;case 41:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),26;break;case 42:return this.popState(),n.yytext=n.yytext.slice(0,-10).trim(),27;break;case 43:return 51;case 44:return 52;case 45:return 53;case 46:return 54;case 47:this.pushState("STATE_STRING");break;case 48:return this.pushState("STATE_ID"),"AS";break;case 49:if(!i())return;return this.popState(),"ID";break;case 50:this.popState();break;case 51:return"STATE_DESCR";case 52:throw Error('Error: State name must be a single word. Found: "'+n.yytext.trim()+'"');case 53:return 19;case 54:this.popState();break;case 55:return this.popState(),this.pushState("struct"),20;break;case 56:return this.popState(),21;break;case 57:break;case 58:return this.begin("NOTE"),29;break;case 59:return this.popState(),this.pushState("NOTE_ID"),59;break;case 60:return this.popState(),this.pushState("NOTE_ID"),60;break;case 61:this.popState(),this.pushState("FLOATING_NOTE");break;case 62:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";break;case 63:break;case 64:return"NOTE_TEXT";case 65:if(!i())return;return this.popState(),"ID";break;case 66:if(!i())return;return this.popState(),this.pushState("NOTE_TEXT"),24;break;case 67:return this.popState(),n.yytext=n.yytext.substr(2).trim(),31;break;case 68:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),31;break;case 69:return 6;case 70:return 6;case 71:return 16;case 72:return 57;case 73:if(!i())return;return 24;case 74:return n.yytext=n.yytext.trim(),14;break;case 75:return 15;case 76:return 28;case 77:return 58;case 78:return 5;case 79:return"INVALID"}},"anonymous"),rules:[/^(?:click\b)/i,/^(?:href\b)/i,/^(?:"[^"]*")/i,/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\w+\s+\w+.*?\{)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?\n\s*end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:(?:[^:\n;]|:[^:\n;])+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[10,11,12],inclusive:!1},struct:{rules:[10,11,12,23,27,30,36,43,44,45,46,56,57,58,72,73,74,75,76,77],inclusive:!1},FLOATING_NOTE_ID:{rules:[65],inclusive:!1},FLOATING_NOTE:{rules:[62,63,64],inclusive:!1},NOTE_TEXT:{rules:[67,68],inclusive:!1},NOTE_ID:{rules:[66],inclusive:!1},NOTE:{rules:[59,60,61],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[32],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[31],inclusive:!1},CLASS_STYLE:{rules:[29],inclusive:!1},CLASS:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[26],inclusive:!1},CLASSDEF:{rules:[24,25],inclusive:!1},acc_descr_multiline:{rules:[21,22],inclusive:!1},acc_descr:{rules:[19],inclusive:!1},acc_title:{rules:[17],inclusive:!1},SCALE:{rules:[14,15,34,35],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[49],inclusive:!1},STATE_STRING:{rules:[50,51],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[10,11,12,37,38,39,40,41,42,47,48,52,53,54,55],inclusive:!1},ID:{rules:[10,11,12],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,12,13,16,18,20,23,27,30,33,36,55,58,69,70,71,72,73,74,75,77,78,79],inclusive:!0}}};return Q}();Lt.lexer=me;function Tt(){this.yy={}}return e(Tt,"Parser"),Tt.prototype=Lt,Lt.Parser=Tt,new Tt}();Bt.parser=Bt;var Ee=Bt,_e="TB",qt="TB",Ut="dir",ot="state",nt="root",Gt="relation",ve="classDef",De="style",Ce="applyClass",ut="default",Qt="divider",Zt="fill:none",te="fill: #333",ee="c",re="markdown",ie="normal",Ft="rect",Pt="rectWithTitle",Ae="stateStart",xe="stateEnd",Yt="divider",Ht="roundedWithTitle",Le="note",we="noteGroup",ft="statediagram",Ie="state",Ne=`${ft}-${Ie}`,ae="transition",Oe="note",$e="note-edge",Fe=`${ae} ${$e}`,Pe=`${ft}-${Oe}`,Be="cluster",Ge=`${ft}-${Be}`,Ye="cluster-alt",Ve=`${ft}-${Ye}`,ne="parent",ce="note",Me="state",Vt="----",We=`${Vt}${ce}`,zt=`${Vt}${ne}`,At=new Map,Z=0,de=0,ct=new Map,je=e((t,s,c,r)=>{if(t===Yt&&c?.id!==void 0&&ct.has(c.id)){let m=ct.get(c.id);return ct.set(s,m),m}let u=de++,f=r?void 0:u;return ct.set(s,f),f},"colorSlotFor");function xt(t="",s=0,c="",r=Vt){let u=c!==null&&c.length>0?`${r}${c}`:"";return`${Me}-${t}${u}-${s}`}e(xt,"stateDomId");var Ue=e((t,s,c,r,u,f,m,b)=>{a.trace("items",s),s.forEach((o)=>{switch(o.stmt){case ot:dt(t,o,c,r,u,f,m,b);break;case ut:dt(t,o,c,r,u,f,m,b);break;case Gt:{dt(t,o.state1,c,r,u,f,m,b),dt(t,o.state2,c,r,u,f,m,b);let D=m==="neo",x={id:"edge"+Z,start:o.state1.id,end:o.state2.id,arrowhead:"normal",arrowTypeEnd:D?"arrow_barb_neo":"arrow_barb",style:Zt,labelStyle:"",label:v.sanitizeText(o.description??"",l()),arrowheadStyle:te,labelpos:ee,labelType:re,thickness:ie,classes:ae,look:m};u.push(x),Z++}break}})},"setupDoc"),Kt=e((t,s=qt)=>{let c=s;if(t.doc){for(let r of t.doc)if(r.stmt==="dir")c=r.value}return c},"getDir");function ht(t,s,c){if(!s.id||s.id==="</join></fork>"||s.id==="</choice>")return;if(s.cssClasses){if(!Array.isArray(s.cssCompiledStyles))s.cssCompiledStyles=[];s.cssClasses.split(" ").forEach((u)=>{let f=c.get(u);if(f)s.cssCompiledStyles=[...s.cssCompiledStyles??[],...f.styles]})}let r=t.find((u)=>u.id===s.id);if(r)Object.assign(r,s);else t.push(s)}e(ht,"insertOrUpdateNode");function fe(t){return t?.classes?.join(" ")??""}e(fe,"getClassesFromDbInfo");function pe(t){return t?.styles??[]}e(pe,"getStylesFromDbInfo");var dt=e((t,s,c,r,u,f,m,b)=>{let o=s.id,D=c.get(o),x=fe(D),G=pe(D),Y=l(),j=x.trim()!==""||G.length>0;if(a.info("dataFetcher parsedItem",s,D,G),o!=="root"){let O=Ft;if(s.start===!0)O=Ae;else if(s.start===!1)O=xe;if(s.type!==ut)O=s.type;if(!At.get(o))At.set(o,{id:o,shape:O,description:v.sanitizeText(o,Y),cssClasses:`${x} ${Ne}`,cssStyles:G});let y=At.get(o);if(s.description){if(Array.isArray(y.description))y.shape=Pt,y.description.push(s.description);else if(y.description?.length&&y.description.length>0)if(y.shape=Pt,y.description===o)y.description=[s.description];else y.description=[y.description,s.description];else y.shape=Ft,y.description=s.description;y.description=v.sanitizeTextOrArray(y.description,Y)}if(y.description?.length===1&&y.shape===Pt)if(y.type==="group")y.shape=Ht;else y.shape=Ft;if(!y.type&&s.doc)a.info("Setting cluster for XCX",o,Kt(s)),y.type="group",y.isGroup=!0,y.dir=Kt(s),y.shape=s.type===Qt?Yt:Ht,y.colorIndex=je(y.shape,o,t,j),y.cssClasses=`${y.cssClasses} ${Ge} ${f?Ve:""}`;let V={labelStyle:"",shape:y.shape,label:y.description,cssClasses:y.cssClasses,cssCompiledStyles:[],cssStyles:y.cssStyles,id:o,dir:y.dir,domId:xt(o,Z),type:y.type,isGroup:y.type==="group",colorIndex:y.colorIndex,padding:8,rx:10,ry:10,look:m,labelType:"markdown"};if(V.shape===Yt)V.label="";if(t&&t.id!=="root")a.trace("Setting node ",o," to be child of its parent ",t.id),V.parentId=t.id;if(V.centerLabel=!0,s.note){let F={labelStyle:"",shape:Le,label:s.note.text,labelType:"markdown",cssClasses:Pe,cssStyles:[],cssCompiledStyles:[],id:o+We+"-"+Z,domId:xt(o,Z,ce),type:"node",isGroup:!1,padding:Y.flowchart?.padding,look:m,position:s.note.position},z=o+zt,W={labelStyle:"",shape:we,label:s.note.text,cssClasses:y.cssClasses,cssStyles:[],id:o+zt,domId:xt(o,Z,ne),type:"group",isGroup:!0,padding:16,look:m,position:s.note.position};Z++,W.id=z,F.parentId=z,ht(r,W,b),ht(r,F,b),ht(r,V,b);let K=o,N=F.id;if(s.note.position==="left of")K=F.id,N=o;u.push({id:K+"-"+N,start:K,end:N,arrowhead:"none",arrowTypeEnd:"",style:Zt,labelStyle:"",classes:Fe,pattern:"dashed",arrowheadStyle:te,labelpos:ee,labelType:re,thickness:ie,look:m})}else ht(r,V,b)}if(s.doc)a.trace("Adding nodes children "),Ue(s,s.doc,c,r,u,!f,m,b)},"dataFetcher"),He=e(()=>{At.clear(),Z=0,de=0,ct.clear()},"reset"),Se=e((t,s=qt)=>{if(!t.doc)return s;let c=s;for(let r of t.doc)if(r.stmt==="dir")c=r.value;return c},"getDir"),ze=e(function(t,s){return s.db.getClasses()},"getClasses"),Ke=e(async function(t,s,c,r){a.info("REF0:"),a.info("Drawing state diagram (v2)",s);let{securityLevel:u,state:f,layout:m}=l();r.db.extract(r.db.getRootDocV2());let b=r.db.getData(),o=he(s,u);if(b.type=r.type,b.layoutAlgorithm=ye(m),b.nodeSpacing=f?.nodeSpacing||50,b.rankSpacing=f?.rankSpacing||50,l().look==="neo")b.markers=["barbNeo"];else b.markers=["barb"];b.diagramId=s,await ge(b,o);let x=8;try{(typeof r.db.getLinks==="function"?r.db.getLinks():new Map).forEach((Y,j)=>{let O=typeof j==="string"?j:typeof j?.id==="string"?j.id:"",y=b.nodes.find((N)=>N.id===O);if(!O){a.warn("⚠️ Invalid or missing stateId from key:",JSON.stringify(j));return}let V=o.node()?.querySelectorAll("g.node, g.rough-node"),F;if(V?.forEach((N)=>{let st=N.textContent?.trim();if(N.id===y?.domId||st===O)F=N}),!F){a.warn("⚠️ Could not find node matching text:",O);return}let z=F.parentNode;if(!z){a.warn("⚠️ Node has no parent, cannot wrap:",O);return}let W=document.createElementNS("http://www.w3.org/2000/svg","a"),K=Y.url.replace(/^"+|"+$/g,"");if(W.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",K),W.setAttribute("target","_blank"),Y.tooltip){let N=Y.tooltip.replace(/^"+|"+$/g,"");W.setAttribute("title",N),F.setAttribute("title",N)}z.replaceChild(W,F),W.appendChild(F),a.info("\uD83D\uDD17 Wrapped node in <a> tag for:",O,Y.url)})}catch(G){a.error("❌ Error injecting clickable links:",G)}M.insertTitle(o,"statediagramTitleText",f?.titleTopMargin??25,r.db.getDiagramTitle()),le(o,x,ft,f?.useMaxWidth??!0)},"draw"),Xe={getClasses:ze,draw:Ke,getDir:Se},B={START_NODE:"[*]",START_TYPE:"start",END_NODE:"[*]",END_TYPE:"end",COLOR_KEYWORD:"color",FILL_KEYWORD:"fill",BG_FILL:"bgFill",STYLECLASS_SEP:","},Xt=e(()=>new Map,"newClassesList"),Jt=e(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),Ct=e((t)=>JSON.parse(JSON.stringify(t)),"clone"),Je=class{constructor(t){this.version=t,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=Xt(),this.documents={root:Jt()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.funs=[],this.getAccTitle=E,this.setAccTitle=S,this.getAccDescription=A,this.setAccDescription=T,this.setDiagramTitle=R,this.getDiagramTitle=L,this.clear(),this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this),this.bindFunctions=this.bindFunctions.bind(this)}static{e(this,"StateDB")}static{this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}}extract(t){this.clear(!0);for(let r of Array.isArray(t)?t:t.doc)switch(r.stmt){case ot:this.addState(r.id.trim(),r.type,r.doc,r.description,r.note);break;case Gt:this.addRelation(r.state1,r.state2,r.description);break;case ve:this.addStyleClass(r.id.trim(),r.classes);break;case De:this.handleStyleDef(r);break;case Ce:this.setCssClass(r.id.trim(),r.styleClass);break;case"click":this.addLink(r.id,r.url,r.tooltip);break}let s=this.getStates(),c=l();He(),dt(void 0,this.getRootDocV2(),s,this.nodes,this.edges,!0,c.look,this.classes);for(let r of this.nodes){if(!Array.isArray(r.label))continue;if(r.description=r.label.slice(1),r.isGroup&&r.description.length>0)throw Error(`Group nodes can only have label. Remove the additional description for node [${r.id}]`);r.label=r.label[0]}}handleStyleDef(t){let s=t.id.trim().split(","),c=t.styleClass.split(",");for(let r of s){let u=this.getState(r);if(!u){let f=r.trim();this.addState(f),u=this.getState(f)}if(u)u.styles=c.map((f)=>f.replace(/;/g,"")?.trim())}}setRootDoc(t){if(a.info("Setting root doc",t),this.rootDoc=t,this.version===1)this.extract(t);else this.extract(this.getRootDocV2())}docTranslator(t,s,c){if(s.stmt===Gt){this.docTranslator(t,s.state1,!0),this.docTranslator(t,s.state2,!1);return}if(s.stmt===ot)if(s.id===B.START_NODE)s.id=t.id+(c?"_start":"_end"),s.start=c;else s.id=s.id.trim();if(s.stmt!==nt&&s.stmt!==ot||!s.doc)return;let r=[],u=[];for(let f of s.doc)if(f.type===Qt){let m=Ct(f);m.doc=Ct(u),r.push(m),u=[]}else u.push(f);if(r.length>0&&u.length>0){let f={stmt:ot,id:Ui(),type:"divider",doc:Ct(u)};r.push(Ct(f)),s.doc=r}s.doc.forEach((f)=>this.docTranslator(s,f,!0))}getRootDocV2(){return this.docTranslator({id:nt,stmt:nt},{id:nt,stmt:nt,doc:this.rootDoc},!0),{id:nt,doc:this.rootDoc}}addState(t,s=ut,c=void 0,r=void 0,u=void 0,f=void 0,m=void 0,b=void 0){let o=t?.trim();if(!this.currentDocument.states.has(o))a.info("Adding state ",o,r),this.currentDocument.states.set(o,{stmt:ot,id:o,descriptions:[],type:s,doc:c,note:u,classes:[],styles:[],textStyles:[]});else{let D=this.currentDocument.states.get(o);if(!D)throw Error(`State not found: ${o}`);if(!D.doc)D.doc=c;if(!D.type)D.type=s}if(r)a.info("Setting state description",o,r),(Array.isArray(r)?r:[r]).forEach((x)=>this.addDescription(o,x.trim()));if(u){let D=this.currentDocument.states.get(o);if(!D)throw Error(`State not found: ${o}`);D.note=u,D.note.text=v.sanitizeText(D.note.text,l())}if(f)a.info("Setting state classes",o,f),(Array.isArray(f)?f:[f]).forEach((x)=>this.setCssClass(o,x.trim()));if(m)a.info("Setting state styles",o,m),(Array.isArray(m)?m:[m]).forEach((x)=>this.setStyle(o,x.trim()));if(b)a.info("Setting state styles",o,m),(Array.isArray(b)?b:[b]).forEach((x)=>this.setTextStyle(o,x.trim()))}clear(t){if(this.nodes=[],this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.documents={root:Jt()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=Xt(),!t)this.links=new Map,C()}getState(t){return this.currentDocument.states.get(t)}getStates(){return this.currentDocument.states}logDocuments(){a.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(t,s,c){this.links.set(t,{url:s,tooltip:c}),a.warn("Adding link",t,s,c)}getLinks(){return this.links}startIdIfNeeded(t=""){if(t===B.START_NODE)return this.startEndCount++,`${B.START_TYPE}${this.startEndCount}`;return t}startTypeIfNeeded(t="",s=ut){return t===B.START_NODE?B.START_TYPE:s}endIdIfNeeded(t=""){if(t===B.END_NODE)return this.startEndCount++,`${B.END_TYPE}${this.startEndCount}`;return t}endTypeIfNeeded(t="",s=ut){return t===B.END_NODE?B.END_TYPE:s}addRelationObjs(t,s,c=""){let r=this.startIdIfNeeded(t.id.trim()),u=this.startTypeIfNeeded(t.id.trim(),t.type),f=this.startIdIfNeeded(s.id.trim()),m=this.startTypeIfNeeded(s.id.trim(),s.type);this.addState(r,u,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),this.addState(f,m,s.doc,s.description,s.note,s.classes,s.styles,s.textStyles),this.currentDocument.relations.push({id1:r,id2:f,relationTitle:v.sanitizeText(c,l())})}addRelation(t,s,c){if(typeof t==="object"&&typeof s==="object")this.addRelationObjs(t,s,c);else if(typeof t==="string"&&typeof s==="string"){let r=this.startIdIfNeeded(t.trim()),u=this.startTypeIfNeeded(t),f=this.endIdIfNeeded(s.trim()),m=this.endTypeIfNeeded(s);this.addState(r,u),this.addState(f,m),this.currentDocument.relations.push({id1:r,id2:f,relationTitle:c?v.sanitizeText(c,l()):void 0})}}addDescription(t,s){let c=this.currentDocument.states.get(t),r=s.startsWith(":")?s.replace(":","").trim():s;c?.descriptions?.push(v.sanitizeText(r,l()))}cleanupLabel(t){return t.startsWith(":")?t.slice(2).trim():t.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(t,s=""){if(!this.classes.has(t))this.classes.set(t,{id:t,styles:[],textStyles:[]});let c=this.classes.get(t);if(s&&c)s.split(B.STYLECLASS_SEP).forEach((r)=>{let u=r.replace(/([^;]*);/,"$1").trim();if(RegExp(B.COLOR_KEYWORD).exec(r)){let m=u.replace(B.FILL_KEYWORD,B.BG_FILL).replace(B.COLOR_KEYWORD,B.FILL_KEYWORD);c.textStyles.push(m)}c.styles.push(u)})}getClasses(){return this.classes}setupToolTips(t){let s=$t();p(t).select("svg").selectAll("g.node, g.rough-node").on("mouseover",(u)=>{let f=p(u.currentTarget),m=f.attr("title");if(m===null)return;let b=u.currentTarget?.getBoundingClientRect();s.transition().duration(200).style("opacity",".9"),s.style("left",window.scrollX+b.left+(b.right-b.left)/2+"px").style("top",window.scrollY+b.bottom+"px"),s.html(Re.sanitize(m)),f.classed("hover",!0)}).on("mouseout",(u)=>{s.transition().duration(500).style("opacity",0),p(u.currentTarget).classed("hover",!1)})}setCssClass(t,s){t.split(",").forEach((c)=>{let r=this.getState(c);if(!r){let u=c.trim();this.addState(u),r=this.getState(u)}r?.classes?.push(s)})}setStyle(t,s){this.getState(t)?.styles?.push(s)}setTextStyle(t,s){this.getState(t)?.textStyles?.push(s)}bindFunctions(t){this.funs.forEach((s)=>{s(t)})}getDirectionStatement(){return this.rootDoc.find((t)=>t.stmt===Ut)}getDirection(){return this.getDirectionStatement()?.value??_e}setDirection(t){let s=this.getDirectionStatement();if(s)s.value=t;else this.rootDoc.unshift({stmt:Ut,value:t})}trimColon(t){return t.startsWith(":")?t.slice(1).trim():t.trim()}getData(){let t=l();for(let s of this.nodes)if(s.wrappingWidth??=t.state?.wrappingWidth,!s.isGroup)s.minWidth??=t.state?.minNodeWidth;return{nodes:this.nodes,edges:this.edges,other:{},config:t,direction:Se(this.getRootDocV2())}}getConfig(){return l().state}},qe=e((t)=>{let{theme:s,bkgColorArray:c,borderColorArray:r}=t;if(!oe(s,r))return"";let u=se(t.look),f=ue(c),m="";for(let b=0;b<gt(r);b++){let o=r[b],D=f?`fill: ${c[b%c.length]};`:"",x=`[data-look="${u}"][data-color-id="color-${b}"]`;m+=`
7
7
 
8
8
  /* The title strip: \`rect.outer\` spans the whole composite and \`rect.inner\` covers
9
9
  the body, so what stays visible of \`outer\` is the band behind the label. */
@@ -288,4 +288,4 @@ g.stateGroup line {
288
288
  ry: ${t.radius}px;
289
289
  filter: ${t.dropShadow?t.dropShadow.replace("url(#drop-shadow)",`url(${t.svgId}-drop-shadow)`):"none"}
290
290
  }
291
- `,"getStyles"),Ze=Qe,ks={parser:Te,get db(){return new Je(2)},renderer:Xe,styles:Ze,init:e((t)=>{if(!t.state)t.state={};t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")};export{ks as diagram};
291
+ `,"getStyles"),Ze=Qe,ks={parser:Ee,get db(){return new Je(2)},renderer:Xe,styles:Ze,init:e((t)=>{if(!t.state)t.state={};t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")};export{ks as diagram};
@@ -1 +1 @@
1
- import{N,r,t,n,Ae,It,j,pe,Xi}from"./chunk-qmbgb79a.js";function T(s){let a=N(Ae);a?.useTheme?.();let e=s.payload,[i,m]=r(!1);if(!e||e.state==="pending")return null;let h=e.questions.map((o)=>o.header).join(" · "),l=e.state==="answered",u=l?j:It,d=l?"text-success":"text-faint",f=l?"已回答":e.state==="dismissed"?"已忽略提问":"提问已取消",p=l?C(e):h;if(a){let{Collapsible:o,CollapsibleTrigger:y,CollapsibleContent:v,Chevron:b,cn:g}=a;return n(o,{open:i,onOpenChange:m,className:"w-full text-xs text-ink/90 animate-fade",children:[n(y,{className:a.style("chat.timelineRow","cursor-pointer select-none"),children:[t("span",{className:"flex size-4 shrink-0 items-center justify-center",children:t(u,{className:g("size-3.5",d)})}),t("span",{className:"shrink-0",children:f}),t("span",{className:"min-w-0 flex-1 truncate opacity-80",title:p,children:p}),t(b,{className:"size-3.5 shrink-0 text-faint opacity-0 transition-opacity group-hover/collapsible:opacity-100 group-data-[state=open]/collapsible:opacity-100"})]}),t(v,{children:t("div",{className:"mt-0.5 mb-1.5 ml-2 border-l border-line py-1 pl-[15px]",children:t(x,{question:e})})})]})}return n("div",{role:"status",className:"w-full animate-fade",children:[n("button",{type:"button","aria-expanded":i,className:"group -mx-2 flex w-[calc(100%+1rem)] cursor-pointer items-center gap-2 rounded-lg px-2 py-1 text-left text-[12.5px] text-faint transition-colors select-none hover:bg-raised/60 hover:text-dim",onClick:()=>m((o)=>!o),children:[t("span",{className:"flex size-4 shrink-0 items-center justify-center",children:t(u,{className:`size-3.5 shrink-0 ${d}`})}),t("span",{className:"shrink-0",children:f}),t("span",{className:"min-w-0 flex-1 truncate opacity-80",title:p,children:p}),t(pe,{className:`size-3.5 shrink-0 text-faint opacity-0 transition-[opacity,transform] group-hover:opacity-100 ${i?"rotate-180 opacity-100":""}`})]}),i&&t("div",{className:"mt-0.5 mb-1.5 ml-2 border-l border-line py-1 pl-[15px]",children:t(x,{question:e})})]})}function c(s){if(!s)return"未作答";let a=s.selected.map((e)=>Xi(e).title);if(s.other)a.push(`其他:${s.other}`);return a.length?a.join("、"):"未作答"}function C(s){if(s.questions.length===1)return`${s.questions[0]?.header??""} · ${c(s.answers?.[0])}`;return s.questions.map((a,e)=>`${a.header} → ${c(s.answers?.[e])}`).join(";")}function x(s){let a=s.question;return t("div",{className:"space-y-2 text-xs",children:a.questions.map((e,i)=>n("div",{className:"space-y-0.5",children:[n("div",{className:"text-dim",children:[t("span",{className:"font-medium text-ink/90",children:e.header})," · ",e.question]}),t("div",{className:"text-ink",children:c(a.answers?.[i])})]},e.header))})}export{T as QuestionCard};
1
+ import{N,r,t,n,Ae,It,j,ve,Xi}from"./chunk-rddft5ce.js";function T(s){let a=N(Ae);a?.useTheme?.();let e=s.payload,[i,m]=r(!1);if(!e||e.state==="pending")return null;let h=e.questions.map((o)=>o.header).join(" · "),l=e.state==="answered",u=l?j:It,d=l?"text-success":"text-faint",f=l?"已回答":e.state==="dismissed"?"已忽略提问":"提问已取消",p=l?C(e):h;if(a){let{Collapsible:o,CollapsibleTrigger:y,CollapsibleContent:v,Chevron:b,cn:g}=a;return n(o,{open:i,onOpenChange:m,className:"w-full text-xs text-ink/90 animate-fade",children:[n(y,{className:a.style("chat.timelineRow","cursor-pointer select-none"),children:[t("span",{className:"flex size-4 shrink-0 items-center justify-center",children:t(u,{className:g("size-3.5",d)})}),t("span",{className:"shrink-0",children:f}),t("span",{className:"min-w-0 flex-1 truncate opacity-80",title:p,children:p}),t(b,{className:"size-3.5 shrink-0 text-faint opacity-0 transition-opacity group-hover/collapsible:opacity-100 group-data-[state=open]/collapsible:opacity-100"})]}),t(v,{children:t("div",{className:"mt-0.5 mb-1.5 ml-2 border-l border-line py-1 pl-[15px]",children:t(x,{question:e})})})]})}return n("div",{role:"status",className:"w-full animate-fade",children:[n("button",{type:"button","aria-expanded":i,className:"group -mx-2 flex w-[calc(100%+1rem)] cursor-pointer items-center gap-2 rounded-lg px-2 py-1 text-left text-[12.5px] text-faint transition-colors select-none hover:bg-raised/60 hover:text-dim",onClick:()=>m((o)=>!o),children:[t("span",{className:"flex size-4 shrink-0 items-center justify-center",children:t(u,{className:`size-3.5 shrink-0 ${d}`})}),t("span",{className:"shrink-0",children:f}),t("span",{className:"min-w-0 flex-1 truncate opacity-80",title:p,children:p}),t(ve,{className:`size-3.5 shrink-0 text-faint opacity-0 transition-[opacity,transform] group-hover:opacity-100 ${i?"rotate-180 opacity-100":""}`})]}),i&&t("div",{className:"mt-0.5 mb-1.5 ml-2 border-l border-line py-1 pl-[15px]",children:t(x,{question:e})})]})}function c(s){if(!s)return"未作答";let a=s.selected.map((e)=>Xi(e).title);if(s.other)a.push(`其他:${s.other}`);return a.length?a.join("、"):"未作答"}function C(s){if(s.questions.length===1)return`${s.questions[0]?.header??""} · ${c(s.answers?.[0])}`;return s.questions.map((a,e)=>`${a.header} → ${c(s.answers?.[e])}`).join(";")}function x(s){let a=s.question;return t("div",{className:"space-y-2 text-xs",children:a.questions.map((e,i)=>n("div",{className:"space-y-0.5",children:[n("div",{className:"text-dim",children:[t("span",{className:"font-medium text-ink/90",children:e.header})," · ",e.question]}),t("div",{className:"text-ink",children:c(a.answers?.[i])})]},e.header))})}export{T as QuestionCard};
@@ -1,9 +1,9 @@
1
- import{e,Qt,a,ce,v,C,S,E,T,A,R,L,l,p,M,ze,Kr,ue,oe,se,ht,ye,ve}from"./chunk-pyg1mr80.js";import{Bt}from"./chunk-9dy7z3ej.js";import{ge}from"./chunk-9xgspn75.js";import{le}from"./chunk-01hcjafh.js";var Ue=function(){var s=e(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],he=[1,68],j=[1,65],de=[1,69],be=[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],pe=[18,61],We=[1,110],He=[1,109],Qe=[20,43,51,53,54,55],Ve=[18,61,64,66],Me={trace:e(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:e(function(o,h,f,r,m,t,fe){var i=t.length-1;switch(m){case 1:break;case 2:this.$=[];break;case 3:this.$=t[i-1].concat(t[i]);break;case 4:this.$=t[i];break;case 5:case 6:this.$=[];break;case 7:r.addEntity(t[i-4]),r.addEntity(t[i-2]),r.addRelationship(t[i-4],t[i],t[i-2],t[i-3]),this.$=[t[i-4],t[i-2]];break;case 8:r.addEntity(t[i-8]),r.addEntity(t[i-4]),r.addRelationship(t[i-8],t[i],t[i-4],t[i-5]),r.setClass([t[i-8]],t[i-6]),r.setClass([t[i-4]],t[i-2]),this.$=[t[i-8],t[i-4]];break;case 9:r.addEntity(t[i-6]),r.addEntity(t[i-2]),r.addRelationship(t[i-6],t[i],t[i-2],t[i-3]),r.setClass([t[i-6]],t[i-4]),this.$=[t[i-6],t[i-2]];break;case 10:r.addEntity(t[i-6]),r.addEntity(t[i-4]),r.addRelationship(t[i-6],t[i],t[i-4],t[i-5]),r.setClass([t[i-4]],t[i-2]),this.$=[t[i-6],t[i-4]];break;case 11:r.addEntity(t[i-3]),r.addAttributes(t[i-3],t[i-1]),this.$=[t[i-3]];break;case 12:r.addEntity(t[i-5]),r.addAttributes(t[i-5],t[i-1]),r.setClass([t[i-5]],t[i-3]),this.$=[t[i-5]];break;case 13:r.addEntity(t[i-2]),this.$=[t[i-2]];break;case 14:r.addEntity(t[i-4]),r.setClass([t[i-4]],t[i-2]),this.$=[t[i-4]];break;case 15:r.addEntity(t[i]),this.$=[t[i]];break;case 16:r.addEntity(t[i-2]),r.setClass([t[i-2]],t[i]),this.$=[t[i-2]];break;case 17:r.addEntity(t[i-6],t[i-4]),r.addAttributes(t[i-6],t[i-1]),this.$=[t[i-6]];break;case 18:r.addEntity(t[i-8],t[i-6]),r.addAttributes(t[i-8],t[i-1]),r.setClass([t[i-8]],t[i-3]),this.$=[t[i-8]];break;case 19:r.addEntity(t[i-5],t[i-3]),this.$=[t[i-5]];break;case 20:r.addEntity(t[i-7],t[i-5]),r.setClass([t[i-7]],t[i-2]),this.$=[t[i-7]];break;case 21:r.addEntity(t[i-3],t[i-1]);break;case 22:r.addEntity(t[i-5],t[i-3]),r.setClass([t[i-5]],t[i]);break;case 23:case 24:this.$=t[i].trim(),r.setAccTitle(this.$);break;case 25:case 26:this.$=t[i].trim(),r.setAccDescription(this.$);break;case 27:if(!r.subgraphDepth)r.setDirection(t[i].value),this.$=[];else this.$=t[i];break;case 31:r.subgraphDepth=(r.subgraphDepth||1)-1,this.$=r.addSubGraph({text:t[i-2].id},t[i-1],{text:t[i-2].text});break;case 32:r.subgraphDepth=(r.subgraphDepth||0)+1,this.$={id:t[i-1],text:t[i-1]};break;case 33:r.subgraphDepth=(r.subgraphDepth||0)+1,this.$={id:t[i-4],text:t[i-2]};break;case 34:case 59:case 60:case 61:case 62:case 86:this.$=t[i];break;case 35:this.$=t[i-1]+" "+t[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.$=t[i-3],r.addClass(t[i-2],t[i-1]);break;case 41:case 42:case 63:case 72:this.$=[t[i]];break;case 43:case 44:this.$=t[i-2].concat([t[i]]);break;case 45:this.$=t[i-2],r.setClass(t[i-1],t[i]);break;case 46:this.$=t[i-3],r.addCssStyles(t[i-2],t[i-1]);break;case 47:this.$=[t[i]];break;case 48:t[i-2].push(t[i]),this.$=t[i-2];break;case 50:this.$=t[i-1]+t[i];break;case 58:case 84:case 85:this.$=t[i].replace(/"/g,"");break;case 64:t[i].push(t[i-1]),this.$=t[i];break;case 65:this.$={type:t[i-1],name:t[i]};break;case 66:this.$={type:t[i-2],name:t[i-1],keys:t[i]};break;case 67:this.$={type:t[i-2],name:t[i-1],comment:t[i]};break;case 68:this.$={type:t[i-3],name:t[i-2],keys:t[i-1],comment:t[i]};break;case 69:case 71:case 74:this.$=t[i];break;case 70:this.$=t[i-1]+t[i];break;case 73:t[i-2].push(t[i]),this.$=t[i-2];break;case 75:this.$=t[i].replace(/"/g,"");break;case 76:this.$={cardA:t[i],relType:t[i-1],cardB:t[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:he,45:j,48:66,49:67,51:de,52:be},s(ke,[2,41]),s(ke,[2,42]),{15:72,43:K,44:Z,45:j},{12:ne,42:73,44:he,45:j,48:66,49:67,51:de,52:be},{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:he,51:de,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:_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(pe,[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:he,48:113,49:67,51:de,52:be},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(pe,[2,66],{60:120,64:[1,121],66:He}),s(pe,[2,67]),s(Ve,[2,72]),s(pe,[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:he,51:de,52:be}),{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(pe,[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:e(function(o,h){if(h.recoverable)this.trace(o);else{var f=Error(o);throw f.hash=h,f}},"parseError"),parse:e(function(o){var h=this,f=[0],r=[],m=[null],t=[],fe=this.table,i="",Ne=0,Xe=0,Je=0,at=2,$e=1,nt=t.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;t.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,t.length=t.length-V}e(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}e(et,"lex");var D,Fe,Q,w,kt,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)+`:
1
+ import{e,Qt,a,ce,v,C,S,E,T,A,R,L,l,p,M,ze,Kr,ue,oe,se,gt,ge,ye}from"./chunk-1s53190z.js";import{Bt}from"./chunk-tqr80b5w.js";import{he}from"./chunk-r7frwjqx.js";import{le}from"./chunk-989jq2h8.js";var Ue=function(){var s=e(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],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],de=[1,68],j=[1,65],be=[1,69],pe=[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:e(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:e(function(o,h,f,r,m,t,ke){var i=t.length-1;switch(m){case 1:break;case 2:this.$=[];break;case 3:this.$=t[i-1].concat(t[i]);break;case 4:this.$=t[i];break;case 5:case 6:this.$=[];break;case 7:r.addEntity(t[i-4]),r.addEntity(t[i-2]),r.addRelationship(t[i-4],t[i],t[i-2],t[i-3]),this.$=[t[i-4],t[i-2]];break;case 8:r.addEntity(t[i-8]),r.addEntity(t[i-4]),r.addRelationship(t[i-8],t[i],t[i-4],t[i-5]),r.setClass([t[i-8]],t[i-6]),r.setClass([t[i-4]],t[i-2]),this.$=[t[i-8],t[i-4]];break;case 9:r.addEntity(t[i-6]),r.addEntity(t[i-2]),r.addRelationship(t[i-6],t[i],t[i-2],t[i-3]),r.setClass([t[i-6]],t[i-4]),this.$=[t[i-6],t[i-2]];break;case 10:r.addEntity(t[i-6]),r.addEntity(t[i-4]),r.addRelationship(t[i-6],t[i],t[i-4],t[i-5]),r.setClass([t[i-4]],t[i-2]),this.$=[t[i-6],t[i-4]];break;case 11:r.addEntity(t[i-3]),r.addAttributes(t[i-3],t[i-1]),this.$=[t[i-3]];break;case 12:r.addEntity(t[i-5]),r.addAttributes(t[i-5],t[i-1]),r.setClass([t[i-5]],t[i-3]),this.$=[t[i-5]];break;case 13:r.addEntity(t[i-2]),this.$=[t[i-2]];break;case 14:r.addEntity(t[i-4]),r.setClass([t[i-4]],t[i-2]),this.$=[t[i-4]];break;case 15:r.addEntity(t[i]),this.$=[t[i]];break;case 16:r.addEntity(t[i-2]),r.setClass([t[i-2]],t[i]),this.$=[t[i-2]];break;case 17:r.addEntity(t[i-6],t[i-4]),r.addAttributes(t[i-6],t[i-1]),this.$=[t[i-6]];break;case 18:r.addEntity(t[i-8],t[i-6]),r.addAttributes(t[i-8],t[i-1]),r.setClass([t[i-8]],t[i-3]),this.$=[t[i-8]];break;case 19:r.addEntity(t[i-5],t[i-3]),this.$=[t[i-5]];break;case 20:r.addEntity(t[i-7],t[i-5]),r.setClass([t[i-7]],t[i-2]),this.$=[t[i-7]];break;case 21:r.addEntity(t[i-3],t[i-1]);break;case 22:r.addEntity(t[i-5],t[i-3]),r.setClass([t[i-5]],t[i]);break;case 23:case 24:this.$=t[i].trim(),r.setAccTitle(this.$);break;case 25:case 26:this.$=t[i].trim(),r.setAccDescription(this.$);break;case 27:if(!r.subgraphDepth)r.setDirection(t[i].value),this.$=[];else this.$=t[i];break;case 31:r.subgraphDepth=(r.subgraphDepth||1)-1,this.$=r.addSubGraph({text:t[i-2].id},t[i-1],{text:t[i-2].text});break;case 32:r.subgraphDepth=(r.subgraphDepth||0)+1,this.$={id:t[i-1],text:t[i-1]};break;case 33:r.subgraphDepth=(r.subgraphDepth||0)+1,this.$={id:t[i-4],text:t[i-2]};break;case 34:case 59:case 60:case 61:case 62:case 86:this.$=t[i];break;case 35:this.$=t[i-1]+" "+t[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.$=t[i-3],r.addClass(t[i-2],t[i-1]);break;case 41:case 42:case 63:case 72:this.$=[t[i]];break;case 43:case 44:this.$=t[i-2].concat([t[i]]);break;case 45:this.$=t[i-2],r.setClass(t[i-1],t[i]);break;case 46:this.$=t[i-3],r.addCssStyles(t[i-2],t[i-1]);break;case 47:this.$=[t[i]];break;case 48:t[i-2].push(t[i]),this.$=t[i-2];break;case 50:this.$=t[i-1]+t[i];break;case 58:case 84:case 85:this.$=t[i].replace(/"/g,"");break;case 64:t[i].push(t[i-1]),this.$=t[i];break;case 65:this.$={type:t[i-1],name:t[i]};break;case 66:this.$={type:t[i-2],name:t[i-1],keys:t[i]};break;case 67:this.$={type:t[i-2],name:t[i-1],comment:t[i]};break;case 68:this.$={type:t[i-3],name:t[i-2],keys:t[i-1],comment:t[i]};break;case 69:case 71:case 74:this.$=t[i];break;case 70:this.$=t[i-1]+t[i];break;case 73:t[i-2].push(t[i]),this.$=t[i-2];break;case 75:this.$=t[i].replace(/"/g,"");break;case 76:this.$={cardA:t[i],relType:t[i-1],cardB:t[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: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,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:de,45:j,48:66,49:67,51:be,52:pe},s(_e,[2,41]),s(_e,[2,42]),{15:72,43:K,44:Z,45:j},{12:ne,42:73,44:de,45:j,48:66,49:67,51:be,52:pe},{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:de,51:be,52:pe}),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:I,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: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(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:de,48:113,49:67,51:be,52:pe},s(_e,[2,43]),s(_e,[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(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:de,51:be,52:pe}),{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:e(function(o,h){if(h.recoverable)this.trace(o);else{var f=Error(o);throw f.hash=h,f}},"parseError"),parse:e(function(o){var h=this,f=[0],r=[],m=[null],t=[],ke=this.table,i="",xe=0,Xe=0,Je=0,at=2,$e=1,nt=t.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;t.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,t.length=t.length-V}e(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}e(et,"lex");var D,Fe,Q,w,ft,Ye,ee={},Ae,F,tt,Ie;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=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(O.showPosition)Pe="Parse error on line "+(xe+1)+`:
2
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),t.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:t[t.length-(F||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(F||1)].first_column,last_column:t[t.length-1].last_column},ot)ee._$.range=[t[t.length-(F||1)].range[0],t[t.length-1].range[1]];if(Ye=this.performAction.apply(ee,[i,Xe,Ne,H.yy,w[1],m,t].concat(nt)),typeof Ye<"u")return Ye;if(F)f=f.slice(0,-1*F*2),m=m.slice(0,-1*F),t=t.slice(0,-1*F);f.push(this.productions_[w[1]][0]),m.push(ee.$),t.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:e(function(h,f){if(this.yy.parser)this.yy.parser.parseError(h,f);else throw Error(h)},"parseError"),setInput:e(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:e(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:e(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:e(function(){return this._more=!0,this},"more"),reject:e(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 `+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:O.match,token:this.terminals_[D]||D,line:O.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(f.push(D),m.push(O.yytext),t.push(O.yylloc),f.push(w[1]),D=null,!Fe){if(Xe=O.yyleng,i=O.yytext,xe=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:t[t.length-(F||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(F||1)].first_column,last_column:t[t.length-1].last_column},ot)ee._$.range=[t[t.length-(F||1)].range[0],t[t.length-1].range[1]];if(Ye=this.performAction.apply(ee,[i,Xe,xe,H.yy,w[1],m,t].concat(nt)),typeof Ye<"u")return Ye;if(F)f=f.slice(0,-1*F*2),m=m.slice(0,-1*F),t=t.slice(0,-1*F);f.push(this.productions_[w[1]][0]),m.push(ee.$),t.push(ee._$),tt=ke[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:e(function(h,f){if(this.yy.parser)this.yy.parser.parseError(h,f);else throw Error(h)},"parseError"),setInput:e(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:e(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:e(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:e(function(){return this._more=!0,this},"more"),reject:e(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:e(function(o){this.unput(this.match.slice(o))},"less"),pastInput:e(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:e(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:e(function(){var o=this.pastInput(),h=Array(o.length+1).join("-");return o+this.upcomingInput()+`
5
5
  `+h+"^"},"showPosition"),test_match:e(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 t in m)this[t]=m[t];return!1}return!1},"test_match"),next:e(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 t=0;t<m.length;t++)if(f=this._input.match(this.rules[m[t]]),f&&(!h||f[0].length>h[0].length)){if(h=f,r=t,this.options.backtrack_lexer)if(o=this.test_match(f,m[t]),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:e(function(){var h=this.next();if(h)return h;else return this.lex()},"lex"),begin:e(function(h){this.conditionStack.push(h)},"begin"),popState:e(function(){var h=this.conditionStack.length-1;if(h>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:e(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:e(function(h){if(h=this.conditionStack.length-1-Math.abs(h||0),h>=0)return this.conditionStack[h];else return"INITIAL"},"topState"),pushState:e(function(h){this.begin(h)},"pushState"),stateStackSize:e(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:e(function(h,f,r,m){var t=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 e(Oe,"Parser"),Oe.prototype=Me,Me.Parser=Oe,new Oe}();Ue.parser=Ue;var ct=Ue,ut=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=R,this.getDiagramTitle=L,this.getConfig=e(()=>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{e(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=e((_)=>{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:()=>dt});var dt=e(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()),le(x,W,"erDiagram",g?.useMaxWidth??!0)},"draw"),st=e((s,c)=>{let b=Bt,n=b(s,"r"),u=b(s,"g"),g=b(s,"b");return ce(n,u,g,c)},"fade"),bt=e((s)=>{let{theme:c,bkgColorArray:b,borderColorArray:n}=s;if(!oe(c,n))return"";let u=se(s.look),g=ue(b),N="";for(let y=0;y<ht(n);y++){let x=n[y],k=g?`fill: ${b[y%b.length]};`:"";N+=`
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:e(function(){var h=this.next();if(h)return h;else return this.lex()},"lex"),begin:e(function(h){this.conditionStack.push(h)},"begin"),popState:e(function(){var h=this.conditionStack.length-1;if(h>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:e(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:e(function(h){if(h=this.conditionStack.length-1-Math.abs(h||0),h>=0)return this.conditionStack[h];else return"INITIAL"},"topState"),pushState:e(function(h){this.begin(h)},"pushState"),stateStackSize:e(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:e(function(h,f,r,m){var t=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 Ne(){this.yy={}}return e(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=R,this.getDiagramTitle=L,this.getConfig=e(()=>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{e(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=e((_)=>{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=e(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=he(c,u);y.type=n.type,y.layoutAlgorithm=ye(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 ge(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()),le(x,W,"erDiagram",g?.useMaxWidth??!0)},"draw"),st=e((s,c)=>{let b=Bt,n=b(s,"r"),u=b(s,"g"),g=b(s,"b");return ce(n,u,g,c)},"fade"),dt=e((s)=>{let{theme:c,bkgColorArray:b,borderColorArray:n}=s;if(!oe(c,n))return"";let u=se(s.look),g=ue(b),N="";for(let y=0;y<gt(n);y++){let x=n[y],k=g?`fill: ${b[y%b.length]};`:"";N+=`
7
7
 
8
8
  [data-look="${u}"][data-color-id="color-${y}"].node path {
9
9
  stroke: ${x};
@@ -14,8 +14,8 @@ Expecting `+Ae.join(", ")+", got '"+(this.terminals_[D]||D)+"'";else Pe="Parse e
14
14
  stroke: ${x};
15
15
  ${k}
16
16
  }
17
- `}return N},"genColor"),pt=e((s)=>{let{look:c,theme:b,erEdgeLabelBackground:n,strokeWidth:u}=s;return`
18
- ${bt(s)}
17
+ `}return N},"genColor"),bt=e((s)=>{let{look:c,theme:b,erEdgeLabelBackground:n,strokeWidth:u}=s;return`
18
+ ${dt(s)}
19
19
  .entityBox {
20
20
  fill: ${s.mainBkg};
21
21
  stroke: ${s.nodeBorder};
@@ -96,4 +96,4 @@ Expecting `+Ae.join(", ")+", got '"+(this.terminals_[D]||D)+"'";else Pe="Parse e
96
96
  .cluster-label text {
97
97
  fill: ${s.titleColor??s.textColor};
98
98
  }
99
- `},"getStyles"),ft=pt,Vt={parser:ct,get db(){return new ut},renderer:it,styles:ft};export{Vt as diagram};
99
+ `},"getStyles"),pt=bt,Vt={parser:ct,get db(){return new ht},renderer:it,styles:pt};export{Vt as diagram};