@intent-hq/web 2.301.0 → 2.301.1
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.
- package/package.json +1 -1
- package/web/app/immutable/chunks/{B7zUuO00.js → -8mBz6EW.js} +1 -1
- package/web/app/immutable/chunks/{BbJJ4Uie.js → 2Iga5834.js} +1 -1
- package/web/app/immutable/chunks/{BcmjbiBm.js → 3-bIA0_b.js} +2 -2
- package/web/app/immutable/chunks/{DrNVHvhK.js → 3cwLWYk-.js} +1 -1
- package/web/app/immutable/chunks/{9k5bnL8-.js → 6WuGSm1v.js} +2 -2
- package/web/app/immutable/chunks/{DKolS8Ht.js → 8FC2Ymrs.js} +1 -1
- package/web/app/immutable/chunks/{Ce-KYi-n.js → 90FT2TPG.js} +2 -2
- package/web/app/immutable/chunks/{B52XysAQ.js → 9Bp-qw-c.js} +1 -1
- package/web/app/immutable/chunks/{BPzYYRAs.js → 9pcH5qab.js} +4 -4
- package/web/app/immutable/chunks/{DhGPSsBf.js → Alw6Bgam.js} +1 -1
- package/web/app/immutable/chunks/{DtagNJGy.js → B-pxGJ33.js} +1 -1
- package/web/app/immutable/chunks/{BcpdiGRR.js → B1f-Dpa6.js} +1 -1
- package/web/app/immutable/chunks/{Citu-dNT.js → B1ySs1Ps.js} +1 -1
- package/web/app/immutable/chunks/{DmJbtm9p.js → B3pWDt4A.js} +2 -2
- package/web/app/immutable/chunks/{CQMDPYtj.js → B5FPkuba.js} +1 -1
- package/web/app/immutable/chunks/{D5_2GYC0.js → B5gRIzZb.js} +1 -1
- package/web/app/immutable/chunks/{DMnHL_j_.js → B9e_lQGd.js} +1 -1
- package/web/app/immutable/chunks/{DE5Vt-mk.js → BAJdDJmt.js} +1 -1
- package/web/app/immutable/chunks/{ggRICgWE.js → BBfmiZwR.js} +1 -1
- package/web/app/immutable/chunks/{KG68UpwU.js → BCFfKX9W.js} +1 -1
- package/web/app/immutable/chunks/{C9k7mgs4.js → BDUAehdP.js} +4 -4
- package/web/app/immutable/chunks/{COMfKjnL.js → BFnbk-Kf.js} +1 -1
- package/web/app/immutable/chunks/{CG9-31He.js → BGGzsVfR.js} +1 -1
- package/web/app/immutable/chunks/{mkPaye9m.js → BIDHEGct.js} +1 -1
- package/web/app/immutable/chunks/{DnCf3QiL.js → BIOk6wuV.js} +1 -1
- package/web/app/immutable/chunks/{CnWtv34Y.js → BJ_6izfA.js} +7 -7
- package/web/app/immutable/chunks/{D54_bMKf.js → BMPb03sg.js} +1 -1
- package/web/app/immutable/chunks/{Bloa0suE.js → BNVzhw1y.js} +1 -1
- package/web/app/immutable/chunks/{hOR9B4V4.js → BO9EbiHx.js} +1 -1
- package/web/app/immutable/chunks/{CXtOOnh0.js → BPC4nNQe.js} +1 -1
- package/web/app/immutable/chunks/{CoJOpuAN.js → BRKe81M1.js} +1 -1
- package/web/app/immutable/chunks/{Ce8PMxuE.js → BSuE_PI2.js} +1 -1
- package/web/app/immutable/chunks/{8Q_Was_5.js → BTIw3yd0.js} +1 -1
- package/web/app/immutable/chunks/{DaqPl4Tz.js → BTeM7_LX.js} +1 -1
- package/web/app/immutable/chunks/{ClOUpVZZ.js → BVTor63R.js} +1 -1
- package/web/app/immutable/chunks/{BhkBe7Jc.js → BW_04noU.js} +1 -1
- package/web/app/immutable/chunks/{bDcdMMyl.js → BWerHQW_.js} +1 -1
- package/web/app/immutable/chunks/{CItSvrO_.js → BX8IWbyz.js} +2 -2
- package/web/app/immutable/chunks/{Cu4QpKDr.js → BYZmS9Dk.js} +1 -1
- package/web/app/immutable/chunks/{DGW6wXEq.js → B_vcNRuc.js} +1 -1
- package/web/app/immutable/chunks/{DuInbvT4.js → BapFUUqZ.js} +1 -1
- package/web/app/immutable/chunks/{BAbzdNi8.js → BdCx7DnP.js} +1 -1
- package/web/app/immutable/chunks/{CUMro1vx.js → BghpE59-.js} +1 -1
- package/web/app/immutable/chunks/{B-JIdXlm.js → BhYLt5th.js} +1 -1
- package/web/app/immutable/chunks/{Drgj5uDM.js → Bk5SMnS3.js} +43 -43
- package/web/app/immutable/chunks/{C4-u_VtZ.js → BlDfHMda.js} +1 -1
- package/web/app/immutable/chunks/{DmUU4JxK.js → BlPj7Bqh.js} +1 -1
- package/web/app/immutable/chunks/{B220ai_K.js → Bo2QS6PZ.js} +1 -1
- package/web/app/immutable/chunks/{CJzvjWBQ.js → Bo7YWMXl.js} +1 -1
- package/web/app/immutable/chunks/{knnjLtf9.js → BuXA0uuF.js} +1 -1
- package/web/app/immutable/chunks/{C5MJ7BeC.js → BvgUrOVR.js} +1 -1
- package/web/app/immutable/chunks/{DIceyoUA.js → BxC2yVbF.js} +1 -1
- package/web/app/immutable/chunks/{CtcF6bbr.js → BxgeL5Cn.js} +2 -2
- package/web/app/immutable/chunks/{EzIyeu9q.js → BzDjODLF.js} +1 -1
- package/web/app/immutable/chunks/{BVJeg9VF.js → BzwTpGAs.js} +3 -3
- package/web/app/immutable/chunks/{DYywvoax.js → C-yDVBGV.js} +1 -1
- package/web/app/immutable/chunks/{qwx0AE4b.js → C0DySWij.js} +1 -1
- package/web/app/immutable/chunks/{CXqGB8i2.js → C4Zy0P7R.js} +1 -1
- package/web/app/immutable/chunks/{DsHbB0Gk.js → C4wwbPuR.js} +1 -1
- package/web/app/immutable/chunks/{DediWp9-.js → C6PYFU8v.js} +1 -1
- package/web/app/immutable/chunks/{DeI8FMuz.js → C9dil5-t.js} +1 -1
- package/web/app/immutable/chunks/{BXU_OYLJ.js → CB1wD_PC.js} +1 -1
- package/web/app/immutable/chunks/CDxER840.js +1 -0
- package/web/app/immutable/chunks/{tkZmaR4M.js → CEOoXkJa.js} +4 -4
- package/web/app/immutable/chunks/{CiBStNAr.js → CEs-7mch.js} +3 -3
- package/web/app/immutable/chunks/{Q-IbWJI_.js → CFgK9GfH.js} +1 -1
- package/web/app/immutable/chunks/{DZKVhZfO.js → CGwmPMQc.js} +1 -1
- package/web/app/immutable/chunks/{Cr5KYQBW.js → CHDy3QTf.js} +1 -1
- package/web/app/immutable/chunks/{DoOAeI0m.js → CK1vqkSE.js} +1 -1
- package/web/app/immutable/chunks/{BQY3g8uE.js → CKI5DKl7.js} +6 -6
- package/web/app/immutable/chunks/{0_FDVEla.js → CKj5bwOX.js} +1 -1
- package/web/app/immutable/chunks/{DELLe_1a.js → CMAl4tQM.js} +1 -1
- package/web/app/immutable/chunks/{k6s8dGrA.js → CMQqNZFP.js} +1 -1
- package/web/app/immutable/chunks/{BJn7bayT.js → CMS0Mt7v.js} +1 -1
- package/web/app/immutable/chunks/{B2jj_YAX.js → CORu-AyV.js} +1 -1
- package/web/app/immutable/chunks/{CMBaQAuw.js → COuOkYRg.js} +1 -1
- package/web/app/immutable/chunks/{Jf6CJclx.js → CPBiF1gr.js} +1 -1
- package/web/app/immutable/chunks/{B7VWEjxq.js → CS1PgLFW.js} +1 -1
- package/web/app/immutable/chunks/{DsrgAjSN.js → CSiZwu1h.js} +1 -1
- package/web/app/immutable/chunks/{6Ql_vn7X.js → CT_wb7-d.js} +1 -1
- package/web/app/immutable/chunks/{BRwNKwD7.js → CTt3kMm1.js} +1 -1
- package/web/app/immutable/chunks/{Dma9ms7u.js → CUl5WBR5.js} +1 -1
- package/web/app/immutable/chunks/{Bzu3FrPq.js → CUt6iXkF.js} +1 -1
- package/web/app/immutable/chunks/{BGv3Ttev.js → CYfBmNaT.js} +1 -1
- package/web/app/immutable/chunks/{B-OGKYEx.js → C_-tA5vs.js} +1 -1
- package/web/app/immutable/chunks/{Mjh5v3L0.js → C_VMQN67.js} +1 -1
- package/web/app/immutable/chunks/{DCv8NaxM.js → C_uqctJM.js} +1 -1
- package/web/app/immutable/chunks/{BEgosT1d.js → CaibRh-G.js} +1 -1
- package/web/app/immutable/chunks/{CeX5z_vs.js → Cavwt8Mn.js} +1 -1
- package/web/app/immutable/chunks/{Pq3i4zFA.js → Cdz-CHGd.js} +1 -1
- package/web/app/immutable/chunks/{B8S_XDvA.js → CfM2ZJef.js} +1 -1
- package/web/app/immutable/chunks/{DdV_6_CH.js → Cg_QSby7.js} +1 -1
- package/web/app/immutable/chunks/{DVnNWj1L.js → Cl5KdYjm.js} +1 -1
- package/web/app/immutable/chunks/{CS5VoVeF.js → Cn23SDXY.js} +1 -1
- package/web/app/immutable/chunks/{CixlkwsU.js → Cnlend6s.js} +1 -1
- package/web/app/immutable/chunks/{CZE4HQ01.js → CqnucWm4.js} +1 -1
- package/web/app/immutable/chunks/{DNyxd11M.js → Crq2Gvaa.js} +1 -1
- package/web/app/immutable/chunks/{BBNnH_sw.js → CsqCa0Sd.js} +2 -2
- package/web/app/immutable/chunks/{BspPTfLp.js → CuG6uIIP.js} +1 -1
- package/web/app/immutable/chunks/{BwlxTP6m.js → Cvg7bd3W.js} +1 -1
- package/web/app/immutable/chunks/{CHeQtCyR.js → CwnyA6hc.js} +1 -1
- package/web/app/immutable/chunks/{BWljXDfF.js → Cx089QrC.js} +1 -1
- package/web/app/immutable/chunks/{Denyu19x.js → D-s4Q5GN.js} +1 -1
- package/web/app/immutable/chunks/{CEFx_w_J.js → D2gIe4Fc.js} +1 -1
- package/web/app/immutable/chunks/{DZwXyTtM.js → D6IXX0lv.js} +1 -1
- package/web/app/immutable/chunks/{Dcbdz0Jw.js → D6Id8WlN.js} +1 -1
- package/web/app/immutable/chunks/{Dl3AQcJn.js → D9hi6Z3O.js} +1 -1
- package/web/app/immutable/chunks/{BLn5rsUE.js → D9iN-aHM.js} +1 -1
- package/web/app/immutable/chunks/{DvqgRsDd.js → DD1-zRxp.js} +1 -1
- package/web/app/immutable/chunks/{NDnZ2f46.js → DE5Smm9m.js} +1 -1
- package/web/app/immutable/chunks/{BEj-d9Cx.js → DFoGBie-.js} +1 -1
- package/web/app/immutable/chunks/{CzeYC5kK.js → DG__gHhd.js} +1 -1
- package/web/app/immutable/chunks/{Vx0IIPew.js → DIlG6FTS.js} +1 -1
- package/web/app/immutable/chunks/{BrAaVsFz.js → DK1vbm9l.js} +1 -1
- package/web/app/immutable/chunks/{8EDHNAa0.js → DKs2ftKN.js} +1 -1
- package/web/app/immutable/chunks/{B4Ys_Zqk.js → DLoJFSfZ.js} +1 -1
- package/web/app/immutable/chunks/{Ciihhv86.js → DMC7qMUv.js} +1 -1
- package/web/app/immutable/chunks/{T995SloE.js → DMcsIxoO.js} +1 -1
- package/web/app/immutable/chunks/{BeAhMSSb.js → DNmVxfYt.js} +8 -8
- package/web/app/immutable/chunks/{B_iqW4nZ.js → DOGdTp2m.js} +1 -1
- package/web/app/immutable/chunks/{UMA3RT0s.js → DR58OcKC.js} +1 -1
- package/web/app/immutable/chunks/{BggwWRGf.js → DR9205pL.js} +1 -1
- package/web/app/immutable/chunks/{p8msS16l.js → DTSOJB0e.js} +1 -1
- package/web/app/immutable/chunks/{CSdV5_bj.js → DXwDIYHN.js} +1 -1
- package/web/app/immutable/chunks/{DJ00LNUR.js → DYd7w17e.js} +1 -1
- package/web/app/immutable/chunks/{yQ0Z1VHW.js → DYrK-s5W.js} +1 -1
- package/web/app/immutable/chunks/{C-VIKqni.js → DYztlXyW.js} +1 -1
- package/web/app/immutable/chunks/{Dj_FVUHS.js → DZ5koqO7.js} +1 -1
- package/web/app/immutable/chunks/{D_Ou_6lS.js → D_m0iYjs.js} +1 -1
- package/web/app/immutable/chunks/{DvrTNX0e.js → DadwIC0R.js} +1 -1
- package/web/app/immutable/chunks/{B9G1J12P.js → DbKrZJmS.js} +6 -6
- package/web/app/immutable/chunks/{DU4GH855.js → DbY-sUwj.js} +1 -1
- package/web/app/immutable/chunks/{DZCBh97_.js → DcE_Ld1a.js} +1 -1
- package/web/app/immutable/chunks/{42GHkgj6.js → DdKmPHVm.js} +1 -1
- package/web/app/immutable/chunks/{SNezQIpP.js → DffgEGrv.js} +1 -1
- package/web/app/immutable/chunks/{eEZIbdzf.js → DfiXlh8D.js} +1 -1
- package/web/app/immutable/chunks/{DNKZQCox.js → DiDcqoCZ.js} +1 -1
- package/web/app/immutable/chunks/{Cu8J93FR.js → Dj5vfD48.js} +3 -3
- package/web/app/immutable/chunks/{i9DVPIlR.js → DjVfE_Ds.js} +1 -1
- package/web/app/immutable/chunks/{DBdfwYFa.js → Dkg7fAiD.js} +1 -1
- package/web/app/immutable/chunks/{DrHxWi1S.js → DkraFhXS.js} +1 -1
- package/web/app/immutable/chunks/{BWjmxT5D.js → DmtmsOtX.js} +1 -1
- package/web/app/immutable/chunks/{4I8WRxn6.js → Dovmtid-.js} +1 -1
- package/web/app/immutable/chunks/{BeLl-r8h.js → DpN6Ybfd.js} +1 -1
- package/web/app/immutable/chunks/{CVC-R1OI.js → DrWcQsKJ.js} +1 -1
- package/web/app/immutable/chunks/{CXdTWTzB.js → DvCCocml.js} +1 -1
- package/web/app/immutable/chunks/{DyVKK3zU.js → DwuPw74E.js} +1 -1
- package/web/app/immutable/chunks/{CzVv3uRF.js → Dz6pz6rM.js} +1 -1
- package/web/app/immutable/chunks/{DeBsmEqU.js → HcVsBsAl.js} +1 -1
- package/web/app/immutable/chunks/{DAjW_Z-R.js → Iu8s0xrk.js} +1 -1
- package/web/app/immutable/chunks/{Dzu7FPMr.js → LzWIYiXc.js} +1 -1
- package/web/app/immutable/chunks/{BlFUy1M_.js → McMSPwXq.js} +1 -1
- package/web/app/immutable/chunks/{CunMRDJl.js → NlCjCVxn.js} +1 -1
- package/web/app/immutable/chunks/{CjhAOkhP.js → NzxBab7c.js} +1 -1
- package/web/app/immutable/chunks/{7O3nfCeH.js → PeSBy6Q3.js} +1 -1
- package/web/app/immutable/chunks/{T1WqHZLZ.js → PnTDvXOe.js} +1 -1
- package/web/app/immutable/chunks/{BoaSTXep.js → SiYLjuDS.js} +1 -1
- package/web/app/immutable/chunks/{BXDl97pl.js → Syl_OSjA.js} +1 -1
- package/web/app/immutable/chunks/{w7xvX9oI.js → TV2_MWXe.js} +1 -1
- package/web/app/immutable/chunks/{BNrl_yXC.js → TWVlaXcj.js} +1 -1
- package/web/app/immutable/chunks/{BF75AbUh.js → U_cmHtqi.js} +1 -1
- package/web/app/immutable/chunks/{ClJKqwKB.js → UlQNHb3m.js} +1 -1
- package/web/app/immutable/chunks/{ymVYL-2H.js → Vwfej_EC.js} +1 -1
- package/web/app/immutable/chunks/{y8su61xq.js → WL4wAA6m.js} +2 -2
- package/web/app/immutable/chunks/{nz1YTpIq.js → XO84v1Z5.js} +1 -1
- package/web/app/immutable/chunks/{zl8SSmZq.js → b33seoH7.js} +1 -1
- package/web/app/immutable/chunks/{BL-4c5eP.js → dvgX5pbn.js} +1 -1
- package/web/app/immutable/chunks/{C9PGJX9n.js → fX819Pv6.js} +1 -1
- package/web/app/immutable/chunks/{CC4WmnL6.js → gMye6h60.js} +2 -2
- package/web/app/immutable/chunks/{BRMj8a4h.js → h6ZeyBNW.js} +1 -1
- package/web/app/immutable/chunks/{CXkYtIUm.js → ljZI5d7y.js} +1 -1
- package/web/app/immutable/chunks/{w0VuoJIl.js → mFLgyCOK.js} +1 -1
- package/web/app/immutable/chunks/{DBGO1w9a.js → pDn0_bm8.js} +1 -1
- package/web/app/immutable/chunks/{CvgQ9EkY.js → rgnRekX3.js} +1 -1
- package/web/app/immutable/chunks/{CM8AwG-k.js → sgMaD9-D.js} +1 -1
- package/web/app/immutable/chunks/{DWUInPKR.js → uR5KZKbl.js} +1 -1
- package/web/app/immutable/chunks/{CTmT5I7Z.js → udwHGMln.js} +1 -1
- package/web/app/immutable/chunks/{CUMzsmcb.js → ulG7NA7z.js} +1 -1
- package/web/app/immutable/chunks/{Cw1gOOP4.js → wD4fx_9g.js} +1 -1
- package/web/app/immutable/chunks/{Dmf4WObG.js → x0rjHUHa.js} +1 -1
- package/web/app/immutable/chunks/{C9jifMvI.js → yCx04g4X.js} +1 -1
- package/web/app/immutable/chunks/{BAXlZEur.js → yW4W7htU.js} +1 -1
- package/web/app/immutable/entry/{app.BgfLNpAH.js → app.CIVLA2a9.js} +2 -2
- package/web/app/immutable/entry/start.Cn76ZGVI.js +1 -0
- package/web/app/immutable/nodes/{0.B3w9utn7.js → 0.ACp4Nz4v.js} +1 -1
- package/web/app/immutable/nodes/{1.DaxXfawW.js → 1.DRnQyS6A.js} +1 -1
- package/web/app/immutable/nodes/{10.Ut2WO8-5.js → 10.CLkVRFBV.js} +1 -1
- package/web/app/immutable/nodes/{14.BS_itk_o.js → 14.9_BXzcxR.js} +1 -1
- package/web/app/immutable/nodes/{16.DXjz2v3H.js → 16.BMYUgPNR.js} +2 -2
- package/web/app/immutable/nodes/2.d5BGPrjO.js +9 -0
- package/web/app/immutable/nodes/{3.63ZtoTSA.js → 3.0E-ZGvKe.js} +1 -1
- package/web/app/immutable/nodes/{4.DDS6oK5o.js → 4.DSO5-jdr.js} +1 -1
- package/web/app/immutable/nodes/{5.DsTfq2mA.js → 5.BexFD7jH.js} +1 -1
- package/web/app/immutable/nodes/{6.BH8FJ3Wf.js → 6.CqlyGMy5.js} +1 -1
- package/web/app/immutable/nodes/{7.DW27zT40.js → 7.C2XKzJeK.js} +1 -1
- package/web/app/immutable/nodes/{8.B4CNA7De.js → 8.CMFpn5kb.js} +2 -2
- package/web/app/immutable/nodes/{9.Nt9iZ731.js → 9.BolTThFG.js} +1 -1
- package/web/app/version.json +1 -1
- package/web/index.html +9 -9
- package/web/app/immutable/chunks/DJ_9F2bm.js +0 -1
- package/web/app/immutable/entry/start.DFg06W-g.js +0 -1
- package/web/app/immutable/nodes/2.CYzMuwKR.js +0 -9
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{I as X}from"./
|
|
1
|
+
import{I as X}from"./D6IXX0lv.js";import{p as z}from"./Cx089QrC.js";import{c9 as O,c7 as G,c6 as Y,aP as P,aK as F,aL as Z,f as g,$ as k,bC as A,c4 as q,a6 as U,aN as E,a0 as j,c2 as K,aR as J,ax as Q,bY as ee}from"./CKI5DKl7.js";import{p as te}from"./DRGgTdjp.js";var L=/[─━│┃└┗├┣]/,D=/[└┗├┣]/,ne=/[─━]/,$=/^[\s│┃]+$/,N=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,T=/^\s*%%/,re=" ";function _(n){return n.some(t=>L.test(t))}g(_,"isBoxDrawingFormat");function M(n){for(const t of n){const e=D.exec(t);if(e?.index&&e.index>0)return e.index}return 4}g(M,"inferSegmentWidth");function S(n,t){return n.replace(/\bline\s+(\d+)\b/gi,(e,r)=>{const s=parseInt(r,10),i=t.get(s);return i?`line ${i}`:e})}g(S,"remapErrorLines");function R(n){const t=n.split(`
|
|
2
2
|
`),e=new Map;let r=-1;for(const[p,c]of t.entries())if(c.trim()==="treeView-beta"){r=p;break}if(r===-1)return{text:n,lineMap:e};const s=[];for(let p=r+1;p<t.length;p++){const c=t[p];c.trim()===""||T.test(c)||N.test(c)||$.test(c)||s.push(c.replace(/\t/g," "))}if(!_(s))return{text:n,lineMap:e};const i=M(s),o=[];let a=0;for(let p=0;p<=r;p++)o.push(t[p]),a++,e.set(a,p+1);for(let p=r+1;p<t.length;p++){const c=t[p],d=c.trim(),h=p+1;if(d===""){o.push(c),a++,e.set(a,h);continue}if(T.test(c)){o.push(c),a++,e.set(a,h);continue}if(N.test(c)){o.push(c),a++,e.set(a,h);continue}if($.test(c))continue;const l=c.replace(/\t/g," "),w=D.exec(l);if(w?.index!==void 0){const f=w.index,m=Math.round(f/i)+1;let u=f+1;for(;u<l.length&&ne.test(l[u]);)u++;for(;u<l.length&&l[u]===" ";)u++;const v=l.slice(u).trimEnd();if(!v)throw new Error(`Line ${h}: Empty node — expected a filename or directory name after the box-drawing prefix`);const W=re.repeat(m);o.push(W+v),a++,e.set(a,h)}else{if(/^[\s─━│┃└┗├┣]+$/.test(l))continue;if(L.test(l))o.push(c),a++,e.set(a,h);else{if(/^\s+/.test(l))throw new Error(`Line ${h}: Unexpected indentation without box-drawing characters. In box-drawing format, use ├── or └── prefixes for indented nodes.`);o.push(c),a++,e.set(a,h)}}}return{text:o.join(`
|
|
3
3
|
`),lineMap:e}}g(R,"preprocessBoxDrawing");var x=new X(()=>({cnt:1,stack:[{id:0,level:-1,name:"/",nodeType:"directory",children:[]}]})),ie=g(()=>{x.reset(),j()},"clear"),oe=g(()=>x.records.stack[0],"getRoot"),se=g(()=>x.records.cnt,"getCount"),ae=Q.treeView,ce=g(()=>k(ae,E().treeView),"getConfig"),le=g((n,t,e,r,s,i)=>{for(;n<=x.records.stack[x.records.stack.length-1].level;)x.records.stack.pop();const o={id:x.records.cnt++,level:n,name:t,nodeType:e,icon:s,cssClass:r,description:i,children:[]};x.records.stack[x.records.stack.length-1].children.push(o),x.records.stack.push(o)},"addNode"),de={clear:ie,addNode:le,getRoot:oe,getCount:se,getConfig:ce,getAccTitle:Z,getAccDescription:F,getDiagramTitle:P,setAccDescription:Y,setAccTitle:G,setDiagramTitle:O},C=de,he=g(n=>{z(n,C);for(const t of n.nodes){const e=typeof t.indent=="number"?t.indent:0;let r=t.name;const s=r.endsWith("/");s&&(r=r.slice(0,-1));const i=s?"directory":"file",o=t.classAnnotation||void 0,a=t.iconAnnotation,p=a!==void 0?a||"none":void 0,c=t.descAnnotation||void 0,d=c?K(c,E()):void 0;C.addNode(e,r,i,o,p,d)}},"populate"),pe={parse:g(async n=>{const{text:t,lineMap:e}=R(n);try{const r=await te("treeView",t);A.debug(r),he(r)}catch(r){throw e.size>0&&r instanceof Error&&(r.message=S(r.message,e)),r}},"parse")},b={prefix:"mermaid-treeview",height:24,width:24,icons:{folder:{body:'<path fill="currentColor" d="M10.59 4.59A2 2 0 0 0 9.17 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.17z"/>'},file:{body:'<path fill="currentColor" fill-rule="evenodd" d="M6 2a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8.83a2 2 0 0 0-.59-1.42l-4.82-4.82A2 2 0 0 0 13.17 2H6Zm7.5 1.9l4.6 4.6h-3.6a1 1 0 0 1-1-1V3.9Z" clip-rule="evenodd"/>'}}};function H(n,t){const e=t?.filenameIcons?.[n];if(e)return e;const r=n.lastIndexOf(".");if(r>0){const s=n.substring(r).toLowerCase(),i=t?.extensionIcons;return i?.[s]??i?.[s.slice(1)]}}g(H,"detectIcon");function I(n,t){return n.includes(":")?n:n in b.icons||!t?`${b.prefix}:${n}`:`${t}:${n}`}g(I,"qualifyIcon");function B(n,t){if(n.icon!=="none"){if(n.icon)return I(n.icon,t.defaultIconPack);if(t.showIcons){if(n.nodeType==="file"){const e=H(n.name,t);if(e==="none")return;if(e)return I(e,t.defaultIconPack)}return`${b.prefix}:${n.nodeType==="directory"?"folder":"file"}`}}}g(B,"getNodeIcon");ee([{name:b.prefix,icons:b}]);var y=14,ge=4,fe=16,ue=g(async(n,t)=>{const e=[],r=g(i=>{const o=B(i,t);o&&e.push({icon:o,node:i}),i.children.forEach(r)},"collect");r(n);const s=await Promise.all(e.map(async({icon:i,node:o})=>({id:o.id,svg:await J(i,{height:y,width:y})})));return new Map(s.map(({id:i,svg:o})=>[i,o]))},"resolveNodeIcons"),we=g((n,t,e,r,s,i)=>{const o=r.append("g");let a="treeView-node-label";e.nodeType==="directory"&&(a+=" treeView-node-dir"),e.cssClass&&(a+=` ${e.cssClass}`);const p=y+ge,c=B(e,s),d=c!==void 0;c&&o.append("g").attr("class","treeView-node-icon").attr("transform",`translate(${n+s.paddingX}, ${t+s.paddingY})`).html(i.get(e.id)??"");const h=o.append("text").text(e.name).attr("dominant-baseline","middle").attr("class",a),{height:l,width:w}=h.node().getBBox(),f=l+s.paddingY*2,m=n+s.paddingX+(d?p:0);h.attr("x",m),h.attr("y",t+f/2);const u=m+w,v=w+s.paddingX*2+(d?p:0);return e.BBox={x:n,y:t,width:v,height:f},e.cssClass?.split(/\s+/).includes("highlight")&&o.insert("rect",":first-child").attr("x",n).attr("y",t+1).attr("width",0).attr("height",f-2).attr("rx",3).attr("class","treeView-highlight-bg"),{node:e,nodeGroup:o,labelRightEdge:u,centerY:t+f/2}},"positionLabel"),V=g((n,t,e,r,s,i)=>n.append("line").attr("x1",t).attr("y1",e).attr("x2",r).attr("y2",s).attr("stroke-width",i).attr("class","treeView-node-line"),"positionLine"),me=g((n,t,e,r)=>{let s=0,i=0;const o=[],a=g((d,h,l,w)=>{const f=w*(l.rowIndent+l.paddingX),m=we(f,s,h,d,l,r);o.push(m);const{height:u,width:v}=h.BBox;V(d,f-l.rowIndent,s+u/2,f,s+u/2,l.lineThickness),i=Math.max(i,f+v),s+=u},"drawNode"),p=g((d,h=0)=>{a(n,d,e,h),d.children.forEach(m=>{p(m,h+1)});const{x:l,y:w,height:f}=d.BBox;if(d.children.length){const{y:m,height:u}=d.children[d.children.length-1].BBox;V(n,l+e.paddingX,w+f,l+e.paddingX,m+u/2+e.lineThickness/2,e.lineThickness)}},"processNode");p(t);const c=o.filter(d=>d.node.description);if(c.length>0){const h=Math.max(...o.map(l=>l.labelRightEdge))+fe;for(const l of c){const f=l.nodeGroup.append("text").text(l.node.description).attr("dominant-baseline","middle").attr("class","treeView-node-description").attr("x",h).attr("y",l.centerY).node().getBBox();i=Math.max(i,h+f.width+e.paddingX)}}for(const d of o)if(d.node.cssClass?.split(/\s+/).includes("highlight")){const h=d.nodeGroup.select(".treeView-highlight-bg");if(!h.empty()){const l=i-d.node.BBox.x+8;h.attr("width",l),i=Math.max(i,d.node.BBox.x+l+2)}}return{totalHeight:s,totalWidth:i}},"drawTree"),xe=g(async(n,t,e,r)=>{A.debug(`Rendering treeView diagram
|
|
4
4
|
`+n);const s=r.db,i=s.getRoot(),o=s.getConfig(),a=q(t),p=a.append("g");p.attr("class","tree-view");const c=await ue(i,o),{totalHeight:d,totalWidth:h}=me(p,i,o,c);a.attr("viewBox",`-${o.lineThickness/2} 0 ${h} ${d}`),U(a,d,h,o.useMaxWidth)},"draw"),ve={draw:xe},be=ve,Ce={labelFontSize:"16px",labelColor:"black",lineColor:"black",iconColor:"#546e7a",descriptionColor:"#6a9955",highlightBg:"rgba(255, 193, 7, 0.15)",highlightStroke:"#ffc107"},Ie=g(({treeView:n})=>{const{labelFontSize:t,labelColor:e,lineColor:r,iconColor:s,descriptionColor:i,highlightBg:o,highlightStroke:a}=k(Ce,n);return`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as k,W as Qt,aH as zt,ad as ee,N as me,R as Jt,ax as Zt,aV as nt,aG as $t,aF as e1,aI as t1,L as s1,K as i1,O as r1,p as a1,ac as n1,J as u1,a7 as o1,P as rt,as as l1,k as c1,x as h1,aC as d1,i as p1}from"./
|
|
1
|
+
import{a as k,W as Qt,aH as zt,ad as ee,N as me,R as Jt,ax as Zt,aV as nt,aG as $t,aF as e1,aI as t1,L as s1,K as i1,O as r1,p as a1,ac as n1,J as u1,a7 as o1,P as rt,as as l1,k as c1,x as h1,aC as d1,i as p1}from"./BJ_6izfA.js";import{g as f1}from"./CPBiF1gr.js";import{g as g1}from"./DfiXlh8D.js";import{s as b1}from"./CFgK9GfH.js";import{c as A1}from"./CGwmPMQc.js";import{g as j,c3 as at}from"./CKI5DKl7.js";var k1="flowchart-",Te,m1=(Te=class{constructor(){this.vertexCounter=0,this.config=me(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=$t,this.setAccDescription=e1,this.setDiagramTitle=t1,this.getAccTitle=s1,this.getAccDescription=i1,this.getDiagramTitle=r1,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}sanitizeText(i){return a1.sanitizeText(i,this.config)}sanitizeNodeLabelType(i){switch(i){case"markdown":case"string":case"text":return i;default:return"markdown"}}setDiagramId(i){this.diagramId=i}lookUpDomId(i){for(const r of this.vertices.values())if(r.id===i)return this.diagramId?`${this.diagramId}-${r.domId}`:r.domId;return this.diagramId?`${this.diagramId}-${i}`:i}addVertex(i,r,a,n,c,g,l={},m){if(!i||i.trim().length===0)return;let p;if(m!==void 0){let u;m.includes(`
|
|
2
2
|
`)?u=m+`
|
|
3
3
|
`:u=`{
|
|
4
4
|
`+m+`
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{p as oe}from"./
|
|
1
|
+
import{p as oe}from"./BPC4nNQe.js";import{p as se,i as de}from"./udwHGMln.js";import{O as le,aI as ce,aF as me,K as ue,L as xe,aG as fe,a as o,ad as h,N as ne,aL as ge,k as he,j as pe,M as A,y as ve,aD as B,aX as M,f as be}from"./BJ_6izfA.js";import{c3 as we,g as d}from"./CKI5DKl7.js";var ae="position frame",ie="frame positioned",k="position relation",re="relation positioned",ye=o(function(e){h.debug("options str",e)},"setOptions"),Pe=o(function(){return{}},"getOptions"),Se=o(function(){R(),he()},"clear");function R(){D={}}d(R,"reset");o(R,"reset");var Fe=ve.eventmodeling,Be=o(()=>pe({...Fe,...A().eventmodeling}),"getConfig"),D={};function N(){let e=Me;const{ast:n}=D,t=P();if(!n)throw new Error("No data for EventModel");return n.frames.forEach((a,i)=>{const r=H(a,n.dataEntities,t);e=w(e,{$kind:ae,index:i,frame:a,textProps:r});let l;X(a)?(h.debug("source frame",a.sourceFrames),l=n.frames.filter(c=>a.sourceFrames.some(m=>m.$refText===c.name)),l.forEach(c=>{e=w(e,{$kind:k,index:i,frame:a,sourceFrame:c})})):e=w(e,{$kind:k,index:i,frame:a})}),e={...e,sortedSwimlanesArray:S(e.swimlanes)},e}d(N,"getState");o(N,"getState");function T(e){D.ast=e}d(T,"setAst");o(T,"setAst");var s={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:"bold",boxTextPadding:10,swimlaneTextFontWeight:"bold",labelUiAutomation:"UI/Automation",labelUiAutomationPrefix:"UI/A: ",labelCommandReadModel:"Command/Read Model",labelCommandReadModelPrefix:"C/RM: ",labelEvents:"Events",labelEventsPrefix:"Stream: "};function P(){return s}d(P,"getDiagramProps");o(P,"getDiagramProps");var Me={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function $(e){const n=e.split(".");if(n.length===2)return n[0]}d($,"extractNamespace");o($,"extractNamespace");function C(e){const n=e.split(".");return n.length===2?n[1]:e}d(C,"extractName");o(C,"extractName");function I(e,n){if(!(!n||n.length===0))return Object.values(e).find(t=>t.namespace===n)}d(I,"findSwimlaneByNamespace");o(I,"findSwimlaneByNamespace");function b(e,n,t){return Math.max(n,...Object.keys(e).filter(a=>{const i=Number.parseInt(a);return i>n&&i<t}).map(a=>Number.parseInt(a)))+1}d(b,"findNextAvailableIndex");o(b,"findNextAvailableIndex");function O(e,n){const t=$(e.entityIdentifier),a=I(n,t);switch(e.modelEntityType){case"ui":case"pcr":case"processor":return a?{index:a.index,label:a.namespace||s.labelUiAutomation}:t?{index:b(n,0,100),label:s.labelUiAutomationPrefix+t}:{index:0,label:s.labelUiAutomation};case"rmo":case"readmodel":case"cmd":case"command":return a?{index:a.index,label:a.namespace||s.labelCommandReadModel}:t?{index:b(n,100,200),label:s.labelCommandReadModelPrefix+t}:{index:100,label:s.labelCommandReadModel};case"evt":case"event":default:return a?{index:a.index,label:a.namespace||s.labelEvents}:t?{index:b(n,200,300),label:s.labelEventsPrefix+t}:{index:200,label:s.labelEvents}}}d(O,"calculateSwimlaneProps");o(O,"calculateSwimlaneProps");function W(e){const{themeVariables:n}=A();switch(e.modelEntityType){case"ui":return{fill:n.emUiFill??"white",stroke:n.emUiStroke??"#dbdada"};case"pcr":case"processor":return{fill:n.emProcessorFill??"#edb3f6",stroke:n.emProcessorStroke??"#b88cbf"};case"rmo":case"readmodel":return{fill:n.emReadModelFill??"#d3f1a2",stroke:n.emReadModelStroke??"#a3b732"};case"cmd":case"command":return{fill:n.emCommandFill??"#bcd6fe",stroke:n.emCommandStroke??"#679ac3"};case"evt":case"event":return{fill:n.emEventFill??"#ffb778",stroke:n.emEventStroke??"#c19a0f"};default:return{fill:"red",stroke:"black"}}}d(W,"calculateEntityVisualProps");o(W,"calculateEntityVisualProps");function H(e,n,t){const a=A(),i=B(C(e.entityIdentifier)??"",a);let r;const l={fontSize:16,fontWeight:700,fontFamily:'"trebuchet ms", verdana, arial, sans-serif',joinWith:"<br/>"};let m=`<b>${M(i,t.textMaxWidth,l)}</b>`;if(e.dataInlineValue&&(r=e.dataInlineValue,r=r.substring(r.indexOf("{")+1),r=r.substring(0,r.lastIndexOf("}")-1),r=B(r,a),r=M(r,t.textMaxWidth,l),r=r.replaceAll(" "," ")),e.dataReference){const v=n.find(F=>F.name===e.dataReference?.$refText);v&&(r=v.dataBlockValue,r=r.substring(r.indexOf(`{
|
|
2
2
|
`)+2),r=r.substring(0,r.lastIndexOf("}")-1),r=B(r,a),r=M(r,t.textMaxWidth,l),r=r.replaceAll(" "," "),r+="<br/>")}const u=r!==void 0;u&&(m+=`<br/><br/><code style="text-align: left; display: block;max-width:${t.textMaxWidth}px">${r}</code>`);const f={fontSize:l.fontSize,fontWeight:l.fontWeight,fontFamily:l.fontFamily},x=be(m,f),p=u?x.width/3:x.width,g={content:m,width:p,height:x.height};return h.debug(`[${e.name}] ${e.entityIdentifier} text`,g),g}d(H,"calculateTextProps");o(H,"calculateTextProps");function U(e,n){const t=n,a=W(t.frame),i={width:t.textProps.width+2*s.boxTextPadding,height:t.textProps.height+2*s.boxTextPadding};return[{$kind:ie,frame:t.frame,index:t.index,visual:a,dimension:i,textProps:t.textProps}]}d(U,"decidePositionFrame");o(U,"decidePositionFrame");function L(e,n,t){return n===void 0?s.contentStartX:n.index===e.index&&e.r?e.r+s.boxPadding:t===void 0?s.contentStartX:t.r-s.boxOverlap+s.boxPadding}d(L,"calculateX");o(L,"calculateX");function _(e,n){const t=[...e.map(a=>a.r),n];return Math.max(...t)}d(_,"calculateMaxRight");o(_,"calculateMaxRight");function S(e){return Object.values(e).sort((n,t)=>n.index-t.index)}d(S,"sortedSwimlanesArray");o(S,"sortedSwimlanesArray");function G(e,n){const t=n,a=O(t.frame,e.swimlanes);let i;a.index in e.swimlanes?i=e.swimlanes[a.index]:i={index:a.index,label:a.label,r:0,y:a.index*s.swimlaneMinHeight+s.swimlaneGap,height:s.swimlaneMinHeight,maxHeight:s.swimlaneMinHeight};const r=e.boxes.length>0?e.boxes[e.boxes.length-1]:void 0,l=e.previousSwimlaneNumber!==void 0?e.swimlanes[e.previousSwimlaneNumber]:void 0,c={width:Math.max(s.boxMinWidth,Math.min(s.boxMaxWidth,t.dimension.width))+2*s.boxPadding,height:Math.max(s.boxMinHeight,Math.min(s.boxMaxHeight,t.dimension.height))+2*s.boxPadding},m=L(i,l,r),u=m+c.width+s.boxPadding,f=_(Object.values(e.swimlanes),u);i.r=m+c.width,i.maxHeight=Math.max(i.maxHeight,c.height),i.height=Math.max(s.swimlaneMinHeight,i.maxHeight)+2*s.swimlanePadding;const x={x:m,y:s.swimlanePadding+i.y,r:u,dimension:c,leftSibling:!1,swimlane:i,visual:t.visual,text:t.textProps.content,frame:t.frame,index:t.index},p={...e,boxes:[...e.boxes,x],swimlanes:{...e.swimlanes,[`${i.index}`]:i},previousSwimlaneNumber:a.index,previousFrame:t.frame,maxR:f},g=S(p.swimlanes);g.length>0&&(g[0].y=0);for(let v=1;v<g.length;v++){const F=g[v],te=g[v-1];F.y=te.y+te.height+s.swimlaneGap}return p}d(G,"evolveFramePositioned");o(G,"evolveFramePositioned");function V(e,n){return e===0&&n.sourceFrames.length===0}d(V,"isFirstFrame");o(V,"isFirstFrame");function X(e){return e.sourceFrames!==void 0&&e.sourceFrames!==null&&e.sourceFrames.length>0}d(X,"hasSourceFrame");o(X,"hasSourceFrame");function y(e,n){if(n!=null)return e.find(t=>t.frame.name===n.name)}d(y,"findBoxByFrame");o(y,"findBoxByFrame");function j(e,n,t){if(!(t<0))for(let a=t;a>=0;a--){const i=e[a];if(i.swimlane.index!==n)return i}}d(j,"findBoxByLineIndex");o(j,"findBoxByLineIndex");function Y(e,n){const t=n;if(de(t.frame)||V(t.index,t.frame))return[];const a=y(e.boxes,t.frame);if(a===void 0)throw new Error(`Target box not found for frame ${t.frame.name}`);let i;return t.sourceFrame?i=y(e.boxes,t.sourceFrame):i=j(e.boxes,a.swimlane.index,t.index-1),i===void 0?[]:[{$kind:re,frame:t.frame,index:t.index,sourceBox:i,targetBox:a}]}d(Y,"decidePositionRelation");o(Y,"decidePositionRelation");function K(e,n){const t=n,a={visual:{fill:"none",stroke:"#000"},source:{x:t.sourceBox.x,y:t.sourceBox.y},target:{x:t.targetBox.x,y:t.targetBox.y},sourceBox:t.sourceBox,targetBox:t.targetBox};return{...e,relations:[...e.relations,a]}}d(K,"evolveRelationPositioned");o(K,"evolveRelationPositioned");var ke={[ae]:U,[k]:Y},Ee={[ie]:G,[re]:K};function z(e,n){const t=ke[n.$kind];if(t==null)return[];const a=t(e,n);return h.debug("decided events",a),a}d(z,"decide");o(z,"decide");function q(e,n){const t=n.reduce((a,i)=>{const r=Ee[i.$kind];return r==null?a:r(a,i)},e);return h.debug("evolve events",{state:e,newState:t,events:n}),t}d(q,"evolve");o(q,"evolve");function w(e,n){const t=z(e,n);return q(e,t)}d(w,"dispatch");o(w,"dispatch");var E={getConfig:Be,setOptions:ye,getOptions:Pe,clear:Se,setAccTitle:fe,getAccTitle:xe,getAccDescription:ue,setAccDescription:me,setDiagramTitle:ce,getDiagramTitle:le,setAst:T,getDiagramProps:P,getState:N},Ae={parse:o(async e=>{const n=await se("eventmodeling",e);h.debug(n),E.setAst(n),oe(n,E)},"parse")},Re=ne(),De=Re?.eventmodeling;function J(e,n){return t=>{const a=t.swimlane.y+n.swimlanePadding,i=e.append("g").attr("class","em-box");i.append("rect").attr("x",t.x).attr("y",a).attr("rx","3").attr("width",t.dimension.width).attr("height",t.dimension.height).attr("stroke",t.visual.stroke).attr("fill",t.visual.fill),i.append("foreignObject").attr("x",t.x+n.boxPadding).attr("y",a+10).attr("width",t.dimension.width-2*n.boxPadding).attr("height",t.dimension.height-2*n.boxPadding).append("xhtml:div").style("display","table").style("height","100%").style("width","100%").append("span").style("display","table-cell").style("text-align","center").style("vertical-align","middle").html(t.text)}}d(J,"renderD3Box");o(J,"renderD3Box");function Q(e,n){return e>n}d(Q,"dirUpwards");o(Q,"dirUpwards");function Z(e,n,t,a){return i=>{const r=i.sourceBox.swimlane.y+n.swimlanePadding,l=i.targetBox.swimlane.y+n.swimlanePadding,c=Q(r,l),m=i.sourceBox.x+i.sourceBox.dimension.width*2/3,u=i.targetBox.x+i.targetBox.dimension.width/3;let f,x;h.debug(`rendering relation up=${c} for `,{sourceBox:i.sourceBox,targetBox:i.targetBox}),c?(f=r,x=l+i.targetBox.dimension.height):(f=r+i.sourceBox.dimension.height,x=l);const p=a.emRelationStroke??i.visual.stroke;e.append("path").attr("class","em-relation").attr("fill",i.visual.fill).attr("stroke",p).attr("stroke-width","1").attr("marker-end",`url(#${t})`).attr("d",`M${m} ${f} L${u} ${x}`)}}d(Z,"renderD3Relation");o(Z,"renderD3Relation");function ee(e,n,t,a){return i=>{const r=e.append("g").attr("class","em-swimlane"),l=a.emSwimlaneBackgroundOdd??"rgb(250,250,250)",c=a.emSwimlaneBackgroundStroke??"rgb(240,240,240)";r.append("rect").attr("x",0).attr("y",i.y).attr("rx","3").attr("width",n+t.swimlanePadding).attr("height",i.height).attr("fill",l).attr("stroke",c),r.append("text").attr("font-weight",t.swimlaneTextFontWeight).attr("x",30).attr("y",i.y+30).text(i.label)}}d(ee,"renderD3Swimlane");o(ee,"renderD3Swimlane");var Ne=o(function(e,n,t,a){if(h.debug("in eventmodeling renderer",e+`
|
|
3
3
|
`,"id:",n,t),!De)throw new Error("EventModeling config not found");const i=a.db,{themeVariables:r,eventmodeling:l}=ne(),c=we(`[id="${n}"]`),m=i.getDiagramProps(),u=i.getState(),f=`em-arrowhead-${n}`,x=r.emArrowhead??"#000000";u.sortedSwimlanesArray.forEach(ee(c,u.maxR,m,r)),u.boxes.forEach(J(c,m)),u.relations.forEach(Z(c,m,f,r)),c.append("defs").append("marker").attr("id",f).attr("markerWidth","10").attr("markerHeight","7").attr("refX","10").attr("refY","3.5").attr("orient","auto").append("polygon").attr("points","0 0, 10 3.5, 0 7").attr("fill",x),ge(void 0,c,l?.padding??30,l?.useMaxWidth)},"draw"),Te={draw:Ne},$e=o(e=>"","getStyles"),Ce=$e,Ue={parser:Ae,db:E,renderer:Te,styles:Ce};export{Ue as diagram};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as i,c3 as l,bA as d,aA as o}from"./
|
|
1
|
+
import{f as i,c3 as l,bA as d,aA as o}from"./CKI5DKl7.js";var x=i((r,t)=>{const e=r.append("rect");if(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),t.name&&e.attr("name",t.name),t.rx&&e.attr("rx",t.rx),t.ry&&e.attr("ry",t.ry),t.attrs!==void 0)for(const s in t.attrs)e.attr(s,t.attrs[s]);return t.class&&e.attr("class",t.class),e},"drawRect"),p=i((r,t)=>{const e={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"};x(r,e).lower()},"drawBackgroundRect"),y=i((r,t)=>{const e=t.text.replace(d," "),s=r.append("text");s.attr("x",t.x),s.attr("y",t.y),s.attr("class","legend"),s.style("text-anchor",t.anchor),t.class&&s.attr("class",t.class);const a=s.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.text(e),s},"drawText"),m=i((r,t,e,s)=>{const a=r.append("image");a.attr("x",t),a.attr("y",e);const n=o.sanitizeUrl(s);a.attr("xlink:href",n)},"drawImage"),g=i((r,t,e,s)=>{const a=r.append("use");a.attr("x",t),a.attr("y",e);const n=o.sanitizeUrl(s);a.attr("xlink:href",`#${n}`)},"drawEmbeddedImage"),f=i(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),h=i(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),w=i(()=>{let r=l(".mermaidTooltip");return r.empty()&&(r=l("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),r},"createTooltip");export{g as a,m as b,w as c,p as d,x as e,y as f,f as g,h};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as R,s as W,S as N}from"./mkPaye9m.js";import{l as P}from"./CS5VoVeF.js";import{a as f,N as t,ad as S,r as U,G as _,p as z,V as C,aV as F}from"./CnWtv34Y.js";import{c3 as H,bz as O,ae as J}from"./BQY3g8uE.js";import"./DZKVhZfO.js";var X=f(e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),"drawStartState"),D=f(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),Y=f((e,i)=>{const d=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),c=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c.width+2*t().state.padding).attr("height",c.height+2*t().state.padding).attr("rx",t().state.radius),d},"drawSimpleState"),I=f((e,i)=>{const d=f(function(o,B,y){const v=o.append("tspan").attr("x",2*t().state.padding).text(B);y||v.attr("dy",t().state.textHeight)},"addTspan"),n=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),l=n.height,p=e.append("text").attr("x",t().state.padding).attr("y",l+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,s=!0;i.descriptions.forEach(function(o){a||(d(p,o,s),s=!1),a=!1});const m=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+l+t().state.dividerMargin/2).attr("y2",t().state.padding+l+t().state.dividerMargin/2).attr("class","descr-divider"),x=p.node().getBBox(),g=Math.max(x.width,n.width);return m.attr("x2",g+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",g+2*t().state.padding).attr("height",x.height+l+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),$=f((e,i,d)=>{const c=t().state.padding,n=2*t().state.padding,l=e.node().getBBox(),p=l.width,a=l.x,s=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),x=s.node().getBBox().width+n;let g=Math.max(x,p);g===p&&(g=g+n);let o;const B=e.node().getBBox();i.doc,o=a-c,x>p&&(o=(p-g)/2+c),Math.abs(a-B.x)<c&&x>p&&(o=a-(x-p)/2);const y=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",o).attr("y",y).attr("class",d?"alt-composit":"composit").attr("width",g).attr("height",B.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",o+c),x<=p&&s.attr("x",a+(g-n)/2-x/2+c),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",B.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),V=f(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),q=f((e,i)=>{let d=t().state.forkWidth,c=t().state.forkHeight;if(i.parentId){let n=d;d=c,c=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",c).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),Z=f((e,i,d,c)=>{let n=0;const l=c.append("text");l.style("text-anchor","start"),l.attr("class","noteText");let p=e.replace(/\r\n/g,"<br/>");p=p.replace(/\n/g,"<br/>");const a=p.split(z.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const m of a){const x=m.trim();if(x.length>0){const g=l.append("tspan");if(g.text(x),s===0){const o=g.node().getBBox();s+=o.height}n+=s,g.attr("x",i+t().state.noteMargin),g.attr("y",d+n+1.25*t().state.noteMargin)}}return{textWidth:l.node().getBBox().width,textHeight:n}},"_drawLongText"),j=f((e,i)=>{i.attr("class","state-note");const d=i.append("rect").attr("x",0).attr("y",t().state.padding),c=i.append("g"),{textWidth:n,textHeight:l}=Z(e,0,0,c);return d.attr("height",l+2*t().state.noteMargin),d.attr("width",n+t().state.noteMargin*2),d},"drawNote"),L=f(function(e,i){const d=i.id,c={id:d,label:i.id,width:0,height:0},n=e.append("g").attr("id",d).attr("class","stateGroup");i.type==="start"&&X(n),i.type==="end"&&V(n),(i.type==="fork"||i.type==="join")&&q(n,i),i.type==="note"&&j(i.note.text,n),i.type==="divider"&&D(n),i.type==="default"&&i.descriptions.length===0&&Y(n,i),i.type==="default"&&i.descriptions.length>0&&I(n,i);const l=n.node().getBBox();return c.width=l.width+2*t().state.padding,c.height=l.height+2*t().state.padding,c},"drawState"),G=0,K=f(function(e,i,d){const c=f(function(s){switch(s){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(s=>!Number.isNaN(s.y));const n=i.points,l=O().x(function(s){return s.x}).y(function(s){return s.y}).curve(J),p=e.append("path").attr("d",l(n)).attr("id","edge"+G).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=C(!0)),p.attr("marker-end","url("+a+"#"+c(N.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:m,y:x}=F.calcLabelPosition(i.points),g=z.getRows(d.title);let o=0;const B=[];let y=0,v=0;for(let u=0;u<=g.length;u++){const h=s.append("text").attr("text-anchor","middle").text(g[u]).attr("x",m).attr("y",x+o),w=h.node().getBBox();y=Math.max(y,w.width),v=Math.min(v,w.x),S.info(w.x,m,x+o),o===0&&(o=h.node().getBBox().height,S.info("Title height",o,x)),B.push(h)}let k=o*g.length;if(g.length>1){const u=(g.length-1)*o*.5;B.forEach((h,w)=>h.attr("y",x+w*o-u)),k=o*g.length}const r=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",m-y/2-t().state.padding/2).attr("y",x-k/2-t().state.padding/2-3.5).attr("width",y+t().state.padding).attr("height",k+t().state.padding),S.info(r)}G++},"drawEdge"),b,T={},Q=f(function(){},"setConf"),tt=f(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),et=f(function(e,i,d,c){b=t().state;const n=t().securityLevel;let l;n==="sandbox"&&(l=H("#i"+i));const p=n==="sandbox"?H(l.nodes()[0].contentDocument.body):H("body"),a=n==="sandbox"?l.nodes()[0].contentDocument:document;S.debug("Rendering diagram "+e);const s=p.select(`[id='${i}']`);tt(s);const m=c.db.getRootDoc(),x=s.append("g").attr("id",i+"-root");A(m,x,void 0,!1,p,a,c);const g=b.padding,o=s.node().getBBox(),B=o.width+g*2,y=o.height+g*2,v=B*1.75;U(s,y,v,b.useMaxWidth),s.attr("viewBox",`${o.x-b.padding} ${o.y-b.padding} `+B+" "+y)},"draw"),at=f(e=>e?e.length*b.fontSizeFactor:1,"getLabelWidth"),A=f((e,i,d,c,n,l,p)=>{const a=new _({compound:!0,multigraph:!0});let s,m=!0;for(s=0;s<e.length;s++)if(e[s].stmt==="relation"){m=!1;break}d?a.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:m?1:b.edgeLengthFactor,nodeSep:m?1:50,isMultiGraph:!0}):a.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:m?1:b.edgeLengthFactor,nodeSep:m?1:50,ranker:"tight-tree",isMultiGraph:!0}),a.setDefaultEdgeLabel(function(){return{}});const x=p.db.getStates(),g=p.db.getRelations(),o=Object.keys(x);for(const r of o){const u=x[r];d&&(u.parentId=d);let h;if(u.doc){let w=i.append("g").attr("id",u.id).attr("class","stateGroup");h=A(u.doc,w,u.id,!c,n,l,p);{w=$(w,u,c);let E=w.node().getBBox();h.width=E.width,h.height=E.height+b.padding/2,T[u.id]={y:b.compositTitleSize}}}else h=L(i,u,a);if(u.note){const w={descriptions:[],id:u.id+"-note",note:u.note,type:"note"},E=L(i,w,a);u.note.position==="left of"?(a.setNode(h.id+"-note",E),a.setNode(h.id,h)):(a.setNode(h.id,h),a.setNode(h.id+"-note",E)),a.setParent(h.id,h.id+"-group"),a.setParent(h.id+"-note",h.id+"-group")}else a.setNode(h.id,h)}S.debug("Count=",a.nodeCount(),a);let B=0;g.forEach(function(r){B++,S.debug("Setting edge",r),a.setEdge(r.id1,r.id2,{relation:r,width:at(r.title),height:b.labelHeight*z.getRows(r.title).length,labelpos:"c"},"id"+B)}),P(a),S.debug("Graph after layout",a.nodes());const y=i.node();a.nodes().forEach(function(r){r!==void 0&&a.node(r)!==void 0?(S.warn("Node "+r+": "+JSON.stringify(a.node(r))),n.select("#"+y.id+" #"+r).attr("transform","translate("+(a.node(r).x-a.node(r).width/2)+","+(a.node(r).y+(T[r]?T[r].y:0)-a.node(r).height/2)+" )"),n.select("#"+y.id+" #"+r).attr("data-x-shift",a.node(r).x-a.node(r).width/2),l.querySelectorAll("#"+y.id+" #"+r+" .divider").forEach(h=>{const w=h.parentElement;let E=0,M=0;w&&(w.parentElement&&(E=w.parentElement.getBBox().width),M=parseInt(w.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),h.setAttribute("x1",0-M+8),h.setAttribute("x2",E-M-8)})):S.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let v=y.getBBox();a.edges().forEach(function(r){r!==void 0&&a.edge(r)!==void 0&&(S.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(a.edge(r))),K(i,a.edge(r),a.edge(r).relation))}),v=y.getBBox();const k={id:d||"root",label:d||"root",width:0,height:0};return k.width=v.width+2*b.padding,k.height=v.height+2*b.padding,S.debug("Doc rendered",k,a),k},"renderDoc"),it={setConf:Q,draw:et},ct={parser:W,get db(){return new N(1)},renderer:it,styles:R,init:f(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{ct as diagram};
|
|
1
|
+
import{b as R,s as W,S as N}from"./BIDHEGct.js";import{l as P}from"./Cn23SDXY.js";import{a as f,N as t,ad as S,r as U,G as _,p as z,V as C,aV as F}from"./BJ_6izfA.js";import{c3 as H,bz as O,ae as J}from"./CKI5DKl7.js";import"./CGwmPMQc.js";var X=f(e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),"drawStartState"),D=f(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),Y=f((e,i)=>{const d=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),c=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c.width+2*t().state.padding).attr("height",c.height+2*t().state.padding).attr("rx",t().state.radius),d},"drawSimpleState"),I=f((e,i)=>{const d=f(function(o,B,y){const v=o.append("tspan").attr("x",2*t().state.padding).text(B);y||v.attr("dy",t().state.textHeight)},"addTspan"),n=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),l=n.height,p=e.append("text").attr("x",t().state.padding).attr("y",l+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,s=!0;i.descriptions.forEach(function(o){a||(d(p,o,s),s=!1),a=!1});const m=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+l+t().state.dividerMargin/2).attr("y2",t().state.padding+l+t().state.dividerMargin/2).attr("class","descr-divider"),x=p.node().getBBox(),g=Math.max(x.width,n.width);return m.attr("x2",g+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",g+2*t().state.padding).attr("height",x.height+l+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),$=f((e,i,d)=>{const c=t().state.padding,n=2*t().state.padding,l=e.node().getBBox(),p=l.width,a=l.x,s=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),x=s.node().getBBox().width+n;let g=Math.max(x,p);g===p&&(g=g+n);let o;const B=e.node().getBBox();i.doc,o=a-c,x>p&&(o=(p-g)/2+c),Math.abs(a-B.x)<c&&x>p&&(o=a-(x-p)/2);const y=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",o).attr("y",y).attr("class",d?"alt-composit":"composit").attr("width",g).attr("height",B.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",o+c),x<=p&&s.attr("x",a+(g-n)/2-x/2+c),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",B.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),V=f(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),q=f((e,i)=>{let d=t().state.forkWidth,c=t().state.forkHeight;if(i.parentId){let n=d;d=c,c=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",c).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),Z=f((e,i,d,c)=>{let n=0;const l=c.append("text");l.style("text-anchor","start"),l.attr("class","noteText");let p=e.replace(/\r\n/g,"<br/>");p=p.replace(/\n/g,"<br/>");const a=p.split(z.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const m of a){const x=m.trim();if(x.length>0){const g=l.append("tspan");if(g.text(x),s===0){const o=g.node().getBBox();s+=o.height}n+=s,g.attr("x",i+t().state.noteMargin),g.attr("y",d+n+1.25*t().state.noteMargin)}}return{textWidth:l.node().getBBox().width,textHeight:n}},"_drawLongText"),j=f((e,i)=>{i.attr("class","state-note");const d=i.append("rect").attr("x",0).attr("y",t().state.padding),c=i.append("g"),{textWidth:n,textHeight:l}=Z(e,0,0,c);return d.attr("height",l+2*t().state.noteMargin),d.attr("width",n+t().state.noteMargin*2),d},"drawNote"),L=f(function(e,i){const d=i.id,c={id:d,label:i.id,width:0,height:0},n=e.append("g").attr("id",d).attr("class","stateGroup");i.type==="start"&&X(n),i.type==="end"&&V(n),(i.type==="fork"||i.type==="join")&&q(n,i),i.type==="note"&&j(i.note.text,n),i.type==="divider"&&D(n),i.type==="default"&&i.descriptions.length===0&&Y(n,i),i.type==="default"&&i.descriptions.length>0&&I(n,i);const l=n.node().getBBox();return c.width=l.width+2*t().state.padding,c.height=l.height+2*t().state.padding,c},"drawState"),G=0,K=f(function(e,i,d){const c=f(function(s){switch(s){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(s=>!Number.isNaN(s.y));const n=i.points,l=O().x(function(s){return s.x}).y(function(s){return s.y}).curve(J),p=e.append("path").attr("d",l(n)).attr("id","edge"+G).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=C(!0)),p.attr("marker-end","url("+a+"#"+c(N.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:m,y:x}=F.calcLabelPosition(i.points),g=z.getRows(d.title);let o=0;const B=[];let y=0,v=0;for(let u=0;u<=g.length;u++){const h=s.append("text").attr("text-anchor","middle").text(g[u]).attr("x",m).attr("y",x+o),w=h.node().getBBox();y=Math.max(y,w.width),v=Math.min(v,w.x),S.info(w.x,m,x+o),o===0&&(o=h.node().getBBox().height,S.info("Title height",o,x)),B.push(h)}let k=o*g.length;if(g.length>1){const u=(g.length-1)*o*.5;B.forEach((h,w)=>h.attr("y",x+w*o-u)),k=o*g.length}const r=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",m-y/2-t().state.padding/2).attr("y",x-k/2-t().state.padding/2-3.5).attr("width",y+t().state.padding).attr("height",k+t().state.padding),S.info(r)}G++},"drawEdge"),b,T={},Q=f(function(){},"setConf"),tt=f(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),et=f(function(e,i,d,c){b=t().state;const n=t().securityLevel;let l;n==="sandbox"&&(l=H("#i"+i));const p=n==="sandbox"?H(l.nodes()[0].contentDocument.body):H("body"),a=n==="sandbox"?l.nodes()[0].contentDocument:document;S.debug("Rendering diagram "+e);const s=p.select(`[id='${i}']`);tt(s);const m=c.db.getRootDoc(),x=s.append("g").attr("id",i+"-root");A(m,x,void 0,!1,p,a,c);const g=b.padding,o=s.node().getBBox(),B=o.width+g*2,y=o.height+g*2,v=B*1.75;U(s,y,v,b.useMaxWidth),s.attr("viewBox",`${o.x-b.padding} ${o.y-b.padding} `+B+" "+y)},"draw"),at=f(e=>e?e.length*b.fontSizeFactor:1,"getLabelWidth"),A=f((e,i,d,c,n,l,p)=>{const a=new _({compound:!0,multigraph:!0});let s,m=!0;for(s=0;s<e.length;s++)if(e[s].stmt==="relation"){m=!1;break}d?a.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:m?1:b.edgeLengthFactor,nodeSep:m?1:50,isMultiGraph:!0}):a.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:m?1:b.edgeLengthFactor,nodeSep:m?1:50,ranker:"tight-tree",isMultiGraph:!0}),a.setDefaultEdgeLabel(function(){return{}});const x=p.db.getStates(),g=p.db.getRelations(),o=Object.keys(x);for(const r of o){const u=x[r];d&&(u.parentId=d);let h;if(u.doc){let w=i.append("g").attr("id",u.id).attr("class","stateGroup");h=A(u.doc,w,u.id,!c,n,l,p);{w=$(w,u,c);let E=w.node().getBBox();h.width=E.width,h.height=E.height+b.padding/2,T[u.id]={y:b.compositTitleSize}}}else h=L(i,u,a);if(u.note){const w={descriptions:[],id:u.id+"-note",note:u.note,type:"note"},E=L(i,w,a);u.note.position==="left of"?(a.setNode(h.id+"-note",E),a.setNode(h.id,h)):(a.setNode(h.id,h),a.setNode(h.id+"-note",E)),a.setParent(h.id,h.id+"-group"),a.setParent(h.id+"-note",h.id+"-group")}else a.setNode(h.id,h)}S.debug("Count=",a.nodeCount(),a);let B=0;g.forEach(function(r){B++,S.debug("Setting edge",r),a.setEdge(r.id1,r.id2,{relation:r,width:at(r.title),height:b.labelHeight*z.getRows(r.title).length,labelpos:"c"},"id"+B)}),P(a),S.debug("Graph after layout",a.nodes());const y=i.node();a.nodes().forEach(function(r){r!==void 0&&a.node(r)!==void 0?(S.warn("Node "+r+": "+JSON.stringify(a.node(r))),n.select("#"+y.id+" #"+r).attr("transform","translate("+(a.node(r).x-a.node(r).width/2)+","+(a.node(r).y+(T[r]?T[r].y:0)-a.node(r).height/2)+" )"),n.select("#"+y.id+" #"+r).attr("data-x-shift",a.node(r).x-a.node(r).width/2),l.querySelectorAll("#"+y.id+" #"+r+" .divider").forEach(h=>{const w=h.parentElement;let E=0,M=0;w&&(w.parentElement&&(E=w.parentElement.getBBox().width),M=parseInt(w.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),h.setAttribute("x1",0-M+8),h.setAttribute("x2",E-M-8)})):S.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let v=y.getBBox();a.edges().forEach(function(r){r!==void 0&&a.edge(r)!==void 0&&(S.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(a.edge(r))),K(i,a.edge(r),a.edge(r).relation))}),v=y.getBBox();const k={id:d||"root",label:d||"root",width:0,height:0};return k.width=v.width+2*b.padding,k.height=v.height+2*b.padding,S.debug("Doc rendered",k,a),k},"renderDoc"),it={setConf:Q,draw:et},ct={parser:W,get db(){return new N(1)},renderer:it,styles:R,init:f(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{ct as diagram};
|