@layers-app/editor 0.7.46 → 0.7.48

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 (248) hide show
  1. package/README.md +840 -830
  2. package/dist/index.cjs +2 -2
  3. package/dist/index.d.ts +8 -14
  4. package/dist/index.js +4 -4
  5. package/dist/layers.-XXFcZ-Q.js +33 -0
  6. package/dist/layers.3jBLdifJ.js +38 -0
  7. package/dist/layers.48nWXuMb.js +504 -0
  8. package/dist/layers.4NkfZAG8.js +39 -0
  9. package/dist/layers.52famHy6.js +1 -0
  10. package/dist/layers.6JZIYhnG.js +21941 -0
  11. package/dist/layers.7JqFgE4-.js +15 -0
  12. package/dist/layers.8I_XubBt.js +1 -0
  13. package/dist/layers.8L97LNWM.js +116 -0
  14. package/dist/layers.9Ei77wJG.js +40 -0
  15. package/dist/layers.9pNaFvaX.js +1 -0
  16. package/dist/layers.9vsoRdca.js +7 -0
  17. package/dist/layers.B19hGmey.js +1 -0
  18. package/dist/layers.B2hK-O3y.js +40 -0
  19. package/dist/layers.B3D4g2HH.js +1 -0
  20. package/dist/layers.B3ebXuRR.js +22 -0
  21. package/dist/layers.B4eocW2U.js +1 -0
  22. package/dist/layers.B7K7JjK6.js +1510 -0
  23. package/dist/layers.B9jC1uEF.js +9 -0
  24. package/dist/layers.B9vco1Tm.js +42 -0
  25. package/dist/layers.BAdbzzKU.js +11 -0
  26. package/dist/layers.BAtv1CM7.js +1 -0
  27. package/dist/layers.BAxiKghG.js +65 -0
  28. package/dist/layers.BCmyFF5n.js +8 -0
  29. package/dist/layers.BDlIrLZ6.js +40 -0
  30. package/dist/layers.BE1X7OZN.js +9 -0
  31. package/dist/layers.BE5c8LWk.js +4 -0
  32. package/dist/layers.BEXIxuBF.js +10 -0
  33. package/dist/layers.BFRwalLF.js +39 -0
  34. package/dist/layers.BFl0k28S.js +6 -0
  35. package/dist/layers.BGNKNfpx.js +1225 -0
  36. package/dist/layers.BHGjfW2R.js +907 -0
  37. package/dist/layers.BHstW68e.js +2238 -0
  38. package/dist/layers.BIeVwYKL.js +1 -0
  39. package/dist/layers.BJDrjORS.js +244 -0
  40. package/dist/layers.BKqs5g_B.js +51 -0
  41. package/dist/layers.BKutBTDw.js +41 -0
  42. package/dist/layers.BLa-XNid.js +84 -0
  43. package/dist/layers.BLd2spTm.js +1 -0
  44. package/dist/layers.BLqn32Nb.js +41 -0
  45. package/dist/layers.BM2O77Wh.js +425 -0
  46. package/dist/layers.BOm3l9Y2.js +8 -0
  47. package/dist/layers.BPwJ27pe.js +1268 -0
  48. package/dist/layers.BRWktvhi.js +7 -0
  49. package/dist/layers.BRbQRhez.js +9 -0
  50. package/dist/layers.BSTBZrFn.js +1 -0
  51. package/dist/{layers.NW1lST7i.js → layers.BSgSDW2J.js} +1 -1
  52. package/dist/layers.BTYE7zXl.js +32 -0
  53. package/dist/layers.BW7u2_1T.js +772 -0
  54. package/dist/layers.BXVqLjUh.js +1126 -0
  55. package/dist/layers.BXwHF1c0.js +1 -0
  56. package/dist/layers.BYA27mAA.js +10 -0
  57. package/dist/layers.BZO72u-D.js +1 -0
  58. package/dist/layers.BZbUfGYp.js +6 -0
  59. package/dist/layers.BbCfEXyj.js +55 -0
  60. package/dist/layers.BdBmAIrs.js +76 -0
  61. package/dist/layers.BeIBKBJG.js +11 -0
  62. package/dist/layers.BjauJJl_.js +42 -0
  63. package/dist/layers.Bkv-oShk.js +39 -0
  64. package/dist/layers.Bl4j3Wpr.js +10 -0
  65. package/dist/layers.Bm3vF-Ge.js +10 -0
  66. package/dist/layers.Bp-6Ampr.js +7 -0
  67. package/dist/layers.Bp180gHt.js +2966 -0
  68. package/dist/layers.Bp2T5L9r.js +21620 -0
  69. package/dist/layers.BpilXLfW.js +6 -0
  70. package/dist/{layers.Cfvta__C.js → layers.BrFRnEbi.js} +1 -1
  71. package/dist/layers.BsoRVzDP.js +806 -0
  72. package/dist/layers.BtPwy6-y.js +10 -0
  73. package/dist/layers.BtYjjZLM.js +38 -0
  74. package/dist/layers.BvhD2Hex.js +41 -0
  75. package/dist/layers.By9AhVvm.js +42 -0
  76. package/dist/layers.Bz2bAm_o.js +32 -0
  77. package/dist/layers.C-9tvKsH.js +2 -0
  78. package/dist/layers.C239vlHa.js +1583 -0
  79. package/dist/layers.C4DDZaZs.js +36 -0
  80. package/dist/layers.C5kfbdNQ.js +796 -0
  81. package/dist/layers.C8_lu5UH.js +23 -0
  82. package/dist/layers.CAo4nRSe.js +37 -0
  83. package/dist/layers.CCNu5Rkf.js +1 -0
  84. package/dist/layers.CCqA6oPh.js +5 -0
  85. package/dist/layers.CFKLwcKm.js +5 -0
  86. package/dist/layers.CFSawE7c.js +8 -0
  87. package/dist/layers.CFs5s8T3.js +52 -0
  88. package/dist/layers.CGoSj1av.js +1286 -0
  89. package/dist/layers.CH7sIJoO.js +37 -0
  90. package/dist/layers.CHZsXQcr.js +1 -0
  91. package/dist/layers.CI9mIisM.js +257 -0
  92. package/dist/layers.CJFGEsgQ.js +40 -0
  93. package/dist/layers.CJb1-QAi.js +7 -0
  94. package/dist/layers.CKTftm3f.js +2 -0
  95. package/dist/layers.CM9U_WY6.js +304 -0
  96. package/dist/layers.CMiTJnad.js +8 -0
  97. package/dist/layers.CNfAcY6Y.js +1 -0
  98. package/dist/layers.COeBHfJh.js +1 -0
  99. package/dist/layers.CPkIaDFg.js +39 -0
  100. package/dist/layers.CRYQyJW8.js +39 -0
  101. package/dist/layers.CRxZsox1.js +1 -0
  102. package/dist/layers.CTAkgg4R.js +1619 -0
  103. package/dist/layers.CU6rRFWz.js +1 -0
  104. package/dist/layers.CUuGcjpi.js +32 -0
  105. package/dist/layers.CVuk5gp9.js +84 -0
  106. package/dist/layers.CW3RPoeB.js +1089 -0
  107. package/dist/layers.CX1TPIiJ.js +805 -0
  108. package/dist/layers.CXmM9Bvj.js +10 -0
  109. package/dist/layers.CYHiWIYN.js +373 -0
  110. package/dist/layers.CZpHZoB0.js +9 -0
  111. package/dist/layers.C_8cg569.js +8 -0
  112. package/dist/layers.C_H8CF1f.js +44 -0
  113. package/dist/layers.C_IvrzZ3.js +7 -0
  114. package/dist/layers.C_Z4dR-0.js +39 -0
  115. package/dist/layers.C_poBEYa.js +10 -0
  116. package/dist/layers.CaPMI1KH.js +139 -0
  117. package/dist/layers.CbWg4Qj_.js +1 -0
  118. package/dist/layers.CcZMrh49.js +41 -0
  119. package/dist/layers.CefLOoC8.js +10 -0
  120. package/dist/layers.CfGk77zR.js +1 -0
  121. package/dist/layers.CitJ-LcP.js +1 -0
  122. package/dist/layers.Ckdux2po.js +48149 -0
  123. package/dist/layers.Cl2CJFNx.js +35 -0
  124. package/dist/layers.ClLKdjmI.js +39 -0
  125. package/dist/layers.ClVfKZ9h.js +1 -0
  126. package/dist/layers.CmF7I89w.js +32 -0
  127. package/dist/layers.Cn30_EV4.js +14 -0
  128. package/dist/layers.CnmwOTKT.js +295 -0
  129. package/dist/layers.CqHFUbCh.js +122 -0
  130. package/dist/layers.CqVTtuYm.js +6 -0
  131. package/dist/layers.Ct7Z5o-U.js +7 -0
  132. package/dist/layers.CtAhktPZ.js +1 -0
  133. package/dist/layers.Ctocb96g.js +1 -0
  134. package/dist/layers.Cu_3bkpd.js +207 -0
  135. package/dist/layers.CvFNr8Uu.js +61 -0
  136. package/dist/layers.Cye7d0Ye.js +35 -0
  137. package/dist/layers.Cyzu9PKQ.js +1 -0
  138. package/dist/layers.CzBOl45X.js +5 -0
  139. package/dist/layers.CzP0RBWK.js +139 -0
  140. package/dist/layers.D0dYIayl.js +1 -0
  141. package/dist/layers.D0zn4_Mx.js +1 -0
  142. package/dist/layers.D4T8fTcj.js +1223 -0
  143. package/dist/layers.D5T2vOzx.js +223 -0
  144. package/dist/layers.D5n5uB-V.js +35 -0
  145. package/dist/layers.D6CzgZCn.js +6 -0
  146. package/dist/layers.D7jGxypv.js +8 -0
  147. package/dist/layers.D8gdqeYc.js +213 -0
  148. package/dist/layers.D9Q1WK3D.js +32 -0
  149. package/dist/layers.DBYWjvtj.js +8 -0
  150. package/dist/layers.DBmtL6ZZ.js +41 -0
  151. package/dist/layers.DEjh8HqA.js +32 -0
  152. package/dist/layers.DHWPE8JP.js +37 -0
  153. package/dist/layers.DHoGHrwb.js +437 -0
  154. package/dist/layers.DIa1shbs.js +9 -0
  155. package/dist/{layers.Hq0pIRX3.js → layers.DIhuprWj.js} +21 -21
  156. package/dist/layers.DJ64BwjI.js +5 -0
  157. package/dist/layers.DJYCnlhb.js +40 -0
  158. package/dist/layers.DJuBjYUv.js +1 -0
  159. package/dist/layers.DL2VBsfE.js +2 -0
  160. package/dist/layers.DL3G4Rrb.js +41 -0
  161. package/dist/layers.DLwuMfdd.js +84 -0
  162. package/dist/layers.DMQHD7SZ.js +1 -0
  163. package/dist/layers.DMkBISW1.js +1 -0
  164. package/dist/layers.DN9HoVxI.js +18 -0
  165. package/dist/layers.DOq-L3gG.js +40 -0
  166. package/dist/layers.DOrgOHBr.js +1 -0
  167. package/dist/layers.DQ3x1v0k.js +934 -0
  168. package/dist/layers.DQD1IQ6W.js +1034 -0
  169. package/dist/layers.DR3nuNQY.js +271 -0
  170. package/dist/layers.DSMzl4c7.js +160 -0
  171. package/dist/layers.DSXwzG0l.js +7 -0
  172. package/dist/layers.DUGRqDUB.js +8583 -0
  173. package/dist/layers.DUWcbGsB.js +2482 -0
  174. package/dist/layers.DXWOVogE.js +40 -0
  175. package/dist/layers.DbRchKwe.js +8 -0
  176. package/dist/layers.DbaKVP5e.js +1 -0
  177. package/dist/layers.DcGOrQq5.js +39 -0
  178. package/dist/layers.Df7-26ey.js +189 -0
  179. package/dist/layers.Dfl1_GY-.js +40 -0
  180. package/dist/layers.DhkSgCGH.js +36 -0
  181. package/dist/layers.DhlqqsI-.js +9 -0
  182. package/dist/layers.DiHUvl0o.js +423 -0
  183. package/dist/layers.Dj-z0EfD.js +5 -0
  184. package/dist/layers.DjUOC4st.js +16 -0
  185. package/dist/layers.DjzsPlhY.js +70 -0
  186. package/dist/layers.DnNdcruU.js +9 -0
  187. package/dist/layers.DnRoER-T.js +11 -0
  188. package/dist/layers.DngDRzM2.js +10 -0
  189. package/dist/layers.Dop4IJqp.js +7 -0
  190. package/dist/layers.Dpw_9ymJ.js +34 -0
  191. package/dist/layers.DqkMTScX.js +40 -0
  192. package/dist/layers.Ds-YCD3f.js +38 -0
  193. package/dist/layers.DsQYlSSa.js +40 -0
  194. package/dist/layers.DsjBnsF_.js +42 -0
  195. package/dist/layers.Dsyqs-lC.js +11 -0
  196. package/dist/layers.DtEAEu5Y.js +1 -0
  197. package/dist/layers.DvEpZu0k.js +794 -0
  198. package/dist/layers.DwKuuHvW.js +4 -0
  199. package/dist/layers.DwrUaEvN.js +13 -0
  200. package/dist/layers.DxA6ocdw.js +70 -0
  201. package/dist/layers.Dy1naDTQ.js +14 -0
  202. package/dist/layers.E-_P3Hgt.js +4 -0
  203. package/dist/layers.E2Pg6Xkc.js +3 -0
  204. package/dist/{layers.B88sQYuh.js → layers.G1XGzBxR.js} +1 -1
  205. package/dist/layers.JWCLFILJ.js +1 -0
  206. package/dist/layers.KFn2whtk.js +9 -0
  207. package/dist/layers.LiJvf-Xh.js +11 -0
  208. package/dist/layers.OxWb2lcf.js +9 -0
  209. package/dist/layers.QOZfLJOU.js +205 -0
  210. package/dist/layers.R3a4GOcm.js +39 -0
  211. package/dist/layers.R8OXBVYp.js +1 -0
  212. package/dist/layers.R8mPlCA0.js +261 -0
  213. package/dist/layers.RZvZoVxE.js +9 -0
  214. package/dist/layers.SdU27KL4.js +42 -0
  215. package/dist/layers.Umldr18w.js +198 -0
  216. package/dist/layers.Upsmcdyi.js +33 -0
  217. package/dist/layers._beiaL7T.js +1 -0
  218. package/dist/layers._d6q9aen.js +10 -0
  219. package/dist/layers.a_6-TFT0.js +6 -0
  220. package/dist/layers.b0h5ZBmD.js +61 -0
  221. package/dist/{layers.CsQlovyR.js → layers.b9B2NY7n.js} +1950 -2191
  222. package/dist/layers.bdZaUQNB.js +41 -0
  223. package/dist/layers.fCcqSwty.js +8 -0
  224. package/dist/layers.fldW-Ogr.js +30328 -0
  225. package/dist/layers.i2bcEL4B.js +41 -0
  226. package/dist/layers.iSx5HVBW.js +37 -0
  227. package/dist/layers.lCpg7dOn.js +21 -0
  228. package/dist/layers.lY3SrA49.js +6 -0
  229. package/dist/layers.lgAtpBQI.js +7 -0
  230. package/dist/layers.my0yWZmR.js +8 -0
  231. package/dist/layers.n5OStkpA.js +1088 -0
  232. package/dist/layers.orP2yP91.js +96 -0
  233. package/dist/layers.ovEMwqYP.js +36 -0
  234. package/dist/layers.q8HcJw1z.js +8 -0
  235. package/dist/layers.qaJdLFHI.js +118 -0
  236. package/dist/layers.rUzSMgAT.js +6 -0
  237. package/dist/layers.rddzpnjy.js +323 -0
  238. package/dist/layers.sHJHq9SR.js +1 -0
  239. package/dist/layers.tjc2yfO8.js +36 -0
  240. package/dist/layers.vO27jqdn.js +4 -0
  241. package/dist/layers.yZYCg_En.js +960 -0
  242. package/dist/layers.zF6RU9h5.js +1 -0
  243. package/package.json +166 -160
  244. package/dist/layers.BgMykHnn.js +0 -154
  245. package/dist/layers.BtvuN20E.js +0 -27618
  246. package/dist/layers.Ct1ojjl3.js +0 -1
  247. package/dist/layers.JT_kEFH5.js +0 -129
  248. package/dist/layers.pwc3O6Es.js +0 -261
@@ -0,0 +1,207 @@
1
+ "use strict";const u=require("./layers.orP2yP91.js");var gt=(function(){var t=function(A,r,n,i){for(n=n||{},i=A.length;i--;n[A[i]]=r);return n},s=[1,2],a=[1,3],h=[1,4],d=[2,4],y=[1,9],p=[1,11],k=[1,15],f=[1,16],b=[1,17],E=[1,18],R=[1,30],Y=[1,19],G=[1,20],U=[1,21],j=[1,22],M=[1,23],z=[1,25],H=[1,26],X=[1,27],K=[1,28],W=[1,29],J=[1,32],q=[1,33],Q=[1,34],Z=[1,35],$=[1,31],c=[1,4,5,15,16,18,20,21,23,24,25,26,27,28,32,34,36,37,41,44,45,46,47,50],tt=[1,4,5,13,14,15,16,18,20,21,23,24,25,26,27,28,32,34,36,37,41,44,45,46,47,50],xt=[4,5,15,16,18,20,21,23,24,25,26,27,28,32,34,36,37,41,44,45,46,47,50],ht={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,cssClassStatement:11,idStatement:12,DESCR:13,"-->":14,HIDE_EMPTY:15,scale:16,WIDTH:17,COMPOSIT_STATE:18,STRUCT_START:19,STRUCT_STOP:20,STATE_DESCR:21,AS:22,ID:23,FORK:24,JOIN:25,CHOICE:26,CONCURRENT:27,note:28,notePosition:29,NOTE_TEXT:30,direction:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,classDef:37,CLASSDEF_ID:38,CLASSDEF_STYLEOPTS:39,DEFAULT:40,class:41,CLASSENTITY_IDS:42,STYLECLASS:43,direction_tb:44,direction_bt:45,direction_rl:46,direction_lr:47,eol:48,";":49,EDGE_STATE:50,STYLE_SEPARATOR:51,left_of:52,right_of:53,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",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",30:"NOTE_TEXT",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"classDef",38:"CLASSDEF_ID",39:"CLASSDEF_STYLEOPTS",40:"DEFAULT",41:"class",42:"CLASSENTITY_IDS",43:"STYLECLASS",44:"direction_tb",45:"direction_bt",46:"direction_rl",47:"direction_lr",49:";",50:"EDGE_STATE",51:"STYLE_SEPARATOR",52:"left_of",53:"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,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],[10,3],[10,3],[11,3],[31,1],[31,1],[31,1],[31,1],[48,1],[48,1],[12,1],[12,1],[12,3],[12,3],[29,1],[29,1]],performAction:function(r,n,i,o,S,e,w){var l=e.length-1;switch(S){case 3:return o.setRootDoc(e[l]),e[l];case 4:this.$=[];break;case 5:e[l]!="nl"&&(e[l-1].push(e[l]),this.$=e[l-1]);break;case 6:case 7:this.$=e[l];break;case 8:this.$="nl";break;case 11:this.$=e[l];break;case 12:const B=e[l-1];B.description=o.trimColon(e[l]),this.$=B;break;case 13:this.$={stmt:"relation",state1:e[l-2],state2:e[l]};break;case 14:const ft=o.trimColon(e[l]);this.$={stmt:"relation",state1:e[l-3],state2:e[l-1],description:ft};break;case 18:this.$={stmt:"state",id:e[l-3],type:"default",description:"",doc:e[l-1]};break;case 19:var C=e[l],O=e[l-2].trim();if(e[l].match(":")){var et=e[l].split(":");C=et[0],O=[O,et[1]]}this.$={stmt:"state",id:C,type:"default",description:O};break;case 20:this.$={stmt:"state",id:e[l-3],type:"default",description:e[l-5],doc:e[l-1]};break;case 21:this.$={stmt:"state",id:e[l],type:"fork"};break;case 22:this.$={stmt:"state",id:e[l],type:"join"};break;case 23:this.$={stmt:"state",id:e[l],type:"choice"};break;case 24:this.$={stmt:"state",id:o.getDividerId(),type:"divider"};break;case 25:this.$={stmt:"state",id:e[l-1].trim(),note:{position:e[l-2].trim(),text:e[l].trim()}};break;case 28:this.$=e[l].trim(),o.setAccTitle(this.$);break;case 29:case 30:this.$=e[l].trim(),o.setAccDescription(this.$);break;case 31:case 32:this.$={stmt:"classDef",id:e[l-1].trim(),classes:e[l].trim()};break;case 33:this.$={stmt:"applyClass",id:e[l-1].trim(),styleClass:e[l].trim()};break;case 34:o.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 35:o.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 36:o.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 37:o.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 40:case 41:this.$={stmt:"state",id:e[l].trim(),type:"default",description:""};break;case 42:this.$={stmt:"state",id:e[l-2].trim(),classes:[e[l].trim()],type:"default",description:""};break;case 43:this.$={stmt:"state",id:e[l-2].trim(),classes:[e[l].trim()],type:"default",description:""};break}},table:[{3:1,4:s,5:a,6:h},{1:[3]},{3:5,4:s,5:a,6:h},{3:6,4:s,5:a,6:h},t([1,4,5,15,16,18,21,23,24,25,26,27,28,32,34,36,37,41,44,45,46,47,50],d,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:y,5:p,8:8,9:10,10:12,11:13,12:14,15:k,16:f,18:b,21:E,23:R,24:Y,25:G,26:U,27:j,28:M,31:24,32:z,34:H,36:X,37:K,41:W,44:J,45:q,46:Q,47:Z,50:$},t(c,[2,5]),{9:36,10:12,11:13,12:14,15:k,16:f,18:b,21:E,23:R,24:Y,25:G,26:U,27:j,28:M,31:24,32:z,34:H,36:X,37:K,41:W,44:J,45:q,46:Q,47:Z,50:$},t(c,[2,7]),t(c,[2,8]),t(c,[2,9]),t(c,[2,10]),t(c,[2,11],{13:[1,37],14:[1,38]}),t(c,[2,15]),{17:[1,39]},t(c,[2,17],{19:[1,40]}),{22:[1,41]},t(c,[2,21]),t(c,[2,22]),t(c,[2,23]),t(c,[2,24]),{29:42,30:[1,43],52:[1,44],53:[1,45]},t(c,[2,27]),{33:[1,46]},{35:[1,47]},t(c,[2,30]),{38:[1,48],40:[1,49]},{42:[1,50]},t(tt,[2,40],{51:[1,51]}),t(tt,[2,41],{51:[1,52]}),t(c,[2,34]),t(c,[2,35]),t(c,[2,36]),t(c,[2,37]),t(c,[2,6]),t(c,[2,12]),{12:53,23:R,50:$},t(c,[2,16]),t(xt,d,{7:54}),{23:[1,55]},{23:[1,56]},{22:[1,57]},{23:[2,44]},{23:[2,45]},t(c,[2,28]),t(c,[2,29]),{39:[1,58]},{39:[1,59]},{43:[1,60]},{23:[1,61]},{23:[1,62]},t(c,[2,13],{13:[1,63]}),{4:y,5:p,8:8,9:10,10:12,11:13,12:14,15:k,16:f,18:b,20:[1,64],21:E,23:R,24:Y,25:G,26:U,27:j,28:M,31:24,32:z,34:H,36:X,37:K,41:W,44:J,45:q,46:Q,47:Z,50:$},t(c,[2,19],{19:[1,65]}),{30:[1,66]},{23:[1,67]},t(c,[2,31]),t(c,[2,32]),t(c,[2,33]),t(tt,[2,42]),t(tt,[2,43]),t(c,[2,14]),t(c,[2,18]),t(xt,d,{7:68}),t(c,[2,25]),t(c,[2,26]),{4:y,5:p,8:8,9:10,10:12,11:13,12:14,15:k,16:f,18:b,20:[1,69],21:E,23:R,24:Y,25:G,26:U,27:j,28:M,31:24,32:z,34:H,36:X,37:K,41:W,44:J,45:q,46:Q,47:Z,50:$},t(c,[2,20])],defaultActions:{5:[2,1],6:[2,2],44:[2,44],45:[2,45]},parseError:function(r,n){if(n.recoverable)this.trace(r);else{var i=new Error(r);throw i.hash=n,i}},parse:function(r){var n=this,i=[0],o=[],S=[null],e=[],w=this.table,l="",C=0,O=0,et=2,B=1,ft=e.slice.call(arguments,1),g=Object.create(this.lexer),L={yy:{}};for(var dt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,dt)&&(L.yy[dt]=this.yy[dt]);g.setInput(r,L.yy),L.yy.lexer=g,L.yy.parser=this,typeof g.yylloc>"u"&&(g.yylloc={});var yt=g.yylloc;e.push(yt);var Yt=g.options&&g.options.ranges;typeof L.yy.parseError=="function"?this.parseError=L.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Gt(){var D;return D=o.pop()||g.lex()||B,typeof D!="number"&&(D instanceof Array&&(o=D,D=o.pop()),D=n.symbols_[D]||D),D}for(var _,v,m,pt,N={},st,x,Dt,it;;){if(v=i[i.length-1],this.defaultActions[v]?m=this.defaultActions[v]:((_===null||typeof _>"u")&&(_=Gt()),m=w[v]&&w[v][_]),typeof m>"u"||!m.length||!m[0]){var St="";it=[];for(st in w[v])this.terminals_[st]&&st>et&&it.push("'"+this.terminals_[st]+"'");g.showPosition?St="Parse error on line "+(C+1)+`:
2
+ `+g.showPosition()+`
3
+ Expecting `+it.join(", ")+", got '"+(this.terminals_[_]||_)+"'":St="Parse error on line "+(C+1)+": Unexpected "+(_==B?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(St,{text:g.match,token:this.terminals_[_]||_,line:g.yylineno,loc:yt,expected:it})}if(m[0]instanceof Array&&m.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+_);switch(m[0]){case 1:i.push(_),S.push(g.yytext),e.push(g.yylloc),i.push(m[1]),_=null,O=g.yyleng,l=g.yytext,C=g.yylineno,yt=g.yylloc;break;case 2:if(x=this.productions_[m[1]][1],N.$=S[S.length-x],N._$={first_line:e[e.length-(x||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(x||1)].first_column,last_column:e[e.length-1].last_column},Yt&&(N._$.range=[e[e.length-(x||1)].range[0],e[e.length-1].range[1]]),pt=this.performAction.apply(N,[l,O,C,L.yy,m[1],S,e].concat(ft)),typeof pt<"u")return pt;x&&(i=i.slice(0,-1*x*2),S=S.slice(0,-1*x),e=e.slice(0,-1*x)),i.push(this.productions_[m[1]][0]),S.push(N.$),e.push(N._$),Dt=w[i[i.length-2]][i[i.length-1]],i.push(Dt);break;case 3:return!0}}return!0}},Vt=(function(){var A={EOF:1,parseError:function(n,i){if(this.yy.parser)this.yy.parser.parseError(n,i);else throw new Error(n)},setInput:function(r,n){return this.yy=n||this.yy||{},this._input=r,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]),this.offset=0,this},input:function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var n=r.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},unput:function(r){var n=r.length,i=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var o=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var S=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===o.length?this.yylloc.first_column:0)+o[o.length-i.length].length-i[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[S[0],S[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject: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
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(r){this.unput(this.match.slice(r))},pastInput:function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var r=this.pastInput(),n=new Array(r.length+1).join("-");return r+this.upcomingInput()+`
5
+ `+n+"^"},test_match:function(r,n){var i,o,S;if(this.options.backtrack_lexer&&(S={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&&(S.yylloc.range=this.yylloc.range.slice(0))),o=r[0].match(/(?:\r\n?|\n).*/g),o&&(this.yylineno+=o.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:o?o[o.length-1].length-o[o.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+r[0].length},this.yytext+=r[0],this.match+=r[0],this.matches=r,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(r[0].length),this.matched+=r[0],i=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var e in S)this[e]=S[e];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var r,n,i,o;this._more||(this.yytext="",this.match="");for(var S=this._currentRules(),e=0;e<S.length;e++)if(i=this._input.match(this.rules[S[e]]),i&&(!n||i[0].length>n[0].length)){if(n=i,o=e,this.options.backtrack_lexer){if(r=this.test_match(i,S[e]),r!==!1)return r;if(this._backtrack){n=!1;continue}else return!1}else if(!this.options.flex)break}return n?(r=this.test_match(n,S[o]),r!==!1?r:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var n=this.next();return n||this.lex()},begin:function(n){this.conditionStack.push(n)},popState:function(){var n=this.conditionStack.length-1;return n>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(n){return n=this.conditionStack.length-1-Math.abs(n||0),n>=0?this.conditionStack[n]:"INITIAL"},pushState:function(n){this.begin(n)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(n,i,o,S){switch(o){case 0:return 40;case 1:return 44;case 2:return 45;case 3:return 46;case 4:return 47;case 5:break;case 6:break;case 7:return 5;case 8:break;case 9:break;case 10:break;case 11:break;case 12:return this.pushState("SCALE"),16;case 13:return 17;case 14:this.popState();break;case 15:return this.begin("acc_title"),32;case 16:return this.popState(),"acc_title_value";case 17:return this.begin("acc_descr"),34;case 18:return this.popState(),"acc_descr_value";case 19:this.begin("acc_descr_multiline");break;case 20:this.popState();break;case 21:return"acc_descr_multiline_value";case 22:return this.pushState("CLASSDEF"),37;case 23:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 24:return this.popState(),this.pushState("CLASSDEFID"),38;case 25:return this.popState(),39;case 26:return this.pushState("CLASS"),41;case 27:return this.popState(),this.pushState("CLASS_STYLE"),42;case 28:return this.popState(),43;case 29:return this.pushState("SCALE"),16;case 30:return 17;case 31:this.popState();break;case 32:this.pushState("STATE");break;case 33:return this.popState(),i.yytext=i.yytext.slice(0,-8).trim(),24;case 34:return this.popState(),i.yytext=i.yytext.slice(0,-8).trim(),25;case 35:return this.popState(),i.yytext=i.yytext.slice(0,-10).trim(),26;case 36:return this.popState(),i.yytext=i.yytext.slice(0,-8).trim(),24;case 37:return this.popState(),i.yytext=i.yytext.slice(0,-8).trim(),25;case 38:return this.popState(),i.yytext=i.yytext.slice(0,-10).trim(),26;case 39:return 44;case 40:return 45;case 41:return 46;case 42:return 47;case 43:this.pushState("STATE_STRING");break;case 44:return this.pushState("STATE_ID"),"AS";case 45:return this.popState(),"ID";case 46:this.popState();break;case 47:return"STATE_DESCR";case 48:return 18;case 49:this.popState();break;case 50:return this.popState(),this.pushState("struct"),19;case 51:break;case 52:return this.popState(),20;case 53:break;case 54:return this.begin("NOTE"),28;case 55:return this.popState(),this.pushState("NOTE_ID"),52;case 56:return this.popState(),this.pushState("NOTE_ID"),53;case 57:this.popState(),this.pushState("FLOATING_NOTE");break;case 58:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 59:break;case 60:return"NOTE_TEXT";case 61:return this.popState(),"ID";case 62:return this.popState(),this.pushState("NOTE_TEXT"),23;case 63:return this.popState(),i.yytext=i.yytext.substr(2).trim(),30;case 64:return this.popState(),i.yytext=i.yytext.slice(0,-8).trim(),30;case 65:return 6;case 66:return 6;case 67:return 15;case 68:return 50;case 69:return 23;case 70:return i.yytext=i.yytext.trim(),13;case 71:return 14;case 72:return 27;case 73:return 51;case 74:return 5;case 75:return"INVALID"}},rules:[/^(?: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,/^(?:[^\}]%%[^\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,/^(?: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,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:%%(?!\{)[^\n]*)/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]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[9,10],inclusive:!1},struct:{rules:[9,10,22,26,32,39,40,41,42,51,52,53,54,68,69,70,71,72],inclusive:!1},FLOATING_NOTE_ID:{rules:[61],inclusive:!1},FLOATING_NOTE:{rules:[58,59,60],inclusive:!1},NOTE_TEXT:{rules:[63,64],inclusive:!1},NOTE_ID:{rules:[62],inclusive:!1},NOTE:{rules:[55,56,57],inclusive:!1},CLASS_STYLE:{rules:[28],inclusive:!1},CLASS:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[25],inclusive:!1},CLASSDEF:{rules:[23,24],inclusive:!1},acc_descr_multiline:{rules:[20,21],inclusive:!1},acc_descr:{rules:[18],inclusive:!1},acc_title:{rules:[16],inclusive:!1},SCALE:{rules:[13,14,30,31],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[45],inclusive:!1},STATE_STRING:{rules:[46,47],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[9,10,33,34,35,36,37,38,43,44,48,49,50],inclusive:!1},ID:{rules:[9,10],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,10,11,12,15,17,19,22,26,29,32,50,54,65,66,67,68,69,70,71,73,74,75],inclusive:!0}}};return A})();ht.lexer=Vt;function ut(){this.yy={}}return ut.prototype=ht,ht.Parser=ut,new ut})();gt.parser=gt;const Ut=gt,jt="LR",Mt="TB",at="state",Et="relation",zt="classDef",Ht="applyClass",ot="default",vt="divider",kt="[*]",It="start",Ot=kt,Nt="end",At="color",Ct="fill",Xt="bgFill",Kt=",";function Rt(){return{}}let $t=jt,lt=[],P=Rt();const wt=()=>({relations:[],states:{},documents:{}});let ct={root:wt()},T=ct.root,F=0,Lt=0;const Wt={LINE:0,DOTTED_LINE:1},Jt={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},rt=t=>JSON.parse(JSON.stringify(t)),qt=t=>{u.log$1.info("Setting root doc",t),lt=t},Qt=()=>lt,nt=(t,s,a)=>{if(s.stmt===Et)nt(t,s.state1,!0),nt(t,s.state2,!1);else if(s.stmt===at&&(s.id==="[*]"?(s.id=a?t.id+"_start":t.id+"_end",s.start=a):s.id=s.id.trim()),s.doc){const h=[];let d=[],y;for(y=0;y<s.doc.length;y++)if(s.doc[y].type===vt){const p=rt(s.doc[y]);p.doc=rt(d),h.push(p),d=[]}else d.push(s.doc[y]);if(h.length>0&&d.length>0){const p={stmt:at,id:u.generateId(),type:"divider",doc:rt(d)};h.push(rt(p)),s.doc=h}s.doc.forEach(p=>nt(s,p,!0))}},Zt=()=>(nt({id:"root"},{id:"root",doc:lt},!0),{id:"root",doc:lt}),te=t=>{let s;t.doc?s=t.doc:s=t,u.log$1.info(s),Bt(!0),u.log$1.info("Extract",s),s.forEach(a=>{switch(a.stmt){case at:I(a.id.trim(),a.type,a.doc,a.description,a.note,a.classes,a.styles,a.textStyles);break;case Et:Pt(a.state1,a.state2,a.description);break;case zt:Ft(a.id.trim(),a.classes);break;case Ht:bt(a.id.trim(),a.styleClass);break}})},I=function(t,s=ot,a=null,h=null,d=null,y=null,p=null,k=null){const f=t==null?void 0:t.trim();T.states[f]===void 0?(u.log$1.info("Adding state ",f,h),T.states[f]={id:f,descriptions:[],type:s,doc:a,note:d,classes:[],styles:[],textStyles:[]}):(T.states[f].doc||(T.states[f].doc=a),T.states[f].type||(T.states[f].type=s)),h&&(u.log$1.info("Setting state description",f,h),typeof h=="string"&&mt(f,h.trim()),typeof h=="object"&&h.forEach(b=>mt(f,b.trim()))),d&&(T.states[f].note=d,T.states[f].note.text=u.common$1.sanitizeText(T.states[f].note.text,u.getConfig())),y&&(u.log$1.info("Setting state classes",f,y),(typeof y=="string"?[y]:y).forEach(E=>bt(f,E.trim()))),p&&(u.log$1.info("Setting state styles",f,p),(typeof p=="string"?[p]:p).forEach(E=>he(f,E.trim()))),k&&(u.log$1.info("Setting state styles",f,p),(typeof k=="string"?[k]:k).forEach(E=>ue(f,E.trim())))},Bt=function(t){ct={root:wt()},T=ct.root,F=0,P=Rt(),t||u.clear()},V=function(t){return T.states[t]},ee=function(){return T.states},se=function(){u.log$1.info("Documents = ",ct)},ie=function(){return T.relations};function Tt(t=""){let s=t;return t===kt&&(F++,s=`${It}${F}`),s}function _t(t="",s=ot){return t===kt?It:s}function re(t=""){let s=t;return t===Ot&&(F++,s=`${Nt}${F}`),s}function ne(t="",s=ot){return t===Ot?Nt:s}function ae(t,s,a){let h=Tt(t.id.trim()),d=_t(t.id.trim(),t.type),y=Tt(s.id.trim()),p=_t(s.id.trim(),s.type);I(h,d,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),I(y,p,s.doc,s.description,s.note,s.classes,s.styles,s.textStyles),T.relations.push({id1:h,id2:y,relationTitle:u.common$1.sanitizeText(a,u.getConfig())})}const Pt=function(t,s,a){if(typeof t=="object")ae(t,s,a);else{const h=Tt(t.trim()),d=_t(t),y=re(s.trim()),p=ne(s);I(h,d),I(y,p),T.relations.push({id1:h,id2:y,title:u.common$1.sanitizeText(a,u.getConfig())})}},mt=function(t,s){const a=T.states[t],h=s.startsWith(":")?s.replace(":","").trim():s;a.descriptions.push(u.common$1.sanitizeText(h,u.getConfig()))},le=function(t){return t.substring(0,1)===":"?t.substr(2).trim():t.trim()},ce=()=>(Lt++,"divider-id-"+Lt),Ft=function(t,s=""){P[t]===void 0&&(P[t]={id:t,styles:[],textStyles:[]});const a=P[t];s!=null&&s.split(Kt).forEach(h=>{const d=h.replace(/([^;]*);/,"$1").trim();if(h.match(At)){const p=d.replace(Ct,Xt).replace(At,Ct);a.textStyles.push(p)}a.styles.push(d)})},oe=function(){return P},bt=function(t,s){t.split(",").forEach(function(a){let h=V(a);if(h===void 0){const d=a.trim();I(d),h=V(d)}h.classes.push(s)})},he=function(t,s){const a=V(t);a!==void 0&&a.textStyles.push(s)},ue=function(t,s){const a=V(t);a!==void 0&&a.textStyles.push(s)},fe=()=>$t,de=t=>{$t=t},ye=t=>t&&t[0]===":"?t.substr(1).trim():t.trim(),pe={getConfig:()=>u.getConfig().state,addState:I,clear:Bt,getState:V,getStates:ee,getRelations:ie,getClasses:oe,getDirection:fe,addRelation:Pt,getDividerId:ce,setDirection:de,cleanupLabel:le,lineType:Wt,relationType:Jt,logDocuments:se,getRootDoc:Qt,setRootDoc:qt,getRootDocV2:Zt,extract:te,trimColon:ye,getAccTitle:u.getAccTitle,setAccTitle:u.setAccTitle,getAccDescription:u.getAccDescription,setAccDescription:u.setAccDescription,addStyleClass:Ft,setCssClass:bt,addDescription:mt,setDiagramTitle:u.setDiagramTitle,getDiagramTitle:u.getDiagramTitle},Se=t=>`
7
+ defs #statediagram-barbEnd {
8
+ fill: ${t.transitionColor};
9
+ stroke: ${t.transitionColor};
10
+ }
11
+ g.stateGroup text {
12
+ fill: ${t.nodeBorder};
13
+ stroke: none;
14
+ font-size: 10px;
15
+ }
16
+ g.stateGroup text {
17
+ fill: ${t.textColor};
18
+ stroke: none;
19
+ font-size: 10px;
20
+
21
+ }
22
+ g.stateGroup .state-title {
23
+ font-weight: bolder;
24
+ fill: ${t.stateLabelColor};
25
+ }
26
+
27
+ g.stateGroup rect {
28
+ fill: ${t.mainBkg};
29
+ stroke: ${t.nodeBorder};
30
+ }
31
+
32
+ g.stateGroup line {
33
+ stroke: ${t.lineColor};
34
+ stroke-width: 1;
35
+ }
36
+
37
+ .transition {
38
+ stroke: ${t.transitionColor};
39
+ stroke-width: 1;
40
+ fill: none;
41
+ }
42
+
43
+ .stateGroup .composit {
44
+ fill: ${t.background};
45
+ border-bottom: 1px
46
+ }
47
+
48
+ .stateGroup .alt-composit {
49
+ fill: #e0e0e0;
50
+ border-bottom: 1px
51
+ }
52
+
53
+ .state-note {
54
+ stroke: ${t.noteBorderColor};
55
+ fill: ${t.noteBkgColor};
56
+
57
+ text {
58
+ fill: ${t.noteTextColor};
59
+ stroke: none;
60
+ font-size: 10px;
61
+ }
62
+ }
63
+
64
+ .stateLabel .box {
65
+ stroke: none;
66
+ stroke-width: 0;
67
+ fill: ${t.mainBkg};
68
+ opacity: 0.5;
69
+ }
70
+
71
+ .edgeLabel .label rect {
72
+ fill: ${t.labelBackgroundColor};
73
+ opacity: 0.5;
74
+ }
75
+ .edgeLabel .label text {
76
+ fill: ${t.transitionLabelColor||t.tertiaryTextColor};
77
+ }
78
+ .label div .edgeLabel {
79
+ color: ${t.transitionLabelColor||t.tertiaryTextColor};
80
+ }
81
+
82
+ .stateLabel text {
83
+ fill: ${t.stateLabelColor};
84
+ font-size: 10px;
85
+ font-weight: bold;
86
+ }
87
+
88
+ .node circle.state-start {
89
+ fill: ${t.specialStateColor};
90
+ stroke: ${t.specialStateColor};
91
+ }
92
+
93
+ .node .fork-join {
94
+ fill: ${t.specialStateColor};
95
+ stroke: ${t.specialStateColor};
96
+ }
97
+
98
+ .node circle.state-end {
99
+ fill: ${t.innerEndBackground};
100
+ stroke: ${t.background};
101
+ stroke-width: 1.5
102
+ }
103
+ .end-state-inner {
104
+ fill: ${t.compositeBackground||t.background};
105
+ // stroke: ${t.background};
106
+ stroke-width: 1.5
107
+ }
108
+
109
+ .node rect {
110
+ fill: ${t.stateBkg||t.mainBkg};
111
+ stroke: ${t.stateBorder||t.nodeBorder};
112
+ stroke-width: 1px;
113
+ }
114
+ .node polygon {
115
+ fill: ${t.mainBkg};
116
+ stroke: ${t.stateBorder||t.nodeBorder};;
117
+ stroke-width: 1px;
118
+ }
119
+ #statediagram-barbEnd {
120
+ fill: ${t.lineColor};
121
+ }
122
+
123
+ .statediagram-cluster rect {
124
+ fill: ${t.compositeTitleBackground};
125
+ stroke: ${t.stateBorder||t.nodeBorder};
126
+ stroke-width: 1px;
127
+ }
128
+
129
+ .cluster-label, .nodeLabel {
130
+ color: ${t.stateLabelColor};
131
+ }
132
+
133
+ .statediagram-cluster rect.outer {
134
+ rx: 5px;
135
+ ry: 5px;
136
+ }
137
+ .statediagram-state .divider {
138
+ stroke: ${t.stateBorder||t.nodeBorder};
139
+ }
140
+
141
+ .statediagram-state .title-state {
142
+ rx: 5px;
143
+ ry: 5px;
144
+ }
145
+ .statediagram-cluster.statediagram-cluster .inner {
146
+ fill: ${t.compositeBackground||t.background};
147
+ }
148
+ .statediagram-cluster.statediagram-cluster-alt .inner {
149
+ fill: ${t.altBackground?t.altBackground:"#efefef"};
150
+ }
151
+
152
+ .statediagram-cluster .inner {
153
+ rx:0;
154
+ ry:0;
155
+ }
156
+
157
+ .statediagram-state rect.basic {
158
+ rx: 5px;
159
+ ry: 5px;
160
+ }
161
+ .statediagram-state rect.divider {
162
+ stroke-dasharray: 10,10;
163
+ fill: ${t.altBackground?t.altBackground:"#efefef"};
164
+ }
165
+
166
+ .note-edge {
167
+ stroke-dasharray: 5;
168
+ }
169
+
170
+ .statediagram-note rect {
171
+ fill: ${t.noteBkgColor};
172
+ stroke: ${t.noteBorderColor};
173
+ stroke-width: 1px;
174
+ rx: 0;
175
+ ry: 0;
176
+ }
177
+ .statediagram-note rect {
178
+ fill: ${t.noteBkgColor};
179
+ stroke: ${t.noteBorderColor};
180
+ stroke-width: 1px;
181
+ rx: 0;
182
+ ry: 0;
183
+ }
184
+
185
+ .statediagram-note text {
186
+ fill: ${t.noteTextColor};
187
+ }
188
+
189
+ .statediagram-note .nodeLabel {
190
+ color: ${t.noteTextColor};
191
+ }
192
+ .statediagram .edgeLabel {
193
+ color: red; // ${t.noteTextColor};
194
+ }
195
+
196
+ #dependencyStart, #dependencyEnd {
197
+ fill: ${t.lineColor};
198
+ stroke: ${t.lineColor};
199
+ stroke-width: 1;
200
+ }
201
+
202
+ .statediagramTitleText {
203
+ text-anchor: middle;
204
+ font-size: 18px;
205
+ fill: ${t.textColor};
206
+ }
207
+ `,ge=Se;exports.DEFAULT_NESTED_DOC_DIR=Mt;exports.DEFAULT_STATE_TYPE=ot;exports.DIVIDER_TYPE=vt;exports.STMT_RELATION=Et;exports.STMT_STATE=at;exports.db=pe;exports.parser$1=Ut;exports.styles=ge;
@@ -0,0 +1,61 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("./layers.orP2yP91.js");require("./layers.Umldr18w.js");require("lodash-es/memoize.js");require("lodash-es/merge.js");require("lodash-es/isEmpty.js");const Y=require("./layers.zF6RU9h5.js");var J=(function(){var n=function(f,i,r,c){for(r=r||{},c=f.length;c--;r[f[c]]=i);return r},t=[6,8,10,11,12,14,16,17,20,21],e=[1,9],a=[1,10],s=[1,11],h=[1,12],l=[1,13],p=[1,16],y=[1,17],g={trace:function(){},yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:function(i,r,c,u,d,o,I){var b=o.length-1;switch(d){case 1:return o[b-1];case 2:this.$=[];break;case 3:o[b-1].push(o[b]),this.$=o[b-1];break;case 4:case 5:this.$=o[b];break;case 6:case 7:this.$=[];break;case 8:u.getCommonDb().setDiagramTitle(o[b].substr(6)),this.$=o[b].substr(6);break;case 9:this.$=o[b].trim(),u.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=o[b].trim(),u.getCommonDb().setAccDescription(this.$);break;case 12:u.addSection(o[b].substr(8)),this.$=o[b].substr(8);break;case 15:u.addTask(o[b],0,""),this.$=o[b];break;case 16:u.addEvent(o[b].substr(2)),this.$=o[b];break}},table:[{3:1,4:[1,2]},{1:[3]},n(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:e,12:a,14:s,16:h,17:l,18:14,19:15,20:p,21:y},n(t,[2,7],{1:[2,1]}),n(t,[2,3]),{9:18,11:e,12:a,14:s,16:h,17:l,18:14,19:15,20:p,21:y},n(t,[2,5]),n(t,[2,6]),n(t,[2,8]),{13:[1,19]},{15:[1,20]},n(t,[2,11]),n(t,[2,12]),n(t,[2,13]),n(t,[2,14]),n(t,[2,15]),n(t,[2,16]),n(t,[2,4]),n(t,[2,9]),n(t,[2,10])],defaultActions:{},parseError:function(i,r){if(r.recoverable)this.trace(i);else{var c=new Error(i);throw c.hash=r,c}},parse:function(i){var r=this,c=[0],u=[],d=[null],o=[],I=this.table,b="",$=0,W=0,C=2,P=1,B=o.slice.call(arguments,1),v=Object.create(this.lexer),S={yy:{}};for(var w in this.yy)Object.prototype.hasOwnProperty.call(this.yy,w)&&(S.yy[w]=this.yy[w]);v.setInput(i,S.yy),S.yy.lexer=v,S.yy.parser=this,typeof v.yylloc>"u"&&(v.yylloc={});var T=v.yylloc;o.push(T);var A=v.options&&v.options.ranges;typeof S.yy.parseError=="function"?this.parseError=S.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function z(){var M;return M=u.pop()||v.lex()||P,typeof M!="number"&&(M instanceof Array&&(u=M,M=u.pop()),M=r.symbols_[M]||M),M}for(var k,L,E,U,R={},O,N,X,j;;){if(L=c[c.length-1],this.defaultActions[L]?E=this.defaultActions[L]:((k===null||typeof k>"u")&&(k=z()),E=I[L]&&I[L][k]),typeof E>"u"||!E.length||!E[0]){var Z="";j=[];for(O in I[L])this.terminals_[O]&&O>C&&j.push("'"+this.terminals_[O]+"'");v.showPosition?Z="Parse error on line "+($+1)+`:
2
+ `+v.showPosition()+`
3
+ Expecting `+j.join(", ")+", got '"+(this.terminals_[k]||k)+"'":Z="Parse error on line "+($+1)+": Unexpected "+(k==P?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(Z,{text:v.match,token:this.terminals_[k]||k,line:v.yylineno,loc:T,expected:j})}if(E[0]instanceof Array&&E.length>1)throw new Error("Parse Error: multiple actions possible at state: "+L+", token: "+k);switch(E[0]){case 1:c.push(k),d.push(v.yytext),o.push(v.yylloc),c.push(E[1]),k=null,W=v.yyleng,b=v.yytext,$=v.yylineno,T=v.yylloc;break;case 2:if(N=this.productions_[E[1]][1],R.$=d[d.length-N],R._$={first_line:o[o.length-(N||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(N||1)].first_column,last_column:o[o.length-1].last_column},A&&(R._$.range=[o[o.length-(N||1)].range[0],o[o.length-1].range[1]]),U=this.performAction.apply(R,[b,W,$,S.yy,E[1],d,o].concat(B)),typeof U<"u")return U;N&&(c=c.slice(0,-1*N*2),d=d.slice(0,-1*N),o=o.slice(0,-1*N)),c.push(this.productions_[E[1]][0]),d.push(R.$),o.push(R._$),X=I[c[c.length-2]][c[c.length-1]],c.push(X);break;case 3:return!0}}return!0}},_=(function(){var f={EOF:1,parseError:function(r,c){if(this.yy.parser)this.yy.parser.parseError(r,c);else throw new Error(r)},setInput:function(i,r){return this.yy=r||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var r=i.match(/(?:\r\n?|\n).*/g);return r?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},unput:function(i){var r=i.length,c=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-r),this.offset-=r;var u=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var d=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===u.length?this.yylloc.first_column:0)+u[u.length-c.length].length-c[0].length:this.yylloc.first_column-r},this.options.ranges&&(this.yylloc.range=[d[0],d[0]+this.yyleng-r]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject: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
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(i){this.unput(this.match.slice(i))},pastInput:function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var i=this.pastInput(),r=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
5
+ `+r+"^"},test_match:function(i,r){var c,u,d;if(this.options.backtrack_lexer&&(d={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&&(d.yylloc.range=this.yylloc.range.slice(0))),u=i[0].match(/(?:\r\n?|\n).*/g),u&&(this.yylineno+=u.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:u?u[u.length-1].length-u[u.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(i[0].length),this.matched+=i[0],c=this.performAction.call(this,this.yy,this,r,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack){for(var o in d)this[o]=d[o];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,r,c,u;this._more||(this.yytext="",this.match="");for(var d=this._currentRules(),o=0;o<d.length;o++)if(c=this._input.match(this.rules[d[o]]),c&&(!r||c[0].length>r[0].length)){if(r=c,u=o,this.options.backtrack_lexer){if(i=this.test_match(c,d[o]),i!==!1)return i;if(this._backtrack){r=!1;continue}else return!1}else if(!this.options.flex)break}return r?(i=this.test_match(r,d[u]),i!==!1?i:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var r=this.next();return r||this.lex()},begin:function(r){this.conditionStack.push(r)},popState:function(){var r=this.conditionStack.length-1;return r>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(r){return r=this.conditionStack.length-1-Math.abs(r||0),r>=0?this.conditionStack[r]:"INITIAL"},pushState:function(r){this.begin(r)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(r,c,u,d){switch(u){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 21;case 16:return 20;case 17:return 6;case 18:return"INVALID"}},rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?::\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18],inclusive:!0}}};return f})();g.lexer=_;function m(){this.yy={}}return m.prototype=g,g.Parser=m,new m})();J.parser=J;const yt=J;let F="",nt=0;const K=[],q=[],V=[],st=()=>x.commonDb,it=function(){K.length=0,q.length=0,F="",V.length=0,x.clear()},rt=function(n){F=n,K.push(n)},at=function(){return K},lt=function(){let n=D();const t=100;let e=0;for(;!n&&e<t;)n=D(),e++;return q.push(...V),q},ot=function(n,t,e){const a={id:nt++,section:F,type:F,task:n,score:t||0,events:e?[e]:[]};V.push(a)},ct=function(n){V.find(e=>e.id===nt-1).events.push(n)},ht=function(n){const t={section:F,type:F,description:n,task:n,classes:[]};q.push(t)},D=function(){const n=function(e){return V[e].processed};let t=!0;for(const[e,a]of V.entries())n(e),t=t&&a.processed;return t},gt={clear:it,getCommonDb:st,addSection:rt,getSections:at,getTasks:lt,addTask:ot,addTaskOrg:ht,addEvent:ct},ft=Object.freeze(Object.defineProperty({__proto__:null,addEvent:ct,addSection:rt,addTask:ot,addTaskOrg:ht,clear:it,default:gt,getCommonDb:st,getSections:at,getTasks:lt},Symbol.toStringTag,{value:"Module"})),mt=12,G=function(n,t){const e=n.append("rect");return e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),e.attr("rx",t.rx),e.attr("ry",t.ry),t.class!==void 0&&e.attr("class",t.class),e},xt=function(n,t){const a=n.append("circle").attr("cx",t.cx).attr("cy",t.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),s=n.append("g");s.append("circle").attr("cx",t.cx-15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),s.append("circle").attr("cx",t.cx+15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function h(y){const g=Y.arc().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);y.append("path").attr("class","mouth").attr("d",g).attr("transform","translate("+t.cx+","+(t.cy+2)+")")}function l(y){const g=Y.arc().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);y.append("path").attr("class","mouth").attr("d",g).attr("transform","translate("+t.cx+","+(t.cy+7)+")")}function p(y){y.append("line").attr("class","mouth").attr("stroke",2).attr("x1",t.cx-5).attr("y1",t.cy+7).attr("x2",t.cx+5).attr("y2",t.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return t.score>3?h(s):t.score<3?l(s):p(s),a},bt=function(n,t){const e=n.append("circle");return e.attr("cx",t.cx),e.attr("cy",t.cy),e.attr("class","actor-"+t.pos),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("r",t.r),e.class!==void 0&&e.attr("class",e.class),t.title!==void 0&&e.append("title").text(t.title),e},ut=function(n,t){const e=t.text.replace(/<br\s*\/?>/gi," "),a=n.append("text");a.attr("x",t.x),a.attr("y",t.y),a.attr("class","legend"),a.style("text-anchor",t.anchor),t.class!==void 0&&a.attr("class",t.class);const s=a.append("tspan");return s.attr("x",t.x+t.textMargin*2),s.text(e),a},_t=function(n,t){function e(s,h,l,p,y){return s+","+h+" "+(s+l)+","+h+" "+(s+l)+","+(h+p-y)+" "+(s+l-y*1.2)+","+(h+p)+" "+s+","+(h+p)}const a=n.append("polygon");a.attr("points",e(t.x,t.y,50,20,7)),a.attr("class","labelBox"),t.y=t.y+t.labelMargin,t.x=t.x+.5*t.labelMargin,ut(n,t)},kt=function(n,t,e){const a=n.append("g"),s=Q();s.x=t.x,s.y=t.y,s.fill=t.fill,s.width=e.width,s.height=e.height,s.class="journey-section section-type-"+t.num,s.rx=3,s.ry=3,G(a,s),dt(e)(t.text,a,s.x,s.y,s.width,s.height,{class:"journey-section section-type-"+t.num},e,t.colour)};let tt=-1;const vt=function(n,t,e){const a=t.x+e.width/2,s=n.append("g");tt++,s.append("line").attr("id","task"+tt).attr("x1",a).attr("y1",t.y).attr("x2",a).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),xt(s,{cx:a,cy:300+(5-t.score)*30,score:t.score});const l=Q();l.x=t.x,l.y=t.y,l.fill=t.fill,l.width=e.width,l.height=e.height,l.class="task task-type-"+t.num,l.rx=3,l.ry=3,G(s,l),t.x+14,dt(e)(t.task,s,l.x,l.y,l.width,l.height,{class:"task"},e,t.colour)},wt=function(n,t){G(n,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,class:"rect"}).lower()},St=function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},Q=function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},dt=(function(){function n(s,h,l,p,y,g,_,m){const f=h.append("text").attr("x",l+y/2).attr("y",p+g/2+5).style("font-color",m).style("text-anchor","middle").text(s);a(f,_)}function t(s,h,l,p,y,g,_,m,f){const{taskFontSize:i,taskFontFamily:r}=m,c=s.split(/<br\s*\/?>/gi);for(let u=0;u<c.length;u++){const d=u*i-i*(c.length-1)/2,o=h.append("text").attr("x",l+y/2).attr("y",p).attr("fill",f).style("text-anchor","middle").style("font-size",i).style("font-family",r);o.append("tspan").attr("x",l+y/2).attr("dy",d).text(c[u]),o.attr("y",p+g/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),a(o,_)}}function e(s,h,l,p,y,g,_,m){const f=h.append("switch"),r=f.append("foreignObject").attr("x",l).attr("y",p).attr("width",y).attr("height",g).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");r.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(s),t(s,f,l,p,y,g,_,m),a(r,_)}function a(s,h){for(const l in h)l in h&&s.attr(l,h[l])}return function(s){return s.textPlacement==="fo"?e:s.textPlacement==="old"?n:t}})(),Et=function(n){n.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")};function pt(n,t){n.each(function(){var e=x.select(this),a=e.text().split(/(\s+|<br>)/).reverse(),s,h=[],l=1.1,p=e.attr("y"),y=parseFloat(e.attr("dy")),g=e.text(null).append("tspan").attr("x",0).attr("y",p).attr("dy",y+"em");for(let _=0;_<a.length;_++)s=a[a.length-1-_],h.push(s),g.text(h.join(" ").trim()),(g.node().getComputedTextLength()>t||s==="<br>")&&(h.pop(),g.text(h.join(" ").trim()),s==="<br>"?h=[""]:h=[s],g=e.append("tspan").attr("x",0).attr("y",p).attr("dy",l+"em").text(s))})}const $t=function(n,t,e,a){const s=e%mt-1,h=n.append("g");t.section=s,h.attr("class",(t.class?t.class+" ":"")+"timeline-node "+("section-"+s));const l=h.append("g"),p=h.append("g"),g=p.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(pt,t.width).node().getBBox(),_=a.fontSize&&a.fontSize.replace?a.fontSize.replace("px",""):a.fontSize;return t.height=g.height+_*1.1*.5+t.padding,t.height=Math.max(t.height,t.maxHeight),t.width=t.width+2*t.padding,p.attr("transform","translate("+t.width/2+", "+t.padding/2+")"),It(l,t,s),t},Tt=function(n,t,e){const a=n.append("g"),h=a.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(pt,t.width).node().getBBox(),l=e.fontSize&&e.fontSize.replace?e.fontSize.replace("px",""):e.fontSize;return a.remove(),h.height+l*1.1*.5+t.padding},It=function(n,t,e){n.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+t.type).attr("d",`M0 ${t.height-5} v${-t.height+10} q0,-5 5,-5 h${t.width-10} q5,0 5,5 v${t.height-5} H0 Z`),n.append("line").attr("class","node-line-"+e).attr("x1",0).attr("y1",t.height).attr("x2",t.width).attr("y2",t.height)},H={drawRect:G,drawCircle:bt,drawSection:kt,drawText:ut,drawLabel:_t,drawTask:vt,drawBackgroundRect:wt,getTextObj:St,getNoteRect:Q,initGraphics:Et,drawNode:$t,getVirtualNodeHeight:Tt},Nt=function(n,t,e,a){var s,h;const l=x.getConfig(),p=l.leftMargin??50;x.log$1.debug("timeline",a.db);const y=l.securityLevel;let g;y==="sandbox"&&(g=x.select("#i"+t));const m=(y==="sandbox"?x.select(g.nodes()[0].contentDocument.body):x.select("body")).select("#"+t);m.append("g");const f=a.db.getTasks(),i=a.db.getCommonDb().getDiagramTitle();x.log$1.debug("task",f),H.initGraphics(m);const r=a.db.getSections();x.log$1.debug("sections",r);let c=0,u=0,d=0,o=0,I=50+p,b=50;o=50;let $=0,W=!0;r.forEach(function(S){const w={number:$,descr:S,section:$,width:150,padding:20,maxHeight:c},T=H.getVirtualNodeHeight(m,w,l);x.log$1.debug("sectionHeight before draw",T),c=Math.max(c,T+20)});let C=0,P=0;x.log$1.debug("tasks.length",f.length);for(const[S,w]of f.entries()){const T={number:S,descr:w,section:w.section,width:150,padding:20,maxHeight:u},A=H.getVirtualNodeHeight(m,T,l);x.log$1.debug("taskHeight before draw",A),u=Math.max(u,A+20),C=Math.max(C,w.events.length);let z=0;for(let k=0;k<w.events.length;k++){const E={descr:w.events[k],section:w.section,number:w.section,width:150,padding:20,maxHeight:50};z+=H.getVirtualNodeHeight(m,E,l)}P=Math.max(P,z)}x.log$1.debug("maxSectionHeight before draw",c),x.log$1.debug("maxTaskHeight before draw",u),r&&r.length>0?r.forEach(S=>{const w=f.filter(k=>k.section===S),T={number:$,descr:S,section:$,width:200*Math.max(w.length,1)-50,padding:20,maxHeight:c};x.log$1.debug("sectionNode",T);const A=m.append("g"),z=H.drawNode(A,T,$,l);x.log$1.debug("sectionNode output",z),A.attr("transform",`translate(${I}, ${o})`),b+=c+50,w.length>0&&et(m,w,$,I,b,u,l,C,P,c,!1),I+=200*Math.max(w.length,1),b=o,$++}):(W=!1,et(m,f,$,I,b,u,l,C,P,c,!0));const B=m.node().getBBox();x.log$1.debug("bounds",B),i&&m.append("text").text(i).attr("x",B.width/2-p).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),d=W?c+u+150:u+100,m.append("g").attr("class","lineWrapper").append("line").attr("x1",p).attr("y1",d).attr("x2",B.width+3*p).attr("y2",d).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),x.setupGraphViewbox$1(void 0,m,((s=l.timeline)==null?void 0:s.padding)??50,((h=l.timeline)==null?void 0:h.useMaxWidth)??!1)},et=function(n,t,e,a,s,h,l,p,y,g,_){var m;for(const f of t){const i={descr:f.task,section:e,number:e,width:150,padding:20,maxHeight:h};x.log$1.debug("taskNode",i);const r=n.append("g").attr("class","taskWrapper"),u=H.drawNode(r,i,e,l).height;if(x.log$1.debug("taskHeight after draw",u),r.attr("transform",`translate(${a}, ${s})`),h=Math.max(h,u),f.events){const d=n.append("g").attr("class","lineWrapper");let o=h;s+=100,o=o+Mt(n,f.events,e,a,s,l),s-=100,d.append("line").attr("x1",a+190/2).attr("y1",s+h).attr("x2",a+190/2).attr("y2",s+h+(_?h:g)+y+120).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")}a=a+200,_&&!((m=l.timeline)!=null&&m.disableMulticolor)&&e++}s=s-10},Mt=function(n,t,e,a,s,h){let l=0;const p=s;s=s+100;for(const y of t){const g={descr:y,section:e,number:e,width:150,padding:20,maxHeight:50};x.log$1.debug("eventNode",g);const _=n.append("g").attr("class","eventWrapper"),f=H.drawNode(_,g,e,h).height;l=l+f,_.attr("transform",`translate(${a}, ${s})`),s=s+10+f}return s=p,l},Lt={setConf:()=>{},draw:Nt},Pt=n=>{let t="";for(let e=0;e<n.THEME_COLOR_LIMIT;e++)n["lineColor"+e]=n["lineColor"+e]||n["cScaleInv"+e],x.isDark(n["lineColor"+e])?n["lineColor"+e]=x.lighten(n["lineColor"+e],20):n["lineColor"+e]=x.darken(n["lineColor"+e],20);for(let e=0;e<n.THEME_COLOR_LIMIT;e++){const a=""+(17-3*e);t+=`
7
+ .section-${e-1} rect, .section-${e-1} path, .section-${e-1} circle, .section-${e-1} path {
8
+ fill: ${n["cScale"+e]};
9
+ }
10
+ .section-${e-1} text {
11
+ fill: ${n["cScaleLabel"+e]};
12
+ }
13
+ .node-icon-${e-1} {
14
+ font-size: 40px;
15
+ color: ${n["cScaleLabel"+e]};
16
+ }
17
+ .section-edge-${e-1}{
18
+ stroke: ${n["cScale"+e]};
19
+ }
20
+ .edge-depth-${e-1}{
21
+ stroke-width: ${a};
22
+ }
23
+ .section-${e-1} line {
24
+ stroke: ${n["cScaleInv"+e]} ;
25
+ stroke-width: 3;
26
+ }
27
+
28
+ .lineWrapper line{
29
+ stroke: ${n["cScaleLabel"+e]} ;
30
+ }
31
+
32
+ .disabled, .disabled circle, .disabled text {
33
+ fill: lightgray;
34
+ }
35
+ .disabled text {
36
+ fill: #efefef;
37
+ }
38
+ `}return t},At=n=>`
39
+ .edge {
40
+ stroke-width: 3;
41
+ }
42
+ ${Pt(n)}
43
+ .section-root rect, .section-root path, .section-root circle {
44
+ fill: ${n.git0};
45
+ }
46
+ .section-root text {
47
+ fill: ${n.gitBranchLabel0};
48
+ }
49
+ .icon-container {
50
+ height:100%;
51
+ display: flex;
52
+ justify-content: center;
53
+ align-items: center;
54
+ }
55
+ .edge {
56
+ fill: none;
57
+ }
58
+ .eventWrapper {
59
+ filter: brightness(120%);
60
+ }
61
+ `,Ht=At,Ct={db:ft,renderer:Lt,parser:yt,styles:Ht};exports.diagram=Ct;
@@ -0,0 +1,35 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./layers.orP2yP91.js");require("./layers.Umldr18w.js");require("lodash-es/memoize.js");require("lodash-es/merge.js");require("lodash-es/isEmpty.js");const tt=require("./layers.zF6RU9h5.js"),nt=require("./layers.B19hGmey.js"),st=require("./layers.9pNaFvaX.js"),R=require("./layers.DOrgOHBr.js");function rt(e,y){return y<e?-1:y>e?1:y>=e?0:NaN}function at(e){return e}function lt(){var e=at,y=rt,$=null,g=R.constant(0),d=R.constant(u.tau),E=R.constant(0);function f(a){var l,m=(a=st.array(a)).length,v,I,D=0,_=new Array(m),b=new Array(m),o=+g.apply(this,arguments),w=Math.min(u.tau,Math.max(-u.tau,d.apply(this,arguments)-o)),P,T=Math.min(Math.abs(w)/m,E.apply(this,arguments)),S=T*(w<0?-1:1),t;for(l=0;l<m;++l)(t=b[_[l]=l]=+e(a[l],l,a))>0&&(D+=t);for(y!=null?_.sort(function(i,n){return y(b[i],b[n])}):$!=null&&_.sort(function(i,n){return $(a[i],a[n])}),l=0,I=D?(w-m*S)/D:0;l<m;++l,o=P)v=_[l],t=b[v],P=o+(t>0?t*I:0)+S,b[v]={data:a[v],index:l,value:t,startAngle:o,endAngle:P,padAngle:T};return b}return f.value=function(a){return arguments.length?(e=typeof a=="function"?a:R.constant(+a),f):e},f.sortValues=function(a){return arguments.length?(y=a,$=null,f):y},f.sort=function(a){return arguments.length?($=a,y=null,f):$},f.startAngle=function(a){return arguments.length?(g=typeof a=="function"?a:R.constant(+a),f):g},f.endAngle=function(a){return arguments.length?(d=typeof a=="function"?a:R.constant(+a),f):d},f.padAngle=function(a){return arguments.length?(E=typeof a=="function"?a:R.constant(+a),f):E},f}var K=(function(){var e=function(S,t,i,n){for(i=i||{},n=S.length;n--;i[S[n]]=t);return i},y=[1,3],$=[1,4],g=[1,5],d=[1,6],E=[1,10,12,14,16,18,19,20,21,22],f=[2,4],a=[1,5,10,12,14,16,18,19,20,21,22],l=[20,21,22],m=[2,7],v=[1,12],I=[1,13],D=[1,14],_=[1,15],b=[1,16],o=[1,17],w={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,PIE:5,document:6,showData:7,line:8,statement:9,txt:10,value:11,title:12,title_value:13,acc_title:14,acc_title_value:15,acc_descr:16,acc_descr_value:17,acc_descr_multiline_value:18,section:19,NEWLINE:20,";":21,EOF:22,$accept:0,$end:1},terminals_:{2:"error",5:"PIE",7:"showData",10:"txt",11:"value",12:"title",13:"title_value",14:"acc_title",15:"acc_title_value",16:"acc_descr",17:"acc_descr_value",18:"acc_descr_multiline_value",19:"section",20:"NEWLINE",21:";",22:"EOF"},productions_:[0,[3,2],[3,2],[3,3],[6,0],[6,2],[8,2],[9,0],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[4,1],[4,1],[4,1]],performAction:function(t,i,n,r,c,s,V){var x=s.length-1;switch(c){case 3:r.setShowData(!0);break;case 6:this.$=s[x-1];break;case 8:r.addSection(s[x-1],r.cleanupValue(s[x]));break;case 9:this.$=s[x].trim(),r.setDiagramTitle(this.$);break;case 10:this.$=s[x].trim(),r.setAccTitle(this.$);break;case 11:case 12:this.$=s[x].trim(),r.setAccDescription(this.$);break;case 13:r.addSection(s[x].substr(8)),this.$=s[x].substr(8);break}},table:[{3:1,4:2,5:y,20:$,21:g,22:d},{1:[3]},{3:7,4:2,5:y,20:$,21:g,22:d},e(E,f,{6:8,7:[1,9]}),e(a,[2,14]),e(a,[2,15]),e(a,[2,16]),{1:[2,1]},e(l,m,{8:10,9:11,1:[2,2],10:v,12:I,14:D,16:_,18:b,19:o}),e(E,f,{6:18}),e(E,[2,5]),{4:19,20:$,21:g,22:d},{11:[1,20]},{13:[1,21]},{15:[1,22]},{17:[1,23]},e(l,[2,12]),e(l,[2,13]),e(l,m,{8:10,9:11,1:[2,3],10:v,12:I,14:D,16:_,18:b,19:o}),e(E,[2,6]),e(l,[2,8]),e(l,[2,9]),e(l,[2,10]),e(l,[2,11])],defaultActions:{7:[2,1]},parseError:function(t,i){if(i.recoverable)this.trace(t);else{var n=new Error(t);throw n.hash=i,n}},parse:function(t){var i=this,n=[0],r=[],c=[null],s=[],V=this.table,x="",p=0,N=0,z=2,j=1,B=s.slice.call(arguments,1),h=Object.create(this.lexer),L={yy:{}};for(var Y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Y)&&(L.yy[Y]=this.yy[Y]);h.setInput(t,L.yy),L.yy.lexer=h,L.yy.parser=this,typeof h.yylloc>"u"&&(h.yylloc={});var Z=h.yylloc;s.push(Z);var et=h.options&&h.options.ranges;typeof L.yy.parseError=="function"?this.parseError=L.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function it(){var O;return O=r.pop()||h.lex()||j,typeof O!="number"&&(O instanceof Array&&(r=O,O=r.pop()),O=i.symbols_[O]||O),O}for(var k,F,A,H,M={},W,C,X,q;;){if(F=n[n.length-1],this.defaultActions[F]?A=this.defaultActions[F]:((k===null||typeof k>"u")&&(k=it()),A=V[F]&&V[F][k]),typeof A>"u"||!A.length||!A[0]){var J="";q=[];for(W in V[F])this.terminals_[W]&&W>z&&q.push("'"+this.terminals_[W]+"'");h.showPosition?J="Parse error on line "+(p+1)+`:
2
+ `+h.showPosition()+`
3
+ Expecting `+q.join(", ")+", got '"+(this.terminals_[k]||k)+"'":J="Parse error on line "+(p+1)+": Unexpected "+(k==j?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(J,{text:h.match,token:this.terminals_[k]||k,line:h.yylineno,loc:Z,expected:q})}if(A[0]instanceof Array&&A.length>1)throw new Error("Parse Error: multiple actions possible at state: "+F+", token: "+k);switch(A[0]){case 1:n.push(k),c.push(h.yytext),s.push(h.yylloc),n.push(A[1]),k=null,N=h.yyleng,x=h.yytext,p=h.yylineno,Z=h.yylloc;break;case 2:if(C=this.productions_[A[1]][1],M.$=c[c.length-C],M._$={first_line:s[s.length-(C||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(C||1)].first_column,last_column:s[s.length-1].last_column},et&&(M._$.range=[s[s.length-(C||1)].range[0],s[s.length-1].range[1]]),H=this.performAction.apply(M,[x,N,p,L.yy,A[1],c,s].concat(B)),typeof H<"u")return H;C&&(n=n.slice(0,-1*C*2),c=c.slice(0,-1*C),s=s.slice(0,-1*C)),n.push(this.productions_[A[1]][0]),c.push(M.$),s.push(M._$),X=V[n[n.length-2]][n[n.length-1]],n.push(X);break;case 3:return!0}}return!0}},P=(function(){var S={EOF:1,parseError:function(i,n){if(this.yy.parser)this.yy.parser.parseError(i,n);else throw new Error(i)},setInput:function(t,i){return this.yy=i||this.yy||{},this._input=t,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]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var i=t.match(/(?:\r\n?|\n).*/g);return i?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var i=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var r=this.match.split(/(?:\r\n?|\n)/g);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 c=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[c[0],c[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject: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
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),i=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
5
+ `+i+"^"},test_match:function(t,i){var n,r,c;if(this.options.backtrack_lexer&&(c={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&&(c.yylloc.range=this.yylloc.range.slice(0))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),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+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,i,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var s in c)this[s]=c[s];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,i,n,r;this._more||(this.yytext="",this.match="");for(var c=this._currentRules(),s=0;s<c.length;s++)if(n=this._input.match(this.rules[c[s]]),n&&(!i||n[0].length>i[0].length)){if(i=n,r=s,this.options.backtrack_lexer){if(t=this.test_match(n,c[s]),t!==!1)return t;if(this._backtrack){i=!1;continue}else return!1}else if(!this.options.flex)break}return i?(t=this.test_match(i,c[r]),t!==!1?t:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var i=this.next();return i||this.lex()},begin:function(i){this.conditionStack.push(i)},popState:function(){var i=this.conditionStack.length-1;return i>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(i){return i=this.conditionStack.length-1-Math.abs(i||0),i>=0?this.conditionStack[i]:"INITIAL"},pushState:function(i){this.begin(i)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(i,n,r,c){switch(r){case 0:break;case 1:break;case 2:return 20;case 3:break;case 4:break;case 5:return this.begin("title"),12;case 6:return this.popState(),"title_value";case 7:return this.begin("acc_title"),14;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),16;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:this.begin("string");break;case 15:this.popState();break;case 16:return"txt";case 17:return 5;case 18:return 7;case 19:return"value";case 20:return 22}},rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[\s]+)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:pie\b)/i,/^(?:showData\b)/i,/^(?::[\s]*[\d]+(?:\.[\d]+)?)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[6],inclusive:!1},string:{rules:[15,16],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,7,9,11,14,17,18,19,20],inclusive:!0}}};return S})();w.lexer=P;function T(){this.yy={}}return T.prototype=w,w.Parser=T,new T})();K.parser=K;const ct=K,ot=u.defaultConfig$2.pie,G={sections:{},showData:!1};let U=G.sections,Q=G.showData;const ht=structuredClone(ot),ut=()=>structuredClone(ht),yt=()=>{U=structuredClone(G.sections),Q=G.showData,u.clear()},ft=(e,y)=>{e=u.sanitizeText$2(e,u.getConfig()),U[e]===void 0&&(U[e]=y,u.log$1.debug(`added new section: ${e}, with value: ${y}`))},pt=()=>U,gt=e=>(e.substring(0,1)===":"&&(e=e.substring(1).trim()),Number(e.trim())),dt=e=>{Q=e},mt=()=>Q,_t={getConfig:ut,clear:yt,setDiagramTitle:u.setDiagramTitle,getDiagramTitle:u.getDiagramTitle,setAccTitle:u.setAccTitle,getAccTitle:u.getAccTitle,setAccDescription:u.setAccDescription,getAccDescription:u.getAccDescription,addSection:ft,getSections:pt,cleanupValue:gt,setShowData:dt,getShowData:mt},xt=e=>`
7
+ .pieCircle{
8
+ stroke: ${e.pieStrokeColor};
9
+ stroke-width : ${e.pieStrokeWidth};
10
+ opacity : ${e.pieOpacity};
11
+ }
12
+ .pieOuterCircle{
13
+ stroke: ${e.pieOuterStrokeColor};
14
+ stroke-width: ${e.pieOuterStrokeWidth};
15
+ fill: none;
16
+ }
17
+ .pieTitleText {
18
+ text-anchor: middle;
19
+ font-size: ${e.pieTitleTextSize};
20
+ fill: ${e.pieTitleTextColor};
21
+ font-family: ${e.fontFamily};
22
+ }
23
+ .slice {
24
+ font-family: ${e.fontFamily};
25
+ fill: ${e.pieSectionTextColor};
26
+ font-size:${e.pieSectionTextSize};
27
+ // fill: white;
28
+ }
29
+ .legend text {
30
+ fill: ${e.pieLegendTextColor};
31
+ font-family: ${e.fontFamily};
32
+ font-size: ${e.pieLegendTextSize};
33
+ }
34
+ `,kt=xt,vt=e=>{const y=Object.entries(e).map(g=>({label:g[0],value:g[1]})).sort((g,d)=>d.value-g.value);return lt().value(g=>g.value)(y)},bt=(e,y,$,g)=>{u.log$1.debug(`rendering pie chart
35
+ `+e);const d=g.db,E=u.getConfig(),f=u.cleanAndMerge(d.getConfig(),E.pie),a=40,l=18,m=4,v=450,I=v,D=u.selectSvgElement(y),_=D.append("g"),b=d.getSections();_.attr("transform","translate("+I/2+","+v/2+")");const{themeVariables:o}=E;let[w]=u.parseFontSize(o.pieOuterStrokeWidth);w??(w=2);const P=f.textPosition,T=Math.min(I,v)/2-a,S=tt.arc().innerRadius(0).outerRadius(T),t=tt.arc().innerRadius(T*P).outerRadius(T*P);_.append("circle").attr("cx",0).attr("cy",0).attr("r",T+w/2).attr("class","pieOuterCircle");const i=vt(b),n=[o.pie1,o.pie2,o.pie3,o.pie4,o.pie5,o.pie6,o.pie7,o.pie8,o.pie9,o.pie10,o.pie11,o.pie12],r=nt.ordinal(n);_.selectAll("mySlices").data(i).enter().append("path").attr("d",S).attr("fill",p=>r(p.data.label)).attr("class","pieCircle");let c=0;Object.keys(b).forEach(p=>{c+=b[p]}),_.selectAll("mySlices").data(i).enter().append("text").text(p=>(p.data.value/c*100).toFixed(0)+"%").attr("transform",p=>"translate("+t.centroid(p)+")").style("text-anchor","middle").attr("class","slice"),_.append("text").text(d.getDiagramTitle()).attr("x",0).attr("y",-400/2).attr("class","pieTitleText");const s=_.selectAll(".legend").data(r.domain()).enter().append("g").attr("class","legend").attr("transform",(p,N)=>{const z=l+m,j=z*r.domain().length/2,B=12*l,h=N*z-j;return"translate("+B+","+h+")"});s.append("rect").attr("width",l).attr("height",l).style("fill",r).style("stroke",r),s.data(i).append("text").attr("x",l+m).attr("y",l-m).text(p=>{const{label:N,value:z}=p.data;return d.getShowData()?`${N} [${z}]`:N});const V=Math.max(...s.selectAll("text").nodes().map(p=>(p==null?void 0:p.getBoundingClientRect().width)??0)),x=I+a+l+m+V;D.attr("viewBox",`0 0 ${x} ${v}`),u.configureSvgSize(D,v,x,f.useMaxWidth)},St={draw:bt},At={parser:ct,db:_t,renderer:St,styles:kt};exports.diagram=At;
@@ -0,0 +1 @@
1
+ "use strict";const ae=require("lodash-es"),w=require("./layers.BLd2spTm.js");function te(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,a.get?a:{enumerable:!0,get:()=>e[r]})}}return n.default=e,Object.freeze(n)}const i=te(ae);class oe{constructor(){var n={};n._next=n._prev=n,this._sentinel=n}dequeue(){var n=this._sentinel,r=n._prev;if(r!==n)return j(r),r}enqueue(n){var r=this._sentinel;n._prev&&n._next&&j(n),n._next=r._next,r._next._prev=n,r._next=n,n._prev=r}toString(){for(var n=[],r=this._sentinel,a=r._prev;a!==r;)n.push(JSON.stringify(a,ie)),a=a._prev;return"["+n.join(", ")+"]"}}function j(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function ie(e,n){if(e!=="_next"&&e!=="_prev")return n}var de=i.constant(1);function fe(e,n){if(e.nodeCount()<=1)return[];var r=ce(e,n||de),a=ue(r.graph,r.buckets,r.zeroIdx);return i.flatten(i.map(a,function(t){return e.outEdges(t.v,t.w)}))}function ue(e,n,r){for(var a=[],t=n[n.length-1],d=n[0],o;e.nodeCount();){for(;o=d.dequeue();)x(e,n,r,o);for(;o=t.dequeue();)x(e,n,r,o);if(e.nodeCount()){for(var f=n.length-2;f>0;--f)if(o=n[f].dequeue(),o){a=a.concat(x(e,n,r,o,!0));break}}}return a}function x(e,n,r,a,t){var d=t?[]:void 0;return i.forEach(e.inEdges(a.v),function(o){var f=e.edge(o),u=e.node(o.v);t&&d.push({v:o.v,w:o.w}),u.out-=f,P(n,r,u)}),i.forEach(e.outEdges(a.v),function(o){var f=e.edge(o),u=o.w,c=e.node(u);c.in-=f,P(n,r,c)}),e.removeNode(a.v),d}function ce(e,n){var r=new w.Graph,a=0,t=0;i.forEach(e.nodes(),function(f){r.setNode(f,{v:f,in:0,out:0})}),i.forEach(e.edges(),function(f){var u=r.edge(f.v,f.w)||0,c=n(f),s=u+c;r.setEdge(f.v,f.w,s),t=Math.max(t,r.node(f.v).out+=c),a=Math.max(a,r.node(f.w).in+=c)});var d=i.range(t+a+3).map(function(){return new oe}),o=a+1;return i.forEach(r.nodes(),function(f){P(d,o,r.node(f))}),{graph:r,buckets:d,zeroIdx:o}}function P(e,n,r){r.out?r.in?e[r.out-r.in+n].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}function se(e){var n=e.graph().acyclicer==="greedy"?fe(e,r(e)):he(e);i.forEach(n,function(a){var t=e.edge(a);e.removeEdge(a),t.forwardName=a.name,t.reversed=!0,e.setEdge(a.w,a.v,t,i.uniqueId("rev"))});function r(a){return function(t){return a.edge(t).weight}}}function he(e){var n=[],r={},a={};function t(d){Object.prototype.hasOwnProperty.call(a,d)||(a[d]=!0,r[d]=!0,i.forEach(e.outEdges(d),function(o){Object.prototype.hasOwnProperty.call(r,o.w)?n.push(o):t(o.w)}),delete r[d])}return i.forEach(e.nodes(),t),n}function le(e){i.forEach(e.edges(),function(n){var r=e.edge(n);if(r.reversed){e.removeEdge(n);var a=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(n.w,n.v,r,a)}})}function E(e,n,r,a){var t;do t=i.uniqueId(a);while(e.hasNode(t));return r.dummy=n,e.setNode(t,r),t}function ve(e){var n=new w.Graph().setGraph(e.graph());return i.forEach(e.nodes(),function(r){n.setNode(r,e.node(r))}),i.forEach(e.edges(),function(r){var a=n.edge(r.v,r.w)||{weight:0,minlen:1},t=e.edge(r);n.setEdge(r.v,r.w,{weight:a.weight+t.weight,minlen:Math.max(a.minlen,t.minlen)})}),n}function q(e){var n=new w.Graph({multigraph:e.isMultigraph()}).setGraph(e.graph());return i.forEach(e.nodes(),function(r){e.children(r).length||n.setNode(r,e.node(r))}),i.forEach(e.edges(),function(r){n.setEdge(r,e.edge(r))}),n}function S(e,n){var r=e.x,a=e.y,t=n.x-r,d=n.y-a,o=e.width/2,f=e.height/2;if(!t&&!d)throw new Error("Not possible to find intersection inside of the rectangle");var u,c;return Math.abs(d)*o>Math.abs(t)*f?(d<0&&(f=-f),u=f*t/d,c=f):(t<0&&(o=-o),u=o,c=o*d/t),{x:r+u,y:a+c}}function k(e){var n=i.map(i.range(U(e)+1),function(){return[]});return i.forEach(e.nodes(),function(r){var a=e.node(r),t=a.rank;i.isUndefined(t)||(n[t][a.order]=r)}),n}function pe(e){var n=i.min(i.map(e.nodes(),function(r){return e.node(r).rank}));i.forEach(e.nodes(),function(r){var a=e.node(r);i.has(a,"rank")&&(a.rank-=n)})}function me(e){var n=i.min(i.map(e.nodes(),function(d){return e.node(d).rank})),r=[];i.forEach(e.nodes(),function(d){var o=e.node(d).rank-n;r[o]||(r[o]=[]),r[o].push(d)});var a=0,t=e.graph().nodeRankFactor;i.forEach(r,function(d,o){i.isUndefined(d)&&o%t!==0?--a:a&&i.forEach(d,function(f){e.node(f).rank+=a})})}function M(e,n,r,a){var t={width:0,height:0};return arguments.length>=4&&(t.rank=r,t.order=a),E(e,"border",t,n)}function U(e){return i.max(i.map(e.nodes(),function(n){var r=e.node(n).rank;if(!i.isUndefined(r))return r}))}function we(e,n){var r={lhs:[],rhs:[]};return i.forEach(e,function(a){n(a)?r.lhs.push(a):r.rhs.push(a)}),r}function be(e,n){return n()}function Ee(e){function n(r){var a=e.children(r),t=e.node(r);if(a.length&&i.forEach(a,n),Object.prototype.hasOwnProperty.call(t,"minRank")){t.borderLeft=[],t.borderRight=[];for(var d=t.minRank,o=t.maxRank+1;d<o;++d)V(e,"borderLeft","_bl",r,t,d),V(e,"borderRight","_br",r,t,d)}}i.forEach(e.children(),n)}function V(e,n,r,a,t,d){var o={width:0,height:0,rank:d,borderType:n},f=t[n][d-1],u=E(e,"border",o,r);t[n][d]=u,e.setParent(u,a),f&&e.setEdge(f,u,{weight:1})}function ye(e){var n=e.graph().rankdir.toLowerCase();(n==="lr"||n==="rl")&&W(e)}function ge(e){var n=e.graph().rankdir.toLowerCase();(n==="bt"||n==="rl")&&ke(e),(n==="lr"||n==="rl")&&(xe(e),W(e))}function W(e){i.forEach(e.nodes(),function(n){B(e.node(n))}),i.forEach(e.edges(),function(n){B(e.edge(n))})}function B(e){var n=e.width;e.width=e.height,e.height=n}function ke(e){i.forEach(e.nodes(),function(n){O(e.node(n))}),i.forEach(e.edges(),function(n){var r=e.edge(n);i.forEach(r.points,O),Object.prototype.hasOwnProperty.call(r,"y")&&O(r)})}function O(e){e.y=-e.y}function xe(e){i.forEach(e.nodes(),function(n){N(e.node(n))}),i.forEach(e.edges(),function(n){var r=e.edge(n);i.forEach(r.points,N),Object.prototype.hasOwnProperty.call(r,"x")&&N(r)})}function N(e){var n=e.x;e.x=e.y,e.y=n}function Oe(e){e.graph().dummyChains=[],i.forEach(e.edges(),function(n){Ne(e,n)})}function Ne(e,n){var r=n.v,a=e.node(r).rank,t=n.w,d=e.node(t).rank,o=n.name,f=e.edge(n),u=f.labelRank;if(d!==a+1){e.removeEdge(n);var c=void 0,s,h;for(h=0,++a;a<d;++h,++a)f.points=[],c={width:0,height:0,edgeLabel:f,edgeObj:n,rank:a},s=E(e,"edge",c,"_d"),a===u&&(c.width=f.width,c.height=f.height,c.dummy="edge-label",c.labelpos=f.labelpos),e.setEdge(r,s,{weight:f.weight},o),h===0&&e.graph().dummyChains.push(s),r=s;e.setEdge(r,t,{weight:f.weight},o)}}function Le(e){i.forEach(e.graph().dummyChains,function(n){var r=e.node(n),a=r.edgeLabel,t;for(e.setEdge(r.edgeObj,a);r.dummy;)t=e.successors(n)[0],e.removeNode(n),a.points.push({x:r.x,y:r.y}),r.dummy==="edge-label"&&(a.x=r.x,a.y=r.y,a.width=r.width,a.height=r.height),n=t,r=e.node(n)})}function _(e){var n={};function r(a){var t=e.node(a);if(Object.prototype.hasOwnProperty.call(n,a))return t.rank;n[a]=!0;var d=i.min(i.map(e.outEdges(a),function(o){return r(o.w)-e.edge(o).minlen}));return(d===Number.POSITIVE_INFINITY||d===void 0||d===null)&&(d=0),t.rank=d}i.forEach(e.sources(),r)}function g(e,n){return e.node(n.w).rank-e.node(n.v).rank-e.edge(n).minlen}function $(e){var n=new w.Graph({directed:!1}),r=e.nodes()[0],a=e.nodeCount();n.setNode(r,{});for(var t,d;Ie(n,e)<a;)t=Pe(n,e),d=n.hasNode(t.v)?g(e,t):-g(e,t),_e(n,e,d);return n}function Ie(e,n){function r(a){i.forEach(n.nodeEdges(a),function(t){var d=t.v,o=a===d?t.w:d;!e.hasNode(o)&&!g(n,t)&&(e.setNode(o,{}),e.setEdge(a,o,{}),r(o))})}return i.forEach(e.nodes(),r),e.nodeCount()}function Pe(e,n){return i.minBy(n.edges(),function(r){if(e.hasNode(r.v)!==e.hasNode(r.w))return g(n,r)})}function _e(e,n,r){i.forEach(e.nodes(),function(a){n.node(a).rank+=r})}i.constant(1);i.constant(1);function Re(){}Re.prototype=new Error;function z(e,n,r){i.isArray(n)||(n=[n]);var a=(e.isDirected()?e.successors:e.neighbors).bind(e),t=[],d={};return i.each(n,function(o){if(!e.hasNode(o))throw new Error("Graph does not have node: "+o);X(e,o,r==="post",d,a,t)}),t}function X(e,n,r,a,t,d){Object.prototype.hasOwnProperty.call(a,n)||(a[n]=!0,r||d.push(n),i.each(t(n),function(o){X(e,o,r,a,t,d)}),r&&d.push(n))}function Ce(e,n){return z(e,n,"post")}function Te(e,n){return z(e,n,"pre")}b.initLowLimValues=C;b.initCutValues=R;b.calcCutValue=H;b.leaveEdge=K;b.enterEdge=Q;b.exchangeEdges=Z;function b(e){e=ve(e),_(e);var n=$(e);C(n),R(n,e);for(var r,a;r=K(n);)a=Q(n,e,r),Z(n,e,r,a)}function R(e,n){var r=Ce(e,e.nodes());r=r.slice(0,r.length-1),i.forEach(r,function(a){je(e,n,a)})}function je(e,n,r){var a=e.node(r),t=a.parent;e.edge(r,t).cutvalue=H(e,n,r)}function H(e,n,r){var a=e.node(r),t=a.parent,d=!0,o=n.edge(r,t),f=0;return o||(d=!1,o=n.edge(t,r)),f=o.weight,i.forEach(n.nodeEdges(r),function(u){var c=u.v===r,s=c?u.w:u.v;if(s!==t){var h=c===d,l=n.edge(u).weight;if(f+=h?l:-l,Me(e,r,s)){var v=e.edge(r,s).cutvalue;f+=h?-v:v}}}),f}function C(e,n){arguments.length<2&&(n=e.nodes()[0]),J(e,{},1,n)}function J(e,n,r,a,t){var d=r,o=e.node(a);return n[a]=!0,i.forEach(e.neighbors(a),function(f){Object.prototype.hasOwnProperty.call(n,f)||(r=J(e,n,r,f,a))}),o.low=d,o.lim=r++,t?o.parent=t:delete o.parent,r}function K(e){return i.find(e.edges(),function(n){return e.edge(n).cutvalue<0})}function Q(e,n,r){var a=r.v,t=r.w;n.hasEdge(a,t)||(a=r.w,t=r.v);var d=e.node(a),o=e.node(t),f=d,u=!1;d.lim>o.lim&&(f=o,u=!0);var c=i.filter(n.edges(),function(s){return u===F(e,e.node(s.v),f)&&u!==F(e,e.node(s.w),f)});return i.minBy(c,function(s){return g(n,s)})}function Z(e,n,r,a){var t=r.v,d=r.w;e.removeEdge(t,d),e.setEdge(a.v,a.w,{}),C(e),R(e,n),Se(e,n)}function Se(e,n){var r=i.find(e.nodes(),function(t){return!n.node(t).parent}),a=Te(e,r);a=a.slice(1),i.forEach(a,function(t){var d=e.node(t).parent,o=n.edge(t,d),f=!1;o||(o=n.edge(d,t),f=!0),n.node(t).rank=n.node(d).rank+(f?o.minlen:-o.minlen)})}function Me(e,n,r){return e.hasEdge(n,r)}function F(e,n,r){return r.low<=n.lim&&n.lim<=r.lim}function Ve(e){switch(e.graph().ranker){case"network-simplex":G(e);break;case"tight-tree":Fe(e);break;case"longest-path":Be(e);break;default:G(e)}}var Be=_;function Fe(e){_(e),$(e)}function G(e){b(e)}function Ge(e){var n=E(e,"root",{},"_root"),r=De(e),a=i.max(i.values(r))-1,t=2*a+1;e.graph().nestingRoot=n,i.forEach(e.edges(),function(o){e.edge(o).minlen*=t});var d=Ae(e)+1;i.forEach(e.children(),function(o){ee(e,n,t,d,a,r,o)}),e.graph().nodeRankFactor=t}function ee(e,n,r,a,t,d,o){var f=e.children(o);if(!f.length){o!==n&&e.setEdge(n,o,{weight:0,minlen:r});return}var u=M(e,"_bt"),c=M(e,"_bb"),s=e.node(o);e.setParent(u,o),s.borderTop=u,e.setParent(c,o),s.borderBottom=c,i.forEach(f,function(h){ee(e,n,r,a,t,d,h);var l=e.node(h),v=l.borderTop?l.borderTop:h,p=l.borderBottom?l.borderBottom:h,m=l.borderTop?a:2*a,y=v!==p?1:t-d[o]+1;e.setEdge(u,v,{weight:m,minlen:y,nestingEdge:!0}),e.setEdge(p,c,{weight:m,minlen:y,nestingEdge:!0})}),e.parent(o)||e.setEdge(n,u,{weight:0,minlen:t+d[o]})}function De(e){var n={};function r(a,t){var d=e.children(a);d&&d.length&&i.forEach(d,function(o){r(o,t+1)}),n[a]=t}return i.forEach(e.children(),function(a){r(a,1)}),n}function Ae(e){return i.reduce(e.edges(),function(n,r){return n+e.edge(r).weight},0)}function Ye(e){var n=e.graph();e.removeNode(n.nestingRoot),delete n.nestingRoot,i.forEach(e.edges(),function(r){var a=e.edge(r);a.nestingEdge&&e.removeEdge(r)})}function qe(e,n,r){var a={},t;i.forEach(r,function(d){for(var o=e.parent(d),f,u;o;){if(f=e.parent(o),f?(u=a[f],a[f]=o):(u=t,t=o),u&&u!==o){n.setEdge(u,o);return}o=f}})}function Ue(e,n,r){var a=We(e),t=new w.Graph({compound:!0}).setGraph({root:a}).setDefaultNodeLabel(function(d){return e.node(d)});return i.forEach(e.nodes(),function(d){var o=e.node(d),f=e.parent(d);(o.rank===n||o.minRank<=n&&n<=o.maxRank)&&(t.setNode(d),t.setParent(d,f||a),i.forEach(e[r](d),function(u){var c=u.v===d?u.w:u.v,s=t.edge(c,d),h=i.isUndefined(s)?0:s.weight;t.setEdge(c,d,{weight:e.edge(u).weight+h})}),Object.prototype.hasOwnProperty.call(o,"minRank")&&t.setNode(d,{borderLeft:o.borderLeft[n],borderRight:o.borderRight[n]}))}),t}function We(e){for(var n;e.hasNode(n=i.uniqueId("_root")););return n}function $e(e,n){for(var r=0,a=1;a<n.length;++a)r+=ze(e,n[a-1],n[a]);return r}function ze(e,n,r){for(var a=i.zipObject(r,i.map(r,function(c,s){return s})),t=i.flatten(i.map(n,function(c){return i.sortBy(i.map(e.outEdges(c),function(s){return{pos:a[s.w],weight:e.edge(s).weight}}),"pos")})),d=1;d<r.length;)d<<=1;var o=2*d-1;d-=1;var f=i.map(new Array(o),function(){return 0}),u=0;return i.forEach(t.forEach(function(c){var s=c.pos+d;f[s]+=c.weight;for(var h=0;s>0;)s%2&&(h+=f[s+1]),s=s-1>>1,f[s]+=c.weight;u+=c.weight*h})),u}function Xe(e){var n={},r=i.filter(e.nodes(),function(f){return!e.children(f).length}),a=i.max(i.map(r,function(f){return e.node(f).rank})),t=i.map(i.range(a+1),function(){return[]});function d(f){if(!i.has(n,f)){n[f]=!0;var u=e.node(f);t[u.rank].push(f),i.forEach(e.successors(f),d)}}var o=i.sortBy(r,function(f){return e.node(f).rank});return i.forEach(o,d),t}function He(e,n){return i.map(n,function(r){var a=e.inEdges(r);if(a.length){var t=i.reduce(a,function(d,o){var f=e.edge(o),u=e.node(o.v);return{sum:d.sum+f.weight*u.order,weight:d.weight+f.weight}},{sum:0,weight:0});return{v:r,barycenter:t.sum/t.weight,weight:t.weight}}else return{v:r}})}function Je(e,n){var r={};i.forEach(e,function(t,d){var o=r[t.v]={indegree:0,in:[],out:[],vs:[t.v],i:d};i.isUndefined(t.barycenter)||(o.barycenter=t.barycenter,o.weight=t.weight)}),i.forEach(n.edges(),function(t){var d=r[t.v],o=r[t.w];!i.isUndefined(d)&&!i.isUndefined(o)&&(o.indegree++,d.out.push(r[t.w]))});var a=i.filter(r,function(t){return!t.indegree});return Ke(a)}function Ke(e){var n=[];function r(d){return function(o){o.merged||(i.isUndefined(o.barycenter)||i.isUndefined(d.barycenter)||o.barycenter>=d.barycenter)&&Qe(d,o)}}function a(d){return function(o){o.in.push(d),--o.indegree===0&&e.push(o)}}for(;e.length;){var t=e.pop();n.push(t),i.forEach(t.in.reverse(),r(t)),i.forEach(t.out,a(t))}return i.map(i.filter(n,function(d){return!d.merged}),function(d){return i.pick(d,["vs","i","barycenter","weight"])})}function Qe(e,n){var r=0,a=0;e.weight&&(r+=e.barycenter*e.weight,a+=e.weight),n.weight&&(r+=n.barycenter*n.weight,a+=n.weight),e.vs=n.vs.concat(e.vs),e.barycenter=r/a,e.weight=a,e.i=Math.min(n.i,e.i),n.merged=!0}function Ze(e,n){var r=we(e,function(s){return Object.prototype.hasOwnProperty.call(s,"barycenter")}),a=r.lhs,t=i.sortBy(r.rhs,function(s){return-s.i}),d=[],o=0,f=0,u=0;a.sort(en(!!n)),u=D(d,t,u),i.forEach(a,function(s){u+=s.vs.length,d.push(s.vs),o+=s.barycenter*s.weight,f+=s.weight,u=D(d,t,u)});var c={vs:i.flatten(d)};return f&&(c.barycenter=o/f,c.weight=f),c}function D(e,n,r){for(var a;n.length&&(a=i.last(n)).i<=r;)n.pop(),e.push(a.vs),r++;return r}function en(e){return function(n,r){return n.barycenter<r.barycenter?-1:n.barycenter>r.barycenter?1:e?r.i-n.i:n.i-r.i}}function ne(e,n,r,a){var t=e.children(n),d=e.node(n),o=d?d.borderLeft:void 0,f=d?d.borderRight:void 0,u={};o&&(t=i.filter(t,function(p){return p!==o&&p!==f}));var c=He(e,t);i.forEach(c,function(p){if(e.children(p.v).length){var m=ne(e,p.v,r,a);u[p.v]=m,Object.prototype.hasOwnProperty.call(m,"barycenter")&&rn(p,m)}});var s=Je(c,r);nn(s,u);var h=Ze(s,a);if(o&&(h.vs=i.flatten([o,h.vs,f]),e.predecessors(o).length)){var l=e.node(e.predecessors(o)[0]),v=e.node(e.predecessors(f)[0]);Object.prototype.hasOwnProperty.call(h,"barycenter")||(h.barycenter=0,h.weight=0),h.barycenter=(h.barycenter*h.weight+l.order+v.order)/(h.weight+2),h.weight+=2}return h}function nn(e,n){i.forEach(e,function(r){r.vs=i.flatten(r.vs.map(function(a){return n[a]?n[a].vs:a}))})}function rn(e,n){i.isUndefined(e.barycenter)?(e.barycenter=n.barycenter,e.weight=n.weight):(e.barycenter=(e.barycenter*e.weight+n.barycenter*n.weight)/(e.weight+n.weight),e.weight+=n.weight)}function an(e){var n=U(e),r=A(e,i.range(1,n+1),"inEdges"),a=A(e,i.range(n-1,-1,-1),"outEdges"),t=Xe(e);Y(e,t);for(var d=Number.POSITIVE_INFINITY,o,f=0,u=0;u<4;++f,++u){tn(f%2?r:a,f%4>=2),t=k(e);var c=$e(e,t);c<d&&(u=0,o=i.cloneDeep(t),d=c)}Y(e,o)}function A(e,n,r){return i.map(n,function(a){return Ue(e,a,r)})}function tn(e,n){var r=new w.Graph;i.forEach(e,function(a){var t=a.graph().root,d=ne(a,t,r,n);i.forEach(d.vs,function(o,f){a.node(o).order=f}),qe(a,r,d.vs)})}function Y(e,n){i.forEach(n,function(r){i.forEach(r,function(a,t){e.node(a).order=t})})}function on(e){var n=fn(e);i.forEach(e.graph().dummyChains,function(r){for(var a=e.node(r),t=a.edgeObj,d=dn(e,n,t.v,t.w),o=d.path,f=d.lca,u=0,c=o[u],s=!0;r!==t.w;){if(a=e.node(r),s){for(;(c=o[u])!==f&&e.node(c).maxRank<a.rank;)u++;c===f&&(s=!1)}if(!s){for(;u<o.length-1&&e.node(c=o[u+1]).minRank<=a.rank;)u++;c=o[u]}e.setParent(r,c),r=e.successors(r)[0]}})}function dn(e,n,r,a){var t=[],d=[],o=Math.min(n[r].low,n[a].low),f=Math.max(n[r].lim,n[a].lim),u,c;u=r;do u=e.parent(u),t.push(u);while(u&&(n[u].low>o||f>n[u].lim));for(c=u,u=a;(u=e.parent(u))!==c;)d.push(u);return{path:t.concat(d.reverse()),lca:c}}function fn(e){var n={},r=0;function a(t){var d=r;i.forEach(e.children(t),a),n[t]={low:d,lim:r++}}return i.forEach(e.children(),a),n}function un(e,n){var r={};function a(t,d){var o=0,f=0,u=t.length,c=i.last(d);return i.forEach(d,function(s,h){var l=sn(e,s),v=l?e.node(l).order:u;(l||s===c)&&(i.forEach(d.slice(f,h+1),function(p){i.forEach(e.predecessors(p),function(m){var y=e.node(m),T=y.order;(T<o||v<T)&&!(y.dummy&&e.node(p).dummy)&&re(r,m,p)})}),f=h+1,o=v)}),d}return i.reduce(n,a),r}function cn(e,n){var r={};function a(d,o,f,u,c){var s;i.forEach(i.range(o,f),function(h){s=d[h],e.node(s).dummy&&i.forEach(e.predecessors(s),function(l){var v=e.node(l);v.dummy&&(v.order<u||v.order>c)&&re(r,l,s)})})}function t(d,o){var f=-1,u,c=0;return i.forEach(o,function(s,h){if(e.node(s).dummy==="border"){var l=e.predecessors(s);l.length&&(u=e.node(l[0]).order,a(o,c,h,f,u),c=h,f=u)}a(o,c,o.length,u,d.length)}),o}return i.reduce(n,t),r}function sn(e,n){if(e.node(n).dummy)return i.find(e.predecessors(n),function(r){return e.node(r).dummy})}function re(e,n,r){if(n>r){var a=n;n=r,r=a}Object.prototype.hasOwnProperty.call(e,n)||Object.defineProperty(e,n,{enumerable:!0,configurable:!0,value:{},writable:!0});var t=e[n];Object.defineProperty(t,r,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function hn(e,n,r){if(n>r){var a=n;n=r,r=a}return!!e[n]&&Object.prototype.hasOwnProperty.call(e[n],r)}function ln(e,n,r,a){var t={},d={},o={};return i.forEach(n,function(f){i.forEach(f,function(u,c){t[u]=u,d[u]=u,o[u]=c})}),i.forEach(n,function(f){var u=-1;i.forEach(f,function(c){var s=a(c);if(s.length){s=i.sortBy(s,function(m){return o[m]});for(var h=(s.length-1)/2,l=Math.floor(h),v=Math.ceil(h);l<=v;++l){var p=s[l];d[c]===c&&u<o[p]&&!hn(r,c,p)&&(d[p]=c,d[c]=t[c]=t[p],u=o[p])}}})}),{root:t,align:d}}function vn(e,n,r,a,t){var d={},o=pn(e,n,r,t),f=t?"borderLeft":"borderRight";function u(h,l){for(var v=o.nodes(),p=v.pop(),m={};p;)m[p]?h(p):(m[p]=!0,v.push(p),v=v.concat(l(p))),p=v.pop()}function c(h){d[h]=o.inEdges(h).reduce(function(l,v){return Math.max(l,d[v.v]+o.edge(v))},0)}function s(h){var l=o.outEdges(h).reduce(function(p,m){return Math.min(p,d[m.w]-o.edge(m))},Number.POSITIVE_INFINITY),v=e.node(h);l!==Number.POSITIVE_INFINITY&&v.borderType!==f&&(d[h]=Math.max(d[h],l))}return u(c,o.predecessors.bind(o)),u(s,o.successors.bind(o)),i.forEach(a,function(h){d[h]=d[r[h]]}),d}function pn(e,n,r,a){var t=new w.Graph,d=e.graph(),o=yn(d.nodesep,d.edgesep,a);return i.forEach(n,function(f){var u;i.forEach(f,function(c){var s=r[c];if(t.setNode(s),u){var h=r[u],l=t.edge(h,s);t.setEdge(h,s,Math.max(o(e,c,u),l||0))}u=c})}),t}function mn(e,n){return i.minBy(i.values(n),function(r){var a=Number.NEGATIVE_INFINITY,t=Number.POSITIVE_INFINITY;return i.forIn(r,function(d,o){var f=gn(e,o)/2;a=Math.max(d+f,a),t=Math.min(d-f,t)}),a-t})}function wn(e,n){var r=i.values(n),a=i.min(r),t=i.max(r);i.forEach(["u","d"],function(d){i.forEach(["l","r"],function(o){var f=d+o,u=e[f],c;if(u!==n){var s=i.values(u);c=o==="l"?a-i.min(s):t-i.max(s),c&&(e[f]=i.mapValues(u,function(h){return h+c}))}})})}function bn(e,n){return i.mapValues(e.ul,function(r,a){if(n)return e[n.toLowerCase()][a];var t=i.sortBy(i.map(e,a));return(t[1]+t[2])/2})}function En(e){var n=k(e),r=i.merge(un(e,n),cn(e,n)),a={},t;i.forEach(["u","d"],function(o){t=o==="u"?n:i.values(n).reverse(),i.forEach(["l","r"],function(f){f==="r"&&(t=i.map(t,function(h){return i.values(h).reverse()}));var u=(o==="u"?e.predecessors:e.successors).bind(e),c=ln(e,t,r,u),s=vn(e,t,c.root,c.align,f==="r");f==="r"&&(s=i.mapValues(s,function(h){return-h})),a[o+f]=s})});var d=mn(e,a);return wn(a,d),bn(a,e.graph().align)}function yn(e,n,r){return function(a,t,d){var o=a.node(t),f=a.node(d),u=0,c;if(u+=o.width/2,Object.prototype.hasOwnProperty.call(o,"labelpos"))switch(o.labelpos.toLowerCase()){case"l":c=-o.width/2;break;case"r":c=o.width/2;break}if(c&&(u+=r?c:-c),c=0,u+=(o.dummy?n:e)/2,u+=(f.dummy?n:e)/2,u+=f.width/2,Object.prototype.hasOwnProperty.call(f,"labelpos"))switch(f.labelpos.toLowerCase()){case"l":c=f.width/2;break;case"r":c=-f.width/2;break}return c&&(u+=r?c:-c),c=0,u}}function gn(e,n){return e.node(n).width}function kn(e){e=q(e),xn(e),i.forOwn(En(e),function(n,r){e.node(r).x=n})}function xn(e){var n=k(e),r=e.graph().ranksep,a=0;i.forEach(n,function(t){var d=i.max(i.map(t,function(o){return e.node(o).height}));i.forEach(t,function(o){e.node(o).y=a+d/2}),a+=d+r})}function On(e,n){var r=be;r("layout",()=>{var a=r(" buildLayoutGraph",()=>Mn(e));r(" runLayout",()=>Nn(a,r)),r(" updateInputGraph",()=>Ln(e,a))})}function Nn(e,n){n(" makeSpaceForEdgeLabels",()=>Vn(e)),n(" removeSelfEdges",()=>Wn(e)),n(" acyclic",()=>se(e)),n(" nestingGraph.run",()=>Ge(e)),n(" rank",()=>Ve(q(e))),n(" injectEdgeLabelProxies",()=>Bn(e)),n(" removeEmptyRanks",()=>me(e)),n(" nestingGraph.cleanup",()=>Ye(e)),n(" normalizeRanks",()=>pe(e)),n(" assignRankMinMax",()=>Fn(e)),n(" removeEdgeLabelProxies",()=>Gn(e)),n(" normalize.run",()=>Oe(e)),n(" parentDummyChains",()=>on(e)),n(" addBorderSegments",()=>Ee(e)),n(" order",()=>an(e)),n(" insertSelfEdges",()=>$n(e)),n(" adjustCoordinateSystem",()=>ye(e)),n(" position",()=>kn(e)),n(" positionSelfEdges",()=>zn(e)),n(" removeBorderNodes",()=>Un(e)),n(" normalize.undo",()=>Le(e)),n(" fixupEdgeLabelCoords",()=>Yn(e)),n(" undoCoordinateSystem",()=>ge(e)),n(" translateGraph",()=>Dn(e)),n(" assignNodeIntersects",()=>An(e)),n(" reversePoints",()=>qn(e)),n(" acyclic.undo",()=>le(e))}function Ln(e,n){i.forEach(e.nodes(),function(r){var a=e.node(r),t=n.node(r);a&&(a.x=t.x,a.y=t.y,n.children(r).length&&(a.width=t.width,a.height=t.height))}),i.forEach(e.edges(),function(r){var a=e.edge(r),t=n.edge(r);a.points=t.points,Object.prototype.hasOwnProperty.call(t,"x")&&(a.x=t.x,a.y=t.y)}),e.graph().width=n.graph().width,e.graph().height=n.graph().height}var In=["nodesep","edgesep","ranksep","marginx","marginy"],Pn={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},_n=["acyclicer","ranker","rankdir","align"],Rn=["width","height"],Cn={width:0,height:0},Tn=["minlen","weight","width","height","labeloffset"],jn={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Sn=["labelpos"];function Mn(e){var n=new w.Graph({multigraph:!0,compound:!0}),r=I(e.graph());return n.setGraph(i.merge({},Pn,L(r,In),i.pick(r,_n))),i.forEach(e.nodes(),function(a){var t=I(e.node(a));n.setNode(a,i.defaults(L(t,Rn),Cn)),n.setParent(a,e.parent(a))}),i.forEach(e.edges(),function(a){var t=I(e.edge(a));n.setEdge(a,i.merge({},jn,L(t,Tn),i.pick(t,Sn)))}),n}function Vn(e){var n=e.graph();n.ranksep/=2,i.forEach(e.edges(),function(r){var a=e.edge(r);a.minlen*=2,a.labelpos.toLowerCase()!=="c"&&(n.rankdir==="TB"||n.rankdir==="BT"?a.width+=a.labeloffset:a.height+=a.labeloffset)})}function Bn(e){i.forEach(e.edges(),function(n){var r=e.edge(n);if(r.width&&r.height){var a=e.node(n.v),t=e.node(n.w),d={rank:(t.rank-a.rank)/2+a.rank,e:n};E(e,"edge-proxy",d,"_ep")}})}function Fn(e){var n=0;i.forEach(e.nodes(),function(r){var a=e.node(r);a.borderTop&&(a.minRank=e.node(a.borderTop).rank,a.maxRank=e.node(a.borderBottom).rank,n=i.max(n,a.maxRank))}),e.graph().maxRank=n}function Gn(e){i.forEach(e.nodes(),function(n){var r=e.node(n);r.dummy==="edge-proxy"&&(e.edge(r.e).labelRank=r.rank,e.removeNode(n))})}function Dn(e){var n=Number.POSITIVE_INFINITY,r=0,a=Number.POSITIVE_INFINITY,t=0,d=e.graph(),o=d.marginx||0,f=d.marginy||0;function u(c){var s=c.x,h=c.y,l=c.width,v=c.height;n=Math.min(n,s-l/2),r=Math.max(r,s+l/2),a=Math.min(a,h-v/2),t=Math.max(t,h+v/2)}i.forEach(e.nodes(),function(c){u(e.node(c))}),i.forEach(e.edges(),function(c){var s=e.edge(c);Object.prototype.hasOwnProperty.call(s,"x")&&u(s)}),n-=o,a-=f,i.forEach(e.nodes(),function(c){var s=e.node(c);s.x-=n,s.y-=a}),i.forEach(e.edges(),function(c){var s=e.edge(c);i.forEach(s.points,function(h){h.x-=n,h.y-=a}),Object.prototype.hasOwnProperty.call(s,"x")&&(s.x-=n),Object.prototype.hasOwnProperty.call(s,"y")&&(s.y-=a)}),d.width=r-n+o,d.height=t-a+f}function An(e){i.forEach(e.edges(),function(n){var r=e.edge(n),a=e.node(n.v),t=e.node(n.w),d,o;r.points?(d=r.points[0],o=r.points[r.points.length-1]):(r.points=[],d=t,o=a),r.points.unshift(S(a,d)),r.points.push(S(t,o))})}function Yn(e){i.forEach(e.edges(),function(n){var r=e.edge(n);if(Object.prototype.hasOwnProperty.call(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function qn(e){i.forEach(e.edges(),function(n){var r=e.edge(n);r.reversed&&r.points.reverse()})}function Un(e){i.forEach(e.nodes(),function(n){if(e.children(n).length){var r=e.node(n),a=e.node(r.borderTop),t=e.node(r.borderBottom),d=e.node(i.last(r.borderLeft)),o=e.node(i.last(r.borderRight));r.width=Math.abs(o.x-d.x),r.height=Math.abs(t.y-a.y),r.x=d.x+r.width/2,r.y=a.y+r.height/2}}),i.forEach(e.nodes(),function(n){e.node(n).dummy==="border"&&e.removeNode(n)})}function Wn(e){i.forEach(e.edges(),function(n){if(n.v===n.w){var r=e.node(n.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:n,label:e.edge(n)}),e.removeEdge(n)}})}function $n(e){var n=k(e);i.forEach(n,function(r){var a=0;i.forEach(r,function(t,d){var o=e.node(t);o.order=d+a,i.forEach(o.selfEdges,function(f){E(e,"selfedge",{width:f.label.width,height:f.label.height,rank:o.rank,order:d+ ++a,e:f.e,label:f.label},"_se")}),delete o.selfEdges})})}function zn(e){i.forEach(e.nodes(),function(n){var r=e.node(n);if(r.dummy==="selfedge"){var a=e.node(r.e.v),t=a.x+a.width/2,d=a.y,o=r.x-t,f=a.height/2;e.setEdge(r.e,r.label),e.removeNode(n),r.label.points=[{x:t+2*o/3,y:d-f},{x:t+5*o/6,y:d-f},{x:t+o,y:d},{x:t+5*o/6,y:d+f},{x:t+2*o/3,y:d+f}],r.label.x=r.x,r.label.y=r.y}})}function L(e,n){return i.mapValues(i.pick(e,n),Number)}function I(e){var n={};return i.forEach(e,function(r,a){n[a.toLowerCase()]=r}),n}exports.layout=On;
@@ -0,0 +1,5 @@
1
+ import { U as a, C as n } from "./layers.DUGRqDUB.js";
2
+ const t = (r, o) => a.lang.round(n.parse(r)[o]);
3
+ export {
4
+ t as c
5
+ };