@rr0/ufoathome 0.201.0 → 0.202.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.
Files changed (186) hide show
  1. package/dist-embed-interview/InterviewMessages_en-BrnxG2rl.js +3 -0
  2. package/dist-embed-interview/InterviewMessages_es-Dxfjqrte.js +3 -0
  3. package/dist-embed-interview/InterviewMessages_fr-DIA-1qu8.js +3 -0
  4. package/dist-embed-interview/InterviewMessages_it-CYBEIKX-.js +3 -0
  5. package/dist-embed-interview/rr0-interview.mjs +10 -6
  6. package/{dist-embed-sighting/AuroraSimulation-C9hvCV0W.js → dist-embed-scene/AuroraSimulation-Dh4kZW1x.js} +7 -2
  7. package/dist-embed-scene/rr0-scene.mjs +49 -45
  8. package/{dist-embed-scene/AuroraSimulation-BZpjImM0.js → dist-embed-sighting/AuroraSimulation-C7LAHgWM.js} +7 -2
  9. package/dist-embed-sighting/{CaseReportExport-DVVsc8gA.js → CaseReportExport-CkWf0HNx.js} +1 -1
  10. package/dist-embed-sighting/{InterviewElement-BduwyUn5.js → InterviewElement-B_ULRy5z.js} +9 -5
  11. package/dist-embed-sighting/InterviewMessages_en-BrnxG2rl.js +3 -0
  12. package/dist-embed-sighting/InterviewMessages_es-Dxfjqrte.js +3 -0
  13. package/dist-embed-sighting/InterviewMessages_fr-DIA-1qu8.js +3 -0
  14. package/dist-embed-sighting/InterviewMessages_it-CYBEIKX-.js +3 -0
  15. package/dist-embed-sighting/rr0-sighting.mjs +52 -48
  16. package/dist-embed-sighting-editor/{AdsbLolArchiveProvider-CWpyBqG3.js → AdsbLolArchiveProvider-Bz1OjSjY.js} +1 -1
  17. package/dist-embed-sighting-editor/{AirshipEditor-BvnVNcF4.js → AirshipEditor-BlJXyxlr.js} +1 -1
  18. package/dist-embed-sighting-editor/{AirshipFlight-CB1Quf68.js → AirshipFlight-Cx40Y8JT.js} +1 -1
  19. package/dist-embed-sighting-editor/{Aurora-BRXvgyRM.js → Aurora-Ldk66p1A.js} +1 -1
  20. package/dist-embed-sighting-editor/{AuroraEditor-JQ3kRqrq.js → AuroraEditor-CGSomAFk.js} +1 -1
  21. package/dist-embed-sighting-editor/{AuroraSimulation-i64MFW2z.js → AuroraSimulation-vKcv2Hue.js} +7 -2
  22. package/dist-embed-sighting-editor/{BallesterGuaspAssessor-BaKKAdY3.js → BallesterGuaspAssessor-Bylahnc2.js} +1 -1
  23. package/dist-embed-sighting-editor/{BalloonEditor-C2oHClW7.js → BalloonEditor-CgO4LaWn.js} +1 -1
  24. package/dist-embed-sighting-editor/{BalloonFlight-B9A6MoCj.js → BalloonFlight-hLr_4TFU.js} +1 -1
  25. package/dist-embed-sighting-editor/{BeamEditor-CW7mTQjS.js → BeamEditor-B8qreA3j.js} +1 -1
  26. package/dist-embed-sighting-editor/{BeamSystem-CSfJjLCb.js → BeamSystem-D0hrju5J.js} +1 -1
  27. package/dist-embed-sighting-editor/{BirdEditor-BdxhCoW9.js → BirdEditor-BNzrfSqX.js} +1 -1
  28. package/dist-embed-sighting-editor/{BirdFlock-DCbrukNp.js → BirdFlock-iSovVEZd.js} +1 -1
  29. package/dist-embed-sighting-editor/{BodyEditor-DE8ZQrqe.js → BodyEditor-Bd_pKafG.js} +2 -2
  30. package/dist-embed-sighting-editor/{CaseElement-C46wM-nU.js → CaseElement-DPlro-7S.js} +3 -3
  31. package/dist-embed-sighting-editor/{CaseReportExport-UVrInf6H.js → CaseReportExport-C1g5C8hi.js} +2 -2
  32. package/dist-embed-sighting-editor/{ContrailSystem-CDSSxouG.js → ContrailSystem-D3tXAg2r.js} +1 -1
  33. package/dist-embed-sighting-editor/{ControlPasses-CsOVa-jq.js → ControlPasses-BMEmppip.js} +1 -1
  34. package/dist-embed-sighting-editor/{CoverageAssessor-DWY_gJJX.js → CoverageAssessor-uzQnTEH8.js} +1 -1
  35. package/dist-embed-sighting-editor/{DroneEditor-DgeuaHdb.js → DroneEditor-BFsArPKi.js} +1 -1
  36. package/dist-embed-sighting-editor/{DroneFlight-CFztr-9j.js → DroneFlight-B96pVrY1.js} +1 -1
  37. package/dist-embed-sighting-editor/{DroneParameters-CHmDmRoC.js → DroneParameters-DW-enQUo.js} +1 -1
  38. package/dist-embed-sighting-editor/{Flightradar24Provider-e6_3o9Jf.js → Flightradar24Provider-CBGkjw03.js} +1 -1
  39. package/dist-embed-sighting-editor/GLTFLoader-2Zbfb3kh.js +1 -0
  40. package/dist-embed-sighting-editor/{GenerativeKitMessages-CmqG-T2c.js → GenerativeKitMessages-DmeZ_YZO.js} +1 -1
  41. package/dist-embed-sighting-editor/{GeoExportTexts-Wjc5YKlM.js → GeoExportTexts-Cp95Dg-h.js} +1 -1
  42. package/dist-embed-sighting-editor/{GeoJsonExport-BSPGzTbG.js → GeoJsonExport-CdadOwd2.js} +1 -1
  43. package/dist-embed-sighting-editor/{GeographicFigures-D_TfLkj9.js → GeographicFigures-Bo9rsT_L.js} +1 -1
  44. package/dist-embed-sighting-editor/{HeadlightSystem-DljWmzj5.js → HeadlightSystem-CBmEcC9f.js} +1 -1
  45. package/dist-embed-sighting-editor/{HynekAssessor-BCDwoOI9.js → HynekAssessor-uub2VxTi.js} +1 -1
  46. package/dist-embed-sighting-editor/InterviewEditorElement-_1fa2bG7.js +294 -0
  47. package/dist-embed-sighting-editor/{InterviewElement-DDa53uMq.js → InterviewElement-Ala811KB.js} +6 -2
  48. package/dist-embed-sighting-editor/InterviewMessages_en-BrnxG2rl.js +3 -0
  49. package/dist-embed-sighting-editor/InterviewMessages_es-Dxfjqrte.js +3 -0
  50. package/dist-embed-sighting-editor/InterviewMessages_fr-DIA-1qu8.js +3 -0
  51. package/dist-embed-sighting-editor/InterviewMessages_it-CYBEIKX-.js +3 -0
  52. package/dist-embed-sighting-editor/{KmlExport-B46AfaoJ.js → KmlExport-DIxM5Hpx.js} +1 -1
  53. package/dist-embed-sighting-editor/{LanternEditor-CkbeitJh.js → LanternEditor-CjQVFowY.js} +1 -1
  54. package/dist-embed-sighting-editor/{LaserBeam-Ber-PT8j.js → LaserBeam-BVc8Mvhr.js} +1 -1
  55. package/dist-embed-sighting-editor/{LaunchEditor-BsvHahqK.js → LaunchEditor-Cz8Mzo4a.js} +1 -1
  56. package/dist-embed-sighting-editor/{LaunchPlume-BmPMeGMN.js → LaunchPlume-CvBhTPgN.js} +1 -1
  57. package/dist-embed-sighting-editor/{LaunchSimulation-g-ETWhEH.js → LaunchSimulation-CkZIG-3P.js} +1 -1
  58. package/dist-embed-sighting-editor/{ModelSource-DOUnBBhu.js → ModelSource-B153oeTu.js} +1 -1
  59. package/dist-embed-sighting-editor/{ModelThumbnails-TwG1snwZ.js → ModelThumbnails-BUL_OLFv.js} +1 -1
  60. package/dist-embed-sighting-editor/{ModelViewer-Y_B6eM4z.js → ModelViewer-BzBLcY9s.js} +1 -1
  61. package/dist-embed-sighting-editor/{ModuleConformance-CO1S9pa3.js → ModuleConformance-Cr6fM28A.js} +2 -2
  62. package/dist-embed-sighting-editor/{ModuleSession-VLS0tjAb.js → ModuleSession-WA6lqfV6.js} +3 -3
  63. package/dist-embed-sighting-editor/ModuleThree-CB_EjTOI.js +1 -0
  64. package/dist-embed-sighting-editor/{ModulesPanelElement--YQ0QtcW.js → ModulesPanelElement-BsRg3mzl.js} +3 -3
  65. package/dist-embed-sighting-editor/{NearestApproach-C_8Uvp6i.js → NearestApproach-Bnx9Ld5_.js} +1 -1
  66. package/dist-embed-sighting-editor/PictureRegistration-D8fDZm4v.js +1 -0
  67. package/dist-embed-sighting-editor/{PoherAssessor-DtDcuhWK.js → PoherAssessor-CNj_Nyci.js} +1 -1
  68. package/dist-embed-sighting-editor/{QuestionnaireFeed-CvLtuLIH.js → QuestionnaireFeed-B0j8W4JM.js} +1 -1
  69. package/dist-embed-sighting-editor/QuestionnaireForm-lzn9MPr2.js +1 -0
  70. package/dist-embed-sighting-editor/{QuestionnaireImport-BYj5QoJS.js → QuestionnaireImport-BmcxlQBq.js} +1 -1
  71. package/dist-embed-sighting-editor/RailwaySystem-6bwbv8UB.js +41 -0
  72. package/dist-embed-sighting-editor/{ReentryEditor-CW8H7KaA.js → ReentryEditor-BWCK2g_s.js} +1 -1
  73. package/dist-embed-sighting-editor/{ReentrySimulation-DVl__RjO.js → ReentrySimulation-B09JXMu5.js} +1 -1
  74. package/dist-embed-sighting-editor/ReferenceSystem-8QgwbbAG.js +1 -0
  75. package/dist-embed-sighting-editor/{RoadMarkings-DJraHdS6.js → RoadMarkings-Dl6zVQIx.js} +1 -1
  76. package/dist-embed-sighting-editor/ScenarioReadings-DyMshXS4.js +1 -0
  77. package/dist-embed-sighting-editor/{ScenarioSweep-Ddtuo_Af.js → ScenarioSweep-ByqOTfs2.js} +1 -1
  78. package/dist-embed-sighting-editor/{SceneNames_en-p5YNYZhA.js → SceneNames_en-c5zNw0Hi.js} +1 -1
  79. package/dist-embed-sighting-editor/{SceneNames_es-DlMqYLL9.js → SceneNames_es-CDjoBwy_.js} +1 -1
  80. package/dist-embed-sighting-editor/{SceneNames_fr-lFA7hY3x.js → SceneNames_fr-CoZNmFu3.js} +1 -1
  81. package/dist-embed-sighting-editor/{SceneNames_it-CDwvX1Nw.js → SceneNames_it-CVEahBpq.js} +1 -1
  82. package/dist-embed-sighting-editor/{SearchlightEditor-BSI8hB1V.js → SearchlightEditor-BpwPOhJ6.js} +1 -1
  83. package/dist-embed-sighting-editor/{SearchlightSystem-DHfVi2np.js → SearchlightSystem-CEG52QDx.js} +1 -1
  84. package/dist-embed-sighting-editor/{SightingElement-T0x4j9Zt.js → SightingElement-BQdiez39.js} +3 -3
  85. package/dist-embed-sighting-editor/{SkyLantern-Dl4yl-lc.js → SkyLantern-D6bru_e_.js} +1 -1
  86. package/dist-embed-sighting-editor/{TraceSystem-Dbu_bgfE.js → TraceSystem-DZMUxSn-.js} +2 -2
  87. package/dist-embed-sighting-editor/{UfoMessages_en-BAuHAGgq.js → UfoMessages_en-DdCKc-Ez.js} +1 -1
  88. package/dist-embed-sighting-editor/{VideoButton-C8eRmv7A.js → VideoButton-CzJg9lBG.js} +1 -1
  89. package/dist-embed-sighting-editor/{WaterSystem-DpJCe_2Q.js → WaterSystem-CB5jE7qB.js} +2 -2
  90. package/dist-embed-sighting-editor/geipan-qt-2025-B_RUiH8B.js +7 -0
  91. package/dist-embed-sighting-editor/{interviewImport-zzDGCbXd.js → interviewImport-D4P6e28u.js} +1 -1
  92. package/dist-embed-sighting-editor/{interviewJson-DngUPqK8.js → interviewJson-BJF9C-Rb.js} +1 -1
  93. package/dist-embed-sighting-editor/interviewSchema-r5bW7skq.js +1 -0
  94. package/dist-embed-sighting-editor/rr0-sighting-editor.mjs +421 -415
  95. package/dist-embed-sighting-editor/{surroundingsSources-lvh4Rw5C.js → surroundingsSources-CqL7lcmF.js} +1 -1
  96. package/dist-embed-sighting-editor/{trafficRuntime-Drx7CE9H.js → trafficRuntime-Bu3my6S4.js} +2 -2
  97. package/dist-embed-ufoathome/{AdsbLolArchiveProvider-CqedGYi5.js → AdsbLolArchiveProvider-KbJPyJ97.js} +1 -1
  98. package/dist-embed-ufoathome/{Aurora-CpZx9hQ3.js → Aurora-C_mCH4JM.js} +1 -1
  99. package/dist-embed-ufoathome/{AuroraEditor-D2v8sWVE.js → AuroraEditor-Dzvgh6e0.js} +1 -1
  100. package/dist-embed-ufoathome/{AuroraSimulation-DdSP66LD.js → AuroraSimulation-BRUnHmlp.js} +7 -2
  101. package/dist-embed-ufoathome/{BallesterGuaspAssessor-C4IktJ1l.js → BallesterGuaspAssessor-DurdUgbG.js} +1 -1
  102. package/dist-embed-ufoathome/{BeamEditor-CuW3LVO-.js → BeamEditor-Ccvx7l7x.js} +1 -1
  103. package/dist-embed-ufoathome/{BeamSystem-BPEYuCF4.js → BeamSystem-CPM8m17q.js} +1 -1
  104. package/dist-embed-ufoathome/{BodyEditor-COMX-T65.js → BodyEditor-BG--NjnZ.js} +1 -1
  105. package/dist-embed-ufoathome/{CaseEditorElement-C5BHP8jT.js → CaseEditorElement-0J_TCeiq.js} +64 -62
  106. package/dist-embed-ufoathome/{CaseElement-CIZvyRVi.js → CaseElement-CRXPyMMR.js} +3 -3
  107. package/dist-embed-ufoathome/{CaseReportExport-BFbswUIB.js → CaseReportExport-DKrBXPgZ.js} +3 -3
  108. package/dist-embed-ufoathome/{ColumnResize-Dh6Xyspd.js → ColumnResize-DV-byvDt.js} +6 -6
  109. package/dist-embed-ufoathome/{ControlPasses-CnL1GmT-.js → ControlPasses-CKvTCqTI.js} +1 -1
  110. package/dist-embed-ufoathome/{CoverageAssessor-CiqUEJkN.js → CoverageAssessor-MeOMUjkZ.js} +1 -1
  111. package/dist-embed-ufoathome/{Flightradar24Provider-_tNmWf11.js → Flightradar24Provider-DxTfswSh.js} +1 -1
  112. package/dist-embed-ufoathome/{GLTFLoader-BLk8prLt.js → GLTFLoader-pi-JKaNa.js} +1 -1
  113. package/dist-embed-ufoathome/{GeoJsonExport-DkPKk-7q.js → GeoJsonExport-iyhoKOUU.js} +1 -1
  114. package/dist-embed-ufoathome/{GeographicFigures-l-PfHdSR.js → GeographicFigures-DBmuFlvH.js} +1 -1
  115. package/dist-embed-ufoathome/{HynekAssessor-BhnvqsYz.js → HynekAssessor-Bda6csgM.js} +1 -1
  116. package/dist-embed-ufoathome/InterviewAttachments-BP6Prvdu.js +1 -0
  117. package/dist-embed-ufoathome/InterviewEditorElement-BA060rqJ.js +294 -0
  118. package/dist-embed-ufoathome/{InterviewElement-CuRmQ0d3.js → InterviewElement-DvqsCA3I.js} +6 -2
  119. package/dist-embed-ufoathome/InterviewMessages_en-BrnxG2rl.js +3 -0
  120. package/dist-embed-ufoathome/InterviewMessages_es-Dxfjqrte.js +3 -0
  121. package/dist-embed-ufoathome/InterviewMessages_fr-DIA-1qu8.js +3 -0
  122. package/dist-embed-ufoathome/InterviewMessages_it-CYBEIKX-.js +3 -0
  123. package/dist-embed-ufoathome/{KmlExport-BUl3gOrw.js → KmlExport-DEPgRRWe.js} +1 -1
  124. package/dist-embed-ufoathome/{LaserBeam-C7glTvQN.js → LaserBeam--dquPX_h.js} +1 -1
  125. package/dist-embed-ufoathome/{LaunchEditor-DvudtAzp.js → LaunchEditor-D3P0GkLr.js} +1 -1
  126. package/dist-embed-ufoathome/{LaunchPlume-CrDBzsQe.js → LaunchPlume-w4l4TR4A.js} +1 -1
  127. package/dist-embed-ufoathome/{LaunchSimulation-DyOA4lPb.js → LaunchSimulation-BpZd-Nov.js} +1 -1
  128. package/dist-embed-ufoathome/{ModelSource-CoT4mxTx.js → ModelSource-Csnm3RH_.js} +1 -1
  129. package/dist-embed-ufoathome/{ModelThumbnails-t59SZ3Vn.js → ModelThumbnails-Cnt2GxTb.js} +1 -1
  130. package/dist-embed-ufoathome/{ModelViewer-DEdruEtl.js → ModelViewer-DOfAkPgK.js} +1 -1
  131. package/dist-embed-ufoathome/{ModulesPanelElement-N-ccpGxl.js → ModulesPanelElement-DH1oroWm.js} +2 -2
  132. package/dist-embed-ufoathome/{NearestApproach-Do15yfeg.js → NearestApproach-DJ98M81-.js} +1 -1
  133. package/dist-embed-ufoathome/{PoherAssessor-Cs8-ZBge.js → PoherAssessor-4zSdFnFp.js} +1 -1
  134. package/dist-embed-ufoathome/QuestionnaireFeed-W69udpmT.js +1 -0
  135. package/dist-embed-ufoathome/QuestionnaireForm-U78nFPn5.js +1 -0
  136. package/dist-embed-ufoathome/{QuestionnaireImport-Cx1dQiha.js → QuestionnaireImport-Q5uHxQwU.js} +1 -1
  137. package/dist-embed-ufoathome/{ReentryEditor-CJUFkVFO.js → ReentryEditor-DEi9nT0z.js} +1 -1
  138. package/dist-embed-ufoathome/{ReentrySimulation-B5QcdOTq.js → ReentrySimulation-CSO1vgro.js} +1 -1
  139. package/dist-embed-ufoathome/{ReferenceSystem-DyzOUClN.js → ReferenceSystem--tiMGm4e.js} +1 -1
  140. package/dist-embed-ufoathome/ScenarioReadings-Dzdgopl3.js +1 -0
  141. package/dist-embed-ufoathome/ScenarioSweep-CMcleprC.js +1 -0
  142. package/dist-embed-ufoathome/{SearchlightEditor-CPDNpfNC.js → SearchlightEditor--1uL8bTa.js} +1 -1
  143. package/dist-embed-ufoathome/{SearchlightSystem-Ca0rZcXv.js → SearchlightSystem-7bntVtp_.js} +1 -1
  144. package/dist-embed-ufoathome/{ShareDialogElement-CBeU9ChH.js → ShareDialogElement-Dlfy9NCE.js} +52 -48
  145. package/dist-embed-ufoathome/{SightingElement-BveOM4nF.js → SightingElement-BJSNmFM6.js} +2 -2
  146. package/dist-embed-ufoathome/{TraceSystem-CoHX04R3.js → TraceSystem-Cq2TgP-u.js} +1 -1
  147. package/dist-embed-ufoathome/{VideoButton-DNQmWtfv.js → VideoButton-MRJlVNm_.js} +1 -1
  148. package/dist-embed-ufoathome/geipan-qt-2025-B_RUiH8B.js +7 -0
  149. package/dist-embed-ufoathome/interviewSchema-r5bW7skq.js +1 -0
  150. package/dist-embed-ufoathome/rr0-ufoathome.mjs +4 -4
  151. package/dist-embed-ufoathome/{surroundingsSources-C823p3dG.js → surroundingsSources--qffL_nJ.js} +1 -1
  152. package/dist-embed-ufoathome/{trafficRuntime-DtXb9B2f.js → trafficRuntime-CTCGr90P.js} +1 -1
  153. package/package.json +1 -1
  154. package/dist-embed-interview/InterviewMessages_en-BRmuWrAg.js +0 -1
  155. package/dist-embed-interview/InterviewMessages_es-BTotimwY.js +0 -1
  156. package/dist-embed-interview/InterviewMessages_fr-DBCdGB0r.js +0 -1
  157. package/dist-embed-interview/InterviewMessages_it-B5EyMD-k.js +0 -1
  158. package/dist-embed-sighting/InterviewMessages_en-BRmuWrAg.js +0 -1
  159. package/dist-embed-sighting/InterviewMessages_es-BTotimwY.js +0 -1
  160. package/dist-embed-sighting/InterviewMessages_fr-DBCdGB0r.js +0 -1
  161. package/dist-embed-sighting/InterviewMessages_it-B5EyMD-k.js +0 -1
  162. package/dist-embed-sighting-editor/GLTFLoader-Df-r7_lf.js +0 -1
  163. package/dist-embed-sighting-editor/InterviewEditorElement-KHpgfy3k.js +0 -277
  164. package/dist-embed-sighting-editor/InterviewMessages_en-BRmuWrAg.js +0 -1
  165. package/dist-embed-sighting-editor/InterviewMessages_es-BTotimwY.js +0 -1
  166. package/dist-embed-sighting-editor/InterviewMessages_fr-DBCdGB0r.js +0 -1
  167. package/dist-embed-sighting-editor/InterviewMessages_it-B5EyMD-k.js +0 -1
  168. package/dist-embed-sighting-editor/ModuleThree-DQ2dT7XW.js +0 -1
  169. package/dist-embed-sighting-editor/PictureRegistration-Br0xjLE2.js +0 -1
  170. package/dist-embed-sighting-editor/QuestionnaireForm-DA6LPvBt.js +0 -1
  171. package/dist-embed-sighting-editor/RailwaySystem-eT-ZKfZl.js +0 -41
  172. package/dist-embed-sighting-editor/ReferenceSystem-DxVYO7g9.js +0 -1
  173. package/dist-embed-sighting-editor/ScenarioReadings-BYqlpLo8.js +0 -1
  174. package/dist-embed-sighting-editor/geipan-qt-2025-j-yGY7EN.js +0 -7
  175. package/dist-embed-sighting-editor/interviewSchema-DRWvRSL2.js +0 -1
  176. package/dist-embed-ufoathome/InterviewEditorElement-iw2lnwx8.js +0 -277
  177. package/dist-embed-ufoathome/InterviewMessages_en-BRmuWrAg.js +0 -1
  178. package/dist-embed-ufoathome/InterviewMessages_es-BTotimwY.js +0 -1
  179. package/dist-embed-ufoathome/InterviewMessages_fr-DBCdGB0r.js +0 -1
  180. package/dist-embed-ufoathome/InterviewMessages_it-B5EyMD-k.js +0 -1
  181. package/dist-embed-ufoathome/QuestionnaireFeed-BfvRSPoo.js +0 -1
  182. package/dist-embed-ufoathome/QuestionnaireForm-ByFmq67M.js +0 -1
  183. package/dist-embed-ufoathome/ScenarioReadings-CfZehU_P.js +0 -1
  184. package/dist-embed-ufoathome/ScenarioSweep-CDumnmq2.js +0 -1
  185. package/dist-embed-ufoathome/geipan-qt-2025-j-yGY7EN.js +0 -7
  186. package/dist-embed-ufoathome/interviewSchema-DRWvRSL2.js +0 -1
@@ -1 +1 @@
1
- import{Q as w,aO as M,z as g,L as c,aP as y,M as k,K as O,B as T,a as b,P as E,ac as I}from"./three.module-CbaHqYFq.js";import{R as d}from"./ReferenceTimeline-2kBldQeG.js";import{g as D}from"./GeoProjection-DvqDbRIx.js";import{P as m,a as f}from"./PictureFetch-C3wgf1ZV.js";import{b3 as x}from"./ShareDialogElement-CBeU9ChH.js";import"./rr0-ufoathome.mjs";import"./Sighting-B7bsiTIQ.js";import"./VisualAids-DI-hEL46.js";import"./SaidPosition-OJEYhVKN.js";import"./Decor-Dn-cvniW.js";import"./RecordingIssue-BlWT8Xsu.js";import"./xyzImageryRaster-Dhxs0B26.js";import"./Obstacles-v9SkfBD7.js";const v=x.reference,u=800,l=Math.PI/180;class r{constructor(t,i,s=r.fetchImage,e=r.openVideo){this.scene=t,this.onImageLoaded=i,this.loadImage=s,this.loadVideo=e}meshes=new Map;signatures=new Map;images=new Map;loading=new Map;failed=new Map;references=[];views=new Map;shown=!0;observerAt;clock={t:0,playing:!1,timeScale:1};static PRESENT_WITHIN_M=2;static GONE_BEYOND_M=20;static presenceAt(t,i){if(!t.from||!i)return 1;const s=D(i.lat,i.lng,t.from.lat,t.from.lng),a=(Math.hypot(s.x,s.z)-r.PRESENT_WITHIN_M)/(r.GONE_BEYOND_M-r.PRESENT_WITHIN_M),o=Math.min(Math.max(a,0),1);return 1-o*o*(3-2*o)}set(t,i=this.views,s){this.references=t,this.observerAt=s,this.views=i;const e=new Set(t.map(a=>a.id));for(const[a,o]of this.meshes)e.has(a)||(this.dispose(o),this.meshes.delete(a),this.signatures.delete(a));for(const[a,o]of this.images){const n=t.find(p=>p.id===a);if(n&&n.src===o.texture.userData.src&&n.kind==="video"==(o.video!==void 0))continue;r.release(o),this.images.delete(a);const h=this.meshes.get(a);h&&(this.dispose(h),this.meshes.delete(a),this.signatures.delete(a))}for(const a of t){const o=this.images.get(a.id);if(!o){this.load(a);continue}this.build(a,o)}this.follow()}setTime(t){this.clock=t,this.follow()}setShown(t){this.shown=t;for(const i of this.meshes.values())i.visible=t&&this.opacityOf(i.userData.id)>0}setView(t,i){this.views.set(t,i);const s=this.meshes.get(t);s&&this.applyOpacity(s,t)}layer=v;get any(){for(const t of this.meshes.values())if(t.visible)return!0;return!1}place(t){const i=this.held;i&&t.getWorldQuaternion(this.cameraTurn);for(const s of this.meshes.values()){if(!s.visible)continue;s.position.copy(t.position);const e=i?.get(s);e&&s.quaternion.copy(this.cameraTurn).multiply(e),s.updateMatrixWorld()}}hold(t){t.getWorldQuaternion(this.cameraTurn);const i=this.cameraTurn.clone().invert();this.held=new Map([...this.meshes.values()].map(s=>[s,i.clone().multiply(s.quaternion)])),this.registered=new Map([...this.meshes.values()].map(s=>[s,s.quaternion.clone()]))}release(){if(this.held){for(const[t,i]of this.registered??[])t.quaternion.copy(i);this.held=void 0,this.registered=void 0}}registered;held;cameraTurn=new w;get furthestM(){return this.meshes.size>0?u:0}directionOfPixel(t,i,s,e){const a=this.images.get(t.id),o=a?a.width/a.height:1,n=d.registrationAt(t,this.clock.t),h=Math.tan(n.fovDeg/2*l),p=h*o;return e.set((i*2-1)*p,(1-s*2)*h,-1).normalize(),e.applyQuaternion(r.orientation(n))}aspectOf(t){const i=this.images.get(t);return i?i.width/i.height:void 0}failureOf(t){return this.failed.get(t)}follow(){for(const t of this.references){const i=this.meshes.get(t.id),s=this.images.get(t.id)?.video;s&&this.sync(t,s),i&&(t.registrationTrack?.length&&r.point(i,t,d.registrationAt(t,this.clock.t)),t.kind==="video"&&this.applyOpacity(i,t.id))}}sync(t,i){const s=d.mediaSecondsAt(t,this.clock.t,this.clock.timeScale,Number.isFinite(i.duration)?i.duration:void 0);if(s===void 0){i.paused||i.pause();return}const e=d.command(i.currentTime,s,this.clock.playing,d.rateOf(t));i.playbackRate=e.rate,e.seekS!==void 0&&!i.seeking&&(i.currentTime=e.seekS),e.play&&i.paused&&i.play().catch(()=>{}),!e.play&&!i.paused&&i.pause()}load(t){const i=t.src;if(this.loading.has(t.id)||this.failed.has(i))return;const s=t.kind==="video",a=(s?this.loadVideo(i,()=>this.onVideoFrame()):this.loadImage(i)).then(o=>{this.loading.delete(t.id);const n=this.references.find(h=>h.id===t.id);if(!n||n.src!==i||n.kind==="video"!==s){r.release(o);return}o.texture.userData.src=i,this.images.set(t.id,o),this.build(n,o),this.follow(),this.onImageLoaded()},o=>{this.loading.delete(t.id),this.failed.set(i,m.failureOf(o)),this.onImageLoaded()});this.loading.set(t.id,a)}onVideoFrame(){this.follow(),this.onFrame?.()}onFrame;static openVideo(t,i){return new Promise((s,e)=>{const a=document.createElement("video");a.crossOrigin="anonymous",a.muted=!0,a.playsInline=!0,a.preload="auto",a.addEventListener("loadeddata",()=>{const o=new M(a);o.colorSpace=g,o.minFilter=c,o.magFilter=c,o.generateMipmaps=!1,a.addEventListener("seeked",i);const n=()=>{a.paused&&i(),a.src&&a.requestVideoFrameCallback(n)};"requestVideoFrameCallback"in a&&a.requestVideoFrameCallback(n),s({texture:o,width:a.videoWidth,height:a.videoHeight,video:a})},{once:!0}),a.addEventListener("error",()=>{m.whyVideoUnread(t).then(o=>e(new f(t,o)))},{once:!0}),a.src=t})}static release(t){t.texture.dispose();const i=t.video;i&&(i.pause(),i.removeAttribute?.("src"),i.load?.())}static async fetchImage(t){const i=await m.blob(t),s=await createImageBitmap(i,{imageOrientation:"flipY"}).catch(()=>{throw new f(t,{kind:"notPicture"})}),e=new y(s);return e.flipY=!1,e.colorSpace=g,e.minFilter=c,e.magFilter=c,e.generateMipmaps=!1,e.needsUpdate=!0,{texture:e,width:s.width,height:s.height}}build(t,i){const s=r.signatureOf(t,i);let e=this.meshes.get(t.id);if(e&&this.signatures.get(t.id)===s){this.applyOpacity(e,t.id);return}e&&(this.dispose(e),this.meshes.delete(t.id)),e=new k(r.geometryOf(t,i),new O({map:i.texture,transparent:!0,depthTest:!1,depthWrite:!1,fog:!1,toneMapped:!1})),t.kind==="panorama"&&(e.material.side=T),e.frustumCulled=!1,e.layers.set(v),e.userData.id=t.id,r.point(e,t,d.registrationAt(t,this.clock.t)),this.scene.add(e),this.meshes.set(t.id,e),this.signatures.set(t.id,s),this.applyOpacity(e,t.id)}static geometryOf(t,i){if(t.kind==="panorama"){const o=new b(u,64,32,Math.PI/2,Math.PI*2),n=o.attributes.uv;for(let h=0;h<n.count;h++)n.setX(h,1-n.getX(h));return n.needsUpdate=!0,o}const s=2*u*Math.tan(t.registration.fovDeg/2*l),e=s*(i.width/Math.max(i.height,1)),a=new E(e,s);return a.translate(0,0,-u),a}static orientation({headingDeg:t,pitchDeg:i,rollDeg:s}){const e=new I;return e.rotation.set(i*l,-t*l,-(s??0)*l,"YXZ"),e.quaternion}static point(t,i,s){if(t.quaternion.copy(r.orientation(s)),i.kind==="panorama")return;const e=Math.tan(s.fovDeg/2*l)/Math.tan(i.registration.fovDeg/2*l);t.scale.set(e,e,1)}inTime(t){if(t.kind!=="video")return!0;const i=this.images.get(t.id)?.video?.duration;return d.mediaSecondsAt(t,this.clock.t,this.clock.timeScale,i!==void 0&&Number.isFinite(i)?i:void 0)!==void 0}opacityOf(t){const i=this.references.find(a=>a.id===t);if(i&&!this.inTime(i))return 0;const s=this.views.get(t),e=i?r.presenceAt(i,this.observerAt):1;return(s?.opacity??i?.opacity??0)*e}applyOpacity(t,i){const s=this.opacityOf(i);t.material.opacity=s,t.visible=this.shown&&s>0}static signatureOf(t,i){const{headingDeg:s,pitchDeg:e,rollDeg:a,fovDeg:o}=t.registration;return[t.kind,t.src,i.width,i.height,s,e,a??0,o].join("|")}dispose(t){this.scene.remove(t),t.geometry.dispose(),t.material.dispose()}disposeAll(){for(const t of this.meshes.values())this.dispose(t);this.meshes.clear(),this.signatures.clear();for(const t of this.images.values())r.release(t);this.images.clear()}}export{v as REFERENCE_LAYER,r as ReferenceSystem};
1
+ import{Q as w,aO as M,z as g,L as c,aP as y,M as k,K as O,B as T,a as b,P as E,ac as I}from"./three.module-CbaHqYFq.js";import{R as d}from"./ReferenceTimeline-2kBldQeG.js";import{g as D}from"./GeoProjection-DvqDbRIx.js";import{P as m,a as f}from"./PictureFetch-C3wgf1ZV.js";import{b3 as x}from"./ShareDialogElement-Dlfy9NCE.js";import"./rr0-ufoathome.mjs";import"./Sighting-B7bsiTIQ.js";import"./VisualAids-DI-hEL46.js";import"./SaidPosition-OJEYhVKN.js";import"./Decor-Dn-cvniW.js";import"./RecordingIssue-BlWT8Xsu.js";import"./xyzImageryRaster-Dhxs0B26.js";import"./Obstacles-v9SkfBD7.js";const v=x.reference,u=800,l=Math.PI/180;class r{constructor(t,i,s=r.fetchImage,e=r.openVideo){this.scene=t,this.onImageLoaded=i,this.loadImage=s,this.loadVideo=e}meshes=new Map;signatures=new Map;images=new Map;loading=new Map;failed=new Map;references=[];views=new Map;shown=!0;observerAt;clock={t:0,playing:!1,timeScale:1};static PRESENT_WITHIN_M=2;static GONE_BEYOND_M=20;static presenceAt(t,i){if(!t.from||!i)return 1;const s=D(i.lat,i.lng,t.from.lat,t.from.lng),a=(Math.hypot(s.x,s.z)-r.PRESENT_WITHIN_M)/(r.GONE_BEYOND_M-r.PRESENT_WITHIN_M),o=Math.min(Math.max(a,0),1);return 1-o*o*(3-2*o)}set(t,i=this.views,s){this.references=t,this.observerAt=s,this.views=i;const e=new Set(t.map(a=>a.id));for(const[a,o]of this.meshes)e.has(a)||(this.dispose(o),this.meshes.delete(a),this.signatures.delete(a));for(const[a,o]of this.images){const n=t.find(p=>p.id===a);if(n&&n.src===o.texture.userData.src&&n.kind==="video"==(o.video!==void 0))continue;r.release(o),this.images.delete(a);const h=this.meshes.get(a);h&&(this.dispose(h),this.meshes.delete(a),this.signatures.delete(a))}for(const a of t){const o=this.images.get(a.id);if(!o){this.load(a);continue}this.build(a,o)}this.follow()}setTime(t){this.clock=t,this.follow()}setShown(t){this.shown=t;for(const i of this.meshes.values())i.visible=t&&this.opacityOf(i.userData.id)>0}setView(t,i){this.views.set(t,i);const s=this.meshes.get(t);s&&this.applyOpacity(s,t)}layer=v;get any(){for(const t of this.meshes.values())if(t.visible)return!0;return!1}place(t){const i=this.held;i&&t.getWorldQuaternion(this.cameraTurn);for(const s of this.meshes.values()){if(!s.visible)continue;s.position.copy(t.position);const e=i?.get(s);e&&s.quaternion.copy(this.cameraTurn).multiply(e),s.updateMatrixWorld()}}hold(t){t.getWorldQuaternion(this.cameraTurn);const i=this.cameraTurn.clone().invert();this.held=new Map([...this.meshes.values()].map(s=>[s,i.clone().multiply(s.quaternion)])),this.registered=new Map([...this.meshes.values()].map(s=>[s,s.quaternion.clone()]))}release(){if(this.held){for(const[t,i]of this.registered??[])t.quaternion.copy(i);this.held=void 0,this.registered=void 0}}registered;held;cameraTurn=new w;get furthestM(){return this.meshes.size>0?u:0}directionOfPixel(t,i,s,e){const a=this.images.get(t.id),o=a?a.width/a.height:1,n=d.registrationAt(t,this.clock.t),h=Math.tan(n.fovDeg/2*l),p=h*o;return e.set((i*2-1)*p,(1-s*2)*h,-1).normalize(),e.applyQuaternion(r.orientation(n))}aspectOf(t){const i=this.images.get(t);return i?i.width/i.height:void 0}failureOf(t){return this.failed.get(t)}follow(){for(const t of this.references){const i=this.meshes.get(t.id),s=this.images.get(t.id)?.video;s&&this.sync(t,s),i&&(t.registrationTrack?.length&&r.point(i,t,d.registrationAt(t,this.clock.t)),t.kind==="video"&&this.applyOpacity(i,t.id))}}sync(t,i){const s=d.mediaSecondsAt(t,this.clock.t,this.clock.timeScale,Number.isFinite(i.duration)?i.duration:void 0);if(s===void 0){i.paused||i.pause();return}const e=d.command(i.currentTime,s,this.clock.playing,d.rateOf(t));i.playbackRate=e.rate,e.seekS!==void 0&&!i.seeking&&(i.currentTime=e.seekS),e.play&&i.paused&&i.play().catch(()=>{}),!e.play&&!i.paused&&i.pause()}load(t){const i=t.src;if(this.loading.has(t.id)||this.failed.has(i))return;const s=t.kind==="video",a=(s?this.loadVideo(i,()=>this.onVideoFrame()):this.loadImage(i)).then(o=>{this.loading.delete(t.id);const n=this.references.find(h=>h.id===t.id);if(!n||n.src!==i||n.kind==="video"!==s){r.release(o);return}o.texture.userData.src=i,this.images.set(t.id,o),this.build(n,o),this.follow(),this.onImageLoaded()},o=>{this.loading.delete(t.id),this.failed.set(i,m.failureOf(o)),this.onImageLoaded()});this.loading.set(t.id,a)}onVideoFrame(){this.follow(),this.onFrame?.()}onFrame;static openVideo(t,i){return new Promise((s,e)=>{const a=document.createElement("video");a.crossOrigin="anonymous",a.muted=!0,a.playsInline=!0,a.preload="auto",a.addEventListener("loadeddata",()=>{const o=new M(a);o.colorSpace=g,o.minFilter=c,o.magFilter=c,o.generateMipmaps=!1,a.addEventListener("seeked",i);const n=()=>{a.paused&&i(),a.src&&a.requestVideoFrameCallback(n)};"requestVideoFrameCallback"in a&&a.requestVideoFrameCallback(n),s({texture:o,width:a.videoWidth,height:a.videoHeight,video:a})},{once:!0}),a.addEventListener("error",()=>{m.whyVideoUnread(t).then(o=>e(new f(t,o)))},{once:!0}),a.src=t})}static release(t){t.texture.dispose();const i=t.video;i&&(i.pause(),i.removeAttribute?.("src"),i.load?.())}static async fetchImage(t){const i=await m.blob(t),s=await createImageBitmap(i,{imageOrientation:"flipY"}).catch(()=>{throw new f(t,{kind:"notPicture"})}),e=new y(s);return e.flipY=!1,e.colorSpace=g,e.minFilter=c,e.magFilter=c,e.generateMipmaps=!1,e.needsUpdate=!0,{texture:e,width:s.width,height:s.height}}build(t,i){const s=r.signatureOf(t,i);let e=this.meshes.get(t.id);if(e&&this.signatures.get(t.id)===s){this.applyOpacity(e,t.id);return}e&&(this.dispose(e),this.meshes.delete(t.id)),e=new k(r.geometryOf(t,i),new O({map:i.texture,transparent:!0,depthTest:!1,depthWrite:!1,fog:!1,toneMapped:!1})),t.kind==="panorama"&&(e.material.side=T),e.frustumCulled=!1,e.layers.set(v),e.userData.id=t.id,r.point(e,t,d.registrationAt(t,this.clock.t)),this.scene.add(e),this.meshes.set(t.id,e),this.signatures.set(t.id,s),this.applyOpacity(e,t.id)}static geometryOf(t,i){if(t.kind==="panorama"){const o=new b(u,64,32,Math.PI/2,Math.PI*2),n=o.attributes.uv;for(let h=0;h<n.count;h++)n.setX(h,1-n.getX(h));return n.needsUpdate=!0,o}const s=2*u*Math.tan(t.registration.fovDeg/2*l),e=s*(i.width/Math.max(i.height,1)),a=new E(e,s);return a.translate(0,0,-u),a}static orientation({headingDeg:t,pitchDeg:i,rollDeg:s}){const e=new I;return e.rotation.set(i*l,-t*l,-(s??0)*l,"YXZ"),e.quaternion}static point(t,i,s){if(t.quaternion.copy(r.orientation(s)),i.kind==="panorama")return;const e=Math.tan(s.fovDeg/2*l)/Math.tan(i.registration.fovDeg/2*l);t.scale.set(e,e,1)}inTime(t){if(t.kind!=="video")return!0;const i=this.images.get(t.id)?.video?.duration;return d.mediaSecondsAt(t,this.clock.t,this.clock.timeScale,i!==void 0&&Number.isFinite(i)?i:void 0)!==void 0}opacityOf(t){const i=this.references.find(a=>a.id===t);if(i&&!this.inTime(i))return 0;const s=this.views.get(t),e=i?r.presenceAt(i,this.observerAt):1;return(s?.opacity??i?.opacity??0)*e}applyOpacity(t,i){const s=this.opacityOf(i);t.material.opacity=s,t.visible=this.shown&&s>0}static signatureOf(t,i){const{headingDeg:s,pitchDeg:e,rollDeg:a,fovDeg:o}=t.registration;return[t.kind,t.src,i.width,i.height,s,e,a??0,o].join("|")}dispose(t){this.scene.remove(t),t.geometry.dispose(),t.material.dispose()}disposeAll(){for(const t of this.meshes.values())this.dispose(t);this.meshes.clear(),this.signatures.clear();for(const t of this.images.values())r.release(t);this.images.clear()}}export{v as REFERENCE_LAYER,r as ReferenceSystem};
@@ -0,0 +1 @@
1
+ import{P as y,p as k,W as h}from"./rr0-ufoathome.mjs";import{ScenarioSweep as j}from"./ScenarioSweep-CMcleprC.js";import"./ShareDialogElement-Dlfy9NCE.js";import"./Sighting-B7bsiTIQ.js";import"./VisualAids-DI-hEL46.js";import"./three.module-CbaHqYFq.js";import"./SaidPosition-OJEYhVKN.js";import"./GeoProjection-DvqDbRIx.js";import"./Decor-Dn-cvniW.js";import"./RecordingIssue-BlWT8Xsu.js";import"./xyzImageryRaster-Dhxs0B26.js";import"./Obstacles-v9SkfBD7.js";import"./CaseEditorElement-0J_TCeiq.js";import"./ParameterForm-XbqxCLRn.js";import"./ColumnResize-DV-byvDt.js";import"./InterviewAttachments-BP6Prvdu.js";import"./TimelineTracks-Daaqw9ly.js";import"./ReentryArchive-CeXHrU7L.js";import"./ReferenceTimeline-2kBldQeG.js";import"./upperAirSources-BU0pD84c.js";import"./Account-C4jhsVtN.js";import"./SatellitePasses-Pfro2-0Z.js";class b{static fileName(c,n){const t=c.replace(/\.json$/,""),d=n.placeId.replace(/[^A-Za-z0-9-]+/g,"-"),p=n.local.replace(/[-:]/g,"").replace("T","-");return`${t}-scenario-${d}-${p}.json`}static recording(c,n,t,d,p,i={}){const a=structuredClone(c),r=y.strip(c).recording,l=a.interpretation;if(!l||!r.interpretation)throw new Error(`${n} states no interpretation`);a.id=`${r.id??n.replace(/\.json$/,"")}-scenario-${t.id}`,t.ownPlace||(a.place={value:{...t.placeName?{name:t.placeName}:{},locations:[{lat:t.lat,lng:t.lng}]},basis:"assumed",rationale:`one of the candidate places of the case, played as scenario ${t.id}${i.placeRationale?`: ${i.placeRationale}`:""}`},delete a.snapshots);const e=r.time?r.time.replace(/[~?%]$/,"").slice(0,16):void 0;return t.local!==e&&(a.time={value:`${t.local}:00`,basis:"assumed",rationale:`one of the candidate instants of the case, played as scenario ${t.id}${i.timeRationale?`: ${i.timeRationale}`:""}`}),delete a.image,d&&b.rewind(l,r.interpretation,d,t,p),l.scenario={id:t.id,of:n,...i.verdict?{verdict:i.verdict}:{}},i.title!==void 0&&(l.title=i.title),a}static rewind(c,n,t,d,p){const i={at:e=>h.at(t,e),levels:t.levels.map(e=>e.aboveGroundM)},a=e=>`${e} archived at ${t.hour} UTC at this place (${t.credit}, grid point ${t.lat.toFixed(3)}, ${t.lng.toFixed(3)}): established given scenario ${d.id} only`;for(const e of p){const f=k.itemsOf(n,e.key);if(!e.inWind||f.length===0)continue;const u=c[e.key];f.forEach((m,v)=>{const s=e.inWind(m,i);for(const o of Object.keys(s))JSON.stringify(s[o])!==JSON.stringify(m[o])&&(u[v][o]=o==="wind"?{value:s[o],basis:"established",rationale:a("the wind at the ground")}:s[o])})}const r=h.at(t,10),l=c.bodies;n.bodies.forEach((e,f)=>{if(!e.drifting)return;const u=j.drifted(e,r),m=l[f].track;!m||!u.track||u.track.forEach((v,s)=>{for(const o of["eastM","northM"]){const w=v[o];if(w===void 0)continue;const g=Math.round(w*100)/100,$=m[s][o];m[s][o]=typeof $=="object"&&$!==null&&"value"in $?{...$,value:g,...s===0?{rationale:a(`drifting with the wind at the ground, ${h.rounded(r).speedMS} m/s towards ${h.rounded(r).towardDeg}°,`)}:{}}:g}})})}}export{b as ScenarioReadings};
@@ -0,0 +1 @@
1
+ import{C as R,P as k,p as A,W as N}from"./rr0-ufoathome.mjs";import{W as P,aR as O,a7 as K,ab as T}from"./ShareDialogElement-Dlfy9NCE.js";import{S as y,C as $}from"./CaseEditorElement-0J_TCeiq.js";import{SatellitePasses as S}from"./SatellitePasses-Pfro2-0Z.js";import"./Sighting-B7bsiTIQ.js";import"./VisualAids-DI-hEL46.js";import"./three.module-CbaHqYFq.js";import"./SaidPosition-OJEYhVKN.js";import"./GeoProjection-DvqDbRIx.js";import"./Decor-Dn-cvniW.js";import"./RecordingIssue-BlWT8Xsu.js";import"./xyzImageryRaster-Dhxs0B26.js";import"./Obstacles-v9SkfBD7.js";import"./ParameterForm-XbqxCLRn.js";import"./ColumnResize-DV-byvDt.js";import"./InterviewAttachments-BP6Prvdu.js";import"./TimelineTracks-Daaqw9ly.js";import"./ReentryArchive-CeXHrU7L.js";import"./ReferenceTimeline-2kBldQeG.js";import"./upperAirSources-BU0pD84c.js";import"./Account-C4jhsVtN.js";class f{static MAX_SCENARIOS=200;static KM_PER_DEG=111.32;static merged(t,s){return t?s?{...t,...s}:t:s}static scenarios(t,s){const e=f.places(t,s?.places),a=f.instants(t,s?.time),n=[];for(const r of e)for(const i of a){const d=r.placeId==="own"&&i===f.minute(t.local);n.push({id:`${r.placeId}@${i}`,placeId:r.placeId,...r.placeName?{placeName:r.placeName}:{},lat:r.lat,lng:r.lng,local:i,date:f.utc(i,t.utcOffsetHours),own:d,ownPlace:r.placeId==="own"})}if(n.length>f.MAX_SCENARIOS)throw new Error(`${n.length} scenarios for one account: more than ${f.MAX_SCENARIOS}. Take a coarser step or fewer points.`);return n.sort((r,i)=>Number(i.own)-Number(r.own))}static places(t,s){const e={placeId:"own",...t.placeName?{placeName:t.placeName}:{},lat:t.lat,lng:t.lng},a=s?.own===!1?[]:[e],n=(s?.candidates??[]).filter(r=>!r.for||t.eventId===void 0||r.for.includes(t.eventId)).flatMap(r=>{const i=r.place.locations?.[0];return i?[{placeId:r.id,...r.place.name?{placeName:r.place.name}:{},lat:i.lat,lng:i.lng}]:[]});switch(s?.sweep??"bounds"){case"bounds":return[...a,...n];case"points":{const r=new Set(s?.points??[]);return[...a,...n.filter(i=>r.has(i.placeId))]}case"deltas":return[...a,...(s?.deltasKm??[]).filter(r=>r.eastKm!==0||r.northKm!==0).map(r=>({placeId:`own${r.eastKm>=0?"+":""}${r.eastKm},${r.northKm>=0?"+":""}${r.northKm}km`,...t.placeName?{placeName:t.placeName}:{},lat:t.lat+r.northKm/f.KM_PER_DEG,lng:t.lng+r.eastKm/(f.KM_PER_DEG*Math.cos(t.lat*Math.PI/180))}))];case"step":{const r=s?.stepKm;if(!r||r<=0)throw new Error("A sweep of places by step states its stepKm.");const i=[e,...n],d=Math.min(...i.map(u=>u.lat)),o=Math.max(...i.map(u=>u.lat)),l=Math.min(...i.map(u=>u.lng)),c=Math.max(...i.map(u=>u.lng)),h=f.KM_PER_DEG*Math.cos((d+o)/2*Math.PI/180),m=[];for(let u=0;d+u*r/f.KM_PER_DEG<=o+1e-9;u++)for(let p=0;l+p*r/h<=c+1e-9;p++){const g=d+u*r/f.KM_PER_DEG,v=l+p*r/h;m.push({placeId:`grid${g.toFixed(3)},${v.toFixed(3)}`,lat:g,lng:v})}return[...a,...m]}}}static instants(t,s){const e=f.minute(t.local);if(!s)return[e];const a=f.ms(e),n=f.ms(s.from),r=f.ms(s.to),i=s.each??"day",d=864e5,o=c=>{const h=[];if(i==="day"){const m=a+Math.ceil((n-a)/d)*d;for(let u=m;u<=r;u+=c)h.push(u)}else for(let m=n;m<=r;m+=c)h.push(m);return h};let l;switch(s.sweep??"bounds"){case"bounds":{const c=o(i==="day"?d:6e4);l=c.length>0?[c[0],c[c.length-1]]:[];break}case"points":l=(s.points??[]).map(c=>/T/.test(c)?f.ms(c):f.ms(`${c}T${e.slice(11)}`));break;case"step":l=o((s.stepMinutes??(i==="day"?1440:60))*6e4);break;case"deltas":l=[a,...(s.deltasMinutes??[]).map(c=>a+c*6e4)];break}return[...new Set(l)].sort((c,h)=>c-h).map(c=>new Date(c).toISOString().slice(0,16))}static ms(t){const s=t.replace(/[~?%]$/,"").replace(/(Z|[+-]\d\d:\d\d)$/,""),e=s.length===10?`${s}T00:00`:s,a=Date.parse(`${e}Z`);if(Number.isNaN(a))throw new Error(`Not an instant: ${t}`);return a}static minute(t){return new Date(f.ms(t)).toISOString().slice(0,16)}static utc(t,s){return new Date(f.ms(t)-s*36e5)}}class b{constructor(t){this.sources=t,this.model=t.model??P.MODELS[0]}static PLAUSIBLE=O.MEASURABLE;static DRAWN_STEP_MS=500;static STARS=6;static STAR_MAG=1.5;model;async sweep(t,s={}){const e=(t.events??[]).filter(o=>o.eventType===R.SIGHTING_EVENT&&!o.interpretationOf&&o.url).filter(o=>!s.accounts||o.id!==void 0&&s.accounts.includes(o.id)),a=[],n=await Promise.all(e.map(async o=>{const l=await this.sources.load(o.url),c=s.conditions??f.merged(t.conditions,k.strip(l).recording.conditions),h=f.scenarios(b.conditionsOf(l,o.id),c),m=[o.id,k.strip(l).recording.id].filter(p=>!!p),u=R.interpretationEvents(t,m).filter(p=>p.url&&(!s.readings||s.readings.includes(p.url)));return{event:o,accountJson:l,conditions:c,scenarios:h,readings:u}})),r=n.reduce((o,l)=>o+l.scenarios.length*(l.readings.length+(s.sky===!1?0:1)),0);let i=0;const d=()=>s.progress?.(++i,r);for(const{event:o,accountJson:l,conditions:c,scenarios:h,readings:m}of n){const u={...o.id?{eventId:o.id}:{},url:o.url,title:o.title,scenarios:h,readings:[],sky:[]},p=b.judges(l);for(const g of m){const v=await this.sources.load(g.url),w=k.strip(v).recording.interpretation;if(!w||w.scenario){h.forEach(d);continue}const M=await this.replay(g.url,g.title,w,h,p,d);M.kept=b.kept(M,s.keep??c?.keep??"telling"),u.readings.push(M)}if(s.sky!==!1){const g=await this.sky(l,h,d);u.sky=g.replays,g.note&&(u.skyNote=g.note)}a.push(u)}return{accounts:a,alerts:b.alerts(a)}}static conditionsOf(t,s){const e=k.strip(t).recording,a=e.place?.locations?.[0];if(!e.time||!a)throw new Error(`An account with no time or no place cannot be played elsewhere: ${e.id??s}`);return{...s?{eventId:s}:{},local:e.time,utcOffsetHours:e.utcOffsetHours??Math.round(a.lng/15),lat:a.lat,lng:a.lng,...e.place?.name?{placeName:e.place.name}:{}}}static judges(t){const s=O.forAccount(t),e=K(t),a=k.strip(t).recording.timeline?.keyframes??[],n=Math.max(0,...a.map(d=>d.t)),r=Array.from({length:Math.floor(n/b.DRAWN_STEP_MS)+1},(d,o)=>o*b.DRAWN_STEP_MS),i=T.lawsOf(P.MODELS[0],e.account?.conditions);return{said:s,drawn:new O(e,r,i)}}dependsOn(t){return this.sources.kinds.some(e=>e.inWind&&A.itemsOf(t,e.key).length>0)||t.bodies.some(e=>e.drifting)?["wind"]:[]}inWind(t,s){const e={at:n=>N.at(s,n),levels:s.levels.map(n=>n.aboveGroundM)},a={...t};for(const n of this.sources.kinds){const r=A.itemsOf(t,n.key);!n.inWind||r.length===0||(a[n.key]=r.map(i=>n.inWind(i,e)))}return a.bodies=t.bodies.map(n=>n.drifting?b.drifted(n,N.at(s,10)):n),a}static drifted(t,s){const e=t.track;if(!e||e.length<2)return t;const a=e[0],n=e[e.length-1],r=(n.t-a.t)/1e3;if(r<=0||a.eastM===void 0||n.eastM===void 0||a.northM===void 0||n.northM===void 0)return t;const[i,d]=N.vector(s),o=i-(n.eastM-a.eastM)/r,l=d-(n.northM-a.northM)/r;return{...t,track:e.map(c=>c.eastM===void 0||c.northM===void 0?c:{...c,eastM:c.eastM+o*(c.t-a.t)/1e3,northM:c.northM+l*(c.t-a.t)/1e3})}}async bodiesOf(t){return await A.load(t,this.sources.kinds),A.expand(t,this.sources.kinds).bodies}async replay(t,s,e,a,n,r){const i=this.dependsOn(e),d=m=>{const u=b.summary(n.said.comparisons(m)),p=b.summary(n.drawn.comparisons(m));return{said:u,drawn:p,plausible:b.plausible(u,p)}},o=d(await this.bodiesOf(e)),l=[];for(const m of a){if(r(),i.length===0){l.push({scenario:m,...o});continue}try{const u=await this.sources.wind.profile(m.lat,m.lng,m.date);l.push({scenario:m,...d(await this.bodiesOf(this.inWind(e,u))),groundWind:N.at(u,10)})}catch(u){l.push({scenario:m,...o,plausible:o.plausible,error:u.message})}}const c=l.filter(m=>!m.error),h=b.verdict(o.plausible?"plausible":"excluded",c.map(m=>({scenario:m.scenario,plausible:m.plausible})));return i.length===0&&(h.independent=!0),{url:t,title:s,depends:i,asWritten:o,outcomes:l,verdict:h,kept:[]}}static plausible(t,s){const e=t.compared>0?t:s;return e.compared>0&&e.agreedDirection/e.compared>=b.PLAUSIBLE}static summary(t){const s=t.filter(e=>e.separationDeg!==void 0).map(e=>e.separationDeg).sort((e,a)=>e-a);return{agreed:t.filter(e=>e.agrees).length,compared:t.length,agreedDirection:t.filter(e=>!e.contradicted?.includes("direction")).length,...s.length?{medianDeg:s[Math.floor(s.length/2)],worstDeg:s[s.length-1]}:{}}}static verdict(t,s){const e=s.filter(n=>n.plausible),a=s.length;return a===0?{robustness:t==="plausible"?"robust-plausible":"robust-exclusion",asWritten:t,holds:0,played:0,independent:!0}:e.length===a?{robustness:"robust-plausible",asWritten:t,holds:a,played:a}:e.length===0?{robustness:"robust-exclusion",asWritten:t,holds:0,played:a}:{robustness:"conditional",asWritten:t,onlyIf:b.onlyIf(s),holds:e.length,played:a}}static onlyIf(t){const s=n=>{const r=new Map;for(const d of t)r.set(n(d.scenario),[...r.get(n(d.scenario))??[],d.plausible]);const i=[...r.entries()];return i.every(([,d])=>d.every(o=>o)||d.every(o=>!o))?i.filter(([,d])=>d[0]).map(([d])=>d):void 0},e=s(n=>n.placeId);if(e&&new Set(t.map(n=>n.scenario.placeId)).size>1)return{places:e};const a=s(n=>n.local.slice(0,10));return a&&new Set(t.map(n=>n.scenario.local.slice(0,10))).size>1?{dates:a}:{scenarios:t.filter(n=>n.plausible).map(n=>n.scenario.id)}}static kept(t,s){if(s==="none"||t.verdict.independent)return[];const e=t.outcomes.filter(o=>!o.error);if(s==="all")return e.map(o=>o.scenario);const a=t.verdict.robustness!=="conditional";if(s==="robust"&&!a||s==="conditional"&&a)return[];const n=o=>{const l=o.said.compared>0?o.said:o.drawn;return(l.compared?l.agreedDirection/l.compared:0)-(l.medianDeg??180)/1e4},r=[...e].sort((o,l)=>n(l)-n(o));if(a){const o=t.verdict.robustness==="robust-plausible"?r[r.length-1]:r[0];return o?[o.scenario]:[]}const i=r.find(o=>o.plausible),d=[...r].reverse().find(o=>!o.plausible);return[i,d].filter(o=>!!o).map(o=>o.scenario)}async sky(t,s,e){const a=K(t),n=y.statement(a);if(!n)return s.forEach(e),{replays:[],note:"no-direction"};const{statement:r,t:i}=n,d=new $(this.model,a.account?.conditions,{dateShiftDays:[],mirror:!1}),o=p=>this.sources.names?.(p)??p,l=s.find(p=>p.own)??s[0],c={date:l.date,observer:{lat:l.lat,lng:l.lng,elevationM:0}},h=new Set(y.stars(c,i,r,this.sources.limitAt,b.STARS,b.STAR_MAG).map(({star:p})=>p.name)),m=new Map;for(const p of s){e();const g={date:p.date,observer:{lat:p.lat,lng:p.lng,elevationM:0}},v=[{track:y.body("Moon",o("Moon"),g,i,this.sources.limitAt),kind:"body"},...y.PLANETS.map(M=>({track:y.body(M,o(M),g,i,this.sources.limitAt),kind:"body"})),...y.stars(g,i,{...r,aim:void 0},this.sources.limitAt,1/0,b.STAR_MAG).filter(({star:M})=>h.has(M.name)).map(({star:M,track:D})=>({track:{...D,label:o(M.name)},kind:"star"}))],w=await this.issTrack(g,i);w&&v.push({track:w,kind:"satellite"});for(const{track:M,kind:D}of v){const I=d.fit(r,M);let E=m.get(M.id);E||(E={candidate:M.id,label:M.label,kind:D,outcomes:[],verdict:void 0},m.set(M.id,E)),E.outcomes.push({scenario:p,verdict:I.verdict,cost:I.cost,...I.reason?{reason:I.reason}:{}})}}const u=[...m.values()];for(const p of u){const g=p.outcomes.find(w=>w.scenario.own),v=g?g.verdict==="incompatible"?"excluded":"plausible":p.outcomes.every(w=>w.verdict==="incompatible")?"excluded":"plausible";p.verdict=b.verdict(v,p.outcomes.map(w=>({scenario:w.scenario,plausible:w.verdict!=="incompatible"})))}return{replays:u}}async issTrack(t,s){if(!this.sources.satellites)return;const a=(await this.sources.satellites(t.date).catch(()=>{}))?.find(r=>r.norad===y.ISS_NORAD);if(!a)return;const n=new S([a]);return y.satellite(`satellite-${a.norad}`,this.sources.names?.("ISS")??"ISS",r=>n.positionsAt(r,t.observer,-90).find(i=>i.object.norad===a.norad),t,s,this.sources.limitAt)}static alerts(t){return t.flatMap(s=>s.sky.filter(e=>e.kind!=="star"||e.verdict.robustness!=="robust-exclusion").map(e=>({...s.eventId?{eventId:s.eventId}:{},candidate:e.candidate,label:e.label,robustness:e.verdict.robustness,...e.verdict.onlyIf?{onlyIf:e.verdict.onlyIf}:{}})))}}export{b as ScenarioSweep};
@@ -1,4 +1,4 @@
1
- import{M as c,_ as n}from"./rr0-ufoathome.mjs";import{b as g,P as d}from"./SaidPosition-OJEYhVKN.js";import{bp as r,ba as p}from"./ShareDialogElement-CBeU9ChH.js";import{S as u}from"./SkyEventEditorStyle-CvY_AhbI.js";import{P as f,a as _,E}from"./ParameterForm-XbqxCLRn.js";import"./GeoProjection-DvqDbRIx.js";import"./Sighting-B7bsiTIQ.js";import"./VisualAids-DI-hEL46.js";import"./three.module-CbaHqYFq.js";import"./Decor-Dn-cvniW.js";import"./RecordingIssue-BlWT8Xsu.js";import"./xyzImageryRaster-Dhxs0B26.js";import"./Obstacles-v9SkfBD7.js";const v=c.catalog({en:()=>n(()=>import("./SearchlightParameterTexts_en-BwanYoMW.js"),[],import.meta.url).then(i=>i.searchlightParameterTexts_en),fr:()=>n(()=>import("./SearchlightParameterTexts_fr-B7eZQIdG.js"),[],import.meta.url).then(i=>i.searchlightParameterTexts_fr),es:()=>n(()=>import("./SearchlightParameterTexts_es-Cz_rg-Xe.js"),[],import.meta.url).then(i=>i.searchlightParameterTexts_es),it:()=>n(()=>import("./SearchlightParameterTexts_it-BjhuOJre.js"),[],import.meta.url).then(i=>i.searchlightParameterTexts_it)}),y=c.catalog({en:()=>n(()=>import("./SearchlightEditorMessages_en-BWTcGHYC.js"),[],import.meta.url).then(i=>i.searchlightEditorMessages_en),fr:()=>n(()=>import("./SearchlightEditorMessages_fr-CpaD2Il2.js"),[],import.meta.url).then(i=>i.searchlightEditorMessages_fr),es:()=>n(()=>import("./SearchlightEditorMessages_es-PS4IIWFS.js"),[],import.meta.url).then(i=>i.searchlightEditorMessages_es),it:()=>n(()=>import("./SearchlightEditorMessages_it-Br2IjowF.js"),[],import.meta.url).then(i=>i.searchlightEditorMessages_it)});class h{static time(t,e,s){return{type:"number",key:t,min:-36e3,max:36e3,step:1,unit:"s",scale:.001,label:e,hint:s,group:"when"}}static of(t){return t}static SET={kind:"searchlight",title:"searchlight",parameters:[{type:"said",key:"title",label:"name",group:"searchlight"},{type:"position",key:"lat",secondKey:"lng",saidKey:"saidPosition",native:"geo",step:1,label:"position",group:"searchlight"},{type:"number",key:"heightM",min:0,max:500,step:.5,unit:"m",label:"height",hint:"heightHint",group:"searchlight",effective:()=>r.DEFAULT_HEIGHT_M},{type:"number",key:"beams",min:1,max:r.MAX_BEAMS,step:1,label:"beams",hint:"beamsHint",group:"lamp",effective:()=>1},{type:"number",key:"intensityCd",min:1e4,max:1e10,step:1e6,unit:"cd",label:"intensity",hint:"intensityHint",group:"lamp",effective:()=>r.DEFAULT_INTENSITY_CD},{type:"number",key:"divergenceDeg",min:.1,max:20,step:.1,unit:"°",label:"divergence",hint:"divergenceHint",group:"lamp",effective:()=>r.DEFAULT_DIVERGENCE_DEG},{type:"number",key:"colourTemperatureK",min:2e3,max:1e4,step:100,unit:"K",label:"temperature",hint:"temperatureHint",group:"lamp",effective:()=>r.DEFAULT_TEMPERATURE_K},{type:"choice",key:"motion",label:"pattern",hint:"patternHint",group:"motion",effective:t=>r.motionOf(h.of(t)),choices:[{value:"fixed",label:"fixed"},{value:"sweep",label:"sweep"},{value:"rotate",label:"rotate"},{value:"cloverleaf",label:"cloverleaf"}]},{type:"number",key:"tiltDeg",min:0,max:85,step:1,unit:"°",label:"tilt",hint:"tiltHint",group:"motion",effective:()=>r.DEFAULT_TILT_DEG},{type:"number",key:"spreadDeg",min:0,max:360,step:1,unit:"°",label:"spread",hint:"spreadHint",group:"motion",effective:()=>r.DEFAULT_SPREAD_DEG,visibleWhen:t=>r.motionOf(h.of(t))==="sweep"},{type:"number",key:"azimuthDeg",min:0,max:360,step:1,unit:"°",label:"azimuth",hint:"azimuthHint",group:"motion",effective:()=>0},{type:"number",key:"periodS",min:.5,max:600,step:.5,unit:"s",label:"period",hint:"periodHint",group:"motion",effective:()=>r.DEFAULT_PERIOD_S,visibleWhen:t=>r.motionOf(h.of(t))!=="fixed"},h.time("fromT","from","fromHint"),h.time("untilT","until","untilHint")]};static publish(){g.publish(h.SET)}}class m{constructor(t,e,s){this.container=t,this.host=e,u.attach(t,"searchlight-editor-part",m.STYLE),this.language=s,g.of("searchlight")||h.publish(),this.ready=this.setLanguage(s)}messages;parameterTexts;ready;languageToken=0;currentId;form;list;language;shown=[];static STYLE=".searchlight-editor-part { flex-basis: 100%; min-width: 0; } .searchlight-editor-part .searchlight-editor, .searchlight-editor-part .searchlight-fields { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; } .searchlight-editor-part #searchlight-list, .searchlight-editor-part .searchlight-fields { flex-basis: 100%; min-width: 0; } .searchlight-editor-part [hidden] { display: none !important; } .searchlight-editor-part .searchlight-intro { flex-basis: 100%; margin: 0; } .searchlight-editor-part .searchlight-parameters { flex-basis: 100%; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; } .searchlight-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; } .searchlight-editor-part input, .searchlight-editor-part select { max-width: 100%; box-sizing: border-box; } .searchlight-editor-part label { min-width: 0; max-width: 100%; } .searchlight-editor-part input.parameter-derived::placeholder { opacity: .65; }";async setLanguage(t){const e=++this.languageToken;this.language=t;const[s,l]=await Promise.all([y.load(t),v.load(t)]);e===this.languageToken&&(this.messages=s,this.parameterTexts=l,this.render(),this.sync())}sync(){if(!this.messages)return;const t=this.searchlights;this.shown=[...t],t.some(a=>a.id===this.currentId)||(this.currentId=t[0]?.id),this.list?.setItems(t.map(a=>({id:a.id,label:this.labelOf(a)})),this.currentId);const e=this.placeOfNew()!==void 0;this.list?.setAddState(e,e?void 0:this.messages.addNowhere);const s=this.current;if(this.element("searchlight-fields").hidden=s===void 0,!s)return;const l=d.resolve(g.of("searchlight"),this.parameterTexts);this.form??=new f(this.element("searchlight-parameters"),this.language,"",{said:()=>this.host.said(),writingLanguage:()=>this.host.writingLanguage()}),this.form.show(l,new _(()=>this.current,a=>{const o=this.current;o&&a(o)},void 0,this.host.positionPlace?.()),()=>this.host.changed())}refresh(){if(!this.messages)return;const t=this.searchlights;t.length===this.shown.length&&t.every((e,s)=>e===this.shown[s])||this.sync()}setTime(t){}get current(){return this.searchlights.find(t=>t.id===this.currentId)}render(){const t=this.messages;this.form=void 0,this.container.innerHTML=`<div class="searchlight-editor">
1
+ import{M as c,_ as n}from"./rr0-ufoathome.mjs";import{b as g,P as d}from"./SaidPosition-OJEYhVKN.js";import{bp as r,ba as p}from"./ShareDialogElement-Dlfy9NCE.js";import{S as u}from"./SkyEventEditorStyle-CvY_AhbI.js";import{P as f,a as _,E}from"./ParameterForm-XbqxCLRn.js";import"./GeoProjection-DvqDbRIx.js";import"./Sighting-B7bsiTIQ.js";import"./VisualAids-DI-hEL46.js";import"./three.module-CbaHqYFq.js";import"./Decor-Dn-cvniW.js";import"./RecordingIssue-BlWT8Xsu.js";import"./xyzImageryRaster-Dhxs0B26.js";import"./Obstacles-v9SkfBD7.js";const v=c.catalog({en:()=>n(()=>import("./SearchlightParameterTexts_en-BwanYoMW.js"),[],import.meta.url).then(i=>i.searchlightParameterTexts_en),fr:()=>n(()=>import("./SearchlightParameterTexts_fr-B7eZQIdG.js"),[],import.meta.url).then(i=>i.searchlightParameterTexts_fr),es:()=>n(()=>import("./SearchlightParameterTexts_es-Cz_rg-Xe.js"),[],import.meta.url).then(i=>i.searchlightParameterTexts_es),it:()=>n(()=>import("./SearchlightParameterTexts_it-BjhuOJre.js"),[],import.meta.url).then(i=>i.searchlightParameterTexts_it)}),y=c.catalog({en:()=>n(()=>import("./SearchlightEditorMessages_en-BWTcGHYC.js"),[],import.meta.url).then(i=>i.searchlightEditorMessages_en),fr:()=>n(()=>import("./SearchlightEditorMessages_fr-CpaD2Il2.js"),[],import.meta.url).then(i=>i.searchlightEditorMessages_fr),es:()=>n(()=>import("./SearchlightEditorMessages_es-PS4IIWFS.js"),[],import.meta.url).then(i=>i.searchlightEditorMessages_es),it:()=>n(()=>import("./SearchlightEditorMessages_it-Br2IjowF.js"),[],import.meta.url).then(i=>i.searchlightEditorMessages_it)});class h{static time(t,e,s){return{type:"number",key:t,min:-36e3,max:36e3,step:1,unit:"s",scale:.001,label:e,hint:s,group:"when"}}static of(t){return t}static SET={kind:"searchlight",title:"searchlight",parameters:[{type:"said",key:"title",label:"name",group:"searchlight"},{type:"position",key:"lat",secondKey:"lng",saidKey:"saidPosition",native:"geo",step:1,label:"position",group:"searchlight"},{type:"number",key:"heightM",min:0,max:500,step:.5,unit:"m",label:"height",hint:"heightHint",group:"searchlight",effective:()=>r.DEFAULT_HEIGHT_M},{type:"number",key:"beams",min:1,max:r.MAX_BEAMS,step:1,label:"beams",hint:"beamsHint",group:"lamp",effective:()=>1},{type:"number",key:"intensityCd",min:1e4,max:1e10,step:1e6,unit:"cd",label:"intensity",hint:"intensityHint",group:"lamp",effective:()=>r.DEFAULT_INTENSITY_CD},{type:"number",key:"divergenceDeg",min:.1,max:20,step:.1,unit:"°",label:"divergence",hint:"divergenceHint",group:"lamp",effective:()=>r.DEFAULT_DIVERGENCE_DEG},{type:"number",key:"colourTemperatureK",min:2e3,max:1e4,step:100,unit:"K",label:"temperature",hint:"temperatureHint",group:"lamp",effective:()=>r.DEFAULT_TEMPERATURE_K},{type:"choice",key:"motion",label:"pattern",hint:"patternHint",group:"motion",effective:t=>r.motionOf(h.of(t)),choices:[{value:"fixed",label:"fixed"},{value:"sweep",label:"sweep"},{value:"rotate",label:"rotate"},{value:"cloverleaf",label:"cloverleaf"}]},{type:"number",key:"tiltDeg",min:0,max:85,step:1,unit:"°",label:"tilt",hint:"tiltHint",group:"motion",effective:()=>r.DEFAULT_TILT_DEG},{type:"number",key:"spreadDeg",min:0,max:360,step:1,unit:"°",label:"spread",hint:"spreadHint",group:"motion",effective:()=>r.DEFAULT_SPREAD_DEG,visibleWhen:t=>r.motionOf(h.of(t))==="sweep"},{type:"number",key:"azimuthDeg",min:0,max:360,step:1,unit:"°",label:"azimuth",hint:"azimuthHint",group:"motion",effective:()=>0},{type:"number",key:"periodS",min:.5,max:600,step:.5,unit:"s",label:"period",hint:"periodHint",group:"motion",effective:()=>r.DEFAULT_PERIOD_S,visibleWhen:t=>r.motionOf(h.of(t))!=="fixed"},h.time("fromT","from","fromHint"),h.time("untilT","until","untilHint")]};static publish(){g.publish(h.SET)}}class m{constructor(t,e,s){this.container=t,this.host=e,u.attach(t,"searchlight-editor-part",m.STYLE),this.language=s,g.of("searchlight")||h.publish(),this.ready=this.setLanguage(s)}messages;parameterTexts;ready;languageToken=0;currentId;form;list;language;shown=[];static STYLE=".searchlight-editor-part { flex-basis: 100%; min-width: 0; } .searchlight-editor-part .searchlight-editor, .searchlight-editor-part .searchlight-fields { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; } .searchlight-editor-part #searchlight-list, .searchlight-editor-part .searchlight-fields { flex-basis: 100%; min-width: 0; } .searchlight-editor-part [hidden] { display: none !important; } .searchlight-editor-part .searchlight-intro { flex-basis: 100%; margin: 0; } .searchlight-editor-part .searchlight-parameters { flex-basis: 100%; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; } .searchlight-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; } .searchlight-editor-part input, .searchlight-editor-part select { max-width: 100%; box-sizing: border-box; } .searchlight-editor-part label { min-width: 0; max-width: 100%; } .searchlight-editor-part input.parameter-derived::placeholder { opacity: .65; }";async setLanguage(t){const e=++this.languageToken;this.language=t;const[s,l]=await Promise.all([y.load(t),v.load(t)]);e===this.languageToken&&(this.messages=s,this.parameterTexts=l,this.render(),this.sync())}sync(){if(!this.messages)return;const t=this.searchlights;this.shown=[...t],t.some(a=>a.id===this.currentId)||(this.currentId=t[0]?.id),this.list?.setItems(t.map(a=>({id:a.id,label:this.labelOf(a)})),this.currentId);const e=this.placeOfNew()!==void 0;this.list?.setAddState(e,e?void 0:this.messages.addNowhere);const s=this.current;if(this.element("searchlight-fields").hidden=s===void 0,!s)return;const l=d.resolve(g.of("searchlight"),this.parameterTexts);this.form??=new f(this.element("searchlight-parameters"),this.language,"",{said:()=>this.host.said(),writingLanguage:()=>this.host.writingLanguage()}),this.form.show(l,new _(()=>this.current,a=>{const o=this.current;o&&a(o)},void 0,this.host.positionPlace?.()),()=>this.host.changed())}refresh(){if(!this.messages)return;const t=this.searchlights;t.length===this.shown.length&&t.every((e,s)=>e===this.shown[s])||this.sync()}setTime(t){}get current(){return this.searchlights.find(t=>t.id===this.currentId)}render(){const t=this.messages;this.form=void 0,this.container.innerHTML=`<div class="searchlight-editor">
2
2
  <p class="searchlight-intro">${t.intro}</p>
3
3
  <div id="searchlight-list"></div>
4
4
  <div id="searchlight-fields" class="searchlight-fields">
@@ -1 +1 @@
1
- import{BeamSystem as L}from"./BeamSystem-BPEYuCF4.js";import{L as x}from"./LaserBeam-C7glTvQN.js";import{bo as v,bp as r,bq as N,br as O,q as D}from"./ShareDialogElement-CBeU9ChH.js";import"./three.module-CbaHqYFq.js";import"./rr0-ufoathome.mjs";import"./Sighting-B7bsiTIQ.js";import"./VisualAids-DI-hEL46.js";import"./SaidPosition-OJEYhVKN.js";import"./GeoProjection-DvqDbRIx.js";import"./Decor-Dn-cvniW.js";import"./RecordingIssue-BlWT8Xsu.js";import"./xyzImageryRaster-Dhxs0B26.js";import"./Obstacles-v9SkfBD7.js";class E{static APERTURE_M=.6;static NEAR_STEP_M=10;static FAR_STEP_M=250;static STEP_SHARE=.05;static CLOUD_STEP_M=25;static SPENT=.003;beams=new L;placed;lineOwners=[];constructor(){this.beams.group.name="searchlights"}get object(){return this.beams.group}get drawnCount(){return this.beams.drawnCount}update(a,s,t){const c=[],M=[];this.lineOwners=[];const n=t.clouds;n?n.dim(this.beams.material):v.apply(this.beams.material,[]);const l=t.wind??{eastMS:0,northMS:0};for(const o of r.onAt(a,s)){const T=this.whereOf(o,t.reference),g=t.origin.x+T.eastM*t.eastScale,d=t.origin.z-T.northM,u=t.groundYAt(g,d)+(o.heightM??r.DEFAULT_HEIGHT_M),e=o.intensityCd??r.DEFAULT_INTENSITY_CD,b=o.divergenceDeg??r.DEFAULT_DIVERGENCE_DEG,S=b*Math.PI/180,m=r.fluxLm(e,b),i=N.ofTemperature(o.colourTemperatureK??r.DEFAULT_TEMPERATURE_K),w=L.white(i);r.aimsAt(o,s).forEach((A,_)=>{const p=r.axisOf(A),h={x:p.east,y:p.up,z:-p.north},P={windAlongMS:l.eastMS*p.east+l.northMS*p.north,windAcrossMS:l.eastMS*p.north-l.northMS*p.east},{points:y,throughBelow:I}=this.walk({x:g,y:u,z:d},h,S,m,s,t,P);if(c.push({id:o.id,points:y,spectrum:w}),this.lineOwners.push({id:o.id,beam:_}),n&&h.y>.02&&n.bottomY>u){const Y=(n.bottomY-u)/h.y,R=t.air.transmittance(t.siteElevationM+u,t.siteElevationM+n.bottomY,Y),C=e*t.relativeScale;M.push({x:g,y:u,z:d,axis:h,fwhmRad:S,rgb:[C*i[0]*R[0],C*i[1]*R[1],C*i[2]*R[2]],throughCloudsBelow:I})}})}this.beams.drawLines(c,t),t.lightClouds?.(M)}walk(a,s,t,c,M,n,l){const o=n.clouds,T=[],g=[],d=[],u=n.siteElevationM+a.y;let e=0,b=0;for(;;){const m=a.x+s.x*e,i=a.y+s.y*e,w=a.z+s.z*e,A=o!==void 0&&i>=o.bottomY&&i<=o.topY,_=Math.exp(-b),p=e>0?n.air.transmittance(u,n.siteElevationM+i,e)[1]:1;if(T.push({x:m,y:i,z:w,altitudeM:n.siteElevationM+i,widthM:E.APERTURE_M+t*e,powerW:c*p*_,haze:x.patchAt(e,M,{...l,patchiness:x.DEFAULT_PATCHINESS})}),g.push(i),d.push(_),e>=r.RANGE_M||i>=r.CEILING_M||_<E.SPENT)break;const h=A?E.CLOUD_STEP_M:Math.min(E.FAR_STEP_M,Math.max(E.NEAR_STEP_M,e*E.STEP_SHARE));if(o&&(A||i<o.bottomY&&i+s.y*h>o.bottomY)){const P=A?h:Math.max(0,(o.bottomY-i)/Math.max(s.y,1e-6));if(!A){e+=Math.max(1,P);continue}b+=o.extinctionAt(m+s.x*h/2,i+s.y*h/2,w+s.z*h/2)*h*O.BEAM_OPACITY}e+=h}return{points:T,throughBelow:m=>{const i=g.findIndex(w=>w>=m);return i<0?d[d.length-1]:d[i]}}}whereOf(a,s){(!this.placed||this.placed.lat!==s.lat||this.placed.lng!==s.lng)&&(this.placed={...s,at:new Map});let t=this.placed.at.get(a);if(!t){const c=D.ecef({lat:s.lat,lng:s.lng,heightM:0}),M=D.ecef({lat:a.lat,lng:a.lng,heightM:0}),n=s.lat*Math.PI/180,l=s.lng*Math.PI/180,o=[M[0]-c[0],M[1]-c[1],M[2]-c[2]];t={eastM:-Math.sin(l)*o[0]+Math.cos(l)*o[1],northM:-Math.sin(n)*Math.cos(l)*o[0]-Math.sin(n)*Math.sin(l)*o[1]+Math.cos(n)*o[2]},this.placed.at.set(a,t)}return t}pick(a,s,t){const c=this.beams.pickAt(a,s,t.toleranceRad);if(c)return{id:c.id,distanceM:c.distanceM,detail:{beam:(this.lineOwners[c.line]?.beam??0)+1}}}dispose(){this.beams.dispose()}}export{E as SearchlightSystem};
1
+ import{BeamSystem as L}from"./BeamSystem-CPM8m17q.js";import{L as x}from"./LaserBeam--dquPX_h.js";import{bo as v,bp as r,bq as N,br as O,q as D}from"./ShareDialogElement-Dlfy9NCE.js";import"./three.module-CbaHqYFq.js";import"./rr0-ufoathome.mjs";import"./Sighting-B7bsiTIQ.js";import"./VisualAids-DI-hEL46.js";import"./SaidPosition-OJEYhVKN.js";import"./GeoProjection-DvqDbRIx.js";import"./Decor-Dn-cvniW.js";import"./RecordingIssue-BlWT8Xsu.js";import"./xyzImageryRaster-Dhxs0B26.js";import"./Obstacles-v9SkfBD7.js";class E{static APERTURE_M=.6;static NEAR_STEP_M=10;static FAR_STEP_M=250;static STEP_SHARE=.05;static CLOUD_STEP_M=25;static SPENT=.003;beams=new L;placed;lineOwners=[];constructor(){this.beams.group.name="searchlights"}get object(){return this.beams.group}get drawnCount(){return this.beams.drawnCount}update(a,s,t){const c=[],M=[];this.lineOwners=[];const n=t.clouds;n?n.dim(this.beams.material):v.apply(this.beams.material,[]);const l=t.wind??{eastMS:0,northMS:0};for(const o of r.onAt(a,s)){const T=this.whereOf(o,t.reference),g=t.origin.x+T.eastM*t.eastScale,d=t.origin.z-T.northM,u=t.groundYAt(g,d)+(o.heightM??r.DEFAULT_HEIGHT_M),e=o.intensityCd??r.DEFAULT_INTENSITY_CD,b=o.divergenceDeg??r.DEFAULT_DIVERGENCE_DEG,S=b*Math.PI/180,m=r.fluxLm(e,b),i=N.ofTemperature(o.colourTemperatureK??r.DEFAULT_TEMPERATURE_K),w=L.white(i);r.aimsAt(o,s).forEach((A,_)=>{const p=r.axisOf(A),h={x:p.east,y:p.up,z:-p.north},P={windAlongMS:l.eastMS*p.east+l.northMS*p.north,windAcrossMS:l.eastMS*p.north-l.northMS*p.east},{points:y,throughBelow:I}=this.walk({x:g,y:u,z:d},h,S,m,s,t,P);if(c.push({id:o.id,points:y,spectrum:w}),this.lineOwners.push({id:o.id,beam:_}),n&&h.y>.02&&n.bottomY>u){const Y=(n.bottomY-u)/h.y,R=t.air.transmittance(t.siteElevationM+u,t.siteElevationM+n.bottomY,Y),C=e*t.relativeScale;M.push({x:g,y:u,z:d,axis:h,fwhmRad:S,rgb:[C*i[0]*R[0],C*i[1]*R[1],C*i[2]*R[2]],throughCloudsBelow:I})}})}this.beams.drawLines(c,t),t.lightClouds?.(M)}walk(a,s,t,c,M,n,l){const o=n.clouds,T=[],g=[],d=[],u=n.siteElevationM+a.y;let e=0,b=0;for(;;){const m=a.x+s.x*e,i=a.y+s.y*e,w=a.z+s.z*e,A=o!==void 0&&i>=o.bottomY&&i<=o.topY,_=Math.exp(-b),p=e>0?n.air.transmittance(u,n.siteElevationM+i,e)[1]:1;if(T.push({x:m,y:i,z:w,altitudeM:n.siteElevationM+i,widthM:E.APERTURE_M+t*e,powerW:c*p*_,haze:x.patchAt(e,M,{...l,patchiness:x.DEFAULT_PATCHINESS})}),g.push(i),d.push(_),e>=r.RANGE_M||i>=r.CEILING_M||_<E.SPENT)break;const h=A?E.CLOUD_STEP_M:Math.min(E.FAR_STEP_M,Math.max(E.NEAR_STEP_M,e*E.STEP_SHARE));if(o&&(A||i<o.bottomY&&i+s.y*h>o.bottomY)){const P=A?h:Math.max(0,(o.bottomY-i)/Math.max(s.y,1e-6));if(!A){e+=Math.max(1,P);continue}b+=o.extinctionAt(m+s.x*h/2,i+s.y*h/2,w+s.z*h/2)*h*O.BEAM_OPACITY}e+=h}return{points:T,throughBelow:m=>{const i=g.findIndex(w=>w>=m);return i<0?d[d.length-1]:d[i]}}}whereOf(a,s){(!this.placed||this.placed.lat!==s.lat||this.placed.lng!==s.lng)&&(this.placed={...s,at:new Map});let t=this.placed.at.get(a);if(!t){const c=D.ecef({lat:s.lat,lng:s.lng,heightM:0}),M=D.ecef({lat:a.lat,lng:a.lng,heightM:0}),n=s.lat*Math.PI/180,l=s.lng*Math.PI/180,o=[M[0]-c[0],M[1]-c[1],M[2]-c[2]];t={eastM:-Math.sin(l)*o[0]+Math.cos(l)*o[1],northM:-Math.sin(n)*Math.cos(l)*o[0]-Math.sin(n)*Math.sin(l)*o[1]+Math.cos(n)*o[2]},this.placed.at.set(a,t)}return t}pick(a,s,t){const c=this.beams.pickAt(a,s,t.toleranceRad);if(c)return{id:c.id,distanceM:c.distanceM,detail:{beam:(this.lineOwners[c.line]?.beam??0)+1}}}dispose(){this.beams.dispose()}}export{E as SearchlightSystem};