@rr0/ufoathome 0.177.1 → 0.178.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (264) hide show
  1. package/dist-embed-interview/rr0-interview.mjs +3 -3
  2. package/dist-embed-scene/{AdsbLolArchiveProvider-BHGe8FVN.js → AdsbLolArchiveProvider-B0Yi081_.js} +1 -1
  3. package/dist-embed-scene/{BeamEditor-zq64GorX.js → BeamEditor-DFGRzRny.js} +1 -1
  4. package/dist-embed-scene/{BeamSystem-BXee1GYk.js → BeamSystem-ebEMoYD3.js} +1 -1
  5. package/dist-embed-scene/{ContrailSystem-BSbI2jUe.js → ContrailSystem-Bn--uCNU.js} +1 -1
  6. package/dist-embed-scene/ControlPasses-BMma2JRm.js +29 -0
  7. package/dist-embed-scene/FilmChrome-DYiyzoB_.js +1 -0
  8. package/dist-embed-scene/{Flightradar24Provider-Dx2Fb8yO.js → Flightradar24Provider-CpwhYfIE.js} +1 -1
  9. package/dist-embed-scene/GLTFLoader-BxToReDu.js +1 -0
  10. package/dist-embed-scene/GenerativeKit-DR6C3LMC.js +4 -0
  11. package/dist-embed-scene/GenerativeKitMessages-Cu7wXgYa.js +1 -0
  12. package/dist-embed-scene/GenerativeKitMessages_en-Cl3kA96x.js +33 -0
  13. package/dist-embed-scene/GenerativeKitMessages_es-CEU93Cl3.js +33 -0
  14. package/dist-embed-scene/GenerativeKitMessages_fr-DmW0OAmF.js +33 -0
  15. package/dist-embed-scene/GenerativeKitMessages_it-Ba87kumS.js +33 -0
  16. package/dist-embed-scene/{HeadlightSystem-_BIIKhQ2.js → HeadlightSystem-l2XbBvXf.js} +1 -1
  17. package/dist-embed-scene/LanternEditor-H8VYYbRn.js +9 -0
  18. package/dist-embed-scene/{LaserBeam-DmH2JeMa.js → LaserBeam-B48FKTrt.js} +1 -1
  19. package/dist-embed-scene/LaunchEditor-CIYcS0Y-.js +22 -0
  20. package/dist-embed-scene/{LaunchPlume-BRnjFVcY.js → LaunchPlume-eEIp7_hM.js} +1 -1
  21. package/dist-embed-scene/{LaunchSimulation-DL7QBfEl.js → LaunchSimulation-DNNEzmzs.js} +1 -1
  22. package/dist-embed-scene/{ModuleSession-BvQABNEZ.js → ModuleSession-DLoAutYP.js} +2 -2
  23. package/dist-embed-scene/ModuleThree-R2LhnY95.js +1 -0
  24. package/dist-embed-scene/{ParameterForm-BMIW4Gkh.js → ParameterForm-ez-n_0Dw.js} +9 -9
  25. package/dist-embed-scene/{RailwaySystem-DZQr_rS_.js → RailwaySystem-C3Y0a9aT.js} +1 -1
  26. package/dist-embed-scene/{ReentryEditor-DJO_M-8-.js → ReentryEditor-CwY4oANp.js} +1 -1
  27. package/dist-embed-scene/{ReentrySimulation-pWRgNLjt.js → ReentrySimulation-BDgEPekW.js} +1 -1
  28. package/dist-embed-scene/ReferenceSystem-D9IdSvFM.js +1 -0
  29. package/dist-embed-scene/{SceneNames_en-CqzjDgS4.js → SceneNames_en-BCTAMSLj.js} +1 -1
  30. package/dist-embed-scene/{SceneNames_es-DMfxIS0T.js → SceneNames_es-BOWBdXXS.js} +1 -1
  31. package/dist-embed-scene/{SceneNames_fr-DydzEE4a.js → SceneNames_fr-De6iQ9ff.js} +1 -1
  32. package/dist-embed-scene/{SceneNames_it-DJAACEvb.js → SceneNames_it-DfBWbCPR.js} +1 -1
  33. package/dist-embed-scene/{TimelineTracks-B-bXAaF7.js → TimelineTracks-BQXJMJaJ.js} +1 -1
  34. package/dist-embed-scene/{TraceSystem-gVZk_ffU.js → TraceSystem-BD6YpW6g.js} +2 -2
  35. package/dist-embed-scene/UfoMessages_en-CXQNZd8v.js +1 -0
  36. package/dist-embed-scene/UfoMessages_es-CO-v8Jl6.js +1 -0
  37. package/dist-embed-scene/UfoMessages_fr-CGkQBn5r.js +1 -0
  38. package/dist-embed-scene/UfoMessages_it-BScqxIaH.js +1 -0
  39. package/dist-embed-scene/VideoButton-Cy_r767Z.js +1 -0
  40. package/dist-embed-scene/VideoExport-B8ZhHNnd.js +169 -0
  41. package/dist-embed-scene/{WaterSystem-DI_NBDfH.js → WaterSystem-DbyWlKho.js} +1 -1
  42. package/dist-embed-scene/browser-CltifEM0.js +1 -0
  43. package/dist-embed-scene/logo-h2-w4Mwu.png +0 -0
  44. package/dist-embed-scene/rr0-scene.mjs +426 -296
  45. package/dist-embed-scene/{sightingSchema-BfOYR_OD.js → sightingSchema-pBDQNwMz.js} +1 -1
  46. package/dist-embed-scene/trafficRuntime-CJIPy2oO.js +2 -0
  47. package/dist-embed-sighting/{AdsbLolArchiveProvider-DK4qEYPv.js → AdsbLolArchiveProvider-BqLvFUVC.js} +1 -1
  48. package/dist-embed-sighting/{BallesterGuaspAssessor-FGskpWWG.js → BallesterGuaspAssessor-CLQvJKlm.js} +1 -1
  49. package/dist-embed-sighting/{BeamEditor-BglkfKa6.js → BeamEditor-CcOf6lNz.js} +1 -1
  50. package/dist-embed-sighting/{BeamSystem-DDtPjozC.js → BeamSystem-B5d0Ymn5.js} +1 -1
  51. package/dist-embed-sighting/CaseExportMessages_en-jHlu58Y7.js +1 -0
  52. package/dist-embed-sighting/CaseExportMessages_es-dCQQFgjq.js +1 -0
  53. package/dist-embed-sighting/CaseExportMessages_fr-sDfEgjWg.js +1 -0
  54. package/dist-embed-sighting/CaseExportMessages_it-BJaglZtP.js +1 -0
  55. package/dist-embed-sighting/CaseMessages_en-CBS5QChl.js +1 -0
  56. package/dist-embed-sighting/CaseMessages_es-DAMl4aTC.js +1 -0
  57. package/dist-embed-sighting/CaseMessages_fr-C3wQxAk_.js +1 -0
  58. package/dist-embed-sighting/CaseMessages_it-CyrREg6v.js +1 -0
  59. package/dist-embed-sighting/CaseReportExport-Uf7Bs2Qz.js +65 -0
  60. package/dist-embed-sighting/CaseReportTexts_en-DlN7p1pC.js +1 -0
  61. package/dist-embed-sighting/CaseReportTexts_es-CncAEaey.js +1 -0
  62. package/dist-embed-sighting/CaseReportTexts_fr-B5nP6RlP.js +1 -0
  63. package/dist-embed-sighting/CaseReportTexts_it-Dc-oPmXB.js +1 -0
  64. package/dist-embed-sighting/{ContrailSystem-DXV0DnrQ.js → ContrailSystem-CqpZgLkb.js} +1 -1
  65. package/dist-embed-sighting/ControlPasses-BxgSO3B9.js +29 -0
  66. package/dist-embed-sighting/FilmChrome-DYiyzoB_.js +1 -0
  67. package/dist-embed-sighting/{Flightradar24Provider-Ch4GdVJG.js → Flightradar24Provider-DQtEJ3tX.js} +1 -1
  68. package/dist-embed-sighting/GLTFLoader-VIIHsteW.js +1 -0
  69. package/dist-embed-sighting/GenerativeKit-DR6C3LMC.js +4 -0
  70. package/dist-embed-sighting/GenerativeKitMessages-BudEc93g.js +1 -0
  71. package/dist-embed-sighting/GenerativeKitMessages_en-Cl3kA96x.js +33 -0
  72. package/dist-embed-sighting/GenerativeKitMessages_es-CEU93Cl3.js +33 -0
  73. package/dist-embed-sighting/GenerativeKitMessages_fr-DmW0OAmF.js +33 -0
  74. package/dist-embed-sighting/GenerativeKitMessages_it-Ba87kumS.js +33 -0
  75. package/dist-embed-sighting/HeadlightSystem-B4RR270O.js +34 -0
  76. package/dist-embed-sighting/{HynekAssessor-Cb8mZ9Ib.js → HynekAssessor-CJ9APziM.js} +1 -1
  77. package/dist-embed-sighting/LanternEditor-D1BA5pRP.js +9 -0
  78. package/dist-embed-sighting/{LaserBeam-DkKFSSp_.js → LaserBeam-BjjC_CzP.js} +1 -1
  79. package/dist-embed-sighting/LaunchEditor-TTSgWqbE.js +22 -0
  80. package/dist-embed-sighting/LaunchPlume-B2Fjd2_C.js +1 -0
  81. package/dist-embed-sighting/{LaunchSimulation-DUvH6_BB.js → LaunchSimulation-BcmPicEe.js} +1 -1
  82. package/dist-embed-sighting/{ModuleSession-GzfQ8_LE.js → ModuleSession-CY9_UusZ.js} +2 -2
  83. package/dist-embed-sighting/ModuleThree-BhryLUjX.js +1 -0
  84. package/dist-embed-sighting/{NearestApproach-BeKwz4vK.js → NearestApproach-iBLl7o1g.js} +1 -1
  85. package/dist-embed-sighting/ParameterForm-BaUeWd7v.js +91 -0
  86. package/dist-embed-sighting/{PoherAssessor-JLqDISRf.js → PoherAssessor-DDRUgnRW.js} +1 -1
  87. package/dist-embed-sighting/RailwaySystem-C1nfRJfj.js +41 -0
  88. package/dist-embed-sighting/ReadingSensitivityMessages_en-CF6XauSj.js +1 -0
  89. package/dist-embed-sighting/ReadingSensitivityMessages_es-Ca-13TTT.js +1 -0
  90. package/dist-embed-sighting/ReadingSensitivityMessages_fr-Djdd6Hdq.js +1 -0
  91. package/dist-embed-sighting/ReadingSensitivityMessages_it-CPUXxMqD.js +1 -0
  92. package/dist-embed-sighting/{ReentryEditor-BHgPXlx3.js → ReentryEditor-CGN3ewTE.js} +1 -1
  93. package/dist-embed-sighting/ReentrySimulation-C2kIulZ6.js +1 -0
  94. package/dist-embed-sighting/{ReferenceSystem-B5diz1Lt.js → ReferenceSystem-BRTCOQHk.js} +1 -1
  95. package/dist-embed-sighting/{RoadMarkings-Dv3xdtFG.js → RoadMarkings-CNLt-BEg.js} +1 -1
  96. package/dist-embed-sighting/{SceneNames_en-BbQ55UYu.js → SceneNames_en-ChY7v63o.js} +1 -1
  97. package/dist-embed-sighting/{SceneNames_es-DsJpGSDK.js → SceneNames_es-DH4YgJV5.js} +1 -1
  98. package/dist-embed-sighting/{SceneNames_fr-CKr5m8QL.js → SceneNames_fr-Ca52lykk.js} +1 -1
  99. package/dist-embed-sighting/{SceneNames_it-qSw1j95v.js → SceneNames_it-BQe9GLaj.js} +1 -1
  100. package/dist-embed-sighting/{SightingMessages_en-DuokT218.js → SightingMessages_en-Xm6PILcs.js} +1 -1
  101. package/dist-embed-sighting/{SightingMessages_es-JO8WQ1_V.js → SightingMessages_es-DMp0MUjJ.js} +1 -1
  102. package/dist-embed-sighting/{SightingMessages_fr-3C2RZVNA.js → SightingMessages_fr-NvQKGPaf.js} +1 -1
  103. package/dist-embed-sighting/{SightingMessages_it-BEMBUACg.js → SightingMessages_it-CKIf49Zt.js} +1 -1
  104. package/dist-embed-sighting/{TimelineTracks-XzShW15O.js → TimelineTracks-Ddv5sZHp.js} +1 -1
  105. package/{dist-embed-sighting-editor/TraceSystem-CDHG18il.js → dist-embed-sighting/TraceSystem-BkUPo1Xf.js} +2 -2
  106. package/dist-embed-sighting/UfoMessages_en-cLvtpfIC.js +1 -0
  107. package/dist-embed-sighting/UfoMessages_es-CO-v8Jl6.js +1 -0
  108. package/dist-embed-sighting/UfoMessages_fr-CGkQBn5r.js +1 -0
  109. package/dist-embed-sighting/UfoMessages_it-BScqxIaH.js +1 -0
  110. package/dist-embed-sighting/VideoButton-C62NkJrH.js +1 -0
  111. package/dist-embed-sighting/VideoExport-B8ZhHNnd.js +169 -0
  112. package/dist-embed-sighting/{WaterSystem-CcLIPQfy.js → WaterSystem-DrSAhM5g.js} +1 -1
  113. package/dist-embed-sighting/browser-CltifEM0.js +1 -0
  114. package/dist-embed-sighting/logo-h2-w4Mwu.png +0 -0
  115. package/dist-embed-sighting/rr0-sighting.mjs +531 -337
  116. package/dist-embed-sighting/{sightingSchema-BfOYR_OD.js → sightingSchema-pBDQNwMz.js} +1 -1
  117. package/dist-embed-sighting/trafficRuntime-CFgDqQz4.js +2 -0
  118. package/dist-embed-sighting-editor/{AdsbLolArchiveProvider-CXB-CDQ2.js → AdsbLolArchiveProvider-fZkxLAHp.js} +1 -1
  119. package/dist-embed-sighting-editor/{BallesterGuaspAssessor-Bb8Kl2FU.js → BallesterGuaspAssessor-DASadJjI.js} +1 -1
  120. package/dist-embed-sighting-editor/{BeamEditor-DJtZYFp0.js → BeamEditor-B2diaX_e.js} +1 -1
  121. package/dist-embed-sighting-editor/{BeamSystem-C6Wk_vNQ.js → BeamSystem-BfNJfayv.js} +1 -1
  122. package/dist-embed-sighting-editor/{BodyEditor-Cj7TgjV-.js → BodyEditor-CCBXFuuL.js} +1 -1
  123. package/dist-embed-sighting-editor/BodyEditorMessages_en-CckxSS1L.js +1 -0
  124. package/dist-embed-sighting-editor/BodyEditorMessages_es-B8GlFFBo.js +1 -0
  125. package/dist-embed-sighting-editor/BodyEditorMessages_fr-638ypdqf.js +1 -0
  126. package/dist-embed-sighting-editor/BodyEditorMessages_it-SKpMkHFI.js +1 -0
  127. package/dist-embed-sighting-editor/CaseEditorMessages_en-DrJY0M8h.js +1 -0
  128. package/dist-embed-sighting-editor/CaseEditorMessages_es-j8EeOBq6.js +1 -0
  129. package/dist-embed-sighting-editor/CaseEditorMessages_fr-BkwEF9mu.js +1 -0
  130. package/dist-embed-sighting-editor/CaseEditorMessages_it-d3Z0PBEw.js +1 -0
  131. package/dist-embed-sighting-editor/CaseExportMessages_en-jHlu58Y7.js +1 -0
  132. package/dist-embed-sighting-editor/CaseExportMessages_es-dCQQFgjq.js +1 -0
  133. package/dist-embed-sighting-editor/CaseExportMessages_fr-sDfEgjWg.js +1 -0
  134. package/dist-embed-sighting-editor/CaseExportMessages_it-BJaglZtP.js +1 -0
  135. package/dist-embed-sighting-editor/CaseReportExport-iCzv1W9B.js +65 -0
  136. package/dist-embed-sighting-editor/CaseReportTexts_en-DlN7p1pC.js +1 -0
  137. package/dist-embed-sighting-editor/CaseReportTexts_es-CncAEaey.js +1 -0
  138. package/dist-embed-sighting-editor/CaseReportTexts_fr-B5nP6RlP.js +1 -0
  139. package/dist-embed-sighting-editor/CaseReportTexts_it-Dc-oPmXB.js +1 -0
  140. package/dist-embed-sighting-editor/{ContrailSystem-e-OLIzTk.js → ContrailSystem-BWvO9taK.js} +1 -1
  141. package/dist-embed-sighting-editor/ControlPasses-BQ_DUxa_.js +29 -0
  142. package/dist-embed-sighting-editor/{CoverageAssessor-DUDmS-aG.js → CoverageAssessor-CSktyUlP.js} +1 -1
  143. package/dist-embed-sighting-editor/FilmChrome-DYiyzoB_.js +1 -0
  144. package/dist-embed-sighting-editor/{Flightradar24Provider-DtcvpdT3.js → Flightradar24Provider-OvRZWZWj.js} +1 -1
  145. package/dist-embed-sighting-editor/{GLTFLoader-AHdd-c6G.js → GLTFLoader-CM7Uk25s.js} +1 -1
  146. package/dist-embed-sighting-editor/GenerativeKit-DR6C3LMC.js +4 -0
  147. package/dist-embed-sighting-editor/GenerativeKitMessages-BNXaLr1m.js +1 -0
  148. package/dist-embed-sighting-editor/GenerativeKitMessages_en-Cl3kA96x.js +33 -0
  149. package/dist-embed-sighting-editor/GenerativeKitMessages_es-CEU93Cl3.js +33 -0
  150. package/dist-embed-sighting-editor/GenerativeKitMessages_fr-DmW0OAmF.js +33 -0
  151. package/dist-embed-sighting-editor/GenerativeKitMessages_it-Ba87kumS.js +33 -0
  152. package/dist-embed-sighting-editor/{GeoExportTexts-DAllttgw.js → GeoExportTexts-DBGGdRnP.js} +1 -1
  153. package/dist-embed-sighting-editor/{GeoJsonExport-3snOe-2J.js → GeoJsonExport-BZ-0v8fM.js} +1 -1
  154. package/dist-embed-sighting-editor/GeographicFigures-DqhWddS9.js +1 -0
  155. package/dist-embed-sighting-editor/{HeadlightSystem-CLhqQjbe.js → HeadlightSystem-C-8Gl3vu.js} +1 -1
  156. package/dist-embed-sighting-editor/{HynekAssessor-DvVp-CLS.js → HynekAssessor-CH2E88xV.js} +1 -1
  157. package/dist-embed-sighting-editor/{InterviewEditorElement-44XFadV4.js → InterviewEditorElement-Bz3hyZ-m.js} +2 -2
  158. package/dist-embed-sighting-editor/{KmlExport-B0SKgn4U.js → KmlExport-Bh4eTycx.js} +1 -1
  159. package/dist-embed-sighting-editor/{KmlImport-B9mAzJwr.js → KmlImport-CKxaATTA.js} +1 -1
  160. package/dist-embed-sighting-editor/LanternEditor-tTk1vUZm.js +9 -0
  161. package/dist-embed-sighting-editor/{LaserBeam-QJPhnVO_.js → LaserBeam-CtogDP38.js} +1 -1
  162. package/dist-embed-sighting-editor/LaunchEditor-CteAalch.js +22 -0
  163. package/dist-embed-sighting-editor/{LaunchPlume-C_r62XTj.js → LaunchPlume-BtRrJTP9.js} +1 -1
  164. package/dist-embed-sighting-editor/{LaunchSimulation-BSDTfZTv.js → LaunchSimulation-xKwguVJt.js} +1 -1
  165. package/dist-embed-sighting-editor/{ModelSource-B85niY1n.js → ModelSource-CnKzaNDn.js} +1 -1
  166. package/dist-embed-sighting-editor/{ModelThumbnails-uYh2sUIb.js → ModelThumbnails-UE_Er5EW.js} +1 -1
  167. package/dist-embed-sighting-editor/{ModelViewer-DLZhhuq5.js → ModelViewer-DoCshJc6.js} +1 -1
  168. package/dist-embed-sighting-editor/{ModuleConformance-CBMdTSVo.js → ModuleConformance-BKvZnuw9.js} +2 -2
  169. package/dist-embed-sighting-editor/{ModuleSession-rFLStWcj.js → ModuleSession-CJstaNEN.js} +3 -3
  170. package/dist-embed-sighting-editor/ModuleThree-1hxqvWFa.js +1 -0
  171. package/dist-embed-sighting-editor/{ModulesPanelElement-CGp6DrpQ.js → ModulesPanelElement-DdGqqdn4.js} +3 -3
  172. package/dist-embed-sighting-editor/{NearestApproach-Ctw1-XBO.js → NearestApproach-BH3Yw8Qz.js} +1 -1
  173. package/dist-embed-sighting-editor/{PictureRegistration-ZyvGfReK.js → PictureRegistration-B9C6iY17.js} +1 -1
  174. package/dist-embed-sighting-editor/{PoherAssessor-CLKwvgUL.js → PoherAssessor-DWcCWUfa.js} +1 -1
  175. package/dist-embed-sighting-editor/RailwaySystem-D3VBmx1X.js +41 -0
  176. package/dist-embed-sighting-editor/ReadingSensitivityMessages_en-CF6XauSj.js +1 -0
  177. package/dist-embed-sighting-editor/ReadingSensitivityMessages_es-Ca-13TTT.js +1 -0
  178. package/dist-embed-sighting-editor/ReadingSensitivityMessages_fr-Djdd6Hdq.js +1 -0
  179. package/dist-embed-sighting-editor/ReadingSensitivityMessages_it-CPUXxMqD.js +1 -0
  180. package/dist-embed-sighting-editor/{ReentryEditor-DXe8wen6.js → ReentryEditor-BDyG-48K.js} +2 -2
  181. package/dist-embed-sighting-editor/{ReentrySimulation-BxVE5Dsn.js → ReentrySimulation-BQj0wWXW.js} +1 -1
  182. package/dist-embed-sighting-editor/ReferenceSystem-C9NRL7UY.js +1 -0
  183. package/dist-embed-sighting-editor/RoadMarkings-ByQL2MTo.js +1 -0
  184. package/dist-embed-sighting-editor/SceneNames_en-BdRB6cjg.js +1 -0
  185. package/dist-embed-sighting-editor/SceneNames_es-Dk0UmXHp.js +1 -0
  186. package/dist-embed-sighting-editor/SceneNames_fr-_z2iZ8Bm.js +1 -0
  187. package/dist-embed-sighting-editor/SceneNames_it-CE7fanb3.js +1 -0
  188. package/dist-embed-sighting-editor/{SightingEditorMessages_en-G8-sD56V.js → SightingEditorMessages_en-jinQLW0J.js} +1 -1
  189. package/dist-embed-sighting-editor/{SightingEditorMessages_es-DEmsmIRU.js → SightingEditorMessages_es-CsrGiJYn.js} +1 -1
  190. package/dist-embed-sighting-editor/{SightingEditorMessages_fr-D2HXab_N.js → SightingEditorMessages_fr-cQ6KnPU1.js} +1 -1
  191. package/dist-embed-sighting-editor/{SightingEditorMessages_it-LpFdlGY5.js → SightingEditorMessages_it-D3Rqso5s.js} +1 -1
  192. package/dist-embed-sighting-editor/{SightingFileEditor-CnKF2ndt.js → SightingFileEditor-BCjntT4l.js} +1 -1
  193. package/dist-embed-sighting-editor/{TraceImport-CL8lefw6.js → TraceImport-uGVIjCrc.js} +2 -2
  194. package/{dist-embed-sighting/TraceSystem-XybhI4uJ.js → dist-embed-sighting-editor/TraceSystem-g262KZ3G.js} +2 -2
  195. package/dist-embed-sighting-editor/UfoMessages_en-JeMK-39o.js +1 -0
  196. package/dist-embed-sighting-editor/UfoMessages_es-CO-v8Jl6.js +1 -0
  197. package/dist-embed-sighting-editor/UfoMessages_fr-CGkQBn5r.js +1 -0
  198. package/dist-embed-sighting-editor/UfoMessages_it-BScqxIaH.js +1 -0
  199. package/dist-embed-sighting-editor/VideoButton-CqCZ65oK.js +1 -0
  200. package/dist-embed-sighting-editor/VideoExport-B8ZhHNnd.js +169 -0
  201. package/dist-embed-sighting-editor/WaterSystem-CIbQPMqE.js +1 -0
  202. package/dist-embed-sighting-editor/browser-CltifEM0.js +1 -0
  203. package/dist-embed-sighting-editor/logo-h2-w4Mwu.png +0 -0
  204. package/dist-embed-sighting-editor/rr0-sighting-editor.mjs +610 -398
  205. package/dist-embed-sighting-editor/{sightingSchema-9xw8srxN.js → sightingSchema-RamhmoRU.js} +1 -1
  206. package/dist-embed-sighting-editor/{surroundingsSources-DXpzMDPy.js → surroundingsSources-BExFsNzP.js} +1 -1
  207. package/dist-embed-sighting-editor/trafficRuntime-CPRQW0Ho.js +2 -0
  208. package/package.json +2 -1
  209. package/dist-embed-scene/GLTFLoader-DDba3PaV.js +0 -1
  210. package/dist-embed-scene/LanternEditor-2q5seAWj.js +0 -9
  211. package/dist-embed-scene/LaunchEditor-Cupksu8A.js +0 -22
  212. package/dist-embed-scene/ModuleThree-12Uq6OyD.js +0 -1
  213. package/dist-embed-scene/ReferenceSystem-D9agTeWl.js +0 -1
  214. package/dist-embed-scene/UfoMessages_en-CRIdIMYy.js +0 -1
  215. package/dist-embed-scene/UfoMessages_es-BoulVpJw.js +0 -1
  216. package/dist-embed-scene/UfoMessages_fr-8f6FJbk6.js +0 -1
  217. package/dist-embed-scene/UfoMessages_it-cngzFg3N.js +0 -1
  218. package/dist-embed-scene/browser-_Ncw3Jhn.js +0 -1
  219. package/dist-embed-scene/trafficRuntime-BDtw1Kqi.js +0 -2
  220. package/dist-embed-sighting/CaseMessages_en-DEyvxYxv.js +0 -1
  221. package/dist-embed-sighting/CaseMessages_es-DDsQ93tK.js +0 -1
  222. package/dist-embed-sighting/CaseMessages_fr-DoHbDEkG.js +0 -1
  223. package/dist-embed-sighting/CaseMessages_it-CF8sKknV.js +0 -1
  224. package/dist-embed-sighting/GLTFLoader-BDyucwJ-.js +0 -1
  225. package/dist-embed-sighting/HeadlightSystem-DGUfgm2c.js +0 -34
  226. package/dist-embed-sighting/LanternEditor-CaZ1JhZS.js +0 -9
  227. package/dist-embed-sighting/LaunchEditor-QRG2uHH8.js +0 -22
  228. package/dist-embed-sighting/LaunchPlume-DBINBQgQ.js +0 -1
  229. package/dist-embed-sighting/ModuleThree-tnKi-oul.js +0 -1
  230. package/dist-embed-sighting/ParameterForm-DW6cQmYI.js +0 -91
  231. package/dist-embed-sighting/RailwaySystem-BfTJvmf3.js +0 -41
  232. package/dist-embed-sighting/ReentrySimulation-C3BR2hs3.js +0 -1
  233. package/dist-embed-sighting/UfoMessages_en-CoSqGYwb.js +0 -1
  234. package/dist-embed-sighting/UfoMessages_es-BoulVpJw.js +0 -1
  235. package/dist-embed-sighting/UfoMessages_fr-8f6FJbk6.js +0 -1
  236. package/dist-embed-sighting/UfoMessages_it-cngzFg3N.js +0 -1
  237. package/dist-embed-sighting/browser-_Ncw3Jhn.js +0 -1
  238. package/dist-embed-sighting/trafficRuntime-BAuwwA-Z.js +0 -2
  239. package/dist-embed-sighting-editor/BodyEditorMessages_en-zfy3BJb5.js +0 -1
  240. package/dist-embed-sighting-editor/BodyEditorMessages_es-w95anMnI.js +0 -1
  241. package/dist-embed-sighting-editor/BodyEditorMessages_fr-ixsDgTbt.js +0 -1
  242. package/dist-embed-sighting-editor/BodyEditorMessages_it-B3oQzqHE.js +0 -1
  243. package/dist-embed-sighting-editor/CaseEditorMessages_en-D47ntA6R.js +0 -1
  244. package/dist-embed-sighting-editor/CaseEditorMessages_es-CyIdBeD_.js +0 -1
  245. package/dist-embed-sighting-editor/CaseEditorMessages_fr-DXaZI1jZ.js +0 -1
  246. package/dist-embed-sighting-editor/CaseEditorMessages_it-Cp1-Jm34.js +0 -1
  247. package/dist-embed-sighting-editor/GeographicFigures-CLBS2HJ-.js +0 -1
  248. package/dist-embed-sighting-editor/LanternEditor-ngKN2Zt3.js +0 -9
  249. package/dist-embed-sighting-editor/LaunchEditor-B8KlP5eo.js +0 -22
  250. package/dist-embed-sighting-editor/ModuleThree-DrKN6B-3.js +0 -1
  251. package/dist-embed-sighting-editor/RailwaySystem-C67LdkZv.js +0 -41
  252. package/dist-embed-sighting-editor/ReferenceSystem-B201fXMC.js +0 -1
  253. package/dist-embed-sighting-editor/RoadMarkings-DJ2HL-6g.js +0 -1
  254. package/dist-embed-sighting-editor/SceneNames_en-DggkchR4.js +0 -1
  255. package/dist-embed-sighting-editor/SceneNames_es-BtXXqtTk.js +0 -1
  256. package/dist-embed-sighting-editor/SceneNames_fr-I6FOP0oQ.js +0 -1
  257. package/dist-embed-sighting-editor/SceneNames_it-DrW4eXBX.js +0 -1
  258. package/dist-embed-sighting-editor/UfoMessages_en-BxhQNf5z.js +0 -1
  259. package/dist-embed-sighting-editor/UfoMessages_es-BoulVpJw.js +0 -1
  260. package/dist-embed-sighting-editor/UfoMessages_fr-8f6FJbk6.js +0 -1
  261. package/dist-embed-sighting-editor/UfoMessages_it-cngzFg3N.js +0 -1
  262. package/dist-embed-sighting-editor/WaterSystem-B2xlCmn2.js +0 -1
  263. package/dist-embed-sighting-editor/browser-_Ncw3Jhn.js +0 -1
  264. package/dist-embed-sighting-editor/trafficRuntime-_7Uw8kC_.js +0 -2
@@ -1,11 +1,11 @@
1
- class z extends Error{}class ee{constructor(t){this.name=t}validate(t){return!0}}class Mn extends ee{min;max;constructor(t,e,n){super(t),this.min=e,this.max=n}validate(t){if(typeof t!="number")throw new z(`${this.name} value must be a number, but was ${t}`);if(t<this.min||t>this.max)throw new z(`${this.name} value must be >= ${this.min} and <= ${this.max}, but was ${t}`);return super.validate(t)}}class N{name;min;max;duration;subUnit;validator;constructor(t,e,n,r,o=new Mn(t,e,n)){this.name=t,this.min=e,this.max=n,this.subUnit=r,this.duration=r?(r.max-r.min+1)*r.duration:1,this.validator=o}validate(t){return this.validator.validate(t)}[Symbol.iterator](){let t=this.min;return{next:()=>{const e={done:t>this.max,value:t};return t++,e}}}}class Se{millisecond;second;minute;hour;day;month;year}class jn extends Se{}class vn extends jn{millisecond=new N("millisecond",0,999,void 0);second=new N("second",0,59,this.millisecond);minute=new N("minute",0,59,this.second);hour=new N("hour",0,23,this.minute);day=new N("day",1,31,this.hour);month=new N("month",1,12,this.day);year=new N("year",0,9999,this.month)}const l=new vn;class An extends Mn{constructor(t=1,e=12){super("month",t,e)}}class ft extends N{static Month28=new ft(28);static Month29=new ft(29);static ThirtyDays=new ft(30);static ThirtyOneDays=new ft(31);constructor(t,e=new An(1,t)){super("month",1,t,l.day,e)}static create(t,e){switch(t){case 1:case 3:case 5:case 7:case 8:case 10:case 12:return this.ThirtyOneDays;case 2:return e%4===0?this.Month29:this.Month28;case 4:case 6:case 9:case 11:return this.ThirtyDays;default:throw new z("Unsupported month",t,e)}}}class B{static instance=new B;render(t){return t.value.toString()}}class I{unit;#t;constructor(t,e){this.unit=e,this.value=typeof t=="number"?t:t.value}get value(){return this.#t}set value(t){this.unit.validate(t),this.#t=t}get duration(){return this.value*this.unit.duration}#e(t){if(this.constructor.name!==t.constructor.name)throw new ee(`${this.unit.name} "${this.toString()}" cannot be compared with ${t.unit?.name} "${t.toString()}"`)}compare(t){return this.#e(t),this.value-t.value}isEqual(t){return this.compare(t)===0}isBefore(t){return this.compare(t)<0}isAfter(t){return this.compare(t)>0}previous(t=this.unit){const e=this.value-1;return new this.constructor(e,t)}next(t=this.unit){const e=this.value+1;return new this.constructor(e,t)}toString(t=B.instance){return t.render(this)}toSpec(){return{value:this.value}}toJSON(){return this.toSpec()}}class d{static#t=new Map;static register(t,e){d.#t.set(t,e)}static get(t){const e=d.#t.get(t);if(!e)throw new z(`No default parser registered for ${t.name}: import "@rr0/time/defaults" or pass a parser to fromString()`);return e()}}class yt extends I{constructor(t=new Date().getFullYear(),e=l.year){super(t,e)}static fromString(t,e=d.get(yt)){return new yt(e.parse(t))}}class O extends B{static default=new O("0",2);constructor(t,e){super(),this.char=t,this.size=e}render(t){return super.render(t).padStart(this.size,this.char)}}class bt extends I{constructor(t=new Date().getMonth()+1,e=l.month){super(t,e)}static fromString(t,e=d.get(bt)){return new bt(e.parse(t))}toString(t=O.default){return super.toString(t)}}class Gt extends I{constructor(t=new Date().getDate(),e=l.day){super(t,e)}static fromString(t,e=d.get(Gt)){const n=e.parse(t);return new Gt(n)}toString(t=O.default){return super.toString(t)}}class xt extends I{constructor(t=new Date().getHours(),e=l.hour){super(t,e)}static fromString(t,e=d.get(xt)){return new xt(e.parse(t))}toString(t=O.default){return super.toString(t)}}class Nt extends I{constructor(t=new Date().getMinutes(),e=l.minute){super(t,e)}static fromString(t,e=d.get(Nt)){return new Nt(e.parse(t))}toString(t=O.default){return super.toString(t)}}class Et extends I{constructor(t=new Date().getSeconds(),e=l.second){super(t,e)}static fromString(t,e=d.get(Et)){return new Et(e.parse(t),l.second)}toString(t=O.default){return super.toString(t)}}class ut extends I{static renderer=new O("0",3);constructor(t,e=l.millisecond){super(t,e)}static parseFraction(t){return parseInt(t.padEnd(3,"0").substring(0,3),10)}toString(t=ut.renderer){return super.toString(t)}}class Un{render(t){return t.toString()}}class zn extends Un{render(t){const e=t.value,n=Math.abs(e),r=Math.floor(n/60),o=n%60;if(r===0&&o===0)return"Z";{const a=e<0?"-":"+",u=r.toString().padStart(2,"0"),p=o>0?":"+o.toString().padEnd(2,"0"):"";return a+u+p}}}class at{value;name="timeshift";renderer;constructor(t=0){this.value=t}static fromString(t,e=d.get(at),n=void 0){const r=e.parse(t,n);return new at(r)}toString(t=new zn){return t.render(this)}toSpec(){return{value:this.value}}toJSON(){return this.toSpec()}}class V{static timeshift(t,e){return t+(V.isDaylight(e)?60:0)}static isDaylight(t){const{year:e,month:n,day:r}=t,o=t.hour??12;if(![e,n,r].every(Number.isInteger))throw new RangeError("Daylight saving time depends on the year, month and day");const a=V.rule(e);if(!a)return!1;const u=V.rank(n,r,o);return u>=V.rank(a.start.month,a.start.day,2)&&u<V.rank(a.end.month,a.end.day,2)}static rule(t){if(t<1967)return;const e={month:10,day:V.sunday(t,10,-1)};return t>=2007?{start:{month:3,day:V.sunday(t,3,2)},end:{month:11,day:V.sunday(t,11,1)}}:t>=1987?{start:{month:4,day:V.sunday(t,4,1)},end:e}:t===1975?{start:{month:2,day:23},end:e}:t===1974?{start:{month:1,day:6},end:e}:{start:{month:4,day:V.sunday(t,4,-1)},end:e}}static sunday(t,e,n){const r=new Date(Date.UTC(2e3,e-1,1));r.setUTCFullYear(t);const o=1+(7-r.getUTCDay())%7;if(n>0)return o+7*(n-1);const a=[31,V.isLeap(t)?29:28,31,30,31,30,31,31,30,31,30,31][e-1];let u=o;for(;u+7<=a;)u+=7;return u}static isLeap(t){return t%4===0&&(t%100!==0||t%400===0)}static rank(t,e,n){return(t*100+e)*100+n}}const Cn={name:"PST",timeshift:"-08",title:"Pacific Standard Time (US)"},qn={name:"PDT",timeshift:"-07",title:"Pacific Daylight Time (US)"},Bn={name:"MDT",timeshift:"-06",title:"Mountain Standard Time (US)"},Hn={name:"MST",timeshift:"-07",title:"Mountain Daylight Time (US)"},Yn={name:"PT",timeshift:s=>V.timeshift(-480,s),title:"Pacific Time (US)"},On={name:"MT",timeshift:s=>V.timeshift(-420,s),title:"Mountain Time (US)"},Xn={name:"CT",timeshift:s=>V.timeshift(-360,s),title:"Central Time (US)"},Wn={name:"ET",timeshift:s=>V.timeshift(-300,s),title:"Eastern Time (US)"},Jn={name:"CWT",timeshift:"-05",title:"Central War Time (US)"},Kn={name:"CDT",timeshift:"-05",title:"Central Daylight Time"},Zn={name:"EST",timeshift:"-05",title:"Eastern Standard Time (US)"},Qn={name:"EDT",timeshift:"-04",title:"Eastern Time (US)"},Dn={name:"AST",timeshift:"-04",title:"Atlantic Standard Time (US)"},Pn={name:"ADT",timeshift:"-03",title:"Atlantic Daylight Time (US)"},Ln={name:"UTC",timeshift:"Z",title:"Coordinated Universal Time"},_n={name:"Z",timeshift:"Z",title:"UTC"},tr={name:"GMT",timeshift:"Z",title:"Greenwich Mean Time"},er={name:"BST",timeshift:"+01",title:"British Summer Time"},nr={name:"CEST",timeshift:"+02",title:"Central European Summer Time"},rr={name:"CET",timeshift:"+01",title:"Central European Time"},sr={name:"MSK",timeshift:"+03",title:"Moscow Time (RU)"},or={name:"IST",timeshift:"+05:30",title:"Indian Standard Time"},ir={name:"BJT",timeshift:"+08",title:"Beijing Time"},ar={name:"CST",timeshift:"-06",title:"Central Standard Time"},ur={name:"JST",timeshift:"+09",title:"Japan Standard Time"},cr={name:"AEST",timeshift:"+10",title:"Australian Eastern Standard Time"},mr={name:"NZST",timeshift:"+12",title:"New Zealand Standard Time"},dr={name:"LST",timeshift:"?",title:"Local Sideral Time"},ke=[Pn,cr,Dn,ir,er,ar,Kn,rr,nr,Xn,Jn,Qn,Zn,Wn,tr,or,ur,dr,Bn,sr,Hn,On,mr,qn,Cn,Yn,Ln,_n];class ne{static instance=new ne;renderComponent(t,e){return t[e].toString()}renderSecond(t){return this.renderComponent(t,"second")+(t.millisecond?"."+t.millisecond.toString():"")}render(t){const e=[];t.year&&e.push(this.renderComponent(t,"year")),t.month&&e.push(this.renderComponent(t,"month")),t.day&&e.push(this.renderComponent(t,"day"));const n=[];t.hour&&n.push(this.renderComponent(t,"hour")),t.minute&&n.push(this.renderComponent(t,"minute")),t.second&&n.push(this.renderSecond(t));const r=e.join("-"),o=t.timeshift?t.timeshift.toString():"",a=n.join(":")+o;return r+(a.length>0?"T"+a:"")}}class ct extends z{constructor(t="method is abstract"){super(t)}}class ye{units;constructor(t){this.units=t}newYear(t){throw new ct}newMonth(t){throw new ct}newDay(t){throw new ct}newHour(t){throw new ct}newMinute(t){throw new ct}newSecond(t){throw new ct}}class pr extends Se{millisecond=new N("milliseconds",Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,void 0);second=new N("seconds",Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,this.millisecond);minute=new N("minutes",Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,this.second);hour=new N("hours",Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,this.minutes);day=new N("days",Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,this.hour);month=new N("months",Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,this.day);year=new N("years",Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,this.month)}const Qt=new pr;class re{static instance=new re;render(t){const e=q.toSpec(t);let n="P";const r=e.years;r&&(n+=r.toString()+"Y");const o=e.months;o&&(n+=o.toString(B.instance)+"MM");const a=e.days;a&&(n+=a.toString(B.instance)+"D");const u=e.hours;u&&(n+=u.toString(B.instance)+"H");const p=e.minutes;p&&(n+=p.toString(B.instance)+"M");const c=e.seconds;return c&&(n+=c.toString(B.instance)+"S"),n}}class q extends I{constructor(t={years:new Date().getFullYear(),months:new Date().getMonth(),days:new Date().getDate(),hours:new Date().getHours(),minutes:new Date().getMinutes(),seconds:new Date().getSeconds(),milliseconds:new Date().getMilliseconds()}){super({value:typeof t=="number"?t:+(t.years?t.years*l.year.duration:0)+(t.months?t.months*l.month.duration:0)+(t.days?t.days*l.day.duration:0)+(t.hours?t.hours*l.hour.duration:0)+(t.minutes?t.minutes*l.minute.duration:0)+(t.seconds?t.seconds*l.second.duration:0)},new N("millisecond",0,Number.MAX_SAFE_INTEGER,void 0))}static toSpec(t,e=lr){let n=typeof t=="number"?t:t.value;const r=n>0?1:-1;n=Math.abs(n);const o={},a=n/l.year.duration,u=Math.floor(a);u>0&&(o.years=e.newYear(r*u),n-=u*l.year.duration);const p=n/l.month.duration,c=Math.floor(p);c>0&&(o.months=e.newMonth(r*c),n-=c*l.month.duration);const f=n/l.day.duration,m=Math.floor(f);m>0&&(o.days=e.newDay(r*m),n-=m*l.day.duration);const b=n/l.hour.duration,g=Math.floor(b);g>0&&(o.hours=e.newHour(r*g),n-=g*l.hour.duration);const G=n/l.minute.duration,w=Math.floor(G);w>0&&(o.minutes=e.newMinute(r*w),n-=w*l.minute.duration);const F=n/l.second.duration,M=Math.floor(r*F);return M>0&&(o.seconds=e.newSecond(M)),o}static fromString(t,e=d.get(q)){return new q(e.parse(t))}static between(t,e){const n=e.getTime(),r=t.getTime();return new q(n-r)}toSpec(){return q.toSpec(this)}toString(t=re.instance){return t.render(this)}}class kn extends ye{constructor(t){super(t)}newYear(t){return new yt(t,this.units.year)}newMonth(t){return new bt(t,this.units.month)}newDay(t){return new Gt(t,this.units.day)}newHour(t){return new xt(t,this.units.hour)}newMinute(t){return new Nt(t,this.units.minute)}newSecond(t){return new Et(t,this.units.second)}newMillisecond(t){return new ut(t,this.units.millisecond)}newTimeshift(t){return new at(typeof t=="number"?t:t.value)}}const hr=new kn(l),lr=new kn(Qt);class R{#t;#e;#n;#r;#s;#o;#i;#a;constructor(t={year:new Date().getFullYear(),month:new Date().getMonth()+1,day:new Date().getDate(),hour:new Date().getHours(),minute:new Date().getMinutes(),second:new Date().getSeconds(),timeshift:R.timeshiftOf(new Date)}){this.year=t.year,this.month=t.month,this.day=t.day,this.hour=t.hour,this.minute=t.minute,this.second=t.second,this.millisecond=t.millisecond,this.timeshift=t.timeshift}get year(){return this.#t}set year(t){const e=typeof t=="number";this.#t&&e?this.#t.value=t:this.#t=e?this.factory.newYear(t):!t||t.start||t instanceof I?t:this.factory.newYear(t)}get month(){return this.#e}set month(t){const e=typeof t=="number";this.#e&&e?this.#e.value=t:this.#e=e?this.factory.newMonth(t):!t||t.start||t instanceof I?t:this.factory.newMonth(t)}get day(){return this.#n}set day(t){const e=typeof t=="number";this.#n&&e?this.#n.value=t:this.#n=e?this.factory.newDay(t):!t||t.start||t instanceof I?t:this.factory.newDay(t)}get hour(){return this.#r}set hour(t){const e=typeof t=="number";this.#r&&e?this.#r.value=t:this.#r=e?this.factory.newHour(t):!t||t.start||t instanceof I?t:this.factory.newHour(t)}get minute(){return this.#s}set minute(t){const e=typeof t=="number";this.#s&&e?this.#s.value=t:this.#s=e?this.factory.newMinute(t):!t||t.start||t instanceof I?t:this.factory.newMinute(t)}get second(){return this.#o}set second(t){const e=typeof t=="number";this.#o&&e?this.#o.value=t:this.#o=e?this.factory.newSecond(t):!t||t.start||t instanceof I?t:this.factory.newSecond(t)}get millisecond(){return this.#i}set millisecond(t){const e=typeof t=="number";this.#i&&e?this.#i.value=t:this.#i=e||t&&!(t instanceof I)?this.factory.newMillisecond(t):t}get timeshift(){return this.#a}set timeshift(t){const e=typeof t=="number";this.#a&&e?this.#a.value=t:this.#a=e||t&&!(t instanceof at)?this.factory.newTimeshift(t):t}get factory(){return hr}static fromString(t,e=d.get(R)){const{year:n,month:r,day:o,hour:a,minute:u,second:p,millisecond:c,timeshift:f}=e.parse(t);return new R({year:n,month:r,day:o,hour:a,minute:u,second:p,millisecond:c,timeshift:f})}static timeshiftOf(t){return-t.getTimezoneOffset()||0}static fromDate(t){return new R({year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes(),second:t.getSeconds(),timeshift:R.timeshiftOf(t)})}static newInstance(){const t=new Date().toISOString(),e=t.indexOf("."),n=t.substring(0,e)+t.substring(e+4);return R.fromString(n)}#u(t){if(this.constructor.name!==t.constructor.name)throw new ee(`Date "${this.toString()}" cannot be compared with "${t.toString()}"`)}compare(t){return this.#u(t),this.getTime()-t.getTime()}delta(t){const e=this.compare(t);return new q(e)}getTime(){return(this.year?.duration||0)+(this.month?.duration||0)+(this.day?.duration||0)+(this.hour?.duration||0)+(this.minute?.duration||0)+(this.second?.duration||0)+(this.millisecond?.duration||0)}isEqual(t){return this.compare(t)===0}isBefore(t){return this.compare(t)<0}isAfter(t){return this.compare(t)>0}clone(){return new R(this.toSpec())}previous(){let t=this.clone();try{t.second=this.second.previous()}catch{try{t.minute=this.minute.previous()}catch{try{t.hour=this.hour.previous()}catch{try{t.day=this.day.previous()}catch{try{t.month=this.month.previous()}catch{t.year=this.year.previous()}}}}}return t}next(){let t=this.clone();try{t.second=this.second.next()}catch{try{t.minute=this.minute.next()}catch{try{t.hour=this.hour.next()}catch{try{t.day=this.day.next()}catch{try{t.month=this.month.next()}catch{t.year=this.year.next()}}}}}return t}toString(t=ne.instance){return t.render(this)}toSpec(){const t={},e=this.year?.toSpec();e&&(t.year=e);const n=this.month?.toSpec();n&&(t.month=n);const r=this.day?.toSpec();r&&(t.day=r);const o=this.hour?.toSpec();o&&(t.hour=o);const a=this.minute?.toSpec();a&&(t.minute=a);const u=this.second?.toSpec();u&&(t.second=u);const p=this.millisecond?.toSpec();p&&(t.millisecond=p);const c=this.timeshift?.toSpec();return c&&(t.timeshift=c),t}toJSON(){return this.toSpec()}}class be{static instance=new be;render(t){return(t.start?t.start.toString():"")+"/"+(t.end?t.end.toString():"")}}class kt{constructor(t,e){this.start=t,this.end=e}_start;get start(){return this._start}set start(t){if(typeof t=="string"&&(t=R.fromString(t)),t&&!(t instanceof R)&&!(t instanceof q))throw new z("Interval start is not a level 0 date or duration: "+t);this._start=t}_end;get end(){return this._end}set end(t){if(typeof t=="string"&&(t=R.fromString(t)),t&&!(t instanceof R)&&!(t instanceof q))throw new z("Interval end is not a level 0 date or duration: "+t);this._end=t}static fromString(t,e=d.get(kt)){const{start:n,end:r}=e.parse(t);return new kt(n,r)}toString(t=be.instance){return t.render(this)}[Symbol.iterator](){let t=this.start;return{next:()=>{const e={done:t>this.end,value:t};return t++,e}}}}class Dt extends B{static instance=new Dt(O.default);constructor(t){super(),this.valueRenderer=t}render(t){return(this.valueRenderer?this.valueRenderer.render(t):super.render(t))+this.qualifier(t)}qualifier(t){return t.uncertain?t.approximate?"%":"?":t.approximate?"~":""}}class Y extends I{#t;#e;constructor(t,e){super(t,e),this.#t=t.uncertain||!1,this.#e=t.approximate||!1}get uncertain(){return this.#t}set uncertain(t){return this.#t=t}get approximate(){return this.#e}set approximate(t){return this.#e=t}isCertainAndPrecise(){return!this.approximate&&!this.uncertain}isEqual(t){return this.isCertainAndPrecise()&&super.isEqual(t)}isBefore(t){return this.isCertainAndPrecise()&&super.isBefore(t)}isAfter(t){return this.isCertainAndPrecise()&&super.isAfter(t)}toString(t=Dt.instance){return super.toString(t)}toSpec(){return{...super.toSpec(),uncertain:this.uncertain,approximate:this.approximate}}toJSON(){return this.toSpec()}}class $n extends vn{year=new N("year",-9999,9999,this.month);yearExtended=new N("year",Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,this.month)}const Lt=new $n;class et extends Y{constructor(t,e=Lt.year){super(t,e)}static fromString(t,e=Lt.year,n=d.get(et)){const r=n.parse(t),o=r.value.start;if(t.startsWith("Y")&&(e=Lt.yearExtended),o!==void 0){const a=new et(Object.assign({...r},{value:Math.max(o,e.min)})),u=new et(Object.assign({...r},{value:Math.min(r.value.end,e.max)}));return{start:a,end:u}}else return new et(r,e)}}class Rn extends ee{monthValidator=new An;validate(t){switch(t){case 21:case 22:case 23:case 24:return!0;default:return this.monthValidator.validate(t)}}}class nt extends Y{constructor(t,e=new N(l.month.name,1,24,l.day,new Rn)){super(t,e)}static fromString(t,e=d.get(nt)){const n=e.parse(t),r=n.value.start;if(r!==void 0){let o=l.month;const a=new nt(Object.assign({...n},{value:Math.max(r,o.min)})),u=new nt(Object.assign({...n},{value:Math.min(n.value.end,o.max)}));return{start:a,end:u}}else return new nt(n)}toString(t){return super.toString(t).padStart(2,"0")}}class rt extends Y{constructor(t,e=l.day){super(t,e)}static fromString(t,e=d.get(rt)){const n=e.parse(t),r=n.value.start;if(r!==void 0){let o=l.day;const a=new rt(Object.assign({...n},{value:Math.max(r,o.min)})),u=new rt(Object.assign({...n},{value:Math.min(n.value.end,o.max)}));return{start:a,end:u}}else return new rt(n)}toString(t){return super.toString(t).padStart(2,"0")}}class st extends Y{constructor(t,e=l.hour){super(t,e)}static fromString(t,e=d.get(st)){const n=e.parse(t),r=n.value.start;if(r!==void 0){let o=l.hour;const a=new st(Object.assign({...n},{value:Math.max(r,o.min)})),u=new st(Object.assign({...n},{value:Math.min(n.value.end,o.max)}));return{start:a,end:u}}else return new st(n)}}class ot extends Y{constructor(t,e=l.minute){super(t,e)}static fromString(t,e=d.get(ot)){const n=e.parse(t),r=n.value.start;if(r!==void 0){const o=l.minute,a=new ot(Object.assign({...n},{value:Math.max(r,o.min)})),u=new ot(Object.assign({...n},{value:Math.min(n.value.end,o.max)}));return{start:a,end:u}}else return new ot(n)}toString(t=Dt.instance){return super.toString(t)}}class it extends Y{constructor(t,e=l.second){super(t,e)}static fromString(t,e=d.get(it)){const n=e.parse(t),r=n.value.start;if(r!==void 0){const o=l.second,a=new it(Object.assign({...n},{value:Math.max(r,o.min)})),u=new it(Object.assign({...n},{value:Math.min(n.value.end,o.max)}));return{start:a,end:u}}else return new it(n)}}class pt extends at{static fromString(t,e=d.get(pt),n=void 0){return new pt(e.parse(t,n))}}class Fn extends ye{constructor(t){super(t)}newYear(t){return new et(t,this.units.year)}newMonth(t){return new nt(t,this.units.month)}newDay(t){return new rt(t,this.units.day)}newHour(t){return new st(t,this.units.hour)}newMinute(t){return new ot(t,this.units.minute)}newSecond(t){return new it(t,this.units.second)}newMillisecond(t){return new ut(t,this.units.millisecond)}newTimeshift(t){return new pt(typeof t=="number"?t:t.value)}}const fr=new Fn(Lt),gr=new Fn(Qt);class j extends R{constructor(t){super(t)}get factory(){return fr}get uncertain(){return this.year?.uncertain===!0||this.month?.uncertain===!0||this.day?.uncertain===!0||this.hour?.uncertain===!0||this.minute?.uncertain===!0||this.second?.uncertain===!0}get approximate(){return this.year?.approximate===!0||this.month?.approximate===!0||this.day?.approximate===!0||this.hour?.approximate===!0||this.minute?.approximate===!0||this.second?.approximate===!0}static fromDate(t){return new j({year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes(),second:t.getSeconds(),timeshift:R.timeshiftOf(t)})}static fromString(t,e=d.get(j)){const n=e.parse(t);return new j(n)}static newInstance(){const t=new Date().toISOString(),e=t.indexOf("."),n=t.substring(0,e)+t.substring(e+4);return j.fromString(n)}clone(){return new j(this.toSpec())}}const $=Object.freeze({year:"year",month:"month",day:"day",hour:"hour",minute:"minute",second:"second",timeshift:"timeshift",uncertain:"uncertain",approximate:"approx"});class se extends re{static instance=new se;render(t){return super.render(t)}}class k extends Y{constructor(t){super(typeof t=="number"||t.hasOwnProperty("value")?t:{value:k.getValue(t,$.year)+k.getValue(t,$.month)+k.getValue(t,$.day)+k.getValue(t,$.hour)+k.getValue(t,$.minute)+k.getValue(t,$.second),uncertain:k.getBoolean(t,$.uncertain),approximate:k.getBoolean(t,"approximate")},Qt.millisecond)}static getBoolean(t,e){return t[e]||t[$.year+"s"]?.[e]||t[$.month+"s"]?.[e]||t[$.day+"s"]?.[e]||t[$.hour+"s"]?.[e]||t[$.minute+"s"]?.[e]||t[$.second+"s"]?.[e]||!1}static getValue(t,e){let n=0,r=t[e+"s"];if(r instanceof Y?r=r.value:typeof t=="number"&&(r=t),r){const o=l[e];n=r*o.duration}return n}static toSpec(t,e=gr){return{...q.toSpec(t,e),uncertain:t.uncertain||!1,approximate:t.approximate||!1}}static fromString(t,e=d.get(k)){const n=e.parse(t);return new k(n)}static between(t,e){const n=e.getTime(),r=t.getTime();return new k(n-r)}toString(t=se.instance){return super.toString(t)}toSpec(){return k.toSpec(this)}}class $t extends kt{constructor(t,e){super(t,e)}get start(){return this._start}set start(t){if(typeof t=="string"&&(super.start=j.fromString(t)),t&&!(t instanceof j)&&!(t instanceof k))throw new z("Interval start is not a level 1 date or duration: "+t);this._start=t}get end(){return this._end}set end(t){if(typeof t=="string"&&(t=j.fromString(t)),t&&!(t instanceof j)&&!(t instanceof k))throw new z("Interval end is not a level 1 date or duration: "+t);this._end=t}static fromString(t,e=d.get($t)){const{start:n,end:r}=e.parse(t);return new $t(n,r)}}class Mt extends Y{uncertainComponent;approximateComponent;constructor(t,e){super(t,e),this.uncertainComponent=t.uncertainComponent||!1,this.approximateComponent=t.approximateComponent||!1}get uncertain(){return super.uncertain||this.uncertainComponent}set uncertain(t){return super.uncertain=t}get approximate(){return super.approximate||this.approximateComponent}set approximate(t){return super.approximate=t}get uncertainGroup(){return super.uncertain}get approximateGroup(){return super.approximate}toSpec(){return{...super.toSpec(),uncertain:this.uncertainGroup,approximate:this.approximateGroup,uncertainComponent:this.uncertainComponent,approximateComponent:this.approximateComponent}}toJSON(){return this.toSpec()}}class wr extends $n{year=new N("year",Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,this.month)}const we=new wr;class W extends Mt{constructor(t,e=we.year){super(t,e)}static fromString(t,e=we.year,n=d.get(W)){const r=n.parse(t),o=r.value.start;if(o!==void 0){const a=new W(Object.assign({...r},{value:Math.max(o,e.min)})),u=new W(Object.assign({...r},{value:Math.min(r.value.end,e.max)})),p={start:a,end:u},c=r.value.estimate;return c&&(p.estimate=c),p}else return new W(r)}}class Sr extends Rn{validate(t){switch(t){case 25:case 26:case 27:case 28:case 29:case 30:case 31:case 32:case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:return!0;default:return super.validate(t)}}}class J extends Mt{constructor(t,e=new N(l.month.name,1,41,l.day,new Sr)){super(t,e)}static fromString(t,e=d.get(J)){const n=e.parse(t),r=n.value.start;if(r!==void 0){const o=l.month,a=new J(Object.assign({...n},{value:Math.max(r,o.min)})),u=new J(Object.assign({...n},{value:Math.min(n.value.end,o.max)}));return{start:a,end:u}}else return new J(n)}toString(t){return super.toString(t).padStart(2,"0")}}class K extends Mt{constructor(t,e=l.day){super(t,e)}static fromString(t,e=d.get(K)){const n=e.parse(t),r=n.value.start;if(r!==void 0){const o=l.day,a=new K(Object.assign({...n},{value:Math.max(r,o.min)})),u=new K(Object.assign({...n},{value:Math.min(n.value.end,o.max)}));return{start:a,end:u}}else return new K(n)}toString(t){return super.toString(t).padStart(2,"0")}}class Z extends Mt{constructor(t,e=l.hour){super(t,e)}static fromString(t,e=d.get(Z)){const n=e.parse(t),r=n.value.start;if(r!==void 0){const o=l.hour,a=new Z(Object.assign({...n},{value:Math.max(r,o.min)})),u=new Z(Object.assign({...n},{value:Math.min(n.value.end,o.max)}));return{start:a,end:u}}else return new Z(n)}}class Q extends Mt{constructor(t,e=l.minute){super(t,e)}static fromString(t,e=d.get(Q)){const n=e.parse(t),r=n.value.start;if(r!==void 0){const o=l.minute,a=new Q(Object.assign({...n},{value:Math.max(r,o.min)})),u=new Q(Object.assign({...n},{value:Math.min(n.value.end,o.max)}));return{start:a,end:u}}else return new Q(n)}}class D extends Mt{constructor(t,e=l.second){super(t,e)}static fromString(t,e=l.second,n=d.get(D)){const r=n.parse(t),o=r.value.start;if(o!==void 0){const a=new D(Object.assign({...r},{value:Math.max(o,e.min)})),u=new D(Object.assign({...r},{value:Math.min(r.value.end,e.max)}));return{start:a,end:u}}else return new D(r,e)}}class Vn extends pt{}class yr extends Dt{qualifier(){return""}}class _ extends ne{static instance=new _;static valueRenderer=new yr(O.default);static names=["year","month","day","hour","minute","second"];static qualifier(t,e){return t?e?"%":"?":e?"~":""}renderComponent(t,e){const n=t[e],r=_.names.slice(_.names.indexOf(e)+1).map(u=>t[u]).filter(Boolean),o=_.qualifier(n.uncertainComponent,n.approximateComponent),a=_.qualifier(n.uncertainGroup&&!n.uncertainComponent&&!r.some(u=>u.uncertain),n.approximateGroup&&!n.approximateComponent&&!r.some(u=>u.approximate));return o+n.toString(_.valueRenderer)+a}}class In extends ye{constructor(t){super(t)}newYear(t){return new W(t,this.units.year)}newMonth(t){return new J(t,this.units.month)}newDay(t){return new K(t,this.units.day)}newHour(t){return new Z(t,this.units.hour)}newMinute(t){return new Q(t,this.units.minute)}newSecond(t){return new D(t,this.units.second)}newMillisecond(t){return new ut(t,this.units.millisecond)}newTimeshift(t){return new Vn(typeof t=="number"?t:t.value)}}const br=new In(we),Gr=new In(Qt);class U extends j{constructor(t){super(t)}toString(t=_.instance){return super.toString(t)}get year(){return super.year}set year(t){super.year=t}get month(){return super.month}set month(t){super.month=t}get factory(){return br}static fromDate(t){return new U({year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes(),second:t.getSeconds(),timeshift:R.timeshiftOf(t)})}static fromString(t,e=d.get(U)){const n=e.parse(t);return new U(n)}static newInstance(){const t=new Date().toISOString(),e=t.indexOf("."),n=t.substring(0,e)+t.substring(e+4);return U.fromString(n)}clone(){return new U(this.toSpec())}}class P{regExp;constructor(t,e){this.name=t,this.regExp=new RegExp(`^(?:${e})$`)}regexGroups(t){const e=this.regExp.exec(t);if(!e)throw new z(`Invalid ${this.name} "${t}"`);return e.groups}parseGroups(t){throw new ct(`${this.constructor.name} is abstract`)}parse(t){const e=this.regexGroups(t);return this.parseGroups(e)}}class gt extends se{static instance=new gt;static designators=[["years","Y"],["months","MM"],["days","D"],["hours","H"],["minutes","M"],["seconds","S"]];static qualifier(t,e){return t?e?"%":"?":e?"~":""}render(t){const e=gt.qualifier(t.uncertainDuration,t.approximateDuration);if(!t.hasQualifiedComponent)return e+super.render(t);let n=e+"P";for(const[r,o]of gt.designators){const a=t.components[r];a&&(n+=gt.qualifier(a.uncertainComponent,a.approximateComponent)+a.value+o)}return n}}class A extends k{#t;constructor(t){if(super(typeof t=="number"?t:{value:A.valueFromSpec(t),uncertain:t.uncertain===!0,approximate:t.approximate===!0},Qt.millisecond),typeof t!="number"){const e={};for(const n of A.componentNames)t[n]instanceof Y&&(e[n]=t[n]);Object.keys(e).length>0&&(this.#t=e)}}static componentNames=["years","months","days","hours","minutes","seconds"];get components(){return this.#t}#e(t){return this.#t?Object.values(this.#t).some(e=>e[t]):!1}get uncertainDuration(){return super.uncertain}get approximateDuration(){return super.approximate}get uncertain(){return super.uncertain||this.#e("uncertain")}set uncertain(t){super.uncertain=t}get approximate(){return super.approximate||this.#e("approximate")}set approximate(t){super.approximate=t}get hasQualifiedComponent(){return this.#t?Object.values(this.#t).some(t=>t.uncertainComponent||t.approximateComponent):!1}static valueFromSpec(t){return A.getValue(t,$.year)+A.getValue(t,$.month)+A.getValue(t,$.day)+A.getValue(t,$.hour)+A.getValue(t,$.minute)+A.getValue(t,$.second)}static toSpec(t,e=Gr){const n=k.toSpec(t,e);if(t instanceof A&&t.hasQualifiedComponent)for(const r of A.componentNames)delete n[r],t.components[r]&&(n[r]=t.components[r]);return n}static fromString(t,e=d.get(A)){const n=e.parse(t);return new A(n)}static between(t,e){const n=e.getTime(),r=t.getTime();return new A(n-r)}toSpec(){return A.toSpec(this)}toString(t=gt.instance){return super.toString(t)}}class Rt extends $t{get start(){return this._start}set start(t){if(typeof t=="string"&&(super.start=U.fromString(t)),t&&!(t instanceof U)&&!(t instanceof A))throw new z("Interval start is not a level 2 date or duration: "+t);this._start=t}get end(){return this._end}set end(t){if(typeof t=="string"&&(t=U.fromString(t)),t&&!(t instanceof U)&&!(t instanceof A))throw new z("Interval end is not a level 2 date or duration: "+t);this._end=t}static fromString(t,e=d.get(Rt)){const{start:n,end:r}=e.parse(t);return new Rt(n,r)}}class _t extends Set{constructor(t,e){super(t),this.exclusive=e}has(t){const e=t.toString().replace("..","/");for(const n of this)if(n.toString()===e)return!0;return!1}static fromString(t,e=d.get(_t)){const{exclusive:n,values:r}=e.parse(t);return new _t(r,n)}}class L extends P{constructor(t,e){super(t,e)}static read(t){return{value:t?parseInt(t,10):void 0}}parseGroups(t){return L.read(t[this.name])}parse(t){if(t.startsWith("-"))throw new z(`${this.name} cannot be negative`);return super.parse(t)}}class i{static groupName(...t){return t.reduce((e,n)=>e?e+n.charAt(0).toUpperCase()+n.substring(1):n,"")}static group(t,...e){return`(?<${t}>${e.join("")})`}static optional(t){return t+"?"}static nonCapturingGroup(...t){return`(?:${t.join("")})`}static optionalGroup(t,...e){return i.optional(i.group(t,...e))}static optionalNonCapturingGroup(...t){return i.optional(i.nonCapturingGroup(...t))}static numberGroup(t,e,n,r="\\d"){return i.group(t,`${n||""}[${r}]${e}`)}}const $e="yearValue";class Ft extends L{static format(t=""){return i.numberGroup(i.groupName(t,$e),"{4}",void 0)}constructor(){super($e,Ft.format())}}const Re="monthValue";class Vt extends L{static format(t=""){return i.numberGroup(i.groupName(t,Re),"{1,2}",void 0)}constructor(){super(Re,Vt.format())}}const Fe="dayValue";class wt extends L{static format(t=""){return i.numberGroup(i.groupName(t,Fe),"{1,2}",void 0)}constructor(){super(Fe,wt.format())}}const Ve="hourValue";class St extends L{static format(t=""){return i.numberGroup(i.groupName(t,Ve),"{1,2}",void 0)}constructor(){super(Ve,St.format())}}const Ie="minuteValue";class It extends L{static format(t=""){return i.numberGroup(i.groupName(t,Ie),"{1,2}",void 0)}constructor(){super(Ie,It.format())}}const je="secondValue";class jt extends L{static format(t=""){return i.numberGroup(i.groupName(t,je),"{1,2}",void 0)}constructor(){super(je,jt.format())}}const Ue="timeshiftValue",ze="shiftHour",Ce="shiftMinute";class Tt extends P{static format(t=""){return ke.map(e=>e.name).join("|")+"|"+i.nonCapturingGroup(i.group(t+ze,i.numberGroup(i.groupName(t,Ue),"{2}","[+-]")),i.optionalNonCapturingGroup(":?",i.numberGroup(i.groupName(t,Ce),"{2}",void 0)))}constructor(){super(Ue,Tt.format())}parse(t,e){let n=0;const r=ke.find(o=>o.name===t);if(r){if(typeof r.timeshift=="function")try{return r.timeshift(e??{})}catch(o){throw new z(`The time zone ${t} depends on the date: ${o.message}`)}t=r.timeshift}if(t!=="Z"){const o=this.regexGroups(t),a=o[ze];a&&(n+=parseInt(a,10)*60);const u=o[Ce];u&&(n+=parseInt(u,10))}return n}}const qe="year",Be="month",He="day",Ye="hour",Oe="minute",Xe="second",We="millisecond",Je="timeshift";class mt extends P{static format(t=""){return i.group(i.groupName(t,qe),Ft.format(t))+i.optionalNonCapturingGroup("-",i.group(i.groupName(t,Be),Vt.format(t)),i.optionalNonCapturingGroup("-",i.group(i.groupName(t,He),wt.format(t)),i.optionalNonCapturingGroup("[T ]",i.group(i.groupName(t,Ye),St.format(t)),":?",i.group(i.groupName(t,Oe),It.format(t)),i.optionalNonCapturingGroup(":",i.group(i.groupName(t,Xe),jt.format(t)),i.optionalNonCapturingGroup("[.,]",i.group(i.groupName(t,We),"\\d+"))),"\\s*",i.optionalGroup(i.groupName(t,Je),Tt.format(t)))))}constructor(){super("date",mt.format())}parse(t){const e=this.regexGroups(t),n=e[qe],r=e[Be],o=e[He],a=e[Ye],u=e[Oe],p=e[Xe],c=e[We],f=e[Je],m=n?new yt(Ft.read(n)):void 0,b=r?Vt.read(r):void 0;return{year:m,month:b?new bt(b,ft.create(b.value,m?.value)):void 0,day:o?new Gt(wt.read(o)):void 0,hour:a?new xt(St.read(a)):void 0,minute:u?new Nt(It.read(u)):void 0,second:p?new Et(jt.read(p)):void 0,millisecond:c?ut.parseFraction(c):void 0,timeshift:f?at.fromString(f,new Tt,{year:m?.value,month:b?.value,day:o?wt.read(o).value:void 0,hour:a?St.read(a).value:void 0}):void 0}}}const Ke="years",ie="months",xr="days",Ze="hours",Qe="minutes",De="seconds";class Ge extends P{static format(t=""){return"P"+i.optionalNonCapturingGroup(i.numberGroup(i.groupName(t,Ke),"+",void 0,"\\d"),"Y")+i.optionalNonCapturingGroup(i.numberGroup(i.groupName(t,ie),"+",void 0,"\\d"),"MM")+i.optionalNonCapturingGroup(i.numberGroup(i.groupName(t,xr),"+",void 0,"\\d"),"D")+i.optionalNonCapturingGroup(i.numberGroup(i.groupName(t,Ze),"+",void 0,"\\d"),"H")+i.optionalNonCapturingGroup(i.numberGroup(i.groupName(t,Qe),"+",void 0,"\\d"),"M")+i.optionalNonCapturingGroup(i.numberGroup(i.groupName(t,De),"+",void 0,"\\d"),"S")}constructor(){super("duration",Ge.format())}parseGroups(t){return{years:t[Ke],months:t[ie],days:t[ie],hours:t[Ze],minutes:t[Qe],seconds:t[De]}}}const ae="start",ue="end";class xe extends P{static format=i.group(ae,mt.format(ae))+"/"+i.group(ue,mt.format(ue));constructor(){super("interval",xe.format)}parse(t){const e=this.regexGroups(t),n=e[ae],r=e[ue];return{start:n?R.fromString(n,new mt):void 0,end:r?R.fromString(r,new mt):void 0}}}d.register(R,()=>new mt);d.register(Gt,()=>new wt);d.register(q,()=>new Ge);d.register(xt,()=>new St);d.register(kt,()=>new xe);d.register(Nt,()=>new It);d.register(bt,()=>new Vt);d.register(Et,()=>new jt);d.register(at,()=>new Tt);d.register(yt,()=>new Ft);class E extends L{static uncertainGroup="uncertain";static approximateGroup="approx";static uncertainAndApproximateGroup=E.uncertainGroup+E.approximateGroup;constructor(t,e){super(t,e)}static qualifierFormat(t,e){return i.optionalGroup(t,`\\${e}`)}static formatSuffix(t){return this.qualifierFormat(i.groupName(E.uncertainGroup,t),"?")+this.qualifierFormat(i.groupName(E.approximateGroup,t),"~")+this.qualifierFormat(i.groupName(E.uncertainAndApproximateGroup,t),"%")}static numberFormat(t,e,n){return i.numberGroup(t,e,n,"\\dX")+this.formatSuffix(t)}getValueAndSign(t){let e=t[this.name],n;return e.charAt(0)==="-"?(n=-1,e=e.substring(1)):n=1,{valueStr:e,sign:n}}parseGroups(t){const{valueStr:e,sign:n}=this.getValueAndSign(t);let r=0,o;for(o=0;o<e.length;o++){const c=e[o];if(c==="X")break;r=r*10+parseInt(c,10)}if(o<e.length){let c=1;for(let b=0;b<e.length-o;b++)c*=10;const f=n*r*c,m=f+c-1;r={start:f,end:m}}else r*=n;const a=t[i.groupName(E.uncertainAndApproximateGroup,this.name)],u=t[i.groupName(E.approximateGroup,this.name)]||a,p=t[i.groupName(E.uncertainGroup,this.name)]||a;return{value:r,approximate:u?!!u:!1,uncertain:p?!!p:!1}}}const Pe="yearValue";class Ut extends E{constructor(){super(Pe,Ut.format())}static format(t=""){return"Y?"+E.numberFormat(i.groupName(t,Pe),"+","[-]?")}parse(t){const e=this.regexGroups(t);return this.parseGroups(e)}}const Le="monthValue";class zt extends E{static format(t=""){return E.numberFormat(i.groupName(t,Le),"{1,2}",void 0)}constructor(){super(Le,zt.format())}}const _e="dayValue";class Ct extends E{static format(t=""){return E.numberFormat(i.groupName(t,_e),"{1,2}",void 0)}constructor(){super(_e,Ct.format())}}const tn="hourValue";class qt extends E{static format(t=""){return E.numberFormat(i.groupName(t,tn),"{1,2}",void 0)}constructor(){super(tn,qt.format())}}const en="minuteValue";class Bt extends E{static format(t=""){return E.numberFormat(i.groupName(t,en),"{1,2}",void 0)}constructor(){super(en,Bt.format())}}const nn="secondValue";class Ht extends E{static format(t=""){return E.numberFormat(i.groupName(t,nn),"{1,2}",void 0)}constructor(){super(nn,Ht.format())}}class Yt extends Tt{}class T extends P{static yearGroup="year";static monthGroup="month";static dayGroup="day";static hourGroup="hour";static minuteGroup="minute";static secondGroup="second";static millisecondGroup="millisecond";static timeshiftGroup="timeshift";constructor(t=T.format()){super("date",t)}static format(t=""){return i.group(i.groupName(t,T.yearGroup),Ut.format(t))+i.optionalNonCapturingGroup("-",i.group(i.groupName(t,T.monthGroup),zt.format(t)),i.optionalNonCapturingGroup("-",i.group(i.groupName(t,T.dayGroup),Ct.format(t)),i.optionalNonCapturingGroup("[T ]",i.group(i.groupName(t,T.hourGroup),qt.format(t)),":",i.group(i.groupName(t,T.minuteGroup),Bt.format(t)),i.optionalNonCapturingGroup(":",i.group(i.groupName(t,T.secondGroup),Ht.format(t)),i.optionalNonCapturingGroup("[.,]",i.group(i.groupName(t,T.millisecondGroup),"\\d+"))),i.optionalGroup(i.groupName(t,T.timeshiftGroup),Yt.format(t)))))}parseGroups(t){const e=t[T.millisecondGroup],n=e?ut.parseFraction(e):void 0,r=t[T.secondGroup],o=r?it.fromString(r,new Ht):void 0,a=t[T.minuteGroup];let u;a&&(u=ot.fromString(a,new Bt),u.uncertain=u.uncertain||o?.uncertain||!1,u.approximate=u.approximate||o?.approximate||!1);const p=t[T.hourGroup];let c;p&&(c=st.fromString(p,new qt),c.uncertain=c.uncertain||u?.uncertain||!1,c.approximate=c.approximate||u?.approximate||!1);const f=t[T.dayGroup];let m;f&&(m=rt.fromString(f,new Ct),m.uncertain=m.uncertain||c?.uncertain||!1,m.approximate=m.approximate||c?.approximate||!1);const b=t[T.monthGroup];let g;b&&(g=nt.fromString(b,new zt),g.uncertain=g.uncertain||m?.uncertain||!1,g.approximate=g.approximate||m?.approximate||!1);const G=t[T.yearGroup];let w;G&&(w=et.fromString(G,void 0,new Ut),w.uncertain=w.uncertain||g?.uncertain||!1,w.approximate=w.approximate||g?.approximate||!1);const F=t[T.timeshiftGroup],M=F?pt.fromString(F,new Yt,{year:w?.value,month:g?.value,day:m?.value,hour:c?.value}):void 0;return{year:w,month:g,day:m,hour:c,minute:u,second:o,millisecond:n,timeshift:M}}}const rn="years",sn="months",on="days",an="hours",un="minutes",cn="seconds";class dt extends E{static format(t=""){return"P"+i.optionalNonCapturingGroup(i.numberGroup(i.groupName(t,rn),"+",void 0,"\\d"),"Y")+i.optionalNonCapturingGroup(i.numberGroup(i.groupName(t,sn),"+",void 0,"\\d"),"MM")+i.optionalNonCapturingGroup(i.numberGroup(i.groupName(t,on),"+",void 0,"\\d"),"D")+i.optionalNonCapturingGroup(i.numberGroup(i.groupName(t,an),"+",void 0,"\\d"),"H")+i.optionalNonCapturingGroup(i.numberGroup(i.groupName(t,un),"+",void 0,"\\d"),"M")+i.optionalNonCapturingGroup(i.numberGroup(i.groupName(t,cn),"+",void 0,"\\d"),"S")+this.formatSuffix(t)}constructor(){super("duration",dt.format())}parseGroups(t){return{years:t[rn],months:t[sn],days:t[on],hours:t[an],minutes:t[un],seconds:t[cn],uncertain:!!t[E.uncertainGroup],approximate:!!t[E.approximateGroup]}}}const Nr="dates",ce="start",me="end",mn="durations",de="durationMin",pe="durationMax";class Ne extends P{static format=i.group(Nr,i.optionalGroup(ce,i.group("openStart","\\.\\.")+"|"+T.format(ce))+"/"+i.optionalGroup(me,i.group("openEnd","\\.\\.")+"|"+T.format(me)))+"|"+i.group(mn,i.group(de,dt.format(de))+"/"+i.group(pe,dt.format(pe)));constructor(t="interval",e=Ne.format){super(t,e)}parseGroups(t){let e,n;if(t[mn]){const o=t[de];e=k.fromString(o,new dt);const a=t[pe];n=k.fromString(a,new dt)}else{const o=t[ce];switch(o){case void 0:e=null;break;case"..":e=void 0;break;default:e=j.fromString(o,new T)}const a=t[me];switch(a){case void 0:n=null;break;case"..":n=void 0;break;default:n=j.fromString(a,new T)}}return{start:e,end:n}}}d.register(j,()=>new T);d.register(rt,()=>new Ct);d.register(k,()=>new dt);d.register(st,()=>new qt);d.register($t,()=>new Ne);d.register(ot,()=>new Bt);d.register(nt,()=>new zt);d.register(it,()=>new Ht);d.register(pt,()=>new Yt);d.register(et,()=>new Ut);class y extends E{static uncertainGroup="uncertain1";static approximateGroup="approx1";static uncertainAndApproximateGroup=y.uncertainGroup+y.approximateGroup;constructor(t,e){super(t,e)}static numberFormat(t,e,n){return this.qualifierFormat(i.groupName(y.uncertainGroup,t),"?")+this.qualifierFormat(i.groupName(y.approximateGroup,t),"~")+this.qualifierFormat(i.groupName(y.uncertainAndApproximateGroup,t),"%")+E.numberFormat(t,e,n)}parseGroups(t){const e=super.parseGroups(t),n=t[i.groupName(y.uncertainAndApproximateGroup,this.name)];return(t[i.groupName(y.uncertainGroup,this.name)]||n)&&(e.uncertainComponent=!0),(t[i.groupName(y.approximateGroup,this.name)]||n)&&(e.approximateComponent=!0),e}}const At="yearValue",dn="exp",pn="signif";class Ot extends y{constructor(){super(At,Ot.format())}static format(t=""){return"Y?"+i.nonCapturingGroup(i.group(i.groupName(t,dn),"[-]?\\d+E\\d+")+"|"+y.numberFormat(i.groupName(t,At),"+","[-]?")+i.optionalGroup(i.groupName(t,pn),"S\\d+"))}parseGroups(t){const e=t[dn];if(e){const a=e.indexOf("E"),u=parseInt(e.substring(a+1),10),c=parseInt(e.substring(0,a),10)*Math.pow(10,u);t[At]=c.toString()}const n=t[pn],r=t[At];if(n){const a=parseInt(n.substring(1),10),{valueStr:u,sign:p}=this.getValueAndSign(t);let c="";for(let f=0;f<u.length;f++)c+=f<a?u.charAt(f):"X";t[At]=(p<0?"-":"")+c}const o=super.parseGroups(t);return n&&(o.value.estimate=parseInt(r,10)),o}parse(t){const e=this.regexGroups(t);return this.parseGroups(e)}}const hn="monthValue";class Xt extends y{static format(t=""){return y.numberFormat(i.groupName(t,hn),"{1,2}",void 0)}constructor(){super(hn,Xt.format())}}const ln="dayValue";class Wt extends y{static format(t=""){return y.numberFormat(i.groupName(t,ln),"{1,2}",void 0)}constructor(){super(ln,Wt.format())}}const fn="hourValue";class Jt extends y{static format(t=""){return y.numberFormat(i.groupName(t,fn),"{1,2}",void 0)}constructor(){super(fn,Jt.format())}}const gn="secondValue";class Kt extends y{static format(t=""){return y.numberFormat(i.groupName(t,gn),"{1,2}",void 0)}constructor(){super(gn,Kt.format())}}const wn="minuteValue";class Zt extends y{static format(t=""){return y.numberFormat(i.groupName(t,wn),"{1,2}",void 0)}constructor(){super(wn,Zt.format())}}class Er extends Yt{}class x extends P{static yearGroup=T.yearGroup;static monthGroup="month";static dayGroup="day";static hourGroup="hour";static minuteGroup="minute";static secondGroup="second";static millisecondGroup="millisecond";static timeshiftGroup="timeshift";constructor(){super("date",x.format())}static format(t=""){return i.group(i.groupName(t,x.yearGroup),Ot.format(t))+i.optionalNonCapturingGroup("-",i.group(i.groupName(t,x.monthGroup),Xt.format(t)),i.optionalNonCapturingGroup("-",i.group(i.groupName(t,x.dayGroup),Wt.format(t)),i.optionalNonCapturingGroup("[T ]",i.group(i.groupName(t,x.hourGroup),Jt.format(t)),":",i.group(i.groupName(t,x.minuteGroup),Zt.format(t)),i.optionalNonCapturingGroup(":",i.group(i.groupName(t,x.secondGroup),Kt.format(t)),i.optionalNonCapturingGroup("[.,]",i.group(i.groupName(t,x.millisecondGroup),"\\d+"))),i.optionalGroup(i.groupName(t,x.timeshiftGroup),Er.format(t)))))}parseGroups(t){const e=t[x.millisecondGroup],n=e?ut.parseFraction(e):void 0,r=t[x.secondGroup];let o;r&&(o=D.fromString(r,void 0,new Kt),o.uncertain=o?.uncertain||!1,o.approximate=o?.approximate||!1);const a=t[x.minuteGroup];let u;a&&(u=Q.fromString(a,new Zt),u.uncertain=u.uncertain||o?.uncertain||!1,u.approximate=u.approximate||o?.approximate||!1);const p=t[x.hourGroup];let c;p&&(c=Z.fromString(p,new Jt),c.uncertain=c.uncertain||u?.uncertain||!1,c.approximate=c.approximate||u?.approximate||!1);const f=t[x.dayGroup];let m;f&&(m=K.fromString(f,new Wt),m.uncertain=m.uncertain||c?.uncertain||!1,m.approximate=m.approximate||c?.approximate||!1);const b=t[x.monthGroup];let g;b&&(g=J.fromString(b,new Xt),g.uncertain=g.uncertain||m?.uncertain||!1,g.approximate=g.approximate||m?.approximate||!1);const G=t[x.yearGroup];let w;G&&(w=W.fromString(G,void 0,new Ot),w.uncertain=w.uncertain||g?.uncertain||!1,w.approximate=w.approximate||g?.approximate||!1);const F=t[x.timeshiftGroup],M=F?Vn.fromString(F,new Yt,{year:w?.value,month:g?.value,day:m?.value,hour:c?.value}):void 0;return{year:w,month:g,day:m,hour:c,minute:u,second:o,millisecond:n,timeshift:M}}}const Sn="durationValue";class Ee extends y{static format(t=""){return"^"+y.numberFormat(i.groupName(t,Sn),"+",void 0)}constructor(){super(Sn,Ee.format())}}class Tr extends Se{millisecond=new N("millisecond",0,Number.MAX_SAFE_INTEGER,void 0);second=new N("second",0,Number.MAX_SAFE_INTEGER,this.millisecond);minute=new N("minute",0,Number.MAX_SAFE_INTEGER,this.second);hour=new N("hour",0,Number.MAX_SAFE_INTEGER,this.minute);day=new N("day",1,Number.MAX_SAFE_INTEGER,this.hour);month=new N("month",1,Number.MAX_SAFE_INTEGER,this.day);year=new N("year",0,Number.MAX_SAFE_INTEGER,this.month)}const ht=new Tr;class h extends y{static yearsGroup="years";static monthsGroup="months";static isoMonthsGroup="isoMonths";static daysGroup="days";static hoursGroup="hours";static minutesGroup="minutes";static secondsGroup="seconds";static durationGroup="duration";static suffixGroup="durationSuffix";static componentParser=new Ee;static componentFormat(t,e,n,r,o=""){const a=i.group(i.groupName(t,h.quantityGroup(e)),y.numberFormat(i.groupName(t,n),"+",void 0,"\\d"));return i.group(i.groupName(t,e),a,r,o)}static quantityGroup(t){return t+"Quantity"}static isoMonthsLookahead="(?=[?~%]?\\d+D|T)";constructor(){super("duration",h.format())}static format(t=""){const e=i.groupName(t,h.durationGroup);return this.qualifierFormat(i.groupName(y.uncertainGroup,e),"?")+this.qualifierFormat(i.groupName(y.approximateGroup,e),"~")+this.qualifierFormat(i.groupName(y.uncertainAndApproximateGroup,e),"%")+"P"+i.optional(h.componentFormat(t,h.yearsGroup,x.yearGroup,"Y"))+i.optionalNonCapturingGroup(h.componentFormat(t,h.monthsGroup,x.monthGroup,"MM")+"|"+h.componentFormat(t,h.isoMonthsGroup,"isoMonth","M",h.isoMonthsLookahead))+i.optional(h.componentFormat(t,h.daysGroup,x.dayGroup,"D"))+"T?"+i.optional(h.componentFormat(t,h.hoursGroup,x.hourGroup,"H"))+i.optional(h.componentFormat(t,h.minutesGroup,x.minuteGroup,"M"))+i.optional(h.componentFormat(t,h.secondsGroup,x.secondGroup,"S"))+i.optionalGroup(i.groupName(t,h.suffixGroup),"[?~%]")}static parseComponent(t,e,n){const r=h.componentParser.parse(t);return new e(r,n)}parseGroups(t){const e=t[h.quantityGroup(h.secondsGroup)];let n;e&&(n=h.parseComponent(e,D,ht.second),n.uncertain=!!t[i.groupName(y.uncertainGroup,h.secondsGroup)]||!1,n.approximate=!!t[i.groupName(y.approximateGroup,h.secondsGroup)]||!1);const r=t[h.quantityGroup(h.minutesGroup)];let o;r&&(o=h.parseComponent(r,Q,ht.minute),o.uncertain=o.uncertain||n?.uncertain||!1,o.approximate=o.approximate||n?.approximate||!1);const a=t[h.quantityGroup(h.hoursGroup)];let u;a&&(u=h.parseComponent(a,Z,ht.hour),u.uncertain=u.uncertain||o?.uncertain||!1,u.approximate=u.approximate||o?.approximate||!1);const p=t[h.quantityGroup(h.daysGroup)];let c;p&&(c=h.parseComponent(p,K,ht.day),c.uncertain=c.uncertain||u?.uncertain||!1,c.approximate=c.approximate||u?.approximate||!1);const f=t[h.quantityGroup(h.monthsGroup)]||t[h.quantityGroup(h.isoMonthsGroup)];let m;f&&(m=h.parseComponent(f,J,ht.month),m.uncertain=m.uncertain||c?.uncertain||!1,m.approximate=m.approximate||c?.approximate||!1);const b=t[h.quantityGroup(h.yearsGroup)];let g;b&&(g=h.parseComponent(b,W,ht.year),g.uncertain=g.uncertain||m?.uncertain||!1,g.approximate=g.approximate||m?.approximate||!1);const G=t[h.suffixGroup],w=!!t[i.groupName(y.uncertainAndApproximateGroup,h.durationGroup)]||G==="%",F=w||!!t[i.groupName(y.uncertainGroup,h.durationGroup)]||G==="?",M=w||!!t[i.groupName(y.approximateGroup,h.durationGroup)]||G==="~";return{years:g,months:m,days:c,hours:u,minutes:o,seconds:n,uncertain:F,approximate:M}}}const Mr="dates",he="start",le="end",yn="durations",fe="durationMin",ge="durationMax";class oe extends P{static format=i.group(Mr,i.optionalGroup(he,i.group("openStart","\\.\\.")+"|"+x.format(he))+"/"+i.optionalGroup(le,i.group("openEnd","\\.\\.")+"|"+x.format(le)))+"|"+i.group(yn,i.group(fe,h.format(fe))+"/"+i.group(ge,h.format(ge)));constructor(t="interval",e=oe.format){super(t,e)}parseGroups(t){let e,n;if(t[yn]){const o=t[fe];e=A.fromString(o,new h);const a=t[ge];n=A.fromString(a,new h)}else{const o=t[he];switch(o){case void 0:e=null;break;case"..":e=void 0;break;default:e=U.fromString(o,new x)}const a=t[le];switch(a){case void 0:n=null;break;case"..":n=void 0;break;default:n=U.fromString(a,new x)}}return{start:e,end:n}}}class vr{parse(t){t=t.trim();const e=t.startsWith("["),r=t.substring(1,t.length-1).split(","),o=[];for(const a of r){let u;a.includes("..")?u=Rt.fromString(a.replace("..","/"),new oe):u=U.fromString(a,new x),o.push(u)}return{values:o,exclusive:e}}}d.register(U,()=>new x);d.register(K,()=>new Wt);d.register(A,()=>new h);d.register(Z,()=>new Jt);d.register(Rt,()=>new oe);d.register(Q,()=>new Zt);d.register(J,()=>new Xt);d.register(D,()=>new Kt);d.register(_t,()=>new vr);d.register(W,()=>new Ot);class H{constructor(t){this.preferences=t}read(t){var e,n;if(t===void 0)return;if(typeof t=="string")return t===""?void 0:t;for(const o of this.preferences){const a=(e=t[o])!==null&&e!==void 0?e:t[H.base(o)];if(a)return a}const r=new Set(this.preferences.map(o=>H.base(o)));for(const[o,a]of Object.entries(t))if(a&&r.has(H.base(o)))return a;return(n=Object.values(t).find(o=>o))!==null&&n!==void 0?n:void 0}write(t,e,n){var r,o;const a=e?.trim()?e.trim():void 0;if(t===void 0||typeof t=="string")return a;const u={...t},p=(o=(r=Object.keys(u).find(c=>c===n))!==null&&r!==void 0?r:Object.keys(u).find(c=>H.base(c)===H.base(n)))!==null&&o!==void 0?o:n;return a===void 0?delete u[p]:u[p]=a,Object.keys(u).length===0?void 0:u}static base(t){return t.toLowerCase().split("-")[0]}}H.any=new H([]);var bn;(function(s){s.abductee="abductee",s.actor="actor",s.artist="artist",s.anthropologist="anthropologist",s.archeologist="archeologist",s.astronaut="astronaut",s.astronomer="astronomer",s.astrologist="astrologist",s.astrophysicist="astrophysicist",s.banker="banker",s.barman="barman",s.biologist="biologist",s.biochemist="biochemist",s.biophysicist="biophysicist",s.bishop="bishop",s.businessman="businessman",s.botanist="botanist",s.cameraman="cameraman",s.chemist="chemist",s.contactee="contactee",s.cryptozoologist="cryptozoologist",s.dentist="dentist",s.director="director",s.diplomat="diplomat",s.diver="diver",s.electronics="electronics",s.engineer="engineer",s.ethnologist="ethnologist",s.exobiologist="exobiologist",s.farmer="farmer",s.firefighter="firefighter",s.flightAttendant="flightAttendant",s.geologist="geologist",s.geophysicist="geophysicist",s.geographer="geographer",s.historian="historian",s.houseWife="houseWife",s.hypnotherapist="hypnotherapist",s.illusionist="illusionist",s.journalist="journalist",s.judge="judge",s.lawyer="lawyer",s.leader="leader",s.librarian="librarian",s.logger="logger",s.mathematician="mathematician",s.mechanic="mechanic",s.meteorologist="meteorologist",s.military="military",s.musician="musician",s.neurologist="neurologist",s.neuroscientist="neuroscientist",s.neuropsychiatrist="neuropsychiatrist",s.nurse="nurse",s.oceanographer="oceanographer",s.painter="painter",s.parapsychologist="parapsychologist",s.philosopher="philosopher",s.photographer="photographer",s.physician="physician",s.physicist="physicist",s.pilot="pilot",s.politician="politician",s.policeman="policeman",s.priest="priest",s.producer="producer",s.prospector="prospector",s.psychologist="psychologist",s.psychiatrist="psychiatrist",s.radioastronomer="radioastronomer",s.radioamateur="radioamateur",s.salesman="salesman",s.sailor="sailor",s.sociologist="sociologist",s.softwareEngineer="softwareEngineer",s.stuntman="stuntman",s.taxiDriver="taxiDriver",s.teacher="teacher",s.telegrapher="telegrapher",s.truckDriver="truckDriver",s.ufologist="ufologist",s.ufoWitness="ufoWitness",s.ufoWitness2="ufoWitness2",s.worker="worker",s.writer="writer"})(bn||(bn={}));var Gn;(function(s){s.neutral="neutral",s.male="male",s.female="female"})(Gn||(Gn={}));const Ar="modulepreload",kr=function(s,t){return new URL(s,t).href},xn={},Pt=function(t,e,n){let r=Promise.resolve();if(e&&e.length>0){let a=function(f){return Promise.all(f.map(m=>Promise.resolve(m).then(b=>({status:"fulfilled",value:b}),b=>({status:"rejected",reason:b}))))};const u=document.getElementsByTagName("link"),p=document.querySelector("meta[property=csp-nonce]"),c=p?.nonce||p?.getAttribute("nonce");r=a(e.map(f=>{if(f=kr(f,n),f in xn)return;xn[f]=!0;const m=f.endsWith(".css"),b=m?'[rel="stylesheet"]':"";if(!!n)for(let w=u.length-1;w>=0;w--){const F=u[w];if(F.href===f&&(!m||F.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${f}"]${b}`))return;const G=document.createElement("link");if(G.rel=m?"stylesheet":Ar,m||(G.as="script"),G.crossOrigin="",G.href=f,c&&G.setAttribute("nonce",c),document.head.appendChild(G),m)return new Promise((w,F)=>{G.addEventListener("load",w),G.addEventListener("error",()=>F(new Error(`Unable to preload CSS for ${f}`)))})}))}function o(a){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=a,window.dispatchEvent(u),!u.defaultPrevented)throw a}return r.then(a=>{for(const u of a||[])u.status==="rejected"&&o(u.reason);return t().catch(o)})};class $r extends Error{constructor(t,e){super(t),this.cause=e}}class Te extends $r{constructor(t=Te.defaultMessage,e){super(t,e)}}Te.defaultMessage="Assertion failed";var Nn;(function(s){s.country="country",s.region="region",s.department="department",s.city="city",s.company="company"})(Nn||(Nn={}));var En;(function(s){s.at="at",s.au="au",s.ar="ar",s.be="be",s.br="br",s.ca="ca",s.ch="ch",s.cn="cn",s.cl="cl",s.co="co",s.cy="cy",s.de="de",s.dk="dk",s.do="do",s.dz="dz",s.gr="gr",s.ec="ec",s.eg="eg",s.es="es",s.fi="fi",s.fr="fr",s.ga="ga",s.ge="ge",s.hu="hu",s.in="in",s.ie="ie",s.ir="ir",s.il="il",s.it="it",s.jp="jp",s.kr="kr",s.ma="ma",s.mx="mx",s.my="my",s.mz="mz",s.nl="nl",s.no="no",s.nz="nz",s.pa="pa",s.pe="pe",s.ph="ph",s.pl="pl",s.pt="pt",s.ro="ro",s.ru="ru",s.sc="sc",s.tr="tr",s.ua="ua",s.uk="uk",s.us="us",s.sa="sa",s.se="se",s.su="su",s.tn="tn",s.tw="tw",s.ve="ve",s.za="za"})(En||(En={}));class Rr extends Error{constructor(t,e,n){super(typeof e=="number"&&Number.isInteger(e)&&e>=1?`This ${t} file is in version ${e} of its format; this UFO@home reads version ${n}. Read it with the UFO@home that reads its version.`:`This ${t} file states ${JSON.stringify(e)} as its format version, which is not a version.`),this.format=t,this.found=e,this.supported=n,this.name="FormatVersionError"}said(t){return t.replace("{found}",typeof this.found=="number"?String(this.found):JSON.stringify(this.found)).replace("{supported}",String(this.supported))}}class tt{static CURRENT={sighting:4,case:1,interview:1};static SCHEMA_BASE="https://ufoathome.org/schema";static schemaUrl(t,e=tt.CURRENT[t]){return`${tt.SCHEMA_BASE}/${e}/${t}.schema.json`}static of(t){if(typeof t!="object"||t===null)return 1;const e=t.version;return e===void 0?1:typeof e=="object"&&e!==null&&"value"in e?e.value:e}static recording(t){return tt.check(t,"sighting")}static check(t,e){const n=tt.of(t),r=tt.CURRENT[e];if(typeof n!="number"||!Number.isInteger(n)||n!==r)throw new Rr(e,n,r);return t}}class X{static NAMES=["weather","place","lightPollution","decor"];static KEYS={weather:["weatherTrack","weatherSource"],place:["place"],lightPollution:["lightPollution"],decor:["decor"]};static annexName(t,e){return`${t}.${e.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`)}.json`}static taken(t,e){const n={};if(t==="decor")return Array.isArray(e.decor)&&(n.decor=e.decor.filter(X.surveyed)),n;for(const r of X.KEYS[t])e[r]!==void 0&&(n[r]=e[r]);return n}static strip(t,e){if(t==="decor"){const n=Array.isArray(e.decor)?e.decor.filter(r=>!X.surveyed(r)):[];n.length>0?e.decor=n:delete e.decor;return}for(const n of X.KEYS[t])delete e[n]}static put(t,e,n){if(t==="decor"){if(!Array.isArray(n.decor))return;const r=Array.isArray(e.decor)?e.decor.filter(o=>!X.surveyed(o)):[];e.decor=[...r,...n.decor];return}for(const r of X.KEYS[t])n[r]!==void 0&&(e[r]=n[r])}static surveyed(t){return typeof t=="object"&&t!==null&&typeof t.origin=="string"}static fromFile(t,e){return t?.[e]!==void 0&&t[e].live!==!0}}class lt extends Error{constructor(t,e,n){super(`${t}: ${e}${n===void 0?"":` (HTTP ${n})`}`),this.kind=t,this.url=e,this.status=n,this.name="SightingFetchError"}}class te{static async recording(t){const e=await te.json(t);for(const n of X.NAMES){const r=e?.snapshots?.[n];if(!(!r?.src||r.live))try{const o=tt.recording(await te.json(new URL(r.src,new URL(t,location.href)).href));X.put(n,e,o)}catch{}}return e}static async json(t){const e=new URL(t,location.href);if(location.protocol==="https:"&&e.protocol==="http:")throw new lt("mixed-content",t);let n;try{n=await fetch(t)}catch{throw await this.diagnose(t,e)}if(!n.ok)throw new lt("status",t,n.status);try{return await n.json()}catch{throw new lt("malformed",t)}}static async diagnose(t,e){if(e.origin===location.origin)return new lt("unreachable",t);try{return await fetch(t,{mode:"no-cors"}),new lt("cors",t)}catch{return new lt("unreachable",t)}}}function Fr(s,t){for(const e of s){const n=e.toLowerCase().split("-")[0];if(t.includes(n))return n}return"en"}class Vr{static preferencesFor(t){const e=navigator.languages??[],n=this.declaredFor(t);return n?[n,...e]:e}static declaredFor(t){for(let e=t;e;){const n=e.closest("[lang]")?.getAttribute("lang")?.trim();if(n)return n;const r=e.getRootNode();e=r instanceof ShadowRoot?r.host:void 0}}}const Ir=["en","fr","es","it"];class Me{static catalog(t){const e=new Map;return{load(n){const r=Me.languageOf(n);let o=e.get(r);return o||(o=t[r](),e.set(r,o),o.catch(()=>e.delete(r))),o}}}static none(){return new Proxy({},{get:()=>""})}static blank(){const t=new Proxy(()=>t,{get:(e,n)=>n===Symbol.toPrimitive?()=>"":n===Symbol.iterator?function*(){}:n==="toString"||n==="valueOf"?()=>"":n==="then"?void 0:t,apply:()=>t,has:()=>!1,ownKeys:()=>[],getOwnPropertyDescriptor:()=>{}});return t}static languageOf(t){const e=t.toLowerCase().split("-")[0];return Ir.includes(e)?e:"en"}}const jr=["en","fr","es","it"],Ur={en:()=>Pt(()=>import("./InterviewMessages_en-BNau2xU8.js"),[],import.meta.url).then(s=>s.interviewMessages_en),fr:()=>Pt(()=>import("./InterviewMessages_fr-OCQdwn9j.js"),[],import.meta.url).then(s=>s.interviewMessages_fr),es:()=>Pt(()=>import("./InterviewMessages_es-ypa0EDh9.js"),[],import.meta.url).then(s=>s.interviewMessages_es),it:()=>Pt(()=>import("./InterviewMessages_it-awuOqf5v.js"),[],import.meta.url).then(s=>s.interviewMessages_it)},zr=Me.catalog(Ur),Cr="interviewseek";class v{static read(t){return tt.check(t,"interview")}static isProofread(t){const e=Object.keys(t.speakers);return e.length>0&&e.every(n=>{const r=t.proofreading?.[n]?.status;return r==="approved"||r==="covered"})}static said(t){return t.parts?t.parts.map(e=>"redacted"in e?"…":v.plain(e.text)).join(" "):t.redacted?void 0:v.plain(t.text??"")}static ENTITIES={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:" "};static plain(t){return/[<&]/.test(t)?t.replace(/<br\s*\/?>/gi,`
1
+ class U extends Error{}class ee{constructor(t){this.name=t}validate(t){return!0}}class Mn extends ee{min;max;constructor(t,e,n){super(t),this.min=e,this.max=n}validate(t){if(typeof t!="number")throw new U(`${this.name} value must be a number, but was ${t}`);if(t<this.min||t>this.max)throw new U(`${this.name} value must be >= ${this.min} and <= ${this.max}, but was ${t}`);return super.validate(t)}}class N{name;min;max;duration;subUnit;validator;constructor(t,e,n,r,o=new Mn(t,e,n)){this.name=t,this.min=e,this.max=n,this.subUnit=r,this.duration=r?(r.max-r.min+1)*r.duration:1,this.validator=o}validate(t){return this.validator.validate(t)}[Symbol.iterator](){let t=this.min;return{next:()=>{const e={done:t>this.max,value:t};return t++,e}}}}class Se{millisecond;second;minute;hour;day;month;year}class jn extends Se{}class vn extends jn{millisecond=new N("millisecond",0,999,void 0);second=new N("second",0,59,this.millisecond);minute=new N("minute",0,59,this.second);hour=new N("hour",0,23,this.minute);day=new N("day",1,31,this.hour);month=new N("month",1,12,this.day);year=new N("year",0,9999,this.month)}const l=new vn;class An extends Mn{constructor(t=1,e=12){super("month",t,e)}}class ft extends N{static Month28=new ft(28);static Month29=new ft(29);static ThirtyDays=new ft(30);static ThirtyOneDays=new ft(31);constructor(t,e=new An(1,t)){super("month",1,t,l.day,e)}static create(t,e){switch(t){case 1:case 3:case 5:case 7:case 8:case 10:case 12:return this.ThirtyOneDays;case 2:return e%4===0?this.Month29:this.Month28;case 4:case 6:case 9:case 11:return this.ThirtyDays;default:throw new U("Unsupported month",t,e)}}}class B{static instance=new B;render(t){return t.value.toString()}}class I{unit;#t;constructor(t,e){this.unit=e,this.value=typeof t=="number"?t:t.value}get value(){return this.#t}set value(t){this.unit.validate(t),this.#t=t}get duration(){return this.value*this.unit.duration}#e(t){if(this.constructor.name!==t.constructor.name)throw new ee(`${this.unit.name} "${this.toString()}" cannot be compared with ${t.unit?.name} "${t.toString()}"`)}compare(t){return this.#e(t),this.value-t.value}isEqual(t){return this.compare(t)===0}isBefore(t){return this.compare(t)<0}isAfter(t){return this.compare(t)>0}previous(t=this.unit){const e=this.value-1;return new this.constructor(e,t)}next(t=this.unit){const e=this.value+1;return new this.constructor(e,t)}toString(t=B.instance){return t.render(this)}toSpec(){return{value:this.value}}toJSON(){return this.toSpec()}}class d{static#t=new Map;static register(t,e){d.#t.set(t,e)}static get(t){const e=d.#t.get(t);if(!e)throw new U(`No default parser registered for ${t.name}: import "@rr0/time/defaults" or pass a parser to fromString()`);return e()}}class yt extends I{constructor(t=new Date().getFullYear(),e=l.year){super(t,e)}static fromString(t,e=d.get(yt)){return new yt(e.parse(t))}}class Y extends B{static default=new Y("0",2);constructor(t,e){super(),this.char=t,this.size=e}render(t){return super.render(t).padStart(this.size,this.char)}}class bt extends I{constructor(t=new Date().getMonth()+1,e=l.month){super(t,e)}static fromString(t,e=d.get(bt)){return new bt(e.parse(t))}toString(t=Y.default){return super.toString(t)}}class Gt extends I{constructor(t=new Date().getDate(),e=l.day){super(t,e)}static fromString(t,e=d.get(Gt)){const n=e.parse(t);return new Gt(n)}toString(t=Y.default){return super.toString(t)}}class xt extends I{constructor(t=new Date().getHours(),e=l.hour){super(t,e)}static fromString(t,e=d.get(xt)){return new xt(e.parse(t))}toString(t=Y.default){return super.toString(t)}}class Nt extends I{constructor(t=new Date().getMinutes(),e=l.minute){super(t,e)}static fromString(t,e=d.get(Nt)){return new Nt(e.parse(t))}toString(t=Y.default){return super.toString(t)}}class Et extends I{constructor(t=new Date().getSeconds(),e=l.second){super(t,e)}static fromString(t,e=d.get(Et)){return new Et(e.parse(t),l.second)}toString(t=Y.default){return super.toString(t)}}class ut extends I{static renderer=new Y("0",3);constructor(t,e=l.millisecond){super(t,e)}static parseFraction(t){return parseInt(t.padEnd(3,"0").substring(0,3),10)}toString(t=ut.renderer){return super.toString(t)}}class zn{render(t){return t.toString()}}class Un extends zn{render(t){const e=t.value,n=Math.abs(e),r=Math.floor(n/60),o=n%60;if(r===0&&o===0)return"Z";{const a=e<0?"-":"+",u=r.toString().padStart(2,"0"),p=o>0?":"+o.toString().padEnd(2,"0"):"";return a+u+p}}}class at{value;name="timeshift";renderer;constructor(t=0){this.value=t}static fromString(t,e=d.get(at),n=void 0){const r=e.parse(t,n);return new at(r)}toString(t=new Un){return t.render(this)}toSpec(){return{value:this.value}}toJSON(){return this.toSpec()}}class V{static timeshift(t,e){return t+(V.isDaylight(e)?60:0)}static isDaylight(t){const{year:e,month:n,day:r}=t,o=t.hour??12;if(![e,n,r].every(Number.isInteger))throw new RangeError("Daylight saving time depends on the year, month and day");const a=V.rule(e);if(!a)return!1;const u=V.rank(n,r,o);return u>=V.rank(a.start.month,a.start.day,2)&&u<V.rank(a.end.month,a.end.day,2)}static rule(t){if(t<1967)return;const e={month:10,day:V.sunday(t,10,-1)};return t>=2007?{start:{month:3,day:V.sunday(t,3,2)},end:{month:11,day:V.sunday(t,11,1)}}:t>=1987?{start:{month:4,day:V.sunday(t,4,1)},end:e}:t===1975?{start:{month:2,day:23},end:e}:t===1974?{start:{month:1,day:6},end:e}:{start:{month:4,day:V.sunday(t,4,-1)},end:e}}static sunday(t,e,n){const r=new Date(Date.UTC(2e3,e-1,1));r.setUTCFullYear(t);const o=1+(7-r.getUTCDay())%7;if(n>0)return o+7*(n-1);const a=[31,V.isLeap(t)?29:28,31,30,31,30,31,31,30,31,30,31][e-1];let u=o;for(;u+7<=a;)u+=7;return u}static isLeap(t){return t%4===0&&(t%100!==0||t%400===0)}static rank(t,e,n){return(t*100+e)*100+n}}const Cn={name:"PST",timeshift:"-08",title:"Pacific Standard Time (US)"},qn={name:"PDT",timeshift:"-07",title:"Pacific Daylight Time (US)"},Bn={name:"MDT",timeshift:"-06",title:"Mountain Standard Time (US)"},Hn={name:"MST",timeshift:"-07",title:"Mountain Daylight Time (US)"},On={name:"PT",timeshift:s=>V.timeshift(-480,s),title:"Pacific Time (US)"},Yn={name:"MT",timeshift:s=>V.timeshift(-420,s),title:"Mountain Time (US)"},Xn={name:"CT",timeshift:s=>V.timeshift(-360,s),title:"Central Time (US)"},Wn={name:"ET",timeshift:s=>V.timeshift(-300,s),title:"Eastern Time (US)"},Jn={name:"CWT",timeshift:"-05",title:"Central War Time (US)"},Kn={name:"CDT",timeshift:"-05",title:"Central Daylight Time"},Zn={name:"EST",timeshift:"-05",title:"Eastern Standard Time (US)"},Qn={name:"EDT",timeshift:"-04",title:"Eastern Time (US)"},Dn={name:"AST",timeshift:"-04",title:"Atlantic Standard Time (US)"},Pn={name:"ADT",timeshift:"-03",title:"Atlantic Daylight Time (US)"},Ln={name:"UTC",timeshift:"Z",title:"Coordinated Universal Time"},_n={name:"Z",timeshift:"Z",title:"UTC"},tr={name:"GMT",timeshift:"Z",title:"Greenwich Mean Time"},er={name:"BST",timeshift:"+01",title:"British Summer Time"},nr={name:"CEST",timeshift:"+02",title:"Central European Summer Time"},rr={name:"CET",timeshift:"+01",title:"Central European Time"},sr={name:"MSK",timeshift:"+03",title:"Moscow Time (RU)"},or={name:"IST",timeshift:"+05:30",title:"Indian Standard Time"},ir={name:"BJT",timeshift:"+08",title:"Beijing Time"},ar={name:"CST",timeshift:"-06",title:"Central Standard Time"},ur={name:"JST",timeshift:"+09",title:"Japan Standard Time"},cr={name:"AEST",timeshift:"+10",title:"Australian Eastern Standard Time"},mr={name:"NZST",timeshift:"+12",title:"New Zealand Standard Time"},dr={name:"LST",timeshift:"?",title:"Local Sideral Time"},ke=[Pn,cr,Dn,ir,er,ar,Kn,rr,nr,Xn,Jn,Qn,Zn,Wn,tr,or,ur,dr,Bn,sr,Hn,Yn,mr,qn,Cn,On,Ln,_n];class ne{static instance=new ne;renderComponent(t,e){return t[e].toString()}renderSecond(t){return this.renderComponent(t,"second")+(t.millisecond?"."+t.millisecond.toString():"")}render(t){const e=[];t.year&&e.push(this.renderComponent(t,"year")),t.month&&e.push(this.renderComponent(t,"month")),t.day&&e.push(this.renderComponent(t,"day"));const n=[];t.hour&&n.push(this.renderComponent(t,"hour")),t.minute&&n.push(this.renderComponent(t,"minute")),t.second&&n.push(this.renderSecond(t));const r=e.join("-"),o=t.timeshift?t.timeshift.toString():"",a=n.join(":")+o;return r+(a.length>0?"T"+a:"")}}class ct extends U{constructor(t="method is abstract"){super(t)}}class ye{units;constructor(t){this.units=t}newYear(t){throw new ct}newMonth(t){throw new ct}newDay(t){throw new ct}newHour(t){throw new ct}newMinute(t){throw new ct}newSecond(t){throw new ct}}class pr extends Se{millisecond=new N("milliseconds",Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,void 0);second=new N("seconds",Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,this.millisecond);minute=new N("minutes",Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,this.second);hour=new N("hours",Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,this.minutes);day=new N("days",Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,this.hour);month=new N("months",Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,this.day);year=new N("years",Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,this.month)}const Qt=new pr;class re{static instance=new re;render(t){const e=q.toSpec(t);let n="P";const r=e.years;r&&(n+=r.toString()+"Y");const o=e.months;o&&(n+=o.toString(B.instance)+"MM");const a=e.days;a&&(n+=a.toString(B.instance)+"D");const u=e.hours;u&&(n+=u.toString(B.instance)+"H");const p=e.minutes;p&&(n+=p.toString(B.instance)+"M");const c=e.seconds;return c&&(n+=c.toString(B.instance)+"S"),n}}class q extends I{constructor(t={years:new Date().getFullYear(),months:new Date().getMonth(),days:new Date().getDate(),hours:new Date().getHours(),minutes:new Date().getMinutes(),seconds:new Date().getSeconds(),milliseconds:new Date().getMilliseconds()}){super({value:typeof t=="number"?t:+(t.years?t.years*l.year.duration:0)+(t.months?t.months*l.month.duration:0)+(t.days?t.days*l.day.duration:0)+(t.hours?t.hours*l.hour.duration:0)+(t.minutes?t.minutes*l.minute.duration:0)+(t.seconds?t.seconds*l.second.duration:0)},new N("millisecond",0,Number.MAX_SAFE_INTEGER,void 0))}static toSpec(t,e=lr){let n=typeof t=="number"?t:t.value;const r=n>0?1:-1;n=Math.abs(n);const o={},a=n/l.year.duration,u=Math.floor(a);u>0&&(o.years=e.newYear(r*u),n-=u*l.year.duration);const p=n/l.month.duration,c=Math.floor(p);c>0&&(o.months=e.newMonth(r*c),n-=c*l.month.duration);const f=n/l.day.duration,m=Math.floor(f);m>0&&(o.days=e.newDay(r*m),n-=m*l.day.duration);const b=n/l.hour.duration,g=Math.floor(b);g>0&&(o.hours=e.newHour(r*g),n-=g*l.hour.duration);const G=n/l.minute.duration,S=Math.floor(G);S>0&&(o.minutes=e.newMinute(r*S),n-=S*l.minute.duration);const F=n/l.second.duration,M=Math.floor(r*F);return M>0&&(o.seconds=e.newSecond(M)),o}static fromString(t,e=d.get(q)){return new q(e.parse(t))}static between(t,e){const n=e.getTime(),r=t.getTime();return new q(n-r)}toSpec(){return q.toSpec(this)}toString(t=re.instance){return t.render(this)}}class kn extends ye{constructor(t){super(t)}newYear(t){return new yt(t,this.units.year)}newMonth(t){return new bt(t,this.units.month)}newDay(t){return new Gt(t,this.units.day)}newHour(t){return new xt(t,this.units.hour)}newMinute(t){return new Nt(t,this.units.minute)}newSecond(t){return new Et(t,this.units.second)}newMillisecond(t){return new ut(t,this.units.millisecond)}newTimeshift(t){return new at(typeof t=="number"?t:t.value)}}const hr=new kn(l),lr=new kn(Qt);class R{#t;#e;#n;#r;#s;#o;#i;#a;constructor(t={year:new Date().getFullYear(),month:new Date().getMonth()+1,day:new Date().getDate(),hour:new Date().getHours(),minute:new Date().getMinutes(),second:new Date().getSeconds(),timeshift:R.timeshiftOf(new Date)}){this.year=t.year,this.month=t.month,this.day=t.day,this.hour=t.hour,this.minute=t.minute,this.second=t.second,this.millisecond=t.millisecond,this.timeshift=t.timeshift}get year(){return this.#t}set year(t){const e=typeof t=="number";this.#t&&e?this.#t.value=t:this.#t=e?this.factory.newYear(t):!t||t.start||t instanceof I?t:this.factory.newYear(t)}get month(){return this.#e}set month(t){const e=typeof t=="number";this.#e&&e?this.#e.value=t:this.#e=e?this.factory.newMonth(t):!t||t.start||t instanceof I?t:this.factory.newMonth(t)}get day(){return this.#n}set day(t){const e=typeof t=="number";this.#n&&e?this.#n.value=t:this.#n=e?this.factory.newDay(t):!t||t.start||t instanceof I?t:this.factory.newDay(t)}get hour(){return this.#r}set hour(t){const e=typeof t=="number";this.#r&&e?this.#r.value=t:this.#r=e?this.factory.newHour(t):!t||t.start||t instanceof I?t:this.factory.newHour(t)}get minute(){return this.#s}set minute(t){const e=typeof t=="number";this.#s&&e?this.#s.value=t:this.#s=e?this.factory.newMinute(t):!t||t.start||t instanceof I?t:this.factory.newMinute(t)}get second(){return this.#o}set second(t){const e=typeof t=="number";this.#o&&e?this.#o.value=t:this.#o=e?this.factory.newSecond(t):!t||t.start||t instanceof I?t:this.factory.newSecond(t)}get millisecond(){return this.#i}set millisecond(t){const e=typeof t=="number";this.#i&&e?this.#i.value=t:this.#i=e||t&&!(t instanceof I)?this.factory.newMillisecond(t):t}get timeshift(){return this.#a}set timeshift(t){const e=typeof t=="number";this.#a&&e?this.#a.value=t:this.#a=e||t&&!(t instanceof at)?this.factory.newTimeshift(t):t}get factory(){return hr}static fromString(t,e=d.get(R)){const{year:n,month:r,day:o,hour:a,minute:u,second:p,millisecond:c,timeshift:f}=e.parse(t);return new R({year:n,month:r,day:o,hour:a,minute:u,second:p,millisecond:c,timeshift:f})}static timeshiftOf(t){return-t.getTimezoneOffset()||0}static fromDate(t){return new R({year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes(),second:t.getSeconds(),timeshift:R.timeshiftOf(t)})}static newInstance(){const t=new Date().toISOString(),e=t.indexOf("."),n=t.substring(0,e)+t.substring(e+4);return R.fromString(n)}#u(t){if(this.constructor.name!==t.constructor.name)throw new ee(`Date "${this.toString()}" cannot be compared with "${t.toString()}"`)}compare(t){return this.#u(t),this.getTime()-t.getTime()}delta(t){const e=this.compare(t);return new q(e)}getTime(){return(this.year?.duration||0)+(this.month?.duration||0)+(this.day?.duration||0)+(this.hour?.duration||0)+(this.minute?.duration||0)+(this.second?.duration||0)+(this.millisecond?.duration||0)}isEqual(t){return this.compare(t)===0}isBefore(t){return this.compare(t)<0}isAfter(t){return this.compare(t)>0}clone(){return new R(this.toSpec())}previous(){let t=this.clone();try{t.second=this.second.previous()}catch{try{t.minute=this.minute.previous()}catch{try{t.hour=this.hour.previous()}catch{try{t.day=this.day.previous()}catch{try{t.month=this.month.previous()}catch{t.year=this.year.previous()}}}}}return t}next(){let t=this.clone();try{t.second=this.second.next()}catch{try{t.minute=this.minute.next()}catch{try{t.hour=this.hour.next()}catch{try{t.day=this.day.next()}catch{try{t.month=this.month.next()}catch{t.year=this.year.next()}}}}}return t}toString(t=ne.instance){return t.render(this)}toSpec(){const t={},e=this.year?.toSpec();e&&(t.year=e);const n=this.month?.toSpec();n&&(t.month=n);const r=this.day?.toSpec();r&&(t.day=r);const o=this.hour?.toSpec();o&&(t.hour=o);const a=this.minute?.toSpec();a&&(t.minute=a);const u=this.second?.toSpec();u&&(t.second=u);const p=this.millisecond?.toSpec();p&&(t.millisecond=p);const c=this.timeshift?.toSpec();return c&&(t.timeshift=c),t}toJSON(){return this.toSpec()}}class be{static instance=new be;render(t){return(t.start?t.start.toString():"")+"/"+(t.end?t.end.toString():"")}}class kt{constructor(t,e){this.start=t,this.end=e}_start;get start(){return this._start}set start(t){if(typeof t=="string"&&(t=R.fromString(t)),t&&!(t instanceof R)&&!(t instanceof q))throw new U("Interval start is not a level 0 date or duration: "+t);this._start=t}_end;get end(){return this._end}set end(t){if(typeof t=="string"&&(t=R.fromString(t)),t&&!(t instanceof R)&&!(t instanceof q))throw new U("Interval end is not a level 0 date or duration: "+t);this._end=t}static fromString(t,e=d.get(kt)){const{start:n,end:r}=e.parse(t);return new kt(n,r)}toString(t=be.instance){return t.render(this)}[Symbol.iterator](){let t=this.start;return{next:()=>{const e={done:t>this.end,value:t};return t++,e}}}}class Dt extends B{static instance=new Dt(Y.default);constructor(t){super(),this.valueRenderer=t}render(t){return(this.valueRenderer?this.valueRenderer.render(t):super.render(t))+this.qualifier(t)}qualifier(t){return t.uncertain?t.approximate?"%":"?":t.approximate?"~":""}}class O extends I{#t;#e;constructor(t,e){super(t,e),this.#t=t.uncertain||!1,this.#e=t.approximate||!1}get uncertain(){return this.#t}set uncertain(t){return this.#t=t}get approximate(){return this.#e}set approximate(t){return this.#e=t}isCertainAndPrecise(){return!this.approximate&&!this.uncertain}isEqual(t){return this.isCertainAndPrecise()&&super.isEqual(t)}isBefore(t){return this.isCertainAndPrecise()&&super.isBefore(t)}isAfter(t){return this.isCertainAndPrecise()&&super.isAfter(t)}toString(t=Dt.instance){return super.toString(t)}toSpec(){return{...super.toSpec(),uncertain:this.uncertain,approximate:this.approximate}}toJSON(){return this.toSpec()}}class $n extends vn{year=new N("year",-9999,9999,this.month);yearExtended=new N("year",Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,this.month)}const Lt=new $n;class et extends O{constructor(t,e=Lt.year){super(t,e)}static fromString(t,e=Lt.year,n=d.get(et)){const r=n.parse(t),o=r.value.start;if(t.startsWith("Y")&&(e=Lt.yearExtended),o!==void 0){const a=new et(Object.assign({...r},{value:Math.max(o,e.min)})),u=new et(Object.assign({...r},{value:Math.min(r.value.end,e.max)}));return{start:a,end:u}}else return new et(r,e)}}class Rn extends ee{monthValidator=new An;validate(t){switch(t){case 21:case 22:case 23:case 24:return!0;default:return this.monthValidator.validate(t)}}}class nt extends O{constructor(t,e=new N(l.month.name,1,24,l.day,new Rn)){super(t,e)}static fromString(t,e=d.get(nt)){const n=e.parse(t),r=n.value.start;if(r!==void 0){let o=l.month;const a=new nt(Object.assign({...n},{value:Math.max(r,o.min)})),u=new nt(Object.assign({...n},{value:Math.min(n.value.end,o.max)}));return{start:a,end:u}}else return new nt(n)}toString(t){return super.toString(t).padStart(2,"0")}}class rt extends O{constructor(t,e=l.day){super(t,e)}static fromString(t,e=d.get(rt)){const n=e.parse(t),r=n.value.start;if(r!==void 0){let o=l.day;const a=new rt(Object.assign({...n},{value:Math.max(r,o.min)})),u=new rt(Object.assign({...n},{value:Math.min(n.value.end,o.max)}));return{start:a,end:u}}else return new rt(n)}toString(t){return super.toString(t).padStart(2,"0")}}class st extends O{constructor(t,e=l.hour){super(t,e)}static fromString(t,e=d.get(st)){const n=e.parse(t),r=n.value.start;if(r!==void 0){let o=l.hour;const a=new st(Object.assign({...n},{value:Math.max(r,o.min)})),u=new st(Object.assign({...n},{value:Math.min(n.value.end,o.max)}));return{start:a,end:u}}else return new st(n)}}class ot extends O{constructor(t,e=l.minute){super(t,e)}static fromString(t,e=d.get(ot)){const n=e.parse(t),r=n.value.start;if(r!==void 0){const o=l.minute,a=new ot(Object.assign({...n},{value:Math.max(r,o.min)})),u=new ot(Object.assign({...n},{value:Math.min(n.value.end,o.max)}));return{start:a,end:u}}else return new ot(n)}toString(t=Dt.instance){return super.toString(t)}}class it extends O{constructor(t,e=l.second){super(t,e)}static fromString(t,e=d.get(it)){const n=e.parse(t),r=n.value.start;if(r!==void 0){const o=l.second,a=new it(Object.assign({...n},{value:Math.max(r,o.min)})),u=new it(Object.assign({...n},{value:Math.min(n.value.end,o.max)}));return{start:a,end:u}}else return new it(n)}}class pt extends at{static fromString(t,e=d.get(pt),n=void 0){return new pt(e.parse(t,n))}}class Fn extends ye{constructor(t){super(t)}newYear(t){return new et(t,this.units.year)}newMonth(t){return new nt(t,this.units.month)}newDay(t){return new rt(t,this.units.day)}newHour(t){return new st(t,this.units.hour)}newMinute(t){return new ot(t,this.units.minute)}newSecond(t){return new it(t,this.units.second)}newMillisecond(t){return new ut(t,this.units.millisecond)}newTimeshift(t){return new pt(typeof t=="number"?t:t.value)}}const fr=new Fn(Lt),gr=new Fn(Qt);class j extends R{constructor(t){super(t)}get factory(){return fr}get uncertain(){return this.year?.uncertain===!0||this.month?.uncertain===!0||this.day?.uncertain===!0||this.hour?.uncertain===!0||this.minute?.uncertain===!0||this.second?.uncertain===!0}get approximate(){return this.year?.approximate===!0||this.month?.approximate===!0||this.day?.approximate===!0||this.hour?.approximate===!0||this.minute?.approximate===!0||this.second?.approximate===!0}static fromDate(t){return new j({year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes(),second:t.getSeconds(),timeshift:R.timeshiftOf(t)})}static fromString(t,e=d.get(j)){const n=e.parse(t);return new j(n)}static newInstance(){const t=new Date().toISOString(),e=t.indexOf("."),n=t.substring(0,e)+t.substring(e+4);return j.fromString(n)}clone(){return new j(this.toSpec())}}const $=Object.freeze({year:"year",month:"month",day:"day",hour:"hour",minute:"minute",second:"second",timeshift:"timeshift",uncertain:"uncertain",approximate:"approx"});class se extends re{static instance=new se;render(t){return super.render(t)}}class k extends O{constructor(t){super(typeof t=="number"||t.hasOwnProperty("value")?t:{value:k.getValue(t,$.year)+k.getValue(t,$.month)+k.getValue(t,$.day)+k.getValue(t,$.hour)+k.getValue(t,$.minute)+k.getValue(t,$.second),uncertain:k.getBoolean(t,$.uncertain),approximate:k.getBoolean(t,"approximate")},Qt.millisecond)}static getBoolean(t,e){return t[e]||t[$.year+"s"]?.[e]||t[$.month+"s"]?.[e]||t[$.day+"s"]?.[e]||t[$.hour+"s"]?.[e]||t[$.minute+"s"]?.[e]||t[$.second+"s"]?.[e]||!1}static getValue(t,e){let n=0,r=t[e+"s"];if(r instanceof O?r=r.value:typeof t=="number"&&(r=t),r){const o=l[e];n=r*o.duration}return n}static toSpec(t,e=gr){return{...q.toSpec(t,e),uncertain:t.uncertain||!1,approximate:t.approximate||!1}}static fromString(t,e=d.get(k)){const n=e.parse(t);return new k(n)}static between(t,e){const n=e.getTime(),r=t.getTime();return new k(n-r)}toString(t=se.instance){return super.toString(t)}toSpec(){return k.toSpec(this)}}class $t extends kt{constructor(t,e){super(t,e)}get start(){return this._start}set start(t){if(typeof t=="string"&&(super.start=j.fromString(t)),t&&!(t instanceof j)&&!(t instanceof k))throw new U("Interval start is not a level 1 date or duration: "+t);this._start=t}get end(){return this._end}set end(t){if(typeof t=="string"&&(t=j.fromString(t)),t&&!(t instanceof j)&&!(t instanceof k))throw new U("Interval end is not a level 1 date or duration: "+t);this._end=t}static fromString(t,e=d.get($t)){const{start:n,end:r}=e.parse(t);return new $t(n,r)}}class Mt extends O{uncertainComponent;approximateComponent;constructor(t,e){super(t,e),this.uncertainComponent=t.uncertainComponent||!1,this.approximateComponent=t.approximateComponent||!1}get uncertain(){return super.uncertain||this.uncertainComponent}set uncertain(t){return super.uncertain=t}get approximate(){return super.approximate||this.approximateComponent}set approximate(t){return super.approximate=t}get uncertainGroup(){return super.uncertain}get approximateGroup(){return super.approximate}toSpec(){return{...super.toSpec(),uncertain:this.uncertainGroup,approximate:this.approximateGroup,uncertainComponent:this.uncertainComponent,approximateComponent:this.approximateComponent}}toJSON(){return this.toSpec()}}class wr extends $n{year=new N("year",Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,this.month)}const we=new wr;class W extends Mt{constructor(t,e=we.year){super(t,e)}static fromString(t,e=we.year,n=d.get(W)){const r=n.parse(t),o=r.value.start;if(o!==void 0){const a=new W(Object.assign({...r},{value:Math.max(o,e.min)})),u=new W(Object.assign({...r},{value:Math.min(r.value.end,e.max)})),p={start:a,end:u},c=r.value.estimate;return c&&(p.estimate=c),p}else return new W(r)}}class Sr extends Rn{validate(t){switch(t){case 25:case 26:case 27:case 28:case 29:case 30:case 31:case 32:case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:return!0;default:return super.validate(t)}}}class J extends Mt{constructor(t,e=new N(l.month.name,1,41,l.day,new Sr)){super(t,e)}static fromString(t,e=d.get(J)){const n=e.parse(t),r=n.value.start;if(r!==void 0){const o=l.month,a=new J(Object.assign({...n},{value:Math.max(r,o.min)})),u=new J(Object.assign({...n},{value:Math.min(n.value.end,o.max)}));return{start:a,end:u}}else return new J(n)}toString(t){return super.toString(t).padStart(2,"0")}}class K extends Mt{constructor(t,e=l.day){super(t,e)}static fromString(t,e=d.get(K)){const n=e.parse(t),r=n.value.start;if(r!==void 0){const o=l.day,a=new K(Object.assign({...n},{value:Math.max(r,o.min)})),u=new K(Object.assign({...n},{value:Math.min(n.value.end,o.max)}));return{start:a,end:u}}else return new K(n)}toString(t){return super.toString(t).padStart(2,"0")}}class Z extends Mt{constructor(t,e=l.hour){super(t,e)}static fromString(t,e=d.get(Z)){const n=e.parse(t),r=n.value.start;if(r!==void 0){const o=l.hour,a=new Z(Object.assign({...n},{value:Math.max(r,o.min)})),u=new Z(Object.assign({...n},{value:Math.min(n.value.end,o.max)}));return{start:a,end:u}}else return new Z(n)}}class Q extends Mt{constructor(t,e=l.minute){super(t,e)}static fromString(t,e=d.get(Q)){const n=e.parse(t),r=n.value.start;if(r!==void 0){const o=l.minute,a=new Q(Object.assign({...n},{value:Math.max(r,o.min)})),u=new Q(Object.assign({...n},{value:Math.min(n.value.end,o.max)}));return{start:a,end:u}}else return new Q(n)}}class D extends Mt{constructor(t,e=l.second){super(t,e)}static fromString(t,e=l.second,n=d.get(D)){const r=n.parse(t),o=r.value.start;if(o!==void 0){const a=new D(Object.assign({...r},{value:Math.max(o,e.min)})),u=new D(Object.assign({...r},{value:Math.min(r.value.end,e.max)}));return{start:a,end:u}}else return new D(r,e)}}class Vn extends pt{}class yr extends Dt{qualifier(){return""}}class _ extends ne{static instance=new _;static valueRenderer=new yr(Y.default);static names=["year","month","day","hour","minute","second"];static qualifier(t,e){return t?e?"%":"?":e?"~":""}renderComponent(t,e){const n=t[e],r=_.names.slice(_.names.indexOf(e)+1).map(u=>t[u]).filter(Boolean),o=_.qualifier(n.uncertainComponent,n.approximateComponent),a=_.qualifier(n.uncertainGroup&&!n.uncertainComponent&&!r.some(u=>u.uncertain),n.approximateGroup&&!n.approximateComponent&&!r.some(u=>u.approximate));return o+n.toString(_.valueRenderer)+a}}class In extends ye{constructor(t){super(t)}newYear(t){return new W(t,this.units.year)}newMonth(t){return new J(t,this.units.month)}newDay(t){return new K(t,this.units.day)}newHour(t){return new Z(t,this.units.hour)}newMinute(t){return new Q(t,this.units.minute)}newSecond(t){return new D(t,this.units.second)}newMillisecond(t){return new ut(t,this.units.millisecond)}newTimeshift(t){return new Vn(typeof t=="number"?t:t.value)}}const br=new In(we),Gr=new In(Qt);class z extends j{constructor(t){super(t)}toString(t=_.instance){return super.toString(t)}get year(){return super.year}set year(t){super.year=t}get month(){return super.month}set month(t){super.month=t}get factory(){return br}static fromDate(t){return new z({year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes(),second:t.getSeconds(),timeshift:R.timeshiftOf(t)})}static fromString(t,e=d.get(z)){const n=e.parse(t);return new z(n)}static newInstance(){const t=new Date().toISOString(),e=t.indexOf("."),n=t.substring(0,e)+t.substring(e+4);return z.fromString(n)}clone(){return new z(this.toSpec())}}class P{regExp;constructor(t,e){this.name=t,this.regExp=new RegExp(`^(?:${e})$`)}regexGroups(t){const e=this.regExp.exec(t);if(!e)throw new U(`Invalid ${this.name} "${t}"`);return e.groups}parseGroups(t){throw new ct(`${this.constructor.name} is abstract`)}parse(t){const e=this.regexGroups(t);return this.parseGroups(e)}}class gt extends se{static instance=new gt;static designators=[["years","Y"],["months","MM"],["days","D"],["hours","H"],["minutes","M"],["seconds","S"]];static qualifier(t,e){return t?e?"%":"?":e?"~":""}render(t){const e=gt.qualifier(t.uncertainDuration,t.approximateDuration);if(!t.hasQualifiedComponent)return e+super.render(t);let n=e+"P";for(const[r,o]of gt.designators){const a=t.components[r];a&&(n+=gt.qualifier(a.uncertainComponent,a.approximateComponent)+a.value+o)}return n}}class A extends k{#t;constructor(t){if(super(typeof t=="number"?t:{value:A.valueFromSpec(t),uncertain:t.uncertain===!0,approximate:t.approximate===!0},Qt.millisecond),typeof t!="number"){const e={};for(const n of A.componentNames)t[n]instanceof O&&(e[n]=t[n]);Object.keys(e).length>0&&(this.#t=e)}}static componentNames=["years","months","days","hours","minutes","seconds"];get components(){return this.#t}#e(t){return this.#t?Object.values(this.#t).some(e=>e[t]):!1}get uncertainDuration(){return super.uncertain}get approximateDuration(){return super.approximate}get uncertain(){return super.uncertain||this.#e("uncertain")}set uncertain(t){super.uncertain=t}get approximate(){return super.approximate||this.#e("approximate")}set approximate(t){super.approximate=t}get hasQualifiedComponent(){return this.#t?Object.values(this.#t).some(t=>t.uncertainComponent||t.approximateComponent):!1}static valueFromSpec(t){return A.getValue(t,$.year)+A.getValue(t,$.month)+A.getValue(t,$.day)+A.getValue(t,$.hour)+A.getValue(t,$.minute)+A.getValue(t,$.second)}static toSpec(t,e=Gr){const n=k.toSpec(t,e);if(t instanceof A&&t.hasQualifiedComponent)for(const r of A.componentNames)delete n[r],t.components[r]&&(n[r]=t.components[r]);return n}static fromString(t,e=d.get(A)){const n=e.parse(t);return new A(n)}static between(t,e){const n=e.getTime(),r=t.getTime();return new A(n-r)}toSpec(){return A.toSpec(this)}toString(t=gt.instance){return super.toString(t)}}class Rt extends $t{get start(){return this._start}set start(t){if(typeof t=="string"&&(super.start=z.fromString(t)),t&&!(t instanceof z)&&!(t instanceof A))throw new U("Interval start is not a level 2 date or duration: "+t);this._start=t}get end(){return this._end}set end(t){if(typeof t=="string"&&(t=z.fromString(t)),t&&!(t instanceof z)&&!(t instanceof A))throw new U("Interval end is not a level 2 date or duration: "+t);this._end=t}static fromString(t,e=d.get(Rt)){const{start:n,end:r}=e.parse(t);return new Rt(n,r)}}class _t extends Set{constructor(t,e){super(t),this.exclusive=e}has(t){const e=t.toString().replace("..","/");for(const n of this)if(n.toString()===e)return!0;return!1}static fromString(t,e=d.get(_t)){const{exclusive:n,values:r}=e.parse(t);return new _t(r,n)}}class L extends P{constructor(t,e){super(t,e)}static read(t){return{value:t?parseInt(t,10):void 0}}parseGroups(t){return L.read(t[this.name])}parse(t){if(t.startsWith("-"))throw new U(`${this.name} cannot be negative`);return super.parse(t)}}class i{static groupName(...t){return t.reduce((e,n)=>e?e+n.charAt(0).toUpperCase()+n.substring(1):n,"")}static group(t,...e){return`(?<${t}>${e.join("")})`}static optional(t){return t+"?"}static nonCapturingGroup(...t){return`(?:${t.join("")})`}static optionalGroup(t,...e){return i.optional(i.group(t,...e))}static optionalNonCapturingGroup(...t){return i.optional(i.nonCapturingGroup(...t))}static numberGroup(t,e,n,r="\\d"){return i.group(t,`${n||""}[${r}]${e}`)}}const $e="yearValue";class Ft extends L{static format(t=""){return i.numberGroup(i.groupName(t,$e),"{4}",void 0)}constructor(){super($e,Ft.format())}}const Re="monthValue";class Vt extends L{static format(t=""){return i.numberGroup(i.groupName(t,Re),"{1,2}",void 0)}constructor(){super(Re,Vt.format())}}const Fe="dayValue";class wt extends L{static format(t=""){return i.numberGroup(i.groupName(t,Fe),"{1,2}",void 0)}constructor(){super(Fe,wt.format())}}const Ve="hourValue";class St extends L{static format(t=""){return i.numberGroup(i.groupName(t,Ve),"{1,2}",void 0)}constructor(){super(Ve,St.format())}}const Ie="minuteValue";class It extends L{static format(t=""){return i.numberGroup(i.groupName(t,Ie),"{1,2}",void 0)}constructor(){super(Ie,It.format())}}const je="secondValue";class jt extends L{static format(t=""){return i.numberGroup(i.groupName(t,je),"{1,2}",void 0)}constructor(){super(je,jt.format())}}const ze="timeshiftValue",Ue="shiftHour",Ce="shiftMinute";class Tt extends P{static format(t=""){return ke.map(e=>e.name).join("|")+"|"+i.nonCapturingGroup(i.group(t+Ue,i.numberGroup(i.groupName(t,ze),"{2}","[+-]")),i.optionalNonCapturingGroup(":?",i.numberGroup(i.groupName(t,Ce),"{2}",void 0)))}constructor(){super(ze,Tt.format())}parse(t,e){let n=0;const r=ke.find(o=>o.name===t);if(r){if(typeof r.timeshift=="function")try{return r.timeshift(e??{})}catch(o){throw new U(`The time zone ${t} depends on the date: ${o.message}`)}t=r.timeshift}if(t!=="Z"){const o=this.regexGroups(t),a=o[Ue];a&&(n+=parseInt(a,10)*60);const u=o[Ce];u&&(n+=parseInt(u,10))}return n}}const qe="year",Be="month",He="day",Oe="hour",Ye="minute",Xe="second",We="millisecond",Je="timeshift";class mt extends P{static format(t=""){return i.group(i.groupName(t,qe),Ft.format(t))+i.optionalNonCapturingGroup("-",i.group(i.groupName(t,Be),Vt.format(t)),i.optionalNonCapturingGroup("-",i.group(i.groupName(t,He),wt.format(t)),i.optionalNonCapturingGroup("[T ]",i.group(i.groupName(t,Oe),St.format(t)),":?",i.group(i.groupName(t,Ye),It.format(t)),i.optionalNonCapturingGroup(":",i.group(i.groupName(t,Xe),jt.format(t)),i.optionalNonCapturingGroup("[.,]",i.group(i.groupName(t,We),"\\d+"))),"\\s*",i.optionalGroup(i.groupName(t,Je),Tt.format(t)))))}constructor(){super("date",mt.format())}parse(t){const e=this.regexGroups(t),n=e[qe],r=e[Be],o=e[He],a=e[Oe],u=e[Ye],p=e[Xe],c=e[We],f=e[Je],m=n?new yt(Ft.read(n)):void 0,b=r?Vt.read(r):void 0;return{year:m,month:b?new bt(b,ft.create(b.value,m?.value)):void 0,day:o?new Gt(wt.read(o)):void 0,hour:a?new xt(St.read(a)):void 0,minute:u?new Nt(It.read(u)):void 0,second:p?new Et(jt.read(p)):void 0,millisecond:c?ut.parseFraction(c):void 0,timeshift:f?at.fromString(f,new Tt,{year:m?.value,month:b?.value,day:o?wt.read(o).value:void 0,hour:a?St.read(a).value:void 0}):void 0}}}const Ke="years",ie="months",xr="days",Ze="hours",Qe="minutes",De="seconds";class Ge extends P{static format(t=""){return"P"+i.optionalNonCapturingGroup(i.numberGroup(i.groupName(t,Ke),"+",void 0,"\\d"),"Y")+i.optionalNonCapturingGroup(i.numberGroup(i.groupName(t,ie),"+",void 0,"\\d"),"MM")+i.optionalNonCapturingGroup(i.numberGroup(i.groupName(t,xr),"+",void 0,"\\d"),"D")+i.optionalNonCapturingGroup(i.numberGroup(i.groupName(t,Ze),"+",void 0,"\\d"),"H")+i.optionalNonCapturingGroup(i.numberGroup(i.groupName(t,Qe),"+",void 0,"\\d"),"M")+i.optionalNonCapturingGroup(i.numberGroup(i.groupName(t,De),"+",void 0,"\\d"),"S")}constructor(){super("duration",Ge.format())}parseGroups(t){return{years:t[Ke],months:t[ie],days:t[ie],hours:t[Ze],minutes:t[Qe],seconds:t[De]}}}const ae="start",ue="end";class xe extends P{static format=i.group(ae,mt.format(ae))+"/"+i.group(ue,mt.format(ue));constructor(){super("interval",xe.format)}parse(t){const e=this.regexGroups(t),n=e[ae],r=e[ue];return{start:n?R.fromString(n,new mt):void 0,end:r?R.fromString(r,new mt):void 0}}}d.register(R,()=>new mt);d.register(Gt,()=>new wt);d.register(q,()=>new Ge);d.register(xt,()=>new St);d.register(kt,()=>new xe);d.register(Nt,()=>new It);d.register(bt,()=>new Vt);d.register(Et,()=>new jt);d.register(at,()=>new Tt);d.register(yt,()=>new Ft);class E extends L{static uncertainGroup="uncertain";static approximateGroup="approx";static uncertainAndApproximateGroup=E.uncertainGroup+E.approximateGroup;constructor(t,e){super(t,e)}static qualifierFormat(t,e){return i.optionalGroup(t,`\\${e}`)}static formatSuffix(t){return this.qualifierFormat(i.groupName(E.uncertainGroup,t),"?")+this.qualifierFormat(i.groupName(E.approximateGroup,t),"~")+this.qualifierFormat(i.groupName(E.uncertainAndApproximateGroup,t),"%")}static numberFormat(t,e,n){return i.numberGroup(t,e,n,"\\dX")+this.formatSuffix(t)}getValueAndSign(t){let e=t[this.name],n;return e.charAt(0)==="-"?(n=-1,e=e.substring(1)):n=1,{valueStr:e,sign:n}}parseGroups(t){const{valueStr:e,sign:n}=this.getValueAndSign(t);let r=0,o;for(o=0;o<e.length;o++){const c=e[o];if(c==="X")break;r=r*10+parseInt(c,10)}if(o<e.length){let c=1;for(let b=0;b<e.length-o;b++)c*=10;const f=n*r*c,m=f+c-1;r={start:f,end:m}}else r*=n;const a=t[i.groupName(E.uncertainAndApproximateGroup,this.name)],u=t[i.groupName(E.approximateGroup,this.name)]||a,p=t[i.groupName(E.uncertainGroup,this.name)]||a;return{value:r,approximate:u?!!u:!1,uncertain:p?!!p:!1}}}const Pe="yearValue";class zt extends E{constructor(){super(Pe,zt.format())}static format(t=""){return"Y?"+E.numberFormat(i.groupName(t,Pe),"+","[-]?")}parse(t){const e=this.regexGroups(t);return this.parseGroups(e)}}const Le="monthValue";class Ut extends E{static format(t=""){return E.numberFormat(i.groupName(t,Le),"{1,2}",void 0)}constructor(){super(Le,Ut.format())}}const _e="dayValue";class Ct extends E{static format(t=""){return E.numberFormat(i.groupName(t,_e),"{1,2}",void 0)}constructor(){super(_e,Ct.format())}}const tn="hourValue";class qt extends E{static format(t=""){return E.numberFormat(i.groupName(t,tn),"{1,2}",void 0)}constructor(){super(tn,qt.format())}}const en="minuteValue";class Bt extends E{static format(t=""){return E.numberFormat(i.groupName(t,en),"{1,2}",void 0)}constructor(){super(en,Bt.format())}}const nn="secondValue";class Ht extends E{static format(t=""){return E.numberFormat(i.groupName(t,nn),"{1,2}",void 0)}constructor(){super(nn,Ht.format())}}class Ot extends Tt{}class T extends P{static yearGroup="year";static monthGroup="month";static dayGroup="day";static hourGroup="hour";static minuteGroup="minute";static secondGroup="second";static millisecondGroup="millisecond";static timeshiftGroup="timeshift";constructor(t=T.format()){super("date",t)}static format(t=""){return i.group(i.groupName(t,T.yearGroup),zt.format(t))+i.optionalNonCapturingGroup("-",i.group(i.groupName(t,T.monthGroup),Ut.format(t)),i.optionalNonCapturingGroup("-",i.group(i.groupName(t,T.dayGroup),Ct.format(t)),i.optionalNonCapturingGroup("[T ]",i.group(i.groupName(t,T.hourGroup),qt.format(t)),":",i.group(i.groupName(t,T.minuteGroup),Bt.format(t)),i.optionalNonCapturingGroup(":",i.group(i.groupName(t,T.secondGroup),Ht.format(t)),i.optionalNonCapturingGroup("[.,]",i.group(i.groupName(t,T.millisecondGroup),"\\d+"))),i.optionalGroup(i.groupName(t,T.timeshiftGroup),Ot.format(t)))))}parseGroups(t){const e=t[T.millisecondGroup],n=e?ut.parseFraction(e):void 0,r=t[T.secondGroup],o=r?it.fromString(r,new Ht):void 0,a=t[T.minuteGroup];let u;a&&(u=ot.fromString(a,new Bt),u.uncertain=u.uncertain||o?.uncertain||!1,u.approximate=u.approximate||o?.approximate||!1);const p=t[T.hourGroup];let c;p&&(c=st.fromString(p,new qt),c.uncertain=c.uncertain||u?.uncertain||!1,c.approximate=c.approximate||u?.approximate||!1);const f=t[T.dayGroup];let m;f&&(m=rt.fromString(f,new Ct),m.uncertain=m.uncertain||c?.uncertain||!1,m.approximate=m.approximate||c?.approximate||!1);const b=t[T.monthGroup];let g;b&&(g=nt.fromString(b,new Ut),g.uncertain=g.uncertain||m?.uncertain||!1,g.approximate=g.approximate||m?.approximate||!1);const G=t[T.yearGroup];let S;G&&(S=et.fromString(G,void 0,new zt),S.uncertain=S.uncertain||g?.uncertain||!1,S.approximate=S.approximate||g?.approximate||!1);const F=t[T.timeshiftGroup],M=F?pt.fromString(F,new Ot,{year:S?.value,month:g?.value,day:m?.value,hour:c?.value}):void 0;return{year:S,month:g,day:m,hour:c,minute:u,second:o,millisecond:n,timeshift:M}}}const rn="years",sn="months",on="days",an="hours",un="minutes",cn="seconds";class dt extends E{static format(t=""){return"P"+i.optionalNonCapturingGroup(i.numberGroup(i.groupName(t,rn),"+",void 0,"\\d"),"Y")+i.optionalNonCapturingGroup(i.numberGroup(i.groupName(t,sn),"+",void 0,"\\d"),"MM")+i.optionalNonCapturingGroup(i.numberGroup(i.groupName(t,on),"+",void 0,"\\d"),"D")+i.optionalNonCapturingGroup(i.numberGroup(i.groupName(t,an),"+",void 0,"\\d"),"H")+i.optionalNonCapturingGroup(i.numberGroup(i.groupName(t,un),"+",void 0,"\\d"),"M")+i.optionalNonCapturingGroup(i.numberGroup(i.groupName(t,cn),"+",void 0,"\\d"),"S")+this.formatSuffix(t)}constructor(){super("duration",dt.format())}parseGroups(t){return{years:t[rn],months:t[sn],days:t[on],hours:t[an],minutes:t[un],seconds:t[cn],uncertain:!!t[E.uncertainGroup],approximate:!!t[E.approximateGroup]}}}const Nr="dates",ce="start",me="end",mn="durations",de="durationMin",pe="durationMax";class Ne extends P{static format=i.group(Nr,i.optionalGroup(ce,i.group("openStart","\\.\\.")+"|"+T.format(ce))+"/"+i.optionalGroup(me,i.group("openEnd","\\.\\.")+"|"+T.format(me)))+"|"+i.group(mn,i.group(de,dt.format(de))+"/"+i.group(pe,dt.format(pe)));constructor(t="interval",e=Ne.format){super(t,e)}parseGroups(t){let e,n;if(t[mn]){const o=t[de];e=k.fromString(o,new dt);const a=t[pe];n=k.fromString(a,new dt)}else{const o=t[ce];switch(o){case void 0:e=null;break;case"..":e=void 0;break;default:e=j.fromString(o,new T)}const a=t[me];switch(a){case void 0:n=null;break;case"..":n=void 0;break;default:n=j.fromString(a,new T)}}return{start:e,end:n}}}d.register(j,()=>new T);d.register(rt,()=>new Ct);d.register(k,()=>new dt);d.register(st,()=>new qt);d.register($t,()=>new Ne);d.register(ot,()=>new Bt);d.register(nt,()=>new Ut);d.register(it,()=>new Ht);d.register(pt,()=>new Ot);d.register(et,()=>new zt);class y extends E{static uncertainGroup="uncertain1";static approximateGroup="approx1";static uncertainAndApproximateGroup=y.uncertainGroup+y.approximateGroup;constructor(t,e){super(t,e)}static numberFormat(t,e,n){return this.qualifierFormat(i.groupName(y.uncertainGroup,t),"?")+this.qualifierFormat(i.groupName(y.approximateGroup,t),"~")+this.qualifierFormat(i.groupName(y.uncertainAndApproximateGroup,t),"%")+E.numberFormat(t,e,n)}parseGroups(t){const e=super.parseGroups(t),n=t[i.groupName(y.uncertainAndApproximateGroup,this.name)];return(t[i.groupName(y.uncertainGroup,this.name)]||n)&&(e.uncertainComponent=!0),(t[i.groupName(y.approximateGroup,this.name)]||n)&&(e.approximateComponent=!0),e}}const At="yearValue",dn="exp",pn="signif";class Yt extends y{constructor(){super(At,Yt.format())}static format(t=""){return"Y?"+i.nonCapturingGroup(i.group(i.groupName(t,dn),"[-]?\\d+E\\d+")+"|"+y.numberFormat(i.groupName(t,At),"+","[-]?")+i.optionalGroup(i.groupName(t,pn),"S\\d+"))}parseGroups(t){const e=t[dn];if(e){const a=e.indexOf("E"),u=parseInt(e.substring(a+1),10),c=parseInt(e.substring(0,a),10)*Math.pow(10,u);t[At]=c.toString()}const n=t[pn],r=t[At];if(n){const a=parseInt(n.substring(1),10),{valueStr:u,sign:p}=this.getValueAndSign(t);let c="";for(let f=0;f<u.length;f++)c+=f<a?u.charAt(f):"X";t[At]=(p<0?"-":"")+c}const o=super.parseGroups(t);return n&&(o.value.estimate=parseInt(r,10)),o}parse(t){const e=this.regexGroups(t);return this.parseGroups(e)}}const hn="monthValue";class Xt extends y{static format(t=""){return y.numberFormat(i.groupName(t,hn),"{1,2}",void 0)}constructor(){super(hn,Xt.format())}}const ln="dayValue";class Wt extends y{static format(t=""){return y.numberFormat(i.groupName(t,ln),"{1,2}",void 0)}constructor(){super(ln,Wt.format())}}const fn="hourValue";class Jt extends y{static format(t=""){return y.numberFormat(i.groupName(t,fn),"{1,2}",void 0)}constructor(){super(fn,Jt.format())}}const gn="secondValue";class Kt extends y{static format(t=""){return y.numberFormat(i.groupName(t,gn),"{1,2}",void 0)}constructor(){super(gn,Kt.format())}}const wn="minuteValue";class Zt extends y{static format(t=""){return y.numberFormat(i.groupName(t,wn),"{1,2}",void 0)}constructor(){super(wn,Zt.format())}}class Er extends Ot{}class x extends P{static yearGroup=T.yearGroup;static monthGroup="month";static dayGroup="day";static hourGroup="hour";static minuteGroup="minute";static secondGroup="second";static millisecondGroup="millisecond";static timeshiftGroup="timeshift";constructor(){super("date",x.format())}static format(t=""){return i.group(i.groupName(t,x.yearGroup),Yt.format(t))+i.optionalNonCapturingGroup("-",i.group(i.groupName(t,x.monthGroup),Xt.format(t)),i.optionalNonCapturingGroup("-",i.group(i.groupName(t,x.dayGroup),Wt.format(t)),i.optionalNonCapturingGroup("[T ]",i.group(i.groupName(t,x.hourGroup),Jt.format(t)),":",i.group(i.groupName(t,x.minuteGroup),Zt.format(t)),i.optionalNonCapturingGroup(":",i.group(i.groupName(t,x.secondGroup),Kt.format(t)),i.optionalNonCapturingGroup("[.,]",i.group(i.groupName(t,x.millisecondGroup),"\\d+"))),i.optionalGroup(i.groupName(t,x.timeshiftGroup),Er.format(t)))))}parseGroups(t){const e=t[x.millisecondGroup],n=e?ut.parseFraction(e):void 0,r=t[x.secondGroup];let o;r&&(o=D.fromString(r,void 0,new Kt),o.uncertain=o?.uncertain||!1,o.approximate=o?.approximate||!1);const a=t[x.minuteGroup];let u;a&&(u=Q.fromString(a,new Zt),u.uncertain=u.uncertain||o?.uncertain||!1,u.approximate=u.approximate||o?.approximate||!1);const p=t[x.hourGroup];let c;p&&(c=Z.fromString(p,new Jt),c.uncertain=c.uncertain||u?.uncertain||!1,c.approximate=c.approximate||u?.approximate||!1);const f=t[x.dayGroup];let m;f&&(m=K.fromString(f,new Wt),m.uncertain=m.uncertain||c?.uncertain||!1,m.approximate=m.approximate||c?.approximate||!1);const b=t[x.monthGroup];let g;b&&(g=J.fromString(b,new Xt),g.uncertain=g.uncertain||m?.uncertain||!1,g.approximate=g.approximate||m?.approximate||!1);const G=t[x.yearGroup];let S;G&&(S=W.fromString(G,void 0,new Yt),S.uncertain=S.uncertain||g?.uncertain||!1,S.approximate=S.approximate||g?.approximate||!1);const F=t[x.timeshiftGroup],M=F?Vn.fromString(F,new Ot,{year:S?.value,month:g?.value,day:m?.value,hour:c?.value}):void 0;return{year:S,month:g,day:m,hour:c,minute:u,second:o,millisecond:n,timeshift:M}}}const Sn="durationValue";class Ee extends y{static format(t=""){return"^"+y.numberFormat(i.groupName(t,Sn),"+",void 0)}constructor(){super(Sn,Ee.format())}}class Tr extends Se{millisecond=new N("millisecond",0,Number.MAX_SAFE_INTEGER,void 0);second=new N("second",0,Number.MAX_SAFE_INTEGER,this.millisecond);minute=new N("minute",0,Number.MAX_SAFE_INTEGER,this.second);hour=new N("hour",0,Number.MAX_SAFE_INTEGER,this.minute);day=new N("day",1,Number.MAX_SAFE_INTEGER,this.hour);month=new N("month",1,Number.MAX_SAFE_INTEGER,this.day);year=new N("year",0,Number.MAX_SAFE_INTEGER,this.month)}const ht=new Tr;class h extends y{static yearsGroup="years";static monthsGroup="months";static isoMonthsGroup="isoMonths";static daysGroup="days";static hoursGroup="hours";static minutesGroup="minutes";static secondsGroup="seconds";static durationGroup="duration";static suffixGroup="durationSuffix";static componentParser=new Ee;static componentFormat(t,e,n,r,o=""){const a=i.group(i.groupName(t,h.quantityGroup(e)),y.numberFormat(i.groupName(t,n),"+",void 0,"\\d"));return i.group(i.groupName(t,e),a,r,o)}static quantityGroup(t){return t+"Quantity"}static isoMonthsLookahead="(?=[?~%]?\\d+D|T)";constructor(){super("duration",h.format())}static format(t=""){const e=i.groupName(t,h.durationGroup);return this.qualifierFormat(i.groupName(y.uncertainGroup,e),"?")+this.qualifierFormat(i.groupName(y.approximateGroup,e),"~")+this.qualifierFormat(i.groupName(y.uncertainAndApproximateGroup,e),"%")+"P"+i.optional(h.componentFormat(t,h.yearsGroup,x.yearGroup,"Y"))+i.optionalNonCapturingGroup(h.componentFormat(t,h.monthsGroup,x.monthGroup,"MM")+"|"+h.componentFormat(t,h.isoMonthsGroup,"isoMonth","M",h.isoMonthsLookahead))+i.optional(h.componentFormat(t,h.daysGroup,x.dayGroup,"D"))+"T?"+i.optional(h.componentFormat(t,h.hoursGroup,x.hourGroup,"H"))+i.optional(h.componentFormat(t,h.minutesGroup,x.minuteGroup,"M"))+i.optional(h.componentFormat(t,h.secondsGroup,x.secondGroup,"S"))+i.optionalGroup(i.groupName(t,h.suffixGroup),"[?~%]")}static parseComponent(t,e,n){const r=h.componentParser.parse(t);return new e(r,n)}parseGroups(t){const e=t[h.quantityGroup(h.secondsGroup)];let n;e&&(n=h.parseComponent(e,D,ht.second),n.uncertain=!!t[i.groupName(y.uncertainGroup,h.secondsGroup)]||!1,n.approximate=!!t[i.groupName(y.approximateGroup,h.secondsGroup)]||!1);const r=t[h.quantityGroup(h.minutesGroup)];let o;r&&(o=h.parseComponent(r,Q,ht.minute),o.uncertain=o.uncertain||n?.uncertain||!1,o.approximate=o.approximate||n?.approximate||!1);const a=t[h.quantityGroup(h.hoursGroup)];let u;a&&(u=h.parseComponent(a,Z,ht.hour),u.uncertain=u.uncertain||o?.uncertain||!1,u.approximate=u.approximate||o?.approximate||!1);const p=t[h.quantityGroup(h.daysGroup)];let c;p&&(c=h.parseComponent(p,K,ht.day),c.uncertain=c.uncertain||u?.uncertain||!1,c.approximate=c.approximate||u?.approximate||!1);const f=t[h.quantityGroup(h.monthsGroup)]||t[h.quantityGroup(h.isoMonthsGroup)];let m;f&&(m=h.parseComponent(f,J,ht.month),m.uncertain=m.uncertain||c?.uncertain||!1,m.approximate=m.approximate||c?.approximate||!1);const b=t[h.quantityGroup(h.yearsGroup)];let g;b&&(g=h.parseComponent(b,W,ht.year),g.uncertain=g.uncertain||m?.uncertain||!1,g.approximate=g.approximate||m?.approximate||!1);const G=t[h.suffixGroup],S=!!t[i.groupName(y.uncertainAndApproximateGroup,h.durationGroup)]||G==="%",F=S||!!t[i.groupName(y.uncertainGroup,h.durationGroup)]||G==="?",M=S||!!t[i.groupName(y.approximateGroup,h.durationGroup)]||G==="~";return{years:g,months:m,days:c,hours:u,minutes:o,seconds:n,uncertain:F,approximate:M}}}const Mr="dates",he="start",le="end",yn="durations",fe="durationMin",ge="durationMax";class oe extends P{static format=i.group(Mr,i.optionalGroup(he,i.group("openStart","\\.\\.")+"|"+x.format(he))+"/"+i.optionalGroup(le,i.group("openEnd","\\.\\.")+"|"+x.format(le)))+"|"+i.group(yn,i.group(fe,h.format(fe))+"/"+i.group(ge,h.format(ge)));constructor(t="interval",e=oe.format){super(t,e)}parseGroups(t){let e,n;if(t[yn]){const o=t[fe];e=A.fromString(o,new h);const a=t[ge];n=A.fromString(a,new h)}else{const o=t[he];switch(o){case void 0:e=null;break;case"..":e=void 0;break;default:e=z.fromString(o,new x)}const a=t[le];switch(a){case void 0:n=null;break;case"..":n=void 0;break;default:n=z.fromString(a,new x)}}return{start:e,end:n}}}class vr{parse(t){t=t.trim();const e=t.startsWith("["),r=t.substring(1,t.length-1).split(","),o=[];for(const a of r){let u;a.includes("..")?u=Rt.fromString(a.replace("..","/"),new oe):u=z.fromString(a,new x),o.push(u)}return{values:o,exclusive:e}}}d.register(z,()=>new x);d.register(K,()=>new Wt);d.register(A,()=>new h);d.register(Z,()=>new Jt);d.register(Rt,()=>new oe);d.register(Q,()=>new Zt);d.register(J,()=>new Xt);d.register(D,()=>new Kt);d.register(_t,()=>new vr);d.register(W,()=>new Yt);class H{constructor(t){this.preferences=t}read(t){var e,n;if(t===void 0)return;if(typeof t=="string")return t===""?void 0:t;for(const o of this.preferences){const a=(e=t[o])!==null&&e!==void 0?e:t[H.base(o)];if(a)return a}const r=new Set(this.preferences.map(o=>H.base(o)));for(const[o,a]of Object.entries(t))if(a&&r.has(H.base(o)))return a;return(n=Object.values(t).find(o=>o))!==null&&n!==void 0?n:void 0}write(t,e,n){var r,o;const a=e?.trim()?e.trim():void 0;if(t===void 0||typeof t=="string")return a;const u={...t},p=(o=(r=Object.keys(u).find(c=>c===n))!==null&&r!==void 0?r:Object.keys(u).find(c=>H.base(c)===H.base(n)))!==null&&o!==void 0?o:n;return a===void 0?delete u[p]:u[p]=a,Object.keys(u).length===0?void 0:u}static base(t){return t.toLowerCase().split("-")[0]}}H.any=new H([]);var bn;(function(s){s.abductee="abductee",s.actor="actor",s.artist="artist",s.anthropologist="anthropologist",s.archeologist="archeologist",s.astronaut="astronaut",s.astronomer="astronomer",s.astrologist="astrologist",s.astrophysicist="astrophysicist",s.banker="banker",s.barman="barman",s.biologist="biologist",s.biochemist="biochemist",s.biophysicist="biophysicist",s.bishop="bishop",s.businessman="businessman",s.botanist="botanist",s.cameraman="cameraman",s.chemist="chemist",s.contactee="contactee",s.cryptozoologist="cryptozoologist",s.dentist="dentist",s.director="director",s.diplomat="diplomat",s.diver="diver",s.electronics="electronics",s.engineer="engineer",s.ethnologist="ethnologist",s.exobiologist="exobiologist",s.farmer="farmer",s.firefighter="firefighter",s.flightAttendant="flightAttendant",s.geologist="geologist",s.geophysicist="geophysicist",s.geographer="geographer",s.historian="historian",s.houseWife="houseWife",s.hypnotherapist="hypnotherapist",s.illusionist="illusionist",s.journalist="journalist",s.judge="judge",s.lawyer="lawyer",s.leader="leader",s.librarian="librarian",s.logger="logger",s.mathematician="mathematician",s.mechanic="mechanic",s.meteorologist="meteorologist",s.military="military",s.musician="musician",s.neurologist="neurologist",s.neuroscientist="neuroscientist",s.neuropsychiatrist="neuropsychiatrist",s.nurse="nurse",s.oceanographer="oceanographer",s.painter="painter",s.parapsychologist="parapsychologist",s.philosopher="philosopher",s.photographer="photographer",s.physician="physician",s.physicist="physicist",s.pilot="pilot",s.politician="politician",s.policeman="policeman",s.priest="priest",s.producer="producer",s.prospector="prospector",s.psychologist="psychologist",s.psychiatrist="psychiatrist",s.radioastronomer="radioastronomer",s.radioamateur="radioamateur",s.salesman="salesman",s.sailor="sailor",s.sociologist="sociologist",s.softwareEngineer="softwareEngineer",s.stuntman="stuntman",s.taxiDriver="taxiDriver",s.teacher="teacher",s.telegrapher="telegrapher",s.truckDriver="truckDriver",s.ufologist="ufologist",s.ufoWitness="ufoWitness",s.ufoWitness2="ufoWitness2",s.worker="worker",s.writer="writer"})(bn||(bn={}));var Gn;(function(s){s.neutral="neutral",s.male="male",s.female="female"})(Gn||(Gn={}));const Ar="modulepreload",kr=function(s,t){return new URL(s,t).href},xn={},Pt=function(t,e,n){let r=Promise.resolve();if(e&&e.length>0){let a=function(f){return Promise.all(f.map(m=>Promise.resolve(m).then(b=>({status:"fulfilled",value:b}),b=>({status:"rejected",reason:b}))))};const u=document.getElementsByTagName("link"),p=document.querySelector("meta[property=csp-nonce]"),c=p?.nonce||p?.getAttribute("nonce");r=a(e.map(f=>{if(f=kr(f,n),f in xn)return;xn[f]=!0;const m=f.endsWith(".css"),b=m?'[rel="stylesheet"]':"";if(!!n)for(let S=u.length-1;S>=0;S--){const F=u[S];if(F.href===f&&(!m||F.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${f}"]${b}`))return;const G=document.createElement("link");if(G.rel=m?"stylesheet":Ar,m||(G.as="script"),G.crossOrigin="",G.href=f,c&&G.setAttribute("nonce",c),document.head.appendChild(G),m)return new Promise((S,F)=>{G.addEventListener("load",S),G.addEventListener("error",()=>F(new Error(`Unable to preload CSS for ${f}`)))})}))}function o(a){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=a,window.dispatchEvent(u),!u.defaultPrevented)throw a}return r.then(a=>{for(const u of a||[])u.status==="rejected"&&o(u.reason);return t().catch(o)})};class $r extends Error{constructor(t,e){super(t),this.cause=e}}class Te extends $r{constructor(t=Te.defaultMessage,e){super(t,e)}}Te.defaultMessage="Assertion failed";var Nn;(function(s){s.country="country",s.region="region",s.department="department",s.city="city",s.company="company"})(Nn||(Nn={}));var En;(function(s){s.at="at",s.au="au",s.ar="ar",s.be="be",s.br="br",s.ca="ca",s.ch="ch",s.cn="cn",s.cl="cl",s.co="co",s.cy="cy",s.de="de",s.dk="dk",s.do="do",s.dz="dz",s.gr="gr",s.ec="ec",s.eg="eg",s.es="es",s.fi="fi",s.fr="fr",s.ga="ga",s.ge="ge",s.hu="hu",s.in="in",s.ie="ie",s.ir="ir",s.il="il",s.it="it",s.jp="jp",s.kr="kr",s.ma="ma",s.mx="mx",s.my="my",s.mz="mz",s.nl="nl",s.no="no",s.nz="nz",s.pa="pa",s.pe="pe",s.ph="ph",s.pl="pl",s.pt="pt",s.ro="ro",s.ru="ru",s.sc="sc",s.tr="tr",s.ua="ua",s.uk="uk",s.us="us",s.sa="sa",s.se="se",s.su="su",s.tn="tn",s.tw="tw",s.ve="ve",s.za="za"})(En||(En={}));class Rr extends Error{constructor(t,e,n){super(typeof e=="number"&&Number.isInteger(e)&&e>=1?`This ${t} file is in version ${e} of its format; this UFO@home reads version ${n}. Read it with the UFO@home that reads its version.`:`This ${t} file states ${JSON.stringify(e)} as its format version, which is not a version.`),this.format=t,this.found=e,this.supported=n,this.name="FormatVersionError"}said(t){return t.replace("{found}",typeof this.found=="number"?String(this.found):JSON.stringify(this.found)).replace("{supported}",String(this.supported))}}class tt{static CURRENT={sighting:4,case:1,interview:1};static SCHEMA_BASE="https://ufoathome.org/schema";static schemaUrl(t,e=tt.CURRENT[t]){return`${tt.SCHEMA_BASE}/${e}/${t}.schema.json`}static of(t){if(typeof t!="object"||t===null)return 1;const e=t.version;return e===void 0?1:typeof e=="object"&&e!==null&&"value"in e?e.value:e}static recording(t){return tt.check(t,"sighting")}static check(t,e){const n=tt.of(t),r=tt.CURRENT[e];if(typeof n!="number"||!Number.isInteger(n)||n!==r)throw new Rr(e,n,r);return t}}class X{static NAMES=["weather","place","lightPollution","decor"];static KEYS={weather:["weatherTrack","weatherSource"],place:["place"],lightPollution:["lightPollution"],decor:["decor"]};static annexName(t,e){return`${t}.${e.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`)}.json`}static taken(t,e){const n={};if(t==="decor")return Array.isArray(e.decor)&&(n.decor=e.decor.filter(X.surveyed)),n;for(const r of X.KEYS[t])e[r]!==void 0&&(n[r]=e[r]);return n}static strip(t,e){if(t==="decor"){const n=Array.isArray(e.decor)?e.decor.filter(r=>!X.surveyed(r)):[];n.length>0?e.decor=n:delete e.decor;return}for(const n of X.KEYS[t])delete e[n]}static put(t,e,n){if(t==="decor"){if(!Array.isArray(n.decor))return;const r=Array.isArray(e.decor)?e.decor.filter(o=>!X.surveyed(o)):[];e.decor=[...r,...n.decor];return}for(const r of X.KEYS[t])n[r]!==void 0&&(e[r]=n[r])}static surveyed(t){return typeof t=="object"&&t!==null&&typeof t.origin=="string"}static fromFile(t,e){return t?.[e]!==void 0&&t[e].live!==!0}}class lt extends Error{constructor(t,e,n){super(`${t}: ${e}${n===void 0?"":` (HTTP ${n})`}`),this.kind=t,this.url=e,this.status=n,this.name="SightingFetchError"}}class te{static async recording(t){const e=await te.json(t);for(const n of X.NAMES){const r=e?.snapshots?.[n];if(!(!r?.src||r.live))try{const o=tt.recording(await te.json(new URL(r.src,new URL(t,location.href)).href));X.put(n,e,o)}catch{}}return e}static async json(t){const e=new URL(t,location.href);if(location.protocol==="https:"&&e.protocol==="http:")throw new lt("mixed-content",t);let n;try{n=await fetch(t)}catch{throw await this.diagnose(t,e)}if(!n.ok)throw new lt("status",t,n.status);try{return await n.json()}catch{throw new lt("malformed",t)}}static async diagnose(t,e){if(e.origin===location.origin)return new lt("unreachable",t);try{return await fetch(t,{mode:"no-cors"}),new lt("cors",t)}catch{return new lt("unreachable",t)}}}function Fr(s,t){for(const e of s){const n=e.toLowerCase().split("-")[0];if(t.includes(n))return n}return"en"}class Vr{static preferencesFor(t){const e=navigator.languages??[],n=this.declaredFor(t);return n?[n,...e]:e}static declaredFor(t){for(let e=t;e;){const n=e.closest("[lang]")?.getAttribute("lang")?.trim();if(n)return n;const r=e.getRootNode();e=r instanceof ShadowRoot?r.host:void 0}}}const Ir=["en","fr","es","it"];class Me{static catalog(t){const e=new Map;return{load(n){const r=Me.languageOf(n);let o=e.get(r);return o||(o=t[r](),e.set(r,o),o.catch(()=>e.delete(r))),o}}}static none(){return new Proxy({},{get:()=>""})}static blank(){const t=new Proxy(()=>t,{get:(e,n)=>n===Symbol.toPrimitive?()=>"":n===Symbol.iterator?function*(){}:n==="toString"||n==="valueOf"?()=>"":n==="then"?void 0:t,apply:()=>t,has:()=>!1,ownKeys:()=>[],getOwnPropertyDescriptor:()=>{}});return t}static languageOf(t){const e=t.toLowerCase().split("-")[0];return Ir.includes(e)?e:"en"}}const jr=["en","fr","es","it"],zr={en:()=>Pt(()=>import("./InterviewMessages_en-BNau2xU8.js"),[],import.meta.url).then(s=>s.interviewMessages_en),fr:()=>Pt(()=>import("./InterviewMessages_fr-OCQdwn9j.js"),[],import.meta.url).then(s=>s.interviewMessages_fr),es:()=>Pt(()=>import("./InterviewMessages_es-ypa0EDh9.js"),[],import.meta.url).then(s=>s.interviewMessages_es),it:()=>Pt(()=>import("./InterviewMessages_it-awuOqf5v.js"),[],import.meta.url).then(s=>s.interviewMessages_it)},Ur=Me.catalog(zr),Cr="interviewseek";class v{static read(t){return tt.check(t,"interview")}static isProofread(t){const e=Object.keys(t.speakers);return e.length>0&&e.every(n=>{const r=t.proofreading?.[n]?.status;return r==="approved"||r==="covered"})}static said(t){return t.parts?t.parts.map(e=>"redacted"in e?"…":v.plain(e.text)).join(" "):t.redacted?void 0:v.plain(t.text??"")}static ENTITIES={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:" "};static plain(t){return/[<&]/.test(t)?t.replace(/<br\s*\/?>/gi,`
2
2
  `).replace(/<\/?[a-z][^>]*>/gi,"").replace(/&#x([0-9a-f]+);/gi,(e,n)=>String.fromCodePoint(parseInt(n,16))).replace(/&#(\d+);/g,(e,n)=>String.fromCodePoint(Number(n))).replace(/&(\w+);/g,(e,n)=>v.ENTITIES[n.toLowerCase()]??e):t}static sightingsOf(t){return[t.interviewOf].flat().filter(e=>typeof e=="string")}static passagesAbout(t,e){const n=v.sightingsOf(t),r=[];return t.segments.forEach((o,a)=>{for(const u of o.refs??[]){if(u.sighting===void 0?!n.includes(e):u.sighting!==e)continue;const p=v.said(o);r.push({index:a,speaker:o.speaker,at:u.at,...p!==void 0?{text:p}:{},...u.range?{range:u.range}:{}})}}),r.sort((o,a)=>o.at-a.at||o.index-a.index)}static clock(t,e=!1){const n=Math.round(t*10),r=Math.floor(n/10),o=p=>String(p).padStart(2,"0"),a=Math.floor(r/3600),u=`${a>0||e?o(Math.floor(r/60)%60):Math.floor(r/60)}:${o(r%60)}`;return`${a>0?`${a}:`:""}${u}${e||n%10!==0?`.${n%10}`:""}`}static speakerName(t,e){const n=t.speakers[e];if(!n)return e;const r=typeof n.title=="string"?n.title:n.title?Object.values(n.title)[0]:void 0;return r||n.by&&v.agentName(n.by)||n.role}static agentName(t){if("people"in t){const[e,...n]=t.people.replace(/([a-z])([A-Z])/g,"$1 $2").split(" ");return[...n,e].join(" ")}return"org"in t?t.org:t.title??""}static stamp(t){const e=Math.round(t*1e3),n=(r,o=2)=>String(r).padStart(o,"0");return`${n(Math.floor(e/36e5))}:${n(Math.floor(e/6e4)%60)}:${n(Math.floor(e/1e3)%60)}.${n(e%1e3,3)}`}static toVtt(t){const e=o=>o.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),n=t.segments.filter(o=>o.start!==void 0);return`WEBVTT
3
3
 
4
4
  ${n.map((o,a)=>{const u=n[a+1],p=o.end??u?.start??o.start+5,c=u&&u.start<p?Math.max(o.start,u.start):p;return`${v.stamp(o.start)} --> ${v.stamp(c)}
5
5
  <v ${e(v.speakerName(t,o.speaker))}>${e(v.said(o)??"[…]")}`}).join(`
6
6
 
7
7
  `)}
8
- `}}class S{static svg(t){return`<svg viewBox="0 0 24 24" width="1.5em" height="1.5em" aria-hidden="true" focusable="false"><path d="${t}" fill="currentColor"/></svg>`}static outline(t){return`<svg viewBox="0 0 24 24" width="1.5em" height="1.5em" aria-hidden="true" focusable="false"><path d="${t}" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linejoin="round" stroke-linecap="round"/></svg>`}static solid(t){return`<svg viewBox="0 0 24 24" width="1.5em" height="1.5em" aria-hidden="true" focusable="false"><path d="${t}" fill="currentColor" fill-rule="evenodd"/></svg>`}static BOOKMARK="M6 3.5h12a.5.5 0 0 1 .5.5v16.5L12 16.8l-6.5 3.7V4a.5.5 0 0 1 .5-.5z";static PICTURE="M5 4h14a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z";static PICTURE_HILLS="M4.5 17.5l4.5-6 3 4 2.5-3 5 5z";static PIN="M12 21.5s-6.5-5.7-6.5-10.8a6.5 6.5 0 0 1 13 0c0 5.1-6.5 10.8-6.5 10.8z";static PIN_HOLE="M12 8.4a2.4 2.4 0 1 0 0 4.8 2.4 2.4 0 0 0 0-4.8z";static MILESTONES_OFF=S.outline(S.BOOKMARK);static MILESTONES_ON=S.solid(S.BOOKMARK);static PICTURES_OFF=S.outline(`${S.PICTURE}${S.PICTURE_HILLS}`);static PICTURES_ON=S.solid(`${S.PICTURE}${S.PICTURE_HILLS}`);static TRACE_LINE="M3 19.5l2.2-2.2 1.4 1.4L4.4 20.9zM8 14.5l2.2-2.2 1.4 1.4-2.2 2.2zM13 9.5l2.2-2.2 1.4 1.4-2.2 2.2z";static TRACE_MARK="M18.5 2.5l3.5 3.5-3.5 3.5-3.5-3.5z";static TRACES_OFF=S.outline(`${S.TRACE_LINE}${S.TRACE_MARK}`);static TRACES_ON=S.solid(`${S.TRACE_LINE}${S.TRACE_MARK}`);static MAP_OFF=S.outline(`${S.PIN}${S.PIN_HOLE}`);static MAP_ON=S.solid(`${S.PIN}${S.PIN_HOLE}`);static SHARE=S.outline("M14 4l7 7-7 7v-4.2C8.6 13.8 5.4 15.6 3.5 19c.6-5.6 3.4-9.6 10.5-10.8V4z");static FOLDED=S.svg("M15.4 7.4 14 6l-6 6 6 6 1.4-1.4L10.8 12z");static UNFOLDED=S.svg("M8.6 16.6 10 18l6-6-6-6-1.4 1.4 4.6 4.6z");static PLAY=S.svg("M7.4 5v14l11-7z");static PAUSE=S.svg("M6 5h4v14H6zM14 5h4v14h-4z");static VOLUME=S.svg("M2 9.5v5h3.5l4.5 4.5V5L5.5 9.5H2zm12.5 2.5A4 4 0 0 0 12.5 8.5v7A4 4 0 0 0 14.5 12zM12.5 4.2v2.1a6.5 6.5 0 0 1 0 11.4v2.1a8.6 8.6 0 0 0 0-15.6z");static MUTED=S.svg("M2 9.5v5h3.5l4.5 4.5V5L5.5 9.5H2zM15 9.8l1.4-1.4 2.6 2.6 2.6-2.6 1.4 1.4-2.6 2.6 2.6 2.6-1.4 1.4-2.6-2.6-2.6 2.6-1.4-1.4 2.6-2.6z");static ENTER_FULLSCREEN=S.svg("M5 5h5v2H7v3H5V5zm9 0h5v5h-2V7h-3V5zM5 14h2v3h3v2H5v-5zm12 0h2v5h-5v-2h3v-3z");static EXIT_FULLSCREEN=S.svg("M8 5h2v5H5V8h3V5zm6 0h2v3h3v2h-5V5zM5 14h5v5H8v-3H5v-2zm9 0h5v2h-3v3h-2v-5z")}const Tn="rr0-interview",qr=`
8
+ `}}class w{static svg(t){return`<svg viewBox="0 0 24 24" width="1.5em" height="1.5em" aria-hidden="true" focusable="false"><path d="${t}" fill="currentColor"/></svg>`}static outline(t){return`<svg viewBox="0 0 24 24" width="1.5em" height="1.5em" aria-hidden="true" focusable="false"><path d="${t}" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linejoin="round" stroke-linecap="round"/></svg>`}static solid(t){return`<svg viewBox="0 0 24 24" width="1.5em" height="1.5em" aria-hidden="true" focusable="false"><path d="${t}" fill="currentColor" fill-rule="evenodd"/></svg>`}static BOOKMARK="M6 3.5h12a.5.5 0 0 1 .5.5v16.5L12 16.8l-6.5 3.7V4a.5.5 0 0 1 .5-.5z";static PICTURE="M5 4h14a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z";static PICTURE_HILLS="M4.5 17.5l4.5-6 3 4 2.5-3 5 5z";static PIN="M12 21.5s-6.5-5.7-6.5-10.8a6.5 6.5 0 0 1 13 0c0 5.1-6.5 10.8-6.5 10.8z";static PIN_HOLE="M12 8.4a2.4 2.4 0 1 0 0 4.8 2.4 2.4 0 0 0 0-4.8z";static MILESTONES_OFF=w.outline(w.BOOKMARK);static MILESTONES_ON=w.solid(w.BOOKMARK);static PICTURES_OFF=w.outline(`${w.PICTURE}${w.PICTURE_HILLS}`);static PICTURES_ON=w.solid(`${w.PICTURE}${w.PICTURE_HILLS}`);static TRACE_LINE="M3 19.5l2.2-2.2 1.4 1.4L4.4 20.9zM8 14.5l2.2-2.2 1.4 1.4-2.2 2.2zM13 9.5l2.2-2.2 1.4 1.4-2.2 2.2z";static TRACE_MARK="M18.5 2.5l3.5 3.5-3.5 3.5-3.5-3.5z";static TRACES_OFF=w.outline(`${w.TRACE_LINE}${w.TRACE_MARK}`);static TRACES_ON=w.solid(`${w.TRACE_LINE}${w.TRACE_MARK}`);static MAP_OFF=w.outline(`${w.PIN}${w.PIN_HOLE}`);static MAP_ON=w.solid(`${w.PIN}${w.PIN_HOLE}`);static SHARE=w.outline("M14 4l7 7-7 7v-4.2C8.6 13.8 5.4 15.6 3.5 19c.6-5.6 3.4-9.6 10.5-10.8V4z");static VIDEO=w.outline("M3.5 7h11a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1h-11a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1zM15.5 10.5l5-3v9l-5-3z");static FOLDED=w.svg("M15.4 7.4 14 6l-6 6 6 6 1.4-1.4L10.8 12z");static UNFOLDED=w.svg("M8.6 16.6 10 18l6-6-6-6-1.4 1.4 4.6 4.6z");static PLAY=w.svg("M7.4 5v14l11-7z");static PAUSE=w.svg("M6 5h4v14H6zM14 5h4v14h-4z");static VOLUME=w.svg("M2 9.5v5h3.5l4.5 4.5V5L5.5 9.5H2zm12.5 2.5A4 4 0 0 0 12.5 8.5v7A4 4 0 0 0 14.5 12zM12.5 4.2v2.1a6.5 6.5 0 0 1 0 11.4v2.1a8.6 8.6 0 0 0 0-15.6z");static MUTED=w.svg("M2 9.5v5h3.5l4.5 4.5V5L5.5 9.5H2zM15 9.8l1.4-1.4 2.6 2.6 2.6-2.6 1.4 1.4-2.6 2.6 2.6 2.6-1.4 1.4-2.6-2.6-2.6 2.6-1.4-1.4 2.6-2.6z");static ENTER_FULLSCREEN=w.svg("M5 5h5v2H7v3H5V5zm9 0h5v5h-2V7h-3V5zM5 14h2v3h3v2H5v-5zm12 0h2v5h-5v-2h3v-3z");static EXIT_FULLSCREEN=w.svg("M8 5h2v5H5V8h3V5zm6 0h2v3h3v2h-5V5zM5 14h5v5H8v-3H5v-2zm9 0h5v2h-3v3h-2v-5z")}const Tn="rr0-interview",qr=`
9
9
  rr0-interview { display: block; --rr0-interview-line: color-mix(in srgb, currentColor 35%, transparent); }
10
10
  rr0-interview [hidden] { display: none !important; }
11
11
  rr0-interview .rr0-interview-status { font-size: .85em; opacity: .85; margin: 0 0 .5em; }
@@ -35,4 +35,4 @@ rr0-interview .turn .refs { display: flex; flex-wrap: wrap; gap: .25em; }
35
35
  rr0-interview .turn .ref { font: inherit; font-size: .8em; cursor: pointer; border: 1px solid var(--rr0-interview-line); border-radius: 999px; background: transparent; color: inherit;
36
36
  padding: 0 .35em; font-variant-numeric: tabular-nums; white-space: nowrap; display: inline-flex; align-items: center; gap: .15em; }
37
37
  rr0-interview .turn .ref svg { width: 1.1em; height: 1.1em; }
38
- `;class ve extends HTMLElement{messages;said=new H(["en"]);localeToken=0;loadToken=0;json;loading;base;status=document.createElement("p");turns=document.createElement("div");blocks=new Map;lastRevealed;syncedIndex;constructor(){super(),this.status.className="rr0-interview-status",this.status.setAttribute("role","status"),this.turns.className="rr0-interview-turns"}static get observedAttributes(){return["src"]}attributeChangedCallback(t,e,n){t==="src"&&n!==e&&this.isConnected&&this.load()}connectedCallback(){ve.styleRoot(this.getRootNode()),this.contains(this.turns)||this.replaceChildren(this.status,this.turns),this.loadLocale(),this.hasAttribute("src")&&this.json===void 0&&this.loading!==this.getAttribute("src")&&this.load()}get interview(){return this.json}set interview(t){this.loadToken++,this.json=t,this.draw()}set documentUrl(t){this.base=t}static styleRoot(t){const e=t instanceof ShadowRoot?t:document.head;if(e.querySelector("style[data-rr0-interview]"))return;const n=document.createElement("style");n.dataset.rr0Interview="",n.textContent=qr,e.append(n)}async load(){const t=this.getAttribute("src"),e=++this.loadToken;if(this.loading=t??void 0,!t)return;const n=new URL(t,location.href).href;let r;try{r=v.read(await te.json(n))}catch{r=void 0}e===this.loadToken&&(this.base=n,this.json=r,this.draw())}async loadLocale(){const t=++this.localeToken,e=Vr.preferencesFor(this),n=Fr(e,jr),r=await zr.load(n);t===this.localeToken&&(this.said=new H(e),this.messages=r,this.draw())}speakerName(t,e){const n=v.speakerName(t,e),r=t.speakers?.[e]?.role;return n===r&&r in this.messages.roles?this.messages.roles[r]:n}seek(t,e){const n=this.json,r=e?v.said(e):void 0,o={sighting:t.sighting??v.sightingsOf(n)[0],at:t.at,...r?{quote:r}:{}};this.dispatchEvent(new CustomEvent(Cr,{bubbles:!0,composed:!0,detail:o}));const a=this.getAttribute("player");if(!a)return;const p=this.getRootNode().getElementById?.(a);typeof p?.seekTo=="function"&&(p.scrollIntoView?.({block:"center",behavior:"smooth"}),p.seekTo(o.at,o.sighting))}gap(t,e){const n=document.createElement(e),r=document.createElement("span");r.className="bar";const o=`${this.messages.redacted}${this.messages.colon}${this.said.read(t)??""}`;return r.dataset.tip=o,r.tabIndex=0,r.setAttribute("role","img"),r.setAttribute("aria-label",o),n.append(r),n}saidNodes(t){if(!/[<&]/.test(t))return[document.createTextNode(t)];const e=document.createElement("template");e.innerHTML=t;for(const n of e.content.querySelectorAll("*")){if(["SCRIPT","STYLE","IFRAME","OBJECT","EMBED"].includes(n.tagName)){n.remove();continue}for(const r of[...n.attributes])if(/^on/i.test(r.name)||/^\s*javascript:/i.test(r.value))n.removeAttribute(r.name);else if(["href","src"].includes(r.name))try{r.value=new URL(r.value,this.base??location.href).href}catch{}}return[...e.content.childNodes]}draw(){if(!this.messages)return;const t=this.messages,e=this.json;this.blocks.clear();const n=Array.isArray(e?.segments)?e.segments:[];if(!e||n.length===0){this.status.hidden=!0;const m=document.createElement("p");m.textContent=t.exchangesEmpty,this.turns.replaceChildren(m);return}const r=e.speakers??{},o=Object.keys(r);if(e.proofreading){const m=o.filter(b=>!["approved","covered"].includes(e.proofreading?.[b]?.status??""));this.status.textContent=m.length===0?t.proofreadAll:t.proofreadPending.replace("{names}",m.map(b=>this.speakerName(e,b)).join(", ")),this.status.hidden=!1}else this.status.hidden=!0;const a=[];let u,p=!1,c,f;n.forEach((m,b)=>{const g=m.redacted?JSON.stringify(m.redacted.reason):void 0;if(g!==void 0&&c?.reason===g){this.blocks.set(b,c.block),m.speaker!==f&&(f=void 0);return}const G=document.createElement("div");G.className="turn",G.dataset.segment=String(b);const w=document.createElement("div");w.className="who";const F=document.createElement("span");if(F.textContent=m.redacted?"":this.speakerName(e,m.speaker),m.start!==void 0&&(G.dataset.time=v.clock(m.start,!0)),f!==m.speaker&&(u=document.createElement("div"),u.className="intervention",u.style.setProperty("--speaker-hue",String((Math.max(0,o.indexOf(m.speaker))*67+210)%360)),a.push(u),p=!1),m.redacted||(p&&G.classList.add("goes-on"),p=!0),u.append(G),f=m.speaker,w.append(F),m.redacted){G.classList.add("is-redacted");const M=this.gap(m.redacted.reason,"p");M.className="redacted",c={block:G,reason:g},G.append(w,M)}else{const M=document.createElement("p");if(M.className="said",m.parts){let vt="";for(const C of m.parts){const Ae="redacted"in C?"▮":v.plain(C.text);/[\p{L}\p{N}.,;:!?)»”…▮]$/u.test(vt)&&/^[\p{L}\p{N}(«“▮]/u.test(Ae)&&M.append(" "),"redacted"in C?M.append(this.gap(C.redacted.reason,"span")):M.append(...this.saidNodes(C.text)),vt=Ae}}else M.append(...this.saidNodes(m.text??""));c=void 0,G.append(w,M)}if(m.refs?.length){const M=document.createElement("div");M.className="refs";for(const vt of m.refs){const C=document.createElement("button");C.type="button",C.className="ref",C.innerHTML=S.PLAY,C.append(v.clock(vt.at,!0)),C.addEventListener("click",()=>this.seek(vt,m)),M.append(C)}G.append(M)}this.blocks.set(b,G)}),this.turns.replaceChildren(...a)}revealAt(t,e){const n=this.json;if(!n)return;const r=v.sightingsOf(n)[0];let o;if(n.segments?.forEach((a,u)=>{for(const p of a.refs??[]){const c=p.sighting??r;e!==void 0&&c!==void 0&&c!==e||p.at>t+.001||(!o||p.at>o.at)&&(o={index:u,at:p.at})}}),!!o)return o.index!==this.lastRevealed&&(this.lastRevealed=o.index,this.revealSegment(o.index)),this.markSynced(o.index),o.index}momentsCited(t){const e=this.json;if(!e)return[];const n=v.sightingsOf(e)[0],r=[];for(const o of e.segments??[])for(const a of o.refs??[]){const u=a.sighting??n;t!==void 0&&u!==void 0&&u!==t||r.push({at:a.at,quote:v.said(o)??""})}return r.sort((o,a)=>o.at-a.at)}markSynced(t){t!==this.syncedIndex&&(this.syncedIndex!==void 0&&this.blocks.get(this.syncedIndex)?.classList.remove("synced"),this.syncedIndex=t,this.blocks.get(t)?.classList.add("synced"))}revealSegment(t){const e=this.blocks.get(t);e&&(e.scrollIntoView?.({block:"center"}),e.classList.add("flash"),window.setTimeout(()=>e.classList.remove("flash"),1600))}}function Br(){customElements.get(Tn)||customElements.define(Tn,ve)}Br();
38
+ `;class ve extends HTMLElement{messages;said=new H(["en"]);localeToken=0;loadToken=0;json;loading;base;status=document.createElement("p");turns=document.createElement("div");blocks=new Map;lastRevealed;syncedIndex;constructor(){super(),this.status.className="rr0-interview-status",this.status.setAttribute("role","status"),this.turns.className="rr0-interview-turns"}static get observedAttributes(){return["src"]}attributeChangedCallback(t,e,n){t==="src"&&n!==e&&this.isConnected&&this.load()}connectedCallback(){ve.styleRoot(this.getRootNode()),this.contains(this.turns)||this.replaceChildren(this.status,this.turns),this.loadLocale(),this.hasAttribute("src")&&this.json===void 0&&this.loading!==this.getAttribute("src")&&this.load()}get interview(){return this.json}set interview(t){this.loadToken++,this.json=t,this.draw()}set documentUrl(t){this.base=t}static styleRoot(t){const e=t instanceof ShadowRoot?t:document.head;if(e.querySelector("style[data-rr0-interview]"))return;const n=document.createElement("style");n.dataset.rr0Interview="",n.textContent=qr,e.append(n)}async load(){const t=this.getAttribute("src"),e=++this.loadToken;if(this.loading=t??void 0,!t)return;const n=new URL(t,location.href).href;let r;try{r=v.read(await te.json(n))}catch{r=void 0}e===this.loadToken&&(this.base=n,this.json=r,this.draw())}async loadLocale(){const t=++this.localeToken,e=Vr.preferencesFor(this),n=Fr(e,jr),r=await Ur.load(n);t===this.localeToken&&(this.said=new H(e),this.messages=r,this.draw())}speakerName(t,e){const n=v.speakerName(t,e),r=t.speakers?.[e]?.role;return n===r&&r in this.messages.roles?this.messages.roles[r]:n}seek(t,e){const n=this.json,r=e?v.said(e):void 0,o={sighting:t.sighting??v.sightingsOf(n)[0],at:t.at,...r?{quote:r}:{}};this.dispatchEvent(new CustomEvent(Cr,{bubbles:!0,composed:!0,detail:o}));const a=this.getAttribute("player");if(!a)return;const p=this.getRootNode().getElementById?.(a);typeof p?.seekTo=="function"&&(p.scrollIntoView?.({block:"center",behavior:"smooth"}),p.seekTo(o.at,o.sighting))}gap(t,e){const n=document.createElement(e),r=document.createElement("span");r.className="bar";const o=`${this.messages.redacted}${this.messages.colon}${this.said.read(t)??""}`;return r.dataset.tip=o,r.tabIndex=0,r.setAttribute("role","img"),r.setAttribute("aria-label",o),n.append(r),n}saidNodes(t){if(!/[<&]/.test(t))return[document.createTextNode(t)];const e=document.createElement("template");e.innerHTML=t;for(const n of e.content.querySelectorAll("*")){if(["SCRIPT","STYLE","IFRAME","OBJECT","EMBED"].includes(n.tagName)){n.remove();continue}for(const r of[...n.attributes])if(/^on/i.test(r.name)||/^\s*javascript:/i.test(r.value))n.removeAttribute(r.name);else if(["href","src"].includes(r.name))try{r.value=new URL(r.value,this.base??location.href).href}catch{}}return[...e.content.childNodes]}draw(){if(!this.messages)return;const t=this.messages,e=this.json;this.blocks.clear();const n=Array.isArray(e?.segments)?e.segments:[];if(!e||n.length===0){this.status.hidden=!0;const m=document.createElement("p");m.textContent=t.exchangesEmpty,this.turns.replaceChildren(m);return}const r=e.speakers??{},o=Object.keys(r);if(e.proofreading){const m=o.filter(b=>!["approved","covered"].includes(e.proofreading?.[b]?.status??""));this.status.textContent=m.length===0?t.proofreadAll:t.proofreadPending.replace("{names}",m.map(b=>this.speakerName(e,b)).join(", ")),this.status.hidden=!1}else this.status.hidden=!0;const a=[];let u,p=!1,c,f;n.forEach((m,b)=>{const g=m.redacted?JSON.stringify(m.redacted.reason):void 0;if(g!==void 0&&c?.reason===g){this.blocks.set(b,c.block),m.speaker!==f&&(f=void 0);return}const G=document.createElement("div");G.className="turn",G.dataset.segment=String(b);const S=document.createElement("div");S.className="who";const F=document.createElement("span");if(F.textContent=m.redacted?"":this.speakerName(e,m.speaker),m.start!==void 0&&(G.dataset.time=v.clock(m.start,!0)),f!==m.speaker&&(u=document.createElement("div"),u.className="intervention",u.style.setProperty("--speaker-hue",String((Math.max(0,o.indexOf(m.speaker))*67+210)%360)),a.push(u),p=!1),m.redacted||(p&&G.classList.add("goes-on"),p=!0),u.append(G),f=m.speaker,S.append(F),m.redacted){G.classList.add("is-redacted");const M=this.gap(m.redacted.reason,"p");M.className="redacted",c={block:G,reason:g},G.append(S,M)}else{const M=document.createElement("p");if(M.className="said",m.parts){let vt="";for(const C of m.parts){const Ae="redacted"in C?"▮":v.plain(C.text);/[\p{L}\p{N}.,;:!?)»”…▮]$/u.test(vt)&&/^[\p{L}\p{N}(«“▮]/u.test(Ae)&&M.append(" "),"redacted"in C?M.append(this.gap(C.redacted.reason,"span")):M.append(...this.saidNodes(C.text)),vt=Ae}}else M.append(...this.saidNodes(m.text??""));c=void 0,G.append(S,M)}if(m.refs?.length){const M=document.createElement("div");M.className="refs";for(const vt of m.refs){const C=document.createElement("button");C.type="button",C.className="ref",C.innerHTML=w.PLAY,C.append(v.clock(vt.at,!0)),C.addEventListener("click",()=>this.seek(vt,m)),M.append(C)}G.append(M)}this.blocks.set(b,G)}),this.turns.replaceChildren(...a)}revealAt(t,e){const n=this.json;if(!n)return;const r=v.sightingsOf(n)[0];let o;if(n.segments?.forEach((a,u)=>{for(const p of a.refs??[]){const c=p.sighting??r;e!==void 0&&c!==void 0&&c!==e||p.at>t+.001||(!o||p.at>o.at)&&(o={index:u,at:p.at})}}),!!o)return o.index!==this.lastRevealed&&(this.lastRevealed=o.index,this.revealSegment(o.index)),this.markSynced(o.index),o.index}momentsCited(t){const e=this.json;if(!e)return[];const n=v.sightingsOf(e)[0],r=[];for(const o of e.segments??[])for(const a of o.refs??[]){const u=a.sighting??n;t!==void 0&&u!==void 0&&u!==t||r.push({at:a.at,quote:v.said(o)??""})}return r.sort((o,a)=>o.at-a.at)}markSynced(t){t!==this.syncedIndex&&(this.syncedIndex!==void 0&&this.blocks.get(this.syncedIndex)?.classList.remove("synced"),this.syncedIndex=t,this.blocks.get(t)?.classList.add("synced"))}revealSegment(t){const e=this.blocks.get(t);e&&(e.scrollIntoView?.({block:"center"}),e.classList.add("flash"),window.setTimeout(()=>e.classList.remove("flash"),1600))}}function Br(){customElements.get(Tn)||customElements.define(Tn,ve)}Br();
@@ -1 +1 @@
1
- import{a9 as M,aa as y,a as I}from"./rr0-scene.mjs";class d{static RECORD_BYTES=20;static NON_ICAO_FLAG=1<<24;static UNKNOWN=65535;static MAX_DT=35999;static decode(t){if(t.length%d.RECORD_BYTES!==0)throw new Error(`An aircraft tile is a multiple of ${d.RECORD_BYTES} bytes, not ${t.length}`);const e=new DataView(t.buffer,t.byteOffset,t.byteLength),c=[];for(let n=0;n<t.length;n+=d.RECORD_BYTES){const s=e.getUint32(n,!0),a=e.getUint16(n+16,!0),r=e.getUint16(n+18,!0);c.push({icao:s&16777215,nonIcao:(s&d.NON_ICAO_FLAG)!==0,secondsInHour:e.getUint16(n+4,!0)/10,lat:e.getInt32(n+6,!0)/1e5,lng:e.getInt32(n+10,!0)/1e5,altitudeFt:e.getInt16(n+14,!0)*25,groundSpeedKt:a===d.UNKNOWN?void 0:a/10,trackDeg:r===d.UNKNOWN?void 0:r/10})}return c}}const w="https://ufoathome.org/aircraft/index.json";class f{citation=M;static DEFAULT_RADIUS_KM=150;static FLAG_MILITARY=1;static FLAG_PIA=4;static FLAG_LADD=8;static KM_PER_DEG=111.32;static HOUR_MS=36e5;fetchImpl;indexUrls;index;hours=new Map;tiles=new Map;shards=new Map;constructor(t={}){this.fetchImpl=t.fetchImpl??fetch.bind(globalThis),this.indexUrls=t.indexUrls??f.defaultIndexUrls()}static defaultIndexUrls(){const t=[];return typeof location<"u"&&/^https?:$/.test(location.protocol)&&t.push(new URL("/aircraft/index.json",location.href).href),t.includes(w)||t.push(w),t}mayCover(t){return y.mayCover(t)}async between(t,e,c,n=f.DEFAULT_RADIUS_KM){const s=await this.loadIndex();if(!s)return{status:"failed"};const a=[];for(let o=Math.floor(e/f.HOUR_MS);o<=Math.floor(c/f.HOUR_MS);o++)a.push(o);if(!a.every(o=>s.index.days.includes(f.dayOf(o))))return{status:"outside"};const r=f.tilesAround(t,n);try{const o=(await Promise.all(a.flatMap(u=>r.map(i=>this.tileOf(s.base,u,i))))).flat();return{status:"found",tracks:f.merge(o,t,e,c,n)}}catch{return{status:"failed"}}}async describe(t,e){const c=await this.loadIndex();if(!c)return;const n=t.icao.toString(16).padStart(6,"0"),s=t.nonIcao?"non-icao":n.slice(0,2),a=`${e}/${s}`;let r=this.shards.get(a);r||(r=this.fetchImpl(new URL(`${e}/aircraft/${s}.json`,c.base).href).then(g=>g.ok?g.json():{}).catch(()=>({})),this.shards.set(a,r));const o=(await r)[t.nonIcao?`~${n}`:n];if(!o)return;const[u,i,l,h=0]=o,p={registration:u||void 0,type:i||void 0,category:l||void 0,military:(h&f.FLAG_MILITARY)!==0||void 0,restricted:(h&(f.FLAG_PIA|f.FLAG_LADD))!==0||void 0};return Object.values(p).some(g=>g!==void 0)?p:void 0}static tilesAround(t,e){const c=e/f.KM_PER_DEG,n=Math.max(-90,t.lat-c),s=Math.min(90,t.lat+c),a=Math.cos(Math.max(Math.abs(n),Math.abs(s))*Math.PI/180),r=a<1e-6?180:e/(f.KM_PER_DEG*a),o=new Set;if(r>=180)for(let i=-180;i<180;i++)o.add(i);else for(let i=Math.floor(t.lng-r);i<=Math.floor(t.lng+r);i++)o.add(I.wrapLongitude(i));const u=[];for(let i=Math.floor(n);i<=Math.min(89,Math.floor(s));i++)for(const l of o)u.push(`${i}_${l}`);return u}static dayOf(t){return new Date(t*f.HOUR_MS).toISOString().slice(0,10)}static merge(t,e,c,n,s){const a=new Map;for(const o of t){const u=o.points.filter(h=>h.t>=c&&h.t<=n&&I.groundDistanceKm(e,h)<=s);if(u.length===0)continue;const i=`${o.nonIcao?"~":""}${o.icao}`,l=a.get(i);l?l.points.push(...u):a.set(i,{icao:o.icao,nonIcao:o.nonIcao,points:u})}const r=[...a.values()];for(const o of r)o.points.sort((u,i)=>u.t-i.t);return r.sort((o,u)=>o.icao-u.icao)}loadIndex(){return this.index??=(async()=>{for(const t of this.indexUrls)try{const e=await this.fetchImpl(t);if(e.ok)return{index:await e.json(),base:t}}catch{}})(),this.index}tileOf(t,e,c){const n=f.dayOf(e),s=String(e%24).padStart(2,"0"),a=`${n}/${s}/${c}`;let r=this.tiles.get(a);return r||(r=this.hourIndex(t,n,s).then(async o=>{const u=o[c];if(!u)return[];const[i,l]=u,h=await this.fetchImpl(new URL(`${n}/${s}.pack`,t).href,{headers:{Range:`bytes=${i}-${i+l-1}`}});if(!h.ok)throw new Error(`The pack of ${n} ${s} h answered ${h.status}`);const p=new Uint8Array(await h.arrayBuffer()),g=h.status===206?p:p.subarray(i,i+l);return f.tracksOf(await f.gunzip(g),e)}),r.catch(()=>this.tiles.delete(a)),this.tiles.set(a,r)),r}hourIndex(t,e,c){const n=`${e}/${c}`;let s=this.hours.get(n);return s||(s=this.fetchImpl(new URL(`${e}/${c}.json`,t).href).then(a=>{if(a.status===404)return{};if(!a.ok)throw new Error(`The index of ${e} ${c} h answered ${a.status}`);return a.json()}),s.catch(()=>this.hours.delete(n)),this.hours.set(n,s)),s}static async gunzip(t){const e=new Blob([t]).stream().pipeThrough(new DecompressionStream("gzip"));return new Uint8Array(await new Response(e).arrayBuffer())}static tracksOf(t,e){const c=new Map;for(const n of d.decode(t)){const s=`${n.nonIcao?"~":""}${n.icao}`;let a=c.get(s);a||c.set(s,a={icao:n.icao,nonIcao:n.nonIcao,points:[]}),a.points.push({t:e*f.HOUR_MS+n.secondsInHour*1e3,lat:n.lat,lng:n.lng,altitudeFt:n.altitudeFt,groundSpeedKt:n.groundSpeedKt,trackDeg:n.trackDeg})}return[...c.values()]}}export{f as AdsbLolArchiveProvider,w as UFOATHOME_AIRCRAFT_INDEX_URL};
1
+ import{ah as M,ai as y,a as I}from"./rr0-scene.mjs";class d{static RECORD_BYTES=20;static NON_ICAO_FLAG=1<<24;static UNKNOWN=65535;static MAX_DT=35999;static decode(t){if(t.length%d.RECORD_BYTES!==0)throw new Error(`An aircraft tile is a multiple of ${d.RECORD_BYTES} bytes, not ${t.length}`);const e=new DataView(t.buffer,t.byteOffset,t.byteLength),c=[];for(let n=0;n<t.length;n+=d.RECORD_BYTES){const s=e.getUint32(n,!0),a=e.getUint16(n+16,!0),r=e.getUint16(n+18,!0);c.push({icao:s&16777215,nonIcao:(s&d.NON_ICAO_FLAG)!==0,secondsInHour:e.getUint16(n+4,!0)/10,lat:e.getInt32(n+6,!0)/1e5,lng:e.getInt32(n+10,!0)/1e5,altitudeFt:e.getInt16(n+14,!0)*25,groundSpeedKt:a===d.UNKNOWN?void 0:a/10,trackDeg:r===d.UNKNOWN?void 0:r/10})}return c}}const w="https://ufoathome.org/aircraft/index.json";class f{citation=M;static DEFAULT_RADIUS_KM=150;static FLAG_MILITARY=1;static FLAG_PIA=4;static FLAG_LADD=8;static KM_PER_DEG=111.32;static HOUR_MS=36e5;fetchImpl;indexUrls;index;hours=new Map;tiles=new Map;shards=new Map;constructor(t={}){this.fetchImpl=t.fetchImpl??fetch.bind(globalThis),this.indexUrls=t.indexUrls??f.defaultIndexUrls()}static defaultIndexUrls(){const t=[];return typeof location<"u"&&/^https?:$/.test(location.protocol)&&t.push(new URL("/aircraft/index.json",location.href).href),t.includes(w)||t.push(w),t}mayCover(t){return y.mayCover(t)}async between(t,e,c,n=f.DEFAULT_RADIUS_KM){const s=await this.loadIndex();if(!s)return{status:"failed"};const a=[];for(let o=Math.floor(e/f.HOUR_MS);o<=Math.floor(c/f.HOUR_MS);o++)a.push(o);if(!a.every(o=>s.index.days.includes(f.dayOf(o))))return{status:"outside"};const r=f.tilesAround(t,n);try{const o=(await Promise.all(a.flatMap(u=>r.map(i=>this.tileOf(s.base,u,i))))).flat();return{status:"found",tracks:f.merge(o,t,e,c,n)}}catch{return{status:"failed"}}}async describe(t,e){const c=await this.loadIndex();if(!c)return;const n=t.icao.toString(16).padStart(6,"0"),s=t.nonIcao?"non-icao":n.slice(0,2),a=`${e}/${s}`;let r=this.shards.get(a);r||(r=this.fetchImpl(new URL(`${e}/aircraft/${s}.json`,c.base).href).then(g=>g.ok?g.json():{}).catch(()=>({})),this.shards.set(a,r));const o=(await r)[t.nonIcao?`~${n}`:n];if(!o)return;const[u,i,l,h=0]=o,p={registration:u||void 0,type:i||void 0,category:l||void 0,military:(h&f.FLAG_MILITARY)!==0||void 0,restricted:(h&(f.FLAG_PIA|f.FLAG_LADD))!==0||void 0};return Object.values(p).some(g=>g!==void 0)?p:void 0}static tilesAround(t,e){const c=e/f.KM_PER_DEG,n=Math.max(-90,t.lat-c),s=Math.min(90,t.lat+c),a=Math.cos(Math.max(Math.abs(n),Math.abs(s))*Math.PI/180),r=a<1e-6?180:e/(f.KM_PER_DEG*a),o=new Set;if(r>=180)for(let i=-180;i<180;i++)o.add(i);else for(let i=Math.floor(t.lng-r);i<=Math.floor(t.lng+r);i++)o.add(I.wrapLongitude(i));const u=[];for(let i=Math.floor(n);i<=Math.min(89,Math.floor(s));i++)for(const l of o)u.push(`${i}_${l}`);return u}static dayOf(t){return new Date(t*f.HOUR_MS).toISOString().slice(0,10)}static merge(t,e,c,n,s){const a=new Map;for(const o of t){const u=o.points.filter(h=>h.t>=c&&h.t<=n&&I.groundDistanceKm(e,h)<=s);if(u.length===0)continue;const i=`${o.nonIcao?"~":""}${o.icao}`,l=a.get(i);l?l.points.push(...u):a.set(i,{icao:o.icao,nonIcao:o.nonIcao,points:u})}const r=[...a.values()];for(const o of r)o.points.sort((u,i)=>u.t-i.t);return r.sort((o,u)=>o.icao-u.icao)}loadIndex(){return this.index??=(async()=>{for(const t of this.indexUrls)try{const e=await this.fetchImpl(t);if(e.ok)return{index:await e.json(),base:t}}catch{}})(),this.index}tileOf(t,e,c){const n=f.dayOf(e),s=String(e%24).padStart(2,"0"),a=`${n}/${s}/${c}`;let r=this.tiles.get(a);return r||(r=this.hourIndex(t,n,s).then(async o=>{const u=o[c];if(!u)return[];const[i,l]=u,h=await this.fetchImpl(new URL(`${n}/${s}.pack`,t).href,{headers:{Range:`bytes=${i}-${i+l-1}`}});if(!h.ok)throw new Error(`The pack of ${n} ${s} h answered ${h.status}`);const p=new Uint8Array(await h.arrayBuffer()),g=h.status===206?p:p.subarray(i,i+l);return f.tracksOf(await f.gunzip(g),e)}),r.catch(()=>this.tiles.delete(a)),this.tiles.set(a,r)),r}hourIndex(t,e,c){const n=`${e}/${c}`;let s=this.hours.get(n);return s||(s=this.fetchImpl(new URL(`${e}/${c}.json`,t).href).then(a=>{if(a.status===404)return{};if(!a.ok)throw new Error(`The index of ${e} ${c} h answered ${a.status}`);return a.json()}),s.catch(()=>this.hours.delete(n)),this.hours.set(n,s)),s}static async gunzip(t){const e=new Blob([t]).stream().pipeThrough(new DecompressionStream("gzip"));return new Uint8Array(await new Response(e).arrayBuffer())}static tracksOf(t,e){const c=new Map;for(const n of d.decode(t)){const s=`${n.nonIcao?"~":""}${n.icao}`;let a=c.get(s);a||c.set(s,a={icao:n.icao,nonIcao:n.nonIcao,points:[]}),a.points.push({t:e*f.HOUR_MS+n.secondsInHour*1e3,lat:n.lat,lng:n.lng,altitudeFt:n.altitudeFt,groundSpeedKt:n.groundSpeedKt,trackDeg:n.trackDeg})}return[...c.values()]}}export{f as AdsbLolArchiveProvider,w as UFOATHOME_AIRCRAFT_INDEX_URL};
@@ -1,4 +1,4 @@
1
- import{aT as T,_ as c,aU as E}from"./rr0-scene.mjs";import{P as I,S as L,a as p,b as M,I as x,E as w,c as f}from"./ParameterForm-BMIW4Gkh.js";import{L as u}from"./LaserBeam-DmH2JeMa.js";import{T as _}from"./TimelineTracks-B-bXAaF7.js";const O=T.catalog({en:()=>c(()=>import("./BeamParameterTexts_en-DZB75ouZ.js"),[],import.meta.url).then(l=>l.beamParameterTexts_en),fr:()=>c(()=>import("./BeamParameterTexts_fr-BHG3fW40.js"),[],import.meta.url).then(l=>l.beamParameterTexts_fr),es:()=>c(()=>import("./BeamParameterTexts_es-AeZmsufG.js"),[],import.meta.url).then(l=>l.beamParameterTexts_es),it:()=>c(()=>import("./BeamParameterTexts_it-CPwmQX-g.js"),[],import.meta.url).then(l=>l.beamParameterTexts_it)});class h{static LIGHT_TITLE="light";static BEAM="beam";static WHEN="when";static nextPlace(e){const t=e[e.length-1]??{lat:0,lng:0,altitudeM:0},i=e[e.length-2];return i?{lat:2*t.lat-i.lat,lng:2*t.lng-i.lng,altitudeM:2*t.altitudeM-i.altitudeM}:{lat:t.lat,lng:t.lng+500/(111320*Math.max(.05,Math.cos(t.lat*Math.PI/180))),altitudeM:t.altitudeM}}static instant(e,t,i,s=!1){return{type:"number",key:e,min:-3600,max:36e3,step:.1,unit:"s",scale:.001,label:t,hint:i,...s?{required:s}:{}}}static SET={kind:"beam",title:"beam",parameters:[{type:"said",key:"title",label:"name",group:h.BEAM},{type:"number",key:"divergenceMrad",min:.001,max:1e3,step:.001,unit:"mrad",group:h.BEAM,effective:()=>u.DEFAULT_DIVERGENCE_MRAD,label:"divergence",hint:"howFastItWidensFullAngle"},{type:"number",key:"apertureM",min:.001,max:10,step:.001,unit:"m",group:h.BEAM,effective:()=>u.DEFAULT_APERTURE_M,label:"widthAtTheEmitter"},{type:"number",key:"patchiness",min:0,max:100,step:1,unit:"%",scale:100,group:h.BEAM,effective:()=>u.DEFAULT_PATCHINESS,label:"unevenHaze",hint:"howUnevenlyTheHazeItCrosses"}]};static WAVELENGTH_HINT="itsColour532ForTheGreen";static POWER_HINT="theOpticalPowerItCarriesIts";static WAVELENGTH_LABEL="wavelength";static POWER_LABEL="power";static LIGHT={kind:"beam-light",title:h.LIGHT_TITLE,parameters:[{type:"number",key:"wavelengthNm",min:380,max:780,step:1,unit:"nm",required:!0,label:h.WAVELENGTH_LABEL,hint:h.WAVELENGTH_HINT},{type:"number",key:"powerW",min:.001,max:1e5,step:.001,unit:"W",required:!0,label:h.POWER_LABEL,hint:h.POWER_HINT}]};static LIGHT_KEY={kind:"beam-light-key",title:h.LIGHT_TITLE,parameters:[h.instant("t","time","secondsOfTheRecording",!0),{type:"number",key:"wavelengthNm",min:380,max:780,step:1,unit:"nm",label:h.WAVELENGTH_LABEL,hint:h.WAVELENGTH_HINT,effective:(e,t)=>t?.wavelengthNm},{type:"number",key:"powerW",min:.001,max:1e5,step:.001,unit:"W",label:h.POWER_LABEL,hint:h.POWER_HINT,effective:(e,t)=>t?.powerW}]};static ON={kind:"beam-on",title:h.WHEN,parameters:[h.instant("fromT","onFrom","secondsOfTheRecordingEmptyFrom"),h.instant("untilT","offAt","secondsOfTheRecordingEmptyUntil")]};static MOVE_KEY={kind:"beam-move-key",title:"pathAtAnInstant",parameters:[h.instant("t","time","secondsOfTheRecording",!0)]};static hexOf(e){const t=u.colourOf(e),i=Math.max(...t,1e-9),s=n=>{const o=Math.min(1,Math.max(0,n/i)),a=o<=.0031308?12.92*o:1.055*o**(1/2.4)-.055;return Math.round(a*255).toString(16).padStart(2,"0")};return`#${t.map(s).join("")}`}static wavelengthOf(e){const t=h.hueOf(e);let i=532,s=1/0;for(let n=400;n<=700;n++){const o=Math.abs((h.hueOf(h.hexOf(n))-t+540)%360-180);o<s&&(s=o,i=n)}return i}static hueOf(e){const t=Number.parseInt(e.replace("#",""),16),[i,s,n]=[t>>16&255,t>>8&255,t&255].map(b=>b/255),o=Math.max(i,s,n),a=Math.min(i,s,n);if(o===a)return 0;const r=o-a;return((o===i?(s-n)/r%6:o===s?(n-i)/r+2:(i-s)/r+4)*60+360)%360}static PLACE={kind:"beam-place",title:"pointOfThePath",parameters:[{type:"position",key:"lat",secondKey:"lng",saidKey:"saidPosition",native:"geo",step:.1,label:"position"},{type:"number",key:"altitudeM",min:-500,max:1e5,step:.1,unit:"m",required:!0,label:"altitude",hint:"aboveTheSeaNotTheGround"}]};static publish(){I.publish(h.SET)}}const A=T.catalog({en:()=>c(()=>import("./BeamEditorMessages_en-DDvPWAdd.js"),[],import.meta.url).then(l=>l.beamEditorMessages_en),fr:()=>c(()=>import("./BeamEditorMessages_fr-CtX6uP-x.js"),[],import.meta.url).then(l=>l.beamEditorMessages_fr),es:()=>c(()=>import("./BeamEditorMessages_es-BhCkhUkN.js"),[],import.meta.url).then(l=>l.beamEditorMessages_es),it:()=>c(()=>import("./BeamEditorMessages_it-DVweRQFi.js"),[],import.meta.url).then(l=>l.beamEditorMessages_it)});class g{constructor(e,t,i){this.container=e,this.host=t,this.language=i,L.attach(e,"beam-editor",g.STYLE),I.of("beam")||h.publish(),this.ready=this.setLanguage(i)}messages;ready;parameterTexts;languageToken=0;currentId;form;list;timeline;row="on";onForm;lightForm;lightKeyForm;lightIndex;moveKeyForm;moveIndex;places;placeForm;placeIndex=0;language;shown=[];static STYLE='.beam-editor { flex-basis: 100%; min-width: 0; } .beam-editor #beam-timeline { flex-basis: 100%; min-width: 0; padding: 4px 0; } .beam-editor #beam-list, .beam-editor #beam-places { flex-basis: 100%; min-width: 0; } .beam-editor .launch-editor, .beam-editor .launch-fields { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; } .beam-editor .launch-fields { flex-basis: 100%; min-width: 0; } .beam-editor [hidden] { display: none !important; } .beam-editor select { min-width: 0; width: 100%; } .beam-editor .launch-intro { flex-basis: 100%; margin: 0; } .beam-editor .launch-track { flex-basis: 100%; margin: 0; } .beam-editor .launch-parameters { flex-basis: 100%; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; } .beam-editor .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; } .beam-editor input, .beam-editor select { max-width: 100%; box-sizing: border-box; } .beam-editor input[type="text"] { width: 12em; } .beam-editor #launch-title { width: 18em; } .beam-editor label { min-width: 0; max-width: 100%; } .beam-editor input.parameter-derived::placeholder { opacity: .65; } .beam-editor .launch-path { flex: 1 1 100%; min-width: 0; box-sizing: border-box; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: flex-start; }';async setLanguage(e){const t=++this.languageToken;this.language=e;const[i,s]=await Promise.all([A.load(e),O.load(e)]);t===this.languageToken&&(this.messages=i,this.parameterTexts=s,this.render(),this.sync())}sync(){if(!this.messages)return;const e=this.beams;this.shown=[...e],e.some(s=>s.id===this.currentId)||(this.currentId=e[0]?.id),this.list?.setItems(e.map(s=>({id:s.id,label:this.labelOf(s)})),this.currentId),this.syncAddState();const t=this.current;if(this.element("beam-fields").hidden=t===void 0,!t)return;const i={said:()=>this.host.said(),writingLanguage:()=>this.host.writingLanguage()};this.form??=new p(this.element("beam-parameters"),this.language,"beam.",i),this.form.show(this.resolved(h.SET),this.targetOfBeam(),()=>this.written()),this.syncDetail(!0)}refresh(){if(!this.messages)return;this.syncAddState();const e=this.beams;if(e.length===this.shown.length&&e.every((t,i)=>t.id===this.shown[i].id)){this.syncTimeline();return}this.sync()}setTime(e){this.messages&&this.timeline?.setTime(e)}syncAddState(){const e=this.pathOfNew()!==void 0;this.list?.setAddState(e,e?void 0:this.messages.addBeamNowhere)}get current(){return this.beams.find(e=>e.id===this.currentId)}show(e){this.messages&&(this.currentId=e,this.row="on",this.lightIndex=void 0,this.moveIndex=void 0,this.placeIndex=0,this.sync())}resolved(e){return M.resolve(e,this.parameterTexts)}render(){if(!this.messages)return;const e=this.messages;this.form=void 0,this.container.innerHTML=`<div class="launch-editor">
1
+ import{c as T,_ as c,a$ as E}from"./rr0-scene.mjs";import{P as I,S as L,a as p,b as M,I as x,E as w,c as f}from"./ParameterForm-ez-n_0Dw.js";import{L as u}from"./LaserBeam-B48FKTrt.js";import{T as _}from"./TimelineTracks-BQXJMJaJ.js";const O=T.catalog({en:()=>c(()=>import("./BeamParameterTexts_en-DZB75ouZ.js"),[],import.meta.url).then(l=>l.beamParameterTexts_en),fr:()=>c(()=>import("./BeamParameterTexts_fr-BHG3fW40.js"),[],import.meta.url).then(l=>l.beamParameterTexts_fr),es:()=>c(()=>import("./BeamParameterTexts_es-AeZmsufG.js"),[],import.meta.url).then(l=>l.beamParameterTexts_es),it:()=>c(()=>import("./BeamParameterTexts_it-CPwmQX-g.js"),[],import.meta.url).then(l=>l.beamParameterTexts_it)});class h{static LIGHT_TITLE="light";static BEAM="beam";static WHEN="when";static nextPlace(e){const t=e[e.length-1]??{lat:0,lng:0,altitudeM:0},i=e[e.length-2];return i?{lat:2*t.lat-i.lat,lng:2*t.lng-i.lng,altitudeM:2*t.altitudeM-i.altitudeM}:{lat:t.lat,lng:t.lng+500/(111320*Math.max(.05,Math.cos(t.lat*Math.PI/180))),altitudeM:t.altitudeM}}static instant(e,t,i,s=!1){return{type:"number",key:e,min:-3600,max:36e3,step:.1,unit:"s",scale:.001,label:t,hint:i,...s?{required:s}:{}}}static SET={kind:"beam",title:"beam",parameters:[{type:"said",key:"title",label:"name",group:h.BEAM},{type:"number",key:"divergenceMrad",min:.001,max:1e3,step:.001,unit:"mrad",group:h.BEAM,effective:()=>u.DEFAULT_DIVERGENCE_MRAD,label:"divergence",hint:"howFastItWidensFullAngle"},{type:"number",key:"apertureM",min:.001,max:10,step:.001,unit:"m",group:h.BEAM,effective:()=>u.DEFAULT_APERTURE_M,label:"widthAtTheEmitter"},{type:"number",key:"patchiness",min:0,max:100,step:1,unit:"%",scale:100,group:h.BEAM,effective:()=>u.DEFAULT_PATCHINESS,label:"unevenHaze",hint:"howUnevenlyTheHazeItCrosses"}]};static WAVELENGTH_HINT="itsColour532ForTheGreen";static POWER_HINT="theOpticalPowerItCarriesIts";static WAVELENGTH_LABEL="wavelength";static POWER_LABEL="power";static LIGHT={kind:"beam-light",title:h.LIGHT_TITLE,parameters:[{type:"number",key:"wavelengthNm",min:380,max:780,step:1,unit:"nm",required:!0,label:h.WAVELENGTH_LABEL,hint:h.WAVELENGTH_HINT},{type:"number",key:"powerW",min:.001,max:1e5,step:.001,unit:"W",required:!0,label:h.POWER_LABEL,hint:h.POWER_HINT}]};static LIGHT_KEY={kind:"beam-light-key",title:h.LIGHT_TITLE,parameters:[h.instant("t","time","secondsOfTheRecording",!0),{type:"number",key:"wavelengthNm",min:380,max:780,step:1,unit:"nm",label:h.WAVELENGTH_LABEL,hint:h.WAVELENGTH_HINT,effective:(e,t)=>t?.wavelengthNm},{type:"number",key:"powerW",min:.001,max:1e5,step:.001,unit:"W",label:h.POWER_LABEL,hint:h.POWER_HINT,effective:(e,t)=>t?.powerW}]};static ON={kind:"beam-on",title:h.WHEN,parameters:[h.instant("fromT","onFrom","secondsOfTheRecordingEmptyFrom"),h.instant("untilT","offAt","secondsOfTheRecordingEmptyUntil")]};static MOVE_KEY={kind:"beam-move-key",title:"pathAtAnInstant",parameters:[h.instant("t","time","secondsOfTheRecording",!0)]};static hexOf(e){const t=u.colourOf(e),i=Math.max(...t,1e-9),s=n=>{const o=Math.min(1,Math.max(0,n/i)),a=o<=.0031308?12.92*o:1.055*o**(1/2.4)-.055;return Math.round(a*255).toString(16).padStart(2,"0")};return`#${t.map(s).join("")}`}static wavelengthOf(e){const t=h.hueOf(e);let i=532,s=1/0;for(let n=400;n<=700;n++){const o=Math.abs((h.hueOf(h.hexOf(n))-t+540)%360-180);o<s&&(s=o,i=n)}return i}static hueOf(e){const t=Number.parseInt(e.replace("#",""),16),[i,s,n]=[t>>16&255,t>>8&255,t&255].map(b=>b/255),o=Math.max(i,s,n),a=Math.min(i,s,n);if(o===a)return 0;const r=o-a;return((o===i?(s-n)/r%6:o===s?(n-i)/r+2:(i-s)/r+4)*60+360)%360}static PLACE={kind:"beam-place",title:"pointOfThePath",parameters:[{type:"position",key:"lat",secondKey:"lng",saidKey:"saidPosition",native:"geo",step:.1,label:"position"},{type:"number",key:"altitudeM",min:-500,max:1e5,step:.1,unit:"m",required:!0,label:"altitude",hint:"aboveTheSeaNotTheGround"}]};static publish(){I.publish(h.SET)}}const A=T.catalog({en:()=>c(()=>import("./BeamEditorMessages_en-DDvPWAdd.js"),[],import.meta.url).then(l=>l.beamEditorMessages_en),fr:()=>c(()=>import("./BeamEditorMessages_fr-CtX6uP-x.js"),[],import.meta.url).then(l=>l.beamEditorMessages_fr),es:()=>c(()=>import("./BeamEditorMessages_es-BhCkhUkN.js"),[],import.meta.url).then(l=>l.beamEditorMessages_es),it:()=>c(()=>import("./BeamEditorMessages_it-DVweRQFi.js"),[],import.meta.url).then(l=>l.beamEditorMessages_it)});class g{constructor(e,t,i){this.container=e,this.host=t,this.language=i,L.attach(e,"beam-editor",g.STYLE),I.of("beam")||h.publish(),this.ready=this.setLanguage(i)}messages;ready;parameterTexts;languageToken=0;currentId;form;list;timeline;row="on";onForm;lightForm;lightKeyForm;lightIndex;moveKeyForm;moveIndex;places;placeForm;placeIndex=0;language;shown=[];static STYLE='.beam-editor { flex-basis: 100%; min-width: 0; } .beam-editor #beam-timeline { flex-basis: 100%; min-width: 0; padding: 4px 0; } .beam-editor #beam-list, .beam-editor #beam-places { flex-basis: 100%; min-width: 0; } .beam-editor .launch-editor, .beam-editor .launch-fields { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; } .beam-editor .launch-fields { flex-basis: 100%; min-width: 0; } .beam-editor [hidden] { display: none !important; } .beam-editor select { min-width: 0; width: 100%; } .beam-editor .launch-intro { flex-basis: 100%; margin: 0; } .beam-editor .launch-track { flex-basis: 100%; margin: 0; } .beam-editor .launch-parameters { flex-basis: 100%; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; } .beam-editor .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; } .beam-editor input, .beam-editor select { max-width: 100%; box-sizing: border-box; } .beam-editor input[type="text"] { width: 12em; } .beam-editor #launch-title { width: 18em; } .beam-editor label { min-width: 0; max-width: 100%; } .beam-editor input.parameter-derived::placeholder { opacity: .65; } .beam-editor .launch-path { flex: 1 1 100%; min-width: 0; box-sizing: border-box; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: flex-start; }';async setLanguage(e){const t=++this.languageToken;this.language=e;const[i,s]=await Promise.all([A.load(e),O.load(e)]);t===this.languageToken&&(this.messages=i,this.parameterTexts=s,this.render(),this.sync())}sync(){if(!this.messages)return;const e=this.beams;this.shown=[...e],e.some(s=>s.id===this.currentId)||(this.currentId=e[0]?.id),this.list?.setItems(e.map(s=>({id:s.id,label:this.labelOf(s)})),this.currentId),this.syncAddState();const t=this.current;if(this.element("beam-fields").hidden=t===void 0,!t)return;const i={said:()=>this.host.said(),writingLanguage:()=>this.host.writingLanguage()};this.form??=new p(this.element("beam-parameters"),this.language,"beam.",i),this.form.show(this.resolved(h.SET),this.targetOfBeam(),()=>this.written()),this.syncDetail(!0)}refresh(){if(!this.messages)return;this.syncAddState();const e=this.beams;if(e.length===this.shown.length&&e.every((t,i)=>t.id===this.shown[i].id)){this.syncTimeline();return}this.sync()}setTime(e){this.messages&&this.timeline?.setTime(e)}syncAddState(){const e=this.pathOfNew()!==void 0;this.list?.setAddState(e,e?void 0:this.messages.addBeamNowhere)}get current(){return this.beams.find(e=>e.id===this.currentId)}show(e){this.messages&&(this.currentId=e,this.row="on",this.lightIndex=void 0,this.moveIndex=void 0,this.placeIndex=0,this.sync())}resolved(e){return M.resolve(e,this.parameterTexts)}render(){if(!this.messages)return;const e=this.messages;this.form=void 0,this.container.innerHTML=`<div class="launch-editor">
2
2
  <p class="launch-intro">${e.intro}</p>
3
3
  <div id="beam-list"></div>
4
4
  <div id="beam-fields" class="launch-fields">
@@ -1 +1 @@
1
- import{G as V,B as W,h as H,d as m,J as v,K as k,X as D}from"./rr0-scene.mjs";import{L as S}from"./LaserBeam-DmH2JeMa.js";class x{static MAX_SEGMENTS=12e3;static MIN_PIXELS=2;static VERTICES_PER_SEGMENT=24;static HALO_RAD=.002;static HALO_SHARE=.15;static BRIGHTEST_RELATIVE=6e4;group=new V;mesh;positions=new Float32Array(x.MAX_SEGMENTS*x.VERTICES_PER_SEGMENT*3);colors=new Float32Array(x.MAX_SEGMENTS*x.VERTICES_PER_SEGMENT*3);segments=0;drawn=[];cut;constructor(){const s=new W;s.setAttribute("position",new H(this.positions,3)),s.setAttribute("color",new H(this.colors,3)),s.setDrawRange(0,0),this.mesh=new m(s,new v({vertexColors:!0,transparent:!0,blending:D,depthWrite:!1,fog:!1,side:k})),this.mesh.frustumCulled=!1,this.mesh.renderOrder=8,this.mesh.name="beams",this.group.name="beams",this.group.add(this.mesh)}get segmentCount(){return this.segments}get object(){return this.group}get drawnCount(){return this.segments}pick(s,t,e){return this.pickAt(s,t,e.toleranceRad)}update(s,t,e){const l=this.viewsOf(s,t,e);let r=0;this.segments=0,this.drawn=[];for(const h of l){const c=S.colourOf(h.wavelengthNm),i=this.place(h,t,e);this.drawn.push({id:h.id,points:i});for(let y=0;y+1<i.length&&!(this.segments>=x.MAX_SEGMENTS);y++){const E=this.pushSegment(r,i[y],i[y+1],h.wavelengthNm,c,e);E>r&&this.segments++,r=E}}const o=this.mesh.geometry;o.setDrawRange(0,r);for(const h of["position","color"]){const c=o.getAttribute(h);c.clearUpdateRanges(),r>0&&c.addUpdateRange(0,r*3),c.needsUpdate=!0}}viewsOf(s,t,e){const{lat:l,lng:r}=e.reference;(!this.cut||this.cut.lat!==l||this.cut.lng!==r||this.cut.air!==e.air)&&(this.cut={lat:l,lng:r,air:e.air,views:new Map});const o=this.cut.views,h=new Set(s);return S.onAt(s,t).map(c=>{if(!h.has(c))return S.viewOf(c,e.reference,e.air);let i=o.get(c);return i||o.set(c,i=S.viewOf(c,e.reference,e.air)),i})}place(s,t,e){const l=[],r=e.wind??{eastMS:0,northMS:0};for(const o of s.samples){const h=e.origin.x+o.eastM*e.eastScale,c=e.origin.z-o.northM,i=o.upM-e.siteElevationM;if(l.length>0&&i<e.groundYAt(h,c))break;const y=r.eastMS*o.dirEast+r.northMS*o.dirNorth,E=r.eastMS*o.dirNorth-r.northMS*o.dirEast,g=S.patchAt(o.fromSourceM,t,{windAlongMS:y,windAcrossMS:E,patchiness:s.patchiness});l.push({x:h,y:i,z:c,altitudeM:o.altitudeM,widthM:o.widthM,powerW:o.powerW,haze:g})}return l}static SMOOTH_RATIO=1.08;static MAX_HALVINGS=6;pushSegment(s,t,e,l,r,o,h=0){const c={x:e.x-t.x,y:e.y-t.y,z:e.z-t.z},i=Math.hypot(c.x,c.y,c.z);if(i<1e-6)return s;const y={x:c.x/i,y:c.y/i,z:c.z/i};if(Math.hypot((t.x+e.x)/2-o.eye.x,(t.y+e.y)/2-o.eye.y,(t.z+e.z)/2-o.eye.z)<.001)return s;const E=n=>{const u={x:o.eye.x-n.x,y:o.eye.y-n.y,z:o.eye.z-n.z},z=Math.hypot(u.x,u.y,u.z)||.001,d=(y.x*u.x+y.y*u.y+y.z*u.z)/z,a=Math.sqrt(Math.max(0,1-d*d)),w=S.coefficientsAt(o.air,l,n.altitudeM),p=S.phasedScattering({...w,aerosolPerM:w.aerosolPerM*n.haze},d);return{sinTurn:a,scattered:p,through:o.transmittanceTo(n.x,n.y,n.z)}},g=n=>x.MIN_PIXELS*o.pixelRad*Math.hypot(n.x-o.eye.x,n.y-o.eye.y,n.z-o.eye.z),N=n=>Math.hypot(n.x-o.eye.x,n.y-o.eye.y,n.z-o.eye.z),R=n=>Math.max(n.widthM,x.HALO_RAD*N(n)),f=n=>{const u=R(n)/g(n),z=Math.min(1,Math.max(0,u-1));return x.HALO_SHARE*z*z*(3-2*z)},O=new Map([t,e].map(n=>[n,E(n)])),M=(n,u,z)=>{const d=Math.max(u,g(n)),{sinTurn:a,scattered:w,through:p}=O.get(n),I=2*z*S.luminanceCdM2(n.powerW,l,w,d,a),L=r.map((C,X)=>Math.min(x.BRIGHTEST_RELATIVE,I*o.relativeScale*C*p[X])),_={x:o.eye.x-n.x,y:o.eye.y-n.y,z:o.eye.z-n.z},P=this.normalise(this.cross(y,_));return{point:n,half:d/2,level:L,across:P}},A=[[M(t,t.widthM,1-f(t)),M(e,e.widthM,1-f(e))],[M(t,R(t),f(t)),M(e,R(e),f(e))]],[G,T]=A[0].map(n=>Math.max(...n.level));if(h<x.MAX_HALVINGS&&Math.max(G,T)>x.SMOOTH_RATIO*Math.max(Math.min(G,T),1e-12)){const n={x:(t.x+e.x)/2,y:(t.y+e.y)/2,z:(t.z+e.z)/2,altitudeM:(t.altitudeM+e.altitudeM)/2,widthM:(t.widthM+e.widthM)/2,powerW:Math.sqrt(t.powerW*e.powerW),haze:(t.haze+e.haze)/2};return this.pushSegment(this.pushSegment(s,t,n,l,r,o,h+1),n,e,l,r,o,h+1)}if((s+x.VERTICES_PER_SEGMENT)*3>this.positions.length)return s;for(const n of A){if(n.every(a=>Math.max(...a.level)<=0))continue;const u=(a,w)=>{const p=s*3;this.positions[p]=a.point.x+a.across.x*a.half*w,this.positions[p+1]=a.point.y+a.across.y*a.half*w,this.positions[p+2]=a.point.z+a.across.z*a.half*w;const I=w===0?1:0;this.colors[p]=a.level[0]*I,this.colors[p+1]=a.level[1]*I,this.colors[p+2]=a.level[2]*I,s++},[z,d]=n;for(const a of[-1,1])u(z,a),u(z,0),u(d,a),u(z,0),u(d,0),u(d,a)}return s}pickAt(s,t,e){let l;for(const r of this.drawn)for(let o=0;o+1<r.points.length;o++){const h=r.points[o],c=r.points[o+1],i={x:c.x-h.x,y:c.y-h.y,z:c.z-h.z},y={x:h.x-s.x,y:h.y-s.y,z:h.z-s.z},E=i.x*i.x+i.y*i.y+i.z*i.z,g=i.x*t.x+i.y*t.y+i.z*t.z,N=i.x*y.x+i.y*y.y+i.z*y.z,R=t.x*y.x+t.y*y.y+t.z*y.z,f=E-g*g,O=f>1e-9?Math.min(1,Math.max(0,(g*R-N)/f)):0,M={x:h.x+i.x*O,y:h.y+i.y*O,z:h.z+i.z*O},A=(M.x-s.x)*t.x+(M.y-s.y)*t.y+(M.z-s.z)*t.z;if(A<=0)continue;const G=Math.hypot(M.x-s.x-t.x*A,M.y-s.y-t.y*A,M.z-s.z-t.z*A),T=Math.atan2(G,A);T<=e&&(!l||T<l.angle)&&(l={id:r.id,distanceM:Math.hypot(M.x-s.x,M.y-s.y,M.z-s.z),angle:T})}return l&&{id:l.id,distanceM:l.distanceM}}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(){this.mesh.geometry.dispose(),this.mesh.material.dispose(),this.group.removeFromParent()}}export{x as BeamSystem};
1
+ import{G as W,B as X,i as H,e as m,N as v,Q as k,Z as D}from"./rr0-scene.mjs";import{L as S}from"./LaserBeam-B48FKTrt.js";class x{static MAX_SEGMENTS=12e3;static MIN_PIXELS=2;static VERTICES_PER_SEGMENT=24;static HALO_RAD=.002;static HALO_SHARE=.15;static BRIGHTEST_RELATIVE=6e4;group=new W;mesh;positions=new Float32Array(x.MAX_SEGMENTS*x.VERTICES_PER_SEGMENT*3);colors=new Float32Array(x.MAX_SEGMENTS*x.VERTICES_PER_SEGMENT*3);segments=0;drawn=[];cut;constructor(){const s=new X;s.setAttribute("position",new H(this.positions,3)),s.setAttribute("color",new H(this.colors,3)),s.setDrawRange(0,0),this.mesh=new m(s,new v({vertexColors:!0,transparent:!0,blending:D,depthWrite:!1,fog:!1,side:k})),this.mesh.frustumCulled=!1,this.mesh.renderOrder=8,this.mesh.name="beams",this.group.name="beams",this.group.add(this.mesh)}get segmentCount(){return this.segments}get object(){return this.group}get drawnCount(){return this.segments}pick(s,t,e){return this.pickAt(s,t,e.toleranceRad)}update(s,t,e){const l=this.viewsOf(s,t,e);let r=0;this.segments=0,this.drawn=[];for(const h of l){const c=S.colourOf(h.wavelengthNm),i=this.place(h,t,e);this.drawn.push({id:h.id,points:i});for(let y=0;y+1<i.length&&!(this.segments>=x.MAX_SEGMENTS);y++){const E=this.pushSegment(r,i[y],i[y+1],h.wavelengthNm,c,e);E>r&&this.segments++,r=E}}const o=this.mesh.geometry;o.setDrawRange(0,r);for(const h of["position","color"]){const c=o.getAttribute(h);c.clearUpdateRanges(),r>0&&c.addUpdateRange(0,r*3),c.needsUpdate=!0}}viewsOf(s,t,e){const{lat:l,lng:r}=e.reference;(!this.cut||this.cut.lat!==l||this.cut.lng!==r||this.cut.air!==e.air)&&(this.cut={lat:l,lng:r,air:e.air,views:new Map});const o=this.cut.views,h=new Set(s);return S.onAt(s,t).map(c=>{if(!h.has(c))return S.viewOf(c,e.reference,e.air);let i=o.get(c);return i||o.set(c,i=S.viewOf(c,e.reference,e.air)),i})}place(s,t,e){const l=[],r=e.wind??{eastMS:0,northMS:0};for(const o of s.samples){const h=e.origin.x+o.eastM*e.eastScale,c=e.origin.z-o.northM,i=o.upM-e.siteElevationM;if(l.length>0&&i<e.groundYAt(h,c))break;const y=r.eastMS*o.dirEast+r.northMS*o.dirNorth,E=r.eastMS*o.dirNorth-r.northMS*o.dirEast,g=S.patchAt(o.fromSourceM,t,{windAlongMS:y,windAcrossMS:E,patchiness:s.patchiness});l.push({x:h,y:i,z:c,altitudeM:o.altitudeM,widthM:o.widthM,powerW:o.powerW,haze:g})}return l}static SMOOTH_RATIO=1.08;static MAX_HALVINGS=6;pushSegment(s,t,e,l,r,o,h=0){const c={x:e.x-t.x,y:e.y-t.y,z:e.z-t.z},i=Math.hypot(c.x,c.y,c.z);if(i<1e-6)return s;const y={x:c.x/i,y:c.y/i,z:c.z/i};if(Math.hypot((t.x+e.x)/2-o.eye.x,(t.y+e.y)/2-o.eye.y,(t.z+e.z)/2-o.eye.z)<.001)return s;const E=n=>{const u={x:o.eye.x-n.x,y:o.eye.y-n.y,z:o.eye.z-n.z},z=Math.hypot(u.x,u.y,u.z)||.001,p=(y.x*u.x+y.y*u.y+y.z*u.z)/z,a=Math.sqrt(Math.max(0,1-p*p)),w=S.coefficientsAt(o.air,l,n.altitudeM),d=S.phasedScattering({...w,aerosolPerM:w.aerosolPerM*n.haze},p);return{sinTurn:a,scattered:d,through:o.transmittanceTo(n.x,n.y,n.z)}},g=n=>x.MIN_PIXELS*o.pixelRad*Math.hypot(n.x-o.eye.x,n.y-o.eye.y,n.z-o.eye.z),N=n=>Math.hypot(n.x-o.eye.x,n.y-o.eye.y,n.z-o.eye.z),R=n=>Math.max(n.widthM,x.HALO_RAD*N(n)),f=n=>{const u=R(n)/g(n),z=Math.min(1,Math.max(0,u-1));return x.HALO_SHARE*z*z*(3-2*z)},O=new Map([t,e].map(n=>[n,E(n)])),M=(n,u,z)=>{const p=Math.max(u,g(n)),{sinTurn:a,scattered:w,through:d}=O.get(n),I=2*z*S.luminanceCdM2(n.powerW,l,w,p,a),L=r.map((C,V)=>Math.min(x.BRIGHTEST_RELATIVE,I*o.relativeScale*C*d[V])),_={x:o.eye.x-n.x,y:o.eye.y-n.y,z:o.eye.z-n.z},P=this.normalise(this.cross(y,_));return{point:n,half:p/2,level:L,across:P}},A=[[M(t,t.widthM,1-f(t)),M(e,e.widthM,1-f(e))],[M(t,R(t),f(t)),M(e,R(e),f(e))]],[G,T]=A[0].map(n=>Math.max(...n.level));if(h<x.MAX_HALVINGS&&Math.max(G,T)>x.SMOOTH_RATIO*Math.max(Math.min(G,T),1e-12)){const n={x:(t.x+e.x)/2,y:(t.y+e.y)/2,z:(t.z+e.z)/2,altitudeM:(t.altitudeM+e.altitudeM)/2,widthM:(t.widthM+e.widthM)/2,powerW:Math.sqrt(t.powerW*e.powerW),haze:(t.haze+e.haze)/2};return this.pushSegment(this.pushSegment(s,t,n,l,r,o,h+1),n,e,l,r,o,h+1)}if((s+x.VERTICES_PER_SEGMENT)*3>this.positions.length)return s;for(const n of A){if(n.every(a=>Math.max(...a.level)<=0))continue;const u=(a,w)=>{const d=s*3;this.positions[d]=a.point.x+a.across.x*a.half*w,this.positions[d+1]=a.point.y+a.across.y*a.half*w,this.positions[d+2]=a.point.z+a.across.z*a.half*w;const I=w===0?1:0;this.colors[d]=a.level[0]*I,this.colors[d+1]=a.level[1]*I,this.colors[d+2]=a.level[2]*I,s++},[z,p]=n;for(const a of[-1,1])u(z,a),u(z,0),u(p,a),u(z,0),u(p,0),u(p,a)}return s}pickAt(s,t,e){let l;for(const r of this.drawn)for(let o=0;o+1<r.points.length;o++){const h=r.points[o],c=r.points[o+1],i={x:c.x-h.x,y:c.y-h.y,z:c.z-h.z},y={x:h.x-s.x,y:h.y-s.y,z:h.z-s.z},E=i.x*i.x+i.y*i.y+i.z*i.z,g=i.x*t.x+i.y*t.y+i.z*t.z,N=i.x*y.x+i.y*y.y+i.z*y.z,R=t.x*y.x+t.y*y.y+t.z*y.z,f=E-g*g,O=f>1e-9?Math.min(1,Math.max(0,(g*R-N)/f)):0,M={x:h.x+i.x*O,y:h.y+i.y*O,z:h.z+i.z*O},A=(M.x-s.x)*t.x+(M.y-s.y)*t.y+(M.z-s.z)*t.z;if(A<=0)continue;const G=Math.hypot(M.x-s.x-t.x*A,M.y-s.y-t.y*A,M.z-s.z-t.z*A),T=Math.atan2(G,A);T<=e&&(!l||T<l.angle)&&(l={id:r.id,distanceM:Math.hypot(M.x-s.x,M.y-s.y,M.z-s.z),angle:T})}return l&&{id:l.id,distanceM:l.distanceM}}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(){this.mesh.geometry.dispose(),this.mesh.material.dispose(),this.group.removeFromParent()}}export{x as BeamSystem};
@@ -1 +1 @@
1
- import{G as F,B as m,h as I,d as X,J as B,K as D}from"./rr0-scene.mjs";import{C as x}from"./ContrailGrowth-DwHS8If9.js";class h{static MAX_SEGMENTS=8e3;static MIN_PIXELS=2;static UNRESOLVED_CONTRAST=.5;static STATIONS=[0,.5,1,1.5,2.25];static VERTICES_PER_SEGMENT=12*(h.STATIONS.length-1);static ICE_ASYMMETRY=.75;static phase(t){const s=h.ICE_ASYMMETRY;return(1-s*s)/(1+s*s-2*s*t)**1.5}object;group=new F;trails=[];positions=new Float32Array(h.MAX_SEGMENTS*h.VERTICES_PER_SEGMENT*3);colors=new Float32Array(h.MAX_SEGMENTS*h.VERTICES_PER_SEGMENT*4);segments=0;constructor(){const t=new m;t.setAttribute("position",new I(this.positions,3)),t.setAttribute("color",new I(this.colors,4)),t.setDrawRange(0,0),this.object=new X(t,new B({vertexColors:!0,transparent:!0,depthWrite:!1,side:D})),this.object.frustumCulled=!1,this.object.name="contrails",this.group.name="contrails",this.group.add(this.object)}get segmentCount(){return this.segments}set(t){this.trails=t}update(t,s,c){let p=0;this.segments=0;for(const o of this.trails){const u=this.samplesOf(o,t,s),i=c(o.id);for(let a=0;a+1<u.length;a++){const n=u[a],M=u[a+1];if(!n.forms||!M.forms)continue;if(this.segments>=h.MAX_SEGMENTS)break;const y=this.pushSegment(p,n,M,o.spanM,i,s);y>p&&this.segments++,p=y}}const d=this.object.geometry;d.setDrawRange(0,p);for(const[o,u]of[["position",3],["color",4]]){const i=d.getAttribute(o);i.clearUpdateRanges(),p>0&&i.addUpdateRange(0,p*u),i.needsUpdate=!0}}samplesOf(t,s,c){const p=s-x.FORMATION_S*1e3,d=[],o=(n,M,y,T,l,N)=>({x:M+n.driftEastMs*l+c.origin.x,y:T,z:-(y+n.driftNorthMs*l)+c.origin.z,age:l,forms:N,point:n});let u=-1;t.points.forEach((n,M)=>{n.tMs>p||(u=M,d.push(o(n,n.eastM,n.northM,n.upM,(s-n.tMs)/1e3,n.forms)))});const i=t.points[u],a=t.points[u+1];if(i&&a){const n=(p-i.tMs)/(a.tMs-i.tMs),M=(y,T)=>y+(T-y)*n;d.push(o(i,M(i.eastM,a.eastM),M(i.northM,a.northM),M(i.upM,a.upM),x.FORMATION_S,i.forms&&a.forms))}return d}pushSegment(t,s,c,p,d,o){const u=e=>({persistent:e.point.persistent,lifetimeS:e.point.lifetimeS,spanM:p,shearPerS:e.point.shearPerS,saturatedForS:e.point.saturatedForS}),i=x.opacity(s.age,u(s)),a=x.opacity(c.age,u(c));if(i<=0&&a<=0)return t;const n={x:c.x-s.x,y:c.y-s.y,z:c.z-s.z};if(Math.hypot(n.x,n.y,n.z)<1e-6)return t;const M={x:(s.x+c.x)/2-o.eye.x,y:(s.y+c.y)/2-o.eye.y,z:(s.z+c.z)/2-o.eye.z},y=this.normalise(this.cross(n,M)),T=e=>{if(!o.sun)return d;const r={x:e.x-o.eye.x,y:e.y-o.eye.y,z:e.z-o.eye.z},E=h.phase((o.sun.x*r.x+o.sun.y*r.y+o.sun.z*r.z)/(Math.hypot(r.x,r.y,r.z)||1));return[d[0]*E,d[1]*E,d[2]*E]},l=(e,r)=>{const E=Math.hypot(e.x-o.eye.x,e.y-o.eye.y,e.z-o.eye.z),A=x.widthM(p,e.age,e.point.shearPerS),g=Math.max(A,h.MIN_PIXELS*o.pixelRad*E),z=r*(A/g)**h.UNRESOLVED_CONTRAST,S=x.profileExponent(e.age),G=h.STATIONS.map((j,P)=>P===h.STATIONS.length-1?0:z*Math.exp(-Math.LN2*j**S));return{half:g/2,profile:G,scattered:T(e)}},N=[{sample:s,...l(s,i)},{sample:c,...l(c,a)}],w=h.STATIONS.length-1,f=(e,r,E)=>{const A=h.STATIONS[r],g=e.half*A*E,z=t*3;this.positions[z]=e.sample.x+y.x*g,this.positions[z+1]=e.sample.y+y.y*g,this.positions[z+2]=e.sample.z+y.z*g;const S=t*4;this.colors[S]=e.scattered[0],this.colors[S+1]=e.scattered[1],this.colors[S+2]=e.scattered[2],this.colors[S+3]=e.profile[r],t++},[R,O]=N;for(const e of[-1,1])for(let r=0;r<w;r++)f(R,r+1,e),f(R,r,e),f(O,r+1,e),f(R,r,e),f(O,r,e),f(O,r+1,e);return t}cross(t,s){return{x:t.y*s.z-t.z*s.y,y:t.z*s.x-t.x*s.z,z:t.x*s.y-t.y*s.x}}normalise(t){const s=Math.hypot(t.x,t.y,t.z)||1;return{x:t.x/s,y:t.y/s,z:t.z/s}}dispose(){this.object.geometry.dispose(),this.object.material.dispose(),this.group.removeFromParent()}}export{h as ContrailSystem};
1
+ import{G as F,B as m,i as I,e as X,N as B,Q as D}from"./rr0-scene.mjs";import{C as x}from"./ContrailGrowth-DwHS8If9.js";class h{static MAX_SEGMENTS=8e3;static MIN_PIXELS=2;static UNRESOLVED_CONTRAST=.5;static STATIONS=[0,.5,1,1.5,2.25];static VERTICES_PER_SEGMENT=12*(h.STATIONS.length-1);static ICE_ASYMMETRY=.75;static phase(t){const s=h.ICE_ASYMMETRY;return(1-s*s)/(1+s*s-2*s*t)**1.5}object;group=new F;trails=[];positions=new Float32Array(h.MAX_SEGMENTS*h.VERTICES_PER_SEGMENT*3);colors=new Float32Array(h.MAX_SEGMENTS*h.VERTICES_PER_SEGMENT*4);segments=0;constructor(){const t=new m;t.setAttribute("position",new I(this.positions,3)),t.setAttribute("color",new I(this.colors,4)),t.setDrawRange(0,0),this.object=new X(t,new B({vertexColors:!0,transparent:!0,depthWrite:!1,side:D})),this.object.frustumCulled=!1,this.object.name="contrails",this.group.name="contrails",this.group.add(this.object)}get segmentCount(){return this.segments}set(t){this.trails=t}update(t,s,c){let p=0;this.segments=0;for(const o of this.trails){const u=this.samplesOf(o,t,s),i=c(o.id);for(let a=0;a+1<u.length;a++){const n=u[a],M=u[a+1];if(!n.forms||!M.forms)continue;if(this.segments>=h.MAX_SEGMENTS)break;const d=this.pushSegment(p,n,M,o.spanM,i,s);d>p&&this.segments++,p=d}}const y=this.object.geometry;y.setDrawRange(0,p);for(const[o,u]of[["position",3],["color",4]]){const i=y.getAttribute(o);i.clearUpdateRanges(),p>0&&i.addUpdateRange(0,p*u),i.needsUpdate=!0}}samplesOf(t,s,c){const p=s-x.FORMATION_S*1e3,y=[],o=(n,M,d,T,l,N)=>({x:M+n.driftEastMs*l+c.origin.x,y:T,z:-(d+n.driftNorthMs*l)+c.origin.z,age:l,forms:N,point:n});let u=-1;t.points.forEach((n,M)=>{n.tMs>p||(u=M,y.push(o(n,n.eastM,n.northM,n.upM,(s-n.tMs)/1e3,n.forms)))});const i=t.points[u],a=t.points[u+1];if(i&&a){const n=(p-i.tMs)/(a.tMs-i.tMs),M=(d,T)=>d+(T-d)*n;y.push(o(i,M(i.eastM,a.eastM),M(i.northM,a.northM),M(i.upM,a.upM),x.FORMATION_S,i.forms&&a.forms))}return y}pushSegment(t,s,c,p,y,o){const u=e=>({persistent:e.point.persistent,lifetimeS:e.point.lifetimeS,spanM:p,shearPerS:e.point.shearPerS,saturatedForS:e.point.saturatedForS}),i=x.opacity(s.age,u(s)),a=x.opacity(c.age,u(c));if(i<=0&&a<=0)return t;const n={x:c.x-s.x,y:c.y-s.y,z:c.z-s.z};if(Math.hypot(n.x,n.y,n.z)<1e-6)return t;const M={x:(s.x+c.x)/2-o.eye.x,y:(s.y+c.y)/2-o.eye.y,z:(s.z+c.z)/2-o.eye.z},d=this.normalise(this.cross(n,M)),T=e=>{if(!o.sun)return y;const r={x:e.x-o.eye.x,y:e.y-o.eye.y,z:e.z-o.eye.z},E=h.phase((o.sun.x*r.x+o.sun.y*r.y+o.sun.z*r.z)/(Math.hypot(r.x,r.y,r.z)||1));return[y[0]*E,y[1]*E,y[2]*E]},l=(e,r)=>{const E=Math.hypot(e.x-o.eye.x,e.y-o.eye.y,e.z-o.eye.z),A=x.widthM(p,e.age,e.point.shearPerS),g=Math.max(A,h.MIN_PIXELS*o.pixelRad*E),z=r*(A/g)**h.UNRESOLVED_CONTRAST,S=x.profileExponent(e.age),G=h.STATIONS.map((j,P)=>P===h.STATIONS.length-1?0:z*Math.exp(-Math.LN2*j**S));return{half:g/2,profile:G,scattered:T(e)}},N=[{sample:s,...l(s,i)},{sample:c,...l(c,a)}],w=h.STATIONS.length-1,f=(e,r,E)=>{const A=h.STATIONS[r],g=e.half*A*E,z=t*3;this.positions[z]=e.sample.x+d.x*g,this.positions[z+1]=e.sample.y+d.y*g,this.positions[z+2]=e.sample.z+d.z*g;const S=t*4;this.colors[S]=e.scattered[0],this.colors[S+1]=e.scattered[1],this.colors[S+2]=e.scattered[2],this.colors[S+3]=e.profile[r],t++},[R,O]=N;for(const e of[-1,1])for(let r=0;r<w;r++)f(R,r+1,e),f(R,r,e),f(O,r+1,e),f(R,r,e),f(O,r,e),f(O,r+1,e);return t}cross(t,s){return{x:t.y*s.z-t.z*s.y,y:t.z*s.x-t.x*s.z,z:t.x*s.y-t.y*s.x}}normalise(t){const s=Math.hypot(t.x,t.y,t.z)||1;return{x:t.x/s,y:t.y/s,z:t.z/s}}dispose(){this.object.geometry.dispose(),this.object.material.dispose(),this.group.removeFromParent()}}export{h as ContrailSystem};
@@ -0,0 +1,29 @@
1
+ import{$ as A,V as F,a0 as E,a1 as P,a2 as M,a3 as R,a4 as D,e as U,C as b,q as k}from"./rr0-scene.mjs";class w{target;wideCamera=new A;materials=new Map;draw(a){const{renderer:s,camera:r,equidistant:e}=a,i=s.getDrawingBufferSize(new F),n=i.x,o=i.y,t=n/o;if(e&&!E.supports(r.fov,t))throw new Error(`A field of ${r.fov}° is drawn through a cube, which the control passes do not follow yet: export through a narrower field.`);const c=this.sourceCamera(r,e?e.sourceFovDeg(r.fov,t):r.fov),f=this.usableTarget(n,o),l=this.drawDistance(a,c,f),d=this.drawPhenomenon(a,c,f),h=Math.tan(c.fov*Math.PI/360),u=new Float32Array(n*o),p=new Uint8Array(n*o);for(let v=0;v<o;v++)for(let g=0;g<n;g++){const m=this.sourcePixel(g,v,n,o,r.fov,t,h,e);if(m<0)continue;const x=v*n+g;u[x]=l[m*4];const y=d[m*4],C=d[m*4+1],T=d[m*4+2],_=d[m*4+3];p[x]=Math.max(y,C,T,_)>w.LIGHT_THRESHOLD?255:0}return{width:n,height:o,distanceM:u,phenomenon:p}}dispose(){this.target?.dispose();for(const a of this.materials.values())a.dispose();this.materials.clear()}static LIGHT_THRESHOLD=1e-6;sourcePixel(a,s,r,e,i,n,o,t){if(!t)return(e-1-s)*r+a;const c=(a+.5)/r*2-1,f=1-(s+.5)/e*2,l=t.directionFor(c,f,i);if(l.z>=0)return-1;const d=l.x/-l.z/(o*n),h=l.y/-l.z/o,u=Math.floor((d+1)/2*r),p=Math.floor((h+1)/2*e);return u<0||u>=r||p<0||p>=e?-1:p*r+u}sourceCamera(a,s){const r=this.wideCamera.copy(a);return r.fov=s,r.clearViewOffset(),r.updateProjectionMatrix(),r.updateMatrixWorld(),r}usableTarget(a,s){return this.target?(this.target.width!==a||this.target.height!==s)&&this.target.setSize(a,s):this.target=new P(a,s,{type:D,format:R,minFilter:M,magFilter:M,depthBuffer:!0}),this.target}drawDistance(a,s,r){const{renderer:e,scene:i}=a,n=[],o=[];for(const t of a.sky)t.visible&&(t.visible=!1,n.push(t));i.traverseVisible(t=>{if(t instanceof U){if(a.isSolid(t)){o.push({mesh:t,material:t.material}),t.material=Array.isArray(t.material)?t.material.map(c=>this.distanceMaterial(c)):this.distanceMaterial(t.material);return}}else if(!t.isPoints&&!t.isLine&&!t.isSprite)return;n.push(t)});for(const t of n)t.visible=!1;try{return this.drawInto(a,r,()=>e.render(i,s))}finally{for(const t of n)t.visible=!0;for(const{mesh:t,material:c}of o)t.material=c}}drawPhenomenon(a,s,r){return this.drawInto(a,r,()=>a.drawPhenomena(s))}drawInto(a,s,r){const{renderer:e,scene:i}=a,n=e.getRenderTarget(),o=e.autoClear,t=e.shadowMap.autoUpdate,c=i.fog,f=i.background,l=e.getClearAlpha(),d=e.getClearColor(new b);i.fog=null,i.background=null,e.shadowMap.autoUpdate=!1,e.setRenderTarget(s),e.setClearColor(0,0),e.clear(!0,!0,!0),e.autoClear=!1;try{r();const h=new Float32Array(s.width*s.height*4),u=e.getContext();return u.bindBuffer(u.PIXEL_PACK_BUFFER,null),e.readRenderTargetPixels(s,0,0,s.width,s.height,h),h}finally{e.autoClear=o,e.shadowMap.autoUpdate=t,e.setRenderTarget(n),e.setClearColor(d,l),i.fog=c,i.background=f}}distanceMaterial(a){const s=a.alphaTest??0,r=a.map??a.alphaMap??null,e=s>0&&r!==null,i=`${a.side}:${e?`${r.uuid}:${s}`:"-"}`;let n=this.materials.get(i);return n||(n=new k({defines:e?{CUTOUT:"",USE_UV:""}:{},uniforms:{cutoutMap:{value:r},cutoutAlpha:{value:s}},vertexShader:w.VERTEX,fragmentShader:w.FRAGMENT,side:a.side}),this.materials.set(i,n)),n}static VERTEX=`
2
+ #include <common>
3
+ #include <uv_pars_vertex>
4
+ #include <batching_pars_vertex>
5
+ #include <morphtarget_pars_vertex>
6
+ #include <skinning_pars_vertex>
7
+ varying float vDistance;
8
+ void main() {
9
+ #include <uv_vertex>
10
+ #include <batching_vertex>
11
+ #include <skinbase_vertex>
12
+ #include <begin_vertex>
13
+ #include <morphtarget_vertex>
14
+ #include <skinning_vertex>
15
+ #include <project_vertex>
16
+ vDistance = length(mvPosition.xyz);
17
+ }
18
+ `;static FRAGMENT=`
19
+ #include <uv_pars_fragment>
20
+ uniform sampler2D cutoutMap;
21
+ uniform float cutoutAlpha;
22
+ varying float vDistance;
23
+ void main() {
24
+ #ifdef CUTOUT
25
+ if (texture2D(cutoutMap, vUv).a < cutoutAlpha) discard;
26
+ #endif
27
+ gl_FragColor = vec4(vDistance, 0.0, 0.0, 1.0);
28
+ }
29
+ `}export{w as ControlPasses};
@@ -0,0 +1 @@
1
+ class o{static TEXT_SHARE=.032;static MARGIN=.8;static LINE_SHARE=.9;static FONT="system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif";static LOGO_URL=new URL(""+new URL("logo-h2-w4Mwu.png",import.meta.url).href,import.meta.url).href;static LOGO_SHARE=.08;static LOGO_OPACITY=.45;static logo;static loadLogo(){return o.logo??=fetch(o.LOGO_URL).then(t=>t.ok?t.blob():Promise.reject(new Error(`Logo: ${t.status}`))).then(t=>createImageBitmap(t)).catch(t=>{console.warn("UFO@home: the film's logo could not be loaded:",t)})}static paint(t,i,e){const{width:d,height:f}=t.canvas,l=Math.max(10,Math.round(f*o.TEXT_SHARE));let c=d*o.LINE_SHARE;t.save();try{if(e){const s=Math.round(f*o.LOGO_SHARE),w=l*o.MARGIN;t.globalAlpha=o.LOGO_OPACITY,t.imageSmoothingQuality="high",t.drawImage(e,d-w-s,f-w-s,s,s),t.globalAlpha=1,c=Math.min(c,d-2*(s+2*w))}if(i.map){const s=i.map;t.drawImage(s.canvas,s.left*d,s.top*f,s.width*d,s.height*f)}t.fillStyle="#fff",t.shadowColor="rgba(0, 0, 0, 0.9)",t.shadowBlur=l*.3,t.shadowOffsetY=l*.06,i.time&&(t.font=`600 ${l}px ${o.FONT}`,t.textBaseline="top",t.textAlign="left",t.fillText(i.time,l*o.MARGIN,l*o.MARGIN)),i.caption&&o.paintCaption(t,i.caption,l,c)}finally{t.restore()}}static paintCaption(t,i,e,d){const{width:f,height:l}=t.canvas,c=`700 ${e}px ${o.FONT}`,s=`400 ${e}px ${o.FONT}`,R=[...i.label.split(/\s+/).filter(Boolean).map(n=>({text:n,font:c})),...i.note?`— ${i.note}`.split(/\s+/).filter(Boolean).map(n=>({text:n,font:s})):[]].map(n=>(t.font=n.font,{...n,width:t.measureText(n.text).width}));t.font=s;const u=t.measureText(" ").width,h=[];let a={words:[],width:0};for(const n of R){const p=a.width+(a.words.length>0?u:0)+n.width;a.words.length>0&&p>d&&(h.push(a),a={words:[],width:0}),a.width+=(a.words.length>0?u:0)+n.width,a.words.push(n)}a.words.length>0&&h.push(a);const A=e*1.3;t.textBaseline="alphabetic",t.textAlign="left";let x=l-e*o.MARGIN-(h.length-1)*A;for(const n of h){let p=(f-n.width)/2;for(const O of n.words)t.font=O.font,t.fillText(O.text,p,x),p+=O.width+u;x+=A}}}export{o as FilmChrome};
@@ -1 +1 @@
1
- import{ab as R,a as l,T as I}from"./rr0-scene.mjs";class p extends Error{constructor(t){super(t),this.problem=t}}class e{citation=R;static FIRST_MS=Date.UTC(2016,4,11);static DEFAULT_RADIUS_KM=100;static RINGS_KM=[25,50];static SNAPSHOT_LIMIT=60;static SMALLEST_PLAN_RESULTS=20;static MAX_TRACED=8;static CREDITS_PER_SNAPSHOT_FLIGHT=8;static CREDITS_PER_TRACK=40;static CREDITS_FOR_NOTHING=1;static MAX_CREDITS_PER_PAGE=5e3;static WORST_CASE_CREDITS=(e.MAX_TRACED-1)*e.RINGS_KM.length*e.CREDITS_PER_SNAPSHOT_FLIGHT+e.SNAPSHOT_LIMIT*e.CREDITS_PER_SNAPSHOT_FLIGHT+e.MAX_TRACED*e.CREDITS_PER_TRACK;static API="https://fr24api.flightradar24.com/api";static IN_THE_AIR_FT="1-60000";static KM_PER_DEG=111.32;token;fetchImpl;settleMs;requestsPerMinute;snapshots=[];tracks=new Map;descriptions=new Map;requestTimes=[];tokenOfMemory;latestQuestion=0;creditsSpent=0;constructor(t){this.token=t.token,this.fetchImpl=t.fetchImpl??fetch.bind(globalThis),this.settleMs=t.settleMs??1500,this.requestsPerMinute=t.requestsPerMinute??10}mayCover(t){return t>=e.FIRST_MS&&t<=Date.now()}async between(t,n,i,o=e.DEFAULT_RADIUS_KM){const u=this.token();if(!u)return{status:"failed",problem:"credential"};u!==this.tokenOfMemory&&this.forgetAnswers(u);try{const a=await this.snapshotFor(u,t,n,i,o);if(!a)return{status:"failed"};const s=a.flights.slice(0,e.MAX_TRACED),h=await Promise.all(s.map(c=>this.trackOf(u,c))),f=[];return s.forEach((c,r)=>{const S=h[r].filter(T=>T.t>=n&&T.t<=i&&l.groundDistanceKm(t,T)<=o);S.length>0&&f.push({...e.addressOf(c),points:S})}),{status:"found",tracks:f,creditsSpent:this.creditsSpent,partial:{traced:s.length,seen:a.flights.length,moreSeen:a.flights.length>=e.SMALLEST_PLAN_RESULTS,withinKm:a.withinKm}}}catch(a){return{status:"failed",problem:a instanceof p?a.problem:"network",creditsSpent:this.creditsSpent}}}async describe(t){return this.descriptions.get(I.keyOf(t))}static addressOf(t){const n=t.hex?Number.parseInt(t.hex,16):Number.NaN;return Number.isFinite(n)?{icao:n,nonIcao:!1}:{icao:Number.parseInt(t.fr24_id,16),nonIcao:!0}}static boundsAround(t,n){const i=n/e.KM_PER_DEG,o=Math.min(90,t.lat+i),u=Math.max(-90,t.lat-i),a=Math.cos(Math.max(Math.abs(o),Math.abs(u))*Math.PI/180),s=a<1e-6?180:n/(e.KM_PER_DEG*a),h=Math.max(-180,t.lng-s),f=Math.min(180,t.lng+s);return[o,u,h,f].map(c=>c.toFixed(3)).join(",")}forgetAnswers(t){this.tokenOfMemory=t,this.snapshots.length=0,this.tracks.clear(),this.descriptions.clear()}async snapshotFor(t,n,i,o,u){const a=`${n.lat.toFixed(3)},${n.lng.toFixed(3)},${u}`;for(const f of this.snapshots){const c=await f.catch(()=>{});if(c&&c.place===a&&c.t>=i&&c.t<=o)return c}const s=++this.latestQuestion;if(this.settleMs>0&&await new Promise(f=>setTimeout(f,this.settleMs)),s!==this.latestQuestion)return;if(this.creditsSpent+e.WORST_CASE_CREDITS>e.MAX_CREDITS_PER_PAGE)throw new p("budget");const h=this.askSnapshot(t,n,Math.round((i+o)/2),u,a);return this.snapshots.push(h),h.catch(()=>this.snapshots.splice(this.snapshots.indexOf(h),1)),h}async askSnapshot(t,n,i,o,u){const a=[...e.RINGS_KM.filter(c=>c<o),o];let s=[],h=o;for(const c of a)if(h=c,s=await this.flightsWithin(t,n,i,c),s.length>=e.MAX_TRACED)break;const f=c=>l.groundDistanceKm(n,{lat:c.lat,lng:c.lon});return{t:i,place:u,withinKm:h,flights:[...s].sort((c,r)=>f(c)-f(r))}}async flightsWithin(t,n,i,o){const u=new URLSearchParams({timestamp:String(Math.floor(i/1e3)),bounds:e.boundsAround(n,o),altitude_ranges:e.IN_THE_AIR_FT,limit:String(e.SNAPSHOT_LIMIT)}),s=(await this.get(t,`/historic/flight-positions/full?${u}`)).data??[];this.creditsSpent+=s.length>0?s.length*e.CREDITS_PER_SNAPSHOT_FLIGHT:e.CREDITS_FOR_NOTHING;for(const h of s){const f={type:h.type||void 0,registration:h.reg||void 0};(f.type||f.registration)&&this.descriptions.set(I.keyOf(e.addressOf(h)),f)}return s}trackOf(t,n){let i=this.tracks.get(n.fr24_id);return i||(i=this.get(t,`/flight-tracks?flight_id=${encodeURIComponent(n.fr24_id)}`).then(o=>{const a=(Array.isArray(o)?o:o.data??[]).flatMap(s=>s.tracks??[]);return this.creditsSpent+=a.length>0?e.CREDITS_PER_TRACK:e.CREDITS_FOR_NOTHING,a.filter(s=>s.source?.toUpperCase()!=="ESTIMATED"&&s.alt>0).map(s=>({t:Date.parse(s.timestamp),lat:s.lat,lng:s.lon,altitudeFt:s.alt,groundSpeedKt:s.gspeed,trackDeg:s.track})).sort((s,h)=>s.t-h.t)}),i.catch(()=>this.tracks.delete(n.fr24_id)),this.tracks.set(n.fr24_id,i)),i}async get(t,n){await this.paced();const i=await this.fetchImpl(`${e.API}${n}`,{headers:{Accept:"application/json","Accept-Version":"v1",Authorization:`Bearer ${t}`}});if(!i.ok)throw new p(e.problemOf(i.status));return await i.json()}static problemOf(t){switch(t){case 401:return"credential";case 402:return"credits";case 429:return"rate";case 400:case 403:case 404:return"refused";default:return"network"}}async paced(){for(;;){const t=Date.now();for(;this.requestTimes.length>0&&t-this.requestTimes[0]>=6e4;)this.requestTimes.shift();if(this.requestTimes.length<this.requestsPerMinute){this.requestTimes.push(t);return}await new Promise(n=>setTimeout(n,6e4-(t-this.requestTimes[0])+50))}}}export{e as Flightradar24Provider};
1
+ import{aj as R,a as l,T as I}from"./rr0-scene.mjs";class p extends Error{constructor(t){super(t),this.problem=t}}class e{citation=R;static FIRST_MS=Date.UTC(2016,4,11);static DEFAULT_RADIUS_KM=100;static RINGS_KM=[25,50];static SNAPSHOT_LIMIT=60;static SMALLEST_PLAN_RESULTS=20;static MAX_TRACED=8;static CREDITS_PER_SNAPSHOT_FLIGHT=8;static CREDITS_PER_TRACK=40;static CREDITS_FOR_NOTHING=1;static MAX_CREDITS_PER_PAGE=5e3;static WORST_CASE_CREDITS=(e.MAX_TRACED-1)*e.RINGS_KM.length*e.CREDITS_PER_SNAPSHOT_FLIGHT+e.SNAPSHOT_LIMIT*e.CREDITS_PER_SNAPSHOT_FLIGHT+e.MAX_TRACED*e.CREDITS_PER_TRACK;static API="https://fr24api.flightradar24.com/api";static IN_THE_AIR_FT="1-60000";static KM_PER_DEG=111.32;token;fetchImpl;settleMs;requestsPerMinute;snapshots=[];tracks=new Map;descriptions=new Map;requestTimes=[];tokenOfMemory;latestQuestion=0;creditsSpent=0;constructor(t){this.token=t.token,this.fetchImpl=t.fetchImpl??fetch.bind(globalThis),this.settleMs=t.settleMs??1500,this.requestsPerMinute=t.requestsPerMinute??10}mayCover(t){return t>=e.FIRST_MS&&t<=Date.now()}async between(t,n,i,o=e.DEFAULT_RADIUS_KM){const u=this.token();if(!u)return{status:"failed",problem:"credential"};u!==this.tokenOfMemory&&this.forgetAnswers(u);try{const a=await this.snapshotFor(u,t,n,i,o);if(!a)return{status:"failed"};const s=a.flights.slice(0,e.MAX_TRACED),h=await Promise.all(s.map(c=>this.trackOf(u,c))),f=[];return s.forEach((c,r)=>{const S=h[r].filter(T=>T.t>=n&&T.t<=i&&l.groundDistanceKm(t,T)<=o);S.length>0&&f.push({...e.addressOf(c),points:S})}),{status:"found",tracks:f,creditsSpent:this.creditsSpent,partial:{traced:s.length,seen:a.flights.length,moreSeen:a.flights.length>=e.SMALLEST_PLAN_RESULTS,withinKm:a.withinKm}}}catch(a){return{status:"failed",problem:a instanceof p?a.problem:"network",creditsSpent:this.creditsSpent}}}async describe(t){return this.descriptions.get(I.keyOf(t))}static addressOf(t){const n=t.hex?Number.parseInt(t.hex,16):Number.NaN;return Number.isFinite(n)?{icao:n,nonIcao:!1}:{icao:Number.parseInt(t.fr24_id,16),nonIcao:!0}}static boundsAround(t,n){const i=n/e.KM_PER_DEG,o=Math.min(90,t.lat+i),u=Math.max(-90,t.lat-i),a=Math.cos(Math.max(Math.abs(o),Math.abs(u))*Math.PI/180),s=a<1e-6?180:n/(e.KM_PER_DEG*a),h=Math.max(-180,t.lng-s),f=Math.min(180,t.lng+s);return[o,u,h,f].map(c=>c.toFixed(3)).join(",")}forgetAnswers(t){this.tokenOfMemory=t,this.snapshots.length=0,this.tracks.clear(),this.descriptions.clear()}async snapshotFor(t,n,i,o,u){const a=`${n.lat.toFixed(3)},${n.lng.toFixed(3)},${u}`;for(const f of this.snapshots){const c=await f.catch(()=>{});if(c&&c.place===a&&c.t>=i&&c.t<=o)return c}const s=++this.latestQuestion;if(this.settleMs>0&&await new Promise(f=>setTimeout(f,this.settleMs)),s!==this.latestQuestion)return;if(this.creditsSpent+e.WORST_CASE_CREDITS>e.MAX_CREDITS_PER_PAGE)throw new p("budget");const h=this.askSnapshot(t,n,Math.round((i+o)/2),u,a);return this.snapshots.push(h),h.catch(()=>this.snapshots.splice(this.snapshots.indexOf(h),1)),h}async askSnapshot(t,n,i,o,u){const a=[...e.RINGS_KM.filter(c=>c<o),o];let s=[],h=o;for(const c of a)if(h=c,s=await this.flightsWithin(t,n,i,c),s.length>=e.MAX_TRACED)break;const f=c=>l.groundDistanceKm(n,{lat:c.lat,lng:c.lon});return{t:i,place:u,withinKm:h,flights:[...s].sort((c,r)=>f(c)-f(r))}}async flightsWithin(t,n,i,o){const u=new URLSearchParams({timestamp:String(Math.floor(i/1e3)),bounds:e.boundsAround(n,o),altitude_ranges:e.IN_THE_AIR_FT,limit:String(e.SNAPSHOT_LIMIT)}),s=(await this.get(t,`/historic/flight-positions/full?${u}`)).data??[];this.creditsSpent+=s.length>0?s.length*e.CREDITS_PER_SNAPSHOT_FLIGHT:e.CREDITS_FOR_NOTHING;for(const h of s){const f={type:h.type||void 0,registration:h.reg||void 0};(f.type||f.registration)&&this.descriptions.set(I.keyOf(e.addressOf(h)),f)}return s}trackOf(t,n){let i=this.tracks.get(n.fr24_id);return i||(i=this.get(t,`/flight-tracks?flight_id=${encodeURIComponent(n.fr24_id)}`).then(o=>{const a=(Array.isArray(o)?o:o.data??[]).flatMap(s=>s.tracks??[]);return this.creditsSpent+=a.length>0?e.CREDITS_PER_TRACK:e.CREDITS_FOR_NOTHING,a.filter(s=>s.source?.toUpperCase()!=="ESTIMATED"&&s.alt>0).map(s=>({t:Date.parse(s.timestamp),lat:s.lat,lng:s.lon,altitudeFt:s.alt,groundSpeedKt:s.gspeed,trackDeg:s.track})).sort((s,h)=>s.t-h.t)}),i.catch(()=>this.tracks.delete(n.fr24_id)),this.tracks.set(n.fr24_id,i)),i}async get(t,n){await this.paced();const i=await this.fetchImpl(`${e.API}${n}`,{headers:{Accept:"application/json","Accept-Version":"v1",Authorization:`Bearer ${t}`}});if(!i.ok)throw new p(e.problemOf(i.status));return await i.json()}static problemOf(t){switch(t){case 401:return"credential";case 402:return"credits";case 429:return"rate";case 400:case 403:case 404:return"refused";default:return"network"}}async paced(){for(;;){const t=Date.now();for(;this.requestTimes.length>0&&t-this.requestTimes[0]>=6e4;)this.requestTimes.shift();if(this.requestTimes.length<this.requestsPerMinute){this.requestTimes.push(t);return}await new Promise(n=>setTimeout(n,6e4-(t-this.requestTimes[0])+50))}}}export{e as Flightradar24Provider};