@rr0/ufoathome 0.164.0 → 0.165.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 (188) hide show
  1. package/dist-embed-scene/{AdsbLolArchiveProvider-CO4IRthj.js → AdsbLolArchiveProvider-Cea0LAnZ.js} +1 -1
  2. package/dist-embed-scene/BeamEditor-DcUBLvPh.js +30 -0
  3. package/dist-embed-scene/BeamEditorMessages_en-DDvPWAdd.js +1 -0
  4. package/dist-embed-scene/BeamEditorMessages_es-BhCkhUkN.js +1 -0
  5. package/dist-embed-scene/BeamEditorMessages_fr-CtX6uP-x.js +1 -0
  6. package/dist-embed-scene/BeamEditorMessages_it-DVweRQFi.js +1 -0
  7. package/dist-embed-scene/BeamSystem-B80EaJKx.js +1 -0
  8. package/dist-embed-scene/{ContrailSystem-GO0Hkyj3.js → ContrailSystem-CcDlnjiD.js} +1 -1
  9. package/dist-embed-scene/GLTFLoader-YecOnQON.js +1 -0
  10. package/dist-embed-scene/{HeadlightSystem-DNMtQJ-Z.js → HeadlightSystem-B0Ubhwxs.js} +1 -1
  11. package/dist-embed-scene/LanternEditor-DQ9Y_eBl.js +9 -0
  12. package/dist-embed-scene/LanternEditorMessages_en-DaT3UNfD.js +1 -0
  13. package/dist-embed-scene/LanternEditorMessages_es-TDV5lKeJ.js +1 -0
  14. package/dist-embed-scene/LanternEditorMessages_fr-9mByTFMG.js +1 -0
  15. package/dist-embed-scene/LanternEditorMessages_it-MRkJnDQp.js +1 -0
  16. package/dist-embed-scene/LaserBeam-DXzWB-xk.js +1 -0
  17. package/dist-embed-scene/LaunchEditor-Csb2Pfq3.js +22 -0
  18. package/dist-embed-scene/LaunchEditorMessages_en-BnzNAYW9.js +1 -0
  19. package/dist-embed-scene/LaunchEditorMessages_es-BE0dEl7I.js +1 -0
  20. package/dist-embed-scene/LaunchEditorMessages_fr-Ds_VOB8c.js +1 -0
  21. package/dist-embed-scene/LaunchEditorMessages_it-DPQaR8HY.js +1 -0
  22. package/dist-embed-scene/LaunchPlume-DwOSrKP_.js +1 -0
  23. package/dist-embed-scene/LaunchSimulation-ClGdZJHr.js +1 -0
  24. package/dist-embed-scene/ModuleSession-DAQNvnRi.js +3 -0
  25. package/dist-embed-scene/ModuleThree-Cozd8KlK.js +1 -0
  26. package/dist-embed-scene/ParameterForm-D0GvLmqx.js +85 -0
  27. package/dist-embed-scene/{RailwaySystem-1yA_UYdB.js → RailwaySystem-DZQr_rS_.js} +1 -1
  28. package/dist-embed-scene/ReentryEditor-AsKtWLMw.js +27 -0
  29. package/dist-embed-scene/ReentryEditorMessages_en-O-YSmHxv.js +1 -0
  30. package/dist-embed-scene/ReentryEditorMessages_es-CvO9Jwz5.js +1 -0
  31. package/dist-embed-scene/ReentryEditorMessages_fr-xuC-qZ6M.js +1 -0
  32. package/dist-embed-scene/ReentryEditorMessages_it-B7vyCX9o.js +1 -0
  33. package/dist-embed-scene/ReentrySimulation-rnJU2x1Y.js +1 -0
  34. package/dist-embed-scene/ReferenceSystem-BgT1nVgA.js +1 -0
  35. package/dist-embed-scene/{SceneNames_es-xcbww_vR.js → SceneNames_es-DL0IWHOw.js} +1 -1
  36. package/dist-embed-scene/{SceneNames_fr-COj1rUw_.js → SceneNames_fr-B2NX5JJO.js} +1 -1
  37. package/dist-embed-scene/{SceneNames_it-BiqZMsLB.js → SceneNames_it-wq6fqU10.js} +1 -1
  38. package/dist-embed-scene/TimelineTracks-Bv2FX3_W.js +35 -0
  39. package/dist-embed-scene/{TraceSystem-B9WBM9ut.js → TraceSystem-D7pxye9d.js} +1 -1
  40. package/dist-embed-scene/WaterSystem-DI_NBDfH.js +1 -0
  41. package/dist-embed-scene/rr0-scene.mjs +345 -345
  42. package/dist-embed-scene/{sightingSchema-CnDwuCov.js → sightingSchema-CKUYrwgu.js} +1 -1
  43. package/dist-embed-scene/trafficRuntime-C3sA3Jg_.js +2 -0
  44. package/dist-embed-sighting/{AdsbLolArchiveProvider-CX1R8zJF.js → AdsbLolArchiveProvider-BGg8e-TS.js} +1 -1
  45. package/dist-embed-sighting/{BallesterGuaspAssessor-CCjRjJck.js → BallesterGuaspAssessor-DHpHbF6s.js} +1 -1
  46. package/dist-embed-sighting/BeamEditor-KLBjeTRU.js +30 -0
  47. package/dist-embed-sighting/BeamEditorMessages_en-DDvPWAdd.js +1 -0
  48. package/dist-embed-sighting/BeamEditorMessages_es-BhCkhUkN.js +1 -0
  49. package/dist-embed-sighting/BeamEditorMessages_fr-CtX6uP-x.js +1 -0
  50. package/dist-embed-sighting/BeamEditorMessages_it-DVweRQFi.js +1 -0
  51. package/dist-embed-sighting/BeamSystem-C6YXI9Da.js +1 -0
  52. package/dist-embed-sighting/ContrailSystem-BUKo3qVd.js +1 -0
  53. package/dist-embed-sighting/GLTFLoader-BYMKgQLE.js +1 -0
  54. package/dist-embed-sighting/HeadlightSystem-CXPE3feA.js +34 -0
  55. package/dist-embed-sighting/{HynekAssessor-B8Iw0Cbz.js → HynekAssessor-Cc8hHe3R.js} +1 -1
  56. package/dist-embed-sighting/LanternEditor-J_d2le0V.js +9 -0
  57. package/dist-embed-sighting/LanternEditorMessages_en-DaT3UNfD.js +1 -0
  58. package/dist-embed-sighting/LanternEditorMessages_es-TDV5lKeJ.js +1 -0
  59. package/dist-embed-sighting/LanternEditorMessages_fr-9mByTFMG.js +1 -0
  60. package/dist-embed-sighting/LanternEditorMessages_it-MRkJnDQp.js +1 -0
  61. package/dist-embed-sighting/LaserBeam-CovzRtac.js +1 -0
  62. package/dist-embed-sighting/LaunchEditor-DuVZmb3n.js +22 -0
  63. package/dist-embed-sighting/LaunchEditorMessages_en-BnzNAYW9.js +1 -0
  64. package/dist-embed-sighting/LaunchEditorMessages_es-BE0dEl7I.js +1 -0
  65. package/dist-embed-sighting/LaunchEditorMessages_fr-Ds_VOB8c.js +1 -0
  66. package/dist-embed-sighting/LaunchEditorMessages_it-DPQaR8HY.js +1 -0
  67. package/dist-embed-sighting/LaunchPlume-DONCQxUE.js +1 -0
  68. package/dist-embed-sighting/LaunchSimulation-C0cSHpLE.js +1 -0
  69. package/dist-embed-sighting/ModuleSession-CRVX-5Br.js +3 -0
  70. package/dist-embed-sighting/ModuleThree-YgLqKZM9.js +1 -0
  71. package/dist-embed-sighting/NearestApproach-BOWntoKZ.js +1 -0
  72. package/dist-embed-sighting/ParameterForm-BMfViRUv.js +85 -0
  73. package/dist-embed-sighting/{PoherAssessor-CwQN9pB1.js → PoherAssessor-CM7oCyEk.js} +1 -1
  74. package/dist-embed-sighting/{RailwaySystem-9blFcIdg.js → RailwaySystem-D8yJRUc8.js} +1 -1
  75. package/dist-embed-sighting/ReentryEditor-DCDavAGw.js +27 -0
  76. package/dist-embed-sighting/ReentryEditorMessages_en-O-YSmHxv.js +1 -0
  77. package/dist-embed-sighting/ReentryEditorMessages_es-CvO9Jwz5.js +1 -0
  78. package/dist-embed-sighting/ReentryEditorMessages_fr-xuC-qZ6M.js +1 -0
  79. package/dist-embed-sighting/ReentryEditorMessages_it-B7vyCX9o.js +1 -0
  80. package/dist-embed-sighting/ReentrySimulation-BzMMTqck.js +1 -0
  81. package/dist-embed-sighting/{ReferenceSystem-DFM_jZ-Q.js → ReferenceSystem-Dt28-Egu.js} +1 -1
  82. package/dist-embed-sighting/{RoadMarkings-DKxgMzE-.js → RoadMarkings-BC76NPX4.js} +1 -1
  83. package/dist-embed-sighting/TimelineTracks-C7uTt9N5.js +35 -0
  84. package/dist-embed-sighting/{TraceSystem-CLYZFxAf.js → TraceSystem-Cd2FqhcV.js} +2 -2
  85. package/dist-embed-sighting/{WaterSystem-BulddAwi.js → WaterSystem-S81tdPno.js} +1 -1
  86. package/dist-embed-sighting/rr0-sighting.mjs +345 -345
  87. package/dist-embed-sighting/{sightingSchema-CnDwuCov.js → sightingSchema-CKUYrwgu.js} +1 -1
  88. package/dist-embed-sighting/trafficRuntime-DL5Zul8z.js +2 -0
  89. package/dist-embed-sighting-editor/AdsbLolArchiveProvider-k2xqWyaR.js +1 -0
  90. package/dist-embed-sighting-editor/{BallesterGuaspAssessor-gX_y6kL8.js → BallesterGuaspAssessor-CRfTg7iA.js} +1 -1
  91. package/dist-embed-sighting-editor/BeamEditor-DTkjy61A.js +30 -0
  92. package/dist-embed-sighting-editor/BeamEditorMessages_en-DDvPWAdd.js +1 -0
  93. package/dist-embed-sighting-editor/BeamEditorMessages_es-BhCkhUkN.js +1 -0
  94. package/dist-embed-sighting-editor/BeamEditorMessages_fr-CtX6uP-x.js +1 -0
  95. package/dist-embed-sighting-editor/BeamEditorMessages_it-DVweRQFi.js +1 -0
  96. package/dist-embed-sighting-editor/BeamSystem-BQbLn-3t.js +1 -0
  97. package/dist-embed-sighting-editor/BodyEditor-D5PfqEg2.js +28 -0
  98. package/dist-embed-sighting-editor/BodyEditorMessages_en-zfy3BJb5.js +1 -0
  99. package/dist-embed-sighting-editor/BodyEditorMessages_es-w95anMnI.js +1 -0
  100. package/dist-embed-sighting-editor/BodyEditorMessages_fr-ixsDgTbt.js +1 -0
  101. package/dist-embed-sighting-editor/BodyEditorMessages_it-B3oQzqHE.js +1 -0
  102. package/dist-embed-sighting-editor/{ContrailSystem-BXARgrR4.js → ContrailSystem-BQXLg_WA.js} +1 -1
  103. package/dist-embed-sighting-editor/{CoverageAssessor-mvpHgNx3.js → CoverageAssessor-D3HBwZuC.js} +1 -1
  104. package/dist-embed-sighting-editor/{GLTFLoader-BVRuOnnK.js → GLTFLoader-CQeR3NC8.js} +1 -1
  105. package/dist-embed-sighting-editor/{HeadlightSystem-9ywZKJNB.js → HeadlightSystem-Cy4jSEsq.js} +1 -1
  106. package/dist-embed-sighting-editor/{HynekAssessor-B9lO770Q.js → HynekAssessor-Covu9I3x.js} +1 -1
  107. package/dist-embed-sighting-editor/{InterviewEditorElement-1brfxXM5.js → InterviewEditorElement-IBABfqta.js} +2 -2
  108. package/dist-embed-sighting-editor/LanternEditor-BoxxG443.js +9 -0
  109. package/dist-embed-sighting-editor/LaserBeam-j5Z4tIOw.js +1 -0
  110. package/dist-embed-sighting-editor/LaunchEditor-rJud4C3y.js +22 -0
  111. package/dist-embed-sighting-editor/LaunchEditorMessages_en-BnzNAYW9.js +1 -0
  112. package/dist-embed-sighting-editor/LaunchEditorMessages_es-BE0dEl7I.js +1 -0
  113. package/dist-embed-sighting-editor/LaunchEditorMessages_fr-Ds_VOB8c.js +1 -0
  114. package/dist-embed-sighting-editor/LaunchEditorMessages_it-DPQaR8HY.js +1 -0
  115. package/dist-embed-sighting-editor/LaunchPlume-Dm1YdsZp.js +1 -0
  116. package/dist-embed-sighting-editor/LaunchSimulation-4f9-9d7Z.js +1 -0
  117. package/dist-embed-sighting-editor/{ModelSource-D0ZuOymh.js → ModelSource-CYfSBTeB.js} +1 -1
  118. package/dist-embed-sighting-editor/{ModelThumbnails-BA3zFrn5.js → ModelThumbnails-DYWQQdaZ.js} +1 -1
  119. package/dist-embed-sighting-editor/{ModelViewer-BDorZEms.js → ModelViewer-BjIOswb8.js} +1 -1
  120. package/dist-embed-sighting-editor/ModuleSession-D3GrBJ3j.js +3 -0
  121. package/dist-embed-sighting-editor/ModuleThree-CkOgRXM2.js +1 -0
  122. package/dist-embed-sighting-editor/ModulesPanelElement-Uz0lPYwu.js +13 -0
  123. package/dist-embed-sighting-editor/ModulesPanelMessages_en-D97Nh2yy.js +1 -0
  124. package/dist-embed-sighting-editor/ModulesPanelMessages_es-CE9Ajw2-.js +1 -0
  125. package/dist-embed-sighting-editor/ModulesPanelMessages_fr-BWsj-7_t.js +1 -0
  126. package/dist-embed-sighting-editor/ModulesPanelMessages_it-CtKrboEg.js +1 -0
  127. package/dist-embed-sighting-editor/{NearestApproach-DCFh8vV6.js → NearestApproach-DCUW8bB4.js} +1 -1
  128. package/dist-embed-sighting-editor/{PictureRegistration-cp0utyhJ.js → PictureRegistration-ZyvGfReK.js} +1 -1
  129. package/dist-embed-sighting-editor/{PoherAssessor-CzLQhAxP.js → PoherAssessor-BoGGdasd.js} +1 -1
  130. package/dist-embed-sighting-editor/{RailwaySystem-BfDjza60.js → RailwaySystem-C8Dby19B.js} +1 -1
  131. package/dist-embed-sighting-editor/ReentryEditor-8sfHq7hY.js +27 -0
  132. package/dist-embed-sighting-editor/ReentryEditorMessages_en-O-YSmHxv.js +1 -0
  133. package/dist-embed-sighting-editor/ReentryEditorMessages_es-CvO9Jwz5.js +1 -0
  134. package/dist-embed-sighting-editor/ReentryEditorMessages_fr-xuC-qZ6M.js +1 -0
  135. package/dist-embed-sighting-editor/ReentryEditorMessages_it-B7vyCX9o.js +1 -0
  136. package/dist-embed-sighting-editor/ReentrySimulation-KMMVK82G.js +1 -0
  137. package/dist-embed-sighting-editor/{ReferenceSystem-DHPnvAXN.js → ReferenceSystem-PYF540r7.js} +1 -1
  138. package/dist-embed-sighting-editor/{RoadMarkings-HF9xJtTp.js → RoadMarkings-VqRLMg59.js} +1 -1
  139. package/dist-embed-sighting-editor/{SceneNames_es-DFcAoDph.js → SceneNames_es-CLvEspFd.js} +1 -1
  140. package/dist-embed-sighting-editor/{SceneNames_fr-Cf8NgtIe.js → SceneNames_fr-oYQgZ-TZ.js} +1 -1
  141. package/dist-embed-sighting-editor/{SceneNames_it-CLLu_NHU.js → SceneNames_it-CDTw3VAX.js} +1 -1
  142. package/dist-embed-sighting-editor/SightingEditorMessages_es-CQU200Hj.js +12 -0
  143. package/dist-embed-sighting-editor/SightingEditorMessages_fr-Bd4Ht-jW.js +12 -0
  144. package/dist-embed-sighting-editor/SightingEditorMessages_it-CSnPiCy2.js +12 -0
  145. package/dist-embed-sighting-editor/{SightingFileEditor-BekK-f3R.js → SightingFileEditor-DB3jyBzw.js} +1 -1
  146. package/dist-embed-sighting-editor/SkyEventEditorStyle-CvY_AhbI.js +1 -0
  147. package/dist-embed-sighting-editor/{TraceSystem-C1HaC0DX.js → TraceSystem-BX0FwUB1.js} +2 -2
  148. package/dist-embed-sighting-editor/{WaterSystem-BDkfNF8C.js → WaterSystem-uWnkivpP.js} +1 -1
  149. package/dist-embed-sighting-editor/rr0-sighting-editor.mjs +433 -435
  150. package/dist-embed-sighting-editor/{sightingSchema-CnDwuCov.js → sightingSchema-CKUYrwgu.js} +1 -1
  151. package/dist-embed-sighting-editor/surroundingsSources-DXpzMDPy.js +1 -0
  152. package/dist-embed-sighting-editor/trafficRuntime-BeMCM4Ap.js +2 -0
  153. package/package.json +1 -1
  154. package/dist-embed-scene/BeamSystem-Dp1WU1Zx.js +0 -1
  155. package/dist-embed-scene/GLTFLoader-wJ0bjCoG.js +0 -1
  156. package/dist-embed-scene/ReferenceSystem-DOCydyPG.js +0 -1
  157. package/dist-embed-scene/WaterSystem-yC8sKIc5.js +0 -1
  158. package/dist-embed-scene/trafficRuntime-BPEJW9KZ.js +0 -2
  159. package/dist-embed-sighting/BeamSystem-B0H346X_.js +0 -1
  160. package/dist-embed-sighting/ContrailSystem-BeK11Jxe.js +0 -1
  161. package/dist-embed-sighting/GLTFLoader-B_T3zy3i.js +0 -1
  162. package/dist-embed-sighting/HeadlightSystem-DjtbpwEp.js +0 -34
  163. package/dist-embed-sighting/NearestApproach-B5s-b6tU.js +0 -1
  164. package/dist-embed-sighting/trafficRuntime-CfPqH9j0.js +0 -2
  165. package/dist-embed-sighting-editor/AdsbLolArchiveProvider-DS9ev-HU.js +0 -1
  166. package/dist-embed-sighting-editor/BeamEditor-DDNul0KE.js +0 -13
  167. package/dist-embed-sighting-editor/BeamEditorMessages_en-SQumGyrS.js +0 -1
  168. package/dist-embed-sighting-editor/BeamEditorMessages_es-BrR6Pk6G.js +0 -1
  169. package/dist-embed-sighting-editor/BeamEditorMessages_fr-CT24bHfq.js +0 -1
  170. package/dist-embed-sighting-editor/BeamEditorMessages_it-BgwwRjlh.js +0 -1
  171. package/dist-embed-sighting-editor/BeamSystem-BBonCZQ1.js +0 -1
  172. package/dist-embed-sighting-editor/BodyEditor-Br-GYDsy.js +0 -27
  173. package/dist-embed-sighting-editor/BodyEditorMessages_en-esgrRKGZ.js +0 -1
  174. package/dist-embed-sighting-editor/BodyEditorMessages_es-C1ZvwV-v.js +0 -1
  175. package/dist-embed-sighting-editor/BodyEditorMessages_fr-B_exFt_Q.js +0 -1
  176. package/dist-embed-sighting-editor/BodyEditorMessages_it-AJ_KrzkS.js +0 -1
  177. package/dist-embed-sighting-editor/LanternEditor-DpZQqBGL.js +0 -9
  178. package/dist-embed-sighting-editor/LaserBeam-DZ6ILkZ8.js +0 -1
  179. package/dist-embed-sighting-editor/LaunchEditor-BvnOtPyj.js +0 -18
  180. package/dist-embed-sighting-editor/LaunchEditorMessages_en-9lV7bQZy.js +0 -1
  181. package/dist-embed-sighting-editor/LaunchEditorMessages_es-D-Kz7fI5.js +0 -1
  182. package/dist-embed-sighting-editor/LaunchEditorMessages_fr-VEZBh9Ky.js +0 -1
  183. package/dist-embed-sighting-editor/LaunchEditorMessages_it-B0MeP7ki.js +0 -1
  184. package/dist-embed-sighting-editor/SightingEditorMessages_es-oZAu3CCU.js +0 -12
  185. package/dist-embed-sighting-editor/SightingEditorMessages_fr-ycaYW34j.js +0 -12
  186. package/dist-embed-sighting-editor/SightingEditorMessages_it-Chlr7U2v.js +0 -12
  187. package/dist-embed-sighting-editor/surroundingsSources-Bq5A0HA5.js +0 -1
  188. package/dist-embed-sighting-editor/trafficRuntime-DVOOnJGD.js +0 -2
@@ -0,0 +1,3 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ModuleThree-Cozd8KlK.js","./rr0-scene.mjs"])))=>i.map(i=>d[i]);
2
+ import{f as g,b as w,_ as b,M as p}from"./rr0-scene.mjs";class n{static STORAGE_KEY="ufoathome.modules";static FORMAT=1;static empty(){return{format:1,modules:[]}}static read(t=n.storage()){try{const e=t?.getItem(n.STORAGE_KEY);return e?n.parse(e):n.empty()}catch{return n.empty()}}static write(t,e=n.storage()){try{return e?(t.modules.length===0?e.removeItem(n.STORAGE_KEY):e.setItem(n.STORAGE_KEY,n.text(t)),!0):!1}catch{return!1}}static parse(t){const e=JSON.parse(t);if(e===null||typeof e!="object"||!Array.isArray(e.modules))throw new Error("not a UFO@home module list");if(typeof e.format=="number"&&e.format>n.FORMAT)throw new Error(`format ${e.format} is newer than ${n.FORMAT}`);const r=new Set,s=[];for(const i of e.modules)typeof i?.url!="string"||r.has(i.url)||(r.add(i.url),s.push({url:i.url,enabled:i.enabled!==!1}));return{format:1,modules:s}}static text(t){return JSON.stringify({format:n.FORMAT,modules:t.modules},null,2)+`
3
+ `}static storage(){try{return typeof localStorage>"u"?void 0:localStorage}catch{return}}}class E{constructor(t,e){this.attribution=t,this.models=e}async entries(t){return t?this.models.filter(e=>[e.kind].flat().includes(t)):[...this.models]}async entry(t){return this.models.find(e=>e.id===t)}}class f{attribution;fetchImpl;tileUrlTemplate;constructor(t){this.attribution=t.attribution,this.tileUrlTemplate=t.tileUrlTemplate,this.fetchImpl=t.fetchImpl??fetch.bind(globalThis)}getImageryTexture(t,e){return g(t,e,r=>f.tileUrl(this.tileUrlTemplate,r),this.fetchImpl)}static tileUrl(t,e){return t.replaceAll("{z}",String(e.z)).replaceAll("{x}",String(e.x)).replaceAll("{y}",String(e.y))}}class v extends Error{constructor(t,e){super(`${t}: ${e}`),this.url=t,this.reason=e,this.name="ModuleManifestError"}}class d{static FORMAT=1;static check(t,e){const r=o=>{throw new v(e,o)};(t===null||typeof t!="object"||Array.isArray(t))&&r("not a JSON object");const s=t;typeof s.format!="number"&&r('no "format"'),s.format>d.FORMAT&&r(`format ${s.format} is newer than ${d.FORMAT}, which this version reads`),(typeof s.id!="string"||!/^[a-z0-9][a-z0-9._-]*$/.test(s.id))&&r(`"id" must be lowercase letters, digits, '.', '_' or '-'`),(typeof s.name!="string"||s.name.trim()==="")&&r('no "name"'),s.script!==void 0&&typeof s.script!="string"&&r('"script" must be an address');const i=s.contributes??{};for(const o of["imagery","elevation"]){const c=i[o];c!==void 0&&(Array.isArray(c)||r(`"contributes.${o}" must be a list`),c.forEach((l,h)=>{for(const m of["id","name","credit","creditUrl","tiles"])(typeof l?.[m]!="string"||l[m]==="")&&r(`"contributes.${o}[${h}].${m}" is missing`);["{z}","{x}","{y}"].every(m=>l.tiles.includes(m))||r(`"contributes.${o}[${h}].tiles" must hold {z}, {x} and {y}`)}))}const a=i.models;return a!==void 0&&(Array.isArray(a)||r('"contributes.models" must be a list'),a.forEach((o,c)=>{for(const l of["id","name","file"])(typeof o?.[l]!="string"||o[l]==="")&&r(`"contributes.models[${c}].${l}" is missing`);o.kind===void 0&&r(`"contributes.models[${c}].kind" is missing`),(!o.credit||typeof o.credit!="object")&&r(`"contributes.models[${c}].credit" is missing: a model is shown with its author and licence`)})),s}static contributions(t,e){const r=t.contributes??{},s={};if(r.imagery?.length&&(s.imagery=r.imagery.map(i=>({id:i.id,name:i.name,credit:i.credit,creditUrl:i.creditUrl,create:a=>new f({tileUrlTemplate:d.absoluteTemplate(i.tiles,e),attribution:i.credit,fetchImpl:a})}))),r.elevation?.length&&(s.elevation=r.elevation.map(i=>({id:i.id,name:i.name,credit:i.credit,creditUrl:i.creditUrl,create:a=>new w({tileUrlTemplate:d.absoluteTemplate(i.tiles,e),fetchImpl:a})}))),r.models?.length){const i=r.models.map(({file:o,...c})=>({...c,url:new URL(o,e).href})),a=t.credit??t.name;s.decorModels=[{id:`${t.id}-models`,name:t.name,credit:a,creditUrl:t.creditUrl??e,create:()=>new E(a,i)}]}return s}static module(t,e,r={}){const s=d.contributions(t,e);for(const[i,a]of Object.entries(r))Array.isArray(a)&&(s[i]=[...s[i]??[],...a]);return{id:t.id,name:t.name,credit:t.credit,creditUrl:t.creditUrl,url:e,contributes:s}}static absoluteTemplate(t,e){const r=t.replaceAll("{z}","__Z__").replaceAll("{x}","__X__").replaceAll("{y}","__Y__");return new URL(r,e).href.replaceAll("__Z__","{z}").replaceAll("__X__","{x}").replaceAll("__Y__","{y}")}}class T{fetchImpl;importImpl;constructor(t={}){this.fetchImpl=t.fetchImpl??fetch.bind(globalThis),this.importImpl=t.importImpl??(e=>import(e))}async load(t,e){const r=await this.fetchImpl(t);if(!r.ok)throw new Error(`${t}: HTTP ${r.status}`);const s=d.check(await r.json(),t),i=s.script!==void 0;let a={};if(i&&e.runScript){const o=new URL(s.script,t).href,c=await this.importImpl(o);if(typeof c.default!="function")throw new Error(`${o}: its default export is not a function`);const{MODULE_THREE:l}=await b(async()=>{const{MODULE_THREE:h}=await import("./ModuleThree-Cozd8KlK.js");return{MODULE_THREE:h}},__vite__mapDeps([0,1]),import.meta.url);a=await c.default({manifestUrl:t,three:l})??{}}return{url:t,manifest:s,module:d.module(s,t,a),hasScript:i,scriptRun:i&&e.runScript}}}class y{constructor(t=new T,e){this.loader=t,this.storage=e}static shared=new y;changes=new EventTarget;states=new Map;config=n.empty();started;list(){const t=[...this.states.values()];return[...t.filter(e=>e.addedByPerson),...t.filter(e=>!e.addedByPerson)]}state(t){return this.states.get(t)}start(){return this.started??=this.applyConfig(n.read(this.storage)),this.started}async add(t){await this.start();const e=new URL(t,typeof location>"u"?void 0:location.href).href;return this.config.modules.some(r=>r.url===e)||(this.config={...this.config,modules:[...this.config.modules,{url:e,enabled:!0}]},this.save()),this.reload(e)}async remove(t){this.config={...this.config,modules:this.config.modules.filter(e=>e.url!==t)},this.save(),await this.reload(t)}async setEnabled(t,e){this.config={...this.config,modules:this.config.modules.map(r=>r.url===t?{...r,enabled:e}:r)},this.save(),await this.reload(t)}exportText(){return n.text(this.config)}async importText(t){const e=n.parse(t);await this.start();const r=this.config.modules.map(s=>s.url);this.config=e,this.save(),await Promise.all([...new Set([...r,...e.modules.map(s=>s.url)])].map(s=>this.reload(s)))}async require(t,e){t?.length&&(await this.start(),await Promise.all(t.map(async r=>{let s;try{s=new URL(r,e??(typeof location>"u"?void 0:location.href)).href}catch{return}const i=this.states.get(s);if(i&&i.status!=="off")return i.status==="loading"?this.pending.get(s):void 0;this.named.add(s),await this.reload(s)})))}named=new Set;pending=new Map;async applyConfig(t){this.config=t,await Promise.all(t.modules.map(e=>this.reload(e.url)))}reload(t){const e=this.reloadNow(t);return this.pending.set(t,e),e}async reloadNow(t){const e=this.config.modules.find(a=>a.url===t),r=this.states.get(t);r?.loaded&&p.uninstall(r.loaded.module.id);const s=e!==void 0,i=e?.enabled??!0;if(!s&&!this.named.has(t))return this.states.delete(t),this.announce(),{url:t,addedByPerson:s,enabled:i,status:"off"};if(s&&!i&&!this.named.has(t))return this.set({url:t,addedByPerson:s,enabled:i,status:"off"});this.set({url:t,addedByPerson:s,enabled:i,status:"loading"});try{const a=await this.loader.load(t,{runScript:s&&i});return p.install(a.module),this.set({url:t,addedByPerson:s,enabled:i,status:"installed",loaded:a})}catch(a){return this.set({url:t,addedByPerson:s,enabled:i,status:"failed",error:a instanceof Error?a.message:String(a)})}}set(t){return this.states.set(t.url,t),this.announce(),t}save(){n.write(this.config,this.storage)}announce(){this.changes.dispatchEvent(new Event("change"))}}export{y as ModuleSession};
@@ -0,0 +1 @@
1
+ import{o as a,V as e,bb as s,y as t,E as r,$ as i,p as o,ag as n,P as l,x as d,ad as u,a0 as b,a1 as M,bc as m,e as y,H as B,d as G,v as S,ax as c,au as f,ay as h,G as p,aM as x,F as g,bd as C,J as E,be as L,bf as P,bg as D,C as T,z as v,B as A,h as F,bh as O,Z as V,O as H}from"./rr0-scene.mjs";const k={AdditiveBlending:H,BackSide:V,BoxGeometry:O,BufferAttribute:F,BufferGeometry:A,CanvasTexture:v,Color:T,ConeGeometry:D,CylinderGeometry:P,DataTexture:L,DoubleSide:E,Euler:C,Float32BufferAttribute:g,FrontSide:x,Group:p,Line:h,LineBasicMaterial:f,LineSegments:c,Matrix4:S,Mesh:G,MeshBasicMaterial:B,MeshStandardMaterial:y,NormalBlending:m,Object3D:M,PlaneGeometry:b,PointLight:u,Points:d,PointsMaterial:l,Quaternion:n,ShaderMaterial:o,SphereGeometry:i,Sprite:r,SpriteMaterial:t,TorusGeometry:s,Vector2:e,Vector3:a};export{k as MODULE_THREE};
@@ -0,0 +1,85 @@
1
+ import{aT as p,aU as V}from"./rr0-scene.mjs";class m{static read(t,e){let i=t;for(const n of e.split(".")){if(i=m.bare(i),i===null||typeof i!="object")return;i=i[n]}return m.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=m.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 m.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 C{static sets=new Map;static publish(t){C.sets.set(t.kind,t)}static of(t){return C.sets.get(t)}static kinds(){return[...C.sets.keys()]}}class W{static attach(t,e,i){t.classList.add(e);const n=`${e}-style`;if(t.parentElement?.querySelector(`:scope > style.${n}`))return;const s=t.ownerDocument.createElement("style");s.className=n,s.textContent=i,t.before(s)}}class 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=`
2
+ .add-menu { padding: .3em 0; border: 1px solid color-mix(in srgb, CanvasText 30%, transparent); border-radius: 4px; background: Canvas; color: CanvasText;
3
+ box-shadow: 0 2px 8px rgba(0, 0, 0, .25); max-height: 60vh; overflow-y: auto; font-size: .9em; }
4
+ @supports (position-area: bottom span-left) {
5
+ .add-menu:popover-open { inset: auto; position-area: bottom span-left; margin: .2em 0 0 0; }
6
+ }
7
+ .add-menu-choice { display: block; width: 100%; padding: .25em .9em; border: 0; background: none; color: inherit; font: inherit; text-align: left;
8
+ cursor: pointer; white-space: nowrap; }
9
+ .add-menu-choice:hover, .add-menu-choice:focus-visible { background: color-mix(in srgb, CanvasText 12%, transparent); }
10
+ .add-menu-choice[aria-disabled="true"] { opacity: .45; cursor: not-allowed; background: none; }
11
+ .add-menu-choice[hidden] { display: none; }
12
+ `;panel;kinds=[];last;setKinds(t){this.kinds=t;const e=this.button.ownerDocument;this.panel.replaceChildren(...t.map(i=>{const n=e.createElement("button");return n.type="button",n.className="add-menu-choice",n.setAttribute("role","menuitem"),this.idOf&&(n.id=this.idOf(i.value)),n.dataset.value=i.value,n.textContent=i.label,n.hidden=i.hidden===!0,i.disabledReason&&(n.setAttribute("aria-disabled","true"),n.title=i.disabledReason),n.addEventListener("click",()=>{n.getAttribute("aria-disabled")!=="true"&&(this.close(),this.last=i.value,this.onPick(i.value))}),n}))}setDisabled(t,e){this.kinds=this.kinds.map(n=>n.value===t?{...n,disabledReason:e}:n);const i=[...this.panel.children].find(n=>n.dataset.value===t);i&&(e?(i.setAttribute("aria-disabled","true"),i.title=e):(i.removeAttribute("aria-disabled"),i.title=""))}labelOf(t){return this.kinds.find(e=>e.value===t)?.label??t}get lastPicked(){return this.last}close(){if(typeof this.panel.hidePopover=="function")try{this.panel.matches(":popover-open")&&this.panel.hidePopover()}catch{}}}class l{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=l.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=l.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=l.draw('<path d="M5 3.2v9.6L12.6 8z"/>',"currentColor");static PAUSE=l.draw('<path d="M5.5 3.5v9M10.5 3.5v9"/>');static RECORD=l.draw('<circle cx="8" cy="8" r="4.2" fill="var(--error, #d93025)" stroke="none"/>');static STOP=l.draw('<rect x="4" y="4" width="8" height="8" rx="1.2"/>',"currentColor");static PREVIOUS_MARK=l.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=l.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=l.draw('<path d="M4 4l8 8M12 4l-8 8"/>');static PLUS=l.draw('<path d="M8 3v10M3 8h10"/>');static METEOR=l.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=l.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=l.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=l.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=l.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=l.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=l.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=l.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=l.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=l.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=l.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=l.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=l.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=l.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=l.draw('<path d="M4 1.8h5.2L12.5 5v9.2H4z"/><path d="M9 1.8V5.2h3.5"/>');static BY_GLYPH={"🗑":l.TRASH,"🎯":l.TARGET,"+":l.PLUS,"✕":l.CLOSE,"▶":l.PLAY,"⏸":l.PAUSE,"⏺":l.RECORD,"⏹":l.STOP};static show(t,e){if(t.dataset.icon===e&&t.firstChild)return;const i=l.BY_GLYPH[e];i?t.innerHTML=i:t.textContent=e,t.dataset.icon=e}static CSS=`
13
+ .icon { display: block; flex: none; }
14
+ button:has(> .icon:only-child) { display: inline-flex; align-items: center; justify-content: center; }
15
+ `}class L{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=`
16
+ .element-list-row { display: flex; align-items: flex-end; flex-wrap: wrap; gap: .4em; flex: 1 1 100%; min-width: 0; }
17
+ .element-list-picker { flex: 1 1 10em; min-width: 0; display: flex; }
18
+ .element-list-picker select { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; }
19
+ .element-list-empty { align-self: center; opacity: .75; font-style: italic; }
20
+ /* The fields of the picked element unroll from its picker: the frame starts where the picker ends, with no space between (the gap of the
21
+ container both stand in is taken back, see glue), its corner under the picker square. The row is aligned on its bottom so that the
22
+ picker's lower edge is the row's, whatever the height of the buttons beside it. */
23
+ .element-list-body { flex: 1 1 100%; min-width: 0; box-sizing: border-box; border: 1px solid color-mix(in srgb, currentColor 30%, transparent);
24
+ border-radius: 0 6px 6px 6px; padding: .5em .6em; margin: 0 0 .3em; display: flex; flex-wrap: wrap;
25
+ align-items: center; gap: .5em; }
26
+ .element-list-picker select { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
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&&!L.glued.has(e)&&L.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"&&L.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,l.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(L.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 f{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(${f.charsFor(i)}ch + ${f.CHROME})`,f.hold(i,!0),i.dataset.held!==""&&(i.dataset.held="",i.addEventListener("input",()=>f.hold(i)),i.addEventListener("change",()=>f.hold(i,!0)));return e.length}static hold(t,e=!1){const i=f.heldValue(t.value,t,e);i!==t.value&&(t.value=i,t.dispatchEvent(new Event("input",{bubbles:!0})))}static heldValue(t,e,i=!1){if(t===""||!/^-?\d+(\.\d+)?$/.test(t))return t;const n=f.wholeOnly(e.step)?0:f.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)??f.UNBOUNDED,e(t.min)??0),n=String(Math.floor(Number.isFinite(i)?i:f.UNBOUNDED)).length,s=t.min!==""&&Number(t.min)<0?1:0,o=f.wholeOnly(t.step)?0:f.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 x{static CSS=`
29
+ .window-close {
30
+ position: absolute; top: 8px; right: 8px; z-index: 1;
31
+ display: inline-flex; align-items: center; justify-content: center;
32
+ width: 32px; height: 32px; min-width: 32px; min-height: 32px; padding: 0;
33
+ border: 0; border-radius: 8px; background: none; color: inherit; opacity: .7; cursor: pointer;
34
+ }
35
+ .window-close:hover, .window-close:focus-visible { opacity: 1; background: color-mix(in srgb, currentColor 12%, transparent); }
36
+ :is(dialog, [popover], .context-menu):has(> .window-close) { position: relative; padding-right: 44px; }
37
+ .context-menu:has(> .window-close) { position: fixed; }
38
+ `;static button(t,e,i){const n=t.querySelector(":scope > .window-close");if(n)return x.label(n,e),n;const s=document.createElement("button");return s.type="button",s.className="window-close",s.innerHTML=l.CLOSE,x.label(s,e),s.addEventListener("click",o=>{o.stopPropagation(),i()}),t.prepend(s),s}static popover(t,e){return x.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&&x.outside(t,s)&&i()})}return x.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 k extends HTMLElement{static TAG="rr0-input-basis";static CSS=`
39
+ rr0-input-basis { display: inline-block; }
40
+ rr0-input-basis[hidden] { display: none; }
41
+ .basis-mark {
42
+ display: inline-block; margin-left: 8px; padding: 0 8px; border: 1px solid var(--glow-dim); border-radius: 999px;
43
+ font: 600 11px/1.6 var(--sans); color: var(--glow); cursor: pointer; vertical-align: .05em; user-select: none;
44
+ }
45
+ /* Always there, so that nothing moves when it shows: "stated", the default, said quietly, and fully on the hover of its field. */
46
+ .basis-mark[data-basis="stated"] { border-style: dashed; opacity: .55; }
47
+ :is(label, .field, .event-param-label):is(:hover, :focus-within) .basis-mark, .basis-mark:is(:hover, :focus-visible) { opacity: 1; }
48
+ .basis-mark[data-basis="assumed"], .basis-mark[data-basis="derived"] { font-style: italic; }
49
+ .basis-window { width: min(26em, 92vw); padding: 18px 20px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--ground-raised); color: var(--ink); box-shadow: 0 12px 32px rgba(0, 0, 0, .3); }
50
+ .basis-window h3 { margin: 0 0 12px; font: 600 19px/1.3 var(--serif); }
51
+ .basis-window label { display: flex; flex-direction: column; gap: 5px; margin: 0 0 12px; font: 600 13px/1.3 var(--sans); color: var(--ink-dim); }
52
+ .basis-window :is(select, textarea) { box-sizing: border-box; width: 100%; font-weight: 400; }
53
+ /* Beside its pill, under it or above it where there is room (anchored, see open); centred where anchors are not known. Fixed, against a
54
+ window's own rule (WindowClose), which makes a popover with a ✕ relative, and so drawn at the top of the page. */
55
+ .basis-window.basis-window:popover-open { position: fixed; inset: auto; margin: 6px 0; max-height: calc(100vh - 24px); overflow: auto;
56
+ position-area: bottom span-right; position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline; }
57
+ @supports not (position-area: bottom) { .basis-window.basis-window:popover-open { inset: 0; margin: auto; height: fit-content; } }
58
+ .basis-window textarea { min-height: 8em; font: 400 14px/1.45 var(--sans, sans-serif); resize: vertical; }
59
+ `;hows=[];rationaleKept=!0;wording;shown;mark;window;static count=0;anchor=`--rr0-basis-${++k.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()}get entry(){return this.shown}set entry(t){this.shown=t&&(t.basis!=="stated"||t.how!==void 0||t.rationale!==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]),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 a of["measured","stated","derived","assumed"])i.append(new Option(t.basis[a],a));i.value=this.shown?.basis??"stated";const n=document.createElement("select");n.append(new Option("—",""));for(const a of this.hows)n.append(new Option(a.label,a.value));n.value=this.shown?.how??"";const s=document.createElement("textarea");s.value=this.shown?.rationale??"";const o=()=>{this.entry={basis:i.value,...n.value?{how:n.value}:{},...s.value.trim()?{rationale:s.value.trim()}:{}},this.dispatchEvent(new CustomEvent("basischange",{detail:{entry:this.shown},bubbles:!0,composed:!0}))};for(const a of[i,n])a.addEventListener("change",o);s.addEventListener("change",o);const d=(a,u)=>{const h=document.createElement("label");return h.append(Object.assign(document.createElement("span"),{textContent:a}),u),h},r=this.windowElement();r.replaceChildren(e,d(t.basisField,i),...this.hows.length>0?[d(t.howField,n)]:[],...this.rationaleKept?[d(t.rationaleField,s)]:[]),x.popover(r,t.title),typeof r.showPopover=="function"&&r.isConnected?r.showPopover():r.hidden=!1}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 U(){customElements.get(k.TAG)||customElements.define(k.TAG,k)}const q="rr0-input-position",H={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",positionBasisMeasured:"measured",positionBasisDerived:"derived",positionBasisAssumed:"assumed",positionBasisField:"Basis"},j=`${k.CSS}
60
+ rr0-input-position { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .3em .5em; }
61
+ /* As the date's own switch (see DateInputElement): it reads as part of the label, before the fields. */
62
+ 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; }
63
+ rr0-input-position .position-mode:hover:not(:disabled) { text-decoration-thickness: 2px; }
64
+ rr0-input-position .position-mode:disabled { cursor: default; text-decoration: none; opacity: .75; }
65
+ rr0-input-position .position-mode:focus-visible { outline: 2px solid #4af; outline-offset: 2px; border-radius: 2px; }
66
+ rr0-input-position .position-axis { display: inline-flex; align-items: center; gap: .3em; white-space: nowrap; }
67
+ /* East and North are two fields, each with its unit: room between the unit of one and the name of the next. */
68
+ rr0-input-position :is(.position-local, .position-geo) { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .3em 1em; }
69
+ rr0-input-position .position-from { display: inline-flex; align-items: center; gap: .3em; white-space: nowrap; }
70
+ rr0-input-position .position-from select { width: auto; max-width: 14em; }
71
+ rr0-input-position input[type="number"] { width: 7em; }
72
+ rr0-input-position .position-geo input[type="number"] { width: 9.5em; }
73
+ /* What it stands on (see BasisInputElement): before the switch, as a date's. */
74
+ rr0-input-position .position-basis { order: -2; }
75
+ rr0-input-position .position-mode { order: -1; }
76
+ rr0-input-position [hidden] { display: none !important; }
77
+ `;class v extends HTMLElement{modeButton;fromRow;fromSelect;localRow;geoRow;eastField;northField;latField;lngField;basisSelect;eastLabel;northLabel;latLabel;lngLabel;wording=H;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=(w,E,S,O)=>{const y=e.createElement("input");return y.type="number",y.id=w,y.min=String(E),y.max=String(S),y.step=O,y.autocomplete="off",y},u=(w,E)=>{const S=e.createElement("label");S.className="position-axis";const O=e.createElement("span");return S.append(O,w,E),{row:S,label:O}},h=Number(this.getAttribute("range")??3e4),c=a(this.getAttribute("east-id")??`${t}-east`,-h,h,r),b=a(this.getAttribute("north-id")??`${t}-north`,-h,h,r),N=a(this.getAttribute("lat-id")??`${t}-lat`,-90,90,"0.000001"),T=a(this.getAttribute("lng-id")??`${t}-lng`,-180,180,"0.000001"),A=e.createElement("span");A.className="position-local";const $=u(c,"m"),F=u(b,"m");A.append($.row,F.row);const B=e.createElement("span");B.className="position-geo";const P=u(N,"°"),D=u(T,"°");B.append(P.row,D.row);for(const w of[c,b])w.addEventListener("input",()=>this.typedLocal());for(const w of[N,T])w.addEventListener("input",()=>this.typedGeo());U();const g=e.createElement(k.TAG);g.id=`${t}-basis`,g.className="position-basis",g.rationaleKept=!1,g.anchorKey=`${t}-basis`,g.addEventListener("basischange",w=>{w.stopPropagation();const E=w.detail.entry;this.shownBasis=E?.basis==="stated"?void 0:E?.basis,this.dispatchEvent(new CustomEvent("basischange",{detail:{basis:this.shownBasis},bubbles:!0,composed:!0}))}),this.append(i,n,s,A,B,g),this.modeButton=n,this.fromRow=s,this.fromSelect=d,this.localRow=A,this.geoRow=B,this.eastField=c,this.northField=b,this.latField=N,this.lngField=T,this.basisSelect=g,this.eastLabel=$.label,this.northLabel=F.label,this.latLabel=P.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(p.degrees(e.lat)):"",this.lngField.value=e?String(p.degrees(e.lng)):""}this.show()}set said(t){this.build(),this.pullDegrees(),p.isRelative(t)?(this.relativeShown=!0,this.referenceId=t.relativeTo):p.isAbsolute(t)?this.relativeShown=!1:(this.relativeShown=!this.isGeo,this.referenceId=void 0),this.show()}get said(){const t=this.localValue();if(t)return p.restated(this.relativeShown?p.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=v.typed(this.latField),e=v.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:{stated:t.positionBasisStated,measured:t.positionBasisMeasured,derived:t.positionBasisDerived,assumed:t.positionBasisAssumed}},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?p.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?p.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(c=>c.id??"");([...s.options].map(c=>c.value).join(`
78
+ `)!==o.join(`
79
+ `)||[...s.options].map(c=>c.text).join(`
80
+ `)!==n.map(c=>c.label).join(`
81
+ `))&&s.replaceChildren(...n.map(c=>new Option(c.label,c.id??""))),this.referenceId!==void 0&&!n.some(c=>c.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=(c,b)=>{c!==d&&(c.value=b===void 0?"":String(b))},a=this.localValue(),u=this.reference();if(r(this.eastField,a?p.metres(a.eastM-u.eastM):void 0),r(this.northField,a?p.metres(a.northM-u.northM):void 0),this.isGeo&&!this.relativeShown)return;const h=this.geoValue();r(this.latField,h?p.degrees(h.lat):void 0),r(this.lngField,h?p.degrees(h.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=v.typed(this.eastField),e=v.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=p.toGeo(n,o)}this.shownValue=s,this.tell(s,p.relative(t,e,this.referenceId))}typedGeo(){const t=v.typed(this.latField),e=v.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=p.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?p.isAbsolute(e):p.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,v)}class R{constructor(t,e,i=()=>{},n){this.read=t,this.edit=e,this.context=i,this.place=n}static inPlace(t){return new R(()=>t,e=>e(t))}}class M{constructor(t,e,i="",n,s){this.container=t,this.idPrefix=i,this.values=n,this.enhance=s,this.said=new V([e,"en"])}set;target;changed=()=>{};said;setLanguage(t){this.said=new V([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 R?e:R.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))}f.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=m.read(e,s.key);if(s.type==="number"){const a=o;a!==n&&(a.value=typeof r=="number"?M.shown(r,s):"");const u=M.boundsOf(s,e,i);a.min=String(u.min),a.max=String(u.max);const h=s.effective?.(e,i);a.placeholder=h!==void 0?M.shown(h,s):this.read(s.placeholder)??"",a.classList.toggle("parameter-derived",r===void 0)}else if(s.type==="choice"){const a=o,u=s.optionsOf?.(e,i)??s.choices;if([...a.options].filter(h=>h.value!=="").map(h=>h.value).join(`
82
+ `)!==u.map(h=>h.value).join(`
83
+ `)&&a.replaceChildren(...s.required?[]:[new Option("—","")],...u.map(h=>new Option(this.read(h.label)??h.value,h.value))),a!==n&&(a.value=typeof r=="string"&&u.some(h=>h.value===r)?r:s.required?a.options[0]?.value??"":""),!s.required){const h=s.effective?.(e,i),c=u.find(b=>b.value===h);a.options[0].textContent=c?this.read(c.label)??c.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=M.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(m.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(m.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:m.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:u}=r.detail;this.writePosition(t,a,u)}),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=m.read(i,t.key),o=m.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=m.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=>{m.write(r,t.key,d(s)),m.write(r,t.secondKey,d(o)),m.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=m.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(`
84
+ `)===d.map(a=>a.value).join(`
85
+ `)||e.replaceChildren(...d.map(a=>{const u=document.createElement("label"),h=document.createElement("input");return h.type="checkbox",h.value=a.value,u.append(h," ",a.label),u}));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=M.boundsOf(t,s,i.context());n=Math.max(o.min,Math.min(o.max,e))/(t.scale??1)}}i.edit(s=>m.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{L as E,l as I,C as P,W as S,M as a,R as b};
@@ -1,4 +1,4 @@
1
- import{G as F,c as P,C as H,g as K,B as w,d as N,b as U,e 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,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>
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;
@@ -0,0 +1,27 @@
1
+ import{S as C,a as f,b as v,I as y,E as P}from"./ParameterForm-D0GvLmqx.js";import{R as b,b5 as S,aR as T,aS as F}from"./rr0-scene.mjs";import{reentryEditorMessages_en as I}from"./ReentryEditorMessages_en-O-YSmHxv.js";import{T as M}from"./TimelineTracks-Bv2FX3_W.js";class a{static NAME={en:"Name",fr:"Nom",es:"Nombre",it:"Nome"};static OBJECT={en:"Object",fr:"Objet",es:"Objeto",it:"Oggetto"};static LIGHT={en:"Light",fr:"Lumière",es:"Luz",it:"Luce"};static WHEN={en:"When",fr:"Quand",es:"Cuándo",it:"Quando"};static placeAt(e,t){const i=b.leadAt(e,t);if(i)return{t,lat:i.lat,lng:i.lng,altitudeKm:i.heightM/1e3};const r=e.track,[n,s]=t<(r[0]?.t??0)?[r[0],r[1]]:[r[r.length-2],r[r.length-1]];if(!n||!s||s.t===n.t){const o=n??s??{lat:0,lng:0,altitudeKm:80};return{t,lat:o.lat,lng:o.lng,altitudeKm:o.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(b.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(i=>i.t)])]}static instant(e,t,i,r={}){return{type:"number",key:e,min:-3600,max:36e3,step:.1,unit:"s",scale:.001,label:t,hint:i,...r}}static SET={kind:"reentry",title:{en:"Fireball or re-entry",fr:"Bolide ou rentrée",es:"Bólido o reentrada",it:"Bolide o rientro"},parameters:[{type:"said",key:"title",label:a.NAME},{type:"text",key:"object.name",group:a.OBJECT,label:{en:"Catalogue name",fr:"Nom au catalogue",es:"Nombre en el catálogo",it:"Nome a catalogo"},hint:{en:'For a re-entry, the piece as the satellite catalogue names it: "SL-12 R/B". Empty for a meteor.',fr:"Pour une rentrée, la pièce comme le catalogue des satellites la nomme : « SL-12 R/B ». Vide pour un météore.",es:"Para una reentrada, la pieza como la nombra el catálogo de satélites: «SL-12 R/B». Vacío para un meteoro.",it:"Per un rientro, il pezzo come lo chiama il catalogo dei satelliti: «SL-12 R/B». Vuoto per una meteora."}},{type:"text",key:"object.cosparId",group:a.OBJECT,label:{en:"COSPAR id",fr:"Identifiant COSPAR",es:"Identificador COSPAR",it:"Identificativo COSPAR"},placeholder:{en:"1968-013C",fr:"1968-013C",es:"1968-013C",it:"1968-013C"}},{type:"number",key:"object.norad",min:1,max:999999,step:1,group:a.OBJECT,label:{en:"NORAD number",fr:"Numéro NORAD",es:"Número NORAD",it:"Numero NORAD"}}]};static PLACE={kind:"reentry-place",title:{en:"Point of the path",fr:"Point du trajet",es:"Punto del trayecto",it:"Punto del percorso"},parameters:[a.instant("t",{en:"Time",fr:"Instant",es:"Instante",it:"Istante"},{en:"Seconds of the recording; negative before it began.",fr:"Secondes de l'enregistrement ; négatives avant son début.",es:"Segundos de la grabación; negativos antes de su inicio.",it:"Secondi della registrazione; negativi prima del suo inizio."},{required:!0}),{type:"position",key:"lat",secondKey:"lng",saidKey:"saidPosition",native:"geo",step:1,rangeM:2e6,label:{en:"Position",fr:"Position",es:"Posición",it:"Posizione"}},{type:"number",key:"altitudeKm",min:0,max:300,step:.1,unit:"km",required:!0,label:{en:"Altitude",fr:"Altitude",es:"Altitud",it:"Altitudine"},hint:{en:"Above the ellipsoid. A meteor begins to glow between 120 and 80 km; a satellite breaks up near 80.",fr:"Au-dessus de l'ellipsoïde. Un météore s'allume entre 120 et 80 km ; un satellite se brise vers 80.",es:"Sobre el elipsoide. Un meteoro se enciende entre 120 y 80 km; un satélite se rompe hacia los 80.",it:"Sopra l'ellissoide. Una meteora si accende tra 120 e 80 km; un satellite si spezza verso gli 80."}}]};static trackEnd(e,t){const i=e?.track;if(i?.length)return t==="first"?i[0].t:i[i.length-1].t}static FRAGMENT={kind:"reentry-fragment",title:{en:"Piece",fr:"Pièce",es:"Pieza",it:"Pezzo"},parameters:[{type:"text",key:"id",label:{en:"Id",fr:"Identifiant",es:"Identificador",it:"Identificativo"},validate:(e,t,i)=>!i?.fragments.some(r=>r!==t&&r.id===e)},{type:"number",key:"absoluteMagnitude",min:-40,max:10,step:.1,required:!0,group:a.LIGHT,label:{en:"Absolute magnitude",fr:"Magnitude absolue",es:"Magnitud absoluta",it:"Magnitudine assoluta"},hint:{en:"Its brightness seen from 100 km, as fireball reports give it: −4 or brighter is a fireball, −17 a superbolide. Its light curve, when it has one, stands instead.",fr:"Son éclat vu à 100 km, comme le donnent les rapports de bolides : −4 ou plus brillant est un bolide, −17 un superbolide. Sa courbe de lumière, quand il en a une, vaut à la place.",es:"Su brillo visto a 100 km, como lo dan los informes de bólidos: −4 o más brillante es un bólido, −17 un superbólido. Su curva de luz, cuando la tiene, vale en su lugar.",it:"La sua luminosità vista da 100 km, come la danno i rapporti sui bolidi: −4 o più brillante è un bolide, −17 un superbolide. La sua curva di luce, quando ce l'ha, vale al suo posto."}},{type:"colour",key:"color",group:a.LIGHT,fallback:b.DEFAULT_COLOR,label:{en:"Colour",fr:"Couleur",es:"Color",it:"Colore"}},{type:"number",key:"trainS",min:0,max:600,step:.1,unit:"s",group:a.LIGHT,effective:()=>b.DEFAULT_TRAIN_S,label:{en:"Train",fr:"Traînée",es:"Estela",it:"Scia"},hint:{en:"How long a stretch of its own past path still glows behind it, seconds.",fr:"Combien de secondes de son propre trajet brillent encore derrière lui.",es:"Cuántos segundos de su propio trayecto siguen brillando detrás de él.",it:"Quanti secondi del suo stesso percorso brillano ancora dietro di lui."}},{type:"number",key:"lagS",min:0,max:600,step:.1,unit:"s",group:a.WHEN,effective:()=>0,label:{en:"Behind the lead",fr:"Retard sur la tête",es:"Retraso sobre la cabeza",it:"Ritardo sulla testa"},hint:{en:"Seconds behind the leading point along the same path: 0 is the leading piece itself.",fr:"Secondes de retard sur le point de tête, sur le même trajet : 0 est la pièce de tête elle-même.",es:"Segundos de retraso sobre el punto de cabeza, en el mismo trayecto: 0 es la propia pieza de cabeza.",it:"Secondi di ritardo sul punto di testa, sullo stesso percorso: 0 è il pezzo di testa stesso."}},a.instant("fromT",{en:"Seen from",fr:"Vu à partir de",es:"Visto desde",it:"Visto da"},{en:"When it breaks off or begins to glow; empty, the start of the path.",fr:"Quand il se détache ou s'allume ; vide, le début du trajet.",es:"Cuando se desprende o se enciende; vacío, el inicio del trayecto.",it:"Quando si stacca o si accende; vuoto, l'inizio del percorso."},{group:a.WHEN,effective:(e,t)=>a.trackEnd(t,"first")}),a.instant("untilT",{en:"Out at",fr:"Éteint à",es:"Apagado a",it:"Spento a"},{en:"When it has burned up or slowed below glowing; empty, the end of the path.",fr:"Quand il s'est consumé ou a trop ralenti pour briller ; vide, la fin du trajet.",es:"Cuando se ha consumido o ha frenado demasiado para brillar; vacío, el final del trayecto.",it:"Quando si è consumato o ha rallentato troppo per brillare; vuoto, la fine del percorso."},{group:a.WHEN,effective:(e,t)=>a.trackEnd(t,"last")})]};static CURVE_POINT={kind:"reentry-curve-point",title:{en:"Point of the light curve",fr:"Point de la courbe de lumière",es:"Punto de la curva de luz",it:"Punto della curva di luce"},parameters:[a.instant("t",{en:"Time",fr:"Instant",es:"Instante",it:"Istante"},{en:"Seconds of the recording.",fr:"Secondes de l'enregistrement.",es:"Segundos de la grabación.",it:"Secondi della registrazione."},{required:!0}),{type:"number",key:"absoluteMagnitude",min:-40,max:10,step:.1,required:!0,label:{en:"Absolute magnitude",fr:"Magnitude absolue",es:"Magnitud absoluta",it:"Magnitudine assoluta"}}]}}class h{constructor(e,t,i){this.container=e,this.host=t,C.attach(e,"reentry-editor-part",h.STYLE),this.language=i,this.render(),this.setLanguage(i)}messages=I;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 i=F.includes(e)?e:"en",r=i==="en"?I:await S(i);t===this.languageToken&&(this.messages=r,this.render(),this.sync())}sync(){const e=this.reentries;this.shown=[...e],e.some(i=>i.id===this.currentId)||(this.currentId=e[0]?.id),this.list?.setItems(e.map(i=>({id:i.id,label:this.labelOf(i)})),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 f(this.element("reentry-parameters"),this.language,"reentry.",{said:()=>this.host.said(),writingLanguage:()=>this.host.writingLanguage()}),this.form.show(a.SET,new v(()=>this.current,i=>this.editReentry(r=>{r.object&&(r.object={...r.object}),i(r),r.object&&Object.values(r.object).every(n=>n===void 0||n==="")&&delete r.object})),()=>this.written()))}refresh(){this.syncAddState();const e=this.reentries;if(e.length===this.shown.length&&e.every((t,i)=>t.id===this.shown[i].id)){this.syncTimeline();return}this.sync()}setTime(e){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.currentId=e,this.row="path",this.placeIndex=0,this.fragmentIndex=0,this.curveIndex=0,this.sync()}render(){const e=this.messages;this.form=void 0,this.container.innerHTML=`<div class="launch-editor">
2
+ <p class="launch-intro">${e.intro}</p>
3
+ <div id="reentry-list"></div>
4
+ <div id="reentry-fields" class="launch-fields">
5
+ <div id="reentry-parameters" class="launch-parameters"></div>
6
+ <div id="reentry-timeline"></div>
7
+ <button id="reentry-fragment-add" type="button" title="${e.addFragment}">${y.PLUS} ${e.fragment}</button>
8
+ <p class="launch-intro">${e.timelineNote}</p>
9
+ <fieldset id="reentry-path" class="launch-path">
10
+ <legend>${e.path}</legend>
11
+ <div id="reentry-place-parameters" class="launch-parameters"></div>
12
+ <button id="reentry-place-delete" class="icon-btn" type="button" title="${e.deletePlace}" aria-label="${e.deletePlace}">${y.TRASH}</button>
13
+ </fieldset>
14
+ <fieldset id="reentry-fragments" class="launch-path">
15
+ <legend id="reentry-fragment-legend">${e.fragment}</legend>
16
+ <div id="reentry-fragment-parameters" class="launch-parameters"></div>
17
+ <button id="reentry-fragment-delete" class="icon-btn" type="button" title="${e.deleteFragment}" aria-label="${e.deleteFragment}">${y.TRASH}</button>
18
+ <fieldset id="reentry-curve" class="launch-path">
19
+ <legend>${e.curve}</legend>
20
+ <p id="reentry-curve-empty" class="launch-intro">${e.noCurve}</p>
21
+ <div id="reentry-curve-parameters" class="launch-parameters"></div>
22
+ <button id="reentry-curve-delete" class="icon-btn" type="button" title="${e.deleteCurvePoint}" aria-label="${e.deleteCurvePoint}">${y.TRASH}</button>
23
+ </fieldset>
24
+ </fieldset>
25
+ <p class="launch-intro">${e.derivedNote}</p>
26
+ </div>
27
+ </div>`,this.list=new P({header:this.element("reentry-list"),body:this.element("reentry-fields"),ids:{list:"reentry-select",remove:"reentry-delete",add:"reentry-add",kinds:"reentry-add-kind",kind:t=>`reentry-add-${t}`},onSelect:t=>this.show(t),onAdd:t=>this.addReentry(t==="reentry"?"reentry":"fireball"),onRemove:()=>this.deleteCurrent()}),this.list.setLabels({list:e.reentry,remove:e.deleteReentry,add:e.addReentry,empty:e.none}),this.list.setKinds([{value:"fireball",label:e.kindFireball},{value:"reentry",label:e.kindReentry}]),this.timeline=new M(this.element("reentry-timeline"),t=>this.host.seekTo(t),{addKeyframeHere:e.addPointHere,keyframeHere:e.pointHere,zoomHint:e.zoomHint}),this.element("reentry-place-delete").addEventListener("click",()=>this.removePlace()),this.element("reentry-curve-delete").addEventListener("click",()=>this.removeCurvePoint()),this.placeForm=void 0,this.element("reentry-fragment-add").addEventListener("click",()=>this.addFragment()),this.element("reentry-fragment-delete").addEventListener("click",()=>this.removeFragment()),this.fragmentForm=void 0,this.curveForm=void 0}written(){const e=this.current;e&&this.list?.rename(e.id,this.labelOf(e))}syncTimeline(){const e=this.current;if(!this.timeline||!e)return;const t=this.messages,i=e.track[0]?.t??0,r=e.track[e.track.length-1]?.t??0,n={id:"path",label:t.path,color:h.PATH_COLOR,times:e.track.map(c=>c.t),active:this.row==="path",selectedTime:this.row==="path"?e.track[this.placeIndex]?.t:void 0,open:()=>this.selectPlace(this.placeIndex),pressed:(c,d)=>{const m=d===void 0?-1:(this.current?.track??[]).findIndex(u=>u.t===d);this.selectPlace(m>=0?m:this.placeIndex)},move:(c,d)=>this.movePlace(c,d),add:()=>this.addPlaceAt(this.host.currentTime())},s=e.fragments.map((c,d)=>{const m=c.lightCurve??[];return{id:`fragment-${d}`,label:this.fragmentLabel(c,d),color:h.PIECE_COLOR,times:m.map(u=>u.t),spans:[{t:c.fromT??i,until:c.untilT??r,label:""}],active:this.row==="fragment"&&d===this.fragmentIndex,selectedTime:this.row==="fragment"&&d===this.fragmentIndex?m[this.curveIndex]?.t:void 0,open:()=>this.selectFragment(d),pressed:(u,p)=>{const k=p===void 0?-1:(this.current?.fragments[d]?.lightCurve??[]).findIndex(w=>w.t===p);this.selectFragment(d,k>=0?k:void 0)},move:(u,p)=>this.moveCurvePoint(d,u,p),add:()=>this.addCurvePointAt(d,this.host.currentTime())}}),l=a.instantsOf(e),o=Math.min(...l),g=Math.max(...l),x=Math.max(500,(g-o)/10);this.timeline.show([n,...s],this.host.duration(),this.host.currentTime(),{from:o-x,to:g+x})}static PATH_COLOR="#e08a1e";static PIECE_COLOR="#c0581b";static MIN_PLACES=2;syncPlace(e=!1){const t=this.current?.track??[];this.placeIndex=Math.max(0,Math.min(this.placeIndex,t.length-1)),this.element("reentry-place-delete").disabled=t.length<=h.MIN_PLACES,this.placeForm?this.placeForm.sync(e):(this.placeForm=new f(this.element("reentry-place-parameters"),this.language,"reentryPlace."),this.placeForm.show(a.PLACE,new v(()=>this.current?.track[this.placeIndex],i=>this.editPlace(this.placeIndex,i),void 0,this.host.positionPlace?.()),()=>{})),this.syncTimeline()}selectPlace(e){this.row="path",this.placeIndex=e,this.syncDetail(),this.syncPlace(!0)}syncDetail(){this.element("reentry-path").hidden=this.row!=="path",this.element("reentry-fragments").hidden=this.row!=="fragment";const e=this.currentFragment;this.element("reentry-fragment-legend").textContent=e?`${this.messages.fragment} ${this.fragmentLabel(e,this.fragmentIndex)}`:this.messages.fragment}editPlace(e,t){let i;this.editReentry(r=>{i={...r.track[e]},t(i),r.track=r.track.map((n,s)=>s===e?i:n).sort((n,s)=>n.t-s.t)}),i&&(this.placeIndex=this.current?.track.indexOf(i)??0),this.syncPlace()}movePlace(e,t){const i=this.current?.track.findIndex(r=>r.t===e)??-1;i<0||(this.editPlace(i,r=>{r.t=t}),this.syncPlace(!0))}addPlaceAt(e){const t=this.current;if(!t)return;const i=t.track.findIndex(n=>Math.abs(n.t-e)<1);if(i>=0){this.selectPlace(i);return}const r=a.placeAt(t,e);this.editReentry(n=>{n.track=[...n.track,r].sort((s,l)=>s.t-l.t)}),this.selectPlace(this.current?.track.indexOf(r)??0)}removePlace(){if((this.current?.track.length??0)<=h.MIN_PLACES)return;const e=this.placeIndex;this.editReentry(t=>{t.track=t.track.filter((i,r)=>r!==e)}),this.syncPlace(!0)}static MIN_FRAGMENTS=1;fragmentLabel(e,t){return e.id??String(t+1)}syncFragments(e,t=!1){const i=e.fragments;this.fragmentIndex=Math.max(0,Math.min(this.fragmentIndex,i.length-1)),this.element("reentry-fragment-delete").disabled=i.length<=h.MIN_FRAGMENTS,this.syncDetail(),this.fragmentForm?this.fragmentForm.sync(t):(this.fragmentForm=new f(this.element("reentry-fragment-parameters"),this.language,"reentryFragment."),this.fragmentForm.show(a.FRAGMENT,new v(()=>this.currentFragment,r=>this.editFragment(n=>r(n)),()=>this.current),()=>{})),this.syncCurve(t)}selectFragment(e,t){const i=e!==this.fragmentIndex;this.row="fragment",this.fragmentIndex=e,t!==void 0?this.curveIndex=t:i&&(this.curveIndex=0),this.current&&this.syncFragments(this.current,!0)}get currentFragment(){return this.current?.fragments[this.fragmentIndex]}editFragment(e,t=this.fragmentIndex){this.editReentry(i=>{const r={...i.fragments[t]};r.lightCurve&&(r.lightCurve=[...r.lightCurve]),e(r),i.fragments=i.fragments.map((n,s)=>s===t?r:n)}),this.syncDetail(),this.syncTimeline()}addFragment(){const e=this.current;if(!e)return;const t=e.fragments[e.fragments.length-1];let i=e.fragments.length+1;for(;e.fragments.some(n=>n.id===`piece-${i}`);)i++;const r={id:`piece-${i}`,lagS:(t?.lagS??0)+1,absoluteMagnitude:(t?.absoluteMagnitude??-4)+1};this.editReentry(n=>{n.fragments=[...n.fragments,r]}),this.selectFragment((this.current?.fragments.length??1)-1)}removeFragment(){if((this.current?.fragments.length??0)<=h.MIN_FRAGMENTS)return;const e=this.fragmentIndex;this.editReentry(t=>{t.fragments=t.fragments.filter((i,r)=>r!==e)}),this.curveIndex=0,this.selectFragment(Math.min(e,(this.current?.fragments.length??1)-1))}syncCurve(e=!1){const t=this.currentFragment?.lightCurve??[];this.curveIndex=Math.max(0,Math.min(this.curveIndex,t.length-1)),this.element("reentry-curve-empty").hidden=t.length>0,this.element("reentry-curve-parameters").hidden=t.length===0,this.element("reentry-curve-delete").hidden=t.length===0,this.curveForm?this.curveForm.sync(e):(this.curveForm=new f(this.element("reentry-curve-parameters"),this.language,"reentryCurve."),this.curveForm.show(a.CURVE_POINT,new v(()=>this.currentFragment?.lightCurve?.[this.curveIndex],i=>this.editCurvePoint(this.fragmentIndex,this.curveIndex,i)),()=>{})),this.syncTimeline()}editCurvePoint(e,t,i){let r;this.editFragment(n=>{const s=n.lightCurve??[];r={...s[t]},i(r),n.lightCurve=s.map((l,o)=>o===t?r:l).sort((l,o)=>l.t-o.t)},e),r&&(this.curveIndex=this.current?.fragments[e]?.lightCurve?.indexOf(r)??0),this.syncCurve()}moveCurvePoint(e,t,i){const r=this.current?.fragments[e]?.lightCurve?.findIndex(n=>n.t===t)??-1;r<0||(this.fragmentIndex=e,this.editCurvePoint(e,r,n=>{n.t=i}),this.syncFragments(this.current,!0))}addCurvePointAt(e,t){const i=this.current?.fragments[e];if(!i)return;const r=(i.lightCurve??[]).findIndex(s=>Math.abs(s.t-t)<1);if(r>=0){this.selectFragment(e,r);return}const n=a.curvePointAt(i,t);this.editFragment(s=>{s.lightCurve=[...s.lightCurve??[],n].sort((l,o)=>l.t-o.t)},e),this.selectFragment(e,this.current?.fragments[e]?.lightCurve?.indexOf(n)??0)}removeCurvePoint(){if(!this.currentFragment?.lightCurve?.length)return;const e=this.curveIndex;this.editFragment(t=>{const i=(t.lightCurve??[]).filter((r,n)=>n!==e);i.length?t.lightCurve=i:delete t.lightCurve}),this.syncCurve(!0)}editReentry(e){const t=this.current;if(!t)return;const i={...t,track:[...t.track],fragments:[...t.fragments]};e(i),this.writeReentries(this.reentries.map(r=>r===t?i:r)),this.host.changed()}origin(){const e=this.host.sighting(),t=e.event?.place?.[0];if(!(t?.lat===void 0||t.lng===void 0))return{lat:t.lat,lng:t.lng,headingRad:(e.observerTrack?.getInterpolatedPoseAt(0)?.headingDeg??0)*Math.PI/180}}newOf(e){const t=this.origin();if(!t)return;const i=Math.round(this.host.currentTime()),r=Math.max(.05,Math.cos(t.lat*Math.PI/180)),n=(s,l)=>{const o=s*Math.cos(t.headingRad)-l*Math.sin(t.headingRad),g=s*Math.sin(t.headingRad)+l*Math.cos(t.headingRad);return{lat:t.lat+o/111.32,lng:t.lng+g/(111.32*r)}};return e==="fireball"?{track:[{t:i,...n(150,-45),altitudeKm:100},{t:i+3e3,...n(150,45),altitudeKm:60}],fragments:[{id:"main",absoluteMagnitude:-6}]}:{track:[{t:i,...n(300,-225),altitudeKm:82},{t:i+6e4,...n(300,225),altitudeKm:72}],fragments:[{id:"main",absoluteMagnitude:-4},{id:"piece-2",lagS:1.5,absoluteMagnitude:-2.5},{id:"piece-3",lagS:3,absoluteMagnitude:-1.5}]}}addReentry(e){const t=this.newOf(e);if(!t)return;let i=this.reentries.length+1;for(;this.reentries.some(n=>n.id===`${e}-${i}`);)i++;const r={id:`${e}-${i}`,...t};this.writeReentries([...this.reentries,r]),this.host.changed(),this.show(r.id)}deleteCurrent(){const e=this.current;e&&(this.currentId=void 0,this.writeReentries(this.reentries.filter(t=>t!==e)),this.host.changed(),this.sync())}writeReentries(e){const t=this.host.sighting();t.skyEvents=T.written({...t.skyEvents,reentries:e})}labelOf(e){const t=this.host.said().read(e.title)||e.object?.name;return t?`${t} (${e.id})`:e.id}get reentries(){return this.host.sighting().skyEvents?.reentries??[]}element(e){return this.container.querySelector(`#${e}`)}}export{h as ReentryEditor};
@@ -0,0 +1 @@
1
+ const e={intro:"A fireball or a re-entry seen while the recording runs: a meteor, a satellite or a rocket stage burning up. A fact of the sky, not a reading of the account. It is placed where it really was, latitude, longitude and height, and seen through the Earth's shape; its light lights the scene from there.",none:"No fireball or re-entry in this recording",reentry:"Fireball or re-entry",deleteReentry:"Delete it",addReentry:"Add a fireball or a re-entry",kindFireball:"Fireball (meteor)",kindReentry:"Re-entry (satellite, stage)",path:"Path",deletePlace:"Remove this point",fragments:"Pieces",fragment:"Piece",addFragment:"Add a piece behind the last",deleteFragment:"Remove this piece",curve:"Light curve",deleteCurvePoint:"Remove this point",noCurve:'No light curve: its absolute magnitude stands throughout. The "+" of its row on the timeline adds a point at the playhead.',addNowhere:"Give the recording a place first: a fireball is put in front of the witness",derivedNote:"An empty field shows, greyed, the value in use. Empty a field to go back to it. The smaller pieces each one sheds are set in the file.",timelineNote:`On the timeline, a diamond pressed is the point shown below, and the scene goes to its instant; drag it to move it in time. The "+" of a row puts a point at the playhead. The hatched parts are before the recording's start or after its end.`,addPointHere:"Add a point here, at the playhead",pointHere:"A point is at the playhead: press it to edit it",zoomHint:"Pinch, or Ctrl + wheel, to zoom; Shift + wheel to scroll"};export{e as reentryEditorMessages_en};
@@ -0,0 +1 @@
1
+ const e={intro:"Un bólido o una reentrada visto durante la grabación: un meteoro, un satélite o una etapa de cohete que se consume. Un hecho del cielo, no una lectura del relato. Se coloca donde estaba realmente, latitud, longitud y altura, y se ve a través de la forma de la Tierra; su luz ilumina la escena desde allí.",none:"Ningún bólido ni reentrada en esta grabación",reentry:"Bólido o reentrada",deleteReentry:"Eliminarlo",addReentry:"Añadir un bólido o una reentrada",kindFireball:"Bólido (meteoro)",kindReentry:"Reentrada (satélite, etapa)",path:"Trayecto",deletePlace:"Quitar este punto",fragments:"Piezas",fragment:"Pieza",addFragment:"Añadir una pieza detrás de la última",deleteFragment:"Quitar esta pieza",curve:"Curva de luz",deleteCurvePoint:"Quitar este punto",noCurve:"Sin curva de luz: su magnitud absoluta vale todo el tiempo. El «+» de su fila en la línea de tiempo añade un punto en el cabezal.",addNowhere:"Dé primero un lugar a la grabación: un bólido se coloca delante del testigo",derivedNote:"Un campo vacío muestra, en gris, el valor usado. Vacíe un campo para volver a él. Los fragmentos más pequeños que suelta cada pieza se ajustan en el archivo.",timelineNote:"En la línea de tiempo, un rombo pulsado es el punto mostrado debajo, y la escena va a su instante; arrástrelo para moverlo en el tiempo. El «+» de una fila pone un punto en el cabezal. Las partes rayadas están antes del inicio de la grabación o después de su final.",addPointHere:"Añadir un punto aquí, en el cabezal",pointHere:"Hay un punto en el cabezal: púlselo para editarlo",zoomHint:"Pellizque, o Ctrl + rueda, para ampliar; Mayús + rueda para desplazar"};export{e as reentryEditorMessages_es};
@@ -0,0 +1 @@
1
+ const e={intro:"Un bolide ou une rentrée vu pendant l'enregistrement : un météore, un satellite ou un étage de fusée qui se consume. Un fait du ciel, pas une lecture du compte rendu. Il est placé là où il était vraiment, latitude, longitude et altitude, et vu à travers la forme de la Terre ; sa lumière éclaire la scène depuis là.",none:"Aucun bolide ni rentrée dans cet enregistrement",reentry:"Bolide ou rentrée",deleteReentry:"Le supprimer",addReentry:"Ajouter un bolide ou une rentrée",kindFireball:"Bolide (météore)",kindReentry:"Rentrée (satellite, étage)",path:"Trajet",deletePlace:"Retirer ce point",fragments:"Pièces",fragment:"Pièce",addFragment:"Ajouter une pièce derrière la dernière",deleteFragment:"Retirer cette pièce",curve:"Courbe de lumière",deleteCurvePoint:"Retirer ce point",noCurve:"Pas de courbe de lumière : sa magnitude absolue vaut tout du long. Le « + » de sa ligne sur la frise ajoute un point à la tête de lecture.",addNowhere:"Donnez d'abord un lieu à l'enregistrement : un bolide est placé devant le témoin",derivedNote:"Un champ vide montre, en grisé, la valeur utilisée. Videz un champ pour y revenir. Les débris plus petits que perd chaque pièce se règlent dans le fichier.",timelineNote:"Sur la frise, un losange pressé est le point affiché dessous, et la scène va à son instant ; faites-le glisser pour le déplacer dans le temps. Le « + » d'une ligne pose un point à la tête de lecture. Les parties hachurées sont avant le début de l'enregistrement ou après sa fin.",addPointHere:"Ajouter un point ici, à la tête de lecture",pointHere:"Un point est à la tête de lecture : pressez-le pour le modifier",zoomHint:"Pincez, ou Ctrl + molette, pour zoomer ; Maj + molette pour défiler"};export{e as reentryEditorMessages_fr};
@@ -0,0 +1 @@
1
+ const e={intro:"Un bolide o un rientro visto durante la registrazione: una meteora, un satellite o uno stadio di razzo che si consuma. Un fatto del cielo, non una lettura del resoconto. È posto dove era davvero, latitudine, longitudine e quota, e visto attraverso la forma della Terra; la sua luce illumina la scena da lì.",none:"Nessun bolide né rientro in questa registrazione",reentry:"Bolide o rientro",deleteReentry:"Eliminarlo",addReentry:"Aggiungere un bolide o un rientro",kindFireball:"Bolide (meteora)",kindReentry:"Rientro (satellite, stadio)",path:"Percorso",deletePlace:"Togliere questo punto",fragments:"Pezzi",fragment:"Pezzo",addFragment:"Aggiungere un pezzo dietro l'ultimo",deleteFragment:"Togliere questo pezzo",curve:"Curva di luce",deleteCurvePoint:"Togliere questo punto",noCurve:"Nessuna curva di luce: la sua magnitudine assoluta vale per tutto il tempo. Il «+» della sua riga sulla linea del tempo aggiunge un punto alla testina.",addNowhere:"Date prima un luogo alla registrazione: un bolide è posto davanti al testimone",derivedNote:"Un campo vuoto mostra, in grigio, il valore usato. Svuotate un campo per tornarci. I frammenti più piccoli che perde ogni pezzo si regolano nel file.",timelineNote:"Sulla linea del tempo, un rombo premuto è il punto mostrato sotto, e la scena va al suo istante; trascinatelo per spostarlo nel tempo. Il «+» di una riga mette un punto alla testina. Le parti tratteggiate sono prima dell'inizio della registrazione o dopo la sua fine.",addPointHere:"Aggiungere un punto qui, alla testina",pointHere:"C'è un punto alla testina: premetelo per modificarlo",zoomHint:"Pizzicate, o Ctrl + rotella, per ingrandire; Maiusc + rotella per scorrere"};export{e as reentryEditorMessages_it};
@@ -0,0 +1 @@
1
+ import{G,b0 as S,x as _,B as M,b1 as R,h as I,d as F,aV as f,aW as m,o as N,C as y,b2 as H,b3 as C,b4 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 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: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};
@@ -0,0 +1 @@
1
+ import{g as f,Q as w,X as M,Y as p,d as y,H as v,Z as O,$ as b,a0 as E,a1 as D}from"./rr0-scene.mjs";class c extends Error{constructor(t,s){super(`${t}: ${s.kind==="status"?s.status:s.kind}`),this.src=t,this.failure=s}}class u{static async blob(t){let s;try{s=await fetch(t)}catch{throw new c(t,await u.whyUnread(t))}if(!s.ok)throw new c(t,{kind:"status",status:s.status});const e=await s.blob();if(e.type&&!e.type.startsWith("image/"))throw new c(t,{kind:"notPicture"});return e}static failureOf(t){return t instanceof c?t.failure:{kind:"notPicture"}}static async whyUnread(t){try{return await fetch(t,{mode:"no-cors"}),{kind:"notShared"}}catch{return{kind:"unreachable"}}}}const g=3,l=800,d=Math.PI/180;class h{constructor(t,s,e=h.fetchImage){this.scene=t,this.onImageLoaded=s,this.loadImage=e}meshes=new Map;signatures=new Map;images=new Map;loading=new Map;failed=new Map;references=[];views=new Map;shown=!0;observerAt;static PRESENT_WITHIN_M=2;static GONE_BEYOND_M=20;static presenceAt(t,s){if(!t.from||!s)return 1;const e=f(s.lat,s.lng,t.from.lat,t.from.lng),a=(Math.hypot(e.x,e.z)-h.PRESENT_WITHIN_M)/(h.GONE_BEYOND_M-h.PRESENT_WITHIN_M),o=Math.min(Math.max(a,0),1);return 1-o*o*(3-2*o)}set(t,s=this.views,e){this.references=t,this.observerAt=e,this.views=s;const i=new Set(t.map(a=>a.id));for(const[a,o]of this.meshes)i.has(a)||(this.dispose(o),this.meshes.delete(a),this.signatures.delete(a));for(const[a,o]of this.images){const n=t.find(m=>m.id===a);if(n&&n.src===o.texture.userData.src)continue;o.texture.dispose(),this.images.delete(a);const r=this.meshes.get(a);r&&(this.dispose(r),this.meshes.delete(a),this.signatures.delete(a))}for(const a of t){const o=this.images.get(a.id);if(!o){this.load(a);continue}this.build(a,o)}}setShown(t){this.shown=t;for(const s of this.meshes.values())s.visible=t&&this.opacityOf(s.userData.id)>0}setView(t,s){this.views.set(t,s);const e=this.meshes.get(t);e&&this.applyOpacity(e,t)}layer=g;get any(){for(const t of this.meshes.values())if(t.visible)return!0;return!1}place(t){for(const s of this.meshes.values())s.visible&&(s.position.copy(t.position),s.updateMatrixWorld())}get furthestM(){return this.meshes.size>0?l:0}directionOfPixel(t,s,e,i){const a=this.images.get(t.id),o=a?a.width/a.height:1,n=Math.tan(t.registration.fovDeg/2*d),r=n*o;return i.set((s*2-1)*r,(1-e*2)*n,-1).normalize(),i.applyQuaternion(h.orientation(t))}aspectOf(t){const s=this.images.get(t);return s?s.width/s.height:void 0}failureOf(t){return this.failed.get(t)}load(t){const s=t.src;if(this.loading.has(t.id)||this.failed.has(s))return;const e=this.loadImage(s).then(i=>{this.loading.delete(t.id);const a=this.references.find(o=>o.id===t.id);if(!a||a.src!==s){i.texture.dispose();return}i.texture.userData.src=s,this.images.set(t.id,i),this.build(a,i),this.onImageLoaded()},i=>{this.loading.delete(t.id),this.failed.set(s,u.failureOf(i)),this.onImageLoaded()});this.loading.set(t.id,e)}static async fetchImage(t){const s=await u.blob(t),e=await createImageBitmap(s,{imageOrientation:"flipY"}).catch(()=>{throw new c(t,{kind:"notPicture"})}),i=new w(e);return i.flipY=!1,i.colorSpace=M,i.minFilter=p,i.magFilter=p,i.generateMipmaps=!1,i.needsUpdate=!0,{texture:i,width:e.width,height:e.height}}build(t,s){const e=h.signatureOf(t,s);let i=this.meshes.get(t.id);if(i&&this.signatures.get(t.id)===e){this.applyOpacity(i,t.id);return}i&&(this.dispose(i),this.meshes.delete(t.id)),i=new y(h.geometryOf(t,s),new v({map:s.texture,transparent:!0,depthTest:!1,depthWrite:!1,fog:!1,toneMapped:!1})),t.kind==="panorama"&&(i.material.side=O),i.frustumCulled=!1,i.layers.set(g),i.userData.id=t.id,i.quaternion.copy(h.orientation(t)),this.scene.add(i),this.meshes.set(t.id,i),this.signatures.set(t.id,e),this.applyOpacity(i,t.id)}static geometryOf(t,s){if(t.kind==="panorama"){const o=new b(l,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 e=2*l*Math.tan(t.registration.fovDeg/2*d),i=e*(s.width/Math.max(s.height,1)),a=new E(i,e);return a.translate(0,0,-l),a}static orientation(t){const{headingDeg:s,pitchDeg:e,rollDeg:i}=t.registration,a=new D;return a.rotation.set(e*d,-s*d,-(i??0)*d,"YXZ"),a.quaternion}opacityOf(t){const s=this.references.find(a=>a.id===t),e=this.views.get(t),i=s?h.presenceAt(s,this.observerAt):1;return(e?.opacity??s?.opacity??0)*i}applyOpacity(t,s){const e=this.opacityOf(s);t.material.opacity=e,t.visible=this.shown&&e>0}static signatureOf(t,s){const{headingDeg:e,pitchDeg:i,rollDeg:a,fovDeg:o}=t.registration;return[t.kind,t.src,s.width,s.height,e,i,a??0,o].join("|")}dispose(t){this.scene.remove(t),t.geometry.dispose(),t.material.dispose()}disposeAll(){for(const t of this.meshes.values())this.dispose(t);this.meshes.clear(),this.signatures.clear();for(const t of this.images.values())t.texture.dispose();this.images.clear()}}export{g as REFERENCE_LAYER,h as ReferenceSystem};
@@ -1 +1 @@
1
- import{a0 as a,a1 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","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",reentryTooltip:{name:"Reentrada atmosférica",piece:"{name} — mag {mag}, a {height} km de altitud y {distance} km",fragment:"{name}, un fragmento — mag {mag}, a {height} km de altitud y {distance} km"},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."},plumeTooltip:{name:"Estela de cohete",detail:"{name} — {part}, a {distance}, a {height} km de altitud",ascent:"escape del ascenso",burn:"escape de un encendido",vent:"propelentes purgados"},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{a2 as a,a3 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","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",reentryTooltip:{name:"Reentrada atmosférica",piece:"{name} — mag {mag}, a {height} km de altitud y {distance} km",fragment:"{name}, un fragmento — mag {mag}, a {height} km de altitud y {distance} km"},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."},plumeTooltip:{name:"Estela de cohete",detail:"{name} — {part}, a {distance}, a {height} km de altitud",ascent:"escape del ascenso",burn:"escape de un encendido",vent:"propelentes purgados"},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{a0 as a,a1 as r}from"./rr0-scene.mjs";const l={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","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",reentryTooltip:{name:"Rentrée atmosphérique",piece:"{name} — mag {mag}, à {height} km d'altitude et {distance} km",fragment:"{name}, un fragment — mag {mag}, à {height} km d'altitude et {distance} km"},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."},plumeTooltip:{name:"Panache de fusée",detail:"{name} — {part}, à {distance}, à {height} km d'altitude",ascent:"échappement de la montée",burn:"échappement d'un allumage",vent:"ergols vidangés"},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{l as sceneNames_fr};
1
+ import{a2 as a,a3 as r}from"./rr0-scene.mjs";const l={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","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",reentryTooltip:{name:"Rentrée atmosphérique",piece:"{name} — mag {mag}, à {height} km d'altitude et {distance} km",fragment:"{name}, un fragment — mag {mag}, à {height} km d'altitude et {distance} km"},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."},plumeTooltip:{name:"Panache de fusée",detail:"{name} — {part}, à {distance}, à {height} km d'altitude",ascent:"échappement de la montée",burn:"échappement d'un allumage",vent:"ergols vidangés"},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{l as sceneNames_fr};