@chrisjowen/wheelhouse 0.22.7 → 0.22.8
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/build/client/_app/immutable/assets/0.Dqz7kCRB.css +1 -0
- package/build/client/_app/immutable/assets/0.Dqz7kCRB.css.br +0 -0
- package/build/client/_app/immutable/assets/0.Dqz7kCRB.css.gz +0 -0
- package/build/client/_app/immutable/chunks/1THDSnwR.js +1 -0
- package/build/client/_app/immutable/chunks/1THDSnwR.js.br +0 -0
- package/build/client/_app/immutable/chunks/1THDSnwR.js.gz +0 -0
- package/build/client/_app/immutable/chunks/5qx-E5hQ.js +3 -0
- package/build/client/_app/immutable/chunks/5qx-E5hQ.js.br +0 -0
- package/build/client/_app/immutable/chunks/5qx-E5hQ.js.gz +0 -0
- package/build/client/_app/immutable/chunks/8cFWsiL5.js +3 -0
- package/build/client/_app/immutable/chunks/8cFWsiL5.js.br +0 -0
- package/build/client/_app/immutable/chunks/8cFWsiL5.js.gz +0 -0
- package/build/client/_app/immutable/chunks/B95vDHb4.js +2 -0
- package/build/client/_app/immutable/chunks/B95vDHb4.js.br +0 -0
- package/build/client/_app/immutable/chunks/B95vDHb4.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BFj9uA7a.js +1 -0
- package/build/client/_app/immutable/chunks/BFj9uA7a.js.br +0 -0
- package/build/client/_app/immutable/chunks/BFj9uA7a.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BNnzQGRQ.js +1 -0
- package/build/client/_app/immutable/chunks/BNnzQGRQ.js.br +0 -0
- package/build/client/_app/immutable/chunks/BNnzQGRQ.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Bo0GBU1d.js +1 -0
- package/build/client/_app/immutable/chunks/Bo0GBU1d.js.br +0 -0
- package/build/client/_app/immutable/chunks/Bo0GBU1d.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BoLe_IyD.js +1 -0
- package/build/client/_app/immutable/chunks/BoLe_IyD.js.br +0 -0
- package/build/client/_app/immutable/chunks/BoLe_IyD.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BqeJFOiq.js +2 -0
- package/build/client/_app/immutable/chunks/BqeJFOiq.js.br +0 -0
- package/build/client/_app/immutable/chunks/BqeJFOiq.js.gz +0 -0
- package/build/client/_app/immutable/chunks/C303vUt4.js +1 -0
- package/build/client/_app/immutable/chunks/C303vUt4.js.br +0 -0
- package/build/client/_app/immutable/chunks/C303vUt4.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CC2m5e3H.js +3 -0
- package/build/client/_app/immutable/chunks/CC2m5e3H.js.br +0 -0
- package/build/client/_app/immutable/chunks/CC2m5e3H.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CHLlDrXz.js +1 -0
- package/build/client/_app/immutable/chunks/CHLlDrXz.js.br +0 -0
- package/build/client/_app/immutable/chunks/CHLlDrXz.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CJh-lXlR.js +1 -0
- package/build/client/_app/immutable/chunks/CJh-lXlR.js.br +0 -0
- package/build/client/_app/immutable/chunks/CJh-lXlR.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CPV8trsz.js +1 -0
- package/build/client/_app/immutable/chunks/CPV8trsz.js.br +0 -0
- package/build/client/_app/immutable/chunks/CPV8trsz.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CQ0zKnku.js +1 -0
- package/build/client/_app/immutable/chunks/CQ0zKnku.js.br +0 -0
- package/build/client/_app/immutable/chunks/CQ0zKnku.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Cva9VpVb.js +7 -0
- package/build/client/_app/immutable/chunks/Cva9VpVb.js.br +0 -0
- package/build/client/_app/immutable/chunks/Cva9VpVb.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CxHJSJSb.js +1 -0
- package/build/client/_app/immutable/chunks/CxHJSJSb.js.br +0 -0
- package/build/client/_app/immutable/chunks/CxHJSJSb.js.gz +0 -0
- package/build/client/_app/immutable/chunks/D8swcNrI.js +1 -0
- package/build/client/_app/immutable/chunks/D8swcNrI.js.br +0 -0
- package/build/client/_app/immutable/chunks/D8swcNrI.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DGK5viub.js +1 -0
- package/build/client/_app/immutable/chunks/DGK5viub.js.br +0 -0
- package/build/client/_app/immutable/chunks/DGK5viub.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DREe4_Em.js +1 -0
- package/build/client/_app/immutable/chunks/DREe4_Em.js.br +0 -0
- package/build/client/_app/immutable/chunks/DREe4_Em.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Da2GOnuD.js +2 -0
- package/build/client/_app/immutable/chunks/Da2GOnuD.js.br +0 -0
- package/build/client/_app/immutable/chunks/Da2GOnuD.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DlupK5OD.js +6 -0
- package/build/client/_app/immutable/chunks/DlupK5OD.js.br +0 -0
- package/build/client/_app/immutable/chunks/DlupK5OD.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Ds4LY5_S.js +1 -0
- package/build/client/_app/immutable/chunks/Ds4LY5_S.js.br +0 -0
- package/build/client/_app/immutable/chunks/Ds4LY5_S.js.gz +0 -0
- package/build/client/_app/immutable/chunks/HFrgAbA7.js +4 -0
- package/build/client/_app/immutable/chunks/HFrgAbA7.js.br +0 -0
- package/build/client/_app/immutable/chunks/HFrgAbA7.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Lb2eWaSE.js +8 -0
- package/build/client/_app/immutable/chunks/Lb2eWaSE.js.br +0 -0
- package/build/client/_app/immutable/chunks/Lb2eWaSE.js.gz +0 -0
- package/build/client/_app/immutable/chunks/N3-89cl-.js +3 -0
- package/build/client/_app/immutable/chunks/N3-89cl-.js.br +0 -0
- package/build/client/_app/immutable/chunks/N3-89cl-.js.gz +0 -0
- package/build/client/_app/immutable/chunks/NueoU5q8.js +1 -0
- package/build/client/_app/immutable/chunks/NueoU5q8.js.br +0 -0
- package/build/client/_app/immutable/chunks/NueoU5q8.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Sii3oNcc.js +7 -0
- package/build/client/_app/immutable/chunks/Sii3oNcc.js.br +0 -0
- package/build/client/_app/immutable/chunks/Sii3oNcc.js.gz +0 -0
- package/build/client/_app/immutable/chunks/TvzfwAc_.js +6 -0
- package/build/client/_app/immutable/chunks/TvzfwAc_.js.br +0 -0
- package/build/client/_app/immutable/chunks/TvzfwAc_.js.gz +0 -0
- package/build/client/_app/immutable/chunks/XxOJwmzJ.js +1 -0
- package/build/client/_app/immutable/chunks/XxOJwmzJ.js.br +0 -0
- package/build/client/_app/immutable/chunks/XxOJwmzJ.js.gz +0 -0
- package/build/client/_app/immutable/chunks/gKm-HWvG.js +1 -0
- package/build/client/_app/immutable/chunks/gKm-HWvG.js.br +1 -0
- package/build/client/_app/immutable/chunks/gKm-HWvG.js.gz +0 -0
- package/build/client/_app/immutable/chunks/s7ZLiUKi.js +1 -0
- package/build/client/_app/immutable/chunks/s7ZLiUKi.js.br +0 -0
- package/build/client/_app/immutable/chunks/s7ZLiUKi.js.gz +0 -0
- package/build/client/_app/immutable/chunks/uMlyB-ee.js +1 -0
- package/build/client/_app/immutable/chunks/uMlyB-ee.js.br +0 -0
- package/build/client/_app/immutable/chunks/uMlyB-ee.js.gz +0 -0
- package/build/client/_app/immutable/entry/app.BGGGVw8e.js +2 -0
- package/build/client/_app/immutable/entry/app.BGGGVw8e.js.br +0 -0
- package/build/client/_app/immutable/entry/app.BGGGVw8e.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.Cew8gpBz.js +1 -0
- package/build/client/_app/immutable/entry/start.Cew8gpBz.js.br +0 -0
- package/build/client/_app/immutable/entry/start.Cew8gpBz.js.gz +0 -0
- package/build/client/_app/immutable/nodes/0.Bg8-HE2q.js +9 -0
- package/build/client/_app/immutable/nodes/0.Bg8-HE2q.js.br +0 -0
- package/build/client/_app/immutable/nodes/0.Bg8-HE2q.js.gz +0 -0
- package/build/client/_app/immutable/nodes/1.CaqTGk5K.js +1 -0
- package/build/client/_app/immutable/nodes/1.CaqTGk5K.js.br +0 -0
- package/build/client/_app/immutable/nodes/1.CaqTGk5K.js.gz +0 -0
- package/build/client/_app/immutable/nodes/10.CDtUrk-c.js +9 -0
- package/build/client/_app/immutable/nodes/10.CDtUrk-c.js.br +0 -0
- package/build/client/_app/immutable/nodes/10.CDtUrk-c.js.gz +0 -0
- package/build/client/_app/immutable/nodes/11.BgmRFAah.js +2 -0
- package/build/client/_app/immutable/nodes/11.BgmRFAah.js.br +0 -0
- package/build/client/_app/immutable/nodes/11.BgmRFAah.js.gz +0 -0
- package/build/client/_app/immutable/nodes/12.CkcVt4QK.js +6 -0
- package/build/client/_app/immutable/nodes/12.CkcVt4QK.js.br +0 -0
- package/build/client/_app/immutable/nodes/12.CkcVt4QK.js.gz +0 -0
- package/build/client/_app/immutable/nodes/13.Ce2-RKSA.js +1 -0
- package/build/client/_app/immutable/nodes/13.Ce2-RKSA.js.br +0 -0
- package/build/client/_app/immutable/nodes/13.Ce2-RKSA.js.gz +0 -0
- package/build/client/_app/immutable/nodes/14.ip6iLHgE.js +10 -0
- package/build/client/_app/immutable/nodes/14.ip6iLHgE.js.br +0 -0
- package/build/client/_app/immutable/nodes/14.ip6iLHgE.js.gz +0 -0
- package/build/client/_app/immutable/nodes/15.DkPLCNpt.js +1 -0
- package/build/client/_app/immutable/nodes/15.DkPLCNpt.js.br +3 -0
- package/build/client/_app/immutable/nodes/15.DkPLCNpt.js.gz +0 -0
- package/build/client/_app/immutable/nodes/16.Cvg_tC9Y.js +3 -0
- package/build/client/_app/immutable/nodes/16.Cvg_tC9Y.js.br +0 -0
- package/build/client/_app/immutable/nodes/16.Cvg_tC9Y.js.gz +0 -0
- package/build/client/_app/immutable/nodes/17.DYkILIFn.js +1 -0
- package/build/client/_app/immutable/nodes/17.DYkILIFn.js.br +0 -0
- package/build/client/_app/immutable/nodes/17.DYkILIFn.js.gz +0 -0
- package/build/client/_app/immutable/nodes/18.DPfadYmN.js +14 -0
- package/build/client/_app/immutable/nodes/18.DPfadYmN.js.br +0 -0
- package/build/client/_app/immutable/nodes/18.DPfadYmN.js.gz +0 -0
- package/build/client/_app/immutable/nodes/19.ClKxJRb4.js +150 -0
- package/build/client/_app/immutable/nodes/19.ClKxJRb4.js.br +0 -0
- package/build/client/_app/immutable/nodes/19.ClKxJRb4.js.gz +0 -0
- package/build/client/_app/immutable/nodes/2.CluLiMMe.js +40 -0
- package/build/client/_app/immutable/nodes/2.CluLiMMe.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.CluLiMMe.js.gz +0 -0
- package/build/client/_app/immutable/nodes/20.Bif6P7ng.js +25 -0
- package/build/client/_app/immutable/nodes/20.Bif6P7ng.js.br +0 -0
- package/build/client/_app/immutable/nodes/20.Bif6P7ng.js.gz +0 -0
- package/build/client/_app/immutable/nodes/21.x0ymlObW.js +5 -0
- package/build/client/_app/immutable/nodes/21.x0ymlObW.js.br +0 -0
- package/build/client/_app/immutable/nodes/21.x0ymlObW.js.gz +0 -0
- package/build/client/_app/immutable/nodes/22.RGldztsO.js +18 -0
- package/build/client/_app/immutable/nodes/22.RGldztsO.js.br +0 -0
- package/build/client/_app/immutable/nodes/22.RGldztsO.js.gz +0 -0
- package/build/client/_app/immutable/nodes/24.B_uEnuL5.js +4 -0
- package/build/client/_app/immutable/nodes/24.B_uEnuL5.js.br +0 -0
- package/build/client/_app/immutable/nodes/24.B_uEnuL5.js.gz +0 -0
- package/build/client/_app/immutable/nodes/26.Dky3Ah9G.js +6 -0
- package/build/client/_app/immutable/nodes/26.Dky3Ah9G.js.br +0 -0
- package/build/client/_app/immutable/nodes/26.Dky3Ah9G.js.gz +0 -0
- package/build/client/_app/immutable/nodes/27.DP_uSl0C.js +8 -0
- package/build/client/_app/immutable/nodes/27.DP_uSl0C.js.br +0 -0
- package/build/client/_app/immutable/nodes/27.DP_uSl0C.js.gz +0 -0
- package/build/client/_app/immutable/nodes/28.D2qdRGPd.js +2 -0
- package/build/client/_app/immutable/nodes/28.D2qdRGPd.js.br +0 -0
- package/build/client/_app/immutable/nodes/28.D2qdRGPd.js.gz +0 -0
- package/build/client/_app/immutable/nodes/29.Ddwaz1hp.js +5 -0
- package/build/client/_app/immutable/nodes/29.Ddwaz1hp.js.br +0 -0
- package/build/client/_app/immutable/nodes/29.Ddwaz1hp.js.gz +0 -0
- package/build/client/_app/immutable/nodes/3.CVDrIOUx.js +2 -0
- package/build/client/_app/immutable/nodes/3.CVDrIOUx.js.br +0 -0
- package/build/client/_app/immutable/nodes/3.CVDrIOUx.js.gz +0 -0
- package/build/client/_app/immutable/nodes/30.Z_dcq2gz.js +4 -0
- package/build/client/_app/immutable/nodes/30.Z_dcq2gz.js.br +0 -0
- package/build/client/_app/immutable/nodes/30.Z_dcq2gz.js.gz +0 -0
- package/build/client/_app/immutable/nodes/31.dyucR3g6.js +3 -0
- package/build/client/_app/immutable/nodes/31.dyucR3g6.js.br +0 -0
- package/build/client/_app/immutable/nodes/31.dyucR3g6.js.gz +0 -0
- package/build/client/_app/immutable/nodes/32.DX4PQvJR.js +7 -0
- package/build/client/_app/immutable/nodes/32.DX4PQvJR.js.br +0 -0
- package/build/client/_app/immutable/nodes/32.DX4PQvJR.js.gz +0 -0
- package/build/client/_app/immutable/nodes/33.0jPnz-fe.js +2 -0
- package/build/client/_app/immutable/nodes/33.0jPnz-fe.js.br +0 -0
- package/build/client/_app/immutable/nodes/33.0jPnz-fe.js.gz +0 -0
- package/build/client/_app/immutable/nodes/34.CvGd0cJb.js +4 -0
- package/build/client/_app/immutable/nodes/34.CvGd0cJb.js.br +0 -0
- package/build/client/_app/immutable/nodes/34.CvGd0cJb.js.gz +0 -0
- package/build/client/_app/immutable/nodes/35.5ZhQwroK.js +7 -0
- package/build/client/_app/immutable/nodes/35.5ZhQwroK.js.br +0 -0
- package/build/client/_app/immutable/nodes/35.5ZhQwroK.js.gz +0 -0
- package/build/client/_app/immutable/nodes/36.LzdZEn79.js +6 -0
- package/build/client/_app/immutable/nodes/36.LzdZEn79.js.br +0 -0
- package/build/client/_app/immutable/nodes/36.LzdZEn79.js.gz +0 -0
- package/build/client/_app/immutable/nodes/37.C5-b0odW.js +23 -0
- package/build/client/_app/immutable/nodes/37.C5-b0odW.js.br +0 -0
- package/build/client/_app/immutable/nodes/37.C5-b0odW.js.gz +0 -0
- package/build/client/_app/immutable/nodes/38.CMgkqyxT.js +1 -0
- package/build/client/_app/immutable/nodes/38.CMgkqyxT.js.br +0 -0
- package/build/client/_app/immutable/nodes/38.CMgkqyxT.js.gz +0 -0
- package/build/client/_app/immutable/nodes/4.CbNo2HC_.js +5 -0
- package/build/client/_app/immutable/nodes/4.CbNo2HC_.js.br +0 -0
- package/build/client/_app/immutable/nodes/4.CbNo2HC_.js.gz +0 -0
- package/build/client/_app/immutable/nodes/40.CNQdbYqG.js +6 -0
- package/build/client/_app/immutable/nodes/40.CNQdbYqG.js.br +0 -0
- package/build/client/_app/immutable/nodes/40.CNQdbYqG.js.gz +0 -0
- package/build/client/_app/immutable/nodes/5.RsG0znmX.js +1 -0
- package/build/client/_app/immutable/nodes/5.RsG0znmX.js.br +0 -0
- package/build/client/_app/immutable/nodes/5.RsG0znmX.js.gz +0 -0
- package/build/client/_app/immutable/nodes/8.DFmXg3_i.js +3 -0
- package/build/client/_app/immutable/nodes/8.DFmXg3_i.js.br +0 -0
- package/build/client/_app/immutable/nodes/8.DFmXg3_i.js.gz +0 -0
- package/build/client/_app/immutable/nodes/9.DhYSdoUO.js +10 -0
- package/build/client/_app/immutable/nodes/9.DhYSdoUO.js.br +0 -0
- package/build/client/_app/immutable/nodes/9.DhYSdoUO.js.gz +0 -0
- package/build/client/_app/version.json +1 -1
- package/build/client/_app/version.json.br +0 -0
- package/build/client/_app/version.json.gz +0 -0
- package/build/handler.js +4 -4
- package/build/index.js +4 -4
- package/build/server/chunks/chunks/ConsoleWindow.js-BxF5jMFE.js +103 -0
- package/build/server/chunks/chunks/DecisionForm.js-BFfq6cr6.js +246 -0
- package/build/server/chunks/chunks/DecisionsBadge.js-CGVFdHf9.js +78 -0
- package/build/server/chunks/chunks/Discussion.js-D7IFpGpa.js +581 -0
- package/build/server/chunks/chunks/EtaLine.js-CBCXWQzg.js +41 -0
- package/build/server/chunks/chunks/ResizableRail.js-DYHpZhCB.js +864 -0
- package/build/server/chunks/chunks/Sheet.js-pEqPGqDd.js +3958 -0
- package/build/server/chunks/chunks/TaskView.js-CK9biTfX.js +3015 -0
- package/build/server/chunks/chunks/TimeBar.js-4ui3FQow.js +32 -0
- package/build/server/chunks/chunks/TimeLegend.js-BcJobfm0.js +29 -0
- package/build/server/chunks/chunks/bell.js-M4cNe9Wo.js +194 -0
- package/build/server/chunks/chunks/chat.svelte.js-vT8qTWLG.js +417 -0
- package/build/server/chunks/chunks/console.js-BV5qkqBU.js +64 -0
- package/build/server/chunks/chunks/decisionhome.js-CHke-Aet.js +311 -0
- package/build/server/chunks/chunks/detail.js-CQv9k56W.js +149 -0
- package/build/server/chunks/chunks/features.js-B2GRQeLG.js +181 -0
- package/build/server/chunks/chunks/feedback.js-KWaTRrc_.js +67 -0
- package/build/server/chunks/chunks/handled.js-m3RTMfxd.js +20 -0
- package/build/server/chunks/chunks/inbox.js-CxcuKYoV.js +222 -0
- package/build/server/chunks/chunks/insights.js-D2D9kicC.js +142 -0
- package/build/server/chunks/chunks/insights.svelte.js-CcEJoKQH.js +567 -0
- package/build/server/chunks/chunks/internal.js-CyrN7YyP.js +151 -0
- package/build/server/chunks/chunks/livereview.svelte.js-YZhYByZI.js +97 -0
- package/build/server/chunks/chunks/marketplace-service.js-BQryRMpA.js +557 -0
- package/build/server/chunks/chunks/ondeck.js-BLhFZI2l.js +119 -0
- package/build/server/chunks/chunks/package.js-DCazdgiR.js +160 -0
- package/build/server/chunks/chunks/page.js-BEonrB4-.js +13 -0
- package/build/server/chunks/chunks/previewhelper2.js-BwNIdagj.js +210 -0
- package/build/server/chunks/chunks/runtime.js-C-66z9Q6.js +25642 -0
- package/build/server/chunks/chunks/scribe.js-OrtzU0Ox.js +1376 -0
- package/build/server/chunks/chunks/service.js-Cgn4nIWF.js +1339 -0
- package/build/server/chunks/chunks/service2.js-D6aGwDef.js +835 -0
- package/build/server/chunks/chunks/service3.js-Dxdu8beL.js +234 -0
- package/build/server/chunks/chunks/settings.js-qVoB3gY6.js +379 -0
- package/build/server/chunks/chunks/slots.svelte.js-CizfW0L7.js +54 -0
- package/build/server/chunks/chunks/starter.js-DGsazTxj.js +400 -0
- package/build/server/chunks/chunks/store.js-m6116Gee.js +332 -0
- package/build/server/chunks/chunks/uploads.js-Dj8oL0YP.js +107 -0
- package/build/server/chunks/chunks/view.js-BunAXITd.js +76 -0
- package/build/server/chunks/entries/endpoints/api/apps/_op_/_server.ts.js-kVPM8QiK.js +112 -0
- package/build/server/chunks/entries/endpoints/api/cloud/_server.ts.js-D3yUm95J.js +111 -0
- package/build/server/chunks/entries/endpoints/api/cloud/previews/_server.ts.js-t7kJDKFo.js +59 -0
- package/build/server/chunks/entries/endpoints/api/crew/_server.ts.js-asKE3p3l.js +75 -0
- package/build/server/chunks/entries/endpoints/api/crew/messages/_server.ts.js-CL96hFwe.js +79 -0
- package/build/server/chunks/entries/endpoints/api/events/_server.ts.js-DtH4ROLw.js +154 -0
- package/build/server/chunks/entries/endpoints/api/features/_server.ts.js-CjMBduD9.js +56 -0
- package/build/server/chunks/entries/endpoints/api/files/_server.ts.js-tSUMjrxM.js +71 -0
- package/build/server/chunks/entries/endpoints/api/firstmate/chat/_server.ts.js-B46bSl60.js +107 -0
- package/build/server/chunks/entries/endpoints/api/firstmate/chat/archive/_server.ts.js-C2y7h-Co.js +83 -0
- package/build/server/chunks/entries/endpoints/api/firstmate/chat/history/_server.ts.js-C5veyHrZ.js +73 -0
- package/build/server/chunks/entries/endpoints/api/firstmate/chat/search/_server.ts.js-DtwDysQZ.js +66 -0
- package/build/server/chunks/entries/endpoints/api/firstmate/commands/_server.ts.js-Bnkzua_j.js +66 -0
- package/build/server/chunks/entries/endpoints/api/firstmate/dismiss/_server.ts.js-nFnKxdcG.js +67 -0
- package/build/server/chunks/entries/endpoints/api/firstmate/input/_server.ts.js--Yr7q4X9.js +73 -0
- package/build/server/chunks/entries/endpoints/api/firstmate/interrupt/_server.ts.js-Bvwd3v0d.js +66 -0
- package/build/server/chunks/entries/endpoints/api/firstmate/messages/_server.ts.js-DqUrbhsF.js +115 -0
- package/build/server/chunks/entries/endpoints/api/firstmate/pick/_server.ts.js-BpAtHV7C.js +76 -0
- package/build/server/chunks/entries/endpoints/api/firstmate/reactions/_server.ts.js-BWYNvyCC.js +87 -0
- package/build/server/chunks/entries/endpoints/api/firstmate/signin/_server.ts.js-BIaGX_Je.js +75 -0
- package/build/server/chunks/entries/endpoints/api/firstmate/start/_server.ts.js-CKGsdGBC.js +66 -0
- package/build/server/chunks/entries/endpoints/api/firstmate/uploads/_day_/_id_/_name_/_server.ts.js-Csr4uwPB.js +32 -0
- package/build/server/chunks/entries/endpoints/api/firstmate/uploads/_server.ts.js-A7LEzpUQ.js +40 -0
- package/build/server/chunks/entries/endpoints/api/fleet/_server.ts.js-BIky5eUL.js +58 -0
- package/build/server/chunks/entries/endpoints/api/health/_server.ts.js-QzznrMw6.js +58 -0
- package/build/server/chunks/entries/endpoints/api/inbox/_server.ts.js-BhT-maiz.js +85 -0
- package/build/server/chunks/entries/endpoints/api/inbox/following/_server.ts.js-DTDIeAua.js +83 -0
- package/build/server/chunks/entries/endpoints/api/inbox/report/_server.ts.js-12ddKzFc.js +76 -0
- package/build/server/chunks/entries/endpoints/api/inbox/talk/_server.ts.js-Dy8Qr5Ob.js +168 -0
- package/build/server/chunks/entries/endpoints/api/insights/_server.ts.js-Dm8emtZq.js +58 -0
- package/build/server/chunks/entries/endpoints/api/live/_id_/end/_server.ts.js-DxYAgGOs.js +87 -0
- package/build/server/chunks/entries/endpoints/api/live/_server.ts.js-DvqKFPx-.js +96 -0
- package/build/server/chunks/entries/endpoints/api/live/scouts/_server.ts.js-C3RuITes.js +118 -0
- package/build/server/chunks/entries/endpoints/api/live/settings/_server.ts.js-5QW9NUip.js +72 -0
- package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/config/_server.ts.js-DPZryu4Q.js +93 -0
- package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/feedback/_server.ts.js-BcXreDr7.js +82 -0
- package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/feedback/summary/_server.ts.js-Cec1PqqW.js +77 -0
- package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/icon/_icon_/_server.ts.js-kqsIOpsA.js +74 -0
- package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/load/_server.ts.js-BJocN5Xm.js +27 -0
- package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/ui/_...path_/_server.ts.js-BUpXqp6F.js +81 -0
- package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/update/_server.ts.js-BGOAdpGK.js +39 -0
- package/build/server/chunks/entries/endpoints/api/plugins/_server.ts.js-DS3DbCgu.js +58 -0
- package/build/server/chunks/entries/endpoints/api/plugins/inspect/_server.ts.js-CuZogP4B.js +39 -0
- package/build/server/chunks/entries/endpoints/api/plugins/install/_server.ts.js-BkS35-hL.js +42 -0
- package/build/server/chunks/entries/endpoints/api/plugins/marketplace/_server.ts.js-ByS6w0ap.js +63 -0
- package/build/server/chunks/entries/endpoints/api/plugins/marketplace/icon/_name_/_server.ts.js-BmrVgIv5.js +72 -0
- package/build/server/chunks/entries/endpoints/api/plugins/marketplace/registries/_server.ts.js-BLPKS89l.js +69 -0
- package/build/server/chunks/entries/endpoints/api/plugins/roles/_server.ts.js-CXH9OLs6.js +73 -0
- package/build/server/chunks/entries/endpoints/api/plugins/updates/_server.ts.js-NecYW7Fw.js +27 -0
- package/build/server/chunks/entries/endpoints/api/previews/check/_server.ts.js-BlUsDWOD.js +81 -0
- package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/_server.ts.js-CBrquITj.js +63 -0
- package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/commands/_server.ts.js-CKI4wWxB.js +72 -0
- package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/consent/_server.ts.js-CWPBrHrF.js +84 -0
- package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/draft/_server.ts.js-CJSTZha6.js +71 -0
- package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/file/_server.ts.js-CuIgfX_D.js +94 -0
- package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/test/_server.ts.js-BsRnf2ce.js +77 -0
- package/build/server/chunks/entries/endpoints/api/second-mate-setup/_server.ts.js-Cb9tcSDx.js +473 -0
- package/build/server/chunks/entries/endpoints/api/second-mates/_id_/link/_server.ts.js-CY33XrLN.js +88 -0
- package/build/server/chunks/entries/endpoints/api/second-mates/_id_/peek/_server.ts.js-BRAKX1m3.js +67 -0
- package/build/server/chunks/entries/endpoints/api/services/_server.ts.js-yt0TqAcX.js +77 -0
- package/build/server/chunks/entries/endpoints/api/setup/_server.ts.js-CVa3CdZi.js +137 -0
- package/build/server/chunks/entries/endpoints/api/slots/_server.ts.js-Dy7tHXfQ.js +66 -0
- package/build/server/chunks/entries/endpoints/api/soundings/_server.ts.js-DWZ_aOjS.js +80 -0
- package/build/server/chunks/entries/endpoints/api/soundings/beacon/_server.ts.js-CT7Boaf4.js +66 -0
- package/build/server/chunks/entries/endpoints/api/soundings/settings/_server.ts.js-ocY6SwwL.js +69 -0
- package/build/server/chunks/entries/endpoints/api/tasks/_id_/_server.ts.js-CnXs9bJ0.js +63 -0
- package/build/server/chunks/entries/endpoints/api/tasks/_id_/artifacts/_...name_/_server.ts.js-vDstks5V.js +82 -0
- package/build/server/chunks/entries/endpoints/api/tasks/_id_/chat/_server.ts.js-BkTBLTm_.js +109 -0
- package/build/server/chunks/entries/endpoints/api/tasks/_id_/diff/_server.ts.js-D3dlXTwq.js +75 -0
- package/build/server/chunks/entries/endpoints/api/tasks/_id_/livereview/_server.ts.js-C2K3IFZh.js +104 -0
- package/build/server/chunks/entries/endpoints/api/tasks/_id_/output/_server.ts.js-BQ-Pi5Kw.js +123 -0
- package/build/server/chunks/entries/endpoints/api/tasks/_id_/preview/_server.ts.js-RDdXwMiY.js +77 -0
- package/build/server/chunks/entries/endpoints/api/tasks/_id_/preview/helper/_server.ts.js-BFwe4mnD.js +80 -0
- package/build/server/chunks/entries/endpoints/api/vault/_server.ts.js-Bh4F9hu_.js +81 -0
- package/build/server/chunks/entries/endpoints/api/voice/_server.ts.js-Dx9WOcQT.js +24 -0
- package/build/server/chunks/entries/endpoints/api/voice/hear/_server.ts.js-B2qqL7As.js +31 -0
- package/build/server/chunks/entries/endpoints/api/voice/speak/_server.ts.js-B8R-L43c.js +33 -0
- package/build/server/chunks/entries/endpoints/api/wh-events/_server.ts.js-D3bduhlo.js +93 -0
- package/build/server/chunks/entries/endpoints/api/wheelhouse/source/_server.ts.js-BMPsSJdV.js +40 -0
- package/build/server/chunks/entries/endpoints/api/wheelhouse/update/_server.ts.js-D5UL7RMX.js +27 -0
- package/build/server/chunks/entries/endpoints/api/wheelhouse/upgrade/_server.ts.js-CvEX3NKJ.js +27 -0
- package/build/server/chunks/entries/endpoints/tasks/_id_/live/_server.ts.js-DtTwc4Gq.js +82 -0
- package/build/server/chunks/entries/endpoints/tasks/_id_/review/_server.ts.js-CHQUpKh2.js +62 -0
- package/build/server/chunks/entries/hooks.server.js-BG_jlCcK.js +104 -0
- package/build/server/chunks/entries/pages/_layout.server.ts.js-CTliqS0t.js +54 -0
- package/build/server/chunks/entries/pages/_layout.svelte.js-Bnx1zQNz.js +6028 -0
- package/build/server/chunks/entries/pages/_page.server.ts.js-BsobM1Vs.js +16 -0
- package/build/server/chunks/entries/pages/_page.svelte.js-CEPxPR_I.js +5810 -0
- package/build/server/chunks/entries/pages/crew/_page.svelte.js-sAcZ9qNG.js +115 -0
- package/build/server/chunks/entries/pages/decisions/_page.server.ts.js-Bc3cLNPh.js +14 -0
- package/build/server/chunks/entries/pages/decisions/_page.svelte.js-mQE5Ht8_.js +226 -0
- package/build/server/chunks/entries/pages/deck/_page.server.ts.js-DZsxsScR.js +16 -0
- package/build/server/chunks/entries/pages/deck/_page.svelte.js-u1WdGQom.js +93 -0
- package/build/server/chunks/entries/pages/files/_page.server.ts.js-CrzB71Jp.js +17 -0
- package/build/server/chunks/entries/pages/headroom/_page.server.ts.js-C7IlrK-z.js +11 -0
- package/build/server/chunks/entries/pages/headroom/_page.svelte.js-DjqtGoDH.js +296 -0
- package/build/server/chunks/entries/pages/health/_page.server.ts.js-DLaP4pWA.js +16 -0
- package/build/server/chunks/entries/pages/health/_page.svelte.js-DA7MoO-y.js +517 -0
- package/build/server/chunks/entries/pages/inbox/_page.server.ts.js-CgDtaaVM.js +18 -0
- package/build/server/chunks/entries/pages/inbox/_page.svelte.js--GRUWFc_.js +653 -0
- package/build/server/chunks/entries/pages/more/_page.svelte.js-DxjJ6y39.js +152 -0
- package/build/server/chunks/entries/pages/plugins/_plugin_/_page_/_page.server.ts.js-mo7xbJt3.js +16 -0
- package/build/server/chunks/entries/pages/plugins/_plugin_/_page_/_page.svelte.js-BaJy6ojj.js +60 -0
- package/build/server/chunks/entries/pages/projects/_id_/_page.server.ts.js-BTVTYrL2.js +23 -0
- package/build/server/chunks/entries/pages/projects/_id_/_page.svelte.js-FodOZq2p.js +983 -0
- package/build/server/chunks/entries/pages/projects/_id_/_plugin_/_tab_/_page.server.ts.js-CBuwJYf2.js +21 -0
- package/build/server/chunks/entries/pages/projects/_id_/_plugin_/_tab_/_page.svelte.js-D9gMeR7J.js +82 -0
- package/build/server/chunks/entries/pages/projects/_id_/passage/_page.server.ts.js-CbnfsXhC.js +27 -0
- package/build/server/chunks/entries/pages/projects/_id_/passage/_page.svelte.js-Di4LHBAx.js +420 -0
- package/build/server/chunks/entries/pages/projects/_id_/passage/edit/_page.server.ts.js-CuhFDzPV.js +15 -0
- package/build/server/chunks/entries/pages/remotes/_page.server.ts.js-CpnDSMiL.js +11 -0
- package/build/server/chunks/entries/pages/remotes/_page.svelte.js-Baz3X3kg.js +348 -0
- package/build/server/chunks/entries/pages/second-mates/_page.server.ts.js-DePfcsb_.js +13 -0
- package/build/server/chunks/entries/pages/settings/_page.server.ts.js-djAsookJ.js +12 -0
- package/build/server/chunks/entries/pages/settings/chat/_page.server.ts.js-DriYtYJc.js +18 -0
- package/build/server/chunks/entries/pages/settings/discussion/_page.server.ts.js-NBwcUtec.js +19 -0
- package/build/server/chunks/entries/pages/settings/events/_page.server.ts.js-CfuxlVXC.js +16 -0
- package/build/server/chunks/entries/pages/settings/experimental/_page.server.ts.js-D9yV2bD6.js +15 -0
- package/build/server/chunks/entries/pages/settings/experimental/_page.svelte.js-BDXpdTTY.js +83 -0
- package/build/server/chunks/entries/pages/settings/firstmate/_page.server.ts.js-DAN-2Pxg.js +797 -0
- package/build/server/chunks/entries/pages/settings/gateway/_page.server.ts.js-tnGbTGGj.js +11 -0
- package/build/server/chunks/entries/pages/settings/gateway/_page.svelte.js-r7TgB6d3.js +261 -0
- package/build/server/chunks/entries/pages/settings/plugins/_page.server.ts.js-DuleEIYa.js +19 -0
- package/build/server/chunks/entries/pages/settings/plugins/_plugin_/_page.server.ts.js-BxWoMmwC.js +17 -0
- package/build/server/chunks/entries/pages/settings/setup/_page.server.ts.js-BfeP4Gtl.js +11 -0
- package/build/server/chunks/entries/pages/settings/update/_page.server.ts.js-DQpRqceP.js +11 -0
- package/build/server/chunks/entries/pages/settings/voice/_page.server.ts.js-c3S1VKhz.js +15 -0
- package/build/server/chunks/entries/pages/setup/_page.server.ts.js-DOLq2HfK.js +18 -0
- package/build/server/chunks/entries/pages/tasks/_id_/_page.server.ts.js-BJdoTfEx.js +36 -0
- package/build/server/chunks/entries/pages/tasks/_id_/_page.svelte.js-Dm62wxMH.js +112 -0
- package/build/server/chunks/entries/pages/tasks/_id_/doc/_page.server.ts.js-DpwnwQCn.js +24 -0
- package/build/server/chunks/entries/pages/time/_page.server.ts.js-CW6Titpm.js +11 -0
- package/build/server/chunks/entries/pages/time/_page.svelte.js-BEJCthq-.js +109 -0
- package/build/server/chunks/handler-y94pKJeU.js +1474 -0
- package/build/server/chunks/index.js-DtEa3MAX.js +4296 -0
- package/build/server/chunks/manifest.js-YbFjUaWW.js +969 -0
- package/build/server/chunks/nodes/0.js-DZNO3FEd.js +66 -0
- package/build/server/chunks/nodes/1.js-DeEeQGnw.js +9 -0
- package/build/server/chunks/nodes/10.js-D1WLP-xF.js +65 -0
- package/build/server/chunks/nodes/11.js-Cj41sGC5.js +64 -0
- package/build/server/chunks/nodes/12.js-B-q9Ib1c.js +12 -0
- package/build/server/chunks/nodes/13.js-DsffUOsS.js +9 -0
- package/build/server/chunks/nodes/14.js-Dw1DFPiL.js +9 -0
- package/build/server/chunks/nodes/15.js-Bm993HDL.js +63 -0
- package/build/server/chunks/nodes/16.js-WZ4F89Mr.js +66 -0
- package/build/server/chunks/nodes/17.js-Baq9rNe0.js +64 -0
- package/build/server/chunks/nodes/18.js-C38z45xS.js +65 -0
- package/build/server/chunks/nodes/19.js-DyT8Zd0H.js +64 -0
- package/build/server/chunks/nodes/2.js-jQdD36qI.js +63 -0
- package/build/server/chunks/nodes/20.js-CQbfd52F.js +24 -0
- package/build/server/chunks/nodes/21.js-DW3kIO8q.js +25 -0
- package/build/server/chunks/nodes/22.js-ksQVgjBb.js +9 -0
- package/build/server/chunks/nodes/23.js-BFPu5J7m.js +25 -0
- package/build/server/chunks/nodes/24.js-BKj-MVrY.js +63 -0
- package/build/server/chunks/nodes/26.js-DxNHajUJ.js +64 -0
- package/build/server/chunks/nodes/27.js-mHDM5fgE.js +63 -0
- package/build/server/chunks/nodes/28.js-DTwh097W.js +25 -0
- package/build/server/chunks/nodes/29.js-CBmut8fC.js +63 -0
- package/build/server/chunks/nodes/3.js-DXVw6q6d.js +9 -0
- package/build/server/chunks/nodes/30.js-CbXBXcvy.js +24 -0
- package/build/server/chunks/nodes/31.js-WDuQi73D.js +22 -0
- package/build/server/chunks/nodes/32.js-T4n52_nY.js +63 -0
- package/build/server/chunks/nodes/33.js-BhdoH31z.js +66 -0
- package/build/server/chunks/nodes/34.js-BdxLdp7H.js +65 -0
- package/build/server/chunks/nodes/35.js-kSAwfGyD.js +26 -0
- package/build/server/chunks/nodes/36.js-DnyJGfb-.js +65 -0
- package/build/server/chunks/nodes/37.js-XUg9jSCl.js +67 -0
- package/build/server/chunks/nodes/38.js-BSf8dpSf.js +64 -0
- package/build/server/chunks/nodes/39.js-CzeMaVfA.js +64 -0
- package/build/server/chunks/nodes/4.js-DsmciaDg.js +64 -0
- package/build/server/chunks/nodes/40.js-BB-3VTMf.js +63 -0
- package/build/server/chunks/nodes/5.js-CQfxR-6j.js +63 -0
- package/build/server/chunks/nodes/7.js-VphzedHf.js +63 -0
- package/build/server/chunks/nodes/8.js-knfTDQmu.js +14 -0
- package/build/server/chunks/nodes/9.js-B_uu7boa.js +63 -0
- package/dist/cli.js +1 -1
- package/dist/wh-vault.js +1 -1
- package/firstmate-extension/firstmate-extension.json +1 -1
- package/package.json +1 -1
- package/build/client/_app/immutable/assets/0.DvoPFmNs.css +0 -1
- package/build/client/_app/immutable/assets/0.DvoPFmNs.css.br +0 -0
- package/build/client/_app/immutable/assets/0.DvoPFmNs.css.gz +0 -0
- package/build/client/_app/immutable/chunks/BBm_Fs-b.js +0 -6
- package/build/client/_app/immutable/chunks/BBm_Fs-b.js.br +0 -0
- package/build/client/_app/immutable/chunks/BBm_Fs-b.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BCs6bnXY.js +0 -1
- package/build/client/_app/immutable/chunks/BCs6bnXY.js.br +0 -0
- package/build/client/_app/immutable/chunks/BCs6bnXY.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BF_cZ9t1.js +0 -1
- package/build/client/_app/immutable/chunks/BF_cZ9t1.js.br +0 -0
- package/build/client/_app/immutable/chunks/BF_cZ9t1.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BJ2W5Dwa.js +0 -1
- package/build/client/_app/immutable/chunks/BJ2W5Dwa.js.br +0 -0
- package/build/client/_app/immutable/chunks/BJ2W5Dwa.js.gz +0 -0
- package/build/client/_app/immutable/chunks/B_2dI8B-.js +0 -1
- package/build/client/_app/immutable/chunks/B_2dI8B-.js.br +0 -0
- package/build/client/_app/immutable/chunks/B_2dI8B-.js.gz +0 -0
- package/build/client/_app/immutable/chunks/B_vxNA4w.js +0 -1
- package/build/client/_app/immutable/chunks/B_vxNA4w.js.br +0 -0
- package/build/client/_app/immutable/chunks/B_vxNA4w.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BhudhehD.js +0 -1
- package/build/client/_app/immutable/chunks/BhudhehD.js.br +0 -0
- package/build/client/_app/immutable/chunks/BhudhehD.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BkMzJnu3.js +0 -3
- package/build/client/_app/immutable/chunks/BkMzJnu3.js.br +0 -0
- package/build/client/_app/immutable/chunks/BkMzJnu3.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Bk_ZNhuN.js +0 -1
- package/build/client/_app/immutable/chunks/Bk_ZNhuN.js.br +0 -0
- package/build/client/_app/immutable/chunks/Bk_ZNhuN.js.gz +0 -0
- package/build/client/_app/immutable/chunks/C--OEIw2.js +0 -1
- package/build/client/_app/immutable/chunks/C--OEIw2.js.br +0 -0
- package/build/client/_app/immutable/chunks/C--OEIw2.js.gz +0 -0
- package/build/client/_app/immutable/chunks/C4rlO5ce.js +0 -2
- package/build/client/_app/immutable/chunks/C4rlO5ce.js.br +0 -0
- package/build/client/_app/immutable/chunks/C4rlO5ce.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CU--1UbH.js +0 -1
- package/build/client/_app/immutable/chunks/CU--1UbH.js.br +0 -0
- package/build/client/_app/immutable/chunks/CU--1UbH.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CWCjMcSQ.js +0 -1
- package/build/client/_app/immutable/chunks/CWCjMcSQ.js.br +0 -1
- package/build/client/_app/immutable/chunks/CWCjMcSQ.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CuYc7d4s.js +0 -1
- package/build/client/_app/immutable/chunks/CuYc7d4s.js.br +0 -0
- package/build/client/_app/immutable/chunks/CuYc7d4s.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DDdYnEAT.js +0 -1
- package/build/client/_app/immutable/chunks/DDdYnEAT.js.br +0 -0
- package/build/client/_app/immutable/chunks/DDdYnEAT.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DFCS-1G4.js +0 -7
- package/build/client/_app/immutable/chunks/DFCS-1G4.js.br +0 -0
- package/build/client/_app/immutable/chunks/DFCS-1G4.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DIVbIv6L.js +0 -1
- package/build/client/_app/immutable/chunks/DIVbIv6L.js.br +0 -0
- package/build/client/_app/immutable/chunks/DIVbIv6L.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DKap1_6w.js +0 -1
- package/build/client/_app/immutable/chunks/DKap1_6w.js.br +0 -0
- package/build/client/_app/immutable/chunks/DKap1_6w.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DOuX60Xh.js +0 -1
- package/build/client/_app/immutable/chunks/DOuX60Xh.js.br +0 -0
- package/build/client/_app/immutable/chunks/DOuX60Xh.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DSX3BpgH.js +0 -7
- package/build/client/_app/immutable/chunks/DSX3BpgH.js.br +0 -0
- package/build/client/_app/immutable/chunks/DSX3BpgH.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DUXFc1rr.js +0 -2
- package/build/client/_app/immutable/chunks/DUXFc1rr.js.br +0 -0
- package/build/client/_app/immutable/chunks/DUXFc1rr.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DW78OM6E.js +0 -1
- package/build/client/_app/immutable/chunks/DW78OM6E.js.br +0 -0
- package/build/client/_app/immutable/chunks/DW78OM6E.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DcngPT1B.js +0 -8
- package/build/client/_app/immutable/chunks/DcngPT1B.js.br +0 -0
- package/build/client/_app/immutable/chunks/DcngPT1B.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DeI80PG9.js +0 -3
- package/build/client/_app/immutable/chunks/DeI80PG9.js.br +0 -0
- package/build/client/_app/immutable/chunks/DeI80PG9.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DjaUBMdB.js +0 -1
- package/build/client/_app/immutable/chunks/DjaUBMdB.js.br +0 -0
- package/build/client/_app/immutable/chunks/DjaUBMdB.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DkLM7lHB.js +0 -2
- package/build/client/_app/immutable/chunks/DkLM7lHB.js.br +0 -0
- package/build/client/_app/immutable/chunks/DkLM7lHB.js.gz +0 -0
- package/build/client/_app/immutable/chunks/H0f_fYvf.js +0 -4
- package/build/client/_app/immutable/chunks/H0f_fYvf.js.br +0 -0
- package/build/client/_app/immutable/chunks/H0f_fYvf.js.gz +0 -0
- package/build/client/_app/immutable/chunks/LJz6leLj.js +0 -3
- package/build/client/_app/immutable/chunks/LJz6leLj.js.br +0 -0
- package/build/client/_app/immutable/chunks/LJz6leLj.js.gz +0 -0
- package/build/client/_app/immutable/chunks/WrKGiNFc.js +0 -2
- package/build/client/_app/immutable/chunks/WrKGiNFc.js.br +0 -0
- package/build/client/_app/immutable/chunks/WrKGiNFc.js.gz +0 -0
- package/build/client/_app/immutable/chunks/bVnBahjY.js +0 -6
- package/build/client/_app/immutable/chunks/bVnBahjY.js.br +0 -0
- package/build/client/_app/immutable/chunks/bVnBahjY.js.gz +0 -0
- package/build/client/_app/immutable/chunks/jGjhSZaO.js +0 -1
- package/build/client/_app/immutable/chunks/jGjhSZaO.js.br +0 -0
- package/build/client/_app/immutable/chunks/jGjhSZaO.js.gz +0 -0
- package/build/client/_app/immutable/entry/app.CBd4ts86.js +0 -2
- package/build/client/_app/immutable/entry/app.CBd4ts86.js.br +0 -0
- package/build/client/_app/immutable/entry/app.CBd4ts86.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.DsKQ0RT3.js +0 -1
- package/build/client/_app/immutable/entry/start.DsKQ0RT3.js.br +0 -0
- package/build/client/_app/immutable/entry/start.DsKQ0RT3.js.gz +0 -0
- package/build/client/_app/immutable/nodes/0.F-xI54ba.js +0 -9
- package/build/client/_app/immutable/nodes/0.F-xI54ba.js.br +0 -0
- package/build/client/_app/immutable/nodes/0.F-xI54ba.js.gz +0 -0
- package/build/client/_app/immutable/nodes/1.BeXAD0_3.js +0 -1
- package/build/client/_app/immutable/nodes/1.BeXAD0_3.js.br +0 -0
- package/build/client/_app/immutable/nodes/1.BeXAD0_3.js.gz +0 -0
- package/build/client/_app/immutable/nodes/10.MkZ74VF5.js +0 -9
- package/build/client/_app/immutable/nodes/10.MkZ74VF5.js.br +0 -0
- package/build/client/_app/immutable/nodes/10.MkZ74VF5.js.gz +0 -0
- package/build/client/_app/immutable/nodes/11.Dfa5qI-E.js +0 -2
- package/build/client/_app/immutable/nodes/11.Dfa5qI-E.js.br +0 -0
- package/build/client/_app/immutable/nodes/11.Dfa5qI-E.js.gz +0 -0
- package/build/client/_app/immutable/nodes/12.pVeM3rSk.js +0 -6
- package/build/client/_app/immutable/nodes/12.pVeM3rSk.js.br +0 -0
- package/build/client/_app/immutable/nodes/12.pVeM3rSk.js.gz +0 -0
- package/build/client/_app/immutable/nodes/13.DftunDAR.js +0 -1
- package/build/client/_app/immutable/nodes/13.DftunDAR.js.br +0 -0
- package/build/client/_app/immutable/nodes/13.DftunDAR.js.gz +0 -0
- package/build/client/_app/immutable/nodes/14.CoquYL6y.js +0 -10
- package/build/client/_app/immutable/nodes/14.CoquYL6y.js.br +0 -0
- package/build/client/_app/immutable/nodes/14.CoquYL6y.js.gz +0 -0
- package/build/client/_app/immutable/nodes/15.DWSZSNt3.js +0 -1
- package/build/client/_app/immutable/nodes/15.DWSZSNt3.js.br +0 -0
- package/build/client/_app/immutable/nodes/15.DWSZSNt3.js.gz +0 -0
- package/build/client/_app/immutable/nodes/16.Cd97GqaU.js +0 -3
- package/build/client/_app/immutable/nodes/16.Cd97GqaU.js.br +0 -0
- package/build/client/_app/immutable/nodes/16.Cd97GqaU.js.gz +0 -0
- package/build/client/_app/immutable/nodes/17.CeIjKAJx.js +0 -1
- package/build/client/_app/immutable/nodes/17.CeIjKAJx.js.br +0 -0
- package/build/client/_app/immutable/nodes/17.CeIjKAJx.js.gz +0 -0
- package/build/client/_app/immutable/nodes/18.D5iwjrHU.js +0 -14
- package/build/client/_app/immutable/nodes/18.D5iwjrHU.js.br +0 -0
- package/build/client/_app/immutable/nodes/18.D5iwjrHU.js.gz +0 -0
- package/build/client/_app/immutable/nodes/19.C7weQjUV.js +0 -150
- package/build/client/_app/immutable/nodes/19.C7weQjUV.js.br +0 -0
- package/build/client/_app/immutable/nodes/19.C7weQjUV.js.gz +0 -0
- package/build/client/_app/immutable/nodes/2.1HiIWXTK.js +0 -40
- package/build/client/_app/immutable/nodes/2.1HiIWXTK.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.1HiIWXTK.js.gz +0 -0
- package/build/client/_app/immutable/nodes/20.CI3Th2_V.js +0 -25
- package/build/client/_app/immutable/nodes/20.CI3Th2_V.js.br +0 -0
- package/build/client/_app/immutable/nodes/20.CI3Th2_V.js.gz +0 -0
- package/build/client/_app/immutable/nodes/21.Ch2Fmhtx.js +0 -5
- package/build/client/_app/immutable/nodes/21.Ch2Fmhtx.js.br +0 -0
- package/build/client/_app/immutable/nodes/21.Ch2Fmhtx.js.gz +0 -0
- package/build/client/_app/immutable/nodes/22.BeRzoSXH.js +0 -18
- package/build/client/_app/immutable/nodes/22.BeRzoSXH.js.br +0 -0
- package/build/client/_app/immutable/nodes/22.BeRzoSXH.js.gz +0 -0
- package/build/client/_app/immutable/nodes/24.BLuVZRkq.js +0 -4
- package/build/client/_app/immutable/nodes/24.BLuVZRkq.js.br +0 -0
- package/build/client/_app/immutable/nodes/24.BLuVZRkq.js.gz +0 -0
- package/build/client/_app/immutable/nodes/26.CYAb3esZ.js +0 -6
- package/build/client/_app/immutable/nodes/26.CYAb3esZ.js.br +0 -0
- package/build/client/_app/immutable/nodes/26.CYAb3esZ.js.gz +0 -0
- package/build/client/_app/immutable/nodes/27.CcQodI5j.js +0 -8
- package/build/client/_app/immutable/nodes/27.CcQodI5j.js.br +0 -0
- package/build/client/_app/immutable/nodes/27.CcQodI5j.js.gz +0 -0
- package/build/client/_app/immutable/nodes/28.B0JWWCYd.js +0 -2
- package/build/client/_app/immutable/nodes/28.B0JWWCYd.js.br +0 -0
- package/build/client/_app/immutable/nodes/28.B0JWWCYd.js.gz +0 -0
- package/build/client/_app/immutable/nodes/29.Dz-zF1qk.js +0 -5
- package/build/client/_app/immutable/nodes/29.Dz-zF1qk.js.br +0 -0
- package/build/client/_app/immutable/nodes/29.Dz-zF1qk.js.gz +0 -0
- package/build/client/_app/immutable/nodes/3.j0BjUyv6.js +0 -2
- package/build/client/_app/immutable/nodes/3.j0BjUyv6.js.br +0 -0
- package/build/client/_app/immutable/nodes/3.j0BjUyv6.js.gz +0 -0
- package/build/client/_app/immutable/nodes/30.BEz9JoNL.js +0 -4
- package/build/client/_app/immutable/nodes/30.BEz9JoNL.js.br +0 -0
- package/build/client/_app/immutable/nodes/30.BEz9JoNL.js.gz +0 -0
- package/build/client/_app/immutable/nodes/31.keG04jdU.js +0 -3
- package/build/client/_app/immutable/nodes/31.keG04jdU.js.br +0 -0
- package/build/client/_app/immutable/nodes/31.keG04jdU.js.gz +0 -0
- package/build/client/_app/immutable/nodes/32.DvZix2vN.js +0 -7
- package/build/client/_app/immutable/nodes/32.DvZix2vN.js.br +0 -0
- package/build/client/_app/immutable/nodes/32.DvZix2vN.js.gz +0 -0
- package/build/client/_app/immutable/nodes/33.CsEI_wli.js +0 -2
- package/build/client/_app/immutable/nodes/33.CsEI_wli.js.br +0 -0
- package/build/client/_app/immutable/nodes/33.CsEI_wli.js.gz +0 -0
- package/build/client/_app/immutable/nodes/34.C4Cn7mhz.js +0 -4
- package/build/client/_app/immutable/nodes/34.C4Cn7mhz.js.br +0 -0
- package/build/client/_app/immutable/nodes/34.C4Cn7mhz.js.gz +0 -0
- package/build/client/_app/immutable/nodes/35.ByNF3cvk.js +0 -7
- package/build/client/_app/immutable/nodes/35.ByNF3cvk.js.br +0 -0
- package/build/client/_app/immutable/nodes/35.ByNF3cvk.js.gz +0 -0
- package/build/client/_app/immutable/nodes/36.C0AqTZfD.js +0 -6
- package/build/client/_app/immutable/nodes/36.C0AqTZfD.js.br +0 -0
- package/build/client/_app/immutable/nodes/36.C0AqTZfD.js.gz +0 -0
- package/build/client/_app/immutable/nodes/37.C983Oc7Q.js +0 -23
- package/build/client/_app/immutable/nodes/37.C983Oc7Q.js.br +0 -0
- package/build/client/_app/immutable/nodes/37.C983Oc7Q.js.gz +0 -0
- package/build/client/_app/immutable/nodes/38.DZpVrKpZ.js +0 -1
- package/build/client/_app/immutable/nodes/38.DZpVrKpZ.js.br +0 -0
- package/build/client/_app/immutable/nodes/38.DZpVrKpZ.js.gz +0 -0
- package/build/client/_app/immutable/nodes/4.CrCa5tPK.js +0 -5
- package/build/client/_app/immutable/nodes/4.CrCa5tPK.js.br +0 -0
- package/build/client/_app/immutable/nodes/4.CrCa5tPK.js.gz +0 -0
- package/build/client/_app/immutable/nodes/40.DuKLsUmt.js +0 -6
- package/build/client/_app/immutable/nodes/40.DuKLsUmt.js.br +0 -0
- package/build/client/_app/immutable/nodes/40.DuKLsUmt.js.gz +0 -0
- package/build/client/_app/immutable/nodes/5.CB4i7ZNg.js +0 -1
- package/build/client/_app/immutable/nodes/5.CB4i7ZNg.js.br +0 -0
- package/build/client/_app/immutable/nodes/5.CB4i7ZNg.js.gz +0 -0
- package/build/client/_app/immutable/nodes/8.BV94HuPe.js +0 -3
- package/build/client/_app/immutable/nodes/8.BV94HuPe.js.br +0 -0
- package/build/client/_app/immutable/nodes/8.BV94HuPe.js.gz +0 -0
- package/build/client/_app/immutable/nodes/9.dDDTNF4u.js +0 -10
- package/build/client/_app/immutable/nodes/9.dDDTNF4u.js.br +0 -0
- package/build/client/_app/immutable/nodes/9.dDDTNF4u.js.gz +0 -0
- package/build/server/chunks/chunks/ConsoleWindow.js-Fy80ITde.js +0 -120
- package/build/server/chunks/chunks/DecisionForm.js-CGXVl0Ew.js +0 -246
- package/build/server/chunks/chunks/DecisionsBadge.js-B1u51GOK.js +0 -78
- package/build/server/chunks/chunks/Discussion.js-C0cR_sJ7.js +0 -581
- package/build/server/chunks/chunks/EtaLine.js-DZaZbteA.js +0 -41
- package/build/server/chunks/chunks/ResizableRail.js-D23G9R7d.js +0 -900
- package/build/server/chunks/chunks/Sheet.js-CjZDwlbd.js +0 -3958
- package/build/server/chunks/chunks/TaskView.js-DAZFWu1M.js +0 -3015
- package/build/server/chunks/chunks/TimeBar.js-BaEB0RHk.js +0 -32
- package/build/server/chunks/chunks/TimeLegend.js-Dk3obyPy.js +0 -29
- package/build/server/chunks/chunks/bell.js-CFf6k_A-.js +0 -194
- package/build/server/chunks/chunks/chat.svelte.js-o7Bx_hjm.js +0 -371
- package/build/server/chunks/chunks/decisionhome.js-B8fMEoGK.js +0 -311
- package/build/server/chunks/chunks/detail.js-AOyyGV6f.js +0 -149
- package/build/server/chunks/chunks/features.js-Dih8hX3K.js +0 -181
- package/build/server/chunks/chunks/feedback.js-Y_qeE4lk.js +0 -67
- package/build/server/chunks/chunks/handled.js-D9a3Vg06.js +0 -20
- package/build/server/chunks/chunks/inbox.js-BTGWlv8y.js +0 -222
- package/build/server/chunks/chunks/insights.js-CzzfyHGp.js +0 -100
- package/build/server/chunks/chunks/insights.svelte.js-F2Gg47lw.js +0 -564
- package/build/server/chunks/chunks/internal.js-YFFIkEGy.js +0 -151
- package/build/server/chunks/chunks/livereview.svelte.js-DeQC-NNP.js +0 -61
- package/build/server/chunks/chunks/marketplace-service.js-ByN9lMyn.js +0 -557
- package/build/server/chunks/chunks/ondeck.js-BV5Wby4b.js +0 -119
- package/build/server/chunks/chunks/package.js-CRRRb0vq.js +0 -160
- package/build/server/chunks/chunks/page.js-5YKGK16Q.js +0 -13
- package/build/server/chunks/chunks/previewhelper2.js-C8YozFzs.js +0 -210
- package/build/server/chunks/chunks/runtime.js-beTUQJvS.js +0 -25604
- package/build/server/chunks/chunks/scribe.js-sGGKDf0Q.js +0 -1317
- package/build/server/chunks/chunks/service.js-hNir0rQ0.js +0 -1339
- package/build/server/chunks/chunks/service2.js-CCi6VqWr.js +0 -835
- package/build/server/chunks/chunks/service3.js-CYxcsw27.js +0 -234
- package/build/server/chunks/chunks/settings.js-B5e9I92Q.js +0 -379
- package/build/server/chunks/chunks/slots.svelte.js-CLIV5nwM.js +0 -34
- package/build/server/chunks/chunks/starter.js-yK7UTpae.js +0 -400
- package/build/server/chunks/chunks/store.js-CNgqr3Sa.js +0 -332
- package/build/server/chunks/chunks/uploads.js-D6dIdsOn.js +0 -107
- package/build/server/chunks/chunks/view.js-C_sVwMxj.js +0 -76
- package/build/server/chunks/entries/endpoints/api/apps/_op_/_server.ts.js-DcDrpzQ0.js +0 -112
- package/build/server/chunks/entries/endpoints/api/cloud/_server.ts.js-PsKvo0EQ.js +0 -111
- package/build/server/chunks/entries/endpoints/api/cloud/previews/_server.ts.js-ChKr8jQB.js +0 -59
- package/build/server/chunks/entries/endpoints/api/crew/_server.ts.js-BYOITfdX.js +0 -75
- package/build/server/chunks/entries/endpoints/api/crew/messages/_server.ts.js-Cuml2nA8.js +0 -79
- package/build/server/chunks/entries/endpoints/api/events/_server.ts.js-oUq7VB-c.js +0 -154
- package/build/server/chunks/entries/endpoints/api/features/_server.ts.js-CoKMlAw2.js +0 -56
- package/build/server/chunks/entries/endpoints/api/files/_server.ts.js-CFB---55.js +0 -71
- package/build/server/chunks/entries/endpoints/api/firstmate/chat/_server.ts.js-38TWOJFC.js +0 -107
- package/build/server/chunks/entries/endpoints/api/firstmate/chat/archive/_server.ts.js-Ds4yFTov.js +0 -83
- package/build/server/chunks/entries/endpoints/api/firstmate/chat/history/_server.ts.js-BrfpEAdf.js +0 -73
- package/build/server/chunks/entries/endpoints/api/firstmate/chat/search/_server.ts.js-ClGkZJrE.js +0 -66
- package/build/server/chunks/entries/endpoints/api/firstmate/commands/_server.ts.js-BAi2jIUa.js +0 -66
- package/build/server/chunks/entries/endpoints/api/firstmate/dismiss/_server.ts.js-DU9fFldF.js +0 -67
- package/build/server/chunks/entries/endpoints/api/firstmate/input/_server.ts.js-rmxE3GDI.js +0 -73
- package/build/server/chunks/entries/endpoints/api/firstmate/interrupt/_server.ts.js-Er7ICTMc.js +0 -66
- package/build/server/chunks/entries/endpoints/api/firstmate/messages/_server.ts.js-CzhSZtJx.js +0 -115
- package/build/server/chunks/entries/endpoints/api/firstmate/pick/_server.ts.js-C62koQm8.js +0 -76
- package/build/server/chunks/entries/endpoints/api/firstmate/reactions/_server.ts.js-DmH3adF3.js +0 -87
- package/build/server/chunks/entries/endpoints/api/firstmate/signin/_server.ts.js-BTqcOxFr.js +0 -75
- package/build/server/chunks/entries/endpoints/api/firstmate/start/_server.ts.js-0H1slVlF.js +0 -66
- package/build/server/chunks/entries/endpoints/api/firstmate/uploads/_day_/_id_/_name_/_server.ts.js-pnIDY7K-.js +0 -32
- package/build/server/chunks/entries/endpoints/api/firstmate/uploads/_server.ts.js-BBzkAG43.js +0 -40
- package/build/server/chunks/entries/endpoints/api/fleet/_server.ts.js-D9IhzsNZ.js +0 -58
- package/build/server/chunks/entries/endpoints/api/health/_server.ts.js-Dzm8TJik.js +0 -58
- package/build/server/chunks/entries/endpoints/api/inbox/_server.ts.js-Cj-QPW9H.js +0 -85
- package/build/server/chunks/entries/endpoints/api/inbox/following/_server.ts.js-CQPAH9lf.js +0 -83
- package/build/server/chunks/entries/endpoints/api/inbox/report/_server.ts.js-ByfBJSzN.js +0 -76
- package/build/server/chunks/entries/endpoints/api/inbox/talk/_server.ts.js-DPhhSbn9.js +0 -168
- package/build/server/chunks/entries/endpoints/api/insights/_server.ts.js-Bg9HUq2z.js +0 -58
- package/build/server/chunks/entries/endpoints/api/live/_id_/end/_server.ts.js-DbDwbrB4.js +0 -87
- package/build/server/chunks/entries/endpoints/api/live/_server.ts.js-BCQlnrGe.js +0 -96
- package/build/server/chunks/entries/endpoints/api/live/scouts/_server.ts.js-C4IE5onc.js +0 -118
- package/build/server/chunks/entries/endpoints/api/live/settings/_server.ts.js-BEQa9lj6.js +0 -72
- package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/config/_server.ts.js-2JFQWMGG.js +0 -93
- package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/feedback/_server.ts.js-Bu0VmgeG.js +0 -82
- package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/feedback/summary/_server.ts.js-DMVzgRXs.js +0 -77
- package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/icon/_icon_/_server.ts.js-BkQZamil.js +0 -74
- package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/load/_server.ts.js-Dz9dAgEt.js +0 -27
- package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/ui/_...path_/_server.ts.js-D6m-gaJm.js +0 -81
- package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/update/_server.ts.js-D2F2UeX3.js +0 -39
- package/build/server/chunks/entries/endpoints/api/plugins/_server.ts.js-CMcKr8nq.js +0 -58
- package/build/server/chunks/entries/endpoints/api/plugins/inspect/_server.ts.js-CyX2kUrz.js +0 -39
- package/build/server/chunks/entries/endpoints/api/plugins/install/_server.ts.js-CAgJLmfJ.js +0 -42
- package/build/server/chunks/entries/endpoints/api/plugins/marketplace/_server.ts.js-C-YOUEeh.js +0 -63
- package/build/server/chunks/entries/endpoints/api/plugins/marketplace/icon/_name_/_server.ts.js-BuB_aUcs.js +0 -72
- package/build/server/chunks/entries/endpoints/api/plugins/marketplace/registries/_server.ts.js-uFBc9qAF.js +0 -69
- package/build/server/chunks/entries/endpoints/api/plugins/roles/_server.ts.js-BwP7m1ne.js +0 -73
- package/build/server/chunks/entries/endpoints/api/plugins/updates/_server.ts.js-BDXiQIdE.js +0 -27
- package/build/server/chunks/entries/endpoints/api/previews/check/_server.ts.js-BHTqJRTV.js +0 -81
- package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/_server.ts.js-DaExrOG9.js +0 -63
- package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/commands/_server.ts.js-BBcgKi4i.js +0 -72
- package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/consent/_server.ts.js-BPgyW_wK.js +0 -84
- package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/draft/_server.ts.js-B3_OvzWw.js +0 -71
- package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/file/_server.ts.js-C1qyVk-B.js +0 -94
- package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/test/_server.ts.js-CWjUpm9b.js +0 -77
- package/build/server/chunks/entries/endpoints/api/second-mate-setup/_server.ts.js-Y6iM0S6h.js +0 -473
- package/build/server/chunks/entries/endpoints/api/second-mates/_id_/link/_server.ts.js-C2XK2RjP.js +0 -88
- package/build/server/chunks/entries/endpoints/api/second-mates/_id_/peek/_server.ts.js-DOBoBUsW.js +0 -67
- package/build/server/chunks/entries/endpoints/api/services/_server.ts.js-ClGwOp1I.js +0 -77
- package/build/server/chunks/entries/endpoints/api/setup/_server.ts.js-DrfL6cjv.js +0 -137
- package/build/server/chunks/entries/endpoints/api/slots/_server.ts.js-CcZPyGtL.js +0 -66
- package/build/server/chunks/entries/endpoints/api/soundings/_server.ts.js-DA8MpdlA.js +0 -80
- package/build/server/chunks/entries/endpoints/api/soundings/beacon/_server.ts.js-C9MStV42.js +0 -66
- package/build/server/chunks/entries/endpoints/api/soundings/settings/_server.ts.js-aiZABdT4.js +0 -69
- package/build/server/chunks/entries/endpoints/api/tasks/_id_/_server.ts.js-CFWnCNhR.js +0 -63
- package/build/server/chunks/entries/endpoints/api/tasks/_id_/artifacts/_...name_/_server.ts.js-rUy8BKIx.js +0 -82
- package/build/server/chunks/entries/endpoints/api/tasks/_id_/chat/_server.ts.js-B0sfWkfC.js +0 -109
- package/build/server/chunks/entries/endpoints/api/tasks/_id_/diff/_server.ts.js-BwKBxIbZ.js +0 -75
- package/build/server/chunks/entries/endpoints/api/tasks/_id_/livereview/_server.ts.js-VsLkyd6z.js +0 -104
- package/build/server/chunks/entries/endpoints/api/tasks/_id_/output/_server.ts.js-sPq94TYM.js +0 -123
- package/build/server/chunks/entries/endpoints/api/tasks/_id_/preview/_server.ts.js-dlImNVbc.js +0 -77
- package/build/server/chunks/entries/endpoints/api/tasks/_id_/preview/helper/_server.ts.js-Ajt27nH3.js +0 -80
- package/build/server/chunks/entries/endpoints/api/vault/_server.ts.js-C7_DGaT1.js +0 -81
- package/build/server/chunks/entries/endpoints/api/voice/_server.ts.js-BPzYZcVX.js +0 -24
- package/build/server/chunks/entries/endpoints/api/voice/hear/_server.ts.js-tje_tDmn.js +0 -31
- package/build/server/chunks/entries/endpoints/api/voice/speak/_server.ts.js-CboOaWGF.js +0 -33
- package/build/server/chunks/entries/endpoints/api/wh-events/_server.ts.js-ByGfzq0k.js +0 -93
- package/build/server/chunks/entries/endpoints/api/wheelhouse/source/_server.ts.js-CAarY5F9.js +0 -40
- package/build/server/chunks/entries/endpoints/api/wheelhouse/update/_server.ts.js-CG8phUOI.js +0 -27
- package/build/server/chunks/entries/endpoints/api/wheelhouse/upgrade/_server.ts.js-DVALJQwH.js +0 -27
- package/build/server/chunks/entries/endpoints/tasks/_id_/live/_server.ts.js-DJbuQ133.js +0 -82
- package/build/server/chunks/entries/endpoints/tasks/_id_/review/_server.ts.js-C2GHSxyQ.js +0 -62
- package/build/server/chunks/entries/hooks.server.js-Glu4cfzQ.js +0 -104
- package/build/server/chunks/entries/pages/_layout.server.ts.js-C2Q75Dku.js +0 -54
- package/build/server/chunks/entries/pages/_layout.svelte.js-CvC6XBJv.js +0 -6027
- package/build/server/chunks/entries/pages/_page.server.ts.js-DdBa3OcX.js +0 -16
- package/build/server/chunks/entries/pages/_page.svelte.js-mP8Czi7r.js +0 -5776
- package/build/server/chunks/entries/pages/crew/_page.svelte.js-DPAqRea5.js +0 -114
- package/build/server/chunks/entries/pages/decisions/_page.server.ts.js-CHrBjN6U.js +0 -11
- package/build/server/chunks/entries/pages/decisions/_page.svelte.js-CpO0O1OU.js +0 -203
- package/build/server/chunks/entries/pages/deck/_page.server.ts.js-DVXZwj-D.js +0 -16
- package/build/server/chunks/entries/pages/deck/_page.svelte.js-BXRSYCJu.js +0 -92
- package/build/server/chunks/entries/pages/files/_page.server.ts.js-DPw8W3cO.js +0 -17
- package/build/server/chunks/entries/pages/headroom/_page.server.ts.js-BIxCYvRT.js +0 -11
- package/build/server/chunks/entries/pages/headroom/_page.svelte.js-DpQNL_3w.js +0 -296
- package/build/server/chunks/entries/pages/health/_page.server.ts.js-BmvIfRNN.js +0 -16
- package/build/server/chunks/entries/pages/health/_page.svelte.js-Hv9ZBH4n.js +0 -517
- package/build/server/chunks/entries/pages/inbox/_page.server.ts.js-DYmxSK6o.js +0 -11
- package/build/server/chunks/entries/pages/inbox/_page.svelte.js-B0s298VF.js +0 -653
- package/build/server/chunks/entries/pages/more/_page.svelte.js-CufPJWN5.js +0 -152
- package/build/server/chunks/entries/pages/plugins/_plugin_/_page_/_page.server.ts.js-BM100wYL.js +0 -16
- package/build/server/chunks/entries/pages/plugins/_plugin_/_page_/_page.svelte.js-C5XPxJUP.js +0 -60
- package/build/server/chunks/entries/pages/projects/_id_/_page.server.ts.js-CsxshObH.js +0 -23
- package/build/server/chunks/entries/pages/projects/_id_/_page.svelte.js-DHr4nadD.js +0 -982
- package/build/server/chunks/entries/pages/projects/_id_/_plugin_/_tab_/_page.server.ts.js-CdLIMcCE.js +0 -21
- package/build/server/chunks/entries/pages/projects/_id_/_plugin_/_tab_/_page.svelte.js-Bf2ZytHx.js +0 -82
- package/build/server/chunks/entries/pages/projects/_id_/passage/_page.server.ts.js-UDHRJeTm.js +0 -27
- package/build/server/chunks/entries/pages/projects/_id_/passage/_page.svelte.js-JqXcyM-3.js +0 -420
- package/build/server/chunks/entries/pages/projects/_id_/passage/edit/_page.server.ts.js-CRrQcUKj.js +0 -15
- package/build/server/chunks/entries/pages/remotes/_page.server.ts.js-Cb7pCLmf.js +0 -11
- package/build/server/chunks/entries/pages/remotes/_page.svelte.js-DTAfyct4.js +0 -347
- package/build/server/chunks/entries/pages/second-mates/_page.server.ts.js-uBLPj30-.js +0 -13
- package/build/server/chunks/entries/pages/settings/_page.server.ts.js-B3XP4Mv2.js +0 -12
- package/build/server/chunks/entries/pages/settings/chat/_page.server.ts.js-tOduOAOo.js +0 -18
- package/build/server/chunks/entries/pages/settings/discussion/_page.server.ts.js-Dewu_3lC.js +0 -19
- package/build/server/chunks/entries/pages/settings/events/_page.server.ts.js-Bosk4MgV.js +0 -16
- package/build/server/chunks/entries/pages/settings/experimental/_page.server.ts.js-CZtFqHkG.js +0 -15
- package/build/server/chunks/entries/pages/settings/experimental/_page.svelte.js-DvO07PUQ.js +0 -83
- package/build/server/chunks/entries/pages/settings/firstmate/_page.server.ts.js-Dm16bW7a.js +0 -797
- package/build/server/chunks/entries/pages/settings/gateway/_page.server.ts.js-DKBRV1Kv.js +0 -11
- package/build/server/chunks/entries/pages/settings/gateway/_page.svelte.js-82UzMnWS.js +0 -258
- package/build/server/chunks/entries/pages/settings/plugins/_page.server.ts.js-BuXRLXt-.js +0 -19
- package/build/server/chunks/entries/pages/settings/plugins/_plugin_/_page.server.ts.js-aYwltwyo.js +0 -17
- package/build/server/chunks/entries/pages/settings/setup/_page.server.ts.js-CBnW3vAL.js +0 -11
- package/build/server/chunks/entries/pages/settings/update/_page.server.ts.js-mmHvowRY.js +0 -11
- package/build/server/chunks/entries/pages/settings/voice/_page.server.ts.js-BtcArcMy.js +0 -15
- package/build/server/chunks/entries/pages/setup/_page.server.ts.js-CWVSledS.js +0 -18
- package/build/server/chunks/entries/pages/tasks/_id_/_page.server.ts.js-J4OLpWmN.js +0 -36
- package/build/server/chunks/entries/pages/tasks/_id_/_page.svelte.js-DS5ww-c8.js +0 -111
- package/build/server/chunks/entries/pages/tasks/_id_/doc/_page.server.ts.js-D9dQvbNO.js +0 -24
- package/build/server/chunks/entries/pages/time/_page.server.ts.js-DD-uGmhK.js +0 -11
- package/build/server/chunks/entries/pages/time/_page.svelte.js-CWz6ug4X.js +0 -109
- package/build/server/chunks/handler-Rlgr3qgp.js +0 -1474
- package/build/server/chunks/index.js-Cq8PeAYv.js +0 -4296
- package/build/server/chunks/manifest.js-D2nXE20x.js +0 -969
- package/build/server/chunks/nodes/0.js-D-AyokcK.js +0 -66
- package/build/server/chunks/nodes/1.js-CEP8Wkc6.js +0 -9
- package/build/server/chunks/nodes/10.js-DQ05XfkH.js +0 -65
- package/build/server/chunks/nodes/11.js-CUI7nHXF.js +0 -63
- package/build/server/chunks/nodes/12.js-D4Qq5-L5.js +0 -12
- package/build/server/chunks/nodes/13.js-B5b0noB_.js +0 -9
- package/build/server/chunks/nodes/14.js-Dz8rjKdf.js +0 -9
- package/build/server/chunks/nodes/15.js-CqjaR54q.js +0 -63
- package/build/server/chunks/nodes/16.js-CSFtMqSs.js +0 -66
- package/build/server/chunks/nodes/17.js-DIXFVzud.js +0 -64
- package/build/server/chunks/nodes/18.js-D0OLmYtB.js +0 -65
- package/build/server/chunks/nodes/19.js-CjK_nc0R.js +0 -64
- package/build/server/chunks/nodes/2.js-C5aTOTCK.js +0 -63
- package/build/server/chunks/nodes/20.js-F_X6MGKx.js +0 -24
- package/build/server/chunks/nodes/21.js-CLD608m1.js +0 -25
- package/build/server/chunks/nodes/22.js-DJDOD8dQ.js +0 -9
- package/build/server/chunks/nodes/23.js-DlV1Jrn6.js +0 -25
- package/build/server/chunks/nodes/24.js-1ccZSvaM.js +0 -63
- package/build/server/chunks/nodes/26.js-P2RkHNN_.js +0 -64
- package/build/server/chunks/nodes/27.js-CHcCaT46.js +0 -63
- package/build/server/chunks/nodes/28.js-mNdmkKwl.js +0 -25
- package/build/server/chunks/nodes/29.js-Cds-0H9b.js +0 -63
- package/build/server/chunks/nodes/3.js-Dm0t0ruE.js +0 -9
- package/build/server/chunks/nodes/30.js-CbuDQapx.js +0 -24
- package/build/server/chunks/nodes/31.js-DoqM4d_j.js +0 -22
- package/build/server/chunks/nodes/32.js-uWw9LwYe.js +0 -63
- package/build/server/chunks/nodes/33.js-Bi8tKoQ6.js +0 -66
- package/build/server/chunks/nodes/34.js-CPjjhmOm.js +0 -65
- package/build/server/chunks/nodes/35.js-CBKkzHgr.js +0 -26
- package/build/server/chunks/nodes/36.js-CTvFiRyW.js +0 -65
- package/build/server/chunks/nodes/37.js-1vY9OMcr.js +0 -67
- package/build/server/chunks/nodes/38.js-DhcBz8pw.js +0 -64
- package/build/server/chunks/nodes/39.js-5F3z7S6Q.js +0 -64
- package/build/server/chunks/nodes/4.js-KHEhlqP6.js +0 -63
- package/build/server/chunks/nodes/40.js-DcvGK4bV.js +0 -63
- package/build/server/chunks/nodes/5.js-_ddQMODI.js +0 -63
- package/build/server/chunks/nodes/7.js-CmYiMFTa.js +0 -63
- package/build/server/chunks/nodes/8.js-LyEm37G-.js +0 -14
- package/build/server/chunks/nodes/9.js-47Ps2sky.js +0 -63
|
@@ -0,0 +1,3958 @@
|
|
|
1
|
+
import { ab as bind_props, ah as props_id, a9 as spread_props, _ as derived, a4 as attributes, ak as escape_html } from './index.js-WvnSQZ6-.js';
|
|
2
|
+
import { D as Dialog, P as Portal, n as noop, b as boxWith, C as Context, a as PresenceManager, w as watch, s as simpleBox, c as createBitsAttrs, d as Dialog_overlay, e as Dialog_content, f as createId, g as attachRef, h as DOMContext, i as isTouch, E as ENTER, S as SPACE, j as getDataOpenClosed, k as boolToStr, l as isElement$1, m as isTabbable, o as getDataTransitionAttrs, p as mergeProps, q as boxFrom, r as getDocument, u as useId, t as cssToStyleObj, v as isNotNull, x as styleToString, y as getWindow$1, z as defaultWindow, A as Dialog_title, B as Dialog_close, F as Scroll_lock, G as Focus_scope, H as Escape_layer, I as Dismissible_layer, T as Text_selection_layer } from './dialog-content.js-CqyR_d65.js';
|
|
3
|
+
import { c as createSubscriber } from './index-server.js-Pk0DPLOC.js';
|
|
4
|
+
import { o as on } from './root.js-B9xvZRlK.js';
|
|
5
|
+
import { p as parseAttachments } from './attachments.js-BAnnqpd-.js';
|
|
6
|
+
import { l as linkedPreviews, a as pageOf, i as isBoard } from './previewnote.js-DB6VK2fp.js';
|
|
7
|
+
import { e as extractUrls } from './urls.js-CM6aklCF.js';
|
|
8
|
+
import { p as projectStats } from './views.js-8PiJAcXG.js';
|
|
9
|
+
import { X } from './x.js-9ON0g_Et.js';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Custom positioning reference element.
|
|
13
|
+
* @see https://floating-ui.com/docs/virtual-elements
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
const sides = ['top', 'right', 'bottom', 'left'];
|
|
17
|
+
const min = Math.min;
|
|
18
|
+
const max = Math.max;
|
|
19
|
+
const round = Math.round;
|
|
20
|
+
const createCoords = v => ({
|
|
21
|
+
x: v,
|
|
22
|
+
y: v
|
|
23
|
+
});
|
|
24
|
+
const oppositeSideMap = {
|
|
25
|
+
left: 'right',
|
|
26
|
+
right: 'left',
|
|
27
|
+
bottom: 'top',
|
|
28
|
+
top: 'bottom'
|
|
29
|
+
};
|
|
30
|
+
function clamp(start, value, end) {
|
|
31
|
+
return max(start, min(value, end));
|
|
32
|
+
}
|
|
33
|
+
function evaluate(value, param) {
|
|
34
|
+
return typeof value === 'function' ? value(param) : value;
|
|
35
|
+
}
|
|
36
|
+
function getSide$1(placement) {
|
|
37
|
+
return placement.split('-')[0];
|
|
38
|
+
}
|
|
39
|
+
function getAlignment(placement) {
|
|
40
|
+
return placement.split('-')[1];
|
|
41
|
+
}
|
|
42
|
+
function getOppositeAxis(axis) {
|
|
43
|
+
return axis === 'x' ? 'y' : 'x';
|
|
44
|
+
}
|
|
45
|
+
function getAxisLength(axis) {
|
|
46
|
+
return axis === 'y' ? 'height' : 'width';
|
|
47
|
+
}
|
|
48
|
+
function getSideAxis(placement) {
|
|
49
|
+
const firstChar = placement[0];
|
|
50
|
+
return firstChar === 't' || firstChar === 'b' ? 'y' : 'x';
|
|
51
|
+
}
|
|
52
|
+
function getAlignmentAxis(placement) {
|
|
53
|
+
return getOppositeAxis(getSideAxis(placement));
|
|
54
|
+
}
|
|
55
|
+
function getAlignmentSides(placement, rects, rtl) {
|
|
56
|
+
if (rtl === void 0) {
|
|
57
|
+
rtl = false;
|
|
58
|
+
}
|
|
59
|
+
const alignment = getAlignment(placement);
|
|
60
|
+
const alignmentAxis = getAlignmentAxis(placement);
|
|
61
|
+
const length = getAxisLength(alignmentAxis);
|
|
62
|
+
let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';
|
|
63
|
+
if (rects.reference[length] > rects.floating[length]) {
|
|
64
|
+
mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
|
|
65
|
+
}
|
|
66
|
+
return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
|
|
67
|
+
}
|
|
68
|
+
function getExpandedPlacements(placement) {
|
|
69
|
+
const oppositePlacement = getOppositePlacement(placement);
|
|
70
|
+
return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
|
|
71
|
+
}
|
|
72
|
+
function getOppositeAlignmentPlacement(placement) {
|
|
73
|
+
return placement.includes('start') ? placement.replace('start', 'end') : placement.replace('end', 'start');
|
|
74
|
+
}
|
|
75
|
+
const lrPlacement = ['left', 'right'];
|
|
76
|
+
const rlPlacement = ['right', 'left'];
|
|
77
|
+
const tbPlacement = ['top', 'bottom'];
|
|
78
|
+
const btPlacement = ['bottom', 'top'];
|
|
79
|
+
function getSideList(side, isStart, rtl) {
|
|
80
|
+
switch (side) {
|
|
81
|
+
case 'top':
|
|
82
|
+
case 'bottom':
|
|
83
|
+
if (rtl) return isStart ? rlPlacement : lrPlacement;
|
|
84
|
+
return isStart ? lrPlacement : rlPlacement;
|
|
85
|
+
case 'left':
|
|
86
|
+
case 'right':
|
|
87
|
+
return isStart ? tbPlacement : btPlacement;
|
|
88
|
+
default:
|
|
89
|
+
return [];
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
|
|
93
|
+
const alignment = getAlignment(placement);
|
|
94
|
+
let list = getSideList(getSide$1(placement), direction === 'start', rtl);
|
|
95
|
+
if (alignment) {
|
|
96
|
+
list = list.map(side => side + "-" + alignment);
|
|
97
|
+
if (flipAlignment) {
|
|
98
|
+
list = list.concat(list.map(getOppositeAlignmentPlacement));
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
return list;
|
|
102
|
+
}
|
|
103
|
+
function getOppositePlacement(placement) {
|
|
104
|
+
const side = getSide$1(placement);
|
|
105
|
+
return oppositeSideMap[side] + placement.slice(side.length);
|
|
106
|
+
}
|
|
107
|
+
function expandPaddingObject(padding) {
|
|
108
|
+
var _padding$top, _padding$right, _padding$bottom, _padding$left;
|
|
109
|
+
return {
|
|
110
|
+
top: (_padding$top = padding.top) != null ? _padding$top : 0,
|
|
111
|
+
right: (_padding$right = padding.right) != null ? _padding$right : 0,
|
|
112
|
+
bottom: (_padding$bottom = padding.bottom) != null ? _padding$bottom : 0,
|
|
113
|
+
left: (_padding$left = padding.left) != null ? _padding$left : 0
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
function getPaddingObject(padding) {
|
|
117
|
+
return typeof padding !== 'number' ? expandPaddingObject(padding) : {
|
|
118
|
+
top: padding,
|
|
119
|
+
right: padding,
|
|
120
|
+
bottom: padding,
|
|
121
|
+
left: padding
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
function rectToClientRect(rect) {
|
|
125
|
+
const {
|
|
126
|
+
x,
|
|
127
|
+
y,
|
|
128
|
+
width,
|
|
129
|
+
height
|
|
130
|
+
} = rect;
|
|
131
|
+
return {
|
|
132
|
+
width,
|
|
133
|
+
height,
|
|
134
|
+
top: y,
|
|
135
|
+
left: x,
|
|
136
|
+
right: x + width,
|
|
137
|
+
bottom: y + height,
|
|
138
|
+
x,
|
|
139
|
+
y
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
function computeCoordsFromPlacement(_ref, placement, rtl) {
|
|
144
|
+
let {
|
|
145
|
+
reference,
|
|
146
|
+
floating
|
|
147
|
+
} = _ref;
|
|
148
|
+
const sideAxis = getSideAxis(placement);
|
|
149
|
+
const alignmentAxis = getAlignmentAxis(placement);
|
|
150
|
+
const alignLength = getAxisLength(alignmentAxis);
|
|
151
|
+
const side = getSide$1(placement);
|
|
152
|
+
const isVertical = sideAxis === 'y';
|
|
153
|
+
const commonX = reference.x + reference.width / 2 - floating.width / 2;
|
|
154
|
+
const commonY = reference.y + reference.height / 2 - floating.height / 2;
|
|
155
|
+
const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
|
|
156
|
+
let coords;
|
|
157
|
+
switch (side) {
|
|
158
|
+
case 'top':
|
|
159
|
+
coords = {
|
|
160
|
+
x: commonX,
|
|
161
|
+
y: reference.y - floating.height
|
|
162
|
+
};
|
|
163
|
+
break;
|
|
164
|
+
case 'bottom':
|
|
165
|
+
coords = {
|
|
166
|
+
x: commonX,
|
|
167
|
+
y: reference.y + reference.height
|
|
168
|
+
};
|
|
169
|
+
break;
|
|
170
|
+
case 'right':
|
|
171
|
+
coords = {
|
|
172
|
+
x: reference.x + reference.width,
|
|
173
|
+
y: commonY
|
|
174
|
+
};
|
|
175
|
+
break;
|
|
176
|
+
case 'left':
|
|
177
|
+
coords = {
|
|
178
|
+
x: reference.x - floating.width,
|
|
179
|
+
y: commonY
|
|
180
|
+
};
|
|
181
|
+
break;
|
|
182
|
+
default:
|
|
183
|
+
coords = {
|
|
184
|
+
x: reference.x,
|
|
185
|
+
y: reference.y
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
const alignment = getAlignment(placement);
|
|
189
|
+
if (alignment) {
|
|
190
|
+
coords[alignmentAxis] += commonAlign * (alignment === 'end' ? 1 : -1) * (rtl && isVertical ? -1 : 1);
|
|
191
|
+
}
|
|
192
|
+
return coords;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Resolves with an object of overflow side offsets that determine how much the
|
|
197
|
+
* element is overflowing a given clipping boundary on each side.
|
|
198
|
+
* - positive = overflowing the boundary by that number of pixels
|
|
199
|
+
* - negative = how many pixels left before it will overflow
|
|
200
|
+
* - 0 = lies flush with the boundary
|
|
201
|
+
* @see https://floating-ui.com/docs/detectOverflow
|
|
202
|
+
*/
|
|
203
|
+
async function detectOverflow(state, options) {
|
|
204
|
+
var _await$platform$isEle;
|
|
205
|
+
if (options === void 0) {
|
|
206
|
+
options = {};
|
|
207
|
+
}
|
|
208
|
+
const {
|
|
209
|
+
x,
|
|
210
|
+
y,
|
|
211
|
+
platform,
|
|
212
|
+
rects,
|
|
213
|
+
elements,
|
|
214
|
+
strategy
|
|
215
|
+
} = state;
|
|
216
|
+
const {
|
|
217
|
+
boundary = 'clippingAncestors',
|
|
218
|
+
rootBoundary = 'viewport',
|
|
219
|
+
elementContext = 'floating',
|
|
220
|
+
altBoundary = false,
|
|
221
|
+
padding = 0
|
|
222
|
+
} = evaluate(options, state);
|
|
223
|
+
const paddingObject = getPaddingObject(padding);
|
|
224
|
+
const altContext = elementContext === 'floating' ? 'reference' : 'floating';
|
|
225
|
+
const element = elements[altBoundary ? altContext : elementContext];
|
|
226
|
+
const clippingClientRect = rectToClientRect(await platform.getClippingRect({
|
|
227
|
+
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))),
|
|
228
|
+
boundary,
|
|
229
|
+
rootBoundary,
|
|
230
|
+
strategy
|
|
231
|
+
}));
|
|
232
|
+
const rect = elementContext === 'floating' ? {
|
|
233
|
+
x,
|
|
234
|
+
y,
|
|
235
|
+
width: rects.floating.width,
|
|
236
|
+
height: rects.floating.height
|
|
237
|
+
} : rects.reference;
|
|
238
|
+
const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
|
|
239
|
+
const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) && (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
|
|
240
|
+
x: 1,
|
|
241
|
+
y: 1
|
|
242
|
+
};
|
|
243
|
+
const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
244
|
+
elements,
|
|
245
|
+
rect,
|
|
246
|
+
offsetParent,
|
|
247
|
+
strategy
|
|
248
|
+
}) : rect);
|
|
249
|
+
return {
|
|
250
|
+
top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
|
|
251
|
+
bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
|
|
252
|
+
left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
|
|
253
|
+
right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
// Maximum number of resets that can occur before bailing to avoid infinite reset loops.
|
|
258
|
+
const MAX_RESET_COUNT = 50;
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* Computes the `x` and `y` coordinates that will place the floating element
|
|
262
|
+
* next to a given reference element.
|
|
263
|
+
*
|
|
264
|
+
* This export does not have any `platform` interface logic. You will need to
|
|
265
|
+
* write one for the platform you are using Floating UI with.
|
|
266
|
+
*/
|
|
267
|
+
const computePosition$1 = async (reference, floating, config) => {
|
|
268
|
+
const {
|
|
269
|
+
placement = 'bottom',
|
|
270
|
+
strategy = 'absolute',
|
|
271
|
+
middleware = [],
|
|
272
|
+
platform
|
|
273
|
+
} = config;
|
|
274
|
+
const platformWithDetectOverflow = platform.detectOverflow ? platform : {
|
|
275
|
+
...platform,
|
|
276
|
+
detectOverflow
|
|
277
|
+
};
|
|
278
|
+
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
|
|
279
|
+
let rects = await platform.getElementRects({
|
|
280
|
+
reference,
|
|
281
|
+
floating,
|
|
282
|
+
strategy
|
|
283
|
+
});
|
|
284
|
+
let {
|
|
285
|
+
x,
|
|
286
|
+
y
|
|
287
|
+
} = computeCoordsFromPlacement(rects, placement, rtl);
|
|
288
|
+
let statefulPlacement = placement;
|
|
289
|
+
let resetCount = 0;
|
|
290
|
+
const middlewareData = {};
|
|
291
|
+
for (let i = 0; i < middleware.length; i++) {
|
|
292
|
+
const currentMiddleware = middleware[i];
|
|
293
|
+
if (!currentMiddleware) {
|
|
294
|
+
continue;
|
|
295
|
+
}
|
|
296
|
+
const {
|
|
297
|
+
name,
|
|
298
|
+
fn
|
|
299
|
+
} = currentMiddleware;
|
|
300
|
+
const {
|
|
301
|
+
x: nextX,
|
|
302
|
+
y: nextY,
|
|
303
|
+
data,
|
|
304
|
+
reset
|
|
305
|
+
} = await fn({
|
|
306
|
+
x,
|
|
307
|
+
y,
|
|
308
|
+
initialPlacement: placement,
|
|
309
|
+
placement: statefulPlacement,
|
|
310
|
+
strategy,
|
|
311
|
+
middlewareData,
|
|
312
|
+
rects,
|
|
313
|
+
platform: platformWithDetectOverflow,
|
|
314
|
+
elements: {
|
|
315
|
+
reference,
|
|
316
|
+
floating
|
|
317
|
+
}
|
|
318
|
+
});
|
|
319
|
+
x = nextX != null ? nextX : x;
|
|
320
|
+
y = nextY != null ? nextY : y;
|
|
321
|
+
middlewareData[name] = {
|
|
322
|
+
...middlewareData[name],
|
|
323
|
+
...data
|
|
324
|
+
};
|
|
325
|
+
if (reset && resetCount < MAX_RESET_COUNT) {
|
|
326
|
+
resetCount++;
|
|
327
|
+
if (typeof reset === 'object') {
|
|
328
|
+
if (reset.placement) {
|
|
329
|
+
statefulPlacement = reset.placement;
|
|
330
|
+
}
|
|
331
|
+
if (reset.rects) {
|
|
332
|
+
rects = reset.rects === true ? await platform.getElementRects({
|
|
333
|
+
reference,
|
|
334
|
+
floating,
|
|
335
|
+
strategy
|
|
336
|
+
}) : reset.rects;
|
|
337
|
+
}
|
|
338
|
+
({
|
|
339
|
+
x,
|
|
340
|
+
y
|
|
341
|
+
} = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
|
|
342
|
+
}
|
|
343
|
+
i = -1;
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
return {
|
|
347
|
+
x,
|
|
348
|
+
y,
|
|
349
|
+
placement: statefulPlacement,
|
|
350
|
+
strategy,
|
|
351
|
+
middlewareData
|
|
352
|
+
};
|
|
353
|
+
};
|
|
354
|
+
|
|
355
|
+
/**
|
|
356
|
+
* Provides data to position an inner element of the floating element so that it
|
|
357
|
+
* appears centered to the reference element.
|
|
358
|
+
* @see https://floating-ui.com/docs/arrow
|
|
359
|
+
*/
|
|
360
|
+
const arrow$1 = options => ({
|
|
361
|
+
name: 'arrow',
|
|
362
|
+
options,
|
|
363
|
+
async fn(state) {
|
|
364
|
+
const {
|
|
365
|
+
x,
|
|
366
|
+
y,
|
|
367
|
+
placement,
|
|
368
|
+
rects,
|
|
369
|
+
platform,
|
|
370
|
+
elements,
|
|
371
|
+
middlewareData
|
|
372
|
+
} = state;
|
|
373
|
+
// Since `element` is required, we don't Partial<> the type.
|
|
374
|
+
const {
|
|
375
|
+
element,
|
|
376
|
+
padding = 0
|
|
377
|
+
} = evaluate(options, state) || {};
|
|
378
|
+
if (element == null) {
|
|
379
|
+
return {};
|
|
380
|
+
}
|
|
381
|
+
const paddingObject = getPaddingObject(padding);
|
|
382
|
+
const coords = {
|
|
383
|
+
x,
|
|
384
|
+
y
|
|
385
|
+
};
|
|
386
|
+
const axis = getAlignmentAxis(placement);
|
|
387
|
+
const length = getAxisLength(axis);
|
|
388
|
+
const arrowDimensions = await platform.getDimensions(element);
|
|
389
|
+
const isYAxis = axis === 'y';
|
|
390
|
+
const minProp = isYAxis ? 'top' : 'left';
|
|
391
|
+
const maxProp = isYAxis ? 'bottom' : 'right';
|
|
392
|
+
const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';
|
|
393
|
+
const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
|
|
394
|
+
const startDiff = coords[axis] - rects.reference[axis];
|
|
395
|
+
const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));
|
|
396
|
+
let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;
|
|
397
|
+
|
|
398
|
+
// DOM platform can return `window` as the `offsetParent`.
|
|
399
|
+
if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {
|
|
400
|
+
clientSize = elements.floating[clientProp] || rects.floating[length];
|
|
401
|
+
}
|
|
402
|
+
const centerToReference = endDiff / 2 - startDiff / 2;
|
|
403
|
+
|
|
404
|
+
// If the padding is large enough that it causes the arrow to no longer be
|
|
405
|
+
// centered, modify the padding so that it is centered.
|
|
406
|
+
const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;
|
|
407
|
+
const minPadding = min(paddingObject[minProp], largestPossiblePadding);
|
|
408
|
+
const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);
|
|
409
|
+
|
|
410
|
+
// Make sure the arrow doesn't overflow the floating element if the center
|
|
411
|
+
// point is outside the floating element's bounds.
|
|
412
|
+
const max = clientSize - arrowDimensions[length] - maxPadding;
|
|
413
|
+
const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
|
|
414
|
+
const offset = clamp(minPadding, center, max);
|
|
415
|
+
|
|
416
|
+
// If the reference is small enough that the arrow's padding causes it to
|
|
417
|
+
// to point to nothing for an aligned placement, adjust the offset of the
|
|
418
|
+
// floating element itself. To ensure `shift()` continues to take action,
|
|
419
|
+
// a single reset is performed when this is true.
|
|
420
|
+
const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < minPadding ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
|
|
421
|
+
const alignmentOffset = shouldAddOffset ? center < minPadding ? center - minPadding : center - max : 0;
|
|
422
|
+
return {
|
|
423
|
+
[axis]: coords[axis] + alignmentOffset,
|
|
424
|
+
data: {
|
|
425
|
+
[axis]: offset,
|
|
426
|
+
centerOffset: center - offset - alignmentOffset,
|
|
427
|
+
...(shouldAddOffset && {
|
|
428
|
+
alignmentOffset
|
|
429
|
+
})
|
|
430
|
+
},
|
|
431
|
+
reset: shouldAddOffset
|
|
432
|
+
};
|
|
433
|
+
}
|
|
434
|
+
});
|
|
435
|
+
|
|
436
|
+
/**
|
|
437
|
+
* Optimizes the visibility of the floating element by flipping the `placement`
|
|
438
|
+
* in order to keep it in view when the preferred placement(s) will overflow the
|
|
439
|
+
* clipping boundary. Alternative to `autoPlacement`.
|
|
440
|
+
* @see https://floating-ui.com/docs/flip
|
|
441
|
+
*/
|
|
442
|
+
const flip$1 = function (options) {
|
|
443
|
+
if (options === void 0) {
|
|
444
|
+
options = {};
|
|
445
|
+
}
|
|
446
|
+
return {
|
|
447
|
+
name: 'flip',
|
|
448
|
+
options,
|
|
449
|
+
async fn(state) {
|
|
450
|
+
var _middlewareData$arrow, _middlewareData$flip;
|
|
451
|
+
const {
|
|
452
|
+
placement,
|
|
453
|
+
middlewareData,
|
|
454
|
+
rects,
|
|
455
|
+
initialPlacement,
|
|
456
|
+
platform,
|
|
457
|
+
elements
|
|
458
|
+
} = state;
|
|
459
|
+
const {
|
|
460
|
+
mainAxis: checkMainAxis = true,
|
|
461
|
+
crossAxis: checkCrossAxis = true,
|
|
462
|
+
fallbackPlacements: specifiedFallbackPlacements,
|
|
463
|
+
fallbackStrategy = 'bestFit',
|
|
464
|
+
fallbackAxisSideDirection = 'none',
|
|
465
|
+
flipAlignment = true,
|
|
466
|
+
...detectOverflowOptions
|
|
467
|
+
} = evaluate(options, state);
|
|
468
|
+
|
|
469
|
+
// If a reset by the arrow was caused due to an alignment offset being
|
|
470
|
+
// added, we should skip any logic now since `flip()` has already done its
|
|
471
|
+
// work.
|
|
472
|
+
// https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643
|
|
473
|
+
if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
|
|
474
|
+
return {};
|
|
475
|
+
}
|
|
476
|
+
const side = getSide$1(placement);
|
|
477
|
+
const initialSideAxis = getSideAxis(initialPlacement);
|
|
478
|
+
const isBasePlacement = getSide$1(initialPlacement) === initialPlacement;
|
|
479
|
+
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
|
|
480
|
+
const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
|
|
481
|
+
const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none';
|
|
482
|
+
if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {
|
|
483
|
+
fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
|
|
484
|
+
}
|
|
485
|
+
const placements = [initialPlacement, ...fallbackPlacements];
|
|
486
|
+
const overflow = await platform.detectOverflow(state, detectOverflowOptions);
|
|
487
|
+
const overflows = [];
|
|
488
|
+
let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
|
|
489
|
+
if (checkMainAxis) {
|
|
490
|
+
overflows.push(overflow[side]);
|
|
491
|
+
}
|
|
492
|
+
if (checkCrossAxis) {
|
|
493
|
+
const sides = getAlignmentSides(placement, rects, rtl);
|
|
494
|
+
overflows.push(overflow[sides[0]], overflow[sides[1]]);
|
|
495
|
+
}
|
|
496
|
+
overflowsData = [...overflowsData, {
|
|
497
|
+
placement,
|
|
498
|
+
overflows
|
|
499
|
+
}];
|
|
500
|
+
|
|
501
|
+
// One or more sides is overflowing.
|
|
502
|
+
if (!overflows.every(side => side <= 0)) {
|
|
503
|
+
var _middlewareData$flip2, _overflowsData$filter;
|
|
504
|
+
const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
|
|
505
|
+
const nextPlacement = placements[nextIndex];
|
|
506
|
+
if (nextPlacement) {
|
|
507
|
+
const ignoreCrossAxisOverflow = checkCrossAxis === 'alignment' ? initialSideAxis !== getSideAxis(nextPlacement) : false;
|
|
508
|
+
if (!ignoreCrossAxisOverflow ||
|
|
509
|
+
// We leave the current main axis only if every placement on that axis
|
|
510
|
+
// overflows the main axis.
|
|
511
|
+
overflowsData.every(d => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) {
|
|
512
|
+
// Try next placement and re-run the lifecycle.
|
|
513
|
+
return {
|
|
514
|
+
data: {
|
|
515
|
+
index: nextIndex,
|
|
516
|
+
overflows: overflowsData
|
|
517
|
+
},
|
|
518
|
+
reset: {
|
|
519
|
+
placement: nextPlacement
|
|
520
|
+
}
|
|
521
|
+
};
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
// First, find the candidates that fit on the mainAxis side of overflow,
|
|
526
|
+
// then find the placement that fits the best on the main crossAxis side.
|
|
527
|
+
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;
|
|
528
|
+
|
|
529
|
+
// Otherwise fallback.
|
|
530
|
+
if (!resetPlacement) {
|
|
531
|
+
switch (fallbackStrategy) {
|
|
532
|
+
case 'bestFit':
|
|
533
|
+
{
|
|
534
|
+
var _overflowsData$filter2;
|
|
535
|
+
const placement = (_overflowsData$filter2 = overflowsData.filter(d => {
|
|
536
|
+
if (hasFallbackAxisSideDirection) {
|
|
537
|
+
const currentSideAxis = getSideAxis(d.placement);
|
|
538
|
+
return currentSideAxis === initialSideAxis ||
|
|
539
|
+
// Create a bias to the `y` side axis due to horizontal
|
|
540
|
+
// reading directions favoring greater width.
|
|
541
|
+
currentSideAxis === 'y';
|
|
542
|
+
}
|
|
543
|
+
return true;
|
|
544
|
+
}).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];
|
|
545
|
+
if (placement) {
|
|
546
|
+
resetPlacement = placement;
|
|
547
|
+
}
|
|
548
|
+
break;
|
|
549
|
+
}
|
|
550
|
+
case 'initialPlacement':
|
|
551
|
+
resetPlacement = initialPlacement;
|
|
552
|
+
break;
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
if (placement !== resetPlacement) {
|
|
556
|
+
return {
|
|
557
|
+
reset: {
|
|
558
|
+
placement: resetPlacement
|
|
559
|
+
}
|
|
560
|
+
};
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
return {};
|
|
564
|
+
}
|
|
565
|
+
};
|
|
566
|
+
};
|
|
567
|
+
|
|
568
|
+
function getSideOffsets(overflow, rect) {
|
|
569
|
+
return {
|
|
570
|
+
top: overflow.top - rect.height,
|
|
571
|
+
right: overflow.right - rect.width,
|
|
572
|
+
bottom: overflow.bottom - rect.height,
|
|
573
|
+
left: overflow.left - rect.width
|
|
574
|
+
};
|
|
575
|
+
}
|
|
576
|
+
function isAnySideFullyClipped(overflow) {
|
|
577
|
+
return sides.some(side => overflow[side] >= 0);
|
|
578
|
+
}
|
|
579
|
+
/**
|
|
580
|
+
* Provides data to hide the floating element in applicable situations, such as
|
|
581
|
+
* when it is not in the same clipping context as the reference element.
|
|
582
|
+
* @see https://floating-ui.com/docs/hide
|
|
583
|
+
*/
|
|
584
|
+
const hide$1 = function (options) {
|
|
585
|
+
if (options === void 0) {
|
|
586
|
+
options = {};
|
|
587
|
+
}
|
|
588
|
+
return {
|
|
589
|
+
name: 'hide',
|
|
590
|
+
options,
|
|
591
|
+
async fn(state) {
|
|
592
|
+
const {
|
|
593
|
+
rects,
|
|
594
|
+
platform
|
|
595
|
+
} = state;
|
|
596
|
+
const {
|
|
597
|
+
strategy = 'referenceHidden',
|
|
598
|
+
...detectOverflowOptions
|
|
599
|
+
} = evaluate(options, state);
|
|
600
|
+
switch (strategy) {
|
|
601
|
+
case 'referenceHidden':
|
|
602
|
+
{
|
|
603
|
+
const overflow = await platform.detectOverflow(state, {
|
|
604
|
+
...detectOverflowOptions,
|
|
605
|
+
elementContext: 'reference'
|
|
606
|
+
});
|
|
607
|
+
const offsets = getSideOffsets(overflow, rects.reference);
|
|
608
|
+
return {
|
|
609
|
+
data: {
|
|
610
|
+
referenceHiddenOffsets: offsets,
|
|
611
|
+
referenceHidden: isAnySideFullyClipped(offsets)
|
|
612
|
+
}
|
|
613
|
+
};
|
|
614
|
+
}
|
|
615
|
+
case 'escaped':
|
|
616
|
+
{
|
|
617
|
+
const overflow = await platform.detectOverflow(state, {
|
|
618
|
+
...detectOverflowOptions,
|
|
619
|
+
altBoundary: true
|
|
620
|
+
});
|
|
621
|
+
const offsets = getSideOffsets(overflow, rects.floating);
|
|
622
|
+
return {
|
|
623
|
+
data: {
|
|
624
|
+
escapedOffsets: offsets,
|
|
625
|
+
escaped: isAnySideFullyClipped(offsets)
|
|
626
|
+
}
|
|
627
|
+
};
|
|
628
|
+
}
|
|
629
|
+
default:
|
|
630
|
+
{
|
|
631
|
+
return {};
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
};
|
|
636
|
+
};
|
|
637
|
+
|
|
638
|
+
const originSides = /*#__PURE__*/new Set(['left', 'top']);
|
|
639
|
+
|
|
640
|
+
// For type backwards-compatibility, the `OffsetOptions` type was also
|
|
641
|
+
// Derivable.
|
|
642
|
+
|
|
643
|
+
async function convertValueToCoords(state, options) {
|
|
644
|
+
const {
|
|
645
|
+
placement,
|
|
646
|
+
platform,
|
|
647
|
+
elements
|
|
648
|
+
} = state;
|
|
649
|
+
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
|
|
650
|
+
const side = getSide$1(placement);
|
|
651
|
+
const alignment = getAlignment(placement);
|
|
652
|
+
const isVertical = getSideAxis(placement) === 'y';
|
|
653
|
+
const mainAxisMulti = originSides.has(side) ? -1 : 1;
|
|
654
|
+
const crossAxisMulti = rtl && isVertical ? -1 : 1;
|
|
655
|
+
const rawValue = evaluate(options, state);
|
|
656
|
+
|
|
657
|
+
// eslint-disable-next-line prefer-const
|
|
658
|
+
let {
|
|
659
|
+
mainAxis,
|
|
660
|
+
crossAxis,
|
|
661
|
+
alignmentAxis
|
|
662
|
+
} = typeof rawValue === 'number' ? {
|
|
663
|
+
mainAxis: rawValue,
|
|
664
|
+
crossAxis: 0,
|
|
665
|
+
alignmentAxis: null
|
|
666
|
+
} : {
|
|
667
|
+
mainAxis: rawValue.mainAxis || 0,
|
|
668
|
+
crossAxis: rawValue.crossAxis || 0,
|
|
669
|
+
alignmentAxis: rawValue.alignmentAxis
|
|
670
|
+
};
|
|
671
|
+
if (alignment && typeof alignmentAxis === 'number') {
|
|
672
|
+
crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;
|
|
673
|
+
}
|
|
674
|
+
return isVertical ? {
|
|
675
|
+
x: crossAxis * crossAxisMulti,
|
|
676
|
+
y: mainAxis * mainAxisMulti
|
|
677
|
+
} : {
|
|
678
|
+
x: mainAxis * mainAxisMulti,
|
|
679
|
+
y: crossAxis * crossAxisMulti
|
|
680
|
+
};
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
/**
|
|
684
|
+
* Modifies the placement by translating the floating element along the
|
|
685
|
+
* specified axes.
|
|
686
|
+
* A number (shorthand for `mainAxis` or distance), or an axes configuration
|
|
687
|
+
* object may be passed.
|
|
688
|
+
* @see https://floating-ui.com/docs/offset
|
|
689
|
+
*/
|
|
690
|
+
const offset$1 = function (options) {
|
|
691
|
+
if (options === void 0) {
|
|
692
|
+
options = 0;
|
|
693
|
+
}
|
|
694
|
+
return {
|
|
695
|
+
name: 'offset',
|
|
696
|
+
options,
|
|
697
|
+
async fn(state) {
|
|
698
|
+
var _middlewareData$offse, _middlewareData$arrow;
|
|
699
|
+
const {
|
|
700
|
+
x,
|
|
701
|
+
y,
|
|
702
|
+
placement,
|
|
703
|
+
middlewareData
|
|
704
|
+
} = state;
|
|
705
|
+
const diffCoords = await convertValueToCoords(state, options);
|
|
706
|
+
|
|
707
|
+
// If the placement is the same and the arrow caused an alignment offset
|
|
708
|
+
// then we don't need to change the positioning coordinates.
|
|
709
|
+
if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
|
|
710
|
+
return {};
|
|
711
|
+
}
|
|
712
|
+
return {
|
|
713
|
+
x: x + diffCoords.x,
|
|
714
|
+
y: y + diffCoords.y,
|
|
715
|
+
data: {
|
|
716
|
+
...diffCoords,
|
|
717
|
+
placement
|
|
718
|
+
}
|
|
719
|
+
};
|
|
720
|
+
}
|
|
721
|
+
};
|
|
722
|
+
};
|
|
723
|
+
|
|
724
|
+
/**
|
|
725
|
+
* Optimizes the visibility of the floating element by shifting it in order to
|
|
726
|
+
* keep it in view when it will overflow the clipping boundary.
|
|
727
|
+
* @see https://floating-ui.com/docs/shift
|
|
728
|
+
*/
|
|
729
|
+
const shift$1 = function (options) {
|
|
730
|
+
if (options === void 0) {
|
|
731
|
+
options = {};
|
|
732
|
+
}
|
|
733
|
+
return {
|
|
734
|
+
name: 'shift',
|
|
735
|
+
options,
|
|
736
|
+
async fn(state) {
|
|
737
|
+
const {
|
|
738
|
+
x,
|
|
739
|
+
y,
|
|
740
|
+
placement,
|
|
741
|
+
platform
|
|
742
|
+
} = state;
|
|
743
|
+
const {
|
|
744
|
+
mainAxis: checkMainAxis = true,
|
|
745
|
+
crossAxis: checkCrossAxis = false,
|
|
746
|
+
limiter = {
|
|
747
|
+
fn: _ref => {
|
|
748
|
+
let {
|
|
749
|
+
x,
|
|
750
|
+
y
|
|
751
|
+
} = _ref;
|
|
752
|
+
return {
|
|
753
|
+
x,
|
|
754
|
+
y
|
|
755
|
+
};
|
|
756
|
+
}
|
|
757
|
+
},
|
|
758
|
+
...detectOverflowOptions
|
|
759
|
+
} = evaluate(options, state);
|
|
760
|
+
const coords = {
|
|
761
|
+
x,
|
|
762
|
+
y
|
|
763
|
+
};
|
|
764
|
+
const overflow = await platform.detectOverflow(state, detectOverflowOptions);
|
|
765
|
+
const crossAxis = getSideAxis(placement);
|
|
766
|
+
const mainAxis = getOppositeAxis(crossAxis);
|
|
767
|
+
let mainAxisCoord = coords[mainAxis];
|
|
768
|
+
let crossAxisCoord = coords[crossAxis];
|
|
769
|
+
const clampCoord = (axis, coord) => clamp(coord + overflow[axis === 'y' ? 'top' : 'left'], coord, coord - overflow[axis === 'y' ? 'bottom' : 'right']);
|
|
770
|
+
if (checkMainAxis) {
|
|
771
|
+
mainAxisCoord = clampCoord(mainAxis, mainAxisCoord);
|
|
772
|
+
}
|
|
773
|
+
if (checkCrossAxis) {
|
|
774
|
+
crossAxisCoord = clampCoord(crossAxis, crossAxisCoord);
|
|
775
|
+
}
|
|
776
|
+
const limitedCoords = limiter.fn({
|
|
777
|
+
...state,
|
|
778
|
+
[mainAxis]: mainAxisCoord,
|
|
779
|
+
[crossAxis]: crossAxisCoord
|
|
780
|
+
});
|
|
781
|
+
return {
|
|
782
|
+
...limitedCoords,
|
|
783
|
+
data: {
|
|
784
|
+
x: limitedCoords.x - x,
|
|
785
|
+
y: limitedCoords.y - y,
|
|
786
|
+
enabled: {
|
|
787
|
+
[mainAxis]: checkMainAxis,
|
|
788
|
+
[crossAxis]: checkCrossAxis
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
};
|
|
792
|
+
}
|
|
793
|
+
};
|
|
794
|
+
};
|
|
795
|
+
/**
|
|
796
|
+
* Built-in `limiter` that will stop `shift()` at a certain point.
|
|
797
|
+
*/
|
|
798
|
+
const limitShift$1 = function (options) {
|
|
799
|
+
if (options === void 0) {
|
|
800
|
+
options = {};
|
|
801
|
+
}
|
|
802
|
+
return {
|
|
803
|
+
options,
|
|
804
|
+
fn(state) {
|
|
805
|
+
var _rawOffset$mainAxis, _rawOffset$crossAxis;
|
|
806
|
+
const {
|
|
807
|
+
x,
|
|
808
|
+
y,
|
|
809
|
+
placement,
|
|
810
|
+
rects,
|
|
811
|
+
middlewareData
|
|
812
|
+
} = state;
|
|
813
|
+
const {
|
|
814
|
+
offset = 0,
|
|
815
|
+
mainAxis: checkMainAxis = true,
|
|
816
|
+
crossAxis: checkCrossAxis = true
|
|
817
|
+
} = evaluate(options, state);
|
|
818
|
+
const coords = {
|
|
819
|
+
x,
|
|
820
|
+
y
|
|
821
|
+
};
|
|
822
|
+
const crossAxis = getSideAxis(placement);
|
|
823
|
+
const mainAxis = getOppositeAxis(crossAxis);
|
|
824
|
+
let mainAxisCoord = coords[mainAxis];
|
|
825
|
+
let crossAxisCoord = coords[crossAxis];
|
|
826
|
+
const rawOffset = evaluate(offset, state);
|
|
827
|
+
const computedOffset = typeof rawOffset === 'number' ? {
|
|
828
|
+
mainAxis: rawOffset,
|
|
829
|
+
crossAxis: 0
|
|
830
|
+
} : {
|
|
831
|
+
mainAxis: (_rawOffset$mainAxis = rawOffset.mainAxis) != null ? _rawOffset$mainAxis : 0,
|
|
832
|
+
crossAxis: (_rawOffset$crossAxis = rawOffset.crossAxis) != null ? _rawOffset$crossAxis : 0
|
|
833
|
+
};
|
|
834
|
+
if (checkMainAxis) {
|
|
835
|
+
const len = mainAxis === 'y' ? 'height' : 'width';
|
|
836
|
+
const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;
|
|
837
|
+
const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;
|
|
838
|
+
if (mainAxisCoord < limitMin) {
|
|
839
|
+
mainAxisCoord = limitMin;
|
|
840
|
+
} else if (mainAxisCoord > limitMax) {
|
|
841
|
+
mainAxisCoord = limitMax;
|
|
842
|
+
}
|
|
843
|
+
}
|
|
844
|
+
if (checkCrossAxis) {
|
|
845
|
+
var _middlewareData$offse, _middlewareData$offse2;
|
|
846
|
+
const len = mainAxis === 'y' ? 'width' : 'height';
|
|
847
|
+
const isOriginSide = originSides.has(getSide$1(placement));
|
|
848
|
+
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);
|
|
849
|
+
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);
|
|
850
|
+
if (crossAxisCoord < limitMin) {
|
|
851
|
+
crossAxisCoord = limitMin;
|
|
852
|
+
} else if (crossAxisCoord > limitMax) {
|
|
853
|
+
crossAxisCoord = limitMax;
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
return {
|
|
857
|
+
[mainAxis]: mainAxisCoord,
|
|
858
|
+
[crossAxis]: crossAxisCoord
|
|
859
|
+
};
|
|
860
|
+
}
|
|
861
|
+
};
|
|
862
|
+
};
|
|
863
|
+
|
|
864
|
+
// Method syntax keeps callback parameters bivariant, but expressing the
|
|
865
|
+
// explicit `| undefined` required by `exactOptionalPropertyTypes` needs
|
|
866
|
+
// property syntax, which is contravariant under `strictFunctionTypes`.
|
|
867
|
+
// Extracting the function from a method position restores that bivariance so
|
|
868
|
+
// consumers can still assign callbacks with narrower parameter types.
|
|
869
|
+
|
|
870
|
+
/**
|
|
871
|
+
* Provides data that allows you to change the size of the floating element —
|
|
872
|
+
* for instance, prevent it from overflowing the clipping boundary or match the
|
|
873
|
+
* width of the reference element.
|
|
874
|
+
* @see https://floating-ui.com/docs/size
|
|
875
|
+
*/
|
|
876
|
+
const size$1 = function (options) {
|
|
877
|
+
if (options === void 0) {
|
|
878
|
+
options = {};
|
|
879
|
+
}
|
|
880
|
+
return {
|
|
881
|
+
name: 'size',
|
|
882
|
+
options,
|
|
883
|
+
async fn(state) {
|
|
884
|
+
const {
|
|
885
|
+
placement,
|
|
886
|
+
rects,
|
|
887
|
+
platform,
|
|
888
|
+
elements
|
|
889
|
+
} = state;
|
|
890
|
+
const {
|
|
891
|
+
apply = () => {},
|
|
892
|
+
...detectOverflowOptions
|
|
893
|
+
} = evaluate(options, state);
|
|
894
|
+
const overflow = await platform.detectOverflow(state, detectOverflowOptions);
|
|
895
|
+
const side = getSide$1(placement);
|
|
896
|
+
const alignment = getAlignment(placement);
|
|
897
|
+
const isYAxis = getSideAxis(placement) === 'y';
|
|
898
|
+
const {
|
|
899
|
+
width,
|
|
900
|
+
height
|
|
901
|
+
} = rects.floating;
|
|
902
|
+
let heightSide;
|
|
903
|
+
let widthSide;
|
|
904
|
+
if (side === 'top' || side === 'bottom') {
|
|
905
|
+
heightSide = side;
|
|
906
|
+
widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right';
|
|
907
|
+
} else {
|
|
908
|
+
widthSide = side;
|
|
909
|
+
heightSide = alignment === 'end' ? 'top' : 'bottom';
|
|
910
|
+
}
|
|
911
|
+
const maximumClippingHeight = height - overflow.top - overflow.bottom;
|
|
912
|
+
const maximumClippingWidth = width - overflow.left - overflow.right;
|
|
913
|
+
const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);
|
|
914
|
+
const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);
|
|
915
|
+
const shiftData = state.middlewareData.shift;
|
|
916
|
+
const noShift = !shiftData;
|
|
917
|
+
let availableHeight = overflowAvailableHeight;
|
|
918
|
+
let availableWidth = overflowAvailableWidth;
|
|
919
|
+
if (shiftData != null && shiftData.enabled.x) {
|
|
920
|
+
availableWidth = maximumClippingWidth;
|
|
921
|
+
}
|
|
922
|
+
if (shiftData != null && shiftData.enabled.y) {
|
|
923
|
+
availableHeight = maximumClippingHeight;
|
|
924
|
+
}
|
|
925
|
+
if (noShift && !alignment) {
|
|
926
|
+
if (isYAxis) {
|
|
927
|
+
availableWidth = width - 2 * max(overflow.left, overflow.right);
|
|
928
|
+
} else {
|
|
929
|
+
availableHeight = height - 2 * max(overflow.top, overflow.bottom);
|
|
930
|
+
}
|
|
931
|
+
}
|
|
932
|
+
await apply({
|
|
933
|
+
...state,
|
|
934
|
+
availableWidth,
|
|
935
|
+
availableHeight
|
|
936
|
+
});
|
|
937
|
+
const nextDimensions = await platform.getDimensions(elements.floating);
|
|
938
|
+
if (width !== nextDimensions.width || height !== nextDimensions.height) {
|
|
939
|
+
return {
|
|
940
|
+
reset: {
|
|
941
|
+
rects: true
|
|
942
|
+
}
|
|
943
|
+
};
|
|
944
|
+
}
|
|
945
|
+
return {};
|
|
946
|
+
}
|
|
947
|
+
};
|
|
948
|
+
};
|
|
949
|
+
|
|
950
|
+
function hasWindow() {
|
|
951
|
+
return typeof window !== 'undefined';
|
|
952
|
+
}
|
|
953
|
+
function getNodeName(node) {
|
|
954
|
+
if (isNode(node)) {
|
|
955
|
+
return (node.nodeName || '').toLowerCase();
|
|
956
|
+
}
|
|
957
|
+
// Mocked nodes in testing environments may not be instances of Node. By
|
|
958
|
+
// returning `#document` an infinite loop won't occur.
|
|
959
|
+
// https://github.com/floating-ui/floating-ui/issues/2317
|
|
960
|
+
return '#document';
|
|
961
|
+
}
|
|
962
|
+
function getWindow(node) {
|
|
963
|
+
var _node$ownerDocument;
|
|
964
|
+
return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
|
|
965
|
+
}
|
|
966
|
+
function getDocumentElement(node) {
|
|
967
|
+
var _ref;
|
|
968
|
+
return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
|
|
969
|
+
}
|
|
970
|
+
function isNode(value) {
|
|
971
|
+
if (!hasWindow()) {
|
|
972
|
+
return false;
|
|
973
|
+
}
|
|
974
|
+
return value instanceof Node || value instanceof getWindow(value).Node;
|
|
975
|
+
}
|
|
976
|
+
function isElement(value) {
|
|
977
|
+
if (!hasWindow()) {
|
|
978
|
+
return false;
|
|
979
|
+
}
|
|
980
|
+
return value instanceof Element || value instanceof getWindow(value).Element;
|
|
981
|
+
}
|
|
982
|
+
function isHTMLElement(value) {
|
|
983
|
+
if (!hasWindow()) {
|
|
984
|
+
return false;
|
|
985
|
+
}
|
|
986
|
+
return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
|
|
987
|
+
}
|
|
988
|
+
function isShadowRoot(value) {
|
|
989
|
+
if (!hasWindow() || typeof ShadowRoot === 'undefined') {
|
|
990
|
+
return false;
|
|
991
|
+
}
|
|
992
|
+
return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
|
|
993
|
+
}
|
|
994
|
+
function isOverflowElement(element) {
|
|
995
|
+
const {
|
|
996
|
+
overflow,
|
|
997
|
+
overflowX,
|
|
998
|
+
overflowY,
|
|
999
|
+
display
|
|
1000
|
+
} = getComputedStyle$1(element);
|
|
1001
|
+
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== 'inline' && display !== 'contents';
|
|
1002
|
+
}
|
|
1003
|
+
function isTableElement(element) {
|
|
1004
|
+
return /^(table|td|th)$/.test(getNodeName(element));
|
|
1005
|
+
}
|
|
1006
|
+
function isTopLayer(element) {
|
|
1007
|
+
try {
|
|
1008
|
+
if (element.matches(':popover-open')) {
|
|
1009
|
+
return true;
|
|
1010
|
+
}
|
|
1011
|
+
} catch (_e) {
|
|
1012
|
+
// no-op
|
|
1013
|
+
}
|
|
1014
|
+
try {
|
|
1015
|
+
return element.matches(':modal');
|
|
1016
|
+
} catch (_e) {
|
|
1017
|
+
return false;
|
|
1018
|
+
}
|
|
1019
|
+
}
|
|
1020
|
+
const willChangeRe = /transform|translate|scale|rotate|perspective|filter/;
|
|
1021
|
+
const containRe = /paint|layout|strict|content/;
|
|
1022
|
+
const isNotNone = value => !!value && value !== 'none';
|
|
1023
|
+
let isWebKitValue;
|
|
1024
|
+
function isContainingBlock(elementOrCss) {
|
|
1025
|
+
const css = isElement(elementOrCss) ? getComputedStyle$1(elementOrCss) : elementOrCss;
|
|
1026
|
+
|
|
1027
|
+
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
|
1028
|
+
// https://drafts.csswg.org/css-transforms-2/#individual-transforms
|
|
1029
|
+
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 || '');
|
|
1030
|
+
}
|
|
1031
|
+
function getContainingBlock(element) {
|
|
1032
|
+
let currentNode = getParentNode(element);
|
|
1033
|
+
while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
1034
|
+
if (isContainingBlock(currentNode)) {
|
|
1035
|
+
return currentNode;
|
|
1036
|
+
} else if (isTopLayer(currentNode)) {
|
|
1037
|
+
return null;
|
|
1038
|
+
}
|
|
1039
|
+
currentNode = getParentNode(currentNode);
|
|
1040
|
+
}
|
|
1041
|
+
return null;
|
|
1042
|
+
}
|
|
1043
|
+
function isWebKit() {
|
|
1044
|
+
if (isWebKitValue == null) {
|
|
1045
|
+
isWebKitValue = typeof CSS !== 'undefined' && CSS.supports && CSS.supports('-webkit-backdrop-filter', 'none');
|
|
1046
|
+
}
|
|
1047
|
+
return isWebKitValue;
|
|
1048
|
+
}
|
|
1049
|
+
function isLastTraversableNode(node) {
|
|
1050
|
+
return /^(html|body|#document)$/.test(getNodeName(node));
|
|
1051
|
+
}
|
|
1052
|
+
function getComputedStyle$1(element) {
|
|
1053
|
+
return getWindow(element).getComputedStyle(element);
|
|
1054
|
+
}
|
|
1055
|
+
function getNodeScroll(element) {
|
|
1056
|
+
if (isElement(element)) {
|
|
1057
|
+
return {
|
|
1058
|
+
scrollLeft: element.scrollLeft,
|
|
1059
|
+
scrollTop: element.scrollTop
|
|
1060
|
+
};
|
|
1061
|
+
}
|
|
1062
|
+
return {
|
|
1063
|
+
scrollLeft: element.scrollX,
|
|
1064
|
+
scrollTop: element.scrollY
|
|
1065
|
+
};
|
|
1066
|
+
}
|
|
1067
|
+
function getParentNode(node) {
|
|
1068
|
+
if (getNodeName(node) === 'html') {
|
|
1069
|
+
return node;
|
|
1070
|
+
}
|
|
1071
|
+
const result =
|
|
1072
|
+
// Step into the shadow DOM of the parent of a slotted node.
|
|
1073
|
+
node.assignedSlot ||
|
|
1074
|
+
// DOM Element detected.
|
|
1075
|
+
node.parentNode ||
|
|
1076
|
+
// ShadowRoot detected.
|
|
1077
|
+
isShadowRoot(node) && node.host ||
|
|
1078
|
+
// Fallback.
|
|
1079
|
+
getDocumentElement(node);
|
|
1080
|
+
return isShadowRoot(result) ? result.host : result;
|
|
1081
|
+
}
|
|
1082
|
+
function getNearestOverflowAncestor(node) {
|
|
1083
|
+
const parentNode = getParentNode(node);
|
|
1084
|
+
if (isLastTraversableNode(parentNode)) {
|
|
1085
|
+
return (node.ownerDocument || node).body;
|
|
1086
|
+
}
|
|
1087
|
+
if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
|
|
1088
|
+
return parentNode;
|
|
1089
|
+
}
|
|
1090
|
+
return getNearestOverflowAncestor(parentNode);
|
|
1091
|
+
}
|
|
1092
|
+
function getOverflowAncestors(node, list, traverseIframes) {
|
|
1093
|
+
var _node$ownerDocument2;
|
|
1094
|
+
if (list === void 0) {
|
|
1095
|
+
list = [];
|
|
1096
|
+
}
|
|
1097
|
+
const scrollableAncestor = getNearestOverflowAncestor(node);
|
|
1098
|
+
const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
|
|
1099
|
+
const win = getWindow(scrollableAncestor);
|
|
1100
|
+
if (isBody) {
|
|
1101
|
+
getFrameElement(win);
|
|
1102
|
+
return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], []);
|
|
1103
|
+
} else {
|
|
1104
|
+
return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, []));
|
|
1105
|
+
}
|
|
1106
|
+
}
|
|
1107
|
+
function getFrameElement(win) {
|
|
1108
|
+
return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
|
|
1109
|
+
}
|
|
1110
|
+
|
|
1111
|
+
function getCssDimensions(element) {
|
|
1112
|
+
const css = getComputedStyle$1(element);
|
|
1113
|
+
// In testing environments, the `width` and `height` properties are empty
|
|
1114
|
+
// strings for SVG elements, returning NaN. Fallback to `0` in this case.
|
|
1115
|
+
let width = parseFloat(css.width) || 0;
|
|
1116
|
+
let height = parseFloat(css.height) || 0;
|
|
1117
|
+
const hasOffset = isHTMLElement(element);
|
|
1118
|
+
const offsetWidth = hasOffset ? element.offsetWidth : width;
|
|
1119
|
+
const offsetHeight = hasOffset ? element.offsetHeight : height;
|
|
1120
|
+
const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
|
|
1121
|
+
if (shouldFallback) {
|
|
1122
|
+
width = offsetWidth;
|
|
1123
|
+
height = offsetHeight;
|
|
1124
|
+
}
|
|
1125
|
+
return {
|
|
1126
|
+
width,
|
|
1127
|
+
height,
|
|
1128
|
+
$: shouldFallback
|
|
1129
|
+
};
|
|
1130
|
+
}
|
|
1131
|
+
|
|
1132
|
+
function unwrapElement(element) {
|
|
1133
|
+
return !isElement(element) ? element.contextElement : element;
|
|
1134
|
+
}
|
|
1135
|
+
|
|
1136
|
+
function getScale(element) {
|
|
1137
|
+
const domElement = unwrapElement(element);
|
|
1138
|
+
if (!isHTMLElement(domElement)) {
|
|
1139
|
+
return createCoords(1);
|
|
1140
|
+
}
|
|
1141
|
+
const rect = domElement.getBoundingClientRect();
|
|
1142
|
+
const {
|
|
1143
|
+
width,
|
|
1144
|
+
height,
|
|
1145
|
+
$
|
|
1146
|
+
} = getCssDimensions(domElement);
|
|
1147
|
+
let x = ($ ? round(rect.width) : rect.width) / width;
|
|
1148
|
+
let y = ($ ? round(rect.height) : rect.height) / height;
|
|
1149
|
+
|
|
1150
|
+
// 0, NaN, or Infinity should always fallback to 1.
|
|
1151
|
+
|
|
1152
|
+
if (!x || !Number.isFinite(x)) {
|
|
1153
|
+
x = 1;
|
|
1154
|
+
}
|
|
1155
|
+
if (!y || !Number.isFinite(y)) {
|
|
1156
|
+
y = 1;
|
|
1157
|
+
}
|
|
1158
|
+
return {
|
|
1159
|
+
x,
|
|
1160
|
+
y
|
|
1161
|
+
};
|
|
1162
|
+
}
|
|
1163
|
+
|
|
1164
|
+
const noOffsets = /*#__PURE__*/createCoords(0);
|
|
1165
|
+
function getVisualOffsets(element) {
|
|
1166
|
+
const win = getWindow(element);
|
|
1167
|
+
if (!isWebKit() || !win.visualViewport) {
|
|
1168
|
+
return noOffsets;
|
|
1169
|
+
}
|
|
1170
|
+
return {
|
|
1171
|
+
x: win.visualViewport.offsetLeft,
|
|
1172
|
+
y: win.visualViewport.offsetTop
|
|
1173
|
+
};
|
|
1174
|
+
}
|
|
1175
|
+
function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
|
|
1176
|
+
if (isFixed === void 0) {
|
|
1177
|
+
isFixed = false;
|
|
1178
|
+
}
|
|
1179
|
+
return !!floatingOffsetParent && isFixed && floatingOffsetParent === getWindow(element);
|
|
1180
|
+
}
|
|
1181
|
+
|
|
1182
|
+
function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
|
|
1183
|
+
if (includeScale === void 0) {
|
|
1184
|
+
includeScale = false;
|
|
1185
|
+
}
|
|
1186
|
+
if (isFixedStrategy === void 0) {
|
|
1187
|
+
isFixedStrategy = false;
|
|
1188
|
+
}
|
|
1189
|
+
const clientRect = element.getBoundingClientRect();
|
|
1190
|
+
const domElement = unwrapElement(element);
|
|
1191
|
+
let scale = createCoords(1);
|
|
1192
|
+
if (includeScale) {
|
|
1193
|
+
if (offsetParent) {
|
|
1194
|
+
if (isElement(offsetParent)) {
|
|
1195
|
+
scale = getScale(offsetParent);
|
|
1196
|
+
}
|
|
1197
|
+
} else {
|
|
1198
|
+
scale = getScale(element);
|
|
1199
|
+
}
|
|
1200
|
+
}
|
|
1201
|
+
const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
|
|
1202
|
+
let x = (clientRect.left + visualOffsets.x) / scale.x;
|
|
1203
|
+
let y = (clientRect.top + visualOffsets.y) / scale.y;
|
|
1204
|
+
let width = clientRect.width / scale.x;
|
|
1205
|
+
let height = clientRect.height / scale.y;
|
|
1206
|
+
if (domElement && offsetParent) {
|
|
1207
|
+
const win = getWindow(domElement);
|
|
1208
|
+
const offsetWin = isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
|
|
1209
|
+
let currentWin = win;
|
|
1210
|
+
let currentIFrame = getFrameElement(currentWin);
|
|
1211
|
+
while (currentIFrame && offsetWin !== currentWin) {
|
|
1212
|
+
const iframeScale = getScale(currentIFrame);
|
|
1213
|
+
const iframeRect = currentIFrame.getBoundingClientRect();
|
|
1214
|
+
const css = getComputedStyle$1(currentIFrame);
|
|
1215
|
+
const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
|
|
1216
|
+
const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
|
|
1217
|
+
x *= iframeScale.x;
|
|
1218
|
+
y *= iframeScale.y;
|
|
1219
|
+
width *= iframeScale.x;
|
|
1220
|
+
height *= iframeScale.y;
|
|
1221
|
+
x += left;
|
|
1222
|
+
y += top;
|
|
1223
|
+
currentWin = getWindow(currentIFrame);
|
|
1224
|
+
currentIFrame = getFrameElement(currentWin);
|
|
1225
|
+
}
|
|
1226
|
+
}
|
|
1227
|
+
return rectToClientRect({
|
|
1228
|
+
width,
|
|
1229
|
+
height,
|
|
1230
|
+
x,
|
|
1231
|
+
y
|
|
1232
|
+
});
|
|
1233
|
+
}
|
|
1234
|
+
|
|
1235
|
+
// If <html> has a CSS width greater than the viewport, then this will be
|
|
1236
|
+
// incorrect for RTL.
|
|
1237
|
+
function getWindowScrollBarX(element, rect) {
|
|
1238
|
+
const leftScroll = getNodeScroll(element).scrollLeft;
|
|
1239
|
+
if (!rect) {
|
|
1240
|
+
return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;
|
|
1241
|
+
}
|
|
1242
|
+
return rect.left + leftScroll;
|
|
1243
|
+
}
|
|
1244
|
+
|
|
1245
|
+
function getHTMLOffset(documentElement, scroll) {
|
|
1246
|
+
const htmlRect = documentElement.getBoundingClientRect();
|
|
1247
|
+
const x = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);
|
|
1248
|
+
const y = htmlRect.top + scroll.scrollTop;
|
|
1249
|
+
return {
|
|
1250
|
+
x,
|
|
1251
|
+
y
|
|
1252
|
+
};
|
|
1253
|
+
}
|
|
1254
|
+
|
|
1255
|
+
function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
1256
|
+
let {
|
|
1257
|
+
elements,
|
|
1258
|
+
rect,
|
|
1259
|
+
offsetParent,
|
|
1260
|
+
strategy
|
|
1261
|
+
} = _ref;
|
|
1262
|
+
const isFixed = strategy === 'fixed';
|
|
1263
|
+
const documentElement = getDocumentElement(offsetParent);
|
|
1264
|
+
const topLayer = elements ? isTopLayer(elements.floating) : false;
|
|
1265
|
+
if (offsetParent === documentElement || topLayer && isFixed) {
|
|
1266
|
+
return rect;
|
|
1267
|
+
}
|
|
1268
|
+
let scroll = {
|
|
1269
|
+
scrollLeft: 0,
|
|
1270
|
+
scrollTop: 0
|
|
1271
|
+
};
|
|
1272
|
+
let scale = createCoords(1);
|
|
1273
|
+
const offsets = createCoords(0);
|
|
1274
|
+
const isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
1275
|
+
if (isOffsetParentAnElement || !isFixed) {
|
|
1276
|
+
if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
|
|
1277
|
+
scroll = getNodeScroll(offsetParent);
|
|
1278
|
+
}
|
|
1279
|
+
if (isOffsetParentAnElement) {
|
|
1280
|
+
const offsetRect = getBoundingClientRect(offsetParent);
|
|
1281
|
+
scale = getScale(offsetParent);
|
|
1282
|
+
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
1283
|
+
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
1284
|
+
}
|
|
1285
|
+
}
|
|
1286
|
+
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
|
|
1287
|
+
return {
|
|
1288
|
+
width: rect.width * scale.x,
|
|
1289
|
+
height: rect.height * scale.y,
|
|
1290
|
+
x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,
|
|
1291
|
+
y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y
|
|
1292
|
+
};
|
|
1293
|
+
}
|
|
1294
|
+
|
|
1295
|
+
function getClientRects(element) {
|
|
1296
|
+
return element.getClientRects ? Array.from(element.getClientRects()) : [];
|
|
1297
|
+
}
|
|
1298
|
+
|
|
1299
|
+
// Gets the entire size of the scrollable document area, even extending outside
|
|
1300
|
+
// of the `<html>` and `<body>` rect bounds if horizontally scrollable.
|
|
1301
|
+
function getDocumentRect(html) {
|
|
1302
|
+
const scroll = getNodeScroll(html);
|
|
1303
|
+
const body = html.ownerDocument.body;
|
|
1304
|
+
const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
|
|
1305
|
+
const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
|
|
1306
|
+
let x = -scroll.scrollLeft + getWindowScrollBarX(html);
|
|
1307
|
+
const y = -scroll.scrollTop;
|
|
1308
|
+
if (getComputedStyle$1(body).direction === 'rtl') {
|
|
1309
|
+
x += max(html.clientWidth, body.clientWidth) - width;
|
|
1310
|
+
}
|
|
1311
|
+
return {
|
|
1312
|
+
width,
|
|
1313
|
+
height,
|
|
1314
|
+
x,
|
|
1315
|
+
y
|
|
1316
|
+
};
|
|
1317
|
+
}
|
|
1318
|
+
|
|
1319
|
+
// Safety check: ensure the scrollbar space is reasonable in case this
|
|
1320
|
+
// calculation is affected by unusual styles.
|
|
1321
|
+
// Most scrollbars leave 15-18px of space.
|
|
1322
|
+
const SCROLLBAR_MAX = 25;
|
|
1323
|
+
function getViewportRect(element, strategy, rootBoundary) {
|
|
1324
|
+
if (rootBoundary === void 0) {
|
|
1325
|
+
rootBoundary = 'viewport';
|
|
1326
|
+
}
|
|
1327
|
+
const isLayoutViewport = rootBoundary === 'layoutViewport';
|
|
1328
|
+
const win = getWindow(element);
|
|
1329
|
+
const html = getDocumentElement(element);
|
|
1330
|
+
const visualViewport = win.visualViewport;
|
|
1331
|
+
let width = html.clientWidth;
|
|
1332
|
+
let height = html.clientHeight;
|
|
1333
|
+
let x = 0;
|
|
1334
|
+
let y = 0;
|
|
1335
|
+
if (visualViewport) {
|
|
1336
|
+
// Client coordinates are relative to the layout viewport, except in
|
|
1337
|
+
// WebKit with an `absolute` strategy, where they are relative to the
|
|
1338
|
+
// visual viewport.
|
|
1339
|
+
const layoutRelativeClientCoords = !isWebKit() || strategy === 'fixed';
|
|
1340
|
+
if (isLayoutViewport) {
|
|
1341
|
+
if (!layoutRelativeClientCoords) {
|
|
1342
|
+
x = -visualViewport.offsetLeft;
|
|
1343
|
+
y = -visualViewport.offsetTop;
|
|
1344
|
+
}
|
|
1345
|
+
} else {
|
|
1346
|
+
width = visualViewport.width;
|
|
1347
|
+
height = visualViewport.height;
|
|
1348
|
+
if (layoutRelativeClientCoords) {
|
|
1349
|
+
x = visualViewport.offsetLeft;
|
|
1350
|
+
y = visualViewport.offsetTop;
|
|
1351
|
+
}
|
|
1352
|
+
}
|
|
1353
|
+
}
|
|
1354
|
+
const windowScrollbarX = getWindowScrollBarX(html);
|
|
1355
|
+
// `scrollbar-gutter: stable` on the <html> reserves gutter space that shrinks
|
|
1356
|
+
// the visual width but isn't reflected in `html.clientWidth`, so subtract it.
|
|
1357
|
+
// Only the inline-end (right) gutter can hold the scrollbar; `both-edges` also
|
|
1358
|
+
// reserves an empty inline-start gutter that clips nothing, so exclude just
|
|
1359
|
+
// the one scrollbar-side gutter — halve the measured (two-gutter) total. A
|
|
1360
|
+
// left-side scrollbar (`windowScrollbarX > 0`) is already handled by
|
|
1361
|
+
// `getHTMLOffset`/`visualViewport.width`; skip it here.
|
|
1362
|
+
if (windowScrollbarX <= 0) {
|
|
1363
|
+
const doc = html.ownerDocument;
|
|
1364
|
+
const body = doc.body;
|
|
1365
|
+
const bodyStyles = getComputedStyle(body);
|
|
1366
|
+
const bodyMarginInline = doc.compatMode === 'CSS1Compat' ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;
|
|
1367
|
+
const reservedWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);
|
|
1368
|
+
const gutter = getComputedStyle(html).scrollbarGutter === 'stable both-edges' ? reservedWidth / 2 : reservedWidth;
|
|
1369
|
+
if (gutter <= SCROLLBAR_MAX) {
|
|
1370
|
+
width -= gutter;
|
|
1371
|
+
}
|
|
1372
|
+
}
|
|
1373
|
+
return {
|
|
1374
|
+
width,
|
|
1375
|
+
height,
|
|
1376
|
+
x,
|
|
1377
|
+
y
|
|
1378
|
+
};
|
|
1379
|
+
}
|
|
1380
|
+
|
|
1381
|
+
// Returns the inner client rect, subtracting scrollbars if present.
|
|
1382
|
+
function getInnerBoundingClientRect(element, strategy) {
|
|
1383
|
+
const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');
|
|
1384
|
+
const top = clientRect.top + element.clientTop;
|
|
1385
|
+
const left = clientRect.left + element.clientLeft;
|
|
1386
|
+
const scale = getScale(element);
|
|
1387
|
+
const width = element.clientWidth * scale.x;
|
|
1388
|
+
const height = element.clientHeight * scale.y;
|
|
1389
|
+
const x = left * scale.x;
|
|
1390
|
+
const y = top * scale.y;
|
|
1391
|
+
return {
|
|
1392
|
+
width,
|
|
1393
|
+
height,
|
|
1394
|
+
x,
|
|
1395
|
+
y
|
|
1396
|
+
};
|
|
1397
|
+
}
|
|
1398
|
+
function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
|
|
1399
|
+
let rect;
|
|
1400
|
+
if (clippingAncestor === 'viewport' || clippingAncestor === 'layoutViewport') {
|
|
1401
|
+
rect = getViewportRect(element, strategy, clippingAncestor);
|
|
1402
|
+
} else if (clippingAncestor === 'document') {
|
|
1403
|
+
rect = getDocumentRect(getDocumentElement(element));
|
|
1404
|
+
} else if (isElement(clippingAncestor)) {
|
|
1405
|
+
rect = getInnerBoundingClientRect(clippingAncestor, strategy);
|
|
1406
|
+
} else {
|
|
1407
|
+
const visualOffsets = getVisualOffsets(element);
|
|
1408
|
+
rect = {
|
|
1409
|
+
x: clippingAncestor.x - visualOffsets.x,
|
|
1410
|
+
y: clippingAncestor.y - visualOffsets.y,
|
|
1411
|
+
width: clippingAncestor.width,
|
|
1412
|
+
height: clippingAncestor.height
|
|
1413
|
+
};
|
|
1414
|
+
}
|
|
1415
|
+
return rectToClientRect(rect);
|
|
1416
|
+
}
|
|
1417
|
+
|
|
1418
|
+
// A "clipping ancestor" is an `overflow` element with the characteristic of
|
|
1419
|
+
// clipping (or hiding) child elements. This returns all clipping ancestors
|
|
1420
|
+
// of the given element up the tree.
|
|
1421
|
+
function getClippingElementAncestors(element, cache) {
|
|
1422
|
+
const cachedResult = cache.get(element);
|
|
1423
|
+
if (cachedResult) {
|
|
1424
|
+
return cachedResult;
|
|
1425
|
+
}
|
|
1426
|
+
let result = getOverflowAncestors(element, []).filter(el => isElement(el) && getNodeName(el) !== 'body');
|
|
1427
|
+
let lastKeptComputedStyle = null;
|
|
1428
|
+
const elementIsFixed = getComputedStyle$1(element).position === 'fixed';
|
|
1429
|
+
let currentNode = elementIsFixed ? getParentNode(element) : element;
|
|
1430
|
+
|
|
1431
|
+
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
|
1432
|
+
while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
1433
|
+
const computedStyle = getComputedStyle$1(currentNode);
|
|
1434
|
+
const currentNodeIsContaining = isContainingBlock(currentNode);
|
|
1435
|
+
// Position of the containing block chain below the current node. A fixed
|
|
1436
|
+
// element whose containing block hasn't been found yet is a fixed chain.
|
|
1437
|
+
const lastPosition = lastKeptComputedStyle ? lastKeptComputedStyle.position : elementIsFixed ? 'fixed' : '';
|
|
1438
|
+
|
|
1439
|
+
// A non-containing ancestor does not clip the element when the chain
|
|
1440
|
+
// below it escapes it: a fixed chain escapes all ancestors up to the
|
|
1441
|
+
// next containing block, an absolute chain escapes static ancestors.
|
|
1442
|
+
const shouldDropCurrentNode = !currentNodeIsContaining && (lastPosition === 'fixed' || lastPosition === 'absolute' && computedStyle.position === 'static');
|
|
1443
|
+
if (shouldDropCurrentNode) {
|
|
1444
|
+
// Drop non-containing blocks.
|
|
1445
|
+
result = result.filter(ancestor => ancestor !== currentNode);
|
|
1446
|
+
} else {
|
|
1447
|
+
// The kept node carries the chain position for the next iteration.
|
|
1448
|
+
lastKeptComputedStyle = computedStyle;
|
|
1449
|
+
}
|
|
1450
|
+
currentNode = getParentNode(currentNode);
|
|
1451
|
+
}
|
|
1452
|
+
cache.set(element, result);
|
|
1453
|
+
return result;
|
|
1454
|
+
}
|
|
1455
|
+
|
|
1456
|
+
// Gets the maximum area that the element is visible in due to any number of
|
|
1457
|
+
// clipping ancestors.
|
|
1458
|
+
function getClippingRect(_ref) {
|
|
1459
|
+
let {
|
|
1460
|
+
element,
|
|
1461
|
+
boundary,
|
|
1462
|
+
rootBoundary,
|
|
1463
|
+
strategy
|
|
1464
|
+
} = _ref;
|
|
1465
|
+
const elementClippingAncestors = boundary === 'clippingAncestors' ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);
|
|
1466
|
+
const clippingAncestors = [...elementClippingAncestors, rootBoundary];
|
|
1467
|
+
const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy);
|
|
1468
|
+
let top = firstRect.top;
|
|
1469
|
+
let right = firstRect.right;
|
|
1470
|
+
let bottom = firstRect.bottom;
|
|
1471
|
+
let left = firstRect.left;
|
|
1472
|
+
for (let i = 1; i < clippingAncestors.length; i++) {
|
|
1473
|
+
const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i], strategy);
|
|
1474
|
+
top = max(rect.top, top);
|
|
1475
|
+
right = min(rect.right, right);
|
|
1476
|
+
bottom = min(rect.bottom, bottom);
|
|
1477
|
+
left = max(rect.left, left);
|
|
1478
|
+
}
|
|
1479
|
+
return {
|
|
1480
|
+
width: right - left,
|
|
1481
|
+
height: bottom - top,
|
|
1482
|
+
x: left,
|
|
1483
|
+
y: top
|
|
1484
|
+
};
|
|
1485
|
+
}
|
|
1486
|
+
|
|
1487
|
+
function getDimensions(element) {
|
|
1488
|
+
const {
|
|
1489
|
+
width,
|
|
1490
|
+
height
|
|
1491
|
+
} = getCssDimensions(element);
|
|
1492
|
+
return {
|
|
1493
|
+
width,
|
|
1494
|
+
height
|
|
1495
|
+
};
|
|
1496
|
+
}
|
|
1497
|
+
|
|
1498
|
+
function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
1499
|
+
const isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
1500
|
+
const documentElement = getDocumentElement(offsetParent);
|
|
1501
|
+
const isFixed = strategy === 'fixed';
|
|
1502
|
+
const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
|
|
1503
|
+
let scroll = {
|
|
1504
|
+
scrollLeft: 0,
|
|
1505
|
+
scrollTop: 0
|
|
1506
|
+
};
|
|
1507
|
+
const offsets = createCoords(0);
|
|
1508
|
+
if (isOffsetParentAnElement || !isFixed) {
|
|
1509
|
+
if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
|
|
1510
|
+
scroll = getNodeScroll(offsetParent);
|
|
1511
|
+
}
|
|
1512
|
+
if (isOffsetParentAnElement) {
|
|
1513
|
+
const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
|
|
1514
|
+
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
1515
|
+
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
1516
|
+
}
|
|
1517
|
+
}
|
|
1518
|
+
|
|
1519
|
+
// If the <body> scrollbar appears on the left (e.g. RTL systems). Use
|
|
1520
|
+
// Firefox with layout.scrollbar.side = 3 in about:config to test this.
|
|
1521
|
+
if (!isOffsetParentAnElement && documentElement) {
|
|
1522
|
+
offsets.x = getWindowScrollBarX(documentElement);
|
|
1523
|
+
}
|
|
1524
|
+
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
|
|
1525
|
+
const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
|
|
1526
|
+
const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
|
|
1527
|
+
return {
|
|
1528
|
+
x,
|
|
1529
|
+
y,
|
|
1530
|
+
width: rect.width,
|
|
1531
|
+
height: rect.height
|
|
1532
|
+
};
|
|
1533
|
+
}
|
|
1534
|
+
|
|
1535
|
+
function isStaticPositioned(element) {
|
|
1536
|
+
return getComputedStyle$1(element).position === 'static';
|
|
1537
|
+
}
|
|
1538
|
+
|
|
1539
|
+
function getTrueOffsetParent(element, polyfill) {
|
|
1540
|
+
if (!isHTMLElement(element) || getComputedStyle$1(element).position === 'fixed') {
|
|
1541
|
+
return null;
|
|
1542
|
+
}
|
|
1543
|
+
if (polyfill) {
|
|
1544
|
+
return polyfill(element);
|
|
1545
|
+
}
|
|
1546
|
+
let rawOffsetParent = element.offsetParent;
|
|
1547
|
+
|
|
1548
|
+
// Firefox returns the <html> element as the offsetParent if it's non-static,
|
|
1549
|
+
// while Chrome and Safari return the <body> element. The <body> element must
|
|
1550
|
+
// be used to perform the correct calculations even if the <html> element is
|
|
1551
|
+
// non-static.
|
|
1552
|
+
if (getDocumentElement(element) === rawOffsetParent) {
|
|
1553
|
+
rawOffsetParent = rawOffsetParent.ownerDocument.body;
|
|
1554
|
+
}
|
|
1555
|
+
return rawOffsetParent;
|
|
1556
|
+
}
|
|
1557
|
+
|
|
1558
|
+
// Gets the closest ancestor positioned element. Handles some edge cases,
|
|
1559
|
+
// such as table ancestors and cross browser bugs.
|
|
1560
|
+
function getOffsetParent(element, polyfill) {
|
|
1561
|
+
const win = getWindow(element);
|
|
1562
|
+
if (isTopLayer(element)) {
|
|
1563
|
+
return win;
|
|
1564
|
+
}
|
|
1565
|
+
if (!isHTMLElement(element)) {
|
|
1566
|
+
let svgOffsetParent = getParentNode(element);
|
|
1567
|
+
while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {
|
|
1568
|
+
if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {
|
|
1569
|
+
return svgOffsetParent;
|
|
1570
|
+
}
|
|
1571
|
+
svgOffsetParent = getParentNode(svgOffsetParent);
|
|
1572
|
+
}
|
|
1573
|
+
return win;
|
|
1574
|
+
}
|
|
1575
|
+
let offsetParent = getTrueOffsetParent(element, polyfill);
|
|
1576
|
+
while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {
|
|
1577
|
+
offsetParent = getTrueOffsetParent(offsetParent, polyfill);
|
|
1578
|
+
}
|
|
1579
|
+
if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {
|
|
1580
|
+
return win;
|
|
1581
|
+
}
|
|
1582
|
+
return offsetParent || getContainingBlock(element) || win;
|
|
1583
|
+
}
|
|
1584
|
+
|
|
1585
|
+
const getElementRects = async function (data) {
|
|
1586
|
+
const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
|
|
1587
|
+
const getDimensionsFn = this.getDimensions;
|
|
1588
|
+
const floatingDimensions = await getDimensionsFn(data.floating);
|
|
1589
|
+
return {
|
|
1590
|
+
reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),
|
|
1591
|
+
floating: {
|
|
1592
|
+
x: 0,
|
|
1593
|
+
y: 0,
|
|
1594
|
+
width: floatingDimensions.width,
|
|
1595
|
+
height: floatingDimensions.height
|
|
1596
|
+
}
|
|
1597
|
+
};
|
|
1598
|
+
};
|
|
1599
|
+
|
|
1600
|
+
function isRTL(element) {
|
|
1601
|
+
return getComputedStyle$1(element).direction === 'rtl';
|
|
1602
|
+
}
|
|
1603
|
+
|
|
1604
|
+
const platform = {
|
|
1605
|
+
convertOffsetParentRelativeRectToViewportRelativeRect,
|
|
1606
|
+
getDocumentElement,
|
|
1607
|
+
getClippingRect,
|
|
1608
|
+
getOffsetParent,
|
|
1609
|
+
getElementRects,
|
|
1610
|
+
getClientRects,
|
|
1611
|
+
getDimensions,
|
|
1612
|
+
getScale,
|
|
1613
|
+
isElement,
|
|
1614
|
+
isRTL
|
|
1615
|
+
};
|
|
1616
|
+
|
|
1617
|
+
/**
|
|
1618
|
+
* Modifies the placement by translating the floating element along the
|
|
1619
|
+
* specified axes.
|
|
1620
|
+
* A number (shorthand for `mainAxis` or distance), or an axes configuration
|
|
1621
|
+
* object may be passed.
|
|
1622
|
+
* @see https://floating-ui.com/docs/offset
|
|
1623
|
+
*/
|
|
1624
|
+
const offset = offset$1;
|
|
1625
|
+
|
|
1626
|
+
/**
|
|
1627
|
+
* Optimizes the visibility of the floating element by shifting it in order to
|
|
1628
|
+
* keep it in view when it will overflow the clipping boundary.
|
|
1629
|
+
* @see https://floating-ui.com/docs/shift
|
|
1630
|
+
*/
|
|
1631
|
+
const shift = shift$1;
|
|
1632
|
+
|
|
1633
|
+
/**
|
|
1634
|
+
* Optimizes the visibility of the floating element by flipping the `placement`
|
|
1635
|
+
* in order to keep it in view when the preferred placement(s) will overflow the
|
|
1636
|
+
* clipping boundary. Alternative to `autoPlacement`.
|
|
1637
|
+
* @see https://floating-ui.com/docs/flip
|
|
1638
|
+
*/
|
|
1639
|
+
const flip = flip$1;
|
|
1640
|
+
|
|
1641
|
+
/**
|
|
1642
|
+
* Provides data that allows you to change the size of the floating element —
|
|
1643
|
+
* for instance, prevent it from overflowing the clipping boundary or match the
|
|
1644
|
+
* width of the reference element.
|
|
1645
|
+
* @see https://floating-ui.com/docs/size
|
|
1646
|
+
*/
|
|
1647
|
+
const size = size$1;
|
|
1648
|
+
|
|
1649
|
+
/**
|
|
1650
|
+
* Provides data to hide the floating element in applicable situations, such as
|
|
1651
|
+
* when it is not in the same clipping context as the reference element.
|
|
1652
|
+
* @see https://floating-ui.com/docs/hide
|
|
1653
|
+
*/
|
|
1654
|
+
const hide = hide$1;
|
|
1655
|
+
|
|
1656
|
+
/**
|
|
1657
|
+
* Provides data to position an inner element of the floating element so that it
|
|
1658
|
+
* appears centered to the reference element.
|
|
1659
|
+
* @see https://floating-ui.com/docs/arrow
|
|
1660
|
+
*/
|
|
1661
|
+
const arrow = arrow$1;
|
|
1662
|
+
|
|
1663
|
+
/**
|
|
1664
|
+
* Built-in `limiter` that will stop `shift()` at a certain point.
|
|
1665
|
+
*/
|
|
1666
|
+
const limitShift = limitShift$1;
|
|
1667
|
+
|
|
1668
|
+
/**
|
|
1669
|
+
* Computes the `x` and `y` coordinates that will place the floating element
|
|
1670
|
+
* next to a given reference element.
|
|
1671
|
+
*/
|
|
1672
|
+
const computePosition = (reference, floating, options) => {
|
|
1673
|
+
// This caches the expensive `getClippingElementAncestors` function so that
|
|
1674
|
+
// multiple lifecycle resets re-use the same result. It only lives for a
|
|
1675
|
+
// single call. If other functions become expensive, we can add them as well.
|
|
1676
|
+
const cache = new Map();
|
|
1677
|
+
const mergedOptions = options != null ? options : {};
|
|
1678
|
+
const platformWithCache = {
|
|
1679
|
+
...platform,
|
|
1680
|
+
...mergedOptions.platform,
|
|
1681
|
+
_c: cache
|
|
1682
|
+
};
|
|
1683
|
+
return computePosition$1(reference, floating, {
|
|
1684
|
+
...mergedOptions,
|
|
1685
|
+
platform: platformWithCache
|
|
1686
|
+
});
|
|
1687
|
+
};
|
|
1688
|
+
|
|
1689
|
+
function isFunction(value) {
|
|
1690
|
+
return typeof value === "function";
|
|
1691
|
+
}
|
|
1692
|
+
function get$1(value) {
|
|
1693
|
+
if (isFunction(value)) {
|
|
1694
|
+
return value();
|
|
1695
|
+
}
|
|
1696
|
+
return value;
|
|
1697
|
+
}
|
|
1698
|
+
class ElementSize {
|
|
1699
|
+
// no need to use `$state` here since we are using createSubscriber
|
|
1700
|
+
#size = { width: 0, height: 0 };
|
|
1701
|
+
#observed = false;
|
|
1702
|
+
#options;
|
|
1703
|
+
#node;
|
|
1704
|
+
#window;
|
|
1705
|
+
// we use a derived here to extract the width so that if the width doesn't change we don't get a state update
|
|
1706
|
+
// which we would get if we would just use a getter since the version of the subscriber will be changing
|
|
1707
|
+
#width = derived(() => {
|
|
1708
|
+
this.#subscribe()?.();
|
|
1709
|
+
return this.getSize().width;
|
|
1710
|
+
});
|
|
1711
|
+
// we use a derived here to extract the height so that if the height doesn't change we don't get a state update
|
|
1712
|
+
// which we would get if we would just use a getter since the version of the subscriber will be changing
|
|
1713
|
+
#height = derived(() => {
|
|
1714
|
+
this.#subscribe()?.();
|
|
1715
|
+
return this.getSize().height;
|
|
1716
|
+
});
|
|
1717
|
+
// we need to use a derived here because the class will be created before the node is bound to the ref
|
|
1718
|
+
#subscribe = derived(() => {
|
|
1719
|
+
const node$ = get$1(this.#node);
|
|
1720
|
+
if (!node$) return;
|
|
1721
|
+
return createSubscriber();
|
|
1722
|
+
});
|
|
1723
|
+
constructor(node, options = { box: "border-box" }) {
|
|
1724
|
+
this.#window = options.window ?? defaultWindow;
|
|
1725
|
+
this.#options = options;
|
|
1726
|
+
this.#node = node;
|
|
1727
|
+
this.#size = { width: 0, height: 0 };
|
|
1728
|
+
}
|
|
1729
|
+
calculateSize() {
|
|
1730
|
+
const element = get$1(this.#node);
|
|
1731
|
+
if (!element || !this.#window) {
|
|
1732
|
+
return;
|
|
1733
|
+
}
|
|
1734
|
+
const offsetWidth = element.offsetWidth;
|
|
1735
|
+
const offsetHeight = element.offsetHeight;
|
|
1736
|
+
if (this.#options.box === "border-box") {
|
|
1737
|
+
return { width: offsetWidth, height: offsetHeight };
|
|
1738
|
+
}
|
|
1739
|
+
const style = this.#window.getComputedStyle(element);
|
|
1740
|
+
const paddingWidth = parseFloat(style.paddingLeft) + parseFloat(style.paddingRight);
|
|
1741
|
+
const paddingHeight = parseFloat(style.paddingTop) + parseFloat(style.paddingBottom);
|
|
1742
|
+
const borderWidth = parseFloat(style.borderLeftWidth) + parseFloat(style.borderRightWidth);
|
|
1743
|
+
const borderHeight = parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth);
|
|
1744
|
+
const contentWidth = offsetWidth - paddingWidth - borderWidth;
|
|
1745
|
+
const contentHeight = offsetHeight - paddingHeight - borderHeight;
|
|
1746
|
+
return { width: contentWidth, height: contentHeight };
|
|
1747
|
+
}
|
|
1748
|
+
getSize() {
|
|
1749
|
+
return this.#observed ? this.#size : this.calculateSize() ?? this.#size;
|
|
1750
|
+
}
|
|
1751
|
+
get current() {
|
|
1752
|
+
this.#subscribe()?.();
|
|
1753
|
+
return this.getSize();
|
|
1754
|
+
}
|
|
1755
|
+
get width() {
|
|
1756
|
+
return this.#width();
|
|
1757
|
+
}
|
|
1758
|
+
get height() {
|
|
1759
|
+
return this.#height();
|
|
1760
|
+
}
|
|
1761
|
+
}
|
|
1762
|
+
const FloatingRootContext = new Context("Floating.Root");
|
|
1763
|
+
const FloatingTooltipRootContext = new Context("Floating.Root");
|
|
1764
|
+
class FloatingRootState {
|
|
1765
|
+
static create(tooltip = false) {
|
|
1766
|
+
return tooltip ? FloatingTooltipRootContext.set(new FloatingRootState()) : FloatingRootContext.set(new FloatingRootState());
|
|
1767
|
+
}
|
|
1768
|
+
anchorNode = simpleBox(null);
|
|
1769
|
+
customAnchorNode = simpleBox(null);
|
|
1770
|
+
triggerNode = simpleBox(null);
|
|
1771
|
+
constructor() {
|
|
1772
|
+
}
|
|
1773
|
+
}
|
|
1774
|
+
class FloatingAnchorState {
|
|
1775
|
+
static create(opts, tooltip = false) {
|
|
1776
|
+
return tooltip ? new FloatingAnchorState(opts, FloatingTooltipRootContext.get()) : new FloatingAnchorState(opts, FloatingRootContext.get());
|
|
1777
|
+
}
|
|
1778
|
+
opts;
|
|
1779
|
+
root;
|
|
1780
|
+
constructor(opts, root) {
|
|
1781
|
+
this.opts = opts;
|
|
1782
|
+
this.root = root;
|
|
1783
|
+
if (opts.virtualEl && opts.virtualEl.current) {
|
|
1784
|
+
root.triggerNode = boxFrom(opts.virtualEl.current);
|
|
1785
|
+
} else {
|
|
1786
|
+
root.triggerNode = opts.ref;
|
|
1787
|
+
}
|
|
1788
|
+
}
|
|
1789
|
+
}
|
|
1790
|
+
function Floating_layer($$renderer, $$props) {
|
|
1791
|
+
$$renderer.component(($$renderer2) => {
|
|
1792
|
+
let { children, tooltip = false } = $$props;
|
|
1793
|
+
FloatingRootState.create(tooltip);
|
|
1794
|
+
children?.($$renderer2);
|
|
1795
|
+
$$renderer2.push(`<!---->`);
|
|
1796
|
+
});
|
|
1797
|
+
}
|
|
1798
|
+
function get(valueOrGetValue) {
|
|
1799
|
+
return typeof valueOrGetValue === "function" ? valueOrGetValue() : valueOrGetValue;
|
|
1800
|
+
}
|
|
1801
|
+
function getDPR(element) {
|
|
1802
|
+
if (typeof window === "undefined") return 1;
|
|
1803
|
+
const win = element.ownerDocument.defaultView || window;
|
|
1804
|
+
return win.devicePixelRatio || 1;
|
|
1805
|
+
}
|
|
1806
|
+
function roundByDPR(element, value) {
|
|
1807
|
+
const dpr = getDPR(element);
|
|
1808
|
+
return Math.round(value * dpr) / dpr;
|
|
1809
|
+
}
|
|
1810
|
+
function getFloatingContentCSSVars(name) {
|
|
1811
|
+
return {
|
|
1812
|
+
[`--bits-${name}-content-transform-origin`]: `var(--bits-floating-transform-origin)`,
|
|
1813
|
+
[`--bits-${name}-content-available-width`]: `var(--bits-floating-available-width)`,
|
|
1814
|
+
[`--bits-${name}-content-available-height`]: `var(--bits-floating-available-height)`,
|
|
1815
|
+
[`--bits-${name}-anchor-width`]: `var(--bits-floating-anchor-width)`,
|
|
1816
|
+
[`--bits-${name}-anchor-height`]: `var(--bits-floating-anchor-height)`
|
|
1817
|
+
};
|
|
1818
|
+
}
|
|
1819
|
+
function Floating_layer_anchor($$renderer, $$props) {
|
|
1820
|
+
$$renderer.component(($$renderer2) => {
|
|
1821
|
+
let { id, children, virtualEl, ref, tooltip = false } = $$props;
|
|
1822
|
+
FloatingAnchorState.create(
|
|
1823
|
+
{
|
|
1824
|
+
id: boxWith(() => id),
|
|
1825
|
+
virtualEl: boxWith(() => virtualEl),
|
|
1826
|
+
ref
|
|
1827
|
+
},
|
|
1828
|
+
tooltip
|
|
1829
|
+
);
|
|
1830
|
+
children?.($$renderer2);
|
|
1831
|
+
$$renderer2.push(`<!---->`);
|
|
1832
|
+
});
|
|
1833
|
+
}
|
|
1834
|
+
function useFloating(options) {
|
|
1835
|
+
const openOption = derived(() => get(options.open) ?? true);
|
|
1836
|
+
const middlewareOption = derived(() => get(options.middleware));
|
|
1837
|
+
const transformOption = derived(() => get(options.transform) ?? true);
|
|
1838
|
+
const placementOption = derived(() => get(options.placement) ?? "bottom");
|
|
1839
|
+
const strategyOption = derived(() => get(options.strategy) ?? "absolute");
|
|
1840
|
+
const sideOffsetOption = derived(() => get(options.sideOffset) ?? 0);
|
|
1841
|
+
const alignOffsetOption = derived(() => get(options.alignOffset) ?? 0);
|
|
1842
|
+
const reference = options.reference;
|
|
1843
|
+
let x = 0;
|
|
1844
|
+
let y = 0;
|
|
1845
|
+
const floating = simpleBox(null);
|
|
1846
|
+
let strategy = strategyOption();
|
|
1847
|
+
let placement = placementOption();
|
|
1848
|
+
let middlewareData = {};
|
|
1849
|
+
let isPositioned = false;
|
|
1850
|
+
let updateRequestId = 0;
|
|
1851
|
+
const floatingStyles = derived(() => {
|
|
1852
|
+
const xVal = floating.current ? roundByDPR(floating.current, x) : x;
|
|
1853
|
+
const yVal = floating.current ? roundByDPR(floating.current, y) : y;
|
|
1854
|
+
if (transformOption()) {
|
|
1855
|
+
return {
|
|
1856
|
+
position: strategy,
|
|
1857
|
+
left: "0",
|
|
1858
|
+
top: "0",
|
|
1859
|
+
transform: `translate(${xVal}px, ${yVal}px)`,
|
|
1860
|
+
...floating.current && getDPR(floating.current) >= 1.5 && { willChange: "transform" }
|
|
1861
|
+
};
|
|
1862
|
+
}
|
|
1863
|
+
return { position: strategy, left: `${xVal}px`, top: `${yVal}px` };
|
|
1864
|
+
});
|
|
1865
|
+
function update() {
|
|
1866
|
+
if (reference.current === null || floating.current === null) return;
|
|
1867
|
+
const referenceNode = reference.current;
|
|
1868
|
+
const floatingNode = floating.current;
|
|
1869
|
+
const requestId = ++updateRequestId;
|
|
1870
|
+
computePosition(referenceNode, floatingNode, {
|
|
1871
|
+
middleware: middlewareOption(),
|
|
1872
|
+
placement: placementOption(),
|
|
1873
|
+
strategy: strategyOption()
|
|
1874
|
+
}).then((position) => {
|
|
1875
|
+
if (requestId !== updateRequestId) return;
|
|
1876
|
+
if (reference.current !== referenceNode || floating.current !== floatingNode) return;
|
|
1877
|
+
const referenceHidden = isReferenceHidden(referenceNode);
|
|
1878
|
+
if (referenceHidden) {
|
|
1879
|
+
middlewareData = {
|
|
1880
|
+
...middlewareData,
|
|
1881
|
+
hide: {
|
|
1882
|
+
// oxlint-disable-next-line no-explicit-any
|
|
1883
|
+
...middlewareData.hide,
|
|
1884
|
+
referenceHidden: true
|
|
1885
|
+
}
|
|
1886
|
+
};
|
|
1887
|
+
return;
|
|
1888
|
+
}
|
|
1889
|
+
if (!openOption() && x !== 0 && y !== 0) {
|
|
1890
|
+
const maxExpectedOffset = Math.max(Math.abs(sideOffsetOption()), Math.abs(alignOffsetOption()), 15);
|
|
1891
|
+
if (position.x <= maxExpectedOffset && position.y <= maxExpectedOffset) return;
|
|
1892
|
+
}
|
|
1893
|
+
x = position.x;
|
|
1894
|
+
y = position.y;
|
|
1895
|
+
strategy = position.strategy;
|
|
1896
|
+
placement = position.placement;
|
|
1897
|
+
middlewareData = position.middlewareData;
|
|
1898
|
+
isPositioned = true;
|
|
1899
|
+
});
|
|
1900
|
+
}
|
|
1901
|
+
return {
|
|
1902
|
+
floating,
|
|
1903
|
+
reference,
|
|
1904
|
+
get strategy() {
|
|
1905
|
+
return strategy;
|
|
1906
|
+
},
|
|
1907
|
+
get placement() {
|
|
1908
|
+
return placement;
|
|
1909
|
+
},
|
|
1910
|
+
get middlewareData() {
|
|
1911
|
+
return middlewareData;
|
|
1912
|
+
},
|
|
1913
|
+
get isPositioned() {
|
|
1914
|
+
return isPositioned;
|
|
1915
|
+
},
|
|
1916
|
+
get floatingStyles() {
|
|
1917
|
+
return floatingStyles();
|
|
1918
|
+
},
|
|
1919
|
+
get update() {
|
|
1920
|
+
return update;
|
|
1921
|
+
}
|
|
1922
|
+
};
|
|
1923
|
+
}
|
|
1924
|
+
function isReferenceHidden(node) {
|
|
1925
|
+
if (!(node instanceof Element)) return false;
|
|
1926
|
+
if (!node.isConnected) return true;
|
|
1927
|
+
if (node instanceof HTMLElement && node.hidden) return true;
|
|
1928
|
+
return node.getClientRects().length === 0;
|
|
1929
|
+
}
|
|
1930
|
+
const OPPOSITE_SIDE = { top: "bottom", right: "left", bottom: "top", left: "right" };
|
|
1931
|
+
const FloatingContentContext = new Context("Floating.Content");
|
|
1932
|
+
class FloatingContentState {
|
|
1933
|
+
static create(opts, tooltip = false) {
|
|
1934
|
+
return tooltip ? FloatingContentContext.set(new FloatingContentState(opts, FloatingTooltipRootContext.get())) : FloatingContentContext.set(new FloatingContentState(opts, FloatingRootContext.get()));
|
|
1935
|
+
}
|
|
1936
|
+
opts;
|
|
1937
|
+
root;
|
|
1938
|
+
// nodes
|
|
1939
|
+
contentRef = simpleBox(null);
|
|
1940
|
+
wrapperRef = simpleBox(null);
|
|
1941
|
+
arrowRef = simpleBox(null);
|
|
1942
|
+
contentAttachment = attachRef(this.contentRef);
|
|
1943
|
+
wrapperAttachment = attachRef(this.wrapperRef);
|
|
1944
|
+
arrowAttachment = attachRef(this.arrowRef);
|
|
1945
|
+
// ids
|
|
1946
|
+
arrowId = simpleBox(useId());
|
|
1947
|
+
#transformedStyle = derived(() => {
|
|
1948
|
+
if (typeof this.opts.style === "string") return cssToStyleObj(this.opts.style);
|
|
1949
|
+
if (!this.opts.style) return {};
|
|
1950
|
+
});
|
|
1951
|
+
#updatePositionStrategy = void 0;
|
|
1952
|
+
#arrowSize = new ElementSize(() => this.arrowRef.current ?? void 0);
|
|
1953
|
+
#arrowWidth = derived(() => this.#arrowSize?.width ?? 0);
|
|
1954
|
+
#arrowHeight = derived(() => this.#arrowSize?.height ?? 0);
|
|
1955
|
+
#desiredPlacement = derived(() => this.opts.side?.current + (this.opts.align.current !== "center" ? `-${this.opts.align.current}` : ""));
|
|
1956
|
+
#boundary = derived(() => Array.isArray(this.opts.collisionBoundary.current) ? this.opts.collisionBoundary.current : [this.opts.collisionBoundary.current]);
|
|
1957
|
+
#hasExplicitBoundaries = derived(() => this.#boundary().length > 0);
|
|
1958
|
+
get hasExplicitBoundaries() {
|
|
1959
|
+
return this.#hasExplicitBoundaries();
|
|
1960
|
+
}
|
|
1961
|
+
set hasExplicitBoundaries($$value) {
|
|
1962
|
+
return this.#hasExplicitBoundaries($$value);
|
|
1963
|
+
}
|
|
1964
|
+
#detectOverflowOptions = derived(() => ({
|
|
1965
|
+
padding: this.opts.collisionPadding.current,
|
|
1966
|
+
boundary: this.#boundary().filter(isNotNull),
|
|
1967
|
+
altBoundary: this.hasExplicitBoundaries
|
|
1968
|
+
}));
|
|
1969
|
+
get detectOverflowOptions() {
|
|
1970
|
+
return this.#detectOverflowOptions();
|
|
1971
|
+
}
|
|
1972
|
+
set detectOverflowOptions($$value) {
|
|
1973
|
+
return this.#detectOverflowOptions($$value);
|
|
1974
|
+
}
|
|
1975
|
+
#availableWidth = void 0;
|
|
1976
|
+
#availableHeight = void 0;
|
|
1977
|
+
#anchorWidth = void 0;
|
|
1978
|
+
#anchorHeight = void 0;
|
|
1979
|
+
#middleware = derived(() => [
|
|
1980
|
+
offset({
|
|
1981
|
+
mainAxis: this.opts.sideOffset.current + this.#arrowHeight(),
|
|
1982
|
+
alignmentAxis: this.opts.alignOffset.current
|
|
1983
|
+
}),
|
|
1984
|
+
this.opts.avoidCollisions.current && shift({
|
|
1985
|
+
mainAxis: true,
|
|
1986
|
+
crossAxis: false,
|
|
1987
|
+
limiter: this.opts.sticky.current === "partial" ? limitShift() : void 0,
|
|
1988
|
+
...this.detectOverflowOptions
|
|
1989
|
+
}),
|
|
1990
|
+
this.opts.avoidCollisions.current && flip({ ...this.detectOverflowOptions }),
|
|
1991
|
+
size({
|
|
1992
|
+
...this.detectOverflowOptions,
|
|
1993
|
+
apply: ({ rects, availableWidth, availableHeight }) => {
|
|
1994
|
+
const { width: anchorWidth, height: anchorHeight } = rects.reference;
|
|
1995
|
+
this.#availableWidth = availableWidth;
|
|
1996
|
+
this.#availableHeight = availableHeight;
|
|
1997
|
+
this.#anchorWidth = anchorWidth;
|
|
1998
|
+
this.#anchorHeight = anchorHeight;
|
|
1999
|
+
}
|
|
2000
|
+
}),
|
|
2001
|
+
this.arrowRef.current && arrow({
|
|
2002
|
+
element: this.arrowRef.current,
|
|
2003
|
+
padding: this.opts.arrowPadding.current
|
|
2004
|
+
}),
|
|
2005
|
+
transformOrigin({
|
|
2006
|
+
arrowWidth: this.#arrowWidth(),
|
|
2007
|
+
arrowHeight: this.#arrowHeight()
|
|
2008
|
+
}),
|
|
2009
|
+
this.opts.hideWhenDetached.current && hide({ strategy: "referenceHidden", ...this.detectOverflowOptions })
|
|
2010
|
+
].filter(Boolean));
|
|
2011
|
+
get middleware() {
|
|
2012
|
+
return this.#middleware();
|
|
2013
|
+
}
|
|
2014
|
+
set middleware($$value) {
|
|
2015
|
+
return this.#middleware($$value);
|
|
2016
|
+
}
|
|
2017
|
+
floating;
|
|
2018
|
+
#placedSide = derived(() => getSideFromPlacement(this.floating.placement));
|
|
2019
|
+
get placedSide() {
|
|
2020
|
+
return this.#placedSide();
|
|
2021
|
+
}
|
|
2022
|
+
set placedSide($$value) {
|
|
2023
|
+
return this.#placedSide($$value);
|
|
2024
|
+
}
|
|
2025
|
+
#placedAlign = derived(() => getAlignFromPlacement(this.floating.placement));
|
|
2026
|
+
get placedAlign() {
|
|
2027
|
+
return this.#placedAlign();
|
|
2028
|
+
}
|
|
2029
|
+
set placedAlign($$value) {
|
|
2030
|
+
return this.#placedAlign($$value);
|
|
2031
|
+
}
|
|
2032
|
+
#arrowX = derived(() => this.floating.middlewareData.arrow?.x ?? 0);
|
|
2033
|
+
get arrowX() {
|
|
2034
|
+
return this.#arrowX();
|
|
2035
|
+
}
|
|
2036
|
+
set arrowX($$value) {
|
|
2037
|
+
return this.#arrowX($$value);
|
|
2038
|
+
}
|
|
2039
|
+
#arrowY = derived(() => this.floating.middlewareData.arrow?.y ?? 0);
|
|
2040
|
+
get arrowY() {
|
|
2041
|
+
return this.#arrowY();
|
|
2042
|
+
}
|
|
2043
|
+
set arrowY($$value) {
|
|
2044
|
+
return this.#arrowY($$value);
|
|
2045
|
+
}
|
|
2046
|
+
#cannotCenterArrow = derived(() => this.floating.middlewareData.arrow?.centerOffset !== 0);
|
|
2047
|
+
get cannotCenterArrow() {
|
|
2048
|
+
return this.#cannotCenterArrow();
|
|
2049
|
+
}
|
|
2050
|
+
set cannotCenterArrow($$value) {
|
|
2051
|
+
return this.#cannotCenterArrow($$value);
|
|
2052
|
+
}
|
|
2053
|
+
contentZIndex;
|
|
2054
|
+
#arrowBaseSide = derived(() => OPPOSITE_SIDE[this.placedSide]);
|
|
2055
|
+
get arrowBaseSide() {
|
|
2056
|
+
return this.#arrowBaseSide();
|
|
2057
|
+
}
|
|
2058
|
+
set arrowBaseSide($$value) {
|
|
2059
|
+
return this.#arrowBaseSide($$value);
|
|
2060
|
+
}
|
|
2061
|
+
#wrapperProps = derived(() => ({
|
|
2062
|
+
id: this.opts.wrapperId.current,
|
|
2063
|
+
"data-bits-floating-content-wrapper": "",
|
|
2064
|
+
style: {
|
|
2065
|
+
...this.floating.floatingStyles,
|
|
2066
|
+
transform: this.floating.isPositioned ? this.floating.floatingStyles.transform : "translate(0, -200%)",
|
|
2067
|
+
minWidth: "max-content",
|
|
2068
|
+
zIndex: this.contentZIndex,
|
|
2069
|
+
"--bits-floating-transform-origin": `${this.floating.middlewareData.transformOrigin?.x} ${this.floating.middlewareData.transformOrigin?.y}`,
|
|
2070
|
+
"--bits-floating-available-width": `${this.#availableWidth}px`,
|
|
2071
|
+
"--bits-floating-available-height": `${this.#availableHeight}px`,
|
|
2072
|
+
"--bits-floating-anchor-width": `${this.#anchorWidth}px`,
|
|
2073
|
+
"--bits-floating-anchor-height": `${this.#anchorHeight}px`,
|
|
2074
|
+
...this.floating.middlewareData.hide?.referenceHidden && { visibility: "hidden", "pointer-events": "none" },
|
|
2075
|
+
...this.#transformedStyle()
|
|
2076
|
+
},
|
|
2077
|
+
dir: this.opts.dir.current,
|
|
2078
|
+
...this.wrapperAttachment
|
|
2079
|
+
}));
|
|
2080
|
+
get wrapperProps() {
|
|
2081
|
+
return this.#wrapperProps();
|
|
2082
|
+
}
|
|
2083
|
+
set wrapperProps($$value) {
|
|
2084
|
+
return this.#wrapperProps($$value);
|
|
2085
|
+
}
|
|
2086
|
+
#props = derived(() => ({
|
|
2087
|
+
"data-side": this.placedSide,
|
|
2088
|
+
"data-align": this.placedAlign,
|
|
2089
|
+
style: styleToString({ ...this.#transformedStyle() }),
|
|
2090
|
+
...this.contentAttachment
|
|
2091
|
+
}));
|
|
2092
|
+
get props() {
|
|
2093
|
+
return this.#props();
|
|
2094
|
+
}
|
|
2095
|
+
set props($$value) {
|
|
2096
|
+
return this.#props($$value);
|
|
2097
|
+
}
|
|
2098
|
+
#arrowStyle = derived(() => ({
|
|
2099
|
+
position: "absolute",
|
|
2100
|
+
left: this.arrowX ? `${this.arrowX}px` : void 0,
|
|
2101
|
+
top: this.arrowY ? `${this.arrowY}px` : void 0,
|
|
2102
|
+
[this.arrowBaseSide]: 0,
|
|
2103
|
+
"transform-origin": { top: "", right: "0 0", bottom: "center 0", left: "100% 0" }[this.placedSide],
|
|
2104
|
+
transform: {
|
|
2105
|
+
top: "translateY(100%)",
|
|
2106
|
+
right: "translateY(50%) rotate(90deg) translateX(-50%)",
|
|
2107
|
+
bottom: "rotate(180deg)",
|
|
2108
|
+
left: "translateY(50%) rotate(-90deg) translateX(50%)"
|
|
2109
|
+
}[this.placedSide],
|
|
2110
|
+
visibility: this.cannotCenterArrow ? "hidden" : void 0
|
|
2111
|
+
}));
|
|
2112
|
+
get arrowStyle() {
|
|
2113
|
+
return this.#arrowStyle();
|
|
2114
|
+
}
|
|
2115
|
+
set arrowStyle($$value) {
|
|
2116
|
+
return this.#arrowStyle($$value);
|
|
2117
|
+
}
|
|
2118
|
+
constructor(opts, root) {
|
|
2119
|
+
this.opts = opts;
|
|
2120
|
+
this.root = root;
|
|
2121
|
+
this.#updatePositionStrategy = opts.updatePositionStrategy;
|
|
2122
|
+
if (opts.customAnchor) {
|
|
2123
|
+
this.root.customAnchorNode.current = opts.customAnchor.current;
|
|
2124
|
+
}
|
|
2125
|
+
watch(() => opts.customAnchor.current, (customAnchor) => {
|
|
2126
|
+
this.root.customAnchorNode.current = customAnchor;
|
|
2127
|
+
});
|
|
2128
|
+
this.floating = useFloating({
|
|
2129
|
+
strategy: () => this.opts.strategy.current,
|
|
2130
|
+
placement: () => this.#desiredPlacement(),
|
|
2131
|
+
middleware: () => this.middleware,
|
|
2132
|
+
reference: this.root.anchorNode,
|
|
2133
|
+
open: () => this.opts.enabled.current,
|
|
2134
|
+
sideOffset: () => this.opts.sideOffset.current,
|
|
2135
|
+
alignOffset: () => this.opts.alignOffset.current
|
|
2136
|
+
});
|
|
2137
|
+
watch(() => this.contentRef.current, (contentNode) => {
|
|
2138
|
+
if (!contentNode || !this.opts.enabled.current) return;
|
|
2139
|
+
const win = getWindow$1(contentNode);
|
|
2140
|
+
const rafId = win.requestAnimationFrame(() => {
|
|
2141
|
+
if (this.contentRef.current !== contentNode || !this.opts.enabled.current) return;
|
|
2142
|
+
const zIndex = win.getComputedStyle(contentNode).zIndex;
|
|
2143
|
+
if (zIndex !== this.contentZIndex) {
|
|
2144
|
+
this.contentZIndex = zIndex;
|
|
2145
|
+
}
|
|
2146
|
+
});
|
|
2147
|
+
return () => {
|
|
2148
|
+
win.cancelAnimationFrame(rafId);
|
|
2149
|
+
};
|
|
2150
|
+
});
|
|
2151
|
+
}
|
|
2152
|
+
}
|
|
2153
|
+
class FloatingArrowState {
|
|
2154
|
+
static create(opts) {
|
|
2155
|
+
return new FloatingArrowState(opts, FloatingContentContext.get());
|
|
2156
|
+
}
|
|
2157
|
+
opts;
|
|
2158
|
+
content;
|
|
2159
|
+
constructor(opts, content) {
|
|
2160
|
+
this.opts = opts;
|
|
2161
|
+
this.content = content;
|
|
2162
|
+
}
|
|
2163
|
+
#props = derived(() => ({
|
|
2164
|
+
id: this.opts.id.current,
|
|
2165
|
+
style: this.content.arrowStyle,
|
|
2166
|
+
"data-side": this.content.placedSide,
|
|
2167
|
+
...this.content.arrowAttachment
|
|
2168
|
+
}));
|
|
2169
|
+
get props() {
|
|
2170
|
+
return this.#props();
|
|
2171
|
+
}
|
|
2172
|
+
set props($$value) {
|
|
2173
|
+
return this.#props($$value);
|
|
2174
|
+
}
|
|
2175
|
+
}
|
|
2176
|
+
function transformOrigin(options) {
|
|
2177
|
+
return {
|
|
2178
|
+
name: "transformOrigin",
|
|
2179
|
+
options,
|
|
2180
|
+
fn(data) {
|
|
2181
|
+
const { placement, rects, middlewareData } = data;
|
|
2182
|
+
const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;
|
|
2183
|
+
const isArrowHidden = cannotCenterArrow;
|
|
2184
|
+
const arrowWidth = isArrowHidden ? 0 : options.arrowWidth;
|
|
2185
|
+
const arrowHeight = isArrowHidden ? 0 : options.arrowHeight;
|
|
2186
|
+
const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);
|
|
2187
|
+
const noArrowAlign = { start: "0%", center: "50%", end: "100%" }[placedAlign];
|
|
2188
|
+
const arrowXCenter = (middlewareData.arrow?.x ?? 0) + arrowWidth / 2;
|
|
2189
|
+
const arrowYCenter = (middlewareData.arrow?.y ?? 0) + arrowHeight / 2;
|
|
2190
|
+
let x = "";
|
|
2191
|
+
let y = "";
|
|
2192
|
+
if (placedSide === "bottom") {
|
|
2193
|
+
x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;
|
|
2194
|
+
y = `${-arrowHeight}px`;
|
|
2195
|
+
} else if (placedSide === "top") {
|
|
2196
|
+
x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;
|
|
2197
|
+
y = `${rects.floating.height + arrowHeight}px`;
|
|
2198
|
+
} else if (placedSide === "right") {
|
|
2199
|
+
x = `${-arrowHeight}px`;
|
|
2200
|
+
y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;
|
|
2201
|
+
} else if (placedSide === "left") {
|
|
2202
|
+
x = `${rects.floating.width + arrowHeight}px`;
|
|
2203
|
+
y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;
|
|
2204
|
+
}
|
|
2205
|
+
return { data: { x, y } };
|
|
2206
|
+
}
|
|
2207
|
+
};
|
|
2208
|
+
}
|
|
2209
|
+
function getSideAndAlignFromPlacement(placement) {
|
|
2210
|
+
const [side, align = "center"] = placement.split("-");
|
|
2211
|
+
return [side, align];
|
|
2212
|
+
}
|
|
2213
|
+
function getSideFromPlacement(placement) {
|
|
2214
|
+
return getSideAndAlignFromPlacement(placement)[0];
|
|
2215
|
+
}
|
|
2216
|
+
function getAlignFromPlacement(placement) {
|
|
2217
|
+
return getSideAndAlignFromPlacement(placement)[1];
|
|
2218
|
+
}
|
|
2219
|
+
function Floating_layer_content($$renderer, $$props) {
|
|
2220
|
+
$$renderer.component(($$renderer2) => {
|
|
2221
|
+
let {
|
|
2222
|
+
content,
|
|
2223
|
+
side = "bottom",
|
|
2224
|
+
sideOffset = 0,
|
|
2225
|
+
align = "center",
|
|
2226
|
+
alignOffset = 0,
|
|
2227
|
+
id,
|
|
2228
|
+
arrowPadding = 0,
|
|
2229
|
+
avoidCollisions = true,
|
|
2230
|
+
collisionBoundary = [],
|
|
2231
|
+
collisionPadding = 0,
|
|
2232
|
+
hideWhenDetached = false,
|
|
2233
|
+
onPlaced = () => {
|
|
2234
|
+
},
|
|
2235
|
+
sticky = "partial",
|
|
2236
|
+
updatePositionStrategy = "optimized",
|
|
2237
|
+
strategy = "fixed",
|
|
2238
|
+
dir = "ltr",
|
|
2239
|
+
style = {},
|
|
2240
|
+
wrapperId = useId(),
|
|
2241
|
+
customAnchor = null,
|
|
2242
|
+
enabled,
|
|
2243
|
+
tooltip = false
|
|
2244
|
+
} = $$props;
|
|
2245
|
+
const contentState = FloatingContentState.create(
|
|
2246
|
+
{
|
|
2247
|
+
side: boxWith(() => side),
|
|
2248
|
+
sideOffset: boxWith(() => sideOffset),
|
|
2249
|
+
align: boxWith(() => align),
|
|
2250
|
+
alignOffset: boxWith(() => alignOffset),
|
|
2251
|
+
id: boxWith(() => id),
|
|
2252
|
+
arrowPadding: boxWith(() => arrowPadding),
|
|
2253
|
+
avoidCollisions: boxWith(() => avoidCollisions),
|
|
2254
|
+
collisionBoundary: boxWith(() => collisionBoundary),
|
|
2255
|
+
collisionPadding: boxWith(() => collisionPadding),
|
|
2256
|
+
hideWhenDetached: boxWith(() => hideWhenDetached),
|
|
2257
|
+
onPlaced: boxWith(() => onPlaced),
|
|
2258
|
+
sticky: boxWith(() => sticky),
|
|
2259
|
+
updatePositionStrategy: boxWith(() => updatePositionStrategy),
|
|
2260
|
+
strategy: boxWith(() => strategy),
|
|
2261
|
+
dir: boxWith(() => dir),
|
|
2262
|
+
style: boxWith(() => style),
|
|
2263
|
+
enabled: boxWith(() => enabled),
|
|
2264
|
+
wrapperId: boxWith(() => wrapperId),
|
|
2265
|
+
customAnchor: boxWith(() => customAnchor)
|
|
2266
|
+
},
|
|
2267
|
+
tooltip
|
|
2268
|
+
);
|
|
2269
|
+
const mergedProps = derived(() => mergeProps(contentState.wrapperProps, { style: { pointerEvents: "auto" } }));
|
|
2270
|
+
content?.($$renderer2, { props: contentState.props, wrapperProps: mergedProps() });
|
|
2271
|
+
$$renderer2.push(`<!---->`);
|
|
2272
|
+
});
|
|
2273
|
+
}
|
|
2274
|
+
function Floating_layer_content_static($$renderer, $$props) {
|
|
2275
|
+
$$renderer.component(($$renderer2) => {
|
|
2276
|
+
let { content } = $$props;
|
|
2277
|
+
content?.($$renderer2, { props: {}, wrapperProps: {} });
|
|
2278
|
+
$$renderer2.push(`<!---->`);
|
|
2279
|
+
});
|
|
2280
|
+
}
|
|
2281
|
+
function Popper_content($$renderer, $$props) {
|
|
2282
|
+
let {
|
|
2283
|
+
content,
|
|
2284
|
+
isStatic = false,
|
|
2285
|
+
onPlaced,
|
|
2286
|
+
$$slots,
|
|
2287
|
+
$$events,
|
|
2288
|
+
...restProps
|
|
2289
|
+
} = $$props;
|
|
2290
|
+
if (isStatic) {
|
|
2291
|
+
$$renderer.push("<!--[0-->");
|
|
2292
|
+
Floating_layer_content_static($$renderer, { content });
|
|
2293
|
+
} else {
|
|
2294
|
+
$$renderer.push("<!--[-1-->");
|
|
2295
|
+
Floating_layer_content($$renderer, spread_props([{ content, onPlaced }, restProps]));
|
|
2296
|
+
}
|
|
2297
|
+
$$renderer.push(`<!--]-->`);
|
|
2298
|
+
}
|
|
2299
|
+
function Popper_layer_inner($$renderer, $$props) {
|
|
2300
|
+
$$renderer.component(($$renderer2) => {
|
|
2301
|
+
let {
|
|
2302
|
+
popper,
|
|
2303
|
+
onEscapeKeydown,
|
|
2304
|
+
escapeKeydownBehavior,
|
|
2305
|
+
preventOverflowTextSelection,
|
|
2306
|
+
id,
|
|
2307
|
+
onPointerDown,
|
|
2308
|
+
onPointerUp,
|
|
2309
|
+
side,
|
|
2310
|
+
sideOffset,
|
|
2311
|
+
align,
|
|
2312
|
+
alignOffset,
|
|
2313
|
+
arrowPadding,
|
|
2314
|
+
avoidCollisions,
|
|
2315
|
+
collisionBoundary,
|
|
2316
|
+
collisionPadding,
|
|
2317
|
+
sticky,
|
|
2318
|
+
hideWhenDetached,
|
|
2319
|
+
updatePositionStrategy,
|
|
2320
|
+
strategy,
|
|
2321
|
+
dir,
|
|
2322
|
+
preventScroll,
|
|
2323
|
+
wrapperId,
|
|
2324
|
+
style,
|
|
2325
|
+
onPlaced,
|
|
2326
|
+
onInteractOutside,
|
|
2327
|
+
onCloseAutoFocus,
|
|
2328
|
+
onOpenAutoFocus,
|
|
2329
|
+
onFocusOutside,
|
|
2330
|
+
interactOutsideBehavior = "close",
|
|
2331
|
+
loop,
|
|
2332
|
+
trapFocus = true,
|
|
2333
|
+
isValidEvent = () => false,
|
|
2334
|
+
customAnchor = null,
|
|
2335
|
+
isStatic = false,
|
|
2336
|
+
enabled,
|
|
2337
|
+
forceMount,
|
|
2338
|
+
ref,
|
|
2339
|
+
tooltip = false,
|
|
2340
|
+
contentPointerEvents = "auto",
|
|
2341
|
+
$$slots,
|
|
2342
|
+
$$events,
|
|
2343
|
+
...restProps
|
|
2344
|
+
} = $$props;
|
|
2345
|
+
const resolvedPreventScroll = derived(() => preventScroll ?? true);
|
|
2346
|
+
const effectiveStrategy = derived(() => strategy ?? (resolvedPreventScroll() ? "fixed" : "absolute"));
|
|
2347
|
+
{
|
|
2348
|
+
let content = function($$renderer3, { props: floatingProps, wrapperProps }) {
|
|
2349
|
+
if (forceMount && enabled) {
|
|
2350
|
+
$$renderer3.push("<!--[0-->");
|
|
2351
|
+
Scroll_lock($$renderer3, { preventScroll: resolvedPreventScroll() });
|
|
2352
|
+
} else if (!forceMount) {
|
|
2353
|
+
$$renderer3.push("<!--[1-->");
|
|
2354
|
+
Scroll_lock($$renderer3, { preventScroll: resolvedPreventScroll() });
|
|
2355
|
+
} else {
|
|
2356
|
+
$$renderer3.push("<!--[-1-->");
|
|
2357
|
+
}
|
|
2358
|
+
$$renderer3.push(`<!--]--> `);
|
|
2359
|
+
{
|
|
2360
|
+
let focusScope = function($$renderer4, { props: focusScopeProps }) {
|
|
2361
|
+
Escape_layer($$renderer4, {
|
|
2362
|
+
onEscapeKeydown,
|
|
2363
|
+
escapeKeydownBehavior,
|
|
2364
|
+
enabled,
|
|
2365
|
+
ref,
|
|
2366
|
+
children: ($$renderer5) => {
|
|
2367
|
+
{
|
|
2368
|
+
let children = function($$renderer6, { props: dismissibleProps }) {
|
|
2369
|
+
Text_selection_layer($$renderer6, {
|
|
2370
|
+
id,
|
|
2371
|
+
preventOverflowTextSelection,
|
|
2372
|
+
onPointerDown,
|
|
2373
|
+
onPointerUp,
|
|
2374
|
+
enabled,
|
|
2375
|
+
ref,
|
|
2376
|
+
children: ($$renderer7) => {
|
|
2377
|
+
popper?.($$renderer7, {
|
|
2378
|
+
props: mergeProps(restProps, floatingProps, dismissibleProps, focusScopeProps, { id, style: { pointerEvents: contentPointerEvents } }),
|
|
2379
|
+
wrapperProps
|
|
2380
|
+
});
|
|
2381
|
+
$$renderer7.push(`<!---->`);
|
|
2382
|
+
}
|
|
2383
|
+
});
|
|
2384
|
+
};
|
|
2385
|
+
Dismissible_layer($$renderer5, {
|
|
2386
|
+
id,
|
|
2387
|
+
onInteractOutside,
|
|
2388
|
+
onFocusOutside,
|
|
2389
|
+
interactOutsideBehavior,
|
|
2390
|
+
isValidEvent,
|
|
2391
|
+
enabled,
|
|
2392
|
+
ref,
|
|
2393
|
+
children
|
|
2394
|
+
});
|
|
2395
|
+
}
|
|
2396
|
+
}
|
|
2397
|
+
});
|
|
2398
|
+
};
|
|
2399
|
+
Focus_scope($$renderer3, {
|
|
2400
|
+
onOpenAutoFocus,
|
|
2401
|
+
onCloseAutoFocus,
|
|
2402
|
+
loop,
|
|
2403
|
+
enabled,
|
|
2404
|
+
trapFocus,
|
|
2405
|
+
ref,
|
|
2406
|
+
focusScope
|
|
2407
|
+
});
|
|
2408
|
+
}
|
|
2409
|
+
$$renderer3.push(`<!---->`);
|
|
2410
|
+
};
|
|
2411
|
+
Popper_content($$renderer2, {
|
|
2412
|
+
isStatic,
|
|
2413
|
+
id,
|
|
2414
|
+
side,
|
|
2415
|
+
sideOffset,
|
|
2416
|
+
align,
|
|
2417
|
+
alignOffset,
|
|
2418
|
+
arrowPadding,
|
|
2419
|
+
avoidCollisions,
|
|
2420
|
+
collisionBoundary,
|
|
2421
|
+
collisionPadding,
|
|
2422
|
+
sticky,
|
|
2423
|
+
hideWhenDetached,
|
|
2424
|
+
updatePositionStrategy,
|
|
2425
|
+
strategy: effectiveStrategy(),
|
|
2426
|
+
dir,
|
|
2427
|
+
wrapperId,
|
|
2428
|
+
style,
|
|
2429
|
+
onPlaced,
|
|
2430
|
+
customAnchor,
|
|
2431
|
+
enabled,
|
|
2432
|
+
tooltip,
|
|
2433
|
+
content,
|
|
2434
|
+
$$slots: { content: true }
|
|
2435
|
+
});
|
|
2436
|
+
}
|
|
2437
|
+
});
|
|
2438
|
+
}
|
|
2439
|
+
function Popper_layer($$renderer, $$props) {
|
|
2440
|
+
let {
|
|
2441
|
+
popper,
|
|
2442
|
+
open,
|
|
2443
|
+
onEscapeKeydown,
|
|
2444
|
+
escapeKeydownBehavior,
|
|
2445
|
+
preventOverflowTextSelection,
|
|
2446
|
+
id,
|
|
2447
|
+
onPointerDown,
|
|
2448
|
+
onPointerUp,
|
|
2449
|
+
side,
|
|
2450
|
+
sideOffset,
|
|
2451
|
+
align,
|
|
2452
|
+
alignOffset,
|
|
2453
|
+
arrowPadding,
|
|
2454
|
+
avoidCollisions,
|
|
2455
|
+
collisionBoundary,
|
|
2456
|
+
collisionPadding,
|
|
2457
|
+
sticky,
|
|
2458
|
+
hideWhenDetached,
|
|
2459
|
+
updatePositionStrategy,
|
|
2460
|
+
strategy,
|
|
2461
|
+
dir,
|
|
2462
|
+
preventScroll,
|
|
2463
|
+
wrapperId,
|
|
2464
|
+
style,
|
|
2465
|
+
onPlaced,
|
|
2466
|
+
onInteractOutside,
|
|
2467
|
+
onCloseAutoFocus,
|
|
2468
|
+
onOpenAutoFocus,
|
|
2469
|
+
onFocusOutside,
|
|
2470
|
+
interactOutsideBehavior = "close",
|
|
2471
|
+
loop,
|
|
2472
|
+
trapFocus = true,
|
|
2473
|
+
isValidEvent = () => false,
|
|
2474
|
+
customAnchor = null,
|
|
2475
|
+
isStatic = false,
|
|
2476
|
+
ref,
|
|
2477
|
+
shouldRender,
|
|
2478
|
+
$$slots,
|
|
2479
|
+
$$events,
|
|
2480
|
+
...restProps
|
|
2481
|
+
} = $$props;
|
|
2482
|
+
if (shouldRender) {
|
|
2483
|
+
$$renderer.push("<!--[0-->");
|
|
2484
|
+
Popper_layer_inner($$renderer, spread_props([
|
|
2485
|
+
{
|
|
2486
|
+
popper,
|
|
2487
|
+
onEscapeKeydown,
|
|
2488
|
+
escapeKeydownBehavior,
|
|
2489
|
+
preventOverflowTextSelection,
|
|
2490
|
+
id,
|
|
2491
|
+
onPointerDown,
|
|
2492
|
+
onPointerUp,
|
|
2493
|
+
side,
|
|
2494
|
+
sideOffset,
|
|
2495
|
+
align,
|
|
2496
|
+
alignOffset,
|
|
2497
|
+
arrowPadding,
|
|
2498
|
+
avoidCollisions,
|
|
2499
|
+
collisionBoundary,
|
|
2500
|
+
collisionPadding,
|
|
2501
|
+
sticky,
|
|
2502
|
+
hideWhenDetached,
|
|
2503
|
+
updatePositionStrategy,
|
|
2504
|
+
strategy,
|
|
2505
|
+
dir,
|
|
2506
|
+
preventScroll,
|
|
2507
|
+
wrapperId,
|
|
2508
|
+
style,
|
|
2509
|
+
onPlaced,
|
|
2510
|
+
customAnchor,
|
|
2511
|
+
isStatic,
|
|
2512
|
+
enabled: open,
|
|
2513
|
+
onInteractOutside,
|
|
2514
|
+
onCloseAutoFocus,
|
|
2515
|
+
onOpenAutoFocus,
|
|
2516
|
+
interactOutsideBehavior,
|
|
2517
|
+
loop,
|
|
2518
|
+
trapFocus,
|
|
2519
|
+
isValidEvent,
|
|
2520
|
+
onFocusOutside,
|
|
2521
|
+
forceMount: false,
|
|
2522
|
+
ref
|
|
2523
|
+
},
|
|
2524
|
+
restProps
|
|
2525
|
+
]));
|
|
2526
|
+
} else {
|
|
2527
|
+
$$renderer.push("<!--[-1-->");
|
|
2528
|
+
}
|
|
2529
|
+
$$renderer.push(`<!--]-->`);
|
|
2530
|
+
}
|
|
2531
|
+
function Popper_layer_force_mount($$renderer, $$props) {
|
|
2532
|
+
let {
|
|
2533
|
+
popper,
|
|
2534
|
+
onEscapeKeydown,
|
|
2535
|
+
escapeKeydownBehavior,
|
|
2536
|
+
preventOverflowTextSelection,
|
|
2537
|
+
id,
|
|
2538
|
+
onPointerDown,
|
|
2539
|
+
onPointerUp,
|
|
2540
|
+
side,
|
|
2541
|
+
sideOffset,
|
|
2542
|
+
align,
|
|
2543
|
+
alignOffset,
|
|
2544
|
+
arrowPadding,
|
|
2545
|
+
avoidCollisions,
|
|
2546
|
+
collisionBoundary,
|
|
2547
|
+
collisionPadding,
|
|
2548
|
+
sticky,
|
|
2549
|
+
hideWhenDetached,
|
|
2550
|
+
updatePositionStrategy,
|
|
2551
|
+
strategy,
|
|
2552
|
+
dir,
|
|
2553
|
+
preventScroll,
|
|
2554
|
+
wrapperId,
|
|
2555
|
+
style,
|
|
2556
|
+
onPlaced,
|
|
2557
|
+
onInteractOutside,
|
|
2558
|
+
onCloseAutoFocus,
|
|
2559
|
+
onOpenAutoFocus,
|
|
2560
|
+
onFocusOutside,
|
|
2561
|
+
interactOutsideBehavior = "close",
|
|
2562
|
+
loop,
|
|
2563
|
+
trapFocus = true,
|
|
2564
|
+
isValidEvent = () => false,
|
|
2565
|
+
customAnchor = null,
|
|
2566
|
+
isStatic = false,
|
|
2567
|
+
enabled,
|
|
2568
|
+
$$slots,
|
|
2569
|
+
$$events,
|
|
2570
|
+
...restProps
|
|
2571
|
+
} = $$props;
|
|
2572
|
+
Popper_layer_inner($$renderer, spread_props([
|
|
2573
|
+
{
|
|
2574
|
+
popper,
|
|
2575
|
+
onEscapeKeydown,
|
|
2576
|
+
escapeKeydownBehavior,
|
|
2577
|
+
preventOverflowTextSelection,
|
|
2578
|
+
id,
|
|
2579
|
+
onPointerDown,
|
|
2580
|
+
onPointerUp,
|
|
2581
|
+
side,
|
|
2582
|
+
sideOffset,
|
|
2583
|
+
align,
|
|
2584
|
+
alignOffset,
|
|
2585
|
+
arrowPadding,
|
|
2586
|
+
avoidCollisions,
|
|
2587
|
+
collisionBoundary,
|
|
2588
|
+
collisionPadding,
|
|
2589
|
+
sticky,
|
|
2590
|
+
hideWhenDetached,
|
|
2591
|
+
updatePositionStrategy,
|
|
2592
|
+
strategy,
|
|
2593
|
+
dir,
|
|
2594
|
+
preventScroll,
|
|
2595
|
+
wrapperId,
|
|
2596
|
+
style,
|
|
2597
|
+
onPlaced,
|
|
2598
|
+
customAnchor,
|
|
2599
|
+
isStatic,
|
|
2600
|
+
enabled,
|
|
2601
|
+
onInteractOutside,
|
|
2602
|
+
onCloseAutoFocus,
|
|
2603
|
+
onOpenAutoFocus,
|
|
2604
|
+
interactOutsideBehavior,
|
|
2605
|
+
loop,
|
|
2606
|
+
trapFocus,
|
|
2607
|
+
isValidEvent,
|
|
2608
|
+
onFocusOutside
|
|
2609
|
+
},
|
|
2610
|
+
restProps,
|
|
2611
|
+
{ forceMount: true }
|
|
2612
|
+
]));
|
|
2613
|
+
}
|
|
2614
|
+
function isPointInPolygon(point, polygon) {
|
|
2615
|
+
const [x, y] = point;
|
|
2616
|
+
let isInside = false;
|
|
2617
|
+
const length = polygon.length;
|
|
2618
|
+
for (let i = 0, j = length - 1; i < length; j = i++) {
|
|
2619
|
+
const [xi, yi] = polygon[i] ?? [0, 0];
|
|
2620
|
+
const [xj, yj] = polygon[j] ?? [0, 0];
|
|
2621
|
+
const intersect = yi >= y !== yj >= y && x <= (xj - xi) * (y - yi) / (yj - yi) + xi;
|
|
2622
|
+
if (intersect) {
|
|
2623
|
+
isInside = !isInside;
|
|
2624
|
+
}
|
|
2625
|
+
}
|
|
2626
|
+
return isInside;
|
|
2627
|
+
}
|
|
2628
|
+
function isInsideRect(point, rect) {
|
|
2629
|
+
return point[0] >= rect.left && point[0] <= rect.right && point[1] >= rect.top && point[1] <= rect.bottom;
|
|
2630
|
+
}
|
|
2631
|
+
function getSide(triggerRect, contentRect) {
|
|
2632
|
+
const triggerCenterX = triggerRect.left + triggerRect.width / 2;
|
|
2633
|
+
const triggerCenterY = triggerRect.top + triggerRect.height / 2;
|
|
2634
|
+
const contentCenterX = contentRect.left + contentRect.width / 2;
|
|
2635
|
+
const contentCenterY = contentRect.top + contentRect.height / 2;
|
|
2636
|
+
const deltaX = contentCenterX - triggerCenterX;
|
|
2637
|
+
const deltaY = contentCenterY - triggerCenterY;
|
|
2638
|
+
if (Math.abs(deltaX) > Math.abs(deltaY)) {
|
|
2639
|
+
return deltaX > 0 ? "right" : "left";
|
|
2640
|
+
}
|
|
2641
|
+
return deltaY > 0 ? "bottom" : "top";
|
|
2642
|
+
}
|
|
2643
|
+
class SafePolygon {
|
|
2644
|
+
#opts;
|
|
2645
|
+
#buffer;
|
|
2646
|
+
#transitIntentTimeout;
|
|
2647
|
+
// tracks the cursor position when leaving trigger or content
|
|
2648
|
+
#exitPoint = null;
|
|
2649
|
+
// tracks what we're moving toward: "content" when leaving trigger, "trigger" when leaving content
|
|
2650
|
+
#exitTarget = null;
|
|
2651
|
+
#transitTargets = [];
|
|
2652
|
+
#trackedTriggerNode = null;
|
|
2653
|
+
#leaveFallbackRafId = null;
|
|
2654
|
+
#transitIntentTimeoutId = null;
|
|
2655
|
+
#cancelLeaveFallback() {
|
|
2656
|
+
if (this.#leaveFallbackRafId !== null) {
|
|
2657
|
+
cancelAnimationFrame(this.#leaveFallbackRafId);
|
|
2658
|
+
this.#leaveFallbackRafId = null;
|
|
2659
|
+
}
|
|
2660
|
+
}
|
|
2661
|
+
#scheduleLeaveFallback() {
|
|
2662
|
+
this.#cancelLeaveFallback();
|
|
2663
|
+
this.#leaveFallbackRafId = requestAnimationFrame(() => {
|
|
2664
|
+
this.#leaveFallbackRafId = null;
|
|
2665
|
+
if (!this.#exitPoint || !this.#exitTarget) return;
|
|
2666
|
+
this.#clearTracking();
|
|
2667
|
+
this.#opts.onPointerExit();
|
|
2668
|
+
});
|
|
2669
|
+
}
|
|
2670
|
+
#cancelTransitIntentTimeout() {
|
|
2671
|
+
if (this.#transitIntentTimeoutId !== null) {
|
|
2672
|
+
clearTimeout(this.#transitIntentTimeoutId);
|
|
2673
|
+
this.#transitIntentTimeoutId = null;
|
|
2674
|
+
}
|
|
2675
|
+
}
|
|
2676
|
+
#scheduleTransitIntentTimeout() {
|
|
2677
|
+
if (this.#transitIntentTimeout === null) return;
|
|
2678
|
+
this.#cancelTransitIntentTimeout();
|
|
2679
|
+
this.#transitIntentTimeoutId = window.setTimeout(
|
|
2680
|
+
() => {
|
|
2681
|
+
this.#transitIntentTimeoutId = null;
|
|
2682
|
+
if (!this.#exitPoint || !this.#exitTarget) return;
|
|
2683
|
+
this.#clearTracking();
|
|
2684
|
+
this.#opts.onPointerExit();
|
|
2685
|
+
},
|
|
2686
|
+
this.#transitIntentTimeout
|
|
2687
|
+
);
|
|
2688
|
+
}
|
|
2689
|
+
constructor(opts) {
|
|
2690
|
+
this.#opts = opts;
|
|
2691
|
+
this.#buffer = opts.buffer ?? 1;
|
|
2692
|
+
const transitIntentTimeout = opts.transitIntentTimeout;
|
|
2693
|
+
this.#transitIntentTimeout = typeof transitIntentTimeout === "number" && transitIntentTimeout > 0 ? transitIntentTimeout : null;
|
|
2694
|
+
watch([opts.triggerNode, opts.contentNode, opts.enabled], ([triggerNode, contentNode, enabled]) => {
|
|
2695
|
+
if (!triggerNode || !contentNode || !enabled) {
|
|
2696
|
+
this.#trackedTriggerNode = null;
|
|
2697
|
+
this.#clearTracking();
|
|
2698
|
+
return;
|
|
2699
|
+
}
|
|
2700
|
+
if (this.#trackedTriggerNode && this.#trackedTriggerNode !== triggerNode) {
|
|
2701
|
+
this.#clearTracking();
|
|
2702
|
+
}
|
|
2703
|
+
this.#trackedTriggerNode = triggerNode;
|
|
2704
|
+
const doc = getDocument(triggerNode);
|
|
2705
|
+
const handlePointerMove = (e) => {
|
|
2706
|
+
this.#onPointerMove([e.clientX, e.clientY], triggerNode, contentNode);
|
|
2707
|
+
};
|
|
2708
|
+
const handleTriggerLeave = (e) => {
|
|
2709
|
+
const target = e.relatedTarget;
|
|
2710
|
+
if (isElement$1(target) && contentNode.contains(target)) {
|
|
2711
|
+
return;
|
|
2712
|
+
}
|
|
2713
|
+
const ignoredTargets = this.#opts.ignoredTargets?.() ?? [];
|
|
2714
|
+
if (isElement$1(target) && ignoredTargets.some((n) => n === target || n.contains(target))) {
|
|
2715
|
+
return;
|
|
2716
|
+
}
|
|
2717
|
+
this.#transitTargets = isElement$1(target) && ignoredTargets.length > 0 ? ignoredTargets.filter((n) => target.contains(n)) : [];
|
|
2718
|
+
this.#exitPoint = [e.clientX, e.clientY];
|
|
2719
|
+
this.#exitTarget = "content";
|
|
2720
|
+
this.#scheduleLeaveFallback();
|
|
2721
|
+
};
|
|
2722
|
+
const handleTriggerEnter = () => {
|
|
2723
|
+
this.#clearTracking();
|
|
2724
|
+
};
|
|
2725
|
+
const handleContentEnter = () => {
|
|
2726
|
+
this.#clearTracking();
|
|
2727
|
+
};
|
|
2728
|
+
const handleContentLeave = (e) => {
|
|
2729
|
+
const target = e.relatedTarget;
|
|
2730
|
+
if (isElement$1(target) && triggerNode.contains(target)) {
|
|
2731
|
+
return;
|
|
2732
|
+
}
|
|
2733
|
+
this.#exitPoint = [e.clientX, e.clientY];
|
|
2734
|
+
this.#exitTarget = "trigger";
|
|
2735
|
+
this.#scheduleLeaveFallback();
|
|
2736
|
+
};
|
|
2737
|
+
return [
|
|
2738
|
+
on(doc, "pointermove", handlePointerMove),
|
|
2739
|
+
on(triggerNode, "pointerleave", handleTriggerLeave),
|
|
2740
|
+
on(triggerNode, "pointerenter", handleTriggerEnter),
|
|
2741
|
+
on(contentNode, "pointerenter", handleContentEnter),
|
|
2742
|
+
on(contentNode, "pointerleave", handleContentLeave)
|
|
2743
|
+
].reduce(
|
|
2744
|
+
(acc, cleanup) => () => {
|
|
2745
|
+
acc();
|
|
2746
|
+
cleanup();
|
|
2747
|
+
},
|
|
2748
|
+
() => {
|
|
2749
|
+
}
|
|
2750
|
+
);
|
|
2751
|
+
});
|
|
2752
|
+
}
|
|
2753
|
+
#onPointerMove(clientPoint, triggerNode, contentNode) {
|
|
2754
|
+
if (!this.#exitPoint || !this.#exitTarget) return;
|
|
2755
|
+
this.#cancelLeaveFallback();
|
|
2756
|
+
this.#scheduleTransitIntentTimeout();
|
|
2757
|
+
const triggerRect = triggerNode.getBoundingClientRect();
|
|
2758
|
+
const contentRect = contentNode.getBoundingClientRect();
|
|
2759
|
+
if (this.#exitTarget === "content" && isInsideRect(clientPoint, contentRect)) {
|
|
2760
|
+
this.#clearTracking();
|
|
2761
|
+
return;
|
|
2762
|
+
}
|
|
2763
|
+
if (this.#exitTarget === "trigger" && isInsideRect(clientPoint, triggerRect)) {
|
|
2764
|
+
this.#clearTracking();
|
|
2765
|
+
return;
|
|
2766
|
+
}
|
|
2767
|
+
if (this.#exitTarget === "content" && this.#transitTargets.length > 0) {
|
|
2768
|
+
for (const transitTarget of this.#transitTargets) {
|
|
2769
|
+
const transitRect = transitTarget.getBoundingClientRect();
|
|
2770
|
+
if (isInsideRect(clientPoint, transitRect)) return;
|
|
2771
|
+
const transitSide = getSide(triggerRect, transitRect);
|
|
2772
|
+
const transitCorridor = this.#getCorridorPolygon(triggerRect, transitRect, transitSide);
|
|
2773
|
+
if (transitCorridor && isPointInPolygon(clientPoint, transitCorridor)) return;
|
|
2774
|
+
}
|
|
2775
|
+
}
|
|
2776
|
+
const side = getSide(triggerRect, contentRect);
|
|
2777
|
+
const corridorPoly = this.#getCorridorPolygon(triggerRect, contentRect, side);
|
|
2778
|
+
if (corridorPoly && isPointInPolygon(clientPoint, corridorPoly)) {
|
|
2779
|
+
return;
|
|
2780
|
+
}
|
|
2781
|
+
const targetRect = this.#exitTarget === "content" ? contentRect : triggerRect;
|
|
2782
|
+
const safePoly = this.#getSafePolygon(this.#exitPoint, targetRect, side, this.#exitTarget);
|
|
2783
|
+
if (isPointInPolygon(clientPoint, safePoly)) {
|
|
2784
|
+
return;
|
|
2785
|
+
}
|
|
2786
|
+
this.#clearTracking();
|
|
2787
|
+
this.#opts.onPointerExit();
|
|
2788
|
+
}
|
|
2789
|
+
#clearTracking() {
|
|
2790
|
+
this.#exitPoint = null;
|
|
2791
|
+
this.#exitTarget = null;
|
|
2792
|
+
this.#transitTargets = [];
|
|
2793
|
+
this.#cancelLeaveFallback();
|
|
2794
|
+
this.#cancelTransitIntentTimeout();
|
|
2795
|
+
}
|
|
2796
|
+
/**
|
|
2797
|
+
* Creates a rectangular corridor between trigger and content
|
|
2798
|
+
* This prevents closing when cursor is in the gap between them
|
|
2799
|
+
*/
|
|
2800
|
+
#getCorridorPolygon(triggerRect, contentRect, side) {
|
|
2801
|
+
const buffer = this.#buffer;
|
|
2802
|
+
switch (side) {
|
|
2803
|
+
case "top":
|
|
2804
|
+
return [
|
|
2805
|
+
[
|
|
2806
|
+
Math.min(triggerRect.left, contentRect.left) - buffer,
|
|
2807
|
+
triggerRect.top
|
|
2808
|
+
],
|
|
2809
|
+
[
|
|
2810
|
+
Math.min(triggerRect.left, contentRect.left) - buffer,
|
|
2811
|
+
contentRect.bottom
|
|
2812
|
+
],
|
|
2813
|
+
[
|
|
2814
|
+
Math.max(triggerRect.right, contentRect.right) + buffer,
|
|
2815
|
+
contentRect.bottom
|
|
2816
|
+
],
|
|
2817
|
+
[
|
|
2818
|
+
Math.max(triggerRect.right, contentRect.right) + buffer,
|
|
2819
|
+
triggerRect.top
|
|
2820
|
+
]
|
|
2821
|
+
];
|
|
2822
|
+
case "bottom":
|
|
2823
|
+
return [
|
|
2824
|
+
[
|
|
2825
|
+
Math.min(triggerRect.left, contentRect.left) - buffer,
|
|
2826
|
+
triggerRect.bottom
|
|
2827
|
+
],
|
|
2828
|
+
[
|
|
2829
|
+
Math.min(triggerRect.left, contentRect.left) - buffer,
|
|
2830
|
+
contentRect.top
|
|
2831
|
+
],
|
|
2832
|
+
[
|
|
2833
|
+
Math.max(triggerRect.right, contentRect.right) + buffer,
|
|
2834
|
+
contentRect.top
|
|
2835
|
+
],
|
|
2836
|
+
[
|
|
2837
|
+
Math.max(triggerRect.right, contentRect.right) + buffer,
|
|
2838
|
+
triggerRect.bottom
|
|
2839
|
+
]
|
|
2840
|
+
];
|
|
2841
|
+
case "left":
|
|
2842
|
+
return [
|
|
2843
|
+
[
|
|
2844
|
+
triggerRect.left,
|
|
2845
|
+
Math.min(triggerRect.top, contentRect.top) - buffer
|
|
2846
|
+
],
|
|
2847
|
+
[
|
|
2848
|
+
contentRect.right,
|
|
2849
|
+
Math.min(triggerRect.top, contentRect.top) - buffer
|
|
2850
|
+
],
|
|
2851
|
+
[
|
|
2852
|
+
contentRect.right,
|
|
2853
|
+
Math.max(triggerRect.bottom, contentRect.bottom) + buffer
|
|
2854
|
+
],
|
|
2855
|
+
[
|
|
2856
|
+
triggerRect.left,
|
|
2857
|
+
Math.max(triggerRect.bottom, contentRect.bottom) + buffer
|
|
2858
|
+
]
|
|
2859
|
+
];
|
|
2860
|
+
case "right":
|
|
2861
|
+
return [
|
|
2862
|
+
[
|
|
2863
|
+
triggerRect.right,
|
|
2864
|
+
Math.min(triggerRect.top, contentRect.top) - buffer
|
|
2865
|
+
],
|
|
2866
|
+
[
|
|
2867
|
+
contentRect.left,
|
|
2868
|
+
Math.min(triggerRect.top, contentRect.top) - buffer
|
|
2869
|
+
],
|
|
2870
|
+
[
|
|
2871
|
+
contentRect.left,
|
|
2872
|
+
Math.max(triggerRect.bottom, contentRect.bottom) + buffer
|
|
2873
|
+
],
|
|
2874
|
+
[
|
|
2875
|
+
triggerRect.right,
|
|
2876
|
+
Math.max(triggerRect.bottom, contentRect.bottom) + buffer
|
|
2877
|
+
]
|
|
2878
|
+
];
|
|
2879
|
+
}
|
|
2880
|
+
}
|
|
2881
|
+
/**
|
|
2882
|
+
* Creates a triangular/trapezoidal safe zone from the exit point to the target
|
|
2883
|
+
*/
|
|
2884
|
+
#getSafePolygon(exitPoint, targetRect, side, exitTarget) {
|
|
2885
|
+
const buffer = this.#buffer * 4;
|
|
2886
|
+
const [x, y] = exitPoint;
|
|
2887
|
+
const effectiveSide = exitTarget === "trigger" ? this.#flipSide(side) : side;
|
|
2888
|
+
switch (effectiveSide) {
|
|
2889
|
+
case "top":
|
|
2890
|
+
return [
|
|
2891
|
+
[x - buffer, y + buffer],
|
|
2892
|
+
[x + buffer, y + buffer],
|
|
2893
|
+
[targetRect.right + buffer, targetRect.bottom],
|
|
2894
|
+
[targetRect.right + buffer, targetRect.top],
|
|
2895
|
+
[targetRect.left - buffer, targetRect.top],
|
|
2896
|
+
[targetRect.left - buffer, targetRect.bottom]
|
|
2897
|
+
];
|
|
2898
|
+
case "bottom":
|
|
2899
|
+
return [
|
|
2900
|
+
[x - buffer, y - buffer],
|
|
2901
|
+
[x + buffer, y - buffer],
|
|
2902
|
+
[targetRect.right + buffer, targetRect.top],
|
|
2903
|
+
[targetRect.right + buffer, targetRect.bottom],
|
|
2904
|
+
[targetRect.left - buffer, targetRect.bottom],
|
|
2905
|
+
[targetRect.left - buffer, targetRect.top]
|
|
2906
|
+
];
|
|
2907
|
+
case "left":
|
|
2908
|
+
return [
|
|
2909
|
+
[x + buffer, y - buffer],
|
|
2910
|
+
[x + buffer, y + buffer],
|
|
2911
|
+
[targetRect.right, targetRect.bottom + buffer],
|
|
2912
|
+
[targetRect.left, targetRect.bottom + buffer],
|
|
2913
|
+
[targetRect.left, targetRect.top - buffer],
|
|
2914
|
+
[targetRect.right, targetRect.top - buffer]
|
|
2915
|
+
];
|
|
2916
|
+
case "right":
|
|
2917
|
+
return [
|
|
2918
|
+
[x - buffer, y - buffer],
|
|
2919
|
+
[x - buffer, y + buffer],
|
|
2920
|
+
[targetRect.left, targetRect.bottom + buffer],
|
|
2921
|
+
[targetRect.right, targetRect.bottom + buffer],
|
|
2922
|
+
[targetRect.right, targetRect.top - buffer],
|
|
2923
|
+
[targetRect.left, targetRect.top - buffer]
|
|
2924
|
+
];
|
|
2925
|
+
}
|
|
2926
|
+
}
|
|
2927
|
+
#flipSide(side) {
|
|
2928
|
+
switch (side) {
|
|
2929
|
+
case "top":
|
|
2930
|
+
return "bottom";
|
|
2931
|
+
case "bottom":
|
|
2932
|
+
return "top";
|
|
2933
|
+
case "left":
|
|
2934
|
+
return "right";
|
|
2935
|
+
case "right":
|
|
2936
|
+
return "left";
|
|
2937
|
+
}
|
|
2938
|
+
}
|
|
2939
|
+
}
|
|
2940
|
+
const popoverAttrs = createBitsAttrs({
|
|
2941
|
+
component: "popover",
|
|
2942
|
+
parts: ["root", "trigger", "content", "close", "overlay"]
|
|
2943
|
+
});
|
|
2944
|
+
const PopoverRootContext = new Context("Popover.Root");
|
|
2945
|
+
class PopoverRootState {
|
|
2946
|
+
static create(opts) {
|
|
2947
|
+
return PopoverRootContext.set(new PopoverRootState(opts));
|
|
2948
|
+
}
|
|
2949
|
+
opts;
|
|
2950
|
+
contentNode = null;
|
|
2951
|
+
contentPresence;
|
|
2952
|
+
triggerNode = null;
|
|
2953
|
+
overlayNode = null;
|
|
2954
|
+
overlayPresence;
|
|
2955
|
+
// hover tracking state
|
|
2956
|
+
openedViaHover = false;
|
|
2957
|
+
hasInteractedWithContent = false;
|
|
2958
|
+
hoverCooldown = false;
|
|
2959
|
+
closeDelay = 0;
|
|
2960
|
+
#closeTimeout = null;
|
|
2961
|
+
#domContext = null;
|
|
2962
|
+
constructor(opts) {
|
|
2963
|
+
this.opts = opts;
|
|
2964
|
+
this.contentPresence = new PresenceManager({
|
|
2965
|
+
ref: boxWith(() => this.contentNode),
|
|
2966
|
+
open: this.opts.open,
|
|
2967
|
+
onComplete: () => {
|
|
2968
|
+
this.opts.onOpenChangeComplete.current(this.opts.open.current);
|
|
2969
|
+
}
|
|
2970
|
+
});
|
|
2971
|
+
this.overlayPresence = new PresenceManager({ ref: boxWith(() => this.overlayNode), open: this.opts.open });
|
|
2972
|
+
watch(() => this.opts.open.current, (isOpen) => {
|
|
2973
|
+
if (!isOpen) {
|
|
2974
|
+
this.openedViaHover = false;
|
|
2975
|
+
this.hasInteractedWithContent = false;
|
|
2976
|
+
this.#clearCloseTimeout();
|
|
2977
|
+
}
|
|
2978
|
+
});
|
|
2979
|
+
}
|
|
2980
|
+
setDomContext(ctx) {
|
|
2981
|
+
this.#domContext = ctx;
|
|
2982
|
+
}
|
|
2983
|
+
#clearCloseTimeout() {
|
|
2984
|
+
if (this.#closeTimeout !== null && this.#domContext) {
|
|
2985
|
+
this.#domContext.clearTimeout(this.#closeTimeout);
|
|
2986
|
+
this.#closeTimeout = null;
|
|
2987
|
+
}
|
|
2988
|
+
}
|
|
2989
|
+
toggleOpen() {
|
|
2990
|
+
this.#clearCloseTimeout();
|
|
2991
|
+
this.opts.open.current = !this.opts.open.current;
|
|
2992
|
+
}
|
|
2993
|
+
handleClose() {
|
|
2994
|
+
this.#clearCloseTimeout();
|
|
2995
|
+
if (!this.opts.open.current) return;
|
|
2996
|
+
this.opts.open.current = false;
|
|
2997
|
+
}
|
|
2998
|
+
handleHoverOpen() {
|
|
2999
|
+
this.#clearCloseTimeout();
|
|
3000
|
+
if (this.opts.open.current) return;
|
|
3001
|
+
this.openedViaHover = true;
|
|
3002
|
+
this.opts.open.current = true;
|
|
3003
|
+
}
|
|
3004
|
+
handleHoverClose() {
|
|
3005
|
+
if (!this.opts.open.current) return;
|
|
3006
|
+
if (this.openedViaHover && !this.hasInteractedWithContent) {
|
|
3007
|
+
this.opts.open.current = false;
|
|
3008
|
+
}
|
|
3009
|
+
}
|
|
3010
|
+
handleDelayedHoverClose() {
|
|
3011
|
+
if (!this.opts.open.current) return;
|
|
3012
|
+
if (!this.openedViaHover || this.hasInteractedWithContent) return;
|
|
3013
|
+
this.#clearCloseTimeout();
|
|
3014
|
+
if (this.closeDelay <= 0) {
|
|
3015
|
+
this.opts.open.current = false;
|
|
3016
|
+
} else if (this.#domContext) {
|
|
3017
|
+
this.#closeTimeout = this.#domContext.setTimeout(
|
|
3018
|
+
() => {
|
|
3019
|
+
if (this.openedViaHover && !this.hasInteractedWithContent) {
|
|
3020
|
+
this.opts.open.current = false;
|
|
3021
|
+
}
|
|
3022
|
+
this.#closeTimeout = null;
|
|
3023
|
+
},
|
|
3024
|
+
this.closeDelay
|
|
3025
|
+
);
|
|
3026
|
+
}
|
|
3027
|
+
}
|
|
3028
|
+
cancelDelayedClose() {
|
|
3029
|
+
this.#clearCloseTimeout();
|
|
3030
|
+
}
|
|
3031
|
+
markInteraction() {
|
|
3032
|
+
this.hasInteractedWithContent = true;
|
|
3033
|
+
this.#clearCloseTimeout();
|
|
3034
|
+
}
|
|
3035
|
+
}
|
|
3036
|
+
class PopoverTriggerState {
|
|
3037
|
+
static create(opts) {
|
|
3038
|
+
return new PopoverTriggerState(opts, PopoverRootContext.get());
|
|
3039
|
+
}
|
|
3040
|
+
opts;
|
|
3041
|
+
root;
|
|
3042
|
+
attachment;
|
|
3043
|
+
domContext;
|
|
3044
|
+
#openTimeout = null;
|
|
3045
|
+
#closeTimeout = null;
|
|
3046
|
+
#isHovering = false;
|
|
3047
|
+
constructor(opts, root) {
|
|
3048
|
+
this.opts = opts;
|
|
3049
|
+
this.root = root;
|
|
3050
|
+
this.attachment = attachRef(this.opts.ref, (v) => this.root.triggerNode = v);
|
|
3051
|
+
this.domContext = new DOMContext(opts.ref);
|
|
3052
|
+
this.root.setDomContext(this.domContext);
|
|
3053
|
+
this.onclick = this.onclick.bind(this);
|
|
3054
|
+
this.onkeydown = this.onkeydown.bind(this);
|
|
3055
|
+
this.onpointerenter = this.onpointerenter.bind(this);
|
|
3056
|
+
this.onpointerleave = this.onpointerleave.bind(this);
|
|
3057
|
+
watch(() => this.opts.closeDelay.current, (delay) => {
|
|
3058
|
+
this.root.closeDelay = delay;
|
|
3059
|
+
});
|
|
3060
|
+
}
|
|
3061
|
+
#clearOpenTimeout() {
|
|
3062
|
+
if (this.#openTimeout !== null) {
|
|
3063
|
+
this.domContext.clearTimeout(this.#openTimeout);
|
|
3064
|
+
this.#openTimeout = null;
|
|
3065
|
+
}
|
|
3066
|
+
}
|
|
3067
|
+
#clearCloseTimeout() {
|
|
3068
|
+
if (this.#closeTimeout !== null) {
|
|
3069
|
+
this.domContext.clearTimeout(this.#closeTimeout);
|
|
3070
|
+
this.#closeTimeout = null;
|
|
3071
|
+
}
|
|
3072
|
+
}
|
|
3073
|
+
#clearAllTimeouts() {
|
|
3074
|
+
this.#clearOpenTimeout();
|
|
3075
|
+
this.#clearCloseTimeout();
|
|
3076
|
+
}
|
|
3077
|
+
onpointerenter(e) {
|
|
3078
|
+
if (this.opts.disabled.current) return;
|
|
3079
|
+
if (!this.opts.openOnHover.current) return;
|
|
3080
|
+
if (isTouch(e)) return;
|
|
3081
|
+
this.#isHovering = true;
|
|
3082
|
+
this.#clearCloseTimeout();
|
|
3083
|
+
this.root.cancelDelayedClose();
|
|
3084
|
+
if (this.root.opts.open.current || this.root.hoverCooldown) return;
|
|
3085
|
+
const delay = this.opts.openDelay.current;
|
|
3086
|
+
if (delay <= 0) {
|
|
3087
|
+
this.root.handleHoverOpen();
|
|
3088
|
+
} else {
|
|
3089
|
+
this.#openTimeout = this.domContext.setTimeout(
|
|
3090
|
+
() => {
|
|
3091
|
+
this.root.handleHoverOpen();
|
|
3092
|
+
this.#openTimeout = null;
|
|
3093
|
+
},
|
|
3094
|
+
delay
|
|
3095
|
+
);
|
|
3096
|
+
}
|
|
3097
|
+
}
|
|
3098
|
+
onpointerleave(e) {
|
|
3099
|
+
if (this.opts.disabled.current) return;
|
|
3100
|
+
if (!this.opts.openOnHover.current) return;
|
|
3101
|
+
if (isTouch(e)) return;
|
|
3102
|
+
this.#isHovering = false;
|
|
3103
|
+
this.#clearOpenTimeout();
|
|
3104
|
+
this.root.hoverCooldown = false;
|
|
3105
|
+
}
|
|
3106
|
+
onclick(e) {
|
|
3107
|
+
if (this.opts.disabled.current) return;
|
|
3108
|
+
if (e.button !== 0) return;
|
|
3109
|
+
this.#clearAllTimeouts();
|
|
3110
|
+
if (this.#isHovering && this.root.opts.open.current && this.root.openedViaHover) {
|
|
3111
|
+
this.root.openedViaHover = false;
|
|
3112
|
+
this.root.hasInteractedWithContent = true;
|
|
3113
|
+
return;
|
|
3114
|
+
}
|
|
3115
|
+
if (this.#isHovering && this.opts.openOnHover.current && this.root.opts.open.current) {
|
|
3116
|
+
this.root.hoverCooldown = true;
|
|
3117
|
+
}
|
|
3118
|
+
if (this.root.hoverCooldown && !this.root.opts.open.current) {
|
|
3119
|
+
this.root.hoverCooldown = false;
|
|
3120
|
+
}
|
|
3121
|
+
this.root.toggleOpen();
|
|
3122
|
+
}
|
|
3123
|
+
onkeydown(e) {
|
|
3124
|
+
if (this.opts.disabled.current) return;
|
|
3125
|
+
if (!(e.key === ENTER || e.key === SPACE)) return;
|
|
3126
|
+
e.preventDefault();
|
|
3127
|
+
this.#clearAllTimeouts();
|
|
3128
|
+
this.root.toggleOpen();
|
|
3129
|
+
}
|
|
3130
|
+
#getAriaControls() {
|
|
3131
|
+
if (this.root.opts.open.current && this.root.contentNode?.id) {
|
|
3132
|
+
return this.root.contentNode?.id;
|
|
3133
|
+
}
|
|
3134
|
+
}
|
|
3135
|
+
#props = derived(() => ({
|
|
3136
|
+
id: this.opts.id.current,
|
|
3137
|
+
"aria-haspopup": "dialog",
|
|
3138
|
+
"aria-expanded": boolToStr(this.root.opts.open.current),
|
|
3139
|
+
"data-state": getDataOpenClosed(this.root.opts.open.current),
|
|
3140
|
+
"aria-controls": this.#getAriaControls(),
|
|
3141
|
+
[popoverAttrs.trigger]: "",
|
|
3142
|
+
disabled: this.opts.disabled.current,
|
|
3143
|
+
//
|
|
3144
|
+
onkeydown: this.onkeydown,
|
|
3145
|
+
onclick: this.onclick,
|
|
3146
|
+
onpointerenter: this.onpointerenter,
|
|
3147
|
+
onpointerleave: this.onpointerleave,
|
|
3148
|
+
...this.attachment
|
|
3149
|
+
}));
|
|
3150
|
+
get props() {
|
|
3151
|
+
return this.#props();
|
|
3152
|
+
}
|
|
3153
|
+
set props($$value) {
|
|
3154
|
+
return this.#props($$value);
|
|
3155
|
+
}
|
|
3156
|
+
}
|
|
3157
|
+
class PopoverContentState {
|
|
3158
|
+
static create(opts) {
|
|
3159
|
+
return new PopoverContentState(opts, PopoverRootContext.get());
|
|
3160
|
+
}
|
|
3161
|
+
opts;
|
|
3162
|
+
root;
|
|
3163
|
+
attachment;
|
|
3164
|
+
constructor(opts, root) {
|
|
3165
|
+
this.opts = opts;
|
|
3166
|
+
this.root = root;
|
|
3167
|
+
this.attachment = attachRef(this.opts.ref, (v) => this.root.contentNode = v);
|
|
3168
|
+
this.onpointerdown = this.onpointerdown.bind(this);
|
|
3169
|
+
this.onfocusin = this.onfocusin.bind(this);
|
|
3170
|
+
this.onpointerenter = this.onpointerenter.bind(this);
|
|
3171
|
+
this.onpointerleave = this.onpointerleave.bind(this);
|
|
3172
|
+
new SafePolygon({
|
|
3173
|
+
triggerNode: () => this.root.triggerNode,
|
|
3174
|
+
contentNode: () => this.root.contentNode,
|
|
3175
|
+
enabled: () => this.root.opts.open.current && this.root.openedViaHover && !this.root.hasInteractedWithContent,
|
|
3176
|
+
onPointerExit: () => {
|
|
3177
|
+
this.root.handleDelayedHoverClose();
|
|
3178
|
+
}
|
|
3179
|
+
});
|
|
3180
|
+
}
|
|
3181
|
+
onpointerdown(_) {
|
|
3182
|
+
this.root.markInteraction();
|
|
3183
|
+
}
|
|
3184
|
+
onfocusin(e) {
|
|
3185
|
+
const target = e.target;
|
|
3186
|
+
if (isElement$1(target) && isTabbable(target)) {
|
|
3187
|
+
this.root.markInteraction();
|
|
3188
|
+
}
|
|
3189
|
+
}
|
|
3190
|
+
onpointerenter(e) {
|
|
3191
|
+
if (isTouch(e)) return;
|
|
3192
|
+
this.root.cancelDelayedClose();
|
|
3193
|
+
}
|
|
3194
|
+
onpointerleave(e) {
|
|
3195
|
+
if (isTouch(e)) return;
|
|
3196
|
+
}
|
|
3197
|
+
onInteractOutside = (e) => {
|
|
3198
|
+
this.opts.onInteractOutside.current(e);
|
|
3199
|
+
if (e.defaultPrevented) return;
|
|
3200
|
+
if (!isElement$1(e.target)) return;
|
|
3201
|
+
const closestTrigger = e.target.closest(popoverAttrs.selector("trigger"));
|
|
3202
|
+
if (closestTrigger && closestTrigger === this.root.triggerNode) return;
|
|
3203
|
+
if (this.opts.customAnchor.current) {
|
|
3204
|
+
if (isElement$1(this.opts.customAnchor.current)) {
|
|
3205
|
+
if (this.opts.customAnchor.current.contains(e.target)) return;
|
|
3206
|
+
} else if (typeof this.opts.customAnchor.current === "string") {
|
|
3207
|
+
const el = document.querySelector(this.opts.customAnchor.current);
|
|
3208
|
+
if (el && el.contains(e.target)) return;
|
|
3209
|
+
}
|
|
3210
|
+
}
|
|
3211
|
+
this.root.handleClose();
|
|
3212
|
+
};
|
|
3213
|
+
onEscapeKeydown = (e) => {
|
|
3214
|
+
this.opts.onEscapeKeydown.current(e);
|
|
3215
|
+
if (e.defaultPrevented) return;
|
|
3216
|
+
this.root.handleClose();
|
|
3217
|
+
};
|
|
3218
|
+
get shouldRender() {
|
|
3219
|
+
return this.root.contentPresence.shouldRender;
|
|
3220
|
+
}
|
|
3221
|
+
get shouldTrapFocus() {
|
|
3222
|
+
if (this.root.openedViaHover && !this.root.hasInteractedWithContent) return false;
|
|
3223
|
+
return true;
|
|
3224
|
+
}
|
|
3225
|
+
#snippetProps = derived(() => ({ open: this.root.opts.open.current }));
|
|
3226
|
+
get snippetProps() {
|
|
3227
|
+
return this.#snippetProps();
|
|
3228
|
+
}
|
|
3229
|
+
set snippetProps($$value) {
|
|
3230
|
+
return this.#snippetProps($$value);
|
|
3231
|
+
}
|
|
3232
|
+
#props = derived(() => ({
|
|
3233
|
+
id: this.opts.id.current,
|
|
3234
|
+
tabindex: -1,
|
|
3235
|
+
"data-state": getDataOpenClosed(this.root.opts.open.current),
|
|
3236
|
+
...getDataTransitionAttrs(this.root.contentPresence.transitionStatus),
|
|
3237
|
+
[popoverAttrs.content]: "",
|
|
3238
|
+
style: { pointerEvents: "auto", contain: "layout style" },
|
|
3239
|
+
onpointerdown: this.onpointerdown,
|
|
3240
|
+
onfocusin: this.onfocusin,
|
|
3241
|
+
onpointerenter: this.onpointerenter,
|
|
3242
|
+
onpointerleave: this.onpointerleave,
|
|
3243
|
+
...this.attachment
|
|
3244
|
+
}));
|
|
3245
|
+
get props() {
|
|
3246
|
+
return this.#props();
|
|
3247
|
+
}
|
|
3248
|
+
set props($$value) {
|
|
3249
|
+
return this.#props($$value);
|
|
3250
|
+
}
|
|
3251
|
+
popperProps = {
|
|
3252
|
+
onInteractOutside: this.onInteractOutside,
|
|
3253
|
+
onEscapeKeydown: this.onEscapeKeydown
|
|
3254
|
+
};
|
|
3255
|
+
}
|
|
3256
|
+
function Popover_content($$renderer, $$props) {
|
|
3257
|
+
$$renderer.component(($$renderer2) => {
|
|
3258
|
+
const uid = props_id($$renderer2);
|
|
3259
|
+
let {
|
|
3260
|
+
child,
|
|
3261
|
+
children,
|
|
3262
|
+
ref = null,
|
|
3263
|
+
id = createId(uid),
|
|
3264
|
+
forceMount = false,
|
|
3265
|
+
onOpenAutoFocus = noop,
|
|
3266
|
+
onCloseAutoFocus = noop,
|
|
3267
|
+
onEscapeKeydown = noop,
|
|
3268
|
+
onInteractOutside = noop,
|
|
3269
|
+
trapFocus = true,
|
|
3270
|
+
preventScroll = false,
|
|
3271
|
+
customAnchor = null,
|
|
3272
|
+
style,
|
|
3273
|
+
$$slots,
|
|
3274
|
+
$$events,
|
|
3275
|
+
...restProps
|
|
3276
|
+
} = $$props;
|
|
3277
|
+
const contentState = PopoverContentState.create({
|
|
3278
|
+
id: boxWith(() => id),
|
|
3279
|
+
ref: boxWith(() => ref, (v) => ref = v),
|
|
3280
|
+
onInteractOutside: boxWith(() => onInteractOutside),
|
|
3281
|
+
onEscapeKeydown: boxWith(() => onEscapeKeydown),
|
|
3282
|
+
customAnchor: boxWith(() => customAnchor)
|
|
3283
|
+
});
|
|
3284
|
+
const mergedProps = derived(() => mergeProps(restProps, contentState.props));
|
|
3285
|
+
const effectiveTrapFocus = derived(() => trapFocus && contentState.shouldTrapFocus);
|
|
3286
|
+
function handleOpenAutoFocus(e) {
|
|
3287
|
+
if (!contentState.shouldTrapFocus) {
|
|
3288
|
+
e.preventDefault();
|
|
3289
|
+
}
|
|
3290
|
+
onOpenAutoFocus(e);
|
|
3291
|
+
}
|
|
3292
|
+
if (forceMount) {
|
|
3293
|
+
$$renderer2.push("<!--[0-->");
|
|
3294
|
+
{
|
|
3295
|
+
let popper = function($$renderer3, { props, wrapperProps }) {
|
|
3296
|
+
const finalProps = mergeProps(props, { style: getFloatingContentCSSVars("popover") }, { style });
|
|
3297
|
+
if (child) {
|
|
3298
|
+
$$renderer3.push("<!--[0-->");
|
|
3299
|
+
child($$renderer3, {
|
|
3300
|
+
props: finalProps,
|
|
3301
|
+
wrapperProps,
|
|
3302
|
+
...contentState.snippetProps
|
|
3303
|
+
});
|
|
3304
|
+
$$renderer3.push(`<!---->`);
|
|
3305
|
+
} else {
|
|
3306
|
+
$$renderer3.push(`<!--[-1--><div${attributes({ ...wrapperProps })}><div${attributes({ ...finalProps })}>`);
|
|
3307
|
+
children?.($$renderer3);
|
|
3308
|
+
$$renderer3.push(`<!----></div></div>`);
|
|
3309
|
+
}
|
|
3310
|
+
$$renderer3.push(`<!--]-->`);
|
|
3311
|
+
};
|
|
3312
|
+
Popper_layer_force_mount($$renderer2, spread_props([
|
|
3313
|
+
mergedProps(),
|
|
3314
|
+
contentState.popperProps,
|
|
3315
|
+
{
|
|
3316
|
+
ref: contentState.opts.ref,
|
|
3317
|
+
enabled: contentState.root.opts.open.current,
|
|
3318
|
+
id,
|
|
3319
|
+
trapFocus: effectiveTrapFocus(),
|
|
3320
|
+
preventScroll,
|
|
3321
|
+
loop: true,
|
|
3322
|
+
forceMount: true,
|
|
3323
|
+
customAnchor,
|
|
3324
|
+
onOpenAutoFocus: handleOpenAutoFocus,
|
|
3325
|
+
onCloseAutoFocus,
|
|
3326
|
+
shouldRender: contentState.shouldRender,
|
|
3327
|
+
popper,
|
|
3328
|
+
$$slots: { popper: true }
|
|
3329
|
+
}
|
|
3330
|
+
]));
|
|
3331
|
+
}
|
|
3332
|
+
} else if (!forceMount) {
|
|
3333
|
+
$$renderer2.push("<!--[1-->");
|
|
3334
|
+
{
|
|
3335
|
+
let popper = function($$renderer3, { props, wrapperProps }) {
|
|
3336
|
+
const finalProps = mergeProps(props, { style: getFloatingContentCSSVars("popover") }, { style });
|
|
3337
|
+
if (child) {
|
|
3338
|
+
$$renderer3.push("<!--[0-->");
|
|
3339
|
+
child($$renderer3, {
|
|
3340
|
+
props: finalProps,
|
|
3341
|
+
wrapperProps,
|
|
3342
|
+
...contentState.snippetProps
|
|
3343
|
+
});
|
|
3344
|
+
$$renderer3.push(`<!---->`);
|
|
3345
|
+
} else {
|
|
3346
|
+
$$renderer3.push(`<!--[-1--><div${attributes({ ...wrapperProps })}><div${attributes({ ...finalProps })}>`);
|
|
3347
|
+
children?.($$renderer3);
|
|
3348
|
+
$$renderer3.push(`<!----></div></div>`);
|
|
3349
|
+
}
|
|
3350
|
+
$$renderer3.push(`<!--]-->`);
|
|
3351
|
+
};
|
|
3352
|
+
Popper_layer($$renderer2, spread_props([
|
|
3353
|
+
mergedProps(),
|
|
3354
|
+
contentState.popperProps,
|
|
3355
|
+
{
|
|
3356
|
+
ref: contentState.opts.ref,
|
|
3357
|
+
open: contentState.root.opts.open.current,
|
|
3358
|
+
id,
|
|
3359
|
+
trapFocus: effectiveTrapFocus(),
|
|
3360
|
+
preventScroll,
|
|
3361
|
+
loop: true,
|
|
3362
|
+
forceMount: false,
|
|
3363
|
+
customAnchor,
|
|
3364
|
+
onOpenAutoFocus: handleOpenAutoFocus,
|
|
3365
|
+
onCloseAutoFocus,
|
|
3366
|
+
shouldRender: contentState.shouldRender,
|
|
3367
|
+
popper,
|
|
3368
|
+
$$slots: { popper: true }
|
|
3369
|
+
}
|
|
3370
|
+
]));
|
|
3371
|
+
}
|
|
3372
|
+
} else {
|
|
3373
|
+
$$renderer2.push("<!--[-1-->");
|
|
3374
|
+
}
|
|
3375
|
+
$$renderer2.push(`<!--]-->`);
|
|
3376
|
+
bind_props($$props, { ref });
|
|
3377
|
+
});
|
|
3378
|
+
}
|
|
3379
|
+
function Popover_trigger($$renderer, $$props) {
|
|
3380
|
+
$$renderer.component(($$renderer2) => {
|
|
3381
|
+
const uid = props_id($$renderer2);
|
|
3382
|
+
let {
|
|
3383
|
+
children,
|
|
3384
|
+
child,
|
|
3385
|
+
id = createId(uid),
|
|
3386
|
+
ref = null,
|
|
3387
|
+
type = "button",
|
|
3388
|
+
disabled = false,
|
|
3389
|
+
openOnHover = false,
|
|
3390
|
+
openDelay = 700,
|
|
3391
|
+
closeDelay = 300,
|
|
3392
|
+
$$slots,
|
|
3393
|
+
$$events,
|
|
3394
|
+
...restProps
|
|
3395
|
+
} = $$props;
|
|
3396
|
+
const triggerState = PopoverTriggerState.create({
|
|
3397
|
+
id: boxWith(() => id),
|
|
3398
|
+
ref: boxWith(() => ref, (v) => ref = v),
|
|
3399
|
+
disabled: boxWith(() => Boolean(disabled)),
|
|
3400
|
+
openOnHover: boxWith(() => openOnHover),
|
|
3401
|
+
openDelay: boxWith(() => openDelay),
|
|
3402
|
+
closeDelay: boxWith(() => closeDelay)
|
|
3403
|
+
});
|
|
3404
|
+
const mergedProps = derived(() => mergeProps(restProps, triggerState.props, { type }));
|
|
3405
|
+
Floating_layer_anchor($$renderer2, {
|
|
3406
|
+
id,
|
|
3407
|
+
ref: triggerState.opts.ref,
|
|
3408
|
+
children: ($$renderer3) => {
|
|
3409
|
+
if (child) {
|
|
3410
|
+
$$renderer3.push("<!--[0-->");
|
|
3411
|
+
child($$renderer3, { props: mergedProps() });
|
|
3412
|
+
$$renderer3.push(`<!---->`);
|
|
3413
|
+
} else {
|
|
3414
|
+
$$renderer3.push(`<!--[-1--><button${attributes({ ...mergedProps() })}>`);
|
|
3415
|
+
children?.($$renderer3);
|
|
3416
|
+
$$renderer3.push(`<!----></button>`);
|
|
3417
|
+
}
|
|
3418
|
+
$$renderer3.push(`<!--]-->`);
|
|
3419
|
+
}
|
|
3420
|
+
});
|
|
3421
|
+
bind_props($$props, { ref });
|
|
3422
|
+
});
|
|
3423
|
+
}
|
|
3424
|
+
function Popover($$renderer, $$props) {
|
|
3425
|
+
$$renderer.component(($$renderer2) => {
|
|
3426
|
+
let {
|
|
3427
|
+
open = false,
|
|
3428
|
+
onOpenChange = noop,
|
|
3429
|
+
onOpenChangeComplete = noop,
|
|
3430
|
+
children
|
|
3431
|
+
} = $$props;
|
|
3432
|
+
PopoverRootState.create({
|
|
3433
|
+
open: boxWith(() => open, (v) => {
|
|
3434
|
+
open = v;
|
|
3435
|
+
onOpenChange(v);
|
|
3436
|
+
}),
|
|
3437
|
+
onOpenChangeComplete: boxWith(() => onOpenChangeComplete)
|
|
3438
|
+
});
|
|
3439
|
+
Floating_layer($$renderer2, {
|
|
3440
|
+
children: ($$renderer3) => {
|
|
3441
|
+
children?.($$renderer3);
|
|
3442
|
+
$$renderer3.push(`<!---->`);
|
|
3443
|
+
}
|
|
3444
|
+
});
|
|
3445
|
+
bind_props($$props, { open });
|
|
3446
|
+
});
|
|
3447
|
+
}
|
|
3448
|
+
const PICKER_LIMIT = 6;
|
|
3449
|
+
function byActivity(a, b) {
|
|
3450
|
+
return b.needsYou - a.needsYou || b.underWay - a.underWay || (b.lastActivity ?? 0) - (a.lastActivity ?? 0) || b.queued - a.queued;
|
|
3451
|
+
}
|
|
3452
|
+
function statsByProject(projects, tasks, now) {
|
|
3453
|
+
const by = new Map(projects.map((p) => [p.id, []]));
|
|
3454
|
+
for (const t of tasks) by.get(t.projectId)?.push(t);
|
|
3455
|
+
return new Map(projects.map((p) => [p.id, projectStats(by.get(p.id) ?? [], now)]));
|
|
3456
|
+
}
|
|
3457
|
+
const byName = (a, b) => a.name.localeCompare(b.name, void 0, { sensitivity: "base" });
|
|
3458
|
+
function pickerSections(projects, stats, opts) {
|
|
3459
|
+
const limit = opts.limit ?? PICKER_LIMIT;
|
|
3460
|
+
const pins2 = new Set(opts.pinned);
|
|
3461
|
+
const pinned = projects.filter((p) => pins2.has(p.id));
|
|
3462
|
+
const none = { underWay: 0, needsYou: 0, landed: 0, queued: 0, lastActivity: null };
|
|
3463
|
+
const st = (p) => stats.get(p.id) ?? none;
|
|
3464
|
+
const others = projects.filter((p) => !pins2.has(p.id)).toSorted((a, b) => byActivity(st(a), st(b)) || byName(a, b));
|
|
3465
|
+
const top = others.slice(0, Math.max(0, limit - pinned.length));
|
|
3466
|
+
const cur = opts.current ? others.find((p) => p.id === opts.current) : void 0;
|
|
3467
|
+
if (cur && !top.includes(cur)) top.push(cur);
|
|
3468
|
+
const shown = new Set(top.map((p) => p.id));
|
|
3469
|
+
return { pinned, top, rest: others.filter((p) => !shown.has(p.id)).toSorted(byName) };
|
|
3470
|
+
}
|
|
3471
|
+
function matchProjects(projects, query, pinned = [], aliases = {}) {
|
|
3472
|
+
const q = query.trim().toLowerCase();
|
|
3473
|
+
if (!q) return projects.toSorted(byName);
|
|
3474
|
+
const pins2 = new Set(pinned);
|
|
3475
|
+
const rank = (p) => {
|
|
3476
|
+
const names2 = [p.name, aliases[p.id]].filter(Boolean).map((n) => n.toLowerCase());
|
|
3477
|
+
if (names2.some((n) => n.startsWith(q))) return 0;
|
|
3478
|
+
if (names2.some((n) => n.split(/[\s\-_.:/]+/).some((w) => w.startsWith(q)))) return 1;
|
|
3479
|
+
if (names2.some((n) => n.includes(q)) || p.id.toLowerCase().includes(q)) return 2;
|
|
3480
|
+
return -1;
|
|
3481
|
+
};
|
|
3482
|
+
return projects.map((p) => ({ p, r: rank(p) })).filter((x) => x.r >= 0).toSorted(
|
|
3483
|
+
(a, b) => a.r - b.r || Number(pins2.has(b.p.id)) - Number(pins2.has(a.p.id)) || byName(a.p, b.p)
|
|
3484
|
+
).map((x) => x.p);
|
|
3485
|
+
}
|
|
3486
|
+
function parsePins(raw) {
|
|
3487
|
+
try {
|
|
3488
|
+
const v = raw ? JSON.parse(raw) : [];
|
|
3489
|
+
return Array.isArray(v) ? [...new Set(v.filter((x) => typeof x === "string"))] : [];
|
|
3490
|
+
} catch {
|
|
3491
|
+
return [];
|
|
3492
|
+
}
|
|
3493
|
+
}
|
|
3494
|
+
const SLACK_MS = 2 * 6e4;
|
|
3495
|
+
const MAX_LINKED = 3;
|
|
3496
|
+
const escape = (s) => s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
3497
|
+
const taskPages = (task) => [task.preview?.url, task.board?.url].filter((u) => !!u).map(pageOf);
|
|
3498
|
+
const urlIn = (text, u) => new RegExp(`${escape(u)}(?![\\w-])`).test(text);
|
|
3499
|
+
const time = (s) => {
|
|
3500
|
+
const t = s ? Date.parse(s) : NaN;
|
|
3501
|
+
return Number.isNaN(t) ? null : t;
|
|
3502
|
+
};
|
|
3503
|
+
function underWay(task, at) {
|
|
3504
|
+
if (task.status !== "landed") return true;
|
|
3505
|
+
const merged = time(task.mergedAt);
|
|
3506
|
+
return merged !== null && at !== null && at < merged;
|
|
3507
|
+
}
|
|
3508
|
+
function linksTask(text, task) {
|
|
3509
|
+
const pages = taskPages(task);
|
|
3510
|
+
return extractUrls(text).some((u) => pages.includes(pageOf(u)));
|
|
3511
|
+
}
|
|
3512
|
+
function names(text, task) {
|
|
3513
|
+
const ids = [task.id];
|
|
3514
|
+
if (task.secondMate) ids.push(task.id.replace(/@[^@]*$/, ""));
|
|
3515
|
+
if (ids.some((id) => new RegExp(`(?<![\\w-])${escape(id)}(?![\\w@-])`).test(text))) return true;
|
|
3516
|
+
return !!task.pr?.url && urlIn(text, task.pr.url.replace(/\/+$/, ""));
|
|
3517
|
+
}
|
|
3518
|
+
function mentions(text, task) {
|
|
3519
|
+
return names(text, task) || linksTask(text, task);
|
|
3520
|
+
}
|
|
3521
|
+
const shownUrl = (task) => task.preview?.url ?? task.board?.url ?? null;
|
|
3522
|
+
function ownedBy(url, at, tasks) {
|
|
3523
|
+
const page = pageOf(url);
|
|
3524
|
+
return tasks.some((t) => underWay(t, at) && taskPages(t).includes(page));
|
|
3525
|
+
}
|
|
3526
|
+
function add(out, anchor, card) {
|
|
3527
|
+
out.set(anchor, [...out.get(anchor) ?? [], card]);
|
|
3528
|
+
}
|
|
3529
|
+
function previewCards(items, tasks, ownPort = null) {
|
|
3530
|
+
const out = /* @__PURE__ */ new Map();
|
|
3531
|
+
const seen = tasks.filter((t) => t.preview || t.board);
|
|
3532
|
+
const carded = /* @__PURE__ */ new Map();
|
|
3533
|
+
for (const task of seen) {
|
|
3534
|
+
const url = shownUrl(task);
|
|
3535
|
+
const reported = time(task.preview?.reportedAt ?? task.board?.reportedAt);
|
|
3536
|
+
const landed = task.status === "landed";
|
|
3537
|
+
const merged = landed ? time(task.mergedAt) : null;
|
|
3538
|
+
let first = null;
|
|
3539
|
+
let linked = null;
|
|
3540
|
+
let since = null;
|
|
3541
|
+
for (const it of items) {
|
|
3542
|
+
if (it.kind !== "turn") continue;
|
|
3543
|
+
const at = time(it.at);
|
|
3544
|
+
if (reported !== null && (at === null || at < reported - SLACK_MS)) continue;
|
|
3545
|
+
const links = (text) => underWay(task, at) && linksTask(text, task);
|
|
3546
|
+
const part = it.parts.find(
|
|
3547
|
+
(p) => p.kind === "text" && (names(p.text, task) || links(p.text))
|
|
3548
|
+
);
|
|
3549
|
+
if (!part || part.kind !== "text") continue;
|
|
3550
|
+
first ??= part.id;
|
|
3551
|
+
if (links(part.text)) linked = part.id;
|
|
3552
|
+
if (landed && (merged === null || at !== null && at >= merged - SLACK_MS)) {
|
|
3553
|
+
since = part.id;
|
|
3554
|
+
break;
|
|
3555
|
+
}
|
|
3556
|
+
}
|
|
3557
|
+
const anchor = since ?? linked ?? first;
|
|
3558
|
+
if (!anchor) continue;
|
|
3559
|
+
add(out, anchor, { task, url, board: !task.preview, landed });
|
|
3560
|
+
carded.set(anchor, [...carded.get(anchor) ?? [], ...taskPages(task)]);
|
|
3561
|
+
}
|
|
3562
|
+
const latest = /* @__PURE__ */ new Map();
|
|
3563
|
+
for (const it of items) {
|
|
3564
|
+
if (it.kind !== "turn") continue;
|
|
3565
|
+
const at = time(it.at);
|
|
3566
|
+
for (const p of it.parts) {
|
|
3567
|
+
if (p.kind !== "text") continue;
|
|
3568
|
+
const origins = /* @__PURE__ */ new Set();
|
|
3569
|
+
let n = 0;
|
|
3570
|
+
for (const url of linkedPreviews(p.text, ownPort)) {
|
|
3571
|
+
const origin = URL.parse(url).origin;
|
|
3572
|
+
const key = pageOf(url);
|
|
3573
|
+
if (carded.get(p.id)?.includes(key)) {
|
|
3574
|
+
latest.delete(key);
|
|
3575
|
+
continue;
|
|
3576
|
+
}
|
|
3577
|
+
if (origins.has(origin) || ownedBy(url, at, seen) || n >= MAX_LINKED) continue;
|
|
3578
|
+
origins.add(origin);
|
|
3579
|
+
n++;
|
|
3580
|
+
latest.delete(key);
|
|
3581
|
+
latest.set(key, { anchor: p.id, url });
|
|
3582
|
+
}
|
|
3583
|
+
}
|
|
3584
|
+
}
|
|
3585
|
+
for (const { anchor, url } of latest.values())
|
|
3586
|
+
add(out, anchor, { task: null, url, board: isBoard(url), landed: false });
|
|
3587
|
+
return out;
|
|
3588
|
+
}
|
|
3589
|
+
function chipLabel(r, max = 34) {
|
|
3590
|
+
const title = r.title.length > max ? `${r.title.slice(0, max - 1)}…` : r.title;
|
|
3591
|
+
const num = r.url?.match(/\/pull\/(\d+)/)?.[1];
|
|
3592
|
+
return r.kind === "pr" ? `PR${num ? ` #${num}` : ""} ${title}` : `# ${title}`;
|
|
3593
|
+
}
|
|
3594
|
+
const EXPANDED = /\[(?:PR (https?:\/\/\S+) — )?task ([A-Za-z0-9][A-Za-z0-9._-]*)(?: on second mate ([A-Za-z0-9][A-Za-z0-9._-]*))?: ([^\]\n]+)\]/g;
|
|
3595
|
+
function parseRefs(text) {
|
|
3596
|
+
const out = [];
|
|
3597
|
+
let at = 0;
|
|
3598
|
+
for (const m of text.matchAll(EXPANDED)) {
|
|
3599
|
+
if (m.index > at) out.push(text.slice(at, m.index));
|
|
3600
|
+
out.push({
|
|
3601
|
+
kind: m[1] ? "pr" : "task",
|
|
3602
|
+
id: m[3] ? `${m[2]}@${m[3]}` : m[2],
|
|
3603
|
+
title: m[4].trim(),
|
|
3604
|
+
project: null,
|
|
3605
|
+
url: m[1] ?? null
|
|
3606
|
+
});
|
|
3607
|
+
at = m.index + m[0].length;
|
|
3608
|
+
}
|
|
3609
|
+
if (at < text.length) out.push(text.slice(at));
|
|
3610
|
+
return out;
|
|
3611
|
+
}
|
|
3612
|
+
const SNIPPET_MAX = 140;
|
|
3613
|
+
function plain(text) {
|
|
3614
|
+
const md = text.replace(/```[^\n]*\n([\s\S]*?)```/g, "$1").replace(/!\[([^\]]*)\]\([^)]*\)/g, "$1").replace(/\[([^\]]+)\]\([^)]*\)/g, "$1").replace(/^\s{0,3}(?:#{1,6}\s+|>\s?|[-*+]\s+|\d+[.)]\s+)/gm, "").replace(/(\*\*|__|~~|`)/g, "").replace(/(^|[\s(])[*_]([^*_\n]+)[*_](?=[\s).,!?:;]|$)/g, "$1$2");
|
|
3615
|
+
return parseRefs(md).map((p) => typeof p === "string" ? p : chipLabel(p, 60)).join("").replace(/\s+/g, " ").trim();
|
|
3616
|
+
}
|
|
3617
|
+
function snippetOf(text, max = SNIPPET_MAX) {
|
|
3618
|
+
const line = plain(text);
|
|
3619
|
+
if (line.length <= max) return line;
|
|
3620
|
+
const cut = line.slice(0, max - 1);
|
|
3621
|
+
const space = cut.lastIndexOf(" ");
|
|
3622
|
+
return `${(space > max / 2 ? cut.slice(0, space) : cut).replace(/[\s.,;:]+$/, "")}…`;
|
|
3623
|
+
}
|
|
3624
|
+
const QUOTED = /^> Replying to (Firstmate|my message): “(.*)”\n\n([\s\S]+)$/;
|
|
3625
|
+
function parseReply(text) {
|
|
3626
|
+
const m = text.replace(/\r\n?/g, "\n").match(QUOTED);
|
|
3627
|
+
if (!m || !m[3].trim()) return { to: null, body: text };
|
|
3628
|
+
return {
|
|
3629
|
+
to: { who: m[1] === "Firstmate" ? "firstmate" : "captain", snippet: m[2] },
|
|
3630
|
+
body: m[3]
|
|
3631
|
+
};
|
|
3632
|
+
}
|
|
3633
|
+
function quotes(to, text) {
|
|
3634
|
+
const line = plain(text);
|
|
3635
|
+
if (!line) return false;
|
|
3636
|
+
const s = to.snippet.endsWith("…") ? to.snippet.slice(0, -1) : to.snippet;
|
|
3637
|
+
return to.snippet.endsWith("…") ? line.startsWith(s) : line === s;
|
|
3638
|
+
}
|
|
3639
|
+
const UNSORTED = "unsorted";
|
|
3640
|
+
const tagOf = (topic, source, task) => task ? { topic, task, source } : { topic, source };
|
|
3641
|
+
const UNSORTED_TAG = { topic: UNSORTED, source: null };
|
|
3642
|
+
const MARKER = /^\s{0,3}<!--\s*project:\s*([^\s>]+?)\s*-->\s*$/i;
|
|
3643
|
+
const FENCE = /^\s{0,3}(`{3,}|~{3,})/;
|
|
3644
|
+
function parseMarkers(text) {
|
|
3645
|
+
const out = [];
|
|
3646
|
+
let slug = null;
|
|
3647
|
+
let lines = [];
|
|
3648
|
+
let fence = null;
|
|
3649
|
+
const flush = () => {
|
|
3650
|
+
const t = lines.join("\n").trim();
|
|
3651
|
+
if (t) out.push({ slug, text: t });
|
|
3652
|
+
lines = [];
|
|
3653
|
+
};
|
|
3654
|
+
for (const line of text.split("\n")) {
|
|
3655
|
+
const f = line.match(FENCE)?.[1];
|
|
3656
|
+
if (f && (!fence || f[0] === fence[0])) fence = fence ? null : f;
|
|
3657
|
+
const m = fence ? null : line.match(MARKER);
|
|
3658
|
+
if (m) {
|
|
3659
|
+
flush();
|
|
3660
|
+
slug = m[1];
|
|
3661
|
+
} else lines.push(line);
|
|
3662
|
+
}
|
|
3663
|
+
flush();
|
|
3664
|
+
if (!out.length && !text.trim()) return [];
|
|
3665
|
+
return out.length ? out : [{ slug, text: "" }];
|
|
3666
|
+
}
|
|
3667
|
+
const PREFIX = /^\[project ([^\]\s]+)\][ \u00a0]?/;
|
|
3668
|
+
function splitThread(written) {
|
|
3669
|
+
const at = written.indexOf("/");
|
|
3670
|
+
return at > 0 && at < written.length - 1 ? { slug: written.slice(0, at), task: written.slice(at + 1) } : { slug: written.replace(/\/$/, ""), task: null };
|
|
3671
|
+
}
|
|
3672
|
+
function parseThread(text) {
|
|
3673
|
+
const m = text.match(PREFIX);
|
|
3674
|
+
return m ? { topic: m[1], text: text.slice(m[0].length) } : { topic: null, text };
|
|
3675
|
+
}
|
|
3676
|
+
const slugify = (s) => s.trim().toLowerCase().replace(/[^a-z0-9.]+/g, "-").replace(/^-+|-+$/g, "");
|
|
3677
|
+
function resolveTopic(slug, projects) {
|
|
3678
|
+
const s = slug.trim().toLowerCase();
|
|
3679
|
+
const key = slugify(slug);
|
|
3680
|
+
const p = projects.find((x) => x.id.toLowerCase() === s) ?? projects.find((x) => x.name.toLowerCase() === s) ?? projects.find((x) => slugify(x.id) === key || slugify(x.name) === key);
|
|
3681
|
+
return p ? p.id : key || UNSORTED;
|
|
3682
|
+
}
|
|
3683
|
+
function topicName(slug) {
|
|
3684
|
+
const words = slug.replace(/[-_]+/g, " ").trim();
|
|
3685
|
+
return words ? words[0].toUpperCase() + words.slice(1) : slug;
|
|
3686
|
+
}
|
|
3687
|
+
function guessed(text, tasks, within = null) {
|
|
3688
|
+
let found = null;
|
|
3689
|
+
let task = null;
|
|
3690
|
+
let several = false;
|
|
3691
|
+
for (const t of tasks) {
|
|
3692
|
+
if (!t.projectId || t.projectId === "unassigned") continue;
|
|
3693
|
+
if (within && t.projectId !== within) continue;
|
|
3694
|
+
if (!mentions(text, t)) continue;
|
|
3695
|
+
if (found && found !== t.projectId) return null;
|
|
3696
|
+
if (found) several = true;
|
|
3697
|
+
found = t.projectId;
|
|
3698
|
+
task = t.id;
|
|
3699
|
+
}
|
|
3700
|
+
return found ? { project: found, task: several ? null : task } : null;
|
|
3701
|
+
}
|
|
3702
|
+
function quoted(to, text) {
|
|
3703
|
+
const line = plain(text);
|
|
3704
|
+
const s = to.snippet.endsWith("…") ? to.snippet.slice(0, -1) : to.snippet;
|
|
3705
|
+
return !!s && !!line && line.startsWith(s);
|
|
3706
|
+
}
|
|
3707
|
+
const taskId = (written, tasks) => written ? tasks.find((t) => t.id.toLowerCase() === written.toLowerCase())?.id ?? written : null;
|
|
3708
|
+
function tagChat(items, tasks, projects, retags = {}) {
|
|
3709
|
+
const users = /* @__PURE__ */ new Map();
|
|
3710
|
+
const parts = /* @__PURE__ */ new Map();
|
|
3711
|
+
const turns = /* @__PURE__ */ new Map();
|
|
3712
|
+
const guess = (text, within = null) => {
|
|
3713
|
+
const g = guessed(text, tasks, within);
|
|
3714
|
+
return g ? tagOf(g.project, "guess", g.task) : null;
|
|
3715
|
+
};
|
|
3716
|
+
const named = (written, source) => {
|
|
3717
|
+
const { slug, task } = splitThread(written);
|
|
3718
|
+
return tagOf(resolveTopic(slug, projects), source, taskId(task, tasks));
|
|
3719
|
+
};
|
|
3720
|
+
const own = (key, tag) => {
|
|
3721
|
+
const mine = retags[key];
|
|
3722
|
+
if (!mine) return tag;
|
|
3723
|
+
if (mine === UNSORTED) return UNSORTED_TAG;
|
|
3724
|
+
return mine === tag.topic ? { ...tag, source: "you" } : { topic: mine, source: "you" };
|
|
3725
|
+
};
|
|
3726
|
+
const said = [];
|
|
3727
|
+
const replied = (to) => {
|
|
3728
|
+
for (let i = said.length - 1; i >= 0; i--)
|
|
3729
|
+
if (said[i].who === to.who && quoted(to, said[i].text)) return said[i].tag;
|
|
3730
|
+
return null;
|
|
3731
|
+
};
|
|
3732
|
+
let lastCaptain = null;
|
|
3733
|
+
for (const it of items) {
|
|
3734
|
+
if (it.kind === "user") {
|
|
3735
|
+
const { to, body } = parseReply(it.text);
|
|
3736
|
+
const sent = parseThread(body);
|
|
3737
|
+
const from = to && replied(to);
|
|
3738
|
+
const tag = sent.topic ? named(sent.topic, "thread") : from && from.topic !== UNSORTED ? tagOf(from.topic, "reply", from.task) : guess(sent.text) ?? UNSORTED_TAG;
|
|
3739
|
+
const final = own(it.id, tag);
|
|
3740
|
+
users.set(it.id, final);
|
|
3741
|
+
said.push({ who: "captain", text: parseAttachments(sent.text).text, tag: final });
|
|
3742
|
+
lastCaptain = final;
|
|
3743
|
+
continue;
|
|
3744
|
+
}
|
|
3745
|
+
if (it.kind !== "turn") continue;
|
|
3746
|
+
let carry = null;
|
|
3747
|
+
const asked = it.trigger === "captain" && lastCaptain?.source ? lastCaptain : null;
|
|
3748
|
+
for (const part of it.parts) {
|
|
3749
|
+
if (part.kind !== "text") continue;
|
|
3750
|
+
const sections = parseMarkers(part.text);
|
|
3751
|
+
const out = sections.map((s, i) => {
|
|
3752
|
+
let tag;
|
|
3753
|
+
if (s.slug) {
|
|
3754
|
+
tag = named(s.slug, "marker");
|
|
3755
|
+
if (!tag.task) tag = tagOf(tag.topic, "marker", guess(s.text, tag.topic)?.task);
|
|
3756
|
+
} else if (carry?.source === "marker") tag = carry;
|
|
3757
|
+
else
|
|
3758
|
+
tag = guess(s.text) ?? carry ?? (asked && { ...asked, source: "guess" }) ?? UNSORTED_TAG;
|
|
3759
|
+
if (tag.source) carry = tag;
|
|
3760
|
+
const intro = i === 0 && !s.slug && sections.length > 1;
|
|
3761
|
+
return { key: i ? `${part.id}#${i}` : part.id, text: s.text, tag, intro };
|
|
3762
|
+
});
|
|
3763
|
+
const final = out.map((s) => ({ ...s, tag: own(s.key, s.tag) }));
|
|
3764
|
+
parts.set(part.id, final);
|
|
3765
|
+
const lead = final.find((x) => !x.intro);
|
|
3766
|
+
if (!turns.has(it.id) && lead) turns.set(it.id, lead.tag);
|
|
3767
|
+
if (lead)
|
|
3768
|
+
said.push({ who: "firstmate", text: final.map((x) => x.text).join("\n\n"), tag: lead.tag });
|
|
3769
|
+
}
|
|
3770
|
+
if (!turns.has(it.id))
|
|
3771
|
+
turns.set(it.id, own(`turn:${it.id}`, asked ? { ...asked, source: "guess" } : UNSORTED_TAG));
|
|
3772
|
+
}
|
|
3773
|
+
return { users, parts, turns };
|
|
3774
|
+
}
|
|
3775
|
+
function cardTag(key, projectId, source, retags = {}, task = null) {
|
|
3776
|
+
const mine = retags[key];
|
|
3777
|
+
if (mine === UNSORTED) return UNSORTED_TAG;
|
|
3778
|
+
if (mine) return mine === projectId ? tagOf(mine, "you", task) : { topic: mine, source: "you" };
|
|
3779
|
+
return projectId && projectId !== "unassigned" ? tagOf(projectId, source, task) : UNSORTED_TAG;
|
|
3780
|
+
}
|
|
3781
|
+
function threadRows(entries, keep = null) {
|
|
3782
|
+
const rows = /* @__PURE__ */ new Map();
|
|
3783
|
+
for (const e of entries) {
|
|
3784
|
+
const at = e.at ? Date.parse(e.at) : NaN;
|
|
3785
|
+
for (const topic of new Set(e.topics)) {
|
|
3786
|
+
const r = rows.get(topic) ?? { topic, count: 0, needs: 0, last: 0 };
|
|
3787
|
+
r.count++;
|
|
3788
|
+
if (e.needs) r.needs++;
|
|
3789
|
+
if (!Number.isNaN(at)) r.last = Math.max(r.last, at);
|
|
3790
|
+
rows.set(topic, r);
|
|
3791
|
+
}
|
|
3792
|
+
}
|
|
3793
|
+
if (keep && !rows.has(keep)) rows.set(keep, { topic: keep, count: 0, needs: 0, last: 0 });
|
|
3794
|
+
return [...rows.values()].sort(
|
|
3795
|
+
(a, b) => Number(a.topic === UNSORTED) - Number(b.topic === UNSORTED) || b.last - a.last || a.topic.localeCompare(b.topic)
|
|
3796
|
+
);
|
|
3797
|
+
}
|
|
3798
|
+
function foldRuns(entries, thread) {
|
|
3799
|
+
const out = /* @__PURE__ */ new Map();
|
|
3800
|
+
let run = null;
|
|
3801
|
+
for (const e of entries) {
|
|
3802
|
+
if (e.topics.includes(thread)) {
|
|
3803
|
+
run = null;
|
|
3804
|
+
continue;
|
|
3805
|
+
}
|
|
3806
|
+
if (!run) run = { first: e.key, count: 0, topics: [], from: e.at, to: e.at };
|
|
3807
|
+
run.count++;
|
|
3808
|
+
run.to = e.at ?? run.to;
|
|
3809
|
+
for (const t of e.topics) if (!run.topics.includes(t)) run.topics.push(t);
|
|
3810
|
+
out.set(e.key, run);
|
|
3811
|
+
}
|
|
3812
|
+
return out;
|
|
3813
|
+
}
|
|
3814
|
+
const PINS_KEY = "wheelhouse-pinned-projects";
|
|
3815
|
+
class Pins {
|
|
3816
|
+
ids = [];
|
|
3817
|
+
loaded = false;
|
|
3818
|
+
/** Read the pins once, in the browser. */
|
|
3819
|
+
load() {
|
|
3820
|
+
if (this.loaded) return;
|
|
3821
|
+
this.loaded = true;
|
|
3822
|
+
this.read();
|
|
3823
|
+
try {
|
|
3824
|
+
window.addEventListener("storage", (e) => {
|
|
3825
|
+
if (e.key === PINS_KEY) this.read();
|
|
3826
|
+
});
|
|
3827
|
+
} catch {
|
|
3828
|
+
}
|
|
3829
|
+
}
|
|
3830
|
+
has(id) {
|
|
3831
|
+
return this.ids.includes(id);
|
|
3832
|
+
}
|
|
3833
|
+
toggle(id) {
|
|
3834
|
+
this.ids = this.has(id) ? this.ids.filter((x) => x !== id) : [...this.ids, id];
|
|
3835
|
+
try {
|
|
3836
|
+
localStorage.setItem(PINS_KEY, JSON.stringify(this.ids));
|
|
3837
|
+
} catch {
|
|
3838
|
+
}
|
|
3839
|
+
}
|
|
3840
|
+
read() {
|
|
3841
|
+
try {
|
|
3842
|
+
this.ids = parsePins(localStorage.getItem(PINS_KEY));
|
|
3843
|
+
} catch {
|
|
3844
|
+
this.ids = [];
|
|
3845
|
+
}
|
|
3846
|
+
}
|
|
3847
|
+
}
|
|
3848
|
+
const pins = new Pins();
|
|
3849
|
+
function Sheet($$renderer, $$props) {
|
|
3850
|
+
$$renderer.component(($$renderer2) => {
|
|
3851
|
+
let { open = false, title, children, onOpenAutoFocus } = $$props;
|
|
3852
|
+
let $$settled = true;
|
|
3853
|
+
let $$inner_renderer;
|
|
3854
|
+
function $$render_inner($$renderer3) {
|
|
3855
|
+
if (Dialog) {
|
|
3856
|
+
$$renderer3.push("<!--[-->");
|
|
3857
|
+
Dialog($$renderer3, {
|
|
3858
|
+
get open() {
|
|
3859
|
+
return open;
|
|
3860
|
+
},
|
|
3861
|
+
set open($$value) {
|
|
3862
|
+
open = $$value;
|
|
3863
|
+
$$settled = false;
|
|
3864
|
+
},
|
|
3865
|
+
children: ($$renderer4) => {
|
|
3866
|
+
if (Portal) {
|
|
3867
|
+
$$renderer4.push("<!--[-->");
|
|
3868
|
+
Portal($$renderer4, {
|
|
3869
|
+
children: ($$renderer5) => {
|
|
3870
|
+
if (Dialog_overlay) {
|
|
3871
|
+
$$renderer5.push("<!--[-->");
|
|
3872
|
+
Dialog_overlay($$renderer5, {
|
|
3873
|
+
class: "fixed inset-0 z-50 bg-black/40 duration-200 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0"
|
|
3874
|
+
});
|
|
3875
|
+
$$renderer5.push("<!--]-->");
|
|
3876
|
+
} else {
|
|
3877
|
+
$$renderer5.push("<!--[!-->");
|
|
3878
|
+
$$renderer5.push("<!--]-->");
|
|
3879
|
+
}
|
|
3880
|
+
$$renderer5.push(` `);
|
|
3881
|
+
if (Dialog_content) {
|
|
3882
|
+
$$renderer5.push("<!--[-->");
|
|
3883
|
+
Dialog_content($$renderer5, {
|
|
3884
|
+
class: "fixed inset-x-0 bottom-0 z-50 flex max-h-[85dvh] flex-col rounded-t-2xl border-t bg-popover pb-[env(safe-area-inset-bottom,0px)] text-popover-foreground shadow-2xl duration-200 outline-none data-open:animate-in data-open:slide-in-from-bottom data-closed:animate-out data-closed:slide-out-to-bottom",
|
|
3885
|
+
style: void 0,
|
|
3886
|
+
onOpenAutoFocus,
|
|
3887
|
+
"data-sheet": true,
|
|
3888
|
+
children: ($$renderer6) => {
|
|
3889
|
+
$$renderer6.push(`<div class="flex h-6 shrink-0 cursor-grab touch-none items-center justify-center" aria-hidden="true"><span class="h-1 w-10 rounded-full bg-muted-foreground/40"></span></div> <div class="flex shrink-0 items-center gap-2 pr-1.5 pl-5">`);
|
|
3890
|
+
if (Dialog_title) {
|
|
3891
|
+
$$renderer6.push("<!--[-->");
|
|
3892
|
+
Dialog_title($$renderer6, {
|
|
3893
|
+
class: "min-w-0 flex-1 truncate font-title text-2xl leading-tight",
|
|
3894
|
+
children: ($$renderer7) => {
|
|
3895
|
+
$$renderer7.push(`<!---->${escape_html(title)}`);
|
|
3896
|
+
},
|
|
3897
|
+
$$slots: { default: true }
|
|
3898
|
+
});
|
|
3899
|
+
$$renderer6.push("<!--]-->");
|
|
3900
|
+
} else {
|
|
3901
|
+
$$renderer6.push("<!--[!-->");
|
|
3902
|
+
$$renderer6.push("<!--]-->");
|
|
3903
|
+
}
|
|
3904
|
+
$$renderer6.push(` `);
|
|
3905
|
+
if (Dialog_close) {
|
|
3906
|
+
$$renderer6.push("<!--[-->");
|
|
3907
|
+
Dialog_close($$renderer6, {
|
|
3908
|
+
class: "grid size-11 shrink-0 place-items-center rounded-full text-muted-foreground hover:bg-accent hover:text-foreground",
|
|
3909
|
+
"aria-label": "Close",
|
|
3910
|
+
children: ($$renderer7) => {
|
|
3911
|
+
X($$renderer7, { class: "size-5", "aria-hidden": "true" });
|
|
3912
|
+
},
|
|
3913
|
+
$$slots: { default: true }
|
|
3914
|
+
});
|
|
3915
|
+
$$renderer6.push("<!--]-->");
|
|
3916
|
+
} else {
|
|
3917
|
+
$$renderer6.push("<!--[!-->");
|
|
3918
|
+
$$renderer6.push("<!--]-->");
|
|
3919
|
+
}
|
|
3920
|
+
$$renderer6.push(`</div> <div class="min-h-0 flex-1 overflow-y-auto overscroll-contain">`);
|
|
3921
|
+
children($$renderer6);
|
|
3922
|
+
$$renderer6.push(`<!----></div>`);
|
|
3923
|
+
},
|
|
3924
|
+
$$slots: { default: true }
|
|
3925
|
+
});
|
|
3926
|
+
$$renderer5.push("<!--]-->");
|
|
3927
|
+
} else {
|
|
3928
|
+
$$renderer5.push("<!--[!-->");
|
|
3929
|
+
$$renderer5.push("<!--]-->");
|
|
3930
|
+
}
|
|
3931
|
+
}
|
|
3932
|
+
});
|
|
3933
|
+
$$renderer4.push("<!--]-->");
|
|
3934
|
+
} else {
|
|
3935
|
+
$$renderer4.push("<!--[!-->");
|
|
3936
|
+
$$renderer4.push("<!--]-->");
|
|
3937
|
+
}
|
|
3938
|
+
},
|
|
3939
|
+
$$slots: { default: true }
|
|
3940
|
+
});
|
|
3941
|
+
$$renderer3.push("<!--]-->");
|
|
3942
|
+
} else {
|
|
3943
|
+
$$renderer3.push("<!--[!-->");
|
|
3944
|
+
$$renderer3.push("<!--]-->");
|
|
3945
|
+
}
|
|
3946
|
+
}
|
|
3947
|
+
do {
|
|
3948
|
+
$$settled = true;
|
|
3949
|
+
$$inner_renderer = $$renderer2.copy();
|
|
3950
|
+
$$render_inner($$inner_renderer);
|
|
3951
|
+
} while (!$$settled);
|
|
3952
|
+
$$renderer2.subsume($$inner_renderer);
|
|
3953
|
+
bind_props($$props, { open });
|
|
3954
|
+
});
|
|
3955
|
+
}
|
|
3956
|
+
|
|
3957
|
+
export { Floating_layer as F, Popover as P, Sheet as S, UNSORTED as U, Popover_trigger as a, Popover_content as b, pickerSections as c, Floating_layer_anchor as d, Popper_layer_force_mount as e, Popper_layer as f, getFloatingContentCSSVars as g, SafePolygon as h, FloatingArrowState as i, parseReply as j, parseThread as k, UNSORTED_TAG as l, matchProjects as m, foldRuns as n, tagChat as o, pins as p, quotes as q, parseRefs as r, statsByProject as s, topicName as t, chipLabel as u, parseMarkers as v, cardTag as w, threadRows as x, previewCards as y, snippetOf as z };
|
|
3958
|
+
//# sourceMappingURL=Sheet.js-pEqPGqDd.js.map
|