@rr0/ufoathome 0.199.0 → 0.201.0
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/dist-embed-interview/InterviewMessages_en-BRmuWrAg.js +1 -0
- package/dist-embed-interview/InterviewMessages_es-BTotimwY.js +1 -0
- package/dist-embed-interview/InterviewMessages_fr-DBCdGB0r.js +1 -0
- package/dist-embed-interview/InterviewMessages_it-B5EyMD-k.js +1 -0
- package/dist-embed-interview/rr0-interview.mjs +1 -1
- package/dist-embed-scene/{AdsbLolArchiveProvider-BtF4baVw.js → AdsbLolArchiveProvider-C6FJmrLQ.js} +1 -1
- package/dist-embed-scene/AirshipEditor-BnRmKeVs.js +16 -0
- package/dist-embed-scene/AirshipEditorMessages_en-CFafbbN8.js +1 -0
- package/dist-embed-scene/AirshipEditorMessages_es-ht4kFQUD.js +1 -0
- package/dist-embed-scene/AirshipEditorMessages_fr-Bhj6QKCL.js +1 -0
- package/dist-embed-scene/AirshipEditorMessages_it-Cfl9mFjn.js +1 -0
- package/dist-embed-scene/AirshipFlight-C9DSPGwk.js +1 -0
- package/dist-embed-scene/AirshipKindMessages_en-DzGapVTV.js +1 -0
- package/dist-embed-scene/AirshipKindMessages_es-TE93uMSC.js +1 -0
- package/dist-embed-scene/AirshipKindMessages_fr-BTXNsW5W.js +1 -0
- package/dist-embed-scene/AirshipKindMessages_it-Cwa3MnJ-.js +1 -0
- package/dist-embed-scene/AirshipParameterTexts_en-DZxqhSI3.js +1 -0
- package/dist-embed-scene/AirshipParameterTexts_es-BDJUZOmr.js +1 -0
- package/dist-embed-scene/AirshipParameterTexts_fr-Cj-D0Xb_.js +1 -0
- package/dist-embed-scene/AirshipParameterTexts_it-BhC9cEbs.js +1 -0
- package/dist-embed-scene/Aurora-BmVyTP6i.js +1 -0
- package/dist-embed-scene/AuroraEditor-CN6BQMUW.js +8 -0
- package/dist-embed-scene/AuroraEditorMessages_en-CpU3BS-B.js +1 -0
- package/dist-embed-scene/AuroraEditorMessages_es-i8-psDHN.js +1 -0
- package/dist-embed-scene/AuroraEditorMessages_fr-0DtPXXAs.js +1 -0
- package/dist-embed-scene/AuroraEditorMessages_it-Dn2UHyk9.js +1 -0
- package/dist-embed-scene/AuroraKindMessages_en-D_W4giJa.js +1 -0
- package/dist-embed-scene/AuroraKindMessages_es-jJ5_ltZq.js +1 -0
- package/dist-embed-scene/AuroraKindMessages_fr-6IzUVbRH.js +1 -0
- package/dist-embed-scene/AuroraKindMessages_it-DcwuoMkp.js +1 -0
- package/dist-embed-scene/AuroraParameterTexts_en-shkUd-dT.js +1 -0
- package/dist-embed-scene/AuroraParameterTexts_es-CwGYyafK.js +1 -0
- package/dist-embed-scene/AuroraParameterTexts_fr-CoJnicWs.js +1 -0
- package/dist-embed-scene/AuroraParameterTexts_it-DHniBj_2.js +1 -0
- package/dist-embed-scene/AuroraSimulation-BZpjImM0.js +152 -0
- package/dist-embed-scene/BalloonEditor-BehJs6H-.js +24 -0
- package/dist-embed-scene/BalloonEditorMessages_en-B2n2FutN.js +1 -0
- package/dist-embed-scene/BalloonEditorMessages_es-BXppdrpF.js +1 -0
- package/dist-embed-scene/BalloonEditorMessages_fr-BmUizmQy.js +1 -0
- package/dist-embed-scene/BalloonEditorMessages_it-Dx0JODqK.js +1 -0
- package/dist-embed-scene/BalloonFlight-BYn4diw1.js +1 -0
- package/dist-embed-scene/BalloonKindMessages_en-C6tZ-5gT.js +1 -0
- package/dist-embed-scene/BalloonKindMessages_es-BfoEjhe1.js +1 -0
- package/dist-embed-scene/BalloonKindMessages_fr-C3QJIuDJ.js +1 -0
- package/dist-embed-scene/BalloonKindMessages_it-CkO7mqHp.js +1 -0
- package/dist-embed-scene/BalloonParameterTexts_en-CHm_vRVx.js +1 -0
- package/dist-embed-scene/BalloonParameterTexts_es-BYaljnsn.js +1 -0
- package/dist-embed-scene/BalloonParameterTexts_fr-IhyPRhYG.js +1 -0
- package/dist-embed-scene/BalloonParameterTexts_it-BqBPIfav.js +1 -0
- package/dist-embed-scene/{BeamEditor-Dj1Wt50v.js → BeamEditor-BbbtyCOw.js} +1 -1
- package/dist-embed-scene/BeamSystem-DtRwoKHP.js +1 -0
- package/dist-embed-scene/{BirdEditor-CKpe681e.js → BirdEditor-dOp1sGsz.js} +1 -1
- package/dist-embed-scene/{BirdFlock-B2SbkMme.js → BirdFlock-CfJeXvWu.js} +1 -1
- package/dist-embed-scene/DroneEditor-CBoR4fJ_.js +16 -0
- package/dist-embed-scene/{DroneFlight-BTFHGVWd.js → DroneFlight-DSE1OXqh.js} +1 -1
- package/dist-embed-scene/DroneParameters-D3EOg4oe.js +1 -0
- package/dist-embed-scene/{Flightradar24Provider-BBj_wixV.js → Flightradar24Provider-BZDUU8WC.js} +1 -1
- package/dist-embed-scene/{GLTFLoader-CKDxld-A.js → GLTFLoader-Dwb-fLT2.js} +1 -1
- package/dist-embed-scene/{LanternEditor-iByq1q3j.js → LanternEditor-CbcA7K8y.js} +1 -1
- package/dist-embed-scene/{LaserBeam-BQWS_xWa.js → LaserBeam-AjgGxDIq.js} +1 -1
- package/dist-embed-scene/{LaunchEditor-CjpESdIe.js → LaunchEditor-tMadX67W.js} +1 -1
- package/dist-embed-scene/{LaunchPlume-DVsshxQE.js → LaunchPlume-C7lTPaXd.js} +1 -1
- package/dist-embed-scene/{LaunchSimulation-BU7X_C8t.js → LaunchSimulation-ByGBMtSW.js} +1 -1
- package/dist-embed-scene/ModuleSession-XnOI5Mcr.js +3 -0
- package/dist-embed-scene/ModuleThree-BTQgimAj.js +1 -0
- package/dist-embed-scene/{ParameterForm-BHRESNZ4.js → ParameterForm-CRC9iA-m.js} +1 -1
- package/dist-embed-scene/{ReentryEditor-DpNPIxOG.js → ReentryEditor-Bjh0q9Ii.js} +1 -1
- package/dist-embed-scene/{ReentrySimulation-m-TICP2i.js → ReentrySimulation-Bgnppel8.js} +1 -1
- package/dist-embed-scene/ReferenceSystem-D1BkjwT7.js +1 -0
- package/dist-embed-scene/{SceneNames_en-Dn90NisJ.js → SceneNames_en-BFJsR6Cc.js} +1 -1
- package/dist-embed-scene/{SceneNames_es-DH6GZWja.js → SceneNames_es-BHBTwcJ3.js} +1 -1
- package/dist-embed-scene/{SceneNames_fr-rltu5c_j.js → SceneNames_fr-CFsA4XeK.js} +1 -1
- package/dist-embed-scene/{SceneNames_it-DsNshdIp.js → SceneNames_it-DkIgwviv.js} +1 -1
- package/dist-embed-scene/SearchlightEditor-CogwU9pl.js +8 -0
- package/dist-embed-scene/SearchlightEditorMessages_en-BWTcGHYC.js +1 -0
- package/dist-embed-scene/SearchlightEditorMessages_es-PS4IIWFS.js +1 -0
- package/dist-embed-scene/SearchlightEditorMessages_fr-CpaD2Il2.js +1 -0
- package/dist-embed-scene/SearchlightEditorMessages_it-Br2IjowF.js +1 -0
- package/dist-embed-scene/SearchlightKindMessages_en-CwJDAjsc.js +1 -0
- package/dist-embed-scene/SearchlightKindMessages_es-CCCgZyTQ.js +1 -0
- package/dist-embed-scene/SearchlightKindMessages_fr-DsxiUhmK.js +1 -0
- package/dist-embed-scene/SearchlightKindMessages_it-CyWpJL5c.js +1 -0
- package/dist-embed-scene/SearchlightParameterTexts_en-BwanYoMW.js +1 -0
- package/dist-embed-scene/SearchlightParameterTexts_es-Cz_rg-Xe.js +1 -0
- package/dist-embed-scene/SearchlightParameterTexts_fr-B7eZQIdG.js +1 -0
- package/dist-embed-scene/SearchlightParameterTexts_it-BjhuOJre.js +1 -0
- package/dist-embed-scene/SearchlightSystem-CX1_nBkz.js +1 -0
- package/dist-embed-scene/{SkyLantern-BKxwl7Po.js → SkyLantern-Dp_B40X0.js} +1 -1
- package/dist-embed-scene/{TimelineTracks-Cjt0OHJS.js → TimelineTracks-iym9uOfD.js} +1 -1
- package/dist-embed-scene/{UfoMessages_en-A8Ku1B0Y.js → UfoMessages_en-CqQ-VdQJ.js} +1 -1
- package/dist-embed-scene/rr0-scene.mjs +401 -326
- package/dist-embed-scene/sightingSchema-9MogCcUd.js +1 -0
- package/dist-embed-sighting/{AdsbLolArchiveProvider-BfWrS1jn.js → AdsbLolArchiveProvider-CsuxO9wl.js} +1 -1
- package/dist-embed-sighting/AirshipEditor-DkDCkwGG.js +16 -0
- package/dist-embed-sighting/AirshipEditorMessages_en-CFafbbN8.js +1 -0
- package/dist-embed-sighting/AirshipEditorMessages_es-ht4kFQUD.js +1 -0
- package/dist-embed-sighting/AirshipEditorMessages_fr-Bhj6QKCL.js +1 -0
- package/dist-embed-sighting/AirshipEditorMessages_it-Cfl9mFjn.js +1 -0
- package/dist-embed-sighting/AirshipFlight-D8fH97A1.js +1 -0
- package/dist-embed-sighting/AirshipKindMessages_en-DzGapVTV.js +1 -0
- package/dist-embed-sighting/AirshipKindMessages_es-TE93uMSC.js +1 -0
- package/dist-embed-sighting/AirshipKindMessages_fr-BTXNsW5W.js +1 -0
- package/dist-embed-sighting/AirshipKindMessages_it-Cwa3MnJ-.js +1 -0
- package/dist-embed-sighting/AirshipParameterTexts_en-DZxqhSI3.js +1 -0
- package/dist-embed-sighting/AirshipParameterTexts_es-BDJUZOmr.js +1 -0
- package/dist-embed-sighting/AirshipParameterTexts_fr-Cj-D0Xb_.js +1 -0
- package/dist-embed-sighting/AirshipParameterTexts_it-BhC9cEbs.js +1 -0
- package/dist-embed-sighting/Aurora-DN89D94m.js +1 -0
- package/dist-embed-sighting/AuroraEditor-C4tY9hXK.js +8 -0
- package/dist-embed-sighting/AuroraEditorMessages_en-CpU3BS-B.js +1 -0
- package/dist-embed-sighting/AuroraEditorMessages_es-i8-psDHN.js +1 -0
- package/dist-embed-sighting/AuroraEditorMessages_fr-0DtPXXAs.js +1 -0
- package/dist-embed-sighting/AuroraEditorMessages_it-Dn2UHyk9.js +1 -0
- package/dist-embed-sighting/AuroraKindMessages_en-D_W4giJa.js +1 -0
- package/dist-embed-sighting/AuroraKindMessages_es-jJ5_ltZq.js +1 -0
- package/dist-embed-sighting/AuroraKindMessages_fr-6IzUVbRH.js +1 -0
- package/dist-embed-sighting/AuroraKindMessages_it-DcwuoMkp.js +1 -0
- package/dist-embed-sighting/AuroraParameterTexts_en-shkUd-dT.js +1 -0
- package/dist-embed-sighting/AuroraParameterTexts_es-CwGYyafK.js +1 -0
- package/dist-embed-sighting/AuroraParameterTexts_fr-CoJnicWs.js +1 -0
- package/dist-embed-sighting/AuroraParameterTexts_it-DHniBj_2.js +1 -0
- package/dist-embed-sighting/AuroraSimulation-C9hvCV0W.js +152 -0
- package/dist-embed-sighting/BalloonEditor-CaWwqWKK.js +24 -0
- package/dist-embed-sighting/BalloonEditorMessages_en-B2n2FutN.js +1 -0
- package/dist-embed-sighting/BalloonEditorMessages_es-BXppdrpF.js +1 -0
- package/dist-embed-sighting/BalloonEditorMessages_fr-BmUizmQy.js +1 -0
- package/dist-embed-sighting/BalloonEditorMessages_it-Dx0JODqK.js +1 -0
- package/dist-embed-sighting/BalloonFlight-MN_clHSJ.js +1 -0
- package/dist-embed-sighting/BalloonKindMessages_en-C6tZ-5gT.js +1 -0
- package/dist-embed-sighting/BalloonKindMessages_es-BfoEjhe1.js +1 -0
- package/dist-embed-sighting/BalloonKindMessages_fr-C3QJIuDJ.js +1 -0
- package/dist-embed-sighting/BalloonKindMessages_it-CkO7mqHp.js +1 -0
- package/dist-embed-sighting/BalloonParameterTexts_en-CHm_vRVx.js +1 -0
- package/dist-embed-sighting/BalloonParameterTexts_es-BYaljnsn.js +1 -0
- package/dist-embed-sighting/BalloonParameterTexts_fr-IhyPRhYG.js +1 -0
- package/dist-embed-sighting/BalloonParameterTexts_it-BqBPIfav.js +1 -0
- package/dist-embed-sighting/{BeamEditor--mMu1zwv.js → BeamEditor-DDzw-fB_.js} +2 -2
- package/dist-embed-sighting/BeamSystem-CsNwl_vM.js +1 -0
- package/dist-embed-sighting/{BirdEditor-DZ1Ybqeu.js → BirdEditor-BgNNcdhv.js} +1 -1
- package/dist-embed-sighting/{BirdFlock-BZScQXfR.js → BirdFlock-DBgkxsxp.js} +1 -1
- package/dist-embed-sighting/{CaseReportExport-CAuwP-Ec.js → CaseReportExport-DVVsc8gA.js} +1 -1
- package/dist-embed-sighting/DroneEditor-5nuq52EG.js +16 -0
- package/dist-embed-sighting/{DroneFlight-WxqILFs6.js → DroneFlight-sMbiog9j.js} +1 -1
- package/dist-embed-sighting/DroneParameters-DHeJ7KyU.js +1 -0
- package/dist-embed-sighting/{Flightradar24Provider-DJmvd2AL.js → Flightradar24Provider-p4a3_chL.js} +1 -1
- package/dist-embed-sighting/{GLTFLoader-FWVFviG5.js → GLTFLoader-fbsNsHlp.js} +1 -1
- package/dist-embed-sighting/InterviewMessages_en-BRmuWrAg.js +1 -0
- package/dist-embed-sighting/InterviewMessages_es-BTotimwY.js +1 -0
- package/dist-embed-sighting/InterviewMessages_fr-DBCdGB0r.js +1 -0
- package/dist-embed-sighting/InterviewMessages_it-B5EyMD-k.js +1 -0
- package/dist-embed-sighting/{LanternEditor-Do0kggi8.js → LanternEditor-Be5Io1J-.js} +1 -1
- package/dist-embed-sighting/{LaserBeam-CMO6tMze.js → LaserBeam-BRdhNOMZ.js} +1 -1
- package/dist-embed-sighting/{LaunchEditor-CZri7DN4.js → LaunchEditor-BGyLgkGS.js} +1 -1
- package/dist-embed-sighting/{LaunchPlume-DxDfUSlS.js → LaunchPlume-iiiayJ8I.js} +1 -1
- package/dist-embed-sighting/{LaunchSimulation-CTxbrEJw.js → LaunchSimulation-DvexI06i.js} +1 -1
- package/dist-embed-sighting/ModuleSession-ChJsGuTn.js +3 -0
- package/dist-embed-sighting/ModuleThree-whEZoXYF.js +1 -0
- package/dist-embed-sighting/{ParameterForm-B8nX9qW-.js → ParameterForm-DFHcolwG.js} +1 -1
- package/dist-embed-sighting/{ReentryEditor-BbhQfIPi.js → ReentryEditor-C6EJJf4l.js} +1 -1
- package/dist-embed-sighting/{ReentrySimulation-BHbW9YNO.js → ReentrySimulation-BFVBOWrm.js} +1 -1
- package/dist-embed-sighting/ReferenceSystem-zTvTqp5y.js +1 -0
- package/dist-embed-sighting/SearchlightEditor-By5Z3ef7.js +8 -0
- package/dist-embed-sighting/SearchlightEditorMessages_en-BWTcGHYC.js +1 -0
- package/dist-embed-sighting/SearchlightEditorMessages_es-PS4IIWFS.js +1 -0
- package/dist-embed-sighting/SearchlightEditorMessages_fr-CpaD2Il2.js +1 -0
- package/dist-embed-sighting/SearchlightEditorMessages_it-Br2IjowF.js +1 -0
- package/dist-embed-sighting/SearchlightKindMessages_en-CwJDAjsc.js +1 -0
- package/dist-embed-sighting/SearchlightKindMessages_es-CCCgZyTQ.js +1 -0
- package/dist-embed-sighting/SearchlightKindMessages_fr-DsxiUhmK.js +1 -0
- package/dist-embed-sighting/SearchlightKindMessages_it-CyWpJL5c.js +1 -0
- package/dist-embed-sighting/SearchlightParameterTexts_en-BwanYoMW.js +1 -0
- package/dist-embed-sighting/SearchlightParameterTexts_es-Cz_rg-Xe.js +1 -0
- package/dist-embed-sighting/SearchlightParameterTexts_fr-B7eZQIdG.js +1 -0
- package/dist-embed-sighting/SearchlightParameterTexts_it-BjhuOJre.js +1 -0
- package/dist-embed-sighting/SearchlightSystem-B2-MzG4x.js +1 -0
- package/dist-embed-sighting/{SightingMessages_en-sch1T1ki.js → SightingMessages_en-D3YVhgUj.js} +1 -1
- package/dist-embed-sighting/{SightingMessages_es-DemDEDtF.js → SightingMessages_es-ME6FeTp-.js} +1 -1
- package/dist-embed-sighting/{SightingMessages_fr-DskVkEj0.js → SightingMessages_fr-BgXYuIq4.js} +1 -1
- package/dist-embed-sighting/{SightingMessages_it-CrbYpdv8.js → SightingMessages_it-DcE90eAl.js} +1 -1
- package/dist-embed-sighting/{SkyLantern-COmog7pF.js → SkyLantern-yYihsrun.js} +1 -1
- package/dist-embed-sighting/{TimelineTracks-CYIJdyPF.js → TimelineTracks-Cw7W2uiK.js} +1 -1
- package/dist-embed-sighting/rr0-sighting.mjs +417 -342
- package/dist-embed-sighting/sightingSchema-9MogCcUd.js +1 -0
- package/dist-embed-sighting-editor/{AdsbLolArchiveProvider-BqEnqRP0.js → AdsbLolArchiveProvider-CWpyBqG3.js} +1 -1
- package/dist-embed-sighting-editor/AirshipEditor-BvnVNcF4.js +16 -0
- package/dist-embed-sighting-editor/AirshipEditorMessages_en-CFafbbN8.js +1 -0
- package/dist-embed-sighting-editor/AirshipEditorMessages_es-ht4kFQUD.js +1 -0
- package/dist-embed-sighting-editor/AirshipEditorMessages_fr-Bhj6QKCL.js +1 -0
- package/dist-embed-sighting-editor/AirshipEditorMessages_it-Cfl9mFjn.js +1 -0
- package/dist-embed-sighting-editor/AirshipFlight-CB1Quf68.js +1 -0
- package/dist-embed-sighting-editor/AirshipKindMessages_en-DzGapVTV.js +1 -0
- package/dist-embed-sighting-editor/AirshipKindMessages_es-TE93uMSC.js +1 -0
- package/dist-embed-sighting-editor/AirshipKindMessages_fr-BTXNsW5W.js +1 -0
- package/dist-embed-sighting-editor/AirshipKindMessages_it-Cwa3MnJ-.js +1 -0
- package/dist-embed-sighting-editor/AirshipParameterTexts_en-DZxqhSI3.js +1 -0
- package/dist-embed-sighting-editor/AirshipParameterTexts_es-BDJUZOmr.js +1 -0
- package/dist-embed-sighting-editor/AirshipParameterTexts_fr-Cj-D0Xb_.js +1 -0
- package/dist-embed-sighting-editor/AirshipParameterTexts_it-BhC9cEbs.js +1 -0
- package/dist-embed-sighting-editor/Aurora-BRXvgyRM.js +1 -0
- package/dist-embed-sighting-editor/AuroraEditor-JQ3kRqrq.js +8 -0
- package/dist-embed-sighting-editor/AuroraEditorMessages_en-CpU3BS-B.js +1 -0
- package/dist-embed-sighting-editor/AuroraEditorMessages_es-i8-psDHN.js +1 -0
- package/dist-embed-sighting-editor/AuroraEditorMessages_fr-0DtPXXAs.js +1 -0
- package/dist-embed-sighting-editor/AuroraEditorMessages_it-Dn2UHyk9.js +1 -0
- package/dist-embed-sighting-editor/AuroraKindMessages_en-D_W4giJa.js +1 -0
- package/dist-embed-sighting-editor/AuroraKindMessages_es-jJ5_ltZq.js +1 -0
- package/dist-embed-sighting-editor/AuroraKindMessages_fr-6IzUVbRH.js +1 -0
- package/dist-embed-sighting-editor/AuroraKindMessages_it-DcwuoMkp.js +1 -0
- package/dist-embed-sighting-editor/AuroraParameterTexts_en-shkUd-dT.js +1 -0
- package/dist-embed-sighting-editor/AuroraParameterTexts_es-CwGYyafK.js +1 -0
- package/dist-embed-sighting-editor/AuroraParameterTexts_fr-CoJnicWs.js +1 -0
- package/dist-embed-sighting-editor/AuroraParameterTexts_it-DHniBj_2.js +1 -0
- package/dist-embed-sighting-editor/AuroraSimulation-i64MFW2z.js +152 -0
- package/dist-embed-sighting-editor/{BallesterGuaspAssessor-BL_yzudf.js → BallesterGuaspAssessor-BaKKAdY3.js} +1 -1
- package/dist-embed-sighting-editor/BalloonEditor-C2oHClW7.js +24 -0
- package/dist-embed-sighting-editor/BalloonEditorMessages_en-B2n2FutN.js +1 -0
- package/dist-embed-sighting-editor/BalloonEditorMessages_es-BXppdrpF.js +1 -0
- package/dist-embed-sighting-editor/BalloonEditorMessages_fr-BmUizmQy.js +1 -0
- package/dist-embed-sighting-editor/BalloonEditorMessages_it-Dx0JODqK.js +1 -0
- package/dist-embed-sighting-editor/BalloonFlight-B9A6MoCj.js +1 -0
- package/dist-embed-sighting-editor/BalloonKindMessages_en-C6tZ-5gT.js +1 -0
- package/dist-embed-sighting-editor/BalloonKindMessages_es-BfoEjhe1.js +1 -0
- package/dist-embed-sighting-editor/BalloonKindMessages_fr-C3QJIuDJ.js +1 -0
- package/dist-embed-sighting-editor/BalloonKindMessages_it-CkO7mqHp.js +1 -0
- package/dist-embed-sighting-editor/BalloonParameterTexts_en-CHm_vRVx.js +1 -0
- package/dist-embed-sighting-editor/BalloonParameterTexts_es-BYaljnsn.js +1 -0
- package/dist-embed-sighting-editor/BalloonParameterTexts_fr-IhyPRhYG.js +1 -0
- package/dist-embed-sighting-editor/BalloonParameterTexts_it-BqBPIfav.js +1 -0
- package/dist-embed-sighting-editor/{BeamEditor-DA29mfqm.js → BeamEditor-CW7mTQjS.js} +1 -1
- package/dist-embed-sighting-editor/BeamSystem-CSfJjLCb.js +1 -0
- package/dist-embed-sighting-editor/BirdEditor-BdxhCoW9.js +16 -0
- package/dist-embed-sighting-editor/{BirdFlock-TI63ZAKZ.js → BirdFlock-DCbrukNp.js} +1 -1
- package/dist-embed-sighting-editor/{BodyEditor-COLTBHzX.js → BodyEditor-DE8ZQrqe.js} +1 -1
- package/dist-embed-sighting-editor/{CaseElement--JmpOsUW.js → CaseElement-C46wM-nU.js} +3 -3
- package/dist-embed-sighting-editor/{CaseReportExport-nFM_7lq4.js → CaseReportExport-UVrInf6H.js} +3 -3
- package/dist-embed-sighting-editor/{ContrailSystem-B0cQbaHc.js → ContrailSystem-CDSSxouG.js} +1 -1
- package/dist-embed-sighting-editor/{ControlPasses-BvS8haeS.js → ControlPasses-CsOVa-jq.js} +1 -1
- package/dist-embed-sighting-editor/{CoverageAssessor-DD1kSvun.js → CoverageAssessor-DWY_gJJX.js} +1 -1
- package/dist-embed-sighting-editor/DroneEditor-DgeuaHdb.js +16 -0
- package/dist-embed-sighting-editor/{DroneFlight-BpnBgJ9K.js → DroneFlight-CFztr-9j.js} +1 -1
- package/dist-embed-sighting-editor/DroneParameters-CHmDmRoC.js +1 -0
- package/dist-embed-sighting-editor/{Flightradar24Provider-D5OdIL0L.js → Flightradar24Provider-e6_3o9Jf.js} +1 -1
- package/dist-embed-sighting-editor/{GLTFLoader-DuqJVU4y.js → GLTFLoader-Df-r7_lf.js} +1 -1
- package/dist-embed-sighting-editor/{GenerativeKitMessages-B8L7U7gD.js → GenerativeKitMessages-CmqG-T2c.js} +1 -1
- package/dist-embed-sighting-editor/{GeoExportTexts-DrGdI2OF.js → GeoExportTexts-Wjc5YKlM.js} +1 -1
- package/dist-embed-sighting-editor/{GeoJsonExport-BZ-0v8fM.js → GeoJsonExport-BSPGzTbG.js} +1 -1
- package/dist-embed-sighting-editor/GeographicFigures-D_TfLkj9.js +1 -0
- package/dist-embed-sighting-editor/{HeadlightSystem-BejdfHqe.js → HeadlightSystem-DljWmzj5.js} +1 -1
- package/dist-embed-sighting-editor/{HynekAssessor-CwzpS7YP.js → HynekAssessor-BCDwoOI9.js} +1 -1
- package/dist-embed-sighting-editor/InterviewEditorElement-KHpgfy3k.js +277 -0
- package/dist-embed-sighting-editor/{InterviewElement-B3tm7y49.js → InterviewElement-DDa53uMq.js} +1 -1
- package/dist-embed-sighting-editor/InterviewMedia-CGVsMdje.js +1 -0
- package/dist-embed-sighting-editor/InterviewMessages_en-BRmuWrAg.js +1 -0
- package/dist-embed-sighting-editor/InterviewMessages_es-BTotimwY.js +1 -0
- package/dist-embed-sighting-editor/InterviewMessages_fr-DBCdGB0r.js +1 -0
- package/dist-embed-sighting-editor/InterviewMessages_it-B5EyMD-k.js +1 -0
- package/dist-embed-sighting-editor/{KmlExport-Bh4eTycx.js → KmlExport-B46AfaoJ.js} +1 -1
- package/dist-embed-sighting-editor/LanternEditor-CkbeitJh.js +24 -0
- package/dist-embed-sighting-editor/{LaserBeam-tqM2fwHf.js → LaserBeam-Ber-PT8j.js} +1 -1
- package/dist-embed-sighting-editor/LaunchEditor-BsvHahqK.js +22 -0
- package/dist-embed-sighting-editor/{LaunchPlume-DWyU0YyJ.js → LaunchPlume-BmPMeGMN.js} +1 -1
- package/dist-embed-sighting-editor/{LaunchSimulation-C_OJQoKC.js → LaunchSimulation-g-ETWhEH.js} +1 -1
- package/dist-embed-sighting-editor/ModelSource-DOUnBBhu.js +1 -0
- package/dist-embed-sighting-editor/{ModelThumbnails-C_8KCF7H.js → ModelThumbnails-TwG1snwZ.js} +1 -1
- package/dist-embed-sighting-editor/{ModelViewer-Cy-6IZBY.js → ModelViewer-Y_B6eM4z.js} +1 -1
- package/dist-embed-sighting-editor/ModuleConformance-CO1S9pa3.js +2 -0
- package/dist-embed-sighting-editor/ModuleSession-VLS0tjAb.js +3 -0
- package/dist-embed-sighting-editor/ModuleThree-DQ2dT7XW.js +1 -0
- package/dist-embed-sighting-editor/{ModulesPanelElement-hDjGLhRa.js → ModulesPanelElement--YQ0QtcW.js} +3 -3
- package/dist-embed-sighting-editor/{NearestApproach-D6tQo7dk.js → NearestApproach-C_8Uvp6i.js} +1 -1
- package/dist-embed-sighting-editor/PictureRegistration-Br0xjLE2.js +1 -0
- package/dist-embed-sighting-editor/{PoherAssessor-BTYpHucH.js → PoherAssessor-DtDcuhWK.js} +1 -1
- package/dist-embed-sighting-editor/QuestionnaireFeed-CvLtuLIH.js +1 -0
- package/dist-embed-sighting-editor/QuestionnaireForm-DA6LPvBt.js +1 -0
- package/dist-embed-sighting-editor/QuestionnaireImport-BYj5QoJS.js +5 -0
- package/dist-embed-sighting-editor/QuestionnaireSeal-DpZYUhnf.js +1 -0
- package/dist-embed-sighting-editor/{RailwaySystem-D_8D64Bu.js → RailwaySystem-eT-ZKfZl.js} +1 -1
- package/dist-embed-sighting-editor/ReentryEditor-CW8H7KaA.js +28 -0
- package/dist-embed-sighting-editor/{ReentrySimulation-Bom073AV.js → ReentrySimulation-DVl__RjO.js} +1 -1
- package/dist-embed-sighting-editor/ReferenceSystem-DxVYO7g9.js +1 -0
- package/dist-embed-sighting-editor/{RoadMarkings-BGK7ToZP.js → RoadMarkings-DJraHdS6.js} +1 -1
- package/dist-embed-sighting-editor/ScenarioReadings-BYqlpLo8.js +1 -0
- package/dist-embed-sighting-editor/ScenarioSweep-Ddtuo_Af.js +1 -0
- package/dist-embed-sighting-editor/ScenarioSweepMessages_en-Bf4BscDU.js +1 -0
- package/dist-embed-sighting-editor/ScenarioSweepMessages_es-CBHQfuRB.js +1 -0
- package/dist-embed-sighting-editor/ScenarioSweepMessages_fr-DlPsO6oI.js +1 -0
- package/dist-embed-sighting-editor/ScenarioSweepMessages_it-DANW3_la.js +1 -0
- package/dist-embed-sighting-editor/{SceneNames_en-9zK_E4jO.js → SceneNames_en-p5YNYZhA.js} +1 -1
- package/dist-embed-sighting-editor/{SceneNames_es-B6FtSh6r.js → SceneNames_es-DlMqYLL9.js} +1 -1
- package/dist-embed-sighting-editor/{SceneNames_fr-lUEwaxUk.js → SceneNames_fr-lFA7hY3x.js} +1 -1
- package/dist-embed-sighting-editor/{SceneNames_it-ChU8RE2E.js → SceneNames_it-CDwvX1Nw.js} +1 -1
- package/dist-embed-sighting-editor/SearchlightEditor-BSI8hB1V.js +8 -0
- package/dist-embed-sighting-editor/SearchlightEditorMessages_en-BWTcGHYC.js +1 -0
- package/dist-embed-sighting-editor/SearchlightEditorMessages_es-PS4IIWFS.js +1 -0
- package/dist-embed-sighting-editor/SearchlightEditorMessages_fr-CpaD2Il2.js +1 -0
- package/dist-embed-sighting-editor/SearchlightEditorMessages_it-Br2IjowF.js +1 -0
- package/dist-embed-sighting-editor/SearchlightKindMessages_en-CwJDAjsc.js +1 -0
- package/dist-embed-sighting-editor/SearchlightKindMessages_es-CCCgZyTQ.js +1 -0
- package/dist-embed-sighting-editor/SearchlightKindMessages_fr-DsxiUhmK.js +1 -0
- package/dist-embed-sighting-editor/SearchlightKindMessages_it-CyWpJL5c.js +1 -0
- package/dist-embed-sighting-editor/SearchlightParameterTexts_en-BwanYoMW.js +1 -0
- package/dist-embed-sighting-editor/SearchlightParameterTexts_es-Cz_rg-Xe.js +1 -0
- package/dist-embed-sighting-editor/SearchlightParameterTexts_fr-B7eZQIdG.js +1 -0
- package/dist-embed-sighting-editor/SearchlightParameterTexts_it-BjhuOJre.js +1 -0
- package/dist-embed-sighting-editor/SearchlightSystem-DHfVi2np.js +1 -0
- package/{dist-embed-ufoathome/SightingEditorMessages_en-CtZXoBSS.js → dist-embed-sighting-editor/SightingEditorMessages_en-k7_ua2OM.js} +1 -1
- package/dist-embed-sighting-editor/{SightingEditorMessages_es-CKXlDIja.js → SightingEditorMessages_es-Drqbbr5_.js} +1 -1
- package/{dist-embed-ufoathome/SightingEditorMessages_fr-DjP6vAKo.js → dist-embed-sighting-editor/SightingEditorMessages_fr-B_K5hsuV.js} +1 -1
- package/{dist-embed-ufoathome/SightingEditorMessages_it-CxtFzCzo.js → dist-embed-sighting-editor/SightingEditorMessages_it-QCLg1d7x.js} +1 -1
- package/dist-embed-sighting-editor/{SightingElement-DsR4mBCh.js → SightingElement-T0x4j9Zt.js} +4 -4
- package/dist-embed-sighting-editor/{SightingFileEditor-0VZmtiOX.js → SightingFileEditor-Du3A9uZm.js} +1 -1
- package/dist-embed-sighting-editor/{SightingMessages_en-CYzanHjT.js → SightingMessages_en-CzICxNU3.js} +1 -1
- package/dist-embed-sighting-editor/{SightingMessages_es-hjvESK6f.js → SightingMessages_es-CiVFZlgA.js} +1 -1
- package/dist-embed-sighting-editor/{SightingMessages_fr-BtfWbIP7.js → SightingMessages_fr-nopOVDa1.js} +1 -1
- package/dist-embed-sighting-editor/{SightingMessages_it-Bqm4pewZ.js → SightingMessages_it-Cu0nnPts.js} +1 -1
- package/dist-embed-sighting-editor/{SkyLantern-BDpxvmY3.js → SkyLantern-Dl4yl-lc.js} +1 -1
- package/dist-embed-sighting-editor/{TraceSystem-B1mmypS3.js → TraceSystem-Dbu_bgfE.js} +2 -2
- package/dist-embed-sighting-editor/{UfoMessages_en-JeMK-39o.js → UfoMessages_en-BAuHAGgq.js} +1 -1
- package/dist-embed-sighting-editor/{VideoButton-Kxg7pF1Y.js → VideoButton-C8eRmv7A.js} +1 -1
- package/dist-embed-sighting-editor/{WaterSystem-mZ-f2CcD.js → WaterSystem-DpJCe_2Q.js} +2 -2
- package/dist-embed-sighting-editor/angular-size-CxoysZle.png +0 -0
- package/dist-embed-sighting-editor/azimuth-CvjiPmz0.png +0 -0
- package/dist-embed-sighting-editor/caseSchema-BEJTs2Ld.js +1 -0
- package/dist-embed-sighting-editor/elevation-DPr5S6Jt.png +0 -0
- package/dist-embed-sighting-editor/geipan-qt-2025-j-yGY7EN.js +7 -0
- package/dist-embed-sighting-editor/{interviewImport-BlSMFEw_.js → interviewImport-zzDGCbXd.js} +1 -1
- package/dist-embed-sighting-editor/{interviewJson-CsMHIcZ-.js → interviewJson-DngUPqK8.js} +1 -1
- package/dist-embed-sighting-editor/interviewSchema-DRWvRSL2.js +1 -0
- package/dist-embed-sighting-editor/protractor-DyE30B87.png +0 -0
- package/dist-embed-sighting-editor/rr0-sighting-editor.mjs +543 -443
- package/dist-embed-sighting-editor/sightingSchema-9MogCcUd.js +1 -0
- package/dist-embed-sighting-editor/{surroundingsSources-z7680fTA.js → surroundingsSources-lvh4Rw5C.js} +1 -1
- package/dist-embed-sighting-editor/{trafficRuntime-CvK_m6bC.js → trafficRuntime-Drx7CE9H.js} +1 -1
- package/dist-embed-ufoathome/AdsbLolArchiveProvider-CqedGYi5.js +1 -0
- package/dist-embed-ufoathome/AirshipEditor-CBSrQM3J.js +16 -0
- package/dist-embed-ufoathome/AirshipEditorMessages_en-CFafbbN8.js +1 -0
- package/dist-embed-ufoathome/AirshipEditorMessages_es-ht4kFQUD.js +1 -0
- package/dist-embed-ufoathome/AirshipEditorMessages_fr-Bhj6QKCL.js +1 -0
- package/dist-embed-ufoathome/AirshipEditorMessages_it-Cfl9mFjn.js +1 -0
- package/dist-embed-ufoathome/AirshipFlight-Dzpw8HRM.js +1 -0
- package/dist-embed-ufoathome/AirshipKindMessages_en-DzGapVTV.js +1 -0
- package/dist-embed-ufoathome/AirshipKindMessages_es-TE93uMSC.js +1 -0
- package/dist-embed-ufoathome/AirshipKindMessages_fr-BTXNsW5W.js +1 -0
- package/dist-embed-ufoathome/AirshipKindMessages_it-Cwa3MnJ-.js +1 -0
- package/dist-embed-ufoathome/AirshipParameterTexts_en-DZxqhSI3.js +1 -0
- package/dist-embed-ufoathome/AirshipParameterTexts_es-BDJUZOmr.js +1 -0
- package/dist-embed-ufoathome/AirshipParameterTexts_fr-Cj-D0Xb_.js +1 -0
- package/dist-embed-ufoathome/AirshipParameterTexts_it-BhC9cEbs.js +1 -0
- package/dist-embed-ufoathome/Aurora-CpZx9hQ3.js +1 -0
- package/dist-embed-ufoathome/AuroraEditor-D2v8sWVE.js +8 -0
- package/dist-embed-ufoathome/AuroraEditorMessages_en-CpU3BS-B.js +1 -0
- package/dist-embed-ufoathome/AuroraEditorMessages_es-i8-psDHN.js +1 -0
- package/dist-embed-ufoathome/AuroraEditorMessages_fr-0DtPXXAs.js +1 -0
- package/dist-embed-ufoathome/AuroraEditorMessages_it-Dn2UHyk9.js +1 -0
- package/dist-embed-ufoathome/AuroraKindMessages_en-D_W4giJa.js +1 -0
- package/dist-embed-ufoathome/AuroraKindMessages_es-jJ5_ltZq.js +1 -0
- package/dist-embed-ufoathome/AuroraKindMessages_fr-6IzUVbRH.js +1 -0
- package/dist-embed-ufoathome/AuroraKindMessages_it-DcwuoMkp.js +1 -0
- package/dist-embed-ufoathome/AuroraParameterTexts_en-shkUd-dT.js +1 -0
- package/dist-embed-ufoathome/AuroraParameterTexts_es-CwGYyafK.js +1 -0
- package/dist-embed-ufoathome/AuroraParameterTexts_fr-CoJnicWs.js +1 -0
- package/dist-embed-ufoathome/AuroraParameterTexts_it-DHniBj_2.js +1 -0
- package/dist-embed-ufoathome/AuroraSimulation-DdSP66LD.js +152 -0
- package/dist-embed-ufoathome/BallesterGuaspAssessor-C4IktJ1l.js +1 -0
- package/dist-embed-ufoathome/BalloonEditor-dCIjTsIz.js +24 -0
- package/dist-embed-ufoathome/BalloonEditorMessages_en-B2n2FutN.js +1 -0
- package/dist-embed-ufoathome/BalloonEditorMessages_es-BXppdrpF.js +1 -0
- package/dist-embed-ufoathome/BalloonEditorMessages_fr-BmUizmQy.js +1 -0
- package/dist-embed-ufoathome/BalloonEditorMessages_it-Dx0JODqK.js +1 -0
- package/dist-embed-ufoathome/BalloonFlight-CztT6ddg.js +1 -0
- package/dist-embed-ufoathome/BalloonKindMessages_en-C6tZ-5gT.js +1 -0
- package/dist-embed-ufoathome/BalloonKindMessages_es-BfoEjhe1.js +1 -0
- package/dist-embed-ufoathome/BalloonKindMessages_fr-C3QJIuDJ.js +1 -0
- package/dist-embed-ufoathome/BalloonKindMessages_it-CkO7mqHp.js +1 -0
- package/dist-embed-ufoathome/BalloonParameterTexts_en-CHm_vRVx.js +1 -0
- package/dist-embed-ufoathome/BalloonParameterTexts_es-BYaljnsn.js +1 -0
- package/dist-embed-ufoathome/BalloonParameterTexts_fr-IhyPRhYG.js +1 -0
- package/dist-embed-ufoathome/BalloonParameterTexts_it-BqBPIfav.js +1 -0
- package/dist-embed-ufoathome/{BeamEditor-CFYAfywp.js → BeamEditor-CuW3LVO-.js} +2 -2
- package/dist-embed-ufoathome/BeamSystem-BPEYuCF4.js +1 -0
- package/dist-embed-ufoathome/BirdEditor-Dk3huwHa.js +16 -0
- package/dist-embed-ufoathome/{BodyEditor-B96fap0d.js → BodyEditor-COMX-T65.js} +1 -1
- package/dist-embed-ufoathome/CaseEditorElement-C5BHP8jT.js +3173 -0
- package/dist-embed-ufoathome/{CaseElement-BFDRYL5v.js → CaseElement-CIZvyRVi.js} +3 -3
- package/dist-embed-ufoathome/{CaseReportExport-VrulN0VG.js → CaseReportExport-BFbswUIB.js} +3 -3
- package/dist-embed-ufoathome/{ColumnResize-DD0wwlp2.js → ColumnResize-Dh6Xyspd.js} +6 -6
- package/dist-embed-ufoathome/ContrailSystem-D2AR5Zgy.js +1 -0
- package/dist-embed-ufoathome/ControlPasses-CnL1GmT-.js +29 -0
- package/dist-embed-ufoathome/CoverageAssessor-CiqUEJkN.js +1 -0
- package/dist-embed-ufoathome/DroneEditor-D60uhSHO.js +16 -0
- package/dist-embed-ufoathome/DroneParameters-CfTAaLCT.js +1 -0
- package/dist-embed-ufoathome/Flightradar24Provider-_tNmWf11.js +1 -0
- package/dist-embed-ufoathome/GLTFLoader-BLk8prLt.js +1 -0
- package/dist-embed-ufoathome/GeoJsonExport-DkPKk-7q.js +2 -0
- package/dist-embed-ufoathome/GeoProjection-DvqDbRIx.js +1 -0
- package/dist-embed-ufoathome/{GeographicFigures-Ds8kfyn7.js → GeographicFigures-l-PfHdSR.js} +1 -1
- package/dist-embed-ufoathome/HeadlightSystem-D5-78PFB.js +34 -0
- package/dist-embed-ufoathome/HynekAssessor-BhnvqsYz.js +1 -0
- package/dist-embed-ufoathome/InterviewEditorElement-iw2lnwx8.js +277 -0
- package/dist-embed-ufoathome/{InterviewElement-BrlawcDm.js → InterviewElement-CuRmQ0d3.js} +2 -2
- package/dist-embed-ufoathome/InterviewMedia-CGVsMdje.js +1 -0
- package/dist-embed-ufoathome/InterviewMessages_en-BRmuWrAg.js +1 -0
- package/dist-embed-ufoathome/InterviewMessages_es-BTotimwY.js +1 -0
- package/dist-embed-ufoathome/InterviewMessages_fr-DBCdGB0r.js +1 -0
- package/dist-embed-ufoathome/InterviewMessages_it-B5EyMD-k.js +1 -0
- package/dist-embed-ufoathome/KmlExport-BUl3gOrw.js +19 -0
- package/dist-embed-ufoathome/LanternEditor-BapUZdog.js +24 -0
- package/dist-embed-ufoathome/{LaserBeam-Ced8VujI.js → LaserBeam-C7glTvQN.js} +1 -1
- package/dist-embed-ufoathome/LaunchEditor-DvudtAzp.js +22 -0
- package/dist-embed-ufoathome/{LaunchPlume-DdeLDyDg.js → LaunchPlume-CrDBzsQe.js} +1 -1
- package/dist-embed-ufoathome/LaunchSimulation-DyOA4lPb.js +1 -0
- package/dist-embed-ufoathome/ModelSource-CoT4mxTx.js +1 -0
- package/dist-embed-ufoathome/ModelThumbnails-t59SZ3Vn.js +1 -0
- package/dist-embed-ufoathome/ModelViewer-DEdruEtl.js +1 -0
- package/dist-embed-ufoathome/ModuleConformance-DYDAaJJQ.js +2 -0
- package/dist-embed-ufoathome/ModuleSession-BKDWGSEo.js +3 -0
- package/dist-embed-ufoathome/ModuleThree-D18Rh2Nj.js +1 -0
- package/dist-embed-ufoathome/{ModulesPanelElement-Bio6lzC6.js → ModulesPanelElement-N-ccpGxl.js} +3 -3
- package/dist-embed-ufoathome/{NearestApproach-DAiByBN2.js → NearestApproach-Do15yfeg.js} +1 -1
- package/dist-embed-ufoathome/{ParameterForm-DcVFxrcO.js → ParameterForm-XbqxCLRn.js} +1 -1
- package/dist-embed-ufoathome/PictureRegistration-BJeiCK8A.js +1 -0
- package/dist-embed-ufoathome/PoherAssessor-Cs8-ZBge.js +1 -0
- package/dist-embed-ufoathome/QuestionnaireFeed-BfvRSPoo.js +1 -0
- package/dist-embed-ufoathome/QuestionnaireForm-ByFmq67M.js +1 -0
- package/dist-embed-ufoathome/QuestionnaireImport-Cx1dQiha.js +5 -0
- package/dist-embed-ufoathome/QuestionnaireSeal-DpZYUhnf.js +1 -0
- package/dist-embed-ufoathome/RailwaySystem-KlBj8mLP.js +41 -0
- package/dist-embed-ufoathome/ReentryEditor-CJUFkVFO.js +28 -0
- package/dist-embed-ufoathome/ReentrySimulation-B5QcdOTq.js +1 -0
- package/dist-embed-ufoathome/ReferenceSystem-DyzOUClN.js +1 -0
- package/dist-embed-ufoathome/RoadMarkings-DKUNImjj.js +1 -0
- package/dist-embed-ufoathome/SaidPosition-OJEYhVKN.js +4 -0
- package/dist-embed-ufoathome/ScenarioReadings-CfZehU_P.js +1 -0
- package/dist-embed-ufoathome/ScenarioSweep-CDumnmq2.js +1 -0
- package/dist-embed-ufoathome/ScenarioSweepMessages_en-Bf4BscDU.js +1 -0
- package/dist-embed-ufoathome/ScenarioSweepMessages_es-CBHQfuRB.js +1 -0
- package/dist-embed-ufoathome/ScenarioSweepMessages_fr-DlPsO6oI.js +1 -0
- package/dist-embed-ufoathome/ScenarioSweepMessages_it-DANW3_la.js +1 -0
- package/dist-embed-ufoathome/SearchlightEditor-CPDNpfNC.js +8 -0
- package/dist-embed-ufoathome/SearchlightEditorMessages_en-BWTcGHYC.js +1 -0
- package/dist-embed-ufoathome/SearchlightEditorMessages_es-PS4IIWFS.js +1 -0
- package/dist-embed-ufoathome/SearchlightEditorMessages_fr-CpaD2Il2.js +1 -0
- package/dist-embed-ufoathome/SearchlightEditorMessages_it-Br2IjowF.js +1 -0
- package/dist-embed-ufoathome/SearchlightKindMessages_en-CwJDAjsc.js +1 -0
- package/dist-embed-ufoathome/SearchlightKindMessages_es-CCCgZyTQ.js +1 -0
- package/dist-embed-ufoathome/SearchlightKindMessages_fr-DsxiUhmK.js +1 -0
- package/dist-embed-ufoathome/SearchlightKindMessages_it-CyWpJL5c.js +1 -0
- package/dist-embed-ufoathome/SearchlightParameterTexts_en-BwanYoMW.js +1 -0
- package/dist-embed-ufoathome/SearchlightParameterTexts_es-Cz_rg-Xe.js +1 -0
- package/dist-embed-ufoathome/SearchlightParameterTexts_fr-B7eZQIdG.js +1 -0
- package/dist-embed-ufoathome/SearchlightParameterTexts_it-BjhuOJre.js +1 -0
- package/dist-embed-ufoathome/SearchlightSystem-Ca0rZcXv.js +1 -0
- package/dist-embed-ufoathome/ShareDialogElement-CBeU9ChH.js +5182 -0
- package/dist-embed-ufoathome/Sighting-B7bsiTIQ.js +1 -0
- package/{dist-embed-sighting-editor/SightingEditorMessages_en-CtZXoBSS.js → dist-embed-ufoathome/SightingEditorMessages_en-k7_ua2OM.js} +1 -1
- package/dist-embed-ufoathome/{SightingEditorMessages_es-CKXlDIja.js → SightingEditorMessages_es-Drqbbr5_.js} +1 -1
- package/{dist-embed-sighting-editor/SightingEditorMessages_fr-DjP6vAKo.js → dist-embed-ufoathome/SightingEditorMessages_fr-B_K5hsuV.js} +1 -1
- package/{dist-embed-sighting-editor/SightingEditorMessages_it-CxtFzCzo.js → dist-embed-ufoathome/SightingEditorMessages_it-QCLg1d7x.js} +1 -1
- package/dist-embed-ufoathome/{SightingElement-DTADTDwh.js → SightingElement-BveOM4nF.js} +4 -4
- package/dist-embed-ufoathome/{SightingFileEditor-Cllslp2u.js → SightingFileEditor-DS1DRU2p.js} +1 -1
- package/dist-embed-ufoathome/{SightingMessages_en-CYzanHjT.js → SightingMessages_en-CzICxNU3.js} +1 -1
- package/dist-embed-ufoathome/{SightingMessages_es-hjvESK6f.js → SightingMessages_es-CiVFZlgA.js} +1 -1
- package/dist-embed-ufoathome/{SightingMessages_fr-BtfWbIP7.js → SightingMessages_fr-nopOVDa1.js} +1 -1
- package/dist-embed-ufoathome/{SightingMessages_it-Bqm4pewZ.js → SightingMessages_it-Cu0nnPts.js} +1 -1
- package/dist-embed-ufoathome/{TimelineTracks-BgZmkKhn.js → TimelineTracks-Daaqw9ly.js} +1 -1
- package/dist-embed-ufoathome/{TraceSystem-BcWYbjQM.js → TraceSystem-CoHX04R3.js} +2 -2
- package/dist-embed-ufoathome/{UfoAtHomeMessages_en-dlx_C679.js → UfoAtHomeMessages_en-BK2qJyZN.js} +1 -1
- package/dist-embed-ufoathome/{UfoAtHomeMessages_es-uLOvtAD0.js → UfoAtHomeMessages_es-B1-NDCau.js} +1 -1
- package/dist-embed-ufoathome/{UfoAtHomeMessages_fr-LR76-eHS.js → UfoAtHomeMessages_fr-BTG047qo.js} +1 -1
- package/dist-embed-ufoathome/{UfoAtHomeMessages_it-CQl4uTnG.js → UfoAtHomeMessages_it-Ryxv4HNU.js} +1 -1
- package/dist-embed-ufoathome/VideoButton-DNQmWtfv.js +1 -0
- package/dist-embed-ufoathome/WaterSystem-BNxlYNtW.js +19 -0
- package/dist-embed-ufoathome/angular-size-CxoysZle.png +0 -0
- package/dist-embed-ufoathome/azimuth-CvjiPmz0.png +0 -0
- package/dist-embed-ufoathome/caseSchema-BEJTs2Ld.js +1 -0
- package/dist-embed-ufoathome/elevation-DPr5S6Jt.png +0 -0
- package/dist-embed-ufoathome/geipan-qt-2025-j-yGY7EN.js +7 -0
- package/dist-embed-ufoathome/interviewSchema-DRWvRSL2.js +1 -0
- package/dist-embed-ufoathome/protractor-DyE30B87.png +0 -0
- package/dist-embed-ufoathome/rr0-ufoathome.mjs +27 -17
- package/dist-embed-ufoathome/sightingSchema-9MogCcUd.js +1 -0
- package/dist-embed-ufoathome/surroundingsSources-C823p3dG.js +1 -0
- package/dist-embed-ufoathome/three.module-CbaHqYFq.js +4116 -0
- package/dist-embed-ufoathome/trafficRuntime-DtXb9B2f.js +2 -0
- package/dist-embed-ufoathome/{upperAirSources-BGuLpdwu.js → upperAirSources-BU0pD84c.js} +1 -1
- package/dist-embed-ufoathome/xyzImageryRaster-Dhxs0B26.js +1 -0
- package/package.json +4 -2
- package/dist-embed-interview/InterviewMessages_en-ru7GkZlQ.js +0 -1
- package/dist-embed-interview/InterviewMessages_es-DkJurNrG.js +0 -1
- package/dist-embed-interview/InterviewMessages_fr-DAYgf8Ms.js +0 -1
- package/dist-embed-interview/InterviewMessages_it-6lenkmSg.js +0 -1
- package/dist-embed-scene/BeamSystem-CaNus1WN.js +0 -1
- package/dist-embed-scene/DroneEditor-BDDLiZPp.js +0 -16
- package/dist-embed-scene/ModuleSession-Hj3QwLuw.js +0 -3
- package/dist-embed-scene/ModuleThree-D1uz5JiH.js +0 -1
- package/dist-embed-scene/ReferenceSystem-B6FHr1Pb.js +0 -1
- package/dist-embed-scene/sightingSchema-CgwoRMl-.js +0 -1
- package/dist-embed-sighting/BeamSystem-Cqe7QaN4.js +0 -1
- package/dist-embed-sighting/DroneEditor-Bo19kUte.js +0 -16
- package/dist-embed-sighting/InterviewMessages_en-ru7GkZlQ.js +0 -1
- package/dist-embed-sighting/InterviewMessages_es-DkJurNrG.js +0 -1
- package/dist-embed-sighting/InterviewMessages_fr-DAYgf8Ms.js +0 -1
- package/dist-embed-sighting/InterviewMessages_it-6lenkmSg.js +0 -1
- package/dist-embed-sighting/ModuleSession-BCtFMDJY.js +0 -3
- package/dist-embed-sighting/ModuleThree-DPVHqcup.js +0 -1
- package/dist-embed-sighting/ReferenceSystem-DCSdp9Bq.js +0 -1
- package/dist-embed-sighting/sightingSchema-CgwoRMl-.js +0 -1
- package/dist-embed-sighting-editor/BeamSystem-DYohqXlF.js +0 -1
- package/dist-embed-sighting-editor/BirdEditor-CAoRqqRV.js +0 -16
- package/dist-embed-sighting-editor/DroneEditor-BRB2-dAw.js +0 -16
- package/dist-embed-sighting-editor/GeographicFigures-DqhWddS9.js +0 -1
- package/dist-embed-sighting-editor/InterviewEditorElement-DbVrB3-g.js +0 -242
- package/dist-embed-sighting-editor/InterviewMedia-CvAxC62V.js +0 -1
- package/dist-embed-sighting-editor/InterviewMessages_en-ru7GkZlQ.js +0 -1
- package/dist-embed-sighting-editor/InterviewMessages_es-DkJurNrG.js +0 -1
- package/dist-embed-sighting-editor/InterviewMessages_fr-DAYgf8Ms.js +0 -1
- package/dist-embed-sighting-editor/InterviewMessages_it-6lenkmSg.js +0 -1
- package/dist-embed-sighting-editor/LanternEditor-BnXAwLuQ.js +0 -24
- package/dist-embed-sighting-editor/LaunchEditor-vwecAGwH.js +0 -22
- package/dist-embed-sighting-editor/ModelSource-D1Wt6VYS.js +0 -1
- package/dist-embed-sighting-editor/ModuleConformance-DYi4XZdB.js +0 -2
- package/dist-embed-sighting-editor/ModuleSession-BDbaoiCf.js +0 -3
- package/dist-embed-sighting-editor/ModuleThree-DRf9SEr_.js +0 -1
- package/dist-embed-sighting-editor/PictureRegistration-DBBH_E6I.js +0 -1
- package/dist-embed-sighting-editor/ReentryEditor-D7HxkvKP.js +0 -28
- package/dist-embed-sighting-editor/ReferenceSystem-D_eueNAb.js +0 -1
- package/dist-embed-sighting-editor/caseSchema-ChUB1-9j.js +0 -1
- package/dist-embed-sighting-editor/interviewSchema-Dk0AWHwc.js +0 -1
- package/dist-embed-sighting-editor/sightingSchema-CgwoRMl-.js +0 -1
- package/dist-embed-ufoathome/AdsbLolArchiveProvider-B9MGq-iQ.js +0 -1
- package/dist-embed-ufoathome/BallesterGuaspAssessor-BehuINgj.js +0 -1
- package/dist-embed-ufoathome/BeamSystem-Bt5Dnpzy.js +0 -1
- package/dist-embed-ufoathome/BirdEditor-07sg3Pt0.js +0 -16
- package/dist-embed-ufoathome/CaseEditorElement-D-RKShTH.js +0 -3148
- package/dist-embed-ufoathome/ContrailSystem-BKeTHlcZ.js +0 -1
- package/dist-embed-ufoathome/ControlPasses-D3vc-NmG.js +0 -29
- package/dist-embed-ufoathome/CoverageAssessor-Be38W7Im.js +0 -1
- package/dist-embed-ufoathome/DroneEditor-ByVlCauS.js +0 -16
- package/dist-embed-ufoathome/Flightradar24Provider-DdPjGVJg.js +0 -1
- package/dist-embed-ufoathome/GLTFLoader-D1_vI_Fe.js +0 -1
- package/dist-embed-ufoathome/GeoJsonExport-B2qogWLj.js +0 -2
- package/dist-embed-ufoathome/HeadlightSystem-BdhHphIq.js +0 -34
- package/dist-embed-ufoathome/HynekAssessor-MqnQfg3F.js +0 -1
- package/dist-embed-ufoathome/InterviewEditorElement-DjQuGytO.js +0 -242
- package/dist-embed-ufoathome/InterviewMedia-CvAxC62V.js +0 -1
- package/dist-embed-ufoathome/InterviewMessages_en-ru7GkZlQ.js +0 -1
- package/dist-embed-ufoathome/InterviewMessages_es-DkJurNrG.js +0 -1
- package/dist-embed-ufoathome/InterviewMessages_fr-DAYgf8Ms.js +0 -1
- package/dist-embed-ufoathome/InterviewMessages_it-6lenkmSg.js +0 -1
- package/dist-embed-ufoathome/KmlExport-AzofE76s.js +0 -19
- package/dist-embed-ufoathome/LanternEditor-BRqgj1S6.js +0 -24
- package/dist-embed-ufoathome/LaunchEditor-D-5OJi90.js +0 -22
- package/dist-embed-ufoathome/LaunchSimulation-BeCHjgE5.js +0 -1
- package/dist-embed-ufoathome/ModelSource-LY5T91ay.js +0 -1
- package/dist-embed-ufoathome/ModelThumbnails-C25E4WMl.js +0 -1
- package/dist-embed-ufoathome/ModelViewer-D6JaOQS7.js +0 -1
- package/dist-embed-ufoathome/ModuleConformance-DGjaEwAM.js +0 -2
- package/dist-embed-ufoathome/ModuleSession-pXE1aOJF.js +0 -3
- package/dist-embed-ufoathome/ModuleThree-xQDeVLs0.js +0 -1
- package/dist-embed-ufoathome/PictureRegistration-Dbr0O7NF.js +0 -1
- package/dist-embed-ufoathome/PoherAssessor-C7NN73NP.js +0 -1
- package/dist-embed-ufoathome/RailwaySystem-D3u3j_tw.js +0 -41
- package/dist-embed-ufoathome/ReentryEditor-s-AkSgbU.js +0 -28
- package/dist-embed-ufoathome/ReentrySimulation-2UWwXU7K.js +0 -1
- package/dist-embed-ufoathome/ReferenceSystem-BhEFpIis.js +0 -1
- package/dist-embed-ufoathome/RoadMarkings-DDRxawvf.js +0 -1
- package/dist-embed-ufoathome/SaidPosition-CXZLm-ck.js +0 -4
- package/dist-embed-ufoathome/ShareDialogElement-C9Uiwt0F.js +0 -9222
- package/dist-embed-ufoathome/Sighting-Ch4eiBNK.js +0 -1
- package/dist-embed-ufoathome/VideoButton-CgfBskVu.js +0 -1
- package/dist-embed-ufoathome/WaterSystem-BsGtTimO.js +0 -19
- package/dist-embed-ufoathome/caseSchema-ChUB1-9j.js +0 -1
- package/dist-embed-ufoathome/interviewSchema-Dk0AWHwc.js +0 -1
- package/dist-embed-ufoathome/sightingSchema-CgwoRMl-.js +0 -1
- package/dist-embed-ufoathome/surroundingsSources-B--F7TR5.js +0 -1
- package/dist-embed-ufoathome/trafficRuntime-B97u9ZY_.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{aP as O,bp as D,bq as y}from"./rr0-sighting-editor.mjs";class l{static DEFAULT_DIVERGENCE_MRAD=.1;static DEFAULT_APERTURE_M=.01;static AEROSOL_SINGLE_SCATTERING_ALBEDO=.9;static AEROSOL_ASYMMETRY=.7;static DEFAULT_PATCHINESS=.35;static PATCH_M=120;static STEP_M=25;static MAX_SAMPLES=2e3;static viewsAt(n,o,t,s){return l.onAt(n,o).map(c=>l.viewOf(c,t,s))}static viewOf(n,o,t){return{id:n.id,wavelengthNm:n.wavelengthNm,patchiness:n.patchiness??l.DEFAULT_PATCHINESS,samples:l.samplesOf(n,o,t)}}static onAt(n,o){return n.filter(t=>(t.fromT===void 0||o>=t.fromT)&&(t.untilT===void 0||o<=t.untilT)).map(t=>l.stateAt(t,o)).filter(t=>t.path.length>=2)}static stateAt(n,o){if(!n.light?.length&&!n.moves?.length)return n;const t={...n};if(n.light?.length){const s=l.joined(n.light.filter(e=>e.wavelengthNm!==void 0),o,e=>e.wavelengthNm),c=l.joined(n.light.filter(e=>e.powerW!==void 0),o,e=>e.powerW);s!==void 0&&(t.wavelengthNm=s),c!==void 0&&(t.powerW=c)}return n.moves?.length&&(t.path=l.pathAt(n.moves,o)),t}static joined(n,o,t){if(n.length===0)return;const s=[...n].sort((a,i)=>a.t-i.t);if(o<=s[0].t)return t(s[0]);const c=s[s.length-1];if(o>=c.t)return t(c);const e=s.findIndex(a=>a.t>o),r=s[e-1],h=s[e],M=(o-r.t)/(h.t-r.t);return t(r)+(t(h)-t(r))*M}static pathAt(n,o){const t=[...n].sort((a,i)=>a.t-i.t);if(o<=t[0].t)return t[0].path;const s=t[t.length-1];if(o>=s.t)return s.path;const c=t.findIndex(a=>a.t>o),e=t[c-1],r=t[c];if(e.path.length!==r.path.length)return e.path;const h=(o-e.t)/(r.t-e.t),M=(a,i)=>a+(i-a)*h;return e.path.map((a,i)=>({lat:M(a.lat,r.path[i].lat),lng:M(a.lng,r.path[i].lng),altitudeM:M(a.altitudeM,r.path[i].altitudeM)}))}static patchAt(n,o,t){if(t.patchiness<=0)return 1;const s=o/1e3,c=(r,h)=>{const M=(n-t.windAlongMS*s)/r,a=(Math.abs(t.windAcrossMS)+.3)*s/r+h;return l.valueNoise(M,a)},e=(2*c(l.PATCH_M,0)+c(l.PATCH_M/3,17.3))/3;return 1+t.patchiness*(2*e-1)}static valueNoise(n,o){const t=Math.floor(n),s=Math.floor(o),c=n-t,e=o-s,r=i=>i*i*(3-2*i),h=(i,g)=>{const v=Math.sin(i*127.1+g*311.7)*43758.5453;return v-Math.floor(v)},M=h(t,s)+(h(t+1,s)-h(t,s))*r(c),a=h(t,s+1)+(h(t+1,s+1)-h(t,s+1))*r(c);return M+(a-M)*r(e)}static samplesOf(n,o,t){const s=O.ecef({lat:o.lat,lng:o.lng,heightM:0}),c=o.lat*Math.PI/180,e=o.lng*Math.PI/180,r=u=>{const p=u[0]-s[0],A=u[1]-s[1],f=u[2]-s[2];return[-Math.sin(e)*p+Math.cos(e)*A,-Math.sin(c)*Math.cos(e)*p-Math.sin(c)*Math.sin(e)*A+Math.cos(c)*f,Math.cos(c)*Math.cos(e)*p+Math.cos(c)*Math.sin(e)*A+Math.sin(c)*f]},h=(n.divergenceMrad??l.DEFAULT_DIVERGENCE_MRAD)/1e3,M=n.apertureM??l.DEFAULT_APERTURE_M,a=[];let i=0,g=n.powerW,v=0;for(let u=0;u+1<n.path.length;u++){const p=n.path[u],A=n.path[u+1],f=O.ecef({lat:p.lat,lng:p.lng,heightM:p.altitudeM}),w=O.ecef({lat:A.lat,lng:A.lng,heightM:A.altitudeM}),d=Math.hypot(w[0]-f[0],w[1]-f[1],w[2]-f[2]),[C,S]=(()=>{const[E,R]=r(f),[N,P]=r(w);return[(N-E)/(d||1),(P-R)/(d||1)]})(),I=Math.max(1,Math.min(l.MAX_SAMPLES,Math.ceil(d/l.STEP_M)));for(let E=u===0?0:1;E<=I;E++){const R=E/I,N=[0,1,2].map(T=>f[T]+(w[T]-f[T])*R),P=R*d,x=p.altitudeM+(A.altitudeM-p.altitudeM)*R+l.bulgeM(P,d);if(E>0){const T=a[a.length-1],W=P+i-T.fromSourceM,H=l.extinctionAt(t,n.wavelengthNm,(T.altitudeM+x)/2);v+=H*W,g=n.powerW*Math.exp(-v)}const[U,F,G]=r(N);a.push({eastM:U,northM:F,upM:G,altitudeM:x,fromSourceM:i+P,dirEast:C,dirNorth:S,widthM:M+h*(i+P),powerW:g})}i+=d}return a}static bulgeM(n,o){return n*(o-n)/(2*6371e3)}static extinctionAt(n,o,t){const{rayleighPerM:s,aerosolPerM:c}=l.coefficientsAt(n,o,t);return s+c}static coefficientsAt(n,o,t){const s=D.rayleighAt(o)*D.rayleighDensity(t),c=n.aerosol[1]*(o/550)**-1.3*D.aerosolDensity(t);return{rayleighPerM:s,aerosolPerM:c}}static phasedScattering(n,o){const t=3/(16*Math.PI)*(1+o*o),s=l.AEROSOL_ASYMMETRY,c=(1-s*s)/(4*Math.PI*(1+s*s-2*s*o)**1.5);return n.rayleighPerM*t+n.aerosolPerM*l.AEROSOL_SINGLE_SCATTERING_ALBEDO*c}static efficacy(n){return 683*Math.max(0,y.colourMatching(n)[1])}static colourOf(n){const[o,t,s]=y.colourMatching(n);if(t<=0)return[0,0,0];const c=y.linearSrgbOf([o/t,1,s/t]).map(r=>Math.max(0,r)),e=.2126*c[0]+.7152*c[1]+.0722*c[2];return c.map(r=>r/e)}static luminanceCdM2(n,o,t,s,c){return l.efficacy(o)*n*t/(s*Math.max(c,.001))}}export{l as L};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import{v as y,_ as d,bc as b,a7 as x,a8 as E,I as g,a5 as w,a6 as j,a9 as v,br as k}from"./rr0-sighting-editor.mjs";import{S as I}from"./SkyEventEditorStyle-CvY_AhbI.js";import{L as T}from"./LaunchPlume-BmPMeGMN.js";const S=y.catalog({en:()=>d(()=>import("./LaunchParameterTexts_en-DvrCwbDM.js"),[],import.meta.url).then(r=>r.launchParameterTexts_en),fr:()=>d(()=>import("./LaunchParameterTexts_fr-Bh_1zVzy.js"),[],import.meta.url).then(r=>r.launchParameterTexts_fr),es:()=>d(()=>import("./LaunchParameterTexts_es--RUAegVp.js"),[],import.meta.url).then(r=>r.launchParameterTexts_es),it:()=>d(()=>import("./LaunchParameterTexts_it-CWDx9nJy.js"),[],import.meta.url).then(r=>r.launchParameterTexts_it)});class n{static plumeValue(e){return t=>T.plumeOf(t)[e]}static plume(e,t){return{type:"number",key:`plume.${e}`,effective:n.plumeValue(e),...t}}static burn(e,t){return{type:"number",key:e,min:-3600,max:36e3,step:.1,unit:"s",scale:.001,label:t.label,hint:t.hint,group:"engine",effective:i=>t.ends(i.track??[])?.t}}static placeAt(e,t){if(e.length===0)return{t,lat:0,lng:0,altitudeKm:0};if(e.length===1)return{t,lat:e[0].lat,lng:e[0].lng,altitudeKm:e[0].altitudeKm};let i=0;for(;i<e.length-2&&e[i+1].t<t;)i++;const s=e[i],a=e[i+1],l=a.t===s.t?0:(t-s.t)/(a.t-s.t),o=(m,h)=>m+(h-m)*l;return{t,lat:o(s.lat,a.lat),lng:o(s.lng,a.lng),altitudeKm:Math.max(0,o(s.altitudeKm,a.altitudeKm))}}static instantsOf(e){return[...e.track.map(t=>t.t),...[e.burnFromT,e.burnUntilT].filter(t=>t!==void 0),...(e.jets??[]).flatMap(t=>[t.fromT,t.untilT])]}static SET={kind:"launch",title:"launch",parameters:[{type:"said",key:"title",label:"name",group:"vehicle"},{type:"text",key:"vehicle.mission",label:"mission",placeholder:"Starlink Group 10-49",group:"vehicle"},{type:"number",key:"vehicle.engine.thrustKN",min:1,max:1e5,step:1,unit:"kN",label:"thrustVacuum",hint:"merlinVacuum934Rl10110A",group:"engine"},{type:"number",key:"vehicle.engine.specificImpulseS",min:100,max:500,step:1,unit:"s",label:"specificImpulseVacuum",hint:"times981MSIt",group:"engine"},{type:"choice",key:"vehicle.engine.propellant",label:"propellant",hint:"whatTheExhaustIsMadeOf",choices:[{value:"rp1-lox",label:"keroseneAndOxygen"},{value:"methane-lox",label:"methaneAndOxygen"},{value:"hydrogen-lox",label:"hydrogenAndOxygen"},{value:"hypergolic",label:"hypergolic"},{value:"solid",label:"solid"}],group:"engine"},n.burn("burnFromT",{label:"engineStart",hint:"whenTheEngineStartedInSeconds",ends:e=>e[0]}),n.burn("burnUntilT",{label:"engineCutOff",hint:"whenTheEngineStoppedInSeconds",ends:e=>e[e.length-1]}),n.plume("exhaustKgPerS",{min:.1,max:1e5,step:.1,unit:"kg/s",label:"exhaustFlow",hint:"howMuchExhaustLeavesTheEngine",group:"plume"}),n.plume("condensedShare",{min:0,max:1,step:.01,label:"shareThatScatters",hint:"theShareOfTheExhaustThat",group:"plume"}),n.plume("particleRadiusUm",{min:.05,max:5,step:.05,unit:"µm",label:"particleRadius",group:"plume"}),n.plume("lifetimeS",{min:10,max:3600,step:10,unit:"s",label:"trailLifetime",hint:"howLongTheNarrowTrailLasts",group:"plume"}),n.plume("expansionKmPerS",{min:0,max:5,step:.01,unit:"km/s",label:"trailSpreading",group:"plume"}),n.plume("initialRadiusKm",{min:0,max:50,step:.1,unit:"km",label:"radiusAtRelease",group:"plume"}),n.plume("collarShare",{min:0,max:1,step:.01,label:"shareInTheCollar",hint:"theCollarIsTheExhaustJust",group:"collar"}),n.plume("collarExpansionKmPerS",{min:0,max:10,step:.05,unit:"km/s",label:"collarSpreading",hint:"howFastTheCollarWidensThree",group:"collar"}),n.plume("collarLifetimeS",{min:1,max:300,step:1,unit:"s",label:"collarLifetime",group:"collar"})]};static PLACE={kind:"launch-place",title:"placeOfThePath",parameters:[{type:"number",key:"t",min:-3600,max:36e3,step:.1,unit:"s",scale:.001,required:!0,label:"time",hint:"secondsOfTheRecordingNegativeBefore"},{type:"position",key:"lat",secondKey:"lng",saidKey:"saidPosition",native:"geo",step:1,label:"position"},{type:"number",key:"altitudeKm",min:0,max:2e3,step:.1,unit:"km",required:!0,label:"altitude"}]};static jetContext(e,t){return{launch:e,index:t}}static jetValue(e){return(t,i)=>{const{launch:s,index:a}=i??{};return s?e(T.releaseOf(s,t,a)):void 0}}static JET_GROUP="jet";static JET={kind:"launch-jet",title:"jet",parameters:[{type:"choice",key:"kind",required:!0,label:"what",choices:[{value:"burn",label:"engineBurn"},{value:"vent",label:"propellantVented"}],group:n.JET_GROUP},{type:"number",key:"fromT",min:-36e3,max:36e3,step:.1,unit:"s",scale:.001,required:!0,label:"from",hint:"secondsOfTheRecordingNegativeBefore2",group:n.JET_GROUP},{type:"number",key:"untilT",min:-36e3,max:36e3,step:.1,unit:"s",scale:.001,required:!0,label:"until",group:n.JET_GROUP},{type:"number",key:"angleDeg",min:0,max:180,step:1,unit:"°",effective:()=>0,label:"directionFromAft",hint:"t0StraightBackAlongTheStage",group:n.JET_GROUP},{type:"number",key:"azimuthDeg",min:-360,max:360,step:1,unit:"°",effective:()=>0,label:"side",hint:"roundTheLineOfMotionWhich",group:n.JET_GROUP},{type:"number",key:"spinPeriodS",min:-3600,max:3600,step:.1,unit:"s",label:"spinPeriod",hint:"howLongTheStageTakesTo",group:n.JET_GROUP},{type:"number",key:"speedKmPerS",min:0,max:10,step:.01,unit:"km/s",effective:n.jetValue(e=>e.speedKmPerS),label:"speed",hint:"howFastItLeavesTheStage",group:n.JET_GROUP},{type:"number",key:"massKgPerS",min:0,max:1e5,step:.1,unit:"kg/s",effective:n.jetValue(e=>e.massKgPerS),label:"flow",group:n.JET_GROUP},{type:"number",key:"condensedShare",min:0,max:1,step:.01,effective:n.jetValue(e=>e.condensedShare),label:"shareThatScatters",group:n.JET_GROUP},{type:"number",key:"particleRadiusUm",min:.05,max:5,step:.05,unit:"µm",effective:n.jetValue(e=>e.particleRadiusUm),label:"particleRadius",group:n.JET_GROUP},{type:"number",key:"expansionKmPerS",min:0,max:5,step:.01,unit:"km/s",effective:n.jetValue(e=>e.populations[0].expansionKmPerS),label:"spreading",hint:"howFastEachPuffOfIt",group:n.JET_GROUP},{type:"number",key:"initialRadiusKm",min:0,max:50,step:.1,unit:"km",effective:n.jetValue(e=>e.initialRadiusKm),label:"radiusAtRelease",group:n.JET_GROUP},{type:"number",key:"lifetimeS",min:1,max:7200,step:1,unit:"s",effective:n.jetValue(e=>e.populations[0].lifetimeS),label:"lifetime",group:n.JET_GROUP}]};static publish(){b.publish(n.SET)}}const O=y.catalog({en:()=>d(()=>import("./LaunchEditorMessages_en-BnzNAYW9.js"),[],import.meta.url).then(r=>r.launchEditorMessages_en),fr:()=>d(()=>import("./LaunchEditorMessages_fr-Ds_VOB8c.js"),[],import.meta.url).then(r=>r.launchEditorMessages_fr),es:()=>d(()=>import("./LaunchEditorMessages_es-BE0dEl7I.js"),[],import.meta.url).then(r=>r.launchEditorMessages_es),it:()=>d(()=>import("./LaunchEditorMessages_it-DPQaR8HY.js"),[],import.meta.url).then(r=>r.launchEditorMessages_it)});class u{constructor(e,t,i){this.container=e,this.host=t,I.attach(e,"launch-editor-part",u.STYLE),this.language=i,b.of("launch")||n.publish(),this.ready=this.setLanguage(i)}messages;ready;parameterTexts;languageToken=0;currentId;form;list;timeline;row="path";placeForm;placeIndex=0;jetForm;jetIndex=0;language;shown=[];static STYLE='.launch-editor-part { flex-basis: 100%; min-width: 0; } .launch-editor-part #launch-timeline { flex-basis: 100%; min-width: 0; padding: 4px 0; } .launch-editor-part .launch-path > .icon-btn { align-self: flex-end; } .launch-editor-part #launch-list, .launch-editor-part #launch-places { flex-basis: 100%; min-width: 0; } .launch-editor-part .launch-editor, .launch-editor-part .launch-fields { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; } .launch-editor-part .launch-fields { flex-basis: 100%; min-width: 0; } .launch-editor-part [hidden] { display: none !important; } .launch-editor-part select { min-width: 0; width: 100%; } .launch-editor-part .launch-intro { flex-basis: 100%; margin: 0; } .launch-editor-part .launch-track { flex-basis: 100%; margin: 0; } .launch-editor-part .launch-parameters { flex-basis: 100%; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; } .launch-editor-part .parameter-group { flex: 1 1 14em; min-width: 0; box-sizing: border-box; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: flex-start; align-content: flex-start; } .launch-editor-part input, .launch-editor-part select { max-width: 100%; box-sizing: border-box; } .launch-editor-part input[type="text"] { width: 12em; } .launch-editor-part #launch-title { width: 18em; } .launch-editor-part label { min-width: 0; max-width: 100%; } .launch-editor-part input.parameter-derived::placeholder { opacity: .65; } .launch-editor-part .launch-path { flex: 1 1 100%; min-width: 0; box-sizing: border-box; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: flex-start; }';async setLanguage(e){const t=++this.languageToken;this.language=e;const[i,s]=await Promise.all([O.load(e),S.load(e)]);t===this.languageToken&&(this.messages=i,this.parameterTexts=s,this.render(),this.sync())}sync(){if(!this.messages)return;const e=this.launches;this.shown=[...e],e.some(s=>s.id===this.currentId)||(this.currentId=e[0]?.id),this.list?.setItems(e.map(s=>({id:s.id,label:this.labelOf(s)})),this.currentId),this.syncAddState();const t=this.current;if(this.element("launch-fields").hidden=t===void 0,!t)return;this.syncPlace(!0),this.syncJet(!0);const i=this.resolved(b.of("launch"));this.form??=new x(this.element("launch-parameters"),this.language,"",{said:()=>this.host.said(),writingLanguage:()=>this.host.writingLanguage()}),this.form.show(i,t,()=>this.written())}refresh(){if(!this.messages)return;this.syncAddState();const e=this.launches;if(e.length===this.shown.length&&e.every((t,i)=>t===this.shown[i])){this.syncTimeline();return}this.sync()}setTime(e){this.messages&&this.timeline?.setTime(e)}syncAddState(){const e=this.startOfNew()!==void 0;this.list?.setAddState(e,e?void 0:this.messages.addLaunchNowhere)}get current(){return this.launches.find(e=>e.id===this.currentId)}show(e){this.messages&&(this.currentId=e,this.row="path",this.placeIndex=0,this.jetIndex=0,this.sync())}resolved(e){return E.resolve(e,this.parameterTexts)}render(){if(!this.messages)return;const e=this.messages;this.form=void 0,this.container.innerHTML=`<div class="launch-editor">
|
|
2
|
+
<p class="launch-intro">${e.intro}</p>
|
|
3
|
+
<div id="launch-list"></div>
|
|
4
|
+
<div id="launch-fields" class="launch-fields">
|
|
5
|
+
<div id="launch-parameters" class="launch-parameters"></div>
|
|
6
|
+
<div id="launch-timeline" class="launch-timeline"></div>
|
|
7
|
+
<button id="launch-jet-add-burn" type="button" title="${e.addJet}">${g.PLUS} ${e.jetBurn}</button>
|
|
8
|
+
<button id="launch-jet-add-vent" type="button" title="${e.addJet}">${g.PLUS} ${e.jetVent}</button>
|
|
9
|
+
<p class="launch-intro">${e.timelineNote}</p>
|
|
10
|
+
<fieldset id="launch-path" class="launch-path">
|
|
11
|
+
<legend>${e.path}</legend>
|
|
12
|
+
<div id="launch-place-parameters" class="launch-parameters"></div>
|
|
13
|
+
<button id="launch-place-delete" class="icon-btn" type="button" title="${e.deletePlace}" aria-label="${e.deletePlace}">${g.TRASH}</button>
|
|
14
|
+
</fieldset>
|
|
15
|
+
<fieldset id="launch-jets" class="launch-path">
|
|
16
|
+
<legend id="launch-jet-legend">${e.jet}</legend>
|
|
17
|
+
<div id="launch-jet-parameters" class="launch-parameters"></div>
|
|
18
|
+
<button id="launch-jet-delete" class="icon-btn" type="button" title="${e.deleteJet}" aria-label="${e.deleteJet}">${g.TRASH}</button>
|
|
19
|
+
</fieldset>
|
|
20
|
+
<p class="launch-intro">${e.derivedNote}</p>
|
|
21
|
+
</div>
|
|
22
|
+
</div>`;const t=this.element("launch-list");this.list=new w({header:t,body:this.element("launch-fields"),ids:{list:"launch-select",remove:"launch-delete",add:"launch-add",kinds:"launch-add-kind",kind:i=>`launch-add-${i}`},onSelect:i=>this.show(i),onAdd:i=>this.addLaunch(i??u.VEHICLES[0].id),onRemove:()=>this.deleteCurrent()}),this.list.setLabels({list:e.launch,remove:e.deleteLaunch,add:e.addLaunch,empty:e.none}),this.list.setKinds(u.VEHICLES.map(i=>({value:i.id,label:i.vehicle.name??i.id}))),this.timeline=new j(this.element("launch-timeline"),i=>this.host.seekTo(i),{addKeyframeHere:e.addHere,keyframeHere:e.here,zoomHint:e.zoomHint}),this.element("launch-jet-add-burn").addEventListener("click",()=>this.addJet("burn",this.host.currentTime())),this.element("launch-jet-add-vent").addEventListener("click",()=>this.addJet("vent",this.host.currentTime())),this.element("launch-place-delete").addEventListener("click",()=>this.removePlace()),this.element("launch-jet-delete").addEventListener("click",()=>this.removeJet()),this.placeForm=void 0,this.jetForm=void 0}written(){this.host.changed();const e=this.current;e&&(this.list?.rename(e.id,this.labelOf(e)),this.syncTimeline())}static PATH_COLOR="#e08a1e";static JET_COLOR="#4f8fd6";jetLabel(e,t){return`${e.kind==="vent"?this.messages.jetVent:this.messages.jetBurn} ${t+1}`}syncTimeline(){const e=this.current;if(!this.timeline||!e)return;const i={id:"path",label:this.messages.path,color:u.PATH_COLOR,times:e.track.map(h=>h.t),active:this.row==="path",selectedTime:this.row==="path"?e.track[this.placeIndex]?.t:void 0,open:()=>this.selectPlace(this.placeIndex),pressed:(h,c)=>{const p=c===void 0?-1:(this.current?.track??[]).findIndex(f=>f.t===c);this.selectPlace(p>=0?p:this.placeIndex)},move:(h,c)=>this.movePlace(h,c),add:()=>this.addPlaceAt(this.host.currentTime())},s=(e.jets??[]).map((h,c)=>({id:`jet-${c}`,label:this.jetLabel(h,c),color:u.JET_COLOR,times:[h.fromT,h.untilT],spans:[{t:h.fromT,until:h.untilT,label:""}],active:this.row==="jet"&&c===this.jetIndex,open:()=>this.selectJet(c),pressed:()=>this.selectJet(c),move:(p,f)=>this.moveJetEnd(c,p,f),add:()=>this.addJet(h.kind??"burn",this.host.currentTime())})),a=n.instantsOf(e),l=Math.min(...a),o=Math.max(...a),m=Math.max(500,(o-l)/10);this.timeline.show([i,...s],this.host.duration(),this.host.currentTime(),{from:l-m,to:o+m})}syncDetail(){const t=this.current?.jets?.[this.jetIndex];this.row==="jet"&&!t&&(this.row="path"),this.element("launch-path").hidden=this.row!=="path",this.element("launch-jets").hidden=this.row!=="jet",this.element("launch-jet-legend").textContent=t?this.jetLabel(t,this.jetIndex):this.messages.jet}static MIN_PLACES=2;syncPlace(e=!1){const t=this.current?.track??[];this.placeIndex=Math.max(0,Math.min(this.placeIndex,t.length-1)),this.element("launch-place-delete").disabled=t.length<=u.MIN_PLACES,this.placeForm?this.placeForm.sync(e):(this.placeForm=new x(this.element("launch-place-parameters"),this.language,"launchPlace."),this.placeForm.show(this.resolved(n.PLACE),new v(()=>this.current?.track[this.placeIndex],i=>this.editPlace(this.placeIndex,i),void 0,this.host.positionPlace?.()),()=>{})),this.syncDetail(),this.syncTimeline()}selectPlace(e){this.row="path",this.placeIndex=e,this.syncPlace(!0)}editPlace(e,t){const i=this.current;if(!i)return;const s={...i.track[e]};t(s),i.track=i.track.map((a,l)=>l===e?s:a).sort((a,l)=>a.t-l.t),this.placeIndex=i.track.indexOf(s),this.syncPlace(),this.written()}movePlace(e,t){const i=this.current?.track.findIndex(s=>s.t===e)??-1;i<0||(this.editPlace(i,s=>{s.t=t}),this.syncPlace(!0))}addPlaceAt(e){const t=this.current;if(!t)return;const i=t.track.findIndex(s=>Math.abs(s.t-e)<1);if(i<0){const s=n.placeAt(t.track,Math.round(e));t.track=[...t.track,s].sort((a,l)=>a.t-l.t),this.host.changed(),this.selectPlace(t.track.indexOf(s));return}this.selectPlace(i)}removePlace(){const e=this.current;!e||e.track.length<=u.MIN_PLACES||(e.track=e.track.filter((t,i)=>i!==this.placeIndex),this.syncPlace(!0),this.host.changed())}syncJet(e=!1){const t=this.current?.jets??[];this.jetIndex=Math.max(0,Math.min(this.jetIndex,t.length-1)),this.jetForm?this.jetForm.sync(e):(this.jetForm=new x(this.element("launch-jet-parameters"),this.language,"launchJet."),this.jetForm.show(this.resolved(n.JET),new v(()=>this.current?.jets?.[this.jetIndex],i=>this.editJet(this.jetIndex,i),()=>this.current?n.jetContext(this.current,this.jetIndex):void 0),()=>{})),this.syncDetail(),this.syncTimeline()}selectJet(e){this.row="jet",this.jetIndex=e,this.syncJet(!0)}editJet(e,t){const i=this.current;if(!i?.jets)return;const s={...i.jets[e]};t(s),i.jets=i.jets.map((a,l)=>l===e?s:a),this.written()}moveJetEnd(e,t,i){const s=this.current?.jets?.[e];s&&(this.editJet(e,a=>{const l=t===s.fromT?[i,s.untilT]:[s.fromT,i];a.fromT=Math.min(l[0],l[1]),a.untilT=Math.max(l[0],l[1])}),this.selectJet(e))}addJet(e,t){const i=this.current;if(!i)return;const s=i.track,a=Math.round(t),l=e==="vent"?{kind:e,fromT:a,untilT:a+3e4,angleDeg:90}:{kind:e,fromT:a,untilT:a+3e4};!i.jets?.length&&i.burnFromT===void 0&&i.burnUntilT===void 0&&(i.burnFromT=s[0].t,i.burnUntilT=s[s.length-1].t),i.jets=[...i.jets??[],l],this.form?.sync(!0),this.host.changed(),this.selectJet(i.jets.length-1)}removeJet(){const e=this.current;if(!e?.jets?.length)return;const t=e.jets.filter((i,s)=>s!==this.jetIndex);t.length?e.jets=t:delete e.jets,this.host.changed(),t.length?this.selectJet(Math.min(this.jetIndex,t.length-1)):this.selectPlace(this.placeIndex)}startOfNew(){const e=this.host.sighting(),t=e.event?.place?.[0];if(t?.lat===void 0||t.lng===void 0)return;const i=(e.observerTrack?.getInterpolatedPoseAt(0)?.headingDeg??0)*Math.PI/180,s=a=>({lat:t.lat+a*Math.cos(i)/111.32,lng:t.lng+a*Math.sin(i)/(111.32*Math.max(.05,Math.cos(t.lat*Math.PI/180)))});return[{t:0,...s(300),altitudeKm:80},{t:6e4,...s(450),altitudeKm:160}]}static VEHICLES=[{id:"falcon-9",vehicle:{name:"Falcon 9"}}];addLaunch(e){const t=this.startOfNew();if(!t)return;const i=u.VEHICLES.find(o=>o.id===e)??u.VEHICLES[0];let s=this.launches.length+1;for(;this.launches.some(o=>o.id===`launch-${s}`);)s++;const a={id:`launch-${s}`,vehicle:{...i.vehicle},track:t},l=this.host.sighting();l.skyEvents={...l.skyEvents,launches:[...this.launches,a]},this.currentId=a.id,this.row="path",this.placeIndex=0,this.host.changed(),this.sync()}deleteCurrent(){const e=this.current;if(!e)return;this.currentId=void 0;const t=this.host.sighting();t.skyEvents=k.written({...t.skyEvents,launches:this.launches.filter(i=>i!==e)}),this.host.changed(),this.sync()}labelOf(e){const t=this.host.said().read(e.title)??e.vehicle?.mission??e.vehicle?.name;return t?`${t} (${e.id})`:e.id}get launches(){return this.host.sighting().skyEvents?.launches??[]}element(e){return this.container.querySelector(`#${e}`)}}export{u as LaunchEditor};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{bu as k,bv as v,bw as F,bx as Y,aP as H}from"./rr0-sighting-editor.mjs";class K{static MU=398600.4418;static OMEGA=72921159e-12;static EARTH_RADIUS_KM=6371;static STEP_S=1;static DENSITY=[[0,1.225],[20,.0889],[40,.004],[60,31e-5],[80,185e-7],[100,56e-8],[120,222e-10],[150,208e-11],[200,254e-12],[250,607e-13],[300,192e-13],[400,28e-13],[500,522e-15],[600,114e-15],[700,307e-16],[800,114e-16],[900,576e-17],[1e3,356e-17]];static FREE_PATH_TIMES_DENSITY=68e-9;static ICE_DENSITY=917;static airDensity(s){const t=K.DENSITY;if(s<=t[0][0])return t[0][1];let e=0;for(;e<t.length-2&&t[e+1][0]<s;)e++;const[a,i]=t[e],[o,n]=t[e+1];return i*Math.exp(Math.log(n/i)*(s-a)/(o-a))}static dragPerKm(s,t,e,a=.5){const i=K.airDensity(s),o=K.FREE_PATH_TIMES_DENSITY/i/1e3,n=Math.exp(-o/t),p=i*1e9*Math.PI*t*t/Math.max(e,1e-9),d=3*i/(4*a*1e-6*K.ICE_DENSITY)*1e3;return n*p+(1-n)*d}static step(s,t,e,a,i){const[o,n,p,d,R,h]=s,m=Math.hypot(o,n,p),T=K.OMEGA,M=-398600.4418/(m*m*m),x=M*o+2*T*R+T*T*o,U=M*n-2*T*d+T*T*n,I=M*p,E=Math.hypot(d,R,h),c=1/(1+K.dragPerKm(m-K.EARTH_RADIUS_KM,e,a,i)*E*t);s[3]=(d+x*t)*c,s[4]=(R+U*t)*c,s[5]=(h+I*t)*c,s[0]=o+s[3]*t,s[1]=n+s[4]*t,s[2]=p+s[5]*t;const f=Math.hypot(s[0],s[1],s[2]);if(f<K.EARTH_RADIUS_KM){const A=K.EARTH_RADIUS_KM/f;s[0]*=A,s[1]*=A,s[2]*=A,s[3]=s[4]=s[5]=0}}}class _{constructor(s,t,e,a,i=.5){this.massKg=e,this.radiusAt=a,this.particleRadiusUm=i,this.state=Float64Array.of(...s,...t),this.positions=new Float64Array(192),this.positions.set(s,0)}positions;steps=0;state;at(s){const t=K.STEP_S,e=Math.max(0,s/t),a=Math.ceil(e);for(;this.steps<a;){if(K.step(this.state,t,this.radiusAt(this.steps*t),this.massKg,this.particleRadiusUm),this.steps++,3*(this.steps+1)>this.positions.length){const p=new Float64Array(this.positions.length*2);p.set(this.positions),this.positions=p}this.positions.set(this.state.subarray(0,3),3*this.steps)}const i=Math.floor(e),o=e-i,n=this.positions;return o===0||i>=this.steps?[n[3*i],n[3*i+1],n[3*i+2]]:[0,1,2].map(p=>n[3*i+p]+(n[3*i+3+p]-n[3*i+p])*o)}}class r{static EARTH_RADIUS_KM=6371;static SHADOW_RADIUS_KM=r.EARTH_RADIUS_KM+15;static PENUMBRA_KM=10;static SUN_ILLUMINANCE_LUX=127e3;static RAYLEIGH_PER_M=[58e-7,135e-7,331e-7];static SCALE_HEIGHT_M=8e3;static OZONE_GRAZING_DEPTH=[2.4,1.8,.24];static ANISOTROPY=.7;static ALBEDO=.99;static WAVELENGTHS_UM=[.61,.55,.465];static ICE_INDEX=1.31;static DEFAULTS={exhaustKgPerS:273,condensedShare:.065,particleRadiusUm:.5,expansionKmPerS:.15,initialRadiusKm:.5,lifetimeS:420,collarShare:.85,collarExpansionKmPerS:2.5,collarLifetimeS:20};static PROPELLANTS={"rp1-lox":{condensedShare:.065,particleRadiusUm:.5},"methane-lox":{condensedShare:.09,particleRadiusUm:.5},"hydrogen-lox":{condensedShare:.13,particleRadiusUm:.5},hypergolic:{condensedShare:.079,particleRadiusUm:.4},solid:{condensedShare:.27,particleRadiusUm:.8}};static G0=9.80665;static COLLAR_SPREAD_OF_EXHAUST_VELOCITY=.735;static plumeOf(s){const t={},e=s.vehicle?.engine;if(e){const a=e.specificImpulseS===void 0?void 0:e.specificImpulseS*r.G0;e.thrustKN!==void 0&&a&&(t.exhaustKgPerS=e.thrustKN*1e3/a),a&&(t.collarExpansionKmPerS=a/1e3*r.COLLAR_SPREAD_OF_EXHAUST_VELOCITY),e.propellant&&Object.assign(t,r.PROPELLANTS[e.propellant])}return{...r.DEFAULTS,...t,...s.plume}}static PUFF_EVERY_S=.5;static SIGMA_OF_RADIUS=.5;static MAX_PUFFS=320;static DEG=Math.PI/180;static EARTH_ROTATION=72921159e-12;static VENT_DEFAULTS={speedKmPerS:.7,massKgPerS:20,condensedShare:.5,particleRadiusUm:.5,expansionKmPerS:.1,initialRadiusKm:.2,lifetimeS:600};static paths=new WeakMap;static exhaustVelocityKmPerS(s){return(s.vehicle?.engine?.specificImpulseS??348)*r.G0/1e3}static releasesOf(s){const t=[],e=s.jets??[];if(e.length===0||s.burnFromT!==void 0||s.burnUntilT!==void 0){const a=s.track[0]?.t??0,i=s.track[s.track.length-1]?.t??0;t.push(r.engineRelease(s,"burn",{fromT:s.burnFromT??a,untilT:s.burnUntilT??i}))}return e.forEach((a,i)=>t.push(r.releaseOf(s,a,i))),t}static releaseOf(s,t,e){const a=`jet:${t.id??e}`;if((t.kind??"burn")==="burn")return r.engineRelease(s,a,t);const i=r.VENT_DEFAULTS;return{key:a,fromT:t.fromT,untilT:t.untilT,angleDeg:t.angleDeg??0,azimuthDeg:t.azimuthDeg??0,spinPeriodS:t.spinPeriodS,speedKmPerS:t.speedKmPerS??i.speedKmPerS,massKgPerS:t.massKgPerS??i.massKgPerS,condensedShare:t.condensedShare??i.condensedShare,particleRadiusUm:t.particleRadiusUm??i.particleRadiusUm,initialRadiusKm:t.initialRadiusKm??i.initialRadiusKm,populations:[{share:1,expansionKmPerS:t.expansionKmPerS??i.expansionKmPerS,lifetimeS:t.lifetimeS??i.lifetimeS}]}}static engineRelease(s,t,e){const a=r.plumeOf(s);return{key:t,fromT:e.fromT,untilT:e.untilT,angleDeg:e.angleDeg??0,azimuthDeg:e.azimuthDeg??0,spinPeriodS:e.spinPeriodS,speedKmPerS:e.speedKmPerS??r.exhaustVelocityKmPerS(s),massKgPerS:e.massKgPerS??a.exhaustKgPerS,condensedShare:e.condensedShare??a.condensedShare,particleRadiusUm:e.particleRadiusUm??a.particleRadiusUm,initialRadiusKm:e.initialRadiusKm??a.initialRadiusKm,populations:[{share:1-a.collarShare,expansionKmPerS:e.expansionKmPerS??a.expansionKmPerS,lifetimeS:e.lifetimeS??a.lifetimeS},{share:a.collarShare,expansionKmPerS:a.collarExpansionKmPerS,lifetimeS:a.collarLifetimeS}]}}static extinctionEfficiency(s,t){const e=2*Math.PI*s/t,a=r.ICE_INDEX**2,i=8/3*e**4*((a-1)/(a+2))**2,o=2*e*(r.ICE_INDEX-1),n=o<.001?o*o/2:2-4/o*Math.sin(o)+4/(o*o)*(1-Math.cos(o));return Math.min(i,n)}static scatteringColour(s){const t=r.extinctionEfficiency(s,r.WAVELENGTHS_UM[1]);return r.WAVELENGTHS_UM.map(e=>r.extinctionEfficiency(s,e)/t)}static sunDirectionAt(s){const t=new k(0,0,-6378137),e=v(F.Sun,s,t,!0,!0),a=(e.ra-Y(s))*15*r.DEG,i=e.dec*r.DEG;return[Math.cos(i)*Math.cos(a),Math.cos(i)*Math.sin(a),Math.sin(i)]}static puffsAt(s,t){const e=[];for(const a of s){let i=r.paths.get(a);i||r.paths.set(a,i=new Map);for(const o of r.releasesOf(a)){const n=Math.min(o.untilT,t);if(n<=o.fromT)continue;const p=Math.max(r.PUFF_EVERY_S*1e3,(o.untilT-o.fromT)/r.MAX_PUFFS),d=[];for(let M=o.fromT;M<n;M+=p)d.push(M);d.push(n);const R=o.massKgPerS*(p/1e3),m=3*r.extinctionEfficiency(o.particleRadiusUm,r.WAVELENGTHS_UM[1])/(4*917*o.particleRadiusUm*1e-6),T=r.scatteringColour(o.particleRadiusUm);o.populations.forEach((M,x)=>{if(M.share<=0)return;const U=E=>o.initialRadiusKm+M.expansionKmPerS*E,I=[];for(const E of d){const D=(t-E)/1e3;if(D>M.lifetimeS)continue;const c=E!==n||n===o.untilT,f=`${o.key}|${x}|${E}`;let A=c?i.get(f):void 0;if(!A){if(A=r.launchPuff(a,o,E,R*M.share,U),!A)continue;c&&i.set(f,A)}I.push({ageS:D,position:A.at(D)})}for(let E=I.length-1;E>=0;E--){const{ageS:D,position:c}=I[E],f=I[E-1]??I[E+1],A=f?Math.hypot(c[0]-f.position[0],c[1]-f.position[1],c[2]-f.position[2]):0,l=U(D)+A/2,O=r.SIGMA_OF_RADIUS*l*1e3,N=R*o.condensedShare*M.share*m/(2*Math.PI*O*O),y=Math.max(0,1-(D/M.lifetimeS)**2);N*y<=0||e.push({launchId:a.id,release:o.key,at:r.geoPoint(c),radiusKm:l,opticalDepth:N*y,colour:T,ageS:D})}})}}return e}static viewsAt(s,t,e,a){const i=[];for(const o of r.puffsAt(s,t)){const n=H.seenFrom(e,o.at);if(n.altitudeDeg<0)continue;const p=r.sunlightAt(o.at,a);if(p.lit<=0)continue;const d=r.scatteringPhase(e,o.at,a),R=r.SUN_ILLUMINANCE_LUX*r.ALBEDO*d*o.opticalDepth*p.lit;R<=0||i.push({launchId:o.launchId,release:o.release,heightKm:o.at.heightM/1e3,centre:n,radiusDeg:Math.atan2(o.radiusKm,n.distanceKm)/r.DEG,luminanceCdM2:R,sunTransmittance:p.transmittance,colour:o.colour,lit:p.lit,ageS:o.ageS})}return i}static launchPuff(s,t,e,a,i){const o={id:s.id,track:s.track,fragments:[]},n=H.leadAt(o,e);if(!n)return;const p=s.track[0].t,d=s.track[s.track.length-1].t,R=Math.max(p,e-500),h=Math.min(d,e+500),m=r.earthCentred(n),T=r.earthCentred(H.leadAt(o,R)),M=r.earthCentred(H.leadAt(o,h)),x=Math.max(.001,(h-R)/1e3),U=[0,1,2].map(S=>(M[S]-T[S])/x),I=r.EARTH_ROTATION,E=[U[0]-I*m[1],U[1]+I*m[0],U[2]],D=S=>{const b=Math.hypot(S[0],S[1],S[2])||1;return S.map(w=>w/b)},c=D(E),f=D(m),A=f[0]*c[0]+f[1]*c[1]+f[2]*c[2];let l=[f[0]-A*c[0],f[1]-A*c[1],f[2]-A*c[2]];Math.hypot(l[0],l[1],l[2])<1e-6&&(l=[-c[2]*c[0],-c[2]*c[1],1-c[2]*c[2]]),l=D(l);const O=[c[1]*l[2]-c[2]*l[1],c[2]*l[0]-c[0]*l[2],c[0]*l[1]-c[1]*l[0]],N=t.spinPeriodS?360*((e-t.fromT)/1e3)/t.spinPeriodS:0,y=(t.azimuthDeg+N)*r.DEG,G=t.angleDeg*r.DEG,C=[0,1,2].map(S=>-c[S]*Math.cos(G)+Math.sin(G)*(Math.cos(y)*l[S]+Math.sin(y)*O[S])),P=[0,1,2].map(S=>U[S]+t.speedKmPerS*C[S]);return new _(m,P,a,i,t.particleRadiusUm)}static geoPoint(s){const t=Math.hypot(s[0],s[1],s[2]);return{lat:Math.asin(s[2]/t)/r.DEG,lng:Math.atan2(s[1],s[0])/r.DEG,heightM:(t-K.EARTH_RADIUS_KM)*1e3}}static sunlightAt(s,t){const e=r.earthCentred(s),a=e[0]*t[0]+e[1]*t[1]+e[2]*t[2];if(a>=0)return{lit:1,transmittance:[1,1,1]};const i=Math.hypot(e[0]-a*t[0],e[1]-a*t[1],e[2]-a*t[2]),o=r.PENUMBRA_KM,n=Math.min(1,Math.max(0,(i-(r.SHADOW_RADIUS_KM-o/2))/o));if(n<=0)return{lit:0,transmittance:[0,0,0]};const p=Math.max(0,(i-r.EARTH_RADIUS_KM)*1e3),d=Math.exp(-p/r.SCALE_HEIGHT_M),R=Math.sqrt(2*Math.PI*r.EARTH_RADIUS_KM*1e3*r.SCALE_HEIGHT_M),h=Math.exp(-(((p/1e3-25)/15)**2)),m=[0,1,2].map(T=>Math.exp(-r.RAYLEIGH_PER_M[T]*d*R-r.OZONE_GRAZING_DEPTH[T]*h));return{lit:n,transmittance:m}}static scatteringPhase(s,t,e){const a=r.earthCentred(s),i=r.earthCentred(t),o=[a[0]-i[0],a[1]-i[1],a[2]-i[2]],n=Math.hypot(o[0],o[1],o[2])||1,p=-(o[0]*e[0]+o[1]*e[1]+o[2]*e[2])/n,d=r.ANISOTROPY;return(1-d*d)/(4*Math.PI*(1+d*d-2*d*p)**1.5)}static earthCentred(s){const t=s.lat*r.DEG,e=s.lng*r.DEG,a=r.EARTH_RADIUS_KM+s.heightM/1e3;return[a*Math.cos(t)*Math.cos(e),a*Math.cos(t)*Math.sin(e),a*Math.sin(t)]}}export{r as L};
|
package/dist-embed-sighting-editor/{LaunchSimulation-C_OJQoKC.js → LaunchSimulation-g-ETWhEH.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{L as M}from"./LaunchPlume-
|
|
1
|
+
import{L as M}from"./LaunchPlume-BmPMeGMN.js";import{a$ as T,bk as z,bl as f,b2 as C,bs as w,bt as A}from"./rr0-sighting-editor.mjs";class n{static RADIUS=840;static MAX_PUFFS=1e3;static RINGS=[0,.25,.5,.75,1,1.25];static COLUMN=n.RINGS.map(t=>{const i=o=>Math.exp(-((o/M.SIGMA_OF_RADIUS)**2)/2),s=i(n.RINGS[n.RINGS.length-1]);return Math.max(0,(i(t)-s)/(1-s))});static SECTORS=12;static VERTICES_PER_PUFF=n.SECTORS*(3+6*(n.RINGS.length-2));static BRIGHTEST_RELATIVE=6e4;object=new T;mesh;positions=new Float32Array(n.MAX_PUFFS*n.VERTICES_PER_PUFF*3);colors=new Float32Array(n.MAX_PUFFS*n.VERTICES_PER_PUFF*3);shown=0;drawn=[];static VISIBLE_CONTRAST=.1;constructor(){this.object.name="plumes";const t=new z;t.setAttribute("position",new f(this.positions,3)),t.setAttribute("color",new f(this.colors,3)),t.setDrawRange(0,0),this.mesh=new C(t,w.material()),this.mesh.frustumCulled=!1,w.track(this.mesh),this.object.add(this.mesh)}get count(){return this.shown}set(t,i,s,o){let h=0,c=0;this.drawn=[];for(const p of t){if(c>=n.MAX_PUFFS)break;const d=o(p.centre);if(d<=0)continue;const a=s(p.centre),r=[0,1,2].map(g=>Math.min(n.BRIGHTEST_RELATIVE,p.luminanceCdM2*(p.colour?.[g]??1)*i*p.sunTransmittance[g]*a[g]*d));Math.max(...r)<=0||(h=this.pushPuff(h,p,r),this.drawn.push({view:p,direction:this.normalise(A(p.centre.altitudeDeg,p.centre.azimuthDeg,1)),radiusRad:p.radiusDeg*Math.PI/180,luminance:.2126*r[0]+.7152*r[1]+.0722*r[2]}),c++)}this.shown=c;const u=this.mesh.geometry;u.setDrawRange(0,h),u.getAttribute("position").needsUpdate=!0,u.getAttribute("color").needsUpdate=!0}pushPuff(t,i,s){const o=A(i.centre.altitudeDeg,i.centre.azimuthDeg,n.RADIUS),h=this.normalise(o),c=this.normalise(this.cross({x:0,y:1,z:0},h)),u=this.cross(h,c),p=n.RADIUS*Math.tan(i.radiusDeg*Math.PI/180),d=(r,g)=>{const e=g/n.SECTORS*2*Math.PI,I=n.RINGS[r]*p,R=Math.cos(e)*I,l=Math.sin(e)*I;return{x:o.x+c.x*R+u.x*l,y:o.y+c.y*R+u.y*l,z:o.z+c.z*R+u.z*l}},a=r=>n.COLUMN[r];for(let r=0;r<n.SECTORS;r++){const g=(r+1)%n.SECTORS;t=this.push(t,o,s,a(0)),t=this.push(t,d(1,r),s,a(1)),t=this.push(t,d(1,g),s,a(1));for(let e=1;e<n.RINGS.length-1;e++){const I=d(e,r),R=d(e,g),l=d(e+1,r),E=d(e+1,g);t=this.push(t,I,s,a(e)),t=this.push(t,R,s,a(e)),t=this.push(t,l,s,a(e+1)),t=this.push(t,R,s,a(e)),t=this.push(t,E,s,a(e+1)),t=this.push(t,l,s,a(e+1))}}return t}pickAt(t,i,s=0){const o=this.normalise(t);let h=0,c;for(const u of this.drawn){const p=Math.max(-1,Math.min(1,o.x*u.direction.x+o.y*u.direction.y+o.z*u.direction.z)),d=Math.max(0,Math.acos(p)-i)/Math.max(u.radiusRad,1e-9),a=u.luminance*n.profile(d);a<=0||(h+=a,(!c||a>c.light)&&(c={view:u.view,light:a}))}return c&&h>=n.VISIBLE_CONTRAST*s?c.view:void 0}static profile(t){const i=n.RINGS;if(t>=i[i.length-1])return 0;let s=0;for(;t>i[s+1];)s++;const o=(t-i[s])/(i[s+1]-i[s]);return n.COLUMN[s]+(n.COLUMN[s+1]-n.COLUMN[s])*o}push(t,i,s,o){const h=t*3;return this.positions[h]=i.x,this.positions[h+1]=i.y,this.positions[h+2]=i.z,this.colors[h]=s[0]*o,this.colors[h+1]=s[1]*o,this.colors[h+2]=s[2]*o,t+1}cross(t,i){return this.normalise({x:t.y*i.z-t.z*i.y,y:t.z*i.x-t.x*i.z,z:t.x*i.y-t.y*i.x})}normalise(t){const i=Math.hypot(t.x,t.y,t.z)||1;return{x:t.x/i,y:t.y/i,z:t.z/i}}dispose(){this.mesh.geometry.dispose(),this.mesh.material.dispose(),this.object.removeFromParent()}}class U{inSky=!0;plumes=new n;get object(){return this.plumes.object}get drawnCount(){return this.plumes.count}update(t,i,s){const o=t.length===0||!s.date?[]:M.viewsAt(t,i,s.observer,M.sunDirectionAt(s.date));o.length===0&&this.plumes.count===0||this.plumes.set(o,s.relativeScale,h=>s.transmittanceFromSpace(h),h=>s.cloudTransmission(h))}pick(t,i,s){const o=this.plumes.pickAt(i,s.toleranceRad,s.skyLightTowards(i));return o&&{id:o.launchId,detail:o}}dispose(){this.plumes.dispose()}}export{U as LaunchSimulation};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a$ as d,b0 as c,b1 as l,b2 as f,b3 as m,b4 as u,b5 as b,b6 as w,b7 as g,b8 as y,b9 as M,ba as S,V as v}from"./rr0-sighting-editor.mjs";class h{static key(e){return"url"in e?`url:${e.url}|${e.headingOffsetDeg??0}`:"shape"in e?`shape:${e.shape}`:`decor:${e.decorKind}`}static async build(e){const s=new d;if("url"in e){const a=await c(e.url);a.rotation.y=-(e.headingOffsetDeg??0)*Math.PI/180,s.add(a)}else"shape"in e?s.add(h.shapeOf(e.shape)):s.add(l.build({id:"preview",kind:e.decorKind,eastM:0,northM:0},!1));return s}static shapeOf(e){if(e==="figure")return l.build({id:"preview",kind:"entity",eastM:0,northM:0},!1);const s=new f(m.unitGeometry(e),new u({color:13158608,roughness:.5,metalness:0}));return e==="ellipsoid"&&s.scale.set(1,.55,1),s}static dispose(e){e.traverse(s=>{const a=s;if(a.isMesh){a.geometry?.dispose();for(const t of[a.material].flat())t.dispose()}})}static stage(e,s){const a=new b().setFromObject(e);if(a.isEmpty())return;const t=a.getBoundingSphere(new w),r=new d;e.position.sub(t.center),r.add(e);const n=new g;n.add(r),n.add(new y(16777215,6715272,1.6));const o=new M(16777215,2.5);o.position.set(1,2,1.5),n.add(o);const i=new S(30,s,t.radius*.05,t.radius*20),p=t.radius/Math.sin(i.fov*Math.PI/360)*1.05;return i.position.copy(new v(.55,.3,-.78).normalize().multiplyScalar(p)),i.lookAt(0,0,0),{scene:n,camera:i,pivot:r}}}export{h as M};
|
package/dist-embed-sighting-editor/{ModelThumbnails-C_8KCF7H.js → ModelThumbnails-TwG1snwZ.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a_ as c}from"./rr0-sighting-editor.mjs";import{M as i}from"./ModelSource-DOUnBBhu.js";class l{static SIZE_PX={width:192,height:144};static cache=new Map;static queue=Promise.resolve();static pending=0;static renderer;static of(r){const t=i.key(r);let e=this.cache.get(t);return e||(this.pending++,e=this.queue.then(()=>this.draw(r)).catch(()=>{}).finally(()=>{--this.pending===0&&this.release()}),this.queue=e,this.cache.set(t,e)),e}static async draw(r){const t=await i.build(r);try{const{width:e,height:n}=this.SIZE_PX,a=i.stage(t,e/n);if(!a)return;const s=this.renderer??=new c({antialias:!0,alpha:!0,preserveDrawingBuffer:!0});return s.setSize(e,n,!1),s.setClearColor(0,0),s.render(a.scene,a.camera),s.domElement.toDataURL("image/png")}finally{i.dispose(t)}}static release(){this.renderer?.dispose(),this.renderer?.forceContextLoss(),this.renderer=void 0}}export{l as ModelThumbnails};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a_ as h}from"./rr0-sighting-editor.mjs";import{M as c}from"./ModelSource-DOUnBBhu.js";class a{constructor(t,e){this.container=t,this.source=e,this.canvas=document.createElement("canvas"),this.canvas.className="model-live",this.canvas.style.cssText="position:absolute;inset:0;width:100%;height:100%;touch-action:none;cursor:grab;display:none",this.canvas.addEventListener("pointerdown",s=>this.press(s)),this.canvas.addEventListener("pointermove",s=>this.move(s)),this.canvas.addEventListener("pointerup",()=>this.release()),this.canvas.addEventListener("pointercancel",()=>this.release())}static renderer;static SPIN_RAD_PER_S=.7;static DRAG_RAD_PER_PX=.012;static CLICK_TOLERANCE_PX=4;static current;object;stage;frame=0;stopped=!1;last=0;dragging;draggedPastClick=!1;canvas;static show(t,e){a.current?.stop();const s=new a(t,e);return a.current=s,s.start(),s}static end(){a.current?.stop(),a.current=void 0,a.renderer?.dispose(),a.renderer?.forceContextLoss(),a.renderer=void 0}consumeDrag(){const t=this.draggedPastClick;return this.draggedPastClick=!1,t}get active(){return!this.stopped}stop(){this.stopped=!0,cancelAnimationFrame(this.frame),this.canvas.remove(),this.object&&c.dispose(this.object),this.object=void 0,a.current===this&&(a.current=void 0)}async start(){try{const t=await c.build(this.source);if(this.stopped){c.dispose(t);return}this.object=t;const{width:e,height:s}=this.container.getBoundingClientRect(),i=e>0&&s>0?e/s:4/3;if(this.stage=c.stage(t,i),!this.stage)return;(a.renderer??=new h({antialias:!0,alpha:!0})).setClearColor(0,0),this.container.append(this.canvas),this.canvas.style.display="block",this.last=performance.now(),this.tick()}catch{}}tick=()=>{if(this.stopped||!this.stage)return;const t=performance.now(),e=Math.min(.1,(t-this.last)/1e3);this.last=t,this.dragging||(this.stage.pivot.rotation.y+=a.SPIN_RAD_PER_S*e);const s=a.renderer,{width:i,height:n}=this.canvas.getBoundingClientRect(),r=Math.min(2,window.devicePixelRatio||1);(this.canvas.width!==Math.round(i*r)||this.canvas.height!==Math.round(n*r))&&(s.setPixelRatio(r),s.setSize(i,n,!1),this.canvas.width=Math.round(i*r),this.canvas.height=Math.round(n*r),this.stage.camera.aspect=i/Math.max(1,n),this.stage.camera.updateProjectionMatrix()),s.render(this.stage.scene,this.stage.camera);const o=this.canvas.getContext("2d");o?.clearRect(0,0,this.canvas.width,this.canvas.height),o?.drawImage(s.domElement,0,0,this.canvas.width,this.canvas.height),this.frame=requestAnimationFrame(this.tick)};press(t){this.dragging={x:t.clientX,y:t.clientY,moved:!1},this.canvas.setPointerCapture(t.pointerId),this.canvas.style.cursor="grabbing"}move(t){const e=this.dragging;if(!e||!this.stage)return;const s=t.clientX-e.x,i=t.clientY-e.y;!e.moved&&Math.hypot(s,i)<a.CLICK_TOLERANCE_PX||(e.moved=!0,this.draggedPastClick=!0,this.stage.pivot.rotation.y+=s*a.DRAG_RAD_PER_PX,this.stage.pivot.rotation.x=Math.max(-1.4,Math.min(1.4,this.stage.pivot.rotation.x-i*a.DRAG_RAD_PER_PX)),e.x=t.clientX,e.y=t.clientY)}release(){this.dragging=void 0,this.canvas.style.cursor="grab"}}export{a as ModelViewer};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ModuleThree-DQ2dT7XW.js","./rr0-sighting-editor.mjs"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as w}from"./rr0-sighting-editor.mjs";class n{static MEMBERS={weather:["getWeather"],place:["attribution","search","reverse"],timeZone:["zoneAt"],narrative:["settings","draft"],assessment:["assess"],lightPollution:["year","citation","lookUp"],aircraft:["citation","between"],upperAir:["between"],elevation:["getElevationGrid"],imagery:["attribution","getImageryTexture"],surroundings:["id","name","attribution","creditUrl","contemporary","covers","getSurroundings"],decorModels:["attribution","entries","entry"],skyEvents:["key","messages","simulation"],interpretations:["key","messages","compute"],perception:["id","messages","sources","settings","perceive"],transcription:["sendsAudio","engine","transcribe"],reentryTypes:["key","nature","messages","template"],orientation:["engine","exportCase","readResults"],sealed:["recipient","open"]};static WEATHER_SHARES=["cloudCover","cloudDarkness","precipitationIntensity","highCloudCover","lowerCloudCover","iceCrystalAlignment","rareIceCrystals","relativeHumidity"];static WEATHER_REQUIRED=["cloudCover","cloudDarkness","precipitationIntensity"];static PRECIPITATIONS=["none","rain","snow","hail"];static HIGH_WIND_MS=60;static TIMEOUT_MS=3e4;static async check(i,a={}){const r=[];i.hasScript&&!i.scriptRun&&r.push({level:"note",code:"scriptNotRun"});for(const[e,s]of Object.entries(i.module.contributes))Object.hasOwn(n.MEMBERS,e)?Array.isArray(s)?await n.checkPoint(e,s,a,r):r.push({level:"failed",code:"notAList",point:e}):r.push({level:"failed",code:"unknownPoint",point:e});return r}static async checkPoint(i,a,r,e){const s=new Set;for(const t of a){const c=(l,d,g="failed")=>{e.push({level:g,code:l,point:i,source:typeof t?.id=="string"?t.id:void 0,detail:d})};if(s.has(t?.id)&&c("duplicateId"),s.add(t?.id),n.checkEntry(t,c),typeof t?.create!="function"){c("createMissing");continue}const o=n.build(t,c);if(o===void 0)continue;const h=n.MEMBERS[i].filter(l=>o[l]===void 0);for(const l of h)c("missingMember",l);h.length>0||(i==="weather"&&await n.checkWeather(t.id,o,r,c),i==="skyEvents"&&await n.checkSkyEventKind(t.id,o,r,c),i==="interpretations"&&await n.checkInterpretationKind(t.id,o,r,c))}}static checkEntry(i,a){for(const r of["id","name","credit","creditUrl"]){const e=i?.[r];(typeof e!="string"||e.trim()==="")&&a("entryField",r)}typeof i?.creditUrl=="string"&&i.creditUrl!==""&&!URL.canParse(i.creditUrl)&&a("entryField","creditUrl")}static build(i,a){let r=!1;const e=(async()=>(r=!0,new Response("",{status:503}))),s=globalThis.fetch;globalThis.fetch=e;try{const t=i.create(e);if(r&&a("createAsked"),t==null){a("createEmpty");return}return t}catch(t){a("createThrew",n.told(t));return}finally{globalThis.fetch=s}}static async checkWeather(i,a,r,e){const s=r.weatherQuery;if(!s){e("weatherNotAsked",void 0,"note");return}let t;try{t=await n.within(a.getWeather(s),r)}catch(l){e("weatherThrew",n.told(l));return}if(t===void 0){e("weatherNoRecord",void 0,"note");return}const c=t?.samples;if(!Array.isArray(c)||c.length!==s.points.length){e("weatherSamples",`${Array.isArray(c)?c.length:0}/${s.points.length}`);return}c.some((l,d)=>l?.time?.getTime?.()!==s.points[d].time.getTime())&&e("weatherOrder");const o=new Set;let h=!1;for(const l of c){const d=l?.weather??{};for(const g of n.WEATHER_SHARES){const p=d[g],u=n.WEATHER_REQUIRED.includes(g);(p!==void 0||u)&&!n.between(p,0,1)&&o.add(`${g} = ${String(p)}`)}n.between(d.windDirectionDeg,0,360)||o.add(`windDirectionDeg = ${String(d.windDirectionDeg)}`),n.between(d.windSpeed,0,1/0)?d.windSpeed>n.HIGH_WIND_MS&&(h=!0):o.add(`windSpeed = ${String(d.windSpeed)}`),n.PRECIPITATIONS.includes(d.precipitationType)||o.add(`precipitationType = ${String(d.precipitationType)}`),typeof d.storm!="boolean"&&o.add(`storm = ${String(d.storm)}`)}for(const l of o)e("weatherValue",l);h&&e("weatherWindHigh",void 0,"note"),t.source?.id!==i&&e("weatherSource","id"),(typeof t.source?.name!="string"||t.source.name==="")&&e("weatherSource","name"),(typeof t.source?.url!="string"||t.source.url==="")&&e("weatherSource","url")}static async checkSkyEventKind(i,a,r,e){a.key!==i&&e("kindKey",String(a.key)),await n.checkTexts(a.messages,["title","name"],r,e);let s;try{s=(await n.within(a.simulation(),r))()}catch(o){e("simulationFailed",n.told(o));return}const{MODULE_THREE:t}=await w(async()=>{const{MODULE_THREE:o}=await import("./ModuleThree-DQ2dT7XW.js");return{MODULE_THREE:o}},__vite__mapDeps([0,1]),import.meta.url);if(!(s?.object instanceof t.Object3D)){e("secondThree");return}try{s.update([],0,n.frame(new t.Vector3)),s.drawnCount!==0&&e("drawnWithoutEvents",String(s.drawnCount))}catch(o){e("updateThrew",n.told(o))}const c=new t.Group;c.add(s.object);try{s.dispose(),s.object.parent===c&&e("disposeLeft")}catch(o){e("disposeThrew",n.told(o))}}static async checkInterpretationKind(i,a,r,e){a.key!==i&&e("kindKey",String(a.key)),await n.checkTexts(a.messages,["title"],r,e);const s=r.interpretation?.[a.key];if(!Array.isArray(s)||s.length===0){e("readingNotTried",void 0,"note");return}let t;try{if(t=await n.within(a.compute(),r),typeof t!="function"){e("readingThrew","compute");return}}catch(c){e("readingThrew",n.told(c));return}for(const c of s)try{const o=t(c);Array.isArray(o)||e("readingNotAList")}catch(o){e("readingThrew",n.told(o))}}static async checkTexts(i,a,r,e){for(const s of["en","fr"])try{const t=await n.within(i.load(s),r);for(const c of a)(typeof t?.[c]!="string"||t[c]==="")&&e("kindMessages",`${s}: ${c}`)}catch(t){e("kindMessages",`${s}: ${n.told(t)}`)}}static frame(i){return{reference:{lat:0,lng:0},origin:{x:0,z:0},eastScale:1,siteElevationM:0,eye:i,pixelRad:.001,relativeScale:1,air:{},transmittanceTo:()=>[1,1,1],groundYAt:()=>0,wind:{eastMS:0,northMS:0},observer:{lat:0,lng:0,heightM:0},date:new Date(0),magnitudeLimit:6,cloudTransmission:()=>1,arrivingIlluminance:()=>[0,0,0],transmittanceFromSpace:()=>[1,1,1],lightFrom:()=>{},glareFrom:()=>{}}}static between(i,a,r){return typeof i=="number"&&!Number.isNaN(i)&&i>=a&&i<=r}static told(i){return i instanceof Error?i.message:String(i)}static within(i,a){const r=a.timeoutMs??n.TIMEOUT_MS;let e;const s=new Promise((t,c)=>{e=setTimeout(()=>c(new Error(`> ${r/1e3} s`)),r)});return Promise.race([i,s]).finally(()=>clearTimeout(e))}}export{n as ModuleConformance};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ModuleThree-DQ2dT7XW.js","./rr0-sighting-editor.mjs"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{L as g,N as w,_ as b,M as p}from"./rr0-sighting-editor.mjs";class o{static STORAGE_KEY="ufoathome.modules";static FORMAT=1;static empty(){return{format:1,modules:[]}}static read(t=o.storage()){try{const e=t?.getItem(o.STORAGE_KEY);return e?o.parse(e):o.empty()}catch{return o.empty()}}static write(t,e=o.storage()){try{return e?(t.modules.length===0?e.removeItem(o.STORAGE_KEY):e.setItem(o.STORAGE_KEY,o.text(t)),!0):!1}catch{return!1}}static parse(t){const e=JSON.parse(t);if(e===null||typeof e!="object"||!Array.isArray(e.modules))throw new Error("not a UFO@home module list");if(typeof e.format=="number"&&e.format>o.FORMAT)throw new Error(`format ${e.format} is newer than ${o.FORMAT}`);const s=new Set,i=[];for(const r of e.modules)typeof r?.url!="string"||s.has(r.url)||(s.add(r.url),i.push({url:r.url,enabled:r.enabled!==!1}));return{format:1,modules:i}}static text(t){return JSON.stringify({format:o.FORMAT,modules:t.modules},null,2)+`
|
|
3
|
+
`}static storage(){try{return typeof localStorage>"u"?void 0:localStorage}catch{return}}}class E{constructor(t,e){this.attribution=t,this.models=e}async entries(t){return t?this.models.filter(e=>[e.kind].flat().includes(t)):[...this.models]}async entry(t){return this.models.find(e=>e.id===t)}}class f{attribution;fetchImpl;tileUrlTemplate;constructor(t){this.attribution=t.attribution,this.tileUrlTemplate=t.tileUrlTemplate,this.fetchImpl=t.fetchImpl??fetch.bind(globalThis)}getImageryTexture(t,e){return g(t,e,s=>f.tileUrl(this.tileUrlTemplate,s),this.fetchImpl)}static tileUrl(t,e){return t.replaceAll("{z}",String(e.z)).replaceAll("{x}",String(e.x)).replaceAll("{y}",String(e.y))}}class v extends Error{constructor(t,e){super(`${t}: ${e}`),this.url=t,this.reason=e,this.name="ModuleManifestError"}}class d{static FORMAT=1;static check(t,e){const s=n=>{throw new v(e,n)};(t===null||typeof t!="object"||Array.isArray(t))&&s("not a JSON object");const i=t;typeof i.format!="number"&&s('no "format"'),i.format>d.FORMAT&&s(`format ${i.format} is newer than ${d.FORMAT}, which this version reads`),(typeof i.id!="string"||!/^[a-z0-9][a-z0-9._-]*$/.test(i.id))&&s(`"id" must be lowercase letters, digits, '.', '_' or '-'`),(typeof i.name!="string"||i.name.trim()==="")&&s('no "name"'),i.script!==void 0&&typeof i.script!="string"&&s('"script" must be an address');const r=i.contributes??{};for(const n of["imagery","elevation"]){const c=r[n];c!==void 0&&(Array.isArray(c)||s(`"contributes.${n}" must be a list`),c.forEach((l,m)=>{for(const h of["id","name","credit","creditUrl","tiles"])(typeof l?.[h]!="string"||l[h]==="")&&s(`"contributes.${n}[${m}].${h}" is missing`);["{z}","{x}","{y}"].every(h=>l.tiles.includes(h))||s(`"contributes.${n}[${m}].tiles" must hold {z}, {x} and {y}`)}))}const a=r.models;return a!==void 0&&(Array.isArray(a)||s('"contributes.models" must be a list'),a.forEach((n,c)=>{for(const l of["id","name","file"])(typeof n?.[l]!="string"||n[l]==="")&&s(`"contributes.models[${c}].${l}" is missing`);n.kind===void 0&&s(`"contributes.models[${c}].kind" is missing`),(!n.credit||typeof n.credit!="object")&&s(`"contributes.models[${c}].credit" is missing: a model is shown with its author and licence`)})),i}static contributions(t,e){const s=t.contributes??{},i={};if(s.imagery?.length&&(i.imagery=s.imagery.map(r=>({id:r.id,name:r.name,credit:r.credit,creditUrl:r.creditUrl,create:a=>new f({tileUrlTemplate:d.absoluteTemplate(r.tiles,e),attribution:r.credit,fetchImpl:a})}))),s.elevation?.length&&(i.elevation=s.elevation.map(r=>({id:r.id,name:r.name,credit:r.credit,creditUrl:r.creditUrl,create:a=>new w({tileUrlTemplate:d.absoluteTemplate(r.tiles,e),fetchImpl:a})}))),s.models?.length){const r=s.models.map(({file:n,...c})=>({...c,url:new URL(n,e).href})),a=t.credit??t.name;i.decorModels=[{id:`${t.id}-models`,name:t.name,credit:a,creditUrl:t.creditUrl??e,create:()=>new E(a,r)}]}return i}static module(t,e,s={}){const i=d.contributions(t,e);for(const[r,a]of Object.entries(s))Array.isArray(a)&&(i[r]=[...i[r]??[],...a]);return{id:t.id,name:t.name,credit:t.credit,creditUrl:t.creditUrl,url:e,contributes:i}}static absoluteTemplate(t,e){const s=t.replaceAll("{z}","__Z__").replaceAll("{x}","__X__").replaceAll("{y}","__Y__");return new URL(s,e).href.replaceAll("__Z__","{z}").replaceAll("__X__","{x}").replaceAll("__Y__","{y}")}}class T{fetchImpl;importImpl;constructor(t={}){this.fetchImpl=t.fetchImpl??fetch.bind(globalThis),this.importImpl=t.importImpl??(e=>import(e))}async load(t,e){const s=await this.fetchImpl(t);if(!s.ok)throw new Error(`${t}: HTTP ${s.status}`);const i=d.check(await s.json(),t),r=i.script!==void 0;let a={};if(r&&e.runScript){const n=new URL(i.script,t).href,c=await this.importImpl(n);if(typeof c.default!="function")throw new Error(`${n}: its default export is not a function`);const{MODULE_THREE:l}=await b(async()=>{const{MODULE_THREE:m}=await import("./ModuleThree-DQ2dT7XW.js");return{MODULE_THREE:m}},__vite__mapDeps([0,1]),import.meta.url);a=await c.default({manifestUrl:t,three:l})??{}}return{url:t,manifest:i,module:d.module(i,t,a),hasScript:r,scriptRun:r&&e.runScript}}}class y{constructor(t=new T,e){this.loader=t,this.storage=e}static shared=new y;changes=new EventTarget;states=new Map;config=o.empty();started;list(){const t=[...this.states.values()];return[...t.filter(e=>e.addedByPerson),...t.filter(e=>!e.addedByPerson)]}state(t){return this.states.get(t)}start(){return this.started??=this.applyConfig(o.read(this.storage)),this.started}async add(t){await this.start();const e=new URL(t,typeof location>"u"?void 0:location.href).href;return this.config.modules.some(s=>s.url===e)||(this.config={...this.config,modules:[...this.config.modules,{url:e,enabled:!0}]},this.save()),this.reload(e)}async remove(t){this.config={...this.config,modules:this.config.modules.filter(e=>e.url!==t)},this.save(),await this.reload(t)}async setEnabled(t,e){this.config={...this.config,modules:this.config.modules.map(s=>s.url===t?{...s,enabled:e}:s)},this.save(),await this.reload(t)}exportText(){return o.text(this.config)}async importText(t){const e=o.parse(t);await this.start();const s=this.config.modules.map(i=>i.url);this.config=e,this.save(),await Promise.all([...new Set([...s,...e.modules.map(i=>i.url)])].map(i=>this.reload(i)))}async require(t,e,s=!1){t?.length&&(await this.start(),await Promise.all(t.map(async i=>{let r;try{r=new URL(i,e??(typeof location>"u"?void 0:location.href)).href}catch{return}const a=this.states.get(r),n=s&&!this.trusted.has(r);if(s&&this.trusted.add(r),a&&a.status!=="off"&&!(n&&a.loaded&&!a.loaded.scriptRun))return a.status==="loading"?this.pending.get(r):void 0;this.named.add(r),await this.reload(r)})))}named=new Set;trusted=new Set;pending=new Map;async applyConfig(t){this.config=t,await Promise.all(t.modules.map(e=>this.reload(e.url)))}reload(t){const e=this.reloadNow(t);return this.pending.set(t,e),e}async reloadNow(t){const e=this.config.modules.find(a=>a.url===t),s=this.states.get(t);s?.loaded&&p.uninstall(s.loaded.module.id);const i=e!==void 0,r=e?.enabled??!0;if(!i&&!this.named.has(t))return this.states.delete(t),this.announce(),{url:t,addedByPerson:i,enabled:r,status:"off"};if(i&&!r&&!this.named.has(t))return this.set({url:t,addedByPerson:i,enabled:r,status:"off"});this.set({url:t,addedByPerson:i,enabled:r,status:"loading"});try{const a=await this.loader.load(t,{runScript:i&&r||!i&&this.trusted.has(t)});return p.install(a.module),this.set({url:t,addedByPerson:i,enabled:r,status:"installed",loaded:a})}catch(a){return this.set({url:t,addedByPerson:i,enabled:r,status:"failed",error:a instanceof Error?a.message:String(a)})}}set(t){return this.states.set(t.url,t),this.announce(),t}save(){o.write(this.config,this.storage)}announce(){this.changes.dispatchEvent(new Event("change"))}}export{y as ModuleSession};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{V as a,bZ as e,d7 as s,cf as t,ch as r,bN as i,bK as o,Z as n,ce as b,bz as c,cC as d,cu as l,X as u,d8 as m,b4 as M,bm as B,b2 as S,$ as f,cT as y,cQ as G,cU as h,a$ as p,d5 as L,c2 as g,Y as x,bn as C,d9 as T,da as D,db as E,bB as P,cg as A,bk as V,bl as k,dc as v,bL as F,bo as N}from"./rr0-sighting-editor.mjs";const Q={AdditiveBlending:N,BackSide:F,BoxGeometry:v,BufferAttribute:k,BufferGeometry:V,CanvasTexture:A,Color:P,ConeGeometry:E,CylinderGeometry:D,DataTexture:T,DoubleSide:C,Euler:x,Float32BufferAttribute:g,FrontSide:L,Group:p,Line:h,LineBasicMaterial:G,LineSegments:y,Matrix4:f,Mesh:S,MeshBasicMaterial:B,MeshStandardMaterial:M,NormalBlending:m,Object3D:u,PlaneGeometry:l,PointLight:d,Points:c,PointsMaterial:b,Quaternion:n,ShaderMaterial:o,SphereGeometry:i,Sprite:r,SpriteMaterial:t,TorusGeometry:s,Vector2:e,Vector3:a};export{Q as MODULE_THREE};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ModuleConformance-
|
|
2
|
-
import{
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ModuleConformance-CO1S9pa3.js","./rr0-sighting-editor.mjs"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{v as _,_ as x,c as y,K as L,f as m}from"./rr0-sighting-editor.mjs";import{ModuleSession as C}from"./ModuleSession-VLS0tjAb.js";const P=_.catalog({en:()=>x(()=>import("./ModulesPanelMessages_en-DuwrY3Pm.js"),[],import.meta.url).then(v=>v.modulesPanelMessages_en),fr:()=>x(()=>import("./ModulesPanelMessages_fr-B8cSDc6o.js"),[],import.meta.url).then(v=>v.modulesPanelMessages_fr),es:()=>x(()=>import("./ModulesPanelMessages_es-Bq5X-XuT.js"),[],import.meta.url).then(v=>v.modulesPanelMessages_es),it:()=>x(()=>import("./ModulesPanelMessages_it-BdC626aJ.js"),[],import.meta.url).then(v=>v.modulesPanelMessages_it)}),N="rr0-modules-panel",A=`
|
|
3
3
|
rr0-modules-panel { display: block; }
|
|
4
4
|
rr0-modules-panel .mp-add { display: flex; gap: .4em; align-items: center; margin: .4em 0; }
|
|
5
5
|
rr0-modules-panel .mp-add input { flex: 1 1 16em; min-width: 0; }
|
|
@@ -12,4 +12,4 @@ rr0-modules-panel .mp-head .mp-remove { margin-left: auto; }
|
|
|
12
12
|
rr0-modules-panel .mp-module p { margin: .2em 0; }
|
|
13
13
|
rr0-modules-panel .mp-findings { margin: .3em 0; padding-left: 1.2em; }
|
|
14
14
|
rr0-modules-panel .mp-files { display: flex; gap: .6em; flex-wrap: wrap; align-items: center; margin-top: .6em; }
|
|
15
|
-
`;class M extends HTMLElement{session=C.shared;messages;languageAsked=!1;named=[];recordingBase;note;languageToken=0;draft="";onChange=()=>this.render();checkContext;checks=new Map;set moduleSession(e){this.session.changes.removeEventListener("change",this.onChange),this.session=e,this.isConnected&&this.session.changes.addEventListener("change",this.onChange),this.render()}get recordingModules(){return[...this.named]}set recordingModules(e){this.named=[...e??[]],this.render()}set base(e){this.recordingBase=e,this.render()}async setLanguage(e){this.languageAsked=!0;const t=++this.languageToken,n=await P.load(e);t===this.languageToken&&(this.messages=n,this.render())}connectedCallback(){this.languageAsked||this.setLanguage(
|
|
15
|
+
`;class M extends HTMLElement{session=C.shared;messages;languageAsked=!1;named=[];recordingBase;note;languageToken=0;draft="";onChange=()=>this.render();checkContext;checks=new Map;set moduleSession(e){this.session.changes.removeEventListener("change",this.onChange),this.session=e,this.isConnected&&this.session.changes.addEventListener("change",this.onChange),this.render()}get recordingModules(){return[...this.named]}set recordingModules(e){this.named=[...e??[]],this.render()}set base(e){this.recordingBase=e,this.render()}async setLanguage(e){this.languageAsked=!0;const t=++this.languageToken,n=await P.load(e);t===this.languageToken&&(this.messages=n,this.render())}connectedCallback(){this.languageAsked||this.setLanguage(y.preferencesFor(this)[0]??"en"),this.session.changes.addEventListener("change",this.onChange),this.session.start(),this.render()}disconnectedCallback(){this.session.changes.removeEventListener("change",this.onChange)}absolute(e){try{return new URL(e,this.recordingBase??location.href).href}catch{return}}isNamed(e){return this.named.some(t=>this.absolute(t)===e)}setNamed(e,t){t!==this.isNamed(e)&&(this.named=t?[...this.named,L.of(e,this.recordingBase)]:this.named.filter(n=>this.absolute(n)!==e),t&&this.session.require([e]),this.dispatchEvent(new Event("recordingmoduleschange",{bubbles:!0})),this.render())}render(){const e=this.messages;if(!this.isConnected||!this.messages)return;const t=this.ownerDocument,n=t.createElement("style");n.textContent=A;const s=t.createElement("p");s.className=m.INFO,s.textContent=e.intro;const a=t.createElement("form");a.className="mp-add";const i=t.createElement("input");i.type="url",i.id="module-url",i.required=!0,i.placeholder=e.urlPlaceholder,i.value=this.draft,i.addEventListener("input",()=>{this.draft=i.value}),i.setAttribute("aria-label",e.urlPlaceholder);const u=t.createElement("button");u.type="submit",u.textContent=e.add,a.append(i,u),a.addEventListener("submit",r=>{r.preventDefault();const w=i.value.trim();w&&(this.draft="",this.session.add(w))});const l=t.createElement("p");l.className=m.WARNING,l.textContent=e.codeWarning;const c=this.session.list(),h=new Set(c.map(r=>r.url)),b=this.named.map(r=>this.absolute(r)).filter(r=>r!==void 0&&!h.has(r)),g=t.createElement("ul");g.className="mp-list",g.append(...c.map(r=>this.item(r)),...b.map(r=>this.item({url:r,addedByPerson:!1,enabled:!0,status:"loading"})));const k=t.createElement("p");k.className=m.INFO,k.textContent=e.none,k.hidden=g.childElementCount>0;const f=t.createElement("div");f.className="mp-files";const E=t.createElement("button");E.type="button",E.id="modules-export",E.textContent=e.exportConfig,E.disabled=!c.some(r=>r.addedByPerson),E.addEventListener("click",()=>this.download());const p=t.createElement("input");p.type="file",p.id="modules-import",p.accept="application/json,.json",p.hidden=!0;const o=t.createElement("button");o.type="button",o.textContent=e.importConfig,o.addEventListener("click",()=>p.click()),p.addEventListener("change",()=>{const r=p.files?.[0];r&&this.importFile(r),p.value=""}),f.append(E,o,p);const d=t.createElement("p");d.id="modules-note",d.setAttribute("role","status"),m.show(d,this.note?.text,this.note?.kind),this.replaceChildren(n,s,a,l,g,k,f,d)}item(e){const t=this.messages,n=this.ownerDocument,s=e.loaded,a=n.createElement("li");a.className="mp-module",a.dataset.url=e.url;const i=n.createElement("div");if(i.className="mp-head",e.addedByPerson){const o=n.createElement("label"),d=n.createElement("input");d.type="checkbox",d.className="mp-enabled",d.checked=e.enabled,d.addEventListener("change",()=>void this.session.setEnabled(e.url,d.checked)),o.append(d,n.createTextNode(` ${t.enabled}`)),i.append(o)}const u=n.createElement("span");u.className="mp-name",u.textContent=e.loaded?.module.name??e.url,i.append(u);const l=e.loaded?.module.credit;if(l){const o=n.createElement(e.loaded?.module.creditUrl?"a":"span");o.className=m.INFO,o.textContent=l,o instanceof HTMLAnchorElement&&(o.href=e.loaded.module.creditUrl,o.target="_blank",o.rel="noopener noreferrer"),i.append(o)}const c=n.createElement("button");if(c.type="button",c.className="mp-remove",e.addedByPerson?(c.textContent=t.remove,c.addEventListener("click",()=>void this.session.remove(e.url))):(c.textContent=t.addToMine,c.addEventListener("click",()=>void this.session.add(e.url))),e.status==="installed"&&s){const o=n.createElement("button");o.type="button",o.className="mp-check";const d=this.checks.get(e.url),r=d?.of===s&&d.findings===void 0&&d.crash===void 0;o.textContent=r?t.checking:t.check,o.disabled=r,o.addEventListener("click",()=>void this.check(e.url,s)),i.append(o)}i.append(c);const h=n.createElement("p");h.className=`${m.INFO} mp-url`,h.textContent=e.url;const b=n.createElement("p");b.className="mp-status",e.status==="loading"?m.show(b,t.loading):e.status==="failed"?m.show(b,t.failed.replace("{error}",e.error??""),"error"):e.status==="off"?m.show(b,t.off):m.show(b,this.brings(e));const g=n.createElement("p");g.className="mp-code",s?.scriptRun?m.show(g,t.runsCode,"warning"):s?.hasScript?m.show(g,t.codeNotRun,"info"):g.hidden=!0;const k=n.createElement("label");k.title=t.namedByRecordingHint;const f=n.createElement("input");f.type="checkbox",f.className="mp-named",f.checked=this.isNamed(e.url),f.addEventListener("change",()=>this.setNamed(e.url,f.checked)),k.append(f,n.createTextNode(` ${t.namedByRecording}`));const E=n.createElement("p");E.append(k),a.append(i,h,b,g,E);const p=this.checks.get(e.url);return p&&p.of===s&&a.append(...this.checkResult(p)),a}async check(e,t){const n={of:t};this.checks.set(e,n),this.render();try{const{ModuleConformance:s}=await x(async()=>{const{ModuleConformance:a}=await import("./ModuleConformance-CO1S9pa3.js");return{ModuleConformance:a}},__vite__mapDeps([0,1]),import.meta.url);n.findings=await s.check(t,this.checkContext?.())}catch(s){n.crash=s instanceof Error?s.message:String(s)}this.render()}checkResult(e){const t=this.messages,n=this.ownerDocument,s=(l,c)=>{const h=n.createElement("p");return h.className="mp-check-result",h.setAttribute("role","status"),m.show(h,l,c),h};if(e.crash!==void 0)return[s(t.checkCrashed.replace("{error}",()=>e.crash),"error")];if(!e.findings)return[];const a=e.findings.filter(l=>l.level==="failed"),i=e.findings.filter(l=>l.level==="note"),u=[];if(a.length===0&&u.push(s(t.checkPassed,"info")),a.length+i.length>0){const l=n.createElement("ul");l.className="mp-findings";for(const c of[...a,...i]){const h=n.createElement("li");m.show(h,this.finding(c),c.level==="failed"?"error":"info"),l.append(h)}u.push(l)}return u}finding(e){const t=this.messages,n=e.point===void 0?"":t.points[e.point]??e.point,s=t.checks[e.code].replace("{point}",()=>e.point??"").replace("{detail}",()=>e.detail??""),a=e.source??(e.code==="unknownPoint"||e.code==="notAList"?void 0:n);return a?t.checkAbout.replace("{about}",()=>a).replace("{text}",()=>s):s}brings(e){const t=Object.entries(e.loaded?.module.contributes??{}).filter(([,n])=>Array.isArray(n)&&n.length>0).map(([n,s])=>`${this.messages.points[n]??n} (${s.length})`);return t.length>0?this.messages.brings.replace("{points}",t.join(", ")):this.messages.bringsNothing}download(){const e=new Blob([this.session.exportText()],{type:"application/json"}),t=URL.createObjectURL(e),n=this.ownerDocument.createElement("a");n.href=t,n.download="ufoathome-modules.json",n.click(),URL.revokeObjectURL(t)}async importFile(e){try{await this.session.importText(await e.text());const t=this.session.list().filter(n=>n.addedByPerson).length;this.note={text:this.messages.imported.replace("{count}",String(t)),kind:"info"}}catch(t){this.note={text:this.messages.importFailed.replace("{error}",t instanceof Error?t.message:String(t)),kind:"error"}}this.render()}}function B(){customElements.get(N)||customElements.define(N,M)}export{N as MODULES_PANEL_ELEMENT_NAME,M as ModulesPanelElement,B as register};
|
package/dist-embed-sighting-editor/{NearestApproach-D6tQo7dk.js → NearestApproach-C_8Uvp6i.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{bU as b,t as h}from"./rr0-sighting-editor.mjs";class c{static FLAT={heightAt:()=>0};static of(e){const s=e.timeline.sourceIds.map(n=>b.of(e,n)?.nearestM).filter(n=>n!==void 0);return s.length>0?{m:Math.min(...s),basis:"derived",paths:["timeline","observerTrack"]}:c.interpreted(e)}static interpreted(e){const s=(e.interpretation?.bodies??[]).map((t,i)=>({body:t,index:i})).filter(({body:t})=>Array.isArray(t.track)),n=s.filter(({body:t})=>(t.explains?.length??0)>0),u=n.length>0?n:s,d=c.FLAT,l=t=>h.eyeOf(e,t,d);let o;const p=[];for(const{body:t,index:i}of u){const M=new h(t,d,l);for(const{t:f}of t.track){const r=M.at(f),a=l(f);if(!r||!a)continue;const m=Math.hypot(r.eastM-a.eastM,r.northM-a.northM,r.upM-a.upM);(o===void 0||m<o)&&(o=m)}p.push(`interpretation.bodies.${i}`)}return o===void 0?void 0:{m:o,basis:"assumed",paths:p}}}export{c as N};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{V as z,X as A,Y as O,Z as m,$ as F,a0 as w}from"./rr0-sighting-editor.mjs";const p=Math.PI/180,y=180/Math.PI;class Q{static localDirection(t,e,i,o=new z){const n=Math.tan(e/2*p);return o.set((t.u*2-1)*n*i,(1-t.v*2)*n,-1).normalize()}static picturePoint(t,e,i){if(t.z>=0)return;const o=Math.tan(e/2*p),n=t.x/-t.z/(o*i),s=t.y/-t.z/o;return{u:(n+1)/2,v:(1-s)/2}}static worldDirection(t,e=new z){const i=t.azimuthDeg*p,o=t.altitudeDeg*p;return e.set(Math.sin(i)*Math.cos(o),Math.sin(o),-Math.cos(i)*Math.cos(o))}static aimOf(t){const e=Math.hypot(t.x,t.z);return{azimuthDeg:(Math.atan2(t.x,-t.z)*y+360)%360,altitudeDeg:Math.atan2(t.y,e)*y}}static rotationOf(t){const e=new A;return e.rotation.set(t.pitchDeg*p,-t.headingDeg*p,-(t.rollDeg??0)*p,"YXZ"),e.quaternion.clone()}static anglesOf(t){const e=new O().setFromQuaternion(t,"YXZ"),i=(-e.y*y%360+360)%360,o=-e.z*y;return{headingDeg:i,pitchDeg:e.x*y,rollDeg:Math.abs(o)<1e-9?0:o}}static worldDirectionOf(t,e,i,o=new z){return this.localDirection(t,e.fovDeg,i,o).applyQuaternion(this.rotationOf(e))}static picturePointOf(t,e,i){const o=t.clone().applyQuaternion(this.rotationOf(e).invert()),n=this.picturePoint(o,e.fovDeg,i);if(!(!n||n.u<0||n.u>1||n.v<0||n.v>1))return n}static solve(t,e,i,o=t.length>=3){if(t.length<2)return;if(!o)return this.solveAtField(t,e,i);let n=1,s=179;const h=(Math.sqrt(5)-1)/2;let f=s-h*(s-n),c=n+h*(s-n),r=this.solveAtField(t,e,f),a=this.solveAtField(t,e,c);for(let l=0;l<60&&s-n>1e-4;l++){if(!r||!a)return;r.residualDeg<a.residualDeg?(s=c,c=f,a=r,f=s-h*(s-n),r=this.solveAtField(t,e,f)):(n=f,f=c,r=a,c=n+h*(s-n),a=this.solveAtField(t,e,c))}return r&&a?r.residualDeg<a.residualDeg?r:a:r??a}static solveAtField(t,e,i){const o=t.map(c=>this.localDirection(c.picture,i,e)),n=t.map(c=>this.worldDirection(c.scene)),s=this.triad(o,n);if(!s)return;const h=this.refine(s,o,n);return{registration:{...this.anglesOf(h),fovDeg:i},residualDeg:this.residualDeg(h,o,n)}}static triad(t,e){let i=0,o=1,n=-1;for(let r=0;r<t.length;r++)for(let a=r+1;a<t.length;a++){const g=t[r].clone().cross(t[a]).lengthSq();g>n&&(n=g,i=r,o=a)}if(n<1e-12)return;const s=(r,a)=>{const g=r.clone().normalize(),l=r.clone().cross(a).normalize(),u=l.clone().cross(g);return new w().set(g.x,u.x,l.x,g.y,u.y,l.y,g.z,u.z,l.z)},h=s(t[i],t[o]),c=s(e[i],e[o]).multiply(h.transpose());return new m().setFromRotationMatrix(new F().setFromMatrix3(c))}static refine(t,e,i){const o=t.clone(),n=new z;for(let s=0;s<20;s++){const h=new w().set(0,0,0,0,0,0,0,0,0),f=h.elements,c=new z;for(let l=0;l<e.length;l++){n.copy(e[l]).applyQuaternion(o);const u=n,d=[[0,u.z,-u.y],[-u.z,0,u.x],[u.y,-u.x,0]],M=[i[l].x-u.x,i[l].y-u.y,i[l].z-u.z];for(let D=0;D<3;D++){for(let v=0;v<3;v++)for(let x=0;x<3;x++)f[v*3+D]+=d[x][D]*d[x][v];c.setComponent(D,c.getComponent(D)+d[0][D]*M[0]+d[1][D]*M[1]+d[2][D]*M[2])}}for(let l=0;l<3;l++)f[l*3+l]+=1e-9;const r=c.applyMatrix3(h.invert()),a=r.length();if(a<1e-12)break;const g=new m().setFromAxisAngle(r.normalize(),a);if(o.premultiply(g).normalize(),a<1e-10)break}return o}static residualDeg(t,e,i){let o=0;const n=new z;for(let s=0;s<e.length;s++){n.copy(e[s]).applyQuaternion(t);const h=n.angleTo(i[s])*y;o+=h*h}return Math.sqrt(o/e.length)}}export{Q as PictureRegistration};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{bW as u}from"./rr0-sighting-editor.mjs";class o{about="shape";static STEP_DEG=2;static TURN_DEG=60;static ERRATIC_TURNS=3;static OSCILLATIONS=["vibrate","spiral","roll"];async assess(n){const t=this.trajectory(n),s=this.vanish(n),e=this.oscillation(n),a=this.landing(n),c=this.judged(n,"traces"),r=this.occupants(n),h=a.shown&&r.shown?5:a.shown&&c.shown?4:a.shown||t.value==="erratic"||s.shown||e.shown?3:t.value==="abnormal"?2:t.value==="straight"?1:0,i=[{id:"poher-trajectory",basis:t.basis,paths:t.paths,value:o.TRAJECTORIES.indexOf(t.value)},this.criterion("poher-vanish",s),this.criterion("poher-oscillation",e),{...this.criterion("poher-landing",a),unsupported:a.basis===void 0},this.criterion("poher-traces",c),this.criterion("poher-occupants",r)];return{verdict:String(h),criteria:i}}static TRAJECTORIES=["unknown","still","straight","abnormal","erratic"];criterion(n,t){return{id:n,value:t.shown?1:0,basis:t.basis,paths:t.basis===void 0?[]:t.paths}}trajectory(n){let t="unknown";for(const s of n.timeline.sourceIds){const e=this.seen(n,s).filter(i=>i.aim!==void 0).map(i=>i.aim);if(e.length<2)continue;const a=[o.unit(e[0])];for(const i of e.slice(1)){const l=o.unit(i);o.angleDeg(a[a.length-1],l)>=o.STEP_DEG&&a.push(l)}const c=a.length-1;let r=0;for(let i=1;i<a.length-1;i++){const l=o.cross(a[i-1],a[i]),d=o.cross(a[i],a[i+1]);o.angleDeg(l,d)>=o.TURN_DEG&&r++}const h=c===0?"still":r>=o.ERRATIC_TURNS?"erratic":r>0?"abnormal":"straight";o.TRAJECTORIES.indexOf(h)>o.TRAJECTORIES.indexOf(t)&&(t=h)}return t==="unknown"?{value:t,paths:[]}:{value:t,basis:"derived",paths:["timeline"]}}vanish(n){const t=(n.events??[]).findIndex(s=>s.eventType==="vanish"&&u.isPhenomenon(n,s));return t>=0?{shown:!0,basis:"stated",paths:[`events.${t}`]}:{shown:!1,paths:[]}}oscillation(n){const t=new Set((n.interpretation?.bodies??[]).map(e=>e.id)),s=(n.events??[]).findIndex(e=>o.OSCILLATIONS.includes(e.eventType)&&(u.isPhenomenon(n,e)||t.has(e.who?.split("/")[0]??"")));return s>=0?{shown:!0,basis:"stated",paths:[`events.${s}`]}:{shown:!1,paths:[]}}landing(n){const t=e=>!e.onGround&&((e.altitudeAboveGroundM??0)>0||(e.altitudeM??0)>0),s=(n.interpretation?.bodies??[]).findIndex(e=>Array.isArray(e.track)&&e.track.some(a=>a.onGround)&&e.track.some(t));return s>=0?{shown:!0,basis:"assumed",paths:[`interpretation.bodies.${s}`]}:{shown:!1,paths:[]}}occupants(n){const t=n.decor.findIndex(s=>s.kind==="entity");return t>=0?{shown:!0,basis:"stated",paths:[`decor.${t}`]}:this.judged(n,"beings")}judged(n,t){const s=n.account?.strangeness?.[t];return s===void 0?{shown:!1,paths:[]}:{shown:s,basis:"stated",paths:[`account.strangeness.${t}`]}}instants(n,t){return n.timeline.allKeyframes.map(s=>({t:s.t,shape:s.shapes.find(e=>e.sourceId===t)?.shape})).filter(({shape:s})=>s!==void 0).map(({t:s,shape:e})=>({t:s,aim:e.aim,visible:e.transparency<1})).sort((s,e)=>s.t-e.t)}seen(n,t){return this.instants(n,t).filter(s=>s.visible)}static unit(n){const[t,s]=[n.azimuthDeg*Math.PI/180,n.altitudeDeg*Math.PI/180];return[Math.cos(s)*Math.sin(t),Math.cos(s)*Math.cos(t),Math.sin(s)]}static cross(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}static angleDeg(n,t){const s=Math.hypot(...n)*Math.hypot(...t);if(s===0)return 0;const e=(n[0]*t[0]+n[1]*t[1]+n[2]*t[2])/s;return Math.acos(Math.max(-1,Math.min(1,e)))*180/Math.PI}}export{o as PoherAssessor};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{QuestionnaireImport as M}from"./QuestionnaireImport-BYj5QoJS.js";import{j as C}from"./rr0-sighting-editor.mjs";import"./interviewJson-DngUPqK8.js";class d{static PHENOMENON="phenomenon";static apply(s,e,t,o){const b=M.answers(e),a=new Map;for(const r of C.fields(t)){const n=r.feeds?b.get(r.id):void 0;r.feeds&&n&&a.set(r.feeds,{field:r.id,text:n.text,source:{said:{...o!==void 0?{interview:o}:{},segment:n.segment}}})}const l=[],u=(r,n,m)=>({value:r,basis:"stated",rationale:n,source:m}),c=(r,n,m,p)=>{p(),l.push({path:r,value:n,field:m})},i=a.get("narrative");i&&c("description",i.text,i.field,()=>{s.description={[t.language??"fr"]:i.text}});const f=a.get("date"),h=a.get("startTime"),j=f?d.date(f.text):void 0,w=h?d.clock(h.text):void 0;if(j){const r=w!==void 0?`${j}T${d.hms(w)}`:j,n=[f.text,h?.text].filter(m=>m!==void 0).join(", ");c("time",r,h&&w!==void 0?h.field:f.field,()=>{s.time=u(r,n,(w!==void 0?h:f).source)})}const v=a.get("duration"),k=v?d.duration(v.text,w):void 0;v&&k!==void 0&&c("durationSeconds",k,v.field,()=>{s.durationSeconds=u(k,v.text,v.source)});const x=a.get("color"),N=x?d.color(x.text):void 0,g=d.aim(a.get("startAzimuth"),a.get("startElevation")),S=d.aim(a.get("endAzimuth"),a.get("endElevation"));if(N||g||S){const r=(s.timeline??={}).keyframes??=[];let n=r.find(p=>(p.shapes??[]).length>0);n||(n=r.find(p=>p.t===0)??{t:0,shapes:[]},r.includes(n)||r.unshift(n),n.shapes=[{sourceId:d.PHENOMENON,shape:{kind:"oval",color:N??"#ffffff",transparency:0,haloScale:1.5,brightness:.4,angular:{value:{widthDeg:.5,heightDeg:.5},basis:"assumed",rationale:"no size the questionnaire's answers give"}}}]);const m=n.shapes[0];if(N&&c(`timeline.keyframes.${r.indexOf(n)}.shapes.0.shape.color`,N,x.field,()=>{m.shape.color=u(N,x.text,x.source)}),g&&c(`timeline.keyframes.${r.indexOf(n)}.shapes.0.shape.aim`,g.value,g.field,()=>{m.shape.aim=u(g.value,g.said,g.source)}),S){const p=(k??10)*1e3;let $=r.find(O=>O.t===p);$||($={t:p,shapes:[]},r.push($),r.sort((O,L)=>O.t-L.t));const I=$.shapes??=[];let y=I.find(O=>O.sourceId===m.sourceId);y||(y={sourceId:m.sourceId,shape:{}},I.push(y));const z=S;c(`timeline.keyframes.${r.indexOf($)}.shapes.${I.indexOf(y)}.shape.aim`,z.value,z.field,()=>{y.shape.aim=u(z.value,z.said,z.source)})}}return l}static MONTHS={janvier:1,fevrier:2,mars:3,avril:4,mai:5,juin:6,juillet:7,aout:8,septembre:9,octobre:10,novembre:11,decembre:12,january:1,february:2,march:3,april:4,may:5,june:6,july:7,august:8,september:9,october:10,november:11,december:12,enero:1,febrero:2,marzo:3,abril:4,mayo:5,junio:6,julio:7,agosto:8,septiembre:9,octubre:10,noviembre:11,diciembre:12,gennaio:1,febbraio:2,aprile:4,maggio:5,giugno:6,luglio:7,settembre:9,ottobre:10,dicembre:12};static date(s){const e=c=>String(c).padStart(2,"0"),t=(c,i,f)=>i>=1&&i<=12&&f>=1&&f<=31?`${c}-${e(i)}-${e(f)}`:void 0,o=/(\d{4})-(\d{1,2})-(\d{1,2})/.exec(s);if(o)return t(Number(o[1]),Number(o[2]),Number(o[3]));const b=/(\d{1,2})[/.-](\d{1,2})[/.-](\d{2,4})/.exec(s);if(b){const c=Number(b[3])<100?2e3+Number(b[3]):Number(b[3]);return t(c,Number(b[2]),Number(b[1]))}const a=s.normalize("NFD").replace(/[̀-ͯ]/g,"").toLowerCase(),l=/(\d{1,2})(?:er)?\s+([a-z]+)\s+(\d{4})/.exec(a),u=l?d.MONTHS[l[2]]:void 0;return l&&u?t(Number(l[3]),u,Number(l[1])):void 0}static clock(s){const e=/(\d{1,2})\s*(?:[:h]\s*(\d{2})?(?:\s*[:m]\s*(\d{2}))?|\s*(?=[ap]\.?m))\s*([ap]\.?m\.?)?/i.exec(s);if(!e)return;let t=Number(e[1]);if(e[4]&&(t=t%12+(/^p/i.test(e[4])?12:0)),!(t>23))return t*3600+Number(e[2]??0)*60+Number(e[3]??0)}static hms(s){const e=t=>String(t).padStart(2,"0");return`${e(Math.floor(s/3600))}:${e(Math.floor(s/60)%60)}:${e(s%60)}`}static duration(s,e){const t=s.toLowerCase().replace(",","."),o=/(\d{1,2})\s*[:h]\s*\d{2}/.exec(t);if(o&&e!==void 0&&(/jusqu|until|till|fin\b|end|termin|hasta|fino/.test(t)||/:/.test(o[0])&&Number(o[1])>=10)){const u=d.clock(o[0]);if(u!==void 0)return(u-e+86400)%86400||void 0}const a=[...t.replace(/(\d+)\s*h\s*(\d{2})(?!\s*(?:min|mn|s\b|sec))/g,"$1 h $2 min").matchAll(/(\d+(?:\.\d+)?)\s*(?:(?:-|–|à|a|to|or|ou|o)\s*(\d+(?:\.\d+)?)\s*)?(h(?:eures?|ours?|oras?|ore)?|min\w*|mn|s(?:ec\w*)?|seg\w*)(?![a-z])/g)];if(a.length>0){const u=a.reduce((c,i)=>{const f=i[3].startsWith("h")?3600:i[3].startsWith("m")?60:1,h=i[2]?(Number(i[1])+Number(i[2]))/2:Number(i[1]);return c+h*f},0);return u>0?Math.round(u):void 0}const l=/^\s*(\d{1,2}):(\d{2})\s*$/.exec(t);return l?Number(l[1])*60+Number(l[2]):void 0}static COLORS=[[/orang/,"#ff8a1f"],[/rouge|red|rojo|ross/,"#ff2a14"],[/jaune|yellow|amarill|giall/,"#ffe14a"],[/vert|green|verde/,"#3ad65a"],[/bleu|blue|azul|azzurr|blu/,"#4a8dff"],[/violet|purple|morad|viola/,"#a35bff"],[/rose|pink/,"#ff7ab8"],[/argent|silver|plat/,"#d8dde3"],[/gris|grey|gray|grig/,"#9a9a9a"],[/noir|black|negr|ner/,"#202020"],[/blanc|white|blanco|bianc/,"#ffffff"]];static color(s){const e=s.toLowerCase();let t;for(const[o,b]of d.COLORS){const a=o.exec(e);a&&(!t||a.index<t.at)&&(t={at:a.index,hex:b})}return t?.hex}static POINTS=[[/nord[- ]?nord[- ]?est|north[- ]?north[- ]?east|\bnne\b/,22.5],[/est[- ]?nord[- ]?est|east[- ]?north[- ]?east|\bene\b/,67.5],[/est[- ]?sud[- ]?est|east[- ]?south[- ]?east|\bese\b/,112.5],[/sud[- ]?sud[- ]?est|south[- ]?south[- ]?east|\bsse\b/,157.5],[/sud[- ]?sud[- ]?ouest|south[- ]?south[- ]?west|\bssw\b|\bsso\b/,202.5],[/ouest[- ]?sud[- ]?ouest|west[- ]?south[- ]?west|\bwsw\b|\boso\b/,247.5],[/ouest[- ]?nord[- ]?ouest|west[- ]?north[- ]?west|\bwnw\b|\bono\b/,292.5],[/nord[- ]?nord[- ]?ouest|north[- ]?north[- ]?west|\bnnw\b|\bnno\b/,337.5],[/nord[- ]?est|north[- ]?east|\bne\b/,45],[/sud[- ]?est|south[- ]?east|\bse\b/,135],[/sud[- ]?ouest|south[- ]?west|\bsw\b|\bso\b/,225],[/nord[- ]?ouest|north[- ]?west|\bnw\b|\bno\b/,315],[/\bnord\b|\bnorth\b|^n$/,0],[/\best\b|\beast\b|^e$/,90],[/\bsud\b|\bsouth\b|^s$/,180],[/\bouest\b|\bwest\b|^o$|^w$/,270]];static azimuth(s){const e=s.normalize("NFD").replace(/[̀-ͯ]/g,"").toLowerCase().trim(),t=/(\d{1,3}(?:[.,]\d+)?)\s*(?:°|deg|degres?|degrees?)/.exec(e)??/^(?:azimut[h]?\s*)?(\d{1,3}(?:[.,]\d+)?)$/.exec(e);if(t){const o=Number(t[1].replace(",","."));return o>=0&&o<=360?o%360:void 0}return d.POINTS.find(([o])=>o.test(e))?.[1]}static elevation(s){const e=s.normalize("NFD").replace(/[̀-ͯ]/g,"").toLowerCase(),t=/(-?\d{1,2}(?:[.,]\d+)?)\s*(?:°|deg|degres?|degrees?)/.exec(e)??/^\s*(\d{1,2}(?:[.,]\d+)?)\s*$/.exec(e);if(t){const o=Number(t[1].replace(",","."));return o>=-5&&o<=90?o:void 0}if(/zenith|au-dessus de (?:ma|la) tete|overhead/.test(e))return 90;if(/(?:a|sur|on) l'?horizon|at the horizon/.test(e))return 0}static aim(s,e){const t=s?d.azimuth(s.text):void 0,o=e?d.elevation(e.text):void 0;if(!(t===void 0||o===void 0))return{value:{azimuthDeg:t,altitudeDeg:o},field:s.field,said:`${s.text} ; ${e.text}`,source:s.source}}}export{d as QuestionnaireFeed};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as f}from"./rr0-sighting-editor.mjs";import{InterviewFile as k}from"./interviewJson-DngUPqK8.js";class b{constructor(e,o){this.container=e,this.answered=o}json;recalled=()=>{};show(e,o,r,c,s,p=()=>{}){this.json=o,this.recalled=p;const i=t=>f.text(t,c),n=[],m=e.intro?i(e.intro):r.intro.replace("{title}",i(e.title));for(const t of m.split(/\n\s*\n/)){const a=document.createElement("p");a.className="form-intro",a.textContent=t.trim(),n.push(a)}if(e.source?.url){const t=document.createElement("p");t.className="form-source";const a=document.createElement("a");a.href=e.source.url,a.target="_blank",a.rel="noopener noreferrer",a.textContent=r.source.replace("{publisher}",e.source.publisher??e.source.title??e.source.url),t.append(a),n.push(t)}const u=new Set(f.fields(e).map(t=>t.id));for(const t of e.sections)n.push(this.section(i(t.title),t.intro?i(t.intro):void 0,t.fields,o,r,c,s,t.images));const d=(o?.segments??[]).filter(t=>t.field!==void 0&&!u.has(t.field)&&o.speakers[t.speaker]?.role!=="witness").map(t=>({id:t.field,question:k.plain(t.text??t.field),kind:"long",required:!1}));d.length>0&&n.push(this.section(r.other,void 0,d,o,r,c,s)),this.container.replaceChildren(...n)}section(e,o,r,c,s,p,i,n){const m=document.createElement("fieldset");m.className="form-section";const u=document.createElement("legend");if(u.textContent=e,m.append(u),o){const d=document.createElement("p");d.className="form-section-intro",d.textContent=o,m.append(d)}n&&m.append(...b.figures(n,p));for(const d of r){const t=d.confidential?this.recalled(d.id)??"":c?f.answerOf(c,d.id)??"":"";m.append(this.field(d,t,s,p,i))}return m}field(e,o,r,c,s){const p=f.text(e.question,c),i=document.createElement("div");i.className="form-field",i.dataset.field=e.id;const n=document.createElement("label"),m=`form-${e.id.replace(/[^A-Za-z0-9_-]/g,"_")}`;n.htmlFor=m;const u=/^[A-Za-z]?\d/.test(e.id)?`${e.id}. `:"";if(n.textContent=`${u}${p}`,e.required!==!1){const l=document.createElement("span");l.className="required",l.textContent=" *",l.title=r.required,n.append(l)}if(i.append(n),e.hint){const l=document.createElement("p");l.className="form-hint",l.textContent=f.text(e.hint,c),i.append(l)}e.images&&i.append(...b.figures(e.images,c)),e.confidential&&i.append(this.confidentialNote(e,o,r,c));const d=l=>this.answered(e.id,l,p),t=e.kind??"long";if((t==="choice"||t==="scale")&&e.choices){const l=document.createElement("div");l.className=`form-choices ${t}`,l.id=m;const E=t==="choice"&&e.multiple===!0;l.setAttribute("role",E?"group":"radiogroup");const w=E?o.split(";").map(x=>x.trim()):[o.trim()];for(const x of e.choices){const v=document.createElement("label"),h=document.createElement("input");h.type=E?"checkbox":"radio",h.name=m,h.value=x.value,h.checked=w.includes(x.value),h.disabled=s,h.addEventListener("change",()=>{E?d([...l.querySelectorAll("input:checked")].map(N=>N.value).join("; ")):h.checked&&d(x.value)}),v.append(h,` ${f.text(x.label,c)}`),l.append(v)}return i.append(l),i}const a=t==="long"?document.createElement("textarea"):document.createElement("input");return a.id=m,a.value=o,a.disabled=s,a.addEventListener("change",()=>d(a.value)),a instanceof HTMLInputElement&&(t==="date"||t==="time")?i.append(this.when(a,t,o,r,n)):i.append(a),i}when(e,o,r,c,s){const p=o==="date"?/^\d{4}-\d{2}-\d{2}$/:/^\d{2}:\d{2}(:\d{2})?$/,i=document.createElement("div");i.className="form-when";const n=document.createElement("button");n.type="button",n.className="form-when-mode",n.disabled=e.disabled;const m=u=>{const d=e.value;e.type=u?o:"text",o==="time"&&(e.step=u?"1":""),e.placeholder=u?"":o==="date"?c.impreciseDate:c.impreciseTime,e.value=u&&!p.test(d)?"":d,!u&&d===""&&r!==""&&(e.value=r),i.dataset.mode=u?"precise":"imprecise",n.textContent=u?c.precise:c.imprecise,n.title=u?c.preciseHint:c.impreciseHint};return n.addEventListener("click",()=>m(i.dataset.mode!=="precise")),m(r===""||p.test(r.trim())),s.append(" ",n),i.append(e),i}confidentialNote(e,o,r,c){const s=document.createElement("p");s.className="form-confidential";const p=this.json?.questionnaire?.recipient,i=o===""&&this.json?.segments.some(n=>n.field===e.id&&n.redacted?.sealed!==void 0);if(p){const n=f.text(p.name,c);s.textContent=(i?r.confidentialSealedBefore:r.confidentialSealed).replace("{name}",n)}else s.textContent=r.confidentialNowhere,s.classList.add("nowhere");return s}static figures(e,o){return e.map(r=>{const c=document.createElement("figure");c.className="form-figure";const s=document.createElement("img");if(s.src=r.src,s.alt=f.text(r.alt,o),s.loading="lazy",c.append(s),r.caption){const p=document.createElement("figcaption");p.textContent=f.text(r.caption,o),c.append(p)}return c})}}export{b as QuestionnaireForm};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{InterviewFile as x}from"./interviewJson-DngUPqK8.js";import{j as p}from"./rr0-sighting-editor.mjs";class d{static UNINFORMED=new RegExp("^(?:"+["je ne sais pas","j'?sais pas","sais pas","ne sait pas","nsp","inconnu","inconnue","aucune id[ée]e","je ne (?:me )?souviens (?:pas|plus)","ne se souvient pas","non renseign[ée]e?","i don'?t know","don'?t know","do not know","dunno","unknown","not known","dk","n/?a","i don'?t remember","can'?t remember","not sure","no s[ée]","no lo s[ée]","desconocido","no recuerdo","non so","non lo so","sconosciuto","non ricordo","\\?+","-+","[—–]","…","\\.{2,}"].join("|")+")[.!]?$","iu");static informed(e){if(e===void 0)return!1;const s=x.plain(e).trim().replace(/\s+/g," ").replace(/[’]/g,"'");return s!==""&&!d.UNINFORMED.test(s)}static parse(e,s={},n){const t=typeof e=="string"?d.fromText(e,n):d.fromJson(e);if(!t||t.fields.length===0)return;const r=d.interview(t.fields,s,t.about);return n&&(r.questionnaire={id:n.id,...n.version?{version:n.version}:{}}),r}static interview(e,s={},n={}){const t={},r=s.by?.[0];t.interviewer={role:"interviewer",...r!==void 0?{by:{people:r}}:{}};const c=s.witnesses?.length===1?s.witnesses[0]:void 0;t.witness={role:"witness",...c?{title:c.label,of:c.id}:{}};const i=[];for(const a of e){i.push({speaker:"interviewer",field:a.id,text:a.question});const l=a.answer?.trim();l&&i.push({speaker:"witness",field:a.id,text:l})}return{version:1,...n.language?{language:n.language}:{},...n.title?{title:n.title}:{},...n.time?{time:n.time}:{},medium:"questionnaire",...c?{interviewOf:c.id}:{},speakers:t,transcription:{method:"manual"},proofreading:{interviewer:{status:"pending"},witness:{status:"pending"}},segments:i}}static answers(e){const s=new Map;return e.segments.forEach((n,t)=>{if(n.field===void 0||s.has(n.field)||e.speakers[n.speaker]?.role!=="witness")return;const r=x.said(n);r!==void 0&&d.informed(r)&&s.set(n.field,{field:n.field,segment:t,text:r.trim()})}),s}static sourceOf(e,s,n){const t=d.answers(e).get(s);if(t)return{said:{...n!==void 0?{interview:n}:{},segment:t.segment}}}static fromJson(e){const s={};let n=e;if(e!==null&&typeof e=="object"&&!Array.isArray(e)){const r=e,c=["fields","questions","answers"].find(i=>Array.isArray(r[i]));if(c){n=r[c];for(const i of["title","time","language"])typeof r[i]=="string"&&(s[i]=r[i])}else{const i=Object.entries(r);return i.length===0||!i.every(([,a])=>d.isAnswer(a))?void 0:{fields:i.map(([a,l],g)=>({id:String(g+1),question:a,...d.answerOf(l)})),about:s}}}if(!Array.isArray(n))return;const t=[];return n.forEach((r,c)=>{if(r===null||typeof r!="object"||Array.isArray(r))return;const i=r,a=(...v)=>v.map(o=>i[o]).find(o=>o!==void 0),l=a("id","number","field","key","name"),g=a("question","label","title","text","q"),w=a("answer","value","response","a","reply");g===void 0&&l===void 0||t.push({id:String(l!==void 0?l:c+1),question:typeof g=="string"&&g.trim()!==""?g.trim():String(l),...d.isAnswer(w)?d.answerOf(w):{}})}),{fields:t,about:s}}static isAnswer(e){return e==null||["string","number","boolean"].includes(typeof e)||Array.isArray(e)&&e.every(s=>["string","number","boolean"].includes(typeof s))}static answerOf(e){if(e==null)return{};const s=Array.isArray(e)?e.map(String).join(", "):String(e);return s.trim()===""?{}:{answer:s.trim()}}static fromText(e,s){const n=e.replace(/^/,"").replace(/\r\n?/g,`
|
|
2
|
+
`).replace(/^(?:[ \t]*\n)+|(?:\n[ \t]*)+$/g,"");if(n.trim()==="")return;if(/^\s*[{[]/.test(n))try{return d.fromJson(JSON.parse(n))}catch{}const t=d.table(n);return t?{fields:t,about:{}}:{fields:d.lines(n,s),about:{}}}static table(e){const s=e.split(`
|
|
3
|
+
`).filter(n=>n.trim()!=="");for(const n of[" ",";",","]){const t=s.map(i=>d.cells(i,n)),r=t[0].length;if(r<2||!t.every(i=>i.length===r))continue;const c=t[0].some(i=>/^(question|questions|answer|answers|r[ée]ponse|r[ée]ponses|field|champ|n°|no|num[ée]ro|id)$/i.test(i.trim()));return t.slice(c?1:0).map((i,a)=>r===2?{id:String(a+1),question:i[0].trim(),...d.answerOf(i[1])}:{id:i[0].trim()||String(a+1),question:i[1].trim()||i[0].trim(),...d.answerOf(i.slice(2).join(n===" "?" ":`${n} `))})}}static cells(e,s){const n=[];let t="",r=!1;for(let c=0;c<e.length;c++){const i=e[c];r?i==='"'&&e[c+1]==='"'?(t+='"',c++):i==='"'?r=!1:t+=i:i==='"'&&t.trim()===""?(r=!0,t=""):i===s?(n.push(t),t=""):t+=i}return n.push(t),n}static lines(e,s){const n=o=>o.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9]/g,""),r=(s?p.fields(s):[]).filter(o=>!/^[A-Za-z]?\d/.test(o.id)).map(o=>({id:o.id,key:n(p.text(o.question,s?.language))})),c=(s?.stops??[]).map(o=>n(p.text(o,s?.language))).filter(o=>o!==""),i=new Set((s?.sections??[]).flatMap(o=>[o.title,o.intro]).filter(o=>o!==void 0).map(o=>n(p.text(o,s?.language)))),a=/^(?:q(?:uestion)?\s*)?([A-Za-z]?\d+[a-z]?['’]?)\s*[.)\-–:]\s*(.*)$/u,l=/\bpage\s*:?\s*\d+(?:\s*\/\s*\d+)?\s*$/i,g=[];let w;const v=[];for(const o of e.split(`
|
|
4
|
+
`)){const f=o.trim();if(l.test(f))continue;if(c.some(y=>n(f).startsWith(y))){w=void 0;continue}const u=a.exec(f),h=u&&(!s||p.field(s,d.idOf(u[1])))?u:null,m=h?void 0:r.find(y=>y.key!==""&&n(f).startsWith(y.key));if(h||m){w={id:h?d.idOf(h[1]):m.id,lines:[h?h[2]:f]},g.push(w);continue}if(i.has(n(f))&&f!=="")continue;if(w){w.lines.push(f);continue}if(f===""||s)continue;const q=d.split(f);q&&v.push({id:String(v.length+1),...q})}return g.length===0?v:g.map(o=>{const f=o.lines.join(`
|
|
5
|
+
`),u=s?p.field(s,o.id)??p.field(s,o.id.toLowerCase()):void 0,h=u?.id??o.id,m=(u?d.after(f,p.text(u.question,s?.language),n,u.hint===void 0?void 0:p.text(u.hint,s?.language)):void 0)??d.asked(o.lines),q=u?.choices?d.chosen(m.answer,u.choices.map(y=>y.value)):m.answer;return{id:h,question:u?p.text(u.question,s?.language):m.question,...d.answerOf(q)}})}static after(e,s,n,t){const r=(l,g)=>{const w=n(g);let v=0,o=l;for(;o<e.length&&v<w.length;o++){const f=n(e[o]);if(f!==""){if(f!==w[v])return;v++}}return v<w.length?void 0:o},c=r(0,s);if(c===void 0)return;const i=(t!==void 0?r(c,t):void 0)??c,a=e.slice(i).replace(/^[\s*:?.,;…)\]]+/u,"").replace(/\s+/g," ").trim();return{question:s,...a!==""?{answer:a}:{}}}static chosen(e,s){if(e===void 0)return;const n=[...e.matchAll(/(?:[☒☑✓✔]|\[[xX]\])\s*([^\s☐☒☑✓✔[\]]+)/gu)].map(t=>t[1]).filter(t=>s.includes(t));if(n.length>0)return n.join(", ");if(!/[☐]/u.test(e)&&!/^\S+:$/.test(e.trim()))return e}static idOf(e){return e.replace("’","'").toUpperCase().replace(/^Q(?=\d)/,"")}static asked(e){const s=e.findIndex(c=>/[?:*]\s*$/.test(c));if(s>=0&&s<3){const c=e.slice(s+1).join(" ").replace(/\s+/g," ").trim();return{question:e.slice(0,s+1).join(" ").replace(/[\s*:]+$/,"").replace(/\s+/g," ").trim(),...c!==""?{answer:c}:{}}}const n=d.split(e[0])??{question:e[0].trim()},t=e.slice(1).join(" ").replace(/\s+/g," ").trim(),r=[n.answer,t].filter(c=>c!==void 0&&c!=="").join(" ");return{question:n.question,...r!==""?{answer:r}:{}}}static split(e){const s=/\?(?:\s*\*)?(\s|$)|\s?:\s*\*?(\s|$)/.exec(e);if(!s||s.index===0)return;const n=e.slice(0,s.index+(e[s.index]==="?"?1:0)).replace(/[\s*]+$/,"").trim(),t=e.slice(s.index+s[0].length).trim();return{question:n,...t!==""?{answer:t}:{}}}}export{d as QuestionnaireImport};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
class r{static ALG="RSA-OAEP-256+A256GCM";static RSA={name:"RSA-OAEP",hash:"SHA-256"};static async seal(t,a){const e=globalThis.crypto.subtle,c=await e.importKey("jwk",a.publicKey,r.RSA,!1,["encrypt"]),y=await e.generateKey({name:"AES-GCM",length:256},!0,["encrypt"]),s=globalThis.crypto.getRandomValues(new Uint8Array(12)),o=await e.encrypt({name:"AES-GCM",iv:s},y,new TextEncoder().encode(t)),n=await e.encrypt(r.RSA,c,await e.exportKey("raw",y));return{for:a.id,alg:r.ALG,key:r.base64(n),iv:r.base64(s),data:r.base64(o)}}static async open(t,a){const e=globalThis.crypto.subtle,c=await e.decrypt(r.RSA,a,r.bytes(t.key)),y=await e.importKey("raw",c,{name:"AES-GCM"},!1,["decrypt"]),s=await e.decrypt({name:"AES-GCM",iv:r.bytes(t.iv)},y,r.bytes(t.data));return new TextDecoder().decode(s)}static async keyPair(){const t=globalThis.crypto.subtle,a=await t.generateKey({...r.RSA,modulusLength:3072,publicExponent:new Uint8Array([1,0,1])},!0,["encrypt","decrypt"]);return{publicKey:await t.exportKey("jwk",a.publicKey),privateKey:await t.exportKey("jwk",a.privateKey)}}static importPrivateKey(t){return globalThis.crypto.subtle.importKey("jwk",t,r.RSA,!1,["decrypt"])}static base64(t){const a=t instanceof Uint8Array?t:new Uint8Array(t);let e="";for(const c of a)e+=String.fromCharCode(c);return btoa(e)}static bytes(t){const a=atob(t),e=new Uint8Array(a.length);for(let c=0;c<a.length;c++)e[c]=a.charCodeAt(c);return e}}export{r as QuestionnaireSeal};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aV as F,a_ as P,bs as H,m as K,bb as w,bc as N,aY as U,bO as k}from"./rr0-sighting-editor.mjs";class D{static HOLLOW_M=1;static COVERED_M=3;static WINDOW_M=30;static SAMPLE_M=4;static MAX_GRADE={rail:.025,highSpeed:.035,subway:.04,light_rail:.06,tram:.08,funicular:1/0};static heights(t,s,e){const n=t.map(a=>a.level===0),o=t.map((a,i)=>n[i]?D.targets(a,s,e):[]),c=t.map((a,i)=>n[i]?D.samples(a,o[i]):[]),r=new Map;t.forEach((a,i)=>{if(n[i])for(const h of D.ends(a)){const u=D.key(h),p=r.get(u);p?p.push(i):r.set(u,[i])}});const M=a=>{const i=r.get(D.key(a));if(i)return D.median(i.flatMap(h=>c[h]),a)};return t.map((a,i)=>{if(n[i]){const h=[...new Set([i,...D.ends(a).flatMap(d=>r.get(D.key(d))??[])])].flatMap(d=>c[d]),u=a.centre.map((d,O)=>D.median(h,d)??o[i][O]),[p,A]=D.ends(a);return u[0]=M(p)??u[0],u[u.length-1]=M(A)??u[u.length-1],D.graded(u,a.along,a.highSpeed?D.MAX_GRADE.highSpeed:D.MAX_GRADE[a.kind])}return D.carried(a,s,e,M)})}static targets(t,s,e){return t.centre.map(n=>{const o=s(n.x,n.z);if(e===void 0||n.altitudeM===void 0)return o;const c=n.altitudeM+e;return c-o>D.HOLLOW_M||o-c>D.COVERED_M?c:o})}static samples(t,s){const e=[];let n=0;return t.centre.forEach((o,c)=>{t.along[c]+1e-6<n&&c<t.centre.length-1||(e.push({x:o.x,z:o.z,y:s[c]}),n=t.along[c]+D.SAMPLE_M)}),e}static median(t,s){const e=[];for(const o of t)Math.hypot(o.x-s.x,o.z-s.z)<=D.WINDOW_M&&e.push(o.y);if(e.length===0)return;e.sort((o,c)=>o-c);const n=e.length>>1;return e.length%2===1?e[n]:(e[n-1]+e[n])/2}static graded(t,s,e){if(!Number.isFinite(e)||t.length<3)return t;const n=[...t],o=n.length-1,c=s[o];if(Math.abs(n[o]-n[0])>e*c)return s.map(r=>n[0]+(n[o]-n[0])*r/c);for(let r=1;r<o;r++){const M=e*(s[r]-s[r-1]);n[r]=Math.min(n[r-1]+M,Math.max(n[r-1]-M,n[r]))}for(let r=o-1;r>0;r--){const M=e*(s[r+1]-s[r]);n[r]=Math.min(n[r+1]+M,Math.max(n[r+1]-M,n[r]))}return n}static carried(t,s,e,n){const[o,c]=D.ends(t),r=t.along[t.along.length-1],M=n(o),a=n(c);if(e!==void 0&&t.centre.every(u=>u.altitudeM!==void 0)){const u=t.centre.map(d=>d.altitudeM+e),p=M!==void 0?M-u[0]:0,A=a!==void 0?a-u[u.length-1]:0;return u.map((d,O)=>d+p+(A-p)*t.along[O]/r)}const i=M??s(o.x,o.z),h=a??s(c.x,c.z);return t.along.map(u=>i+(h-i)*u/r)}static ends(t){return[t.centre[0],t.centre[t.centre.length-1]]}static key(t){return`${Math.round(t.x*2)},${Math.round(t.z*2)}`}}class B{positions=[];indices=[];along=[];get vertexCount(){return this.positions.length/3}strip(t,s,e){const n=this.vertexCount;for(let o=0;o<t.length;o++)this.positions.push(t[o].x,t[o].y,t[o].z,s[o].x,s[o].y,s[o].z),e&&this.along.push(e[o],e[o]);for(let o=0;o<t.length-1;o++){const c=n+o*2;this.indices.push(c,c+2,c+1,c+1,c+2,c+3)}}beam(t,s,e,n=!0){const o=s.x-t.x,c=s.y-t.y,r=s.z-t.z,M=Math.hypot(o,c,r);if(M<1e-6)return;const a={x:o/M,y:c/M,z:r/M},i=Math.abs(a.y)>.9?{x:1,y:0,z:0}:{x:0,y:1,z:0},h=a.y*i.z-a.z*i.y,u=a.z*i.x-a.x*i.z,p=a.x*i.y-a.y*i.x,A=Math.hypot(h,u,p),d={x:h/A*e/2,y:u/A*e/2,z:p/A*e/2},O={x:a.y*d.z-a.z*d.y,y:a.z*d.x-a.x*d.z,z:a.x*d.y-a.y*d.x},g=(f,x,E)=>({x:f.x+d.x*x+O.x*E,y:f.y+d.y*x+O.y*E,z:f.z+d.z*x+O.z*E}),_=[[1,1],[-1,1],[-1,-1],[1,-1]];for(let f=0;f<4;f++){const[x,E]=_[f],[z,v]=_[(f+1)%4];this.quad(g(t,x,E),g(t,z,v),g(s,z,v),g(s,x,E))}n&&(this.quad(...[..._].reverse().map(([f,x])=>g(t,f,x))),this.quad(..._.map(([f,x])=>g(s,f,x))))}quad(t,s,e,n){const o=this.vertexCount;this.positions.push(t.x,t.y,t.z,s.x,s.y,s.z,e.x,e.y,e.z,n.x,n.y,n.z),this.indices.push(o,o+1,o+2,o,o+2,o+3)}}class l{static STEP_M=6;static BALLAST_HEIGHT_M=.5;static BALLAST_SLOPE=1.5;static BALLAST_SHOULDER_M=.45;static DECK_DEPTH_M=.8;static BANK_SLOPE=1.5;static SLEEPER_LENGTH_M=2.4;static SLEEPER_WIDTH_M=.29;static SLEEPER_SPACING_M=.6;static RAIL_HEAD_M=.072;static RAIL_HEIGHT_M=.18;static TRAM_RAIL_HEIGHT_M=.03;static LIFT_M=.06;static CATENARY={rail:{contactM:5.5,systemM:1.4,spanM:54,staggerM:.2},highSpeed:{contactM:5.08,systemM:1.4,spanM:63,staggerM:.2},service:{contactM:5.5,systemM:1.2,spanM:45,staggerM:.2},tram:{contactM:6,systemM:0,spanM:30,staggerM:.2}};static MESSENGER_SAG_M=.55;static MAST_SIDE_M=.26;static MAST_OFFSET_M=3.1;static MAST_ABOVE_M=.6;static CONTACT_DIAMETER_M=.012;static MESSENGER_DIAMETER_M=.011;static ARM_SIDE_M=.06;static TRACK_SPACING_M={rail:3.7,highSpeed:4.5,tram:3.1,subway:3.4,light_rail:3.4,funicular:3.2};static BALLAST_ALBEDO=[.17,.16,.15];static BANK_ALBEDO=[.085,.09,.05];static DECK_ALBEDO=[.26,.255,.24];static CONCRETE_ALBEDO=[.36,.35,.33];static WOOD_ALBEDO=[.07,.055,.045];static RUST_ALBEDO=[.085,.068,.058];static STEEL_ALBEDO=[.3,.31,.32];static COPPER_ALBEDO=[.09,.085,.07];static LINE_REACH_M=20;group=new F;stepM=l.STEP_M;drawn=0;laid=[];ballastMaterial=l.pebbled(l.lambert(l.BALLAST_ALBEDO,!0));earthMaterial=l.lambert(l.BANK_ALBEDO,!0);deckMaterial=l.lambert(l.DECK_ALBEDO,!1);concreteSleepers=l.sleeperMaterial(l.CONCRETE_ALBEDO);woodSleepers=l.sleeperMaterial(l.WOOD_ALBEDO);rustMaterial=l.lambert(l.RUST_ALBEDO,!0);headMaterial=new P({color:new H(.62,.62,.62),metalness:1,roughness:.28,polygonOffset:!0,polygonOffsetFactor:-2,polygonOffsetUnits:-2});steelMaterial=l.lambert(l.STEEL_ALBEDO,!1);wireMaterial=l.lambert(l.COPPER_ALBEDO,!1);constructor(){this.group.name="railways"}get count(){return this.drawn}setGroundSpacing(t){this.stepM=Number.isFinite(t)&&t>0?Math.min(l.STEP_M,Math.max(1.5,t/2)):l.STEP_M}set(t,s,e,n,o=1/0){this.clear();const r=t.map(p=>({line:p,path:p.points.map(A=>({...K(A.lat,A.lng,s,e),altitudeM:A.altitudeM}))})).filter(({line:p,path:A})=>p.level>=0&&l.within(A,o)),M=l.altitudeOffset(r,n),a=r.flatMap(({line:p,path:A})=>{const d=this.layoutOf(p,A);return d?[{line:p,layout:d}]:[]}),i=D.heights(a.map(({layout:p})=>p),n,M),h={ballast:new B,earth:new B,deck:new B,concrete:new B,wood:new B,rust:new B,head:new B,steel:new B,wire:new B};a.forEach(({line:p,layout:A},d)=>{this.lay(p,{...A,y:i[d]},n,h),this.laid.push({line:p,centre:A.centre}),this.drawn++});const u=[[h.ballast,this.ballastMaterial,"ballast",!1],[h.earth,this.earthMaterial,"embankments",!1],[h.deck,this.deckMaterial,"decks",!0],[h.concrete,this.concreteSleepers,"sleepers",!1],[h.wood,this.woodSleepers,"sleepers wood",!1],[h.rust,this.rustMaterial,"rails",!1],[h.head,this.headMaterial,"rail heads",!1],[h.steel,this.steelMaterial,"catenary masts",!0],[h.wire,this.wireMaterial,"catenary wires",!1]];for(const[p,A,d,O]of u){const g=l.meshOf(p,A);g&&(g.name=`railways ${d}`,g.castShadow=O,g.receiveShadow=!0,this.group.add(g))}}clear(){for(const t of[...this.group.children])this.group.remove(t),t.geometry?.dispose();this.drawn=0,this.laid=[]}lineAt(t,s){let e;for(const{line:n,centre:o}of this.laid)for(let c=0;c<o.length-1;c++){const r=o[c],M=o[c+1],a=M.x-r.x,i=M.z-r.z,h=a*a+i*i,u=h===0?0:Math.max(0,Math.min(1,((t-r.x)*a+(s-r.z)*i)/h)),p=Math.hypot(t-(r.x+a*u),s-(r.z+i*u));p<=l.LINE_REACH_M&&(!e||p<e.distance)&&(e={line:n,distance:p})}return e?.line}mayMeet(t,s,e,n){const o=Math.hypot(s.x,s.z);if(o<1e-6)return this.lineAt(t.x,t.z)!==void 0;const c=s.x/o,r=s.z/o,M=l.LINE_REACH_M;for(const{centre:a}of this.laid)for(let i=0;i<a.length-1;i++){const h=a[i],u=a[i+1];for(const p of[0,.5,1]){const A=h.x+(u.x-h.x)*p,d=h.z+(u.z-h.z)*p,O=(A-t.x)*c+(d-t.z)*r;if(O<0)continue;const g=Math.abs((A-t.x)*r-(d-t.z)*c),_=Math.hypot(u.x-h.x,u.z-h.z)/2;if(g>M+_)continue;if(t.y+s.y*(O/o)<=e(A,d)+n)return!0}}return!1}contactHeightM(t){if(!(t.electrification!=="overhead"||t.kind==="subway"||t.kind==="funicular"))return l.catenaryOf(t).contactM}static catenaryOf(t){return t.kind==="tram"?l.CATENARY.tram:t.highSpeed?l.CATENARY.highSpeed:t.service?l.CATENARY.service:l.CATENARY.rail}dispose(){this.clear();for(const t of[this.ballastMaterial,this.earthMaterial,this.deckMaterial,this.concreteSleepers,this.woodSleepers,this.rustMaterial,this.headMaterial,this.steelMaterial,this.wireMaterial])t.dispose()}static within(t,s){if(!Number.isFinite(s))return!0;const e=s*1.1+100;return t.some((n,o)=>Math.hypot(n.x,n.z)<=e||o>0&&Math.hypot((n.x+t[o-1].x)/2,(n.z+t[o-1].z)/2)<=e)}static altitudeOffset(t,s){const e=[];for(const{line:n,path:o}of t)if(n.level===0)for(const c of o)c.altitudeM!==void 0&&e.push(s(c.x,c.z)-c.altitudeM);if(!(e.length<5))return e.sort((n,o)=>n-o),e[Math.floor(e.length/2)]}layoutOf(t,s){const e=[];for(let c=0;c<s.length-1;c++){const r=s[c],M=s[c+1],a=Math.max(1,Math.ceil(Math.hypot(M.x-r.x,M.z-r.z)/this.stepM));for(let i=0;i<a;i++){const h=i/a,u=r.altitudeM!==void 0&&M.altitudeM!==void 0?r.altitudeM+(M.altitudeM-r.altitudeM)*h:void 0;e.push({x:r.x+(M.x-r.x)*h,z:r.z+(M.z-r.z)*h,altitudeM:u})}}if(e.push(s[s.length-1]),e.length<2)return;const n=[0];for(let c=1;c<e.length;c++)n.push(n[c-1]+Math.hypot(e[c].x-e[c-1].x,e[c].z-e[c-1].z));if(n[n.length-1]<.5)return;const o=e.map((c,r)=>{const M=e[Math.max(0,r-1)],a=e[Math.min(e.length-1,r+1)],i=a.x-M.x,h=a.z-M.z,u=Math.hypot(i,h);return u<1e-6?{x:1,z:0}:{x:i/u,z:h/u}});return{kind:t.kind,...t.highSpeed?{highSpeed:!0}:{},level:t.level,centre:e,along:n,dir:o}}lay(t,s,e,n){const o=t.highSpeed?l.TRACK_SPACING_M.highSpeed:l.TRACK_SPACING_M[t.kind],c=Math.min(8,Math.max(1,t.tracks)),r=Array.from({length:c},(g,_)=>(_-(c-1)/2)*o),M=t.kind==="tram",a=M?0:l.BALLAST_HEIGHT_M,i=l.LIFT_M,h=(g,_,f)=>({x:s.centre[g].x-s.dir[g].z*_,y:s.y[g]+f,z:s.centre[g].z+s.dir[g].x*_}),u=s.centre.map((g,_)=>_);if(!M){const g=l.SLEEPER_LENGTH_M/2+l.BALLAST_SHOULDER_M+(r[r.length-1]??0),_=u.map(x=>h(x,g,a+i)),f=u.map(x=>h(x,-g,a+i));if(n.ballast.strip(_,f),t.level===0){const x=g+a*l.BALLAST_SLOPE;for(const E of[1,-1]){const z=[],v=[];let m=!1;for(const L of u){const C=h(L,E*x,i),S=e(C.x,C.z)+i,T=C.y-S;T<0&&(C.y=Math.min(S,s.y[L]+a-.05+i)),z.push(C);const I=h(L,E*(x+Math.max(0,T)*l.BANK_SLOPE),i);I.y=Math.min(e(I.x,I.z)+i,C.y),C.y-I.y>.02&&(m=!0),v.push(I)}const b=E>0?_:f;E>0?n.ballast.strip(z,b):n.ballast.strip(b,z),m&&(E>0?n.earth.strip(v,z):n.earth.strip(z,v))}}else{const x=-l.DECK_DEPTH_M,E=g+.15,z=u.map(L=>h(L,E,a+i+.1)),v=u.map(L=>h(L,-E,a+i+.1)),m=u.map(L=>h(L,E,x)),b=u.map(L=>h(L,-E,x));n.deck.strip(m,z),n.deck.strip(v,b),n.deck.strip(b,m),n.deck.strip(z,u.map(L=>h(L,g,a+i+.1))),n.deck.strip(u.map(L=>h(L,-g,a+i+.1)),v)}}const p=t.service?n.wood:n.concrete,A=t.gaugeMm/2e3+l.RAIL_HEAD_M/2,d=M?l.TRAM_RAIL_HEIGHT_M:l.RAIL_HEIGHT_M,O=a+i;for(const g of r){if(!M){const _=l.SLEEPER_LENGTH_M/2;p.strip(u.map(f=>h(f,g+_,O+.004)),u.map(f=>h(f,g-_,O+.004)),s.along)}for(const _ of[1,-1]){const f=g+_*A,x=l.RAIL_HEAD_M/2,E=u.map(v=>h(v,f+x,O+d)),z=u.map(v=>h(v,f-x,O+d));n.head.strip(E,z),n.rust.strip(u.map(v=>h(v,f+x,O)),E),n.rust.strip(z,u.map(v=>h(v,f-x,O)))}}t.electrification==="overhead"&&t.kind!=="subway"&&t.kind!=="funicular"&&this.catenary(t,s,r,O+d,h,e,n)}catenary(t,s,e,n,o,c,r){const M=l.catenaryOf(t),a=s.along[s.along.length-1],i=Math.max(1,Math.round(a/M.spanM)),h=a/i,u=Array.from({length:i},(E,z)=>(z+.5)*h),p=n+M.contactM,A=p+M.systemM,d=(M.systemM>0?A:p)+l.MAST_ABOVE_M,O=e[e.length-1],g=e.length>2,_=e.length===1?[1]:[1,-1],f=(E,z,v)=>{let m=0,b=s.along.length-2;for(;m<b;){const T=m+b+1>>1;s.along[T]<=E?m=T:b=T-1}const L=Math.min(1,Math.max(0,(E-s.along[m])/Math.max(1e-6,s.along[m+1]-s.along[m]))),C=o(m,z,v),S=o(m+1,z,v);return{x:C.x+(S.x-C.x)*L,y:C.y+(S.y-C.y)*L,z:C.z+(S.z-C.z)*L}};for(const E of u){const z=f(E,0,p);if(!(t.level===0&&c(z.x,z.z)>z.y)){for(const v of _){const m=v*(O+l.MAST_OFFSET_M),b=f(E,m,0);t.level===0&&(b.y=Math.min(b.y,c(b.x,b.z)));const L=f(E,m,d);if(r.steel.beam(b,L,l.MAST_SIDE_M),g)continue;const S=(_.length===1?e[0]:v*O)-v*.6,T=M.systemM>0?A:p+.3;r.steel.beam(f(E,m,T),f(E,S,T),l.ARM_SIDE_M),r.steel.beam(f(E,m,p-.4),f(E,S,T),l.ARM_SIDE_M)}if(g){const v=O+l.MAST_OFFSET_M;r.steel.beam(f(E,v,d-.2),f(E,-v,d-.2),l.MAST_SIDE_M*.8)}}}const x=[0,...u,a];for(const[E,z]of e.entries()){const v=m=>m===0||m===x.length-1?0:((m+E)%2===0?1:-1)*M.staggerM;for(let m=0;m<x.length-1;m++){const b=x[m],L=x[m+1];if(L-b<.1||(r.wire.beam(f(b,z+v(m),p),f(L,z+v(m+1),p),l.CONTACT_DIAMETER_M,!1),M.systemM<=0))continue;const C=4,S=T=>{const I=m===0?.5+T/2:m===x.length-2?T/2:T;return A-l.MESSENGER_SAG_M*4*I*(1-I)};for(let T=0;T<C;T++){const I=T/C,G=(T+1)/C;r.wire.beam(f(b+(L-b)*I,z,S(I)),f(b+(L-b)*G,z,S(G)),l.MESSENGER_DIAMETER_M,!1)}}}}static meshOf(t,s){if(t.indices.length===0)return;const e=new w;return e.setAttribute("position",new N(new Float32Array(t.positions),3)),t.along.length>0&&e.setAttribute("aAlong",new N(new Float32Array(t.along),1)),e.setIndex(new N(new Uint32Array(t.indices),1)),e.computeVertexNormals(),new U(e,s)}static lambert(t,s){return new k({color:new H(...t),...s?{polygonOffset:!0,polygonOffsetFactor:-2,polygonOffsetUnits:-2}:{}})}static pebbled(t){return t.onBeforeCompile=s=>{s.vertexShader=s.vertexShader.replace("#include <common>",`#include <common>
|
|
1
|
+
import{a$ as F,b4 as P,bB as H,u as K,bk as w,bl as N,b2 as U,c3 as k}from"./rr0-sighting-editor.mjs";class D{static HOLLOW_M=1;static COVERED_M=3;static WINDOW_M=30;static SAMPLE_M=4;static MAX_GRADE={rail:.025,highSpeed:.035,subway:.04,light_rail:.06,tram:.08,funicular:1/0};static heights(t,s,e){const n=t.map(a=>a.level===0),o=t.map((a,i)=>n[i]?D.targets(a,s,e):[]),c=t.map((a,i)=>n[i]?D.samples(a,o[i]):[]),r=new Map;t.forEach((a,i)=>{if(n[i])for(const h of D.ends(a)){const u=D.key(h),p=r.get(u);p?p.push(i):r.set(u,[i])}});const M=a=>{const i=r.get(D.key(a));if(i)return D.median(i.flatMap(h=>c[h]),a)};return t.map((a,i)=>{if(n[i]){const h=[...new Set([i,...D.ends(a).flatMap(d=>r.get(D.key(d))??[])])].flatMap(d=>c[d]),u=a.centre.map((d,O)=>D.median(h,d)??o[i][O]),[p,A]=D.ends(a);return u[0]=M(p)??u[0],u[u.length-1]=M(A)??u[u.length-1],D.graded(u,a.along,a.highSpeed?D.MAX_GRADE.highSpeed:D.MAX_GRADE[a.kind])}return D.carried(a,s,e,M)})}static targets(t,s,e){return t.centre.map(n=>{const o=s(n.x,n.z);if(e===void 0||n.altitudeM===void 0)return o;const c=n.altitudeM+e;return c-o>D.HOLLOW_M||o-c>D.COVERED_M?c:o})}static samples(t,s){const e=[];let n=0;return t.centre.forEach((o,c)=>{t.along[c]+1e-6<n&&c<t.centre.length-1||(e.push({x:o.x,z:o.z,y:s[c]}),n=t.along[c]+D.SAMPLE_M)}),e}static median(t,s){const e=[];for(const o of t)Math.hypot(o.x-s.x,o.z-s.z)<=D.WINDOW_M&&e.push(o.y);if(e.length===0)return;e.sort((o,c)=>o-c);const n=e.length>>1;return e.length%2===1?e[n]:(e[n-1]+e[n])/2}static graded(t,s,e){if(!Number.isFinite(e)||t.length<3)return t;const n=[...t],o=n.length-1,c=s[o];if(Math.abs(n[o]-n[0])>e*c)return s.map(r=>n[0]+(n[o]-n[0])*r/c);for(let r=1;r<o;r++){const M=e*(s[r]-s[r-1]);n[r]=Math.min(n[r-1]+M,Math.max(n[r-1]-M,n[r]))}for(let r=o-1;r>0;r--){const M=e*(s[r+1]-s[r]);n[r]=Math.min(n[r+1]+M,Math.max(n[r+1]-M,n[r]))}return n}static carried(t,s,e,n){const[o,c]=D.ends(t),r=t.along[t.along.length-1],M=n(o),a=n(c);if(e!==void 0&&t.centre.every(u=>u.altitudeM!==void 0)){const u=t.centre.map(d=>d.altitudeM+e),p=M!==void 0?M-u[0]:0,A=a!==void 0?a-u[u.length-1]:0;return u.map((d,O)=>d+p+(A-p)*t.along[O]/r)}const i=M??s(o.x,o.z),h=a??s(c.x,c.z);return t.along.map(u=>i+(h-i)*u/r)}static ends(t){return[t.centre[0],t.centre[t.centre.length-1]]}static key(t){return`${Math.round(t.x*2)},${Math.round(t.z*2)}`}}class B{positions=[];indices=[];along=[];get vertexCount(){return this.positions.length/3}strip(t,s,e){const n=this.vertexCount;for(let o=0;o<t.length;o++)this.positions.push(t[o].x,t[o].y,t[o].z,s[o].x,s[o].y,s[o].z),e&&this.along.push(e[o],e[o]);for(let o=0;o<t.length-1;o++){const c=n+o*2;this.indices.push(c,c+2,c+1,c+1,c+2,c+3)}}beam(t,s,e,n=!0){const o=s.x-t.x,c=s.y-t.y,r=s.z-t.z,M=Math.hypot(o,c,r);if(M<1e-6)return;const a={x:o/M,y:c/M,z:r/M},i=Math.abs(a.y)>.9?{x:1,y:0,z:0}:{x:0,y:1,z:0},h=a.y*i.z-a.z*i.y,u=a.z*i.x-a.x*i.z,p=a.x*i.y-a.y*i.x,A=Math.hypot(h,u,p),d={x:h/A*e/2,y:u/A*e/2,z:p/A*e/2},O={x:a.y*d.z-a.z*d.y,y:a.z*d.x-a.x*d.z,z:a.x*d.y-a.y*d.x},g=(f,x,E)=>({x:f.x+d.x*x+O.x*E,y:f.y+d.y*x+O.y*E,z:f.z+d.z*x+O.z*E}),_=[[1,1],[-1,1],[-1,-1],[1,-1]];for(let f=0;f<4;f++){const[x,E]=_[f],[z,v]=_[(f+1)%4];this.quad(g(t,x,E),g(t,z,v),g(s,z,v),g(s,x,E))}n&&(this.quad(...[..._].reverse().map(([f,x])=>g(t,f,x))),this.quad(..._.map(([f,x])=>g(s,f,x))))}quad(t,s,e,n){const o=this.vertexCount;this.positions.push(t.x,t.y,t.z,s.x,s.y,s.z,e.x,e.y,e.z,n.x,n.y,n.z),this.indices.push(o,o+1,o+2,o,o+2,o+3)}}class l{static STEP_M=6;static BALLAST_HEIGHT_M=.5;static BALLAST_SLOPE=1.5;static BALLAST_SHOULDER_M=.45;static DECK_DEPTH_M=.8;static BANK_SLOPE=1.5;static SLEEPER_LENGTH_M=2.4;static SLEEPER_WIDTH_M=.29;static SLEEPER_SPACING_M=.6;static RAIL_HEAD_M=.072;static RAIL_HEIGHT_M=.18;static TRAM_RAIL_HEIGHT_M=.03;static LIFT_M=.06;static CATENARY={rail:{contactM:5.5,systemM:1.4,spanM:54,staggerM:.2},highSpeed:{contactM:5.08,systemM:1.4,spanM:63,staggerM:.2},service:{contactM:5.5,systemM:1.2,spanM:45,staggerM:.2},tram:{contactM:6,systemM:0,spanM:30,staggerM:.2}};static MESSENGER_SAG_M=.55;static MAST_SIDE_M=.26;static MAST_OFFSET_M=3.1;static MAST_ABOVE_M=.6;static CONTACT_DIAMETER_M=.012;static MESSENGER_DIAMETER_M=.011;static ARM_SIDE_M=.06;static TRACK_SPACING_M={rail:3.7,highSpeed:4.5,tram:3.1,subway:3.4,light_rail:3.4,funicular:3.2};static BALLAST_ALBEDO=[.17,.16,.15];static BANK_ALBEDO=[.085,.09,.05];static DECK_ALBEDO=[.26,.255,.24];static CONCRETE_ALBEDO=[.36,.35,.33];static WOOD_ALBEDO=[.07,.055,.045];static RUST_ALBEDO=[.085,.068,.058];static STEEL_ALBEDO=[.3,.31,.32];static COPPER_ALBEDO=[.09,.085,.07];static LINE_REACH_M=20;group=new F;stepM=l.STEP_M;drawn=0;laid=[];ballastMaterial=l.pebbled(l.lambert(l.BALLAST_ALBEDO,!0));earthMaterial=l.lambert(l.BANK_ALBEDO,!0);deckMaterial=l.lambert(l.DECK_ALBEDO,!1);concreteSleepers=l.sleeperMaterial(l.CONCRETE_ALBEDO);woodSleepers=l.sleeperMaterial(l.WOOD_ALBEDO);rustMaterial=l.lambert(l.RUST_ALBEDO,!0);headMaterial=new P({color:new H(.62,.62,.62),metalness:1,roughness:.28,polygonOffset:!0,polygonOffsetFactor:-2,polygonOffsetUnits:-2});steelMaterial=l.lambert(l.STEEL_ALBEDO,!1);wireMaterial=l.lambert(l.COPPER_ALBEDO,!1);constructor(){this.group.name="railways"}get count(){return this.drawn}setGroundSpacing(t){this.stepM=Number.isFinite(t)&&t>0?Math.min(l.STEP_M,Math.max(1.5,t/2)):l.STEP_M}set(t,s,e,n,o=1/0){this.clear();const r=t.map(p=>({line:p,path:p.points.map(A=>({...K(A.lat,A.lng,s,e),altitudeM:A.altitudeM}))})).filter(({line:p,path:A})=>p.level>=0&&l.within(A,o)),M=l.altitudeOffset(r,n),a=r.flatMap(({line:p,path:A})=>{const d=this.layoutOf(p,A);return d?[{line:p,layout:d}]:[]}),i=D.heights(a.map(({layout:p})=>p),n,M),h={ballast:new B,earth:new B,deck:new B,concrete:new B,wood:new B,rust:new B,head:new B,steel:new B,wire:new B};a.forEach(({line:p,layout:A},d)=>{this.lay(p,{...A,y:i[d]},n,h),this.laid.push({line:p,centre:A.centre}),this.drawn++});const u=[[h.ballast,this.ballastMaterial,"ballast",!1],[h.earth,this.earthMaterial,"embankments",!1],[h.deck,this.deckMaterial,"decks",!0],[h.concrete,this.concreteSleepers,"sleepers",!1],[h.wood,this.woodSleepers,"sleepers wood",!1],[h.rust,this.rustMaterial,"rails",!1],[h.head,this.headMaterial,"rail heads",!1],[h.steel,this.steelMaterial,"catenary masts",!0],[h.wire,this.wireMaterial,"catenary wires",!1]];for(const[p,A,d,O]of u){const g=l.meshOf(p,A);g&&(g.name=`railways ${d}`,g.castShadow=O,g.receiveShadow=!0,this.group.add(g))}}clear(){for(const t of[...this.group.children])this.group.remove(t),t.geometry?.dispose();this.drawn=0,this.laid=[]}lineAt(t,s){let e;for(const{line:n,centre:o}of this.laid)for(let c=0;c<o.length-1;c++){const r=o[c],M=o[c+1],a=M.x-r.x,i=M.z-r.z,h=a*a+i*i,u=h===0?0:Math.max(0,Math.min(1,((t-r.x)*a+(s-r.z)*i)/h)),p=Math.hypot(t-(r.x+a*u),s-(r.z+i*u));p<=l.LINE_REACH_M&&(!e||p<e.distance)&&(e={line:n,distance:p})}return e?.line}mayMeet(t,s,e,n){const o=Math.hypot(s.x,s.z);if(o<1e-6)return this.lineAt(t.x,t.z)!==void 0;const c=s.x/o,r=s.z/o,M=l.LINE_REACH_M;for(const{centre:a}of this.laid)for(let i=0;i<a.length-1;i++){const h=a[i],u=a[i+1];for(const p of[0,.5,1]){const A=h.x+(u.x-h.x)*p,d=h.z+(u.z-h.z)*p,O=(A-t.x)*c+(d-t.z)*r;if(O<0)continue;const g=Math.abs((A-t.x)*r-(d-t.z)*c),_=Math.hypot(u.x-h.x,u.z-h.z)/2;if(g>M+_)continue;if(t.y+s.y*(O/o)<=e(A,d)+n)return!0}}return!1}contactHeightM(t){if(!(t.electrification!=="overhead"||t.kind==="subway"||t.kind==="funicular"))return l.catenaryOf(t).contactM}static catenaryOf(t){return t.kind==="tram"?l.CATENARY.tram:t.highSpeed?l.CATENARY.highSpeed:t.service?l.CATENARY.service:l.CATENARY.rail}dispose(){this.clear();for(const t of[this.ballastMaterial,this.earthMaterial,this.deckMaterial,this.concreteSleepers,this.woodSleepers,this.rustMaterial,this.headMaterial,this.steelMaterial,this.wireMaterial])t.dispose()}static within(t,s){if(!Number.isFinite(s))return!0;const e=s*1.1+100;return t.some((n,o)=>Math.hypot(n.x,n.z)<=e||o>0&&Math.hypot((n.x+t[o-1].x)/2,(n.z+t[o-1].z)/2)<=e)}static altitudeOffset(t,s){const e=[];for(const{line:n,path:o}of t)if(n.level===0)for(const c of o)c.altitudeM!==void 0&&e.push(s(c.x,c.z)-c.altitudeM);if(!(e.length<5))return e.sort((n,o)=>n-o),e[Math.floor(e.length/2)]}layoutOf(t,s){const e=[];for(let c=0;c<s.length-1;c++){const r=s[c],M=s[c+1],a=Math.max(1,Math.ceil(Math.hypot(M.x-r.x,M.z-r.z)/this.stepM));for(let i=0;i<a;i++){const h=i/a,u=r.altitudeM!==void 0&&M.altitudeM!==void 0?r.altitudeM+(M.altitudeM-r.altitudeM)*h:void 0;e.push({x:r.x+(M.x-r.x)*h,z:r.z+(M.z-r.z)*h,altitudeM:u})}}if(e.push(s[s.length-1]),e.length<2)return;const n=[0];for(let c=1;c<e.length;c++)n.push(n[c-1]+Math.hypot(e[c].x-e[c-1].x,e[c].z-e[c-1].z));if(n[n.length-1]<.5)return;const o=e.map((c,r)=>{const M=e[Math.max(0,r-1)],a=e[Math.min(e.length-1,r+1)],i=a.x-M.x,h=a.z-M.z,u=Math.hypot(i,h);return u<1e-6?{x:1,z:0}:{x:i/u,z:h/u}});return{kind:t.kind,...t.highSpeed?{highSpeed:!0}:{},level:t.level,centre:e,along:n,dir:o}}lay(t,s,e,n){const o=t.highSpeed?l.TRACK_SPACING_M.highSpeed:l.TRACK_SPACING_M[t.kind],c=Math.min(8,Math.max(1,t.tracks)),r=Array.from({length:c},(g,_)=>(_-(c-1)/2)*o),M=t.kind==="tram",a=M?0:l.BALLAST_HEIGHT_M,i=l.LIFT_M,h=(g,_,f)=>({x:s.centre[g].x-s.dir[g].z*_,y:s.y[g]+f,z:s.centre[g].z+s.dir[g].x*_}),u=s.centre.map((g,_)=>_);if(!M){const g=l.SLEEPER_LENGTH_M/2+l.BALLAST_SHOULDER_M+(r[r.length-1]??0),_=u.map(x=>h(x,g,a+i)),f=u.map(x=>h(x,-g,a+i));if(n.ballast.strip(_,f),t.level===0){const x=g+a*l.BALLAST_SLOPE;for(const E of[1,-1]){const z=[],v=[];let m=!1;for(const L of u){const C=h(L,E*x,i),S=e(C.x,C.z)+i,T=C.y-S;T<0&&(C.y=Math.min(S,s.y[L]+a-.05+i)),z.push(C);const I=h(L,E*(x+Math.max(0,T)*l.BANK_SLOPE),i);I.y=Math.min(e(I.x,I.z)+i,C.y),C.y-I.y>.02&&(m=!0),v.push(I)}const b=E>0?_:f;E>0?n.ballast.strip(z,b):n.ballast.strip(b,z),m&&(E>0?n.earth.strip(v,z):n.earth.strip(z,v))}}else{const x=-l.DECK_DEPTH_M,E=g+.15,z=u.map(L=>h(L,E,a+i+.1)),v=u.map(L=>h(L,-E,a+i+.1)),m=u.map(L=>h(L,E,x)),b=u.map(L=>h(L,-E,x));n.deck.strip(m,z),n.deck.strip(v,b),n.deck.strip(b,m),n.deck.strip(z,u.map(L=>h(L,g,a+i+.1))),n.deck.strip(u.map(L=>h(L,-g,a+i+.1)),v)}}const p=t.service?n.wood:n.concrete,A=t.gaugeMm/2e3+l.RAIL_HEAD_M/2,d=M?l.TRAM_RAIL_HEIGHT_M:l.RAIL_HEIGHT_M,O=a+i;for(const g of r){if(!M){const _=l.SLEEPER_LENGTH_M/2;p.strip(u.map(f=>h(f,g+_,O+.004)),u.map(f=>h(f,g-_,O+.004)),s.along)}for(const _ of[1,-1]){const f=g+_*A,x=l.RAIL_HEAD_M/2,E=u.map(v=>h(v,f+x,O+d)),z=u.map(v=>h(v,f-x,O+d));n.head.strip(E,z),n.rust.strip(u.map(v=>h(v,f+x,O)),E),n.rust.strip(z,u.map(v=>h(v,f-x,O)))}}t.electrification==="overhead"&&t.kind!=="subway"&&t.kind!=="funicular"&&this.catenary(t,s,r,O+d,h,e,n)}catenary(t,s,e,n,o,c,r){const M=l.catenaryOf(t),a=s.along[s.along.length-1],i=Math.max(1,Math.round(a/M.spanM)),h=a/i,u=Array.from({length:i},(E,z)=>(z+.5)*h),p=n+M.contactM,A=p+M.systemM,d=(M.systemM>0?A:p)+l.MAST_ABOVE_M,O=e[e.length-1],g=e.length>2,_=e.length===1?[1]:[1,-1],f=(E,z,v)=>{let m=0,b=s.along.length-2;for(;m<b;){const T=m+b+1>>1;s.along[T]<=E?m=T:b=T-1}const L=Math.min(1,Math.max(0,(E-s.along[m])/Math.max(1e-6,s.along[m+1]-s.along[m]))),C=o(m,z,v),S=o(m+1,z,v);return{x:C.x+(S.x-C.x)*L,y:C.y+(S.y-C.y)*L,z:C.z+(S.z-C.z)*L}};for(const E of u){const z=f(E,0,p);if(!(t.level===0&&c(z.x,z.z)>z.y)){for(const v of _){const m=v*(O+l.MAST_OFFSET_M),b=f(E,m,0);t.level===0&&(b.y=Math.min(b.y,c(b.x,b.z)));const L=f(E,m,d);if(r.steel.beam(b,L,l.MAST_SIDE_M),g)continue;const S=(_.length===1?e[0]:v*O)-v*.6,T=M.systemM>0?A:p+.3;r.steel.beam(f(E,m,T),f(E,S,T),l.ARM_SIDE_M),r.steel.beam(f(E,m,p-.4),f(E,S,T),l.ARM_SIDE_M)}if(g){const v=O+l.MAST_OFFSET_M;r.steel.beam(f(E,v,d-.2),f(E,-v,d-.2),l.MAST_SIDE_M*.8)}}}const x=[0,...u,a];for(const[E,z]of e.entries()){const v=m=>m===0||m===x.length-1?0:((m+E)%2===0?1:-1)*M.staggerM;for(let m=0;m<x.length-1;m++){const b=x[m],L=x[m+1];if(L-b<.1||(r.wire.beam(f(b,z+v(m),p),f(L,z+v(m+1),p),l.CONTACT_DIAMETER_M,!1),M.systemM<=0))continue;const C=4,S=T=>{const I=m===0?.5+T/2:m===x.length-2?T/2:T;return A-l.MESSENGER_SAG_M*4*I*(1-I)};for(let T=0;T<C;T++){const I=T/C,G=(T+1)/C;r.wire.beam(f(b+(L-b)*I,z,S(I)),f(b+(L-b)*G,z,S(G)),l.MESSENGER_DIAMETER_M,!1)}}}}static meshOf(t,s){if(t.indices.length===0)return;const e=new w;return e.setAttribute("position",new N(new Float32Array(t.positions),3)),t.along.length>0&&e.setAttribute("aAlong",new N(new Float32Array(t.along),1)),e.setIndex(new N(new Uint32Array(t.indices),1)),e.computeVertexNormals(),new U(e,s)}static lambert(t,s){return new k({color:new H(...t),...s?{polygonOffset:!0,polygonOffsetFactor:-2,polygonOffsetUnits:-2}:{}})}static pebbled(t){return t.onBeforeCompile=s=>{s.vertexShader=s.vertexShader.replace("#include <common>",`#include <common>
|
|
2
2
|
varying vec3 vBallast;`).replace("#include <begin_vertex>",`#include <begin_vertex>
|
|
3
3
|
vBallast = position;`),s.fragmentShader=s.fragmentShader.replace("#include <common>",`#include <common>
|
|
4
4
|
varying vec3 vBallast;
|