@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,4 +1,4 @@
1
- import{ba as z,bb as w,bc as K}from"./rr0-scene.mjs";class v{static read(t,e){let i=t;for(const n of e.split(".")){if(i=v.bare(i),i===null||typeof i!="object")return;i=i[n]}return v.bare(i)}static write(t,e,i){const n=e.split("."),s=[];let o=t;for(let r=0;r<n.length-1;r++){let a=v.bare(o[n[r]]);if(a===null||typeof a!="object"||Array.isArray(a)){if(i===void 0)return;a={}}o[n[r]]=a,s.push({owner:o,part:n[r]}),o=a}const d=n[n.length-1];i===void 0?delete o[d]:o[d]=i;for(let r=s.length-1;r>=0;r--){const a=s[r].owner[s[r].part];if(Object.keys(a).length>0)break;delete s[r].owner[s[r].part]}}static stated(t,e){return v.read(t,e)!==void 0}static bare(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&"value"in t&&"basis"in t?t.value:t}}class N{static sets=new Map;static publish(t){N.sets.set(t.kind,t)}static of(t){return N.sets.get(t)}static kinds(){return[...N.sets.keys()]}}class T{static resolved=new WeakMap;static resolve(t,e){let i=T.resolved.get(t);i||T.resolved.set(t,i=new WeakMap);let n=i.get(e);if(!n){const s=e,o=r=>{if(typeof r!="string")return r;if(typeof s[r]=="string")return s[r];const a=r.split(" ");return a.length>1&&a.every(c=>typeof s[c]=="string")?a.map(c=>s[c]).join(" "):r},d=r=>r.map(a=>({...a,label:o(a.label)}));n={...t,title:o(t.title),parameters:t.parameters.map(r=>{const a={...r,label:o(r.label),hint:o(r.hint),summary:o(r.summary),group:o(r.group),..."placeholder"in r?{placeholder:o(r.placeholder)}:{},..."empty"in r?{empty:o(r.empty)}:{}};if(a.type==="choice"){const c=a.optionsOf;return{...a,choices:d(a.choices),...c?{optionsOf:(l,h)=>d(c(l,h))}:{}}}if(a.type==="set"){const c=a.options;return{...a,options:(l,h)=>d(c(l,h))}}return a})},i.set(e,n)}return n}static missing(t,e){const i=e,n=new Set,s=o=>{if(typeof o=="string")for(const d of o.split(" "))/^[a-z][A-Za-z0-9]*$/.test(d)&&i[d]===void 0&&n.add(d)};s(t.title);for(const o of t.parameters)if(s(o.label),s(o.hint),s(o.summary),s(o.group),"placeholder"in o&&s(o.placeholder),"empty"in o&&s(o.empty),o.type==="choice")for(const d of o.choices)s(d.label);return[...n]}}class J{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 G{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=`
1
+ import{b0 as T,b1 as K,b2 as z,b3 as H,b4 as W,b5 as w}from"./rr0-scene.mjs";class v{static read(t,e){let i=t;for(const n of e.split(".")){if(i=v.bare(i),i===null||typeof i!="object")return;i=i[n]}return v.bare(i)}static write(t,e,i){const n=e.split("."),s=[];let o=t;for(let r=0;r<n.length-1;r++){let a=v.bare(o[n[r]]);if(a===null||typeof a!="object"||Array.isArray(a)){if(i===void 0)return;a={}}o[n[r]]=a,s.push({owner:o,part:n[r]}),o=a}const d=n[n.length-1];i===void 0?delete o[d]:o[d]=i;for(let r=s.length-1;r>=0;r--){const a=s[r].owner[s[r].part];if(Object.keys(a).length>0)break;delete s[r].owner[s[r].part]}}static stated(t,e){return v.read(t,e)!==void 0}static bare(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&"value"in t&&"basis"in t?t.value:t}}class F{static sets=new Map;static publish(t){F.sets.set(t.kind,t)}static of(t){return F.sets.get(t)}static kinds(){return[...F.sets.keys()]}}class ${static resolved=new WeakMap;static resolve(t,e){let i=$.resolved.get(t);i||$.resolved.set(t,i=new WeakMap);let n=i.get(e);if(!n){const s=e,o=r=>{if(typeof r!="string")return r;if(typeof s[r]=="string")return s[r];const a=r.split(" ");return a.length>1&&a.every(c=>typeof s[c]=="string")?a.map(c=>s[c]).join(" "):r},d=r=>r.map(a=>({...a,label:o(a.label)}));n={...t,title:o(t.title),parameters:t.parameters.map(r=>{const a={...r,label:o(r.label),hint:o(r.hint),summary:o(r.summary),group:o(r.group),..."placeholder"in r?{placeholder:o(r.placeholder)}:{},..."empty"in r?{empty:o(r.empty)}:{}};if(a.type==="choice"){const c=a.optionsOf;return{...a,choices:d(a.choices),...c?{optionsOf:(l,h)=>d(c(l,h))}:{}}}if(a.type==="set"){const c=a.options;return{...a,options:(l,h)=>d(c(l,h))}}return a})},i.set(e,n)}return n}static missing(t,e){const i=e,n=new Set,s=o=>{if(typeof o=="string")for(const d of o.split(" "))/^[a-z][A-Za-z0-9]*$/.test(d)&&i[d]===void 0&&n.add(d)};s(t.title);for(const o of t.parameters)if(s(o.label),s(o.hint),s(o.summary),s(o.group),"placeholder"in o&&s(o.placeholder),"empty"in o&&s(o.empty),o.type==="choice")for(const d of o.choices)s(d.label);return[...n]}}class I{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 j{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
2
  .add-menu { padding: .3em 0; border: 1px solid color-mix(in srgb, CanvasText 30%, transparent); border-radius: 4px; background: Canvas; color: CanvasText;
3
3
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25); max-height: 60vh; overflow-y: auto; font-size: .9em; }
4
4
  @supports (position-area: bottom span-left) {
@@ -12,7 +12,7 @@ import{ba as z,bb as w,bc as K}from"./rr0-scene.mjs";class v{static read(t,e){le
12
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 u{static draw(t,e="none"){return`<svg class="icon" viewBox="0 0 16 16" width="16" height="16" aria-hidden="true" fill="${e}" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round">${t}</svg>`}static TRASH=u.draw('<path d="M2.5 4.5h11"/><path d="M6 4.5V3h4v1.5"/><path d="M4 4.5l.7 9h6.6l.7-9"/><path d="M6.8 7v4.5M9.2 7v4.5"/>');static TARGET=u.draw('<circle cx="8" cy="8" r="5"/><circle cx="8" cy="8" r="1.6"/><path d="M8 1v2.2M8 12.8V15M1 8h2.2M12.8 8H15"/>');static PLAY=u.draw('<path d="M5 3.2v9.6L12.6 8z"/>',"currentColor");static PAUSE=u.draw('<path d="M5.5 3.5v9M10.5 3.5v9"/>');static RECORD=u.draw('<circle cx="8" cy="8" r="4.2" fill="var(--error, #d93025)" stroke="none"/>');static STOP=u.draw('<rect x="4" y="4" width="8" height="8" rx="1.2"/>',"currentColor");static PREVIOUS_MARK=u.draw('<path d="M6.5 4 2.5 8l4 4"/><path d="M11 5.2 13.8 8 11 10.8 8.2 8z"/>');static NEXT_MARK=u.draw('<path d="M9.5 4l4 4-4 4"/><path d="M5 5.2 7.8 8 5 10.8 2.2 8z"/>');static CLOSE=u.draw('<path d="M4 4l8 8M12 4l-8 8"/>');static PLUS=u.draw('<path d="M8 3v10M3 8h10"/>');static COPY=u.draw('<rect x="5.5" y="5.5" width="8" height="8" rx="1.3"/><path d="M10.5 3.2h-7a1.3 1.3 0 0 0-1.3 1.3v7"/>');static CLOCK=u.draw('<circle cx="8" cy="8" r="6"/><path d="M8 4.6V8l2.4 1.6"/>');static INTERVIEW=u.draw('<path d="M13.3 9.2a1.6 1.6 0 0 1-1.6 1.6H6.2L3 13.4V4.4a1.6 1.6 0 0 1 1.6-1.6h7.1a1.6 1.6 0 0 1 1.6 1.6z"/><path d="M5.8 6.1h5.1M5.8 8.4h3.2"/>');static LOCK=u.draw('<rect x="3.2" y="7.2" width="9.6" height="6.4" rx="1.4"/><path d="M5.6 7.2V5.4a2.4 2.4 0 0 1 4.8 0v1.8"/>');static LOCK_OPEN=u.draw('<rect x="3.2" y="7.2" width="9.6" height="6.4" rx="1.4"/><path d="M5.6 7.2V5.4a2.4 2.4 0 0 1 4.6-.7"/>');static METEOR=u.draw('<path d="M2.5 2.5l7 7"/><path d="M5.5 2.5l5 5"/><circle cx="11.5" cy="11.5" r="2"/>');static COMET=u.draw('<circle cx="11" cy="11" r="2.4"/><path d="M9.3 9.3 2.5 2.5M9 11.2 3 7M11.2 9 7 3"/>');static STAR=u.draw('<path d="M8 2.2l1.7 3.6 3.9.5-2.9 2.7.8 3.9L8 11l-3.5 1.9.8-3.9-2.9-2.7 3.9-.5z"/>');static SATELLITE=u.draw('<rect x="6.3" y="6.3" width="3.4" height="3.4" transform="rotate(45 8 8)"/><path d="M5.4 5.4 3 3M10.6 10.6 13 13"/><path d="M1.8 4.2 4.2 1.8M11.8 14.2l2.4-2.4"/><path d="M10.5 3.5a3 3 0 0 1 2 2"/>');static FIREBALL=u.draw('<circle cx="10.5" cy="10.5" r="2.6"/><path d="M8.6 8.6 3 3M8 10.6 4.5 8.5M10.6 8 8.5 4.5"/>');static SUMMARY=u.draw('<rect x="3" y="2" width="10" height="12" rx="1.5"/><path d="M5.5 5.5h5M5.5 8h5M5.5 10.5h3"/>');static WITNESS=u.draw('<circle cx="8" cy="5" r="2.6"/><path d="M2.8 14c.6-3 2.6-4.6 5.2-4.6s4.6 1.6 5.2 4.6"/>');static LOCATION=u.draw('<path d="M8 14.3s4.5-4.3 4.5-7.8a4.5 4.5 0 0 0-9 0c0 3.5 4.5 7.8 4.5 7.8z"/><circle cx="8" cy="6.5" r="1.6"/>');static DATE=u.draw('<rect x="2.3" y="3.3" width="11.4" height="10.4" rx="1.5"/><path d="M2.3 6.6h11.4M5.3 1.8v2.8M10.7 1.8v2.8"/>');static ENVIRONMENT=u.draw('<path d="M1.5 14h13"/><path d="M2.8 14V8.3L6.3 5.5l3.5 2.8V14"/><path d="M12.2 14V9.4"/><circle cx="12.2" cy="7.4" r="2.1"/>');static SKY=u.draw('<path d="M4.6 12.5h7a2.6 2.6 0 0 0 .3-5.2 3.8 3.8 0 0 0-7.3-.6 2.9 2.9 0 0 0 0 5.8z"/>');static PHENOMENON=u.draw('<ellipse cx="8" cy="9" rx="6.3" ry="2.1"/><path d="M4.6 7.8a3.4 3.4 0 0 1 6.8 0"/><path d="M5 13.4l.6-1.4M11 13.4l-.6-1.4M8 14v-1.4"/>');static SOUND=u.draw('<path d="M2.5 6.2h2.3L8 3.5v9L4.8 9.8H2.5z"/><path d="M10.5 6a2.8 2.8 0 0 1 0 4M12.3 4.2a5.4 5.4 0 0 1 0 7.6"/>');static PICTURES=u.draw('<rect x="2" y="3" width="12" height="10" rx="1.5"/><circle cx="5.8" cy="6.4" r="1.2"/><path d="M2.5 12l3.8-3.6 2.4 2.2 2.2-1.8 2.6 2.5"/>');static FILES=u.draw('<path d="M4 1.8h5.2L12.5 5v9.2H4z"/><path d="M9 1.8V5.2h3.5"/>');static BY_GLYPH={"🗑":u.TRASH,"🎯":u.TARGET,"+":u.PLUS,"✕":u.CLOSE,"▶":u.PLAY,"⏸":u.PAUSE,"⏺":u.RECORD,"⏹":u.STOP};static show(t,e){if(t.dataset.icon===e&&t.firstChild)return;const i=u.BY_GLYPH[e];i?t.innerHTML=i:t.textContent=e,t.dataset.icon=e}static CSS=`
13
13
  .icon { display: block; flex: none; }
14
14
  button:has(> .icon:only-child) { display: inline-flex; align-items: center; justify-content: center; }
15
- `}class B{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 G(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=`
15
+ `}class O{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 j(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=`
16
16
  .element-list-row { display: flex; align-items: flex-end; flex-wrap: wrap; gap: .4em; flex: 1 1 100%; min-width: 0; }
17
17
  .element-list-picker { flex: 1 1 10em; min-width: 0; display: flex; }
18
18
  .element-list-picker select { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; }
@@ -25,7 +25,7 @@ button:has(> .icon:only-child) { display: inline-flex; align-items: center; just
25
25
  align-items: center; gap: .5em; }
26
26
  .element-list-picker select { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
27
27
  .element-list-row [hidden], .element-list-body[hidden] { display: none !important; }
28
- ${G.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&&!B.glued.has(e)&&B.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"&&B.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,u.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(B.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 g{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(${g.charsFor(i)}ch + ${g.CHROME})`,g.hold(i,!g.isFocused(i)),i.dataset.held!==""&&(i.dataset.held="",i.addEventListener("input",()=>g.hold(i)),i.addEventListener("change",()=>g.hold(i,!0)));return e.length}static hold(t,e=!1){const i=g.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=g.wholeOnly(e.step)?0:g.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,d=Number(o),r=e.min===""?void 0:Number(e.min),a=e.max===""?void 0:Number(e.max);return a!==void 0&&d>a?String(a):i&&r!==void 0&&d<r?String(r):o}static charsFor(t){const e=d=>d===""?void 0:Math.abs(Number(d)),i=Math.max(e(t.max)??g.UNBOUNDED,e(t.min)??0),n=String(Math.floor(Number.isFinite(i)?i:g.UNBOUNDED)).length,s=t.min!==""&&Number(t.min)<0?1:0,o=g.wholeOnly(t.step)?0:g.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 M{static CSS=`
28
+ ${j.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&&!O.glued.has(e)&&O.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"&&O.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,u.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(O.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 g{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(${g.charsFor(i)}ch + ${g.CHROME})`,g.hold(i,!g.isFocused(i)),i.dataset.held!==""&&(i.dataset.held="",i.addEventListener("input",()=>g.hold(i)),i.addEventListener("change",()=>g.hold(i,!0)));return e.length}static hold(t,e=!1){const i=g.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=g.wholeOnly(e.step)?0:g.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,d=Number(o),r=e.min===""?void 0:Number(e.min),a=e.max===""?void 0:Number(e.max);return a!==void 0&&d>a?String(a):i&&r!==void 0&&d<r?String(r):o}static charsFor(t){const e=d=>d===""?void 0:Math.abs(Number(d)),i=Math.max(e(t.max)??g.UNBOUNDED,e(t.min)??0),n=String(Math.floor(Number.isFinite(i)?i:g.UNBOUNDED)).length,s=t.min!==""&&Number(t.min)<0?1:0,o=g.wholeOnly(t.step)?0:g.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 S{static CSS=`
29
29
  .window-close {
30
30
  position: absolute; top: 8px; right: 8px; z-index: 1;
31
31
  display: inline-flex; align-items: center; justify-content: center;
@@ -35,7 +35,7 @@ ${G.CSS}`;static showPresence(t,e,i,n=!1){for(const s of t.children)if(!s.matche
35
35
  .window-close:hover, .window-close:focus-visible { opacity: 1; background: color-mix(in srgb, currentColor 12%, transparent); }
36
36
  :is(dialog, [popover], .context-menu):has(> .window-close) { position: relative; padding-right: 44px; }
37
37
  .context-menu:has(> .window-close) { position: fixed; }
38
- `;static button(t,e,i){const n=t.querySelector(":scope > .window-close");if(n)return M.label(n,e),n;const s=document.createElement("button");return s.type="button",s.className="window-close",s.innerHTML=u.CLOSE,M.label(s,e),s.addEventListener("click",o=>{o.stopPropagation(),i()}),t.prepend(s),s}static popover(t,e){return M.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&&M.outside(t,s)&&i()})}return M.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 y extends HTMLElement{static TAG="rr0-input-basis";static CSS=`
38
+ `;static button(t,e,i){const n=t.querySelector(":scope > .window-close");if(n)return S.label(n,e),n;const s=document.createElement("button");return s.type="button",s.className="window-close",s.innerHTML=u.CLOSE,S.label(s,e),s.addEventListener("click",o=>{o.stopPropagation(),i()}),t.prepend(s),s}static popover(t,e){return S.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&&S.outside(t,s)&&i()})}return S.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 y extends HTMLElement{static TAG="rr0-input-basis";static CSS=`
39
39
  rr0-input-basis { display: inline-block; }
40
40
  rr0-input-basis[hidden] { display: none; }
41
41
  .basis-mark {
@@ -65,7 +65,7 @@ rr0-input-basis[hidden] { display: none; }
65
65
  .basis-source h4 { margin: 0 0 10px; font: 600 13px/1.3 var(--sans); color: var(--ink-dim); }
66
66
  .basis-source-free { margin: 0; font: 400 13px/1.45 var(--sans); color: var(--ink-dim); }
67
67
  .basis-window input { box-sizing: border-box; width: 100%; font-weight: 400; }
68
- `;hows=[];rationaleKept=!0;sourceKept=!0;choices={};wording;sourceWording;shown;mark;window;static count=0;anchor=`--rr0-basis-${++y.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 p of["established","measured","stated","derived","assumed","fitted"])i.append(new Option(t.basis[p],p));i.value=this.shown?.basis??"stated";const n=document.createElement("select");n.append(new Option("—",""));for(const p of this.hows)n.append(new Option(p.label,p.value));n.value=this.shown?.how??"";const s=document.createElement("textarea");s.value=this.shown?.rationale??"";const o=(p,m)=>{const f=document.createElement("label");return f.append(Object.assign(document.createElement("span"),{textContent:p}),m),f};let d=()=>this.shown?.source;const r=()=>{const p=i.value,m=d();this.entry={basis:p,...n.value?{how:n.value}:{},...s.value.trim()?{rationale:s.value.trim()}:{},...m?{source:m}:{}},this.dispatchEvent(new CustomEvent("basischange",{detail:{entry:this.shown},bubbles:!0,composed:!0}))};n.addEventListener("change",r),s.addEventListener("change",r);const a=document.createElement("div");a.className="basis-source";const c=()=>{d=this.drawSource(a,i.value,o,()=>r())};i.addEventListener("change",()=>{c(),r()});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?[a]:[]),M.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(z.free({basis:e}))return t.replaceChildren(Object.assign(document.createElement("p"),{className:"basis-source-free",textContent:s.free})),()=>{};const o=this.choices.interviews??[],d=this.choices.pictures??[],r=["none",...o.length>0?["said"]:[],"document",...d.length>0?["picture"]:[],"tool"],a=document.createElement("select");for(const f of r)a.append(new Option(s.kinds[f],f));const c=this.shown?.source,l=y.kindOf(c);a.value=r.includes(l)?l:"none";const h=document.createElement("div");let p=()=>{};const m=()=>{p=this.drawSourceFields(h,a.value,c,i,n)};return a.addEventListener("change",()=>{m(),n()}),m(),t.replaceChildren(i(s.field,a),h),()=>p()}drawSourceFields(t,e,i,n,s){const o=this.sourceWording,d=(e===y.kindOf(i)?i:void 0)??{},r=c=>{const l=document.createElement("input");return l.type="text",l.value=c??"",l.addEventListener("change",s),l},a=c=>c.value.trim()||void 0;if(e==="said"){const c=this.choices.interviews??[],l=document.createElement("select");for(const m of c)l.append(new Option(m.id===void 0?o.interviewOnly:m.label,m.id??""));l.value=d.said?.interview??c[0]?.id??"";const h=document.createElement("select"),p=()=>{const m=c.find(f=>(f.id??"")===l.value)??c[0];h.replaceChildren(...(m?.segments??[]).map(f=>new Option(f.label||o.segmentUnnamed.replace("{n}",String(f.index+1)),String(f.index)))),d.said&&h.querySelector(`option[value="${d.said.segment}"]`)&&(h.value=String(d.said.segment))};return p(),l.addEventListener("change",()=>{p(),s()}),h.addEventListener("change",s),t.replaceChildren(n(o.interviewField,l),n(o.segmentField,h)),()=>{if(h.value==="")return;const m=c.find(f=>(f.id??"")===l.value);return{said:{...m?.id!==void 0?{interview:m.id}:{},segment:Number(h.value),...d.said?.range?{range:d.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=d.picture??"",l.addEventListener("change",s),t.replaceChildren(n(o.pictureField,l)),()=>l.value?{picture:l.value}:void 0}if(e==="tool"){const c=r(d.tool);return t.replaceChildren(n(o.toolField,c)),()=>a(c)?{tool:a(c)}:void 0}if(e==="document"){const c=r(typeof d.document=="string"?d.document:void 0),l=r(d.at),h=r(d.url);return t.replaceChildren(n(o.documentField,c),n(o.atField,l),n(o.urlField,h)),()=>{const p={...a(c)?{document:a(c)}:{},...a(l)?{at:a(l)}:{},...a(h)?{url:a(h)}:{}};return typeof d.document=="object"&&d.document!==null&&a(c)===void 0?Object.keys(p).length>0||d.document?{...p,document:d.document}:void 0:Object.keys(p).length>0?p: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 H(){customElements.get(y.TAG)||customElements.define(y.TAG,y)}const j="rr0-input-position",U={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"},W=`${y.CSS}
68
+ `;hows=[];rationaleKept=!0;sourceKept=!0;choices={};wording;sourceWording;shown;mark;window;static count=0;anchor=`--rr0-basis-${++y.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;const n=this.rationaleRead();t.title=n?`${e.title} : ${n}`:e.title,t.setAttribute("aria-label",`${e.title} : ${e.basis[i]}`)}rationaleRead(){return new T(K.preferencesFor(this)).read(this.shown?.rationale)}rationaleLanguage(){return z(K.preferencesFor(this),W)}static rationaleWritten(t,e,i){if(t===void 0||typeof t=="string")return e?{rationale:e}:{};const n=Object.fromEntries(Object.entries(t).filter(([o])=>o!==i)),s=e?{...n,[i]:e}:n;return Object.keys(s).length>0?{rationale:s}:{}}open(){const t=this.wording;if(!t)return;const e=Object.assign(document.createElement("h3"),{textContent:t.title}),i=document.createElement("select");for(const p of["established","measured","stated","derived","assumed","fitted"])i.append(new Option(t.basis[p],p));i.value=this.shown?.basis??"stated";const n=document.createElement("select");n.append(new Option("—",""));for(const p of this.hows)n.append(new Option(p.label,p.value));n.value=this.shown?.how??"";const s=document.createElement("textarea");s.value=this.rationaleRead()??"";const o=(p,m)=>{const f=document.createElement("label");return f.append(Object.assign(document.createElement("span"),{textContent:p}),m),f};let d=()=>this.shown?.source;const r=()=>{const p=i.value,m=d();this.entry={basis:p,...n.value?{how:n.value}:{},...y.rationaleWritten(this.shown?.rationale,s.value.trim(),this.rationaleLanguage()),...m?{source:m}:{}},this.dispatchEvent(new CustomEvent("basischange",{detail:{entry:this.shown},bubbles:!0,composed:!0}))};n.addEventListener("change",r),s.addEventListener("change",r);const a=document.createElement("div");a.className="basis-source";const c=()=>{d=this.drawSource(a,i.value,o,()=>r())};i.addEventListener("change",()=>{c(),r()});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?[a]:[]),S.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(H.free({basis:e}))return t.replaceChildren(Object.assign(document.createElement("p"),{className:"basis-source-free",textContent:s.free})),()=>{};const o=this.choices.interviews??[],d=this.choices.pictures??[],r=["none",...o.length>0?["said"]:[],"document",...d.length>0?["picture"]:[],"tool"],a=document.createElement("select");for(const f of r)a.append(new Option(s.kinds[f],f));const c=this.shown?.source,l=y.kindOf(c);a.value=r.includes(l)?l:"none";const h=document.createElement("div");let p=()=>{};const m=()=>{p=this.drawSourceFields(h,a.value,c,i,n)};return a.addEventListener("change",()=>{m(),n()}),m(),t.replaceChildren(i(s.field,a),h),()=>p()}drawSourceFields(t,e,i,n,s){const o=this.sourceWording,d=(e===y.kindOf(i)?i:void 0)??{},r=c=>{const l=document.createElement("input");return l.type="text",l.value=c??"",l.addEventListener("change",s),l},a=c=>c.value.trim()||void 0;if(e==="said"){const c=this.choices.interviews??[],l=document.createElement("select");for(const m of c)l.append(new Option(m.id===void 0?o.interviewOnly:m.label,m.id??""));l.value=d.said?.interview??c[0]?.id??"",l.selectedIndex<0&&c.length===1&&(l.selectedIndex=0);const h=document.createElement("select"),p=()=>{const m=c.find(f=>(f.id??"")===l.value)??c[0];h.replaceChildren(...(m?.segments??[]).map(f=>new Option(f.label||o.segmentUnnamed.replace("{n}",String(f.index+1)),String(f.index)))),d.said&&h.querySelector(`option[value="${d.said.segment}"]`)&&(h.value=String(d.said.segment))};return p(),l.addEventListener("change",()=>{p(),s()}),h.addEventListener("change",s),t.replaceChildren(n(o.interviewField,l),n(o.segmentField,h)),()=>{if(h.value==="")return;const m=c.find(f=>(f.id??"")===l.value);return{said:{...m?.id!==void 0?{interview:m.id}:{},segment:Number(h.value),...d.said?.range?{range:d.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=d.picture??"",l.addEventListener("change",s),t.replaceChildren(n(o.pictureField,l)),()=>l.value?{picture:l.value}:void 0}if(e==="tool"){const c=r(d.tool);return t.replaceChildren(n(o.toolField,c)),()=>a(c)?{tool:a(c)}:void 0}if(e==="document"){const c=r(typeof d.document=="string"?d.document:void 0),l=r(d.at),h=r(d.url);return t.replaceChildren(n(o.documentField,c),n(o.atField,l),n(o.urlField,h)),()=>{const p={...a(c)?{document:a(c)}:{},...a(l)?{at:a(l)}:{},...a(h)?{url:a(h)}:{}};return typeof d.document=="object"&&d.document!==null&&a(c)===void 0?Object.keys(p).length>0||d.document?{...p,document:d.document}:void 0:Object.keys(p).length>0?p: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 Y(){customElements.get(y.TAG)||customElements.define(y.TAG,y)}const q="rr0-input-position",X={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"},J=`${y.CSS}
69
69
  rr0-input-position { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .3em .5em; }
70
70
  /* As the date's own switch (see DateInputElement): it reads as part of the label, before the fields. */
71
71
  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; }
@@ -83,12 +83,12 @@ rr0-input-position .position-geo input[type="number"] { width: 9.5em; }
83
83
  rr0-input-position .position-basis { order: -2; }
84
84
  rr0-input-position .position-mode { order: -1; }
85
85
  rr0-input-position [hidden] { display: none !important; }
86
- `;class E extends HTMLElement{modeButton;fromRow;fromSelect;localRow;geoRow;eastField;northField;latField;lngField;basisSelect;eastLabel;northLabel;latLabel;lngLabel;wording=U;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=W;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 d=e.createElement("select");d.id=`${t}-from`,d.addEventListener("input",()=>this.pickReference(d.value)),s.append(o,d);const r=this.getAttribute("step")??"0.1",a=(b,S,A,R)=>{const k=e.createElement("input");return k.type="number",k.id=b,k.min=String(S),k.max=String(A),k.step=R,k.autocomplete="off",k},c=(b,S)=>{const A=e.createElement("label");A.className="position-axis";const R=e.createElement("span");return A.append(R,b,S),{row:A,label:R}},l=Number(this.getAttribute("range")??3e4),h=a(this.getAttribute("east-id")??`${t}-east`,-l,l,r),p=a(this.getAttribute("north-id")??`${t}-north`,-l,l,r),m=a(this.getAttribute("lat-id")??`${t}-lat`,-90,90,"0.000001"),f=a(this.getAttribute("lng-id")??`${t}-lng`,-180,180,"0.000001"),O=e.createElement("span");O.className="position-local";const $=c(h,"m"),P=c(p,"m");O.append($.row,P.row);const C=e.createElement("span");C.className="position-geo";const V=c(m,"°"),D=c(f,"°");C.append(V.row,D.row);for(const b of[h,p])b.addEventListener("input",()=>this.typedLocal());for(const b of[m,f])b.addEventListener("input",()=>this.typedGeo());H();const x=e.createElement(y.TAG);x.id=`${t}-basis`,x.className="position-basis",x.rationaleKept=!1,x.sourceKept=!1,x.anchorKey=`${t}-basis`,x.addEventListener("basischange",b=>{b.stopPropagation();const S=b.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,O,C,x),this.modeButton=n,this.fromRow=s,this.fromSelect=d,this.localRow=O,this.geoRow=C,this.eastField=h,this.northField=p,this.latField=m,this.lngField=f,this.basisSelect=x,this.eastLabel=$.label,this.northLabel=P.label,this.latLabel=V.label,this.lngLabel=D.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(w.degrees(e.lat)):"",this.lngField.value=e?String(w.degrees(e.lng)):""}this.show()}set said(t){this.build(),this.pullDegrees(),w.isRelative(t)?(this.relativeShown=!0,this.referenceId=t.relativeTo):w.isAbsolute(t)?this.relativeShown=!1:(this.relativeShown=!this.isGeo,this.referenceId=void 0),this.show()}get said(){const t=this.localValue();if(t)return w.restated(this.relativeShown?w.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=E.typed(this.latField),e=E.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?w.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?w.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(`
86
+ `;class E extends HTMLElement{modeButton;fromRow;fromSelect;localRow;geoRow;eastField;northField;latField;lngField;basisSelect;eastLabel;northLabel;latLabel;lngLabel;wording=X;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=J;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 d=e.createElement("select");d.id=`${t}-from`,d.addEventListener("input",()=>this.pickReference(d.value)),s.append(o,d);const r=this.getAttribute("step")??"0.1",a=(b,M,A,R)=>{const k=e.createElement("input");return k.type="number",k.id=b,k.min=String(M),k.max=String(A),k.step=R,k.autocomplete="off",k},c=(b,M)=>{const A=e.createElement("label");A.className="position-axis";const R=e.createElement("span");return A.append(R,b,M),{row:A,label:R}},l=Number(this.getAttribute("range")??3e4),h=a(this.getAttribute("east-id")??`${t}-east`,-l,l,r),p=a(this.getAttribute("north-id")??`${t}-north`,-l,l,r),m=a(this.getAttribute("lat-id")??`${t}-lat`,-90,90,"0.000001"),f=a(this.getAttribute("lng-id")??`${t}-lng`,-180,180,"0.000001"),B=e.createElement("span");B.className="position-local";const P=c(h,"m"),V=c(p,"m");B.append(P.row,V.row);const C=e.createElement("span");C.className="position-geo";const D=c(m,"°"),G=c(f,"°");C.append(D.row,G.row);for(const b of[h,p])b.addEventListener("input",()=>this.typedLocal());for(const b of[m,f])b.addEventListener("input",()=>this.typedGeo());Y();const x=e.createElement(y.TAG);x.id=`${t}-basis`,x.className="position-basis",x.rationaleKept=!1,x.sourceKept=!1,x.anchorKey=`${t}-basis`,x.addEventListener("basischange",b=>{b.stopPropagation();const M=b.detail.entry;this.shownBasis=M?.basis==="stated"?void 0:M?.basis,this.dispatchEvent(new CustomEvent("basischange",{detail:{basis:this.shownBasis},bubbles:!0,composed:!0}))}),this.append(i,n,s,B,C,x),this.modeButton=n,this.fromRow=s,this.fromSelect=d,this.localRow=B,this.geoRow=C,this.eastField=h,this.northField=p,this.latField=m,this.lngField=f,this.basisSelect=x,this.eastLabel=P.label,this.northLabel=V.label,this.latLabel=D.label,this.lngLabel=G.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(w.degrees(e.lat)):"",this.lngField.value=e?String(w.degrees(e.lng)):""}this.show()}set said(t){this.build(),this.pullDegrees(),w.isRelative(t)?(this.relativeShown=!0,this.referenceId=t.relativeTo):w.isAbsolute(t)?this.relativeShown=!1:(this.relativeShown=!this.isGeo,this.referenceId=void 0),this.show()}get said(){const t=this.localValue();if(t)return w.restated(this.relativeShown?w.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=E.typed(this.latField),e=E.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?w.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?w.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(`
87
87
  `)!==o.join(`
88
88
  `)||[...s.options].map(h=>h.text).join(`
89
89
  `)!==n.map(h=>h.label).join(`
90
- `))&&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 d=this.getRootNode().activeElement,r=(h,p)=>{h!==d&&(h.value=p===void 0?"":String(p))},a=this.localValue(),c=this.reference();if(r(this.eastField,a?w.metres(a.eastM-c.eastM):void 0),r(this.northField,a?w.metres(a.northM-c.northM):void 0),this.isGeo&&!this.relativeShown)return;const l=this.geoValue();r(this.latField,l?w.degrees(l.lat):void 0),r(this.lngField,l?w.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=E.typed(this.eastField),e=E.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=w.toGeo(n,o)}this.shownValue=s,this.tell(s,w.relative(t,e,this.referenceId))}typedGeo(){const t=E.typed(this.latField),e=E.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=w.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?w.isAbsolute(e):w.isRelative(e)&&e.relativeTo===void 0;this.dispatchEvent(new CustomEvent("positionchange",{detail:{value:t,said:i?void 0:e},bubbles:!0,composed:!0}))}}function Y(){customElements.get(j)||customElements.define(j,E)}class F{constructor(t,e,i=()=>{},n){this.read=t,this.edit=e,this.context=i,this.place=n}static inPlace(t){return new F(()=>t,e=>e(t))}}class L{constructor(t,e,i="",n,s){this.container=t,this.idPrefix=i,this.values=n,this.enhance=s,this.said=new K([e,"en"])}set;target;changed=()=>{};said;setLanguage(t){this.said=new K([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 F?e:F.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 d=n.get(o);if(!d){if(d=document.createElement("fieldset"),d.className="parameter-group",o!==""){const r=document.createElement("legend");r.textContent=o,d.append(r)}else d.classList.add("parameter-group-untitled"),d.style.border="0",d.style.padding="0",d.style.marginInline="0";n.set(o,d),this.container.append(d)}d.append(this.fieldOf(s))}g.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 d=o.closest("label, .parameter-row")??o;d.hidden=s.visibleWhen!==void 0&&!s.visibleWhen(e,i);const r=v.read(e,s.key);if(s.type==="number"){const a=o;a!==n&&(a.value=typeof r=="number"?L.shown(r,s):"");const c=L.boundsOf(s,e,i);a.min=String(c.min),a.max=String(c.max);const l=s.effective?.(e,i);a.placeholder=l!==void 0?L.shown(l,s):this.read(s.placeholder)??"",a.classList.toggle("parameter-derived",r===void 0)}else if(s.type==="choice"){const a=o,c=s.optionsOf?.(e,i)??s.choices;if([...a.options].filter(l=>l.value!=="").map(l=>l.value).join(`
90
+ `))&&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 d=this.getRootNode().activeElement,r=(h,p)=>{h!==d&&(h.value=p===void 0?"":String(p))},a=this.localValue(),c=this.reference();if(r(this.eastField,a?w.metres(a.eastM-c.eastM):void 0),r(this.northField,a?w.metres(a.northM-c.northM):void 0),this.isGeo&&!this.relativeShown)return;const l=this.geoValue();r(this.latField,l?w.degrees(l.lat):void 0),r(this.lngField,l?w.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=E.typed(this.eastField),e=E.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=w.toGeo(n,o)}this.shownValue=s,this.tell(s,w.relative(t,e,this.referenceId))}typedGeo(){const t=E.typed(this.latField),e=E.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=w.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?w.isAbsolute(e):w.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(q)||customElements.define(q,E)}class N{constructor(t,e,i=()=>{},n){this.read=t,this.edit=e,this.context=i,this.place=n}static inPlace(t){return new N(()=>t,e=>e(t))}}class L{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 N?e:N.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 d=n.get(o);if(!d){if(d=document.createElement("fieldset"),d.className="parameter-group",o!==""){const r=document.createElement("legend");r.textContent=o,d.append(r)}else d.classList.add("parameter-group-untitled"),d.style.border="0",d.style.padding="0",d.style.marginInline="0";n.set(o,d),this.container.append(d)}d.append(this.fieldOf(s))}g.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 d=o.closest("label, .parameter-row")??o;d.hidden=s.visibleWhen!==void 0&&!s.visibleWhen(e,i);const r=v.read(e,s.key);if(s.type==="number"){const a=o;a!==n&&(a.value=typeof r=="number"?L.shown(r,s):"");const c=L.boundsOf(s,e,i);a.min=String(c.min),a.max=String(c.max);const l=s.effective?.(e,i);a.placeholder=l!==void 0?L.shown(l,s):this.read(s.placeholder)??"",a.classList.toggle("parameter-derived",r===void 0)}else if(s.type==="choice"){const a=o,c=s.optionsOf?.(e,i)??s.choices;if([...a.options].filter(l=>l.value!=="").map(l=>l.value).join(`
91
91
  `)!==c.map(l=>l.value).join(`
92
- `)&&a.replaceChildren(...s.required?[]:[new Option("—","")],...c.map(l=>new Option(this.read(l.label)??l.value,l.value))),a!==n&&(a.value=typeof r=="string"&&c.some(l=>l.value===r)?r:s.required?a.options[0]?.value??"":""),!s.required){const l=s.effective?.(e,i),h=c.find(p=>p.value===l);a.options[0].textContent=h?this.read(h.label)??h.value:this.read(s.empty)??"—"}}else if(s.type==="boolean"){const a=o;a.checked=r===!0}else if(s.type==="colour"){const a=o;a!==n&&(a.value=L.swatchOf(r,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 a=o;a!==n&&(a.value=this.values?.said().read(v.read(e,s.key))??""),this.markMissing(s,a)}else{const a=o;a!==n&&(a.value=typeof r=="string"?r:"",a.classList.remove("invalid"),a.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(d=>new Option(this.read(d.label)??d.value,d.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 d=[...o.querySelectorAll("input:checked")].map(r=>r.value);this.write(t,d.length>0?d: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 d=o.value.trim();if(d==="")return t.required?void 0:this.write(t,void 0);const r=Number(d);Number.isFinite(r)&&this.write(t,r)})):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 d=this.target?.read(),r=this.values;!d||!r||(this.write(t,r.said().write(v.read(d,t.key),o.value,r.writingLanguage())),this.markMissing(t,o))})):(o.type="text",o.placeholder=this.read(t.placeholder)??"",o.addEventListener("input",()=>{const d=t.required||t.validate?o.value.trim():o.value,r=this.target?.read(),a=r!==void 0&&(t.required===!0&&d===""||d!==""&&t.validate?.(d,r,this.target.context())===!1);o.classList.toggle("invalid",a),a?o.setAttribute("aria-invalid","true"):o.removeAttribute("aria-invalid"),!a&&this.write(t,d===""?void 0:d)}),o.addEventListener("change",()=>{if(!o.classList.contains("invalid"))return;o.classList.remove("invalid"),o.removeAttribute("aria-invalid");const d=this.target?.read(),r=d===void 0?void 0:v.read(d,t.key);o.value=typeof r=="string"?r:""})),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){Y();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 d=this.target?.place;return d&&(e.messages=d.messages()),e.basisShown=d?.basis!==void 0,e.addEventListener("positionchange",r=>{const{value:a,said:c}=r.detail;this.writePosition(t,a,c)}),e.addEventListener("basischange",r=>this.target?.place?.basis?.write(t,r.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=v.read(i,t.key),o=v.read(i,t.secondKey),d=typeof s=="number"&&typeof o=="number";e.value=d?t.native==="geo"?{lat:s,lng:o}:{eastM:s,northM:o}:void 0;const r=v.read(i,t.saidKey),a=JSON.stringify(r??null);e.dataset.said!==a&&(e.dataset.said=a,e.said=r),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],d=t.native==="geo"?r=>Math.round(r*1e7)/1e7:r=>Math.round(r*1e3)/1e3;this.positionOf(t)?.setAttribute("data-said",JSON.stringify(i??null)),n.edit(r=>{v.write(r,t.key,d(s)),v.write(r,t.secondKey,d(o)),v.write(r,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=v.read(i,t.key),o=new Set(Array.isArray(s)?s:[]),d=t.options(i,n);if(d.length===0){e.textContent=this.read(t.empty)??"";return}[...e.querySelectorAll("input")].map(a=>a.value).join(`
92
+ `)&&a.replaceChildren(...s.required?[]:[new Option("—","")],...c.map(l=>new Option(this.read(l.label)??l.value,l.value))),a!==n&&(a.value=typeof r=="string"&&c.some(l=>l.value===r)?r:s.required?a.options[0]?.value??"":""),!s.required){const l=s.effective?.(e,i),h=c.find(p=>p.value===l);a.options[0].textContent=h?this.read(h.label)??h.value:this.read(s.empty)??"—"}}else if(s.type==="boolean"){const a=o;a.checked=r===!0}else if(s.type==="colour"){const a=o;a!==n&&(a.value=L.swatchOf(r,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 a=o;a!==n&&(a.value=this.values?.said().read(v.read(e,s.key))??""),this.markMissing(s,a)}else{const a=o;a!==n&&(a.value=typeof r=="string"?r:"",a.classList.remove("invalid"),a.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(d=>new Option(this.read(d.label)??d.value,d.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 d=[...o.querySelectorAll("input:checked")].map(r=>r.value);this.write(t,d.length>0?d: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 d=o.value.trim();if(d==="")return t.required?void 0:this.write(t,void 0);const r=Number(d);Number.isFinite(r)&&this.write(t,r)})):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.style.setProperty("field-sizing","content"),o.style.minWidth="10em",o.style.maxWidth="100%",o.addEventListener("input",()=>{const d=this.target?.read(),r=this.values;!d||!r||(this.write(t,r.said().write(v.read(d,t.key),o.value,r.writingLanguage())),this.markMissing(t,o))})):(o.type="text",o.placeholder=this.read(t.placeholder)??"",o.addEventListener("input",()=>{const d=t.required||t.validate?o.value.trim():o.value,r=this.target?.read(),a=r!==void 0&&(t.required===!0&&d===""||d!==""&&t.validate?.(d,r,this.target.context())===!1);o.classList.toggle("invalid",a),a?o.setAttribute("aria-invalid","true"):o.removeAttribute("aria-invalid"),!a&&this.write(t,d===""?void 0:d)}),o.addEventListener("change",()=>{if(!o.classList.contains("invalid"))return;o.classList.remove("invalid"),o.removeAttribute("aria-invalid");const d=this.target?.read(),r=d===void 0?void 0:v.read(d,t.key);o.value=typeof r=="string"?r:""})),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 d=this.target?.place;return d&&(e.messages=d.messages()),e.basisShown=d?.basis!==void 0,e.addEventListener("positionchange",r=>{const{value:a,said:c}=r.detail;this.writePosition(t,a,c)}),e.addEventListener("basischange",r=>this.target?.place?.basis?.write(t,r.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=v.read(i,t.key),o=v.read(i,t.secondKey),d=typeof s=="number"&&typeof o=="number";e.value=d?t.native==="geo"?{lat:s,lng:o}:{eastM:s,northM:o}:void 0;const r=v.read(i,t.saidKey),a=JSON.stringify(r??null);e.dataset.said!==a&&(e.dataset.said=a,e.said=r),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],d=t.native==="geo"?r=>Math.round(r*1e7)/1e7:r=>Math.round(r*1e3)/1e3;this.positionOf(t)?.setAttribute("data-said",JSON.stringify(i??null)),n.edit(r=>{v.write(r,t.key,d(s)),v.write(r,t.secondKey,d(o)),v.write(r,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=v.read(i,t.key),o=new Set(Array.isArray(s)?s:[]),d=t.options(i,n);if(d.length===0){e.textContent=this.read(t.empty)??"";return}[...e.querySelectorAll("input")].map(a=>a.value).join(`
93
93
  `)===d.map(a=>a.value).join(`
94
- `)||e.replaceChildren(...d.map(a=>{const c=document.createElement("label"),l=document.createElement("input");return l.type="checkbox",l.value=a.value,c.append(l," ",a.label),c}));for(const a of e.querySelectorAll("input"))a.checked=o.has(a.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=L.boundsOf(t,s,i.context());n=Math.max(o.min,Math.min(o.max,e))/(t.scale??1)}}i.edit(s=>v.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{B as E,u as I,N as P,J as S,L as a,T as b,F as c};
94
+ `)||e.replaceChildren(...d.map(a=>{const c=document.createElement("label"),l=document.createElement("input");return l.type="checkbox",l.value=a.value,c.append(l," ",a.label),c}));for(const a of e.querySelectorAll("input"))a.checked=o.has(a.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=L.boundsOf(t,s,i.context());n=Math.max(o.min,Math.min(o.max,e))/(t.scale??1)}}i.edit(s=>v.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{O as E,u as I,F as P,I as S,L as a,$ as b,N as c};
@@ -1,4 +1,4 @@
1
- import{G as F,e as P,C as H,g as K,B as w,h as N,d as U,i as k}from"./rr0-scene.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=>({...K(A.lat,A.lng,s,e),altitudeM:A.altitudeM}))})).filter(({line:p,path:A})=>p.level>=0&&l.within(A,o)),M=l.altitudeOffset(r,n),a=r.flatMap(({line:p,path:A})=>{const d=this.layoutOf(p,A);return d?[{line:p,layout:d}]:[]}),i=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 w;return e.setAttribute("position",new N(new Float32Array(t.positions),3)),t.along.length>0&&e.setAttribute("aAlong",new N(new Float32Array(t.along),1)),e.setIndex(new N(new Uint32Array(t.indices),1)),e.computeVertexNormals(),new U(e,s)}static lambert(t,s){return new k({color:new H(...t),...s?{polygonOffset:!0,polygonOffsetFactor:-2,polygonOffsetUnits:-2}:{}})}static pebbled(t){return t.onBeforeCompile=s=>{s.vertexShader=s.vertexShader.replace("#include <common>",`#include <common>
1
+ import{G as F,h as P,C as H,g as K,B as w,i as N,e as U,j as k}from"./rr0-scene.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=>({...K(A.lat,A.lng,s,e),altitudeM:A.altitudeM}))})).filter(({line:p,path:A})=>p.level>=0&&l.within(A,o)),M=l.altitudeOffset(r,n),a=r.flatMap(({line:p,path:A})=>{const d=this.layoutOf(p,A);return d?[{line:p,layout:d}]:[]}),i=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 w;return e.setAttribute("position",new N(new Float32Array(t.positions),3)),t.along.length>0&&e.setAttribute("aAlong",new N(new Float32Array(t.along),1)),e.setIndex(new N(new Uint32Array(t.indices),1)),e.computeVertexNormals(),new U(e,s)}static lambert(t,s){return new k({color:new H(...t),...s?{polygonOffset:!0,polygonOffsetFactor:-2,polygonOffsetUnits:-2}:{}})}static pebbled(t){return t.onBeforeCompile=s=>{s.vertexShader=s.vertexShader.replace("#include <common>",`#include <common>
2
2
  varying vec3 vBallast;`).replace("#include <begin_vertex>",`#include <begin_vertex>
3
3
  vBallast = position;`),s.fragmentShader=s.fragmentShader.replace("#include <common>",`#include <common>
4
4
  varying vec3 vBallast;
@@ -1,4 +1,4 @@
1
- import{aT as w,_ as u,R as v,aU as M}from"./rr0-scene.mjs";import{S as P,a as b,c as x,b as C,I as T,E as F}from"./ParameterForm-BMIW4Gkh.js";import{T as _}from"./TimelineTracks-B-bXAaF7.js";const A=w.catalog({en:()=>u(()=>import("./ReentryParameterTexts_en-BH1tGP5C.js"),[],import.meta.url).then(h=>h.reentryParameterTexts_en),fr:()=>u(()=>import("./ReentryParameterTexts_fr-C8ROK57p.js"),[],import.meta.url).then(h=>h.reentryParameterTexts_fr),es:()=>u(()=>import("./ReentryParameterTexts_es-BDMJ4K1g.js"),[],import.meta.url).then(h=>h.reentryParameterTexts_es),it:()=>u(()=>import("./ReentryParameterTexts_it-CwC8vNTI.js"),[],import.meta.url).then(h=>h.reentryParameterTexts_it)});class a{static NAME="name";static OBJECT="object";static LIGHT="light";static WHEN="when";static placeAt(e,t){const r=v.leadAt(e,t);if(r)return{t,lat:r.lat,lng:r.lng,altitudeKm:r.heightM/1e3};const i=e.track,[n,s]=t<(i[0]?.t??0)?[i[0],i[1]]:[i[i.length-2],i[i.length-1]];if(!n||!s||s.t===n.t){const d=n??s??{lat:0,lng:0,altitudeKm:80};return{t,lat:d.lat,lng:d.lng,altitudeKm:d.altitudeKm}}const l=(t-n.t)/(s.t-n.t);return{t,lat:n.lat+(s.lat-n.lat)*l,lng:n.lng+(s.lng-n.lng)*l,altitudeKm:Math.max(0,n.altitudeKm+(s.altitudeKm-n.altitudeKm)*l)}}static curvePointAt(e,t){return{t,absoluteMagnitude:Math.round(v.absoluteMagnitudeAt(e,t)*10)/10}}static instantsOf(e){return[...e.track.map(t=>t.t),...e.fragments.flatMap(t=>[...t.fromT===void 0?[]:[t.fromT],...t.untilT===void 0?[]:[t.untilT],...(t.lightCurve??[]).map(r=>r.t)])]}static instant(e,t,r,i={}){return{type:"number",key:e,min:-3600,max:36e3,step:.1,unit:"s",scale:.001,label:t,hint:r,...i}}static SET={kind:"reentry",title:"fireballOrReEntry",parameters:[{type:"said",key:"title",label:a.NAME},{type:"text",key:"object.name",group:a.OBJECT,label:"catalogueName",hint:"forAReEntryThePiece"},{type:"text",key:"object.cosparId",group:a.OBJECT,label:"cosparId",placeholder:"t1968013c"},{type:"number",key:"object.norad",min:1,max:999999,step:1,group:a.OBJECT,label:"noradNumber"}]};static PLACE={kind:"reentry-place",title:"pointOfThePath",parameters:[a.instant("t","time","secondsOfTheRecordingNegativeBefore",{required:!0}),{type:"position",key:"lat",secondKey:"lng",saidKey:"saidPosition",native:"geo",step:1,rangeM:2e6,label:"position"},{type:"number",key:"altitudeKm",min:0,max:300,step:.1,unit:"km",required:!0,label:"altitude",hint:"aboveTheEllipsoidAMeteorBegins"}]};static trackEnd(e,t){const r=e?.track;if(r?.length)return t==="first"?r[0].t:r[r.length-1].t}static FRAGMENT={kind:"reentry-fragment",title:"piece",parameters:[{type:"text",key:"id",label:"id",validate:(e,t,r)=>!r?.fragments.some(i=>i!==t&&i.id===e)},{type:"number",key:"absoluteMagnitude",min:-40,max:10,step:.1,required:!0,group:a.LIGHT,label:"absoluteMagnitude",hint:"itsBrightnessSeenFrom100Km"},{type:"colour",key:"color",group:a.LIGHT,fallback:v.DEFAULT_COLOR,label:"colour"},{type:"number",key:"trainS",min:0,max:600,step:.1,unit:"s",group:a.LIGHT,effective:()=>v.DEFAULT_TRAIN_S,label:"train",hint:"howLongAStretchOfIts"},{type:"number",key:"lagS",min:0,max:600,step:.1,unit:"s",group:a.WHEN,effective:()=>0,label:"behindTheLead",hint:"secondsBehindTheLeadingPointAlong"},a.instant("fromT","seenFrom","whenItBreaksOffOrBegins",{group:a.WHEN,effective:(e,t)=>a.trackEnd(t,"first")}),a.instant("untilT","outAt","whenItHasBurnedUpOr",{group:a.WHEN,effective:(e,t)=>a.trackEnd(t,"last")})]};static CURVE_POINT={kind:"reentry-curve-point",title:"pointOfTheLightCurve",parameters:[a.instant("t","time","secondsOfTheRecording",{required:!0}),{type:"number",key:"absoluteMagnitude",min:-40,max:10,step:.1,required:!0,label:"absoluteMagnitude"}]}}const L=w.catalog({en:()=>u(()=>import("./ReentryEditorMessages_en-O-YSmHxv.js"),[],import.meta.url).then(h=>h.reentryEditorMessages_en),fr:()=>u(()=>import("./ReentryEditorMessages_fr-xuC-qZ6M.js"),[],import.meta.url).then(h=>h.reentryEditorMessages_fr),es:()=>u(()=>import("./ReentryEditorMessages_es-CvO9Jwz5.js"),[],import.meta.url).then(h=>h.reentryEditorMessages_es),it:()=>u(()=>import("./ReentryEditorMessages_it-B7vyCX9o.js"),[],import.meta.url).then(h=>h.reentryEditorMessages_it)});class m{constructor(e,t,r){this.container=e,this.host=t,P.attach(e,"reentry-editor-part",m.STYLE),this.language=r,this.ready=this.setLanguage(r)}messages;ready;parameterTexts;languageToken=0;currentId;form;list;timeline;placeForm;placeIndex=0;row="path";fragmentForm;fragmentIndex=0;curveForm;curveIndex=0;language;shown=[];static STYLE='.reentry-editor-part { flex-basis: 100%; min-width: 0; } .reentry-editor-part #reentry-timeline { flex-basis: 100%; min-width: 0; padding: 4px 0; } .reentry-editor-part #reentry-path > .icon-btn, .reentry-editor-part #reentry-curve > .icon-btn { align-self: flex-end; } .reentry-editor-part #reentry-list, .reentry-editor-part #reentry-places, .reentry-editor-part #reentry-fragment-list, .reentry-editor-part #reentry-curve-list { flex-basis: 100%; min-width: 0; } .reentry-editor-part .launch-editor, .reentry-editor-part .launch-fields { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; } .reentry-editor-part .launch-fields { flex-basis: 100%; min-width: 0; } .reentry-editor-part [hidden] { display: none !important; } .reentry-editor-part select { min-width: 0; width: 100%; } .reentry-editor-part .launch-intro { flex-basis: 100%; margin: 0; } .reentry-editor-part .launch-track { flex-basis: 100%; margin: 0; } .reentry-editor-part .launch-parameters { flex-basis: 100%; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; } .reentry-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; } .reentry-editor-part input, .reentry-editor-part select { max-width: 100%; box-sizing: border-box; } .reentry-editor-part input[type="text"] { width: 12em; } .reentry-editor-part input[data-key="title"] { width: 18em; } .reentry-editor-part label { min-width: 0; max-width: 100%; } .reentry-editor-part input.parameter-derived::placeholder { opacity: .65; } .reentry-editor-part .launch-path { flex: 1 1 100%; min-width: 0; box-sizing: border-box; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: flex-start; }';async setLanguage(e){const t=++this.languageToken;this.language=e;const[r,i]=await Promise.all([L.load(e),A.load(e)]);t===this.languageToken&&(this.messages=r,this.parameterTexts=i,this.render(),this.sync())}sync(){if(!this.messages)return;const e=this.reentries;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;this.element("reentry-fields").hidden=t===void 0,t&&(this.syncPlace(!0),this.syncFragments(t,!0),this.form??=new b(this.element("reentry-parameters"),this.language,"reentry.",{said:()=>this.host.said(),writingLanguage:()=>this.host.writingLanguage()}),this.form.show(this.resolved(a.SET),new x(()=>this.current,r=>this.editReentry(i=>{i.object&&(i.object={...i.object}),r(i),i.object&&Object.values(i.object).every(n=>n===void 0||n==="")&&delete i.object})),()=>this.written()))}refresh(){if(!this.messages)return;this.syncAddState();const e=this.reentries;if(e.length===this.shown.length&&e.every((t,r)=>t.id===this.shown[r].id)){this.syncTimeline();return}this.sync()}setTime(e){this.messages&&this.timeline?.setTime(e)}syncAddState(){const e=this.origin()!==void 0;this.list?.setAddState(e,e?void 0:this.messages.addNowhere)}get current(){return this.reentries.find(e=>e.id===this.currentId)}show(e){this.messages&&(this.currentId=e,this.row="path",this.placeIndex=0,this.fragmentIndex=0,this.curveIndex=0,this.sync())}resolved(e){return C.resolve(e,this.parameterTexts)}render(){if(!this.messages)return;const e=this.messages;this.form=void 0,this.container.innerHTML=`<div class="launch-editor">
1
+ import{c as w,_ as u,R as v,a$ as M}from"./rr0-scene.mjs";import{S as P,a as b,c as x,b as C,I as T,E as F}from"./ParameterForm-ez-n_0Dw.js";import{T as _}from"./TimelineTracks-BQXJMJaJ.js";const A=w.catalog({en:()=>u(()=>import("./ReentryParameterTexts_en-BH1tGP5C.js"),[],import.meta.url).then(h=>h.reentryParameterTexts_en),fr:()=>u(()=>import("./ReentryParameterTexts_fr-C8ROK57p.js"),[],import.meta.url).then(h=>h.reentryParameterTexts_fr),es:()=>u(()=>import("./ReentryParameterTexts_es-BDMJ4K1g.js"),[],import.meta.url).then(h=>h.reentryParameterTexts_es),it:()=>u(()=>import("./ReentryParameterTexts_it-CwC8vNTI.js"),[],import.meta.url).then(h=>h.reentryParameterTexts_it)});class a{static NAME="name";static OBJECT="object";static LIGHT="light";static WHEN="when";static placeAt(e,t){const r=v.leadAt(e,t);if(r)return{t,lat:r.lat,lng:r.lng,altitudeKm:r.heightM/1e3};const i=e.track,[n,s]=t<(i[0]?.t??0)?[i[0],i[1]]:[i[i.length-2],i[i.length-1]];if(!n||!s||s.t===n.t){const d=n??s??{lat:0,lng:0,altitudeKm:80};return{t,lat:d.lat,lng:d.lng,altitudeKm:d.altitudeKm}}const l=(t-n.t)/(s.t-n.t);return{t,lat:n.lat+(s.lat-n.lat)*l,lng:n.lng+(s.lng-n.lng)*l,altitudeKm:Math.max(0,n.altitudeKm+(s.altitudeKm-n.altitudeKm)*l)}}static curvePointAt(e,t){return{t,absoluteMagnitude:Math.round(v.absoluteMagnitudeAt(e,t)*10)/10}}static instantsOf(e){return[...e.track.map(t=>t.t),...e.fragments.flatMap(t=>[...t.fromT===void 0?[]:[t.fromT],...t.untilT===void 0?[]:[t.untilT],...(t.lightCurve??[]).map(r=>r.t)])]}static instant(e,t,r,i={}){return{type:"number",key:e,min:-3600,max:36e3,step:.1,unit:"s",scale:.001,label:t,hint:r,...i}}static SET={kind:"reentry",title:"fireballOrReEntry",parameters:[{type:"said",key:"title",label:a.NAME},{type:"text",key:"object.name",group:a.OBJECT,label:"catalogueName",hint:"forAReEntryThePiece"},{type:"text",key:"object.cosparId",group:a.OBJECT,label:"cosparId",placeholder:"t1968013c"},{type:"number",key:"object.norad",min:1,max:999999,step:1,group:a.OBJECT,label:"noradNumber"}]};static PLACE={kind:"reentry-place",title:"pointOfThePath",parameters:[a.instant("t","time","secondsOfTheRecordingNegativeBefore",{required:!0}),{type:"position",key:"lat",secondKey:"lng",saidKey:"saidPosition",native:"geo",step:1,rangeM:2e6,label:"position"},{type:"number",key:"altitudeKm",min:0,max:300,step:.1,unit:"km",required:!0,label:"altitude",hint:"aboveTheEllipsoidAMeteorBegins"}]};static trackEnd(e,t){const r=e?.track;if(r?.length)return t==="first"?r[0].t:r[r.length-1].t}static FRAGMENT={kind:"reentry-fragment",title:"piece",parameters:[{type:"text",key:"id",label:"id",validate:(e,t,r)=>!r?.fragments.some(i=>i!==t&&i.id===e)},{type:"number",key:"absoluteMagnitude",min:-40,max:10,step:.1,required:!0,group:a.LIGHT,label:"absoluteMagnitude",hint:"itsBrightnessSeenFrom100Km"},{type:"colour",key:"color",group:a.LIGHT,fallback:v.DEFAULT_COLOR,label:"colour"},{type:"number",key:"trainS",min:0,max:600,step:.1,unit:"s",group:a.LIGHT,effective:()=>v.DEFAULT_TRAIN_S,label:"train",hint:"howLongAStretchOfIts"},{type:"number",key:"lagS",min:0,max:600,step:.1,unit:"s",group:a.WHEN,effective:()=>0,label:"behindTheLead",hint:"secondsBehindTheLeadingPointAlong"},a.instant("fromT","seenFrom","whenItBreaksOffOrBegins",{group:a.WHEN,effective:(e,t)=>a.trackEnd(t,"first")}),a.instant("untilT","outAt","whenItHasBurnedUpOr",{group:a.WHEN,effective:(e,t)=>a.trackEnd(t,"last")})]};static CURVE_POINT={kind:"reentry-curve-point",title:"pointOfTheLightCurve",parameters:[a.instant("t","time","secondsOfTheRecording",{required:!0}),{type:"number",key:"absoluteMagnitude",min:-40,max:10,step:.1,required:!0,label:"absoluteMagnitude"}]}}const L=w.catalog({en:()=>u(()=>import("./ReentryEditorMessages_en-O-YSmHxv.js"),[],import.meta.url).then(h=>h.reentryEditorMessages_en),fr:()=>u(()=>import("./ReentryEditorMessages_fr-xuC-qZ6M.js"),[],import.meta.url).then(h=>h.reentryEditorMessages_fr),es:()=>u(()=>import("./ReentryEditorMessages_es-CvO9Jwz5.js"),[],import.meta.url).then(h=>h.reentryEditorMessages_es),it:()=>u(()=>import("./ReentryEditorMessages_it-B7vyCX9o.js"),[],import.meta.url).then(h=>h.reentryEditorMessages_it)});class m{constructor(e,t,r){this.container=e,this.host=t,P.attach(e,"reentry-editor-part",m.STYLE),this.language=r,this.ready=this.setLanguage(r)}messages;ready;parameterTexts;languageToken=0;currentId;form;list;timeline;placeForm;placeIndex=0;row="path";fragmentForm;fragmentIndex=0;curveForm;curveIndex=0;language;shown=[];static STYLE='.reentry-editor-part { flex-basis: 100%; min-width: 0; } .reentry-editor-part #reentry-timeline { flex-basis: 100%; min-width: 0; padding: 4px 0; } .reentry-editor-part #reentry-path > .icon-btn, .reentry-editor-part #reentry-curve > .icon-btn { align-self: flex-end; } .reentry-editor-part #reentry-list, .reentry-editor-part #reentry-places, .reentry-editor-part #reentry-fragment-list, .reentry-editor-part #reentry-curve-list { flex-basis: 100%; min-width: 0; } .reentry-editor-part .launch-editor, .reentry-editor-part .launch-fields { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; } .reentry-editor-part .launch-fields { flex-basis: 100%; min-width: 0; } .reentry-editor-part [hidden] { display: none !important; } .reentry-editor-part select { min-width: 0; width: 100%; } .reentry-editor-part .launch-intro { flex-basis: 100%; margin: 0; } .reentry-editor-part .launch-track { flex-basis: 100%; margin: 0; } .reentry-editor-part .launch-parameters { flex-basis: 100%; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; } .reentry-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; } .reentry-editor-part input, .reentry-editor-part select { max-width: 100%; box-sizing: border-box; } .reentry-editor-part input[type="text"] { width: 12em; } .reentry-editor-part input[data-key="title"] { width: 18em; } .reentry-editor-part label { min-width: 0; max-width: 100%; } .reentry-editor-part input.parameter-derived::placeholder { opacity: .65; } .reentry-editor-part .launch-path { flex: 1 1 100%; min-width: 0; box-sizing: border-box; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: flex-start; }';async setLanguage(e){const t=++this.languageToken;this.language=e;const[r,i]=await Promise.all([L.load(e),A.load(e)]);t===this.languageToken&&(this.messages=r,this.parameterTexts=i,this.render(),this.sync())}sync(){if(!this.messages)return;const e=this.reentries;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;this.element("reentry-fields").hidden=t===void 0,t&&(this.syncPlace(!0),this.syncFragments(t,!0),this.form??=new b(this.element("reentry-parameters"),this.language,"reentry.",{said:()=>this.host.said(),writingLanguage:()=>this.host.writingLanguage()}),this.form.show(this.resolved(a.SET),new x(()=>this.current,r=>this.editReentry(i=>{i.object&&(i.object={...i.object}),r(i),i.object&&Object.values(i.object).every(n=>n===void 0||n==="")&&delete i.object})),()=>this.written()))}refresh(){if(!this.messages)return;this.syncAddState();const e=this.reentries;if(e.length===this.shown.length&&e.every((t,r)=>t.id===this.shown[r].id)){this.syncTimeline();return}this.sync()}setTime(e){this.messages&&this.timeline?.setTime(e)}syncAddState(){const e=this.origin()!==void 0;this.list?.setAddState(e,e?void 0:this.messages.addNowhere)}get current(){return this.reentries.find(e=>e.id===this.currentId)}show(e){this.messages&&(this.currentId=e,this.row="path",this.placeIndex=0,this.fragmentIndex=0,this.curveIndex=0,this.sync())}resolved(e){return C.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
2
  <p class="launch-intro">${e.intro}</p>
3
3
  <div id="reentry-list"></div>
4
4
  <div id="reentry-fields" class="launch-fields">
@@ -1 +1 @@
1
- import{G,b1 as S,y as _,B as M,b2 as R,h as I,d as F,aX as f,aY as m,o as y,C as N,b3 as H,b4 as C,b5 as B,R as L}from"./rr0-scene.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 I(this.positions,3)),t.setAttribute("color",new I(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}=m(s.altitudeDeg,s.azimuthDeg,1);return new y(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 N;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:w,y:A,z:p}=m(a.head.altitudeDeg,a.head.azimuthDeg,h.RADIUS),[l,T,b]=o(a.head,c),z=a.fade,D=Math.max(r.r,r.g,r.b)||1;e[C(d)].push({x:w,y:A,z:p,r:l*r.r*z/D,g:T*r.g*z/D,b:b*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),w=new Float32Array(c.length*3);c.forEach((p,l)=>{d.set([p.x,p.y,p.z],l*3),w.set([p.r,p.g,p.b],l*3)}),a.geometry.dispose();const A=new M;A.setAttribute("position",new I(d,3)),A.setAttribute("color",new I(w,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=m(t[n].altitudeDeg,t[n].azimuthDeg,h.RADIUS),a=m(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),w=this.across(i,a,e,u),A=this.across(t,a,o,c),p=this.across(i,a,e,c),l=(T,b)=>T===0?b:0;s=this.push(s,d,l(u,n),r),s=this.push(s,w,l(u,E),r),s=this.push(s,A,l(c,n),r),s=this.push(s,w,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=B.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 k{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{k as ReentrySimulation};
1
+ import{G,bc as S,E as _,B as f,bd as M,i as w,e as F,b6 as R,b7 as I,p as N,C as y,be as H,bf as C,bg as B,R as L}from"./rr0-scene.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 f,M.material(i.size,!1));return M.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 f;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,R.material()),this.trains.frustumCulled=!1,R.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 f;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=B.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 k{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{k as ReentrySimulation};
@@ -0,0 +1 @@
1
+ import{g as D,a5 as A,a6 as b,a7 as M,a8 as p,a9 as O,e as I,N as x,aa as T,ab as S,ac as N,ad as F}from"./rr0-scene.mjs";class h{static SEEK_BEYOND_S=.25;static SAME_FRAME_S=1/60;static CATCH_UP_SHARE=.1;static MIN_RATE=.0625;static MAX_RATE=16;static rollOfPicture(t){return t&&-t}static kindOfSource(t){if(t.type?.startsWith("video/"))return"video";if(t.type?.startsWith("image/"))return"photo";const i=t.url??"";if(i.startsWith("data:video/")||/\.(mp4|m4v|webm|ogv|mov)(?:[?#].*)?$/i.test(i))return"video";if(i.startsWith("data:image/")||/\.(jpe?g|png|gif|webp|avif)(?:[?#].*)?$/i.test(i))return"photo"}static mediaSecondsAt(t,i,s,a){const e=t.video?.fromS??0,o=t.video?.toS??a??Number.POSITIVE_INFINITY,n=i-(t.t??0);if(n<0)return;const r=e+n/(h.positive(s)*1e3)*h.rateOf(t);return r<=o?r:void 0}static rateOf(t){return h.positive(t.video?.rate??1)}static registrationAt(t,i){const s=t.registration,a=t.registrationTrack;if(!a||a.length===0)return s;let e=a.findIndex(E=>E.t>i);e===-1&&(e=a.length);const o=a[Math.max(e-1,0)],n=a[Math.min(e,a.length-1)],r=n.t>o.t?Math.min(Math.max((i-o.t)/(n.t-o.t),0),1):0,c=((n.headingDeg-o.headingDeg)%360+540)%360-180,f=o.rollDeg??0,y=n.rollDeg??0,v=f+(y-f)*r,w=o.fovDeg??s.fovDeg;return{headingDeg:((o.headingDeg+c*r)%360+360)%360,pitchDeg:o.pitchDeg+(n.pitchDeg-o.pitchDeg)*r,rollDeg:v===0?void 0:v,fovDeg:w+((n.fovDeg??s.fovDeg)-w)*r}}static keyIndexAt(t,i){return(t.registrationTrack??[]).findIndex(s=>Math.abs(s.t-i)<20)}static withKey(t,i,s){const a={t:i,...s},e=h.keyIndexAt(t,i),n=[...(t.registrationTrack??[]).filter((r,c)=>c!==e),e>=0?{...a,t:t.registrationTrack[e].t}:a].sort((r,c)=>r.t-c.t);return{...t,registrationTrack:n,registration:h.plainOf(n[0],t.registration)}}static withoutKey(t,i){const s=h.keyIndexAt(t,i);if(s<0)return t;const a=t.registrationTrack.filter((e,o)=>o!==s);return a.length===0?{...t,registrationTrack:void 0}:{...t,registrationTrack:a,registration:h.plainOf(a[0],t.registration)}}static plainOf(t,i){return{headingDeg:t.headingDeg,pitchDeg:t.pitchDeg,rollDeg:t.rollDeg,fovDeg:t.fovDeg??i.fovDeg}}static command(t,i,s,a){const e=Math.min(Math.max(a,h.MIN_RATE),h.MAX_RATE),o=i-t;if(!s)return{seekS:Math.abs(o)>h.SAME_FRAME_S?i:void 0,play:!1,rate:e};if(Math.abs(o)>h.SEEK_BEYOND_S)return{seekS:i,play:!0,rate:e};const n=Math.min(Math.max(o/h.SEEK_BEYOND_S,-1),1)*h.CATCH_UP_SHARE;return{play:!0,rate:Math.min(Math.max(e*(1+n),h.MIN_RATE),h.MAX_RATE)}}static positive(t){return t>0?t:1}}class u extends Error{constructor(t,i){super(`${t}: ${i.kind==="status"?i.status:i.kind}`),this.src=t,this.failure=i}}class g{static async blob(t){let i;try{i=await fetch(t)}catch{throw new u(t,await g.whyUnread(t))}if(!i.ok)throw new u(t,{kind:"status",status:i.status});const s=await i.blob();if(s.type&&!s.type.startsWith("image/"))throw new u(t,{kind:"notPicture"});return s}static failureOf(t){return t instanceof u?t.failure:{kind:"notPicture"}}static async whyVideoUnread(t){if(t.startsWith("data:")||t.startsWith("blob:"))return{kind:"notVideo"};let i;try{i=await fetch(t,{method:"HEAD"})}catch{return g.whyUnread(t)}return i.ok?{kind:"notVideo"}:{kind:"status",status:i.status}}static async whyUnread(t){try{return await fetch(t,{mode:"no-cors"}),{kind:"notShared"}}catch{return{kind:"unreachable"}}}}const k=3,m=800,l=Math.PI/180;class d{constructor(t,i,s=d.fetchImage,a=d.openVideo){this.scene=t,this.onImageLoaded=i,this.loadImage=s,this.loadVideo=a}meshes=new Map;signatures=new Map;images=new Map;loading=new Map;failed=new Map;references=[];views=new Map;shown=!0;observerAt;clock={t:0,playing:!1,timeScale:1};static PRESENT_WITHIN_M=2;static GONE_BEYOND_M=20;static presenceAt(t,i){if(!t.from||!i)return 1;const s=D(i.lat,i.lng,t.from.lat,t.from.lng),e=(Math.hypot(s.x,s.z)-d.PRESENT_WITHIN_M)/(d.GONE_BEYOND_M-d.PRESENT_WITHIN_M),o=Math.min(Math.max(e,0),1);return 1-o*o*(3-2*o)}set(t,i=this.views,s){this.references=t,this.observerAt=s,this.views=i;const a=new Set(t.map(e=>e.id));for(const[e,o]of this.meshes)a.has(e)||(this.dispose(o),this.meshes.delete(e),this.signatures.delete(e));for(const[e,o]of this.images){const n=t.find(c=>c.id===e);if(n&&n.src===o.texture.userData.src&&n.kind==="video"==(o.video!==void 0))continue;d.release(o),this.images.delete(e);const r=this.meshes.get(e);r&&(this.dispose(r),this.meshes.delete(e),this.signatures.delete(e))}for(const e of t){const o=this.images.get(e.id);if(!o){this.load(e);continue}this.build(e,o)}this.follow()}setTime(t){this.clock=t,this.follow()}setShown(t){this.shown=t;for(const i of this.meshes.values())i.visible=t&&this.opacityOf(i.userData.id)>0}setView(t,i){this.views.set(t,i);const s=this.meshes.get(t);s&&this.applyOpacity(s,t)}layer=k;get any(){for(const t of this.meshes.values())if(t.visible)return!0;return!1}place(t){const i=this.held;i&&t.getWorldQuaternion(this.cameraTurn);for(const s of this.meshes.values()){if(!s.visible)continue;s.position.copy(t.position);const a=i?.get(s);a&&s.quaternion.copy(this.cameraTurn).multiply(a),s.updateMatrixWorld()}}hold(t){t.getWorldQuaternion(this.cameraTurn);const i=this.cameraTurn.clone().invert();this.held=new Map([...this.meshes.values()].map(s=>[s,i.clone().multiply(s.quaternion)])),this.registered=new Map([...this.meshes.values()].map(s=>[s,s.quaternion.clone()]))}release(){if(this.held){for(const[t,i]of this.registered??[])t.quaternion.copy(i);this.held=void 0,this.registered=void 0}}registered;held;cameraTurn=new A;get furthestM(){return this.meshes.size>0?m:0}directionOfPixel(t,i,s,a){const e=this.images.get(t.id),o=e?e.width/e.height:1,n=h.registrationAt(t,this.clock.t),r=Math.tan(n.fovDeg/2*l),c=r*o;return a.set((i*2-1)*c,(1-s*2)*r,-1).normalize(),a.applyQuaternion(d.orientation(n))}aspectOf(t){const i=this.images.get(t);return i?i.width/i.height:void 0}failureOf(t){return this.failed.get(t)}follow(){for(const t of this.references){const i=this.meshes.get(t.id),s=this.images.get(t.id)?.video;s&&this.sync(t,s),i&&(t.registrationTrack?.length&&d.point(i,t,h.registrationAt(t,this.clock.t)),t.kind==="video"&&this.applyOpacity(i,t.id))}}sync(t,i){const s=h.mediaSecondsAt(t,this.clock.t,this.clock.timeScale,Number.isFinite(i.duration)?i.duration:void 0);if(s===void 0){i.paused||i.pause();return}const a=h.command(i.currentTime,s,this.clock.playing,h.rateOf(t));i.playbackRate=a.rate,a.seekS!==void 0&&!i.seeking&&(i.currentTime=a.seekS),a.play&&i.paused&&i.play().catch(()=>{}),!a.play&&!i.paused&&i.pause()}load(t){const i=t.src;if(this.loading.has(t.id)||this.failed.has(i))return;const s=t.kind==="video",e=(s?this.loadVideo(i,()=>this.onVideoFrame()):this.loadImage(i)).then(o=>{this.loading.delete(t.id);const n=this.references.find(r=>r.id===t.id);if(!n||n.src!==i||n.kind==="video"!==s){d.release(o);return}o.texture.userData.src=i,this.images.set(t.id,o),this.build(n,o),this.follow(),this.onImageLoaded()},o=>{this.loading.delete(t.id),this.failed.set(i,g.failureOf(o)),this.onImageLoaded()});this.loading.set(t.id,e)}onVideoFrame(){this.follow(),this.onFrame?.()}onFrame;static openVideo(t,i){return new Promise((s,a)=>{const e=document.createElement("video");e.crossOrigin="anonymous",e.muted=!0,e.playsInline=!0,e.preload="auto",e.addEventListener("loadeddata",()=>{const o=new b(e);o.colorSpace=M,o.minFilter=p,o.magFilter=p,o.generateMipmaps=!1,e.addEventListener("seeked",i);const n=()=>{e.paused&&i(),e.src&&e.requestVideoFrameCallback(n)};"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback(n),s({texture:o,width:e.videoWidth,height:e.videoHeight,video:e})},{once:!0}),e.addEventListener("error",()=>{g.whyVideoUnread(t).then(o=>a(new u(t,o)))},{once:!0}),e.src=t})}static release(t){t.texture.dispose();const i=t.video;i&&(i.pause(),i.removeAttribute?.("src"),i.load?.())}static async fetchImage(t){const i=await g.blob(t),s=await createImageBitmap(i,{imageOrientation:"flipY"}).catch(()=>{throw new u(t,{kind:"notPicture"})}),a=new O(s);return a.flipY=!1,a.colorSpace=M,a.minFilter=p,a.magFilter=p,a.generateMipmaps=!1,a.needsUpdate=!0,{texture:a,width:s.width,height:s.height}}build(t,i){const s=d.signatureOf(t,i);let a=this.meshes.get(t.id);if(a&&this.signatures.get(t.id)===s){this.applyOpacity(a,t.id);return}a&&(this.dispose(a),this.meshes.delete(t.id)),a=new I(d.geometryOf(t,i),new x({map:i.texture,transparent:!0,depthTest:!1,depthWrite:!1,fog:!1,toneMapped:!1})),t.kind==="panorama"&&(a.material.side=T),a.frustumCulled=!1,a.layers.set(k),a.userData.id=t.id,d.point(a,t,h.registrationAt(t,this.clock.t)),this.scene.add(a),this.meshes.set(t.id,a),this.signatures.set(t.id,s),this.applyOpacity(a,t.id)}static geometryOf(t,i){if(t.kind==="panorama"){const o=new S(m,64,32,Math.PI/2,Math.PI*2),n=o.attributes.uv;for(let r=0;r<n.count;r++)n.setX(r,1-n.getX(r));return n.needsUpdate=!0,o}const s=2*m*Math.tan(t.registration.fovDeg/2*l),a=s*(i.width/Math.max(i.height,1)),e=new N(a,s);return e.translate(0,0,-m),e}static orientation({headingDeg:t,pitchDeg:i,rollDeg:s}){const a=new F;return a.rotation.set(i*l,-t*l,-(s??0)*l,"YXZ"),a.quaternion}static point(t,i,s){if(t.quaternion.copy(d.orientation(s)),i.kind==="panorama")return;const a=Math.tan(s.fovDeg/2*l)/Math.tan(i.registration.fovDeg/2*l);t.scale.set(a,a,1)}inTime(t){if(t.kind!=="video")return!0;const i=this.images.get(t.id)?.video?.duration;return h.mediaSecondsAt(t,this.clock.t,this.clock.timeScale,i!==void 0&&Number.isFinite(i)?i:void 0)!==void 0}opacityOf(t){const i=this.references.find(e=>e.id===t);if(i&&!this.inTime(i))return 0;const s=this.views.get(t),a=i?d.presenceAt(i,this.observerAt):1;return(s?.opacity??i?.opacity??0)*a}applyOpacity(t,i){const s=this.opacityOf(i);t.material.opacity=s,t.visible=this.shown&&s>0}static signatureOf(t,i){const{headingDeg:s,pitchDeg:a,rollDeg:e,fovDeg:o}=t.registration;return[t.kind,t.src,i.width,i.height,s,a,e??0,o].join("|")}dispose(t){this.scene.remove(t),t.geometry.dispose(),t.material.dispose()}disposeAll(){for(const t of this.meshes.values())this.dispose(t);this.meshes.clear(),this.signatures.clear();for(const t of this.images.values())d.release(t);this.images.clear()}}export{k as REFERENCE_LAYER,d as ReferenceSystem};
@@ -1 +1 @@
1
- import{a7 as t,a8 as a}from"./rr0-scene.mjs";const r={bodies:{sun:"Sun",moon:"Moon",Venus:"Venus",Mars:"Mars",Jupiter:"Jupiter",Saturn:"Saturn"},stars:{},comets:{},novae:{},satelliteClasses:{},showers:{},lightRigs:{airliner:"Airliner",helicopter:"Helicopter","car-headlights":"Car, headlights on","car-hazards":"Car, hazard flashers","emergency-beacons":"Emergency vehicle beacons","traffic-signal":"Traffic light","pedestrian-signal":"Pedestrian light",streetlamp:"Streetlamp"},instruments:{eye:"Naked eye","rectilinear-lens":"Camera, unknown device","roamer-1-120":"Roamer 1, 120 film","instamatic-126":"Instamatic, 126 film","cine-35mm-broadcast":"35 mm film camera, seen on television","slr-35mm-50":"35 mm SLR, 50 mm lens","slr-35mm-zoom":"35 mm SLR, 70-210 mm zoom","phone-landscape":"Phone, held sideways","phone-portrait":"Phone, held upright",dashcam:"Dashcam",cctv:"Security camera",...a.names(),...t.names()},decorKinds:{building:"Building",tree:"Tree",shrub:"Shrub",bridge:"Bridge",wire:"Overhead line",crop:"Crop row",terrace:"Terrace (restanque)",mound:"Stone heap",wall:"Dry-stone wall",streetlight:"Streetlight",trafficlight:"Traffic light",crossing:"Pedestrian crossing",roadsign:"Road sign",vehicle:"Vehicle",observer:"Observer",aircraft:"Aircraft",entity:"Being"},compassPoints:["N","NNE","NE","ENE","E","ESE","SE","SSE","S","SSW","SW","WSW","W","WNW","NW","NNW"],towards:e=>`to the ${e}`,starTooltip:"{name} — mag {mag}, {alt}° above the horizon",starTooltipBelow:"{name} — mag {mag}, {alt}° below the horizontal",decorTooltip:"{name} — {size}, {distance} away",satelliteTooltip:"{name} — satellite, mag {mag}, {height} km up",afterimageTooltip:{name:"Afterimage, in the eye",detail:"{name}: where the image of a light brighter than the Sun fell, the retina's pigment is bleached: for a few seconds it goes on glowing, white then coloured, and then what is seen there looks darker. It stays where it is in the field of view whichever way the eye turns, and takes minutes to fade."},ghostTooltip:{ghost:"Ghost: {name}",halo:"Halo: {name}",double:"Double: {name}",unnamed:"a light",detail:"{name}. {cause}, {where}.",causes:{lens:"A reflection between two surfaces of the lens",sensor:"The sensor's reflection, sent back by its cover glass",filter:"The sensor's reflection, sent back by the filter",glass:"A reflection between the two faces of the glass in front of the lens",drops:"Light scattered by drops on the glass",condensation:"Light scattered by condensation on the glass",dirt:"Light scattered by dirt on the glass"},opposite:"across the centre of the picture from the light",sameSide:"on the same side of the centre as the light",around:"round the light",drop:{lens:"Drop on the lens",filter:"Drop on the filter",window:"Drop on the window",windscreen:"Drop on the windscreen"},dropDetail:"{name}. Like a small lens, it shows upside down and blurred what is on the other side of it, rather than what is behind it."},opticsTooltips:{halo22:"22° halo — a ring round the Sun, from light bent through hexagonal ice crystals in high cirrus; its inner edge is red, at 21.7°",halo46:"46° halo — a rarer, fainter ring: light entering a crystal by a side face and leaving by an end face",oddRadius:"{angle}° halo — an odd-radius ring, rare and faint, made by ice crystals with pyramid ends",parhelion:"Parhelion (sundog) — a bright coloured spot beside the Sun at its own height, from flat plates falling level; red toward the Sun",parhelion120:"120° parhelion — a faint white spot 120° from the Sun, from light reflected inside flat plates",upperTangentArc:"Upper tangent arc — a bright arc resting on top of the 22° halo, from columns lying level",lowerTangentArc:"Lower tangent arc — an arc touching the bottom of the 22° halo, from columns lying level",circumzenithal:"Circumzenithal arc — a vivid band of colour near the zenith, from light entering the top face of flat plates (only with the Sun under 32°)",circumhorizontal:"Circumhorizontal arc — a band of colour low in the sky, from light entering the side face of flat plates (only with the Sun over 58°)",parhelicCircle:"Parhelic circle — a white circle round the whole sky at the Sun's own height, from reflections on the vertical faces of flat plates",pillar:"Light pillar — a shaft of light standing above the Sun, from reflections off slightly tilted flat plates",subsun:"Subsun — a mirror image of the Sun below the horizon, from reflections off the flat faces of plates"},trafficTooltip:{unnamed:"Aircraft {hex}",altitude:"{value} ft",speed:"{value} kt",heading:"heading {value}°",position:"{distance} km away, {elevation}° above the horizon, {bearing}",heard:"Heard at {level} dB(A), left the aircraft {delay} s ago, {lag}° behind it: {character}{pitch}",rumble:"a low rumble, nothing above {cutoff} Hz",muffled:"a dull noise, nothing above {cutoff} Hz",broad:"a broad roar",pitchHigher:", pitch {percent} % higher",pitchLower:", pitch {percent} % lower",inaudible:"Not audible here: {level} dB(A) against {ambient} dB(A) of ambient noise",soundUnknown:"Its sound cannot be worked out: the aircraft was not recorded yet when it left",contrailPersistent:"Leaves a trail that lasts: the air is supersaturated over ice ({rhi} % over ice)",contrailShort:"Leaves a short-lived trail: the air is dry over ice ({rhi} % over ice)",military:"military",restricted:"identity withheld by its owner",candidate:"A compatible candidate, not an identification"},railwayTooltip:{kinds:{rail:"Railway",light_rail:"Light rail",tram:"Tramway",subway:"Metro",funicular:"Funicular"},highSpeed:"High-speed line",service:"Siding",singleTrack:"single track",tracks:"{count} tracks",overhead:"overhead wire {height} m above the rail",overheadVoltage:"overhead wire at {voltage}, {height} m above the rail",thirdRail:"third rail",thirdRailVoltage:"third rail at {voltage}",notElectrified:"not electrified",gauge:"{mm} mm gauge",metreGauge:"metre gauge",distance:"{distance} away"},credits:"Credits",notAVideo:"This is not a video",isASimulation:"It is a real-time simulation."};export{r as sceneNames_en};
1
+ import{af as t,ag as a}from"./rr0-scene.mjs";const r={bodies:{sun:"Sun",moon:"Moon",Venus:"Venus",Mars:"Mars",Jupiter:"Jupiter",Saturn:"Saturn"},stars:{},comets:{},novae:{},satelliteClasses:{},showers:{},lightRigs:{airliner:"Airliner",helicopter:"Helicopter","car-headlights":"Car, headlights on","car-hazards":"Car, hazard flashers","emergency-beacons":"Emergency vehicle beacons","traffic-signal":"Traffic light","pedestrian-signal":"Pedestrian light",streetlamp:"Streetlamp"},instruments:{eye:"Naked eye","rectilinear-lens":"Camera, unknown device","roamer-1-120":"Roamer 1, 120 film","instamatic-126":"Instamatic, 126 film","cine-35mm-broadcast":"35 mm film camera, seen on television","slr-35mm-50":"35 mm SLR, 50 mm lens","slr-35mm-zoom":"35 mm SLR, 70-210 mm zoom","phone-landscape":"Phone, held sideways","phone-portrait":"Phone, held upright",dashcam:"Dashcam",cctv:"Security camera",...a.names(),...t.names()},decorKinds:{building:"Building",tree:"Tree",shrub:"Shrub",bridge:"Bridge",wire:"Overhead line",crop:"Crop row",terrace:"Terrace (restanque)",mound:"Stone heap",wall:"Dry-stone wall",streetlight:"Streetlight",trafficlight:"Traffic light",crossing:"Pedestrian crossing",roadsign:"Road sign",vehicle:"Vehicle",observer:"Observer",aircraft:"Aircraft",entity:"Being"},compassPoints:["N","NNE","NE","ENE","E","ESE","SE","SSE","S","SSW","SW","WSW","W","WNW","NW","NNW"],towards:e=>`to the ${e}`,starTooltip:"{name} — mag {mag}, {alt}° above the horizon",starTooltipBelow:"{name} — mag {mag}, {alt}° below the horizontal",decorTooltip:"{name} — {size}, {distance} away",satelliteTooltip:"{name} — satellite, mag {mag}, {height} km up",afterimageTooltip:{name:"Afterimage, in the eye",detail:"{name}: where the image of a light brighter than the Sun fell, the retina's pigment is bleached: for a few seconds it goes on glowing, white then coloured, and then what is seen there looks darker. It stays where it is in the field of view whichever way the eye turns, and takes minutes to fade."},ghostTooltip:{ghost:"Ghost: {name}",halo:"Halo: {name}",double:"Double: {name}",unnamed:"a light",detail:"{name}. {cause}, {where}.",causes:{lens:"A reflection between two surfaces of the lens",sensor:"The sensor's reflection, sent back by its cover glass",filter:"The sensor's reflection, sent back by the filter",glass:"A reflection between the two faces of the glass in front of the lens",drops:"Light scattered by drops on the glass",condensation:"Light scattered by condensation on the glass",dirt:"Light scattered by dirt on the glass"},opposite:"across the centre of the picture from the light",sameSide:"on the same side of the centre as the light",around:"round the light",drop:{lens:"Drop on the lens",filter:"Drop on the filter",window:"Drop on the window",windscreen:"Drop on the windscreen"},dropDetail:"{name}. Like a small lens, it shows upside down and blurred what is on the other side of it, rather than what is behind it."},opticsTooltips:{halo22:"22° halo — a ring round the Sun, from light bent through hexagonal ice crystals in high cirrus; its inner edge is red, at 21.7°",halo46:"46° halo — a rarer, fainter ring: light entering a crystal by a side face and leaving by an end face",oddRadius:"{angle}° halo — an odd-radius ring, rare and faint, made by ice crystals with pyramid ends",parhelion:"Parhelion (sundog) — a bright coloured spot beside the Sun at its own height, from flat plates falling level; red toward the Sun",parhelion120:"120° parhelion — a faint white spot 120° from the Sun, from light reflected inside flat plates",upperTangentArc:"Upper tangent arc — a bright arc resting on top of the 22° halo, from columns lying level",lowerTangentArc:"Lower tangent arc — an arc touching the bottom of the 22° halo, from columns lying level",circumzenithal:"Circumzenithal arc — a vivid band of colour near the zenith, from light entering the top face of flat plates (only with the Sun under 32°)",circumhorizontal:"Circumhorizontal arc — a band of colour low in the sky, from light entering the side face of flat plates (only with the Sun over 58°)",parhelicCircle:"Parhelic circle — a white circle round the whole sky at the Sun's own height, from reflections on the vertical faces of flat plates",pillar:"Light pillar — a shaft of light standing above the Sun, from reflections off slightly tilted flat plates",subsun:"Subsun — a mirror image of the Sun below the horizon, from reflections off the flat faces of plates"},trafficTooltip:{unnamed:"Aircraft {hex}",altitude:"{value} ft",speed:"{value} kt",heading:"heading {value}°",position:"{distance} km away, {elevation}° above the horizon, {bearing}",heard:"Heard at {level} dB(A), left the aircraft {delay} s ago, {lag}° behind it: {character}{pitch}",rumble:"a low rumble, nothing above {cutoff} Hz",muffled:"a dull noise, nothing above {cutoff} Hz",broad:"a broad roar",pitchHigher:", pitch {percent} % higher",pitchLower:", pitch {percent} % lower",inaudible:"Not audible here: {level} dB(A) against {ambient} dB(A) of ambient noise",soundUnknown:"Its sound cannot be worked out: the aircraft was not recorded yet when it left",contrailPersistent:"Leaves a trail that lasts: the air is supersaturated over ice ({rhi} % over ice)",contrailShort:"Leaves a short-lived trail: the air is dry over ice ({rhi} % over ice)",military:"military",restricted:"identity withheld by its owner",candidate:"A compatible candidate, not an identification"},railwayTooltip:{kinds:{rail:"Railway",light_rail:"Light rail",tram:"Tramway",subway:"Metro",funicular:"Funicular"},highSpeed:"High-speed line",service:"Siding",singleTrack:"single track",tracks:"{count} tracks",overhead:"overhead wire {height} m above the rail",overheadVoltage:"overhead wire at {voltage}, {height} m above the rail",thirdRail:"third rail",thirdRailVoltage:"third rail at {voltage}",notElectrified:"not electrified",gauge:"{mm} mm gauge",metreGauge:"metre gauge",distance:"{distance} away"},credits:"Credits",notAVideo:"This is not a video",isASimulation:"It is a real-time simulation."};export{r as sceneNames_en};
@@ -1 +1 @@
1
- import{a7 as a,a8 as o}from"./rr0-scene.mjs";const r={bodies:{sun:"Sol",moon:"Luna",Venus:"Venus",Mars:"Marte",Jupiter:"Júpiter",Saturn:"Saturno"},stars:{Sirius:"Sirio",Canopus:"Canopo",Arcturus:"Arturo",Capella:"Capela",Procyon:"Proción",Aldebaran:"Aldebarán",Spica:"Espiga",Pollux:"Pólux",Castor:"Cástor",Regulus:"Régulo"},comets:{"halley-1910":"cometa Halley","brooks-1911":"cometa Brooks","skjellerup-maristany-1927":"cometa Skjellerup-Maristany","de-kock-paraskevopoulos-1941":"cometa de Kock-Paraskevopoulos","southern-1947":"cometa austral","eclipse-1948":"cometa del eclipse","arend-roland-1957":"cometa Arend-Roland","mrkos-1957":"cometa Mrkos","seki-lines-1962":"cometa Seki-Lines","ikeya-seki-1965":"cometa Ikeya-Seki","bennett-1970":"cometa Bennett","white-ortiz-bolelli-1970":"cometa White-Ortiz-Bolelli","kohoutek-1973":"cometa Kohoutek","west-1976":"cometa West","iras-araki-alcock-1983":"cometa IRAS-Araki-Alcock","halley-1986":"cometa Halley","hyakutake-1996":"cometa Hyakutake","hale-bopp-1997":"cometa Hale-Bopp","mcnaught-2007":"cometa McNaught","lovejoy-2011":"cometa Lovejoy","panstarrs-2013":"cometa PANSTARRS","neowise-2020":"cometa NEOWISE","tsuchinshan-atlas-2024":"cometa Tsuchinshan-ATLAS"},novae:{"sn-1006":"supernova de 1006","sn-1054":"supernova de 1054","sn-1181":"supernova de 1181","sn-1572":"supernova de Tycho","sn-1604":"supernova de Kepler","t-crb-1866":"nova de la Corona Boreal 1866","t-aur-1891":"nova de Auriga 1891","gk-per-1901":"nova de Perseo 1901","dn-gem-1912":"nova de Géminis 1912","v603-aql-1918":"nova del Águila 1918","v476-cyg-1920":"nova del Cisne 1920","rr-pic-1925":"nova del Pintor 1925","dq-her-1934":"nova de Hércules 1934","cp-lac-1936":"nova del Lagarto 1936","cp-pup-1942":"nova de la Popa 1942","t-crb-1946":"nova de la Corona Boreal 1946","v446-her-1960":"nova de Hércules 1960","v533-her-1963":"nova de Hércules 1963","hr-del-1967":"nova del Delfín 1967","lv-vul-1968":"nova de la Zorra 1968","fh-ser-1970":"nova de la Serpiente 1970","v1500-cyg-1975":"nova del Cisne 1975","v842-cen-1986":"nova del Centauro 1986","sn-1987a":"supernova 1987A","v1974-cyg-1992":"nova del Cisne 1992","v382-vel-1999":"nova de las Velas 1999","v1494-aql-1999":"nova del Águila 1999","v4743-sgr-2002":"nova de Sagitario 2002","rs-oph-2006":"nova de Ofiuco 2006","v1280-sco-2007":"nova de Escorpio 2007","v339-del-2013":"nova del Delfín 2013","v1369-cen-2013":"nova del Centauro 2013","rs-oph-2021":"nova de Ofiuco 2021"},satelliteClasses:{echo:"los globos Echo","iridium-flares":"los destellos de los Iridium",iss:"la Estación Espacial Internacional","starlink-trains":"los trenes de Starlink"},showers:{quadrantids:"Cuadrántidas",lyrids:"Líridas de abril","eta-aquariids":"Eta Acuáridas","alpha-capricornids":"Alfa Capricórnidas","southern-delta-aquariids":"Delta Acuáridas del Sur",perseids:"Perseidas","southern-taurids":"Táuridas del Sur",draconids:"Dracónidas de octubre",orionids:"Oriónidas","northern-taurids":"Táuridas del Norte",leonids:"Leónidas",geminids:"Gemínidas",ursids:"Úrsidas"},lightRigs:{airliner:"Avión de pasajeros",helicopter:"Helicóptero","car-headlights":"Coche, faros encendidos","car-hazards":"Coche, luces de emergencia","emergency-beacons":"Rotativos de vehículo de emergencia","traffic-signal":"Semáforo","pedestrian-signal":"Semáforo peatonal",streetlamp:"Farola"},instruments:{eye:"A simple vista","rectilinear-lens":"Cámara, modelo desconocido","roamer-1-120":"Roamer 1, película 120","instamatic-126":"Instamatic, película 126","cine-35mm-broadcast":"Cámara de 35 mm, vista en televisión","slr-35mm-50":"Réflex 35 mm, objetivo 50 mm","slr-35mm-zoom":"Réflex 35 mm, zoom 70-210 mm","phone-landscape":"Teléfono, en horizontal","phone-portrait":"Teléfono, en vertical",dashcam:"Cámara de salpicadero",cctv:"Cámara de vigilancia",...o.names(),...a.names()},decorKinds:{building:"Edificio",tree:"Árbol",shrub:"Arbusto",bridge:"Puente",wire:"Línea aérea",crop:"Hilera de cultivo",terrace:"Bancal (terraza)",mound:"Montón de piedras",wall:"Muro de piedra seca",streetlight:"Farola",trafficlight:"Semáforo",crossing:"Paso de peatones",roadsign:"Señal de tráfico",vehicle:"Vehículo",observer:"Testigo",aircraft:"Aeronave",entity:"Ser"},compassPoints:["N","NNE","NE","ENE","E","ESE","SE","SSE","S","SSO","SO","OSO","O","ONO","NO","NNO"],towards:e=>`al ${e}`,starTooltip:"{name} — mag {mag}, {alt}° sobre el horizonte",starTooltipBelow:"{name} — mag {mag}, {alt}° bajo la horizontal",decorTooltip:"{name} — {size}, a {distance}",satelliteTooltip:"{name} — satélite, mag {mag}, a {height} km de altitud",afterimageTooltip:{name:"Imagen remanente, en el ojo",detail:"{name}: donde cayó la imagen de una luz más brillante que el Sol, el pigmento de la retina está decolorado: durante unos segundos sigue brillando, blanca y luego de colores, y después lo que se ve allí parece más oscuro. Se queda en el mismo lugar del campo de visión hacia donde se gire la mirada, y tarda minutos en borrarse."},ghostTooltip:{ghost:"Reflejo: {name}",halo:"Halo: {name}",double:"Doble: {name}",unnamed:"una luz",detail:"{name}. {cause}, {where}.",causes:{lens:"Reflejo entre dos superficies del objetivo",sensor:"Reflejo del sensor devuelto por su vidrio protector",filter:"Reflejo del sensor devuelto por el filtro",glass:"Reflejo entre las dos caras del cristal delante del objetivo",drops:"Luz difundida por las gotas sobre el cristal",condensation:"Luz difundida por el vaho sobre el cristal",dirt:"Luz difundida por la suciedad sobre el cristal"},opposite:"al otro lado del centro de la imagen respecto a la luz",sameSide:"del mismo lado del centro que la luz",around:"alrededor de la luz",drop:{lens:"Gota en el objetivo",filter:"Gota en el filtro",window:"Gota en el cristal",windscreen:"Gota en el parabrisas"},dropDetail:"{name}. Como una pequeña lente, muestra al revés y desenfocado lo que hay al otro lado de ella, en lugar de lo que hay detrás."},opticsTooltips:{halo22:"Halo de 22° — un anillo alrededor del Sol, por luz desviada en cristales de hielo hexagonales de los cirros; su borde interior es rojo, a 21,7°",halo46:"Halo de 46° — un anillo más raro y débil: la luz entra por una cara lateral del cristal y sale por una cara del extremo",oddRadius:"Halo de {angle}° — un anillo de radio impar, raro y débil, hecho por cristales de hielo con extremos piramidales",parhelion:"Parhelio — una mancha brillante de colores junto al Sol, a su altura, por placas de hielo que caen planas; rojo hacia el Sol",parhelion120:"Parhelio de 120° — una mancha blanca débil a 120° del Sol, por luz reflejada dentro de placas planas",upperTangentArc:"Arco tangente superior — un arco brillante apoyado sobre el halo de 22°, por columnas tumbadas en horizontal",lowerTangentArc:"Arco tangente inferior — un arco que toca la base del halo de 22°, por columnas tumbadas en horizontal",circumzenithal:"Arco circuncenital — una banda de colores vivos cerca del cenit, por luz que entra por la cara superior de placas planas (solo con el Sol bajo 32°)",circumhorizontal:"Arco circunhorizontal — una banda de colores baja en el cielo, por luz que entra por la cara lateral de placas planas (solo con el Sol sobre 58°)",parhelicCircle:"Círculo parhélico — un círculo blanco alrededor de todo el cielo a la altura del Sol, por reflejos en las caras verticales de placas planas",pillar:"Pilar de luz — una columna de luz sobre el Sol, por reflejos en placas planas ligeramente inclinadas",subsun:"Subsol — una imagen del Sol bajo el horizonte, por reflejos en las caras planas de las placas"},trafficTooltip:{unnamed:"Aeronave {hex}",altitude:"{value} ft",speed:"{value} kt",heading:"rumbo {value}°",position:"a {distance} km, {elevation}° sobre el horizonte, {bearing}",heard:"Se oye a {level} dB(A), salió del avión hace {delay} s, {lag}° detrás de él: {character}{pitch}",rumble:"un rumor grave, nada por encima de {cutoff} Hz",muffled:"un ruido sordo, nada por encima de {cutoff} Hz",broad:"un rugido ancho",pitchHigher:", sonido {percent} % más agudo",pitchLower:", sonido {percent} % más grave",inaudible:"Inaudible aquí: {level} dB(A) frente a {ambient} dB(A) de ruido ambiente",soundUnknown:"Sonido no calculable: el avión aún no estaba registrado cuando salió",contrailPersistent:"Deja una estela que dura: el aire está sobresaturado respecto al hielo ({rhi} % respecto al hielo)",contrailShort:"Deja una estela breve: el aire está seco respecto al hielo ({rhi} % respecto al hielo)",military:"militar",restricted:"identidad oculta por su propietario",candidate:"Un candidato compatible, no una identificación"},railwayTooltip:{kinds:{rail:"Vía férrea",light_rail:"Metro ligero",tram:"Tranvía",subway:"Metro",funicular:"Funicular"},highSpeed:"Línea de alta velocidad",service:"Vía de servicio",singleTrack:"vía única",tracks:"{count} vías",overhead:"catenaria, hilo de contacto a {height} m sobre el carril",overheadVoltage:"catenaria a {voltage}, hilo de contacto a {height} m sobre el carril",thirdRail:"tercer carril",thirdRailVoltage:"tercer carril a {voltage}",notElectrified:"sin electrificar",gauge:"ancho de {mm} mm",metreGauge:"vía métrica",distance:"a {distance}"},credits:"Créditos",notAVideo:"Esto no es un vídeo",isASimulation:"Es una simulación en tiempo real."};export{r as sceneNames_es};
1
+ import{af as a,ag as o}from"./rr0-scene.mjs";const r={bodies:{sun:"Sol",moon:"Luna",Venus:"Venus",Mars:"Marte",Jupiter:"Júpiter",Saturn:"Saturno"},stars:{Sirius:"Sirio",Canopus:"Canopo",Arcturus:"Arturo",Capella:"Capela",Procyon:"Proción",Aldebaran:"Aldebarán",Spica:"Espiga",Pollux:"Pólux",Castor:"Cástor",Regulus:"Régulo"},comets:{"halley-1910":"cometa Halley","brooks-1911":"cometa Brooks","skjellerup-maristany-1927":"cometa Skjellerup-Maristany","de-kock-paraskevopoulos-1941":"cometa de Kock-Paraskevopoulos","southern-1947":"cometa austral","eclipse-1948":"cometa del eclipse","arend-roland-1957":"cometa Arend-Roland","mrkos-1957":"cometa Mrkos","seki-lines-1962":"cometa Seki-Lines","ikeya-seki-1965":"cometa Ikeya-Seki","bennett-1970":"cometa Bennett","white-ortiz-bolelli-1970":"cometa White-Ortiz-Bolelli","kohoutek-1973":"cometa Kohoutek","west-1976":"cometa West","iras-araki-alcock-1983":"cometa IRAS-Araki-Alcock","halley-1986":"cometa Halley","hyakutake-1996":"cometa Hyakutake","hale-bopp-1997":"cometa Hale-Bopp","mcnaught-2007":"cometa McNaught","lovejoy-2011":"cometa Lovejoy","panstarrs-2013":"cometa PANSTARRS","neowise-2020":"cometa NEOWISE","tsuchinshan-atlas-2024":"cometa Tsuchinshan-ATLAS"},novae:{"sn-1006":"supernova de 1006","sn-1054":"supernova de 1054","sn-1181":"supernova de 1181","sn-1572":"supernova de Tycho","sn-1604":"supernova de Kepler","t-crb-1866":"nova de la Corona Boreal 1866","t-aur-1891":"nova de Auriga 1891","gk-per-1901":"nova de Perseo 1901","dn-gem-1912":"nova de Géminis 1912","v603-aql-1918":"nova del Águila 1918","v476-cyg-1920":"nova del Cisne 1920","rr-pic-1925":"nova del Pintor 1925","dq-her-1934":"nova de Hércules 1934","cp-lac-1936":"nova del Lagarto 1936","cp-pup-1942":"nova de la Popa 1942","t-crb-1946":"nova de la Corona Boreal 1946","v446-her-1960":"nova de Hércules 1960","v533-her-1963":"nova de Hércules 1963","hr-del-1967":"nova del Delfín 1967","lv-vul-1968":"nova de la Zorra 1968","fh-ser-1970":"nova de la Serpiente 1970","v1500-cyg-1975":"nova del Cisne 1975","v842-cen-1986":"nova del Centauro 1986","sn-1987a":"supernova 1987A","v1974-cyg-1992":"nova del Cisne 1992","v382-vel-1999":"nova de las Velas 1999","v1494-aql-1999":"nova del Águila 1999","v4743-sgr-2002":"nova de Sagitario 2002","rs-oph-2006":"nova de Ofiuco 2006","v1280-sco-2007":"nova de Escorpio 2007","v339-del-2013":"nova del Delfín 2013","v1369-cen-2013":"nova del Centauro 2013","rs-oph-2021":"nova de Ofiuco 2021"},satelliteClasses:{echo:"los globos Echo","iridium-flares":"los destellos de los Iridium",iss:"la Estación Espacial Internacional","starlink-trains":"los trenes de Starlink"},showers:{quadrantids:"Cuadrántidas",lyrids:"Líridas de abril","eta-aquariids":"Eta Acuáridas","alpha-capricornids":"Alfa Capricórnidas","southern-delta-aquariids":"Delta Acuáridas del Sur",perseids:"Perseidas","southern-taurids":"Táuridas del Sur",draconids:"Dracónidas de octubre",orionids:"Oriónidas","northern-taurids":"Táuridas del Norte",leonids:"Leónidas",geminids:"Gemínidas",ursids:"Úrsidas"},lightRigs:{airliner:"Avión de pasajeros",helicopter:"Helicóptero","car-headlights":"Coche, faros encendidos","car-hazards":"Coche, luces de emergencia","emergency-beacons":"Rotativos de vehículo de emergencia","traffic-signal":"Semáforo","pedestrian-signal":"Semáforo peatonal",streetlamp:"Farola"},instruments:{eye:"A simple vista","rectilinear-lens":"Cámara, modelo desconocido","roamer-1-120":"Roamer 1, película 120","instamatic-126":"Instamatic, película 126","cine-35mm-broadcast":"Cámara de 35 mm, vista en televisión","slr-35mm-50":"Réflex 35 mm, objetivo 50 mm","slr-35mm-zoom":"Réflex 35 mm, zoom 70-210 mm","phone-landscape":"Teléfono, en horizontal","phone-portrait":"Teléfono, en vertical",dashcam:"Cámara de salpicadero",cctv:"Cámara de vigilancia",...o.names(),...a.names()},decorKinds:{building:"Edificio",tree:"Árbol",shrub:"Arbusto",bridge:"Puente",wire:"Línea aérea",crop:"Hilera de cultivo",terrace:"Bancal (terraza)",mound:"Montón de piedras",wall:"Muro de piedra seca",streetlight:"Farola",trafficlight:"Semáforo",crossing:"Paso de peatones",roadsign:"Señal de tráfico",vehicle:"Vehículo",observer:"Testigo",aircraft:"Aeronave",entity:"Ser"},compassPoints:["N","NNE","NE","ENE","E","ESE","SE","SSE","S","SSO","SO","OSO","O","ONO","NO","NNO"],towards:e=>`al ${e}`,starTooltip:"{name} — mag {mag}, {alt}° sobre el horizonte",starTooltipBelow:"{name} — mag {mag}, {alt}° bajo la horizontal",decorTooltip:"{name} — {size}, a {distance}",satelliteTooltip:"{name} — satélite, mag {mag}, a {height} km de altitud",afterimageTooltip:{name:"Imagen remanente, en el ojo",detail:"{name}: donde cayó la imagen de una luz más brillante que el Sol, el pigmento de la retina está decolorado: durante unos segundos sigue brillando, blanca y luego de colores, y después lo que se ve allí parece más oscuro. Se queda en el mismo lugar del campo de visión hacia donde se gire la mirada, y tarda minutos en borrarse."},ghostTooltip:{ghost:"Reflejo: {name}",halo:"Halo: {name}",double:"Doble: {name}",unnamed:"una luz",detail:"{name}. {cause}, {where}.",causes:{lens:"Reflejo entre dos superficies del objetivo",sensor:"Reflejo del sensor devuelto por su vidrio protector",filter:"Reflejo del sensor devuelto por el filtro",glass:"Reflejo entre las dos caras del cristal delante del objetivo",drops:"Luz difundida por las gotas sobre el cristal",condensation:"Luz difundida por el vaho sobre el cristal",dirt:"Luz difundida por la suciedad sobre el cristal"},opposite:"al otro lado del centro de la imagen respecto a la luz",sameSide:"del mismo lado del centro que la luz",around:"alrededor de la luz",drop:{lens:"Gota en el objetivo",filter:"Gota en el filtro",window:"Gota en el cristal",windscreen:"Gota en el parabrisas"},dropDetail:"{name}. Como una pequeña lente, muestra al revés y desenfocado lo que hay al otro lado de ella, en lugar de lo que hay detrás."},opticsTooltips:{halo22:"Halo de 22° — un anillo alrededor del Sol, por luz desviada en cristales de hielo hexagonales de los cirros; su borde interior es rojo, a 21,7°",halo46:"Halo de 46° — un anillo más raro y débil: la luz entra por una cara lateral del cristal y sale por una cara del extremo",oddRadius:"Halo de {angle}° — un anillo de radio impar, raro y débil, hecho por cristales de hielo con extremos piramidales",parhelion:"Parhelio — una mancha brillante de colores junto al Sol, a su altura, por placas de hielo que caen planas; rojo hacia el Sol",parhelion120:"Parhelio de 120° — una mancha blanca débil a 120° del Sol, por luz reflejada dentro de placas planas",upperTangentArc:"Arco tangente superior — un arco brillante apoyado sobre el halo de 22°, por columnas tumbadas en horizontal",lowerTangentArc:"Arco tangente inferior — un arco que toca la base del halo de 22°, por columnas tumbadas en horizontal",circumzenithal:"Arco circuncenital — una banda de colores vivos cerca del cenit, por luz que entra por la cara superior de placas planas (solo con el Sol bajo 32°)",circumhorizontal:"Arco circunhorizontal — una banda de colores baja en el cielo, por luz que entra por la cara lateral de placas planas (solo con el Sol sobre 58°)",parhelicCircle:"Círculo parhélico — un círculo blanco alrededor de todo el cielo a la altura del Sol, por reflejos en las caras verticales de placas planas",pillar:"Pilar de luz — una columna de luz sobre el Sol, por reflejos en placas planas ligeramente inclinadas",subsun:"Subsol — una imagen del Sol bajo el horizonte, por reflejos en las caras planas de las placas"},trafficTooltip:{unnamed:"Aeronave {hex}",altitude:"{value} ft",speed:"{value} kt",heading:"rumbo {value}°",position:"a {distance} km, {elevation}° sobre el horizonte, {bearing}",heard:"Se oye a {level} dB(A), salió del avión hace {delay} s, {lag}° detrás de él: {character}{pitch}",rumble:"un rumor grave, nada por encima de {cutoff} Hz",muffled:"un ruido sordo, nada por encima de {cutoff} Hz",broad:"un rugido ancho",pitchHigher:", sonido {percent} % más agudo",pitchLower:", sonido {percent} % más grave",inaudible:"Inaudible aquí: {level} dB(A) frente a {ambient} dB(A) de ruido ambiente",soundUnknown:"Sonido no calculable: el avión aún no estaba registrado cuando salió",contrailPersistent:"Deja una estela que dura: el aire está sobresaturado respecto al hielo ({rhi} % respecto al hielo)",contrailShort:"Deja una estela breve: el aire está seco respecto al hielo ({rhi} % respecto al hielo)",military:"militar",restricted:"identidad oculta por su propietario",candidate:"Un candidato compatible, no una identificación"},railwayTooltip:{kinds:{rail:"Vía férrea",light_rail:"Metro ligero",tram:"Tranvía",subway:"Metro",funicular:"Funicular"},highSpeed:"Línea de alta velocidad",service:"Vía de servicio",singleTrack:"vía única",tracks:"{count} vías",overhead:"catenaria, hilo de contacto a {height} m sobre el carril",overheadVoltage:"catenaria a {voltage}, hilo de contacto a {height} m sobre el carril",thirdRail:"tercer carril",thirdRailVoltage:"tercer carril a {voltage}",notElectrified:"sin electrificar",gauge:"ancho de {mm} mm",metreGauge:"vía métrica",distance:"a {distance}"},credits:"Créditos",notAVideo:"Esto no es un vídeo",isASimulation:"Es una simulación en tiempo real."};export{r as sceneNames_es};
@@ -1 +1 @@
1
- import{a7 as a,a8 as r}from"./rr0-scene.mjs";const i={bodies:{sun:"Soleil",moon:"Lune",Venus:"Vénus",Saturn:"Saturne"},stars:{Betelgeuse:"Bételgeuse",Vega:"Véga",Altair:"Altaïr",Aldebaran:"Aldébaran",Regulus:"Régulus",Antares:"Antarès"},comets:{"halley-1910":"comète de Halley","brooks-1911":"comète Brooks","skjellerup-maristany-1927":"comète Skjellerup-Maristany","de-kock-paraskevopoulos-1941":"comète de Kock-Paraskevopoulos","southern-1947":"comète australe","eclipse-1948":"comète de l'éclipse","arend-roland-1957":"comète Arend-Roland","mrkos-1957":"comète Mrkos","seki-lines-1962":"comète Seki-Lines","ikeya-seki-1965":"comète Ikeya-Seki","bennett-1970":"comète Bennett","white-ortiz-bolelli-1970":"comète White-Ortiz-Bolelli","kohoutek-1973":"comète Kohoutek","west-1976":"comète West","iras-araki-alcock-1983":"comète IRAS-Araki-Alcock","halley-1986":"comète de Halley","hyakutake-1996":"comète Hyakutake","hale-bopp-1997":"comète Hale-Bopp","mcnaught-2007":"comète McNaught","lovejoy-2011":"comète Lovejoy","panstarrs-2013":"comète PANSTARRS","neowise-2020":"comète NEOWISE","tsuchinshan-atlas-2024":"comète Tsuchinshan-ATLAS"},novae:{"sn-1006":"supernova de 1006","sn-1054":"supernova de 1054","sn-1181":"supernova de 1181","sn-1572":"supernova de Tycho","sn-1604":"supernova de Kepler","t-crb-1866":"nova de la Couronne boréale 1866","t-aur-1891":"nova du Cocher 1891","gk-per-1901":"nova de Persée 1901","dn-gem-1912":"nova des Gémeaux 1912","v603-aql-1918":"nova de l'Aigle 1918","v476-cyg-1920":"nova du Cygne 1920","rr-pic-1925":"nova du Peintre 1925","dq-her-1934":"nova d'Hercule 1934","cp-lac-1936":"nova du Lézard 1936","cp-pup-1942":"nova de la Poupe 1942","t-crb-1946":"nova de la Couronne boréale 1946","v446-her-1960":"nova d'Hercule 1960","v533-her-1963":"nova d'Hercule 1963","hr-del-1967":"nova du Dauphin 1967","lv-vul-1968":"nova du Petit Renard 1968","fh-ser-1970":"nova du Serpent 1970","v1500-cyg-1975":"nova du Cygne 1975","v842-cen-1986":"nova du Centaure 1986","sn-1987a":"supernova 1987A","v1974-cyg-1992":"nova du Cygne 1992","v382-vel-1999":"nova des Voiles 1999","v1494-aql-1999":"nova de l'Aigle 1999","v4743-sgr-2002":"nova du Sagittaire 2002","rs-oph-2006":"nova d'Ophiuchus 2006","v1280-sco-2007":"nova du Scorpion 2007","v339-del-2013":"nova du Dauphin 2013","v1369-cen-2013":"nova du Centaure 2013","rs-oph-2021":"nova d'Ophiuchus 2021"},satelliteClasses:{echo:"les ballons Echo","iridium-flares":"les flashes d'Iridium",iss:"la Station spatiale internationale","starlink-trains":"les trains de Starlink"},showers:{quadrantids:"Quadrantides",lyrids:"Lyrides d'avril","eta-aquariids":"Êta Aquarides","alpha-capricornids":"Alpha Capricornides","southern-delta-aquariids":"Delta Aquarides du Sud",perseids:"Perséides","southern-taurids":"Taurides du Sud",draconids:"Draconides d'octobre",orionids:"Orionides","northern-taurids":"Taurides du Nord",leonids:"Léonides",geminids:"Géminides",ursids:"Ursides"},lightRigs:{airliner:"Avion de ligne",helicopter:"Hélicoptère","car-headlights":"Voiture, phares allumés","car-hazards":"Voiture, feux de détresse","emergency-beacons":"Gyrophares de véhicule d'urgence","traffic-signal":"Feu de circulation","pedestrian-signal":"Feu piéton",streetlamp:"Lampadaire"},instruments:{eye:"Œil nu","rectilinear-lens":"Appareil, modèle inconnu","roamer-1-120":"Roamer 1, film 120","instamatic-126":"Instamatic, film 126","cine-35mm-broadcast":"Caméra 35 mm, vue à la télévision","slr-35mm-50":"Reflex 35 mm, objectif 50 mm","slr-35mm-zoom":"Reflex 35 mm, zoom 70-210 mm","phone-landscape":"Téléphone, tenu couché","phone-portrait":"Téléphone, tenu debout",dashcam:"Caméra de tableau de bord",cctv:"Caméra de surveillance",...r.names(),...a.names()},decorKinds:{building:"Bâtiment",tree:"Arbre",shrub:"Buisson",bridge:"Pont",wire:"Ligne aérienne",crop:"Rang de culture",terrace:"Restanque (terrasse)",mound:"Tas de pierres",wall:"Muret de pierres sèches",streetlight:"Lampadaire",trafficlight:"Feu de circulation",crossing:"Passage piéton",roadsign:"Panneau de signalisation",vehicle:"Véhicule",observer:"Témoin",aircraft:"Aéronef",entity:"Être"},compassPoints:["N","NNE","NE","ENE","E","ESE","SE","SSE","S","SSO","SO","OSO","O","ONO","NO","NNO"],towards:e=>/^[EO]/.test(e)?`à l'${e}`:`au ${e}`,starTooltip:"{name} — mag {mag}, {alt}° au-dessus de l'horizon",starTooltipBelow:"{name} — mag {mag}, {alt}° sous l'horizontale",decorTooltip:"{name} — {size}, à {distance}",satelliteTooltip:"{name} — satellite, mag {mag}, à {height} km d'altitude",afterimageTooltip:{name:"Image rémanente, dans l'œil",detail:"{name} : là où est tombée l'image d'une lumière plus brillante que le Soleil, le pigment de la rétine est décoloré : quelques secondes elle luit encore, blanche puis colorée, puis ce qu'on y voit paraît plus sombre. Elle reste à la même place dans le champ de vision, où que se tourne le regard, et met des minutes à s'effacer."},ghostTooltip:{ghost:"Reflet : {name}",halo:"Halo : {name}",double:"Double : {name}",unnamed:"une lumière",detail:"{name}. {cause}, {where}.",causes:{lens:"Reflet entre deux surfaces de l'objectif",sensor:"Reflet du capteur renvoyé par sa vitre de protection",filter:"Reflet du capteur renvoyé par le filtre",glass:"Reflet entre les deux faces de la vitre devant l'objectif",drops:"Lumière diffusée par les gouttes sur le verre",condensation:"Lumière diffusée par la buée sur le verre",dirt:"Lumière diffusée par la saleté sur le verre"},opposite:"à l'opposé de la lumière par rapport au centre de l'image",sameSide:"du même côté du centre que la lumière",around:"autour de la lumière",drop:{lens:"Goutte sur l'objectif",filter:"Goutte sur le filtre",window:"Goutte sur la vitre",windscreen:"Goutte sur le pare-brise"},dropDetail:"{name}. Comme une petite lentille, elle montre à l'envers et flou ce qu'il y a de l'autre côté d'elle, au lieu de ce qui est derrière."},opticsTooltips:{halo22:"Halo de 22° — un anneau autour du Soleil, dû à la lumière déviée par des cristaux de glace hexagonaux dans les cirrus ; son bord interne est rouge, à 21,7°",halo46:"Halo de 46° — un anneau plus rare et plus faible : la lumière entre par une face latérale d'un cristal et sort par une face de bout",oddRadius:"Halo de {angle}° — un anneau à rayon impair, rare et faible, dû à des cristaux de glace à bouts pyramidaux",parhelion:"Parhélie — une tache brillante colorée à côté du Soleil, à sa hauteur, due à des plaquettes de glace tombant à plat ; rouge côté Soleil",parhelion120:"Parhélie à 120° — une faible tache blanche à 120° du Soleil, due à la lumière réfléchie à l'intérieur de plaquettes à plat",upperTangentArc:"Arc tangent supérieur — un arc brillant posé sur le haut du halo de 22°, dû à des colonnes couchées à l'horizontale",lowerTangentArc:"Arc tangent inférieur — un arc touchant le bas du halo de 22°, dû à des colonnes couchées à l'horizontale",circumzenithal:"Arc circumzénithal — une bande vivement colorée près du zénith, due à la lumière entrant par la face du dessus de plaquettes à plat (seulement Soleil sous 32°)",circumhorizontal:"Arc circumhorizontal — une bande colorée basse dans le ciel, due à la lumière entrant par la face latérale de plaquettes à plat (seulement Soleil au-dessus de 58°)",parhelicCircle:"Cercle parhélique — un cercle blanc faisant tout le tour du ciel à la hauteur du Soleil, dû aux reflets sur les faces verticales de plaquettes à plat",pillar:"Pilier de lumière — une colonne de lumière dressée au-dessus du Soleil, due aux reflets sur des plaquettes à plat légèrement inclinées",subsun:"Sous-soleil — une image du Soleil sous l'horizon, due aux reflets sur les faces plates de plaquettes"},trafficTooltip:{unnamed:"Aéronef {hex}",altitude:"{value} ft",speed:"{value} kt",heading:"cap {value}°",position:"à {distance} km, {elevation}° au-dessus de l'horizon, {bearing}",heard:"Entendu à {level} dB(A), parti de l'avion il y a {delay} s, {lag}° derrière lui : {character}{pitch}",rumble:"un grondement grave, rien au-delà de {cutoff} Hz",muffled:"un bruit sourd, rien au-delà de {cutoff} Hz",broad:"un souffle large",pitchHigher:", son plus aigu de {percent} %",pitchLower:", son plus grave de {percent} %",inaudible:"Inaudible ici : {level} dB(A) contre {ambient} dB(A) de bruit ambiant",soundUnknown:"Son non calculable : l'avion n'était pas encore enregistré quand il est parti",contrailPersistent:"Laisse une traînée qui dure : l'air est sursaturé en glace ({rhi} % par rapport à la glace)",contrailShort:"Laisse une traînée brève : l'air est sec par rapport à la glace ({rhi} % par rapport à la glace)",military:"militaire",restricted:"identité masquée par son propriétaire",candidate:"Un candidat compatible, pas une identification"},railwayTooltip:{kinds:{rail:"Voie ferrée",light_rail:"Métro léger",tram:"Tramway",subway:"Métro",funicular:"Funiculaire"},highSpeed:"Ligne à grande vitesse",service:"Voie de service",singleTrack:"voie unique",tracks:"{count} voies",overhead:"caténaire, fil de contact à {height} m au-dessus du rail",overheadVoltage:"caténaire en {voltage}, fil de contact à {height} m au-dessus du rail",thirdRail:"troisième rail",thirdRailVoltage:"troisième rail en {voltage}",notElectrified:"non électrifiée",gauge:"écartement de {mm} mm",metreGauge:"voie métrique",distance:"à {distance}"},credits:"Crédits",notAVideo:"Ceci n'est pas une vidéo",isASimulation:"C'est une simulation en temps réel."};export{i as sceneNames_fr};
1
+ import{af as a,ag as r}from"./rr0-scene.mjs";const i={bodies:{sun:"Soleil",moon:"Lune",Venus:"Vénus",Saturn:"Saturne"},stars:{Betelgeuse:"Bételgeuse",Vega:"Véga",Altair:"Altaïr",Aldebaran:"Aldébaran",Regulus:"Régulus",Antares:"Antarès"},comets:{"halley-1910":"comète de Halley","brooks-1911":"comète Brooks","skjellerup-maristany-1927":"comète Skjellerup-Maristany","de-kock-paraskevopoulos-1941":"comète de Kock-Paraskevopoulos","southern-1947":"comète australe","eclipse-1948":"comète de l'éclipse","arend-roland-1957":"comète Arend-Roland","mrkos-1957":"comète Mrkos","seki-lines-1962":"comète Seki-Lines","ikeya-seki-1965":"comète Ikeya-Seki","bennett-1970":"comète Bennett","white-ortiz-bolelli-1970":"comète White-Ortiz-Bolelli","kohoutek-1973":"comète Kohoutek","west-1976":"comète West","iras-araki-alcock-1983":"comète IRAS-Araki-Alcock","halley-1986":"comète de Halley","hyakutake-1996":"comète Hyakutake","hale-bopp-1997":"comète Hale-Bopp","mcnaught-2007":"comète McNaught","lovejoy-2011":"comète Lovejoy","panstarrs-2013":"comète PANSTARRS","neowise-2020":"comète NEOWISE","tsuchinshan-atlas-2024":"comète Tsuchinshan-ATLAS"},novae:{"sn-1006":"supernova de 1006","sn-1054":"supernova de 1054","sn-1181":"supernova de 1181","sn-1572":"supernova de Tycho","sn-1604":"supernova de Kepler","t-crb-1866":"nova de la Couronne boréale 1866","t-aur-1891":"nova du Cocher 1891","gk-per-1901":"nova de Persée 1901","dn-gem-1912":"nova des Gémeaux 1912","v603-aql-1918":"nova de l'Aigle 1918","v476-cyg-1920":"nova du Cygne 1920","rr-pic-1925":"nova du Peintre 1925","dq-her-1934":"nova d'Hercule 1934","cp-lac-1936":"nova du Lézard 1936","cp-pup-1942":"nova de la Poupe 1942","t-crb-1946":"nova de la Couronne boréale 1946","v446-her-1960":"nova d'Hercule 1960","v533-her-1963":"nova d'Hercule 1963","hr-del-1967":"nova du Dauphin 1967","lv-vul-1968":"nova du Petit Renard 1968","fh-ser-1970":"nova du Serpent 1970","v1500-cyg-1975":"nova du Cygne 1975","v842-cen-1986":"nova du Centaure 1986","sn-1987a":"supernova 1987A","v1974-cyg-1992":"nova du Cygne 1992","v382-vel-1999":"nova des Voiles 1999","v1494-aql-1999":"nova de l'Aigle 1999","v4743-sgr-2002":"nova du Sagittaire 2002","rs-oph-2006":"nova d'Ophiuchus 2006","v1280-sco-2007":"nova du Scorpion 2007","v339-del-2013":"nova du Dauphin 2013","v1369-cen-2013":"nova du Centaure 2013","rs-oph-2021":"nova d'Ophiuchus 2021"},satelliteClasses:{echo:"les ballons Echo","iridium-flares":"les flashes d'Iridium",iss:"la Station spatiale internationale","starlink-trains":"les trains de Starlink"},showers:{quadrantids:"Quadrantides",lyrids:"Lyrides d'avril","eta-aquariids":"Êta Aquarides","alpha-capricornids":"Alpha Capricornides","southern-delta-aquariids":"Delta Aquarides du Sud",perseids:"Perséides","southern-taurids":"Taurides du Sud",draconids:"Draconides d'octobre",orionids:"Orionides","northern-taurids":"Taurides du Nord",leonids:"Léonides",geminids:"Géminides",ursids:"Ursides"},lightRigs:{airliner:"Avion de ligne",helicopter:"Hélicoptère","car-headlights":"Voiture, phares allumés","car-hazards":"Voiture, feux de détresse","emergency-beacons":"Gyrophares de véhicule d'urgence","traffic-signal":"Feu de circulation","pedestrian-signal":"Feu piéton",streetlamp:"Lampadaire"},instruments:{eye:"Œil nu","rectilinear-lens":"Appareil, modèle inconnu","roamer-1-120":"Roamer 1, film 120","instamatic-126":"Instamatic, film 126","cine-35mm-broadcast":"Caméra 35 mm, vue à la télévision","slr-35mm-50":"Reflex 35 mm, objectif 50 mm","slr-35mm-zoom":"Reflex 35 mm, zoom 70-210 mm","phone-landscape":"Téléphone, tenu couché","phone-portrait":"Téléphone, tenu debout",dashcam:"Caméra de tableau de bord",cctv:"Caméra de surveillance",...r.names(),...a.names()},decorKinds:{building:"Bâtiment",tree:"Arbre",shrub:"Buisson",bridge:"Pont",wire:"Ligne aérienne",crop:"Rang de culture",terrace:"Restanque (terrasse)",mound:"Tas de pierres",wall:"Muret de pierres sèches",streetlight:"Lampadaire",trafficlight:"Feu de circulation",crossing:"Passage piéton",roadsign:"Panneau de signalisation",vehicle:"Véhicule",observer:"Témoin",aircraft:"Aéronef",entity:"Être"},compassPoints:["N","NNE","NE","ENE","E","ESE","SE","SSE","S","SSO","SO","OSO","O","ONO","NO","NNO"],towards:e=>/^[EO]/.test(e)?`à l'${e}`:`au ${e}`,starTooltip:"{name} — mag {mag}, {alt}° au-dessus de l'horizon",starTooltipBelow:"{name} — mag {mag}, {alt}° sous l'horizontale",decorTooltip:"{name} — {size}, à {distance}",satelliteTooltip:"{name} — satellite, mag {mag}, à {height} km d'altitude",afterimageTooltip:{name:"Image rémanente, dans l'œil",detail:"{name} : là où est tombée l'image d'une lumière plus brillante que le Soleil, le pigment de la rétine est décoloré : quelques secondes elle luit encore, blanche puis colorée, puis ce qu'on y voit paraît plus sombre. Elle reste à la même place dans le champ de vision, où que se tourne le regard, et met des minutes à s'effacer."},ghostTooltip:{ghost:"Reflet : {name}",halo:"Halo : {name}",double:"Double : {name}",unnamed:"une lumière",detail:"{name}. {cause}, {where}.",causes:{lens:"Reflet entre deux surfaces de l'objectif",sensor:"Reflet du capteur renvoyé par sa vitre de protection",filter:"Reflet du capteur renvoyé par le filtre",glass:"Reflet entre les deux faces de la vitre devant l'objectif",drops:"Lumière diffusée par les gouttes sur le verre",condensation:"Lumière diffusée par la buée sur le verre",dirt:"Lumière diffusée par la saleté sur le verre"},opposite:"à l'opposé de la lumière par rapport au centre de l'image",sameSide:"du même côté du centre que la lumière",around:"autour de la lumière",drop:{lens:"Goutte sur l'objectif",filter:"Goutte sur le filtre",window:"Goutte sur la vitre",windscreen:"Goutte sur le pare-brise"},dropDetail:"{name}. Comme une petite lentille, elle montre à l'envers et flou ce qu'il y a de l'autre côté d'elle, au lieu de ce qui est derrière."},opticsTooltips:{halo22:"Halo de 22° — un anneau autour du Soleil, dû à la lumière déviée par des cristaux de glace hexagonaux dans les cirrus ; son bord interne est rouge, à 21,7°",halo46:"Halo de 46° — un anneau plus rare et plus faible : la lumière entre par une face latérale d'un cristal et sort par une face de bout",oddRadius:"Halo de {angle}° — un anneau à rayon impair, rare et faible, dû à des cristaux de glace à bouts pyramidaux",parhelion:"Parhélie — une tache brillante colorée à côté du Soleil, à sa hauteur, due à des plaquettes de glace tombant à plat ; rouge côté Soleil",parhelion120:"Parhélie à 120° — une faible tache blanche à 120° du Soleil, due à la lumière réfléchie à l'intérieur de plaquettes à plat",upperTangentArc:"Arc tangent supérieur — un arc brillant posé sur le haut du halo de 22°, dû à des colonnes couchées à l'horizontale",lowerTangentArc:"Arc tangent inférieur — un arc touchant le bas du halo de 22°, dû à des colonnes couchées à l'horizontale",circumzenithal:"Arc circumzénithal — une bande vivement colorée près du zénith, due à la lumière entrant par la face du dessus de plaquettes à plat (seulement Soleil sous 32°)",circumhorizontal:"Arc circumhorizontal — une bande colorée basse dans le ciel, due à la lumière entrant par la face latérale de plaquettes à plat (seulement Soleil au-dessus de 58°)",parhelicCircle:"Cercle parhélique — un cercle blanc faisant tout le tour du ciel à la hauteur du Soleil, dû aux reflets sur les faces verticales de plaquettes à plat",pillar:"Pilier de lumière — une colonne de lumière dressée au-dessus du Soleil, due aux reflets sur des plaquettes à plat légèrement inclinées",subsun:"Sous-soleil — une image du Soleil sous l'horizon, due aux reflets sur les faces plates de plaquettes"},trafficTooltip:{unnamed:"Aéronef {hex}",altitude:"{value} ft",speed:"{value} kt",heading:"cap {value}°",position:"à {distance} km, {elevation}° au-dessus de l'horizon, {bearing}",heard:"Entendu à {level} dB(A), parti de l'avion il y a {delay} s, {lag}° derrière lui : {character}{pitch}",rumble:"un grondement grave, rien au-delà de {cutoff} Hz",muffled:"un bruit sourd, rien au-delà de {cutoff} Hz",broad:"un souffle large",pitchHigher:", son plus aigu de {percent} %",pitchLower:", son plus grave de {percent} %",inaudible:"Inaudible ici : {level} dB(A) contre {ambient} dB(A) de bruit ambiant",soundUnknown:"Son non calculable : l'avion n'était pas encore enregistré quand il est parti",contrailPersistent:"Laisse une traînée qui dure : l'air est sursaturé en glace ({rhi} % par rapport à la glace)",contrailShort:"Laisse une traînée brève : l'air est sec par rapport à la glace ({rhi} % par rapport à la glace)",military:"militaire",restricted:"identité masquée par son propriétaire",candidate:"Un candidat compatible, pas une identification"},railwayTooltip:{kinds:{rail:"Voie ferrée",light_rail:"Métro léger",tram:"Tramway",subway:"Métro",funicular:"Funiculaire"},highSpeed:"Ligne à grande vitesse",service:"Voie de service",singleTrack:"voie unique",tracks:"{count} voies",overhead:"caténaire, fil de contact à {height} m au-dessus du rail",overheadVoltage:"caténaire en {voltage}, fil de contact à {height} m au-dessus du rail",thirdRail:"troisième rail",thirdRailVoltage:"troisième rail en {voltage}",notElectrified:"non électrifiée",gauge:"écartement de {mm} mm",metreGauge:"voie métrique",distance:"à {distance}"},credits:"Crédits",notAVideo:"Ceci n'est pas une vidéo",isASimulation:"C'est une simulation en temps réel."};export{i as sceneNames_fr};