@intent-hq/web 2.352.0 → 2.352.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/web/app/immutable/assets/14.DqC-ohbL.css +1 -0
- package/web/app/immutable/chunks/{DJnc5r8U.js → -iXO69ce.js} +1 -1
- package/web/app/immutable/chunks/{B_sYr-qY.js → 2VuBywRP.js} +1 -1
- package/web/app/immutable/chunks/{DF7SJcHw.js → 3XzoopWe.js} +1 -1
- package/web/app/immutable/chunks/{DFbFLnMx.js → 3gLoJ45p.js} +1 -1
- package/web/app/immutable/chunks/{-lzAI0Yg.js → 42g-QhQV.js} +2 -2
- package/web/app/immutable/chunks/{CMeXe72Y.js → 4YiJ0ND9.js} +1 -1
- package/web/app/immutable/chunks/{BhzNHo5H.js → 7H-n9zof.js} +1 -1
- package/web/app/immutable/chunks/{CDJiCuQl.js → 7y1QtJjP.js} +1 -1
- package/web/app/immutable/chunks/{6dKWFbhS.js → 9BnYs1hu.js} +1 -1
- package/web/app/immutable/chunks/{BReF7PxO.js → 9G_vzB9L.js} +1 -1
- package/web/app/immutable/chunks/{C4rL7fPq.js → 9ZrH1aY4.js} +1 -1
- package/web/app/immutable/chunks/{DE-3_OpQ.js → A-WQk-3j.js} +1 -1
- package/web/app/immutable/chunks/{D1z1qVWr.js → B--Bllfx.js} +1 -1
- package/web/app/immutable/chunks/{BO5Pq4fi.js → B1uicwDR.js} +1 -1
- package/web/app/immutable/chunks/{BA4kNZus.js → B2EPbB5o.js} +1 -1
- package/web/app/immutable/chunks/{Cjd2lqUF.js → B51SDTRI.js} +1 -1
- package/web/app/immutable/chunks/{CgbHaDpG.js → B6YGydaZ.js} +1 -1
- package/web/app/immutable/chunks/{lwGMtA_8.js → B93i7ayb.js} +1 -1
- package/web/app/immutable/chunks/{DEo5mzFE.js → B96uZ9bz.js} +4 -4
- package/web/app/immutable/chunks/{D1PZlLC_.js → B9pVpwXj.js} +1 -1
- package/web/app/immutable/chunks/{hQlemDzn.js → BANZxiwI.js} +1 -1
- package/web/app/immutable/chunks/{ChYZv5SJ.js → BBAAgrj4.js} +1 -1
- package/web/app/immutable/chunks/{BfmiyhX4.js → BDxUZFPM.js} +1 -1
- package/web/app/immutable/chunks/{CnTu6sc6.js → BEWd3Wd2.js} +1 -1
- package/web/app/immutable/chunks/{Qpp-eumr.js → BFe96yI4.js} +1 -1
- package/web/app/immutable/chunks/{CRZhk1kc.js → BHl6gZVr.js} +1 -1
- package/web/app/immutable/chunks/{DyLYtK5N.js → BKkglBqM.js} +1 -1
- package/web/app/immutable/chunks/{4dL6nLyL.js → BLkznJGy.js} +1 -1
- package/web/app/immutable/chunks/{CDFph9XW.js → BLx2u3_L.js} +1 -1
- package/web/app/immutable/chunks/{BotG4DRY.js → BM-quT2Y.js} +1 -1
- package/web/app/immutable/chunks/{B7oLLIgw.js → BMFTNhcT.js} +4 -4
- package/web/app/immutable/chunks/{Bmm9qguf.js → BMY_-gp1.js} +1 -1
- package/web/app/immutable/chunks/{BeeeYKV6.js → BN8E3HGF.js} +1 -1
- package/web/app/immutable/chunks/{CmpBd6Tg.js → BOh3NU76.js} +1 -1
- package/web/app/immutable/chunks/{BQYuNS07.js → BPxJwcRN.js} +1 -1
- package/web/app/immutable/chunks/{C79qeQUX.js → BQ_vw_jH.js} +1 -1
- package/web/app/immutable/chunks/{JxvzDmDF.js → BQi20dkR.js} +1 -1
- package/web/app/immutable/chunks/{D1nX-Mgh.js → BRCIAK0M.js} +1 -1
- package/web/app/immutable/chunks/{sbDqysXr.js → BRF08a2k.js} +1 -1
- package/web/app/immutable/chunks/{B32BlPhm.js → BSlI9zJ7.js} +1 -1
- package/web/app/immutable/chunks/{C2Y-3LOO.js → BTn81WXW.js} +1 -1
- package/web/app/immutable/chunks/{Bs7PlXA3.js → BVywtjLl.js} +1 -1
- package/web/app/immutable/chunks/{jOuwgRm6.js → BW4tbUu2.js} +1 -1
- package/web/app/immutable/chunks/{ceF1L-gS.js → BWbAywHh.js} +1 -1
- package/web/app/immutable/chunks/{hRTaoCvf.js → BWcjZ4Fj.js} +1 -1
- package/web/app/immutable/chunks/{OyCLeO1d.js → BXBvjtiY.js} +1 -1
- package/web/app/immutable/chunks/{C-_Lx3Nm.js → BXpZ7iBl.js} +1 -1
- package/web/app/immutable/chunks/{B5oIPQ5b.js → BYzh_tA7.js} +1 -1
- package/web/app/immutable/chunks/{DCOf4rfq.js → B_-41aBJ.js} +1 -1
- package/web/app/immutable/chunks/{D5fTH_R4.js → Bax3V5fr.js} +1 -1
- package/web/app/immutable/chunks/{B6eIRRKX.js → Bbx-xmDT.js} +2 -2
- package/web/app/immutable/chunks/{DQuLjWyg.js → Bdisv45z.js} +1 -1
- package/web/app/immutable/chunks/{9zOi9r5I.js → Bdq4y4cj.js} +1 -1
- package/web/app/immutable/chunks/{BJ4sw9rR.js → BeMtjFt-.js} +1 -1
- package/web/app/immutable/chunks/{Dcd40P4V.js → BgFp_75_.js} +1 -1
- package/web/app/immutable/chunks/{vgvfRyJV.js → BgRO_jMm.js} +1 -1
- package/web/app/immutable/chunks/{DkkZo56B.js → Bh0pGToL.js} +1 -1
- package/web/app/immutable/chunks/{3DUg3Vrc.js → BiVCDDwc.js} +1 -1
- package/web/app/immutable/chunks/{BS0GmsgM.js → BigTi-DL.js} +1 -1
- package/web/app/immutable/chunks/{Cnntv_QI.js → BiwSch_R.js} +1 -1
- package/web/app/immutable/chunks/{DaVLGnNn.js → BjVdTOP4.js} +1 -1
- package/web/app/immutable/chunks/{4fLmPVdQ.js → BjlLvkns.js} +1 -1
- package/web/app/immutable/chunks/{DsPTvO1D.js → BlLJ5NFL.js} +1 -1
- package/web/app/immutable/chunks/{Da2MW7PY.js → Bmj12UUL.js} +1 -1
- package/web/app/immutable/chunks/{DdSHHwG-.js → BmnyoS7_.js} +1 -1
- package/web/app/immutable/chunks/{BIQ14Jou.js → BoRMZRdC.js} +1 -1
- package/web/app/immutable/chunks/{CSDwAwlx.js → Bp-VyqNC.js} +1 -1
- package/web/app/immutable/chunks/{BYO1ou6X.js → BpwAjMRH.js} +1 -1
- package/web/app/immutable/chunks/{BszXPYBq.js → Bt7pQW1u.js} +1 -1
- package/web/app/immutable/chunks/{BlsliAvk.js → BwKG6cFP.js} +1 -1
- package/web/app/immutable/chunks/{IsZH9joj.js → BzK5IDDm.js} +1 -1
- package/web/app/immutable/chunks/{DifK42p0.js → BzZzLv4Q.js} +1 -1
- package/web/app/immutable/chunks/{HZ9TCfKK.js → Bzfr2EHI.js} +1 -1
- package/web/app/immutable/chunks/{DXBnJ5oH.js → C0Xfm4kR.js} +1 -1
- package/web/app/immutable/chunks/{Cbew16AD.js → C1enlV3Q.js} +1 -1
- package/web/app/immutable/chunks/{DhPqduTn.js → C35re5In.js} +1 -1
- package/web/app/immutable/chunks/{bl5nff1M.js → C3gqOCHk.js} +1 -1
- package/web/app/immutable/chunks/{C12ljpSn.js → C70D7FhU.js} +1 -1
- package/web/app/immutable/chunks/{CUHqJ1Vg.js → C7XJXaB7.js} +4 -4
- package/web/app/immutable/chunks/{CNgwOiTE.js → C8B0zONc.js} +1 -1
- package/web/app/immutable/chunks/{D4uvglha.js → C96vib0x.js} +1 -1
- package/web/app/immutable/chunks/{Co5bimwo.js → CCVYeY-e.js} +1 -1
- package/web/app/immutable/chunks/{XHXZbc0Q.js → CFhL5yzr.js} +1 -1
- package/web/app/immutable/chunks/{C7lasS44.js → CFkpeGQ5.js} +1 -1
- package/web/app/immutable/chunks/{D7LYGcjf.js → CFtzUtOD.js} +1 -1
- package/web/app/immutable/chunks/{CPjC-KKN.js → CGwcLPH6.js} +1 -1
- package/web/app/immutable/chunks/{CGuBCqy6.js → CHOnTvs1.js} +1 -1
- package/web/app/immutable/chunks/{B8PxK7sP.js → CJtCxj01.js} +1 -1
- package/web/app/immutable/chunks/{DlNogvkm.js → CNRbDA27.js} +1 -1
- package/web/app/immutable/chunks/{DV_c4cZz.js → CNqgoGJU.js} +1 -1
- package/web/app/immutable/chunks/{IH85nSha.js → COSepW13.js} +1 -1
- package/web/app/immutable/chunks/{DHnebSEV.js → COgZvOvQ.js} +1 -1
- package/web/app/immutable/chunks/{EbPgJF03.js → CP9ivNHa.js} +1 -1
- package/web/app/immutable/chunks/{GVSL2sGk.js → CPHJOAlO.js} +1 -1
- package/web/app/immutable/chunks/{CDvr6QES.js → CPnIka8O.js} +1 -1
- package/web/app/immutable/chunks/{BXyNrc2B.js → CQANJb_H.js} +1 -1
- package/web/app/immutable/chunks/{D0ArSCdC.js → CROLa_Im.js} +1 -1
- package/web/app/immutable/chunks/{OXVbQQSu.js → CTknV-EG.js} +1 -1
- package/web/app/immutable/chunks/{BAp1A2ZH.js → CV4M1NA3.js} +1 -1
- package/web/app/immutable/chunks/{CPY58-tp.js → CVnLnlH1.js} +1 -1
- package/web/app/immutable/chunks/{DS2QhtLm.js → CVtHgVrS.js} +1 -1
- package/web/app/immutable/chunks/{Bvd0DfwC.js → CWqKPDkJ.js} +1 -1
- package/web/app/immutable/chunks/{DMVl8bez.js → CZNy5do6.js} +1 -1
- package/web/app/immutable/chunks/{CbIRB05A.js → CZucG27k.js} +12 -12
- package/web/app/immutable/chunks/CZyKzFn6.js +1 -0
- package/web/app/immutable/chunks/C_bpTLt9.js +1 -0
- package/web/app/immutable/chunks/{BEpQx2rq.js → C_f5SDUL.js} +1 -1
- package/web/app/immutable/chunks/{CZ8DhcrQ.js → C_ny7WcD.js} +1 -1
- package/web/app/immutable/chunks/{WSPGY2Jm.js → Cce8c6OS.js} +1 -1
- package/web/app/immutable/chunks/{i4rQF8gq.js → Cfc1whKN.js} +1 -1
- package/web/app/immutable/chunks/{CLi8c-Jc.js → CgSWRIvD.js} +1 -1
- package/web/app/immutable/chunks/{Bfba9qCM.js → CgXne1WE.js} +1 -1
- package/web/app/immutable/chunks/{Da7V4qRA.js → ChCN1Gu-.js} +1 -1
- package/web/app/immutable/chunks/{BQpZAVZ0.js → Ci1iDxHS.js} +1 -1
- package/web/app/immutable/chunks/{DD4J0jul.js → CiFdZ1u1.js} +1 -1
- package/web/app/immutable/chunks/{DTNUQDFX.js → CjyVjWQm.js} +1 -1
- package/web/app/immutable/chunks/{Kn9ZbRDu.js → CkLrBTU_.js} +1 -1
- package/web/app/immutable/chunks/{COO6ldt4.js → Cki2vNyW.js} +1 -1
- package/web/app/immutable/chunks/{BMYSQl-k.js → ClT9lHTq.js} +1 -1
- package/web/app/immutable/chunks/{B3Wey9bw.js → CoW2v1qV.js} +1 -1
- package/web/app/immutable/chunks/{B6lWPidK.js → CodBnHd8.js} +1 -1
- package/web/app/immutable/chunks/{D76YpzZQ.js → Cp-IRK5Y.js} +1 -1
- package/web/app/immutable/chunks/CqyTmKyd.js +1 -0
- package/web/app/immutable/chunks/{vSkHI-FK.js → CsfjhBJJ.js} +2 -2
- package/web/app/immutable/chunks/{C1WXXen7.js → CtZw5rYt.js} +1 -1
- package/web/app/immutable/chunks/{iqwxOx7o.js → CuiSWPlc.js} +1 -1
- package/web/app/immutable/chunks/{C1X9EbCK.js → Cujcdo3J.js} +3 -3
- package/web/app/immutable/chunks/{HtolvgCH.js → Cv4LBZVV.js} +1 -1
- package/web/app/immutable/chunks/{BodHilN5.js → CwChgvHr.js} +1 -1
- package/web/app/immutable/chunks/{BgOj6lPu.js → CwFEdD3h.js} +1 -1
- package/web/app/immutable/chunks/{4gwN8kRi.js → D-4WuS6g.js} +1 -1
- package/web/app/immutable/chunks/{XJEHWeE3.js → D-qjRHfG.js} +1 -1
- package/web/app/immutable/chunks/{BMQBnpVJ.js → D0Jvqbyo.js} +1 -1
- package/web/app/immutable/chunks/{B9Ccf4_O.js → D0MGMinc.js} +1 -1
- package/web/app/immutable/chunks/{D16yE-CH.js → D3MP9WT1.js} +2 -2
- package/web/app/immutable/chunks/{Dzmm4LX6.js → D4V4ch-K.js} +2 -2
- package/web/app/immutable/chunks/{CDhg3msv.js → D56uFwAO.js} +2 -2
- package/web/app/immutable/chunks/{Db2Jl7w7.js → D66Wwf7O.js} +1 -1
- package/web/app/immutable/chunks/D7ppHbEC.js +1 -0
- package/web/app/immutable/chunks/{DVdgjGW2.js → D9uk5SNv.js} +1 -1
- package/web/app/immutable/chunks/{B48wzP5i.js → DC3B_5LT.js} +1 -1
- package/web/app/immutable/chunks/{CRrFC3B8.js → DCJF1EsI.js} +1 -1
- package/web/app/immutable/chunks/{BROObX9U.js → DCn-eN19.js} +1 -1
- package/web/app/immutable/chunks/{Buh7J53B.js → DGIV4Vo-.js} +1 -1
- package/web/app/immutable/chunks/{CH2B1dsg.js → DHwoF-g6.js} +1 -1
- package/web/app/immutable/chunks/{DrPWazGq.js → DI6jgBJE.js} +1 -1
- package/web/app/immutable/chunks/{DeLItg2s.js → DJy3Z5wg.js} +1 -1
- package/web/app/immutable/chunks/{BAj9Av-i.js → DK3sBN-X.js} +1 -1
- package/web/app/immutable/chunks/{CZwN60O3.js → DKy3ij-K.js} +1 -1
- package/web/app/immutable/chunks/{BGkKDEs0.js → DMgU3Vk3.js} +1 -1
- package/web/app/immutable/chunks/{CltuTtDv.js → DN1kdXB2.js} +1 -1
- package/web/app/immutable/chunks/{BAkYMES1.js → DNFzjXTg.js} +1 -1
- package/web/app/immutable/chunks/{DRDTrHX3.js → DOiBG4Xt.js} +1 -1
- package/web/app/immutable/chunks/{C1l_AdDU.js → DPcZSvbx.js} +1 -1
- package/web/app/immutable/chunks/{B87_3X7t.js → DQI5zOsq.js} +1 -1
- package/web/app/immutable/chunks/{hmNmIDzu.js → DSFNjfq2.js} +1 -1
- package/web/app/immutable/chunks/{SAoHFFQz.js → DUfd5L3a.js} +1 -1
- package/web/app/immutable/chunks/{D8Uhwh7R.js → DVzpe44v.js} +1 -1
- package/web/app/immutable/chunks/{BgasfqLM.js → DWMg25J9.js} +1 -1
- package/web/app/immutable/chunks/{9cOnZvFz.js → DWtjDbhy.js} +1 -1
- package/web/app/immutable/chunks/{CrxGBxMK.js → D_ZD5RNe.js} +1 -1
- package/web/app/immutable/chunks/{CVxBES9o.js → DbMr_M0v.js} +1 -1
- package/web/app/immutable/chunks/{B82ywBwW.js → DbX7gvUZ.js} +1 -1
- package/web/app/immutable/chunks/{C-d_8VyS.js → Dbym7Ujf.js} +2 -2
- package/web/app/immutable/chunks/{B4qnea7H.js → Dd1JOibt.js} +1 -1
- package/web/app/immutable/chunks/{BnfhlAnU.js → De5x5gzU.js} +1 -1
- package/web/app/immutable/chunks/{CbBwTVsV.js → DefRdJrZ.js} +1 -1
- package/web/app/immutable/chunks/{HpSr1h8y.js → DfP8-E4c.js} +1 -1
- package/web/app/immutable/chunks/{D0fcdSwZ.js → Dj891R26.js} +3 -3
- package/web/app/immutable/chunks/{BzNn-vV2.js → Djzf9L5n.js} +1 -1
- package/web/app/immutable/chunks/{B58e63dk.js → Dk5pYfFx.js} +1 -1
- package/web/app/immutable/chunks/{B8u7Bszh.js → DkCcVZv8.js} +1 -1
- package/web/app/immutable/chunks/{vj4vOyOm.js → DkVzCi0x.js} +1 -1
- package/web/app/immutable/chunks/{Cs1vro6u.js → DkwBBG07.js} +1 -1
- package/web/app/immutable/chunks/{CGtiJZ6Q.js → DlUEqLkC.js} +2 -2
- package/web/app/immutable/chunks/{DBGsU6bn.js → DliR8x2J.js} +1 -1
- package/web/app/immutable/chunks/{CMbQPqLg.js → Dnr4oHmH.js} +1 -1
- package/web/app/immutable/chunks/{CacD4jQL.js → Do4lV0Gm.js} +1 -1
- package/web/app/immutable/chunks/{CmSGn2AH.js → Dp-INXxI.js} +1 -1
- package/web/app/immutable/chunks/{61CqOAVf.js → DqpQ10ho.js} +3 -3
- package/web/app/immutable/chunks/{DgGohlQK.js → DrMo8olQ.js} +1 -1
- package/web/app/immutable/chunks/{D8eSz7L_.js → Drru83uz.js} +1 -1
- package/web/app/immutable/chunks/{CYYbdMIM.js → DsGIBuOx.js} +1 -1
- package/web/app/immutable/chunks/{j5tG0B2t.js → DuIO-fff.js} +1 -1
- package/web/app/immutable/chunks/{vJ7Dp7-k.js → DvLxeXQt.js} +1 -1
- package/web/app/immutable/chunks/{fEnLQxJ4.js → DxKz2kXi.js} +1 -1
- package/web/app/immutable/chunks/{Cep-BDRS.js → DxwEJH0_.js} +1 -1
- package/web/app/immutable/chunks/{DoWpanLy.js → EFc0Q3Ph.js} +1 -1
- package/web/app/immutable/chunks/{jK-m9hL8.js → FoPHB-pC.js} +1 -1
- package/web/app/immutable/chunks/{Bw0E8NsL.js → Ghi6Ot-2.js} +1 -1
- package/web/app/immutable/chunks/{DNBLhM9P.js → GvPMNA5h.js} +1 -1
- package/web/app/immutable/chunks/{B3I1nFXA.js → KLtatjN6.js} +1 -1
- package/web/app/immutable/chunks/{Cx8Xjey1.js → KRzw34LA.js} +3 -3
- package/web/app/immutable/chunks/{_L5AdDNH.js → NA-6snAa.js} +1 -1
- package/web/app/immutable/chunks/{hwFphMxp.js → NeYI0LTt.js} +1 -1
- package/web/app/immutable/chunks/{tSZXsoGb.js → Oljw-CHa.js} +1 -1
- package/web/app/immutable/chunks/{CZkLaz_S.js → Onx6XErR.js} +3 -3
- package/web/app/immutable/chunks/{6J2j9GGS.js → P8wRK4co.js} +1 -1
- package/web/app/immutable/chunks/{DLHLuX0B.js → RQbokbVe.js} +1 -1
- package/web/app/immutable/chunks/{B1s_9zgm.js → S5Sbp0zl.js} +2 -2
- package/web/app/immutable/chunks/{DXIggtiA.js → StdfQQmZ.js} +1 -1
- package/web/app/immutable/chunks/{DjaIRWIW.js → VW0lVlpA.js} +1 -1
- package/web/app/immutable/chunks/{DR5IxY_q.js → WJn4wQtU.js} +1 -1
- package/web/app/immutable/chunks/{gWBpiwO7.js → WXBZRbJY.js} +1 -1
- package/web/app/immutable/chunks/{C_Q5e0bX.js → XQd1JSku.js} +1 -1
- package/web/app/immutable/chunks/{6cjeTxFJ.js → YpeHZXNr.js} +1 -1
- package/web/app/immutable/chunks/{AnpLuuuk.js → ZlqIk0xQ.js} +1 -1
- package/web/app/immutable/chunks/{CzoxGXV9.js → _JYhOJCj.js} +1 -1
- package/web/app/immutable/chunks/{Ci51i12B.js → _OiZv6Vf.js} +1 -1
- package/web/app/immutable/chunks/{xeIBXGKb.js → aSeQxvml.js} +1 -1
- package/web/app/immutable/chunks/{Dbd3M4VX.js → cFAs9x9A.js} +4 -4
- package/web/app/immutable/chunks/{ztG-0WIA.js → cIN3tPpg.js} +1 -1
- package/web/app/immutable/chunks/{DevaRANM.js → cVQbeQMu.js} +3 -3
- package/web/app/immutable/chunks/{CWr4n77L.js → eM0lx0Fs.js} +3 -3
- package/web/app/immutable/chunks/{CaZWRaBD.js → eSVAw_jr.js} +1 -1
- package/web/app/immutable/chunks/{D6eYnkBB.js → elwoNDMK.js} +1 -1
- package/web/app/immutable/chunks/{iYz7qSVO.js → fSyO2umz.js} +1 -1
- package/web/app/immutable/chunks/{Dfo7IcH5.js → g6dwab4X.js} +1 -1
- package/web/app/immutable/chunks/{BR9y4bsr.js → gqGuWn1w.js} +2 -2
- package/web/app/immutable/chunks/{xpT8lZyG.js → i5dViSDM.js} +2 -2
- package/web/app/immutable/chunks/{BM7Fn-M6.js → iJ00-f4f.js} +1 -1
- package/web/app/immutable/chunks/{Bz6dDdb9.js → k-x0h0G_.js} +1 -1
- package/web/app/immutable/chunks/{DEo3brV5.js → mDC9F6Wl.js} +2 -2
- package/web/app/immutable/chunks/{CfdX4Lfl.js → mNUHj1rI.js} +1 -1
- package/web/app/immutable/chunks/{Qg7vTeHw.js → nLAho21u.js} +1 -1
- package/web/app/immutable/chunks/{DlySFqed.js → o0XOKzhL.js} +1 -1
- package/web/app/immutable/chunks/{CUolE7JW.js → otE5vrME.js} +1 -1
- package/web/app/immutable/chunks/{42Hi6Nev.js → qXbpTVv4.js} +1 -1
- package/web/app/immutable/chunks/{D62BIRhv.js → szbQDjlS.js} +1 -1
- package/web/app/immutable/chunks/{D529OnQb.js → u0caEYlz.js} +1 -1
- package/web/app/immutable/chunks/{DUy6xMdY.js → vydwWxv4.js} +1 -1
- package/web/app/immutable/chunks/{CYqtKpzf.js → wm8arB5J.js} +1 -1
- package/web/app/immutable/chunks/{CLL457e6.js → xC5Mhger.js} +1 -1
- package/web/app/immutable/chunks/{Bi2Crhsq.js → xMccKwo6.js} +1 -1
- package/web/app/immutable/chunks/{CZd1y8kW.js → xS92bFN5.js} +1 -1
- package/web/app/immutable/entry/{app.RSzHSDgw.js → app.BaibgLwt.js} +3 -3
- package/web/app/immutable/entry/start.Co6iWbEi.js +1 -0
- package/web/app/immutable/nodes/{0.Da435p_w.js → 0.BTXCY2oK.js} +1 -1
- package/web/app/immutable/nodes/{1.D1nY11Eo.js → 1.DyWs24Kf.js} +1 -1
- package/web/app/immutable/nodes/{10.C15wfgwX.js → 10.Do5sGDsB.js} +1 -1
- package/web/app/immutable/nodes/{11.TMR29QT0.js → 11.Dg8bLTdG.js} +1 -1
- package/web/app/immutable/nodes/{12.Dkcg23hr.js → 12.Bgh3OszP.js} +1 -1
- package/web/app/immutable/nodes/{13.BANT9s8o.js → 13.B7xRzQQj.js} +3 -3
- package/web/app/immutable/nodes/14.B61dmkg6.js +3 -0
- package/web/app/immutable/nodes/{15.BXSdgmt8.js → 15.JAWW7FfP.js} +1 -1
- package/web/app/immutable/nodes/{16.Cp3myrhK.js → 16.B1iP7QfQ.js} +1 -1
- package/web/app/immutable/nodes/{17.AJ0Z4n7s.js → 17.D5xXxywZ.js} +1 -1
- package/web/app/immutable/nodes/{18.BYytq5r4.js → 18.C1KajwpW.js} +2 -2
- package/web/app/immutable/nodes/{2.B_tahnsH.js → 2.DXqEHhPy.js} +4 -4
- package/web/app/immutable/nodes/{3.l2wlNZto.js → 3.BA7C_i6W.js} +1 -1
- package/web/app/immutable/nodes/{4.DSLW-lsR.js → 4.COIJYDGD.js} +1 -1
- package/web/app/immutable/nodes/{5.DaH-2DbB.js → 5.CPq3hRgd.js} +1 -1
- package/web/app/immutable/nodes/{6.CWNY9M3R.js → 6.CgfGy-y1.js} +1 -1
- package/web/app/immutable/nodes/{7.DI6SUPGK.js → 7.CIkuIOzY.js} +1 -1
- package/web/app/immutable/nodes/{8.j51qyATM.js → 8.C8xVLEh-.js} +4 -4
- package/web/app/immutable/nodes/{9.C4rF4IYL.js → 9.BUk--8nH.js} +5 -5
- package/web/app/version.json +1 -1
- package/web/generated/paraglide.js +49 -49
- package/web/index.html +18 -18
- package/web/app/immutable/assets/14.CU62PBbE.css +0 -1
- package/web/app/immutable/chunks/A4OD-mjJ.js +0 -1
- package/web/app/immutable/chunks/BUAFIktJ.js +0 -1
- package/web/app/immutable/chunks/C5H4Pe0T.js +0 -1
- package/web/app/immutable/chunks/Ce8ODqPP.js +0 -1
- package/web/app/immutable/entry/start.BVuekftv.js +0 -1
- package/web/app/immutable/nodes/14.DChhRykH.js +0 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as i}from"./mDC9F6Wl.js";import{o as n}from"./XQd1JSku.js";import{i as o,Iv as a,Dq as s,uK as r,uk as f}from"./fSyO2umz.js";async function m(t,e){if(!(!t||!e)){if(t===o){await i("/"),a.dispatch(s(e)),a.dispatch(r("chief"));return}await n(t)&&a.dispatch(f(t,{agentId:e}))}}export{m as n};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as t}from"./YqTahsxp.js";import{Iv as r}from"./fSyO2umz.js";import{c4 as o}from"./C_ny7WcD.js";function a(e){return!e||t().status!=="connected"?null:o.select(r.state,e)}export{a as resolveConnectedWorkspaceKeySlot};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as j,by as q,bu as p,bs as B,b as L}from"./
|
|
1
|
+
import{t as j,by as q,bu as p,bs as B,b as L}from"./D7ppHbEC.js";import{bs as R,ca as c,bk as W,bn as z}from"./DYhIMPy1.js";import{o as h,m,s as y,k as V}from"./COSepW13.js";import"./Cki2vNyW.js";import"./BEWd3Wd2.js";import"./S5Sbp0zl.js";import"./ChTqQfQN.js";import"./DCJF1EsI.js";import{Iv as t,I1 as b,oD as a,qo as F,j$ as g}from"./fSyO2umz.js";function G(v,T){if(new.target)return j({component:G,...v});R(T,!0);const r=()=>p(U,"$ownsNotice$",l),D=()=>p(x,"$toastVisible$",l),u=()=>p(O,"$status$",l),S=()=>p(k,"$dismissedAt$",l),[l,N]=B(),o=t.createSelector(s=>{const e=s.machineRail;return!e.enabled||e.shownId===""||e.shownId===s.connections.windowBackendId}),U=o(),x=h(),O=m(),k=y(),A=1440*60*1e3;let i,$;const I=new Set;function _(s){I.add(s),V.dismiss(s)}function f(){if(!o.select(t.state))return;i!==void 0&&_(i);const s=V.update({onDismiss:()=>{i!==s||!o.select(t.state)||(n(),m.select(t.state)==="downloaded"?t.dispatch(g(Date.now())):t.dispatch(a()))},onAutoDismiss:()=>{i!==s||!o.select(t.state)||(n(),t.dispatch(a()))}},{duration:1/0,onDismiss:e=>{if(I.delete(e.id)||i!==e.id||!o.select(t.state))return;if(i=void 0,m.select(t.state)==="downloaded"&&o.select(t.state)){t.dispatch(g(Date.now()));return}t.dispatch(a())}});i=s}function n(){i!==void 0&&(_(i),i=void 0)}c(()=>{r()&&D()&&i===void 0&&f()}),c(()=>{const s=u();if(!r()){n(),$=void 0;return}if(s!==$){if(s==="downloading")i===void 0&&f(),h.select(t.state)||t.dispatch(b());else if(s==="downloaded"){const e=y.select(t.state);e==null||Date.now()-e>=A?(i===void 0&&f(),h.select(t.state)||t.dispatch(b())):(n(),t.dispatch(a()))}s==="idle"&&(n(),t.dispatch(a())),$=s}}),c(()=>{u()==="downloaded"&&!D()&&S()!==null&&n()}),c(()=>{const s=u(),e=S();if(!r()||s!=="downloaded"||e==null)return;const d=Date.now()-e,w=A-d;if(w<=0)return;const E=setTimeout(()=>{m.select(t.state)==="downloaded"&&o.select(t.state)&&(f(),t.dispatch(b()))},w);return()=>clearTimeout(E)}),c(()=>{const s=u();if(r()&&(s==="not-available"||s==="error")){const d=setTimeout(()=>{o.select(t.state)&&(n(),t.dispatch(a()))},s==="error"?5500:3500);return()=>clearTimeout(d)}}),W(()=>(t.dispatch(F()),()=>{n()}));var C={$set:q,$on:(s,e)=>L(T,s,e)},M=z(C);return N(),M}export{G as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{I8 as V,Iv as r,rJ as Te,ny as f,B9 as De,x$ as y,qr as xe,nx as b,B3 as Be,i as z,rg as J,B4 as X,e as je,nk as Z,A as He,hd as Fe,KG as qe,k as We,my as Ue,ro as A,h9 as H,D as Ke}from"./iYz7qSVO.js";import{k as $e}from"./uXuxG9cN.js";import{l as Qe,s as Ge}from"./CmSGn2AH.js";import{cj as Ye,c1 as w,cE as Ve,ca as k,b_ as I,cv as C,cN as ee,cM as ze,cD as Je,b$ as Xe,bv as Ze,m as et,G as tt,dS as nt,dC as te,ax as ot,cm as rt,dr as ne,cK as st,cL as ct,cP as at}from"./D1PZlLC_.js";import{P as it,c as lt}from"./BvFAWM27.js";import{bo as s}from"./BUAFIktJ.js";import{t as dt}from"./DCOf4rfq.js";import{u as ut,x as ft}from"./Bz6dDdb9.js";function pt(e,t,n){if(!e||!n?.length)return null;const o=new Set(n);if(t!==null&&!o.has(t))return null;const a=e.lastIndexOf("/"),c=a>=0?e.slice(a+1):"",i=o.has(c)?e.slice(0,a):e;return t===null?i:`${i}/${t}`}const _t={major:5,minor:2};function mt(e){const{major:t,minor:n}=_t;return $e(e,t,n)}function N(e,t,n){const o=V(e);return o.providerId&&n(o.providerId)===t?o.modelId:e}function L(e,t){const n=t(e);if(n)return n;const o=/\/(minimal|low|medium|high|xhigh|max|ultra|none)$/i.exec(e);if(!o||o.index===0)return;const a=t(e.slice(0,o.index)),c=o[1].toLowerCase();return a?`${a} (${c.charAt(0).toUpperCase()}${c.slice(1)})`:void 0}function ht(e,t){return JSON.stringify([t||null,e])}const gt=r.createSelector((e,t)=>(t?e.providerModels?.byWorkspaceId?.[t]:e.providerModels?.byProviderId)??{}),qn=r.createSelector((e,t,n)=>gt.select(e,n)[t]),Wn=r.createSelector(e=>e.providerModels?.clearEpoch??0),Un=r.createSelector((e,t)=>(t?e.providerModels?.requestsByWorkspaceId?.[t]?.map:e.providerModels?.requests?.map)??{}),bt=r.createSelector(e=>Object.fromEntries(Object.values(e.providerModels?.observers?.map??{}).flatMap(({providerIds:t,workspaceId:n})=>t.map(o=>[ht(o,n),{providerId:o,workspaceId:n}])))),Kn=r.createSelector(e=>Object.keys(bt.select(e)).sort()),vt=r.createSelector((e,t,n)=>Te(e.providerModels?.learnedNames??{},t,n)),$n=r.createSelector(e=>e.providerModels.learnedNames),St={auggie:"auggie",claudeCode:"claude-code",codex:"codex",mock:"mock",opencode:"opencode",pi:"pi",cortex:"cortex",droid:"droid",grok:"grok",unsloth:"unsloth",antigravity:"antigravity",cursor:"cursor"},Mt=new Map(Object.entries(St).map(([e,t])=>[t,e]));function yt(e,t){const n=Mt.get(t);return n===void 0?void 0:e?.providers[n]}function Qn(e,t){const n=yt(e,t);return n?.available===!0&&oe(t,n.authenticated)}const Gn=new Set(["claude-code"]);function oe(e,t){return t!==!1}const F=new WeakMap,re=r.createSelector(e=>{if(!Ye.select(e))return e.agentAvailability.providerStatusMap;const t=e.providerCatalog?.providers;if(!t)return{};let n=F.get(t);return n||(n=Object.fromEntries(f(t).map(o=>[o.id,{available:!0}])),F.set(t,n)),n}),Yn=r.createSelector(e=>e.agentAvailability.providerLoadingMap),Vn=r.createSelector(e=>e.agentAvailability.providerCheckEpochMap),kt=r.createSelector(e=>e.agentAvailability.hasCheckedOnce),zn=r.createSelector(e=>Object.values(e.agentAvailability.providerLoadingMap).some(t=>t)),Jn=r.createSelector(e=>e.agentAvailability.npxStatus),Xn=r.createSelector(e=>e.agentAvailability.hiddenProviders),Zn=r.createSelector(e=>e.agentAvailability.discoveryError),eo=r.createSelector(e=>e.agentAvailability.discoveryRevision),to=r.createSelector(e=>e.agentAvailability.refreshModelsPending),no=r.createSelector(e=>e.agentAvailability.refreshModelsRevision),oo=r.createSelector(e=>e.sidebarNav?.onboardingActive&&e.userPreferences.providerSetupHydratedBackendId===e.connections.windowBackendId&&!e.userPreferences.hasCompletedProviderSetup&&w.select(e)==="owner"?Ve.select(e):null),ro=r.createSelector((e,t)=>f(e.providerSettings.requests).filter(n=>n.sessionId===t)),so=r.createSelector((e,t)=>e.providerSettings.sessions.includes(t)),co=r.createSelector((e,t)=>e.providerSettings.writeRevisions?.[t]??0),ao=r.createSelector(e=>e.providerSettings.paths),io=r.createSelector(e=>e.providerSettings.pathsRevision),P=r.createSelector(e=>k.select(e)?I.select(e)?.defaultProviderId??"":e.model.defaultProviderId);r.createSelector((e,t)=>P.select(e)===t);const Pt=r.createSelector(e=>k.select(e)?Object.fromEntries((I.select(e)?.enabledProviderIds??[]).map(t=>[t,!0])):e.providerSettings.enabledProviders),se=r.createSelector((e,t)=>{if(k.select(e))return I.select(e)?.enabledProviderIds?.includes(t)===!0;const n=e.providerSettings.nonDisableableProviderIds??[];return De(e.providerSettings.enabledProviders,t,{canBeDisabled:!n.includes(t)})}),ce=r.createSelector(e=>{if(k.select(e))return I.select(e)?.enabledProviderIds??[];const t=e.providerSettings.enabledProviders,n=e.providerCatalog?f(e.providerCatalog.providers):[],o=new Set(n.filter(i=>se.select(e,i.id)).map(i=>i.id)),a=P.select(e),c=y(a);c&&t[c]!==!1&&o.add(c);for(const[i,l]of Object.entries(t))l&&o.add(i);return[...o]});function Ct(e,t){const n=ee.select(e,t);return k.select(e)?n?.visible!==!0:!!(n?.requiresEnvVar||n?.requiresFeatureCode)}const R=r.createSelector(e=>{const t=re.select(e);return ce.select(e).filter(n=>!Ct(e,n)&&t[n]?.available===!0)}),lo=r.createSelector((e,t)=>{const n=re.select(e),o=C.select(e,t);return R.select(e).filter(a=>C.select(e,a)!==o&&se.select(e,a)&&oe(a,n[a]?.authenticated))}),uo=r.createSelector(e=>kt.select(e)?R.select(e):ce.select(e)),fo=r.createSelector(e=>{const t=y(P.select(e));return R.select(e).includes(t)}),po=r.createSelector(e=>e.providerSettings.fastMode),_o=r.createSelector(e=>{const t=e.providerSettings.fastMode,n={...t?.confirmed};for(const[o,a]of Object.entries(t?.pending??{}))n[o]=a.enabled;return n}),mo=r.createSelector(e=>Object.values(_(e).defaults).some(t=>t.remoteLaunch!==void 0)),ho=r.createSelector(e=>e.providerSettings.fastMode?.supported?["claude-code","codex"].filter(t=>ee.select(e,t)?.supportsFastMode===!0):[]),_=e=>e.providerSettings?.profiles??xe,go=r.createSelector(e=>ze.select(e).filter(t=>t.supportsProfiles===!0).map(t=>t.id)),bo=r.createSelector((e,t)=>f(_(e).items).filter(n=>n.baseProviderId===t)),vo=r.createSelector(e=>[...new Set(f(_(e).items).map(t=>t.baseProviderId))]),So=r.createSelector(e=>_(e).defaults),Mo=r.createSelector((e,t)=>_(e).defaults[t]),yo=r.createSelector((e,t)=>b(_(e).items,t)),ko=r.createSelector(e=>_(e).revision),Po=r.createSelector(e=>_(e).loadStatus),Co=r.createSelector(e=>_(e).status),Io=r.createSelector(e=>_(e).activation),Eo=r.createSelector(e=>Object.fromEntries(f(_(e).mutations).map(t=>[t.id,t]))),It={},Ao=r.createSelector(e=>_(e).identity??It),Et={},wo=r.createSelector(e=>_(e).setups??Et),Ro=r.createSelector(e=>(e.providerSettings?.sessions.length??0)>0),Oo=r.createSelector(e=>e.model),Lo=r.createSelector(e=>{const t=Je.select(e),n=w.select(e);if(!t||n!=="owner"&&n!=="member")return null;const o=P.select(e);return n==="member"&&!o?null:JSON.stringify([t,o,n==="member"?Xe.select(e):null])});function ae(e,t){return t??P.select(e)}const j=r.createSelector((e,t)=>{const n=ae(e,t),o=e.model.availableModelsProviderId===n?f(e.model.availableModels):[],a=I.select(e),c=k.select(e)?a?.defaultProviderId===n?a.defaultModelId:null:e.model.providerModels[n];return c||(R.select(e).includes(n)?Be(o):"")}),At=r.createSelector((e,t)=>j.select(e,t)!==""),No=r.createSelector(e=>P.select(e)!==""||At.select(e)),wt=r.createSelector(e=>e.model.availableModels),To=r.createSelector(e=>f(wt.select(e))),Do=r.createSelector(e=>e.model.availableModelsProviderId),ie=r.createSelector((e,t)=>{const n=ae(e,t);return e.model.loadingState[n]??null}),xo=r.createSelector((e,t)=>ie.select(e,t)?.status==="loading"),Bo=r.createSelector((e,t)=>{const n=ie.select(e,t);return n?.status!=="error"?null:n.error??null}),jo=r.createSelector(e=>{const t={};for(const[n,o]of Object.entries(e.model.loadingState))o.warning&&(t[n]=o.warning);return t}),Ho=r.createSelector(e=>{const t={};for(const[n,o]of Object.entries(e.model.loadingState))o.stale&&(t[n]=!0);return t}),Fo=r.createSelector(e=>{const t={};for(const[n,o]of Object.entries(e.model.loadingState))o.warning&&o.warningKind&&(t[n]=o.warningKind);return t}),qo=r.createSelector(e=>e.model.providerModels),Wo=r.createSelector(e=>e.model.defaultReasoningEffort),Uo=r.createSelector(e=>e.model.modelPickerCollapsedGroups),Ko=r.createSelector((e,t)=>e.model.fallbackInfoByAgentId[t]??null),Rt=r.createSelector((e,t,n,o)=>{const a=d=>C.select(e,d,o),c=a(t),i=N(n,c,a),l=e.model?.availableModels;if(!o&&l&&(!c||c===e.model.availableModelsProviderId)){const d=b(l,n)??b(l,i);if(d)return d}const u=o?e.providerModels?.byWorkspaceId?.[o]?.[c]:e.providerModels?.byProviderId?.[c];return u?.models.find(d=>d.value===n)??u?.models.find(d=>N(d.value,c,a)===i)}),$o=r.createSelector((e,t,n,o)=>{const a=d=>C.select(e,d,o),c=a(t),i=N(n,c,a),l=d=>Rt.select(e,c,d,o)?.label,u=d=>vt.select(e,c,d);return L(n,l)??(i!==n?L(i,l):void 0)??u(n)??L(i,u)}),Ot=r.createSelector((e,t)=>{if(!t)return;const n=e.model?.availableModels;if(!n)return;const o=T(t);return b(n,o)?.effortLevels});function T(e){const t=V(e).modelId,n=t.indexOf("/");return n>0?t.slice(0,n):t}const Lt=r.createSelector((e,t,n,o)=>{if(n){if(!o&&(!t||t===e.model?.availableModelsProviderId)){const a=Ot.select(e,n);if(a)return a}if(t){const a=T(n);return(o?e.providerModels?.byWorkspaceId?.[o]?.[t]:e.providerModels?.byProviderId[t])?.models.find(i=>T(i.value)===a)?.effortLevels}}}),Nt=r.createSelector((e,t)=>{const n=e.agentSessions?.byAgentId[t];if(!n)return;if(Array.isArray(n.effortLevels)&&n.effortLevels.length>0)return n.effortLevels;const o=n.workspaceId?e.providerCatalog?.byWorkspaceId?.[n.workspaceId]?.settings??[]:void 0,a=o?.find(h=>h.path==="model.defaultProvider")?.value,c=o?typeof a=="string"?a:"":Ze.select(e),i=et(n,c),l=C.select(e,i??c,n.workspaceId),u=o?.find(h=>h.path==="model.providerDefaults")?.value,d=u&&typeof u=="object"?u[l]:void 0,v=n.model??(o?typeof d=="string"?d:"":j.select(e,l));return Lt.select(e,l,v,n.workspaceId)}),le="application/vnd.intent.question+json";function Tt(e){if(!e||typeof e!="object")return!1;const t=e;return typeof t.label=="string"&&t.label.length>0&&(t.description===void 0||typeof t.description=="string")}function Dt(e){if(!e||typeof e!="object")return!1;const t=e;return typeof t.attachmentId=="string"&&typeof t.header=="string"&&t.header.length>0&&typeof t.question=="string"&&t.question.length>0&&(t.explanation===void 0||typeof t.explanation=="string")&&Array.isArray(t.options)&&t.options.length>=2&&t.options.every(Tt)&&(t.multiSelect===void 0||typeof t.multiSelect=="boolean")}function Qo(e){if(!e||typeof e!="object")return!1;const t=e;if(t.type!=="resource")return!1;const n=t.resource;return typeof n=="object"&&n!==null&&n.mimeType===le}function xt(e){if(!e||typeof e!="object")return null;const t=e,n=t.resource??t.metadata?.resource??t;if(!n||typeof n!="object"||n.mimeType!==le||typeof n.text!="string")return null;try{const o=JSON.parse(n.text);return Dt(o)?o:null}catch{return null}}const Bt="attachmentId",jt=/^tar-[0-9a-f]{12}$/;function de(e){if(!e||typeof e!="object")return null;const t=e;if(t.type!=="resource")return null;const n=t.resource;return!n||typeof n!="object"||typeof n.uri!="string"||typeof n.mimeType!="string"||typeof n.text!="string"||n.name!==void 0&&typeof n.name!="string"?null:n}function ue(e){const t=de(e);if(!t)return null;try{const n=JSON.parse(t.text);if(!n||typeof n!="object"||Array.isArray(n))return null;const o=n[Bt];return typeof o=="string"&&jt.test(o)?o:null}catch{return null}}function D(e){return Array.isArray(e)?`[${e.map(D).join(",")}]`:e&&typeof e=="object"?`{${Object.entries(e).sort(([n],[o])=>n<o?-1:n>o?1:0).map(([n,o])=>`${JSON.stringify(n)}:${D(o)}`).join(",")}}`:JSON.stringify(e)??"undefined"}function Ht(e){const t=de(e);if(!t)return null;if(t.mimeType===it)try{const o=JSON.parse(t.text);if(lt(o))return`proposal:${o.kind}:${o.applyToolCallId??o.preview.title}:${D(o.payload)}`}catch{}const n=ue(e);return n?`nonce:${n}`:t.uri.length>0?`uri:${t.uri}:${t.text}`:null}function q(e){return ue(e)!==null}function Ft(e){const t=new Map,n=[];for(const o of e){const a=Ht(o);if(a===null){n.push(o);continue}const c=t.get(a);if(c===void 0){t.set(a,n.length),n.push(o);continue}q(o)&&!q(n[c])&&(n[c]=o)}return n}function fe(e,t){if(typeof t!="string"||t.length===0)return!1;const n=e?.dismissedQuestionsMessageId;return typeof n=="string"&&n===t}function qt(e){if(e.skipped)return"(skipped)";const t=[...e.selectedLabels],n=e.imageBlocks?.length??0,o=n===0?"":n===1?s.chat_questionWizard_imagesAttached_label_one():s.chat_questionWizard_imagesAttached_label_many({count:dt(n)});return(e.freeText||n>0)&&t.push(`(Other) ${[e.freeText,o].filter(Boolean).join(" ")}`),t.length===0?"(skipped)":t.join(", ")}function Wt(e){return e.map(t=>`Q: ${t.question.question}
|
|
1
|
+
import{I8 as V,Iv as r,rJ as Te,ny as f,B9 as De,x$ as y,qr as xe,nx as b,B3 as Be,i as z,rg as J,B4 as X,e as je,nk as Z,A as He,hd as Fe,KG as qe,k as We,my as Ue,ro as A,h9 as H,D as Ke}from"./fSyO2umz.js";import{k as $e}from"./uXuxG9cN.js";import{l as Qe,s as Ge}from"./Dp-INXxI.js";import{cj as Ye,c1 as w,cE as Ve,ca as k,b_ as I,cv as C,cN as ee,cM as ze,cD as Je,b$ as Xe,bv as Ze,m as et,G as tt,dS as nt,dC as te,ax as ot,cm as rt,dr as ne,cK as st,cL as ct,cP as at}from"./B9pVpwXj.js";import{P as it,c as lt}from"./BvFAWM27.js";import{bo as s}from"./D7ppHbEC.js";import{t as dt}from"./B_-41aBJ.js";import{u as ut,x as ft}from"./k-x0h0G_.js";function pt(e,t,n){if(!e||!n?.length)return null;const o=new Set(n);if(t!==null&&!o.has(t))return null;const a=e.lastIndexOf("/"),c=a>=0?e.slice(a+1):"",i=o.has(c)?e.slice(0,a):e;return t===null?i:`${i}/${t}`}const _t={major:5,minor:2};function mt(e){const{major:t,minor:n}=_t;return $e(e,t,n)}function N(e,t,n){const o=V(e);return o.providerId&&n(o.providerId)===t?o.modelId:e}function L(e,t){const n=t(e);if(n)return n;const o=/\/(minimal|low|medium|high|xhigh|max|ultra|none)$/i.exec(e);if(!o||o.index===0)return;const a=t(e.slice(0,o.index)),c=o[1].toLowerCase();return a?`${a} (${c.charAt(0).toUpperCase()}${c.slice(1)})`:void 0}function ht(e,t){return JSON.stringify([t||null,e])}const gt=r.createSelector((e,t)=>(t?e.providerModels?.byWorkspaceId?.[t]:e.providerModels?.byProviderId)??{}),qn=r.createSelector((e,t,n)=>gt.select(e,n)[t]),Wn=r.createSelector(e=>e.providerModels?.clearEpoch??0),Un=r.createSelector((e,t)=>(t?e.providerModels?.requestsByWorkspaceId?.[t]?.map:e.providerModels?.requests?.map)??{}),bt=r.createSelector(e=>Object.fromEntries(Object.values(e.providerModels?.observers?.map??{}).flatMap(({providerIds:t,workspaceId:n})=>t.map(o=>[ht(o,n),{providerId:o,workspaceId:n}])))),Kn=r.createSelector(e=>Object.keys(bt.select(e)).sort()),vt=r.createSelector((e,t,n)=>Te(e.providerModels?.learnedNames??{},t,n)),$n=r.createSelector(e=>e.providerModels.learnedNames),St={auggie:"auggie",claudeCode:"claude-code",codex:"codex",mock:"mock",opencode:"opencode",pi:"pi",cortex:"cortex",droid:"droid",grok:"grok",unsloth:"unsloth",antigravity:"antigravity",cursor:"cursor"},Mt=new Map(Object.entries(St).map(([e,t])=>[t,e]));function yt(e,t){const n=Mt.get(t);return n===void 0?void 0:e?.providers[n]}function Qn(e,t){const n=yt(e,t);return n?.available===!0&&oe(t,n.authenticated)}const Gn=new Set(["claude-code"]);function oe(e,t){return t!==!1}const F=new WeakMap,re=r.createSelector(e=>{if(!Ye.select(e))return e.agentAvailability.providerStatusMap;const t=e.providerCatalog?.providers;if(!t)return{};let n=F.get(t);return n||(n=Object.fromEntries(f(t).map(o=>[o.id,{available:!0}])),F.set(t,n)),n}),Yn=r.createSelector(e=>e.agentAvailability.providerLoadingMap),Vn=r.createSelector(e=>e.agentAvailability.providerCheckEpochMap),kt=r.createSelector(e=>e.agentAvailability.hasCheckedOnce),zn=r.createSelector(e=>Object.values(e.agentAvailability.providerLoadingMap).some(t=>t)),Jn=r.createSelector(e=>e.agentAvailability.npxStatus),Xn=r.createSelector(e=>e.agentAvailability.hiddenProviders),Zn=r.createSelector(e=>e.agentAvailability.discoveryError),eo=r.createSelector(e=>e.agentAvailability.discoveryRevision),to=r.createSelector(e=>e.agentAvailability.refreshModelsPending),no=r.createSelector(e=>e.agentAvailability.refreshModelsRevision),oo=r.createSelector(e=>e.sidebarNav?.onboardingActive&&e.userPreferences.providerSetupHydratedBackendId===e.connections.windowBackendId&&!e.userPreferences.hasCompletedProviderSetup&&w.select(e)==="owner"?Ve.select(e):null),ro=r.createSelector((e,t)=>f(e.providerSettings.requests).filter(n=>n.sessionId===t)),so=r.createSelector((e,t)=>e.providerSettings.sessions.includes(t)),co=r.createSelector((e,t)=>e.providerSettings.writeRevisions?.[t]??0),ao=r.createSelector(e=>e.providerSettings.paths),io=r.createSelector(e=>e.providerSettings.pathsRevision),P=r.createSelector(e=>k.select(e)?I.select(e)?.defaultProviderId??"":e.model.defaultProviderId);r.createSelector((e,t)=>P.select(e)===t);const Pt=r.createSelector(e=>k.select(e)?Object.fromEntries((I.select(e)?.enabledProviderIds??[]).map(t=>[t,!0])):e.providerSettings.enabledProviders),se=r.createSelector((e,t)=>{if(k.select(e))return I.select(e)?.enabledProviderIds?.includes(t)===!0;const n=e.providerSettings.nonDisableableProviderIds??[];return De(e.providerSettings.enabledProviders,t,{canBeDisabled:!n.includes(t)})}),ce=r.createSelector(e=>{if(k.select(e))return I.select(e)?.enabledProviderIds??[];const t=e.providerSettings.enabledProviders,n=e.providerCatalog?f(e.providerCatalog.providers):[],o=new Set(n.filter(i=>se.select(e,i.id)).map(i=>i.id)),a=P.select(e),c=y(a);c&&t[c]!==!1&&o.add(c);for(const[i,l]of Object.entries(t))l&&o.add(i);return[...o]});function Ct(e,t){const n=ee.select(e,t);return k.select(e)?n?.visible!==!0:!!(n?.requiresEnvVar||n?.requiresFeatureCode)}const R=r.createSelector(e=>{const t=re.select(e);return ce.select(e).filter(n=>!Ct(e,n)&&t[n]?.available===!0)}),lo=r.createSelector((e,t)=>{const n=re.select(e),o=C.select(e,t);return R.select(e).filter(a=>C.select(e,a)!==o&&se.select(e,a)&&oe(a,n[a]?.authenticated))}),uo=r.createSelector(e=>kt.select(e)?R.select(e):ce.select(e)),fo=r.createSelector(e=>{const t=y(P.select(e));return R.select(e).includes(t)}),po=r.createSelector(e=>e.providerSettings.fastMode),_o=r.createSelector(e=>{const t=e.providerSettings.fastMode,n={...t?.confirmed};for(const[o,a]of Object.entries(t?.pending??{}))n[o]=a.enabled;return n}),mo=r.createSelector(e=>Object.values(_(e).defaults).some(t=>t.remoteLaunch!==void 0)),ho=r.createSelector(e=>e.providerSettings.fastMode?.supported?["claude-code","codex"].filter(t=>ee.select(e,t)?.supportsFastMode===!0):[]),_=e=>e.providerSettings?.profiles??xe,go=r.createSelector(e=>ze.select(e).filter(t=>t.supportsProfiles===!0).map(t=>t.id)),bo=r.createSelector((e,t)=>f(_(e).items).filter(n=>n.baseProviderId===t)),vo=r.createSelector(e=>[...new Set(f(_(e).items).map(t=>t.baseProviderId))]),So=r.createSelector(e=>_(e).defaults),Mo=r.createSelector((e,t)=>_(e).defaults[t]),yo=r.createSelector((e,t)=>b(_(e).items,t)),ko=r.createSelector(e=>_(e).revision),Po=r.createSelector(e=>_(e).loadStatus),Co=r.createSelector(e=>_(e).status),Io=r.createSelector(e=>_(e).activation),Eo=r.createSelector(e=>Object.fromEntries(f(_(e).mutations).map(t=>[t.id,t]))),It={},Ao=r.createSelector(e=>_(e).identity??It),Et={},wo=r.createSelector(e=>_(e).setups??Et),Ro=r.createSelector(e=>(e.providerSettings?.sessions.length??0)>0),Oo=r.createSelector(e=>e.model),Lo=r.createSelector(e=>{const t=Je.select(e),n=w.select(e);if(!t||n!=="owner"&&n!=="member")return null;const o=P.select(e);return n==="member"&&!o?null:JSON.stringify([t,o,n==="member"?Xe.select(e):null])});function ae(e,t){return t??P.select(e)}const j=r.createSelector((e,t)=>{const n=ae(e,t),o=e.model.availableModelsProviderId===n?f(e.model.availableModels):[],a=I.select(e),c=k.select(e)?a?.defaultProviderId===n?a.defaultModelId:null:e.model.providerModels[n];return c||(R.select(e).includes(n)?Be(o):"")}),At=r.createSelector((e,t)=>j.select(e,t)!==""),No=r.createSelector(e=>P.select(e)!==""||At.select(e)),wt=r.createSelector(e=>e.model.availableModels),To=r.createSelector(e=>f(wt.select(e))),Do=r.createSelector(e=>e.model.availableModelsProviderId),ie=r.createSelector((e,t)=>{const n=ae(e,t);return e.model.loadingState[n]??null}),xo=r.createSelector((e,t)=>ie.select(e,t)?.status==="loading"),Bo=r.createSelector((e,t)=>{const n=ie.select(e,t);return n?.status!=="error"?null:n.error??null}),jo=r.createSelector(e=>{const t={};for(const[n,o]of Object.entries(e.model.loadingState))o.warning&&(t[n]=o.warning);return t}),Ho=r.createSelector(e=>{const t={};for(const[n,o]of Object.entries(e.model.loadingState))o.stale&&(t[n]=!0);return t}),Fo=r.createSelector(e=>{const t={};for(const[n,o]of Object.entries(e.model.loadingState))o.warning&&o.warningKind&&(t[n]=o.warningKind);return t}),qo=r.createSelector(e=>e.model.providerModels),Wo=r.createSelector(e=>e.model.defaultReasoningEffort),Uo=r.createSelector(e=>e.model.modelPickerCollapsedGroups),Ko=r.createSelector((e,t)=>e.model.fallbackInfoByAgentId[t]??null),Rt=r.createSelector((e,t,n,o)=>{const a=d=>C.select(e,d,o),c=a(t),i=N(n,c,a),l=e.model?.availableModels;if(!o&&l&&(!c||c===e.model.availableModelsProviderId)){const d=b(l,n)??b(l,i);if(d)return d}const u=o?e.providerModels?.byWorkspaceId?.[o]?.[c]:e.providerModels?.byProviderId?.[c];return u?.models.find(d=>d.value===n)??u?.models.find(d=>N(d.value,c,a)===i)}),$o=r.createSelector((e,t,n,o)=>{const a=d=>C.select(e,d,o),c=a(t),i=N(n,c,a),l=d=>Rt.select(e,c,d,o)?.label,u=d=>vt.select(e,c,d);return L(n,l)??(i!==n?L(i,l):void 0)??u(n)??L(i,u)}),Ot=r.createSelector((e,t)=>{if(!t)return;const n=e.model?.availableModels;if(!n)return;const o=T(t);return b(n,o)?.effortLevels});function T(e){const t=V(e).modelId,n=t.indexOf("/");return n>0?t.slice(0,n):t}const Lt=r.createSelector((e,t,n,o)=>{if(n){if(!o&&(!t||t===e.model?.availableModelsProviderId)){const a=Ot.select(e,n);if(a)return a}if(t){const a=T(n);return(o?e.providerModels?.byWorkspaceId?.[o]?.[t]:e.providerModels?.byProviderId[t])?.models.find(i=>T(i.value)===a)?.effortLevels}}}),Nt=r.createSelector((e,t)=>{const n=e.agentSessions?.byAgentId[t];if(!n)return;if(Array.isArray(n.effortLevels)&&n.effortLevels.length>0)return n.effortLevels;const o=n.workspaceId?e.providerCatalog?.byWorkspaceId?.[n.workspaceId]?.settings??[]:void 0,a=o?.find(h=>h.path==="model.defaultProvider")?.value,c=o?typeof a=="string"?a:"":Ze.select(e),i=et(n,c),l=C.select(e,i??c,n.workspaceId),u=o?.find(h=>h.path==="model.providerDefaults")?.value,d=u&&typeof u=="object"?u[l]:void 0,v=n.model??(o?typeof d=="string"?d:"":j.select(e,l));return Lt.select(e,l,v,n.workspaceId)}),le="application/vnd.intent.question+json";function Tt(e){if(!e||typeof e!="object")return!1;const t=e;return typeof t.label=="string"&&t.label.length>0&&(t.description===void 0||typeof t.description=="string")}function Dt(e){if(!e||typeof e!="object")return!1;const t=e;return typeof t.attachmentId=="string"&&typeof t.header=="string"&&t.header.length>0&&typeof t.question=="string"&&t.question.length>0&&(t.explanation===void 0||typeof t.explanation=="string")&&Array.isArray(t.options)&&t.options.length>=2&&t.options.every(Tt)&&(t.multiSelect===void 0||typeof t.multiSelect=="boolean")}function Qo(e){if(!e||typeof e!="object")return!1;const t=e;if(t.type!=="resource")return!1;const n=t.resource;return typeof n=="object"&&n!==null&&n.mimeType===le}function xt(e){if(!e||typeof e!="object")return null;const t=e,n=t.resource??t.metadata?.resource??t;if(!n||typeof n!="object"||n.mimeType!==le||typeof n.text!="string")return null;try{const o=JSON.parse(n.text);return Dt(o)?o:null}catch{return null}}const Bt="attachmentId",jt=/^tar-[0-9a-f]{12}$/;function de(e){if(!e||typeof e!="object")return null;const t=e;if(t.type!=="resource")return null;const n=t.resource;return!n||typeof n!="object"||typeof n.uri!="string"||typeof n.mimeType!="string"||typeof n.text!="string"||n.name!==void 0&&typeof n.name!="string"?null:n}function ue(e){const t=de(e);if(!t)return null;try{const n=JSON.parse(t.text);if(!n||typeof n!="object"||Array.isArray(n))return null;const o=n[Bt];return typeof o=="string"&&jt.test(o)?o:null}catch{return null}}function D(e){return Array.isArray(e)?`[${e.map(D).join(",")}]`:e&&typeof e=="object"?`{${Object.entries(e).sort(([n],[o])=>n<o?-1:n>o?1:0).map(([n,o])=>`${JSON.stringify(n)}:${D(o)}`).join(",")}}`:JSON.stringify(e)??"undefined"}function Ht(e){const t=de(e);if(!t)return null;if(t.mimeType===it)try{const o=JSON.parse(t.text);if(lt(o))return`proposal:${o.kind}:${o.applyToolCallId??o.preview.title}:${D(o.payload)}`}catch{}const n=ue(e);return n?`nonce:${n}`:t.uri.length>0?`uri:${t.uri}:${t.text}`:null}function q(e){return ue(e)!==null}function Ft(e){const t=new Map,n=[];for(const o of e){const a=Ht(o);if(a===null){n.push(o);continue}const c=t.get(a);if(c===void 0){t.set(a,n.length),n.push(o);continue}q(o)&&!q(n[c])&&(n[c]=o)}return n}function fe(e,t){if(typeof t!="string"||t.length===0)return!1;const n=e?.dismissedQuestionsMessageId;return typeof n=="string"&&n===t}function qt(e){if(e.skipped)return"(skipped)";const t=[...e.selectedLabels],n=e.imageBlocks?.length??0,o=n===0?"":n===1?s.chat_questionWizard_imagesAttached_label_one():s.chat_questionWizard_imagesAttached_label_many({count:dt(n)});return(e.freeText||n>0)&&t.push(`(Other) ${[e.freeText,o].filter(Boolean).join(" ")}`),t.length===0?"(skipped)":t.join(", ")}function Wt(e){return e.map(t=>`Q: ${t.question.question}
|
|
2
2
|
A: ${qt(t)}`).join(`
|
|
3
3
|
|
|
4
4
|
`)}const pe="question_answers";function Ut(e){return{type:pe,answeredQuestionsMessageId:e}}function Go(e,t){const n=e.flatMap(o=>o.skipped?[]:o.imageBlocks??[]);return{text:Wt(e),messageMetadata:Ut(t),...n.length>0?{imageBlocks:n}:{}}}function W(e){if(!e||typeof e!="object")return null;const t=e;if(t.type!==pe)return null;const n=t.answeredQuestionsMessageId;return typeof n=="string"&&n.length>0?n:null}function U(e){const t=W(e),n=t?[t]:[];if(e&&typeof e=="object"&&"mergedMessageMetadata"in e){const o=e.mergedMessageMetadata;if(Array.isArray(o))for(const a of o){const c=W(a);c&&!n.includes(c)&&n.push(c)}}return n}function _e(e){if(!e)return[];const t=U(e.metadata);if(t.length)return t;const n=Array.isArray(e.contentBlocks)?e.contentBlocks:[];return[...new Set(n.flatMap(o=>o.type==="text"?U(o.messageMetadata):[]))]}function me(e){return e===void 0?{kind:"absent"}:e===""?{kind:"cleared"}:{kind:"set",messageId:e}}function K(e){return Ft(e.contentBlocks??[]).map(xt).filter(t=>t!==null)}function he(e,t){return e.some(n=>n.role==="user"&&_e(n).includes(t))}function $(e,t){return e.some(n=>_e({metadata:n.messageMetadata}).includes(t))}function Kt(e,t,n=!1,o,a=[]){if(n||e.length===0)return null;const c=me(o);if(c.kind==="cleared")return null;if(c.kind==="set"){const i=e.find(u=>u.id===c.messageId);if(!i||i.role!=="assistant"||i.isStreaming||he(e,c.messageId)||$(a,c.messageId))return null;const l=K(i);return l.length>0?{messageId:i.id,questions:l}:null}if(t)return null;for(let i=e.length-1;i>=0;i--){const l=e[i];if(l.role==="system")continue;if(l.role!=="assistant"||l.isStreaming||$(a,l.id))return null;const u=K(l);return u.length>0?{messageId:l.id,questions:u}:null}return null}function $t(e){const t=Kt(e.messages??[],tt(nt(e)),!1,e.metadata?.pendingQuestionsMessageId);return!t||fe(e.metadata,t.messageId)?null:t}function Qt(e){if($t(e)!==null)return!0;const t=me(e.metadata?.pendingQuestionsMessageId);if(t.kind!=="set")return!1;const n=e.messages??[];return n.some(o=>o.id===t.messageId)||he(n,t.messageId)?!1:!fe(e.metadata,t.messageId)}const ge=0,x=1,Gt=2,m=4,be=6,Yt=[2,3,4,5,0,1],Vt=16777215,ve=689407,Se=3199320,Me=16766474,ye=16752394,B=16726832,ke=6607615,zt=12540658,M=.9,Jt=.5,Pe=.25,Xt=.25,Zt={unassigned:{c:0,b:0,e:ge,s:0},idle:{c:Vt,b:.12,e:x,s:0},running:{c:ve,b:.6,e:m,s:Jt},unread:{c:ke,b:.4,e:m,s:Pe},complete:{c:Se,b:.5,e:x,s:0},attention:{c:Me,b:.8,e:m,s:M},blocked:{c:ye,b:.75,e:m,s:M},failed:{c:B,b:.7,e:m,s:M}},en={e:ge,b:0,s:0,m:0,c:0},Q=.35,tn=.75,G=4;function nn(e){const n=(Math.min(Math.max(e,1),G)-1)/(G-1);return Q+n*(tn-Q)}const on={dark:en,complete:{e:x,b:.25,s:0,m:0,c:Se},unread:{e:m,b:.4,s:Pe,m:0,c:ke},question:{e:m,b:.8,s:M,m:0,c:Me},blocked:{e:m,b:.8,s:M,m:0,c:ye},failed:{e:m,b:.8,s:M,m:0,c:B},recording:{e:m,b:.8,s:M,m:0,c:B},disconnected:{e:Gt,b:.2,s:Xt,m:0,c:zt}};function Yo(e){const t=[];for(let n=0;n<be;n+=1){const o=e[n]??"unassigned";t.push({id:Yt[n],...Zt[o]})}return t.sort((n,o)=>n.id-o.id),t}function Vo(e){const t=e.kind==="running"?{e:m,b:.5,s:nn(e.runningCount),m:0,c:ve}:on[e.kind];return{keys:{...t},ambient:{...t}}}function Ce(e){return Z(e)?.kind==="blocker"}function Ie(e){return Z(e)?.kind==="discussion"||Qt(e)}function Ee(e){return e.status===je.Error}function Y(e,t){const n=e.workspaceAgents.byWorkspaceId[t]?.foregroundAgentIds??[],o=e.agentSessions?.byAgentId??{},a=[];for(const c of n){const i=o[String(c)];i&&a.push(i)}return a}const rn=new Set(["complete","pr_queued","pr_ready","pr_open","pr_merged"]);function Ae(e){return e.activity==="agent_running"||e.displayStatus==="in_progress"}function we(e){return e.displayStatus!==void 0&&rn.has(e.displayStatus)}function sn(e,t){return t.some(Ee)?"failed":t.some(Ce)?"blocked":t.some(Ie)?"attention":Ae(e)?"running":e.attention==="unread"?"unread":we(e)?"complete":"idle"}function cn(e){if(e.daemonHealth?.health==="down")return{keys:new Array(be).fill("unassigned"),ambient:{kind:"disconnected"}};const t=f(e.workspace.workspaces).filter(p=>p.id!==z&&J(p)),n=new Map;for(const p of t)n.set(p.id,p);const a=X(e.hardwareConsole.keyPins,t,e.hardwareConsole.excludedWorkspaceIds??[]).map(p=>{const S=p===null?void 0:n.get(p);return S?sn(S,Y(e,S.id)):"unassigned"});let c=!1,i=!1,l=!1,u=0,d=!1,v=!1;const h=new Set(e.tabState.workspaceStacks.flat());for(const p of t){if(!h.has(p.id))continue;const S=Y(e,p.id);S.some(Ee)&&(c=!0),S.some(Ce)&&(i=!0),S.some(Ie)&&(l=!0),Ae(p)&&(u+=1),p.attention==="unread"&&(d=!0),we(p)&&(v=!0)}let g;return e.hardwareConsole.pttRecording===!0?g={kind:"recording"}:c?g={kind:"failed"}:i?g={kind:"blocked"}:l?g={kind:"question"}:d?g={kind:"unread"}:u>0?g={kind:"running",runningCount:u}:v?g={kind:"complete"}:g={kind:"dark"},{keys:a,ambient:g}}const zo=r.createSelector(e=>{const t=w.select(e);return t==="guest"||t==="member"}),Jo=r.createSelector(e=>{const t=e.hardwareConsole;if(w.select(e)!=="owner"||!t?.isConsoleOwner||!t.enabledHydrationSucceeded||!t.actionMappingHydrationSucceeded)return null;const n=o=>He.filter((a,c)=>t.actionMappingByModel[o][c]==="cycle-open-windows");return JSON.stringify({enabled:t.enabled,keysByModel:{"creator-micro-2":n("creator-micro-2"),"codex-micro":n("codex-micro")}})}),Xo=r.createSelector(e=>e.hardwareConsole.enabled),Zo=r.createSelector(e=>e.hardwareConsole.encoderBehavior),er=r.createSelector(e=>e.hardwareConsole.encoderBehaviorSaveFailed),tr=r.createSelector(e=>e.hardwareConsole.isConsoleOwner),nr=r.createSelector(e=>e.hardwareConsole.promptPickerLimit),or=r.createSelector(e=>e.hardwareConsole.actionMappingByModel),rr=r.createSelector(e=>e.hardwareConsole.cycleScopeByFamily),sr=r.createSelector(e=>e.hardwareConsole.keyPins),cr=r.createSelector(e=>e.hardwareConsole.excludedWorkspaceIds),ar=r.createSelector(e=>e.hardwareConsole.promptUsage),an=r.createSelector(e=>{const t=te.select(e).filter(J);return X(e.hardwareConsole.keyPins,t,e.hardwareConsole.excludedWorkspaceIds)}),ir=r.createSelector((e,t)=>{const n=e.hardwareConsole.keyPins.indexOf(t);return n===-1?null:n}),lr=r.createSelector((e,t)=>{const n=an.select(e).indexOf(t);return n===-1?null:n}),dr=r.createSelector(e=>e.hardwareConsole.radialPrompt),ur=r.createSelector(e=>e.hardwareConsole.encoderHudWorkspaceId),fr=r.createSelector(e=>{const t=e.hardwareConsole.encoderHudWorkspaceId;return t===null?null:te.select(e).find(n=>n.id===t)?.title??null}),pr=r.createSelector(e=>e.hardwareConsole.actionHudLabel),_r=r.createSelector(e=>e.hardwareConsole.pttRecording),mr=r.createSelector(e=>e.hardwareConsole.voiceTranscribing),hr=r.createSelector(e=>cn(e)),ln=r.createSelector((e,t,n)=>{const o=e.agentSessions.byAgentId[n];if(!o||o.workspaceId!==t)return null;const a=Nt.select(e,n);if(!a?.length)return null;const c=ot.select(e,n),i=o.model??j.select(e,c),l=e.daemonHealth.stats?.protocolVersion,u=mt(l)?pt(i,null,a):i;return{key:JSON.stringify([t,n,c,u,a]),workspaceId:t,agentId:n,levels:a}}),dn=r.createSelector(e=>{const t=e.hardwareConsole;if(!t.enabled||!t.isConsoleOwner||!t.encoderBehaviorHydrated||t.encoderBehavior!=="agent-effort")return null;const n=Qe.select(e);if(!n||n===z||rt.select(e,n))return null;const o=Ge.select(e,n);return o?.type!=="agent"||!o.agentId||o.workspaceId&&o.workspaceId!==n?null:ln.select(e,n,o.agentId)}),gr=r.createSelector(e=>{const t=e.hardwareConsole.encoderEffortFeedback;return!t||dn.select(e)?.key!==t.target.key?null:(e.agentSessions.byAgentId[t.target.agentId]?.reasoningEffort??null)===t.effort?t:null}),un=[],br=r.createSelector((e,t)=>b(e.connections.workflows,t)),vr=r.createSelector(e=>({writing:e.connections.keychainWritesPending>0,loadFailed:e.connections.keychainLoadError,saveFailed:e.connections.keychainSaveError})),Sr=r.createSelector(e=>e.connections.selfPublication),Mr=r.createSelector(e=>e.connections.selfPublicationBusy),yr=r.createSelector((e,t)=>({guest:b(e.guestSessions.sessions,t),connection:b(e.connections.connections,t)})),kr=r.createSelector(e=>f(e.connections.connections).filter(t=>!t.displayOnly)),Pr=r.createSelector(e=>f(e.connections.connections).filter(t=>!t.displayOnly&&t.daemonMode!=="node")),Cr=r.createSelector(e=>f(e.connections.connections).filter(t=>!t.displayOnly&&!t.isLocal)),Ir=r.createSelector(e=>e.connections.hasReceivedList);r.createSelector((e,t)=>b(e.connections.connections,t)?.status??"not-open");const Er=r.createSelector(e=>e.connections.windowBackendId),Ar=r.createSelector(e=>{const{connections:t,windowBackendId:n}=e.connections;return b(t,n)??null}),wr=r.createSelector(e=>e.connections.pinnedVersion),Rr=r.createSelector(e=>e.connections.connectedIds);r.createSelector(e=>e.connections.status);const Or=r.createSelector(e=>e.connections.status==="connecting"||e.connections.openingIds.length>0);r.createSelector((e,t)=>e.connections.openingIds.includes(t));r.createSelector(e=>e.connections.error);const Lr=r.createSelector(e=>e.connections.certMismatch),Nr=r.createSelector(e=>{const t={};for(const[n,o]of Object.entries(e.connections.certWarnings))t[n]=f(o);return t}),Tr=r.createSelector(e=>{const t=e.connections.certWarnings[e.connections.windowBackendId];return t?f(t):un}),Dr=r.createSelector(e=>{const{authRejected:t,windowBackendId:n}=e.connections;return t&&t.id===n?t:null}),xr=r.createSelector(e=>{const{protocolMismatch:t,windowBackendId:n}=e.connections;return t&&t.id===n?t:null}),Br=r.createSelector(e=>{const{protocolMismatch:t,windowBackendId:n,protocolMismatchModalDismissed:o}=e.connections;return!t||t.id!==n||o?null:t}),jr=r.createSelector(e=>e.connections.keychainSync),Hr=r.createSelector(e=>e.connections.browserHost?.manageConnections===!0),Fr=r.createSelector(e=>e.connections.browserHost?.backendBound===!1),qr=r.createSelector(e=>{const t=e.connections.browserHost;return t?.manageConnections===!0&&!t.tailcatAvailable});function Re(e){const t=e.trim();if(!t.startsWith("tc"))return!1;const n=t.slice(2);if(n.length<50||n.length%4===1||!/^[A-Za-z0-9_-]+$/.test(n))return!1;const o=atob(n.slice(0,4).replace(/-/g,"+").replace(/_/g,"/")).charCodeAt(0);return o>=161&&o<=187||o===191}function Wr(e){if(!e||typeof e!="object")return null;const t=e;for(const n of[t.collaborationName,t.prettyHostname,t.hostname])if(typeof n=="string"&&E(n))return E(n);return null}function Ur(e){return[...E(e)].length<=100&&!/\p{Cc}/u.test(e)}function E(e){return e.replace(/^\p{White_Space}+|\p{White_Space}+$/gu,"")}function fn(e){const t=e.label.trim(),n=e.host&&e.port!=null?`${e.host}:${e.port}`:"";return(t&&t!==n?t:"")||e.hostname?.trim()||t||n}function pn(e){const t=e.machineName?.trim();return t?s.settings_devices_localMachine_label({name:t}):s.layout_daemonStatus_localConnection_label()}function Kr(e,t){if(e.isLocal)return pn(e);const n=fn(e);return e.id===t?s.settings_devices_connectedBackend_label({name:n}):n}function _n(e){const t=E(e.hostname??"");return t||(Re(e.label)?s.connection_unknownHost_label():e.label)}function $r(e){const t=e.label.trim();return!t||Re(t)?null:t!==_n(e)?t:null}const mn="https://e2b.dev/dashboard",hn="https://app.northflank.com",gn="https://www.agent37.com/dashboard/cloud";function Qr(e="e2b"){return e==="northflank"?hn:e==="agent37"?gn:mn}function bn(e){switch(e){case"northflank":return{keyRejected:s.cloudMachines_northflank_state_tokenRejected_label(),unreachable:s.cloudMachines_northflank_state_unreachable_label(),ownerOnly:s.cloudMachines_northflank_error_ownerOnly(),saved:s.cloudMachines_northflank_saved_toast(),listTitle:s.cloudMachines_northflank_services_title(),listSummary:s.cloudMachines_northflank_services_summary,dashboard:s.cloudMachines_northflank_dashboard_label(),dashboardOpen:s.cloudMachines_northflank_dashboardOpen_label(),deleteTitle:s.cloudMachines_northflank_delete_confirmTitle,deleteDescription:s.cloudMachines_northflank_delete_confirm_description(),creating:s.cloudMachines_northflank_start_creating(),startFailed:s.cloudMachines_northflank_startFailure_title(),startUnknown:s.cloudMachines_northflank_startFailure_unknown_cause()};case"agent37":return{keyRejected:s.cloudMachines_state_keyRejected_label(),unreachable:s.cloudMachines_agent37_state_unreachable_label(),ownerOnly:s.cloudMachines_agent37_error_ownerOnly(),saved:s.cloudMachines_agent37_saved_toast(),listTitle:s.cloudMachines_agent37_instances_title(),listSummary:s.cloudMachines_agent37_instances_summary,dashboard:s.cloudMachines_agent37_dashboard_label(),dashboardOpen:s.cloudMachines_agent37_dashboardOpen_label(),deleteTitle:s.cloudMachines_agent37_delete_confirmTitle,deleteDescription:s.cloudMachines_agent37_delete_confirm_description(),creating:s.cloudMachines_agent37_start_creating(),startFailed:s.cloudMachines_agent37_startFailure_title(),startUnknown:s.cloudMachines_agent37_startFailure_unknown_cause()};default:return{keyRejected:s.cloudMachines_state_keyRejected_label(),unreachable:s.cloudMachines_state_unreachable_label(),ownerOnly:s.cloudMachines_error_ownerOnly(),saved:s.cloudMachines_saved_toast(),listTitle:s.cloudMachines_sandboxes_title(),listSummary:s.cloudMachines_sandboxes_summary,dashboard:s.cloudMachines_dashboard_label(),dashboardOpen:s.cloudMachines_dashboardOpen_label(),deleteTitle:s.cloudMachines_delete_confirmTitle,deleteDescription:s.cloudMachines_delete_confirm_description(),creating:s.cloudMachines_start_creating(),startFailed:s.cloudMachines_startFailure_title(),startUnknown:s.cloudMachines_startFailure_unknown_cause()}}}function Gr(e){return e==="vm"?s.cloudMachines_agent37_form_type_vm():s.cloudMachines_agent37_form_type_default()}function Yr(e){return e==="eu"?s.cloudMachines_agent37_region_eu():e==="ap-south"?s.cloudMachines_agent37_region_apSouth():s.cloudMachines_agent37_region_us()}const vn=/^E2B\s*·\s*/u;function Vr(e,t){const n=t?`${t} · `:null;return(n&&e.name.startsWith(n)?e.name.slice(n.length):e.name.replace(vn,"")).trim()||e.name}function zr(e){const t=Fe(e);return t?s.cloudMachines_size_label({vcpu:String(t.vcpu),memory:String(t.memoryGiB)}):e}function Jr(e,t,n){const o=e.cloud;if(!o)return 0;const a=o.state==="running"&&t>0?Math.max(0,(n-t)/1e3):0;return Math.floor(o.runningSeconds+a)}function Xr(e){const t=Math.floor(e/60);if(t<1)return s.cloudMachines_uptime_underMinute();if(t<60)return s.cloudMachines_uptime_minutes({minutes:String(t)});const n=Math.floor(t/60),o=t%60;return o===0?s.cloudMachines_uptime_hours({hours:String(n)}):s.cloudMachines_uptime_hoursMinutes({hours:String(n),minutes:String(o)})}const Sn=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:2,maximumFractionDigits:2});function Zr(e){const t=Ue(e,3600);return t===null?null:s.cloudMachines_size_hourly({amount:Sn.format(t)})}function es(e,t){const n=new Map;for(const c of e){const i=c.cloud?.workspaceId,l=i?t(i):null,u=i&&l?i:"";let d=n.get(u);d||(d={key:u,name:l??s.cloudMachines_sandboxes_otherWorkspace(),sandboxes:[]},n.set(u,d)),d.sandboxes.push(c)}const o=c=>+(c.cloud?.state==="paused"),a=c=>Number(c.sandboxes.every(i=>o(i)));for(const c of n.values())c.sandboxes.sort((i,l)=>o(i)-o(l)||(l.cloud?.startedAt??"").localeCompare(i.cloud?.startedAt??"")||i.id.localeCompare(l.id));return[...n.values()].sort((c,i)=>a(c)-a(i)||+(c.key==="")-+(i.key==="")||c.name.localeCompare(i.name,void 0,{sensitivity:"base"})||c.key.localeCompare(i.key))}function Mn(e){switch(e.code){case"cloud-profile-required":return{title:s.cloudMachines_northflank_error_profileRequired_title(),description:s.cloudMachines_northflank_error_profileRequired_description()};case"cloud-quota":return{title:s.cloudMachines_northflank_error_quota_title(),description:e.limit==="plan"?s.cloudMachines_northflank_error_quotaPlan_description():e.limit==="rate"?s.cloudMachines_northflank_error_quotaRate_description():s.cloudMachines_northflank_error_quotaConcurrency_description()};case"cloud-machine-unavailable":{const t=n=>({title:s.cloudMachines_northflank_error_unavailable_title(),description:n});switch(e.reason){case"not-configured":return t(s.cloudMachines_northflank_error_notConfigured_description());case"key-rejected":return{title:s.cloudMachines_northflank_error_tokenRejected_title(),description:s.cloudMachines_northflank_error_tokenRejected_description()};case"project-missing":return t(s.cloudMachines_northflank_error_projectMissing_description());case"permission-denied":return{title:s.cloudMachines_northflank_error_permissionDenied_title(),description:s.cloudMachines_northflank_error_permissionDenied_description()};case"template-missing":return t(s.cloudMachines_northflank_error_imageMissing_description());case"sandbox-lost":return{title:s.cloudMachines_northflank_error_serviceLost_title(),description:s.cloudMachines_northflank_error_serviceLost_description()};case"bootstrap-failed":return t(s.cloudMachines_northflank_error_bootstrapFailed_description());default:return t(s.cloudMachines_northflank_error_apiError_description())}}}}function yn(e){switch(e.code){case"cloud-profile-required":return{title:s.cloudMachines_agent37_error_profileRequired_title(),description:s.cloudMachines_agent37_error_profileRequired_description()};case"cloud-quota":return{title:s.cloudMachines_agent37_error_quota_title(),description:e.limit==="plan"?s.cloudMachines_agent37_error_quotaPlan_description():e.limit==="rate"?s.cloudMachines_agent37_error_quotaRate_description():s.cloudMachines_agent37_error_quotaConcurrency_description()};case"cloud-machine-unavailable":{const t=n=>({title:s.cloudMachines_agent37_error_unavailable_title(),description:n});switch(e.reason){case"not-configured":return t(s.cloudMachines_agent37_error_notConfigured_description());case"key-rejected":return{title:s.cloudMachines_agent37_error_keyRejected_title(),description:s.cloudMachines_agent37_error_keyRejected_description()};case"permission-denied":return{title:s.cloudMachines_agent37_error_permissionDenied_title(),description:s.cloudMachines_agent37_error_permissionDenied_description()};case"no-capacity":return{title:s.cloudMachines_agent37_error_noCapacity_title(),description:s.cloudMachines_agent37_error_noCapacity_description()};case"template-missing":return t(s.cloudMachines_agent37_error_templateMissing_description());case"sandbox-lost":return{title:s.cloudMachines_agent37_error_instanceLost_title(),description:s.cloudMachines_agent37_error_instanceLost_description()};case"bootstrap-failed":return t(s.cloudMachines_agent37_error_bootstrapFailed_description());default:return t(s.cloudMachines_agent37_error_apiError_description())}}}}function ts(e,t){const n=e.provider??t;if(n==="northflank")return Mn(e);if(n==="agent37")return yn(e);switch(e.code){case"cloud-profile-required":return{title:s.cloudMachines_error_profileRequired_title(),description:s.cloudMachines_error_profileRequired_description()};case"cloud-quota":return{title:s.cloudMachines_error_quota_title(),description:e.limit==="plan"?s.cloudMachines_error_quotaPlan_description():e.limit==="rate"?s.cloudMachines_error_quotaRate_description():s.cloudMachines_error_quotaConcurrency_description()};case"cloud-machine-unavailable":switch(e.reason){case"not-configured":return{title:s.cloudMachines_error_unavailable_title(),description:s.cloudMachines_error_notConfigured_description()};case"key-rejected":return{title:s.cloudMachines_error_keyRejected_title(),description:s.cloudMachines_error_keyRejected_description()};case"template-missing":return{title:s.cloudMachines_error_unavailable_title(),description:s.cloudMachines_error_templateMissing_description()};case"sandbox-lost":return{title:s.cloudMachines_error_sandboxLost_title(),description:s.cloudMachines_error_sandboxLost_description()};case"bootstrap-failed":return{title:s.cloudMachines_error_unavailable_title(),description:s.cloudMachines_error_bootstrapFailed_description()};default:return{title:s.cloudMachines_error_unavailable_title(),description:s.cloudMachines_error_apiError_description()}}}}function ns(e,t,n){const o=e.trim();if(!o)return s.cloudMachines_form_name_required();if(qe(o)>We||/[\u0000-\u001f\u007f]/u.test(o))return s.cloudMachines_form_name_invalid();const a=o.toLowerCase();return t.some(c=>c.id!==n&&c.name.trim().toLowerCase()===a)?s.cloudMachines_form_name_taken():null}function os(e){return e.catalogProfiles.some(t=>typeof t.remoteCompatible=="boolean")||e.defaultRemoteIncompatibility||e.defaultRemoteLaunch||e.profileDefaults.some(t=>typeof t.remoteCompatible=="boolean")?"supported":e.catalogProfiles.length>0?"unsupported":e.profilesLoadStatus==="idle"?"unknown":"unsupported"}function rs(e,t,n){if(A(e)){const o=t.find(a=>a.providerRef===e);return o?.remoteCompatible!==!1?null:o.remoteIncompatibility??{reason:"unknown",keys:[]}}return null}const kn=1440*60*1e3;function Oe(e,t){if(!e?.capabilities)return"missing";const n=e.observedAt?Date.parse(e.observedAt):Number.NaN;return Number.isFinite(n)&&t-n>kn?"stale":"fresh"}function ss(e,t,n){if(!e||Oe(e,n)!=="fresh")return;const o=y(t),a=e.capabilities?.providers.find(c=>c.id===o);return a&&a.models.length>0?a.models:void 0}function cs(e,t,n){const o=y(t),a=new Set;for(const c of e){if(c.state==="revoked"||Oe(c,n)!=="fresh")continue;const i=c.capabilities?.providers.find(l=>l.id===o);if(!(!i||!Cn(i)))for(const l of i.models)a.add(l)}return[...a]}const Pn=new Set(["cli-missing","prerequisite-missing"]);function Cn(e){return e.visible!==!1&&!Pn.has(e.status)}const In=new Set(["signed-out","auth-failed"]);function En(e){return In.has(e)}function An(e,t){if(A(t))return!1;const n=y(t),o=e?.capabilities?.providers.find(a=>a.id===n);return!!o&&En(o.status)}function Le(e,t){return(t.defaultRemoteLaunch?t.defaultRemoteLaunch[e]==="send":!t.defaultRemoteIncompatibility?.[e])&&t.defaultHasOverrides?.[e]!==!1}function wn(e,t,n){return n.defaultRemoteLaunch?.[t]==="refused"?!1:!e.cloud&&!An(e,t)}function as(e){const{machine:t,providerRef:n}=e;return A(n)||wn(t,n,e)||Le(n,e)?null:e.catalogProfiles.find(o=>o.baseProviderId===n&&o.remoteCompatible===!0)??null}const Rn=r.createSelector(e=>ut.select(e)&&ft.select(e)&&e.remoteMachines?.supported===!0&&e.cloudMachines?.supported===!0),is=r.createSelector(e=>{const t=e.cloudMachines?.providerKinds??["e2b"];return e.cloudMachines?.entries===!0?t:t.filter(n=>n==="e2b")}),ls=r.createSelector(e=>e.cloudMachines?.entries===!0);function Ne(e){return Object.values(e.cloudMachines?.providers??{}).sort((t,n)=>t.configuredAt.localeCompare(n.configuredAt)||t.name.localeCompare(n.name))}const ds=r.createSelector(Ne),us=r.createSelector(e=>Object.values(e.cloudMachines?.machines??{}).sort((t,n)=>(t.cloud?.startedAt??"").localeCompare(n.cloud?.startedAt??""))),fs=r.createSelector(e=>Object.values(e.cloudMachines?.machines??{}).filter(t=>t.cloud?.state==="paused").length);function On(e,t){const n=t.cloud;return!n?.agentId||!n.workspaceId||!ne.select(e,n.workspaceId)?null:{workspaceId:n.workspaceId,agentId:n.agentId}}const ps=r.createSelector((e,t)=>{const n={},o={};for(const a of t){const c=a.cloud?.workspaceId;if(c&&!(c in n)){const i=ne.select(e,c);n[c]=i?.title||i?.name||null}o[a.id]=On(e,a)}return{workspaceNames:n,agentLinks:o}}),_s=r.createSelector(e=>e.cloudMachines?.readAt??{}),ms=r.createSelector(e=>e.cloudMachines?.pending??{}),hs=r.createSelector(e=>e.cloudMachines?.failures??{}),gs=r.createSelector(e=>e.cloudMachines?.validated??null);function bs(e){if(!Rn.select(e))return null;const t=Ne(e);if(t.length===0)return null;const n=e.cloudMachines?.entries===!0;return t.map(o=>({cloudMachineId:o.id,label:o.provider==="e2b"?n&&(t.length>1||o.name.trim().toLowerCase()!=="e2b")?s.cloudMachines_startOn_entry_label({name:o.name}):s.cloudMachines_startOn_label():o.name.trim().toLowerCase()===H(o.provider).toLowerCase()?H(o.provider):o.provider==="northflank"?s.cloudMachines_startOn_northflank_label({name:o.name}):s.cloudMachines_startOn_agent37_label({name:o.name}),unavailableReason:o.state==="key-rejected"?bn(o.provider).keyRejected:null,needsProfile:!Ln(e,o)}))}function Ln(e,t){const n=Pt.select(e),o=e.providerSettings?.profiles?.defaults??{},a={defaultRemoteLaunch:ct.select(e),defaultRemoteIncompatibility:st.select(e)},c=d=>n[d]!==!1&&(t.agentProviders.length===0||t.agentProviders.includes(d)),i=new Set([...t.agentProviders,...Object.keys(a.defaultRemoteLaunch??{})]);for(const d of i)if(c(d)&&(o[d]?.env.length??0)>0&&Le(d,a))return!0;const l=e.providerSettings?.profiles?.items,u=l?f(l):[];return at.select(e).some(d=>{if(d.remoteCompatible!==!0||!c(d.baseProviderId))return!1;const v=u.find(h=>h.providerRef===d.providerRef);return!v||v.env.some(h=>h.kind==="set")})}function vs(e,t,n=e.cloudMachines?.providers[Ke]??null){if(!t)return null;const o=n,a=y(t);if(o&&o.agentProviders.length>0&&!o.agentProviders.includes(a))return s.cloudMachines_startOn_providerMissing();const c=e.providerSettings?.profiles;if(A(t)){const l=c?f(c.items).find(u=>u.providerRef===t):void 0;return l?l.remoteCompatible===!1?s.cloudMachines_startOn_needsProfile():l.env.some(u=>u.kind==="set")?null:s.cloudMachines_startOn_needsProfile():null}const i=c?.defaults?.[a];return i?i.remoteCompatible===!1?s.cloudMachines_startOn_needsProfile():i.env.some(l=>l.kind==="set")?null:s.cloudMachines_startOn_needsProfile():c?.loadStatus==="success"?s.cloudMachines_startOn_needsProfile():null}const O=new Map;function Ss(e){return O.has(e)}function Ms(e){return O.get(e)}function ys(e){O.set(e.agentId,e)}function ks(e){O.delete(e)}export{os as $,be as A,Ms as B,yt as C,xt as D,es as E,Zr as F,Ss as G,Cn as H,oe as I,Qn as J,fe as K,Qo as L,he as M,Gn as N,$ as O,St as P,An as Q,Re as R,Jr as S,Oe as T,ss as U,N as V,E as W,cs as X,ht as Y,as as Z,rs as _,Yr as a,se as a$,ks as a0,L as a1,Vr as a2,pr as a3,Dr as a4,xr as a5,P as a6,Nt as a7,Ho as a8,Fo as a9,Pt as aA,ln as aB,gr as aC,dn as aD,ur as aE,fr as aF,ho as aG,or as aH,rr as aI,Xo as aJ,Zo as aK,er as aL,cr as aM,sr as aN,an as aO,ar as aP,dr as aQ,hr as aR,kt as aS,No as aT,Hr as aU,qr as aV,fo as aW,zn as aX,Or as aY,tr as aZ,xo as a_,jo as aa,R as ab,To as ac,Do as ad,Pr as ae,vo as af,Nr as ag,ds as ah,ls as ai,hs as aj,Rn as ak,ms as al,is as am,_s as an,us as ao,gs as ap,Rr as aq,Lr as ar,yr as as,br as at,kr as au,Ir as av,Ar as aw,Tr as ax,Er as ay,Wo as az,Gr as b,Mr as b$,vr as b0,jr as b1,vt as b2,$n as b3,Bo as b4,Lo as b5,Rt as b6,$o as b7,Ot as b8,Ko as b9,Wn as bA,to as bB,no as bC,Un as bD,ao as bE,io as bF,yo as bG,Io as bH,Ao as bI,Eo as bJ,wo as bK,Co as bL,bo as bM,Po as bN,ko as bO,Ro as bP,so as bQ,ro as bR,re as bS,co as bT,_r as bU,lo as bV,Cr as bW,mo as bX,ps as bY,j as bZ,Sr as b_,uo as ba,Uo as bb,Oo as bc,Fr as bd,Jn as be,Kn as bf,bt as bg,oo as bh,fs as bi,wr as bj,go as bk,nr as bl,Br as bm,Vn as bn,Mo as bo,So as bp,Zn as bq,eo as br,po as bs,_o as bt,Xn as bu,Yn as bv,Lt as bw,qo as bx,qn as by,gt as bz,Go as c,zo as c0,mr as c1,Jo as c2,ir as c3,lr as c4,Qt as c5,$t as c6,ys as c7,bs as c8,mt as c9,Ur as ca,cn as d,pt as e,Vo as f,Yo as g,me as h,Qr as i,ns as j,ts as k,vs as l,bn as m,zr as n,Wr as o,Ft as p,wn as q,Le as r,Kt as s,fn as t,$r as u,_n as v,pn as w,Kr as x,Xr as y,_e as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as V,ay as k,aW as lt}from"./DEo5mzFE.js";import{c as tt}from"./lAmQKSWr.js";import{g as gt}from"./BdWqymET.js";var Z={exports:{}},$={exports:{}},Q={exports:{}},ut=Q.exports,j;function ft(){return j||(j=1,(function(G,b){(function(I,L){G.exports=L()})(ut,function(){return(function(N){var I={};function L(o){if(I[o])return I[o].exports;var e=I[o]={i:o,l:!1,exports:{}};return N[o].call(e.exports,e,e.exports,L),e.l=!0,e.exports}return L.m=N,L.c=I,L.i=function(o){return o},L.d=function(o,e,t){L.o(o,e)||Object.defineProperty(o,e,{configurable:!1,enumerable:!0,get:t})},L.n=function(o){var e=o&&o.__esModule?function(){return o.default}:function(){return o};return L.d(e,"a",e),e},L.o=function(o,e){return Object.prototype.hasOwnProperty.call(o,e)},L.p="",L(L.s=26)})([(function(N,I,L){function o(){}o.QUALITY=1,o.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,o.DEFAULT_INCREMENTAL=!1,o.DEFAULT_ANIMATION_ON_LAYOUT=!0,o.DEFAULT_ANIMATION_DURING_LAYOUT=!1,o.DEFAULT_ANIMATION_PERIOD=50,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,o.DEFAULT_GRAPH_MARGIN=15,o.NODE_DIMENSIONS_INCLUDE_LABELS=!1,o.SIMPLE_NODE_SIZE=40,o.SIMPLE_NODE_HALF_SIZE=o.SIMPLE_NODE_SIZE/2,o.EMPTY_COMPOUND_NODE_SIZE=40,o.MIN_EDGE_LENGTH=1,o.WORLD_BOUNDARY=1e6,o.INITIAL_WORLD_BOUNDARY=o.WORLD_BOUNDARY/1e3,o.WORLD_CENTER_X=1200,o.WORLD_CENTER_Y=900,N.exports=o}),(function(N,I,L){var o=L(2),e=L(8),t=L(9);function i(g,n,d){o.call(this,d),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=d,this.bendpoints=[],this.source=g,this.target=n}i.prototype=Object.create(o.prototype);for(var l in o)i[l]=o[l];i.prototype.getSource=function(){return this.source},i.prototype.getTarget=function(){return this.target},i.prototype.isInterGraph=function(){return this.isInterGraph},i.prototype.getLength=function(){return this.length},i.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},i.prototype.getBendpoints=function(){return this.bendpoints},i.prototype.getLca=function(){return this.lca},i.prototype.getSourceInLca=function(){return this.sourceInLca},i.prototype.getTargetInLca=function(){return this.targetInLca},i.prototype.getOtherEnd=function(g){if(this.source===g)return this.target;if(this.target===g)return this.source;throw"Node is not incident with this edge"},i.prototype.getOtherEndInGraph=function(g,n){for(var d=this.getOtherEnd(g),r=n.getGraphManager().getRoot();;){if(d.getOwner()==n)return d;if(d.getOwner()==r)break;d=d.getOwner().getParent()}return null},i.prototype.updateLength=function(){var g=new Array(4);this.isOverlapingSourceAndTarget=e.getIntersection(this.target.getRect(),this.source.getRect(),g),this.isOverlapingSourceAndTarget||(this.lengthX=g[0]-g[2],this.lengthY=g[1]-g[3],Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},i.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},N.exports=i}),(function(N,I,L){function o(e){this.vGraphObject=e}N.exports=o}),(function(N,I,L){var o=L(2),e=L(10),t=L(13),i=L(0),l=L(16),g=L(4);function n(r,h,a,p){a==null&&p==null&&(p=h),o.call(this,p),r.graphManager!=null&&(r=r.graphManager),this.estimatedSize=e.MIN_VALUE,this.inclusionTreeDepth=e.MAX_VALUE,this.vGraphObject=p,this.edges=[],this.graphManager=r,a!=null&&h!=null?this.rect=new t(h.x,h.y,a.width,a.height):this.rect=new t}n.prototype=Object.create(o.prototype);for(var d in o)n[d]=o[d];n.prototype.getEdges=function(){return this.edges},n.prototype.getChild=function(){return this.child},n.prototype.getOwner=function(){return this.owner},n.prototype.getWidth=function(){return this.rect.width},n.prototype.setWidth=function(r){this.rect.width=r},n.prototype.getHeight=function(){return this.rect.height},n.prototype.setHeight=function(r){this.rect.height=r},n.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},n.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},n.prototype.getCenter=function(){return new g(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},n.prototype.getLocation=function(){return new g(this.rect.x,this.rect.y)},n.prototype.getRect=function(){return this.rect},n.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},n.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},n.prototype.setRect=function(r,h){this.rect.x=r.x,this.rect.y=r.y,this.rect.width=h.width,this.rect.height=h.height},n.prototype.setCenter=function(r,h){this.rect.x=r-this.rect.width/2,this.rect.y=h-this.rect.height/2},n.prototype.setLocation=function(r,h){this.rect.x=r,this.rect.y=h},n.prototype.moveBy=function(r,h){this.rect.x+=r,this.rect.y+=h},n.prototype.getEdgeListToNode=function(r){var h=[],a=this;return a.edges.forEach(function(p){if(p.target==r){if(p.source!=a)throw"Incorrect edge source!";h.push(p)}}),h},n.prototype.getEdgesBetween=function(r){var h=[],a=this;return a.edges.forEach(function(p){if(!(p.source==a||p.target==a))throw"Incorrect edge source and/or target";(p.target==r||p.source==r)&&h.push(p)}),h},n.prototype.getNeighborsList=function(){var r=new Set,h=this;return h.edges.forEach(function(a){if(a.source==h)r.add(a.target);else{if(a.target!=h)throw"Incorrect incidency!";r.add(a.source)}}),r},n.prototype.withChildren=function(){var r=new Set,h,a;if(r.add(this),this.child!=null)for(var p=this.child.getNodes(),v=0;v<p.length;v++)h=p[v],a=h.withChildren(),a.forEach(function(D){r.add(D)});return r},n.prototype.getNoOfChildren=function(){var r=0,h;if(this.child==null)r=1;else for(var a=this.child.getNodes(),p=0;p<a.length;p++)h=a[p],r+=h.getNoOfChildren();return r==0&&(r=1),r},n.prototype.getEstimatedSize=function(){if(this.estimatedSize==e.MIN_VALUE)throw"assert failed";return this.estimatedSize},n.prototype.calcEstimatedSize=function(){return this.child==null?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},n.prototype.scatter=function(){var r,h,a=-i.INITIAL_WORLD_BOUNDARY,p=i.INITIAL_WORLD_BOUNDARY;r=i.WORLD_CENTER_X+l.nextDouble()*(p-a)+a;var v=-i.INITIAL_WORLD_BOUNDARY,D=i.INITIAL_WORLD_BOUNDARY;h=i.WORLD_CENTER_Y+l.nextDouble()*(D-v)+v,this.rect.x=r,this.rect.y=h},n.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var r=this.getChild();if(r.updateBounds(!0),this.rect.x=r.getLeft(),this.rect.y=r.getTop(),this.setWidth(r.getRight()-r.getLeft()),this.setHeight(r.getBottom()-r.getTop()),i.NODE_DIMENSIONS_INCLUDE_LABELS){var h=r.getRight()-r.getLeft(),a=r.getBottom()-r.getTop();this.labelWidth>h&&(this.rect.x-=(this.labelWidth-h)/2,this.setWidth(this.labelWidth)),this.labelHeight>a&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-a)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-a),this.setHeight(this.labelHeight))}}},n.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==e.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},n.prototype.transform=function(r){var h=this.rect.x;h>i.WORLD_BOUNDARY?h=i.WORLD_BOUNDARY:h<-i.WORLD_BOUNDARY&&(h=-i.WORLD_BOUNDARY);var a=this.rect.y;a>i.WORLD_BOUNDARY?a=i.WORLD_BOUNDARY:a<-i.WORLD_BOUNDARY&&(a=-i.WORLD_BOUNDARY);var p=new g(h,a),v=r.inverseTransformPoint(p);this.setLocation(v.x,v.y)},n.prototype.getLeft=function(){return this.rect.x},n.prototype.getRight=function(){return this.rect.x+this.rect.width},n.prototype.getTop=function(){return this.rect.y},n.prototype.getBottom=function(){return this.rect.y+this.rect.height},n.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},N.exports=n}),(function(N,I,L){function o(e,t){e==null&&t==null?(this.x=0,this.y=0):(this.x=e,this.y=t)}o.prototype.getX=function(){return this.x},o.prototype.getY=function(){return this.y},o.prototype.setX=function(e){this.x=e},o.prototype.setY=function(e){this.y=e},o.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},o.prototype.getCopy=function(){return new o(this.x,this.y)},o.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},N.exports=o}),(function(N,I,L){var o=L(2),e=L(10),t=L(0),i=L(6),l=L(3),g=L(1),n=L(13),d=L(12),r=L(11);function h(p,v,D){o.call(this,D),this.estimatedSize=e.MIN_VALUE,this.margin=t.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=p,v!=null&&v instanceof i?this.graphManager=v:v!=null&&v instanceof Layout&&(this.graphManager=v.graphManager)}h.prototype=Object.create(o.prototype);for(var a in o)h[a]=o[a];h.prototype.getNodes=function(){return this.nodes},h.prototype.getEdges=function(){return this.edges},h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getParent=function(){return this.parent},h.prototype.getLeft=function(){return this.left},h.prototype.getRight=function(){return this.right},h.prototype.getTop=function(){return this.top},h.prototype.getBottom=function(){return this.bottom},h.prototype.isConnected=function(){return this.isConnected},h.prototype.add=function(p,v,D){if(v==null&&D==null){var u=p;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(u)>-1)throw"Node already in graph!";return u.owner=this,this.getNodes().push(u),u}else{var T=p;if(!(this.getNodes().indexOf(v)>-1&&this.getNodes().indexOf(D)>-1))throw"Source or target not in graph!";if(!(v.owner==D.owner&&v.owner==this))throw"Both owners must be this graph!";return v.owner!=D.owner?null:(T.source=v,T.target=D,T.isInterGraph=!1,this.getEdges().push(T),v.edges.push(T),D!=v&&D.edges.push(T),T)}},h.prototype.remove=function(p){var v=p;if(p instanceof l){if(v==null)throw"Node is null!";if(!(v.owner!=null&&v.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var D=v.edges.slice(),u,T=D.length,y=0;y<T;y++)u=D[y],u.isInterGraph?this.graphManager.remove(u):u.source.owner.remove(u);var O=this.nodes.indexOf(v);if(O==-1)throw"Node not in owner node list!";this.nodes.splice(O,1)}else if(p instanceof g){var u=p;if(u==null)throw"Edge is null!";if(!(u.source!=null&&u.target!=null))throw"Source and/or target is null!";if(!(u.source.owner!=null&&u.target.owner!=null&&u.source.owner==this&&u.target.owner==this))throw"Source and/or target owner is invalid!";var s=u.source.edges.indexOf(u),f=u.target.edges.indexOf(u);if(!(s>-1&&f>-1))throw"Source and/or target doesn't know this edge!";u.source.edges.splice(s,1),u.target!=u.source&&u.target.edges.splice(f,1);var O=u.source.owner.getEdges().indexOf(u);if(O==-1)throw"Not in owner's edge list!";u.source.owner.getEdges().splice(O,1)}},h.prototype.updateLeftTop=function(){for(var p=e.MAX_VALUE,v=e.MAX_VALUE,D,u,T,y=this.getNodes(),O=y.length,s=0;s<O;s++){var f=y[s];D=f.getTop(),u=f.getLeft(),p>D&&(p=D),v>u&&(v=u)}return p==e.MAX_VALUE?null:(y[0].getParent().paddingLeft!=null?T=y[0].getParent().paddingLeft:T=this.margin,this.left=v-T,this.top=p-T,new d(this.left,this.top))},h.prototype.updateBounds=function(p){for(var v=e.MAX_VALUE,D=-e.MAX_VALUE,u=e.MAX_VALUE,T=-e.MAX_VALUE,y,O,s,f,c,E=this.nodes,A=E.length,m=0;m<A;m++){var C=E[m];p&&C.child!=null&&C.updateBounds(),y=C.getLeft(),O=C.getRight(),s=C.getTop(),f=C.getBottom(),v>y&&(v=y),D<O&&(D=O),u>s&&(u=s),T<f&&(T=f)}var R=new n(v,u,D-v,T-u);v==e.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),E[0].getParent().paddingLeft!=null?c=E[0].getParent().paddingLeft:c=this.margin,this.left=R.x-c,this.right=R.x+R.width+c,this.top=R.y-c,this.bottom=R.y+R.height+c},h.calculateBounds=function(p){for(var v=e.MAX_VALUE,D=-e.MAX_VALUE,u=e.MAX_VALUE,T=-e.MAX_VALUE,y,O,s,f,c=p.length,E=0;E<c;E++){var A=p[E];y=A.getLeft(),O=A.getRight(),s=A.getTop(),f=A.getBottom(),v>y&&(v=y),D<O&&(D=O),u>s&&(u=s),T<f&&(T=f)}var m=new n(v,u,D-v,T-u);return m},h.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},h.prototype.getEstimatedSize=function(){if(this.estimatedSize==e.MIN_VALUE)throw"assert failed";return this.estimatedSize},h.prototype.calcEstimatedSize=function(){for(var p=0,v=this.nodes,D=v.length,u=0;u<D;u++){var T=v[u];p+=T.calcEstimatedSize()}return p==0?this.estimatedSize=t.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=p/Math.sqrt(this.nodes.length),this.estimatedSize},h.prototype.updateConnected=function(){var p=this;if(this.nodes.length==0){this.isConnected=!0;return}var v=new r,D=new Set,u=this.nodes[0],T,y,O=u.withChildren();for(O.forEach(function(m){v.push(m),D.add(m)});v.length!==0;){u=v.shift(),T=u.getEdges();for(var s=T.length,f=0;f<s;f++){var c=T[f];if(y=c.getOtherEndInGraph(u,this),y!=null&&!D.has(y)){var E=y.withChildren();E.forEach(function(m){v.push(m),D.add(m)})}}}if(this.isConnected=!1,D.size>=this.nodes.length){var A=0;D.forEach(function(m){m.owner==p&&A++}),A==this.nodes.length&&(this.isConnected=!0)}},N.exports=h}),(function(N,I,L){var o,e=L(1);function t(i){o=L(5),this.layout=i,this.graphs=[],this.edges=[]}t.prototype.addRoot=function(){var i=this.layout.newGraph(),l=this.layout.newNode(null),g=this.add(i,l);return this.setRootGraph(g),this.rootGraph},t.prototype.add=function(i,l,g,n,d){if(g==null&&n==null&&d==null){if(i==null)throw"Graph is null!";if(l==null)throw"Parent node is null!";if(this.graphs.indexOf(i)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(i),i.parent!=null)throw"Already has a parent!";if(l.child!=null)throw"Already has a child!";return i.parent=l,l.child=i,i}else{d=g,n=l,g=i;var r=n.getOwner(),h=d.getOwner();if(!(r!=null&&r.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(h!=null&&h.getGraphManager()==this))throw"Target not in this graph mgr!";if(r==h)return g.isInterGraph=!1,r.add(g,n,d);if(g.isInterGraph=!0,g.source=n,g.target=d,this.edges.indexOf(g)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(g),!(g.source!=null&&g.target!=null))throw"Edge source and/or target is null!";if(!(g.source.edges.indexOf(g)==-1&&g.target.edges.indexOf(g)==-1))throw"Edge already in source and/or target incidency list!";return g.source.edges.push(g),g.target.edges.push(g),g}},t.prototype.remove=function(i){if(i instanceof o){var l=i;if(l.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(l==this.rootGraph||l.parent!=null&&l.parent.graphManager==this))throw"Invalid parent node!";var g=[];g=g.concat(l.getEdges());for(var n,d=g.length,r=0;r<d;r++)n=g[r],l.remove(n);var h=[];h=h.concat(l.getNodes());var a;d=h.length;for(var r=0;r<d;r++)a=h[r],l.remove(a);l==this.rootGraph&&this.setRootGraph(null);var p=this.graphs.indexOf(l);this.graphs.splice(p,1),l.parent=null}else if(i instanceof e){if(n=i,n==null)throw"Edge is null!";if(!n.isInterGraph)throw"Not an inter-graph edge!";if(!(n.source!=null&&n.target!=null))throw"Source and/or target is null!";if(!(n.source.edges.indexOf(n)!=-1&&n.target.edges.indexOf(n)!=-1))throw"Source and/or target doesn't know this edge!";var p=n.source.edges.indexOf(n);if(n.source.edges.splice(p,1),p=n.target.edges.indexOf(n),n.target.edges.splice(p,1),!(n.source.owner!=null&&n.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(n.source.owner.getGraphManager().edges.indexOf(n)==-1)throw"Not in owner graph manager's edge list!";var p=n.source.owner.getGraphManager().edges.indexOf(n);n.source.owner.getGraphManager().edges.splice(p,1)}},t.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},t.prototype.getGraphs=function(){return this.graphs},t.prototype.getAllNodes=function(){if(this.allNodes==null){for(var i=[],l=this.getGraphs(),g=l.length,n=0;n<g;n++)i=i.concat(l[n].getNodes());this.allNodes=i}return this.allNodes},t.prototype.resetAllNodes=function(){this.allNodes=null},t.prototype.resetAllEdges=function(){this.allEdges=null},t.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},t.prototype.getAllEdges=function(){if(this.allEdges==null){var i=[],l=this.getGraphs();l.length;for(var g=0;g<l.length;g++)i=i.concat(l[g].getEdges());i=i.concat(this.edges),this.allEdges=i}return this.allEdges},t.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},t.prototype.setAllNodesToApplyGravitation=function(i){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=i},t.prototype.getRoot=function(){return this.rootGraph},t.prototype.setRootGraph=function(i){if(i.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=i,i.parent==null&&(i.parent=this.layout.newNode("Root node"))},t.prototype.getLayout=function(){return this.layout},t.prototype.isOneAncestorOfOther=function(i,l){if(!(i!=null&&l!=null))throw"assert failed";if(i==l)return!0;var g=i.getOwner(),n;do{if(n=g.getParent(),n==null)break;if(n==l)return!0;if(g=n.getOwner(),g==null)break}while(!0);g=l.getOwner();do{if(n=g.getParent(),n==null)break;if(n==i)return!0;if(g=n.getOwner(),g==null)break}while(!0);return!1},t.prototype.calcLowestCommonAncestors=function(){for(var i,l,g,n,d,r=this.getAllEdges(),h=r.length,a=0;a<h;a++){if(i=r[a],l=i.source,g=i.target,i.lca=null,i.sourceInLca=l,i.targetInLca=g,l==g){i.lca=l.getOwner();continue}for(n=l.getOwner();i.lca==null;){for(i.targetInLca=g,d=g.getOwner();i.lca==null;){if(d==n){i.lca=d;break}if(d==this.rootGraph)break;if(i.lca!=null)throw"assert failed";i.targetInLca=d.getParent(),d=i.targetInLca.getOwner()}if(n==this.rootGraph)break;i.lca==null&&(i.sourceInLca=n.getParent(),n=i.sourceInLca.getOwner())}if(i.lca==null)throw"assert failed"}},t.prototype.calcLowestCommonAncestor=function(i,l){if(i==l)return i.getOwner();var g=i.getOwner();do{if(g==null)break;var n=l.getOwner();do{if(n==null)break;if(n==g)return n;n=n.getParent().getOwner()}while(!0);g=g.getParent().getOwner()}while(!0);return g},t.prototype.calcInclusionTreeDepths=function(i,l){i==null&&l==null&&(i=this.rootGraph,l=1);for(var g,n=i.getNodes(),d=n.length,r=0;r<d;r++)g=n[r],g.inclusionTreeDepth=l,g.child!=null&&this.calcInclusionTreeDepths(g.child,l+1)},t.prototype.includesInvalidEdge=function(){for(var i,l=this.edges.length,g=0;g<l;g++)if(i=this.edges[g],this.isOneAncestorOfOther(i.source,i.target))return!0;return!1},N.exports=t}),(function(N,I,L){var o=L(0);function e(){}for(var t in o)e[t]=o[t];e.MAX_ITERATIONS=2500,e.DEFAULT_EDGE_LENGTH=50,e.DEFAULT_SPRING_STRENGTH=.45,e.DEFAULT_REPULSION_STRENGTH=4500,e.DEFAULT_GRAVITY_STRENGTH=.4,e.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,e.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,e.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,e.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,e.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,e.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,e.COOLING_ADAPTATION_FACTOR=.33,e.ADAPTATION_LOWER_NODE_LIMIT=1e3,e.ADAPTATION_UPPER_NODE_LIMIT=5e3,e.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,e.MAX_NODE_DISPLACEMENT=e.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,e.MIN_REPULSION_DIST=e.DEFAULT_EDGE_LENGTH/10,e.CONVERGENCE_CHECK_PERIOD=100,e.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,e.MIN_EDGE_LENGTH=1,e.GRID_CALCULATION_CHECK_PERIOD=10,N.exports=e}),(function(N,I,L){var o=L(12);function e(){}e.calcSeparationAmount=function(t,i,l,g){if(!t.intersects(i))throw"assert failed";var n=new Array(2);this.decideDirectionsForOverlappingNodes(t,i,n),l[0]=Math.min(t.getRight(),i.getRight())-Math.max(t.x,i.x),l[1]=Math.min(t.getBottom(),i.getBottom())-Math.max(t.y,i.y),t.getX()<=i.getX()&&t.getRight()>=i.getRight()?l[0]+=Math.min(i.getX()-t.getX(),t.getRight()-i.getRight()):i.getX()<=t.getX()&&i.getRight()>=t.getRight()&&(l[0]+=Math.min(t.getX()-i.getX(),i.getRight()-t.getRight())),t.getY()<=i.getY()&&t.getBottom()>=i.getBottom()?l[1]+=Math.min(i.getY()-t.getY(),t.getBottom()-i.getBottom()):i.getY()<=t.getY()&&i.getBottom()>=t.getBottom()&&(l[1]+=Math.min(t.getY()-i.getY(),i.getBottom()-t.getBottom()));var d=Math.abs((i.getCenterY()-t.getCenterY())/(i.getCenterX()-t.getCenterX()));i.getCenterY()===t.getCenterY()&&i.getCenterX()===t.getCenterX()&&(d=1);var r=d*l[0],h=l[1]/d;l[0]<h?h=l[0]:r=l[1],l[0]=-1*n[0]*(h/2+g),l[1]=-1*n[1]*(r/2+g)},e.decideDirectionsForOverlappingNodes=function(t,i,l){t.getCenterX()<i.getCenterX()?l[0]=-1:l[0]=1,t.getCenterY()<i.getCenterY()?l[1]=-1:l[1]=1},e.getIntersection2=function(t,i,l){var g=t.getCenterX(),n=t.getCenterY(),d=i.getCenterX(),r=i.getCenterY();if(t.intersects(i))return l[0]=g,l[1]=n,l[2]=d,l[3]=r,!0;var h=t.getX(),a=t.getY(),p=t.getRight(),v=t.getX(),D=t.getBottom(),u=t.getRight(),T=t.getWidthHalf(),y=t.getHeightHalf(),O=i.getX(),s=i.getY(),f=i.getRight(),c=i.getX(),E=i.getBottom(),A=i.getRight(),m=i.getWidthHalf(),C=i.getHeightHalf(),R=!1,M=!1;if(g===d){if(n>r)return l[0]=g,l[1]=a,l[2]=d,l[3]=E,!1;if(n<r)return l[0]=g,l[1]=D,l[2]=d,l[3]=s,!1}else if(n===r){if(g>d)return l[0]=h,l[1]=n,l[2]=f,l[3]=r,!1;if(g<d)return l[0]=p,l[1]=n,l[2]=O,l[3]=r,!1}else{var S=t.height/t.width,Y=i.height/i.width,w=(r-n)/(d-g),x=void 0,F=void 0,U=void 0,P=void 0,_=void 0,X=void 0;if(-S===w?g>d?(l[0]=v,l[1]=D,R=!0):(l[0]=p,l[1]=a,R=!0):S===w&&(g>d?(l[0]=h,l[1]=a,R=!0):(l[0]=u,l[1]=D,R=!0)),-Y===w?d>g?(l[2]=c,l[3]=E,M=!0):(l[2]=f,l[3]=s,M=!0):Y===w&&(d>g?(l[2]=O,l[3]=s,M=!0):(l[2]=A,l[3]=E,M=!0)),R&&M)return!1;if(g>d?n>r?(x=this.getCardinalDirection(S,w,4),F=this.getCardinalDirection(Y,w,2)):(x=this.getCardinalDirection(-S,w,3),F=this.getCardinalDirection(-Y,w,1)):n>r?(x=this.getCardinalDirection(-S,w,1),F=this.getCardinalDirection(-Y,w,3)):(x=this.getCardinalDirection(S,w,2),F=this.getCardinalDirection(Y,w,4)),!R)switch(x){case 1:P=a,U=g+-y/w,l[0]=U,l[1]=P;break;case 2:U=u,P=n+T*w,l[0]=U,l[1]=P;break;case 3:P=D,U=g+y/w,l[0]=U,l[1]=P;break;case 4:U=v,P=n+-T*w,l[0]=U,l[1]=P;break}if(!M)switch(F){case 1:X=s,_=d+-C/w,l[2]=_,l[3]=X;break;case 2:_=A,X=r+m*w,l[2]=_,l[3]=X;break;case 3:X=E,_=d+C/w,l[2]=_,l[3]=X;break;case 4:_=c,X=r+-m*w,l[2]=_,l[3]=X;break}}return!1},e.getCardinalDirection=function(t,i,l){return t>i?l:1+l%4},e.getIntersection=function(t,i,l,g){if(g==null)return this.getIntersection2(t,i,l);var n=t.x,d=t.y,r=i.x,h=i.y,a=l.x,p=l.y,v=g.x,D=g.y,u=void 0,T=void 0,y=void 0,O=void 0,s=void 0,f=void 0,c=void 0,E=void 0,A=void 0;return y=h-d,s=n-r,c=r*d-n*h,O=D-p,f=a-v,E=v*p-a*D,A=y*f-O*s,A===0?null:(u=(s*E-f*c)/A,T=(O*c-y*E)/A,new o(u,T))},e.angleOfVector=function(t,i,l,g){var n=void 0;return t!==l?(n=Math.atan((g-i)/(l-t)),l<t?n+=Math.PI:g<i&&(n+=this.TWO_PI)):g<i?n=this.ONE_AND_HALF_PI:n=this.HALF_PI,n},e.doIntersect=function(t,i,l,g){var n=t.x,d=t.y,r=i.x,h=i.y,a=l.x,p=l.y,v=g.x,D=g.y,u=(r-n)*(D-p)-(v-a)*(h-d);if(u===0)return!1;var T=((D-p)*(v-n)+(a-v)*(D-d))/u,y=((d-h)*(v-n)+(r-n)*(D-d))/u;return 0<T&&T<1&&0<y&&y<1},e.HALF_PI=.5*Math.PI,e.ONE_AND_HALF_PI=1.5*Math.PI,e.TWO_PI=2*Math.PI,e.THREE_PI=3*Math.PI,N.exports=e}),(function(N,I,L){function o(){}o.sign=function(e){return e>0?1:e<0?-1:0},o.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},o.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},N.exports=o}),(function(N,I,L){function o(){}o.MAX_VALUE=2147483647,o.MIN_VALUE=-2147483648,N.exports=o}),(function(N,I,L){var o=(function(){function n(d,r){for(var h=0;h<r.length;h++){var a=r[h];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(d,a.key,a)}}return function(d,r,h){return r&&n(d.prototype,r),h&&n(d,h),d}})();function e(n,d){if(!(n instanceof d))throw new TypeError("Cannot call a class as a function")}var t=function(d){return{value:d,next:null,prev:null}},i=function(d,r,h,a){return d!==null?d.next=r:a.head=r,h!==null?h.prev=r:a.tail=r,r.prev=d,r.next=h,a.length++,r},l=function(d,r){var h=d.prev,a=d.next;return h!==null?h.next=a:r.head=a,a!==null?a.prev=h:r.tail=h,d.prev=d.next=null,r.length--,d},g=(function(){function n(d){var r=this;e(this,n),this.length=0,this.head=null,this.tail=null,d?.forEach(function(h){return r.push(h)})}return o(n,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(r,h){return i(h.prev,t(r),h,this)}},{key:"insertAfter",value:function(r,h){return i(h,t(r),h.next,this)}},{key:"insertNodeBefore",value:function(r,h){return i(h.prev,r,h,this)}},{key:"insertNodeAfter",value:function(r,h){return i(h,r,h.next,this)}},{key:"push",value:function(r){return i(this.tail,t(r),null,this)}},{key:"unshift",value:function(r){return i(null,t(r),this.head,this)}},{key:"remove",value:function(r){return l(r,this)}},{key:"pop",value:function(){return l(this.tail,this).value}},{key:"popNode",value:function(){return l(this.tail,this)}},{key:"shift",value:function(){return l(this.head,this).value}},{key:"shiftNode",value:function(){return l(this.head,this)}},{key:"get_object_at",value:function(r){if(r<=this.length()){for(var h=1,a=this.head;h<r;)a=a.next,h++;return a.value}}},{key:"set_object_at",value:function(r,h){if(r<=this.length()){for(var a=1,p=this.head;a<r;)p=p.next,a++;p.value=h}}}]),n})();N.exports=g}),(function(N,I,L){function o(e,t,i){this.x=null,this.y=null,e==null&&t==null&&i==null?(this.x=0,this.y=0):typeof e=="number"&&typeof t=="number"&&i==null?(this.x=e,this.y=t):e.constructor.name=="Point"&&t==null&&i==null&&(i=e,this.x=i.x,this.y=i.y)}o.prototype.getX=function(){return this.x},o.prototype.getY=function(){return this.y},o.prototype.getLocation=function(){return new o(this.x,this.y)},o.prototype.setLocation=function(e,t,i){e.constructor.name=="Point"&&t==null&&i==null?(i=e,this.setLocation(i.x,i.y)):typeof e=="number"&&typeof t=="number"&&i==null&&(parseInt(e)==e&&parseInt(t)==t?this.move(e,t):(this.x=Math.floor(e+.5),this.y=Math.floor(t+.5)))},o.prototype.move=function(e,t){this.x=e,this.y=t},o.prototype.translate=function(e,t){this.x+=e,this.y+=t},o.prototype.equals=function(e){if(e.constructor.name=="Point"){var t=e;return this.x==t.x&&this.y==t.y}return this==e},o.prototype.toString=function(){return new o().constructor.name+"[x="+this.x+",y="+this.y+"]"},N.exports=o}),(function(N,I,L){function o(e,t,i,l){this.x=0,this.y=0,this.width=0,this.height=0,e!=null&&t!=null&&i!=null&&l!=null&&(this.x=e,this.y=t,this.width=i,this.height=l)}o.prototype.getX=function(){return this.x},o.prototype.setX=function(e){this.x=e},o.prototype.getY=function(){return this.y},o.prototype.setY=function(e){this.y=e},o.prototype.getWidth=function(){return this.width},o.prototype.setWidth=function(e){this.width=e},o.prototype.getHeight=function(){return this.height},o.prototype.setHeight=function(e){this.height=e},o.prototype.getRight=function(){return this.x+this.width},o.prototype.getBottom=function(){return this.y+this.height},o.prototype.intersects=function(e){return!(this.getRight()<e.x||this.getBottom()<e.y||e.getRight()<this.x||e.getBottom()<this.y)},o.prototype.getCenterX=function(){return this.x+this.width/2},o.prototype.getMinX=function(){return this.getX()},o.prototype.getMaxX=function(){return this.getX()+this.width},o.prototype.getCenterY=function(){return this.y+this.height/2},o.prototype.getMinY=function(){return this.getY()},o.prototype.getMaxY=function(){return this.getY()+this.height},o.prototype.getWidthHalf=function(){return this.width/2},o.prototype.getHeightHalf=function(){return this.height/2},N.exports=o}),(function(N,I,L){var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function e(){}e.lastID=0,e.createID=function(t){return e.isPrimitive(t)?t:(t.uniqueID!=null||(t.uniqueID=e.getString(),e.lastID++),t.uniqueID)},e.getString=function(t){return t==null&&(t=e.lastID),"Object#"+t},e.isPrimitive=function(t){var i=typeof t>"u"?"undefined":o(t);return t==null||i!="object"&&i!="function"},N.exports=e}),(function(N,I,L){function o(a){if(Array.isArray(a)){for(var p=0,v=Array(a.length);p<a.length;p++)v[p]=a[p];return v}else return Array.from(a)}var e=L(0),t=L(6),i=L(3),l=L(1),g=L(5),n=L(4),d=L(17),r=L(27);function h(a){r.call(this),this.layoutQuality=e.QUALITY,this.createBendsAsNeeded=e.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=e.DEFAULT_INCREMENTAL,this.animationOnLayout=e.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=e.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=e.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=e.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new t(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,a!=null&&(this.isRemoteUse=a)}h.RANDOM_SEED=1,h.prototype=Object.create(r.prototype),h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},h.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},h.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},h.prototype.newGraphManager=function(){var a=new t(this);return this.graphManager=a,a},h.prototype.newGraph=function(a){return new g(null,this.graphManager,a)},h.prototype.newNode=function(a){return new i(this.graphManager,a)},h.prototype.newEdge=function(a){return new l(null,null,a)},h.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},h.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var a;return this.checkLayoutSuccess()?a=!1:a=this.layout(),e.ANIMATE==="during"?!1:(a&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,a)},h.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},h.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var a=this.graphManager.getAllEdges(),p=0;p<a.length;p++)a[p];for(var v=this.graphManager.getRoot().getNodes(),p=0;p<v.length;p++)v[p];this.update(this.graphManager.getRoot())}},h.prototype.update=function(a){if(a==null)this.update2();else if(a instanceof i){var p=a;if(p.getChild()!=null)for(var v=p.getChild().getNodes(),D=0;D<v.length;D++)update(v[D]);if(p.vGraphObject!=null){var u=p.vGraphObject;u.update(p)}}else if(a instanceof l){var T=a;if(T.vGraphObject!=null){var y=T.vGraphObject;y.update(T)}}else if(a instanceof g){var O=a;if(O.vGraphObject!=null){var s=O.vGraphObject;s.update(O)}}},h.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=e.QUALITY,this.animationDuringLayout=e.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=e.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=e.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=e.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=e.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=e.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},h.prototype.transform=function(a){if(a==null)this.transform(new n(0,0));else{var p=new d,v=this.graphManager.getRoot().updateLeftTop();if(v!=null){p.setWorldOrgX(a.x),p.setWorldOrgY(a.y),p.setDeviceOrgX(v.x),p.setDeviceOrgY(v.y);for(var D=this.getAllNodes(),u,T=0;T<D.length;T++)u=D[T],u.transform(p)}}},h.prototype.positionNodesRandomly=function(a){if(a==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var p,v,D=a.getNodes(),u=0;u<D.length;u++)p=D[u],v=p.getChild(),v==null||v.getNodes().length==0?p.scatter():(this.positionNodesRandomly(v),p.updateBounds())},h.prototype.getFlatForest=function(){for(var a=[],p=!0,v=this.graphManager.getRoot().getNodes(),D=!0,u=0;u<v.length;u++)v[u].getChild()!=null&&(D=!1);if(!D)return a;var T=new Set,y=[],O=new Map,s=[];for(s=s.concat(v);s.length>0&&p;){for(y.push(s[0]);y.length>0&&p;){var f=y[0];y.splice(0,1),T.add(f);for(var c=f.getEdges(),u=0;u<c.length;u++){var E=c[u].getOtherEnd(f);if(O.get(f)!=E)if(!T.has(E))y.push(E),O.set(E,f);else{p=!1;break}}}if(!p)a=[];else{var A=[].concat(o(T));a.push(A);for(var u=0;u<A.length;u++){var m=A[u],C=s.indexOf(m);C>-1&&s.splice(C,1)}T=new Set,O=new Map}}return a},h.prototype.createDummyNodesForBendpoints=function(a){for(var p=[],v=a.source,D=this.graphManager.calcLowestCommonAncestor(a.source,a.target),u=0;u<a.bendpoints.length;u++){var T=this.newNode(null);T.setRect(new Point(0,0),new Dimension(1,1)),D.add(T);var y=this.newEdge(null);this.graphManager.add(y,v,T),p.add(T),v=T}var y=this.newEdge(null);return this.graphManager.add(y,v,a.target),this.edgeToDummyNodes.set(a,p),a.isInterGraph()?this.graphManager.remove(a):D.remove(a),p},h.prototype.createBendpointsFromDummyNodes=function(){var a=[];a=a.concat(this.graphManager.getAllEdges()),a=[].concat(o(this.edgeToDummyNodes.keys())).concat(a);for(var p=0;p<a.length;p++){var v=a[p];if(v.bendpoints.length>0){for(var D=this.edgeToDummyNodes.get(v),u=0;u<D.length;u++){var T=D[u],y=new n(T.getCenterX(),T.getCenterY()),O=v.bendpoints.get(u);O.x=y.x,O.y=y.y,T.getOwner().remove(T)}this.graphManager.add(v,v.source,v.target)}}},h.transform=function(a,p,v,D){if(v!=null&&D!=null){var u=p;if(a<=50){var T=p/v;u-=(p-T)/50*(50-a)}else{var y=p*D;u+=(y-p)/50*(a-50)}return u}else{var O,s;return a<=50?(O=9*p/500,s=p/10):(O=9*p/50,s=-8*p),O*a+s}},h.findCenterOfTree=function(a){var p=[];p=p.concat(a);var v=[],D=new Map,u=!1,T=null;(p.length==1||p.length==2)&&(u=!0,T=p[0]);for(var y=0;y<p.length;y++){var O=p[y],s=O.getNeighborsList().size;D.set(O,O.getNeighborsList().size),s==1&&v.push(O)}var f=[];for(f=f.concat(v);!u;){var c=[];c=c.concat(f),f=[];for(var y=0;y<p.length;y++){var O=p[y],E=p.indexOf(O);E>=0&&p.splice(E,1);var A=O.getNeighborsList();A.forEach(function(R){if(v.indexOf(R)<0){var M=D.get(R),S=M-1;S==1&&f.push(R),D.set(R,S)}})}v=v.concat(f),(p.length==1||p.length==2)&&(u=!0,T=p[0])}return T},h.prototype.setGraphManager=function(a){this.graphManager=a},N.exports=h}),(function(N,I,L){function o(){}o.seed=1,o.x=0,o.nextDouble=function(){return o.x=Math.sin(o.seed++)*1e4,o.x-Math.floor(o.x)},N.exports=o}),(function(N,I,L){var o=L(4);function e(t,i){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}e.prototype.getWorldOrgX=function(){return this.lworldOrgX},e.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},e.prototype.getWorldOrgY=function(){return this.lworldOrgY},e.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},e.prototype.getWorldExtX=function(){return this.lworldExtX},e.prototype.setWorldExtX=function(t){this.lworldExtX=t},e.prototype.getWorldExtY=function(){return this.lworldExtY},e.prototype.setWorldExtY=function(t){this.lworldExtY=t},e.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},e.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},e.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},e.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},e.prototype.getDeviceExtX=function(){return this.ldeviceExtX},e.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},e.prototype.getDeviceExtY=function(){return this.ldeviceExtY},e.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},e.prototype.transformX=function(t){var i=0,l=this.lworldExtX;return l!=0&&(i=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/l),i},e.prototype.transformY=function(t){var i=0,l=this.lworldExtY;return l!=0&&(i=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/l),i},e.prototype.inverseTransformX=function(t){var i=0,l=this.ldeviceExtX;return l!=0&&(i=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/l),i},e.prototype.inverseTransformY=function(t){var i=0,l=this.ldeviceExtY;return l!=0&&(i=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/l),i},e.prototype.inverseTransformPoint=function(t){var i=new o(this.inverseTransformX(t.x),this.inverseTransformY(t.y));return i},N.exports=e}),(function(N,I,L){function o(r){if(Array.isArray(r)){for(var h=0,a=Array(r.length);h<r.length;h++)a[h]=r[h];return a}else return Array.from(r)}var e=L(15),t=L(7),i=L(0),l=L(8),g=L(9);function n(){e.call(this),this.useSmartIdealEdgeLengthCalculation=t.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=t.DEFAULT_EDGE_LENGTH,this.springConstant=t.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=t.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=t.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=t.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=t.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*t.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=t.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=t.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=t.MAX_ITERATIONS}n.prototype=Object.create(e.prototype);for(var d in e)n[d]=e[d];n.prototype.initParameters=function(){e.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=t.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},n.prototype.calcIdealEdgeLengths=function(){for(var r,h,a,p,v,D,u=this.getGraphManager().getAllEdges(),T=0;T<u.length;T++)r=u[T],r.idealLength=this.idealEdgeLength,r.isInterGraph&&(a=r.getSource(),p=r.getTarget(),v=r.getSourceInLca().getEstimatedSize(),D=r.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(r.idealLength+=v+D-2*i.SIMPLE_NODE_SIZE),h=r.getLca().getInclusionTreeDepth(),r.idealLength+=t.DEFAULT_EDGE_LENGTH*t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(a.getInclusionTreeDepth()+p.getInclusionTreeDepth()-2*h))},n.prototype.initSpringEmbedder=function(){var r=this.getAllNodes().length;this.incremental?(r>t.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*t.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(r-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-t.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT_INCREMENTAL):(r>t.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(t.COOLING_ADAPTATION_FACTOR,1-(r-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*(1-t.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},n.prototype.calcSpringForces=function(){for(var r=this.getAllEdges(),h,a=0;a<r.length;a++)h=r[a],this.calcSpringForce(h,h.idealLength)},n.prototype.calcRepulsionForces=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a,p,v,D,u=this.getAllNodes(),T;if(this.useFRGridVariant)for(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&r&&this.updateGrid(),T=new Set,a=0;a<u.length;a++)v=u[a],this.calculateRepulsionForceOfANode(v,T,r,h),T.add(v);else for(a=0;a<u.length;a++)for(v=u[a],p=a+1;p<u.length;p++)D=u[p],v.getOwner()==D.getOwner()&&this.calcRepulsionForce(v,D)},n.prototype.calcGravitationalForces=function(){for(var r,h=this.getAllNodesToApplyGravitation(),a=0;a<h.length;a++)r=h[a],this.calcGravitationalForce(r)},n.prototype.moveNodes=function(){for(var r=this.getAllNodes(),h,a=0;a<r.length;a++)h=r[a],h.move()},n.prototype.calcSpringForce=function(r,h){var a=r.getSource(),p=r.getTarget(),v,D,u,T;if(this.uniformLeafNodeSizes&&a.getChild()==null&&p.getChild()==null)r.updateLengthSimple();else if(r.updateLength(),r.isOverlapingSourceAndTarget)return;v=r.getLength(),v!=0&&(D=this.springConstant*(v-h),u=D*(r.lengthX/v),T=D*(r.lengthY/v),a.springForceX+=u,a.springForceY+=T,p.springForceX-=u,p.springForceY-=T)},n.prototype.calcRepulsionForce=function(r,h){var a=r.getRect(),p=h.getRect(),v=new Array(2),D=new Array(4),u,T,y,O,s,f,c;if(a.intersects(p)){l.calcSeparationAmount(a,p,v,t.DEFAULT_EDGE_LENGTH/2),f=2*v[0],c=2*v[1];var E=r.noOfChildren*h.noOfChildren/(r.noOfChildren+h.noOfChildren);r.repulsionForceX-=E*f,r.repulsionForceY-=E*c,h.repulsionForceX+=E*f,h.repulsionForceY+=E*c}else this.uniformLeafNodeSizes&&r.getChild()==null&&h.getChild()==null?(u=p.getCenterX()-a.getCenterX(),T=p.getCenterY()-a.getCenterY()):(l.getIntersection(a,p,D),u=D[2]-D[0],T=D[3]-D[1]),Math.abs(u)<t.MIN_REPULSION_DIST&&(u=g.sign(u)*t.MIN_REPULSION_DIST),Math.abs(T)<t.MIN_REPULSION_DIST&&(T=g.sign(T)*t.MIN_REPULSION_DIST),y=u*u+T*T,O=Math.sqrt(y),s=this.repulsionConstant*r.noOfChildren*h.noOfChildren/y,f=s*u/O,c=s*T/O,r.repulsionForceX-=f,r.repulsionForceY-=c,h.repulsionForceX+=f,h.repulsionForceY+=c},n.prototype.calcGravitationalForce=function(r){var h,a,p,v,D,u,T,y;h=r.getOwner(),a=(h.getRight()+h.getLeft())/2,p=(h.getTop()+h.getBottom())/2,v=r.getCenterX()-a,D=r.getCenterY()-p,u=Math.abs(v)+r.getWidth()/2,T=Math.abs(D)+r.getHeight()/2,r.getOwner()==this.graphManager.getRoot()?(y=h.getEstimatedSize()*this.gravityRangeFactor,(u>y||T>y)&&(r.gravitationForceX=-this.gravityConstant*v,r.gravitationForceY=-this.gravityConstant*D)):(y=h.getEstimatedSize()*this.compoundGravityRangeFactor,(u>y||T>y)&&(r.gravitationForceX=-this.gravityConstant*v*this.compoundGravityConstant,r.gravitationForceY=-this.gravityConstant*D*this.compoundGravityConstant))},n.prototype.isConverged=function(){var r,h=!1;return this.totalIterations>this.maxIterations/3&&(h=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),r=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,r||h},n.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},n.prototype.calcNoOfChildrenForAllNodes=function(){for(var r,h=this.graphManager.getAllNodes(),a=0;a<h.length;a++)r=h[a],r.noOfChildren=r.getNoOfChildren()},n.prototype.calcGrid=function(r){var h=0,a=0;h=parseInt(Math.ceil((r.getRight()-r.getLeft())/this.repulsionRange)),a=parseInt(Math.ceil((r.getBottom()-r.getTop())/this.repulsionRange));for(var p=new Array(h),v=0;v<h;v++)p[v]=new Array(a);for(var v=0;v<h;v++)for(var D=0;D<a;D++)p[v][D]=new Array;return p},n.prototype.addNodeToGrid=function(r,h,a){var p=0,v=0,D=0,u=0;p=parseInt(Math.floor((r.getRect().x-h)/this.repulsionRange)),v=parseInt(Math.floor((r.getRect().width+r.getRect().x-h)/this.repulsionRange)),D=parseInt(Math.floor((r.getRect().y-a)/this.repulsionRange)),u=parseInt(Math.floor((r.getRect().height+r.getRect().y-a)/this.repulsionRange));for(var T=p;T<=v;T++)for(var y=D;y<=u;y++)this.grid[T][y].push(r),r.setGridCoordinates(p,v,D,u)},n.prototype.updateGrid=function(){var r,h,a=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),r=0;r<a.length;r++)h=a[r],this.addNodeToGrid(h,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},n.prototype.calculateRepulsionForceOfANode=function(r,h,a,p){if(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&a||p){var v=new Set;r.surrounding=new Array;for(var D,u=this.grid,T=r.startX-1;T<r.finishX+2;T++)for(var y=r.startY-1;y<r.finishY+2;y++)if(!(T<0||y<0||T>=u.length||y>=u[0].length)){for(var O=0;O<u[T][y].length;O++)if(D=u[T][y][O],!(r.getOwner()!=D.getOwner()||r==D)&&!h.has(D)&&!v.has(D)){var s=Math.abs(r.getCenterX()-D.getCenterX())-(r.getWidth()/2+D.getWidth()/2),f=Math.abs(r.getCenterY()-D.getCenterY())-(r.getHeight()/2+D.getHeight()/2);s<=this.repulsionRange&&f<=this.repulsionRange&&v.add(D)}}r.surrounding=[].concat(o(v))}for(T=0;T<r.surrounding.length;T++)this.calcRepulsionForce(r,r.surrounding[T])},n.prototype.calcRepulsionRange=function(){return 0},N.exports=n}),(function(N,I,L){var o=L(1),e=L(7);function t(l,g,n){o.call(this,l,g,n),this.idealLength=e.DEFAULT_EDGE_LENGTH}t.prototype=Object.create(o.prototype);for(var i in o)t[i]=o[i];N.exports=t}),(function(N,I,L){var o=L(3);function e(i,l,g,n){o.call(this,i,l,g,n),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}e.prototype=Object.create(o.prototype);for(var t in o)e[t]=o[t];e.prototype.setGridCoordinates=function(i,l,g,n){this.startX=i,this.finishX=l,this.startY=g,this.finishY=n},N.exports=e}),(function(N,I,L){function o(e,t){this.width=0,this.height=0,e!==null&&t!==null&&(this.height=t,this.width=e)}o.prototype.getWidth=function(){return this.width},o.prototype.setWidth=function(e){this.width=e},o.prototype.getHeight=function(){return this.height},o.prototype.setHeight=function(e){this.height=e},N.exports=o}),(function(N,I,L){var o=L(14);function e(){this.map={},this.keys=[]}e.prototype.put=function(t,i){var l=o.createID(t);this.contains(l)||(this.map[l]=i,this.keys.push(t))},e.prototype.contains=function(t){return o.createID(t),this.map[t]!=null},e.prototype.get=function(t){var i=o.createID(t);return this.map[i]},e.prototype.keySet=function(){return this.keys},N.exports=e}),(function(N,I,L){var o=L(14);function e(){this.set={}}e.prototype.add=function(t){var i=o.createID(t);this.contains(i)||(this.set[i]=t)},e.prototype.remove=function(t){delete this.set[o.createID(t)]},e.prototype.clear=function(){this.set={}},e.prototype.contains=function(t){return this.set[o.createID(t)]==t},e.prototype.isEmpty=function(){return this.size()===0},e.prototype.size=function(){return Object.keys(this.set).length},e.prototype.addAllTo=function(t){for(var i=Object.keys(this.set),l=i.length,g=0;g<l;g++)t.push(this.set[i[g]])},e.prototype.size=function(){return Object.keys(this.set).length},e.prototype.addAll=function(t){for(var i=t.length,l=0;l<i;l++){var g=t[l];this.add(g)}},N.exports=e}),(function(N,I,L){var o=(function(){function l(g,n){for(var d=0;d<n.length;d++){var r=n[d];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(g,r.key,r)}}return function(g,n,d){return n&&l(g.prototype,n),d&&l(g,d),g}})();function e(l,g){if(!(l instanceof g))throw new TypeError("Cannot call a class as a function")}var t=L(11),i=(function(){function l(g,n){e(this,l),(n!==null||n!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var d=void 0;g instanceof t?d=g.size():d=g.length,this._quicksort(g,0,d-1)}return o(l,[{key:"_quicksort",value:function(n,d,r){if(d<r){var h=this._partition(n,d,r);this._quicksort(n,d,h),this._quicksort(n,h+1,r)}}},{key:"_partition",value:function(n,d,r){for(var h=this._get(n,d),a=d,p=r;;){for(;this.compareFunction(h,this._get(n,p));)p--;for(;this.compareFunction(this._get(n,a),h);)a++;if(a<p)this._swap(n,a,p),a++,p--;else return p}}},{key:"_get",value:function(n,d){return n instanceof t?n.get_object_at(d):n[d]}},{key:"_set",value:function(n,d,r){n instanceof t?n.set_object_at(d,r):n[d]=r}},{key:"_swap",value:function(n,d,r){var h=this._get(n,d);this._set(n,d,this._get(n,r)),this._set(n,r,h)}},{key:"_defaultCompareFunction",value:function(n,d){return d>n}}]),l})();N.exports=i}),(function(N,I,L){var o=(function(){function i(l,g){for(var n=0;n<g.length;n++){var d=g[n];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(l,d.key,d)}}return function(l,g,n){return g&&i(l.prototype,g),n&&i(l,n),l}})();function e(i,l){if(!(i instanceof l))throw new TypeError("Cannot call a class as a function")}var t=(function(){function i(l,g){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;e(this,i),this.sequence1=l,this.sequence2=g,this.match_score=n,this.mismatch_penalty=d,this.gap_penalty=r,this.iMax=l.length+1,this.jMax=g.length+1,this.grid=new Array(this.iMax);for(var h=0;h<this.iMax;h++){this.grid[h]=new Array(this.jMax);for(var a=0;a<this.jMax;a++)this.grid[h][a]=0}this.tracebackGrid=new Array(this.iMax);for(var p=0;p<this.iMax;p++){this.tracebackGrid[p]=new Array(this.jMax);for(var v=0;v<this.jMax;v++)this.tracebackGrid[p][v]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return o(i,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var g=1;g<this.jMax;g++)this.grid[0][g]=this.grid[0][g-1]+this.gap_penalty,this.tracebackGrid[0][g]=[!1,!1,!0];for(var n=1;n<this.iMax;n++)this.grid[n][0]=this.grid[n-1][0]+this.gap_penalty,this.tracebackGrid[n][0]=[!1,!0,!1];for(var d=1;d<this.iMax;d++)for(var r=1;r<this.jMax;r++){var h=void 0;this.sequence1[d-1]===this.sequence2[r-1]?h=this.grid[d-1][r-1]+this.match_score:h=this.grid[d-1][r-1]+this.mismatch_penalty;var a=this.grid[d-1][r]+this.gap_penalty,p=this.grid[d][r-1]+this.gap_penalty,v=[h,a,p],D=this.arrayAllMaxIndexes(v);this.grid[d][r]=v[D[0]],this.tracebackGrid[d][r]=[D.includes(0),D.includes(1),D.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var g=[];for(g.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});g[0];){var n=g[0],d=this.tracebackGrid[n.pos[0]][n.pos[1]];d[0]&&g.push({pos:[n.pos[0]-1,n.pos[1]-1],seq1:this.sequence1[n.pos[0]-1]+n.seq1,seq2:this.sequence2[n.pos[1]-1]+n.seq2}),d[1]&&g.push({pos:[n.pos[0]-1,n.pos[1]],seq1:this.sequence1[n.pos[0]-1]+n.seq1,seq2:"-"+n.seq2}),d[2]&&g.push({pos:[n.pos[0],n.pos[1]-1],seq1:"-"+n.seq1,seq2:this.sequence2[n.pos[1]-1]+n.seq2}),n.pos[0]===0&&n.pos[1]===0&&this.alignments.push({sequence1:n.seq1,sequence2:n.seq2}),g.shift()}return this.alignments}},{key:"getAllIndexes",value:function(g,n){for(var d=[],r=-1;(r=g.indexOf(n,r+1))!==-1;)d.push(r);return d}},{key:"arrayAllMaxIndexes",value:function(g){return this.getAllIndexes(g,Math.max.apply(null,g))}}]),i})();N.exports=t}),(function(N,I,L){var o=function(){};o.FDLayout=L(18),o.FDLayoutConstants=L(7),o.FDLayoutEdge=L(19),o.FDLayoutNode=L(20),o.DimensionD=L(21),o.HashMap=L(22),o.HashSet=L(23),o.IGeometry=L(8),o.IMath=L(9),o.Integer=L(10),o.Point=L(12),o.PointD=L(4),o.RandomSeed=L(16),o.RectangleD=L(13),o.Transform=L(17),o.UniqueIDGeneretor=L(14),o.Quicksort=L(24),o.LinkedList=L(11),o.LGraphObject=L(2),o.LGraph=L(5),o.LEdge=L(1),o.LGraphManager=L(6),o.LNode=L(3),o.Layout=L(15),o.LayoutConstants=L(0),o.NeedlemanWunsch=L(25),N.exports=o}),(function(N,I,L){function o(){this.listeners=[]}var e=o.prototype;e.addListener=function(t,i){this.listeners.push({event:t,callback:i})},e.removeListener=function(t,i){for(var l=this.listeners.length;l>=0;l--){var g=this.listeners[l];g.event===t&&g.callback===i&&this.listeners.splice(l,1)}},e.emit=function(t,i){for(var l=0;l<this.listeners.length;l++){var g=this.listeners[l];t===g.event&&g.callback(i)}},N.exports=o})])})})(Q)),Q.exports}var ct=$.exports,z;function pt(){return z||(z=1,(function(G,b){(function(I,L){G.exports=L(ft())})(ct,function(N){return(function(I){var L={};function o(e){if(L[e])return L[e].exports;var t=L[e]={i:e,l:!1,exports:{}};return I[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}return o.m=I,o.c=L,o.i=function(e){return e},o.d=function(e,t,i){o.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=7)})([(function(I,L){I.exports=N}),(function(I,L,o){var e=o(0).FDLayoutConstants;function t(){}for(var i in e)t[i]=e[i];t.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,t.DEFAULT_RADIAL_SEPARATION=e.DEFAULT_EDGE_LENGTH,t.DEFAULT_COMPONENT_SEPERATION=60,t.TILE=!0,t.TILING_PADDING_VERTICAL=10,t.TILING_PADDING_HORIZONTAL=10,t.TREE_REDUCTION_ON_INCREMENTAL=!1,I.exports=t}),(function(I,L,o){var e=o(0).FDLayoutEdge;function t(l,g,n){e.call(this,l,g,n)}t.prototype=Object.create(e.prototype);for(var i in e)t[i]=e[i];I.exports=t}),(function(I,L,o){var e=o(0).LGraph;function t(l,g,n){e.call(this,l,g,n)}t.prototype=Object.create(e.prototype);for(var i in e)t[i]=e[i];I.exports=t}),(function(I,L,o){var e=o(0).LGraphManager;function t(l){e.call(this,l)}t.prototype=Object.create(e.prototype);for(var i in e)t[i]=e[i];I.exports=t}),(function(I,L,o){var e=o(0).FDLayoutNode,t=o(0).IMath;function i(g,n,d,r){e.call(this,g,n,d,r)}i.prototype=Object.create(e.prototype);for(var l in e)i[l]=e[l];i.prototype.move=function(){var g=this.graphManager.getLayout();this.displacementX=g.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=g.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>g.coolingFactor*g.maxNodeDisplacement&&(this.displacementX=g.coolingFactor*g.maxNodeDisplacement*t.sign(this.displacementX)),Math.abs(this.displacementY)>g.coolingFactor*g.maxNodeDisplacement&&(this.displacementY=g.coolingFactor*g.maxNodeDisplacement*t.sign(this.displacementY)),this.child==null?this.moveBy(this.displacementX,this.displacementY):this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),g.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},i.prototype.propogateDisplacementToChildren=function(g,n){for(var d=this.getChild().getNodes(),r,h=0;h<d.length;h++)r=d[h],r.getChild()==null?(r.moveBy(g,n),r.displacementX+=g,r.displacementY+=n):r.propogateDisplacementToChildren(g,n)},i.prototype.setPred1=function(g){this.pred1=g},i.prototype.getPred1=function(){return pred1},i.prototype.getPred2=function(){return pred2},i.prototype.setNext=function(g){this.next=g},i.prototype.getNext=function(){return next},i.prototype.setProcessed=function(g){this.processed=g},i.prototype.isProcessed=function(){return processed},I.exports=i}),(function(I,L,o){var e=o(0).FDLayout,t=o(4),i=o(3),l=o(5),g=o(2),n=o(1),d=o(0).FDLayoutConstants,r=o(0).LayoutConstants,h=o(0).Point,a=o(0).PointD,p=o(0).Layout,v=o(0).Integer,D=o(0).IGeometry,u=o(0).LGraph,T=o(0).Transform;function y(){e.call(this),this.toBeTiled={}}y.prototype=Object.create(e.prototype);for(var O in e)y[O]=e[O];y.prototype.newGraphManager=function(){var s=new t(this);return this.graphManager=s,s},y.prototype.newGraph=function(s){return new i(null,this.graphManager,s)},y.prototype.newNode=function(s){return new l(this.graphManager,s)},y.prototype.newEdge=function(s){return new g(null,null,s)},y.prototype.initParameters=function(){e.prototype.initParameters.call(this,arguments),this.isSubLayout||(n.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=n.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=n.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=d.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=d.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=d.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=d.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=d.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=d.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/d.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=d.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},y.prototype.layout=function(){var s=r.DEFAULT_CREATE_BENDS_AS_NEEDED;return s&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},y.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(n.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var f=new Set(this.getAllNodes()),c=this.nodesWithGravity.filter(function(m){return f.has(m)});this.graphManager.setAllNodesToApplyGravitation(c)}}else{var s=this.getFlatForest();if(s.length>0)this.positionNodesRadially(s);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var f=new Set(this.getAllNodes()),c=this.nodesWithGravity.filter(function(E){return f.has(E)});this.graphManager.setAllNodesToApplyGravitation(c),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},y.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%d.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var s=new Set(this.getAllNodes()),f=this.nodesWithGravity.filter(function(A){return s.has(A)});this.graphManager.setAllNodesToApplyGravitation(f),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var c=!this.isTreeGrowing&&!this.isGrowthFinished,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(c,E),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},y.prototype.getPositionsData=function(){for(var s=this.graphManager.getAllNodes(),f={},c=0;c<s.length;c++){var E=s[c].rect,A=s[c].id;f[A]={id:A,x:E.getCenterX(),y:E.getCenterY(),w:E.width,h:E.height}}return f},y.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var s=!1;if(d.ANIMATE==="during")this.emit("layoutstarted");else{for(;!s;)s=this.tick();this.graphManager.updateBounds()}},y.prototype.calculateNodesToApplyGravitationTo=function(){var s=[],f,c=this.graphManager.getGraphs(),E=c.length,A;for(A=0;A<E;A++)f=c[A],f.updateConnected(),f.isConnected||(s=s.concat(f.getNodes()));return s},y.prototype.createBendpoints=function(){var s=[];s=s.concat(this.graphManager.getAllEdges());var f=new Set,c;for(c=0;c<s.length;c++){var E=s[c];if(!f.has(E)){var A=E.getSource(),m=E.getTarget();if(A==m)E.getBendpoints().push(new a),E.getBendpoints().push(new a),this.createDummyNodesForBendpoints(E),f.add(E);else{var C=[];if(C=C.concat(A.getEdgeListToNode(m)),C=C.concat(m.getEdgeListToNode(A)),!f.has(C[0])){if(C.length>1){var R;for(R=0;R<C.length;R++){var M=C[R];M.getBendpoints().push(new a),this.createDummyNodesForBendpoints(M)}}C.forEach(function(S){f.add(S)})}}}if(f.size==s.length)break}},y.prototype.positionNodesRadially=function(s){for(var f=new h(0,0),c=Math.ceil(Math.sqrt(s.length)),E=0,A=0,m=0,C=new a(0,0),R=0;R<s.length;R++){R%c==0&&(m=0,A=E,R!=0&&(A+=n.DEFAULT_COMPONENT_SEPERATION),E=0);var M=s[R],S=p.findCenterOfTree(M);f.x=m,f.y=A,C=y.radialLayout(M,S,f),C.y>E&&(E=Math.floor(C.y)),m=Math.floor(C.x+n.DEFAULT_COMPONENT_SEPERATION)}this.transform(new a(r.WORLD_CENTER_X-C.x/2,r.WORLD_CENTER_Y-C.y/2))},y.radialLayout=function(s,f,c){var E=Math.max(this.maxDiagonalInTree(s),n.DEFAULT_RADIAL_SEPARATION);y.branchRadialLayout(f,null,0,359,0,E);var A=u.calculateBounds(s),m=new T;m.setDeviceOrgX(A.getMinX()),m.setDeviceOrgY(A.getMinY()),m.setWorldOrgX(c.x),m.setWorldOrgY(c.y);for(var C=0;C<s.length;C++){var R=s[C];R.transform(m)}var M=new a(A.getMaxX(),A.getMaxY());return m.inverseTransformPoint(M)},y.branchRadialLayout=function(s,f,c,E,A,m){var C=(E-c+1)/2;C<0&&(C+=180);var R=(C+c)%360,M=R*D.TWO_PI/360,S=A*Math.cos(M),Y=A*Math.sin(M);s.setCenter(S,Y);var w=[];w=w.concat(s.getEdges());var x=w.length;f!=null&&x--;for(var F=0,U=w.length,P,_=s.getEdgesBetween(f);_.length>1;){var X=_[0];_.splice(0,1);var H=w.indexOf(X);H>=0&&w.splice(H,1),U--,x--}f!=null?P=(w.indexOf(_[0])+1)%U:P=0;for(var W=Math.abs(E-c)/x,B=P;F!=x;B=++B%U){var K=w[B].getOtherEnd(s);if(K!=f){var q=(c+F*W)%360,ht=(q+W)%360;y.branchRadialLayout(K,s,q,ht,A+m,m),F++}}},y.maxDiagonalInTree=function(s){for(var f=v.MIN_VALUE,c=0;c<s.length;c++){var E=s[c],A=E.getDiagonal();A>f&&(f=A)}return f},y.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},y.prototype.groupZeroDegreeMembers=function(){var s=this,f={};this.memberGroups={},this.idToDummyNode={};for(var c=[],E=this.graphManager.getAllNodes(),A=0;A<E.length;A++){var m=E[A],C=m.getParent();this.getNodeDegreeWithChildren(m)===0&&(C.id==null||!this.getToBeTiled(C))&&c.push(m)}for(var A=0;A<c.length;A++){var m=c[A],R=m.getParent().id;typeof f[R]>"u"&&(f[R]=[]),f[R]=f[R].concat(m)}Object.keys(f).forEach(function(M){if(f[M].length>1){var S="DummyCompound_"+M;s.memberGroups[S]=f[M];var Y=f[M][0].getParent(),w=new l(s.graphManager);w.id=S,w.paddingLeft=Y.paddingLeft||0,w.paddingRight=Y.paddingRight||0,w.paddingBottom=Y.paddingBottom||0,w.paddingTop=Y.paddingTop||0,s.idToDummyNode[S]=w;var x=s.getGraphManager().add(s.newGraph(),w),F=Y.getChild();F.add(w);for(var U=0;U<f[M].length;U++){var P=f[M][U];F.remove(P),x.add(P)}}})},y.prototype.clearCompounds=function(){var s={},f={};this.performDFSOnCompounds();for(var c=0;c<this.compoundOrder.length;c++)f[this.compoundOrder[c].id]=this.compoundOrder[c],s[this.compoundOrder[c].id]=[].concat(this.compoundOrder[c].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[c].getChild()),this.compoundOrder[c].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(s,f)},y.prototype.clearZeroDegreeMembers=function(){var s=this,f=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(c){var E=s.idToDummyNode[c];f[c]=s.tileNodes(s.memberGroups[c],E.paddingLeft+E.paddingRight),E.rect.width=f[c].width,E.rect.height=f[c].height})},y.prototype.repopulateCompounds=function(){for(var s=this.compoundOrder.length-1;s>=0;s--){var f=this.compoundOrder[s],c=f.id,E=f.paddingLeft,A=f.paddingTop;this.adjustLocations(this.tiledMemberPack[c],f.rect.x,f.rect.y,E,A)}},y.prototype.repopulateZeroDegreeMembers=function(){var s=this,f=this.tiledZeroDegreePack;Object.keys(f).forEach(function(c){var E=s.idToDummyNode[c],A=E.paddingLeft,m=E.paddingTop;s.adjustLocations(f[c],E.rect.x,E.rect.y,A,m)})},y.prototype.getToBeTiled=function(s){var f=s.id;if(this.toBeTiled[f]!=null)return this.toBeTiled[f];var c=s.getChild();if(c==null)return this.toBeTiled[f]=!1,!1;for(var E=c.getNodes(),A=0;A<E.length;A++){var m=E[A];if(this.getNodeDegree(m)>0)return this.toBeTiled[f]=!1,!1;if(m.getChild()==null){this.toBeTiled[m.id]=!1;continue}if(!this.getToBeTiled(m))return this.toBeTiled[f]=!1,!1}return this.toBeTiled[f]=!0,!0},y.prototype.getNodeDegree=function(s){s.id;for(var f=s.getEdges(),c=0,E=0;E<f.length;E++){var A=f[E];A.getSource().id!==A.getTarget().id&&(c=c+1)}return c},y.prototype.getNodeDegreeWithChildren=function(s){var f=this.getNodeDegree(s);if(s.getChild()==null)return f;for(var c=s.getChild().getNodes(),E=0;E<c.length;E++){var A=c[E];f+=this.getNodeDegreeWithChildren(A)}return f},y.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},y.prototype.fillCompexOrderByDFS=function(s){for(var f=0;f<s.length;f++){var c=s[f];c.getChild()!=null&&this.fillCompexOrderByDFS(c.getChild().getNodes()),this.getToBeTiled(c)&&this.compoundOrder.push(c)}},y.prototype.adjustLocations=function(s,f,c,E,A){f+=E,c+=A;for(var m=f,C=0;C<s.rows.length;C++){var R=s.rows[C];f=m;for(var M=0,S=0;S<R.length;S++){var Y=R[S];Y.rect.x=f,Y.rect.y=c,f+=Y.rect.width+s.horizontalPadding,Y.rect.height>M&&(M=Y.rect.height)}c+=M+s.verticalPadding}},y.prototype.tileCompoundMembers=function(s,f){var c=this;this.tiledMemberPack=[],Object.keys(s).forEach(function(E){var A=f[E];c.tiledMemberPack[E]=c.tileNodes(s[E],A.paddingLeft+A.paddingRight),A.rect.width=c.tiledMemberPack[E].width,A.rect.height=c.tiledMemberPack[E].height})},y.prototype.tileNodes=function(s,f){var c=n.TILING_PADDING_VERTICAL,E=n.TILING_PADDING_HORIZONTAL,A={rows:[],rowWidth:[],rowHeight:[],width:0,height:f,verticalPadding:c,horizontalPadding:E};s.sort(function(R,M){return R.rect.width*R.rect.height>M.rect.width*M.rect.height?-1:R.rect.width*R.rect.height<M.rect.width*M.rect.height?1:0});for(var m=0;m<s.length;m++){var C=s[m];A.rows.length==0?this.insertNodeToRow(A,C,0,f):this.canAddHorizontal(A,C.rect.width,C.rect.height)?this.insertNodeToRow(A,C,this.getShortestRowIndex(A),f):this.insertNodeToRow(A,C,A.rows.length,f),this.shiftToLastRow(A)}return A},y.prototype.insertNodeToRow=function(s,f,c,E){var A=E;if(c==s.rows.length){var m=[];s.rows.push(m),s.rowWidth.push(A),s.rowHeight.push(0)}var C=s.rowWidth[c]+f.rect.width;s.rows[c].length>0&&(C+=s.horizontalPadding),s.rowWidth[c]=C,s.width<C&&(s.width=C);var R=f.rect.height;c>0&&(R+=s.verticalPadding);var M=0;R>s.rowHeight[c]&&(M=s.rowHeight[c],s.rowHeight[c]=R,M=s.rowHeight[c]-M),s.height+=M,s.rows[c].push(f)},y.prototype.getShortestRowIndex=function(s){for(var f=-1,c=Number.MAX_VALUE,E=0;E<s.rows.length;E++)s.rowWidth[E]<c&&(f=E,c=s.rowWidth[E]);return f},y.prototype.getLongestRowIndex=function(s){for(var f=-1,c=Number.MIN_VALUE,E=0;E<s.rows.length;E++)s.rowWidth[E]>c&&(f=E,c=s.rowWidth[E]);return f},y.prototype.canAddHorizontal=function(s,f,c){var E=this.getShortestRowIndex(s);if(E<0)return!0;var A=s.rowWidth[E];if(A+s.horizontalPadding+f<=s.width)return!0;var m=0;s.rowHeight[E]<c&&E>0&&(m=c+s.verticalPadding-s.rowHeight[E]);var C;s.width-A>=f+s.horizontalPadding?C=(s.height+m)/(A+f+s.horizontalPadding):C=(s.height+m)/s.width,m=c+s.verticalPadding;var R;return s.width<f?R=(s.height+m)/f:R=(s.height+m)/s.width,R<1&&(R=1/R),C<1&&(C=1/C),C<R},y.prototype.shiftToLastRow=function(s){var f=this.getLongestRowIndex(s),c=s.rowWidth.length-1,E=s.rows[f],A=E[E.length-1],m=A.width+s.horizontalPadding;if(s.width-s.rowWidth[c]>m&&f!=c){E.splice(-1,1),s.rows[c].push(A),s.rowWidth[f]=s.rowWidth[f]-m,s.rowWidth[c]=s.rowWidth[c]+m,s.width=s.rowWidth[instance.getLongestRowIndex(s)];for(var C=Number.MIN_VALUE,R=0;R<E.length;R++)E[R].height>C&&(C=E[R].height);f>0&&(C+=s.verticalPadding);var M=s.rowHeight[f]+s.rowHeight[c];s.rowHeight[f]=C,s.rowHeight[c]<A.height+s.verticalPadding&&(s.rowHeight[c]=A.height+s.verticalPadding);var S=s.rowHeight[f]+s.rowHeight[c];s.height+=S-M,this.shiftToLastRow(s)}},y.prototype.tilingPreLayout=function(){n.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},y.prototype.tilingPostLayout=function(){n.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},y.prototype.reduceTrees=function(){for(var s=[],f=!0,c;f;){var E=this.graphManager.getAllNodes(),A=[];f=!1;for(var m=0;m<E.length;m++)c=E[m],c.getEdges().length==1&&!c.getEdges()[0].isInterGraph&&c.getChild()==null&&(A.push([c,c.getEdges()[0],c.getOwner()]),f=!0);if(f==!0){for(var C=[],R=0;R<A.length;R++)A[R][0].getEdges().length==1&&(C.push(A[R]),A[R][0].getOwner().remove(A[R][0]));s.push(C),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=s},y.prototype.growTree=function(s){for(var f=s.length,c=s[f-1],E,A=0;A<c.length;A++)E=c[A],this.findPlaceforPrunedNode(E),E[2].add(E[0]),E[2].add(E[1],E[1].source,E[1].target);s.splice(s.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},y.prototype.findPlaceforPrunedNode=function(s){var f,c,E=s[0];E==s[1].source?c=s[1].target:c=s[1].source;var A=c.startX,m=c.finishX,C=c.startY,R=c.finishY,M=0,S=0,Y=0,w=0,x=[M,Y,S,w];if(C>0)for(var F=A;F<=m;F++)x[0]+=this.grid[F][C-1].length+this.grid[F][C].length-1;if(m<this.grid.length-1)for(var F=C;F<=R;F++)x[1]+=this.grid[m+1][F].length+this.grid[m][F].length-1;if(R<this.grid[0].length-1)for(var F=A;F<=m;F++)x[2]+=this.grid[F][R+1].length+this.grid[F][R].length-1;if(A>0)for(var F=C;F<=R;F++)x[3]+=this.grid[A-1][F].length+this.grid[A][F].length-1;for(var U=v.MAX_VALUE,P,_,X=0;X<x.length;X++)x[X]<U?(U=x[X],P=1,_=X):x[X]==U&&P++;if(P==3&&U==0)x[0]==0&&x[1]==0&&x[2]==0?f=1:x[0]==0&&x[1]==0&&x[3]==0?f=0:x[0]==0&&x[2]==0&&x[3]==0?f=3:x[1]==0&&x[2]==0&&x[3]==0&&(f=2);else if(P==2&&U==0){var H=Math.floor(Math.random()*2);x[0]==0&&x[1]==0?H==0?f=0:f=1:x[0]==0&&x[2]==0?H==0?f=0:f=2:x[0]==0&&x[3]==0?H==0?f=0:f=3:x[1]==0&&x[2]==0?H==0?f=1:f=2:x[1]==0&&x[3]==0?H==0?f=1:f=3:H==0?f=2:f=3}else if(P==4&&U==0){var H=Math.floor(Math.random()*4);f=H}else f=_;f==0?E.setCenter(c.getCenterX(),c.getCenterY()-c.getHeight()/2-d.DEFAULT_EDGE_LENGTH-E.getHeight()/2):f==1?E.setCenter(c.getCenterX()+c.getWidth()/2+d.DEFAULT_EDGE_LENGTH+E.getWidth()/2,c.getCenterY()):f==2?E.setCenter(c.getCenterX(),c.getCenterY()+c.getHeight()/2+d.DEFAULT_EDGE_LENGTH+E.getHeight()/2):E.setCenter(c.getCenterX()-c.getWidth()/2-d.DEFAULT_EDGE_LENGTH-E.getWidth()/2,c.getCenterY())},I.exports=y}),(function(I,L,o){var e={};e.layoutBase=o(0),e.CoSEConstants=o(1),e.CoSEEdge=o(2),e.CoSEGraph=o(3),e.CoSEGraphManager=o(4),e.CoSELayout=o(6),e.CoSENode=o(5),I.exports=e})])})})($)),$.exports}var dt=Z.exports,J;function vt(){return J||(J=1,(function(G,b){(function(I,L){G.exports=L(pt())})(dt,function(N){return(function(I){var L={};function o(e){if(L[e])return L[e].exports;var t=L[e]={i:e,l:!1,exports:{}};return I[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}return o.m=I,o.c=L,o.i=function(e){return e},o.d=function(e,t,i){o.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=1)})([(function(I,L){I.exports=N}),(function(I,L,o){var e=o(0).layoutBase.LayoutConstants,t=o(0).layoutBase.FDLayoutConstants,i=o(0).CoSEConstants,l=o(0).CoSELayout,g=o(0).CoSENode,n=o(0).layoutBase.PointD,d=o(0).layoutBase.DimensionD,r={ready:function(){},stop:function(){},quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function h(D,u){var T={};for(var y in D)T[y]=D[y];for(var y in u)T[y]=u[y];return T}function a(D){this.options=h(r,D),p(this.options)}var p=function(u){u.nodeRepulsion!=null&&(i.DEFAULT_REPULSION_STRENGTH=t.DEFAULT_REPULSION_STRENGTH=u.nodeRepulsion),u.idealEdgeLength!=null&&(i.DEFAULT_EDGE_LENGTH=t.DEFAULT_EDGE_LENGTH=u.idealEdgeLength),u.edgeElasticity!=null&&(i.DEFAULT_SPRING_STRENGTH=t.DEFAULT_SPRING_STRENGTH=u.edgeElasticity),u.nestingFactor!=null&&(i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=u.nestingFactor),u.gravity!=null&&(i.DEFAULT_GRAVITY_STRENGTH=t.DEFAULT_GRAVITY_STRENGTH=u.gravity),u.numIter!=null&&(i.MAX_ITERATIONS=t.MAX_ITERATIONS=u.numIter),u.gravityRange!=null&&(i.DEFAULT_GRAVITY_RANGE_FACTOR=t.DEFAULT_GRAVITY_RANGE_FACTOR=u.gravityRange),u.gravityCompound!=null&&(i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.DEFAULT_COMPOUND_GRAVITY_STRENGTH=u.gravityCompound),u.gravityRangeCompound!=null&&(i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=u.gravityRangeCompound),u.initialEnergyOnIncremental!=null&&(i.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.DEFAULT_COOLING_FACTOR_INCREMENTAL=u.initialEnergyOnIncremental),u.quality=="draft"?e.QUALITY=0:u.quality=="proof"?e.QUALITY=2:e.QUALITY=1,i.NODE_DIMENSIONS_INCLUDE_LABELS=t.NODE_DIMENSIONS_INCLUDE_LABELS=e.NODE_DIMENSIONS_INCLUDE_LABELS=u.nodeDimensionsIncludeLabels,i.DEFAULT_INCREMENTAL=t.DEFAULT_INCREMENTAL=e.DEFAULT_INCREMENTAL=!u.randomize,i.ANIMATE=t.ANIMATE=e.ANIMATE=u.animate,i.TILE=u.tile,i.TILING_PADDING_VERTICAL=typeof u.tilingPaddingVertical=="function"?u.tilingPaddingVertical.call():u.tilingPaddingVertical,i.TILING_PADDING_HORIZONTAL=typeof u.tilingPaddingHorizontal=="function"?u.tilingPaddingHorizontal.call():u.tilingPaddingHorizontal};a.prototype.run=function(){var D,u,T=this.options;this.idToLNode={};var y=this.layout=new l,O=this;O.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var s=y.newGraphManager();this.gm=s;var f=this.options.eles.nodes(),c=this.options.eles.edges();this.root=s.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(f),y);for(var E=0;E<c.length;E++){var A=c[E],m=this.idToLNode[A.data("source")],C=this.idToLNode[A.data("target")];if(m!==C&&m.getEdgesBetween(C).length==0){var R=s.add(y.newEdge(),m,C);R.id=A.id()}}var M=function(w,x){typeof w=="number"&&(w=x);var F=w.data("id"),U=O.idToLNode[F];return{x:U.getRect().getCenterX(),y:U.getRect().getCenterY()}},S=function Y(){for(var w=function(){T.fit&&T.cy.fit(T.eles,T.padding),D||(D=!0,O.cy.one("layoutready",T.ready),O.cy.trigger({type:"layoutready",layout:O}))},x=O.options.refresh,F,U=0;U<x&&!F;U++)F=O.stopped||O.layout.tick();if(F){y.checkLayoutSuccess()&&!y.isSubLayout&&y.doPostLayout(),y.tilingPostLayout&&y.tilingPostLayout(),y.isLayoutFinished=!0,O.options.eles.nodes().positions(M),w(),O.cy.one("layoutstop",O.options.stop),O.cy.trigger({type:"layoutstop",layout:O}),u&&cancelAnimationFrame(u),D=!1;return}var P=O.layout.getPositionsData();T.eles.nodes().positions(function(_,X){if(typeof _=="number"&&(_=X),!_.isParent()){for(var H=_.id(),W=P[H],B=_;W==null&&(W=P[B.data("parent")]||P["DummyCompound_"+B.data("parent")],P[H]=W,B=B.parent()[0],B!=null););return W!=null?{x:W.x,y:W.y}:{x:_.position("x"),y:_.position("y")}}}),w(),u=requestAnimationFrame(Y)};return y.addListener("layoutstarted",function(){O.options.animate==="during"&&(u=requestAnimationFrame(S))}),y.runLayout(),this.options.animate!=="during"&&(O.options.eles.nodes().not(":parent").layoutPositions(O,O.options,M),D=!1),this},a.prototype.getTopMostNodes=function(D){for(var u={},T=0;T<D.length;T++)u[D[T].id()]=!0;var y=D.filter(function(O,s){typeof O=="number"&&(O=s);for(var f=O.parent()[0];f!=null;){if(u[f.id()])return!1;f=f.parent()[0]}return!0});return y},a.prototype.processChildrenList=function(D,u,T){for(var y=u.length,O=0;O<y;O++){var s=u[O],f=s.children(),c,E=s.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if(s.outerWidth()!=null&&s.outerHeight()!=null?c=D.add(new g(T.graphManager,new n(s.position("x")-E.w/2,s.position("y")-E.h/2),new d(parseFloat(E.w),parseFloat(E.h)))):c=D.add(new g(this.graphManager)),c.id=s.data("id"),c.paddingLeft=parseInt(s.css("padding")),c.paddingTop=parseInt(s.css("padding")),c.paddingRight=parseInt(s.css("padding")),c.paddingBottom=parseInt(s.css("padding")),this.options.nodeDimensionsIncludeLabels&&s.isParent()){var A=s.boundingBox({includeLabels:!0,includeNodes:!1}).w,m=s.boundingBox({includeLabels:!0,includeNodes:!1}).h,C=s.css("text-halign");c.labelWidth=A,c.labelHeight=m,c.labelPos=C}if(this.idToLNode[s.data("id")]=c,isNaN(c.rect.x)&&(c.rect.x=0),isNaN(c.rect.y)&&(c.rect.y=0),f!=null&&f.length>0){var R;R=T.getGraphManager().add(T.newGraph(),c),this.processChildrenList(R,f,T)}}},a.prototype.stop=function(){return this.stopped=!0,this};var v=function(u){u("layout","cose-bilkent",a)};typeof cytoscape<"u"&&v(cytoscape),I.exports=v})])})})(Z)),Z.exports}var yt=vt();const Et=gt(yt);tt.use(Et);function et(G,b){G.forEach(N=>{const I={id:N.id,labelText:N.label,height:N.height,width:N.width,padding:N.padding??0};Object.keys(N).forEach(L=>{["id","label","height","width","padding","x","y"].includes(L)||(I[L]=N[L])}),b.add({group:"nodes",data:I,position:{x:N.x??0,y:N.y??0}})})}V(et,"addNodes");function rt(G,b){G.forEach(N=>{const I={id:N.id,source:N.start,target:N.end};Object.keys(N).forEach(L=>{["id","start","end"].includes(L)||(I[L]=N[L])}),b.add({group:"edges",data:I})})}V(rt,"addEdges");function it(G){return new Promise(b=>{const N=lt("body").append("div").attr("id","cy").attr("style","display:none"),I=tt({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});N.remove(),et(G.nodes,I),rt(G.edges,I),I.nodes().forEach(function(o){o.layoutDimensions=()=>{const e=o.data();return{w:e.width,h:e.height}}});const L={name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1};I.layout(L).run(),I.ready(o=>{k.info("Cytoscape ready",o),b(I)})})}V(it,"createCytoscapeInstance");function nt(G){return G.nodes().map(b=>{const N=b.data(),I=b.position(),L={id:N.id,x:I.x,y:I.y};return Object.keys(N).forEach(o=>{o!=="id"&&(L[o]=N[o])}),L})}V(nt,"extractPositionedNodes");function ot(G){return G.edges().map(b=>{const N=b.data(),I=b._private.rscratch,L={id:N.id,source:N.source,target:N.target,startX:I.startX,startY:I.startY,midX:I.midX,midY:I.midY,endX:I.endX,endY:I.endY};return Object.keys(N).forEach(o=>{["id","source","target"].includes(o)||(L[o]=N[o])}),L})}V(ot,"extractPositionedEdges");async function st(G,b){k.debug("Starting cose-bilkent layout algorithm");try{at(G);const N=await it(G),I=nt(N),L=ot(N);return k.debug(`Layout completed: ${I.length} nodes, ${L.length} edges`),{nodes:I,edges:L}}catch(N){throw k.error("Error in cose-bilkent layout algorithm:",N),N}}V(st,"executeCoseBilkentLayout");function at(G){if(!G)throw new Error("Layout data is required");if(!G.config)throw new Error("Configuration is required in layout data");if(!G.rootNode)throw new Error("Root node is required");if(!G.nodes||!Array.isArray(G.nodes))throw new Error("No nodes found in layout data");if(!Array.isArray(G.edges))throw new Error("Edges array is required in layout data");return!0}V(at,"validateLayoutData");var Lt=V(async(G,b,{insertCluster:N,insertEdge:I,insertEdgeLabel:L,insertMarkers:o,insertNode:e,log:t,positionEdgeLabel:i},{algorithm:l})=>{const g={},n={},d=b.select("g");o(d,G.markers,G.type,G.diagramId);const r=d.insert("g").attr("class","subgraphs"),h=d.insert("g").attr("class","edgePaths"),a=d.insert("g").attr("class","edgeLabels"),p=d.insert("g").attr("class","nodes");t.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(G.nodes.map(async u=>{if(u.isGroup){const T={...u};n[u.id]=T,g[u.id]=T,await N(r,u)}else{const T={...u};g[u.id]=T;const y=await e(p,u,{config:G.config,dir:G.direction||"TB"}),O=y.node().getBBox();T.width=O.width,T.height=O.height,T.domId=y,t.debug(`Node ${u.id} dimensions: ${O.width}x${O.height}`)}})),t.debug("Running cose-bilkent layout algorithm");const v={...G,nodes:G.nodes.map(u=>{const T=g[u.id];return{...u,width:T.width,height:T.height}})},D=await st(v,G.config);t.debug("Positioning nodes based on layout results"),D.nodes.forEach(u=>{const T=g[u.id];T?.domId&&(T.domId.attr("transform",`translate(${u.x}, ${u.y})`),T.x=u.x,T.y=u.y,t.debug(`Positioned node ${T.id} at center (${u.x}, ${u.y})`))}),D.edges.forEach(u=>{const T=G.edges.find(y=>y.id===u.id);T&&(T.points=[{x:u.startX,y:u.startY},{x:u.midX,y:u.midY},{x:u.endX,y:u.endY}])}),t.debug("Inserting and positioning edges"),await Promise.all(G.edges.map(async u=>{await L(a,u);const T=g[u.start??""],y=g[u.end??""];if(T&&y){const O=D.edges.find(s=>s.id===u.id);if(O){t.debug("APA01 positionedEdge",O);const s={...u},f=I(h,s,n,G.type,T,y,G.diagramId);i(s,f)}else{const s={...u,points:[{x:T.x||0,y:T.y||0},{x:y.x||0,y:y.y||0}]},f=I(h,s,n,G.type,T,y,G.diagramId);i(s,f)}}})),t.debug("Cose-bilkent rendering completed")},"render"),Nt=Lt;export{Nt as render};
|
|
1
|
+
import{b as V,ay as k,aW as lt}from"./B96uZ9bz.js";import{c as tt}from"./lAmQKSWr.js";import{g as gt}from"./BdWqymET.js";var Z={exports:{}},$={exports:{}},Q={exports:{}},ut=Q.exports,j;function ft(){return j||(j=1,(function(G,b){(function(I,L){G.exports=L()})(ut,function(){return(function(N){var I={};function L(o){if(I[o])return I[o].exports;var e=I[o]={i:o,l:!1,exports:{}};return N[o].call(e.exports,e,e.exports,L),e.l=!0,e.exports}return L.m=N,L.c=I,L.i=function(o){return o},L.d=function(o,e,t){L.o(o,e)||Object.defineProperty(o,e,{configurable:!1,enumerable:!0,get:t})},L.n=function(o){var e=o&&o.__esModule?function(){return o.default}:function(){return o};return L.d(e,"a",e),e},L.o=function(o,e){return Object.prototype.hasOwnProperty.call(o,e)},L.p="",L(L.s=26)})([(function(N,I,L){function o(){}o.QUALITY=1,o.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,o.DEFAULT_INCREMENTAL=!1,o.DEFAULT_ANIMATION_ON_LAYOUT=!0,o.DEFAULT_ANIMATION_DURING_LAYOUT=!1,o.DEFAULT_ANIMATION_PERIOD=50,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,o.DEFAULT_GRAPH_MARGIN=15,o.NODE_DIMENSIONS_INCLUDE_LABELS=!1,o.SIMPLE_NODE_SIZE=40,o.SIMPLE_NODE_HALF_SIZE=o.SIMPLE_NODE_SIZE/2,o.EMPTY_COMPOUND_NODE_SIZE=40,o.MIN_EDGE_LENGTH=1,o.WORLD_BOUNDARY=1e6,o.INITIAL_WORLD_BOUNDARY=o.WORLD_BOUNDARY/1e3,o.WORLD_CENTER_X=1200,o.WORLD_CENTER_Y=900,N.exports=o}),(function(N,I,L){var o=L(2),e=L(8),t=L(9);function i(g,n,d){o.call(this,d),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=d,this.bendpoints=[],this.source=g,this.target=n}i.prototype=Object.create(o.prototype);for(var l in o)i[l]=o[l];i.prototype.getSource=function(){return this.source},i.prototype.getTarget=function(){return this.target},i.prototype.isInterGraph=function(){return this.isInterGraph},i.prototype.getLength=function(){return this.length},i.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},i.prototype.getBendpoints=function(){return this.bendpoints},i.prototype.getLca=function(){return this.lca},i.prototype.getSourceInLca=function(){return this.sourceInLca},i.prototype.getTargetInLca=function(){return this.targetInLca},i.prototype.getOtherEnd=function(g){if(this.source===g)return this.target;if(this.target===g)return this.source;throw"Node is not incident with this edge"},i.prototype.getOtherEndInGraph=function(g,n){for(var d=this.getOtherEnd(g),r=n.getGraphManager().getRoot();;){if(d.getOwner()==n)return d;if(d.getOwner()==r)break;d=d.getOwner().getParent()}return null},i.prototype.updateLength=function(){var g=new Array(4);this.isOverlapingSourceAndTarget=e.getIntersection(this.target.getRect(),this.source.getRect(),g),this.isOverlapingSourceAndTarget||(this.lengthX=g[0]-g[2],this.lengthY=g[1]-g[3],Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},i.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},N.exports=i}),(function(N,I,L){function o(e){this.vGraphObject=e}N.exports=o}),(function(N,I,L){var o=L(2),e=L(10),t=L(13),i=L(0),l=L(16),g=L(4);function n(r,h,a,p){a==null&&p==null&&(p=h),o.call(this,p),r.graphManager!=null&&(r=r.graphManager),this.estimatedSize=e.MIN_VALUE,this.inclusionTreeDepth=e.MAX_VALUE,this.vGraphObject=p,this.edges=[],this.graphManager=r,a!=null&&h!=null?this.rect=new t(h.x,h.y,a.width,a.height):this.rect=new t}n.prototype=Object.create(o.prototype);for(var d in o)n[d]=o[d];n.prototype.getEdges=function(){return this.edges},n.prototype.getChild=function(){return this.child},n.prototype.getOwner=function(){return this.owner},n.prototype.getWidth=function(){return this.rect.width},n.prototype.setWidth=function(r){this.rect.width=r},n.prototype.getHeight=function(){return this.rect.height},n.prototype.setHeight=function(r){this.rect.height=r},n.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},n.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},n.prototype.getCenter=function(){return new g(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},n.prototype.getLocation=function(){return new g(this.rect.x,this.rect.y)},n.prototype.getRect=function(){return this.rect},n.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},n.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},n.prototype.setRect=function(r,h){this.rect.x=r.x,this.rect.y=r.y,this.rect.width=h.width,this.rect.height=h.height},n.prototype.setCenter=function(r,h){this.rect.x=r-this.rect.width/2,this.rect.y=h-this.rect.height/2},n.prototype.setLocation=function(r,h){this.rect.x=r,this.rect.y=h},n.prototype.moveBy=function(r,h){this.rect.x+=r,this.rect.y+=h},n.prototype.getEdgeListToNode=function(r){var h=[],a=this;return a.edges.forEach(function(p){if(p.target==r){if(p.source!=a)throw"Incorrect edge source!";h.push(p)}}),h},n.prototype.getEdgesBetween=function(r){var h=[],a=this;return a.edges.forEach(function(p){if(!(p.source==a||p.target==a))throw"Incorrect edge source and/or target";(p.target==r||p.source==r)&&h.push(p)}),h},n.prototype.getNeighborsList=function(){var r=new Set,h=this;return h.edges.forEach(function(a){if(a.source==h)r.add(a.target);else{if(a.target!=h)throw"Incorrect incidency!";r.add(a.source)}}),r},n.prototype.withChildren=function(){var r=new Set,h,a;if(r.add(this),this.child!=null)for(var p=this.child.getNodes(),v=0;v<p.length;v++)h=p[v],a=h.withChildren(),a.forEach(function(D){r.add(D)});return r},n.prototype.getNoOfChildren=function(){var r=0,h;if(this.child==null)r=1;else for(var a=this.child.getNodes(),p=0;p<a.length;p++)h=a[p],r+=h.getNoOfChildren();return r==0&&(r=1),r},n.prototype.getEstimatedSize=function(){if(this.estimatedSize==e.MIN_VALUE)throw"assert failed";return this.estimatedSize},n.prototype.calcEstimatedSize=function(){return this.child==null?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},n.prototype.scatter=function(){var r,h,a=-i.INITIAL_WORLD_BOUNDARY,p=i.INITIAL_WORLD_BOUNDARY;r=i.WORLD_CENTER_X+l.nextDouble()*(p-a)+a;var v=-i.INITIAL_WORLD_BOUNDARY,D=i.INITIAL_WORLD_BOUNDARY;h=i.WORLD_CENTER_Y+l.nextDouble()*(D-v)+v,this.rect.x=r,this.rect.y=h},n.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var r=this.getChild();if(r.updateBounds(!0),this.rect.x=r.getLeft(),this.rect.y=r.getTop(),this.setWidth(r.getRight()-r.getLeft()),this.setHeight(r.getBottom()-r.getTop()),i.NODE_DIMENSIONS_INCLUDE_LABELS){var h=r.getRight()-r.getLeft(),a=r.getBottom()-r.getTop();this.labelWidth>h&&(this.rect.x-=(this.labelWidth-h)/2,this.setWidth(this.labelWidth)),this.labelHeight>a&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-a)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-a),this.setHeight(this.labelHeight))}}},n.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==e.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},n.prototype.transform=function(r){var h=this.rect.x;h>i.WORLD_BOUNDARY?h=i.WORLD_BOUNDARY:h<-i.WORLD_BOUNDARY&&(h=-i.WORLD_BOUNDARY);var a=this.rect.y;a>i.WORLD_BOUNDARY?a=i.WORLD_BOUNDARY:a<-i.WORLD_BOUNDARY&&(a=-i.WORLD_BOUNDARY);var p=new g(h,a),v=r.inverseTransformPoint(p);this.setLocation(v.x,v.y)},n.prototype.getLeft=function(){return this.rect.x},n.prototype.getRight=function(){return this.rect.x+this.rect.width},n.prototype.getTop=function(){return this.rect.y},n.prototype.getBottom=function(){return this.rect.y+this.rect.height},n.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},N.exports=n}),(function(N,I,L){function o(e,t){e==null&&t==null?(this.x=0,this.y=0):(this.x=e,this.y=t)}o.prototype.getX=function(){return this.x},o.prototype.getY=function(){return this.y},o.prototype.setX=function(e){this.x=e},o.prototype.setY=function(e){this.y=e},o.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},o.prototype.getCopy=function(){return new o(this.x,this.y)},o.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},N.exports=o}),(function(N,I,L){var o=L(2),e=L(10),t=L(0),i=L(6),l=L(3),g=L(1),n=L(13),d=L(12),r=L(11);function h(p,v,D){o.call(this,D),this.estimatedSize=e.MIN_VALUE,this.margin=t.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=p,v!=null&&v instanceof i?this.graphManager=v:v!=null&&v instanceof Layout&&(this.graphManager=v.graphManager)}h.prototype=Object.create(o.prototype);for(var a in o)h[a]=o[a];h.prototype.getNodes=function(){return this.nodes},h.prototype.getEdges=function(){return this.edges},h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getParent=function(){return this.parent},h.prototype.getLeft=function(){return this.left},h.prototype.getRight=function(){return this.right},h.prototype.getTop=function(){return this.top},h.prototype.getBottom=function(){return this.bottom},h.prototype.isConnected=function(){return this.isConnected},h.prototype.add=function(p,v,D){if(v==null&&D==null){var u=p;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(u)>-1)throw"Node already in graph!";return u.owner=this,this.getNodes().push(u),u}else{var T=p;if(!(this.getNodes().indexOf(v)>-1&&this.getNodes().indexOf(D)>-1))throw"Source or target not in graph!";if(!(v.owner==D.owner&&v.owner==this))throw"Both owners must be this graph!";return v.owner!=D.owner?null:(T.source=v,T.target=D,T.isInterGraph=!1,this.getEdges().push(T),v.edges.push(T),D!=v&&D.edges.push(T),T)}},h.prototype.remove=function(p){var v=p;if(p instanceof l){if(v==null)throw"Node is null!";if(!(v.owner!=null&&v.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var D=v.edges.slice(),u,T=D.length,y=0;y<T;y++)u=D[y],u.isInterGraph?this.graphManager.remove(u):u.source.owner.remove(u);var O=this.nodes.indexOf(v);if(O==-1)throw"Node not in owner node list!";this.nodes.splice(O,1)}else if(p instanceof g){var u=p;if(u==null)throw"Edge is null!";if(!(u.source!=null&&u.target!=null))throw"Source and/or target is null!";if(!(u.source.owner!=null&&u.target.owner!=null&&u.source.owner==this&&u.target.owner==this))throw"Source and/or target owner is invalid!";var s=u.source.edges.indexOf(u),f=u.target.edges.indexOf(u);if(!(s>-1&&f>-1))throw"Source and/or target doesn't know this edge!";u.source.edges.splice(s,1),u.target!=u.source&&u.target.edges.splice(f,1);var O=u.source.owner.getEdges().indexOf(u);if(O==-1)throw"Not in owner's edge list!";u.source.owner.getEdges().splice(O,1)}},h.prototype.updateLeftTop=function(){for(var p=e.MAX_VALUE,v=e.MAX_VALUE,D,u,T,y=this.getNodes(),O=y.length,s=0;s<O;s++){var f=y[s];D=f.getTop(),u=f.getLeft(),p>D&&(p=D),v>u&&(v=u)}return p==e.MAX_VALUE?null:(y[0].getParent().paddingLeft!=null?T=y[0].getParent().paddingLeft:T=this.margin,this.left=v-T,this.top=p-T,new d(this.left,this.top))},h.prototype.updateBounds=function(p){for(var v=e.MAX_VALUE,D=-e.MAX_VALUE,u=e.MAX_VALUE,T=-e.MAX_VALUE,y,O,s,f,c,E=this.nodes,A=E.length,m=0;m<A;m++){var C=E[m];p&&C.child!=null&&C.updateBounds(),y=C.getLeft(),O=C.getRight(),s=C.getTop(),f=C.getBottom(),v>y&&(v=y),D<O&&(D=O),u>s&&(u=s),T<f&&(T=f)}var R=new n(v,u,D-v,T-u);v==e.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),E[0].getParent().paddingLeft!=null?c=E[0].getParent().paddingLeft:c=this.margin,this.left=R.x-c,this.right=R.x+R.width+c,this.top=R.y-c,this.bottom=R.y+R.height+c},h.calculateBounds=function(p){for(var v=e.MAX_VALUE,D=-e.MAX_VALUE,u=e.MAX_VALUE,T=-e.MAX_VALUE,y,O,s,f,c=p.length,E=0;E<c;E++){var A=p[E];y=A.getLeft(),O=A.getRight(),s=A.getTop(),f=A.getBottom(),v>y&&(v=y),D<O&&(D=O),u>s&&(u=s),T<f&&(T=f)}var m=new n(v,u,D-v,T-u);return m},h.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},h.prototype.getEstimatedSize=function(){if(this.estimatedSize==e.MIN_VALUE)throw"assert failed";return this.estimatedSize},h.prototype.calcEstimatedSize=function(){for(var p=0,v=this.nodes,D=v.length,u=0;u<D;u++){var T=v[u];p+=T.calcEstimatedSize()}return p==0?this.estimatedSize=t.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=p/Math.sqrt(this.nodes.length),this.estimatedSize},h.prototype.updateConnected=function(){var p=this;if(this.nodes.length==0){this.isConnected=!0;return}var v=new r,D=new Set,u=this.nodes[0],T,y,O=u.withChildren();for(O.forEach(function(m){v.push(m),D.add(m)});v.length!==0;){u=v.shift(),T=u.getEdges();for(var s=T.length,f=0;f<s;f++){var c=T[f];if(y=c.getOtherEndInGraph(u,this),y!=null&&!D.has(y)){var E=y.withChildren();E.forEach(function(m){v.push(m),D.add(m)})}}}if(this.isConnected=!1,D.size>=this.nodes.length){var A=0;D.forEach(function(m){m.owner==p&&A++}),A==this.nodes.length&&(this.isConnected=!0)}},N.exports=h}),(function(N,I,L){var o,e=L(1);function t(i){o=L(5),this.layout=i,this.graphs=[],this.edges=[]}t.prototype.addRoot=function(){var i=this.layout.newGraph(),l=this.layout.newNode(null),g=this.add(i,l);return this.setRootGraph(g),this.rootGraph},t.prototype.add=function(i,l,g,n,d){if(g==null&&n==null&&d==null){if(i==null)throw"Graph is null!";if(l==null)throw"Parent node is null!";if(this.graphs.indexOf(i)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(i),i.parent!=null)throw"Already has a parent!";if(l.child!=null)throw"Already has a child!";return i.parent=l,l.child=i,i}else{d=g,n=l,g=i;var r=n.getOwner(),h=d.getOwner();if(!(r!=null&&r.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(h!=null&&h.getGraphManager()==this))throw"Target not in this graph mgr!";if(r==h)return g.isInterGraph=!1,r.add(g,n,d);if(g.isInterGraph=!0,g.source=n,g.target=d,this.edges.indexOf(g)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(g),!(g.source!=null&&g.target!=null))throw"Edge source and/or target is null!";if(!(g.source.edges.indexOf(g)==-1&&g.target.edges.indexOf(g)==-1))throw"Edge already in source and/or target incidency list!";return g.source.edges.push(g),g.target.edges.push(g),g}},t.prototype.remove=function(i){if(i instanceof o){var l=i;if(l.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(l==this.rootGraph||l.parent!=null&&l.parent.graphManager==this))throw"Invalid parent node!";var g=[];g=g.concat(l.getEdges());for(var n,d=g.length,r=0;r<d;r++)n=g[r],l.remove(n);var h=[];h=h.concat(l.getNodes());var a;d=h.length;for(var r=0;r<d;r++)a=h[r],l.remove(a);l==this.rootGraph&&this.setRootGraph(null);var p=this.graphs.indexOf(l);this.graphs.splice(p,1),l.parent=null}else if(i instanceof e){if(n=i,n==null)throw"Edge is null!";if(!n.isInterGraph)throw"Not an inter-graph edge!";if(!(n.source!=null&&n.target!=null))throw"Source and/or target is null!";if(!(n.source.edges.indexOf(n)!=-1&&n.target.edges.indexOf(n)!=-1))throw"Source and/or target doesn't know this edge!";var p=n.source.edges.indexOf(n);if(n.source.edges.splice(p,1),p=n.target.edges.indexOf(n),n.target.edges.splice(p,1),!(n.source.owner!=null&&n.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(n.source.owner.getGraphManager().edges.indexOf(n)==-1)throw"Not in owner graph manager's edge list!";var p=n.source.owner.getGraphManager().edges.indexOf(n);n.source.owner.getGraphManager().edges.splice(p,1)}},t.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},t.prototype.getGraphs=function(){return this.graphs},t.prototype.getAllNodes=function(){if(this.allNodes==null){for(var i=[],l=this.getGraphs(),g=l.length,n=0;n<g;n++)i=i.concat(l[n].getNodes());this.allNodes=i}return this.allNodes},t.prototype.resetAllNodes=function(){this.allNodes=null},t.prototype.resetAllEdges=function(){this.allEdges=null},t.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},t.prototype.getAllEdges=function(){if(this.allEdges==null){var i=[],l=this.getGraphs();l.length;for(var g=0;g<l.length;g++)i=i.concat(l[g].getEdges());i=i.concat(this.edges),this.allEdges=i}return this.allEdges},t.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},t.prototype.setAllNodesToApplyGravitation=function(i){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=i},t.prototype.getRoot=function(){return this.rootGraph},t.prototype.setRootGraph=function(i){if(i.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=i,i.parent==null&&(i.parent=this.layout.newNode("Root node"))},t.prototype.getLayout=function(){return this.layout},t.prototype.isOneAncestorOfOther=function(i,l){if(!(i!=null&&l!=null))throw"assert failed";if(i==l)return!0;var g=i.getOwner(),n;do{if(n=g.getParent(),n==null)break;if(n==l)return!0;if(g=n.getOwner(),g==null)break}while(!0);g=l.getOwner();do{if(n=g.getParent(),n==null)break;if(n==i)return!0;if(g=n.getOwner(),g==null)break}while(!0);return!1},t.prototype.calcLowestCommonAncestors=function(){for(var i,l,g,n,d,r=this.getAllEdges(),h=r.length,a=0;a<h;a++){if(i=r[a],l=i.source,g=i.target,i.lca=null,i.sourceInLca=l,i.targetInLca=g,l==g){i.lca=l.getOwner();continue}for(n=l.getOwner();i.lca==null;){for(i.targetInLca=g,d=g.getOwner();i.lca==null;){if(d==n){i.lca=d;break}if(d==this.rootGraph)break;if(i.lca!=null)throw"assert failed";i.targetInLca=d.getParent(),d=i.targetInLca.getOwner()}if(n==this.rootGraph)break;i.lca==null&&(i.sourceInLca=n.getParent(),n=i.sourceInLca.getOwner())}if(i.lca==null)throw"assert failed"}},t.prototype.calcLowestCommonAncestor=function(i,l){if(i==l)return i.getOwner();var g=i.getOwner();do{if(g==null)break;var n=l.getOwner();do{if(n==null)break;if(n==g)return n;n=n.getParent().getOwner()}while(!0);g=g.getParent().getOwner()}while(!0);return g},t.prototype.calcInclusionTreeDepths=function(i,l){i==null&&l==null&&(i=this.rootGraph,l=1);for(var g,n=i.getNodes(),d=n.length,r=0;r<d;r++)g=n[r],g.inclusionTreeDepth=l,g.child!=null&&this.calcInclusionTreeDepths(g.child,l+1)},t.prototype.includesInvalidEdge=function(){for(var i,l=this.edges.length,g=0;g<l;g++)if(i=this.edges[g],this.isOneAncestorOfOther(i.source,i.target))return!0;return!1},N.exports=t}),(function(N,I,L){var o=L(0);function e(){}for(var t in o)e[t]=o[t];e.MAX_ITERATIONS=2500,e.DEFAULT_EDGE_LENGTH=50,e.DEFAULT_SPRING_STRENGTH=.45,e.DEFAULT_REPULSION_STRENGTH=4500,e.DEFAULT_GRAVITY_STRENGTH=.4,e.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,e.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,e.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,e.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,e.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,e.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,e.COOLING_ADAPTATION_FACTOR=.33,e.ADAPTATION_LOWER_NODE_LIMIT=1e3,e.ADAPTATION_UPPER_NODE_LIMIT=5e3,e.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,e.MAX_NODE_DISPLACEMENT=e.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,e.MIN_REPULSION_DIST=e.DEFAULT_EDGE_LENGTH/10,e.CONVERGENCE_CHECK_PERIOD=100,e.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,e.MIN_EDGE_LENGTH=1,e.GRID_CALCULATION_CHECK_PERIOD=10,N.exports=e}),(function(N,I,L){var o=L(12);function e(){}e.calcSeparationAmount=function(t,i,l,g){if(!t.intersects(i))throw"assert failed";var n=new Array(2);this.decideDirectionsForOverlappingNodes(t,i,n),l[0]=Math.min(t.getRight(),i.getRight())-Math.max(t.x,i.x),l[1]=Math.min(t.getBottom(),i.getBottom())-Math.max(t.y,i.y),t.getX()<=i.getX()&&t.getRight()>=i.getRight()?l[0]+=Math.min(i.getX()-t.getX(),t.getRight()-i.getRight()):i.getX()<=t.getX()&&i.getRight()>=t.getRight()&&(l[0]+=Math.min(t.getX()-i.getX(),i.getRight()-t.getRight())),t.getY()<=i.getY()&&t.getBottom()>=i.getBottom()?l[1]+=Math.min(i.getY()-t.getY(),t.getBottom()-i.getBottom()):i.getY()<=t.getY()&&i.getBottom()>=t.getBottom()&&(l[1]+=Math.min(t.getY()-i.getY(),i.getBottom()-t.getBottom()));var d=Math.abs((i.getCenterY()-t.getCenterY())/(i.getCenterX()-t.getCenterX()));i.getCenterY()===t.getCenterY()&&i.getCenterX()===t.getCenterX()&&(d=1);var r=d*l[0],h=l[1]/d;l[0]<h?h=l[0]:r=l[1],l[0]=-1*n[0]*(h/2+g),l[1]=-1*n[1]*(r/2+g)},e.decideDirectionsForOverlappingNodes=function(t,i,l){t.getCenterX()<i.getCenterX()?l[0]=-1:l[0]=1,t.getCenterY()<i.getCenterY()?l[1]=-1:l[1]=1},e.getIntersection2=function(t,i,l){var g=t.getCenterX(),n=t.getCenterY(),d=i.getCenterX(),r=i.getCenterY();if(t.intersects(i))return l[0]=g,l[1]=n,l[2]=d,l[3]=r,!0;var h=t.getX(),a=t.getY(),p=t.getRight(),v=t.getX(),D=t.getBottom(),u=t.getRight(),T=t.getWidthHalf(),y=t.getHeightHalf(),O=i.getX(),s=i.getY(),f=i.getRight(),c=i.getX(),E=i.getBottom(),A=i.getRight(),m=i.getWidthHalf(),C=i.getHeightHalf(),R=!1,M=!1;if(g===d){if(n>r)return l[0]=g,l[1]=a,l[2]=d,l[3]=E,!1;if(n<r)return l[0]=g,l[1]=D,l[2]=d,l[3]=s,!1}else if(n===r){if(g>d)return l[0]=h,l[1]=n,l[2]=f,l[3]=r,!1;if(g<d)return l[0]=p,l[1]=n,l[2]=O,l[3]=r,!1}else{var S=t.height/t.width,Y=i.height/i.width,w=(r-n)/(d-g),x=void 0,F=void 0,U=void 0,P=void 0,_=void 0,X=void 0;if(-S===w?g>d?(l[0]=v,l[1]=D,R=!0):(l[0]=p,l[1]=a,R=!0):S===w&&(g>d?(l[0]=h,l[1]=a,R=!0):(l[0]=u,l[1]=D,R=!0)),-Y===w?d>g?(l[2]=c,l[3]=E,M=!0):(l[2]=f,l[3]=s,M=!0):Y===w&&(d>g?(l[2]=O,l[3]=s,M=!0):(l[2]=A,l[3]=E,M=!0)),R&&M)return!1;if(g>d?n>r?(x=this.getCardinalDirection(S,w,4),F=this.getCardinalDirection(Y,w,2)):(x=this.getCardinalDirection(-S,w,3),F=this.getCardinalDirection(-Y,w,1)):n>r?(x=this.getCardinalDirection(-S,w,1),F=this.getCardinalDirection(-Y,w,3)):(x=this.getCardinalDirection(S,w,2),F=this.getCardinalDirection(Y,w,4)),!R)switch(x){case 1:P=a,U=g+-y/w,l[0]=U,l[1]=P;break;case 2:U=u,P=n+T*w,l[0]=U,l[1]=P;break;case 3:P=D,U=g+y/w,l[0]=U,l[1]=P;break;case 4:U=v,P=n+-T*w,l[0]=U,l[1]=P;break}if(!M)switch(F){case 1:X=s,_=d+-C/w,l[2]=_,l[3]=X;break;case 2:_=A,X=r+m*w,l[2]=_,l[3]=X;break;case 3:X=E,_=d+C/w,l[2]=_,l[3]=X;break;case 4:_=c,X=r+-m*w,l[2]=_,l[3]=X;break}}return!1},e.getCardinalDirection=function(t,i,l){return t>i?l:1+l%4},e.getIntersection=function(t,i,l,g){if(g==null)return this.getIntersection2(t,i,l);var n=t.x,d=t.y,r=i.x,h=i.y,a=l.x,p=l.y,v=g.x,D=g.y,u=void 0,T=void 0,y=void 0,O=void 0,s=void 0,f=void 0,c=void 0,E=void 0,A=void 0;return y=h-d,s=n-r,c=r*d-n*h,O=D-p,f=a-v,E=v*p-a*D,A=y*f-O*s,A===0?null:(u=(s*E-f*c)/A,T=(O*c-y*E)/A,new o(u,T))},e.angleOfVector=function(t,i,l,g){var n=void 0;return t!==l?(n=Math.atan((g-i)/(l-t)),l<t?n+=Math.PI:g<i&&(n+=this.TWO_PI)):g<i?n=this.ONE_AND_HALF_PI:n=this.HALF_PI,n},e.doIntersect=function(t,i,l,g){var n=t.x,d=t.y,r=i.x,h=i.y,a=l.x,p=l.y,v=g.x,D=g.y,u=(r-n)*(D-p)-(v-a)*(h-d);if(u===0)return!1;var T=((D-p)*(v-n)+(a-v)*(D-d))/u,y=((d-h)*(v-n)+(r-n)*(D-d))/u;return 0<T&&T<1&&0<y&&y<1},e.HALF_PI=.5*Math.PI,e.ONE_AND_HALF_PI=1.5*Math.PI,e.TWO_PI=2*Math.PI,e.THREE_PI=3*Math.PI,N.exports=e}),(function(N,I,L){function o(){}o.sign=function(e){return e>0?1:e<0?-1:0},o.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},o.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},N.exports=o}),(function(N,I,L){function o(){}o.MAX_VALUE=2147483647,o.MIN_VALUE=-2147483648,N.exports=o}),(function(N,I,L){var o=(function(){function n(d,r){for(var h=0;h<r.length;h++){var a=r[h];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(d,a.key,a)}}return function(d,r,h){return r&&n(d.prototype,r),h&&n(d,h),d}})();function e(n,d){if(!(n instanceof d))throw new TypeError("Cannot call a class as a function")}var t=function(d){return{value:d,next:null,prev:null}},i=function(d,r,h,a){return d!==null?d.next=r:a.head=r,h!==null?h.prev=r:a.tail=r,r.prev=d,r.next=h,a.length++,r},l=function(d,r){var h=d.prev,a=d.next;return h!==null?h.next=a:r.head=a,a!==null?a.prev=h:r.tail=h,d.prev=d.next=null,r.length--,d},g=(function(){function n(d){var r=this;e(this,n),this.length=0,this.head=null,this.tail=null,d?.forEach(function(h){return r.push(h)})}return o(n,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(r,h){return i(h.prev,t(r),h,this)}},{key:"insertAfter",value:function(r,h){return i(h,t(r),h.next,this)}},{key:"insertNodeBefore",value:function(r,h){return i(h.prev,r,h,this)}},{key:"insertNodeAfter",value:function(r,h){return i(h,r,h.next,this)}},{key:"push",value:function(r){return i(this.tail,t(r),null,this)}},{key:"unshift",value:function(r){return i(null,t(r),this.head,this)}},{key:"remove",value:function(r){return l(r,this)}},{key:"pop",value:function(){return l(this.tail,this).value}},{key:"popNode",value:function(){return l(this.tail,this)}},{key:"shift",value:function(){return l(this.head,this).value}},{key:"shiftNode",value:function(){return l(this.head,this)}},{key:"get_object_at",value:function(r){if(r<=this.length()){for(var h=1,a=this.head;h<r;)a=a.next,h++;return a.value}}},{key:"set_object_at",value:function(r,h){if(r<=this.length()){for(var a=1,p=this.head;a<r;)p=p.next,a++;p.value=h}}}]),n})();N.exports=g}),(function(N,I,L){function o(e,t,i){this.x=null,this.y=null,e==null&&t==null&&i==null?(this.x=0,this.y=0):typeof e=="number"&&typeof t=="number"&&i==null?(this.x=e,this.y=t):e.constructor.name=="Point"&&t==null&&i==null&&(i=e,this.x=i.x,this.y=i.y)}o.prototype.getX=function(){return this.x},o.prototype.getY=function(){return this.y},o.prototype.getLocation=function(){return new o(this.x,this.y)},o.prototype.setLocation=function(e,t,i){e.constructor.name=="Point"&&t==null&&i==null?(i=e,this.setLocation(i.x,i.y)):typeof e=="number"&&typeof t=="number"&&i==null&&(parseInt(e)==e&&parseInt(t)==t?this.move(e,t):(this.x=Math.floor(e+.5),this.y=Math.floor(t+.5)))},o.prototype.move=function(e,t){this.x=e,this.y=t},o.prototype.translate=function(e,t){this.x+=e,this.y+=t},o.prototype.equals=function(e){if(e.constructor.name=="Point"){var t=e;return this.x==t.x&&this.y==t.y}return this==e},o.prototype.toString=function(){return new o().constructor.name+"[x="+this.x+",y="+this.y+"]"},N.exports=o}),(function(N,I,L){function o(e,t,i,l){this.x=0,this.y=0,this.width=0,this.height=0,e!=null&&t!=null&&i!=null&&l!=null&&(this.x=e,this.y=t,this.width=i,this.height=l)}o.prototype.getX=function(){return this.x},o.prototype.setX=function(e){this.x=e},o.prototype.getY=function(){return this.y},o.prototype.setY=function(e){this.y=e},o.prototype.getWidth=function(){return this.width},o.prototype.setWidth=function(e){this.width=e},o.prototype.getHeight=function(){return this.height},o.prototype.setHeight=function(e){this.height=e},o.prototype.getRight=function(){return this.x+this.width},o.prototype.getBottom=function(){return this.y+this.height},o.prototype.intersects=function(e){return!(this.getRight()<e.x||this.getBottom()<e.y||e.getRight()<this.x||e.getBottom()<this.y)},o.prototype.getCenterX=function(){return this.x+this.width/2},o.prototype.getMinX=function(){return this.getX()},o.prototype.getMaxX=function(){return this.getX()+this.width},o.prototype.getCenterY=function(){return this.y+this.height/2},o.prototype.getMinY=function(){return this.getY()},o.prototype.getMaxY=function(){return this.getY()+this.height},o.prototype.getWidthHalf=function(){return this.width/2},o.prototype.getHeightHalf=function(){return this.height/2},N.exports=o}),(function(N,I,L){var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function e(){}e.lastID=0,e.createID=function(t){return e.isPrimitive(t)?t:(t.uniqueID!=null||(t.uniqueID=e.getString(),e.lastID++),t.uniqueID)},e.getString=function(t){return t==null&&(t=e.lastID),"Object#"+t},e.isPrimitive=function(t){var i=typeof t>"u"?"undefined":o(t);return t==null||i!="object"&&i!="function"},N.exports=e}),(function(N,I,L){function o(a){if(Array.isArray(a)){for(var p=0,v=Array(a.length);p<a.length;p++)v[p]=a[p];return v}else return Array.from(a)}var e=L(0),t=L(6),i=L(3),l=L(1),g=L(5),n=L(4),d=L(17),r=L(27);function h(a){r.call(this),this.layoutQuality=e.QUALITY,this.createBendsAsNeeded=e.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=e.DEFAULT_INCREMENTAL,this.animationOnLayout=e.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=e.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=e.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=e.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new t(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,a!=null&&(this.isRemoteUse=a)}h.RANDOM_SEED=1,h.prototype=Object.create(r.prototype),h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},h.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},h.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},h.prototype.newGraphManager=function(){var a=new t(this);return this.graphManager=a,a},h.prototype.newGraph=function(a){return new g(null,this.graphManager,a)},h.prototype.newNode=function(a){return new i(this.graphManager,a)},h.prototype.newEdge=function(a){return new l(null,null,a)},h.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},h.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var a;return this.checkLayoutSuccess()?a=!1:a=this.layout(),e.ANIMATE==="during"?!1:(a&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,a)},h.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},h.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var a=this.graphManager.getAllEdges(),p=0;p<a.length;p++)a[p];for(var v=this.graphManager.getRoot().getNodes(),p=0;p<v.length;p++)v[p];this.update(this.graphManager.getRoot())}},h.prototype.update=function(a){if(a==null)this.update2();else if(a instanceof i){var p=a;if(p.getChild()!=null)for(var v=p.getChild().getNodes(),D=0;D<v.length;D++)update(v[D]);if(p.vGraphObject!=null){var u=p.vGraphObject;u.update(p)}}else if(a instanceof l){var T=a;if(T.vGraphObject!=null){var y=T.vGraphObject;y.update(T)}}else if(a instanceof g){var O=a;if(O.vGraphObject!=null){var s=O.vGraphObject;s.update(O)}}},h.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=e.QUALITY,this.animationDuringLayout=e.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=e.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=e.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=e.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=e.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=e.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},h.prototype.transform=function(a){if(a==null)this.transform(new n(0,0));else{var p=new d,v=this.graphManager.getRoot().updateLeftTop();if(v!=null){p.setWorldOrgX(a.x),p.setWorldOrgY(a.y),p.setDeviceOrgX(v.x),p.setDeviceOrgY(v.y);for(var D=this.getAllNodes(),u,T=0;T<D.length;T++)u=D[T],u.transform(p)}}},h.prototype.positionNodesRandomly=function(a){if(a==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var p,v,D=a.getNodes(),u=0;u<D.length;u++)p=D[u],v=p.getChild(),v==null||v.getNodes().length==0?p.scatter():(this.positionNodesRandomly(v),p.updateBounds())},h.prototype.getFlatForest=function(){for(var a=[],p=!0,v=this.graphManager.getRoot().getNodes(),D=!0,u=0;u<v.length;u++)v[u].getChild()!=null&&(D=!1);if(!D)return a;var T=new Set,y=[],O=new Map,s=[];for(s=s.concat(v);s.length>0&&p;){for(y.push(s[0]);y.length>0&&p;){var f=y[0];y.splice(0,1),T.add(f);for(var c=f.getEdges(),u=0;u<c.length;u++){var E=c[u].getOtherEnd(f);if(O.get(f)!=E)if(!T.has(E))y.push(E),O.set(E,f);else{p=!1;break}}}if(!p)a=[];else{var A=[].concat(o(T));a.push(A);for(var u=0;u<A.length;u++){var m=A[u],C=s.indexOf(m);C>-1&&s.splice(C,1)}T=new Set,O=new Map}}return a},h.prototype.createDummyNodesForBendpoints=function(a){for(var p=[],v=a.source,D=this.graphManager.calcLowestCommonAncestor(a.source,a.target),u=0;u<a.bendpoints.length;u++){var T=this.newNode(null);T.setRect(new Point(0,0),new Dimension(1,1)),D.add(T);var y=this.newEdge(null);this.graphManager.add(y,v,T),p.add(T),v=T}var y=this.newEdge(null);return this.graphManager.add(y,v,a.target),this.edgeToDummyNodes.set(a,p),a.isInterGraph()?this.graphManager.remove(a):D.remove(a),p},h.prototype.createBendpointsFromDummyNodes=function(){var a=[];a=a.concat(this.graphManager.getAllEdges()),a=[].concat(o(this.edgeToDummyNodes.keys())).concat(a);for(var p=0;p<a.length;p++){var v=a[p];if(v.bendpoints.length>0){for(var D=this.edgeToDummyNodes.get(v),u=0;u<D.length;u++){var T=D[u],y=new n(T.getCenterX(),T.getCenterY()),O=v.bendpoints.get(u);O.x=y.x,O.y=y.y,T.getOwner().remove(T)}this.graphManager.add(v,v.source,v.target)}}},h.transform=function(a,p,v,D){if(v!=null&&D!=null){var u=p;if(a<=50){var T=p/v;u-=(p-T)/50*(50-a)}else{var y=p*D;u+=(y-p)/50*(a-50)}return u}else{var O,s;return a<=50?(O=9*p/500,s=p/10):(O=9*p/50,s=-8*p),O*a+s}},h.findCenterOfTree=function(a){var p=[];p=p.concat(a);var v=[],D=new Map,u=!1,T=null;(p.length==1||p.length==2)&&(u=!0,T=p[0]);for(var y=0;y<p.length;y++){var O=p[y],s=O.getNeighborsList().size;D.set(O,O.getNeighborsList().size),s==1&&v.push(O)}var f=[];for(f=f.concat(v);!u;){var c=[];c=c.concat(f),f=[];for(var y=0;y<p.length;y++){var O=p[y],E=p.indexOf(O);E>=0&&p.splice(E,1);var A=O.getNeighborsList();A.forEach(function(R){if(v.indexOf(R)<0){var M=D.get(R),S=M-1;S==1&&f.push(R),D.set(R,S)}})}v=v.concat(f),(p.length==1||p.length==2)&&(u=!0,T=p[0])}return T},h.prototype.setGraphManager=function(a){this.graphManager=a},N.exports=h}),(function(N,I,L){function o(){}o.seed=1,o.x=0,o.nextDouble=function(){return o.x=Math.sin(o.seed++)*1e4,o.x-Math.floor(o.x)},N.exports=o}),(function(N,I,L){var o=L(4);function e(t,i){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}e.prototype.getWorldOrgX=function(){return this.lworldOrgX},e.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},e.prototype.getWorldOrgY=function(){return this.lworldOrgY},e.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},e.prototype.getWorldExtX=function(){return this.lworldExtX},e.prototype.setWorldExtX=function(t){this.lworldExtX=t},e.prototype.getWorldExtY=function(){return this.lworldExtY},e.prototype.setWorldExtY=function(t){this.lworldExtY=t},e.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},e.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},e.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},e.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},e.prototype.getDeviceExtX=function(){return this.ldeviceExtX},e.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},e.prototype.getDeviceExtY=function(){return this.ldeviceExtY},e.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},e.prototype.transformX=function(t){var i=0,l=this.lworldExtX;return l!=0&&(i=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/l),i},e.prototype.transformY=function(t){var i=0,l=this.lworldExtY;return l!=0&&(i=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/l),i},e.prototype.inverseTransformX=function(t){var i=0,l=this.ldeviceExtX;return l!=0&&(i=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/l),i},e.prototype.inverseTransformY=function(t){var i=0,l=this.ldeviceExtY;return l!=0&&(i=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/l),i},e.prototype.inverseTransformPoint=function(t){var i=new o(this.inverseTransformX(t.x),this.inverseTransformY(t.y));return i},N.exports=e}),(function(N,I,L){function o(r){if(Array.isArray(r)){for(var h=0,a=Array(r.length);h<r.length;h++)a[h]=r[h];return a}else return Array.from(r)}var e=L(15),t=L(7),i=L(0),l=L(8),g=L(9);function n(){e.call(this),this.useSmartIdealEdgeLengthCalculation=t.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=t.DEFAULT_EDGE_LENGTH,this.springConstant=t.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=t.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=t.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=t.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=t.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*t.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=t.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=t.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=t.MAX_ITERATIONS}n.prototype=Object.create(e.prototype);for(var d in e)n[d]=e[d];n.prototype.initParameters=function(){e.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=t.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},n.prototype.calcIdealEdgeLengths=function(){for(var r,h,a,p,v,D,u=this.getGraphManager().getAllEdges(),T=0;T<u.length;T++)r=u[T],r.idealLength=this.idealEdgeLength,r.isInterGraph&&(a=r.getSource(),p=r.getTarget(),v=r.getSourceInLca().getEstimatedSize(),D=r.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(r.idealLength+=v+D-2*i.SIMPLE_NODE_SIZE),h=r.getLca().getInclusionTreeDepth(),r.idealLength+=t.DEFAULT_EDGE_LENGTH*t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(a.getInclusionTreeDepth()+p.getInclusionTreeDepth()-2*h))},n.prototype.initSpringEmbedder=function(){var r=this.getAllNodes().length;this.incremental?(r>t.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*t.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(r-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-t.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT_INCREMENTAL):(r>t.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(t.COOLING_ADAPTATION_FACTOR,1-(r-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*(1-t.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},n.prototype.calcSpringForces=function(){for(var r=this.getAllEdges(),h,a=0;a<r.length;a++)h=r[a],this.calcSpringForce(h,h.idealLength)},n.prototype.calcRepulsionForces=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a,p,v,D,u=this.getAllNodes(),T;if(this.useFRGridVariant)for(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&r&&this.updateGrid(),T=new Set,a=0;a<u.length;a++)v=u[a],this.calculateRepulsionForceOfANode(v,T,r,h),T.add(v);else for(a=0;a<u.length;a++)for(v=u[a],p=a+1;p<u.length;p++)D=u[p],v.getOwner()==D.getOwner()&&this.calcRepulsionForce(v,D)},n.prototype.calcGravitationalForces=function(){for(var r,h=this.getAllNodesToApplyGravitation(),a=0;a<h.length;a++)r=h[a],this.calcGravitationalForce(r)},n.prototype.moveNodes=function(){for(var r=this.getAllNodes(),h,a=0;a<r.length;a++)h=r[a],h.move()},n.prototype.calcSpringForce=function(r,h){var a=r.getSource(),p=r.getTarget(),v,D,u,T;if(this.uniformLeafNodeSizes&&a.getChild()==null&&p.getChild()==null)r.updateLengthSimple();else if(r.updateLength(),r.isOverlapingSourceAndTarget)return;v=r.getLength(),v!=0&&(D=this.springConstant*(v-h),u=D*(r.lengthX/v),T=D*(r.lengthY/v),a.springForceX+=u,a.springForceY+=T,p.springForceX-=u,p.springForceY-=T)},n.prototype.calcRepulsionForce=function(r,h){var a=r.getRect(),p=h.getRect(),v=new Array(2),D=new Array(4),u,T,y,O,s,f,c;if(a.intersects(p)){l.calcSeparationAmount(a,p,v,t.DEFAULT_EDGE_LENGTH/2),f=2*v[0],c=2*v[1];var E=r.noOfChildren*h.noOfChildren/(r.noOfChildren+h.noOfChildren);r.repulsionForceX-=E*f,r.repulsionForceY-=E*c,h.repulsionForceX+=E*f,h.repulsionForceY+=E*c}else this.uniformLeafNodeSizes&&r.getChild()==null&&h.getChild()==null?(u=p.getCenterX()-a.getCenterX(),T=p.getCenterY()-a.getCenterY()):(l.getIntersection(a,p,D),u=D[2]-D[0],T=D[3]-D[1]),Math.abs(u)<t.MIN_REPULSION_DIST&&(u=g.sign(u)*t.MIN_REPULSION_DIST),Math.abs(T)<t.MIN_REPULSION_DIST&&(T=g.sign(T)*t.MIN_REPULSION_DIST),y=u*u+T*T,O=Math.sqrt(y),s=this.repulsionConstant*r.noOfChildren*h.noOfChildren/y,f=s*u/O,c=s*T/O,r.repulsionForceX-=f,r.repulsionForceY-=c,h.repulsionForceX+=f,h.repulsionForceY+=c},n.prototype.calcGravitationalForce=function(r){var h,a,p,v,D,u,T,y;h=r.getOwner(),a=(h.getRight()+h.getLeft())/2,p=(h.getTop()+h.getBottom())/2,v=r.getCenterX()-a,D=r.getCenterY()-p,u=Math.abs(v)+r.getWidth()/2,T=Math.abs(D)+r.getHeight()/2,r.getOwner()==this.graphManager.getRoot()?(y=h.getEstimatedSize()*this.gravityRangeFactor,(u>y||T>y)&&(r.gravitationForceX=-this.gravityConstant*v,r.gravitationForceY=-this.gravityConstant*D)):(y=h.getEstimatedSize()*this.compoundGravityRangeFactor,(u>y||T>y)&&(r.gravitationForceX=-this.gravityConstant*v*this.compoundGravityConstant,r.gravitationForceY=-this.gravityConstant*D*this.compoundGravityConstant))},n.prototype.isConverged=function(){var r,h=!1;return this.totalIterations>this.maxIterations/3&&(h=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),r=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,r||h},n.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},n.prototype.calcNoOfChildrenForAllNodes=function(){for(var r,h=this.graphManager.getAllNodes(),a=0;a<h.length;a++)r=h[a],r.noOfChildren=r.getNoOfChildren()},n.prototype.calcGrid=function(r){var h=0,a=0;h=parseInt(Math.ceil((r.getRight()-r.getLeft())/this.repulsionRange)),a=parseInt(Math.ceil((r.getBottom()-r.getTop())/this.repulsionRange));for(var p=new Array(h),v=0;v<h;v++)p[v]=new Array(a);for(var v=0;v<h;v++)for(var D=0;D<a;D++)p[v][D]=new Array;return p},n.prototype.addNodeToGrid=function(r,h,a){var p=0,v=0,D=0,u=0;p=parseInt(Math.floor((r.getRect().x-h)/this.repulsionRange)),v=parseInt(Math.floor((r.getRect().width+r.getRect().x-h)/this.repulsionRange)),D=parseInt(Math.floor((r.getRect().y-a)/this.repulsionRange)),u=parseInt(Math.floor((r.getRect().height+r.getRect().y-a)/this.repulsionRange));for(var T=p;T<=v;T++)for(var y=D;y<=u;y++)this.grid[T][y].push(r),r.setGridCoordinates(p,v,D,u)},n.prototype.updateGrid=function(){var r,h,a=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),r=0;r<a.length;r++)h=a[r],this.addNodeToGrid(h,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},n.prototype.calculateRepulsionForceOfANode=function(r,h,a,p){if(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&a||p){var v=new Set;r.surrounding=new Array;for(var D,u=this.grid,T=r.startX-1;T<r.finishX+2;T++)for(var y=r.startY-1;y<r.finishY+2;y++)if(!(T<0||y<0||T>=u.length||y>=u[0].length)){for(var O=0;O<u[T][y].length;O++)if(D=u[T][y][O],!(r.getOwner()!=D.getOwner()||r==D)&&!h.has(D)&&!v.has(D)){var s=Math.abs(r.getCenterX()-D.getCenterX())-(r.getWidth()/2+D.getWidth()/2),f=Math.abs(r.getCenterY()-D.getCenterY())-(r.getHeight()/2+D.getHeight()/2);s<=this.repulsionRange&&f<=this.repulsionRange&&v.add(D)}}r.surrounding=[].concat(o(v))}for(T=0;T<r.surrounding.length;T++)this.calcRepulsionForce(r,r.surrounding[T])},n.prototype.calcRepulsionRange=function(){return 0},N.exports=n}),(function(N,I,L){var o=L(1),e=L(7);function t(l,g,n){o.call(this,l,g,n),this.idealLength=e.DEFAULT_EDGE_LENGTH}t.prototype=Object.create(o.prototype);for(var i in o)t[i]=o[i];N.exports=t}),(function(N,I,L){var o=L(3);function e(i,l,g,n){o.call(this,i,l,g,n),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}e.prototype=Object.create(o.prototype);for(var t in o)e[t]=o[t];e.prototype.setGridCoordinates=function(i,l,g,n){this.startX=i,this.finishX=l,this.startY=g,this.finishY=n},N.exports=e}),(function(N,I,L){function o(e,t){this.width=0,this.height=0,e!==null&&t!==null&&(this.height=t,this.width=e)}o.prototype.getWidth=function(){return this.width},o.prototype.setWidth=function(e){this.width=e},o.prototype.getHeight=function(){return this.height},o.prototype.setHeight=function(e){this.height=e},N.exports=o}),(function(N,I,L){var o=L(14);function e(){this.map={},this.keys=[]}e.prototype.put=function(t,i){var l=o.createID(t);this.contains(l)||(this.map[l]=i,this.keys.push(t))},e.prototype.contains=function(t){return o.createID(t),this.map[t]!=null},e.prototype.get=function(t){var i=o.createID(t);return this.map[i]},e.prototype.keySet=function(){return this.keys},N.exports=e}),(function(N,I,L){var o=L(14);function e(){this.set={}}e.prototype.add=function(t){var i=o.createID(t);this.contains(i)||(this.set[i]=t)},e.prototype.remove=function(t){delete this.set[o.createID(t)]},e.prototype.clear=function(){this.set={}},e.prototype.contains=function(t){return this.set[o.createID(t)]==t},e.prototype.isEmpty=function(){return this.size()===0},e.prototype.size=function(){return Object.keys(this.set).length},e.prototype.addAllTo=function(t){for(var i=Object.keys(this.set),l=i.length,g=0;g<l;g++)t.push(this.set[i[g]])},e.prototype.size=function(){return Object.keys(this.set).length},e.prototype.addAll=function(t){for(var i=t.length,l=0;l<i;l++){var g=t[l];this.add(g)}},N.exports=e}),(function(N,I,L){var o=(function(){function l(g,n){for(var d=0;d<n.length;d++){var r=n[d];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(g,r.key,r)}}return function(g,n,d){return n&&l(g.prototype,n),d&&l(g,d),g}})();function e(l,g){if(!(l instanceof g))throw new TypeError("Cannot call a class as a function")}var t=L(11),i=(function(){function l(g,n){e(this,l),(n!==null||n!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var d=void 0;g instanceof t?d=g.size():d=g.length,this._quicksort(g,0,d-1)}return o(l,[{key:"_quicksort",value:function(n,d,r){if(d<r){var h=this._partition(n,d,r);this._quicksort(n,d,h),this._quicksort(n,h+1,r)}}},{key:"_partition",value:function(n,d,r){for(var h=this._get(n,d),a=d,p=r;;){for(;this.compareFunction(h,this._get(n,p));)p--;for(;this.compareFunction(this._get(n,a),h);)a++;if(a<p)this._swap(n,a,p),a++,p--;else return p}}},{key:"_get",value:function(n,d){return n instanceof t?n.get_object_at(d):n[d]}},{key:"_set",value:function(n,d,r){n instanceof t?n.set_object_at(d,r):n[d]=r}},{key:"_swap",value:function(n,d,r){var h=this._get(n,d);this._set(n,d,this._get(n,r)),this._set(n,r,h)}},{key:"_defaultCompareFunction",value:function(n,d){return d>n}}]),l})();N.exports=i}),(function(N,I,L){var o=(function(){function i(l,g){for(var n=0;n<g.length;n++){var d=g[n];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(l,d.key,d)}}return function(l,g,n){return g&&i(l.prototype,g),n&&i(l,n),l}})();function e(i,l){if(!(i instanceof l))throw new TypeError("Cannot call a class as a function")}var t=(function(){function i(l,g){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;e(this,i),this.sequence1=l,this.sequence2=g,this.match_score=n,this.mismatch_penalty=d,this.gap_penalty=r,this.iMax=l.length+1,this.jMax=g.length+1,this.grid=new Array(this.iMax);for(var h=0;h<this.iMax;h++){this.grid[h]=new Array(this.jMax);for(var a=0;a<this.jMax;a++)this.grid[h][a]=0}this.tracebackGrid=new Array(this.iMax);for(var p=0;p<this.iMax;p++){this.tracebackGrid[p]=new Array(this.jMax);for(var v=0;v<this.jMax;v++)this.tracebackGrid[p][v]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return o(i,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var g=1;g<this.jMax;g++)this.grid[0][g]=this.grid[0][g-1]+this.gap_penalty,this.tracebackGrid[0][g]=[!1,!1,!0];for(var n=1;n<this.iMax;n++)this.grid[n][0]=this.grid[n-1][0]+this.gap_penalty,this.tracebackGrid[n][0]=[!1,!0,!1];for(var d=1;d<this.iMax;d++)for(var r=1;r<this.jMax;r++){var h=void 0;this.sequence1[d-1]===this.sequence2[r-1]?h=this.grid[d-1][r-1]+this.match_score:h=this.grid[d-1][r-1]+this.mismatch_penalty;var a=this.grid[d-1][r]+this.gap_penalty,p=this.grid[d][r-1]+this.gap_penalty,v=[h,a,p],D=this.arrayAllMaxIndexes(v);this.grid[d][r]=v[D[0]],this.tracebackGrid[d][r]=[D.includes(0),D.includes(1),D.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var g=[];for(g.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});g[0];){var n=g[0],d=this.tracebackGrid[n.pos[0]][n.pos[1]];d[0]&&g.push({pos:[n.pos[0]-1,n.pos[1]-1],seq1:this.sequence1[n.pos[0]-1]+n.seq1,seq2:this.sequence2[n.pos[1]-1]+n.seq2}),d[1]&&g.push({pos:[n.pos[0]-1,n.pos[1]],seq1:this.sequence1[n.pos[0]-1]+n.seq1,seq2:"-"+n.seq2}),d[2]&&g.push({pos:[n.pos[0],n.pos[1]-1],seq1:"-"+n.seq1,seq2:this.sequence2[n.pos[1]-1]+n.seq2}),n.pos[0]===0&&n.pos[1]===0&&this.alignments.push({sequence1:n.seq1,sequence2:n.seq2}),g.shift()}return this.alignments}},{key:"getAllIndexes",value:function(g,n){for(var d=[],r=-1;(r=g.indexOf(n,r+1))!==-1;)d.push(r);return d}},{key:"arrayAllMaxIndexes",value:function(g){return this.getAllIndexes(g,Math.max.apply(null,g))}}]),i})();N.exports=t}),(function(N,I,L){var o=function(){};o.FDLayout=L(18),o.FDLayoutConstants=L(7),o.FDLayoutEdge=L(19),o.FDLayoutNode=L(20),o.DimensionD=L(21),o.HashMap=L(22),o.HashSet=L(23),o.IGeometry=L(8),o.IMath=L(9),o.Integer=L(10),o.Point=L(12),o.PointD=L(4),o.RandomSeed=L(16),o.RectangleD=L(13),o.Transform=L(17),o.UniqueIDGeneretor=L(14),o.Quicksort=L(24),o.LinkedList=L(11),o.LGraphObject=L(2),o.LGraph=L(5),o.LEdge=L(1),o.LGraphManager=L(6),o.LNode=L(3),o.Layout=L(15),o.LayoutConstants=L(0),o.NeedlemanWunsch=L(25),N.exports=o}),(function(N,I,L){function o(){this.listeners=[]}var e=o.prototype;e.addListener=function(t,i){this.listeners.push({event:t,callback:i})},e.removeListener=function(t,i){for(var l=this.listeners.length;l>=0;l--){var g=this.listeners[l];g.event===t&&g.callback===i&&this.listeners.splice(l,1)}},e.emit=function(t,i){for(var l=0;l<this.listeners.length;l++){var g=this.listeners[l];t===g.event&&g.callback(i)}},N.exports=o})])})})(Q)),Q.exports}var ct=$.exports,z;function pt(){return z||(z=1,(function(G,b){(function(I,L){G.exports=L(ft())})(ct,function(N){return(function(I){var L={};function o(e){if(L[e])return L[e].exports;var t=L[e]={i:e,l:!1,exports:{}};return I[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}return o.m=I,o.c=L,o.i=function(e){return e},o.d=function(e,t,i){o.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=7)})([(function(I,L){I.exports=N}),(function(I,L,o){var e=o(0).FDLayoutConstants;function t(){}for(var i in e)t[i]=e[i];t.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,t.DEFAULT_RADIAL_SEPARATION=e.DEFAULT_EDGE_LENGTH,t.DEFAULT_COMPONENT_SEPERATION=60,t.TILE=!0,t.TILING_PADDING_VERTICAL=10,t.TILING_PADDING_HORIZONTAL=10,t.TREE_REDUCTION_ON_INCREMENTAL=!1,I.exports=t}),(function(I,L,o){var e=o(0).FDLayoutEdge;function t(l,g,n){e.call(this,l,g,n)}t.prototype=Object.create(e.prototype);for(var i in e)t[i]=e[i];I.exports=t}),(function(I,L,o){var e=o(0).LGraph;function t(l,g,n){e.call(this,l,g,n)}t.prototype=Object.create(e.prototype);for(var i in e)t[i]=e[i];I.exports=t}),(function(I,L,o){var e=o(0).LGraphManager;function t(l){e.call(this,l)}t.prototype=Object.create(e.prototype);for(var i in e)t[i]=e[i];I.exports=t}),(function(I,L,o){var e=o(0).FDLayoutNode,t=o(0).IMath;function i(g,n,d,r){e.call(this,g,n,d,r)}i.prototype=Object.create(e.prototype);for(var l in e)i[l]=e[l];i.prototype.move=function(){var g=this.graphManager.getLayout();this.displacementX=g.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=g.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>g.coolingFactor*g.maxNodeDisplacement&&(this.displacementX=g.coolingFactor*g.maxNodeDisplacement*t.sign(this.displacementX)),Math.abs(this.displacementY)>g.coolingFactor*g.maxNodeDisplacement&&(this.displacementY=g.coolingFactor*g.maxNodeDisplacement*t.sign(this.displacementY)),this.child==null?this.moveBy(this.displacementX,this.displacementY):this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),g.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},i.prototype.propogateDisplacementToChildren=function(g,n){for(var d=this.getChild().getNodes(),r,h=0;h<d.length;h++)r=d[h],r.getChild()==null?(r.moveBy(g,n),r.displacementX+=g,r.displacementY+=n):r.propogateDisplacementToChildren(g,n)},i.prototype.setPred1=function(g){this.pred1=g},i.prototype.getPred1=function(){return pred1},i.prototype.getPred2=function(){return pred2},i.prototype.setNext=function(g){this.next=g},i.prototype.getNext=function(){return next},i.prototype.setProcessed=function(g){this.processed=g},i.prototype.isProcessed=function(){return processed},I.exports=i}),(function(I,L,o){var e=o(0).FDLayout,t=o(4),i=o(3),l=o(5),g=o(2),n=o(1),d=o(0).FDLayoutConstants,r=o(0).LayoutConstants,h=o(0).Point,a=o(0).PointD,p=o(0).Layout,v=o(0).Integer,D=o(0).IGeometry,u=o(0).LGraph,T=o(0).Transform;function y(){e.call(this),this.toBeTiled={}}y.prototype=Object.create(e.prototype);for(var O in e)y[O]=e[O];y.prototype.newGraphManager=function(){var s=new t(this);return this.graphManager=s,s},y.prototype.newGraph=function(s){return new i(null,this.graphManager,s)},y.prototype.newNode=function(s){return new l(this.graphManager,s)},y.prototype.newEdge=function(s){return new g(null,null,s)},y.prototype.initParameters=function(){e.prototype.initParameters.call(this,arguments),this.isSubLayout||(n.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=n.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=n.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=d.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=d.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=d.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=d.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=d.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=d.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/d.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=d.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},y.prototype.layout=function(){var s=r.DEFAULT_CREATE_BENDS_AS_NEEDED;return s&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},y.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(n.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var f=new Set(this.getAllNodes()),c=this.nodesWithGravity.filter(function(m){return f.has(m)});this.graphManager.setAllNodesToApplyGravitation(c)}}else{var s=this.getFlatForest();if(s.length>0)this.positionNodesRadially(s);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var f=new Set(this.getAllNodes()),c=this.nodesWithGravity.filter(function(E){return f.has(E)});this.graphManager.setAllNodesToApplyGravitation(c),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},y.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%d.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var s=new Set(this.getAllNodes()),f=this.nodesWithGravity.filter(function(A){return s.has(A)});this.graphManager.setAllNodesToApplyGravitation(f),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var c=!this.isTreeGrowing&&!this.isGrowthFinished,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(c,E),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},y.prototype.getPositionsData=function(){for(var s=this.graphManager.getAllNodes(),f={},c=0;c<s.length;c++){var E=s[c].rect,A=s[c].id;f[A]={id:A,x:E.getCenterX(),y:E.getCenterY(),w:E.width,h:E.height}}return f},y.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var s=!1;if(d.ANIMATE==="during")this.emit("layoutstarted");else{for(;!s;)s=this.tick();this.graphManager.updateBounds()}},y.prototype.calculateNodesToApplyGravitationTo=function(){var s=[],f,c=this.graphManager.getGraphs(),E=c.length,A;for(A=0;A<E;A++)f=c[A],f.updateConnected(),f.isConnected||(s=s.concat(f.getNodes()));return s},y.prototype.createBendpoints=function(){var s=[];s=s.concat(this.graphManager.getAllEdges());var f=new Set,c;for(c=0;c<s.length;c++){var E=s[c];if(!f.has(E)){var A=E.getSource(),m=E.getTarget();if(A==m)E.getBendpoints().push(new a),E.getBendpoints().push(new a),this.createDummyNodesForBendpoints(E),f.add(E);else{var C=[];if(C=C.concat(A.getEdgeListToNode(m)),C=C.concat(m.getEdgeListToNode(A)),!f.has(C[0])){if(C.length>1){var R;for(R=0;R<C.length;R++){var M=C[R];M.getBendpoints().push(new a),this.createDummyNodesForBendpoints(M)}}C.forEach(function(S){f.add(S)})}}}if(f.size==s.length)break}},y.prototype.positionNodesRadially=function(s){for(var f=new h(0,0),c=Math.ceil(Math.sqrt(s.length)),E=0,A=0,m=0,C=new a(0,0),R=0;R<s.length;R++){R%c==0&&(m=0,A=E,R!=0&&(A+=n.DEFAULT_COMPONENT_SEPERATION),E=0);var M=s[R],S=p.findCenterOfTree(M);f.x=m,f.y=A,C=y.radialLayout(M,S,f),C.y>E&&(E=Math.floor(C.y)),m=Math.floor(C.x+n.DEFAULT_COMPONENT_SEPERATION)}this.transform(new a(r.WORLD_CENTER_X-C.x/2,r.WORLD_CENTER_Y-C.y/2))},y.radialLayout=function(s,f,c){var E=Math.max(this.maxDiagonalInTree(s),n.DEFAULT_RADIAL_SEPARATION);y.branchRadialLayout(f,null,0,359,0,E);var A=u.calculateBounds(s),m=new T;m.setDeviceOrgX(A.getMinX()),m.setDeviceOrgY(A.getMinY()),m.setWorldOrgX(c.x),m.setWorldOrgY(c.y);for(var C=0;C<s.length;C++){var R=s[C];R.transform(m)}var M=new a(A.getMaxX(),A.getMaxY());return m.inverseTransformPoint(M)},y.branchRadialLayout=function(s,f,c,E,A,m){var C=(E-c+1)/2;C<0&&(C+=180);var R=(C+c)%360,M=R*D.TWO_PI/360,S=A*Math.cos(M),Y=A*Math.sin(M);s.setCenter(S,Y);var w=[];w=w.concat(s.getEdges());var x=w.length;f!=null&&x--;for(var F=0,U=w.length,P,_=s.getEdgesBetween(f);_.length>1;){var X=_[0];_.splice(0,1);var H=w.indexOf(X);H>=0&&w.splice(H,1),U--,x--}f!=null?P=(w.indexOf(_[0])+1)%U:P=0;for(var W=Math.abs(E-c)/x,B=P;F!=x;B=++B%U){var K=w[B].getOtherEnd(s);if(K!=f){var q=(c+F*W)%360,ht=(q+W)%360;y.branchRadialLayout(K,s,q,ht,A+m,m),F++}}},y.maxDiagonalInTree=function(s){for(var f=v.MIN_VALUE,c=0;c<s.length;c++){var E=s[c],A=E.getDiagonal();A>f&&(f=A)}return f},y.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},y.prototype.groupZeroDegreeMembers=function(){var s=this,f={};this.memberGroups={},this.idToDummyNode={};for(var c=[],E=this.graphManager.getAllNodes(),A=0;A<E.length;A++){var m=E[A],C=m.getParent();this.getNodeDegreeWithChildren(m)===0&&(C.id==null||!this.getToBeTiled(C))&&c.push(m)}for(var A=0;A<c.length;A++){var m=c[A],R=m.getParent().id;typeof f[R]>"u"&&(f[R]=[]),f[R]=f[R].concat(m)}Object.keys(f).forEach(function(M){if(f[M].length>1){var S="DummyCompound_"+M;s.memberGroups[S]=f[M];var Y=f[M][0].getParent(),w=new l(s.graphManager);w.id=S,w.paddingLeft=Y.paddingLeft||0,w.paddingRight=Y.paddingRight||0,w.paddingBottom=Y.paddingBottom||0,w.paddingTop=Y.paddingTop||0,s.idToDummyNode[S]=w;var x=s.getGraphManager().add(s.newGraph(),w),F=Y.getChild();F.add(w);for(var U=0;U<f[M].length;U++){var P=f[M][U];F.remove(P),x.add(P)}}})},y.prototype.clearCompounds=function(){var s={},f={};this.performDFSOnCompounds();for(var c=0;c<this.compoundOrder.length;c++)f[this.compoundOrder[c].id]=this.compoundOrder[c],s[this.compoundOrder[c].id]=[].concat(this.compoundOrder[c].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[c].getChild()),this.compoundOrder[c].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(s,f)},y.prototype.clearZeroDegreeMembers=function(){var s=this,f=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(c){var E=s.idToDummyNode[c];f[c]=s.tileNodes(s.memberGroups[c],E.paddingLeft+E.paddingRight),E.rect.width=f[c].width,E.rect.height=f[c].height})},y.prototype.repopulateCompounds=function(){for(var s=this.compoundOrder.length-1;s>=0;s--){var f=this.compoundOrder[s],c=f.id,E=f.paddingLeft,A=f.paddingTop;this.adjustLocations(this.tiledMemberPack[c],f.rect.x,f.rect.y,E,A)}},y.prototype.repopulateZeroDegreeMembers=function(){var s=this,f=this.tiledZeroDegreePack;Object.keys(f).forEach(function(c){var E=s.idToDummyNode[c],A=E.paddingLeft,m=E.paddingTop;s.adjustLocations(f[c],E.rect.x,E.rect.y,A,m)})},y.prototype.getToBeTiled=function(s){var f=s.id;if(this.toBeTiled[f]!=null)return this.toBeTiled[f];var c=s.getChild();if(c==null)return this.toBeTiled[f]=!1,!1;for(var E=c.getNodes(),A=0;A<E.length;A++){var m=E[A];if(this.getNodeDegree(m)>0)return this.toBeTiled[f]=!1,!1;if(m.getChild()==null){this.toBeTiled[m.id]=!1;continue}if(!this.getToBeTiled(m))return this.toBeTiled[f]=!1,!1}return this.toBeTiled[f]=!0,!0},y.prototype.getNodeDegree=function(s){s.id;for(var f=s.getEdges(),c=0,E=0;E<f.length;E++){var A=f[E];A.getSource().id!==A.getTarget().id&&(c=c+1)}return c},y.prototype.getNodeDegreeWithChildren=function(s){var f=this.getNodeDegree(s);if(s.getChild()==null)return f;for(var c=s.getChild().getNodes(),E=0;E<c.length;E++){var A=c[E];f+=this.getNodeDegreeWithChildren(A)}return f},y.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},y.prototype.fillCompexOrderByDFS=function(s){for(var f=0;f<s.length;f++){var c=s[f];c.getChild()!=null&&this.fillCompexOrderByDFS(c.getChild().getNodes()),this.getToBeTiled(c)&&this.compoundOrder.push(c)}},y.prototype.adjustLocations=function(s,f,c,E,A){f+=E,c+=A;for(var m=f,C=0;C<s.rows.length;C++){var R=s.rows[C];f=m;for(var M=0,S=0;S<R.length;S++){var Y=R[S];Y.rect.x=f,Y.rect.y=c,f+=Y.rect.width+s.horizontalPadding,Y.rect.height>M&&(M=Y.rect.height)}c+=M+s.verticalPadding}},y.prototype.tileCompoundMembers=function(s,f){var c=this;this.tiledMemberPack=[],Object.keys(s).forEach(function(E){var A=f[E];c.tiledMemberPack[E]=c.tileNodes(s[E],A.paddingLeft+A.paddingRight),A.rect.width=c.tiledMemberPack[E].width,A.rect.height=c.tiledMemberPack[E].height})},y.prototype.tileNodes=function(s,f){var c=n.TILING_PADDING_VERTICAL,E=n.TILING_PADDING_HORIZONTAL,A={rows:[],rowWidth:[],rowHeight:[],width:0,height:f,verticalPadding:c,horizontalPadding:E};s.sort(function(R,M){return R.rect.width*R.rect.height>M.rect.width*M.rect.height?-1:R.rect.width*R.rect.height<M.rect.width*M.rect.height?1:0});for(var m=0;m<s.length;m++){var C=s[m];A.rows.length==0?this.insertNodeToRow(A,C,0,f):this.canAddHorizontal(A,C.rect.width,C.rect.height)?this.insertNodeToRow(A,C,this.getShortestRowIndex(A),f):this.insertNodeToRow(A,C,A.rows.length,f),this.shiftToLastRow(A)}return A},y.prototype.insertNodeToRow=function(s,f,c,E){var A=E;if(c==s.rows.length){var m=[];s.rows.push(m),s.rowWidth.push(A),s.rowHeight.push(0)}var C=s.rowWidth[c]+f.rect.width;s.rows[c].length>0&&(C+=s.horizontalPadding),s.rowWidth[c]=C,s.width<C&&(s.width=C);var R=f.rect.height;c>0&&(R+=s.verticalPadding);var M=0;R>s.rowHeight[c]&&(M=s.rowHeight[c],s.rowHeight[c]=R,M=s.rowHeight[c]-M),s.height+=M,s.rows[c].push(f)},y.prototype.getShortestRowIndex=function(s){for(var f=-1,c=Number.MAX_VALUE,E=0;E<s.rows.length;E++)s.rowWidth[E]<c&&(f=E,c=s.rowWidth[E]);return f},y.prototype.getLongestRowIndex=function(s){for(var f=-1,c=Number.MIN_VALUE,E=0;E<s.rows.length;E++)s.rowWidth[E]>c&&(f=E,c=s.rowWidth[E]);return f},y.prototype.canAddHorizontal=function(s,f,c){var E=this.getShortestRowIndex(s);if(E<0)return!0;var A=s.rowWidth[E];if(A+s.horizontalPadding+f<=s.width)return!0;var m=0;s.rowHeight[E]<c&&E>0&&(m=c+s.verticalPadding-s.rowHeight[E]);var C;s.width-A>=f+s.horizontalPadding?C=(s.height+m)/(A+f+s.horizontalPadding):C=(s.height+m)/s.width,m=c+s.verticalPadding;var R;return s.width<f?R=(s.height+m)/f:R=(s.height+m)/s.width,R<1&&(R=1/R),C<1&&(C=1/C),C<R},y.prototype.shiftToLastRow=function(s){var f=this.getLongestRowIndex(s),c=s.rowWidth.length-1,E=s.rows[f],A=E[E.length-1],m=A.width+s.horizontalPadding;if(s.width-s.rowWidth[c]>m&&f!=c){E.splice(-1,1),s.rows[c].push(A),s.rowWidth[f]=s.rowWidth[f]-m,s.rowWidth[c]=s.rowWidth[c]+m,s.width=s.rowWidth[instance.getLongestRowIndex(s)];for(var C=Number.MIN_VALUE,R=0;R<E.length;R++)E[R].height>C&&(C=E[R].height);f>0&&(C+=s.verticalPadding);var M=s.rowHeight[f]+s.rowHeight[c];s.rowHeight[f]=C,s.rowHeight[c]<A.height+s.verticalPadding&&(s.rowHeight[c]=A.height+s.verticalPadding);var S=s.rowHeight[f]+s.rowHeight[c];s.height+=S-M,this.shiftToLastRow(s)}},y.prototype.tilingPreLayout=function(){n.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},y.prototype.tilingPostLayout=function(){n.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},y.prototype.reduceTrees=function(){for(var s=[],f=!0,c;f;){var E=this.graphManager.getAllNodes(),A=[];f=!1;for(var m=0;m<E.length;m++)c=E[m],c.getEdges().length==1&&!c.getEdges()[0].isInterGraph&&c.getChild()==null&&(A.push([c,c.getEdges()[0],c.getOwner()]),f=!0);if(f==!0){for(var C=[],R=0;R<A.length;R++)A[R][0].getEdges().length==1&&(C.push(A[R]),A[R][0].getOwner().remove(A[R][0]));s.push(C),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=s},y.prototype.growTree=function(s){for(var f=s.length,c=s[f-1],E,A=0;A<c.length;A++)E=c[A],this.findPlaceforPrunedNode(E),E[2].add(E[0]),E[2].add(E[1],E[1].source,E[1].target);s.splice(s.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},y.prototype.findPlaceforPrunedNode=function(s){var f,c,E=s[0];E==s[1].source?c=s[1].target:c=s[1].source;var A=c.startX,m=c.finishX,C=c.startY,R=c.finishY,M=0,S=0,Y=0,w=0,x=[M,Y,S,w];if(C>0)for(var F=A;F<=m;F++)x[0]+=this.grid[F][C-1].length+this.grid[F][C].length-1;if(m<this.grid.length-1)for(var F=C;F<=R;F++)x[1]+=this.grid[m+1][F].length+this.grid[m][F].length-1;if(R<this.grid[0].length-1)for(var F=A;F<=m;F++)x[2]+=this.grid[F][R+1].length+this.grid[F][R].length-1;if(A>0)for(var F=C;F<=R;F++)x[3]+=this.grid[A-1][F].length+this.grid[A][F].length-1;for(var U=v.MAX_VALUE,P,_,X=0;X<x.length;X++)x[X]<U?(U=x[X],P=1,_=X):x[X]==U&&P++;if(P==3&&U==0)x[0]==0&&x[1]==0&&x[2]==0?f=1:x[0]==0&&x[1]==0&&x[3]==0?f=0:x[0]==0&&x[2]==0&&x[3]==0?f=3:x[1]==0&&x[2]==0&&x[3]==0&&(f=2);else if(P==2&&U==0){var H=Math.floor(Math.random()*2);x[0]==0&&x[1]==0?H==0?f=0:f=1:x[0]==0&&x[2]==0?H==0?f=0:f=2:x[0]==0&&x[3]==0?H==0?f=0:f=3:x[1]==0&&x[2]==0?H==0?f=1:f=2:x[1]==0&&x[3]==0?H==0?f=1:f=3:H==0?f=2:f=3}else if(P==4&&U==0){var H=Math.floor(Math.random()*4);f=H}else f=_;f==0?E.setCenter(c.getCenterX(),c.getCenterY()-c.getHeight()/2-d.DEFAULT_EDGE_LENGTH-E.getHeight()/2):f==1?E.setCenter(c.getCenterX()+c.getWidth()/2+d.DEFAULT_EDGE_LENGTH+E.getWidth()/2,c.getCenterY()):f==2?E.setCenter(c.getCenterX(),c.getCenterY()+c.getHeight()/2+d.DEFAULT_EDGE_LENGTH+E.getHeight()/2):E.setCenter(c.getCenterX()-c.getWidth()/2-d.DEFAULT_EDGE_LENGTH-E.getWidth()/2,c.getCenterY())},I.exports=y}),(function(I,L,o){var e={};e.layoutBase=o(0),e.CoSEConstants=o(1),e.CoSEEdge=o(2),e.CoSEGraph=o(3),e.CoSEGraphManager=o(4),e.CoSELayout=o(6),e.CoSENode=o(5),I.exports=e})])})})($)),$.exports}var dt=Z.exports,J;function vt(){return J||(J=1,(function(G,b){(function(I,L){G.exports=L(pt())})(dt,function(N){return(function(I){var L={};function o(e){if(L[e])return L[e].exports;var t=L[e]={i:e,l:!1,exports:{}};return I[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}return o.m=I,o.c=L,o.i=function(e){return e},o.d=function(e,t,i){o.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=1)})([(function(I,L){I.exports=N}),(function(I,L,o){var e=o(0).layoutBase.LayoutConstants,t=o(0).layoutBase.FDLayoutConstants,i=o(0).CoSEConstants,l=o(0).CoSELayout,g=o(0).CoSENode,n=o(0).layoutBase.PointD,d=o(0).layoutBase.DimensionD,r={ready:function(){},stop:function(){},quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function h(D,u){var T={};for(var y in D)T[y]=D[y];for(var y in u)T[y]=u[y];return T}function a(D){this.options=h(r,D),p(this.options)}var p=function(u){u.nodeRepulsion!=null&&(i.DEFAULT_REPULSION_STRENGTH=t.DEFAULT_REPULSION_STRENGTH=u.nodeRepulsion),u.idealEdgeLength!=null&&(i.DEFAULT_EDGE_LENGTH=t.DEFAULT_EDGE_LENGTH=u.idealEdgeLength),u.edgeElasticity!=null&&(i.DEFAULT_SPRING_STRENGTH=t.DEFAULT_SPRING_STRENGTH=u.edgeElasticity),u.nestingFactor!=null&&(i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=u.nestingFactor),u.gravity!=null&&(i.DEFAULT_GRAVITY_STRENGTH=t.DEFAULT_GRAVITY_STRENGTH=u.gravity),u.numIter!=null&&(i.MAX_ITERATIONS=t.MAX_ITERATIONS=u.numIter),u.gravityRange!=null&&(i.DEFAULT_GRAVITY_RANGE_FACTOR=t.DEFAULT_GRAVITY_RANGE_FACTOR=u.gravityRange),u.gravityCompound!=null&&(i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.DEFAULT_COMPOUND_GRAVITY_STRENGTH=u.gravityCompound),u.gravityRangeCompound!=null&&(i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=u.gravityRangeCompound),u.initialEnergyOnIncremental!=null&&(i.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.DEFAULT_COOLING_FACTOR_INCREMENTAL=u.initialEnergyOnIncremental),u.quality=="draft"?e.QUALITY=0:u.quality=="proof"?e.QUALITY=2:e.QUALITY=1,i.NODE_DIMENSIONS_INCLUDE_LABELS=t.NODE_DIMENSIONS_INCLUDE_LABELS=e.NODE_DIMENSIONS_INCLUDE_LABELS=u.nodeDimensionsIncludeLabels,i.DEFAULT_INCREMENTAL=t.DEFAULT_INCREMENTAL=e.DEFAULT_INCREMENTAL=!u.randomize,i.ANIMATE=t.ANIMATE=e.ANIMATE=u.animate,i.TILE=u.tile,i.TILING_PADDING_VERTICAL=typeof u.tilingPaddingVertical=="function"?u.tilingPaddingVertical.call():u.tilingPaddingVertical,i.TILING_PADDING_HORIZONTAL=typeof u.tilingPaddingHorizontal=="function"?u.tilingPaddingHorizontal.call():u.tilingPaddingHorizontal};a.prototype.run=function(){var D,u,T=this.options;this.idToLNode={};var y=this.layout=new l,O=this;O.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var s=y.newGraphManager();this.gm=s;var f=this.options.eles.nodes(),c=this.options.eles.edges();this.root=s.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(f),y);for(var E=0;E<c.length;E++){var A=c[E],m=this.idToLNode[A.data("source")],C=this.idToLNode[A.data("target")];if(m!==C&&m.getEdgesBetween(C).length==0){var R=s.add(y.newEdge(),m,C);R.id=A.id()}}var M=function(w,x){typeof w=="number"&&(w=x);var F=w.data("id"),U=O.idToLNode[F];return{x:U.getRect().getCenterX(),y:U.getRect().getCenterY()}},S=function Y(){for(var w=function(){T.fit&&T.cy.fit(T.eles,T.padding),D||(D=!0,O.cy.one("layoutready",T.ready),O.cy.trigger({type:"layoutready",layout:O}))},x=O.options.refresh,F,U=0;U<x&&!F;U++)F=O.stopped||O.layout.tick();if(F){y.checkLayoutSuccess()&&!y.isSubLayout&&y.doPostLayout(),y.tilingPostLayout&&y.tilingPostLayout(),y.isLayoutFinished=!0,O.options.eles.nodes().positions(M),w(),O.cy.one("layoutstop",O.options.stop),O.cy.trigger({type:"layoutstop",layout:O}),u&&cancelAnimationFrame(u),D=!1;return}var P=O.layout.getPositionsData();T.eles.nodes().positions(function(_,X){if(typeof _=="number"&&(_=X),!_.isParent()){for(var H=_.id(),W=P[H],B=_;W==null&&(W=P[B.data("parent")]||P["DummyCompound_"+B.data("parent")],P[H]=W,B=B.parent()[0],B!=null););return W!=null?{x:W.x,y:W.y}:{x:_.position("x"),y:_.position("y")}}}),w(),u=requestAnimationFrame(Y)};return y.addListener("layoutstarted",function(){O.options.animate==="during"&&(u=requestAnimationFrame(S))}),y.runLayout(),this.options.animate!=="during"&&(O.options.eles.nodes().not(":parent").layoutPositions(O,O.options,M),D=!1),this},a.prototype.getTopMostNodes=function(D){for(var u={},T=0;T<D.length;T++)u[D[T].id()]=!0;var y=D.filter(function(O,s){typeof O=="number"&&(O=s);for(var f=O.parent()[0];f!=null;){if(u[f.id()])return!1;f=f.parent()[0]}return!0});return y},a.prototype.processChildrenList=function(D,u,T){for(var y=u.length,O=0;O<y;O++){var s=u[O],f=s.children(),c,E=s.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if(s.outerWidth()!=null&&s.outerHeight()!=null?c=D.add(new g(T.graphManager,new n(s.position("x")-E.w/2,s.position("y")-E.h/2),new d(parseFloat(E.w),parseFloat(E.h)))):c=D.add(new g(this.graphManager)),c.id=s.data("id"),c.paddingLeft=parseInt(s.css("padding")),c.paddingTop=parseInt(s.css("padding")),c.paddingRight=parseInt(s.css("padding")),c.paddingBottom=parseInt(s.css("padding")),this.options.nodeDimensionsIncludeLabels&&s.isParent()){var A=s.boundingBox({includeLabels:!0,includeNodes:!1}).w,m=s.boundingBox({includeLabels:!0,includeNodes:!1}).h,C=s.css("text-halign");c.labelWidth=A,c.labelHeight=m,c.labelPos=C}if(this.idToLNode[s.data("id")]=c,isNaN(c.rect.x)&&(c.rect.x=0),isNaN(c.rect.y)&&(c.rect.y=0),f!=null&&f.length>0){var R;R=T.getGraphManager().add(T.newGraph(),c),this.processChildrenList(R,f,T)}}},a.prototype.stop=function(){return this.stopped=!0,this};var v=function(u){u("layout","cose-bilkent",a)};typeof cytoscape<"u"&&v(cytoscape),I.exports=v})])})})(Z)),Z.exports}var yt=vt();const Et=gt(yt);tt.use(Et);function et(G,b){G.forEach(N=>{const I={id:N.id,labelText:N.label,height:N.height,width:N.width,padding:N.padding??0};Object.keys(N).forEach(L=>{["id","label","height","width","padding","x","y"].includes(L)||(I[L]=N[L])}),b.add({group:"nodes",data:I,position:{x:N.x??0,y:N.y??0}})})}V(et,"addNodes");function rt(G,b){G.forEach(N=>{const I={id:N.id,source:N.start,target:N.end};Object.keys(N).forEach(L=>{["id","start","end"].includes(L)||(I[L]=N[L])}),b.add({group:"edges",data:I})})}V(rt,"addEdges");function it(G){return new Promise(b=>{const N=lt("body").append("div").attr("id","cy").attr("style","display:none"),I=tt({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});N.remove(),et(G.nodes,I),rt(G.edges,I),I.nodes().forEach(function(o){o.layoutDimensions=()=>{const e=o.data();return{w:e.width,h:e.height}}});const L={name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1};I.layout(L).run(),I.ready(o=>{k.info("Cytoscape ready",o),b(I)})})}V(it,"createCytoscapeInstance");function nt(G){return G.nodes().map(b=>{const N=b.data(),I=b.position(),L={id:N.id,x:I.x,y:I.y};return Object.keys(N).forEach(o=>{o!=="id"&&(L[o]=N[o])}),L})}V(nt,"extractPositionedNodes");function ot(G){return G.edges().map(b=>{const N=b.data(),I=b._private.rscratch,L={id:N.id,source:N.source,target:N.target,startX:I.startX,startY:I.startY,midX:I.midX,midY:I.midY,endX:I.endX,endY:I.endY};return Object.keys(N).forEach(o=>{["id","source","target"].includes(o)||(L[o]=N[o])}),L})}V(ot,"extractPositionedEdges");async function st(G,b){k.debug("Starting cose-bilkent layout algorithm");try{at(G);const N=await it(G),I=nt(N),L=ot(N);return k.debug(`Layout completed: ${I.length} nodes, ${L.length} edges`),{nodes:I,edges:L}}catch(N){throw k.error("Error in cose-bilkent layout algorithm:",N),N}}V(st,"executeCoseBilkentLayout");function at(G){if(!G)throw new Error("Layout data is required");if(!G.config)throw new Error("Configuration is required in layout data");if(!G.rootNode)throw new Error("Root node is required");if(!G.nodes||!Array.isArray(G.nodes))throw new Error("No nodes found in layout data");if(!Array.isArray(G.edges))throw new Error("Edges array is required in layout data");return!0}V(at,"validateLayoutData");var Lt=V(async(G,b,{insertCluster:N,insertEdge:I,insertEdgeLabel:L,insertMarkers:o,insertNode:e,log:t,positionEdgeLabel:i},{algorithm:l})=>{const g={},n={},d=b.select("g");o(d,G.markers,G.type,G.diagramId);const r=d.insert("g").attr("class","subgraphs"),h=d.insert("g").attr("class","edgePaths"),a=d.insert("g").attr("class","edgeLabels"),p=d.insert("g").attr("class","nodes");t.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(G.nodes.map(async u=>{if(u.isGroup){const T={...u};n[u.id]=T,g[u.id]=T,await N(r,u)}else{const T={...u};g[u.id]=T;const y=await e(p,u,{config:G.config,dir:G.direction||"TB"}),O=y.node().getBBox();T.width=O.width,T.height=O.height,T.domId=y,t.debug(`Node ${u.id} dimensions: ${O.width}x${O.height}`)}})),t.debug("Running cose-bilkent layout algorithm");const v={...G,nodes:G.nodes.map(u=>{const T=g[u.id];return{...u,width:T.width,height:T.height}})},D=await st(v,G.config);t.debug("Positioning nodes based on layout results"),D.nodes.forEach(u=>{const T=g[u.id];T?.domId&&(T.domId.attr("transform",`translate(${u.x}, ${u.y})`),T.x=u.x,T.y=u.y,t.debug(`Positioned node ${T.id} at center (${u.x}, ${u.y})`))}),D.edges.forEach(u=>{const T=G.edges.find(y=>y.id===u.id);T&&(T.points=[{x:u.startX,y:u.startY},{x:u.midX,y:u.midY},{x:u.endX,y:u.endY}])}),t.debug("Inserting and positioning edges"),await Promise.all(G.edges.map(async u=>{await L(a,u);const T=g[u.start??""],y=g[u.end??""];if(T&&y){const O=D.edges.find(s=>s.id===u.id);if(O){t.debug("APA01 positionedEdge",O);const s={...u},f=I(h,s,n,G.type,T,y,G.diagramId);i(s,f)}else{const s={...u,points:[{x:T.x||0,y:T.y||0},{x:y.x||0,y:y.y||0}]},f=I(h,s,n,G.type,T,y,G.diagramId);i(s,f)}}})),t.debug("Cose-bilkent rendering completed")},"render"),Nt=Lt;export{Nt as render};
|