claude-mux 0.30.13 → 0.30.14
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/CLAUDE.md +14 -3
- package/dist/fleet-places.d.ts +7 -1
- package/dist/fleet-places.d.ts.map +1 -1
- package/dist/fleet-places.js +14 -1
- package/dist/fleet-places.js.map +1 -1
- package/dist/server/dictation-marks.d.ts.map +1 -1
- package/dist/server/dictation-marks.js +23 -1
- package/dist/server/dictation-marks.js.map +1 -1
- package/dist/transcript/parser.d.ts +7 -0
- package/dist/transcript/parser.d.ts.map +1 -1
- package/dist/transcript/parser.js +19 -3
- package/dist/transcript/parser.js.map +1 -1
- package/dist/transcript/past-sessions.d.ts.map +1 -1
- package/dist/transcript/past-sessions.js +4 -1
- package/dist/transcript/past-sessions.js.map +1 -1
- package/dist/utils/version.d.ts +1 -1
- package/dist/utils/version.js +1 -1
- package/dist/web/client/_app/immutable/chunks/{sULMfRFG.js → B4FaHfAQ.js} +2 -2
- package/dist/web/client/_app/immutable/chunks/{sULMfRFG.js.map → B4FaHfAQ.js.map} +1 -1
- package/dist/web/client/_app/immutable/chunks/{W5_HMZ5E.js → B5Hkb2u5.js} +2 -2
- package/dist/web/client/_app/immutable/chunks/{W5_HMZ5E.js.map → B5Hkb2u5.js.map} +1 -1
- package/{web/.svelte-kit/output/client/_app/immutable/chunks/BQzv8cqz.js → dist/web/client/_app/immutable/chunks/BOpEbBRb.js} +2 -2
- package/{web/.svelte-kit/output/client/_app/immutable/chunks/BQzv8cqz.js.map → dist/web/client/_app/immutable/chunks/BOpEbBRb.js.map} +1 -1
- package/dist/web/client/_app/immutable/chunks/{Q5yhzux8.js → BeYjnogg.js} +2 -2
- package/{web/.svelte-kit/output/client/_app/immutable/chunks/Q5yhzux8.js.map → dist/web/client/_app/immutable/chunks/BeYjnogg.js.map} +1 -1
- package/dist/web/client/_app/immutable/chunks/{VceCNUd7.js → C00rm3mY.js} +2 -2
- package/{web/.svelte-kit/output/client/_app/immutable/chunks/VceCNUd7.js.map → dist/web/client/_app/immutable/chunks/C00rm3mY.js.map} +1 -1
- package/dist/web/client/_app/immutable/chunks/{CtjkAirr.js → CKg7gbPm.js} +9 -9
- package/dist/web/client/_app/immutable/chunks/CKg7gbPm.js.map +1 -0
- package/dist/web/client/_app/immutable/chunks/CPEphjdk.js +4 -0
- package/dist/web/client/_app/immutable/chunks/CPEphjdk.js.map +1 -0
- package/dist/web/client/_app/immutable/chunks/{BQQ3-rqs.js → CPlFo88J.js} +2 -2
- package/dist/web/client/_app/immutable/chunks/{BQQ3-rqs.js.map → CPlFo88J.js.map} +1 -1
- package/dist/web/client/_app/immutable/chunks/{BvX4FYxp.js → CtnjySwS.js} +2 -2
- package/dist/web/client/_app/immutable/chunks/{BvX4FYxp.js.map → CtnjySwS.js.map} +1 -1
- package/dist/web/client/_app/immutable/chunks/{XgSsj0QY.js → D3EW0jRH.js} +2 -2
- package/{web/.svelte-kit/output/client/_app/immutable/chunks/XgSsj0QY.js.map → dist/web/client/_app/immutable/chunks/D3EW0jRH.js.map} +1 -1
- package/dist/web/client/_app/immutable/chunks/{CtlIfY1C.js → D3umr-Qr.js} +2 -2
- package/{web/.svelte-kit/output/client/_app/immutable/chunks/CtlIfY1C.js.map → dist/web/client/_app/immutable/chunks/D3umr-Qr.js.map} +1 -1
- package/dist/web/client/_app/immutable/chunks/{CM0CI9GL.js → D8-_Y-M6.js} +3 -3
- package/dist/web/client/_app/immutable/chunks/{CM0CI9GL.js.map → D8-_Y-M6.js.map} +1 -1
- package/dist/web/client/_app/immutable/chunks/{cvsGFvDx.js → DDvK7Qo9.js} +2 -2
- package/{web/.svelte-kit/output/client/_app/immutable/chunks/cvsGFvDx.js.map → dist/web/client/_app/immutable/chunks/DDvK7Qo9.js.map} +1 -1
- package/dist/web/client/_app/immutable/chunks/{CiU8KBun.js → _VFi-7U7.js} +2 -2
- package/dist/web/client/_app/immutable/chunks/{CiU8KBun.js.map → _VFi-7U7.js.map} +1 -1
- package/dist/web/client/_app/immutable/chunks/{DlENCZqZ.js → mQ6hkLuy.js} +2 -2
- package/dist/web/client/_app/immutable/chunks/{DlENCZqZ.js.map → mQ6hkLuy.js.map} +1 -1
- package/dist/web/client/_app/immutable/entry/{app.BwTbN8wB.js → app.CTFza_OS.js} +3 -3
- package/{web/.svelte-kit/output/client/_app/immutable/entry/app.BwTbN8wB.js.map → dist/web/client/_app/immutable/entry/app.CTFza_OS.js.map} +1 -1
- package/dist/web/client/_app/immutable/entry/start.B-zlkyrt.js +2 -0
- package/dist/web/client/_app/immutable/entry/start.B-zlkyrt.js.map +1 -0
- package/{web/.svelte-kit/output/client/_app/immutable/nodes/0.BnHV-ElR.js → dist/web/client/_app/immutable/nodes/0.Cztuq8Ih.js} +2 -2
- package/dist/web/client/_app/immutable/nodes/{0.BnHV-ElR.js.map → 0.Cztuq8Ih.js.map} +1 -1
- package/dist/web/client/_app/immutable/nodes/{1.Dc3ryOCf.js → 1.BOOL0V7K.js} +2 -2
- package/dist/web/client/_app/immutable/nodes/{1.Dc3ryOCf.js.map → 1.BOOL0V7K.js.map} +1 -1
- package/dist/web/client/_app/immutable/nodes/{2.DUrpAceY.js → 2.CArUpZNe.js} +2 -2
- package/dist/web/client/_app/immutable/nodes/{2.DUrpAceY.js.map → 2.CArUpZNe.js.map} +1 -1
- package/dist/web/client/_app/immutable/nodes/{3.BaCofjAn.js → 3.DSvIWalA.js} +2 -2
- package/dist/web/client/_app/immutable/nodes/{3.BaCofjAn.js.map → 3.DSvIWalA.js.map} +1 -1
- package/dist/web/client/_app/immutable/nodes/{4.v1wYkrvS.js → 4.H6RMG_cy.js} +2 -2
- package/dist/web/client/_app/immutable/nodes/{4.v1wYkrvS.js.map → 4.H6RMG_cy.js.map} +1 -1
- package/dist/web/client/_app/immutable/nodes/{5.Bn4A77jK.js → 5.BHSt0Suo.js} +2 -2
- package/dist/web/client/_app/immutable/nodes/{5.Bn4A77jK.js.map → 5.BHSt0Suo.js.map} +1 -1
- package/dist/web/client/_app/immutable/nodes/{6.C2hEoITj.js → 6.CzLoA0w7.js} +2 -2
- package/dist/web/client/_app/immutable/nodes/{6.C2hEoITj.js.map → 6.CzLoA0w7.js.map} +1 -1
- package/dist/web/client/_app/immutable/nodes/{7.BcHOjWdp.js → 7.fqq2vVa9.js} +2 -2
- package/dist/web/client/_app/immutable/nodes/{7.BcHOjWdp.js.map → 7.fqq2vVa9.js.map} +1 -1
- package/dist/web/client/_app/immutable/nodes/{8.D7NtqIYy.js → 8.DNFFjTla.js} +2 -2
- package/dist/web/client/_app/immutable/nodes/{8.D7NtqIYy.js.map → 8.DNFFjTla.js.map} +1 -1
- package/dist/web/client/_app/immutable/nodes/{9.D-211z9-.js → 9.0kMPrp2-.js} +2 -2
- package/dist/web/client/_app/immutable/nodes/{9.D-211z9-.js.map → 9.0kMPrp2-.js.map} +1 -1
- package/dist/web/client/_app/version.json +1 -1
- package/dist/web/server/chunks/{0-CvglVGCY.js → 0-B_KxXX-N.js} +14 -14
- package/dist/web/server/chunks/{0-CvglVGCY.js.map → 0-B_KxXX-N.js.map} +1 -1
- package/dist/web/server/chunks/{1-D-gJDFrG.js → 1-BmEKuUDK.js} +4 -4
- package/dist/web/server/chunks/{1-D-gJDFrG.js.map → 1-BmEKuUDK.js.map} +1 -1
- package/dist/web/server/chunks/{2-BCmEU5Qq.js → 2-BJ3dzws2.js} +13 -13
- package/dist/web/server/chunks/{2-BCmEU5Qq.js.map → 2-BJ3dzws2.js.map} +1 -1
- package/dist/web/server/chunks/{3-CHn5Kw-T.js → 3-CLYKGzT3.js} +10 -10
- package/dist/web/server/chunks/{3-CHn5Kw-T.js.map → 3-CLYKGzT3.js.map} +1 -1
- package/dist/web/server/chunks/{4-Cxg7VcZ7.js → 4-CsoWHVgX.js} +12 -12
- package/dist/web/server/chunks/{4-Cxg7VcZ7.js.map → 4-CsoWHVgX.js.map} +1 -1
- package/dist/web/server/chunks/{5-DSgvnHF_.js → 5-oPM6ncgT.js} +9 -9
- package/dist/web/server/chunks/{5-DSgvnHF_.js.map → 5-oPM6ncgT.js.map} +1 -1
- package/dist/web/server/chunks/{6-B0rymWRR.js → 6-gvgju2ZN.js} +5 -5
- package/dist/web/server/chunks/{6-B0rymWRR.js.map → 6-gvgju2ZN.js.map} +1 -1
- package/dist/web/server/chunks/{7-CNomBJux.js → 7-D8hylKrz.js} +10 -10
- package/dist/web/server/chunks/{7-CNomBJux.js.map → 7-D8hylKrz.js.map} +1 -1
- package/dist/web/server/chunks/{8-TYbX-1bO.js → 8-Br4hTtby.js} +12 -12
- package/dist/web/server/chunks/{8-TYbX-1bO.js.map → 8-Br4hTtby.js.map} +1 -1
- package/dist/web/server/chunks/{9-XGQQvTLc.js → 9-9uvmfsEs.js} +9 -9
- package/dist/web/server/chunks/{9-XGQQvTLc.js.map → 9-9uvmfsEs.js.map} +1 -1
- package/dist/web/server/chunks/{_layout.svelte-yrPX5VFm.js → _layout.svelte-DamAAFpK.js} +58 -37
- package/dist/web/server/chunks/_layout.svelte-DamAAFpK.js.map +1 -0
- package/dist/web/server/chunks/{_page.svelte-C_kFA0Lq.js → _page.svelte-DFE4jmT9.js} +4 -4
- package/dist/web/server/chunks/{_page.svelte-C_kFA0Lq.js.map → _page.svelte-DFE4jmT9.js.map} +1 -1
- package/dist/web/server/chunks/{_page.svelte-DvxpwsgS.js → _page.svelte-DHPGbCS1.js} +6 -6
- package/dist/web/server/chunks/{_page.svelte-DvxpwsgS.js.map → _page.svelte-DHPGbCS1.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-Dz01Gvhk.js → _server.ts-0RT4n9LX.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-Dz01Gvhk.js.map → _server.ts-0RT4n9LX.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-D2Tvcncu.js → _server.ts-3kbpguQ1.js} +3 -3
- package/dist/web/server/chunks/{_server.ts-D2Tvcncu.js.map → _server.ts-3kbpguQ1.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-TN_Ka6cR.js → _server.ts-4m17ESHV.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-TN_Ka6cR.js.map → _server.ts-4m17ESHV.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-Bj1Eewby.js → _server.ts-8Bs2jUgD.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-Bj1Eewby.js.map → _server.ts-8Bs2jUgD.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-BWVtnpJh.js → _server.ts-95cbXKdT.js} +3 -3
- package/dist/web/server/chunks/{_server.ts-BWVtnpJh.js.map → _server.ts-95cbXKdT.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-CyOA1rOq.js → _server.ts-B56-XF-Z.js} +3 -3
- package/dist/web/server/chunks/{_server.ts-CyOA1rOq.js.map → _server.ts-B56-XF-Z.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-1ZhqL5o8.js → _server.ts-BAC_No-1.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-1ZhqL5o8.js.map → _server.ts-BAC_No-1.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-ji7L8HUR.js → _server.ts-BCpfYsYw.js} +3 -3
- package/dist/web/server/chunks/{_server.ts-ji7L8HUR.js.map → _server.ts-BCpfYsYw.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-9iRpDv9e.js → _server.ts-BGToJuLp.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-9iRpDv9e.js.map → _server.ts-BGToJuLp.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-DQJ-tygD.js → _server.ts-BW87LYkE.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-DQJ-tygD.js.map → _server.ts-BW87LYkE.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-VgbTPrqV.js → _server.ts-BXjUy61V.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-VgbTPrqV.js.map → _server.ts-BXjUy61V.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-FoPsfjo3.js → _server.ts-BYyaN7ik.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-FoPsfjo3.js.map → _server.ts-BYyaN7ik.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-CNBy2p2U.js → _server.ts-Bjzi1JAu.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-CNBy2p2U.js.map → _server.ts-Bjzi1JAu.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-CSK1ReRS.js → _server.ts-CBU5vhD8.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-CSK1ReRS.js.map → _server.ts-CBU5vhD8.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-Cv8SUkC5.js → _server.ts-CG-7TORV.js} +3 -3
- package/dist/web/server/chunks/{_server.ts-Cv8SUkC5.js.map → _server.ts-CG-7TORV.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-DPctaiWC.js → _server.ts-COCrEIiW.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-DPctaiWC.js.map → _server.ts-COCrEIiW.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-C7uhdF7Y.js → _server.ts-CPCsEz_B.js} +4 -4
- package/dist/web/server/chunks/{_server.ts-C7uhdF7Y.js.map → _server.ts-CPCsEz_B.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-DsyqZudf.js → _server.ts-CPGa_LDW.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-DsyqZudf.js.map → _server.ts-CPGa_LDW.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-B9RfKfyc.js → _server.ts-CT1m86tm.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-B9RfKfyc.js.map → _server.ts-CT1m86tm.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-CwFbAWCg.js → _server.ts-CXzAFIps.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-CwFbAWCg.js.map → _server.ts-CXzAFIps.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-DHuyjZQx.js → _server.ts-C_H2gKKu.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-DHuyjZQx.js.map → _server.ts-C_H2gKKu.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-DVgdt6Zu.js → _server.ts-CjH9MxGk.js} +3 -3
- package/dist/web/server/chunks/{_server.ts-DVgdt6Zu.js.map → _server.ts-CjH9MxGk.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-DrFiP32b.js → _server.ts-CrQk3PtI.js} +3 -3
- package/dist/web/server/chunks/{_server.ts-DrFiP32b.js.map → _server.ts-CrQk3PtI.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-CA8nszPb.js → _server.ts-Cy5Matw4.js} +3 -3
- package/dist/web/server/chunks/{_server.ts-CA8nszPb.js.map → _server.ts-Cy5Matw4.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-CovkmnvY.js → _server.ts-D9PPu5p4.js} +3 -3
- package/dist/web/server/chunks/{_server.ts-CovkmnvY.js.map → _server.ts-D9PPu5p4.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-vhti5VvF.js → _server.ts-DGvNQ4Mq.js} +3 -3
- package/dist/web/server/chunks/{_server.ts-vhti5VvF.js.map → _server.ts-DGvNQ4Mq.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-iK8ih9Bi.js → _server.ts-DJOSnwXV.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-iK8ih9Bi.js.map → _server.ts-DJOSnwXV.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-DK-6ddNq.js → _server.ts-DPoluZc6.js} +3 -3
- package/dist/web/server/chunks/{_server.ts-DK-6ddNq.js.map → _server.ts-DPoluZc6.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-BozsVs8t.js → _server.ts-DS6kibxL.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-BozsVs8t.js.map → _server.ts-DS6kibxL.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-DozhhYwq.js → _server.ts-DUl0ucUP.js} +3 -3
- package/dist/web/server/chunks/{_server.ts-DozhhYwq.js.map → _server.ts-DUl0ucUP.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-78nODRDJ.js → _server.ts-DWj22oj9.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-78nODRDJ.js.map → _server.ts-DWj22oj9.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-CA1j9wWk.js → _server.ts-DZrVaelC.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-CA1j9wWk.js.map → _server.ts-DZrVaelC.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-CzcknkWq.js → _server.ts-DrG3j6Ao.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-CzcknkWq.js.map → _server.ts-DrG3j6Ao.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-AAllMdwT.js → _server.ts-Dwy38J9J.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-AAllMdwT.js.map → _server.ts-Dwy38J9J.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-CgChlIKq.js → _server.ts-DxGjRezI.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-CgChlIKq.js.map → _server.ts-DxGjRezI.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-KbQyErIR.js → _server.ts-XMUjHO61.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-KbQyErIR.js.map → _server.ts-XMUjHO61.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-DGTSZoLn.js → _server.ts-dvT2bXEB.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-DGTSZoLn.js.map → _server.ts-dvT2bXEB.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-BxscGs8D.js → _server.ts-m835uDm6.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-BxscGs8D.js.map → _server.ts-m835uDm6.js.map} +1 -1
- package/dist/web/server/chunks/{checkbox-DiJTAtHi.js → checkbox-BYzlWW56.js} +2 -2
- package/dist/web/server/chunks/{checkbox-DiJTAtHi.js.map → checkbox-BYzlWW56.js.map} +1 -1
- package/dist/web/server/chunks/{create-id-DpoSQWrl.js → create-id-s6T_m-1j.js} +3 -3
- package/dist/web/server/chunks/{create-id-DpoSQWrl.js.map → create-id-s6T_m-1j.js.map} +1 -1
- package/dist/web/server/chunks/{discover-DjR28OqK.js → discover-DykzHz0t.js} +2 -2
- package/dist/web/server/chunks/{discover-DjR28OqK.js.map → discover-DykzHz0t.js.map} +1 -1
- package/dist/web/server/chunks/{drafts.svelte-DsFAtH-s.js → drafts.svelte-c94J-DBB.js} +3 -3
- package/dist/web/server/chunks/{drafts.svelte-DsFAtH-s.js.map → drafts.svelte-c94J-DBB.js.map} +1 -1
- package/dist/web/server/chunks/{end-session-BbBa9yD0.js → end-session-Czy_WW42.js} +2 -2
- package/dist/web/server/chunks/{end-session-BbBa9yD0.js.map → end-session-Czy_WW42.js.map} +1 -1
- package/dist/web/server/chunks/{files-4i3igWea.js → files-DNH191y7.js} +2 -2
- package/dist/web/server/chunks/{files-4i3igWea.js.map → files-DNH191y7.js.map} +1 -1
- package/dist/web/server/chunks/{fleet-DZJSFWuH.js → fleet-CWHlZjSd.js} +4 -4
- package/dist/web/server/chunks/{fleet-DZJSFWuH.js.map → fleet-CWHlZjSd.js.map} +1 -1
- package/dist/web/server/chunks/{git-D9dLEKUF.js → git-CHO9UIOQ.js} +13 -5
- package/dist/web/server/chunks/git-CHO9UIOQ.js.map +1 -0
- package/dist/web/server/chunks/{git-history-De9t0yF-.js → git-history-CxyH4jQb.js} +2 -2
- package/dist/web/server/chunks/{git-history-De9t0yF-.js.map → git-history-CxyH4jQb.js.map} +1 -1
- package/dist/web/server/chunks/{hooks.server-C3Uglne7.js → hooks.server-DgHxEf6H.js} +6 -6
- package/dist/web/server/chunks/{hooks.server-C3Uglne7.js.map → hooks.server-DgHxEf6H.js.map} +1 -1
- package/dist/web/server/chunks/{message-queue-sFcJCRjz.js → message-queue-DhLshpoF.js} +13 -2
- package/dist/web/server/chunks/message-queue-DhLshpoF.js.map +1 -0
- package/dist/web/server/chunks/{project-CbPa8Mu7.js → project-CBPdIh2n.js} +2 -2
- package/dist/web/server/chunks/{project-CbPa8Mu7.js.map → project-CBPdIh2n.js.map} +1 -1
- package/dist/web/server/chunks/{project-icons-CSb1bfT9.js → project-icons-bWhaFSVy.js} +4 -4
- package/dist/web/server/chunks/{project-icons-CSb1bfT9.js.map → project-icons-bWhaFSVy.js.map} +1 -1
- package/dist/web/server/chunks/{push-BJ7P9DGd.js → push-LMlCp4Lc.js} +5 -5
- package/dist/web/server/chunks/{push-BJ7P9DGd.js.map → push-LMlCp4Lc.js.map} +1 -1
- package/dist/web/server/chunks/{remote-control-C1d9R3w4.js → remote-control-BvYkVDhx.js} +2 -2
- package/dist/web/server/chunks/{remote-control-C1d9R3w4.js.map → remote-control-BvYkVDhx.js.map} +1 -1
- package/dist/web/server/chunks/{start-session-CKbupnLS.js → start-session-HljgutDe.js} +3 -3
- package/dist/web/server/chunks/{start-session-CKbupnLS.js.map → start-session-HljgutDe.js.map} +1 -1
- package/dist/web/server/chunks/{version-BqEJmw2g.js → version-ox9yLZ0P.js} +2 -2
- package/dist/web/server/chunks/version-ox9yLZ0P.js.map +1 -0
- package/dist/web/server/chunks/{web-preview-Bi5fjydK.js → web-preview-H5eiWlBD.js} +2 -2
- package/dist/web/server/chunks/{web-preview-Bi5fjydK.js.map → web-preview-H5eiWlBD.js.map} +1 -1
- package/dist/web/server/chunks/{ws-handlers-zemeJ8Si.js → ws-handlers-k_sOue-0.js} +6 -5
- package/dist/web/server/chunks/ws-handlers-k_sOue-0.js.map +1 -0
- package/dist/web/server/chunks/{ws-managers-C5VXKb_r.js → ws-managers-D2qC6Gla.js} +2 -2
- package/dist/web/server/chunks/{ws-managers-C5VXKb_r.js.map → ws-managers-D2qC6Gla.js.map} +1 -1
- package/dist/web/server/chunks/{ws-messages-jOSwT1Yq.js → ws-messages-B81v2RXg.js} +7 -2
- package/dist/web/server/chunks/ws-messages-B81v2RXg.js.map +1 -0
- package/dist/web/server/index.js +2 -2
- package/dist/web/server/index.js.map +1 -1
- package/dist/web/server/manifest.js +53 -53
- package/dist/web/server/manifest.js.map +1 -1
- package/package.json +1 -1
- package/src/fleet-places.ts +17 -1
- package/src/server/dictation-marks.ts +24 -1
- package/src/transcript/parser.ts +20 -3
- package/src/transcript/past-sessions.ts +3 -1
- package/src/utils/version.ts +1 -1
- package/tests/fleet-places.test.ts +20 -0
- package/tests/server/dictation-marks.test.ts +16 -0
- package/tests/transcript/parser.test.ts +34 -0
- package/tests/transcript/past-sessions.test.ts +5 -0
- package/web/.svelte-kit/adapter-bun/chunks/git.js +13 -4
- package/web/.svelte-kit/adapter-bun/chunks/git.js.map +1 -1
- package/web/.svelte-kit/adapter-bun/chunks/internal2.js +1 -1
- package/web/.svelte-kit/adapter-bun/chunks/internal2.js.map +1 -1
- package/web/.svelte-kit/adapter-bun/chunks/message-queue.js +14 -1
- package/web/.svelte-kit/adapter-bun/chunks/message-queue.js.map +1 -1
- package/web/.svelte-kit/adapter-bun/chunks/version.js +1 -1
- package/web/.svelte-kit/adapter-bun/chunks/version.js.map +1 -1
- package/web/.svelte-kit/adapter-bun/chunks/ws-handlers.js +2 -1
- package/web/.svelte-kit/adapter-bun/chunks/ws-handlers.js.map +1 -1
- package/web/.svelte-kit/adapter-bun/chunks/ws-messages.js +6 -1
- package/web/.svelte-kit/adapter-bun/chunks/ws-messages.js.map +1 -1
- package/web/.svelte-kit/adapter-bun/entries/pages/_layout.svelte.js +72 -45
- package/web/.svelte-kit/adapter-bun/entries/pages/_layout.svelte.js.map +1 -1
- package/web/.svelte-kit/adapter-bun/manifest-full.js +1 -1
- package/web/.svelte-kit/adapter-bun/manifest.js +1 -1
- package/web/.svelte-kit/adapter-bun/nodes/0.js +1 -1
- package/web/.svelte-kit/adapter-bun/nodes/1.js +1 -1
- package/web/.svelte-kit/adapter-bun/nodes/2.js +1 -1
- package/web/.svelte-kit/adapter-bun/nodes/3.js +1 -1
- package/web/.svelte-kit/adapter-bun/nodes/4.js +1 -1
- package/web/.svelte-kit/adapter-bun/nodes/5.js +1 -1
- package/web/.svelte-kit/adapter-bun/nodes/6.js +1 -1
- package/web/.svelte-kit/adapter-bun/nodes/7.js +1 -1
- package/web/.svelte-kit/adapter-bun/nodes/8.js +1 -1
- package/web/.svelte-kit/adapter-bun/nodes/9.js +1 -1
- package/web/.svelte-kit/generated/server/internal.js +1 -1
- package/web/.svelte-kit/output/client/.vite/manifest.json +237 -237
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{sULMfRFG.js → B4FaHfAQ.js} +2 -2
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{sULMfRFG.js.map → B4FaHfAQ.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{W5_HMZ5E.js → B5Hkb2u5.js} +2 -2
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{W5_HMZ5E.js.map → B5Hkb2u5.js.map} +1 -1
- package/{dist/web/client/_app/immutable/chunks/BQzv8cqz.js → web/.svelte-kit/output/client/_app/immutable/chunks/BOpEbBRb.js} +2 -2
- package/{dist/web/client/_app/immutable/chunks/BQzv8cqz.js.map → web/.svelte-kit/output/client/_app/immutable/chunks/BOpEbBRb.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{Q5yhzux8.js → BeYjnogg.js} +2 -2
- package/{dist/web/client/_app/immutable/chunks/Q5yhzux8.js.map → web/.svelte-kit/output/client/_app/immutable/chunks/BeYjnogg.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{VceCNUd7.js → C00rm3mY.js} +2 -2
- package/{dist/web/client/_app/immutable/chunks/VceCNUd7.js.map → web/.svelte-kit/output/client/_app/immutable/chunks/C00rm3mY.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{CtjkAirr.js → CKg7gbPm.js} +9 -9
- package/web/.svelte-kit/output/client/_app/immutable/chunks/CKg7gbPm.js.map +1 -0
- package/web/.svelte-kit/output/client/_app/immutable/chunks/CPEphjdk.js +4 -0
- package/web/.svelte-kit/output/client/_app/immutable/chunks/CPEphjdk.js.map +1 -0
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{BQQ3-rqs.js → CPlFo88J.js} +2 -2
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{BQQ3-rqs.js.map → CPlFo88J.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{BvX4FYxp.js → CtnjySwS.js} +2 -2
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{BvX4FYxp.js.map → CtnjySwS.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{XgSsj0QY.js → D3EW0jRH.js} +2 -2
- package/{dist/web/client/_app/immutable/chunks/XgSsj0QY.js.map → web/.svelte-kit/output/client/_app/immutable/chunks/D3EW0jRH.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{CtlIfY1C.js → D3umr-Qr.js} +2 -2
- package/{dist/web/client/_app/immutable/chunks/CtlIfY1C.js.map → web/.svelte-kit/output/client/_app/immutable/chunks/D3umr-Qr.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{CM0CI9GL.js → D8-_Y-M6.js} +3 -3
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{CM0CI9GL.js.map → D8-_Y-M6.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{cvsGFvDx.js → DDvK7Qo9.js} +2 -2
- package/{dist/web/client/_app/immutable/chunks/cvsGFvDx.js.map → web/.svelte-kit/output/client/_app/immutable/chunks/DDvK7Qo9.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{CiU8KBun.js → _VFi-7U7.js} +2 -2
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{CiU8KBun.js.map → _VFi-7U7.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{DlENCZqZ.js → mQ6hkLuy.js} +2 -2
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{DlENCZqZ.js.map → mQ6hkLuy.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/entry/{app.BwTbN8wB.js → app.CTFza_OS.js} +3 -3
- package/{dist/web/client/_app/immutable/entry/app.BwTbN8wB.js.map → web/.svelte-kit/output/client/_app/immutable/entry/app.CTFza_OS.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/entry/start.B-zlkyrt.js +2 -0
- package/web/.svelte-kit/output/client/_app/immutable/entry/start.B-zlkyrt.js.map +1 -0
- package/{dist/web/client/_app/immutable/nodes/0.BnHV-ElR.js → web/.svelte-kit/output/client/_app/immutable/nodes/0.Cztuq8Ih.js} +2 -2
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{0.BnHV-ElR.js.map → 0.Cztuq8Ih.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{1.Dc3ryOCf.js → 1.BOOL0V7K.js} +2 -2
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{1.Dc3ryOCf.js.map → 1.BOOL0V7K.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{2.DUrpAceY.js → 2.CArUpZNe.js} +2 -2
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{2.DUrpAceY.js.map → 2.CArUpZNe.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{3.BaCofjAn.js → 3.DSvIWalA.js} +2 -2
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{3.BaCofjAn.js.map → 3.DSvIWalA.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/nodes/4.H6RMG_cy.js +2 -0
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{4.v1wYkrvS.js.map → 4.H6RMG_cy.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/nodes/5.BHSt0Suo.js +2 -0
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{5.Bn4A77jK.js.map → 5.BHSt0Suo.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{6.C2hEoITj.js → 6.CzLoA0w7.js} +2 -2
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{6.C2hEoITj.js.map → 6.CzLoA0w7.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{7.BcHOjWdp.js → 7.fqq2vVa9.js} +2 -2
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{7.BcHOjWdp.js.map → 7.fqq2vVa9.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/nodes/8.DNFFjTla.js +2 -0
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{8.D7NtqIYy.js.map → 8.DNFFjTla.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/nodes/9.0kMPrp2-.js +2 -0
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{9.D-211z9-.js.map → 9.0kMPrp2-.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/version.json +1 -1
- package/web/.svelte-kit/output/server/chunks/git.js +13 -4
- package/web/.svelte-kit/output/server/chunks/git.js.map +1 -1
- package/web/.svelte-kit/output/server/chunks/internal2.js +1 -1
- package/web/.svelte-kit/output/server/chunks/internal2.js.map +1 -1
- package/web/.svelte-kit/output/server/chunks/message-queue.js +14 -1
- package/web/.svelte-kit/output/server/chunks/message-queue.js.map +1 -1
- package/web/.svelte-kit/output/server/chunks/version.js +1 -1
- package/web/.svelte-kit/output/server/chunks/version.js.map +1 -1
- package/web/.svelte-kit/output/server/chunks/ws-handlers.js +2 -1
- package/web/.svelte-kit/output/server/chunks/ws-handlers.js.map +1 -1
- package/web/.svelte-kit/output/server/chunks/ws-messages.js +6 -1
- package/web/.svelte-kit/output/server/chunks/ws-messages.js.map +1 -1
- package/web/.svelte-kit/output/server/entries/pages/_layout.svelte.js +72 -45
- package/web/.svelte-kit/output/server/entries/pages/_layout.svelte.js.map +1 -1
- package/web/.svelte-kit/output/server/manifest-full.js +1 -1
- package/web/.svelte-kit/output/server/manifest.js +1 -1
- package/web/.svelte-kit/output/server/nodes/0.js +1 -1
- package/web/.svelte-kit/output/server/nodes/1.js +1 -1
- package/web/.svelte-kit/output/server/nodes/2.js +1 -1
- package/web/.svelte-kit/output/server/nodes/3.js +1 -1
- package/web/.svelte-kit/output/server/nodes/4.js +1 -1
- package/web/.svelte-kit/output/server/nodes/5.js +1 -1
- package/web/.svelte-kit/output/server/nodes/6.js +1 -1
- package/web/.svelte-kit/output/server/nodes/7.js +1 -1
- package/web/.svelte-kit/output/server/nodes/8.js +1 -1
- package/web/.svelte-kit/output/server/nodes/9.js +1 -1
- package/web/src/lib/components/AllSessionsPanel.svelte +9 -1
- package/web/src/lib/components/FolderPicker.svelte +49 -21
- package/dist/web/client/_app/immutable/chunks/CtjkAirr.js.map +0 -1
- package/dist/web/client/_app/immutable/chunks/Dck--FBb.js +0 -4
- package/dist/web/client/_app/immutable/chunks/Dck--FBb.js.map +0 -1
- package/dist/web/client/_app/immutable/entry/start.B2ZPizAt.js +0 -2
- package/dist/web/client/_app/immutable/entry/start.B2ZPizAt.js.map +0 -1
- package/dist/web/server/chunks/_layout.svelte-yrPX5VFm.js.map +0 -1
- package/dist/web/server/chunks/git-D9dLEKUF.js.map +0 -1
- package/dist/web/server/chunks/message-queue-sFcJCRjz.js.map +0 -1
- package/dist/web/server/chunks/version-BqEJmw2g.js.map +0 -1
- package/dist/web/server/chunks/ws-handlers-zemeJ8Si.js.map +0 -1
- package/dist/web/server/chunks/ws-messages-jOSwT1Yq.js.map +0 -1
- package/web/.svelte-kit/output/client/_app/immutable/chunks/CtjkAirr.js.map +0 -1
- package/web/.svelte-kit/output/client/_app/immutable/chunks/Dck--FBb.js +0 -4
- package/web/.svelte-kit/output/client/_app/immutable/chunks/Dck--FBb.js.map +0 -1
- package/web/.svelte-kit/output/client/_app/immutable/entry/start.B2ZPizAt.js +0 -2
- package/web/.svelte-kit/output/client/_app/immutable/entry/start.B2ZPizAt.js.map +0 -1
- package/web/.svelte-kit/output/client/_app/immutable/nodes/4.v1wYkrvS.js +0 -2
- package/web/.svelte-kit/output/client/_app/immutable/nodes/5.Bn4A77jK.js +0 -2
- package/web/.svelte-kit/output/client/_app/immutable/nodes/8.D7NtqIYy.js +0 -2
- package/web/.svelte-kit/output/client/_app/immutable/nodes/9.D-211z9-.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Q5yhzux8.js","sources":["../../../../../../../node_modules/.bun/svelte@5.57.3/node_modules/svelte/src/internal/client/dom/blocks/key.js","../../../../../../../node_modules/.bun/svelte@5.57.3/node_modules/svelte/src/internal/client/dom/blocks/html.js","../../../../../../../node_modules/.bun/svelte@5.57.3/node_modules/svelte/src/internal/client/dom/elements/actions.js","../../../../../../../node_modules/.bun/svelte@5.57.3/node_modules/svelte/src/internal/client/dom/elements/bindings/input.js","../../../../../../../node_modules/.bun/@sveltejs+kit@2.70.3+106f9c5330cbe027/node_modules/@sveltejs/kit/src/runtime/app/stores.js","../../../../../../src/lib/stores/drawer.svelte.ts","../../../../../../src/lib/components/SessionStateIndicator.svelte","../../../../../../src/lib/actions/longPress.ts","../../../../../../../node_modules/.bun/svelte@5.57.3/node_modules/svelte/src/reactivity/map.js","../../../../../../../node_modules/.bun/runed@0.35.1+ec0a64a97e9eb16b/node_modules/runed/dist/internal/utils/is.js","../../../../../../../node_modules/.bun/runed@0.35.1+ec0a64a97e9eb16b/node_modules/runed/dist/internal/utils/get.js","../../../../../../../node_modules/.bun/runed@0.35.1+ec0a64a97e9eb16b/node_modules/runed/dist/utilities/element-size/element-size.svelte.js","../../../../../../../node_modules/.bun/svelte-toolbelt@0.10.6+ec0a64a97e9eb16b/node_modules/svelte-toolbelt/dist/utils/on-destroy-effect.svelte.js","../../../../../../../node_modules/.bun/svelte-toolbelt@0.10.6+ec0a64a97e9eb16b/node_modules/svelte-toolbelt/dist/utils/after-tick.js","../../../../../../../node_modules/.bun/svelte-toolbelt@0.10.6+ec0a64a97e9eb16b/node_modules/svelte-toolbelt/dist/utils/dom.js","../../../../../../../node_modules/.bun/svelte-toolbelt@0.10.6+ec0a64a97e9eb16b/node_modules/svelte-toolbelt/dist/utils/dom-context.svelte.js","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/internal/animations-complete.js","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/internal/presence-manager.svelte.js","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/internal/noop.js","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/bits/utilities/portal/portal-consumer.svelte","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/bits/utilities/config/bits-config.js","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/bits/utilities/config/prop-resolvers.js","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/bits/utilities/portal/portal.svelte","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/internal/debounce.js","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/internal/elements.js","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/internal/dom.js","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/bits/menu/context-menu-attributes.js","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/bits/utilities/dismissible-layer/use-dismissable-layer.svelte.js","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/bits/utilities/dismissible-layer/dismissible-layer.svelte","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/bits/utilities/escape-layer/use-escape-layer.svelte.js","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/bits/utilities/escape-layer/escape-layer.svelte","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/bits/utilities/focus-scope/focus-scope-manager.js","../../../../../../../node_modules/.bun/tabbable@6.5.1/node_modules/tabbable/dist/index.esm.js","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/bits/utilities/focus-scope/focus-scope.svelte.js","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/bits/utilities/focus-scope/focus-scope.svelte","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/bits/utilities/text-selection-layer/use-text-selection-layer.svelte.js","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/bits/utilities/text-selection-layer/text-selection-layer.svelte","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/internal/use-id.js","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/internal/shared-state.svelte.js","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/internal/body-scroll-lock.svelte.js","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/bits/utilities/scroll-lock/scroll-lock.svelte","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/bits/utilities/floating-layer/floating-root.svelte.js","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/bits/utilities/floating-layer/components/floating-layer.svelte","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/internal/floating-svelte/floating-utils.svelte.js","../../../../../../../node_modules/.bun/@floating-ui+utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs","../../../../../../../node_modules/.bun/@floating-ui+core@1.8.0/node_modules/@floating-ui/core/dist/floating-ui.core.mjs","../../../../../../../node_modules/.bun/@floating-ui+utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs","../../../../../../../node_modules/.bun/@floating-ui+dom@1.8.0/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/internal/floating-svelte/use-floating.svelte.js","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/bits/utilities/floating-layer/use-floating-layer.svelte.js","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/bits/utilities/floating-layer/components/floating-layer-content.svelte","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/bits/utilities/floating-layer/components/floating-layer-content-static.svelte","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/bits/utilities/popper-layer/popper-content.svelte","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/bits/utilities/popper-layer/popper-layer-inner.svelte","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/bits/utilities/popper-layer/popper-layer.svelte","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/bits/utilities/popper-layer/popper-layer-force-mount.svelte","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/internal/safe-polygon.svelte.js","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/bits/popover/popover.svelte.js","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/bits/popover/components/popover-content.svelte","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/bits/popover/components/popover.svelte","../../../../../../src/lib/side-panel/changes.ts","../../../../../../src/lib/components/ui/popover/popover.svelte","../../../../../../src/lib/components/ui/popover/popover-portal.svelte","../../../../../../src/lib/components/ui/popover/popover-content.svelte","../../../../../../src/lib/components/ui/input/input.svelte","../../../../../../src/lib/side-panel/files.ts","../../../../../../../node_modules/.bun/marked@18.1.2/node_modules/marked/lib/marked.esm.js","../../../../../../../src/github-ref.ts","../../../../../../src/lib/file-paths.ts","../../../../../../src/lib/github-html.ts","../../../../../../src/lib/markdown.ts","../../../../../../../src/github-item.ts","../../../../../../src/lib/github-refs.ts","../../../../../../src/lib/github-items.ts","../../../../../../src/lib/components/GithubRefCards.svelte","../../../../../../src/lib/components/ui/badge/badge.svelte"],"sourcesContent":["/** @import { TemplateNode } from '#client' */\nimport { is_runes } from '../../context.js';\nimport { block } from '../../reactivity/effects.js';\nimport { hydrate_next, hydrating } from '../hydration.js';\nimport { BranchManager } from './branches.js';\n\nconst NAN = Symbol('NaN');\n\n/**\n * @template V\n * @param {TemplateNode} node\n * @param {() => V} get_key\n * @param {(anchor: Node) => TemplateNode | void} render_fn\n * @returns {void}\n */\nexport function key(node, get_key, render_fn) {\n\tif (hydrating) {\n\t\thydrate_next();\n\t}\n\n\tvar branches = new BranchManager(node);\n\n\tvar legacy = !is_runes();\n\n\tblock(() => {\n\t\tvar key = get_key();\n\n\t\t// NaN !== NaN, hence we do this workaround to not trigger remounts unnecessarily\n\t\tif (key !== key) {\n\t\t\tkey = /** @type {any} */ (NAN);\n\t\t}\n\n\t\t// key blocks in Svelte <5 had stupid semantics\n\t\tif (legacy && key !== null && typeof key === 'object') {\n\t\t\tkey = /** @type {V} */ ({});\n\t\t}\n\n\t\tbranches.ensure(key, render_fn);\n\t});\n}\n","/** @import { Effect, TemplateNode } from '#client' */\n/** @import {} from 'trusted-types' */\nimport {\n\tFILENAME,\n\tHYDRATION_ERROR,\n\tNAMESPACE_SVG,\n\tNAMESPACE_MATHML\n} from '../../../../constants.js';\nimport { remove_effect_dom, template_effect } from '../../reactivity/effects.js';\nimport { hydrate_next, hydrate_node, hydrating, set_hydrate_node } from '../hydration.js';\n\nimport { assign_nodes } from '../template.js';\nimport * as w from '../../warnings.js';\nimport { hash, sanitize_location } from '../../../../utils.js';\nimport { DEV } from 'esm-env';\nimport { dev_current_component_function } from '../../context.js';\nimport { create_element, get_first_child, get_next_sibling } from '../operations.js';\nimport { active_effect } from '../../runtime.js';\nimport { COMMENT_NODE } from '#client/constants';\n\n/**\n * @param {Element} element\n * @param {string | null} server_hash\n * @param {string | TrustedHTML} value\n */\nfunction check_hash(element, server_hash, value) {\n\tif (!server_hash || server_hash === hash(String(value ?? ''))) return;\n\n\tlet location;\n\n\t// @ts-expect-error\n\tconst loc = element.__svelte_meta?.loc;\n\tif (loc) {\n\t\tlocation = `near ${loc.file}:${loc.line}:${loc.column}`;\n\t} else if (dev_current_component_function?.[FILENAME]) {\n\t\tlocation = `in ${dev_current_component_function[FILENAME]}`;\n\t}\n\n\tw.hydration_html_changed(sanitize_location(location));\n}\n\n/**\n * @param {Element | Text | Comment} node\n * @param {() => string | TrustedHTML} get_value\n * @param {boolean} [is_controlled]\n * @param {boolean} [svg]\n * @param {boolean} [mathml]\n * @param {boolean} [skip_warning]\n * @returns {void}\n */\nexport function html(\n\tnode,\n\tget_value,\n\tis_controlled = false,\n\tsvg = false,\n\tmathml = false,\n\tskip_warning = false\n) {\n\tvar anchor = node;\n\n\t/** @type {string | TrustedHTML} */\n\tvar value = '';\n\n\tif (is_controlled) {\n\t\tvar parent_node = /** @type {Element} */ (node);\n\n\t\tif (hydrating) {\n\t\t\tanchor = set_hydrate_node(get_first_child(parent_node));\n\t\t}\n\t}\n\n\ttemplate_effect(() => {\n\t\tvar effect = /** @type {Effect} */ (active_effect);\n\n\t\tif (value === (value = get_value() ?? '')) {\n\t\t\tif (hydrating) hydrate_next();\n\t\t\treturn;\n\t\t}\n\n\t\tif (is_controlled && !hydrating) {\n\t\t\t// When @html is the only child, use innerHTML directly.\n\t\t\t// This also handles contenteditable, where the user may delete the anchor comment.\n\t\t\teffect.nodes = null;\n\t\t\tparent_node.innerHTML = /** @type {string} */ (value);\n\n\t\t\tif (value !== '') {\n\t\t\t\tassign_nodes(\n\t\t\t\t\t/** @type {TemplateNode} */ (get_first_child(parent_node)),\n\t\t\t\t\t/** @type {TemplateNode} */ (parent_node.lastChild)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tif (effect.nodes !== null) {\n\t\t\tremove_effect_dom(effect.nodes.start, /** @type {TemplateNode} */ (effect.nodes.end));\n\t\t\teffect.nodes = null;\n\t\t}\n\n\t\tif (value === '') return;\n\n\t\tif (hydrating) {\n\t\t\t// We're deliberately not trying to repair mismatches between server and client,\n\t\t\t// as it's costly and error-prone (and it's an edge case to have a mismatch anyway)\n\t\t\tvar hash = /** @type {Comment} */ (hydrate_node).data;\n\n\t\t\t/** @type {TemplateNode | null} */\n\t\t\tvar next = hydrate_next();\n\t\t\tvar last = next;\n\n\t\t\twhile (\n\t\t\t\tnext !== null &&\n\t\t\t\t(next.nodeType !== COMMENT_NODE || /** @type {Comment} */ (next).data !== '')\n\t\t\t) {\n\t\t\t\tlast = next;\n\t\t\t\tnext = get_next_sibling(next);\n\t\t\t}\n\n\t\t\tif (next === null) {\n\t\t\t\tw.hydration_mismatch();\n\t\t\t\tthrow HYDRATION_ERROR;\n\t\t\t}\n\n\t\t\tif (DEV && !skip_warning) {\n\t\t\t\tcheck_hash(/** @type {Element} */ (next.parentNode), hash, value);\n\t\t\t}\n\n\t\t\tassign_nodes(hydrate_node, last);\n\t\t\tanchor = set_hydrate_node(next);\n\t\t\treturn;\n\t\t}\n\n\t\t// Don't use create_fragment_with_script_from_html here because that would mean script tags are executed.\n\t\t// @html is basically `.innerHTML = ...` and that doesn't execute scripts either due to security reasons.\n\t\t// Use a <template>, <svg>, or <math> wrapper depending on context. If value is a TrustedHTML object,\n\t\t// it will be assigned directly to innerHTML without coercion — this allows {@html policy.createHTML(...)} to work.\n\t\tvar ns = svg ? NAMESPACE_SVG : mathml ? NAMESPACE_MATHML : undefined;\n\t\tvar wrapper = /** @type {HTMLTemplateElement | SVGElement | MathMLElement} */ (\n\t\t\tcreate_element(svg ? 'svg' : mathml ? 'math' : 'template', ns)\n\t\t);\n\t\twrapper.innerHTML = /** @type {any} */ (value);\n\n\t\t/** @type {DocumentFragment | Element} */\n\t\tvar node = svg || mathml ? wrapper : /** @type {HTMLTemplateElement} */ (wrapper).content;\n\n\t\tassign_nodes(\n\t\t\t/** @type {TemplateNode} */ (get_first_child(node)),\n\t\t\t/** @type {TemplateNode} */ (node.lastChild)\n\t\t);\n\n\t\tif (svg || mathml) {\n\t\t\twhile (get_first_child(node)) {\n\t\t\t\tanchor.before(/** @type {TemplateNode} */ (get_first_child(node)));\n\t\t\t}\n\t\t} else {\n\t\t\tanchor.before(node);\n\t\t}\n\t});\n}\n","/** @import { ActionPayload } from '#client' */\nimport { effect, render_effect } from '../../reactivity/effects.js';\nimport { safe_not_equal } from '../../reactivity/equality.js';\nimport { deep_read_state, untrack } from '../../runtime.js';\n\n/**\n * @template P\n * @param {Element} dom\n * @param {(dom: Element, value?: P) => ActionPayload<P>} action\n * @param {() => P} [get_value]\n * @returns {void}\n */\nexport function action(dom, action, get_value) {\n\teffect(() => {\n\t\tvar payload = untrack(() => action(dom, get_value?.()) || {});\n\n\t\tif (get_value && payload?.update) {\n\t\t\tvar inited = false;\n\t\t\t/** @type {P} */\n\t\t\tvar prev = /** @type {any} */ ({}); // initialize with something so it's never equal on first run\n\n\t\t\trender_effect(() => {\n\t\t\t\tvar value = get_value();\n\n\t\t\t\t// Action's update method is coarse-grained, i.e. when anything in the passed value changes, update.\n\t\t\t\t// This works in legacy mode because of mutable_source being updated as a whole, but when using $state\n\t\t\t\t// together with actions and mutation, it wouldn't notice the change without a deep read.\n\t\t\t\tdeep_read_state(value);\n\n\t\t\t\tif (inited && safe_not_equal(prev, value)) {\n\t\t\t\t\tprev = value;\n\t\t\t\t\t/** @type {Function} */ (payload.update)(value);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tinited = true;\n\t\t}\n\n\t\tif (payload?.destroy) {\n\t\t\treturn () => /** @type {Function} */ (payload.destroy)();\n\t\t}\n\t});\n}\n","/** @import { Batch } from '../../../reactivity/batch.js' */\nimport { DEV } from 'esm-env';\nimport { render_effect, teardown } from '../../../reactivity/effects.js';\nimport { listen_to_event_and_reset_event } from './shared.js';\nimport * as e from '../../../errors.js';\nimport { is } from '../../../proxy.js';\nimport { queue_micro_task } from '../../task.js';\nimport { hydrating } from '../../hydration.js';\nimport { tick, untrack } from '../../../runtime.js';\nimport { current_batch, previous_batch } from '../../../reactivity/batch.js';\nimport { async_mode_flag } from '../../../../flags/index.js';\n\n/**\n * @param {HTMLInputElement} input\n * @param {() => unknown} get\n * @param {(value: unknown) => void} set\n * @returns {void}\n */\nexport function bind_value(input, get, set = get) {\n\tvar batches = new WeakSet();\n\n\tlisten_to_event_and_reset_event(input, 'input', async (is_reset) => {\n\t\tif (DEV && input.type === 'checkbox') {\n\t\t\t// TODO should this happen in prod too?\n\t\t\te.bind_invalid_checkbox_value();\n\t\t}\n\n\t\t/** @type {any} */\n\t\tvar value = is_reset ? input.defaultValue : input.value;\n\t\tvalue = is_numberlike_input(input) ? to_number(value) : value;\n\t\tset(value);\n\n\t\tif (current_batch !== null) {\n\t\t\tbatches.add(current_batch);\n\t\t}\n\n\t\t// Because `{#each ...}` blocks work by updating sources inside the flush,\n\t\t// we need to wait a tick before checking to see if we should forcibly\n\t\t// update the input and reset the selection state\n\t\tawait tick();\n\n\t\t// Respect any validation in accessors\n\t\tif (value !== (value = get())) {\n\t\t\tvar start = input.selectionStart;\n\t\t\tvar end = input.selectionEnd;\n\t\t\tvar length = input.value.length;\n\n\t\t\t// the value is coerced on assignment\n\t\t\tinput.value = value ?? '';\n\n\t\t\t// Restore selection\n\t\t\tif (end !== null) {\n\t\t\t\tvar new_length = input.value.length;\n\t\t\t\t// If cursor was at end and new input is longer, move cursor to new end\n\t\t\t\tif (start === end && end === length && new_length > length) {\n\t\t\t\t\tinput.selectionStart = new_length;\n\t\t\t\t\tinput.selectionEnd = new_length;\n\t\t\t\t} else {\n\t\t\t\t\tinput.selectionStart = start;\n\t\t\t\t\tinput.selectionEnd = Math.min(end, new_length);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\n\tif (\n\t\t// If we are hydrating and the value has since changed,\n\t\t// then use the updated value from the input instead.\n\t\t(hydrating && input.defaultValue !== input.value) ||\n\t\t// If defaultValue is set, then value == defaultValue\n\t\t// TODO Svelte 6: remove input.value check and set to empty string?\n\t\t(untrack(get) == null && input.value)\n\t) {\n\t\tset(is_numberlike_input(input) ? to_number(input.value) : input.value);\n\n\t\tif (current_batch !== null) {\n\t\t\tbatches.add(current_batch);\n\t\t}\n\t}\n\n\trender_effect(() => {\n\t\tif (DEV && input.type === 'checkbox') {\n\t\t\t// TODO should this happen in prod too?\n\t\t\te.bind_invalid_checkbox_value();\n\t\t}\n\n\t\tvar value = get();\n\n\t\tif (input === document.activeElement) {\n\t\t\t// In sync mode render effects are executed during tree traversal -> needs current_batch\n\t\t\t// In async mode render effects are flushed once batch resolved, at which point current_batch is null -> needs previous_batch\n\t\t\tvar batch = /** @type {Batch} */ (async_mode_flag ? previous_batch : current_batch);\n\n\t\t\t// Never rewrite the contents of a focused input. We can get here if, for example,\n\t\t\t// an update is deferred because of async work depending on the input:\n\t\t\t//\n\t\t\t// <input bind:value={query}>\n\t\t\t// <p>{await find(query)}</p>\n\t\t\tif (batches.has(batch)) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tif (is_numberlike_input(input) && value === to_number(input.value)) {\n\t\t\t// handles 0 vs 00 case (see https://github.com/sveltejs/svelte/issues/9959)\n\t\t\treturn;\n\t\t}\n\n\t\tif (input.type === 'date' && !value && !input.value) {\n\t\t\t// Handles the case where a temporarily invalid date is set (while typing, for example with a leading 0 for the day)\n\t\t\t// and prevents this state from clearing the other parts of the date input (see https://github.com/sveltejs/svelte/issues/7897)\n\t\t\treturn;\n\t\t}\n\n\t\t// don't set the value of the input if it's the same to allow\n\t\t// minlength to work properly\n\t\tif (value !== input.value) {\n\t\t\t// @ts-expect-error the value is coerced on assignment\n\t\t\tinput.value = value ?? '';\n\t\t}\n\t});\n}\n\n/** @type {Set<HTMLInputElement[]>} */\nconst pending = new Set();\n\n/**\n * @param {HTMLInputElement[]} inputs\n * @param {null | [number]} group_index\n * @param {HTMLInputElement} input\n * @param {() => unknown} get\n * @param {(value: unknown) => void} set\n * @returns {void}\n */\nexport function bind_group(inputs, group_index, input, get, set = get) {\n\tvar is_checkbox = input.getAttribute('type') === 'checkbox';\n\tvar binding_group = inputs;\n\n\t// needs to be let or related code isn't treeshaken out if it's always false\n\tlet hydration_mismatch = false;\n\n\tif (group_index !== null) {\n\t\tfor (var index of group_index) {\n\t\t\t// @ts-expect-error\n\t\t\tbinding_group = binding_group[index] ??= [];\n\t\t}\n\t}\n\n\tbinding_group.push(input);\n\n\tlisten_to_event_and_reset_event(\n\t\tinput,\n\t\t'change',\n\t\t() => {\n\t\t\t// @ts-ignore\n\t\t\tvar value = input.__value;\n\n\t\t\tif (is_checkbox) {\n\t\t\t\tvalue = get_binding_group_value(binding_group, value, input.checked);\n\t\t\t}\n\n\t\t\tset(value);\n\t\t},\n\t\t// TODO better default value handling\n\t\t() => set(is_checkbox ? [] : null)\n\t);\n\n\trender_effect(() => {\n\t\tvar value = get();\n\n\t\t// If we are hydrating and the value has since changed, then use the update value\n\t\t// from the input instead.\n\t\tif (hydrating && input.defaultChecked !== input.checked) {\n\t\t\thydration_mismatch = true;\n\t\t\treturn;\n\t\t}\n\n\t\tif (is_checkbox) {\n\t\t\tvalue = value || [];\n\t\t\t// @ts-ignore\n\t\t\tinput.checked = value.includes(input.__value);\n\t\t} else {\n\t\t\t// @ts-ignore\n\t\t\tinput.checked = is(input.__value, value);\n\t\t}\n\t});\n\n\tteardown(() => {\n\t\tvar index = binding_group.indexOf(input);\n\n\t\tif (index !== -1) {\n\t\t\tbinding_group.splice(index, 1);\n\t\t}\n\t});\n\n\tif (!pending.has(binding_group)) {\n\t\tpending.add(binding_group);\n\n\t\tqueue_micro_task(() => {\n\t\t\t// necessary to maintain binding group order in all insertion scenarios\n\t\t\tbinding_group.sort((a, b) => (a.compareDocumentPosition(b) === 4 ? -1 : 1));\n\t\t\tpending.delete(binding_group);\n\t\t});\n\t}\n\n\tqueue_micro_task(() => {\n\t\tif (hydration_mismatch) {\n\t\t\tvar value;\n\n\t\t\tif (is_checkbox) {\n\t\t\t\tvalue = get_binding_group_value(binding_group, value, input.checked);\n\t\t\t} else {\n\t\t\t\tvar hydration_input = binding_group.find((input) => input.checked);\n\t\t\t\t// @ts-ignore\n\t\t\t\tvalue = hydration_input?.__value;\n\t\t\t}\n\n\t\t\tset(value);\n\t\t}\n\t});\n}\n\n/**\n * @param {HTMLInputElement} input\n * @param {() => unknown} get\n * @param {(value: unknown) => void} set\n * @returns {void}\n */\nexport function bind_checked(input, get, set = get) {\n\tlisten_to_event_and_reset_event(input, 'change', (is_reset) => {\n\t\tvar value = is_reset ? input.defaultChecked : input.checked;\n\t\tset(value);\n\t});\n\n\tif (\n\t\t// If we are hydrating and the value has since changed,\n\t\t// then use the update value from the input instead.\n\t\t(hydrating && input.defaultChecked !== input.checked) ||\n\t\t// If defaultChecked is set, then checked == defaultChecked\n\t\tuntrack(get) == null\n\t) {\n\t\tset(input.checked);\n\t}\n\n\trender_effect(() => {\n\t\tvar value = get();\n\t\tinput.checked = Boolean(value);\n\t});\n}\n\n/**\n * @template V\n * @param {Array<HTMLInputElement>} group\n * @param {V} __value\n * @param {boolean} checked\n * @returns {V[]}\n */\nfunction get_binding_group_value(group, __value, checked) {\n\t/** @type {Set<V>} */\n\tvar value = new Set();\n\n\tfor (var i = 0; i < group.length; i += 1) {\n\t\tif (group[i].checked) {\n\t\t\t// @ts-ignore\n\t\t\tvalue.add(group[i].__value);\n\t\t}\n\t}\n\n\tif (!checked) {\n\t\tvalue.delete(__value);\n\t}\n\n\treturn Array.from(value);\n}\n\n/**\n * @param {HTMLInputElement} input\n */\nfunction is_numberlike_input(input) {\n\tvar type = input.type;\n\treturn type === 'number' || type === 'range';\n}\n\n/**\n * @param {string} value\n */\nfunction to_number(value) {\n\treturn value === '' ? null : +value;\n}\n\n/**\n * @param {HTMLInputElement} input\n * @param {() => FileList | null} get\n * @param {(value: FileList | null) => void} set\n */\nexport function bind_files(input, get, set = get) {\n\tlisten_to_event_and_reset_event(input, 'change', () => {\n\t\tset(input.files);\n\t});\n\n\tif (\n\t\t// If we are hydrating and the value has since changed,\n\t\t// then use the updated value from the input instead.\n\t\thydrating &&\n\t\tinput.files\n\t) {\n\t\tset(input.files);\n\t}\n\n\trender_effect(() => {\n\t\tinput.files = get();\n\t});\n}\n","import { getContext } from 'svelte';\nimport { BROWSER, DEV } from 'esm-env';\nimport { stores as browser_stores } from '../client/client.js';\n\n/**\n * A function that returns all of the contextual stores. On the server, this must be called during component initialization.\n * Only use this if you need to defer store subscription until after the component has mounted, for some reason.\n *\n * @deprecated Use `$app/state` instead (requires Svelte 5, [see docs for more info](https://svelte.dev/docs/kit/migrating-to-sveltekit-2#SvelteKit-2.12:-$app-stores-deprecated))\n */\nexport const getStores = () => {\n\tconst stores = BROWSER ? browser_stores : getContext('__svelte__');\n\n\treturn {\n\t\t/** @type {typeof page} */\n\t\tpage: {\n\t\t\tsubscribe: stores.page.subscribe\n\t\t},\n\t\t/** @type {typeof navigating} */\n\t\tnavigating: {\n\t\t\tsubscribe: stores.navigating.subscribe\n\t\t},\n\t\t/** @type {typeof updated} */\n\t\tupdated: stores.updated\n\t};\n};\n\n/**\n * A readable store whose value contains page data.\n *\n * On the server, this store can only be subscribed to during component initialization. In the browser, it can be subscribed to at any time.\n *\n * @deprecated Use `page` from `$app/state` instead (requires Svelte 5, [see docs for more info](https://svelte.dev/docs/kit/migrating-to-sveltekit-2#SvelteKit-2.12:-$app-stores-deprecated))\n * @type {import('svelte/store').Readable<import('@sveltejs/kit').Page>}\n */\nexport const page = {\n\tsubscribe(fn) {\n\t\tconst store = DEV ? get_store('page') : getStores().page;\n\t\treturn store.subscribe(fn);\n\t}\n};\n\n/**\n * A readable store.\n * When navigating starts, its value is a `Navigation` object with `from`, `to`, `type` and (if `type === 'popstate'`) `delta` properties.\n * When navigating finishes, its value reverts to `null`.\n *\n * On the server, this store can only be subscribed to during component initialization. In the browser, it can be subscribed to at any time.\n *\n * @deprecated Use `navigating` from `$app/state` instead (requires Svelte 5, [see docs for more info](https://svelte.dev/docs/kit/migrating-to-sveltekit-2#SvelteKit-2.12:-$app-stores-deprecated))\n * @type {import('svelte/store').Readable<import('@sveltejs/kit').Navigation | null>}\n */\nexport const navigating = {\n\tsubscribe(fn) {\n\t\tconst store = DEV ? get_store('navigating') : getStores().navigating;\n\t\treturn store.subscribe(fn);\n\t}\n};\n\n/**\n * A readable store whose initial value is `false`. If [`version.pollInterval`](https://svelte.dev/docs/kit/configuration#version) is a non-zero value, SvelteKit will poll for new versions of the app and update the store value to `true` when it detects one. `updated.check()` will force an immediate check, regardless of polling.\n *\n * On the server, this store can only be subscribed to during component initialization. In the browser, it can be subscribed to at any time.\n *\n * @deprecated Use `updated` from `$app/state` instead (requires Svelte 5, [see docs for more info](https://svelte.dev/docs/kit/migrating-to-sveltekit-2#SvelteKit-2.12:-$app-stores-deprecated))\n * @type {import('svelte/store').Readable<boolean> & { check(): Promise<boolean> }}\n */\nexport const updated = {\n\tsubscribe(fn) {\n\t\tconst store = DEV ? get_store('updated') : getStores().updated;\n\n\t\tif (BROWSER) {\n\t\t\tupdated.check = store.check;\n\t\t}\n\n\t\treturn store.subscribe(fn);\n\t},\n\tcheck: () => {\n\t\tthrow new Error(\n\t\t\tBROWSER\n\t\t\t\t? 'Cannot check updated store before subscribing'\n\t\t\t\t: 'Can only check updated store in browser'\n\t\t);\n\t}\n};\n\n/**\n * @template {keyof ReturnType<typeof getStores>} Name\n * @param {Name} name\n * @returns {ReturnType<typeof getStores>[Name]}\n */\nfunction get_store(name) {\n\ttry {\n\t\treturn getStores()[name];\n\t} catch {\n\t\tthrow new Error(\n\t\t\t`Cannot subscribe to '${name}' store on the server outside of a Svelte component, as it is bound to the current request via component context. This prevents state from leaking between users.` +\n\t\t\t\t'For more information, see https://svelte.dev/docs/kit/state-management#avoid-shared-state-on-the-server'\n\t\t);\n\t}\n}\n","/**\n * Whether the sidebar drawer is open on narrow viewports.\n *\n * The session page's composer carries the toggle now that the page header is\n * gone, and the layout owns the drawer itself — so the two talk through this\n * rather than through a floating button drawn over the transcript.\n */\n/** Narrower than this, the sidebar is a drawer over the page. Mirrors the `@media` in `+layout.svelte`. */\nexport const DRAWER_MEDIA_QUERY = '(max-width: 768px)';\n\nclass DrawerStore {\n open = $state(false);\n\n toggle() {\n this.open = !this.open;\n }\n\n close() {\n this.open = false;\n }\n}\n\nexport const drawer = new DrawerStore();\n","<script lang=\"ts\">\n\timport { sessionStateVisual, type IndicatorState } from '$shared/session-state.js';\n\n\tlet {\n\t\tstate,\n\t\tsize = 'md',\n\t\ttitle = null\n\t}: { state: IndicatorState; size?: 'sm' | 'md' | 'lg'; title?: string | null } = $props();\n\n\tconst visual = $derived(sessionStateVisual(state));\n\t// A dot reads heavier than a glyph, so it is drawn smaller at the same density.\n\tconst px = $derived(\n\t\t{ sm: { dot: 7, icon: 13 }, md: { dot: 8, icon: 15 }, lg: { dot: 12, icon: 18 } }[size]\n\t);\n\tconst label = $derived(title || visual.label);\n\t// Start every pulse at the same point of the wall clock's cycle (1.6s, as\n\t// in app.css), so dots that start pulsing at different moments still blink together.\n\tconst phase = $derived(visual.pulse ? -(Date.now() % 1600) : 0);\n</script>\n\n{#if visual.icon}\n\t<iconify-icon\n\t\tclass=\"state-icon\"\n\t\ticon={visual.icon}\n\t\tstyle=\"color: {visual.color}; font-size: {px.icon}px;\"\n\t\trole=\"img\"\n\t\taria-label={label}\n\t\t{title}\n\t></iconify-icon>\n{:else}\n\t<span\n\t\tclass=\"state-dot\"\n\t\tclass:pulse-dot={visual.pulse}\n\t\tstyle=\"background: {visual.color}; width: {px.dot}px; height: {px.dot}px; animation-delay: {phase}ms;\"\n\t\trole=\"img\"\n\t\taria-label={label}\n\t\t{title}\n\t></span>\n{/if}\n\n<style>\n\t.state-icon {\n\t\tflex-shrink: 0;\n\t\tline-height: 1;\n\t}\n\n\t/* .pulse-dot (app.css) is animation-only; the shape lives here. */\n\t.state-dot {\n\t\tdisplay: inline-block;\n\t\tborder-radius: 50%;\n\t\tflex-shrink: 0;\n\t}\n</style>\n","export interface LongPressOptions {\n\tms?: number;\n\tonTrigger: () => void;\n\t/**\n\t * The press that triggered has ended. For a hold that shows something for\n\t * as long as it is held — a tooltip, a preview — rather than one that\n\t * hands over to a menu outliving the finger.\n\t */\n\tonRelease?: () => void;\n\tenabled?: () => boolean;\n}\n\nexport interface LongPressAction {\n\tdestroy(): void;\n\tupdate(opts: LongPressOptions): void;\n}\n\n/**\n * A press that has moved this far is a drag, not a hold. Wide enough to let a\n * hand rest, narrow enough that the browser has not yet started a native drag\n * (which it does after a few pixels on a `draggable` element).\n */\nconst MOVE_TOLERANCE_PX = 6;\n\n/**\n * A long press is a hold that stays put. Moving ends it, and so does the\n * browser starting a drag from the same element: on a `draggable` row the\n * mouse events stop arriving once the drag is under way, so without watching\n * `dragstart` the timer would fire mid-drag and open whatever the hold opens\n * on top of the drop. The other way round, a hold that has already triggered\n * refuses the drag that a finger sliding off it would otherwise begin.\n */\nexport function longPress(node: HTMLElement, options: LongPressOptions): LongPressAction {\n\tlet opts = options;\n\tlet timer: ReturnType<typeof setTimeout> | null = null;\n\tlet triggered = false;\n\tlet originX = 0;\n\tlet originY = 0;\n\n\t/**\n\t * A touch screen answers a press of its own accord: it selects the word\n\t * under the finger and raises the callout menu, and the tap that follows\n\t * never reaches the element — the hold looks to the user like the tap did\n\t * nothing but highlight some text. Every element that takes a long press\n\t * wants that suppressed, so it is set here rather than left to each\n\t * caller's stylesheet to remember.\n\t */\n\tnode.style.userSelect = 'none';\n\tnode.style.setProperty('-webkit-user-select', 'none');\n\tnode.style.setProperty('-webkit-touch-callout', 'none');\n\tif (!node.style.touchAction) node.style.touchAction = 'manipulation';\n\n\tfunction clear(): void {\n\t\tif (timer) {\n\t\t\tclearTimeout(timer);\n\t\t\ttimer = null;\n\t\t}\n\t}\n\n\tfunction start(x: number, y: number): void {\n\t\tif (opts.enabled && !opts.enabled()) return;\n\t\ttriggered = false;\n\t\toriginX = x;\n\t\toriginY = y;\n\t\tclear();\n\t\ttimer = setTimeout(() => {\n\t\t\ttimer = null;\n\t\t\ttriggered = true;\n\t\t\topts.onTrigger();\n\t\t}, opts.ms ?? 500);\n\t}\n\n\t/**\n\t * End the press. `triggered` stays set, because the click that follows a\n\t * mouse hold still has to be swallowed by the capture handler.\n\t */\n\tfunction release(): void {\n\t\tconst held = triggered;\n\t\tclear();\n\t\tif (held) opts.onRelease?.();\n\t}\n\n\tfunction moved(x: number, y: number): boolean {\n\t\treturn Math.abs(x - originX) > MOVE_TOLERANCE_PX || Math.abs(y - originY) > MOVE_TOLERANCE_PX;\n\t}\n\n\tfunction onMouseDown(e: MouseEvent): void {\n\t\tif (e.button !== 0) return;\n\t\tstart(e.clientX, e.clientY);\n\t}\n\n\tfunction onMouseMove(e: MouseEvent): void {\n\t\tif (timer && moved(e.clientX, e.clientY)) clear();\n\t}\n\n\tfunction onTouchStart(e: TouchEvent): void {\n\t\tconst t = e.touches[0];\n\t\tstart(t?.clientX ?? 0, t?.clientY ?? 0);\n\t}\n\n\tfunction onTouchMove(e: TouchEvent): void {\n\t\tconst t = e.touches[0];\n\t\tif (timer && t && moved(t.clientX, t.clientY)) clear();\n\t}\n\n\tfunction onTouchEnd(e: TouchEvent): void {\n\t\trelease();\n\t\tif (triggered) {\n\t\t\te.preventDefault();\n\t\t\ttriggered = false;\n\t\t}\n\t}\n\n\tfunction onClickCapture(e: MouseEvent): void {\n\t\tif (triggered) {\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t\ttriggered = false;\n\t\t}\n\t}\n\n\tfunction onTouchCancel(): void {\n\t\trelease();\n\t\ttriggered = false;\n\t}\n\n\tfunction onDragStart(e: DragEvent): void {\n\t\tif (triggered) {\n\t\t\t// The hold already handed over to its menu; the drag is not wanted.\n\t\t\te.preventDefault();\n\t\t\treturn;\n\t\t}\n\t\tclear();\n\t}\n\n\tnode.addEventListener('mousedown', onMouseDown);\n\tnode.addEventListener('mousemove', onMouseMove);\n\tnode.addEventListener('touchstart', onTouchStart, { passive: true });\n\tnode.addEventListener('touchmove', onTouchMove, { passive: true });\n\tnode.addEventListener('touchend', onTouchEnd);\n\tnode.addEventListener('touchcancel', onTouchCancel);\n\tnode.addEventListener('mouseup', release);\n\tnode.addEventListener('mouseleave', release);\n\tnode.addEventListener('dragstart', onDragStart);\n\tnode.addEventListener('click', onClickCapture, { capture: true });\n\n\treturn {\n\t\tdestroy(): void {\n\t\t\tclear();\n\t\t\tnode.removeEventListener('mousedown', onMouseDown);\n\t\t\tnode.removeEventListener('mousemove', onMouseMove);\n\t\t\tnode.removeEventListener('touchstart', onTouchStart);\n\t\t\tnode.removeEventListener('touchmove', onTouchMove);\n\t\t\tnode.removeEventListener('touchend', onTouchEnd);\n\t\t\tnode.removeEventListener('touchcancel', onTouchCancel);\n\t\t\tnode.removeEventListener('mouseup', release);\n\t\t\tnode.removeEventListener('mouseleave', release);\n\t\t\tnode.removeEventListener('dragstart', onDragStart);\n\t\t\tnode.removeEventListener('click', onClickCapture, { capture: true });\n\t\t},\n\t\tupdate(next: LongPressOptions): void {\n\t\t\topts = next;\n\t\t}\n\t};\n}\n","/** @import { Source } from '#client' */\nimport { DEV } from 'esm-env';\nimport { set, source, state, increment } from '../internal/client/reactivity/sources.js';\nimport { label, tag } from '../internal/client/dev/tracing.js';\nimport { get, update_version } from '../internal/client/runtime.js';\n\n/**\n * A reactive version of the built-in [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) object.\n * Reading contents of the map (by iterating, or by reading `map.size` or calling `map.get(...)` or `map.has(...)` as in the [tic-tac-toe example](https://svelte.dev/playground/0b0ff4aa49c9443f9b47fe5203c78293) below) in an [effect](https://svelte.dev/docs/svelte/$effect) or [derived](https://svelte.dev/docs/svelte/$derived)\n * will cause it to be re-evaluated as necessary when the map is updated.\n *\n * Note that values in a reactive map are _not_ made [deeply reactive](https://svelte.dev/docs/svelte/$state#Deep-state).\n *\n * ```svelte\n * <script>\n * \timport { SvelteMap } from 'svelte/reactivity';\n * \timport { result } from './game.js';\n *\n * \tlet board = new SvelteMap();\n * \tlet player = $state('x');\n * \tlet winner = $derived(result(board));\n *\n * \tfunction reset() {\n * \t\tplayer = 'x';\n * \t\tboard.clear();\n * \t}\n * </script>\n *\n * <div class=\"board\">\n * \t{#each Array(9), i}\n * \t\t<button\n * \t\t\tdisabled={board.has(i) || winner}\n * \t\t\tonclick={() => {\n * \t\t\t\tboard.set(i, player);\n * \t\t\t\tplayer = player === 'x' ? 'o' : 'x';\n * \t\t\t}}\n * \t\t>{board.get(i)}</button>\n * \t{/each}\n * </div>\n *\n * {#if winner}\n * \t<p>{winner} wins!</p>\n * \t<button onclick={reset}>reset</button>\n * {:else}\n * \t<p>{player} is next</p>\n * {/if}\n * ```\n *\n * @template K\n * @template V\n * @extends {Map<K, V>}\n */\nexport class SvelteMap extends Map {\n\t/** @type {Map<K, Source<number>>} */\n\t#sources = new Map();\n\t#version = state(0);\n\t#size = state(0);\n\t#update_version = update_version || -1;\n\n\t/**\n\t * @param {Iterable<readonly [K, V]> | null | undefined} [value]\n\t */\n\tconstructor(value) {\n\t\tsuper();\n\n\t\tif (DEV) {\n\t\t\t// If the value is invalid then the native exception will fire here\n\t\t\tvalue = new Map(value);\n\n\t\t\ttag(this.#version, 'SvelteMap version');\n\t\t\ttag(this.#size, 'SvelteMap.size');\n\t\t}\n\n\t\tif (value) {\n\t\t\tfor (var [key, v] of value) {\n\t\t\t\tsuper.set(key, v);\n\t\t\t}\n\t\t\tthis.#size.v = super.size;\n\t\t}\n\t}\n\n\t/**\n\t * If the source is being created inside the same reaction as the SvelteMap instance,\n\t * we use `state` so that it will not be a dependency of the reaction. Otherwise we\n\t * use `source` so it will be.\n\t *\n\t * @template T\n\t * @param {T} value\n\t * @returns {Source<T>}\n\t */\n\t#source(value) {\n\t\treturn update_version === this.#update_version ? state(value) : source(value);\n\t}\n\n\t/** @param {K} key */\n\thas(key) {\n\t\tvar sources = this.#sources;\n\t\tvar s = sources.get(key);\n\n\t\tif (s === undefined) {\n\t\t\tif (super.has(key)) {\n\t\t\t\ts = this.#source(0);\n\n\t\t\t\tif (DEV) {\n\t\t\t\t\ttag(s, `SvelteMap get(${label(key)})`);\n\t\t\t\t}\n\n\t\t\t\tsources.set(key, s);\n\t\t\t} else {\n\t\t\t\t// We should always track the version in case\n\t\t\t\t// the Set ever gets this value in the future.\n\t\t\t\tget(this.#version);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tget(s);\n\t\treturn true;\n\t}\n\n\t/**\n\t * @param {(value: V, key: K, map: Map<K, V>) => void} callbackfn\n\t * @param {any} [this_arg]\n\t */\n\tforEach(callbackfn, this_arg) {\n\t\tthis.#read_all();\n\t\tsuper.forEach(callbackfn, this_arg);\n\t}\n\n\t/** @param {K} key */\n\tget(key) {\n\t\tvar sources = this.#sources;\n\t\tvar s = sources.get(key);\n\n\t\tif (s === undefined) {\n\t\t\tif (super.has(key)) {\n\t\t\t\ts = this.#source(0);\n\n\t\t\t\tif (DEV) {\n\t\t\t\t\ttag(s, `SvelteMap get(${label(key)})`);\n\t\t\t\t}\n\n\t\t\t\tsources.set(key, s);\n\t\t\t} else {\n\t\t\t\t// We should always track the version in case\n\t\t\t\t// the Set ever gets this value in the future.\n\t\t\t\tget(this.#version);\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t}\n\n\t\tget(s);\n\t\treturn super.get(key);\n\t}\n\n\t/**\n\t * @param {K} key\n\t * @param {V} value\n\t * */\n\tgetOrInsert(key, value) {\n\t\tif (!super.has(key)) {\n\t\t\tthis.set(key, value);\n\t\t}\n\t\treturn /** @type {V} */ (this.get(key));\n\t}\n\n\t/**\n\t * @param {K} key\n\t * @param {(key: K) => V} callbackFn\n\t */\n\tgetOrInsertComputed(key, callbackFn) {\n\t\tif (!super.has(key)) {\n\t\t\tthis.set(key, callbackFn(key));\n\t\t}\n\t\treturn /** @type {V} */ (this.get(key));\n\t}\n\n\t/**\n\t * @param {K} key\n\t * @param {V} value\n\t * */\n\tset(key, value) {\n\t\tvar sources = this.#sources;\n\t\tvar s = sources.get(key);\n\t\tvar prev_res = super.get(key);\n\t\tvar res = super.set(key, value);\n\t\tvar version = this.#version;\n\n\t\tif (s === undefined) {\n\t\t\ts = this.#source(0);\n\n\t\t\tif (DEV) {\n\t\t\t\ttag(s, `SvelteMap get(${label(key)})`);\n\t\t\t}\n\n\t\t\tsources.set(key, s);\n\t\t\tset(this.#size, super.size);\n\t\t\tincrement(version);\n\t\t} else if (prev_res !== value) {\n\t\t\tincrement(s);\n\n\t\t\t// if not every reaction of s is a reaction of version we need to also include version\n\t\t\tvar v_reactions = version.reactions === null ? null : new Set(version.reactions);\n\t\t\tvar needs_version_increase =\n\t\t\t\tv_reactions === null ||\n\t\t\t\t!s.reactions?.every((r) =>\n\t\t\t\t\t/** @type {NonNullable<typeof v_reactions>} */ (v_reactions).has(r)\n\t\t\t\t);\n\t\t\tif (needs_version_increase) {\n\t\t\t\tincrement(version);\n\t\t\t}\n\t\t}\n\n\t\treturn res;\n\t}\n\n\t/** @param {K} key */\n\tdelete(key) {\n\t\tvar sources = this.#sources;\n\t\tvar s = sources.get(key);\n\t\tvar res = super.delete(key);\n\n\t\tif (s !== undefined) {\n\t\t\tsources.delete(key);\n\t\t\tset(s, -1);\n\t\t}\n\n\t\tif (res) {\n\t\t\tset(this.#size, super.size);\n\t\t\tincrement(this.#version);\n\t\t}\n\n\t\treturn res;\n\t}\n\n\tclear() {\n\t\tif (super.size === 0) {\n\t\t\treturn;\n\t\t}\n\t\t// Clear first, so we get nice console.log outputs with $inspect\n\t\tsuper.clear();\n\t\tvar sources = this.#sources;\n\t\tset(this.#size, 0);\n\t\tfor (var s of sources.values()) {\n\t\t\tset(s, -1);\n\t\t}\n\t\tincrement(this.#version);\n\t\tsources.clear();\n\t}\n\n\t#read_all() {\n\t\tget(this.#version);\n\n\t\tvar sources = this.#sources;\n\t\tif (this.#size.v !== sources.size) {\n\t\t\tfor (var key of super.keys()) {\n\t\t\t\tif (!sources.has(key)) {\n\t\t\t\t\tvar s = this.#source(0);\n\t\t\t\t\tif (DEV) {\n\t\t\t\t\t\ttag(s, `SvelteMap get(${label(key)})`);\n\t\t\t\t\t}\n\n\t\t\t\t\tsources.set(key, s);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor ([, s] of this.#sources) {\n\t\t\tget(s);\n\t\t}\n\t}\n\n\tkeys() {\n\t\tget(this.#version);\n\t\treturn super.keys();\n\t}\n\n\tvalues() {\n\t\tthis.#read_all();\n\t\treturn super.values();\n\t}\n\n\tentries() {\n\t\tthis.#read_all();\n\t\treturn super.entries();\n\t}\n\n\t[Symbol.iterator]() {\n\t\treturn this.entries();\n\t}\n\n\tget size() {\n\t\tget(this.#size);\n\t\treturn super.size;\n\t}\n}\n","export function isFunction(value) {\n return typeof value === \"function\";\n}\nexport function isObject(value) {\n return value !== null && typeof value === \"object\";\n}\nexport function isElement(value) {\n return value instanceof Element;\n}\n","import { isFunction } from \"./is.js\";\nexport function get(value) {\n if (isFunction(value)) {\n return value();\n }\n return value;\n}\n","import { defaultWindow } from \"../../internal/configurable-globals.js\";\nimport { get } from \"../../internal/utils/get.js\";\nimport { createSubscriber } from \"svelte/reactivity\";\n/**\n * Returns a reactive value holding the size of `node`.\n *\n * Accepts an `options` object with the following properties:\n * - `initialSize`: The initial size of the element. Defaults to `{ width: 0, height: 0 }`.\n * - `box`: The box model to use. Can be either `\"content-box\"` or `\"border-box\"`. Defaults to `\"border-box\"`.\n *\n * @returns an object with `width` and `height` properties.\n *\n * @see {@link https://runed.dev/docs/utilities/element-size}\n */\nexport class ElementSize {\n // no need to use `$state` here since we are using createSubscriber\n #size = {\n width: 0,\n height: 0,\n };\n #observed = false;\n #options;\n #node;\n #window;\n // we use a derived here to extract the width so that if the width doesn't change we don't get a state update\n // which we would get if we would just use a getter since the version of the subscriber will be changing\n #width = $derived.by(() => {\n this.#subscribe?.();\n return this.getSize().width;\n });\n // we use a derived here to extract the height so that if the height doesn't change we don't get a state update\n // which we would get if we would just use a getter since the version of the subscriber will be changing\n #height = $derived.by(() => {\n this.#subscribe?.();\n return this.getSize().height;\n });\n // we need to use a derived here because the class will be created before the node is bound to the ref\n #subscribe = $derived.by(() => {\n const node$ = get(this.#node);\n if (!node$)\n return;\n return createSubscriber((update) => {\n if (!this.#window)\n return;\n const observer = new this.#window.ResizeObserver((entries) => {\n this.#observed = true;\n for (const entry of entries) {\n const boxSize = this.#options.box === \"content-box\" ? entry.contentBoxSize : entry.borderBoxSize;\n const boxSizeArr = Array.isArray(boxSize) ? boxSize : [boxSize];\n this.#size.width = boxSizeArr.reduce((acc, size) => Math.max(acc, size.inlineSize), 0);\n this.#size.height = boxSizeArr.reduce((acc, size) => Math.max(acc, size.blockSize), 0);\n }\n update();\n });\n observer.observe(node$);\n return () => {\n this.#observed = false;\n observer.disconnect();\n };\n });\n });\n constructor(node, options = { box: \"border-box\" }) {\n this.#window = options.window ?? defaultWindow;\n this.#options = options;\n this.#node = node;\n this.#size = {\n width: 0,\n height: 0,\n };\n }\n calculateSize() {\n const element = get(this.#node);\n // no element or no window, return undefined, we will return 0x0 in the getSize method\n if (!element || !this.#window) {\n return;\n }\n const offsetWidth = element.offsetWidth;\n const offsetHeight = element.offsetHeight;\n // easy mode, just return offsets\n if (this.#options.box === \"border-box\") {\n return {\n width: offsetWidth,\n height: offsetHeight,\n };\n }\n // hard mode, we need to calculate the content size\n const style = this.#window.getComputedStyle(element);\n const paddingWidth = parseFloat(style.paddingLeft) + parseFloat(style.paddingRight);\n const paddingHeight = parseFloat(style.paddingTop) + parseFloat(style.paddingBottom);\n const borderWidth = parseFloat(style.borderLeftWidth) + parseFloat(style.borderRightWidth);\n const borderHeight = parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth);\n const contentWidth = offsetWidth - paddingWidth - borderWidth;\n const contentHeight = offsetHeight - paddingHeight - borderHeight;\n return {\n width: contentWidth,\n height: contentHeight,\n };\n }\n getSize() {\n // if the resize observer already run we can just return the size\n // otherwise we calculate the size if possible or we return the initial size\n return this.#observed ? this.#size : (this.calculateSize() ?? this.#size);\n }\n get current() {\n this.#subscribe?.();\n return this.getSize();\n }\n get width() {\n return this.#width;\n }\n get height() {\n return this.#height;\n }\n}\n","export function onDestroyEffect(fn) {\n $effect(() => {\n return () => {\n fn();\n };\n });\n}\n","import { tick } from \"svelte\";\nexport function afterTick(fn) {\n tick().then(fn);\n}\n","import { isObject } from \"./is.js\";\nconst ELEMENT_NODE = 1;\nconst DOCUMENT_NODE = 9;\nconst DOCUMENT_FRAGMENT_NODE = 11;\nexport function isHTMLElement(node) {\n return isObject(node) && node.nodeType === ELEMENT_NODE && typeof node.nodeName === \"string\";\n}\nexport function isDocument(node) {\n return isObject(node) && node.nodeType === DOCUMENT_NODE;\n}\nexport function isWindow(node) {\n return isObject(node) && node.constructor?.name === \"VisualViewport\";\n}\nexport function getNodeName(node) {\n if (isHTMLElement(node))\n return node.localName ?? \"\";\n return \"#document\";\n}\nexport function isNode(node) {\n return isObject(node) && node.nodeType !== undefined;\n}\nexport function isShadowRoot(node) {\n return isNode(node) && node.nodeType === DOCUMENT_FRAGMENT_NODE && \"host\" in node;\n}\nexport function contains(parent, child) {\n if (!parent || !child)\n return false;\n if (!isHTMLElement(parent) || !isHTMLElement(child))\n return false;\n const rootNode = child.getRootNode?.();\n if (parent === child)\n return true;\n if (parent.contains(child))\n return true;\n if (rootNode && isShadowRoot(rootNode)) {\n let next = child;\n while (next) {\n if (parent === next)\n return true;\n // @ts-expect-error - host is not typed\n next = next.parentNode || next.host;\n }\n }\n return false;\n}\nexport function getDocument(node) {\n if (isDocument(node))\n return node;\n if (isWindow(node))\n return node.document;\n return node?.ownerDocument ?? document;\n}\nexport function getDocumentElement(node) {\n return getDocument(node).documentElement;\n}\nexport function getWindow(node) {\n if (isShadowRoot(node))\n return getWindow(node.host);\n if (isDocument(node))\n return node.defaultView ?? window;\n if (isHTMLElement(node))\n return node.ownerDocument?.defaultView ?? window;\n return window;\n}\nexport function getActiveElement(rootNode) {\n let activeElement = rootNode.activeElement;\n while (activeElement?.shadowRoot) {\n const el = activeElement.shadowRoot.activeElement;\n if (el === activeElement)\n break;\n else\n activeElement = el;\n }\n return activeElement;\n}\nexport function getParentNode(node) {\n if (getNodeName(node) === \"html\")\n return node;\n const result = \n // @ts-expect-error - assignedSlot is not typed\n node.assignedSlot ||\n node.parentNode ||\n (isShadowRoot(node) && node.host) ||\n getDocumentElement(node);\n return isShadowRoot(result) ? result.host : result;\n}\n","import { boxWith } from \"../box/box-extras.svelte.js\";\nimport { getActiveElement, getDocument } from \"./dom.js\";\nexport class DOMContext {\n element;\n root = $derived.by(() => {\n if (!this.element.current)\n return document;\n const rootNode = this.element.current.getRootNode() ?? document;\n return rootNode;\n });\n constructor(element) {\n if (typeof element === \"function\") {\n this.element = boxWith(element);\n }\n else {\n this.element = element;\n }\n }\n getDocument = () => {\n return getDocument(this.root);\n };\n getWindow = () => {\n return this.getDocument().defaultView ?? window;\n };\n getActiveElement = () => {\n return getActiveElement(this.root);\n };\n isActiveElement = (node) => {\n return node === this.getActiveElement();\n };\n getElementById(id) {\n return this.root.getElementById(id);\n }\n querySelector = (selector) => {\n if (!this.root)\n return null;\n return this.root.querySelector(selector);\n };\n querySelectorAll = (selector) => {\n if (!this.root)\n return [];\n return this.root.querySelectorAll(selector);\n };\n setTimeout = (callback, delay) => {\n return this.getWindow().setTimeout(callback, delay);\n };\n clearTimeout = (timeoutId) => {\n return this.getWindow().clearTimeout(timeoutId);\n };\n}\n","import { afterTick, onDestroyEffect } from \"svelte-toolbelt\";\nexport class AnimationsComplete {\n #opts;\n #currentFrame = null;\n #observer = null;\n #runId = 0;\n constructor(opts) {\n this.#opts = opts;\n onDestroyEffect(() => this.#cleanup());\n }\n #cleanup() {\n if (this.#currentFrame !== null) {\n window.cancelAnimationFrame(this.#currentFrame);\n this.#currentFrame = null;\n }\n this.#observer?.disconnect();\n this.#observer = null;\n this.#runId++;\n }\n run(fn) {\n this.#cleanup();\n const runId = this.#runId;\n const executeIfCurrent = () => {\n if (runId !== this.#runId)\n return;\n this.#executeCallback(fn);\n };\n const waitForAnimations = () => {\n if (runId !== this.#runId)\n return;\n // The content element is only attached once the component has rendered,\n // which can happen after `run()` is called when opening.\n const node = this.#opts.ref.current;\n if (!node)\n return;\n if (typeof node.getAnimations !== \"function\") {\n this.#executeCallback(fn);\n return;\n }\n const animations = node.getAnimations();\n if (animations.length === 0) {\n executeIfCurrent();\n return;\n }\n Promise.all(animations.map((animation) => animation.finished))\n .then(() => {\n executeIfCurrent();\n })\n .catch(() => {\n if (runId !== this.#runId)\n return;\n const currentAnimations = node.getAnimations();\n const hasRunningAnimations = currentAnimations.some((animation) => animation.pending || animation.playState !== \"finished\");\n if (hasRunningAnimations) {\n waitForAnimations();\n return;\n }\n executeIfCurrent();\n });\n };\n const requestWaitForAnimations = () => {\n this.#currentFrame = window.requestAnimationFrame(() => {\n this.#currentFrame = null;\n waitForAnimations();\n });\n };\n if (!this.#opts.afterTick.current) {\n requestWaitForAnimations();\n return;\n }\n this.#currentFrame = window.requestAnimationFrame(() => {\n this.#currentFrame = null;\n const startingStyleAttr = \"data-starting-style\";\n const node = this.#opts.ref.current;\n if (!node)\n return;\n if (!node.hasAttribute(startingStyleAttr)) {\n requestWaitForAnimations();\n return;\n }\n this.#observer = new MutationObserver(() => {\n if (runId !== this.#runId)\n return;\n if (node.hasAttribute(startingStyleAttr))\n return;\n this.#observer?.disconnect();\n this.#observer = null;\n requestWaitForAnimations();\n });\n this.#observer.observe(node, {\n attributes: true,\n attributeFilter: [startingStyleAttr],\n });\n });\n }\n #executeCallback(fn) {\n const runId = this.#runId;\n const execute = () => {\n // cleanup (destroy or a newer run) may have happened while `fn` was deferred\n if (runId !== this.#runId)\n return;\n fn();\n };\n if (this.#opts.afterTick.current) {\n afterTick(execute);\n }\n else {\n execute();\n }\n }\n}\n","import { watch } from \"runed\";\nimport { onDestroyEffect } from \"svelte-toolbelt\";\nimport { AnimationsComplete } from \"./animations-complete.js\";\nexport class PresenceManager {\n #opts;\n #enabled;\n #afterAnimations;\n #shouldRender = $state(false);\n #transitionStatus = $state(undefined);\n #hasMounted = false;\n #transitionFrame = null;\n constructor(opts) {\n this.#opts = opts;\n this.#shouldRender = opts.open.current;\n this.#enabled = opts.enabled ?? true;\n this.#afterAnimations = new AnimationsComplete({\n ref: this.#opts.ref,\n afterTick: this.#opts.open,\n });\n onDestroyEffect(() => this.#clearTransitionFrame());\n watch(() => this.#opts.open.current, (isOpen) => {\n if (!this.#hasMounted) {\n this.#hasMounted = true;\n return;\n }\n this.#clearTransitionFrame();\n if (!isOpen && this.#opts.shouldSkipExitAnimation?.()) {\n this.#shouldRender = false;\n this.#transitionStatus = undefined;\n this.#opts.onComplete?.();\n return;\n }\n if (isOpen)\n this.#shouldRender = true;\n this.#transitionStatus = isOpen ? \"starting\" : \"ending\";\n if (isOpen) {\n this.#transitionFrame = window.requestAnimationFrame(() => {\n this.#transitionFrame = null;\n if (this.#opts.open.current) {\n this.#transitionStatus = undefined;\n }\n });\n }\n if (!this.#enabled) {\n if (!isOpen) {\n this.#shouldRender = false;\n }\n this.#transitionStatus = undefined;\n this.#opts.onComplete?.();\n return;\n }\n this.#afterAnimations.run(() => {\n if (isOpen === this.#opts.open.current) {\n if (!this.#opts.open.current) {\n this.#shouldRender = false;\n }\n this.#transitionStatus = undefined;\n this.#opts.onComplete?.();\n }\n });\n });\n }\n get shouldRender() {\n return this.#shouldRender;\n }\n get transitionStatus() {\n return this.#transitionStatus;\n }\n #clearTransitionFrame() {\n if (this.#transitionFrame === null)\n return;\n window.cancelAnimationFrame(this.#transitionFrame);\n this.#transitionFrame = null;\n }\n}\n","/**\n * A no operation function (does nothing)\n */\nexport function noop() { }\n","<script lang=\"ts\">\n\timport type { Snippet } from \"svelte\";\n\n\tconst { children }: { children?: Snippet } = $props();\n</script>\n\n{#key children}\n\t{@render children?.()}\n{/key}\n","import { Context } from \"runed\";\nimport { boxWith } from \"svelte-toolbelt\";\nexport const BitsConfigContext = new Context(\"BitsConfig\");\n/**\n * Gets the current Bits UI configuration state from the context.\n *\n * Returns a default configuration (where all values are `undefined`) if no configuration is found.\n */\nexport function getBitsConfig() {\n const fallback = new BitsConfigState(null, {});\n return BitsConfigContext.getOr(fallback).opts;\n}\n/**\n * Creates and sets a new Bits UI configuration state that inherits from parent configs.\n *\n * @param opts - Configuration options for this level\n * @returns The configuration state instance\n *\n * @example\n * ```typescript\n * // In a component that wants to set a default portal target\n * const config = useBitsConfig({ defaultPortalTo: box(\"#some-element\") });\n *\n * // Child components will inherit this config and can override specific values\n * const childConfig = useBitsConfig({ someOtherProp: box(\"value\") });\n * // childConfig still has defaultPortalTo=\"#some-element\" from parent\n * ```\n */\nexport function useBitsConfig(opts) {\n return BitsConfigContext.set(new BitsConfigState(BitsConfigContext.getOr(null), opts));\n}\n/**\n * Configuration state that inherits from parent configurations.\n *\n * @example\n * Config resolution:\n * ```\n * Level 1: { defaultPortalTo: \"#some-element\", theme: \"dark\" }\n * Level 2: { spacing: \"large\" } // inherits defaultPortalTo=\"#some-element\", theme=\"dark\"\n * Level 3: { theme: \"light\" } // inherits defaultPortalTo=\"#some-element\", spacing=\"large\", overrides theme=\"light\"\n * ```\n */\nexport class BitsConfigState {\n opts;\n constructor(parent, opts) {\n const resolveConfigOption = createConfigResolver(parent, opts);\n this.opts = {\n defaultPortalTo: resolveConfigOption((config) => config.defaultPortalTo),\n defaultLocale: resolveConfigOption((config) => config.defaultLocale),\n };\n }\n}\n/**\n * Returns a config resolver that resolves a given config option's value.\n *\n * The resolver creates reactive boxes that resolve config option values using this priority:\n * 1. Current level's value (if defined)\n * 2. Parent level's value (if defined and current is undefined)\n * 3. `undefined` (if no value is found in either parent or child)\n *\n * @param parent - Parent configuration state (null if this is root level)\n * @param currentOpts - Current level's configuration options\n *\n * @example\n * ```typescript\n * // Given this hierarchy:\n * // Root: { defaultPortalTo: \"#some-element\" }\n * // Child: { someOtherProp: \"value\" } // no defaultPortalTo specified\n *\n * const resolveConfigOption = createConfigResolver(parent, opts);\n * const portalTo = resolveConfigOption(config => config.defaultPortalTo);\n *\n * // portalTo.current === \"#some-element\" (inherited from parent)\n * // even when child didn't specify `defaultPortalTo`\n * ```\n */\nfunction createConfigResolver(parent, currentOpts) {\n return (getter) => {\n const configOption = boxWith(() => {\n // try current opts first\n const value = getter(currentOpts)?.current;\n if (value !== undefined)\n return value;\n // if no parent, return undefined\n if (parent === null)\n return undefined;\n // get value from parent (which already has its own chain resolved)\n return getter(parent.opts)?.current;\n });\n return configOption;\n };\n}\n","import { boxWith } from \"svelte-toolbelt\";\nimport { getBitsConfig } from \"./bits-config.js\";\n/**\n * Creates a generic prop resolver that follows a standard priority chain:\n * 1. The getter's prop value (if defined)\n * 2. The config default value (if no getter prop value is defined)\n * 3. The fallback value (if no config value found)\n */\nfunction createPropResolver(configOption, fallback) {\n return (getProp) => {\n const config = getBitsConfig();\n return boxWith(() => {\n // 1. return the prop's value, if provided\n const propValue = getProp();\n if (propValue !== undefined)\n return propValue;\n // 2. return the resolved config option value, if available\n const option = configOption(config).current;\n if (option !== undefined)\n return option;\n // 3. return the fallback if no other value is found\n return fallback;\n });\n };\n}\n/**\n * Resolves a locale value using the prop, the config default, or a fallback.\n *\n * Default value: `\"en\"`\n */\nexport const resolveLocaleProp = createPropResolver((config) => config.defaultLocale, \"en\");\n/**\n * Resolves a portal's `to` value using the prop, the config default, or a fallback.\n *\n * Default value: `\"body\"`\n */\nexport const resolvePortalToProp = createPropResolver((config) => config.defaultPortalTo, \"body\");\n","<script lang=\"ts\">\n\timport { getAllContexts, mount, unmount } from \"svelte\";\n\timport { DEV } from \"esm-env\";\n\timport { watch } from \"runed\";\n\timport PortalConsumer from \"./portal-consumer.svelte\";\n\timport type { PortalProps } from \"./types.js\";\n\timport { isBrowser } from \"../../../internal/is.js\";\n\timport { resolvePortalToProp } from \"../config/prop-resolvers.js\";\n\n\tlet { to: toProp, children, disabled }: PortalProps = $props();\n\n\tconst to = resolvePortalToProp(() => toProp);\n\tconst context = getAllContexts();\n\n\tlet target = $derived(getTarget());\n\n\tfunction getTarget() {\n\t\tif (!isBrowser || disabled) return null;\n\n\t\tlet localTarget: Element | null = null;\n\n\t\tif (typeof to.current === \"string\") {\n\t\t\tconst target = document.querySelector(to.current);\n\t\t\tif (DEV && target === null) {\n\t\t\t\tthrow new Error(`Target element \"${to.current}\" not found.`);\n\t\t\t}\n\t\t\tlocalTarget = target;\n\t\t} else {\n\t\t\tlocalTarget = to.current;\n\t\t}\n\n\t\tif (DEV && !(localTarget instanceof Element)) {\n\t\t\tconst type = localTarget === null ? \"null\" : typeof localTarget;\n\t\t\tthrow new TypeError(\n\t\t\t\t`Unknown portal target type: ${type}. Allowed types: string (query selector) or Element.`\n\t\t\t);\n\t\t}\n\n\t\treturn localTarget;\n\t}\n\n\tlet instance: ReturnType<typeof mount> | null;\n\n\tfunction unmountInstance() {\n\t\tif (instance) {\n\t\t\tunmount(instance);\n\t\t\tinstance = null;\n\t\t}\n\t}\n\n\twatch([() => target, () => disabled], ([target, disabled]) => {\n\t\tif (!target || disabled) {\n\t\t\tunmountInstance();\n\t\t\treturn;\n\t\t}\n\t\tinstance = mount(PortalConsumer, {\n\t\t\ttarget: target,\n\t\t\tprops: { children },\n\t\t\tcontext,\n\t\t});\n\n\t\treturn () => {\n\t\t\tunmountInstance();\n\t\t};\n\t});\n</script>\n\n{#if disabled}\n\t{@render children?.()}\n{/if}\n","// oxlint-disable-next-line no-explicit-any\nexport function debounce(fn, wait = 500) {\n let timeout = null;\n let pendingArgs = null;\n const debounced = (...args) => {\n debounced.destroy();\n pendingArgs = args;\n timeout = setTimeout(debounced.flush, wait);\n };\n /** Runs the pending call now, if there is one. */\n debounced.flush = () => {\n if (pendingArgs === null)\n return;\n const args = pendingArgs;\n debounced.destroy();\n fn(...args);\n };\n debounced.destroy = () => {\n if (timeout !== null) {\n clearTimeout(timeout);\n timeout = null;\n }\n pendingArgs = null;\n };\n return debounced;\n}\n","export function isOrContainsTarget(node, target) {\n return node === target || node.contains(target);\n}\nexport function getOwnerDocument(el) {\n return el?.ownerDocument ?? document;\n}\n","export function getFirstNonCommentChild(element) {\n if (!element)\n return null;\n for (const child of element.childNodes) {\n if (child.nodeType !== Node.COMMENT_NODE) {\n return child;\n }\n }\n return null;\n}\n/**\n * Determines if the click event truly occurred outside the content node.\n * This was added to handle password managers and other elements that may be injected\n * into the DOM but visually appear inside the content.\n */\nexport function isClickTrulyOutside(event, contentNode) {\n const { clientX, clientY } = event;\n const rect = contentNode.getBoundingClientRect();\n return (clientX < rect.left || clientX > rect.right || clientY < rect.top || clientY > rect.bottom);\n}\n","export const CONTEXT_MENU_TRIGGER_ATTR = \"data-context-menu-trigger\";\nexport const CONTEXT_MENU_CONTENT_ATTR = \"data-context-menu-content\";\n","import { afterTick, executeCallbacks, onDestroyEffect, } from \"svelte-toolbelt\";\nimport { watch } from \"runed\";\nimport { untrack } from \"svelte\";\nimport { on } from \"svelte/events\";\nimport {} from \"../../../internal/events.js\";\nimport { debounce } from \"../../../internal/debounce.js\";\nimport { noop } from \"../../../internal/noop.js\";\nimport { getOwnerDocument, isOrContainsTarget } from \"../../../internal/elements.js\";\nimport { isElementOrSVGElement } from \"../../../internal/is.js\";\nimport { isClickTrulyOutside } from \"../../../internal/dom.js\";\nimport { CONTEXT_MENU_CONTENT_ATTR, CONTEXT_MENU_TRIGGER_ATTR, } from \"../../menu/context-menu-attributes.js\";\nglobalThis.bitsDismissableLayers ??= new Map();\nexport class DismissibleLayerState {\n static create(opts) {\n return new DismissibleLayerState(opts);\n }\n opts;\n #interactOutsideProp;\n #behaviorType;\n #interceptedEvents = {\n pointerdown: false,\n };\n #isResponsibleLayer = false;\n #capturedPointerDown = null;\n #isFocusInsideDOMTree = false;\n #documentObj = undefined;\n #onFocusOutside;\n #unsubClickListener = noop;\n /**\n * Set once the layer is torn down. Deferred work scheduled before teardown can\n * still run afterwards, so every such callback must short-circuit on this\n * before reading `this.opts.ref.current` — reading a destroyed `$derived`\n * triggers Svelte's `derived_inert` warning. A class field rather than a\n * constructor local so the class-field handlers below can see it too.\n */\n #destroyed = false;\n constructor(opts) {\n this.opts = opts;\n this.#behaviorType = opts.interactOutsideBehavior;\n this.#interactOutsideProp = opts.onInteractOutside;\n this.#onFocusOutside = opts.onFocusOutside;\n let unsubEvents = noop;\n let registeredNode = null;\n const cleanup = () => {\n registeredNode = null;\n this.#resetState();\n globalThis.bitsDismissableLayers.delete(this);\n this.#handleInteractOutside.destroy();\n this.#unsubClickListener();\n unsubEvents();\n };\n watch([() => this.opts.enabled.current, () => this.opts.ref.current], ([enabled, node]) => {\n const nextNode = enabled ? node : null;\n // Ref boxes can invalidate without changing the DOM node during opening.\n // Keep an in-flight interaction when this is still the same registration.\n if (registeredNode === nextNode)\n return;\n cleanup();\n if (!nextNode)\n return;\n registeredNode = nextNode;\n this.#documentObj = getOwnerDocument(nextNode);\n globalThis.bitsDismissableLayers.set(this, this.#behaviorType);\n unsubEvents = this.#addEventListeners();\n });\n onDestroyEffect(() => {\n this.#destroyed = true;\n cleanup();\n });\n }\n #handleFocus = (event) => {\n if (event.defaultPrevented)\n return;\n if (this.#destroyed || !this.opts.ref.current)\n return;\n afterTick(() => {\n // The layer can be destroyed between the focus event and this tick — a\n // focus change is frequently what closes it. `#destroyed` must\n // short-circuit before any `this.opts.ref.current` read.\n if (this.#destroyed)\n return;\n if (!this.opts.ref.current || this.#isTargetWithinLayer(event.target))\n return;\n if (event.target && !this.#isFocusInsideDOMTree) {\n this.#onFocusOutside.current?.(event);\n }\n });\n };\n #addEventListeners() {\n const document = this.#documentObj;\n const onPointerDownCapture = (event) => {\n untrack(() => {\n // settle the previous interaction before this one overwrites its state\n this.#handleInteractOutside.flush();\n this.#markInterceptedEvent(event);\n this.#markResponsibleLayer(event);\n });\n };\n const onPointerDown = (event) => {\n // Ignore stopped events and bubble-only events such as the opening pointerdown.\n // It can resume bubbling after a nested early outside click has been captured.\n if (event.cancelBubble || event !== this.#capturedPointerDown)\n return;\n this.#markNonInterceptedEvent(event);\n if (event.pointerType === \"touch\") {\n // a tap's click can follow its pointerdown within a millisecond (WebKit), so\n // arm the click listener now rather than after the debounce flushes\n this.#handleInteractOutside.destroy();\n this.#interactOutside(event);\n }\n else {\n this.#handleInteractOutside(event);\n }\n };\n // `svelte/events.on` defers pointer listener attachment to a microtask, leaving\n // a gap even without a registration timer. Document is already connected, so\n // attach immediately. Only layers present at capture can own this interaction;\n // a layer opened by its target/bubble handlers must not dismiss itself.\n document.addEventListener(\"pointerdown\", onPointerDownCapture, true);\n document.addEventListener(\"pointerdown\", onPointerDown);\n return executeCallbacks(() => document.removeEventListener(\"pointerdown\", onPointerDownCapture, true), () => document.removeEventListener(\"pointerdown\", onPointerDown), on(document, \"focusin\", this.#handleFocus));\n }\n #handleDismiss = (e) => {\n let event = e;\n if (event.defaultPrevented) {\n event = createWrappedEvent(e);\n }\n this.#interactOutsideProp.current(e);\n };\n #interactOutside = (e) => {\n if (!this.opts.ref.current) {\n this.#unsubClickListener();\n return;\n }\n const isEventValid = this.opts.isValidEvent.current(e, this.opts.ref.current) ||\n isValidEvent(e, this.opts.ref.current);\n if (!this.#isResponsibleLayer || this.#isAnyEventIntercepted() || !isEventValid) {\n this.#unsubClickListener();\n return;\n }\n let event = e;\n if (event.defaultPrevented) {\n event = createWrappedEvent(event);\n }\n if (this.#behaviorType.current !== \"close\" &&\n this.#behaviorType.current !== \"defer-otherwise-close\") {\n this.#unsubClickListener();\n return;\n }\n if (e.pointerType === \"touch\") {\n this.#unsubClickListener();\n // the tap's click dismisses from the bubble phase, as before. A capture-phase\n // listener backs it up with a task, so a target that stops propagation cannot\n // hide the click, while a target that closes this layer still tears it down\n // (and the backup with it) before the task runs.\n let backup = null;\n let unsubClick = noop;\n const dismiss = (event) => {\n unsubClick();\n this.#handleDismiss(event);\n };\n unsubClick = executeCallbacks(on(this.#documentObj, \"click\", dismiss, { once: true }), on(this.#documentObj, \"click\", (event) => {\n backup = setTimeout(() => dismiss(event), 0);\n }, { once: true, capture: true }), () => {\n if (backup !== null)\n clearTimeout(backup);\n backup = null;\n });\n this.#unsubClickListener = unsubClick;\n }\n else {\n this.#interactOutsideProp.current(event);\n }\n };\n #handleInteractOutside = debounce(this.#interactOutside, 10);\n #markInterceptedEvent = (e) => {\n this.#interceptedEvents[e.type] = true;\n };\n #markNonInterceptedEvent = (e) => {\n this.#interceptedEvents[e.type] = false;\n };\n #markResponsibleLayer = (event) => {\n this.#capturedPointerDown = event;\n if (!this.opts.ref.current)\n return;\n this.#isResponsibleLayer = isResponsibleLayer(this.opts.ref.current);\n };\n #isTargetWithinLayer = (target) => {\n if (!this.opts.ref.current)\n return false;\n return isOrContainsTarget(this.opts.ref.current, target);\n };\n /**\n * Resets the per-interaction state. Must stay synchronous.\n *\n * This was a `debounce(..., 20)` from when it was also wired to a capture-phase\n * interaction-end listener and had to land after the 10ms `#handleInteractOutside`\n * debounce. That listener is gone, but the debounce stayed on the `cleanup()` path —\n * and because `watch` runs `cleanup()` once per open (`ref` goes null -> node), every\n * layer scheduled a reset 20ms into its own lifetime. An outside `pointerdown` landing\n * 10-20ms after that cleanup would have its `#isResponsibleLayer` flag cleared by the\n * stale reset in the gap before the debounced `#handleInteractOutside` ran, which then\n * bailed and left the layer open. `cleanup()` destroys `#handleInteractOutside` anyway,\n * so nothing is left in flight that needs to observe the pre-reset state.\n */\n #resetState = () => {\n for (const eventType in this.#interceptedEvents) {\n this.#interceptedEvents[eventType] = false;\n }\n this.#isResponsibleLayer = false;\n this.#capturedPointerDown = null;\n };\n #isAnyEventIntercepted() {\n const i = Object.values(this.#interceptedEvents).some(Boolean);\n return i;\n }\n #onfocuscapture = () => {\n this.#isFocusInsideDOMTree = true;\n };\n #onblurcapture = () => {\n this.#isFocusInsideDOMTree = false;\n };\n props = {\n onfocuscapture: this.#onfocuscapture,\n onblurcapture: this.#onblurcapture,\n };\n}\nexport function getTopMostDismissableLayer(layersArr = [\n ...globalThis.bitsDismissableLayers,\n]) {\n return layersArr.findLast(([_, { current: behaviorType }]) => behaviorType === \"close\" || behaviorType === \"ignore\");\n}\nfunction isResponsibleLayer(node) {\n const layersArr = [...globalThis.bitsDismissableLayers];\n /**\n * We first check if we can find a top layer with `close` or `ignore`.\n * If that top layer was found and matches the provided node, then the node is\n * responsible for the outside interaction. Otherwise, we know that all layers defer so\n * the first layer is the responsible one.\n */\n const topMostLayer = getTopMostDismissableLayer(layersArr);\n if (topMostLayer)\n return topMostLayer[0].opts.ref.current === node;\n const [firstLayerNode] = layersArr[0];\n return firstLayerNode.opts.ref.current === node;\n}\nfunction isValidEvent(e, node) {\n const target = e.target;\n if (!isElementOrSVGElement(target))\n return false;\n const targetIsContextMenuTrigger = Boolean(target.closest(`[${CONTEXT_MENU_TRIGGER_ATTR}]`));\n const nodeIsContextMenu = Boolean(node.closest(`[${CONTEXT_MENU_CONTENT_ATTR}]`));\n if (\"button\" in e && e.button > 0 && !targetIsContextMenuTrigger)\n return false;\n if (\"button\" in e && e.button === 0 && targetIsContextMenuTrigger && nodeIsContextMenu) {\n return true;\n }\n if (targetIsContextMenuTrigger && nodeIsContextMenu)\n return false;\n const ownerDocument = getOwnerDocument(target);\n const isValid = ownerDocument.documentElement.contains(target) &&\n !isOrContainsTarget(node, target) &&\n isClickTrulyOutside(e, node);\n return isValid;\n}\nfunction createWrappedEvent(e) {\n const capturedCurrentTarget = e.currentTarget;\n const capturedTarget = e.target;\n let newEvent;\n if (e instanceof PointerEvent) {\n newEvent = new PointerEvent(e.type, e);\n }\n else {\n newEvent = new PointerEvent(\"pointerdown\", e);\n }\n // track the prevented state separately\n let isPrevented = false;\n // Create a proxy to intercept property access and method calls\n const wrappedEvent = new Proxy(newEvent, {\n get: (target, prop) => {\n if (prop === \"currentTarget\") {\n return capturedCurrentTarget;\n }\n if (prop === \"target\") {\n return capturedTarget;\n }\n if (prop === \"preventDefault\") {\n return () => {\n isPrevented = true;\n if (typeof target.preventDefault === \"function\") {\n target.preventDefault();\n }\n };\n }\n if (prop === \"defaultPrevented\") {\n return isPrevented;\n }\n if (prop in target) {\n // oxlint-disable-next-line no-explicit-any\n return target[prop];\n }\n // oxlint-disable-next-line no-explicit-any\n return e[prop];\n },\n });\n return wrappedEvent;\n}\n","<script lang=\"ts\">\n\timport { boxWith } from \"svelte-toolbelt\";\n\timport { untrack } from \"svelte\";\n\timport type { DismissibleLayerImplProps } from \"./types.js\";\n\timport { DismissibleLayerState } from \"./use-dismissable-layer.svelte.js\";\n\timport { noop } from \"../../../internal/noop.js\";\n\n\tlet {\n\t\tinteractOutsideBehavior = \"close\",\n\t\tonInteractOutside = noop,\n\t\tonFocusOutside = noop,\n\t\tid,\n\t\tchildren,\n\t\tenabled,\n\t\tisValidEvent = () => false,\n\t\tref,\n\t}: DismissibleLayerImplProps = $props();\n\n\tconst dismissibleLayerState = DismissibleLayerState.create({\n\t\tid: boxWith(() => id),\n\t\tinteractOutsideBehavior: boxWith(() => interactOutsideBehavior),\n\t\tonInteractOutside: boxWith(() => onInteractOutside),\n\t\tenabled: boxWith(() => enabled),\n\t\tonFocusOutside: boxWith(() => onFocusOutside),\n\t\tisValidEvent: boxWith(() => isValidEvent),\n\t\tref: untrack(() => ref),\n\t});\n</script>\n\n{@render children?.({ props: dismissibleLayerState.props })}\n","import { DOMContext } from \"svelte-toolbelt\";\nimport { watch } from \"runed\";\nimport { on } from \"svelte/events\";\nimport { kbd } from \"../../../internal/kbd.js\";\nimport { noop } from \"../../../internal/noop.js\";\nglobalThis.bitsEscapeLayers ??= new Map();\nexport class EscapeLayerState {\n static create(opts) {\n return new EscapeLayerState(opts);\n }\n opts;\n domContext;\n constructor(opts) {\n this.opts = opts;\n this.domContext = new DOMContext(this.opts.ref);\n let unsubEvents = noop;\n watch(() => opts.enabled.current, (enabled) => {\n if (enabled) {\n globalThis.bitsEscapeLayers.set(this, opts.escapeKeydownBehavior);\n unsubEvents = this.#addEventListener();\n }\n return () => {\n unsubEvents();\n globalThis.bitsEscapeLayers.delete(this);\n };\n });\n }\n #addEventListener = () => {\n return on(this.domContext.getDocument(), \"keydown\", this.#onkeydown, { passive: false });\n };\n #onkeydown = (e) => {\n if (e.key !== kbd.ESCAPE || !isResponsibleEscapeLayer(this))\n return;\n const clonedEvent = new KeyboardEvent(e.type, e);\n e.preventDefault();\n const behaviorType = this.opts.escapeKeydownBehavior.current;\n if (behaviorType !== \"close\" && behaviorType !== \"defer-otherwise-close\")\n return;\n this.opts.onEscapeKeydown.current(clonedEvent);\n };\n}\nfunction isResponsibleEscapeLayer(instance) {\n const layersArr = [...globalThis.bitsEscapeLayers];\n /**\n * We first check if we can find a top layer with `close` or `ignore`.\n * If that top layer was found and matches the provided node, then the node is\n * responsible for the escape. Otherwise, we know that all layers defer so\n * the first layer is the responsible one.\n */\n const topMostLayer = layersArr.findLast(([_, { current: behaviorType }]) => behaviorType === \"close\" || behaviorType === \"ignore\");\n if (topMostLayer)\n return topMostLayer[0] === instance;\n const [firstLayerNode] = layersArr[0];\n return firstLayerNode === instance;\n}\n","<script lang=\"ts\">\n\timport { boxWith } from \"svelte-toolbelt\";\n\timport { untrack } from \"svelte\";\n\timport type { EscapeLayerImplProps } from \"./types.js\";\n\timport { EscapeLayerState } from \"./use-escape-layer.svelte.js\";\n\timport { noop } from \"../../../internal/noop.js\";\n\n\tlet {\n\t\tescapeKeydownBehavior = \"close\",\n\t\tonEscapeKeydown = noop,\n\t\tchildren,\n\t\tenabled,\n\t\tref,\n\t}: EscapeLayerImplProps = $props();\n\n\tEscapeLayerState.create({\n\t\tescapeKeydownBehavior: boxWith(() => escapeKeydownBehavior),\n\t\tonEscapeKeydown: boxWith(() => onEscapeKeydown),\n\t\tenabled: boxWith(() => enabled),\n\t\tref: untrack(() => ref),\n\t});\n</script>\n\n{@render children?.()}\n","import { getActiveElement, simpleBox } from \"svelte-toolbelt\";\nimport { FocusScope } from \"./focus-scope.svelte.js\";\nexport class FocusScopeManager {\n static instance;\n #scopeStack = simpleBox([]);\n #focusHistory = new WeakMap();\n #preFocusHistory = new WeakMap();\n static getInstance() {\n if (!this.instance) {\n this.instance = new FocusScopeManager();\n }\n return this.instance;\n }\n register(scope) {\n const current = this.getActive();\n if (current && current !== scope) {\n current.pause();\n }\n // capture the currently focused element before this scope becomes active\n const activeElement = getActiveElement(document);\n if (activeElement && activeElement !== document.body) {\n this.#preFocusHistory.set(scope, activeElement);\n }\n this.#scopeStack.current = this.#scopeStack.current.filter((s) => s !== scope);\n this.#scopeStack.current.unshift(scope);\n // the incoming scope may still be paused from an earlier registration\n scope.resume();\n }\n unregister(scope) {\n this.#scopeStack.current = this.#scopeStack.current.filter((s) => s !== scope);\n const next = this.getActive();\n if (next) {\n next.resume();\n }\n }\n getActive() {\n return this.#scopeStack.current[0];\n }\n setFocusMemory(scope, element) {\n this.#focusHistory.set(scope, element);\n }\n getFocusMemory(scope) {\n return this.#focusHistory.get(scope);\n }\n isActiveScope(scope) {\n return this.getActive() === scope;\n }\n setPreFocusMemory(scope, element) {\n this.#preFocusHistory.set(scope, element);\n }\n getPreFocusMemory(scope) {\n return this.#preFocusHistory.get(scope);\n }\n clearPreFocusMemory(scope) {\n this.#preFocusHistory.delete(scope);\n }\n}\n","/*!\n* tabbable 6.5.1\n* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE\n*/\n// NOTE: separate `:not()` selectors has broader browser support than the newer\n// `:not([inert], [inert] *)` (Feb 2023)\nvar candidateSelectors = ['input:not([inert]):not([inert] *)', 'select:not([inert]):not([inert] *)', 'textarea:not([inert]):not([inert] *)', 'a[href]:not([inert]):not([inert] *)', 'area[href]:not([inert]):not([inert] *)', 'button:not([inert]):not([inert] *)', '[tabindex]:not(slot):not([inert]):not([inert] *)', 'audio[controls]:not([inert]):not([inert] *)', 'video[controls]:not([inert]):not([inert] *)', '[contenteditable]:not([contenteditable=\"false\"]):not([inert]):not([inert] *)', 'details>summary:first-of-type:not([inert]):not([inert] *)', 'details:not([inert]):not([inert] *)'];\nvar candidateSelector = /* #__PURE__ */candidateSelectors.join(',');\nvar NoElement = typeof Element === 'undefined';\nvar matches = NoElement ? function () {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\nvar getRootNode = !NoElement && Element.prototype.getRootNode ? function (element) {\n return element == null || element.getRootNode == null ? void 0 : element.getRootNode();\n} : function (element) {\n return element == null ? void 0 : element.ownerDocument;\n};\n\n/**\n * Determines if a node is inert or in an inert ancestor.\n * @param {Node} [node]\n * @param {boolean} [lookUp] If true and `node` is not inert, looks up at ancestors to\n * see if any of them are inert. If false, only `node` itself is considered.\n * @returns {boolean} True if inert itself or by way of being in an inert ancestor.\n * False if `node` is falsy.\n */\nvar _isInert = function isInert(node, lookUp) {\n if (lookUp === void 0) {\n lookUp = true;\n }\n // CAREFUL: JSDom does not support inert at all, so we can't use the `HTMLElement.inert`\n // JS API property; we have to check the attribute, which can either be empty or 'true';\n // if it's `null` (not specified) or 'false', it's an active element\n var inertAtt = node == null || node.getAttribute == null ? void 0 : node.getAttribute('inert');\n var inert = inertAtt === '' || inertAtt === 'true';\n\n // NOTE: this could also be handled with `node.matches('[inert], :is([inert] *)')`\n // if it weren't for `matches()` not being a function on shadow roots; the following\n // code works for any kind of node\n var result = inert || lookUp && node && (\n // closest does not exist on shadow roots, so we fall back to a manual\n // lookup upward, in case it is not defined.\n typeof node.closest === 'function' ? node.closest('[inert]') : _isInert(node.parentNode));\n return result;\n};\n\n/**\n * Determines if a node's content is editable.\n * @param {Element} [node]\n * @returns True if it's content-editable; false if it's not or `node` is falsy.\n */\nvar isContentEditable = function isContentEditable(node) {\n var _node$getAttribute;\n // CAREFUL: JSDom does not support the `HTMLElement.isContentEditable` API so we have\n // to use the case-insensitive attribute directly: empty, 'true', and 'plaintext-only'\n // are editable states; `null` (not specified) and 'false' are not.\n var attValue = node == null || node.getAttribute == null || (_node$getAttribute = node.getAttribute('contenteditable')) == null ? void 0 : _node$getAttribute.toLowerCase();\n return attValue === '' || attValue === 'true' || attValue === 'plaintext-only';\n};\n\n/**\n * @param {Element} el container to check in\n * @param {boolean} includeContainer add container to check\n * @param {(node: Element) => boolean} filter filter candidates\n * @returns {Element[]}\n */\nvar getCandidates = function getCandidates(el, includeContainer, filter) {\n // even if `includeContainer=false`, we still have to check it for inertness because\n // if it's inert (either by itself or via its parent), then all its children are inert\n if (_isInert(el)) {\n return [];\n }\n var candidates = Array.prototype.slice.apply(el.querySelectorAll(candidateSelector));\n if (includeContainer && matches.call(el, candidateSelector)) {\n candidates.unshift(el);\n }\n candidates = candidates.filter(filter);\n return candidates;\n};\n\n/**\n * @callback GetShadowRoot\n * @param {Element} element to check for shadow root\n * @returns {ShadowRoot|boolean} ShadowRoot if available or boolean indicating if a shadowRoot is attached but not available.\n */\n\n/**\n * @callback ShadowRootFilter\n * @param {Element} shadowHostNode the element which contains shadow content\n * @returns {boolean} true if a shadow root could potentially contain valid candidates.\n */\n\n/**\n * @typedef {Object} CandidateScope\n * @property {Element} scopeParent contains inner candidates\n * @property {Element[]} candidates list of candidates found in the scope parent\n */\n\n/**\n * @typedef {Object} IterativeOptions\n * @property {GetShadowRoot|boolean} getShadowRoot true if shadow support is enabled; falsy if not;\n * if a function, implies shadow support is enabled and either returns the shadow root of an element\n * or a boolean stating if it has an undisclosed shadow root\n * @property {(node: Element) => boolean} filter filter candidates\n * @property {boolean} flatten if true then result will flatten any CandidateScope into the returned list\n * @property {ShadowRootFilter} shadowRootFilter filter shadow roots;\n */\n\n/**\n * @param {Element[]} elements list of element containers to match candidates from\n * @param {boolean} includeContainer add container list to check\n * @param {IterativeOptions} options\n * @returns {Array.<Element|CandidateScope>}\n */\nvar _getCandidatesIteratively = function getCandidatesIteratively(elements, includeContainer, options) {\n var candidates = [];\n var elementsToCheck = Array.from(elements);\n while (elementsToCheck.length) {\n var element = elementsToCheck.shift();\n if (_isInert(element, false)) {\n // no need to look up since we're drilling down\n // anything inside this container will also be inert\n continue;\n }\n if (element.tagName === 'SLOT') {\n // add shadow dom slot scope (slot itself cannot be focusable)\n var assigned = element.assignedElements();\n var content = assigned.length ? assigned : element.children;\n var nestedCandidates = _getCandidatesIteratively(content, true, options);\n if (options.flatten) {\n candidates.push.apply(candidates, nestedCandidates);\n } else {\n candidates.push({\n scopeParent: element,\n candidates: nestedCandidates\n });\n }\n } else {\n // check candidate element\n var validCandidate = matches.call(element, candidateSelector);\n if (validCandidate && options.filter(element) && (includeContainer || !elements.includes(element))) {\n candidates.push(element);\n }\n\n // iterate over shadow content if possible\n var shadowRoot = element.shadowRoot ||\n // check for an undisclosed shadow\n typeof options.getShadowRoot === 'function' && options.getShadowRoot(element);\n\n // no inert look up because we're already drilling down and checking for inertness\n // on the way down, so all containers to this root node should have already been\n // vetted as non-inert\n var validShadowRoot = !_isInert(shadowRoot, false) && (!options.shadowRootFilter || options.shadowRootFilter(element));\n if (shadowRoot && validShadowRoot) {\n // add shadow dom scope IIF a shadow root node was given; otherwise, an undisclosed\n // shadow exists, so look at light dom children as fallback BUT create a scope for any\n // child candidates found because they're likely slotted elements (elements that are\n // children of the web component element (which has the shadow), in the light dom, but\n // slotted somewhere _inside_ the undisclosed shadow) -- the scope is created below,\n // _after_ we return from this recursive call\n var _nestedCandidates = _getCandidatesIteratively(shadowRoot === true ? element.children : shadowRoot.children, true, options);\n if (options.flatten) {\n candidates.push.apply(candidates, _nestedCandidates);\n } else {\n candidates.push({\n scopeParent: element,\n candidates: _nestedCandidates\n });\n }\n } else {\n // there's not shadow so just dig into the element's (light dom) children\n // __without__ giving the element special scope treatment\n elementsToCheck.unshift.apply(elementsToCheck, element.children);\n }\n }\n }\n return candidates;\n};\n\n/**\n * @private\n * Determines if the node has an explicitly specified `tabindex` attribute.\n * @param {HTMLElement} node\n * @returns {boolean} True if so; false if not.\n */\nvar hasTabIndex = function hasTabIndex(node) {\n return !isNaN(parseInt(node.getAttribute('tabindex'), 10));\n};\n\n/**\n * Determine the tab index of a given node.\n * @param {HTMLElement} node\n * @returns {number} Tab order (negative, 0, or positive number).\n * @throws {Error} If `node` is falsy.\n */\nvar getTabIndex = function getTabIndex(node) {\n if (!node) {\n throw new Error('No node provided');\n }\n if (node.tabIndex < 0) {\n // in Chrome, <details/>, <audio controls/> and <video controls/> elements get a default\n // `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,\n // yet they are still part of the regular tab order; in FF, they get a default\n // `tabIndex` of 0; since Chrome still puts those elements in the regular tab\n // order, consider their tab index to be 0.\n // Also browsers do not return `tabIndex` correctly for contentEditable nodes;\n // so if they don't have a tabindex attribute specifically set, assume it's 0.\n if ((/^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) || isContentEditable(node)) && !hasTabIndex(node)) {\n return 0;\n }\n }\n return node.tabIndex;\n};\n\n/**\n * Determine the tab index of a given node __for sort order purposes__.\n * @param {HTMLElement} node\n * @param {boolean} [isScope] True for a custom element with shadow root or slot that, by default,\n * has tabIndex -1, but needs to be sorted by document order in order for its content to be\n * inserted into the correct sort position.\n * @returns {number} Tab order (negative, 0, or positive number).\n */\nvar getSortOrderTabIndex = function getSortOrderTabIndex(node, isScope) {\n var tabIndex = getTabIndex(node);\n if (tabIndex < 0 && isScope && !hasTabIndex(node)) {\n return 0;\n }\n return tabIndex;\n};\nvar sortOrderedTabbables = function sortOrderedTabbables(a, b) {\n return a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex;\n};\nvar isInput = function isInput(node) {\n return node.tagName === 'INPUT';\n};\nvar isHiddenInput = function isHiddenInput(node) {\n return isInput(node) && node.type === 'hidden';\n};\nvar isDetailsWithSummary = function isDetailsWithSummary(node) {\n var r = node.tagName === 'DETAILS' && Array.prototype.slice.apply(node.children).some(function (child) {\n return child.tagName === 'SUMMARY';\n });\n return r;\n};\nvar getCheckedRadio = function getCheckedRadio(nodes, form) {\n for (var i = 0; i < nodes.length; i++) {\n if (nodes[i].checked && nodes[i].form === form) {\n return nodes[i];\n }\n }\n};\nvar isTabbableRadio = function isTabbableRadio(node) {\n if (!node.name) {\n return true;\n }\n var radioScope = node.form || getRootNode(node);\n var queryRadios = function queryRadios(name) {\n return radioScope.querySelectorAll('input[type=\"radio\"][name=\"' + name + '\"]');\n };\n var radioSet;\n if (typeof window !== 'undefined' && typeof window.CSS !== 'undefined' && typeof window.CSS.escape === 'function') {\n radioSet = queryRadios(window.CSS.escape(node.name));\n } else {\n try {\n radioSet = queryRadios(node.name);\n } catch (err) {\n // eslint-disable-next-line no-console\n console.error('Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s', err.message);\n return false;\n }\n }\n var checked = getCheckedRadio(radioSet, node.form);\n return !checked || checked === node;\n};\nvar isRadio = function isRadio(node) {\n return isInput(node) && node.type === 'radio';\n};\nvar isNonTabbableRadio = function isNonTabbableRadio(node) {\n return isRadio(node) && !isTabbableRadio(node);\n};\n\n// determines if a node is ultimately attached to the window's document\nvar isNodeAttached = function isNodeAttached(node) {\n var _nodeRoot;\n // The root node is the shadow root if the node is in a shadow DOM; some document otherwise\n // (but NOT _the_ document; see second 'If' comment below for more).\n // If rootNode is shadow root, it'll have a host, which is the element to which the shadow\n // is attached, and the one we need to check if it's in the document or not (because the\n // shadow, and all nodes it contains, is never considered in the document since shadows\n // behave like self-contained DOMs; but if the shadow's HOST, which is part of the document,\n // is hidden, or is not in the document itself but is detached, it will affect the shadow's\n // visibility, including all the nodes it contains). The host could be any normal node,\n // or a custom element (i.e. web component). Either way, that's the one that is considered\n // part of the document, not the shadow root, nor any of its children (i.e. the node being\n // tested).\n // To further complicate things, we have to look all the way up until we find a shadow HOST\n // that is attached (or find none) because the node might be in nested shadows...\n // If rootNode is not a shadow root, it won't have a host, and so rootNode should be the\n // document (per the docs) and while it's a Document-type object, that document does not\n // appear to be the same as the node's `ownerDocument` for some reason, so it's safer\n // to ignore the rootNode at this point, and use `node.ownerDocument`. Otherwise,\n // using `rootNode.contains(node)` will _always_ be true we'll get false-positives when\n // node is actually detached.\n // NOTE: If `nodeRootHost` or `node` happens to be the `document` itself (which is possible\n // if a tabbable/focusable node was quickly added to the DOM, focused, and then removed\n // from the DOM as in https://github.com/focus-trap/focus-trap-react/issues/905), then\n // `ownerDocument` will be `null`, hence the optional chaining on it.\n var nodeRoot = node && getRootNode(node);\n var nodeRootHost = (_nodeRoot = nodeRoot) == null ? void 0 : _nodeRoot.host;\n\n // in some cases, a detached node will return itself as the root instead of a document or\n // shadow root object, in which case, we shouldn't try to look further up the host chain\n var attached = false;\n if (nodeRoot && nodeRoot !== node) {\n var _nodeRootHost, _node$ownerDocument;\n attached = !!((_nodeRootHost = nodeRootHost) != null && (_nodeRootHost = _nodeRootHost.ownerDocument) != null && _nodeRootHost.contains(nodeRootHost) || node != null && (_node$ownerDocument = node.ownerDocument) != null && _node$ownerDocument.contains(node));\n while (!attached && nodeRootHost) {\n var _nodeRoot2, _nodeRootHost2;\n // since it's not attached and we have a root host, the node MUST be in a nested shadow DOM,\n // which means we need to get the host's host and check if that parent host is contained\n // in (i.e. attached to) the document\n nodeRoot = getRootNode(nodeRootHost);\n nodeRootHost = (_nodeRoot2 = nodeRoot) == null ? void 0 : _nodeRoot2.host;\n attached = !!((_nodeRootHost2 = nodeRootHost) != null && (_nodeRootHost2 = _nodeRootHost2.ownerDocument) != null && _nodeRootHost2.contains(nodeRootHost));\n }\n }\n return attached;\n};\nvar isZeroArea = function isZeroArea(node) {\n var _node$getBoundingClie = node.getBoundingClientRect(),\n width = _node$getBoundingClie.width,\n height = _node$getBoundingClie.height;\n return width === 0 && height === 0;\n};\nvar isHidden = function isHidden(node, _ref) {\n var displayCheck = _ref.displayCheck,\n getShadowRoot = _ref.getShadowRoot;\n if (displayCheck === 'full-native') {\n if ('checkVisibility' in node) {\n // Chrome >= 105, Edge >= 105, Firefox >= 106, Safari >= 17.4\n // @see https://developer.mozilla.org/en-US/docs/Web/API/Element/checkVisibility#browser_compatibility\n var visible = node.checkVisibility({\n // Checking opacity might be desirable for some use cases, but natively,\n // opacity zero elements _are_ focusable and tabbable.\n checkOpacity: false,\n opacityProperty: false,\n contentVisibilityAuto: true,\n visibilityProperty: true,\n // This is an alias for `visibilityProperty`. Contemporary browsers\n // support both. However, this alias has wider browser support (Chrome\n // >= 105 and Firefox >= 106, vs. Chrome >= 121 and Firefox >= 122), so\n // we include it anyway.\n checkVisibilityCSS: true\n });\n return !visible;\n }\n // Fall through to manual visibility checks\n }\n\n // NOTE: visibility will be `undefined` if node is detached from the document\n // (see notes about this further down), which means we will consider it visible\n // (this is legacy behavior from a very long way back)\n // NOTE: we check this regardless of `displayCheck=\"none\"` because this is a\n // _visibility_ check, not a _display_ check\n var _getComputedStyle = getComputedStyle(node),\n visibility = _getComputedStyle.visibility;\n if (visibility === 'hidden' || visibility === 'collapse') {\n return true;\n }\n var isDirectSummary = matches.call(node, 'details>summary:first-of-type');\n var nodeUnderDetails = isDirectSummary ? node.parentElement : node;\n if (matches.call(nodeUnderDetails, 'details:not([open]) *')) {\n return true;\n }\n if (!displayCheck || displayCheck === 'full' ||\n // full-native can run this branch when it falls through in case\n // Element#checkVisibility is unsupported\n displayCheck === 'full-native' || displayCheck === 'legacy-full') {\n if (typeof getShadowRoot === 'function') {\n // figure out if we should consider the node to be in an undisclosed shadow and use the\n // 'non-zero-area' fallback\n var originalNode = node;\n while (node) {\n var parentElement = node.parentElement;\n var rootNode = getRootNode(node);\n if (parentElement && !parentElement.shadowRoot && getShadowRoot(parentElement) === true // check if there's an undisclosed shadow\n ) {\n // node has an undisclosed shadow which means we can only treat it as a black box, so we\n // fall back to a non-zero-area test\n return isZeroArea(node);\n } else if (node.assignedSlot) {\n // iterate up slot\n node = node.assignedSlot;\n } else if (!parentElement && rootNode !== node.ownerDocument) {\n // cross shadow boundary\n node = rootNode.host;\n } else {\n // iterate up normal dom\n node = parentElement;\n }\n }\n node = originalNode;\n }\n // else, `getShadowRoot` might be true, but all that does is enable shadow DOM support\n // (i.e. it does not also presume that all nodes might have undisclosed shadows); or\n // it might be a falsy value, which means shadow DOM support is disabled\n\n // Since we didn't find it sitting in an undisclosed shadow (or shadows are disabled)\n // now we can just test to see if it would normally be visible or not, provided it's\n // attached to the main document.\n // NOTE: We must consider case where node is inside a shadow DOM and given directly to\n // `isTabbable()` or `isFocusable()` -- regardless of `getShadowRoot` option setting.\n\n if (isNodeAttached(node)) {\n // this works wherever the node is: if there's at least one client rect, it's\n // somehow displayed; it also covers the CSS 'display: contents' case where the\n // node itself is hidden in place of its contents; and there's no need to search\n // up the hierarchy either\n return !node.getClientRects().length;\n }\n\n // Else, the node isn't attached to the document, which means the `getClientRects()`\n // API will __always__ return zero rects (this can happen, for example, if React\n // is used to render nodes onto a detached tree, as confirmed in this thread:\n // https://github.com/facebook/react/issues/9117#issuecomment-284228870)\n //\n // It also means that even window.getComputedStyle(node).display will return `undefined`\n // because styles are only computed for nodes that are in the document.\n //\n // NOTE: THIS HAS BEEN THE CASE FOR YEARS. It is not new, nor is it caused by tabbable\n // somehow. Though it was never stated officially, anyone who has ever used tabbable\n // APIs on nodes in detached containers has actually implicitly used tabbable in what\n // was later (as of v5.2.0 on Apr 9, 2021) called `displayCheck=\"none\"` mode -- essentially\n // considering __everything__ to be visible because of the innability to determine styles.\n //\n // v6.0.0: As of this major release, the default 'full' option __no longer treats detached\n // nodes as visible with the 'none' fallback.__\n if (displayCheck !== 'legacy-full') {\n return true; // hidden\n }\n // else, fallback to 'none' mode and consider the node visible\n } else if (displayCheck === 'non-zero-area') {\n // NOTE: Even though this tests that the node's client rect is non-zero to determine\n // whether it's displayed, and that a detached node will __always__ have a zero-area\n // client rect, we don't special-case for whether the node is attached or not. In\n // this mode, we do want to consider nodes that have a zero area to be hidden at all\n // times, and that includes attached or not.\n return isZeroArea(node);\n }\n\n // visible, as far as we can tell, or per current `displayCheck=none` mode, we assume\n // it's visible\n return false;\n};\n\n// form fields (nested) inside a disabled fieldset are not focusable/tabbable\n// unless they are in the _first_ <legend> element of the top-most disabled\n// fieldset\nvar isDisabledFromFieldset = function isDisabledFromFieldset(node) {\n if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(node.tagName)) {\n var parentNode = node.parentElement;\n // check if `node` is contained in a disabled <fieldset>\n while (parentNode) {\n if (parentNode.tagName === 'FIELDSET' && parentNode.disabled) {\n // look for the first <legend> among the children of the disabled <fieldset>\n for (var i = 0; i < parentNode.children.length; i++) {\n var child = parentNode.children.item(i);\n // when the first <legend> (in document order) is found\n if (child.tagName === 'LEGEND') {\n // if its parent <fieldset> is not nested in another disabled <fieldset>,\n // return whether `node` is a descendant of its first <legend>\n return matches.call(parentNode, 'fieldset[disabled] *') ? true : !child.contains(node);\n }\n }\n // the disabled <fieldset> containing `node` has no <legend>\n return true;\n }\n parentNode = parentNode.parentElement;\n }\n }\n\n // else, node's tabbable/focusable state should not be affected by a fieldset's\n // enabled/disabled state\n return false;\n};\nvar isNodeMatchingSelectorFocusable = function isNodeMatchingSelectorFocusable(options, node) {\n if (node.disabled || isHiddenInput(node) || isHidden(node, options) ||\n // For a details element with a summary, the summary element gets the focus\n isDetailsWithSummary(node) || isDisabledFromFieldset(node)) {\n return false;\n }\n return true;\n};\nvar isNodeMatchingSelectorTabbable = function isNodeMatchingSelectorTabbable(options, node) {\n if (isNonTabbableRadio(node) || getTabIndex(node) < 0 || !isNodeMatchingSelectorFocusable(options, node)) {\n return false;\n }\n return true;\n};\nvar isShadowRootTabbable = function isShadowRootTabbable(shadowHostNode) {\n var tabIndex = parseInt(shadowHostNode.getAttribute('tabindex'), 10);\n if (isNaN(tabIndex) || tabIndex >= 0) {\n return true;\n }\n // If a custom element has an explicit negative tabindex,\n // browsers will not allow tab targeting said element's children.\n return false;\n};\n\n/**\n * @param {Array.<Element|CandidateScope>} candidates\n * @returns Element[]\n */\nvar _sortByOrder = function sortByOrder(candidates) {\n var regularTabbables = [];\n var orderedTabbables = [];\n candidates.forEach(function (item, i) {\n var isScope = !!item.scopeParent;\n var element = isScope ? item.scopeParent : item;\n var candidateTabindex = getSortOrderTabIndex(element, isScope);\n var elements = isScope ? _sortByOrder(item.candidates) : element;\n if (candidateTabindex === 0) {\n isScope ? regularTabbables.push.apply(regularTabbables, elements) : regularTabbables.push(element);\n } else {\n orderedTabbables.push({\n documentOrder: i,\n tabIndex: candidateTabindex,\n item: item,\n isScope: isScope,\n content: elements\n });\n }\n });\n return orderedTabbables.sort(sortOrderedTabbables).reduce(function (acc, sortable) {\n sortable.isScope ? acc.push.apply(acc, sortable.content) : acc.push(sortable.content);\n return acc;\n }, []).concat(regularTabbables);\n};\nvar tabbable = function tabbable(container, options) {\n options = options || {};\n var candidates;\n if (options.getShadowRoot) {\n candidates = _getCandidatesIteratively([container], options.includeContainer, {\n filter: isNodeMatchingSelectorTabbable.bind(null, options),\n flatten: false,\n getShadowRoot: options.getShadowRoot,\n shadowRootFilter: isShadowRootTabbable\n });\n } else {\n candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorTabbable.bind(null, options));\n }\n return _sortByOrder(candidates);\n};\nvar focusable = function focusable(container, options) {\n options = options || {};\n var candidates;\n if (options.getShadowRoot) {\n candidates = _getCandidatesIteratively([container], options.includeContainer, {\n filter: isNodeMatchingSelectorFocusable.bind(null, options),\n flatten: true,\n getShadowRoot: options.getShadowRoot\n });\n } else {\n candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorFocusable.bind(null, options));\n }\n return candidates;\n};\nvar isTabbable = function isTabbable(node, options) {\n options = options || {};\n if (!node) {\n throw new Error('No node provided');\n }\n if (matches.call(node, candidateSelector) === false) {\n return false;\n }\n return isNodeMatchingSelectorTabbable(options, node);\n};\nvar focusableCandidateSelector = /* #__PURE__ */candidateSelectors.concat('iframe:not([inert]):not([inert] *)').join(',');\nvar isFocusable = function isFocusable(node, options) {\n options = options || {};\n if (!node) {\n throw new Error('No node provided');\n }\n if (matches.call(node, focusableCandidateSelector) === false) {\n return false;\n }\n return isNodeMatchingSelectorFocusable(options, node);\n};\n\nexport { focusable, getTabIndex, isFocusable, isTabbable, tabbable };\n//# sourceMappingURL=index.esm.js.map\n","import { getActiveElement, onDestroyEffect } from \"svelte-toolbelt\";\nimport { FocusScopeManager } from \"./focus-scope-manager.js\";\nimport { focusable, isFocusable, tabbable } from \"tabbable\";\nimport { on } from \"svelte/events\";\nimport { watch } from \"runed\";\n/**\n * Retargets `node` to the tree `container` lives in by climbing shadow hosts, so a\n * node inside a shadow root nested in the scope resolves to its host. Returns `null`\n * when `node` is from an unrelated tree.\n */\nfunction retargetToScopeTree(node, container) {\n const scopeRoot = container.getRootNode();\n while (node) {\n const root = node.getRootNode();\n if (root === scopeRoot)\n return node;\n node = root !== node && \"host\" in root ? root.host : null;\n }\n return null;\n}\nexport class FocusScope {\n #paused = false;\n #container = null;\n #manager = FocusScopeManager.getInstance();\n #cleanupFns = [];\n #opts;\n constructor(opts) {\n this.#opts = opts;\n }\n get paused() {\n return this.#paused;\n }\n pause() {\n this.#paused = true;\n }\n resume() {\n this.#paused = false;\n }\n #cleanup() {\n for (const fn of this.#cleanupFns) {\n fn();\n }\n this.#cleanupFns = [];\n }\n mount(container) {\n if (this.#container) {\n this.unmount();\n }\n this.#container = container;\n this.#manager.register(this);\n this.#setupEventListeners();\n this.#handleOpenAutoFocus();\n }\n unmount() {\n if (!this.#container)\n return;\n this.#cleanup();\n // handle close auto-focus\n this.#handleCloseAutoFocus();\n this.#manager.unregister(this);\n this.#manager.clearPreFocusMemory(this);\n this.#container = null;\n }\n #handleOpenAutoFocus() {\n if (!this.#container)\n return;\n const event = new CustomEvent(\"focusScope.onOpenAutoFocus\", {\n bubbles: false,\n cancelable: true,\n });\n this.#opts.onOpenAutoFocus.current(event);\n if (!event.defaultPrevented) {\n requestAnimationFrame(() => {\n if (!this.#container ||\n this.#paused ||\n !this.#manager.isActiveScope(this) ||\n this.#container.contains(retargetToScopeTree(getActiveElement(this.#container.ownerDocument), this.#container))) {\n return;\n }\n const firstTabbable = this.#getFirstTabbable();\n if (firstTabbable) {\n firstTabbable.focus({ preventScroll: true });\n this.#manager.setFocusMemory(this, firstTabbable);\n }\n else {\n this.#container.focus({ preventScroll: true });\n }\n });\n }\n }\n #handleCloseAutoFocus() {\n const event = new CustomEvent(\"focusScope.onCloseAutoFocus\", {\n bubbles: false,\n cancelable: true,\n });\n this.#opts.onCloseAutoFocus.current?.(event);\n if (!event.defaultPrevented) {\n // return focus to the element that was focused before this scope opened\n const preFocusedElement = this.#manager.getPreFocusMemory(this);\n if (preFocusedElement && preFocusedElement.isConnected) {\n // ensure the element is still focusable and in the document\n try {\n preFocusedElement.focus({ preventScroll: true });\n }\n catch {\n // fallback if focus fails\n document.body.focus();\n }\n }\n }\n }\n #setupEventListeners() {\n if (!this.#container || !this.#opts.trap.current)\n return;\n const container = this.#container;\n const doc = container.ownerDocument;\n const handleFocus = (e) => {\n if (this.#paused || !this.#manager.isActiveScope(this))\n return;\n const target = retargetToScopeTree(e.composedPath()[0], container);\n const isInside = target !== null && container.contains(target);\n if (isInside) {\n // store last focused element\n this.#manager.setFocusMemory(this, target);\n }\n else {\n // focus escaped - bring it back\n const lastFocused = this.#manager.getFocusMemory(this);\n if (lastFocused && container.contains(lastFocused) && isFocusable(lastFocused)) {\n e.preventDefault();\n lastFocused.focus({ preventScroll: true });\n }\n else {\n // fallback to first tabbable or first focusable or container\n const firstTabbable = this.#getFirstTabbable();\n const firstFocusable = this.#getAllFocusables()[0];\n (firstTabbable || firstFocusable || container).focus({ preventScroll: true });\n }\n }\n };\n const handleKeydown = (e) => {\n if (!this.#opts.loop || this.#paused || e.key !== \"Tab\")\n return;\n if (!this.#manager.isActiveScope(this))\n return;\n const tabbables = this.#getTabbables();\n if (tabbables.length === 0)\n return;\n const first = tabbables[0];\n const last = tabbables[tabbables.length - 1];\n if (!e.shiftKey && getActiveElement(doc) === last) {\n e.preventDefault();\n first.focus();\n }\n else if (e.shiftKey && getActiveElement(doc) === first) {\n e.preventDefault();\n last.focus();\n }\n };\n this.#cleanupFns.push(on(doc, \"focusin\", handleFocus, { capture: true }), on(container, \"keydown\", handleKeydown));\n const observer = new MutationObserver(() => {\n const lastFocused = this.#manager.getFocusMemory(this);\n if (lastFocused && !container.contains(lastFocused)) {\n // last focused element was removed\n const firstTabbable = this.#getFirstTabbable();\n const firstFocusable = this.#getAllFocusables()[0];\n const elementToFocus = firstTabbable || firstFocusable;\n if (elementToFocus) {\n elementToFocus.focus({ preventScroll: true });\n this.#manager.setFocusMemory(this, elementToFocus);\n }\n else {\n // no focusable elements left, focus container\n container.focus({ preventScroll: true });\n }\n }\n });\n observer.observe(container, {\n childList: true,\n subtree: true,\n });\n this.#cleanupFns.push(() => observer.disconnect());\n }\n #getTabbables() {\n if (!this.#container)\n return [];\n return tabbable(this.#container, {\n includeContainer: false,\n getShadowRoot: true,\n });\n }\n #getFirstTabbable() {\n const tabbables = this.#getTabbables();\n return tabbables[0] || null;\n }\n #getAllFocusables() {\n if (!this.#container)\n return [];\n return focusable(this.#container, {\n includeContainer: false,\n getShadowRoot: true,\n });\n }\n static use(opts) {\n let scope = null;\n watch([() => opts.ref.current, () => opts.enabled.current], ([ref, enabled]) => {\n if (ref && enabled) {\n if (!scope) {\n scope = new FocusScope(opts);\n }\n scope.mount(ref);\n }\n else if (scope) {\n scope.unmount();\n scope = null;\n }\n });\n onDestroyEffect(() => {\n scope?.unmount();\n });\n return {\n get props() {\n return {\n tabindex: -1,\n };\n },\n };\n }\n}\n","<script lang=\"ts\">\n\timport { boxWith } from \"svelte-toolbelt\";\n\timport { untrack } from \"svelte\";\n\timport type { FocusScopeImplProps } from \"./types.js\";\n\timport { noop } from \"../../../internal/noop.js\";\n\timport { FocusScope } from \"./focus-scope.svelte.js\";\n\n\tlet {\n\t\tenabled = false,\n\t\ttrapFocus = false,\n\t\tloop = false,\n\t\tonCloseAutoFocus = noop,\n\t\tonOpenAutoFocus = noop,\n\t\tfocusScope,\n\t\tref,\n\t}: FocusScopeImplProps = $props();\n\n\tconst focusScopeState = FocusScope.use({\n\t\tenabled: boxWith(() => enabled),\n\t\ttrap: boxWith(() => trapFocus),\n\t\tloop: untrack(() => loop),\n\t\tonCloseAutoFocus: boxWith(() => onCloseAutoFocus),\n\t\tonOpenAutoFocus: boxWith(() => onOpenAutoFocus),\n\t\tref: untrack(() => ref),\n\t});\n</script>\n\n{@render focusScope?.({ props: focusScopeState.props })}\n","import { DOMContext, contains, executeCallbacks, } from \"svelte-toolbelt\";\nimport { watch } from \"runed\";\nimport { on } from \"svelte/events\";\nimport { noop } from \"../../../internal/noop.js\";\nimport { isHTMLElement } from \"../../../internal/is.js\";\nconst noopPointer = () => { };\nglobalThis.bitsTextSelectionLayers ??= new Map();\nexport class TextSelectionLayerState {\n static create(opts) {\n return new TextSelectionLayerState(opts);\n }\n opts;\n domContext;\n #unsubSelectionLock = noop;\n #enabledSnapshot = false;\n #onPointerDownSnapshot = noopPointer;\n #onPointerUpSnapshot = noopPointer;\n constructor(opts) {\n this.opts = opts;\n this.domContext = new DOMContext(opts.ref);\n let unsubEvents = noop;\n watch(() => [\n this.opts.enabled.current,\n this.opts.onPointerDown.current,\n this.opts.onPointerUp.current,\n ], ([enabled, onPointerDown, onPointerUp]) => {\n this.#enabledSnapshot = enabled;\n this.#onPointerDownSnapshot = onPointerDown;\n this.#onPointerUpSnapshot = onPointerUp;\n if (enabled) {\n globalThis.bitsTextSelectionLayers.set(this, this.opts.enabled);\n unsubEvents();\n unsubEvents = this.#addEventListeners();\n }\n return () => {\n this.#enabledSnapshot = false;\n unsubEvents();\n this.#resetSelectionLock();\n globalThis.bitsTextSelectionLayers.delete(this);\n };\n });\n }\n #addEventListeners() {\n return executeCallbacks(on(this.domContext.getDocument(), \"pointerdown\", this.#pointerdown), on(this.domContext.getDocument(), \"pointerup\", this.#pointerup));\n }\n #pointerup = (e) => {\n // Releasing the lock is internal cleanup, not a consumer callback, so it must run\n // whatever the event's default-prevented state. Composing it with the user handler\n // meant `composeHandlers` bailed out of the whole chain on a `pointerup` that\n // anything else had cancelled, leaving `user-select: none` on `<body>`.\n this.#resetSelectionLock();\n if (e.defaultPrevented)\n return;\n this.#onPointerUpSnapshot(e);\n };\n #pointerdown = (e) => {\n // Check the plain-boolean snapshot BEFORE reading `this.opts.ref.current`.\n // If this document listener outlives its component, that box is a `$derived`\n // owned by a destroyed effect, and reading it emits `derived_inert` on every\n // pointerdown anywhere in the document, forever.\n if (!this.#enabledSnapshot)\n return;\n // Release any lock still held before arming a new one. Under `forceMount` this\n // handler can run twice for a single event, and `preventTextSelectionOverflow`\n // snapshots the current `user-select` to restore later. Resetting the lock\n // prevents the second arm from re-snapshotting the `none` written the first time.\n this.#resetSelectionLock();\n const node = this.opts.ref.current;\n const target = e.target;\n if (!isHTMLElement(node) || !isHTMLElement(target))\n return;\n /**\n * We only lock user-selection overflow if layer is the top most layer and\n * pointerdown occurred inside the node. You are still allowed to select text\n * outside the node provided pointerdown occurs outside the node.\n */\n if (!isHighestLayer(this) || !contains(node, target))\n return;\n this.#onPointerDownSnapshot(e);\n if (e.defaultPrevented)\n return;\n this.#unsubSelectionLock = preventTextSelectionOverflow(node, this.domContext.getDocument().body);\n };\n #resetSelectionLock = () => {\n this.#unsubSelectionLock();\n this.#unsubSelectionLock = noop;\n };\n}\nconst getUserSelect = (node) => node.style.userSelect || node.style.webkitUserSelect;\nfunction preventTextSelectionOverflow(node, body) {\n const originalBodyUserSelect = getUserSelect(body);\n const originalNodeUserSelect = getUserSelect(node);\n setUserSelect(body, \"none\");\n setUserSelect(node, \"text\");\n return () => {\n setUserSelect(body, originalBodyUserSelect);\n setUserSelect(node, originalNodeUserSelect);\n };\n}\nfunction setUserSelect(node, value) {\n node.style.userSelect = value;\n node.style.webkitUserSelect = value;\n}\nfunction isHighestLayer(instance) {\n const layersArr = [...globalThis.bitsTextSelectionLayers];\n if (!layersArr.length)\n return false;\n const highestLayer = layersArr.at(-1);\n if (!highestLayer)\n return false;\n return highestLayer[0] === instance;\n}\n","<script lang=\"ts\">\n\timport { boxWith } from \"svelte-toolbelt\";\n\timport { untrack } from \"svelte\";\n\timport type { TextSelectionLayerImplProps } from \"./types.js\";\n\timport { TextSelectionLayerState } from \"./use-text-selection-layer.svelte.js\";\n\timport { noop } from \"../../../internal/noop.js\";\n\n\tlet {\n\t\tpreventOverflowTextSelection = true,\n\t\tonPointerDown = noop,\n\t\tonPointerUp = noop,\n\t\tid,\n\t\tchildren,\n\t\tenabled,\n\t\tref,\n\t}: TextSelectionLayerImplProps = $props();\n\n\tTextSelectionLayerState.create({\n\t\tid: boxWith(() => id),\n\t\tonPointerDown: boxWith(() => onPointerDown),\n\t\tonPointerUp: boxWith(() => onPointerUp),\n\t\tenabled: boxWith(() => enabled && preventOverflowTextSelection),\n\t\tref: untrack(() => ref),\n\t});\n</script>\n\n{@render children?.()}\n","globalThis.bitsIdCounter ??= { current: 0 };\n/**\n * Generates a unique ID based on a global counter.\n */\nexport function useId(prefix = \"bits\") {\n globalThis.bitsIdCounter.current++;\n return `${prefix}-${globalThis.bitsIdCounter.current}`;\n}\n","export class SharedState {\n #factory;\n #subscribers = 0;\n #state = $state();\n #scope;\n constructor(factory) {\n this.#factory = factory;\n }\n #dispose() {\n this.#subscribers -= 1;\n if (this.#scope && this.#subscribers <= 0) {\n this.#scope();\n this.#state = undefined;\n this.#scope = undefined;\n }\n }\n get(...args) {\n this.#subscribers += 1;\n if (this.#state === undefined) {\n this.#scope = $effect.root(() => {\n this.#state = this.#factory(...args);\n });\n }\n $effect(() => {\n return () => {\n this.#dispose();\n };\n });\n return this.#state;\n }\n}\n","import { SvelteMap } from \"svelte/reactivity\";\nimport { afterTick, boxWith, onDestroyEffect, } from \"svelte-toolbelt\";\nimport { isIOS } from \"./is.js\";\nimport { useId } from \"./use-id.js\";\nimport { watch } from \"runed\";\nimport { SharedState } from \"./shared-state.svelte.js\";\nimport { BROWSER } from \"esm-env\";\nimport { on } from \"svelte/events\";\n/** A map of lock ids to their `locked` state. */\nconst lockMap = new SvelteMap();\nconst MANAGED_PROPERTIES = [\n \"padding-right\",\n \"margin-right\",\n // the shorthand reads \"\" when only one axis is set inline, so its longhands are snapshotted\n // too and restored after it (keep this order)\n \"overflow\",\n \"overflow-x\",\n \"overflow-y\",\n \"pointer-events\",\n \"--scrollbar-width\",\n];\nlet initialProperties = null;\nlet hadInitialStyleAttribute = false;\nconst modifiedProperties = new Set();\nlet stopTouchMoveListener = null;\nlet cleanupTimeoutId = null;\nlet isInCleanupTransition = false;\nfunction setManagedProperty(style, property, value) {\n style.setProperty(property, value);\n modifiedProperties.add(property);\n if (property === \"overflow\") {\n modifiedProperties.add(\"overflow-x\");\n modifiedProperties.add(\"overflow-y\");\n }\n}\nconst anyLocked = boxWith(() => {\n for (const value of lockMap.values()) {\n if (value)\n return true;\n }\n return false;\n});\n/**\n * We track the time we scheduled the cleanup to prevent race conditions\n * when multiple locks are created/destroyed in the same tick, ensuring\n * only the last one to schedule the cleanup will run.\n *\n * reference: https://github.com/huntabyte/bits-ui/issues/1639\n */\nlet cleanupScheduledAt = null;\nconst bodyLockStackCount = new SharedState(() => {\n function restoreProperty(documentObj, prop) {\n const initial = initialProperties?.get(prop);\n if (initial?.value) {\n documentObj.body.style.setProperty(prop, initial.value, initial.priority);\n }\n else {\n documentObj.body.style.removeProperty(prop);\n }\n }\n function resetBodyStyle(documentObj) {\n if (!BROWSER)\n return;\n // without a snapshot, still remove what we set so the body is never left locked\n for (const prop of MANAGED_PROPERTIES) {\n if (!modifiedProperties.has(prop))\n continue;\n restoreProperty(documentObj, prop);\n }\n if (!hadInitialStyleAttribute && documentObj.body.style.length === 0) {\n documentObj.body.removeAttribute(\"style\");\n }\n initialProperties = null;\n modifiedProperties.clear();\n isIOS && stopTouchMoveListener?.();\n }\n /**\n * Unlike overflow/padding, pointer-events has no handover flicker to avoid, so it's\n * restored as soon as the last lock goes. A lock that arrives during the cleanup delay\n * sets it again in `afterTick`.\n *\n * reference: https://github.com/huntabyte/bits-ui/issues/2202\n */\n function restorePointerEvents(documentObj) {\n if (!modifiedProperties.delete(\"pointer-events\"))\n return;\n restoreProperty(documentObj, \"pointer-events\");\n }\n function cancelPendingCleanup() {\n if (cleanupTimeoutId === null)\n return;\n window.clearTimeout(cleanupTimeoutId);\n cleanupTimeoutId = null;\n }\n function scheduleCleanupIfNoNewLocks(delay, callback) {\n cancelPendingCleanup();\n isInCleanupTransition = true;\n cleanupScheduledAt = Date.now();\n const currentCleanupId = cleanupScheduledAt;\n /**\n * We schedule the cleanup to run after a delay to allow new locks to register\n * that might have been added in the same tick as the current cleanup.\n *\n * If a new lock is added in the same tick, the cleanup will be cancelled and\n * a new cleanup will be scheduled.\n *\n * This is to prevent the cleanup from running too early and resetting the body\n * style before the new lock has had a chance to apply its styles.\n */\n const cleanupFn = () => {\n cleanupTimeoutId = null;\n // check if this cleanup is still valid (no newer cleanups scheduled)\n if (cleanupScheduledAt !== currentCleanupId)\n return;\n // ensure no new locks were added during the delay\n if (!isAnyLocked(lockMap)) {\n isInCleanupTransition = false;\n callback();\n }\n else {\n isInCleanupTransition = false;\n }\n };\n const actualDelay = delay === null ? 24 : delay;\n cleanupTimeoutId = window.setTimeout(cleanupFn, actualDelay);\n }\n function ensureInitialStyleCaptured() {\n // only capture initial style once, when no locks exist and no cleanup is in progress\n if (initialProperties === null && lockMap.size === 0 && !isInCleanupTransition) {\n hadInitialStyleAttribute = document.body.hasAttribute(\"style\");\n initialProperties = new Map();\n for (const prop of MANAGED_PROPERTIES) {\n initialProperties.set(prop, {\n value: document.body.style.getPropertyValue(prop),\n priority: document.body.style.getPropertyPriority(prop),\n });\n }\n }\n }\n watch(() => anyLocked.current, () => {\n if (!anyLocked.current)\n return;\n // ensure we've captured the initial style before applying any lock styles\n ensureInitialStyleCaptured();\n // if we're applying lock styles, we're no longer in a cleanup transition\n isInCleanupTransition = false;\n const htmlStyle = getComputedStyle(document.documentElement);\n const bodyStyle = getComputedStyle(document.body);\n // check if scrollbar-gutter: stable is already handling scrollbar space\n const hasStableGutter = htmlStyle.scrollbarGutter?.includes(\"stable\") ||\n bodyStyle.scrollbarGutter?.includes(\"stable\");\n // TODO: account for RTL direction, etc.\n const verticalScrollbarWidth = window.innerWidth - document.documentElement.clientWidth;\n const paddingRight = Number.parseInt(bodyStyle.paddingRight ?? \"0\", 10);\n const config = {\n padding: paddingRight + verticalScrollbarWidth,\n margin: Number.parseInt(bodyStyle.marginRight ?? \"0\", 10),\n };\n // only add padding compensation if stable gutter isn't handling it\n if (verticalScrollbarWidth > 0 && !hasStableGutter) {\n setManagedProperty(document.body.style, \"padding-right\", `${config.padding}px`);\n setManagedProperty(document.body.style, \"margin-right\", `${config.margin}px`);\n setManagedProperty(document.body.style, \"--scrollbar-width\", `${verticalScrollbarWidth}px`);\n }\n setManagedProperty(document.body.style, \"overflow\", \"hidden\");\n if (isIOS) {\n // IOS devices are special and require a touchmove listener to prevent scrolling\n stopTouchMoveListener = on(document, \"touchmove\", (e) => {\n if (e.target !== document.documentElement)\n return;\n if (e.touches.length > 1)\n return;\n e.preventDefault();\n }, { passive: false });\n }\n /**\n * We ensure pointer-events: none is applied _after_ DOM updates, so that any focus/\n * interaction changes from opening overlays/menus complete _before_ we block pointer\n * events.\n *\n * this avoids race conditions where pointer-events could be set too early and break\n * focus/interaction.\n */\n afterTick(() => {\n setManagedProperty(document.body.style, \"pointer-events\", \"none\");\n setManagedProperty(document.body.style, \"overflow\", \"hidden\");\n });\n });\n onDestroyEffect(() => {\n return () => {\n stopTouchMoveListener?.();\n };\n });\n return {\n get lockMap() {\n return lockMap;\n },\n resetBodyStyle,\n restorePointerEvents,\n scheduleCleanupIfNoNewLocks,\n cancelPendingCleanup,\n ensureInitialStyleCaptured,\n };\n});\nexport class BodyScrollLock {\n #id = useId();\n #initialState;\n #restoreScrollDelay = () => null;\n #countState;\n locked;\n constructor(initialState, restoreScrollDelay = () => null) {\n this.#initialState = initialState;\n this.#restoreScrollDelay = restoreScrollDelay;\n this.#countState = bodyLockStackCount.get();\n if (!this.#countState)\n return;\n /**\n * Since a new lock is being created, we cancel any pending cleanup to\n * prevent the cleanup from running too early and resetting the body style\n * before the new lock has had a chance to apply its styles.\n *\n * reference: https://github.com/huntabyte/bits-ui/issues/1639\n */\n this.#countState.cancelPendingCleanup();\n // capture initial style before this lock is registered\n this.#countState.ensureInitialStyleCaptured();\n this.#countState.lockMap.set(this.#id, this.#initialState ?? false);\n this.locked = boxWith(() => this.#countState.lockMap.get(this.#id) ?? false, (v) => this.#countState.lockMap.set(this.#id, v));\n onDestroyEffect(() => {\n this.#countState.lockMap.delete(this.#id);\n // if not the last lock, we don't need to do anything\n if (isAnyLocked(this.#countState.lockMap))\n return;\n const restoreScrollDelay = this.#restoreScrollDelay();\n const documentObj = document;\n this.#countState.restorePointerEvents(documentObj);\n /**\n * We schedule the cleanup to run after a delay to handle same-tick\n * destroy/create scenarios.\n *\n * reference: https://github.com/huntabyte/bits-ui/issues/1639\n */\n this.#countState.scheduleCleanupIfNoNewLocks(restoreScrollDelay, () => {\n this.#countState.resetBodyStyle(documentObj);\n });\n });\n }\n}\nfunction isAnyLocked(map) {\n for (const [_, value] of map) {\n if (value)\n return true;\n }\n return false;\n}\n","<script lang=\"ts\">\n\timport { untrack } from \"svelte\";\n\timport type { ScrollLockProps } from \"./index.js\";\n\timport { BodyScrollLock } from \"../../../internal/body-scroll-lock.svelte.js\";\n\n\tlet { preventScroll = true, restoreScrollDelay = null }: ScrollLockProps = $props();\n\n\tuntrack(() => {\n\t\tif (preventScroll) {\n\t\t\tnew BodyScrollLock(preventScroll, () => restoreScrollDelay);\n\t\t}\n\t});\n</script>\n","import { boxFrom, simpleBox } from \"svelte-toolbelt\";\nimport { Context } from \"runed\";\nexport const FloatingRootContext = new Context(\"Floating.Root\");\nexport const FloatingTooltipRootContext = new Context(\"Floating.Root\");\nexport class FloatingRootState {\n static create(tooltip = false) {\n return tooltip\n ? FloatingTooltipRootContext.set(new FloatingRootState())\n : FloatingRootContext.set(new FloatingRootState());\n }\n anchorNode = simpleBox(null);\n customAnchorNode = simpleBox(null);\n triggerNode = simpleBox(null);\n constructor() {\n $effect(() => {\n if (this.customAnchorNode.current) {\n if (typeof this.customAnchorNode.current === \"string\") {\n this.anchorNode.current = document.querySelector(this.customAnchorNode.current);\n }\n else {\n this.anchorNode.current = this.customAnchorNode.current;\n }\n }\n else {\n this.anchorNode.current = this.triggerNode.current;\n }\n });\n }\n}\nexport class FloatingAnchorState {\n static create(opts, tooltip = false) {\n return tooltip\n ? new FloatingAnchorState(opts, FloatingTooltipRootContext.get())\n : new FloatingAnchorState(opts, FloatingRootContext.get());\n }\n opts;\n root;\n constructor(opts, root) {\n this.opts = opts;\n this.root = root;\n if (opts.virtualEl && opts.virtualEl.current) {\n root.triggerNode = boxFrom(opts.virtualEl.current);\n }\n else {\n root.triggerNode = opts.ref;\n }\n }\n}\n","<script lang=\"ts\">\n\timport { untrack, type Snippet } from \"svelte\";\n\timport { FloatingRootState } from \"../floating-root.svelte.js\";\n\n\tlet { children, tooltip = false }: { children?: Snippet; tooltip?: boolean } = $props();\n\n\tFloatingRootState.create(untrack(() => tooltip));\n</script>\n\n{@render children?.()}\n","export function get(valueOrGetValue) {\n return typeof valueOrGetValue === \"function\"\n ? valueOrGetValue()\n : valueOrGetValue;\n}\nexport function getDPR(element) {\n if (typeof window === \"undefined\")\n return 1;\n const win = element.ownerDocument.defaultView || window;\n return win.devicePixelRatio || 1;\n}\nexport function roundByDPR(element, value) {\n const dpr = getDPR(element);\n return Math.round(value * dpr) / dpr;\n}\nexport function getFloatingContentCSSVars(name) {\n return {\n [`--bits-${name}-content-transform-origin`]: `var(--bits-floating-transform-origin)`,\n [`--bits-${name}-content-available-width`]: `var(--bits-floating-available-width)`,\n [`--bits-${name}-content-available-height`]: `var(--bits-floating-available-height)`,\n [`--bits-${name}-anchor-width`]: `var(--bits-floating-anchor-width)`,\n [`--bits-${name}-anchor-height`]: `var(--bits-floating-anchor-height)`,\n };\n}\n","/**\n * Custom positioning reference element.\n * @see https://floating-ui.com/docs/virtual-elements\n */\n\nconst sides = ['top', 'right', 'bottom', 'left'];\nconst alignments = ['start', 'end'];\nconst placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + \"-\" + alignments[0], side + \"-\" + alignments[1]), []);\nconst min = Math.min;\nconst max = Math.max;\nconst round = Math.round;\nconst floor = Math.floor;\nconst createCoords = v => ({\n x: v,\n y: v\n});\nconst oppositeSideMap = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nfunction clamp(start, value, end) {\n return max(start, min(value, end));\n}\nfunction evaluate(value, param) {\n return typeof value === 'function' ? value(param) : value;\n}\nfunction getSide(placement) {\n return placement.split('-')[0];\n}\nfunction getAlignment(placement) {\n return placement.split('-')[1];\n}\nfunction getOppositeAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}\nfunction getAxisLength(axis) {\n return axis === 'y' ? 'height' : 'width';\n}\nfunction getSideAxis(placement) {\n const firstChar = placement[0];\n return firstChar === 't' || firstChar === 'b' ? 'y' : 'x';\n}\nfunction getAlignmentAxis(placement) {\n return getOppositeAxis(getSideAxis(placement));\n}\nfunction getAlignmentSides(placement, rects, rtl) {\n if (rtl === void 0) {\n rtl = false;\n }\n const alignment = getAlignment(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const length = getAxisLength(alignmentAxis);\n let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';\n if (rects.reference[length] > rects.floating[length]) {\n mainAlignmentSide = getOppositePlacement(mainAlignmentSide);\n }\n return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];\n}\nfunction getExpandedPlacements(placement) {\n const oppositePlacement = getOppositePlacement(placement);\n return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];\n}\nfunction getOppositeAlignmentPlacement(placement) {\n return placement.includes('start') ? placement.replace('start', 'end') : placement.replace('end', 'start');\n}\nconst lrPlacement = ['left', 'right'];\nconst rlPlacement = ['right', 'left'];\nconst tbPlacement = ['top', 'bottom'];\nconst btPlacement = ['bottom', 'top'];\nfunction getSideList(side, isStart, rtl) {\n switch (side) {\n case 'top':\n case 'bottom':\n if (rtl) return isStart ? rlPlacement : lrPlacement;\n return isStart ? lrPlacement : rlPlacement;\n case 'left':\n case 'right':\n return isStart ? tbPlacement : btPlacement;\n default:\n return [];\n }\n}\nfunction getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {\n const alignment = getAlignment(placement);\n let list = getSideList(getSide(placement), direction === 'start', rtl);\n if (alignment) {\n list = list.map(side => side + \"-\" + alignment);\n if (flipAlignment) {\n list = list.concat(list.map(getOppositeAlignmentPlacement));\n }\n }\n return list;\n}\nfunction getOppositePlacement(placement) {\n const side = getSide(placement);\n return oppositeSideMap[side] + placement.slice(side.length);\n}\nfunction expandPaddingObject(padding) {\n var _padding$top, _padding$right, _padding$bottom, _padding$left;\n return {\n top: (_padding$top = padding.top) != null ? _padding$top : 0,\n right: (_padding$right = padding.right) != null ? _padding$right : 0,\n bottom: (_padding$bottom = padding.bottom) != null ? _padding$bottom : 0,\n left: (_padding$left = padding.left) != null ? _padding$left : 0\n };\n}\nfunction getPaddingObject(padding) {\n return typeof padding !== 'number' ? expandPaddingObject(padding) : {\n top: padding,\n right: padding,\n bottom: padding,\n left: padding\n };\n}\nfunction rectToClientRect(rect) {\n const {\n x,\n y,\n width,\n height\n } = rect;\n return {\n width,\n height,\n top: y,\n left: x,\n right: x + width,\n bottom: y + height,\n x,\n y\n };\n}\n\nexport { alignments, clamp, createCoords, evaluate, expandPaddingObject, floor, getAlignment, getAlignmentAxis, getAlignmentSides, getAxisLength, getExpandedPlacements, getOppositeAlignmentPlacement, getOppositeAxis, getOppositeAxisPlacements, getOppositePlacement, getPaddingObject, getSide, getSideAxis, max, min, placements, rectToClientRect, round, sides };\n","import { getSideAxis, getAlignmentAxis, getAxisLength, getSide, getAlignment, evaluate, getPaddingObject, rectToClientRect, min, clamp, placements, getAlignmentSides, getOppositeAlignmentPlacement, getOppositePlacement, getExpandedPlacements, getOppositeAxisPlacements, sides, max, getOppositeAxis } from '@floating-ui/utils';\nexport { rectToClientRect } from '@floating-ui/utils';\n\nfunction computeCoordsFromPlacement(_ref, placement, rtl) {\n let {\n reference,\n floating\n } = _ref;\n const sideAxis = getSideAxis(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const alignLength = getAxisLength(alignmentAxis);\n const side = getSide(placement);\n const isVertical = sideAxis === 'y';\n const commonX = reference.x + reference.width / 2 - floating.width / 2;\n const commonY = reference.y + reference.height / 2 - floating.height / 2;\n const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;\n let coords;\n switch (side) {\n case 'top':\n coords = {\n x: commonX,\n y: reference.y - floating.height\n };\n break;\n case 'bottom':\n coords = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n case 'right':\n coords = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n case 'left':\n coords = {\n x: reference.x - floating.width,\n y: commonY\n };\n break;\n default:\n coords = {\n x: reference.x,\n y: reference.y\n };\n }\n const alignment = getAlignment(placement);\n if (alignment) {\n coords[alignmentAxis] += commonAlign * (alignment === 'end' ? 1 : -1) * (rtl && isVertical ? -1 : 1);\n }\n return coords;\n}\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\nasync function detectOverflow(state, options) {\n var _await$platform$isEle;\n if (options === void 0) {\n options = {};\n }\n const {\n x,\n y,\n platform,\n rects,\n elements,\n strategy\n } = state;\n const {\n boundary = 'clippingAncestors',\n rootBoundary = 'viewport',\n elementContext = 'floating',\n altBoundary = false,\n padding = 0\n } = evaluate(options, state);\n const paddingObject = getPaddingObject(padding);\n const altContext = elementContext === 'floating' ? 'reference' : 'floating';\n const element = elements[altBoundary ? altContext : elementContext];\n const clippingClientRect = rectToClientRect(await platform.getClippingRect({\n element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),\n boundary,\n rootBoundary,\n strategy\n }));\n const rect = elementContext === 'floating' ? {\n x,\n y,\n width: rects.floating.width,\n height: rects.floating.height\n } : rects.reference;\n const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));\n const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) && (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {\n x: 1,\n y: 1\n };\n const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({\n elements,\n rect,\n offsetParent,\n strategy\n }) : rect);\n return {\n top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,\n bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,\n left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,\n right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x\n };\n}\n\n// Maximum number of resets that can occur before bailing to avoid infinite reset loops.\nconst MAX_RESET_COUNT = 50;\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n *\n * This export does not have any `platform` interface logic. You will need to\n * write one for the platform you are using Floating UI with.\n */\nconst computePosition = async (reference, floating, config) => {\n const {\n placement = 'bottom',\n strategy = 'absolute',\n middleware = [],\n platform\n } = config;\n const platformWithDetectOverflow = platform.detectOverflow ? platform : {\n ...platform,\n detectOverflow\n };\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));\n let rects = await platform.getElementRects({\n reference,\n floating,\n strategy\n });\n let {\n x,\n y\n } = computeCoordsFromPlacement(rects, placement, rtl);\n let statefulPlacement = placement;\n let resetCount = 0;\n const middlewareData = {};\n for (let i = 0; i < middleware.length; i++) {\n const currentMiddleware = middleware[i];\n if (!currentMiddleware) {\n continue;\n }\n const {\n name,\n fn\n } = currentMiddleware;\n const {\n x: nextX,\n y: nextY,\n data,\n reset\n } = await fn({\n x,\n y,\n initialPlacement: placement,\n placement: statefulPlacement,\n strategy,\n middlewareData,\n rects,\n platform: platformWithDetectOverflow,\n elements: {\n reference,\n floating\n }\n });\n x = nextX != null ? nextX : x;\n y = nextY != null ? nextY : y;\n middlewareData[name] = {\n ...middlewareData[name],\n ...data\n };\n if (reset && resetCount < MAX_RESET_COUNT) {\n resetCount++;\n if (typeof reset === 'object') {\n if (reset.placement) {\n statefulPlacement = reset.placement;\n }\n if (reset.rects) {\n rects = reset.rects === true ? await platform.getElementRects({\n reference,\n floating,\n strategy\n }) : reset.rects;\n }\n ({\n x,\n y\n } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));\n }\n i = -1;\n }\n }\n return {\n x,\n y,\n placement: statefulPlacement,\n strategy,\n middlewareData\n };\n};\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = options => ({\n name: 'arrow',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n platform,\n elements,\n middlewareData\n } = state;\n // Since `element` is required, we don't Partial<> the type.\n const {\n element,\n padding = 0\n } = evaluate(options, state) || {};\n if (element == null) {\n return {};\n }\n const paddingObject = getPaddingObject(padding);\n const coords = {\n x,\n y\n };\n const axis = getAlignmentAxis(placement);\n const length = getAxisLength(axis);\n const arrowDimensions = await platform.getDimensions(element);\n const isYAxis = axis === 'y';\n const minProp = isYAxis ? 'top' : 'left';\n const maxProp = isYAxis ? 'bottom' : 'right';\n const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';\n const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];\n const startDiff = coords[axis] - rects.reference[axis];\n const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));\n let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;\n\n // DOM platform can return `window` as the `offsetParent`.\n if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {\n clientSize = elements.floating[clientProp] || rects.floating[length];\n }\n const centerToReference = endDiff / 2 - startDiff / 2;\n\n // If the padding is large enough that it causes the arrow to no longer be\n // centered, modify the padding so that it is centered.\n const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;\n const minPadding = min(paddingObject[minProp], largestPossiblePadding);\n const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);\n\n // Make sure the arrow doesn't overflow the floating element if the center\n // point is outside the floating element's bounds.\n const max = clientSize - arrowDimensions[length] - maxPadding;\n const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;\n const offset = clamp(minPadding, center, max);\n\n // If the reference is small enough that the arrow's padding causes it to\n // to point to nothing for an aligned placement, adjust the offset of the\n // floating element itself. To ensure `shift()` continues to take action,\n // a single reset is performed when this is true.\n const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < minPadding ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;\n const alignmentOffset = shouldAddOffset ? center < minPadding ? center - minPadding : center - max : 0;\n return {\n [axis]: coords[axis] + alignmentOffset,\n data: {\n [axis]: offset,\n centerOffset: center - offset - alignmentOffset,\n ...(shouldAddOffset && {\n alignmentOffset\n })\n },\n reset: shouldAddOffset\n };\n }\n});\n\nfunction getPlacementList(alignment, autoAlignment, allowedPlacements) {\n const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => getSide(placement) === placement);\n return allowedPlacementsSortedByAlignment.filter(placement => {\n if (alignment) {\n return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);\n }\n return true;\n });\n}\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'autoPlacement',\n options,\n async fn(state) {\n var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;\n const {\n rects,\n middlewareData,\n placement,\n platform,\n elements\n } = state;\n const {\n crossAxis = false,\n alignment,\n allowedPlacements = placements,\n autoAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;\n const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;\n const currentPlacement = placements$1[currentIndex];\n if (currentPlacement == null) {\n return {};\n }\n\n // Make `computeCoords` start from the right place.\n if (placement !== currentPlacement) {\n return {\n reset: {\n placement: placements$1[0]\n }\n };\n }\n const overflow = await platform.detectOverflow(state, detectOverflowOptions);\n const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));\n const currentOverflows = [overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];\n const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), {\n placement: currentPlacement,\n overflows: currentOverflows\n }];\n const nextPlacement = placements$1[currentIndex + 1];\n\n // There are more placements to check.\n if (nextPlacement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n const placementsSortedByMostSpace = allOverflows.map(d => {\n const alignment = getAlignment(d.placement);\n return [d.placement, alignment && crossAxis ?\n // Check along the mainAxis and main crossAxis side.\n d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) :\n // Check only the mainAxis.\n d.overflows[0], d.overflows];\n }).sort((a, b) => a[1] - b[1]);\n const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter(d => d[2].slice(0,\n // Aligned placements should not check their opposite crossAxis\n // side.\n getAlignment(d[0]) ? 2 : 3).every(v => v <= 0));\n const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];\n if (resetPlacement !== placement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: resetPlacement\n }\n };\n }\n return {};\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'flip',\n options,\n async fn(state) {\n var _middlewareData$arrow, _middlewareData$flip;\n const {\n placement,\n middlewareData,\n rects,\n initialPlacement,\n platform,\n elements\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true,\n fallbackPlacements: specifiedFallbackPlacements,\n fallbackStrategy = 'bestFit',\n fallbackAxisSideDirection = 'none',\n flipAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n\n // If a reset by the arrow was caused due to an alignment offset being\n // added, we should skip any logic now since `flip()` has already done its\n // work.\n // https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643\n if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n const side = getSide(placement);\n const initialSideAxis = getSideAxis(initialPlacement);\n const isBasePlacement = getSide(initialPlacement) === initialPlacement;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));\n const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none';\n if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {\n fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));\n }\n const placements = [initialPlacement, ...fallbackPlacements];\n const overflow = await platform.detectOverflow(state, detectOverflowOptions);\n const overflows = [];\n let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];\n if (checkMainAxis) {\n overflows.push(overflow[side]);\n }\n if (checkCrossAxis) {\n const sides = getAlignmentSides(placement, rects, rtl);\n overflows.push(overflow[sides[0]], overflow[sides[1]]);\n }\n overflowsData = [...overflowsData, {\n placement,\n overflows\n }];\n\n // One or more sides is overflowing.\n if (!overflows.every(side => side <= 0)) {\n var _middlewareData$flip2, _overflowsData$filter;\n const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;\n const nextPlacement = placements[nextIndex];\n if (nextPlacement) {\n const ignoreCrossAxisOverflow = checkCrossAxis === 'alignment' ? initialSideAxis !== getSideAxis(nextPlacement) : false;\n if (!ignoreCrossAxisOverflow ||\n // We leave the current main axis only if every placement on that axis\n // overflows the main axis.\n overflowsData.every(d => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) {\n // Try next placement and re-run the lifecycle.\n return {\n data: {\n index: nextIndex,\n overflows: overflowsData\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n }\n\n // First, find the candidates that fit on the mainAxis side of overflow,\n // then find the placement that fits the best on the main crossAxis side.\n let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;\n\n // Otherwise fallback.\n if (!resetPlacement) {\n switch (fallbackStrategy) {\n case 'bestFit':\n {\n var _overflowsData$filter2;\n const placement = (_overflowsData$filter2 = overflowsData.filter(d => {\n if (hasFallbackAxisSideDirection) {\n const currentSideAxis = getSideAxis(d.placement);\n return currentSideAxis === initialSideAxis ||\n // Create a bias to the `y` side axis due to horizontal\n // reading directions favoring greater width.\n currentSideAxis === 'y';\n }\n return true;\n }).map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];\n if (placement) {\n resetPlacement = placement;\n }\n break;\n }\n case 'initialPlacement':\n resetPlacement = initialPlacement;\n break;\n }\n }\n if (placement !== resetPlacement) {\n return {\n reset: {\n placement: resetPlacement\n }\n };\n }\n }\n return {};\n }\n };\n};\n\nfunction getSideOffsets(overflow, rect) {\n return {\n top: overflow.top - rect.height,\n right: overflow.right - rect.width,\n bottom: overflow.bottom - rect.height,\n left: overflow.left - rect.width\n };\n}\nfunction isAnySideFullyClipped(overflow) {\n return sides.some(side => overflow[side] >= 0);\n}\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'hide',\n options,\n async fn(state) {\n const {\n rects,\n platform\n } = state;\n const {\n strategy = 'referenceHidden',\n ...detectOverflowOptions\n } = evaluate(options, state);\n switch (strategy) {\n case 'referenceHidden':\n {\n const overflow = await platform.detectOverflow(state, {\n ...detectOverflowOptions,\n elementContext: 'reference'\n });\n const offsets = getSideOffsets(overflow, rects.reference);\n return {\n data: {\n referenceHiddenOffsets: offsets,\n referenceHidden: isAnySideFullyClipped(offsets)\n }\n };\n }\n case 'escaped':\n {\n const overflow = await platform.detectOverflow(state, {\n ...detectOverflowOptions,\n altBoundary: true\n });\n const offsets = getSideOffsets(overflow, rects.floating);\n return {\n data: {\n escapedOffsets: offsets,\n escaped: isAnySideFullyClipped(offsets)\n }\n };\n }\n default:\n {\n return {};\n }\n }\n }\n };\n};\n\nfunction getBoundingRect(rects) {\n const minX = min(...rects.map(rect => rect.left));\n const minY = min(...rects.map(rect => rect.top));\n const maxX = max(...rects.map(rect => rect.right));\n const maxY = max(...rects.map(rect => rect.bottom));\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY\n };\n}\nfunction getRectsByLine(rects) {\n const sortedRects = rects.slice().sort((a, b) => a.y - b.y);\n const groups = [];\n let prevRect = null;\n for (let i = 0; i < sortedRects.length; i++) {\n const rect = sortedRects[i];\n if (!prevRect || rect.y - prevRect.y > prevRect.height / 2) {\n groups.push([rect]);\n } else {\n groups[groups.length - 1].push(rect);\n }\n prevRect = rect;\n }\n return groups.map(rect => rectToClientRect(getBoundingRect(rect)));\n}\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'inline',\n options,\n async fn(state) {\n const {\n placement,\n elements,\n rects,\n platform,\n strategy\n } = state;\n // A MouseEvent's client{X,Y} coords can be up to 2 pixels off a\n // ClientRect's bounds, despite the event listener being triggered. A\n // padding of 2 seems to handle this issue.\n const {\n padding = 2,\n x,\n y\n } = evaluate(options, state);\n const nativeClientRects = Array.from((await (platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference))) || []);\n\n // No rects (e.g. a hidden or detached reference, or a collapsed range) —\n // keep the existing reference rect rather than resetting to an invalid\n // one with non-finite values.\n if (!nativeClientRects.length) {\n return {};\n }\n const clientRects = getRectsByLine(nativeClientRects);\n const fallback = rectToClientRect(getBoundingRect(nativeClientRects));\n const paddingObject = getPaddingObject(padding);\n function getBoundingClientRect() {\n // There are two rects and they are disjoined.\n if (clientRects.length === 2 && (clientRects[0].left > clientRects[1].right || clientRects[1].left > clientRects[0].right) && x != null && y != null) {\n // Find the first rect in which the point is fully inside.\n return clientRects.find(rect => x > rect.left - paddingObject.left && x < rect.right + paddingObject.right && y > rect.top - paddingObject.top && y < rect.bottom + paddingObject.bottom) || fallback;\n }\n\n // There are 2 or more connected rects.\n if (clientRects.length >= 2) {\n if (getSideAxis(placement) === 'y') {\n const firstRect = clientRects[0];\n const lastRect = clientRects[clientRects.length - 1];\n const isTop = getSide(placement) === 'top';\n const top = firstRect.top;\n const bottom = lastRect.bottom;\n const left = isTop ? firstRect.left : lastRect.left;\n const right = isTop ? firstRect.right : lastRect.right;\n return rectToClientRect({\n x: left,\n y: top,\n width: right - left,\n height: bottom - top\n });\n }\n const isLeftSide = getSide(placement) === 'left';\n const maxRight = max(...clientRects.map(rect => rect.right));\n const minLeft = min(...clientRects.map(rect => rect.left));\n const measureRects = clientRects.filter(rect => isLeftSide ? rect.left === minLeft : rect.right === maxRight);\n const top = measureRects[0].top;\n const bottom = measureRects[measureRects.length - 1].bottom;\n return rectToClientRect({\n x: minLeft,\n y: top,\n width: maxRight - minLeft,\n height: bottom - top\n });\n }\n return fallback;\n }\n const resetRects = await platform.getElementRects({\n reference: {\n getBoundingClientRect\n },\n floating: elements.floating,\n strategy\n });\n if (rects.reference.x !== resetRects.reference.x || rects.reference.y !== resetRects.reference.y || rects.reference.width !== resetRects.reference.width || rects.reference.height !== resetRects.reference.height) {\n return {\n reset: {\n rects: resetRects\n }\n };\n }\n return {};\n }\n };\n};\n\nconst originSides = /*#__PURE__*/new Set(['left', 'top']);\n\n// For type backwards-compatibility, the `OffsetOptions` type was also\n// Derivable.\n\nasync function convertValueToCoords(state, options) {\n const {\n placement,\n platform,\n elements\n } = state;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isVertical = getSideAxis(placement) === 'y';\n const mainAxisMulti = originSides.has(side) ? -1 : 1;\n const crossAxisMulti = rtl && isVertical ? -1 : 1;\n const rawValue = evaluate(options, state);\n\n // eslint-disable-next-line prefer-const\n let {\n mainAxis,\n crossAxis,\n alignmentAxis\n } = typeof rawValue === 'number' ? {\n mainAxis: rawValue,\n crossAxis: 0,\n alignmentAxis: null\n } : {\n mainAxis: rawValue.mainAxis || 0,\n crossAxis: rawValue.crossAxis || 0,\n alignmentAxis: rawValue.alignmentAxis\n };\n if (alignment && typeof alignmentAxis === 'number') {\n crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;\n }\n return isVertical ? {\n x: crossAxis * crossAxisMulti,\n y: mainAxis * mainAxisMulti\n } : {\n x: mainAxis * mainAxisMulti,\n y: crossAxis * crossAxisMulti\n };\n}\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = function (options) {\n if (options === void 0) {\n options = 0;\n }\n return {\n name: 'offset',\n options,\n async fn(state) {\n var _middlewareData$offse, _middlewareData$arrow;\n const {\n x,\n y,\n placement,\n middlewareData\n } = state;\n const diffCoords = await convertValueToCoords(state, options);\n\n // If the placement is the same and the arrow caused an alignment offset\n // then we don't need to change the positioning coordinates.\n if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n return {\n x: x + diffCoords.x,\n y: y + diffCoords.y,\n data: {\n ...diffCoords,\n placement\n }\n };\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'shift',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement,\n platform\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = false,\n limiter = {\n fn: _ref => {\n let {\n x,\n y\n } = _ref;\n return {\n x,\n y\n };\n }\n },\n ...detectOverflowOptions\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const overflow = await platform.detectOverflow(state, detectOverflowOptions);\n const crossAxis = getSideAxis(placement);\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n const clampCoord = (axis, coord) => clamp(coord + overflow[axis === 'y' ? 'top' : 'left'], coord, coord - overflow[axis === 'y' ? 'bottom' : 'right']);\n if (checkMainAxis) {\n mainAxisCoord = clampCoord(mainAxis, mainAxisCoord);\n }\n if (checkCrossAxis) {\n crossAxisCoord = clampCoord(crossAxis, crossAxisCoord);\n }\n const limitedCoords = limiter.fn({\n ...state,\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n });\n return {\n ...limitedCoords,\n data: {\n x: limitedCoords.x - x,\n y: limitedCoords.y - y,\n enabled: {\n [mainAxis]: checkMainAxis,\n [crossAxis]: checkCrossAxis\n }\n }\n };\n }\n };\n};\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n options,\n fn(state) {\n var _rawOffset$mainAxis, _rawOffset$crossAxis;\n const {\n x,\n y,\n placement,\n rects,\n middlewareData\n } = state;\n const {\n offset = 0,\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const crossAxis = getSideAxis(placement);\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n const rawOffset = evaluate(offset, state);\n const computedOffset = typeof rawOffset === 'number' ? {\n mainAxis: rawOffset,\n crossAxis: 0\n } : {\n mainAxis: (_rawOffset$mainAxis = rawOffset.mainAxis) != null ? _rawOffset$mainAxis : 0,\n crossAxis: (_rawOffset$crossAxis = rawOffset.crossAxis) != null ? _rawOffset$crossAxis : 0\n };\n if (checkMainAxis) {\n const len = mainAxis === 'y' ? 'height' : 'width';\n const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;\n const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;\n if (mainAxisCoord < limitMin) {\n mainAxisCoord = limitMin;\n } else if (mainAxisCoord > limitMax) {\n mainAxisCoord = limitMax;\n }\n }\n if (checkCrossAxis) {\n var _middlewareData$offse, _middlewareData$offse2;\n const len = mainAxis === 'y' ? 'width' : 'height';\n const isOriginSide = originSides.has(getSide(placement));\n const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);\n const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);\n if (crossAxisCoord < limitMin) {\n crossAxisCoord = limitMin;\n } else if (crossAxisCoord > limitMax) {\n crossAxisCoord = limitMax;\n }\n }\n return {\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n };\n }\n };\n};\n\n// Method syntax keeps callback parameters bivariant, but expressing the\n// explicit `| undefined` required by `exactOptionalPropertyTypes` needs\n// property syntax, which is contravariant under `strictFunctionTypes`.\n// Extracting the function from a method position restores that bivariance so\n// consumers can still assign callbacks with narrower parameter types.\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'size',\n options,\n async fn(state) {\n const {\n placement,\n rects,\n platform,\n elements\n } = state;\n const {\n apply = () => {},\n ...detectOverflowOptions\n } = evaluate(options, state);\n const overflow = await platform.detectOverflow(state, detectOverflowOptions);\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isYAxis = getSideAxis(placement) === 'y';\n const {\n width,\n height\n } = rects.floating;\n let heightSide;\n let widthSide;\n if (side === 'top' || side === 'bottom') {\n heightSide = side;\n widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right';\n } else {\n widthSide = side;\n heightSide = alignment === 'end' ? 'top' : 'bottom';\n }\n const maximumClippingHeight = height - overflow.top - overflow.bottom;\n const maximumClippingWidth = width - overflow.left - overflow.right;\n const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);\n const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);\n const shiftData = state.middlewareData.shift;\n const noShift = !shiftData;\n let availableHeight = overflowAvailableHeight;\n let availableWidth = overflowAvailableWidth;\n if (shiftData != null && shiftData.enabled.x) {\n availableWidth = maximumClippingWidth;\n }\n if (shiftData != null && shiftData.enabled.y) {\n availableHeight = maximumClippingHeight;\n }\n if (noShift && !alignment) {\n if (isYAxis) {\n availableWidth = width - 2 * max(overflow.left, overflow.right);\n } else {\n availableHeight = height - 2 * max(overflow.top, overflow.bottom);\n }\n }\n await apply({\n ...state,\n availableWidth,\n availableHeight\n });\n const nextDimensions = await platform.getDimensions(elements.floating);\n if (width !== nextDimensions.width || height !== nextDimensions.height) {\n return {\n reset: {\n rects: true\n }\n };\n }\n return {};\n }\n };\n};\n\nexport { arrow, autoPlacement, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, shift, size };\n","function hasWindow() {\n return typeof window !== 'undefined';\n}\nfunction getNodeName(node) {\n if (isNode(node)) {\n return (node.nodeName || '').toLowerCase();\n }\n // Mocked nodes in testing environments may not be instances of Node. By\n // returning `#document` an infinite loop won't occur.\n // https://github.com/floating-ui/floating-ui/issues/2317\n return '#document';\n}\nfunction getWindow(node) {\n var _node$ownerDocument;\n return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;\n}\nfunction getDocumentElement(node) {\n var _ref;\n return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;\n}\nfunction isNode(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Node || value instanceof getWindow(value).Node;\n}\nfunction isElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Element || value instanceof getWindow(value).Element;\n}\nfunction isHTMLElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;\n}\nfunction isShadowRoot(value) {\n if (!hasWindow() || typeof ShadowRoot === 'undefined') {\n return false;\n }\n return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;\n}\nfunction isOverflowElement(element) {\n const {\n overflow,\n overflowX,\n overflowY,\n display\n } = getComputedStyle(element);\n return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== 'inline' && display !== 'contents';\n}\nfunction isTableElement(element) {\n return /^(table|td|th)$/.test(getNodeName(element));\n}\nfunction isTopLayer(element) {\n try {\n if (element.matches(':popover-open')) {\n return true;\n }\n } catch (_e) {\n // no-op\n }\n try {\n return element.matches(':modal');\n } catch (_e) {\n return false;\n }\n}\nconst willChangeRe = /transform|translate|scale|rotate|perspective|filter/;\nconst containRe = /paint|layout|strict|content/;\nconst isNotNone = value => !!value && value !== 'none';\nlet isWebKitValue;\nfunction isContainingBlock(elementOrCss) {\n const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n // https://drafts.csswg.org/css-transforms-2/#individual-transforms\n return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || '') || containRe.test(css.contain || '');\n}\nfunction getContainingBlock(element) {\n let currentNode = getParentNode(element);\n while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {\n if (isContainingBlock(currentNode)) {\n return currentNode;\n } else if (isTopLayer(currentNode)) {\n return null;\n }\n currentNode = getParentNode(currentNode);\n }\n return null;\n}\nfunction isWebKit() {\n if (isWebKitValue == null) {\n isWebKitValue = typeof CSS !== 'undefined' && CSS.supports && CSS.supports('-webkit-backdrop-filter', 'none');\n }\n return isWebKitValue;\n}\nfunction isLastTraversableNode(node) {\n return /^(html|body|#document)$/.test(getNodeName(node));\n}\nfunction getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}\nfunction getNodeScroll(element) {\n if (isElement(element)) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n }\n return {\n scrollLeft: element.scrollX,\n scrollTop: element.scrollY\n };\n}\nfunction getParentNode(node) {\n if (getNodeName(node) === 'html') {\n return node;\n }\n const result =\n // Step into the shadow DOM of the parent of a slotted node.\n node.assignedSlot ||\n // DOM Element detected.\n node.parentNode ||\n // ShadowRoot detected.\n isShadowRoot(node) && node.host ||\n // Fallback.\n getDocumentElement(node);\n return isShadowRoot(result) ? result.host : result;\n}\nfunction getNearestOverflowAncestor(node) {\n const parentNode = getParentNode(node);\n if (isLastTraversableNode(parentNode)) {\n return (node.ownerDocument || node).body;\n }\n if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {\n return parentNode;\n }\n return getNearestOverflowAncestor(parentNode);\n}\nfunction getOverflowAncestors(node, list, traverseIframes) {\n var _node$ownerDocument2;\n if (list === void 0) {\n list = [];\n }\n if (traverseIframes === void 0) {\n traverseIframes = true;\n }\n const scrollableAncestor = getNearestOverflowAncestor(node);\n const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);\n const win = getWindow(scrollableAncestor);\n if (isBody) {\n const frameElement = getFrameElement(win);\n return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);\n } else {\n return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));\n }\n}\nfunction getFrameElement(win) {\n return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;\n}\n\nexport { getComputedStyle, getContainingBlock, getDocumentElement, getFrameElement, getNearestOverflowAncestor, getNodeName, getNodeScroll, getOverflowAncestors, getParentNode, getWindow, isContainingBlock, isElement, isHTMLElement, isLastTraversableNode, isNode, isOverflowElement, isShadowRoot, isTableElement, isTopLayer, isWebKit };\n","import { rectToClientRect, arrow as arrow$1, autoPlacement as autoPlacement$1, detectOverflow as detectOverflow$1, flip as flip$1, hide as hide$1, inline as inline$1, limitShift as limitShift$1, offset as offset$1, shift as shift$1, size as size$1, computePosition as computePosition$1 } from '@floating-ui/core';\nimport { round, createCoords, max, min, floor } from '@floating-ui/utils';\nimport { getComputedStyle as getComputedStyle$1, isHTMLElement, isElement, getWindow, isWebKit, getFrameElement, getNodeScroll, getDocumentElement, isTopLayer, getNodeName, isOverflowElement, getOverflowAncestors, getParentNode, isLastTraversableNode, isContainingBlock, isTableElement, getContainingBlock } from '@floating-ui/utils/dom';\nexport { getOverflowAncestors } from '@floating-ui/utils/dom';\n\nfunction getCssDimensions(element) {\n const css = getComputedStyle$1(element);\n // In testing environments, the `width` and `height` properties are empty\n // strings for SVG elements, returning NaN. Fallback to `0` in this case.\n let width = parseFloat(css.width) || 0;\n let height = parseFloat(css.height) || 0;\n const hasOffset = isHTMLElement(element);\n const offsetWidth = hasOffset ? element.offsetWidth : width;\n const offsetHeight = hasOffset ? element.offsetHeight : height;\n const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;\n if (shouldFallback) {\n width = offsetWidth;\n height = offsetHeight;\n }\n return {\n width,\n height,\n $: shouldFallback\n };\n}\n\nfunction unwrapElement(element) {\n return !isElement(element) ? element.contextElement : element;\n}\n\nfunction getScale(element) {\n const domElement = unwrapElement(element);\n if (!isHTMLElement(domElement)) {\n return createCoords(1);\n }\n const rect = domElement.getBoundingClientRect();\n const {\n width,\n height,\n $\n } = getCssDimensions(domElement);\n let x = ($ ? round(rect.width) : rect.width) / width;\n let y = ($ ? round(rect.height) : rect.height) / height;\n\n // 0, NaN, or Infinity should always fallback to 1.\n\n if (!x || !Number.isFinite(x)) {\n x = 1;\n }\n if (!y || !Number.isFinite(y)) {\n y = 1;\n }\n return {\n x,\n y\n };\n}\n\nconst noOffsets = /*#__PURE__*/createCoords(0);\nfunction getVisualOffsets(element) {\n const win = getWindow(element);\n if (!isWebKit() || !win.visualViewport) {\n return noOffsets;\n }\n return {\n x: win.visualViewport.offsetLeft,\n y: win.visualViewport.offsetTop\n };\n}\nfunction shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n return !!floatingOffsetParent && isFixed && floatingOffsetParent === getWindow(element);\n}\n\nfunction getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n const clientRect = element.getBoundingClientRect();\n const domElement = unwrapElement(element);\n let scale = createCoords(1);\n if (includeScale) {\n if (offsetParent) {\n if (isElement(offsetParent)) {\n scale = getScale(offsetParent);\n }\n } else {\n scale = getScale(element);\n }\n }\n const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);\n let x = (clientRect.left + visualOffsets.x) / scale.x;\n let y = (clientRect.top + visualOffsets.y) / scale.y;\n let width = clientRect.width / scale.x;\n let height = clientRect.height / scale.y;\n if (domElement && offsetParent) {\n const win = getWindow(domElement);\n const offsetWin = isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;\n let currentWin = win;\n let currentIFrame = getFrameElement(currentWin);\n while (currentIFrame && offsetWin !== currentWin) {\n const iframeScale = getScale(currentIFrame);\n const iframeRect = currentIFrame.getBoundingClientRect();\n const css = getComputedStyle$1(currentIFrame);\n const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;\n const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;\n x *= iframeScale.x;\n y *= iframeScale.y;\n width *= iframeScale.x;\n height *= iframeScale.y;\n x += left;\n y += top;\n currentWin = getWindow(currentIFrame);\n currentIFrame = getFrameElement(currentWin);\n }\n }\n return rectToClientRect({\n width,\n height,\n x,\n y\n });\n}\n\n// If <html> has a CSS width greater than the viewport, then this will be\n// incorrect for RTL.\nfunction getWindowScrollBarX(element, rect) {\n const leftScroll = getNodeScroll(element).scrollLeft;\n if (!rect) {\n return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;\n }\n return rect.left + leftScroll;\n}\n\nfunction getHTMLOffset(documentElement, scroll) {\n const htmlRect = documentElement.getBoundingClientRect();\n const x = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);\n const y = htmlRect.top + scroll.scrollTop;\n return {\n x,\n y\n };\n}\n\nfunction convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {\n let {\n elements,\n rect,\n offsetParent,\n strategy\n } = _ref;\n const isFixed = strategy === 'fixed';\n const documentElement = getDocumentElement(offsetParent);\n const topLayer = elements ? isTopLayer(elements.floating) : false;\n if (offsetParent === documentElement || topLayer && isFixed) {\n return rect;\n }\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n let scale = createCoords(1);\n const offsets = createCoords(0);\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n if (isOffsetParentAnElement || !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isOffsetParentAnElement) {\n const offsetRect = getBoundingClientRect(offsetParent);\n scale = getScale(offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n }\n }\n const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);\n return {\n width: rect.width * scale.x,\n height: rect.height * scale.y,\n x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,\n y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y\n };\n}\n\nfunction getClientRects(element) {\n return element.getClientRects ? Array.from(element.getClientRects()) : [];\n}\n\n// Gets the entire size of the scrollable document area, even extending outside\n// of the `<html>` and `<body>` rect bounds if horizontally scrollable.\nfunction getDocumentRect(html) {\n const scroll = getNodeScroll(html);\n const body = html.ownerDocument.body;\n const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);\n const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);\n let x = -scroll.scrollLeft + getWindowScrollBarX(html);\n const y = -scroll.scrollTop;\n if (getComputedStyle$1(body).direction === 'rtl') {\n x += max(html.clientWidth, body.clientWidth) - width;\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\n// Safety check: ensure the scrollbar space is reasonable in case this\n// calculation is affected by unusual styles.\n// Most scrollbars leave 15-18px of space.\nconst SCROLLBAR_MAX = 25;\nfunction getViewportRect(element, strategy, rootBoundary) {\n if (rootBoundary === void 0) {\n rootBoundary = 'viewport';\n }\n const isLayoutViewport = rootBoundary === 'layoutViewport';\n const win = getWindow(element);\n const html = getDocumentElement(element);\n const visualViewport = win.visualViewport;\n let width = html.clientWidth;\n let height = html.clientHeight;\n let x = 0;\n let y = 0;\n if (visualViewport) {\n // Client coordinates are relative to the layout viewport, except in\n // WebKit with an `absolute` strategy, where they are relative to the\n // visual viewport.\n const layoutRelativeClientCoords = !isWebKit() || strategy === 'fixed';\n if (isLayoutViewport) {\n if (!layoutRelativeClientCoords) {\n x = -visualViewport.offsetLeft;\n y = -visualViewport.offsetTop;\n }\n } else {\n width = visualViewport.width;\n height = visualViewport.height;\n if (layoutRelativeClientCoords) {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n }\n const windowScrollbarX = getWindowScrollBarX(html);\n // `scrollbar-gutter: stable` on the <html> reserves gutter space that shrinks\n // the visual width but isn't reflected in `html.clientWidth`, so subtract it.\n // Only the inline-end (right) gutter can hold the scrollbar; `both-edges` also\n // reserves an empty inline-start gutter that clips nothing, so exclude just\n // the one scrollbar-side gutter — halve the measured (two-gutter) total. A\n // left-side scrollbar (`windowScrollbarX > 0`) is already handled by\n // `getHTMLOffset`/`visualViewport.width`; skip it here.\n if (windowScrollbarX <= 0) {\n const doc = html.ownerDocument;\n const body = doc.body;\n const bodyStyles = getComputedStyle(body);\n const bodyMarginInline = doc.compatMode === 'CSS1Compat' ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;\n const reservedWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);\n const gutter = getComputedStyle(html).scrollbarGutter === 'stable both-edges' ? reservedWidth / 2 : reservedWidth;\n if (gutter <= SCROLLBAR_MAX) {\n width -= gutter;\n }\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\n// Returns the inner client rect, subtracting scrollbars if present.\nfunction getInnerBoundingClientRect(element, strategy) {\n const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');\n const top = clientRect.top + element.clientTop;\n const left = clientRect.left + element.clientLeft;\n const scale = getScale(element);\n const width = element.clientWidth * scale.x;\n const height = element.clientHeight * scale.y;\n const x = left * scale.x;\n const y = top * scale.y;\n return {\n width,\n height,\n x,\n y\n };\n}\nfunction getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {\n let rect;\n if (clippingAncestor === 'viewport' || clippingAncestor === 'layoutViewport') {\n rect = getViewportRect(element, strategy, clippingAncestor);\n } else if (clippingAncestor === 'document') {\n rect = getDocumentRect(getDocumentElement(element));\n } else if (isElement(clippingAncestor)) {\n rect = getInnerBoundingClientRect(clippingAncestor, strategy);\n } else {\n const visualOffsets = getVisualOffsets(element);\n rect = {\n x: clippingAncestor.x - visualOffsets.x,\n y: clippingAncestor.y - visualOffsets.y,\n width: clippingAncestor.width,\n height: clippingAncestor.height\n };\n }\n return rectToClientRect(rect);\n}\n\n// A \"clipping ancestor\" is an `overflow` element with the characteristic of\n// clipping (or hiding) child elements. This returns all clipping ancestors\n// of the given element up the tree.\nfunction getClippingElementAncestors(element, cache) {\n const cachedResult = cache.get(element);\n if (cachedResult) {\n return cachedResult;\n }\n let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');\n let lastKeptComputedStyle = null;\n const elementIsFixed = getComputedStyle$1(element).position === 'fixed';\n let currentNode = elementIsFixed ? getParentNode(element) : element;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {\n const computedStyle = getComputedStyle$1(currentNode);\n const currentNodeIsContaining = isContainingBlock(currentNode);\n // Position of the containing block chain below the current node. A fixed\n // element whose containing block hasn't been found yet is a fixed chain.\n const lastPosition = lastKeptComputedStyle ? lastKeptComputedStyle.position : elementIsFixed ? 'fixed' : '';\n\n // A non-containing ancestor does not clip the element when the chain\n // below it escapes it: a fixed chain escapes all ancestors up to the\n // next containing block, an absolute chain escapes static ancestors.\n const shouldDropCurrentNode = !currentNodeIsContaining && (lastPosition === 'fixed' || lastPosition === 'absolute' && computedStyle.position === 'static');\n if (shouldDropCurrentNode) {\n // Drop non-containing blocks.\n result = result.filter(ancestor => ancestor !== currentNode);\n } else {\n // The kept node carries the chain position for the next iteration.\n lastKeptComputedStyle = computedStyle;\n }\n currentNode = getParentNode(currentNode);\n }\n cache.set(element, result);\n return result;\n}\n\n// Gets the maximum area that the element is visible in due to any number of\n// clipping ancestors.\nfunction getClippingRect(_ref) {\n let {\n element,\n boundary,\n rootBoundary,\n strategy\n } = _ref;\n const elementClippingAncestors = boundary === 'clippingAncestors' ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);\n const clippingAncestors = [...elementClippingAncestors, rootBoundary];\n const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy);\n let top = firstRect.top;\n let right = firstRect.right;\n let bottom = firstRect.bottom;\n let left = firstRect.left;\n for (let i = 1; i < clippingAncestors.length; i++) {\n const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i], strategy);\n top = max(rect.top, top);\n right = min(rect.right, right);\n bottom = min(rect.bottom, bottom);\n left = max(rect.left, left);\n }\n return {\n width: right - left,\n height: bottom - top,\n x: left,\n y: top\n };\n}\n\nfunction getDimensions(element) {\n const {\n width,\n height\n } = getCssDimensions(element);\n return {\n width,\n height\n };\n}\n\nfunction getRectRelativeToOffsetParent(element, offsetParent, strategy) {\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n const documentElement = getDocumentElement(offsetParent);\n const isFixed = strategy === 'fixed';\n const rect = getBoundingClientRect(element, true, isFixed, offsetParent);\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n const offsets = createCoords(0);\n if (isOffsetParentAnElement || !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isOffsetParentAnElement) {\n const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n }\n }\n\n // If the <body> scrollbar appears on the left (e.g. RTL systems). Use\n // Firefox with layout.scrollbar.side = 3 in about:config to test this.\n if (!isOffsetParentAnElement && documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);\n const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;\n const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;\n return {\n x,\n y,\n width: rect.width,\n height: rect.height\n };\n}\n\nfunction isStaticPositioned(element) {\n return getComputedStyle$1(element).position === 'static';\n}\n\nfunction getTrueOffsetParent(element, polyfill) {\n if (!isHTMLElement(element) || getComputedStyle$1(element).position === 'fixed') {\n return null;\n }\n if (polyfill) {\n return polyfill(element);\n }\n let rawOffsetParent = element.offsetParent;\n\n // Firefox returns the <html> element as the offsetParent if it's non-static,\n // while Chrome and Safari return the <body> element. The <body> element must\n // be used to perform the correct calculations even if the <html> element is\n // non-static.\n if (getDocumentElement(element) === rawOffsetParent) {\n rawOffsetParent = rawOffsetParent.ownerDocument.body;\n }\n return rawOffsetParent;\n}\n\n// Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\nfunction getOffsetParent(element, polyfill) {\n const win = getWindow(element);\n if (isTopLayer(element)) {\n return win;\n }\n if (!isHTMLElement(element)) {\n let svgOffsetParent = getParentNode(element);\n while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {\n if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {\n return svgOffsetParent;\n }\n svgOffsetParent = getParentNode(svgOffsetParent);\n }\n return win;\n }\n let offsetParent = getTrueOffsetParent(element, polyfill);\n while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {\n offsetParent = getTrueOffsetParent(offsetParent, polyfill);\n }\n if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {\n return win;\n }\n return offsetParent || getContainingBlock(element) || win;\n}\n\nconst getElementRects = async function (data) {\n const getOffsetParentFn = this.getOffsetParent || getOffsetParent;\n const getDimensionsFn = this.getDimensions;\n const floatingDimensions = await getDimensionsFn(data.floating);\n return {\n reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),\n floating: {\n x: 0,\n y: 0,\n width: floatingDimensions.width,\n height: floatingDimensions.height\n }\n };\n};\n\nfunction isRTL(element) {\n return getComputedStyle$1(element).direction === 'rtl';\n}\n\nconst platform = {\n convertOffsetParentRelativeRectToViewportRelativeRect,\n getDocumentElement,\n getClippingRect,\n getOffsetParent,\n getElementRects,\n getClientRects,\n getDimensions,\n getScale,\n isElement,\n isRTL\n};\n\nfunction rectsAreEqual(a, b) {\n return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;\n}\n\n// https://samthor.au/2021/observing-dom/\nfunction observeMove(element, onMove, ancestorResize) {\n let io = null;\n let timeoutId;\n const root = getDocumentElement(element);\n function cleanup() {\n var _io;\n clearTimeout(timeoutId);\n (_io = io) == null || _io.disconnect();\n io = null;\n }\n function refresh(skip, threshold) {\n if (skip === void 0) {\n skip = false;\n }\n if (threshold === void 0) {\n threshold = 1;\n }\n cleanup();\n const elementRectForRootMargin = element.getBoundingClientRect();\n const {\n left,\n top,\n width,\n height\n } = elementRectForRootMargin;\n if (!skip) {\n onMove();\n }\n if (!width || !height) {\n return;\n }\n const insetTop = floor(top);\n const insetRight = floor(root.clientWidth - (left + width));\n const insetBottom = floor(root.clientHeight - (top + height));\n const insetLeft = floor(left);\n const rootMargin = -insetTop + \"px \" + -insetRight + \"px \" + -insetBottom + \"px \" + -insetLeft + \"px\";\n const options = {\n rootMargin,\n threshold: max(0, min(1, threshold)) || 1\n };\n let isFirstUpdate = true;\n function handleObserve(entries) {\n const ratio = entries[0].intersectionRatio;\n\n // The entry is a snapshot, so the reference may have moved since the\n // intersection was computed (under performance constraints, or between\n // consecutive frames of a multi-frame layout shift). The reported ratio\n // and the observed area are stale in that case and cannot be trusted to\n // detect subsequent movement, so refresh regardless of the ratio.\n if (!rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {\n return refresh();\n }\n if (ratio !== threshold) {\n if (!isFirstUpdate) {\n return refresh();\n }\n if (!ratio) {\n // If the reference is clipped in place, the ratio is 0. Throttle\n // the refresh to prevent an infinite loop of updates.\n timeoutId = setTimeout(() => {\n refresh(false, 1e-7);\n }, 1000);\n } else {\n refresh(false, ratio);\n }\n }\n isFirstUpdate = false;\n }\n\n // Older browsers don't support a `document` as the root and will throw an\n // error.\n try {\n io = new IntersectionObserver(handleObserve, {\n ...options,\n // Handle <iframe>s\n root: root.ownerDocument\n });\n } catch (_e) {\n io = new IntersectionObserver(handleObserve, options);\n }\n io.observe(element);\n }\n const win = getWindow(element);\n // The window is a resize ancestor, so when `ancestorResize` is enabled its\n // listener already runs the update on resize. Here we only need to rebuild\n // the `IntersectionObserver` for the new root size, skipping a redundant\n // update. When `ancestorResize` is disabled, this becomes the sole update.\n const handleResize = () => refresh(ancestorResize);\n win.addEventListener('resize', handleResize);\n refresh(true);\n return () => {\n win.removeEventListener('resize', handleResize);\n cleanup();\n };\n}\n\n/**\n * Automatically updates the position of the floating element when necessary.\n * Should only be called when the floating element is mounted on the DOM or\n * visible on the screen.\n * @returns cleanup function that should be invoked when the floating element is\n * removed from the DOM or hidden from the screen.\n * @see https://floating-ui.com/docs/autoUpdate\n */\nfunction autoUpdate(reference, floating, update, options) {\n if (options === void 0) {\n options = {};\n }\n const {\n ancestorScroll = true,\n ancestorResize = true,\n elementResize = typeof ResizeObserver === 'function',\n layoutShift = typeof IntersectionObserver === 'function',\n animationFrame = false\n } = options;\n const referenceEl = unwrapElement(reference);\n const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...(floating ? getOverflowAncestors(floating) : [])] : [];\n ancestors.forEach(ancestor => {\n ancestorScroll && ancestor.addEventListener('scroll', update);\n ancestorResize && ancestor.addEventListener('resize', update);\n });\n const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update, ancestorResize) : null;\n let reobserveFrame = -1;\n let resizeObserver = null;\n if (elementResize) {\n resizeObserver = new ResizeObserver(_ref => {\n let [firstEntry] = _ref;\n if (firstEntry && firstEntry.target === referenceEl && resizeObserver && floating) {\n // Prevent update loops when using the `size` middleware.\n // https://github.com/floating-ui/floating-ui/issues/1740\n resizeObserver.unobserve(floating);\n cancelAnimationFrame(reobserveFrame);\n reobserveFrame = requestAnimationFrame(() => {\n var _resizeObserver;\n (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);\n });\n }\n update();\n });\n if (referenceEl && !animationFrame) {\n resizeObserver.observe(referenceEl);\n }\n if (floating) {\n resizeObserver.observe(floating);\n }\n }\n let frameId;\n let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;\n if (animationFrame) {\n frameLoop();\n }\n function frameLoop() {\n const nextRefRect = getBoundingClientRect(reference);\n if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) {\n update();\n }\n prevRefRect = nextRefRect;\n frameId = requestAnimationFrame(frameLoop);\n }\n update();\n return () => {\n var _resizeObserver2;\n ancestors.forEach(ancestor => {\n ancestorScroll && ancestor.removeEventListener('scroll', update);\n ancestorResize && ancestor.removeEventListener('resize', update);\n });\n cleanupIo == null || cleanupIo();\n (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();\n resizeObserver = null;\n if (animationFrame) {\n cancelAnimationFrame(frameId);\n }\n };\n}\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\nconst detectOverflow = detectOverflow$1;\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = offset$1;\n\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = autoPlacement$1;\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = shift$1;\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = flip$1;\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = size$1;\n\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = hide$1;\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = arrow$1;\n\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = inline$1;\n\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = limitShift$1;\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n */\nconst computePosition = (reference, floating, options) => {\n // This caches the expensive `getClippingElementAncestors` function so that\n // multiple lifecycle resets re-use the same result. It only lives for a\n // single call. If other functions become expensive, we can add them as well.\n const cache = new Map();\n const mergedOptions = options != null ? options : {};\n const platformWithCache = {\n ...platform,\n ...mergedOptions.platform,\n _c: cache\n };\n return computePosition$1(reference, floating, {\n ...mergedOptions,\n platform: platformWithCache\n });\n};\n\nexport { arrow, autoPlacement, autoUpdate, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, platform, shift, size };\n","import { computePosition } from \"@floating-ui/dom\";\nimport { simpleBox } from \"svelte-toolbelt\";\nimport { get, getDPR, roundByDPR } from \"./floating-utils.svelte.js\";\nexport function useFloating(options) {\n /** Options */\n const whileElementsMountedOption = options.whileElementsMounted;\n const openOption = $derived(get(options.open) ?? true);\n const middlewareOption = $derived(get(options.middleware));\n const transformOption = $derived(get(options.transform) ?? true);\n const placementOption = $derived(get(options.placement) ?? \"bottom\");\n const strategyOption = $derived(get(options.strategy) ?? \"absolute\");\n const sideOffsetOption = $derived(get(options.sideOffset) ?? 0);\n const alignOffsetOption = $derived(get(options.alignOffset) ?? 0);\n const reference = options.reference;\n /** State */\n let x = $state(0);\n let y = $state(0);\n const floating = simpleBox(null);\n // svelte-ignore state_referenced_locally\n let strategy = $state(strategyOption);\n // svelte-ignore state_referenced_locally\n let placement = $state(placementOption);\n let middlewareData = $state({});\n let isPositioned = $state(false);\n let hasWhileMountedPosition = false;\n let updateRequestId = 0;\n // `update` is handed to `whileElementsMounted` (floating-ui's `autoUpdate`),\n // whose observers can still fire after the effect owning the option\n // `$derived`s above is destroyed. Reading them then warns `derived_inert`.\n let destroyed = false;\n const floatingStyles = $derived.by(() => {\n // preserve last known position when floating ref is null (during transitions)\n const xVal = floating.current ? roundByDPR(floating.current, x) : x;\n const yVal = floating.current ? roundByDPR(floating.current, y) : y;\n if (transformOption) {\n return {\n position: strategy,\n left: \"0\",\n top: \"0\",\n transform: `translate(${xVal}px, ${yVal}px)`,\n ...(floating.current &&\n getDPR(floating.current) >= 1.5 && {\n willChange: \"transform\",\n }),\n };\n }\n return {\n position: strategy,\n left: `${xVal}px`,\n top: `${yVal}px`,\n };\n });\n /** Effects */\n let whileElementsMountedCleanup;\n function update() {\n if (destroyed)\n return;\n if (reference.current === null || floating.current === null)\n return;\n const referenceNode = reference.current;\n const floatingNode = floating.current;\n const requestId = ++updateRequestId;\n computePosition(referenceNode, floatingNode, {\n middleware: middlewareOption,\n placement: placementOption,\n strategy: strategyOption,\n }).then((position) => {\n // ignore stale async resolutions when newer updates were requested.\n if (requestId !== updateRequestId)\n return;\n // ignore stale resolutions after ref replacement.\n if (reference.current !== referenceNode || floating.current !== floatingNode)\n return;\n const referenceHidden = isReferenceHidden(referenceNode);\n if (referenceHidden) {\n // keep last good coordinates when the anchor disappears to avoid\n // a transient jump to viewport origin before close propagates.\n middlewareData = {\n ...middlewareData,\n hide: {\n // oxlint-disable-next-line no-explicit-any\n ...middlewareData.hide,\n referenceHidden: true,\n },\n };\n return;\n }\n // ignore bad coordinates that cause jumping during close transitions\n if (!openOption && x !== 0 && y !== 0) {\n // if we had a good position and now getting coordinates near\n // the expected offset bounds during close, ignore it\n const maxExpectedOffset = Math.max(Math.abs(sideOffsetOption), Math.abs(alignOffsetOption), 15);\n if (position.x <= maxExpectedOffset && position.y <= maxExpectedOffset)\n return;\n }\n x = position.x;\n y = position.y;\n strategy = position.strategy;\n placement = position.placement;\n middlewareData = position.middlewareData;\n isPositioned = true;\n });\n }\n function cleanup() {\n if (typeof whileElementsMountedCleanup === \"function\") {\n whileElementsMountedCleanup();\n whileElementsMountedCleanup = undefined;\n }\n updateRequestId++;\n }\n function attach() {\n cleanup();\n if (whileElementsMountedOption === undefined) {\n update();\n return;\n }\n if (!openOption)\n return;\n if (reference.current === null || floating.current === null)\n return;\n whileElementsMountedCleanup = whileElementsMountedOption(reference.current, floating.current, update);\n }\n function reset() {\n if (!openOption && floating.current === null) {\n isPositioned = false;\n }\n }\n function trackWhileMountedDeps() {\n return [\n middlewareOption,\n placementOption,\n strategyOption,\n sideOffsetOption,\n alignOffsetOption,\n openOption,\n ];\n }\n $effect(() => {\n if (whileElementsMountedOption !== undefined)\n return;\n if (!openOption)\n return;\n update();\n });\n $effect(attach);\n $effect(() => {\n if (whileElementsMountedOption === undefined)\n return;\n trackWhileMountedDeps();\n if (!openOption) {\n hasWhileMountedPosition = false;\n return;\n }\n if (!isPositioned) {\n hasWhileMountedPosition = false;\n return;\n }\n // skip the first post-position run, since autoUpdate already computed it\n if (!hasWhileMountedPosition) {\n hasWhileMountedPosition = true;\n return;\n }\n update();\n });\n $effect(reset);\n $effect(() => () => {\n destroyed = true;\n cleanup();\n });\n return {\n floating,\n reference,\n get strategy() {\n return strategy;\n },\n get placement() {\n return placement;\n },\n get middlewareData() {\n return middlewareData;\n },\n get isPositioned() {\n return isPositioned;\n },\n get floatingStyles() {\n return floatingStyles;\n },\n get update() {\n return update;\n },\n };\n}\nfunction isReferenceHidden(node) {\n if (!(node instanceof Element))\n return false;\n if (!node.isConnected)\n return true;\n if (node instanceof HTMLElement && node.hidden)\n return true;\n return node.getClientRects().length === 0;\n}\n","import { arrow, autoUpdate, flip, hide, limitShift, offset, shift, size, } from \"@floating-ui/dom\";\nimport { attachRef, cssToStyleObj, getWindow, styleToString, simpleBox, } from \"svelte-toolbelt\";\nimport { Context, ElementSize, watch } from \"runed\";\nimport { FloatingRootContext, FloatingTooltipRootContext, } from \"./floating-root.svelte.js\";\nimport { isNotNull } from \"../../../internal/is.js\";\nimport { useId } from \"../../../internal/use-id.js\";\nimport { useFloating } from \"../../../internal/floating-svelte/use-floating.svelte.js\";\nexport const SIDE_OPTIONS = [\"top\", \"right\", \"bottom\", \"left\"];\nexport const ALIGN_OPTIONS = [\"start\", \"center\", \"end\"];\nconst OPPOSITE_SIDE = {\n top: \"bottom\",\n right: \"left\",\n bottom: \"top\",\n left: \"right\",\n};\nconst FloatingContentContext = new Context(\"Floating.Content\");\nexport class FloatingContentState {\n static create(opts, tooltip = false) {\n return tooltip\n ? FloatingContentContext.set(new FloatingContentState(opts, FloatingTooltipRootContext.get()))\n : FloatingContentContext.set(new FloatingContentState(opts, FloatingRootContext.get()));\n }\n opts;\n root;\n // nodes\n contentRef = simpleBox(null);\n wrapperRef = simpleBox(null);\n arrowRef = simpleBox(null);\n contentAttachment = attachRef(this.contentRef);\n wrapperAttachment = attachRef(this.wrapperRef);\n arrowAttachment = attachRef(this.arrowRef);\n // ids\n arrowId = simpleBox(useId());\n #transformedStyle = $derived.by(() => {\n if (typeof this.opts.style === \"string\")\n return cssToStyleObj(this.opts.style);\n if (!this.opts.style)\n return {};\n });\n #updatePositionStrategy = undefined;\n #arrowSize = new ElementSize(() => this.arrowRef.current ?? undefined);\n #arrowWidth = $derived(this.#arrowSize?.width ?? 0);\n #arrowHeight = $derived(this.#arrowSize?.height ?? 0);\n #desiredPlacement = $derived.by(() => (this.opts.side?.current +\n (this.opts.align.current !== \"center\"\n ? `-${this.opts.align.current}`\n : \"\")));\n #boundary = $derived.by(() => Array.isArray(this.opts.collisionBoundary.current)\n ? this.opts.collisionBoundary.current\n : [this.opts.collisionBoundary.current]);\n hasExplicitBoundaries = $derived(this.#boundary.length > 0);\n detectOverflowOptions = $derived.by(() => ({\n padding: this.opts.collisionPadding.current,\n boundary: this.#boundary.filter(isNotNull),\n altBoundary: this.hasExplicitBoundaries,\n }));\n #availableWidth = $state(undefined);\n #availableHeight = $state(undefined);\n #anchorWidth = $state(undefined);\n #anchorHeight = $state(undefined);\n middleware = $derived.by(() => [\n offset({\n mainAxis: this.opts.sideOffset.current + this.#arrowHeight,\n alignmentAxis: this.opts.alignOffset.current,\n }),\n this.opts.avoidCollisions.current &&\n shift({\n mainAxis: true,\n crossAxis: false,\n limiter: this.opts.sticky.current === \"partial\" ? limitShift() : undefined,\n ...this.detectOverflowOptions,\n }),\n this.opts.avoidCollisions.current && flip({ ...this.detectOverflowOptions }),\n size({\n ...this.detectOverflowOptions,\n apply: ({ rects, availableWidth, availableHeight }) => {\n const { width: anchorWidth, height: anchorHeight } = rects.reference;\n this.#availableWidth = availableWidth;\n this.#availableHeight = availableHeight;\n this.#anchorWidth = anchorWidth;\n this.#anchorHeight = anchorHeight;\n },\n }),\n this.arrowRef.current &&\n arrow({\n element: this.arrowRef.current,\n padding: this.opts.arrowPadding.current,\n }),\n transformOrigin({ arrowWidth: this.#arrowWidth, arrowHeight: this.#arrowHeight }),\n this.opts.hideWhenDetached.current &&\n hide({ strategy: \"referenceHidden\", ...this.detectOverflowOptions }),\n ].filter(Boolean));\n floating;\n placedSide = $derived.by(() => getSideFromPlacement(this.floating.placement));\n placedAlign = $derived.by(() => getAlignFromPlacement(this.floating.placement));\n arrowX = $derived.by(() => this.floating.middlewareData.arrow?.x ?? 0);\n arrowY = $derived.by(() => this.floating.middlewareData.arrow?.y ?? 0);\n cannotCenterArrow = $derived.by(() => this.floating.middlewareData.arrow?.centerOffset !== 0);\n contentZIndex = $state(\"auto\");\n arrowBaseSide = $derived(OPPOSITE_SIDE[this.placedSide]);\n wrapperProps = $derived.by(() => ({\n id: this.opts.wrapperId.current,\n \"data-bits-floating-content-wrapper\": \"\",\n style: {\n ...this.floating.floatingStyles,\n // keep off page when measuring\n transform: this.floating.isPositioned\n ? this.floating.floatingStyles.transform\n : \"translate(0, -200%)\",\n minWidth: \"max-content\",\n zIndex: this.contentZIndex,\n \"--bits-floating-transform-origin\": `${this.floating.middlewareData.transformOrigin?.x} ${this.floating.middlewareData.transformOrigin?.y}`,\n \"--bits-floating-available-width\": `${this.#availableWidth}px`,\n \"--bits-floating-available-height\": `${this.#availableHeight}px`,\n \"--bits-floating-anchor-width\": `${this.#anchorWidth}px`,\n \"--bits-floating-anchor-height\": `${this.#anchorHeight}px`,\n // hide the content if using the hide middleware and should be hidden\n ...(this.floating.middlewareData.hide?.referenceHidden && {\n visibility: \"hidden\",\n \"pointer-events\": \"none\",\n }),\n ...this.#transformedStyle,\n },\n // Floating UI calculates logical alignment based the `dir` attribute\n dir: this.opts.dir.current,\n ...this.wrapperAttachment,\n }));\n props = $derived.by(() => ({\n \"data-side\": this.placedSide,\n \"data-align\": this.placedAlign,\n style: styleToString({\n ...this.#transformedStyle,\n }),\n ...this.contentAttachment,\n }));\n arrowStyle = $derived({\n position: \"absolute\",\n left: this.arrowX ? `${this.arrowX}px` : undefined,\n top: this.arrowY ? `${this.arrowY}px` : undefined,\n [this.arrowBaseSide]: 0,\n \"transform-origin\": {\n top: \"\",\n right: \"0 0\",\n bottom: \"center 0\",\n left: \"100% 0\",\n }[this.placedSide],\n transform: {\n top: \"translateY(100%)\",\n right: \"translateY(50%) rotate(90deg) translateX(-50%)\",\n bottom: \"rotate(180deg)\",\n left: \"translateY(50%) rotate(-90deg) translateX(50%)\",\n }[this.placedSide],\n visibility: this.cannotCenterArrow ? \"hidden\" : undefined,\n });\n constructor(opts, root) {\n this.opts = opts;\n this.root = root;\n this.#updatePositionStrategy = opts.updatePositionStrategy;\n if (opts.customAnchor) {\n this.root.customAnchorNode.current = opts.customAnchor.current;\n }\n watch(() => opts.customAnchor.current, (customAnchor) => {\n this.root.customAnchorNode.current = customAnchor;\n });\n this.floating = useFloating({\n strategy: () => this.opts.strategy.current,\n placement: () => this.#desiredPlacement,\n middleware: () => this.middleware,\n reference: this.root.anchorNode,\n whileElementsMounted: (...args) => {\n const cleanup = autoUpdate(...args, {\n animationFrame: this.#updatePositionStrategy?.current === \"always\",\n });\n return cleanup;\n },\n open: () => this.opts.enabled.current,\n sideOffset: () => this.opts.sideOffset.current,\n alignOffset: () => this.opts.alignOffset.current,\n });\n $effect(() => {\n if (!this.floating.isPositioned)\n return;\n this.opts.onPlaced?.current();\n });\n watch([() => this.contentRef.current, () => this.opts.enabled.current], ([contentNode, enabled]) => {\n if (!contentNode || !enabled)\n return;\n const win = getWindow(contentNode);\n const rafId = win.requestAnimationFrame(() => {\n // avoid applying stale values when refs change quickly\n if (this.contentRef.current !== contentNode || !this.opts.enabled.current)\n return;\n const zIndex = win.getComputedStyle(contentNode).zIndex;\n if (zIndex !== this.contentZIndex) {\n this.contentZIndex = zIndex;\n }\n });\n return () => {\n win.cancelAnimationFrame(rafId);\n };\n });\n $effect(() => {\n this.floating.floating.current = this.wrapperRef.current;\n });\n }\n}\nexport class FloatingArrowState {\n static create(opts) {\n return new FloatingArrowState(opts, FloatingContentContext.get());\n }\n opts;\n content;\n constructor(opts, content) {\n this.opts = opts;\n this.content = content;\n }\n props = $derived.by(() => ({\n id: this.opts.id.current,\n style: this.content.arrowStyle,\n \"data-side\": this.content.placedSide,\n ...this.content.arrowAttachment,\n }));\n}\n//\n// HELPERS\n//\nfunction transformOrigin(options) {\n return {\n name: \"transformOrigin\",\n options,\n fn(data) {\n const { placement, rects, middlewareData } = data;\n const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;\n const isArrowHidden = cannotCenterArrow;\n const arrowWidth = isArrowHidden ? 0 : options.arrowWidth;\n const arrowHeight = isArrowHidden ? 0 : options.arrowHeight;\n const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);\n const noArrowAlign = { start: \"0%\", center: \"50%\", end: \"100%\" }[placedAlign];\n const arrowXCenter = (middlewareData.arrow?.x ?? 0) + arrowWidth / 2;\n const arrowYCenter = (middlewareData.arrow?.y ?? 0) + arrowHeight / 2;\n let x = \"\";\n let y = \"\";\n if (placedSide === \"bottom\") {\n x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;\n y = `${-arrowHeight}px`;\n }\n else if (placedSide === \"top\") {\n x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;\n y = `${rects.floating.height + arrowHeight}px`;\n }\n else if (placedSide === \"right\") {\n x = `${-arrowHeight}px`;\n y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;\n }\n else if (placedSide === \"left\") {\n x = `${rects.floating.width + arrowHeight}px`;\n y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;\n }\n return { data: { x, y } };\n },\n };\n}\nfunction getSideAndAlignFromPlacement(placement) {\n const [side, align = \"center\"] = placement.split(\"-\");\n return [side, align];\n}\nexport function getSideFromPlacement(placement) {\n return getSideAndAlignFromPlacement(placement)[0];\n}\nexport function getAlignFromPlacement(placement) {\n return getSideAndAlignFromPlacement(placement)[1];\n}\n","<script lang=\"ts\">\n\timport { boxWith, mergeProps } from \"svelte-toolbelt\";\n\timport { untrack } from \"svelte\";\n\timport { FloatingContentState } from \"../use-floating-layer.svelte.js\";\n\timport type { ContentImplProps } from \"./index.js\";\n\timport { useId } from \"../../../../internal/use-id.js\";\n\n\tlet {\n\t\tcontent,\n\t\tside = \"bottom\",\n\t\tsideOffset = 0,\n\t\talign = \"center\",\n\t\talignOffset = 0,\n\t\tid,\n\t\tarrowPadding = 0,\n\t\tavoidCollisions = true,\n\t\tcollisionBoundary = [],\n\t\tcollisionPadding = 0,\n\t\thideWhenDetached = false,\n\t\tonPlaced = () => {},\n\t\tsticky = \"partial\",\n\t\tupdatePositionStrategy = \"optimized\",\n\t\tstrategy = \"fixed\",\n\t\tdir = \"ltr\",\n\t\tstyle = {},\n\t\twrapperId = useId(),\n\t\tcustomAnchor = null,\n\t\tenabled,\n\t\ttooltip = false,\n\t}: ContentImplProps = $props();\n\n\tconst contentState = FloatingContentState.create(\n\t\t{\n\t\t\tside: boxWith(() => side),\n\t\t\tsideOffset: boxWith(() => sideOffset),\n\t\t\talign: boxWith(() => align),\n\t\t\talignOffset: boxWith(() => alignOffset),\n\t\t\tid: boxWith(() => id),\n\t\t\tarrowPadding: boxWith(() => arrowPadding),\n\t\t\tavoidCollisions: boxWith(() => avoidCollisions),\n\t\t\tcollisionBoundary: boxWith(() => collisionBoundary),\n\t\t\tcollisionPadding: boxWith(() => collisionPadding),\n\t\t\thideWhenDetached: boxWith(() => hideWhenDetached),\n\t\t\tonPlaced: boxWith(() => onPlaced),\n\t\t\tsticky: boxWith(() => sticky),\n\t\t\tupdatePositionStrategy: boxWith(() => updatePositionStrategy),\n\t\t\tstrategy: boxWith(() => strategy),\n\t\t\tdir: boxWith(() => dir),\n\t\t\tstyle: boxWith(() => style),\n\t\t\tenabled: boxWith(() => enabled),\n\t\t\twrapperId: boxWith(() => wrapperId),\n\t\t\tcustomAnchor: boxWith(() => customAnchor),\n\t\t},\n\t\tuntrack(() => tooltip)\n\t);\n\n\tconst mergedProps = $derived(\n\t\tmergeProps(contentState.wrapperProps, {\n\t\t\tstyle: {\n\t\t\t\tpointerEvents: \"auto\",\n\t\t\t},\n\t\t})\n\t);\n</script>\n\n{@render content?.({ props: contentState.props, wrapperProps: mergedProps })}\n","<script lang=\"ts\">\n\timport { type Snippet, onMount } from \"svelte\";\n\n\tlet {\n\t\tcontent,\n\t\tonPlaced,\n\t}: {\n\t\tcontent?: Snippet<\n\t\t\t[{ props: Record<string, unknown>; wrapperProps: Record<string, unknown> }]\n\t\t>;\n\t\tonPlaced?: () => void;\n\t} = $props();\n\n\tonMount(() => {\n\t\tonPlaced?.();\n\t});\n</script>\n\n{@render content?.({ props: {}, wrapperProps: {} })}\n","<script lang=\"ts\">\n\timport FloatingLayerContentStatic from \"../floating-layer/components/floating-layer-content-static.svelte\";\n\timport FloatingLayerContent from \"../floating-layer/components/floating-layer-content.svelte\";\n\timport type { FloatingLayerContentImplProps } from \"../floating-layer/types.js\";\n\n\tlet {\n\t\tcontent,\n\t\tisStatic = false,\n\t\tonPlaced,\n\t\t...restProps\n\t}: FloatingLayerContentImplProps & { isStatic: boolean } = $props();\n</script>\n\n{#if isStatic}\n\t<FloatingLayerContentStatic {content} {onPlaced} />\n{:else}\n\t<FloatingLayerContent {content} {onPlaced} {...restProps} />\n{/if}\n","<script lang=\"ts\">\n\timport { mergeProps } from \"svelte-toolbelt\";\n\timport ScrollLock from \"../scroll-lock/scroll-lock.svelte\";\n\timport type { PopperLayerImplProps } from \"./types.js\";\n\timport PopperContent from \"./popper-content.svelte\";\n\timport EscapeLayer from \"../escape-layer/escape-layer.svelte\";\n\timport DismissibleLayer from \"../dismissible-layer/dismissible-layer.svelte\";\n\timport TextSelectionLayer from \"../text-selection-layer/text-selection-layer.svelte\";\n\timport FocusScope from \"../focus-scope/focus-scope.svelte\";\n\n\tlet {\n\t\tpopper,\n\t\tonEscapeKeydown,\n\t\tescapeKeydownBehavior,\n\t\tpreventOverflowTextSelection,\n\t\tid,\n\t\tonPointerDown,\n\t\tonPointerUp,\n\t\tside,\n\t\tsideOffset,\n\t\talign,\n\t\talignOffset,\n\t\tarrowPadding,\n\t\tavoidCollisions,\n\t\tcollisionBoundary,\n\t\tcollisionPadding,\n\t\tsticky,\n\t\thideWhenDetached,\n\t\tupdatePositionStrategy,\n\t\tstrategy,\n\t\tdir,\n\t\tpreventScroll,\n\t\twrapperId,\n\t\tstyle,\n\t\tonPlaced,\n\t\tonInteractOutside,\n\t\tonCloseAutoFocus,\n\t\tonOpenAutoFocus,\n\t\tonFocusOutside,\n\t\tinteractOutsideBehavior = \"close\",\n\t\tloop,\n\t\ttrapFocus = true,\n\t\tisValidEvent = () => false,\n\t\tcustomAnchor = null,\n\t\tisStatic = false,\n\t\tenabled,\n\t\tforceMount,\n\t\tref,\n\t\ttooltip = false,\n\t\tcontentPointerEvents = \"auto\",\n\t\t...restProps\n\t}: Omit<PopperLayerImplProps, \"open\" | \"children\" | \"shouldRender\"> & {\n\t\tenabled: boolean;\n\t\tcontentPointerEvents?: \"auto\" | \"none\";\n\t} = $props();\n\n\tconst resolvedPreventScroll = $derived(preventScroll ?? true);\n\tconst effectiveStrategy = $derived(strategy ?? (resolvedPreventScroll ? \"fixed\" : \"absolute\"));\n</script>\n\n<PopperContent\n\t{isStatic}\n\t{id}\n\t{side}\n\t{sideOffset}\n\t{align}\n\t{alignOffset}\n\t{arrowPadding}\n\t{avoidCollisions}\n\t{collisionBoundary}\n\t{collisionPadding}\n\t{sticky}\n\t{hideWhenDetached}\n\t{updatePositionStrategy}\n\tstrategy={effectiveStrategy}\n\t{dir}\n\t{wrapperId}\n\t{style}\n\t{onPlaced}\n\t{customAnchor}\n\t{enabled}\n\t{tooltip}\n>\n\t{#snippet content({ props: floatingProps, wrapperProps })}\n\t\t{#if forceMount && enabled}\n\t\t\t<ScrollLock preventScroll={resolvedPreventScroll} />\n\t\t{:else if !forceMount}\n\t\t\t<ScrollLock preventScroll={resolvedPreventScroll} />\n\t\t{/if}\n\t\t<FocusScope\n\t\t\t{onOpenAutoFocus}\n\t\t\t{onCloseAutoFocus}\n\t\t\t{loop}\n\t\t\t{enabled}\n\t\t\t{trapFocus}\n\t\t\t{forceMount}\n\t\t\t{ref}\n\t\t>\n\t\t\t{#snippet focusScope({ props: focusScopeProps })}\n\t\t\t\t<EscapeLayer {onEscapeKeydown} {escapeKeydownBehavior} {enabled} {ref}>\n\t\t\t\t\t<DismissibleLayer\n\t\t\t\t\t\t{id}\n\t\t\t\t\t\t{onInteractOutside}\n\t\t\t\t\t\t{onFocusOutside}\n\t\t\t\t\t\t{interactOutsideBehavior}\n\t\t\t\t\t\t{isValidEvent}\n\t\t\t\t\t\t{enabled}\n\t\t\t\t\t\t{ref}\n\t\t\t\t\t>\n\t\t\t\t\t\t{#snippet children({ props: dismissibleProps })}\n\t\t\t\t\t\t\t<TextSelectionLayer\n\t\t\t\t\t\t\t\t{id}\n\t\t\t\t\t\t\t\t{preventOverflowTextSelection}\n\t\t\t\t\t\t\t\t{onPointerDown}\n\t\t\t\t\t\t\t\t{onPointerUp}\n\t\t\t\t\t\t\t\t{enabled}\n\t\t\t\t\t\t\t\t{ref}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{@render popper?.({\n\t\t\t\t\t\t\t\t\tprops: mergeProps(\n\t\t\t\t\t\t\t\t\t\trestProps,\n\t\t\t\t\t\t\t\t\t\tfloatingProps,\n\t\t\t\t\t\t\t\t\t\tdismissibleProps,\n\t\t\t\t\t\t\t\t\t\tfocusScopeProps,\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tid,\n\t\t\t\t\t\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t\t\t\t\t\tpointerEvents: contentPointerEvents,\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\twrapperProps,\n\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t</TextSelectionLayer>\n\t\t\t\t\t\t{/snippet}\n\t\t\t\t\t</DismissibleLayer>\n\t\t\t\t</EscapeLayer>\n\t\t\t{/snippet}\n\t\t</FocusScope>\n\t{/snippet}\n</PopperContent>\n","<script lang=\"ts\">\n\timport type { PopperLayerImplProps } from \"./types.js\";\n\timport PopperLayerInner from \"./popper-layer-inner.svelte\";\n\n\tlet {\n\t\tpopper,\n\t\topen,\n\t\tonEscapeKeydown,\n\t\tescapeKeydownBehavior,\n\t\tpreventOverflowTextSelection,\n\t\tid,\n\t\tonPointerDown,\n\t\tonPointerUp,\n\t\tside,\n\t\tsideOffset,\n\t\talign,\n\t\talignOffset,\n\t\tarrowPadding,\n\t\tavoidCollisions,\n\t\tcollisionBoundary,\n\t\tcollisionPadding,\n\t\tsticky,\n\t\thideWhenDetached,\n\t\tupdatePositionStrategy,\n\t\tstrategy,\n\t\tdir,\n\t\tpreventScroll,\n\t\twrapperId,\n\t\tstyle,\n\t\tonPlaced,\n\t\tonInteractOutside,\n\t\tonCloseAutoFocus,\n\t\tonOpenAutoFocus,\n\t\tonFocusOutside,\n\t\tinteractOutsideBehavior = \"close\",\n\t\tloop,\n\t\ttrapFocus = true,\n\t\tisValidEvent = () => false,\n\t\tcustomAnchor = null,\n\t\tisStatic = false,\n\t\tref,\n\t\tshouldRender,\n\t\t...restProps\n\t}: PopperLayerImplProps = $props();\n</script>\n\n{#if shouldRender}\n\t<PopperLayerInner\n\t\t{popper}\n\t\t{onEscapeKeydown}\n\t\t{escapeKeydownBehavior}\n\t\t{preventOverflowTextSelection}\n\t\t{id}\n\t\t{onPointerDown}\n\t\t{onPointerUp}\n\t\t{side}\n\t\t{sideOffset}\n\t\t{align}\n\t\t{alignOffset}\n\t\t{arrowPadding}\n\t\t{avoidCollisions}\n\t\t{collisionBoundary}\n\t\t{collisionPadding}\n\t\t{sticky}\n\t\t{hideWhenDetached}\n\t\t{updatePositionStrategy}\n\t\t{strategy}\n\t\t{dir}\n\t\t{preventScroll}\n\t\t{wrapperId}\n\t\t{style}\n\t\t{onPlaced}\n\t\t{customAnchor}\n\t\t{isStatic}\n\t\tenabled={open}\n\t\t{onInteractOutside}\n\t\t{onCloseAutoFocus}\n\t\t{onOpenAutoFocus}\n\t\t{interactOutsideBehavior}\n\t\t{loop}\n\t\t{trapFocus}\n\t\t{isValidEvent}\n\t\t{onFocusOutside}\n\t\tforceMount={false}\n\t\t{ref}\n\t\t{...restProps}\n\t/>\n{/if}\n","<script lang=\"ts\">\n\timport type { PopperLayerImplProps } from \"./types.js\";\n\timport PopperLayerInner from \"./popper-layer-inner.svelte\";\n\n\tlet {\n\t\tpopper,\n\t\tonEscapeKeydown,\n\t\tescapeKeydownBehavior,\n\t\tpreventOverflowTextSelection,\n\t\tid,\n\t\tonPointerDown,\n\t\tonPointerUp,\n\t\tside,\n\t\tsideOffset,\n\t\talign,\n\t\talignOffset,\n\t\tarrowPadding,\n\t\tavoidCollisions,\n\t\tcollisionBoundary,\n\t\tcollisionPadding,\n\t\tsticky,\n\t\thideWhenDetached,\n\t\tupdatePositionStrategy,\n\t\tstrategy,\n\t\tdir,\n\t\tpreventScroll,\n\t\twrapperId,\n\t\tstyle,\n\t\tonPlaced,\n\t\tonInteractOutside,\n\t\tonCloseAutoFocus,\n\t\tonOpenAutoFocus,\n\t\tonFocusOutside,\n\t\tinteractOutsideBehavior = \"close\",\n\t\tloop,\n\t\ttrapFocus = true,\n\t\tisValidEvent = () => false,\n\t\tcustomAnchor = null,\n\t\tisStatic = false,\n\t\tenabled,\n\t\t...restProps\n\t}: Omit<PopperLayerImplProps, \"open\"> & {\n\t\tenabled: boolean;\n\t} = $props();\n</script>\n\n<PopperLayerInner\n\t{popper}\n\t{onEscapeKeydown}\n\t{escapeKeydownBehavior}\n\t{preventOverflowTextSelection}\n\t{id}\n\t{onPointerDown}\n\t{onPointerUp}\n\t{side}\n\t{sideOffset}\n\t{align}\n\t{alignOffset}\n\t{arrowPadding}\n\t{avoidCollisions}\n\t{collisionBoundary}\n\t{collisionPadding}\n\t{sticky}\n\t{hideWhenDetached}\n\t{updatePositionStrategy}\n\t{strategy}\n\t{dir}\n\t{preventScroll}\n\t{wrapperId}\n\t{style}\n\t{onPlaced}\n\t{customAnchor}\n\t{isStatic}\n\t{enabled}\n\t{onInteractOutside}\n\t{onCloseAutoFocus}\n\t{onOpenAutoFocus}\n\t{interactOutsideBehavior}\n\t{loop}\n\t{trapFocus}\n\t{isValidEvent}\n\t{onFocusOutside}\n\t{...restProps}\n\tforceMount={true}\n/>\n","import { getDocument } from \"svelte-toolbelt\";\nimport { on } from \"svelte/events\";\nimport { watch } from \"runed\";\nimport { isElement } from \"./is.js\";\nfunction isPointInPolygon(point, polygon) {\n const [x, y] = point;\n let isInside = false;\n const length = polygon.length;\n for (let i = 0, j = length - 1; i < length; j = i++) {\n const [xi, yi] = polygon[i] ?? [0, 0];\n const [xj, yj] = polygon[j] ?? [0, 0];\n const intersect = yi >= y !== yj >= y && x <= ((xj - xi) * (y - yi)) / (yj - yi) + xi;\n if (intersect) {\n isInside = !isInside;\n }\n }\n return isInside;\n}\nfunction isInsideRect(point, rect) {\n return (point[0] >= rect.left &&\n point[0] <= rect.right &&\n point[1] >= rect.top &&\n point[1] <= rect.bottom);\n}\nfunction getSide(triggerRect, contentRect) {\n // determine which side the content is on relative to trigger\n const triggerCenterX = triggerRect.left + triggerRect.width / 2;\n const triggerCenterY = triggerRect.top + triggerRect.height / 2;\n const contentCenterX = contentRect.left + contentRect.width / 2;\n const contentCenterY = contentRect.top + contentRect.height / 2;\n const deltaX = contentCenterX - triggerCenterX;\n const deltaY = contentCenterY - triggerCenterY;\n if (Math.abs(deltaX) > Math.abs(deltaY)) {\n return deltaX > 0 ? \"right\" : \"left\";\n }\n return deltaY > 0 ? \"bottom\" : \"top\";\n}\n/**\n * Creates a safe polygon area that allows users to move their cursor between\n * the trigger and floating content without closing it.\n */\nexport class SafePolygon {\n #opts;\n #buffer;\n #transitIntentTimeout;\n // tracks the cursor position when leaving trigger or content\n #exitPoint = null;\n // tracks what we're moving toward: \"content\" when leaving trigger, \"trigger\" when leaving content\n #exitTarget = null;\n #transitTargets = [];\n #trackedTriggerNode = null;\n #leaveFallbackRafId = null;\n #transitIntentTimeoutId = null;\n #cancelLeaveFallback() {\n if (this.#leaveFallbackRafId !== null) {\n cancelAnimationFrame(this.#leaveFallbackRafId);\n this.#leaveFallbackRafId = null;\n }\n }\n #scheduleLeaveFallback() {\n this.#cancelLeaveFallback();\n this.#leaveFallbackRafId = requestAnimationFrame(() => {\n this.#leaveFallbackRafId = null;\n if (!this.#exitPoint || !this.#exitTarget)\n return;\n this.#clearTracking();\n this.#opts.onPointerExit();\n });\n }\n #cancelTransitIntentTimeout() {\n if (this.#transitIntentTimeoutId !== null) {\n clearTimeout(this.#transitIntentTimeoutId);\n this.#transitIntentTimeoutId = null;\n }\n }\n #scheduleTransitIntentTimeout() {\n if (this.#transitIntentTimeout === null)\n return;\n this.#cancelTransitIntentTimeout();\n this.#transitIntentTimeoutId = window.setTimeout(() => {\n this.#transitIntentTimeoutId = null;\n if (!this.#exitPoint || !this.#exitTarget)\n return;\n this.#clearTracking();\n this.#opts.onPointerExit();\n }, this.#transitIntentTimeout);\n }\n constructor(opts) {\n this.#opts = opts;\n this.#buffer = opts.buffer ?? 1;\n const transitIntentTimeout = opts.transitIntentTimeout;\n this.#transitIntentTimeout =\n typeof transitIntentTimeout === \"number\" && transitIntentTimeout > 0\n ? transitIntentTimeout\n : null;\n watch([opts.triggerNode, opts.contentNode, opts.enabled], ([triggerNode, contentNode, enabled]) => {\n if (!triggerNode || !contentNode || !enabled) {\n this.#trackedTriggerNode = null;\n this.#clearTracking();\n return;\n }\n if (this.#trackedTriggerNode && this.#trackedTriggerNode !== triggerNode) {\n this.#clearTracking();\n }\n this.#trackedTriggerNode = triggerNode;\n const doc = getDocument(triggerNode);\n const handlePointerMove = (e) => {\n this.#onPointerMove([e.clientX, e.clientY], triggerNode, contentNode);\n };\n const handleTriggerLeave = (e) => {\n // when leaving trigger toward content, record exit point\n const target = e.relatedTarget;\n // if going directly to content, no need for polygon tracking\n if (isElement(target) && contentNode.contains(target)) {\n return;\n }\n // if moving to an ignored target (e.g. a sibling trigger), don't close —\n // the sibling's enter handler will take over\n const ignoredTargets = this.#opts.ignoredTargets?.() ?? [];\n if (isElement(target) &&\n ignoredTargets.some((n) => n === target || n.contains(target))) {\n return;\n }\n this.#transitTargets =\n isElement(target) && ignoredTargets.length > 0\n ? ignoredTargets.filter((n) => target.contains(n))\n : [];\n // for unrelated elements, defer close decisions to pointer geometry checks.\n // this allows the cursor to pass through intermediate elements on the way\n // to content without immediately closing.\n this.#exitPoint = [e.clientX, e.clientY];\n this.#exitTarget = \"content\";\n this.#scheduleLeaveFallback();\n };\n const handleTriggerEnter = () => {\n // reached trigger, clear tracking\n this.#clearTracking();\n };\n const handleContentEnter = () => {\n // reached content, clear tracking\n this.#clearTracking();\n };\n const handleContentLeave = (e) => {\n // when leaving content, check if going directly back to trigger\n const target = e.relatedTarget;\n if (isElement(target) && triggerNode.contains(target)) {\n // going directly to trigger, no polygon tracking needed\n return;\n }\n // set up polygon tracking toward trigger — pointermove decides whether to close\n this.#exitPoint = [e.clientX, e.clientY];\n this.#exitTarget = \"trigger\";\n this.#scheduleLeaveFallback();\n };\n return [\n on(doc, \"pointermove\", handlePointerMove),\n on(triggerNode, \"pointerleave\", handleTriggerLeave),\n on(triggerNode, \"pointerenter\", handleTriggerEnter),\n on(contentNode, \"pointerenter\", handleContentEnter),\n on(contentNode, \"pointerleave\", handleContentLeave),\n ].reduce((acc, cleanup) => () => {\n acc();\n cleanup();\n }, () => { });\n });\n }\n #onPointerMove(clientPoint, triggerNode, contentNode) {\n // if no exit point recorded, nothing to check\n if (!this.#exitPoint || !this.#exitTarget)\n return;\n this.#cancelLeaveFallback();\n this.#scheduleTransitIntentTimeout();\n const triggerRect = triggerNode.getBoundingClientRect();\n const contentRect = contentNode.getBoundingClientRect();\n // check if pointer reached the target\n if (this.#exitTarget === \"content\" && isInsideRect(clientPoint, contentRect)) {\n this.#clearTracking();\n return;\n }\n if (this.#exitTarget === \"trigger\" && isInsideRect(clientPoint, triggerRect)) {\n this.#clearTracking();\n return;\n }\n if (this.#exitTarget === \"content\" && this.#transitTargets.length > 0) {\n for (const transitTarget of this.#transitTargets) {\n const transitRect = transitTarget.getBoundingClientRect();\n if (isInsideRect(clientPoint, transitRect))\n return;\n const transitSide = getSide(triggerRect, transitRect);\n const transitCorridor = this.#getCorridorPolygon(triggerRect, transitRect, transitSide);\n if (transitCorridor && isPointInPolygon(clientPoint, transitCorridor))\n return;\n }\n }\n // check if pointer is in the rectangular corridor between trigger and content\n const side = getSide(triggerRect, contentRect);\n const corridorPoly = this.#getCorridorPolygon(triggerRect, contentRect, side);\n if (corridorPoly && isPointInPolygon(clientPoint, corridorPoly)) {\n return;\n }\n // check if pointer is within the safe polygon from exit point to target\n const targetRect = this.#exitTarget === \"content\" ? contentRect : triggerRect;\n const safePoly = this.#getSafePolygon(this.#exitPoint, targetRect, side, this.#exitTarget);\n if (isPointInPolygon(clientPoint, safePoly)) {\n return;\n }\n // pointer is outside all safe zones - close\n this.#clearTracking();\n this.#opts.onPointerExit();\n }\n #clearTracking() {\n this.#exitPoint = null;\n this.#exitTarget = null;\n this.#transitTargets = [];\n this.#cancelLeaveFallback();\n this.#cancelTransitIntentTimeout();\n }\n /**\n * Creates a rectangular corridor between trigger and content\n * This prevents closing when cursor is in the gap between them\n */\n #getCorridorPolygon(triggerRect, contentRect, side) {\n const buffer = this.#buffer;\n switch (side) {\n case \"top\":\n return [\n [Math.min(triggerRect.left, contentRect.left) - buffer, triggerRect.top],\n [Math.min(triggerRect.left, contentRect.left) - buffer, contentRect.bottom],\n [Math.max(triggerRect.right, contentRect.right) + buffer, contentRect.bottom],\n [Math.max(triggerRect.right, contentRect.right) + buffer, triggerRect.top],\n ];\n case \"bottom\":\n return [\n [Math.min(triggerRect.left, contentRect.left) - buffer, triggerRect.bottom],\n [Math.min(triggerRect.left, contentRect.left) - buffer, contentRect.top],\n [Math.max(triggerRect.right, contentRect.right) + buffer, contentRect.top],\n [Math.max(triggerRect.right, contentRect.right) + buffer, triggerRect.bottom],\n ];\n case \"left\":\n return [\n [triggerRect.left, Math.min(triggerRect.top, contentRect.top) - buffer],\n [contentRect.right, Math.min(triggerRect.top, contentRect.top) - buffer],\n [contentRect.right, Math.max(triggerRect.bottom, contentRect.bottom) + buffer],\n [triggerRect.left, Math.max(triggerRect.bottom, contentRect.bottom) + buffer],\n ];\n case \"right\":\n return [\n [triggerRect.right, Math.min(triggerRect.top, contentRect.top) - buffer],\n [contentRect.left, Math.min(triggerRect.top, contentRect.top) - buffer],\n [contentRect.left, Math.max(triggerRect.bottom, contentRect.bottom) + buffer],\n [triggerRect.right, Math.max(triggerRect.bottom, contentRect.bottom) + buffer],\n ];\n }\n }\n /**\n * Creates a triangular/trapezoidal safe zone from the exit point to the target\n */\n #getSafePolygon(exitPoint, targetRect, side, exitTarget) {\n const buffer = this.#buffer * 4;\n const [x, y] = exitPoint;\n // when going back to trigger, we need to flip the side\n const effectiveSide = exitTarget === \"trigger\" ? this.#flipSide(side) : side;\n // create polygon points from cursor to target edges\n switch (effectiveSide) {\n case \"top\":\n return [\n [x - buffer, y + buffer],\n [x + buffer, y + buffer],\n [targetRect.right + buffer, targetRect.bottom],\n [targetRect.right + buffer, targetRect.top],\n [targetRect.left - buffer, targetRect.top],\n [targetRect.left - buffer, targetRect.bottom],\n ];\n case \"bottom\":\n return [\n [x - buffer, y - buffer],\n [x + buffer, y - buffer],\n [targetRect.right + buffer, targetRect.top],\n [targetRect.right + buffer, targetRect.bottom],\n [targetRect.left - buffer, targetRect.bottom],\n [targetRect.left - buffer, targetRect.top],\n ];\n case \"left\":\n return [\n [x + buffer, y - buffer],\n [x + buffer, y + buffer],\n [targetRect.right, targetRect.bottom + buffer],\n [targetRect.left, targetRect.bottom + buffer],\n [targetRect.left, targetRect.top - buffer],\n [targetRect.right, targetRect.top - buffer],\n ];\n case \"right\":\n return [\n [x - buffer, y - buffer],\n [x - buffer, y + buffer],\n [targetRect.left, targetRect.bottom + buffer],\n [targetRect.right, targetRect.bottom + buffer],\n [targetRect.right, targetRect.top - buffer],\n [targetRect.left, targetRect.top - buffer],\n ];\n }\n }\n #flipSide(side) {\n switch (side) {\n case \"top\":\n return \"bottom\";\n case \"bottom\":\n return \"top\";\n case \"left\":\n return \"right\";\n case \"right\":\n return \"left\";\n }\n }\n}\n","import { attachRef, boxWith, DOMContext, } from \"svelte-toolbelt\";\nimport { Context, watch } from \"runed\";\nimport { kbd } from \"../../internal/kbd.js\";\nimport { createBitsAttrs, boolToStr, getDataOpenClosed, getDataTransitionAttrs, } from \"../../internal/attrs.js\";\nimport { isElement, isTouch } from \"../../internal/is.js\";\nimport { PresenceManager } from \"../../internal/presence-manager.svelte.js\";\nimport { SafePolygon } from \"../../internal/safe-polygon.svelte.js\";\nimport { isTabbable } from \"tabbable\";\nconst popoverAttrs = createBitsAttrs({\n component: \"popover\",\n parts: [\"root\", \"trigger\", \"content\", \"close\", \"overlay\"],\n});\nconst PopoverRootContext = new Context(\"Popover.Root\");\nexport class PopoverRootState {\n static create(opts) {\n return PopoverRootContext.set(new PopoverRootState(opts));\n }\n opts;\n contentNode = $state(null);\n contentPresence;\n triggerNode = $state(null);\n overlayNode = $state(null);\n overlayPresence;\n // hover tracking state\n openedViaHover = $state(false);\n hasInteractedWithContent = $state(false);\n hoverCooldown = $state(false);\n closeDelay = $state(0);\n #closeTimeout = null;\n #domContext = null;\n constructor(opts) {\n this.opts = opts;\n this.contentPresence = new PresenceManager({\n ref: boxWith(() => this.contentNode),\n open: this.opts.open,\n onComplete: () => {\n this.opts.onOpenChangeComplete.current(this.opts.open.current);\n },\n });\n this.overlayPresence = new PresenceManager({\n ref: boxWith(() => this.overlayNode),\n open: this.opts.open,\n });\n watch(() => this.opts.open.current, (isOpen) => {\n if (!isOpen) {\n this.openedViaHover = false;\n this.hasInteractedWithContent = false;\n this.#clearCloseTimeout();\n }\n });\n }\n setDomContext(ctx) {\n this.#domContext = ctx;\n }\n #clearCloseTimeout() {\n if (this.#closeTimeout !== null && this.#domContext) {\n this.#domContext.clearTimeout(this.#closeTimeout);\n this.#closeTimeout = null;\n }\n }\n toggleOpen() {\n this.#clearCloseTimeout();\n this.opts.open.current = !this.opts.open.current;\n }\n handleClose() {\n this.#clearCloseTimeout();\n if (!this.opts.open.current)\n return;\n this.opts.open.current = false;\n }\n handleHoverOpen() {\n this.#clearCloseTimeout();\n if (this.opts.open.current)\n return;\n this.openedViaHover = true;\n this.opts.open.current = true;\n }\n handleHoverClose() {\n if (!this.opts.open.current)\n return;\n // only close if opened via hover and user hasn't interacted with content\n if (this.openedViaHover && !this.hasInteractedWithContent) {\n this.opts.open.current = false;\n }\n }\n handleDelayedHoverClose() {\n if (!this.opts.open.current)\n return;\n if (!this.openedViaHover || this.hasInteractedWithContent)\n return;\n this.#clearCloseTimeout();\n if (this.closeDelay <= 0) {\n this.opts.open.current = false;\n }\n else if (this.#domContext) {\n this.#closeTimeout = this.#domContext.setTimeout(() => {\n if (this.openedViaHover && !this.hasInteractedWithContent) {\n this.opts.open.current = false;\n }\n this.#closeTimeout = null;\n }, this.closeDelay);\n }\n }\n cancelDelayedClose() {\n this.#clearCloseTimeout();\n }\n markInteraction() {\n this.hasInteractedWithContent = true;\n this.#clearCloseTimeout();\n }\n}\nexport class PopoverTriggerState {\n static create(opts) {\n return new PopoverTriggerState(opts, PopoverRootContext.get());\n }\n opts;\n root;\n attachment;\n domContext;\n #openTimeout = null;\n #closeTimeout = null;\n #isHovering = $state(false);\n constructor(opts, root) {\n this.opts = opts;\n this.root = root;\n this.attachment = attachRef(this.opts.ref, (v) => (this.root.triggerNode = v));\n this.domContext = new DOMContext(opts.ref);\n this.root.setDomContext(this.domContext);\n this.onclick = this.onclick.bind(this);\n this.onkeydown = this.onkeydown.bind(this);\n this.onpointerenter = this.onpointerenter.bind(this);\n this.onpointerleave = this.onpointerleave.bind(this);\n watch(() => this.opts.closeDelay.current, (delay) => {\n this.root.closeDelay = delay;\n });\n }\n #clearOpenTimeout() {\n if (this.#openTimeout !== null) {\n this.domContext.clearTimeout(this.#openTimeout);\n this.#openTimeout = null;\n }\n }\n #clearCloseTimeout() {\n if (this.#closeTimeout !== null) {\n this.domContext.clearTimeout(this.#closeTimeout);\n this.#closeTimeout = null;\n }\n }\n #clearAllTimeouts() {\n this.#clearOpenTimeout();\n this.#clearCloseTimeout();\n }\n onpointerenter(e) {\n if (this.opts.disabled.current)\n return;\n if (!this.opts.openOnHover.current)\n return;\n if (isTouch(e))\n return;\n this.#isHovering = true;\n this.#clearCloseTimeout();\n this.root.cancelDelayedClose();\n if (this.root.opts.open.current || this.root.hoverCooldown)\n return;\n const delay = this.opts.openDelay.current;\n if (delay <= 0) {\n this.root.handleHoverOpen();\n }\n else {\n this.#openTimeout = this.domContext.setTimeout(() => {\n this.root.handleHoverOpen();\n this.#openTimeout = null;\n }, delay);\n }\n }\n onpointerleave(e) {\n if (this.opts.disabled.current)\n return;\n if (!this.opts.openOnHover.current)\n return;\n if (isTouch(e))\n return;\n this.#isHovering = false;\n this.#clearOpenTimeout();\n this.root.hoverCooldown = false;\n // let GraceArea handle the close - it will call handleHoverClose via onPointerExit\n // we just need to stop any pending open timer\n }\n onclick(e) {\n if (this.opts.disabled.current)\n return;\n if (e.button !== 0)\n return;\n this.#clearAllTimeouts();\n // if clicked while hovering and popover is open, convert to click-based open\n if (this.#isHovering && this.root.opts.open.current && this.root.openedViaHover) {\n this.root.openedViaHover = false;\n this.root.hasInteractedWithContent = true;\n return;\n }\n // if closing while hovering with openOnHover enabled, set cooldown to prevent\n // immediate re-open via hover\n if (this.#isHovering && this.opts.openOnHover.current && this.root.opts.open.current) {\n this.root.hoverCooldown = true;\n }\n // if clicking to open while in cooldown, reset cooldown (explicit open)\n if (this.root.hoverCooldown && !this.root.opts.open.current) {\n this.root.hoverCooldown = false;\n }\n this.root.toggleOpen();\n }\n onkeydown(e) {\n if (this.opts.disabled.current)\n return;\n if (!(e.key === kbd.ENTER || e.key === kbd.SPACE))\n return;\n e.preventDefault();\n this.#clearAllTimeouts();\n this.root.toggleOpen();\n }\n #getAriaControls() {\n if (this.root.opts.open.current && this.root.contentNode?.id) {\n return this.root.contentNode?.id;\n }\n }\n props = $derived.by(() => ({\n id: this.opts.id.current,\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": boolToStr(this.root.opts.open.current),\n \"data-state\": getDataOpenClosed(this.root.opts.open.current),\n \"aria-controls\": this.#getAriaControls(),\n [popoverAttrs.trigger]: \"\",\n disabled: this.opts.disabled.current,\n //\n onkeydown: this.onkeydown,\n onclick: this.onclick,\n onpointerenter: this.onpointerenter,\n onpointerleave: this.onpointerleave,\n ...this.attachment,\n }));\n}\nexport class PopoverContentState {\n static create(opts) {\n return new PopoverContentState(opts, PopoverRootContext.get());\n }\n opts;\n root;\n attachment;\n constructor(opts, root) {\n this.opts = opts;\n this.root = root;\n this.attachment = attachRef(this.opts.ref, (v) => (this.root.contentNode = v));\n this.onpointerdown = this.onpointerdown.bind(this);\n this.onfocusin = this.onfocusin.bind(this);\n this.onpointerenter = this.onpointerenter.bind(this);\n this.onpointerleave = this.onpointerleave.bind(this);\n new SafePolygon({\n triggerNode: () => this.root.triggerNode,\n contentNode: () => this.root.contentNode,\n enabled: () => this.root.opts.open.current &&\n this.root.openedViaHover &&\n !this.root.hasInteractedWithContent,\n onPointerExit: () => {\n this.root.handleDelayedHoverClose();\n },\n });\n }\n onpointerdown(_) {\n this.root.markInteraction();\n }\n onfocusin(e) {\n const target = e.target;\n if (isElement(target) && isTabbable(target)) {\n this.root.markInteraction();\n }\n }\n onpointerenter(e) {\n if (isTouch(e))\n return;\n this.root.cancelDelayedClose();\n }\n onpointerleave(e) {\n if (isTouch(e))\n return;\n // handled by grace area\n }\n onInteractOutside = (e) => {\n this.opts.onInteractOutside.current(e);\n if (e.defaultPrevented)\n return;\n if (!isElement(e.target))\n return;\n const closestTrigger = e.target.closest(popoverAttrs.selector(\"trigger\"));\n if (closestTrigger && closestTrigger === this.root.triggerNode)\n return;\n if (this.opts.customAnchor.current) {\n if (isElement(this.opts.customAnchor.current)) {\n if (this.opts.customAnchor.current.contains(e.target))\n return;\n }\n else if (typeof this.opts.customAnchor.current === \"string\") {\n const el = document.querySelector(this.opts.customAnchor.current);\n if (el && el.contains(e.target))\n return;\n }\n }\n this.root.handleClose();\n };\n onEscapeKeydown = (e) => {\n this.opts.onEscapeKeydown.current(e);\n if (e.defaultPrevented)\n return;\n this.root.handleClose();\n };\n get shouldRender() {\n return this.root.contentPresence.shouldRender;\n }\n get shouldTrapFocus() {\n if (this.root.openedViaHover && !this.root.hasInteractedWithContent)\n return false;\n return true;\n }\n snippetProps = $derived.by(() => ({ open: this.root.opts.open.current }));\n props = $derived.by(() => ({\n id: this.opts.id.current,\n tabindex: -1,\n \"data-state\": getDataOpenClosed(this.root.opts.open.current),\n ...getDataTransitionAttrs(this.root.contentPresence.transitionStatus),\n [popoverAttrs.content]: \"\",\n style: {\n pointerEvents: \"auto\",\n // CSS containment isolates style/layout/paint calculations from the rest of the page\n contain: \"layout style\",\n },\n onpointerdown: this.onpointerdown,\n onfocusin: this.onfocusin,\n onpointerenter: this.onpointerenter,\n onpointerleave: this.onpointerleave,\n ...this.attachment,\n }));\n popperProps = {\n onInteractOutside: this.onInteractOutside,\n onEscapeKeydown: this.onEscapeKeydown,\n };\n}\nexport class PopoverCloseState {\n static create(opts) {\n return new PopoverCloseState(opts, PopoverRootContext.get());\n }\n opts;\n root;\n attachment;\n constructor(opts, root) {\n this.opts = opts;\n this.root = root;\n this.attachment = attachRef(this.opts.ref);\n this.onclick = this.onclick.bind(this);\n this.onkeydown = this.onkeydown.bind(this);\n }\n onclick(_) {\n this.root.handleClose();\n }\n onkeydown(e) {\n if (!(e.key === kbd.ENTER || e.key === kbd.SPACE))\n return;\n e.preventDefault();\n this.root.handleClose();\n }\n props = $derived.by(() => ({\n id: this.opts.id.current,\n onclick: this.onclick,\n onkeydown: this.onkeydown,\n type: \"button\",\n [popoverAttrs.close]: \"\",\n ...this.attachment,\n }));\n}\nexport class PopoverOverlayState {\n static create(opts) {\n return new PopoverOverlayState(opts, PopoverRootContext.get());\n }\n opts;\n root;\n attachment;\n constructor(opts, root) {\n this.opts = opts;\n this.root = root;\n this.attachment = attachRef(this.opts.ref, (v) => (this.root.overlayNode = v));\n }\n get shouldRender() {\n return this.root.overlayPresence.shouldRender;\n }\n snippetProps = $derived.by(() => ({ open: this.root.opts.open.current }));\n props = $derived.by(() => ({\n id: this.opts.id.current,\n [popoverAttrs.overlay]: \"\",\n style: {\n pointerEvents: \"auto\",\n },\n \"data-state\": getDataOpenClosed(this.root.opts.open.current),\n ...getDataTransitionAttrs(this.root.overlayPresence.transitionStatus),\n ...this.attachment,\n }));\n}\n","<script lang=\"ts\">\n\timport { boxWith, mergeProps } from \"svelte-toolbelt\";\n\timport type { PopoverContentProps } from \"../types.js\";\n\timport { PopoverContentState } from \"../popover.svelte.js\";\n\timport PopperLayer from \"../../utilities/popper-layer/popper-layer.svelte\";\n\timport { noop } from \"../../../internal/noop.js\";\n\timport { createId } from \"../../../internal/create-id.js\";\n\timport { getFloatingContentCSSVars } from \"../../../internal/floating-svelte/floating-utils.svelte.js\";\n\timport PopperLayerForceMount from \"../../utilities/popper-layer/popper-layer-force-mount.svelte\";\n\n\tconst uid = $props.id();\n\n\tlet {\n\t\tchild,\n\t\tchildren,\n\t\tref = $bindable(null),\n\t\tid = createId(uid),\n\t\tforceMount = false,\n\t\tonOpenAutoFocus = noop,\n\t\tonCloseAutoFocus = noop,\n\t\tonEscapeKeydown = noop,\n\t\tonInteractOutside = noop,\n\t\ttrapFocus = true,\n\t\tpreventScroll = false,\n\t\tcustomAnchor = null,\n\t\tstyle,\n\t\t...restProps\n\t}: PopoverContentProps = $props();\n\n\tconst contentState = PopoverContentState.create({\n\t\tid: boxWith(() => id),\n\t\tref: boxWith(\n\t\t\t() => ref,\n\t\t\t(v) => (ref = v)\n\t\t),\n\t\tonInteractOutside: boxWith(() => onInteractOutside),\n\t\tonEscapeKeydown: boxWith(() => onEscapeKeydown),\n\t\tcustomAnchor: boxWith(() => customAnchor),\n\t});\n\n\tconst mergedProps = $derived(mergeProps(restProps, contentState.props));\n\n\t// respect user's trapFocus setting, but disable when hover-opened without interaction\n\tconst effectiveTrapFocus = $derived(trapFocus && contentState.shouldTrapFocus);\n\n\t// prevent auto-focus when opened via hover until user interacts\n\tfunction handleOpenAutoFocus(e: Event) {\n\t\tif (!contentState.shouldTrapFocus) {\n\t\t\te.preventDefault();\n\t\t}\n\t\tonOpenAutoFocus(e);\n\t}\n</script>\n\n{#if forceMount}\n\t<PopperLayerForceMount\n\t\t{...mergedProps}\n\t\t{...contentState.popperProps}\n\t\tref={contentState.opts.ref}\n\t\tenabled={contentState.root.opts.open.current}\n\t\t{id}\n\t\ttrapFocus={effectiveTrapFocus}\n\t\t{preventScroll}\n\t\tloop\n\t\tforceMount={true}\n\t\t{customAnchor}\n\t\tonOpenAutoFocus={handleOpenAutoFocus}\n\t\t{onCloseAutoFocus}\n\t\tshouldRender={contentState.shouldRender}\n\t>\n\t\t{#snippet popper({ props, wrapperProps })}\n\t\t\t{@const finalProps = mergeProps(\n\t\t\t\tprops,\n\t\t\t\t{ style: getFloatingContentCSSVars(\"popover\") },\n\t\t\t\t{ style }\n\t\t\t)}\n\t\t\t{#if child}\n\t\t\t\t{@render child({ props: finalProps, wrapperProps, ...contentState.snippetProps })}\n\t\t\t{:else}\n\t\t\t\t<div {...wrapperProps}>\n\t\t\t\t\t<div {...finalProps}>\n\t\t\t\t\t\t{@render children?.()}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t{/if}\n\t\t{/snippet}\n\t</PopperLayerForceMount>\n{:else if !forceMount}\n\t<PopperLayer\n\t\t{...mergedProps}\n\t\t{...contentState.popperProps}\n\t\tref={contentState.opts.ref}\n\t\topen={contentState.root.opts.open.current}\n\t\t{id}\n\t\ttrapFocus={effectiveTrapFocus}\n\t\t{preventScroll}\n\t\tloop\n\t\tforceMount={false}\n\t\t{customAnchor}\n\t\tonOpenAutoFocus={handleOpenAutoFocus}\n\t\t{onCloseAutoFocus}\n\t\tshouldRender={contentState.shouldRender}\n\t>\n\t\t{#snippet popper({ props, wrapperProps })}\n\t\t\t{@const finalProps = mergeProps(\n\t\t\t\tprops,\n\t\t\t\t{ style: getFloatingContentCSSVars(\"popover\") },\n\t\t\t\t{ style }\n\t\t\t)}\n\t\t\t{#if child}\n\t\t\t\t{@render child({ props: finalProps, wrapperProps, ...contentState.snippetProps })}\n\t\t\t{:else}\n\t\t\t\t<div {...wrapperProps}>\n\t\t\t\t\t<div {...finalProps}>\n\t\t\t\t\t\t{@render children?.()}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t{/if}\n\t\t{/snippet}\n\t</PopperLayer>\n{/if}\n","<script lang=\"ts\">\n\timport { boxWith } from \"svelte-toolbelt\";\n\timport type { PopoverRootProps } from \"../types.js\";\n\timport { PopoverRootState } from \"../popover.svelte.js\";\n\timport FloatingLayer from \"../../utilities/floating-layer/components/floating-layer.svelte\";\n\timport { noop } from \"../../../internal/noop.js\";\n\n\tlet {\n\t\topen = $bindable(false),\n\t\tonOpenChange = noop,\n\t\tonOpenChangeComplete = noop,\n\t\tchildren,\n\t}: PopoverRootProps = $props();\n\n\tPopoverRootState.create({\n\t\topen: boxWith(\n\t\t\t() => open,\n\t\t\t(v) => {\n\t\t\t\topen = v;\n\t\t\t\tonOpenChange(v);\n\t\t\t}\n\t\t),\n\t\tonOpenChangeComplete: boxWith(() => onOpenChangeComplete),\n\t});\n</script>\n\n<FloatingLayer>\n\t{@render children?.()}\n</FloatingLayer>\n","/**\n * What the Changes pane draws, worked out from what the changes API returns:\n * which files fold away as generated, the letter each file's status gets, and\n * a file's hunks as the rows of a unified diff, line numbers and all.\n */\n\nimport type { PatchHunk } from '$shared/transcript/parser.js';\nimport type { TurnChanges } from '$shared/transcript/changes.js';\nimport type { GitDiff } from '$shared/server/git.js';\n\n/** A hunk as the API sends it: its `@@` header and unified-diff lines. */\nexport type Hunk = PatchHunk;\n\nexport type Source = 'git' | 'session';\n\n/** One file in the list, from either source. */\nexport interface ChangedFile {\n\tfile: string;\n\tkind: 'added' | 'modified' | 'deleted' | 'renamed';\n\toldPath?: string;\n\tuntracked?: boolean;\n\tbinary?: boolean;\n\tadditions: number;\n\tdeletions: number;\n}\n\n/** A turn of the session source, its files read as the list reads any file. */\nexport type Turn = Omit<TurnChanges, 'files'> & { files: ChangedFile[] };\n\n/** What `/changes` answers: the files, and from the session source its turns too. */\nexport interface Listing {\n\tsource: Source;\n\troot?: string;\n\tfiles: ChangedFile[];\n\tturns?: Turn[];\n\t/** From the session source: the prompt that opens every turn, changed something or not. */\n\tprompts?: string[];\n\ttotals: { files: number; additions: number; deletions: number };\n}\n\n/** What the transcript needs to draw each turn's change summary. */\nexport interface TranscriptChanges {\n\tturns: Turn[];\n\tprompts: ReadonlySet<string>;\n\t/** Where the changed paths are shown relative to. */\n\troot: string | null;\n}\n\n/** What `/changes/diff` answers, from either source. */\nexport type Diff = GitDiff;\n\n/** Line totals over a list of files. */\nexport function sumCounts(files: readonly { additions: number; deletions: number }[]) {\n\tlet additions = 0;\n\tlet deletions = 0;\n\tfor (const f of files) {\n\t\tadditions += f.additions;\n\t\tdeletions += f.deletions;\n\t}\n\treturn { additions, deletions };\n}\n\n/**\n * Paths a person rarely reads in a diff: lockfiles, build output, minified\n * and generated code, snapshots. The list folds them under \"N generated\".\n */\nconst GENERATED: RegExp[] = [\n\t/(^|\\/)(package-lock\\.json|npm-shrinkwrap\\.json|yarn\\.lock|pnpm-lock\\.yaml|bun\\.lockb?|deno\\.lock)$/,\n\t/(^|\\/)(Cargo\\.lock|Gemfile\\.lock|composer\\.lock|poetry\\.lock|uv\\.lock|Pipfile\\.lock|go\\.sum|flake\\.lock|mix\\.lock|pubspec\\.lock|Podfile\\.lock)$/,\n\t/(^|\\/)(dist|build|out|coverage|node_modules|vendor|\\.svelte-kit|\\.next|\\.nuxt|__generated__)\\//,\n\t/\\.min\\.(js|css)$/,\n\t/\\.(map|snap)$/,\n\t/(^|\\/)__snapshots__\\//,\n\t/[._-]generated\\.[^/]+$/,\n\t/\\.(pb|gen)\\.[^/]+$/\n];\n\nexport function isGenerated(path: string): boolean {\n\treturn GENERATED.some((re) => re.test(path));\n}\n\n/** The letter a file's status shows as, the way `git status --short` writes it. */\nexport function statusLetter(f: ChangedFile): 'A' | 'M' | 'D' | 'R' | '?' {\n\tif (f.untracked) return '?';\n\treturn f.kind === 'added' ? 'A' : f.kind === 'deleted' ? 'D' : f.kind === 'renamed' ? 'R' : 'M';\n}\n\n/** A path as the list shows it: relative to `root` when it sits under it. */\nexport function displayPath(path: string, root: string | null): string {\n\tif (!root || !path.startsWith('/')) return path;\n\tconst base = root.endsWith('/') ? root : `${root}/`;\n\treturn path.startsWith(base) ? path.slice(base.length) : path;\n}\n\nexport type DiffRow =\n\t| { type: 'hunk'; header: string }\n\t| {\n\t\t\t/** Unchanged lines the diff leaves out. */\n\t\t\ttype: 'gap';\n\t\t\t/** How many, or null after the last hunk, where only the file itself knows. */\n\t\t\tcount: number | null;\n\t\t\t/** The line the gap starts at, on the new side and on the old. */\n\t\t\tfrom: number;\n\t\t\told: number;\n\t }\n\t| { type: 'context' | 'add' | 'del'; old: number | null; new: number | null; text: string };\n\nconst HUNK_HEADER = /^@@ -(\\d+)(?:,(\\d+))? \\+(\\d+)(?:,(\\d+))? @@/;\n\n/**\n * A file's hunks as the rows a unified diff draws: each hunk's header, its\n * lines with the old and new line numbers they sit at, and between hunks a\n * row counting the unchanged lines left out, which says where they sit so\n * they can be read from the file and shown. Lines before the first hunk are\n * counted too. After the last, the file's length is not known: with `tail` a\n * row with no count stands for whatever is left.\n */\nexport function diffRows(hunks: Hunk[], opts: { tail?: boolean } = {}): DiffRow[] {\n\tconst rows: DiffRow[] = [];\n\tlet nextOld = 1;\n\tlet nextNew = 1;\n\tlet readable = hunks.length > 0;\n\tfor (const hunk of hunks) {\n\t\tconst m = HUNK_HEADER.exec(hunk.header);\n\t\tlet oldLine: number | null = null;\n\t\tlet newLine: number | null = null;\n\t\tif (m) {\n\t\t\toldLine = Number(m[1]);\n\t\t\tnewLine = Number(m[3]);\n\t\t\t// A hunk that touches no lines on one side names the line it sits after.\n\t\t\tconst oldCount = Number(m[2] ?? 1);\n\t\t\tconst newCount = Number(m[4] ?? 1);\n\t\t\tconst start = oldCount === 0 ? oldLine + 1 : oldLine;\n\t\t\tif (start > nextOld) rows.push({ type: 'gap', count: start - nextOld, from: nextNew, old: nextOld });\n\t\t\tnextOld = start + oldCount;\n\t\t\tnextNew = (newCount === 0 ? newLine + 1 : newLine) + newCount;\n\t\t} else {\n\t\t\treadable = false;\n\t\t}\n\t\trows.push({ type: 'hunk', header: hunk.header });\n\t\tfor (const line of hunk.lines) {\n\t\t\tconst sign = line[0];\n\t\t\tconst text = line.slice(1);\n\t\t\tif (sign === '+') {\n\t\t\t\trows.push({ type: 'add', old: null, new: newLine, text });\n\t\t\t\tif (newLine !== null) newLine++;\n\t\t\t} else if (sign === '-') {\n\t\t\t\trows.push({ type: 'del', old: oldLine, new: null, text });\n\t\t\t\tif (oldLine !== null) oldLine++;\n\t\t\t} else if (sign === '\\\\') {\n\t\t\t\t// \"\\" says something about the line above.\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\trows.push({ type: 'context', old: oldLine, new: newLine, text });\n\t\t\t\tif (oldLine !== null) oldLine++;\n\t\t\t\tif (newLine !== null) newLine++;\n\t\t\t}\n\t\t}\n\t}\n\tif (opts.tail && readable) rows.push({ type: 'gap', count: null, from: nextNew, old: nextOld });\n\treturn rows;\n}\n\n/** The highlight.js language a path's extension names, or null to leave it plain. */\nexport function languageFor(path: string): string | null {\n\tconst name = path.split('/').pop() ?? '';\n\tif (/^Dockerfile/.test(name)) return 'dockerfile';\n\tif (name === 'Makefile') return 'makefile';\n\tconst ext = name.includes('.') ? name.split('.').pop()!.toLowerCase() : '';\n\treturn LANGUAGES[ext] ?? null;\n}\n\nconst LANGUAGES: Record<string, string> = {\n\tts: 'typescript',\n\ttsx: 'typescript',\n\tmts: 'typescript',\n\tcts: 'typescript',\n\tjs: 'javascript',\n\tjsx: 'javascript',\n\tmjs: 'javascript',\n\tcjs: 'javascript',\n\tsvelte: 'xml',\n\tvue: 'xml',\n\thtml: 'xml',\n\txml: 'xml',\n\tsvg: 'xml',\n\tcss: 'css',\n\tscss: 'scss',\n\tjson: 'json',\n\tjsonl: 'json',\n\tmd: 'markdown',\n\tpy: 'python',\n\tsh: 'bash',\n\tbash: 'bash',\n\tzsh: 'bash',\n\tyml: 'yaml',\n\tyaml: 'yaml',\n\ttoml: 'ini',\n\tini: 'ini',\n\trs: 'rust',\n\tgo: 'go',\n\tsql: 'sql',\n\tjava: 'java',\n\tkt: 'kotlin',\n\tc: 'c',\n\th: 'c',\n\tcpp: 'cpp',\n\thpp: 'cpp',\n\trb: 'ruby',\n\tphp: 'php',\n\tswift: 'swift',\n\tlua: 'lua'\n};\n\n/**\n * Where each turn's change summary goes in the transcript: after the last\n * item of the turn, keyed by that item's id. A turn runs from its prompt to\n * the next one, and only the ids in `prompts` count as prompts: the transcript\n * also draws user lines the log does not open a turn on (a steer that rode in\n * with a tool result, say), and those fall inside the turn around them. A turn\n * whose prompt is not among the items, scrolled out above the loaded tail,\n * gets no summary, and neither does the last turn while `open`, the session\n * still working on it.\n */\nexport function placeTurnChanges(\n\titems: readonly { id: string; kind: string }[],\n\tturns: readonly Turn[],\n\tprompts: ReadonlySet<string>,\n\topen: boolean\n): Map<string, Turn> {\n\tconst byPrompt = new Map<string, Turn>();\n\tfor (const t of turns) if (t.id) byPrompt.set(t.id, t);\n\tconst placed = new Map<string, Turn>();\n\tlet current: Turn | null = null;\n\tlet last: string | null = null;\n\tfor (const item of items) {\n\t\tif (item.kind === 'user' && prompts.has(item.id)) {\n\t\t\tif (current && last) placed.set(last, current);\n\t\t\tcurrent = byPrompt.get(item.id) ?? null;\n\t\t}\n\t\tlast = item.id;\n\t}\n\tif (current && last && !open) placed.set(last, current);\n\treturn placed;\n}\n","<script lang=\"ts\">\n\timport { Popover as PopoverPrimitive } from \"bits-ui\";\n\n\tlet { open = $bindable(false), ...restProps }: PopoverPrimitive.RootProps = $props();\n</script>\n\n<PopoverPrimitive.Root bind:open {...restProps} />\n","<script lang=\"ts\">\n\timport { Popover as PopoverPrimitive } from \"bits-ui\";\n\n\tlet { ...restProps }: PopoverPrimitive.PortalProps = $props();\n</script>\n\n<PopoverPrimitive.Portal {...restProps} />\n","<script lang=\"ts\">\n\timport { Popover as PopoverPrimitive } from \"bits-ui\";\n\timport PopoverPortal from \"./popover-portal.svelte\";\n\timport { cn, type WithoutChildrenOrChild } from \"$lib/utils.js\";\n\timport type { ComponentProps } from \"svelte\";\n\n\tlet {\n\t\tref = $bindable(null),\n\t\tclass: className,\n\t\tsideOffset = 4,\n\t\talign = \"center\",\n\t\tportalProps,\n\t\t...restProps\n\t}: PopoverPrimitive.ContentProps & {\n\t\tportalProps?: WithoutChildrenOrChild<ComponentProps<typeof PopoverPortal>>;\n\t} = $props();\n</script>\n\n<PopoverPortal {...portalProps}>\n\t<PopoverPrimitive.Content\n\t\tbind:ref\n\t\tdata-slot=\"popover-content\"\n\t\t{sideOffset}\n\t\t{align}\n\t\tclass={cn(\n\t\t\t\"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-end-2 data-[side=right]:slide-in-from-start-2 data-[side=top]:slide-in-from-bottom-2 z-(--z-floating) w-72 origin-(--bits-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden\",\n\t\t\tclassName\n\t\t)}\n\t\t{...restProps}\n\t/>\n</PopoverPortal>\n","<script lang=\"ts\">\n\timport { cn, type WithElementRef, type WithoutChildren } from \"$lib/utils.js\";\n\timport type { HTMLInputAttributes } from \"svelte/elements\";\n\n\tlet {\n\t\tref = $bindable(null),\n\t\tvalue = $bindable(),\n\t\tclass: className,\n\t\t\"data-slot\": dataSlot = \"input\",\n\t\t...restProps\n\t}: WithoutChildren<WithElementRef<HTMLInputAttributes>> = $props();\n</script>\n\n<input\n\tbind:this={ref}\n\tdata-slot={dataSlot}\n\tclass={cn(\n\t\t\"border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex h-10 w-full min-w-0 rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground disabled:cursor-not-allowed disabled:opacity-50 focus-visible:ring-[3px]\",\n\t\tclassName\n\t)}\n\tbind:value\n\t{...restProps}\n/>\n","/**\n * The Files pane's pure half: what the API answers, which Shiki grammar a\n * path reads as, quick-open's fuzzy match, and the file and line a\n * transcript tool row points at.\n */\nimport type { PatchHunk } from '$shared/transcript/parser.js';\nimport type { FileRead as ServerFileRead } from '$shared/server/files.js';\n\nexport type { FileEntry, DirListing } from '$shared/server/files.js';\n\n/** What the read route answers with 200; a binary file answers 415. */\nexport type FileRead = Exclude<ServerFileRead, { kind: 'binary' }>;\n\n/** The Shiki grammar for a path, or null to draw it plain. */\nexport function shikiLanguage(path: string): string | null {\n\tconst name = path.split('/').pop() ?? '';\n\tif (/^Dockerfile/.test(name)) return 'docker';\n\tif (name === 'Makefile') return 'make';\n\tif (name.startsWith('.') && !name.slice(1).includes('.')) return DOTFILES[name] ?? null;\n\tconst ext = name.includes('.') ? name.split('.').pop()!.toLowerCase() : '';\n\treturn LANGUAGES[ext] ?? null;\n}\n\nconst DOTFILES: Record<string, string> = {\n\t'.gitignore': 'shellscript',\n\t'.env': 'shellscript',\n\t'.bashrc': 'shellscript',\n\t'.zshrc': 'shellscript'\n};\n\nconst LANGUAGES: Record<string, string> = {\n\tts: 'typescript',\n\tmts: 'typescript',\n\tcts: 'typescript',\n\ttsx: 'tsx',\n\tjs: 'javascript',\n\tmjs: 'javascript',\n\tcjs: 'javascript',\n\tjsx: 'jsx',\n\tsvelte: 'svelte',\n\thtml: 'html',\n\txml: 'xml',\n\tsvg: 'xml',\n\tcss: 'css',\n\tscss: 'scss',\n\tjson: 'json',\n\tjsonl: 'json',\n\tjsonc: 'jsonc',\n\tmd: 'markdown',\n\tpy: 'python',\n\tsh: 'shellscript',\n\tbash: 'shellscript',\n\tzsh: 'shellscript',\n\tyml: 'yaml',\n\tyaml: 'yaml',\n\ttoml: 'toml',\n\trs: 'rust',\n\tgo: 'go',\n\tsql: 'sql',\n\tdiff: 'diff',\n\tpatch: 'diff'\n};\n\nexport function isMarkdown(path: string): boolean {\n\treturn /\\.(md|markdown)$/i.test(path);\n}\n\n/** The directories that hold `path`, outermost first: `a/b/c.ts` → `a`, `a/b`. */\n/** The last part of a path: the file's or folder's own name. */\nexport function baseName(path: string): string {\n\treturn path.split('/').pop() ?? path;\n}\n\n/** The folder a path sits in, '' for one at the root. */\nexport function parentOf(path: string): string {\n\treturn path.split('/').slice(0, -1).join('/');\n}\n\nexport function ancestors(path: string): string[] {\n\tconst parts = path.split('/').slice(0, -1);\n\treturn parts.map((_, i) => parts.slice(0, i + 1).join('/'));\n}\n\n/**\n * How well `query` matches `path`: null for no match, else higher is better.\n * Every query character must appear in order; runs of consecutive characters,\n * matches at a word start, and matches in the file name score more, and a\n * shorter path wins a tie. Each place the first character occurs is tried as\n * a start, so `cli` finds `cli.ts` rather than the `c` of `src`.\n */\nexport function fuzzyScore(query: string, path: string): number | null {\n\tconst q = query.toLowerCase().replace(/\\s+/g, '');\n\tif (!q) return 0;\n\tconst p = path.toLowerCase();\n\tlet best: number | null = null;\n\tfor (let start = p.indexOf(q[0]); start !== -1; start = p.indexOf(q[0], start + 1)) {\n\t\tconst score = scoreFrom(q, p, path, start);\n\t\tif (score === null) break;\n\t\tif (best === null || score > best) best = score;\n\t}\n\treturn best === null ? null : best - path.length * 0.01;\n}\n\n/** The score of matching `q` greedily in `p` with its first character at `start`. */\nfunction scoreFrom(q: string, p: string, path: string, start: number): number | null {\n\tconst nameStart = path.lastIndexOf('/') + 1;\n\tlet score = 0;\n\tlet at = start - 1;\n\tlet run = 0;\n\tfor (const ch of q) {\n\t\tconst next = p.indexOf(ch, at + 1);\n\t\tif (next === -1) return null;\n\t\trun = next === at + 1 ? run + 1 : 0;\n\t\tscore += 1 + run * 2;\n\t\tconst prev = path[next - 1];\n\t\tif (next === 0 || prev === '/' || prev === '-' || prev === '_' || prev === '.') score += 3;\n\t\tif (next >= nameStart) score += 2;\n\t\tat = next;\n\t}\n\treturn score;\n}\n\n/** The best `limit` paths for `query`, best first. */\nexport function fuzzyFilter(query: string, paths: readonly string[], limit = 50): string[] {\n\tconst scored: { path: string; score: number }[] = [];\n\tfor (const path of paths) {\n\t\tconst score = fuzzyScore(query, path);\n\t\tif (score !== null) scored.push({ path, score });\n\t}\n\treturn scored\n\t\t.sort((a, b) => b.score - a.score)\n\t\t.slice(0, limit)\n\t\t.map((s) => s.path);\n}\n\n/** The tools whose row can open the file it touched in the Files pane. */\nconst FILE_TOOLS = new Set(['Read', 'Edit', 'Write', 'MultiEdit', 'NotebookEdit']);\n\n/** The first changed line a hunk lands on in the new file. */\nfunction firstChangedLine(hunk: PatchHunk): number | null {\n\tconst m = /^@@ -\\d+(?:,\\d+)? \\+(\\d+)/.exec(hunk.header);\n\tif (!m) return null;\n\tlet line = Number(m[1]);\n\tfor (const l of hunk.lines) {\n\t\tif (l.startsWith('+')) return line;\n\t\tif (l.startsWith(' ')) line++;\n\t}\n\treturn Number(m[1]);\n}\n\n/**\n * The file a transcript tool row touched and the line to open it at: a Read's\n * offset, or the first line an edit changed. Null for any other tool.\n */\nexport function toolFileTarget(entry: {\n\tname: string;\n\tinput: string;\n\tpatch?: { file: string; hunks: PatchHunk[] };\n}): { path: string; line: number | null } | null {\n\tif (!FILE_TOOLS.has(entry.name)) return null;\n\tlet input: Record<string, unknown> = {};\n\ttry {\n\t\tinput = JSON.parse(entry.input);\n\t} catch {\n\t\t// cut off by the parser's limit: the path is near the front, try for it alone\n\t\tconst m = /\"(?:file_path|notebook_path)\":\\s*\"((?:[^\"\\\\]|\\\\.)*)\"/.exec(entry.input);\n\t\tif (m) input = { file_path: JSON.parse(`\"${m[1]}\"`) };\n\t}\n\tconst path =\n\t\tentry.patch?.file ||\n\t\t(typeof input.file_path === 'string' ? input.file_path : null) ||\n\t\t(typeof input.notebook_path === 'string' ? input.notebook_path : null);\n\tif (!path) return null;\n\tif (entry.name === 'Read') {\n\t\tconst offset = Number(input.offset);\n\t\treturn { path, line: Number.isInteger(offset) && offset > 0 ? offset : null };\n\t}\n\tconst hunk = entry.patch?.hunks[0];\n\treturn { path, line: hunk ? firstChangedLine(hunk) : null };\n}\n","/**\n * marked v18.1.2 - a markdown parser\n * Copyright (c) 2018-2026, MarkedJS. (MIT License)\n * Copyright (c) 2011-2018, Christopher Jeffrey. (MIT License)\n * https://github.com/markedjs/marked\n */\n\n/**\n * DO NOT EDIT THIS FILE\n * The code in this file is generated from files in ./src/\n */\n\nfunction v(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var y=v();function ee(a){y=a}var B={exec:()=>null};function I(a){let e=[];return t=>{let n=Math.max(0,Math.min(3,t-1)),s=e[n];return s||(s=a(n),e[n]=s),s}}function c(a,e=\"\"){let t=typeof a==\"string\"?a:a.source,n={replace:(s,r)=>{let o=typeof r==\"string\"?r:r.source;return o=o.replace(T.caret,\"$1\"),t=t.replace(s,o),n},getRegex:()=>new RegExp(t,e)};return n}var Me=((a=\"\")=>{try{return!!new RegExp(\"(?<=1)(?<!1)\"+a)}catch{return!1}})(),T={codeRemoveIndent:/^(?: {0,3}\\t| {1,4})/gm,outputLinkReplace:/\\\\([\\[\\]])/g,indentCodeCompensation:/^(\\s+)(?:```)/,beginningSpace:/^\\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \\t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\\n/g,tabCharGlobal:/\\t/g,leadingSpaceTab:/^[ \\t]+/,multipleSpaceGlobal:/\\s+/g,blankLine:/^[ \\t]*$/,doubleBlankLine:/\\n[ \\t]*\\n[ \\t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\\n {0,3}((?:=+|-+) *)(?=\\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \\t]?/gm,blockquoteMarkerWhitespace:/^( {0,3}>)([ \\t]+)/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\\[[ xX]\\] +\\S/,listReplaceTask:/^\\[[ xX]\\] +/,listTaskCheckbox:/\\[[ xX]\\]/,anyLine:/\\n.*\\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\\||\\| *$/g,tableRowBlankLine:/\\n[ \\t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\\s|>)/i,endPreScriptTag:/^<\\/(pre|code|kbd|script)(\\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'\"]*[^\\s])\\s+(['\"])(.*)\\2/,unicodeAlphaNumeric:/[\\p{L}\\p{N}]/u,numericCharacterReference:/&#(?:(\\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/,numericCharacterReferenceOrAmpersand:/&#(?:(\\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));|&(?!(#\\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\\w+);)/g,escapeTest:/[&<>\"']/,escapeReplace:/[&<>\"']/g,escapeTestNoEncode:/[<>\"']|&(?!(#\\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\\w+);)/,escapeReplaceNoEncode:/[<>\"']|&(?!(#\\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\\w+);)/g,caret:/(^|[^\\[])\\^/g,percentDecode:/%25/g,findPipe:/\\|/g,splitPipe:/ \\|/,slashPipe:/\\\\\\|/g,carriageReturn:/\\r\\n|\\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\\S*/,endingNewline:/\\n$/,listItemRegex:a=>new RegExp(`^( {0,3}${a})((?:[\t ][^\\\\n]*)?(?:\\\\n|$))`),nextBulletRegex:I(a=>new RegExp(`^ {0,${a}}(?:[*+-]|\\\\d{1,9}[.)])((?:[ \t][^\\\\n]*)?(?:\\\\n|$))`)),hrRegex:I(a=>new RegExp(`^ {0,${a}}((?:-[ \t]*){3,}|(?:_[ \t]*){3,}|(?:\\\\*[ \t]*){3,})(?:\\\\n+|$)`)),fencesBeginRegex:I(a=>new RegExp(`^ {0,${a}}(?:\\`\\`\\`|~~~)`)),headingBeginRegex:I(a=>new RegExp(`^ {0,${a}}#{1,6}(?:\\\\s|$)`)),pedanticHeadingBeginRegex:I(a=>new RegExp(`^ {0,${a}}#`)),htmlBeginRegex:I(a=>new RegExp(`^ {0,${a}}(?:</?(?:${K})(?: +|$|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\\\s>]|$)|!--)|<\\\\?|<![A-Za-z]|<!\\\\[CDATA\\\\[)`,\"i\")),blockquoteBeginRegex:I(a=>new RegExp(`^ {0,${a}}>`))},Ce=/^(?:[ \\t]*(?:\\n|$))+/,Ee=/^((?: {4}| {0,3}\\t)[^\\n]+(?:\\n(?:[ \\t]*(?:\\n|$))*)?)+/,Ie=/^ {0,3}(`{3,}(?=[^`\\n]*(?:\\n|$))|~{3,})([^\\n]*)(?:\\n|$)(?:|([\\s\\S]*?)(?:\\n|$))(?: {0,3}\\1[~`]* *(?=\\n|$)|$)/,U=/^ {0,3}((?:-[\\t ]*){3,}|(?:_[ \\t]*){3,}|(?:\\*[ \\t]*){3,})(?:\\n+|$)/,Be=/^ {0,3}(#{1,6})(?=\\s|$)(.*)(?:\\n+|$)/,ne=/ {0,3}(?:[*+-]|\\d{1,9}[.)])/,me=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\\n(?!\\s*?\\n|bull |fences|blockquote|heading|hr|html|table))+?)\\n {0,3}(=+|-+) *(?:\\n+|$)/,xe=c(me).replace(/bull/g,ne).replace(/blockCode/g,/(?: {4}| {0,3}\\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\\t ]*){3,}|(?:_[ \\t]*){3,}|(?:\\*[ \\t]*){3,})(?:\\n+|$)/).replace(/html/g,/ {0,3}<[^\\n>]+>\\n/).replace(/\\|table/g,\"\").getRegex(),De=c(me).replace(/bull/g,ne).replace(/blockCode/g,/(?: {4}| {0,3}\\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\\t ]*){3,}|(?:_[ \\t]*){3,}|(?:\\*[ \\t]*){3,})(?:\\n+|$)/).replace(/html/g,/ {0,3}<[^\\n>]+>\\n/).replace(/table/g,/ {0,3}\\|?(?:[:\\- ]*\\|)+[\\:\\- ]*\\n/).getRegex(),re=/^([^\\n]+(?:\\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \\t]+\\n)[^\\n]+)*)/,qe=/^[^\\n]+/,se=/(?!\\s*\\])(?:\\\\[\\s\\S]|[^\\[\\]\\\\])+/,Ze=c(/^ {0,3}\\[(label)\\]: *(?:\\n[ \\t]*)?([^<\\s][^\\s]*|<.*?>)(?:(?: +(?:\\n[ \\t]*)?| *\\n[ \\t]*)(title))? *(?:\\n+|$)/).replace(\"label\",se).replace(\"title\",/(?:\"(?:\\\\\"?|[^\"\\\\])*\"|'[^'\\n]*(?:\\n[^'\\n]+)*\\n?'|\\([^()]*\\))/).getRegex(),ve=c(/^(bull)([ \\t][^\\n]*?)?(?:\\n|$)/).replace(/bull/g,ne).getRegex(),K=\"address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul\",ie=/<!--(?:-?>|[\\s\\S]*?(?:-->|$))/,He=c(\"^ {0,3}(?:<(script|pre|style|textarea)[\\\\s>][\\\\s\\\\S]*?(?:</\\\\1>[^\\\\n]*\\\\n*|$)|comment[^\\\\n]*(\\\\n+|$)|<\\\\?[\\\\s\\\\S]*?(?:\\\\?>[^\\\\n]*\\\\n*|$)|<![A-Z][\\\\s\\\\S]*?(?:>[^\\\\n]*\\\\n*|$)|<!\\\\[CDATA\\\\[[\\\\s\\\\S]*?(?:\\\\]\\\\]>[^\\\\n]*\\\\n*|$)|</?(tag)(?:[ \\\\t]+|\\\\n|/?>|$)[\\\\s\\\\S]*?(?:(?:\\\\n[ \t]*)+\\\\n|$)|<(?!(?:script|pre|style|textarea)(?![a-z0-9-]))([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:(?:\\\\n[ \t]*)+\\\\n|$)|</[a-z][a-z0-9-]*\\\\s*>(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:(?:\\\\n[ \t]*)+\\\\n|$))\",\"i\").replace(\"comment\",ie).replace(\"tag\",K).replace(\"attribute\",/ +[a-zA-Z:_][\\w.:-]*(?: *= *\"[^\"\\n]*\"| *= *'[^'\\n]*'| *= *[^\\s\"'=<>`]+)?/).getRegex(),be=a=>c(re).replace(\"hr\",U).replace(\"heading\",\" {0,3}#{1,6}(?:\\\\s|$)\").replace(\"|lheading\",\"\").replace(\"|table\",\"\").replace(\"blockquote\",\" {0,3}>\").replace(\"fences\",\" {0,3}(?:`{3,}(?=[^`\\\\n]*(?:\\\\n|$))|~~~)[^\\\\n]*(?:\\\\n|$)\").replace(\"list\",a).replace(\"html\",\" {0,3}(?:</?(?:tag)(?: +|\\\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\\\s>]|$)|!--)|<\\\\?|<![A-Za-z]|<!\\\\[CDATA\\\\[)\").replace(\"tag\",K).getRegex(),Ge=be(/ {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]/),Ne=be(/ {0,3}(?:[*+-]|\\d{1,9}[.)])(?:[ \\t]|\\n|$)/),Qe=c(/^( {0,3}> ?(?:(?![ \\t]*(?:\\n|$))(paragraph)|[^\\n]*)(?:\\n|$))+/).replace(\"paragraph\",Ne).getRegex(),oe={blockquote:Qe,code:Ee,def:Ze,fences:Ie,heading:Be,hr:U,html:He,lheading:xe,list:ve,newline:Ce,paragraph:Ge,table:B,text:qe},ke=c(\"^ *([^\\\\n ].*)\\\\n {0,3}((?:\\\\| *)?:?-+:? *(?:\\\\| *:?-+:? *)*(?:\\\\| *)?)(?:\\\\n((?:(?! *\\\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\\\n|$))*)\\\\n*|$)\").replace(\"hr\",U).replace(\"heading\",\" {0,3}#{1,6}(?:\\\\s|$)\").replace(\"blockquote\",\" {0,3}>\").replace(\"code\",\"(?: {4}| {0,3}\t)[^\\\\n]\").replace(\"fences\",\" {0,3}(?:`{3,}(?=[^`\\\\n]*(?:\\\\n|$))|~~~)[^\\\\n]*(?:\\\\n|$)\").replace(\"list\",\" {0,3}(?:[*+-]|1[.)])[ \\\\t]\").replace(\"html\",\" {0,3}(?:</?(?:tag)(?: +|\\\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\\\s>]|$)|!--)|<\\\\?|<![A-Za-z]|<!\\\\[CDATA\\\\[)\").replace(\"tag\",K).getRegex(),je={...oe,lheading:De,table:ke,paragraph:c(re).replace(\"hr\",U).replace(\"heading\",\" {0,3}#{1,6}(?:\\\\s|$)\").replace(\"|lheading\",\"\").replace(\"table\",ke).replace(\"blockquote\",\" {0,3}>\").replace(\"fences\",\" {0,3}(?:`{3,}(?=[^`\\\\n]*(?:\\\\n|$))|~~~)[^\\\\n]*(?:\\\\n|$)\").replace(\"list\",\" {0,3}(?:[*+-]|1[.)])[ \\\\t]+[^ \\\\t\\\\n]\").replace(\"html\",\" {0,3}(?:</?(?:tag)(?: +|\\\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\\\s>]|$)|!--)|<\\\\?|<![A-Za-z]|<!\\\\[CDATA\\\\[)\").replace(\"tag\",K).getRegex()},Fe={...oe,html:c(`^ *(?:comment *(?:\\\\n|\\\\s*$)|<(tag)[\\\\s\\\\S]+?</\\\\1> *(?:\\\\n{2,}|\\\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\\\s[^'\"/>\\\\s]*)*?/?> *(?:\\\\n{2,}|\\\\s*$))`).replace(\"comment\",ie).replace(/tag/g,\"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\\\b)\\\\w+(?!:|[^\\\\w\\\\s@]*@)\\\\b\").getRegex(),def:/^ *\\[([^\\]]+)\\]: *<?([^\\s>]+)>?(?: +([\"(][^\\n]+[\")]))? *(?:\\n+|$)/,heading:/^(#{1,6})(.*)(?:\\n+|$)/,fences:B,lheading:/^(.+?)\\n {0,3}(=+|-+) *(?:\\n+|$)/,paragraph:c(re).replace(\"hr\",U).replace(\"heading\",` *#{1,6} *[^\n]`).replace(\"lheading\",xe).replace(\"|table\",\"\").replace(\"blockquote\",\" {0,3}>\").replace(\"|fences\",\"\").replace(\"|list\",\"\").replace(\"|html\",\"\").replace(\"|tag\",\"\").getRegex()},Ue=/^\\\\([!\"#$%&'()*+,\\-./:;<=>?@\\[\\]\\\\^_`{|}~])/,Ke=/^(`+)([^`]|[^`][\\s\\S]*?[^`])\\1(?!`)/,Re=/^( {2,}|\\\\)\\n(?!\\s*$)[ \\t]*/,We=/^(`+|[^`])(?:(?= {2,}\\n)|[\\s\\S]*?(?:(?=[\\\\<!\\[`*_]|\\b_|$)|[^ ](?= {2,}\\n)))/,$=/[\\p{P}\\p{S}]/u,H=/[\\s\\p{P}\\p{S}]/u,W=/[^\\s\\p{P}\\p{S}]/u,Xe=c(/^((?![*_])punctSpace)/,\"u\").replace(/punctSpace/g,H).getRegex(),Ve=/[\\p{Pi}\\p{Ps}\"']/u,Te=/(?!~)[\\p{P}\\p{S}]/u,Je=/(?!~)[\\s\\p{P}\\p{S}]/u,Ye=/(?:[^\\s\\p{P}\\p{S}]|~)/u,et=c(/link|precode-code|html/,\"g\").replace(\"link\",/\\[(?:[^\\[\\]`]|(?<a>`+)[^`]+\\k<a>(?!`))*?\\]\\((?:\\\\[\\s\\S]|[^\\\\\\(\\)]|\\((?:\\\\[\\s\\S]|[^\\\\\\(\\)])*\\))*\\)/).replace(\"precode-\",Me?\"(?<!`)()\":\"(^^|[^`])\").replace(\"code\",/(?<b>`+)[^`]+\\k<b>(?!`)/).replace(\"html\",/<(?! )[^<>]*?>/).getRegex(),Oe=/^(?:\\*+(?:((?!\\*)punct)|([^\\s*]))?)|^_+(?:((?!_)punct)|([^\\s_]))?/,tt=c(Oe,\"u\").replace(/punct/g,$).getRegex(),nt=c(Oe,\"u\").replace(/punct/g,Te).getRegex(),rt=/^(?:\\*+(?:((?!\\*)(?!openQuote)punct)|([^\\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\\s_]))?/,st=c(rt,\"u\").replace(/openQuote/g,Ve).replace(/punct/g,$).getRegex(),we=\"^[^_*]*?__[^_*]*?\\\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\\\*)punct(\\\\*+)(?=[\\\\s]|$)|notPunctSpace(\\\\*+)(?!\\\\*)(?=punctSpace|$)|(?!\\\\*)punctSpace(\\\\*+)(?=notPunctSpace)|[\\\\s](\\\\*+)(?!\\\\*)(?=punct)|(?!\\\\*)punct(\\\\*+)(?!\\\\*)(?=punct)|notPunctSpace(\\\\*+)(?=notPunctSpace)\",it=c(we,\"gu\").replace(/notPunctSpace/g,W).replace(/punctSpace/g,H).replace(/punct/g,$).getRegex(),ot=c(we,\"gu\").replace(/notPunctSpace/g,Ye).replace(/punctSpace/g,Je).replace(/punct/g,Te).getRegex(),at=\"^[^_*]*?__[^_*]*?\\\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\\\*)punct(\\\\*+)(?=[\\\\s]|$)|notPunctSpace(\\\\*+)(?!\\\\*)(?=punctSpace|$)|(?!\\\\*)[\\\\s](\\\\*+)(?=notPunctSpace)|[\\\\s](\\\\*+)(?!\\\\*)(?=punct)|(?!\\\\*)punct(\\\\*+)(?!\\\\*)(?=punct)|(?:(?!\\\\*)punct|notPunctSpace)(\\\\*+)(?!\\\\*)(?=notPunctSpace)\",lt=c(at,\"gu\").replace(/notPunctSpace/g,W).replace(/punctSpace/g,H).replace(/punct/g,$).getRegex(),ut=c(\"^[^_*]*?\\\\*\\\\*[^_*]*?_[^_*]*?(?=\\\\*\\\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)\",\"gu\").replace(/notPunctSpace/g,W).replace(/punctSpace/g,H).replace(/punct/g,$).getRegex(),pt=\"^[^_*]*?\\\\*\\\\*[^_*]*?_[^_*]*?(?=\\\\*\\\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\\\s](_+)(?=notPunctSpace)|[\\\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)\",ct=c(pt,\"gu\").replace(/notPunctSpace/g,W).replace(/punctSpace/g,H).replace(/punct/g,$).getRegex(),ht=c(/^~~?(?:((?!~)punct)|[^\\s~])/,\"u\").replace(/punct/g,$).getRegex(),dt=\"^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)\",kt=c(dt,\"gu\").replace(/notPunctSpace/g,W).replace(/punctSpace/g,H).replace(/punct/g,$).getRegex(),gt=c(/\\\\(punct)/,\"gu\").replace(/punct/g,$).getRegex(),ft=c(/(`+)(?:[^`]|[^`][\\s\\S]*?[^`])\\1(?!`)|`+|\\\\(punct)/,\"gu\").replace(/punct/g,$).getRegex(),mt=c(/^<(scheme:[^\\s\\x00-\\x1f<>]*|email)>/).replace(\"scheme\",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(\"email\",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),xt=c(ie).replace(\"(?:-->|$)\",\"-->\").getRegex(),bt=c(\"^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\\\s*/?>|^<\\\\?[\\\\s\\\\S]*?\\\\?>|^<![a-zA-Z]+\\\\s[\\\\s\\\\S]*?>|^<!\\\\[CDATA\\\\[[\\\\s\\\\S]*?\\\\]\\\\]>\").replace(\"comment\",xt).replace(\"attribute\",/\\s+[a-zA-Z:_][\\w.:-]*(?:\\s*=\\s*\"[^\"]*\"|\\s*=\\s*'[^']*'|\\s*=\\s*[^\\s\"'=<>`]+)?/).getRegex(),Pe=/\\[(?:\\\\[\\s\\S]|[^\\[\\]\\\\])*\\]/,Y=c(/(?:\\[(?:brackets|\\\\[\\s\\S]|[^\\[\\]\\\\])*\\]|\\\\[\\s\\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\\])|[^\\[\\]\\\\`])*?/).replace(\"brackets\",Pe).getRegex(),Rt=c(/^!?\\[(label)\\]\\([ \\t\\n]*(href)(?:(?:[ \\t]+(?:\\n[ \\t]*)?|\\n[ \\t]*)(title))?[ \\t\\n]*\\)/).replace(\"label\",Y).replace(\"href\",/<(?:\\\\.|[^\\n<>\\\\])+>|[^ \\t\\n\\x00-\\x1f]+|(?=\\))/).replace(\"title\",/\"(?:\\\\\"?|[^\"\\\\])*\"|'(?:\\\\'?|[^'\\\\])*'|\\((?:\\\\\\)?|[^)\\\\])*\\)/).getRegex(),Tt=c(/^!?\\[(label)\\]\\[(ref)\\]/).replace(\"label\",Y).replace(\"ref\",se).getRegex(),Ot=c(/^!?\\[(ref)\\](?:\\[\\])?/).replace(\"ref\",se).getRegex(),ge=/(?!\\s*\\])(?:\\\\[\\s\\S]|[^\\[\\]\\\\]){1,999}/,wt=c(/(?:[^\\[\\]\\\\`]*(?:\\[(?:brackets|\\\\[\\s\\S]|[^\\[\\]\\\\])*\\]|\\\\[\\s\\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\\]))){0,999}?[^\\[\\]\\\\`]*?/).replace(\"brackets\",Pe).getRegex(),Pt=c(\"reflink|nolink(?!\\\\()\",\"g\").replace(\"reflink\",c(/^!?\\[(label)\\]\\[(ref)\\]/).replace(\"label\",wt).replace(\"ref\",ge).getRegex()).replace(\"nolink\",c(/^!?\\[(ref)\\](?:\\[\\])?/).replace(\"ref\",ge).getRegex()).getRegex(),fe=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,yt=/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\\w-])/,St=c(/(?:mailto:email|xmpp:email(?:\\/[A-Za-z0-9@.]+)?)/).replace(/email/g,yt).getRegex(),ae={_backpedal:B,anyPunctuation:gt,anyPunctuationOutsideCode:ft,autolink:mt,blockSkip:et,br:Re,code:Ke,del:B,delLDelim:B,delRDelim:B,emStrongLDelim:tt,emStrongRDelimAst:it,emStrongRDelimUnd:ut,escape:Ue,link:Rt,nolink:Ot,punctuation:Xe,reflink:Tt,reflinkSearch:Pt,tag:bt,text:We,url:B},_t={...ae,emStrongLDelim:st,emStrongRDelimAst:lt,emStrongRDelimUnd:ct,link:c(/^!?\\[(label)\\]\\((.*?)\\)/).replace(\"label\",Y).getRegex(),reflink:c(/^!?\\[(label)\\]\\s*\\[([^\\]]*)\\]/).replace(\"label\",Y).getRegex()},te={...ae,emStrongRDelimAst:ot,emStrongLDelim:nt,delLDelim:ht,delRDelim:kt,url:c(/^emailProtocol|^((?:protocol):\\/\\/|www\\.)(?:[a-zA-Z0-9\\-]+\\.?)+[^\\s<]*|^email/).replace(\"emailProtocol\",St).replace(\"protocol\",fe).replace(\"email\",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'\"~()&]+|\\([^)]*\\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'\"~)]+(?!$))+/,del:/^(~~?)(?=[^\\s~])((?:\\\\[\\s\\S]|[^\\\\])*?(?:\\\\[\\s\\S]|[^\\s~\\\\]))\\1(?=[^~]|$)/,text:c(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\\n)|(?=[a-zA-Z0-9.!#$%&'*+\\/=?_`{\\|}~-]+@)|[\\s\\S]*?(?:(?=[\\\\<!\\[`*~_]|\\b_|protocol:\\/\\/|www\\.|$)|[^ ](?= {2,}\\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\\/=?_`{\\|}~-](?=[a-zA-Z0-9.!#$%&'*+\\/=?_`{\\|}~-]+@))))/).replace(\"protocol\",fe).replace(/emailProtocol/g,/(?:mailto|xmpp):/).getRegex()},$t={...te,br:c(Re).replace(\"{2,}\",\"*\").getRegex(),text:c(te.text).replace(\"\\\\b_\",\"\\\\b_| {2,}\\\\n\").replace(/\\{2,\\}/g,\"*\").getRegex()},X={normal:oe,gfm:je,pedantic:Fe},G={normal:ae,gfm:te,breaks:$t,pedantic:_t};var Lt={\"&\":\"&\",\"<\":\"<\",\">\":\">\",'\"':\""\",\"'\":\"'\"},ye=a=>Lt[a];function P(a,e){if(e){if(T.escapeTest.test(a))return a.replace(T.escapeReplace,ye)}else if(T.escapeTestNoEncode.test(a))return a.replace(T.escapeReplaceNoEncode,ye);return a}function Se(a){return T.numericCharacterReference.test(a)?a.replace(T.numericCharacterReferenceOrAmpersand,(e,t,n)=>{if(t===void 0&&n===void 0)return\"&\";let s=t===void 0?Number.parseInt(n,16):Number.parseInt(t,10);return s===0||s>1114111||s>=55296&&s<=57343?\"\\uFFFD\":s===38?\"&\":String.fromCodePoint(s)}):a}function le(a){try{a=encodeURI(a).replace(T.percentDecode,\"%\")}catch{return null}return a}function ue(a,e){let t=a.replace(T.findPipe,(r,o,i)=>{let l=!1,u=o;for(;--u>=0&&i[u]===\"\\\\\";)l=!l;return l?\"|\":\" |\"}),n=t.split(T.splitPipe),s=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push(\"\");for(;s<n.length;s++)n[s]=n[s].trim().replace(T.slashPipe,\"|\");return n}function z(a,e,t){let n=a.length;if(n===0)return\"\";let s=0;for(;s<n;){let r=a.charAt(n-s-1);if(r===e&&!t)s++;else if(r!==e&&t)s++;else break}return a.slice(0,n-s)}function pe(a){let e=a.split(`\n`),t=e.length-1;for(;t>=0&&T.blankLine.test(e[t]);)t--;return e.length-t<=2?a:e.slice(0,t+1).join(`\n`)}function N(a){return a.trim().toLowerCase().toUpperCase().toLowerCase()}function ce(a,e){if(a.indexOf(e[0])===-1&&a.indexOf(e[1])===-1)return-1;let t=0;for(let n=0;n<a.length;n++)if(a[n]===\"\\\\\")n++;else if(a[n]===e[0])t++;else if(a[n]===e[1]&&(t--,t<0))return n;return t>0?-2:-1}function V(a,e=0){let t=e,n=\"\";for(let s of a)if(s===\"\t\"){let r=4-t%4;n+=\" \".repeat(r),t+=r}else n+=s,t++;return n}function _e(a,e,t,n,s){let r=e.href,o=e.title||null,i=a[1].replace(s.other.outputLinkReplace,\"$1\"),l=a[0].charAt(0)===\"!\",u=n.state.inLink,h=n.state.linkEmitted,p=n.state.inRawBlock;n.state.inLink=!0,n.state.linkEmitted=!1;let d=n.inlineTokens(i),g=n.state.linkEmitted;if(n.state.linkEmitted=h,n.state.inLink=u,!l){if(g){n.state.inRawBlock=p;return}n.state.linkEmitted=!0}return{type:l?\"image\":\"link\",raw:t,href:r,title:o,text:i,tokens:d}}function At(a,e,t){let n=a.match(t.other.indentCodeCompensation);if(n===null)return e;let s=n[1];return e.split(`\n`).map(r=>{let o=r.match(t.other.beginningSpace);if(o===null)return r;let[i]=o;return r.slice(Math.min(i.length,s.length))}).join(`\n`)}function $e(a,e,t,n){if(!e.includes(\"<\"))return!1;for(let s=0;s<e.length;s++){if(e[s]===\"\\\\\"){s++;continue}if(e[s]===\"`\"){let i=n.inline.code.exec(e.slice(s));if(i){s+=i[0].length-1;continue}}if(e[s]!==\"<\")continue;let r=a.slice(t+s),o=n.inline.tag.exec(r)||n.inline.autolink.exec(r);if(o){if(o[0].length>e.length-s)return!0;s+=o[0].length-1}}return!1}var _=class{options;rules;lexer;constructor(e){this.options=e||y}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:\"space\",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let n=this.options.pedantic?t[0]:pe(t[0]),s=n.replace(this.rules.other.codeRemoveIndent,\"\");return{type:\"code\",raw:n,codeBlockStyle:\"indented\",text:s}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],s=At(n,t[3]||\"\",this.rules);return{type:\"code\",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,\"$1\"):t[2],text:s}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){let s=z(n,\"#\");(this.options.pedantic||!s||this.rules.other.endingSpaceTabChar.test(s))&&(n=s.trim())}return{type:\"heading\",raw:z(t[0],`\n`),depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:\"hr\",raw:z(t[0],`\n`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=z(t[0],`\n`).split(`\n`),s=\"\",r=\"\",o=[];for(;n.length>0;){let i=!1,l=[],u;for(u=0;u<n.length;u++)if(this.rules.other.blockquoteStart.test(n[u]))l.push(n[u]),i=!0;else if(!i)l.push(n[u]);else break;n=n.slice(u);let h=l.join(`\n`),p=h.replace(this.rules.other.blockquoteMarkerWhitespace,(k,b,x)=>b+V(x,b.length)).replace(this.rules.other.blockquoteSetextReplace,`\n $1`).replace(this.rules.other.blockquoteSetextReplace2,\"\");s=s?`${s}\n${h}`:h,r=r?`${r}\n${p}`:p;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(p,o,!0),this.lexer.state.top=d,n.length===0)break;let g=o.at(-1);if(g?.type===\"code\"||g?.type===\"heading\"||g?.type===\"hr\"||g?.type===\"html\")break;if(g?.type===\"blockquote\"){let k=g,b=n.join(`\n`),x=k.raw+`\n`+b.replace(this.rules.other.blockquoteSetextReplace2,\"\"),f=this.blockquote(x);o[o.length-1]=f;let S=x.substring(f.raw.length).replace(/^\\n/,\"\"),R=S?S.split(`\n`).length:0,C=R?n.slice(0,-R):n;C.length>0&&(s=`${s}\n${C.join(`\n`)}`),r=r.substring(0,r.length-k.text.length)+f.text;break}else if(g?.type===\"list\"){let k=g,b=k.raw+`\n`+n.join(`\n`),x=this.list(b);o[o.length-1]=x;let f=x.raw.length>k.raw.length?b.slice(k.raw.length+1,x.raw.length).split(`\n`).length:0;if(f>0){let S=n.slice(0,f).join(`\n`);s=`${s}\n${S}`,r=`${r}\n${S}`}n=n.slice(f);continue}}return{type:\"blockquote\",raw:s,tokens:o,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=e,s=()=>n.length-e.length,r=t[1].trim(),o=r.length>1,i={type:\"list\",raw:\"\",ordered:o,start:o?+r.slice(0,-1):\"\",loose:!1,items:[]};r=o?`\\\\d{1,9}\\\\${r.slice(-1)}`:`\\\\${r}`,this.options.pedantic&&(r=o?r:\"[*+-]\");let l=this.rules.other.listItemRegex(r),u=!1;for(;e;){let p=!1,d=\"\";if(!(t=l.exec(e))||this.rules.block.hr.test(e))break;let g=s();e=e.substring(t[0].length);let k=t[2].split(`\n`,1)[0],b=t[1].length,x=this.options.pedantic?V(k,b):k.replace(this.rules.other.leadingSpaceTab,Q=>V(Q,b)),f=e.split(`\n`,1)[0],S=!x.trim(),R=0;if(this.options.pedantic?(R=2,d=x.trimStart()):S?R=b+1:(R=x.search(this.rules.other.nonSpaceChar),R=R>4?1:R,d=x.slice(R),R+=b),S&&this.rules.other.blankLine.test(f)&&(e=e.substring(f.length+1),p=!0),!p){let Q=this.rules.other.nextBulletRegex(R),E=this.rules.other.hrRegex(R),j=this.rules.other.fencesBeginRegex(R),F=this.options.pedantic?this.rules.other.pedanticHeadingBeginRegex(R):this.rules.other.headingBeginRegex(R),Le=this.rules.other.htmlBeginRegex(R),Ae=this.rules.other.blockquoteBeginRegex(R);for(;e;){let he=e.split(`\n`,1)[0],Z;if(f=he,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting,\" \"),Z=f):Z=f.replace(this.rules.other.leadingSpaceTab,de=>V(de)),j.test(f)||F.test(f)||Le.test(f)||Ae.test(f)||Q.test(f)||E.test(f))break;if(Z.search(this.rules.other.nonSpaceChar)>=R||!f.trim())d+=`\n`+Z.slice(R);else{if(S||x.replace(this.rules.other.tabCharGlobal,\" \").search(this.rules.other.nonSpaceChar)>=4||j.test(x)||F.test(x)||E.test(x))break;let ze=!this.options.pedantic&&/^ {0,3}(?:=+|-+) *$/.test(f)&&this.rules.block.lheading.test(`${x}\n${f}`)?` ${Z.replace(/^ {0,3}/,\"\")}`:f;d+=`\n`+ze}S=!f.trim(),e=e.substring(he.length+1),x=Z.slice(R)}}let C=n.slice(g,s());i.loose||(u?i.loose=!0:this.rules.other.doubleBlankLine.test(C)&&(u=!0)),i.items.push({type:\"list_item\",raw:C,task:!!this.options.gfm&&this.rules.other.listIsTask.test(d),loose:!1,text:d,tokens:[]})}let h=i.items.at(-1);if(h)h.raw=h.raw.trimEnd(),h.text=h.text.trimEnd();else return;i.raw=n.slice(0,s()).trimEnd();for(let p of i.items)if(this.lexer.state.top=!1,p.tokens=this.lexer.blockTokens(p.text,[]),!i.loose){let d=p.tokens.filter(k=>k.type===\"space\"),g=d.length>0&&d.some(k=>this.rules.other.anyLine.test(k.raw));i.loose=g}for(let p of i.items){let d=p.tokens[0];if(p.task&&(d?.type===\"text\"||d?.type===\"paragraph\")){p.text=p.text.replace(this.rules.other.listReplaceTask,\"\"),d.raw=d.raw.replace(this.rules.other.listReplaceTask,\"\"),d.text=d.text.replace(this.rules.other.listReplaceTask,\"\");for(let k=this.lexer.inlineQueue.length-1;k>=0;k--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[k].src)){this.lexer.inlineQueue[k].src=this.lexer.inlineQueue[k].src.replace(this.rules.other.listReplaceTask,\"\");break}let g=this.rules.other.listTaskCheckbox.exec(p.raw);if(g){let k={type:\"checkbox\",raw:g[0]+\" \",checked:g[0]!==\"[ ]\"};p.checked=k.checked,i.loose?p.tokens[0]&&[\"paragraph\",\"text\"].includes(p.tokens[0].type)&&\"tokens\"in p.tokens[0]&&p.tokens[0].tokens?(p.tokens[0].raw=k.raw+p.tokens[0].raw,p.tokens[0].text=k.raw+p.tokens[0].text,p.tokens[0].tokens.unshift(k)):p.tokens.unshift({type:\"paragraph\",raw:k.raw,text:k.raw,tokens:[k]}):p.tokens.unshift(k)}}else p.task&&(p.task=!1)}if(i.loose)for(let p of i.items){p.loose=!0;for(let d of p.tokens)d.type===\"text\"&&(d.type=\"paragraph\")}return i}}html(e){let t=this.rules.block.html.exec(e);if(t){let n=pe(t[0]);return{type:\"html\",block:!0,raw:n,pre:t[1]===\"pre\"||t[1]===\"script\"||t[1]===\"style\",text:n}}}def(e){let t=this.rules.block.def.exec(e);if(t){if(!this.rules.other.startAngleBracket.test(t[2])&&ce(t[2],\"()\")!==-1)return;let n=N(t[1]).replace(this.rules.other.multipleSpaceGlobal,\" \"),s=t[2]?t[2].replace(this.rules.other.hrefBrackets,\"$1\").replace(this.rules.inline.anyPunctuation,\"$1\"):\"\",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,\"$1\"):t[3];return{type:\"def\",tag:n,raw:z(t[0],`\n`),href:s,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=ue(t[1]),s=t[2].replace(this.rules.other.tableAlignChars,\"\").split(\"|\"),r=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,\"\").split(`\n`):[],o={type:\"table\",raw:z(t[0],`\n`),header:[],align:[],rows:[]};if(n.length===s.length){for(let i of s)this.rules.other.tableAlignRight.test(i)?o.align.push(\"right\"):this.rules.other.tableAlignCenter.test(i)?o.align.push(\"center\"):this.rules.other.tableAlignLeft.test(i)?o.align.push(\"left\"):o.align.push(null);for(let i=0;i<n.length;i++)o.header.push({text:n[i],tokens:this.lexer.inline(n[i]),header:!0,align:o.align[i]});for(let i of r)o.rows.push(ue(i,o.header.length).map((l,u)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:o.align[u]})));return o}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let n=t[1].trim();return{type:\"heading\",raw:z(t[0],`\n`),depth:t[2].charAt(0)===\"=\"?1:2,text:n,tokens:this.lexer.inline(n)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let n=t[1].charAt(t[1].length-1)===`\n`?t[1].slice(0,-1):t[1];return{type:\"paragraph\",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:\"text\",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:\"escape\",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:\"html\",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){if(this.lexer.state.linkParenPossible===!1)return;let t=this.rules.inline.link.exec(e);if(t){let n=t[0].charAt(0)===\"!\"?2:1;if(!this.options.pedantic&&$e(e,t[1],n,this.rules))return;let s=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(s)){if(!this.rules.other.endAngleBracket.test(s))return;let i=z(s.slice(0,-1),\"\\\\\");if((s.length-i.length)%2===0)return}else{let i=ce(t[2],\"()\");if(i===-2)return;if(i>-1){let u=(t[0].indexOf(\"!\")===0?5:4)+t[1].length+i;t[2]=t[2].substring(0,i),t[0]=t[0].substring(0,u).trim(),t[3]=\"\"}}let r=t[2],o=\"\";if(this.options.pedantic){let i=this.rules.other.pedanticHrefTitle.exec(r);i&&(r=i[1],o=i[3])}else o=t[3]?t[3].slice(1,-1):\"\";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(s)?r=r.slice(1):r=r.slice(1,-1)),_e(t,{href:r&&r.replace(this.rules.inline.anyPunctuation,\"$1\"),title:o&&o.replace(this.rules.inline.anyPunctuation,\"$1\")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let s=n[0].charAt(0)===\"!\"?2:1;if(!this.options.pedantic&&$e(e,n[1],s,this.rules))return;let r=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal,\" \"),o=t[N(r)];if(!o){let i=n[0].charAt(0);return{type:\"text\",raw:i,text:i}}return _e(n,o,n[0],this.lexer,this.rules)}}emStrong(e,t,n=\"\"){let s=this.rules.inline.emStrongLDelim.exec(e);if(!s||!s[1]&&!s[2]&&!s[3]&&!s[4])return;let r=s[0][0],o=n===r,i=t.length-e.length,l=i;for(;!this.options.pedantic&&l>0&&t[l-1]===r;)l--;let u=[...t.slice(Math.max(0,l-2),l)].at(-1)??\"\",h=u===\"*\"||u===\"_\"||!!this.rules.inline.punctuation.exec(u);l<i&&(n=u);let p=l<i?h:!!this.rules.inline.punctuation.exec(n);if(s[4]&&n.match(this.rules.other.unicodeAlphaNumeric))return;let d=s[1]||s[3]||\"\";if(!d||!n||p){let g=[...s[0]].length-1,k,b,x=g,f=0,S=i-l+g,R=!this.options.pedantic&&!!u.trim()&&(!!d||r===\"*\"&&!h),C=r===\"*\"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(C.lastIndex=0,t=t.slice(-1*e.length+g);(s=C.exec(t))!==null;){if(k=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!k)continue;if(b=[...k].length,s[3]||s[4]){x+=b;continue}else if(s[5]||s[6]||R){if(o&&(s[5]||s[6]))break;if(S%3&&!((S+b)%3)){f+=b;continue}}if(x-=b,x>0)continue;b=Math.min(b,b+x+f);let Q=[...s[0]][0].length,E=e.slice(0,g+s.index+Q+b);if(Math.min(g,b)%2){let F=E.slice(1,-1);return{type:\"em\",raw:E,text:F,tokens:this.lexer.inlineTokens(F)}}let j=E.slice(2,-2);return{type:\"strong\",raw:E,text:j,tokens:this.lexer.inlineTokens(j)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal,\" \"),s=this.rules.other.nonSpaceChar.test(n),r=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return s&&r&&(n=n.substring(1,n.length-1)),{type:\"codespan\",raw:t[0],text:n}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:\"br\",raw:t[0]}}del(e,t,n=\"\"){let s=this.rules.inline.delLDelim.exec(e);if(!s)return;if(!(s[1]||\"\")||!n||this.rules.inline.punctuation.exec(n)){let o=[...s[0]].length-1,i,l,u=o,h=this.rules.inline.delRDelim;for(h.lastIndex=0,t=t.slice(-1*e.length+o);(s=h.exec(t))!==null;){if(i=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!i||(l=[...i].length,l!==o))continue;if(s[3]||s[4]){u+=l;continue}if(u-=l,u>0)continue;l=Math.min(l,l+u);let p=[...s[0]][0].length,d=e.slice(0,o+s.index+p+l),g=d.slice(o,-o);return{type:\"del\",raw:d,text:g,tokens:this.lexer.inlineTokens(g)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let n,s;return t[2]===\"@\"?(n=t[1],s=\"mailto:\"+n):(n=t[1],s=n),{type:\"link\",raw:t[0],text:n,href:s,autolink:!0,tokens:[{type:\"text\",raw:n,text:n}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let n,s;if(t[2]===\"@\")n=t[0],s=\"mailto:\"+n;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??\"\";while(r!==t[0]);n=t[0],t[1]===\"www.\"?s=\"http://\"+t[0]:s=t[0]}return{type:\"link\",raw:t[0],text:n,href:s,autolink:!0,tokens:[{type:\"text\",raw:n,text:n}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let n=this.lexer.state.inRawBlock;return{type:\"text\",raw:t[0],text:n?t[0]:Se(t[0]),escaped:n}}}};var O=class a{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||y,this.options.tokenizer=this.options.tokenizer||new _,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,linkEmitted:!1,linkParenPossible:!0,top:!0};let t={other:T,block:X.normal,inline:G.normal};this.options.pedantic?(t.block=X.pedantic,t.inline=G.pedantic):this.options.gfm&&(t.block=X.gfm,this.options.breaks?t.inline=G.breaks:t.inline=G.gfm),this.tokenizer.rules=t}static get rules(){return{block:X,inline:G}}static lex(e,t){return new a(t).lex(e)}static lexInline(e,t){return new a(t).inlineTokens(e)}lex(e){e=e.replace(T.carriageReturn,`\n`),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){let n=this.inlineQueue[t];this.state.inRawBlock=!1,this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(T.tabCharGlobal,\" \").replace(T.spaceLine,\"\"));let s=1/0;for(;e;){if(e.length<s)s=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}let r;if(this.options.extensions?.block?.some(i=>(r=i.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length);let i=t.at(-1);r.raw.length===1&&i!==void 0?i.raw+=`\n`:t.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length);let i=t.at(-1);i?.type===\"paragraph\"||i?.type===\"text\"?(i.raw+=(i.raw.endsWith(`\n`)?\"\":`\n`)+r.raw,i.text+=`\n`+r.text,this.inlineQueue.at(-1).src=i.text):t.push(r);continue}if(r=this.tokenizer.fences(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.heading(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.hr(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.blockquote(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.list(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.html(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length);let i=t.at(-1);i?.type===\"paragraph\"||i?.type===\"text\"?(i.raw+=(i.raw.endsWith(`\n`)?\"\":`\n`)+r.raw,i.text+=`\n`+r.raw,this.inlineQueue.at(-1).src=i.text):(this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title}),t.push(r));continue}if(r=this.tokenizer.table(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.lheading(e)){e=e.substring(r.raw.length),t.push(r);continue}let o=e;if(this.options.extensions?.startBlock){let i=1/0,l=e.slice(1),u;this.options.extensions.startBlock.forEach(h=>{u=h.call({lexer:this},l),typeof u==\"number\"&&u>=0&&(i=Math.min(i,u))}),i<1/0&&i>=0&&(o=e.substring(0,i+1))}if(this.state.top&&(r=this.tokenizer.paragraph(o))){let i=t.at(-1);n&&i?.type===\"paragraph\"?(i.raw+=(i.raw.endsWith(`\n`)?\"\":`\n`)+r.raw,i.text+=`\n`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=i.text):t.push(r),n=o.length!==e.length,e=e.substring(r.raw.length);continue}if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length);let i=t.at(-1);i?.type===\"text\"?(i.raw+=(i.raw.endsWith(`\n`)?\"\":`\n`)+r.raw,i.text+=`\n`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=i.text):t.push(r);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}linkInText(e){if(!e.includes(\"[\"))return!1;let t=this.tokenizer.rules.inline.link;for(let n of e.matchAll(this.tokenizer.rules.inline.blockSkip))if(t.test(n[0])&&e.charAt(n.index-1)!==\"!\")return!0;for(let n of e.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let s=n[0],r=s.lastIndexOf(\"[\");if(!(s.charAt(0)===\"!\"||!Object.hasOwn(this.tokens.links,N(s.slice(r+1,-1))))&&!(r>1&&this.linkInText(s.slice(1,r-1))))return!0}return!1}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let n=this.state.linkParenPossible;this.state.linkParenPossible=n&&e.includes(\")\");try{return this.#e(e,t)}finally{this.state.linkParenPossible=n}}#e(e,t){let n=e.includes(\"*\")||e.includes(\"_\")||e.includes(\"~\")||this.options.hooks?.emStrongMask||this.tokenizer.emStrong!==_.prototype.emStrong||this.tokenizer.del!==_.prototype.del?this.#t(e):e,s=!1,r=\"\",o=1/0;for(;e;){if(e.length<o)o=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}s||(r=\"\"),s=!1;let i;if(this.options.extensions?.inline?.some(u=>(i=u.call({lexer:this},e,t))?(e=e.substring(i.raw.length),t.push(i),!0):!1))continue;if(i=this.tokenizer.escape(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.tag(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.link(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(i.raw.length);let u=t.at(-1);i.type===\"text\"&&u?.type===\"text\"?(u.raw+=i.raw,u.text+=i.text):t.push(i);continue}if(i=this.tokenizer.emStrong(e,n,r)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.codespan(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.br(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.del(e,n,r)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.autolink(e)){e=e.substring(i.raw.length),t.push(i);continue}if(!this.state.inLink&&(i=this.tokenizer.url(e))){e=e.substring(i.raw.length),t.push(i);continue}let l=e;if(this.options.extensions?.startInline){let u=1/0,h=e.slice(1),p;this.options.extensions.startInline.forEach(d=>{p=d.call({lexer:this},h),typeof p==\"number\"&&p>=0&&(u=Math.min(u,p))}),u<1/0&&u>=0&&(l=e.substring(0,u+1))}if(i=this.tokenizer.inlineText(l)){e=e.substring(i.raw.length),i.raw.slice(-1)!==\"_\"&&(r=i.raw.slice(-1)),s=!0;let u=t.at(-1);u?.type===\"text\"?(u.raw+=i.raw,u.text+=i.text):t.push(i);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return t}#t(e){let t=e;if(this.tokens.links&&e.includes(\"[\")){let n=this.tokenizer.rules.inline.reflinkSearch,s=r=>{let o=r.lastIndexOf(\"[\");if(!Object.hasOwn(this.tokens.links,N(r.slice(o+1,-1))))return r;if(o>1&&r.charAt(0)!==\"!\"){let i=r.slice(1,o-1);if(this.linkInText(i))return\"[\"+i.replace(n,s)+\"][\"+\"a\".repeat(r.length-o-2)+\"]\"}return\"[\"+\"a\".repeat(r.length-2)+\"]\"};t=t.replace(n,s)}return t=t.replace(this.tokenizer.rules.inline.anyPunctuationOutsideCode,(n,s,r)=>r?\"+\".repeat(n.length):s?s+n.slice(s.length,-s.length).replace(/`/g,\"+\")+s:n),t=t.replace(this.tokenizer.rules.inline.blockSkip,(n,s,r)=>{let o=r?r.length:0;return n.slice(0,o)+\"[\"+\"a\".repeat(n.length-o-2)+\"]\"}),t=this.options.hooks?.emStrongMask?.call({lexer:this},t)??t,t}infiniteLoopError(e){let t=\"Infinite loop on byte: \"+e;if(this.options.silent)console.error(t);else throw new Error(t)}};var L=class{options;parser;constructor(e){this.options=e||y}space(e){return\"\"}code({text:e,lang:t,escaped:n}){let s=(t||\"\").match(T.notSpaceStart)?.[0],r=e?e.replace(T.endingNewline,\"\")+`\n`:\"\";return s?'<pre><code class=\"language-'+P(s)+'\">'+(n?r:P(r,!0))+`</code></pre>\n`:\"<pre><code>\"+(n?r:P(r,!0))+`</code></pre>\n`}blockquote({tokens:e}){return`<blockquote>\n${this.parser.parse(e)}</blockquote>\n`}html({text:e}){return e}def(e){return\"\"}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>\n`}hr(e){return`<hr>\n`}list(e){let t=e.ordered,n=e.start,s=\"\";for(let i=0;i<e.items.length;i++){let l=e.items[i];s+=this.listitem(l)}let r=t?\"ol\":\"ul\",o=t&&n!==1?' start=\"'+n+'\"':\"\";return\"<\"+r+o+`>\n`+s+\"</\"+r+`>\n`}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>\n`}checkbox({checked:e}){return\"<input \"+(e?'checked=\"\" ':\"\")+'disabled=\"\" type=\"checkbox\"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>\n`}table(e){let t=\"\",n=\"\";for(let r=0;r<e.header.length;r++)n+=this.tablecell(e.header[r]);t+=this.tablerow({text:n});let s=\"\";for(let r=0;r<e.rows.length;r++){let o=e.rows[r];n=\"\";for(let i=0;i<o.length;i++)n+=this.tablecell(o[i]);s+=this.tablerow({text:n})}return s&&(s=`<tbody>${s}</tbody>`),`<table>\n<thead>\n`+t+`</thead>\n`+s+`</table>\n`}tablerow({text:e}){return`<tr>\n${e}</tr>\n`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?\"th\":\"td\";return(e.align?`<${n} align=\"${e.align}\">`:`<${n}>`)+t+`</${n}>\n`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${P(e,!0)}</code>`}br(e){return\"<br>\"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,text:n,tokens:s,autolink:r}){let o=r?P(n,!0):this.parser.parseInline(s),i=le(e);if(i===null)return o;e=P(i,r);let l='<a href=\"'+e+'\"';return t&&(l+=' title=\"'+P(t)+'\"'),l+=\">\"+o+\"</a>\",l}image({href:e,title:t,text:n,tokens:s}){s&&(n=this.parser.parseInline(s,this.parser.textRenderer));let r=le(e);if(r===null)return P(n);e=r;let o=`<img src=\"${P(e)}\" alt=\"${P(n)}\"`;return t&&(o+=` title=\"${P(t)}\"`),o+=\">\",o}text(e){return\"tokens\"in e&&e.tokens?this.parser.parseInline(e.tokens):\"escaped\"in e&&e.escaped?e.text:P(e.text)}};var M=class{parser;strong({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}em({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}codespan({text:e}){return e}del({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}html({text:e}){return e}text({text:e}){return e}link({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}image({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}br(){return\"\"}checkbox({raw:e}){return e}};var w=class a{options;renderer;textRenderer;constructor(e){this.options=e||y,this.options.renderer=this.options.renderer||new L,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new M,this.textRenderer.parser=this}static parse(e,t){return new a(t).parse(e)}static parseInline(e,t){return new a(t).parseInline(e)}parse(e){this.renderer.parser=this;let t=\"\";for(let n=0;n<e.length;n++){let s=e[n];if(this.options.extensions?.renderers?.[s.type]){let o=s,i=this.options.extensions.renderers[o.type].call({parser:this},o);if(i!==!1||![\"space\",\"hr\",\"heading\",\"code\",\"table\",\"blockquote\",\"list\",\"checkbox\",\"html\",\"def\",\"paragraph\",\"text\"].includes(o.type)){t+=i||\"\";continue}}let r=s;switch(r.type){case\"space\":{t+=this.renderer.space(r);break}case\"hr\":{t+=this.renderer.hr(r);break}case\"heading\":{t+=this.renderer.heading(r);break}case\"code\":{t+=this.renderer.code(r);break}case\"table\":{t+=this.renderer.table(r);break}case\"blockquote\":{t+=this.renderer.blockquote(r);break}case\"list\":{t+=this.renderer.list(r);break}case\"checkbox\":{t+=this.renderer.checkbox(r);break}case\"html\":{t+=this.renderer.html(r);break}case\"def\":{t+=this.renderer.def(r);break}case\"paragraph\":{t+=this.renderer.paragraph(r);break}case\"text\":{t+=this.renderer.text(r);break}default:{let o='Token with \"'+r.type+'\" type was not found.';if(this.options.silent)return console.error(o),\"\";throw new Error(o)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let n=\"\";for(let s=0;s<e.length;s++){let r=e[s];if(this.options.extensions?.renderers?.[r.type]){let i=this.options.extensions.renderers[r.type].call({parser:this},r);if(i!==!1||![\"escape\",\"html\",\"link\",\"image\",\"checkbox\",\"strong\",\"em\",\"codespan\",\"br\",\"del\",\"text\"].includes(r.type)){n+=i||\"\";continue}}let o=r;switch(o.type){case\"escape\":{n+=t.text(o);break}case\"html\":{n+=t.html(o);break}case\"link\":{n+=t.link(o);break}case\"image\":{n+=t.image(o);break}case\"checkbox\":{n+=t.checkbox(o);break}case\"strong\":{n+=t.strong(o);break}case\"em\":{n+=t.em(o);break}case\"codespan\":{n+=t.codespan(o);break}case\"br\":{n+=t.br(o);break}case\"del\":{n+=t.del(o);break}case\"text\":{n+=t.text(o);break}default:{let i='Token with \"'+o.type+'\" type was not found.';if(this.options.silent)return console.error(i),\"\";throw new Error(i)}}}return n}};var A=class{options;block;constructor(e){this.options=e||y}static passThroughHooks=new Set([\"preprocess\",\"postprocess\",\"processAllTokens\",\"emStrongMask\"]);static passThroughHooksRespectAsync=new Set([\"preprocess\",\"postprocess\",\"processAllTokens\"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?O.lex:O.lexInline}provideParser(e=this.block){return e?w.parse:w.parseInline}};function D(a,e){if(Array.isArray(e))for(let t=0;t<e.length;t++)a.push(e[t]);else a.push(e)}var J=class{defaults=v();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=w;Renderer=L;TextRenderer=M;Lexer=O;Tokenizer=_;Hooks=A;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let s of e)switch(D(n,t.call(this,s)),s.type){case\"table\":{let r=s;for(let o of r.header)D(n,this.walkTokens(o.tokens,t));for(let o of r.rows)for(let i of o)D(n,this.walkTokens(i.tokens,t));break}case\"list\":{let r=s;D(n,this.walkTokens(r.items,t));break}default:{let r=s;this.defaults.extensions?.childTokens?.[r.type]?this.defaults.extensions.childTokens[r.type].forEach(o=>{let i=r[o].flat(1/0);D(n,this.walkTokens(i,t))}):r.tokens&&D(n,this.walkTokens(r.tokens,t))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{let s={...n};if(s.async=this.defaults.async||s.async||!1,n.extensions&&(n.extensions.forEach(r=>{if(!r.name)throw new Error(\"extension name required\");if(\"renderer\"in r){let o=t.renderers[r.name];o?t.renderers[r.name]=function(...i){let l=r.renderer.apply(this,i);return l===!1&&(l=o.apply(this,i)),l}:t.renderers[r.name]=r.renderer}if(\"tokenizer\"in r){if(!r.level||r.level!==\"block\"&&r.level!==\"inline\")throw new Error(\"extension level must be 'block' or 'inline'\");let o=t[r.level];o?o.unshift(r.tokenizer):t[r.level]=[r.tokenizer],r.start&&(r.level===\"block\"?t.startBlock?t.startBlock.push(r.start):t.startBlock=[r.start]:r.level===\"inline\"&&(t.startInline?t.startInline.push(r.start):t.startInline=[r.start]))}\"childTokens\"in r&&r.childTokens&&(t.childTokens[r.name]=r.childTokens)}),s.extensions=t),n.renderer){let r=this.defaults.renderer||new L(this.defaults);for(let o in n.renderer){if(!(o in r))throw new Error(`renderer '${o}' does not exist`);if([\"options\",\"parser\"].includes(o))continue;let i=o,l=n.renderer[i],u=r[i];r[i]=(...h)=>{let p=l.apply(r,h);return p===!1&&(p=u.apply(r,h)),p||\"\"}}s.renderer=r}if(n.tokenizer){let r=this.defaults.tokenizer||new _(this.defaults);for(let o in n.tokenizer){if(!(o in r))throw new Error(`tokenizer '${o}' does not exist`);if([\"options\",\"rules\",\"lexer\"].includes(o))continue;let i=o,l=n.tokenizer[i],u=r[i];r[i]=(...h)=>{let p=l.apply(r,h);return p===!1&&(p=u.apply(r,h)),p}}s.tokenizer=r}if(n.hooks){let r=this.defaults.hooks||new A;for(let o in n.hooks){if(!(o in r))throw new Error(`hook '${o}' does not exist`);if([\"options\",\"block\"].includes(o))continue;let i=o,l=n.hooks[i],u=r[i];A.passThroughHooks.has(o)?r[i]=h=>{if(r.options.async&&A.passThroughHooksRespectAsync.has(o))return(async()=>{let d=await l.call(r,h);return u.call(r,d)})();let p=l.call(r,h);return u.call(r,p)}:r[i]=(...h)=>{if(r.options.async)return(async()=>{let d=await l.apply(r,h);return d===!1&&(d=await u.apply(r,h)),d})();let p=l.apply(r,h);return p===!1&&(p=u.apply(r,h)),p}}s.hooks=r}if(n.walkTokens){let r=this.defaults.walkTokens,o=n.walkTokens;s.walkTokens=function(i){let l=[];return l.push(o.call(this,i)),r&&D(l,r.call(this,i)),l}}this.defaults={...this.defaults,...s}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return O.lex(e,t??this.defaults)}parser(e,t){return w.parse(e,t??this.defaults)}parseMarkdown(e){return(n,s)=>{let r={...s},o={...this.defaults,...r},i=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&r.async===!1)return i(new Error(\"marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.\"));if(typeof n>\"u\"||n===null)return i(new Error(\"marked(): input parameter is undefined or null\"));if(typeof n!=\"string\")return i(new Error(\"marked(): input parameter is of type \"+Object.prototype.toString.call(n)+\", string expected\"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=e),o.async)return(async()=>{let l=o.hooks?await o.hooks.preprocess(n):n,h=await(o.hooks?await o.hooks.provideLexer(e):e?O.lex:O.lexInline)(l,o),p=o.hooks?await o.hooks.processAllTokens(h):h;o.walkTokens&&await Promise.all(this.walkTokens(p,o.walkTokens));let g=await(o.hooks?await o.hooks.provideParser(e):e?w.parse:w.parseInline)(p,o);return o.hooks?await o.hooks.postprocess(g):g})().catch(i);try{o.hooks&&(n=o.hooks.preprocess(n));let u=(o.hooks?o.hooks.provideLexer(e):e?O.lex:O.lexInline)(n,o);o.hooks&&(u=o.hooks.processAllTokens(u)),o.walkTokens&&this.walkTokens(u,o.walkTokens);let p=(o.hooks?o.hooks.provideParser(e):e?w.parse:w.parseInline)(u,o);return o.hooks&&(p=o.hooks.postprocess(p)),p}catch(l){return i(l)}}}onError(e,t){return n=>{if(n.message+=`\nPlease report this to https://github.com/markedjs/marked.`,e){let s=\"<p>An error occurred:</p><pre>\"+P(n.message+\"\",!0)+\"</pre>\";return t?Promise.resolve(s):s}if(t)return Promise.reject(n);throw n}}};var q=new J;function m(a,e){return q.parse(a,e)}m.options=m.setOptions=function(a){return q.setOptions(a),m.defaults=q.defaults,ee(m.defaults),m};m.getDefaults=v;m.defaults=y;function zt(...a){return q.use(...a),m.defaults=q.defaults,ee(m.defaults),m}m.use=zt;m.walkTokens=function(a,e){return q.walkTokens(a,e)};m.parseInline=q.parseInline;m.Parser=w;m.parser=w.parse;m.Renderer=L;m.TextRenderer=M;m.Lexer=O;m.lexer=O.lex;m.Tokenizer=_;m.Hooks=A;m.parse=m;var Tn=m.options,On=m.setOptions,wn=m.walkTokens,Pn=m.parseInline,yn=m,Sn=w.parse,_n=O.lex;export{A as Hooks,O as Lexer,J as Marked,w as Parser,L as Renderer,M as TextRenderer,_ as Tokenizer,y as defaults,v as getDefaults,_n as lexer,m as marked,Tn as options,yn as parse,Pn as parseInline,Sn as parser,On as setOptions,zt as use,wn as walkTokens};\n//# sourceMappingURL=marked.esm.js.map\n","/**\n * A GitHub pull request or issue named in a message: what a link to one looks\n * like, what the server answers about it, and how each state is drawn. Shared\n * by the server that reads GitHub and the transcript that draws the chip.\n */\n\nexport type GithubRefKind = 'pull' | 'issue';\nexport type GithubRefState = 'open' | 'draft' | 'merged' | 'closed';\n\n/** What GitHub says about one pull request or issue. */\nexport interface GithubRef {\n\t/** `owner/name`. */\n\trepo: string;\n\tnumber: number;\n\tkind: GithubRefKind;\n\ttitle: string;\n\tstate: GithubRefState;\n\tdraft: boolean;\n\t/** The login of whoever opened it. */\n\tauthor: string | null;\n\t/** When it last changed, in ms. */\n\tupdated_at: number | null;\n\turl: string;\n}\n\n/** Where a link points, read off its URL alone. */\nexport interface GithubRefTarget {\n\trepo: string;\n\tnumber: number;\n\tkind: GithubRefKind;\n}\n\nconst OWNER = String.raw`[A-Za-z0-9](?:[A-Za-z0-9-]{0,38})`;\nconst NAME = String.raw`[A-Za-z0-9._-]{1,100}`;\nconst SLUG = new RegExp(`^${OWNER}/(${NAME})$`);\n/** A pull request or issue, with whatever GitHub hangs after it (`/files`, `#issuecomment-1`). */\nconst REF_URL = new RegExp(\n\tString.raw`^https?://(?:www\\.)?github\\.com/(${OWNER}/${NAME})/(pull|issues)/([1-9]\\d{0,8})(?:[/?#].*)?$`\n);\n\n/** Whether `slug` is an `owner/name` and nothing else, safe to put in an API path. */\nexport function isRepoSlug(slug: string): boolean {\n\tconst name = SLUG.exec(slug)?.[1];\n\treturn name !== undefined && name !== '.' && name !== '..';\n}\n\n/** A pull request or issue number as written in a query: digits, no sign, no zero. */\nexport function parseRefNumber(text: string | null | undefined): number | null {\n\treturn text && /^[1-9]\\d{0,8}$/.test(text) ? Number(text) : null;\n}\n\n/** The pull request or issue a URL points at, or null for any other URL. */\nexport function parseGithubRefUrl(href: string): GithubRefTarget | null {\n\tconst m = REF_URL.exec(href);\n\tif (!m || !isRepoSlug(m[1])) return null;\n\treturn { repo: m[1], number: Number(m[3]), kind: m[2] === 'pull' ? 'pull' : 'issue' };\n}\n\n/** Whether a link's text is only a name for its target (`#12`, `owner/name#12`), not words of the author's. */\nexport function isRefShorthand(text: string, target: GithubRefTarget): boolean {\n\tconst t = text.trim();\n\treturn t === `#${target.number}` || t.toLowerCase() === `${target.repo}#${target.number}`.toLowerCase();\n}\n\nexport interface GithubRefVisual {\n\ticon: string;\n\tcolor: string;\n\tlabel: string;\n}\n\n// Emerald is the palette's \"going well\", violet its \"work a session did\", grey\n// what recedes. Amber is left out on purpose: it is reserved for what wants a\n// person, and no state of a pull request does.\nconst PULL: Record<GithubRefState, GithubRefVisual> = {\n\topen: { icon: 'mdi:source-pull', color: '#34d399', label: 'Open' },\n\tdraft: { icon: 'mdi:source-pull', color: '#a8a29e', label: 'Draft' },\n\tmerged: { icon: 'mdi:source-merge', color: '#c4b5fd', label: 'Merged' },\n\tclosed: { icon: 'mdi:source-pull', color: '#f87171', label: 'Closed' }\n};\nconst ISSUE_OPEN: GithubRefVisual = { icon: 'mdi:record-circle-outline', color: '#34d399', label: 'Open' };\nconst ISSUE_CLOSED: GithubRefVisual = { icon: 'mdi:check-circle-outline', color: '#c4b5fd', label: 'Closed' };\n\n/** The icon, colour and word for a pull request's or issue's state. */\nexport function githubRefVisual(ref: Pick<GithubRef, 'kind' | 'state'>): GithubRefVisual {\n\tif (ref.kind === 'pull') return PULL[ref.state];\n\treturn ref.state === 'open' ? ISSUE_OPEN : ISSUE_CLOSED;\n}\n","/**\n * Telling a file path from the rest of a message. A path may carry a line\n * (`src/tmux/pane.ts:120`, `:120:5`, `:120-140`), which is split off. What\n * counts as a path is decided by its last part being a file's name, so\n * that `and/or`, `origin/main`, `/api/sessions` and `v0.30.8` stay prose.\n */\n\nexport interface FilePath {\n\tpath: string;\n\tline: number | null;\n}\n\n/** A path found in a run of text, with where it sits. */\nexport interface FilePathHit extends FilePath {\n\tstart: number;\n\tend: number;\n}\n\n/** A path's trailing `:line`, `:line:col` or `:from-to`. */\nconst LINE = String.raw`:(\\d+)(?::\\d+)?(?:-\\d+)?`;\nconst LINE_SUFFIX = new RegExp(`${LINE}$`);\n\n/** The characters a path is made of; brackets, parentheses and `+` for SvelteKit's routes. */\nconst PATH_CHARS = /^[\\w.@+~$()[\\]/-]+$/;\n\n/** The extensions a file's name ends in. An open list would take `owner/repo.git` and `release-1.x` for files. */\nconst EXTENSIONS = new Set(\n\t(\n\t\t'ts mts cts tsx js mjs cjs jsx svelte vue astro html htm xml svg css scss less json jsonl jsonc ' +\n\t\t'md mdx markdown rst txt py rb php java kt swift cs c h cc cpp hpp rs go lua sh bash zsh fish ' +\n\t\t'yml yaml toml ini cfg conf lock csv tsv sql diff patch ' +\n\t\t'png jpg jpeg gif webp ico pdf ipynb proto graphql tf nix service'\n\t).split(' ')\n);\n\n/** File names that carry no extension. */\nconst BARE_NAMES = new Set(['Makefile', 'Dockerfile', 'LICENSE', 'Procfile', 'Gemfile', 'Rakefile', 'Justfile']);\n\n/** Dotfiles, by how their name starts: `.env.local`, `.eslintrc.cjs`. Any other `.word` is a property or a CSS class. */\nconst DOTFILE =\n\t/^\\.(?:env|gitignore|gitattributes|gitmodules|dockerignore|npmrc|nvmrc|editorconfig|eslintrc|eslintignore|prettierrc|prettierignore|bashrc|zshrc|profile)(?:\\.[\\w.-]+)?$/;\n\n/** A first part that names a host, as in `github.com/owner/repo/a.ts`. */\nconst HOST = /^[\\w-]+(?:\\.[\\w-]+)*\\.(?:com|org|net|io|dev|ai|app|co)$/i;\n\n/** Whether a path's last part is a file's name. */\nfunction namesFile(name: string): boolean {\n\tif (BARE_NAMES.has(name) || DOTFILE.test(name)) return true;\n\tconst ext = /[\\w)\\]]\\.([A-Za-z][A-Za-z0-9]*)$/.exec(name)?.[1];\n\treturn ext !== undefined && EXTENSIONS.has(ext.toLowerCase());\n}\n\n/**\n * The path and line `text` is, or null when it is something else. With\n * `needDirectory` a bare file name is not enough, which is how plain prose is\n * read: there `Node.js` is a name, not a file.\n */\nexport function parseFilePath(text: string, needDirectory = false): FilePath | null {\n\tconst suffix = LINE_SUFFIX.exec(text);\n\tconst path = suffix ? text.slice(0, suffix.index) : text;\n\tif (!path || path.length > 400 || !PATH_CHARS.test(path)) return null;\n\tif (path.startsWith('//') || path.endsWith('/')) return null;\n\tconst parts = path.split('/');\n\tconst inDirectory = parts.length > 1;\n\tif (needDirectory && !inDirectory) return null;\n\tif (inDirectory && HOST.test(parts[0])) return null;\n\tif (!namesFile(parts[parts.length - 1])) return null;\n\treturn { path, line: suffix ? Number(suffix[1]) || null : null };\n}\n\n/**\n * Something shaped like a path with a directory in it, not starting inside a\n * word, a URL or another path. Parentheses are left out, since in prose they\n * are far more often around a path than in one. The second lookbehind skips a\n * start inside a run of `+`, which the start before it has already covered:\n * without it a long run with no `/` is scanned once from every `+` in it.\n */\nconst IN_PROSE = new RegExp(\n\tString.raw`(?<![\\w@.~/:$[\\]-])(?<!\\+(?=[\\w.@+$[\\]-]))(?:~\\/|\\.{1,2}\\/|\\/)?[\\w.@+$[\\]-]+(?:\\/[\\w.@+$[\\]-]+)+(?:${LINE})?`,\n\t'g'\n);\n\n/** The file paths in a run of plain text, in order, with where each sits. */\nexport function findFilePaths(text: string): FilePathHit[] {\n\tconst found: FilePathHit[] = [];\n\tfor (const m of text.matchAll(IN_PROSE)) {\n\t\t// The full stop that ends a sentence is not the path's.\n\t\tconst candidate = m[0].replace(/\\.+$/, '');\n\t\tconst hit = parseFilePath(candidate, true);\n\t\tif (hit) found.push({ ...hit, start: m.index, end: m.index + candidate.length });\n\t}\n\treturn found;\n}\n","/**\n * What a pull request's or issue's body needs beyond the transcript's\n * markdown: GitHub's alerts, and the HTML people and bots write into a body\n * (`<details>`, `<img>`, `<br>`, `<sub>`…), kept to tags and attributes that\n * can only draw, never run or reach out except through the media function.\n */\n\nimport type { Token, Tokens } from 'marked';\n\nexport type AlertKind = 'note' | 'tip' | 'important' | 'warning' | 'caution';\n\nexport const GITHUB_ALERTS: Record<AlertKind, string> = {\n\tnote: 'Note',\n\ttip: 'Tip',\n\timportant: 'Important',\n\twarning: 'Warning',\n\tcaution: 'Caution'\n};\n\n/** Where an image is drawn from, given the address the body wrote; null leaves it out. */\nexport type MediaHref = (url: string) => string | null;\n\n/** The marker on a quote's first line, alone on it: GitHub's rule for an alert. */\nconst ALERT_MARK = /^\\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\\][ \\t]*(?:\\n|$)/i;\n\n/**\n * Mark each quote that opens with `[!NOTE]` (or TIP, IMPORTANT, WARNING,\n * CAUTION) alone on its first line as that alert, and take the marker out.\n * A marker with text after it on the same line leaves a plain quote.\n */\nexport function markAlerts(tokens: Token[]): void {\n\tfor (const t of tokens) {\n\t\tif (t.type !== 'blockquote') continue;\n\t\tconst quote = t as Tokens.Blockquote & { alert?: AlertKind };\n\t\tconst first = quote.tokens[0];\n\t\tif (first?.type !== 'paragraph') {\n\t\t\tmarkAlerts(quote.tokens);\n\t\t\tcontinue;\n\t\t}\n\t\tconst para = first as Tokens.Paragraph;\n\t\tconst lead = para.tokens[0];\n\t\tconst mark = lead?.type === 'text' ? ALERT_MARK.exec((lead as Tokens.Text).text) : null;\n\t\tif (!mark) continue;\n\t\tquote.alert = mark[1].toLowerCase() as AlertKind;\n\t\tconst rest = (lead as Tokens.Text).text.slice(mark[0].length);\n\t\tif (rest) {\n\t\t\tpara.tokens[0] = { ...lead, raw: rest, text: rest } as Tokens.Text;\n\t\t} else {\n\t\t\tpara.tokens.shift();\n\t\t\tif (para.tokens.length === 0) quote.tokens.shift();\n\t\t}\n\t}\n}\n\n/** Tags a body may keep, with the attributes each may carry. */\nconst ALLOWED: Record<string, readonly string[]> = {\n\tdetails: ['open'],\n\tsummary: [],\n\tbr: [],\n\thr: [],\n\tp: ['align'],\n\tdiv: ['align'],\n\tspan: [],\n\tsub: [],\n\tsup: [],\n\tb: [],\n\tstrong: [],\n\ti: [],\n\tem: [],\n\ts: [],\n\tdel: [],\n\tins: [],\n\tu: [],\n\tmark: [],\n\tsmall: [],\n\tcode: [],\n\tkbd: [],\n\tpre: [],\n\tblockquote: [],\n\tul: [],\n\tol: ['start'],\n\tli: [],\n\tdl: [],\n\tdt: [],\n\tdd: [],\n\ttable: [],\n\tthead: [],\n\ttbody: [],\n\ttr: [],\n\tth: ['align', 'colspan', 'rowspan'],\n\ttd: ['align', 'colspan', 'rowspan'],\n\th1: [],\n\th2: [],\n\th3: [],\n\th4: [],\n\th5: [],\n\th6: [],\n\timg: ['src', 'alt', 'width', 'height', 'title'],\n\ta: ['href', 'title']\n};\n\nconst VOID = new Set(['br', 'hr', 'img']);\n\nfunction escapeText(text: string): string {\n\treturn text\n\t\t.replace(/&(?!#?\\w+;)/g, '&')\n\t\t.replaceAll('<', '<')\n\t\t.replaceAll('>', '>');\n}\n\nfunction decodeAttr(value: string): string {\n\treturn value\n\t\t.replaceAll('"', '\"')\n\t\t.replaceAll(''', \"'\")\n\t\t.replaceAll('<', '<')\n\t\t.replaceAll('>', '>')\n\t\t.replaceAll('&', '&');\n}\n\nfunction escapeAttr(value: string): string {\n\treturn value.replaceAll('&', '&').replaceAll('\"', '"').replaceAll('<', '<').replaceAll('>', '>');\n}\n\nfunction isWebUrl(url: string): boolean {\n\treturn /^https?:\\/\\//i.test(url);\n}\n\nconst ATTR = /([^\\s=/\"'>]+)(?:\\s*=\\s*(?:\"([^\"]*)\"|'([^']*)'|([^\\s\"'>]+)))?/g;\n\n/** One tag rebuilt from what it may carry, or null when it may not stay. */\nfunction rebuildTag(name: string, closing: boolean, attrs: string, media: MediaHref): string | null {\n\tconst allowed = ALLOWED[name];\n\tif (!allowed) return null;\n\tif (closing) return VOID.has(name) ? '' : `</${name}>`;\n\tconst kept: string[] = [];\n\tfor (const m of attrs.matchAll(ATTR)) {\n\t\tconst attr = m[1].toLowerCase();\n\t\tif (!allowed.includes(attr)) continue;\n\t\tconst value = decodeAttr(m[2] ?? m[3] ?? m[4] ?? '');\n\t\tif (attr === 'src') {\n\t\t\tconst src = isWebUrl(value) ? media(value) : null;\n\t\t\tif (!src) return name === 'img' ? '' : null;\n\t\t\tkept.push(`src=\"${escapeAttr(src)}\"`);\n\t\t} else if (attr === 'href') {\n\t\t\tif (isWebUrl(value) || value.startsWith('#')) kept.push(`href=\"${escapeAttr(value)}\"`);\n\t\t} else if (attr === 'open') {\n\t\t\tkept.push('open');\n\t\t} else {\n\t\t\tkept.push(`${attr}=\"${escapeAttr(value)}\"`);\n\t\t}\n\t}\n\tif (name === 'img') {\n\t\tif (!kept.some((a) => a.startsWith('src='))) return '';\n\t\tkept.push('loading=\"lazy\"');\n\t}\n\tif (name === 'a') kept.push('target=\"_blank\"', 'rel=\"noopener\"');\n\treturn `<${name}${kept.length ? ' ' + kept.join(' ') : ''}>`;\n}\n\nconst PIECE = /<!--[\\s\\S]*?(?:-->|$)|<(\\/?)([a-zA-Z][\\w-]*)((?:[^>\"']|\"[^\"]*\"|'[^']*')*)\\/?>/g;\n\n/**\n * Raw HTML from a body, kept to the tags in `ALLOWED` with only their\n * allowed attributes; comments are dropped, links open in a new tab, an\n * image's address goes through `media`, and every other tag is shown as the\n * text it was written as.\n */\nexport function sanitizeGithubHtml(raw: string, media: MediaHref): string {\n\tlet out = '';\n\tlet at = 0;\n\tfor (const m of raw.matchAll(PIECE)) {\n\t\tout += escapeText(raw.slice(at, m.index));\n\t\tat = m.index + m[0].length;\n\t\tif (m[0].startsWith('<!--')) continue;\n\t\tconst tag = rebuildTag(m[2].toLowerCase(), m[1] === '/', m[3], media);\n\t\tout += tag ?? escapeText(m[0]);\n\t}\n\treturn out + escapeText(raw.slice(at));\n}\n","import { Marked, type MarkedOptions, type Token, type Tokens } from 'marked';\nimport { isRefShorthand, parseGithubRefUrl } from '$shared/github-ref.js';\nimport { findFilePaths, parseFilePath, type FilePath } from './file-paths';\nimport { GITHUB_ALERTS, markAlerts, sanitizeGithubHtml, type AlertKind, type MediaHref } from './github-html';\n\nfunction escapeHtml(text: string): string {\n\treturn text\n\t\t.replaceAll('&', '&')\n\t\t.replaceAll('<', '<')\n\t\t.replaceAll('>', '>')\n\t\t.replaceAll('\"', '"');\n}\n\n/** Split every soft newline in a run of inline tokens into a hard break. */\nfunction hardBreak(tokens: Token[]): Token[] {\n\treturn tokens.flatMap((t): Token[] => {\n\t\tif (t.type === 'text' && !t.tokens && t.text.includes('\\n')) {\n\t\t\treturn t.text.split('\\n').flatMap((text: string, i: number): Token[] => [\n\t\t\t\t...(i > 0 ? [{ type: 'br', raw: '\\n' } as Token] : []),\n\t\t\t\t...(text ? [{ ...t, raw: text, text }] : [])\n\t\t\t]);\n\t\t}\n\t\tif ('tokens' in t && t.tokens && t.type !== 'codespan') t.tokens = hardBreak(t.tokens);\n\t\treturn [t];\n\t});\n}\n\n/** Paragraphs, including those quoted, get hard breaks; lists are left alone. */\nfunction breakParagraphs(tokens: Token[]): void {\n\tfor (const t of tokens) {\n\t\tif (t.type === 'paragraph') t.tokens = hardBreak(t.tokens ?? []);\n\t\telse if (t.type === 'blockquote') breakParagraphs(t.tokens ?? []);\n\t}\n}\n\n/** Where a file named in a message opens, given its path and line. */\nexport type FileHref = (path: string, line: number | null) => string;\n\nexport interface MarkdownOptions {\n\t/** Turns a file path into an `a.file-link` to wherever this says the file opens. */\n\tfiles?: FileHref;\n\t/** Marks links to GitHub pull requests and issues as `a.gh-ref`; with `bare`, a `#123` in plain text too. */\n\tgithub?: { bare?: boolean };\n\t/**\n\t * Render as GitHub renders a pull request or issue: its HTML kept to a safe\n\t * few tags (`<details>`, `<img>`, `<br>`…) with comments dropped, `> [!NOTE]`\n\t * alerts drawn as callouts, and each image's address passed through `media`.\n\t */\n\tgithubBody?: { media: MediaHref };\n}\n\n/** A file path found in a message: `text` is what was written, `code` whether in backticks. */\ntype FileLinkToken = Tokens.Generic &\n\tFilePath & { type: 'fileLink'; text: string; code: boolean; href: string };\n\n/**\n * A pull request or issue named in a message. A link to one carries its\n * repo and URL as `link` and, when the author wrote words of their own, those\n * as `tokens`; a bare `#123` carries only the number, and is no link until it\n * resolves.\n */\ntype GithubRefToken = Tokens.Generic & {\n\ttype: 'githubRef';\n\ttext: string;\n\tnumber: number;\n\tlink: { repo: string; href: string } | null;\n\ttokens?: Token[];\n};\n\n/** Something found in a run of plain text, with where it sits. */\ninterface TextHit {\n\tstart: number;\n\tend: number;\n}\n\n/** Cut `hits` out of one plain text token as tokens of their own, keeping the text between. */\nfunction splitText<H extends TextHit>(t: Tokens.Text, hits: H[], make: (text: string, hit: H) => Token): Token[] {\n\tif (hits.length === 0) return [t];\n\tconst out: Token[] = [];\n\tlet at = 0;\n\tconst text = (to: number) => {\n\t\tif (to > at) out.push({ ...t, raw: t.text.slice(at, to), text: t.text.slice(at, to) });\n\t};\n\tfor (const hit of hits) {\n\t\ttext(hit.start);\n\t\tout.push(make(t.text.slice(hit.start, hit.end), hit));\n\t\tat = hit.end;\n\t}\n\ttext(t.text.length);\n\treturn out;\n}\n\n/** What replaces an inline token, or null to leave it and look inside it. */\ntype Rewrite = (t: Token) => Token[] | null;\n\n/** Rewrite the inline tokens of a tree, down through lists and tables. Code blocks have none. */\nfunction rewriteInline(tokens: Token[], rewrite: Rewrite): Token[] {\n\treturn tokens.flatMap((t): Token[] => {\n\t\tconst swapped = rewrite(t);\n\t\tif (swapped) return swapped;\n\t\tif ('tokens' in t && t.tokens) t.tokens = rewriteInline(t.tokens, rewrite);\n\t\tif (t.type === 'list') for (const item of (t as Tokens.List).items) item.tokens = rewriteInline(item.tokens, rewrite);\n\t\tif (t.type === 'table') {\n\t\t\tconst table = t as Tokens.Table;\n\t\t\tfor (const cell of [...table.header, ...table.rows.flat()]) cell.tokens = rewriteInline(cell.tokens, rewrite);\n\t\t}\n\t\treturn [t];\n\t});\n}\n\n/**\n * A `#123` standing on its own: not an HTML entity, a URL's fragment or the\n * tail of a word. Five digits at most, which leaves a colour such as `#111827`\n * alone; a `#333` is told from an issue only by whether GitHub knows it.\n */\nconst BARE_REF = /(?<![\\w&#/])#([1-9]\\d{0,4})(?![\\w-])/g;\n\n/** Whether a token is plain text with nothing nested in it. */\nfunction isPlainText(t: Token): t is Tokens.Text {\n\treturn t.type === 'text' && !('tokens' in t && t.tokens);\n}\n\n/**\n * The rewrite one message's options ask for: a link to a pull request or\n * issue becomes a `githubRef`; an inline code span that is a path and nothing\n * else, and a path in plain text, a `fileLink`; a bare `#123`, a `githubRef`\n * with no `link`. Other links, images and code are left as they are.\n */\nfunction rewriteFor({ files, github }: MarkdownOptions): Rewrite {\n\tconst fileLink = (text: string, hit: FilePath, code: boolean): FileLinkToken => ({\n\t\ttype: 'fileLink',\n\t\traw: text,\n\t\ttext,\n\t\tcode,\n\t\tpath: hit.path,\n\t\tline: hit.line,\n\t\thref: files!(hit.path, hit.line)\n\t});\n\tconst bareRefs = (t: Token): Token[] => {\n\t\tif (!github?.bare || !isPlainText(t)) return [t];\n\t\tconst hits = [...t.text.matchAll(BARE_REF)].map((m) => ({\n\t\t\tstart: m.index,\n\t\t\tend: m.index + m[0].length,\n\t\t\tnumber: Number(m[1])\n\t\t}));\n\t\treturn splitText(\n\t\t\tt,\n\t\t\thits,\n\t\t\t(text, hit): GithubRefToken => ({ type: 'githubRef', raw: text, text, number: hit.number, link: null })\n\t\t);\n\t};\n\treturn (t) => {\n\t\tif (t.type === 'link') {\n\t\t\tconst link = t as Tokens.Link;\n\t\t\tconst target = github ? parseGithubRefUrl(link.href) : null;\n\t\t\tif (!target) return [t];\n\t\t\t// An autolink's text is its URL, and `#12` only names the target: neither is the author's words.\n\t\t\tconst named = link.text !== link.href && !isRefShorthand(link.text, target);\n\t\t\tconst ref: GithubRefToken = {\n\t\t\t\ttype: 'githubRef',\n\t\t\t\traw: link.raw,\n\t\t\t\ttext: link.text,\n\t\t\t\tnumber: target.number,\n\t\t\t\tlink: { repo: target.repo, href: link.href },\n\t\t\t\t...(named ? { tokens: link.tokens } : {})\n\t\t\t};\n\t\t\treturn [ref];\n\t\t}\n\t\tif (t.type === 'image') return [t];\n\t\tif (t.type === 'codespan') {\n\t\t\tconst hit = files ? parseFilePath(t.text) : null;\n\t\t\treturn [hit ? fileLink(t.text, hit, true) : t];\n\t\t}\n\t\tif (!isPlainText(t)) return null;\n\t\tif (!files) return bareRefs(t);\n\t\treturn splitText(t, findFilePaths(t.text), (text, hit) => fileLink(text, hit, false)).flatMap(bareRefs);\n\t};\n}\n\n// Raw HTML in model output is rendered as literal text, not injected.\n//\n// Line breaks follow the TUI, which prints a reply's lines as written: a\n// single newline inside a plain paragraph is a line break, so a reply that\n// lists numbers one per line reads one per line rather than \"1 2 3 … 80\".\n// The global `breaks` option would do that everywhere, and inside lists it\n// hard-breaks every continuation line and doubles their rhythm, so it stays\n// off and only paragraphs (top level or quoted) are rewritten. Lists, and\n// the lines that continue a list item, render as standard markdown.\nconst marked = new Marked({\n\tgfm: true,\n\tbreaks: false,\n\trenderer: {\n\t\thtml({ raw }) {\n\t\t\tconst body = (this.options as MarkdownOptions).githubBody;\n\t\t\treturn body ? sanitizeGithubHtml(raw, body.media) : escapeHtml(raw);\n\t\t},\n\t\timage({ href, title, text }) {\n\t\t\tconst body = (this.options as MarkdownOptions).githubBody;\n\t\t\tif (!body) return false;\n\t\t\tconst src = body.media(href);\n\t\t\tif (!src) return escapeHtml(text);\n\t\t\tconst titled = title ? ` title=\"${escapeHtml(title)}\"` : '';\n\t\t\treturn `<img src=\"${escapeHtml(src)}\" alt=\"${escapeHtml(text)}\"${titled} loading=\"lazy\">`;\n\t\t},\n\t\tlink({ href, title, tokens }) {\n\t\t\tif (!(this.options as MarkdownOptions).githubBody) return false;\n\t\t\tconst label = this.parser.parseInline(tokens);\n\t\t\t// Nothing in a body is the pane's own: every link leaves for a tab of its own.\n\t\t\tif (!/^https?:\\/\\//i.test(href)) return label;\n\t\t\tconst titled = title ? ` title=\"${escapeHtml(title)}\"` : '';\n\t\t\treturn `<a href=\"${escapeHtml(href)}\"${titled} target=\"_blank\" rel=\"noopener\">${label}</a>`;\n\t\t},\n\t\tblockquote(token) {\n\t\t\tconst alert = (token as Tokens.Blockquote & { alert?: AlertKind }).alert;\n\t\t\tif (!alert) return false;\n\t\t\tconst inner = this.parser.parse(token.tokens);\n\t\t\treturn `<div class=\"gh-alert gh-alert-${alert}\"><p class=\"gh-alert-title\">${GITHUB_ALERTS[alert]}</p>${inner}</div>\\n`;\n\t\t}\n\t},\n\textensions: [\n\t\t{\n\t\t\tname: 'fileLink',\n\t\t\trenderer(token) {\n\t\t\t\tconst { text, path, line, code, href } = token as FileLinkToken;\n\t\t\t\tconst label = code ? `<code>${escapeHtml(text)}</code>` : escapeHtml(text);\n\t\t\t\tconst at = line ? ` data-line=\"${line}\"` : '';\n\t\t\t\treturn `<a class=\"file-link\" href=\"${escapeHtml(href)}\" data-file=\"${escapeHtml(path)}\"${at}>${label}</a>`;\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\tname: 'githubRef',\n\t\t\trenderer(token) {\n\t\t\t\tconst { text, number, link, tokens } = token as GithubRefToken;\n\t\t\t\tif (!link) return `<a class=\"gh-ref\" data-number=\"${number}\">${escapeHtml(text)}</a>`;\n\t\t\t\tconst label = tokens ? this.parser.parseInline(tokens) : escapeHtml(text);\n\t\t\t\tconst attrs =\n\t\t\t\t\t`href=\"${escapeHtml(link.href)}\" target=\"_blank\" rel=\"noopener\" data-repo=\"${escapeHtml(link.repo)}\"` +\n\t\t\t\t\t` data-number=\"${number}\"${tokens ? ' data-words' : ''}`;\n\t\t\t\treturn `<a class=\"gh-ref\" ${attrs}>${label}</a>`;\n\t\t\t}\n\t\t}\n\t],\n\thooks: {\n\t\tprocessAllTokens(tokens) {\n\t\t\t// `renderMarkdown` passes its own options along with marked's.\n\t\t\tconst options = this.options as MarkdownOptions;\n\t\t\tif (options.githubBody) markAlerts(tokens);\n\t\t\tbreakParagraphs(tokens);\n\t\t\tif (!options.files && !options.github) return tokens;\n\t\t\treturn rewriteInline(tokens, rewriteFor(options));\n\t\t}\n\t}\n});\n\n/**\n * Render a message. With `files`, a file path in it (in backticks or in plain\n * text) becomes an `a.file-link` to wherever `files` says that file opens,\n * carrying the path and line as `data-file` and `data-line`. With `github`, a\n * link to a pull request or issue becomes an `a.gh-ref` carrying `data-repo`\n * and `data-number` (and `data-words` when its text is the author's own), for\n * the transcript to draw as a chip once GitHub has answered.\n */\nexport function renderMarkdown(text: string, options: MarkdownOptions = {}): string {\n\ttry {\n\t\treturn marked.parse(text, { async: false, ...options } as MarkedOptions & { async: false });\n\t} catch {\n\t\treturn `<pre>${escapeHtml(text)}</pre>`;\n\t}\n}\n","/**\n * A pull request or issue as the side panel's GitHub pane draws it, and the\n * reading of GitHub's GraphQL answer into that shape. Shared by the server,\n * which reads GitHub through `gh`, and the pane, which groups and words what\n * it is sent. Nothing here touches the network or the clock.\n */\n\nimport { isRepoSlug, parseRefNumber, type GithubRefKind, type GithubRefState } from './github-ref.js';\n\nexport interface GithubLabel {\n\tname: string;\n\t/** GitHub's colour for it, six hex digits with no `#`. */\n\tcolor: string;\n}\n\n/** A reviewer's latest word on a pull request. */\nexport type ReviewVerdict = 'approved' | 'changes_requested' | 'commented' | 'dismissed';\n\nexport interface GithubReview {\n\tauthor: string;\n\tverdict: ReviewVerdict;\n\tat: number | null;\n\t/** Given before the newest commit, so it may no longer hold. */\n\tstale: boolean;\n}\n\n/** Where a check stands, in the order the pane lists them: what wants attention first. */\nexport type CheckBucket = 'failing' | 'running' | 'passing';\n\nexport interface GithubCheck {\n\tname: string;\n\tbucket: CheckBucket;\n\t/** GitHub's own word for how it ended or where it is, lower case. */\n\tstatus: string;\n\turl: string | null;\n}\n\nexport interface GithubComment {\n\tid: string;\n\tauthor: string;\n\t/** Written by an app rather than a person. */\n\tbot: boolean;\n\tbody: string;\n\tat: number | null;\n\turl: string;\n}\n\nexport interface GithubPullFacts {\n\tbase: string;\n\thead: string;\n\tadditions: number;\n\tdeletions: number;\n\tfiles: number;\n\t/** One per reviewer, the latest. */\n\treviews: GithubReview[];\n\t/** Reviewers asked for and not yet heard from: logins, or team names. */\n\trequested: string[];\n\tchecks: GithubCheck[];\n}\n\nexport interface GithubItem {\n\trepo: string;\n\tnumber: number;\n\tkind: GithubRefKind;\n\ttitle: string;\n\tstate: GithubRefState;\n\turl: string;\n\tbody: string;\n\tauthor: string | null;\n\tcreated_at: number | null;\n\tupdated_at: number | null;\n\tlabels: GithubLabel[];\n\t/** Only for a pull request. */\n\tpull: GithubPullFacts | null;\n\t/** Newest last; null when the second read failed. */\n\tcomments: GithubComment[] | null;\n\t/** How many comments GitHub holds, which may be more than were read. */\n\tcomments_total: number;\n}\n\n/** Why there is no item to show: `gh` missing or logged out, no such item, or GitHub did not answer. */\nexport type GithubItemError = 'no-gh' | 'not-found' | 'failed';\n\n// ── GitHub's answer ──────────────────────────────────────────────────────\n\n/** Asked once per pane for the header, body and the pull request's facts. */\nexport const ITEM_QUERY = `query($owner:String!,$name:String!,$number:Int!){repository(owner:$owner,name:$name){issueOrPullRequest(number:$number){\n__typename\n... on Issue{number title url body state createdAt updatedAt author{login} labels(first:20){nodes{name color}}}\n... on PullRequest{number title url body state isDraft additions deletions changedFiles createdAt updatedAt headRefName baseRefName author{login} labels(first:20){nodes{name color}}\nlatestReviews(first:30){nodes{state submittedAt author{login}}}\nreviewRequests(first:20){nodes{requestedReviewer{__typename ... on User{login} ... on Bot{login} ... on Team{name} ... on Mannequin{login}}}}\ncommits(last:1){nodes{commit{committedDate statusCheckRollup{contexts(first:100){nodes{__typename ... on CheckRun{name status conclusion detailsUrl} ... on StatusContext{context state targetUrl}}}}}}}}\n}}}`;\n\n/** How many comments the second read takes, newest. */\nexport const COMMENTS_READ = 100;\n\n/** Asked beside `ITEM_QUERY`, in parallel: the conversation. */\nexport const COMMENTS_QUERY = `query($owner:String!,$name:String!,$number:Int!){repository(owner:$owner,name:$name){issueOrPullRequest(number:$number){\n... on Issue{comments(last:${COMMENTS_READ}){totalCount nodes{id body createdAt url isMinimized author{__typename login}}}}\n... on PullRequest{comments(last:${COMMENTS_READ}){totalCount nodes{id body createdAt url isMinimized author{__typename login}}}}\n}}}`;\n\ninterface RawActor {\n\t__typename?: string;\n\tlogin?: string;\n\tname?: string;\n}\n\ninterface RawContext {\n\t__typename?: string;\n\tname?: string;\n\tstatus?: string;\n\tconclusion?: string | null;\n\tdetailsUrl?: string | null;\n\tcontext?: string;\n\tstate?: string;\n\ttargetUrl?: string | null;\n}\n\n/** The slice of `issueOrPullRequest` that `ITEM_QUERY` asks for. */\nexport interface RawItem {\n\t__typename: 'Issue' | 'PullRequest';\n\tnumber: number;\n\ttitle: string;\n\turl: string;\n\tbody?: string | null;\n\tstate: string;\n\tisDraft?: boolean;\n\tadditions?: number;\n\tdeletions?: number;\n\tchangedFiles?: number;\n\tcreatedAt?: string | null;\n\tupdatedAt?: string | null;\n\theadRefName?: string;\n\tbaseRefName?: string;\n\tauthor?: RawActor | null;\n\tlabels?: { nodes?: (GithubLabel | null)[] } | null;\n\tlatestReviews?: { nodes?: ({ state: string; submittedAt?: string | null; author?: RawActor | null } | null)[] } | null;\n\treviewRequests?: { nodes?: ({ requestedReviewer?: RawActor | null } | null)[] } | null;\n\tcommits?: {\n\t\tnodes?: ({\n\t\t\tcommit?: { committedDate?: string | null; statusCheckRollup?: { contexts?: { nodes?: (RawContext | null)[] } } | null };\n\t\t} | null)[];\n\t} | null;\n}\n\nexport interface RawComment {\n\tid: string;\n\tbody?: string | null;\n\tcreatedAt?: string | null;\n\turl: string;\n\tisMinimized?: boolean;\n\tauthor?: RawActor | null;\n}\n\nexport interface RawComments {\n\tcomments?: { totalCount?: number; nodes?: (RawComment | null)[] } | null;\n}\n\nfunction time(text: string | null | undefined): number | null {\n\tif (!text) return null;\n\tconst at = Date.parse(text);\n\treturn Number.isNaN(at) ? null : at;\n}\n\nfunction present<T>(list: (T | null | undefined)[] | null | undefined): T[] {\n\treturn (list ?? []).filter((x): x is T => x != null);\n}\n\n/** GitHub names a deleted account nothing; it shows it as \"ghost\". */\nfunction login(actor: RawActor | null | undefined): string {\n\treturn actor?.login ?? actor?.name ?? 'ghost';\n}\n\n/** Whether an author is an app: GitHub says so, or its login ends `[bot]`. */\nexport function isBot(actor: RawActor | null | undefined): boolean {\n\treturn actor?.__typename === 'Bot' || /\\[bot\\]$/.test(actor?.login ?? '');\n}\n\nconst VERDICTS: Record<string, ReviewVerdict> = {\n\tAPPROVED: 'approved',\n\tCHANGES_REQUESTED: 'changes_requested',\n\tCOMMENTED: 'commented',\n\tDISMISSED: 'dismissed'\n};\n\nconst FAILING = new Set(['FAILURE', 'TIMED_OUT', 'CANCELLED', 'ACTION_REQUIRED', 'STARTUP_FAILURE', 'ERROR']);\n\n/** Where one check of the rollup stands. A check run still going has no conclusion yet. */\nexport function toCheck(raw: RawContext): GithubCheck | null {\n\tif (raw.__typename === 'CheckRun') {\n\t\tconst done = raw.status === 'COMPLETED';\n\t\tconst word = done ? (raw.conclusion ?? 'COMPLETED') : (raw.status ?? 'PENDING');\n\t\tconst bucket: CheckBucket = !done ? 'running' : FAILING.has(word) ? 'failing' : 'passing';\n\t\treturn { name: raw.name ?? 'check', bucket, status: word.toLowerCase().replaceAll('_', ' '), url: raw.detailsUrl ?? null };\n\t}\n\tif (raw.__typename === 'StatusContext') {\n\t\tconst word = raw.state ?? 'PENDING';\n\t\tconst bucket: CheckBucket = FAILING.has(word) ? 'failing' : word === 'SUCCESS' ? 'passing' : 'running';\n\t\treturn { name: raw.context ?? 'status', bucket, status: word.toLowerCase(), url: raw.targetUrl ?? null };\n\t}\n\treturn null;\n}\n\nfunction itemState(raw: RawItem): GithubRefState {\n\tif (raw.state === 'MERGED') return 'merged';\n\tif (raw.state === 'CLOSED') return 'closed';\n\treturn raw.isDraft ? 'draft' : 'open';\n}\n\nfunction toPull(raw: RawItem): GithubPullFacts {\n\tconst head = present(raw.commits?.nodes)[0]?.commit;\n\tconst headAt = time(head?.committedDate);\n\tconst reviews = present(raw.latestReviews?.nodes)\n\t\t.filter((r) => r.state in VERDICTS)\n\t\t.map((r): GithubReview => {\n\t\t\tconst at = time(r.submittedAt);\n\t\t\treturn { author: login(r.author), verdict: VERDICTS[r.state], at, stale: at !== null && headAt !== null && at < headAt };\n\t\t})\n\t\t// A dismissal takes the verdict back, so it says nothing about where the pull request stands.\n\t\t.filter((r) => r.verdict !== 'dismissed');\n\tconst reviewed = new Set(reviews.map((r) => r.author.toLowerCase()));\n\tconst requested = present(raw.reviewRequests?.nodes)\n\t\t.map((r) => (r.requestedReviewer ? login(r.requestedReviewer) : null))\n\t\t.filter((name): name is string => name !== null && !reviewed.has(name.toLowerCase()));\n\tconst checks = present(head?.statusCheckRollup?.contexts?.nodes)\n\t\t.map(toCheck)\n\t\t.filter((c): c is GithubCheck => c !== null);\n\treturn {\n\t\tbase: raw.baseRefName ?? '',\n\t\thead: raw.headRefName ?? '',\n\t\tadditions: raw.additions ?? 0,\n\t\tdeletions: raw.deletions ?? 0,\n\t\tfiles: raw.changedFiles ?? 0,\n\t\treviews,\n\t\trequested,\n\t\tchecks\n\t};\n}\n\nexport function toComments(raw: RawComments | null | undefined): { comments: GithubComment[]; total: number } | null {\n\tif (!raw?.comments) return null;\n\tconst comments = present(raw.comments.nodes)\n\t\t.filter((c) => !c.isMinimized)\n\t\t.map(\n\t\t\t(c): GithubComment => ({\n\t\t\t\tid: c.id,\n\t\t\t\tauthor: login(c.author),\n\t\t\t\tbot: isBot(c.author),\n\t\t\t\tbody: c.body ?? '',\n\t\t\t\tat: time(c.createdAt),\n\t\t\t\turl: c.url\n\t\t\t})\n\t\t);\n\treturn { comments, total: raw.comments.totalCount ?? comments.length };\n}\n\n/** GitHub's two answers as the pane draws them. */\nexport function toGithubItem(raw: RawItem, repo: string, comments: RawComments | null): GithubItem {\n\tconst conversation = toComments(comments);\n\treturn {\n\t\trepo,\n\t\tnumber: raw.number,\n\t\tkind: raw.__typename === 'PullRequest' ? 'pull' : 'issue',\n\t\ttitle: raw.title,\n\t\tstate: itemState(raw),\n\t\turl: raw.url,\n\t\tbody: raw.body ?? '',\n\t\tauthor: raw.author ? login(raw.author) : null,\n\t\tcreated_at: time(raw.createdAt),\n\t\tupdated_at: time(raw.updatedAt),\n\t\tlabels: present(raw.labels?.nodes),\n\t\tpull: raw.__typename === 'PullRequest' ? toPull(raw) : null,\n\t\tcomments: conversation?.comments ?? null,\n\t\tcomments_total: conversation?.total ?? 0\n\t};\n}\n\n// ── what the pane makes of it ────────────────────────────────────────────\n\n/** Whether nothing more can happen to it soon: merged, or closed. Cached longer. */\nexport function isSettled(item: Pick<GithubItem, 'state'>): boolean {\n\treturn item.state === 'merged' || item.state === 'closed';\n}\n\n/** Whether any check is still going; while one is, GitHub's ETag cannot tell the pane it finished. */\nexport function hasRunningChecks(item: Pick<GithubItem, 'pull'>): boolean {\n\treturn item.pull?.checks.some((c) => c.bucket === 'running') ?? false;\n}\n\n/** The checks in reading order: failing, then running, then passing. */\nexport function groupChecks(checks: GithubCheck[]): Record<CheckBucket, GithubCheck[]> {\n\tconst out: Record<CheckBucket, GithubCheck[]> = { failing: [], running: [], passing: [] };\n\tfor (const c of checks) out[c.bucket].push(c);\n\treturn out;\n}\n\n/** The checks in one line: \"7 of 16 running · 1 failed\", or \"All 12 passed\". */\nexport function describeChecks(checks: GithubCheck[]): string {\n\tif (checks.length === 0) return 'No checks';\n\tconst { failing, running, passing } = groupChecks(checks);\n\tif (failing.length === 0 && running.length === 0) {\n\t\treturn passing.length === 1 ? '1 passed' : `All ${passing.length} passed`;\n\t}\n\tconst parts: string[] = [];\n\tif (running.length) parts.push(`${running.length} of ${checks.length} running`);\n\tif (failing.length) parts.push(`${failing.length} failed`);\n\tif (!running.length) parts.push(`${passing.length} of ${checks.length} passed`);\n\treturn parts.join(' · ');\n}\n\n/**\n * A body with the HTML comments taken out, or '' when that leaves nothing:\n * review bots keep their bookkeeping in `<!-- -->` markers, which would\n * otherwise draw as an empty comment.\n */\nexport function visibleBody(body: string): string {\n\treturn body.replace(/<!--[\\s\\S]*?(?:-->|$)/g, '').trim() === '' ? '' : body;\n}\n\n/** The comments worth a row, and how many bots wrote apart from them. */\nexport function readableComments(comments: GithubComment[]): { people: GithubComment[]; bots: GithubComment[] } {\n\tconst said = comments.filter((c) => visibleBody(c.body) !== '');\n\treturn { people: said.filter((c) => !c.bot), bots: said.filter((c) => c.bot) };\n}\n\n/** A pull request or issue as the pane's `ref` param spells it: `owner/name#n`. */\nexport function refParam(repo: string, number: number): string {\n\treturn `${repo}#${number}`;\n}\n\n/** The pull request or issue a `ref` param names, or null for anything else. */\nexport function parseRefParam(text: string | null | undefined): { repo: string; number: number } | null {\n\tconst at = text?.lastIndexOf('#') ?? -1;\n\tif (!text || at < 0) return null;\n\tconst repo = text.slice(0, at);\n\tconst number = parseRefNumber(text.slice(at + 1));\n\treturn number !== null && isRepoSlug(repo) ? { repo, number } : null;\n}\n","/**\n * The browser's side of a GitHub chip: asking the server what a pull request\n * or issue is, once per reference and again when the answer has gone stale,\n * and drawing that answer into the `a.gh-ref` the markdown left in a message.\n */\n\nimport { githubRefVisual, parseRefNumber, type GithubRef } from '$shared/github-ref.js';\nimport { refParam } from '$shared/github-item.js';\n\n/** How long an answer stands here before the server is asked again. */\nconst TTL_MS = 60_000;\n/** An answer of nothing may only mean the server could not ask yet, so it stands for less. */\nconst NOTHING_TTL_MS = 10_000;\nconst MAX_ANSWERS = 300;\n\n/** What a chip asks about: a repo by name, or the repo of `session` for a bare `#n`. */\nexport interface GithubRefQuery {\n\t/** Where the machine that answers is reached: '' for this one, `/fleet/<id>` for another. */\n\tbase: string;\n\trepo: string | null;\n\tsession: string | null;\n\tnumber: number;\n}\n\nconst answers = new Map<string, { until: number; ref: Promise<GithubRef | null> }>();\n\nfunction githubRefKey(q: GithubRefQuery): string {\n\treturn q.repo ? `${q.base}|${q.repo.toLowerCase()}#${q.number}` : `${q.base}|@${q.session ?? ''}#${q.number}`;\n}\n\nasync function fetchRef(q: GithubRefQuery): Promise<GithubRef | null> {\n\tconst params = new URLSearchParams({ number: String(q.number) });\n\tif (q.repo) params.set('repo', q.repo);\n\telse if (q.session) params.set('session', q.session);\n\ttry {\n\t\tconst res = await fetch(`${q.base}/api/github/ref?${params}`);\n\t\tif (!res.ok) return null;\n\t\treturn ((await res.json()) as { ref: GithubRef | null }).ref ?? null;\n\t} catch {\n\t\treturn null;\n\t}\n}\n\n/** What GitHub says about a reference; null when it says nothing, which leaves the link plain. */\nexport function loadGithubRef(q: GithubRefQuery): Promise<GithubRef | null> {\n\tconst key = githubRefKey(q);\n\tconst have = answers.get(key);\n\tif (have && Date.now() < have.until) return have.ref;\n\tconst ref = fetchRef(q);\n\tconst entry = { until: Date.now() + TTL_MS, ref };\n\tanswers.delete(key);\n\tanswers.set(key, entry);\n\tif (answers.size > MAX_ANSWERS) answers.delete(answers.keys().next().value!);\n\tvoid ref.then((found) => {\n\t\tif (!found) entry.until = Date.now() + NOTHING_TTL_MS;\n\t});\n\treturn ref;\n}\n\n/**\n * The query a chip's attributes spell, or null for an element that is not\n * one. A bare `#n` is looked up in `repo` when the chips sit in one repo's\n * text, else in `session`'s.\n */\nexport function chipQuery(\n\ta: HTMLElement,\n\twhere: { base: string; session: string | null; repo?: string | null }\n): GithubRefQuery | null {\n\tconst number = parseRefNumber(a.dataset.number);\n\tif (number === null) return null;\n\tconst repo = a.dataset.repo ?? where.repo ?? null;\n\tif (!repo && !where.session) return null;\n\treturn { base: where.base, repo, session: repo ? null : where.session, number };\n}\n\n/** The pull request or issue a drawn chip names, as the GitHub pane's `ref` param spells it. */\nexport function chipRef(a: HTMLElement): string | null {\n\treturn a.dataset.ref ?? null;\n}\n\n/**\n * Draw an answer into a chip: the state's icon and colour, then `#n` and the\n * title, or the author's own words where the link had some. A bare `#n` in\n * prose gets the icon alone and becomes a link here, since only now is it\n * known to name anything. Drawing again with a newer answer updates in place.\n */\nexport function drawChip(a: HTMLAnchorElement, ref: GithubRef): void {\n\tconst visual = githubRefVisual(ref);\n\tconst bare = !a.dataset.repo;\n\tconst words = 'words' in a.dataset;\n\n\tif (!a.classList.contains('resolved')) {\n\t\tconst icon = document.createElement('iconify-icon');\n\t\ticon.className = 'gh-icon';\n\t\tif (words) {\n\t\t\ta.prepend(icon);\n\t\t} else {\n\t\t\tconst number = document.createElement('span');\n\t\t\tnumber.className = 'gh-num';\n\t\t\tnumber.textContent = `#${ref.number}`;\n\t\t\tconst title = document.createElement('span');\n\t\t\ttitle.className = 'gh-title';\n\t\t\ta.replaceChildren(icon, number, ...(bare ? [] : [title]));\n\t\t}\n\t\tif (bare) {\n\t\t\ta.href = ref.url;\n\t\t\ta.target = '_blank';\n\t\t\ta.rel = 'noopener';\n\t\t}\n\t\ta.classList.add('resolved');\n\t}\n\n\tconst icon = a.querySelector('.gh-icon');\n\ticon?.setAttribute('icon', visual.icon);\n\ticon?.setAttribute('aria-label', visual.label);\n\tconst title = a.querySelector('.gh-title');\n\tif (title) title.textContent = ref.title;\n\ta.dataset.state = ref.state;\n\ta.dataset.ref = refParam(ref.repo, ref.number);\n\ta.style.setProperty('--gh', visual.color);\n}\n","/**\n * The browser's side of the GitHub pane's reads: one pull request or issue\n * whole, kept here a minute so a second open (or the click after a chip's\n * hover card) paints at once, and the session's own defaults. Every read\n * goes to the session's machine (`base`), whose `gh` is the one that knows\n * its repos.\n */\n\nimport type { GithubItem, GithubItemError } from '$shared/github-item.js';\n\n/** How long an answer is drawn from here without asking again. */\nconst TTL_MS = 60_000;\nconst MAX_KEPT = 60;\n\nexport type GithubItemResult =\n\t| { item: GithubItem; stale: boolean; error?: undefined }\n\t| { item: null; stale?: undefined; error: GithubItemError | 'unreachable' };\n\ninterface Kept {\n\tat: number;\n\tresult: Promise<GithubItemResult>;\n\t/** The answer once it came, for a paint that cannot wait. */\n\tsettled: GithubItemResult | null;\n}\n\nconst kept = new Map<string, Kept>();\n\nfunction key(base: string, repo: string, number: number): string {\n\treturn `${base}|${repo.toLowerCase()}#${number}`;\n}\n\nasync function fetchItem(base: string, repo: string, number: number): Promise<GithubItemResult> {\n\ttry {\n\t\tconst params = new URLSearchParams({ repo, number: String(number) });\n\t\tconst res = await fetch(`${base}/api/github/item?${params}`);\n\t\tif (!res.ok) return { item: null, error: res.status === 404 ? 'not-found' : 'unreachable' };\n\t\treturn (await res.json()) as GithubItemResult;\n\t} catch {\n\t\treturn { item: null, error: 'unreachable' };\n\t}\n}\n\n/** The last answer for a pull request or issue, if one is here at all, however old. */\nexport function peekGithubItem(base: string, repo: string, number: number): GithubItemResult | null {\n\treturn kept.get(key(base, repo, number))?.settled ?? null;\n}\n\n/** A pull request or issue, from here while the answer is young, else from the server. */\nexport function loadGithubItem(base: string, repo: string, number: number, fresh = false): Promise<GithubItemResult> {\n\tconst k = key(base, repo, number);\n\tconst have = kept.get(k);\n\tif (have && !fresh && Date.now() - have.at < TTL_MS) return have.result;\n\tconst entry: Kept = { at: Date.now(), result: fetchItem(base, repo, number), settled: have?.settled ?? null };\n\tvoid entry.result.then((r) => {\n\t\t// A failure keeps the last good answer to paint, and is asked again next time.\n\t\tif (r.item || !entry.settled?.item) entry.settled = r;\n\t\tif (!r.item) entry.at = 0;\n\t});\n\tkept.delete(k);\n\tkept.set(k, entry);\n\tif (kept.size > MAX_KEPT) kept.delete(kept.keys().next().value!);\n\treturn entry.result;\n}\n\n/** What the pane shows for a session before anything is picked. */\nexport interface SessionGithub {\n\trepo: string | null;\n\tpull: number | null;\n\tissue: number | null;\n}\n\nexport async function loadSessionGithub(api: string): Promise<SessionGithub | null> {\n\ttry {\n\t\tconst res = await fetch(`${api}/github`);\n\t\treturn res.ok ? ((await res.json()) as SessionGithub) : null;\n\t} catch {\n\t\treturn null;\n\t}\n}\n\n/** GitHub's hosts that may hold a private repo's files; camo and the rest are public. */\nconst PROXIED = new Set([\n\t'github.com',\n\t'raw.githubusercontent.com',\n\t'user-images.githubusercontent.com',\n\t'private-user-images.githubusercontent.com',\n\t'media.githubusercontent.com',\n\t'objects.githubusercontent.com'\n]);\n\n/** Where a body's image is drawn from: GitHub's own files through the session's machine, others as written. */\nexport function mediaHref(base: string): (url: string) => string | null {\n\treturn (url) => {\n\t\tlet host: string;\n\t\ttry {\n\t\t\thost = new URL(url).hostname;\n\t\t} catch {\n\t\t\treturn null;\n\t\t}\n\t\treturn PROXIED.has(host) ? `${base}/api/github/media?${new URLSearchParams({ url })}` : url;\n\t};\n}\n","<script lang=\"ts\">\n\timport * as Popover from '$lib/components/ui/popover';\n\timport { githubRefVisual, type GithubRef } from '$shared/github-ref.js';\n\timport { formatAgo } from '$lib/format';\n\timport { chipQuery, chipRef, drawChip, loadGithubRef } from '$lib/github-refs';\n\timport { loadGithubItem } from '$lib/github-items';\n\n\t// The chips arrive as HTML inside rendered messages, so nothing here is a\n\t// component per link: one observer finds them under `root` as they are\n\t// drawn, asks GitHub about each when it scrolls into view, and one card\n\t// serves whichever chip is under the pointer.\n\tlet {\n\t\troot,\n\t\tsession = null,\n\t\trepo = null,\n\t\tbase = '',\n\t\tonOpen\n\t}: {\n\t\t/** The element whose messages hold the chips. */\n\t\troot: HTMLElement;\n\t\t/** The session whose repo a bare `#n` is looked up in; null where there is none. */\n\t\tsession?: string | null;\n\t\t/** The repo a bare `#n` names, where the chips sit in one repo's text; it wins over `session`. */\n\t\trepo?: string | null;\n\t\t/** Where the machine that reads GitHub is reached: '' for this one, `/fleet/<id>` for another. */\n\t\tbase?: string;\n\t\t/**\n\t\t * Opens a chip in the GitHub pane, given its `owner/name#n`. With it a\n\t\t * plain click or a tap opens the pane, and a hover warms the pane's read;\n\t\t * Ctrl/Cmd-click and a middle click still go to github.com.\n\t\t */\n\t\tonOpen?: (ref: string) => void;\n\t} = $props();\n\n\tconst OPEN_MS = 250;\n\tconst CLOSE_MS = 180;\n\t/** A link GitHub said nothing about is asked about once more, this long after. */\n\tconst RETRY_MS = 20_000;\n\n\tlet open = $state(false);\n\tlet anchor = $state<HTMLAnchorElement | null>(null);\n\tlet shown = $state<GithubRef | null>(null);\n\tlet now = $state(Date.now());\n\tlet timer: ReturnType<typeof setTimeout> | undefined;\n\t/** Whether the press now under way began on the chip whose card was already up. */\n\tlet pressedOpenChip = false;\n\t/** What made the last press. Safari's `click` does not say, so `pointerdown` is asked. */\n\tlet pressedWith = 'mouse';\n\t/** Counts every wish to show or hide the card, so an answer that arrives late can tell it is. */\n\tlet wish = 0;\n\n\tconst visual = $derived(shown && githubRefVisual(shown));\n\tconst ago = $derived(shown?.updated_at ? formatAgo(shown.updated_at, now) : '');\n\n\tconst RESOLVED = 'a.gh-ref.resolved';\n\n\tfunction chipAt(target: EventTarget | null, selector = 'a.gh-ref'): HTMLAnchorElement | null {\n\t\treturn target instanceof Element ? target.closest<HTMLAnchorElement>(selector) : null;\n\t}\n\n\t/** Ask about a chip and draw the answer into it; an answer of nothing leaves the link as written. */\n\tasync function resolve(a: HTMLAnchorElement): Promise<GithubRef | null> {\n\t\tconst query = chipQuery(a, { base, session, repo });\n\t\tif (!query) return null;\n\t\tconst ref = await loadGithubRef(query);\n\t\tif (ref && a.isConnected) drawChip(a, ref);\n\t\treturn ref;\n\t}\n\n\tasync function show(a: HTMLAnchorElement) {\n\t\tconst mine = ++wish;\n\t\tconst ref = await resolve(a);\n\t\t// The pointer may have left while GitHub was being asked.\n\t\tif (!ref || !a.isConnected || mine !== wish) return;\n\t\tshown = ref;\n\t\tanchor = a;\n\t\tnow = Date.now();\n\t\topen = true;\n\t\t// The click that may follow lands on a read already made.\n\t\tif (onOpen) void loadGithubItem(base, ref.repo, ref.number);\n\t}\n\n\tfunction later(ms: number, run: () => void) {\n\t\tclearTimeout(timer);\n\t\ttimer = setTimeout(run, ms);\n\t}\n\n\tfunction hide() {\n\t\twish++;\n\t\tlater(CLOSE_MS, () => (open = false));\n\t}\n\n\tfunction onPointerOver(e: PointerEvent) {\n\t\tif (e.pointerType !== 'mouse') return;\n\t\tconst a = chipAt(e.target, RESOLVED);\n\t\tif (!a) return;\n\t\tif (open && a === anchor) clearTimeout(timer);\n\t\telse later(OPEN_MS, () => void show(a));\n\t}\n\n\tfunction onPointerOut(e: PointerEvent) {\n\t\tif (e.pointerType !== 'mouse') return;\n\t\tconst a = chipAt(e.target);\n\t\tif (a && !(e.relatedTarget instanceof Node && a.contains(e.relatedTarget))) hide();\n\t}\n\n\tfunction onPointerDown(e: PointerEvent) {\n\t\tpressedOpenChip = open && chipAt(e.target) === anchor;\n\t\tpressedWith = e.pointerType;\n\t}\n\n\t// With the pane to open, a plain click or a tap on a chip opens it there; a\n\t// modified click is the browser's, which takes the link to github.com.\n\t// Without one, a finger has no hover, so a tap on a chip opens its card,\n\t// which holds the way through to GitHub; a second tap puts the card away.\n\t// A link GitHub said nothing about is not a chip, and a tap follows it as ever.\n\tfunction onClick(e: MouseEvent) {\n\t\tconst by = pressedWith;\n\t\t// A click from the keyboard has no press before it.\n\t\tpressedWith = 'mouse';\n\t\tconst a = chipAt(e.target, RESOLVED);\n\t\tconst ref = a && chipRef(a);\n\t\tif (onOpen && ref && !e.defaultPrevented && e.button === 0 && !(e.metaKey || e.ctrlKey || e.shiftKey || e.altKey)) {\n\t\t\te.preventDefault();\n\t\t\twish++;\n\t\t\tclearTimeout(timer);\n\t\t\topen = false;\n\t\t\tonOpen(ref);\n\t\t\treturn;\n\t\t}\n\t\tif (by === 'mouse' || !a) return;\n\t\te.preventDefault();\n\t\tif (pressedOpenChip) open = false;\n\t\telse void show(a);\n\t}\n\n\tfunction onFocusIn(e: FocusEvent) {\n\t\tconst a = chipAt(e.target, RESOLVED);\n\t\tif (a?.matches(':focus-visible')) void show(a);\n\t}\n\n\t$effect(() => {\n\t\tconst el = root;\n\t\tconst retried = new WeakSet<Element>();\n\t\tconst retries = new Set<ReturnType<typeof setTimeout>>();\n\t\tconst inView = new IntersectionObserver(\n\t\t\t(seen) => {\n\t\t\t\tfor (const entry of seen) {\n\t\t\t\t\tif (!entry.isIntersecting) continue;\n\t\t\t\t\tconst a = entry.target as HTMLAnchorElement;\n\t\t\t\t\tinView.unobserve(a);\n\t\t\t\t\tvoid resolve(a).then((ref) => {\n\t\t\t\t\t\t// Nothing may only mean the server had not learned the repo yet.\n\t\t\t\t\t\tif (ref || retried.has(a)) return;\n\t\t\t\t\t\tretried.add(a);\n\t\t\t\t\t\tretries.add(setTimeout(() => a.isConnected && inView.observe(a), RETRY_MS));\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t},\n\t\t\t{ rootMargin: '200px' }\n\t\t);\n\t\tconst watch = (node: Node) => {\n\t\t\tif (!(node instanceof Element)) return;\n\t\t\tif (node.matches('a.gh-ref')) inView.observe(node);\n\t\t\tfor (const a of node.querySelectorAll('a.gh-ref:not(.resolved)')) inView.observe(a);\n\t\t};\n\t\tconst drawn = new MutationObserver((changes) => {\n\t\t\tfor (const change of changes) {\n\t\t\t\t// What `drawChip` puts inside a chip holds no chip of its own.\n\t\t\t\tif ((change.target as Element).matches('a.gh-ref')) continue;\n\t\t\t\tchange.addedNodes.forEach(watch);\n\t\t\t}\n\t\t});\n\t\twatch(el);\n\t\tdrawn.observe(el, { childList: true, subtree: true });\n\n\t\tconst listening = new AbortController();\n\t\tconst { signal } = listening;\n\t\tel.addEventListener('pointerover', onPointerOver, { signal });\n\t\tel.addEventListener('pointerout', onPointerOut, { signal });\n\t\tel.addEventListener('pointerdown', onPointerDown, { signal });\n\t\tel.addEventListener('click', onClick, { signal });\n\t\tel.addEventListener('focusin', onFocusIn, { signal });\n\t\tel.addEventListener('focusout', hide, { signal });\n\t\treturn () => {\n\t\t\tclearTimeout(timer);\n\t\t\tretries.forEach(clearTimeout);\n\t\t\tinView.disconnect();\n\t\t\tdrawn.disconnect();\n\t\t\tlistening.abort();\n\t\t};\n\t});\n</script>\n\n<Popover.Root bind:open>\n\t{#if shown && visual}\n\t\t<Popover.Content\n\t\t\tclass=\"gh-card\"\n\t\t\tcustomAnchor={anchor}\n\t\t\tside=\"top\"\n\t\t\talign=\"start\"\n\t\t\tsideOffset={6}\n\t\t\ttrapFocus={false}\n\t\t\tonOpenAutoFocus={(e) => e.preventDefault()}\n\t\t\tonCloseAutoFocus={(e) => e.preventDefault()}\n\t\t\tonpointerenter={() => clearTimeout(timer)}\n\t\t\tonpointerleave={(e) => e.pointerType === 'mouse' && hide()}\n\t\t>\n\t\t\t<p class=\"gh-card-repo\">\n\t\t\t\t<iconify-icon icon=\"mdi:github\"></iconify-icon>\n\t\t\t\t{shown.repo}\n\t\t\t\t<span class=\"gh-card-num\">#{shown.number}</span>\n\t\t\t</p>\n\t\t\t<p class=\"gh-card-title\">{shown.title}</p>\n\t\t\t<p class=\"gh-card-meta\">\n\t\t\t\t<span class=\"gh-card-state\" style:--gh={visual.color}>\n\t\t\t\t\t<iconify-icon icon={visual.icon}></iconify-icon>\n\t\t\t\t\t{visual.label}\n\t\t\t\t</span>\n\t\t\t\t{#if shown.author}<span>{shown.author}</span>{/if}\n\t\t\t\t{#if ago}<span>{ago === 'now' ? 'updated just now' : `updated ${ago} ago`}</span>{/if}\n\t\t\t</p>\n\t\t\t<a class=\"gh-card-open\" href={shown.url} target=\"_blank\" rel=\"noopener\">\n\t\t\t\tOpen on GitHub\n\t\t\t\t<iconify-icon icon=\"mdi:open-in-new\"></iconify-icon>\n\t\t\t</a>\n\t\t</Popover.Content>\n\t{/if}\n</Popover.Root>\n","<script lang=\"ts\" module>\n\timport { type VariantProps, tv } from \"tailwind-variants\";\n\n\texport const badgeVariants = tv({\n\t\tbase: \"focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] [&>svg]:pointer-events-none [&>svg]:size-3\",\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tdefault:\n\t\t\t\t\t\"bg-primary text-primary-foreground [a&]:hover:bg-primary/90 border-transparent\",\n\t\t\t\tsecondary:\n\t\t\t\t\t\"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90 border-transparent\",\n\t\t\t\tdestructive:\n\t\t\t\t\t\"bg-destructive [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/70 border-transparent text-white\",\n\t\t\t\toutline: \"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tvariant: \"default\",\n\t\t},\n\t});\n\n\texport type BadgeVariant = VariantProps<typeof badgeVariants>[\"variant\"];\n</script>\n\n<script lang=\"ts\">\n\timport type { HTMLAnchorAttributes } from \"svelte/elements\";\n\timport { cn, type WithElementRef } from \"$lib/utils.js\";\n\n\tlet {\n\t\tref = $bindable(null),\n\t\thref,\n\t\tclass: className,\n\t\tvariant = \"default\",\n\t\tchildren,\n\t\t...restProps\n\t}: WithElementRef<HTMLAnchorAttributes> & {\n\t\tvariant?: BadgeVariant;\n\t} = $props();\n</script>\n\n<svelte:element\n\tthis={href ? \"a\" : \"span\"}\n\tbind:this={ref}\n\tdata-slot=\"badge\"\n\t{href}\n\tclass={cn(badgeVariants({ variant }), className)}\n\t{...restProps}\n>\n\t{@render children?.()}\n</svelte:element>\n"],"names":["NAN","key","node","get_key","render_fn","hydrating","hydrate_next","branches","BranchManager","legacy","is_runes","block","html","get_value","is_controlled","svg","mathml","skip_warning","anchor","value","parent_node","set_hydrate_node","get_first_child","template_effect","effect","active_effect","assign_nodes","remove_effect_dom","hydrate_node","next","last","COMMENT_NODE","get_next_sibling","w.hydration_mismatch","HYDRATION_ERROR","ns","NAMESPACE_SVG","NAMESPACE_MATHML","wrapper","create_element","action","dom","payload","untrack","inited","prev","render_effect","deep_read_state","safe_not_equal","bind_value","input","get","set","batches","listen_to_event_and_reset_event","is_reset","is_numberlike_input","to_number","current_batch","tick","start","end","length","new_length","batch","type","getStores","stores","browser_stores","page","fn","DRAWER_MEDIA_QUERY","DrawerStore","$.state","drawer","size","$.prop","$$props","title","visual","$.derived","sessionStateVisual","px","label","$.get","phase","iconify_icon","root","$.template_effect","$.set_custom_element_data","$.set_style","span","root_1","classes","$.set_attribute","$.append","$$anchor","$$render","consequent","alternate","MOVE_TOLERANCE_PX","longPress","options","opts","timer","triggered","originX","originY","clear","x","y","release","held","moved","onMouseDown","e","onMouseMove","onTouchStart","t","onTouchMove","onTouchEnd","onClickCapture","onTouchCancel","onDragStart","SvelteMap","#sources","#version","state","#size","#update_version","update_version","v","#source","source","sources","s","callbackfn","this_arg","#read_all","callbackFn","prev_res","res","version","increment","v_reactions","needs_version_increase","r","isFunction","ElementSize","#observed","#options","#node","#window","#width","#subscribe","#height","node$","createSubscriber","update","observer","entries","entry","boxSize","boxSizeArr","acc","defaultWindow","element","offsetWidth","offsetHeight","style","paddingWidth","paddingHeight","borderWidth","borderHeight","contentWidth","contentHeight","onDestroyEffect","$.user_effect","afterTick","ELEMENT_NODE","DOCUMENT_NODE","DOCUMENT_FRAGMENT_NODE","isHTMLElement","isObject","isDocument","isWindow","isNode","isShadowRoot","contains","parent","child","rootNode","getDocument","getWindow","getActiveElement","activeElement","el","DOMContext","#root","boxWith","id","selector","callback","delay","timeoutId","AnimationsComplete","#opts","#currentFrame","#observer","#runId","#cleanup","runId","executeIfCurrent","#executeCallback","waitForAnimations","animations","animation","requestWaitForAnimations","startingStyleAttr","execute","PresenceManager","#enabled","#afterAnimations","#shouldRender","#transitionStatus","#hasMounted","#transitionFrame","$.set","#clearTransitionFrame","watch","isOpen","noop","BitsConfigContext","Context","getBitsConfig","fallback","BitsConfigState","resolveConfigOption","createConfigResolver","config","currentOpts","getter","createPropResolver","configOption","getProp","propValue","option","resolvePortalToProp","to","context","getAllContexts","target","getTarget","isBrowser","localTarget","instance","unmountInstance","unmount","disabled","mount","PortalConsumer","debounce","wait","timeout","pendingArgs","debounced","args","isOrContainsTarget","getOwnerDocument","getFirstNonCommentChild","isClickTrulyOutside","event","contentNode","clientX","clientY","rect","CONTEXT_MENU_TRIGGER_ATTR","CONTEXT_MENU_CONTENT_ATTR","DismissibleLayerState","#interactOutsideProp","#behaviorType","#interceptedEvents","#isResponsibleLayer","#capturedPointerDown","#isFocusInsideDOMTree","#documentObj","#onFocusOutside","#unsubClickListener","#destroyed","unsubEvents","registeredNode","cleanup","#resetState","#handleInteractOutside","enabled","nextNode","#addEventListeners","#handleFocus","#isTargetWithinLayer","document","onPointerDownCapture","#markInterceptedEvent","#markResponsibleLayer","onPointerDown","#markNonInterceptedEvent","#interactOutside","executeCallbacks","on","#handleDismiss","createWrappedEvent","isEventValid","isValidEvent","#isAnyEventIntercepted","backup","unsubClick","dismiss","isResponsibleLayer","eventType","#onfocuscapture","#onblurcapture","getTopMostDismissableLayer","layersArr","_","behaviorType","topMostLayer","firstLayerNode","isElementOrSVGElement","targetIsContextMenuTrigger","nodeIsContextMenu","capturedCurrentTarget","capturedTarget","newEvent","isPrevented","prop","interactOutsideBehavior","onInteractOutside","onFocusOutside","dismissibleLayerState","$.snippet","$.noop","EscapeLayerState","#addEventListener","#onkeydown","kbd.ESCAPE","isResponsibleEscapeLayer","clonedEvent","escapeKeydownBehavior","onEscapeKeydown","FocusScopeManager","#scopeStack","simpleBox","#focusHistory","#preFocusHistory","scope","current","candidateSelectors","candidateSelector","NoElement","matches","getRootNode","_isInert","lookUp","inertAtt","inert","result","isContentEditable","_node$getAttribute","attValue","getCandidates","includeContainer","filter","candidates","_getCandidatesIteratively","elements","elementsToCheck","assigned","content","nestedCandidates","validCandidate","shadowRoot","validShadowRoot","_nestedCandidates","hasTabIndex","getTabIndex","getSortOrderTabIndex","isScope","tabIndex","sortOrderedTabbables","a","b","isInput","isHiddenInput","isDetailsWithSummary","getCheckedRadio","nodes","form","i","isTabbableRadio","radioScope","queryRadios","name","radioSet","err","checked","isRadio","isNonTabbableRadio","isNodeAttached","_nodeRoot","nodeRoot","nodeRootHost","attached","_nodeRootHost","_node$ownerDocument","_nodeRoot2","_nodeRootHost2","isZeroArea","_node$getBoundingClie","width","height","isHidden","_ref","displayCheck","getShadowRoot","visible","_getComputedStyle","visibility","isDirectSummary","nodeUnderDetails","originalNode","parentElement","isDisabledFromFieldset","parentNode","isNodeMatchingSelectorFocusable","isNodeMatchingSelectorTabbable","isShadowRootTabbable","shadowHostNode","_sortByOrder","regularTabbables","orderedTabbables","item","candidateTabindex","sortable","tabbable","container","focusable","isTabbable","focusableCandidateSelector","isFocusable","retargetToScopeTree","scopeRoot","FocusScope","#paused","#container","#manager","#cleanupFns","#setupEventListeners","#handleOpenAutoFocus","#handleCloseAutoFocus","firstTabbable","#getFirstTabbable","preFocusedElement","doc","handleFocus","lastFocused","firstFocusable","#getAllFocusables","handleKeydown","tabbables","#getTabbables","first","elementToFocus","ref","trapFocus","loop","onCloseAutoFocus","onOpenAutoFocus","focusScopeState","noopPointer","TextSelectionLayerState","#unsubSelectionLock","#enabledSnapshot","#onPointerDownSnapshot","#onPointerUpSnapshot","onPointerUp","#resetSelectionLock","#pointerdown","#pointerup","isHighestLayer","preventTextSelectionOverflow","getUserSelect","body","originalBodyUserSelect","originalNodeUserSelect","setUserSelect","highestLayer","preventOverflowTextSelection","useId","prefix","SharedState","#factory","#subscribers","#state","#scope","factory","#dispose","$.effect_root","lockMap","MANAGED_PROPERTIES","initialProperties","hadInitialStyleAttribute","modifiedProperties","stopTouchMoveListener","cleanupTimeoutId","isInCleanupTransition","setManagedProperty","property","anyLocked","cleanupScheduledAt","bodyLockStackCount","restoreProperty","documentObj","initial","resetBodyStyle","isIOS","restorePointerEvents","cancelPendingCleanup","scheduleCleanupIfNoNewLocks","currentCleanupId","cleanupFn","isAnyLocked","actualDelay","ensureInitialStyleCaptured","htmlStyle","bodyStyle","hasStableGutter","verticalScrollbarWidth","BodyScrollLock","#id","#initialState","#restoreScrollDelay","#countState","initialState","restoreScrollDelay","map","preventScroll","FloatingRootContext","FloatingTooltipRootContext","FloatingRootState","tooltip","FloatingAnchorState","boxFrom","valueOrGetValue","getDPR","roundByDPR","dpr","getFloatingContentCSSVars","sides","min","max","round","floor","createCoords","oppositeSideMap","clamp","evaluate","param","getSide","placement","getAlignment","getOppositeAxis","axis","getAxisLength","getSideAxis","firstChar","getAlignmentAxis","getAlignmentSides","rects","rtl","alignment","alignmentAxis","mainAlignmentSide","getOppositePlacement","getExpandedPlacements","oppositePlacement","getOppositeAlignmentPlacement","lrPlacement","rlPlacement","tbPlacement","btPlacement","getSideList","side","isStart","getOppositeAxisPlacements","flipAlignment","direction","list","expandPaddingObject","padding","_padding$top","_padding$right","_padding$bottom","_padding$left","getPaddingObject","rectToClientRect","computeCoordsFromPlacement","reference","floating","sideAxis","alignLength","isVertical","commonX","commonY","commonAlign","coords","detectOverflow","_await$platform$isEle","platform","strategy","boundary","rootBoundary","elementContext","altBoundary","paddingObject","clippingClientRect","offsetParent","offsetScale","elementClientRect","MAX_RESET_COUNT","computePosition","middleware","platformWithDetectOverflow","statefulPlacement","resetCount","middlewareData","currentMiddleware","nextX","nextY","data","reset","arrow","arrowDimensions","isYAxis","minProp","maxProp","clientProp","endDiff","startDiff","arrowOffsetParent","clientSize","centerToReference","largestPossiblePadding","minPadding","maxPadding","center","offset","shouldAddOffset","alignmentOffset","flip","_middlewareData$arrow","_middlewareData$flip","initialPlacement","checkMainAxis","checkCrossAxis","specifiedFallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","detectOverflowOptions","initialSideAxis","isBasePlacement","fallbackPlacements","hasFallbackAxisSideDirection","placements","overflow","overflows","overflowsData","_middlewareData$flip2","_overflowsData$filter","nextIndex","nextPlacement","d","resetPlacement","_overflowsData$filter2","currentSideAxis","getSideOffsets","isAnySideFullyClipped","hide","offsets","originSides","convertValueToCoords","mainAxisMulti","crossAxisMulti","rawValue","mainAxis","crossAxis","_middlewareData$offse","diffCoords","shift","limiter","mainAxisCoord","crossAxisCoord","clampCoord","coord","limitedCoords","limitShift","_rawOffset$mainAxis","_rawOffset$crossAxis","rawOffset","computedOffset","len","limitMin","limitMax","_middlewareData$offse2","isOriginSide","apply","heightSide","widthSide","maximumClippingHeight","maximumClippingWidth","overflowAvailableHeight","overflowAvailableWidth","shiftData","noShift","availableHeight","availableWidth","nextDimensions","hasWindow","getNodeName","getDocumentElement","isElement","isOverflowElement","overflowX","overflowY","display","getComputedStyle","isTableElement","isTopLayer","willChangeRe","containRe","isNotNone","isWebKitValue","isContainingBlock","elementOrCss","css","isWebKit","getContainingBlock","currentNode","getParentNode","isLastTraversableNode","getNodeScroll","getNearestOverflowAncestor","getOverflowAncestors","traverseIframes","_node$ownerDocument2","scrollableAncestor","isBody","win","frameElement","getFrameElement","getCssDimensions","getComputedStyle$1","hasOffset","shouldFallback","unwrapElement","getScale","domElement","$","noOffsets","getVisualOffsets","shouldAddVisualOffsets","isFixed","floatingOffsetParent","getBoundingClientRect","includeScale","isFixedStrategy","clientRect","scale","visualOffsets","offsetWin","currentWin","currentIFrame","iframeScale","iframeRect","left","top","getWindowScrollBarX","leftScroll","getHTMLOffset","documentElement","scroll","htmlRect","convertOffsetParentRelativeRectToViewportRelativeRect","topLayer","isOffsetParentAnElement","offsetRect","htmlOffset","getClientRects","getDocumentRect","SCROLLBAR_MAX","getViewportRect","isLayoutViewport","visualViewport","layoutRelativeClientCoords","bodyStyles","bodyMarginInline","reservedWidth","gutter","getInnerBoundingClientRect","getClientRectFromClippingAncestor","clippingAncestor","getClippingElementAncestors","cache","cachedResult","lastKeptComputedStyle","elementIsFixed","computedStyle","currentNodeIsContaining","lastPosition","ancestor","getClippingRect","clippingAncestors","firstRect","right","bottom","getDimensions","getRectRelativeToOffsetParent","isStaticPositioned","getTrueOffsetParent","polyfill","rawOffsetParent","getOffsetParent","svgOffsetParent","getElementRects","getOffsetParentFn","getDimensionsFn","floatingDimensions","isRTL","rectsAreEqual","observeMove","onMove","ancestorResize","io","_io","refresh","skip","threshold","elementRectForRootMargin","insetTop","insetRight","insetBottom","insetLeft","isFirstUpdate","handleObserve","ratio","handleResize","autoUpdate","ancestorScroll","elementResize","layoutShift","animationFrame","referenceEl","ancestors","cleanupIo","reobserveFrame","resizeObserver","firstEntry","_resizeObserver","frameId","prevRefRect","frameLoop","nextRefRect","_resizeObserver2","offset$1","shift$1","flip$1","size$1","hide$1","arrow$1","limitShift$1","mergedOptions","platformWithCache","computePosition$1","useFloating","whileElementsMountedOption","openOption","middlewareOption","transformOption","placementOption","strategyOption","sideOffsetOption","alignOffsetOption","$.proxy","isPositioned","hasWhileMountedPosition","updateRequestId","destroyed","floatingStyles","xVal","yVal","whileElementsMountedCleanup","referenceNode","floatingNode","requestId","position","isReferenceHidden","maxExpectedOffset","attach","trackWhileMountedDeps","OPPOSITE_SIDE","FloatingContentContext","FloatingContentState","attachRef","#transformedStyle","cssToStyleObj","#updatePositionStrategy","#arrowSize","#arrowWidth","#arrowHeight","#desiredPlacement","#boundary","#hasExplicitBoundaries","#detectOverflowOptions","isNotNull","#availableWidth","#availableHeight","#anchorWidth","#anchorHeight","anchorWidth","anchorHeight","transformOrigin","#placedSide","getSideFromPlacement","#placedAlign","getAlignFromPlacement","#arrowBaseSide","#wrapperProps","#props","styleToString","customAnchor","rafId","zIndex","FloatingArrowState","isArrowHidden","arrowWidth","arrowHeight","placedSide","placedAlign","getSideAndAlignFromPlacement","noArrowAlign","arrowXCenter","arrowYCenter","align","sideOffset","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","hideWhenDetached","onPlaced","sticky","updatePositionStrategy","dir","wrapperId","contentState","mergedProps","mergeProps","onMount","isStatic","restProps","$.rest_props","rest_excludes","FloatingLayerContentStatic","FloatingLayerContent","$.spread_props","contentPointerEvents","resolvedPreventScroll","effectiveStrategy","PopperContent","$$arg0","floatingProps","wrapperProps","ScrollLock","consequent_1","node_1","focusScopeProps","EscapeLayer","DismissibleLayer","dismissibleProps","TextSelectionLayer","$0","PopperLayerInner","isPointInPolygon","point","polygon","isInside","j","xi","yi","xj","yj","isInsideRect","triggerRect","contentRect","triggerCenterX","triggerCenterY","contentCenterX","contentCenterY","deltaX","deltaY","SafePolygon","#buffer","#transitIntentTimeout","#exitPoint","#exitTarget","#transitTargets","#trackedTriggerNode","#leaveFallbackRafId","#transitIntentTimeoutId","#cancelLeaveFallback","#scheduleLeaveFallback","#clearTracking","#cancelTransitIntentTimeout","#scheduleTransitIntentTimeout","transitIntentTimeout","triggerNode","handlePointerMove","#onPointerMove","handleTriggerLeave","ignoredTargets","n","handleTriggerEnter","handleContentEnter","handleContentLeave","clientPoint","transitTarget","transitRect","transitSide","transitCorridor","#getCorridorPolygon","corridorPoly","targetRect","safePoly","#getSafePolygon","buffer","exitPoint","exitTarget","#flipSide","popoverAttrs","createBitsAttrs","PopoverRootContext","PopoverRootState","#closeTimeout","#domContext","#clearCloseTimeout","ctx","PopoverTriggerState","#openTimeout","#isHovering","#clearOpenTimeout","#clearAllTimeouts","isTouch","kbd.ENTER","kbd.SPACE","#getAriaControls","boolToStr","getDataOpenClosed","PopoverContentState","closestTrigger","#snippetProps","getDataTransitionAttrs","uid","$.props_id","createId","forceMount","effectiveTrapFocus","handleOpenAutoFocus","PopperLayerForceMount","props","finalProps","div","$.attribute_effect","div_1","node_3","$.child","$.reset","PopperLayer","div_2","div_3","node_6","consequent_3","open","onOpenChange","onOpenChangeComplete","FloatingLayer","sumCounts","files","additions","deletions","f","GENERATED","isGenerated","path","re","statusLetter","displayPath","base","HUNK_HEADER","diffRows","hunks","rows","nextOld","nextNew","readable","hunk","m","oldLine","newLine","oldCount","newCount","line","sign","text","languageFor","ext","LANGUAGES","placeTurnChanges","items","turns","prompts","byPrompt","placed","PopoverPrimitive_Root","$$value","PopoverPrimitive_Portal","PopoverPortal","cn","PopoverPrimitive_Content","dataSlot","$.bind_value","shikiLanguage","DOTFILES","isMarkdown","baseName","parentOf","parts","fuzzyScore","query","q","p","best","score","scoreFrom","nameStart","at","run","ch","fuzzyFilter","paths","limit","scored","FILE_TOOLS","firstChangedLine","l","toolFileTarget","ee","B","I","c","T","Me","K","Ce","Ee","Ie","U","Be","ne","me","xe","De","qe","se","Ze","ve","ie","He","be","Ge","Ne","Qe","oe","ke","je","Fe","Ue","Ke","Re","We","H","W","Xe","Ve","Te","Je","Ye","et","Oe","tt","nt","rt","st","we","it","ot","lt","ut","pt","ct","ht","dt","kt","gt","ft","mt","xt","bt","Pe","Y","Rt","Tt","Ot","ge","wt","Pt","fe","yt","St","ae","_t","te","$t","X","G","Lt","ye","P","Se","le","ue","u","z","pe","N","ce","V","_e","h","g","At","$e","o","k","S","R","C","Q","E","F","Le","Ae","he","Z","de","ze","O","L","M","w","A","D","J","zt","OWNER","NAME","SLUG","REF_URL","isRepoSlug","slug","parseRefNumber","parseGithubRefUrl","href","isRefShorthand","PULL","ISSUE_OPEN","ISSUE_CLOSED","githubRefVisual","LINE","LINE_SUFFIX","PATH_CHARS","EXTENSIONS","BARE_NAMES","DOTFILE","HOST","namesFile","parseFilePath","needDirectory","suffix","inDirectory","IN_PROSE","findFilePaths","found","candidate","hit","GITHUB_ALERTS","ALERT_MARK","markAlerts","tokens","quote","para","lead","mark","rest","ALLOWED","VOID","escapeText","decodeAttr","escapeAttr","isWebUrl","url","ATTR","rebuildTag","closing","attrs","media","allowed","kept","attr","src","PIECE","sanitizeGithubHtml","raw","out","tag","escapeHtml","hardBreak","breakParagraphs","splitText","hits","make","rewriteInline","rewrite","swapped","table","cell","BARE_REF","isPlainText","rewriteFor","github","fileLink","code","bareRefs","link","named","marked","Marked","titled","token","alert","inner","number","renderMarkdown","groupChecks","checks","describeChecks","failing","running","passing","visibleBody","readableComments","comments","said","refParam","repo","parseRefParam","TTL_MS","NOTHING_TTL_MS","MAX_ANSWERS","answers","githubRefKey","fetchRef","params","loadGithubRef","have","chipQuery","where","chipRef","drawChip","bare","words","icon","MAX_KEPT","fetchItem","peekGithubItem","loadGithubItem","fresh","loadSessionGithub","api","PROXIED","mediaHref","host","session","OPEN_MS","CLOSE_MS","RETRY_MS","shown","now","pressedOpenChip","pressedWith","wish","ago","formatAgo","RESOLVED","chipAt","resolve","show","mine","later","ms","onPointerOver","onPointerOut","onClick","by","onFocusIn","retried","retries","inView","seen","drawn","changes","change","listening","signal","Popover_Root","Popover_Content","$.first_child","fragment_3","$.sibling","p_1","text_2","$.only_child","p_2","span_1","iconify_icon_1","text_3","node_4","span_2","text_4","$.set_text","span_3","text_5","a_1","iconify_icon_2","text_1","styles","consequent_2","badgeVariants","tv","variant","$$element","$.bind_this"],"mappings":"0/BAMA,MAAMA,GAAM,OAAO,KAAK,EASjB,SAASC,GAAIC,EAAMC,EAASC,EAAW,CACzCC,IACHC,GAAY,EAGb,IAAIC,EAAW,IAAIC,GAAcN,CAAI,EAEjCO,EAAS,CAACC,GAAQ,EAEtBC,GAAM,IAAM,CACX,IAAIV,EAAME,EAAO,EAGbF,IAAQA,IACXA,EAA0BD,IAIvBS,GAAUR,IAAQ,MAAQ,OAAOA,GAAQ,WAC5CA,EAAwB,CAAA,GAGzBM,EAAS,OAAON,EAAKG,CAAS,CAC/B,CAAC,CACF,CCWO,SAASQ,GACfV,EACAW,EACAC,EAAgB,GAChBC,EAAM,GACNC,EAAS,GACTC,EAAe,GACd,CACD,IAAIC,EAAShB,EAGTiB,EAAQ,GAEZ,GAAIL,EAAe,CAClB,IAAIM,EAAsClB,EAEtCG,KACHa,EAASG,GAAiBC,GAAgBF,CAAW,CAAC,EAExD,CAEAG,GAAgB,IAAM,CACrB,IAAIC,EAAgCC,GAEpC,GAAIN,KAAWA,EAAQN,EAAS,GAAM,IAAK,CACtCR,IAAWC,GAAY,EAC3B,MACD,CAEA,GAAIQ,GAAiB,CAACT,GAAW,CAGhCmB,EAAO,MAAQ,KACfJ,EAAY,UAAmCD,EAE3CA,IAAU,IACbO,GAC8BJ,GAAgBF,CAAW,EAC3BA,EAAY,SAC9C,EAGG,MACD,CAOA,GALII,EAAO,QAAU,OACpBG,GAAkBH,EAA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AAM,EAAC,MAAK,EAElDk2C,GAAAJ,GAAA,IAAAz1C,EAAAL,CAAM,EAAC,OAAK,EAAA,EAAA,EAKde,GAAAs1C,GAAC,OAA4Bh2C,EAAAkzC,CAAK,EAAC,GAAG,2DA3BpClzC,EAAAkzC,CAAK,KAAIvzC,CAAM,GAAAkB,GAAAu1C,EAAA,+CAHb,CC7LA,MAAMC,GAAgBC,GAAG,CAC/B,KAAM,mZACN,SAAU,CACT,QAAS,CACR,QACC,iFACD,UACC,uFACD,YACC,4KACD,QAAS,wEACT,CACD,EACD,gBAAiB,CAChB,QAAS,SAAS,EAEnB,8GAKF,SAIC,IACCn+B,EAAG3Y,EAAAC,EAAA,MAAA,GAAa,IAAI,EAGpB82C,kBAAU,SAAS,EAEhBnf,EAAAC,GAAA53B,EAAA63B,EAAA,4BAOE73B,EAAA,KAAO,IAAM,OAAM,GAAA,CAAA+2C,EAAA51C,IAAA,CACd61C,GAAAD,EAAAhV,GAAArpB,SAAAA,GAAG,uDAIVif,SADGuK,GAAG0U,GAAc,CAAE,QAAAE,GAAO,CAAE,EAAC92C,EAAA,KAAA,gEAP7B","x_google_ignoreList":[0,1,2,3,4,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,66]}
|
|
1
|
+
{"version":3,"file":"BeYjnogg.js","sources":["../../../../../../../node_modules/.bun/svelte@5.57.3/node_modules/svelte/src/internal/client/dom/blocks/key.js","../../../../../../../node_modules/.bun/svelte@5.57.3/node_modules/svelte/src/internal/client/dom/blocks/html.js","../../../../../../../node_modules/.bun/svelte@5.57.3/node_modules/svelte/src/internal/client/dom/elements/actions.js","../../../../../../../node_modules/.bun/svelte@5.57.3/node_modules/svelte/src/internal/client/dom/elements/bindings/input.js","../../../../../../../node_modules/.bun/@sveltejs+kit@2.70.3+106f9c5330cbe027/node_modules/@sveltejs/kit/src/runtime/app/stores.js","../../../../../../src/lib/stores/drawer.svelte.ts","../../../../../../src/lib/components/SessionStateIndicator.svelte","../../../../../../src/lib/actions/longPress.ts","../../../../../../../node_modules/.bun/svelte@5.57.3/node_modules/svelte/src/reactivity/map.js","../../../../../../../node_modules/.bun/runed@0.35.1+ec0a64a97e9eb16b/node_modules/runed/dist/internal/utils/is.js","../../../../../../../node_modules/.bun/runed@0.35.1+ec0a64a97e9eb16b/node_modules/runed/dist/internal/utils/get.js","../../../../../../../node_modules/.bun/runed@0.35.1+ec0a64a97e9eb16b/node_modules/runed/dist/utilities/element-size/element-size.svelte.js","../../../../../../../node_modules/.bun/svelte-toolbelt@0.10.6+ec0a64a97e9eb16b/node_modules/svelte-toolbelt/dist/utils/on-destroy-effect.svelte.js","../../../../../../../node_modules/.bun/svelte-toolbelt@0.10.6+ec0a64a97e9eb16b/node_modules/svelte-toolbelt/dist/utils/after-tick.js","../../../../../../../node_modules/.bun/svelte-toolbelt@0.10.6+ec0a64a97e9eb16b/node_modules/svelte-toolbelt/dist/utils/dom.js","../../../../../../../node_modules/.bun/svelte-toolbelt@0.10.6+ec0a64a97e9eb16b/node_modules/svelte-toolbelt/dist/utils/dom-context.svelte.js","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/internal/animations-complete.js","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/internal/presence-manager.svelte.js","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/internal/noop.js","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/bits/utilities/portal/portal-consumer.svelte","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/bits/utilities/config/bits-config.js","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/bits/utilities/config/prop-resolvers.js","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/bits/utilities/portal/portal.svelte","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/internal/debounce.js","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/internal/elements.js","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/internal/dom.js","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/bits/menu/context-menu-attributes.js","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/bits/utilities/dismissible-layer/use-dismissable-layer.svelte.js","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/bits/utilities/dismissible-layer/dismissible-layer.svelte","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/bits/utilities/escape-layer/use-escape-layer.svelte.js","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/bits/utilities/escape-layer/escape-layer.svelte","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/bits/utilities/focus-scope/focus-scope-manager.js","../../../../../../../node_modules/.bun/tabbable@6.5.1/node_modules/tabbable/dist/index.esm.js","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/bits/utilities/focus-scope/focus-scope.svelte.js","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/bits/utilities/focus-scope/focus-scope.svelte","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/bits/utilities/text-selection-layer/use-text-selection-layer.svelte.js","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/bits/utilities/text-selection-layer/text-selection-layer.svelte","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/internal/use-id.js","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/internal/shared-state.svelte.js","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/internal/body-scroll-lock.svelte.js","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/bits/utilities/scroll-lock/scroll-lock.svelte","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/bits/utilities/floating-layer/floating-root.svelte.js","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/bits/utilities/floating-layer/components/floating-layer.svelte","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/internal/floating-svelte/floating-utils.svelte.js","../../../../../../../node_modules/.bun/@floating-ui+utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs","../../../../../../../node_modules/.bun/@floating-ui+core@1.8.0/node_modules/@floating-ui/core/dist/floating-ui.core.mjs","../../../../../../../node_modules/.bun/@floating-ui+utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs","../../../../../../../node_modules/.bun/@floating-ui+dom@1.8.0/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/internal/floating-svelte/use-floating.svelte.js","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/bits/utilities/floating-layer/use-floating-layer.svelte.js","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/bits/utilities/floating-layer/components/floating-layer-content.svelte","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/bits/utilities/floating-layer/components/floating-layer-content-static.svelte","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/bits/utilities/popper-layer/popper-content.svelte","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/bits/utilities/popper-layer/popper-layer-inner.svelte","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/bits/utilities/popper-layer/popper-layer.svelte","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/bits/utilities/popper-layer/popper-layer-force-mount.svelte","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/internal/safe-polygon.svelte.js","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/bits/popover/popover.svelte.js","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/bits/popover/components/popover-content.svelte","../../../../../../../node_modules/.bun/bits-ui@2.20.2+2df16ea90105ef5c/node_modules/bits-ui/dist/bits/popover/components/popover.svelte","../../../../../../src/lib/side-panel/changes.ts","../../../../../../src/lib/components/ui/popover/popover.svelte","../../../../../../src/lib/components/ui/popover/popover-portal.svelte","../../../../../../src/lib/components/ui/popover/popover-content.svelte","../../../../../../src/lib/components/ui/input/input.svelte","../../../../../../src/lib/side-panel/files.ts","../../../../../../../node_modules/.bun/marked@18.1.2/node_modules/marked/lib/marked.esm.js","../../../../../../../src/github-ref.ts","../../../../../../src/lib/file-paths.ts","../../../../../../src/lib/github-html.ts","../../../../../../src/lib/markdown.ts","../../../../../../../src/github-item.ts","../../../../../../src/lib/github-refs.ts","../../../../../../src/lib/github-items.ts","../../../../../../src/lib/components/GithubRefCards.svelte","../../../../../../src/lib/components/ui/badge/badge.svelte"],"sourcesContent":["/** @import { TemplateNode } from '#client' */\nimport { is_runes } from '../../context.js';\nimport { block } from '../../reactivity/effects.js';\nimport { hydrate_next, hydrating } from '../hydration.js';\nimport { BranchManager } from './branches.js';\n\nconst NAN = Symbol('NaN');\n\n/**\n * @template V\n * @param {TemplateNode} node\n * @param {() => V} get_key\n * @param {(anchor: Node) => TemplateNode | void} render_fn\n * @returns {void}\n */\nexport function key(node, get_key, render_fn) {\n\tif (hydrating) {\n\t\thydrate_next();\n\t}\n\n\tvar branches = new BranchManager(node);\n\n\tvar legacy = !is_runes();\n\n\tblock(() => {\n\t\tvar key = get_key();\n\n\t\t// NaN !== NaN, hence we do this workaround to not trigger remounts unnecessarily\n\t\tif (key !== key) {\n\t\t\tkey = /** @type {any} */ (NAN);\n\t\t}\n\n\t\t// key blocks in Svelte <5 had stupid semantics\n\t\tif (legacy && key !== null && typeof key === 'object') {\n\t\t\tkey = /** @type {V} */ ({});\n\t\t}\n\n\t\tbranches.ensure(key, render_fn);\n\t});\n}\n","/** @import { Effect, TemplateNode } from '#client' */\n/** @import {} from 'trusted-types' */\nimport {\n\tFILENAME,\n\tHYDRATION_ERROR,\n\tNAMESPACE_SVG,\n\tNAMESPACE_MATHML\n} from '../../../../constants.js';\nimport { remove_effect_dom, template_effect } from '../../reactivity/effects.js';\nimport { hydrate_next, hydrate_node, hydrating, set_hydrate_node } from '../hydration.js';\n\nimport { assign_nodes } from '../template.js';\nimport * as w from '../../warnings.js';\nimport { hash, sanitize_location } from '../../../../utils.js';\nimport { DEV } from 'esm-env';\nimport { dev_current_component_function } from '../../context.js';\nimport { create_element, get_first_child, get_next_sibling } from '../operations.js';\nimport { active_effect } from '../../runtime.js';\nimport { COMMENT_NODE } from '#client/constants';\n\n/**\n * @param {Element} element\n * @param {string | null} server_hash\n * @param {string | TrustedHTML} value\n */\nfunction check_hash(element, server_hash, value) {\n\tif (!server_hash || server_hash === hash(String(value ?? ''))) return;\n\n\tlet location;\n\n\t// @ts-expect-error\n\tconst loc = element.__svelte_meta?.loc;\n\tif (loc) {\n\t\tlocation = `near ${loc.file}:${loc.line}:${loc.column}`;\n\t} else if (dev_current_component_function?.[FILENAME]) {\n\t\tlocation = `in ${dev_current_component_function[FILENAME]}`;\n\t}\n\n\tw.hydration_html_changed(sanitize_location(location));\n}\n\n/**\n * @param {Element | Text | Comment} node\n * @param {() => string | TrustedHTML} get_value\n * @param {boolean} [is_controlled]\n * @param {boolean} [svg]\n * @param {boolean} [mathml]\n * @param {boolean} [skip_warning]\n * @returns {void}\n */\nexport function html(\n\tnode,\n\tget_value,\n\tis_controlled = false,\n\tsvg = false,\n\tmathml = false,\n\tskip_warning = false\n) {\n\tvar anchor = node;\n\n\t/** @type {string | TrustedHTML} */\n\tvar value = '';\n\n\tif (is_controlled) {\n\t\tvar parent_node = /** @type {Element} */ (node);\n\n\t\tif (hydrating) {\n\t\t\tanchor = set_hydrate_node(get_first_child(parent_node));\n\t\t}\n\t}\n\n\ttemplate_effect(() => {\n\t\tvar effect = /** @type {Effect} */ (active_effect);\n\n\t\tif (value === (value = get_value() ?? '')) {\n\t\t\tif (hydrating) hydrate_next();\n\t\t\treturn;\n\t\t}\n\n\t\tif (is_controlled && !hydrating) {\n\t\t\t// When @html is the only child, use innerHTML directly.\n\t\t\t// This also handles contenteditable, where the user may delete the anchor comment.\n\t\t\teffect.nodes = null;\n\t\t\tparent_node.innerHTML = /** @type {string} */ (value);\n\n\t\t\tif (value !== '') {\n\t\t\t\tassign_nodes(\n\t\t\t\t\t/** @type {TemplateNode} */ (get_first_child(parent_node)),\n\t\t\t\t\t/** @type {TemplateNode} */ (parent_node.lastChild)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tif (effect.nodes !== null) {\n\t\t\tremove_effect_dom(effect.nodes.start, /** @type {TemplateNode} */ (effect.nodes.end));\n\t\t\teffect.nodes = null;\n\t\t}\n\n\t\tif (value === '') return;\n\n\t\tif (hydrating) {\n\t\t\t// We're deliberately not trying to repair mismatches between server and client,\n\t\t\t// as it's costly and error-prone (and it's an edge case to have a mismatch anyway)\n\t\t\tvar hash = /** @type {Comment} */ (hydrate_node).data;\n\n\t\t\t/** @type {TemplateNode | null} */\n\t\t\tvar next = hydrate_next();\n\t\t\tvar last = next;\n\n\t\t\twhile (\n\t\t\t\tnext !== null &&\n\t\t\t\t(next.nodeType !== COMMENT_NODE || /** @type {Comment} */ (next).data !== '')\n\t\t\t) {\n\t\t\t\tlast = next;\n\t\t\t\tnext = get_next_sibling(next);\n\t\t\t}\n\n\t\t\tif (next === null) {\n\t\t\t\tw.hydration_mismatch();\n\t\t\t\tthrow HYDRATION_ERROR;\n\t\t\t}\n\n\t\t\tif (DEV && !skip_warning) {\n\t\t\t\tcheck_hash(/** @type {Element} */ (next.parentNode), hash, value);\n\t\t\t}\n\n\t\t\tassign_nodes(hydrate_node, last);\n\t\t\tanchor = set_hydrate_node(next);\n\t\t\treturn;\n\t\t}\n\n\t\t// Don't use create_fragment_with_script_from_html here because that would mean script tags are executed.\n\t\t// @html is basically `.innerHTML = ...` and that doesn't execute scripts either due to security reasons.\n\t\t// Use a <template>, <svg>, or <math> wrapper depending on context. If value is a TrustedHTML object,\n\t\t// it will be assigned directly to innerHTML without coercion — this allows {@html policy.createHTML(...)} to work.\n\t\tvar ns = svg ? NAMESPACE_SVG : mathml ? NAMESPACE_MATHML : undefined;\n\t\tvar wrapper = /** @type {HTMLTemplateElement | SVGElement | MathMLElement} */ (\n\t\t\tcreate_element(svg ? 'svg' : mathml ? 'math' : 'template', ns)\n\t\t);\n\t\twrapper.innerHTML = /** @type {any} */ (value);\n\n\t\t/** @type {DocumentFragment | Element} */\n\t\tvar node = svg || mathml ? wrapper : /** @type {HTMLTemplateElement} */ (wrapper).content;\n\n\t\tassign_nodes(\n\t\t\t/** @type {TemplateNode} */ (get_first_child(node)),\n\t\t\t/** @type {TemplateNode} */ (node.lastChild)\n\t\t);\n\n\t\tif (svg || mathml) {\n\t\t\twhile (get_first_child(node)) {\n\t\t\t\tanchor.before(/** @type {TemplateNode} */ (get_first_child(node)));\n\t\t\t}\n\t\t} else {\n\t\t\tanchor.before(node);\n\t\t}\n\t});\n}\n","/** @import { ActionPayload } from '#client' */\nimport { effect, render_effect } from '../../reactivity/effects.js';\nimport { safe_not_equal } from '../../reactivity/equality.js';\nimport { deep_read_state, untrack } from '../../runtime.js';\n\n/**\n * @template P\n * @param {Element} dom\n * @param {(dom: Element, value?: P) => ActionPayload<P>} action\n * @param {() => P} [get_value]\n * @returns {void}\n */\nexport function action(dom, action, get_value) {\n\teffect(() => {\n\t\tvar payload = untrack(() => action(dom, get_value?.()) || {});\n\n\t\tif (get_value && payload?.update) {\n\t\t\tvar inited = false;\n\t\t\t/** @type {P} */\n\t\t\tvar prev = /** @type {any} */ ({}); // initialize with something so it's never equal on first run\n\n\t\t\trender_effect(() => {\n\t\t\t\tvar value = get_value();\n\n\t\t\t\t// Action's update method is coarse-grained, i.e. when anything in the passed value changes, update.\n\t\t\t\t// This works in legacy mode because of mutable_source being updated as a whole, but when using $state\n\t\t\t\t// together with actions and mutation, it wouldn't notice the change without a deep read.\n\t\t\t\tdeep_read_state(value);\n\n\t\t\t\tif (inited && safe_not_equal(prev, value)) {\n\t\t\t\t\tprev = value;\n\t\t\t\t\t/** @type {Function} */ (payload.update)(value);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tinited = true;\n\t\t}\n\n\t\tif (payload?.destroy) {\n\t\t\treturn () => /** @type {Function} */ (payload.destroy)();\n\t\t}\n\t});\n}\n","/** @import { Batch } from '../../../reactivity/batch.js' */\nimport { DEV } from 'esm-env';\nimport { render_effect, teardown } from '../../../reactivity/effects.js';\nimport { listen_to_event_and_reset_event } from './shared.js';\nimport * as e from '../../../errors.js';\nimport { is } from '../../../proxy.js';\nimport { queue_micro_task } from '../../task.js';\nimport { hydrating } from '../../hydration.js';\nimport { tick, untrack } from '../../../runtime.js';\nimport { current_batch, previous_batch } from '../../../reactivity/batch.js';\nimport { async_mode_flag } from '../../../../flags/index.js';\n\n/**\n * @param {HTMLInputElement} input\n * @param {() => unknown} get\n * @param {(value: unknown) => void} set\n * @returns {void}\n */\nexport function bind_value(input, get, set = get) {\n\tvar batches = new WeakSet();\n\n\tlisten_to_event_and_reset_event(input, 'input', async (is_reset) => {\n\t\tif (DEV && input.type === 'checkbox') {\n\t\t\t// TODO should this happen in prod too?\n\t\t\te.bind_invalid_checkbox_value();\n\t\t}\n\n\t\t/** @type {any} */\n\t\tvar value = is_reset ? input.defaultValue : input.value;\n\t\tvalue = is_numberlike_input(input) ? to_number(value) : value;\n\t\tset(value);\n\n\t\tif (current_batch !== null) {\n\t\t\tbatches.add(current_batch);\n\t\t}\n\n\t\t// Because `{#each ...}` blocks work by updating sources inside the flush,\n\t\t// we need to wait a tick before checking to see if we should forcibly\n\t\t// update the input and reset the selection state\n\t\tawait tick();\n\n\t\t// Respect any validation in accessors\n\t\tif (value !== (value = get())) {\n\t\t\tvar start = input.selectionStart;\n\t\t\tvar end = input.selectionEnd;\n\t\t\tvar length = input.value.length;\n\n\t\t\t// the value is coerced on assignment\n\t\t\tinput.value = value ?? '';\n\n\t\t\t// Restore selection\n\t\t\tif (end !== null) {\n\t\t\t\tvar new_length = input.value.length;\n\t\t\t\t// If cursor was at end and new input is longer, move cursor to new end\n\t\t\t\tif (start === end && end === length && new_length > length) {\n\t\t\t\t\tinput.selectionStart = new_length;\n\t\t\t\t\tinput.selectionEnd = new_length;\n\t\t\t\t} else {\n\t\t\t\t\tinput.selectionStart = start;\n\t\t\t\t\tinput.selectionEnd = Math.min(end, new_length);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\n\tif (\n\t\t// If we are hydrating and the value has since changed,\n\t\t// then use the updated value from the input instead.\n\t\t(hydrating && input.defaultValue !== input.value) ||\n\t\t// If defaultValue is set, then value == defaultValue\n\t\t// TODO Svelte 6: remove input.value check and set to empty string?\n\t\t(untrack(get) == null && input.value)\n\t) {\n\t\tset(is_numberlike_input(input) ? to_number(input.value) : input.value);\n\n\t\tif (current_batch !== null) {\n\t\t\tbatches.add(current_batch);\n\t\t}\n\t}\n\n\trender_effect(() => {\n\t\tif (DEV && input.type === 'checkbox') {\n\t\t\t// TODO should this happen in prod too?\n\t\t\te.bind_invalid_checkbox_value();\n\t\t}\n\n\t\tvar value = get();\n\n\t\tif (input === document.activeElement) {\n\t\t\t// In sync mode render effects are executed during tree traversal -> needs current_batch\n\t\t\t// In async mode render effects are flushed once batch resolved, at which point current_batch is null -> needs previous_batch\n\t\t\tvar batch = /** @type {Batch} */ (async_mode_flag ? previous_batch : current_batch);\n\n\t\t\t// Never rewrite the contents of a focused input. We can get here if, for example,\n\t\t\t// an update is deferred because of async work depending on the input:\n\t\t\t//\n\t\t\t// <input bind:value={query}>\n\t\t\t// <p>{await find(query)}</p>\n\t\t\tif (batches.has(batch)) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tif (is_numberlike_input(input) && value === to_number(input.value)) {\n\t\t\t// handles 0 vs 00 case (see https://github.com/sveltejs/svelte/issues/9959)\n\t\t\treturn;\n\t\t}\n\n\t\tif (input.type === 'date' && !value && !input.value) {\n\t\t\t// Handles the case where a temporarily invalid date is set (while typing, for example with a leading 0 for the day)\n\t\t\t// and prevents this state from clearing the other parts of the date input (see https://github.com/sveltejs/svelte/issues/7897)\n\t\t\treturn;\n\t\t}\n\n\t\t// don't set the value of the input if it's the same to allow\n\t\t// minlength to work properly\n\t\tif (value !== input.value) {\n\t\t\t// @ts-expect-error the value is coerced on assignment\n\t\t\tinput.value = value ?? '';\n\t\t}\n\t});\n}\n\n/** @type {Set<HTMLInputElement[]>} */\nconst pending = new Set();\n\n/**\n * @param {HTMLInputElement[]} inputs\n * @param {null | [number]} group_index\n * @param {HTMLInputElement} input\n * @param {() => unknown} get\n * @param {(value: unknown) => void} set\n * @returns {void}\n */\nexport function bind_group(inputs, group_index, input, get, set = get) {\n\tvar is_checkbox = input.getAttribute('type') === 'checkbox';\n\tvar binding_group = inputs;\n\n\t// needs to be let or related code isn't treeshaken out if it's always false\n\tlet hydration_mismatch = false;\n\n\tif (group_index !== null) {\n\t\tfor (var index of group_index) {\n\t\t\t// @ts-expect-error\n\t\t\tbinding_group = binding_group[index] ??= [];\n\t\t}\n\t}\n\n\tbinding_group.push(input);\n\n\tlisten_to_event_and_reset_event(\n\t\tinput,\n\t\t'change',\n\t\t() => {\n\t\t\t// @ts-ignore\n\t\t\tvar value = input.__value;\n\n\t\t\tif (is_checkbox) {\n\t\t\t\tvalue = get_binding_group_value(binding_group, value, input.checked);\n\t\t\t}\n\n\t\t\tset(value);\n\t\t},\n\t\t// TODO better default value handling\n\t\t() => set(is_checkbox ? [] : null)\n\t);\n\n\trender_effect(() => {\n\t\tvar value = get();\n\n\t\t// If we are hydrating and the value has since changed, then use the update value\n\t\t// from the input instead.\n\t\tif (hydrating && input.defaultChecked !== input.checked) {\n\t\t\thydration_mismatch = true;\n\t\t\treturn;\n\t\t}\n\n\t\tif (is_checkbox) {\n\t\t\tvalue = value || [];\n\t\t\t// @ts-ignore\n\t\t\tinput.checked = value.includes(input.__value);\n\t\t} else {\n\t\t\t// @ts-ignore\n\t\t\tinput.checked = is(input.__value, value);\n\t\t}\n\t});\n\n\tteardown(() => {\n\t\tvar index = binding_group.indexOf(input);\n\n\t\tif (index !== -1) {\n\t\t\tbinding_group.splice(index, 1);\n\t\t}\n\t});\n\n\tif (!pending.has(binding_group)) {\n\t\tpending.add(binding_group);\n\n\t\tqueue_micro_task(() => {\n\t\t\t// necessary to maintain binding group order in all insertion scenarios\n\t\t\tbinding_group.sort((a, b) => (a.compareDocumentPosition(b) === 4 ? -1 : 1));\n\t\t\tpending.delete(binding_group);\n\t\t});\n\t}\n\n\tqueue_micro_task(() => {\n\t\tif (hydration_mismatch) {\n\t\t\tvar value;\n\n\t\t\tif (is_checkbox) {\n\t\t\t\tvalue = get_binding_group_value(binding_group, value, input.checked);\n\t\t\t} else {\n\t\t\t\tvar hydration_input = binding_group.find((input) => input.checked);\n\t\t\t\t// @ts-ignore\n\t\t\t\tvalue = hydration_input?.__value;\n\t\t\t}\n\n\t\t\tset(value);\n\t\t}\n\t});\n}\n\n/**\n * @param {HTMLInputElement} input\n * @param {() => unknown} get\n * @param {(value: unknown) => void} set\n * @returns {void}\n */\nexport function bind_checked(input, get, set = get) {\n\tlisten_to_event_and_reset_event(input, 'change', (is_reset) => {\n\t\tvar value = is_reset ? input.defaultChecked : input.checked;\n\t\tset(value);\n\t});\n\n\tif (\n\t\t// If we are hydrating and the value has since changed,\n\t\t// then use the update value from the input instead.\n\t\t(hydrating && input.defaultChecked !== input.checked) ||\n\t\t// If defaultChecked is set, then checked == defaultChecked\n\t\tuntrack(get) == null\n\t) {\n\t\tset(input.checked);\n\t}\n\n\trender_effect(() => {\n\t\tvar value = get();\n\t\tinput.checked = Boolean(value);\n\t});\n}\n\n/**\n * @template V\n * @param {Array<HTMLInputElement>} group\n * @param {V} __value\n * @param {boolean} checked\n * @returns {V[]}\n */\nfunction get_binding_group_value(group, __value, checked) {\n\t/** @type {Set<V>} */\n\tvar value = new Set();\n\n\tfor (var i = 0; i < group.length; i += 1) {\n\t\tif (group[i].checked) {\n\t\t\t// @ts-ignore\n\t\t\tvalue.add(group[i].__value);\n\t\t}\n\t}\n\n\tif (!checked) {\n\t\tvalue.delete(__value);\n\t}\n\n\treturn Array.from(value);\n}\n\n/**\n * @param {HTMLInputElement} input\n */\nfunction is_numberlike_input(input) {\n\tvar type = input.type;\n\treturn type === 'number' || type === 'range';\n}\n\n/**\n * @param {string} value\n */\nfunction to_number(value) {\n\treturn value === '' ? null : +value;\n}\n\n/**\n * @param {HTMLInputElement} input\n * @param {() => FileList | null} get\n * @param {(value: FileList | null) => void} set\n */\nexport function bind_files(input, get, set = get) {\n\tlisten_to_event_and_reset_event(input, 'change', () => {\n\t\tset(input.files);\n\t});\n\n\tif (\n\t\t// If we are hydrating and the value has since changed,\n\t\t// then use the updated value from the input instead.\n\t\thydrating &&\n\t\tinput.files\n\t) {\n\t\tset(input.files);\n\t}\n\n\trender_effect(() => {\n\t\tinput.files = get();\n\t});\n}\n","import { getContext } from 'svelte';\nimport { BROWSER, DEV } from 'esm-env';\nimport { stores as browser_stores } from '../client/client.js';\n\n/**\n * A function that returns all of the contextual stores. On the server, this must be called during component initialization.\n * Only use this if you need to defer store subscription until after the component has mounted, for some reason.\n *\n * @deprecated Use `$app/state` instead (requires Svelte 5, [see docs for more info](https://svelte.dev/docs/kit/migrating-to-sveltekit-2#SvelteKit-2.12:-$app-stores-deprecated))\n */\nexport const getStores = () => {\n\tconst stores = BROWSER ? browser_stores : getContext('__svelte__');\n\n\treturn {\n\t\t/** @type {typeof page} */\n\t\tpage: {\n\t\t\tsubscribe: stores.page.subscribe\n\t\t},\n\t\t/** @type {typeof navigating} */\n\t\tnavigating: {\n\t\t\tsubscribe: stores.navigating.subscribe\n\t\t},\n\t\t/** @type {typeof updated} */\n\t\tupdated: stores.updated\n\t};\n};\n\n/**\n * A readable store whose value contains page data.\n *\n * On the server, this store can only be subscribed to during component initialization. In the browser, it can be subscribed to at any time.\n *\n * @deprecated Use `page` from `$app/state` instead (requires Svelte 5, [see docs for more info](https://svelte.dev/docs/kit/migrating-to-sveltekit-2#SvelteKit-2.12:-$app-stores-deprecated))\n * @type {import('svelte/store').Readable<import('@sveltejs/kit').Page>}\n */\nexport const page = {\n\tsubscribe(fn) {\n\t\tconst store = DEV ? get_store('page') : getStores().page;\n\t\treturn store.subscribe(fn);\n\t}\n};\n\n/**\n * A readable store.\n * When navigating starts, its value is a `Navigation` object with `from`, `to`, `type` and (if `type === 'popstate'`) `delta` properties.\n * When navigating finishes, its value reverts to `null`.\n *\n * On the server, this store can only be subscribed to during component initialization. In the browser, it can be subscribed to at any time.\n *\n * @deprecated Use `navigating` from `$app/state` instead (requires Svelte 5, [see docs for more info](https://svelte.dev/docs/kit/migrating-to-sveltekit-2#SvelteKit-2.12:-$app-stores-deprecated))\n * @type {import('svelte/store').Readable<import('@sveltejs/kit').Navigation | null>}\n */\nexport const navigating = {\n\tsubscribe(fn) {\n\t\tconst store = DEV ? get_store('navigating') : getStores().navigating;\n\t\treturn store.subscribe(fn);\n\t}\n};\n\n/**\n * A readable store whose initial value is `false`. If [`version.pollInterval`](https://svelte.dev/docs/kit/configuration#version) is a non-zero value, SvelteKit will poll for new versions of the app and update the store value to `true` when it detects one. `updated.check()` will force an immediate check, regardless of polling.\n *\n * On the server, this store can only be subscribed to during component initialization. In the browser, it can be subscribed to at any time.\n *\n * @deprecated Use `updated` from `$app/state` instead (requires Svelte 5, [see docs for more info](https://svelte.dev/docs/kit/migrating-to-sveltekit-2#SvelteKit-2.12:-$app-stores-deprecated))\n * @type {import('svelte/store').Readable<boolean> & { check(): Promise<boolean> }}\n */\nexport const updated = {\n\tsubscribe(fn) {\n\t\tconst store = DEV ? get_store('updated') : getStores().updated;\n\n\t\tif (BROWSER) {\n\t\t\tupdated.check = store.check;\n\t\t}\n\n\t\treturn store.subscribe(fn);\n\t},\n\tcheck: () => {\n\t\tthrow new Error(\n\t\t\tBROWSER\n\t\t\t\t? 'Cannot check updated store before subscribing'\n\t\t\t\t: 'Can only check updated store in browser'\n\t\t);\n\t}\n};\n\n/**\n * @template {keyof ReturnType<typeof getStores>} Name\n * @param {Name} name\n * @returns {ReturnType<typeof getStores>[Name]}\n */\nfunction get_store(name) {\n\ttry {\n\t\treturn getStores()[name];\n\t} catch {\n\t\tthrow new Error(\n\t\t\t`Cannot subscribe to '${name}' store on the server outside of a Svelte component, as it is bound to the current request via component context. This prevents state from leaking between users.` +\n\t\t\t\t'For more information, see https://svelte.dev/docs/kit/state-management#avoid-shared-state-on-the-server'\n\t\t);\n\t}\n}\n","/**\n * Whether the sidebar drawer is open on narrow viewports.\n *\n * The session page's composer carries the toggle now that the page header is\n * gone, and the layout owns the drawer itself — so the two talk through this\n * rather than through a floating button drawn over the transcript.\n */\n/** Narrower than this, the sidebar is a drawer over the page. Mirrors the `@media` in `+layout.svelte`. */\nexport const DRAWER_MEDIA_QUERY = '(max-width: 768px)';\n\nclass DrawerStore {\n open = $state(false);\n\n toggle() {\n this.open = !this.open;\n }\n\n close() {\n this.open = false;\n }\n}\n\nexport const drawer = new DrawerStore();\n","<script lang=\"ts\">\n\timport { sessionStateVisual, type IndicatorState } from '$shared/session-state.js';\n\n\tlet {\n\t\tstate,\n\t\tsize = 'md',\n\t\ttitle = null\n\t}: { state: IndicatorState; size?: 'sm' | 'md' | 'lg'; title?: string | null } = $props();\n\n\tconst visual = $derived(sessionStateVisual(state));\n\t// A dot reads heavier than a glyph, so it is drawn smaller at the same density.\n\tconst px = $derived(\n\t\t{ sm: { dot: 7, icon: 13 }, md: { dot: 8, icon: 15 }, lg: { dot: 12, icon: 18 } }[size]\n\t);\n\tconst label = $derived(title || visual.label);\n\t// Start every pulse at the same point of the wall clock's cycle (1.6s, as\n\t// in app.css), so dots that start pulsing at different moments still blink together.\n\tconst phase = $derived(visual.pulse ? -(Date.now() % 1600) : 0);\n</script>\n\n{#if visual.icon}\n\t<iconify-icon\n\t\tclass=\"state-icon\"\n\t\ticon={visual.icon}\n\t\tstyle=\"color: {visual.color}; font-size: {px.icon}px;\"\n\t\trole=\"img\"\n\t\taria-label={label}\n\t\t{title}\n\t></iconify-icon>\n{:else}\n\t<span\n\t\tclass=\"state-dot\"\n\t\tclass:pulse-dot={visual.pulse}\n\t\tstyle=\"background: {visual.color}; width: {px.dot}px; height: {px.dot}px; animation-delay: {phase}ms;\"\n\t\trole=\"img\"\n\t\taria-label={label}\n\t\t{title}\n\t></span>\n{/if}\n\n<style>\n\t.state-icon {\n\t\tflex-shrink: 0;\n\t\tline-height: 1;\n\t}\n\n\t/* .pulse-dot (app.css) is animation-only; the shape lives here. */\n\t.state-dot {\n\t\tdisplay: inline-block;\n\t\tborder-radius: 50%;\n\t\tflex-shrink: 0;\n\t}\n</style>\n","export interface LongPressOptions {\n\tms?: number;\n\tonTrigger: () => void;\n\t/**\n\t * The press that triggered has ended. For a hold that shows something for\n\t * as long as it is held — a tooltip, a preview — rather than one that\n\t * hands over to a menu outliving the finger.\n\t */\n\tonRelease?: () => void;\n\tenabled?: () => boolean;\n}\n\nexport interface LongPressAction {\n\tdestroy(): void;\n\tupdate(opts: LongPressOptions): void;\n}\n\n/**\n * A press that has moved this far is a drag, not a hold. Wide enough to let a\n * hand rest, narrow enough that the browser has not yet started a native drag\n * (which it does after a few pixels on a `draggable` element).\n */\nconst MOVE_TOLERANCE_PX = 6;\n\n/**\n * A long press is a hold that stays put. Moving ends it, and so does the\n * browser starting a drag from the same element: on a `draggable` row the\n * mouse events stop arriving once the drag is under way, so without watching\n * `dragstart` the timer would fire mid-drag and open whatever the hold opens\n * on top of the drop. The other way round, a hold that has already triggered\n * refuses the drag that a finger sliding off it would otherwise begin.\n */\nexport function longPress(node: HTMLElement, options: LongPressOptions): LongPressAction {\n\tlet opts = options;\n\tlet timer: ReturnType<typeof setTimeout> | null = null;\n\tlet triggered = false;\n\tlet originX = 0;\n\tlet originY = 0;\n\n\t/**\n\t * A touch screen answers a press of its own accord: it selects the word\n\t * under the finger and raises the callout menu, and the tap that follows\n\t * never reaches the element — the hold looks to the user like the tap did\n\t * nothing but highlight some text. Every element that takes a long press\n\t * wants that suppressed, so it is set here rather than left to each\n\t * caller's stylesheet to remember.\n\t */\n\tnode.style.userSelect = 'none';\n\tnode.style.setProperty('-webkit-user-select', 'none');\n\tnode.style.setProperty('-webkit-touch-callout', 'none');\n\tif (!node.style.touchAction) node.style.touchAction = 'manipulation';\n\n\tfunction clear(): void {\n\t\tif (timer) {\n\t\t\tclearTimeout(timer);\n\t\t\ttimer = null;\n\t\t}\n\t}\n\n\tfunction start(x: number, y: number): void {\n\t\tif (opts.enabled && !opts.enabled()) return;\n\t\ttriggered = false;\n\t\toriginX = x;\n\t\toriginY = y;\n\t\tclear();\n\t\ttimer = setTimeout(() => {\n\t\t\ttimer = null;\n\t\t\ttriggered = true;\n\t\t\topts.onTrigger();\n\t\t}, opts.ms ?? 500);\n\t}\n\n\t/**\n\t * End the press. `triggered` stays set, because the click that follows a\n\t * mouse hold still has to be swallowed by the capture handler.\n\t */\n\tfunction release(): void {\n\t\tconst held = triggered;\n\t\tclear();\n\t\tif (held) opts.onRelease?.();\n\t}\n\n\tfunction moved(x: number, y: number): boolean {\n\t\treturn Math.abs(x - originX) > MOVE_TOLERANCE_PX || Math.abs(y - originY) > MOVE_TOLERANCE_PX;\n\t}\n\n\tfunction onMouseDown(e: MouseEvent): void {\n\t\tif (e.button !== 0) return;\n\t\tstart(e.clientX, e.clientY);\n\t}\n\n\tfunction onMouseMove(e: MouseEvent): void {\n\t\tif (timer && moved(e.clientX, e.clientY)) clear();\n\t}\n\n\tfunction onTouchStart(e: TouchEvent): void {\n\t\tconst t = e.touches[0];\n\t\tstart(t?.clientX ?? 0, t?.clientY ?? 0);\n\t}\n\n\tfunction onTouchMove(e: TouchEvent): void {\n\t\tconst t = e.touches[0];\n\t\tif (timer && t && moved(t.clientX, t.clientY)) clear();\n\t}\n\n\tfunction onTouchEnd(e: TouchEvent): void {\n\t\trelease();\n\t\tif (triggered) {\n\t\t\te.preventDefault();\n\t\t\ttriggered = false;\n\t\t}\n\t}\n\n\tfunction onClickCapture(e: MouseEvent): void {\n\t\tif (triggered) {\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t\ttriggered = false;\n\t\t}\n\t}\n\n\tfunction onTouchCancel(): void {\n\t\trelease();\n\t\ttriggered = false;\n\t}\n\n\tfunction onDragStart(e: DragEvent): void {\n\t\tif (triggered) {\n\t\t\t// The hold already handed over to its menu; the drag is not wanted.\n\t\t\te.preventDefault();\n\t\t\treturn;\n\t\t}\n\t\tclear();\n\t}\n\n\tnode.addEventListener('mousedown', onMouseDown);\n\tnode.addEventListener('mousemove', onMouseMove);\n\tnode.addEventListener('touchstart', onTouchStart, { passive: true });\n\tnode.addEventListener('touchmove', onTouchMove, { passive: true });\n\tnode.addEventListener('touchend', onTouchEnd);\n\tnode.addEventListener('touchcancel', onTouchCancel);\n\tnode.addEventListener('mouseup', release);\n\tnode.addEventListener('mouseleave', release);\n\tnode.addEventListener('dragstart', onDragStart);\n\tnode.addEventListener('click', onClickCapture, { capture: true });\n\n\treturn {\n\t\tdestroy(): void {\n\t\t\tclear();\n\t\t\tnode.removeEventListener('mousedown', onMouseDown);\n\t\t\tnode.removeEventListener('mousemove', onMouseMove);\n\t\t\tnode.removeEventListener('touchstart', onTouchStart);\n\t\t\tnode.removeEventListener('touchmove', onTouchMove);\n\t\t\tnode.removeEventListener('touchend', onTouchEnd);\n\t\t\tnode.removeEventListener('touchcancel', onTouchCancel);\n\t\t\tnode.removeEventListener('mouseup', release);\n\t\t\tnode.removeEventListener('mouseleave', release);\n\t\t\tnode.removeEventListener('dragstart', onDragStart);\n\t\t\tnode.removeEventListener('click', onClickCapture, { capture: true });\n\t\t},\n\t\tupdate(next: LongPressOptions): void {\n\t\t\topts = next;\n\t\t}\n\t};\n}\n","/** @import { Source } from '#client' */\nimport { DEV } from 'esm-env';\nimport { set, source, state, increment } from '../internal/client/reactivity/sources.js';\nimport { label, tag } from '../internal/client/dev/tracing.js';\nimport { get, update_version } from '../internal/client/runtime.js';\n\n/**\n * A reactive version of the built-in [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) object.\n * Reading contents of the map (by iterating, or by reading `map.size` or calling `map.get(...)` or `map.has(...)` as in the [tic-tac-toe example](https://svelte.dev/playground/0b0ff4aa49c9443f9b47fe5203c78293) below) in an [effect](https://svelte.dev/docs/svelte/$effect) or [derived](https://svelte.dev/docs/svelte/$derived)\n * will cause it to be re-evaluated as necessary when the map is updated.\n *\n * Note that values in a reactive map are _not_ made [deeply reactive](https://svelte.dev/docs/svelte/$state#Deep-state).\n *\n * ```svelte\n * <script>\n * \timport { SvelteMap } from 'svelte/reactivity';\n * \timport { result } from './game.js';\n *\n * \tlet board = new SvelteMap();\n * \tlet player = $state('x');\n * \tlet winner = $derived(result(board));\n *\n * \tfunction reset() {\n * \t\tplayer = 'x';\n * \t\tboard.clear();\n * \t}\n * </script>\n *\n * <div class=\"board\">\n * \t{#each Array(9), i}\n * \t\t<button\n * \t\t\tdisabled={board.has(i) || winner}\n * \t\t\tonclick={() => {\n * \t\t\t\tboard.set(i, player);\n * \t\t\t\tplayer = player === 'x' ? 'o' : 'x';\n * \t\t\t}}\n * \t\t>{board.get(i)}</button>\n * \t{/each}\n * </div>\n *\n * {#if winner}\n * \t<p>{winner} wins!</p>\n * \t<button onclick={reset}>reset</button>\n * {:else}\n * \t<p>{player} is next</p>\n * {/if}\n * ```\n *\n * @template K\n * @template V\n * @extends {Map<K, V>}\n */\nexport class SvelteMap extends Map {\n\t/** @type {Map<K, Source<number>>} */\n\t#sources = new Map();\n\t#version = state(0);\n\t#size = state(0);\n\t#update_version = update_version || -1;\n\n\t/**\n\t * @param {Iterable<readonly [K, V]> | null | undefined} [value]\n\t */\n\tconstructor(value) {\n\t\tsuper();\n\n\t\tif (DEV) {\n\t\t\t// If the value is invalid then the native exception will fire here\n\t\t\tvalue = new Map(value);\n\n\t\t\ttag(this.#version, 'SvelteMap version');\n\t\t\ttag(this.#size, 'SvelteMap.size');\n\t\t}\n\n\t\tif (value) {\n\t\t\tfor (var [key, v] of value) {\n\t\t\t\tsuper.set(key, v);\n\t\t\t}\n\t\t\tthis.#size.v = super.size;\n\t\t}\n\t}\n\n\t/**\n\t * If the source is being created inside the same reaction as the SvelteMap instance,\n\t * we use `state` so that it will not be a dependency of the reaction. Otherwise we\n\t * use `source` so it will be.\n\t *\n\t * @template T\n\t * @param {T} value\n\t * @returns {Source<T>}\n\t */\n\t#source(value) {\n\t\treturn update_version === this.#update_version ? state(value) : source(value);\n\t}\n\n\t/** @param {K} key */\n\thas(key) {\n\t\tvar sources = this.#sources;\n\t\tvar s = sources.get(key);\n\n\t\tif (s === undefined) {\n\t\t\tif (super.has(key)) {\n\t\t\t\ts = this.#source(0);\n\n\t\t\t\tif (DEV) {\n\t\t\t\t\ttag(s, `SvelteMap get(${label(key)})`);\n\t\t\t\t}\n\n\t\t\t\tsources.set(key, s);\n\t\t\t} else {\n\t\t\t\t// We should always track the version in case\n\t\t\t\t// the Set ever gets this value in the future.\n\t\t\t\tget(this.#version);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tget(s);\n\t\treturn true;\n\t}\n\n\t/**\n\t * @param {(value: V, key: K, map: Map<K, V>) => void} callbackfn\n\t * @param {any} [this_arg]\n\t */\n\tforEach(callbackfn, this_arg) {\n\t\tthis.#read_all();\n\t\tsuper.forEach(callbackfn, this_arg);\n\t}\n\n\t/** @param {K} key */\n\tget(key) {\n\t\tvar sources = this.#sources;\n\t\tvar s = sources.get(key);\n\n\t\tif (s === undefined) {\n\t\t\tif (super.has(key)) {\n\t\t\t\ts = this.#source(0);\n\n\t\t\t\tif (DEV) {\n\t\t\t\t\ttag(s, `SvelteMap get(${label(key)})`);\n\t\t\t\t}\n\n\t\t\t\tsources.set(key, s);\n\t\t\t} else {\n\t\t\t\t// We should always track the version in case\n\t\t\t\t// the Set ever gets this value in the future.\n\t\t\t\tget(this.#version);\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t}\n\n\t\tget(s);\n\t\treturn super.get(key);\n\t}\n\n\t/**\n\t * @param {K} key\n\t * @param {V} value\n\t * */\n\tgetOrInsert(key, value) {\n\t\tif (!super.has(key)) {\n\t\t\tthis.set(key, value);\n\t\t}\n\t\treturn /** @type {V} */ (this.get(key));\n\t}\n\n\t/**\n\t * @param {K} key\n\t * @param {(key: K) => V} callbackFn\n\t */\n\tgetOrInsertComputed(key, callbackFn) {\n\t\tif (!super.has(key)) {\n\t\t\tthis.set(key, callbackFn(key));\n\t\t}\n\t\treturn /** @type {V} */ (this.get(key));\n\t}\n\n\t/**\n\t * @param {K} key\n\t * @param {V} value\n\t * */\n\tset(key, value) {\n\t\tvar sources = this.#sources;\n\t\tvar s = sources.get(key);\n\t\tvar prev_res = super.get(key);\n\t\tvar res = super.set(key, value);\n\t\tvar version = this.#version;\n\n\t\tif (s === undefined) {\n\t\t\ts = this.#source(0);\n\n\t\t\tif (DEV) {\n\t\t\t\ttag(s, `SvelteMap get(${label(key)})`);\n\t\t\t}\n\n\t\t\tsources.set(key, s);\n\t\t\tset(this.#size, super.size);\n\t\t\tincrement(version);\n\t\t} else if (prev_res !== value) {\n\t\t\tincrement(s);\n\n\t\t\t// if not every reaction of s is a reaction of version we need to also include version\n\t\t\tvar v_reactions = version.reactions === null ? null : new Set(version.reactions);\n\t\t\tvar needs_version_increase =\n\t\t\t\tv_reactions === null ||\n\t\t\t\t!s.reactions?.every((r) =>\n\t\t\t\t\t/** @type {NonNullable<typeof v_reactions>} */ (v_reactions).has(r)\n\t\t\t\t);\n\t\t\tif (needs_version_increase) {\n\t\t\t\tincrement(version);\n\t\t\t}\n\t\t}\n\n\t\treturn res;\n\t}\n\n\t/** @param {K} key */\n\tdelete(key) {\n\t\tvar sources = this.#sources;\n\t\tvar s = sources.get(key);\n\t\tvar res = super.delete(key);\n\n\t\tif (s !== undefined) {\n\t\t\tsources.delete(key);\n\t\t\tset(s, -1);\n\t\t}\n\n\t\tif (res) {\n\t\t\tset(this.#size, super.size);\n\t\t\tincrement(this.#version);\n\t\t}\n\n\t\treturn res;\n\t}\n\n\tclear() {\n\t\tif (super.size === 0) {\n\t\t\treturn;\n\t\t}\n\t\t// Clear first, so we get nice console.log outputs with $inspect\n\t\tsuper.clear();\n\t\tvar sources = this.#sources;\n\t\tset(this.#size, 0);\n\t\tfor (var s of sources.values()) {\n\t\t\tset(s, -1);\n\t\t}\n\t\tincrement(this.#version);\n\t\tsources.clear();\n\t}\n\n\t#read_all() {\n\t\tget(this.#version);\n\n\t\tvar sources = this.#sources;\n\t\tif (this.#size.v !== sources.size) {\n\t\t\tfor (var key of super.keys()) {\n\t\t\t\tif (!sources.has(key)) {\n\t\t\t\t\tvar s = this.#source(0);\n\t\t\t\t\tif (DEV) {\n\t\t\t\t\t\ttag(s, `SvelteMap get(${label(key)})`);\n\t\t\t\t\t}\n\n\t\t\t\t\tsources.set(key, s);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor ([, s] of this.#sources) {\n\t\t\tget(s);\n\t\t}\n\t}\n\n\tkeys() {\n\t\tget(this.#version);\n\t\treturn super.keys();\n\t}\n\n\tvalues() {\n\t\tthis.#read_all();\n\t\treturn super.values();\n\t}\n\n\tentries() {\n\t\tthis.#read_all();\n\t\treturn super.entries();\n\t}\n\n\t[Symbol.iterator]() {\n\t\treturn this.entries();\n\t}\n\n\tget size() {\n\t\tget(this.#size);\n\t\treturn super.size;\n\t}\n}\n","export function isFunction(value) {\n return typeof value === \"function\";\n}\nexport function isObject(value) {\n return value !== null && typeof value === \"object\";\n}\nexport function isElement(value) {\n return value instanceof Element;\n}\n","import { isFunction } from \"./is.js\";\nexport function get(value) {\n if (isFunction(value)) {\n return value();\n }\n return value;\n}\n","import { defaultWindow } from \"../../internal/configurable-globals.js\";\nimport { get } from \"../../internal/utils/get.js\";\nimport { createSubscriber } from \"svelte/reactivity\";\n/**\n * Returns a reactive value holding the size of `node`.\n *\n * Accepts an `options` object with the following properties:\n * - `initialSize`: The initial size of the element. Defaults to `{ width: 0, height: 0 }`.\n * - `box`: The box model to use. Can be either `\"content-box\"` or `\"border-box\"`. Defaults to `\"border-box\"`.\n *\n * @returns an object with `width` and `height` properties.\n *\n * @see {@link https://runed.dev/docs/utilities/element-size}\n */\nexport class ElementSize {\n // no need to use `$state` here since we are using createSubscriber\n #size = {\n width: 0,\n height: 0,\n };\n #observed = false;\n #options;\n #node;\n #window;\n // we use a derived here to extract the width so that if the width doesn't change we don't get a state update\n // which we would get if we would just use a getter since the version of the subscriber will be changing\n #width = $derived.by(() => {\n this.#subscribe?.();\n return this.getSize().width;\n });\n // we use a derived here to extract the height so that if the height doesn't change we don't get a state update\n // which we would get if we would just use a getter since the version of the subscriber will be changing\n #height = $derived.by(() => {\n this.#subscribe?.();\n return this.getSize().height;\n });\n // we need to use a derived here because the class will be created before the node is bound to the ref\n #subscribe = $derived.by(() => {\n const node$ = get(this.#node);\n if (!node$)\n return;\n return createSubscriber((update) => {\n if (!this.#window)\n return;\n const observer = new this.#window.ResizeObserver((entries) => {\n this.#observed = true;\n for (const entry of entries) {\n const boxSize = this.#options.box === \"content-box\" ? entry.contentBoxSize : entry.borderBoxSize;\n const boxSizeArr = Array.isArray(boxSize) ? boxSize : [boxSize];\n this.#size.width = boxSizeArr.reduce((acc, size) => Math.max(acc, size.inlineSize), 0);\n this.#size.height = boxSizeArr.reduce((acc, size) => Math.max(acc, size.blockSize), 0);\n }\n update();\n });\n observer.observe(node$);\n return () => {\n this.#observed = false;\n observer.disconnect();\n };\n });\n });\n constructor(node, options = { box: \"border-box\" }) {\n this.#window = options.window ?? defaultWindow;\n this.#options = options;\n this.#node = node;\n this.#size = {\n width: 0,\n height: 0,\n };\n }\n calculateSize() {\n const element = get(this.#node);\n // no element or no window, return undefined, we will return 0x0 in the getSize method\n if (!element || !this.#window) {\n return;\n }\n const offsetWidth = element.offsetWidth;\n const offsetHeight = element.offsetHeight;\n // easy mode, just return offsets\n if (this.#options.box === \"border-box\") {\n return {\n width: offsetWidth,\n height: offsetHeight,\n };\n }\n // hard mode, we need to calculate the content size\n const style = this.#window.getComputedStyle(element);\n const paddingWidth = parseFloat(style.paddingLeft) + parseFloat(style.paddingRight);\n const paddingHeight = parseFloat(style.paddingTop) + parseFloat(style.paddingBottom);\n const borderWidth = parseFloat(style.borderLeftWidth) + parseFloat(style.borderRightWidth);\n const borderHeight = parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth);\n const contentWidth = offsetWidth - paddingWidth - borderWidth;\n const contentHeight = offsetHeight - paddingHeight - borderHeight;\n return {\n width: contentWidth,\n height: contentHeight,\n };\n }\n getSize() {\n // if the resize observer already run we can just return the size\n // otherwise we calculate the size if possible or we return the initial size\n return this.#observed ? this.#size : (this.calculateSize() ?? this.#size);\n }\n get current() {\n this.#subscribe?.();\n return this.getSize();\n }\n get width() {\n return this.#width;\n }\n get height() {\n return this.#height;\n }\n}\n","export function onDestroyEffect(fn) {\n $effect(() => {\n return () => {\n fn();\n };\n });\n}\n","import { tick } from \"svelte\";\nexport function afterTick(fn) {\n tick().then(fn);\n}\n","import { isObject } from \"./is.js\";\nconst ELEMENT_NODE = 1;\nconst DOCUMENT_NODE = 9;\nconst DOCUMENT_FRAGMENT_NODE = 11;\nexport function isHTMLElement(node) {\n return isObject(node) && node.nodeType === ELEMENT_NODE && typeof node.nodeName === \"string\";\n}\nexport function isDocument(node) {\n return isObject(node) && node.nodeType === DOCUMENT_NODE;\n}\nexport function isWindow(node) {\n return isObject(node) && node.constructor?.name === \"VisualViewport\";\n}\nexport function getNodeName(node) {\n if (isHTMLElement(node))\n return node.localName ?? \"\";\n return \"#document\";\n}\nexport function isNode(node) {\n return isObject(node) && node.nodeType !== undefined;\n}\nexport function isShadowRoot(node) {\n return isNode(node) && node.nodeType === DOCUMENT_FRAGMENT_NODE && \"host\" in node;\n}\nexport function contains(parent, child) {\n if (!parent || !child)\n return false;\n if (!isHTMLElement(parent) || !isHTMLElement(child))\n return false;\n const rootNode = child.getRootNode?.();\n if (parent === child)\n return true;\n if (parent.contains(child))\n return true;\n if (rootNode && isShadowRoot(rootNode)) {\n let next = child;\n while (next) {\n if (parent === next)\n return true;\n // @ts-expect-error - host is not typed\n next = next.parentNode || next.host;\n }\n }\n return false;\n}\nexport function getDocument(node) {\n if (isDocument(node))\n return node;\n if (isWindow(node))\n return node.document;\n return node?.ownerDocument ?? document;\n}\nexport function getDocumentElement(node) {\n return getDocument(node).documentElement;\n}\nexport function getWindow(node) {\n if (isShadowRoot(node))\n return getWindow(node.host);\n if (isDocument(node))\n return node.defaultView ?? window;\n if (isHTMLElement(node))\n return node.ownerDocument?.defaultView ?? window;\n return window;\n}\nexport function getActiveElement(rootNode) {\n let activeElement = rootNode.activeElement;\n while (activeElement?.shadowRoot) {\n const el = activeElement.shadowRoot.activeElement;\n if (el === activeElement)\n break;\n else\n activeElement = el;\n }\n return activeElement;\n}\nexport function getParentNode(node) {\n if (getNodeName(node) === \"html\")\n return node;\n const result = \n // @ts-expect-error - assignedSlot is not typed\n node.assignedSlot ||\n node.parentNode ||\n (isShadowRoot(node) && node.host) ||\n getDocumentElement(node);\n return isShadowRoot(result) ? result.host : result;\n}\n","import { boxWith } from \"../box/box-extras.svelte.js\";\nimport { getActiveElement, getDocument } from \"./dom.js\";\nexport class DOMContext {\n element;\n root = $derived.by(() => {\n if (!this.element.current)\n return document;\n const rootNode = this.element.current.getRootNode() ?? document;\n return rootNode;\n });\n constructor(element) {\n if (typeof element === \"function\") {\n this.element = boxWith(element);\n }\n else {\n this.element = element;\n }\n }\n getDocument = () => {\n return getDocument(this.root);\n };\n getWindow = () => {\n return this.getDocument().defaultView ?? window;\n };\n getActiveElement = () => {\n return getActiveElement(this.root);\n };\n isActiveElement = (node) => {\n return node === this.getActiveElement();\n };\n getElementById(id) {\n return this.root.getElementById(id);\n }\n querySelector = (selector) => {\n if (!this.root)\n return null;\n return this.root.querySelector(selector);\n };\n querySelectorAll = (selector) => {\n if (!this.root)\n return [];\n return this.root.querySelectorAll(selector);\n };\n setTimeout = (callback, delay) => {\n return this.getWindow().setTimeout(callback, delay);\n };\n clearTimeout = (timeoutId) => {\n return this.getWindow().clearTimeout(timeoutId);\n };\n}\n","import { afterTick, onDestroyEffect } from \"svelte-toolbelt\";\nexport class AnimationsComplete {\n #opts;\n #currentFrame = null;\n #observer = null;\n #runId = 0;\n constructor(opts) {\n this.#opts = opts;\n onDestroyEffect(() => this.#cleanup());\n }\n #cleanup() {\n if (this.#currentFrame !== null) {\n window.cancelAnimationFrame(this.#currentFrame);\n this.#currentFrame = null;\n }\n this.#observer?.disconnect();\n this.#observer = null;\n this.#runId++;\n }\n run(fn) {\n this.#cleanup();\n const runId = this.#runId;\n const executeIfCurrent = () => {\n if (runId !== this.#runId)\n return;\n this.#executeCallback(fn);\n };\n const waitForAnimations = () => {\n if (runId !== this.#runId)\n return;\n // The content element is only attached once the component has rendered,\n // which can happen after `run()` is called when opening.\n const node = this.#opts.ref.current;\n if (!node)\n return;\n if (typeof node.getAnimations !== \"function\") {\n this.#executeCallback(fn);\n return;\n }\n const animations = node.getAnimations();\n if (animations.length === 0) {\n executeIfCurrent();\n return;\n }\n Promise.all(animations.map((animation) => animation.finished))\n .then(() => {\n executeIfCurrent();\n })\n .catch(() => {\n if (runId !== this.#runId)\n return;\n const currentAnimations = node.getAnimations();\n const hasRunningAnimations = currentAnimations.some((animation) => animation.pending || animation.playState !== \"finished\");\n if (hasRunningAnimations) {\n waitForAnimations();\n return;\n }\n executeIfCurrent();\n });\n };\n const requestWaitForAnimations = () => {\n this.#currentFrame = window.requestAnimationFrame(() => {\n this.#currentFrame = null;\n waitForAnimations();\n });\n };\n if (!this.#opts.afterTick.current) {\n requestWaitForAnimations();\n return;\n }\n this.#currentFrame = window.requestAnimationFrame(() => {\n this.#currentFrame = null;\n const startingStyleAttr = \"data-starting-style\";\n const node = this.#opts.ref.current;\n if (!node)\n return;\n if (!node.hasAttribute(startingStyleAttr)) {\n requestWaitForAnimations();\n return;\n }\n this.#observer = new MutationObserver(() => {\n if (runId !== this.#runId)\n return;\n if (node.hasAttribute(startingStyleAttr))\n return;\n this.#observer?.disconnect();\n this.#observer = null;\n requestWaitForAnimations();\n });\n this.#observer.observe(node, {\n attributes: true,\n attributeFilter: [startingStyleAttr],\n });\n });\n }\n #executeCallback(fn) {\n const runId = this.#runId;\n const execute = () => {\n // cleanup (destroy or a newer run) may have happened while `fn` was deferred\n if (runId !== this.#runId)\n return;\n fn();\n };\n if (this.#opts.afterTick.current) {\n afterTick(execute);\n }\n else {\n execute();\n }\n }\n}\n","import { watch } from \"runed\";\nimport { onDestroyEffect } from \"svelte-toolbelt\";\nimport { AnimationsComplete } from \"./animations-complete.js\";\nexport class PresenceManager {\n #opts;\n #enabled;\n #afterAnimations;\n #shouldRender = $state(false);\n #transitionStatus = $state(undefined);\n #hasMounted = false;\n #transitionFrame = null;\n constructor(opts) {\n this.#opts = opts;\n this.#shouldRender = opts.open.current;\n this.#enabled = opts.enabled ?? true;\n this.#afterAnimations = new AnimationsComplete({\n ref: this.#opts.ref,\n afterTick: this.#opts.open,\n });\n onDestroyEffect(() => this.#clearTransitionFrame());\n watch(() => this.#opts.open.current, (isOpen) => {\n if (!this.#hasMounted) {\n this.#hasMounted = true;\n return;\n }\n this.#clearTransitionFrame();\n if (!isOpen && this.#opts.shouldSkipExitAnimation?.()) {\n this.#shouldRender = false;\n this.#transitionStatus = undefined;\n this.#opts.onComplete?.();\n return;\n }\n if (isOpen)\n this.#shouldRender = true;\n this.#transitionStatus = isOpen ? \"starting\" : \"ending\";\n if (isOpen) {\n this.#transitionFrame = window.requestAnimationFrame(() => {\n this.#transitionFrame = null;\n if (this.#opts.open.current) {\n this.#transitionStatus = undefined;\n }\n });\n }\n if (!this.#enabled) {\n if (!isOpen) {\n this.#shouldRender = false;\n }\n this.#transitionStatus = undefined;\n this.#opts.onComplete?.();\n return;\n }\n this.#afterAnimations.run(() => {\n if (isOpen === this.#opts.open.current) {\n if (!this.#opts.open.current) {\n this.#shouldRender = false;\n }\n this.#transitionStatus = undefined;\n this.#opts.onComplete?.();\n }\n });\n });\n }\n get shouldRender() {\n return this.#shouldRender;\n }\n get transitionStatus() {\n return this.#transitionStatus;\n }\n #clearTransitionFrame() {\n if (this.#transitionFrame === null)\n return;\n window.cancelAnimationFrame(this.#transitionFrame);\n this.#transitionFrame = null;\n }\n}\n","/**\n * A no operation function (does nothing)\n */\nexport function noop() { }\n","<script lang=\"ts\">\n\timport type { Snippet } from \"svelte\";\n\n\tconst { children }: { children?: Snippet } = $props();\n</script>\n\n{#key children}\n\t{@render children?.()}\n{/key}\n","import { Context } from \"runed\";\nimport { boxWith } from \"svelte-toolbelt\";\nexport const BitsConfigContext = new Context(\"BitsConfig\");\n/**\n * Gets the current Bits UI configuration state from the context.\n *\n * Returns a default configuration (where all values are `undefined`) if no configuration is found.\n */\nexport function getBitsConfig() {\n const fallback = new BitsConfigState(null, {});\n return BitsConfigContext.getOr(fallback).opts;\n}\n/**\n * Creates and sets a new Bits UI configuration state that inherits from parent configs.\n *\n * @param opts - Configuration options for this level\n * @returns The configuration state instance\n *\n * @example\n * ```typescript\n * // In a component that wants to set a default portal target\n * const config = useBitsConfig({ defaultPortalTo: box(\"#some-element\") });\n *\n * // Child components will inherit this config and can override specific values\n * const childConfig = useBitsConfig({ someOtherProp: box(\"value\") });\n * // childConfig still has defaultPortalTo=\"#some-element\" from parent\n * ```\n */\nexport function useBitsConfig(opts) {\n return BitsConfigContext.set(new BitsConfigState(BitsConfigContext.getOr(null), opts));\n}\n/**\n * Configuration state that inherits from parent configurations.\n *\n * @example\n * Config resolution:\n * ```\n * Level 1: { defaultPortalTo: \"#some-element\", theme: \"dark\" }\n * Level 2: { spacing: \"large\" } // inherits defaultPortalTo=\"#some-element\", theme=\"dark\"\n * Level 3: { theme: \"light\" } // inherits defaultPortalTo=\"#some-element\", spacing=\"large\", overrides theme=\"light\"\n * ```\n */\nexport class BitsConfigState {\n opts;\n constructor(parent, opts) {\n const resolveConfigOption = createConfigResolver(parent, opts);\n this.opts = {\n defaultPortalTo: resolveConfigOption((config) => config.defaultPortalTo),\n defaultLocale: resolveConfigOption((config) => config.defaultLocale),\n };\n }\n}\n/**\n * Returns a config resolver that resolves a given config option's value.\n *\n * The resolver creates reactive boxes that resolve config option values using this priority:\n * 1. Current level's value (if defined)\n * 2. Parent level's value (if defined and current is undefined)\n * 3. `undefined` (if no value is found in either parent or child)\n *\n * @param parent - Parent configuration state (null if this is root level)\n * @param currentOpts - Current level's configuration options\n *\n * @example\n * ```typescript\n * // Given this hierarchy:\n * // Root: { defaultPortalTo: \"#some-element\" }\n * // Child: { someOtherProp: \"value\" } // no defaultPortalTo specified\n *\n * const resolveConfigOption = createConfigResolver(parent, opts);\n * const portalTo = resolveConfigOption(config => config.defaultPortalTo);\n *\n * // portalTo.current === \"#some-element\" (inherited from parent)\n * // even when child didn't specify `defaultPortalTo`\n * ```\n */\nfunction createConfigResolver(parent, currentOpts) {\n return (getter) => {\n const configOption = boxWith(() => {\n // try current opts first\n const value = getter(currentOpts)?.current;\n if (value !== undefined)\n return value;\n // if no parent, return undefined\n if (parent === null)\n return undefined;\n // get value from parent (which already has its own chain resolved)\n return getter(parent.opts)?.current;\n });\n return configOption;\n };\n}\n","import { boxWith } from \"svelte-toolbelt\";\nimport { getBitsConfig } from \"./bits-config.js\";\n/**\n * Creates a generic prop resolver that follows a standard priority chain:\n * 1. The getter's prop value (if defined)\n * 2. The config default value (if no getter prop value is defined)\n * 3. The fallback value (if no config value found)\n */\nfunction createPropResolver(configOption, fallback) {\n return (getProp) => {\n const config = getBitsConfig();\n return boxWith(() => {\n // 1. return the prop's value, if provided\n const propValue = getProp();\n if (propValue !== undefined)\n return propValue;\n // 2. return the resolved config option value, if available\n const option = configOption(config).current;\n if (option !== undefined)\n return option;\n // 3. return the fallback if no other value is found\n return fallback;\n });\n };\n}\n/**\n * Resolves a locale value using the prop, the config default, or a fallback.\n *\n * Default value: `\"en\"`\n */\nexport const resolveLocaleProp = createPropResolver((config) => config.defaultLocale, \"en\");\n/**\n * Resolves a portal's `to` value using the prop, the config default, or a fallback.\n *\n * Default value: `\"body\"`\n */\nexport const resolvePortalToProp = createPropResolver((config) => config.defaultPortalTo, \"body\");\n","<script lang=\"ts\">\n\timport { getAllContexts, mount, unmount } from \"svelte\";\n\timport { DEV } from \"esm-env\";\n\timport { watch } from \"runed\";\n\timport PortalConsumer from \"./portal-consumer.svelte\";\n\timport type { PortalProps } from \"./types.js\";\n\timport { isBrowser } from \"../../../internal/is.js\";\n\timport { resolvePortalToProp } from \"../config/prop-resolvers.js\";\n\n\tlet { to: toProp, children, disabled }: PortalProps = $props();\n\n\tconst to = resolvePortalToProp(() => toProp);\n\tconst context = getAllContexts();\n\n\tlet target = $derived(getTarget());\n\n\tfunction getTarget() {\n\t\tif (!isBrowser || disabled) return null;\n\n\t\tlet localTarget: Element | null = null;\n\n\t\tif (typeof to.current === \"string\") {\n\t\t\tconst target = document.querySelector(to.current);\n\t\t\tif (DEV && target === null) {\n\t\t\t\tthrow new Error(`Target element \"${to.current}\" not found.`);\n\t\t\t}\n\t\t\tlocalTarget = target;\n\t\t} else {\n\t\t\tlocalTarget = to.current;\n\t\t}\n\n\t\tif (DEV && !(localTarget instanceof Element)) {\n\t\t\tconst type = localTarget === null ? \"null\" : typeof localTarget;\n\t\t\tthrow new TypeError(\n\t\t\t\t`Unknown portal target type: ${type}. Allowed types: string (query selector) or Element.`\n\t\t\t);\n\t\t}\n\n\t\treturn localTarget;\n\t}\n\n\tlet instance: ReturnType<typeof mount> | null;\n\n\tfunction unmountInstance() {\n\t\tif (instance) {\n\t\t\tunmount(instance);\n\t\t\tinstance = null;\n\t\t}\n\t}\n\n\twatch([() => target, () => disabled], ([target, disabled]) => {\n\t\tif (!target || disabled) {\n\t\t\tunmountInstance();\n\t\t\treturn;\n\t\t}\n\t\tinstance = mount(PortalConsumer, {\n\t\t\ttarget: target,\n\t\t\tprops: { children },\n\t\t\tcontext,\n\t\t});\n\n\t\treturn () => {\n\t\t\tunmountInstance();\n\t\t};\n\t});\n</script>\n\n{#if disabled}\n\t{@render children?.()}\n{/if}\n","// oxlint-disable-next-line no-explicit-any\nexport function debounce(fn, wait = 500) {\n let timeout = null;\n let pendingArgs = null;\n const debounced = (...args) => {\n debounced.destroy();\n pendingArgs = args;\n timeout = setTimeout(debounced.flush, wait);\n };\n /** Runs the pending call now, if there is one. */\n debounced.flush = () => {\n if (pendingArgs === null)\n return;\n const args = pendingArgs;\n debounced.destroy();\n fn(...args);\n };\n debounced.destroy = () => {\n if (timeout !== null) {\n clearTimeout(timeout);\n timeout = null;\n }\n pendingArgs = null;\n };\n return debounced;\n}\n","export function isOrContainsTarget(node, target) {\n return node === target || node.contains(target);\n}\nexport function getOwnerDocument(el) {\n return el?.ownerDocument ?? document;\n}\n","export function getFirstNonCommentChild(element) {\n if (!element)\n return null;\n for (const child of element.childNodes) {\n if (child.nodeType !== Node.COMMENT_NODE) {\n return child;\n }\n }\n return null;\n}\n/**\n * Determines if the click event truly occurred outside the content node.\n * This was added to handle password managers and other elements that may be injected\n * into the DOM but visually appear inside the content.\n */\nexport function isClickTrulyOutside(event, contentNode) {\n const { clientX, clientY } = event;\n const rect = contentNode.getBoundingClientRect();\n return (clientX < rect.left || clientX > rect.right || clientY < rect.top || clientY > rect.bottom);\n}\n","export const CONTEXT_MENU_TRIGGER_ATTR = \"data-context-menu-trigger\";\nexport const CONTEXT_MENU_CONTENT_ATTR = \"data-context-menu-content\";\n","import { afterTick, executeCallbacks, onDestroyEffect, } from \"svelte-toolbelt\";\nimport { watch } from \"runed\";\nimport { untrack } from \"svelte\";\nimport { on } from \"svelte/events\";\nimport {} from \"../../../internal/events.js\";\nimport { debounce } from \"../../../internal/debounce.js\";\nimport { noop } from \"../../../internal/noop.js\";\nimport { getOwnerDocument, isOrContainsTarget } from \"../../../internal/elements.js\";\nimport { isElementOrSVGElement } from \"../../../internal/is.js\";\nimport { isClickTrulyOutside } from \"../../../internal/dom.js\";\nimport { CONTEXT_MENU_CONTENT_ATTR, CONTEXT_MENU_TRIGGER_ATTR, } from \"../../menu/context-menu-attributes.js\";\nglobalThis.bitsDismissableLayers ??= new Map();\nexport class DismissibleLayerState {\n static create(opts) {\n return new DismissibleLayerState(opts);\n }\n opts;\n #interactOutsideProp;\n #behaviorType;\n #interceptedEvents = {\n pointerdown: false,\n };\n #isResponsibleLayer = false;\n #capturedPointerDown = null;\n #isFocusInsideDOMTree = false;\n #documentObj = undefined;\n #onFocusOutside;\n #unsubClickListener = noop;\n /**\n * Set once the layer is torn down. Deferred work scheduled before teardown can\n * still run afterwards, so every such callback must short-circuit on this\n * before reading `this.opts.ref.current` — reading a destroyed `$derived`\n * triggers Svelte's `derived_inert` warning. A class field rather than a\n * constructor local so the class-field handlers below can see it too.\n */\n #destroyed = false;\n constructor(opts) {\n this.opts = opts;\n this.#behaviorType = opts.interactOutsideBehavior;\n this.#interactOutsideProp = opts.onInteractOutside;\n this.#onFocusOutside = opts.onFocusOutside;\n let unsubEvents = noop;\n let registeredNode = null;\n const cleanup = () => {\n registeredNode = null;\n this.#resetState();\n globalThis.bitsDismissableLayers.delete(this);\n this.#handleInteractOutside.destroy();\n this.#unsubClickListener();\n unsubEvents();\n };\n watch([() => this.opts.enabled.current, () => this.opts.ref.current], ([enabled, node]) => {\n const nextNode = enabled ? node : null;\n // Ref boxes can invalidate without changing the DOM node during opening.\n // Keep an in-flight interaction when this is still the same registration.\n if (registeredNode === nextNode)\n return;\n cleanup();\n if (!nextNode)\n return;\n registeredNode = nextNode;\n this.#documentObj = getOwnerDocument(nextNode);\n globalThis.bitsDismissableLayers.set(this, this.#behaviorType);\n unsubEvents = this.#addEventListeners();\n });\n onDestroyEffect(() => {\n this.#destroyed = true;\n cleanup();\n });\n }\n #handleFocus = (event) => {\n if (event.defaultPrevented)\n return;\n if (this.#destroyed || !this.opts.ref.current)\n return;\n afterTick(() => {\n // The layer can be destroyed between the focus event and this tick — a\n // focus change is frequently what closes it. `#destroyed` must\n // short-circuit before any `this.opts.ref.current` read.\n if (this.#destroyed)\n return;\n if (!this.opts.ref.current || this.#isTargetWithinLayer(event.target))\n return;\n if (event.target && !this.#isFocusInsideDOMTree) {\n this.#onFocusOutside.current?.(event);\n }\n });\n };\n #addEventListeners() {\n const document = this.#documentObj;\n const onPointerDownCapture = (event) => {\n untrack(() => {\n // settle the previous interaction before this one overwrites its state\n this.#handleInteractOutside.flush();\n this.#markInterceptedEvent(event);\n this.#markResponsibleLayer(event);\n });\n };\n const onPointerDown = (event) => {\n // Ignore stopped events and bubble-only events such as the opening pointerdown.\n // It can resume bubbling after a nested early outside click has been captured.\n if (event.cancelBubble || event !== this.#capturedPointerDown)\n return;\n this.#markNonInterceptedEvent(event);\n if (event.pointerType === \"touch\") {\n // a tap's click can follow its pointerdown within a millisecond (WebKit), so\n // arm the click listener now rather than after the debounce flushes\n this.#handleInteractOutside.destroy();\n this.#interactOutside(event);\n }\n else {\n this.#handleInteractOutside(event);\n }\n };\n // `svelte/events.on` defers pointer listener attachment to a microtask, leaving\n // a gap even without a registration timer. Document is already connected, so\n // attach immediately. Only layers present at capture can own this interaction;\n // a layer opened by its target/bubble handlers must not dismiss itself.\n document.addEventListener(\"pointerdown\", onPointerDownCapture, true);\n document.addEventListener(\"pointerdown\", onPointerDown);\n return executeCallbacks(() => document.removeEventListener(\"pointerdown\", onPointerDownCapture, true), () => document.removeEventListener(\"pointerdown\", onPointerDown), on(document, \"focusin\", this.#handleFocus));\n }\n #handleDismiss = (e) => {\n let event = e;\n if (event.defaultPrevented) {\n event = createWrappedEvent(e);\n }\n this.#interactOutsideProp.current(e);\n };\n #interactOutside = (e) => {\n if (!this.opts.ref.current) {\n this.#unsubClickListener();\n return;\n }\n const isEventValid = this.opts.isValidEvent.current(e, this.opts.ref.current) ||\n isValidEvent(e, this.opts.ref.current);\n if (!this.#isResponsibleLayer || this.#isAnyEventIntercepted() || !isEventValid) {\n this.#unsubClickListener();\n return;\n }\n let event = e;\n if (event.defaultPrevented) {\n event = createWrappedEvent(event);\n }\n if (this.#behaviorType.current !== \"close\" &&\n this.#behaviorType.current !== \"defer-otherwise-close\") {\n this.#unsubClickListener();\n return;\n }\n if (e.pointerType === \"touch\") {\n this.#unsubClickListener();\n // the tap's click dismisses from the bubble phase, as before. A capture-phase\n // listener backs it up with a task, so a target that stops propagation cannot\n // hide the click, while a target that closes this layer still tears it down\n // (and the backup with it) before the task runs.\n let backup = null;\n let unsubClick = noop;\n const dismiss = (event) => {\n unsubClick();\n this.#handleDismiss(event);\n };\n unsubClick = executeCallbacks(on(this.#documentObj, \"click\", dismiss, { once: true }), on(this.#documentObj, \"click\", (event) => {\n backup = setTimeout(() => dismiss(event), 0);\n }, { once: true, capture: true }), () => {\n if (backup !== null)\n clearTimeout(backup);\n backup = null;\n });\n this.#unsubClickListener = unsubClick;\n }\n else {\n this.#interactOutsideProp.current(event);\n }\n };\n #handleInteractOutside = debounce(this.#interactOutside, 10);\n #markInterceptedEvent = (e) => {\n this.#interceptedEvents[e.type] = true;\n };\n #markNonInterceptedEvent = (e) => {\n this.#interceptedEvents[e.type] = false;\n };\n #markResponsibleLayer = (event) => {\n this.#capturedPointerDown = event;\n if (!this.opts.ref.current)\n return;\n this.#isResponsibleLayer = isResponsibleLayer(this.opts.ref.current);\n };\n #isTargetWithinLayer = (target) => {\n if (!this.opts.ref.current)\n return false;\n return isOrContainsTarget(this.opts.ref.current, target);\n };\n /**\n * Resets the per-interaction state. Must stay synchronous.\n *\n * This was a `debounce(..., 20)` from when it was also wired to a capture-phase\n * interaction-end listener and had to land after the 10ms `#handleInteractOutside`\n * debounce. That listener is gone, but the debounce stayed on the `cleanup()` path —\n * and because `watch` runs `cleanup()` once per open (`ref` goes null -> node), every\n * layer scheduled a reset 20ms into its own lifetime. An outside `pointerdown` landing\n * 10-20ms after that cleanup would have its `#isResponsibleLayer` flag cleared by the\n * stale reset in the gap before the debounced `#handleInteractOutside` ran, which then\n * bailed and left the layer open. `cleanup()` destroys `#handleInteractOutside` anyway,\n * so nothing is left in flight that needs to observe the pre-reset state.\n */\n #resetState = () => {\n for (const eventType in this.#interceptedEvents) {\n this.#interceptedEvents[eventType] = false;\n }\n this.#isResponsibleLayer = false;\n this.#capturedPointerDown = null;\n };\n #isAnyEventIntercepted() {\n const i = Object.values(this.#interceptedEvents).some(Boolean);\n return i;\n }\n #onfocuscapture = () => {\n this.#isFocusInsideDOMTree = true;\n };\n #onblurcapture = () => {\n this.#isFocusInsideDOMTree = false;\n };\n props = {\n onfocuscapture: this.#onfocuscapture,\n onblurcapture: this.#onblurcapture,\n };\n}\nexport function getTopMostDismissableLayer(layersArr = [\n ...globalThis.bitsDismissableLayers,\n]) {\n return layersArr.findLast(([_, { current: behaviorType }]) => behaviorType === \"close\" || behaviorType === \"ignore\");\n}\nfunction isResponsibleLayer(node) {\n const layersArr = [...globalThis.bitsDismissableLayers];\n /**\n * We first check if we can find a top layer with `close` or `ignore`.\n * If that top layer was found and matches the provided node, then the node is\n * responsible for the outside interaction. Otherwise, we know that all layers defer so\n * the first layer is the responsible one.\n */\n const topMostLayer = getTopMostDismissableLayer(layersArr);\n if (topMostLayer)\n return topMostLayer[0].opts.ref.current === node;\n const [firstLayerNode] = layersArr[0];\n return firstLayerNode.opts.ref.current === node;\n}\nfunction isValidEvent(e, node) {\n const target = e.target;\n if (!isElementOrSVGElement(target))\n return false;\n const targetIsContextMenuTrigger = Boolean(target.closest(`[${CONTEXT_MENU_TRIGGER_ATTR}]`));\n const nodeIsContextMenu = Boolean(node.closest(`[${CONTEXT_MENU_CONTENT_ATTR}]`));\n if (\"button\" in e && e.button > 0 && !targetIsContextMenuTrigger)\n return false;\n if (\"button\" in e && e.button === 0 && targetIsContextMenuTrigger && nodeIsContextMenu) {\n return true;\n }\n if (targetIsContextMenuTrigger && nodeIsContextMenu)\n return false;\n const ownerDocument = getOwnerDocument(target);\n const isValid = ownerDocument.documentElement.contains(target) &&\n !isOrContainsTarget(node, target) &&\n isClickTrulyOutside(e, node);\n return isValid;\n}\nfunction createWrappedEvent(e) {\n const capturedCurrentTarget = e.currentTarget;\n const capturedTarget = e.target;\n let newEvent;\n if (e instanceof PointerEvent) {\n newEvent = new PointerEvent(e.type, e);\n }\n else {\n newEvent = new PointerEvent(\"pointerdown\", e);\n }\n // track the prevented state separately\n let isPrevented = false;\n // Create a proxy to intercept property access and method calls\n const wrappedEvent = new Proxy(newEvent, {\n get: (target, prop) => {\n if (prop === \"currentTarget\") {\n return capturedCurrentTarget;\n }\n if (prop === \"target\") {\n return capturedTarget;\n }\n if (prop === \"preventDefault\") {\n return () => {\n isPrevented = true;\n if (typeof target.preventDefault === \"function\") {\n target.preventDefault();\n }\n };\n }\n if (prop === \"defaultPrevented\") {\n return isPrevented;\n }\n if (prop in target) {\n // oxlint-disable-next-line no-explicit-any\n return target[prop];\n }\n // oxlint-disable-next-line no-explicit-any\n return e[prop];\n },\n });\n return wrappedEvent;\n}\n","<script lang=\"ts\">\n\timport { boxWith } from \"svelte-toolbelt\";\n\timport { untrack } from \"svelte\";\n\timport type { DismissibleLayerImplProps } from \"./types.js\";\n\timport { DismissibleLayerState } from \"./use-dismissable-layer.svelte.js\";\n\timport { noop } from \"../../../internal/noop.js\";\n\n\tlet {\n\t\tinteractOutsideBehavior = \"close\",\n\t\tonInteractOutside = noop,\n\t\tonFocusOutside = noop,\n\t\tid,\n\t\tchildren,\n\t\tenabled,\n\t\tisValidEvent = () => false,\n\t\tref,\n\t}: DismissibleLayerImplProps = $props();\n\n\tconst dismissibleLayerState = DismissibleLayerState.create({\n\t\tid: boxWith(() => id),\n\t\tinteractOutsideBehavior: boxWith(() => interactOutsideBehavior),\n\t\tonInteractOutside: boxWith(() => onInteractOutside),\n\t\tenabled: boxWith(() => enabled),\n\t\tonFocusOutside: boxWith(() => onFocusOutside),\n\t\tisValidEvent: boxWith(() => isValidEvent),\n\t\tref: untrack(() => ref),\n\t});\n</script>\n\n{@render children?.({ props: dismissibleLayerState.props })}\n","import { DOMContext } from \"svelte-toolbelt\";\nimport { watch } from \"runed\";\nimport { on } from \"svelte/events\";\nimport { kbd } from \"../../../internal/kbd.js\";\nimport { noop } from \"../../../internal/noop.js\";\nglobalThis.bitsEscapeLayers ??= new Map();\nexport class EscapeLayerState {\n static create(opts) {\n return new EscapeLayerState(opts);\n }\n opts;\n domContext;\n constructor(opts) {\n this.opts = opts;\n this.domContext = new DOMContext(this.opts.ref);\n let unsubEvents = noop;\n watch(() => opts.enabled.current, (enabled) => {\n if (enabled) {\n globalThis.bitsEscapeLayers.set(this, opts.escapeKeydownBehavior);\n unsubEvents = this.#addEventListener();\n }\n return () => {\n unsubEvents();\n globalThis.bitsEscapeLayers.delete(this);\n };\n });\n }\n #addEventListener = () => {\n return on(this.domContext.getDocument(), \"keydown\", this.#onkeydown, { passive: false });\n };\n #onkeydown = (e) => {\n if (e.key !== kbd.ESCAPE || !isResponsibleEscapeLayer(this))\n return;\n const clonedEvent = new KeyboardEvent(e.type, e);\n e.preventDefault();\n const behaviorType = this.opts.escapeKeydownBehavior.current;\n if (behaviorType !== \"close\" && behaviorType !== \"defer-otherwise-close\")\n return;\n this.opts.onEscapeKeydown.current(clonedEvent);\n };\n}\nfunction isResponsibleEscapeLayer(instance) {\n const layersArr = [...globalThis.bitsEscapeLayers];\n /**\n * We first check if we can find a top layer with `close` or `ignore`.\n * If that top layer was found and matches the provided node, then the node is\n * responsible for the escape. Otherwise, we know that all layers defer so\n * the first layer is the responsible one.\n */\n const topMostLayer = layersArr.findLast(([_, { current: behaviorType }]) => behaviorType === \"close\" || behaviorType === \"ignore\");\n if (topMostLayer)\n return topMostLayer[0] === instance;\n const [firstLayerNode] = layersArr[0];\n return firstLayerNode === instance;\n}\n","<script lang=\"ts\">\n\timport { boxWith } from \"svelte-toolbelt\";\n\timport { untrack } from \"svelte\";\n\timport type { EscapeLayerImplProps } from \"./types.js\";\n\timport { EscapeLayerState } from \"./use-escape-layer.svelte.js\";\n\timport { noop } from \"../../../internal/noop.js\";\n\n\tlet {\n\t\tescapeKeydownBehavior = \"close\",\n\t\tonEscapeKeydown = noop,\n\t\tchildren,\n\t\tenabled,\n\t\tref,\n\t}: EscapeLayerImplProps = $props();\n\n\tEscapeLayerState.create({\n\t\tescapeKeydownBehavior: boxWith(() => escapeKeydownBehavior),\n\t\tonEscapeKeydown: boxWith(() => onEscapeKeydown),\n\t\tenabled: boxWith(() => enabled),\n\t\tref: untrack(() => ref),\n\t});\n</script>\n\n{@render children?.()}\n","import { getActiveElement, simpleBox } from \"svelte-toolbelt\";\nimport { FocusScope } from \"./focus-scope.svelte.js\";\nexport class FocusScopeManager {\n static instance;\n #scopeStack = simpleBox([]);\n #focusHistory = new WeakMap();\n #preFocusHistory = new WeakMap();\n static getInstance() {\n if (!this.instance) {\n this.instance = new FocusScopeManager();\n }\n return this.instance;\n }\n register(scope) {\n const current = this.getActive();\n if (current && current !== scope) {\n current.pause();\n }\n // capture the currently focused element before this scope becomes active\n const activeElement = getActiveElement(document);\n if (activeElement && activeElement !== document.body) {\n this.#preFocusHistory.set(scope, activeElement);\n }\n this.#scopeStack.current = this.#scopeStack.current.filter((s) => s !== scope);\n this.#scopeStack.current.unshift(scope);\n // the incoming scope may still be paused from an earlier registration\n scope.resume();\n }\n unregister(scope) {\n this.#scopeStack.current = this.#scopeStack.current.filter((s) => s !== scope);\n const next = this.getActive();\n if (next) {\n next.resume();\n }\n }\n getActive() {\n return this.#scopeStack.current[0];\n }\n setFocusMemory(scope, element) {\n this.#focusHistory.set(scope, element);\n }\n getFocusMemory(scope) {\n return this.#focusHistory.get(scope);\n }\n isActiveScope(scope) {\n return this.getActive() === scope;\n }\n setPreFocusMemory(scope, element) {\n this.#preFocusHistory.set(scope, element);\n }\n getPreFocusMemory(scope) {\n return this.#preFocusHistory.get(scope);\n }\n clearPreFocusMemory(scope) {\n this.#preFocusHistory.delete(scope);\n }\n}\n","/*!\n* tabbable 6.5.1\n* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE\n*/\n// NOTE: separate `:not()` selectors has broader browser support than the newer\n// `:not([inert], [inert] *)` (Feb 2023)\nvar candidateSelectors = ['input:not([inert]):not([inert] *)', 'select:not([inert]):not([inert] *)', 'textarea:not([inert]):not([inert] *)', 'a[href]:not([inert]):not([inert] *)', 'area[href]:not([inert]):not([inert] *)', 'button:not([inert]):not([inert] *)', '[tabindex]:not(slot):not([inert]):not([inert] *)', 'audio[controls]:not([inert]):not([inert] *)', 'video[controls]:not([inert]):not([inert] *)', '[contenteditable]:not([contenteditable=\"false\"]):not([inert]):not([inert] *)', 'details>summary:first-of-type:not([inert]):not([inert] *)', 'details:not([inert]):not([inert] *)'];\nvar candidateSelector = /* #__PURE__ */candidateSelectors.join(',');\nvar NoElement = typeof Element === 'undefined';\nvar matches = NoElement ? function () {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\nvar getRootNode = !NoElement && Element.prototype.getRootNode ? function (element) {\n return element == null || element.getRootNode == null ? void 0 : element.getRootNode();\n} : function (element) {\n return element == null ? void 0 : element.ownerDocument;\n};\n\n/**\n * Determines if a node is inert or in an inert ancestor.\n * @param {Node} [node]\n * @param {boolean} [lookUp] If true and `node` is not inert, looks up at ancestors to\n * see if any of them are inert. If false, only `node` itself is considered.\n * @returns {boolean} True if inert itself or by way of being in an inert ancestor.\n * False if `node` is falsy.\n */\nvar _isInert = function isInert(node, lookUp) {\n if (lookUp === void 0) {\n lookUp = true;\n }\n // CAREFUL: JSDom does not support inert at all, so we can't use the `HTMLElement.inert`\n // JS API property; we have to check the attribute, which can either be empty or 'true';\n // if it's `null` (not specified) or 'false', it's an active element\n var inertAtt = node == null || node.getAttribute == null ? void 0 : node.getAttribute('inert');\n var inert = inertAtt === '' || inertAtt === 'true';\n\n // NOTE: this could also be handled with `node.matches('[inert], :is([inert] *)')`\n // if it weren't for `matches()` not being a function on shadow roots; the following\n // code works for any kind of node\n var result = inert || lookUp && node && (\n // closest does not exist on shadow roots, so we fall back to a manual\n // lookup upward, in case it is not defined.\n typeof node.closest === 'function' ? node.closest('[inert]') : _isInert(node.parentNode));\n return result;\n};\n\n/**\n * Determines if a node's content is editable.\n * @param {Element} [node]\n * @returns True if it's content-editable; false if it's not or `node` is falsy.\n */\nvar isContentEditable = function isContentEditable(node) {\n var _node$getAttribute;\n // CAREFUL: JSDom does not support the `HTMLElement.isContentEditable` API so we have\n // to use the case-insensitive attribute directly: empty, 'true', and 'plaintext-only'\n // are editable states; `null` (not specified) and 'false' are not.\n var attValue = node == null || node.getAttribute == null || (_node$getAttribute = node.getAttribute('contenteditable')) == null ? void 0 : _node$getAttribute.toLowerCase();\n return attValue === '' || attValue === 'true' || attValue === 'plaintext-only';\n};\n\n/**\n * @param {Element} el container to check in\n * @param {boolean} includeContainer add container to check\n * @param {(node: Element) => boolean} filter filter candidates\n * @returns {Element[]}\n */\nvar getCandidates = function getCandidates(el, includeContainer, filter) {\n // even if `includeContainer=false`, we still have to check it for inertness because\n // if it's inert (either by itself or via its parent), then all its children are inert\n if (_isInert(el)) {\n return [];\n }\n var candidates = Array.prototype.slice.apply(el.querySelectorAll(candidateSelector));\n if (includeContainer && matches.call(el, candidateSelector)) {\n candidates.unshift(el);\n }\n candidates = candidates.filter(filter);\n return candidates;\n};\n\n/**\n * @callback GetShadowRoot\n * @param {Element} element to check for shadow root\n * @returns {ShadowRoot|boolean} ShadowRoot if available or boolean indicating if a shadowRoot is attached but not available.\n */\n\n/**\n * @callback ShadowRootFilter\n * @param {Element} shadowHostNode the element which contains shadow content\n * @returns {boolean} true if a shadow root could potentially contain valid candidates.\n */\n\n/**\n * @typedef {Object} CandidateScope\n * @property {Element} scopeParent contains inner candidates\n * @property {Element[]} candidates list of candidates found in the scope parent\n */\n\n/**\n * @typedef {Object} IterativeOptions\n * @property {GetShadowRoot|boolean} getShadowRoot true if shadow support is enabled; falsy if not;\n * if a function, implies shadow support is enabled and either returns the shadow root of an element\n * or a boolean stating if it has an undisclosed shadow root\n * @property {(node: Element) => boolean} filter filter candidates\n * @property {boolean} flatten if true then result will flatten any CandidateScope into the returned list\n * @property {ShadowRootFilter} shadowRootFilter filter shadow roots;\n */\n\n/**\n * @param {Element[]} elements list of element containers to match candidates from\n * @param {boolean} includeContainer add container list to check\n * @param {IterativeOptions} options\n * @returns {Array.<Element|CandidateScope>}\n */\nvar _getCandidatesIteratively = function getCandidatesIteratively(elements, includeContainer, options) {\n var candidates = [];\n var elementsToCheck = Array.from(elements);\n while (elementsToCheck.length) {\n var element = elementsToCheck.shift();\n if (_isInert(element, false)) {\n // no need to look up since we're drilling down\n // anything inside this container will also be inert\n continue;\n }\n if (element.tagName === 'SLOT') {\n // add shadow dom slot scope (slot itself cannot be focusable)\n var assigned = element.assignedElements();\n var content = assigned.length ? assigned : element.children;\n var nestedCandidates = _getCandidatesIteratively(content, true, options);\n if (options.flatten) {\n candidates.push.apply(candidates, nestedCandidates);\n } else {\n candidates.push({\n scopeParent: element,\n candidates: nestedCandidates\n });\n }\n } else {\n // check candidate element\n var validCandidate = matches.call(element, candidateSelector);\n if (validCandidate && options.filter(element) && (includeContainer || !elements.includes(element))) {\n candidates.push(element);\n }\n\n // iterate over shadow content if possible\n var shadowRoot = element.shadowRoot ||\n // check for an undisclosed shadow\n typeof options.getShadowRoot === 'function' && options.getShadowRoot(element);\n\n // no inert look up because we're already drilling down and checking for inertness\n // on the way down, so all containers to this root node should have already been\n // vetted as non-inert\n var validShadowRoot = !_isInert(shadowRoot, false) && (!options.shadowRootFilter || options.shadowRootFilter(element));\n if (shadowRoot && validShadowRoot) {\n // add shadow dom scope IIF a shadow root node was given; otherwise, an undisclosed\n // shadow exists, so look at light dom children as fallback BUT create a scope for any\n // child candidates found because they're likely slotted elements (elements that are\n // children of the web component element (which has the shadow), in the light dom, but\n // slotted somewhere _inside_ the undisclosed shadow) -- the scope is created below,\n // _after_ we return from this recursive call\n var _nestedCandidates = _getCandidatesIteratively(shadowRoot === true ? element.children : shadowRoot.children, true, options);\n if (options.flatten) {\n candidates.push.apply(candidates, _nestedCandidates);\n } else {\n candidates.push({\n scopeParent: element,\n candidates: _nestedCandidates\n });\n }\n } else {\n // there's not shadow so just dig into the element's (light dom) children\n // __without__ giving the element special scope treatment\n elementsToCheck.unshift.apply(elementsToCheck, element.children);\n }\n }\n }\n return candidates;\n};\n\n/**\n * @private\n * Determines if the node has an explicitly specified `tabindex` attribute.\n * @param {HTMLElement} node\n * @returns {boolean} True if so; false if not.\n */\nvar hasTabIndex = function hasTabIndex(node) {\n return !isNaN(parseInt(node.getAttribute('tabindex'), 10));\n};\n\n/**\n * Determine the tab index of a given node.\n * @param {HTMLElement} node\n * @returns {number} Tab order (negative, 0, or positive number).\n * @throws {Error} If `node` is falsy.\n */\nvar getTabIndex = function getTabIndex(node) {\n if (!node) {\n throw new Error('No node provided');\n }\n if (node.tabIndex < 0) {\n // in Chrome, <details/>, <audio controls/> and <video controls/> elements get a default\n // `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,\n // yet they are still part of the regular tab order; in FF, they get a default\n // `tabIndex` of 0; since Chrome still puts those elements in the regular tab\n // order, consider their tab index to be 0.\n // Also browsers do not return `tabIndex` correctly for contentEditable nodes;\n // so if they don't have a tabindex attribute specifically set, assume it's 0.\n if ((/^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) || isContentEditable(node)) && !hasTabIndex(node)) {\n return 0;\n }\n }\n return node.tabIndex;\n};\n\n/**\n * Determine the tab index of a given node __for sort order purposes__.\n * @param {HTMLElement} node\n * @param {boolean} [isScope] True for a custom element with shadow root or slot that, by default,\n * has tabIndex -1, but needs to be sorted by document order in order for its content to be\n * inserted into the correct sort position.\n * @returns {number} Tab order (negative, 0, or positive number).\n */\nvar getSortOrderTabIndex = function getSortOrderTabIndex(node, isScope) {\n var tabIndex = getTabIndex(node);\n if (tabIndex < 0 && isScope && !hasTabIndex(node)) {\n return 0;\n }\n return tabIndex;\n};\nvar sortOrderedTabbables = function sortOrderedTabbables(a, b) {\n return a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex;\n};\nvar isInput = function isInput(node) {\n return node.tagName === 'INPUT';\n};\nvar isHiddenInput = function isHiddenInput(node) {\n return isInput(node) && node.type === 'hidden';\n};\nvar isDetailsWithSummary = function isDetailsWithSummary(node) {\n var r = node.tagName === 'DETAILS' && Array.prototype.slice.apply(node.children).some(function (child) {\n return child.tagName === 'SUMMARY';\n });\n return r;\n};\nvar getCheckedRadio = function getCheckedRadio(nodes, form) {\n for (var i = 0; i < nodes.length; i++) {\n if (nodes[i].checked && nodes[i].form === form) {\n return nodes[i];\n }\n }\n};\nvar isTabbableRadio = function isTabbableRadio(node) {\n if (!node.name) {\n return true;\n }\n var radioScope = node.form || getRootNode(node);\n var queryRadios = function queryRadios(name) {\n return radioScope.querySelectorAll('input[type=\"radio\"][name=\"' + name + '\"]');\n };\n var radioSet;\n if (typeof window !== 'undefined' && typeof window.CSS !== 'undefined' && typeof window.CSS.escape === 'function') {\n radioSet = queryRadios(window.CSS.escape(node.name));\n } else {\n try {\n radioSet = queryRadios(node.name);\n } catch (err) {\n // eslint-disable-next-line no-console\n console.error('Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s', err.message);\n return false;\n }\n }\n var checked = getCheckedRadio(radioSet, node.form);\n return !checked || checked === node;\n};\nvar isRadio = function isRadio(node) {\n return isInput(node) && node.type === 'radio';\n};\nvar isNonTabbableRadio = function isNonTabbableRadio(node) {\n return isRadio(node) && !isTabbableRadio(node);\n};\n\n// determines if a node is ultimately attached to the window's document\nvar isNodeAttached = function isNodeAttached(node) {\n var _nodeRoot;\n // The root node is the shadow root if the node is in a shadow DOM; some document otherwise\n // (but NOT _the_ document; see second 'If' comment below for more).\n // If rootNode is shadow root, it'll have a host, which is the element to which the shadow\n // is attached, and the one we need to check if it's in the document or not (because the\n // shadow, and all nodes it contains, is never considered in the document since shadows\n // behave like self-contained DOMs; but if the shadow's HOST, which is part of the document,\n // is hidden, or is not in the document itself but is detached, it will affect the shadow's\n // visibility, including all the nodes it contains). The host could be any normal node,\n // or a custom element (i.e. web component). Either way, that's the one that is considered\n // part of the document, not the shadow root, nor any of its children (i.e. the node being\n // tested).\n // To further complicate things, we have to look all the way up until we find a shadow HOST\n // that is attached (or find none) because the node might be in nested shadows...\n // If rootNode is not a shadow root, it won't have a host, and so rootNode should be the\n // document (per the docs) and while it's a Document-type object, that document does not\n // appear to be the same as the node's `ownerDocument` for some reason, so it's safer\n // to ignore the rootNode at this point, and use `node.ownerDocument`. Otherwise,\n // using `rootNode.contains(node)` will _always_ be true we'll get false-positives when\n // node is actually detached.\n // NOTE: If `nodeRootHost` or `node` happens to be the `document` itself (which is possible\n // if a tabbable/focusable node was quickly added to the DOM, focused, and then removed\n // from the DOM as in https://github.com/focus-trap/focus-trap-react/issues/905), then\n // `ownerDocument` will be `null`, hence the optional chaining on it.\n var nodeRoot = node && getRootNode(node);\n var nodeRootHost = (_nodeRoot = nodeRoot) == null ? void 0 : _nodeRoot.host;\n\n // in some cases, a detached node will return itself as the root instead of a document or\n // shadow root object, in which case, we shouldn't try to look further up the host chain\n var attached = false;\n if (nodeRoot && nodeRoot !== node) {\n var _nodeRootHost, _node$ownerDocument;\n attached = !!((_nodeRootHost = nodeRootHost) != null && (_nodeRootHost = _nodeRootHost.ownerDocument) != null && _nodeRootHost.contains(nodeRootHost) || node != null && (_node$ownerDocument = node.ownerDocument) != null && _node$ownerDocument.contains(node));\n while (!attached && nodeRootHost) {\n var _nodeRoot2, _nodeRootHost2;\n // since it's not attached and we have a root host, the node MUST be in a nested shadow DOM,\n // which means we need to get the host's host and check if that parent host is contained\n // in (i.e. attached to) the document\n nodeRoot = getRootNode(nodeRootHost);\n nodeRootHost = (_nodeRoot2 = nodeRoot) == null ? void 0 : _nodeRoot2.host;\n attached = !!((_nodeRootHost2 = nodeRootHost) != null && (_nodeRootHost2 = _nodeRootHost2.ownerDocument) != null && _nodeRootHost2.contains(nodeRootHost));\n }\n }\n return attached;\n};\nvar isZeroArea = function isZeroArea(node) {\n var _node$getBoundingClie = node.getBoundingClientRect(),\n width = _node$getBoundingClie.width,\n height = _node$getBoundingClie.height;\n return width === 0 && height === 0;\n};\nvar isHidden = function isHidden(node, _ref) {\n var displayCheck = _ref.displayCheck,\n getShadowRoot = _ref.getShadowRoot;\n if (displayCheck === 'full-native') {\n if ('checkVisibility' in node) {\n // Chrome >= 105, Edge >= 105, Firefox >= 106, Safari >= 17.4\n // @see https://developer.mozilla.org/en-US/docs/Web/API/Element/checkVisibility#browser_compatibility\n var visible = node.checkVisibility({\n // Checking opacity might be desirable for some use cases, but natively,\n // opacity zero elements _are_ focusable and tabbable.\n checkOpacity: false,\n opacityProperty: false,\n contentVisibilityAuto: true,\n visibilityProperty: true,\n // This is an alias for `visibilityProperty`. Contemporary browsers\n // support both. However, this alias has wider browser support (Chrome\n // >= 105 and Firefox >= 106, vs. Chrome >= 121 and Firefox >= 122), so\n // we include it anyway.\n checkVisibilityCSS: true\n });\n return !visible;\n }\n // Fall through to manual visibility checks\n }\n\n // NOTE: visibility will be `undefined` if node is detached from the document\n // (see notes about this further down), which means we will consider it visible\n // (this is legacy behavior from a very long way back)\n // NOTE: we check this regardless of `displayCheck=\"none\"` because this is a\n // _visibility_ check, not a _display_ check\n var _getComputedStyle = getComputedStyle(node),\n visibility = _getComputedStyle.visibility;\n if (visibility === 'hidden' || visibility === 'collapse') {\n return true;\n }\n var isDirectSummary = matches.call(node, 'details>summary:first-of-type');\n var nodeUnderDetails = isDirectSummary ? node.parentElement : node;\n if (matches.call(nodeUnderDetails, 'details:not([open]) *')) {\n return true;\n }\n if (!displayCheck || displayCheck === 'full' ||\n // full-native can run this branch when it falls through in case\n // Element#checkVisibility is unsupported\n displayCheck === 'full-native' || displayCheck === 'legacy-full') {\n if (typeof getShadowRoot === 'function') {\n // figure out if we should consider the node to be in an undisclosed shadow and use the\n // 'non-zero-area' fallback\n var originalNode = node;\n while (node) {\n var parentElement = node.parentElement;\n var rootNode = getRootNode(node);\n if (parentElement && !parentElement.shadowRoot && getShadowRoot(parentElement) === true // check if there's an undisclosed shadow\n ) {\n // node has an undisclosed shadow which means we can only treat it as a black box, so we\n // fall back to a non-zero-area test\n return isZeroArea(node);\n } else if (node.assignedSlot) {\n // iterate up slot\n node = node.assignedSlot;\n } else if (!parentElement && rootNode !== node.ownerDocument) {\n // cross shadow boundary\n node = rootNode.host;\n } else {\n // iterate up normal dom\n node = parentElement;\n }\n }\n node = originalNode;\n }\n // else, `getShadowRoot` might be true, but all that does is enable shadow DOM support\n // (i.e. it does not also presume that all nodes might have undisclosed shadows); or\n // it might be a falsy value, which means shadow DOM support is disabled\n\n // Since we didn't find it sitting in an undisclosed shadow (or shadows are disabled)\n // now we can just test to see if it would normally be visible or not, provided it's\n // attached to the main document.\n // NOTE: We must consider case where node is inside a shadow DOM and given directly to\n // `isTabbable()` or `isFocusable()` -- regardless of `getShadowRoot` option setting.\n\n if (isNodeAttached(node)) {\n // this works wherever the node is: if there's at least one client rect, it's\n // somehow displayed; it also covers the CSS 'display: contents' case where the\n // node itself is hidden in place of its contents; and there's no need to search\n // up the hierarchy either\n return !node.getClientRects().length;\n }\n\n // Else, the node isn't attached to the document, which means the `getClientRects()`\n // API will __always__ return zero rects (this can happen, for example, if React\n // is used to render nodes onto a detached tree, as confirmed in this thread:\n // https://github.com/facebook/react/issues/9117#issuecomment-284228870)\n //\n // It also means that even window.getComputedStyle(node).display will return `undefined`\n // because styles are only computed for nodes that are in the document.\n //\n // NOTE: THIS HAS BEEN THE CASE FOR YEARS. It is not new, nor is it caused by tabbable\n // somehow. Though it was never stated officially, anyone who has ever used tabbable\n // APIs on nodes in detached containers has actually implicitly used tabbable in what\n // was later (as of v5.2.0 on Apr 9, 2021) called `displayCheck=\"none\"` mode -- essentially\n // considering __everything__ to be visible because of the innability to determine styles.\n //\n // v6.0.0: As of this major release, the default 'full' option __no longer treats detached\n // nodes as visible with the 'none' fallback.__\n if (displayCheck !== 'legacy-full') {\n return true; // hidden\n }\n // else, fallback to 'none' mode and consider the node visible\n } else if (displayCheck === 'non-zero-area') {\n // NOTE: Even though this tests that the node's client rect is non-zero to determine\n // whether it's displayed, and that a detached node will __always__ have a zero-area\n // client rect, we don't special-case for whether the node is attached or not. In\n // this mode, we do want to consider nodes that have a zero area to be hidden at all\n // times, and that includes attached or not.\n return isZeroArea(node);\n }\n\n // visible, as far as we can tell, or per current `displayCheck=none` mode, we assume\n // it's visible\n return false;\n};\n\n// form fields (nested) inside a disabled fieldset are not focusable/tabbable\n// unless they are in the _first_ <legend> element of the top-most disabled\n// fieldset\nvar isDisabledFromFieldset = function isDisabledFromFieldset(node) {\n if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(node.tagName)) {\n var parentNode = node.parentElement;\n // check if `node` is contained in a disabled <fieldset>\n while (parentNode) {\n if (parentNode.tagName === 'FIELDSET' && parentNode.disabled) {\n // look for the first <legend> among the children of the disabled <fieldset>\n for (var i = 0; i < parentNode.children.length; i++) {\n var child = parentNode.children.item(i);\n // when the first <legend> (in document order) is found\n if (child.tagName === 'LEGEND') {\n // if its parent <fieldset> is not nested in another disabled <fieldset>,\n // return whether `node` is a descendant of its first <legend>\n return matches.call(parentNode, 'fieldset[disabled] *') ? true : !child.contains(node);\n }\n }\n // the disabled <fieldset> containing `node` has no <legend>\n return true;\n }\n parentNode = parentNode.parentElement;\n }\n }\n\n // else, node's tabbable/focusable state should not be affected by a fieldset's\n // enabled/disabled state\n return false;\n};\nvar isNodeMatchingSelectorFocusable = function isNodeMatchingSelectorFocusable(options, node) {\n if (node.disabled || isHiddenInput(node) || isHidden(node, options) ||\n // For a details element with a summary, the summary element gets the focus\n isDetailsWithSummary(node) || isDisabledFromFieldset(node)) {\n return false;\n }\n return true;\n};\nvar isNodeMatchingSelectorTabbable = function isNodeMatchingSelectorTabbable(options, node) {\n if (isNonTabbableRadio(node) || getTabIndex(node) < 0 || !isNodeMatchingSelectorFocusable(options, node)) {\n return false;\n }\n return true;\n};\nvar isShadowRootTabbable = function isShadowRootTabbable(shadowHostNode) {\n var tabIndex = parseInt(shadowHostNode.getAttribute('tabindex'), 10);\n if (isNaN(tabIndex) || tabIndex >= 0) {\n return true;\n }\n // If a custom element has an explicit negative tabindex,\n // browsers will not allow tab targeting said element's children.\n return false;\n};\n\n/**\n * @param {Array.<Element|CandidateScope>} candidates\n * @returns Element[]\n */\nvar _sortByOrder = function sortByOrder(candidates) {\n var regularTabbables = [];\n var orderedTabbables = [];\n candidates.forEach(function (item, i) {\n var isScope = !!item.scopeParent;\n var element = isScope ? item.scopeParent : item;\n var candidateTabindex = getSortOrderTabIndex(element, isScope);\n var elements = isScope ? _sortByOrder(item.candidates) : element;\n if (candidateTabindex === 0) {\n isScope ? regularTabbables.push.apply(regularTabbables, elements) : regularTabbables.push(element);\n } else {\n orderedTabbables.push({\n documentOrder: i,\n tabIndex: candidateTabindex,\n item: item,\n isScope: isScope,\n content: elements\n });\n }\n });\n return orderedTabbables.sort(sortOrderedTabbables).reduce(function (acc, sortable) {\n sortable.isScope ? acc.push.apply(acc, sortable.content) : acc.push(sortable.content);\n return acc;\n }, []).concat(regularTabbables);\n};\nvar tabbable = function tabbable(container, options) {\n options = options || {};\n var candidates;\n if (options.getShadowRoot) {\n candidates = _getCandidatesIteratively([container], options.includeContainer, {\n filter: isNodeMatchingSelectorTabbable.bind(null, options),\n flatten: false,\n getShadowRoot: options.getShadowRoot,\n shadowRootFilter: isShadowRootTabbable\n });\n } else {\n candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorTabbable.bind(null, options));\n }\n return _sortByOrder(candidates);\n};\nvar focusable = function focusable(container, options) {\n options = options || {};\n var candidates;\n if (options.getShadowRoot) {\n candidates = _getCandidatesIteratively([container], options.includeContainer, {\n filter: isNodeMatchingSelectorFocusable.bind(null, options),\n flatten: true,\n getShadowRoot: options.getShadowRoot\n });\n } else {\n candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorFocusable.bind(null, options));\n }\n return candidates;\n};\nvar isTabbable = function isTabbable(node, options) {\n options = options || {};\n if (!node) {\n throw new Error('No node provided');\n }\n if (matches.call(node, candidateSelector) === false) {\n return false;\n }\n return isNodeMatchingSelectorTabbable(options, node);\n};\nvar focusableCandidateSelector = /* #__PURE__ */candidateSelectors.concat('iframe:not([inert]):not([inert] *)').join(',');\nvar isFocusable = function isFocusable(node, options) {\n options = options || {};\n if (!node) {\n throw new Error('No node provided');\n }\n if (matches.call(node, focusableCandidateSelector) === false) {\n return false;\n }\n return isNodeMatchingSelectorFocusable(options, node);\n};\n\nexport { focusable, getTabIndex, isFocusable, isTabbable, tabbable };\n//# sourceMappingURL=index.esm.js.map\n","import { getActiveElement, onDestroyEffect } from \"svelte-toolbelt\";\nimport { FocusScopeManager } from \"./focus-scope-manager.js\";\nimport { focusable, isFocusable, tabbable } from \"tabbable\";\nimport { on } from \"svelte/events\";\nimport { watch } from \"runed\";\n/**\n * Retargets `node` to the tree `container` lives in by climbing shadow hosts, so a\n * node inside a shadow root nested in the scope resolves to its host. Returns `null`\n * when `node` is from an unrelated tree.\n */\nfunction retargetToScopeTree(node, container) {\n const scopeRoot = container.getRootNode();\n while (node) {\n const root = node.getRootNode();\n if (root === scopeRoot)\n return node;\n node = root !== node && \"host\" in root ? root.host : null;\n }\n return null;\n}\nexport class FocusScope {\n #paused = false;\n #container = null;\n #manager = FocusScopeManager.getInstance();\n #cleanupFns = [];\n #opts;\n constructor(opts) {\n this.#opts = opts;\n }\n get paused() {\n return this.#paused;\n }\n pause() {\n this.#paused = true;\n }\n resume() {\n this.#paused = false;\n }\n #cleanup() {\n for (const fn of this.#cleanupFns) {\n fn();\n }\n this.#cleanupFns = [];\n }\n mount(container) {\n if (this.#container) {\n this.unmount();\n }\n this.#container = container;\n this.#manager.register(this);\n this.#setupEventListeners();\n this.#handleOpenAutoFocus();\n }\n unmount() {\n if (!this.#container)\n return;\n this.#cleanup();\n // handle close auto-focus\n this.#handleCloseAutoFocus();\n this.#manager.unregister(this);\n this.#manager.clearPreFocusMemory(this);\n this.#container = null;\n }\n #handleOpenAutoFocus() {\n if (!this.#container)\n return;\n const event = new CustomEvent(\"focusScope.onOpenAutoFocus\", {\n bubbles: false,\n cancelable: true,\n });\n this.#opts.onOpenAutoFocus.current(event);\n if (!event.defaultPrevented) {\n requestAnimationFrame(() => {\n if (!this.#container ||\n this.#paused ||\n !this.#manager.isActiveScope(this) ||\n this.#container.contains(retargetToScopeTree(getActiveElement(this.#container.ownerDocument), this.#container))) {\n return;\n }\n const firstTabbable = this.#getFirstTabbable();\n if (firstTabbable) {\n firstTabbable.focus({ preventScroll: true });\n this.#manager.setFocusMemory(this, firstTabbable);\n }\n else {\n this.#container.focus({ preventScroll: true });\n }\n });\n }\n }\n #handleCloseAutoFocus() {\n const event = new CustomEvent(\"focusScope.onCloseAutoFocus\", {\n bubbles: false,\n cancelable: true,\n });\n this.#opts.onCloseAutoFocus.current?.(event);\n if (!event.defaultPrevented) {\n // return focus to the element that was focused before this scope opened\n const preFocusedElement = this.#manager.getPreFocusMemory(this);\n if (preFocusedElement && preFocusedElement.isConnected) {\n // ensure the element is still focusable and in the document\n try {\n preFocusedElement.focus({ preventScroll: true });\n }\n catch {\n // fallback if focus fails\n document.body.focus();\n }\n }\n }\n }\n #setupEventListeners() {\n if (!this.#container || !this.#opts.trap.current)\n return;\n const container = this.#container;\n const doc = container.ownerDocument;\n const handleFocus = (e) => {\n if (this.#paused || !this.#manager.isActiveScope(this))\n return;\n const target = retargetToScopeTree(e.composedPath()[0], container);\n const isInside = target !== null && container.contains(target);\n if (isInside) {\n // store last focused element\n this.#manager.setFocusMemory(this, target);\n }\n else {\n // focus escaped - bring it back\n const lastFocused = this.#manager.getFocusMemory(this);\n if (lastFocused && container.contains(lastFocused) && isFocusable(lastFocused)) {\n e.preventDefault();\n lastFocused.focus({ preventScroll: true });\n }\n else {\n // fallback to first tabbable or first focusable or container\n const firstTabbable = this.#getFirstTabbable();\n const firstFocusable = this.#getAllFocusables()[0];\n (firstTabbable || firstFocusable || container).focus({ preventScroll: true });\n }\n }\n };\n const handleKeydown = (e) => {\n if (!this.#opts.loop || this.#paused || e.key !== \"Tab\")\n return;\n if (!this.#manager.isActiveScope(this))\n return;\n const tabbables = this.#getTabbables();\n if (tabbables.length === 0)\n return;\n const first = tabbables[0];\n const last = tabbables[tabbables.length - 1];\n if (!e.shiftKey && getActiveElement(doc) === last) {\n e.preventDefault();\n first.focus();\n }\n else if (e.shiftKey && getActiveElement(doc) === first) {\n e.preventDefault();\n last.focus();\n }\n };\n this.#cleanupFns.push(on(doc, \"focusin\", handleFocus, { capture: true }), on(container, \"keydown\", handleKeydown));\n const observer = new MutationObserver(() => {\n const lastFocused = this.#manager.getFocusMemory(this);\n if (lastFocused && !container.contains(lastFocused)) {\n // last focused element was removed\n const firstTabbable = this.#getFirstTabbable();\n const firstFocusable = this.#getAllFocusables()[0];\n const elementToFocus = firstTabbable || firstFocusable;\n if (elementToFocus) {\n elementToFocus.focus({ preventScroll: true });\n this.#manager.setFocusMemory(this, elementToFocus);\n }\n else {\n // no focusable elements left, focus container\n container.focus({ preventScroll: true });\n }\n }\n });\n observer.observe(container, {\n childList: true,\n subtree: true,\n });\n this.#cleanupFns.push(() => observer.disconnect());\n }\n #getTabbables() {\n if (!this.#container)\n return [];\n return tabbable(this.#container, {\n includeContainer: false,\n getShadowRoot: true,\n });\n }\n #getFirstTabbable() {\n const tabbables = this.#getTabbables();\n return tabbables[0] || null;\n }\n #getAllFocusables() {\n if (!this.#container)\n return [];\n return focusable(this.#container, {\n includeContainer: false,\n getShadowRoot: true,\n });\n }\n static use(opts) {\n let scope = null;\n watch([() => opts.ref.current, () => opts.enabled.current], ([ref, enabled]) => {\n if (ref && enabled) {\n if (!scope) {\n scope = new FocusScope(opts);\n }\n scope.mount(ref);\n }\n else if (scope) {\n scope.unmount();\n scope = null;\n }\n });\n onDestroyEffect(() => {\n scope?.unmount();\n });\n return {\n get props() {\n return {\n tabindex: -1,\n };\n },\n };\n }\n}\n","<script lang=\"ts\">\n\timport { boxWith } from \"svelte-toolbelt\";\n\timport { untrack } from \"svelte\";\n\timport type { FocusScopeImplProps } from \"./types.js\";\n\timport { noop } from \"../../../internal/noop.js\";\n\timport { FocusScope } from \"./focus-scope.svelte.js\";\n\n\tlet {\n\t\tenabled = false,\n\t\ttrapFocus = false,\n\t\tloop = false,\n\t\tonCloseAutoFocus = noop,\n\t\tonOpenAutoFocus = noop,\n\t\tfocusScope,\n\t\tref,\n\t}: FocusScopeImplProps = $props();\n\n\tconst focusScopeState = FocusScope.use({\n\t\tenabled: boxWith(() => enabled),\n\t\ttrap: boxWith(() => trapFocus),\n\t\tloop: untrack(() => loop),\n\t\tonCloseAutoFocus: boxWith(() => onCloseAutoFocus),\n\t\tonOpenAutoFocus: boxWith(() => onOpenAutoFocus),\n\t\tref: untrack(() => ref),\n\t});\n</script>\n\n{@render focusScope?.({ props: focusScopeState.props })}\n","import { DOMContext, contains, executeCallbacks, } from \"svelte-toolbelt\";\nimport { watch } from \"runed\";\nimport { on } from \"svelte/events\";\nimport { noop } from \"../../../internal/noop.js\";\nimport { isHTMLElement } from \"../../../internal/is.js\";\nconst noopPointer = () => { };\nglobalThis.bitsTextSelectionLayers ??= new Map();\nexport class TextSelectionLayerState {\n static create(opts) {\n return new TextSelectionLayerState(opts);\n }\n opts;\n domContext;\n #unsubSelectionLock = noop;\n #enabledSnapshot = false;\n #onPointerDownSnapshot = noopPointer;\n #onPointerUpSnapshot = noopPointer;\n constructor(opts) {\n this.opts = opts;\n this.domContext = new DOMContext(opts.ref);\n let unsubEvents = noop;\n watch(() => [\n this.opts.enabled.current,\n this.opts.onPointerDown.current,\n this.opts.onPointerUp.current,\n ], ([enabled, onPointerDown, onPointerUp]) => {\n this.#enabledSnapshot = enabled;\n this.#onPointerDownSnapshot = onPointerDown;\n this.#onPointerUpSnapshot = onPointerUp;\n if (enabled) {\n globalThis.bitsTextSelectionLayers.set(this, this.opts.enabled);\n unsubEvents();\n unsubEvents = this.#addEventListeners();\n }\n return () => {\n this.#enabledSnapshot = false;\n unsubEvents();\n this.#resetSelectionLock();\n globalThis.bitsTextSelectionLayers.delete(this);\n };\n });\n }\n #addEventListeners() {\n return executeCallbacks(on(this.domContext.getDocument(), \"pointerdown\", this.#pointerdown), on(this.domContext.getDocument(), \"pointerup\", this.#pointerup));\n }\n #pointerup = (e) => {\n // Releasing the lock is internal cleanup, not a consumer callback, so it must run\n // whatever the event's default-prevented state. Composing it with the user handler\n // meant `composeHandlers` bailed out of the whole chain on a `pointerup` that\n // anything else had cancelled, leaving `user-select: none` on `<body>`.\n this.#resetSelectionLock();\n if (e.defaultPrevented)\n return;\n this.#onPointerUpSnapshot(e);\n };\n #pointerdown = (e) => {\n // Check the plain-boolean snapshot BEFORE reading `this.opts.ref.current`.\n // If this document listener outlives its component, that box is a `$derived`\n // owned by a destroyed effect, and reading it emits `derived_inert` on every\n // pointerdown anywhere in the document, forever.\n if (!this.#enabledSnapshot)\n return;\n // Release any lock still held before arming a new one. Under `forceMount` this\n // handler can run twice for a single event, and `preventTextSelectionOverflow`\n // snapshots the current `user-select` to restore later. Resetting the lock\n // prevents the second arm from re-snapshotting the `none` written the first time.\n this.#resetSelectionLock();\n const node = this.opts.ref.current;\n const target = e.target;\n if (!isHTMLElement(node) || !isHTMLElement(target))\n return;\n /**\n * We only lock user-selection overflow if layer is the top most layer and\n * pointerdown occurred inside the node. You are still allowed to select text\n * outside the node provided pointerdown occurs outside the node.\n */\n if (!isHighestLayer(this) || !contains(node, target))\n return;\n this.#onPointerDownSnapshot(e);\n if (e.defaultPrevented)\n return;\n this.#unsubSelectionLock = preventTextSelectionOverflow(node, this.domContext.getDocument().body);\n };\n #resetSelectionLock = () => {\n this.#unsubSelectionLock();\n this.#unsubSelectionLock = noop;\n };\n}\nconst getUserSelect = (node) => node.style.userSelect || node.style.webkitUserSelect;\nfunction preventTextSelectionOverflow(node, body) {\n const originalBodyUserSelect = getUserSelect(body);\n const originalNodeUserSelect = getUserSelect(node);\n setUserSelect(body, \"none\");\n setUserSelect(node, \"text\");\n return () => {\n setUserSelect(body, originalBodyUserSelect);\n setUserSelect(node, originalNodeUserSelect);\n };\n}\nfunction setUserSelect(node, value) {\n node.style.userSelect = value;\n node.style.webkitUserSelect = value;\n}\nfunction isHighestLayer(instance) {\n const layersArr = [...globalThis.bitsTextSelectionLayers];\n if (!layersArr.length)\n return false;\n const highestLayer = layersArr.at(-1);\n if (!highestLayer)\n return false;\n return highestLayer[0] === instance;\n}\n","<script lang=\"ts\">\n\timport { boxWith } from \"svelte-toolbelt\";\n\timport { untrack } from \"svelte\";\n\timport type { TextSelectionLayerImplProps } from \"./types.js\";\n\timport { TextSelectionLayerState } from \"./use-text-selection-layer.svelte.js\";\n\timport { noop } from \"../../../internal/noop.js\";\n\n\tlet {\n\t\tpreventOverflowTextSelection = true,\n\t\tonPointerDown = noop,\n\t\tonPointerUp = noop,\n\t\tid,\n\t\tchildren,\n\t\tenabled,\n\t\tref,\n\t}: TextSelectionLayerImplProps = $props();\n\n\tTextSelectionLayerState.create({\n\t\tid: boxWith(() => id),\n\t\tonPointerDown: boxWith(() => onPointerDown),\n\t\tonPointerUp: boxWith(() => onPointerUp),\n\t\tenabled: boxWith(() => enabled && preventOverflowTextSelection),\n\t\tref: untrack(() => ref),\n\t});\n</script>\n\n{@render children?.()}\n","globalThis.bitsIdCounter ??= { current: 0 };\n/**\n * Generates a unique ID based on a global counter.\n */\nexport function useId(prefix = \"bits\") {\n globalThis.bitsIdCounter.current++;\n return `${prefix}-${globalThis.bitsIdCounter.current}`;\n}\n","export class SharedState {\n #factory;\n #subscribers = 0;\n #state = $state();\n #scope;\n constructor(factory) {\n this.#factory = factory;\n }\n #dispose() {\n this.#subscribers -= 1;\n if (this.#scope && this.#subscribers <= 0) {\n this.#scope();\n this.#state = undefined;\n this.#scope = undefined;\n }\n }\n get(...args) {\n this.#subscribers += 1;\n if (this.#state === undefined) {\n this.#scope = $effect.root(() => {\n this.#state = this.#factory(...args);\n });\n }\n $effect(() => {\n return () => {\n this.#dispose();\n };\n });\n return this.#state;\n }\n}\n","import { SvelteMap } from \"svelte/reactivity\";\nimport { afterTick, boxWith, onDestroyEffect, } from \"svelte-toolbelt\";\nimport { isIOS } from \"./is.js\";\nimport { useId } from \"./use-id.js\";\nimport { watch } from \"runed\";\nimport { SharedState } from \"./shared-state.svelte.js\";\nimport { BROWSER } from \"esm-env\";\nimport { on } from \"svelte/events\";\n/** A map of lock ids to their `locked` state. */\nconst lockMap = new SvelteMap();\nconst MANAGED_PROPERTIES = [\n \"padding-right\",\n \"margin-right\",\n // the shorthand reads \"\" when only one axis is set inline, so its longhands are snapshotted\n // too and restored after it (keep this order)\n \"overflow\",\n \"overflow-x\",\n \"overflow-y\",\n \"pointer-events\",\n \"--scrollbar-width\",\n];\nlet initialProperties = null;\nlet hadInitialStyleAttribute = false;\nconst modifiedProperties = new Set();\nlet stopTouchMoveListener = null;\nlet cleanupTimeoutId = null;\nlet isInCleanupTransition = false;\nfunction setManagedProperty(style, property, value) {\n style.setProperty(property, value);\n modifiedProperties.add(property);\n if (property === \"overflow\") {\n modifiedProperties.add(\"overflow-x\");\n modifiedProperties.add(\"overflow-y\");\n }\n}\nconst anyLocked = boxWith(() => {\n for (const value of lockMap.values()) {\n if (value)\n return true;\n }\n return false;\n});\n/**\n * We track the time we scheduled the cleanup to prevent race conditions\n * when multiple locks are created/destroyed in the same tick, ensuring\n * only the last one to schedule the cleanup will run.\n *\n * reference: https://github.com/huntabyte/bits-ui/issues/1639\n */\nlet cleanupScheduledAt = null;\nconst bodyLockStackCount = new SharedState(() => {\n function restoreProperty(documentObj, prop) {\n const initial = initialProperties?.get(prop);\n if (initial?.value) {\n documentObj.body.style.setProperty(prop, initial.value, initial.priority);\n }\n else {\n documentObj.body.style.removeProperty(prop);\n }\n }\n function resetBodyStyle(documentObj) {\n if (!BROWSER)\n return;\n // without a snapshot, still remove what we set so the body is never left locked\n for (const prop of MANAGED_PROPERTIES) {\n if (!modifiedProperties.has(prop))\n continue;\n restoreProperty(documentObj, prop);\n }\n if (!hadInitialStyleAttribute && documentObj.body.style.length === 0) {\n documentObj.body.removeAttribute(\"style\");\n }\n initialProperties = null;\n modifiedProperties.clear();\n isIOS && stopTouchMoveListener?.();\n }\n /**\n * Unlike overflow/padding, pointer-events has no handover flicker to avoid, so it's\n * restored as soon as the last lock goes. A lock that arrives during the cleanup delay\n * sets it again in `afterTick`.\n *\n * reference: https://github.com/huntabyte/bits-ui/issues/2202\n */\n function restorePointerEvents(documentObj) {\n if (!modifiedProperties.delete(\"pointer-events\"))\n return;\n restoreProperty(documentObj, \"pointer-events\");\n }\n function cancelPendingCleanup() {\n if (cleanupTimeoutId === null)\n return;\n window.clearTimeout(cleanupTimeoutId);\n cleanupTimeoutId = null;\n }\n function scheduleCleanupIfNoNewLocks(delay, callback) {\n cancelPendingCleanup();\n isInCleanupTransition = true;\n cleanupScheduledAt = Date.now();\n const currentCleanupId = cleanupScheduledAt;\n /**\n * We schedule the cleanup to run after a delay to allow new locks to register\n * that might have been added in the same tick as the current cleanup.\n *\n * If a new lock is added in the same tick, the cleanup will be cancelled and\n * a new cleanup will be scheduled.\n *\n * This is to prevent the cleanup from running too early and resetting the body\n * style before the new lock has had a chance to apply its styles.\n */\n const cleanupFn = () => {\n cleanupTimeoutId = null;\n // check if this cleanup is still valid (no newer cleanups scheduled)\n if (cleanupScheduledAt !== currentCleanupId)\n return;\n // ensure no new locks were added during the delay\n if (!isAnyLocked(lockMap)) {\n isInCleanupTransition = false;\n callback();\n }\n else {\n isInCleanupTransition = false;\n }\n };\n const actualDelay = delay === null ? 24 : delay;\n cleanupTimeoutId = window.setTimeout(cleanupFn, actualDelay);\n }\n function ensureInitialStyleCaptured() {\n // only capture initial style once, when no locks exist and no cleanup is in progress\n if (initialProperties === null && lockMap.size === 0 && !isInCleanupTransition) {\n hadInitialStyleAttribute = document.body.hasAttribute(\"style\");\n initialProperties = new Map();\n for (const prop of MANAGED_PROPERTIES) {\n initialProperties.set(prop, {\n value: document.body.style.getPropertyValue(prop),\n priority: document.body.style.getPropertyPriority(prop),\n });\n }\n }\n }\n watch(() => anyLocked.current, () => {\n if (!anyLocked.current)\n return;\n // ensure we've captured the initial style before applying any lock styles\n ensureInitialStyleCaptured();\n // if we're applying lock styles, we're no longer in a cleanup transition\n isInCleanupTransition = false;\n const htmlStyle = getComputedStyle(document.documentElement);\n const bodyStyle = getComputedStyle(document.body);\n // check if scrollbar-gutter: stable is already handling scrollbar space\n const hasStableGutter = htmlStyle.scrollbarGutter?.includes(\"stable\") ||\n bodyStyle.scrollbarGutter?.includes(\"stable\");\n // TODO: account for RTL direction, etc.\n const verticalScrollbarWidth = window.innerWidth - document.documentElement.clientWidth;\n const paddingRight = Number.parseInt(bodyStyle.paddingRight ?? \"0\", 10);\n const config = {\n padding: paddingRight + verticalScrollbarWidth,\n margin: Number.parseInt(bodyStyle.marginRight ?? \"0\", 10),\n };\n // only add padding compensation if stable gutter isn't handling it\n if (verticalScrollbarWidth > 0 && !hasStableGutter) {\n setManagedProperty(document.body.style, \"padding-right\", `${config.padding}px`);\n setManagedProperty(document.body.style, \"margin-right\", `${config.margin}px`);\n setManagedProperty(document.body.style, \"--scrollbar-width\", `${verticalScrollbarWidth}px`);\n }\n setManagedProperty(document.body.style, \"overflow\", \"hidden\");\n if (isIOS) {\n // IOS devices are special and require a touchmove listener to prevent scrolling\n stopTouchMoveListener = on(document, \"touchmove\", (e) => {\n if (e.target !== document.documentElement)\n return;\n if (e.touches.length > 1)\n return;\n e.preventDefault();\n }, { passive: false });\n }\n /**\n * We ensure pointer-events: none is applied _after_ DOM updates, so that any focus/\n * interaction changes from opening overlays/menus complete _before_ we block pointer\n * events.\n *\n * this avoids race conditions where pointer-events could be set too early and break\n * focus/interaction.\n */\n afterTick(() => {\n setManagedProperty(document.body.style, \"pointer-events\", \"none\");\n setManagedProperty(document.body.style, \"overflow\", \"hidden\");\n });\n });\n onDestroyEffect(() => {\n return () => {\n stopTouchMoveListener?.();\n };\n });\n return {\n get lockMap() {\n return lockMap;\n },\n resetBodyStyle,\n restorePointerEvents,\n scheduleCleanupIfNoNewLocks,\n cancelPendingCleanup,\n ensureInitialStyleCaptured,\n };\n});\nexport class BodyScrollLock {\n #id = useId();\n #initialState;\n #restoreScrollDelay = () => null;\n #countState;\n locked;\n constructor(initialState, restoreScrollDelay = () => null) {\n this.#initialState = initialState;\n this.#restoreScrollDelay = restoreScrollDelay;\n this.#countState = bodyLockStackCount.get();\n if (!this.#countState)\n return;\n /**\n * Since a new lock is being created, we cancel any pending cleanup to\n * prevent the cleanup from running too early and resetting the body style\n * before the new lock has had a chance to apply its styles.\n *\n * reference: https://github.com/huntabyte/bits-ui/issues/1639\n */\n this.#countState.cancelPendingCleanup();\n // capture initial style before this lock is registered\n this.#countState.ensureInitialStyleCaptured();\n this.#countState.lockMap.set(this.#id, this.#initialState ?? false);\n this.locked = boxWith(() => this.#countState.lockMap.get(this.#id) ?? false, (v) => this.#countState.lockMap.set(this.#id, v));\n onDestroyEffect(() => {\n this.#countState.lockMap.delete(this.#id);\n // if not the last lock, we don't need to do anything\n if (isAnyLocked(this.#countState.lockMap))\n return;\n const restoreScrollDelay = this.#restoreScrollDelay();\n const documentObj = document;\n this.#countState.restorePointerEvents(documentObj);\n /**\n * We schedule the cleanup to run after a delay to handle same-tick\n * destroy/create scenarios.\n *\n * reference: https://github.com/huntabyte/bits-ui/issues/1639\n */\n this.#countState.scheduleCleanupIfNoNewLocks(restoreScrollDelay, () => {\n this.#countState.resetBodyStyle(documentObj);\n });\n });\n }\n}\nfunction isAnyLocked(map) {\n for (const [_, value] of map) {\n if (value)\n return true;\n }\n return false;\n}\n","<script lang=\"ts\">\n\timport { untrack } from \"svelte\";\n\timport type { ScrollLockProps } from \"./index.js\";\n\timport { BodyScrollLock } from \"../../../internal/body-scroll-lock.svelte.js\";\n\n\tlet { preventScroll = true, restoreScrollDelay = null }: ScrollLockProps = $props();\n\n\tuntrack(() => {\n\t\tif (preventScroll) {\n\t\t\tnew BodyScrollLock(preventScroll, () => restoreScrollDelay);\n\t\t}\n\t});\n</script>\n","import { boxFrom, simpleBox } from \"svelte-toolbelt\";\nimport { Context } from \"runed\";\nexport const FloatingRootContext = new Context(\"Floating.Root\");\nexport const FloatingTooltipRootContext = new Context(\"Floating.Root\");\nexport class FloatingRootState {\n static create(tooltip = false) {\n return tooltip\n ? FloatingTooltipRootContext.set(new FloatingRootState())\n : FloatingRootContext.set(new FloatingRootState());\n }\n anchorNode = simpleBox(null);\n customAnchorNode = simpleBox(null);\n triggerNode = simpleBox(null);\n constructor() {\n $effect(() => {\n if (this.customAnchorNode.current) {\n if (typeof this.customAnchorNode.current === \"string\") {\n this.anchorNode.current = document.querySelector(this.customAnchorNode.current);\n }\n else {\n this.anchorNode.current = this.customAnchorNode.current;\n }\n }\n else {\n this.anchorNode.current = this.triggerNode.current;\n }\n });\n }\n}\nexport class FloatingAnchorState {\n static create(opts, tooltip = false) {\n return tooltip\n ? new FloatingAnchorState(opts, FloatingTooltipRootContext.get())\n : new FloatingAnchorState(opts, FloatingRootContext.get());\n }\n opts;\n root;\n constructor(opts, root) {\n this.opts = opts;\n this.root = root;\n if (opts.virtualEl && opts.virtualEl.current) {\n root.triggerNode = boxFrom(opts.virtualEl.current);\n }\n else {\n root.triggerNode = opts.ref;\n }\n }\n}\n","<script lang=\"ts\">\n\timport { untrack, type Snippet } from \"svelte\";\n\timport { FloatingRootState } from \"../floating-root.svelte.js\";\n\n\tlet { children, tooltip = false }: { children?: Snippet; tooltip?: boolean } = $props();\n\n\tFloatingRootState.create(untrack(() => tooltip));\n</script>\n\n{@render children?.()}\n","export function get(valueOrGetValue) {\n return typeof valueOrGetValue === \"function\"\n ? valueOrGetValue()\n : valueOrGetValue;\n}\nexport function getDPR(element) {\n if (typeof window === \"undefined\")\n return 1;\n const win = element.ownerDocument.defaultView || window;\n return win.devicePixelRatio || 1;\n}\nexport function roundByDPR(element, value) {\n const dpr = getDPR(element);\n return Math.round(value * dpr) / dpr;\n}\nexport function getFloatingContentCSSVars(name) {\n return {\n [`--bits-${name}-content-transform-origin`]: `var(--bits-floating-transform-origin)`,\n [`--bits-${name}-content-available-width`]: `var(--bits-floating-available-width)`,\n [`--bits-${name}-content-available-height`]: `var(--bits-floating-available-height)`,\n [`--bits-${name}-anchor-width`]: `var(--bits-floating-anchor-width)`,\n [`--bits-${name}-anchor-height`]: `var(--bits-floating-anchor-height)`,\n };\n}\n","/**\n * Custom positioning reference element.\n * @see https://floating-ui.com/docs/virtual-elements\n */\n\nconst sides = ['top', 'right', 'bottom', 'left'];\nconst alignments = ['start', 'end'];\nconst placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + \"-\" + alignments[0], side + \"-\" + alignments[1]), []);\nconst min = Math.min;\nconst max = Math.max;\nconst round = Math.round;\nconst floor = Math.floor;\nconst createCoords = v => ({\n x: v,\n y: v\n});\nconst oppositeSideMap = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nfunction clamp(start, value, end) {\n return max(start, min(value, end));\n}\nfunction evaluate(value, param) {\n return typeof value === 'function' ? value(param) : value;\n}\nfunction getSide(placement) {\n return placement.split('-')[0];\n}\nfunction getAlignment(placement) {\n return placement.split('-')[1];\n}\nfunction getOppositeAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}\nfunction getAxisLength(axis) {\n return axis === 'y' ? 'height' : 'width';\n}\nfunction getSideAxis(placement) {\n const firstChar = placement[0];\n return firstChar === 't' || firstChar === 'b' ? 'y' : 'x';\n}\nfunction getAlignmentAxis(placement) {\n return getOppositeAxis(getSideAxis(placement));\n}\nfunction getAlignmentSides(placement, rects, rtl) {\n if (rtl === void 0) {\n rtl = false;\n }\n const alignment = getAlignment(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const length = getAxisLength(alignmentAxis);\n let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';\n if (rects.reference[length] > rects.floating[length]) {\n mainAlignmentSide = getOppositePlacement(mainAlignmentSide);\n }\n return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];\n}\nfunction getExpandedPlacements(placement) {\n const oppositePlacement = getOppositePlacement(placement);\n return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];\n}\nfunction getOppositeAlignmentPlacement(placement) {\n return placement.includes('start') ? placement.replace('start', 'end') : placement.replace('end', 'start');\n}\nconst lrPlacement = ['left', 'right'];\nconst rlPlacement = ['right', 'left'];\nconst tbPlacement = ['top', 'bottom'];\nconst btPlacement = ['bottom', 'top'];\nfunction getSideList(side, isStart, rtl) {\n switch (side) {\n case 'top':\n case 'bottom':\n if (rtl) return isStart ? rlPlacement : lrPlacement;\n return isStart ? lrPlacement : rlPlacement;\n case 'left':\n case 'right':\n return isStart ? tbPlacement : btPlacement;\n default:\n return [];\n }\n}\nfunction getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {\n const alignment = getAlignment(placement);\n let list = getSideList(getSide(placement), direction === 'start', rtl);\n if (alignment) {\n list = list.map(side => side + \"-\" + alignment);\n if (flipAlignment) {\n list = list.concat(list.map(getOppositeAlignmentPlacement));\n }\n }\n return list;\n}\nfunction getOppositePlacement(placement) {\n const side = getSide(placement);\n return oppositeSideMap[side] + placement.slice(side.length);\n}\nfunction expandPaddingObject(padding) {\n var _padding$top, _padding$right, _padding$bottom, _padding$left;\n return {\n top: (_padding$top = padding.top) != null ? _padding$top : 0,\n right: (_padding$right = padding.right) != null ? _padding$right : 0,\n bottom: (_padding$bottom = padding.bottom) != null ? _padding$bottom : 0,\n left: (_padding$left = padding.left) != null ? _padding$left : 0\n };\n}\nfunction getPaddingObject(padding) {\n return typeof padding !== 'number' ? expandPaddingObject(padding) : {\n top: padding,\n right: padding,\n bottom: padding,\n left: padding\n };\n}\nfunction rectToClientRect(rect) {\n const {\n x,\n y,\n width,\n height\n } = rect;\n return {\n width,\n height,\n top: y,\n left: x,\n right: x + width,\n bottom: y + height,\n x,\n y\n };\n}\n\nexport { alignments, clamp, createCoords, evaluate, expandPaddingObject, floor, getAlignment, getAlignmentAxis, getAlignmentSides, getAxisLength, getExpandedPlacements, getOppositeAlignmentPlacement, getOppositeAxis, getOppositeAxisPlacements, getOppositePlacement, getPaddingObject, getSide, getSideAxis, max, min, placements, rectToClientRect, round, sides };\n","import { getSideAxis, getAlignmentAxis, getAxisLength, getSide, getAlignment, evaluate, getPaddingObject, rectToClientRect, min, clamp, placements, getAlignmentSides, getOppositeAlignmentPlacement, getOppositePlacement, getExpandedPlacements, getOppositeAxisPlacements, sides, max, getOppositeAxis } from '@floating-ui/utils';\nexport { rectToClientRect } from '@floating-ui/utils';\n\nfunction computeCoordsFromPlacement(_ref, placement, rtl) {\n let {\n reference,\n floating\n } = _ref;\n const sideAxis = getSideAxis(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const alignLength = getAxisLength(alignmentAxis);\n const side = getSide(placement);\n const isVertical = sideAxis === 'y';\n const commonX = reference.x + reference.width / 2 - floating.width / 2;\n const commonY = reference.y + reference.height / 2 - floating.height / 2;\n const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;\n let coords;\n switch (side) {\n case 'top':\n coords = {\n x: commonX,\n y: reference.y - floating.height\n };\n break;\n case 'bottom':\n coords = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n case 'right':\n coords = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n case 'left':\n coords = {\n x: reference.x - floating.width,\n y: commonY\n };\n break;\n default:\n coords = {\n x: reference.x,\n y: reference.y\n };\n }\n const alignment = getAlignment(placement);\n if (alignment) {\n coords[alignmentAxis] += commonAlign * (alignment === 'end' ? 1 : -1) * (rtl && isVertical ? -1 : 1);\n }\n return coords;\n}\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\nasync function detectOverflow(state, options) {\n var _await$platform$isEle;\n if (options === void 0) {\n options = {};\n }\n const {\n x,\n y,\n platform,\n rects,\n elements,\n strategy\n } = state;\n const {\n boundary = 'clippingAncestors',\n rootBoundary = 'viewport',\n elementContext = 'floating',\n altBoundary = false,\n padding = 0\n } = evaluate(options, state);\n const paddingObject = getPaddingObject(padding);\n const altContext = elementContext === 'floating' ? 'reference' : 'floating';\n const element = elements[altBoundary ? altContext : elementContext];\n const clippingClientRect = rectToClientRect(await platform.getClippingRect({\n element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),\n boundary,\n rootBoundary,\n strategy\n }));\n const rect = elementContext === 'floating' ? {\n x,\n y,\n width: rects.floating.width,\n height: rects.floating.height\n } : rects.reference;\n const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));\n const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) && (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {\n x: 1,\n y: 1\n };\n const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({\n elements,\n rect,\n offsetParent,\n strategy\n }) : rect);\n return {\n top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,\n bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,\n left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,\n right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x\n };\n}\n\n// Maximum number of resets that can occur before bailing to avoid infinite reset loops.\nconst MAX_RESET_COUNT = 50;\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n *\n * This export does not have any `platform` interface logic. You will need to\n * write one for the platform you are using Floating UI with.\n */\nconst computePosition = async (reference, floating, config) => {\n const {\n placement = 'bottom',\n strategy = 'absolute',\n middleware = [],\n platform\n } = config;\n const platformWithDetectOverflow = platform.detectOverflow ? platform : {\n ...platform,\n detectOverflow\n };\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));\n let rects = await platform.getElementRects({\n reference,\n floating,\n strategy\n });\n let {\n x,\n y\n } = computeCoordsFromPlacement(rects, placement, rtl);\n let statefulPlacement = placement;\n let resetCount = 0;\n const middlewareData = {};\n for (let i = 0; i < middleware.length; i++) {\n const currentMiddleware = middleware[i];\n if (!currentMiddleware) {\n continue;\n }\n const {\n name,\n fn\n } = currentMiddleware;\n const {\n x: nextX,\n y: nextY,\n data,\n reset\n } = await fn({\n x,\n y,\n initialPlacement: placement,\n placement: statefulPlacement,\n strategy,\n middlewareData,\n rects,\n platform: platformWithDetectOverflow,\n elements: {\n reference,\n floating\n }\n });\n x = nextX != null ? nextX : x;\n y = nextY != null ? nextY : y;\n middlewareData[name] = {\n ...middlewareData[name],\n ...data\n };\n if (reset && resetCount < MAX_RESET_COUNT) {\n resetCount++;\n if (typeof reset === 'object') {\n if (reset.placement) {\n statefulPlacement = reset.placement;\n }\n if (reset.rects) {\n rects = reset.rects === true ? await platform.getElementRects({\n reference,\n floating,\n strategy\n }) : reset.rects;\n }\n ({\n x,\n y\n } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));\n }\n i = -1;\n }\n }\n return {\n x,\n y,\n placement: statefulPlacement,\n strategy,\n middlewareData\n };\n};\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = options => ({\n name: 'arrow',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n platform,\n elements,\n middlewareData\n } = state;\n // Since `element` is required, we don't Partial<> the type.\n const {\n element,\n padding = 0\n } = evaluate(options, state) || {};\n if (element == null) {\n return {};\n }\n const paddingObject = getPaddingObject(padding);\n const coords = {\n x,\n y\n };\n const axis = getAlignmentAxis(placement);\n const length = getAxisLength(axis);\n const arrowDimensions = await platform.getDimensions(element);\n const isYAxis = axis === 'y';\n const minProp = isYAxis ? 'top' : 'left';\n const maxProp = isYAxis ? 'bottom' : 'right';\n const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';\n const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];\n const startDiff = coords[axis] - rects.reference[axis];\n const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));\n let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;\n\n // DOM platform can return `window` as the `offsetParent`.\n if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {\n clientSize = elements.floating[clientProp] || rects.floating[length];\n }\n const centerToReference = endDiff / 2 - startDiff / 2;\n\n // If the padding is large enough that it causes the arrow to no longer be\n // centered, modify the padding so that it is centered.\n const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;\n const minPadding = min(paddingObject[minProp], largestPossiblePadding);\n const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);\n\n // Make sure the arrow doesn't overflow the floating element if the center\n // point is outside the floating element's bounds.\n const max = clientSize - arrowDimensions[length] - maxPadding;\n const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;\n const offset = clamp(minPadding, center, max);\n\n // If the reference is small enough that the arrow's padding causes it to\n // to point to nothing for an aligned placement, adjust the offset of the\n // floating element itself. To ensure `shift()` continues to take action,\n // a single reset is performed when this is true.\n const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < minPadding ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;\n const alignmentOffset = shouldAddOffset ? center < minPadding ? center - minPadding : center - max : 0;\n return {\n [axis]: coords[axis] + alignmentOffset,\n data: {\n [axis]: offset,\n centerOffset: center - offset - alignmentOffset,\n ...(shouldAddOffset && {\n alignmentOffset\n })\n },\n reset: shouldAddOffset\n };\n }\n});\n\nfunction getPlacementList(alignment, autoAlignment, allowedPlacements) {\n const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => getSide(placement) === placement);\n return allowedPlacementsSortedByAlignment.filter(placement => {\n if (alignment) {\n return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);\n }\n return true;\n });\n}\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'autoPlacement',\n options,\n async fn(state) {\n var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;\n const {\n rects,\n middlewareData,\n placement,\n platform,\n elements\n } = state;\n const {\n crossAxis = false,\n alignment,\n allowedPlacements = placements,\n autoAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;\n const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;\n const currentPlacement = placements$1[currentIndex];\n if (currentPlacement == null) {\n return {};\n }\n\n // Make `computeCoords` start from the right place.\n if (placement !== currentPlacement) {\n return {\n reset: {\n placement: placements$1[0]\n }\n };\n }\n const overflow = await platform.detectOverflow(state, detectOverflowOptions);\n const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));\n const currentOverflows = [overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];\n const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), {\n placement: currentPlacement,\n overflows: currentOverflows\n }];\n const nextPlacement = placements$1[currentIndex + 1];\n\n // There are more placements to check.\n if (nextPlacement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n const placementsSortedByMostSpace = allOverflows.map(d => {\n const alignment = getAlignment(d.placement);\n return [d.placement, alignment && crossAxis ?\n // Check along the mainAxis and main crossAxis side.\n d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) :\n // Check only the mainAxis.\n d.overflows[0], d.overflows];\n }).sort((a, b) => a[1] - b[1]);\n const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter(d => d[2].slice(0,\n // Aligned placements should not check their opposite crossAxis\n // side.\n getAlignment(d[0]) ? 2 : 3).every(v => v <= 0));\n const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];\n if (resetPlacement !== placement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: resetPlacement\n }\n };\n }\n return {};\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'flip',\n options,\n async fn(state) {\n var _middlewareData$arrow, _middlewareData$flip;\n const {\n placement,\n middlewareData,\n rects,\n initialPlacement,\n platform,\n elements\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true,\n fallbackPlacements: specifiedFallbackPlacements,\n fallbackStrategy = 'bestFit',\n fallbackAxisSideDirection = 'none',\n flipAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n\n // If a reset by the arrow was caused due to an alignment offset being\n // added, we should skip any logic now since `flip()` has already done its\n // work.\n // https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643\n if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n const side = getSide(placement);\n const initialSideAxis = getSideAxis(initialPlacement);\n const isBasePlacement = getSide(initialPlacement) === initialPlacement;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));\n const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none';\n if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {\n fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));\n }\n const placements = [initialPlacement, ...fallbackPlacements];\n const overflow = await platform.detectOverflow(state, detectOverflowOptions);\n const overflows = [];\n let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];\n if (checkMainAxis) {\n overflows.push(overflow[side]);\n }\n if (checkCrossAxis) {\n const sides = getAlignmentSides(placement, rects, rtl);\n overflows.push(overflow[sides[0]], overflow[sides[1]]);\n }\n overflowsData = [...overflowsData, {\n placement,\n overflows\n }];\n\n // One or more sides is overflowing.\n if (!overflows.every(side => side <= 0)) {\n var _middlewareData$flip2, _overflowsData$filter;\n const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;\n const nextPlacement = placements[nextIndex];\n if (nextPlacement) {\n const ignoreCrossAxisOverflow = checkCrossAxis === 'alignment' ? initialSideAxis !== getSideAxis(nextPlacement) : false;\n if (!ignoreCrossAxisOverflow ||\n // We leave the current main axis only if every placement on that axis\n // overflows the main axis.\n overflowsData.every(d => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) {\n // Try next placement and re-run the lifecycle.\n return {\n data: {\n index: nextIndex,\n overflows: overflowsData\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n }\n\n // First, find the candidates that fit on the mainAxis side of overflow,\n // then find the placement that fits the best on the main crossAxis side.\n let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;\n\n // Otherwise fallback.\n if (!resetPlacement) {\n switch (fallbackStrategy) {\n case 'bestFit':\n {\n var _overflowsData$filter2;\n const placement = (_overflowsData$filter2 = overflowsData.filter(d => {\n if (hasFallbackAxisSideDirection) {\n const currentSideAxis = getSideAxis(d.placement);\n return currentSideAxis === initialSideAxis ||\n // Create a bias to the `y` side axis due to horizontal\n // reading directions favoring greater width.\n currentSideAxis === 'y';\n }\n return true;\n }).map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];\n if (placement) {\n resetPlacement = placement;\n }\n break;\n }\n case 'initialPlacement':\n resetPlacement = initialPlacement;\n break;\n }\n }\n if (placement !== resetPlacement) {\n return {\n reset: {\n placement: resetPlacement\n }\n };\n }\n }\n return {};\n }\n };\n};\n\nfunction getSideOffsets(overflow, rect) {\n return {\n top: overflow.top - rect.height,\n right: overflow.right - rect.width,\n bottom: overflow.bottom - rect.height,\n left: overflow.left - rect.width\n };\n}\nfunction isAnySideFullyClipped(overflow) {\n return sides.some(side => overflow[side] >= 0);\n}\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'hide',\n options,\n async fn(state) {\n const {\n rects,\n platform\n } = state;\n const {\n strategy = 'referenceHidden',\n ...detectOverflowOptions\n } = evaluate(options, state);\n switch (strategy) {\n case 'referenceHidden':\n {\n const overflow = await platform.detectOverflow(state, {\n ...detectOverflowOptions,\n elementContext: 'reference'\n });\n const offsets = getSideOffsets(overflow, rects.reference);\n return {\n data: {\n referenceHiddenOffsets: offsets,\n referenceHidden: isAnySideFullyClipped(offsets)\n }\n };\n }\n case 'escaped':\n {\n const overflow = await platform.detectOverflow(state, {\n ...detectOverflowOptions,\n altBoundary: true\n });\n const offsets = getSideOffsets(overflow, rects.floating);\n return {\n data: {\n escapedOffsets: offsets,\n escaped: isAnySideFullyClipped(offsets)\n }\n };\n }\n default:\n {\n return {};\n }\n }\n }\n };\n};\n\nfunction getBoundingRect(rects) {\n const minX = min(...rects.map(rect => rect.left));\n const minY = min(...rects.map(rect => rect.top));\n const maxX = max(...rects.map(rect => rect.right));\n const maxY = max(...rects.map(rect => rect.bottom));\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY\n };\n}\nfunction getRectsByLine(rects) {\n const sortedRects = rects.slice().sort((a, b) => a.y - b.y);\n const groups = [];\n let prevRect = null;\n for (let i = 0; i < sortedRects.length; i++) {\n const rect = sortedRects[i];\n if (!prevRect || rect.y - prevRect.y > prevRect.height / 2) {\n groups.push([rect]);\n } else {\n groups[groups.length - 1].push(rect);\n }\n prevRect = rect;\n }\n return groups.map(rect => rectToClientRect(getBoundingRect(rect)));\n}\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'inline',\n options,\n async fn(state) {\n const {\n placement,\n elements,\n rects,\n platform,\n strategy\n } = state;\n // A MouseEvent's client{X,Y} coords can be up to 2 pixels off a\n // ClientRect's bounds, despite the event listener being triggered. A\n // padding of 2 seems to handle this issue.\n const {\n padding = 2,\n x,\n y\n } = evaluate(options, state);\n const nativeClientRects = Array.from((await (platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference))) || []);\n\n // No rects (e.g. a hidden or detached reference, or a collapsed range) —\n // keep the existing reference rect rather than resetting to an invalid\n // one with non-finite values.\n if (!nativeClientRects.length) {\n return {};\n }\n const clientRects = getRectsByLine(nativeClientRects);\n const fallback = rectToClientRect(getBoundingRect(nativeClientRects));\n const paddingObject = getPaddingObject(padding);\n function getBoundingClientRect() {\n // There are two rects and they are disjoined.\n if (clientRects.length === 2 && (clientRects[0].left > clientRects[1].right || clientRects[1].left > clientRects[0].right) && x != null && y != null) {\n // Find the first rect in which the point is fully inside.\n return clientRects.find(rect => x > rect.left - paddingObject.left && x < rect.right + paddingObject.right && y > rect.top - paddingObject.top && y < rect.bottom + paddingObject.bottom) || fallback;\n }\n\n // There are 2 or more connected rects.\n if (clientRects.length >= 2) {\n if (getSideAxis(placement) === 'y') {\n const firstRect = clientRects[0];\n const lastRect = clientRects[clientRects.length - 1];\n const isTop = getSide(placement) === 'top';\n const top = firstRect.top;\n const bottom = lastRect.bottom;\n const left = isTop ? firstRect.left : lastRect.left;\n const right = isTop ? firstRect.right : lastRect.right;\n return rectToClientRect({\n x: left,\n y: top,\n width: right - left,\n height: bottom - top\n });\n }\n const isLeftSide = getSide(placement) === 'left';\n const maxRight = max(...clientRects.map(rect => rect.right));\n const minLeft = min(...clientRects.map(rect => rect.left));\n const measureRects = clientRects.filter(rect => isLeftSide ? rect.left === minLeft : rect.right === maxRight);\n const top = measureRects[0].top;\n const bottom = measureRects[measureRects.length - 1].bottom;\n return rectToClientRect({\n x: minLeft,\n y: top,\n width: maxRight - minLeft,\n height: bottom - top\n });\n }\n return fallback;\n }\n const resetRects = await platform.getElementRects({\n reference: {\n getBoundingClientRect\n },\n floating: elements.floating,\n strategy\n });\n if (rects.reference.x !== resetRects.reference.x || rects.reference.y !== resetRects.reference.y || rects.reference.width !== resetRects.reference.width || rects.reference.height !== resetRects.reference.height) {\n return {\n reset: {\n rects: resetRects\n }\n };\n }\n return {};\n }\n };\n};\n\nconst originSides = /*#__PURE__*/new Set(['left', 'top']);\n\n// For type backwards-compatibility, the `OffsetOptions` type was also\n// Derivable.\n\nasync function convertValueToCoords(state, options) {\n const {\n placement,\n platform,\n elements\n } = state;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isVertical = getSideAxis(placement) === 'y';\n const mainAxisMulti = originSides.has(side) ? -1 : 1;\n const crossAxisMulti = rtl && isVertical ? -1 : 1;\n const rawValue = evaluate(options, state);\n\n // eslint-disable-next-line prefer-const\n let {\n mainAxis,\n crossAxis,\n alignmentAxis\n } = typeof rawValue === 'number' ? {\n mainAxis: rawValue,\n crossAxis: 0,\n alignmentAxis: null\n } : {\n mainAxis: rawValue.mainAxis || 0,\n crossAxis: rawValue.crossAxis || 0,\n alignmentAxis: rawValue.alignmentAxis\n };\n if (alignment && typeof alignmentAxis === 'number') {\n crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;\n }\n return isVertical ? {\n x: crossAxis * crossAxisMulti,\n y: mainAxis * mainAxisMulti\n } : {\n x: mainAxis * mainAxisMulti,\n y: crossAxis * crossAxisMulti\n };\n}\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = function (options) {\n if (options === void 0) {\n options = 0;\n }\n return {\n name: 'offset',\n options,\n async fn(state) {\n var _middlewareData$offse, _middlewareData$arrow;\n const {\n x,\n y,\n placement,\n middlewareData\n } = state;\n const diffCoords = await convertValueToCoords(state, options);\n\n // If the placement is the same and the arrow caused an alignment offset\n // then we don't need to change the positioning coordinates.\n if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n return {\n x: x + diffCoords.x,\n y: y + diffCoords.y,\n data: {\n ...diffCoords,\n placement\n }\n };\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'shift',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement,\n platform\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = false,\n limiter = {\n fn: _ref => {\n let {\n x,\n y\n } = _ref;\n return {\n x,\n y\n };\n }\n },\n ...detectOverflowOptions\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const overflow = await platform.detectOverflow(state, detectOverflowOptions);\n const crossAxis = getSideAxis(placement);\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n const clampCoord = (axis, coord) => clamp(coord + overflow[axis === 'y' ? 'top' : 'left'], coord, coord - overflow[axis === 'y' ? 'bottom' : 'right']);\n if (checkMainAxis) {\n mainAxisCoord = clampCoord(mainAxis, mainAxisCoord);\n }\n if (checkCrossAxis) {\n crossAxisCoord = clampCoord(crossAxis, crossAxisCoord);\n }\n const limitedCoords = limiter.fn({\n ...state,\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n });\n return {\n ...limitedCoords,\n data: {\n x: limitedCoords.x - x,\n y: limitedCoords.y - y,\n enabled: {\n [mainAxis]: checkMainAxis,\n [crossAxis]: checkCrossAxis\n }\n }\n };\n }\n };\n};\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n options,\n fn(state) {\n var _rawOffset$mainAxis, _rawOffset$crossAxis;\n const {\n x,\n y,\n placement,\n rects,\n middlewareData\n } = state;\n const {\n offset = 0,\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const crossAxis = getSideAxis(placement);\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n const rawOffset = evaluate(offset, state);\n const computedOffset = typeof rawOffset === 'number' ? {\n mainAxis: rawOffset,\n crossAxis: 0\n } : {\n mainAxis: (_rawOffset$mainAxis = rawOffset.mainAxis) != null ? _rawOffset$mainAxis : 0,\n crossAxis: (_rawOffset$crossAxis = rawOffset.crossAxis) != null ? _rawOffset$crossAxis : 0\n };\n if (checkMainAxis) {\n const len = mainAxis === 'y' ? 'height' : 'width';\n const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;\n const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;\n if (mainAxisCoord < limitMin) {\n mainAxisCoord = limitMin;\n } else if (mainAxisCoord > limitMax) {\n mainAxisCoord = limitMax;\n }\n }\n if (checkCrossAxis) {\n var _middlewareData$offse, _middlewareData$offse2;\n const len = mainAxis === 'y' ? 'width' : 'height';\n const isOriginSide = originSides.has(getSide(placement));\n const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);\n const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);\n if (crossAxisCoord < limitMin) {\n crossAxisCoord = limitMin;\n } else if (crossAxisCoord > limitMax) {\n crossAxisCoord = limitMax;\n }\n }\n return {\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n };\n }\n };\n};\n\n// Method syntax keeps callback parameters bivariant, but expressing the\n// explicit `| undefined` required by `exactOptionalPropertyTypes` needs\n// property syntax, which is contravariant under `strictFunctionTypes`.\n// Extracting the function from a method position restores that bivariance so\n// consumers can still assign callbacks with narrower parameter types.\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'size',\n options,\n async fn(state) {\n const {\n placement,\n rects,\n platform,\n elements\n } = state;\n const {\n apply = () => {},\n ...detectOverflowOptions\n } = evaluate(options, state);\n const overflow = await platform.detectOverflow(state, detectOverflowOptions);\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isYAxis = getSideAxis(placement) === 'y';\n const {\n width,\n height\n } = rects.floating;\n let heightSide;\n let widthSide;\n if (side === 'top' || side === 'bottom') {\n heightSide = side;\n widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right';\n } else {\n widthSide = side;\n heightSide = alignment === 'end' ? 'top' : 'bottom';\n }\n const maximumClippingHeight = height - overflow.top - overflow.bottom;\n const maximumClippingWidth = width - overflow.left - overflow.right;\n const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);\n const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);\n const shiftData = state.middlewareData.shift;\n const noShift = !shiftData;\n let availableHeight = overflowAvailableHeight;\n let availableWidth = overflowAvailableWidth;\n if (shiftData != null && shiftData.enabled.x) {\n availableWidth = maximumClippingWidth;\n }\n if (shiftData != null && shiftData.enabled.y) {\n availableHeight = maximumClippingHeight;\n }\n if (noShift && !alignment) {\n if (isYAxis) {\n availableWidth = width - 2 * max(overflow.left, overflow.right);\n } else {\n availableHeight = height - 2 * max(overflow.top, overflow.bottom);\n }\n }\n await apply({\n ...state,\n availableWidth,\n availableHeight\n });\n const nextDimensions = await platform.getDimensions(elements.floating);\n if (width !== nextDimensions.width || height !== nextDimensions.height) {\n return {\n reset: {\n rects: true\n }\n };\n }\n return {};\n }\n };\n};\n\nexport { arrow, autoPlacement, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, shift, size };\n","function hasWindow() {\n return typeof window !== 'undefined';\n}\nfunction getNodeName(node) {\n if (isNode(node)) {\n return (node.nodeName || '').toLowerCase();\n }\n // Mocked nodes in testing environments may not be instances of Node. By\n // returning `#document` an infinite loop won't occur.\n // https://github.com/floating-ui/floating-ui/issues/2317\n return '#document';\n}\nfunction getWindow(node) {\n var _node$ownerDocument;\n return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;\n}\nfunction getDocumentElement(node) {\n var _ref;\n return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;\n}\nfunction isNode(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Node || value instanceof getWindow(value).Node;\n}\nfunction isElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Element || value instanceof getWindow(value).Element;\n}\nfunction isHTMLElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;\n}\nfunction isShadowRoot(value) {\n if (!hasWindow() || typeof ShadowRoot === 'undefined') {\n return false;\n }\n return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;\n}\nfunction isOverflowElement(element) {\n const {\n overflow,\n overflowX,\n overflowY,\n display\n } = getComputedStyle(element);\n return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== 'inline' && display !== 'contents';\n}\nfunction isTableElement(element) {\n return /^(table|td|th)$/.test(getNodeName(element));\n}\nfunction isTopLayer(element) {\n try {\n if (element.matches(':popover-open')) {\n return true;\n }\n } catch (_e) {\n // no-op\n }\n try {\n return element.matches(':modal');\n } catch (_e) {\n return false;\n }\n}\nconst willChangeRe = /transform|translate|scale|rotate|perspective|filter/;\nconst containRe = /paint|layout|strict|content/;\nconst isNotNone = value => !!value && value !== 'none';\nlet isWebKitValue;\nfunction isContainingBlock(elementOrCss) {\n const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n // https://drafts.csswg.org/css-transforms-2/#individual-transforms\n return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || '') || containRe.test(css.contain || '');\n}\nfunction getContainingBlock(element) {\n let currentNode = getParentNode(element);\n while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {\n if (isContainingBlock(currentNode)) {\n return currentNode;\n } else if (isTopLayer(currentNode)) {\n return null;\n }\n currentNode = getParentNode(currentNode);\n }\n return null;\n}\nfunction isWebKit() {\n if (isWebKitValue == null) {\n isWebKitValue = typeof CSS !== 'undefined' && CSS.supports && CSS.supports('-webkit-backdrop-filter', 'none');\n }\n return isWebKitValue;\n}\nfunction isLastTraversableNode(node) {\n return /^(html|body|#document)$/.test(getNodeName(node));\n}\nfunction getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}\nfunction getNodeScroll(element) {\n if (isElement(element)) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n }\n return {\n scrollLeft: element.scrollX,\n scrollTop: element.scrollY\n };\n}\nfunction getParentNode(node) {\n if (getNodeName(node) === 'html') {\n return node;\n }\n const result =\n // Step into the shadow DOM of the parent of a slotted node.\n node.assignedSlot ||\n // DOM Element detected.\n node.parentNode ||\n // ShadowRoot detected.\n isShadowRoot(node) && node.host ||\n // Fallback.\n getDocumentElement(node);\n return isShadowRoot(result) ? result.host : result;\n}\nfunction getNearestOverflowAncestor(node) {\n const parentNode = getParentNode(node);\n if (isLastTraversableNode(parentNode)) {\n return (node.ownerDocument || node).body;\n }\n if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {\n return parentNode;\n }\n return getNearestOverflowAncestor(parentNode);\n}\nfunction getOverflowAncestors(node, list, traverseIframes) {\n var _node$ownerDocument2;\n if (list === void 0) {\n list = [];\n }\n if (traverseIframes === void 0) {\n traverseIframes = true;\n }\n const scrollableAncestor = getNearestOverflowAncestor(node);\n const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);\n const win = getWindow(scrollableAncestor);\n if (isBody) {\n const frameElement = getFrameElement(win);\n return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);\n } else {\n return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));\n }\n}\nfunction getFrameElement(win) {\n return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;\n}\n\nexport { getComputedStyle, getContainingBlock, getDocumentElement, getFrameElement, getNearestOverflowAncestor, getNodeName, getNodeScroll, getOverflowAncestors, getParentNode, getWindow, isContainingBlock, isElement, isHTMLElement, isLastTraversableNode, isNode, isOverflowElement, isShadowRoot, isTableElement, isTopLayer, isWebKit };\n","import { rectToClientRect, arrow as arrow$1, autoPlacement as autoPlacement$1, detectOverflow as detectOverflow$1, flip as flip$1, hide as hide$1, inline as inline$1, limitShift as limitShift$1, offset as offset$1, shift as shift$1, size as size$1, computePosition as computePosition$1 } from '@floating-ui/core';\nimport { round, createCoords, max, min, floor } from '@floating-ui/utils';\nimport { getComputedStyle as getComputedStyle$1, isHTMLElement, isElement, getWindow, isWebKit, getFrameElement, getNodeScroll, getDocumentElement, isTopLayer, getNodeName, isOverflowElement, getOverflowAncestors, getParentNode, isLastTraversableNode, isContainingBlock, isTableElement, getContainingBlock } from '@floating-ui/utils/dom';\nexport { getOverflowAncestors } from '@floating-ui/utils/dom';\n\nfunction getCssDimensions(element) {\n const css = getComputedStyle$1(element);\n // In testing environments, the `width` and `height` properties are empty\n // strings for SVG elements, returning NaN. Fallback to `0` in this case.\n let width = parseFloat(css.width) || 0;\n let height = parseFloat(css.height) || 0;\n const hasOffset = isHTMLElement(element);\n const offsetWidth = hasOffset ? element.offsetWidth : width;\n const offsetHeight = hasOffset ? element.offsetHeight : height;\n const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;\n if (shouldFallback) {\n width = offsetWidth;\n height = offsetHeight;\n }\n return {\n width,\n height,\n $: shouldFallback\n };\n}\n\nfunction unwrapElement(element) {\n return !isElement(element) ? element.contextElement : element;\n}\n\nfunction getScale(element) {\n const domElement = unwrapElement(element);\n if (!isHTMLElement(domElement)) {\n return createCoords(1);\n }\n const rect = domElement.getBoundingClientRect();\n const {\n width,\n height,\n $\n } = getCssDimensions(domElement);\n let x = ($ ? round(rect.width) : rect.width) / width;\n let y = ($ ? round(rect.height) : rect.height) / height;\n\n // 0, NaN, or Infinity should always fallback to 1.\n\n if (!x || !Number.isFinite(x)) {\n x = 1;\n }\n if (!y || !Number.isFinite(y)) {\n y = 1;\n }\n return {\n x,\n y\n };\n}\n\nconst noOffsets = /*#__PURE__*/createCoords(0);\nfunction getVisualOffsets(element) {\n const win = getWindow(element);\n if (!isWebKit() || !win.visualViewport) {\n return noOffsets;\n }\n return {\n x: win.visualViewport.offsetLeft,\n y: win.visualViewport.offsetTop\n };\n}\nfunction shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n return !!floatingOffsetParent && isFixed && floatingOffsetParent === getWindow(element);\n}\n\nfunction getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n const clientRect = element.getBoundingClientRect();\n const domElement = unwrapElement(element);\n let scale = createCoords(1);\n if (includeScale) {\n if (offsetParent) {\n if (isElement(offsetParent)) {\n scale = getScale(offsetParent);\n }\n } else {\n scale = getScale(element);\n }\n }\n const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);\n let x = (clientRect.left + visualOffsets.x) / scale.x;\n let y = (clientRect.top + visualOffsets.y) / scale.y;\n let width = clientRect.width / scale.x;\n let height = clientRect.height / scale.y;\n if (domElement && offsetParent) {\n const win = getWindow(domElement);\n const offsetWin = isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;\n let currentWin = win;\n let currentIFrame = getFrameElement(currentWin);\n while (currentIFrame && offsetWin !== currentWin) {\n const iframeScale = getScale(currentIFrame);\n const iframeRect = currentIFrame.getBoundingClientRect();\n const css = getComputedStyle$1(currentIFrame);\n const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;\n const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;\n x *= iframeScale.x;\n y *= iframeScale.y;\n width *= iframeScale.x;\n height *= iframeScale.y;\n x += left;\n y += top;\n currentWin = getWindow(currentIFrame);\n currentIFrame = getFrameElement(currentWin);\n }\n }\n return rectToClientRect({\n width,\n height,\n x,\n y\n });\n}\n\n// If <html> has a CSS width greater than the viewport, then this will be\n// incorrect for RTL.\nfunction getWindowScrollBarX(element, rect) {\n const leftScroll = getNodeScroll(element).scrollLeft;\n if (!rect) {\n return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;\n }\n return rect.left + leftScroll;\n}\n\nfunction getHTMLOffset(documentElement, scroll) {\n const htmlRect = documentElement.getBoundingClientRect();\n const x = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);\n const y = htmlRect.top + scroll.scrollTop;\n return {\n x,\n y\n };\n}\n\nfunction convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {\n let {\n elements,\n rect,\n offsetParent,\n strategy\n } = _ref;\n const isFixed = strategy === 'fixed';\n const documentElement = getDocumentElement(offsetParent);\n const topLayer = elements ? isTopLayer(elements.floating) : false;\n if (offsetParent === documentElement || topLayer && isFixed) {\n return rect;\n }\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n let scale = createCoords(1);\n const offsets = createCoords(0);\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n if (isOffsetParentAnElement || !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isOffsetParentAnElement) {\n const offsetRect = getBoundingClientRect(offsetParent);\n scale = getScale(offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n }\n }\n const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);\n return {\n width: rect.width * scale.x,\n height: rect.height * scale.y,\n x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,\n y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y\n };\n}\n\nfunction getClientRects(element) {\n return element.getClientRects ? Array.from(element.getClientRects()) : [];\n}\n\n// Gets the entire size of the scrollable document area, even extending outside\n// of the `<html>` and `<body>` rect bounds if horizontally scrollable.\nfunction getDocumentRect(html) {\n const scroll = getNodeScroll(html);\n const body = html.ownerDocument.body;\n const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);\n const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);\n let x = -scroll.scrollLeft + getWindowScrollBarX(html);\n const y = -scroll.scrollTop;\n if (getComputedStyle$1(body).direction === 'rtl') {\n x += max(html.clientWidth, body.clientWidth) - width;\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\n// Safety check: ensure the scrollbar space is reasonable in case this\n// calculation is affected by unusual styles.\n// Most scrollbars leave 15-18px of space.\nconst SCROLLBAR_MAX = 25;\nfunction getViewportRect(element, strategy, rootBoundary) {\n if (rootBoundary === void 0) {\n rootBoundary = 'viewport';\n }\n const isLayoutViewport = rootBoundary === 'layoutViewport';\n const win = getWindow(element);\n const html = getDocumentElement(element);\n const visualViewport = win.visualViewport;\n let width = html.clientWidth;\n let height = html.clientHeight;\n let x = 0;\n let y = 0;\n if (visualViewport) {\n // Client coordinates are relative to the layout viewport, except in\n // WebKit with an `absolute` strategy, where they are relative to the\n // visual viewport.\n const layoutRelativeClientCoords = !isWebKit() || strategy === 'fixed';\n if (isLayoutViewport) {\n if (!layoutRelativeClientCoords) {\n x = -visualViewport.offsetLeft;\n y = -visualViewport.offsetTop;\n }\n } else {\n width = visualViewport.width;\n height = visualViewport.height;\n if (layoutRelativeClientCoords) {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n }\n const windowScrollbarX = getWindowScrollBarX(html);\n // `scrollbar-gutter: stable` on the <html> reserves gutter space that shrinks\n // the visual width but isn't reflected in `html.clientWidth`, so subtract it.\n // Only the inline-end (right) gutter can hold the scrollbar; `both-edges` also\n // reserves an empty inline-start gutter that clips nothing, so exclude just\n // the one scrollbar-side gutter — halve the measured (two-gutter) total. A\n // left-side scrollbar (`windowScrollbarX > 0`) is already handled by\n // `getHTMLOffset`/`visualViewport.width`; skip it here.\n if (windowScrollbarX <= 0) {\n const doc = html.ownerDocument;\n const body = doc.body;\n const bodyStyles = getComputedStyle(body);\n const bodyMarginInline = doc.compatMode === 'CSS1Compat' ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;\n const reservedWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);\n const gutter = getComputedStyle(html).scrollbarGutter === 'stable both-edges' ? reservedWidth / 2 : reservedWidth;\n if (gutter <= SCROLLBAR_MAX) {\n width -= gutter;\n }\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\n// Returns the inner client rect, subtracting scrollbars if present.\nfunction getInnerBoundingClientRect(element, strategy) {\n const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');\n const top = clientRect.top + element.clientTop;\n const left = clientRect.left + element.clientLeft;\n const scale = getScale(element);\n const width = element.clientWidth * scale.x;\n const height = element.clientHeight * scale.y;\n const x = left * scale.x;\n const y = top * scale.y;\n return {\n width,\n height,\n x,\n y\n };\n}\nfunction getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {\n let rect;\n if (clippingAncestor === 'viewport' || clippingAncestor === 'layoutViewport') {\n rect = getViewportRect(element, strategy, clippingAncestor);\n } else if (clippingAncestor === 'document') {\n rect = getDocumentRect(getDocumentElement(element));\n } else if (isElement(clippingAncestor)) {\n rect = getInnerBoundingClientRect(clippingAncestor, strategy);\n } else {\n const visualOffsets = getVisualOffsets(element);\n rect = {\n x: clippingAncestor.x - visualOffsets.x,\n y: clippingAncestor.y - visualOffsets.y,\n width: clippingAncestor.width,\n height: clippingAncestor.height\n };\n }\n return rectToClientRect(rect);\n}\n\n// A \"clipping ancestor\" is an `overflow` element with the characteristic of\n// clipping (or hiding) child elements. This returns all clipping ancestors\n// of the given element up the tree.\nfunction getClippingElementAncestors(element, cache) {\n const cachedResult = cache.get(element);\n if (cachedResult) {\n return cachedResult;\n }\n let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');\n let lastKeptComputedStyle = null;\n const elementIsFixed = getComputedStyle$1(element).position === 'fixed';\n let currentNode = elementIsFixed ? getParentNode(element) : element;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {\n const computedStyle = getComputedStyle$1(currentNode);\n const currentNodeIsContaining = isContainingBlock(currentNode);\n // Position of the containing block chain below the current node. A fixed\n // element whose containing block hasn't been found yet is a fixed chain.\n const lastPosition = lastKeptComputedStyle ? lastKeptComputedStyle.position : elementIsFixed ? 'fixed' : '';\n\n // A non-containing ancestor does not clip the element when the chain\n // below it escapes it: a fixed chain escapes all ancestors up to the\n // next containing block, an absolute chain escapes static ancestors.\n const shouldDropCurrentNode = !currentNodeIsContaining && (lastPosition === 'fixed' || lastPosition === 'absolute' && computedStyle.position === 'static');\n if (shouldDropCurrentNode) {\n // Drop non-containing blocks.\n result = result.filter(ancestor => ancestor !== currentNode);\n } else {\n // The kept node carries the chain position for the next iteration.\n lastKeptComputedStyle = computedStyle;\n }\n currentNode = getParentNode(currentNode);\n }\n cache.set(element, result);\n return result;\n}\n\n// Gets the maximum area that the element is visible in due to any number of\n// clipping ancestors.\nfunction getClippingRect(_ref) {\n let {\n element,\n boundary,\n rootBoundary,\n strategy\n } = _ref;\n const elementClippingAncestors = boundary === 'clippingAncestors' ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);\n const clippingAncestors = [...elementClippingAncestors, rootBoundary];\n const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy);\n let top = firstRect.top;\n let right = firstRect.right;\n let bottom = firstRect.bottom;\n let left = firstRect.left;\n for (let i = 1; i < clippingAncestors.length; i++) {\n const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i], strategy);\n top = max(rect.top, top);\n right = min(rect.right, right);\n bottom = min(rect.bottom, bottom);\n left = max(rect.left, left);\n }\n return {\n width: right - left,\n height: bottom - top,\n x: left,\n y: top\n };\n}\n\nfunction getDimensions(element) {\n const {\n width,\n height\n } = getCssDimensions(element);\n return {\n width,\n height\n };\n}\n\nfunction getRectRelativeToOffsetParent(element, offsetParent, strategy) {\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n const documentElement = getDocumentElement(offsetParent);\n const isFixed = strategy === 'fixed';\n const rect = getBoundingClientRect(element, true, isFixed, offsetParent);\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n const offsets = createCoords(0);\n if (isOffsetParentAnElement || !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isOffsetParentAnElement) {\n const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n }\n }\n\n // If the <body> scrollbar appears on the left (e.g. RTL systems). Use\n // Firefox with layout.scrollbar.side = 3 in about:config to test this.\n if (!isOffsetParentAnElement && documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);\n const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;\n const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;\n return {\n x,\n y,\n width: rect.width,\n height: rect.height\n };\n}\n\nfunction isStaticPositioned(element) {\n return getComputedStyle$1(element).position === 'static';\n}\n\nfunction getTrueOffsetParent(element, polyfill) {\n if (!isHTMLElement(element) || getComputedStyle$1(element).position === 'fixed') {\n return null;\n }\n if (polyfill) {\n return polyfill(element);\n }\n let rawOffsetParent = element.offsetParent;\n\n // Firefox returns the <html> element as the offsetParent if it's non-static,\n // while Chrome and Safari return the <body> element. The <body> element must\n // be used to perform the correct calculations even if the <html> element is\n // non-static.\n if (getDocumentElement(element) === rawOffsetParent) {\n rawOffsetParent = rawOffsetParent.ownerDocument.body;\n }\n return rawOffsetParent;\n}\n\n// Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\nfunction getOffsetParent(element, polyfill) {\n const win = getWindow(element);\n if (isTopLayer(element)) {\n return win;\n }\n if (!isHTMLElement(element)) {\n let svgOffsetParent = getParentNode(element);\n while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {\n if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {\n return svgOffsetParent;\n }\n svgOffsetParent = getParentNode(svgOffsetParent);\n }\n return win;\n }\n let offsetParent = getTrueOffsetParent(element, polyfill);\n while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {\n offsetParent = getTrueOffsetParent(offsetParent, polyfill);\n }\n if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {\n return win;\n }\n return offsetParent || getContainingBlock(element) || win;\n}\n\nconst getElementRects = async function (data) {\n const getOffsetParentFn = this.getOffsetParent || getOffsetParent;\n const getDimensionsFn = this.getDimensions;\n const floatingDimensions = await getDimensionsFn(data.floating);\n return {\n reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),\n floating: {\n x: 0,\n y: 0,\n width: floatingDimensions.width,\n height: floatingDimensions.height\n }\n };\n};\n\nfunction isRTL(element) {\n return getComputedStyle$1(element).direction === 'rtl';\n}\n\nconst platform = {\n convertOffsetParentRelativeRectToViewportRelativeRect,\n getDocumentElement,\n getClippingRect,\n getOffsetParent,\n getElementRects,\n getClientRects,\n getDimensions,\n getScale,\n isElement,\n isRTL\n};\n\nfunction rectsAreEqual(a, b) {\n return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;\n}\n\n// https://samthor.au/2021/observing-dom/\nfunction observeMove(element, onMove, ancestorResize) {\n let io = null;\n let timeoutId;\n const root = getDocumentElement(element);\n function cleanup() {\n var _io;\n clearTimeout(timeoutId);\n (_io = io) == null || _io.disconnect();\n io = null;\n }\n function refresh(skip, threshold) {\n if (skip === void 0) {\n skip = false;\n }\n if (threshold === void 0) {\n threshold = 1;\n }\n cleanup();\n const elementRectForRootMargin = element.getBoundingClientRect();\n const {\n left,\n top,\n width,\n height\n } = elementRectForRootMargin;\n if (!skip) {\n onMove();\n }\n if (!width || !height) {\n return;\n }\n const insetTop = floor(top);\n const insetRight = floor(root.clientWidth - (left + width));\n const insetBottom = floor(root.clientHeight - (top + height));\n const insetLeft = floor(left);\n const rootMargin = -insetTop + \"px \" + -insetRight + \"px \" + -insetBottom + \"px \" + -insetLeft + \"px\";\n const options = {\n rootMargin,\n threshold: max(0, min(1, threshold)) || 1\n };\n let isFirstUpdate = true;\n function handleObserve(entries) {\n const ratio = entries[0].intersectionRatio;\n\n // The entry is a snapshot, so the reference may have moved since the\n // intersection was computed (under performance constraints, or between\n // consecutive frames of a multi-frame layout shift). The reported ratio\n // and the observed area are stale in that case and cannot be trusted to\n // detect subsequent movement, so refresh regardless of the ratio.\n if (!rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {\n return refresh();\n }\n if (ratio !== threshold) {\n if (!isFirstUpdate) {\n return refresh();\n }\n if (!ratio) {\n // If the reference is clipped in place, the ratio is 0. Throttle\n // the refresh to prevent an infinite loop of updates.\n timeoutId = setTimeout(() => {\n refresh(false, 1e-7);\n }, 1000);\n } else {\n refresh(false, ratio);\n }\n }\n isFirstUpdate = false;\n }\n\n // Older browsers don't support a `document` as the root and will throw an\n // error.\n try {\n io = new IntersectionObserver(handleObserve, {\n ...options,\n // Handle <iframe>s\n root: root.ownerDocument\n });\n } catch (_e) {\n io = new IntersectionObserver(handleObserve, options);\n }\n io.observe(element);\n }\n const win = getWindow(element);\n // The window is a resize ancestor, so when `ancestorResize` is enabled its\n // listener already runs the update on resize. Here we only need to rebuild\n // the `IntersectionObserver` for the new root size, skipping a redundant\n // update. When `ancestorResize` is disabled, this becomes the sole update.\n const handleResize = () => refresh(ancestorResize);\n win.addEventListener('resize', handleResize);\n refresh(true);\n return () => {\n win.removeEventListener('resize', handleResize);\n cleanup();\n };\n}\n\n/**\n * Automatically updates the position of the floating element when necessary.\n * Should only be called when the floating element is mounted on the DOM or\n * visible on the screen.\n * @returns cleanup function that should be invoked when the floating element is\n * removed from the DOM or hidden from the screen.\n * @see https://floating-ui.com/docs/autoUpdate\n */\nfunction autoUpdate(reference, floating, update, options) {\n if (options === void 0) {\n options = {};\n }\n const {\n ancestorScroll = true,\n ancestorResize = true,\n elementResize = typeof ResizeObserver === 'function',\n layoutShift = typeof IntersectionObserver === 'function',\n animationFrame = false\n } = options;\n const referenceEl = unwrapElement(reference);\n const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...(floating ? getOverflowAncestors(floating) : [])] : [];\n ancestors.forEach(ancestor => {\n ancestorScroll && ancestor.addEventListener('scroll', update);\n ancestorResize && ancestor.addEventListener('resize', update);\n });\n const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update, ancestorResize) : null;\n let reobserveFrame = -1;\n let resizeObserver = null;\n if (elementResize) {\n resizeObserver = new ResizeObserver(_ref => {\n let [firstEntry] = _ref;\n if (firstEntry && firstEntry.target === referenceEl && resizeObserver && floating) {\n // Prevent update loops when using the `size` middleware.\n // https://github.com/floating-ui/floating-ui/issues/1740\n resizeObserver.unobserve(floating);\n cancelAnimationFrame(reobserveFrame);\n reobserveFrame = requestAnimationFrame(() => {\n var _resizeObserver;\n (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);\n });\n }\n update();\n });\n if (referenceEl && !animationFrame) {\n resizeObserver.observe(referenceEl);\n }\n if (floating) {\n resizeObserver.observe(floating);\n }\n }\n let frameId;\n let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;\n if (animationFrame) {\n frameLoop();\n }\n function frameLoop() {\n const nextRefRect = getBoundingClientRect(reference);\n if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) {\n update();\n }\n prevRefRect = nextRefRect;\n frameId = requestAnimationFrame(frameLoop);\n }\n update();\n return () => {\n var _resizeObserver2;\n ancestors.forEach(ancestor => {\n ancestorScroll && ancestor.removeEventListener('scroll', update);\n ancestorResize && ancestor.removeEventListener('resize', update);\n });\n cleanupIo == null || cleanupIo();\n (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();\n resizeObserver = null;\n if (animationFrame) {\n cancelAnimationFrame(frameId);\n }\n };\n}\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\nconst detectOverflow = detectOverflow$1;\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = offset$1;\n\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = autoPlacement$1;\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = shift$1;\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = flip$1;\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = size$1;\n\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = hide$1;\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = arrow$1;\n\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = inline$1;\n\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = limitShift$1;\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n */\nconst computePosition = (reference, floating, options) => {\n // This caches the expensive `getClippingElementAncestors` function so that\n // multiple lifecycle resets re-use the same result. It only lives for a\n // single call. If other functions become expensive, we can add them as well.\n const cache = new Map();\n const mergedOptions = options != null ? options : {};\n const platformWithCache = {\n ...platform,\n ...mergedOptions.platform,\n _c: cache\n };\n return computePosition$1(reference, floating, {\n ...mergedOptions,\n platform: platformWithCache\n });\n};\n\nexport { arrow, autoPlacement, autoUpdate, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, platform, shift, size };\n","import { computePosition } from \"@floating-ui/dom\";\nimport { simpleBox } from \"svelte-toolbelt\";\nimport { get, getDPR, roundByDPR } from \"./floating-utils.svelte.js\";\nexport function useFloating(options) {\n /** Options */\n const whileElementsMountedOption = options.whileElementsMounted;\n const openOption = $derived(get(options.open) ?? true);\n const middlewareOption = $derived(get(options.middleware));\n const transformOption = $derived(get(options.transform) ?? true);\n const placementOption = $derived(get(options.placement) ?? \"bottom\");\n const strategyOption = $derived(get(options.strategy) ?? \"absolute\");\n const sideOffsetOption = $derived(get(options.sideOffset) ?? 0);\n const alignOffsetOption = $derived(get(options.alignOffset) ?? 0);\n const reference = options.reference;\n /** State */\n let x = $state(0);\n let y = $state(0);\n const floating = simpleBox(null);\n // svelte-ignore state_referenced_locally\n let strategy = $state(strategyOption);\n // svelte-ignore state_referenced_locally\n let placement = $state(placementOption);\n let middlewareData = $state({});\n let isPositioned = $state(false);\n let hasWhileMountedPosition = false;\n let updateRequestId = 0;\n // `update` is handed to `whileElementsMounted` (floating-ui's `autoUpdate`),\n // whose observers can still fire after the effect owning the option\n // `$derived`s above is destroyed. Reading them then warns `derived_inert`.\n let destroyed = false;\n const floatingStyles = $derived.by(() => {\n // preserve last known position when floating ref is null (during transitions)\n const xVal = floating.current ? roundByDPR(floating.current, x) : x;\n const yVal = floating.current ? roundByDPR(floating.current, y) : y;\n if (transformOption) {\n return {\n position: strategy,\n left: \"0\",\n top: \"0\",\n transform: `translate(${xVal}px, ${yVal}px)`,\n ...(floating.current &&\n getDPR(floating.current) >= 1.5 && {\n willChange: \"transform\",\n }),\n };\n }\n return {\n position: strategy,\n left: `${xVal}px`,\n top: `${yVal}px`,\n };\n });\n /** Effects */\n let whileElementsMountedCleanup;\n function update() {\n if (destroyed)\n return;\n if (reference.current === null || floating.current === null)\n return;\n const referenceNode = reference.current;\n const floatingNode = floating.current;\n const requestId = ++updateRequestId;\n computePosition(referenceNode, floatingNode, {\n middleware: middlewareOption,\n placement: placementOption,\n strategy: strategyOption,\n }).then((position) => {\n // ignore stale async resolutions when newer updates were requested.\n if (requestId !== updateRequestId)\n return;\n // ignore stale resolutions after ref replacement.\n if (reference.current !== referenceNode || floating.current !== floatingNode)\n return;\n const referenceHidden = isReferenceHidden(referenceNode);\n if (referenceHidden) {\n // keep last good coordinates when the anchor disappears to avoid\n // a transient jump to viewport origin before close propagates.\n middlewareData = {\n ...middlewareData,\n hide: {\n // oxlint-disable-next-line no-explicit-any\n ...middlewareData.hide,\n referenceHidden: true,\n },\n };\n return;\n }\n // ignore bad coordinates that cause jumping during close transitions\n if (!openOption && x !== 0 && y !== 0) {\n // if we had a good position and now getting coordinates near\n // the expected offset bounds during close, ignore it\n const maxExpectedOffset = Math.max(Math.abs(sideOffsetOption), Math.abs(alignOffsetOption), 15);\n if (position.x <= maxExpectedOffset && position.y <= maxExpectedOffset)\n return;\n }\n x = position.x;\n y = position.y;\n strategy = position.strategy;\n placement = position.placement;\n middlewareData = position.middlewareData;\n isPositioned = true;\n });\n }\n function cleanup() {\n if (typeof whileElementsMountedCleanup === \"function\") {\n whileElementsMountedCleanup();\n whileElementsMountedCleanup = undefined;\n }\n updateRequestId++;\n }\n function attach() {\n cleanup();\n if (whileElementsMountedOption === undefined) {\n update();\n return;\n }\n if (!openOption)\n return;\n if (reference.current === null || floating.current === null)\n return;\n whileElementsMountedCleanup = whileElementsMountedOption(reference.current, floating.current, update);\n }\n function reset() {\n if (!openOption && floating.current === null) {\n isPositioned = false;\n }\n }\n function trackWhileMountedDeps() {\n return [\n middlewareOption,\n placementOption,\n strategyOption,\n sideOffsetOption,\n alignOffsetOption,\n openOption,\n ];\n }\n $effect(() => {\n if (whileElementsMountedOption !== undefined)\n return;\n if (!openOption)\n return;\n update();\n });\n $effect(attach);\n $effect(() => {\n if (whileElementsMountedOption === undefined)\n return;\n trackWhileMountedDeps();\n if (!openOption) {\n hasWhileMountedPosition = false;\n return;\n }\n if (!isPositioned) {\n hasWhileMountedPosition = false;\n return;\n }\n // skip the first post-position run, since autoUpdate already computed it\n if (!hasWhileMountedPosition) {\n hasWhileMountedPosition = true;\n return;\n }\n update();\n });\n $effect(reset);\n $effect(() => () => {\n destroyed = true;\n cleanup();\n });\n return {\n floating,\n reference,\n get strategy() {\n return strategy;\n },\n get placement() {\n return placement;\n },\n get middlewareData() {\n return middlewareData;\n },\n get isPositioned() {\n return isPositioned;\n },\n get floatingStyles() {\n return floatingStyles;\n },\n get update() {\n return update;\n },\n };\n}\nfunction isReferenceHidden(node) {\n if (!(node instanceof Element))\n return false;\n if (!node.isConnected)\n return true;\n if (node instanceof HTMLElement && node.hidden)\n return true;\n return node.getClientRects().length === 0;\n}\n","import { arrow, autoUpdate, flip, hide, limitShift, offset, shift, size, } from \"@floating-ui/dom\";\nimport { attachRef, cssToStyleObj, getWindow, styleToString, simpleBox, } from \"svelte-toolbelt\";\nimport { Context, ElementSize, watch } from \"runed\";\nimport { FloatingRootContext, FloatingTooltipRootContext, } from \"./floating-root.svelte.js\";\nimport { isNotNull } from \"../../../internal/is.js\";\nimport { useId } from \"../../../internal/use-id.js\";\nimport { useFloating } from \"../../../internal/floating-svelte/use-floating.svelte.js\";\nexport const SIDE_OPTIONS = [\"top\", \"right\", \"bottom\", \"left\"];\nexport const ALIGN_OPTIONS = [\"start\", \"center\", \"end\"];\nconst OPPOSITE_SIDE = {\n top: \"bottom\",\n right: \"left\",\n bottom: \"top\",\n left: \"right\",\n};\nconst FloatingContentContext = new Context(\"Floating.Content\");\nexport class FloatingContentState {\n static create(opts, tooltip = false) {\n return tooltip\n ? FloatingContentContext.set(new FloatingContentState(opts, FloatingTooltipRootContext.get()))\n : FloatingContentContext.set(new FloatingContentState(opts, FloatingRootContext.get()));\n }\n opts;\n root;\n // nodes\n contentRef = simpleBox(null);\n wrapperRef = simpleBox(null);\n arrowRef = simpleBox(null);\n contentAttachment = attachRef(this.contentRef);\n wrapperAttachment = attachRef(this.wrapperRef);\n arrowAttachment = attachRef(this.arrowRef);\n // ids\n arrowId = simpleBox(useId());\n #transformedStyle = $derived.by(() => {\n if (typeof this.opts.style === \"string\")\n return cssToStyleObj(this.opts.style);\n if (!this.opts.style)\n return {};\n });\n #updatePositionStrategy = undefined;\n #arrowSize = new ElementSize(() => this.arrowRef.current ?? undefined);\n #arrowWidth = $derived(this.#arrowSize?.width ?? 0);\n #arrowHeight = $derived(this.#arrowSize?.height ?? 0);\n #desiredPlacement = $derived.by(() => (this.opts.side?.current +\n (this.opts.align.current !== \"center\"\n ? `-${this.opts.align.current}`\n : \"\")));\n #boundary = $derived.by(() => Array.isArray(this.opts.collisionBoundary.current)\n ? this.opts.collisionBoundary.current\n : [this.opts.collisionBoundary.current]);\n hasExplicitBoundaries = $derived(this.#boundary.length > 0);\n detectOverflowOptions = $derived.by(() => ({\n padding: this.opts.collisionPadding.current,\n boundary: this.#boundary.filter(isNotNull),\n altBoundary: this.hasExplicitBoundaries,\n }));\n #availableWidth = $state(undefined);\n #availableHeight = $state(undefined);\n #anchorWidth = $state(undefined);\n #anchorHeight = $state(undefined);\n middleware = $derived.by(() => [\n offset({\n mainAxis: this.opts.sideOffset.current + this.#arrowHeight,\n alignmentAxis: this.opts.alignOffset.current,\n }),\n this.opts.avoidCollisions.current &&\n shift({\n mainAxis: true,\n crossAxis: false,\n limiter: this.opts.sticky.current === \"partial\" ? limitShift() : undefined,\n ...this.detectOverflowOptions,\n }),\n this.opts.avoidCollisions.current && flip({ ...this.detectOverflowOptions }),\n size({\n ...this.detectOverflowOptions,\n apply: ({ rects, availableWidth, availableHeight }) => {\n const { width: anchorWidth, height: anchorHeight } = rects.reference;\n this.#availableWidth = availableWidth;\n this.#availableHeight = availableHeight;\n this.#anchorWidth = anchorWidth;\n this.#anchorHeight = anchorHeight;\n },\n }),\n this.arrowRef.current &&\n arrow({\n element: this.arrowRef.current,\n padding: this.opts.arrowPadding.current,\n }),\n transformOrigin({ arrowWidth: this.#arrowWidth, arrowHeight: this.#arrowHeight }),\n this.opts.hideWhenDetached.current &&\n hide({ strategy: \"referenceHidden\", ...this.detectOverflowOptions }),\n ].filter(Boolean));\n floating;\n placedSide = $derived.by(() => getSideFromPlacement(this.floating.placement));\n placedAlign = $derived.by(() => getAlignFromPlacement(this.floating.placement));\n arrowX = $derived.by(() => this.floating.middlewareData.arrow?.x ?? 0);\n arrowY = $derived.by(() => this.floating.middlewareData.arrow?.y ?? 0);\n cannotCenterArrow = $derived.by(() => this.floating.middlewareData.arrow?.centerOffset !== 0);\n contentZIndex = $state(\"auto\");\n arrowBaseSide = $derived(OPPOSITE_SIDE[this.placedSide]);\n wrapperProps = $derived.by(() => ({\n id: this.opts.wrapperId.current,\n \"data-bits-floating-content-wrapper\": \"\",\n style: {\n ...this.floating.floatingStyles,\n // keep off page when measuring\n transform: this.floating.isPositioned\n ? this.floating.floatingStyles.transform\n : \"translate(0, -200%)\",\n minWidth: \"max-content\",\n zIndex: this.contentZIndex,\n \"--bits-floating-transform-origin\": `${this.floating.middlewareData.transformOrigin?.x} ${this.floating.middlewareData.transformOrigin?.y}`,\n \"--bits-floating-available-width\": `${this.#availableWidth}px`,\n \"--bits-floating-available-height\": `${this.#availableHeight}px`,\n \"--bits-floating-anchor-width\": `${this.#anchorWidth}px`,\n \"--bits-floating-anchor-height\": `${this.#anchorHeight}px`,\n // hide the content if using the hide middleware and should be hidden\n ...(this.floating.middlewareData.hide?.referenceHidden && {\n visibility: \"hidden\",\n \"pointer-events\": \"none\",\n }),\n ...this.#transformedStyle,\n },\n // Floating UI calculates logical alignment based the `dir` attribute\n dir: this.opts.dir.current,\n ...this.wrapperAttachment,\n }));\n props = $derived.by(() => ({\n \"data-side\": this.placedSide,\n \"data-align\": this.placedAlign,\n style: styleToString({\n ...this.#transformedStyle,\n }),\n ...this.contentAttachment,\n }));\n arrowStyle = $derived({\n position: \"absolute\",\n left: this.arrowX ? `${this.arrowX}px` : undefined,\n top: this.arrowY ? `${this.arrowY}px` : undefined,\n [this.arrowBaseSide]: 0,\n \"transform-origin\": {\n top: \"\",\n right: \"0 0\",\n bottom: \"center 0\",\n left: \"100% 0\",\n }[this.placedSide],\n transform: {\n top: \"translateY(100%)\",\n right: \"translateY(50%) rotate(90deg) translateX(-50%)\",\n bottom: \"rotate(180deg)\",\n left: \"translateY(50%) rotate(-90deg) translateX(50%)\",\n }[this.placedSide],\n visibility: this.cannotCenterArrow ? \"hidden\" : undefined,\n });\n constructor(opts, root) {\n this.opts = opts;\n this.root = root;\n this.#updatePositionStrategy = opts.updatePositionStrategy;\n if (opts.customAnchor) {\n this.root.customAnchorNode.current = opts.customAnchor.current;\n }\n watch(() => opts.customAnchor.current, (customAnchor) => {\n this.root.customAnchorNode.current = customAnchor;\n });\n this.floating = useFloating({\n strategy: () => this.opts.strategy.current,\n placement: () => this.#desiredPlacement,\n middleware: () => this.middleware,\n reference: this.root.anchorNode,\n whileElementsMounted: (...args) => {\n const cleanup = autoUpdate(...args, {\n animationFrame: this.#updatePositionStrategy?.current === \"always\",\n });\n return cleanup;\n },\n open: () => this.opts.enabled.current,\n sideOffset: () => this.opts.sideOffset.current,\n alignOffset: () => this.opts.alignOffset.current,\n });\n $effect(() => {\n if (!this.floating.isPositioned)\n return;\n this.opts.onPlaced?.current();\n });\n watch([() => this.contentRef.current, () => this.opts.enabled.current], ([contentNode, enabled]) => {\n if (!contentNode || !enabled)\n return;\n const win = getWindow(contentNode);\n const rafId = win.requestAnimationFrame(() => {\n // avoid applying stale values when refs change quickly\n if (this.contentRef.current !== contentNode || !this.opts.enabled.current)\n return;\n const zIndex = win.getComputedStyle(contentNode).zIndex;\n if (zIndex !== this.contentZIndex) {\n this.contentZIndex = zIndex;\n }\n });\n return () => {\n win.cancelAnimationFrame(rafId);\n };\n });\n $effect(() => {\n this.floating.floating.current = this.wrapperRef.current;\n });\n }\n}\nexport class FloatingArrowState {\n static create(opts) {\n return new FloatingArrowState(opts, FloatingContentContext.get());\n }\n opts;\n content;\n constructor(opts, content) {\n this.opts = opts;\n this.content = content;\n }\n props = $derived.by(() => ({\n id: this.opts.id.current,\n style: this.content.arrowStyle,\n \"data-side\": this.content.placedSide,\n ...this.content.arrowAttachment,\n }));\n}\n//\n// HELPERS\n//\nfunction transformOrigin(options) {\n return {\n name: \"transformOrigin\",\n options,\n fn(data) {\n const { placement, rects, middlewareData } = data;\n const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;\n const isArrowHidden = cannotCenterArrow;\n const arrowWidth = isArrowHidden ? 0 : options.arrowWidth;\n const arrowHeight = isArrowHidden ? 0 : options.arrowHeight;\n const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);\n const noArrowAlign = { start: \"0%\", center: \"50%\", end: \"100%\" }[placedAlign];\n const arrowXCenter = (middlewareData.arrow?.x ?? 0) + arrowWidth / 2;\n const arrowYCenter = (middlewareData.arrow?.y ?? 0) + arrowHeight / 2;\n let x = \"\";\n let y = \"\";\n if (placedSide === \"bottom\") {\n x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;\n y = `${-arrowHeight}px`;\n }\n else if (placedSide === \"top\") {\n x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;\n y = `${rects.floating.height + arrowHeight}px`;\n }\n else if (placedSide === \"right\") {\n x = `${-arrowHeight}px`;\n y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;\n }\n else if (placedSide === \"left\") {\n x = `${rects.floating.width + arrowHeight}px`;\n y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;\n }\n return { data: { x, y } };\n },\n };\n}\nfunction getSideAndAlignFromPlacement(placement) {\n const [side, align = \"center\"] = placement.split(\"-\");\n return [side, align];\n}\nexport function getSideFromPlacement(placement) {\n return getSideAndAlignFromPlacement(placement)[0];\n}\nexport function getAlignFromPlacement(placement) {\n return getSideAndAlignFromPlacement(placement)[1];\n}\n","<script lang=\"ts\">\n\timport { boxWith, mergeProps } from \"svelte-toolbelt\";\n\timport { untrack } from \"svelte\";\n\timport { FloatingContentState } from \"../use-floating-layer.svelte.js\";\n\timport type { ContentImplProps } from \"./index.js\";\n\timport { useId } from \"../../../../internal/use-id.js\";\n\n\tlet {\n\t\tcontent,\n\t\tside = \"bottom\",\n\t\tsideOffset = 0,\n\t\talign = \"center\",\n\t\talignOffset = 0,\n\t\tid,\n\t\tarrowPadding = 0,\n\t\tavoidCollisions = true,\n\t\tcollisionBoundary = [],\n\t\tcollisionPadding = 0,\n\t\thideWhenDetached = false,\n\t\tonPlaced = () => {},\n\t\tsticky = \"partial\",\n\t\tupdatePositionStrategy = \"optimized\",\n\t\tstrategy = \"fixed\",\n\t\tdir = \"ltr\",\n\t\tstyle = {},\n\t\twrapperId = useId(),\n\t\tcustomAnchor = null,\n\t\tenabled,\n\t\ttooltip = false,\n\t}: ContentImplProps = $props();\n\n\tconst contentState = FloatingContentState.create(\n\t\t{\n\t\t\tside: boxWith(() => side),\n\t\t\tsideOffset: boxWith(() => sideOffset),\n\t\t\talign: boxWith(() => align),\n\t\t\talignOffset: boxWith(() => alignOffset),\n\t\t\tid: boxWith(() => id),\n\t\t\tarrowPadding: boxWith(() => arrowPadding),\n\t\t\tavoidCollisions: boxWith(() => avoidCollisions),\n\t\t\tcollisionBoundary: boxWith(() => collisionBoundary),\n\t\t\tcollisionPadding: boxWith(() => collisionPadding),\n\t\t\thideWhenDetached: boxWith(() => hideWhenDetached),\n\t\t\tonPlaced: boxWith(() => onPlaced),\n\t\t\tsticky: boxWith(() => sticky),\n\t\t\tupdatePositionStrategy: boxWith(() => updatePositionStrategy),\n\t\t\tstrategy: boxWith(() => strategy),\n\t\t\tdir: boxWith(() => dir),\n\t\t\tstyle: boxWith(() => style),\n\t\t\tenabled: boxWith(() => enabled),\n\t\t\twrapperId: boxWith(() => wrapperId),\n\t\t\tcustomAnchor: boxWith(() => customAnchor),\n\t\t},\n\t\tuntrack(() => tooltip)\n\t);\n\n\tconst mergedProps = $derived(\n\t\tmergeProps(contentState.wrapperProps, {\n\t\t\tstyle: {\n\t\t\t\tpointerEvents: \"auto\",\n\t\t\t},\n\t\t})\n\t);\n</script>\n\n{@render content?.({ props: contentState.props, wrapperProps: mergedProps })}\n","<script lang=\"ts\">\n\timport { type Snippet, onMount } from \"svelte\";\n\n\tlet {\n\t\tcontent,\n\t\tonPlaced,\n\t}: {\n\t\tcontent?: Snippet<\n\t\t\t[{ props: Record<string, unknown>; wrapperProps: Record<string, unknown> }]\n\t\t>;\n\t\tonPlaced?: () => void;\n\t} = $props();\n\n\tonMount(() => {\n\t\tonPlaced?.();\n\t});\n</script>\n\n{@render content?.({ props: {}, wrapperProps: {} })}\n","<script lang=\"ts\">\n\timport FloatingLayerContentStatic from \"../floating-layer/components/floating-layer-content-static.svelte\";\n\timport FloatingLayerContent from \"../floating-layer/components/floating-layer-content.svelte\";\n\timport type { FloatingLayerContentImplProps } from \"../floating-layer/types.js\";\n\n\tlet {\n\t\tcontent,\n\t\tisStatic = false,\n\t\tonPlaced,\n\t\t...restProps\n\t}: FloatingLayerContentImplProps & { isStatic: boolean } = $props();\n</script>\n\n{#if isStatic}\n\t<FloatingLayerContentStatic {content} {onPlaced} />\n{:else}\n\t<FloatingLayerContent {content} {onPlaced} {...restProps} />\n{/if}\n","<script lang=\"ts\">\n\timport { mergeProps } from \"svelte-toolbelt\";\n\timport ScrollLock from \"../scroll-lock/scroll-lock.svelte\";\n\timport type { PopperLayerImplProps } from \"./types.js\";\n\timport PopperContent from \"./popper-content.svelte\";\n\timport EscapeLayer from \"../escape-layer/escape-layer.svelte\";\n\timport DismissibleLayer from \"../dismissible-layer/dismissible-layer.svelte\";\n\timport TextSelectionLayer from \"../text-selection-layer/text-selection-layer.svelte\";\n\timport FocusScope from \"../focus-scope/focus-scope.svelte\";\n\n\tlet {\n\t\tpopper,\n\t\tonEscapeKeydown,\n\t\tescapeKeydownBehavior,\n\t\tpreventOverflowTextSelection,\n\t\tid,\n\t\tonPointerDown,\n\t\tonPointerUp,\n\t\tside,\n\t\tsideOffset,\n\t\talign,\n\t\talignOffset,\n\t\tarrowPadding,\n\t\tavoidCollisions,\n\t\tcollisionBoundary,\n\t\tcollisionPadding,\n\t\tsticky,\n\t\thideWhenDetached,\n\t\tupdatePositionStrategy,\n\t\tstrategy,\n\t\tdir,\n\t\tpreventScroll,\n\t\twrapperId,\n\t\tstyle,\n\t\tonPlaced,\n\t\tonInteractOutside,\n\t\tonCloseAutoFocus,\n\t\tonOpenAutoFocus,\n\t\tonFocusOutside,\n\t\tinteractOutsideBehavior = \"close\",\n\t\tloop,\n\t\ttrapFocus = true,\n\t\tisValidEvent = () => false,\n\t\tcustomAnchor = null,\n\t\tisStatic = false,\n\t\tenabled,\n\t\tforceMount,\n\t\tref,\n\t\ttooltip = false,\n\t\tcontentPointerEvents = \"auto\",\n\t\t...restProps\n\t}: Omit<PopperLayerImplProps, \"open\" | \"children\" | \"shouldRender\"> & {\n\t\tenabled: boolean;\n\t\tcontentPointerEvents?: \"auto\" | \"none\";\n\t} = $props();\n\n\tconst resolvedPreventScroll = $derived(preventScroll ?? true);\n\tconst effectiveStrategy = $derived(strategy ?? (resolvedPreventScroll ? \"fixed\" : \"absolute\"));\n</script>\n\n<PopperContent\n\t{isStatic}\n\t{id}\n\t{side}\n\t{sideOffset}\n\t{align}\n\t{alignOffset}\n\t{arrowPadding}\n\t{avoidCollisions}\n\t{collisionBoundary}\n\t{collisionPadding}\n\t{sticky}\n\t{hideWhenDetached}\n\t{updatePositionStrategy}\n\tstrategy={effectiveStrategy}\n\t{dir}\n\t{wrapperId}\n\t{style}\n\t{onPlaced}\n\t{customAnchor}\n\t{enabled}\n\t{tooltip}\n>\n\t{#snippet content({ props: floatingProps, wrapperProps })}\n\t\t{#if forceMount && enabled}\n\t\t\t<ScrollLock preventScroll={resolvedPreventScroll} />\n\t\t{:else if !forceMount}\n\t\t\t<ScrollLock preventScroll={resolvedPreventScroll} />\n\t\t{/if}\n\t\t<FocusScope\n\t\t\t{onOpenAutoFocus}\n\t\t\t{onCloseAutoFocus}\n\t\t\t{loop}\n\t\t\t{enabled}\n\t\t\t{trapFocus}\n\t\t\t{forceMount}\n\t\t\t{ref}\n\t\t>\n\t\t\t{#snippet focusScope({ props: focusScopeProps })}\n\t\t\t\t<EscapeLayer {onEscapeKeydown} {escapeKeydownBehavior} {enabled} {ref}>\n\t\t\t\t\t<DismissibleLayer\n\t\t\t\t\t\t{id}\n\t\t\t\t\t\t{onInteractOutside}\n\t\t\t\t\t\t{onFocusOutside}\n\t\t\t\t\t\t{interactOutsideBehavior}\n\t\t\t\t\t\t{isValidEvent}\n\t\t\t\t\t\t{enabled}\n\t\t\t\t\t\t{ref}\n\t\t\t\t\t>\n\t\t\t\t\t\t{#snippet children({ props: dismissibleProps })}\n\t\t\t\t\t\t\t<TextSelectionLayer\n\t\t\t\t\t\t\t\t{id}\n\t\t\t\t\t\t\t\t{preventOverflowTextSelection}\n\t\t\t\t\t\t\t\t{onPointerDown}\n\t\t\t\t\t\t\t\t{onPointerUp}\n\t\t\t\t\t\t\t\t{enabled}\n\t\t\t\t\t\t\t\t{ref}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{@render popper?.({\n\t\t\t\t\t\t\t\t\tprops: mergeProps(\n\t\t\t\t\t\t\t\t\t\trestProps,\n\t\t\t\t\t\t\t\t\t\tfloatingProps,\n\t\t\t\t\t\t\t\t\t\tdismissibleProps,\n\t\t\t\t\t\t\t\t\t\tfocusScopeProps,\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tid,\n\t\t\t\t\t\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t\t\t\t\t\tpointerEvents: contentPointerEvents,\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\twrapperProps,\n\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t</TextSelectionLayer>\n\t\t\t\t\t\t{/snippet}\n\t\t\t\t\t</DismissibleLayer>\n\t\t\t\t</EscapeLayer>\n\t\t\t{/snippet}\n\t\t</FocusScope>\n\t{/snippet}\n</PopperContent>\n","<script lang=\"ts\">\n\timport type { PopperLayerImplProps } from \"./types.js\";\n\timport PopperLayerInner from \"./popper-layer-inner.svelte\";\n\n\tlet {\n\t\tpopper,\n\t\topen,\n\t\tonEscapeKeydown,\n\t\tescapeKeydownBehavior,\n\t\tpreventOverflowTextSelection,\n\t\tid,\n\t\tonPointerDown,\n\t\tonPointerUp,\n\t\tside,\n\t\tsideOffset,\n\t\talign,\n\t\talignOffset,\n\t\tarrowPadding,\n\t\tavoidCollisions,\n\t\tcollisionBoundary,\n\t\tcollisionPadding,\n\t\tsticky,\n\t\thideWhenDetached,\n\t\tupdatePositionStrategy,\n\t\tstrategy,\n\t\tdir,\n\t\tpreventScroll,\n\t\twrapperId,\n\t\tstyle,\n\t\tonPlaced,\n\t\tonInteractOutside,\n\t\tonCloseAutoFocus,\n\t\tonOpenAutoFocus,\n\t\tonFocusOutside,\n\t\tinteractOutsideBehavior = \"close\",\n\t\tloop,\n\t\ttrapFocus = true,\n\t\tisValidEvent = () => false,\n\t\tcustomAnchor = null,\n\t\tisStatic = false,\n\t\tref,\n\t\tshouldRender,\n\t\t...restProps\n\t}: PopperLayerImplProps = $props();\n</script>\n\n{#if shouldRender}\n\t<PopperLayerInner\n\t\t{popper}\n\t\t{onEscapeKeydown}\n\t\t{escapeKeydownBehavior}\n\t\t{preventOverflowTextSelection}\n\t\t{id}\n\t\t{onPointerDown}\n\t\t{onPointerUp}\n\t\t{side}\n\t\t{sideOffset}\n\t\t{align}\n\t\t{alignOffset}\n\t\t{arrowPadding}\n\t\t{avoidCollisions}\n\t\t{collisionBoundary}\n\t\t{collisionPadding}\n\t\t{sticky}\n\t\t{hideWhenDetached}\n\t\t{updatePositionStrategy}\n\t\t{strategy}\n\t\t{dir}\n\t\t{preventScroll}\n\t\t{wrapperId}\n\t\t{style}\n\t\t{onPlaced}\n\t\t{customAnchor}\n\t\t{isStatic}\n\t\tenabled={open}\n\t\t{onInteractOutside}\n\t\t{onCloseAutoFocus}\n\t\t{onOpenAutoFocus}\n\t\t{interactOutsideBehavior}\n\t\t{loop}\n\t\t{trapFocus}\n\t\t{isValidEvent}\n\t\t{onFocusOutside}\n\t\tforceMount={false}\n\t\t{ref}\n\t\t{...restProps}\n\t/>\n{/if}\n","<script lang=\"ts\">\n\timport type { PopperLayerImplProps } from \"./types.js\";\n\timport PopperLayerInner from \"./popper-layer-inner.svelte\";\n\n\tlet {\n\t\tpopper,\n\t\tonEscapeKeydown,\n\t\tescapeKeydownBehavior,\n\t\tpreventOverflowTextSelection,\n\t\tid,\n\t\tonPointerDown,\n\t\tonPointerUp,\n\t\tside,\n\t\tsideOffset,\n\t\talign,\n\t\talignOffset,\n\t\tarrowPadding,\n\t\tavoidCollisions,\n\t\tcollisionBoundary,\n\t\tcollisionPadding,\n\t\tsticky,\n\t\thideWhenDetached,\n\t\tupdatePositionStrategy,\n\t\tstrategy,\n\t\tdir,\n\t\tpreventScroll,\n\t\twrapperId,\n\t\tstyle,\n\t\tonPlaced,\n\t\tonInteractOutside,\n\t\tonCloseAutoFocus,\n\t\tonOpenAutoFocus,\n\t\tonFocusOutside,\n\t\tinteractOutsideBehavior = \"close\",\n\t\tloop,\n\t\ttrapFocus = true,\n\t\tisValidEvent = () => false,\n\t\tcustomAnchor = null,\n\t\tisStatic = false,\n\t\tenabled,\n\t\t...restProps\n\t}: Omit<PopperLayerImplProps, \"open\"> & {\n\t\tenabled: boolean;\n\t} = $props();\n</script>\n\n<PopperLayerInner\n\t{popper}\n\t{onEscapeKeydown}\n\t{escapeKeydownBehavior}\n\t{preventOverflowTextSelection}\n\t{id}\n\t{onPointerDown}\n\t{onPointerUp}\n\t{side}\n\t{sideOffset}\n\t{align}\n\t{alignOffset}\n\t{arrowPadding}\n\t{avoidCollisions}\n\t{collisionBoundary}\n\t{collisionPadding}\n\t{sticky}\n\t{hideWhenDetached}\n\t{updatePositionStrategy}\n\t{strategy}\n\t{dir}\n\t{preventScroll}\n\t{wrapperId}\n\t{style}\n\t{onPlaced}\n\t{customAnchor}\n\t{isStatic}\n\t{enabled}\n\t{onInteractOutside}\n\t{onCloseAutoFocus}\n\t{onOpenAutoFocus}\n\t{interactOutsideBehavior}\n\t{loop}\n\t{trapFocus}\n\t{isValidEvent}\n\t{onFocusOutside}\n\t{...restProps}\n\tforceMount={true}\n/>\n","import { getDocument } from \"svelte-toolbelt\";\nimport { on } from \"svelte/events\";\nimport { watch } from \"runed\";\nimport { isElement } from \"./is.js\";\nfunction isPointInPolygon(point, polygon) {\n const [x, y] = point;\n let isInside = false;\n const length = polygon.length;\n for (let i = 0, j = length - 1; i < length; j = i++) {\n const [xi, yi] = polygon[i] ?? [0, 0];\n const [xj, yj] = polygon[j] ?? [0, 0];\n const intersect = yi >= y !== yj >= y && x <= ((xj - xi) * (y - yi)) / (yj - yi) + xi;\n if (intersect) {\n isInside = !isInside;\n }\n }\n return isInside;\n}\nfunction isInsideRect(point, rect) {\n return (point[0] >= rect.left &&\n point[0] <= rect.right &&\n point[1] >= rect.top &&\n point[1] <= rect.bottom);\n}\nfunction getSide(triggerRect, contentRect) {\n // determine which side the content is on relative to trigger\n const triggerCenterX = triggerRect.left + triggerRect.width / 2;\n const triggerCenterY = triggerRect.top + triggerRect.height / 2;\n const contentCenterX = contentRect.left + contentRect.width / 2;\n const contentCenterY = contentRect.top + contentRect.height / 2;\n const deltaX = contentCenterX - triggerCenterX;\n const deltaY = contentCenterY - triggerCenterY;\n if (Math.abs(deltaX) > Math.abs(deltaY)) {\n return deltaX > 0 ? \"right\" : \"left\";\n }\n return deltaY > 0 ? \"bottom\" : \"top\";\n}\n/**\n * Creates a safe polygon area that allows users to move their cursor between\n * the trigger and floating content without closing it.\n */\nexport class SafePolygon {\n #opts;\n #buffer;\n #transitIntentTimeout;\n // tracks the cursor position when leaving trigger or content\n #exitPoint = null;\n // tracks what we're moving toward: \"content\" when leaving trigger, \"trigger\" when leaving content\n #exitTarget = null;\n #transitTargets = [];\n #trackedTriggerNode = null;\n #leaveFallbackRafId = null;\n #transitIntentTimeoutId = null;\n #cancelLeaveFallback() {\n if (this.#leaveFallbackRafId !== null) {\n cancelAnimationFrame(this.#leaveFallbackRafId);\n this.#leaveFallbackRafId = null;\n }\n }\n #scheduleLeaveFallback() {\n this.#cancelLeaveFallback();\n this.#leaveFallbackRafId = requestAnimationFrame(() => {\n this.#leaveFallbackRafId = null;\n if (!this.#exitPoint || !this.#exitTarget)\n return;\n this.#clearTracking();\n this.#opts.onPointerExit();\n });\n }\n #cancelTransitIntentTimeout() {\n if (this.#transitIntentTimeoutId !== null) {\n clearTimeout(this.#transitIntentTimeoutId);\n this.#transitIntentTimeoutId = null;\n }\n }\n #scheduleTransitIntentTimeout() {\n if (this.#transitIntentTimeout === null)\n return;\n this.#cancelTransitIntentTimeout();\n this.#transitIntentTimeoutId = window.setTimeout(() => {\n this.#transitIntentTimeoutId = null;\n if (!this.#exitPoint || !this.#exitTarget)\n return;\n this.#clearTracking();\n this.#opts.onPointerExit();\n }, this.#transitIntentTimeout);\n }\n constructor(opts) {\n this.#opts = opts;\n this.#buffer = opts.buffer ?? 1;\n const transitIntentTimeout = opts.transitIntentTimeout;\n this.#transitIntentTimeout =\n typeof transitIntentTimeout === \"number\" && transitIntentTimeout > 0\n ? transitIntentTimeout\n : null;\n watch([opts.triggerNode, opts.contentNode, opts.enabled], ([triggerNode, contentNode, enabled]) => {\n if (!triggerNode || !contentNode || !enabled) {\n this.#trackedTriggerNode = null;\n this.#clearTracking();\n return;\n }\n if (this.#trackedTriggerNode && this.#trackedTriggerNode !== triggerNode) {\n this.#clearTracking();\n }\n this.#trackedTriggerNode = triggerNode;\n const doc = getDocument(triggerNode);\n const handlePointerMove = (e) => {\n this.#onPointerMove([e.clientX, e.clientY], triggerNode, contentNode);\n };\n const handleTriggerLeave = (e) => {\n // when leaving trigger toward content, record exit point\n const target = e.relatedTarget;\n // if going directly to content, no need for polygon tracking\n if (isElement(target) && contentNode.contains(target)) {\n return;\n }\n // if moving to an ignored target (e.g. a sibling trigger), don't close —\n // the sibling's enter handler will take over\n const ignoredTargets = this.#opts.ignoredTargets?.() ?? [];\n if (isElement(target) &&\n ignoredTargets.some((n) => n === target || n.contains(target))) {\n return;\n }\n this.#transitTargets =\n isElement(target) && ignoredTargets.length > 0\n ? ignoredTargets.filter((n) => target.contains(n))\n : [];\n // for unrelated elements, defer close decisions to pointer geometry checks.\n // this allows the cursor to pass through intermediate elements on the way\n // to content without immediately closing.\n this.#exitPoint = [e.clientX, e.clientY];\n this.#exitTarget = \"content\";\n this.#scheduleLeaveFallback();\n };\n const handleTriggerEnter = () => {\n // reached trigger, clear tracking\n this.#clearTracking();\n };\n const handleContentEnter = () => {\n // reached content, clear tracking\n this.#clearTracking();\n };\n const handleContentLeave = (e) => {\n // when leaving content, check if going directly back to trigger\n const target = e.relatedTarget;\n if (isElement(target) && triggerNode.contains(target)) {\n // going directly to trigger, no polygon tracking needed\n return;\n }\n // set up polygon tracking toward trigger — pointermove decides whether to close\n this.#exitPoint = [e.clientX, e.clientY];\n this.#exitTarget = \"trigger\";\n this.#scheduleLeaveFallback();\n };\n return [\n on(doc, \"pointermove\", handlePointerMove),\n on(triggerNode, \"pointerleave\", handleTriggerLeave),\n on(triggerNode, \"pointerenter\", handleTriggerEnter),\n on(contentNode, \"pointerenter\", handleContentEnter),\n on(contentNode, \"pointerleave\", handleContentLeave),\n ].reduce((acc, cleanup) => () => {\n acc();\n cleanup();\n }, () => { });\n });\n }\n #onPointerMove(clientPoint, triggerNode, contentNode) {\n // if no exit point recorded, nothing to check\n if (!this.#exitPoint || !this.#exitTarget)\n return;\n this.#cancelLeaveFallback();\n this.#scheduleTransitIntentTimeout();\n const triggerRect = triggerNode.getBoundingClientRect();\n const contentRect = contentNode.getBoundingClientRect();\n // check if pointer reached the target\n if (this.#exitTarget === \"content\" && isInsideRect(clientPoint, contentRect)) {\n this.#clearTracking();\n return;\n }\n if (this.#exitTarget === \"trigger\" && isInsideRect(clientPoint, triggerRect)) {\n this.#clearTracking();\n return;\n }\n if (this.#exitTarget === \"content\" && this.#transitTargets.length > 0) {\n for (const transitTarget of this.#transitTargets) {\n const transitRect = transitTarget.getBoundingClientRect();\n if (isInsideRect(clientPoint, transitRect))\n return;\n const transitSide = getSide(triggerRect, transitRect);\n const transitCorridor = this.#getCorridorPolygon(triggerRect, transitRect, transitSide);\n if (transitCorridor && isPointInPolygon(clientPoint, transitCorridor))\n return;\n }\n }\n // check if pointer is in the rectangular corridor between trigger and content\n const side = getSide(triggerRect, contentRect);\n const corridorPoly = this.#getCorridorPolygon(triggerRect, contentRect, side);\n if (corridorPoly && isPointInPolygon(clientPoint, corridorPoly)) {\n return;\n }\n // check if pointer is within the safe polygon from exit point to target\n const targetRect = this.#exitTarget === \"content\" ? contentRect : triggerRect;\n const safePoly = this.#getSafePolygon(this.#exitPoint, targetRect, side, this.#exitTarget);\n if (isPointInPolygon(clientPoint, safePoly)) {\n return;\n }\n // pointer is outside all safe zones - close\n this.#clearTracking();\n this.#opts.onPointerExit();\n }\n #clearTracking() {\n this.#exitPoint = null;\n this.#exitTarget = null;\n this.#transitTargets = [];\n this.#cancelLeaveFallback();\n this.#cancelTransitIntentTimeout();\n }\n /**\n * Creates a rectangular corridor between trigger and content\n * This prevents closing when cursor is in the gap between them\n */\n #getCorridorPolygon(triggerRect, contentRect, side) {\n const buffer = this.#buffer;\n switch (side) {\n case \"top\":\n return [\n [Math.min(triggerRect.left, contentRect.left) - buffer, triggerRect.top],\n [Math.min(triggerRect.left, contentRect.left) - buffer, contentRect.bottom],\n [Math.max(triggerRect.right, contentRect.right) + buffer, contentRect.bottom],\n [Math.max(triggerRect.right, contentRect.right) + buffer, triggerRect.top],\n ];\n case \"bottom\":\n return [\n [Math.min(triggerRect.left, contentRect.left) - buffer, triggerRect.bottom],\n [Math.min(triggerRect.left, contentRect.left) - buffer, contentRect.top],\n [Math.max(triggerRect.right, contentRect.right) + buffer, contentRect.top],\n [Math.max(triggerRect.right, contentRect.right) + buffer, triggerRect.bottom],\n ];\n case \"left\":\n return [\n [triggerRect.left, Math.min(triggerRect.top, contentRect.top) - buffer],\n [contentRect.right, Math.min(triggerRect.top, contentRect.top) - buffer],\n [contentRect.right, Math.max(triggerRect.bottom, contentRect.bottom) + buffer],\n [triggerRect.left, Math.max(triggerRect.bottom, contentRect.bottom) + buffer],\n ];\n case \"right\":\n return [\n [triggerRect.right, Math.min(triggerRect.top, contentRect.top) - buffer],\n [contentRect.left, Math.min(triggerRect.top, contentRect.top) - buffer],\n [contentRect.left, Math.max(triggerRect.bottom, contentRect.bottom) + buffer],\n [triggerRect.right, Math.max(triggerRect.bottom, contentRect.bottom) + buffer],\n ];\n }\n }\n /**\n * Creates a triangular/trapezoidal safe zone from the exit point to the target\n */\n #getSafePolygon(exitPoint, targetRect, side, exitTarget) {\n const buffer = this.#buffer * 4;\n const [x, y] = exitPoint;\n // when going back to trigger, we need to flip the side\n const effectiveSide = exitTarget === \"trigger\" ? this.#flipSide(side) : side;\n // create polygon points from cursor to target edges\n switch (effectiveSide) {\n case \"top\":\n return [\n [x - buffer, y + buffer],\n [x + buffer, y + buffer],\n [targetRect.right + buffer, targetRect.bottom],\n [targetRect.right + buffer, targetRect.top],\n [targetRect.left - buffer, targetRect.top],\n [targetRect.left - buffer, targetRect.bottom],\n ];\n case \"bottom\":\n return [\n [x - buffer, y - buffer],\n [x + buffer, y - buffer],\n [targetRect.right + buffer, targetRect.top],\n [targetRect.right + buffer, targetRect.bottom],\n [targetRect.left - buffer, targetRect.bottom],\n [targetRect.left - buffer, targetRect.top],\n ];\n case \"left\":\n return [\n [x + buffer, y - buffer],\n [x + buffer, y + buffer],\n [targetRect.right, targetRect.bottom + buffer],\n [targetRect.left, targetRect.bottom + buffer],\n [targetRect.left, targetRect.top - buffer],\n [targetRect.right, targetRect.top - buffer],\n ];\n case \"right\":\n return [\n [x - buffer, y - buffer],\n [x - buffer, y + buffer],\n [targetRect.left, targetRect.bottom + buffer],\n [targetRect.right, targetRect.bottom + buffer],\n [targetRect.right, targetRect.top - buffer],\n [targetRect.left, targetRect.top - buffer],\n ];\n }\n }\n #flipSide(side) {\n switch (side) {\n case \"top\":\n return \"bottom\";\n case \"bottom\":\n return \"top\";\n case \"left\":\n return \"right\";\n case \"right\":\n return \"left\";\n }\n }\n}\n","import { attachRef, boxWith, DOMContext, } from \"svelte-toolbelt\";\nimport { Context, watch } from \"runed\";\nimport { kbd } from \"../../internal/kbd.js\";\nimport { createBitsAttrs, boolToStr, getDataOpenClosed, getDataTransitionAttrs, } from \"../../internal/attrs.js\";\nimport { isElement, isTouch } from \"../../internal/is.js\";\nimport { PresenceManager } from \"../../internal/presence-manager.svelte.js\";\nimport { SafePolygon } from \"../../internal/safe-polygon.svelte.js\";\nimport { isTabbable } from \"tabbable\";\nconst popoverAttrs = createBitsAttrs({\n component: \"popover\",\n parts: [\"root\", \"trigger\", \"content\", \"close\", \"overlay\"],\n});\nconst PopoverRootContext = new Context(\"Popover.Root\");\nexport class PopoverRootState {\n static create(opts) {\n return PopoverRootContext.set(new PopoverRootState(opts));\n }\n opts;\n contentNode = $state(null);\n contentPresence;\n triggerNode = $state(null);\n overlayNode = $state(null);\n overlayPresence;\n // hover tracking state\n openedViaHover = $state(false);\n hasInteractedWithContent = $state(false);\n hoverCooldown = $state(false);\n closeDelay = $state(0);\n #closeTimeout = null;\n #domContext = null;\n constructor(opts) {\n this.opts = opts;\n this.contentPresence = new PresenceManager({\n ref: boxWith(() => this.contentNode),\n open: this.opts.open,\n onComplete: () => {\n this.opts.onOpenChangeComplete.current(this.opts.open.current);\n },\n });\n this.overlayPresence = new PresenceManager({\n ref: boxWith(() => this.overlayNode),\n open: this.opts.open,\n });\n watch(() => this.opts.open.current, (isOpen) => {\n if (!isOpen) {\n this.openedViaHover = false;\n this.hasInteractedWithContent = false;\n this.#clearCloseTimeout();\n }\n });\n }\n setDomContext(ctx) {\n this.#domContext = ctx;\n }\n #clearCloseTimeout() {\n if (this.#closeTimeout !== null && this.#domContext) {\n this.#domContext.clearTimeout(this.#closeTimeout);\n this.#closeTimeout = null;\n }\n }\n toggleOpen() {\n this.#clearCloseTimeout();\n this.opts.open.current = !this.opts.open.current;\n }\n handleClose() {\n this.#clearCloseTimeout();\n if (!this.opts.open.current)\n return;\n this.opts.open.current = false;\n }\n handleHoverOpen() {\n this.#clearCloseTimeout();\n if (this.opts.open.current)\n return;\n this.openedViaHover = true;\n this.opts.open.current = true;\n }\n handleHoverClose() {\n if (!this.opts.open.current)\n return;\n // only close if opened via hover and user hasn't interacted with content\n if (this.openedViaHover && !this.hasInteractedWithContent) {\n this.opts.open.current = false;\n }\n }\n handleDelayedHoverClose() {\n if (!this.opts.open.current)\n return;\n if (!this.openedViaHover || this.hasInteractedWithContent)\n return;\n this.#clearCloseTimeout();\n if (this.closeDelay <= 0) {\n this.opts.open.current = false;\n }\n else if (this.#domContext) {\n this.#closeTimeout = this.#domContext.setTimeout(() => {\n if (this.openedViaHover && !this.hasInteractedWithContent) {\n this.opts.open.current = false;\n }\n this.#closeTimeout = null;\n }, this.closeDelay);\n }\n }\n cancelDelayedClose() {\n this.#clearCloseTimeout();\n }\n markInteraction() {\n this.hasInteractedWithContent = true;\n this.#clearCloseTimeout();\n }\n}\nexport class PopoverTriggerState {\n static create(opts) {\n return new PopoverTriggerState(opts, PopoverRootContext.get());\n }\n opts;\n root;\n attachment;\n domContext;\n #openTimeout = null;\n #closeTimeout = null;\n #isHovering = $state(false);\n constructor(opts, root) {\n this.opts = opts;\n this.root = root;\n this.attachment = attachRef(this.opts.ref, (v) => (this.root.triggerNode = v));\n this.domContext = new DOMContext(opts.ref);\n this.root.setDomContext(this.domContext);\n this.onclick = this.onclick.bind(this);\n this.onkeydown = this.onkeydown.bind(this);\n this.onpointerenter = this.onpointerenter.bind(this);\n this.onpointerleave = this.onpointerleave.bind(this);\n watch(() => this.opts.closeDelay.current, (delay) => {\n this.root.closeDelay = delay;\n });\n }\n #clearOpenTimeout() {\n if (this.#openTimeout !== null) {\n this.domContext.clearTimeout(this.#openTimeout);\n this.#openTimeout = null;\n }\n }\n #clearCloseTimeout() {\n if (this.#closeTimeout !== null) {\n this.domContext.clearTimeout(this.#closeTimeout);\n this.#closeTimeout = null;\n }\n }\n #clearAllTimeouts() {\n this.#clearOpenTimeout();\n this.#clearCloseTimeout();\n }\n onpointerenter(e) {\n if (this.opts.disabled.current)\n return;\n if (!this.opts.openOnHover.current)\n return;\n if (isTouch(e))\n return;\n this.#isHovering = true;\n this.#clearCloseTimeout();\n this.root.cancelDelayedClose();\n if (this.root.opts.open.current || this.root.hoverCooldown)\n return;\n const delay = this.opts.openDelay.current;\n if (delay <= 0) {\n this.root.handleHoverOpen();\n }\n else {\n this.#openTimeout = this.domContext.setTimeout(() => {\n this.root.handleHoverOpen();\n this.#openTimeout = null;\n }, delay);\n }\n }\n onpointerleave(e) {\n if (this.opts.disabled.current)\n return;\n if (!this.opts.openOnHover.current)\n return;\n if (isTouch(e))\n return;\n this.#isHovering = false;\n this.#clearOpenTimeout();\n this.root.hoverCooldown = false;\n // let GraceArea handle the close - it will call handleHoverClose via onPointerExit\n // we just need to stop any pending open timer\n }\n onclick(e) {\n if (this.opts.disabled.current)\n return;\n if (e.button !== 0)\n return;\n this.#clearAllTimeouts();\n // if clicked while hovering and popover is open, convert to click-based open\n if (this.#isHovering && this.root.opts.open.current && this.root.openedViaHover) {\n this.root.openedViaHover = false;\n this.root.hasInteractedWithContent = true;\n return;\n }\n // if closing while hovering with openOnHover enabled, set cooldown to prevent\n // immediate re-open via hover\n if (this.#isHovering && this.opts.openOnHover.current && this.root.opts.open.current) {\n this.root.hoverCooldown = true;\n }\n // if clicking to open while in cooldown, reset cooldown (explicit open)\n if (this.root.hoverCooldown && !this.root.opts.open.current) {\n this.root.hoverCooldown = false;\n }\n this.root.toggleOpen();\n }\n onkeydown(e) {\n if (this.opts.disabled.current)\n return;\n if (!(e.key === kbd.ENTER || e.key === kbd.SPACE))\n return;\n e.preventDefault();\n this.#clearAllTimeouts();\n this.root.toggleOpen();\n }\n #getAriaControls() {\n if (this.root.opts.open.current && this.root.contentNode?.id) {\n return this.root.contentNode?.id;\n }\n }\n props = $derived.by(() => ({\n id: this.opts.id.current,\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": boolToStr(this.root.opts.open.current),\n \"data-state\": getDataOpenClosed(this.root.opts.open.current),\n \"aria-controls\": this.#getAriaControls(),\n [popoverAttrs.trigger]: \"\",\n disabled: this.opts.disabled.current,\n //\n onkeydown: this.onkeydown,\n onclick: this.onclick,\n onpointerenter: this.onpointerenter,\n onpointerleave: this.onpointerleave,\n ...this.attachment,\n }));\n}\nexport class PopoverContentState {\n static create(opts) {\n return new PopoverContentState(opts, PopoverRootContext.get());\n }\n opts;\n root;\n attachment;\n constructor(opts, root) {\n this.opts = opts;\n this.root = root;\n this.attachment = attachRef(this.opts.ref, (v) => (this.root.contentNode = v));\n this.onpointerdown = this.onpointerdown.bind(this);\n this.onfocusin = this.onfocusin.bind(this);\n this.onpointerenter = this.onpointerenter.bind(this);\n this.onpointerleave = this.onpointerleave.bind(this);\n new SafePolygon({\n triggerNode: () => this.root.triggerNode,\n contentNode: () => this.root.contentNode,\n enabled: () => this.root.opts.open.current &&\n this.root.openedViaHover &&\n !this.root.hasInteractedWithContent,\n onPointerExit: () => {\n this.root.handleDelayedHoverClose();\n },\n });\n }\n onpointerdown(_) {\n this.root.markInteraction();\n }\n onfocusin(e) {\n const target = e.target;\n if (isElement(target) && isTabbable(target)) {\n this.root.markInteraction();\n }\n }\n onpointerenter(e) {\n if (isTouch(e))\n return;\n this.root.cancelDelayedClose();\n }\n onpointerleave(e) {\n if (isTouch(e))\n return;\n // handled by grace area\n }\n onInteractOutside = (e) => {\n this.opts.onInteractOutside.current(e);\n if (e.defaultPrevented)\n return;\n if (!isElement(e.target))\n return;\n const closestTrigger = e.target.closest(popoverAttrs.selector(\"trigger\"));\n if (closestTrigger && closestTrigger === this.root.triggerNode)\n return;\n if (this.opts.customAnchor.current) {\n if (isElement(this.opts.customAnchor.current)) {\n if (this.opts.customAnchor.current.contains(e.target))\n return;\n }\n else if (typeof this.opts.customAnchor.current === \"string\") {\n const el = document.querySelector(this.opts.customAnchor.current);\n if (el && el.contains(e.target))\n return;\n }\n }\n this.root.handleClose();\n };\n onEscapeKeydown = (e) => {\n this.opts.onEscapeKeydown.current(e);\n if (e.defaultPrevented)\n return;\n this.root.handleClose();\n };\n get shouldRender() {\n return this.root.contentPresence.shouldRender;\n }\n get shouldTrapFocus() {\n if (this.root.openedViaHover && !this.root.hasInteractedWithContent)\n return false;\n return true;\n }\n snippetProps = $derived.by(() => ({ open: this.root.opts.open.current }));\n props = $derived.by(() => ({\n id: this.opts.id.current,\n tabindex: -1,\n \"data-state\": getDataOpenClosed(this.root.opts.open.current),\n ...getDataTransitionAttrs(this.root.contentPresence.transitionStatus),\n [popoverAttrs.content]: \"\",\n style: {\n pointerEvents: \"auto\",\n // CSS containment isolates style/layout/paint calculations from the rest of the page\n contain: \"layout style\",\n },\n onpointerdown: this.onpointerdown,\n onfocusin: this.onfocusin,\n onpointerenter: this.onpointerenter,\n onpointerleave: this.onpointerleave,\n ...this.attachment,\n }));\n popperProps = {\n onInteractOutside: this.onInteractOutside,\n onEscapeKeydown: this.onEscapeKeydown,\n };\n}\nexport class PopoverCloseState {\n static create(opts) {\n return new PopoverCloseState(opts, PopoverRootContext.get());\n }\n opts;\n root;\n attachment;\n constructor(opts, root) {\n this.opts = opts;\n this.root = root;\n this.attachment = attachRef(this.opts.ref);\n this.onclick = this.onclick.bind(this);\n this.onkeydown = this.onkeydown.bind(this);\n }\n onclick(_) {\n this.root.handleClose();\n }\n onkeydown(e) {\n if (!(e.key === kbd.ENTER || e.key === kbd.SPACE))\n return;\n e.preventDefault();\n this.root.handleClose();\n }\n props = $derived.by(() => ({\n id: this.opts.id.current,\n onclick: this.onclick,\n onkeydown: this.onkeydown,\n type: \"button\",\n [popoverAttrs.close]: \"\",\n ...this.attachment,\n }));\n}\nexport class PopoverOverlayState {\n static create(opts) {\n return new PopoverOverlayState(opts, PopoverRootContext.get());\n }\n opts;\n root;\n attachment;\n constructor(opts, root) {\n this.opts = opts;\n this.root = root;\n this.attachment = attachRef(this.opts.ref, (v) => (this.root.overlayNode = v));\n }\n get shouldRender() {\n return this.root.overlayPresence.shouldRender;\n }\n snippetProps = $derived.by(() => ({ open: this.root.opts.open.current }));\n props = $derived.by(() => ({\n id: this.opts.id.current,\n [popoverAttrs.overlay]: \"\",\n style: {\n pointerEvents: \"auto\",\n },\n \"data-state\": getDataOpenClosed(this.root.opts.open.current),\n ...getDataTransitionAttrs(this.root.overlayPresence.transitionStatus),\n ...this.attachment,\n }));\n}\n","<script lang=\"ts\">\n\timport { boxWith, mergeProps } from \"svelte-toolbelt\";\n\timport type { PopoverContentProps } from \"../types.js\";\n\timport { PopoverContentState } from \"../popover.svelte.js\";\n\timport PopperLayer from \"../../utilities/popper-layer/popper-layer.svelte\";\n\timport { noop } from \"../../../internal/noop.js\";\n\timport { createId } from \"../../../internal/create-id.js\";\n\timport { getFloatingContentCSSVars } from \"../../../internal/floating-svelte/floating-utils.svelte.js\";\n\timport PopperLayerForceMount from \"../../utilities/popper-layer/popper-layer-force-mount.svelte\";\n\n\tconst uid = $props.id();\n\n\tlet {\n\t\tchild,\n\t\tchildren,\n\t\tref = $bindable(null),\n\t\tid = createId(uid),\n\t\tforceMount = false,\n\t\tonOpenAutoFocus = noop,\n\t\tonCloseAutoFocus = noop,\n\t\tonEscapeKeydown = noop,\n\t\tonInteractOutside = noop,\n\t\ttrapFocus = true,\n\t\tpreventScroll = false,\n\t\tcustomAnchor = null,\n\t\tstyle,\n\t\t...restProps\n\t}: PopoverContentProps = $props();\n\n\tconst contentState = PopoverContentState.create({\n\t\tid: boxWith(() => id),\n\t\tref: boxWith(\n\t\t\t() => ref,\n\t\t\t(v) => (ref = v)\n\t\t),\n\t\tonInteractOutside: boxWith(() => onInteractOutside),\n\t\tonEscapeKeydown: boxWith(() => onEscapeKeydown),\n\t\tcustomAnchor: boxWith(() => customAnchor),\n\t});\n\n\tconst mergedProps = $derived(mergeProps(restProps, contentState.props));\n\n\t// respect user's trapFocus setting, but disable when hover-opened without interaction\n\tconst effectiveTrapFocus = $derived(trapFocus && contentState.shouldTrapFocus);\n\n\t// prevent auto-focus when opened via hover until user interacts\n\tfunction handleOpenAutoFocus(e: Event) {\n\t\tif (!contentState.shouldTrapFocus) {\n\t\t\te.preventDefault();\n\t\t}\n\t\tonOpenAutoFocus(e);\n\t}\n</script>\n\n{#if forceMount}\n\t<PopperLayerForceMount\n\t\t{...mergedProps}\n\t\t{...contentState.popperProps}\n\t\tref={contentState.opts.ref}\n\t\tenabled={contentState.root.opts.open.current}\n\t\t{id}\n\t\ttrapFocus={effectiveTrapFocus}\n\t\t{preventScroll}\n\t\tloop\n\t\tforceMount={true}\n\t\t{customAnchor}\n\t\tonOpenAutoFocus={handleOpenAutoFocus}\n\t\t{onCloseAutoFocus}\n\t\tshouldRender={contentState.shouldRender}\n\t>\n\t\t{#snippet popper({ props, wrapperProps })}\n\t\t\t{@const finalProps = mergeProps(\n\t\t\t\tprops,\n\t\t\t\t{ style: getFloatingContentCSSVars(\"popover\") },\n\t\t\t\t{ style }\n\t\t\t)}\n\t\t\t{#if child}\n\t\t\t\t{@render child({ props: finalProps, wrapperProps, ...contentState.snippetProps })}\n\t\t\t{:else}\n\t\t\t\t<div {...wrapperProps}>\n\t\t\t\t\t<div {...finalProps}>\n\t\t\t\t\t\t{@render children?.()}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t{/if}\n\t\t{/snippet}\n\t</PopperLayerForceMount>\n{:else if !forceMount}\n\t<PopperLayer\n\t\t{...mergedProps}\n\t\t{...contentState.popperProps}\n\t\tref={contentState.opts.ref}\n\t\topen={contentState.root.opts.open.current}\n\t\t{id}\n\t\ttrapFocus={effectiveTrapFocus}\n\t\t{preventScroll}\n\t\tloop\n\t\tforceMount={false}\n\t\t{customAnchor}\n\t\tonOpenAutoFocus={handleOpenAutoFocus}\n\t\t{onCloseAutoFocus}\n\t\tshouldRender={contentState.shouldRender}\n\t>\n\t\t{#snippet popper({ props, wrapperProps })}\n\t\t\t{@const finalProps = mergeProps(\n\t\t\t\tprops,\n\t\t\t\t{ style: getFloatingContentCSSVars(\"popover\") },\n\t\t\t\t{ style }\n\t\t\t)}\n\t\t\t{#if child}\n\t\t\t\t{@render child({ props: finalProps, wrapperProps, ...contentState.snippetProps })}\n\t\t\t{:else}\n\t\t\t\t<div {...wrapperProps}>\n\t\t\t\t\t<div {...finalProps}>\n\t\t\t\t\t\t{@render children?.()}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t{/if}\n\t\t{/snippet}\n\t</PopperLayer>\n{/if}\n","<script lang=\"ts\">\n\timport { boxWith } from \"svelte-toolbelt\";\n\timport type { PopoverRootProps } from \"../types.js\";\n\timport { PopoverRootState } from \"../popover.svelte.js\";\n\timport FloatingLayer from \"../../utilities/floating-layer/components/floating-layer.svelte\";\n\timport { noop } from \"../../../internal/noop.js\";\n\n\tlet {\n\t\topen = $bindable(false),\n\t\tonOpenChange = noop,\n\t\tonOpenChangeComplete = noop,\n\t\tchildren,\n\t}: PopoverRootProps = $props();\n\n\tPopoverRootState.create({\n\t\topen: boxWith(\n\t\t\t() => open,\n\t\t\t(v) => {\n\t\t\t\topen = v;\n\t\t\t\tonOpenChange(v);\n\t\t\t}\n\t\t),\n\t\tonOpenChangeComplete: boxWith(() => onOpenChangeComplete),\n\t});\n</script>\n\n<FloatingLayer>\n\t{@render children?.()}\n</FloatingLayer>\n","/**\n * What the Changes pane draws, worked out from what the changes API returns:\n * which files fold away as generated, the letter each file's status gets, and\n * a file's hunks as the rows of a unified diff, line numbers and all.\n */\n\nimport type { PatchHunk } from '$shared/transcript/parser.js';\nimport type { TurnChanges } from '$shared/transcript/changes.js';\nimport type { GitDiff } from '$shared/server/git.js';\n\n/** A hunk as the API sends it: its `@@` header and unified-diff lines. */\nexport type Hunk = PatchHunk;\n\nexport type Source = 'git' | 'session';\n\n/** One file in the list, from either source. */\nexport interface ChangedFile {\n\tfile: string;\n\tkind: 'added' | 'modified' | 'deleted' | 'renamed';\n\toldPath?: string;\n\tuntracked?: boolean;\n\tbinary?: boolean;\n\tadditions: number;\n\tdeletions: number;\n}\n\n/** A turn of the session source, its files read as the list reads any file. */\nexport type Turn = Omit<TurnChanges, 'files'> & { files: ChangedFile[] };\n\n/** What `/changes` answers: the files, and from the session source its turns too. */\nexport interface Listing {\n\tsource: Source;\n\troot?: string;\n\tfiles: ChangedFile[];\n\tturns?: Turn[];\n\t/** From the session source: the prompt that opens every turn, changed something or not. */\n\tprompts?: string[];\n\ttotals: { files: number; additions: number; deletions: number };\n}\n\n/** What the transcript needs to draw each turn's change summary. */\nexport interface TranscriptChanges {\n\tturns: Turn[];\n\tprompts: ReadonlySet<string>;\n\t/** Where the changed paths are shown relative to. */\n\troot: string | null;\n}\n\n/** What `/changes/diff` answers, from either source. */\nexport type Diff = GitDiff;\n\n/** Line totals over a list of files. */\nexport function sumCounts(files: readonly { additions: number; deletions: number }[]) {\n\tlet additions = 0;\n\tlet deletions = 0;\n\tfor (const f of files) {\n\t\tadditions += f.additions;\n\t\tdeletions += f.deletions;\n\t}\n\treturn { additions, deletions };\n}\n\n/**\n * Paths a person rarely reads in a diff: lockfiles, build output, minified\n * and generated code, snapshots. The list folds them under \"N generated\".\n */\nconst GENERATED: RegExp[] = [\n\t/(^|\\/)(package-lock\\.json|npm-shrinkwrap\\.json|yarn\\.lock|pnpm-lock\\.yaml|bun\\.lockb?|deno\\.lock)$/,\n\t/(^|\\/)(Cargo\\.lock|Gemfile\\.lock|composer\\.lock|poetry\\.lock|uv\\.lock|Pipfile\\.lock|go\\.sum|flake\\.lock|mix\\.lock|pubspec\\.lock|Podfile\\.lock)$/,\n\t/(^|\\/)(dist|build|out|coverage|node_modules|vendor|\\.svelte-kit|\\.next|\\.nuxt|__generated__)\\//,\n\t/\\.min\\.(js|css)$/,\n\t/\\.(map|snap)$/,\n\t/(^|\\/)__snapshots__\\//,\n\t/[._-]generated\\.[^/]+$/,\n\t/\\.(pb|gen)\\.[^/]+$/\n];\n\nexport function isGenerated(path: string): boolean {\n\treturn GENERATED.some((re) => re.test(path));\n}\n\n/** The letter a file's status shows as, the way `git status --short` writes it. */\nexport function statusLetter(f: ChangedFile): 'A' | 'M' | 'D' | 'R' | '?' {\n\tif (f.untracked) return '?';\n\treturn f.kind === 'added' ? 'A' : f.kind === 'deleted' ? 'D' : f.kind === 'renamed' ? 'R' : 'M';\n}\n\n/** A path as the list shows it: relative to `root` when it sits under it. */\nexport function displayPath(path: string, root: string | null): string {\n\tif (!root || !path.startsWith('/')) return path;\n\tconst base = root.endsWith('/') ? root : `${root}/`;\n\treturn path.startsWith(base) ? path.slice(base.length) : path;\n}\n\nexport type DiffRow =\n\t| { type: 'hunk'; header: string }\n\t| {\n\t\t\t/** Unchanged lines the diff leaves out. */\n\t\t\ttype: 'gap';\n\t\t\t/** How many, or null after the last hunk, where only the file itself knows. */\n\t\t\tcount: number | null;\n\t\t\t/** The line the gap starts at, on the new side and on the old. */\n\t\t\tfrom: number;\n\t\t\told: number;\n\t }\n\t| { type: 'context' | 'add' | 'del'; old: number | null; new: number | null; text: string };\n\nconst HUNK_HEADER = /^@@ -(\\d+)(?:,(\\d+))? \\+(\\d+)(?:,(\\d+))? @@/;\n\n/**\n * A file's hunks as the rows a unified diff draws: each hunk's header, its\n * lines with the old and new line numbers they sit at, and between hunks a\n * row counting the unchanged lines left out, which says where they sit so\n * they can be read from the file and shown. Lines before the first hunk are\n * counted too. After the last, the file's length is not known: with `tail` a\n * row with no count stands for whatever is left.\n */\nexport function diffRows(hunks: Hunk[], opts: { tail?: boolean } = {}): DiffRow[] {\n\tconst rows: DiffRow[] = [];\n\tlet nextOld = 1;\n\tlet nextNew = 1;\n\tlet readable = hunks.length > 0;\n\tfor (const hunk of hunks) {\n\t\tconst m = HUNK_HEADER.exec(hunk.header);\n\t\tlet oldLine: number | null = null;\n\t\tlet newLine: number | null = null;\n\t\tif (m) {\n\t\t\toldLine = Number(m[1]);\n\t\t\tnewLine = Number(m[3]);\n\t\t\t// A hunk that touches no lines on one side names the line it sits after.\n\t\t\tconst oldCount = Number(m[2] ?? 1);\n\t\t\tconst newCount = Number(m[4] ?? 1);\n\t\t\tconst start = oldCount === 0 ? oldLine + 1 : oldLine;\n\t\t\tif (start > nextOld) rows.push({ type: 'gap', count: start - nextOld, from: nextNew, old: nextOld });\n\t\t\tnextOld = start + oldCount;\n\t\t\tnextNew = (newCount === 0 ? newLine + 1 : newLine) + newCount;\n\t\t} else {\n\t\t\treadable = false;\n\t\t}\n\t\trows.push({ type: 'hunk', header: hunk.header });\n\t\tfor (const line of hunk.lines) {\n\t\t\tconst sign = line[0];\n\t\t\tconst text = line.slice(1);\n\t\t\tif (sign === '+') {\n\t\t\t\trows.push({ type: 'add', old: null, new: newLine, text });\n\t\t\t\tif (newLine !== null) newLine++;\n\t\t\t} else if (sign === '-') {\n\t\t\t\trows.push({ type: 'del', old: oldLine, new: null, text });\n\t\t\t\tif (oldLine !== null) oldLine++;\n\t\t\t} else if (sign === '\\\\') {\n\t\t\t\t// \"\\" says something about the line above.\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\trows.push({ type: 'context', old: oldLine, new: newLine, text });\n\t\t\t\tif (oldLine !== null) oldLine++;\n\t\t\t\tif (newLine !== null) newLine++;\n\t\t\t}\n\t\t}\n\t}\n\tif (opts.tail && readable) rows.push({ type: 'gap', count: null, from: nextNew, old: nextOld });\n\treturn rows;\n}\n\n/** The highlight.js language a path's extension names, or null to leave it plain. */\nexport function languageFor(path: string): string | null {\n\tconst name = path.split('/').pop() ?? '';\n\tif (/^Dockerfile/.test(name)) return 'dockerfile';\n\tif (name === 'Makefile') return 'makefile';\n\tconst ext = name.includes('.') ? name.split('.').pop()!.toLowerCase() : '';\n\treturn LANGUAGES[ext] ?? null;\n}\n\nconst LANGUAGES: Record<string, string> = {\n\tts: 'typescript',\n\ttsx: 'typescript',\n\tmts: 'typescript',\n\tcts: 'typescript',\n\tjs: 'javascript',\n\tjsx: 'javascript',\n\tmjs: 'javascript',\n\tcjs: 'javascript',\n\tsvelte: 'xml',\n\tvue: 'xml',\n\thtml: 'xml',\n\txml: 'xml',\n\tsvg: 'xml',\n\tcss: 'css',\n\tscss: 'scss',\n\tjson: 'json',\n\tjsonl: 'json',\n\tmd: 'markdown',\n\tpy: 'python',\n\tsh: 'bash',\n\tbash: 'bash',\n\tzsh: 'bash',\n\tyml: 'yaml',\n\tyaml: 'yaml',\n\ttoml: 'ini',\n\tini: 'ini',\n\trs: 'rust',\n\tgo: 'go',\n\tsql: 'sql',\n\tjava: 'java',\n\tkt: 'kotlin',\n\tc: 'c',\n\th: 'c',\n\tcpp: 'cpp',\n\thpp: 'cpp',\n\trb: 'ruby',\n\tphp: 'php',\n\tswift: 'swift',\n\tlua: 'lua'\n};\n\n/**\n * Where each turn's change summary goes in the transcript: after the last\n * item of the turn, keyed by that item's id. A turn runs from its prompt to\n * the next one, and only the ids in `prompts` count as prompts: the transcript\n * also draws user lines the log does not open a turn on (a steer that rode in\n * with a tool result, say), and those fall inside the turn around them. A turn\n * whose prompt is not among the items, scrolled out above the loaded tail,\n * gets no summary, and neither does the last turn while `open`, the session\n * still working on it.\n */\nexport function placeTurnChanges(\n\titems: readonly { id: string; kind: string }[],\n\tturns: readonly Turn[],\n\tprompts: ReadonlySet<string>,\n\topen: boolean\n): Map<string, Turn> {\n\tconst byPrompt = new Map<string, Turn>();\n\tfor (const t of turns) if (t.id) byPrompt.set(t.id, t);\n\tconst placed = new Map<string, Turn>();\n\tlet current: Turn | null = null;\n\tlet last: string | null = null;\n\tfor (const item of items) {\n\t\tif (item.kind === 'user' && prompts.has(item.id)) {\n\t\t\tif (current && last) placed.set(last, current);\n\t\t\tcurrent = byPrompt.get(item.id) ?? null;\n\t\t}\n\t\tlast = item.id;\n\t}\n\tif (current && last && !open) placed.set(last, current);\n\treturn placed;\n}\n","<script lang=\"ts\">\n\timport { Popover as PopoverPrimitive } from \"bits-ui\";\n\n\tlet { open = $bindable(false), ...restProps }: PopoverPrimitive.RootProps = $props();\n</script>\n\n<PopoverPrimitive.Root bind:open {...restProps} />\n","<script lang=\"ts\">\n\timport { Popover as PopoverPrimitive } from \"bits-ui\";\n\n\tlet { ...restProps }: PopoverPrimitive.PortalProps = $props();\n</script>\n\n<PopoverPrimitive.Portal {...restProps} />\n","<script lang=\"ts\">\n\timport { Popover as PopoverPrimitive } from \"bits-ui\";\n\timport PopoverPortal from \"./popover-portal.svelte\";\n\timport { cn, type WithoutChildrenOrChild } from \"$lib/utils.js\";\n\timport type { ComponentProps } from \"svelte\";\n\n\tlet {\n\t\tref = $bindable(null),\n\t\tclass: className,\n\t\tsideOffset = 4,\n\t\talign = \"center\",\n\t\tportalProps,\n\t\t...restProps\n\t}: PopoverPrimitive.ContentProps & {\n\t\tportalProps?: WithoutChildrenOrChild<ComponentProps<typeof PopoverPortal>>;\n\t} = $props();\n</script>\n\n<PopoverPortal {...portalProps}>\n\t<PopoverPrimitive.Content\n\t\tbind:ref\n\t\tdata-slot=\"popover-content\"\n\t\t{sideOffset}\n\t\t{align}\n\t\tclass={cn(\n\t\t\t\"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-end-2 data-[side=right]:slide-in-from-start-2 data-[side=top]:slide-in-from-bottom-2 z-(--z-floating) w-72 origin-(--bits-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden\",\n\t\t\tclassName\n\t\t)}\n\t\t{...restProps}\n\t/>\n</PopoverPortal>\n","<script lang=\"ts\">\n\timport { cn, type WithElementRef, type WithoutChildren } from \"$lib/utils.js\";\n\timport type { HTMLInputAttributes } from \"svelte/elements\";\n\n\tlet {\n\t\tref = $bindable(null),\n\t\tvalue = $bindable(),\n\t\tclass: className,\n\t\t\"data-slot\": dataSlot = \"input\",\n\t\t...restProps\n\t}: WithoutChildren<WithElementRef<HTMLInputAttributes>> = $props();\n</script>\n\n<input\n\tbind:this={ref}\n\tdata-slot={dataSlot}\n\tclass={cn(\n\t\t\"border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex h-10 w-full min-w-0 rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground disabled:cursor-not-allowed disabled:opacity-50 focus-visible:ring-[3px]\",\n\t\tclassName\n\t)}\n\tbind:value\n\t{...restProps}\n/>\n","/**\n * The Files pane's pure half: what the API answers, which Shiki grammar a\n * path reads as, quick-open's fuzzy match, and the file and line a\n * transcript tool row points at.\n */\nimport type { PatchHunk } from '$shared/transcript/parser.js';\nimport type { FileRead as ServerFileRead } from '$shared/server/files.js';\n\nexport type { FileEntry, DirListing } from '$shared/server/files.js';\n\n/** What the read route answers with 200; a binary file answers 415. */\nexport type FileRead = Exclude<ServerFileRead, { kind: 'binary' }>;\n\n/** The Shiki grammar for a path, or null to draw it plain. */\nexport function shikiLanguage(path: string): string | null {\n\tconst name = path.split('/').pop() ?? '';\n\tif (/^Dockerfile/.test(name)) return 'docker';\n\tif (name === 'Makefile') return 'make';\n\tif (name.startsWith('.') && !name.slice(1).includes('.')) return DOTFILES[name] ?? null;\n\tconst ext = name.includes('.') ? name.split('.').pop()!.toLowerCase() : '';\n\treturn LANGUAGES[ext] ?? null;\n}\n\nconst DOTFILES: Record<string, string> = {\n\t'.gitignore': 'shellscript',\n\t'.env': 'shellscript',\n\t'.bashrc': 'shellscript',\n\t'.zshrc': 'shellscript'\n};\n\nconst LANGUAGES: Record<string, string> = {\n\tts: 'typescript',\n\tmts: 'typescript',\n\tcts: 'typescript',\n\ttsx: 'tsx',\n\tjs: 'javascript',\n\tmjs: 'javascript',\n\tcjs: 'javascript',\n\tjsx: 'jsx',\n\tsvelte: 'svelte',\n\thtml: 'html',\n\txml: 'xml',\n\tsvg: 'xml',\n\tcss: 'css',\n\tscss: 'scss',\n\tjson: 'json',\n\tjsonl: 'json',\n\tjsonc: 'jsonc',\n\tmd: 'markdown',\n\tpy: 'python',\n\tsh: 'shellscript',\n\tbash: 'shellscript',\n\tzsh: 'shellscript',\n\tyml: 'yaml',\n\tyaml: 'yaml',\n\ttoml: 'toml',\n\trs: 'rust',\n\tgo: 'go',\n\tsql: 'sql',\n\tdiff: 'diff',\n\tpatch: 'diff'\n};\n\nexport function isMarkdown(path: string): boolean {\n\treturn /\\.(md|markdown)$/i.test(path);\n}\n\n/** The directories that hold `path`, outermost first: `a/b/c.ts` → `a`, `a/b`. */\n/** The last part of a path: the file's or folder's own name. */\nexport function baseName(path: string): string {\n\treturn path.split('/').pop() ?? path;\n}\n\n/** The folder a path sits in, '' for one at the root. */\nexport function parentOf(path: string): string {\n\treturn path.split('/').slice(0, -1).join('/');\n}\n\nexport function ancestors(path: string): string[] {\n\tconst parts = path.split('/').slice(0, -1);\n\treturn parts.map((_, i) => parts.slice(0, i + 1).join('/'));\n}\n\n/**\n * How well `query` matches `path`: null for no match, else higher is better.\n * Every query character must appear in order; runs of consecutive characters,\n * matches at a word start, and matches in the file name score more, and a\n * shorter path wins a tie. Each place the first character occurs is tried as\n * a start, so `cli` finds `cli.ts` rather than the `c` of `src`.\n */\nexport function fuzzyScore(query: string, path: string): number | null {\n\tconst q = query.toLowerCase().replace(/\\s+/g, '');\n\tif (!q) return 0;\n\tconst p = path.toLowerCase();\n\tlet best: number | null = null;\n\tfor (let start = p.indexOf(q[0]); start !== -1; start = p.indexOf(q[0], start + 1)) {\n\t\tconst score = scoreFrom(q, p, path, start);\n\t\tif (score === null) break;\n\t\tif (best === null || score > best) best = score;\n\t}\n\treturn best === null ? null : best - path.length * 0.01;\n}\n\n/** The score of matching `q` greedily in `p` with its first character at `start`. */\nfunction scoreFrom(q: string, p: string, path: string, start: number): number | null {\n\tconst nameStart = path.lastIndexOf('/') + 1;\n\tlet score = 0;\n\tlet at = start - 1;\n\tlet run = 0;\n\tfor (const ch of q) {\n\t\tconst next = p.indexOf(ch, at + 1);\n\t\tif (next === -1) return null;\n\t\trun = next === at + 1 ? run + 1 : 0;\n\t\tscore += 1 + run * 2;\n\t\tconst prev = path[next - 1];\n\t\tif (next === 0 || prev === '/' || prev === '-' || prev === '_' || prev === '.') score += 3;\n\t\tif (next >= nameStart) score += 2;\n\t\tat = next;\n\t}\n\treturn score;\n}\n\n/** The best `limit` paths for `query`, best first. */\nexport function fuzzyFilter(query: string, paths: readonly string[], limit = 50): string[] {\n\tconst scored: { path: string; score: number }[] = [];\n\tfor (const path of paths) {\n\t\tconst score = fuzzyScore(query, path);\n\t\tif (score !== null) scored.push({ path, score });\n\t}\n\treturn scored\n\t\t.sort((a, b) => b.score - a.score)\n\t\t.slice(0, limit)\n\t\t.map((s) => s.path);\n}\n\n/** The tools whose row can open the file it touched in the Files pane. */\nconst FILE_TOOLS = new Set(['Read', 'Edit', 'Write', 'MultiEdit', 'NotebookEdit']);\n\n/** The first changed line a hunk lands on in the new file. */\nfunction firstChangedLine(hunk: PatchHunk): number | null {\n\tconst m = /^@@ -\\d+(?:,\\d+)? \\+(\\d+)/.exec(hunk.header);\n\tif (!m) return null;\n\tlet line = Number(m[1]);\n\tfor (const l of hunk.lines) {\n\t\tif (l.startsWith('+')) return line;\n\t\tif (l.startsWith(' ')) line++;\n\t}\n\treturn Number(m[1]);\n}\n\n/**\n * The file a transcript tool row touched and the line to open it at: a Read's\n * offset, or the first line an edit changed. Null for any other tool.\n */\nexport function toolFileTarget(entry: {\n\tname: string;\n\tinput: string;\n\tpatch?: { file: string; hunks: PatchHunk[] };\n}): { path: string; line: number | null } | null {\n\tif (!FILE_TOOLS.has(entry.name)) return null;\n\tlet input: Record<string, unknown> = {};\n\ttry {\n\t\tinput = JSON.parse(entry.input);\n\t} catch {\n\t\t// cut off by the parser's limit: the path is near the front, try for it alone\n\t\tconst m = /\"(?:file_path|notebook_path)\":\\s*\"((?:[^\"\\\\]|\\\\.)*)\"/.exec(entry.input);\n\t\tif (m) input = { file_path: JSON.parse(`\"${m[1]}\"`) };\n\t}\n\tconst path =\n\t\tentry.patch?.file ||\n\t\t(typeof input.file_path === 'string' ? input.file_path : null) ||\n\t\t(typeof input.notebook_path === 'string' ? input.notebook_path : null);\n\tif (!path) return null;\n\tif (entry.name === 'Read') {\n\t\tconst offset = Number(input.offset);\n\t\treturn { path, line: Number.isInteger(offset) && offset > 0 ? offset : null };\n\t}\n\tconst hunk = entry.patch?.hunks[0];\n\treturn { path, line: hunk ? firstChangedLine(hunk) : null };\n}\n","/**\n * marked v18.1.2 - a markdown parser\n * Copyright (c) 2018-2026, MarkedJS. (MIT License)\n * Copyright (c) 2011-2018, Christopher Jeffrey. (MIT License)\n * https://github.com/markedjs/marked\n */\n\n/**\n * DO NOT EDIT THIS FILE\n * The code in this file is generated from files in ./src/\n */\n\nfunction v(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var y=v();function ee(a){y=a}var B={exec:()=>null};function I(a){let e=[];return t=>{let n=Math.max(0,Math.min(3,t-1)),s=e[n];return s||(s=a(n),e[n]=s),s}}function c(a,e=\"\"){let t=typeof a==\"string\"?a:a.source,n={replace:(s,r)=>{let o=typeof r==\"string\"?r:r.source;return o=o.replace(T.caret,\"$1\"),t=t.replace(s,o),n},getRegex:()=>new RegExp(t,e)};return n}var Me=((a=\"\")=>{try{return!!new RegExp(\"(?<=1)(?<!1)\"+a)}catch{return!1}})(),T={codeRemoveIndent:/^(?: {0,3}\\t| {1,4})/gm,outputLinkReplace:/\\\\([\\[\\]])/g,indentCodeCompensation:/^(\\s+)(?:```)/,beginningSpace:/^\\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \\t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\\n/g,tabCharGlobal:/\\t/g,leadingSpaceTab:/^[ \\t]+/,multipleSpaceGlobal:/\\s+/g,blankLine:/^[ \\t]*$/,doubleBlankLine:/\\n[ \\t]*\\n[ \\t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\\n {0,3}((?:=+|-+) *)(?=\\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \\t]?/gm,blockquoteMarkerWhitespace:/^( {0,3}>)([ \\t]+)/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\\[[ xX]\\] +\\S/,listReplaceTask:/^\\[[ xX]\\] +/,listTaskCheckbox:/\\[[ xX]\\]/,anyLine:/\\n.*\\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\\||\\| *$/g,tableRowBlankLine:/\\n[ \\t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\\s|>)/i,endPreScriptTag:/^<\\/(pre|code|kbd|script)(\\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'\"]*[^\\s])\\s+(['\"])(.*)\\2/,unicodeAlphaNumeric:/[\\p{L}\\p{N}]/u,numericCharacterReference:/&#(?:(\\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/,numericCharacterReferenceOrAmpersand:/&#(?:(\\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));|&(?!(#\\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\\w+);)/g,escapeTest:/[&<>\"']/,escapeReplace:/[&<>\"']/g,escapeTestNoEncode:/[<>\"']|&(?!(#\\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\\w+);)/,escapeReplaceNoEncode:/[<>\"']|&(?!(#\\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\\w+);)/g,caret:/(^|[^\\[])\\^/g,percentDecode:/%25/g,findPipe:/\\|/g,splitPipe:/ \\|/,slashPipe:/\\\\\\|/g,carriageReturn:/\\r\\n|\\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\\S*/,endingNewline:/\\n$/,listItemRegex:a=>new RegExp(`^( {0,3}${a})((?:[\t ][^\\\\n]*)?(?:\\\\n|$))`),nextBulletRegex:I(a=>new RegExp(`^ {0,${a}}(?:[*+-]|\\\\d{1,9}[.)])((?:[ \t][^\\\\n]*)?(?:\\\\n|$))`)),hrRegex:I(a=>new RegExp(`^ {0,${a}}((?:-[ \t]*){3,}|(?:_[ \t]*){3,}|(?:\\\\*[ \t]*){3,})(?:\\\\n+|$)`)),fencesBeginRegex:I(a=>new RegExp(`^ {0,${a}}(?:\\`\\`\\`|~~~)`)),headingBeginRegex:I(a=>new RegExp(`^ {0,${a}}#{1,6}(?:\\\\s|$)`)),pedanticHeadingBeginRegex:I(a=>new RegExp(`^ {0,${a}}#`)),htmlBeginRegex:I(a=>new RegExp(`^ {0,${a}}(?:</?(?:${K})(?: +|$|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\\\s>]|$)|!--)|<\\\\?|<![A-Za-z]|<!\\\\[CDATA\\\\[)`,\"i\")),blockquoteBeginRegex:I(a=>new RegExp(`^ {0,${a}}>`))},Ce=/^(?:[ \\t]*(?:\\n|$))+/,Ee=/^((?: {4}| {0,3}\\t)[^\\n]+(?:\\n(?:[ \\t]*(?:\\n|$))*)?)+/,Ie=/^ {0,3}(`{3,}(?=[^`\\n]*(?:\\n|$))|~{3,})([^\\n]*)(?:\\n|$)(?:|([\\s\\S]*?)(?:\\n|$))(?: {0,3}\\1[~`]* *(?=\\n|$)|$)/,U=/^ {0,3}((?:-[\\t ]*){3,}|(?:_[ \\t]*){3,}|(?:\\*[ \\t]*){3,})(?:\\n+|$)/,Be=/^ {0,3}(#{1,6})(?=\\s|$)(.*)(?:\\n+|$)/,ne=/ {0,3}(?:[*+-]|\\d{1,9}[.)])/,me=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\\n(?!\\s*?\\n|bull |fences|blockquote|heading|hr|html|table))+?)\\n {0,3}(=+|-+) *(?:\\n+|$)/,xe=c(me).replace(/bull/g,ne).replace(/blockCode/g,/(?: {4}| {0,3}\\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\\t ]*){3,}|(?:_[ \\t]*){3,}|(?:\\*[ \\t]*){3,})(?:\\n+|$)/).replace(/html/g,/ {0,3}<[^\\n>]+>\\n/).replace(/\\|table/g,\"\").getRegex(),De=c(me).replace(/bull/g,ne).replace(/blockCode/g,/(?: {4}| {0,3}\\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\\t ]*){3,}|(?:_[ \\t]*){3,}|(?:\\*[ \\t]*){3,})(?:\\n+|$)/).replace(/html/g,/ {0,3}<[^\\n>]+>\\n/).replace(/table/g,/ {0,3}\\|?(?:[:\\- ]*\\|)+[\\:\\- ]*\\n/).getRegex(),re=/^([^\\n]+(?:\\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \\t]+\\n)[^\\n]+)*)/,qe=/^[^\\n]+/,se=/(?!\\s*\\])(?:\\\\[\\s\\S]|[^\\[\\]\\\\])+/,Ze=c(/^ {0,3}\\[(label)\\]: *(?:\\n[ \\t]*)?([^<\\s][^\\s]*|<.*?>)(?:(?: +(?:\\n[ \\t]*)?| *\\n[ \\t]*)(title))? *(?:\\n+|$)/).replace(\"label\",se).replace(\"title\",/(?:\"(?:\\\\\"?|[^\"\\\\])*\"|'[^'\\n]*(?:\\n[^'\\n]+)*\\n?'|\\([^()]*\\))/).getRegex(),ve=c(/^(bull)([ \\t][^\\n]*?)?(?:\\n|$)/).replace(/bull/g,ne).getRegex(),K=\"address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul\",ie=/<!--(?:-?>|[\\s\\S]*?(?:-->|$))/,He=c(\"^ {0,3}(?:<(script|pre|style|textarea)[\\\\s>][\\\\s\\\\S]*?(?:</\\\\1>[^\\\\n]*\\\\n*|$)|comment[^\\\\n]*(\\\\n+|$)|<\\\\?[\\\\s\\\\S]*?(?:\\\\?>[^\\\\n]*\\\\n*|$)|<![A-Z][\\\\s\\\\S]*?(?:>[^\\\\n]*\\\\n*|$)|<!\\\\[CDATA\\\\[[\\\\s\\\\S]*?(?:\\\\]\\\\]>[^\\\\n]*\\\\n*|$)|</?(tag)(?:[ \\\\t]+|\\\\n|/?>|$)[\\\\s\\\\S]*?(?:(?:\\\\n[ \t]*)+\\\\n|$)|<(?!(?:script|pre|style|textarea)(?![a-z0-9-]))([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:(?:\\\\n[ \t]*)+\\\\n|$)|</[a-z][a-z0-9-]*\\\\s*>(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:(?:\\\\n[ \t]*)+\\\\n|$))\",\"i\").replace(\"comment\",ie).replace(\"tag\",K).replace(\"attribute\",/ +[a-zA-Z:_][\\w.:-]*(?: *= *\"[^\"\\n]*\"| *= *'[^'\\n]*'| *= *[^\\s\"'=<>`]+)?/).getRegex(),be=a=>c(re).replace(\"hr\",U).replace(\"heading\",\" {0,3}#{1,6}(?:\\\\s|$)\").replace(\"|lheading\",\"\").replace(\"|table\",\"\").replace(\"blockquote\",\" {0,3}>\").replace(\"fences\",\" {0,3}(?:`{3,}(?=[^`\\\\n]*(?:\\\\n|$))|~~~)[^\\\\n]*(?:\\\\n|$)\").replace(\"list\",a).replace(\"html\",\" {0,3}(?:</?(?:tag)(?: +|\\\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\\\s>]|$)|!--)|<\\\\?|<![A-Za-z]|<!\\\\[CDATA\\\\[)\").replace(\"tag\",K).getRegex(),Ge=be(/ {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]/),Ne=be(/ {0,3}(?:[*+-]|\\d{1,9}[.)])(?:[ \\t]|\\n|$)/),Qe=c(/^( {0,3}> ?(?:(?![ \\t]*(?:\\n|$))(paragraph)|[^\\n]*)(?:\\n|$))+/).replace(\"paragraph\",Ne).getRegex(),oe={blockquote:Qe,code:Ee,def:Ze,fences:Ie,heading:Be,hr:U,html:He,lheading:xe,list:ve,newline:Ce,paragraph:Ge,table:B,text:qe},ke=c(\"^ *([^\\\\n ].*)\\\\n {0,3}((?:\\\\| *)?:?-+:? *(?:\\\\| *:?-+:? *)*(?:\\\\| *)?)(?:\\\\n((?:(?! *\\\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\\\n|$))*)\\\\n*|$)\").replace(\"hr\",U).replace(\"heading\",\" {0,3}#{1,6}(?:\\\\s|$)\").replace(\"blockquote\",\" {0,3}>\").replace(\"code\",\"(?: {4}| {0,3}\t)[^\\\\n]\").replace(\"fences\",\" {0,3}(?:`{3,}(?=[^`\\\\n]*(?:\\\\n|$))|~~~)[^\\\\n]*(?:\\\\n|$)\").replace(\"list\",\" {0,3}(?:[*+-]|1[.)])[ \\\\t]\").replace(\"html\",\" {0,3}(?:</?(?:tag)(?: +|\\\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\\\s>]|$)|!--)|<\\\\?|<![A-Za-z]|<!\\\\[CDATA\\\\[)\").replace(\"tag\",K).getRegex(),je={...oe,lheading:De,table:ke,paragraph:c(re).replace(\"hr\",U).replace(\"heading\",\" {0,3}#{1,6}(?:\\\\s|$)\").replace(\"|lheading\",\"\").replace(\"table\",ke).replace(\"blockquote\",\" {0,3}>\").replace(\"fences\",\" {0,3}(?:`{3,}(?=[^`\\\\n]*(?:\\\\n|$))|~~~)[^\\\\n]*(?:\\\\n|$)\").replace(\"list\",\" {0,3}(?:[*+-]|1[.)])[ \\\\t]+[^ \\\\t\\\\n]\").replace(\"html\",\" {0,3}(?:</?(?:tag)(?: +|\\\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\\\s>]|$)|!--)|<\\\\?|<![A-Za-z]|<!\\\\[CDATA\\\\[)\").replace(\"tag\",K).getRegex()},Fe={...oe,html:c(`^ *(?:comment *(?:\\\\n|\\\\s*$)|<(tag)[\\\\s\\\\S]+?</\\\\1> *(?:\\\\n{2,}|\\\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\\\s[^'\"/>\\\\s]*)*?/?> *(?:\\\\n{2,}|\\\\s*$))`).replace(\"comment\",ie).replace(/tag/g,\"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\\\b)\\\\w+(?!:|[^\\\\w\\\\s@]*@)\\\\b\").getRegex(),def:/^ *\\[([^\\]]+)\\]: *<?([^\\s>]+)>?(?: +([\"(][^\\n]+[\")]))? *(?:\\n+|$)/,heading:/^(#{1,6})(.*)(?:\\n+|$)/,fences:B,lheading:/^(.+?)\\n {0,3}(=+|-+) *(?:\\n+|$)/,paragraph:c(re).replace(\"hr\",U).replace(\"heading\",` *#{1,6} *[^\n]`).replace(\"lheading\",xe).replace(\"|table\",\"\").replace(\"blockquote\",\" {0,3}>\").replace(\"|fences\",\"\").replace(\"|list\",\"\").replace(\"|html\",\"\").replace(\"|tag\",\"\").getRegex()},Ue=/^\\\\([!\"#$%&'()*+,\\-./:;<=>?@\\[\\]\\\\^_`{|}~])/,Ke=/^(`+)([^`]|[^`][\\s\\S]*?[^`])\\1(?!`)/,Re=/^( {2,}|\\\\)\\n(?!\\s*$)[ \\t]*/,We=/^(`+|[^`])(?:(?= {2,}\\n)|[\\s\\S]*?(?:(?=[\\\\<!\\[`*_]|\\b_|$)|[^ ](?= {2,}\\n)))/,$=/[\\p{P}\\p{S}]/u,H=/[\\s\\p{P}\\p{S}]/u,W=/[^\\s\\p{P}\\p{S}]/u,Xe=c(/^((?![*_])punctSpace)/,\"u\").replace(/punctSpace/g,H).getRegex(),Ve=/[\\p{Pi}\\p{Ps}\"']/u,Te=/(?!~)[\\p{P}\\p{S}]/u,Je=/(?!~)[\\s\\p{P}\\p{S}]/u,Ye=/(?:[^\\s\\p{P}\\p{S}]|~)/u,et=c(/link|precode-code|html/,\"g\").replace(\"link\",/\\[(?:[^\\[\\]`]|(?<a>`+)[^`]+\\k<a>(?!`))*?\\]\\((?:\\\\[\\s\\S]|[^\\\\\\(\\)]|\\((?:\\\\[\\s\\S]|[^\\\\\\(\\)])*\\))*\\)/).replace(\"precode-\",Me?\"(?<!`)()\":\"(^^|[^`])\").replace(\"code\",/(?<b>`+)[^`]+\\k<b>(?!`)/).replace(\"html\",/<(?! )[^<>]*?>/).getRegex(),Oe=/^(?:\\*+(?:((?!\\*)punct)|([^\\s*]))?)|^_+(?:((?!_)punct)|([^\\s_]))?/,tt=c(Oe,\"u\").replace(/punct/g,$).getRegex(),nt=c(Oe,\"u\").replace(/punct/g,Te).getRegex(),rt=/^(?:\\*+(?:((?!\\*)(?!openQuote)punct)|([^\\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\\s_]))?/,st=c(rt,\"u\").replace(/openQuote/g,Ve).replace(/punct/g,$).getRegex(),we=\"^[^_*]*?__[^_*]*?\\\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\\\*)punct(\\\\*+)(?=[\\\\s]|$)|notPunctSpace(\\\\*+)(?!\\\\*)(?=punctSpace|$)|(?!\\\\*)punctSpace(\\\\*+)(?=notPunctSpace)|[\\\\s](\\\\*+)(?!\\\\*)(?=punct)|(?!\\\\*)punct(\\\\*+)(?!\\\\*)(?=punct)|notPunctSpace(\\\\*+)(?=notPunctSpace)\",it=c(we,\"gu\").replace(/notPunctSpace/g,W).replace(/punctSpace/g,H).replace(/punct/g,$).getRegex(),ot=c(we,\"gu\").replace(/notPunctSpace/g,Ye).replace(/punctSpace/g,Je).replace(/punct/g,Te).getRegex(),at=\"^[^_*]*?__[^_*]*?\\\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\\\*)punct(\\\\*+)(?=[\\\\s]|$)|notPunctSpace(\\\\*+)(?!\\\\*)(?=punctSpace|$)|(?!\\\\*)[\\\\s](\\\\*+)(?=notPunctSpace)|[\\\\s](\\\\*+)(?!\\\\*)(?=punct)|(?!\\\\*)punct(\\\\*+)(?!\\\\*)(?=punct)|(?:(?!\\\\*)punct|notPunctSpace)(\\\\*+)(?!\\\\*)(?=notPunctSpace)\",lt=c(at,\"gu\").replace(/notPunctSpace/g,W).replace(/punctSpace/g,H).replace(/punct/g,$).getRegex(),ut=c(\"^[^_*]*?\\\\*\\\\*[^_*]*?_[^_*]*?(?=\\\\*\\\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)\",\"gu\").replace(/notPunctSpace/g,W).replace(/punctSpace/g,H).replace(/punct/g,$).getRegex(),pt=\"^[^_*]*?\\\\*\\\\*[^_*]*?_[^_*]*?(?=\\\\*\\\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\\\s](_+)(?=notPunctSpace)|[\\\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)\",ct=c(pt,\"gu\").replace(/notPunctSpace/g,W).replace(/punctSpace/g,H).replace(/punct/g,$).getRegex(),ht=c(/^~~?(?:((?!~)punct)|[^\\s~])/,\"u\").replace(/punct/g,$).getRegex(),dt=\"^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)\",kt=c(dt,\"gu\").replace(/notPunctSpace/g,W).replace(/punctSpace/g,H).replace(/punct/g,$).getRegex(),gt=c(/\\\\(punct)/,\"gu\").replace(/punct/g,$).getRegex(),ft=c(/(`+)(?:[^`]|[^`][\\s\\S]*?[^`])\\1(?!`)|`+|\\\\(punct)/,\"gu\").replace(/punct/g,$).getRegex(),mt=c(/^<(scheme:[^\\s\\x00-\\x1f<>]*|email)>/).replace(\"scheme\",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(\"email\",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),xt=c(ie).replace(\"(?:-->|$)\",\"-->\").getRegex(),bt=c(\"^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\\\s*/?>|^<\\\\?[\\\\s\\\\S]*?\\\\?>|^<![a-zA-Z]+\\\\s[\\\\s\\\\S]*?>|^<!\\\\[CDATA\\\\[[\\\\s\\\\S]*?\\\\]\\\\]>\").replace(\"comment\",xt).replace(\"attribute\",/\\s+[a-zA-Z:_][\\w.:-]*(?:\\s*=\\s*\"[^\"]*\"|\\s*=\\s*'[^']*'|\\s*=\\s*[^\\s\"'=<>`]+)?/).getRegex(),Pe=/\\[(?:\\\\[\\s\\S]|[^\\[\\]\\\\])*\\]/,Y=c(/(?:\\[(?:brackets|\\\\[\\s\\S]|[^\\[\\]\\\\])*\\]|\\\\[\\s\\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\\])|[^\\[\\]\\\\`])*?/).replace(\"brackets\",Pe).getRegex(),Rt=c(/^!?\\[(label)\\]\\([ \\t\\n]*(href)(?:(?:[ \\t]+(?:\\n[ \\t]*)?|\\n[ \\t]*)(title))?[ \\t\\n]*\\)/).replace(\"label\",Y).replace(\"href\",/<(?:\\\\.|[^\\n<>\\\\])+>|[^ \\t\\n\\x00-\\x1f]+|(?=\\))/).replace(\"title\",/\"(?:\\\\\"?|[^\"\\\\])*\"|'(?:\\\\'?|[^'\\\\])*'|\\((?:\\\\\\)?|[^)\\\\])*\\)/).getRegex(),Tt=c(/^!?\\[(label)\\]\\[(ref)\\]/).replace(\"label\",Y).replace(\"ref\",se).getRegex(),Ot=c(/^!?\\[(ref)\\](?:\\[\\])?/).replace(\"ref\",se).getRegex(),ge=/(?!\\s*\\])(?:\\\\[\\s\\S]|[^\\[\\]\\\\]){1,999}/,wt=c(/(?:[^\\[\\]\\\\`]*(?:\\[(?:brackets|\\\\[\\s\\S]|[^\\[\\]\\\\])*\\]|\\\\[\\s\\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\\]))){0,999}?[^\\[\\]\\\\`]*?/).replace(\"brackets\",Pe).getRegex(),Pt=c(\"reflink|nolink(?!\\\\()\",\"g\").replace(\"reflink\",c(/^!?\\[(label)\\]\\[(ref)\\]/).replace(\"label\",wt).replace(\"ref\",ge).getRegex()).replace(\"nolink\",c(/^!?\\[(ref)\\](?:\\[\\])?/).replace(\"ref\",ge).getRegex()).getRegex(),fe=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,yt=/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\\w-])/,St=c(/(?:mailto:email|xmpp:email(?:\\/[A-Za-z0-9@.]+)?)/).replace(/email/g,yt).getRegex(),ae={_backpedal:B,anyPunctuation:gt,anyPunctuationOutsideCode:ft,autolink:mt,blockSkip:et,br:Re,code:Ke,del:B,delLDelim:B,delRDelim:B,emStrongLDelim:tt,emStrongRDelimAst:it,emStrongRDelimUnd:ut,escape:Ue,link:Rt,nolink:Ot,punctuation:Xe,reflink:Tt,reflinkSearch:Pt,tag:bt,text:We,url:B},_t={...ae,emStrongLDelim:st,emStrongRDelimAst:lt,emStrongRDelimUnd:ct,link:c(/^!?\\[(label)\\]\\((.*?)\\)/).replace(\"label\",Y).getRegex(),reflink:c(/^!?\\[(label)\\]\\s*\\[([^\\]]*)\\]/).replace(\"label\",Y).getRegex()},te={...ae,emStrongRDelimAst:ot,emStrongLDelim:nt,delLDelim:ht,delRDelim:kt,url:c(/^emailProtocol|^((?:protocol):\\/\\/|www\\.)(?:[a-zA-Z0-9\\-]+\\.?)+[^\\s<]*|^email/).replace(\"emailProtocol\",St).replace(\"protocol\",fe).replace(\"email\",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'\"~()&]+|\\([^)]*\\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'\"~)]+(?!$))+/,del:/^(~~?)(?=[^\\s~])((?:\\\\[\\s\\S]|[^\\\\])*?(?:\\\\[\\s\\S]|[^\\s~\\\\]))\\1(?=[^~]|$)/,text:c(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\\n)|(?=[a-zA-Z0-9.!#$%&'*+\\/=?_`{\\|}~-]+@)|[\\s\\S]*?(?:(?=[\\\\<!\\[`*~_]|\\b_|protocol:\\/\\/|www\\.|$)|[^ ](?= {2,}\\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\\/=?_`{\\|}~-](?=[a-zA-Z0-9.!#$%&'*+\\/=?_`{\\|}~-]+@))))/).replace(\"protocol\",fe).replace(/emailProtocol/g,/(?:mailto|xmpp):/).getRegex()},$t={...te,br:c(Re).replace(\"{2,}\",\"*\").getRegex(),text:c(te.text).replace(\"\\\\b_\",\"\\\\b_| {2,}\\\\n\").replace(/\\{2,\\}/g,\"*\").getRegex()},X={normal:oe,gfm:je,pedantic:Fe},G={normal:ae,gfm:te,breaks:$t,pedantic:_t};var Lt={\"&\":\"&\",\"<\":\"<\",\">\":\">\",'\"':\""\",\"'\":\"'\"},ye=a=>Lt[a];function P(a,e){if(e){if(T.escapeTest.test(a))return a.replace(T.escapeReplace,ye)}else if(T.escapeTestNoEncode.test(a))return a.replace(T.escapeReplaceNoEncode,ye);return a}function Se(a){return T.numericCharacterReference.test(a)?a.replace(T.numericCharacterReferenceOrAmpersand,(e,t,n)=>{if(t===void 0&&n===void 0)return\"&\";let s=t===void 0?Number.parseInt(n,16):Number.parseInt(t,10);return s===0||s>1114111||s>=55296&&s<=57343?\"\\uFFFD\":s===38?\"&\":String.fromCodePoint(s)}):a}function le(a){try{a=encodeURI(a).replace(T.percentDecode,\"%\")}catch{return null}return a}function ue(a,e){let t=a.replace(T.findPipe,(r,o,i)=>{let l=!1,u=o;for(;--u>=0&&i[u]===\"\\\\\";)l=!l;return l?\"|\":\" |\"}),n=t.split(T.splitPipe),s=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push(\"\");for(;s<n.length;s++)n[s]=n[s].trim().replace(T.slashPipe,\"|\");return n}function z(a,e,t){let n=a.length;if(n===0)return\"\";let s=0;for(;s<n;){let r=a.charAt(n-s-1);if(r===e&&!t)s++;else if(r!==e&&t)s++;else break}return a.slice(0,n-s)}function pe(a){let e=a.split(`\n`),t=e.length-1;for(;t>=0&&T.blankLine.test(e[t]);)t--;return e.length-t<=2?a:e.slice(0,t+1).join(`\n`)}function N(a){return a.trim().toLowerCase().toUpperCase().toLowerCase()}function ce(a,e){if(a.indexOf(e[0])===-1&&a.indexOf(e[1])===-1)return-1;let t=0;for(let n=0;n<a.length;n++)if(a[n]===\"\\\\\")n++;else if(a[n]===e[0])t++;else if(a[n]===e[1]&&(t--,t<0))return n;return t>0?-2:-1}function V(a,e=0){let t=e,n=\"\";for(let s of a)if(s===\"\t\"){let r=4-t%4;n+=\" \".repeat(r),t+=r}else n+=s,t++;return n}function _e(a,e,t,n,s){let r=e.href,o=e.title||null,i=a[1].replace(s.other.outputLinkReplace,\"$1\"),l=a[0].charAt(0)===\"!\",u=n.state.inLink,h=n.state.linkEmitted,p=n.state.inRawBlock;n.state.inLink=!0,n.state.linkEmitted=!1;let d=n.inlineTokens(i),g=n.state.linkEmitted;if(n.state.linkEmitted=h,n.state.inLink=u,!l){if(g){n.state.inRawBlock=p;return}n.state.linkEmitted=!0}return{type:l?\"image\":\"link\",raw:t,href:r,title:o,text:i,tokens:d}}function At(a,e,t){let n=a.match(t.other.indentCodeCompensation);if(n===null)return e;let s=n[1];return e.split(`\n`).map(r=>{let o=r.match(t.other.beginningSpace);if(o===null)return r;let[i]=o;return r.slice(Math.min(i.length,s.length))}).join(`\n`)}function $e(a,e,t,n){if(!e.includes(\"<\"))return!1;for(let s=0;s<e.length;s++){if(e[s]===\"\\\\\"){s++;continue}if(e[s]===\"`\"){let i=n.inline.code.exec(e.slice(s));if(i){s+=i[0].length-1;continue}}if(e[s]!==\"<\")continue;let r=a.slice(t+s),o=n.inline.tag.exec(r)||n.inline.autolink.exec(r);if(o){if(o[0].length>e.length-s)return!0;s+=o[0].length-1}}return!1}var _=class{options;rules;lexer;constructor(e){this.options=e||y}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:\"space\",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let n=this.options.pedantic?t[0]:pe(t[0]),s=n.replace(this.rules.other.codeRemoveIndent,\"\");return{type:\"code\",raw:n,codeBlockStyle:\"indented\",text:s}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],s=At(n,t[3]||\"\",this.rules);return{type:\"code\",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,\"$1\"):t[2],text:s}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){let s=z(n,\"#\");(this.options.pedantic||!s||this.rules.other.endingSpaceTabChar.test(s))&&(n=s.trim())}return{type:\"heading\",raw:z(t[0],`\n`),depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:\"hr\",raw:z(t[0],`\n`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=z(t[0],`\n`).split(`\n`),s=\"\",r=\"\",o=[];for(;n.length>0;){let i=!1,l=[],u;for(u=0;u<n.length;u++)if(this.rules.other.blockquoteStart.test(n[u]))l.push(n[u]),i=!0;else if(!i)l.push(n[u]);else break;n=n.slice(u);let h=l.join(`\n`),p=h.replace(this.rules.other.blockquoteMarkerWhitespace,(k,b,x)=>b+V(x,b.length)).replace(this.rules.other.blockquoteSetextReplace,`\n $1`).replace(this.rules.other.blockquoteSetextReplace2,\"\");s=s?`${s}\n${h}`:h,r=r?`${r}\n${p}`:p;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(p,o,!0),this.lexer.state.top=d,n.length===0)break;let g=o.at(-1);if(g?.type===\"code\"||g?.type===\"heading\"||g?.type===\"hr\"||g?.type===\"html\")break;if(g?.type===\"blockquote\"){let k=g,b=n.join(`\n`),x=k.raw+`\n`+b.replace(this.rules.other.blockquoteSetextReplace2,\"\"),f=this.blockquote(x);o[o.length-1]=f;let S=x.substring(f.raw.length).replace(/^\\n/,\"\"),R=S?S.split(`\n`).length:0,C=R?n.slice(0,-R):n;C.length>0&&(s=`${s}\n${C.join(`\n`)}`),r=r.substring(0,r.length-k.text.length)+f.text;break}else if(g?.type===\"list\"){let k=g,b=k.raw+`\n`+n.join(`\n`),x=this.list(b);o[o.length-1]=x;let f=x.raw.length>k.raw.length?b.slice(k.raw.length+1,x.raw.length).split(`\n`).length:0;if(f>0){let S=n.slice(0,f).join(`\n`);s=`${s}\n${S}`,r=`${r}\n${S}`}n=n.slice(f);continue}}return{type:\"blockquote\",raw:s,tokens:o,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=e,s=()=>n.length-e.length,r=t[1].trim(),o=r.length>1,i={type:\"list\",raw:\"\",ordered:o,start:o?+r.slice(0,-1):\"\",loose:!1,items:[]};r=o?`\\\\d{1,9}\\\\${r.slice(-1)}`:`\\\\${r}`,this.options.pedantic&&(r=o?r:\"[*+-]\");let l=this.rules.other.listItemRegex(r),u=!1;for(;e;){let p=!1,d=\"\";if(!(t=l.exec(e))||this.rules.block.hr.test(e))break;let g=s();e=e.substring(t[0].length);let k=t[2].split(`\n`,1)[0],b=t[1].length,x=this.options.pedantic?V(k,b):k.replace(this.rules.other.leadingSpaceTab,Q=>V(Q,b)),f=e.split(`\n`,1)[0],S=!x.trim(),R=0;if(this.options.pedantic?(R=2,d=x.trimStart()):S?R=b+1:(R=x.search(this.rules.other.nonSpaceChar),R=R>4?1:R,d=x.slice(R),R+=b),S&&this.rules.other.blankLine.test(f)&&(e=e.substring(f.length+1),p=!0),!p){let Q=this.rules.other.nextBulletRegex(R),E=this.rules.other.hrRegex(R),j=this.rules.other.fencesBeginRegex(R),F=this.options.pedantic?this.rules.other.pedanticHeadingBeginRegex(R):this.rules.other.headingBeginRegex(R),Le=this.rules.other.htmlBeginRegex(R),Ae=this.rules.other.blockquoteBeginRegex(R);for(;e;){let he=e.split(`\n`,1)[0],Z;if(f=he,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting,\" \"),Z=f):Z=f.replace(this.rules.other.leadingSpaceTab,de=>V(de)),j.test(f)||F.test(f)||Le.test(f)||Ae.test(f)||Q.test(f)||E.test(f))break;if(Z.search(this.rules.other.nonSpaceChar)>=R||!f.trim())d+=`\n`+Z.slice(R);else{if(S||x.replace(this.rules.other.tabCharGlobal,\" \").search(this.rules.other.nonSpaceChar)>=4||j.test(x)||F.test(x)||E.test(x))break;let ze=!this.options.pedantic&&/^ {0,3}(?:=+|-+) *$/.test(f)&&this.rules.block.lheading.test(`${x}\n${f}`)?` ${Z.replace(/^ {0,3}/,\"\")}`:f;d+=`\n`+ze}S=!f.trim(),e=e.substring(he.length+1),x=Z.slice(R)}}let C=n.slice(g,s());i.loose||(u?i.loose=!0:this.rules.other.doubleBlankLine.test(C)&&(u=!0)),i.items.push({type:\"list_item\",raw:C,task:!!this.options.gfm&&this.rules.other.listIsTask.test(d),loose:!1,text:d,tokens:[]})}let h=i.items.at(-1);if(h)h.raw=h.raw.trimEnd(),h.text=h.text.trimEnd();else return;i.raw=n.slice(0,s()).trimEnd();for(let p of i.items)if(this.lexer.state.top=!1,p.tokens=this.lexer.blockTokens(p.text,[]),!i.loose){let d=p.tokens.filter(k=>k.type===\"space\"),g=d.length>0&&d.some(k=>this.rules.other.anyLine.test(k.raw));i.loose=g}for(let p of i.items){let d=p.tokens[0];if(p.task&&(d?.type===\"text\"||d?.type===\"paragraph\")){p.text=p.text.replace(this.rules.other.listReplaceTask,\"\"),d.raw=d.raw.replace(this.rules.other.listReplaceTask,\"\"),d.text=d.text.replace(this.rules.other.listReplaceTask,\"\");for(let k=this.lexer.inlineQueue.length-1;k>=0;k--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[k].src)){this.lexer.inlineQueue[k].src=this.lexer.inlineQueue[k].src.replace(this.rules.other.listReplaceTask,\"\");break}let g=this.rules.other.listTaskCheckbox.exec(p.raw);if(g){let k={type:\"checkbox\",raw:g[0]+\" \",checked:g[0]!==\"[ ]\"};p.checked=k.checked,i.loose?p.tokens[0]&&[\"paragraph\",\"text\"].includes(p.tokens[0].type)&&\"tokens\"in p.tokens[0]&&p.tokens[0].tokens?(p.tokens[0].raw=k.raw+p.tokens[0].raw,p.tokens[0].text=k.raw+p.tokens[0].text,p.tokens[0].tokens.unshift(k)):p.tokens.unshift({type:\"paragraph\",raw:k.raw,text:k.raw,tokens:[k]}):p.tokens.unshift(k)}}else p.task&&(p.task=!1)}if(i.loose)for(let p of i.items){p.loose=!0;for(let d of p.tokens)d.type===\"text\"&&(d.type=\"paragraph\")}return i}}html(e){let t=this.rules.block.html.exec(e);if(t){let n=pe(t[0]);return{type:\"html\",block:!0,raw:n,pre:t[1]===\"pre\"||t[1]===\"script\"||t[1]===\"style\",text:n}}}def(e){let t=this.rules.block.def.exec(e);if(t){if(!this.rules.other.startAngleBracket.test(t[2])&&ce(t[2],\"()\")!==-1)return;let n=N(t[1]).replace(this.rules.other.multipleSpaceGlobal,\" \"),s=t[2]?t[2].replace(this.rules.other.hrefBrackets,\"$1\").replace(this.rules.inline.anyPunctuation,\"$1\"):\"\",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,\"$1\"):t[3];return{type:\"def\",tag:n,raw:z(t[0],`\n`),href:s,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=ue(t[1]),s=t[2].replace(this.rules.other.tableAlignChars,\"\").split(\"|\"),r=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,\"\").split(`\n`):[],o={type:\"table\",raw:z(t[0],`\n`),header:[],align:[],rows:[]};if(n.length===s.length){for(let i of s)this.rules.other.tableAlignRight.test(i)?o.align.push(\"right\"):this.rules.other.tableAlignCenter.test(i)?o.align.push(\"center\"):this.rules.other.tableAlignLeft.test(i)?o.align.push(\"left\"):o.align.push(null);for(let i=0;i<n.length;i++)o.header.push({text:n[i],tokens:this.lexer.inline(n[i]),header:!0,align:o.align[i]});for(let i of r)o.rows.push(ue(i,o.header.length).map((l,u)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:o.align[u]})));return o}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let n=t[1].trim();return{type:\"heading\",raw:z(t[0],`\n`),depth:t[2].charAt(0)===\"=\"?1:2,text:n,tokens:this.lexer.inline(n)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let n=t[1].charAt(t[1].length-1)===`\n`?t[1].slice(0,-1):t[1];return{type:\"paragraph\",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:\"text\",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:\"escape\",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:\"html\",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){if(this.lexer.state.linkParenPossible===!1)return;let t=this.rules.inline.link.exec(e);if(t){let n=t[0].charAt(0)===\"!\"?2:1;if(!this.options.pedantic&&$e(e,t[1],n,this.rules))return;let s=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(s)){if(!this.rules.other.endAngleBracket.test(s))return;let i=z(s.slice(0,-1),\"\\\\\");if((s.length-i.length)%2===0)return}else{let i=ce(t[2],\"()\");if(i===-2)return;if(i>-1){let u=(t[0].indexOf(\"!\")===0?5:4)+t[1].length+i;t[2]=t[2].substring(0,i),t[0]=t[0].substring(0,u).trim(),t[3]=\"\"}}let r=t[2],o=\"\";if(this.options.pedantic){let i=this.rules.other.pedanticHrefTitle.exec(r);i&&(r=i[1],o=i[3])}else o=t[3]?t[3].slice(1,-1):\"\";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(s)?r=r.slice(1):r=r.slice(1,-1)),_e(t,{href:r&&r.replace(this.rules.inline.anyPunctuation,\"$1\"),title:o&&o.replace(this.rules.inline.anyPunctuation,\"$1\")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let s=n[0].charAt(0)===\"!\"?2:1;if(!this.options.pedantic&&$e(e,n[1],s,this.rules))return;let r=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal,\" \"),o=t[N(r)];if(!o){let i=n[0].charAt(0);return{type:\"text\",raw:i,text:i}}return _e(n,o,n[0],this.lexer,this.rules)}}emStrong(e,t,n=\"\"){let s=this.rules.inline.emStrongLDelim.exec(e);if(!s||!s[1]&&!s[2]&&!s[3]&&!s[4])return;let r=s[0][0],o=n===r,i=t.length-e.length,l=i;for(;!this.options.pedantic&&l>0&&t[l-1]===r;)l--;let u=[...t.slice(Math.max(0,l-2),l)].at(-1)??\"\",h=u===\"*\"||u===\"_\"||!!this.rules.inline.punctuation.exec(u);l<i&&(n=u);let p=l<i?h:!!this.rules.inline.punctuation.exec(n);if(s[4]&&n.match(this.rules.other.unicodeAlphaNumeric))return;let d=s[1]||s[3]||\"\";if(!d||!n||p){let g=[...s[0]].length-1,k,b,x=g,f=0,S=i-l+g,R=!this.options.pedantic&&!!u.trim()&&(!!d||r===\"*\"&&!h),C=r===\"*\"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(C.lastIndex=0,t=t.slice(-1*e.length+g);(s=C.exec(t))!==null;){if(k=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!k)continue;if(b=[...k].length,s[3]||s[4]){x+=b;continue}else if(s[5]||s[6]||R){if(o&&(s[5]||s[6]))break;if(S%3&&!((S+b)%3)){f+=b;continue}}if(x-=b,x>0)continue;b=Math.min(b,b+x+f);let Q=[...s[0]][0].length,E=e.slice(0,g+s.index+Q+b);if(Math.min(g,b)%2){let F=E.slice(1,-1);return{type:\"em\",raw:E,text:F,tokens:this.lexer.inlineTokens(F)}}let j=E.slice(2,-2);return{type:\"strong\",raw:E,text:j,tokens:this.lexer.inlineTokens(j)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal,\" \"),s=this.rules.other.nonSpaceChar.test(n),r=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return s&&r&&(n=n.substring(1,n.length-1)),{type:\"codespan\",raw:t[0],text:n}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:\"br\",raw:t[0]}}del(e,t,n=\"\"){let s=this.rules.inline.delLDelim.exec(e);if(!s)return;if(!(s[1]||\"\")||!n||this.rules.inline.punctuation.exec(n)){let o=[...s[0]].length-1,i,l,u=o,h=this.rules.inline.delRDelim;for(h.lastIndex=0,t=t.slice(-1*e.length+o);(s=h.exec(t))!==null;){if(i=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!i||(l=[...i].length,l!==o))continue;if(s[3]||s[4]){u+=l;continue}if(u-=l,u>0)continue;l=Math.min(l,l+u);let p=[...s[0]][0].length,d=e.slice(0,o+s.index+p+l),g=d.slice(o,-o);return{type:\"del\",raw:d,text:g,tokens:this.lexer.inlineTokens(g)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let n,s;return t[2]===\"@\"?(n=t[1],s=\"mailto:\"+n):(n=t[1],s=n),{type:\"link\",raw:t[0],text:n,href:s,autolink:!0,tokens:[{type:\"text\",raw:n,text:n}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let n,s;if(t[2]===\"@\")n=t[0],s=\"mailto:\"+n;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??\"\";while(r!==t[0]);n=t[0],t[1]===\"www.\"?s=\"http://\"+t[0]:s=t[0]}return{type:\"link\",raw:t[0],text:n,href:s,autolink:!0,tokens:[{type:\"text\",raw:n,text:n}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let n=this.lexer.state.inRawBlock;return{type:\"text\",raw:t[0],text:n?t[0]:Se(t[0]),escaped:n}}}};var O=class a{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||y,this.options.tokenizer=this.options.tokenizer||new _,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,linkEmitted:!1,linkParenPossible:!0,top:!0};let t={other:T,block:X.normal,inline:G.normal};this.options.pedantic?(t.block=X.pedantic,t.inline=G.pedantic):this.options.gfm&&(t.block=X.gfm,this.options.breaks?t.inline=G.breaks:t.inline=G.gfm),this.tokenizer.rules=t}static get rules(){return{block:X,inline:G}}static lex(e,t){return new a(t).lex(e)}static lexInline(e,t){return new a(t).inlineTokens(e)}lex(e){e=e.replace(T.carriageReturn,`\n`),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){let n=this.inlineQueue[t];this.state.inRawBlock=!1,this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(T.tabCharGlobal,\" \").replace(T.spaceLine,\"\"));let s=1/0;for(;e;){if(e.length<s)s=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}let r;if(this.options.extensions?.block?.some(i=>(r=i.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length);let i=t.at(-1);r.raw.length===1&&i!==void 0?i.raw+=`\n`:t.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length);let i=t.at(-1);i?.type===\"paragraph\"||i?.type===\"text\"?(i.raw+=(i.raw.endsWith(`\n`)?\"\":`\n`)+r.raw,i.text+=`\n`+r.text,this.inlineQueue.at(-1).src=i.text):t.push(r);continue}if(r=this.tokenizer.fences(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.heading(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.hr(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.blockquote(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.list(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.html(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length);let i=t.at(-1);i?.type===\"paragraph\"||i?.type===\"text\"?(i.raw+=(i.raw.endsWith(`\n`)?\"\":`\n`)+r.raw,i.text+=`\n`+r.raw,this.inlineQueue.at(-1).src=i.text):(this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title}),t.push(r));continue}if(r=this.tokenizer.table(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.lheading(e)){e=e.substring(r.raw.length),t.push(r);continue}let o=e;if(this.options.extensions?.startBlock){let i=1/0,l=e.slice(1),u;this.options.extensions.startBlock.forEach(h=>{u=h.call({lexer:this},l),typeof u==\"number\"&&u>=0&&(i=Math.min(i,u))}),i<1/0&&i>=0&&(o=e.substring(0,i+1))}if(this.state.top&&(r=this.tokenizer.paragraph(o))){let i=t.at(-1);n&&i?.type===\"paragraph\"?(i.raw+=(i.raw.endsWith(`\n`)?\"\":`\n`)+r.raw,i.text+=`\n`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=i.text):t.push(r),n=o.length!==e.length,e=e.substring(r.raw.length);continue}if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length);let i=t.at(-1);i?.type===\"text\"?(i.raw+=(i.raw.endsWith(`\n`)?\"\":`\n`)+r.raw,i.text+=`\n`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=i.text):t.push(r);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}linkInText(e){if(!e.includes(\"[\"))return!1;let t=this.tokenizer.rules.inline.link;for(let n of e.matchAll(this.tokenizer.rules.inline.blockSkip))if(t.test(n[0])&&e.charAt(n.index-1)!==\"!\")return!0;for(let n of e.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let s=n[0],r=s.lastIndexOf(\"[\");if(!(s.charAt(0)===\"!\"||!Object.hasOwn(this.tokens.links,N(s.slice(r+1,-1))))&&!(r>1&&this.linkInText(s.slice(1,r-1))))return!0}return!1}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let n=this.state.linkParenPossible;this.state.linkParenPossible=n&&e.includes(\")\");try{return this.#e(e,t)}finally{this.state.linkParenPossible=n}}#e(e,t){let n=e.includes(\"*\")||e.includes(\"_\")||e.includes(\"~\")||this.options.hooks?.emStrongMask||this.tokenizer.emStrong!==_.prototype.emStrong||this.tokenizer.del!==_.prototype.del?this.#t(e):e,s=!1,r=\"\",o=1/0;for(;e;){if(e.length<o)o=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}s||(r=\"\"),s=!1;let i;if(this.options.extensions?.inline?.some(u=>(i=u.call({lexer:this},e,t))?(e=e.substring(i.raw.length),t.push(i),!0):!1))continue;if(i=this.tokenizer.escape(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.tag(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.link(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(i.raw.length);let u=t.at(-1);i.type===\"text\"&&u?.type===\"text\"?(u.raw+=i.raw,u.text+=i.text):t.push(i);continue}if(i=this.tokenizer.emStrong(e,n,r)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.codespan(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.br(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.del(e,n,r)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.autolink(e)){e=e.substring(i.raw.length),t.push(i);continue}if(!this.state.inLink&&(i=this.tokenizer.url(e))){e=e.substring(i.raw.length),t.push(i);continue}let l=e;if(this.options.extensions?.startInline){let u=1/0,h=e.slice(1),p;this.options.extensions.startInline.forEach(d=>{p=d.call({lexer:this},h),typeof p==\"number\"&&p>=0&&(u=Math.min(u,p))}),u<1/0&&u>=0&&(l=e.substring(0,u+1))}if(i=this.tokenizer.inlineText(l)){e=e.substring(i.raw.length),i.raw.slice(-1)!==\"_\"&&(r=i.raw.slice(-1)),s=!0;let u=t.at(-1);u?.type===\"text\"?(u.raw+=i.raw,u.text+=i.text):t.push(i);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return t}#t(e){let t=e;if(this.tokens.links&&e.includes(\"[\")){let n=this.tokenizer.rules.inline.reflinkSearch,s=r=>{let o=r.lastIndexOf(\"[\");if(!Object.hasOwn(this.tokens.links,N(r.slice(o+1,-1))))return r;if(o>1&&r.charAt(0)!==\"!\"){let i=r.slice(1,o-1);if(this.linkInText(i))return\"[\"+i.replace(n,s)+\"][\"+\"a\".repeat(r.length-o-2)+\"]\"}return\"[\"+\"a\".repeat(r.length-2)+\"]\"};t=t.replace(n,s)}return t=t.replace(this.tokenizer.rules.inline.anyPunctuationOutsideCode,(n,s,r)=>r?\"+\".repeat(n.length):s?s+n.slice(s.length,-s.length).replace(/`/g,\"+\")+s:n),t=t.replace(this.tokenizer.rules.inline.blockSkip,(n,s,r)=>{let o=r?r.length:0;return n.slice(0,o)+\"[\"+\"a\".repeat(n.length-o-2)+\"]\"}),t=this.options.hooks?.emStrongMask?.call({lexer:this},t)??t,t}infiniteLoopError(e){let t=\"Infinite loop on byte: \"+e;if(this.options.silent)console.error(t);else throw new Error(t)}};var L=class{options;parser;constructor(e){this.options=e||y}space(e){return\"\"}code({text:e,lang:t,escaped:n}){let s=(t||\"\").match(T.notSpaceStart)?.[0],r=e?e.replace(T.endingNewline,\"\")+`\n`:\"\";return s?'<pre><code class=\"language-'+P(s)+'\">'+(n?r:P(r,!0))+`</code></pre>\n`:\"<pre><code>\"+(n?r:P(r,!0))+`</code></pre>\n`}blockquote({tokens:e}){return`<blockquote>\n${this.parser.parse(e)}</blockquote>\n`}html({text:e}){return e}def(e){return\"\"}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>\n`}hr(e){return`<hr>\n`}list(e){let t=e.ordered,n=e.start,s=\"\";for(let i=0;i<e.items.length;i++){let l=e.items[i];s+=this.listitem(l)}let r=t?\"ol\":\"ul\",o=t&&n!==1?' start=\"'+n+'\"':\"\";return\"<\"+r+o+`>\n`+s+\"</\"+r+`>\n`}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>\n`}checkbox({checked:e}){return\"<input \"+(e?'checked=\"\" ':\"\")+'disabled=\"\" type=\"checkbox\"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>\n`}table(e){let t=\"\",n=\"\";for(let r=0;r<e.header.length;r++)n+=this.tablecell(e.header[r]);t+=this.tablerow({text:n});let s=\"\";for(let r=0;r<e.rows.length;r++){let o=e.rows[r];n=\"\";for(let i=0;i<o.length;i++)n+=this.tablecell(o[i]);s+=this.tablerow({text:n})}return s&&(s=`<tbody>${s}</tbody>`),`<table>\n<thead>\n`+t+`</thead>\n`+s+`</table>\n`}tablerow({text:e}){return`<tr>\n${e}</tr>\n`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?\"th\":\"td\";return(e.align?`<${n} align=\"${e.align}\">`:`<${n}>`)+t+`</${n}>\n`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${P(e,!0)}</code>`}br(e){return\"<br>\"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,text:n,tokens:s,autolink:r}){let o=r?P(n,!0):this.parser.parseInline(s),i=le(e);if(i===null)return o;e=P(i,r);let l='<a href=\"'+e+'\"';return t&&(l+=' title=\"'+P(t)+'\"'),l+=\">\"+o+\"</a>\",l}image({href:e,title:t,text:n,tokens:s}){s&&(n=this.parser.parseInline(s,this.parser.textRenderer));let r=le(e);if(r===null)return P(n);e=r;let o=`<img src=\"${P(e)}\" alt=\"${P(n)}\"`;return t&&(o+=` title=\"${P(t)}\"`),o+=\">\",o}text(e){return\"tokens\"in e&&e.tokens?this.parser.parseInline(e.tokens):\"escaped\"in e&&e.escaped?e.text:P(e.text)}};var M=class{parser;strong({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}em({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}codespan({text:e}){return e}del({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}html({text:e}){return e}text({text:e}){return e}link({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}image({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}br(){return\"\"}checkbox({raw:e}){return e}};var w=class a{options;renderer;textRenderer;constructor(e){this.options=e||y,this.options.renderer=this.options.renderer||new L,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new M,this.textRenderer.parser=this}static parse(e,t){return new a(t).parse(e)}static parseInline(e,t){return new a(t).parseInline(e)}parse(e){this.renderer.parser=this;let t=\"\";for(let n=0;n<e.length;n++){let s=e[n];if(this.options.extensions?.renderers?.[s.type]){let o=s,i=this.options.extensions.renderers[o.type].call({parser:this},o);if(i!==!1||![\"space\",\"hr\",\"heading\",\"code\",\"table\",\"blockquote\",\"list\",\"checkbox\",\"html\",\"def\",\"paragraph\",\"text\"].includes(o.type)){t+=i||\"\";continue}}let r=s;switch(r.type){case\"space\":{t+=this.renderer.space(r);break}case\"hr\":{t+=this.renderer.hr(r);break}case\"heading\":{t+=this.renderer.heading(r);break}case\"code\":{t+=this.renderer.code(r);break}case\"table\":{t+=this.renderer.table(r);break}case\"blockquote\":{t+=this.renderer.blockquote(r);break}case\"list\":{t+=this.renderer.list(r);break}case\"checkbox\":{t+=this.renderer.checkbox(r);break}case\"html\":{t+=this.renderer.html(r);break}case\"def\":{t+=this.renderer.def(r);break}case\"paragraph\":{t+=this.renderer.paragraph(r);break}case\"text\":{t+=this.renderer.text(r);break}default:{let o='Token with \"'+r.type+'\" type was not found.';if(this.options.silent)return console.error(o),\"\";throw new Error(o)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let n=\"\";for(let s=0;s<e.length;s++){let r=e[s];if(this.options.extensions?.renderers?.[r.type]){let i=this.options.extensions.renderers[r.type].call({parser:this},r);if(i!==!1||![\"escape\",\"html\",\"link\",\"image\",\"checkbox\",\"strong\",\"em\",\"codespan\",\"br\",\"del\",\"text\"].includes(r.type)){n+=i||\"\";continue}}let o=r;switch(o.type){case\"escape\":{n+=t.text(o);break}case\"html\":{n+=t.html(o);break}case\"link\":{n+=t.link(o);break}case\"image\":{n+=t.image(o);break}case\"checkbox\":{n+=t.checkbox(o);break}case\"strong\":{n+=t.strong(o);break}case\"em\":{n+=t.em(o);break}case\"codespan\":{n+=t.codespan(o);break}case\"br\":{n+=t.br(o);break}case\"del\":{n+=t.del(o);break}case\"text\":{n+=t.text(o);break}default:{let i='Token with \"'+o.type+'\" type was not found.';if(this.options.silent)return console.error(i),\"\";throw new Error(i)}}}return n}};var A=class{options;block;constructor(e){this.options=e||y}static passThroughHooks=new Set([\"preprocess\",\"postprocess\",\"processAllTokens\",\"emStrongMask\"]);static passThroughHooksRespectAsync=new Set([\"preprocess\",\"postprocess\",\"processAllTokens\"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?O.lex:O.lexInline}provideParser(e=this.block){return e?w.parse:w.parseInline}};function D(a,e){if(Array.isArray(e))for(let t=0;t<e.length;t++)a.push(e[t]);else a.push(e)}var J=class{defaults=v();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=w;Renderer=L;TextRenderer=M;Lexer=O;Tokenizer=_;Hooks=A;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let s of e)switch(D(n,t.call(this,s)),s.type){case\"table\":{let r=s;for(let o of r.header)D(n,this.walkTokens(o.tokens,t));for(let o of r.rows)for(let i of o)D(n,this.walkTokens(i.tokens,t));break}case\"list\":{let r=s;D(n,this.walkTokens(r.items,t));break}default:{let r=s;this.defaults.extensions?.childTokens?.[r.type]?this.defaults.extensions.childTokens[r.type].forEach(o=>{let i=r[o].flat(1/0);D(n,this.walkTokens(i,t))}):r.tokens&&D(n,this.walkTokens(r.tokens,t))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{let s={...n};if(s.async=this.defaults.async||s.async||!1,n.extensions&&(n.extensions.forEach(r=>{if(!r.name)throw new Error(\"extension name required\");if(\"renderer\"in r){let o=t.renderers[r.name];o?t.renderers[r.name]=function(...i){let l=r.renderer.apply(this,i);return l===!1&&(l=o.apply(this,i)),l}:t.renderers[r.name]=r.renderer}if(\"tokenizer\"in r){if(!r.level||r.level!==\"block\"&&r.level!==\"inline\")throw new Error(\"extension level must be 'block' or 'inline'\");let o=t[r.level];o?o.unshift(r.tokenizer):t[r.level]=[r.tokenizer],r.start&&(r.level===\"block\"?t.startBlock?t.startBlock.push(r.start):t.startBlock=[r.start]:r.level===\"inline\"&&(t.startInline?t.startInline.push(r.start):t.startInline=[r.start]))}\"childTokens\"in r&&r.childTokens&&(t.childTokens[r.name]=r.childTokens)}),s.extensions=t),n.renderer){let r=this.defaults.renderer||new L(this.defaults);for(let o in n.renderer){if(!(o in r))throw new Error(`renderer '${o}' does not exist`);if([\"options\",\"parser\"].includes(o))continue;let i=o,l=n.renderer[i],u=r[i];r[i]=(...h)=>{let p=l.apply(r,h);return p===!1&&(p=u.apply(r,h)),p||\"\"}}s.renderer=r}if(n.tokenizer){let r=this.defaults.tokenizer||new _(this.defaults);for(let o in n.tokenizer){if(!(o in r))throw new Error(`tokenizer '${o}' does not exist`);if([\"options\",\"rules\",\"lexer\"].includes(o))continue;let i=o,l=n.tokenizer[i],u=r[i];r[i]=(...h)=>{let p=l.apply(r,h);return p===!1&&(p=u.apply(r,h)),p}}s.tokenizer=r}if(n.hooks){let r=this.defaults.hooks||new A;for(let o in n.hooks){if(!(o in r))throw new Error(`hook '${o}' does not exist`);if([\"options\",\"block\"].includes(o))continue;let i=o,l=n.hooks[i],u=r[i];A.passThroughHooks.has(o)?r[i]=h=>{if(r.options.async&&A.passThroughHooksRespectAsync.has(o))return(async()=>{let d=await l.call(r,h);return u.call(r,d)})();let p=l.call(r,h);return u.call(r,p)}:r[i]=(...h)=>{if(r.options.async)return(async()=>{let d=await l.apply(r,h);return d===!1&&(d=await u.apply(r,h)),d})();let p=l.apply(r,h);return p===!1&&(p=u.apply(r,h)),p}}s.hooks=r}if(n.walkTokens){let r=this.defaults.walkTokens,o=n.walkTokens;s.walkTokens=function(i){let l=[];return l.push(o.call(this,i)),r&&D(l,r.call(this,i)),l}}this.defaults={...this.defaults,...s}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return O.lex(e,t??this.defaults)}parser(e,t){return w.parse(e,t??this.defaults)}parseMarkdown(e){return(n,s)=>{let r={...s},o={...this.defaults,...r},i=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&r.async===!1)return i(new Error(\"marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.\"));if(typeof n>\"u\"||n===null)return i(new Error(\"marked(): input parameter is undefined or null\"));if(typeof n!=\"string\")return i(new Error(\"marked(): input parameter is of type \"+Object.prototype.toString.call(n)+\", string expected\"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=e),o.async)return(async()=>{let l=o.hooks?await o.hooks.preprocess(n):n,h=await(o.hooks?await o.hooks.provideLexer(e):e?O.lex:O.lexInline)(l,o),p=o.hooks?await o.hooks.processAllTokens(h):h;o.walkTokens&&await Promise.all(this.walkTokens(p,o.walkTokens));let g=await(o.hooks?await o.hooks.provideParser(e):e?w.parse:w.parseInline)(p,o);return o.hooks?await o.hooks.postprocess(g):g})().catch(i);try{o.hooks&&(n=o.hooks.preprocess(n));let u=(o.hooks?o.hooks.provideLexer(e):e?O.lex:O.lexInline)(n,o);o.hooks&&(u=o.hooks.processAllTokens(u)),o.walkTokens&&this.walkTokens(u,o.walkTokens);let p=(o.hooks?o.hooks.provideParser(e):e?w.parse:w.parseInline)(u,o);return o.hooks&&(p=o.hooks.postprocess(p)),p}catch(l){return i(l)}}}onError(e,t){return n=>{if(n.message+=`\nPlease report this to https://github.com/markedjs/marked.`,e){let s=\"<p>An error occurred:</p><pre>\"+P(n.message+\"\",!0)+\"</pre>\";return t?Promise.resolve(s):s}if(t)return Promise.reject(n);throw n}}};var q=new J;function m(a,e){return q.parse(a,e)}m.options=m.setOptions=function(a){return q.setOptions(a),m.defaults=q.defaults,ee(m.defaults),m};m.getDefaults=v;m.defaults=y;function zt(...a){return q.use(...a),m.defaults=q.defaults,ee(m.defaults),m}m.use=zt;m.walkTokens=function(a,e){return q.walkTokens(a,e)};m.parseInline=q.parseInline;m.Parser=w;m.parser=w.parse;m.Renderer=L;m.TextRenderer=M;m.Lexer=O;m.lexer=O.lex;m.Tokenizer=_;m.Hooks=A;m.parse=m;var Tn=m.options,On=m.setOptions,wn=m.walkTokens,Pn=m.parseInline,yn=m,Sn=w.parse,_n=O.lex;export{A as Hooks,O as Lexer,J as Marked,w as Parser,L as Renderer,M as TextRenderer,_ as Tokenizer,y as defaults,v as getDefaults,_n as lexer,m as marked,Tn as options,yn as parse,Pn as parseInline,Sn as parser,On as setOptions,zt as use,wn as walkTokens};\n//# sourceMappingURL=marked.esm.js.map\n","/**\n * A GitHub pull request or issue named in a message: what a link to one looks\n * like, what the server answers about it, and how each state is drawn. Shared\n * by the server that reads GitHub and the transcript that draws the chip.\n */\n\nexport type GithubRefKind = 'pull' | 'issue';\nexport type GithubRefState = 'open' | 'draft' | 'merged' | 'closed';\n\n/** What GitHub says about one pull request or issue. */\nexport interface GithubRef {\n\t/** `owner/name`. */\n\trepo: string;\n\tnumber: number;\n\tkind: GithubRefKind;\n\ttitle: string;\n\tstate: GithubRefState;\n\tdraft: boolean;\n\t/** The login of whoever opened it. */\n\tauthor: string | null;\n\t/** When it last changed, in ms. */\n\tupdated_at: number | null;\n\turl: string;\n}\n\n/** Where a link points, read off its URL alone. */\nexport interface GithubRefTarget {\n\trepo: string;\n\tnumber: number;\n\tkind: GithubRefKind;\n}\n\nconst OWNER = String.raw`[A-Za-z0-9](?:[A-Za-z0-9-]{0,38})`;\nconst NAME = String.raw`[A-Za-z0-9._-]{1,100}`;\nconst SLUG = new RegExp(`^${OWNER}/(${NAME})$`);\n/** A pull request or issue, with whatever GitHub hangs after it (`/files`, `#issuecomment-1`). */\nconst REF_URL = new RegExp(\n\tString.raw`^https?://(?:www\\.)?github\\.com/(${OWNER}/${NAME})/(pull|issues)/([1-9]\\d{0,8})(?:[/?#].*)?$`\n);\n\n/** Whether `slug` is an `owner/name` and nothing else, safe to put in an API path. */\nexport function isRepoSlug(slug: string): boolean {\n\tconst name = SLUG.exec(slug)?.[1];\n\treturn name !== undefined && name !== '.' && name !== '..';\n}\n\n/** A pull request or issue number as written in a query: digits, no sign, no zero. */\nexport function parseRefNumber(text: string | null | undefined): number | null {\n\treturn text && /^[1-9]\\d{0,8}$/.test(text) ? Number(text) : null;\n}\n\n/** The pull request or issue a URL points at, or null for any other URL. */\nexport function parseGithubRefUrl(href: string): GithubRefTarget | null {\n\tconst m = REF_URL.exec(href);\n\tif (!m || !isRepoSlug(m[1])) return null;\n\treturn { repo: m[1], number: Number(m[3]), kind: m[2] === 'pull' ? 'pull' : 'issue' };\n}\n\n/** Whether a link's text is only a name for its target (`#12`, `owner/name#12`), not words of the author's. */\nexport function isRefShorthand(text: string, target: GithubRefTarget): boolean {\n\tconst t = text.trim();\n\treturn t === `#${target.number}` || t.toLowerCase() === `${target.repo}#${target.number}`.toLowerCase();\n}\n\nexport interface GithubRefVisual {\n\ticon: string;\n\tcolor: string;\n\tlabel: string;\n}\n\n// Emerald is the palette's \"going well\", violet its \"work a session did\", grey\n// what recedes. Amber is left out on purpose: it is reserved for what wants a\n// person, and no state of a pull request does.\nconst PULL: Record<GithubRefState, GithubRefVisual> = {\n\topen: { icon: 'mdi:source-pull', color: '#34d399', label: 'Open' },\n\tdraft: { icon: 'mdi:source-pull', color: '#a8a29e', label: 'Draft' },\n\tmerged: { icon: 'mdi:source-merge', color: '#c4b5fd', label: 'Merged' },\n\tclosed: { icon: 'mdi:source-pull', color: '#f87171', label: 'Closed' }\n};\nconst ISSUE_OPEN: GithubRefVisual = { icon: 'mdi:record-circle-outline', color: '#34d399', label: 'Open' };\nconst ISSUE_CLOSED: GithubRefVisual = { icon: 'mdi:check-circle-outline', color: '#c4b5fd', label: 'Closed' };\n\n/** The icon, colour and word for a pull request's or issue's state. */\nexport function githubRefVisual(ref: Pick<GithubRef, 'kind' | 'state'>): GithubRefVisual {\n\tif (ref.kind === 'pull') return PULL[ref.state];\n\treturn ref.state === 'open' ? ISSUE_OPEN : ISSUE_CLOSED;\n}\n","/**\n * Telling a file path from the rest of a message. A path may carry a line\n * (`src/tmux/pane.ts:120`, `:120:5`, `:120-140`), which is split off. What\n * counts as a path is decided by its last part being a file's name, so\n * that `and/or`, `origin/main`, `/api/sessions` and `v0.30.8` stay prose.\n */\n\nexport interface FilePath {\n\tpath: string;\n\tline: number | null;\n}\n\n/** A path found in a run of text, with where it sits. */\nexport interface FilePathHit extends FilePath {\n\tstart: number;\n\tend: number;\n}\n\n/** A path's trailing `:line`, `:line:col` or `:from-to`. */\nconst LINE = String.raw`:(\\d+)(?::\\d+)?(?:-\\d+)?`;\nconst LINE_SUFFIX = new RegExp(`${LINE}$`);\n\n/** The characters a path is made of; brackets, parentheses and `+` for SvelteKit's routes. */\nconst PATH_CHARS = /^[\\w.@+~$()[\\]/-]+$/;\n\n/** The extensions a file's name ends in. An open list would take `owner/repo.git` and `release-1.x` for files. */\nconst EXTENSIONS = new Set(\n\t(\n\t\t'ts mts cts tsx js mjs cjs jsx svelte vue astro html htm xml svg css scss less json jsonl jsonc ' +\n\t\t'md mdx markdown rst txt py rb php java kt swift cs c h cc cpp hpp rs go lua sh bash zsh fish ' +\n\t\t'yml yaml toml ini cfg conf lock csv tsv sql diff patch ' +\n\t\t'png jpg jpeg gif webp ico pdf ipynb proto graphql tf nix service'\n\t).split(' ')\n);\n\n/** File names that carry no extension. */\nconst BARE_NAMES = new Set(['Makefile', 'Dockerfile', 'LICENSE', 'Procfile', 'Gemfile', 'Rakefile', 'Justfile']);\n\n/** Dotfiles, by how their name starts: `.env.local`, `.eslintrc.cjs`. Any other `.word` is a property or a CSS class. */\nconst DOTFILE =\n\t/^\\.(?:env|gitignore|gitattributes|gitmodules|dockerignore|npmrc|nvmrc|editorconfig|eslintrc|eslintignore|prettierrc|prettierignore|bashrc|zshrc|profile)(?:\\.[\\w.-]+)?$/;\n\n/** A first part that names a host, as in `github.com/owner/repo/a.ts`. */\nconst HOST = /^[\\w-]+(?:\\.[\\w-]+)*\\.(?:com|org|net|io|dev|ai|app|co)$/i;\n\n/** Whether a path's last part is a file's name. */\nfunction namesFile(name: string): boolean {\n\tif (BARE_NAMES.has(name) || DOTFILE.test(name)) return true;\n\tconst ext = /[\\w)\\]]\\.([A-Za-z][A-Za-z0-9]*)$/.exec(name)?.[1];\n\treturn ext !== undefined && EXTENSIONS.has(ext.toLowerCase());\n}\n\n/**\n * The path and line `text` is, or null when it is something else. With\n * `needDirectory` a bare file name is not enough, which is how plain prose is\n * read: there `Node.js` is a name, not a file.\n */\nexport function parseFilePath(text: string, needDirectory = false): FilePath | null {\n\tconst suffix = LINE_SUFFIX.exec(text);\n\tconst path = suffix ? text.slice(0, suffix.index) : text;\n\tif (!path || path.length > 400 || !PATH_CHARS.test(path)) return null;\n\tif (path.startsWith('//') || path.endsWith('/')) return null;\n\tconst parts = path.split('/');\n\tconst inDirectory = parts.length > 1;\n\tif (needDirectory && !inDirectory) return null;\n\tif (inDirectory && HOST.test(parts[0])) return null;\n\tif (!namesFile(parts[parts.length - 1])) return null;\n\treturn { path, line: suffix ? Number(suffix[1]) || null : null };\n}\n\n/**\n * Something shaped like a path with a directory in it, not starting inside a\n * word, a URL or another path. Parentheses are left out, since in prose they\n * are far more often around a path than in one. The second lookbehind skips a\n * start inside a run of `+`, which the start before it has already covered:\n * without it a long run with no `/` is scanned once from every `+` in it.\n */\nconst IN_PROSE = new RegExp(\n\tString.raw`(?<![\\w@.~/:$[\\]-])(?<!\\+(?=[\\w.@+$[\\]-]))(?:~\\/|\\.{1,2}\\/|\\/)?[\\w.@+$[\\]-]+(?:\\/[\\w.@+$[\\]-]+)+(?:${LINE})?`,\n\t'g'\n);\n\n/** The file paths in a run of plain text, in order, with where each sits. */\nexport function findFilePaths(text: string): FilePathHit[] {\n\tconst found: FilePathHit[] = [];\n\tfor (const m of text.matchAll(IN_PROSE)) {\n\t\t// The full stop that ends a sentence is not the path's.\n\t\tconst candidate = m[0].replace(/\\.+$/, '');\n\t\tconst hit = parseFilePath(candidate, true);\n\t\tif (hit) found.push({ ...hit, start: m.index, end: m.index + candidate.length });\n\t}\n\treturn found;\n}\n","/**\n * What a pull request's or issue's body needs beyond the transcript's\n * markdown: GitHub's alerts, and the HTML people and bots write into a body\n * (`<details>`, `<img>`, `<br>`, `<sub>`…), kept to tags and attributes that\n * can only draw, never run or reach out except through the media function.\n */\n\nimport type { Token, Tokens } from 'marked';\n\nexport type AlertKind = 'note' | 'tip' | 'important' | 'warning' | 'caution';\n\nexport const GITHUB_ALERTS: Record<AlertKind, string> = {\n\tnote: 'Note',\n\ttip: 'Tip',\n\timportant: 'Important',\n\twarning: 'Warning',\n\tcaution: 'Caution'\n};\n\n/** Where an image is drawn from, given the address the body wrote; null leaves it out. */\nexport type MediaHref = (url: string) => string | null;\n\n/** The marker on a quote's first line, alone on it: GitHub's rule for an alert. */\nconst ALERT_MARK = /^\\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\\][ \\t]*(?:\\n|$)/i;\n\n/**\n * Mark each quote that opens with `[!NOTE]` (or TIP, IMPORTANT, WARNING,\n * CAUTION) alone on its first line as that alert, and take the marker out.\n * A marker with text after it on the same line leaves a plain quote.\n */\nexport function markAlerts(tokens: Token[]): void {\n\tfor (const t of tokens) {\n\t\tif (t.type !== 'blockquote') continue;\n\t\tconst quote = t as Tokens.Blockquote & { alert?: AlertKind };\n\t\tconst first = quote.tokens[0];\n\t\tif (first?.type !== 'paragraph') {\n\t\t\tmarkAlerts(quote.tokens);\n\t\t\tcontinue;\n\t\t}\n\t\tconst para = first as Tokens.Paragraph;\n\t\tconst lead = para.tokens[0];\n\t\tconst mark = lead?.type === 'text' ? ALERT_MARK.exec((lead as Tokens.Text).text) : null;\n\t\tif (!mark) continue;\n\t\tquote.alert = mark[1].toLowerCase() as AlertKind;\n\t\tconst rest = (lead as Tokens.Text).text.slice(mark[0].length);\n\t\tif (rest) {\n\t\t\tpara.tokens[0] = { ...lead, raw: rest, text: rest } as Tokens.Text;\n\t\t} else {\n\t\t\tpara.tokens.shift();\n\t\t\tif (para.tokens.length === 0) quote.tokens.shift();\n\t\t}\n\t}\n}\n\n/** Tags a body may keep, with the attributes each may carry. */\nconst ALLOWED: Record<string, readonly string[]> = {\n\tdetails: ['open'],\n\tsummary: [],\n\tbr: [],\n\thr: [],\n\tp: ['align'],\n\tdiv: ['align'],\n\tspan: [],\n\tsub: [],\n\tsup: [],\n\tb: [],\n\tstrong: [],\n\ti: [],\n\tem: [],\n\ts: [],\n\tdel: [],\n\tins: [],\n\tu: [],\n\tmark: [],\n\tsmall: [],\n\tcode: [],\n\tkbd: [],\n\tpre: [],\n\tblockquote: [],\n\tul: [],\n\tol: ['start'],\n\tli: [],\n\tdl: [],\n\tdt: [],\n\tdd: [],\n\ttable: [],\n\tthead: [],\n\ttbody: [],\n\ttr: [],\n\tth: ['align', 'colspan', 'rowspan'],\n\ttd: ['align', 'colspan', 'rowspan'],\n\th1: [],\n\th2: [],\n\th3: [],\n\th4: [],\n\th5: [],\n\th6: [],\n\timg: ['src', 'alt', 'width', 'height', 'title'],\n\ta: ['href', 'title']\n};\n\nconst VOID = new Set(['br', 'hr', 'img']);\n\nfunction escapeText(text: string): string {\n\treturn text\n\t\t.replace(/&(?!#?\\w+;)/g, '&')\n\t\t.replaceAll('<', '<')\n\t\t.replaceAll('>', '>');\n}\n\nfunction decodeAttr(value: string): string {\n\treturn value\n\t\t.replaceAll('"', '\"')\n\t\t.replaceAll(''', \"'\")\n\t\t.replaceAll('<', '<')\n\t\t.replaceAll('>', '>')\n\t\t.replaceAll('&', '&');\n}\n\nfunction escapeAttr(value: string): string {\n\treturn value.replaceAll('&', '&').replaceAll('\"', '"').replaceAll('<', '<').replaceAll('>', '>');\n}\n\nfunction isWebUrl(url: string): boolean {\n\treturn /^https?:\\/\\//i.test(url);\n}\n\nconst ATTR = /([^\\s=/\"'>]+)(?:\\s*=\\s*(?:\"([^\"]*)\"|'([^']*)'|([^\\s\"'>]+)))?/g;\n\n/** One tag rebuilt from what it may carry, or null when it may not stay. */\nfunction rebuildTag(name: string, closing: boolean, attrs: string, media: MediaHref): string | null {\n\tconst allowed = ALLOWED[name];\n\tif (!allowed) return null;\n\tif (closing) return VOID.has(name) ? '' : `</${name}>`;\n\tconst kept: string[] = [];\n\tfor (const m of attrs.matchAll(ATTR)) {\n\t\tconst attr = m[1].toLowerCase();\n\t\tif (!allowed.includes(attr)) continue;\n\t\tconst value = decodeAttr(m[2] ?? m[3] ?? m[4] ?? '');\n\t\tif (attr === 'src') {\n\t\t\tconst src = isWebUrl(value) ? media(value) : null;\n\t\t\tif (!src) return name === 'img' ? '' : null;\n\t\t\tkept.push(`src=\"${escapeAttr(src)}\"`);\n\t\t} else if (attr === 'href') {\n\t\t\tif (isWebUrl(value) || value.startsWith('#')) kept.push(`href=\"${escapeAttr(value)}\"`);\n\t\t} else if (attr === 'open') {\n\t\t\tkept.push('open');\n\t\t} else {\n\t\t\tkept.push(`${attr}=\"${escapeAttr(value)}\"`);\n\t\t}\n\t}\n\tif (name === 'img') {\n\t\tif (!kept.some((a) => a.startsWith('src='))) return '';\n\t\tkept.push('loading=\"lazy\"');\n\t}\n\tif (name === 'a') kept.push('target=\"_blank\"', 'rel=\"noopener\"');\n\treturn `<${name}${kept.length ? ' ' + kept.join(' ') : ''}>`;\n}\n\nconst PIECE = /<!--[\\s\\S]*?(?:-->|$)|<(\\/?)([a-zA-Z][\\w-]*)((?:[^>\"']|\"[^\"]*\"|'[^']*')*)\\/?>/g;\n\n/**\n * Raw HTML from a body, kept to the tags in `ALLOWED` with only their\n * allowed attributes; comments are dropped, links open in a new tab, an\n * image's address goes through `media`, and every other tag is shown as the\n * text it was written as.\n */\nexport function sanitizeGithubHtml(raw: string, media: MediaHref): string {\n\tlet out = '';\n\tlet at = 0;\n\tfor (const m of raw.matchAll(PIECE)) {\n\t\tout += escapeText(raw.slice(at, m.index));\n\t\tat = m.index + m[0].length;\n\t\tif (m[0].startsWith('<!--')) continue;\n\t\tconst tag = rebuildTag(m[2].toLowerCase(), m[1] === '/', m[3], media);\n\t\tout += tag ?? escapeText(m[0]);\n\t}\n\treturn out + escapeText(raw.slice(at));\n}\n","import { Marked, type MarkedOptions, type Token, type Tokens } from 'marked';\nimport { isRefShorthand, parseGithubRefUrl } from '$shared/github-ref.js';\nimport { findFilePaths, parseFilePath, type FilePath } from './file-paths';\nimport { GITHUB_ALERTS, markAlerts, sanitizeGithubHtml, type AlertKind, type MediaHref } from './github-html';\n\nfunction escapeHtml(text: string): string {\n\treturn text\n\t\t.replaceAll('&', '&')\n\t\t.replaceAll('<', '<')\n\t\t.replaceAll('>', '>')\n\t\t.replaceAll('\"', '"');\n}\n\n/** Split every soft newline in a run of inline tokens into a hard break. */\nfunction hardBreak(tokens: Token[]): Token[] {\n\treturn tokens.flatMap((t): Token[] => {\n\t\tif (t.type === 'text' && !t.tokens && t.text.includes('\\n')) {\n\t\t\treturn t.text.split('\\n').flatMap((text: string, i: number): Token[] => [\n\t\t\t\t...(i > 0 ? [{ type: 'br', raw: '\\n' } as Token] : []),\n\t\t\t\t...(text ? [{ ...t, raw: text, text }] : [])\n\t\t\t]);\n\t\t}\n\t\tif ('tokens' in t && t.tokens && t.type !== 'codespan') t.tokens = hardBreak(t.tokens);\n\t\treturn [t];\n\t});\n}\n\n/** Paragraphs, including those quoted, get hard breaks; lists are left alone. */\nfunction breakParagraphs(tokens: Token[]): void {\n\tfor (const t of tokens) {\n\t\tif (t.type === 'paragraph') t.tokens = hardBreak(t.tokens ?? []);\n\t\telse if (t.type === 'blockquote') breakParagraphs(t.tokens ?? []);\n\t}\n}\n\n/** Where a file named in a message opens, given its path and line. */\nexport type FileHref = (path: string, line: number | null) => string;\n\nexport interface MarkdownOptions {\n\t/** Turns a file path into an `a.file-link` to wherever this says the file opens. */\n\tfiles?: FileHref;\n\t/** Marks links to GitHub pull requests and issues as `a.gh-ref`; with `bare`, a `#123` in plain text too. */\n\tgithub?: { bare?: boolean };\n\t/**\n\t * Render as GitHub renders a pull request or issue: its HTML kept to a safe\n\t * few tags (`<details>`, `<img>`, `<br>`…) with comments dropped, `> [!NOTE]`\n\t * alerts drawn as callouts, and each image's address passed through `media`.\n\t */\n\tgithubBody?: { media: MediaHref };\n}\n\n/** A file path found in a message: `text` is what was written, `code` whether in backticks. */\ntype FileLinkToken = Tokens.Generic &\n\tFilePath & { type: 'fileLink'; text: string; code: boolean; href: string };\n\n/**\n * A pull request or issue named in a message. A link to one carries its\n * repo and URL as `link` and, when the author wrote words of their own, those\n * as `tokens`; a bare `#123` carries only the number, and is no link until it\n * resolves.\n */\ntype GithubRefToken = Tokens.Generic & {\n\ttype: 'githubRef';\n\ttext: string;\n\tnumber: number;\n\tlink: { repo: string; href: string } | null;\n\ttokens?: Token[];\n};\n\n/** Something found in a run of plain text, with where it sits. */\ninterface TextHit {\n\tstart: number;\n\tend: number;\n}\n\n/** Cut `hits` out of one plain text token as tokens of their own, keeping the text between. */\nfunction splitText<H extends TextHit>(t: Tokens.Text, hits: H[], make: (text: string, hit: H) => Token): Token[] {\n\tif (hits.length === 0) return [t];\n\tconst out: Token[] = [];\n\tlet at = 0;\n\tconst text = (to: number) => {\n\t\tif (to > at) out.push({ ...t, raw: t.text.slice(at, to), text: t.text.slice(at, to) });\n\t};\n\tfor (const hit of hits) {\n\t\ttext(hit.start);\n\t\tout.push(make(t.text.slice(hit.start, hit.end), hit));\n\t\tat = hit.end;\n\t}\n\ttext(t.text.length);\n\treturn out;\n}\n\n/** What replaces an inline token, or null to leave it and look inside it. */\ntype Rewrite = (t: Token) => Token[] | null;\n\n/** Rewrite the inline tokens of a tree, down through lists and tables. Code blocks have none. */\nfunction rewriteInline(tokens: Token[], rewrite: Rewrite): Token[] {\n\treturn tokens.flatMap((t): Token[] => {\n\t\tconst swapped = rewrite(t);\n\t\tif (swapped) return swapped;\n\t\tif ('tokens' in t && t.tokens) t.tokens = rewriteInline(t.tokens, rewrite);\n\t\tif (t.type === 'list') for (const item of (t as Tokens.List).items) item.tokens = rewriteInline(item.tokens, rewrite);\n\t\tif (t.type === 'table') {\n\t\t\tconst table = t as Tokens.Table;\n\t\t\tfor (const cell of [...table.header, ...table.rows.flat()]) cell.tokens = rewriteInline(cell.tokens, rewrite);\n\t\t}\n\t\treturn [t];\n\t});\n}\n\n/**\n * A `#123` standing on its own: not an HTML entity, a URL's fragment or the\n * tail of a word. Five digits at most, which leaves a colour such as `#111827`\n * alone; a `#333` is told from an issue only by whether GitHub knows it.\n */\nconst BARE_REF = /(?<![\\w&#/])#([1-9]\\d{0,4})(?![\\w-])/g;\n\n/** Whether a token is plain text with nothing nested in it. */\nfunction isPlainText(t: Token): t is Tokens.Text {\n\treturn t.type === 'text' && !('tokens' in t && t.tokens);\n}\n\n/**\n * The rewrite one message's options ask for: a link to a pull request or\n * issue becomes a `githubRef`; an inline code span that is a path and nothing\n * else, and a path in plain text, a `fileLink`; a bare `#123`, a `githubRef`\n * with no `link`. Other links, images and code are left as they are.\n */\nfunction rewriteFor({ files, github }: MarkdownOptions): Rewrite {\n\tconst fileLink = (text: string, hit: FilePath, code: boolean): FileLinkToken => ({\n\t\ttype: 'fileLink',\n\t\traw: text,\n\t\ttext,\n\t\tcode,\n\t\tpath: hit.path,\n\t\tline: hit.line,\n\t\thref: files!(hit.path, hit.line)\n\t});\n\tconst bareRefs = (t: Token): Token[] => {\n\t\tif (!github?.bare || !isPlainText(t)) return [t];\n\t\tconst hits = [...t.text.matchAll(BARE_REF)].map((m) => ({\n\t\t\tstart: m.index,\n\t\t\tend: m.index + m[0].length,\n\t\t\tnumber: Number(m[1])\n\t\t}));\n\t\treturn splitText(\n\t\t\tt,\n\t\t\thits,\n\t\t\t(text, hit): GithubRefToken => ({ type: 'githubRef', raw: text, text, number: hit.number, link: null })\n\t\t);\n\t};\n\treturn (t) => {\n\t\tif (t.type === 'link') {\n\t\t\tconst link = t as Tokens.Link;\n\t\t\tconst target = github ? parseGithubRefUrl(link.href) : null;\n\t\t\tif (!target) return [t];\n\t\t\t// An autolink's text is its URL, and `#12` only names the target: neither is the author's words.\n\t\t\tconst named = link.text !== link.href && !isRefShorthand(link.text, target);\n\t\t\tconst ref: GithubRefToken = {\n\t\t\t\ttype: 'githubRef',\n\t\t\t\traw: link.raw,\n\t\t\t\ttext: link.text,\n\t\t\t\tnumber: target.number,\n\t\t\t\tlink: { repo: target.repo, href: link.href },\n\t\t\t\t...(named ? { tokens: link.tokens } : {})\n\t\t\t};\n\t\t\treturn [ref];\n\t\t}\n\t\tif (t.type === 'image') return [t];\n\t\tif (t.type === 'codespan') {\n\t\t\tconst hit = files ? parseFilePath(t.text) : null;\n\t\t\treturn [hit ? fileLink(t.text, hit, true) : t];\n\t\t}\n\t\tif (!isPlainText(t)) return null;\n\t\tif (!files) return bareRefs(t);\n\t\treturn splitText(t, findFilePaths(t.text), (text, hit) => fileLink(text, hit, false)).flatMap(bareRefs);\n\t};\n}\n\n// Raw HTML in model output is rendered as literal text, not injected.\n//\n// Line breaks follow the TUI, which prints a reply's lines as written: a\n// single newline inside a plain paragraph is a line break, so a reply that\n// lists numbers one per line reads one per line rather than \"1 2 3 … 80\".\n// The global `breaks` option would do that everywhere, and inside lists it\n// hard-breaks every continuation line and doubles their rhythm, so it stays\n// off and only paragraphs (top level or quoted) are rewritten. Lists, and\n// the lines that continue a list item, render as standard markdown.\nconst marked = new Marked({\n\tgfm: true,\n\tbreaks: false,\n\trenderer: {\n\t\thtml({ raw }) {\n\t\t\tconst body = (this.options as MarkdownOptions).githubBody;\n\t\t\treturn body ? sanitizeGithubHtml(raw, body.media) : escapeHtml(raw);\n\t\t},\n\t\timage({ href, title, text }) {\n\t\t\tconst body = (this.options as MarkdownOptions).githubBody;\n\t\t\tif (!body) return false;\n\t\t\tconst src = body.media(href);\n\t\t\tif (!src) return escapeHtml(text);\n\t\t\tconst titled = title ? ` title=\"${escapeHtml(title)}\"` : '';\n\t\t\treturn `<img src=\"${escapeHtml(src)}\" alt=\"${escapeHtml(text)}\"${titled} loading=\"lazy\">`;\n\t\t},\n\t\tlink({ href, title, tokens }) {\n\t\t\tif (!(this.options as MarkdownOptions).githubBody) return false;\n\t\t\tconst label = this.parser.parseInline(tokens);\n\t\t\t// Nothing in a body is the pane's own: every link leaves for a tab of its own.\n\t\t\tif (!/^https?:\\/\\//i.test(href)) return label;\n\t\t\tconst titled = title ? ` title=\"${escapeHtml(title)}\"` : '';\n\t\t\treturn `<a href=\"${escapeHtml(href)}\"${titled} target=\"_blank\" rel=\"noopener\">${label}</a>`;\n\t\t},\n\t\tblockquote(token) {\n\t\t\tconst alert = (token as Tokens.Blockquote & { alert?: AlertKind }).alert;\n\t\t\tif (!alert) return false;\n\t\t\tconst inner = this.parser.parse(token.tokens);\n\t\t\treturn `<div class=\"gh-alert gh-alert-${alert}\"><p class=\"gh-alert-title\">${GITHUB_ALERTS[alert]}</p>${inner}</div>\\n`;\n\t\t}\n\t},\n\textensions: [\n\t\t{\n\t\t\tname: 'fileLink',\n\t\t\trenderer(token) {\n\t\t\t\tconst { text, path, line, code, href } = token as FileLinkToken;\n\t\t\t\tconst label = code ? `<code>${escapeHtml(text)}</code>` : escapeHtml(text);\n\t\t\t\tconst at = line ? ` data-line=\"${line}\"` : '';\n\t\t\t\treturn `<a class=\"file-link\" href=\"${escapeHtml(href)}\" data-file=\"${escapeHtml(path)}\"${at}>${label}</a>`;\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\tname: 'githubRef',\n\t\t\trenderer(token) {\n\t\t\t\tconst { text, number, link, tokens } = token as GithubRefToken;\n\t\t\t\tif (!link) return `<a class=\"gh-ref\" data-number=\"${number}\">${escapeHtml(text)}</a>`;\n\t\t\t\tconst label = tokens ? this.parser.parseInline(tokens) : escapeHtml(text);\n\t\t\t\tconst attrs =\n\t\t\t\t\t`href=\"${escapeHtml(link.href)}\" target=\"_blank\" rel=\"noopener\" data-repo=\"${escapeHtml(link.repo)}\"` +\n\t\t\t\t\t` data-number=\"${number}\"${tokens ? ' data-words' : ''}`;\n\t\t\t\treturn `<a class=\"gh-ref\" ${attrs}>${label}</a>`;\n\t\t\t}\n\t\t}\n\t],\n\thooks: {\n\t\tprocessAllTokens(tokens) {\n\t\t\t// `renderMarkdown` passes its own options along with marked's.\n\t\t\tconst options = this.options as MarkdownOptions;\n\t\t\tif (options.githubBody) markAlerts(tokens);\n\t\t\tbreakParagraphs(tokens);\n\t\t\tif (!options.files && !options.github) return tokens;\n\t\t\treturn rewriteInline(tokens, rewriteFor(options));\n\t\t}\n\t}\n});\n\n/**\n * Render a message. With `files`, a file path in it (in backticks or in plain\n * text) becomes an `a.file-link` to wherever `files` says that file opens,\n * carrying the path and line as `data-file` and `data-line`. With `github`, a\n * link to a pull request or issue becomes an `a.gh-ref` carrying `data-repo`\n * and `data-number` (and `data-words` when its text is the author's own), for\n * the transcript to draw as a chip once GitHub has answered.\n */\nexport function renderMarkdown(text: string, options: MarkdownOptions = {}): string {\n\ttry {\n\t\treturn marked.parse(text, { async: false, ...options } as MarkedOptions & { async: false });\n\t} catch {\n\t\treturn `<pre>${escapeHtml(text)}</pre>`;\n\t}\n}\n","/**\n * A pull request or issue as the side panel's GitHub pane draws it, and the\n * reading of GitHub's GraphQL answer into that shape. Shared by the server,\n * which reads GitHub through `gh`, and the pane, which groups and words what\n * it is sent. Nothing here touches the network or the clock.\n */\n\nimport { isRepoSlug, parseRefNumber, type GithubRefKind, type GithubRefState } from './github-ref.js';\n\nexport interface GithubLabel {\n\tname: string;\n\t/** GitHub's colour for it, six hex digits with no `#`. */\n\tcolor: string;\n}\n\n/** A reviewer's latest word on a pull request. */\nexport type ReviewVerdict = 'approved' | 'changes_requested' | 'commented' | 'dismissed';\n\nexport interface GithubReview {\n\tauthor: string;\n\tverdict: ReviewVerdict;\n\tat: number | null;\n\t/** Given before the newest commit, so it may no longer hold. */\n\tstale: boolean;\n}\n\n/** Where a check stands, in the order the pane lists them: what wants attention first. */\nexport type CheckBucket = 'failing' | 'running' | 'passing';\n\nexport interface GithubCheck {\n\tname: string;\n\tbucket: CheckBucket;\n\t/** GitHub's own word for how it ended or where it is, lower case. */\n\tstatus: string;\n\turl: string | null;\n}\n\nexport interface GithubComment {\n\tid: string;\n\tauthor: string;\n\t/** Written by an app rather than a person. */\n\tbot: boolean;\n\tbody: string;\n\tat: number | null;\n\turl: string;\n}\n\nexport interface GithubPullFacts {\n\tbase: string;\n\thead: string;\n\tadditions: number;\n\tdeletions: number;\n\tfiles: number;\n\t/** One per reviewer, the latest. */\n\treviews: GithubReview[];\n\t/** Reviewers asked for and not yet heard from: logins, or team names. */\n\trequested: string[];\n\tchecks: GithubCheck[];\n}\n\nexport interface GithubItem {\n\trepo: string;\n\tnumber: number;\n\tkind: GithubRefKind;\n\ttitle: string;\n\tstate: GithubRefState;\n\turl: string;\n\tbody: string;\n\tauthor: string | null;\n\tcreated_at: number | null;\n\tupdated_at: number | null;\n\tlabels: GithubLabel[];\n\t/** Only for a pull request. */\n\tpull: GithubPullFacts | null;\n\t/** Newest last; null when the second read failed. */\n\tcomments: GithubComment[] | null;\n\t/** How many comments GitHub holds, which may be more than were read. */\n\tcomments_total: number;\n}\n\n/** Why there is no item to show: `gh` missing or logged out, no such item, or GitHub did not answer. */\nexport type GithubItemError = 'no-gh' | 'not-found' | 'failed';\n\n// ── GitHub's answer ──────────────────────────────────────────────────────\n\n/** Asked once per pane for the header, body and the pull request's facts. */\nexport const ITEM_QUERY = `query($owner:String!,$name:String!,$number:Int!){repository(owner:$owner,name:$name){issueOrPullRequest(number:$number){\n__typename\n... on Issue{number title url body state createdAt updatedAt author{login} labels(first:20){nodes{name color}}}\n... on PullRequest{number title url body state isDraft additions deletions changedFiles createdAt updatedAt headRefName baseRefName author{login} labels(first:20){nodes{name color}}\nlatestReviews(first:30){nodes{state submittedAt author{login}}}\nreviewRequests(first:20){nodes{requestedReviewer{__typename ... on User{login} ... on Bot{login} ... on Team{name} ... on Mannequin{login}}}}\ncommits(last:1){nodes{commit{committedDate statusCheckRollup{contexts(first:100){nodes{__typename ... on CheckRun{name status conclusion detailsUrl} ... on StatusContext{context state targetUrl}}}}}}}}\n}}}`;\n\n/** How many comments the second read takes, newest. */\nexport const COMMENTS_READ = 100;\n\n/** Asked beside `ITEM_QUERY`, in parallel: the conversation. */\nexport const COMMENTS_QUERY = `query($owner:String!,$name:String!,$number:Int!){repository(owner:$owner,name:$name){issueOrPullRequest(number:$number){\n... on Issue{comments(last:${COMMENTS_READ}){totalCount nodes{id body createdAt url isMinimized author{__typename login}}}}\n... on PullRequest{comments(last:${COMMENTS_READ}){totalCount nodes{id body createdAt url isMinimized author{__typename login}}}}\n}}}`;\n\ninterface RawActor {\n\t__typename?: string;\n\tlogin?: string;\n\tname?: string;\n}\n\ninterface RawContext {\n\t__typename?: string;\n\tname?: string;\n\tstatus?: string;\n\tconclusion?: string | null;\n\tdetailsUrl?: string | null;\n\tcontext?: string;\n\tstate?: string;\n\ttargetUrl?: string | null;\n}\n\n/** The slice of `issueOrPullRequest` that `ITEM_QUERY` asks for. */\nexport interface RawItem {\n\t__typename: 'Issue' | 'PullRequest';\n\tnumber: number;\n\ttitle: string;\n\turl: string;\n\tbody?: string | null;\n\tstate: string;\n\tisDraft?: boolean;\n\tadditions?: number;\n\tdeletions?: number;\n\tchangedFiles?: number;\n\tcreatedAt?: string | null;\n\tupdatedAt?: string | null;\n\theadRefName?: string;\n\tbaseRefName?: string;\n\tauthor?: RawActor | null;\n\tlabels?: { nodes?: (GithubLabel | null)[] } | null;\n\tlatestReviews?: { nodes?: ({ state: string; submittedAt?: string | null; author?: RawActor | null } | null)[] } | null;\n\treviewRequests?: { nodes?: ({ requestedReviewer?: RawActor | null } | null)[] } | null;\n\tcommits?: {\n\t\tnodes?: ({\n\t\t\tcommit?: { committedDate?: string | null; statusCheckRollup?: { contexts?: { nodes?: (RawContext | null)[] } } | null };\n\t\t} | null)[];\n\t} | null;\n}\n\nexport interface RawComment {\n\tid: string;\n\tbody?: string | null;\n\tcreatedAt?: string | null;\n\turl: string;\n\tisMinimized?: boolean;\n\tauthor?: RawActor | null;\n}\n\nexport interface RawComments {\n\tcomments?: { totalCount?: number; nodes?: (RawComment | null)[] } | null;\n}\n\nfunction time(text: string | null | undefined): number | null {\n\tif (!text) return null;\n\tconst at = Date.parse(text);\n\treturn Number.isNaN(at) ? null : at;\n}\n\nfunction present<T>(list: (T | null | undefined)[] | null | undefined): T[] {\n\treturn (list ?? []).filter((x): x is T => x != null);\n}\n\n/** GitHub names a deleted account nothing; it shows it as \"ghost\". */\nfunction login(actor: RawActor | null | undefined): string {\n\treturn actor?.login ?? actor?.name ?? 'ghost';\n}\n\n/** Whether an author is an app: GitHub says so, or its login ends `[bot]`. */\nexport function isBot(actor: RawActor | null | undefined): boolean {\n\treturn actor?.__typename === 'Bot' || /\\[bot\\]$/.test(actor?.login ?? '');\n}\n\nconst VERDICTS: Record<string, ReviewVerdict> = {\n\tAPPROVED: 'approved',\n\tCHANGES_REQUESTED: 'changes_requested',\n\tCOMMENTED: 'commented',\n\tDISMISSED: 'dismissed'\n};\n\nconst FAILING = new Set(['FAILURE', 'TIMED_OUT', 'CANCELLED', 'ACTION_REQUIRED', 'STARTUP_FAILURE', 'ERROR']);\n\n/** Where one check of the rollup stands. A check run still going has no conclusion yet. */\nexport function toCheck(raw: RawContext): GithubCheck | null {\n\tif (raw.__typename === 'CheckRun') {\n\t\tconst done = raw.status === 'COMPLETED';\n\t\tconst word = done ? (raw.conclusion ?? 'COMPLETED') : (raw.status ?? 'PENDING');\n\t\tconst bucket: CheckBucket = !done ? 'running' : FAILING.has(word) ? 'failing' : 'passing';\n\t\treturn { name: raw.name ?? 'check', bucket, status: word.toLowerCase().replaceAll('_', ' '), url: raw.detailsUrl ?? null };\n\t}\n\tif (raw.__typename === 'StatusContext') {\n\t\tconst word = raw.state ?? 'PENDING';\n\t\tconst bucket: CheckBucket = FAILING.has(word) ? 'failing' : word === 'SUCCESS' ? 'passing' : 'running';\n\t\treturn { name: raw.context ?? 'status', bucket, status: word.toLowerCase(), url: raw.targetUrl ?? null };\n\t}\n\treturn null;\n}\n\nfunction itemState(raw: RawItem): GithubRefState {\n\tif (raw.state === 'MERGED') return 'merged';\n\tif (raw.state === 'CLOSED') return 'closed';\n\treturn raw.isDraft ? 'draft' : 'open';\n}\n\nfunction toPull(raw: RawItem): GithubPullFacts {\n\tconst head = present(raw.commits?.nodes)[0]?.commit;\n\tconst headAt = time(head?.committedDate);\n\tconst reviews = present(raw.latestReviews?.nodes)\n\t\t.filter((r) => r.state in VERDICTS)\n\t\t.map((r): GithubReview => {\n\t\t\tconst at = time(r.submittedAt);\n\t\t\treturn { author: login(r.author), verdict: VERDICTS[r.state], at, stale: at !== null && headAt !== null && at < headAt };\n\t\t})\n\t\t// A dismissal takes the verdict back, so it says nothing about where the pull request stands.\n\t\t.filter((r) => r.verdict !== 'dismissed');\n\tconst reviewed = new Set(reviews.map((r) => r.author.toLowerCase()));\n\tconst requested = present(raw.reviewRequests?.nodes)\n\t\t.map((r) => (r.requestedReviewer ? login(r.requestedReviewer) : null))\n\t\t.filter((name): name is string => name !== null && !reviewed.has(name.toLowerCase()));\n\tconst checks = present(head?.statusCheckRollup?.contexts?.nodes)\n\t\t.map(toCheck)\n\t\t.filter((c): c is GithubCheck => c !== null);\n\treturn {\n\t\tbase: raw.baseRefName ?? '',\n\t\thead: raw.headRefName ?? '',\n\t\tadditions: raw.additions ?? 0,\n\t\tdeletions: raw.deletions ?? 0,\n\t\tfiles: raw.changedFiles ?? 0,\n\t\treviews,\n\t\trequested,\n\t\tchecks\n\t};\n}\n\nexport function toComments(raw: RawComments | null | undefined): { comments: GithubComment[]; total: number } | null {\n\tif (!raw?.comments) return null;\n\tconst comments = present(raw.comments.nodes)\n\t\t.filter((c) => !c.isMinimized)\n\t\t.map(\n\t\t\t(c): GithubComment => ({\n\t\t\t\tid: c.id,\n\t\t\t\tauthor: login(c.author),\n\t\t\t\tbot: isBot(c.author),\n\t\t\t\tbody: c.body ?? '',\n\t\t\t\tat: time(c.createdAt),\n\t\t\t\turl: c.url\n\t\t\t})\n\t\t);\n\treturn { comments, total: raw.comments.totalCount ?? comments.length };\n}\n\n/** GitHub's two answers as the pane draws them. */\nexport function toGithubItem(raw: RawItem, repo: string, comments: RawComments | null): GithubItem {\n\tconst conversation = toComments(comments);\n\treturn {\n\t\trepo,\n\t\tnumber: raw.number,\n\t\tkind: raw.__typename === 'PullRequest' ? 'pull' : 'issue',\n\t\ttitle: raw.title,\n\t\tstate: itemState(raw),\n\t\turl: raw.url,\n\t\tbody: raw.body ?? '',\n\t\tauthor: raw.author ? login(raw.author) : null,\n\t\tcreated_at: time(raw.createdAt),\n\t\tupdated_at: time(raw.updatedAt),\n\t\tlabels: present(raw.labels?.nodes),\n\t\tpull: raw.__typename === 'PullRequest' ? toPull(raw) : null,\n\t\tcomments: conversation?.comments ?? null,\n\t\tcomments_total: conversation?.total ?? 0\n\t};\n}\n\n// ── what the pane makes of it ────────────────────────────────────────────\n\n/** Whether nothing more can happen to it soon: merged, or closed. Cached longer. */\nexport function isSettled(item: Pick<GithubItem, 'state'>): boolean {\n\treturn item.state === 'merged' || item.state === 'closed';\n}\n\n/** Whether any check is still going; while one is, GitHub's ETag cannot tell the pane it finished. */\nexport function hasRunningChecks(item: Pick<GithubItem, 'pull'>): boolean {\n\treturn item.pull?.checks.some((c) => c.bucket === 'running') ?? false;\n}\n\n/** The checks in reading order: failing, then running, then passing. */\nexport function groupChecks(checks: GithubCheck[]): Record<CheckBucket, GithubCheck[]> {\n\tconst out: Record<CheckBucket, GithubCheck[]> = { failing: [], running: [], passing: [] };\n\tfor (const c of checks) out[c.bucket].push(c);\n\treturn out;\n}\n\n/** The checks in one line: \"7 of 16 running · 1 failed\", or \"All 12 passed\". */\nexport function describeChecks(checks: GithubCheck[]): string {\n\tif (checks.length === 0) return 'No checks';\n\tconst { failing, running, passing } = groupChecks(checks);\n\tif (failing.length === 0 && running.length === 0) {\n\t\treturn passing.length === 1 ? '1 passed' : `All ${passing.length} passed`;\n\t}\n\tconst parts: string[] = [];\n\tif (running.length) parts.push(`${running.length} of ${checks.length} running`);\n\tif (failing.length) parts.push(`${failing.length} failed`);\n\tif (!running.length) parts.push(`${passing.length} of ${checks.length} passed`);\n\treturn parts.join(' · ');\n}\n\n/**\n * A body with the HTML comments taken out, or '' when that leaves nothing:\n * review bots keep their bookkeeping in `<!-- -->` markers, which would\n * otherwise draw as an empty comment.\n */\nexport function visibleBody(body: string): string {\n\treturn body.replace(/<!--[\\s\\S]*?(?:-->|$)/g, '').trim() === '' ? '' : body;\n}\n\n/** The comments worth a row, and how many bots wrote apart from them. */\nexport function readableComments(comments: GithubComment[]): { people: GithubComment[]; bots: GithubComment[] } {\n\tconst said = comments.filter((c) => visibleBody(c.body) !== '');\n\treturn { people: said.filter((c) => !c.bot), bots: said.filter((c) => c.bot) };\n}\n\n/** A pull request or issue as the pane's `ref` param spells it: `owner/name#n`. */\nexport function refParam(repo: string, number: number): string {\n\treturn `${repo}#${number}`;\n}\n\n/** The pull request or issue a `ref` param names, or null for anything else. */\nexport function parseRefParam(text: string | null | undefined): { repo: string; number: number } | null {\n\tconst at = text?.lastIndexOf('#') ?? -1;\n\tif (!text || at < 0) return null;\n\tconst repo = text.slice(0, at);\n\tconst number = parseRefNumber(text.slice(at + 1));\n\treturn number !== null && isRepoSlug(repo) ? { repo, number } : null;\n}\n","/**\n * The browser's side of a GitHub chip: asking the server what a pull request\n * or issue is, once per reference and again when the answer has gone stale,\n * and drawing that answer into the `a.gh-ref` the markdown left in a message.\n */\n\nimport { githubRefVisual, parseRefNumber, type GithubRef } from '$shared/github-ref.js';\nimport { refParam } from '$shared/github-item.js';\n\n/** How long an answer stands here before the server is asked again. */\nconst TTL_MS = 60_000;\n/** An answer of nothing may only mean the server could not ask yet, so it stands for less. */\nconst NOTHING_TTL_MS = 10_000;\nconst MAX_ANSWERS = 300;\n\n/** What a chip asks about: a repo by name, or the repo of `session` for a bare `#n`. */\nexport interface GithubRefQuery {\n\t/** Where the machine that answers is reached: '' for this one, `/fleet/<id>` for another. */\n\tbase: string;\n\trepo: string | null;\n\tsession: string | null;\n\tnumber: number;\n}\n\nconst answers = new Map<string, { until: number; ref: Promise<GithubRef | null> }>();\n\nfunction githubRefKey(q: GithubRefQuery): string {\n\treturn q.repo ? `${q.base}|${q.repo.toLowerCase()}#${q.number}` : `${q.base}|@${q.session ?? ''}#${q.number}`;\n}\n\nasync function fetchRef(q: GithubRefQuery): Promise<GithubRef | null> {\n\tconst params = new URLSearchParams({ number: String(q.number) });\n\tif (q.repo) params.set('repo', q.repo);\n\telse if (q.session) params.set('session', q.session);\n\ttry {\n\t\tconst res = await fetch(`${q.base}/api/github/ref?${params}`);\n\t\tif (!res.ok) return null;\n\t\treturn ((await res.json()) as { ref: GithubRef | null }).ref ?? null;\n\t} catch {\n\t\treturn null;\n\t}\n}\n\n/** What GitHub says about a reference; null when it says nothing, which leaves the link plain. */\nexport function loadGithubRef(q: GithubRefQuery): Promise<GithubRef | null> {\n\tconst key = githubRefKey(q);\n\tconst have = answers.get(key);\n\tif (have && Date.now() < have.until) return have.ref;\n\tconst ref = fetchRef(q);\n\tconst entry = { until: Date.now() + TTL_MS, ref };\n\tanswers.delete(key);\n\tanswers.set(key, entry);\n\tif (answers.size > MAX_ANSWERS) answers.delete(answers.keys().next().value!);\n\tvoid ref.then((found) => {\n\t\tif (!found) entry.until = Date.now() + NOTHING_TTL_MS;\n\t});\n\treturn ref;\n}\n\n/**\n * The query a chip's attributes spell, or null for an element that is not\n * one. A bare `#n` is looked up in `repo` when the chips sit in one repo's\n * text, else in `session`'s.\n */\nexport function chipQuery(\n\ta: HTMLElement,\n\twhere: { base: string; session: string | null; repo?: string | null }\n): GithubRefQuery | null {\n\tconst number = parseRefNumber(a.dataset.number);\n\tif (number === null) return null;\n\tconst repo = a.dataset.repo ?? where.repo ?? null;\n\tif (!repo && !where.session) return null;\n\treturn { base: where.base, repo, session: repo ? null : where.session, number };\n}\n\n/** The pull request or issue a drawn chip names, as the GitHub pane's `ref` param spells it. */\nexport function chipRef(a: HTMLElement): string | null {\n\treturn a.dataset.ref ?? null;\n}\n\n/**\n * Draw an answer into a chip: the state's icon and colour, then `#n` and the\n * title, or the author's own words where the link had some. A bare `#n` in\n * prose gets the icon alone and becomes a link here, since only now is it\n * known to name anything. Drawing again with a newer answer updates in place.\n */\nexport function drawChip(a: HTMLAnchorElement, ref: GithubRef): void {\n\tconst visual = githubRefVisual(ref);\n\tconst bare = !a.dataset.repo;\n\tconst words = 'words' in a.dataset;\n\n\tif (!a.classList.contains('resolved')) {\n\t\tconst icon = document.createElement('iconify-icon');\n\t\ticon.className = 'gh-icon';\n\t\tif (words) {\n\t\t\ta.prepend(icon);\n\t\t} else {\n\t\t\tconst number = document.createElement('span');\n\t\t\tnumber.className = 'gh-num';\n\t\t\tnumber.textContent = `#${ref.number}`;\n\t\t\tconst title = document.createElement('span');\n\t\t\ttitle.className = 'gh-title';\n\t\t\ta.replaceChildren(icon, number, ...(bare ? [] : [title]));\n\t\t}\n\t\tif (bare) {\n\t\t\ta.href = ref.url;\n\t\t\ta.target = '_blank';\n\t\t\ta.rel = 'noopener';\n\t\t}\n\t\ta.classList.add('resolved');\n\t}\n\n\tconst icon = a.querySelector('.gh-icon');\n\ticon?.setAttribute('icon', visual.icon);\n\ticon?.setAttribute('aria-label', visual.label);\n\tconst title = a.querySelector('.gh-title');\n\tif (title) title.textContent = ref.title;\n\ta.dataset.state = ref.state;\n\ta.dataset.ref = refParam(ref.repo, ref.number);\n\ta.style.setProperty('--gh', visual.color);\n}\n","/**\n * The browser's side of the GitHub pane's reads: one pull request or issue\n * whole, kept here a minute so a second open (or the click after a chip's\n * hover card) paints at once, and the session's own defaults. Every read\n * goes to the session's machine (`base`), whose `gh` is the one that knows\n * its repos.\n */\n\nimport type { GithubItem, GithubItemError } from '$shared/github-item.js';\n\n/** How long an answer is drawn from here without asking again. */\nconst TTL_MS = 60_000;\nconst MAX_KEPT = 60;\n\nexport type GithubItemResult =\n\t| { item: GithubItem; stale: boolean; error?: undefined }\n\t| { item: null; stale?: undefined; error: GithubItemError | 'unreachable' };\n\ninterface Kept {\n\tat: number;\n\tresult: Promise<GithubItemResult>;\n\t/** The answer once it came, for a paint that cannot wait. */\n\tsettled: GithubItemResult | null;\n}\n\nconst kept = new Map<string, Kept>();\n\nfunction key(base: string, repo: string, number: number): string {\n\treturn `${base}|${repo.toLowerCase()}#${number}`;\n}\n\nasync function fetchItem(base: string, repo: string, number: number): Promise<GithubItemResult> {\n\ttry {\n\t\tconst params = new URLSearchParams({ repo, number: String(number) });\n\t\tconst res = await fetch(`${base}/api/github/item?${params}`);\n\t\tif (!res.ok) return { item: null, error: res.status === 404 ? 'not-found' : 'unreachable' };\n\t\treturn (await res.json()) as GithubItemResult;\n\t} catch {\n\t\treturn { item: null, error: 'unreachable' };\n\t}\n}\n\n/** The last answer for a pull request or issue, if one is here at all, however old. */\nexport function peekGithubItem(base: string, repo: string, number: number): GithubItemResult | null {\n\treturn kept.get(key(base, repo, number))?.settled ?? null;\n}\n\n/** A pull request or issue, from here while the answer is young, else from the server. */\nexport function loadGithubItem(base: string, repo: string, number: number, fresh = false): Promise<GithubItemResult> {\n\tconst k = key(base, repo, number);\n\tconst have = kept.get(k);\n\tif (have && !fresh && Date.now() - have.at < TTL_MS) return have.result;\n\tconst entry: Kept = { at: Date.now(), result: fetchItem(base, repo, number), settled: have?.settled ?? null };\n\tvoid entry.result.then((r) => {\n\t\t// A failure keeps the last good answer to paint, and is asked again next time.\n\t\tif (r.item || !entry.settled?.item) entry.settled = r;\n\t\tif (!r.item) entry.at = 0;\n\t});\n\tkept.delete(k);\n\tkept.set(k, entry);\n\tif (kept.size > MAX_KEPT) kept.delete(kept.keys().next().value!);\n\treturn entry.result;\n}\n\n/** What the pane shows for a session before anything is picked. */\nexport interface SessionGithub {\n\trepo: string | null;\n\tpull: number | null;\n\tissue: number | null;\n}\n\nexport async function loadSessionGithub(api: string): Promise<SessionGithub | null> {\n\ttry {\n\t\tconst res = await fetch(`${api}/github`);\n\t\treturn res.ok ? ((await res.json()) as SessionGithub) : null;\n\t} catch {\n\t\treturn null;\n\t}\n}\n\n/** GitHub's hosts that may hold a private repo's files; camo and the rest are public. */\nconst PROXIED = new Set([\n\t'github.com',\n\t'raw.githubusercontent.com',\n\t'user-images.githubusercontent.com',\n\t'private-user-images.githubusercontent.com',\n\t'media.githubusercontent.com',\n\t'objects.githubusercontent.com'\n]);\n\n/** Where a body's image is drawn from: GitHub's own files through the session's machine, others as written. */\nexport function mediaHref(base: string): (url: string) => string | null {\n\treturn (url) => {\n\t\tlet host: string;\n\t\ttry {\n\t\t\thost = new URL(url).hostname;\n\t\t} catch {\n\t\t\treturn null;\n\t\t}\n\t\treturn PROXIED.has(host) ? `${base}/api/github/media?${new URLSearchParams({ url })}` : url;\n\t};\n}\n","<script lang=\"ts\">\n\timport * as Popover from '$lib/components/ui/popover';\n\timport { githubRefVisual, type GithubRef } from '$shared/github-ref.js';\n\timport { formatAgo } from '$lib/format';\n\timport { chipQuery, chipRef, drawChip, loadGithubRef } from '$lib/github-refs';\n\timport { loadGithubItem } from '$lib/github-items';\n\n\t// The chips arrive as HTML inside rendered messages, so nothing here is a\n\t// component per link: one observer finds them under `root` as they are\n\t// drawn, asks GitHub about each when it scrolls into view, and one card\n\t// serves whichever chip is under the pointer.\n\tlet {\n\t\troot,\n\t\tsession = null,\n\t\trepo = null,\n\t\tbase = '',\n\t\tonOpen\n\t}: {\n\t\t/** The element whose messages hold the chips. */\n\t\troot: HTMLElement;\n\t\t/** The session whose repo a bare `#n` is looked up in; null where there is none. */\n\t\tsession?: string | null;\n\t\t/** The repo a bare `#n` names, where the chips sit in one repo's text; it wins over `session`. */\n\t\trepo?: string | null;\n\t\t/** Where the machine that reads GitHub is reached: '' for this one, `/fleet/<id>` for another. */\n\t\tbase?: string;\n\t\t/**\n\t\t * Opens a chip in the GitHub pane, given its `owner/name#n`. With it a\n\t\t * plain click or a tap opens the pane, and a hover warms the pane's read;\n\t\t * Ctrl/Cmd-click and a middle click still go to github.com.\n\t\t */\n\t\tonOpen?: (ref: string) => void;\n\t} = $props();\n\n\tconst OPEN_MS = 250;\n\tconst CLOSE_MS = 180;\n\t/** A link GitHub said nothing about is asked about once more, this long after. */\n\tconst RETRY_MS = 20_000;\n\n\tlet open = $state(false);\n\tlet anchor = $state<HTMLAnchorElement | null>(null);\n\tlet shown = $state<GithubRef | null>(null);\n\tlet now = $state(Date.now());\n\tlet timer: ReturnType<typeof setTimeout> | undefined;\n\t/** Whether the press now under way began on the chip whose card was already up. */\n\tlet pressedOpenChip = false;\n\t/** What made the last press. Safari's `click` does not say, so `pointerdown` is asked. */\n\tlet pressedWith = 'mouse';\n\t/** Counts every wish to show or hide the card, so an answer that arrives late can tell it is. */\n\tlet wish = 0;\n\n\tconst visual = $derived(shown && githubRefVisual(shown));\n\tconst ago = $derived(shown?.updated_at ? formatAgo(shown.updated_at, now) : '');\n\n\tconst RESOLVED = 'a.gh-ref.resolved';\n\n\tfunction chipAt(target: EventTarget | null, selector = 'a.gh-ref'): HTMLAnchorElement | null {\n\t\treturn target instanceof Element ? target.closest<HTMLAnchorElement>(selector) : null;\n\t}\n\n\t/** Ask about a chip and draw the answer into it; an answer of nothing leaves the link as written. */\n\tasync function resolve(a: HTMLAnchorElement): Promise<GithubRef | null> {\n\t\tconst query = chipQuery(a, { base, session, repo });\n\t\tif (!query) return null;\n\t\tconst ref = await loadGithubRef(query);\n\t\tif (ref && a.isConnected) drawChip(a, ref);\n\t\treturn ref;\n\t}\n\n\tasync function show(a: HTMLAnchorElement) {\n\t\tconst mine = ++wish;\n\t\tconst ref = await resolve(a);\n\t\t// The pointer may have left while GitHub was being asked.\n\t\tif (!ref || !a.isConnected || mine !== wish) return;\n\t\tshown = ref;\n\t\tanchor = a;\n\t\tnow = Date.now();\n\t\topen = true;\n\t\t// The click that may follow lands on a read already made.\n\t\tif (onOpen) void loadGithubItem(base, ref.repo, ref.number);\n\t}\n\n\tfunction later(ms: number, run: () => void) {\n\t\tclearTimeout(timer);\n\t\ttimer = setTimeout(run, ms);\n\t}\n\n\tfunction hide() {\n\t\twish++;\n\t\tlater(CLOSE_MS, () => (open = false));\n\t}\n\n\tfunction onPointerOver(e: PointerEvent) {\n\t\tif (e.pointerType !== 'mouse') return;\n\t\tconst a = chipAt(e.target, RESOLVED);\n\t\tif (!a) return;\n\t\tif (open && a === anchor) clearTimeout(timer);\n\t\telse later(OPEN_MS, () => void show(a));\n\t}\n\n\tfunction onPointerOut(e: PointerEvent) {\n\t\tif (e.pointerType !== 'mouse') return;\n\t\tconst a = chipAt(e.target);\n\t\tif (a && !(e.relatedTarget instanceof Node && a.contains(e.relatedTarget))) hide();\n\t}\n\n\tfunction onPointerDown(e: PointerEvent) {\n\t\tpressedOpenChip = open && chipAt(e.target) === anchor;\n\t\tpressedWith = e.pointerType;\n\t}\n\n\t// With the pane to open, a plain click or a tap on a chip opens it there; a\n\t// modified click is the browser's, which takes the link to github.com.\n\t// Without one, a finger has no hover, so a tap on a chip opens its card,\n\t// which holds the way through to GitHub; a second tap puts the card away.\n\t// A link GitHub said nothing about is not a chip, and a tap follows it as ever.\n\tfunction onClick(e: MouseEvent) {\n\t\tconst by = pressedWith;\n\t\t// A click from the keyboard has no press before it.\n\t\tpressedWith = 'mouse';\n\t\tconst a = chipAt(e.target, RESOLVED);\n\t\tconst ref = a && chipRef(a);\n\t\tif (onOpen && ref && !e.defaultPrevented && e.button === 0 && !(e.metaKey || e.ctrlKey || e.shiftKey || e.altKey)) {\n\t\t\te.preventDefault();\n\t\t\twish++;\n\t\t\tclearTimeout(timer);\n\t\t\topen = false;\n\t\t\tonOpen(ref);\n\t\t\treturn;\n\t\t}\n\t\tif (by === 'mouse' || !a) return;\n\t\te.preventDefault();\n\t\tif (pressedOpenChip) open = false;\n\t\telse void show(a);\n\t}\n\n\tfunction onFocusIn(e: FocusEvent) {\n\t\tconst a = chipAt(e.target, RESOLVED);\n\t\tif (a?.matches(':focus-visible')) void show(a);\n\t}\n\n\t$effect(() => {\n\t\tconst el = root;\n\t\tconst retried = new WeakSet<Element>();\n\t\tconst retries = new Set<ReturnType<typeof setTimeout>>();\n\t\tconst inView = new IntersectionObserver(\n\t\t\t(seen) => {\n\t\t\t\tfor (const entry of seen) {\n\t\t\t\t\tif (!entry.isIntersecting) continue;\n\t\t\t\t\tconst a = entry.target as HTMLAnchorElement;\n\t\t\t\t\tinView.unobserve(a);\n\t\t\t\t\tvoid resolve(a).then((ref) => {\n\t\t\t\t\t\t// Nothing may only mean the server had not learned the repo yet.\n\t\t\t\t\t\tif (ref || retried.has(a)) return;\n\t\t\t\t\t\tretried.add(a);\n\t\t\t\t\t\tretries.add(setTimeout(() => a.isConnected && inView.observe(a), RETRY_MS));\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t},\n\t\t\t{ rootMargin: '200px' }\n\t\t);\n\t\tconst watch = (node: Node) => {\n\t\t\tif (!(node instanceof Element)) return;\n\t\t\tif (node.matches('a.gh-ref')) inView.observe(node);\n\t\t\tfor (const a of node.querySelectorAll('a.gh-ref:not(.resolved)')) inView.observe(a);\n\t\t};\n\t\tconst drawn = new MutationObserver((changes) => {\n\t\t\tfor (const change of changes) {\n\t\t\t\t// What `drawChip` puts inside a chip holds no chip of its own.\n\t\t\t\tif ((change.target as Element).matches('a.gh-ref')) continue;\n\t\t\t\tchange.addedNodes.forEach(watch);\n\t\t\t}\n\t\t});\n\t\twatch(el);\n\t\tdrawn.observe(el, { childList: true, subtree: true });\n\n\t\tconst listening = new AbortController();\n\t\tconst { signal } = listening;\n\t\tel.addEventListener('pointerover', onPointerOver, { signal });\n\t\tel.addEventListener('pointerout', onPointerOut, { signal });\n\t\tel.addEventListener('pointerdown', onPointerDown, { signal });\n\t\tel.addEventListener('click', onClick, { signal });\n\t\tel.addEventListener('focusin', onFocusIn, { signal });\n\t\tel.addEventListener('focusout', hide, { signal });\n\t\treturn () => {\n\t\t\tclearTimeout(timer);\n\t\t\tretries.forEach(clearTimeout);\n\t\t\tinView.disconnect();\n\t\t\tdrawn.disconnect();\n\t\t\tlistening.abort();\n\t\t};\n\t});\n</script>\n\n<Popover.Root bind:open>\n\t{#if shown && visual}\n\t\t<Popover.Content\n\t\t\tclass=\"gh-card\"\n\t\t\tcustomAnchor={anchor}\n\t\t\tside=\"top\"\n\t\t\talign=\"start\"\n\t\t\tsideOffset={6}\n\t\t\ttrapFocus={false}\n\t\t\tonOpenAutoFocus={(e) => e.preventDefault()}\n\t\t\tonCloseAutoFocus={(e) => e.preventDefault()}\n\t\t\tonpointerenter={() => clearTimeout(timer)}\n\t\t\tonpointerleave={(e) => e.pointerType === 'mouse' && hide()}\n\t\t>\n\t\t\t<p class=\"gh-card-repo\">\n\t\t\t\t<iconify-icon icon=\"mdi:github\"></iconify-icon>\n\t\t\t\t{shown.repo}\n\t\t\t\t<span class=\"gh-card-num\">#{shown.number}</span>\n\t\t\t</p>\n\t\t\t<p class=\"gh-card-title\">{shown.title}</p>\n\t\t\t<p class=\"gh-card-meta\">\n\t\t\t\t<span class=\"gh-card-state\" style:--gh={visual.color}>\n\t\t\t\t\t<iconify-icon icon={visual.icon}></iconify-icon>\n\t\t\t\t\t{visual.label}\n\t\t\t\t</span>\n\t\t\t\t{#if shown.author}<span>{shown.author}</span>{/if}\n\t\t\t\t{#if ago}<span>{ago === 'now' ? 'updated just now' : `updated ${ago} ago`}</span>{/if}\n\t\t\t</p>\n\t\t\t<a class=\"gh-card-open\" href={shown.url} target=\"_blank\" rel=\"noopener\">\n\t\t\t\tOpen on GitHub\n\t\t\t\t<iconify-icon icon=\"mdi:open-in-new\"></iconify-icon>\n\t\t\t</a>\n\t\t</Popover.Content>\n\t{/if}\n</Popover.Root>\n","<script lang=\"ts\" module>\n\timport { type VariantProps, tv } from \"tailwind-variants\";\n\n\texport const badgeVariants = tv({\n\t\tbase: \"focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] [&>svg]:pointer-events-none [&>svg]:size-3\",\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tdefault:\n\t\t\t\t\t\"bg-primary text-primary-foreground [a&]:hover:bg-primary/90 border-transparent\",\n\t\t\t\tsecondary:\n\t\t\t\t\t\"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90 border-transparent\",\n\t\t\t\tdestructive:\n\t\t\t\t\t\"bg-destructive [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/70 border-transparent text-white\",\n\t\t\t\toutline: \"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tvariant: \"default\",\n\t\t},\n\t});\n\n\texport type BadgeVariant = VariantProps<typeof badgeVariants>[\"variant\"];\n</script>\n\n<script lang=\"ts\">\n\timport type { HTMLAnchorAttributes } from \"svelte/elements\";\n\timport { cn, type WithElementRef } from \"$lib/utils.js\";\n\n\tlet {\n\t\tref = $bindable(null),\n\t\thref,\n\t\tclass: className,\n\t\tvariant = \"default\",\n\t\tchildren,\n\t\t...restProps\n\t}: WithElementRef<HTMLAnchorAttributes> & {\n\t\tvariant?: BadgeVariant;\n\t} = $props();\n</script>\n\n<svelte:element\n\tthis={href ? \"a\" : \"span\"}\n\tbind:this={ref}\n\tdata-slot=\"badge\"\n\t{href}\n\tclass={cn(badgeVariants({ variant }), className)}\n\t{...restProps}\n>\n\t{@render children?.()}\n</svelte:element>\n"],"names":["NAN","key","node","get_key","render_fn","hydrating","hydrate_next","branches","BranchManager","legacy","is_runes","block","html","get_value","is_controlled","svg","mathml","skip_warning","anchor","value","parent_node","set_hydrate_node","get_first_child","template_effect","effect","active_effect","assign_nodes","remove_effect_dom","hydrate_node","next","last","COMMENT_NODE","get_next_sibling","w.hydration_mismatch","HYDRATION_ERROR","ns","NAMESPACE_SVG","NAMESPACE_MATHML","wrapper","create_element","action","dom","payload","untrack","inited","prev","render_effect","deep_read_state","safe_not_equal","bind_value","input","get","set","batches","listen_to_event_and_reset_event","is_reset","is_numberlike_input","to_number","current_batch","tick","start","end","length","new_length","batch","type","getStores","stores","browser_stores","page","fn","DRAWER_MEDIA_QUERY","DrawerStore","$.state","drawer","size","$.prop","$$props","title","visual","$.derived","sessionStateVisual","px","label","$.get","phase","iconify_icon","root","$.template_effect","$.set_custom_element_data","$.set_style","span","root_1","classes","$.set_attribute","$.append","$$anchor","$$render","consequent","alternate","MOVE_TOLERANCE_PX","longPress","options","opts","timer","triggered","originX","originY","clear","x","y","release","held","moved","onMouseDown","e","onMouseMove","onTouchStart","t","onTouchMove","onTouchEnd","onClickCapture","onTouchCancel","onDragStart","SvelteMap","#sources","#version","state","#size","#update_version","update_version","v","#source","source","sources","s","callbackfn","this_arg","#read_all","callbackFn","prev_res","res","version","increment","v_reactions","needs_version_increase","r","isFunction","ElementSize","#observed","#options","#node","#window","#width","#subscribe","#height","node$","createSubscriber","update","observer","entries","entry","boxSize","boxSizeArr","acc","defaultWindow","element","offsetWidth","offsetHeight","style","paddingWidth","paddingHeight","borderWidth","borderHeight","contentWidth","contentHeight","onDestroyEffect","$.user_effect","afterTick","ELEMENT_NODE","DOCUMENT_NODE","DOCUMENT_FRAGMENT_NODE","isHTMLElement","isObject","isDocument","isWindow","isNode","isShadowRoot","contains","parent","child","rootNode","getDocument","getWindow","getActiveElement","activeElement","el","DOMContext","#root","boxWith","id","selector","callback","delay","timeoutId","AnimationsComplete","#opts","#currentFrame","#observer","#runId","#cleanup","runId","executeIfCurrent","#executeCallback","waitForAnimations","animations","animation","requestWaitForAnimations","startingStyleAttr","execute","PresenceManager","#enabled","#afterAnimations","#shouldRender","#transitionStatus","#hasMounted","#transitionFrame","$.set","#clearTransitionFrame","watch","isOpen","noop","BitsConfigContext","Context","getBitsConfig","fallback","BitsConfigState","resolveConfigOption","createConfigResolver","config","currentOpts","getter","createPropResolver","configOption","getProp","propValue","option","resolvePortalToProp","to","context","getAllContexts","target","getTarget","isBrowser","localTarget","instance","unmountInstance","unmount","disabled","mount","PortalConsumer","debounce","wait","timeout","pendingArgs","debounced","args","isOrContainsTarget","getOwnerDocument","getFirstNonCommentChild","isClickTrulyOutside","event","contentNode","clientX","clientY","rect","CONTEXT_MENU_TRIGGER_ATTR","CONTEXT_MENU_CONTENT_ATTR","DismissibleLayerState","#interactOutsideProp","#behaviorType","#interceptedEvents","#isResponsibleLayer","#capturedPointerDown","#isFocusInsideDOMTree","#documentObj","#onFocusOutside","#unsubClickListener","#destroyed","unsubEvents","registeredNode","cleanup","#resetState","#handleInteractOutside","enabled","nextNode","#addEventListeners","#handleFocus","#isTargetWithinLayer","document","onPointerDownCapture","#markInterceptedEvent","#markResponsibleLayer","onPointerDown","#markNonInterceptedEvent","#interactOutside","executeCallbacks","on","#handleDismiss","createWrappedEvent","isEventValid","isValidEvent","#isAnyEventIntercepted","backup","unsubClick","dismiss","isResponsibleLayer","eventType","#onfocuscapture","#onblurcapture","getTopMostDismissableLayer","layersArr","_","behaviorType","topMostLayer","firstLayerNode","isElementOrSVGElement","targetIsContextMenuTrigger","nodeIsContextMenu","capturedCurrentTarget","capturedTarget","newEvent","isPrevented","prop","interactOutsideBehavior","onInteractOutside","onFocusOutside","dismissibleLayerState","$.snippet","$.noop","EscapeLayerState","#addEventListener","#onkeydown","kbd.ESCAPE","isResponsibleEscapeLayer","clonedEvent","escapeKeydownBehavior","onEscapeKeydown","FocusScopeManager","#scopeStack","simpleBox","#focusHistory","#preFocusHistory","scope","current","candidateSelectors","candidateSelector","NoElement","matches","getRootNode","_isInert","lookUp","inertAtt","inert","result","isContentEditable","_node$getAttribute","attValue","getCandidates","includeContainer","filter","candidates","_getCandidatesIteratively","elements","elementsToCheck","assigned","content","nestedCandidates","validCandidate","shadowRoot","validShadowRoot","_nestedCandidates","hasTabIndex","getTabIndex","getSortOrderTabIndex","isScope","tabIndex","sortOrderedTabbables","a","b","isInput","isHiddenInput","isDetailsWithSummary","getCheckedRadio","nodes","form","i","isTabbableRadio","radioScope","queryRadios","name","radioSet","err","checked","isRadio","isNonTabbableRadio","isNodeAttached","_nodeRoot","nodeRoot","nodeRootHost","attached","_nodeRootHost","_node$ownerDocument","_nodeRoot2","_nodeRootHost2","isZeroArea","_node$getBoundingClie","width","height","isHidden","_ref","displayCheck","getShadowRoot","visible","_getComputedStyle","visibility","isDirectSummary","nodeUnderDetails","originalNode","parentElement","isDisabledFromFieldset","parentNode","isNodeMatchingSelectorFocusable","isNodeMatchingSelectorTabbable","isShadowRootTabbable","shadowHostNode","_sortByOrder","regularTabbables","orderedTabbables","item","candidateTabindex","sortable","tabbable","container","focusable","isTabbable","focusableCandidateSelector","isFocusable","retargetToScopeTree","scopeRoot","FocusScope","#paused","#container","#manager","#cleanupFns","#setupEventListeners","#handleOpenAutoFocus","#handleCloseAutoFocus","firstTabbable","#getFirstTabbable","preFocusedElement","doc","handleFocus","lastFocused","firstFocusable","#getAllFocusables","handleKeydown","tabbables","#getTabbables","first","elementToFocus","ref","trapFocus","loop","onCloseAutoFocus","onOpenAutoFocus","focusScopeState","noopPointer","TextSelectionLayerState","#unsubSelectionLock","#enabledSnapshot","#onPointerDownSnapshot","#onPointerUpSnapshot","onPointerUp","#resetSelectionLock","#pointerdown","#pointerup","isHighestLayer","preventTextSelectionOverflow","getUserSelect","body","originalBodyUserSelect","originalNodeUserSelect","setUserSelect","highestLayer","preventOverflowTextSelection","useId","prefix","SharedState","#factory","#subscribers","#state","#scope","factory","#dispose","$.effect_root","lockMap","MANAGED_PROPERTIES","initialProperties","hadInitialStyleAttribute","modifiedProperties","stopTouchMoveListener","cleanupTimeoutId","isInCleanupTransition","setManagedProperty","property","anyLocked","cleanupScheduledAt","bodyLockStackCount","restoreProperty","documentObj","initial","resetBodyStyle","isIOS","restorePointerEvents","cancelPendingCleanup","scheduleCleanupIfNoNewLocks","currentCleanupId","cleanupFn","isAnyLocked","actualDelay","ensureInitialStyleCaptured","htmlStyle","bodyStyle","hasStableGutter","verticalScrollbarWidth","BodyScrollLock","#id","#initialState","#restoreScrollDelay","#countState","initialState","restoreScrollDelay","map","preventScroll","FloatingRootContext","FloatingTooltipRootContext","FloatingRootState","tooltip","FloatingAnchorState","boxFrom","valueOrGetValue","getDPR","roundByDPR","dpr","getFloatingContentCSSVars","sides","min","max","round","floor","createCoords","oppositeSideMap","clamp","evaluate","param","getSide","placement","getAlignment","getOppositeAxis","axis","getAxisLength","getSideAxis","firstChar","getAlignmentAxis","getAlignmentSides","rects","rtl","alignment","alignmentAxis","mainAlignmentSide","getOppositePlacement","getExpandedPlacements","oppositePlacement","getOppositeAlignmentPlacement","lrPlacement","rlPlacement","tbPlacement","btPlacement","getSideList","side","isStart","getOppositeAxisPlacements","flipAlignment","direction","list","expandPaddingObject","padding","_padding$top","_padding$right","_padding$bottom","_padding$left","getPaddingObject","rectToClientRect","computeCoordsFromPlacement","reference","floating","sideAxis","alignLength","isVertical","commonX","commonY","commonAlign","coords","detectOverflow","_await$platform$isEle","platform","strategy","boundary","rootBoundary","elementContext","altBoundary","paddingObject","clippingClientRect","offsetParent","offsetScale","elementClientRect","MAX_RESET_COUNT","computePosition","middleware","platformWithDetectOverflow","statefulPlacement","resetCount","middlewareData","currentMiddleware","nextX","nextY","data","reset","arrow","arrowDimensions","isYAxis","minProp","maxProp","clientProp","endDiff","startDiff","arrowOffsetParent","clientSize","centerToReference","largestPossiblePadding","minPadding","maxPadding","center","offset","shouldAddOffset","alignmentOffset","flip","_middlewareData$arrow","_middlewareData$flip","initialPlacement","checkMainAxis","checkCrossAxis","specifiedFallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","detectOverflowOptions","initialSideAxis","isBasePlacement","fallbackPlacements","hasFallbackAxisSideDirection","placements","overflow","overflows","overflowsData","_middlewareData$flip2","_overflowsData$filter","nextIndex","nextPlacement","d","resetPlacement","_overflowsData$filter2","currentSideAxis","getSideOffsets","isAnySideFullyClipped","hide","offsets","originSides","convertValueToCoords","mainAxisMulti","crossAxisMulti","rawValue","mainAxis","crossAxis","_middlewareData$offse","diffCoords","shift","limiter","mainAxisCoord","crossAxisCoord","clampCoord","coord","limitedCoords","limitShift","_rawOffset$mainAxis","_rawOffset$crossAxis","rawOffset","computedOffset","len","limitMin","limitMax","_middlewareData$offse2","isOriginSide","apply","heightSide","widthSide","maximumClippingHeight","maximumClippingWidth","overflowAvailableHeight","overflowAvailableWidth","shiftData","noShift","availableHeight","availableWidth","nextDimensions","hasWindow","getNodeName","getDocumentElement","isElement","isOverflowElement","overflowX","overflowY","display","getComputedStyle","isTableElement","isTopLayer","willChangeRe","containRe","isNotNone","isWebKitValue","isContainingBlock","elementOrCss","css","isWebKit","getContainingBlock","currentNode","getParentNode","isLastTraversableNode","getNodeScroll","getNearestOverflowAncestor","getOverflowAncestors","traverseIframes","_node$ownerDocument2","scrollableAncestor","isBody","win","frameElement","getFrameElement","getCssDimensions","getComputedStyle$1","hasOffset","shouldFallback","unwrapElement","getScale","domElement","$","noOffsets","getVisualOffsets","shouldAddVisualOffsets","isFixed","floatingOffsetParent","getBoundingClientRect","includeScale","isFixedStrategy","clientRect","scale","visualOffsets","offsetWin","currentWin","currentIFrame","iframeScale","iframeRect","left","top","getWindowScrollBarX","leftScroll","getHTMLOffset","documentElement","scroll","htmlRect","convertOffsetParentRelativeRectToViewportRelativeRect","topLayer","isOffsetParentAnElement","offsetRect","htmlOffset","getClientRects","getDocumentRect","SCROLLBAR_MAX","getViewportRect","isLayoutViewport","visualViewport","layoutRelativeClientCoords","bodyStyles","bodyMarginInline","reservedWidth","gutter","getInnerBoundingClientRect","getClientRectFromClippingAncestor","clippingAncestor","getClippingElementAncestors","cache","cachedResult","lastKeptComputedStyle","elementIsFixed","computedStyle","currentNodeIsContaining","lastPosition","ancestor","getClippingRect","clippingAncestors","firstRect","right","bottom","getDimensions","getRectRelativeToOffsetParent","isStaticPositioned","getTrueOffsetParent","polyfill","rawOffsetParent","getOffsetParent","svgOffsetParent","getElementRects","getOffsetParentFn","getDimensionsFn","floatingDimensions","isRTL","rectsAreEqual","observeMove","onMove","ancestorResize","io","_io","refresh","skip","threshold","elementRectForRootMargin","insetTop","insetRight","insetBottom","insetLeft","isFirstUpdate","handleObserve","ratio","handleResize","autoUpdate","ancestorScroll","elementResize","layoutShift","animationFrame","referenceEl","ancestors","cleanupIo","reobserveFrame","resizeObserver","firstEntry","_resizeObserver","frameId","prevRefRect","frameLoop","nextRefRect","_resizeObserver2","offset$1","shift$1","flip$1","size$1","hide$1","arrow$1","limitShift$1","mergedOptions","platformWithCache","computePosition$1","useFloating","whileElementsMountedOption","openOption","middlewareOption","transformOption","placementOption","strategyOption","sideOffsetOption","alignOffsetOption","$.proxy","isPositioned","hasWhileMountedPosition","updateRequestId","destroyed","floatingStyles","xVal","yVal","whileElementsMountedCleanup","referenceNode","floatingNode","requestId","position","isReferenceHidden","maxExpectedOffset","attach","trackWhileMountedDeps","OPPOSITE_SIDE","FloatingContentContext","FloatingContentState","attachRef","#transformedStyle","cssToStyleObj","#updatePositionStrategy","#arrowSize","#arrowWidth","#arrowHeight","#desiredPlacement","#boundary","#hasExplicitBoundaries","#detectOverflowOptions","isNotNull","#availableWidth","#availableHeight","#anchorWidth","#anchorHeight","anchorWidth","anchorHeight","transformOrigin","#placedSide","getSideFromPlacement","#placedAlign","getAlignFromPlacement","#arrowBaseSide","#wrapperProps","#props","styleToString","customAnchor","rafId","zIndex","FloatingArrowState","isArrowHidden","arrowWidth","arrowHeight","placedSide","placedAlign","getSideAndAlignFromPlacement","noArrowAlign","arrowXCenter","arrowYCenter","align","sideOffset","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","hideWhenDetached","onPlaced","sticky","updatePositionStrategy","dir","wrapperId","contentState","mergedProps","mergeProps","onMount","isStatic","restProps","$.rest_props","rest_excludes","FloatingLayerContentStatic","FloatingLayerContent","$.spread_props","contentPointerEvents","resolvedPreventScroll","effectiveStrategy","PopperContent","$$arg0","floatingProps","wrapperProps","ScrollLock","consequent_1","node_1","focusScopeProps","EscapeLayer","DismissibleLayer","dismissibleProps","TextSelectionLayer","$0","PopperLayerInner","isPointInPolygon","point","polygon","isInside","j","xi","yi","xj","yj","isInsideRect","triggerRect","contentRect","triggerCenterX","triggerCenterY","contentCenterX","contentCenterY","deltaX","deltaY","SafePolygon","#buffer","#transitIntentTimeout","#exitPoint","#exitTarget","#transitTargets","#trackedTriggerNode","#leaveFallbackRafId","#transitIntentTimeoutId","#cancelLeaveFallback","#scheduleLeaveFallback","#clearTracking","#cancelTransitIntentTimeout","#scheduleTransitIntentTimeout","transitIntentTimeout","triggerNode","handlePointerMove","#onPointerMove","handleTriggerLeave","ignoredTargets","n","handleTriggerEnter","handleContentEnter","handleContentLeave","clientPoint","transitTarget","transitRect","transitSide","transitCorridor","#getCorridorPolygon","corridorPoly","targetRect","safePoly","#getSafePolygon","buffer","exitPoint","exitTarget","#flipSide","popoverAttrs","createBitsAttrs","PopoverRootContext","PopoverRootState","#closeTimeout","#domContext","#clearCloseTimeout","ctx","PopoverTriggerState","#openTimeout","#isHovering","#clearOpenTimeout","#clearAllTimeouts","isTouch","kbd.ENTER","kbd.SPACE","#getAriaControls","boolToStr","getDataOpenClosed","PopoverContentState","closestTrigger","#snippetProps","getDataTransitionAttrs","uid","$.props_id","createId","forceMount","effectiveTrapFocus","handleOpenAutoFocus","PopperLayerForceMount","props","finalProps","div","$.attribute_effect","div_1","node_3","$.child","$.reset","PopperLayer","div_2","div_3","node_6","consequent_3","open","onOpenChange","onOpenChangeComplete","FloatingLayer","sumCounts","files","additions","deletions","f","GENERATED","isGenerated","path","re","statusLetter","displayPath","base","HUNK_HEADER","diffRows","hunks","rows","nextOld","nextNew","readable","hunk","m","oldLine","newLine","oldCount","newCount","line","sign","text","languageFor","ext","LANGUAGES","placeTurnChanges","items","turns","prompts","byPrompt","placed","PopoverPrimitive_Root","$$value","PopoverPrimitive_Portal","PopoverPortal","cn","PopoverPrimitive_Content","dataSlot","$.bind_value","shikiLanguage","DOTFILES","isMarkdown","baseName","parentOf","parts","fuzzyScore","query","q","p","best","score","scoreFrom","nameStart","at","run","ch","fuzzyFilter","paths","limit","scored","FILE_TOOLS","firstChangedLine","l","toolFileTarget","ee","B","I","c","T","Me","K","Ce","Ee","Ie","U","Be","ne","me","xe","De","qe","se","Ze","ve","ie","He","be","Ge","Ne","Qe","oe","ke","je","Fe","Ue","Ke","Re","We","H","W","Xe","Ve","Te","Je","Ye","et","Oe","tt","nt","rt","st","we","it","ot","lt","ut","pt","ct","ht","dt","kt","gt","ft","mt","xt","bt","Pe","Y","Rt","Tt","Ot","ge","wt","Pt","fe","yt","St","ae","_t","te","$t","X","G","Lt","ye","P","Se","le","ue","u","z","pe","N","ce","V","_e","h","g","At","$e","o","k","S","R","C","Q","E","F","Le","Ae","he","Z","de","ze","O","L","M","w","A","D","J","zt","OWNER","NAME","SLUG","REF_URL","isRepoSlug","slug","parseRefNumber","parseGithubRefUrl","href","isRefShorthand","PULL","ISSUE_OPEN","ISSUE_CLOSED","githubRefVisual","LINE","LINE_SUFFIX","PATH_CHARS","EXTENSIONS","BARE_NAMES","DOTFILE","HOST","namesFile","parseFilePath","needDirectory","suffix","inDirectory","IN_PROSE","findFilePaths","found","candidate","hit","GITHUB_ALERTS","ALERT_MARK","markAlerts","tokens","quote","para","lead","mark","rest","ALLOWED","VOID","escapeText","decodeAttr","escapeAttr","isWebUrl","url","ATTR","rebuildTag","closing","attrs","media","allowed","kept","attr","src","PIECE","sanitizeGithubHtml","raw","out","tag","escapeHtml","hardBreak","breakParagraphs","splitText","hits","make","rewriteInline","rewrite","swapped","table","cell","BARE_REF","isPlainText","rewriteFor","github","fileLink","code","bareRefs","link","named","marked","Marked","titled","token","alert","inner","number","renderMarkdown","groupChecks","checks","describeChecks","failing","running","passing","visibleBody","readableComments","comments","said","refParam","repo","parseRefParam","TTL_MS","NOTHING_TTL_MS","MAX_ANSWERS","answers","githubRefKey","fetchRef","params","loadGithubRef","have","chipQuery","where","chipRef","drawChip","bare","words","icon","MAX_KEPT","fetchItem","peekGithubItem","loadGithubItem","fresh","loadSessionGithub","api","PROXIED","mediaHref","host","session","OPEN_MS","CLOSE_MS","RETRY_MS","shown","now","pressedOpenChip","pressedWith","wish","ago","formatAgo","RESOLVED","chipAt","resolve","show","mine","later","ms","onPointerOver","onPointerOut","onClick","by","onFocusIn","retried","retries","inView","seen","drawn","changes","change","listening","signal","Popover_Root","Popover_Content","$.first_child","fragment_3","$.sibling","p_1","text_2","$.only_child","p_2","span_1","iconify_icon_1","text_3","node_4","span_2","text_4","$.set_text","span_3","text_5","a_1","iconify_icon_2","text_1","styles","consequent_2","badgeVariants","tv","variant","$$element","$.bind_this"],"mappings":"0/BAMA,MAAMA,GAAM,OAAO,KAAK,EASjB,SAASC,GAAIC,EAAMC,EAASC,EAAW,CACzCC,IACHC,GAAY,EAGb,IAAIC,EAAW,IAAIC,GAAcN,CAAI,EAEjCO,EAAS,CAACC,GAAQ,EAEtBC,GAAM,IAAM,CACX,IAAIV,EAAME,EAAO,EAGbF,IAAQA,IACXA,EAA0BD,IAIvBS,GAAUR,IAAQ,MAAQ,OAAOA,GAAQ,WAC5CA,EAAwB,CAAA,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