@bkm016/basalt 0.1.27 → 0.1.28
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/{chunk-ydhdewcv.js → chunk-4n4wn5cj.js} +1 -1
- package/{chunk-x3g1bzq6.js → chunk-78yngmvf.js} +1 -1
- package/{chunk-jxcghx26.js → chunk-a454ntda.js} +2 -2
- package/compiled.js +1 -1
- package/package.json +1 -1
- package/web/{chunk-45ex0e3e.js → chunk-02z7yrhn.js} +1 -1
- package/web/chunk-02z7yrhn.js.br +0 -0
- package/web/chunk-02z7yrhn.js.gz +0 -0
- package/web/chunk-0an1eqtf.js +1 -0
- package/web/chunk-0an1eqtf.js.br +0 -0
- package/web/chunk-0an1eqtf.js.gz +0 -0
- package/web/{chunk-w2gy2tmp.js → chunk-128zy60g.js} +1 -1
- package/web/chunk-128zy60g.js.br +0 -0
- package/web/chunk-128zy60g.js.gz +0 -0
- package/web/{chunk-1fnxbfkf.js → chunk-1e2jy7m2.js} +1 -1
- package/web/chunk-1e2jy7m2.js.br +0 -0
- package/web/chunk-1e2jy7m2.js.gz +0 -0
- package/web/{chunk-f2bb976c.js → chunk-1v3e001f.js} +1 -1
- package/web/chunk-1v3e001f.js.br +0 -0
- package/web/chunk-1v3e001f.js.gz +0 -0
- package/web/{chunk-whfh2wev.js → chunk-214p3rj6.js} +1 -1
- package/web/chunk-214p3rj6.js.br +0 -0
- package/web/chunk-214p3rj6.js.gz +0 -0
- package/web/{chunk-5h3r1hpg.js → chunk-29byd5kf.js} +1 -1
- package/web/chunk-29byd5kf.js.br +0 -0
- package/web/chunk-29byd5kf.js.gz +0 -0
- package/web/{chunk-b4d1948q.js → chunk-3fbh1wxk.js} +1 -1
- package/web/chunk-3fbh1wxk.js.br +0 -0
- package/web/chunk-3fbh1wxk.js.gz +0 -0
- package/web/{chunk-r97hd8wk.js → chunk-3fnrzj1h.js} +1 -1
- package/web/chunk-3fnrzj1h.js.br +0 -0
- package/web/chunk-3fnrzj1h.js.gz +0 -0
- package/web/{chunk-nymsmy8d.js → chunk-3g1095m7.js} +1 -1
- package/web/chunk-3g1095m7.js.br +0 -0
- package/web/chunk-3g1095m7.js.gz +0 -0
- package/web/{chunk-a1cpkzwh.js → chunk-3nn7w4hw.js} +1 -1
- package/web/chunk-3nn7w4hw.js.br +0 -0
- package/web/chunk-3nn7w4hw.js.gz +0 -0
- package/web/{chunk-vwms8c7b.js → chunk-3qa8xcdr.js} +1 -1
- package/web/chunk-3qa8xcdr.js.br +0 -0
- package/web/chunk-3qa8xcdr.js.gz +0 -0
- package/web/{chunk-ctr4kt7p.js → chunk-3x69jfmh.js} +1 -1
- package/web/chunk-3x69jfmh.js.br +0 -0
- package/web/chunk-3x69jfmh.js.gz +0 -0
- package/web/chunk-4v6m77sv.css +1 -0
- package/web/chunk-4v6m77sv.css.br +0 -0
- package/web/chunk-4v6m77sv.css.gz +0 -0
- package/web/chunk-4vk6xma5.js +1 -0
- package/web/chunk-4vk6xma5.js.br +0 -0
- package/web/chunk-4vk6xma5.js.gz +0 -0
- package/web/{chunk-qa0wwff0.js → chunk-50pdas2t.js} +1 -1
- package/web/chunk-50pdas2t.js.br +0 -0
- package/web/chunk-50pdas2t.js.gz +0 -0
- package/web/{chunk-hxsrph02.js → chunk-56a6zytc.js} +94 -94
- package/web/chunk-56a6zytc.js.br +0 -0
- package/web/chunk-56a6zytc.js.gz +0 -0
- package/web/chunk-5ckj4zez.js +1 -0
- package/web/chunk-5ckj4zez.js.br +2 -0
- package/web/chunk-5ckj4zez.js.gz +0 -0
- package/web/{chunk-xjbxndxz.js → chunk-5mr8z024.js} +1 -1
- package/web/chunk-5mr8z024.js.br +0 -0
- package/web/chunk-5mr8z024.js.gz +0 -0
- package/web/{chunk-df9ja645.js → chunk-5q4pemdh.js} +1 -1
- package/web/chunk-5q4pemdh.js.br +0 -0
- package/web/chunk-5q4pemdh.js.gz +0 -0
- package/web/{chunk-g7b4p9k9.js → chunk-63ft76vs.js} +1 -1
- package/web/chunk-63ft76vs.js.br +0 -0
- package/web/chunk-63ft76vs.js.gz +0 -0
- package/web/chunk-67ynxnvq.js +8 -0
- package/web/chunk-67ynxnvq.js.br +0 -0
- package/web/chunk-67ynxnvq.js.gz +0 -0
- package/web/{chunk-3m2nnnk5.js → chunk-6c2pv79h.js} +1 -1
- package/web/chunk-6c2pv79h.js.br +0 -0
- package/web/chunk-6c2pv79h.js.gz +0 -0
- package/web/{chunk-a31z4c14.js → chunk-77nxgqqb.js} +1 -1
- package/web/chunk-77nxgqqb.js.br +0 -0
- package/web/chunk-77nxgqqb.js.gz +0 -0
- package/web/{chunk-68q4nnmc.js → chunk-7c59jb8d.js} +1 -1
- package/web/chunk-7c59jb8d.js.br +0 -0
- package/web/chunk-7c59jb8d.js.gz +0 -0
- package/web/{chunk-btk2h3vh.js → chunk-7ed5jf6e.js} +1 -1
- package/web/chunk-7ed5jf6e.js.br +0 -0
- package/web/chunk-7ed5jf6e.js.gz +0 -0
- package/web/{chunk-x1gr0017.js → chunk-891bpx3c.js} +1 -1
- package/web/chunk-891bpx3c.js.br +0 -0
- package/web/chunk-891bpx3c.js.gz +0 -0
- package/web/{chunk-jnhem746.js → chunk-8h4dc48v.js} +1 -1
- package/web/chunk-8h4dc48v.js.br +0 -0
- package/web/chunk-8h4dc48v.js.gz +0 -0
- package/web/{chunk-82aqq58f.js → chunk-9bs7khrr.js} +1 -1
- package/web/chunk-9bs7khrr.js.br +0 -0
- package/web/chunk-9bs7khrr.js.gz +0 -0
- package/web/{chunk-3ry5cjnp.js → chunk-9ctyqr3n.js} +1 -1
- package/web/chunk-9ctyqr3n.js.br +0 -0
- package/web/chunk-9ctyqr3n.js.gz +0 -0
- package/web/{chunk-508cpafz.js → chunk-9qdx0ekk.js} +2 -2
- package/web/chunk-9qdx0ekk.js.br +0 -0
- package/web/chunk-9qdx0ekk.js.gz +0 -0
- package/web/{chunk-023b3kdx.js → chunk-9r0rnt6d.js} +1 -1
- package/web/chunk-9r0rnt6d.js.br +0 -0
- package/web/chunk-9r0rnt6d.js.gz +0 -0
- package/web/chunk-ac9g3w7v.js +1 -0
- package/web/chunk-ac9g3w7v.js.br +0 -0
- package/web/chunk-ac9g3w7v.js.gz +0 -0
- package/web/{chunk-mvm0gvwj.js → chunk-ackts7ph.js} +1 -1
- package/web/chunk-ackts7ph.js.br +0 -0
- package/web/chunk-ackts7ph.js.gz +0 -0
- package/web/{chunk-wjecy48x.js → chunk-asyqrf38.js} +1 -1
- package/web/chunk-asyqrf38.js.br +0 -0
- package/web/chunk-asyqrf38.js.gz +0 -0
- package/web/{chunk-jw92texh.js → chunk-b13crsv9.js} +1 -1
- package/web/chunk-b13crsv9.js.br +0 -0
- package/web/chunk-b13crsv9.js.gz +0 -0
- package/web/{chunk-nxnkb0w4.js → chunk-brg2zcv5.js} +1 -1
- package/web/chunk-brg2zcv5.js.br +0 -0
- package/web/chunk-brg2zcv5.js.gz +0 -0
- package/web/{chunk-6ktmzq32.js → chunk-cgwnzse1.js} +1 -1
- package/web/chunk-cgwnzse1.js.br +0 -0
- package/web/chunk-cgwnzse1.js.gz +0 -0
- package/web/{chunk-gxwsf4t1.js → chunk-cm4fjb6j.js} +1 -1
- package/web/chunk-cm4fjb6j.js.br +0 -0
- package/web/chunk-cm4fjb6j.js.gz +0 -0
- package/web/{chunk-n0fqhrqv.js → chunk-djrvdzsb.js} +1 -1
- package/web/chunk-djrvdzsb.js.br +0 -0
- package/web/chunk-djrvdzsb.js.gz +0 -0
- package/web/{chunk-7rs26q98.js → chunk-dsffzc1e.js} +1 -1
- package/web/chunk-dsffzc1e.js.br +0 -0
- package/web/chunk-dsffzc1e.js.gz +0 -0
- package/web/{chunk-wqmyjj6w.js → chunk-e1wy8050.js} +1 -1
- package/web/chunk-e1wy8050.js.br +0 -0
- package/web/chunk-e1wy8050.js.gz +0 -0
- package/web/{chunk-z04ncfs3.js → chunk-ebknmxdp.js} +1 -1
- package/web/chunk-ebknmxdp.js.br +0 -0
- package/web/chunk-ebknmxdp.js.gz +0 -0
- package/web/{chunk-crfbqd4d.js → chunk-egjv760p.js} +1 -1
- package/web/chunk-egjv760p.js.br +0 -0
- package/web/chunk-egjv760p.js.gz +0 -0
- package/web/chunk-etpd8y98.js +1 -0
- package/web/chunk-etpd8y98.js.br +0 -0
- package/web/chunk-etpd8y98.js.gz +0 -0
- package/web/chunk-f5kr9p2k.js +1 -0
- package/web/chunk-f5kr9p2k.js.br +2 -0
- package/web/chunk-f5kr9p2k.js.gz +0 -0
- package/web/{chunk-1qd75yjn.js → chunk-fjhqg9ag.js} +1 -1
- package/web/chunk-fjhqg9ag.js.br +0 -0
- package/web/chunk-fjhqg9ag.js.gz +0 -0
- package/web/{chunk-zapwrc5k.js → chunk-fyr6rm2p.js} +1 -1
- package/web/chunk-fyr6rm2p.js.br +0 -0
- package/web/chunk-fyr6rm2p.js.gz +0 -0
- package/web/chunk-grjq1g15.js +1 -0
- package/web/chunk-grjq1g15.js.br +0 -0
- package/web/chunk-grjq1g15.js.gz +0 -0
- package/web/{chunk-eq59kad4.js → chunk-h4bzgvbg.js} +2 -2
- package/web/chunk-h4bzgvbg.js.br +0 -0
- package/web/chunk-h4bzgvbg.js.gz +0 -0
- package/web/{chunk-dy2egpw5.js → chunk-heen0v5d.js} +1 -1
- package/web/chunk-heen0v5d.js.br +0 -0
- package/web/chunk-heen0v5d.js.gz +0 -0
- package/web/{chunk-sb61aqg8.js → chunk-henez15c.js} +1 -1
- package/web/chunk-henez15c.js.br +0 -0
- package/web/chunk-henez15c.js.gz +0 -0
- package/web/chunk-hpcvwdkg.js +1 -0
- package/web/chunk-hpcvwdkg.js.br +0 -0
- package/web/chunk-hpcvwdkg.js.gz +0 -0
- package/web/{chunk-g0s2xxfd.js → chunk-hpvyk6rz.js} +1 -1
- package/web/chunk-hpvyk6rz.js.br +0 -0
- package/web/chunk-hpvyk6rz.js.gz +0 -0
- package/web/chunk-j0dyf1g8.js +2 -0
- package/web/chunk-j0dyf1g8.js.br +3 -0
- package/web/chunk-j0dyf1g8.js.gz +0 -0
- package/web/{chunk-b07y0tzq.js → chunk-jb89v31q.js} +1 -1
- package/web/chunk-jb89v31q.js.br +0 -0
- package/web/chunk-jb89v31q.js.gz +0 -0
- package/web/{chunk-xsfmh8rr.js → chunk-jb949ewp.js} +1 -1
- package/web/chunk-jb949ewp.js.br +0 -0
- package/web/chunk-jb949ewp.js.gz +0 -0
- package/web/{chunk-n1p03ng0.js → chunk-je4bf95v.js} +1 -1
- package/web/chunk-je4bf95v.js.br +0 -0
- package/web/chunk-je4bf95v.js.gz +0 -0
- package/web/{chunk-wv83gygp.js → chunk-js6c1973.js} +1 -1
- package/web/chunk-js6c1973.js.br +0 -0
- package/web/chunk-js6c1973.js.gz +0 -0
- package/web/chunk-k140nr54.js +1 -0
- package/web/chunk-k140nr54.js.br +0 -0
- package/web/chunk-k140nr54.js.gz +0 -0
- package/web/{chunk-hh6vpvar.js → chunk-kknrn2wb.js} +1 -1
- package/web/chunk-kknrn2wb.js.br +0 -0
- package/web/chunk-kknrn2wb.js.gz +0 -0
- package/web/{chunk-ghr3jf15.js → chunk-mhtzdq9d.js} +1 -1
- package/web/chunk-mhtzdq9d.js.br +0 -0
- package/web/chunk-mhtzdq9d.js.gz +0 -0
- package/web/{chunk-22jfhjk3.js → chunk-mrnj2k3v.js} +1 -1
- package/web/chunk-mrnj2k3v.js.br +0 -0
- package/web/chunk-mrnj2k3v.js.gz +0 -0
- package/web/{chunk-g1k9nggh.js → chunk-my0k5w7f.js} +1 -1
- package/web/chunk-my0k5w7f.js.br +0 -0
- package/web/chunk-my0k5w7f.js.gz +0 -0
- package/web/{chunk-58gh3tbh.js → chunk-n08727ym.js} +1 -1
- package/web/chunk-n08727ym.js.br +0 -0
- package/web/chunk-n08727ym.js.gz +0 -0
- package/web/{chunk-d7nrrcwp.js → chunk-n5ghyxwk.js} +1 -1
- package/web/chunk-n5ghyxwk.js.br +0 -0
- package/web/chunk-n5ghyxwk.js.gz +0 -0
- package/web/{chunk-3crfxxst.js → chunk-nt21rjrm.js} +2 -2
- package/web/chunk-nt21rjrm.js.br +0 -0
- package/web/chunk-nt21rjrm.js.gz +0 -0
- package/web/{chunk-j2gkg76r.js → chunk-nzgj9qx5.js} +1 -1
- package/web/chunk-nzgj9qx5.js.br +0 -0
- package/web/chunk-nzgj9qx5.js.gz +0 -0
- package/web/{chunk-20v068s6.js → chunk-p9wm0dv3.js} +1 -1
- package/web/chunk-p9wm0dv3.js.br +0 -0
- package/web/chunk-p9wm0dv3.js.gz +0 -0
- package/web/{chunk-xa9m0mh2.js → chunk-pqh9yszs.js} +1 -1
- package/web/chunk-pqh9yszs.js.br +0 -0
- package/web/chunk-pqh9yszs.js.gz +0 -0
- package/web/chunk-q0vsqq43.js +1 -0
- package/web/chunk-q0vsqq43.js.br +0 -0
- package/web/chunk-q0vsqq43.js.gz +0 -0
- package/web/{chunk-tefm9md2.js → chunk-qv5d69fn.js} +1 -1
- package/web/chunk-qv5d69fn.js.br +0 -0
- package/web/chunk-qv5d69fn.js.gz +0 -0
- package/web/{chunk-37hn49td.js → chunk-r7afv22v.js} +1 -1
- package/web/chunk-r7afv22v.js.br +0 -0
- package/web/chunk-r7afv22v.js.gz +0 -0
- package/web/{chunk-6x9r1z9z.js → chunk-rc6at4k5.js} +1 -1
- package/web/chunk-rc6at4k5.js.br +0 -0
- package/web/chunk-rc6at4k5.js.gz +0 -0
- package/web/{chunk-n033azqs.js → chunk-rnsvrehz.js} +1 -1
- package/web/chunk-rnsvrehz.js.br +0 -0
- package/web/chunk-rnsvrehz.js.gz +0 -0
- package/web/chunk-rsmhn1fq.js +1 -0
- package/web/chunk-rsmhn1fq.js.br +0 -0
- package/web/chunk-rsmhn1fq.js.gz +0 -0
- package/web/chunk-s1p271av.js +1 -0
- package/web/chunk-s1p271av.js.br +0 -0
- package/web/chunk-s1p271av.js.gz +0 -0
- package/web/chunk-sc4kwbnh.js +1 -0
- package/web/chunk-sc4kwbnh.js.br +2 -0
- package/web/chunk-sc4kwbnh.js.gz +0 -0
- package/web/{chunk-cgt871p9.js → chunk-scebh2ee.js} +1 -1
- package/web/chunk-scebh2ee.js.br +0 -0
- package/web/chunk-scebh2ee.js.gz +0 -0
- package/web/{chunk-c1s7faqj.js → chunk-shtkgxz6.js} +1 -1
- package/web/chunk-shtkgxz6.js.br +0 -0
- package/web/chunk-shtkgxz6.js.gz +0 -0
- package/web/{chunk-nb73fq72.js → chunk-spmfwbhd.js} +1 -1
- package/web/chunk-spmfwbhd.js.br +0 -0
- package/web/chunk-spmfwbhd.js.gz +0 -0
- package/web/chunk-svtenejf.js +1 -0
- package/web/chunk-svtenejf.js.br +0 -0
- package/web/chunk-svtenejf.js.gz +0 -0
- package/web/{chunk-qtwjt5mm.js → chunk-t9z1bp8j.js} +1 -1
- package/web/chunk-t9z1bp8j.js.br +0 -0
- package/web/chunk-t9z1bp8j.js.gz +0 -0
- package/web/chunk-tnttdgsc.js +1 -0
- package/web/chunk-tnttdgsc.js.br +0 -0
- package/web/chunk-tnttdgsc.js.gz +0 -0
- package/web/{chunk-6wxxypbv.js → chunk-txdkp6yc.js} +1 -1
- package/web/chunk-txdkp6yc.js.br +0 -0
- package/web/chunk-txdkp6yc.js.gz +0 -0
- package/web/{chunk-gv4zh4er.js → chunk-v34mwgx8.js} +1 -1
- package/web/chunk-v34mwgx8.js.br +0 -0
- package/web/chunk-v34mwgx8.js.gz +0 -0
- package/web/{chunk-00a6amwf.js → chunk-vtp01n96.js} +1 -1
- package/web/chunk-vtp01n96.js.br +0 -0
- package/web/chunk-vtp01n96.js.gz +0 -0
- package/web/{chunk-zs7physk.js → chunk-vx1qmkbm.js} +1 -1
- package/web/chunk-vx1qmkbm.js.br +0 -0
- package/web/chunk-vx1qmkbm.js.gz +0 -0
- package/web/chunk-vxx451tt.js +1 -0
- package/web/chunk-vxx451tt.js.br +0 -0
- package/web/chunk-vxx451tt.js.gz +0 -0
- package/web/{chunk-hxqqy585.js → chunk-w8epfc0c.js} +1 -1
- package/web/chunk-w8epfc0c.js.br +0 -0
- package/web/chunk-w8epfc0c.js.gz +0 -0
- package/web/{chunk-shtvhd61.js → chunk-whgh2r7d.js} +1 -1
- package/web/chunk-whgh2r7d.js.br +0 -0
- package/web/chunk-whgh2r7d.js.gz +0 -0
- package/web/chunk-x0p1n5ws.js +1 -0
- package/web/chunk-x0p1n5ws.js.br +2 -0
- package/web/chunk-x0p1n5ws.js.gz +0 -0
- package/web/{chunk-jcbheqv1.js → chunk-x2tk9zeq.js} +1 -1
- package/web/chunk-x2tk9zeq.js.br +0 -0
- package/web/chunk-x2tk9zeq.js.gz +0 -0
- package/web/chunk-xbt045kt.js +1 -0
- package/web/chunk-xbt045kt.js.br +2 -0
- package/web/chunk-xbt045kt.js.gz +0 -0
- package/web/{chunk-f05s9gsw.js → chunk-xh3agbvb.js} +1 -1
- package/web/chunk-xh3agbvb.js.br +0 -0
- package/web/chunk-xh3agbvb.js.gz +0 -0
- package/web/{chunk-407zrkgx.js → chunk-xpw1spgj.js} +1 -1
- package/web/chunk-xpw1spgj.js.br +0 -0
- package/web/chunk-xpw1spgj.js.gz +0 -0
- package/web/{chunk-scwrkcdw.js → chunk-yp2jydfj.js} +1 -1
- package/web/chunk-yp2jydfj.js.br +0 -0
- package/web/chunk-yp2jydfj.js.gz +0 -0
- package/web/{chunk-g26mzwzc.js → chunk-yxp1es3b.js} +1 -1
- package/web/chunk-yxp1es3b.js.br +0 -0
- package/web/chunk-yxp1es3b.js.gz +0 -0
- package/web/{chunk-fmbc7t17.js → chunk-yzrww95m.js} +1 -1
- package/web/chunk-yzrww95m.js.br +0 -0
- package/web/chunk-yzrww95m.js.gz +0 -0
- package/web/{chunk-qgv81n98.js → chunk-z502b5p0.js} +1 -1
- package/web/chunk-z502b5p0.js.br +0 -0
- package/web/chunk-z502b5p0.js.gz +0 -0
- package/web/chunk-zny7cya7.js +1 -0
- package/web/chunk-zny7cya7.js.br +2 -0
- package/web/chunk-zny7cya7.js.gz +0 -0
- package/web/index.html +1 -1
- package/web/index.html.br +0 -0
- package/web/index.html.gz +0 -0
- package/web/chunk-00a6amwf.js.br +0 -0
- package/web/chunk-00a6amwf.js.gz +0 -0
- package/web/chunk-023b3kdx.js.br +0 -0
- package/web/chunk-023b3kdx.js.gz +0 -0
- package/web/chunk-1bzdt1n8.js +0 -1
- package/web/chunk-1bzdt1n8.js.br +0 -2
- package/web/chunk-1bzdt1n8.js.gz +0 -0
- package/web/chunk-1fnxbfkf.js.br +0 -0
- package/web/chunk-1fnxbfkf.js.gz +0 -0
- package/web/chunk-1qd75yjn.js.br +0 -0
- package/web/chunk-1qd75yjn.js.gz +0 -0
- package/web/chunk-20v068s6.js.br +0 -0
- package/web/chunk-20v068s6.js.gz +0 -0
- package/web/chunk-22jfhjk3.js.br +0 -0
- package/web/chunk-22jfhjk3.js.gz +0 -0
- package/web/chunk-37hn49td.js.br +0 -0
- package/web/chunk-37hn49td.js.gz +0 -0
- package/web/chunk-3crfxxst.js.br +0 -0
- package/web/chunk-3crfxxst.js.gz +0 -0
- package/web/chunk-3hg9a6xa.js +0 -1
- package/web/chunk-3hg9a6xa.js.br +0 -0
- package/web/chunk-3hg9a6xa.js.gz +0 -0
- package/web/chunk-3m2nnnk5.js.br +0 -0
- package/web/chunk-3m2nnnk5.js.gz +0 -0
- package/web/chunk-3ry5cjnp.js.br +0 -0
- package/web/chunk-3ry5cjnp.js.gz +0 -0
- package/web/chunk-407zrkgx.js.br +0 -0
- package/web/chunk-407zrkgx.js.gz +0 -0
- package/web/chunk-43e1ste5.js +0 -1
- package/web/chunk-43e1ste5.js.br +0 -0
- package/web/chunk-43e1ste5.js.gz +0 -0
- package/web/chunk-45ex0e3e.js.br +0 -0
- package/web/chunk-45ex0e3e.js.gz +0 -0
- package/web/chunk-508cpafz.js.br +0 -0
- package/web/chunk-508cpafz.js.gz +0 -0
- package/web/chunk-538r4sey.js +0 -1
- package/web/chunk-538r4sey.js.br +0 -0
- package/web/chunk-538r4sey.js.gz +0 -0
- package/web/chunk-55zs0yq1.js +0 -1
- package/web/chunk-55zs0yq1.js.br +0 -0
- package/web/chunk-55zs0yq1.js.gz +0 -0
- package/web/chunk-58gh3tbh.js.br +0 -0
- package/web/chunk-58gh3tbh.js.gz +0 -0
- package/web/chunk-5h3r1hpg.js.br +0 -0
- package/web/chunk-5h3r1hpg.js.gz +0 -0
- package/web/chunk-68q4nnmc.js.br +0 -3
- package/web/chunk-68q4nnmc.js.gz +0 -0
- package/web/chunk-6ktmzq32.js.br +0 -0
- package/web/chunk-6ktmzq32.js.gz +0 -0
- package/web/chunk-6ry6x1ez.js +0 -1
- package/web/chunk-6ry6x1ez.js.br +0 -0
- package/web/chunk-6ry6x1ez.js.gz +0 -0
- package/web/chunk-6wxxypbv.js.br +0 -0
- package/web/chunk-6wxxypbv.js.gz +0 -0
- package/web/chunk-6x9r1z9z.js.br +0 -0
- package/web/chunk-6x9r1z9z.js.gz +0 -0
- package/web/chunk-7devrtv4.js +0 -2
- package/web/chunk-7devrtv4.js.br +0 -3
- package/web/chunk-7devrtv4.js.gz +0 -0
- package/web/chunk-7rs26q98.js.br +0 -0
- package/web/chunk-7rs26q98.js.gz +0 -0
- package/web/chunk-82aqq58f.js.br +0 -0
- package/web/chunk-82aqq58f.js.gz +0 -0
- package/web/chunk-a1cpkzwh.js.br +0 -0
- package/web/chunk-a1cpkzwh.js.gz +0 -0
- package/web/chunk-a31z4c14.js.br +0 -0
- package/web/chunk-a31z4c14.js.gz +0 -0
- package/web/chunk-b07y0tzq.js.br +0 -0
- package/web/chunk-b07y0tzq.js.gz +0 -0
- package/web/chunk-b4d1948q.js.br +0 -0
- package/web/chunk-b4d1948q.js.gz +0 -0
- package/web/chunk-btk2h3vh.js.br +0 -0
- package/web/chunk-btk2h3vh.js.gz +0 -0
- package/web/chunk-c1s7faqj.js.br +0 -0
- package/web/chunk-c1s7faqj.js.gz +0 -0
- package/web/chunk-cgt871p9.js.br +0 -0
- package/web/chunk-cgt871p9.js.gz +0 -0
- package/web/chunk-crfbqd4d.js.br +0 -0
- package/web/chunk-crfbqd4d.js.gz +0 -0
- package/web/chunk-ctr4kt7p.js.br +0 -0
- package/web/chunk-ctr4kt7p.js.gz +0 -0
- package/web/chunk-d6wcabaa.css +0 -1
- package/web/chunk-d6wcabaa.css.br +0 -0
- package/web/chunk-d6wcabaa.css.gz +0 -0
- package/web/chunk-d7nrrcwp.js.br +0 -0
- package/web/chunk-d7nrrcwp.js.gz +0 -0
- package/web/chunk-df9ja645.js.br +0 -0
- package/web/chunk-df9ja645.js.gz +0 -0
- package/web/chunk-dhxc6xe9.js +0 -1
- package/web/chunk-dhxc6xe9.js.br +0 -2
- package/web/chunk-dhxc6xe9.js.gz +0 -0
- package/web/chunk-dy2egpw5.js.br +0 -0
- package/web/chunk-dy2egpw5.js.gz +0 -0
- package/web/chunk-eq59kad4.js.br +0 -0
- package/web/chunk-eq59kad4.js.gz +0 -0
- package/web/chunk-f05s9gsw.js.br +0 -0
- package/web/chunk-f05s9gsw.js.gz +0 -0
- package/web/chunk-f2bb976c.js.br +0 -0
- package/web/chunk-f2bb976c.js.gz +0 -0
- package/web/chunk-f4aabnnv.js +0 -1
- package/web/chunk-f4aabnnv.js.br +0 -0
- package/web/chunk-f4aabnnv.js.gz +0 -0
- package/web/chunk-fmbc7t17.js.br +0 -0
- package/web/chunk-fmbc7t17.js.gz +0 -0
- package/web/chunk-g0s2xxfd.js.br +0 -0
- package/web/chunk-g0s2xxfd.js.gz +0 -0
- package/web/chunk-g1k9nggh.js.br +0 -0
- package/web/chunk-g1k9nggh.js.gz +0 -0
- package/web/chunk-g26mzwzc.js.br +0 -0
- package/web/chunk-g26mzwzc.js.gz +0 -0
- package/web/chunk-g7b4p9k9.js.br +0 -0
- package/web/chunk-g7b4p9k9.js.gz +0 -0
- package/web/chunk-ghr3jf15.js.br +0 -0
- package/web/chunk-ghr3jf15.js.gz +0 -0
- package/web/chunk-gv4zh4er.js.br +0 -0
- package/web/chunk-gv4zh4er.js.gz +0 -0
- package/web/chunk-gw0e69yj.js +0 -1
- package/web/chunk-gw0e69yj.js.br +0 -0
- package/web/chunk-gw0e69yj.js.gz +0 -0
- package/web/chunk-gxwsf4t1.js.br +0 -0
- package/web/chunk-gxwsf4t1.js.gz +0 -0
- package/web/chunk-hh6vpvar.js.br +0 -0
- package/web/chunk-hh6vpvar.js.gz +0 -0
- package/web/chunk-hxqqy585.js.br +0 -0
- package/web/chunk-hxqqy585.js.gz +0 -0
- package/web/chunk-hxsrph02.js.br +0 -0
- package/web/chunk-hxsrph02.js.gz +0 -0
- package/web/chunk-hxx6ad4x.js +0 -1
- package/web/chunk-hxx6ad4x.js.br +0 -0
- package/web/chunk-hxx6ad4x.js.gz +0 -0
- package/web/chunk-j2gkg76r.js.br +0 -0
- package/web/chunk-j2gkg76r.js.gz +0 -0
- package/web/chunk-jcbheqv1.js.br +0 -0
- package/web/chunk-jcbheqv1.js.gz +0 -0
- package/web/chunk-jhx6v9es.js +0 -1
- package/web/chunk-jhx6v9es.js.br +0 -0
- package/web/chunk-jhx6v9es.js.gz +0 -0
- package/web/chunk-jnhem746.js.br +0 -0
- package/web/chunk-jnhem746.js.gz +0 -0
- package/web/chunk-jr796qsk.js +0 -1
- package/web/chunk-jr796qsk.js.br +0 -0
- package/web/chunk-jr796qsk.js.gz +0 -0
- package/web/chunk-jw92texh.js.br +0 -0
- package/web/chunk-jw92texh.js.gz +0 -0
- package/web/chunk-mvm0gvwj.js.br +0 -0
- package/web/chunk-mvm0gvwj.js.gz +0 -0
- package/web/chunk-n033azqs.js.br +0 -0
- package/web/chunk-n033azqs.js.gz +0 -0
- package/web/chunk-n0fqhrqv.js.br +0 -0
- package/web/chunk-n0fqhrqv.js.gz +0 -0
- package/web/chunk-n1p03ng0.js.br +0 -0
- package/web/chunk-n1p03ng0.js.gz +0 -0
- package/web/chunk-nb73fq72.js.br +0 -0
- package/web/chunk-nb73fq72.js.gz +0 -0
- package/web/chunk-nxnkb0w4.js.br +0 -0
- package/web/chunk-nxnkb0w4.js.gz +0 -0
- package/web/chunk-nymsmy8d.js.br +0 -0
- package/web/chunk-nymsmy8d.js.gz +0 -0
- package/web/chunk-nzqxb0ea.js +0 -1
- package/web/chunk-nzqxb0ea.js.br +0 -0
- package/web/chunk-nzqxb0ea.js.gz +0 -0
- package/web/chunk-p26b4zdm.js +0 -1
- package/web/chunk-p26b4zdm.js.br +0 -0
- package/web/chunk-p26b4zdm.js.gz +0 -0
- package/web/chunk-qa0wwff0.js.br +0 -0
- package/web/chunk-qa0wwff0.js.gz +0 -0
- package/web/chunk-qgv81n98.js.br +0 -0
- package/web/chunk-qgv81n98.js.gz +0 -0
- package/web/chunk-qtwjt5mm.js.br +0 -0
- package/web/chunk-qtwjt5mm.js.gz +0 -0
- package/web/chunk-r49dy5vx.js +0 -1
- package/web/chunk-r49dy5vx.js.br +0 -0
- package/web/chunk-r49dy5vx.js.gz +0 -0
- package/web/chunk-r97hd8wk.js.br +0 -0
- package/web/chunk-r97hd8wk.js.gz +0 -0
- package/web/chunk-sb61aqg8.js.br +0 -0
- package/web/chunk-sb61aqg8.js.gz +0 -0
- package/web/chunk-scwrkcdw.js.br +0 -0
- package/web/chunk-scwrkcdw.js.gz +0 -0
- package/web/chunk-shtvhd61.js.br +0 -0
- package/web/chunk-shtvhd61.js.gz +0 -0
- package/web/chunk-t5e9vh89.js +0 -1
- package/web/chunk-t5e9vh89.js.br +0 -0
- package/web/chunk-t5e9vh89.js.gz +0 -0
- package/web/chunk-tefm9md2.js.br +0 -0
- package/web/chunk-tefm9md2.js.gz +0 -0
- package/web/chunk-tr7fg3tv.js +0 -8
- package/web/chunk-tr7fg3tv.js.br +0 -0
- package/web/chunk-tr7fg3tv.js.gz +0 -0
- package/web/chunk-v5xf47q0.js +0 -1
- package/web/chunk-v5xf47q0.js.br +0 -0
- package/web/chunk-v5xf47q0.js.gz +0 -0
- package/web/chunk-vwms8c7b.js.br +0 -0
- package/web/chunk-vwms8c7b.js.gz +0 -0
- package/web/chunk-w2gy2tmp.js.br +0 -0
- package/web/chunk-w2gy2tmp.js.gz +0 -0
- package/web/chunk-whfh2wev.js.br +0 -0
- package/web/chunk-whfh2wev.js.gz +0 -0
- package/web/chunk-wjecy48x.js.br +0 -0
- package/web/chunk-wjecy48x.js.gz +0 -0
- package/web/chunk-wqmyjj6w.js.br +0 -0
- package/web/chunk-wqmyjj6w.js.gz +0 -0
- package/web/chunk-wv83gygp.js.br +0 -0
- package/web/chunk-wv83gygp.js.gz +0 -0
- package/web/chunk-x1gr0017.js.br +0 -0
- package/web/chunk-x1gr0017.js.gz +0 -0
- package/web/chunk-xa9m0mh2.js.br +0 -0
- package/web/chunk-xa9m0mh2.js.gz +0 -0
- package/web/chunk-xjbxndxz.js.br +0 -0
- package/web/chunk-xjbxndxz.js.gz +0 -0
- package/web/chunk-xsfmh8rr.js.br +0 -0
- package/web/chunk-xsfmh8rr.js.gz +0 -0
- package/web/chunk-xvsb3w1f.js +0 -1
- package/web/chunk-xvsb3w1f.js.br +0 -0
- package/web/chunk-xvsb3w1f.js.gz +0 -0
- package/web/chunk-ynpx7j96.js +0 -1
- package/web/chunk-ynpx7j96.js.br +0 -0
- package/web/chunk-ynpx7j96.js.gz +0 -0
- package/web/chunk-z04ncfs3.js.br +0 -0
- package/web/chunk-z04ncfs3.js.gz +0 -0
- package/web/chunk-zapwrc5k.js.br +0 -0
- package/web/chunk-zapwrc5k.js.gz +0 -0
- package/web/chunk-zs7physk.js.br +0 -0
- package/web/chunk-zs7physk.js.gz +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{ms,Er,Yi,fs,Zr,hs,gi}from"./chunk-hxsrph02.js";var S=class extends Error{constructor(t){super(t);this.name="ShikiError"}};function tn(t){return Ne(t)}function Ne(t){if(Array.isArray(t))return nn(t);if(t instanceof RegExp)return t;if(typeof t==="object")return rn(t);return t}function nn(t){let e=[];for(let n=0,r=t.length;n<r;n++)e[n]=Ne(t[n]);return e}function rn(t){let e={};for(let n in t)e[n]=Ne(t[n]);return e}function Ve(t,...e){return e.forEach((n)=>{for(let r in n)t[r]=n[r]}),t}function Ye(t){let e=~t.lastIndexOf("/")||~t.lastIndexOf("\\");if(e===0)return t;else if(~e===t.length-1)return Ye(t.substring(0,t.length-1));else return t.substr(~e+1)}var ye=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,J=class{static hasCaptures(t){if(t===null)return!1;return ye.lastIndex=0,ye.test(t)}static replaceCaptures(t,e,n){return t.replace(ye,(r,s,i,o)=>{let a=n[parseInt(s||i,10)];if(a){let c=e.substring(a.start,a.end);while(c[0]===".")c=c.substring(1);switch(o){case"downcase":return c.toLowerCase();case"upcase":return c.toUpperCase();default:return c}}else return r})}};function Je(t,e){if(t<e)return-1;if(t>e)return 1;return 0}function Qe(t,e){if(t===null&&e===null)return 0;if(!t)return-1;if(!e)return 1;let n=t.length,r=e.length;if(n===r){for(let s=0;s<n;s++){let i=Je(t[s],e[s]);if(i!==0)return i}return 0}return n-r}function Fe(t){if(/^#[0-9a-f]{6}$/i.test(t))return!0;if(/^#[0-9a-f]{8}$/i.test(t))return!0;if(/^#[0-9a-f]{3}$/i.test(t))return!0;if(/^#[0-9a-f]{4}$/i.test(t))return!0;return!1}function Xe(t){return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var Ze=class{constructor(t){this.fn=t}cache=new Map;get(t){if(this.cache.has(t))return this.cache.get(t);let e=this.fn(t);return this.cache.set(t,e),e}},M=class{constructor(t,e,n){this._colorMap=t,this._defaults=e,this._root=n}static createFromRawTheme(t,e){return this.createFromParsedTheme(an(t),e)}static createFromParsedTheme(t,e){return ln(t,e)}_cachedMatchRoot=new Ze((t)=>this._root.match(t));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(t){if(t===null)return this._defaults;let e=t.scopeName,r=this._cachedMatchRoot.get(e).find((s)=>sn(t.parent,s.parentScopes));if(!r)return null;return new et(r.fontStyle,r.foreground,r.background)}},be=class t{constructor(e,n){this.parent=e,this.scopeName=n}static push(e,n){for(let r of n)e=new t(e,r);return e}static from(...e){let n=null;for(let r=0;r<e.length;r++)n=new t(n,e[r]);return n}push(e){return new t(this,e)}getSegments(){let e=this,n=[];while(e)n.push(e.scopeName),e=e.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(e){if(this===e)return!0;if(this.parent===null)return!1;return this.parent.extends(e)}getExtensionIfDefined(e){let n=[],r=this;while(r&&r!==e)n.push(r.scopeName),r=r.parent;return r===e?n.reverse():void 0}};function sn(t,e){if(e.length===0)return!0;for(let n=0;n<e.length;n++){let r=e[n],s=!1;if(r===">"){if(n===e.length-1)return!1;r=e[++n],s=!0}while(t){if(on(t.scopeName,r))break;if(s)return!1;t=t.parent}if(!t)return!1;t=t.parent}return!0}function on(t,e){return e===t||t.startsWith(e)&&t[e.length]==="."}var et=class{constructor(t,e,n){this.fontStyle=t,this.foregroundId=e,this.backgroundId=n}};function an(t){if(!t)return[];if(!t.settings||!Array.isArray(t.settings))return[];let e=t.settings,n=[],r=0;for(let s=0,i=e.length;s<i;s++){let o=e[s];if(!o.settings)continue;let a;if(typeof o.scope==="string"){let h=o.scope;h=h.replace(/^[,]+/,""),h=h.replace(/[,]+$/,""),a=h.split(",")}else if(Array.isArray(o.scope))a=o.scope;else a=[""];let c=-1;if(typeof o.settings.fontStyle==="string"){c=0;let h=o.settings.fontStyle.split(" ");for(let d=0,f=h.length;d<f;d++)switch(h[d]){case"italic":c=c|1;break;case"bold":c=c|2;break;case"underline":c=c|4;break;case"strikethrough":c=c|8;break}}let l=null;if(typeof o.settings.foreground==="string"&&Fe(o.settings.foreground))l=o.settings.foreground;let u=null;if(typeof o.settings.background==="string"&&Fe(o.settings.background))u=o.settings.background;for(let h=0,d=a.length;h<d;h++){let m=a[h].trim().split(" "),y=m[m.length-1],_=null;if(m.length>1)_=m.slice(0,m.length-1),_.reverse();n[r++]=new cn(y,_,s,c,l,u)}}return n}var cn=class{constructor(t,e,n,r,s,i){this.scope=t,this.parentScopes=e,this.index=n,this.fontStyle=r,this.foreground=s,this.background=i}},k=((t)=>(t[t.NotSet=-1]="NotSet",t[t.None=0]="None",t[t.Italic=1]="Italic",t[t.Bold=2]="Bold",t[t.Underline=4]="Underline",t[t.Strikethrough=8]="Strikethrough",t))(k||{});function ln(t,e){t.sort((c,l)=>{let u=Je(c.scope,l.scope);if(u!==0)return u;if(u=Qe(c.parentScopes,l.parentScopes),u!==0)return u;return c.index-l.index});let n=0,r="#000000",s="#ffffff";while(t.length>=1&&t[0].scope===""){let c=t.shift();if(c.fontStyle!==-1)n=c.fontStyle;if(c.foreground!==null)r=c.foreground;if(c.background!==null)s=c.background}let i=new un(e),o=new et(n,i.getId(r),i.getId(s)),a=new fn(new we(0,null,-1,0,0),[]);for(let c=0,l=t.length;c<l;c++){let u=t[c];a.insert(0,u.scope,u.parentScopes,u.fontStyle,i.getId(u.foreground),i.getId(u.background))}return new M(i,o,a)}var un=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(t){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(t)){this._isFrozen=!0;for(let e=0,n=t.length;e<n;e++)this._color2id[t[e]]=e,this._id2color[e]=t[e]}else this._isFrozen=!1}getId(t){if(t===null)return 0;t=t.toUpperCase();let e=this._color2id[t];if(e)return e;if(this._isFrozen)throw Error(`Missing color in color map - ${t}`);return e=++this._lastColorId,this._color2id[t]=e,this._id2color[e]=t,e}getColorMap(){return this._id2color.slice(0)}},hn=Object.freeze([]),we=class t{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,n,r,s,i){this.scopeDepth=e,this.parentScopes=n||hn,this.fontStyle=r,this.foreground=s,this.background=i}clone(){return new t(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let n=[];for(let r=0,s=e.length;r<s;r++)n[r]=e[r].clone();return n}acceptOverwrite(e,n,r,s){if(this.scopeDepth>e)console.log("how did this happen?");else this.scopeDepth=e;if(n!==-1)this.fontStyle=n;if(r!==0)this.foreground=r;if(s!==0)this.background=s}},fn=class t{constructor(e,n=[],r={}){this._mainRule=e,this._children=r,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(e,n){if(e.scopeDepth!==n.scopeDepth)return n.scopeDepth-e.scopeDepth;let r=0,s=0;while(!0){if(e.parentScopes[r]===">")r++;if(n.parentScopes[s]===">")s++;if(r>=e.parentScopes.length||s>=n.parentScopes.length)break;let i=n.parentScopes[s].length-e.parentScopes[r].length;if(i!==0)return i;r++,s++}return n.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let r=e.indexOf("."),s,i;if(r===-1)s=e,i="";else s=e.substring(0,r),i=e.substring(r+1);if(this._children.hasOwnProperty(s))return this._children[s].match(i)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(t._cmpBySpecificity),n}insert(e,n,r,s,i,o){if(n===""){this._doInsertHere(e,r,s,i,o);return}let a=n.indexOf("."),c,l;if(a===-1)c=n,l="";else c=n.substring(0,a),l=n.substring(a+1);let u;if(this._children.hasOwnProperty(c))u=this._children[c];else u=new t(this._mainRule.clone(),we.cloneArr(this._rulesWithParentScopes)),this._children[c]=u;u.insert(e+1,l,r,s,i,o)}_doInsertHere(e,n,r,s,i){if(n===null){this._mainRule.acceptOverwrite(e,r,s,i);return}for(let o=0,a=this._rulesWithParentScopes.length;o<a;o++){let c=this._rulesWithParentScopes[o];if(Qe(c.parentScopes,n)===0){c.acceptOverwrite(e,r,s,i);return}}if(r===-1)r=this._mainRule.fontStyle;if(s===0)s=this._mainRule.foreground;if(i===0)i=this._mainRule.background;this._rulesWithParentScopes.push(new we(e,n,r,s,i))}},x=class t{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){let n=t.getLanguageId(e),r=t.getTokenType(e),s=t.getFontStyle(e),i=t.getForeground(e),o=t.getBackground(e);console.log({languageId:n,tokenType:r,fontStyle:s,foreground:i,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(e,n,r,s,i,o,a){let c=t.getLanguageId(e),l=t.getTokenType(e),u=t.containsBalancedBrackets(e)?1:0,h=t.getFontStyle(e),d=t.getForeground(e),f=t.getBackground(e);if(n!==0)c=n;if(r!==8)l=mn(r);if(s!==null)u=s?1:0;if(i!==-1)h=i;if(o!==0)d=o;if(a!==0)f=a;return(c<<0|l<<8|u<<10|h<<11|d<<15|f<<24)>>>0}};function dn(t){return t}function mn(t){return t}function X(t,e){let n=[],r=gn(t),s=r.next();while(s!==null){let c=0;if(s.length===2&&s.charAt(1)===":"){switch(s.charAt(0)){case"R":c=1;break;case"L":c=-1;break;default:console.log(`Unknown priority ${s} in scope selector`)}s=r.next()}let l=o();if(n.push({matcher:l,priority:c}),s!==",")break;s=r.next()}return n;function i(){if(s==="-"){s=r.next();let c=i();return(l)=>!!c&&!c(l)}if(s==="("){s=r.next();let c=a();if(s===")")s=r.next();return c}if(De(s)){let c=[];do c.push(s),s=r.next();while(De(s));return(l)=>e(c,l)}return null}function o(){let c=[],l=i();while(l)c.push(l),l=i();return(u)=>c.every((h)=>h(u))}function a(){let c=[],l=o();while(l){if(c.push(l),s==="|"||s===",")do s=r.next();while(s==="|"||s===",");else break;l=o()}return(u)=>c.some((h)=>h(u))}}function De(t){return!!t&&!!t.match(/[\w\.:]+/)}function gn(t){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=e.exec(t);return{next:()=>{if(!n)return null;let r=n[0];return n=e.exec(t),r}}}function tt(t){if(typeof t.dispose==="function")t.dispose()}var j=class{constructor(t){this.scopeName=t}toKey(){return this.scopeName}},pn=class{constructor(t,e){this.scopeName=t,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},_n=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(t){let e=t.toKey();if(this._seenReferenceKeys.has(e))return;this._seenReferenceKeys.add(e),this._references.push(t)}},yn=class{constructor(t,e){this.repo=t,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new j(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let t=this.Q;this.Q=[];let e=new _n;for(let n of t)bn(n,this.initialScopeName,this.repo,e);for(let n of e.references)if(n instanceof j){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName))continue;if(this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function bn(t,e,n,r){let s=n.lookup(t.scopeName);if(!s){if(t.scopeName===e)throw Error(`No grammar provided for <${e}>`);return}let i=n.lookup(e);if(t instanceof j)Q({baseGrammar:i,selfGrammar:s},r);else Ce(t.ruleName,{baseGrammar:i,selfGrammar:s,repository:s.repository},r);let o=n.injections(t.scopeName);if(o)for(let a of o)r.add(new j(a))}function Ce(t,e,n){if(e.repository&&e.repository[t]){let r=e.repository[t];Z([r],e,n)}}function Q(t,e){if(t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns))Z(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},e);if(t.selfGrammar.injections)Z(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},e)}function Z(t,e,n){for(let r of t){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let s=r.repository?Ve({},e.repository,r.repository):e.repository;if(Array.isArray(r.patterns))Z(r.patterns,{...e,repository:s},n);let i=r.include;if(!i)continue;let o=nt(i);switch(o.kind){case 0:Q({...e,selfGrammar:e.baseGrammar},n);break;case 1:Q(e,n);break;case 2:Ce(o.ruleName,{...e,repository:s},n);break;case 3:case 4:let a=o.scopeName===e.selfGrammar.scopeName?e.selfGrammar:o.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(a){let c={baseGrammar:e.baseGrammar,selfGrammar:a,repository:s};if(o.kind===4)Ce(o.ruleName,c,n);else Q(c,n)}else if(o.kind===4)n.add(new pn(o.scopeName,o.ruleName));else n.add(new j(o.scopeName));break}}}var Sn=class{kind=0},wn=class{kind=1},Cn=class{constructor(t){this.ruleName=t}kind=2},kn=class{constructor(t){this.scopeName=t}kind=3},Rn=class{constructor(t,e){this.scopeName=t,this.ruleName=e}kind=4};function nt(t){if(t==="$base")return new Sn;else if(t==="$self")return new wn;let e=t.indexOf("#");if(e===-1)return new kn(t);else if(e===0)return new Cn(t.substring(1));else{let n=t.substring(0,e),r=t.substring(e+1);return new Rn(n,r)}}var Nn=/\\(\d+)/,We=/\\(\d+)/g,Cs=Symbol("RuleId"),Tn=-1,rt=-2;function st(t){return t}function it(t){return t}var W=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(t,e,n,r){this.$location=t,this.id=e,this._name=n||null,this._nameIsCapturing=J.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=J.hasCaptures(this._contentName)}get debugName(){let t=this.$location?`${Ye(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${t}`}getName(t,e){if(!this._nameIsCapturing||this._name===null||t===null||e===null)return this._name;return J.replaceCaptures(this._name,t,e)}getContentName(t,e){if(!this._contentNameIsCapturing||this._contentName===null)return this._contentName;return J.replaceCaptures(this._contentName,t,e)}},vn=class extends W{retokenizeCapturedWithRuleId;constructor(t,e,n,r,s){super(t,e,n,r);this.retokenizeCapturedWithRuleId=s}dispose(){}collectPatterns(t,e){throw Error("Not supported!")}compile(t,e){throw Error("Not supported!")}compileAG(t,e,n,r){throw Error("Not supported!")}},An=class extends W{_match;captures;_cachedCompiledPatterns;constructor(t,e,n,r,s){super(t,e,n,null);this._match=new F(r,this.id),this.captures=s,this._cachedCompiledPatterns=null}dispose(){if(this._cachedCompiledPatterns)this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,e){e.push(this._match)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns)this._cachedCompiledPatterns=new D,this.collectPatterns(t,this._cachedCompiledPatterns);return this._cachedCompiledPatterns}},He=class extends W{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,r,s){super(t,e,n,r);this.patterns=s.patterns,this.hasMissingPatterns=s.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){if(this._cachedCompiledPatterns)this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null}collectPatterns(t,e){for(let n of this.patterns)t.getRule(n).collectPatterns(t,e)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns)this._cachedCompiledPatterns=new D,this.collectPatterns(t,this._cachedCompiledPatterns);return this._cachedCompiledPatterns}},ke=class extends W{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,r,s,i,o,a,c,l){super(t,e,n,r);this._begin=new F(s,this.id),this.beginCaptures=i,this._end=new F(o?o:"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){if(this._cachedCompiledPatterns)this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(t,e){return this._end.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t,e).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t,e).compileAG(t,n,r)}_getCachedCompiledPatterns(t,e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new D;for(let n of this.patterns)t.getRule(n).collectPatterns(t,this._cachedCompiledPatterns);if(this.applyEndPatternLast)this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end);else this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}if(this._end.hasBackReferences)if(this.applyEndPatternLast)this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,e);else this._cachedCompiledPatterns.setSource(0,e);return this._cachedCompiledPatterns}},ee=class extends W{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(t,e,n,r,s,i,o,a,c){super(t,e,n,r);this._begin=new F(s,this.id),this.beginCaptures=i,this.whileCaptures=a,this._while=new F(o,rt),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){if(this._cachedCompiledPatterns)this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null;if(this._cachedCompiledWhilePatterns)this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(t,e){return this._while.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new D;for(let e of this.patterns)t.getRule(e).collectPatterns(t,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(t,e){return this._getCachedCompiledWhilePatterns(t,e).compile(t)}compileWhileAG(t,e,n,r){return this._getCachedCompiledWhilePatterns(t,e).compileAG(t,n,r)}_getCachedCompiledWhilePatterns(t,e){if(!this._cachedCompiledWhilePatterns)this._cachedCompiledWhilePatterns=new D,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while);if(this._while.hasBackReferences)this._cachedCompiledWhilePatterns.setSource(0,e?e:"");return this._cachedCompiledWhilePatterns}},ot=class t{static createCaptureRule(e,n,r,s,i){return e.registerRule((o)=>new vn(n,o,r,s,i))}static getCompiledRuleId(e,n,r){if(!e.id)n.registerRule((s)=>{if(e.id=s,e.match)return new An(e.$vscodeTextmateLocation,e.id,e.name,e.match,t._compileCaptures(e.captures,n,r));if(typeof e.begin>"u"){if(e.repository)r=Ve({},r,e.repository);let i=e.patterns;if(typeof i>"u"&&e.include)i=[{include:e.include}];return new He(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,t._compilePatterns(i,n,r))}if(e.while)return new ee(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,t._compileCaptures(e.beginCaptures||e.captures,n,r),e.while,t._compileCaptures(e.whileCaptures||e.captures,n,r),t._compilePatterns(e.patterns,n,r));return new ke(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,t._compileCaptures(e.beginCaptures||e.captures,n,r),e.end,t._compileCaptures(e.endCaptures||e.captures,n,r),e.applyEndPatternLast,t._compilePatterns(e.patterns,n,r))});return e.id}static _compileCaptures(e,n,r){let s=[];if(e){let i=0;for(let o in e){if(o==="$vscodeTextmateLocation")continue;let a=parseInt(o,10);if(a>i)i=a}for(let o=0;o<=i;o++)s[o]=null;for(let o in e){if(o==="$vscodeTextmateLocation")continue;let a=parseInt(o,10),c=0;if(e[o].patterns)c=t.getCompiledRuleId(e[o],n,r);s[a]=t.createCaptureRule(n,e[o].$vscodeTextmateLocation,e[o].name,e[o].contentName,c)}}return s}static _compilePatterns(e,n,r){let s=[];if(e)for(let i=0,o=e.length;i<o;i++){let a=e[i],c=-1;if(a.include){let l=nt(a.include);switch(l.kind){case 0:case 1:c=t.getCompiledRuleId(r[a.include],n,r);break;case 2:let u=r[l.ruleName];if(u)c=t.getCompiledRuleId(u,n,r);break;case 3:case 4:let h=l.scopeName,d=l.kind===4?l.ruleName:null,f=n.getExternalGrammar(h,r);if(f)if(d){let m=f.repository[d];if(m)c=t.getCompiledRuleId(m,n,f.repository)}else c=t.getCompiledRuleId(f.repository.$self,n,f.repository);break}}else c=t.getCompiledRuleId(a,n,r);if(c!==-1){let l=n.getRule(c),u=!1;if(l instanceof He||l instanceof ke||l instanceof ee){if(l.hasMissingPatterns&&l.patterns.length===0)u=!0}if(u)continue;s.push(c)}}return{patterns:s,hasMissingPatterns:(e?e.length:0)!==s.length}}},F=class t{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,n){if(e&&typeof e==="string"){let r=e.length,s=0,i=[],o=!1;for(let a=0;a<r;a++)if(e.charAt(a)==="\\"){if(a+1<r){let l=e.charAt(a+1);if(l==="z")i.push(e.substring(s,a)),i.push("$(?!\\n)(?<!\\n)"),s=a+2;else if(l==="A"||l==="G")o=!0;a++}}if(this.hasAnchor=o,s===0)this.source=e;else i.push(e.substring(s,r)),this.source=i.join("")}else this.hasAnchor=!1,this.source=e;if(this.hasAnchor)this._anchorCache=this._buildAnchorCache();else this._anchorCache=null;if(this.ruleId=n,typeof this.source==="string")this.hasBackReferences=Nn.test(this.source);else this.hasBackReferences=!1}clone(){return new t(this.source,this.ruleId)}setSource(e){if(this.source===e)return;if(this.source=e,this.hasAnchor)this._anchorCache=this._buildAnchorCache()}resolveBackReferences(e,n){if(typeof this.source!=="string")throw Error("This method should only be called if the source is a string");let r=n.map((s)=>e.substring(s.start,s.end));return We.lastIndex=0,this.source.replace(We,(s,i)=>Xe(r[parseInt(i,10)]||""))}_buildAnchorCache(){if(typeof this.source!=="string")throw Error("This method should only be called if the source is a string");let e=[],n=[],r=[],s=[],i,o,a,c;for(i=0,o=this.source.length;i<o;i++)if(a=this.source.charAt(i),e[i]=a,n[i]=a,r[i]=a,s[i]=a,a==="\\"){if(i+1<o){if(c=this.source.charAt(i+1),c==="A")e[i+1]="",n[i+1]="",r[i+1]="A",s[i+1]="A";else if(c==="G")e[i+1]="",n[i+1]="G",r[i+1]="",s[i+1]="G";else e[i+1]=c,n[i+1]=c,r[i+1]=c,s[i+1]=c;i++}}return{A0_G0:e.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:s.join("")}}resolveAnchors(e,n){if(!this.hasAnchor||!this._anchorCache||typeof this.source!=="string")return this.source;if(e)if(n)return this._anchorCache.A1_G1;else return this._anchorCache.A1_G0;else if(n)return this._anchorCache.A0_G1;else return this._anchorCache.A0_G0}},D=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){if(this._cached)this._cached.dispose(),this._cached=null;if(this._anchorCache.A0_G0)this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null;if(this._anchorCache.A0_G1)this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null;if(this._anchorCache.A1_G0)this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null;if(this._anchorCache.A1_G1)this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null}push(t){this._items.push(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}unshift(t){this._items.unshift(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}length(){return this._items.length}setSource(t,e){if(this._items[t].source!==e)this._disposeCaches(),this._items[t].setSource(e)}compile(t){if(!this._cached){let e=this._items.map((n)=>n.source);this._cached=new qe(t,e,this._items.map((n)=>n.ruleId))}return this._cached}compileAG(t,e,n){if(!this._hasAnchors)return this.compile(t);else if(e)if(n){if(!this._anchorCache.A1_G1)this._anchorCache.A1_G1=this._resolveAnchors(t,e,n);return this._anchorCache.A1_G1}else{if(!this._anchorCache.A1_G0)this._anchorCache.A1_G0=this._resolveAnchors(t,e,n);return this._anchorCache.A1_G0}else if(n){if(!this._anchorCache.A0_G1)this._anchorCache.A0_G1=this._resolveAnchors(t,e,n);return this._anchorCache.A0_G1}else{if(!this._anchorCache.A0_G0)this._anchorCache.A0_G0=this._resolveAnchors(t,e,n);return this._anchorCache.A0_G0}}_resolveAnchors(t,e,n){let r=this._items.map((s)=>s.resolveAnchors(e,n));return new qe(t,r,this._items.map((s)=>s.ruleId))}},qe=class{constructor(t,e,n){this.regExps=e,this.rules=n,this.scanner=t.createOnigScanner(e)}scanner;dispose(){if(typeof this.scanner.dispose==="function")this.scanner.dispose()}toString(){let t=[];for(let e=0,n=this.rules.length;e<n;e++)t.push(" - "+this.rules[e]+": "+this.regExps[e]);return t.join(`
|
|
1
|
+
import{ms,Er,Yi,fs,Zr,hs,gi}from"./chunk-56a6zytc.js";var S=class extends Error{constructor(t){super(t);this.name="ShikiError"}};function tn(t){return Ne(t)}function Ne(t){if(Array.isArray(t))return nn(t);if(t instanceof RegExp)return t;if(typeof t==="object")return rn(t);return t}function nn(t){let e=[];for(let n=0,r=t.length;n<r;n++)e[n]=Ne(t[n]);return e}function rn(t){let e={};for(let n in t)e[n]=Ne(t[n]);return e}function Ve(t,...e){return e.forEach((n)=>{for(let r in n)t[r]=n[r]}),t}function Ye(t){let e=~t.lastIndexOf("/")||~t.lastIndexOf("\\");if(e===0)return t;else if(~e===t.length-1)return Ye(t.substring(0,t.length-1));else return t.substr(~e+1)}var ye=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,J=class{static hasCaptures(t){if(t===null)return!1;return ye.lastIndex=0,ye.test(t)}static replaceCaptures(t,e,n){return t.replace(ye,(r,s,i,o)=>{let a=n[parseInt(s||i,10)];if(a){let c=e.substring(a.start,a.end);while(c[0]===".")c=c.substring(1);switch(o){case"downcase":return c.toLowerCase();case"upcase":return c.toUpperCase();default:return c}}else return r})}};function Je(t,e){if(t<e)return-1;if(t>e)return 1;return 0}function Qe(t,e){if(t===null&&e===null)return 0;if(!t)return-1;if(!e)return 1;let n=t.length,r=e.length;if(n===r){for(let s=0;s<n;s++){let i=Je(t[s],e[s]);if(i!==0)return i}return 0}return n-r}function Fe(t){if(/^#[0-9a-f]{6}$/i.test(t))return!0;if(/^#[0-9a-f]{8}$/i.test(t))return!0;if(/^#[0-9a-f]{3}$/i.test(t))return!0;if(/^#[0-9a-f]{4}$/i.test(t))return!0;return!1}function Xe(t){return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var Ze=class{constructor(t){this.fn=t}cache=new Map;get(t){if(this.cache.has(t))return this.cache.get(t);let e=this.fn(t);return this.cache.set(t,e),e}},M=class{constructor(t,e,n){this._colorMap=t,this._defaults=e,this._root=n}static createFromRawTheme(t,e){return this.createFromParsedTheme(an(t),e)}static createFromParsedTheme(t,e){return ln(t,e)}_cachedMatchRoot=new Ze((t)=>this._root.match(t));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(t){if(t===null)return this._defaults;let e=t.scopeName,r=this._cachedMatchRoot.get(e).find((s)=>sn(t.parent,s.parentScopes));if(!r)return null;return new et(r.fontStyle,r.foreground,r.background)}},be=class t{constructor(e,n){this.parent=e,this.scopeName=n}static push(e,n){for(let r of n)e=new t(e,r);return e}static from(...e){let n=null;for(let r=0;r<e.length;r++)n=new t(n,e[r]);return n}push(e){return new t(this,e)}getSegments(){let e=this,n=[];while(e)n.push(e.scopeName),e=e.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(e){if(this===e)return!0;if(this.parent===null)return!1;return this.parent.extends(e)}getExtensionIfDefined(e){let n=[],r=this;while(r&&r!==e)n.push(r.scopeName),r=r.parent;return r===e?n.reverse():void 0}};function sn(t,e){if(e.length===0)return!0;for(let n=0;n<e.length;n++){let r=e[n],s=!1;if(r===">"){if(n===e.length-1)return!1;r=e[++n],s=!0}while(t){if(on(t.scopeName,r))break;if(s)return!1;t=t.parent}if(!t)return!1;t=t.parent}return!0}function on(t,e){return e===t||t.startsWith(e)&&t[e.length]==="."}var et=class{constructor(t,e,n){this.fontStyle=t,this.foregroundId=e,this.backgroundId=n}};function an(t){if(!t)return[];if(!t.settings||!Array.isArray(t.settings))return[];let e=t.settings,n=[],r=0;for(let s=0,i=e.length;s<i;s++){let o=e[s];if(!o.settings)continue;let a;if(typeof o.scope==="string"){let h=o.scope;h=h.replace(/^[,]+/,""),h=h.replace(/[,]+$/,""),a=h.split(",")}else if(Array.isArray(o.scope))a=o.scope;else a=[""];let c=-1;if(typeof o.settings.fontStyle==="string"){c=0;let h=o.settings.fontStyle.split(" ");for(let d=0,f=h.length;d<f;d++)switch(h[d]){case"italic":c=c|1;break;case"bold":c=c|2;break;case"underline":c=c|4;break;case"strikethrough":c=c|8;break}}let l=null;if(typeof o.settings.foreground==="string"&&Fe(o.settings.foreground))l=o.settings.foreground;let u=null;if(typeof o.settings.background==="string"&&Fe(o.settings.background))u=o.settings.background;for(let h=0,d=a.length;h<d;h++){let m=a[h].trim().split(" "),y=m[m.length-1],_=null;if(m.length>1)_=m.slice(0,m.length-1),_.reverse();n[r++]=new cn(y,_,s,c,l,u)}}return n}var cn=class{constructor(t,e,n,r,s,i){this.scope=t,this.parentScopes=e,this.index=n,this.fontStyle=r,this.foreground=s,this.background=i}},k=((t)=>(t[t.NotSet=-1]="NotSet",t[t.None=0]="None",t[t.Italic=1]="Italic",t[t.Bold=2]="Bold",t[t.Underline=4]="Underline",t[t.Strikethrough=8]="Strikethrough",t))(k||{});function ln(t,e){t.sort((c,l)=>{let u=Je(c.scope,l.scope);if(u!==0)return u;if(u=Qe(c.parentScopes,l.parentScopes),u!==0)return u;return c.index-l.index});let n=0,r="#000000",s="#ffffff";while(t.length>=1&&t[0].scope===""){let c=t.shift();if(c.fontStyle!==-1)n=c.fontStyle;if(c.foreground!==null)r=c.foreground;if(c.background!==null)s=c.background}let i=new un(e),o=new et(n,i.getId(r),i.getId(s)),a=new fn(new we(0,null,-1,0,0),[]);for(let c=0,l=t.length;c<l;c++){let u=t[c];a.insert(0,u.scope,u.parentScopes,u.fontStyle,i.getId(u.foreground),i.getId(u.background))}return new M(i,o,a)}var un=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(t){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(t)){this._isFrozen=!0;for(let e=0,n=t.length;e<n;e++)this._color2id[t[e]]=e,this._id2color[e]=t[e]}else this._isFrozen=!1}getId(t){if(t===null)return 0;t=t.toUpperCase();let e=this._color2id[t];if(e)return e;if(this._isFrozen)throw Error(`Missing color in color map - ${t}`);return e=++this._lastColorId,this._color2id[t]=e,this._id2color[e]=t,e}getColorMap(){return this._id2color.slice(0)}},hn=Object.freeze([]),we=class t{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,n,r,s,i){this.scopeDepth=e,this.parentScopes=n||hn,this.fontStyle=r,this.foreground=s,this.background=i}clone(){return new t(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let n=[];for(let r=0,s=e.length;r<s;r++)n[r]=e[r].clone();return n}acceptOverwrite(e,n,r,s){if(this.scopeDepth>e)console.log("how did this happen?");else this.scopeDepth=e;if(n!==-1)this.fontStyle=n;if(r!==0)this.foreground=r;if(s!==0)this.background=s}},fn=class t{constructor(e,n=[],r={}){this._mainRule=e,this._children=r,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(e,n){if(e.scopeDepth!==n.scopeDepth)return n.scopeDepth-e.scopeDepth;let r=0,s=0;while(!0){if(e.parentScopes[r]===">")r++;if(n.parentScopes[s]===">")s++;if(r>=e.parentScopes.length||s>=n.parentScopes.length)break;let i=n.parentScopes[s].length-e.parentScopes[r].length;if(i!==0)return i;r++,s++}return n.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let r=e.indexOf("."),s,i;if(r===-1)s=e,i="";else s=e.substring(0,r),i=e.substring(r+1);if(this._children.hasOwnProperty(s))return this._children[s].match(i)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(t._cmpBySpecificity),n}insert(e,n,r,s,i,o){if(n===""){this._doInsertHere(e,r,s,i,o);return}let a=n.indexOf("."),c,l;if(a===-1)c=n,l="";else c=n.substring(0,a),l=n.substring(a+1);let u;if(this._children.hasOwnProperty(c))u=this._children[c];else u=new t(this._mainRule.clone(),we.cloneArr(this._rulesWithParentScopes)),this._children[c]=u;u.insert(e+1,l,r,s,i,o)}_doInsertHere(e,n,r,s,i){if(n===null){this._mainRule.acceptOverwrite(e,r,s,i);return}for(let o=0,a=this._rulesWithParentScopes.length;o<a;o++){let c=this._rulesWithParentScopes[o];if(Qe(c.parentScopes,n)===0){c.acceptOverwrite(e,r,s,i);return}}if(r===-1)r=this._mainRule.fontStyle;if(s===0)s=this._mainRule.foreground;if(i===0)i=this._mainRule.background;this._rulesWithParentScopes.push(new we(e,n,r,s,i))}},x=class t{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){let n=t.getLanguageId(e),r=t.getTokenType(e),s=t.getFontStyle(e),i=t.getForeground(e),o=t.getBackground(e);console.log({languageId:n,tokenType:r,fontStyle:s,foreground:i,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(e,n,r,s,i,o,a){let c=t.getLanguageId(e),l=t.getTokenType(e),u=t.containsBalancedBrackets(e)?1:0,h=t.getFontStyle(e),d=t.getForeground(e),f=t.getBackground(e);if(n!==0)c=n;if(r!==8)l=mn(r);if(s!==null)u=s?1:0;if(i!==-1)h=i;if(o!==0)d=o;if(a!==0)f=a;return(c<<0|l<<8|u<<10|h<<11|d<<15|f<<24)>>>0}};function dn(t){return t}function mn(t){return t}function X(t,e){let n=[],r=gn(t),s=r.next();while(s!==null){let c=0;if(s.length===2&&s.charAt(1)===":"){switch(s.charAt(0)){case"R":c=1;break;case"L":c=-1;break;default:console.log(`Unknown priority ${s} in scope selector`)}s=r.next()}let l=o();if(n.push({matcher:l,priority:c}),s!==",")break;s=r.next()}return n;function i(){if(s==="-"){s=r.next();let c=i();return(l)=>!!c&&!c(l)}if(s==="("){s=r.next();let c=a();if(s===")")s=r.next();return c}if(De(s)){let c=[];do c.push(s),s=r.next();while(De(s));return(l)=>e(c,l)}return null}function o(){let c=[],l=i();while(l)c.push(l),l=i();return(u)=>c.every((h)=>h(u))}function a(){let c=[],l=o();while(l){if(c.push(l),s==="|"||s===",")do s=r.next();while(s==="|"||s===",");else break;l=o()}return(u)=>c.some((h)=>h(u))}}function De(t){return!!t&&!!t.match(/[\w\.:]+/)}function gn(t){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=e.exec(t);return{next:()=>{if(!n)return null;let r=n[0];return n=e.exec(t),r}}}function tt(t){if(typeof t.dispose==="function")t.dispose()}var j=class{constructor(t){this.scopeName=t}toKey(){return this.scopeName}},pn=class{constructor(t,e){this.scopeName=t,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},_n=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(t){let e=t.toKey();if(this._seenReferenceKeys.has(e))return;this._seenReferenceKeys.add(e),this._references.push(t)}},yn=class{constructor(t,e){this.repo=t,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new j(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let t=this.Q;this.Q=[];let e=new _n;for(let n of t)bn(n,this.initialScopeName,this.repo,e);for(let n of e.references)if(n instanceof j){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName))continue;if(this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function bn(t,e,n,r){let s=n.lookup(t.scopeName);if(!s){if(t.scopeName===e)throw Error(`No grammar provided for <${e}>`);return}let i=n.lookup(e);if(t instanceof j)Q({baseGrammar:i,selfGrammar:s},r);else Ce(t.ruleName,{baseGrammar:i,selfGrammar:s,repository:s.repository},r);let o=n.injections(t.scopeName);if(o)for(let a of o)r.add(new j(a))}function Ce(t,e,n){if(e.repository&&e.repository[t]){let r=e.repository[t];Z([r],e,n)}}function Q(t,e){if(t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns))Z(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},e);if(t.selfGrammar.injections)Z(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},e)}function Z(t,e,n){for(let r of t){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let s=r.repository?Ve({},e.repository,r.repository):e.repository;if(Array.isArray(r.patterns))Z(r.patterns,{...e,repository:s},n);let i=r.include;if(!i)continue;let o=nt(i);switch(o.kind){case 0:Q({...e,selfGrammar:e.baseGrammar},n);break;case 1:Q(e,n);break;case 2:Ce(o.ruleName,{...e,repository:s},n);break;case 3:case 4:let a=o.scopeName===e.selfGrammar.scopeName?e.selfGrammar:o.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(a){let c={baseGrammar:e.baseGrammar,selfGrammar:a,repository:s};if(o.kind===4)Ce(o.ruleName,c,n);else Q(c,n)}else if(o.kind===4)n.add(new pn(o.scopeName,o.ruleName));else n.add(new j(o.scopeName));break}}}var Sn=class{kind=0},wn=class{kind=1},Cn=class{constructor(t){this.ruleName=t}kind=2},kn=class{constructor(t){this.scopeName=t}kind=3},Rn=class{constructor(t,e){this.scopeName=t,this.ruleName=e}kind=4};function nt(t){if(t==="$base")return new Sn;else if(t==="$self")return new wn;let e=t.indexOf("#");if(e===-1)return new kn(t);else if(e===0)return new Cn(t.substring(1));else{let n=t.substring(0,e),r=t.substring(e+1);return new Rn(n,r)}}var Nn=/\\(\d+)/,We=/\\(\d+)/g,Cs=Symbol("RuleId"),Tn=-1,rt=-2;function st(t){return t}function it(t){return t}var W=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(t,e,n,r){this.$location=t,this.id=e,this._name=n||null,this._nameIsCapturing=J.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=J.hasCaptures(this._contentName)}get debugName(){let t=this.$location?`${Ye(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${t}`}getName(t,e){if(!this._nameIsCapturing||this._name===null||t===null||e===null)return this._name;return J.replaceCaptures(this._name,t,e)}getContentName(t,e){if(!this._contentNameIsCapturing||this._contentName===null)return this._contentName;return J.replaceCaptures(this._contentName,t,e)}},vn=class extends W{retokenizeCapturedWithRuleId;constructor(t,e,n,r,s){super(t,e,n,r);this.retokenizeCapturedWithRuleId=s}dispose(){}collectPatterns(t,e){throw Error("Not supported!")}compile(t,e){throw Error("Not supported!")}compileAG(t,e,n,r){throw Error("Not supported!")}},An=class extends W{_match;captures;_cachedCompiledPatterns;constructor(t,e,n,r,s){super(t,e,n,null);this._match=new F(r,this.id),this.captures=s,this._cachedCompiledPatterns=null}dispose(){if(this._cachedCompiledPatterns)this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,e){e.push(this._match)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns)this._cachedCompiledPatterns=new D,this.collectPatterns(t,this._cachedCompiledPatterns);return this._cachedCompiledPatterns}},He=class extends W{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,r,s){super(t,e,n,r);this.patterns=s.patterns,this.hasMissingPatterns=s.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){if(this._cachedCompiledPatterns)this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null}collectPatterns(t,e){for(let n of this.patterns)t.getRule(n).collectPatterns(t,e)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns)this._cachedCompiledPatterns=new D,this.collectPatterns(t,this._cachedCompiledPatterns);return this._cachedCompiledPatterns}},ke=class extends W{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,r,s,i,o,a,c,l){super(t,e,n,r);this._begin=new F(s,this.id),this.beginCaptures=i,this._end=new F(o?o:"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){if(this._cachedCompiledPatterns)this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(t,e){return this._end.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t,e).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t,e).compileAG(t,n,r)}_getCachedCompiledPatterns(t,e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new D;for(let n of this.patterns)t.getRule(n).collectPatterns(t,this._cachedCompiledPatterns);if(this.applyEndPatternLast)this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end);else this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}if(this._end.hasBackReferences)if(this.applyEndPatternLast)this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,e);else this._cachedCompiledPatterns.setSource(0,e);return this._cachedCompiledPatterns}},ee=class extends W{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(t,e,n,r,s,i,o,a,c){super(t,e,n,r);this._begin=new F(s,this.id),this.beginCaptures=i,this.whileCaptures=a,this._while=new F(o,rt),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){if(this._cachedCompiledPatterns)this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null;if(this._cachedCompiledWhilePatterns)this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(t,e){return this._while.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new D;for(let e of this.patterns)t.getRule(e).collectPatterns(t,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(t,e){return this._getCachedCompiledWhilePatterns(t,e).compile(t)}compileWhileAG(t,e,n,r){return this._getCachedCompiledWhilePatterns(t,e).compileAG(t,n,r)}_getCachedCompiledWhilePatterns(t,e){if(!this._cachedCompiledWhilePatterns)this._cachedCompiledWhilePatterns=new D,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while);if(this._while.hasBackReferences)this._cachedCompiledWhilePatterns.setSource(0,e?e:"");return this._cachedCompiledWhilePatterns}},ot=class t{static createCaptureRule(e,n,r,s,i){return e.registerRule((o)=>new vn(n,o,r,s,i))}static getCompiledRuleId(e,n,r){if(!e.id)n.registerRule((s)=>{if(e.id=s,e.match)return new An(e.$vscodeTextmateLocation,e.id,e.name,e.match,t._compileCaptures(e.captures,n,r));if(typeof e.begin>"u"){if(e.repository)r=Ve({},r,e.repository);let i=e.patterns;if(typeof i>"u"&&e.include)i=[{include:e.include}];return new He(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,t._compilePatterns(i,n,r))}if(e.while)return new ee(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,t._compileCaptures(e.beginCaptures||e.captures,n,r),e.while,t._compileCaptures(e.whileCaptures||e.captures,n,r),t._compilePatterns(e.patterns,n,r));return new ke(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,t._compileCaptures(e.beginCaptures||e.captures,n,r),e.end,t._compileCaptures(e.endCaptures||e.captures,n,r),e.applyEndPatternLast,t._compilePatterns(e.patterns,n,r))});return e.id}static _compileCaptures(e,n,r){let s=[];if(e){let i=0;for(let o in e){if(o==="$vscodeTextmateLocation")continue;let a=parseInt(o,10);if(a>i)i=a}for(let o=0;o<=i;o++)s[o]=null;for(let o in e){if(o==="$vscodeTextmateLocation")continue;let a=parseInt(o,10),c=0;if(e[o].patterns)c=t.getCompiledRuleId(e[o],n,r);s[a]=t.createCaptureRule(n,e[o].$vscodeTextmateLocation,e[o].name,e[o].contentName,c)}}return s}static _compilePatterns(e,n,r){let s=[];if(e)for(let i=0,o=e.length;i<o;i++){let a=e[i],c=-1;if(a.include){let l=nt(a.include);switch(l.kind){case 0:case 1:c=t.getCompiledRuleId(r[a.include],n,r);break;case 2:let u=r[l.ruleName];if(u)c=t.getCompiledRuleId(u,n,r);break;case 3:case 4:let h=l.scopeName,d=l.kind===4?l.ruleName:null,f=n.getExternalGrammar(h,r);if(f)if(d){let m=f.repository[d];if(m)c=t.getCompiledRuleId(m,n,f.repository)}else c=t.getCompiledRuleId(f.repository.$self,n,f.repository);break}}else c=t.getCompiledRuleId(a,n,r);if(c!==-1){let l=n.getRule(c),u=!1;if(l instanceof He||l instanceof ke||l instanceof ee){if(l.hasMissingPatterns&&l.patterns.length===0)u=!0}if(u)continue;s.push(c)}}return{patterns:s,hasMissingPatterns:(e?e.length:0)!==s.length}}},F=class t{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,n){if(e&&typeof e==="string"){let r=e.length,s=0,i=[],o=!1;for(let a=0;a<r;a++)if(e.charAt(a)==="\\"){if(a+1<r){let l=e.charAt(a+1);if(l==="z")i.push(e.substring(s,a)),i.push("$(?!\\n)(?<!\\n)"),s=a+2;else if(l==="A"||l==="G")o=!0;a++}}if(this.hasAnchor=o,s===0)this.source=e;else i.push(e.substring(s,r)),this.source=i.join("")}else this.hasAnchor=!1,this.source=e;if(this.hasAnchor)this._anchorCache=this._buildAnchorCache();else this._anchorCache=null;if(this.ruleId=n,typeof this.source==="string")this.hasBackReferences=Nn.test(this.source);else this.hasBackReferences=!1}clone(){return new t(this.source,this.ruleId)}setSource(e){if(this.source===e)return;if(this.source=e,this.hasAnchor)this._anchorCache=this._buildAnchorCache()}resolveBackReferences(e,n){if(typeof this.source!=="string")throw Error("This method should only be called if the source is a string");let r=n.map((s)=>e.substring(s.start,s.end));return We.lastIndex=0,this.source.replace(We,(s,i)=>Xe(r[parseInt(i,10)]||""))}_buildAnchorCache(){if(typeof this.source!=="string")throw Error("This method should only be called if the source is a string");let e=[],n=[],r=[],s=[],i,o,a,c;for(i=0,o=this.source.length;i<o;i++)if(a=this.source.charAt(i),e[i]=a,n[i]=a,r[i]=a,s[i]=a,a==="\\"){if(i+1<o){if(c=this.source.charAt(i+1),c==="A")e[i+1]="",n[i+1]="",r[i+1]="A",s[i+1]="A";else if(c==="G")e[i+1]="",n[i+1]="G",r[i+1]="",s[i+1]="G";else e[i+1]=c,n[i+1]=c,r[i+1]=c,s[i+1]=c;i++}}return{A0_G0:e.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:s.join("")}}resolveAnchors(e,n){if(!this.hasAnchor||!this._anchorCache||typeof this.source!=="string")return this.source;if(e)if(n)return this._anchorCache.A1_G1;else return this._anchorCache.A1_G0;else if(n)return this._anchorCache.A0_G1;else return this._anchorCache.A0_G0}},D=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){if(this._cached)this._cached.dispose(),this._cached=null;if(this._anchorCache.A0_G0)this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null;if(this._anchorCache.A0_G1)this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null;if(this._anchorCache.A1_G0)this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null;if(this._anchorCache.A1_G1)this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null}push(t){this._items.push(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}unshift(t){this._items.unshift(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}length(){return this._items.length}setSource(t,e){if(this._items[t].source!==e)this._disposeCaches(),this._items[t].setSource(e)}compile(t){if(!this._cached){let e=this._items.map((n)=>n.source);this._cached=new qe(t,e,this._items.map((n)=>n.ruleId))}return this._cached}compileAG(t,e,n){if(!this._hasAnchors)return this.compile(t);else if(e)if(n){if(!this._anchorCache.A1_G1)this._anchorCache.A1_G1=this._resolveAnchors(t,e,n);return this._anchorCache.A1_G1}else{if(!this._anchorCache.A1_G0)this._anchorCache.A1_G0=this._resolveAnchors(t,e,n);return this._anchorCache.A1_G0}else if(n){if(!this._anchorCache.A0_G1)this._anchorCache.A0_G1=this._resolveAnchors(t,e,n);return this._anchorCache.A0_G1}else{if(!this._anchorCache.A0_G0)this._anchorCache.A0_G0=this._resolveAnchors(t,e,n);return this._anchorCache.A0_G0}}_resolveAnchors(t,e,n){let r=this._items.map((s)=>s.resolveAnchors(e,n));return new qe(t,r,this._items.map((s)=>s.ruleId))}},qe=class{constructor(t,e,n){this.regExps=e,this.rules=n,this.scanner=t.createOnigScanner(e)}scanner;dispose(){if(typeof this.scanner.dispose==="function")this.scanner.dispose()}toString(){let t=[];for(let e=0,n=this.rules.length;e<n;e++)t.push(" - "+this.rules[e]+": "+this.regExps[e]);return t.join(`
|
|
2
2
|
`)}findNextMatchSync(t,e,n){let r=this.scanner.findNextMatchSync(t,e,n);if(!r)return null;return{ruleId:this.rules[r.index],captureIndices:r.captureIndices}}},Se=class{constructor(t,e){this.languageId=t,this.tokenType=e}},En=class t{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,n){this._defaultAttributes=new Se(e,8),this._embeddedLanguagesMatcher=new xn(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){if(e===null)return t._NULL_SCOPE_METADATA;return this._getBasicScopeAttributes.get(e)}static _NULL_SCOPE_METADATA=new Se(0,0);_getBasicScopeAttributes=new Ze((e)=>{let n=this._scopeToLanguage(e),r=this._toStandardTokenType(e);return new Se(n,r)});_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){let n=e.match(t.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},xn=class{values;scopesRegExp;constructor(t){if(t.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(t);let e=t.map(([n,r])=>Xe(n));e.sort(),e.reverse(),this.scopesRegExp=new RegExp(`^((${e.join(")|(")}))($|\\.)`,"")}}match(t){if(!this.scopesRegExp)return;let e=t.match(this.scopesRegExp);if(!e)return;return this.values.get(e[1])}},ks={InDebugMode:typeof process<"u"&&!!process.env.VSCODE_TEXTMATE_DEBUG},at=!1,ze=class{constructor(t,e){this.stack=t,this.stoppedEarly=e}};function ct(t,e,n,r,s,i,o,a){let c=e.content.length,l=!1,u=-1;if(o){let f=In(t,e,n,r,s,i);s=f.stack,r=f.linePos,n=f.isFirstLine,u=f.anchorPosition}let h=Date.now();while(!l){if(a!==0){if(Date.now()-h>a)return new ze(s,!0)}d()}return new ze(s,!1);function d(){let f=Ln(t,e,n,r,s,u);if(!f){i.produce(s,c),l=!0;return}let{captureIndices:m,matchedRuleId:y}=f,_=m&&m.length>0?m[0].end>r:!1;if(y===Tn){let p=s.getRule(t);i.produce(s,m[0].start),s=s.withContentNameScopesList(s.nameScopesList),B(t,e,n,s,i,p.endCaptures,m),i.produce(s,m[0].end);let g=s;if(s=s.parent,u=g.getAnchorPos(),!_&&g.getEnterPos()===r){s=g,i.produce(s,c),l=!0;return}}else{let p=t.getRule(y);i.produce(s,m[0].start);let g=s,b=p.getName(e.content,m),C=s.contentNameScopesList.pushAttributed(b,t);if(s=s.push(y,r,u,m[0].end===c,null,C,C),p instanceof ke){let R=p;B(t,e,n,s,i,R.beginCaptures,m),i.produce(s,m[0].end),u=m[0].end;let N=R.getContentName(e.content,m),E=C.pushAttributed(N,t);if(s=s.withContentNameScopesList(E),R.endHasBackReferences)s=s.withEndRule(R.getEndWithResolvedBackReferences(e.content,m));if(!_&&g.hasSameRuleAs(s)){s=s.pop(),i.produce(s,c),l=!0;return}}else if(p instanceof ee){let R=p;B(t,e,n,s,i,R.beginCaptures,m),i.produce(s,m[0].end),u=m[0].end;let N=R.getContentName(e.content,m),E=C.pushAttributed(N,t);if(s=s.withContentNameScopesList(E),R.whileHasBackReferences)s=s.withEndRule(R.getWhileWithResolvedBackReferences(e.content,m));if(!_&&g.hasSameRuleAs(s)){s=s.pop(),i.produce(s,c),l=!0;return}}else if(B(t,e,n,s,i,p.captures,m),i.produce(s,m[0].end),s=s.pop(),!_){s=s.safePop(),i.produce(s,c),l=!0;return}}if(m[0].end>r)r=m[0].end,n=!1}}function In(t,e,n,r,s,i){let o=s.beginRuleCapturedEOL?0:-1,a=[];for(let c=s;c;c=c.pop()){let l=c.getRule(t);if(l instanceof ee)a.push({rule:l,stack:c})}for(let c=a.pop();c;c=a.pop()){let{ruleScanner:l,findOptions:u}=Bn(c.rule,t,c.stack.endRule,n,r===o),h=l.findNextMatchSync(e,r,u);if(h){if(h.ruleId!==rt){s=c.stack.pop();break}if(h.captureIndices&&h.captureIndices.length){if(i.produce(c.stack,h.captureIndices[0].start),B(t,e,n,c.stack,i,c.rule.whileCaptures,h.captureIndices),i.produce(c.stack,h.captureIndices[0].end),o=h.captureIndices[0].end,h.captureIndices[0].end>r)r=h.captureIndices[0].end,n=!1}}else{s=c.stack.pop();break}}return{stack:s,linePos:r,anchorPosition:o,isFirstLine:n}}function Ln(t,e,n,r,s,i){let o=Pn(t,e,n,r,s,i),a=t.getInjections();if(a.length===0)return o;let c=Gn(a,t,e,n,r,s,i);if(!c)return o;if(!o)return c;let l=o.captureIndices[0].start,u=c.captureIndices[0].start;if(u<l||c.priorityMatch&&u===l)return c;return o}function Pn(t,e,n,r,s,i){let o=s.getRule(t),{ruleScanner:a,findOptions:c}=lt(o,t,s.endRule,n,r===i),l=a.findNextMatchSync(e,r,c);if(l)return{captureIndices:l.captureIndices,matchedRuleId:l.ruleId};return null}function Gn(t,e,n,r,s,i,o){let a=Number.MAX_VALUE,c=null,l,u=0,h=i.contentNameScopesList.getScopeNames();for(let d=0,f=t.length;d<f;d++){let m=t[d];if(!m.matcher(h))continue;let y=e.getRule(m.ruleId),{ruleScanner:_,findOptions:p}=lt(y,e,null,r,s===o),g=_.findNextMatchSync(n,s,p);if(!g)continue;let b=g.captureIndices[0].start;if(b>=a)continue;if(a=b,c=g.captureIndices,l=g.ruleId,u=m.priority,a===s)break}if(c)return{priorityMatch:u===-1,captureIndices:c,matchedRuleId:l};return null}function lt(t,e,n,r,s){if(at){let o=t.compile(e,n),a=ut(r,s);return{ruleScanner:o,findOptions:a}}return{ruleScanner:t.compileAG(e,n,r,s),findOptions:0}}function Bn(t,e,n,r,s){if(at){let o=t.compileWhile(e,n),a=ut(r,s);return{ruleScanner:o,findOptions:a}}return{ruleScanner:t.compileWhileAG(e,n,r,s),findOptions:0}}function ut(t,e){let n=0;if(!t)n|=1;if(!e)n|=4;return n}function B(t,e,n,r,s,i,o){if(i.length===0)return;let a=e.content,c=Math.min(i.length,o.length),l=[],u=o[0].end;for(let h=0;h<c;h++){let d=i[h];if(d===null)continue;let f=o[h];if(f.length===0)continue;if(f.start>u)break;while(l.length>0&&l[l.length-1].endPos<=f.start)s.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop();if(l.length>0)s.produceFromScopes(l[l.length-1].scopes,f.start);else s.produce(r,f.start);if(d.retokenizeCapturedWithRuleId){let y=d.getName(a,o),_=r.contentNameScopesList.pushAttributed(y,t),p=d.getContentName(a,o),g=_.pushAttributed(p,t),b=r.push(d.retokenizeCapturedWithRuleId,f.start,-1,!1,null,_,g),C=t.createOnigString(a.substring(0,f.end));ct(t,C,n&&f.start===0,f.start,b,s,!1,0),tt(C);continue}let m=d.getName(a,o);if(m!==null){let _=(l.length>0?l[l.length-1].scopes:r.contentNameScopesList).pushAttributed(m,t);l.push(new On(_,f.end))}}while(l.length>0)s.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var On=class{scopes;endPos;constructor(t,e){this.scopes=t,this.endPos=e}};function $n(t,e,n,r,s,i,o,a){return new jn(t,e,n,r,s,i,o,a)}function Ue(t,e,n,r,s){let i=X(e,te),o=ot.getCompiledRuleId(n,r,s.repository);for(let a of i)t.push({debugSelector:e,matcher:a.matcher,ruleId:o,grammar:s,priority:a.priority})}function te(t,e){if(e.length<t.length)return!1;let n=0;return t.every((r)=>{for(let s=n;s<e.length;s++)if(Mn(e[s],r))return n=s+1,!0;return!1})}function Mn(t,e){if(!t)return!1;if(t===e)return!0;let n=e.length;return t.length>n&&t.substr(0,n)===e&&t[n]==="."}var jn=class{constructor(t,e,n,r,s,i,o,a){if(this._rootScopeName=t,this.balancedBracketSelectors=i,this._onigLib=a,this._basicScopeAttributesProvider=new En(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=Ke(e,null),this._injections=null,this._tokenTypeMatchers=[],s)for(let c of Object.keys(s)){let l=X(c,te);for(let u of l)this._tokenTypeMatchers.push({matcher:u.matcher,type:s[c]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let t of this._ruleId2desc)if(t)t.dispose()}createOnigScanner(t){return this._onigLib.createOnigScanner(t)}createOnigString(t){return this._onigLib.createOnigString(t)}getMetadataForScope(t){return this._basicScopeAttributesProvider.getBasicScopeAttributes(t)}_collectInjections(){let t={lookup:(s)=>{if(s===this._rootScopeName)return this._grammar;return this.getExternalGrammar(s)},injections:(s)=>this._grammarRepository.injections(s)},e=[],n=this._rootScopeName,r=t.lookup(n);if(r){let s=r.injections;if(s)for(let o in s)Ue(e,o,s[o],this,r);let i=this._grammarRepository.injections(n);if(i)i.forEach((o)=>{let a=this.getExternalGrammar(o);if(a){let c=a.injectionSelector;if(c)Ue(e,c,a,this,a)}})}return e.sort((s,i)=>s.priority-i.priority),e}getInjections(){if(this._injections===null)this._injections=this._collectInjections();return this._injections}registerRule(t){let e=++this._lastRuleId,n=t(st(e));return this._ruleId2desc[e]=n,n}getRule(t){return this._ruleId2desc[it(t)]}getExternalGrammar(t,e){if(this._includedGrammars[t])return this._includedGrammars[t];else if(this._grammarRepository){let n=this._grammarRepository.lookup(t);if(n)return this._includedGrammars[t]=Ke(n,e&&e.$base),this._includedGrammars[t]}return}tokenizeLine(t,e,n=0){let r=this._tokenize(t,e,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(t,e,n=0){let r=this._tokenize(t,e,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(t,e,n,r){if(this._rootId===-1)this._rootId=ot.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections();let s;if(!e||e===Re.NULL){s=!0;let l=this._basicScopeAttributesProvider.getDefaultAttributes(),u=this.themeProvider.getDefaults(),h=x.set(0,l.languageId,l.tokenType,null,u.fontStyle,u.foregroundId,u.backgroundId),d=this.getRule(this._rootId).getName(null,null),f;if(d)f=O.createRootAndLookUpScopeName(d,h,this);else f=O.createRoot("unknown",h);e=new Re(null,this._rootId,-1,-1,!1,null,f,f)}else s=!1,e.reset();t=t+`
|
|
3
3
|
`;let i=this.createOnigString(t),o=i.content.length,a=new Dn(n,t,this._tokenTypeMatchers,this.balancedBracketSelectors),c=ct(this,i,s,0,e,a,!0,r);return tt(i),{lineLength:o,lineTokens:a,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function Ke(t,e){return t=tn(t),t.repository=t.repository||{},t.repository.$self={$vscodeTextmateLocation:t.$vscodeTextmateLocation,patterns:t.patterns,name:t.scopeName},t.repository.$base=e||t.repository.$self,t}var O=class t{constructor(e,n,r){this.parent=e,this.scopePath=n,this.tokenAttributes=r}static fromExtension(e,n){let r=e,s=e?.scopePath??null;for(let i of n)s=be.push(s,i.scopeNames),r=new t(r,s,i.encodedTokenAttributes);return r}static createRoot(e,n){return new t(null,new be(null,e),n)}static createRootAndLookUpScopeName(e,n,r){let s=r.getMetadataForScope(e),i=new be(null,e),o=r.themeProvider.themeMatch(i),a=t.mergeAttributes(n,s,o);return new t(null,i,a)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(e){return t.equals(this,e)}static equals(e,n){do{if(e===n)return!0;if(!e&&!n)return!0;if(!e||!n)return!1;if(e.scopeName!==n.scopeName||e.tokenAttributes!==n.tokenAttributes)return!1;e=e.parent,n=n.parent}while(!0)}static mergeAttributes(e,n,r){let s=-1,i=0,o=0;if(r!==null)s=r.fontStyle,i=r.foregroundId,o=r.backgroundId;return x.set(e,n.languageId,n.tokenType,null,s,i,o)}pushAttributed(e,n){if(e===null)return this;if(e.indexOf(" ")===-1)return t._pushAttributed(this,e,n);let r=e.split(/ /g),s=this;for(let i of r)s=t._pushAttributed(s,i,n);return s}static _pushAttributed(e,n,r){let s=r.getMetadataForScope(n),i=e.scopePath.push(n),o=r.themeProvider.themeMatch(i),a=t.mergeAttributes(e.tokenAttributes,s,o);return new t(e,i,a)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let n=[],r=this;while(r&&r!==e)n.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(r.parent?.scopePath??null)}),r=r.parent;return r===e?n.reverse():void 0}},Re=class t{constructor(e,n,r,s,i,o,a,c){this.parent=e,this.ruleId=n,this.beginRuleCapturedEOL=i,this.endRule=o,this.nameScopesList=a,this.contentNameScopesList=c,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=s}_stackElementBrand=void 0;static NULL=new t(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(e){if(e===null)return!1;return t._equals(this,e)}static _equals(e,n){if(e===n)return!0;if(!this._structuralEquals(e,n))return!1;return O.equals(e.contentNameScopesList,n.contentNameScopesList)}static _structuralEquals(e,n){do{if(e===n)return!0;if(!e&&!n)return!0;if(!e||!n)return!1;if(e.depth!==n.depth||e.ruleId!==n.ruleId||e.endRule!==n.endRule)return!1;e=e.parent,n=n.parent}while(!0)}clone(){return this}static _reset(e){while(e)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){t._reset(this)}pop(){return this.parent}safePop(){if(this.parent)return this.parent;return this}push(e,n,r,s,i,o,a){return new t(this,e,n,r,s,i,o,a)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,n){if(this.parent)n=this.parent._writeString(e,n);return e[n++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,n}withContentNameScopesList(e){if(this.contentNameScopesList===e)return this;return this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(e){if(this.endRule===e)return this;return new t(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let n=this;while(n&&n._enterPos===e._enterPos){if(n.ruleId===e.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){return{ruleId:it(this.ruleId),beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(e,n){let r=O.fromExtension(e?.nameScopesList??null,n.nameScopesList);return new t(e,st(n.ruleId),n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,O.fromExtension(r,n.contentNameScopesList))}},Fn=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(t,e){this.balancedBracketScopes=t.flatMap((n)=>{if(n==="*")return this.allowAny=!0,[];return X(n,te).map((r)=>r.matcher)}),this.unbalancedBracketScopes=e.flatMap((n)=>X(n,te).map((r)=>r.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(t){for(let e of this.unbalancedBracketScopes)if(e(t))return!1;for(let e of this.balancedBracketScopes)if(e(t))return!0;return this.allowAny}},Dn=class{constructor(t,e,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=t,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(t,e){this.produceFromScopes(t.contentNameScopesList,e)}produceFromScopes(t,e){if(this._lastTokenEndIndex>=e)return;if(this._emitBinaryTokens){let r=t?.tokenAttributes??0,s=!1;if(this.balancedBracketSelectors?.matchesAlways)s=!0;if(this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let i=t?.getScopeNames()??[];for(let o of this._tokenTypeOverrides)if(o.matcher(i))r=x.set(r,0,dn(o.type),null,-1,0,0);if(this.balancedBracketSelectors)s=this.balancedBracketSelectors.match(i)}if(s)r=x.set(r,0,8,s,-1,0,0);if(this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===r){this._lastTokenEndIndex=e;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(r),this._lastTokenEndIndex=e;return}let n=t?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:e,scopes:n}),this._lastTokenEndIndex=e}getResult(t,e){if(this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===e-1)this._tokens.pop();if(this._tokens.length===0)this._lastTokenEndIndex=-1,this.produce(t,e),this._tokens[this._tokens.length-1].startIndex=0;return this._tokens}getBinaryResult(t,e){if(this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===e-1)this._binaryTokens.pop(),this._binaryTokens.pop();if(this._binaryTokens.length===0)this._lastTokenEndIndex=-1,this.produce(t,e),this._binaryTokens[this._binaryTokens.length-2]=0;let n=new Uint32Array(this._binaryTokens.length);for(let r=0,s=this._binaryTokens.length;r<s;r++)n[r]=this._binaryTokens[r];return n}},Wn=class{constructor(t,e){this._onigLib=e,this._theme=t}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let t of this._grammars.values())t.dispose()}setTheme(t){this._theme=t}getColorMap(){return this._theme.getColorMap()}addGrammar(t,e){if(this._rawGrammars.set(t.scopeName,t),e)this._injectionGrammars.set(t.scopeName,e)}lookup(t){return this._rawGrammars.get(t)}injections(t){return this._injectionGrammars.get(t)}getDefaults(){return this._theme.getDefaults()}themeMatch(t){return this._theme.match(t)}grammarForScopeName(t,e,n,r,s){if(!this._grammars.has(t)){let i=this._rawGrammars.get(t);if(!i)return null;this._grammars.set(t,$n(t,i,e,n,r,s,this,this._onigLib))}return this._grammars.get(t)}},ht=class{_options;_syncRegistry;_ensureGrammarCache;constructor(t){this._options=t,this._syncRegistry=new Wn(M.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,e){this._syncRegistry.setTheme(M.createFromRawTheme(t,e))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,e,n){return this.loadGrammarWithConfiguration(t,e,{embeddedLanguages:n})}loadGrammarWithConfiguration(t,e,n){return this._loadGrammar(t,e,n.embeddedLanguages,n.tokenTypes,new Fn(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,e,n,r,s){let i=new yn(this._syncRegistry,t);while(i.Q.length>0)i.Q.map((o)=>this._loadSingleGrammar(o.scopeName)),i.processQueue();return this._grammarForScopeName(t,e,n,r,s)}_loadSingleGrammar(t){if(!this._ensureGrammarCache.has(t))this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0)}_doLoadSingleGrammar(t){let e=this._options.loadGrammar(t);if(e){let n=typeof this._options.getInjections==="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(e,n)}}addGrammar(t,e=[],n=0,r=null){return this._syncRegistry.addGrammar(t,e),this._grammarForScopeName(t.scopeName,n,r)}_grammarForScopeName(t,e=0,n=null,r=null,s=null){return this._syncRegistry.grammarForScopeName(t,e,n,r,s)}},ne=Re.NULL;function q(t,e){let n=typeof t==="string"?{}:{...t.colorReplacements},r=typeof t==="string"?t:t.name;for(let[s,i]of Object.entries(e?.colorReplacements||{}))if(typeof i==="string")n[s]=i;else if(s===r)Object.assign(n,i);return n}function v(t,e){if(!t)return t;return e?.[t?.toLowerCase()]||t}function pt(t){return Array.isArray(t)?t:[t]}async function Te(t){return Promise.resolve(typeof t==="function"?t():t).then((e)=>e.default||e)}function z(t){return!t||["plaintext","txt","text","plain"].includes(t)}function _t(t){return t==="ansi"||z(t)}function U(t){return t==="none"}function yt(t){return U(t)}var Hn=/(\r?\n)/g;function P(t,e=!1){if(t.length===0)return[["",0]];let n=t.split(Hn),r=0,s=[];for(let i=0;i<n.length;i+=2){let o=e?n[i]+(n[i+1]||""):n[i];s.push([o,r]),r+=n[i].length,r+=n[i+1]?.length||0}return s}var ft={light:"#333333",dark:"#bbbbbb"},dt={light:"#fffffe",dark:"#1e1e1e"},mt="__shiki_resolved";function re(t){if(t?.[mt])return t;let e={...t};if(e.tokenColors&&!e.settings)e.settings=e.tokenColors,delete e.tokenColors;e.type||="dark",e.colorReplacements={...e.colorReplacements},e.settings||=[];let{bg:n,fg:r}=e;if(!n||!r){let a=e.settings?e.settings.find((c)=>!c.name&&!c.scope):void 0;if(a?.settings?.foreground)r=a.settings.foreground;if(a?.settings?.background)n=a.settings.background;if(!r&&e?.colors?.["editor.foreground"])r=e.colors["editor.foreground"];if(!n&&e?.colors?.["editor.background"])n=e.colors["editor.background"];if(!r)r=e.type==="light"?ft.light:ft.dark;if(!n)n=e.type==="light"?dt.light:dt.dark;e.fg=r,e.bg=n}if(!(e.settings[0]&&e.settings[0].settings&&!e.settings[0].scope))e.settings.unshift({settings:{foreground:e.fg,background:e.bg}});let s=0,i=new Map;function o(a){if(i.has(a))return i.get(a);s+=1;let c=`#${s.toString(16).padStart(8,"0").toLowerCase()}`;if(e.colorReplacements?.[`#${c}`])return o(a);return i.set(a,c),c}e.settings=e.settings.map((a)=>{let c=a.settings?.foreground&&!a.settings.foreground.startsWith("#"),l=a.settings?.background&&!a.settings.background.startsWith("#");if(!c&&!l)return a;let u={...a,settings:{...a.settings}};if(c){let h=o(a.settings.foreground);e.colorReplacements[h]=a.settings.foreground,u.settings.foreground=h}if(l){let h=o(a.settings.background);e.colorReplacements[h]=a.settings.background,u.settings.background=h}return u});for(let a of Object.keys(e.colors||{}))if(a==="editor.foreground"||a==="editor.background"||a.startsWith("terminal.ansi")){if(!e.colors[a]?.startsWith("#")){let c=o(e.colors[a]);e.colorReplacements[c]=e.colors[a],e.colors[a]=c}}return Object.defineProperty(e,mt,{enumerable:!1,writable:!1,value:!0}),e}async function bt(t){return[...new Set((await Promise.all(t.filter((e)=>!_t(e)).map(async(e)=>await Te(e).then((n)=>Array.isArray(n)?n:[n])))).flat())]}async function St(t){return(await Promise.all(t.map(async(e)=>yt(e)?null:re(await Te(e))))).filter((e)=>!!e)}function wt(t,e){if(!e)return t;if(e[t]){let n=new Set([t]);while(e[t]){if(t=e[t],n.has(t))throw new S(`Circular alias \`${[...n].join(" -> ")} -> ${t}\``);n.add(t)}}return t}var qn=class extends ht{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(t,e,n,r={}){super(t);this._resolver=t,this._themes=e,this._langs=n,this._alias=r,this._themes.map((s)=>this.loadTheme(s)),this.loadLanguages(this._langs)}getTheme(t){if(typeof t==="string")return this._resolvedThemes.get(t);else return this.loadTheme(t)}loadTheme(t){let e=re(t);if(e.name)this._resolvedThemes.set(e.name,e),this._loadedThemesCache=null;return e}getLoadedThemes(){if(!this._loadedThemesCache)this._loadedThemesCache=[...this._resolvedThemes.keys()];return this._loadedThemesCache}setTheme(t){let e=this._textmateThemeCache.get(t);if(!e)e=M.createFromRawTheme(t),this._textmateThemeCache.set(t,e);this._syncRegistry.setTheme(e)}getGrammar(t){return t=wt(t,this._alias),this._resolvedGrammars.get(t)}loadLanguage(t){if(this.getGrammar(t.name))return;let e=new Set([...this._langMap.values()].filter((s)=>s.embeddedLangsLazy?.includes(t.name)));this._resolver.addLanguage(t);let n={balancedBracketSelectors:t.balancedBracketSelectors||["*"],unbalancedBracketSelectors:t.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(t.scopeName,t);let r=this.loadGrammarWithConfiguration(t.scopeName,1,n);if(r.name=t.name,this._resolvedGrammars.set(t.name,r),t.aliases)t.aliases.forEach((s)=>{this._alias[s]=t.name});if(this._loadedLanguagesCache=null,e.size)for(let s of e)this._resolvedGrammars.delete(s.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(s.scopeName),this._syncRegistry?._grammars?.delete(s.scopeName),this.loadLanguage(this._langMap.get(s.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(t){for(let r of t)this.resolveEmbeddedLanguages(r);let e=[...this._langGraph.entries()],n=e.filter(([r,s])=>!s);if(n.length){let r=e.filter(([s,i])=>{if(!i)return!1;return(i.embeddedLanguages||i.embeddedLangs)?.some((o)=>n.map(([a])=>a).includes(o))}).filter((s)=>!n.includes(s));throw new S(`Missing languages ${n.map(([s])=>`\`${s}\``).join(", ")}, required by ${r.map(([s])=>`\`${s}\``).join(", ")}`)}for(let[r,s]of e)this._resolver.addLanguage(s);for(let[r,s]of e)this.loadLanguage(s)}getLoadedLanguages(){if(!this._loadedLanguagesCache)this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])];return this._loadedLanguagesCache}resolveEmbeddedLanguages(t){this._langMap.set(t.name,t),this._langGraph.set(t.name,t);let e=t.embeddedLanguages??t.embeddedLangs;if(e)for(let n of e)this._langGraph.set(n,this._langMap.get(n))}},zn=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(t,e){this._onigLib={createOnigScanner:(n)=>t.createScanner(n),createOnigString:(n)=>t.createString(n)},e.forEach((n)=>this.addLanguage(n))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){if(this._langs.set(t.name,t),t.aliases)t.aliases.forEach((e)=>{this._langs.set(e,t)});if(this._scopeToLang.set(t.scopeName,t),t.injectTo)t.injectTo.forEach((e)=>{if(!this._injections.get(e))this._injections.set(e,[]);this._injections.get(e).push(t.scopeName)})}getInjections(t){let e=t.split("."),n=[];for(let r=1;r<=e.length;r++){let s=e.slice(0,r).join(".");n=[...n,...this._injections.get(s)||[]]}return n}},H=0;function ve(t){if(H+=1,t.warnings!==!1&&H>=10&&H%10===0)console.warn(`[Shiki] ${H} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let e=!1;if(!t.engine)throw new S("`engine` option is required for synchronous mode");let n=(t.langs||[]).flat(1),r=(t.themes||[]).flat(1).map(re),s=new qn(new zn(t.engine,n),r,n,t.langAlias),i;function o(g){return wt(g,t.langAlias)}function a(g){_();let b=s.getGrammar(typeof g==="string"?g:g.name);if(!b)throw new S(`Language \`${g}\` not found, you may need to load it first`);return b}function c(g){if(g==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};_();let b=s.getTheme(g);if(!b)throw new S(`Theme \`${g}\` not found, you may need to load it first`);return b}function l(g){_();let b=c(g);if(i!==g)s.setTheme(b),i=g;return{theme:b,colorMap:s.getColorMap()}}function u(){return _(),s.getLoadedThemes()}function h(){return _(),s.getLoadedLanguages()}function d(...g){_(),s.loadLanguages(g.flat(1))}async function f(...g){return d(await bt(g))}function m(...g){_();for(let b of g.flat(1))s.loadTheme(b)}async function y(...g){return _(),m(await St(g))}function _(){if(e)throw new S("Shiki instance has been disposed")}function p(){if(e)return;e=!0,s.dispose(),H-=1}return{setTheme:l,getTheme:c,getLanguage:a,getLoadedThemes:u,getLoadedLanguages:h,resolveLangAlias:o,loadLanguage:f,loadLanguageSync:d,loadTheme:y,loadThemeSync:m,dispose:p,[Symbol.dispose]:p}}async function Ae(t){if(!t.engine)console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[e,n,r]=await Promise.all([St(t.themes||[]),bt(t.langs||[]),t.engine]);return ve({...t,themes:e,langs:n,engine:r})}var Ct=new WeakMap;function K(t,e){Ct.set(t,e)}function G(t){return Ct.get(t)}var se=class t{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(e,n){return new t(Object.fromEntries(pt(n).map((r)=>[r,ne])),e)}constructor(...e){if(e.length===2){let[n,r]=e;this.lang=r,this._stacks=n}else{let[n,r,s]=e;this.lang=r,this._stacks={[s]:n}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return Un(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function Un(t){let e=[],n=new Set;function r(s){if(n.has(s))return;n.add(s);let i=s?.nameScopesList?.scopeName;if(i)e.push(i);if(s.parent)r(s.parent)}return r(t),e}function Kn(t,e){if(!(t instanceof se))throw new S("Invalid grammar state");return t.getInternalStack(e)}var Vn=/,/,Yn=/ /;function Ee(t,e,n={}){let{theme:r=t.getLoadedThemes()[0]}=n;if(z(t.resolveLangAlias(n.lang||"text"))||U(r))return P(e).map((a)=>[{content:a[0],offset:a[1]}]);let{theme:s,colorMap:i}=t.setTheme(r),o=t.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==o.name)throw new S(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${o.name}"`);if(!n.grammarState.themes.includes(s.name))throw new S(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${s.name}"`)}return Rt(e,o,s,i,n)}function kt(...t){if(t.length===2)return G(t[1]);let[e,n,r={}]=t,{lang:s="text",theme:i=e.getLoadedThemes()[0]}=r;if(z(s)||U(i))throw new S("Plain language does not have grammar state");if(s==="ansi")throw new S("ANSI language does not have grammar state");let{theme:o,colorMap:a}=e.setTheme(i),c=e.getLanguage(s);return new se(xe(n,c,o,a,r).stateStack,c.name,o.name)}function Rt(t,e,n,r,s){let i=xe(t,e,n,r,s),o=new se(i.stateStack,e.name,n.name);return K(i.tokens,o),i.tokens}function xe(t,e,n,r,s){let i=q(n,s),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:a=500,includeExplanation:c=!1}=s,l=P(t),u=s.grammarState?Kn(s.grammarState,n.name)??ne:s.grammarContextCode!=null?xe(s.grammarContextCode,e,n,r,{...s,grammarState:void 0,grammarContextCode:void 0}).stateStack:ne,h=[],d=[];for(let f=0,m=l.length;f<m;f++){let[y,_]=l[f];if(y===""){h=[],d.push([]);continue}if(o>0&&y.length>=o){h=[],d.push([{content:y,offset:_,color:"",fontStyle:0}]);continue}let p,g,b;if(c&&c!=="tokenType")p=e.tokenizeLine(y,u,a),g=p.tokens,b=0;let C=e.tokenizeLine2(y,u,a),R=C.tokens.length/2;for(let N=0;N<R;N++){let E=C.tokens[2*N],ge=N+1<R?C.tokens[2*N+2]:y.length;if(E===ge)continue;let pe=C.tokens[2*N+1],Zt=v(r[x.getForeground(pe)],i),en=x.getFontStyle(pe),Y={content:y.substring(E,ge),offset:_+E,color:Zt,fontStyle:en};if(c==="tokenType")Y.type=x.getTokenType(pe);else if(c){let Me=[];if(c!=="scopeName")for(let T of n.settings){let L;switch(typeof T.scope){case"string":L=T.scope.split(Vn).map((_e)=>_e.trim());break;case"object":L=T.scope;break;default:continue}Me.push({settings:T,selectors:L.map((_e)=>_e.split(Yn))})}Y.explanation=[];let je=0;while(E+je<ge){let T=g[b],L=y.substring(T.startIndex,T.endIndex);je+=L.length,Y.explanation.push({content:L,scopes:c==="scopeName"?Jn(T.scopes):Qn(Me,T.scopes)}),b+=1}}h.push(Y)}d.push(h),h=[],u=C.ruleStack}return{tokens:d,stateStack:u}}function Jn(t){return t.map((e)=>({scopeName:e}))}function Qn(t,e){let n=[];for(let r=0,s=e.length;r<s;r++){let i=e[r];n[r]={scopeName:i,themeMatches:Zn(t,i,e.slice(0,r))}}return n}function gt(t,e){return t===e||e.substring(0,t.length)===t&&e[t.length]==="."}function Xn(t,e,n){if(!gt(t.at(-1),e))return!1;let r=t.length-2,s=n.length-1;while(r>=0&&s>=0){if(gt(t[r],n[s]))r-=1;s-=1}if(r===-1)return!0;return!1}function Zn(t,e,n){let r=[];for(let{selectors:s,settings:i}of t)for(let o of s)if(Xn(o,e,n)){r.push(i);break}return r}function ie(t,e,n,r=Ee){let s=Object.entries(n.themes).filter((l)=>l[1]).map((l)=>({color:l[0],theme:l[1]})),i=s.map((l)=>{let u=r(t,e,{...n,theme:l.theme});return{tokens:u,state:G(u),theme:typeof l.theme==="string"?l.theme:l.theme.name}}),o=er(...i.map((l)=>l.tokens)),a=o[0].map((l,u)=>l.map((h,d)=>{let f={content:h.content,variants:{},offset:h.offset};if("includeExplanation"in n&&n.includeExplanation)f.explanation=h.explanation;return o.forEach((m,y)=>{let{content:_,explanation:p,offset:g,...b}=m[u][d];f.variants[s[y].color]=b}),f})),c=i[0].state?new se(Object.fromEntries(i.map((l)=>[l.theme,l.state?.getInternalStack(l.theme)])),i[0].state.lang):void 0;if(c)K(a,c);return a}function er(...t){let e=t.map(()=>[]),n=t.length;for(let r=0;r<t[0].length;r++){let s=t.map((c)=>c[r]),i=e.map(()=>[]);e.forEach((c,l)=>c.push(i[l]));let o=s.map(()=>0),a=s.map((c)=>c[0]);while(a.every((c)=>c)){let c=Math.min(...a.map((l)=>l.content.length));for(let l=0;l<n;l++){let u=a[l];if(u.content.length===c)i[l].push(u),o[l]+=1,a[l]=s[l][o[l]];else i[l].push({...u,content:u.content.slice(0,c)}),a[l]={...u,content:u.content.slice(c),offset:u.offset+c}}}}return e}var Nt=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];var Tt={}.hasOwnProperty;function vt(t,e){let n=e||{};function r(s,...i){let{invalid:o,handlers:a}=r;if(s&&Tt.call(s,t)){let c=String(s[t]);o=Tt.call(a,c)?a[c]:r.unknown}if(o)return o.call(this,s,...i)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var tr=/["&'<>`]/g,nr=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,rr=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,sr=/[|\\{}()[\]^$+*?.]/g,At=new WeakMap;function Et(t,e){if(t=t.replace(e.subset?ir(e.subset):tr,r),e.subset||e.escapeOnly)return t;return t.replace(nr,n).replace(rr,r);function n(s,i,o){return e.format((s.charCodeAt(0)-55296)*1024+s.charCodeAt(1)-56320+65536,o.charCodeAt(i+2),e)}function r(s,i,o){return e.format(s.charCodeAt(0),o.charCodeAt(i+1),e)}}function ir(t){let e=At.get(t);if(!e)e=or(t),At.set(t,e);return e}function or(t){let e=[],n=-1;while(++n<t.length)e.push(t[n].replace(sr,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}var ar=/[\dA-Fa-f]/;function xt(t,e,n){let r="&#x"+t.toString(16).toUpperCase();return n&&e&&!ar.test(String.fromCharCode(e))?r:r+";"}var cr=/\d/;function It(t,e,n){let r="&#"+String(t);return n&&e&&!cr.test(String.fromCharCode(e))?r:r+";"}var Lt=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"];var oe={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"};var Pt=["cent","copy","divide","gt","lt","not","para","times"];var Gt={}.hasOwnProperty,Ie={},ae;for(ae in oe)if(Gt.call(oe,ae))Ie[oe[ae]]=ae;var lr=/[^\dA-Za-z]/;function Bt(t,e,n,r){let s=String.fromCharCode(t);if(Gt.call(Ie,s)){let i=Ie[s],o="&"+i;if(n&&Lt.includes(i)&&!Pt.includes(i)&&(!r||e&&e!==61&&lr.test(String.fromCharCode(e))))return o;return o+";"}return""}function Ot(t,e,n){let r=xt(t,e,n.omitOptionalSemicolons),s;if(n.useNamedReferences||n.useShortestReferences)s=Bt(t,e,n.omitOptionalSemicolons,n.attribute);if((n.useShortestReferences||!s)&&n.useShortestReferences){let i=It(t,e,n.omitOptionalSemicolons);if(i.length<r.length)r=i}return s&&(!n.useShortestReferences||s.length<r.length)?s:r}function A(t,e){return Et(t,Object.assign({format:Ot},e))}var ur=/^>|^->|<!--|-->|--!>|<!-$/g,hr=[">"],fr=["<",">"];function $t(t,e,n,r){return r.settings.bogusComments?"<?"+A(t.value,Object.assign({},r.settings.characterReferences,{subset:hr}))+">":"<!--"+t.value.replace(ur,s)+"-->";function s(i){return A(i,Object.assign({},r.settings.characterReferences,{subset:fr}))}}function Mt(t,e,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}var w=jt(1),Le=jt(-1),dr=[];function jt(t){return e;function e(n,r,s){let i=n?n.children:dr,o=(r||0)+t,a=i[o];if(!s)while(a&&Er(a))o+=t,a=i[o];return a}}var mr={}.hasOwnProperty;function ce(t){return e;function e(n,r,s){return mr.call(t,n.tagName)&&t[n.tagName](n,r,s)}}var V=ce({body:pr,caption:Pe,colgroup:Pe,dd:Sr,dt:br,head:Pe,html:gr,li:yr,optgroup:wr,option:Cr,p:_r,rp:Ft,rt:Ft,tbody:Rr,td:Dt,tfoot:Nr,th:Dt,thead:kr,tr:Tr});function Pe(t,e,n){let r=w(n,e,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&Er(r.value.charAt(0)))}function gr(t,e,n){let r=w(n,e);return!r||r.type!=="comment"}function pr(t,e,n){let r=w(n,e);return!r||r.type!=="comment"}function _r(t,e,n){let r=w(n,e);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function yr(t,e,n){let r=w(n,e);return!r||r.type==="element"&&r.tagName==="li"}function br(t,e,n){let r=w(n,e);return Boolean(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function Sr(t,e,n){let r=w(n,e);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function Ft(t,e,n){let r=w(n,e);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function wr(t,e,n){let r=w(n,e);return!r||r.type==="element"&&r.tagName==="optgroup"}function Cr(t,e,n){let r=w(n,e);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function kr(t,e,n){let r=w(n,e);return Boolean(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function Rr(t,e,n){let r=w(n,e);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function Nr(t,e,n){return!w(n,e)}function Tr(t,e,n){let r=w(n,e);return!r||r.type==="element"&&r.tagName==="tr"}function Dt(t,e,n){let r=w(n,e);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}var Wt=ce({body:xr,colgroup:Ir,head:Ar,html:vr,tbody:Lr});function vr(t){let e=w(t,-1);return!e||e.type!=="comment"}function Ar(t){let e=new Set;for(let r of t.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(e.has(r.tagName))return!1;e.add(r.tagName)}let n=t.children[0];return!n||n.type==="element"}function xr(t){let e=w(t,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&Er(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}function Ir(t,e,n){let r=Le(n,e),s=w(t,-1,!0);if(n&&r&&r.type==="element"&&r.tagName==="colgroup"&&V(r,n.children.indexOf(r),n))return!1;return Boolean(s&&s.type==="element"&&s.tagName==="col")}function Lr(t,e,n){let r=Le(n,e),s=w(t,-1);if(n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&V(r,n.children.indexOf(r),n))return!1;return Boolean(s&&s.type==="element"&&s.tagName==="tr")}var le={name:[[`
|
|
4
4
|
\f\r &/=>`.split(""),`
|
|
Binary file
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t,i,d,B,wn,Ic,mn,ir,Cn,fa,or}from"./chunk-eq59kad4.js";import{Ge,bt,qt,et,sn,Kn,se,Oe,tn,Zn,nn,Ba,lo,po,uo,Rr,xn,mo,Ir,xt,Dr,Bn,_n,Or,Qn,$r,fo,ho,Fa,We,go,Br,Jn,Fr,za,Ha,er,vo,Ua,yo,Mi,cn,ja,bo,xo,_o,It,qa,Va,zr,wo,Ga,_,Vt,ln,Ye,tr,_e}from"./chunk-zapwrc5k.js";import{oo,so,ne,aa,xc,co,$a}from"./chunk-gxwsf4t1.js";import{Sn}from"./chunk-hxsrph02.js";var cr={};Sn(cr,{default:()=>Z});var zn=/\s/;function Wn(r){var e=r.length;while(e--&&zn.test(r.charAt(e)));return e}var re=Wn;var qn=/^\s+/;function Hn(r){return r?r.slice(0,re(r)+1).replace(qn,""):r}var ee=Hn;var te=NaN,$n=/^[-+]0x[0-9a-f]+$/i,ro=/^0b[01]+$/i,eo=/^0o[0-7]+$/i,to=parseInt;function no(r){if(typeof r=="number")return r;if(sn(r))return te;if(Oe(r)){var e=typeof r.valueOf=="function"?r.valueOf():r;r=Oe(e)?e+"":e}if(typeof r!="string")return r===0?r:+r;r=ee(r);var n=ro.test(r);return n||eo.test(r)?to(r.slice(2),n?2:8):$n.test(r)?te:+r}var oe=no;var ie=1/0,io=179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;function ao(r){if(!r)return r===0?r:0;if(r=oe(r),r===ie||r===-ie){var e=r<0?-1:1;return e*io}return r===r?r:0}var V=ao;function Eo(r){var e=V(r),n=e%1;return e===e?n?e-n:e:0}var ae=Eo;var fe=Object.create,Oo=function(){function r(){}return function(e){if(!Oe(e))return{};if(fe)return fe(e);r.prototype=e;var n=new r;return r.prototype=void 0,n}}(),ue=Oo;function Lo(r,e){var n=-1,o=r.length;e||(e=Array(o));while(++n<o)e[n]=r[n];return e}var ur=Lo;function Io(r,e,n){if(e=="__proto__"&&Ba)Ba(r,e,{configurable:!0,enumerable:!0,value:n,writable:!0});else r[e]=n}var R=Io;var So=Object.prototype,No=So.hasOwnProperty;function Po(r,e,n){var o=r[e];if(!(No.call(r,e)&&xn(o,n))||n===void 0&&!(e in r))R(r,e,n)}var M=Po;function ko(r,e,n,o){var a=!n;n||(n={});var f=-1,s=e.length;while(++f<s){var u=e[f],c=o?o(n[u],r[u],u,n,r):void 0;if(c===void 0)c=r[u];if(a)R(n,u,c);else M(n,u,c)}return n}var P=ko;function To(r,e,n){if(!Oe(n))return!1;var o=typeof e;if(o=="number"?xt(n)&&Rr(e,n.length):o=="string"&&(e in n))return xn(n[e],r);return!1}var T=To;function Co(r){return Ir(function(e,n){var o=-1,a=n.length,f=a>1?n[a-1]:void 0,s=a>2?n[2]:void 0;if(f=r.length>3&&typeof f=="function"?(a--,f):void 0,s&&T(n[0],n[1],s))f=a<3?void 0:f,a=1;e=Object(e);while(++o<a){var u=n[o];if(u)r(e,u,o,f)}return e})}var de=Co;function Ao(r){var e=[];if(r!=null)for(var n in Object(r))e.push(n);return e}var ce=Ao;var Ro=Object.prototype,Mo=Ro.hasOwnProperty;function jo(r){if(!Oe(r))return ce(r);var e=Dr(r),n=[];for(var o in r)if(!(o=="constructor"&&(e||!Mo.call(r,o))))n.push(o);return n}var pe=jo;function Bo(r){return xt(r)?fo(r,!0):pe(r)}var L=Bo;function Do(r){var e=r==null?0:r.length;return e?Ha(r,1):[]}var S=Do;function Fo(r){return lo(mo(r,void 0,S),r+"")}var le=Fo;var Go=ho(Object.getPrototypeOf,Object),Y=Go;var Xo="[object Object]",Uo=Function.prototype,Vo=Object.prototype,me=Uo.toString,Yo=Vo.hasOwnProperty,zo=me.call(Object);function Wo(r){if(!et(r)||qt(r)!=Xo)return!1;var e=Y(r);if(e===null)return!0;var n=Yo.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&me.call(n)==zo}var he=Wo;var qo="\\ud800-\\udfff",Ho="\\u0300-\\u036f",Ko="\\ufe20-\\ufe2f",Jo="\\u20d0-\\u20ff",Zo=Ho+Ko+Jo,$o="\\ufe0e\\ufe0f",Qo="\\u200d",ri=RegExp("["+Qo+qo+Zo+$o+"]");function ei(r){return ri.test(r)}var ge=ei;function ti(r,e){return r&&P(e,We(e),r)}var ve=ti;function ni(r,e){return r&&P(e,L(e),r)}var be=ni;var xe=typeof cr=="object"&&cr&&!cr.nodeType&&cr,ye=xe&&typeof dr=="object"&&dr&&!dr.nodeType&&dr,oi=ye&&ye.exports===xe,we=oi?Ge.Buffer:void 0,Ee=we?we.allocUnsafe:void 0;function ii(r,e){if(e)return r.slice();var n=r.length,o=Ee?Ee(n):new r.constructor(n);return r.copy(o),o}var Z=ii;function ai(r,e){return P(r,Ua(r),e)}var Le=ai;var fi=Object.getOwnPropertySymbols,si=!fi?vo:function(r){var e=[];while(r)za(e,Ua(r)),r=Y(r);return e},pr=si;function ui(r,e){return P(r,pr(r),e)}var Ie=ui;function di(r){return yo(r,L,pr)}var Se=di;var ci=Object.prototype,pi=ci.hasOwnProperty;function li(r){var e=r.length,n=new r.constructor(e);if(e&&typeof r[0]=="string"&&pi.call(r,"index"))n.index=r.index,n.input=r.input;return n}var Ne=li;function mi(r){var e=new r.constructor(r.byteLength);return new ja(e).set(new ja(r)),e}var z=mi;function hi(r,e){var n=e?z(r.buffer):r.buffer;return new r.constructor(n,r.byteOffset,r.byteLength)}var Pe=hi;var gi=/\w*$/;function vi(r){var e=new r.constructor(r.source,gi.exec(r));return e.lastIndex=r.lastIndex,e}var ke=vi;var Te=bt?bt.prototype:void 0,Ce=Te?Te.valueOf:void 0;function bi(r){return Ce?Object(Ce.call(r)):{}}var Ae=bi;function yi(r,e){var n=e?z(r.buffer):r.buffer;return new r.constructor(n,r.byteOffset,r.length)}var lr=yi;var wi="[object Boolean]",_i="[object Date]",Ei="[object Map]",xi="[object Number]",Oi="[object RegExp]",Li="[object Set]",Ii="[object String]",Si="[object Symbol]",Ni="[object ArrayBuffer]",Pi="[object DataView]",ki="[object Float32Array]",Ti="[object Float64Array]",Ci="[object Int8Array]",Ai="[object Int16Array]",Ri="[object Int32Array]",ji="[object Uint8Array]",Bi="[object Uint8ClampedArray]",Di="[object Uint16Array]",Fi="[object Uint32Array]";function Gi(r,e,n){var o=r.constructor;switch(e){case Ni:return z(r);case wi:case _i:return new o(+r);case Pi:return Pe(r,n);case ki:case Ti:case Ci:case Ai:case Ri:case ji:case Bi:case Di:case Fi:return lr(r,n);case Ei:return new o;case xi:case Ii:return new o(r);case Oi:return ke(r);case Li:return new o;case Si:return Ae(r)}}var Re=Gi;function Xi(r){return typeof r.constructor=="function"&&!Dr(r)?ue(Y(r)):{}}var mr=Xi;var Ui="[object Map]";function Vi(r){return et(r)&&cn(r)==Ui}var Me=Vi;var je=Qn&&Qn.isMap,Yi=je?Or(je):Me,Be=Yi;var zi="[object Set]";function Wi(r){return et(r)&&cn(r)==zi}var De=Wi;var Fe=Qn&&Qn.isSet,qi=Fe?Or(Fe):De,Xe=qi;var Hi=1,Ki=2,Ji=4,Ue="[object Arguments]",Zi="[object Array]",$i="[object Boolean]",Qi="[object Date]",ra="[object Error]",Ve="[object Function]",ea="[object GeneratorFunction]",ta="[object Map]",na="[object Number]",ze="[object Object]",oa="[object RegExp]",ia="[object Set]",sa="[object String]",ua="[object Symbol]",da="[object WeakMap]",ca="[object ArrayBuffer]",pa="[object DataView]",la="[object Float32Array]",ma="[object Float64Array]",ha="[object Int8Array]",ga="[object Int16Array]",va="[object Int32Array]",ba="[object Uint8Array]",ya="[object Uint8ClampedArray]",wa="[object Uint16Array]",_a="[object Uint32Array]",x={};x[Ue]=x[Zi]=x[ca]=x[pa]=x[$i]=x[Qi]=x[la]=x[ma]=x[ha]=x[ga]=x[va]=x[ta]=x[na]=x[ze]=x[oa]=x[ia]=x[sa]=x[ua]=x[ba]=x[ya]=x[wa]=x[_a]=!0;x[ra]=x[Ve]=x[da]=!1;function hr(r,e,n,o,a,f){var s,u=e&Hi,c=e&Ki,p=e&Ji;if(n)s=a?n(r,o,a,f):n(r);if(s!==void 0)return s;if(!Oe(r))return r;var l=se(r);if(l){if(s=Ne(r),!u)return ur(r,s)}else{var m=cn(r),h=m==Ve||m==ea;if(_n(r))return Z(r,u);if(m==ze||m==Ue||h&&!a){if(s=c||h?{}:mr(r),!u)return c?Ie(r,be(s,r)):Le(r,ve(s,r))}else{if(!x[m])return a?r:{};s=Re(r,m,u)}}f||(f=new er);var v=f.get(r);if(v)return v;if(f.set(r,s),Xe(r))r.forEach(function(g){s.add(hr(g,e,n,g,r,f))});else if(Be(r))r.forEach(function(g,w){s.set(w,hr(g,e,n,w,r,f))});var y=p?c?Se:Mi:c?L:We,b=l?void 0:y(r);return po(b||r,function(g,w){if(b)w=g,g=r[w];M(s,w,hr(g,e,n,w,r,f))}),s}var qe=hr;var Ea=1,xa=4;function Oa(r){return qe(r,Ea|xa)}var He=Oa;var La=function(){return Ge.Date.now()},Er=La;var Ke=Object.prototype,Ia=Ke.hasOwnProperty,Sa=Ir(function(r,e){r=Object(r);var n=-1,o=e.length,a=o>2?e[2]:void 0;if(a&&T(e[0],e[1],a))o=1;while(++n<o){var f=e[n],s=L(f),u=-1,c=s.length;while(++u<c){var p=s[u],l=r[p];if(l===void 0||xn(l,Ke[p])&&!Ia.call(r,p))r[p]=f[p]}}return r}),Je=Sa;function Na(r,e,n){if(n!==void 0&&!xn(r[e],n)||n===void 0&&!(e in r))R(r,e,n)}var Q=Na;function Pa(r,e){if(e==="constructor"&&typeof r[e]==="function")return;if(e=="__proto__")return;return r[e]}var rr=Pa;function ka(r){return P(r,L(r))}var Ze=ka;function Ta(r,e,n,o,a,f,s){var u=rr(r,n),c=rr(e,n),p=s.get(c);if(p){Q(r,n,p);return}var l=f?f(u,c,n+"",r,e,s):void 0,m=l===void 0;if(m){var h=se(c),v=!h&&_n(c),y=!h&&!v&&$r(c);if(l=c,h||v||y)if(se(u))l=u;else if(wo(u))l=ur(u);else if(v)m=!1,l=Z(c,!0);else if(y)m=!1,l=lr(c,!0);else l=[];else if(he(c)||Bn(c)){if(l=u,Bn(u))l=Ze(u);else if(!Oe(u)||Zn(u))l=mr(c)}else m=!1}if(m)s.set(c,l),a(l,c,o,f,s),s.delete(c);Q(r,n,l)}var $e=Ta;function Qe(r,e,n,o,a){if(r===e)return;qa(e,function(f,s){if(a||(a=new er),Oe(f))$e(r,e,s,n,Qe,o,a);else{var u=o?o(rr(r,s),f,s+"",r,e,a):void 0;if(u===void 0)u=f;Q(r,s,u)}},L)}var rt=Qe;function Ca(r){var e=r==null?0:r.length;return e?r[e-1]:void 0}var X=Ca;function Aa(r){return function(e,n,o){var a=Object(e);if(!xt(e)){var f=It(n,3);e=We(e),n=function(u){return f(a[u],u,a)}}var s=r(e,n,o);return s>-1?a[f?e[s]:s]:void 0}}var tt=Aa;var Ra=Math.max;function Ma(r,e,n){var o=r==null?0:r.length;if(!o)return-1;var a=n==null?0:ae(n);if(a<0)a=Ra(o+a,0);return uo(r,It(e,3),a)}var nt=Ma;var Da=tt(nt),nr=Da;function Xa(r,e){var n=-1,o=xt(r)?Array(r.length):[];return zr(r,function(a,f,s){o[++n]=e(a,f,s)}),o}var gr=Xa;function Ya(r,e){var n=se(r)?Kn:gr;return n(r,It(e,3))}var E=Ya;function Wa(r,e){return r==null?r:qa(r,Ga(e),L)}var ot=Wa;function Ka(r,e){return r&&Va(r,Ga(e))}var it=Ka;function Ja(r,e){return r>e}var at=Ja;var Za=Object.prototype,Qa=Za.hasOwnProperty;function rf(r,e){return r!=null&&Qa.call(r,e)}var ft=rf;function ef(r,e){return r!=null&&bo(r,e,ft)}var vr=ef;var tf="[object String]";function nf(r){return typeof r=="string"||!se(r)&&et(r)&&qt(r)==tf}var st=nf;function of(r,e){return r<e}var br=of;function af(r,e){var n={};return e=It(e,3),Va(r,function(o,a,f){R(n,a,e(o,a,f))}),n}var W=af;function ff(r,e,n){var o=-1,a=r.length;while(++o<a){var f=r[o],s=e(f);if(s!=null&&(u===void 0?s===s&&!sn(s):n(s,u)))var u=s,c=f}return c}var q=ff;function sf(r){return r&&r.length?q(r,tn,at):void 0}var I=sf;var uf=de(function(r,e,n){rt(r,e,n)}),ar=uf;function df(r){return r&&r.length?q(r,tn,br):void 0}var j=df;function cf(r,e){return r&&r.length?q(r,It(e,2),br):void 0}var H=cf;function pf(r,e,n,o){if(!Oe(r))return r;e=Br(e,r);var a=-1,f=e.length,s=f-1,u=r;while(u!=null&&++a<f){var c=Jn(e[a]),p=n;if(c==="__proto__"||c==="constructor"||c==="prototype")return r;if(a!=s){var l=u[c];if(p=o?o(l,c,u):void 0,p===void 0)p=Oe(l)?l:Rr(e[a+1])?[]:{}}M(u,c,p),u=u[c]}return r}var ut=pf;function lf(r,e,n){var o=-1,a=e.length,f={};while(++o<a){var s=e[o],u=Fr(r,s);if(n(u,s))ut(f,Br(s,r),u)}return f}var dt=lf;function mf(r,e){var n=r.length;r.sort(e);while(n--)r[n]=r[n].value;return r}var ct=mf;function hf(r,e){if(r!==e){var n=r!==void 0,o=r===null,a=r===r,f=sn(r),s=e!==void 0,u=e===null,c=e===e,p=sn(e);if(!u&&!p&&!f&&r>e||f&&s&&c&&!u&&!p||o&&s&&c||!n&&c||!a)return 1;if(!o&&!f&&!p&&r<e||p&&n&&a&&!o&&!f||u&&n&&a||!s&&a||!c)return-1}return 0}var pt=hf;function gf(r,e,n){var o=-1,a=r.criteria,f=e.criteria,s=a.length,u=n.length;while(++o<s){var c=pt(a[o],f[o]);if(c){if(o>=u)return c;var p=n[o];return c*(p=="desc"?-1:1)}}return r.index-e.index}var lt=gf;function vf(r,e,n){if(e.length)e=Kn(e,function(f){if(se(f))return function(s){return Fr(s,f.length===1?f[0]:f)};return f});else e=[tn];var o=-1;e=Kn(e,Or(It));var a=gr(r,function(f,s,u){var c=Kn(e,function(p){return p(f)});return{criteria:c,index:++o,value:f}});return ct(a,function(f,s){return lt(f,s,n)})}var mt=vf;var bf=_o("length"),ht=bf;var vt="\\ud800-\\udfff",yf="\\u0300-\\u036f",wf="\\ufe20-\\ufe2f",_f="\\u20d0-\\u20ff",Ef=yf+wf+_f,xf="\\ufe0e\\ufe0f",Of="["+vt+"]",xr="["+Ef+"]",Lr="\\ud83c[\\udffb-\\udfff]",Lf="(?:"+xr+"|"+Lr+")",yt="[^"+vt+"]",wt="(?:\\ud83c[\\udde6-\\uddff]){2}",_t="[\\ud800-\\udbff][\\udc00-\\udfff]",If="\\u200d",Et=Lf+"?",Ot="["+xf+"]?",Sf="(?:"+If+"(?:"+[yt,wt,_t].join("|")+")"+Ot+Et+")*",Nf=Ot+Et+Sf,Pf="(?:"+[yt+xr+"?",xr,wt,_t,Of].join("|")+")",gt=RegExp(Lr+"(?="+Lr+")|"+Pf+Nf,"g");function kf(r){var e=gt.lastIndex=0;while(gt.test(r))++e;return e}var Lt=kf;function Tf(r){return ge(r)?Lt(r):ht(r)}var St=Tf;function Cf(r,e){return dt(r,e,function(n,o){return xo(r,o)})}var Nt=Cf;var Af=le(function(r,e){return r==null?{}:Nt(r,e)}),K=Af;var{ceil:Rf,max:Mf}=Math;function jf(r,e,n,o){var a=-1,f=Mf(Rf((e-r)/(n||1)),0),s=Array(f);while(f--)s[o?f:++a]=r,r+=n;return s}var Pt=jf;function Bf(r){return function(e,n,o){if(o&&typeof o!="number"&&T(e,n,o))n=o=void 0;if(e=V(e),n===void 0)n=e,e=0;else n=V(n);return o=o===void 0?e<n?1:-1:V(o),Pt(e,n,o,r)}}var kt=Bf;var Df=kt(),N=Df;var Ff="[object Map]",Gf="[object Set]";function Xf(r){if(r==null)return 0;if(xt(r))return st(r)?St(r):r.length;var e=cn(r);if(e==Ff||e==Gf)return r.size;return Fa(r).length}var Tt=Xf;var Uf=Ir(function(r,e){if(r==null)return[];var n=e.length;if(n>1&&T(r,e[0],e[1]))e=[];else if(n>2&&T(e[0],e[1],e[2]))e=[e[0]];return mt(r,Ha(e,1),[])}),C=Uf;var Vf=0;function Yf(r){var e=++Vf;return go(r)+e}var J=Yf;function zf(r,e,n){var o=-1,a=r.length,f=e.length,s={};while(++o<a){var u=o<f?e[o]:void 0;n(s,r[o],u)}return s}var Ct=zf;function Wf(r,e){return Ct(r||[],e||[],M)}var Sr=Wf;class Nr{constructor(){var r={};r._next=r._prev=r,this._sentinel=r}dequeue(){var r=this._sentinel,e=r._prev;if(e!==r)return At(e),e}enqueue(r){var e=this._sentinel;if(r._prev&&r._next)At(r);r._next=e._next,e._next._prev=r,e._next=r,r._prev=e}toString(){var r=[],e=this._sentinel,n=e._prev;while(n!==e)r.push(JSON.stringify(n,qf)),n=n._prev;return"["+r.join(", ")+"]"}}function At(r){r._prev._next=r._next,r._next._prev=r._prev,delete r._next,delete r._prev}function qf(r,e){if(r!=="_next"&&r!=="_prev")return e}var Hf=nn(1);function Rt(r,e){if(r.nodeCount()<=1)return[];var n=Jf(r,e||Hf),o=Kf(n.graph,n.buckets,n.zeroIdx);return S(E(o,function(a){return r.outEdges(a.v,a.w)}))}function Kf(r,e,n){var o=[],a=e[e.length-1],f=e[0],s;while(r.nodeCount()){while(s=f.dequeue())Pr(r,e,n,s);while(s=a.dequeue())Pr(r,e,n,s);if(r.nodeCount()){for(var u=e.length-2;u>0;--u)if(s=e[u].dequeue(),s){o=o.concat(Pr(r,e,n,s,!0));break}}}return o}function Pr(r,e,n,o,a){var f=a?[]:void 0;return _(r.inEdges(o.v),function(s){var u=r.edge(s),c=r.node(s.v);if(a)f.push({v:s.v,w:s.w});c.out-=u,kr(e,n,c)}),_(r.outEdges(o.v),function(s){var u=r.edge(s),c=s.w,p=r.node(c);p.in-=u,kr(e,n,p)}),r.removeNode(o.v),f}function Jf(r,e){var n=new _e,o=0,a=0;_(r.nodes(),function(u){n.setNode(u,{v:u,in:0,out:0})}),_(r.edges(),function(u){var c=n.edge(u.v,u.w)||0,p=e(u),l=c+p;n.setEdge(u.v,u.w,l),a=Math.max(a,n.node(u.v).out+=p),o=Math.max(o,n.node(u.w).in+=p)});var f=N(a+o+3).map(function(){return new Nr}),s=o+1;return _(n.nodes(),function(u){kr(f,s,n.node(u))}),{graph:n,buckets:f,zeroIdx:s}}function kr(r,e,n){if(!n.out)r[0].enqueue(n);else if(!n.in)r[r.length-1].enqueue(n);else r[n.out-n.in+e].enqueue(n)}function Mt(r){var e=r.graph().acyclicer==="greedy"?Rt(r,n(r)):Zf(r);_(e,function(o){var a=r.edge(o);r.removeEdge(o),a.forwardName=o.name,a.reversed=!0,r.setEdge(o.w,o.v,a,J("rev"))});function n(o){return function(a){return o.edge(a).weight}}}function Zf(r){var e=[],n={},o={};function a(f){if(Object.prototype.hasOwnProperty.call(o,f))return;o[f]=!0,n[f]=!0,_(r.outEdges(f),function(s){if(Object.prototype.hasOwnProperty.call(n,s.w))e.push(s);else a(s.w)}),delete n[f]}return _(r.nodes(),a),e}function jt(r){_(r.edges(),function(e){var n=r.edge(e);if(n.reversed){r.removeEdge(e);var o=n.forwardName;delete n.reversed,delete n.forwardName,r.setEdge(e.w,e.v,n,o)}})}function k(r,e,n,o){var a;do a=J(o);while(r.hasNode(a));return n.dummy=e,r.setNode(a,n),a}function Dt(r){var e=new _e().setGraph(r.graph());return _(r.nodes(),function(n){e.setNode(n,r.node(n))}),_(r.edges(),function(n){var o=e.edge(n.v,n.w)||{weight:0,minlen:1},a=r.edge(n);e.setEdge(n.v,n.w,{weight:o.weight+a.weight,minlen:Math.max(o.minlen,a.minlen)})}),e}function yr(r){var e=new _e({multigraph:r.isMultigraph()}).setGraph(r.graph());return _(r.nodes(),function(n){if(!r.children(n).length)e.setNode(n,r.node(n))}),_(r.edges(),function(n){e.setEdge(n,r.edge(n))}),e}function Tr(r,e){var{x:n,y:o}=r,a=e.x-n,f=e.y-o,s=r.width/2,u=r.height/2;if(!a&&!f)throw Error("Not possible to find intersection inside of the rectangle");var c,p;if(Math.abs(f)*s>Math.abs(a)*u){if(f<0)u=-u;c=u*a/f,p=u}else{if(a<0)s=-s;c=s,p=s*f/a}return{x:n+c,y:o+p}}function D(r){var e=E(N(Ar(r)+1),function(){return[]});return _(r.nodes(),function(n){var o=r.node(n),a=o.rank;if(!Ye(a))e[a][o.order]=n}),e}function Ft(r){var e=j(E(r.nodes(),function(n){return r.node(n).rank}));_(r.nodes(),function(n){var o=r.node(n);if(vr(o,"rank"))o.rank-=e})}function Gt(r){var e=j(E(r.nodes(),function(f){return r.node(f).rank})),n=[];_(r.nodes(),function(f){var s=r.node(f).rank-e;if(!n[s])n[s]=[];n[s].push(f)});var o=0,a=r.graph().nodeRankFactor;_(n,function(f,s){if(Ye(f)&&s%a!==0)--o;else if(o)_(f,function(u){r.node(u).rank+=o})})}function Cr(r,e,n,o){var a={width:0,height:0};if(arguments.length>=4)a.rank=n,a.order=o;return k(r,"border",a,e)}function Ar(r){return I(E(r.nodes(),function(e){var n=r.node(e).rank;if(!Ye(n))return n}))}function Xt(r,e){var n={lhs:[],rhs:[]};return _(r,function(o){if(e(o))n.lhs.push(o);else n.rhs.push(o)}),n}function Ut(r,e){var n=Er();try{return e()}finally{console.log(r+" time: "+(Er()-n)+"ms")}}function Yt(r,e){return e()}function Wt(r){function e(n){var o=r.children(n),a=r.node(n);if(o.length)_(o,e);if(Object.prototype.hasOwnProperty.call(a,"minRank")){a.borderLeft=[],a.borderRight=[];for(var f=a.minRank,s=a.maxRank+1;f<s;++f)zt(r,"borderLeft","_bl",n,a,f),zt(r,"borderRight","_br",n,a,f)}}_(r.children(),e)}function zt(r,e,n,o,a,f){var s={width:0,height:0,rank:f,borderType:e},u=a[e][f-1],c=k(r,"border",s,n);if(a[e][f]=c,r.setParent(c,o),u)r.setEdge(u,c,{weight:1})}function Kt(r){var e=r.graph().rankdir.toLowerCase();if(e==="lr"||e==="rl")Zt(r)}function Jt(r){var e=r.graph().rankdir.toLowerCase();if(e==="bt"||e==="rl")$f(r);if(e==="lr"||e==="rl")Qf(r),Zt(r)}function Zt(r){_(r.nodes(),function(e){Ht(r.node(e))}),_(r.edges(),function(e){Ht(r.edge(e))})}function Ht(r){var e=r.width;r.width=r.height,r.height=e}function $f(r){_(r.nodes(),function(e){Mr(r.node(e))}),_(r.edges(),function(e){var n=r.edge(e);if(_(n.points,Mr),Object.prototype.hasOwnProperty.call(n,"y"))Mr(n)})}function Mr(r){r.y=-r.y}function Qf(r){_(r.nodes(),function(e){jr(r.node(e))}),_(r.edges(),function(e){var n=r.edge(e);if(_(n.points,jr),Object.prototype.hasOwnProperty.call(n,"x"))jr(n)})}function jr(r){var e=r.x;r.x=r.y,r.y=e}function $t(r){r.graph().dummyChains=[],_(r.edges(),function(e){es(r,e)})}function es(r,e){var n=e.v,o=r.node(n).rank,a=e.w,f=r.node(a).rank,s=e.name,u=r.edge(e),c=u.labelRank;if(f===o+1)return;r.removeEdge(e);var p=void 0,l,m;for(m=0,++o;o<f;++m,++o){if(u.points=[],p={width:0,height:0,edgeLabel:u,edgeObj:e,rank:o},l=k(r,"edge",p,"_d"),o===c)p.width=u.width,p.height=u.height,p.dummy="edge-label",p.labelpos=u.labelpos;if(r.setEdge(n,l,{weight:u.weight},s),m===0)r.graph().dummyChains.push(l);n=l}r.setEdge(n,a,{weight:u.weight},s)}function Qt(r){_(r.graph().dummyChains,function(e){var n=r.node(e),o=n.edgeLabel,a;r.setEdge(n.edgeObj,o);while(n.dummy){if(a=r.successors(e)[0],r.removeNode(e),o.points.push({x:n.x,y:n.y}),n.dummy==="edge-label")o.x=n.x,o.y=n.y,o.width=n.width,o.height=n.height;e=a,n=r.node(e)}})}function fr(r){var e={};function n(o){var a=r.node(o);if(Object.prototype.hasOwnProperty.call(e,o))return a.rank;e[o]=!0;var f=j(E(r.outEdges(o),function(s){return n(s.w)-r.edge(s).minlen}));if(f===Number.POSITIVE_INFINITY||f===void 0||f===null)f=0;return a.rank=f}_(r.sources(),n)}function U(r,e){return r.node(e.w).rank-r.node(e.v).rank-r.edge(e).minlen}function wr(r){var e=new _e({directed:!1}),n=r.nodes()[0],o=r.nodeCount();e.setNode(n,{});var a,f;while(ts(e,r)<o)a=ns(e,r),f=e.hasNode(a.v)?U(r,a):-U(r,a),os(e,r,f);return e}function ts(r,e){function n(o){_(e.nodeEdges(o),function(a){var f=a.v,s=o===f?a.w:f;if(!r.hasNode(s)&&!U(e,a))r.setNode(s,{}),r.setEdge(o,s,{}),n(s)})}return _(r.nodes(),n),r.nodeCount()}function ns(r,e){return H(e.edges(),function(n){if(r.hasNode(n.v)!==r.hasNode(n.w))return U(e,n)})}function os(r,e,n){_(r.nodes(),function(o){e.node(o).rank+=n})}var dh=nn(1);var vh=nn(1);Gr.CycleException=sr;function Gr(r){var e={},n={},o=[];function a(f){if(Object.prototype.hasOwnProperty.call(n,f))throw new sr;if(!Object.prototype.hasOwnProperty.call(e,f))n[f]=!0,e[f]=!0,_(r.predecessors(f),a),delete n[f],o.push(f)}if(_(r.sinks(),a),Tt(e)!==r.nodeCount())throw new sr;return o}function sr(){}sr.prototype=Error();function _r(r,e,n){if(!se(e))e=[e];var o=(r.isDirected()?r.successors:r.neighbors).bind(r),a=[],f={};return _(e,function(s){if(!r.hasNode(s))throw Error("Graph does not have node: "+s);en(r,s,n==="post",f,o,a)}),a}function en(r,e,n,o,a,f){if(!Object.prototype.hasOwnProperty.call(o,e)){if(o[e]=!0,!n)f.push(e);if(_(a(e),function(s){en(r,s,n,o,a,f)}),n)f.push(e)}}function Xr(r,e){return _r(r,e,"post")}function Ur(r,e){return _r(r,e,"pre")}G.initLowLimValues=Yr;G.initCutValues=Vr;G.calcCutValue=an;G.leaveEdge=un;G.enterEdge=dn;G.exchangeEdges=pn;function G(r){r=Dt(r),fr(r);var e=wr(r);Yr(e),Vr(e,r);var n,o;while(n=un(e))o=dn(e,r,n),pn(e,r,n,o)}function Vr(r,e){var n=Xr(r,r.nodes());n=n.slice(0,n.length-1),_(n,function(o){us(r,e,o)})}function us(r,e,n){var o=r.node(n),a=o.parent;r.edge(n,a).cutvalue=an(r,e,n)}function an(r,e,n){var o=r.node(n),a=o.parent,f=!0,s=e.edge(n,a),u=0;if(!s)f=!1,s=e.edge(a,n);return u=s.weight,_(e.nodeEdges(n),function(c){var p=c.v===n,l=p?c.w:c.v;if(l!==a){var m=p===f,h=e.edge(c).weight;if(u+=m?h:-h,cs(r,n,l)){var v=r.edge(n,l).cutvalue;u+=m?-v:v}}}),u}function Yr(r,e){if(arguments.length<2)e=r.nodes()[0];fn(r,{},1,e)}function fn(r,e,n,o,a){var f=n,s=r.node(o);if(e[o]=!0,_(r.neighbors(o),function(u){if(!Object.prototype.hasOwnProperty.call(e,u))n=fn(r,e,n,u,o)}),s.low=f,s.lim=n++,a)s.parent=a;else delete s.parent;return n}function un(r){return nr(r.edges(),function(e){return r.edge(e).cutvalue<0})}function dn(r,e,n){var{v:o,w:a}=n;if(!e.hasEdge(o,a))o=n.w,a=n.v;var f=r.node(o),s=r.node(a),u=f,c=!1;if(f.lim>s.lim)u=s,c=!0;var p=Vt(e.edges(),function(l){return c===on(r,r.node(l.v),u)&&c!==on(r,r.node(l.w),u)});return H(p,function(l){return U(e,l)})}function pn(r,e,n,o){var{v:a,w:f}=n;r.removeEdge(a,f),r.setEdge(o.v,o.w,{}),Yr(r),Vr(r,e),ds(r,e)}function ds(r,e){var n=nr(r.nodes(),function(a){return!e.node(a).parent}),o=Ur(r,n);o=o.slice(1),_(o,function(a){var f=r.node(a).parent,s=e.edge(a,f),u=!1;if(!s)s=e.edge(f,a),u=!0;e.node(a).rank=e.node(f).rank+(u?s.minlen:-s.minlen)})}function cs(r,e,n){return r.hasEdge(e,n)}function on(r,e,n){return n.low<=e.lim&&e.lim<=n.lim}function Wr(r){switch(r.graph().ranker){case"network-simplex":hn(r);break;case"tight-tree":ls(r);break;case"longest-path":ps(r);break;default:hn(r)}}var ps=fr;function ls(r){fr(r),wr(r)}function hn(r){G(r)}function gn(r){var e=k(r,"root",{},"_root"),n=ms(r),o=I(ln(n))-1,a=2*o+1;r.graph().nestingRoot=e,_(r.edges(),function(s){r.edge(s).minlen*=a});var f=hs(r)+1;_(r.children(),function(s){vn(r,e,a,f,o,n,s)}),r.graph().nodeRankFactor=a}function vn(r,e,n,o,a,f,s){var u=r.children(s);if(!u.length){if(s!==e)r.setEdge(e,s,{weight:0,minlen:n});return}var c=Cr(r,"_bt"),p=Cr(r,"_bb"),l=r.node(s);if(r.setParent(c,s),l.borderTop=c,r.setParent(p,s),l.borderBottom=p,_(u,function(m){vn(r,e,n,o,a,f,m);var h=r.node(m),v=h.borderTop?h.borderTop:m,y=h.borderBottom?h.borderBottom:m,b=h.borderTop?o:2*o,g=v!==y?1:a-f[s]+1;r.setEdge(c,v,{weight:b,minlen:g,nestingEdge:!0}),r.setEdge(y,p,{weight:b,minlen:g,nestingEdge:!0})}),!r.parent(s))r.setEdge(e,c,{weight:0,minlen:a+f[s]})}function ms(r){var e={};function n(o,a){var f=r.children(o);if(f&&f.length)_(f,function(s){n(s,a+1)});e[o]=a}return _(r.children(),function(o){n(o,1)}),e}function hs(r){return tr(r.edges(),function(e,n){return e+r.edge(n).weight},0)}function bn(r){var e=r.graph();r.removeNode(e.nestingRoot),delete e.nestingRoot,_(r.edges(),function(n){var o=r.edge(n);if(o.nestingEdge)r.removeEdge(n)})}function yn(r,e,n){var o={},a;_(n,function(f){var s=r.parent(f),u,c;while(s){if(u=r.parent(s),u)c=o[u],o[u]=s;else c=a,a=s;if(c&&c!==s){e.setEdge(c,s);return}s=u}})}function En(r,e,n){var o=vs(r),a=new _e({compound:!0}).setGraph({root:o}).setDefaultNodeLabel(function(f){return r.node(f)});return _(r.nodes(),function(f){var s=r.node(f),u=r.parent(f);if(s.rank===e||s.minRank<=e&&e<=s.maxRank){if(a.setNode(f),a.setParent(f,u||o),_(r[n](f),function(c){var p=c.v===f?c.w:c.v,l=a.edge(p,f),m=!Ye(l)?l.weight:0;a.setEdge(p,f,{weight:r.edge(c).weight+m})}),Object.prototype.hasOwnProperty.call(s,"minRank"))a.setNode(f,{borderLeft:s.borderLeft[e],borderRight:s.borderRight[e]})}}),a}function vs(r){var e;while(r.hasNode(e=J("_root")));return e}function On(r,e){var n=0;for(var o=1;o<e.length;++o)n+=bs(r,e[o-1],e[o]);return n}function bs(r,e,n){var o=Sr(n,E(n,function(p,l){return l})),a=S(E(e,function(p){return C(E(r.outEdges(p),function(l){return{pos:o[l.w],weight:r.edge(l).weight}}),"pos")})),f=1;while(f<n.length)f<<=1;var s=2*f-1;f-=1;var u=E(Array(s),function(){return 0}),c=0;return _(a.forEach(function(p){var l=p.pos+f;u[l]+=p.weight;var m=0;while(l>0){if(l%2)m+=u[l+1];l=l-1>>1,u[l]+=p.weight}c+=p.weight*m})),c}function Ln(r){var e={},n=Vt(r.nodes(),function(u){return!r.children(u).length}),o=I(E(n,function(u){return r.node(u).rank})),a=E(N(o+1),function(){return[]});function f(u){if(vr(e,u))return;e[u]=!0;var c=r.node(u);a[c.rank].push(u),_(r.successors(u),f)}var s=C(n,function(u){return r.node(u).rank});return _(s,f),a}function In(r,e){return E(e,function(n){var o=r.inEdges(n);if(!o.length)return{v:n};else{var a=tr(o,function(f,s){var u=r.edge(s),c=r.node(s.v);return{sum:f.sum+u.weight*c.order,weight:f.weight+u.weight}},{sum:0,weight:0});return{v:n,barycenter:a.sum/a.weight,weight:a.weight}}})}function Nn(r,e){var n={};_(r,function(a,f){var s=n[a.v]={indegree:0,in:[],out:[],vs:[a.v],i:f};if(!Ye(a.barycenter))s.barycenter=a.barycenter,s.weight=a.weight}),_(e.edges(),function(a){var f=n[a.v],s=n[a.w];if(!Ye(f)&&!Ye(s))s.indegree++,f.out.push(n[a.w])});var o=Vt(n,function(a){return!a.indegree});return ys(o)}function ys(r){var e=[];function n(f){return function(s){if(s.merged)return;if(Ye(s.barycenter)||Ye(f.barycenter)||s.barycenter>=f.barycenter)ws(f,s)}}function o(f){return function(s){if(s.in.push(f),--s.indegree===0)r.push(s)}}while(r.length){var a=r.pop();e.push(a),_(a.in.reverse(),n(a)),_(a.out,o(a))}return E(Vt(e,function(f){return!f.merged}),function(f){return K(f,["vs","i","barycenter","weight"])})}function ws(r,e){var n=0,o=0;if(r.weight)n+=r.barycenter*r.weight,o+=r.weight;if(e.weight)n+=e.barycenter*e.weight,o+=e.weight;r.vs=e.vs.concat(r.vs),r.barycenter=n/o,r.weight=o,r.i=Math.min(e.i,r.i),e.merged=!0}function kn(r,e){var n=Xt(r,function(l){return Object.prototype.hasOwnProperty.call(l,"barycenter")}),o=n.lhs,a=C(n.rhs,function(l){return-l.i}),f=[],s=0,u=0,c=0;o.sort(_s(!!e)),c=Pn(f,a,c),_(o,function(l){c+=l.vs.length,f.push(l.vs),s+=l.barycenter*l.weight,u+=l.weight,c=Pn(f,a,c)});var p={vs:S(f)};if(u)p.barycenter=s/u,p.weight=u;return p}function Pn(r,e,n){var o;while(e.length&&(o=X(e)).i<=n)e.pop(),r.push(o.vs),n++;return n}function _s(r){return function(e,n){if(e.barycenter<n.barycenter)return-1;else if(e.barycenter>n.barycenter)return 1;return!r?e.i-n.i:n.i-e.i}}function qr(r,e,n,o){var a=r.children(e),f=r.node(e),s=f?f.borderLeft:void 0,u=f?f.borderRight:void 0,c={};if(s)a=Vt(a,function(y){return y!==s&&y!==u});var p=In(r,a);_(p,function(y){if(r.children(y.v).length){var b=qr(r,y.v,n,o);if(c[y.v]=b,Object.prototype.hasOwnProperty.call(b,"barycenter"))xs(y,b)}});var l=Nn(p,n);Es(l,c);var m=kn(l,o);if(s){if(m.vs=S([s,m.vs,u]),r.predecessors(s).length){var h=r.node(r.predecessors(s)[0]),v=r.node(r.predecessors(u)[0]);if(!Object.prototype.hasOwnProperty.call(m,"barycenter"))m.barycenter=0,m.weight=0;m.barycenter=(m.barycenter*m.weight+h.order+v.order)/(m.weight+2),m.weight+=2}}return m}function Es(r,e){_(r,function(n){n.vs=S(n.vs.map(function(o){if(e[o])return e[o].vs;return o}))})}function xs(r,e){if(!Ye(r.barycenter))r.barycenter=(r.barycenter*r.weight+e.barycenter*e.weight)/(r.weight+e.weight),r.weight+=e.weight;else r.barycenter=e.barycenter,r.weight=e.weight}function Rn(r){var e=Ar(r),n=Tn(r,N(1,e+1),"inEdges"),o=Tn(r,N(e-1,-1,-1),"outEdges"),a=Ln(r);An(r,a);var f=Number.POSITIVE_INFINITY,s;for(var u=0,c=0;c<4;++u,++c){Os(u%2?n:o,u%4>=2),a=D(r);var p=On(r,a);if(p<f)c=0,s=He(a),f=p}An(r,s)}function Tn(r,e,n){return E(e,function(o){return En(r,o,n)})}function Os(r,e){var n=new _e;_(r,function(o){var a=o.graph().root,f=qr(o,a,n,e);_(f.vs,function(s,u){o.node(s).order=u}),yn(o,n,f.vs)})}function An(r,e){_(e,function(n){_(n,function(o,a){r.node(o).order=a})})}function Mn(r){var e=Is(r);_(r.graph().dummyChains,function(n){var o=r.node(n),a=o.edgeObj,f=Ls(r,e,a.v,a.w),{path:s,lca:u}=f,c=0,p=s[c],l=!0;while(n!==a.w){if(o=r.node(n),l){while((p=s[c])!==u&&r.node(p).maxRank<o.rank)c++;if(p===u)l=!1}if(!l){while(c<s.length-1&&r.node(p=s[c+1]).minRank<=o.rank)c++;p=s[c]}r.setParent(n,p),n=r.successors(n)[0]}})}function Ls(r,e,n,o){var a=[],f=[],s=Math.min(e[n].low,e[o].low),u=Math.max(e[n].lim,e[o].lim),c,p;c=n;do c=r.parent(c),a.push(c);while(c&&(e[c].low>s||u>e[c].lim));p=c,c=o;while((c=r.parent(c))!==p)f.push(c);return{path:a.concat(f.reverse()),lca:p}}function Is(r){var e={},n=0;function o(a){var f=n;_(r.children(a),o),e[a]={low:f,lim:n++}}return _(r.children(),o),e}function Ss(r,e){var n={};function o(a,f){var s=0,u=0,c=a.length,p=X(f);return _(f,function(l,m){var h=Ps(r,l),v=h?r.node(h).order:c;if(h||l===p)_(f.slice(u,m+1),function(y){_(r.predecessors(y),function(b){var g=r.node(b),w=g.order;if((w<s||v<w)&&!(g.dummy&&r.node(y).dummy))jn(n,b,y)})}),u=m+1,s=v}),f}return tr(e,o),n}function Ns(r,e){var n={};function o(f,s,u,c,p){var l;_(N(s,u),function(m){if(l=f[m],r.node(l).dummy)_(r.predecessors(l),function(h){var v=r.node(h);if(v.dummy&&(v.order<c||v.order>p))jn(n,h,l)})})}function a(f,s){var u=-1,c,p=0;return _(s,function(l,m){if(r.node(l).dummy==="border"){var h=r.predecessors(l);if(h.length)c=r.node(h[0]).order,o(s,p,m,u,c),p=m,u=c}o(s,p,s.length,c,f.length)}),s}return tr(e,a),n}function Ps(r,e){if(r.node(e).dummy)return nr(r.predecessors(e),function(n){return r.node(n).dummy})}function jn(r,e,n){if(e>n){var o=e;e=n,n=o}if(!Object.prototype.hasOwnProperty.call(r,e))Object.defineProperty(r,e,{enumerable:!0,configurable:!0,value:{},writable:!0});var a=r[e];Object.defineProperty(a,n,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function ks(r,e,n){if(e>n){var o=e;e=n,n=o}return!!r[e]&&Object.prototype.hasOwnProperty.call(r[e],n)}function Ts(r,e,n,o){var a={},f={},s={};return _(e,function(u){_(u,function(c,p){a[c]=c,f[c]=c,s[c]=p})}),_(e,function(u){var c=-1;_(u,function(p){var l=o(p);if(l.length){l=C(l,function(b){return s[b]});var m=(l.length-1)/2;for(var h=Math.floor(m),v=Math.ceil(m);h<=v;++h){var y=l[h];if(f[p]===p&&c<s[y]&&!ks(n,p,y))f[y]=p,f[p]=a[p]=a[y],c=s[y]}}})}),{root:a,align:f}}function Cs(r,e,n,o,a){var f={},s=As(r,e,n,a),u=a?"borderLeft":"borderRight";function c(m,h){var v=s.nodes(),y=v.pop(),b={};while(y){if(b[y])m(y);else b[y]=!0,v.push(y),v=v.concat(h(y));y=v.pop()}}function p(m){f[m]=s.inEdges(m).reduce(function(h,v){return Math.max(h,f[v.v]+s.edge(v))},0)}function l(m){var h=s.outEdges(m).reduce(function(y,b){return Math.min(y,f[b.w]-s.edge(b))},Number.POSITIVE_INFINITY),v=r.node(m);if(h!==Number.POSITIVE_INFINITY&&v.borderType!==u)f[m]=Math.max(f[m],h)}return c(p,s.predecessors.bind(s)),c(l,s.successors.bind(s)),_(o,function(m){f[m]=f[n[m]]}),f}function As(r,e,n,o){var a=new _e,f=r.graph(),s=Bs(f.nodesep,f.edgesep,o);return _(e,function(u){var c;_(u,function(p){var l=n[p];if(a.setNode(l),c){var m=n[c],h=a.edge(m,l);a.setEdge(m,l,Math.max(s(r,p,c),h||0))}c=p})}),a}function Rs(r,e){return H(ln(e),function(n){var{NEGATIVE_INFINITY:o,POSITIVE_INFINITY:a}=Number;return ot(n,function(f,s){var u=Ds(r,s)/2;o=Math.max(f+u,o),a=Math.min(f-u,a)}),o-a})}function Ms(r,e){var n=ln(e),o=j(n),a=I(n);_(["u","d"],function(f){_(["l","r"],function(s){var u=f+s,c=r[u],p;if(c===e)return;var l=ln(c);if(p=s==="l"?o-j(l):a-I(l),p)r[u]=W(c,function(m){return m+p})})})}function js(r,e){return W(r.ul,function(n,o){if(e)return r[e.toLowerCase()][o];else{var a=C(E(r,o));return(a[1]+a[2])/2}})}function Dn(r){var e=D(r),n=ar(Ss(r,e),Ns(r,e)),o={},a;_(["u","d"],function(s){a=s==="u"?e:ln(e).reverse(),_(["l","r"],function(u){if(u==="r")a=E(a,function(m){return ln(m).reverse()});var c=(s==="u"?r.predecessors:r.successors).bind(r),p=Ts(r,a,n,c),l=Cs(r,a,p.root,p.align,u==="r");if(u==="r")l=W(l,function(m){return-m});o[s+u]=l})});var f=Rs(r,o);return Ms(o,f),js(o,r.graph().align)}function Bs(r,e,n){return function(o,a,f){var s=o.node(a),u=o.node(f),c=0,p;if(c+=s.width/2,Object.prototype.hasOwnProperty.call(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":p=-s.width/2;break;case"r":p=s.width/2;break}if(p)c+=n?p:-p;if(p=0,c+=(s.dummy?e:r)/2,c+=(u.dummy?e:r)/2,c+=u.width/2,Object.prototype.hasOwnProperty.call(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":p=u.width/2;break;case"r":p=-u.width/2;break}if(p)c+=n?p:-p;return p=0,c}}function Ds(r,e){return r.node(e).width}function Fn(r){r=yr(r),Fs(r),it(Dn(r),function(e,n){r.node(n).x=e})}function Fs(r){var e=D(r),n=r.graph().ranksep,o=0;_(e,function(a){var f=I(E(a,function(s){return r.node(s).height}));_(a,function(s){r.node(s).y=o+f/2}),o+=f+n})}function Jr(r,e){var n=e&&e.debugTiming?Ut:Yt;n("layout",()=>{var o=n(" buildLayoutGraph",()=>Js(r));n(" runLayout",()=>Gs(o,n)),n(" updateInputGraph",()=>Xs(r,o))})}function Gs(r,e){e(" makeSpaceForEdgeLabels",()=>Zs(r)),e(" removeSelfEdges",()=>au(r)),e(" acyclic",()=>Mt(r)),e(" nestingGraph.run",()=>gn(r)),e(" rank",()=>Wr(yr(r))),e(" injectEdgeLabelProxies",()=>$s(r)),e(" removeEmptyRanks",()=>Gt(r)),e(" nestingGraph.cleanup",()=>bn(r)),e(" normalizeRanks",()=>Ft(r)),e(" assignRankMinMax",()=>Qs(r)),e(" removeEdgeLabelProxies",()=>ru(r)),e(" normalize.run",()=>$t(r)),e(" parentDummyChains",()=>Mn(r)),e(" addBorderSegments",()=>Wt(r)),e(" order",()=>Rn(r)),e(" insertSelfEdges",()=>fu(r)),e(" adjustCoordinateSystem",()=>Kt(r)),e(" position",()=>Fn(r)),e(" positionSelfEdges",()=>su(r)),e(" removeBorderNodes",()=>iu(r)),e(" normalize.undo",()=>Qt(r)),e(" fixupEdgeLabelCoords",()=>nu(r)),e(" undoCoordinateSystem",()=>Jt(r)),e(" translateGraph",()=>eu(r)),e(" assignNodeIntersects",()=>tu(r)),e(" reversePoints",()=>ou(r)),e(" acyclic.undo",()=>jt(r))}function Xs(r,e){_(r.nodes(),function(n){var o=r.node(n),a=e.node(n);if(o){if(o.x=a.x,o.y=a.y,e.children(n).length)o.width=a.width,o.height=a.height}}),_(r.edges(),function(n){var o=r.edge(n),a=e.edge(n);if(o.points=a.points,Object.prototype.hasOwnProperty.call(a,"x"))o.x=a.x,o.y=a.y}),r.graph().width=e.graph().width,r.graph().height=e.graph().height}var Us=["nodesep","edgesep","ranksep","marginx","marginy"],Vs={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},Ys=["acyclicer","ranker","rankdir","align"],zs=["width","height"],Ws={width:0,height:0},qs=["minlen","weight","width","height","labeloffset"],Hs={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Ks=["labelpos"];function Js(r){var e=new _e({multigraph:!0,compound:!0}),n=Kr(r.graph());return e.setGraph(ar({},Vs,Hr(n,Us),K(n,Ys))),_(r.nodes(),function(o){var a=Kr(r.node(o));e.setNode(o,Je(Hr(a,zs),Ws)),e.setParent(o,r.parent(o))}),_(r.edges(),function(o){var a=Kr(r.edge(o));e.setEdge(o,ar({},Hs,Hr(a,qs),K(a,Ks)))}),e}function Zs(r){var e=r.graph();e.ranksep/=2,_(r.edges(),function(n){var o=r.edge(n);if(o.minlen*=2,o.labelpos.toLowerCase()!=="c")if(e.rankdir==="TB"||e.rankdir==="BT")o.width+=o.labeloffset;else o.height+=o.labeloffset})}function $s(r){_(r.edges(),function(e){var n=r.edge(e);if(n.width&&n.height){var o=r.node(e.v),a=r.node(e.w),f={rank:(a.rank-o.rank)/2+o.rank,e};k(r,"edge-proxy",f,"_ep")}})}function Qs(r){var e=0;_(r.nodes(),function(n){var o=r.node(n);if(o.borderTop)o.minRank=r.node(o.borderTop).rank,o.maxRank=r.node(o.borderBottom).rank,e=I(e,o.maxRank)}),r.graph().maxRank=e}function ru(r){_(r.nodes(),function(e){var n=r.node(e);if(n.dummy==="edge-proxy")r.edge(n.e).labelRank=n.rank,r.removeNode(e)})}function eu(r){var e=Number.POSITIVE_INFINITY,n=0,o=Number.POSITIVE_INFINITY,a=0,f=r.graph(),s=f.marginx||0,u=f.marginy||0;function c(p){var{x:l,y:m,width:h,height:v}=p;e=Math.min(e,l-h/2),n=Math.max(n,l+h/2),o=Math.min(o,m-v/2),a=Math.max(a,m+v/2)}_(r.nodes(),function(p){c(r.node(p))}),_(r.edges(),function(p){var l=r.edge(p);if(Object.prototype.hasOwnProperty.call(l,"x"))c(l)}),e-=s,o-=u,_(r.nodes(),function(p){var l=r.node(p);l.x-=e,l.y-=o}),_(r.edges(),function(p){var l=r.edge(p);if(_(l.points,function(m){m.x-=e,m.y-=o}),Object.prototype.hasOwnProperty.call(l,"x"))l.x-=e;if(Object.prototype.hasOwnProperty.call(l,"y"))l.y-=o}),f.width=n-e+s,f.height=a-o+u}function tu(r){_(r.edges(),function(e){var n=r.edge(e),o=r.node(e.v),a=r.node(e.w),f,s;if(!n.points)n.points=[],f=a,s=o;else f=n.points[0],s=n.points[n.points.length-1];n.points.unshift(Tr(o,f)),n.points.push(Tr(a,s))})}function nu(r){_(r.edges(),function(e){var n=r.edge(e);if(Object.prototype.hasOwnProperty.call(n,"x")){if(n.labelpos==="l"||n.labelpos==="r")n.width-=n.labeloffset;switch(n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset;break}}})}function ou(r){_(r.edges(),function(e){var n=r.edge(e);if(n.reversed)n.points.reverse()})}function iu(r){_(r.nodes(),function(e){if(r.children(e).length){var n=r.node(e),o=r.node(n.borderTop),a=r.node(n.borderBottom),f=r.node(X(n.borderLeft)),s=r.node(X(n.borderRight));n.width=Math.abs(s.x-f.x),n.height=Math.abs(a.y-o.y),n.x=f.x+n.width/2,n.y=o.y+n.height/2}}),_(r.nodes(),function(e){if(r.node(e).dummy==="border")r.removeNode(e)})}function au(r){_(r.edges(),function(e){if(e.v===e.w){var n=r.node(e.v);if(!n.selfEdges)n.selfEdges=[];n.selfEdges.push({e,label:r.edge(e)}),r.removeEdge(e)}})}function fu(r){var e=D(r);_(e,function(n){var o=0;_(n,function(a,f){var s=r.node(a);s.order=f+o,_(s.selfEdges,function(u){k(r,"selfedge",{width:u.label.width,height:u.label.height,rank:s.rank,order:f+ ++o,e:u.e,label:u.label},"_se")}),delete s.selfEdges})})}function su(r){_(r.nodes(),function(e){var n=r.node(e);if(n.dummy==="selfedge"){var o=r.node(n.e.v),a=o.x+o.width/2,f=o.y,s=n.x-a,u=o.height/2;r.setEdge(n.e,n.label),r.removeNode(e),n.label.points=[{x:a+2*s/3,y:f-u},{x:a+5*s/6,y:f-u},{x:a+s,y:f},{x:a+5*s/6,y:f+u},{x:a+2*s/3,y:f+u}],n.label.x=n.x,n.label.y=n.y}})}function Hr(r,e){return W(K(r,e),Number)}function Kr(r){var e={};return _(r,function(n,o){e[o.toLowerCase()]=n}),e}var Gn=t((r,e,n)=>Math.max(e,Math.min(n,r)),"clamp"),Xn=t((r="TB")=>{switch(r){case"BT":return"bottom";case"LR":return"right";case"RL":return"left";case"TB":default:return"top"}},"getDefaultSelfLoopSide"),uu=t((r)=>r==="flowchart"||r==="flowchart-v2"||r==="stateDiagram"||r==="er"||r==="classDiagram","shouldMergeSelfLoopSegments"),du=["x","y","width","height","labelBBox","intersect","calcIntersect","diff","clusterNode"],cu=t((r,e,n,o,a)=>{let f=[],s=new Set;if(n.forEach(({start:l,end:m})=>{if(l!==o)s.add(l);if(m!==o)s.add(m)}),s.forEach((l)=>{let m=r.node(l);if(typeof m?.x==="number"&&typeof m?.y==="number")f.push(m)}),f.length===0)n.forEach(({edge:l})=>{(l.points??[]).forEach((m)=>{if(typeof m?.x==="number"&&typeof m?.y==="number")f.push(m)})});if(f.length===0)return Xn(a);let u=f.reduce((l,m)=>({x:l.x+m.x/f.length,y:l.y+m.y/f.length}),{x:0,y:0}),c=u.x-e.x,p=u.y-e.y;if(Math.abs(c)>Math.abs(p))return c>0?"right":"left";if(Math.abs(p)>0)return p>0?"bottom":"top";return Xn(a)},"getSelfLoopSide"),pu=t((r,e="top",n=0,o=0)=>{let a=r.x,f=r.y-n,s=r.width/2,u=r.height/2,c=Math.max(36,Math.min(100,r.width*0.8)),p=Gn(Math.max(o,r.width*0.35),36,c),l=Gn(Math.min(r.width,r.height)*0.45,24,48);switch(e){case"bottom":{let m=f+u;return[{x:a-p/2,y:m},{x:a-p/2,y:m+l},{x:a+p/2,y:m+l},{x:a+p/2,y:m}]}case"right":{let m=a+s;return[{x:m,y:f-p/2},{x:m+l,y:f-p/2},{x:m+l,y:f+p/2},{x:m,y:f+p/2}]}case"left":{let m=a-s;return[{x:m,y:f-p/2},{x:m-l,y:f-p/2},{x:m-l,y:f+p/2},{x:m,y:f+p/2}]}case"top":default:{let m=f-u;return[{x:a-p/2,y:m},{x:a-p/2,y:m-l},{x:a+p/2,y:m-l},{x:a+p/2,y:m}]}}},"getSelfLoopPoints"),lu=t((r,e,n="top",o=0,a={})=>{let s=r.x,u=r.y-o,c=a.width??0,p=a.height??0;switch(n){case"bottom":return{x:s,y:Math.max(...e.map((l)=>l.y))+p/2+4};case"right":return{x:Math.max(...e.map((l)=>l.x))+c/2+4,y:u};case"left":return{x:Math.min(...e.map((l)=>l.x))-c/2-4,y:u};case"top":default:return{x:s,y:Math.min(...e.map((l)=>l.y))-p/2-4}}},"getSelfLoopLabelPosition"),vc=t((r,e=0,{mergeSelfLoops:n=!0}={})=>{let o=new Map,a=[],f=r.graph()?.rankdir;return r.edges().forEach((s)=>{let u=r.edge(s);if(n&&u.selfLoop){let c=u.selfLoop.id;if(!o.has(c))o.set(c,[]);o.get(c).push({edge:u,start:s.v,end:s.w})}else a.push({edge:u,start:s.v,end:s.w})}),o.forEach((s)=>{if(s.length!==3){s.forEach((w)=>a.push(w));return}s.sort((w,A)=>w.edge.selfLoop.order-A.edge.selfLoop.order);let[u,c,p]=s,l=u.edge.originalEdge??c.edge.originalEdge??p.edge.originalEdge??c.edge,m=r.node(l.start);if(!m){s.forEach((w)=>a.push(w));return}let h={width:c.edge.width,height:c.edge.height},v=cu(r,m,s,l.start,f),y=pu(m,v,e,h.width??0),b=lu(m,y,v,e,h),g={...c.edge,...l,id:l.id,points:y,start:l.start,end:l.end,x:b.x,y:b.y,width:h.width,height:h.height,labelStyle:c.edge.labelStyle,fromCluster:u.edge.fromCluster??c.edge.fromCluster??p.edge.fromCluster,toCluster:u.edge.toCluster??c.edge.toCluster??p.edge.toCluster};delete g.selfLoop,delete g.originalEdge,a.push({edge:g,start:g.start,end:g.end})}),a},"getEdgesToRender"),Vn=t(async({element:r,graph:e,diagramType:n,id:o,parentCluster:a,siteConfig:f})=>{let s=e.graph().rankdir;i.trace("Dir in recursive render - dir:",s);let{clusters:u,edgePaths:c,edgeLabels:p,nodes:l,rootGroups:m}=oo(r,{edgePathsClass:"edgePaths"});if(!e.nodes())i.info("No nodes found for",e);else i.info("Recursive render XXX",e.nodes());if(e.edges().length>0)i.info("Recursive edges",e.edge(e.edges()[0]));let h=uu(n);await Promise.all(e.nodes().map(async function(b){let g=e.node(b);if(a!==void 0){let w=JSON.parse(JSON.stringify(a.clusterData));if(i.trace(`Setting data for parent cluster XXX
|
|
1
|
+
import{t,i,d,B,wn,Ic,mn,ir,Cn,fa,or}from"./chunk-h4bzgvbg.js";import{Ge,bt,qt,et,sn,Kn,se,Oe,tn,Zn,nn,Ba,lo,po,uo,Rr,xn,mo,Ir,xt,Dr,Bn,_n,Or,Qn,$r,fo,ho,Fa,We,go,Br,Jn,Fr,za,Ha,er,vo,Ua,yo,Mi,cn,ja,bo,xo,_o,It,qa,Va,zr,wo,Ga,_,Vt,ln,Ye,tr,_e}from"./chunk-fyr6rm2p.js";import{oo,so,ne,aa,xc,co,$a}from"./chunk-cm4fjb6j.js";import{Sn}from"./chunk-56a6zytc.js";var cr={};Sn(cr,{default:()=>Z});var zn=/\s/;function Wn(r){var e=r.length;while(e--&&zn.test(r.charAt(e)));return e}var re=Wn;var qn=/^\s+/;function Hn(r){return r?r.slice(0,re(r)+1).replace(qn,""):r}var ee=Hn;var te=NaN,$n=/^[-+]0x[0-9a-f]+$/i,ro=/^0b[01]+$/i,eo=/^0o[0-7]+$/i,to=parseInt;function no(r){if(typeof r=="number")return r;if(sn(r))return te;if(Oe(r)){var e=typeof r.valueOf=="function"?r.valueOf():r;r=Oe(e)?e+"":e}if(typeof r!="string")return r===0?r:+r;r=ee(r);var n=ro.test(r);return n||eo.test(r)?to(r.slice(2),n?2:8):$n.test(r)?te:+r}var oe=no;var ie=1/0,io=179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;function ao(r){if(!r)return r===0?r:0;if(r=oe(r),r===ie||r===-ie){var e=r<0?-1:1;return e*io}return r===r?r:0}var V=ao;function Eo(r){var e=V(r),n=e%1;return e===e?n?e-n:e:0}var ae=Eo;var fe=Object.create,Oo=function(){function r(){}return function(e){if(!Oe(e))return{};if(fe)return fe(e);r.prototype=e;var n=new r;return r.prototype=void 0,n}}(),ue=Oo;function Lo(r,e){var n=-1,o=r.length;e||(e=Array(o));while(++n<o)e[n]=r[n];return e}var ur=Lo;function Io(r,e,n){if(e=="__proto__"&&Ba)Ba(r,e,{configurable:!0,enumerable:!0,value:n,writable:!0});else r[e]=n}var R=Io;var So=Object.prototype,No=So.hasOwnProperty;function Po(r,e,n){var o=r[e];if(!(No.call(r,e)&&xn(o,n))||n===void 0&&!(e in r))R(r,e,n)}var M=Po;function ko(r,e,n,o){var a=!n;n||(n={});var f=-1,s=e.length;while(++f<s){var u=e[f],c=o?o(n[u],r[u],u,n,r):void 0;if(c===void 0)c=r[u];if(a)R(n,u,c);else M(n,u,c)}return n}var P=ko;function To(r,e,n){if(!Oe(n))return!1;var o=typeof e;if(o=="number"?xt(n)&&Rr(e,n.length):o=="string"&&(e in n))return xn(n[e],r);return!1}var T=To;function Co(r){return Ir(function(e,n){var o=-1,a=n.length,f=a>1?n[a-1]:void 0,s=a>2?n[2]:void 0;if(f=r.length>3&&typeof f=="function"?(a--,f):void 0,s&&T(n[0],n[1],s))f=a<3?void 0:f,a=1;e=Object(e);while(++o<a){var u=n[o];if(u)r(e,u,o,f)}return e})}var de=Co;function Ao(r){var e=[];if(r!=null)for(var n in Object(r))e.push(n);return e}var ce=Ao;var Ro=Object.prototype,Mo=Ro.hasOwnProperty;function jo(r){if(!Oe(r))return ce(r);var e=Dr(r),n=[];for(var o in r)if(!(o=="constructor"&&(e||!Mo.call(r,o))))n.push(o);return n}var pe=jo;function Bo(r){return xt(r)?fo(r,!0):pe(r)}var L=Bo;function Do(r){var e=r==null?0:r.length;return e?Ha(r,1):[]}var S=Do;function Fo(r){return lo(mo(r,void 0,S),r+"")}var le=Fo;var Go=ho(Object.getPrototypeOf,Object),Y=Go;var Xo="[object Object]",Uo=Function.prototype,Vo=Object.prototype,me=Uo.toString,Yo=Vo.hasOwnProperty,zo=me.call(Object);function Wo(r){if(!et(r)||qt(r)!=Xo)return!1;var e=Y(r);if(e===null)return!0;var n=Yo.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&me.call(n)==zo}var he=Wo;var qo="\\ud800-\\udfff",Ho="\\u0300-\\u036f",Ko="\\ufe20-\\ufe2f",Jo="\\u20d0-\\u20ff",Zo=Ho+Ko+Jo,$o="\\ufe0e\\ufe0f",Qo="\\u200d",ri=RegExp("["+Qo+qo+Zo+$o+"]");function ei(r){return ri.test(r)}var ge=ei;function ti(r,e){return r&&P(e,We(e),r)}var ve=ti;function ni(r,e){return r&&P(e,L(e),r)}var be=ni;var xe=typeof cr=="object"&&cr&&!cr.nodeType&&cr,ye=xe&&typeof dr=="object"&&dr&&!dr.nodeType&&dr,oi=ye&&ye.exports===xe,we=oi?Ge.Buffer:void 0,Ee=we?we.allocUnsafe:void 0;function ii(r,e){if(e)return r.slice();var n=r.length,o=Ee?Ee(n):new r.constructor(n);return r.copy(o),o}var Z=ii;function ai(r,e){return P(r,Ua(r),e)}var Le=ai;var fi=Object.getOwnPropertySymbols,si=!fi?vo:function(r){var e=[];while(r)za(e,Ua(r)),r=Y(r);return e},pr=si;function ui(r,e){return P(r,pr(r),e)}var Ie=ui;function di(r){return yo(r,L,pr)}var Se=di;var ci=Object.prototype,pi=ci.hasOwnProperty;function li(r){var e=r.length,n=new r.constructor(e);if(e&&typeof r[0]=="string"&&pi.call(r,"index"))n.index=r.index,n.input=r.input;return n}var Ne=li;function mi(r){var e=new r.constructor(r.byteLength);return new ja(e).set(new ja(r)),e}var z=mi;function hi(r,e){var n=e?z(r.buffer):r.buffer;return new r.constructor(n,r.byteOffset,r.byteLength)}var Pe=hi;var gi=/\w*$/;function vi(r){var e=new r.constructor(r.source,gi.exec(r));return e.lastIndex=r.lastIndex,e}var ke=vi;var Te=bt?bt.prototype:void 0,Ce=Te?Te.valueOf:void 0;function bi(r){return Ce?Object(Ce.call(r)):{}}var Ae=bi;function yi(r,e){var n=e?z(r.buffer):r.buffer;return new r.constructor(n,r.byteOffset,r.length)}var lr=yi;var wi="[object Boolean]",_i="[object Date]",Ei="[object Map]",xi="[object Number]",Oi="[object RegExp]",Li="[object Set]",Ii="[object String]",Si="[object Symbol]",Ni="[object ArrayBuffer]",Pi="[object DataView]",ki="[object Float32Array]",Ti="[object Float64Array]",Ci="[object Int8Array]",Ai="[object Int16Array]",Ri="[object Int32Array]",ji="[object Uint8Array]",Bi="[object Uint8ClampedArray]",Di="[object Uint16Array]",Fi="[object Uint32Array]";function Gi(r,e,n){var o=r.constructor;switch(e){case Ni:return z(r);case wi:case _i:return new o(+r);case Pi:return Pe(r,n);case ki:case Ti:case Ci:case Ai:case Ri:case ji:case Bi:case Di:case Fi:return lr(r,n);case Ei:return new o;case xi:case Ii:return new o(r);case Oi:return ke(r);case Li:return new o;case Si:return Ae(r)}}var Re=Gi;function Xi(r){return typeof r.constructor=="function"&&!Dr(r)?ue(Y(r)):{}}var mr=Xi;var Ui="[object Map]";function Vi(r){return et(r)&&cn(r)==Ui}var Me=Vi;var je=Qn&&Qn.isMap,Yi=je?Or(je):Me,Be=Yi;var zi="[object Set]";function Wi(r){return et(r)&&cn(r)==zi}var De=Wi;var Fe=Qn&&Qn.isSet,qi=Fe?Or(Fe):De,Xe=qi;var Hi=1,Ki=2,Ji=4,Ue="[object Arguments]",Zi="[object Array]",$i="[object Boolean]",Qi="[object Date]",ra="[object Error]",Ve="[object Function]",ea="[object GeneratorFunction]",ta="[object Map]",na="[object Number]",ze="[object Object]",oa="[object RegExp]",ia="[object Set]",sa="[object String]",ua="[object Symbol]",da="[object WeakMap]",ca="[object ArrayBuffer]",pa="[object DataView]",la="[object Float32Array]",ma="[object Float64Array]",ha="[object Int8Array]",ga="[object Int16Array]",va="[object Int32Array]",ba="[object Uint8Array]",ya="[object Uint8ClampedArray]",wa="[object Uint16Array]",_a="[object Uint32Array]",x={};x[Ue]=x[Zi]=x[ca]=x[pa]=x[$i]=x[Qi]=x[la]=x[ma]=x[ha]=x[ga]=x[va]=x[ta]=x[na]=x[ze]=x[oa]=x[ia]=x[sa]=x[ua]=x[ba]=x[ya]=x[wa]=x[_a]=!0;x[ra]=x[Ve]=x[da]=!1;function hr(r,e,n,o,a,f){var s,u=e&Hi,c=e&Ki,p=e&Ji;if(n)s=a?n(r,o,a,f):n(r);if(s!==void 0)return s;if(!Oe(r))return r;var l=se(r);if(l){if(s=Ne(r),!u)return ur(r,s)}else{var m=cn(r),h=m==Ve||m==ea;if(_n(r))return Z(r,u);if(m==ze||m==Ue||h&&!a){if(s=c||h?{}:mr(r),!u)return c?Ie(r,be(s,r)):Le(r,ve(s,r))}else{if(!x[m])return a?r:{};s=Re(r,m,u)}}f||(f=new er);var v=f.get(r);if(v)return v;if(f.set(r,s),Xe(r))r.forEach(function(g){s.add(hr(g,e,n,g,r,f))});else if(Be(r))r.forEach(function(g,w){s.set(w,hr(g,e,n,w,r,f))});var y=p?c?Se:Mi:c?L:We,b=l?void 0:y(r);return po(b||r,function(g,w){if(b)w=g,g=r[w];M(s,w,hr(g,e,n,w,r,f))}),s}var qe=hr;var Ea=1,xa=4;function Oa(r){return qe(r,Ea|xa)}var He=Oa;var La=function(){return Ge.Date.now()},Er=La;var Ke=Object.prototype,Ia=Ke.hasOwnProperty,Sa=Ir(function(r,e){r=Object(r);var n=-1,o=e.length,a=o>2?e[2]:void 0;if(a&&T(e[0],e[1],a))o=1;while(++n<o){var f=e[n],s=L(f),u=-1,c=s.length;while(++u<c){var p=s[u],l=r[p];if(l===void 0||xn(l,Ke[p])&&!Ia.call(r,p))r[p]=f[p]}}return r}),Je=Sa;function Na(r,e,n){if(n!==void 0&&!xn(r[e],n)||n===void 0&&!(e in r))R(r,e,n)}var Q=Na;function Pa(r,e){if(e==="constructor"&&typeof r[e]==="function")return;if(e=="__proto__")return;return r[e]}var rr=Pa;function ka(r){return P(r,L(r))}var Ze=ka;function Ta(r,e,n,o,a,f,s){var u=rr(r,n),c=rr(e,n),p=s.get(c);if(p){Q(r,n,p);return}var l=f?f(u,c,n+"",r,e,s):void 0,m=l===void 0;if(m){var h=se(c),v=!h&&_n(c),y=!h&&!v&&$r(c);if(l=c,h||v||y)if(se(u))l=u;else if(wo(u))l=ur(u);else if(v)m=!1,l=Z(c,!0);else if(y)m=!1,l=lr(c,!0);else l=[];else if(he(c)||Bn(c)){if(l=u,Bn(u))l=Ze(u);else if(!Oe(u)||Zn(u))l=mr(c)}else m=!1}if(m)s.set(c,l),a(l,c,o,f,s),s.delete(c);Q(r,n,l)}var $e=Ta;function Qe(r,e,n,o,a){if(r===e)return;qa(e,function(f,s){if(a||(a=new er),Oe(f))$e(r,e,s,n,Qe,o,a);else{var u=o?o(rr(r,s),f,s+"",r,e,a):void 0;if(u===void 0)u=f;Q(r,s,u)}},L)}var rt=Qe;function Ca(r){var e=r==null?0:r.length;return e?r[e-1]:void 0}var X=Ca;function Aa(r){return function(e,n,o){var a=Object(e);if(!xt(e)){var f=It(n,3);e=We(e),n=function(u){return f(a[u],u,a)}}var s=r(e,n,o);return s>-1?a[f?e[s]:s]:void 0}}var tt=Aa;var Ra=Math.max;function Ma(r,e,n){var o=r==null?0:r.length;if(!o)return-1;var a=n==null?0:ae(n);if(a<0)a=Ra(o+a,0);return uo(r,It(e,3),a)}var nt=Ma;var Da=tt(nt),nr=Da;function Xa(r,e){var n=-1,o=xt(r)?Array(r.length):[];return zr(r,function(a,f,s){o[++n]=e(a,f,s)}),o}var gr=Xa;function Ya(r,e){var n=se(r)?Kn:gr;return n(r,It(e,3))}var E=Ya;function Wa(r,e){return r==null?r:qa(r,Ga(e),L)}var ot=Wa;function Ka(r,e){return r&&Va(r,Ga(e))}var it=Ka;function Ja(r,e){return r>e}var at=Ja;var Za=Object.prototype,Qa=Za.hasOwnProperty;function rf(r,e){return r!=null&&Qa.call(r,e)}var ft=rf;function ef(r,e){return r!=null&&bo(r,e,ft)}var vr=ef;var tf="[object String]";function nf(r){return typeof r=="string"||!se(r)&&et(r)&&qt(r)==tf}var st=nf;function of(r,e){return r<e}var br=of;function af(r,e){var n={};return e=It(e,3),Va(r,function(o,a,f){R(n,a,e(o,a,f))}),n}var W=af;function ff(r,e,n){var o=-1,a=r.length;while(++o<a){var f=r[o],s=e(f);if(s!=null&&(u===void 0?s===s&&!sn(s):n(s,u)))var u=s,c=f}return c}var q=ff;function sf(r){return r&&r.length?q(r,tn,at):void 0}var I=sf;var uf=de(function(r,e,n){rt(r,e,n)}),ar=uf;function df(r){return r&&r.length?q(r,tn,br):void 0}var j=df;function cf(r,e){return r&&r.length?q(r,It(e,2),br):void 0}var H=cf;function pf(r,e,n,o){if(!Oe(r))return r;e=Br(e,r);var a=-1,f=e.length,s=f-1,u=r;while(u!=null&&++a<f){var c=Jn(e[a]),p=n;if(c==="__proto__"||c==="constructor"||c==="prototype")return r;if(a!=s){var l=u[c];if(p=o?o(l,c,u):void 0,p===void 0)p=Oe(l)?l:Rr(e[a+1])?[]:{}}M(u,c,p),u=u[c]}return r}var ut=pf;function lf(r,e,n){var o=-1,a=e.length,f={};while(++o<a){var s=e[o],u=Fr(r,s);if(n(u,s))ut(f,Br(s,r),u)}return f}var dt=lf;function mf(r,e){var n=r.length;r.sort(e);while(n--)r[n]=r[n].value;return r}var ct=mf;function hf(r,e){if(r!==e){var n=r!==void 0,o=r===null,a=r===r,f=sn(r),s=e!==void 0,u=e===null,c=e===e,p=sn(e);if(!u&&!p&&!f&&r>e||f&&s&&c&&!u&&!p||o&&s&&c||!n&&c||!a)return 1;if(!o&&!f&&!p&&r<e||p&&n&&a&&!o&&!f||u&&n&&a||!s&&a||!c)return-1}return 0}var pt=hf;function gf(r,e,n){var o=-1,a=r.criteria,f=e.criteria,s=a.length,u=n.length;while(++o<s){var c=pt(a[o],f[o]);if(c){if(o>=u)return c;var p=n[o];return c*(p=="desc"?-1:1)}}return r.index-e.index}var lt=gf;function vf(r,e,n){if(e.length)e=Kn(e,function(f){if(se(f))return function(s){return Fr(s,f.length===1?f[0]:f)};return f});else e=[tn];var o=-1;e=Kn(e,Or(It));var a=gr(r,function(f,s,u){var c=Kn(e,function(p){return p(f)});return{criteria:c,index:++o,value:f}});return ct(a,function(f,s){return lt(f,s,n)})}var mt=vf;var bf=_o("length"),ht=bf;var vt="\\ud800-\\udfff",yf="\\u0300-\\u036f",wf="\\ufe20-\\ufe2f",_f="\\u20d0-\\u20ff",Ef=yf+wf+_f,xf="\\ufe0e\\ufe0f",Of="["+vt+"]",xr="["+Ef+"]",Lr="\\ud83c[\\udffb-\\udfff]",Lf="(?:"+xr+"|"+Lr+")",yt="[^"+vt+"]",wt="(?:\\ud83c[\\udde6-\\uddff]){2}",_t="[\\ud800-\\udbff][\\udc00-\\udfff]",If="\\u200d",Et=Lf+"?",Ot="["+xf+"]?",Sf="(?:"+If+"(?:"+[yt,wt,_t].join("|")+")"+Ot+Et+")*",Nf=Ot+Et+Sf,Pf="(?:"+[yt+xr+"?",xr,wt,_t,Of].join("|")+")",gt=RegExp(Lr+"(?="+Lr+")|"+Pf+Nf,"g");function kf(r){var e=gt.lastIndex=0;while(gt.test(r))++e;return e}var Lt=kf;function Tf(r){return ge(r)?Lt(r):ht(r)}var St=Tf;function Cf(r,e){return dt(r,e,function(n,o){return xo(r,o)})}var Nt=Cf;var Af=le(function(r,e){return r==null?{}:Nt(r,e)}),K=Af;var{ceil:Rf,max:Mf}=Math;function jf(r,e,n,o){var a=-1,f=Mf(Rf((e-r)/(n||1)),0),s=Array(f);while(f--)s[o?f:++a]=r,r+=n;return s}var Pt=jf;function Bf(r){return function(e,n,o){if(o&&typeof o!="number"&&T(e,n,o))n=o=void 0;if(e=V(e),n===void 0)n=e,e=0;else n=V(n);return o=o===void 0?e<n?1:-1:V(o),Pt(e,n,o,r)}}var kt=Bf;var Df=kt(),N=Df;var Ff="[object Map]",Gf="[object Set]";function Xf(r){if(r==null)return 0;if(xt(r))return st(r)?St(r):r.length;var e=cn(r);if(e==Ff||e==Gf)return r.size;return Fa(r).length}var Tt=Xf;var Uf=Ir(function(r,e){if(r==null)return[];var n=e.length;if(n>1&&T(r,e[0],e[1]))e=[];else if(n>2&&T(e[0],e[1],e[2]))e=[e[0]];return mt(r,Ha(e,1),[])}),C=Uf;var Vf=0;function Yf(r){var e=++Vf;return go(r)+e}var J=Yf;function zf(r,e,n){var o=-1,a=r.length,f=e.length,s={};while(++o<a){var u=o<f?e[o]:void 0;n(s,r[o],u)}return s}var Ct=zf;function Wf(r,e){return Ct(r||[],e||[],M)}var Sr=Wf;class Nr{constructor(){var r={};r._next=r._prev=r,this._sentinel=r}dequeue(){var r=this._sentinel,e=r._prev;if(e!==r)return At(e),e}enqueue(r){var e=this._sentinel;if(r._prev&&r._next)At(r);r._next=e._next,e._next._prev=r,e._next=r,r._prev=e}toString(){var r=[],e=this._sentinel,n=e._prev;while(n!==e)r.push(JSON.stringify(n,qf)),n=n._prev;return"["+r.join(", ")+"]"}}function At(r){r._prev._next=r._next,r._next._prev=r._prev,delete r._next,delete r._prev}function qf(r,e){if(r!=="_next"&&r!=="_prev")return e}var Hf=nn(1);function Rt(r,e){if(r.nodeCount()<=1)return[];var n=Jf(r,e||Hf),o=Kf(n.graph,n.buckets,n.zeroIdx);return S(E(o,function(a){return r.outEdges(a.v,a.w)}))}function Kf(r,e,n){var o=[],a=e[e.length-1],f=e[0],s;while(r.nodeCount()){while(s=f.dequeue())Pr(r,e,n,s);while(s=a.dequeue())Pr(r,e,n,s);if(r.nodeCount()){for(var u=e.length-2;u>0;--u)if(s=e[u].dequeue(),s){o=o.concat(Pr(r,e,n,s,!0));break}}}return o}function Pr(r,e,n,o,a){var f=a?[]:void 0;return _(r.inEdges(o.v),function(s){var u=r.edge(s),c=r.node(s.v);if(a)f.push({v:s.v,w:s.w});c.out-=u,kr(e,n,c)}),_(r.outEdges(o.v),function(s){var u=r.edge(s),c=s.w,p=r.node(c);p.in-=u,kr(e,n,p)}),r.removeNode(o.v),f}function Jf(r,e){var n=new _e,o=0,a=0;_(r.nodes(),function(u){n.setNode(u,{v:u,in:0,out:0})}),_(r.edges(),function(u){var c=n.edge(u.v,u.w)||0,p=e(u),l=c+p;n.setEdge(u.v,u.w,l),a=Math.max(a,n.node(u.v).out+=p),o=Math.max(o,n.node(u.w).in+=p)});var f=N(a+o+3).map(function(){return new Nr}),s=o+1;return _(n.nodes(),function(u){kr(f,s,n.node(u))}),{graph:n,buckets:f,zeroIdx:s}}function kr(r,e,n){if(!n.out)r[0].enqueue(n);else if(!n.in)r[r.length-1].enqueue(n);else r[n.out-n.in+e].enqueue(n)}function Mt(r){var e=r.graph().acyclicer==="greedy"?Rt(r,n(r)):Zf(r);_(e,function(o){var a=r.edge(o);r.removeEdge(o),a.forwardName=o.name,a.reversed=!0,r.setEdge(o.w,o.v,a,J("rev"))});function n(o){return function(a){return o.edge(a).weight}}}function Zf(r){var e=[],n={},o={};function a(f){if(Object.prototype.hasOwnProperty.call(o,f))return;o[f]=!0,n[f]=!0,_(r.outEdges(f),function(s){if(Object.prototype.hasOwnProperty.call(n,s.w))e.push(s);else a(s.w)}),delete n[f]}return _(r.nodes(),a),e}function jt(r){_(r.edges(),function(e){var n=r.edge(e);if(n.reversed){r.removeEdge(e);var o=n.forwardName;delete n.reversed,delete n.forwardName,r.setEdge(e.w,e.v,n,o)}})}function k(r,e,n,o){var a;do a=J(o);while(r.hasNode(a));return n.dummy=e,r.setNode(a,n),a}function Dt(r){var e=new _e().setGraph(r.graph());return _(r.nodes(),function(n){e.setNode(n,r.node(n))}),_(r.edges(),function(n){var o=e.edge(n.v,n.w)||{weight:0,minlen:1},a=r.edge(n);e.setEdge(n.v,n.w,{weight:o.weight+a.weight,minlen:Math.max(o.minlen,a.minlen)})}),e}function yr(r){var e=new _e({multigraph:r.isMultigraph()}).setGraph(r.graph());return _(r.nodes(),function(n){if(!r.children(n).length)e.setNode(n,r.node(n))}),_(r.edges(),function(n){e.setEdge(n,r.edge(n))}),e}function Tr(r,e){var{x:n,y:o}=r,a=e.x-n,f=e.y-o,s=r.width/2,u=r.height/2;if(!a&&!f)throw Error("Not possible to find intersection inside of the rectangle");var c,p;if(Math.abs(f)*s>Math.abs(a)*u){if(f<0)u=-u;c=u*a/f,p=u}else{if(a<0)s=-s;c=s,p=s*f/a}return{x:n+c,y:o+p}}function D(r){var e=E(N(Ar(r)+1),function(){return[]});return _(r.nodes(),function(n){var o=r.node(n),a=o.rank;if(!Ye(a))e[a][o.order]=n}),e}function Ft(r){var e=j(E(r.nodes(),function(n){return r.node(n).rank}));_(r.nodes(),function(n){var o=r.node(n);if(vr(o,"rank"))o.rank-=e})}function Gt(r){var e=j(E(r.nodes(),function(f){return r.node(f).rank})),n=[];_(r.nodes(),function(f){var s=r.node(f).rank-e;if(!n[s])n[s]=[];n[s].push(f)});var o=0,a=r.graph().nodeRankFactor;_(n,function(f,s){if(Ye(f)&&s%a!==0)--o;else if(o)_(f,function(u){r.node(u).rank+=o})})}function Cr(r,e,n,o){var a={width:0,height:0};if(arguments.length>=4)a.rank=n,a.order=o;return k(r,"border",a,e)}function Ar(r){return I(E(r.nodes(),function(e){var n=r.node(e).rank;if(!Ye(n))return n}))}function Xt(r,e){var n={lhs:[],rhs:[]};return _(r,function(o){if(e(o))n.lhs.push(o);else n.rhs.push(o)}),n}function Ut(r,e){var n=Er();try{return e()}finally{console.log(r+" time: "+(Er()-n)+"ms")}}function Yt(r,e){return e()}function Wt(r){function e(n){var o=r.children(n),a=r.node(n);if(o.length)_(o,e);if(Object.prototype.hasOwnProperty.call(a,"minRank")){a.borderLeft=[],a.borderRight=[];for(var f=a.minRank,s=a.maxRank+1;f<s;++f)zt(r,"borderLeft","_bl",n,a,f),zt(r,"borderRight","_br",n,a,f)}}_(r.children(),e)}function zt(r,e,n,o,a,f){var s={width:0,height:0,rank:f,borderType:e},u=a[e][f-1],c=k(r,"border",s,n);if(a[e][f]=c,r.setParent(c,o),u)r.setEdge(u,c,{weight:1})}function Kt(r){var e=r.graph().rankdir.toLowerCase();if(e==="lr"||e==="rl")Zt(r)}function Jt(r){var e=r.graph().rankdir.toLowerCase();if(e==="bt"||e==="rl")$f(r);if(e==="lr"||e==="rl")Qf(r),Zt(r)}function Zt(r){_(r.nodes(),function(e){Ht(r.node(e))}),_(r.edges(),function(e){Ht(r.edge(e))})}function Ht(r){var e=r.width;r.width=r.height,r.height=e}function $f(r){_(r.nodes(),function(e){Mr(r.node(e))}),_(r.edges(),function(e){var n=r.edge(e);if(_(n.points,Mr),Object.prototype.hasOwnProperty.call(n,"y"))Mr(n)})}function Mr(r){r.y=-r.y}function Qf(r){_(r.nodes(),function(e){jr(r.node(e))}),_(r.edges(),function(e){var n=r.edge(e);if(_(n.points,jr),Object.prototype.hasOwnProperty.call(n,"x"))jr(n)})}function jr(r){var e=r.x;r.x=r.y,r.y=e}function $t(r){r.graph().dummyChains=[],_(r.edges(),function(e){es(r,e)})}function es(r,e){var n=e.v,o=r.node(n).rank,a=e.w,f=r.node(a).rank,s=e.name,u=r.edge(e),c=u.labelRank;if(f===o+1)return;r.removeEdge(e);var p=void 0,l,m;for(m=0,++o;o<f;++m,++o){if(u.points=[],p={width:0,height:0,edgeLabel:u,edgeObj:e,rank:o},l=k(r,"edge",p,"_d"),o===c)p.width=u.width,p.height=u.height,p.dummy="edge-label",p.labelpos=u.labelpos;if(r.setEdge(n,l,{weight:u.weight},s),m===0)r.graph().dummyChains.push(l);n=l}r.setEdge(n,a,{weight:u.weight},s)}function Qt(r){_(r.graph().dummyChains,function(e){var n=r.node(e),o=n.edgeLabel,a;r.setEdge(n.edgeObj,o);while(n.dummy){if(a=r.successors(e)[0],r.removeNode(e),o.points.push({x:n.x,y:n.y}),n.dummy==="edge-label")o.x=n.x,o.y=n.y,o.width=n.width,o.height=n.height;e=a,n=r.node(e)}})}function fr(r){var e={};function n(o){var a=r.node(o);if(Object.prototype.hasOwnProperty.call(e,o))return a.rank;e[o]=!0;var f=j(E(r.outEdges(o),function(s){return n(s.w)-r.edge(s).minlen}));if(f===Number.POSITIVE_INFINITY||f===void 0||f===null)f=0;return a.rank=f}_(r.sources(),n)}function U(r,e){return r.node(e.w).rank-r.node(e.v).rank-r.edge(e).minlen}function wr(r){var e=new _e({directed:!1}),n=r.nodes()[0],o=r.nodeCount();e.setNode(n,{});var a,f;while(ts(e,r)<o)a=ns(e,r),f=e.hasNode(a.v)?U(r,a):-U(r,a),os(e,r,f);return e}function ts(r,e){function n(o){_(e.nodeEdges(o),function(a){var f=a.v,s=o===f?a.w:f;if(!r.hasNode(s)&&!U(e,a))r.setNode(s,{}),r.setEdge(o,s,{}),n(s)})}return _(r.nodes(),n),r.nodeCount()}function ns(r,e){return H(e.edges(),function(n){if(r.hasNode(n.v)!==r.hasNode(n.w))return U(e,n)})}function os(r,e,n){_(r.nodes(),function(o){e.node(o).rank+=n})}var dh=nn(1);var vh=nn(1);Gr.CycleException=sr;function Gr(r){var e={},n={},o=[];function a(f){if(Object.prototype.hasOwnProperty.call(n,f))throw new sr;if(!Object.prototype.hasOwnProperty.call(e,f))n[f]=!0,e[f]=!0,_(r.predecessors(f),a),delete n[f],o.push(f)}if(_(r.sinks(),a),Tt(e)!==r.nodeCount())throw new sr;return o}function sr(){}sr.prototype=Error();function _r(r,e,n){if(!se(e))e=[e];var o=(r.isDirected()?r.successors:r.neighbors).bind(r),a=[],f={};return _(e,function(s){if(!r.hasNode(s))throw Error("Graph does not have node: "+s);en(r,s,n==="post",f,o,a)}),a}function en(r,e,n,o,a,f){if(!Object.prototype.hasOwnProperty.call(o,e)){if(o[e]=!0,!n)f.push(e);if(_(a(e),function(s){en(r,s,n,o,a,f)}),n)f.push(e)}}function Xr(r,e){return _r(r,e,"post")}function Ur(r,e){return _r(r,e,"pre")}G.initLowLimValues=Yr;G.initCutValues=Vr;G.calcCutValue=an;G.leaveEdge=un;G.enterEdge=dn;G.exchangeEdges=pn;function G(r){r=Dt(r),fr(r);var e=wr(r);Yr(e),Vr(e,r);var n,o;while(n=un(e))o=dn(e,r,n),pn(e,r,n,o)}function Vr(r,e){var n=Xr(r,r.nodes());n=n.slice(0,n.length-1),_(n,function(o){us(r,e,o)})}function us(r,e,n){var o=r.node(n),a=o.parent;r.edge(n,a).cutvalue=an(r,e,n)}function an(r,e,n){var o=r.node(n),a=o.parent,f=!0,s=e.edge(n,a),u=0;if(!s)f=!1,s=e.edge(a,n);return u=s.weight,_(e.nodeEdges(n),function(c){var p=c.v===n,l=p?c.w:c.v;if(l!==a){var m=p===f,h=e.edge(c).weight;if(u+=m?h:-h,cs(r,n,l)){var v=r.edge(n,l).cutvalue;u+=m?-v:v}}}),u}function Yr(r,e){if(arguments.length<2)e=r.nodes()[0];fn(r,{},1,e)}function fn(r,e,n,o,a){var f=n,s=r.node(o);if(e[o]=!0,_(r.neighbors(o),function(u){if(!Object.prototype.hasOwnProperty.call(e,u))n=fn(r,e,n,u,o)}),s.low=f,s.lim=n++,a)s.parent=a;else delete s.parent;return n}function un(r){return nr(r.edges(),function(e){return r.edge(e).cutvalue<0})}function dn(r,e,n){var{v:o,w:a}=n;if(!e.hasEdge(o,a))o=n.w,a=n.v;var f=r.node(o),s=r.node(a),u=f,c=!1;if(f.lim>s.lim)u=s,c=!0;var p=Vt(e.edges(),function(l){return c===on(r,r.node(l.v),u)&&c!==on(r,r.node(l.w),u)});return H(p,function(l){return U(e,l)})}function pn(r,e,n,o){var{v:a,w:f}=n;r.removeEdge(a,f),r.setEdge(o.v,o.w,{}),Yr(r),Vr(r,e),ds(r,e)}function ds(r,e){var n=nr(r.nodes(),function(a){return!e.node(a).parent}),o=Ur(r,n);o=o.slice(1),_(o,function(a){var f=r.node(a).parent,s=e.edge(a,f),u=!1;if(!s)s=e.edge(f,a),u=!0;e.node(a).rank=e.node(f).rank+(u?s.minlen:-s.minlen)})}function cs(r,e,n){return r.hasEdge(e,n)}function on(r,e,n){return n.low<=e.lim&&e.lim<=n.lim}function Wr(r){switch(r.graph().ranker){case"network-simplex":hn(r);break;case"tight-tree":ls(r);break;case"longest-path":ps(r);break;default:hn(r)}}var ps=fr;function ls(r){fr(r),wr(r)}function hn(r){G(r)}function gn(r){var e=k(r,"root",{},"_root"),n=ms(r),o=I(ln(n))-1,a=2*o+1;r.graph().nestingRoot=e,_(r.edges(),function(s){r.edge(s).minlen*=a});var f=hs(r)+1;_(r.children(),function(s){vn(r,e,a,f,o,n,s)}),r.graph().nodeRankFactor=a}function vn(r,e,n,o,a,f,s){var u=r.children(s);if(!u.length){if(s!==e)r.setEdge(e,s,{weight:0,minlen:n});return}var c=Cr(r,"_bt"),p=Cr(r,"_bb"),l=r.node(s);if(r.setParent(c,s),l.borderTop=c,r.setParent(p,s),l.borderBottom=p,_(u,function(m){vn(r,e,n,o,a,f,m);var h=r.node(m),v=h.borderTop?h.borderTop:m,y=h.borderBottom?h.borderBottom:m,b=h.borderTop?o:2*o,g=v!==y?1:a-f[s]+1;r.setEdge(c,v,{weight:b,minlen:g,nestingEdge:!0}),r.setEdge(y,p,{weight:b,minlen:g,nestingEdge:!0})}),!r.parent(s))r.setEdge(e,c,{weight:0,minlen:a+f[s]})}function ms(r){var e={};function n(o,a){var f=r.children(o);if(f&&f.length)_(f,function(s){n(s,a+1)});e[o]=a}return _(r.children(),function(o){n(o,1)}),e}function hs(r){return tr(r.edges(),function(e,n){return e+r.edge(n).weight},0)}function bn(r){var e=r.graph();r.removeNode(e.nestingRoot),delete e.nestingRoot,_(r.edges(),function(n){var o=r.edge(n);if(o.nestingEdge)r.removeEdge(n)})}function yn(r,e,n){var o={},a;_(n,function(f){var s=r.parent(f),u,c;while(s){if(u=r.parent(s),u)c=o[u],o[u]=s;else c=a,a=s;if(c&&c!==s){e.setEdge(c,s);return}s=u}})}function En(r,e,n){var o=vs(r),a=new _e({compound:!0}).setGraph({root:o}).setDefaultNodeLabel(function(f){return r.node(f)});return _(r.nodes(),function(f){var s=r.node(f),u=r.parent(f);if(s.rank===e||s.minRank<=e&&e<=s.maxRank){if(a.setNode(f),a.setParent(f,u||o),_(r[n](f),function(c){var p=c.v===f?c.w:c.v,l=a.edge(p,f),m=!Ye(l)?l.weight:0;a.setEdge(p,f,{weight:r.edge(c).weight+m})}),Object.prototype.hasOwnProperty.call(s,"minRank"))a.setNode(f,{borderLeft:s.borderLeft[e],borderRight:s.borderRight[e]})}}),a}function vs(r){var e;while(r.hasNode(e=J("_root")));return e}function On(r,e){var n=0;for(var o=1;o<e.length;++o)n+=bs(r,e[o-1],e[o]);return n}function bs(r,e,n){var o=Sr(n,E(n,function(p,l){return l})),a=S(E(e,function(p){return C(E(r.outEdges(p),function(l){return{pos:o[l.w],weight:r.edge(l).weight}}),"pos")})),f=1;while(f<n.length)f<<=1;var s=2*f-1;f-=1;var u=E(Array(s),function(){return 0}),c=0;return _(a.forEach(function(p){var l=p.pos+f;u[l]+=p.weight;var m=0;while(l>0){if(l%2)m+=u[l+1];l=l-1>>1,u[l]+=p.weight}c+=p.weight*m})),c}function Ln(r){var e={},n=Vt(r.nodes(),function(u){return!r.children(u).length}),o=I(E(n,function(u){return r.node(u).rank})),a=E(N(o+1),function(){return[]});function f(u){if(vr(e,u))return;e[u]=!0;var c=r.node(u);a[c.rank].push(u),_(r.successors(u),f)}var s=C(n,function(u){return r.node(u).rank});return _(s,f),a}function In(r,e){return E(e,function(n){var o=r.inEdges(n);if(!o.length)return{v:n};else{var a=tr(o,function(f,s){var u=r.edge(s),c=r.node(s.v);return{sum:f.sum+u.weight*c.order,weight:f.weight+u.weight}},{sum:0,weight:0});return{v:n,barycenter:a.sum/a.weight,weight:a.weight}}})}function Nn(r,e){var n={};_(r,function(a,f){var s=n[a.v]={indegree:0,in:[],out:[],vs:[a.v],i:f};if(!Ye(a.barycenter))s.barycenter=a.barycenter,s.weight=a.weight}),_(e.edges(),function(a){var f=n[a.v],s=n[a.w];if(!Ye(f)&&!Ye(s))s.indegree++,f.out.push(n[a.w])});var o=Vt(n,function(a){return!a.indegree});return ys(o)}function ys(r){var e=[];function n(f){return function(s){if(s.merged)return;if(Ye(s.barycenter)||Ye(f.barycenter)||s.barycenter>=f.barycenter)ws(f,s)}}function o(f){return function(s){if(s.in.push(f),--s.indegree===0)r.push(s)}}while(r.length){var a=r.pop();e.push(a),_(a.in.reverse(),n(a)),_(a.out,o(a))}return E(Vt(e,function(f){return!f.merged}),function(f){return K(f,["vs","i","barycenter","weight"])})}function ws(r,e){var n=0,o=0;if(r.weight)n+=r.barycenter*r.weight,o+=r.weight;if(e.weight)n+=e.barycenter*e.weight,o+=e.weight;r.vs=e.vs.concat(r.vs),r.barycenter=n/o,r.weight=o,r.i=Math.min(e.i,r.i),e.merged=!0}function kn(r,e){var n=Xt(r,function(l){return Object.prototype.hasOwnProperty.call(l,"barycenter")}),o=n.lhs,a=C(n.rhs,function(l){return-l.i}),f=[],s=0,u=0,c=0;o.sort(_s(!!e)),c=Pn(f,a,c),_(o,function(l){c+=l.vs.length,f.push(l.vs),s+=l.barycenter*l.weight,u+=l.weight,c=Pn(f,a,c)});var p={vs:S(f)};if(u)p.barycenter=s/u,p.weight=u;return p}function Pn(r,e,n){var o;while(e.length&&(o=X(e)).i<=n)e.pop(),r.push(o.vs),n++;return n}function _s(r){return function(e,n){if(e.barycenter<n.barycenter)return-1;else if(e.barycenter>n.barycenter)return 1;return!r?e.i-n.i:n.i-e.i}}function qr(r,e,n,o){var a=r.children(e),f=r.node(e),s=f?f.borderLeft:void 0,u=f?f.borderRight:void 0,c={};if(s)a=Vt(a,function(y){return y!==s&&y!==u});var p=In(r,a);_(p,function(y){if(r.children(y.v).length){var b=qr(r,y.v,n,o);if(c[y.v]=b,Object.prototype.hasOwnProperty.call(b,"barycenter"))xs(y,b)}});var l=Nn(p,n);Es(l,c);var m=kn(l,o);if(s){if(m.vs=S([s,m.vs,u]),r.predecessors(s).length){var h=r.node(r.predecessors(s)[0]),v=r.node(r.predecessors(u)[0]);if(!Object.prototype.hasOwnProperty.call(m,"barycenter"))m.barycenter=0,m.weight=0;m.barycenter=(m.barycenter*m.weight+h.order+v.order)/(m.weight+2),m.weight+=2}}return m}function Es(r,e){_(r,function(n){n.vs=S(n.vs.map(function(o){if(e[o])return e[o].vs;return o}))})}function xs(r,e){if(!Ye(r.barycenter))r.barycenter=(r.barycenter*r.weight+e.barycenter*e.weight)/(r.weight+e.weight),r.weight+=e.weight;else r.barycenter=e.barycenter,r.weight=e.weight}function Rn(r){var e=Ar(r),n=Tn(r,N(1,e+1),"inEdges"),o=Tn(r,N(e-1,-1,-1),"outEdges"),a=Ln(r);An(r,a);var f=Number.POSITIVE_INFINITY,s;for(var u=0,c=0;c<4;++u,++c){Os(u%2?n:o,u%4>=2),a=D(r);var p=On(r,a);if(p<f)c=0,s=He(a),f=p}An(r,s)}function Tn(r,e,n){return E(e,function(o){return En(r,o,n)})}function Os(r,e){var n=new _e;_(r,function(o){var a=o.graph().root,f=qr(o,a,n,e);_(f.vs,function(s,u){o.node(s).order=u}),yn(o,n,f.vs)})}function An(r,e){_(e,function(n){_(n,function(o,a){r.node(o).order=a})})}function Mn(r){var e=Is(r);_(r.graph().dummyChains,function(n){var o=r.node(n),a=o.edgeObj,f=Ls(r,e,a.v,a.w),{path:s,lca:u}=f,c=0,p=s[c],l=!0;while(n!==a.w){if(o=r.node(n),l){while((p=s[c])!==u&&r.node(p).maxRank<o.rank)c++;if(p===u)l=!1}if(!l){while(c<s.length-1&&r.node(p=s[c+1]).minRank<=o.rank)c++;p=s[c]}r.setParent(n,p),n=r.successors(n)[0]}})}function Ls(r,e,n,o){var a=[],f=[],s=Math.min(e[n].low,e[o].low),u=Math.max(e[n].lim,e[o].lim),c,p;c=n;do c=r.parent(c),a.push(c);while(c&&(e[c].low>s||u>e[c].lim));p=c,c=o;while((c=r.parent(c))!==p)f.push(c);return{path:a.concat(f.reverse()),lca:p}}function Is(r){var e={},n=0;function o(a){var f=n;_(r.children(a),o),e[a]={low:f,lim:n++}}return _(r.children(),o),e}function Ss(r,e){var n={};function o(a,f){var s=0,u=0,c=a.length,p=X(f);return _(f,function(l,m){var h=Ps(r,l),v=h?r.node(h).order:c;if(h||l===p)_(f.slice(u,m+1),function(y){_(r.predecessors(y),function(b){var g=r.node(b),w=g.order;if((w<s||v<w)&&!(g.dummy&&r.node(y).dummy))jn(n,b,y)})}),u=m+1,s=v}),f}return tr(e,o),n}function Ns(r,e){var n={};function o(f,s,u,c,p){var l;_(N(s,u),function(m){if(l=f[m],r.node(l).dummy)_(r.predecessors(l),function(h){var v=r.node(h);if(v.dummy&&(v.order<c||v.order>p))jn(n,h,l)})})}function a(f,s){var u=-1,c,p=0;return _(s,function(l,m){if(r.node(l).dummy==="border"){var h=r.predecessors(l);if(h.length)c=r.node(h[0]).order,o(s,p,m,u,c),p=m,u=c}o(s,p,s.length,c,f.length)}),s}return tr(e,a),n}function Ps(r,e){if(r.node(e).dummy)return nr(r.predecessors(e),function(n){return r.node(n).dummy})}function jn(r,e,n){if(e>n){var o=e;e=n,n=o}if(!Object.prototype.hasOwnProperty.call(r,e))Object.defineProperty(r,e,{enumerable:!0,configurable:!0,value:{},writable:!0});var a=r[e];Object.defineProperty(a,n,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function ks(r,e,n){if(e>n){var o=e;e=n,n=o}return!!r[e]&&Object.prototype.hasOwnProperty.call(r[e],n)}function Ts(r,e,n,o){var a={},f={},s={};return _(e,function(u){_(u,function(c,p){a[c]=c,f[c]=c,s[c]=p})}),_(e,function(u){var c=-1;_(u,function(p){var l=o(p);if(l.length){l=C(l,function(b){return s[b]});var m=(l.length-1)/2;for(var h=Math.floor(m),v=Math.ceil(m);h<=v;++h){var y=l[h];if(f[p]===p&&c<s[y]&&!ks(n,p,y))f[y]=p,f[p]=a[p]=a[y],c=s[y]}}})}),{root:a,align:f}}function Cs(r,e,n,o,a){var f={},s=As(r,e,n,a),u=a?"borderLeft":"borderRight";function c(m,h){var v=s.nodes(),y=v.pop(),b={};while(y){if(b[y])m(y);else b[y]=!0,v.push(y),v=v.concat(h(y));y=v.pop()}}function p(m){f[m]=s.inEdges(m).reduce(function(h,v){return Math.max(h,f[v.v]+s.edge(v))},0)}function l(m){var h=s.outEdges(m).reduce(function(y,b){return Math.min(y,f[b.w]-s.edge(b))},Number.POSITIVE_INFINITY),v=r.node(m);if(h!==Number.POSITIVE_INFINITY&&v.borderType!==u)f[m]=Math.max(f[m],h)}return c(p,s.predecessors.bind(s)),c(l,s.successors.bind(s)),_(o,function(m){f[m]=f[n[m]]}),f}function As(r,e,n,o){var a=new _e,f=r.graph(),s=Bs(f.nodesep,f.edgesep,o);return _(e,function(u){var c;_(u,function(p){var l=n[p];if(a.setNode(l),c){var m=n[c],h=a.edge(m,l);a.setEdge(m,l,Math.max(s(r,p,c),h||0))}c=p})}),a}function Rs(r,e){return H(ln(e),function(n){var{NEGATIVE_INFINITY:o,POSITIVE_INFINITY:a}=Number;return ot(n,function(f,s){var u=Ds(r,s)/2;o=Math.max(f+u,o),a=Math.min(f-u,a)}),o-a})}function Ms(r,e){var n=ln(e),o=j(n),a=I(n);_(["u","d"],function(f){_(["l","r"],function(s){var u=f+s,c=r[u],p;if(c===e)return;var l=ln(c);if(p=s==="l"?o-j(l):a-I(l),p)r[u]=W(c,function(m){return m+p})})})}function js(r,e){return W(r.ul,function(n,o){if(e)return r[e.toLowerCase()][o];else{var a=C(E(r,o));return(a[1]+a[2])/2}})}function Dn(r){var e=D(r),n=ar(Ss(r,e),Ns(r,e)),o={},a;_(["u","d"],function(s){a=s==="u"?e:ln(e).reverse(),_(["l","r"],function(u){if(u==="r")a=E(a,function(m){return ln(m).reverse()});var c=(s==="u"?r.predecessors:r.successors).bind(r),p=Ts(r,a,n,c),l=Cs(r,a,p.root,p.align,u==="r");if(u==="r")l=W(l,function(m){return-m});o[s+u]=l})});var f=Rs(r,o);return Ms(o,f),js(o,r.graph().align)}function Bs(r,e,n){return function(o,a,f){var s=o.node(a),u=o.node(f),c=0,p;if(c+=s.width/2,Object.prototype.hasOwnProperty.call(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":p=-s.width/2;break;case"r":p=s.width/2;break}if(p)c+=n?p:-p;if(p=0,c+=(s.dummy?e:r)/2,c+=(u.dummy?e:r)/2,c+=u.width/2,Object.prototype.hasOwnProperty.call(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":p=u.width/2;break;case"r":p=-u.width/2;break}if(p)c+=n?p:-p;return p=0,c}}function Ds(r,e){return r.node(e).width}function Fn(r){r=yr(r),Fs(r),it(Dn(r),function(e,n){r.node(n).x=e})}function Fs(r){var e=D(r),n=r.graph().ranksep,o=0;_(e,function(a){var f=I(E(a,function(s){return r.node(s).height}));_(a,function(s){r.node(s).y=o+f/2}),o+=f+n})}function Jr(r,e){var n=e&&e.debugTiming?Ut:Yt;n("layout",()=>{var o=n(" buildLayoutGraph",()=>Js(r));n(" runLayout",()=>Gs(o,n)),n(" updateInputGraph",()=>Xs(r,o))})}function Gs(r,e){e(" makeSpaceForEdgeLabels",()=>Zs(r)),e(" removeSelfEdges",()=>au(r)),e(" acyclic",()=>Mt(r)),e(" nestingGraph.run",()=>gn(r)),e(" rank",()=>Wr(yr(r))),e(" injectEdgeLabelProxies",()=>$s(r)),e(" removeEmptyRanks",()=>Gt(r)),e(" nestingGraph.cleanup",()=>bn(r)),e(" normalizeRanks",()=>Ft(r)),e(" assignRankMinMax",()=>Qs(r)),e(" removeEdgeLabelProxies",()=>ru(r)),e(" normalize.run",()=>$t(r)),e(" parentDummyChains",()=>Mn(r)),e(" addBorderSegments",()=>Wt(r)),e(" order",()=>Rn(r)),e(" insertSelfEdges",()=>fu(r)),e(" adjustCoordinateSystem",()=>Kt(r)),e(" position",()=>Fn(r)),e(" positionSelfEdges",()=>su(r)),e(" removeBorderNodes",()=>iu(r)),e(" normalize.undo",()=>Qt(r)),e(" fixupEdgeLabelCoords",()=>nu(r)),e(" undoCoordinateSystem",()=>Jt(r)),e(" translateGraph",()=>eu(r)),e(" assignNodeIntersects",()=>tu(r)),e(" reversePoints",()=>ou(r)),e(" acyclic.undo",()=>jt(r))}function Xs(r,e){_(r.nodes(),function(n){var o=r.node(n),a=e.node(n);if(o){if(o.x=a.x,o.y=a.y,e.children(n).length)o.width=a.width,o.height=a.height}}),_(r.edges(),function(n){var o=r.edge(n),a=e.edge(n);if(o.points=a.points,Object.prototype.hasOwnProperty.call(a,"x"))o.x=a.x,o.y=a.y}),r.graph().width=e.graph().width,r.graph().height=e.graph().height}var Us=["nodesep","edgesep","ranksep","marginx","marginy"],Vs={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},Ys=["acyclicer","ranker","rankdir","align"],zs=["width","height"],Ws={width:0,height:0},qs=["minlen","weight","width","height","labeloffset"],Hs={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Ks=["labelpos"];function Js(r){var e=new _e({multigraph:!0,compound:!0}),n=Kr(r.graph());return e.setGraph(ar({},Vs,Hr(n,Us),K(n,Ys))),_(r.nodes(),function(o){var a=Kr(r.node(o));e.setNode(o,Je(Hr(a,zs),Ws)),e.setParent(o,r.parent(o))}),_(r.edges(),function(o){var a=Kr(r.edge(o));e.setEdge(o,ar({},Hs,Hr(a,qs),K(a,Ks)))}),e}function Zs(r){var e=r.graph();e.ranksep/=2,_(r.edges(),function(n){var o=r.edge(n);if(o.minlen*=2,o.labelpos.toLowerCase()!=="c")if(e.rankdir==="TB"||e.rankdir==="BT")o.width+=o.labeloffset;else o.height+=o.labeloffset})}function $s(r){_(r.edges(),function(e){var n=r.edge(e);if(n.width&&n.height){var o=r.node(e.v),a=r.node(e.w),f={rank:(a.rank-o.rank)/2+o.rank,e};k(r,"edge-proxy",f,"_ep")}})}function Qs(r){var e=0;_(r.nodes(),function(n){var o=r.node(n);if(o.borderTop)o.minRank=r.node(o.borderTop).rank,o.maxRank=r.node(o.borderBottom).rank,e=I(e,o.maxRank)}),r.graph().maxRank=e}function ru(r){_(r.nodes(),function(e){var n=r.node(e);if(n.dummy==="edge-proxy")r.edge(n.e).labelRank=n.rank,r.removeNode(e)})}function eu(r){var e=Number.POSITIVE_INFINITY,n=0,o=Number.POSITIVE_INFINITY,a=0,f=r.graph(),s=f.marginx||0,u=f.marginy||0;function c(p){var{x:l,y:m,width:h,height:v}=p;e=Math.min(e,l-h/2),n=Math.max(n,l+h/2),o=Math.min(o,m-v/2),a=Math.max(a,m+v/2)}_(r.nodes(),function(p){c(r.node(p))}),_(r.edges(),function(p){var l=r.edge(p);if(Object.prototype.hasOwnProperty.call(l,"x"))c(l)}),e-=s,o-=u,_(r.nodes(),function(p){var l=r.node(p);l.x-=e,l.y-=o}),_(r.edges(),function(p){var l=r.edge(p);if(_(l.points,function(m){m.x-=e,m.y-=o}),Object.prototype.hasOwnProperty.call(l,"x"))l.x-=e;if(Object.prototype.hasOwnProperty.call(l,"y"))l.y-=o}),f.width=n-e+s,f.height=a-o+u}function tu(r){_(r.edges(),function(e){var n=r.edge(e),o=r.node(e.v),a=r.node(e.w),f,s;if(!n.points)n.points=[],f=a,s=o;else f=n.points[0],s=n.points[n.points.length-1];n.points.unshift(Tr(o,f)),n.points.push(Tr(a,s))})}function nu(r){_(r.edges(),function(e){var n=r.edge(e);if(Object.prototype.hasOwnProperty.call(n,"x")){if(n.labelpos==="l"||n.labelpos==="r")n.width-=n.labeloffset;switch(n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset;break}}})}function ou(r){_(r.edges(),function(e){var n=r.edge(e);if(n.reversed)n.points.reverse()})}function iu(r){_(r.nodes(),function(e){if(r.children(e).length){var n=r.node(e),o=r.node(n.borderTop),a=r.node(n.borderBottom),f=r.node(X(n.borderLeft)),s=r.node(X(n.borderRight));n.width=Math.abs(s.x-f.x),n.height=Math.abs(a.y-o.y),n.x=f.x+n.width/2,n.y=o.y+n.height/2}}),_(r.nodes(),function(e){if(r.node(e).dummy==="border")r.removeNode(e)})}function au(r){_(r.edges(),function(e){if(e.v===e.w){var n=r.node(e.v);if(!n.selfEdges)n.selfEdges=[];n.selfEdges.push({e,label:r.edge(e)}),r.removeEdge(e)}})}function fu(r){var e=D(r);_(e,function(n){var o=0;_(n,function(a,f){var s=r.node(a);s.order=f+o,_(s.selfEdges,function(u){k(r,"selfedge",{width:u.label.width,height:u.label.height,rank:s.rank,order:f+ ++o,e:u.e,label:u.label},"_se")}),delete s.selfEdges})})}function su(r){_(r.nodes(),function(e){var n=r.node(e);if(n.dummy==="selfedge"){var o=r.node(n.e.v),a=o.x+o.width/2,f=o.y,s=n.x-a,u=o.height/2;r.setEdge(n.e,n.label),r.removeNode(e),n.label.points=[{x:a+2*s/3,y:f-u},{x:a+5*s/6,y:f-u},{x:a+s,y:f},{x:a+5*s/6,y:f+u},{x:a+2*s/3,y:f+u}],n.label.x=n.x,n.label.y=n.y}})}function Hr(r,e){return W(K(r,e),Number)}function Kr(r){var e={};return _(r,function(n,o){e[o.toLowerCase()]=n}),e}var Gn=t((r,e,n)=>Math.max(e,Math.min(n,r)),"clamp"),Xn=t((r="TB")=>{switch(r){case"BT":return"bottom";case"LR":return"right";case"RL":return"left";case"TB":default:return"top"}},"getDefaultSelfLoopSide"),uu=t((r)=>r==="flowchart"||r==="flowchart-v2"||r==="stateDiagram"||r==="er"||r==="classDiagram","shouldMergeSelfLoopSegments"),du=["x","y","width","height","labelBBox","intersect","calcIntersect","diff","clusterNode"],cu=t((r,e,n,o,a)=>{let f=[],s=new Set;if(n.forEach(({start:l,end:m})=>{if(l!==o)s.add(l);if(m!==o)s.add(m)}),s.forEach((l)=>{let m=r.node(l);if(typeof m?.x==="number"&&typeof m?.y==="number")f.push(m)}),f.length===0)n.forEach(({edge:l})=>{(l.points??[]).forEach((m)=>{if(typeof m?.x==="number"&&typeof m?.y==="number")f.push(m)})});if(f.length===0)return Xn(a);let u=f.reduce((l,m)=>({x:l.x+m.x/f.length,y:l.y+m.y/f.length}),{x:0,y:0}),c=u.x-e.x,p=u.y-e.y;if(Math.abs(c)>Math.abs(p))return c>0?"right":"left";if(Math.abs(p)>0)return p>0?"bottom":"top";return Xn(a)},"getSelfLoopSide"),pu=t((r,e="top",n=0,o=0)=>{let a=r.x,f=r.y-n,s=r.width/2,u=r.height/2,c=Math.max(36,Math.min(100,r.width*0.8)),p=Gn(Math.max(o,r.width*0.35),36,c),l=Gn(Math.min(r.width,r.height)*0.45,24,48);switch(e){case"bottom":{let m=f+u;return[{x:a-p/2,y:m},{x:a-p/2,y:m+l},{x:a+p/2,y:m+l},{x:a+p/2,y:m}]}case"right":{let m=a+s;return[{x:m,y:f-p/2},{x:m+l,y:f-p/2},{x:m+l,y:f+p/2},{x:m,y:f+p/2}]}case"left":{let m=a-s;return[{x:m,y:f-p/2},{x:m-l,y:f-p/2},{x:m-l,y:f+p/2},{x:m,y:f+p/2}]}case"top":default:{let m=f-u;return[{x:a-p/2,y:m},{x:a-p/2,y:m-l},{x:a+p/2,y:m-l},{x:a+p/2,y:m}]}}},"getSelfLoopPoints"),lu=t((r,e,n="top",o=0,a={})=>{let s=r.x,u=r.y-o,c=a.width??0,p=a.height??0;switch(n){case"bottom":return{x:s,y:Math.max(...e.map((l)=>l.y))+p/2+4};case"right":return{x:Math.max(...e.map((l)=>l.x))+c/2+4,y:u};case"left":return{x:Math.min(...e.map((l)=>l.x))-c/2-4,y:u};case"top":default:return{x:s,y:Math.min(...e.map((l)=>l.y))-p/2-4}}},"getSelfLoopLabelPosition"),vc=t((r,e=0,{mergeSelfLoops:n=!0}={})=>{let o=new Map,a=[],f=r.graph()?.rankdir;return r.edges().forEach((s)=>{let u=r.edge(s);if(n&&u.selfLoop){let c=u.selfLoop.id;if(!o.has(c))o.set(c,[]);o.get(c).push({edge:u,start:s.v,end:s.w})}else a.push({edge:u,start:s.v,end:s.w})}),o.forEach((s)=>{if(s.length!==3){s.forEach((w)=>a.push(w));return}s.sort((w,A)=>w.edge.selfLoop.order-A.edge.selfLoop.order);let[u,c,p]=s,l=u.edge.originalEdge??c.edge.originalEdge??p.edge.originalEdge??c.edge,m=r.node(l.start);if(!m){s.forEach((w)=>a.push(w));return}let h={width:c.edge.width,height:c.edge.height},v=cu(r,m,s,l.start,f),y=pu(m,v,e,h.width??0),b=lu(m,y,v,e,h),g={...c.edge,...l,id:l.id,points:y,start:l.start,end:l.end,x:b.x,y:b.y,width:h.width,height:h.height,labelStyle:c.edge.labelStyle,fromCluster:u.edge.fromCluster??c.edge.fromCluster??p.edge.fromCluster,toCluster:u.edge.toCluster??c.edge.toCluster??p.edge.toCluster};delete g.selfLoop,delete g.originalEdge,a.push({edge:g,start:g.start,end:g.end})}),a},"getEdgesToRender"),Vn=t(async({element:r,graph:e,diagramType:n,id:o,parentCluster:a,siteConfig:f})=>{let s=e.graph().rankdir;i.trace("Dir in recursive render - dir:",s);let{clusters:u,edgePaths:c,edgeLabels:p,nodes:l,rootGroups:m}=oo(r,{edgePathsClass:"edgePaths"});if(!e.nodes())i.info("No nodes found for",e);else i.info("Recursive render XXX",e.nodes());if(e.edges().length>0)i.info("Recursive edges",e.edge(e.edges()[0]));let h=uu(n);await Promise.all(e.nodes().map(async function(b){let g=e.node(b);if(a!==void 0){let w=JSON.parse(JSON.stringify(a.clusterData));if(i.trace(`Setting data for parent cluster XXX
|
|
2
2
|
Node.id = `,b,`
|
|
3
3
|
data=`,w.height,`
|
|
4
4
|
Parent cluster`,a.height),e.setNode(a.id,w),!e.parent(b))i.trace("Setting parent",b,a.id),e.setParent(b,a.id,w)}if(i.info("(Insert) Node XXX"+b+": "+JSON.stringify(e.node(b))),g?.clusterNode){i.info("Cluster identified XBX",b,g.width,e.node(b));let{ranksep:w,nodesep:A}=e.graph();g.graph.setGraph({...g.graph.graph(),ranksep:w+25,nodesep:A});let Zr=await vu({element:l,graph:g.graph,diagramType:n,id:o,parentCluster:e.node(b),siteConfig:f}),Qr=Zr.elem;B(g,Qr),g.diff=Zr.diff||0,i.info("New compound node after recursive render XAX",b,"width",g.width,"height",g.height),Ic(Qr,g)}else if(e.children(b).length>0)i.trace("Cluster - the non recursive path XBX",b,g.id,g,g.width,"Graph:",e),i.trace(aa(g.id,e)),ne.set(g.id,{id:aa(g.id,e),node:g});else i.trace("Node - the non recursive path XAX",b,l,e.node(b),s),await so(l,e.node(b),{config:f,dir:s})})),await t(async()=>{let b=e.edges().map(async function(g){let w=e.edge(g.v,g.w,g.name);if(i.info("Edge "+g.v+" -> "+g.w+": "+JSON.stringify(g)),i.info("Edge "+g.v+" -> "+g.w+": ",g," ",JSON.stringify(e.edge(g))),i.info("Fix",ne,"ids:",g.v,g.w,"Translating: ",ne.get(g.v),ne.get(g.w)),h&&w.selfLoop){if(w.selfLoop.order!==1)return;let A={...w.originalEdge,...w,id:w.selfLoop.id,startLabelLeft:w.originalEdge?.startLabelLeft??w.startLabelLeft,startLabelRight:w.originalEdge?.startLabelRight??w.startLabelRight,endLabelLeft:w.originalEdge?.endLabelLeft??w.endLabelLeft,endLabelRight:w.originalEdge?.endLabelRight??w.endLabelRight};await Cn(p,A),w.width=A.width,w.height=A.height,w.labelStyle=A.labelStyle;return}await Cn(p,w)});await Promise.all(b)},"processEdges")();let{subGraphTitleTotalMargin:y}=wn(f);return{elem:m,graph:e,groups:{clusters:u,edgePaths:c,edgeLabels:p,nodes:l,rootGroups:m},diagramType:n,id:o,mergeSelfLoops:h,subGraphTitleTotalMargin:y}},"measureDagreGraph"),Yn=t((r)=>{i.info("############################################# XXX"),i.info("### Layout ### XXX"),i.info("############################################# XXX"),Jr(r)},"runDagreGraphLayout"),mu=t((r,e,n)=>{let o=r.node(e);if(!o)return;let a={...o};if(o?.clusterNode)a.y=(o.y??0)+n;else if(r.children(e).length>0)a.height=(o.height??0)+n;else a.y=(o.y??0)+n/2;return a},"normalizeDagreNode"),Un=t((r,e)=>{du.forEach((n)=>{if(e[n]!==void 0)r[n]=e[n]})},"applyDagreNodeLayout"),hu=t((r,e,n,o)=>({...r,start:r.start??e,end:r.end??n,points:(r.points??[]).map((a)=>({...a,y:typeof a.y==="number"?a.y+o:a.y}))}),"normalizeDagreEdge"),Jc=t((r,e)=>{let{graph:n,mergeSelfLoops:o,subGraphTitleTotalMargin:a=0}=e,f=new Map(r.nodes.map((u)=>[u.id,u]));co(n).forEach((u)=>{let c=mu(n,u,a);if(!c)return;Un(n.node(u),c);let p=f.get(u);if(p)Un(p,c)});let s=a/2;return r.edges=vc(n,s,{mergeSelfLoops:o}).map(({edge:u,start:c,end:p})=>hu(u,c,p,s)),r},"applyDagreLayoutResult"),gu=t(async({elem:r,graph:e,groups:{clusters:n,edgePaths:o},diagramType:a,id:f,mergeSelfLoops:s,subGraphTitleTotalMargin:u})=>{let c=0;await Promise.all(co(e).map(async function(m){let h=e.node(m);if(i.info("Position XBX => "+m+": ("+h.x,","+h.y,") width: ",h.width," height: ",h.height),h?.clusterNode)h.y+=u,i.info("A tainted cluster node XBX1",m,h.id,h.width,h.height,h.x,h.y,e.parent(m)),ne.get(h.id).node=h,mn(h);else if(e.children(m).length>0){i.info("A pure cluster node XBX1",m,h.id,h.x,h.y,h.width,h.height,e.parent(m)),h.height+=u,e.node(h.parentId);let v=h?.padding/2||0,y=h?.labelBBox?.height||0,b=y-v||0;i.debug("OffsetY",b,"labelHeight",y,"halfPadding",v),await ir(n,h),ne.get(h.id).node=h}else{let v=e.node(h.parentId);h.y+=u/2,i.info("A regular node XBX1 - using the padding",h.id,"parent",h.parentId,h.width,h.height,h.x,h.y,"offsetY",h.offsetY,"parent",v,v?.offsetY,h),mn(h)}}));let p=u/2;return vc(e,p,{mergeSelfLoops:s}).forEach(function({edge:m,start:h,end:v}){i.info("Edge "+h+" -> "+v+": "+JSON.stringify(m),m),m.points.forEach((w)=>w.y+=p);let y=e.node(h),b=e.node(v),g=or(o,m,ne,a,y,b,f);fa(m,g)}),e.nodes().forEach(function(m){let h=e.node(m);if(i.info(m,h.type,h.diff),h.isGroup)c=h.diff}),i.warn("Returning from recursive render XAX",r,c),{elem:r,diff:c}},"paintDagreLayoutCore"),vu=t(async(r)=>{let e=await Vn(r);return Yn(e.graph),await gu(e)},"renderDagreSubgraph"),yc=t((r)=>{let e=new _e({multigraph:!0,compound:!0}).setGraph({rankdir:r.direction,nodesep:r.config?.nodeSpacing||r.nodeSpacing||r.config?.flowchart?.nodeSpacing,ranksep:r.config?.rankSpacing||r.rankSpacing||r.config?.flowchart?.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});return r.nodes.forEach((n)=>{if(e.setNode(n.id,{...n}),n.parentId)e.setParent(n.id,n.parentId)}),i.debug("Edges:",r.edges),r.edges.forEach((n)=>{if(n.start===n.end){let o=n.start,a=o+"---"+o+"---1",f=o+"---"+o+"---2",s=e.node(o);e.setNode(a,{domId:a,id:a,parentId:s.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),e.setParent(a,s.parentId),e.setNode(f,{domId:f,id:f,parentId:s.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),e.setParent(f,s.parentId);let u=structuredClone(n),c=structuredClone(n),p=structuredClone(n),l=structuredClone(n);if(c.originalEdge=u,c.selfLoop={id:u.id,order:0},p.originalEdge=u,p.selfLoop={id:u.id,order:1},l.originalEdge=u,l.selfLoop={id:u.id,order:2},c.label="",c.arrowTypeEnd="none",c.endLabelLeft="",c.endLabelRight="",c.startLabelLeft="",c.id=o+"-cyclic-special-1",p.startLabelRight="",p.startLabelLeft="",p.endLabelLeft="",p.endLabelRight="",p.arrowTypeStart="none",p.arrowTypeEnd="none",p.id=o+"-cyclic-special-mid",l.label="",l.startLabelRight="",l.startLabelLeft="",l.arrowTypeStart="none",s.isGroup)c.fromCluster=o,l.toCluster=o;l.id=o+"-cyclic-special-2",l.arrowTypeStart="none",e.setEdge(o,a,c,o+"-cyclic-special-0"),e.setEdge(a,f,p,o+"-cyclic-special-1"),e.setEdge(f,o,l,o+"-cyclic-special-2")}else e.setEdge(n.start,n.end,{...n},n.id)}),xc(e),{graph:e}},"prepareLayoutForDagre"),el=t(async(r,{element:e,preparedLayout:n})=>{let o=n??yc(r),a=d(),f=await Vn({element:e,graph:o.graph,diagramType:r.type,id:r.diagramId,parentCluster:void 0,siteConfig:a});return o.measuredLayout=f,f},"measureDagreLayout"),tl=t((r,e)=>{let n=e.preparedLayout?.measuredLayout;if(!n)throw Error("runDagreLayoutCore requires measureDagreLayout to run first");return Yn(n.graph),Jc(r,n),n},"runDagreLayoutCore"),bu=t((r,{measure:e})=>co(e.graph).map((n)=>e.graph.node(n)).filter(Boolean),"getDagrePaintNodes"),yu=t((r,e,{measure:n})=>r?n.graph.node(r):void 0,"getDagreEdgeNode"),bc=$a({prepareLayout:yc,measureLayout:el,runLayoutCore:tl,paintOptions:{clusterDb:ne,getNodes:bu,getEdgeNode:yu,skipNode:t((r,{measure:e})=>!e.graph.hasNode(r.id),"skipNode"),isCluster:t((r,{measure:e})=>e.graph.hasNode(r.id)&&(e.graph.children(r.id)??[]).length>0,"isCluster")}});export{vc,Jc,yc,el,tl,bc};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Ra}from"./chunk-9qdx0ekk.js";export{Ra as createRailroadEbnfServices};
|
|
Binary file
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{y,s,o,a,e,n,b,hn,ke,ce}from"./chunk-hxsrph02.js";var pn=2,gn=1,ws=class{activate(t){this._terminal=t}dispose(){}fit(){let t=this.proposeDimensions();if(!t||!this._terminal||isNaN(t.cols)||isNaN(t.rows))return;let i=this._terminal._core;(this._terminal.rows!==t.rows||this._terminal.cols!==t.cols)&&(i._renderService.clear(),this._terminal.resize(t.cols,t.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let t=this._terminal._core._renderService.dimensions;if(t.css.cell.width===0||t.css.cell.height===0)return;let i=this._terminal.options.scrollback===0?0:this._terminal.options.overviewRuler?.width||14,r=window.getComputedStyle(this._terminal.element.parentElement),h=parseInt(r.getPropertyValue("height")),l=Math.max(0,parseInt(r.getPropertyValue("width"))),c=window.getComputedStyle(this._terminal.element),d={top:parseInt(c.getPropertyValue("padding-top")),bottom:parseInt(c.getPropertyValue("padding-bottom")),right:parseInt(c.getPropertyValue("padding-right")),left:parseInt(c.getPropertyValue("padding-left"))},_=d.top+d.bottom,f=d.right+d.left,u=h-_,g=l-f-i;return{cols:Math.max(pn,Math.floor(g/t.css.cell.width)),rows:Math.max(gn,Math.floor(u/t.css.cell.height))}}};var{defineProperty:kr,getOwnPropertyDescriptor:mn}=Object,vn=(t,i)=>{for(var r in i)kr(t,r,{get:i[r],enumerable:!0})},te=(t,i,r,h)=>{for(var l=h>1?void 0:h?mn(i,r):i,c=t.length-1,d;c>=0;c--)(d=t[c])&&(l=(h?d(i,r,l):d(l))||l);return h&&l&&kr(i,r,l),l},M=(t,i)=>(r,h)=>i(r,h,t),ys="Terminal input",Oi={get:()=>ys,set:(t)=>ys=t},Cs="Too much output to announce, navigate to rows manually to read",Ii={get:()=>Cs,set:(t)=>Cs=t};function Sn(t){return t.replace(/\r?\n/g,"\r")}function bn(t,i){return i?"\x1B[200~"+t+"\x1B[201~":t}function wn(t,i){t.clipboardData&&t.clipboardData.setData("text/plain",i.selectionText),t.preventDefault()}function yn(t,i,r,h){if(t.stopPropagation(),t.clipboardData){let l=t.clipboardData.getData("text/plain");Er(l,i,r,h)}}function Er(t,i,r,h){t=Sn(t),t=bn(t,r.decPrivateModes.bracketedPasteMode&&h.rawOptions.ignoreBracketedPasteMode!==!0),r.triggerDataEvent(t,!0),i.value=""}function Dr(t,i,r){let h=r.getBoundingClientRect(),l=t.clientX-h.left-10,c=t.clientY-h.top-10;i.style.width="20px",i.style.height="20px",i.style.left=`${l}px`,i.style.top=`${c}px`,i.style.zIndex="1000",i.focus()}function xs(t,i,r,h,l){Dr(t,i,r),l&&h.rightClickSelect(t),i.value=h.selectionText,i.select()}function Qe(t){return t>65535?(t-=65536,String.fromCharCode((t>>10)+55296)+String.fromCharCode(t%1024+56320)):String.fromCharCode(t)}function ui(t,i=0,r=t.length){let h="";for(let l=i;l<r;++l){let c=t[l];c>65535?(c-=65536,h+=String.fromCharCode((c>>10)+55296)+String.fromCharCode(c%1024+56320)):h+=String.fromCharCode(c)}return h}var Cn=class{constructor(){this._interim=0}clear(){this._interim=0}decode(t,i){let r=t.length;if(!r)return 0;let h=0,l=0;if(this._interim){let c=t.charCodeAt(l++);56320<=c&&c<=57343?i[h++]=(this._interim-55296)*1024+c-56320+65536:(i[h++]=this._interim,i[h++]=c),this._interim=0}for(let c=l;c<r;++c){let d=t.charCodeAt(c);if(55296<=d&&d<=56319){if(++c>=r)return this._interim=d,h;let _=t.charCodeAt(c);56320<=_&&_<=57343?i[h++]=(d-55296)*1024+_-56320+65536:(i[h++]=d,i[h++]=_);continue}d!==65279&&(i[h++]=d)}return h}},xn=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(t,i){let r=t.length;if(!r)return 0;let h=0,l,c,d,_,f=0,u=0;if(this.interim[0]){let v=!1,S=this.interim[0];S&=(S&224)===192?31:(S&240)===224?15:7;let m=0,w;for(;(w=this.interim[++m]&63)&&m<4;)S<<=6,S|=w;let R=(this.interim[0]&224)===192?2:(this.interim[0]&240)===224?3:4,A=R-m;for(;u<A;){if(u>=r)return 0;if(w=t[u++],(w&192)!==128){u--,v=!0;break}else this.interim[m++]=w,S<<=6,S|=w&63}v||(R===2?S<128?u--:i[h++]=S:R===3?S<2048||S>=55296&&S<=57343||S===65279||(i[h++]=S):S<65536||S>1114111||(i[h++]=S)),this.interim.fill(0)}let g=r-4,p=u;for(;p<r;){for(;p<g&&!((l=t[p])&128)&&!((c=t[p+1])&128)&&!((d=t[p+2])&128)&&!((_=t[p+3])&128);)i[h++]=l,i[h++]=c,i[h++]=d,i[h++]=_,p+=4;if(l=t[p++],l<128)i[h++]=l;else if((l&224)===192){if(p>=r)return this.interim[0]=l,h;if(c=t[p++],(c&192)!==128){p--;continue}if(f=(l&31)<<6|c&63,f<128){p--;continue}i[h++]=f}else if((l&240)===224){if(p>=r)return this.interim[0]=l,h;if(c=t[p++],(c&192)!==128){p--;continue}if(p>=r)return this.interim[0]=l,this.interim[1]=c,h;if(d=t[p++],(d&192)!==128){p--;continue}if(f=(l&15)<<12|(c&63)<<6|d&63,f<2048||f>=55296&&f<=57343||f===65279)continue;i[h++]=f}else if((l&248)===240){if(p>=r)return this.interim[0]=l,h;if(c=t[p++],(c&192)!==128){p--;continue}if(p>=r)return this.interim[0]=l,this.interim[1]=c,h;if(d=t[p++],(d&192)!==128){p--;continue}if(p>=r)return this.interim[0]=l,this.interim[1]=c,this.interim[2]=d,h;if(_=t[p++],(_&192)!==128){p--;continue}if(f=(l&7)<<18|(c&63)<<12|(d&63)<<6|_&63,f<65536||f>1114111)continue;i[h++]=f}}return h}},Br="",et=" ",Wt=class t{constructor(){this.fg=0,this.bg=0,this.extended=new si}static toColorRGB(i){return[i>>>16&255,i>>>8&255,i&255]}static fromColorRGB(i){return(i[0]&255)<<16|(i[1]&255)<<8|i[2]&255}clone(){let i=new t;return i.fg=this.fg,i.bg=this.bg,i.extended=this.extended.clone(),i}isInverse(){return this.fg&67108864}isBold(){return this.fg&134217728}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:this.fg&268435456}isBlink(){return this.fg&536870912}isInvisible(){return this.fg&1073741824}isItalic(){return this.bg&67108864}isDim(){return this.bg&134217728}isStrikethrough(){return this.fg&2147483648}isProtected(){return this.bg&536870912}isOverline(){return this.bg&1073741824}getFgColorMode(){return this.fg&50331648}getBgColorMode(){return this.bg&50331648}isFgRGB(){return(this.fg&50331648)===50331648}isBgRGB(){return(this.bg&50331648)===50331648}isFgPalette(){return(this.fg&50331648)===16777216||(this.fg&50331648)===33554432}isBgPalette(){return(this.bg&50331648)===16777216||(this.bg&50331648)===33554432}isFgDefault(){return(this.fg&50331648)===0}isBgDefault(){return(this.bg&50331648)===0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(this.fg&50331648){case 16777216:case 33554432:return this.fg&255;case 50331648:return this.fg&16777215;default:return-1}}getBgColor(){switch(this.bg&50331648){case 16777216:case 33554432:return this.bg&255;case 50331648:return this.bg&16777215;default:return-1}}hasExtendedAttrs(){return this.bg&268435456}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(this.bg&268435456&&~this.extended.underlineColor)switch(this.extended.underlineColor&50331648){case 16777216:case 33554432:return this.extended.underlineColor&255;case 50331648:return this.extended.underlineColor&16777215;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return this.bg&268435456&&~this.extended.underlineColor?this.extended.underlineColor&50331648:this.getFgColorMode()}isUnderlineColorRGB(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===50331648:this.isFgRGB()}isUnderlineColorPalette(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===16777216||(this.extended.underlineColor&50331648)===33554432:this.isFgPalette()}isUnderlineColorDefault(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===0:this.isFgDefault()}getUnderlineStyle(){return this.fg&268435456?this.bg&268435456?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}},si=class t{constructor(i=0,r=0){this._ext=0,this._urlId=0,this._ext=i,this._urlId=r}get ext(){return this._urlId?this._ext&-469762049|this.underlineStyle<<26:this._ext}set ext(i){this._ext=i}get underlineStyle(){return this._urlId?5:(this._ext&469762048)>>26}set underlineStyle(i){this._ext&=-469762049,this._ext|=i<<26&469762048}get underlineColor(){return this._ext&67108863}set underlineColor(i){this._ext&=-67108864,this._ext|=i&67108863}get urlId(){return this._urlId}set urlId(i){this._urlId=i}get underlineVariantOffset(){let i=(this._ext&3758096384)>>29;return i<0?i^4294967288:i}set underlineVariantOffset(i){this._ext&=536870911,this._ext|=i<<29&3758096384}clone(){return new t(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}},Te=class t extends Wt{constructor(){super(...arguments);this.content=0,this.fg=0,this.bg=0,this.extended=new si,this.combinedData=""}static fromCharData(i){let r=new t;return r.setFromCharData(i),r}isCombined(){return this.content&2097152}getWidth(){return this.content>>22}getChars(){return this.content&2097152?this.combinedData:this.content&2097151?Qe(this.content&2097151):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):this.content&2097151}setFromCharData(i){this.fg=i[0],this.bg=0;let r=!1;if(i[1].length>2)r=!0;else if(i[1].length===2){let h=i[1].charCodeAt(0);if(55296<=h&&h<=56319){let l=i[1].charCodeAt(1);56320<=l&&l<=57343?this.content=(h-55296)*1024+l-56320+65536|i[2]<<22:r=!0}else r=!0}else this.content=i[1].charCodeAt(0)|i[2]<<22;r&&(this.combinedData=i[1],this.content=2097152|i[2]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},ks="di$target",Ni="di$dependencies",Si=new Map;function kn(t){return t[Ni]||[]}function pe(t){if(Si.has(t))return Si.get(t);let i=function(r,h,l){if(arguments.length!==3)throw Error("@IServiceName-decorator can only be used to decorate a parameter");En(i,r,l)};return i._id=t,Si.set(t,i),i}function En(t,i,r){i[ks]===i?i[Ni].push({id:t,index:r}):(i[Ni]=[{id:t,index:r}],i[ks]=i)}var ye=pe("BufferService"),Rr=pe("CoreMouseService"),dt=pe("CoreService"),Dn=pe("CharsetService"),ds=pe("InstantiationService"),Lr=pe("LogService"),Ce=pe("OptionsService"),Mr=pe("OscLinkService"),Bn=pe("UnicodeService"),zt=pe("DecorationService"),Hi=class{constructor(t,i,r){this._bufferService=t,this._optionsService=i,this._oscLinkService=r}provideLinks(t,i){let r=this._bufferService.buffer.lines.get(t-1);if(!r){i(void 0);return}let h=[],l=this._optionsService.rawOptions.linkHandler,c=new Te,d=r.getTrimmedLength(),_=-1,f=-1,u=!1;for(let g=0;g<d;g++)if(!(f===-1&&!r.hasContent(g))){if(r.loadCell(g,c),c.hasExtendedAttrs()&&c.extended.urlId)if(f===-1){f=g,_=c.extended.urlId;continue}else u=c.extended.urlId!==_;else f!==-1&&(u=!0);if(u||f!==-1&&g===d-1){let p=this._oscLinkService.getLinkData(_)?.uri;if(p){let v={start:{x:f+1,y:t},end:{x:g+(!u&&g===d-1?1:0),y:t}},S=!1;if(!l?.allowNonHttpProtocols)try{let m=new URL(p);["http:","https:"].includes(m.protocol)||(S=!0)}catch{S=!0}S||h.push({text:p,range:v,activate:(m,w)=>l?l.activate(m,w,v):Rn(m,w),hover:(m,w)=>l?.hover?.(m,w,v),leave:(m,w)=>l?.leave?.(m,w,v)})}u=!1,c.hasExtendedAttrs()&&c.extended.urlId?(f=g,_=c.extended.urlId):(f=-1,_=-1)}}i(h)}};Hi=te([M(0,ye),M(1,Ce),M(2,Mr)],Hi);function Rn(t,i){if(confirm(`Do you want to navigate to ${i}?
|
|
1
|
+
import{y,s,o,a,e,n,b,hn,ke,ce}from"./chunk-56a6zytc.js";var pn=2,gn=1,ws=class{activate(t){this._terminal=t}dispose(){}fit(){let t=this.proposeDimensions();if(!t||!this._terminal||isNaN(t.cols)||isNaN(t.rows))return;let i=this._terminal._core;(this._terminal.rows!==t.rows||this._terminal.cols!==t.cols)&&(i._renderService.clear(),this._terminal.resize(t.cols,t.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let t=this._terminal._core._renderService.dimensions;if(t.css.cell.width===0||t.css.cell.height===0)return;let i=this._terminal.options.scrollback===0?0:this._terminal.options.overviewRuler?.width||14,r=window.getComputedStyle(this._terminal.element.parentElement),h=parseInt(r.getPropertyValue("height")),l=Math.max(0,parseInt(r.getPropertyValue("width"))),c=window.getComputedStyle(this._terminal.element),d={top:parseInt(c.getPropertyValue("padding-top")),bottom:parseInt(c.getPropertyValue("padding-bottom")),right:parseInt(c.getPropertyValue("padding-right")),left:parseInt(c.getPropertyValue("padding-left"))},_=d.top+d.bottom,f=d.right+d.left,u=h-_,g=l-f-i;return{cols:Math.max(pn,Math.floor(g/t.css.cell.width)),rows:Math.max(gn,Math.floor(u/t.css.cell.height))}}};var{defineProperty:kr,getOwnPropertyDescriptor:mn}=Object,vn=(t,i)=>{for(var r in i)kr(t,r,{get:i[r],enumerable:!0})},te=(t,i,r,h)=>{for(var l=h>1?void 0:h?mn(i,r):i,c=t.length-1,d;c>=0;c--)(d=t[c])&&(l=(h?d(i,r,l):d(l))||l);return h&&l&&kr(i,r,l),l},M=(t,i)=>(r,h)=>i(r,h,t),ys="Terminal input",Oi={get:()=>ys,set:(t)=>ys=t},Cs="Too much output to announce, navigate to rows manually to read",Ii={get:()=>Cs,set:(t)=>Cs=t};function Sn(t){return t.replace(/\r?\n/g,"\r")}function bn(t,i){return i?"\x1B[200~"+t+"\x1B[201~":t}function wn(t,i){t.clipboardData&&t.clipboardData.setData("text/plain",i.selectionText),t.preventDefault()}function yn(t,i,r,h){if(t.stopPropagation(),t.clipboardData){let l=t.clipboardData.getData("text/plain");Er(l,i,r,h)}}function Er(t,i,r,h){t=Sn(t),t=bn(t,r.decPrivateModes.bracketedPasteMode&&h.rawOptions.ignoreBracketedPasteMode!==!0),r.triggerDataEvent(t,!0),i.value=""}function Dr(t,i,r){let h=r.getBoundingClientRect(),l=t.clientX-h.left-10,c=t.clientY-h.top-10;i.style.width="20px",i.style.height="20px",i.style.left=`${l}px`,i.style.top=`${c}px`,i.style.zIndex="1000",i.focus()}function xs(t,i,r,h,l){Dr(t,i,r),l&&h.rightClickSelect(t),i.value=h.selectionText,i.select()}function Qe(t){return t>65535?(t-=65536,String.fromCharCode((t>>10)+55296)+String.fromCharCode(t%1024+56320)):String.fromCharCode(t)}function ui(t,i=0,r=t.length){let h="";for(let l=i;l<r;++l){let c=t[l];c>65535?(c-=65536,h+=String.fromCharCode((c>>10)+55296)+String.fromCharCode(c%1024+56320)):h+=String.fromCharCode(c)}return h}var Cn=class{constructor(){this._interim=0}clear(){this._interim=0}decode(t,i){let r=t.length;if(!r)return 0;let h=0,l=0;if(this._interim){let c=t.charCodeAt(l++);56320<=c&&c<=57343?i[h++]=(this._interim-55296)*1024+c-56320+65536:(i[h++]=this._interim,i[h++]=c),this._interim=0}for(let c=l;c<r;++c){let d=t.charCodeAt(c);if(55296<=d&&d<=56319){if(++c>=r)return this._interim=d,h;let _=t.charCodeAt(c);56320<=_&&_<=57343?i[h++]=(d-55296)*1024+_-56320+65536:(i[h++]=d,i[h++]=_);continue}d!==65279&&(i[h++]=d)}return h}},xn=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(t,i){let r=t.length;if(!r)return 0;let h=0,l,c,d,_,f=0,u=0;if(this.interim[0]){let v=!1,S=this.interim[0];S&=(S&224)===192?31:(S&240)===224?15:7;let m=0,w;for(;(w=this.interim[++m]&63)&&m<4;)S<<=6,S|=w;let R=(this.interim[0]&224)===192?2:(this.interim[0]&240)===224?3:4,A=R-m;for(;u<A;){if(u>=r)return 0;if(w=t[u++],(w&192)!==128){u--,v=!0;break}else this.interim[m++]=w,S<<=6,S|=w&63}v||(R===2?S<128?u--:i[h++]=S:R===3?S<2048||S>=55296&&S<=57343||S===65279||(i[h++]=S):S<65536||S>1114111||(i[h++]=S)),this.interim.fill(0)}let g=r-4,p=u;for(;p<r;){for(;p<g&&!((l=t[p])&128)&&!((c=t[p+1])&128)&&!((d=t[p+2])&128)&&!((_=t[p+3])&128);)i[h++]=l,i[h++]=c,i[h++]=d,i[h++]=_,p+=4;if(l=t[p++],l<128)i[h++]=l;else if((l&224)===192){if(p>=r)return this.interim[0]=l,h;if(c=t[p++],(c&192)!==128){p--;continue}if(f=(l&31)<<6|c&63,f<128){p--;continue}i[h++]=f}else if((l&240)===224){if(p>=r)return this.interim[0]=l,h;if(c=t[p++],(c&192)!==128){p--;continue}if(p>=r)return this.interim[0]=l,this.interim[1]=c,h;if(d=t[p++],(d&192)!==128){p--;continue}if(f=(l&15)<<12|(c&63)<<6|d&63,f<2048||f>=55296&&f<=57343||f===65279)continue;i[h++]=f}else if((l&248)===240){if(p>=r)return this.interim[0]=l,h;if(c=t[p++],(c&192)!==128){p--;continue}if(p>=r)return this.interim[0]=l,this.interim[1]=c,h;if(d=t[p++],(d&192)!==128){p--;continue}if(p>=r)return this.interim[0]=l,this.interim[1]=c,this.interim[2]=d,h;if(_=t[p++],(_&192)!==128){p--;continue}if(f=(l&7)<<18|(c&63)<<12|(d&63)<<6|_&63,f<65536||f>1114111)continue;i[h++]=f}}return h}},Br="",et=" ",Wt=class t{constructor(){this.fg=0,this.bg=0,this.extended=new si}static toColorRGB(i){return[i>>>16&255,i>>>8&255,i&255]}static fromColorRGB(i){return(i[0]&255)<<16|(i[1]&255)<<8|i[2]&255}clone(){let i=new t;return i.fg=this.fg,i.bg=this.bg,i.extended=this.extended.clone(),i}isInverse(){return this.fg&67108864}isBold(){return this.fg&134217728}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:this.fg&268435456}isBlink(){return this.fg&536870912}isInvisible(){return this.fg&1073741824}isItalic(){return this.bg&67108864}isDim(){return this.bg&134217728}isStrikethrough(){return this.fg&2147483648}isProtected(){return this.bg&536870912}isOverline(){return this.bg&1073741824}getFgColorMode(){return this.fg&50331648}getBgColorMode(){return this.bg&50331648}isFgRGB(){return(this.fg&50331648)===50331648}isBgRGB(){return(this.bg&50331648)===50331648}isFgPalette(){return(this.fg&50331648)===16777216||(this.fg&50331648)===33554432}isBgPalette(){return(this.bg&50331648)===16777216||(this.bg&50331648)===33554432}isFgDefault(){return(this.fg&50331648)===0}isBgDefault(){return(this.bg&50331648)===0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(this.fg&50331648){case 16777216:case 33554432:return this.fg&255;case 50331648:return this.fg&16777215;default:return-1}}getBgColor(){switch(this.bg&50331648){case 16777216:case 33554432:return this.bg&255;case 50331648:return this.bg&16777215;default:return-1}}hasExtendedAttrs(){return this.bg&268435456}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(this.bg&268435456&&~this.extended.underlineColor)switch(this.extended.underlineColor&50331648){case 16777216:case 33554432:return this.extended.underlineColor&255;case 50331648:return this.extended.underlineColor&16777215;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return this.bg&268435456&&~this.extended.underlineColor?this.extended.underlineColor&50331648:this.getFgColorMode()}isUnderlineColorRGB(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===50331648:this.isFgRGB()}isUnderlineColorPalette(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===16777216||(this.extended.underlineColor&50331648)===33554432:this.isFgPalette()}isUnderlineColorDefault(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===0:this.isFgDefault()}getUnderlineStyle(){return this.fg&268435456?this.bg&268435456?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}},si=class t{constructor(i=0,r=0){this._ext=0,this._urlId=0,this._ext=i,this._urlId=r}get ext(){return this._urlId?this._ext&-469762049|this.underlineStyle<<26:this._ext}set ext(i){this._ext=i}get underlineStyle(){return this._urlId?5:(this._ext&469762048)>>26}set underlineStyle(i){this._ext&=-469762049,this._ext|=i<<26&469762048}get underlineColor(){return this._ext&67108863}set underlineColor(i){this._ext&=-67108864,this._ext|=i&67108863}get urlId(){return this._urlId}set urlId(i){this._urlId=i}get underlineVariantOffset(){let i=(this._ext&3758096384)>>29;return i<0?i^4294967288:i}set underlineVariantOffset(i){this._ext&=536870911,this._ext|=i<<29&3758096384}clone(){return new t(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}},Te=class t extends Wt{constructor(){super(...arguments);this.content=0,this.fg=0,this.bg=0,this.extended=new si,this.combinedData=""}static fromCharData(i){let r=new t;return r.setFromCharData(i),r}isCombined(){return this.content&2097152}getWidth(){return this.content>>22}getChars(){return this.content&2097152?this.combinedData:this.content&2097151?Qe(this.content&2097151):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):this.content&2097151}setFromCharData(i){this.fg=i[0],this.bg=0;let r=!1;if(i[1].length>2)r=!0;else if(i[1].length===2){let h=i[1].charCodeAt(0);if(55296<=h&&h<=56319){let l=i[1].charCodeAt(1);56320<=l&&l<=57343?this.content=(h-55296)*1024+l-56320+65536|i[2]<<22:r=!0}else r=!0}else this.content=i[1].charCodeAt(0)|i[2]<<22;r&&(this.combinedData=i[1],this.content=2097152|i[2]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},ks="di$target",Ni="di$dependencies",Si=new Map;function kn(t){return t[Ni]||[]}function pe(t){if(Si.has(t))return Si.get(t);let i=function(r,h,l){if(arguments.length!==3)throw Error("@IServiceName-decorator can only be used to decorate a parameter");En(i,r,l)};return i._id=t,Si.set(t,i),i}function En(t,i,r){i[ks]===i?i[Ni].push({id:t,index:r}):(i[Ni]=[{id:t,index:r}],i[ks]=i)}var ye=pe("BufferService"),Rr=pe("CoreMouseService"),dt=pe("CoreService"),Dn=pe("CharsetService"),ds=pe("InstantiationService"),Lr=pe("LogService"),Ce=pe("OptionsService"),Mr=pe("OscLinkService"),Bn=pe("UnicodeService"),zt=pe("DecorationService"),Hi=class{constructor(t,i,r){this._bufferService=t,this._optionsService=i,this._oscLinkService=r}provideLinks(t,i){let r=this._bufferService.buffer.lines.get(t-1);if(!r){i(void 0);return}let h=[],l=this._optionsService.rawOptions.linkHandler,c=new Te,d=r.getTrimmedLength(),_=-1,f=-1,u=!1;for(let g=0;g<d;g++)if(!(f===-1&&!r.hasContent(g))){if(r.loadCell(g,c),c.hasExtendedAttrs()&&c.extended.urlId)if(f===-1){f=g,_=c.extended.urlId;continue}else u=c.extended.urlId!==_;else f!==-1&&(u=!0);if(u||f!==-1&&g===d-1){let p=this._oscLinkService.getLinkData(_)?.uri;if(p){let v={start:{x:f+1,y:t},end:{x:g+(!u&&g===d-1?1:0),y:t}},S=!1;if(!l?.allowNonHttpProtocols)try{let m=new URL(p);["http:","https:"].includes(m.protocol)||(S=!0)}catch{S=!0}S||h.push({text:p,range:v,activate:(m,w)=>l?l.activate(m,w,v):Rn(m,w),hover:(m,w)=>l?.hover?.(m,w,v),leave:(m,w)=>l?.leave?.(m,w,v)})}u=!1,c.hasExtendedAttrs()&&c.extended.urlId?(f=g,_=c.extended.urlId):(f=-1,_=-1)}}i(h)}};Hi=te([M(0,ye),M(1,Ce),M(2,Mr)],Hi);function Rn(t,i){if(confirm(`Do you want to navigate to ${i}?
|
|
2
2
|
|
|
3
3
|
WARNING: This link could potentially be dangerous`)){let r=window.open();if(r){try{r.opener=null}catch{}r.location.href=i}else console.warn("Opening link blocked as opener could not be cleared")}}var _i=pe("CharSizeService"),qe=pe("CoreBrowserService"),us=pe("MouseService"),Ve=pe("RenderService"),Ln=pe("SelectionService"),Tr=pe("CharacterJoinerService"),pt=pe("ThemeService"),Pr=pe("LinkProviderService"),Mn=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(t){setTimeout(()=>{throw t.stack?Es.isErrorNoTelemetry(t)?new Es(t.message+`
|
|
4
4
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|