@intent-hq/web 2.310.1 → 2.310.3
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/assets/{DiagramPresentation.fimBl1wP.css → DiagramPresentation.Bfi3xHm0.css} +1 -1
- package/web/app/immutable/chunks/-xK_vQQs.js +1 -0
- package/web/app/immutable/chunks/{CeEeQIAV.js → 2rlMb19F.js} +1 -1
- package/web/app/immutable/chunks/{Bhcwd2SW.js → 6Z5k9P1U.js} +4 -4
- package/web/app/immutable/chunks/7xAw-BT0.js +213 -0
- package/web/app/immutable/chunks/{t3bi-ExW.js → B1s3oEqm.js} +2 -2
- package/web/app/immutable/chunks/{phowbgF-.js → B2JLNOy6.js} +1 -1
- package/web/app/immutable/chunks/B53WwE3a.js +1 -0
- package/web/app/immutable/chunks/{R7gFhaG_.js → B7VncZW5.js} +1 -1
- package/web/app/immutable/chunks/{EZw3rvya.js → B7s4-XTz.js} +30 -30
- package/web/app/immutable/chunks/{DOHtPCK9.js → BDPXN-l5.js} +1 -1
- package/web/app/immutable/chunks/{zXW6V5sa.js → BENBNSN7.js} +1 -1
- package/web/app/immutable/chunks/{DevHtnbn.js → BFXzH5IE.js} +1 -1
- package/web/app/immutable/chunks/BGcL9rs9.js +217 -0
- package/web/app/immutable/chunks/BHnD9zfx.js +99 -0
- package/web/app/immutable/chunks/{qMHHnffV.js → BI_SwxaN.js} +1 -1
- package/web/app/immutable/chunks/{BV9p4X5I.js → BMMFveB2.js} +6 -6
- package/web/app/immutable/chunks/BP6OqM9o.js +1 -0
- package/web/app/immutable/chunks/BRvgBsbx.js +291 -0
- package/web/app/immutable/chunks/{Cuozo7M1.js → BSel_zEu.js} +1 -1
- package/web/app/immutable/chunks/{B4dTn6xv.js → BUlPMLws.js} +1 -1
- package/web/app/immutable/chunks/{xMirTl3q.js → BYxB_o2p.js} +2 -2
- package/web/app/immutable/chunks/{CsYRAdgB.js → B_mbXOka.js} +1 -1
- package/web/app/immutable/chunks/BakMVsPT.js +2 -0
- package/web/app/immutable/chunks/{DeopB2f-.js → Bd0N6Q84.js} +3 -3
- package/web/app/immutable/chunks/{CHH2PtZ7.js → BfPWAh77.js} +1 -1
- package/web/app/immutable/chunks/BfZK-g4H.js +2 -0
- package/web/app/immutable/chunks/BhWJ-mUa.js +292 -0
- package/web/app/immutable/chunks/{CwH3s3Sg.js → Bhw4MKUW.js} +1 -1
- package/web/app/immutable/chunks/{CUvX4uDB.js → BmpVZmDT.js} +3 -3
- package/web/app/immutable/chunks/{BNg3GOxL.js → Bn-4GS40.js} +2 -2
- package/web/app/immutable/chunks/BpXeqZkK.js +12 -0
- package/web/app/immutable/chunks/{D-9LH0ah.js → Bpofk5Ge.js} +1 -1
- package/web/app/immutable/chunks/{DjEB6QMF.js → BrV7vQ-C.js} +1 -1
- package/web/app/immutable/chunks/ByGoYv9M.js +1 -0
- package/web/app/immutable/chunks/C-1nTNwc.js +120 -0
- package/web/app/immutable/chunks/{CBHPIqXg.js → C3nOF7W6.js} +1 -1
- package/web/app/immutable/chunks/{BIxkRFIj.js → C72YfPmr.js} +2 -2
- package/web/app/immutable/chunks/{DMGAuSgb.js → C87YV7yB.js} +4 -4
- package/web/app/immutable/chunks/{Coy9jSf1.js → CCDTjxXZ.js} +1 -1
- package/web/app/immutable/chunks/CEXJj_TX.js +62 -0
- package/web/app/immutable/chunks/CHFvnHJS.js +39 -0
- package/web/app/immutable/chunks/{CWyh7Yhz.js → CK1qXB1I.js} +1 -1
- package/web/app/immutable/chunks/{CCIGQjYf.js → CLEySo6k.js} +1 -1
- package/web/app/immutable/chunks/{DXOCO_oS.js → CNxOtEoC.js} +1 -1
- package/web/app/immutable/chunks/{7KTbkf4W.js → CPi1vTiT.js} +2 -2
- package/web/app/immutable/chunks/{ejL3HmTG.js → CQI-dvtu.js} +3 -3
- package/web/app/immutable/chunks/CSiG9Hvp.js +1 -0
- package/web/app/immutable/chunks/{C0DDaBnV.js → CTaTQq2B.js} +1 -1
- package/web/app/immutable/chunks/{dtB9lR1B.js → CUMlGGeg.js} +1 -1
- package/web/app/immutable/chunks/{fULl8IO9.js → CVyfvlNb.js} +7 -7
- package/web/app/immutable/chunks/{DUkegami.js → C_tu278J.js} +1 -1
- package/web/app/immutable/chunks/CcUMYVEM.js +41 -0
- package/web/app/immutable/chunks/Ccfa6x-j.js +24 -0
- package/web/app/immutable/chunks/{BmDskjjc.js → Cd_IIsl2.js} +1 -1
- package/web/app/immutable/chunks/CeijcUhC.js +38 -0
- package/web/app/immutable/chunks/Ci2_N-bK.js +370 -0
- package/web/app/immutable/chunks/CiPifYNB.js +1 -0
- package/web/app/immutable/chunks/{D8SVxzqF.js → CjcP6chv.js} +1 -1
- package/web/app/immutable/chunks/Cl430GWg.js +344 -0
- package/web/app/immutable/chunks/ClKsLSpN.js +27 -0
- package/web/app/immutable/chunks/ClebXGIM.js +141 -0
- package/web/app/immutable/chunks/{DOVnLHFz.js → CnIb6mve.js} +1 -1
- package/web/app/immutable/chunks/{qOCErwrn.js → CrdTEIp7.js} +1 -1
- package/web/app/immutable/chunks/{CPvhRhlk.js → Cstq9SM5.js} +11 -11
- package/web/app/immutable/chunks/CuzanJ4G.js +1 -0
- package/web/app/immutable/chunks/{D81gRUjY.js → D-QdqmeZ.js} +1 -1
- package/web/app/immutable/chunks/D0gJOzJU.js +40 -0
- package/web/app/immutable/chunks/{CoeuT-m3.js → D2ffSQ9J.js} +1 -1
- package/web/app/immutable/chunks/D2ojbL4J.js +98 -0
- package/web/app/immutable/chunks/{Bfkn2BGM.js → D3lH_sy-.js} +1 -1
- package/web/app/immutable/chunks/{C0Yks_oS.js → D5XrjD_m.js} +1 -1
- package/web/app/immutable/chunks/{DzvQOT8_.js → D5gGhPeB.js} +1 -1
- package/web/app/immutable/chunks/{DLm51UIm.js → D7ePuUtq.js} +1 -1
- package/web/app/immutable/chunks/{B9r0JXjW.js → D9RktmhG.js} +1 -1
- package/web/app/immutable/chunks/{Si43_nYW.js → D9zTmP-H.js} +3 -3
- package/web/app/immutable/chunks/{DQEBW0YT.js → DAhqFWJw.js} +1 -1
- package/web/app/immutable/chunks/{B20hJMKp.js → DAmyup4Q.js} +2 -2
- package/web/app/immutable/chunks/{B0X6Qy4e.js → DH-0T9oO.js} +1 -1
- package/web/app/immutable/chunks/{D-o9b0Cd.js → DHf042m3.js} +2 -2
- package/web/app/immutable/chunks/DICP2Iar.js +169 -0
- package/web/app/immutable/chunks/{D04E4MVv.js → DJ4er0zy.js} +4 -4
- package/web/app/immutable/chunks/{BtHVXttl.js → DLTK7s08.js} +5 -5
- package/web/app/immutable/chunks/{DQulsXJ7.js → DM80xiYc.js} +1 -1
- package/web/app/immutable/chunks/{BsP5G0Fo.js → DPWD_Z0m.js} +1 -1
- package/web/app/immutable/chunks/{t9id1Dgw.js → DPjuFI2m.js} +1 -1
- package/web/app/immutable/chunks/{DhdMM_zt.js → DR30pTuY.js} +14 -14
- package/web/app/immutable/chunks/{D_9AVJm5.js → DStbB4cJ.js} +1 -1
- package/web/app/immutable/chunks/{C8CCN24q.js → DV_gHrZ4.js} +1 -1
- package/web/app/immutable/chunks/{CQe4IdgR.js → DWqMBuHP.js} +1 -1
- package/web/app/immutable/chunks/DhDem5lD.js +34 -0
- package/web/app/immutable/chunks/{DaEQgqyy.js → Dj7a19mR.js} +1 -1
- package/web/app/immutable/chunks/{CnmCWFKQ.js → Dn1Hge9W.js} +2 -2
- package/web/app/immutable/chunks/{DxlwMmI8.js → DpbPS--w.js} +1 -1
- package/web/app/immutable/chunks/{Drg52kVf.js → DqPGIq9m.js} +1 -1
- package/web/app/immutable/chunks/Dr9n9KYD.js +8 -0
- package/web/app/immutable/chunks/Dx4xDmS-.js +1 -0
- package/web/app/immutable/chunks/{D411lQkp.js → DxBZwGJl.js} +1 -1
- package/web/app/immutable/chunks/{CEdLQlJ6.js → EF47gh5F.js} +6 -6
- package/web/app/immutable/chunks/FTZaXc8b.js +106 -0
- package/web/app/immutable/chunks/NHQiGgbv.js +200 -0
- package/web/app/immutable/chunks/{BCm8Gasf.js → OEEtadht.js} +1 -1
- package/web/app/immutable/chunks/{DCeW9_0X.js → PR2rc_KV.js} +2 -2
- package/web/app/immutable/chunks/{_F3xl3RI.js → Q48HTbqK.js} +1 -1
- package/web/app/immutable/chunks/{TQIai6Ne.js → Sd4DhpzB.js} +79 -79
- package/web/app/immutable/chunks/{C-Mmob1s.js → WaYTk5P-.js} +1 -1
- package/web/app/immutable/chunks/{ByGsJxdn.js → X-Frg4xt.js} +1 -1
- package/web/app/immutable/chunks/YDWB9C4j.js +36 -0
- package/web/app/immutable/chunks/{BUSwtV99.js → YqBgboHy.js} +1 -1
- package/web/app/immutable/chunks/{B_D0NLtg.js → _GDZ01fB.js} +1 -1
- package/web/app/immutable/chunks/{C7oH1dbI.js → aloh9OcN.js} +1 -1
- package/web/app/immutable/chunks/{BEhoKnQT.js → ap51LBWo.js} +1 -1
- package/web/app/immutable/chunks/bBO0iA4_.js +7 -0
- package/web/app/immutable/chunks/cMysCMc_.js +24 -0
- package/web/app/immutable/chunks/dpdLM1Cx.js +140 -0
- package/web/app/immutable/chunks/eHLf0w_s.js +1 -0
- package/web/app/immutable/chunks/fyjA8lOg.js +4 -0
- package/web/app/immutable/chunks/{CQf-fH5v.js → h6Xb9K7f.js} +1 -1
- package/web/app/immutable/chunks/{j0ThtFJc.js → iX-41BqF.js} +1 -1
- package/web/app/immutable/chunks/ibC6Wlul.js +3 -0
- package/web/app/immutable/chunks/jU5_8m_P.js +84 -0
- package/web/app/immutable/chunks/{BKGPkCRs.js → kHJUvxPR.js} +1 -1
- package/web/app/immutable/chunks/{BBTS8ZOM.js → lG67Zx5D.js} +3 -3
- package/web/app/immutable/chunks/{CgAIOmc3.js → lb9Uy5lM.js} +4 -4
- package/web/app/immutable/chunks/{DdAxykhC.js → lh2cjQS1.js} +1 -1
- package/web/app/immutable/chunks/{r1_PrlQL.js → lqs_HYEw.js} +1 -1
- package/web/app/immutable/chunks/{CnszEr0a.js → oEWQ7BWN.js} +1 -1
- package/web/app/immutable/chunks/{BGLkcG6I.js → ry72TFIz.js} +2 -2
- package/web/app/immutable/chunks/{BV7dztYI.js → ryFwnMjp.js} +1 -1
- package/web/app/immutable/chunks/{CsASRGy9.js → uOEty9O6.js} +5 -5
- package/web/app/immutable/chunks/wh3Y68il.js +1 -0
- package/web/app/immutable/chunks/{DRMT9vvq.js → xPs_63iv.js} +1 -1
- package/web/app/immutable/entry/{app.DlF41taB.js → app.np0VAfbg.js} +2 -2
- package/web/app/immutable/entry/start.BGCfjmAX.js +1 -0
- package/web/app/immutable/nodes/{0.BLjNhnkb.js → 0.DoZAnEaT.js} +1 -1
- package/web/app/immutable/nodes/{1.DaghOy3j.js → 1.BfLNDde5.js} +1 -1
- package/web/app/immutable/nodes/{10.CbV_flkh.js → 10.WVRhKQHR.js} +1 -1
- package/web/app/immutable/nodes/{14.N_oC1pv5.js → 14.BGrxllXE.js} +1 -1
- package/web/app/immutable/nodes/{16.Cn0uYbJe.js → 16.CkZkKSWx.js} +2 -2
- package/web/app/immutable/nodes/{2.CMERPJYK.js → 2.COM3w17g.js} +8 -8
- package/web/app/immutable/nodes/{3.Dk5w9XeG.js → 3.BhRx3b1m.js} +1 -1
- package/web/app/immutable/nodes/{4.CvLiKH0B.js → 4.C02hhSi-.js} +1 -1
- package/web/app/immutable/nodes/{5.BL5oLCOi.js → 5.Dgt2hWD3.js} +1 -1
- package/web/app/immutable/nodes/{6.DiKzgiKt.js → 6.KyP4WP5g.js} +1 -1
- package/web/app/immutable/nodes/{7.CM-hNW3A.js → 7.BxnoAMeX.js} +1 -1
- package/web/app/immutable/nodes/{8.BThIGSQR.js → 8.CnlHpTsC.js} +2 -2
- package/web/app/immutable/nodes/{9.D70tN3NX.js → 9.CJ1_wepy.js} +18 -18
- package/web/app/version.json +1 -1
- package/web/index.html +9 -9
- package/web/app/immutable/chunks/-SL67XKV.js +0 -1
- package/web/app/immutable/chunks/351KaJp_.js +0 -24
- package/web/app/immutable/chunks/7Iuyw4Ow.js +0 -106
- package/web/app/immutable/chunks/9ySBq1wF.js +0 -36
- package/web/app/immutable/chunks/B2safKX4.js +0 -1
- package/web/app/immutable/chunks/B8QrskMI.js +0 -139
- package/web/app/immutable/chunks/BCO4VeSA.js +0 -1
- package/web/app/immutable/chunks/BCaDoF8Y.js +0 -1
- package/web/app/immutable/chunks/BEdJCn-8.js +0 -1
- package/web/app/immutable/chunks/BGBb6fI-.js +0 -120
- package/web/app/immutable/chunks/BGQ3htf5.js +0 -1
- package/web/app/immutable/chunks/BKLEAopb.js +0 -7
- package/web/app/immutable/chunks/BKSgn5w-.js +0 -1
- package/web/app/immutable/chunks/BKY64haD.js +0 -12
- package/web/app/immutable/chunks/BOXqfDS_.js +0 -40
- package/web/app/immutable/chunks/BP_ooGOd.js +0 -24
- package/web/app/immutable/chunks/BQApP15C.js +0 -99
- package/web/app/immutable/chunks/BS6cE8e9.js +0 -231
- package/web/app/immutable/chunks/BTXk2yGf.js +0 -96
- package/web/app/immutable/chunks/BVrOGXf1.js +0 -78
- package/web/app/immutable/chunks/BZoKWA-r.js +0 -96
- package/web/app/immutable/chunks/BbiXTFqz.js +0 -1
- package/web/app/immutable/chunks/BgmKjqUX.js +0 -1
- package/web/app/immutable/chunks/Bk7xBWHf.js +0 -34
- package/web/app/immutable/chunks/BoiNnj2h.js +0 -1
- package/web/app/immutable/chunks/BrVvVCxw.js +0 -1
- package/web/app/immutable/chunks/ByM2DIOs.js +0 -1
- package/web/app/immutable/chunks/ByzYvvQp.js +0 -70
- package/web/app/immutable/chunks/Bz0SnIMO.js +0 -1
- package/web/app/immutable/chunks/C1IwSyrV.js +0 -99
- package/web/app/immutable/chunks/C9gL5x04.js +0 -39
- package/web/app/immutable/chunks/C9nyJoiB.js +0 -41
- package/web/app/immutable/chunks/CBV2Z_QZ.js +0 -89
- package/web/app/immutable/chunks/CDHds8o_.js +0 -3
- package/web/app/immutable/chunks/CHIHAnR-.js +0 -1
- package/web/app/immutable/chunks/CHj2oCmD.js +0 -39
- package/web/app/immutable/chunks/CIXNMjfT.js +0 -206
- package/web/app/immutable/chunks/CKFDW9cI.js +0 -24
- package/web/app/immutable/chunks/CKQlE_M1.js +0 -88
- package/web/app/immutable/chunks/CSBhPNbN.js +0 -206
- package/web/app/immutable/chunks/CSLTsum9.js +0 -38
- package/web/app/immutable/chunks/CSbiiZpm.js +0 -354
- package/web/app/immutable/chunks/CToDhNW4.js +0 -1
- package/web/app/immutable/chunks/CYFK9YEX.js +0 -168
- package/web/app/immutable/chunks/CcGF51wP.js +0 -1
- package/web/app/immutable/chunks/Cd5vVJw4.js +0 -292
- package/web/app/immutable/chunks/CgjSMAIJ.js +0 -120
- package/web/app/immutable/chunks/Ck7B90Kr.js +0 -38
- package/web/app/immutable/chunks/CkAILno9.js +0 -62
- package/web/app/immutable/chunks/CkawHIFZ.js +0 -1
- package/web/app/immutable/chunks/ClXr1b-t.js +0 -8
- package/web/app/immutable/chunks/CmWBRPmR.js +0 -24
- package/web/app/immutable/chunks/Cmo-9vFV.js +0 -1
- package/web/app/immutable/chunks/CoFCa7Mb.js +0 -231
- package/web/app/immutable/chunks/CrcLvVto.js +0 -84
- package/web/app/immutable/chunks/Cs_Q6mos.js +0 -1
- package/web/app/immutable/chunks/CsnLwu9F.js +0 -2
- package/web/app/immutable/chunks/CuYeKLE8.js +0 -8
- package/web/app/immutable/chunks/CvOaoHrI.js +0 -1
- package/web/app/immutable/chunks/CvYzv8kf.js +0 -1
- package/web/app/immutable/chunks/CxRm1vYn.js +0 -342
- package/web/app/immutable/chunks/CyfBUrNA.js +0 -1
- package/web/app/immutable/chunks/D1QKDDLH.js +0 -1
- package/web/app/immutable/chunks/D61DwhDw.js +0 -3
- package/web/app/immutable/chunks/DBAJPVI_.js +0 -1
- package/web/app/immutable/chunks/DBt8jmEX.js +0 -40
- package/web/app/immutable/chunks/DD-T_Om0.js +0 -178
- package/web/app/immutable/chunks/DEOiJZFa.js +0 -168
- package/web/app/immutable/chunks/DHW4IXFj.js +0 -36
- package/web/app/immutable/chunks/DJ0w8Oax.js +0 -129
- package/web/app/immutable/chunks/DJ52BT20.js +0 -1
- package/web/app/immutable/chunks/DK1048Bw.js +0 -129
- package/web/app/immutable/chunks/DZ0nrC9W.js +0 -162
- package/web/app/immutable/chunks/DeRneTJF.js +0 -106
- package/web/app/immutable/chunks/Df6EnPla.js +0 -4
- package/web/app/immutable/chunks/DfMKUxMU.js +0 -30
- package/web/app/immutable/chunks/DkH3yb1j.js +0 -34
- package/web/app/immutable/chunks/Doxgswr3.js +0 -4
- package/web/app/immutable/chunks/Dt53cexP.js +0 -1
- package/web/app/immutable/chunks/Dx6eBL0x.js +0 -1
- package/web/app/immutable/chunks/HP7Asd0t.js +0 -2
- package/web/app/immutable/chunks/HP8lGamR.js +0 -257
- package/web/app/immutable/chunks/HzpfURmp.js +0 -84
- package/web/app/immutable/chunks/PJfe_iA1.js +0 -1
- package/web/app/immutable/chunks/PXMyYXQv.js +0 -1
- package/web/app/immutable/chunks/Qi3HrsAm.js +0 -1
- package/web/app/immutable/chunks/S1FanOB0.js +0 -162
- package/web/app/immutable/chunks/SuMU9B9i.js +0 -1
- package/web/app/immutable/chunks/UaGv-ChR.js +0 -257
- package/web/app/immutable/chunks/YqyEOqRv.js +0 -178
- package/web/app/immutable/chunks/_MGNV7ZN.js +0 -338
- package/web/app/immutable/chunks/_lZu5Dth.js +0 -292
- package/web/app/immutable/chunks/gzjZWAx8.js +0 -62
- package/web/app/immutable/chunks/hqSEunOk.js +0 -15
- package/web/app/immutable/chunks/nGCCQCpO.js +0 -1
- package/web/app/immutable/chunks/o-kBqlaj.js +0 -7
- package/web/app/immutable/chunks/opO2fBQB.js +0 -1
- package/web/app/immutable/chunks/pdFamTTi.js +0 -7
- package/web/app/immutable/chunks/rEI8JpP3.js +0 -1
- package/web/app/immutable/chunks/s5P9UVzf.js +0 -1
- package/web/app/immutable/chunks/sIHUXgeh.js +0 -41
- package/web/app/immutable/entry/start.CCtO40vu.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/BaQ9zUUl.js","/app/immutable/chunks/lfJ8pseq.js","/app/immutable/chunks/7rNOGHzs.js","/app/immutable/chunks/B8o4lNgr.js","/app/immutable/chunks/DmsDslNo.js","/app/immutable/chunks/UyBYtOpv.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/Bgegixo2.js","/app/immutable/chunks/CQ4a5a4v.js","/app/immutable/chunks/D2g8BuR1.js","/app/immutable/chunks/CiENRH6A.js","/app/immutable/chunks/DCaHy20k.js","/app/immutable/chunks/CzrrO9Ap.js","/app/immutable/chunks/BlOn95cv.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/DzMmhJrp.js","/app/immutable/chunks/D-cnPaTJ.js","/app/immutable/chunks/CRwmdgt6.js","/app/immutable/chunks/CjSUqH7t.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/D5B1sycf.js","/app/immutable/chunks/D2AmAQEr.js","/app/immutable/chunks/CFejQM6t.js","/app/immutable/chunks/CUrlpJj4.js","/app/immutable/assets/notify.BeL_JB6L.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
var me=Object.defineProperty;var be=(e,t,r)=>t in e?me(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var u=(e,t,r)=>be(e,typeof t!="symbol"?t+"":t,r);import{Hq as n,t3 as Se,n6 as k,n5 as m,lA as _e,xk as R,xl as x,xi as ve,xj as Ee,qO as X,x5 as ke,uq as K,c as Ae,Hc as ye,a8 as Me,b$ as Re,b_ as we,cd as Ce,cc as Pe,n8 as A}from"./CRwmdgt6.js";import{cD as Te,cs as Fe,bt as Ie,c5 as Oe,ck as Le,c7 as De,cH as xe,cL as Ne,cB as J,aw as Be,bP as We,cI as Ve}from"./KQTrHxko.js";import{a as Ge,i as Ue}from"./BkBdyRjM.js";import{c as V}from"./ChTqQfQN.js";import{i as I}from"./D4jXWSLn.js";import{bo as a,_ as He}from"./7rNOGHzs.js";import{n as qe}from"./DCeW9_0X.js";import{ax as je,J as Y,k as ze,bL as G,g as Ke,K as $e,bM as Qe,c as Ze,ay as Xe,bu as U,ab as Je,aO as Ye,t as ee,Q as et,at as tt,bA as rt,O as st,L as it,M as nt,bx as at}from"./CB-g50lR.js";import{u as ot}from"./C_n9DeKj.js";const jr=n.createSelector(e=>Te.select(e)?.capabilities.gitlabCheckout===!0),zr=n.createSelector(e=>e.gitlabAuth.host),Kr=n.createSelector(e=>e.gitlabAuth.instanceBaseUrl??e.gitlabAuth.host),$r=n.createSelector(e=>Se(e.gitlabAuth.instanceBaseUrl??e.gitlabAuth.host)??""),Qr=n.createSelector(e=>e.gitlabAuth.isCancelling),Zr=n.createSelector(e=>e.gitlabAuth.cancelOutcome),Xr=n.createSelector(e=>e.gitlabAuth.isConfigured),Jr=n.createSelector(e=>e.gitlabAuth.isAuthenticating),Yr=n.createSelector(e=>e.gitlabAuth.deviceFlow),es=n.createSelector(e=>e.gitlabAuth.deviceGrantSupported),ts=n.createSelector(e=>e.gitlabAuth.user),rs=n.createSelector(e=>e.gitlabAuth.error);n.createSelector(e=>e.gitlabAuth.method);const ss=n.createSelector(e=>e.gitlabAuth.statusReady===!0),E=[{id:"pr-reviewer",icon:"pr-reviewer",get name(){return a.specialists_builtin_prReviewer_name()},get description(){return a.specialists_builtin_prReviewer_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"ui-designer",icon:"ui-designer",get name(){return a.specialists_builtin_uiDesigner_name()},get description(){return a.specialists_builtin_uiDesigner_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"vulnerability-scanner",icon:"pr-reviewer",get name(){return a.specialists_builtin_vulnerabilityScanner_name()},get description(){return a.specialists_builtin_vulnerabilityScanner_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"developer",icon:"verifier",get name(){return a.specialists_builtin_developer_name()},get description(){return a.specialists_builtin_developer_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"product-manager",icon:"coordinator",get name(){return a.specialists_builtin_productManager_name()},get description(){return a.specialists_builtin_productManager_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"maintenance-coordinator",icon:"ralph",get name(){return a.specialists_builtin_maintenanceCoordinator_name()},get description(){return a.specialists_builtin_maintenanceCoordinator_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"chief-of-staff",icon:"chief-of-staff",get name(){return a.specialists_builtin_chiefOfStaff_name()},get description(){return a.specialists_builtin_chiefOfStaff_description()},hidden:!0,defaultBehaviorPrompt:"",promptUnavailable:!0}],te=new Set(["pr-reviewer"]),is="developer";function ns(e){return E.find(t=>t.id===e)}const ct=n.createSelector(e=>e.githubAuth.mutationRequestId),lt=n.createSelector(e=>e.githubAuth.callbacksCancelled),ut=n.createSelector(e=>e.githubAuth.isDisconnecting),re=n.createSelector(e=>e.githubAuth.isAuthenticated),dt=n.createSelector(e=>e.githubAuth.statusSettled===!0),pt=n.createSelector(e=>e.githubAuth.requiresDaemonAuth),ft=n.createSelector(e=>e.githubAuth.user),gt=n.createSelector(e=>e.githubAuth.isAuthenticating),ht=n.createSelector(e=>e.githubAuth.deviceFlow),mt=n.createSelector(e=>e.githubAuth.error),as=Object.freeze(Object.defineProperty({__proto__:null,selectGitHubAuthCallbacksCancelled:lt,selectGitHubAuthDeviceFlow:ht,selectGitHubAuthError:mt,selectGitHubAuthIsAuthenticated:re,selectGitHubAuthIsAuthenticating:gt,selectGitHubAuthIsDisconnecting:ut,selectGitHubAuthMutationRequestId:ct,selectGitHubAuthRequiresDaemonAuth:pt,selectGitHubAuthStatusSettled:dt,selectGitHubAuthUser:ft},Symbol.toStringTag,{value:"Module"}));function d(e){return e??""}function bt(e,t){const r=e??[],s=t??[];return r.length===s.length&&r.every((i,o)=>d(i.provider)===d(s[o].provider)&&i.model===s[o].model&&i.hint===s[o].hint&&d(i.reasoningEffort)===d(s[o].reasoningEffort))}function $(e,t){if(e.source!=="user"||!t?.ignoreModelPin&&(e.model||e.codingAgent))return!1;const r=e.bundled;return r?d(e.name)===d(r.name)&&d(e.description)===d(r.description)&&d(e.behaviorPrompt)===d(r.behaviorPrompt)&&d(e.roleReminder)===d(r.roleReminder)&&d(e.reasoningEffort)===d(r.reasoningEffort)&&bt(e.modelOptions,r.modelOptions):!1}const os=n.createSelector(e=>e.specialists.bundledSpecialists),St=n.createSelector(e=>e.specialists.fileSpecialists),cs=n.createSelector(e=>k(St.select(e))),ls=n.createSelector(e=>e.specialists.userOverrides);n.createSelector(e=>e.specialists.overridesLoaded);const us=n.createSelector(e=>e.specialists.customSpecialistsLoaded),ds=n.createSelector(e=>e.specialists.fileSpecialistsLoaded),ps=n.createSelector(e=>e.specialists.bundledSpecialistsLoaded),fs=n.createSelector(e=>e.specialists.specialistsFolderPath),gs=n.createSelector((e,t)=>{if(!t)return e.specialists.defaultSpecialistId??"";const r=e.providerCatalog?.byWorkspaceId?.[t]?.settings.find(s=>s.path==="specialists.default")?.value;return typeof r=="string"?r:""});n.createSelector(e=>e.specialists.providerModelOverrides);const O=n.createSelector((e,t)=>!(te.has(t)&&!re.select(e)));function _t(e,t){return t?e:e.filter(r=>!te.has(r.id))}function vt(e,t){return _t(e,t).filter(r=>!r.hidden)}function hs(e,t){return vt(e,t).filter(r=>r.role!=="internal")}const b=n.createSelector((e,t)=>{if(t)return(e.providerCatalog?.byWorkspaceId?.[t]?.specialists??[]).map(l=>({...l,defaultModel:l.model,defaultBehaviorPrompt:l.behaviorPrompt??l.prompt??"",defaultAgentType:l.agentType}));const r=k(e.specialists.fileSpecialists),s=e.specialists.bundledSpecialists,i=new Set,o=[];for(const l of r)!i.has(l.id)&&O.select(e,l.id)&&(i.add(l.id),o.push({id:l.id,name:l.name,description:l.description,codingAgent:l.codingAgent,defaultModel:l.model||void 0,defaultBehaviorPrompt:l.behaviorPrompt,roleReminder:l.roleReminder,source:l.source,importedFrom:l.importedFrom,unsupportedFields:l.unsupportedFields,requiredSkills:l.requiredSkills,missingSkills:l.missingSkills,hidden:l.hidden,resolvedModel:l.resolvedModel,resolvedProvider:l.resolvedProvider,modelOptions:l.modelOptions,reasoningEffort:l.reasoningEffort,role:l.role,teamAgents:l.teamAgents,icon:l.icon}));for(const l of s)!i.has(l.id)&&O.select(e,l.id)&&(i.add(l.id),o.push(l));if(!e.specialists.bundledSpecialistsLoaded&&r.length===0&&s.length===0)for(const l of E)!i.has(l.id)&&O.select(e,l.id)&&(i.add(l.id),o.push(l));const c=new Map;for(const l of E)c.has(l.id)||c.set(l.id,c.size);for(const l of s)c.has(l.id)||c.set(l.id,c.size);return o.sort((l,g)=>{const S=c.has(l.id),F=c.has(g.id);return S&&F?(c.get(l.id)??0)-(c.get(g.id)??0):S&&!F?-1:!S&&F?1:l.name.localeCompare(g.name)}),o}),ms=n.createSelector(e=>{const t=b.select(e).filter(s=>s.role==="orchestrator");if(t.length===0)return null;const r=new Set([...E.map(({id:s})=>s),...e.specialists.bundledSpecialists.map(({id:s})=>s)]);return t.sort((s,i)=>+!r.has(s.id)-+!r.has(i.id)||s.id.localeCompare(i.id)),t[0]}),Et=n.createSelector((e,t)=>{const r=m(e.specialists.fileSpecialists,t);if(r)return{id:r.id,name:r.name,description:r.description,source:r.source};const s=e.specialists.bundledSpecialists.find(i=>i.id===t);if(s)return{id:s.id,name:s.name,description:s.description,source:"builtin"};if(!e.specialists.bundledSpecialistsLoaded&&k(e.specialists.fileSpecialists).length===0&&e.specialists.bundledSpecialists.length===0){const i=E.find(o=>o.id===t);if(i)return{id:i.id,name:i.name,description:i.description,source:"builtin"}}return null}),bs=n.createSelector((e,t)=>Et.select(e,t)?.name??null),Ss=n.createSelector((e,t,r)=>{const i=b.select(e,r).find(o=>o.id===t);return i?i.defaultModel?i.defaultModel:i.resolvedModel??"":""}),_s=n.createSelector((e,t,r)=>b.select(e,r).find(o=>o.id===t)?.defaultModel||void 0),vs=n.createSelector((e,t,r)=>b.select(e,r).find(o=>o.id===t)?.reasoningEffort||void 0),Es=n.createSelector((e,t,r)=>{const i=b.select(e,r).find(o=>o.id===t);return i?i.defaultBehaviorPrompt:""});function w(e,t){return t.some(r=>r.id===e)||E.some(r=>r.id===e)}const ks=n.createSelector((e,t,r)=>{if(r){const s=e.providerCatalog?.byWorkspaceId?.[r]?.specialists.find(i=>i.id===t);return!s||s.importedFrom?!1:s.source==="bundled"||s.source==="user"&&w(t,e.specialists.bundledSpecialists)}return w(t,e.specialists.bundledSpecialists)}),As=n.createSelector((e,t,r)=>r?!!H.select(e,t,r):!!m(e.specialists.fileSpecialists,t)),ys=n.createSelector((e,t,r)=>{if(r){const o=H.select(e,t,r);return!o||o.importedFrom||o.source==="project"?!1:w(t,e.specialists.bundledSpecialists)&&!$(o)}if(!w(t,e.specialists.bundledSpecialists))return!1;const i=m(e.specialists.fileSpecialists,t);return!i||i.source!=="user"?!1:!$(i)}),H=n.createSelector((e,t,r)=>{if(r){const s=e.providerCatalog?.byWorkspaceId?.[r]?.specialists.find(i=>i.id===t);return!s||s.source==="bundled"?void 0:{...s,source:s.source,model:s.model??"",behaviorPrompt:s.behaviorPrompt??s.prompt??"",filePath:s.path??""}}return m(e.specialists.fileSpecialists,t)}),Ms=n.createSelector((e,t,r)=>{const s=H.select(e,t,r);return r&&!s?e.providerCatalog?.byWorkspaceId?.[r]?.specialists.some(i=>i.id===t)?"Built-in":null:s?.source==="project"?"Project":s?.source==="user"?"User":e.specialists.bundledSpecialists.some(i=>i.id===t)?"Built-in":null}),Rs=n.createSelector((e,t,r)=>{if(r)return e.providerCatalog?.byWorkspaceId?.[r]?.specialists.find(o=>o.id===t)?.path;const s=m(e.specialists.fileSpecialists,t);if(s)return s.filePath;const i=e.specialists.bundledSpecialists.find(o=>o.id===t);if(i&&"filePath"in i)return i.filePath}),ws=n.createSelector((e,t,r)=>{if(r){const i=b.select(e,r).find(l=>l.id===t),o=i?.codingAgent||i?.resolvedProvider;if(o)return Fe.select(e,o,r);const c=Ie.select(e,r);return e.providerCatalog?.byWorkspaceId?.[r]?.readiness[c]?.available?c:""}const s=m(e.specialists.fileSpecialists,t);return s?.codingAgent?s.codingAgent:kt.select(e,t)}),kt=n.createSelector((e,t)=>{const s=b.select(e).find(i=>i.id===t);return s?.codingAgent?s.codingAgent:je.select(e)?Y.select(e):""}),Cs=n.createSelector((e,t)=>{if(t)return e.providerCatalog?.byWorkspaceId?.[t]?.importDiagnostics??[];const r=e.specialists.importDiagnostics;return r?k(r):[]}),Ps=n.createSelector((e,t)=>e.specialists.creationByContext?.[t]??_e),Ts=n.createSelector(e=>Object.values(e.specialists.creationByContext??{}).flatMap(t=>t.specialistId?[t.specialistId]:[])),L=V("Clipboard");async function Fs(e){let t;if(Ge())try{const r=await Ue("system:write-clipboard",{text:e});if(r?.success===!1)throw new Error(r.error||"Electron clipboard write failed");return}catch(r){t=r,L.warn("Electron clipboard write failed; falling back to browser clipboard",{error:r})}if(typeof navigator<"u"&&navigator.clipboard?.writeText)try{await navigator.clipboard.writeText(e);return}catch(r){throw L.error("Browser clipboard write failed",r,{electronError:t}),r}throw L.error("No clipboard write API is available",void 0,{electronError:t}),t instanceof Error?t:new Error("Clipboard write API unavailable")}const At=V("WorkspaceValidation");async function Is(e,t=!1,r=!1){if(!e||e.trim().length===0)return{valid:!1,error:a.workspace_validation_repoPathRequired_error(),suggestion:a.workspace_validation_repoPathRequired_suggestion()};const s=e.trim();return yt(s)?Rt(s):wt(s,t,r)}function yt(e){return[/^https?:\/\/github\.com\//i,/^git@github\.com:/i,/^github\.com\//i,/^([a-zA-Z0-9\-_]+)\/([a-zA-Z0-9\-_\.]+)$/].some(r=>r.test(e.trim()))}function Mt(e){const t=e.trim(),r=[/^https?:\/\/github\.com\/([^\/]+)\/([^\/]+)$/i,/^git@github\.com:([^\/]+)\/([^\/]+)$/i,/^github\.com\/([^\/]+)\/([^\/]+)$/i];for(const i of r){const o=t.match(i);if(o){const c=o[2].replace(/\.git$/,"");return c?{owner:o[1],repo:c}:null}}const s=t.match(/^([a-zA-Z0-9\-_]+)\/([a-zA-Z0-9\-_\.]+)$/);if(s&&!t.includes("\\")&&!t.includes(":")){const i=s[2].replace(/\.git$/,"");return i?{owner:s[1],repo:i}:null}return null}async function Rt(e){return Mt(e)?{valid:!0,warning:a.workspace_validation_githubCloneLocally_warning()}:{valid:!1,error:a.workspace_validation_invalidGithubUrl_error(),suggestion:a.workspace_validation_invalidGithubUrl_suggestion()}}async function wt(e,t=!1,r=!1){if(e.includes("\0"))return{valid:!1,error:a.workspace_validation_nullCharacters_error()};if(!e.startsWith("/")&&!e.startsWith("~")&&!e.startsWith(".")&&!e.includes(":\\")&&!/^[a-zA-Z]:\//.test(e))return{valid:!1,error:a.workspace_validation_pathNotAbsolute_error(),suggestion:a.workspace_validation_pathNotAbsolute_suggestion()};if(typeof window<"u"&&window.electronAPI)try{const s=await I("file:getDirectoryStatus",{path:e});if(s.success&&s.data){const c=s.data;return c.exists?c.isDirectory?c.isGitRepo?{valid:!0,isNewRepo:!1,directoryStatus:c}:c.isSubdirectoryOfGitRepo?{valid:!0,isNewRepo:!1,directoryStatus:c,warning:a.workspace_validation_insideParentRepo_warning({path:c.parentGitRoot??""})}:r?{valid:!0,isNewRepo:!1,directoryStatus:c}:t?c.isEmpty?{valid:!0,isNewRepo:!0,directoryStatus:c,warning:a.workspace_validation_emptyDirInit_warning()}:{valid:!0,isNewRepo:!0,directoryStatus:c,warning:a.workspace_validation_nonGitDirInit_warning()}:{valid:!1,error:a.workspace_repoSelector_notGitRepository_label(),directoryStatus:c}:{valid:!1,error:a.workspace_validation_notDirectory_error(),suggestion:a.workspace_validation_notDirectory_suggestion(),directoryStatus:c}:t?{valid:!0,isNewRepo:!0,directoryStatus:c,warning:a.workspace_validation_willCreateRepo_warning()}:{valid:!1,error:a.workspace_validation_dirNotExist_error(),suggestion:a.workspace_validation_dirNotExist_suggestion(),directoryStatus:c}}if(!(await I("file:exists",{path:e})).exists)return t?{valid:!0,isNewRepo:!0,warning:a.workspace_validation_willCreateRepo_warning()}:{valid:!1,error:a.workspace_validation_dirNotExist_error(),suggestion:a.workspace_validation_dirNotExistLegacy_suggestion()};const o=await I("git:isRepository",{path:e});if(!t&&o?.isRepository!==!0)return{valid:!1,error:o?.isRepository===!1?a.workspace_repoSelector_notGitRepository_label():a.workspace_compactInitializer_gitCheckUnknown_label()};if(!o.isRepository)return{valid:!0,isNewRepo:!0,warning:a.workspace_validation_nonGitInit_warning()}}catch(s){if(At.warn("Could not validate path existence",s),!t)return{valid:!1,error:a.workspace_compactInitializer_gitCheckUnknown_label()}}return{valid:!0,isNewRepo:!1}}function Os(e){if(!e||e.trim().length===0)return{valid:!0};const t=e.trim();return/[\s~^:?*\[\]\\]/.test(t)?{valid:!1,error:a.workspace_validation_branchPrefixInvalidChars_error(),suggestion:a.workspace_validation_branchChars_suggestion()}:t==="."||t===".."||t.startsWith(".")?{valid:!1,error:a.workspace_validation_branchPrefixDot_error()}:t.includes("..")||t.includes("//")?{valid:!1,error:a.workspace_validation_branchPrefixConsecutive_error()}:t.startsWith("/")?{valid:!1,error:a.workspace_validation_branchPrefixSlash_error()}:t.endsWith(".lock")?{valid:!1,error:a.workspace_validation_branchPrefixLock_error()}:t.length>50?{valid:!1,error:a.workspace_validation_branchPrefixTooLong_error()}:{valid:!0}}function Ls(e){if(!e||e.trim().length===0)return"";let t=e.trim().replace(/^[./]+/,"").replace(/[\s~^:?*\[\]\\]/g,"-").replace(/\.{2,}/g,"-").replace(/\/{2,}/g,"/").replace(/-{2,}/g,"-").replace(/^-+/,"").replace(/\.lock$/,"").toLowerCase();return t.length>0&&!t.endsWith("/")&&!t.endsWith("-")&&(t=t.includes("/")?`${t}/`:`${t}/`),t}function Ds(e){if(!e||e.trim().length===0)return{valid:!1,error:a.workspace_validation_branchNameRequired_error()};const t=e.trim();return/[\s~^:?*\[\]\\]/.test(t)?{valid:!1,error:a.workspace_validation_branchNameInvalidChars_error(),suggestion:a.workspace_validation_branchChars_suggestion()}:["HEAD",".",".."].includes(t)?{valid:!1,error:a.workspace_validation_branchNameReserved_error()}:t.includes("..")||t.includes("//")?{valid:!1,error:a.workspace_validation_branchNameConsecutive_error()}:t.startsWith("/")||t.endsWith("/")?{valid:!1,error:a.workspace_validation_branchNameSlash_error()}:t.endsWith(".lock")?{valid:!1,error:a.workspace_validation_branchNameLock_error()}:{valid:!0}}function xs(e){return!e||e.trim().length===0?{valid:!0}:e.trim().length>1e5?{valid:!1,error:a.workspace_validation_promptTooLong_error(),suggestion:a.workspace_validation_promptTooLong_suggestion()}:{valid:!0}}function Ns(e){const t=e.toLowerCase();return t.includes("maxbuffer")?a.workspace_gitError_maxBuffer():t.includes("clone")&&t.includes("timed out")?a.workspace_gitError_cloneTimeout():t.includes("json-rpc request timed out: workspace.create")?a.workspace_gitError_createTimeout():t.includes("timed out")&&["git","clone","fetch","worktree","pull","push","rebase","merge"].some(r=>t.includes(r))?a.workspace_gitError_gitTimeout():t.includes("git clone failed")?t.includes("could not read from remote")?a.workspace_gitError_cloneRemote():t.includes("authentication")||t.includes("permission denied")||t.includes("access denied")?a.workspace_gitError_cloneAuth():a.workspace_gitError_cloneFailed():t.includes("could not resolve any ref to create worktree")?a.workspace_gitError_worktreeRef():t.includes("failed to write file")?t.includes("eacces")||t.includes("permission denied")?a.workspace_gitError_writePermission():t.includes("enospc")||t.includes("disk space")?a.workspace_gitError_diskSpaceFree():t.includes("enoent")||t.includes("no such file")?a.workspace_gitError_writeNoEnt():e:t.includes("failed to read file")?t.includes("enoent")||t.includes("no such file")?a.workspace_gitError_readNotFound():t.includes("eacces")||t.includes("permission denied")?a.workspace_gitError_readPermission():e:t.includes("permission denied")?a.workspace_gitError_permissionDenied():t.includes("not found")||t.includes("enoent")?a.workspace_gitError_notFound():t.includes("already exists")?a.workspace_gitError_alreadyExists():t.includes("network")||t.includes("etimedout")?a.workspace_gitError_network():t.includes("authentication")||t.includes("401")?t.includes("private repositor")?e:a.workspace_gitError_authFailed():t.includes("rate limit")||t.includes("403")?a.workspace_gitError_rateLimit():t.includes("disk space")||t.includes("enospc")?a.workspace_gitError_diskSpace():e}const Ct=["idle","exited"];function Pt(e){return e===void 0||!Ct.includes(e)}function Bs(e){return e.status==="restarting"?"restarting":Pt(e.status)?"running":e.status==="idle"?"idle":e.exitCode===0?"succeeded":e.exitCode===null||e.exitCode===void 0?"exited":e.exitCode>=128?"stopped":"failed"}function Tt(e){return e.engine==="os"?"os":e.isLoading||e.keyConfigured[e.provider]===!0?"daemon":e.osEngineAvailable?"os":"unavailable"}const Ws=n.createSelector(e=>e.voiceSettings.isLoading),Vs=n.createSelector(e=>e.voiceSettings.available),Gs=n.createSelector(e=>e.voiceSettings.provider),Us=n.createSelector(e=>e.voiceSettings.engine),Hs=n.createSelector(e=>e.voiceSettings.osEngineAvailable),qs=n.createSelector(e=>e.voiceSettings.keyConfigured),js=n.createSelector(e=>e.voiceSettings.vocabulary),zs=n.createSelector(e=>e.voiceSettings.openaiModel),Ks=n.createSelector(e=>e.voiceSettings.language),$s=n.createSelector(e=>e.voiceSettings.workspaceVocabularyMaxTerms),Qs=n.createSelector(e=>e.voiceSettings.inputDeviceId),Zs=n.createSelector(e=>e.voiceSettings.inputDevices),Xs=n.createSelector(e=>e.voiceSettings.busyProvider),Js=n.createSelector(e=>e.voiceSettings.error),Ys=n.createSelector(e=>Oe.select(e)?"unavailable":Tt(e.voiceSettings)),N="intent.voice.inputDevice";let B;function Ft(){if(B!==void 0)return B;try{const e=localStorage.getItem(N);return typeof e=="string"&&e!==""?e:null}catch{return null}}function ei(e){B=e;try{e===null?localStorage.removeItem(N):localStorage.setItem(N,e)}catch{}}let C=null;function ti(e){C=e}function ri(){const e=C;return C=null,e}function It(){C=null}const Ot=300,Lt=300;class Dt{constructor(t){u(this,"holdThresholdMs");u(this,"doublePressWindowMs");u(this,"onRecordStart");u(this,"onRecordStop");u(this,"currentState","idle");u(this,"timer",null);this.holdThresholdMs=t.holdThresholdMs??Ot,this.doublePressWindowMs=t.doublePressWindowMs??Lt,this.onRecordStart=t.onRecordStart,this.onRecordStop=t.onRecordStop}get state(){return this.currentState}keyDown(){switch(this.currentState){case"idle":this.currentState="first-press",this.armTimer(this.holdThresholdMs,()=>{this.currentState="holding"}),this.onRecordStart();break;case"await-second-press":this.clearTimer(),this.currentState="second-press",this.armTimer(this.holdThresholdMs,()=>{this.currentState="holding-send"});break;case"latched":this.currentState="latched-press";break;case"latched-await-second":this.clearTimer(),this.currentState="draining",this.onRecordStop({stopReason:"double-press",autoSend:!0});break}}keyUp(){switch(this.currentState){case"first-press":this.clearTimer(),this.currentState="await-second-press",this.armTimer(this.doublePressWindowMs,()=>{this.currentState="latched"});break;case"holding":this.currentState="idle",this.onRecordStop({stopReason:"hold-release",autoSend:!1});break;case"second-press":this.clearTimer(),this.currentState="idle",this.onRecordStop({stopReason:"double-press",autoSend:!0});break;case"holding-send":this.currentState="idle",this.onRecordStop({stopReason:"double-hold-release",autoSend:!0});break;case"latched-press":this.currentState="latched-await-second",this.armTimer(this.doublePressWindowMs,()=>{this.currentState="idle",this.onRecordStop({stopReason:"latch-stop",autoSend:!1})});break;case"draining":this.currentState="idle";break}}reset(){this.clearTimer(),this.currentState="idle"}armTimer(t,r){this.clearTimer(),this.timer=setTimeout(()=>{this.timer=null,r()},t)}clearTimer(){this.timer!==null&&clearTimeout(this.timer),this.timer=null}}let P=null;function si(e){P=e}function ii(){const e=P;return P=null,e}function xt(){P=null}const Nt=12e4,Bt=["audio/webm;codecs=opus","audio/webm"];function ni(){return typeof navigator<"u"&&typeof navigator.mediaDevices?.getUserMedia=="function"&&typeof MediaRecorder<"u"}function Wt(e){return e?{audio:{deviceId:{ideal:e}}}:{audio:!0}}function Vt(){if(!(typeof MediaRecorder>"u"||typeof MediaRecorder.isTypeSupported!="function"))return Bt.find(e=>MediaRecorder.isTypeSupported(e))}class Gt{constructor(t){u(this,"maxDurationMs");u(this,"now");u(this,"callbacks");u(this,"deviceId");u(this,"currentState","idle");u(this,"recorder",null);u(this,"stream",null);u(this,"chunks",[]);u(this,"startedAt",0);u(this,"maxTimer",null);u(this,"discardRequested",!1);u(this,"cancelRequested",!1);this.maxDurationMs=t.maxDurationMs??Nt,this.now=t.now??Date.now,this.callbacks={onFinished:t.onFinished,onError:t.onError},this.deviceId=t.deviceId??null}get state(){return this.currentState}async start(){if(this.currentState!=="idle")return"discarded";this.currentState="starting";let t;try{t=await navigator.mediaDevices.getUserMedia(Wt(this.deviceId))}catch(i){const o=this.discardRequested;return this.currentState="stopped",o||this.callbacks.onError(i),o?"discarded":"error"}if(this.discardRequested){for(const i of t.getTracks())i.stop();return this.currentState="stopped","discarded"}this.stream=t;const r=Vt(),s=r?new MediaRecorder(t,{mimeType:r}):new MediaRecorder(t);return this.recorder=s,s.ondataavailable=i=>{i.data&&i.data.size>0&&this.chunks.push(i.data)},s.onstop=()=>this.handleRecorderStop(),s.onerror=i=>this.handleRecorderError(i),s.start(),this.startedAt=this.now(),this.currentState="recording",this.maxTimer=setTimeout(()=>this.stop(),this.maxDurationMs),"recording"}stop(){if(this.currentState==="starting"){this.discardRequested=!0;return}this.currentState==="recording"&&this.recorder?.stop()}cancel(){if(this.currentState==="starting"){this.discardRequested=!0;return}this.currentState==="recording"&&(this.cancelRequested=!0,this.recorder?.stop())}handleRecorderStop(){const t=this.now()-this.startedAt,r=this.recorder?.mimeType||"audio/webm",s=this.chunks,i=this.cancelRequested;this.teardown(),!i&&this.callbacks.onFinished({blob:new Blob(s,{type:r}),durationMs:t,mimeType:r})}handleRecorderError(t){const r=t?.error??t;this.teardown(),this.callbacks.onError(r)}teardown(){this.maxTimer!==null&&clearTimeout(this.maxTimer),this.maxTimer=null,this.recorder&&(this.recorder.ondataavailable=null,this.recorder.onstop=null,this.recorder.onerror=null),this.recorder=null;for(const t of this.stream?.getTracks()??[])t.stop();this.stream=null,this.chunks=[],this.currentState="stopped"}}const Ut=300;function Ht(e){const t=e?.name;return t==="NotAllowedError"||t==="SecurityError"}const qt={stopReason:"manual",autoSend:!1};let p=null,h=null,_=0,y=null;const T=new Dt({onRecordStart:()=>{y&&jt(y)},onRecordStop:e=>{se(y,e)}});function ai(){return p!==null}function oi(){return p}function ci(e){y=e,_+=1,_===1&&T.keyDown()}function li(e){y=e,_!==0&&(_-=1,_===0&&T.keyUp())}function jt(e){if(p!==null)return;xt(),It();const t=new Gt({deviceId:Ft(),onFinished:r=>{p===t&&(p=null);const s=h??{stopReason:"auto-stop",autoSend:!1},i=h!==null;if(h=null,e.dispatch(R()),i||T.reset(),r.durationMs<Ut){s.autoSend&&e.dispatch(x());return}e.dispatch(ve({...r,stopReason:s.stopReason,autoSend:s.autoSend}))},onError:r=>{p===t&&(p=null),h=null,e.dispatch(R()),e.showHint(Ht(r)?a.hardwareConsole_ptt_micDenied_message():a.hardwareConsole_ptt_recordingFailed_message())}});p=t,e.dispatch(Ee()),t.start().then(r=>{if(r!=="recording"&&(p===t&&(p=null),r==="discarded")){const s=h?.autoSend===!0;h=null,e.dispatch(R()),s&&e.dispatch(x())}})}function se(e,t){const r=p;if(r===null){t.autoSend&&e?.dispatch(x());return}h=t,r.stop()}function ui(){se(null,qt)}function di(e){T.reset(),_=0,h=null;const t=p;t!==null&&(p=null,t.cancel(),e.dispatch(R()))}const zt=V("HardwareConsoleVoiceSetupToast"),Kt="hardware-console-voice-setup";let D=null;function $t(){return D||(D=He(()=>import("./BaQ9zUUl.js").then(e=>e.i),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24]),import.meta.url).then(e=>e.notify)),D}function Qt(){qe("/settings?tab=connections#voice").catch(e=>{zt.error("Failed to open voice settings from setup toast",e)})}function Zt(){return{label:a.hardwareConsole_voice_openSettings_label(),onClick:()=>Qt()}}function pi(){$t().then(e=>{e.error(a.hardwareConsole_voice_noKey_error(),{id:Kt,action:Zt()})})}const fi=n.createSelector(e=>e.externalEditors.selectedAction),Xt=n.createSelector(e=>e.externalEditors.editors),Jt=n.createSelector(e=>{const t=k(Xt.select(e)),r=e.externalEditors.editorOrder??[];if(!r.length)return t;const s=new Map(t.map(c=>[c.id,c])),i=r.flatMap(c=>{const l=s.get(c);return l?[l]:[]}),o=new Set(r);return[...i,...t.filter(({id:c})=>!o.has(c))]}),gi=n.createSelector(e=>e.externalEditors.editorOrder??[]),hi=n.createSelector(e=>e.externalEditors.loading),mi=n.createSelector(e=>e.externalEditors.lastFetched),Yt=n.createSelector(e=>e.externalEditors.hiddenEditorIds),bi=n.createSelector((e,t)=>{if(!(t?Le.select(e,t):De.select(e)))return[];const s=Yt.select(e);return Jt.select(e).filter(i=>i.installed&&!s.includes(i.id))});function er(e){return e.catalogProfiles.some(t=>typeof t.remoteCompatible=="boolean")||e.defaultRemoteIncompatibility||e.profileDefaults.some(t=>typeof t.remoteCompatible=="boolean")?"supported":e.catalogProfiles.length>0?"unsupported":e.profilesLoadStatus==="idle"?"unknown":"unsupported"}function Si(e,t,r){if(X(e)){const s=t.find(i=>i.providerRef===e);return s?.remoteCompatible!==!1?null:s.remoteIncompatibility??{reason:"unknown",keys:[]}}return r?.[e]??null}function _i(e,t){return e.reason==="account-folder"?a.chat_modelPicker_remoteAccountFolder_description({backend:t}):a.chat_modelPicker_remoteIncompatible_description()}const tr=1440*60*1e3;function vi(e,t){if(!e?.capabilities)return"missing";const r=e.observedAt?Date.parse(e.observedAt):Number.NaN;return Number.isFinite(r)&&t-r>tr?"stale":"fresh"}const Ei=new Set(["cli-missing","prerequisite-missing"]),rr=new Set(["signed-out","auth-failed"]);function sr(e){return rr.has(e)}function ki(e,t){if(X(t))return!1;const r=ke(t),s=e?.capabilities?.providers.find(i=>i.id===r);return!!s&&sr(s.status)}const ir={macos:"macOS",linux:"Linux",windows:"Windows"},nr={aarch64:"arm64",arm64:"arm64",x86_64:"x64",x64:"x64"};function v(e,t){const r=[e&&(ir[e]??e),t&&(nr[t]??t)].filter(s=>!!s);return r.length?r.join(" "):null}function ar(e){return e?.placement?.target==="remote"||e?.placement?.target==="e2b"}const or=new Set(["running","paused","resuming","pausing","stopping"]);function cr(e,t){if(e.placementError)return null;if(e.cloudStart)return"starting";if(!e.nodeId)return e.effectiveIsolation==="pending"?"starting":null;const r=t?.cloud?.state;return r&&or.has(r)?r:e.effectiveIsolation==="pending"?"starting":null}function ie(e,t){if(!e||!ar(e))return null;const r=e.nodeId??e.placement?.nodeId??"",s=t&&t.id===r?t:null;if(e.placement?.target==="e2b")return{nodeId:r,name:e.nodeName?.trim()||"E2B",platform:v(s?.platform?.os,s?.platform?.arch),state:"ready",cloud:{state:cr(e,s)}};const i=v(e.placement?.os,e.placement?.arch)??v(s?.platform?.os,s?.platform?.arch),o=s?.state==="revoked"?"revoked":s?.state==="unreachable"||e.nodeState==="offline"?"unreachable":"ready";return{nodeId:r,name:e.nodeName?.trim()||s?.name||a.remoteAgent_location_unknownMachine(),platform:i,state:o}}function Ai(e,t){if(!e)return null;const r=t&&t.id===e?t:null;return{nodeId:e,name:r?.name||a.remoteAgent_location_unknownMachine(),platform:v(r?.platform?.os,r?.platform?.arch),state:r?.state==="revoked"?"revoked":r?.state==="unreachable"?"unreachable":"ready"}}function ne(e){switch(e){case"starting":return a.cloudMachines_agent_starting();case"running":return a.cloudMachines_agent_running();case"paused":return a.cloudMachines_agent_paused();case"resuming":return a.cloudMachines_agent_resuming();case"pausing":return a.cloudMachines_agent_pausing();case"stopping":return a.cloudMachines_agent_stopping();default:return null}}function yi(e){const t=ne(e.cloud?.state);return t?a.cloudMachines_agent_chip({machine:e.name,state:t}):e.name}function Mi(e){if(e.cloud){const r=ne(e.cloud.state),s=a.remoteAgent_location_tooltipNoPlatform({machine:e.name});return r?a.remoteAgent_location_tooltipWithState({location:s,state:r}):s}const t=e.platform?a.remoteAgent_location_tooltip({machine:e.name,platform:e.platform}):a.remoteAgent_location_tooltipNoPlatform({machine:e.name});switch(e.state){case"unreachable":return a.remoteAgent_location_tooltipWithState({location:t,state:a.remoteMachines_state_unreachable_label()});case"revoked":return a.remoteAgent_location_tooltipWithState({location:t,state:a.remoteMachines_state_revoked_label()});default:return t}}function ae(e,t){return!e||!t?null:e.placementError?"failed":t.state==="revoked"?"revoked":t.state==="unreachable"?"unreachable":e.effectiveIsolation==="pending"||e.cloudStart?"starting":e.setup?.state==="failed"?"setup-failed":null}function oe(e){if(!e.endsWith("}"))return null;for(let t=e.indexOf(" {");t>=0;t=e.indexOf(" {",t+1))try{const r=JSON.parse(e.slice(t+1));if(r&&typeof r=="object"&&typeof r.code=="string")return{message:e.slice(0,t).trim(),data:r}}catch{}return null}function lr(e,t){const r=e.detail??"",s=oe(r),i=e.code==="machine-update-required"||s?.data.code==="machine-update-required";if(i&&s?.data.reason==="prepared-checkout")return{updateRequired:i,message:a.remoteAgent_updateRequired_preparedCheckout({machine:t})};const o=K(s?.data),c=o??(e.code?K({code:e.code}):null);return c?{updateRequired:i,message:s?.message||r,cloud:c,cloudDetailKnown:!!o}:{updateRequired:i,message:s?.message||r}}function Ri(e){if(e?.placement?.target!=="e2b"||!e.placementError||e.status!==Ae.Error)return null;const t=lr(e.placementError,"");return t.cloud?t:null}const ur=["attachments-too-large-for-machine:","node-prompt-too-large:"],dr="remote-agent-unsupported:";function Q(e){return new Intl.NumberFormat(void 0,{maximumFractionDigits:1}).format(e/1048576)}function wi(e){const t=oe(e)?.message??e;for(const s of ur){const i=t.indexOf(s);if(i<0)continue;const o=t.slice(i+s.length).trim().replace(/^[a-z][\w]*(?:\.[\w]+)+:\s*/i,""),c=/come to (\d+) bytes\b.*?over its (\d+)-byte limit/.exec(o);return c?a.remoteAgent_attachmentsTooLargeSized_error({size:Q(Number(c[1])),limit:Q(Number(c[2]))}):o?a.remoteAgent_attachmentsTooLarge_error({detail:o}):a.remoteAgent_attachmentsTooLargeNoDetail_error()}const r=t.indexOf(dr);return r>=0&&/attachment/i.test(t.slice(r))?a.remoteAgent_attachmentsUnsupported_error():null}function Ci(e){return e?.placement?.target==="e2b"&&ae(e,ie(e))==="starting"}function Pi(e,t){if(e?.placement?.target!=="e2b")return!1;const r=ie(e,t);return r?.cloud?.state==="resuming"&&ae(e,r)===null}const M="",W="cloud:";function ce(e){return`${W}${e}`}function le(e){return e?.startsWith(W)&&e.slice(W.length)||null}function pr(e,t){return e?.find(r=>ce(r.cloudMachineId)===t&&r.unavailableReason===null)}const fr=new Set(["connected","disconnected"]);function gr(e){switch(e){case"unreachable":return a.remoteMachines_state_unreachable_label();case"revoked":return a.remoteMachines_state_revoked_label();case"update-required":return a.remoteMachines_state_updateRequired_label();default:return}}function q(e){return fr.has(e.state)}function hr({backendLabel:e,backendPlatform:t,machines:r,cloud:s}){const i=[{id:M,label:e,platform:v(t?.os,t?.arch),disabled:!1},...r.map(o=>{const c=v(o.platform?.os,o.platform?.arch);return q(o)?{id:o.id,label:o.name,platform:c,disabled:!1}:{id:o.id,label:o.name,platform:c,disabled:!0,reason:gr(o.state)}})];for(const o of s??[])i.push({id:ce(o.cloudMachineId),label:o.label,platform:null,kind:"cloud",disabled:o.unavailableReason!==null,...o.unavailableReason?{reason:o.unavailableReason}:{hint:a.cloudMachines_startOn_hint()}});return i}function mr({remoteMachinesVisible:e,supported:t,machines:r,cloud:s}){return e&&t&&(r.some(q)||(s??[]).some(i=>i.unavailableReason===null))}function br(e,t,r){if(!e)return M;if(le(e))return pr(r,e)?e:M;const s=t.find(i=>i.id===e);return s&&q(s)?s.id:M}function Ti(e,{cloudEntries:t=!1}={}){const r=le(e);return r?t?{target:"e2b",checkout:"isolated",cloudMachineId:r}:{target:"e2b",checkout:"isolated"}:e?{target:"remote",checkout:"isolated",nodeId:e}:void 0}function Fi({groups:e,providerRef:t,model:r}){const s=c=>c.options.filter(l=>!l.disabled),i=e.find(c=>c.key===t),o=i?s(i):[];if(r){const c=ye(r).modelId;if(o.some(l=>l.value===c))return null}else if(o.length>0)return null;if(i&&o.length>0)return{providerId:i.key,modelId:o[0].value};for(const c of e){if(c.key==="default")continue;const l=s(c);if(l.length>0)return{providerId:c.key,modelId:l[0].value}}return null}const Sr=n.createSelector(e=>ot.select(e)&&e.remoteMachines?.supported===!0),j=n.createSelector(e=>Object.values(e.remoteMachines?.machines??{}).sort((t,r)=>t.name.localeCompare(r.name))),Ii=n.createSelector(e=>e.remoteMachines.localFingerprint),Oi=n.createSelector(e=>e.remoteMachines.pending),Li=n.createSelector(e=>e.remoteMachines.failures),Di=n.createSelector(e=>e.remoteMachines.executorBackends??[]),_r=n.createSelector((e,t)=>{if(t===Me)return a.layout_daemonStatus_localConnection_label();const r=m(e.connections.connections,t);return r?ze(r):t}),vr=n.createSelector(e=>_r.select(e,e.connections.windowBackendId)),xi=n.createSelector((e,t)=>(t?e.remoteMachines.machines[t]??e.cloudMachines?.machines[t]:void 0)??null),Ni=n.createSelector((e,t)=>{const r=e.providerSettings?.profiles;return er({catalogProfiles:Ne.select(e,t),defaultRemoteIncompatibility:xe.select(e,t),profileDefaults:Object.values(r?.defaults??{}),profilesLoadStatus:r?.loadStatus??"idle"})}),Bi=n.createSelector(e=>Object.fromEntries(Object.values(e.providerSettings?.profiles?.defaults??{}).map(t=>[t.baseProviderId,t.env.length>0]))),ue=n.createSelector(e=>mr({remoteMachinesVisible:Sr.select(e),supported:e.remoteMachines?.initialAgentPlacement===!0,machines:j.select(e),cloud:G(e)}));function Er(e){const t=m(e.connections.connections,e.connections.windowBackendId);return t?.hostOs?{os:t.hostOs,arch:t.hostArch}:void 0}const Wi=n.createSelector(e=>ue.select(e)?hr({backendLabel:vr.select(e),backendPlatform:Er(e),machines:j.select(e),cloud:G(e)}):[]),Vi=n.createSelector((e,t,r)=>ue.select(e)?br(t,j.select(e),de(e,r)):M);function de(e,t){const r=G(e);if(!r||!t)return r;const s=e.cloudMachines?.providers??{};return r.map(i=>{if(i.unavailableReason)return i;const o=Ke(e,t,s[i.cloudMachineId]??null);return o?{...i,unavailableReason:o}:i})}const Gi=n.createSelector((e,t)=>de(e,t));function Ui(e,t){if(!e||!t||t===e.providerId)return!1;const r=e.providerSettings[t];return!!(r&&[r.defaultModel,...Object.values(r.typeOverrides??{})].some(s=>typeof s=="string"&&s.includes(":")))}let kr=0;function Ar(e,t){const r=++kr;return n.dispatch(we(e,t,r)),r}function Hi(e,t,r){n.dispatch(Re(e,t,r))}async function pe(e,t,r,s){const i=crypto.randomUUID(),o=s?.source??"control";try{return(await n.dispatch(Ce({requestId:i,consumerId:o,agentId:e,workspaceId:t,operation:r,connection:J.select(n.state)},{...s,intent:s?.intent??Ar(e,t)}))).status==="success"}finally{n.dispatch(Pe(i,o))}}async function qi(e,t,r,s,i){return pe(e,t,{kind:"effort",effort:r,previous:s},i)}async function ji(e,t,r,s,i){return pe(e,t,{kind:"reconcile",current:r??null,levels:s},i)}const yr=n.createSelector((e,t)=>k(e.agentModel.mutations).filter(r=>r.consumerId===t)),zi=n.createSelector((e,t)=>yr.select(e,t).some(r=>r.status==="pending")),Ki=n.createSelector((e,t,r)=>{const s=e.agentSessions.byAgentId[t],i=Be.select(e,t),o=$e.select(e,t),c=e.daemonHealth.stats?.protocolVersion,l=Qe(c),g=l?Ze(s?.model,null,o):s?.model;return{session:s,providerId:i,levels:o,legacy:l,identity:JSON.stringify([g,i]),connection:J.select(e),canWrite:!!s&&s.workspaceId===r&&!We.select(e,r)}});function Mr(e,t,r=!1){return e!=="auggie"||t===!0||r}const $i=n.createSelector(e=>Xe.select(e)?null:U.select(e)),Rr=n.createSelector(e=>e.providerCatalog?.workspaceEpoch??0),f=n.createSelector((e,t)=>t?e.providerCatalog?.byWorkspaceId?.[t]:void 0),Qi=n.createSelector(e=>Object.keys(e.providerCatalog?.byWorkspaceId??{})),Zi=n.createSelector((e,t)=>!!f.select(e,t)&&e.providerCatalog.workspaceSnapshotEpochs?.[t]===Rr.select(e)),fe=n.createSelector((e,t)=>t?f.select(e,t)?.catalog.providers??[]:Ve.select(e)),ge=n.createSelector((e,t)=>{if(!t)return Y.select(e);const r=f.select(e,t)?.settings.find(s=>s.path==="model.defaultProvider")?.value;return typeof r=="string"?r:""}),z=n.createSelector((e,t)=>{if(!t)return Je.select(e);const r=f.select(e,t)?.settings.find(s=>s.path==="providers.enabled")?.value;return r&&typeof r=="object"?r:{}}),he=n.createSelector((e,t)=>{if(!t)return Ye.select(e);const r=z.select(e,t),s=ge.select(e,t),i=f.select(e,t)?.readiness??{};return fe.select(e,t).filter(o=>o.visible&&(!o.canBeDisabled||r[o.id]||o.id===s)&&i[o.id]?.available&&(o.id!=="antigravity"||ee(o.id,i[o.id]?.authenticated))).map(o=>o.id)}),Xi=n.createSelector((e,t)=>{const r=z.select(e,t),s=t?f.select(e,t)?.readiness??{}:U.select(e);return fe.select(e,t).filter(i=>Mr(i.id,s[i.id]?.available,r[i.id]===!0)).map(i=>i.id)}),Ji=n.createSelector((e,t)=>t?he.select(e,t):et.select(e)),Yi=n.createSelector((e,t)=>b.select(e,t)),en=n.createSelector((e,t)=>t?!!f.select(e,t):tt.select(e)),tn=n.createSelector((e,t)=>{if(!t)return rt.select(e);const r=f.select(e,t)?.settings??[],s=ge.select(e,t),i=r.find(l=>l.path==="model.providerDefaults")?.value,o=i&&typeof i=="object"?i[s]:void 0;if(typeof o=="string")return o;const c=r.find(l=>l.path==="model.default")?.value;return typeof c=="string"?c:""}),rn=n.createSelector((e,t)=>t?Object.fromEntries(Object.entries(e.providerModels?.byWorkspaceId?.[t]??{}).flatMap(([r,s])=>s.warning?[[r,s.warning]]:[])):st.select(e)),sn=n.createSelector((e,t)=>t?Object.fromEntries(Object.entries(e.providerModels?.byWorkspaceId?.[t]??{}).map(([r,s])=>[r,s.stale===!0])):it.select(e)),nn=n.createSelector((e,t)=>t?Object.fromEntries(Object.entries(e.providerModels?.byWorkspaceId?.[t]??{}).flatMap(([r,s])=>s.warning&&s.warningKind?[[r,s.warningKind]]:[])):nt.select(e)),an=n.createSelector((e,t,r)=>{if(!r)return at.select(e,t);const s=z.select(e,r),i=f.select(e,r);return he.select(e,r).filter(o=>o!==t&&(s[o]||i?.catalog.providers.find(c=>c.id===o)?.canBeDisabled===!1)&&ee(o,i?.readiness[o]?.authenticated))}),on=n.createSelector((e,t)=>t?f.select(e,t)?.readiness??{}:U.select(e)),wr={},cn=n.createSelector(e=>e.providerSettings?.profiles?.status??wr),ln=n.createSelector(e=>e.directoryPicker.listing),un=n.createSelector(e=>e.directoryPicker.loading),dn=n.createSelector(e=>e.directoryPicker.error),pn=n.createSelector(e=>e.directoryPicker.pathError),fn=n.createSelector(e=>e.directoryPicker.createError),Z={},Cr=n.createSelector((e,t)=>t?e.providerCatalog?.byWorkspaceId?.[t]?.mcpServers??[]:e.mcpSettings.servers),gn=n.createSelector((e,t,r)=>{const s=e.providerCatalog?.byWorkspaceId?.[t];return s?s.mcpServers?.find(i=>i.id===r)?.name:e.providerCatalog?.mcpServerNamesByWorkspaceId?.[t]?.[r]}),hn=n.createSelector(e=>e.mcpSettings.loading),mn=n.createSelector(e=>e.mcpSettings.error),bn=n.createSelector(e=>e.mcpSettings.mutationError??null),Sn=n.createSelector(e=>e.mcpSettings.enabled),Pr=n.createSelector(e=>e.mcpSettings.disabledServers),Tr=n.createSelector(e=>e.mcpSettings.statusMap),Fr=n.createSelector(e=>e.mcpSettings.toolsMap),Ir=n.createSelector((e,t)=>{if(!t)return e.mcpSettings.errorMessages;const r=e.providerCatalog?.byWorkspaceId?.[t],s=new Map(r?.mcpServers?.map(i=>[i.id,A(i)])??[]);return Object.fromEntries((r?.mcpStatuses??[]).flatMap(i=>{const o=s.get(i.serverId);return o&&i.lastError?[[o,i.lastError]]:[]}))}),Or=n.createSelector((e,t)=>t?e.mcpSettings.byWorkspaceId[t]?.disabledServers??Z:Z),_n=n.createSelector((e,t)=>Object.keys(Or.select(e,t))),vn=n.createSelector(e=>{const t=Cr.select(e),r=Tr.select(e),s=Fr.select(e),i=Pr.select(e),o=Ir.select(e);return t.map(c=>{const l=A(c)in i,g=s[A(c)]||[];let S=r[A(c)]||"disconnected";return l&&(S="disabled"),{...c,disabled:l,status:S,tools:g,toolCount:g.length,errorMessage:o[A(c)]}})});n.createSelector((e,t)=>e.mcpSettings.errorMessages[t]);const En=n.createSelector(e=>e.mcpSettings.lastImportedCount),kn=n.createSelector(e=>e.mcpSettings.advancedSaveStatus),An=n.createSelector(e=>e.mcpSettings.advancedSaveError),yn=["agentFeatures.backgroundHooks","agentFeatures.hostExec","agentFeatures.scripts","agentFeatures.terminalAccess","agentFeatures.browserAutomation","agentFeatures.desktopControl","agentFeatures.richChatBlocks","agentFeatures.structuredQuestions","agentFeatures.secretRequests","agentFeatures.attentionRequests","agentFeatures.stateSnapshot","agentFeatures.prMonitor","agentFeatures.taskGraph","agentFeatures.peerAgents","agentFeatures.mcpTools"],Lr=[{path:"agentFeatures.backgroundHooks",label:()=>a.settings_agentFeatures_backgroundHooks_label(),description:()=>a.settings_agentFeatures_backgroundHooks_description(),defaultValue:!0},{path:"agentFeatures.hostExec",label:()=>a.settings_agentFeatures_hostExec_label(),description:()=>a.settings_agentFeatures_hostExec_description(),defaultValue:!0},{path:"agentFeatures.scripts",label:()=>a.settings_agentFeatures_scripts_label(),description:()=>a.settings_agentFeatures_scripts_description(),defaultValue:!0},{path:"agentFeatures.terminalAccess",label:()=>a.settings_agentFeatures_terminalAccess_label(),description:()=>a.settings_agentFeatures_terminalAccess_description(),defaultValue:!0},{path:"agentFeatures.browserAutomation",label:()=>a.settings_agentFeatures_browserAutomation_label(),description:()=>a.settings_agentFeatures_browserAutomation_description(),defaultValue:!0},{path:"agentFeatures.desktopControl",label:()=>a.settings_agentFeatures_desktopControl_label(),description:()=>a.settings_agentFeatures_desktopControl_description(),defaultValue:!0},{path:"agentFeatures.richChatBlocks",label:()=>a.settings_agentFeatures_richChatBlocks_label(),description:()=>a.settings_agentFeatures_richChatBlocks_description(),defaultValue:!0},{path:"agentFeatures.structuredQuestions",label:()=>a.settings_agentFeatures_structuredQuestions_label(),description:()=>a.settings_agentFeatures_structuredQuestions_description(),defaultValue:!0},{path:"agentFeatures.secretRequests",label:()=>a.settings_agentFeatures_secretRequests_label(),description:()=>a.settings_agentFeatures_secretRequests_description(),defaultValue:!1},{path:"agentFeatures.attentionRequests",label:()=>a.settings_agentFeatures_attentionRequests_label(),description:()=>a.settings_agentFeatures_attentionRequests_description(),defaultValue:!0},{path:"agentFeatures.stateSnapshot",label:()=>a.settings_agentFeatures_stateSnapshot_label(),description:()=>a.settings_agentFeatures_stateSnapshot_description(),defaultValue:!0},{path:"agentFeatures.prMonitor",label:()=>a.settings_agentFeatures_prMonitor_label(),description:()=>a.settings_agentFeatures_prMonitor_description(),defaultValue:!0},{path:"agentFeatures.taskGraph",label:()=>a.settings_agentFeatures_taskGraph_label(),description:()=>a.settings_agentFeatures_taskGraph_description(),defaultValue:!0},{path:"agentFeatures.peerAgents",label:()=>a.settings_agentFeatures_peerAgents_label(),description:()=>a.settings_agentFeatures_peerAgents_description(),defaultValue:!0},{path:"agentFeatures.mcpTools",label:()=>a.settings_agentFeatures_mcpTools_label(),description:()=>a.settings_agentFeatures_mcpTools_description(),defaultValue:!0}],Mn=Object.fromEntries(Lr.map(e=>[e.path,e.defaultValue]));export{br as $,Ti as A,Pt as B,Mr as C,is as D,ai as E,Lr as F,te as G,Ui as H,$ as I,ki as J,ni as K,Ft as L,Ei as M,Ai as N,Fi as O,v as P,vi as Q,Ar as R,E as S,Mt as T,lr as U,ji as V,Hi as W,wi as X,Si as Y,_i as Z,Tt as _,Mn as a,jr as a$,Ls as a0,ei as a1,zi as a2,yr as a3,Ki as a4,os as a5,ps as a6,_r as a7,Ji as a8,ge as a9,Ys as aA,Di as aB,_s as aC,vs as aD,cs as aE,ds as aF,H as aG,lt as aH,ht as aI,mt as aJ,re as aK,gt as aL,ut as aM,ct as aN,pt as aO,ft as aP,Zr as aQ,Yr as aR,es as aS,rs as aT,zr as aU,$r as aV,Jr as aW,Qr as aX,Xr as aY,Kr as aZ,ts as a_,z as aa,Xi as ab,he as ac,fe as ad,sn as ae,nn as af,rn as ag,an as ah,on as ai,en as aj,tn as ak,Yi as al,vr as am,us as an,Bi as ao,gs as ap,fn as aq,dn as ar,ln as as,un as at,pn as au,gi as av,Es as aw,ws as ax,Ss as ay,Vi as az,yn as b,Qi as b$,ss as b0,ys as b1,Yt as b2,Jt as b3,bi as b4,hi as b5,ks as b6,As as b7,mi as b8,Ii as b9,Rs as bA,Cs as bB,bs as bC,Ms as bD,b as bE,fs as bF,Gi as bG,Wi as bH,ue as bI,ls as bJ,Xs as bK,Us as bL,Qs as bM,Zs as bN,qs as bO,Ks as bP,zs as bQ,Hs as bR,Gs as bS,Vs as bT,Js as bU,Ws as bV,js as bW,$s as bX,f as bY,Rr as bZ,Zi as b_,An as ba,kn as bb,Pr as bc,Sn as bd,mn as be,Ir as bf,En as bg,hn as bh,bn as bi,Cr as bj,vn as bk,Tr as bl,Fr as bm,fi as bn,ms as bo,cn as bp,xi as bq,Li as br,Oi as bs,j as bt,Sr as bu,Ni as bv,$i as bw,Et as bx,Ps as by,Ts as bz,M as c,_n as c0,gn as c1,ti as c2,si as c3,pi as c4,ce as c5,le as c6,jt as c7,ui as c8,Ds as c9,Os as ca,xs as cb,Is as cc,Zt as cd,Fs as ce,Ri as d,Ci as e,Pi as f,yi as g,ie as h,Mi as i,ae as j,qi as k,di as l,It as m,xt as n,ri as o,ii as p,hs as q,vt as r,_t as s,oi as t,Ns as u,Bs as v,ns as w,as as x,ci as y,li as z};
|
|
2
|
+
var me=Object.defineProperty;var be=(e,t,r)=>t in e?me(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var u=(e,t,r)=>be(e,typeof t!="symbol"?t+"":t,r);import{Hq as n,t3 as Se,n6 as k,n5 as m,lA as _e,xk as R,xl as x,xi as ve,xj as Ee,qO as X,x5 as ke,uq as K,c as Ae,Hc as ye,a8 as Me,b$ as Re,b_ as we,cd as Ce,cc as Pe,n8 as A}from"./CRwmdgt6.js";import{cD as Te,cs as Fe,bt as Ie,c5 as Oe,ck as Le,c7 as De,cH as xe,cL as Ne,cB as J,aw as Be,bP as We,cI as Ve}from"./KQTrHxko.js";import{a as Ge,i as Ue}from"./BkBdyRjM.js";import{c as V}from"./ChTqQfQN.js";import{i as I}from"./D4jXWSLn.js";import{bo as a,_ as He}from"./7rNOGHzs.js";import{n as qe}from"./PR2rc_KV.js";import{ax as je,J as Y,k as ze,bL as G,g as Ke,K as $e,bM as Qe,c as Ze,ay as Xe,bu as U,ab as Je,aO as Ye,t as ee,Q as et,at as tt,bA as rt,O as st,L as it,M as nt,bx as at}from"./CB-g50lR.js";import{u as ot}from"./C_n9DeKj.js";const jr=n.createSelector(e=>Te.select(e)?.capabilities.gitlabCheckout===!0),zr=n.createSelector(e=>e.gitlabAuth.host),Kr=n.createSelector(e=>e.gitlabAuth.instanceBaseUrl??e.gitlabAuth.host),$r=n.createSelector(e=>Se(e.gitlabAuth.instanceBaseUrl??e.gitlabAuth.host)??""),Qr=n.createSelector(e=>e.gitlabAuth.isCancelling),Zr=n.createSelector(e=>e.gitlabAuth.cancelOutcome),Xr=n.createSelector(e=>e.gitlabAuth.isConfigured),Jr=n.createSelector(e=>e.gitlabAuth.isAuthenticating),Yr=n.createSelector(e=>e.gitlabAuth.deviceFlow),es=n.createSelector(e=>e.gitlabAuth.deviceGrantSupported),ts=n.createSelector(e=>e.gitlabAuth.user),rs=n.createSelector(e=>e.gitlabAuth.error);n.createSelector(e=>e.gitlabAuth.method);const ss=n.createSelector(e=>e.gitlabAuth.statusReady===!0),E=[{id:"pr-reviewer",icon:"pr-reviewer",get name(){return a.specialists_builtin_prReviewer_name()},get description(){return a.specialists_builtin_prReviewer_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"ui-designer",icon:"ui-designer",get name(){return a.specialists_builtin_uiDesigner_name()},get description(){return a.specialists_builtin_uiDesigner_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"vulnerability-scanner",icon:"pr-reviewer",get name(){return a.specialists_builtin_vulnerabilityScanner_name()},get description(){return a.specialists_builtin_vulnerabilityScanner_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"developer",icon:"verifier",get name(){return a.specialists_builtin_developer_name()},get description(){return a.specialists_builtin_developer_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"product-manager",icon:"coordinator",get name(){return a.specialists_builtin_productManager_name()},get description(){return a.specialists_builtin_productManager_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"maintenance-coordinator",icon:"ralph",get name(){return a.specialists_builtin_maintenanceCoordinator_name()},get description(){return a.specialists_builtin_maintenanceCoordinator_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"chief-of-staff",icon:"chief-of-staff",get name(){return a.specialists_builtin_chiefOfStaff_name()},get description(){return a.specialists_builtin_chiefOfStaff_description()},hidden:!0,defaultBehaviorPrompt:"",promptUnavailable:!0}],te=new Set(["pr-reviewer"]),is="developer";function ns(e){return E.find(t=>t.id===e)}const ct=n.createSelector(e=>e.githubAuth.mutationRequestId),lt=n.createSelector(e=>e.githubAuth.callbacksCancelled),ut=n.createSelector(e=>e.githubAuth.isDisconnecting),re=n.createSelector(e=>e.githubAuth.isAuthenticated),dt=n.createSelector(e=>e.githubAuth.statusSettled===!0),pt=n.createSelector(e=>e.githubAuth.requiresDaemonAuth),ft=n.createSelector(e=>e.githubAuth.user),gt=n.createSelector(e=>e.githubAuth.isAuthenticating),ht=n.createSelector(e=>e.githubAuth.deviceFlow),mt=n.createSelector(e=>e.githubAuth.error),as=Object.freeze(Object.defineProperty({__proto__:null,selectGitHubAuthCallbacksCancelled:lt,selectGitHubAuthDeviceFlow:ht,selectGitHubAuthError:mt,selectGitHubAuthIsAuthenticated:re,selectGitHubAuthIsAuthenticating:gt,selectGitHubAuthIsDisconnecting:ut,selectGitHubAuthMutationRequestId:ct,selectGitHubAuthRequiresDaemonAuth:pt,selectGitHubAuthStatusSettled:dt,selectGitHubAuthUser:ft},Symbol.toStringTag,{value:"Module"}));function d(e){return e??""}function bt(e,t){const r=e??[],s=t??[];return r.length===s.length&&r.every((i,o)=>d(i.provider)===d(s[o].provider)&&i.model===s[o].model&&i.hint===s[o].hint&&d(i.reasoningEffort)===d(s[o].reasoningEffort))}function $(e,t){if(e.source!=="user"||!t?.ignoreModelPin&&(e.model||e.codingAgent))return!1;const r=e.bundled;return r?d(e.name)===d(r.name)&&d(e.description)===d(r.description)&&d(e.behaviorPrompt)===d(r.behaviorPrompt)&&d(e.roleReminder)===d(r.roleReminder)&&d(e.reasoningEffort)===d(r.reasoningEffort)&&bt(e.modelOptions,r.modelOptions):!1}const os=n.createSelector(e=>e.specialists.bundledSpecialists),St=n.createSelector(e=>e.specialists.fileSpecialists),cs=n.createSelector(e=>k(St.select(e))),ls=n.createSelector(e=>e.specialists.userOverrides);n.createSelector(e=>e.specialists.overridesLoaded);const us=n.createSelector(e=>e.specialists.customSpecialistsLoaded),ds=n.createSelector(e=>e.specialists.fileSpecialistsLoaded),ps=n.createSelector(e=>e.specialists.bundledSpecialistsLoaded),fs=n.createSelector(e=>e.specialists.specialistsFolderPath),gs=n.createSelector((e,t)=>{if(!t)return e.specialists.defaultSpecialistId??"";const r=e.providerCatalog?.byWorkspaceId?.[t]?.settings.find(s=>s.path==="specialists.default")?.value;return typeof r=="string"?r:""});n.createSelector(e=>e.specialists.providerModelOverrides);const O=n.createSelector((e,t)=>!(te.has(t)&&!re.select(e)));function _t(e,t){return t?e:e.filter(r=>!te.has(r.id))}function vt(e,t){return _t(e,t).filter(r=>!r.hidden)}function hs(e,t){return vt(e,t).filter(r=>r.role!=="internal")}const b=n.createSelector((e,t)=>{if(t)return(e.providerCatalog?.byWorkspaceId?.[t]?.specialists??[]).map(l=>({...l,defaultModel:l.model,defaultBehaviorPrompt:l.behaviorPrompt??l.prompt??"",defaultAgentType:l.agentType}));const r=k(e.specialists.fileSpecialists),s=e.specialists.bundledSpecialists,i=new Set,o=[];for(const l of r)!i.has(l.id)&&O.select(e,l.id)&&(i.add(l.id),o.push({id:l.id,name:l.name,description:l.description,codingAgent:l.codingAgent,defaultModel:l.model||void 0,defaultBehaviorPrompt:l.behaviorPrompt,roleReminder:l.roleReminder,source:l.source,importedFrom:l.importedFrom,unsupportedFields:l.unsupportedFields,requiredSkills:l.requiredSkills,missingSkills:l.missingSkills,hidden:l.hidden,resolvedModel:l.resolvedModel,resolvedProvider:l.resolvedProvider,modelOptions:l.modelOptions,reasoningEffort:l.reasoningEffort,role:l.role,teamAgents:l.teamAgents,icon:l.icon}));for(const l of s)!i.has(l.id)&&O.select(e,l.id)&&(i.add(l.id),o.push(l));if(!e.specialists.bundledSpecialistsLoaded&&r.length===0&&s.length===0)for(const l of E)!i.has(l.id)&&O.select(e,l.id)&&(i.add(l.id),o.push(l));const c=new Map;for(const l of E)c.has(l.id)||c.set(l.id,c.size);for(const l of s)c.has(l.id)||c.set(l.id,c.size);return o.sort((l,g)=>{const S=c.has(l.id),F=c.has(g.id);return S&&F?(c.get(l.id)??0)-(c.get(g.id)??0):S&&!F?-1:!S&&F?1:l.name.localeCompare(g.name)}),o}),ms=n.createSelector(e=>{const t=b.select(e).filter(s=>s.role==="orchestrator");if(t.length===0)return null;const r=new Set([...E.map(({id:s})=>s),...e.specialists.bundledSpecialists.map(({id:s})=>s)]);return t.sort((s,i)=>+!r.has(s.id)-+!r.has(i.id)||s.id.localeCompare(i.id)),t[0]}),Et=n.createSelector((e,t)=>{const r=m(e.specialists.fileSpecialists,t);if(r)return{id:r.id,name:r.name,description:r.description,source:r.source};const s=e.specialists.bundledSpecialists.find(i=>i.id===t);if(s)return{id:s.id,name:s.name,description:s.description,source:"builtin"};if(!e.specialists.bundledSpecialistsLoaded&&k(e.specialists.fileSpecialists).length===0&&e.specialists.bundledSpecialists.length===0){const i=E.find(o=>o.id===t);if(i)return{id:i.id,name:i.name,description:i.description,source:"builtin"}}return null}),bs=n.createSelector((e,t)=>Et.select(e,t)?.name??null),Ss=n.createSelector((e,t,r)=>{const i=b.select(e,r).find(o=>o.id===t);return i?i.defaultModel?i.defaultModel:i.resolvedModel??"":""}),_s=n.createSelector((e,t,r)=>b.select(e,r).find(o=>o.id===t)?.defaultModel||void 0),vs=n.createSelector((e,t,r)=>b.select(e,r).find(o=>o.id===t)?.reasoningEffort||void 0),Es=n.createSelector((e,t,r)=>{const i=b.select(e,r).find(o=>o.id===t);return i?i.defaultBehaviorPrompt:""});function w(e,t){return t.some(r=>r.id===e)||E.some(r=>r.id===e)}const ks=n.createSelector((e,t,r)=>{if(r){const s=e.providerCatalog?.byWorkspaceId?.[r]?.specialists.find(i=>i.id===t);return!s||s.importedFrom?!1:s.source==="bundled"||s.source==="user"&&w(t,e.specialists.bundledSpecialists)}return w(t,e.specialists.bundledSpecialists)}),As=n.createSelector((e,t,r)=>r?!!H.select(e,t,r):!!m(e.specialists.fileSpecialists,t)),ys=n.createSelector((e,t,r)=>{if(r){const o=H.select(e,t,r);return!o||o.importedFrom||o.source==="project"?!1:w(t,e.specialists.bundledSpecialists)&&!$(o)}if(!w(t,e.specialists.bundledSpecialists))return!1;const i=m(e.specialists.fileSpecialists,t);return!i||i.source!=="user"?!1:!$(i)}),H=n.createSelector((e,t,r)=>{if(r){const s=e.providerCatalog?.byWorkspaceId?.[r]?.specialists.find(i=>i.id===t);return!s||s.source==="bundled"?void 0:{...s,source:s.source,model:s.model??"",behaviorPrompt:s.behaviorPrompt??s.prompt??"",filePath:s.path??""}}return m(e.specialists.fileSpecialists,t)}),Ms=n.createSelector((e,t,r)=>{const s=H.select(e,t,r);return r&&!s?e.providerCatalog?.byWorkspaceId?.[r]?.specialists.some(i=>i.id===t)?"Built-in":null:s?.source==="project"?"Project":s?.source==="user"?"User":e.specialists.bundledSpecialists.some(i=>i.id===t)?"Built-in":null}),Rs=n.createSelector((e,t,r)=>{if(r)return e.providerCatalog?.byWorkspaceId?.[r]?.specialists.find(o=>o.id===t)?.path;const s=m(e.specialists.fileSpecialists,t);if(s)return s.filePath;const i=e.specialists.bundledSpecialists.find(o=>o.id===t);if(i&&"filePath"in i)return i.filePath}),ws=n.createSelector((e,t,r)=>{if(r){const i=b.select(e,r).find(l=>l.id===t),o=i?.codingAgent||i?.resolvedProvider;if(o)return Fe.select(e,o,r);const c=Ie.select(e,r);return e.providerCatalog?.byWorkspaceId?.[r]?.readiness[c]?.available?c:""}const s=m(e.specialists.fileSpecialists,t);return s?.codingAgent?s.codingAgent:kt.select(e,t)}),kt=n.createSelector((e,t)=>{const s=b.select(e).find(i=>i.id===t);return s?.codingAgent?s.codingAgent:je.select(e)?Y.select(e):""}),Cs=n.createSelector((e,t)=>{if(t)return e.providerCatalog?.byWorkspaceId?.[t]?.importDiagnostics??[];const r=e.specialists.importDiagnostics;return r?k(r):[]}),Ps=n.createSelector((e,t)=>e.specialists.creationByContext?.[t]??_e),Ts=n.createSelector(e=>Object.values(e.specialists.creationByContext??{}).flatMap(t=>t.specialistId?[t.specialistId]:[])),L=V("Clipboard");async function Fs(e){let t;if(Ge())try{const r=await Ue("system:write-clipboard",{text:e});if(r?.success===!1)throw new Error(r.error||"Electron clipboard write failed");return}catch(r){t=r,L.warn("Electron clipboard write failed; falling back to browser clipboard",{error:r})}if(typeof navigator<"u"&&navigator.clipboard?.writeText)try{await navigator.clipboard.writeText(e);return}catch(r){throw L.error("Browser clipboard write failed",r,{electronError:t}),r}throw L.error("No clipboard write API is available",void 0,{electronError:t}),t instanceof Error?t:new Error("Clipboard write API unavailable")}const At=V("WorkspaceValidation");async function Is(e,t=!1,r=!1){if(!e||e.trim().length===0)return{valid:!1,error:a.workspace_validation_repoPathRequired_error(),suggestion:a.workspace_validation_repoPathRequired_suggestion()};const s=e.trim();return yt(s)?Rt(s):wt(s,t,r)}function yt(e){return[/^https?:\/\/github\.com\//i,/^git@github\.com:/i,/^github\.com\//i,/^([a-zA-Z0-9\-_]+)\/([a-zA-Z0-9\-_\.]+)$/].some(r=>r.test(e.trim()))}function Mt(e){const t=e.trim(),r=[/^https?:\/\/github\.com\/([^\/]+)\/([^\/]+)$/i,/^git@github\.com:([^\/]+)\/([^\/]+)$/i,/^github\.com\/([^\/]+)\/([^\/]+)$/i];for(const i of r){const o=t.match(i);if(o){const c=o[2].replace(/\.git$/,"");return c?{owner:o[1],repo:c}:null}}const s=t.match(/^([a-zA-Z0-9\-_]+)\/([a-zA-Z0-9\-_\.]+)$/);if(s&&!t.includes("\\")&&!t.includes(":")){const i=s[2].replace(/\.git$/,"");return i?{owner:s[1],repo:i}:null}return null}async function Rt(e){return Mt(e)?{valid:!0,warning:a.workspace_validation_githubCloneLocally_warning()}:{valid:!1,error:a.workspace_validation_invalidGithubUrl_error(),suggestion:a.workspace_validation_invalidGithubUrl_suggestion()}}async function wt(e,t=!1,r=!1){if(e.includes("\0"))return{valid:!1,error:a.workspace_validation_nullCharacters_error()};if(!e.startsWith("/")&&!e.startsWith("~")&&!e.startsWith(".")&&!e.includes(":\\")&&!/^[a-zA-Z]:\//.test(e))return{valid:!1,error:a.workspace_validation_pathNotAbsolute_error(),suggestion:a.workspace_validation_pathNotAbsolute_suggestion()};if(typeof window<"u"&&window.electronAPI)try{const s=await I("file:getDirectoryStatus",{path:e});if(s.success&&s.data){const c=s.data;return c.exists?c.isDirectory?c.isGitRepo?{valid:!0,isNewRepo:!1,directoryStatus:c}:c.isSubdirectoryOfGitRepo?{valid:!0,isNewRepo:!1,directoryStatus:c,warning:a.workspace_validation_insideParentRepo_warning({path:c.parentGitRoot??""})}:r?{valid:!0,isNewRepo:!1,directoryStatus:c}:t?c.isEmpty?{valid:!0,isNewRepo:!0,directoryStatus:c,warning:a.workspace_validation_emptyDirInit_warning()}:{valid:!0,isNewRepo:!0,directoryStatus:c,warning:a.workspace_validation_nonGitDirInit_warning()}:{valid:!1,error:a.workspace_repoSelector_notGitRepository_label(),directoryStatus:c}:{valid:!1,error:a.workspace_validation_notDirectory_error(),suggestion:a.workspace_validation_notDirectory_suggestion(),directoryStatus:c}:t?{valid:!0,isNewRepo:!0,directoryStatus:c,warning:a.workspace_validation_willCreateRepo_warning()}:{valid:!1,error:a.workspace_validation_dirNotExist_error(),suggestion:a.workspace_validation_dirNotExist_suggestion(),directoryStatus:c}}if(!(await I("file:exists",{path:e})).exists)return t?{valid:!0,isNewRepo:!0,warning:a.workspace_validation_willCreateRepo_warning()}:{valid:!1,error:a.workspace_validation_dirNotExist_error(),suggestion:a.workspace_validation_dirNotExistLegacy_suggestion()};const o=await I("git:isRepository",{path:e});if(!t&&o?.isRepository!==!0)return{valid:!1,error:o?.isRepository===!1?a.workspace_repoSelector_notGitRepository_label():a.workspace_compactInitializer_gitCheckUnknown_label()};if(!o.isRepository)return{valid:!0,isNewRepo:!0,warning:a.workspace_validation_nonGitInit_warning()}}catch(s){if(At.warn("Could not validate path existence",s),!t)return{valid:!1,error:a.workspace_compactInitializer_gitCheckUnknown_label()}}return{valid:!0,isNewRepo:!1}}function Os(e){if(!e||e.trim().length===0)return{valid:!0};const t=e.trim();return/[\s~^:?*\[\]\\]/.test(t)?{valid:!1,error:a.workspace_validation_branchPrefixInvalidChars_error(),suggestion:a.workspace_validation_branchChars_suggestion()}:t==="."||t===".."||t.startsWith(".")?{valid:!1,error:a.workspace_validation_branchPrefixDot_error()}:t.includes("..")||t.includes("//")?{valid:!1,error:a.workspace_validation_branchPrefixConsecutive_error()}:t.startsWith("/")?{valid:!1,error:a.workspace_validation_branchPrefixSlash_error()}:t.endsWith(".lock")?{valid:!1,error:a.workspace_validation_branchPrefixLock_error()}:t.length>50?{valid:!1,error:a.workspace_validation_branchPrefixTooLong_error()}:{valid:!0}}function Ls(e){if(!e||e.trim().length===0)return"";let t=e.trim().replace(/^[./]+/,"").replace(/[\s~^:?*\[\]\\]/g,"-").replace(/\.{2,}/g,"-").replace(/\/{2,}/g,"/").replace(/-{2,}/g,"-").replace(/^-+/,"").replace(/\.lock$/,"").toLowerCase();return t.length>0&&!t.endsWith("/")&&!t.endsWith("-")&&(t=t.includes("/")?`${t}/`:`${t}/`),t}function Ds(e){if(!e||e.trim().length===0)return{valid:!1,error:a.workspace_validation_branchNameRequired_error()};const t=e.trim();return/[\s~^:?*\[\]\\]/.test(t)?{valid:!1,error:a.workspace_validation_branchNameInvalidChars_error(),suggestion:a.workspace_validation_branchChars_suggestion()}:["HEAD",".",".."].includes(t)?{valid:!1,error:a.workspace_validation_branchNameReserved_error()}:t.includes("..")||t.includes("//")?{valid:!1,error:a.workspace_validation_branchNameConsecutive_error()}:t.startsWith("/")||t.endsWith("/")?{valid:!1,error:a.workspace_validation_branchNameSlash_error()}:t.endsWith(".lock")?{valid:!1,error:a.workspace_validation_branchNameLock_error()}:{valid:!0}}function xs(e){return!e||e.trim().length===0?{valid:!0}:e.trim().length>1e5?{valid:!1,error:a.workspace_validation_promptTooLong_error(),suggestion:a.workspace_validation_promptTooLong_suggestion()}:{valid:!0}}function Ns(e){const t=e.toLowerCase();return t.includes("maxbuffer")?a.workspace_gitError_maxBuffer():t.includes("clone")&&t.includes("timed out")?a.workspace_gitError_cloneTimeout():t.includes("json-rpc request timed out: workspace.create")?a.workspace_gitError_createTimeout():t.includes("timed out")&&["git","clone","fetch","worktree","pull","push","rebase","merge"].some(r=>t.includes(r))?a.workspace_gitError_gitTimeout():t.includes("git clone failed")?t.includes("could not read from remote")?a.workspace_gitError_cloneRemote():t.includes("authentication")||t.includes("permission denied")||t.includes("access denied")?a.workspace_gitError_cloneAuth():a.workspace_gitError_cloneFailed():t.includes("could not resolve any ref to create worktree")?a.workspace_gitError_worktreeRef():t.includes("failed to write file")?t.includes("eacces")||t.includes("permission denied")?a.workspace_gitError_writePermission():t.includes("enospc")||t.includes("disk space")?a.workspace_gitError_diskSpaceFree():t.includes("enoent")||t.includes("no such file")?a.workspace_gitError_writeNoEnt():e:t.includes("failed to read file")?t.includes("enoent")||t.includes("no such file")?a.workspace_gitError_readNotFound():t.includes("eacces")||t.includes("permission denied")?a.workspace_gitError_readPermission():e:t.includes("permission denied")?a.workspace_gitError_permissionDenied():t.includes("not found")||t.includes("enoent")?a.workspace_gitError_notFound():t.includes("already exists")?a.workspace_gitError_alreadyExists():t.includes("network")||t.includes("etimedout")?a.workspace_gitError_network():t.includes("authentication")||t.includes("401")?t.includes("private repositor")?e:a.workspace_gitError_authFailed():t.includes("rate limit")||t.includes("403")?a.workspace_gitError_rateLimit():t.includes("disk space")||t.includes("enospc")?a.workspace_gitError_diskSpace():e}const Ct=["idle","exited"];function Pt(e){return e===void 0||!Ct.includes(e)}function Bs(e){return e.status==="restarting"?"restarting":Pt(e.status)?"running":e.status==="idle"?"idle":e.exitCode===0?"succeeded":e.exitCode===null||e.exitCode===void 0?"exited":e.exitCode>=128?"stopped":"failed"}function Tt(e){return e.engine==="os"?"os":e.isLoading||e.keyConfigured[e.provider]===!0?"daemon":e.osEngineAvailable?"os":"unavailable"}const Ws=n.createSelector(e=>e.voiceSettings.isLoading),Vs=n.createSelector(e=>e.voiceSettings.available),Gs=n.createSelector(e=>e.voiceSettings.provider),Us=n.createSelector(e=>e.voiceSettings.engine),Hs=n.createSelector(e=>e.voiceSettings.osEngineAvailable),qs=n.createSelector(e=>e.voiceSettings.keyConfigured),js=n.createSelector(e=>e.voiceSettings.vocabulary),zs=n.createSelector(e=>e.voiceSettings.openaiModel),Ks=n.createSelector(e=>e.voiceSettings.language),$s=n.createSelector(e=>e.voiceSettings.workspaceVocabularyMaxTerms),Qs=n.createSelector(e=>e.voiceSettings.inputDeviceId),Zs=n.createSelector(e=>e.voiceSettings.inputDevices),Xs=n.createSelector(e=>e.voiceSettings.busyProvider),Js=n.createSelector(e=>e.voiceSettings.error),Ys=n.createSelector(e=>Oe.select(e)?"unavailable":Tt(e.voiceSettings)),N="intent.voice.inputDevice";let B;function Ft(){if(B!==void 0)return B;try{const e=localStorage.getItem(N);return typeof e=="string"&&e!==""?e:null}catch{return null}}function ei(e){B=e;try{e===null?localStorage.removeItem(N):localStorage.setItem(N,e)}catch{}}let C=null;function ti(e){C=e}function ri(){const e=C;return C=null,e}function It(){C=null}const Ot=300,Lt=300;class Dt{constructor(t){u(this,"holdThresholdMs");u(this,"doublePressWindowMs");u(this,"onRecordStart");u(this,"onRecordStop");u(this,"currentState","idle");u(this,"timer",null);this.holdThresholdMs=t.holdThresholdMs??Ot,this.doublePressWindowMs=t.doublePressWindowMs??Lt,this.onRecordStart=t.onRecordStart,this.onRecordStop=t.onRecordStop}get state(){return this.currentState}keyDown(){switch(this.currentState){case"idle":this.currentState="first-press",this.armTimer(this.holdThresholdMs,()=>{this.currentState="holding"}),this.onRecordStart();break;case"await-second-press":this.clearTimer(),this.currentState="second-press",this.armTimer(this.holdThresholdMs,()=>{this.currentState="holding-send"});break;case"latched":this.currentState="latched-press";break;case"latched-await-second":this.clearTimer(),this.currentState="draining",this.onRecordStop({stopReason:"double-press",autoSend:!0});break}}keyUp(){switch(this.currentState){case"first-press":this.clearTimer(),this.currentState="await-second-press",this.armTimer(this.doublePressWindowMs,()=>{this.currentState="latched"});break;case"holding":this.currentState="idle",this.onRecordStop({stopReason:"hold-release",autoSend:!1});break;case"second-press":this.clearTimer(),this.currentState="idle",this.onRecordStop({stopReason:"double-press",autoSend:!0});break;case"holding-send":this.currentState="idle",this.onRecordStop({stopReason:"double-hold-release",autoSend:!0});break;case"latched-press":this.currentState="latched-await-second",this.armTimer(this.doublePressWindowMs,()=>{this.currentState="idle",this.onRecordStop({stopReason:"latch-stop",autoSend:!1})});break;case"draining":this.currentState="idle";break}}reset(){this.clearTimer(),this.currentState="idle"}armTimer(t,r){this.clearTimer(),this.timer=setTimeout(()=>{this.timer=null,r()},t)}clearTimer(){this.timer!==null&&clearTimeout(this.timer),this.timer=null}}let P=null;function si(e){P=e}function ii(){const e=P;return P=null,e}function xt(){P=null}const Nt=12e4,Bt=["audio/webm;codecs=opus","audio/webm"];function ni(){return typeof navigator<"u"&&typeof navigator.mediaDevices?.getUserMedia=="function"&&typeof MediaRecorder<"u"}function Wt(e){return e?{audio:{deviceId:{ideal:e}}}:{audio:!0}}function Vt(){if(!(typeof MediaRecorder>"u"||typeof MediaRecorder.isTypeSupported!="function"))return Bt.find(e=>MediaRecorder.isTypeSupported(e))}class Gt{constructor(t){u(this,"maxDurationMs");u(this,"now");u(this,"callbacks");u(this,"deviceId");u(this,"currentState","idle");u(this,"recorder",null);u(this,"stream",null);u(this,"chunks",[]);u(this,"startedAt",0);u(this,"maxTimer",null);u(this,"discardRequested",!1);u(this,"cancelRequested",!1);this.maxDurationMs=t.maxDurationMs??Nt,this.now=t.now??Date.now,this.callbacks={onFinished:t.onFinished,onError:t.onError},this.deviceId=t.deviceId??null}get state(){return this.currentState}async start(){if(this.currentState!=="idle")return"discarded";this.currentState="starting";let t;try{t=await navigator.mediaDevices.getUserMedia(Wt(this.deviceId))}catch(i){const o=this.discardRequested;return this.currentState="stopped",o||this.callbacks.onError(i),o?"discarded":"error"}if(this.discardRequested){for(const i of t.getTracks())i.stop();return this.currentState="stopped","discarded"}this.stream=t;const r=Vt(),s=r?new MediaRecorder(t,{mimeType:r}):new MediaRecorder(t);return this.recorder=s,s.ondataavailable=i=>{i.data&&i.data.size>0&&this.chunks.push(i.data)},s.onstop=()=>this.handleRecorderStop(),s.onerror=i=>this.handleRecorderError(i),s.start(),this.startedAt=this.now(),this.currentState="recording",this.maxTimer=setTimeout(()=>this.stop(),this.maxDurationMs),"recording"}stop(){if(this.currentState==="starting"){this.discardRequested=!0;return}this.currentState==="recording"&&this.recorder?.stop()}cancel(){if(this.currentState==="starting"){this.discardRequested=!0;return}this.currentState==="recording"&&(this.cancelRequested=!0,this.recorder?.stop())}handleRecorderStop(){const t=this.now()-this.startedAt,r=this.recorder?.mimeType||"audio/webm",s=this.chunks,i=this.cancelRequested;this.teardown(),!i&&this.callbacks.onFinished({blob:new Blob(s,{type:r}),durationMs:t,mimeType:r})}handleRecorderError(t){const r=t?.error??t;this.teardown(),this.callbacks.onError(r)}teardown(){this.maxTimer!==null&&clearTimeout(this.maxTimer),this.maxTimer=null,this.recorder&&(this.recorder.ondataavailable=null,this.recorder.onstop=null,this.recorder.onerror=null),this.recorder=null;for(const t of this.stream?.getTracks()??[])t.stop();this.stream=null,this.chunks=[],this.currentState="stopped"}}const Ut=300;function Ht(e){const t=e?.name;return t==="NotAllowedError"||t==="SecurityError"}const qt={stopReason:"manual",autoSend:!1};let p=null,h=null,_=0,y=null;const T=new Dt({onRecordStart:()=>{y&&jt(y)},onRecordStop:e=>{se(y,e)}});function ai(){return p!==null}function oi(){return p}function ci(e){y=e,_+=1,_===1&&T.keyDown()}function li(e){y=e,_!==0&&(_-=1,_===0&&T.keyUp())}function jt(e){if(p!==null)return;xt(),It();const t=new Gt({deviceId:Ft(),onFinished:r=>{p===t&&(p=null);const s=h??{stopReason:"auto-stop",autoSend:!1},i=h!==null;if(h=null,e.dispatch(R()),i||T.reset(),r.durationMs<Ut){s.autoSend&&e.dispatch(x());return}e.dispatch(ve({...r,stopReason:s.stopReason,autoSend:s.autoSend}))},onError:r=>{p===t&&(p=null),h=null,e.dispatch(R()),e.showHint(Ht(r)?a.hardwareConsole_ptt_micDenied_message():a.hardwareConsole_ptt_recordingFailed_message())}});p=t,e.dispatch(Ee()),t.start().then(r=>{if(r!=="recording"&&(p===t&&(p=null),r==="discarded")){const s=h?.autoSend===!0;h=null,e.dispatch(R()),s&&e.dispatch(x())}})}function se(e,t){const r=p;if(r===null){t.autoSend&&e?.dispatch(x());return}h=t,r.stop()}function ui(){se(null,qt)}function di(e){T.reset(),_=0,h=null;const t=p;t!==null&&(p=null,t.cancel(),e.dispatch(R()))}const zt=V("HardwareConsoleVoiceSetupToast"),Kt="hardware-console-voice-setup";let D=null;function $t(){return D||(D=He(()=>import("./BaQ9zUUl.js").then(e=>e.i),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24]),import.meta.url).then(e=>e.notify)),D}function Qt(){qe("/settings?tab=connections#voice").catch(e=>{zt.error("Failed to open voice settings from setup toast",e)})}function Zt(){return{label:a.hardwareConsole_voice_openSettings_label(),onClick:()=>Qt()}}function pi(){$t().then(e=>{e.error(a.hardwareConsole_voice_noKey_error(),{id:Kt,action:Zt()})})}const fi=n.createSelector(e=>e.externalEditors.selectedAction),Xt=n.createSelector(e=>e.externalEditors.editors),Jt=n.createSelector(e=>{const t=k(Xt.select(e)),r=e.externalEditors.editorOrder??[];if(!r.length)return t;const s=new Map(t.map(c=>[c.id,c])),i=r.flatMap(c=>{const l=s.get(c);return l?[l]:[]}),o=new Set(r);return[...i,...t.filter(({id:c})=>!o.has(c))]}),gi=n.createSelector(e=>e.externalEditors.editorOrder??[]),hi=n.createSelector(e=>e.externalEditors.loading),mi=n.createSelector(e=>e.externalEditors.lastFetched),Yt=n.createSelector(e=>e.externalEditors.hiddenEditorIds),bi=n.createSelector((e,t)=>{if(!(t?Le.select(e,t):De.select(e)))return[];const s=Yt.select(e);return Jt.select(e).filter(i=>i.installed&&!s.includes(i.id))});function er(e){return e.catalogProfiles.some(t=>typeof t.remoteCompatible=="boolean")||e.defaultRemoteIncompatibility||e.profileDefaults.some(t=>typeof t.remoteCompatible=="boolean")?"supported":e.catalogProfiles.length>0?"unsupported":e.profilesLoadStatus==="idle"?"unknown":"unsupported"}function Si(e,t,r){if(X(e)){const s=t.find(i=>i.providerRef===e);return s?.remoteCompatible!==!1?null:s.remoteIncompatibility??{reason:"unknown",keys:[]}}return r?.[e]??null}function _i(e,t){return e.reason==="account-folder"?a.chat_modelPicker_remoteAccountFolder_description({backend:t}):a.chat_modelPicker_remoteIncompatible_description()}const tr=1440*60*1e3;function vi(e,t){if(!e?.capabilities)return"missing";const r=e.observedAt?Date.parse(e.observedAt):Number.NaN;return Number.isFinite(r)&&t-r>tr?"stale":"fresh"}const Ei=new Set(["cli-missing","prerequisite-missing"]),rr=new Set(["signed-out","auth-failed"]);function sr(e){return rr.has(e)}function ki(e,t){if(X(t))return!1;const r=ke(t),s=e?.capabilities?.providers.find(i=>i.id===r);return!!s&&sr(s.status)}const ir={macos:"macOS",linux:"Linux",windows:"Windows"},nr={aarch64:"arm64",arm64:"arm64",x86_64:"x64",x64:"x64"};function v(e,t){const r=[e&&(ir[e]??e),t&&(nr[t]??t)].filter(s=>!!s);return r.length?r.join(" "):null}function ar(e){return e?.placement?.target==="remote"||e?.placement?.target==="e2b"}const or=new Set(["running","paused","resuming","pausing","stopping"]);function cr(e,t){if(e.placementError)return null;if(e.cloudStart)return"starting";if(!e.nodeId)return e.effectiveIsolation==="pending"?"starting":null;const r=t?.cloud?.state;return r&&or.has(r)?r:e.effectiveIsolation==="pending"?"starting":null}function ie(e,t){if(!e||!ar(e))return null;const r=e.nodeId??e.placement?.nodeId??"",s=t&&t.id===r?t:null;if(e.placement?.target==="e2b")return{nodeId:r,name:e.nodeName?.trim()||"E2B",platform:v(s?.platform?.os,s?.platform?.arch),state:"ready",cloud:{state:cr(e,s)}};const i=v(e.placement?.os,e.placement?.arch)??v(s?.platform?.os,s?.platform?.arch),o=s?.state==="revoked"?"revoked":s?.state==="unreachable"||e.nodeState==="offline"?"unreachable":"ready";return{nodeId:r,name:e.nodeName?.trim()||s?.name||a.remoteAgent_location_unknownMachine(),platform:i,state:o}}function Ai(e,t){if(!e)return null;const r=t&&t.id===e?t:null;return{nodeId:e,name:r?.name||a.remoteAgent_location_unknownMachine(),platform:v(r?.platform?.os,r?.platform?.arch),state:r?.state==="revoked"?"revoked":r?.state==="unreachable"?"unreachable":"ready"}}function ne(e){switch(e){case"starting":return a.cloudMachines_agent_starting();case"running":return a.cloudMachines_agent_running();case"paused":return a.cloudMachines_agent_paused();case"resuming":return a.cloudMachines_agent_resuming();case"pausing":return a.cloudMachines_agent_pausing();case"stopping":return a.cloudMachines_agent_stopping();default:return null}}function yi(e){const t=ne(e.cloud?.state);return t?a.cloudMachines_agent_chip({machine:e.name,state:t}):e.name}function Mi(e){if(e.cloud){const r=ne(e.cloud.state),s=a.remoteAgent_location_tooltipNoPlatform({machine:e.name});return r?a.remoteAgent_location_tooltipWithState({location:s,state:r}):s}const t=e.platform?a.remoteAgent_location_tooltip({machine:e.name,platform:e.platform}):a.remoteAgent_location_tooltipNoPlatform({machine:e.name});switch(e.state){case"unreachable":return a.remoteAgent_location_tooltipWithState({location:t,state:a.remoteMachines_state_unreachable_label()});case"revoked":return a.remoteAgent_location_tooltipWithState({location:t,state:a.remoteMachines_state_revoked_label()});default:return t}}function ae(e,t){return!e||!t?null:e.placementError?"failed":t.state==="revoked"?"revoked":t.state==="unreachable"?"unreachable":e.effectiveIsolation==="pending"||e.cloudStart?"starting":e.setup?.state==="failed"?"setup-failed":null}function oe(e){if(!e.endsWith("}"))return null;for(let t=e.indexOf(" {");t>=0;t=e.indexOf(" {",t+1))try{const r=JSON.parse(e.slice(t+1));if(r&&typeof r=="object"&&typeof r.code=="string")return{message:e.slice(0,t).trim(),data:r}}catch{}return null}function lr(e,t){const r=e.detail??"",s=oe(r),i=e.code==="machine-update-required"||s?.data.code==="machine-update-required";if(i&&s?.data.reason==="prepared-checkout")return{updateRequired:i,message:a.remoteAgent_updateRequired_preparedCheckout({machine:t})};const o=K(s?.data),c=o??(e.code?K({code:e.code}):null);return c?{updateRequired:i,message:s?.message||r,cloud:c,cloudDetailKnown:!!o}:{updateRequired:i,message:s?.message||r}}function Ri(e){if(e?.placement?.target!=="e2b"||!e.placementError||e.status!==Ae.Error)return null;const t=lr(e.placementError,"");return t.cloud?t:null}const ur=["attachments-too-large-for-machine:","node-prompt-too-large:"],dr="remote-agent-unsupported:";function Q(e){return new Intl.NumberFormat(void 0,{maximumFractionDigits:1}).format(e/1048576)}function wi(e){const t=oe(e)?.message??e;for(const s of ur){const i=t.indexOf(s);if(i<0)continue;const o=t.slice(i+s.length).trim().replace(/^[a-z][\w]*(?:\.[\w]+)+:\s*/i,""),c=/come to (\d+) bytes\b.*?over its (\d+)-byte limit/.exec(o);return c?a.remoteAgent_attachmentsTooLargeSized_error({size:Q(Number(c[1])),limit:Q(Number(c[2]))}):o?a.remoteAgent_attachmentsTooLarge_error({detail:o}):a.remoteAgent_attachmentsTooLargeNoDetail_error()}const r=t.indexOf(dr);return r>=0&&/attachment/i.test(t.slice(r))?a.remoteAgent_attachmentsUnsupported_error():null}function Ci(e){return e?.placement?.target==="e2b"&&ae(e,ie(e))==="starting"}function Pi(e,t){if(e?.placement?.target!=="e2b")return!1;const r=ie(e,t);return r?.cloud?.state==="resuming"&&ae(e,r)===null}const M="",W="cloud:";function ce(e){return`${W}${e}`}function le(e){return e?.startsWith(W)&&e.slice(W.length)||null}function pr(e,t){return e?.find(r=>ce(r.cloudMachineId)===t&&r.unavailableReason===null)}const fr=new Set(["connected","disconnected"]);function gr(e){switch(e){case"unreachable":return a.remoteMachines_state_unreachable_label();case"revoked":return a.remoteMachines_state_revoked_label();case"update-required":return a.remoteMachines_state_updateRequired_label();default:return}}function q(e){return fr.has(e.state)}function hr({backendLabel:e,backendPlatform:t,machines:r,cloud:s}){const i=[{id:M,label:e,platform:v(t?.os,t?.arch),disabled:!1},...r.map(o=>{const c=v(o.platform?.os,o.platform?.arch);return q(o)?{id:o.id,label:o.name,platform:c,disabled:!1}:{id:o.id,label:o.name,platform:c,disabled:!0,reason:gr(o.state)}})];for(const o of s??[])i.push({id:ce(o.cloudMachineId),label:o.label,platform:null,kind:"cloud",disabled:o.unavailableReason!==null,...o.unavailableReason?{reason:o.unavailableReason}:{hint:a.cloudMachines_startOn_hint()}});return i}function mr({remoteMachinesVisible:e,supported:t,machines:r,cloud:s}){return e&&t&&(r.some(q)||(s??[]).some(i=>i.unavailableReason===null))}function br(e,t,r){if(!e)return M;if(le(e))return pr(r,e)?e:M;const s=t.find(i=>i.id===e);return s&&q(s)?s.id:M}function Ti(e,{cloudEntries:t=!1}={}){const r=le(e);return r?t?{target:"e2b",checkout:"isolated",cloudMachineId:r}:{target:"e2b",checkout:"isolated"}:e?{target:"remote",checkout:"isolated",nodeId:e}:void 0}function Fi({groups:e,providerRef:t,model:r}){const s=c=>c.options.filter(l=>!l.disabled),i=e.find(c=>c.key===t),o=i?s(i):[];if(r){const c=ye(r).modelId;if(o.some(l=>l.value===c))return null}else if(o.length>0)return null;if(i&&o.length>0)return{providerId:i.key,modelId:o[0].value};for(const c of e){if(c.key==="default")continue;const l=s(c);if(l.length>0)return{providerId:c.key,modelId:l[0].value}}return null}const Sr=n.createSelector(e=>ot.select(e)&&e.remoteMachines?.supported===!0),j=n.createSelector(e=>Object.values(e.remoteMachines?.machines??{}).sort((t,r)=>t.name.localeCompare(r.name))),Ii=n.createSelector(e=>e.remoteMachines.localFingerprint),Oi=n.createSelector(e=>e.remoteMachines.pending),Li=n.createSelector(e=>e.remoteMachines.failures),Di=n.createSelector(e=>e.remoteMachines.executorBackends??[]),_r=n.createSelector((e,t)=>{if(t===Me)return a.layout_daemonStatus_localConnection_label();const r=m(e.connections.connections,t);return r?ze(r):t}),vr=n.createSelector(e=>_r.select(e,e.connections.windowBackendId)),xi=n.createSelector((e,t)=>(t?e.remoteMachines.machines[t]??e.cloudMachines?.machines[t]:void 0)??null),Ni=n.createSelector((e,t)=>{const r=e.providerSettings?.profiles;return er({catalogProfiles:Ne.select(e,t),defaultRemoteIncompatibility:xe.select(e,t),profileDefaults:Object.values(r?.defaults??{}),profilesLoadStatus:r?.loadStatus??"idle"})}),Bi=n.createSelector(e=>Object.fromEntries(Object.values(e.providerSettings?.profiles?.defaults??{}).map(t=>[t.baseProviderId,t.env.length>0]))),ue=n.createSelector(e=>mr({remoteMachinesVisible:Sr.select(e),supported:e.remoteMachines?.initialAgentPlacement===!0,machines:j.select(e),cloud:G(e)}));function Er(e){const t=m(e.connections.connections,e.connections.windowBackendId);return t?.hostOs?{os:t.hostOs,arch:t.hostArch}:void 0}const Wi=n.createSelector(e=>ue.select(e)?hr({backendLabel:vr.select(e),backendPlatform:Er(e),machines:j.select(e),cloud:G(e)}):[]),Vi=n.createSelector((e,t,r)=>ue.select(e)?br(t,j.select(e),de(e,r)):M);function de(e,t){const r=G(e);if(!r||!t)return r;const s=e.cloudMachines?.providers??{};return r.map(i=>{if(i.unavailableReason)return i;const o=Ke(e,t,s[i.cloudMachineId]??null);return o?{...i,unavailableReason:o}:i})}const Gi=n.createSelector((e,t)=>de(e,t));function Ui(e,t){if(!e||!t||t===e.providerId)return!1;const r=e.providerSettings[t];return!!(r&&[r.defaultModel,...Object.values(r.typeOverrides??{})].some(s=>typeof s=="string"&&s.includes(":")))}let kr=0;function Ar(e,t){const r=++kr;return n.dispatch(we(e,t,r)),r}function Hi(e,t,r){n.dispatch(Re(e,t,r))}async function pe(e,t,r,s){const i=crypto.randomUUID(),o=s?.source??"control";try{return(await n.dispatch(Ce({requestId:i,consumerId:o,agentId:e,workspaceId:t,operation:r,connection:J.select(n.state)},{...s,intent:s?.intent??Ar(e,t)}))).status==="success"}finally{n.dispatch(Pe(i,o))}}async function qi(e,t,r,s,i){return pe(e,t,{kind:"effort",effort:r,previous:s},i)}async function ji(e,t,r,s,i){return pe(e,t,{kind:"reconcile",current:r??null,levels:s},i)}const yr=n.createSelector((e,t)=>k(e.agentModel.mutations).filter(r=>r.consumerId===t)),zi=n.createSelector((e,t)=>yr.select(e,t).some(r=>r.status==="pending")),Ki=n.createSelector((e,t,r)=>{const s=e.agentSessions.byAgentId[t],i=Be.select(e,t),o=$e.select(e,t),c=e.daemonHealth.stats?.protocolVersion,l=Qe(c),g=l?Ze(s?.model,null,o):s?.model;return{session:s,providerId:i,levels:o,legacy:l,identity:JSON.stringify([g,i]),connection:J.select(e),canWrite:!!s&&s.workspaceId===r&&!We.select(e,r)}});function Mr(e,t,r=!1){return e!=="auggie"||t===!0||r}const $i=n.createSelector(e=>Xe.select(e)?null:U.select(e)),Rr=n.createSelector(e=>e.providerCatalog?.workspaceEpoch??0),f=n.createSelector((e,t)=>t?e.providerCatalog?.byWorkspaceId?.[t]:void 0),Qi=n.createSelector(e=>Object.keys(e.providerCatalog?.byWorkspaceId??{})),Zi=n.createSelector((e,t)=>!!f.select(e,t)&&e.providerCatalog.workspaceSnapshotEpochs?.[t]===Rr.select(e)),fe=n.createSelector((e,t)=>t?f.select(e,t)?.catalog.providers??[]:Ve.select(e)),ge=n.createSelector((e,t)=>{if(!t)return Y.select(e);const r=f.select(e,t)?.settings.find(s=>s.path==="model.defaultProvider")?.value;return typeof r=="string"?r:""}),z=n.createSelector((e,t)=>{if(!t)return Je.select(e);const r=f.select(e,t)?.settings.find(s=>s.path==="providers.enabled")?.value;return r&&typeof r=="object"?r:{}}),he=n.createSelector((e,t)=>{if(!t)return Ye.select(e);const r=z.select(e,t),s=ge.select(e,t),i=f.select(e,t)?.readiness??{};return fe.select(e,t).filter(o=>o.visible&&(!o.canBeDisabled||r[o.id]||o.id===s)&&i[o.id]?.available&&(o.id!=="antigravity"||ee(o.id,i[o.id]?.authenticated))).map(o=>o.id)}),Xi=n.createSelector((e,t)=>{const r=z.select(e,t),s=t?f.select(e,t)?.readiness??{}:U.select(e);return fe.select(e,t).filter(i=>Mr(i.id,s[i.id]?.available,r[i.id]===!0)).map(i=>i.id)}),Ji=n.createSelector((e,t)=>t?he.select(e,t):et.select(e)),Yi=n.createSelector((e,t)=>b.select(e,t)),en=n.createSelector((e,t)=>t?!!f.select(e,t):tt.select(e)),tn=n.createSelector((e,t)=>{if(!t)return rt.select(e);const r=f.select(e,t)?.settings??[],s=ge.select(e,t),i=r.find(l=>l.path==="model.providerDefaults")?.value,o=i&&typeof i=="object"?i[s]:void 0;if(typeof o=="string")return o;const c=r.find(l=>l.path==="model.default")?.value;return typeof c=="string"?c:""}),rn=n.createSelector((e,t)=>t?Object.fromEntries(Object.entries(e.providerModels?.byWorkspaceId?.[t]??{}).flatMap(([r,s])=>s.warning?[[r,s.warning]]:[])):st.select(e)),sn=n.createSelector((e,t)=>t?Object.fromEntries(Object.entries(e.providerModels?.byWorkspaceId?.[t]??{}).map(([r,s])=>[r,s.stale===!0])):it.select(e)),nn=n.createSelector((e,t)=>t?Object.fromEntries(Object.entries(e.providerModels?.byWorkspaceId?.[t]??{}).flatMap(([r,s])=>s.warning&&s.warningKind?[[r,s.warningKind]]:[])):nt.select(e)),an=n.createSelector((e,t,r)=>{if(!r)return at.select(e,t);const s=z.select(e,r),i=f.select(e,r);return he.select(e,r).filter(o=>o!==t&&(s[o]||i?.catalog.providers.find(c=>c.id===o)?.canBeDisabled===!1)&&ee(o,i?.readiness[o]?.authenticated))}),on=n.createSelector((e,t)=>t?f.select(e,t)?.readiness??{}:U.select(e)),wr={},cn=n.createSelector(e=>e.providerSettings?.profiles?.status??wr),ln=n.createSelector(e=>e.directoryPicker.listing),un=n.createSelector(e=>e.directoryPicker.loading),dn=n.createSelector(e=>e.directoryPicker.error),pn=n.createSelector(e=>e.directoryPicker.pathError),fn=n.createSelector(e=>e.directoryPicker.createError),Z={},Cr=n.createSelector((e,t)=>t?e.providerCatalog?.byWorkspaceId?.[t]?.mcpServers??[]:e.mcpSettings.servers),gn=n.createSelector((e,t,r)=>{const s=e.providerCatalog?.byWorkspaceId?.[t];return s?s.mcpServers?.find(i=>i.id===r)?.name:e.providerCatalog?.mcpServerNamesByWorkspaceId?.[t]?.[r]}),hn=n.createSelector(e=>e.mcpSettings.loading),mn=n.createSelector(e=>e.mcpSettings.error),bn=n.createSelector(e=>e.mcpSettings.mutationError??null),Sn=n.createSelector(e=>e.mcpSettings.enabled),Pr=n.createSelector(e=>e.mcpSettings.disabledServers),Tr=n.createSelector(e=>e.mcpSettings.statusMap),Fr=n.createSelector(e=>e.mcpSettings.toolsMap),Ir=n.createSelector((e,t)=>{if(!t)return e.mcpSettings.errorMessages;const r=e.providerCatalog?.byWorkspaceId?.[t],s=new Map(r?.mcpServers?.map(i=>[i.id,A(i)])??[]);return Object.fromEntries((r?.mcpStatuses??[]).flatMap(i=>{const o=s.get(i.serverId);return o&&i.lastError?[[o,i.lastError]]:[]}))}),Or=n.createSelector((e,t)=>t?e.mcpSettings.byWorkspaceId[t]?.disabledServers??Z:Z),_n=n.createSelector((e,t)=>Object.keys(Or.select(e,t))),vn=n.createSelector(e=>{const t=Cr.select(e),r=Tr.select(e),s=Fr.select(e),i=Pr.select(e),o=Ir.select(e);return t.map(c=>{const l=A(c)in i,g=s[A(c)]||[];let S=r[A(c)]||"disconnected";return l&&(S="disabled"),{...c,disabled:l,status:S,tools:g,toolCount:g.length,errorMessage:o[A(c)]}})});n.createSelector((e,t)=>e.mcpSettings.errorMessages[t]);const En=n.createSelector(e=>e.mcpSettings.lastImportedCount),kn=n.createSelector(e=>e.mcpSettings.advancedSaveStatus),An=n.createSelector(e=>e.mcpSettings.advancedSaveError),yn=["agentFeatures.backgroundHooks","agentFeatures.hostExec","agentFeatures.scripts","agentFeatures.terminalAccess","agentFeatures.browserAutomation","agentFeatures.desktopControl","agentFeatures.richChatBlocks","agentFeatures.structuredQuestions","agentFeatures.secretRequests","agentFeatures.attentionRequests","agentFeatures.stateSnapshot","agentFeatures.prMonitor","agentFeatures.taskGraph","agentFeatures.peerAgents","agentFeatures.mcpTools"],Lr=[{path:"agentFeatures.backgroundHooks",label:()=>a.settings_agentFeatures_backgroundHooks_label(),description:()=>a.settings_agentFeatures_backgroundHooks_description(),defaultValue:!0},{path:"agentFeatures.hostExec",label:()=>a.settings_agentFeatures_hostExec_label(),description:()=>a.settings_agentFeatures_hostExec_description(),defaultValue:!0},{path:"agentFeatures.scripts",label:()=>a.settings_agentFeatures_scripts_label(),description:()=>a.settings_agentFeatures_scripts_description(),defaultValue:!0},{path:"agentFeatures.terminalAccess",label:()=>a.settings_agentFeatures_terminalAccess_label(),description:()=>a.settings_agentFeatures_terminalAccess_description(),defaultValue:!0},{path:"agentFeatures.browserAutomation",label:()=>a.settings_agentFeatures_browserAutomation_label(),description:()=>a.settings_agentFeatures_browserAutomation_description(),defaultValue:!0},{path:"agentFeatures.desktopControl",label:()=>a.settings_agentFeatures_desktopControl_label(),description:()=>a.settings_agentFeatures_desktopControl_description(),defaultValue:!0},{path:"agentFeatures.richChatBlocks",label:()=>a.settings_agentFeatures_richChatBlocks_label(),description:()=>a.settings_agentFeatures_richChatBlocks_description(),defaultValue:!0},{path:"agentFeatures.structuredQuestions",label:()=>a.settings_agentFeatures_structuredQuestions_label(),description:()=>a.settings_agentFeatures_structuredQuestions_description(),defaultValue:!0},{path:"agentFeatures.secretRequests",label:()=>a.settings_agentFeatures_secretRequests_label(),description:()=>a.settings_agentFeatures_secretRequests_description(),defaultValue:!1},{path:"agentFeatures.attentionRequests",label:()=>a.settings_agentFeatures_attentionRequests_label(),description:()=>a.settings_agentFeatures_attentionRequests_description(),defaultValue:!0},{path:"agentFeatures.stateSnapshot",label:()=>a.settings_agentFeatures_stateSnapshot_label(),description:()=>a.settings_agentFeatures_stateSnapshot_description(),defaultValue:!0},{path:"agentFeatures.prMonitor",label:()=>a.settings_agentFeatures_prMonitor_label(),description:()=>a.settings_agentFeatures_prMonitor_description(),defaultValue:!0},{path:"agentFeatures.taskGraph",label:()=>a.settings_agentFeatures_taskGraph_label(),description:()=>a.settings_agentFeatures_taskGraph_description(),defaultValue:!0},{path:"agentFeatures.peerAgents",label:()=>a.settings_agentFeatures_peerAgents_label(),description:()=>a.settings_agentFeatures_peerAgents_description(),defaultValue:!0},{path:"agentFeatures.mcpTools",label:()=>a.settings_agentFeatures_mcpTools_label(),description:()=>a.settings_agentFeatures_mcpTools_description(),defaultValue:!0}],Mn=Object.fromEntries(Lr.map(e=>[e.path,e.defaultValue]));export{br as $,Ti as A,Pt as B,Mr as C,is as D,ai as E,Lr as F,te as G,Ui as H,$ as I,ki as J,ni as K,Ft as L,Ei as M,Ai as N,Fi as O,v as P,vi as Q,Ar as R,E as S,Mt as T,lr as U,ji as V,Hi as W,wi as X,Si as Y,_i as Z,Tt as _,Mn as a,jr as a$,Ls as a0,ei as a1,zi as a2,yr as a3,Ki as a4,os as a5,ps as a6,_r as a7,Ji as a8,ge as a9,Ys as aA,Di as aB,_s as aC,vs as aD,cs as aE,ds as aF,H as aG,lt as aH,ht as aI,mt as aJ,re as aK,gt as aL,ut as aM,ct as aN,pt as aO,ft as aP,Zr as aQ,Yr as aR,es as aS,rs as aT,zr as aU,$r as aV,Jr as aW,Qr as aX,Xr as aY,Kr as aZ,ts as a_,z as aa,Xi as ab,he as ac,fe as ad,sn as ae,nn as af,rn as ag,an as ah,on as ai,en as aj,tn as ak,Yi as al,vr as am,us as an,Bi as ao,gs as ap,fn as aq,dn as ar,ln as as,un as at,pn as au,gi as av,Es as aw,ws as ax,Ss as ay,Vi as az,yn as b,Qi as b$,ss as b0,ys as b1,Yt as b2,Jt as b3,bi as b4,hi as b5,ks as b6,As as b7,mi as b8,Ii as b9,Rs as bA,Cs as bB,bs as bC,Ms as bD,b as bE,fs as bF,Gi as bG,Wi as bH,ue as bI,ls as bJ,Xs as bK,Us as bL,Qs as bM,Zs as bN,qs as bO,Ks as bP,zs as bQ,Hs as bR,Gs as bS,Vs as bT,Js as bU,Ws as bV,js as bW,$s as bX,f as bY,Rr as bZ,Zi as b_,An as ba,kn as bb,Pr as bc,Sn as bd,mn as be,Ir as bf,En as bg,hn as bh,bn as bi,Cr as bj,vn as bk,Tr as bl,Fr as bm,fi as bn,ms as bo,cn as bp,xi as bq,Li as br,Oi as bs,j as bt,Sr as bu,Ni as bv,$i as bw,Et as bx,Ps as by,Ts as bz,M as c,_n as c0,gn as c1,ti as c2,si as c3,pi as c4,ce as c5,le as c6,jt as c7,ui as c8,Ds as c9,Os as ca,xs as cb,Is as cc,Zt as cd,Fs as ce,Ri as d,Ci as e,Pi as f,yi as g,ie as h,Mi as i,ae as j,qi as k,di as l,It as m,xt as n,ri as o,ii as p,hs as q,vt as r,_t as s,oi as t,Ns as u,Bs as v,ns as w,as as x,ci as y,li as z};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import{p as R}from"./ap51LBWo.js";import{bf as _,a5 as E,a9 as F,bi as D,a6 as P,bg as z,c,bd as G,w as W,v as w,a7 as b,W as B,aN as C,ah as V,I as H}from"./Cl430GWg.js";import{p as j}from"./ClebXGIM.js";var m={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},y=32,A={axes:[],curves:[],options:m},x=structuredClone(A),N=B.radar,U=c(()=>w({...N,...b().radar}),"getConfig"),M=c(()=>x.axes,"getAxes"),X=c(()=>x.curves,"getCurves"),K=c(()=>x.options,"getOptions"),Y=c(a=>{x.axes=a.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),Z=c(a=>{x.curves=a.map(t=>({name:t.name,label:t.label??t.name,entries:q(t.entries)}))},"setCurves"),q=c(a=>{if(a[0].axis==null)return a.map(e=>e.value);const t=M();if(t.length===0)throw new Error("Axes must be populated before curves for reference entries");return t.map(e=>{const r=a.find(s=>s.axis?.$refText===e.name);if(r===void 0)throw new Error("Missing entry for axis "+e.label);return r.value})},"computeCurveEntries"),J=c(a=>{const t=a.reduce((e,r)=>(e[r.name]=r,e),{});x.options={showLegend:t.showLegend?.value??m.showLegend,ticks:t.ticks?.value??m.ticks,max:t.max?.value??m.max,min:t.min?.value??m.min,graticule:t.graticule?.value??m.graticule},x.options.ticks>y&&(C.warn(`Radar diagram ticks (${x.options.ticks}) exceeds maximum allowed (${y}). Using ${y} instead.`),x.options.ticks=y)},"setOptions"),Q=c(()=>{W(),x=structuredClone(A)},"clear"),$={getAxes:M,getCurves:X,getOptions:K,setAxes:Y,setCurves:Z,setOptions:J,getConfig:U,clear:Q,setAccTitle:z,getAccTitle:P,setDiagramTitle:D,getDiagramTitle:F,getAccDescription:E,setAccDescription:_},tt=c(a=>{R(a,$);const{axes:t,curves:e,options:r}=a;$.setAxes(t),$.setCurves(e),$.setOptions(r)},"populate"),et={parse:c(async a=>{const t=await j("radar",a);C.debug(t),tt(t)},"parse")},at=c((a,t,e,r)=>{const s=r.db,i=s.getAxes(),l=s.getCurves(),n=s.getOptions(),o=s.getConfig(),d=s.getDiagramTitle(),p=G(t),u=rt(p,o),g=n.max??Math.max(...l.map(f=>Math.max(...f.entries))),h=n.min,v=Math.min(o.width,o.height)/2;st(u,i,v,n.ticks,n.graticule),nt(u,i,v,o),L(u,i,l,h,g,n.graticule,o),k(u,l,n.showLegend,o),u.append("text").attr("class","radarTitle").text(d).attr("x",0).attr("y",-o.height/2-o.marginTop)},"draw"),rt=c((a,t)=>{const e=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,s={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return H(a,r,e,t.useMaxWidth??!0),a.attr("viewBox",`0 0 ${e} ${r}`).attr("overflow","visible"),a.append("g").attr("transform",`translate(${s.x}, ${s.y})`)},"drawFrame"),st=c((a,t,e,r,s)=>{if(s==="circle")for(let i=0;i<r;i++){const l=e*(i+1)/r;a.append("circle").attr("r",l).attr("class","radarGraticule")}else if(s==="polygon"){const i=t.length;for(let l=0;l<r;l++){const n=e*(l+1)/r,o=t.map((d,p)=>{const u=2*p*Math.PI/i-Math.PI/2,g=n*Math.cos(u),h=n*Math.sin(u);return`${g},${h}`}).join(" ");a.append("polygon").attr("points",o).attr("class","radarGraticule")}}},"drawGraticule"),nt=c((a,t,e,r)=>{const s=t.length;for(let i=0;i<s;i++){const l=t[i].label,n=2*i*Math.PI/s-Math.PI/2,o=Math.cos(n),d=Math.sin(n);a.append("line").attr("x1",0).attr("y1",0).attr("x2",e*r.axisScaleFactor*o).attr("y2",e*r.axisScaleFactor*d).attr("class","radarAxisLine");const p=o>.01?"start":o<-.01?"end":"middle",u=d>.01?"hanging":d<-.01?"auto":"central",g=4;a.append("text").text(l).attr("x",e*r.axisLabelFactor*o+g*o).attr("y",e*r.axisLabelFactor*d+g*d).attr("text-anchor",p).attr("dominant-baseline",u).attr("class","radarAxisLabel")}},"drawAxes");function L(a,t,e,r,s,i,l){const n=t.length,o=Math.min(l.width,l.height)/2;e.forEach((d,p)=>{if(d.entries.length!==n)return;const u=d.entries.map((g,h)=>{const v=2*Math.PI*h/n-Math.PI/2,f=T(g,r,s,o),O=f*Math.cos(v),I=f*Math.sin(v);return{x:O,y:I}});i==="circle"?a.append("path").attr("d",S(u,l.curveTension)).attr("class",`radarCurve-${p}`):i==="polygon"&&a.append("polygon").attr("points",u.map(g=>`${g.x},${g.y}`).join(" ")).attr("class",`radarCurve-${p}`)})}c(L,"drawCurves");function T(a,t,e,r){const s=Math.min(Math.max(a,t),e);return r*(s-t)/(e-t)}c(T,"relativeRadius");function S(a,t){const e=a.length;let r=`M${a[0].x},${a[0].y}`;for(let s=0;s<e;s++){const i=a[(s-1+e)%e],l=a[s],n=a[(s+1)%e],o=a[(s+2)%e],d={x:l.x+(n.x-i.x)*t,y:l.y+(n.y-i.y)*t},p={x:n.x-(o.x-l.x)*t,y:n.y-(o.y-l.y)*t};r+=` C${d.x},${d.y} ${p.x},${p.y} ${n.x},${n.y}`}return`${r} Z`}c(S,"closedRoundCurve");function k(a,t,e,r){if(!e)return;const s=(r.width/2+r.marginRight)*3/4,i=-(r.height/2+r.marginTop)*3/4,l=20;t.forEach((n,o)=>{const d=a.append("g").attr("transform",`translate(${s}, ${i+o*l})`);d.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${o}`),d.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(n.label)})}c(k,"drawLegend");var ot={draw:at},it=c((a,t)=>{let e="";for(let r=0;r<a.THEME_COLOR_LIMIT;r++){const s=a[`cScale${r}`];e+=`
|
|
2
|
+
.radarCurve-${r} {
|
|
3
|
+
color: ${s};
|
|
4
|
+
fill: ${s};
|
|
5
|
+
fill-opacity: ${t.curveOpacity};
|
|
6
|
+
stroke: ${s};
|
|
7
|
+
stroke-width: ${t.curveStrokeWidth};
|
|
8
|
+
}
|
|
9
|
+
.radarLegendBox-${r} {
|
|
10
|
+
fill: ${s};
|
|
11
|
+
fill-opacity: ${t.curveOpacity};
|
|
12
|
+
stroke: ${s};
|
|
13
|
+
}
|
|
14
|
+
`}return e},"genIndexStyles"),lt=c(a=>{const t=V(),e=b(),r=w(t,e.themeVariables),s=w(r.radar,a);return{themeVariables:r,radarOptions:s}},"buildRadarStyleOptions"),ct=c(({radar:a}={})=>{const{themeVariables:t,radarOptions:e}=lt(a);return`
|
|
15
|
+
.radarTitle {
|
|
16
|
+
font-size: ${t.fontSize};
|
|
17
|
+
color: ${t.titleColor};
|
|
18
|
+
dominant-baseline: hanging;
|
|
19
|
+
text-anchor: middle;
|
|
20
|
+
}
|
|
21
|
+
.radarAxisLine {
|
|
22
|
+
stroke: ${e.axisColor};
|
|
23
|
+
stroke-width: ${e.axisStrokeWidth};
|
|
24
|
+
}
|
|
25
|
+
.radarAxisLabel {
|
|
26
|
+
font-size: ${e.axisLabelFontSize}px;
|
|
27
|
+
color: ${e.axisColor};
|
|
28
|
+
}
|
|
29
|
+
.radarGraticule {
|
|
30
|
+
fill: ${e.graticuleColor};
|
|
31
|
+
fill-opacity: ${e.graticuleOpacity};
|
|
32
|
+
stroke: ${e.graticuleColor};
|
|
33
|
+
stroke-width: ${e.graticuleStrokeWidth};
|
|
34
|
+
}
|
|
35
|
+
.radarLegendText {
|
|
36
|
+
text-anchor: start;
|
|
37
|
+
font-size: ${e.legendFontSize}px;
|
|
38
|
+
dominant-baseline: hanging;
|
|
39
|
+
}
|
|
40
|
+
${it(t,e)}
|
|
41
|
+
`},"styles"),gt={parser:et,db:$,renderer:ot,styles:ct};export{gt as diagram};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import{s as ge}from"./Dx4xDmS-.js";import{p as ye}from"./ap51LBWo.js";import{c as w,ah as Se,a7 as ae,v as ee,bd as ve,I as xe,aN as te,bs as B,bc as U,bg as be,a6 as we,bi as Ce,a9 as Te,a5 as Le,bf as $e,W as Ae,aD as Fe,w as Ne}from"./Cl430GWg.js";import{p as Me}from"./ClebXGIM.js";import{f as O}from"./CrowFXzY.js";import{o as Q}from"./CmKTTxBW.js";function _e(t){var a=0,l=t.children,n=l&&l.length;if(!n)a=1;else for(;--n>=0;)a+=l[n].value;t.value=a}function ke(){return this.eachAfter(_e)}function ze(t,a){let l=-1;for(const n of this)t.call(a,n,++l,this);return this}function Ve(t,a){for(var l=this,n=[l],s,i,h=-1;l=n.pop();)if(t.call(a,l,++h,this),s=l.children)for(i=s.length-1;i>=0;--i)n.push(s[i]);return this}function De(t,a){for(var l=this,n=[l],s=[],i,h,d,g=-1;l=n.pop();)if(s.push(l),i=l.children)for(h=0,d=i.length;h<d;++h)n.push(i[h]);for(;l=s.pop();)t.call(a,l,++g,this);return this}function Pe(t,a){let l=-1;for(const n of this)if(t.call(a,n,++l,this))return n}function Be(t){return this.eachAfter(function(a){for(var l=+t(a.data)||0,n=a.children,s=n&&n.length;--s>=0;)l+=n[s].value;a.value=l})}function We(t){return this.eachBefore(function(a){a.children&&a.children.sort(t)})}function Ee(t){for(var a=this,l=Re(a,t),n=[a];a!==l;)a=a.parent,n.push(a);for(var s=n.length;t!==l;)n.splice(s,0,t),t=t.parent;return n}function Re(t,a){if(t===a)return t;var l=t.ancestors(),n=a.ancestors(),s=null;for(t=l.pop(),a=n.pop();t===a;)s=t,t=l.pop(),a=n.pop();return s}function Ie(){for(var t=this,a=[t];t=t.parent;)a.push(t);return a}function He(){return Array.from(this)}function Oe(){var t=[];return this.eachBefore(function(a){a.children||t.push(a)}),t}function Ge(){var t=this,a=[];return t.each(function(l){l!==t&&a.push({source:l.parent,target:l})}),a}function*qe(){var t=this,a,l=[t],n,s,i;do for(a=l.reverse(),l=[];t=a.pop();)if(yield t,n=t.children)for(s=0,i=n.length;s<i;++s)l.push(n[s]);while(l.length)}function ne(t,a){t instanceof Map?(t=[void 0,t],a===void 0&&(a=je)):a===void 0&&(a=Ye);for(var l=new Z(t),n,s=[l],i,h,d,g;n=s.pop();)if((h=a(n.data))&&(g=(h=Array.from(h)).length))for(n.children=h,d=g-1;d>=0;--d)s.push(i=h[d]=new Z(h[d])),i.parent=n,i.depth=n.depth+1;return l.eachBefore(Ze)}function Xe(){return ne(this).eachBefore(Ue)}function Ye(t){return t.children}function je(t){return Array.isArray(t)?t[1]:null}function Ue(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function Ze(t){var a=0;do t.height=a;while((t=t.parent)&&t.height<++a)}function Z(t){this.data=t,this.depth=this.height=0,this.parent=null}Z.prototype=ne.prototype={constructor:Z,count:ke,each:ze,eachAfter:De,eachBefore:Ve,find:Pe,sum:Be,sort:We,path:Ee,ancestors:Ie,descendants:He,leaves:Oe,links:Ge,copy:Xe,[Symbol.iterator]:qe};function Je(t){if(typeof t!="function")throw new Error;return t}function G(){return 0}function q(t){return function(){return t}}function Ke(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function Qe(t,a,l,n,s){for(var i=t.children,h,d=-1,g=i.length,c=t.value&&(n-a)/t.value;++d<g;)h=i[d],h.y0=l,h.y1=s,h.x0=a,h.x1=a+=h.value*c}function et(t,a,l,n,s){for(var i=t.children,h,d=-1,g=i.length,c=t.value&&(s-l)/t.value;++d<g;)h=i[d],h.x0=a,h.x1=n,h.y0=l,h.y1=l+=h.value*c}var tt=(1+Math.sqrt(5))/2;function at(t,a,l,n,s,i){for(var h=[],d=a.children,g,c,u=0,b=0,r=d.length,x,S,v=a.value,p,y,N,$,V,R,M;u<r;){x=s-l,S=i-n;do p=d[b++].value;while(!p&&b<r);for(y=N=p,R=Math.max(S/x,x/S)/(v*t),M=p*p*R,V=Math.max(N/M,M/y);b<r;++b){if(p+=c=d[b].value,c<y&&(y=c),c>N&&(N=c),M=p*p*R,$=Math.max(N/M,M/y),$>V){p-=c;break}V=$}h.push(g={value:p,dice:x<S,children:d.slice(u,b)}),g.dice?Qe(g,l,n,s,v?n+=S*p/v:i):et(g,l,n,v?l+=x*p/v:s,i),v-=p,u=b}return h}const nt=(function t(a){function l(n,s,i,h,d){at(a,n,s,i,h,d)}return l.ratio=function(n){return t((n=+n)>1?n:1)},l})(tt);function lt(){var t=nt,a=!1,l=1,n=1,s=[0],i=G,h=G,d=G,g=G,c=G;function u(r){return r.x0=r.y0=0,r.x1=l,r.y1=n,r.eachBefore(b),s=[0],a&&r.eachBefore(Ke),r}function b(r){var x=s[r.depth],S=r.x0+x,v=r.y0+x,p=r.x1-x,y=r.y1-x;p<S&&(S=p=(S+p)/2),y<v&&(v=y=(v+y)/2),r.x0=S,r.y0=v,r.x1=p,r.y1=y,r.children&&(x=s[r.depth+1]=i(r)/2,S+=c(r)-x,v+=h(r)-x,p-=d(r)-x,y-=g(r)-x,p<S&&(S=p=(S+p)/2),y<v&&(v=y=(v+y)/2),t(r,S,v,p,y))}return u.round=function(r){return arguments.length?(a=!!r,u):a},u.size=function(r){return arguments.length?(l=+r[0],n=+r[1],u):[l,n]},u.tile=function(r){return arguments.length?(t=Je(r),u):t},u.padding=function(r){return arguments.length?u.paddingInner(r).paddingOuter(r):u.paddingInner()},u.paddingInner=function(r){return arguments.length?(i=typeof r=="function"?r:q(+r),u):i},u.paddingOuter=function(r){return arguments.length?u.paddingTop(r).paddingRight(r).paddingBottom(r).paddingLeft(r):u.paddingTop()},u.paddingTop=function(r){return arguments.length?(h=typeof r=="function"?r:q(+r),u):h},u.paddingRight=function(r){return arguments.length?(d=typeof r=="function"?r:q(+r),u):d},u.paddingBottom=function(r){return arguments.length?(g=typeof r=="function"?r:q(+r),u):g},u.paddingLeft=function(r){return arguments.length?(c=typeof r=="function"?r:q(+r),u):c},u}var E,oe=(E=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=be,this.getAccTitle=we,this.setDiagramTitle=Ce,this.getDiagramTitle=Te,this.getAccDescription=Le,this.setAccDescription=$e}getNodes(){return this.nodes}getConfig(){const a=Ae,l=ae();return ee({...a.treemap,...l.treemap??{}})}addNode(a,l){this.nodes.push(a),this.levels.set(a,l),l===0&&(this.outerNodes.push(a),this.root??=a)}getRoot(){return{name:"",children:this.outerNodes}}addClass(a,l){const n=this.classes.get(a)??{id:a,styles:[],textStyles:[]},s=l.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");s&&s.forEach(i=>{Fe(i)&&(n?.textStyles?n.textStyles.push(i):n.textStyles=[i]),n?.styles?n.styles.push(i):n.styles=[i]}),this.classes.set(a,n)}getClasses(){return this.classes}getStylesForClass(a){return this.classes.get(a)?.styles??[]}clear(){Ne(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}},w(E,"TreeMapDB"),E);function ce(t){if(!t.length)return[];const a=[],l=[];return t.forEach(n=>{const s={name:n.name,children:n.type==="Leaf"?void 0:[]};for(s.classSelector=n?.classSelector,n?.cssCompiledStyles&&(s.cssCompiledStyles=n.cssCompiledStyles),n.type==="Leaf"&&n.value!==void 0&&(s.value=n.value);l.length>0&&l[l.length-1].level>=n.level;)l.pop();if(l.length===0)a.push(s);else{const i=l[l.length-1].node;i.children?i.children.push(s):i.children=[s]}n.type!=="Leaf"&&l.push({node:s,level:n.level})}),a}w(ce,"buildHierarchy");var st=w((t,a)=>{ye(t,a);const l=[];for(const i of t.TreemapRows??[])i.$type==="ClassDefStatement"&&a.addClass(i.className??"",i.styleText??"");for(const i of t.TreemapRows??[]){const h=i.item;if(!h)continue;const d=i.indent?parseInt(i.indent):0,g=rt(h),c=h.classSelector?a.getStylesForClass(h.classSelector):[],u=c.length>0?c:void 0,b={level:d,name:g,type:h.$type,value:h.value,classSelector:h.classSelector,cssCompiledStyles:u};l.push(b)}const n=ce(l),s=w((i,h)=>{for(const d of i)a.addNode(d,h),d.children&&d.children.length>0&&s(d.children,h+1)},"addNodesRecursively");s(n,0)},"populate"),rt=w(t=>t.name?String(t.name):"","getItemName"),he={parser:{yy:void 0},parse:w(async t=>{try{const l=await Me("treemap",t);te.debug("Treemap AST:",l);const n=he.parser?.yy;if(!(n instanceof oe))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");st(l,n)}catch(a){throw te.error("Error parsing treemap:",a),a}},"parse")},it=10,W=10,X=25,ot=w((t,a,l,n)=>{const s=n.db,i=s.getConfig(),h=i.padding??it,d=s.getDiagramTitle(),g=s.getRoot(),{themeVariables:c}=ae();if(!g)return;const u=d?30:0,b=ve(a),r=i.nodeWidth?i.nodeWidth*W:960,x=i.nodeHeight?i.nodeHeight*W:500,S=r,v=x+u;b.attr("viewBox",`0 0 ${S} ${v}`),xe(b,v,S,i.useMaxWidth);let p;try{const e=i.valueFormat||",";if(e==="$0,0")p=w(o=>"$"+O(",")(o),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){const o=/\.\d+/.exec(e),f=o?o[0]:"";p=w(C=>"$"+O(","+f)(C),"valueFormat")}else if(e.startsWith("$")){const o=e.substring(1);p=w(f=>"$"+O(o||"")(f),"valueFormat")}else p=O(e)}catch(e){te.error("Error creating format function:",e),p=O(",")}const y=Q().range(["transparent",c.cScale0,c.cScale1,c.cScale2,c.cScale3,c.cScale4,c.cScale5,c.cScale6,c.cScale7,c.cScale8,c.cScale9,c.cScale10,c.cScale11]),N=Q().range(["transparent",c.cScalePeer0,c.cScalePeer1,c.cScalePeer2,c.cScalePeer3,c.cScalePeer4,c.cScalePeer5,c.cScalePeer6,c.cScalePeer7,c.cScalePeer8,c.cScalePeer9,c.cScalePeer10,c.cScalePeer11]),$=Q().range([c.cScaleLabel0,c.cScaleLabel1,c.cScaleLabel2,c.cScaleLabel3,c.cScaleLabel4,c.cScaleLabel5,c.cScaleLabel6,c.cScaleLabel7,c.cScaleLabel8,c.cScaleLabel9,c.cScaleLabel10,c.cScaleLabel11]);d&&b.append("text").attr("x",S/2).attr("y",u/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(d);const V=b.append("g").attr("transform",`translate(0, ${u})`).attr("class","treemapContainer"),R=ne(g).sum(e=>e.value??0).sort((e,o)=>(o.value??0)-(e.value??0)),le=lt().size([r,x]).paddingTop(e=>e.children&&e.children.length>0?X+W:0).paddingInner(h).paddingLeft(e=>e.children&&e.children.length>0?W:0).paddingRight(e=>e.children&&e.children.length>0?W:0).paddingBottom(e=>e.children&&e.children.length>0?W:0).round(!0)(R),de=le.descendants().filter(e=>e.children&&e.children.length>0),I=V.selectAll(".treemapSection").data(de).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);I.append("rect").attr("width",e=>e.x1-e.x0).attr("height",X).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>e.depth===0?"display: none;":""),I.append("clipPath").attr("id",(e,o)=>`clip-section-${a}-${o}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",X),I.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,o)=>`treemapSection section${o}`).attr("fill",e=>y(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>N(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(e.depth===0)return"display: none;";const o=B({cssCompiledStyles:e.data.cssCompiledStyles});return o.nodeStyles+";"+o.borderStyles.join(";")}),I.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",X/2).attr("dominant-baseline","middle").text(e=>e.depth===0?"":e.data.name).attr("font-weight","bold").attr("clip-path",(e,o)=>`url(#clip-section-${a}-${o})`).attr("style",e=>{if(e.depth===0)return"display: none;";const o="dominant-baseline: middle; font-size: 12px; fill:"+$(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=B({cssCompiledStyles:e.data.cssCompiledStyles});return o+f.labelStyles.replace("color:","fill:")}).each(function(e){if(e.depth===0)return;const o=U(this),f=e.data.name;o.text(f);const C=e.x1-e.x0,L=6;let T;i.showValues!==!1&&e.value?T=C-10-30-10-L:T=C-L-6;const m=Math.max(15,T),_=o.node();if(_.getComputedTextLength()>m){let z=f;for(;z.length>0;){if(z=f.substring(0,z.length-1),z.length===0){o.text("..."),_.getComputedTextLength()>m&&o.text("");break}if(o.text(z+"..."),_.getComputedTextLength()<=m)break}}}),i.showValues!==!1&&I.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",X/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?p(e.value):"").attr("font-style","italic").attr("style",e=>{if(e.depth===0)return"display: none;";const o="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+$(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=B({cssCompiledStyles:e.data.cssCompiledStyles});return o+f.labelStyles.replace("color:","fill:")});const se=le.leaves(),A=se.length>20,ue=A?16:38,Y=A?14:28,D=A?4:8,H=A?4:6,J=A?2:4,re=A?8:10,K=A?1:2,j=V.selectAll(".treemapLeafGroup").data(se).enter().append("g").attr("class",(e,o)=>`treemapNode treemapLeafGroup leaf${o}${e.data.classSelector?` ${e.data.classSelector}`:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`);j.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?y(e.parent.data.name):y(e.data.name)).attr("style",e=>B({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?y(e.parent.data.name):y(e.data.name)).attr("stroke-width",3),j.append("clipPath").attr("id",(e,o)=>`clip-${a}-${o}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4)),j.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>{const o=`text-anchor: middle; dominant-baseline: middle; font-size: ${ue}px;fill:`+$(e.data.name)+";",f=B({cssCompiledStyles:e.data.cssCompiledStyles});return o+f.labelStyles.replace("color:","fill:")}).attr("clip-path",(e,o)=>`url(#clip-${a}-${o})`).text(e=>e.data.name).each(function(e){const o=U(this),f=e.x1-e.x0,C=e.y1-e.y0,L=o.node(),T=f-2*J,P=C-2*J;if(T<re||P<re){o.style("display","none");return}let m=parseInt(o.style("font-size"),10);const _=.6;for(;L.getComputedTextLength()>T&&m>D;)m--,o.style("font-size",`${m}px`);let F=Math.max(H,Math.min(Y,Math.round(m*_))),k=m+K+F;for(;k>P&&m>D&&(m--,F=Math.max(H,Math.min(Y,Math.round(m*_))),!(F<H&&m===D));)o.style("font-size",`${m}px`),k=m+K+F;o.style("font-size",`${m}px`),A?(m<D||P<D)&&o.style("display","none"):(L.getComputedTextLength()>T||m<D||P<m)&&o.style("display","none")}),i.showValues!==!1&&j.append("text").attr("class","treemapValue").attr("x",o=>(o.x1-o.x0)/2).attr("y",function(o){return(o.y1-o.y0)/2}).attr("style",o=>{const f=`text-anchor: middle; dominant-baseline: hanging; font-size: ${Y}px;fill:`+$(o.data.name)+";",C=B({cssCompiledStyles:o.data.cssCompiledStyles});return f+C.labelStyles.replace("color:","fill:")}).attr("clip-path",(o,f)=>`url(#clip-${a}-${f})`).text(o=>o.value?p(o.value):"").each(function(o){const f=U(this),C=this.parentNode;if(!C){f.style("display","none");return}const L=U(C).select(".treemapLabel");if(L.empty()||L.style("display")==="none"){f.style("display","none");return}const T=parseFloat(L.style("font-size")),m=Math.max(H,Math.min(Y,Math.round(T*.6)));f.style("font-size",`${m}px`);const F=(o.y1-o.y0)/2+T/2+K;f.attr("y",F);const k=o.x1-o.x0,ie=o.y1-o.y0-4,me=k-2*J;f.node().getComputedTextLength()>me||F+m>ie||m<H?f.style("display","none"):f.style("display",null)});const pe=i.diagramPadding??8;ge(b,pe,"flowchart",i?.useMaxWidth||!1)},"draw"),ct=w(function(t,a){return a.db.getClasses()},"getClasses"),ht={draw:ot,getClasses:ct},dt={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},ut=w(({treemap:t}={})=>{const a=Se(),l=ae(),n=ee(a,l.themeVariables),s=ee(dt,t),i=s.titleColor??n.titleColor,h=s.labelColor??n.textColor,d=s.valueColor??n.textColor;return`
|
|
2
|
+
.treemapNode.section {
|
|
3
|
+
stroke: ${s.sectionStrokeColor};
|
|
4
|
+
stroke-width: ${s.sectionStrokeWidth};
|
|
5
|
+
fill: ${s.sectionFillColor};
|
|
6
|
+
}
|
|
7
|
+
.treemapNode.leaf {
|
|
8
|
+
stroke: ${s.leafStrokeColor};
|
|
9
|
+
stroke-width: ${s.leafStrokeWidth};
|
|
10
|
+
fill: ${s.leafFillColor};
|
|
11
|
+
}
|
|
12
|
+
.treemapLabel {
|
|
13
|
+
fill: ${h};
|
|
14
|
+
font-size: ${s.labelFontSize};
|
|
15
|
+
}
|
|
16
|
+
.treemapValue {
|
|
17
|
+
fill: ${d};
|
|
18
|
+
font-size: ${s.valueFontSize};
|
|
19
|
+
}
|
|
20
|
+
.treemapTitle {
|
|
21
|
+
fill: ${i};
|
|
22
|
+
font-size: ${s.titleFontSize};
|
|
23
|
+
}
|
|
24
|
+
`},"getStyles"),pt=ut,bt={parser:he,get db(){return new oe},renderer:ht,styles:pt};export{bt as diagram};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./B8o4lNgr.js";import{p as r}from"./
|
|
1
|
+
import"./B8o4lNgr.js";import{p as r}from"./BpXeqZkK.js";const t={get error(){return r.error},get params(){return r.params},get state(){return r.state},get status(){return r.status},get url(){return r.url}},s=t;export{s as p};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import{e as Ie}from"./CSiG9Hvp.js";import{bf as Me,a5 as Be,a6 as Ve,bg as Ye,c as d,a8 as Ot,aN as de,I as Fe,l as Ue,aA as je,t as Nt,bn as ze,bb as ge,bc as Zt,bE as We,G as te,s as pe}from"./Cl430GWg.js";var jt=(function(){var t=d(function(_t,g,x,E){for(x=x||{},E=_t.length;E--;x[_t[E]]=g);return x},"o"),e=[1,24],a=[1,25],i=[1,26],u=[1,27],r=[1,28],n=[1,63],l=[1,64],s=[1,65],h=[1,66],y=[1,67],p=[1,68],b=[1,69],v=[1,29],w=[1,30],N=[1,31],O=[1,32],P=[1,33],I=[1,34],X=[1,35],q=[1,36],H=[1,37],Q=[1,38],K=[1,39],G=[1,40],J=[1,41],Z=[1,42],$=[1,43],tt=[1,44],et=[1,45],nt=[1,46],st=[1,47],at=[1,48],rt=[1,50],it=[1,51],ot=[1,52],lt=[1,53],ct=[1,54],ut=[1,55],ht=[1,56],dt=[1,57],pt=[1,58],ft=[1,59],yt=[1,60],kt=[14,42],Xt=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Pt=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],S=[1,82],T=[1,83],k=[1,84],C=[1,85],R=[12,14,42],oe=[12,14,33,42],Bt=[12,14,33,42,76,77,79,80],xt=[12,33],qt=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Ht={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:d(function(g,x,E,_,D,o,Dt){var f=o.length-1;switch(D){case 3:_.setDirection("TB");break;case 4:_.setDirection("BT");break;case 5:_.setDirection("RL");break;case 6:_.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:_.setC4Type(o[f-3]);break;case 19:_.setTitle(o[f].substring(6)),this.$=o[f].substring(6);break;case 20:_.setAccDescription(o[f].substring(15)),this.$=o[f].substring(15);break;case 21:this.$=o[f].trim(),_.setTitle(this.$);break;case 22:case 23:this.$=o[f].trim(),_.setAccDescription(this.$);break;case 28:o[f].splice(2,0,"ENTERPRISE"),_.addPersonOrSystemBoundary(...o[f]),this.$=o[f];break;case 29:o[f].splice(2,0,"SYSTEM"),_.addPersonOrSystemBoundary(...o[f]),this.$=o[f];break;case 30:_.addPersonOrSystemBoundary(...o[f]),this.$=o[f];break;case 31:o[f].splice(2,0,"CONTAINER"),_.addContainerBoundary(...o[f]),this.$=o[f];break;case 32:_.addDeploymentNode("node",...o[f]),this.$=o[f];break;case 33:_.addDeploymentNode("nodeL",...o[f]),this.$=o[f];break;case 34:_.addDeploymentNode("nodeR",...o[f]),this.$=o[f];break;case 35:_.popBoundaryParseStack();break;case 39:_.addPersonOrSystem("person",...o[f]),this.$=o[f];break;case 40:_.addPersonOrSystem("external_person",...o[f]),this.$=o[f];break;case 41:_.addPersonOrSystem("system",...o[f]),this.$=o[f];break;case 42:_.addPersonOrSystem("system_db",...o[f]),this.$=o[f];break;case 43:_.addPersonOrSystem("system_queue",...o[f]),this.$=o[f];break;case 44:_.addPersonOrSystem("external_system",...o[f]),this.$=o[f];break;case 45:_.addPersonOrSystem("external_system_db",...o[f]),this.$=o[f];break;case 46:_.addPersonOrSystem("external_system_queue",...o[f]),this.$=o[f];break;case 47:_.addContainer("container",...o[f]),this.$=o[f];break;case 48:_.addContainer("container_db",...o[f]),this.$=o[f];break;case 49:_.addContainer("container_queue",...o[f]),this.$=o[f];break;case 50:_.addContainer("external_container",...o[f]),this.$=o[f];break;case 51:_.addContainer("external_container_db",...o[f]),this.$=o[f];break;case 52:_.addContainer("external_container_queue",...o[f]),this.$=o[f];break;case 53:_.addComponent("component",...o[f]),this.$=o[f];break;case 54:_.addComponent("component_db",...o[f]),this.$=o[f];break;case 55:_.addComponent("component_queue",...o[f]),this.$=o[f];break;case 56:_.addComponent("external_component",...o[f]),this.$=o[f];break;case 57:_.addComponent("external_component_db",...o[f]),this.$=o[f];break;case 58:_.addComponent("external_component_queue",...o[f]),this.$=o[f];break;case 60:_.addRel("rel",...o[f]),this.$=o[f];break;case 61:_.addRel("birel",...o[f]),this.$=o[f];break;case 62:_.addRel("rel_u",...o[f]),this.$=o[f];break;case 63:_.addRel("rel_d",...o[f]),this.$=o[f];break;case 64:_.addRel("rel_l",...o[f]),this.$=o[f];break;case 65:_.addRel("rel_r",...o[f]),this.$=o[f];break;case 66:_.addRel("rel_b",...o[f]),this.$=o[f];break;case 67:o[f].splice(0,1),_.addRel("rel",...o[f]),this.$=o[f];break;case 68:_.updateElStyle("update_el_style",...o[f]),this.$=o[f];break;case 69:_.updateRelStyle("update_rel_style",...o[f]),this.$=o[f];break;case 70:_.updateLayoutConfig("update_layout_config",...o[f]),this.$=o[f];break;case 71:this.$=[o[f]];break;case 72:o[f].unshift(o[f-1]),this.$=o[f];break;case 73:case 75:this.$=o[f].trim();break;case 74:let vt={};vt[o[f-1].trim()]=o[f].trim(),this.$=vt;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:e,23:a,24:i,26:u,28:r,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:p,41:b,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:X,51:q,52:H,53:Q,54:K,55:G,56:J,57:Z,58:$,59:tt,60:et,61:nt,62:st,63:at,64:rt,65:it,66:ot,67:lt,68:ct,69:ut,70:ht,71:dt,72:pt,73:ft,74:yt},{13:70,19:20,20:21,21:22,22:e,23:a,24:i,26:u,28:r,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:p,41:b,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:X,51:q,52:H,53:Q,54:K,55:G,56:J,57:Z,58:$,59:tt,60:et,61:nt,62:st,63:at,64:rt,65:it,66:ot,67:lt,68:ct,69:ut,70:ht,71:dt,72:pt,73:ft,74:yt},{13:71,19:20,20:21,21:22,22:e,23:a,24:i,26:u,28:r,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:p,41:b,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:X,51:q,52:H,53:Q,54:K,55:G,56:J,57:Z,58:$,59:tt,60:et,61:nt,62:st,63:at,64:rt,65:it,66:ot,67:lt,68:ct,69:ut,70:ht,71:dt,72:pt,73:ft,74:yt},{13:72,19:20,20:21,21:22,22:e,23:a,24:i,26:u,28:r,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:p,41:b,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:X,51:q,52:H,53:Q,54:K,55:G,56:J,57:Z,58:$,59:tt,60:et,61:nt,62:st,63:at,64:rt,65:it,66:ot,67:lt,68:ct,69:ut,70:ht,71:dt,72:pt,73:ft,74:yt},{13:73,19:20,20:21,21:22,22:e,23:a,24:i,26:u,28:r,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:p,41:b,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:X,51:q,52:H,53:Q,54:K,55:G,56:J,57:Z,58:$,59:tt,60:et,61:nt,62:st,63:at,64:rt,65:it,66:ot,67:lt,68:ct,69:ut,70:ht,71:dt,72:pt,73:ft,74:yt},{14:[1,74]},t(kt,[2,13],{43:23,29:49,30:61,32:62,20:75,34:n,36:l,37:s,38:h,39:y,40:p,41:b,44:v,45:w,46:N,47:O,48:P,49:I,50:X,51:q,52:H,53:Q,54:K,55:G,56:J,57:Z,58:$,59:tt,60:et,61:nt,62:st,63:at,64:rt,65:it,66:ot,67:lt,68:ct,69:ut,70:ht,71:dt,72:pt,73:ft,74:yt}),t(kt,[2,14]),t(Xt,[2,16],{12:[1,76]}),t(kt,[2,36],{12:[1,77]}),t(Pt,[2,19]),t(Pt,[2,20]),{25:[1,78]},{27:[1,79]},t(Pt,[2,23]),{35:80,75:81,76:S,77:T,79:k,80:C},{35:86,75:81,76:S,77:T,79:k,80:C},{35:87,75:81,76:S,77:T,79:k,80:C},{35:88,75:81,76:S,77:T,79:k,80:C},{35:89,75:81,76:S,77:T,79:k,80:C},{35:90,75:81,76:S,77:T,79:k,80:C},{35:91,75:81,76:S,77:T,79:k,80:C},{35:92,75:81,76:S,77:T,79:k,80:C},{35:93,75:81,76:S,77:T,79:k,80:C},{35:94,75:81,76:S,77:T,79:k,80:C},{35:95,75:81,76:S,77:T,79:k,80:C},{35:96,75:81,76:S,77:T,79:k,80:C},{35:97,75:81,76:S,77:T,79:k,80:C},{35:98,75:81,76:S,77:T,79:k,80:C},{35:99,75:81,76:S,77:T,79:k,80:C},{35:100,75:81,76:S,77:T,79:k,80:C},{35:101,75:81,76:S,77:T,79:k,80:C},{35:102,75:81,76:S,77:T,79:k,80:C},{35:103,75:81,76:S,77:T,79:k,80:C},{35:104,75:81,76:S,77:T,79:k,80:C},t(R,[2,59]),{35:105,75:81,76:S,77:T,79:k,80:C},{35:106,75:81,76:S,77:T,79:k,80:C},{35:107,75:81,76:S,77:T,79:k,80:C},{35:108,75:81,76:S,77:T,79:k,80:C},{35:109,75:81,76:S,77:T,79:k,80:C},{35:110,75:81,76:S,77:T,79:k,80:C},{35:111,75:81,76:S,77:T,79:k,80:C},{35:112,75:81,76:S,77:T,79:k,80:C},{35:113,75:81,76:S,77:T,79:k,80:C},{35:114,75:81,76:S,77:T,79:k,80:C},{35:115,75:81,76:S,77:T,79:k,80:C},{20:116,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:p,41:b,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:X,51:q,52:H,53:Q,54:K,55:G,56:J,57:Z,58:$,59:tt,60:et,61:nt,62:st,63:at,64:rt,65:it,66:ot,67:lt,68:ct,69:ut,70:ht,71:dt,72:pt,73:ft,74:yt},{12:[1,118],33:[1,117]},{35:119,75:81,76:S,77:T,79:k,80:C},{35:120,75:81,76:S,77:T,79:k,80:C},{35:121,75:81,76:S,77:T,79:k,80:C},{35:122,75:81,76:S,77:T,79:k,80:C},{35:123,75:81,76:S,77:T,79:k,80:C},{35:124,75:81,76:S,77:T,79:k,80:C},{35:125,75:81,76:S,77:T,79:k,80:C},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t(kt,[2,15]),t(Xt,[2,17],{21:22,19:130,22:e,23:a,24:i,26:u,28:r}),t(kt,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:e,23:a,24:i,26:u,28:r,34:n,36:l,37:s,38:h,39:y,40:p,41:b,44:v,45:w,46:N,47:O,48:P,49:I,50:X,51:q,52:H,53:Q,54:K,55:G,56:J,57:Z,58:$,59:tt,60:et,61:nt,62:st,63:at,64:rt,65:it,66:ot,67:lt,68:ct,69:ut,70:ht,71:dt,72:pt,73:ft,74:yt}),t(Pt,[2,21]),t(Pt,[2,22]),t(R,[2,39]),t(oe,[2,71],{75:81,35:132,76:S,77:T,79:k,80:C}),t(Bt,[2,73]),{78:[1,133]},t(Bt,[2,75]),t(Bt,[2,76]),t(R,[2,40]),t(R,[2,41]),t(R,[2,42]),t(R,[2,43]),t(R,[2,44]),t(R,[2,45]),t(R,[2,46]),t(R,[2,47]),t(R,[2,48]),t(R,[2,49]),t(R,[2,50]),t(R,[2,51]),t(R,[2,52]),t(R,[2,53]),t(R,[2,54]),t(R,[2,55]),t(R,[2,56]),t(R,[2,57]),t(R,[2,58]),t(R,[2,60]),t(R,[2,61]),t(R,[2,62]),t(R,[2,63]),t(R,[2,64]),t(R,[2,65]),t(R,[2,66]),t(R,[2,67]),t(R,[2,68]),t(R,[2,69]),t(R,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(xt,[2,28]),t(xt,[2,29]),t(xt,[2,30]),t(xt,[2,31]),t(xt,[2,32]),t(xt,[2,33]),t(xt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t(Xt,[2,18]),t(kt,[2,38]),t(oe,[2,72]),t(Bt,[2,74]),t(R,[2,24]),t(R,[2,35]),t(qt,[2,25]),t(qt,[2,26],{12:[1,138]}),t(qt,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:d(function(g,x){if(x.recoverable)this.trace(g);else{var E=new Error(g);throw E.hash=x,E}},"parseError"),parse:d(function(g){var x=this,E=[0],_=[],D=[null],o=[],Dt=this.table,f="",vt=0,le=0,De=2,ce=1,Ne=o.slice.call(arguments,1),A=Object.create(this.lexer),Et={yy:{}};for(var Qt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Qt)&&(Et.yy[Qt]=this.yy[Qt]);A.setInput(g,Et.yy),Et.yy.lexer=A,Et.yy.parser=this,typeof A.yylloc>"u"&&(A.yylloc={});var Kt=A.yylloc;o.push(Kt);var Ae=A.options&&A.options.ranges;typeof Et.yy.parseError=="function"?this.parseError=Et.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Le(B){E.length=E.length-2*B,D.length=D.length-B,o.length=o.length-B}d(Le,"popStack");function ue(){var B;return B=_.pop()||A.lex()||ce,typeof B!="number"&&(B instanceof Array&&(_=B,B=_.pop()),B=x.symbols_[B]||B),B}d(ue,"lex");for(var M,St,V,Gt,Ct={},Yt,z,he,Ft;;){if(St=E[E.length-1],this.defaultActions[St]?V=this.defaultActions[St]:((M===null||typeof M>"u")&&(M=ue()),V=Dt[St]&&Dt[St][M]),typeof V>"u"||!V.length||!V[0]){var Jt="";Ft=[];for(Yt in Dt[St])this.terminals_[Yt]&&Yt>De&&Ft.push("'"+this.terminals_[Yt]+"'");A.showPosition?Jt="Parse error on line "+(vt+1)+`:
|
|
2
|
+
`+A.showPosition()+`
|
|
3
|
+
Expecting `+Ft.join(", ")+", got '"+(this.terminals_[M]||M)+"'":Jt="Parse error on line "+(vt+1)+": Unexpected "+(M==ce?"end of input":"'"+(this.terminals_[M]||M)+"'"),this.parseError(Jt,{text:A.match,token:this.terminals_[M]||M,line:A.yylineno,loc:Kt,expected:Ft})}if(V[0]instanceof Array&&V.length>1)throw new Error("Parse Error: multiple actions possible at state: "+St+", token: "+M);switch(V[0]){case 1:E.push(M),D.push(A.yytext),o.push(A.yylloc),E.push(V[1]),M=null,le=A.yyleng,f=A.yytext,vt=A.yylineno,Kt=A.yylloc;break;case 2:if(z=this.productions_[V[1]][1],Ct.$=D[D.length-z],Ct._$={first_line:o[o.length-(z||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(z||1)].first_column,last_column:o[o.length-1].last_column},Ae&&(Ct._$.range=[o[o.length-(z||1)].range[0],o[o.length-1].range[1]]),Gt=this.performAction.apply(Ct,[f,le,vt,Et.yy,V[1],D,o].concat(Ne)),typeof Gt<"u")return Gt;z&&(E=E.slice(0,-1*z*2),D=D.slice(0,-1*z),o=o.slice(0,-1*z)),E.push(this.productions_[V[1]][0]),D.push(Ct.$),o.push(Ct._$),he=Dt[E[E.length-2]][E[E.length-1]],E.push(he);break;case 3:return!0}}return!0},"parse")},Pe=(function(){var _t={EOF:1,parseError:d(function(x,E){if(this.yy.parser)this.yy.parser.parseError(x,E);else throw new Error(x)},"parseError"),setInput:d(function(g,x){return this.yy=x||this.yy||{},this._input=g,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},"setInput"),input:d(function(){var g=this._input[0];this.yytext+=g,this.yyleng++,this.offset++,this.match+=g,this.matched+=g;var x=g.match(/(?:\r\n?|\n).*/g);return x?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),g},"input"),unput:d(function(g){var x=g.length,E=g.split(/(?:\r\n?|\n)/g);this._input=g+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-x),this.offset-=x;var _=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),E.length-1&&(this.yylineno-=E.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:E?(E.length===_.length?this.yylloc.first_column:0)+_[_.length-E.length].length-E[0].length:this.yylloc.first_column-x},this.options.ranges&&(this.yylloc.range=[D[0],D[0]+this.yyleng-x]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(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},"reject"),less:d(function(g){this.unput(this.match.slice(g))},"less"),pastInput:d(function(){var g=this.matched.substr(0,this.matched.length-this.match.length);return(g.length>20?"...":"")+g.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var g=this.match;return g.length<20&&(g+=this._input.substr(0,20-g.length)),(g.substr(0,20)+(g.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var g=this.pastInput(),x=new Array(g.length+1).join("-");return g+this.upcomingInput()+`
|
|
5
|
+
`+x+"^"},"showPosition"),test_match:d(function(g,x){var E,_,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))),_=g[0].match(/(?:\r\n?|\n).*/g),_&&(this.yylineno+=_.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:_?_[_.length-1].length-_[_.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+g[0].length},this.yytext+=g[0],this.match+=g[0],this.matches=g,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(g[0].length),this.matched+=g[0],E=this.performAction.call(this,this.yy,this,x,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),E)return E;if(this._backtrack){for(var o in D)this[o]=D[o];return!1}return!1},"test_match"),next:d(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var g,x,E,_;this._more||(this.yytext="",this.match="");for(var D=this._currentRules(),o=0;o<D.length;o++)if(E=this._input.match(this.rules[D[o]]),E&&(!x||E[0].length>x[0].length)){if(x=E,_=o,this.options.backtrack_lexer){if(g=this.test_match(E,D[o]),g!==!1)return g;if(this._backtrack){x=!1;continue}else return!1}else if(!this.options.flex)break}return x?(g=this.test_match(x,D[_]),g!==!1?g:!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})},"next"),lex:d(function(){var x=this.next();return x||this.lex()},"lex"),begin:d(function(x){this.conditionStack.push(x)},"begin"),popState:d(function(){var x=this.conditionStack.length-1;return x>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:d(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:d(function(x){return x=this.conditionStack.length-1-Math.abs(x||0),x>=0?this.conditionStack[x]:"INITIAL"},"topState"),pushState:d(function(x){this.begin(x)},"pushState"),stateStackSize:d(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:d(function(x,E,_,D){switch(_){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin("acc_title"),24;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),26;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:break;case 14:c;break;case 15:return 12;case 16:break;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin("person_ext"),45;case 23:return this.begin("person"),44;case 24:return this.begin("system_ext_queue"),51;case 25:return this.begin("system_ext_db"),50;case 26:return this.begin("system_ext"),49;case 27:return this.begin("system_queue"),48;case 28:return this.begin("system_db"),47;case 29:return this.begin("system"),46;case 30:return this.begin("boundary"),37;case 31:return this.begin("enterprise_boundary"),34;case 32:return this.begin("system_boundary"),36;case 33:return this.begin("container_ext_queue"),57;case 34:return this.begin("container_ext_db"),56;case 35:return this.begin("container_ext"),55;case 36:return this.begin("container_queue"),54;case 37:return this.begin("container_db"),53;case 38:return this.begin("container"),52;case 39:return this.begin("container_boundary"),38;case 40:return this.begin("component_ext_queue"),63;case 41:return this.begin("component_ext_db"),62;case 42:return this.begin("component_ext"),61;case 43:return this.begin("component_queue"),60;case 44:return this.begin("component_db"),59;case 45:return this.begin("component"),58;case 46:return this.begin("node"),39;case 47:return this.begin("node"),39;case 48:return this.begin("node_l"),40;case 49:return this.begin("node_r"),41;case 50:return this.begin("rel"),64;case 51:return this.begin("birel"),65;case 52:return this.begin("rel_u"),66;case 53:return this.begin("rel_u"),66;case 54:return this.begin("rel_d"),67;case 55:return this.begin("rel_d"),67;case 56:return this.begin("rel_l"),68;case 57:return this.begin("rel_l"),68;case 58:return this.begin("rel_r"),69;case 59:return this.begin("rel_r"),69;case 60:return this.begin("rel_b"),70;case 61:return this.begin("rel_index"),71;case 62:return this.begin("update_el_style"),72;case 63:return this.begin("update_rel_style"),73;case 64:return this.begin("update_layout_config"),74;case 65:return"EOF_IN_STRUCT";case 66:return this.begin("attribute"),"ATTRIBUTE_EMPTY";case 67:this.begin("attribute");break;case 68:this.popState(),this.popState();break;case 69:return 80;case 70:break;case 71:return 80;case 72:this.begin("string");break;case 73:this.popState();break;case 74:return"STR";case 75:this.begin("string_kv");break;case 76:return this.begin("string_kv_key"),"STR_KEY";case 77:this.popState(),this.begin("string_kv_value");break;case 78:return"STR_VALUE";case 79:this.popState(),this.popState();break;case 80:return"STR";case 81:return"LBRACE";case 82:return"RBRACE";case 83:return"SPACE";case 84:return"EOL";case 85:return 14}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},string_kv_value:{rules:[78,79],inclusive:!1},string_kv_key:{rules:[77],inclusive:!1},string_kv:{rules:[76],inclusive:!1},string:{rules:[73,74],inclusive:!1},attribute:{rules:[68,69,70,71,72,75,80],inclusive:!1},update_layout_config:{rules:[65,66,67,68],inclusive:!1},update_rel_style:{rules:[65,66,67,68],inclusive:!1},update_el_style:{rules:[65,66,67,68],inclusive:!1},rel_b:{rules:[65,66,67,68],inclusive:!1},rel_r:{rules:[65,66,67,68],inclusive:!1},rel_l:{rules:[65,66,67,68],inclusive:!1},rel_d:{rules:[65,66,67,68],inclusive:!1},rel_u:{rules:[65,66,67,68],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[65,66,67,68],inclusive:!1},node_r:{rules:[65,66,67,68],inclusive:!1},node_l:{rules:[65,66,67,68],inclusive:!1},node:{rules:[65,66,67,68],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[65,66,67,68],inclusive:!1},component_ext_queue:{rules:[65,66,67,68],inclusive:!1},component_ext_db:{rules:[65,66,67,68],inclusive:!1},component_ext:{rules:[65,66,67,68],inclusive:!1},component_queue:{rules:[65,66,67,68],inclusive:!1},component_db:{rules:[65,66,67,68],inclusive:!1},component:{rules:[65,66,67,68],inclusive:!1},container_boundary:{rules:[65,66,67,68],inclusive:!1},container_ext_queue:{rules:[65,66,67,68],inclusive:!1},container_ext_db:{rules:[65,66,67,68],inclusive:!1},container_ext:{rules:[65,66,67,68],inclusive:!1},container_queue:{rules:[65,66,67,68],inclusive:!1},container_db:{rules:[65,66,67,68],inclusive:!1},container:{rules:[65,66,67,68],inclusive:!1},birel:{rules:[65,66,67,68],inclusive:!1},system_boundary:{rules:[65,66,67,68],inclusive:!1},enterprise_boundary:{rules:[65,66,67,68],inclusive:!1},boundary:{rules:[65,66,67,68],inclusive:!1},system_ext_queue:{rules:[65,66,67,68],inclusive:!1},system_ext_db:{rules:[65,66,67,68],inclusive:!1},system_ext:{rules:[65,66,67,68],inclusive:!1},system_queue:{rules:[65,66,67,68],inclusive:!1},system_db:{rules:[65,66,67,68],inclusive:!1},system:{rules:[65,66,67,68],inclusive:!1},person_ext:{rules:[65,66,67,68],inclusive:!1},person:{rules:[65,66,67,68],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,81,82,83,84,85],inclusive:!0}}};return _t})();Ht.lexer=Pe;function Vt(){this.yy={}}return d(Vt,"Parser"),Vt.prototype=Ht,Ht.Parser=Vt,new Vt})();jt.parser=jt;var Xe=jt,me=d(t=>Ot()[t],"getRequiredConfig"),Y=new Set(["label","descr","techn","type"]),Tt=d((t,e)=>{for(const[a,i]of Object.entries(e))if(i!==void 0)if(typeof i=="object"){const[u,r]=Object.entries(i)[0];t[u]=Y.has(u)?{text:r}:r}else t[a]=i},"assignAttributes"),xe=d(()=>({alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}),"createGlobalBoundary"),U=[],bt=[""],L="global",F="",j=[xe()],Mt=[],ae="",re=!1,zt=4,Wt=2,ve,qe=d(function(){return ve},"getC4Type"),He=d(function(t){ve=ge(t,Ot())},"setC4Type"),Qe=d(function(t,e,a,i,u,r,n,l,s){if(t==null||e===void 0||e===null||a===void 0||a===null||i===void 0||i===null)return;let h={};const y=Mt.find(p=>p.from===e&&p.to===a);if(y?h=y:Mt.push(h),h.type=t,h.from=e,h.to=a,h.label={text:i},u==null)h.techn??={text:""};else if(typeof u=="object"){const[p,b]=Object.entries(u)[0];h[p]=Y.has(p)?{text:b}:b}else h.techn={text:u};if(r==null)h.descr??={text:""};else if(typeof r=="object"){const[p,b]=Object.entries(r)[0];h[p]=Y.has(p)?{text:b}:b}else h.descr={text:r};Tt(h,{sprite:n,tags:l,link:s}),h.wrap=mt()},"addRel"),Ke=d(function(t,e,a,i,u,r,n){if(e===null||a===null)return;let l={};const s=U.find(h=>h.alias===e);if(s&&e===s.alias?l=s:(l.alias=e,U.push(l)),a==null?l.label={text:""}:l.label={text:a},i==null)l.descr??={text:""};else if(typeof i=="object"){const[h,y]=Object.entries(i)[0];l[h]=Y.has(h)?{text:y}:y}else l.descr={text:i};Tt(l,{sprite:u,tags:r,link:n}),l.typeC4Shape={text:t},l.parentBoundary=L,l.wrap=mt()},"addPersonOrSystem"),Ge=d(function(t,e,a,i,u,r,n,l){if(e===null||a===null)return;let s={};const h=U.find(y=>y.alias===e);if(h&&e===h.alias?s=h:(s.alias=e,U.push(s)),a==null?s.label={text:""}:s.label={text:a},i==null)s.techn??={text:""};else if(typeof i=="object"){const[y,p]=Object.entries(i)[0];s[y]=Y.has(y)?{text:p}:p}else s.techn={text:i};if(u==null)s.descr??={text:""};else if(typeof u=="object"){const[y,p]=Object.entries(u)[0];s[y]=Y.has(y)?{text:p}:p}else s.descr={text:u};Tt(s,{sprite:r,tags:n,link:l}),s.wrap=mt(),s.typeC4Shape={text:t},s.parentBoundary=L},"addContainer"),Je=d(function(t,e,a,i,u,r,n,l){if(e===null||a===null)return;let s={};const h=U.find(y=>y.alias===e);if(h&&e===h.alias?s=h:(s.alias=e,U.push(s)),a==null?s.label={text:""}:s.label={text:a},i==null)s.techn??={text:""};else if(typeof i=="object"){const[y,p]=Object.entries(i)[0];s[y]=Y.has(y)?{text:p}:p}else s.techn={text:i};if(u==null)s.descr??={text:""};else if(typeof u=="object"){const[y,p]=Object.entries(u)[0];s[y]=Y.has(y)?{text:p}:p}else s.descr={text:u};Tt(s,{sprite:r,tags:n,link:l}),s.wrap=mt(),s.typeC4Shape={text:t},s.parentBoundary=L},"addComponent"),Ze=d(function(t,e,a,i,u){if(t===null||e===null)return;let r={};const n=j.find(l=>l.alias===t);if(n&&t===n.alias?r=n:(r.alias=t,j.push(r)),e==null?r.label={text:""}:r.label={text:e},a==null)r.type={text:"system"};else if(typeof a=="object"){const[l,s]=Object.entries(a)[0];r[l]=Y.has(l)?{text:s}:s}else r.type={text:a};Tt(r,{tags:i,link:u}),r.parentBoundary=L,r.wrap=mt(),F=L,L=t,bt.push(F)},"addPersonOrSystemBoundary"),$e=d(function(t,e,a,i,u){if(t===null||e===null)return;let r={};const n=j.find(l=>l.alias===t);if(n&&t===n.alias?r=n:(r.alias=t,j.push(r)),e==null?r.label={text:""}:r.label={text:e},a==null)r.type={text:"container"};else if(typeof a=="object"){const[l,s]=Object.entries(a)[0];r[l]=Y.has(l)?{text:s}:s}else r.type={text:a};Tt(r,{tags:i,link:u}),r.parentBoundary=L,r.wrap=mt(),F=L,L=t,bt.push(F)},"addContainerBoundary"),t0=d(function(t,e,a,i,u,r,n,l){if(e===null||a===null)return;let s={};const h=j.find(y=>y.alias===e);if(h&&e===h.alias?s=h:(s.alias=e,j.push(s)),a==null?s.label={text:""}:s.label={text:a},i==null)s.type={text:"node"};else if(typeof i=="object"){const[y,p]=Object.entries(i)[0];s[y]=Y.has(y)?{text:p}:p}else s.type={text:i};if(u==null)s.descr??={text:""};else if(typeof u=="object"){const[y,p]=Object.entries(u)[0];s[y]=Y.has(y)?{text:p}:p}else s.descr={text:u};Tt(s,{tags:n,link:l}),s.nodeType=t,s.parentBoundary=L,s.wrap=mt(),F=L,L=e,bt.push(F)},"addDeploymentNode"),e0=d(function(){L=F,bt.pop(),F=bt.pop(),bt.push(F)},"popBoundaryParseStack"),n0=d(function(t,e,a,i,u,r,n,l,s,h,y){let p=U.find(b=>b.alias===e);if(!(p===void 0&&(p=j.find(b=>b.alias===e),p===void 0))){if(a!=null)if(typeof a=="object"){const[b,v]=Object.entries(a)[0];p[b]=v}else p.bgColor=a;if(i!=null)if(typeof i=="object"){const[b,v]=Object.entries(i)[0];p[b]=v}else p.fontColor=i;if(u!=null)if(typeof u=="object"){const[b,v]=Object.entries(u)[0];p[b]=v}else p.borderColor=u;if(r!=null)if(typeof r=="object"){const[b,v]=Object.entries(r)[0];p[b]=v}else p.shadowing=r;if(n!=null)if(typeof n=="object"){const[b,v]=Object.entries(n)[0];p[b]=v}else p.shape=n;if(l!=null)if(typeof l=="object"){const[b,v]=Object.entries(l)[0];p[b]=v}else p.sprite=l;if(s!=null)if(typeof s=="object"){const[b,v]=Object.entries(s)[0];p[b]=v}else p.techn=s;if(h!=null)if(typeof h=="object"){const[b,v]=Object.entries(h)[0];p[b]=v}else p.legendText=h;if(y!=null)if(typeof y=="object"){const[b,v]=Object.entries(y)[0];p[b]=v}else p.legendSprite=y}},"updateElStyle"),s0=d(function(t,e,a,i,u,r,n){const l=Mt.find(s=>s.from===e&&s.to===a);if(l!==void 0){if(i!=null)if(typeof i=="object"){const[s,h]=Object.entries(i)[0];l[s]=h}else l.textColor=i;if(u!=null)if(typeof u=="object"){const[s,h]=Object.entries(u)[0];l[s]=h}else l.lineColor=u;if(r!=null)if(typeof r=="object"){const[s,h]=Object.entries(r)[0];l[s]=parseInt(h)}else l.offsetX=parseInt(r);if(n!=null)if(typeof n=="object"){const[s,h]=Object.entries(n)[0];l[s]=parseInt(h)}else l.offsetY=parseInt(n)}},"updateRelStyle"),a0=d(function(t,e,a){let i=zt,u=Wt;if(typeof e=="object"){const r=Object.values(e)[0];i=parseInt(r)}else i=parseInt(e);if(typeof a=="object"){const r=Object.values(a)[0];u=parseInt(r)}else u=parseInt(a);i>=1&&(zt=i),u>=1&&(Wt=u)},"updateLayoutConfig"),r0=d(function(){return zt},"getC4ShapeInRow"),i0=d(function(){return Wt},"getC4BoundaryInRow"),o0=d(function(){return L},"getCurrentBoundaryParse"),l0=d(function(){return F},"getParentBoundaryParse"),Ee=d(function(t){return t==null?U:U.filter(e=>e.parentBoundary===t)},"getC4ShapeArray"),c0=d(function(t){return U.find(e=>e.alias===t)??j.find(e=>e.alias===t)},"getC4Shape"),u0=d(function(t){return Object.keys(Ee(t))},"getC4ShapeKeys"),Se=d(function(t){return t==null?j:j.filter(e=>e.parentBoundary===t)},"getBoundaries"),h0=Se,d0=d(function(){return Mt},"getRels"),p0=d(function(){return ae},"getTitle"),f0=d(function(t){re=t},"setWrap"),mt=d(function(){return re},"autoWrap"),y0=d(function(){U=[],j=[xe()],F="",L="global",bt=[""],Mt=[],bt=[""],ae="",re=!1,zt=4,Wt=2},"clear"),_0={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},b0={FILLED:0,OPEN:1},g0={LEFTOF:0,RIGHTOF:1,OVER:2},m0=d(function(t){ae=ge(t,Ot())},"setTitle"),ee={addPersonOrSystem:Ke,addPersonOrSystemBoundary:Ze,addContainer:Ge,addContainerBoundary:$e,addComponent:Je,addDeploymentNode:t0,popBoundaryParseStack:e0,addRel:Qe,updateElStyle:n0,updateRelStyle:s0,updateLayoutConfig:a0,autoWrap:mt,setWrap:f0,getC4ShapeArray:Ee,getC4Shape:c0,getC4ShapeKeys:u0,getBoundaries:Se,getBoundarys:h0,getCurrentBoundaryParse:o0,getParentBoundaryParse:l0,getRels:d0,getTitle:p0,getC4Type:qe,getC4ShapeInRow:r0,getC4BoundaryInRow:i0,setAccTitle:Ye,getAccTitle:Ve,getAccDescription:Be,setAccDescription:Me,getConfig:d(()=>me("c4"),"getConfig"),clear:y0,LINETYPE:_0,ARROWTYPE:b0,PLACEMENT:g0,setTitle:m0,setC4Type:He},Te=d(function(t,e){return Ie(t,e)},"drawRect"),x0=d((t,e,a,i)=>{const u=t.append("g");let r=0;for(const n of e){const l=n.textColor?n.textColor:"#444444",s=n.lineColor?n.lineColor:"#444444",h=n.offsetX?parseInt(String(n.offsetX)):0,y=n.offsetY?parseInt(String(n.offsetY)):0,p="";if(r===0){const w=u.append("line");w.attr("x1",n.startPoint.x),w.attr("y1",n.startPoint.y),w.attr("x2",n.endPoint.x),w.attr("y2",n.endPoint.y),w.attr("stroke-width","1"),w.attr("stroke",s),w.style("fill","none"),n.type!=="rel_b"&&w.attr("marker-end","url("+p+"#"+i+"-arrowhead)"),(n.type==="birel"||n.type==="rel_b")&&w.attr("marker-start","url("+p+"#"+i+"-arrowend)"),r=-1}else{const w=u.append("path");w.attr("fill","none").attr("stroke-width","1").attr("stroke",s).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",n.startPoint.x).replaceAll("starty",n.startPoint.y).replaceAll("controlx",n.startPoint.x+(n.endPoint.x-n.startPoint.x)/2-(n.endPoint.x-n.startPoint.x)/4).replaceAll("controly",n.startPoint.y+(n.endPoint.y-n.startPoint.y)/2).replaceAll("stopx",n.endPoint.x).replaceAll("stopy",n.endPoint.y)),n.type!=="rel_b"&&w.attr("marker-end","url("+p+"#"+i+"-arrowhead)"),(n.type==="birel"||n.type==="rel_b")&&w.attr("marker-start","url("+p+"#"+i+"-arrowend)")}const b=n.label.width;let v=a.messageFont();At(a)(n.label.text,u,Math.min(n.startPoint.x,n.endPoint.x)+Math.abs(n.endPoint.x-n.startPoint.x)/2+h,Math.min(n.startPoint.y,n.endPoint.y)+Math.abs(n.endPoint.y-n.startPoint.y)/2+y,b,n.label.height,{fill:l},v),n.techn&&n.techn.text!==""&&(v=a.messageFont(),At(a)("["+n.techn.text+"]",u,Math.min(n.startPoint.x,n.endPoint.x)+Math.abs(n.endPoint.x-n.startPoint.x)/2+h,Math.min(n.startPoint.y,n.endPoint.y)+Math.abs(n.endPoint.y-n.startPoint.y)/2+a.messageFontSize+5+y,Math.max(b,n.techn.width),n.techn.height,{fill:l,"font-style":"italic"},v))}},"drawRels"),v0=d(function(t,e,a){const i=t.append("g"),u=e.bgColor?e.bgColor:"none",r=e.borderColor?e.borderColor:"#444444",n=e.fontColor?e.fontColor:"black";let l={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};e.nodeType&&(l={"stroke-width":1});const s={x:e.x,y:e.y,fill:u,stroke:r,width:e.width,height:e.height,rx:2.5,ry:2.5,attrs:l};Te(i,s);let h=a.boundaryFont();h.fontWeight="bold",h.fontSize=h.fontSize+2,h.fontColor=n,At(a)(e.label.text,i,e.x,e.y+e.label.Y,e.width,e.height,{fill:"#444444"},h),e.type&&e.type.text!==""&&(h=a.boundaryFont(),h.fontColor=n,At(a)(e.type.text,i,e.x,e.y+e.type.Y,e.width,e.height,{fill:"#444444"},h)),e.descr&&e.descr.text!==""&&(h=a.boundaryFont(),h.fontSize=h.fontSize-2,h.fontColor=n,At(a)(e.descr.text,i,e.x,e.y+e.descr.Y,e.width,e.height,{fill:"#444444"},h))},"drawBoundary"),E0=d(function(t,e){t.append("defs").append("symbol").attr("id",e+"-database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),S0=d(function(t,e){t.append("defs").append("symbol").attr("id",e+"-computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),T0=d(function(t,e){t.append("defs").append("symbol").attr("id",e+"-clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),k0=d(function(t,e){t.append("defs").append("marker").attr("id",e+"-arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},"insertArrowHead"),C0=d(function(t,e){t.append("defs").append("marker").attr("id",e+"-arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")},"insertArrowEnd"),R0=d(function(t,e){t.append("defs").append("marker").attr("id",e+"-filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),w0=d(function(t,e){const i=t.append("defs").append("marker").attr("id",e+"-crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);i.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),i.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},"insertArrowCrossHead"),At=(function(){function t(u,r,n,l,s,h,y){const p=r.append("text").attr("x",n+s/2).attr("y",l+h/2+5).style("text-anchor","middle").text(u);i(p,y)}d(t,"byText");function e(u,r,n,l,s,h,y,p){const{fontSize:b,fontFamily:v,fontWeight:w}=p,N=u.split(te.lineBreakRegex);for(let O=0;O<N.length;O++){const P=O*b-b*(N.length-1)/2,I=r.append("text").attr("x",n+s/2).attr("y",l).style("text-anchor","middle").attr("dominant-baseline","middle").style("font-size",b).style("font-weight",w).style("font-family",v);I.append("tspan").attr("dy",P).text(N[O]).attr("alignment-baseline","mathematical"),i(I,y)}}d(e,"byTspan");function a(u,r,n,l,s,h,y,p){const b=r.append("switch"),w=b.append("foreignObject").attr("x",n).attr("y",l).attr("width",s).attr("height",h).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");w.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(u),e(u,b,n,l,s,h,y,p),i(w,y)}d(a,"byFo");function i(u,r){for(const n in r)r.hasOwnProperty(n)&&u.attr(n,r[n])}return d(i,"_setTextAttrs"),function(u){return u.textPlacement==="fo"?a:u.textPlacement==="old"?t:e}})(),W={drawRect:Te,drawBoundary:v0,drawRels:x0,insertArrowHead:k0,insertArrowEnd:C0,insertArrowFilledHead:R0,insertArrowCrossHead:w0,insertDatabaseIcon:E0,insertComputerIcon:S0,insertClockIcon:T0},O0=d((t,e)=>{if(e==="sandbox"){const i=Zt("#i"+t).node()?.contentDocument;if(!i)throw new Error(`Sandbox iframe #i${t} is missing its content document`);return{root:Zt(i.body),doc:i}}return{root:Zt("body"),doc:document}},"getDiagramRoot"),P0=new Set(["system_queue","external_system_queue","container_queue","external_container_queue","component_queue","external_component_queue"]),D0=new Set(["system_db","external_system_db","container_db","external_container_db","component_db","external_component_db"]),N0={person:"person",box:"rounded",rounded:"rounded",cylinder:"cylinder",database:"cylinder",db:"cylinder",queue:"h-cyl",pipe:"h-cyl",component:"fr-rect"},$t=d(t=>t?N0[t.toLowerCase()]:void 0,"keywordShape"),A0=d(t=>{const e=$t(t.shape)??$t(t.sprite);if(e)return e;if(t.tags)for(const i of t.tags.split(",")){const u=$t(i.trim());if(u)return u}const a=t.typeC4Shape.text;return a==="person"||a==="external_person"?"person":D0.has(a)?"cylinder":P0.has(a)?"h-cyl":"rounded"},"resolveNodeShape"),L0={person:"Person",system:"Software System",container:"Container",component:"Component"},I0=d(t=>{const e=t.replace(/^external_/,"").replace(/_(db|queue)$/,"");return L0[e]??e.replace(/_/g," ")},"stereotypeLabel"),M0=d(t=>t.startsWith("external_"),"isExternal"),B0=d(t=>{const e=I0(t.typeC4Shape.text);return t.techn?.text?`[${e}: ${t.techn.text}]`:`[${e}]`},"stereotypeText"),ke=["person","system","system_db","system_queue","container","container_db","container_queue","component","component_db","component_queue"].flatMap(t=>[t,`external_${t}`]),V0=new Set(ke),fe=d(t=>V0.has(t),"isC4ElementType"),Y0=d((t,e)=>{const a=t.typeC4Shape.text,i=t.bgColor??(fe(a)&&e[`${a}_bg_color`]),u=t.borderColor??(fe(a)&&e[`${a}_border_color`]),r=[];return i&&r.push(`fill:${i}`),u&&r.push(`stroke:${u}`),r.push(`color:${t.fontColor??"#FFFFFF"}`),r},"elementCssStyles"),ye=d((t,e,a,i,u)=>{const r=t.typeC4Shape.text,n=["c4-shape",`c4-${r}`];M0(r)&&n.push("c4-external");const l=A0(t),s=Y0(t,e);return(l==="rounded"||l==="fr-rect")&&s.push("rx:12px","ry:12px"),{id:t.alias,label:t.label.text,stereotype:B0(t),description:t.descr?.text?[t.descr.text]:void 0,labelType:"string",isGroup:!1,shape:l,cssClasses:n.join(" "),cssStyles:s,padding:a,look:i,useHtmlLabels:!1,width:u}},"buildC4Node"),Lt=0,It=0,Ce=4,ne=2;jt.yy=ee;var m={},Rt,Re=(Rt=class{constructor(e){this.name="",this.data={},this.data.startx=void 0,this.data.stopx=void 0,this.data.starty=void 0,this.data.stopy=void 0,this.data.widthLimit=void 0,this.nextData={},this.nextData.startx=void 0,this.nextData.stopx=void 0,this.nextData.starty=void 0,this.nextData.stopy=void 0,this.nextData.cnt=0,se(e.db.getConfig())}setData(e,a,i,u){this.nextData.startx=this.data.startx=e,this.nextData.stopx=this.data.stopx=a,this.nextData.starty=this.data.starty=i,this.nextData.stopy=this.data.stopy=u}updateVal(e,a,i,u){e[a]===void 0?e[a]=i:e[a]=u(i,e[a])}insert(e){this.nextData.cnt=this.nextData.cnt+1;const a=this.nextData.stopx,i=this.data.widthLimit;let u=this.nextData.startx===this.nextData.stopx?a+e.margin:a+e.margin*2,r=u+e.width,n=this.nextData.starty+e.margin*2,l=n+e.height;(u>=i||r>=i||this.nextData.cnt>Ce)&&(u=this.nextData.startx+e.margin+m.nextLinePaddingX,n=this.nextData.stopy+e.margin*2,this.nextData.stopx=r=u+e.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=l=n+e.height,this.nextData.cnt=1),e.x=u,e.y=n,this.updateVal(this.data,"startx",u,Math.min),this.updateVal(this.data,"starty",n,Math.min),this.updateVal(this.data,"stopx",r,Math.max),this.updateVal(this.data,"stopy",l,Math.max),this.updateVal(this.nextData,"startx",u,Math.min),this.updateVal(this.nextData,"starty",n,Math.min),this.updateVal(this.nextData,"stopx",r,Math.max),this.updateVal(this.nextData,"stopy",l,Math.max)}init(e){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},se(e.db.getConfig())}bumpLastMargin(e){this.data.stopx+=e,this.data.stopy+=e}},d(Rt,"Bounds"),Rt),se=d(function(t){Ue(m,t),t?.fontFamily&&(m.personFontFamily=m.systemFontFamily=m.messageFontFamily=t.fontFamily),t?.fontSize&&(m.personFontSize=m.systemFontSize=m.messageFontSize=t.fontSize),t?.fontWeight&&(m.personFontWeight=m.systemFontWeight=m.messageFontWeight=t.fontWeight)},"setConf"),Ut=d(t=>({fontFamily:t.boundaryFontFamily,fontSize:t.boundaryFontSize,fontWeight:t.boundaryFontWeight}),"boundaryFont"),F0=d(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont");function gt(t,e,a,i,u){const r=e[t];if(!r.width)if(a)r.text=We(r.text,u,i),r.textLines=r.text.split(te.lineBreakRegex).length,r.width=u,r.height=pe(r.text,i);else{const n=r.text.split(te.lineBreakRegex);r.textLines=n.length;let l=0;r.height=0,r.width=0;for(const s of n)r.width=Math.max(Nt(s,i),r.width),l=pe(s,i),r.height=r.height+l}return r}d(gt,"calcC4ShapeTextWH");var we=d(function(t,e,a){const i=a.data.startx,u=a.data.starty;e.x=i,e.y=u,e.width=a.data.stopx-i,e.height=a.data.stopy-u,e.intersect=s=>je.rect({x:e.x+e.width/2,y:e.y+e.height/2,width:e.width,height:e.height},s),e.label.y=m.c4ShapeMargin-35;const r=e.wrap&&m.wrap,n=Ut(m);n.fontSize=n.fontSize+2,n.fontWeight="bold";const l=Nt(e.label.text,n);gt("label",e,r,n,l),W.drawBoundary(t,e,m)},"drawBoundary"),Oe=d(async function(t,e,a,i){const u=Ot(),r=u.look??"classic",n={config:u},l=e.attr("id")??"",s=i.map(y=>a[Number(y)]),h=d(y=>{const p=y.shape?ze[y.shape]:void 0;if(!p)throw new Error(`C4: no shape handler for "${y.shape}"`);return p},"shapeHandlerFor");await Promise.all(s.map(async y=>{const p=ye(y,m,m.c4ShapePadding,r,m.width);p.domId=`${l}-${p.id}`;const b=await h(p)(e,p,n);y.width=p.width??m.width,y.height=p.height??m.height,y.margin=m.c4ShapeMargin,b.remove()}));for(const y of s)t.insert(y);await Promise.all(s.map(async y=>{const p=ye(y,m,m.c4ShapePadding,r,m.width);p.domId=`${l}-${p.id}`,p.x=y.x+y.width/2,p.y=y.y+y.height/2;const b=e.append("g").attr("transform",`translate(${y.x+y.width/2}, ${y.y+y.height/2})`);await h(p)(b,p,n),y.intersect=p.intersect})),t.bumpLastMargin(m.c4ShapeMargin)},"drawC4ShapeArray"),wt,U0=(wt=class{constructor(e,a){this.x=e,this.y=a}},d(wt,"Point"),wt),_e=d(function(t,e){if(!t.intersect)throw new Error(`C4 element "${t.alias}" has no intersect function. Please report this to https://github.com/mermaid-js/mermaid/issues`);const{x:a,y:i}=t.intersect(e);return new U0(a,i)},"getIntersectPoint"),j0=d(function(t,e){const a={x:0,y:0};a.x=e.x+e.width/2,a.y=e.y+e.height/2;const i=_e(t,a);a.x=t.x+t.width/2,a.y=t.y+t.height/2;const u=_e(e,a);return{startPoint:i,endPoint:u}},"getIntersectPoints"),z0=d(function(t,e,a,i,u){const r=i.db.getC4Type();let n=0;for(const l of e){n=n+1;const s=l.wrap&&m.wrap,h=F0(m);r==="C4Dynamic"&&(l.label.text=n+": "+l.label.text);let y=Nt(l.label.text,h);gt("label",l,s,h,y),l.techn&&l.techn.text!==""&&(y=Nt(l.techn.text,h),gt("techn",l,s,h,y)),l.descr&&l.descr.text!==""&&(y=Nt(l.descr.text,h),gt("descr",l,s,h,y));const p=a(l.from),b=a(l.to);if(!p||!b)throw new Error(`C4 rel "${l.from}" -> "${l.to}" references an unknown shape or boundary`);const v=j0(p,b);if(!v.startPoint||!v.endPoint)throw new Error(`Could not calculate intersection points for rel "${l.from}" -> "${l.to}"`);l.startPoint=v.startPoint,l.endPoint=v.endPoint}W.drawRels(t,e,m,u)},"drawRels");async function ie(t,e,a,i,u){const r=u.db,n=new Re(u);n.data.widthLimit=a.data.widthLimit/Math.min(ne,i.length);for(const[l,s]of i.entries()){let h=0;s.image={width:0,height:0,Y:0},s.sprite&&(s.image.width=48,s.image.height=48,s.image.Y=h,h=s.image.Y+s.image.height);const y=s.wrap&&m.wrap,p=Ut(m);p.fontSize=p.fontSize+2,p.fontWeight="bold";const b=gt("label",s,y,p,n.data.widthLimit);if(b.Y=h+8,h=b.Y+b.height,s.type&&s.type.text!==""){s.type.text="["+s.type.text+"]";const O=Ut(m),P=gt("type",s,y,O,n.data.widthLimit);P.Y=h+5,h=P.Y+P.height}if(s.descr&&s.descr.text!==""){const O=Ut(m);O.fontSize=O.fontSize-2;const P=gt("descr",s,y,O,n.data.widthLimit);P.Y=h+20,h=P.Y+P.height}if(l==0||l%ne===0){const O=a.data.startx+m.diagramMarginX,P=a.data.stopy+m.diagramMarginY+h;n.setData(O,O,P,P)}else{const O=n.data.stopx!==n.data.startx?n.data.stopx+m.diagramMarginX:n.data.startx,P=n.data.starty;n.setData(O,O,P,P)}n.name=s.alias;const v=r.getC4ShapeArray(s.alias),w=r.getC4ShapeKeys(s.alias);w.length>0&&await Oe(n,t,v,w),e=s.alias;const N=r.getBoundaries(e);N.length>0&&await ie(t,e,n,N,u),s.alias!=="global"&&we(t,s,n),a.data.stopy=Math.max(n.data.stopy+m.c4ShapeMargin,a.data.stopy),a.data.stopx=Math.max(n.data.stopx+m.c4ShapeMargin,a.data.stopx),Lt=Math.max(Lt,a.data.stopx),It=Math.max(It,a.data.stopy)}}d(ie,"drawInsideBoundary");var W0=d(async function(t,e,a,i){m=me("c4");const u=Ot().securityLevel,{root:r}=O0(e,u),n=i.db;n.setWrap(m.wrap),Ce=n.getC4ShapeInRow(),ne=n.getC4BoundaryInRow(),de.debug(`C:${JSON.stringify(m,null,2)}`);const l=r.select(`[id="${e}"]`);W.insertComputerIcon(l,e),W.insertDatabaseIcon(l,e),W.insertClockIcon(l,e);const s=new Re(i);s.setData(m.diagramMarginX,m.diagramMarginX,m.diagramMarginY,m.diagramMarginY),s.data.widthLimit=screen.availWidth,Lt=m.diagramMarginX,It=m.diagramMarginY;const h=n.getTitle(),y=n.getBoundaries("");await ie(l,"",s,y,i),W.insertArrowHead(l,e),W.insertArrowEnd(l,e),W.insertArrowCrossHead(l,e),W.insertArrowFilledHead(l,e),z0(l,n.getRels(),n.getC4Shape,i,e),s.data.stopx=Lt,s.data.stopy=It;const p=s.data,b=p.startx,v=p.starty,N=It-v+2*m.diagramMarginY,O=Lt-b,P=O+2*m.diagramMarginX;h&&l.append("text").text(h).attr("x",O/2-4*m.diagramMarginX).attr("y",v+m.diagramMarginY),Fe(l,N,P,m.useMaxWidth);const I=h?60:0;l.attr("viewBox",b-m.diagramMarginX+" -"+(m.diagramMarginY+I)+" "+P+" "+(N+I)),de.debug("models:",p)},"draw"),be={drawPersonOrSystemArray:Oe,drawBoundary:we,setConf:se,draw:W0},X0=d(()=>{const t=Ot().c4??{},e=new CSSStyleSheet;for(const a of ke){const i=e.cssRules[e.insertRule(`.c4-shape.c4-${a} .label {}`,e.cssRules.length)],u=t[`${a}FontFamily`],r=t[`${a}FontSize`],n=t[`${a}FontWeight`];u&&i.style.setProperty("font-family",u),r&&i.style.setProperty("font-size",typeof r=="number"?`${r}px`:r),n&&i.style.setProperty("font-weight",String(n))}return[...e.cssRules].filter(a=>a.style.length>0).map(a=>` ${a.cssText}`).join(`
|
|
7
|
+
`)},"elementFontStyles"),q0=d(t=>`.person {
|
|
8
|
+
stroke: ${t.personBorder};
|
|
9
|
+
fill: ${t.personBkg};
|
|
10
|
+
}
|
|
11
|
+
${X0()}
|
|
12
|
+
|
|
13
|
+
/* The element font colour is set inline per element (default white); the
|
|
14
|
+
label text takes it via currentColor. */
|
|
15
|
+
.c4-shape .label,
|
|
16
|
+
.c4-shape .label text {
|
|
17
|
+
color: inherit;
|
|
18
|
+
fill: currentColor;
|
|
19
|
+
}
|
|
20
|
+
/* Structurizr typography: bold name, smaller stereotype/type and description lines. */
|
|
21
|
+
.c4-shape .label .c4-name {
|
|
22
|
+
font-weight: bold;
|
|
23
|
+
}
|
|
24
|
+
.c4-shape .label .c4-type {
|
|
25
|
+
font-size: 0.75em;
|
|
26
|
+
}
|
|
27
|
+
.c4-shape .label .c4-descr {
|
|
28
|
+
font-size: 0.82em;
|
|
29
|
+
}
|
|
30
|
+
.c4-shape .basic,
|
|
31
|
+
.c4-shape rect,
|
|
32
|
+
.c4-shape path,
|
|
33
|
+
.c4-shape circle,
|
|
34
|
+
.c4-shape ellipse,
|
|
35
|
+
.c4-shape line {
|
|
36
|
+
stroke-width: 2px;
|
|
37
|
+
}
|
|
38
|
+
`,"getStyles"),H0=q0,G0={parser:Xe,db:ee,renderer:be,styles:H0,init:d(({c4:t,wrap:e})=>{be.setConf(t),ee.setWrap(e)},"init")};export{G0 as diagram};
|