@rr0/ufoathome 0.177.2 → 0.178.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 (264) hide show
  1. package/dist-embed-interview/rr0-interview.mjs +3 -3
  2. package/dist-embed-scene/{AdsbLolArchiveProvider-BHGe8FVN.js → AdsbLolArchiveProvider-B0Yi081_.js} +1 -1
  3. package/dist-embed-scene/{BeamEditor-zq64GorX.js → BeamEditor-DFGRzRny.js} +1 -1
  4. package/dist-embed-scene/{BeamSystem-BXee1GYk.js → BeamSystem-ebEMoYD3.js} +1 -1
  5. package/dist-embed-scene/{ContrailSystem-BSbI2jUe.js → ContrailSystem-Bn--uCNU.js} +1 -1
  6. package/dist-embed-scene/ControlPasses-BMma2JRm.js +29 -0
  7. package/dist-embed-scene/FilmChrome-DYiyzoB_.js +1 -0
  8. package/dist-embed-scene/{Flightradar24Provider-Dx2Fb8yO.js → Flightradar24Provider-CpwhYfIE.js} +1 -1
  9. package/dist-embed-scene/GLTFLoader-BxToReDu.js +1 -0
  10. package/dist-embed-scene/GenerativeKit-DR6C3LMC.js +4 -0
  11. package/dist-embed-scene/GenerativeKitMessages-Cu7wXgYa.js +1 -0
  12. package/dist-embed-scene/GenerativeKitMessages_en-Cl3kA96x.js +33 -0
  13. package/dist-embed-scene/GenerativeKitMessages_es-CEU93Cl3.js +33 -0
  14. package/dist-embed-scene/GenerativeKitMessages_fr-DmW0OAmF.js +33 -0
  15. package/dist-embed-scene/GenerativeKitMessages_it-Ba87kumS.js +33 -0
  16. package/dist-embed-scene/{HeadlightSystem-_BIIKhQ2.js → HeadlightSystem-l2XbBvXf.js} +1 -1
  17. package/dist-embed-scene/LanternEditor-H8VYYbRn.js +9 -0
  18. package/dist-embed-scene/{LaserBeam-DmH2JeMa.js → LaserBeam-B48FKTrt.js} +1 -1
  19. package/dist-embed-scene/LaunchEditor-CIYcS0Y-.js +22 -0
  20. package/dist-embed-scene/{LaunchPlume-BRnjFVcY.js → LaunchPlume-eEIp7_hM.js} +1 -1
  21. package/dist-embed-scene/{LaunchSimulation-DL7QBfEl.js → LaunchSimulation-DNNEzmzs.js} +1 -1
  22. package/dist-embed-scene/{ModuleSession-BvQABNEZ.js → ModuleSession-DLoAutYP.js} +2 -2
  23. package/dist-embed-scene/ModuleThree-R2LhnY95.js +1 -0
  24. package/dist-embed-scene/{ParameterForm-BMIW4Gkh.js → ParameterForm-ez-n_0Dw.js} +9 -9
  25. package/dist-embed-scene/{RailwaySystem-DZQr_rS_.js → RailwaySystem-C3Y0a9aT.js} +1 -1
  26. package/dist-embed-scene/{ReentryEditor-DJO_M-8-.js → ReentryEditor-CwY4oANp.js} +1 -1
  27. package/dist-embed-scene/{ReentrySimulation-pWRgNLjt.js → ReentrySimulation-BDgEPekW.js} +1 -1
  28. package/dist-embed-scene/ReferenceSystem-D9IdSvFM.js +1 -0
  29. package/dist-embed-scene/{SceneNames_en-CqzjDgS4.js → SceneNames_en-BCTAMSLj.js} +1 -1
  30. package/dist-embed-scene/{SceneNames_es-DMfxIS0T.js → SceneNames_es-BOWBdXXS.js} +1 -1
  31. package/dist-embed-scene/{SceneNames_fr-DydzEE4a.js → SceneNames_fr-De6iQ9ff.js} +1 -1
  32. package/dist-embed-scene/{SceneNames_it-DJAACEvb.js → SceneNames_it-DfBWbCPR.js} +1 -1
  33. package/dist-embed-scene/{TimelineTracks-B-bXAaF7.js → TimelineTracks-BQXJMJaJ.js} +1 -1
  34. package/dist-embed-scene/{TraceSystem-gVZk_ffU.js → TraceSystem-BD6YpW6g.js} +2 -2
  35. package/dist-embed-scene/UfoMessages_en-CXQNZd8v.js +1 -0
  36. package/dist-embed-scene/UfoMessages_es-CO-v8Jl6.js +1 -0
  37. package/dist-embed-scene/UfoMessages_fr-CGkQBn5r.js +1 -0
  38. package/dist-embed-scene/UfoMessages_it-BScqxIaH.js +1 -0
  39. package/dist-embed-scene/VideoButton-Cy_r767Z.js +1 -0
  40. package/dist-embed-scene/VideoExport-B8ZhHNnd.js +169 -0
  41. package/dist-embed-scene/{WaterSystem-DI_NBDfH.js → WaterSystem-DbyWlKho.js} +1 -1
  42. package/dist-embed-scene/browser-CltifEM0.js +1 -0
  43. package/dist-embed-scene/logo-h2-w4Mwu.png +0 -0
  44. package/dist-embed-scene/rr0-scene.mjs +426 -296
  45. package/dist-embed-scene/{sightingSchema-BfOYR_OD.js → sightingSchema-pBDQNwMz.js} +1 -1
  46. package/dist-embed-scene/trafficRuntime-CJIPy2oO.js +2 -0
  47. package/dist-embed-sighting/{AdsbLolArchiveProvider-DK4qEYPv.js → AdsbLolArchiveProvider-BqLvFUVC.js} +1 -1
  48. package/dist-embed-sighting/{BallesterGuaspAssessor-FGskpWWG.js → BallesterGuaspAssessor-CLQvJKlm.js} +1 -1
  49. package/dist-embed-sighting/{BeamEditor-BglkfKa6.js → BeamEditor-CcOf6lNz.js} +1 -1
  50. package/dist-embed-sighting/{BeamSystem-DDtPjozC.js → BeamSystem-B5d0Ymn5.js} +1 -1
  51. package/dist-embed-sighting/CaseExportMessages_en-jHlu58Y7.js +1 -0
  52. package/dist-embed-sighting/CaseExportMessages_es-dCQQFgjq.js +1 -0
  53. package/dist-embed-sighting/CaseExportMessages_fr-sDfEgjWg.js +1 -0
  54. package/dist-embed-sighting/CaseExportMessages_it-BJaglZtP.js +1 -0
  55. package/dist-embed-sighting/CaseMessages_en-CBS5QChl.js +1 -0
  56. package/dist-embed-sighting/CaseMessages_es-DAMl4aTC.js +1 -0
  57. package/dist-embed-sighting/CaseMessages_fr-C3wQxAk_.js +1 -0
  58. package/dist-embed-sighting/CaseMessages_it-CyrREg6v.js +1 -0
  59. package/dist-embed-sighting/CaseReportExport-Uf7Bs2Qz.js +65 -0
  60. package/dist-embed-sighting/CaseReportTexts_en-DlN7p1pC.js +1 -0
  61. package/dist-embed-sighting/CaseReportTexts_es-CncAEaey.js +1 -0
  62. package/dist-embed-sighting/CaseReportTexts_fr-B5nP6RlP.js +1 -0
  63. package/dist-embed-sighting/CaseReportTexts_it-Dc-oPmXB.js +1 -0
  64. package/dist-embed-sighting/{ContrailSystem-DXV0DnrQ.js → ContrailSystem-CqpZgLkb.js} +1 -1
  65. package/dist-embed-sighting/ControlPasses-BxgSO3B9.js +29 -0
  66. package/dist-embed-sighting/FilmChrome-DYiyzoB_.js +1 -0
  67. package/dist-embed-sighting/{Flightradar24Provider-Ch4GdVJG.js → Flightradar24Provider-DQtEJ3tX.js} +1 -1
  68. package/dist-embed-sighting/GLTFLoader-VIIHsteW.js +1 -0
  69. package/dist-embed-sighting/GenerativeKit-DR6C3LMC.js +4 -0
  70. package/dist-embed-sighting/GenerativeKitMessages-BudEc93g.js +1 -0
  71. package/dist-embed-sighting/GenerativeKitMessages_en-Cl3kA96x.js +33 -0
  72. package/dist-embed-sighting/GenerativeKitMessages_es-CEU93Cl3.js +33 -0
  73. package/dist-embed-sighting/GenerativeKitMessages_fr-DmW0OAmF.js +33 -0
  74. package/dist-embed-sighting/GenerativeKitMessages_it-Ba87kumS.js +33 -0
  75. package/dist-embed-sighting/HeadlightSystem-B4RR270O.js +34 -0
  76. package/dist-embed-sighting/{HynekAssessor-Cb8mZ9Ib.js → HynekAssessor-CJ9APziM.js} +1 -1
  77. package/dist-embed-sighting/LanternEditor-D1BA5pRP.js +9 -0
  78. package/dist-embed-sighting/{LaserBeam-DkKFSSp_.js → LaserBeam-BjjC_CzP.js} +1 -1
  79. package/dist-embed-sighting/LaunchEditor-TTSgWqbE.js +22 -0
  80. package/dist-embed-sighting/LaunchPlume-B2Fjd2_C.js +1 -0
  81. package/dist-embed-sighting/{LaunchSimulation-DUvH6_BB.js → LaunchSimulation-BcmPicEe.js} +1 -1
  82. package/dist-embed-sighting/{ModuleSession-GzfQ8_LE.js → ModuleSession-CY9_UusZ.js} +2 -2
  83. package/dist-embed-sighting/ModuleThree-BhryLUjX.js +1 -0
  84. package/dist-embed-sighting/{NearestApproach-BeKwz4vK.js → NearestApproach-iBLl7o1g.js} +1 -1
  85. package/dist-embed-sighting/ParameterForm-BaUeWd7v.js +91 -0
  86. package/dist-embed-sighting/{PoherAssessor-JLqDISRf.js → PoherAssessor-DDRUgnRW.js} +1 -1
  87. package/dist-embed-sighting/RailwaySystem-C1nfRJfj.js +41 -0
  88. package/dist-embed-sighting/ReadingSensitivityMessages_en-CF6XauSj.js +1 -0
  89. package/dist-embed-sighting/ReadingSensitivityMessages_es-Ca-13TTT.js +1 -0
  90. package/dist-embed-sighting/ReadingSensitivityMessages_fr-Djdd6Hdq.js +1 -0
  91. package/dist-embed-sighting/ReadingSensitivityMessages_it-CPUXxMqD.js +1 -0
  92. package/dist-embed-sighting/{ReentryEditor-BHgPXlx3.js → ReentryEditor-CGN3ewTE.js} +1 -1
  93. package/dist-embed-sighting/ReentrySimulation-C2kIulZ6.js +1 -0
  94. package/dist-embed-sighting/{ReferenceSystem-B5diz1Lt.js → ReferenceSystem-BRTCOQHk.js} +1 -1
  95. package/dist-embed-sighting/{RoadMarkings-Dv3xdtFG.js → RoadMarkings-CNLt-BEg.js} +1 -1
  96. package/dist-embed-sighting/{SceneNames_en-BbQ55UYu.js → SceneNames_en-ChY7v63o.js} +1 -1
  97. package/dist-embed-sighting/{SceneNames_es-DsJpGSDK.js → SceneNames_es-DH4YgJV5.js} +1 -1
  98. package/dist-embed-sighting/{SceneNames_fr-CKr5m8QL.js → SceneNames_fr-Ca52lykk.js} +1 -1
  99. package/dist-embed-sighting/{SceneNames_it-qSw1j95v.js → SceneNames_it-BQe9GLaj.js} +1 -1
  100. package/dist-embed-sighting/{SightingMessages_en-DuokT218.js → SightingMessages_en-Xm6PILcs.js} +1 -1
  101. package/dist-embed-sighting/{SightingMessages_es-JO8WQ1_V.js → SightingMessages_es-DMp0MUjJ.js} +1 -1
  102. package/dist-embed-sighting/{SightingMessages_fr-3C2RZVNA.js → SightingMessages_fr-NvQKGPaf.js} +1 -1
  103. package/dist-embed-sighting/{SightingMessages_it-BEMBUACg.js → SightingMessages_it-CKIf49Zt.js} +1 -1
  104. package/dist-embed-sighting/{TimelineTracks-XzShW15O.js → TimelineTracks-Ddv5sZHp.js} +1 -1
  105. package/{dist-embed-sighting-editor/TraceSystem-CDHG18il.js → dist-embed-sighting/TraceSystem-BkUPo1Xf.js} +2 -2
  106. package/dist-embed-sighting/UfoMessages_en-cLvtpfIC.js +1 -0
  107. package/dist-embed-sighting/UfoMessages_es-CO-v8Jl6.js +1 -0
  108. package/dist-embed-sighting/UfoMessages_fr-CGkQBn5r.js +1 -0
  109. package/dist-embed-sighting/UfoMessages_it-BScqxIaH.js +1 -0
  110. package/dist-embed-sighting/VideoButton-C62NkJrH.js +1 -0
  111. package/dist-embed-sighting/VideoExport-B8ZhHNnd.js +169 -0
  112. package/dist-embed-sighting/{WaterSystem-CcLIPQfy.js → WaterSystem-DrSAhM5g.js} +1 -1
  113. package/dist-embed-sighting/browser-CltifEM0.js +1 -0
  114. package/dist-embed-sighting/logo-h2-w4Mwu.png +0 -0
  115. package/dist-embed-sighting/rr0-sighting.mjs +531 -337
  116. package/dist-embed-sighting/{sightingSchema-BfOYR_OD.js → sightingSchema-pBDQNwMz.js} +1 -1
  117. package/dist-embed-sighting/trafficRuntime-CFgDqQz4.js +2 -0
  118. package/dist-embed-sighting-editor/{AdsbLolArchiveProvider-CXB-CDQ2.js → AdsbLolArchiveProvider-fZkxLAHp.js} +1 -1
  119. package/dist-embed-sighting-editor/{BallesterGuaspAssessor-Bb8Kl2FU.js → BallesterGuaspAssessor-DASadJjI.js} +1 -1
  120. package/dist-embed-sighting-editor/{BeamEditor-DJtZYFp0.js → BeamEditor-B2diaX_e.js} +1 -1
  121. package/dist-embed-sighting-editor/{BeamSystem-C6Wk_vNQ.js → BeamSystem-BfNJfayv.js} +1 -1
  122. package/dist-embed-sighting-editor/{BodyEditor-Cj7TgjV-.js → BodyEditor-CCBXFuuL.js} +1 -1
  123. package/dist-embed-sighting-editor/BodyEditorMessages_en-CckxSS1L.js +1 -0
  124. package/dist-embed-sighting-editor/BodyEditorMessages_es-B8GlFFBo.js +1 -0
  125. package/dist-embed-sighting-editor/BodyEditorMessages_fr-638ypdqf.js +1 -0
  126. package/dist-embed-sighting-editor/BodyEditorMessages_it-SKpMkHFI.js +1 -0
  127. package/dist-embed-sighting-editor/CaseEditorMessages_en-DrJY0M8h.js +1 -0
  128. package/dist-embed-sighting-editor/CaseEditorMessages_es-j8EeOBq6.js +1 -0
  129. package/dist-embed-sighting-editor/CaseEditorMessages_fr-BkwEF9mu.js +1 -0
  130. package/dist-embed-sighting-editor/CaseEditorMessages_it-d3Z0PBEw.js +1 -0
  131. package/dist-embed-sighting-editor/CaseExportMessages_en-jHlu58Y7.js +1 -0
  132. package/dist-embed-sighting-editor/CaseExportMessages_es-dCQQFgjq.js +1 -0
  133. package/dist-embed-sighting-editor/CaseExportMessages_fr-sDfEgjWg.js +1 -0
  134. package/dist-embed-sighting-editor/CaseExportMessages_it-BJaglZtP.js +1 -0
  135. package/dist-embed-sighting-editor/CaseReportExport-iCzv1W9B.js +65 -0
  136. package/dist-embed-sighting-editor/CaseReportTexts_en-DlN7p1pC.js +1 -0
  137. package/dist-embed-sighting-editor/CaseReportTexts_es-CncAEaey.js +1 -0
  138. package/dist-embed-sighting-editor/CaseReportTexts_fr-B5nP6RlP.js +1 -0
  139. package/dist-embed-sighting-editor/CaseReportTexts_it-Dc-oPmXB.js +1 -0
  140. package/dist-embed-sighting-editor/{ContrailSystem-e-OLIzTk.js → ContrailSystem-BWvO9taK.js} +1 -1
  141. package/dist-embed-sighting-editor/ControlPasses-BQ_DUxa_.js +29 -0
  142. package/dist-embed-sighting-editor/{CoverageAssessor-DUDmS-aG.js → CoverageAssessor-CSktyUlP.js} +1 -1
  143. package/dist-embed-sighting-editor/FilmChrome-DYiyzoB_.js +1 -0
  144. package/dist-embed-sighting-editor/{Flightradar24Provider-DtcvpdT3.js → Flightradar24Provider-OvRZWZWj.js} +1 -1
  145. package/dist-embed-sighting-editor/{GLTFLoader-AHdd-c6G.js → GLTFLoader-CM7Uk25s.js} +1 -1
  146. package/dist-embed-sighting-editor/GenerativeKit-DR6C3LMC.js +4 -0
  147. package/dist-embed-sighting-editor/GenerativeKitMessages-BNXaLr1m.js +1 -0
  148. package/dist-embed-sighting-editor/GenerativeKitMessages_en-Cl3kA96x.js +33 -0
  149. package/dist-embed-sighting-editor/GenerativeKitMessages_es-CEU93Cl3.js +33 -0
  150. package/dist-embed-sighting-editor/GenerativeKitMessages_fr-DmW0OAmF.js +33 -0
  151. package/dist-embed-sighting-editor/GenerativeKitMessages_it-Ba87kumS.js +33 -0
  152. package/dist-embed-sighting-editor/{GeoExportTexts-DAllttgw.js → GeoExportTexts-DBGGdRnP.js} +1 -1
  153. package/dist-embed-sighting-editor/{GeoJsonExport-3snOe-2J.js → GeoJsonExport-BZ-0v8fM.js} +1 -1
  154. package/dist-embed-sighting-editor/GeographicFigures-DqhWddS9.js +1 -0
  155. package/dist-embed-sighting-editor/{HeadlightSystem-CLhqQjbe.js → HeadlightSystem-C-8Gl3vu.js} +1 -1
  156. package/dist-embed-sighting-editor/{HynekAssessor-DvVp-CLS.js → HynekAssessor-CH2E88xV.js} +1 -1
  157. package/dist-embed-sighting-editor/{InterviewEditorElement-44XFadV4.js → InterviewEditorElement-Bz3hyZ-m.js} +2 -2
  158. package/dist-embed-sighting-editor/{KmlExport-B0SKgn4U.js → KmlExport-Bh4eTycx.js} +1 -1
  159. package/dist-embed-sighting-editor/{KmlImport-B9mAzJwr.js → KmlImport-CKxaATTA.js} +1 -1
  160. package/dist-embed-sighting-editor/LanternEditor-tTk1vUZm.js +9 -0
  161. package/dist-embed-sighting-editor/{LaserBeam-QJPhnVO_.js → LaserBeam-CtogDP38.js} +1 -1
  162. package/dist-embed-sighting-editor/LaunchEditor-CteAalch.js +22 -0
  163. package/dist-embed-sighting-editor/{LaunchPlume-C_r62XTj.js → LaunchPlume-BtRrJTP9.js} +1 -1
  164. package/dist-embed-sighting-editor/{LaunchSimulation-BSDTfZTv.js → LaunchSimulation-xKwguVJt.js} +1 -1
  165. package/dist-embed-sighting-editor/{ModelSource-B85niY1n.js → ModelSource-CnKzaNDn.js} +1 -1
  166. package/dist-embed-sighting-editor/{ModelThumbnails-uYh2sUIb.js → ModelThumbnails-UE_Er5EW.js} +1 -1
  167. package/dist-embed-sighting-editor/{ModelViewer-DLZhhuq5.js → ModelViewer-DoCshJc6.js} +1 -1
  168. package/dist-embed-sighting-editor/{ModuleConformance-CBMdTSVo.js → ModuleConformance-BKvZnuw9.js} +2 -2
  169. package/dist-embed-sighting-editor/{ModuleSession-rFLStWcj.js → ModuleSession-CJstaNEN.js} +3 -3
  170. package/dist-embed-sighting-editor/ModuleThree-1hxqvWFa.js +1 -0
  171. package/dist-embed-sighting-editor/{ModulesPanelElement-CGp6DrpQ.js → ModulesPanelElement-DdGqqdn4.js} +3 -3
  172. package/dist-embed-sighting-editor/{NearestApproach-Ctw1-XBO.js → NearestApproach-BH3Yw8Qz.js} +1 -1
  173. package/dist-embed-sighting-editor/{PictureRegistration-ZyvGfReK.js → PictureRegistration-B9C6iY17.js} +1 -1
  174. package/dist-embed-sighting-editor/{PoherAssessor-CLKwvgUL.js → PoherAssessor-DWcCWUfa.js} +1 -1
  175. package/dist-embed-sighting-editor/RailwaySystem-D3VBmx1X.js +41 -0
  176. package/dist-embed-sighting-editor/ReadingSensitivityMessages_en-CF6XauSj.js +1 -0
  177. package/dist-embed-sighting-editor/ReadingSensitivityMessages_es-Ca-13TTT.js +1 -0
  178. package/dist-embed-sighting-editor/ReadingSensitivityMessages_fr-Djdd6Hdq.js +1 -0
  179. package/dist-embed-sighting-editor/ReadingSensitivityMessages_it-CPUXxMqD.js +1 -0
  180. package/dist-embed-sighting-editor/{ReentryEditor-DXe8wen6.js → ReentryEditor-BDyG-48K.js} +2 -2
  181. package/dist-embed-sighting-editor/{ReentrySimulation-BxVE5Dsn.js → ReentrySimulation-BQj0wWXW.js} +1 -1
  182. package/dist-embed-sighting-editor/ReferenceSystem-C9NRL7UY.js +1 -0
  183. package/dist-embed-sighting-editor/RoadMarkings-ByQL2MTo.js +1 -0
  184. package/dist-embed-sighting-editor/SceneNames_en-BdRB6cjg.js +1 -0
  185. package/dist-embed-sighting-editor/SceneNames_es-Dk0UmXHp.js +1 -0
  186. package/dist-embed-sighting-editor/SceneNames_fr-_z2iZ8Bm.js +1 -0
  187. package/dist-embed-sighting-editor/SceneNames_it-CE7fanb3.js +1 -0
  188. package/dist-embed-sighting-editor/{SightingEditorMessages_en-G8-sD56V.js → SightingEditorMessages_en-jinQLW0J.js} +1 -1
  189. package/dist-embed-sighting-editor/{SightingEditorMessages_es-DEmsmIRU.js → SightingEditorMessages_es-CsrGiJYn.js} +1 -1
  190. package/dist-embed-sighting-editor/{SightingEditorMessages_fr-D2HXab_N.js → SightingEditorMessages_fr-cQ6KnPU1.js} +1 -1
  191. package/dist-embed-sighting-editor/{SightingEditorMessages_it-LpFdlGY5.js → SightingEditorMessages_it-D3Rqso5s.js} +1 -1
  192. package/dist-embed-sighting-editor/{SightingFileEditor-CnKF2ndt.js → SightingFileEditor-BCjntT4l.js} +1 -1
  193. package/dist-embed-sighting-editor/{TraceImport-CL8lefw6.js → TraceImport-uGVIjCrc.js} +2 -2
  194. package/{dist-embed-sighting/TraceSystem-XybhI4uJ.js → dist-embed-sighting-editor/TraceSystem-g262KZ3G.js} +2 -2
  195. package/dist-embed-sighting-editor/UfoMessages_en-JeMK-39o.js +1 -0
  196. package/dist-embed-sighting-editor/UfoMessages_es-CO-v8Jl6.js +1 -0
  197. package/dist-embed-sighting-editor/UfoMessages_fr-CGkQBn5r.js +1 -0
  198. package/dist-embed-sighting-editor/UfoMessages_it-BScqxIaH.js +1 -0
  199. package/dist-embed-sighting-editor/VideoButton-CqCZ65oK.js +1 -0
  200. package/dist-embed-sighting-editor/VideoExport-B8ZhHNnd.js +169 -0
  201. package/dist-embed-sighting-editor/WaterSystem-CIbQPMqE.js +1 -0
  202. package/dist-embed-sighting-editor/browser-CltifEM0.js +1 -0
  203. package/dist-embed-sighting-editor/logo-h2-w4Mwu.png +0 -0
  204. package/dist-embed-sighting-editor/rr0-sighting-editor.mjs +610 -398
  205. package/dist-embed-sighting-editor/{sightingSchema-9xw8srxN.js → sightingSchema-RamhmoRU.js} +1 -1
  206. package/dist-embed-sighting-editor/{surroundingsSources-DXpzMDPy.js → surroundingsSources-BExFsNzP.js} +1 -1
  207. package/dist-embed-sighting-editor/trafficRuntime-CPRQW0Ho.js +2 -0
  208. package/package.json +2 -1
  209. package/dist-embed-scene/GLTFLoader-DDba3PaV.js +0 -1
  210. package/dist-embed-scene/LanternEditor-2q5seAWj.js +0 -9
  211. package/dist-embed-scene/LaunchEditor-Cupksu8A.js +0 -22
  212. package/dist-embed-scene/ModuleThree-12Uq6OyD.js +0 -1
  213. package/dist-embed-scene/ReferenceSystem-D9agTeWl.js +0 -1
  214. package/dist-embed-scene/UfoMessages_en-CRIdIMYy.js +0 -1
  215. package/dist-embed-scene/UfoMessages_es-BoulVpJw.js +0 -1
  216. package/dist-embed-scene/UfoMessages_fr-8f6FJbk6.js +0 -1
  217. package/dist-embed-scene/UfoMessages_it-cngzFg3N.js +0 -1
  218. package/dist-embed-scene/browser-_Ncw3Jhn.js +0 -1
  219. package/dist-embed-scene/trafficRuntime-BDtw1Kqi.js +0 -2
  220. package/dist-embed-sighting/CaseMessages_en-DEyvxYxv.js +0 -1
  221. package/dist-embed-sighting/CaseMessages_es-DDsQ93tK.js +0 -1
  222. package/dist-embed-sighting/CaseMessages_fr-DoHbDEkG.js +0 -1
  223. package/dist-embed-sighting/CaseMessages_it-CF8sKknV.js +0 -1
  224. package/dist-embed-sighting/GLTFLoader-BDyucwJ-.js +0 -1
  225. package/dist-embed-sighting/HeadlightSystem-DGUfgm2c.js +0 -34
  226. package/dist-embed-sighting/LanternEditor-CaZ1JhZS.js +0 -9
  227. package/dist-embed-sighting/LaunchEditor-QRG2uHH8.js +0 -22
  228. package/dist-embed-sighting/LaunchPlume-DBINBQgQ.js +0 -1
  229. package/dist-embed-sighting/ModuleThree-tnKi-oul.js +0 -1
  230. package/dist-embed-sighting/ParameterForm-DW6cQmYI.js +0 -91
  231. package/dist-embed-sighting/RailwaySystem-BfTJvmf3.js +0 -41
  232. package/dist-embed-sighting/ReentrySimulation-C3BR2hs3.js +0 -1
  233. package/dist-embed-sighting/UfoMessages_en-CoSqGYwb.js +0 -1
  234. package/dist-embed-sighting/UfoMessages_es-BoulVpJw.js +0 -1
  235. package/dist-embed-sighting/UfoMessages_fr-8f6FJbk6.js +0 -1
  236. package/dist-embed-sighting/UfoMessages_it-cngzFg3N.js +0 -1
  237. package/dist-embed-sighting/browser-_Ncw3Jhn.js +0 -1
  238. package/dist-embed-sighting/trafficRuntime-BAuwwA-Z.js +0 -2
  239. package/dist-embed-sighting-editor/BodyEditorMessages_en-zfy3BJb5.js +0 -1
  240. package/dist-embed-sighting-editor/BodyEditorMessages_es-w95anMnI.js +0 -1
  241. package/dist-embed-sighting-editor/BodyEditorMessages_fr-ixsDgTbt.js +0 -1
  242. package/dist-embed-sighting-editor/BodyEditorMessages_it-B3oQzqHE.js +0 -1
  243. package/dist-embed-sighting-editor/CaseEditorMessages_en-D47ntA6R.js +0 -1
  244. package/dist-embed-sighting-editor/CaseEditorMessages_es-CyIdBeD_.js +0 -1
  245. package/dist-embed-sighting-editor/CaseEditorMessages_fr-DXaZI1jZ.js +0 -1
  246. package/dist-embed-sighting-editor/CaseEditorMessages_it-Cp1-Jm34.js +0 -1
  247. package/dist-embed-sighting-editor/GeographicFigures-CLBS2HJ-.js +0 -1
  248. package/dist-embed-sighting-editor/LanternEditor-ngKN2Zt3.js +0 -9
  249. package/dist-embed-sighting-editor/LaunchEditor-B8KlP5eo.js +0 -22
  250. package/dist-embed-sighting-editor/ModuleThree-DrKN6B-3.js +0 -1
  251. package/dist-embed-sighting-editor/RailwaySystem-C67LdkZv.js +0 -41
  252. package/dist-embed-sighting-editor/ReferenceSystem-B201fXMC.js +0 -1
  253. package/dist-embed-sighting-editor/RoadMarkings-DJ2HL-6g.js +0 -1
  254. package/dist-embed-sighting-editor/SceneNames_en-DggkchR4.js +0 -1
  255. package/dist-embed-sighting-editor/SceneNames_es-BtXXqtTk.js +0 -1
  256. package/dist-embed-sighting-editor/SceneNames_fr-I6FOP0oQ.js +0 -1
  257. package/dist-embed-sighting-editor/SceneNames_it-DrW4eXBX.js +0 -1
  258. package/dist-embed-sighting-editor/UfoMessages_en-BxhQNf5z.js +0 -1
  259. package/dist-embed-sighting-editor/UfoMessages_es-BoulVpJw.js +0 -1
  260. package/dist-embed-sighting-editor/UfoMessages_fr-8f6FJbk6.js +0 -1
  261. package/dist-embed-sighting-editor/UfoMessages_it-cngzFg3N.js +0 -1
  262. package/dist-embed-sighting-editor/WaterSystem-B2xlCmn2.js +0 -1
  263. package/dist-embed-sighting-editor/browser-_Ncw3Jhn.js +0 -1
  264. package/dist-embed-sighting-editor/trafficRuntime-_7Uw8kC_.js +0 -2
@@ -1,91 +0,0 @@
1
- import{ay as q,az as K,aA as f,S as T,aB as g}from"./rr0-sighting.mjs";class W{static attach(t,e,i){t.classList.add(e);const n=`${e}-style`;if(t.parentElement?.querySelector(`:scope > style.${n}`))return;const s=t.ownerDocument.createElement("style");s.className=n,s.textContent=i,t.before(s)}}class D{constructor(t,e,i,n){this.button=t,this.onPick=i,this.idOf=n;const s=this.panel=t.ownerDocument.createElement("div");s.id=e,s.className="add-menu",s.setAttribute("popover",""),s.setAttribute("role","menu");const o=`--add-menu-${e}`;t.style.setProperty("anchor-name",o),s.style.setProperty("position-anchor",o),t.setAttribute("popovertarget",e),t.setAttribute("aria-haspopup","menu"),t.after(s)}static CSS=`
2
- .add-menu { padding: .3em 0; border: 1px solid color-mix(in srgb, CanvasText 30%, transparent); border-radius: 4px; background: Canvas; color: CanvasText;
3
- box-shadow: 0 2px 8px rgba(0, 0, 0, .25); max-height: 60vh; overflow-y: auto; font-size: .9em; }
4
- @supports (position-area: bottom span-left) {
5
- .add-menu:popover-open { inset: auto; position-area: bottom span-left; margin: .2em 0 0 0; }
6
- }
7
- .add-menu-choice { display: block; width: 100%; padding: .25em .9em; border: 0; background: none; color: inherit; font: inherit; text-align: left;
8
- cursor: pointer; white-space: nowrap; }
9
- .add-menu-choice:hover, .add-menu-choice:focus-visible { background: color-mix(in srgb, CanvasText 12%, transparent); }
10
- .add-menu-choice[aria-disabled="true"] { opacity: .45; cursor: not-allowed; background: none; }
11
- .add-menu-choice[hidden] { display: none; }
12
- `;panel;kinds=[];last;setKinds(t){this.kinds=t;const e=this.button.ownerDocument;this.panel.replaceChildren(...t.map(i=>{const n=e.createElement("button");return n.type="button",n.className="add-menu-choice",n.setAttribute("role","menuitem"),this.idOf&&(n.id=this.idOf(i.value)),n.dataset.value=i.value,n.textContent=i.label,n.hidden=i.hidden===!0,i.disabledReason&&(n.setAttribute("aria-disabled","true"),n.title=i.disabledReason),n.addEventListener("click",()=>{n.getAttribute("aria-disabled")!=="true"&&(this.close(),this.last=i.value,this.onPick(i.value))}),n}))}setDisabled(t,e){this.kinds=this.kinds.map(n=>n.value===t?{...n,disabledReason:e}:n);const i=[...this.panel.children].find(n=>n.dataset.value===t);i&&(e?(i.setAttribute("aria-disabled","true"),i.title=e):(i.removeAttribute("aria-disabled"),i.title=""))}labelOf(t){return this.kinds.find(e=>e.value===t)?.label??t}get lastPicked(){return this.last}close(){if(typeof this.panel.hidePopover=="function")try{this.panel.matches(":popover-open")&&this.panel.hidePopover()}catch{}}}class A{constructor(t){this.options=t,this.row=document.createElement("div"),this.row.className="element-list-row",this.pickerRow=document.createElement("label"),this.pickerRow.className="element-list-picker",this.select=document.createElement("select"),this.select.id=t.ids.list,this.select.addEventListener("change",()=>t.onSelect(this.select.value)),this.pickerRow.append(this.select),t.header.append(this.row),this.row.append(this.pickerRow);const e=t.navigation;e&&(this.previousButton=this.iconButton(`${t.ids.list}-previous`,"▲"),this.nextButton=this.iconButton(`${t.ids.list}-next`,"▼"),this.previousButton.addEventListener("click",()=>e.onStep(-1)),this.nextButton.addEventListener("click",()=>e.onStep(1)),this.row.append(this.previousButton,this.nextButton),e.scope.addEventListener("keydown",i=>{if(!i.altKey||i.ctrlKey||i.metaKey||i.shiftKey||i.key!=="ArrowUp"&&i.key!=="ArrowDown"||this.pickerRow.closest("[hidden]")||!this.pickerRow.isConnected)return;i.preventDefault(),i.stopPropagation();const n=i.key==="ArrowUp"?this.previousButton:this.nextButton;n&&!n.disabled&&e.onStep(i.key==="ArrowUp"?-1:1)}));for(const i of t.actions??[]){const n=this.iconButton(i.id,i.glyph);n.addEventListener("click",()=>i.onClick()),this.actionButtons.set(i.id,n),this.row.append(n)}this.removeButton=this.iconButton(t.ids.remove,"🗑"),this.removeButton.addEventListener("click",()=>t.onRemove()),this.emptyText=document.createElement("span"),this.emptyText.className="element-list-empty",this.addButton=this.iconButton(t.ids.add,"+"),this.addButton.classList.add("element-list-add"),this.row.append(this.removeButton,this.emptyText,this.addButton),t.ids.kinds?this.kindMenu=new D(this.addButton,t.ids.kinds,i=>t.onAdd(i),t.ids.kind):this.addButton.addEventListener("click",()=>t.onAdd(void 0)),t.body&&t.body.classList.add("element-list-body")}static CSS=`
13
- .element-list-row { display: flex; align-items: flex-end; flex-wrap: wrap; gap: .4em; flex: 1 1 100%; min-width: 0; }
14
- .element-list-picker { flex: 1 1 10em; min-width: 0; display: flex; }
15
- .element-list-picker select { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; }
16
- .element-list-empty { align-self: center; opacity: .75; font-style: italic; }
17
- /* The fields of the picked element unroll from its picker: the frame starts where the picker ends, with no space between (the gap of the
18
- container both stand in is taken back, see glue), its corner under the picker square. The row is aligned on its bottom so that the
19
- picker's lower edge is the row's, whatever the height of the buttons beside it. */
20
- .element-list-body { flex: 1 1 100%; min-width: 0; box-sizing: border-box; border: 1px solid color-mix(in srgb, currentColor 30%, transparent);
21
- border-radius: 0 6px 6px 6px; padding: .5em .6em; margin: 0 0 .3em; display: flex; flex-wrap: wrap;
22
- align-items: center; gap: .5em; }
23
- .element-list-picker select { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
24
- .element-list-row [hidden], .element-list-body[hidden] { display: none !important; }
25
- ${D.CSS}`;static showPresence(t,e,i,n=!1){for(const s of t.children)if(!s.matches(".element-list-add, .add-menu, .add-reason")){if(s.matches(".element-list-empty")){s.hidden=i||n;continue}if(s.matches(".element-list-picker")){s.hidden=!i&&!n;continue}s.hidden=!i&&!n,s instanceof HTMLButtonElement&&!i&&(s.disabled=!0)}e&&(e.hidden=!i,i&&!A.glued.has(e)&&A.glue(e))}static glued=new WeakSet;static glue(t){const e=t.parentElement,i=t.ownerDocument.defaultView;if(!e||!i)return;const n=i.getComputedStyle(e),s=/flex|grid/.test(n.display)&&parseFloat(n.rowGap)||0;t.style.marginTop=`${-s}px`,n.display!=="none"&&A.glued.add(t)}select;row;pickerRow;emptyText;removeButton;addButton;addReason;kindMenu;previousButton;nextButton;actionButtons=new Map;items=[];noneLabel="—";addLabel="";removeEnabled=!0;actionEnabled=new Map;iconButton(t,e){const i=document.createElement("button");return i.type="button",i.className="icon-btn",i.id=t,q.show(i,e),i}setLabels(t){if(this.previousButton&&this.nextButton)for(const[e,i,n]of[[this.previousButton,t.previous??"","Alt+↑"],[this.nextButton,t.next??"","Alt+↓"]]){const s=i===""?n:`${i} (${n})`;e.title=s,e.setAttribute("aria-label",i||s),e.setAttribute("aria-keyshortcuts",n.replace("↑","ArrowUp").replace("↓","ArrowDown"))}this.select.setAttribute("aria-label",t.list),this.emptyText.textContent=t.empty??"",this.noneLabel=t.none??this.noneLabel,this.addLabel=t.add,this.kindMenu?.panel.setAttribute("aria-label",t.add),this.options.optional&&this.listed(this.items,this.select.value);for(const[e,i]of[[this.removeButton,t.remove],[this.addButton,t.add],...[...this.actionButtons].map(([n,s])=>[s,t.actions?.[n]??""])])e.title=i,e.setAttribute("aria-label",i)}setKinds(t){this.kindMenu?.setKinds(t)}kindLabel(t){return this.kindMenu?.labelOf(t)??t}get pickedKind(){return this.kindMenu?.lastPicked}setItems(t,e){this.items=t,this.listed(t,e)}listed(t,e){this.select.replaceChildren(...this.options.optional?[new Option(this.noneLabel,"")]:[],...t.map(i=>new Option(i.label,i.id))),e!==void 0&&(this.select.value=e),this.select.selectedIndex<0&&(this.select.selectedIndex=0),this.setPresent(this.options.optional?this.select.value!=="":t.length>0)}setStepState(t,e){this.previousButton&&(this.previousButton.disabled=!t),this.nextButton&&(this.nextButton.disabled=!e)}setActionEnabled(t,e){const i=this.actionButtons.get(t);i&&(i.disabled=!e||this.select.disabled),this.actionEnabled.set(t,e)}setRemoveEnabled(t){this.removeEnabled=t,this.removeButton.disabled=!t||this.select.value===""&&this.options.optional===!0}get value(){return this.select.value}setAddState(t,e){this.addButton.disabled=!t;const i=e??this.addLabel;this.addButton.title=i,this.addButton.setAttribute("aria-label",i),this.addReason||(this.addReason=this.addButton.ownerDocument.createElement("span"),this.addReason.className="add-reason",this.addReason.style.cssText="font-size: .85em; opacity: .8; align-self: center;",this.row.append(this.addReason)),this.addReason.textContent=!t&&e?e:"",this.addReason.hidden=t||!e}rename(t,e){const i=[...this.select.options].find(n=>n.value===t);i&&(i.textContent=e)}show(t){this.select.value=t,this.options.optional&&this.setPresent(this.select.value!=="")}setPresent(t){const e=this.options.optional===!0;if(A.showPresence(this.row,this.options.body,t,e),this.select.disabled=!t&&!e,!!t){this.removeButton.disabled=!this.removeEnabled;for(const[i,n]of this.actionButtons)n.disabled=this.actionEnabled.get(i)===!1}}focus(){this.select.focus()}}class v{static CHROME="2.6em";static UNBOUNDED=9999;static fit(t){const e=[...t.querySelectorAll('input[type="number"]')];for(const i of e)i.style.width=`calc(${v.charsFor(i)}ch + ${v.CHROME})`,v.hold(i,!v.isFocused(i)),i.dataset.held!==""&&(i.dataset.held="",i.addEventListener("input",()=>v.hold(i)),i.addEventListener("change",()=>v.hold(i,!0)));return e.length}static hold(t,e=!1){const i=v.heldValue(t.value,t,e);i!==t.value&&(t.value=i,t.dispatchEvent(new Event("input",{bubbles:!0})))}static isFocused(t){return t.getRootNode().activeElement===t}static heldValue(t,e,i=!1){if(t===""||!/^-?\d+(\.\d+)?$/.test(t))return t;const n=v.wholeOnly(e.step)?0:v.decimalsOf(e.step),s=t.indexOf("."),o=s>=0&&t.length-s-1>n?n===0?t.slice(0,s):t.slice(0,s+n+1):t,a=Number(o),d=e.min===""?void 0:Number(e.min),r=e.max===""?void 0:Number(e.max);return r!==void 0&&a>r?String(r):i&&d!==void 0&&a<d?String(d):o}static charsFor(t){const e=a=>a===""?void 0:Math.abs(Number(a)),i=Math.max(e(t.max)??v.UNBOUNDED,e(t.min)??0),n=String(Math.floor(Number.isFinite(i)?i:v.UNBOUNDED)).length,s=t.min!==""&&Number(t.min)<0?1:0,o=v.wholeOnly(t.step)?0:v.decimalsOf(t.step);return n+s+(o>0?o+1:0)}static decimalsOf(t){if(t===""||t==="any")return 2;const e=t.indexOf(".");return Math.max(2,e<0?0:t.length-e-1)}static wholeOnly(t){return t!==""&&t!=="any"&&!t.includes(".")}}class E{static CSS=`
26
- .window-close {
27
- position: absolute; top: 8px; right: 8px; z-index: 1;
28
- display: inline-flex; align-items: center; justify-content: center;
29
- width: 32px; height: 32px; min-width: 32px; min-height: 32px; padding: 0;
30
- border: 0; border-radius: 8px; background: none; color: inherit; opacity: .7; cursor: pointer;
31
- }
32
- .window-close:hover, .window-close:focus-visible { opacity: 1; background: color-mix(in srgb, currentColor 12%, transparent); }
33
- :is(dialog, [popover], .context-menu):has(> .window-close) { position: relative; padding-right: 44px; }
34
- .context-menu:has(> .window-close) { position: fixed; }
35
- `;static button(t,e,i){const n=t.querySelector(":scope > .window-close");if(n)return E.label(n,e),n;const s=document.createElement("button");return s.type="button",s.className="window-close",s.innerHTML=q.CLOSE,E.label(s,e),s.addEventListener("click",o=>{o.stopPropagation(),i()}),t.prepend(s),s}static popover(t,e){return E.button(t,e,()=>{typeof t.hidePopover=="function"&&t.matches(":popover-open")&&t.hidePopover()})}static dialog(t,e,i){if(!t.dataset.closesBeside){t.dataset.closesBeside="true";let n=!1;t.addEventListener("pointerdown",s=>n=s.target===t),t.addEventListener("click",s=>{s.target===t&&n&&E.outside(t,s)&&i()})}return E.button(t,e,i)}static outside(t,e){const i=t.getBoundingClientRect();return e.clientX<i.left||e.clientX>i.right||e.clientY<i.top||e.clientY>i.bottom}static label(t,e){t.title=e,t.setAttribute("aria-label",e)}}class b extends HTMLElement{static TAG="rr0-input-basis";static CSS=`
36
- rr0-input-basis { display: inline-block; }
37
- rr0-input-basis[hidden] { display: none; }
38
- .basis-mark {
39
- display: inline-block; margin-left: 8px; padding: 0 8px; border: 1px solid var(--glow-dim); border-radius: 999px;
40
- font: 600 11px/1.6 var(--sans); color: var(--glow); cursor: pointer; vertical-align: .05em; user-select: none;
41
- }
42
- /* Always there, so that nothing moves when it shows: "stated", the default, said quietly, and fully on the hover of its field. */
43
- .basis-mark[data-basis="stated"] { border-style: dashed; opacity: .55; }
44
- :is(label, .field, .event-param-label):is(:hover, :focus-within) .basis-mark, .basis-mark:is(:hover, :focus-visible) { opacity: 1; }
45
- .basis-mark[data-basis="assumed"], .basis-mark[data-basis="derived"] { font-style: italic; }
46
- /* Turned to make a hypothesis fit: nothing is judged against it (see Basis), and it does not read as one of the account's own. */
47
- .basis-mark[data-basis="fitted"] { font-style: italic; border-style: dotted; }
48
- .basis-window { width: min(26em, 92vw); padding: 18px 20px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--ground-raised); color: var(--ink); box-shadow: 0 12px 32px rgba(0, 0, 0, .3); }
49
- .basis-window h3 { margin: 0 0 12px; font: 600 19px/1.3 var(--serif); }
50
- .basis-window label { display: flex; flex-direction: column; gap: 5px; margin: 0 0 12px; font: 600 13px/1.3 var(--sans); color: var(--ink-dim); }
51
- .basis-window :is(select, textarea) { box-sizing: border-box; width: 100%; font-weight: 400; }
52
- /* Beside its pill, under it or above it where there is room (anchored, see open); centred where anchors are not known. Fixed, against a
53
- window's own rule (WindowClose), which makes a popover with a ✕ relative, and so drawn at the top of the page. */
54
- .basis-window.basis-window:popover-open { position: fixed; inset: auto; margin: 6px 0; max-height: calc(100vh - 24px); overflow: auto;
55
- position-area: bottom span-right; position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline; }
56
- @supports not (position-area: bottom) { .basis-window.basis-window:popover-open { inset: 0; margin: auto; height: fit-content; } }
57
- .basis-window textarea { min-height: 8em; font: 400 14px/1.45 var(--sans, sans-serif); resize: vertical; }
58
- /* A value that names what it rests on (see ValueSource): said on the pill itself, so that a reader sees which values can be gone and
59
- looked at without opening anything. */
60
- .basis-mark[data-sourced] { text-decoration: underline dotted; text-underline-offset: 2px; }
61
- .basis-source { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
62
- .basis-source h4 { margin: 0 0 10px; font: 600 13px/1.3 var(--sans); color: var(--ink-dim); }
63
- .basis-source-free { margin: 0; font: 400 13px/1.45 var(--sans); color: var(--ink-dim); }
64
- .basis-window input { box-sizing: border-box; width: 100%; font-weight: 400; }
65
- `;hows=[];rationaleKept=!0;sourceKept=!0;choices={};wording;sourceWording;shown;mark;window;static count=0;anchor=`--rr0-basis-${++b.count}`;set anchorKey(t){this.anchor=`--rr0-basis-${t.replace(/[^a-zA-Z0-9_-]/g,"-")}`,this.mark?.style.setProperty("anchor-name",this.anchor)}build(){if(this.mark)return;const t=document.createElement("span");t.className="basis-mark",t.setAttribute("role","button"),t.tabIndex=0,t.style.setProperty("anchor-name",this.anchor);const e=i=>{i.preventDefault(),i.stopPropagation(),this.open()};t.addEventListener("click",e),t.addEventListener("keydown",i=>{(i.key==="Enter"||i.key===" ")&&e(i)}),this.append(t),this.mark=t,this.say()}connectedCallback(){this.build()}set messages(t){this.wording=t,this.say()}set sourceMessages(t){this.sourceWording=t}get entry(){return this.shown}set entry(t){this.shown=t&&(t.basis!=="stated"||t.how!==void 0||t.rationale!==void 0||t.source!==void 0)?{...t}:void 0,this.say()}get pill(){return this.build(),this.mark}say(){const t=this.mark,e=this.wording;if(!t||!e)return;const i=this.shown?.basis??"stated";t.dataset.basis=i,this.dataset.basis=i,t.textContent!==e.basis[i]&&(t.textContent=e.basis[i]),this.shown?.source?t.dataset.sourced="yes":delete t.dataset.sourced,t.title=this.shown?.rationale?`${e.title} : ${this.shown.rationale}`:e.title,t.setAttribute("aria-label",`${e.title} : ${e.basis[i]}`)}open(){const t=this.wording;if(!t)return;const e=Object.assign(document.createElement("h3"),{textContent:t.title}),i=document.createElement("select");for(const u of["established","measured","stated","derived","assumed","fitted"])i.append(new Option(t.basis[u],u));i.value=this.shown?.basis??"stated";const n=document.createElement("select");n.append(new Option("—",""));for(const u of this.hows)n.append(new Option(u.label,u.value));n.value=this.shown?.how??"";const s=document.createElement("textarea");s.value=this.shown?.rationale??"";const o=(u,p)=>{const m=document.createElement("label");return m.append(Object.assign(document.createElement("span"),{textContent:u}),p),m};let a=()=>this.shown?.source;const d=()=>{const u=i.value,p=a();this.entry={basis:u,...n.value?{how:n.value}:{},...s.value.trim()?{rationale:s.value.trim()}:{},...p?{source:p}:{}},this.dispatchEvent(new CustomEvent("basischange",{detail:{entry:this.shown},bubbles:!0,composed:!0}))};n.addEventListener("change",d),s.addEventListener("change",d);const r=document.createElement("div");r.className="basis-source";const c=()=>{a=this.drawSource(r,i.value,o,()=>d())};i.addEventListener("change",()=>{c(),d()});const l=this.windowElement(),h=this.sourceKept&&this.sourceWording!==void 0;h&&c(),l.replaceChildren(e,o(t.basisField,i),...this.hows.length>0?[o(t.howField,n)]:[],...this.rationaleKept?[o(t.rationaleField,s)]:[],...h?[r]:[]),E.popover(l,t.title),typeof l.showPopover=="function"&&l.isConnected?l.showPopover():l.hidden=!1}static kindOf(t){return t?.said?"said":t?.picture?"picture":t?.document!==void 0||t?.at||t?.url?"document":t?.tool?"tool":"none"}drawSource(t,e,i,n){const s=this.sourceWording;if(!s)return t.replaceChildren(),()=>{};if(K.free({basis:e}))return t.replaceChildren(Object.assign(document.createElement("p"),{className:"basis-source-free",textContent:s.free})),()=>{};const o=this.choices.interviews??[],a=this.choices.pictures??[],d=["none",...o.length>0?["said"]:[],"document",...a.length>0?["picture"]:[],"tool"],r=document.createElement("select");for(const m of d)r.append(new Option(s.kinds[m],m));const c=this.shown?.source,l=b.kindOf(c);r.value=d.includes(l)?l:"none";const h=document.createElement("div");let u=()=>{};const p=()=>{u=this.drawSourceFields(h,r.value,c,i,n)};return r.addEventListener("change",()=>{p(),n()}),p(),t.replaceChildren(i(s.field,r),h),()=>u()}drawSourceFields(t,e,i,n,s){const o=this.sourceWording,a=(e===b.kindOf(i)?i:void 0)??{},d=c=>{const l=document.createElement("input");return l.type="text",l.value=c??"",l.addEventListener("change",s),l},r=c=>c.value.trim()||void 0;if(e==="said"){const c=this.choices.interviews??[],l=document.createElement("select");for(const p of c)l.append(new Option(p.id===void 0?o.interviewOnly:p.label,p.id??""));l.value=a.said?.interview??c[0]?.id??"";const h=document.createElement("select"),u=()=>{const p=c.find(m=>(m.id??"")===l.value)??c[0];h.replaceChildren(...(p?.segments??[]).map(m=>new Option(m.label||o.segmentUnnamed.replace("{n}",String(m.index+1)),String(m.index)))),a.said&&h.querySelector(`option[value="${a.said.segment}"]`)&&(h.value=String(a.said.segment))};return u(),l.addEventListener("change",()=>{u(),s()}),h.addEventListener("change",s),t.replaceChildren(n(o.interviewField,l),n(o.segmentField,h)),()=>{if(h.value==="")return;const p=c.find(m=>(m.id??"")===l.value);return{said:{...p?.id!==void 0?{interview:p.id}:{},segment:Number(h.value),...a.said?.range?{range:a.said.range}:{}}}}}if(e==="picture"){const c=this.choices.pictures??[],l=document.createElement("select");l.append(new Option("—",""));for(const h of c)l.append(new Option(h.label,h.id));return l.value=a.picture??"",l.addEventListener("change",s),t.replaceChildren(n(o.pictureField,l)),()=>l.value?{picture:l.value}:void 0}if(e==="tool"){const c=d(a.tool);return t.replaceChildren(n(o.toolField,c)),()=>r(c)?{tool:r(c)}:void 0}if(e==="document"){const c=d(typeof a.document=="string"?a.document:void 0),l=d(a.at),h=d(a.url);return t.replaceChildren(n(o.documentField,c),n(o.atField,l),n(o.urlField,h)),()=>{const u={...r(c)?{document:r(c)}:{},...r(l)?{at:r(l)}:{},...r(h)?{url:r(h)}:{}};return typeof a.document=="object"&&a.document!==null&&r(c)===void 0?Object.keys(u).length>0||a.document?{...u,document:a.document}:void 0:Object.keys(u).length>0?u:void 0}}return t.replaceChildren(),()=>{}}windowElement(){if(this.window)return this.window;const t=document.createElement("div");t.className="basis-window",t.setAttribute("popover",""),t.setAttribute("role","dialog"),t.style.setProperty("position-anchor",this.anchor),t.addEventListener("toggle",i=>{i.newState==="closed"&&(t.remove(),this.window=void 0)});const e=this.getRootNode();return e instanceof ShadowRoot?e.append(t):(e instanceof Document?e.body:this).append(t),this.window=t,t}get openWindow(){return this.window}}function V(){customElements.get(b.TAG)||customElements.define(b.TAG,b)}const I="rr0-input-position",j={positionRelative:"relative",positionAbsolute:"absolute",positionModeHint:"Click to say it the other way: from something else, or as a latitude and a longitude",positionNoPlace:"The recording has no place yet: give the observer a latitude and a longitude first",positionFrom:"from",positionObserver:"the observer",positionEast:"East",positionNorth:"North",positionLatitude:"Latitude",positionLongitude:"Longitude",positionLabel:"Position",positionBasisHint:"Where this position comes from",positionBasisStated:"stated",positionBasisEstablished:"established",positionBasisMeasured:"measured",positionBasisDerived:"derived",positionBasisAssumed:"assumed",positionBasisFitted:"fitted",positionBasisField:"Basis"},U=`${b.CSS}
66
- rr0-input-position { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .3em .5em; }
67
- /* As the date's own switch (see DateInputElement): it reads as part of the label, before the fields. */
68
- rr0-input-position .position-mode { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-decoration: underline; text-underline-offset: .15em; }
69
- rr0-input-position .position-mode:hover:not(:disabled) { text-decoration-thickness: 2px; }
70
- rr0-input-position .position-mode:disabled { cursor: default; text-decoration: none; opacity: .75; }
71
- rr0-input-position .position-mode:focus-visible { outline: 2px solid #4af; outline-offset: 2px; border-radius: 2px; }
72
- rr0-input-position .position-axis { display: inline-flex; align-items: center; gap: .3em; white-space: nowrap; }
73
- /* East and North are two fields, each with its unit: room between the unit of one and the name of the next. */
74
- rr0-input-position :is(.position-local, .position-geo) { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .3em 1em; }
75
- rr0-input-position .position-from { display: inline-flex; align-items: center; gap: .3em; white-space: nowrap; }
76
- rr0-input-position .position-from select { width: auto; max-width: 14em; }
77
- rr0-input-position input[type="number"] { width: 7em; }
78
- rr0-input-position .position-geo input[type="number"] { width: 9.5em; }
79
- /* What it stands on (see BasisInputElement): before the switch, as a date's. */
80
- rr0-input-position .position-basis { order: -2; }
81
- rr0-input-position .position-mode { order: -1; }
82
- rr0-input-position [hidden] { display: none !important; }
83
- `;class x extends HTMLElement{modeButton;fromRow;fromSelect;localRow;geoRow;eastField;northField;latField;lngField;basisSelect;eastLabel;northLabel;latLabel;lngLabel;wording=j;shownFrame={references:[]};shownValue;shownBasis;relativeShown=!0;referenceId;build(){if(this.modeButton)return;const t=this.getAttribute("name")??"position",e=this.ownerDocument,i=e.createElement("style");i.textContent=U;const n=e.createElement("button");n.type="button",n.className="position-mode",n.addEventListener("click",()=>this.setRelative(!this.relativeShown));const s=e.createElement("span");s.className="position-from";const o=e.createElement("span");o.className="position-from-text";const a=e.createElement("select");a.id=`${t}-from`,a.addEventListener("input",()=>this.pickReference(a.value)),s.append(o,a);const d=this.getAttribute("step")??"0.1",r=(w,S,L,F)=>{const k=e.createElement("input");return k.type="number",k.id=w,k.min=String(S),k.max=String(L),k.step=F,k.autocomplete="off",k},c=(w,S)=>{const L=e.createElement("label");L.className="position-axis";const F=e.createElement("span");return L.append(F,w,S),{row:L,label:F}},l=Number(this.getAttribute("range")??3e4),h=r(this.getAttribute("east-id")??`${t}-east`,-l,l,d),u=r(this.getAttribute("north-id")??`${t}-north`,-l,l,d),p=r(this.getAttribute("lat-id")??`${t}-lat`,-90,90,"0.000001"),m=r(this.getAttribute("lng-id")??`${t}-lng`,-180,180,"0.000001"),C=e.createElement("span");C.className="position-local";const R=c(h,"m"),N=c(u,"m");C.append(R.row,N.row);const O=e.createElement("span");O.className="position-geo";const $=c(p,"°"),P=c(m,"°");O.append($.row,P.row);for(const w of[h,u])w.addEventListener("input",()=>this.typedLocal());for(const w of[p,m])w.addEventListener("input",()=>this.typedGeo());V();const y=e.createElement(b.TAG);y.id=`${t}-basis`,y.className="position-basis",y.rationaleKept=!1,y.sourceKept=!1,y.anchorKey=`${t}-basis`,y.addEventListener("basischange",w=>{w.stopPropagation();const S=w.detail.entry;this.shownBasis=S?.basis==="stated"?void 0:S?.basis,this.dispatchEvent(new CustomEvent("basischange",{detail:{basis:this.shownBasis},bubbles:!0,composed:!0}))}),this.append(i,n,s,C,O,y),this.modeButton=n,this.fromRow=s,this.fromSelect=a,this.localRow=C,this.geoRow=O,this.eastField=h,this.northField=u,this.latField=p,this.lngField=m,this.basisSelect=y,this.eastLabel=R.label,this.northLabel=N.label,this.latLabel=$.label,this.lngLabel=P.label,this.relativeShown=!this.isGeo,this.word(),this.show()}connectedCallback(){this.build()}get isGeo(){return this.getAttribute("native")==="geo"}get eastInput(){return this.build(),this.eastField}get northInput(){return this.build(),this.northField}get latInput(){return this.build(),this.latField}get lngInput(){return this.build(),this.lngField}get frame(){return this.shownFrame}set frame(t){this.shownFrame=t,this.build(),this.pullDegrees(),this.show()}get value(){return this.shownValue}set value(t){if(this.shownValue=t,this.build(),this.isGeo){const e=t;this.latField.value=e?String(f.degrees(e.lat)):"",this.lngField.value=e?String(f.degrees(e.lng)):""}this.show()}set said(t){this.build(),this.pullDegrees(),f.isRelative(t)?(this.relativeShown=!0,this.referenceId=t.relativeTo):f.isAbsolute(t)?this.relativeShown=!1:(this.relativeShown=!this.isGeo,this.referenceId=void 0),this.show()}get said(){const t=this.localValue();if(t)return f.restated(this.relativeShown?f.relative(0,0,this.referenceId):{lat:0,lng:0},t,this.shownFrame)}get relative(){return this.relativeShown}get basis(){return this.shownBasis}set basis(t){this.shownBasis=t==="stated"?void 0:t,this.build(),this.markBasis()}set basisShown(t){this.build(),this.basisSelect.hidden=!t}set messages(t){this.wording=t,this.modeButton&&(this.word(),this.show())}setRelative(t){!this.shownFrame.origin||this.references().length===0||(this.pullDegrees(),this.relativeShown=t,this.show())}pullDegrees(){if(!this.isGeo||!this.latField)return;const t=x.typed(this.latField),e=x.typed(this.lngField);this.shownValue=t!==void 0&&e!==void 0?{lat:t,lng:e}:this.latField.value===""&&this.lngField.value===""?void 0:this.shownValue}word(){const t=this.wording;this.eastLabel.textContent=t.positionEast,this.northLabel.textContent=t.positionNorth,this.latLabel.textContent=t.positionLatitude,this.lngLabel.textContent=t.positionLongitude,this.fromRow.querySelector(".position-from-text").textContent=t.positionFrom,this.basisSelect.messages={title:t.positionBasisHint,basisField:t.positionBasisField,howField:"",rationaleField:"",basis:{established:t.positionBasisEstablished,stated:t.positionBasisStated,measured:t.positionBasisMeasured,derived:t.positionBasisDerived,assumed:t.positionBasisAssumed,fitted:t.positionBasisFitted}},this.markBasis()}markBasis(){this.basisSelect&&(this.basisSelect.entry=this.shownBasis?{basis:this.shownBasis}:void 0)}references(){const t=this.shownFrame.references;return t.length>0||this.isGeo?t:[{label:this.wording.positionObserver,eastM:0,northM:0}]}reference(){const t=this.references();return t.find(e=>e.id===this.referenceId)??t[0]??{label:"",eastM:0,northM:0}}localValue(){const t=this.shownValue;if(!t)return;if(!this.isGeo)return t;const e=this.shownFrame.origin;return e?f.toLocal(t,e):void 0}geoValue(){const t=this.shownValue;if(!t)return;if(this.isGeo)return t;const e=this.shownFrame.origin;return e?f.toGeo(t,e):void 0}show(){if(!this.modeButton)return;const t=this.wording,e=this.shownFrame.origin!==void 0&&this.references().length>0;e||(this.relativeShown=!this.isGeo);const i=this.modeButton;i.textContent=this.relativeShown?t.positionRelative:t.positionAbsolute,i.disabled=!e,i.title=e?t.positionModeHint:t.positionNoPlace;const n=this.references(),s=this.fromSelect,o=n.map(h=>h.id??"");([...s.options].map(h=>h.value).join(`
84
- `)!==o.join(`
85
- `)||[...s.options].map(h=>h.text).join(`
86
- `)!==n.map(h=>h.label).join(`
87
- `))&&s.replaceChildren(...n.map(h=>new Option(h.label,h.id??""))),this.referenceId!==void 0&&!n.some(h=>h.id===this.referenceId)&&(this.referenceId=void 0),s.value=this.referenceId??o[0]??"",this.fromRow.hidden=!this.relativeShown,this.localRow.hidden=!this.relativeShown,this.geoRow.hidden=this.relativeShown;const a=this.getRootNode().activeElement,d=(h,u)=>{h!==a&&(h.value=u===void 0?"":String(u))},r=this.localValue(),c=this.reference();if(d(this.eastField,r?f.metres(r.eastM-c.eastM):void 0),d(this.northField,r?f.metres(r.northM-c.northM):void 0),this.isGeo&&!this.relativeShown)return;const l=this.geoValue();d(this.latField,l?f.degrees(l.lat):void 0),d(this.lngField,l?f.degrees(l.lng):void 0)}pickReference(t){this.pullDegrees(),this.referenceId=t===""?void 0:t,this.show();const e=this.said;e&&this.shownValue&&this.tell(this.shownValue,e)}static typed(t){const e=t.value.trim(),i=e===""?NaN:Number(e);return Number.isFinite(i)?i:void 0}typedLocal(){const t=x.typed(this.eastField),e=x.typed(this.northField);if(t===void 0||e===void 0)return;const i=this.reference(),n={eastM:i.eastM+t,northM:i.northM+e};let s=n;if(this.isGeo){const o=this.shownFrame.origin;if(!o)return;s=f.toGeo(n,o)}this.shownValue=s,this.tell(s,f.relative(t,e,this.referenceId))}typedGeo(){const t=x.typed(this.latField),e=x.typed(this.lngField);if(t===void 0||e===void 0)return;let i={lat:t,lng:e};if(!this.isGeo){const n=this.shownFrame.origin;if(!n)return;i=f.toLocal({lat:t,lng:e},n)}this.shownValue=i,this.tell(i,{lat:t,lng:e})}tell(t,e){this.show();const i=this.isGeo?f.isAbsolute(e):f.isRelative(e)&&e.relativeTo===void 0;this.dispatchEvent(new CustomEvent("positionchange",{detail:{value:t,said:i?void 0:e},bubbles:!0,composed:!0}))}}function z(){customElements.get(I)||customElements.define(I,x)}class M{constructor(t,e,i=()=>{},n){this.read=t,this.edit=e,this.context=i,this.place=n}static inPlace(t){return new M(()=>t,e=>e(t))}}class B{constructor(t,e,i="",n,s){this.container=t,this.idPrefix=i,this.values=n,this.enhance=s,this.said=new T([e,"en"])}set;target;changed=()=>{};said;setLanguage(t){this.said=new T([t,"en"]),this.set&&this.target&&this.show(this.set,this.target,this.changed)}show(t,e,i){this.set=t,this.target=e instanceof M?e:M.inPlace(e),this.changed=i,this.container.replaceChildren();const n=new Map;for(const s of t.parameters){const o=this.read(s.group)??"";let a=n.get(o);if(!a){if(a=document.createElement("fieldset"),a.className="parameter-group",o!==""){const d=document.createElement("legend");d.textContent=o,a.append(d)}else a.classList.add("parameter-group-untitled"),a.style.border="0",a.style.padding="0",a.style.marginInline="0";n.set(o,a),this.container.append(a)}a.append(this.fieldOf(s))}v.fit(this.container),this.sync()}clear(){this.set=void 0,this.target=void 0,this.container.replaceChildren()}field(t){return this.container.querySelector(`[data-key="${t}"]`)??void 0}sync(t=!1){const e=this.target?.read();if(!this.set||!e)return;const i=this.target.context(),n=t?null:this.container.getRootNode().activeElement;for(const s of this.set.parameters){const o=s.type==="position"?this.positionOf(s):this.field(s.key);if(!o)continue;const a=o.closest("label, .parameter-row")??o;a.hidden=s.visibleWhen!==void 0&&!s.visibleWhen(e,i);const d=g.read(e,s.key);if(s.type==="number"){const r=o;r!==n&&(r.value=typeof d=="number"?B.shown(d,s):"");const c=B.boundsOf(s,e,i);r.min=String(c.min),r.max=String(c.max);const l=s.effective?.(e,i);r.placeholder=l!==void 0?B.shown(l,s):this.read(s.placeholder)??"",r.classList.toggle("parameter-derived",d===void 0)}else if(s.type==="choice"){const r=o,c=s.optionsOf?.(e,i)??s.choices;if([...r.options].filter(l=>l.value!=="").map(l=>l.value).join(`
88
- `)!==c.map(l=>l.value).join(`
89
- `)&&r.replaceChildren(...s.required?[]:[new Option("—","")],...c.map(l=>new Option(this.read(l.label)??l.value,l.value))),r!==n&&(r.value=typeof d=="string"&&c.some(l=>l.value===d)?d:s.required?r.options[0]?.value??"":""),!s.required){const l=s.effective?.(e,i),h=c.find(u=>u.value===l);r.options[0].textContent=h?this.read(h.label)??h.value:this.read(s.empty)??"—"}}else if(s.type==="boolean"){const r=o;r.checked=d===!0}else if(s.type==="colour"){const r=o;r!==n&&(r.value=B.swatchOf(d,s.fallback??"#808080"))}else if(s.type==="set")this.syncSet(s,o,e,i);else if(s.type==="position")this.syncPosition(s,o,e);else if(s.type==="said"){const r=o;r!==n&&(r.value=this.values?.said().read(g.read(e,s.key))??""),this.markMissing(s,r)}else{const r=o;r!==n&&(r.value=typeof d=="string"?d:"",r.classList.remove("invalid"),r.removeAttribute("aria-invalid"))}}for(const s of this.container.querySelectorAll("fieldset.parameter-group"))s.hidden=[...s.querySelectorAll("label, .parameter-row")].filter(o=>o.parentElement===s).every(o=>o.hidden)}fieldOf(t){const e=document.createElement("label"),i=this.read(t.hint);i&&(e.title=i);const n=document.createElement("span");n.textContent=this.read(t.label)??t.key,e.append(n," ");let s;if(t.type==="choice"){const o=document.createElement("select");this.identify(o,t),t.required||o.append(new Option("—","")),o.append(...t.choices.map(a=>new Option(this.read(a.label)??a.value,a.value))),o.addEventListener("input",()=>this.write(t,o.value===""?void 0:o.value)),e.append(o),this.enhance?.(t,o)}else{if(t.type==="position")return this.setRow(t,this.positionFieldOf(t));if(t.type==="set"){const o=document.createElement("div");return this.identify(o,t),o.className="parameter-set",o.addEventListener("input",()=>{const a=[...o.querySelectorAll("input:checked")].map(d=>d.value);this.write(t,a.length>0?a:void 0)}),this.setRow(t,o)}else if(t.type==="boolean"){const o=document.createElement("input");o.type="checkbox",this.identify(o,t),o.addEventListener("input",()=>this.write(t,o.checked?!0:t.required?!1:void 0)),e.prepend(o),e.append(" ")}else{const o=document.createElement("input");this.identify(o,t),o.autocomplete="off",t.type==="number"?(o.type="number",o.min=String(t.min),o.max=String(t.max),o.step=String(t.step),s=t.unit,o.addEventListener("input",()=>{const a=o.value.trim();if(a==="")return t.required?void 0:this.write(t,void 0);const d=Number(a);Number.isFinite(d)&&this.write(t,d)})):t.type==="colour"?(o.type="color",o.addEventListener("input",()=>this.write(t,o.value))):t.type==="said"?(o.type="text",o.placeholder=this.read(t.placeholder)??"",o.addEventListener("input",()=>{const a=this.target?.read(),d=this.values;!a||!d||(this.write(t,d.said().write(g.read(a,t.key),o.value,d.writingLanguage())),this.markMissing(t,o))})):(o.type="text",o.placeholder=this.read(t.placeholder)??"",o.addEventListener("input",()=>{const a=t.required||t.validate?o.value.trim():o.value,d=this.target?.read(),r=d!==void 0&&(t.required===!0&&a===""||a!==""&&t.validate?.(a,d,this.target.context())===!1);o.classList.toggle("invalid",r),r?o.setAttribute("aria-invalid","true"):o.removeAttribute("aria-invalid"),!r&&this.write(t,a===""?void 0:a)}),o.addEventListener("change",()=>{if(!o.classList.contains("invalid"))return;o.classList.remove("invalid"),o.removeAttribute("aria-invalid");const a=this.target?.read(),d=a===void 0?void 0:g.read(a,t.key);o.value=typeof d=="string"?d:""})),e.append(o)}}return s&&e.append(` ${s}`),e}markMissing(t,e){t.type!=="said"||!t.required||(e.classList.toggle("invalid",e.value===""),e.setAttribute("aria-invalid",String(e.value==="")))}positionFieldOf(t){z();const e=document.createElement("rr0-input-position"),i=`${this.idPrefix}${t.key}`;e.setAttribute("name",i),t.native==="geo"&&e.setAttribute("native","geo"),t.step!==void 0&&e.setAttribute("step",String(t.step)),t.rangeM!==void 0&&e.setAttribute("range",String(t.rangeM));const n=t.native==="geo"?["lat-id","lng-id"]:["east-id","north-id"];this.idPrefix!==""&&(e.setAttribute(n[0],`${this.idPrefix}${t.key}`),e.setAttribute(n[1],`${this.idPrefix}${t.secondKey}`)),e.dataset.position=t.key,e.build();const[s,o]=t.native==="geo"?[e.latInput,e.lngInput]:[e.eastInput,e.northInput];s.dataset.key=t.key,o.dataset.key=t.secondKey;const a=this.target?.place;return a&&(e.messages=a.messages()),e.basisShown=a?.basis!==void 0,e.addEventListener("positionchange",d=>{const{value:r,said:c}=d.detail;this.writePosition(t,r,c)}),e.addEventListener("basischange",d=>this.target?.place?.basis?.write(t,d.detail.basis)),e}positionOf(t){return this.container.querySelector(`rr0-input-position[data-position="${t.key}"]`)??void 0}syncPosition(t,e,i){const n=this.target?.place;n&&(e.messages=n.messages(),e.frame=n.frame());const s=g.read(i,t.key),o=g.read(i,t.secondKey),a=typeof s=="number"&&typeof o=="number";e.value=a?t.native==="geo"?{lat:s,lng:o}:{eastM:s,northM:o}:void 0;const d=g.read(i,t.saidKey),r=JSON.stringify(d??null);e.dataset.said!==r&&(e.dataset.said=r,e.said=d),e.basis=n?.basis?.read(t)}writePosition(t,e,i){const n=this.target;if(!n)return;const[s,o]="lat"in e?[e.lat,e.lng]:[e.eastM,e.northM],a=t.native==="geo"?d=>Math.round(d*1e7)/1e7:d=>Math.round(d*1e3)/1e3;this.positionOf(t)?.setAttribute("data-said",JSON.stringify(i??null)),n.edit(d=>{g.write(d,t.key,a(s)),g.write(d,t.secondKey,a(o)),g.write(d,t.saidKey,i)},t),this.changed(),this.sync()}setRow(t,e){const i=document.createElement("div");i.className="parameter-row";const n=this.read(t.hint);n&&(i.title=n);const s=document.createElement("span");return s.textContent=this.read(t.label)??t.key,i.append(s," ",e),i}syncSet(t,e,i,n){if(t.type!=="set")return;const s=g.read(i,t.key),o=new Set(Array.isArray(s)?s:[]),a=t.options(i,n);if(a.length===0){e.textContent=this.read(t.empty)??"";return}[...e.querySelectorAll("input")].map(r=>r.value).join(`
90
- `)===a.map(r=>r.value).join(`
91
- `)||e.replaceChildren(...a.map(r=>{const c=document.createElement("label"),l=document.createElement("input");return l.type="checkbox",l.value=r.value,c.append(l," ",r.label),c}));for(const r of e.querySelectorAll("input"))r.checked=o.has(r.value)}identify(t,e){t.dataset.key=e.key,this.idPrefix!==""&&(t.id=`${this.idPrefix}${e.key}`)}write(t,e){const i=this.target;if(!i)return;let n=e;if(t.type==="number"&&typeof e=="number"){const s=i.read();if(s){const o=B.boundsOf(t,s,i.context());n=Math.max(o.min,Math.min(o.max,e))/(t.scale??1)}}i.edit(s=>g.write(s,t.key,n),t),this.changed(),this.sync()}read(t){return this.said.read(t)}static boundsOf(t,e,i){const n=t.bounds?.(e,i);return{min:n?.min??t.min,max:n?.max??t.max}}static swatchOf(t,e){if(typeof t!="string")return e;const i=/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i.exec(t);return i?`#${i[1]}${i[1]}${i[2]}${i[2]}${i[3]}${i[3]}`.toLowerCase():/^#[0-9a-f]{6}$/i.test(t)?t.toLowerCase():e}static shown(t,e){const i=Math.max(2,Math.min(6,(String(e.step).split(".")[1]??"").length));return String(Number((t*(e.scale??1)).toFixed(i)))}static choicesOf(t){return t.choices.map(e=>e.value)}}export{A as E,B as P,W as S,M as a};
@@ -1,41 +0,0 @@
1
- import{G as F,w as P,C as H,n as w,u as K,x as N,o as U,y as k}from"./rr0-sighting.mjs";class b{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]?b.targets(a,s,e):[]),c=t.map((a,i)=>n[i]?b.samples(a,o[i]):[]),r=new Map;t.forEach((a,i)=>{if(n[i])for(const h of b.ends(a)){const u=b.key(h),p=r.get(u);p?p.push(i):r.set(u,[i])}});const M=a=>{const i=r.get(b.key(a));if(i)return b.median(i.flatMap(h=>c[h]),a)};return t.map((a,i)=>{if(n[i]){const h=[...new Set([i,...b.ends(a).flatMap(d=>r.get(b.key(d))??[])])].flatMap(d=>c[d]),u=a.centre.map((d,O)=>b.median(h,d)??o[i][O]),[p,A]=b.ends(a);return u[0]=M(p)??u[0],u[u.length-1]=M(A)??u[u.length-1],b.graded(u,a.along,a.highSpeed?b.MAX_GRADE.highSpeed:b.MAX_GRADE[a.kind])}return b.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>b.HOLLOW_M||o-c>b.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]+b.SAMPLE_M)}),e}static median(t,s){const e=[];for(const o of t)Math.hypot(o.x-s.x,o.z-s.z)<=b.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]=b.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=>({...w(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=b.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 D=E>0?_:f;E>0?n.ballast.strip(z,D):n.ballast.strip(D,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)),D=u.map(L=>h(L,-E,x));n.deck.strip(m,z),n.deck.strip(v,D),n.deck.strip(D,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,D=s.along.length-2;for(;m<D;){const T=m+D+1>>1;s.along[T]<=E?m=T:D=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),D=f(E,m,0);t.level===0&&(D.y=Math.min(D.y,c(D.x,D.z)));const L=f(E,m,d);if(r.steel.beam(D,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 D=x[m],L=x[m+1];if(L-D<.1||(r.wire.beam(f(D,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(D+(L-D)*I,z,S(I)),f(D+(L-D)*G,z,S(G)),l.MESSENGER_DIAMETER_M,!1)}}}}static meshOf(t,s){if(t.indices.length===0)return;const e=new K;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
- varying vec3 vBallast;`).replace("#include <begin_vertex>",`#include <begin_vertex>
3
- vBallast = position;`),s.fragmentShader=s.fragmentShader.replace("#include <common>",`#include <common>
4
- varying vec3 vBallast;
5
- float ballastHash(vec2 p) {
6
- p = fract(p * vec2(127.1, 311.7));
7
- p += dot(p, p + 34.5);
8
- return fract(p.x * p.y);
9
- }
10
- float ballastNoise(vec2 p) {
11
- vec2 i = floor(p);
12
- vec2 f = fract(p);
13
- f = f * f * (3.0 - 2.0 * f);
14
- return mix(mix(ballastHash(i), ballastHash(i + vec2(1.0, 0.0)), f.x), mix(ballastHash(i + vec2(0.0, 1.0)), ballastHash(i + vec2(1.0, 1.0)), f.x), f.y);
15
- }`).replace("#include <map_fragment>",`#include <map_fragment>
16
- {
17
- float eye = length(vViewPosition);
18
- vec2 at = vBallast.xz + vec2(0.0, vBallast.y);
19
- float stones = (ballastHash(floor(at * 22.0)) - 0.5) * 0.9 * (1.0 - smoothstep(4.0, 18.0, eye))
20
- + (ballastNoise(at * 6.0) - 0.5) * 0.5 * (1.0 - smoothstep(15.0, 60.0, eye))
21
- + (ballastNoise(at * 0.7) - 0.5) * 0.35 * (1.0 - smoothstep(80.0, 300.0, eye));
22
- diffuseColor.rgb *= 1.0 + stones;
23
- }`)},t.customProgramCacheKey=()=>"rr0-railway-ballast",t}static sleeperMaterial(t){const s=new k({color:new H(1,1,1),polygonOffset:!0,polygonOffsetFactor:-3,polygonOffsetUnits:-3}),e=new H(...t),n=new H(...l.BALLAST_ALBEDO);return s.onBeforeCompile=o=>{o.uniforms.uSleeper={value:e},o.uniforms.uCrib={value:n},o.uniforms.uSpacing={value:l.SLEEPER_SPACING_M},o.uniforms.uDuty={value:l.SLEEPER_WIDTH_M/l.SLEEPER_SPACING_M},o.vertexShader=o.vertexShader.replace("#include <common>",`#include <common>
24
- attribute float aAlong;
25
- varying float vAlong;`).replace("#include <begin_vertex>",`#include <begin_vertex>
26
- vAlong = aAlong;`),o.fragmentShader=o.fragmentShader.replace("#include <common>",`#include <common>
27
- varying float vAlong;
28
- uniform vec3 uSleeper;
29
- uniform vec3 uCrib;
30
- uniform float uSpacing;
31
- uniform float uDuty;
32
- // How much of [0, x] periods is sleeper: the integral of a pulse of width uDuty at the start of each period.
33
- float sleeperIntegral(float x) {
34
- return floor(x) * uDuty + min(fract(x), uDuty);
35
- }`).replace("#include <map_fragment>",`#include <map_fragment>
36
- {
37
- float u = vAlong / uSpacing;
38
- float w = max(fwidth(u), 1e-4);
39
- float cover = (sleeperIntegral(u + 0.5 * w) - sleeperIntegral(u - 0.5 * w)) / w;
40
- diffuseColor.rgb *= mix(uCrib, uSleeper, clamp(cover, 0.0, 1.0));
41
- }`)},s.customProgramCacheKey=()=>"rr0-railway-sleepers",s}}export{l as RailwaySystem};
@@ -1 +0,0 @@
1
- import{G,bq as S,a6 as _,u as M,br as R,x as w,o as F,bk as f,bl as I,Q as N,C as y,bs as H,bt as C,bu as k,R as L}from"./rr0-sighting.mjs";class h{static RADIUS=840;static MAX_SEGMENTS=1024;static VERTICES_PER_SEGMENT=12;static MIN_HALF_WIDTH_DEG=.1;static BRIGHT_HALF_WIDTH_DEG=.22;static TRAIN_SHARE=.9;static TRAIN_FALLOFF=1.2;object=new G;tiers;trains;positions;colors;shown=0;drawn=[];constructor(){this.object.name="reentries",this.tiers=S.map(i=>{const o=new _(new M,R.material(i.size,!1));return R.track(o),o.frustumCulled=!1,this.object.add(o),o});const s=h.MAX_SEGMENTS*h.VERTICES_PER_SEGMENT;this.positions=new Float32Array(s*3),this.colors=new Float32Array(s*3);const t=new M;t.setAttribute("position",new w(this.positions,3)),t.setAttribute("color",new w(this.colors,3)),t.setDrawRange(0,0),this.trains=new F(t,f.material()),this.trains.frustumCulled=!1,f.track(this.trains),this.object.add(this.trains)}nearest(s,t){let i,o=t;for(const e of this.drawn){const n=e.direction.dot(s);(n>o||i&&n===o&&e.magnitude<i.magnitude)&&(o=n,i=e)}return i}static directionOf(s){const{x:t,y:i,z:o}=I(s.altitudeDeg,s.azimuthDeg,1);return new N(t,i,o)}get count(){return this.shown}set(s,t,i,o){const e=this.tiers.map(()=>[]);let n=0,E=0;const r=new y;this.drawn=[];for(const a of s){const u=i(a.head);if(u<=0)continue;const c=a.magnitude-2.5*Math.log10(u);if(c>t)continue;E++,this.drawn.push({direction:h.directionOf(a.head),view:a,magnitude:c}),r.set(a.color);const d=H(c,t)*a.fade,{x:b,y:A,z:p}=I(a.head.altitudeDeg,a.head.azimuthDeg,h.RADIUS),[l,m,T]=o(a.head,c),z=a.fade,D=Math.max(r.r,r.g,r.b)||1;e[C(d)].push({x:b,y:A,z:p,r:l*r.r*z/D,g:m*r.g*z/D,b:T*r.b*z/D}),n=this.pushTrain(n,a.train,d,r)}this.shown=E,this.tiers.forEach((a,u)=>{const c=e[u],d=new Float32Array(c.length*3),b=new Float32Array(c.length*3);c.forEach((p,l)=>{d.set([p.x,p.y,p.z],l*3),b.set([p.r,p.g,p.b],l*3)}),a.geometry.dispose();const A=new M;A.setAttribute("position",new w(d,3)),A.setAttribute("color",new w(b,3)),a.geometry=A});const g=this.trains.geometry;g.setDrawRange(0,n),g.getAttribute("position").needsUpdate=!0,g.getAttribute("color").needsUpdate=!0}pushTrain(s,t,i,o){const e=t.length-1;for(let n=0;n<e;n++){if(s+h.VERTICES_PER_SEGMENT>h.MAX_SEGMENTS*h.VERTICES_PER_SEGMENT)return s;const E=1-n/e,r=1-(n+1)/e,g=I(t[n].altitudeDeg,t[n].azimuthDeg,h.RADIUS),a=I(t[n+1].altitudeDeg,t[n+1].azimuthDeg,h.RADIUS),u=d=>h.RADIUS*((h.MIN_HALF_WIDTH_DEG+h.BRIGHT_HALF_WIDTH_DEG*i*d)*Math.PI/180),c=d=>h.TRAIN_SHARE*i*d**h.TRAIN_FALLOFF;s=this.pushRibbon(s,g,a,u(E),u(r),c(E),c(r),o)}return s}pushRibbon(s,t,i,o,e,n,E,r){const g={x:i.x-t.x,y:i.y-t.y,z:i.z-t.z};if(Math.hypot(g.x,g.y,g.z)<1e-9)return s;const a=this.normalise(this.cross(this.normalise(t),this.normalise(g)));for(const[u,c]of[[-1,0],[0,1]]){const d=this.across(t,a,o,u),b=this.across(i,a,e,u),A=this.across(t,a,o,c),p=this.across(i,a,e,c),l=(m,T)=>m===0?T:0;s=this.push(s,d,l(u,n),r),s=this.push(s,b,l(u,E),r),s=this.push(s,A,l(c,n),r),s=this.push(s,b,l(u,E),r),s=this.push(s,p,l(c,E),r),s=this.push(s,A,l(c,n),r)}return s}across(s,t,i,o){return{x:s.x+t.x*i*o,y:s.y+t.y*i*o,z:s.z+t.z*i*o}}push(s,t,i,o){const e=s*3;this.positions[e]=t.x,this.positions[e+1]=t.y,this.positions[e+2]=t.z;const n=k.relativeOfResponse(Math.max(0,Math.min(1,i)));return this.colors[e]=n*o.r,this.colors[e+1]=n*o.g,this.colors[e+2]=n*o.b,s+1}cross(s,t){return{x:s.y*t.z-s.z*t.y,y:s.z*t.x-s.x*t.z,z:s.x*t.y-s.y*t.x}}normalise(s){const t=Math.hypot(s.x,s.y,s.z)||1;return{x:s.x/t,y:s.y/t,z:s.z/t}}dispose(){for(const s of this.tiers)s.geometry.dispose(),s.material.dispose();this.trains.geometry.dispose(),this.trains.material.dispose(),this.object.removeFromParent()}}class x{inSky=!0;hiddenFromEye=!0;pieces=new h;get object(){return this.pieces.object}get drawnCount(){return this.pieces.count}update(s,t,i){const o=s.length===0?[]:L.viewsAt(s,t,i.observer);o.length===0&&this.pieces.count===0||(this.pieces.set(o,i.magnitudeLimit,e=>i.cloudTransmission(e),(e,n)=>i.arrivingIlluminance(e,n,1)),i.lightFrom(o.map(e=>({position:e.head,magnitude:e.magnitude}))),i.glareFrom(o.map(e=>({key:`${e.reentryId}:${e.fragmentId}`,position:e.head,magnitude:e.magnitude,fade:e.fade}))))}pick(s,t,i){const o=this.pieces.nearest(t,i.nearestCos);return o&&{id:o.view.reentryId,detail:o}}dispose(){this.pieces.dispose()}}export{x as ReentrySimulation};
@@ -1 +0,0 @@
1
- import{e}from"./rr0-sighting.mjs";const s={play:"Play",clickToPlay:"Click to play",pause:"Pause",noDuration:"No observation duration",currentPosition:"Current position",duration:"Duration",switchToElapsed:"click to show elapsed time",switchToClockTime:"click to show the time of day",fullscreen:"Fullscreen",exitFullscreen:"Exit fullscreen",mute:"Mute",volume:"Volume",unmute:"Unmute",noSound:"No sound recorded",moments:"Moments",moreControls:"More controls",fewerControls:"Fewer controls",showObserverMap:"Show where the witness was",hideObserverMap:"Hide where the witness was",mapImageryUnavailable:"Aerial imagery unavailable",zoomMapIn:"Zoom in",zoomMapOut:"Zoom out",fitMap:"Back to the whole path",placeObserverHere:"Put the witness here",showReferences:"Show the pictures of the place",hideReferences:"Hide the pictures of the place",showTraces:"Show the investigator's lines",hideTraces:"Hide the investigator's lines",referenceOpacity:"Picture opacity",referencesMenu:"Pictures of the place",showMilestones:"Show the account's moments",hideMilestones:"Hide the account's moments",observerHere:"The witness, here",decorHere:"Scenery",recordingIssues:"{count} problem(s) in this recording: it may not play as its author meant",issueTemplates:e.EN};export{s as ufoMessages_en};
@@ -1 +0,0 @@
1
- const e={play:"Reproducir",clickToPlay:"Haz clic para reproducir",pause:"Pausa",noDuration:"Sin duración de observación",currentPosition:"Posición actual",duration:"Duración",switchToElapsed:"haz clic para mostrar el tiempo transcurrido",switchToClockTime:"haz clic para mostrar la hora del día",fullscreen:"Pantalla completa",exitFullscreen:"Salir de pantalla completa",mute:"Silenciar",volume:"Volumen",unmute:"Activar el sonido",noSound:"Sin sonido registrado",moments:"Momentos",moreControls:"Más controles",fewerControls:"Menos controles",showObserverMap:"Ver dónde estaba el testigo",hideObserverMap:"Ocultar dónde estaba el testigo",mapImageryUnavailable:"Vista aérea no disponible",zoomMapIn:"Acercar",zoomMapOut:"Alejar",fitMap:"Volver al trayecto completo",placeObserverHere:"Poner al testigo aquí",showReferences:"Ver las fotos del lugar",hideReferences:"Ocultar las fotos del lugar",showTraces:"Ver los trazos del investigador",hideTraces:"Ocultar los trazos del investigador",referenceOpacity:"Opacidad de las fotos",referencesMenu:"Fotos del lugar",showMilestones:"Ver los momentos del relato",hideMilestones:"Ocultar los momentos del relato",observerHere:"El testigo, aquí",decorHere:"Elemento del decorado",recordingIssues:"{count} problema(s) en esta grabación: puede que no se reproduzca como su autor quería",issueTemplates:{"unknown-key":"{path}: clave desconocida, ignorada","wrong-type":"{path}: se esperaba {expected}, se encontró {found}","not-in-list":"{path}: {found} no es uno de {expected}","out-of-range":"{path}: {found} está fuera de {expected}",defaulted:"{path}: ausente, se usa {expected}",unplaced:"{path}: sin aim (ni bounds), dibujado en el centro de la vista",unsized:"{path}: sin tamaño angular (ni bounds), dibujado de un píxel de ancho","pixels-over-angles":"{path}: bounds repetido sin aim ni angular, así que la forma sigue los píxeles"}};export{e as ufoMessages_es};
@@ -1 +0,0 @@
1
- const e={play:"Lecture",clickToPlay:"Cliquer pour lire",pause:"Pause",noDuration:"Aucune durée d'observation",currentPosition:"Position actuelle",duration:"Durée",switchToElapsed:"cliquer pour afficher la durée écoulée",switchToClockTime:"cliquer pour afficher l'heure de l'observation",fullscreen:"Plein écran",exitFullscreen:"Quitter le plein écran",mute:"Couper le son",volume:"Volume",unmute:"Rétablir le son",noSound:"Pas de son enregistré",moments:"Moments",moreControls:"Plus de commandes",fewerControls:"Moins de commandes",showObserverMap:"Voir où était le témoin",hideObserverMap:"Masquer où était le témoin",mapImageryUnavailable:"Vue aérienne indisponible",zoomMapIn:"Zoomer",zoomMapOut:"Dézoomer",fitMap:"Revenir au trajet entier",placeObserverHere:"Placer le témoin ici",showReferences:"Voir les photos des lieux",hideReferences:"Masquer les photos des lieux",showTraces:"Voir les tracés d'enquêteur",hideTraces:"Masquer les tracés d'enquêteur",referenceOpacity:"Opacité des photos",referencesMenu:"Photos des lieux",showMilestones:"Voir les moments du récit",hideMilestones:"Masquer les moments du récit",observerHere:"Le témoin, ici",decorHere:"Élément de décor",recordingIssues:"{count} problème(s) dans cet enregistrement : il peut ne pas jouer ce que son auteur voulait",issueTemplates:{"unknown-key":"{path} : clé inconnue, ignorée","wrong-type":"{path} : {expected} attendu, {found} trouvé","not-in-list":"{path} : {found} ne fait pas partie de {expected}","out-of-range":"{path} : {found} sort de {expected}",defaulted:"{path} : absent, {expected} utilisé",unplaced:"{path} : ni aim ni bounds, dessiné au milieu de la vue",unsized:"{path} : ni taille angulaire ni bounds, dessiné large d'un pixel","pixels-over-angles":"{path} : bounds redonné sans aim ni angular, la forme suit les pixels"}};export{e as ufoMessages_fr};
@@ -1 +0,0 @@
1
- const e={play:"Riproduci",clickToPlay:"Clicca per riprodurre",pause:"Pausa",noDuration:"Nessuna durata di osservazione",currentPosition:"Posizione attuale",duration:"Durata",switchToElapsed:"fai clic per mostrare il tempo trascorso",switchToClockTime:"fai clic per mostrare l'ora del giorno",fullscreen:"Schermo intero",exitFullscreen:"Esci dallo schermo intero",mute:"Disattiva audio",volume:"Volume",unmute:"Attiva audio",noSound:"Nessun suono registrato",moments:"Momenti",moreControls:"Altri controlli",fewerControls:"Meno controlli",showObserverMap:"Mostra dove si trovava il testimone",hideObserverMap:"Nascondi dove si trovava il testimone",mapImageryUnavailable:"Vista aerea non disponibile",zoomMapIn:"Ingrandisci",zoomMapOut:"Riduci",fitMap:"Torna all'intero percorso",placeObserverHere:"Metti qui il testimone",showReferences:"Mostra le foto del luogo",hideReferences:"Nascondi le foto del luogo",showTraces:"Mostra i tracciati dell'investigatore",hideTraces:"Nascondi i tracciati dell'investigatore",referenceOpacity:"Opacità delle foto",referencesMenu:"Foto del luogo",showMilestones:"Mostra i momenti del resoconto",hideMilestones:"Nascondi i momenti del resoconto",observerHere:"Il testimone, qui",decorHere:"Elemento della scenografia",recordingIssues:"{count} problema/i in questa registrazione: potrebbe non essere riprodotta come voleva il suo autore",issueTemplates:{"unknown-key":"{path}: chiave sconosciuta, ignorata","wrong-type":"{path}: atteso {expected}, trovato {found}","not-in-list":"{path}: {found} non è tra {expected}","out-of-range":"{path}: {found} è fuori da {expected}",defaulted:"{path}: assente, usato {expected}",unplaced:"{path}: nessun aim (né bounds), disegnato al centro della vista",unsized:"{path}: nessuna dimensione angolare (né bounds), disegnato largo un pixel","pixels-over-angles":"{path}: bounds ripetuto senza aim né angular, quindi la forma segue i pixel"}};export{e as ufoMessages_it};
@@ -1 +0,0 @@
1
- var z=Uint8Array,Q=Uint16Array,Tr=Int32Array,gr=new z([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),wr=new z([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Mr=new z([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Hr=function(r,e){for(var n=new Q(31),a=0;a<31;++a)n[a]=e+=1<<r[a-1];for(var v=new Tr(n[30]),a=1;a<30;++a)for(var f=n[a];f<n[a+1];++f)v[f]=f-n[a]<<5|a;return{b:n,r:v}},Or=Hr(gr,2),Vr=Or.b,Sr=Or.r;Vr[28]=258,Sr[258]=28;var Yr=Hr(wr,0),Pr=Yr.b,Br=Yr.r,Ar=new Q(32768);for(var C=0;C<32768;++C){var b=(C&43690)>>1|(C&21845)<<1;b=(b&52428)>>2|(b&13107)<<2,b=(b&61680)>>4|(b&3855)<<4,Ar[C]=((b&65280)>>8|(b&255)<<8)>>1}var j=(function(r,e,n){for(var a=r.length,v=0,f=new Q(e);v<a;++v)r[v]&&++f[r[v]-1];var o=new Q(e);for(v=1;v<e;++v)o[v]=o[v-1]+f[v-1]<<1;var t;if(n){t=new Q(1<<e);var g=15-e;for(v=0;v<a;++v)if(r[v])for(var u=v<<4|r[v],l=e-r[v],i=o[r[v]-1]++<<l,h=i|(1<<l)-1;i<=h;++i)t[Ar[i]>>g]=u}else for(t=new Q(a),v=0;v<a;++v)r[v]&&(t[v]=Ar[o[r[v]-1]++]>>15-r[v]);return t}),d=new z(288);for(var C=0;C<144;++C)d[C]=8;for(var C=144;C<256;++C)d[C]=9;for(var C=256;C<280;++C)d[C]=7;for(var C=280;C<288;++C)d[C]=8;var or=new z(32);for(var C=0;C<32;++C)or[C]=5;var Qr=j(d,9,0),Rr=j(d,9,1),Wr=j(or,5,0),Xr=j(or,5,1),sr=function(r){for(var e=r[0],n=1;n<r.length;++n)r[n]>e&&(e=r[n]);return e},X=function(r,e,n){var a=e/8|0;return(r[a]|r[a+1]<<8)>>(e&7)&n},xr=function(r,e){var n=e/8|0;return(r[n]|r[n+1]<<8|r[n+2]<<16)>>(e&7)},mr=function(r){return(r+7)/8|0},tr=function(r,e,n){return(e==null||e<0)&&(e=0),(n==null||n>r.length)&&(n=r.length),new z(r.subarray(e,n))},Zr=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Y=function(r,e,n){var a=new Error(e||Zr[r]);if(a.code=r,Error.captureStackTrace&&Error.captureStackTrace(a,Y),!n)throw a;return a},$r=function(r,e,n,a){var v=r.length,f=a?a.length:0;if(!v||e.f&&!e.l)return n||new z(0);var o=!n,t=o||e.i!=2,g=e.i;o&&(n=new z(v*3));var u=function(vr){var fr=n.length;if(vr>fr){var nr=new z(Math.max(fr*2,vr));nr.set(n),n=nr}},l=e.f||0,i=e.p||0,h=e.b||0,c=e.l,y=e.d,x=e.m,M=e.n,m=v*8;do{if(!c){l=X(r,i,1);var O=X(r,i+1,3);if(i+=3,O)if(O==1)c=Rr,y=Xr,x=9,M=5;else if(O==2){var U=X(r,i,31)+257,T=X(r,i+10,15)+4,s=U+X(r,i+5,31)+1;i+=14;for(var w=new z(s),D=new z(19),B=0;B<T;++B)D[Mr[B]]=X(r,i+B*3,7);i+=T*3;for(var V=sr(D),p=(1<<V)-1,K=j(D,V,1),B=0;B<s;){var G=K[X(r,i,p)];i+=G&15;var F=G>>4;if(F<16)w[B++]=F;else{var I=0,S=0;for(F==16?(S=3+X(r,i,3),i+=2,I=w[B-1]):F==17?(S=3+X(r,i,7),i+=3):F==18&&(S=11+X(r,i,127),i+=7);S--;)w[B++]=I}}var J=w.subarray(0,U),q=w.subarray(U);x=sr(J),M=sr(q),c=j(J,x,1),y=j(q,M,1)}else Y(1);else{var F=mr(i)+4,k=r[F-4]|r[F-3]<<8,E=F+k;if(E>v){g&&Y(0);break}t&&u(h+k),n.set(r.subarray(F,E),h),e.b=h+=k,e.p=i=E*8,e.f=l;continue}if(i>m){g&&Y(0);break}}t&&u(h+131072);for(var ar=(1<<x)-1,R=(1<<M)-1,L=i;;L=i){var I=c[xr(r,i)&ar],N=I>>4;if(i+=I&15,i>m){g&&Y(0);break}if(I||Y(2),N<256)n[h++]=N;else if(N==256){L=i,c=null;break}else{var P=N-254;if(N>264){var B=N-257,A=gr[B];P=X(r,i,(1<<A)-1)+Vr[B],i+=A}var Z=y[xr(r,i)&R],rr=Z>>4;Z||Y(3),i+=Z&15;var q=Pr[rr];if(rr>3){var A=wr[rr];q+=xr(r,i)&(1<<A)-1,i+=A}if(i>m){g&&Y(0);break}t&&u(h+131072);var er=h+P;if(h<q){var ur=f-q,hr=Math.min(q,er);for(ur+h<0&&Y(3);h<hr;++h)n[h]=a[ur+h]}for(;h<er;++h)n[h]=n[h-q]}}e.l=c,e.p=L,e.b=h,e.f=l,c&&(l=1,e.m=x,e.d=y,e.n=M)}while(!l);return h!=n.length&&o?tr(n,0,h):n.subarray(0,h)},_=function(r,e,n){n<<=e&7;var a=e/8|0;r[a]|=n,r[a+1]|=n>>8},ir=function(r,e,n){n<<=e&7;var a=e/8|0;r[a]|=n,r[a+1]|=n>>8,r[a+2]|=n>>16},yr=function(r,e){for(var n=[],a=0;a<r.length;++a)r[a]&&n.push({s:a,f:r[a]});var v=n.length,f=n.slice();if(!v)return{t:Jr,l:0};if(v==1){var o=new z(n[0].s+1);return o[n[0].s]=1,{t:o,l:1}}n.sort(function(E,U){return E.f-U.f}),n.push({s:-1,f:25001});var t=n[0],g=n[1],u=0,l=1,i=2;for(n[0]={s:-1,f:t.f+g.f,l:t,r:g};l!=v-1;)t=n[n[u].f<n[i].f?u++:i++],g=n[u!=l&&n[u].f<n[i].f?u++:i++],n[l++]={s:-1,f:t.f+g.f,l:t,r:g};for(var h=f[0].s,a=1;a<v;++a)f[a].s>h&&(h=f[a].s);var c=new Q(h+1),y=zr(n[l-1],c,0);if(y>e){var a=0,x=0,M=y-e,m=1<<M;for(f.sort(function(U,T){return c[T.s]-c[U.s]||U.f-T.f});a<v;++a){var O=f[a].s;if(c[O]>e)x+=m-(1<<y-c[O]),c[O]=e;else break}for(x>>=M;x>0;){var F=f[a].s;c[F]<e?x-=1<<e-c[F]++-1:++a}for(;a>=0&&x;--a){var k=f[a].s;c[k]==e&&(--c[k],++x)}y=e}return{t:new z(c),l:y}},zr=function(r,e,n){return r.s==-1?Math.max(zr(r.l,e,n+1),zr(r.r,e,n+1)):e[r.s]=n},Er=function(r){for(var e=r.length;e&&!r[--e];);for(var n=new Q(++e),a=0,v=r[0],f=1,o=function(g){n[a++]=g},t=1;t<=e;++t)if(r[t]==v&&t!=e)++f;else{if(!v&&f>2){for(;f>138;f-=138)o(32754);f>2&&(o(f>10?f-11<<5|28690:f-3<<5|12305),f=0)}else if(f>3){for(o(v),--f;f>6;f-=6)o(8304);f>2&&(o(f-3<<5|8208),f=0)}for(;f--;)o(v);f=1,v=r[t]}return{c:n.subarray(0,a),n:e}},lr=function(r,e){for(var n=0,a=0;a<e.length;++a)n+=r[a]*e[a];return n},Gr=function(r,e,n){var a=n.length,v=mr(e+2);r[v]=a&255,r[v+1]=a>>8,r[v+2]=r[v]^255,r[v+3]=r[v+1]^255;for(var f=0;f<a;++f)r[v+f+4]=n[f];return(v+4+a)*8},Ur=function(r,e,n,a,v,f,o,t,g,u,l){_(e,l++,n),++v[256];for(var i=yr(v,15),h=i.t,c=i.l,y=yr(f,15),x=y.t,M=y.l,m=Er(h),O=m.c,F=m.n,k=Er(x),E=k.c,U=k.n,T=new Q(19),s=0;s<O.length;++s)++T[O[s]&31];for(var s=0;s<E.length;++s)++T[E[s]&31];for(var w=yr(T,7),D=w.t,B=w.l,V=19;V>4&&!D[Mr[V-1]];--V);var p=u+5<<3,K=lr(v,d)+lr(f,or)+o,G=lr(v,h)+lr(f,x)+o+14+3*V+lr(T,D)+2*T[16]+3*T[17]+7*T[18];if(g>=0&&p<=K&&p<=G)return Gr(e,l,r.subarray(g,g+u));var I,S,J,q;if(_(e,l,1+(G<K)),l+=2,G<K){I=j(h,c,0),S=h,J=j(x,M,0),q=x;var ar=j(D,B,0);_(e,l,F-257),_(e,l+5,U-1),_(e,l+10,V-4),l+=14;for(var s=0;s<V;++s)_(e,l+3*s,D[Mr[s]]);l+=3*V;for(var R=[O,E],L=0;L<2;++L)for(var N=R[L],s=0;s<N.length;++s){var P=N[s]&31;_(e,l,ar[P]),l+=D[P],P>15&&(_(e,l,N[s]>>5&127),l+=N[s]>>12)}}else I=Qr,S=d,J=Wr,q=or;for(var s=0;s<t;++s){var A=a[s];if(A>255){var P=A>>18&31;ir(e,l,I[P+257]),l+=S[P+257],P>7&&(_(e,l,A>>23&31),l+=gr[P]);var Z=A&31;ir(e,l,J[Z]),l+=q[Z],Z>3&&(ir(e,l,A>>5&8191),l+=wr[Z])}else ir(e,l,I[A]),l+=S[A]}return ir(e,l,I[256]),l+S[256]},jr=new Tr([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Jr=new z(0),Lr=function(r,e,n,a,v,f){var o=f.z||r.length,t=new z(a+o+5*(1+Math.ceil(o/7e3))+v),g=t.subarray(a,t.length-v),u=f.l,l=(f.r||0)&7;if(e){l&&(g[0]=f.r>>3);for(var i=jr[e-1],h=i>>13,c=i&8191,y=(1<<n)-1,x=f.p||new Q(32768),M=f.h||new Q(y+1),m=Math.ceil(n/3),O=2*m,F=function(cr){return(r[cr]^r[cr+1]<<m^r[cr+2]<<O)&y},k=new Tr(25e3),E=new Q(288),U=new Q(32),T=0,s=0,w=f.i||0,D=0,B=f.w||0,V=0;w+2<o;++w){var p=F(w),K=w&32767,G=M[p];if(x[K]=G,M[p]=K,B<=w){var I=o-w;if((T>7e3||D>24576)&&(I>423||!u)){l=Ur(r,g,0,k,E,U,s,D,V,w-V,l),D=T=s=0,V=w;for(var S=0;S<286;++S)E[S]=0;for(var S=0;S<30;++S)U[S]=0}var J=2,q=0,ar=c,R=K-G&32767;if(I>2&&p==F(w-R))for(var L=Math.min(h,I)-1,N=Math.min(32767,w),P=Math.min(258,I);R<=N&&--ar&&K!=G;){if(r[w+J]==r[w+J-R]){for(var A=0;A<P&&r[w+A]==r[w+A-R];++A);if(A>J){if(J=A,q=R,A>L)break;for(var Z=Math.min(R,A-2),rr=0,S=0;S<Z;++S){var er=w-R+S&32767,ur=x[er],hr=er-ur&32767;hr>rr&&(rr=hr,G=er)}}}K=G,G=x[K],R+=K-G&32767}if(q){k[D++]=268435456|Sr[J]<<18|Br[q];var vr=Sr[J]&31,fr=Br[q]&31;s+=gr[vr]+wr[fr],++E[257+vr],++U[fr],B=w+J,++T}else k[D++]=r[w],++E[r[w]]}}for(w=Math.max(w,B);w<o;++w)k[D++]=r[w],++E[r[w]];l=Ur(r,g,u,k,E,U,s,D,V,w-V,l),u||(f.r=l&7|g[l/8|0]<<3,l-=7,f.h=M,f.p=x,f.i=w,f.w=B)}else{for(var w=f.w||0;w<o+u;w+=65535){var nr=w+65535;nr>=o&&(g[l/8|0]=u,nr=o),l=Gr(g,l+1,r.subarray(w,nr))}f.i=o}return tr(t,0,a+mr(l)+v)},_r=(function(){for(var r=new Int32Array(256),e=0;e<256;++e){for(var n=e,a=9;--a;)n=(n&1&&-306674912)^n>>>1;r[e]=n}return r})(),pr=function(){var r=-1;return{p:function(e){for(var n=r,a=0;a<e.length;++a)n=_r[n&255^e[a]]^n>>>8;r=n},d:function(){return~r}}},br=function(r,e,n,a,v){if(!v&&(v={l:1},e.dictionary)){var f=e.dictionary.subarray(-32768),o=new z(f.length+r.length);o.set(f),o.set(r,f.length),r=o,v.w=f.length}return Lr(r,e.level==null?6:e.level,e.mem==null?v.l?Math.ceil(Math.max(8,Math.min(13,Math.log(r.length)))*1.5):20:12+e.mem,n,a,v)},Kr=function(r,e){var n={};for(var a in r)n[a]=r[a];for(var a in e)n[a]=e[a];return n},$=function(r,e){return r[e]|r[e+1]<<8},W=function(r,e){return(r[e]|r[e+1]<<8|r[e+2]<<16|r[e+3]<<24)>>>0},Cr=function(r,e){return W(r,e)+W(r,e+4)*4294967296},H=function(r,e,n){for(;n;++e)r[e]=n,n>>>=8};function dr(r,e){return br(r,e||{},0,0)}function re(r,e){return $r(r,{i:2},e&&e.out,e&&e.dictionary)}var Nr=function(r,e,n,a){for(var v in r){var f=r[v],o=e+v,t=a;Array.isArray(f)&&(t=Kr(a,f[1]),f=f[0]),ArrayBuffer.isView(f)?n[o]=[f,t]:(n[o+="/"]=[new z(0),t],Nr(f,o,n,a))}},Dr=typeof TextEncoder<"u"&&new TextEncoder,Fr=typeof TextDecoder<"u"&&new TextDecoder,ee=0;try{Fr.decode(Jr,{stream:!0}),ee=1}catch{}var ne=function(r){for(var e="",n=0;;){var a=r[n++],v=(a>127)+(a>223)+(a>239);if(n+v>r.length)return{s:e,r:tr(r,n-1)};v?v==3?(a=((a&15)<<18|(r[n++]&63)<<12|(r[n++]&63)<<6|r[n++]&63)-65536,e+=String.fromCharCode(55296|a>>10,56320|a&1023)):v&1?e+=String.fromCharCode((a&31)<<6|r[n++]&63):e+=String.fromCharCode((a&15)<<12|(r[n++]&63)<<6|r[n++]&63):e+=String.fromCharCode(a)}};function Ir(r,e){if(e){for(var n=new z(r.length),a=0;a<r.length;++a)n[a]=r.charCodeAt(a);return n}if(Dr)return Dr.encode(r);for(var v=r.length,f=new z(r.length+(r.length>>1)),o=0,t=function(l){f[o++]=l},a=0;a<v;++a){if(o+5>f.length){var g=new z(o+8+(v-a<<1));g.set(f),f=g}var u=r.charCodeAt(a);u<128||e?t(u):u<2048?(t(192|u>>6),t(128|u&63)):u>55295&&u<57344?(u=65536+(u&1047552)|r.charCodeAt(++a)&1023,t(240|u>>18),t(128|u>>12&63),t(128|u>>6&63),t(128|u&63)):(t(224|u>>12),t(128|u>>6&63),t(128|u&63))}return tr(f,0,o)}function ae(r,e){if(e){for(var n="",a=0;a<r.length;a+=16384)n+=String.fromCharCode.apply(null,r.subarray(a,a+16384));return n}else{if(Fr)return Fr.decode(r);var v=ne(r),f=v.s,n=v.r;return n.length&&Y(8),f}}var ve=function(r,e){return e+30+$(r,e+26)+$(r,e+28)},fe=function(r,e,n){var a=$(r,e+28),v=$(r,e+30),f=ae(r.subarray(e+46,e+46+a),!($(r,e+8)&2048)),o=e+46+a,t=ie(r,o,v,n,W(r,e+20),W(r,e+24),W(r,e+42)),g=t[0],u=t[1],l=t[2];return[$(r,e+10),g,u,f,o+v+$(r,e+32),l]},ie=function(r,e,n,a,v,f,o){var t=v==4294967295,g=f==4294967295,u=o==4294967295,l=e+n,i=t+g+u;if(a&&i){for(;e+4<l;e+=4+$(r,e+2))if($(r,e)==1)return[t?Cr(r,e+4+8*g):v,g?Cr(r,e+4):f,u?Cr(r,e+4+8*(g+t)):o,1];a<2&&Y(13)}return[v,f,o,0]},kr=function(r){var e=0;if(r)for(var n in r){var a=r[n].length;a>65535&&Y(9),e+=a+4}return e},qr=function(r,e,n,a,v,f,o,t){var g=a.length,u=n.extra,l=t&&t.length,i=kr(u);H(r,e,o!=null?33639248:67324752),e+=4,o!=null&&(r[e++]=20,r[e++]=n.os),r[e]=20,e+=2,r[e++]=n.flag<<1|(f<0&&8),r[e++]=v&&8,r[e++]=n.compression&255,r[e++]=n.compression>>8;var h=new Date(n.mtime==null?Date.now():n.mtime),c=h.getFullYear()-1980;if((c<0||c>119)&&Y(10),H(r,e,c<<25|h.getMonth()+1<<21|h.getDate()<<16|h.getHours()<<11|h.getMinutes()<<5|h.getSeconds()>>1),e+=4,f!=-1&&(H(r,e,n.crc),H(r,e+4,f<0?-f-2:f),H(r,e+8,n.size)),H(r,e+12,g),H(r,e+14,i),e+=16,o!=null&&(H(r,e,l),H(r,e+6,n.attrs),H(r,e+10,o),e+=14),r.set(a,e),e+=g,i)for(var y in u){var x=u[y],M=x.length;H(r,e,+y),H(r,e+2,M),r.set(x,e+4),e+=4+M}return l&&(r.set(t,e),e+=l),e},le=function(r,e,n,a,v){H(r,e,101010256),H(r,e+8,n),H(r,e+10,n),H(r,e+12,a),H(r,e+16,v)};function oe(r,e){e||(e={});var n={},a=[];Nr(r,"",n,e);var v=0,f=0;for(var o in n){var t=n[o],g=t[0],u=t[1],l=u.level==0?0:8,i=Ir(o),h=i.length,c=u.comment,y=c&&Ir(c),x=y&&y.length,M=kr(u.extra);h>65535&&Y(11);var m=l?dr(g,u):g,O=m.length,F=pr();F.p(g),a.push(Kr(u,{size:g.length,crc:F.d(),c:m,f:i,m:y,u:h!=o.length||y&&c.length!=x,o:v,compression:l})),v+=30+h+M+O,f+=76+2*(h+M)+(x||0)+O}for(var k=new z(f+22),E=v,U=f-v,T=0;T<a.length;++T){var i=a[T];qr(k,i.o,i,i.f,i.u,i.c.length);var s=30+i.f.length+kr(i.extra);k.set(i.c,i.o+s),qr(k,v,i,i.f,i.u,i.c.length,i.o,i.m),v+=16+s+(i.m?i.m.length:0)}return le(k,v,a.length,U,E),k}function te(r,e){for(var n={},a=r.length-22;W(r,a)!=101010256;--a)(!a||r.length-a>65558)&&Y(13);var v=$(r,a+8);if(!v)return{};var f=W(r,a+16),o=W(r,a-20)==117853008;if(o){var t=W(r,a-12);o=W(r,t)==101075792,o&&(v=W(r,t+32),f=W(r,t+48))}for(var g=e&&e.filter,u=0;u<v;++u){var l=fe(r,f,o),i=l[0],h=l[1],c=l[2],y=l[3],x=l[4],M=l[5],m=ve(r,M);f=x,(!g||g({name:y,size:h,originalSize:c,compression:i}))&&(i?i==8?n[y]=re(r.subarray(m,m+h),{out:new z(c)}):Y(14,"unknown compression type "+i):n[y]=tr(r,m,m+h))}return n}export{dr as deflateSync,re as inflateSync,ae as strFromU8,Ir as strToU8,te as unzipSync,oe as zipSync};
@@ -1,2 +0,0 @@
1
- import{A as gt,L as At,T as W,R as L,c as F,M as Q,D as K,r as Et,l as Y,O as tt}from"./rr0-sighting.mjs";import{C as et}from"./ContrailGrowth-DwHS8If9.js";class A{static OCTAVES=[63,125,250,500,1e3,2e3,4e3,8e3];static STANDARD={temperatureC:15,relativeHumidity:.7,pressureKPa:101.325};static REFERENCE_PRESSURE_KPA=101.325;static REFERENCE_TEMPERATURE_K=293.15;static TRIPLE_POINT_K=273.16;static speedOfSound(t){return 20.0468*Math.sqrt(t+273.15)}static absorptionDbPerKm(t,e=A.STANDARD){const a=e.temperatureC+273.15,n=A.REFERENCE_TEMPERATURE_K,s=e.pressureKPa/A.REFERENCE_PRESSURE_KPA,c=10**(-6.8346*(A.TRIPLE_POINT_K/a)**1.261+4.6151),i=e.relativeHumidity*100*c/s,r=s*(24+40400*i*(.02+i)/(.391+i)),l=s*(a/n)**-.5*(9+280*i*Math.exp(-4.17*((a/n)**(-1/3)-1))),o=t*t;return 8.686*o*(184e-13*(1/s)*Math.sqrt(a/n)+(a/n)**-2.5*(.01275*Math.exp(-2239.1/a)/(r+o/r)+.1068*Math.exp(-3352/a)/(l+o/l)))*1e3}static aWeightingDb(t){const e=t*t,a=12194**2*e*e/((e+20.6**2)*Math.sqrt((e+107.7**2)*(e+737.9**2))*(e+12194**2));return 20*Math.log10(a)+2}static sumDb(t){return 10*Math.log10(t.reduce((e,a)=>e+10**(a/10),0))}}const Mt=.25,at=.4,nt=6,z=12,bt=3,st=.2,ft=.2,Dt=24,St=3,Rt=12,it=1,It=.7,Ot=1.5,Tt=.8,Bt=1.3,rt=.9,ot=5,_t=25,vt=.5,Nt=.12,ct=[.13,.31],Ct=.16,wt=1.6,yt=3.6,lt=1.1,kt=.3,Pt=1e3,ut=.7;class J{context;noiseBuffer;roughBuffers=new Map;voices=new Map;bus;reverb;reverbOut;level=1;master;paused=!0;requested=[];headingDeg=0;resume(){if(!this.context){if(typeof AudioContext>"u")return;try{this.context=new AudioContext}catch(t){console.warn("AircraftAudio: Web Audio unavailable, aircraft stay silent:",t);return}}gt.unlock(this.context),this.apply()}setLevel(t){this.level=t,this.master&&(this.master.gain.value=t)}setPaused(t){t!==this.paused&&(this.paused=t,this.apply())}setVoices(t,e=0){this.requested=t,this.headingDeg=e,this.apply()}dispose(){for(const t of[...this.voices.keys()])this.release(t);this.context?.close(),this.context=void 0,this.master=void 0,this.bus=void 0}apply(){const t=this.context;if(!t)return;const e=this.paused?[]:this.requested,a=new Set(e.map(n=>n.id));for(const n of[...this.voices.keys()])a.has(n)||this.release(n);for(const n of e){const s=this.voices.get(n.id)??this.build(t,n);this.retarget(t,s,n)}}build(t,e){const a=t.createGain();a.gain.value=0;let n;const s=this.busOf(t);typeof t.createStereoPanner=="function"?(n=t.createStereoPanner(),a.connect(n).connect(s)):a.connect(s);const c=t.createGain(),i=e.character?.modulationDepth??0;c.gain.value=1-i/2;const r=t.createOscillator();r.type="sine";const l=t.createGain();l.gain.value=i/2,r.connect(l).connect(c.gain),c.connect(a);const o=t.createBufferSource();o.buffer=this.noise(t),o.loop=!0,o.loopStart=Math.random()*nt*.5;const d=[],u=[],h=[];for(const T of A.OCTAVES){const B=t.createBiquadFilter();B.type="bandpass",B.frequency.value=T,B.Q.value=it;const N=t.createBiquadFilter();N.type="bandpass",N.frequency.value=T,N.Q.value=it;const P=t.createGain();P.gain.value=0,o.connect(B).connect(N).connect(P).connect(c),d.push(B),u.push(N),h.push(P)}const p=[];for(const[T,B]of[[e.character?.toneHz,e.character?.toneShare],[e.character?.humHz,e.character?.humShare]])if(T!==void 0)for(let N=1;N<=St;N++){const P=t.createOscillator();P.type="sine",P.frequency.value=T*N;const q=t.createGain();q.gain.value=0,P.connect(q).connect(a),p.push({oscillator:P,gain:q,harmonic:N,baseHz:T,share:B??0})}const m=t.createGain();m.gain.value=0,m.connect(a.gain);const M=ct.map(T=>{const B=t.createOscillator();return B.type="sine",B.frequency.value=T,B.connect(m),B}),f=t.createGain();f.gain.value=e.character?.roughness??st;const I=t.createBufferSource();I.buffer=this.roughTable(t,bt),I.loop=!0,I.loopStart=Math.random()*z*.5,I.connect(f).connect(c.gain);const S=t.createGain();S.gain.value=(e.character?.roughness??st)*ft;const b=t.createBufferSource();b.buffer=this.roughTable(t,Dt),b.loop=!0,b.loopStart=Math.random()*z*.5,b.connect(S).connect(c.gain);let _;const j=this.busOf(t)&&this.reverb;j&&(_=t.createGain(),_.gain.value=0,a.connect(_).connect(j));const $=[o,I,b,r,...p.map(T=>T.oscillator),...M];for(const T of $)T.start();const x={nodes:[a,c,l,f,S,m,...p.map(T=>T.gain),...d,...u,...h,..._?[_]:[],...n?[n]:[],...$],sources:$,filters:d,seconds:u,gains:h,tones:p,lfo:r,lfoDepth:l,wander:M,wanderDepth:m,roughDepth:f,crackleDepth:S,beat:c,output:a,panner:n,send:_};return this.voices.set(e.id,x),x}retarget(t,e,a){const n=t.currentTime,s=(p,m)=>p.setTargetAtTime(m,n,Mt),c=Math.min(Ot,Math.max(It,a.dopplerRatio)),i=Math.min(Bt,Math.max(Tt,Math.sqrt(a.dopplerRatio))),r=t.sampleRate*.45,l=a.bandAmplitudes.map((p,m)=>p*J.unweighting(A.OCTAVES[m])),o=Math.sqrt(l.reduce((p,m)=>p+m*m,0)),d=Math.min(1,Math.max(0,(a.distanceKm-ot)/(_t-ot)));A.OCTAVES.forEach((p,m)=>{s(e.filters[m].frequency,Math.min(r,p*i)),s(e.seconds[m].frequency,Math.min(r,p*i)),s(e.gains[m].gain,l[m]*Math.sqrt(Pt/p))});const u=a.character;for(const{oscillator:p,gain:m,harmonic:M,baseHz:f,share:I}of e.tones){const S=f*M;s(p.frequency,S*c);const b=S*c;s(m.gain,b<r?I*Ct*l[J.bandOf(b)]/M:0)}u?.modulationHz!==void 0&&s(e.lfo.frequency,u.modulationHz*c);const h=o>0?ut*(1-Math.exp(-o/ut))/o:1;if(s(e.output.gain,h*(1-kt*d)),s(e.wanderDepth.gain,h*Nt*d/ct.length),e.send&&s(e.send.gain,wt*d),e.panner){const p=(a.azimuthDeg-this.headingDeg)*Math.PI/180,m=a.inside?0:Math.max(-rt,Math.min(rt,Math.sin(p)))*(1-vt*d);s(e.panner.pan,m)}}static unweighting(t){return 10**(Math.min(Rt,Math.max(0,-A.aWeightingDb(t)))/20)}static bandOf(t){let e=0;return A.OCTAVES.forEach((a,n)=>{Math.abs(Math.log(t/a))<Math.abs(Math.log(t/A.OCTAVES[e]))&&(e=n)}),e}roughTable(t,e){const a=this.roughBuffers.get(e);if(a)return a;const n=Math.floor(t.sampleRate*z),s=t.createBuffer(1,n,t.sampleRate),c=s.getChannelData(0),i=Array.from({length:z*e},()=>(Math.random()*2-1)**3),r=t.sampleRate/e;for(let l=0;l<c.length;l++){const o=l/r,d=Math.floor(o),u=o-d,h=u*u*(3-2*u);c[l]=i[d%i.length]*(1-h)+i[(d+1)%i.length]*h}return this.roughBuffers.set(e,s),s}roomImpulse(t){const e=Math.floor(t.sampleRate*yt),a=t.createBuffer(2,e,t.sampleRate);for(let n=0;n<2;n++){const s=a.getChannelData(n);let c=0;for(let i=0;i<e;i++){const r=i/t.sampleRate,l=.6*Math.exp(-r/(lt*2))+.04;c+=l*(Math.random()*2-1-c),s[i]=c*Math.exp(-r/lt)}}return a}busOf(t){if(this.bus)return this.bus;const e=t.createGain();if(e.gain.value=this.level,e.connect(t.destination),this.master=e,typeof t.createConvolver=="function"){const a=t.createConvolver();a.buffer=this.roomImpulse(t);const n=t.createGain();n.gain.value=.9,a.connect(n),this.reverb=a,this.reverbOut=n}if(typeof t.createDynamicsCompressor=="function"){const a=t.createDynamicsCompressor();a.threshold.value=-6,a.knee.value=3,a.ratio.value=4,a.attack.value=.005,a.release.value=.25,a.connect(e),this.bus=a}else this.bus=e;return this.reverbOut?.connect(this.bus),this.bus}release(t){const e=this.voices.get(t);if(!e)return;this.voices.delete(t);const a=this.context;a&&(e.output.gain.setTargetAtTime(0,a.currentTime,at/3),setTimeout(()=>{for(const n of e.sources)try{n.stop()}catch{}for(const n of e.nodes)n.disconnect()},at*1e3*3))}noise(t){if(this.noiseBuffer)return this.noiseBuffer;const e=t.createBuffer(1,t.sampleRate*nt,t.sampleRate),a=e.getChannelData(0);for(let n=0;n<a.length;n++)a[n]=Math.random()*2-1;return this.noiseBuffer=e,e}}class v{static BASE_DB_A=30;static WIND_DB_A=[[0,10],[1,28],[2,36],[3,40],[5,46],[8,52],[12,58],[20,66]];static RAIN_DB_A=[[0,0],[.1,42],[.3,50],[.6,58],[1,65]];static BED_RMS=.2;static MINIMUM_REFERENCE=.008;static WIND_BED_MIN_MS=1;static WIND_BED_FULL_MS=20;static dbA(t){const e=[v.BASE_DB_A,v.along(v.WIND_DB_A,t.windSpeed)];return(t.precipitationType==="rain"||t.precipitationType==="hail")&&e.push(v.along(v.RAIN_DB_A,t.precipitationIntensity)),10*Math.log10(e.filter(a=>a>0).reduce((a,n)=>a+10**(n/10),0))}static bedVolume(t){const e=t.windSpeed>v.WIND_BED_MIN_MS?Math.min(t.windSpeed/v.WIND_BED_FULL_MS,1):0,a=t.precipitationType==="hail"?Math.min(1,t.precipitationIntensity*1.3+.2):t.precipitationType==="rain"?t.precipitationIntensity:0;return Math.hypot(e,a)}static referenceAmplitude(t){return Math.max(v.BED_RMS*v.bedVolume(t),v.MINIMUM_REFERENCE)}static along(t,e){if(e<=t[0][0])return t[0][1];for(let a=1;a<t.length;a++)if(e<=t[a][0]){const[n,s]=t[a-1],[c,i]=t[a];return s+(i-s)*(e-n)/(c-n)}return t[t.length-1][1]}}class k{static TYPES={A318:["Airbus A318","airliner-narrow",34.1,31.4],A319:["Airbus A319","airliner-narrow",34.1,33.8],A320:["Airbus A320","airliner-narrow",34.1,37.6],A321:["Airbus A321","airliner-narrow",34.1,44.5],A19N:["Airbus A319neo","airliner-narrow",35.8,33.8],A20N:["Airbus A320neo","airliner-narrow",35.8,37.6],A21N:["Airbus A321neo","airliner-narrow",35.8,44.5],B737:["Boeing 737-700","airliner-narrow",34.3,33.6],B738:["Boeing 737-800","airliner-narrow",35.8,39.5],B739:["Boeing 737-900","airliner-narrow",35.8,42.1],B38M:["Boeing 737 MAX 8","airliner-narrow",35.9,39.5],B39M:["Boeing 737 MAX 9","airliner-narrow",35.9,42.2],B752:["Boeing 757-200","airliner-narrow",38,47.3],B753:["Boeing 757-300","airliner-narrow",38,54.4],B762:["Boeing 767-200","airliner-wide",47.6,48.5],B763:["Boeing 767-300","airliner-wide",47.6,54.9],B764:["Boeing 767-400","airliner-wide",51.9,61.4],B772:["Boeing 777-200","airliner-wide",60.9,63.7],B77L:["Boeing 777-200LR","airliner-wide",64.8,63.7],B77W:["Boeing 777-300ER","airliner-wide",64.8,73.9],B788:["Boeing 787-8","airliner-wide",60.1,56.7],B789:["Boeing 787-9","airliner-wide",60.1,62.8],B78X:["Boeing 787-10","airliner-wide",60.1,68.3],B744:["Boeing 747-400","airliner-wide",64.4,70.7],B748:["Boeing 747-8","airliner-wide",68.4,76.3],A306:["Airbus A300-600","airliner-wide",44.8,54.1],A310:["Airbus A310","airliner-wide",43.9,46.7],A332:["Airbus A330-200","airliner-wide",60.3,58.8],A333:["Airbus A330-300","airliner-wide",60.3,63.7],A338:["Airbus A330-800","airliner-wide",64,58.8],A339:["Airbus A330-900","airliner-wide",64,63.7],A343:["Airbus A340-300","airliner-wide",60.3,63.7],A346:["Airbus A340-600","airliner-wide",63.5,75.4],A359:["Airbus A350-900","airliner-wide",64.8,66.8],A35K:["Airbus A350-1000","airliner-wide",64.8,73.8],A388:["Airbus A380-800","airliner-wide",79.8,72.7],E170:["Embraer 170","regional-jet",26,29.9],E75L:["Embraer 175","regional-jet",26,31.7],E75S:["Embraer 175","regional-jet",26,31.7],E190:["Embraer 190","regional-jet",28.7,36.2],E195:["Embraer 195","regional-jet",28.7,38.7],E290:["Embraer 190-E2","regional-jet",33.7,36.2],E295:["Embraer 195-E2","regional-jet",33.7,41.5],CRJ2:["Bombardier CRJ200","regional-jet",21.2,26.8],CRJ7:["Bombardier CRJ700","regional-jet",23.2,32.3],CRJ9:["Bombardier CRJ900","regional-jet",24.9,36.2],CRJX:["Bombardier CRJ1000","regional-jet",26.2,39.1],AT72:["ATR 72","regional-turboprop",27.1,27.2],AT76:["ATR 72-600","regional-turboprop",27.1,27.2],AT45:["ATR 42","regional-turboprop",24.6,22.7],DH8D:["Dash 8 Q400","regional-turboprop",28.4,32.8],DH8C:["Dash 8-300","regional-turboprop",27.4,25.7],SF34:["Saab 340","regional-turboprop",21.4,19.7],B190:["Beechcraft 1900","regional-turboprop",17.7,17.6],C25A:["Cessna CitationJet CJ2","business-jet",14.3,14.4],C56X:["Cessna Citation Excel","business-jet",17.2,16],C68A:["Cessna Citation Latitude","business-jet",22,18.9],C550:["Cessna Citation II","business-jet",15.8,14.4],E55P:["Embraer Phenom 300","business-jet",15.9,15.6],E50P:["Embraer Phenom 100","business-jet",12.3,12.8],GLF5:["Gulfstream G550","business-jet",28.5,29.4],FA7X:["Dassault Falcon 7X","business-jet",26.2,23.4],CL60:["Bombardier Challenger 600","business-jet",19.6,20.9],LJ45:["Learjet 45","business-jet",14.6,17.7],H25B:["Hawker 800","business-jet",15.7,15.6],C172:["Cessna 172","light-piston",11,8.3],C152:["Cessna 152","light-piston",10.2,7.3],C182:["Cessna 182","light-piston",10.9,8.8],P28A:["Piper Cherokee","light-piston",10.7,7.2],PA34:["Piper Seneca","light-piston",11.8,8.7],SR20:["Cirrus SR20","light-piston",10.9,7.9],SR22:["Cirrus SR22","light-piston",11.7,7.9],S22T:["Cirrus SR22T","light-piston",11.7,7.9],DA40:["Diamond DA40","light-piston",11.6,8.1],DA42:["Diamond DA42","light-piston",13.4,8.6],BE20:["Beechcraft King Air 200","turboprop-light",16.6,13.3],BE58:["Beechcraft Baron","light-piston",11.5,9.1],C208:["Cessna Caravan","turboprop-light",15.9,11.5],PC12:["Pilatus PC-12","turboprop-light",16.3,14.4],TBM9:["Daher TBM 900","turboprop-light",12.8,10.7],EC35:["Airbus H135","helicopter-light",10.2,12.1],EC45:["Airbus H145","helicopter-medium",11,13.6],AS50:["Airbus H125","helicopter-light",10.7,12.9],EC30:["Airbus H130","helicopter-light",10.7,12.6],B407:["Bell 407","helicopter-light",10.7,12.7],B06:["Bell 206","helicopter-light",10.2,12],B429:["Bell 429","helicopter-medium",10.9,13],B505:["Bell 505","helicopter-light",10.4,11.9],R44:["Robinson R44","helicopter-light",10.1,11.7],R22:["Robinson R22","helicopter-light",7.7,8.8],A109:["Agusta A109","helicopter-medium",11,13],A139:["Leonardo AW139","helicopter-medium",13.8,16.7],S92:["Sikorsky S-92","helicopter-heavy",17.2,20.9],H60:["Sikorsky UH-60 Black Hawk","helicopter-heavy",16.4,19.8],T38:["Northrop T-38 Talon","military-jet",7.7,14.1],HAWK:["BAE Hawk","military-jet",9.4,11.9],GLID:["Glider","glider",17,7],BALL:["Balloon","balloon",15,20],ULAC:["Ultralight","ultralight",9.5,6],C42:["Ikarus C42","ultralight",9.4,6.3],DRON:["Drone","unmanned",1,.6]};static CATEGORIES={A1:["Light aircraft","light-piston",11,8.3],A2:["Small aircraft","business-jet",15,15],A3:["Large aircraft","airliner-narrow",34.1,37.6],A4:["High-vortex large aircraft","airliner-narrow",38,47.3],A5:["Heavy aircraft","airliner-wide",60.3,63.7],A6:["High-performance aircraft","military-jet",8,14],A7:["Rotorcraft","helicopter-medium",10.7,12.7],B1:["Glider","glider",17,7],B2:["Lighter-than-air","balloon",15,20],B4:["Ultralight","ultralight",9.5,6],B6:["Unmanned aircraft","unmanned",1.5,1]};static GENERIC={name:"Airliner",kind:"airliner-narrow",spanM:34.1,lengthM:37.6,basis:"nothing"};static of(t){const e=t?.type?.toUpperCase(),a=e?k.TYPES[e]:void 0;if(a)return{code:e,name:a[0],kind:a[1],spanM:a[2],lengthM:a[3],basis:"type"};const n=t?.category?k.CATEGORIES[t.category]:void 0;return n?{name:n[0],kind:n[1],spanM:n[2],lengthM:n[3],basis:"category"}:{...k.GENERIC}}static isHelicopter(t){return t.kind.startsWith("helicopter")}}class O{static DUSK_SUN_ELEVATION_DEG=-.83;static ALWAYS=new Set(["airliner-narrow","airliner-wide","regional-turboprop","regional-jet","business-jet"]);static NONE=new Set(["glider","balloon"]);static BRIGHTNESS={"light-piston":[.5,.2,.5],"turboprop-light":[.7,.4,.8],ultralight:[.4,.2,.4],unmanned:[0,.05,0],"helicopter-light":[1,1,1],"helicopter-medium":[1,1,1],"helicopter-heavy":[1,1,1],"military-jet":[1,1,1]};static LANDING_LIGHTS_BELOW_FT=1e4;static LANDING_INTENSITY=600;static LANDING_BEAM_DEG=10;static LANDING_COLOR="#fff1dc";static LANDING_BRIGHTNESS={"airliner-narrow":1,"airliner-wide":1,"regional-jet":.6,"regional-turboprop":.6,"business-jet":.4,"turboprop-light":.2,"light-piston":.1,ultralight:.05,"helicopter-light":.1,"helicopter-medium":.2,"helicopter-heavy":.2};static lampsOn(t,e){if(O.NONE.has(t))return{navigation:!1,beacon:!1,strobes:!1};if(O.ALWAYS.has(t))return{navigation:!0,beacon:!0,strobes:!0};const a=e<O.DUSK_SUN_ELEVATION_DEG;return t==="unmanned"?{navigation:!1,beacon:!1,strobes:a}:{navigation:a,beacon:a,strobes:a}}static lights(t,e){const a=O.lampsOn(t.kind,e),n=t.kind.startsWith("helicopter"),s=At.find(h=>h.id===(n?"helicopter":"airliner")).create(),[c,i]=n?[5,7]:[17,18],r=t.spanM/2/c,l=t.lengthM/2/i,[o,d,u]=O.BRIGHTNESS[t.kind]??[1,1,1];return s.filter(h=>h.id.startsWith("nav")?a.navigation:h.id.startsWith("strobe")?a.strobes:h.id.startsWith("beacon")?a.beacon:!0).filter(h=>!(h.id.startsWith("beacon")&&!a.beacon)).map(h=>{const p=h.id.startsWith("nav")?o:h.id.startsWith("strobe")?d:u;return{...h,offsetM:{x:h.offsetM.x*r,y:h.offsetM.y,z:h.offsetM.z*l},intensity:(h.intensity??1)*p}}).filter(h=>(h.intensity??1)>0)}static landingLights(t,e,a){const n=O.LANDING_BRIGHTNESS[t.kind]??0;if(n===0||!O.lampsOn(t.kind,e).navigation)return[];const s=o=>o<O.LANDING_LIGHTS_BELOW_FT;if(!a.some(o=>s(o.altitudeFt)))return[];const c=O.LANDING_INTENSITY*n,i=a.flatMap((o,d)=>d>0&&s(o.altitudeFt)!==s(a[d-1].altitudeFt)?[{t:o.t,intensity:s(o.altitudeFt)?c:0}]:[]),r=t.spanM/34,l=t.lengthM/36;return[-1,1].map(o=>({id:o<0?"landing-left":"landing-right",offsetM:{x:o*5*r,y:-1,z:3*l},color:O.LANDING_COLOR,intensity:s(a[0].altitudeFt)?c:0,pattern:{kind:"steady"},beamDeg:O.LANDING_BEAM_DEG,keyframes:i}))}static bodyColor(t){return t.kind==="military-jet"?"#8a8e94":t.kind.startsWith("helicopter")?"#c8ccd1":t.kind==="unmanned"?"#2c2e33":"#dde0e4"}}class U{static FAMILIES={"amvlab-a320":["A318","A319","A320","A321","A19N","A20N","A21N"],"amvlab-b737":["B732","B733","B734","B735","B736","B737","B738","B739","B37M","B38M","B39M","B3XM"],"amvlab-a350":["A359","A35K"],"amvlab-a380":["A388"],"amvlab-b787":["B788","B789","B78X"]};static BY_TYPE=new Map(Object.entries(U.FAMILIES).flatMap(([t,e])=>e.map(a=>[a,t])));static idOf(t){return t?U.BY_TYPE.get(t.toUpperCase()):void 0}}class R{static ID_PREFIX=W.ID_PREFIX;static MAX_OBJECTS=40;static FT_TO_M=.3048;static DEG=Math.PI/180;static from(t,e,a,n=R.MAX_OBJECTS,s={}){return new Ht(t,e,a,n,s).build()}static idOf(t,e){return W.idOf(t,e)}static keyOf(t){return W.keyOf(t)}static HEIGHT_OVER_LENGTH=.29;static sizeOf(t){return{widthM:t.spanM,lengthM:t.lengthM,heightM:t.lengthM*R.HEIGHT_OVER_LENGTH}}static offsetOf(t,e){const a=L.seenFrom(t,{lat:e.lat,lng:e.lng,heightM:e.altitudeFt*R.FT_TO_M}),n=a.distanceKm*1e3,s=n*Math.cos(a.altitudeDeg*R.DEG);return{eastM:s*Math.sin(a.azimuthDeg*R.DEG),northM:s*Math.cos(a.azimuthDeg*R.DEG),upM:n*Math.sin(a.altitudeDeg*R.DEG),altitudeDeg:a.altitudeDeg,distanceKm:a.distanceKm}}static segments(t){const e=[];let a=[];for(const n of t.points){const s=a[a.length-1];s&&n.t-s.t>F.MAX_GAP_S*1e3&&(e.push(a),a=[]),a.push(n)}return e.push(a),e.filter(n=>n.length>=2)}static bearingDeg(t,e){return(Math.atan2(e.eastM-t.eastM,e.northM-t.northM)/R.DEG+360)%360}}class Ht{constructor(t,e,a,n,s){this.tracks=t,this.observer=e,this.startMs=a,this.maxObjects=n,this.options=s}build(){const t=[];for(const a of this.tracks){const n=R.keyOf(a),s=this.options.models?.get(n)??k.of(void 0);R.segments(a).forEach((c,i)=>{const r=c.map(h=>({point:h,at:R.offsetOf(this.observer,h)}));if(!r.some(h=>h.at.altitudeDeg>=0))return;const l=r.map((h,p)=>({t:h.point.t-this.startMs,eastM:h.at.eastM,northM:h.at.northM,altitudeM:h.at.upM,headingDeg:h.point.trackDeg??(p+1<r.length?R.bearingDeg(h.at,r[p+1].at):R.bearingDeg(r[p-1].at,h.at))})),o=R.idOf(a,i),d=r[Math.floor(r.length/2)].point,u=this.options.sunElevationAt?.(d)??90;t.push({object:{id:o,kind:"aircraft",eastM:l[0].eastM,northM:l[0].northM,headingDeg:l[0].headingDeg,sizeM:R.sizeOf(s),model:U.idOf(s.code)?{id:U.idOf(s.code)}:void 0,color:O.bodyColor(s),lights:[...O.lights(s,u),...O.landingLights(s,u,c.map(h=>({t:h.t-this.startMs,altitudeFt:h.altitudeFt})))],track:l},presence:{fromMs:l[0].t,untilMs:l[l.length-1].t},flight:{icao:a.icao,nonIcao:a.nonIcao,points:c},closestKm:Math.min(...r.map(h=>h.at.distanceKm))})})}t.sort((a,n)=>a.closestKm-n.closestKm);const e=t.slice(0,this.maxObjects);return{objects:e.map(a=>a.object),presence:new Map(e.map(a=>[a.object.id,a.presence])),flights:new Map(e.map(a=>[a.object.id,a.flight])),total:t.length,shown:e.length}}}const mt=[{id:"turbofan-narrow-body",name:"Turbofan airliner, narrow-body",kinds:["airliner-narrow"],totalDbA:148,shapeDb:[-32,-17,-9,-6,-5,-7,-12,-22],character:{toneHz:1800,toneShare:.3,humHz:90,humShare:.7}},{id:"turbofan-wide-body",name:"Turbofan airliner, wide-body",kinds:["airliner-wide"],totalDbA:151,shapeDb:[-28,-14,-7,-4,-3,-6,-12,-22],character:{toneHz:1200,toneShare:.3,humHz:70,humShare:.7}},{id:"regional-jet",name:"Regional jet",kinds:["regional-jet"],totalDbA:144,shapeDb:[-32,-17,-9,-5,-4,-6,-11,-21],character:{toneHz:1900,toneShare:.3,humHz:95,humShare:.7}},{id:"business-jet",name:"Business jet",kinds:["business-jet"],totalDbA:141,shapeDb:[-30,-15,-8,-4,-3,-4,-9,-19],character:{toneHz:2500,toneShare:.25,humHz:110,humShare:.7}},{id:"turboprop",name:"Turboprop",kinds:["regional-turboprop","turboprop-light"],totalDbA:138,shapeDb:[-14,-9,-8,-6,-8,-13,-20,-28],character:{toneHz:80,toneShare:.5}},{id:"light-piston",name:"Light piston aircraft",kinds:["light-piston"],totalDbA:130,shapeDb:[-18,-9,-5,-4,-8,-14,-22,-30],character:{toneHz:80,toneShare:.4}},{id:"ultralight",name:"Ultralight",kinds:["ultralight"],totalDbA:124,shapeDb:[-16,-8,-5,-4,-9,-15,-23,-31],character:{toneHz:140,toneShare:.4}},{id:"helicopter-light",name:"Light helicopter",kinds:["helicopter-light"],totalDbA:134,shapeDb:[-15,-8,-4,-3,-6,-10,-16,-24],character:{modulationHz:20,modulationDepth:.5}},{id:"helicopter-medium",name:"Medium helicopter",kinds:["helicopter-medium"],totalDbA:138,shapeDb:[-14,-7,-4,-3,-6,-10,-16,-24],character:{modulationHz:22,modulationDepth:.5}},{id:"helicopter-heavy",name:"Heavy helicopter",kinds:["helicopter-heavy"],totalDbA:144,shapeDb:[-12,-6,-4,-4,-7,-11,-17,-25],character:{modulationHz:17,modulationDepth:.5}},{id:"military-jet",name:"Military jet",kinds:["military-jet"],totalDbA:152,shapeDb:[-26,-12,-6,-3,-2,-3,-7,-15]},{id:"glider",name:"Glider",kinds:["glider"],totalDbA:85,shapeDb:[-30,-22,-15,-10,-8,-8,-14,-22]},{id:"balloon",name:"Hot-air balloon",kinds:["balloon"],totalDbA:100,shapeDb:[-25,-15,-9,-5,-3,-6,-12,-20]},{id:"unmanned",name:"Unmanned aircraft",kinds:["unmanned"],totalDbA:88,shapeDb:[-40,-30,-20,-12,-6,-3,-3,-8],character:{toneHz:450,toneShare:1}}],ht=mt.map(w=>({id:w.id,name:w.name,soundPowerA:w.shapeDb.map(t=>t+w.totalDbA-A.sumDb(w.shapeDb)),character:w.character}));class g{static DEFAULT_AMBIENT_DB_A=35;static DETECTION_MARGIN_DB=3;static AMBIENT_SHAPE_DB=[-12,-7,-5,-5,-7,-11,-17,-25];static HEARING_FLOOR_DB_A=0;static ITERATIONS=30;static CONVERGED_MS=.5;static VELOCITY_STEP_MS=500;static noiseOfKind(t){const e=mt.find(a=>a.kinds.includes(t));return ht.find(a=>a.id===(e?.id??"turbofan-narrow-body"))}static bandsAt(t,e,a=A.STANDARD){const n=20*Math.log10(Math.max(e*1e3,1))+11;return A.OCTAVES.map((s,c)=>t.soundPowerA[c]-n-A.absorptionDbPerKm(s,a)*e)}static couldBeHeard(t,e,a=g.DEFAULT_AMBIENT_DB_A,n=A.STANDARD){const s=g.ambientBands(a);return g.bandsAt(t,e,n).some((c,i)=>c>=Math.max(s[i]+g.DETECTION_MARGIN_DB,g.HEARING_FLOOR_DB_A))}static ambientBands(t){const e=g.AMBIENT_SHAPE_DB,a=A.sumDb(e);return e.map(n=>t+n-a)}static heardAt(t,e,a,n={}){const s=n.air??A.STANDARD,c=A.speedOfSound(s.temperatureC),i=t.points[t.points.length-1]?.t;if(i===void 0)return;let r=Math.min(a,i),l=F.positionAt(t,r);if(!l)return;let o=L.seenFrom(e,l.geo);for(let b=0;b<g.ITERATIONS;b++){const _=a-o.distanceKm*1e3*1e3/c,j=Math.abs(_-r);if(r=_,l=F.positionAt(t,r),!l)return;if(o=L.seenFrom(e,l.geo),j<g.CONVERGED_MS)break}const d=F.positionAt(t,a),u=d?L.seenFrom(e,d.geo):o,h=n.noise??ht[0],p=n.ambientDbA??g.DEFAULT_AMBIENT_DB_A,m=g.ambientBands(p),M=g.bandsAt(h,o.distanceKm,s),f=M.map((b,_)=>b>=Math.max(m[_]+g.DETECTION_MARGIN_DB,g.HEARING_FLOOR_DB_A)),I=M.indexOf(Math.max(...M)),S=f.lastIndexOf(!0);return{track:t,audible:f.some(Boolean),levelDbA:A.sumDb(M),bandsDbA:M,ambientDbA:p,delayS:(a-r)/1e3,emittedAtMs:r,sound:o,seen:u,lagDeg:g.angleBetween(o,u),dopplerRatio:g.doppler(t,e,r,c),dominantHz:A.OCTAVES[I],cutoffHz:S<0?void 0:A.OCTAVES[S]}}static profile(t,e,a,n,s=2e3,c={}){const i=[];let r,l,o=a;for(let d=a;d<=n;d+=s){const u=g.heardAt(t,e,d,c);u&&(!l||u.levelDbA>l.levelDbA)&&(l=u,o=d),u?.audible?r?r.untilMs=d:i.push(r={fromMs:d,untilMs:d}):r=void 0}return{track:t,audible:i,peakDbA:l?.levelDbA??-1/0,peakAtMs:o,peakDelayS:l?.delayS??0}}static angleBetween(t,e){const a=o=>{const d=o.altitudeDeg*Math.PI/180,u=o.azimuthDeg*Math.PI/180;return[Math.cos(d)*Math.sin(u),Math.cos(d)*Math.cos(u),Math.sin(d)]},[n,s,c]=a(t),[i,r,l]=a(e);return Math.acos(Math.min(1,Math.max(-1,n*i+s*r+c*l)))*180/Math.PI}static doppler(t,e,a,n){const s=g.VELOCITY_STEP_MS,c=F.positionAt(t,a-s),i=F.positionAt(t,a+s);if(!c||!i)return 1;const r=L.seenFrom(e,c.geo).distanceKm*1e3,l=L.seenFrom(e,i.geo).distanceKm*1e3;return 1/(1-(r-l)/(2*s/1e3)/n)}}class Kt{static at(t,e,a,n,s={}){const c=F.seenFrom(t,a,n);if(!c)return;const i=k.of(e),r=g.heardAt(t,a,n,{noise:g.noiseOfKind(i.kind),...s});return{hex:`${t.nonIcao?"~":""}${t.icao.toString(16).padStart(6,"0")}`,registration:e?.registration,typeCode:i.code??e?.type,name:i.basis==="nothing"?void 0:i.name,kind:i.kind,basis:i.basis,military:e?.military===!0,restricted:e?.restricted===!0,altitudeFt:c.altitudeFt,groundSpeedKt:c.groundSpeedKt,trackDeg:c.trackDeg,sky:c.sky,angularRateDegPerS:c.angularRateDegPerS,hearing:r&&{audible:r.audible,levelDbA:r.levelDbA,ambientDbA:r.ambientDbA,delayS:r.delayS,lagDeg:r.lagDeg,dopplerRatio:r.dopplerRatio,cutoffHz:r.cutoffHz,dominantHz:r.dominantHz}}}}class D{static REFERENCE_AMPLITUDE=.02;static MASKING_RANGE_DB=6;static KNEE_DB=20;static COMPRESSION_RATIO=1.5;static EXPANSION_RATIO=1.8;static DEFAULT_MAX_VOICES=4;static candidates(t,e,a,n,s={}){const c=new Set;for(const[i,r]of t){const l=g.noiseOfKind(k.of(e.get(a(r))).kind);let o=1/0;for(const d of r.points)o=Math.min(o,L.seenFrom(n,{lat:d.lat,lng:d.lng,heightM:d.altitudeFt*.3048}).distanceKm);g.couldBeHeard(l,o,s.ambientDbA,s.air)&&c.add(i)}return c}static voices(t,e,a,n,s,c,i={}){const r=[];for(const l of t){const o=e.get(l);if(!o||i.only?.(l)===!1)continue;const d=i.kindOf?.(l)??k.of(a.get(n(o))).kind,u=i.noiseOf?.(l)??g.noiseOfKind(d),h=g.heardAt(o,s,c,{...i,noise:u});if(!h?.audible)continue;const p=i.throughDb,m=p?h.bandsDbA.map((M,f)=>M-(p[f]??0)):h.bandsDbA;p&&!D.noticed(m,h.ambientDbA)||r.push({id:l,kind:d,bandAmplitudes:D.bandAmplitudes(m,h.ambientDbA,i.referenceAmplitude),levelDbA:p?A.sumDb(m):h.levelDbA,distanceKm:h.sound.distanceKm,dopplerRatio:h.dopplerRatio,azimuthDeg:h.sound.azimuthDeg,elevationDeg:h.sound.altitudeDeg,character:u.character})}return r.sort((l,o)=>o.levelDbA-l.levelDbA).slice(0,i.maxVoices??D.DEFAULT_MAX_VOICES)}static noticed(t,e){const a=g.ambientBands(e);return t.some((n,s)=>n>=a[s]+g.DETECTION_MARGIN_DB)}static bandAmplitudes(t,e,a=D.REFERENCE_AMPLITUDE){const n=g.ambientBands(e),s=g.DETECTION_MARGIN_DB,c=A.sumDb(t),i=c-e,r=i>=D.KNEE_DB?D.KNEE_DB+(i-D.KNEE_DB)/D.COMPRESSION_RATIO:D.KNEE_DB-(D.KNEE_DB-i)*D.EXPANSION_RATIO,l=a*10**(r/20);return t.map((o,d)=>{const u=Math.min(1,Math.max(0,(o-n[d]-s+D.MASKING_RANGE_DB)/(2*D.MASKING_RANGE_DB)));return u*u*(3-2*u)*l*10**((o-c)/20)})}static BANDS_HZ=A.OCTAVES}class V{static RUMBLE_BELOW_HZ=500;static DULL_BELOW_HZ=2e3;static PITCH_NOTICED=.03;static text(t,e,a,n){const s=(u,h=0)=>u.toLocaleString(n,{maximumFractionDigits:h}),c=(u,h)=>u.replace(/\{(\w+)\}/g,(p,m)=>h[m]??`{${m}}`),i=[],r=[t.registration,t.name].filter(Boolean).join(" · ");i.push(r||c(e.unnamed,{hex:t.hex}));const l=[c(e.altitude,{value:s(Math.round(t.altitudeFt/100)*100)}),t.groundSpeedKt===void 0?void 0:c(e.speed,{value:s(Math.round(t.groundSpeedKt))}),t.trackDeg===void 0?void 0:c(e.heading,{value:s(Math.round(t.trackDeg))})].filter(Boolean);i.push(l.join(" · ")),i.push(c(e.position,{distance:s(t.sky.distanceKm,t.sky.distanceKm<10?1:0),elevation:s(Math.round(t.sky.altitudeDeg)),bearing:a(t.sky.azimuthDeg)}));const o=t.hearing;if(!o)i.push(e.soundUnknown);else if(!o.audible)i.push(c(e.inaudible,{level:s(Math.round(o.levelDbA)),ambient:s(Math.round(o.ambientDbA))}));else{const u=o.cutoffHz??0,h=u<=V.RUMBLE_BELOW_HZ?e.rumble:u<=V.DULL_BELOW_HZ?e.muffled:e.broad,p=o.dopplerRatio-1,m=Math.abs(p)<V.PITCH_NOTICED?"":c(p>0?e.pitchHigher:e.pitchLower,{percent:s(Math.round(Math.abs(p)*100))});i.push(c(e.heard,{level:s(Math.round(o.levelDbA)),delay:s(Math.round(o.delayS)),lag:s(Math.round(o.lagDeg)),character:c(h,{cutoff:s(u)}),pitch:m}))}t.contrail&&i.push(c(t.contrail.persistent?e.contrailPersistent:e.contrailShort,{rhi:s(Math.round(t.contrail.iceRelativeHumidity*100))}));const d=[t.military?e.military:void 0,t.restricted?e.restricted:void 0].filter(Boolean);return d.length>0&&i.push(d.join(" · ")),i.push(e.candidate),i.join(`
2
- `)}}class Z{static EFFICIENCY={"airliner-narrow":.34,"airliner-wide":.38,"regional-jet":.32,"business-jet":.3,"military-jet":.22,unknown:.34};static efficiencyOf(t){return Z.EFFICIENCY[t]}}class E{static EMISSION_INDEX_WATER=1.25;static COMBUSTION_HEAT=432e5;static AIR_HEAT_CAPACITY=1004;static MOLAR_MASS_RATIO=.622;static FT_TO_M=.3048;static TROPOPAUSE_M=11e3;static TROPOPAUSE_HPA=226.32;static ISOTHERMAL_SCALE_HEIGHT_M=6341.62;static pressureAtAltitudeFt(t){const e=t*E.FT_TO_M;return e<=E.TROPOPAUSE_M?1013.25*(1-225577e-10*e)**5.25588:E.TROPOPAUSE_HPA*Math.exp(-(e-E.TROPOPAUSE_M)/E.ISOTHERMAL_SCALE_HEIGHT_M)}static saturationOverWaterPa(t){const e=t+273.15;return Math.exp(54.842763-6763.22/e-4.21*Math.log(e)+367e-6*e+Math.tanh(.0415*(e-218.8))*(53.878-1331.22/e-9.44523*Math.log(e)+.014025*e))}static saturationOverIcePa(t){const e=t+273.15;return Math.exp(9.550426-5723.265/e+3.53068*Math.log(e)-.00728332*e)}static iceRelativeHumidity(t,e){return e*E.saturationOverWaterPa(t)/E.saturationOverIcePa(t)}static mixingSlope(t,e){return E.EMISSION_INDEX_WATER*E.AIR_HEAT_CAPACITY*t*100/(E.MOLAR_MASS_RATIO*E.COMBUSTION_HEAT*(1-e))}static criticalTemperatureC(t,e){const a=Math.log(E.mixingSlope(t,e)-.053);return-46.46+9.43*a+.72*a*a}static requiredHumidity(t,e,a){const n=E.criticalTemperatureC(t,e);return(E.mixingSlope(t,e)*(a-n)+E.saturationOverWaterPa(n))/E.saturationOverWaterPa(a)}static evaluate(t,e){const a=E.criticalTemperatureC(t.pressureHpa,e),n=E.requiredHumidity(t.pressureHpa,e,t.temperatureC),s=E.iceRelativeHumidity(t.temperatureC,t.relativeHumidity),c=t.temperatureC<a&&t.relativeHumidity>=n;return{forms:c,persistent:c&&s>=1,criticalTemperatureC:a,requiredHumidity:n,iceRelativeHumidity:s}}}class y{static HOLD_MS=36e5;static DEG=Math.PI/180;static GAS_CONSTANT_OVER_GRAVITY=287.05/9.80665;static at(t,e,a){if(t.length===0)return;const n=t[0],s=t[t.length-1];if(e<n.t-y.HOLD_MS||e>s.t+y.HOLD_MS)return;const c=t.findIndex(h=>h.t>e),i=c===0?t[0]:t[(c===-1?t.length:c)-1],r=c===-1||c===0?i:t[c],l=y.atLevel(i,a),o=y.atLevel(r,a);if(!l||!o)return;const d=r.t>i.t?Math.min(1,Math.max(0,(e-i.t)/(r.t-i.t))):0,u=(h,p)=>h+(p-h)*d;return{pressureHpa:a,temperatureC:u(l.temperatureC,o.temperatureC),relativeHumidity:u(l.relativeHumidity,o.relativeHumidity),driftEastMs:u(l.driftEastMs,o.driftEastMs),driftNorthMs:u(l.driftNorthMs,o.driftNorthMs),shearPerS:u(l.shearPerS,o.shearPerS)}}static atLevel(t,e){const a=t.levels;for(let n=0;n+1<a.length;n++){const s=a[n],c=a[n+1];if(e>s.pressureHpa||e<c.pressureHpa)continue;const i=(Math.log(s.pressureHpa)-Math.log(e))/(Math.log(s.pressureHpa)-Math.log(c.pressureHpa)),r=(h,p)=>h+(p-h)*i,l=h=>{const p=h.windFromDeg*y.DEG;return{east:-h.windSpeedMs*Math.sin(p),north:-h.windSpeedMs*Math.cos(p)}},o=l(s),d=l(c),u=y.GAS_CONSTANT_OVER_GRAVITY*((s.temperatureC+c.temperatureC)/2+273.15)*Math.log(s.pressureHpa/c.pressureHpa);return{pressureHpa:e,temperatureC:r(s.temperatureC,c.temperatureC),relativeHumidity:r(s.relativeHumidity,c.relativeHumidity),driftEastMs:r(o.east,d.east),driftNorthMs:r(o.north,d.north),shearPerS:Math.hypot(d.east-o.east,d.north-o.north)/u}}}}class H{static MIN_ALTITUDE_FT=2e4;static DENSE_MS=3e5;static SPARSE_STEP_MS=6e4;static SATURATION_HORIZON_MS=3*36e5;static SATURATION_STEP_MS=6e5;static PRESSURE_STEP_HPA=5;static plan(t,e,a,n){if(a.length===0)return[];const s=[],c=new Map,i=(r,l,o)=>{const d=Math.round(l/H.PRESSURE_STEP_HPA)*H.PRESSURE_STEP_HPA,u=H.SATURATION_STEP_MS,h=Math.floor(r/u)*u,p=`${d}|${h}`,m=c.get(p);if(m!==void 0)return m+(h-r)/1e3;let M=1/0;for(let f=u;f<=H.SATURATION_HORIZON_MS;f+=u){const I=y.at(a,h+f,d);if(!I)break;if(E.evaluate(I,o).iceRelativeHumidity<1){M=f/1e3;break}}return c.set(p,M),M+(h-r)/1e3};for(const r of t.objects){const l=t.flights.get(r.id),o=r.track;if(!l||!o||o.length!==l.points.length)continue;const d=e?.get(W.keyOf(l))??k.of(void 0),u=Z.efficiencyOf(d.kind);if(u===void 0)continue;const h=[];let p=-1/0;o.forEach((m,M)=>{if(m.t<-H.DENSE_MS&&M+1<o.length&&m.t-p<H.SPARSE_STEP_MS)return;p=m.t;const f=l.points[M],I=E.pressureAtAltitudeFt(f.altitudeFt),S=y.at(a,n+m.t,I),b=S&&E.evaluate(S,u);h.push({tMs:m.t,eastM:m.eastM,northM:m.northM,upM:m.altitudeM??0,forms:b?.forms??!1,persistent:b?.persistent??!1,lifetimeS:b?et.lifetimeS(b.iceRelativeHumidity):0,driftEastMs:S?.driftEastMs??0,driftNorthMs:S?.driftNorthMs??0,shearPerS:S?.shearPerS??et.TYPICAL_SHEAR_PER_S,iceRelativeHumidity:b?.iceRelativeHumidity??0,saturatedForS:b?.persistent?i(n+m.t,I,u):0})}),h.some((m,M)=>m.forms&&h[M+1]?.forms)&&s.push({id:r.id,spanM:d.spanM,points:h})}return s}}const dt=[500,400,300,250,200,150],Lt=["temperature","relative_humidity","wind_speed","wind_direction"],Ft="2022-01-01",pt=.25;class Gt{fetchImpl;baseUrl;cache=new Map;constructor(t={}){this.fetchImpl=t.fetchImpl??fetch.bind(globalThis),this.baseUrl=t.baseUrl??"https://historical-forecast-api.open-meteo.com/v1/forecast"}between(t,e,a){const n=new Date(e).toISOString().slice(0,10);if(n<Ft)return Promise.resolve({status:"outside"});const s=new Date(a).toISOString().slice(0,10),i=`${`${Math.round(t.lat/pt)},${Math.round(t.lng/pt)}`}|${n}|${s}`;let r=this.cache.get(i);return r||(r=this.read(t,n,s),this.cache.set(i,r),r.then(l=>{l.status==="failed"&&this.cache.delete(i)})),r}async read(t,e,a){const n=dt.flatMap(i=>Lt.map(r=>`${r}_${i}hPa`)),s=new URLSearchParams({latitude:String(t.lat),longitude:String(t.lng),start_date:e,end_date:a,hourly:n.join(","),wind_speed_unit:"ms",timezone:"UTC"}),c=`${this.baseUrl}?${s}`;try{const i=await this.fetchImpl(c);if(!i.ok)return{status:"failed"};const r=await i.json();return this.decode(r,{id:"open-meteo-forecast",name:"Open-Meteo (historical forecast)",url:c})}catch{return{status:"failed"}}}decode(t,e){const a=t.hourly;if(!a?.time)return{status:"outside"};const n=[];return a.time.forEach((s,c)=>{const i=[];for(const r of dt){const l=p=>a[`${p}_${r}hPa`]?.[c],o=l("temperature"),d=l("relative_humidity"),u=l("wind_speed"),h=l("wind_direction");if([o,d,u,h].some(p=>p==null))return;i.push({pressureHpa:r,temperatureC:o,relativeHumidity:d/100,windSpeedMs:u,windFromDeg:h})}n.push({t:Date.parse(`${s}Z`),levels:i})}),n.length>0?{status:"found",samples:n,source:e}:{status:"outside"}}}const zt=Q.point("upperAir").provide(Q.BUILT_IN,[{id:"open-meteo-forecast",name:"Open-Meteo (historical forecast)",credit:"Weather data by Open-Meteo.com, CC BY 4.0",creditUrl:"https://open-meteo.com/en/docs/historical-forecast-api",create:()=>new Gt}]);class C{static DEFAULT_KIND=K.DEFAULT_KIND;static STEP_MS=1e3;static LEAD_MS=12e4;static FT_PER_M=1/.3048;static ID_PREFIX="decor:";tracks=new Map;static kindOf(t,e){return K.kindOf(t,e)}static flies(t){return K.flies(t)}voices(t,e,a,n={},s=()=>{}){const c=t.event.place?.[0];if(!c)return[];const i=new Map,r=new Map,l=Math.max(t.observerTrack.duration,(t.event.durationSeconds??0)*1e3);for(const o of t.decor){const d=K.kindOf(o,s(o));if(!d)continue;const u=`${C.ID_PREFIX}${o.id}`;i.set(u,this.trackOf(o,u,c,l)),r.set(u,d)}for(const o of this.tracks.keys())i.has(o)||this.tracks.delete(o);return i.size===0?[]:D.voices(new Set(i.keys()),i,new Map,o=>String(o.icao),a,e,{...n,kindOf:o=>r.get(o)})}trackOf(t,e,a,n){const s=JSON.stringify([t.track,t.eastM,t.northM,t.headingDeg,a.lat,a.lng,n]),c=this.tracks.get(e);if(c?.key===s)return c.track;const i=[];for(let u=0;u<=n;u+=C.STEP_MS)i.push(C.pointAt(t,u,a));(i.length===0||i[i.length-1].t<n)&&i.push(C.pointAt(t,n,a));const r=i[0],l=i[1]??r,o=u=>(l[u]-r[u])/(l.t-r.t||1);for(let u=C.STEP_MS*10;u<=C.LEAD_MS;u+=C.STEP_MS*10)i.unshift({t:-u,lat:r.lat-o("lat")*u,lng:r.lng-o("lng")*u,altitudeFt:Math.max(0,r.altitudeFt-o("altitudeFt")*u)});const d={icao:C.hash(e),nonIcao:!0,points:i};return this.tracks.set(e,{key:s,track:d}),d}static pointAt(t,e,a){const n=Et(t,e),s=Y(n.eastM,-n.northM,a.lat,a.lng);return{t:e,lat:s.lat,lng:s.lng,altitudeFt:n.altitudeM*C.FT_PER_M}}static hash(t){let e=0;for(let a=0;a<t.length;a++)e=e*31+t.charCodeAt(a)>>>0;return e}}class X{static CABIN_DB_A={"airliner-wide":76,"airliner-narrow":78,"regional-jet":78,"business-jet":82,"regional-turboprop":84,"turboprop-light":88,"light-piston":92,"military-jet":95,ultralight:95,"helicopter-light":95,"helicopter-medium":96,"helicopter-heavy":98,glider:70,balloon:60};static DEFAULT_DB_A=78;static voice(t,e={}){const a=tt.aircraftOf(t);if(!a)return;const n=g.noiseOfKind(a),s=tt.insulationDb(t),c=n.soundPowerA.map((o,d)=>o-s[d]),i=A.sumDb(c),r=X.levelDbA(a,t?.noise),l=c.map(o=>o-i+r);return{id:"observer:cabin",kind:a,bandAmplitudes:D.bandAmplitudes(l,e.ambientDbA??0,e.referenceAmplitude),levelDbA:r,inside:!0,distanceKm:0,dopplerRatio:1,azimuthDeg:0,elevationDeg:0,character:n.character}}static levelDbA(t,e){return(X.CABIN_DB_A[t]??X.DEFAULT_DB_A)+20*Math.log10(Math.max(e??1,.01))}}class G{static STEP_MS=250;static FT_PER_M=1/.3048;static ID_PREFIX="body:";tracks=new Map;static noiseOf(t){const e=g.noiseOfKind(t.kind),a=t.quieterDb??0;return a===0?e:{...e,id:`${e.id}-${a}dB`,soundPowerA:e.soundPowerA.map(n=>n-a)}}voices(t,e,a,n,s,c,i={}){const r=new Map,l=new Map,o=new Map;for(const u of t){if(!u.sound)continue;const h=`${G.ID_PREFIX}${u.id}`,p=this.trackOf(u,h,e,n,c);p&&(r.set(h,p),l.set(h,u.sound.kind),o.set(h,G.noiseOf(u.sound)))}for(const u of this.tracks.keys())r.has(u)||this.tracks.delete(u);if(r.size===0)return[];const d=Y(a.eastM,-a.northM,n.lat,n.lng);return D.voices(new Set(r.keys()),r,new Map,u=>String(u.icao),{lat:d.lat,lng:d.lng,heightM:a.upM},s,{...i,kindOf:u=>l.get(u),noiseOf:u=>o.get(u)})}trackOf(t,e,a,n,s){const c=`${n.lat},${n.lng},${s}`,i=this.tracks.get(e);if(i&&i.body===t&&i.origin===c)return i.track;const r=[];for(let o=-12e4;o<=s;o+=G.STEP_MS){const d=a(t,o);if(!d)continue;const u=Y(d.eastM,-d.northM,n.lat,n.lng);r.push({t:o,lat:u.lat,lng:u.lng,altitudeFt:d.upM*G.FT_PER_M})}if(r.length<2)return;const l={icao:G.hash(e),nonIcao:!0,points:r};return this.tracks.set(e,{body:t,origin:c,track:l}),l}static hash(t){let e=0;for(let a=0;a<t.length;a++)e=e*31+t.charCodeAt(a)>>>0;return e}}export{J as AircraftAudio,H as AircraftContrails,k as AircraftModels,v as AmbientNoise,G as BodyHearing,X as CabinHearing,C as DecorAircraftHearing,R as TrafficDecor,Kt as TrafficInfos,D as TrafficSound,V as TrafficTooltip,zt as UPPER_AIR_SOURCES};
@@ -1 +0,0 @@
1
- const e={intro:"What the witness said the phenomenon was, in 3D: each body stands for one or more of the shapes drawn. Its movement comes from the file.",interpretationTitle:"Interpretation title",body:"Body",none:"No body yet: the witness said nothing of what it was, or it is still to be entered",deleteBody:"Delete body",addBody:"Add a body",addBodyHintView:"Where the witness is looking now",lookAtBody:"Look at it",addBodyHint:'Standing for the shape "{shape}", where the scene draws it now',model:"3D model",primitives:"Built-in shapes",catalogue:"Catalogue",modelAdvanced:"Model from an address",modelUrl:"glTF/GLB address",modelUrlHint:"Absolute, or relative to this sighting.json",modelTitle:"Model name",modelAuthor:"Author",modelLicense:"Licence",modelSource:"Where it came from",modelIncomplete:"Not drawn until the model's name and licence are given",modelFromCatalogue:"From the catalogue, which the recording names it by. Change a field and it becomes this recording's own address.",keyframes:"Keyframes",zoomHint:"Pinch, or Ctrl + wheel, to zoom; Shift + wheel to scroll",addKeyframe:"Add a keyframe at this instant",atPlayhead:"At {t}",modelFixed:"The model is chosen when the body is added: for another one, delete this body and add one with it",keyframeHere:"A keyframe stands here: editing changes it",keyframeAdded:"Editing adds a keyframe here",appearanceNote:"The colour and the albedo paint the built-in shapes; a model of its own keeps its materials. Light of its own is what it gives out, lit or not.",deleteKeyframe:"Delete this keyframe",pictureHint:"On the picture: drag the body to move it, the wheel takes it nearer or further, the corners and sides size it, the stem turns it (with Shift: up and down pitches it, sideways rolls it).",notPlaced:"Not in the scene at this instant",primitive:{ellipsoid:"Ellipsoid",sphere:"Sphere",disc:"Disc",cylinder:"Cylinder",cone:"Cone",box:"Box",torus:"Torus",figure:"Human figure"}};export{e as bodyEditorMessages_en};
@@ -1 +0,0 @@
1
- const e={intro:"Lo que el testigo dijo que era el fenómeno, en 3D: cada cuerpo representa una o varias de las formas dibujadas. Su movimiento viene del archivo.",interpretationTitle:"Título de la interpretación",body:"Cuerpo",none:"Aún no hay ningún cuerpo: el testigo no dijo nada de lo que era, o falta introducirlo",deleteBody:"Eliminar el cuerpo",addBody:"Añadir un cuerpo",addBodyHintView:"Donde mira el testigo en este momento",lookAtBody:"Mirarlo",addBodyHint:"Representando la forma «{shape}», donde la escena la dibuja en este momento",model:"Modelo 3D",primitives:"Formas básicas",catalogue:"Catálogo",modelAdvanced:"Modelo desde una dirección",modelUrl:"Dirección glTF/GLB",modelUrlHint:"Absoluta, o relativa a este sighting.json",modelTitle:"Nombre del modelo",modelAuthor:"Autor",modelLicense:"Licencia",modelSource:"Procedencia",modelIncomplete:"No se dibuja mientras falten el nombre y la licencia del modelo",modelFromCatalogue:"Del catálogo, por el que la grabación lo nombra. Cambia un campo y pasa a ser la dirección propia de esta grabación.",keyframes:"Fotogramas clave",zoomHint:"Pellizque, o Ctrl + rueda, para ampliar; Mayús + rueda para desplazar",addKeyframe:"Añadir un fotograma clave en este instante",atPlayhead:"En {t}",modelFixed:"El modelo se elige al añadir el cuerpo: para cambiarlo, elimine este cuerpo y añada otro con el nuevo modelo",keyframeHere:"Aquí hay un fotograma clave: editar lo modifica",keyframeAdded:"Editar añade aquí un fotograma clave",appearanceNote:"El color y el albedo pintan las formas básicas; un modelo propio conserva sus materiales. La luz propia es la que emite, esté iluminado o no.",deleteKeyframe:"Eliminar este fotograma clave",pictureHint:"En la imagen: arrastrar el cuerpo lo desplaza, la rueda lo acerca o lo aleja, las esquinas y los lados lo dimensionan, el vástago lo gira (con Mayús: arriba y abajo lo cabecean, los lados lo hacen alabear).",notPlaced:"No está en la escena en este instante",primitive:{ellipsoid:"Elipsoide",sphere:"Esfera",disc:"Disco",cylinder:"Cilindro",cone:"Cono",box:"Caja",torus:"Toro",figure:"Silueta humana"}};export{e as bodyEditorMessages_es};
@@ -1 +0,0 @@
1
- const e={intro:"Ce que le témoin a dit que le phénomène était, en 3D : chaque corps représente une ou plusieurs des formes dessinées. Son mouvement vient du fichier.",interpretationTitle:"Titre de l'interprétation",body:"Corps",none:"Aucun corps pour l'instant : le témoin n'a rien dit de ce que c'était, ou c'est encore à saisir",deleteBody:"Supprimer le corps",addBody:"Ajouter un corps",addBodyHintView:"Là où le témoin regarde à cet instant",lookAtBody:"Le regarder",addBodyHint:"Représentant la forme « {shape} », là où la scène la dessine à cet instant",model:"Modèle 3D",primitives:"Formes de base",catalogue:"Catalogue",modelAdvanced:"Modèle depuis une adresse",modelUrl:"Adresse glTF/GLB",modelUrlHint:"Absolue, ou relative à ce sighting.json",modelTitle:"Nom du modèle",modelAuthor:"Auteur",modelLicense:"Licence",modelSource:"Provenance",modelIncomplete:"Pas dessiné tant que le nom et la licence du modèle manquent",modelFromCatalogue:"Du catalogue, par lequel l'enregistrement le nomme. Modifiez un champ et il devient l'adresse propre à cet enregistrement.",keyframes:"Images clés",zoomHint:"Pincez, ou Ctrl + molette, pour zoomer ; Maj + molette pour défiler",addKeyframe:"Ajouter une image clé à cet instant",atPlayhead:"À {t}",modelFixed:"Le modèle se choisit à l'ajout du corps : pour en changer, supprimez ce corps et ajoutez-en un avec l'autre modèle",keyframeHere:"Une image clé est ici : l'éditer la modifie",keyframeAdded:"Éditer ajoute une image clé ici",appearanceNote:"La couleur et l'albédo peignent les formes de base ; un modèle garde ses propres matériaux. La lumière propre est ce qu'il émet, éclairé ou non.",deleteKeyframe:"Supprimer cette image clé",pictureHint:"Sur l'image : glisser le corps le déplace, la molette le rapproche ou l'éloigne, les coins et les côtés le dimensionnent, la tige le tourne (avec Maj : haut et bas le cabrent, les côtés le font rouler).",notPlaced:"Pas dans la scène à cet instant",primitive:{ellipsoid:"Ellipsoïde",sphere:"Sphère",disc:"Disque",cylinder:"Cylindre",cone:"Cône",box:"Boîte",torus:"Tore",figure:"Silhouette humaine"}};export{e as bodyEditorMessages_fr};
@@ -1 +0,0 @@
1
- const o={intro:"Ciò che il testimone ha detto che era il fenomeno, in 3D: ogni corpo rappresenta una o più delle forme disegnate. Il suo movimento viene dal file.",interpretationTitle:"Titolo dell'interpretazione",body:"Corpo",none:"Ancora nessun corpo: il testimone non ha detto nulla di ciò che era, o è ancora da inserire",deleteBody:"Elimina il corpo",addBody:"Aggiungi un corpo",addBodyHintView:"Dove guarda il testimone in questo momento",lookAtBody:"Guardalo",addBodyHint:"In rappresentanza della forma «{shape}», dove la scena la disegna in questo momento",model:"Modello 3D",primitives:"Forme di base",catalogue:"Catalogo",modelAdvanced:"Modello da un indirizzo",modelUrl:"Indirizzo glTF/GLB",modelUrlHint:"Assoluto, o relativo a questo sighting.json",modelTitle:"Nome del modello",modelAuthor:"Autore",modelLicense:"Licenza",modelSource:"Provenienza",modelIncomplete:"Non disegnato finché mancano il nome e la licenza del modello",modelFromCatalogue:"Dal catalogo, con cui la registrazione lo nomina. Modifica un campo e diventa l'indirizzo proprio di questa registrazione.",keyframes:"Fotogrammi chiave",zoomHint:"Pizzicate, o Ctrl + rotella, per ingrandire; Maiusc + rotella per scorrere",addKeyframe:"Aggiungi un fotogramma chiave a questo istante",atPlayhead:"A {t}",modelFixed:"Il modello si sceglie quando si aggiunge il corpo: per cambiarlo, elimina questo corpo e aggiungine uno con l'altro modello",keyframeHere:"Qui c'è un fotogramma chiave: modificarlo lo cambia",keyframeAdded:"Modificare aggiunge qui un fotogramma chiave",appearanceNote:"Il colore e l'albedo dipingono le forme di base; un modello proprio conserva i suoi materiali. La luce propria è quella che emette, illuminato o no.",deleteKeyframe:"Elimina questo fotogramma chiave",pictureHint:"Sull'immagine: trascinare il corpo lo sposta, la rotellina lo avvicina o lo allontana, gli angoli e i lati lo dimensionano, lo stelo lo ruota (con Maiusc: su e giù lo fanno beccheggiare, i lati lo fanno rollare).",notPlaced:"Non è nella scena in questo istante",primitive:{ellipsoid:"Ellissoide",sphere:"Sfera",disc:"Disco",cylinder:"Cilindro",cone:"Cono",box:"Scatola",torus:"Toro",figure:"Sagoma umana"}};export{o as bodyEditorMessages_it};
@@ -1 +0,0 @@
1
- const e={event:"Event",accountOf:"Observation of",passagesHeading:"Reported in",interviewOf:"Interview of",untitledInterview:"Interview {n}",deleteInterviewQuestion:"Delete this interview from the case? Nothing is written until the case is saved.",untitledReading:"Reading {n}",eventsInTime:"Events · in the order of time",citedMoment:"Moment {k}, quoted in {title}: “{quote}”",backToInterview:"Back to the interview",openEvent:"Open",previousEvent:"Previous event",nextEvent:"Next event",kindObservations:"Observations",kindReadings:"Readings",kindInterviews:"Interviews",linkAnd:"and",byAuthor:"by",kindReading:"Reading",readingsCount:"{n} reading(s)",readingVerdict:{incompatible:"Contradicts what is established",unsettled:"Not settled",compatible:"Compatible"},findingOutcome:{holds:"Holds",fails:"Fails",untested:"Could not be tested"},findingAgainst:{established:"against what is established",supposed:"against a supposition"},untitledObservation:"Observation {n}",deleteRecording:"Delete this recording from the case",cloneEvent:"Copy this event: the copy is what you carry on with",freezeEvent:"Freeze this event, so that work resting on it stays true",unfreezeEvent:"Thaw this event, to edit it again",sealedChip:"Frozen",deleteFrozen:"Frozen: thaw it to delete it",frozenNote:"This event is frozen: nothing can be edited in it, so that an interview or a hypothesis resting on it is not invalidated. Copy it to carry on, or thaw it.",thawButton:"Thaw",deleteReadingQuestion:"Delete this reading? Nothing is written until the case is saved.",deleteObservationQuestion:"Delete this observation from the case? Nothing is written until the case is saved.",deleteRefused:"This observation is interpreted by {n} reading(s): delete them first.",titleField:"Title of the interpretation",authorField:"Author",addTitle:"Add an event",kindField:"Type",kindObservation:"Observation",kindInterview:"Interview",witnessField:"Witness",mediumField:"Medium",interviewerField:"Interviewer",plainTitleField:"Title",sourceField:"Source",sourceBlank:"A blank recording",sourceFile:"An existing recording",observerField:"Witness",fileField:"File",loadFailed:"That recording could not be read.",isACase:"That is a case, not a recording.",ok:"OK",cancel:"Cancel",caseHeading:"Case",caseId:"ID",recordingId:"ID",idTaken:"Another recording of the case has this ID.",idInvalid:"An ID is made of letters, digits, hyphens and underscores, and starts with a letter or a digit.",idNeeded:"A reading names this recording by its ID: it cannot be left empty.",idDuplicated:"Two events of the case have the ID “{id}”: a reading that names it is ambiguous.",readingUnresolved:"A reading names “{id}”, which no event of the case has as its ID, nor any recording it lists.",caseTitle:"Title",caseTime:"When",eventsTab:"Events",fileTab:"File",importFile:"Load case file",inputFileFromFile:"from your disk",inputFileFromUrl:"from an address",inputFileModeHint:"Click to give it the other way: a file of yours, or an address",inputFileLoad:"Load",fileNotACase:"That file is not a case (it has no events).",formatVersionError:"This file states version {found} of its format; this UFO@home reads up to version {supported}. Open it with a newer UFO@home.",fileInvalid:"This text is not valid JSON yet, or not a case: the case keeps what it last understood.",fileLoading:"Loading the editor…",add:"Add",addHint:"Add an event",interpretationOf:"Interpretation of",colon:": ",quoted:"“{text}”",interpretationOfNone:"—",exportButton:"Save",exportTitle:"Save the case",exportAlso:"Also save the observations",addToCase:"Add to a case",unsavedChanges:"Changes not saved",discardQuestion:"Some changes are not saved yet. Load anyway and lose them?",discardTitle:"Unsaved changes",discardOk:"Load anyway",leaveQuestion:"Some changes are not saved yet. Leave anyway and lose them?",leaveOk:"Leave anyway"};export{e as caseEditorMessages_en};
@@ -1 +0,0 @@
1
- const e={event:"Evento",accountOf:"Observación de",passagesHeading:"Relatado en",interviewOf:"Entrevista a",untitledInterview:"Entrevista {n}",deleteInterviewQuestion:"¿Eliminar esta entrevista del caso? Nada se escribe hasta guardar el caso.",untitledReading:"Lectura {n}",eventsInTime:"Eventos · en orden cronológico",citedMoment:"Momento {k}, citado en {title}: «{quote}»",backToInterview:"Volver a la entrevista",openEvent:"Abrir",previousEvent:"Evento anterior",nextEvent:"Evento siguiente",kindObservations:"Observaciones",kindReadings:"Lecturas",kindInterviews:"Entrevistas",linkAnd:"y",byAuthor:"por",kindReading:"Lectura",readingsCount:"{n} lectura(s)",readingVerdict:{incompatible:"Contradice lo establecido",unsettled:"Sin resolver",compatible:"Compatible"},findingOutcome:{holds:"Se sostiene",fails:"Falla",untested:"No se pudo probar"},findingAgainst:{established:"contra un elemento establecido",supposed:"contra una suposición"},untitledObservation:"Observación {n}",deleteRecording:"Quitar esta grabación del caso",cloneEvent:"Clonar este evento: el clon es lo que continúas",freezeEvent:"Congelar este evento, para que lo que se apoya en él siga siendo cierto",unfreezeEvent:"Descongelar este evento, para volver a editarlo",sealedChip:"Congelado",deleteFrozen:"Congelado: descongélalo para quitarlo",frozenNote:"Este evento está congelado: nada se edita en él, para que una entrevista o una hipótesis que se apoye en él no quede invalidada. Clónalo para continuar, o descongélalo.",thawButton:"Descongelar",deleteReadingQuestion:"¿Eliminar esta lectura? Nada se escribe hasta guardar el caso.",deleteObservationQuestion:"¿Eliminar esta observación del caso? Nada se escribe hasta guardar el caso.",deleteRefused:"Esta observación es interpretada por {n} lectura(s): elimínelas primero.",titleField:"Título de la interpretación",authorField:"Autor",addTitle:"Añadir un evento",kindField:"Tipo",kindObservation:"Observación",kindInterview:"Entrevista",witnessField:"Testigo",mediumField:"Medio",interviewerField:"Entrevistador",plainTitleField:"Título",sourceField:"Origen",sourceBlank:"Una grabación en blanco",sourceFile:"Un registro existente",observerField:"Testigo",fileField:"Archivo",loadFailed:"No se pudo leer esa grabación.",isACase:"Eso es un caso, no una grabación.",ok:"Aceptar",cancel:"Cancelar",caseHeading:"Caso",caseId:"Identificador",recordingId:"Identificador",idTaken:"Otra grabación del caso tiene este identificador.",idInvalid:"Un identificador se compone de letras, dígitos, guiones y guiones bajos, y empieza por una letra o un dígito.",idNeeded:"Una interpretación designa esta grabación por su identificador: no puede quedar vacío.",idDuplicated:"Dos eventos del caso tienen el identificador «{id}»: una interpretación que lo designa es ambigua.",readingUnresolved:"Una interpretación designa «{id}», que ningún evento del caso tiene como identificador, ni ninguna grabación que enumera.",caseTitle:"Título",caseTime:"Fecha",eventsTab:"Eventos",fileTab:"Archivo",importFile:"Cargar un archivo de caso",inputFileFromFile:"desde su disco",inputFileFromUrl:"desde una dirección",inputFileModeHint:"Pulsar para darlo de la otra forma: un archivo suyo o una dirección",inputFileLoad:"Cargar",fileNotACase:"Ese archivo no es un caso (no tiene eventos).",formatVersionError:"Este archivo indica la versión {found} de su formato; este UFO@home lee hasta la versión {supported}. Ábralo con un UFO@home más reciente.",fileInvalid:"Este texto aún no es JSON válido, o no es un caso: el caso conserva lo último que entendió.",fileLoading:"Cargando el editor…",add:"Añadir",addHint:"Añadir un evento",interpretationOf:"Interpretación de",colon:": ",quoted:"«{text}»",interpretationOfNone:"—",exportButton:"Guardar",exportTitle:"Guardar el caso",exportAlso:"Guardar también las observaciones",addToCase:"Añadir a un caso",unsavedChanges:"Cambios sin guardar",discardQuestion:"Hay cambios que aún no se han guardado. ¿Cargar de todos modos y perderlos?",discardTitle:"Cambios sin guardar",discardOk:"Cargar de todos modos",leaveQuestion:"Hay cambios que aún no se han guardado. ¿Salir de todos modos y perderlos?",leaveOk:"Salir de todos modos"};export{e as caseEditorMessages_es};
@@ -1 +0,0 @@
1
- const e={event:"Événement",accountOf:"Observation de",passagesHeading:"Relaté dans",interviewOf:"Interview de",untitledInterview:"Interview {n}",deleteInterviewQuestion:"Supprimer cet entretien du dossier ? Rien n'est écrit avant la sauvegarde du dossier.",untitledReading:"Lecture {n}",eventsInTime:"Événements · dans l'ordre du temps",citedMoment:"Moment {k}, cité dans {title} : « {quote} »",backToInterview:"Revenir à l'entretien",openEvent:"Ouvrir",previousEvent:"Événement précédent",nextEvent:"Événement suivant",kindObservations:"Observations",kindReadings:"Lectures",kindInterviews:"Interviews",linkAnd:"et",byAuthor:"par",kindReading:"Lecture",readingsCount:"{n} lecture(s)",readingVerdict:{incompatible:"Contredit ce qui est établi",unsettled:"Non tranchée",compatible:"Compatible"},findingOutcome:{holds:"Tient",fails:"Échoue",untested:"Non testable"},findingAgainst:{established:"contre un élément établi",supposed:"contre une supposition"},untitledObservation:"Observation {n}",deleteRecording:"Retirer cet enregistrement du dossier",cloneEvent:"Cloner cet événement : c'est le clone que vous continuez",freezeEvent:"Geler cet événement, pour que ce qui s'appuie dessus reste vrai",unfreezeEvent:"Dégeler cet événement, pour le modifier à nouveau",sealedChip:"Gelé",deleteFrozen:"Gelé : le dégeler pour le retirer",frozenNote:"Cet événement est gelé : rien ne s'y modifie, afin qu'une interview ou une hypothèse qui s'appuie dessus ne soit pas invalidée. Clonez-le pour continuer, ou dégelez-le.",thawButton:"Dégeler",deleteReadingQuestion:"Supprimer cette lecture ? Rien n'est écrit avant la sauvegarde du dossier.",deleteObservationQuestion:"Supprimer cette observation du dossier ? Rien n'est écrit avant la sauvegarde du dossier.",deleteRefused:"Cette observation est interprétée par {n} lecture(s) : supprimez-les d'abord.",titleField:"Titre de l'interprétation",authorField:"Auteur",addTitle:"Ajouter un événement",kindField:"Type",kindObservation:"Observation",kindInterview:"Interview",witnessField:"Témoin",mediumField:"Moyen",interviewerField:"Enquêteur",plainTitleField:"Titre",sourceField:"Source",sourceBlank:"Un enregistrement vierge",sourceFile:"Un enregistrement existant",observerField:"Témoin",fileField:"Fichier",loadFailed:"Cet enregistrement n'a pas pu être lu.",isACase:"C'est un dossier, pas un enregistrement.",ok:"OK",cancel:"Annuler",caseHeading:"Dossier",caseId:"Identifiant",recordingId:"Identifiant",idTaken:"Un autre enregistrement du dossier porte cet identifiant.",idInvalid:"Un identifiant est fait de lettres, de chiffres, de tirets et de soulignés, et commence par une lettre ou un chiffre.",idNeeded:"Une interprétation désigne cet enregistrement par son identifiant : il ne peut pas rester vide.",idDuplicated:"Deux événements du dossier portent l'identifiant « {id} » : une interprétation qui le désigne est ambiguë.",readingUnresolved:"Une interprétation désigne « {id} », qu'aucun événement du dossier ne porte comme identifiant, ni aucun enregistrement qu'il liste.",caseTitle:"Titre",caseTime:"Date",eventsTab:"Événements",fileTab:"Fichier",importFile:"Charger un fichier de dossier",inputFileFromFile:"depuis votre disque",inputFileFromUrl:"depuis une adresse",inputFileModeHint:"Cliquer pour le donner autrement : un fichier à vous, ou une adresse",inputFileLoad:"Charger",fileNotACase:"Ce fichier n'est pas un dossier (il n'a pas d'événements).",formatVersionError:"Ce fichier indique la version {found} de son format ; cet UFO@home lit jusqu'à la version {supported}. Ouvrez-le avec un UFO@home plus récent.",fileInvalid:"Ce texte n'est pas encore du JSON valide, ou pas un dossier : le dossier garde ce qu'il a compris en dernier.",fileLoading:"Chargement de l'éditeur…",add:"Ajouter",addHint:"Ajouter un événement",interpretationOf:"Interprétation de",colon:" : ",quoted:"« {text} »",interpretationOfNone:"—",exportButton:"Sauver",exportTitle:"Sauver le dossier",exportAlso:"Sauver aussi les observations",addToCase:"Ajouter à un dossier",unsavedChanges:"Modifications non sauvées",discardQuestion:"Des modifications ne sont pas encore sauvées. Charger quand même et les perdre ?",discardTitle:"Modifications non sauvées",discardOk:"Charger quand même",leaveQuestion:"Des modifications ne sont pas encore sauvées. Quitter quand même et les perdre ?",leaveOk:"Quitter quand même"};export{e as caseEditorMessages_fr};
@@ -1 +0,0 @@
1
- const e={event:"Evento",accountOf:"Osservazione di",passagesHeading:"Riportato in",interviewOf:"Intervista a",untitledInterview:"Intervista {n}",deleteInterviewQuestion:"Eliminare questa intervista dal caso? Nulla viene scritto prima del salvataggio del caso.",untitledReading:"Lettura {n}",eventsInTime:"Eventi · in ordine di tempo",citedMoment:"Momento {k}, citato in {title}: «{quote}»",backToInterview:"Torna all'intervista",openEvent:"Apri",previousEvent:"Evento precedente",nextEvent:"Evento successivo",kindObservations:"Osservazioni",kindReadings:"Letture",kindInterviews:"Interviste",linkAnd:"e",byAuthor:"di",kindReading:"Lettura",readingsCount:"{n} lettura/e",readingVerdict:{incompatible:"Contraddice ciò che è accertato",unsettled:"Non decisa",compatible:"Compatibile"},findingOutcome:{holds:"Regge",fails:"Fallisce",untested:"Non verificabile"},findingAgainst:{established:"contro un elemento accertato",supposed:"contro una supposizione"},untitledObservation:"Osservazione {n}",deleteRecording:"Togliere questa registrazione dal caso",cloneEvent:"Clonare questo evento: è il clone che continui",freezeEvent:"Congelare questo evento, perché ciò che si basa su di esso resti vero",unfreezeEvent:"Scongelare questo evento, per modificarlo di nuovo",sealedChip:"Congelato",deleteFrozen:"Congelato: scongelalo per toglierlo",frozenNote:"Questo evento è congelato: nulla vi si modifica, perché un'intervista o un'ipotesi che si basa su di esso non sia invalidata. Clonalo per continuare, o scongelalo.",thawButton:"Scongelare",deleteReadingQuestion:"Eliminare questa lettura? Nulla viene scritto prima del salvataggio del caso.",deleteObservationQuestion:"Eliminare questa osservazione dal caso? Nulla viene scritto prima del salvataggio del caso.",deleteRefused:"Questa osservazione è interpretata da {n} lettura/e: eliminale prima.",titleField:"Titolo dell'interpretazione",authorField:"Autore",addTitle:"Aggiungi un evento",kindField:"Tipo",kindObservation:"Osservazione",kindInterview:"Intervista",witnessField:"Testimone",mediumField:"Mezzo",interviewerField:"Intervistatore",plainTitleField:"Titolo",sourceField:"Origine",sourceBlank:"Una registrazione vuota",sourceFile:"Una registrazione esistente",observerField:"Testimone",fileField:"File",loadFailed:"Impossibile leggere quella registrazione.",isACase:"Questo è un caso, non una registrazione.",ok:"OK",cancel:"Annulla",caseHeading:"Caso",caseId:"Identificativo",recordingId:"Identificativo",idTaken:"Un'altra registrazione del caso ha questo identificativo.",idInvalid:"Un identificativo è fatto di lettere, cifre, trattini e trattini bassi, e inizia con una lettera o una cifra.",idNeeded:"Un'interpretazione designa questa registrazione con il suo identificativo: non può restare vuoto.",idDuplicated:"Due eventi del caso hanno l'identificativo «{id}»: un'interpretazione che lo designa è ambigua.",readingUnresolved:"Un'interpretazione designa «{id}», che nessun evento del caso ha come identificativo, né alcuna registrazione che elenca.",caseTitle:"Titolo",caseTime:"Data",eventsTab:"Eventi",fileTab:"File",importFile:"Carica un file di caso",inputFileFromFile:"dal proprio disco",inputFileFromUrl:"da un indirizzo",inputFileModeHint:"Fare clic per darlo nell'altro modo: un proprio file o un indirizzo",inputFileLoad:"Carica",fileNotACase:"Quel file non è un caso (non ha eventi).",formatVersionError:"Questo file indica la versione {found} del suo formato; questo UFO@home legge fino alla versione {supported}. Lo apra con un UFO@home più recente.",fileInvalid:"Questo testo non è ancora JSON valido, o non è un caso: il caso conserva l'ultimo che ha capito.",fileLoading:"Caricamento dell'editor…",add:"Aggiungi",addHint:"Aggiungi un evento",interpretationOf:"Interpretazione di",colon:": ",quoted:"«{text}»",interpretationOfNone:"—",exportButton:"Salva",exportTitle:"Salva il caso",exportAlso:"Salva anche le osservazioni",addToCase:"Aggiungi a un caso",unsavedChanges:"Modifiche non salvate",discardQuestion:"Alcune modifiche non sono ancora state salvate. Caricare comunque e perderle?",discardTitle:"Modifiche non salvate",discardOk:"Carica comunque",leaveQuestion:"Alcune modifiche non sono ancora state salvate. Uscire comunque e perderle?",leaveOk:"Esci comunque"};export{e as caseEditorMessages_it};
@@ -1 +0,0 @@
1
- import{y,B as v,z as k}from"./rr0-sighting-editor.mjs";const b=Math.PI/180;class l{static SIGHT_LINE_M=5e3;static FLAT={heightAt:()=>0};static of(n,t,e){return[...l.observer(n,t),...l.sightLines(n,t,e),...l.bodies(n,t,e),...l.traces(n,t,e)]}static observer(n,t){const e=[];for(const r of n.observerTrack.allKeyframes){const s=y(n,r.t);if(s?.lat===void 0||s.lng===void 0)continue;const d=s.elevationM??0;e.push({t:r.t,at:{lat:s.lat,lng:s.lng,altM:d+v.EYE_HEIGHT_M},...s.headingDeg===void 0?{}:{headingDeg:s.headingDeg},elevationM:d})}if(e.length===0)return[];const o=e[0],a=[{group:"observer",groupName:t.folderObserver,name:l.fill(t.observerPoint,{s:l.seconds(o.t)}),note:l.fill(t.observerNote,{elevation:l.round(o.elevationM,1),heading:o.headingDeg===void 0?"—":l.round(o.headingDeg,0)}),kind:"point",points:[o.at],heights:"observer-ground"}];return e.some(r=>r.at.lat!==o.at.lat||r.at.lng!==o.at.lng)&&a.push({group:"observer",groupName:t.folderObserver,name:t.observerPath,kind:"line",points:e.map(r=>r.at),heights:"observer-ground"}),a}static sightLines(n,t,e){const o=[];for(const a of n.timeline.allKeyframes){const i=y(n,a.t);if(i?.lat===void 0||i.lng===void 0)continue;const r={lat:i.lat,lng:i.lng,altM:(i.elevationM??0)+v.EYE_HEIGHT_M};for(const s of a.shapes){const d=s.shape.aim;d&&o.push({group:"sight-line",groupName:t.folderSightLines,name:l.fill(t.sightLine,{what:l.nameOf(e.read(s.shape.title),s.sourceId,t),s:l.seconds(a.t)}),note:l.fill(t.sightLineNote,{azimuth:l.round(d.azimuthDeg,1),altitude:l.round(d.altitudeDeg,1),km:l.round(l.SIGHT_LINE_M/1e3,0)}),kind:"line",points:[r,l.along(r,d.azimuthDeg,d.altitudeDeg)],heights:"observer-ground"})}}return o}static along(n,t,e){const o=l.SIGHT_LINE_M*Math.cos(e*b),a=k.toGeo({eastM:Math.sin(t*b)*o,northM:Math.cos(t*b)*o},n);return{lat:a.lat,lng:a.lng,altM:n.altM+l.SIGHT_LINE_M*Math.sin(e*b)}}static bodies(n,t,e){const o=n.interpretation?.bodies??[],a=y(n,0);if(o.length===0||a?.lat===void 0||a.lng===void 0)return[];const i={lat:a.lat,lng:a.lng},r=[];for(const s of o){const d=new v(s,l.FLAT,h=>v.eyeOf(n,h,l.FLAT)),f=[];for(const h of[...s.track].sort((c,m)=>c.t-m.t)){const c=d.at(h.t);if(!c)continue;const m=k.toGeo({eastM:c.eastM,northM:c.northM},i),u={lat:m.lat,lng:m.lng,altM:c.upM},M=f[f.length-1];M&&M.lat===u.lat&&M.lng===u.lng&&M.altM===u.altM||f.push(u)}if(f.length===0)continue;const I=l.nameOf(e.read(s.title),s.id,t);r.push({group:"body",groupName:t.folderBodies,name:l.fill(f.length===1?t.bodyPoint:t.bodyPath,{what:I}),note:t.bodyNote,kind:f.length===1?"point":"line",points:f,heights:"observer-ground"})}return r}static traces(n,t,e){return n.traces.map(o=>({group:"trace",groupName:t.folderTraces,name:e.read(o.title)??o.id,...e.read(o.source)?{note:e.read(o.source)}:{},kind:o.kind,points:o.points.map(a=>({lat:a.lat,lng:a.lng,altM:a.altM??0})),heights:o.altitude??"ground",...o.color?{color:o.color}:{}}))}static nameOf(n,t,e){return n&&n.trim()?n.trim():l.fill(e.unnamed,{id:t})}static seconds(n){return l.round(n/1e3,1)}static round(n,t){const e=10**t;return String(Math.round(n*e)/e)}static fill(n,t){return Object.entries(t).reduce((e,[o,a])=>e.replaceAll(`{${o}}`,a),n)}}export{l as G};
@@ -1,9 +0,0 @@
1
- import{o as d,_ as l,ap as o,aq as u,K as m,N as g,L as f,G as y,ar as T,R as b,X as A}from"./rr0-sighting-editor.mjs";import{S as E}from"./SkyEventEditorStyle-CvY_AhbI.js";const w=d.catalog({en:()=>l(()=>import("./LanternParameterTexts_en-CcnGd8UH.js"),[],import.meta.url).then(a=>a.lanternParameterTexts_en),fr:()=>l(()=>import("./LanternParameterTexts_fr-P2JwYOUy.js"),[],import.meta.url).then(a=>a.lanternParameterTexts_fr),es:()=>l(()=>import("./LanternParameterTexts_es-CUTgNutZ.js"),[],import.meta.url).then(a=>a.lanternParameterTexts_es),it:()=>l(()=>import("./LanternParameterTexts_it-CzNnIUrX.js"),[],import.meta.url).then(a=>a.lanternParameterTexts_it)});class i{static RELEASE="letGo";static LANTERNS="lanterns";static AIR="air";static LANTERN="eachLantern";static instant(e,t,n){return{type:"number",key:e,min:-36e3,max:36e3,step:1,unit:"s",scale:.001,required:!0,label:t,hint:n,group:i.LANTERNS}}static wind(e,t,n,s){return[{type:"number",key:`${e}.towardDeg`,min:0,max:360,step:1,unit:"°",group:i.AIR,hint:s,label:t},{type:"number",key:`${e}.speedMS`,min:0,max:60,step:.1,unit:"m/s",group:i.AIR,label:n}]}static SET={kind:"lantern",title:"skyLanterns",parameters:[{type:"said",key:"title",label:"name",group:i.RELEASE},{type:"position",key:"site.eastM",secondKey:"site.northM",saidKey:"site.saidPosition",native:"local",step:1,rangeM:1e5,group:i.RELEASE,label:"whereTheyAreLetGo",hint:"whereTheyAreLetGoFrom"},{type:"number",key:"site.altitudeM",min:-1e3,max:5e3,step:.1,unit:"m",group:i.RELEASE,effective:()=>0,label:"heightAboveThePlaceSGround",hint:"aGardenOnAHillAbove"},{type:"number",key:"site.originElevationM",min:-500,max:6e3,step:1,unit:"m",group:i.RELEASE,effective:()=>0,label:"thePlaceSGroundAboveThe",hint:"whatSetsHowThinTheAir"},{type:"number",key:"group.count",min:1,max:200,step:1,required:!0,group:i.LANTERNS,label:"howMany"},i.instant("group.fromT","firstLetGoAt","secondsOfTheRecordingBeforeIts"),i.instant("group.untilT","lastLetGoAt","secondsOfTheRecordingTheOthers"),{type:"number",key:"group.radiusM",min:0,max:5e3,step:1,unit:"m",group:i.LANTERNS,effective:()=>20,label:"letGoWithin",hint:"aCrowdLetsThemGoA"},{type:"number",key:"group.burnS.min",min:10,max:3600,step:1,unit:"s",group:i.LANTERNS,effective:()=>480,label:"burnsAtLeast",hint:"howLongEachBurnsFromWhen"},{type:"number",key:"group.burnS.max",min:10,max:3600,step:1,unit:"s",group:i.LANTERNS,effective:()=>900,label:"burnsAtMost"},{type:"number",key:"group.insideExcessK.min",min:10,max:400,step:1,unit:"K",group:i.LANTERNS,effective:()=>125,label:"hotterThanTheAirAtLeast",hint:"howMuchHotterThanTheAir"},{type:"number",key:"group.insideExcessK.max",min:10,max:400,step:1,unit:"K",group:i.LANTERNS,effective:()=>175,label:"hotterThanTheAirAtMost"},{type:"number",key:"group.burnedS",min:0,max:3600,step:1,unit:"s",group:i.LANTERNS,effective:()=>0,label:"alreadyBurntWhenLetGo",hint:"forLanternsTheAccountOnlyHas"},{type:"number",key:"group.seed",min:0,max:4294967295,step:1,group:i.LANTERNS,effective:()=>1,label:"draw",hint:"whatTheDrawsStartFromAnother"},{type:"set",key:"group.explains",group:i.LANTERNS,label:"standForTheShapes",options:(e,t)=>{const n=t?.shapes??[],s=(e.group?.explains??[]).filter(r=>!n.some(h=>h.value===r));return[...n,...s.map(r=>({value:r,label:r}))]},empty:"noShape"},...i.wind("wind","windAtTheGroundTowards","windAtTheGroundSpeed","whereItBlowsTowardsWhichIs"),...i.wind("windAloft","windAloftTowards","windAloftSpeed","theWindHigherUpBlendedWith"),{type:"number",key:"windAloft.atM",min:10,max:1e4,step:10,unit:"m",group:i.AIR,label:"windAloftAt",hint:"metresAboveWhereTheyAreLet"},{type:"number",key:"airTemperatureC",min:-60,max:50,step:.5,unit:"°C",group:i.AIR,effective:()=>10,label:"airTemperature",hint:"atTheGroundFallingBy6"},{type:"number",key:"turbulence.horizontalMS",min:0,max:10,step:.1,unit:"m/s",group:i.AIR,effective:()=>o.TURBULENCE.horizontalMS,label:"gustsAcross",hint:"howFarTheAirSSpeed"},{type:"number",key:"turbulence.verticalMS",min:0,max:10,step:.1,unit:"m/s",group:i.AIR,effective:()=>o.TURBULENCE.verticalMS,label:"gustsUpAndDown"},{type:"number",key:"turbulence.timescaleS",min:1,max:600,step:1,unit:"s",group:i.AIR,effective:()=>o.TURBULENCE.timescaleS,label:"aGustLasts"},{type:"number",key:"lantern.luminousIntensityCd",min:.1,max:1e3,step:.1,unit:"cd",group:i.LANTERN,effective:()=>o.COMMON.luminousIntensityCd,label:"light",hint:"itsFlameSLightThroughThe"},{type:"choice",key:"lantern.shape",group:i.LANTERN,effective:()=>o.COMMON.shape,label:"shape",choices:[{value:"classic",label:"roundAtTheMouthSquareAt"},{value:"balloon",label:"balloonLobedTop"}]},{type:"colour",key:"lantern.paperColor",group:i.LANTERN,fallback:o.COMMON.paperColor,label:"paperColour",hint:"whatItLooksLikeByDay"},{type:"colour",key:"lantern.color",group:i.LANTERN,fallback:o.COMMON.color,label:"flameLight",hint:"itsFlameSLightThroughWhite"},{type:"number",key:"lantern.envelopeVolumeM3",min:.01,max:10,step:.01,unit:"m³",group:i.LANTERN,effective:()=>o.COMMON.envelopeVolumeM3,label:"airItHolds"},{type:"number",key:"lantern.massKg",min:.005,max:5,step:.001,unit:"kg",group:i.LANTERN,effective:()=>o.COMMON.massKg,label:"weightWhenLetGo"}]};static publish(){u.publish(i.SET)}}const v=d.catalog({en:()=>l(()=>import("./LanternEditorMessages_en-DaT3UNfD.js"),[],import.meta.url).then(a=>a.lanternEditorMessages_en),fr:()=>l(()=>import("./LanternEditorMessages_fr-9mByTFMG.js"),[],import.meta.url).then(a=>a.lanternEditorMessages_fr),es:()=>l(()=>import("./LanternEditorMessages_es-TDV5lKeJ.js"),[],import.meta.url).then(a=>a.lanternEditorMessages_es),it:()=>l(()=>import("./LanternEditorMessages_it-MRkJnDQp.js"),[],import.meta.url).then(a=>a.lanternEditorMessages_it)});class p{constructor(e,t,n){this.container=e,this.host=t,E.attach(e,"lantern-editor-part",p.STYLE),this.language=n,u.of("lantern")||i.publish(),this.ready=this.setLanguage(n)}messages;ready;parameterTexts;languageToken=0;currentId;form;list;language;shown=[];static STYLE='.lantern-editor-part { flex-basis: 100%; min-width: 0; } .lantern-editor-part #lantern-list { flex-basis: 100%; min-width: 0; } .lantern-editor-part .launch-editor, .lantern-editor-part .launch-fields { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; } .lantern-editor-part .launch-fields { flex-basis: 100%; min-width: 0; } .lantern-editor-part [hidden] { display: none !important; } .lantern-editor-part select { min-width: 0; width: 100%; } .lantern-editor-part .launch-intro { flex-basis: 100%; margin: 0; } .lantern-editor-part .launch-parameters { flex-basis: 100%; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; } .lantern-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; } .lantern-editor-part input, .lantern-editor-part select { max-width: 100%; box-sizing: border-box; } .lantern-editor-part input[type="text"] { width: 12em; } .lantern-editor-part label { min-width: 0; max-width: 100%; } .lantern-editor-part input.parameter-derived::placeholder { opacity: .65; }';async setLanguage(e){const t=++this.languageToken;this.language=e;const[n,s]=await Promise.all([v.load(e),w.load(e)]);t===this.languageToken&&(this.messages=n,this.parameterTexts=s,this.render(),this.sync())}sync(){if(!this.messages)return;const e=this.launches;this.shown=[...e],e.some(r=>r.id===this.currentId)||(this.currentId=e[0]?.id),this.list?.setItems(e.map(r=>({id:r.id,label:this.labelOf(r)})),this.currentId),this.syncAddState();const t=this.current;if(this.element("lantern-fields").hidden=t===void 0,!t)return;const n=t.releases?.length??0,s=this.element("lantern-releases");s.hidden=n===0,s.textContent=this.messages.releasesNote.replace("{n}",String(n)),this.form??=new m(this.element("lantern-parameters"),this.language,"lantern.",{said:()=>this.host.said(),writingLanguage:()=>this.host.writingLanguage()}),this.form.show(this.resolved(i.SET),new g(()=>this.current,r=>this.editLaunch(h=>r(h)),()=>({shapes:this.host.shapes().map(r=>({value:r.id,label:r.label}))}),this.host.positionPlace?.()),()=>this.written())}refresh(){if(!this.messages)return;this.syncAddState();const e=this.launches;e.length===this.shown.length&&e.every((t,n)=>t.id===this.shown[n].id)||this.sync()}syncAddState(){const e=this.siteOfNew()!==void 0;this.list?.setAddState(e,e?void 0:this.messages.addLaunchNowhere)}get current(){return this.launches.find(e=>e.id===this.currentId)}resolved(e){return f.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="lantern-list"></div>
4
- <div id="lantern-fields" class="launch-fields">
5
- <div id="lantern-parameters" class="launch-parameters"></div>
6
- <p id="lantern-releases" class="launch-intro" hidden></p>
7
- <p class="launch-intro">${e.derivedNote}</p>
8
- </div>
9
- </div>`,this.list=new y({header:this.element("lantern-list"),body:this.element("lantern-fields"),ids:{list:"lantern-select",remove:"lantern-delete",add:"lantern-add"},onSelect:t=>{this.currentId=t,this.sync()},onAdd:()=>this.addLaunch(),onRemove:()=>this.deleteCurrent()}),this.list.setLabels({list:e.launch,remove:e.deleteLaunch,add:e.addLaunch,empty:e.none})}written(){const e=this.current;e&&this.list?.rename(e.id,this.labelOf(e))}editLaunch(e){const t=this.current;if(!t)return;const n=structuredClone(t);e(n),this.writeLaunches(this.launches.map(s=>s===t?n:s)),this.host.changed()}siteOfNew(){const e=this.host.sighting(),t=e.event?.place?.[0];if(t?.lat===void 0||t.lng===void 0)return;const n=e.observerTrack?.getInterpolatedPoseAt(0),s=(n?.headingDeg??0)*Math.PI/180,r=111320,h=n?.lng!==void 0?(n.lng-t.lng)*r*Math.cos(t.lat*Math.PI/180):0,c=n?.lat!==void 0?(n.lat-t.lat)*r:0;return{eastM:Math.round(h+1500*Math.sin(s)),northM:Math.round(c+1500*Math.cos(s))}}addLaunch(){const e=this.siteOfNew();if(!e)return;let t=this.launches.length+1;for(;this.launches.some(r=>r.id===`lanterns-${t}`);)t++;const n=T(this.host.sighting(),0),s={id:`lanterns-${t}`,site:e,group:{count:12,fromT:0,untilT:12e4,seed:t},wind:{towardDeg:Math.round((n.windDirectionDeg+180)%360),speedMS:Math.round(n.windSpeed*10)/10}};this.writeLaunches([...this.launches,s]),this.currentId=s.id,this.host.changed(),this.sync()}deleteCurrent(){const e=this.current;e&&(this.currentId=void 0,this.writeLaunches(this.launches.filter(t=>t!==e)),this.host.changed(),this.sync())}writeLaunches(e){const t=this.host.sighting(),n={...t.interpretation??{bodies:[]},lanterns:e.length>0?e:void 0};n.lanterns===void 0&&delete n.lanterns;const s=b.saysNothing(n,A.kinds());t.interpretation=s?void 0:n}labelOf(e){const t=this.host.said().read(e.title);return t?`${t} (${e.id})`:e.id}get launches(){return this.host.sighting().interpretation?.lanterns??[]}element(e){return this.container.querySelector(`#${e}`)}}export{p as LanternEditor};