@rr0/ufoathome 0.200.0 → 0.201.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 (436) hide show
  1. package/dist-embed-interview/InterviewMessages_en-BRmuWrAg.js +1 -0
  2. package/dist-embed-interview/InterviewMessages_es-BTotimwY.js +1 -0
  3. package/dist-embed-interview/InterviewMessages_fr-DBCdGB0r.js +1 -0
  4. package/dist-embed-interview/InterviewMessages_it-B5EyMD-k.js +1 -0
  5. package/dist-embed-interview/rr0-interview.mjs +1 -1
  6. package/dist-embed-scene/{AirshipEditor-B0RloPOv.js → AirshipEditor-BnRmKeVs.js} +1 -1
  7. package/dist-embed-scene/{AirshipFlight-D6tC26P5.js → AirshipFlight-C9DSPGwk.js} +1 -1
  8. package/dist-embed-scene/Aurora-BmVyTP6i.js +1 -0
  9. package/dist-embed-scene/AuroraEditor-CN6BQMUW.js +8 -0
  10. package/dist-embed-scene/AuroraEditorMessages_en-CpU3BS-B.js +1 -0
  11. package/dist-embed-scene/AuroraEditorMessages_es-i8-psDHN.js +1 -0
  12. package/dist-embed-scene/AuroraEditorMessages_fr-0DtPXXAs.js +1 -0
  13. package/dist-embed-scene/AuroraEditorMessages_it-Dn2UHyk9.js +1 -0
  14. package/dist-embed-scene/AuroraKindMessages_en-D_W4giJa.js +1 -0
  15. package/dist-embed-scene/AuroraKindMessages_es-jJ5_ltZq.js +1 -0
  16. package/dist-embed-scene/AuroraKindMessages_fr-6IzUVbRH.js +1 -0
  17. package/dist-embed-scene/AuroraKindMessages_it-DcwuoMkp.js +1 -0
  18. package/dist-embed-scene/AuroraParameterTexts_en-shkUd-dT.js +1 -0
  19. package/dist-embed-scene/AuroraParameterTexts_es-CwGYyafK.js +1 -0
  20. package/dist-embed-scene/AuroraParameterTexts_fr-CoJnicWs.js +1 -0
  21. package/dist-embed-scene/AuroraParameterTexts_it-DHniBj_2.js +1 -0
  22. package/dist-embed-scene/AuroraSimulation-BZpjImM0.js +152 -0
  23. package/dist-embed-scene/{BalloonEditor-D1b8pmSn.js → BalloonEditor-BehJs6H-.js} +2 -2
  24. package/dist-embed-scene/{BalloonFlight-D015vbBe.js → BalloonFlight-BYn4diw1.js} +1 -1
  25. package/dist-embed-scene/BeamSystem-DtRwoKHP.js +1 -0
  26. package/dist-embed-scene/{BirdEditor-CxGMe4UD.js → BirdEditor-dOp1sGsz.js} +1 -1
  27. package/dist-embed-scene/{BirdFlock-D2mckZ_l.js → BirdFlock-CfJeXvWu.js} +1 -1
  28. package/dist-embed-scene/{DroneEditor-BNGmR5II.js → DroneEditor-CBoR4fJ_.js} +1 -1
  29. package/dist-embed-scene/{DroneFlight-DKHsNqDw.js → DroneFlight-DSE1OXqh.js} +1 -1
  30. package/dist-embed-scene/{DroneParameters-Bq6XBchK.js → DroneParameters-D3EOg4oe.js} +1 -1
  31. package/dist-embed-scene/{LanternEditor-FU0WHV3j.js → LanternEditor-CbcA7K8y.js} +2 -2
  32. package/dist-embed-scene/ModuleSession-XnOI5Mcr.js +3 -0
  33. package/dist-embed-scene/ModuleThree-BTQgimAj.js +1 -0
  34. package/dist-embed-scene/SearchlightEditor-CogwU9pl.js +8 -0
  35. package/dist-embed-scene/SearchlightEditorMessages_en-BWTcGHYC.js +1 -0
  36. package/dist-embed-scene/SearchlightEditorMessages_es-PS4IIWFS.js +1 -0
  37. package/dist-embed-scene/SearchlightEditorMessages_fr-CpaD2Il2.js +1 -0
  38. package/dist-embed-scene/SearchlightEditorMessages_it-Br2IjowF.js +1 -0
  39. package/dist-embed-scene/SearchlightKindMessages_en-CwJDAjsc.js +1 -0
  40. package/dist-embed-scene/SearchlightKindMessages_es-CCCgZyTQ.js +1 -0
  41. package/dist-embed-scene/SearchlightKindMessages_fr-DsxiUhmK.js +1 -0
  42. package/dist-embed-scene/SearchlightKindMessages_it-CyWpJL5c.js +1 -0
  43. package/dist-embed-scene/SearchlightParameterTexts_en-BwanYoMW.js +1 -0
  44. package/dist-embed-scene/SearchlightParameterTexts_es-Cz_rg-Xe.js +1 -0
  45. package/dist-embed-scene/SearchlightParameterTexts_fr-B7eZQIdG.js +1 -0
  46. package/dist-embed-scene/SearchlightParameterTexts_it-BjhuOJre.js +1 -0
  47. package/dist-embed-scene/SearchlightSystem-CX1_nBkz.js +1 -0
  48. package/dist-embed-scene/{SkyLantern-a9qLkbZo.js → SkyLantern-Dp_B40X0.js} +1 -1
  49. package/dist-embed-scene/rr0-scene.mjs +397 -322
  50. package/dist-embed-scene/sightingSchema-9MogCcUd.js +1 -0
  51. package/dist-embed-sighting/Aurora-DN89D94m.js +1 -0
  52. package/dist-embed-sighting/AuroraEditor-C4tY9hXK.js +8 -0
  53. package/dist-embed-sighting/AuroraEditorMessages_en-CpU3BS-B.js +1 -0
  54. package/dist-embed-sighting/AuroraEditorMessages_es-i8-psDHN.js +1 -0
  55. package/dist-embed-sighting/AuroraEditorMessages_fr-0DtPXXAs.js +1 -0
  56. package/dist-embed-sighting/AuroraEditorMessages_it-Dn2UHyk9.js +1 -0
  57. package/dist-embed-sighting/AuroraKindMessages_en-D_W4giJa.js +1 -0
  58. package/dist-embed-sighting/AuroraKindMessages_es-jJ5_ltZq.js +1 -0
  59. package/dist-embed-sighting/AuroraKindMessages_fr-6IzUVbRH.js +1 -0
  60. package/dist-embed-sighting/AuroraKindMessages_it-DcwuoMkp.js +1 -0
  61. package/dist-embed-sighting/AuroraParameterTexts_en-shkUd-dT.js +1 -0
  62. package/dist-embed-sighting/AuroraParameterTexts_es-CwGYyafK.js +1 -0
  63. package/dist-embed-sighting/AuroraParameterTexts_fr-CoJnicWs.js +1 -0
  64. package/dist-embed-sighting/AuroraParameterTexts_it-DHniBj_2.js +1 -0
  65. package/dist-embed-sighting/AuroraSimulation-C9hvCV0W.js +152 -0
  66. package/dist-embed-sighting/BeamSystem-CsNwl_vM.js +1 -0
  67. package/dist-embed-sighting/{CaseReportExport-B13vvVvn.js → CaseReportExport-DVVsc8gA.js} +1 -1
  68. package/dist-embed-sighting/InterviewMessages_en-BRmuWrAg.js +1 -0
  69. package/dist-embed-sighting/InterviewMessages_es-BTotimwY.js +1 -0
  70. package/dist-embed-sighting/InterviewMessages_fr-DBCdGB0r.js +1 -0
  71. package/dist-embed-sighting/InterviewMessages_it-B5EyMD-k.js +1 -0
  72. package/dist-embed-sighting/ModuleSession-ChJsGuTn.js +3 -0
  73. package/dist-embed-sighting/ModuleThree-whEZoXYF.js +1 -0
  74. package/dist-embed-sighting/SearchlightEditor-By5Z3ef7.js +8 -0
  75. package/dist-embed-sighting/SearchlightEditorMessages_en-BWTcGHYC.js +1 -0
  76. package/dist-embed-sighting/SearchlightEditorMessages_es-PS4IIWFS.js +1 -0
  77. package/dist-embed-sighting/SearchlightEditorMessages_fr-CpaD2Il2.js +1 -0
  78. package/dist-embed-sighting/SearchlightEditorMessages_it-Br2IjowF.js +1 -0
  79. package/dist-embed-sighting/SearchlightKindMessages_en-CwJDAjsc.js +1 -0
  80. package/dist-embed-sighting/SearchlightKindMessages_es-CCCgZyTQ.js +1 -0
  81. package/dist-embed-sighting/SearchlightKindMessages_fr-DsxiUhmK.js +1 -0
  82. package/dist-embed-sighting/SearchlightKindMessages_it-CyWpJL5c.js +1 -0
  83. package/dist-embed-sighting/SearchlightParameterTexts_en-BwanYoMW.js +1 -0
  84. package/dist-embed-sighting/SearchlightParameterTexts_es-Cz_rg-Xe.js +1 -0
  85. package/dist-embed-sighting/SearchlightParameterTexts_fr-B7eZQIdG.js +1 -0
  86. package/dist-embed-sighting/SearchlightParameterTexts_it-BjhuOJre.js +1 -0
  87. package/dist-embed-sighting/SearchlightSystem-B2-MzG4x.js +1 -0
  88. package/dist-embed-sighting/{SightingMessages_en-sch1T1ki.js → SightingMessages_en-D3YVhgUj.js} +1 -1
  89. package/dist-embed-sighting/{SightingMessages_es-DemDEDtF.js → SightingMessages_es-ME6FeTp-.js} +1 -1
  90. package/dist-embed-sighting/{SightingMessages_fr-DskVkEj0.js → SightingMessages_fr-BgXYuIq4.js} +1 -1
  91. package/dist-embed-sighting/{SightingMessages_it-CrbYpdv8.js → SightingMessages_it-DcE90eAl.js} +1 -1
  92. package/dist-embed-sighting/rr0-sighting.mjs +412 -337
  93. package/dist-embed-sighting/sightingSchema-9MogCcUd.js +1 -0
  94. package/dist-embed-sighting-editor/{AdsbLolArchiveProvider-BqEnqRP0.js → AdsbLolArchiveProvider-CWpyBqG3.js} +1 -1
  95. package/dist-embed-sighting-editor/AirshipEditor-BvnVNcF4.js +16 -0
  96. package/dist-embed-sighting-editor/{AirshipFlight-Bh7J0sWg.js → AirshipFlight-CB1Quf68.js} +1 -1
  97. package/dist-embed-sighting-editor/Aurora-BRXvgyRM.js +1 -0
  98. package/dist-embed-sighting-editor/AuroraEditor-JQ3kRqrq.js +8 -0
  99. package/dist-embed-sighting-editor/AuroraEditorMessages_en-CpU3BS-B.js +1 -0
  100. package/dist-embed-sighting-editor/AuroraEditorMessages_es-i8-psDHN.js +1 -0
  101. package/dist-embed-sighting-editor/AuroraEditorMessages_fr-0DtPXXAs.js +1 -0
  102. package/dist-embed-sighting-editor/AuroraEditorMessages_it-Dn2UHyk9.js +1 -0
  103. package/dist-embed-sighting-editor/AuroraKindMessages_en-D_W4giJa.js +1 -0
  104. package/dist-embed-sighting-editor/AuroraKindMessages_es-jJ5_ltZq.js +1 -0
  105. package/dist-embed-sighting-editor/AuroraKindMessages_fr-6IzUVbRH.js +1 -0
  106. package/dist-embed-sighting-editor/AuroraKindMessages_it-DcwuoMkp.js +1 -0
  107. package/dist-embed-sighting-editor/AuroraParameterTexts_en-shkUd-dT.js +1 -0
  108. package/dist-embed-sighting-editor/AuroraParameterTexts_es-CwGYyafK.js +1 -0
  109. package/dist-embed-sighting-editor/AuroraParameterTexts_fr-CoJnicWs.js +1 -0
  110. package/dist-embed-sighting-editor/AuroraParameterTexts_it-DHniBj_2.js +1 -0
  111. package/dist-embed-sighting-editor/AuroraSimulation-i64MFW2z.js +152 -0
  112. package/dist-embed-sighting-editor/{BallesterGuaspAssessor-BNfSwq_l.js → BallesterGuaspAssessor-BaKKAdY3.js} +1 -1
  113. package/dist-embed-sighting-editor/BalloonEditor-C2oHClW7.js +24 -0
  114. package/dist-embed-sighting-editor/{BalloonFlight-DqwGZzum.js → BalloonFlight-B9A6MoCj.js} +1 -1
  115. package/dist-embed-sighting-editor/{BeamEditor-C9VQ2YBN.js → BeamEditor-CW7mTQjS.js} +1 -1
  116. package/dist-embed-sighting-editor/BeamSystem-CSfJjLCb.js +1 -0
  117. package/dist-embed-sighting-editor/BirdEditor-BdxhCoW9.js +16 -0
  118. package/dist-embed-sighting-editor/{BirdFlock-TI63ZAKZ.js → BirdFlock-DCbrukNp.js} +1 -1
  119. package/dist-embed-sighting-editor/{BodyEditor-COLTBHzX.js → BodyEditor-DE8ZQrqe.js} +1 -1
  120. package/dist-embed-sighting-editor/{CaseElement-D_ItKhFD.js → CaseElement-C46wM-nU.js} +3 -3
  121. package/dist-embed-sighting-editor/{CaseReportExport-BSLhYJJA.js → CaseReportExport-UVrInf6H.js} +3 -3
  122. package/dist-embed-sighting-editor/{ContrailSystem-C8K88Cwo.js → ContrailSystem-CDSSxouG.js} +1 -1
  123. package/dist-embed-sighting-editor/{ControlPasses-DNMyuRwb.js → ControlPasses-CsOVa-jq.js} +1 -1
  124. package/dist-embed-sighting-editor/{CoverageAssessor-p-LX-eEi.js → CoverageAssessor-DWY_gJJX.js} +1 -1
  125. package/dist-embed-sighting-editor/{DroneEditor-v0oaeAUh.js → DroneEditor-DgeuaHdb.js} +1 -1
  126. package/dist-embed-sighting-editor/{DroneFlight-BpnBgJ9K.js → DroneFlight-CFztr-9j.js} +1 -1
  127. package/dist-embed-sighting-editor/{DroneParameters-B1oTz3dZ.js → DroneParameters-CHmDmRoC.js} +1 -1
  128. package/dist-embed-sighting-editor/{Flightradar24Provider-D5OdIL0L.js → Flightradar24Provider-e6_3o9Jf.js} +1 -1
  129. package/dist-embed-sighting-editor/{GLTFLoader-DT3hr416.js → GLTFLoader-Df-r7_lf.js} +1 -1
  130. package/dist-embed-sighting-editor/{GenerativeKitMessages-B8L7U7gD.js → GenerativeKitMessages-CmqG-T2c.js} +1 -1
  131. package/dist-embed-sighting-editor/{GeoExportTexts-DrGdI2OF.js → GeoExportTexts-Wjc5YKlM.js} +1 -1
  132. package/dist-embed-sighting-editor/{GeoJsonExport-BZ-0v8fM.js → GeoJsonExport-BSPGzTbG.js} +1 -1
  133. package/dist-embed-sighting-editor/GeographicFigures-D_TfLkj9.js +1 -0
  134. package/dist-embed-sighting-editor/{HeadlightSystem-DHoSdTng.js → HeadlightSystem-DljWmzj5.js} +1 -1
  135. package/dist-embed-sighting-editor/{HynekAssessor-ByXW15nZ.js → HynekAssessor-BCDwoOI9.js} +1 -1
  136. package/dist-embed-sighting-editor/InterviewEditorElement-KHpgfy3k.js +277 -0
  137. package/dist-embed-sighting-editor/{InterviewElement-B3tm7y49.js → InterviewElement-DDa53uMq.js} +1 -1
  138. package/dist-embed-sighting-editor/InterviewMedia-CGVsMdje.js +1 -0
  139. package/dist-embed-sighting-editor/InterviewMessages_en-BRmuWrAg.js +1 -0
  140. package/dist-embed-sighting-editor/InterviewMessages_es-BTotimwY.js +1 -0
  141. package/dist-embed-sighting-editor/InterviewMessages_fr-DBCdGB0r.js +1 -0
  142. package/dist-embed-sighting-editor/InterviewMessages_it-B5EyMD-k.js +1 -0
  143. package/dist-embed-sighting-editor/{KmlExport-Bh4eTycx.js → KmlExport-B46AfaoJ.js} +1 -1
  144. package/dist-embed-sighting-editor/LanternEditor-CkbeitJh.js +24 -0
  145. package/dist-embed-sighting-editor/{LaserBeam-iHLKAi5q.js → LaserBeam-Ber-PT8j.js} +1 -1
  146. package/dist-embed-sighting-editor/LaunchEditor-BsvHahqK.js +22 -0
  147. package/dist-embed-sighting-editor/{LaunchPlume-BJwW1kU1.js → LaunchPlume-BmPMeGMN.js} +1 -1
  148. package/dist-embed-sighting-editor/LaunchSimulation-g-ETWhEH.js +1 -0
  149. package/dist-embed-sighting-editor/ModelSource-DOUnBBhu.js +1 -0
  150. package/dist-embed-sighting-editor/{ModelThumbnails-C_8KCF7H.js → ModelThumbnails-TwG1snwZ.js} +1 -1
  151. package/dist-embed-sighting-editor/{ModelViewer-Cy-6IZBY.js → ModelViewer-Y_B6eM4z.js} +1 -1
  152. package/dist-embed-sighting-editor/ModuleConformance-CO1S9pa3.js +2 -0
  153. package/dist-embed-sighting-editor/ModuleSession-VLS0tjAb.js +3 -0
  154. package/dist-embed-sighting-editor/ModuleThree-DQ2dT7XW.js +1 -0
  155. package/dist-embed-sighting-editor/{ModulesPanelElement-B9R5rI0T.js → ModulesPanelElement--YQ0QtcW.js} +3 -3
  156. package/dist-embed-sighting-editor/{NearestApproach-pefE2Svz.js → NearestApproach-C_8Uvp6i.js} +1 -1
  157. package/dist-embed-sighting-editor/PictureRegistration-Br0xjLE2.js +1 -0
  158. package/dist-embed-sighting-editor/{PoherAssessor-BEiAV-7m.js → PoherAssessor-DtDcuhWK.js} +1 -1
  159. package/dist-embed-sighting-editor/QuestionnaireFeed-CvLtuLIH.js +1 -0
  160. package/dist-embed-sighting-editor/QuestionnaireForm-DA6LPvBt.js +1 -0
  161. package/dist-embed-sighting-editor/QuestionnaireImport-BYj5QoJS.js +5 -0
  162. package/dist-embed-sighting-editor/QuestionnaireSeal-DpZYUhnf.js +1 -0
  163. package/dist-embed-sighting-editor/{RailwaySystem-7A12KSnk.js → RailwaySystem-eT-ZKfZl.js} +1 -1
  164. package/dist-embed-sighting-editor/ReentryEditor-CW8H7KaA.js +28 -0
  165. package/dist-embed-sighting-editor/{ReentrySimulation-PK2Z7Smw.js → ReentrySimulation-DVl__RjO.js} +1 -1
  166. package/dist-embed-sighting-editor/{ReferenceSystem-Bt7l5nHl.js → ReferenceSystem-DxVYO7g9.js} +1 -1
  167. package/dist-embed-sighting-editor/{RoadMarkings-BGK7ToZP.js → RoadMarkings-DJraHdS6.js} +1 -1
  168. package/dist-embed-sighting-editor/ScenarioReadings-BYqlpLo8.js +1 -0
  169. package/dist-embed-sighting-editor/ScenarioSweep-Ddtuo_Af.js +1 -0
  170. package/dist-embed-sighting-editor/ScenarioSweepMessages_en-Bf4BscDU.js +1 -0
  171. package/dist-embed-sighting-editor/ScenarioSweepMessages_es-CBHQfuRB.js +1 -0
  172. package/dist-embed-sighting-editor/ScenarioSweepMessages_fr-DlPsO6oI.js +1 -0
  173. package/dist-embed-sighting-editor/ScenarioSweepMessages_it-DANW3_la.js +1 -0
  174. package/dist-embed-sighting-editor/{SceneNames_en-9zK_E4jO.js → SceneNames_en-p5YNYZhA.js} +1 -1
  175. package/dist-embed-sighting-editor/{SceneNames_es-B6FtSh6r.js → SceneNames_es-DlMqYLL9.js} +1 -1
  176. package/dist-embed-sighting-editor/{SceneNames_fr-lUEwaxUk.js → SceneNames_fr-lFA7hY3x.js} +1 -1
  177. package/dist-embed-sighting-editor/{SceneNames_it-ChU8RE2E.js → SceneNames_it-CDwvX1Nw.js} +1 -1
  178. package/dist-embed-sighting-editor/SearchlightEditor-BSI8hB1V.js +8 -0
  179. package/dist-embed-sighting-editor/SearchlightEditorMessages_en-BWTcGHYC.js +1 -0
  180. package/dist-embed-sighting-editor/SearchlightEditorMessages_es-PS4IIWFS.js +1 -0
  181. package/dist-embed-sighting-editor/SearchlightEditorMessages_fr-CpaD2Il2.js +1 -0
  182. package/dist-embed-sighting-editor/SearchlightEditorMessages_it-Br2IjowF.js +1 -0
  183. package/dist-embed-sighting-editor/SearchlightKindMessages_en-CwJDAjsc.js +1 -0
  184. package/dist-embed-sighting-editor/SearchlightKindMessages_es-CCCgZyTQ.js +1 -0
  185. package/dist-embed-sighting-editor/SearchlightKindMessages_fr-DsxiUhmK.js +1 -0
  186. package/dist-embed-sighting-editor/SearchlightKindMessages_it-CyWpJL5c.js +1 -0
  187. package/dist-embed-sighting-editor/SearchlightParameterTexts_en-BwanYoMW.js +1 -0
  188. package/dist-embed-sighting-editor/SearchlightParameterTexts_es-Cz_rg-Xe.js +1 -0
  189. package/dist-embed-sighting-editor/SearchlightParameterTexts_fr-B7eZQIdG.js +1 -0
  190. package/dist-embed-sighting-editor/SearchlightParameterTexts_it-BjhuOJre.js +1 -0
  191. package/dist-embed-sighting-editor/SearchlightSystem-DHfVi2np.js +1 -0
  192. package/dist-embed-sighting-editor/{SightingEditorMessages_en-CtZXoBSS.js → SightingEditorMessages_en-k7_ua2OM.js} +1 -1
  193. package/{dist-embed-ufoathome/SightingEditorMessages_es-CKXlDIja.js → dist-embed-sighting-editor/SightingEditorMessages_es-Drqbbr5_.js} +1 -1
  194. package/dist-embed-sighting-editor/{SightingEditorMessages_fr-DjP6vAKo.js → SightingEditorMessages_fr-B_K5hsuV.js} +1 -1
  195. package/{dist-embed-ufoathome/SightingEditorMessages_it-CxtFzCzo.js → dist-embed-sighting-editor/SightingEditorMessages_it-QCLg1d7x.js} +1 -1
  196. package/dist-embed-sighting-editor/{SightingElement-BpRRhJzS.js → SightingElement-T0x4j9Zt.js} +4 -4
  197. package/dist-embed-sighting-editor/{SightingFileEditor-B7GimING.js → SightingFileEditor-Du3A9uZm.js} +1 -1
  198. package/dist-embed-sighting-editor/{SightingMessages_en-CYzanHjT.js → SightingMessages_en-CzICxNU3.js} +1 -1
  199. package/dist-embed-sighting-editor/{SightingMessages_es-hjvESK6f.js → SightingMessages_es-CiVFZlgA.js} +1 -1
  200. package/dist-embed-sighting-editor/{SightingMessages_fr-BtfWbIP7.js → SightingMessages_fr-nopOVDa1.js} +1 -1
  201. package/dist-embed-sighting-editor/{SightingMessages_it-Bqm4pewZ.js → SightingMessages_it-Cu0nnPts.js} +1 -1
  202. package/dist-embed-sighting-editor/{SkyLantern-BDpxvmY3.js → SkyLantern-Dl4yl-lc.js} +1 -1
  203. package/dist-embed-sighting-editor/{TraceSystem-JWQpvSdA.js → TraceSystem-Dbu_bgfE.js} +2 -2
  204. package/dist-embed-sighting-editor/{UfoMessages_en-JeMK-39o.js → UfoMessages_en-BAuHAGgq.js} +1 -1
  205. package/dist-embed-sighting-editor/{VideoButton-Kxg7pF1Y.js → VideoButton-C8eRmv7A.js} +1 -1
  206. package/dist-embed-sighting-editor/{WaterSystem-DwGepfDm.js → WaterSystem-DpJCe_2Q.js} +2 -2
  207. package/dist-embed-sighting-editor/angular-size-CxoysZle.png +0 -0
  208. package/dist-embed-sighting-editor/azimuth-CvjiPmz0.png +0 -0
  209. package/dist-embed-sighting-editor/caseSchema-BEJTs2Ld.js +1 -0
  210. package/dist-embed-sighting-editor/elevation-DPr5S6Jt.png +0 -0
  211. package/dist-embed-sighting-editor/geipan-qt-2025-j-yGY7EN.js +7 -0
  212. package/dist-embed-sighting-editor/{interviewImport-BlSMFEw_.js → interviewImport-zzDGCbXd.js} +1 -1
  213. package/dist-embed-sighting-editor/{interviewJson-CsMHIcZ-.js → interviewJson-DngUPqK8.js} +1 -1
  214. package/dist-embed-sighting-editor/interviewSchema-DRWvRSL2.js +1 -0
  215. package/dist-embed-sighting-editor/protractor-DyE30B87.png +0 -0
  216. package/dist-embed-sighting-editor/rr0-sighting-editor.mjs +522 -422
  217. package/dist-embed-sighting-editor/sightingSchema-9MogCcUd.js +1 -0
  218. package/dist-embed-sighting-editor/{surroundingsSources-z7680fTA.js → surroundingsSources-lvh4Rw5C.js} +1 -1
  219. package/dist-embed-sighting-editor/{trafficRuntime-CvK_m6bC.js → trafficRuntime-Drx7CE9H.js} +1 -1
  220. package/dist-embed-ufoathome/AdsbLolArchiveProvider-CqedGYi5.js +1 -0
  221. package/dist-embed-ufoathome/AirshipEditor-CBSrQM3J.js +16 -0
  222. package/dist-embed-ufoathome/{AirshipFlight-CX32XrkA.js → AirshipFlight-Dzpw8HRM.js} +1 -1
  223. package/dist-embed-ufoathome/Aurora-CpZx9hQ3.js +1 -0
  224. package/dist-embed-ufoathome/AuroraEditor-D2v8sWVE.js +8 -0
  225. package/dist-embed-ufoathome/AuroraEditorMessages_en-CpU3BS-B.js +1 -0
  226. package/dist-embed-ufoathome/AuroraEditorMessages_es-i8-psDHN.js +1 -0
  227. package/dist-embed-ufoathome/AuroraEditorMessages_fr-0DtPXXAs.js +1 -0
  228. package/dist-embed-ufoathome/AuroraEditorMessages_it-Dn2UHyk9.js +1 -0
  229. package/dist-embed-ufoathome/AuroraKindMessages_en-D_W4giJa.js +1 -0
  230. package/dist-embed-ufoathome/AuroraKindMessages_es-jJ5_ltZq.js +1 -0
  231. package/dist-embed-ufoathome/AuroraKindMessages_fr-6IzUVbRH.js +1 -0
  232. package/dist-embed-ufoathome/AuroraKindMessages_it-DcwuoMkp.js +1 -0
  233. package/dist-embed-ufoathome/AuroraParameterTexts_en-shkUd-dT.js +1 -0
  234. package/dist-embed-ufoathome/AuroraParameterTexts_es-CwGYyafK.js +1 -0
  235. package/dist-embed-ufoathome/AuroraParameterTexts_fr-CoJnicWs.js +1 -0
  236. package/dist-embed-ufoathome/AuroraParameterTexts_it-DHniBj_2.js +1 -0
  237. package/dist-embed-ufoathome/AuroraSimulation-DdSP66LD.js +152 -0
  238. package/dist-embed-ufoathome/BallesterGuaspAssessor-C4IktJ1l.js +1 -0
  239. package/dist-embed-ufoathome/BalloonEditor-dCIjTsIz.js +24 -0
  240. package/dist-embed-ufoathome/{BalloonFlight-DC31tnhH.js → BalloonFlight-CztT6ddg.js} +1 -1
  241. package/dist-embed-ufoathome/{BeamEditor-WKZhN3Hp.js → BeamEditor-CuW3LVO-.js} +2 -2
  242. package/dist-embed-ufoathome/BeamSystem-BPEYuCF4.js +1 -0
  243. package/dist-embed-ufoathome/BirdEditor-Dk3huwHa.js +16 -0
  244. package/dist-embed-ufoathome/{BodyEditor-uxbNOCFJ.js → BodyEditor-COMX-T65.js} +1 -1
  245. package/dist-embed-ufoathome/CaseEditorElement-C5BHP8jT.js +3173 -0
  246. package/dist-embed-ufoathome/{CaseElement-Lil-kZRm.js → CaseElement-CIZvyRVi.js} +3 -3
  247. package/dist-embed-ufoathome/{CaseReportExport-DX7PQi1u.js → CaseReportExport-BFbswUIB.js} +3 -3
  248. package/dist-embed-ufoathome/{ColumnResize-DXi_g6cq.js → ColumnResize-Dh6Xyspd.js} +6 -6
  249. package/dist-embed-ufoathome/ContrailSystem-D2AR5Zgy.js +1 -0
  250. package/dist-embed-ufoathome/ControlPasses-CnL1GmT-.js +29 -0
  251. package/dist-embed-ufoathome/CoverageAssessor-CiqUEJkN.js +1 -0
  252. package/dist-embed-ufoathome/{DroneEditor-BSYPs6jg.js → DroneEditor-D60uhSHO.js} +1 -1
  253. package/dist-embed-ufoathome/{DroneParameters-O6pYnfX7.js → DroneParameters-CfTAaLCT.js} +1 -1
  254. package/dist-embed-ufoathome/Flightradar24Provider-_tNmWf11.js +1 -0
  255. package/dist-embed-ufoathome/GLTFLoader-BLk8prLt.js +1 -0
  256. package/dist-embed-ufoathome/GeoJsonExport-DkPKk-7q.js +2 -0
  257. package/dist-embed-ufoathome/GeoProjection-DvqDbRIx.js +1 -0
  258. package/dist-embed-ufoathome/{GeographicFigures-D9njFJso.js → GeographicFigures-l-PfHdSR.js} +1 -1
  259. package/dist-embed-ufoathome/HeadlightSystem-D5-78PFB.js +34 -0
  260. package/dist-embed-ufoathome/HynekAssessor-BhnvqsYz.js +1 -0
  261. package/dist-embed-ufoathome/InterviewEditorElement-iw2lnwx8.js +277 -0
  262. package/dist-embed-ufoathome/{InterviewElement-kdRloxH-.js → InterviewElement-CuRmQ0d3.js} +2 -2
  263. package/dist-embed-ufoathome/InterviewMedia-CGVsMdje.js +1 -0
  264. package/dist-embed-ufoathome/InterviewMessages_en-BRmuWrAg.js +1 -0
  265. package/dist-embed-ufoathome/InterviewMessages_es-BTotimwY.js +1 -0
  266. package/dist-embed-ufoathome/InterviewMessages_fr-DBCdGB0r.js +1 -0
  267. package/dist-embed-ufoathome/InterviewMessages_it-B5EyMD-k.js +1 -0
  268. package/dist-embed-ufoathome/KmlExport-BUl3gOrw.js +19 -0
  269. package/dist-embed-ufoathome/LanternEditor-BapUZdog.js +24 -0
  270. package/dist-embed-ufoathome/{LaserBeam-6xHkBslk.js → LaserBeam-C7glTvQN.js} +1 -1
  271. package/dist-embed-ufoathome/LaunchEditor-DvudtAzp.js +22 -0
  272. package/dist-embed-ufoathome/{LaunchPlume-BRYgiI9s.js → LaunchPlume-CrDBzsQe.js} +1 -1
  273. package/dist-embed-ufoathome/LaunchSimulation-DyOA4lPb.js +1 -0
  274. package/dist-embed-ufoathome/ModelSource-CoT4mxTx.js +1 -0
  275. package/dist-embed-ufoathome/ModelThumbnails-t59SZ3Vn.js +1 -0
  276. package/dist-embed-ufoathome/ModelViewer-DEdruEtl.js +1 -0
  277. package/dist-embed-ufoathome/ModuleConformance-DYDAaJJQ.js +2 -0
  278. package/dist-embed-ufoathome/ModuleSession-BKDWGSEo.js +3 -0
  279. package/dist-embed-ufoathome/ModuleThree-D18Rh2Nj.js +1 -0
  280. package/dist-embed-ufoathome/{ModulesPanelElement-fUfO3DeN.js → ModulesPanelElement-N-ccpGxl.js} +3 -3
  281. package/dist-embed-ufoathome/{NearestApproach-MxAHwcUE.js → NearestApproach-Do15yfeg.js} +1 -1
  282. package/dist-embed-ufoathome/{ParameterForm-DcVFxrcO.js → ParameterForm-XbqxCLRn.js} +1 -1
  283. package/dist-embed-ufoathome/PictureRegistration-BJeiCK8A.js +1 -0
  284. package/dist-embed-ufoathome/PoherAssessor-Cs8-ZBge.js +1 -0
  285. package/dist-embed-ufoathome/QuestionnaireFeed-BfvRSPoo.js +1 -0
  286. package/dist-embed-ufoathome/QuestionnaireForm-ByFmq67M.js +1 -0
  287. package/dist-embed-ufoathome/QuestionnaireImport-Cx1dQiha.js +5 -0
  288. package/dist-embed-ufoathome/QuestionnaireSeal-DpZYUhnf.js +1 -0
  289. package/dist-embed-ufoathome/RailwaySystem-KlBj8mLP.js +41 -0
  290. package/dist-embed-ufoathome/ReentryEditor-CJUFkVFO.js +28 -0
  291. package/dist-embed-ufoathome/ReentrySimulation-B5QcdOTq.js +1 -0
  292. package/dist-embed-ufoathome/ReferenceSystem-DyzOUClN.js +1 -0
  293. package/dist-embed-ufoathome/RoadMarkings-DKUNImjj.js +1 -0
  294. package/dist-embed-ufoathome/SaidPosition-OJEYhVKN.js +4 -0
  295. package/dist-embed-ufoathome/ScenarioReadings-CfZehU_P.js +1 -0
  296. package/dist-embed-ufoathome/ScenarioSweep-CDumnmq2.js +1 -0
  297. package/dist-embed-ufoathome/ScenarioSweepMessages_en-Bf4BscDU.js +1 -0
  298. package/dist-embed-ufoathome/ScenarioSweepMessages_es-CBHQfuRB.js +1 -0
  299. package/dist-embed-ufoathome/ScenarioSweepMessages_fr-DlPsO6oI.js +1 -0
  300. package/dist-embed-ufoathome/ScenarioSweepMessages_it-DANW3_la.js +1 -0
  301. package/dist-embed-ufoathome/SearchlightEditor-CPDNpfNC.js +8 -0
  302. package/dist-embed-ufoathome/SearchlightEditorMessages_en-BWTcGHYC.js +1 -0
  303. package/dist-embed-ufoathome/SearchlightEditorMessages_es-PS4IIWFS.js +1 -0
  304. package/dist-embed-ufoathome/SearchlightEditorMessages_fr-CpaD2Il2.js +1 -0
  305. package/dist-embed-ufoathome/SearchlightEditorMessages_it-Br2IjowF.js +1 -0
  306. package/dist-embed-ufoathome/SearchlightKindMessages_en-CwJDAjsc.js +1 -0
  307. package/dist-embed-ufoathome/SearchlightKindMessages_es-CCCgZyTQ.js +1 -0
  308. package/dist-embed-ufoathome/SearchlightKindMessages_fr-DsxiUhmK.js +1 -0
  309. package/dist-embed-ufoathome/SearchlightKindMessages_it-CyWpJL5c.js +1 -0
  310. package/dist-embed-ufoathome/SearchlightParameterTexts_en-BwanYoMW.js +1 -0
  311. package/dist-embed-ufoathome/SearchlightParameterTexts_es-Cz_rg-Xe.js +1 -0
  312. package/dist-embed-ufoathome/SearchlightParameterTexts_fr-B7eZQIdG.js +1 -0
  313. package/dist-embed-ufoathome/SearchlightParameterTexts_it-BjhuOJre.js +1 -0
  314. package/dist-embed-ufoathome/SearchlightSystem-Ca0rZcXv.js +1 -0
  315. package/dist-embed-ufoathome/ShareDialogElement-CBeU9ChH.js +5182 -0
  316. package/dist-embed-ufoathome/Sighting-B7bsiTIQ.js +1 -0
  317. package/dist-embed-ufoathome/{SightingEditorMessages_en-CtZXoBSS.js → SightingEditorMessages_en-k7_ua2OM.js} +1 -1
  318. package/{dist-embed-sighting-editor/SightingEditorMessages_es-CKXlDIja.js → dist-embed-ufoathome/SightingEditorMessages_es-Drqbbr5_.js} +1 -1
  319. package/dist-embed-ufoathome/{SightingEditorMessages_fr-DjP6vAKo.js → SightingEditorMessages_fr-B_K5hsuV.js} +1 -1
  320. package/{dist-embed-sighting-editor/SightingEditorMessages_it-CxtFzCzo.js → dist-embed-ufoathome/SightingEditorMessages_it-QCLg1d7x.js} +1 -1
  321. package/dist-embed-ufoathome/{SightingElement-Ct3sIryk.js → SightingElement-BveOM4nF.js} +4 -4
  322. package/dist-embed-ufoathome/{SightingFileEditor-D1s9Dv6G.js → SightingFileEditor-DS1DRU2p.js} +1 -1
  323. package/dist-embed-ufoathome/{SightingMessages_en-CYzanHjT.js → SightingMessages_en-CzICxNU3.js} +1 -1
  324. package/dist-embed-ufoathome/{SightingMessages_es-hjvESK6f.js → SightingMessages_es-CiVFZlgA.js} +1 -1
  325. package/dist-embed-ufoathome/{SightingMessages_fr-BtfWbIP7.js → SightingMessages_fr-nopOVDa1.js} +1 -1
  326. package/dist-embed-ufoathome/{SightingMessages_it-Bqm4pewZ.js → SightingMessages_it-Cu0nnPts.js} +1 -1
  327. package/dist-embed-ufoathome/{TimelineTracks-BgZmkKhn.js → TimelineTracks-Daaqw9ly.js} +1 -1
  328. package/dist-embed-ufoathome/{TraceSystem-Bop2Zoa_.js → TraceSystem-CoHX04R3.js} +2 -2
  329. package/dist-embed-ufoathome/{UfoAtHomeMessages_en-dlx_C679.js → UfoAtHomeMessages_en-BK2qJyZN.js} +1 -1
  330. package/dist-embed-ufoathome/{UfoAtHomeMessages_es-uLOvtAD0.js → UfoAtHomeMessages_es-B1-NDCau.js} +1 -1
  331. package/dist-embed-ufoathome/{UfoAtHomeMessages_fr-LR76-eHS.js → UfoAtHomeMessages_fr-BTG047qo.js} +1 -1
  332. package/dist-embed-ufoathome/{UfoAtHomeMessages_it-CQl4uTnG.js → UfoAtHomeMessages_it-Ryxv4HNU.js} +1 -1
  333. package/dist-embed-ufoathome/VideoButton-DNQmWtfv.js +1 -0
  334. package/dist-embed-ufoathome/WaterSystem-BNxlYNtW.js +19 -0
  335. package/dist-embed-ufoathome/angular-size-CxoysZle.png +0 -0
  336. package/dist-embed-ufoathome/azimuth-CvjiPmz0.png +0 -0
  337. package/dist-embed-ufoathome/caseSchema-BEJTs2Ld.js +1 -0
  338. package/dist-embed-ufoathome/elevation-DPr5S6Jt.png +0 -0
  339. package/dist-embed-ufoathome/geipan-qt-2025-j-yGY7EN.js +7 -0
  340. package/dist-embed-ufoathome/interviewSchema-DRWvRSL2.js +1 -0
  341. package/dist-embed-ufoathome/protractor-DyE30B87.png +0 -0
  342. package/dist-embed-ufoathome/rr0-ufoathome.mjs +41 -31
  343. package/dist-embed-ufoathome/sightingSchema-9MogCcUd.js +1 -0
  344. package/dist-embed-ufoathome/surroundingsSources-C823p3dG.js +1 -0
  345. package/dist-embed-ufoathome/three.module-CbaHqYFq.js +4116 -0
  346. package/dist-embed-ufoathome/trafficRuntime-DtXb9B2f.js +2 -0
  347. package/dist-embed-ufoathome/{upperAirSources-BGuLpdwu.js → upperAirSources-BU0pD84c.js} +1 -1
  348. package/dist-embed-ufoathome/xyzImageryRaster-Dhxs0B26.js +1 -0
  349. package/package.json +4 -2
  350. package/dist-embed-interview/InterviewMessages_en-ru7GkZlQ.js +0 -1
  351. package/dist-embed-interview/InterviewMessages_es-DkJurNrG.js +0 -1
  352. package/dist-embed-interview/InterviewMessages_fr-DAYgf8Ms.js +0 -1
  353. package/dist-embed-interview/InterviewMessages_it-6lenkmSg.js +0 -1
  354. package/dist-embed-scene/BeamSystem-BtLpnMXz.js +0 -1
  355. package/dist-embed-scene/ModuleSession-BodXzA3g.js +0 -3
  356. package/dist-embed-scene/ModuleThree-D7qc50Hj.js +0 -1
  357. package/dist-embed-scene/sightingSchema-BDxKVE3v.js +0 -1
  358. package/dist-embed-sighting/BeamSystem-DJZTpG0z.js +0 -1
  359. package/dist-embed-sighting/InterviewMessages_en-ru7GkZlQ.js +0 -1
  360. package/dist-embed-sighting/InterviewMessages_es-DkJurNrG.js +0 -1
  361. package/dist-embed-sighting/InterviewMessages_fr-DAYgf8Ms.js +0 -1
  362. package/dist-embed-sighting/InterviewMessages_it-6lenkmSg.js +0 -1
  363. package/dist-embed-sighting/ModuleSession-BZbes53G.js +0 -3
  364. package/dist-embed-sighting/ModuleThree-CPPPDBO4.js +0 -1
  365. package/dist-embed-sighting/sightingSchema-BDxKVE3v.js +0 -1
  366. package/dist-embed-sighting-editor/AirshipEditor-rA-Sr4D1.js +0 -16
  367. package/dist-embed-sighting-editor/BalloonEditor-CPZoayzz.js +0 -24
  368. package/dist-embed-sighting-editor/BeamSystem-Br0h-uSI.js +0 -1
  369. package/dist-embed-sighting-editor/BirdEditor-CAoRqqRV.js +0 -16
  370. package/dist-embed-sighting-editor/GeographicFigures-DqhWddS9.js +0 -1
  371. package/dist-embed-sighting-editor/InterviewEditorElement-CcXO_w9X.js +0 -242
  372. package/dist-embed-sighting-editor/InterviewMedia-CvAxC62V.js +0 -1
  373. package/dist-embed-sighting-editor/InterviewMessages_en-ru7GkZlQ.js +0 -1
  374. package/dist-embed-sighting-editor/InterviewMessages_es-DkJurNrG.js +0 -1
  375. package/dist-embed-sighting-editor/InterviewMessages_fr-DAYgf8Ms.js +0 -1
  376. package/dist-embed-sighting-editor/InterviewMessages_it-6lenkmSg.js +0 -1
  377. package/dist-embed-sighting-editor/LanternEditor-BnXAwLuQ.js +0 -24
  378. package/dist-embed-sighting-editor/LaunchEditor-f4kJ5pWG.js +0 -22
  379. package/dist-embed-sighting-editor/LaunchSimulation-B3vlOUUu.js +0 -1
  380. package/dist-embed-sighting-editor/ModelSource-D1Wt6VYS.js +0 -1
  381. package/dist-embed-sighting-editor/ModuleConformance-DF6CNBvD.js +0 -2
  382. package/dist-embed-sighting-editor/ModuleSession-BgxzArtm.js +0 -3
  383. package/dist-embed-sighting-editor/ModuleThree-DXFS5Pjb.js +0 -1
  384. package/dist-embed-sighting-editor/PictureRegistration-DBBH_E6I.js +0 -1
  385. package/dist-embed-sighting-editor/ReentryEditor-Ch9_6pS8.js +0 -28
  386. package/dist-embed-sighting-editor/caseSchema-ChUB1-9j.js +0 -1
  387. package/dist-embed-sighting-editor/interviewSchema-Dk0AWHwc.js +0 -1
  388. package/dist-embed-sighting-editor/sightingSchema-C1S-Kr9w.js +0 -1
  389. package/dist-embed-ufoathome/AdsbLolArchiveProvider-DzC2OwjF.js +0 -1
  390. package/dist-embed-ufoathome/AirshipEditor-DDmu9JT8.js +0 -16
  391. package/dist-embed-ufoathome/BallesterGuaspAssessor-Bn5TGAvJ.js +0 -1
  392. package/dist-embed-ufoathome/BalloonEditor-CGrzszk1.js +0 -24
  393. package/dist-embed-ufoathome/BeamSystem-CWJkeTmf.js +0 -1
  394. package/dist-embed-ufoathome/BirdEditor-07sg3Pt0.js +0 -16
  395. package/dist-embed-ufoathome/CaseEditorElement-DNZt-oc7.js +0 -3148
  396. package/dist-embed-ufoathome/ContrailSystem-DBPA_rNt.js +0 -1
  397. package/dist-embed-ufoathome/ControlPasses-BgvVicQS.js +0 -29
  398. package/dist-embed-ufoathome/CoverageAssessor-BiDfEPse.js +0 -1
  399. package/dist-embed-ufoathome/Flightradar24Provider-DJtlvu72.js +0 -1
  400. package/dist-embed-ufoathome/GLTFLoader-2tuw29HP.js +0 -1
  401. package/dist-embed-ufoathome/GeoJsonExport-DHZOlC4h.js +0 -2
  402. package/dist-embed-ufoathome/HeadlightSystem-h2F6DzUW.js +0 -34
  403. package/dist-embed-ufoathome/HynekAssessor-C1TFQQNc.js +0 -1
  404. package/dist-embed-ufoathome/InterviewEditorElement-BythuoeV.js +0 -242
  405. package/dist-embed-ufoathome/InterviewMedia-CvAxC62V.js +0 -1
  406. package/dist-embed-ufoathome/InterviewMessages_en-ru7GkZlQ.js +0 -1
  407. package/dist-embed-ufoathome/InterviewMessages_es-DkJurNrG.js +0 -1
  408. package/dist-embed-ufoathome/InterviewMessages_fr-DAYgf8Ms.js +0 -1
  409. package/dist-embed-ufoathome/InterviewMessages_it-6lenkmSg.js +0 -1
  410. package/dist-embed-ufoathome/KmlExport-Qih5jB1R.js +0 -19
  411. package/dist-embed-ufoathome/LanternEditor-BRqgj1S6.js +0 -24
  412. package/dist-embed-ufoathome/LaunchEditor-D5FlWL04.js +0 -22
  413. package/dist-embed-ufoathome/LaunchSimulation-DS7JtdJz.js +0 -1
  414. package/dist-embed-ufoathome/ModelSource-DQDWsfAb.js +0 -1
  415. package/dist-embed-ufoathome/ModelThumbnails-DovTOA0Y.js +0 -1
  416. package/dist-embed-ufoathome/ModelViewer-DIvwFZDg.js +0 -1
  417. package/dist-embed-ufoathome/ModuleConformance-VMgvNBlc.js +0 -2
  418. package/dist-embed-ufoathome/ModuleSession-D6wg8SbE.js +0 -3
  419. package/dist-embed-ufoathome/ModuleThree-CLkMHq_q.js +0 -1
  420. package/dist-embed-ufoathome/PictureRegistration-Dnh3w7Ph.js +0 -1
  421. package/dist-embed-ufoathome/PoherAssessor-h8_-WKIK.js +0 -1
  422. package/dist-embed-ufoathome/RailwaySystem-DZ2hctVL.js +0 -41
  423. package/dist-embed-ufoathome/ReentryEditor-DxyGO7_Z.js +0 -28
  424. package/dist-embed-ufoathome/ReentrySimulation-B55Uq-6-.js +0 -1
  425. package/dist-embed-ufoathome/ReferenceSystem-DJosChqB.js +0 -1
  426. package/dist-embed-ufoathome/RoadMarkings-DDRxawvf.js +0 -1
  427. package/dist-embed-ufoathome/SaidPosition-CXZLm-ck.js +0 -4
  428. package/dist-embed-ufoathome/ShareDialogElement--Mjaublp.js +0 -9222
  429. package/dist-embed-ufoathome/Sighting-Ch4eiBNK.js +0 -1
  430. package/dist-embed-ufoathome/VideoButton-DzEuUvRs.js +0 -1
  431. package/dist-embed-ufoathome/WaterSystem-KQAAtpYS.js +0 -19
  432. package/dist-embed-ufoathome/caseSchema-ChUB1-9j.js +0 -1
  433. package/dist-embed-ufoathome/interviewSchema-Dk0AWHwc.js +0 -1
  434. package/dist-embed-ufoathome/sightingSchema-C1S-Kr9w.js +0 -1
  435. package/dist-embed-ufoathome/surroundingsSources-LtEaPPRc.js +0 -1
  436. package/dist-embed-ufoathome/trafficRuntime-uPEasExE.js +0 -2
@@ -1 +1 @@
1
- import{ba as T}from"./rr0-sighting-editor.mjs";class O{static G=9.81;static ALL=[{id:"quadcopter",modelId:"ufoathome-drone-quadcopter",sizeM:{widthM:.508,lengthM:.493,heightM:.093},hovers:!0,maxSpeedMS:21,maxTiltDeg:35,holdM:{horizontalM:.5,verticalM:.5},yawRateDegS:120,bodyColor:"#5b5f63",lights:{front:{color:"#ff2a1a",candela:1,leds:[{at:[-.125,-.03,-.14],radiusM:.004},{at:[.125,-.03,-.14],radiusM:.004}]},rear:{color:"#2aff5a",candela:1,hz:.5,leds:[{at:[0,.005,.135],radiusM:.004}]},strobe:{color:"#ffffff",candela:40,hz:1.25,flashS:.06,leds:[{at:[0,-.034,.05],radiusM:.006}]}}},{id:"saucer",modelId:"ufoathome-drone-saucer",sizeM:{widthM:.8,lengthM:.8,heightM:.206},hovers:!0,maxSpeedMS:12,maxTiltDeg:25,holdM:{horizontalM:.5,verticalM:.5},yawRateDegS:90,bodyColor:"#c9ccd0",lights:{rim:{color:"#4fd2ff",candela:1,leds:O.ring(12,.388,0,.012)},under:{color:"#ffffff",candela:3,leds:[{at:[0,-.094,0],radiusM:.02}]},strobe:{color:"#ffffff",candela:40,hz:1.25,flashS:.06,off:!0,leds:[{at:[0,.1,0],radiusM:.006}]}}},{id:"fixed-wing",modelId:"ufoathome-drone-fixed-wing",sizeM:{widthM:3.596,lengthM:1.848,heightM:.53},hovers:!1,maxSpeedMS:33,maxTiltDeg:0,holdM:{horizontalM:1,verticalM:.5},yawRateDegS:0,bodyColor:"#6f7568",lights:{"nav-left":{color:"#ff2a1a",candela:2,leds:[{at:[-1.79,.02,.05],radiusM:.008}]},"nav-right":{color:"#2aff5a",candela:2,leds:[{at:[1.79,.02,.05],radiusM:.008}]},tail:{color:"#ffffff",candela:1,leds:[{at:[0,.05,.94],radiusM:.008}]},strobe:{color:"#ffffff",candela:40,hz:1,flashS:.06,leds:[{at:[0,-.1,.1],radiusM:.008}]}}}];static byId(t){return O.ALL.find(a=>a.id===t)}static materialOf(t,a,e){return e>1?`light-${t}-${a+1}`:`light-${t}`}static colourKeyOf(t){return t.replace(/-([a-z])/g,(a,e)=>e.toUpperCase())+"Color"}static ring(t,a,e,n){return Array.from({length:t},(s,M)=>{const r=M/t*2*Math.PI;return{at:[Math.round(a*Math.sin(r)*1e4)/1e4,e,Math.round(-a*Math.cos(r)*1e4)/1e4],radiusM:n}})}}class i{static SAMPLE_MS=100;static MAX_KEYFRAMES=6e4;static computed=new Map;static bodiesOf(t){const a=JSON.stringify(t);let e=i.computed.get(a);return e||(e=i.compute(t),i.computed.set(a,e),i.computed.size>16&&i.computed.delete(i.computed.keys().next().value)),e}static airframeOf(t){return O.byId(t.airframe)??O.ALL[0]}static lightsOf(t){const a=i.airframeOf(t),e={};for(const[n,s]of Object.entries(a.lights)){const M=t.lights?.[n];if(M===!1)continue;const r={...s,...M??{}};r.off||(e[n]=r)}return e}static compute(t){const a=i.pathOf(t);if(a.length===0)return[];const e=i.airframeOf(t),n=new j(a,e.hovers),s=Math.max(1,Math.floor(t.count??1)),M=i.randomFrom(t.seed??1),r=a[0].t,c=Math.max(a[a.length-1].t,r),d=i.sampleMs(s,c-r),u=i.offsetsOf(t.formation??{kind:s>1?"cluster":"single"},s,M),f=i.lightsOf(t),y={bodyColor:t.bodyColor??e.bodyColor};for(const[m,o]of Object.entries(f))y[O.colourKeyOf(m)]=o.color;const S=t.formation?.kind==="line";return u.map((m,o)=>{const h=i.swayFrom(M,e.holdM),p=Object.fromEntries(Object.entries(f).map(([l,b])=>[l,b.phase??(s>1?M():0)])),g=l=>{const b=n.at(l),[z,I,N]=h((l-r)/1e3);let k=m.eastM,C=m.northM;if(S){const D=n.velocityAt(l),R=Math.hypot(D.east,D.north)>.3?Math.atan2(D.east,D.north):n.headingAtRest(l);k=Math.cos(R)*m.rightM,C=-Math.sin(R)*m.rightM}return{eastM:b.eastM+k+z,northM:b.northM+C+I,upM:b.upM+m.upM+N}},w=[];for(let l=r;l<=c+1e-6;l+=d)w.push(l);w[w.length-1]<c&&w.push(c);const x=i.attitudes(w.map(l=>({t:l,...g(l),headingDeg:0,pitchDeg:0,rollDeg:0})),e,t),P=i.switchesOf(f,p,r,c),E=[...new Set([...w.map(l=>Math.round(l)),...P])].filter(l=>l>=r&&l<=c).sort((l,b)=>l-b);let v=0;const A=E.map((l,b)=>{for(;v<x.length-2&&x[v+1].t<=l;)v++;const z=i.between(x[v],x[Math.min(x.length-1,v+1)],l,g);return{t:l,eastM:i.round(z.eastM),northM:i.round(z.northM),altitudeM:i.round(z.upM-e.sizeM.heightM/2),...b===0?{sizeM:e.sizeM}:{},attitude:{headingDeg:i.round(z.headingDeg,10),pitchDeg:i.round(z.pitchDeg,10),rollDeg:i.round(z.rollDeg,10)},lights:i.luminancesAt(f,p,l,E[b+1]===l+1)}});return{id:s>1?`${t.id}-${o+1}`:t.id,...t.title?{title:t.title}:{},...t.explainsEach?t.explainsEach[o]!==void 0?{explains:[t.explainsEach[o]]}:{}:{...t.explains?{explains:t.explains}:{},...s>1?{ensemble:t.id}:{}},model:{id:e.modelId},modelParameters:y,lamps:i.lampsOf(f,p),...t.silent?{}:{sound:{kind:"unmanned",...t.quieterDb?{quieterDb:t.quieterDb}:{}}},track:A}})}static lampsOf(t,a){return Object.entries(t).flatMap(([e,n])=>n.leds.map((s,M)=>{const r=n.hz>0,c=r?1/n.hz:0;return{id:O.materialOf(e,M,n.leds.length),offsetM:{x:s.at[0],y:s.at[1],z:-s.at[2]},color:n.color,intensity:n.candela/T,pattern:r?{kind:"flash",perMinute:n.hz*60,dutyCycle:Math.min(1,(n.flashS??.5*c)/c),phase:((1-(a[e]??0))%1+1)%1}:{kind:"steady"}}}))}static luminancesAt(t,a,e,n=!1){const s={};for(const[M,r]of Object.entries(t)){const c=i.isOn(r,a[M]??0,n?e-1:e+.5);r.leds.forEach((d,u)=>{s[O.materialOf(M,u,r.leds.length)]=c?i.round(r.candela/(Math.PI*d.radiusM**2),1):0})}return s}static isOn(t,a,e){if(!(t.hz>0))return!0;const n=1e3/t.hz,s=Math.min(n,(t.flashS??.5/t.hz)*1e3);return((e/n-a)%1+1)%1*n<s}static switchesOf(t,a,e,n){const s=[];for(const[M,r]of Object.entries(t)){if(!(r.hz>0))continue;const c=1e3/r.hz,d=Math.min(c,(r.flashS??.5/r.hz)*1e3);if(d>=c)continue;const u=(a[M]??0)*c;for(let f=Math.floor((e-u)/c)*c+u;f<=n;f+=c)for(const y of[f,f+d]){const S=Math.round(y);S>=e&&S<n&&s.push(S,S+1)}}return s}static sampleMs(t,a){const e=t*(a/i.SAMPLE_MS+1);return e<=i.MAX_KEYFRAMES?i.SAMPLE_MS:Math.ceil(i.SAMPLE_MS*e/i.MAX_KEYFRAMES/50)*50}static pathOf(t){return[...t.path].sort((a,e)=>a.t-e.t).map(a=>{if("eastM"in a)return{t:a.t,eastM:a.eastM,northM:a.northM,upM:a.altitudeM};const e=a.azimuthDeg*Math.PI/180,n=a.altitudeDeg*Math.PI/180,s=a.distanceM*Math.cos(n);return{t:a.t,eastM:s*Math.sin(e),northM:s*Math.cos(e),upM:(a.eyeHeightM??1.6)+a.distanceM*Math.sin(n)}})}static offsetsOf(t,a,e){if(t.kind==="single"||a===1)return[{eastM:0,northM:0,upM:0,rightM:0}];if(t.kind==="line"){const c=t.spacingM??5;return Array.from({length:a},(d,u)=>({eastM:0,northM:0,upM:(e()-.5)*c*.2,rightM:(u-(a-1)/2)*c}))}const n=t.spacingM??10,s=Math.cbrt(a*n**3/(4/3*Math.PI*2*2*1)),M=[];let r=0;for(;M.length<a&&r<a*200;){r++;const c=2*e()-1,d=2*e()-1,u=2*e()-1;if(c*c+d*d+u*u>1)continue;const f={eastM:c*2*s,northM:d*2*s,upM:u*s,rightM:0};M.some(y=>(y.eastM-f.eastM)**2+(y.northM-f.northM)**2+(y.upM-f.upM)**2<(n/2)**2)||M.push(f)}for(;M.length<a;)M.push({eastM:(e()-.5)*4*s,northM:(e()-.5)*4*s,upM:0,rightM:0});return M}static swayFrom(t,a){const e=[a.horizontalM,a.horizontalM,a.verticalM].map(n=>[0,1].map(()=>({period:4+t()*10,phase:t()*2*Math.PI,amplitude:n*.5*(.5+.5*t())})));return n=>e.map(s=>s.reduce((M,r)=>M+r.amplitude*Math.sin(2*Math.PI*n/r.period+r.phase),0))}static attitudes(t,a,e){const n=t.length;if(n===0)return t;const s=O.G,M=(e.wind?.fromDeg??0)*Math.PI/180,r=-(e.wind?.speedMS??0)*Math.sin(M),c=-(e.wind?.speedMS??0)*Math.cos(M),d=o=>{const h=t[Math.max(0,o-1)],p=t[Math.min(n-1,o+1)],g=Math.max((p.t-h.t)/1e3,.001);return{e:(p.eastM-h.eastM)/g,n:(p.northM-h.northM)/g,u:(p.upM-h.upM)/g}},u=t.map((o,h)=>d(h)),f=o=>{const h=u[Math.max(0,o-1)],p=u[Math.min(n-1,o+1)],g=Math.max((t[Math.min(n-1,o+1)].t-t[Math.max(0,o-1)].t)/1e3,.001);return{e:(p.e-h.e)/g,n:(p.n-h.n)/g,u:(p.u-h.u)/g}};if(!a.hovers){for(let o=0;o<n;o++){const h=u[o],p=h.e-r,g=h.n-c,w=Math.hypot(h.e,h.n);t[o].headingDeg=Math.hypot(p,g)>.5?(Math.atan2(p,g)*180/Math.PI+360)%360:o>0?t[o-1].headingDeg:0,t[o].pitchDeg=Math.atan2(h.u,Math.max(w,1))*180/Math.PI+2;const x=f(o),P=w>.5?(x.e*h.n-x.n*h.e)/w:0;t[o].rollDeg=Math.max(-45,Math.min(45,Math.atan(P/s)*180/Math.PI))}return t}const y=s*Math.tan(a.maxTiltDeg*Math.PI/180)/a.maxSpeedMS**2,S=a.yawRateDegS*i.SAMPLE_MS/1e3;let m=e.headingDeg;if(m===void 0){const o=u.find(h=>Math.hypot(h.e,h.n)>1);m=o?(Math.atan2(o.e,o.n)*180/Math.PI+360)%360:0}for(let o=0;o<n;o++){const h=u[o];if(e.headingDeg===void 0&&Math.hypot(h.e,h.n)>1){const z=((Math.atan2(h.e,h.n)*180/Math.PI+360)%360-m+540)%360-180,I=o>0?(t[o].t-t[o-1].t)/i.SAMPLE_MS:1;m=(m+Math.max(-S*I,Math.min(S*I,z))+360)%360}const p=f(o),g=h.e-r,w=h.n-c,x=Math.hypot(g,w),P=p.e+y*x*g,E=p.n+y*x*w,v=Math.max(s+p.u,.2*s),A=m*Math.PI/180,L=P*Math.sin(A)+E*Math.cos(A),l=P*Math.cos(A)-E*Math.sin(A);t[o].headingDeg=m,t[o].pitchDeg=-Math.atan(L/v)*180/Math.PI,t[o].rollDeg=Math.atan(l/v)*180/Math.PI}return t}static between(t,a,e,n){if(e===t.t)return t;if(e===a.t)return a;const s=a.t===t.t?0:Math.min(1,Math.max(0,(e-t.t)/(a.t-t.t))),M=(a.headingDeg-t.headingDeg+540)%360-180;return{t:e,...n(e),headingDeg:(t.headingDeg+M*s+360)%360,pitchDeg:t.pitchDeg+(a.pitchDeg-t.pitchDeg)*s,rollDeg:t.rollDeg+(a.rollDeg-t.rollDeg)*s}}static randomFrom(t){let a=t>>>0;return()=>{a=a+1831565813>>>0;let e=a;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}}static round(t,a=100){return Math.round(t*a)/a}}class j{constructor(t,a){this.points=t,this.hovers=a;const e=t;this.speeds=e.map((n,s)=>{const M=e[s-1],r=e[s+1],c=(h,p)=>{const g=Math.max((p.t-h.t)/1e3,.001);return{e:(p.eastM-h.eastM)/g,n:(p.northM-h.northM)/g,u:(p.upM-h.upM)/g}};if(!M||!r)return a||e.length<2?{e:0,n:0,u:0}:M?c(M,n):c(n,r);const d=c(M,n),u=c(n,r),f=Math.hypot(d.e,d.n,d.u),y=Math.hypot(u.e,u.n,u.u);if(a&&(f<.05||y<.05||d.e*u.e+d.n*u.n+d.u*u.u<0))return{e:0,n:0,u:0};const S=n.t-M.t,m=r.t-n.t,o=S/Math.max(S+m,1);return{e:d.e*(1-o)+u.e*o,n:d.n*(1-o)+u.n*o,u:d.u*(1-o)+u.u*o}})}speeds;at(t){const a=this.points;if(a.length===1)return{...a[0],t};if(t<=a[0].t)return this.outside(t,0);if(t>=a[a.length-1].t)return this.outside(t,a.length-1);let e=0;for(;e<a.length-2&&t>a[e+1].t;)e++;const n=a[e],s=a[e+1],M=Math.max((s.t-n.t)/1e3,.001),r=(t-n.t)/(s.t-n.t),c=r*r,d=c*r,u=2*d-3*c+1,f=d-2*c+r,y=-2*d+3*c,S=d-c,m=this.speeds[e],o=this.speeds[e+1];return{t,eastM:u*n.eastM+f*m.e*M+y*s.eastM+S*o.e*M,northM:u*n.northM+f*m.n*M+y*s.northM+S*o.n*M,upM:u*n.upM+f*m.u*M+y*s.upM+S*o.u*M}}velocityAt(t){const a=this.at(t-50),e=this.at(t+50);return{east:(e.eastM-a.eastM)/.1,north:(e.northM-a.northM)/.1,up:(e.upM-a.upM)/.1}}headingAtRest(t){const a=this.points;for(let e=a.length-1;e>0;e--){if(a[e].t>t&&e>1)continue;const n=a[e].eastM-a[e-1].eastM,s=a[e].northM-a[e-1].northM;if(Math.hypot(n,s)>.1)return Math.atan2(n,s)}for(let e=1;e<a.length;e++){const n=a[e].eastM-a[e-1].eastM,s=a[e].northM-a[e-1].northM;if(Math.hypot(n,s)>.1)return Math.atan2(n,s)}return 0}outside(t,a){const e=this.points[a];if(this.hovers)return{...e,t};const n=this.speeds[a],s=(t-e.t)/1e3;return{t,eastM:e.eastM+n.e*s,northM:e.northM+n.n*s,upM:e.upM+n.u*s}}}const K=Object.freeze(Object.defineProperty({__proto__:null,DroneFlight:i,DronePath:j},Symbol.toStringTag,{value:"Module"}));export{O as D,i as a,j as b,K as c};
1
+ import{bg as T}from"./rr0-sighting-editor.mjs";class O{static G=9.81;static ALL=[{id:"quadcopter",modelId:"ufoathome-drone-quadcopter",sizeM:{widthM:.508,lengthM:.493,heightM:.093},hovers:!0,maxSpeedMS:21,maxTiltDeg:35,holdM:{horizontalM:.5,verticalM:.5},yawRateDegS:120,bodyColor:"#5b5f63",lights:{front:{color:"#ff2a1a",candela:1,leds:[{at:[-.125,-.03,-.14],radiusM:.004},{at:[.125,-.03,-.14],radiusM:.004}]},rear:{color:"#2aff5a",candela:1,hz:.5,leds:[{at:[0,.005,.135],radiusM:.004}]},strobe:{color:"#ffffff",candela:40,hz:1.25,flashS:.06,leds:[{at:[0,-.034,.05],radiusM:.006}]}}},{id:"saucer",modelId:"ufoathome-drone-saucer",sizeM:{widthM:.8,lengthM:.8,heightM:.206},hovers:!0,maxSpeedMS:12,maxTiltDeg:25,holdM:{horizontalM:.5,verticalM:.5},yawRateDegS:90,bodyColor:"#c9ccd0",lights:{rim:{color:"#4fd2ff",candela:1,leds:O.ring(12,.388,0,.012)},under:{color:"#ffffff",candela:3,leds:[{at:[0,-.094,0],radiusM:.02}]},strobe:{color:"#ffffff",candela:40,hz:1.25,flashS:.06,off:!0,leds:[{at:[0,.1,0],radiusM:.006}]}}},{id:"fixed-wing",modelId:"ufoathome-drone-fixed-wing",sizeM:{widthM:3.596,lengthM:1.848,heightM:.53},hovers:!1,maxSpeedMS:33,maxTiltDeg:0,holdM:{horizontalM:1,verticalM:.5},yawRateDegS:0,bodyColor:"#6f7568",lights:{"nav-left":{color:"#ff2a1a",candela:2,leds:[{at:[-1.79,.02,.05],radiusM:.008}]},"nav-right":{color:"#2aff5a",candela:2,leds:[{at:[1.79,.02,.05],radiusM:.008}]},tail:{color:"#ffffff",candela:1,leds:[{at:[0,.05,.94],radiusM:.008}]},strobe:{color:"#ffffff",candela:40,hz:1,flashS:.06,leds:[{at:[0,-.1,.1],radiusM:.008}]}}}];static byId(t){return O.ALL.find(a=>a.id===t)}static materialOf(t,a,e){return e>1?`light-${t}-${a+1}`:`light-${t}`}static colourKeyOf(t){return t.replace(/-([a-z])/g,(a,e)=>e.toUpperCase())+"Color"}static ring(t,a,e,n){return Array.from({length:t},(s,M)=>{const r=M/t*2*Math.PI;return{at:[Math.round(a*Math.sin(r)*1e4)/1e4,e,Math.round(-a*Math.cos(r)*1e4)/1e4],radiusM:n}})}}class i{static SAMPLE_MS=100;static MAX_KEYFRAMES=6e4;static computed=new Map;static bodiesOf(t){const a=JSON.stringify(t);let e=i.computed.get(a);return e||(e=i.compute(t),i.computed.set(a,e),i.computed.size>16&&i.computed.delete(i.computed.keys().next().value)),e}static airframeOf(t){return O.byId(t.airframe)??O.ALL[0]}static lightsOf(t){const a=i.airframeOf(t),e={};for(const[n,s]of Object.entries(a.lights)){const M=t.lights?.[n];if(M===!1)continue;const r={...s,...M??{}};r.off||(e[n]=r)}return e}static compute(t){const a=i.pathOf(t);if(a.length===0)return[];const e=i.airframeOf(t),n=new j(a,e.hovers),s=Math.max(1,Math.floor(t.count??1)),M=i.randomFrom(t.seed??1),r=a[0].t,c=Math.max(a[a.length-1].t,r),d=i.sampleMs(s,c-r),u=i.offsetsOf(t.formation??{kind:s>1?"cluster":"single"},s,M),f=i.lightsOf(t),y={bodyColor:t.bodyColor??e.bodyColor};for(const[m,o]of Object.entries(f))y[O.colourKeyOf(m)]=o.color;const S=t.formation?.kind==="line";return u.map((m,o)=>{const h=i.swayFrom(M,e.holdM),p=Object.fromEntries(Object.entries(f).map(([l,b])=>[l,b.phase??(s>1?M():0)])),g=l=>{const b=n.at(l),[z,I,N]=h((l-r)/1e3);let k=m.eastM,C=m.northM;if(S){const D=n.velocityAt(l),R=Math.hypot(D.east,D.north)>.3?Math.atan2(D.east,D.north):n.headingAtRest(l);k=Math.cos(R)*m.rightM,C=-Math.sin(R)*m.rightM}return{eastM:b.eastM+k+z,northM:b.northM+C+I,upM:b.upM+m.upM+N}},w=[];for(let l=r;l<=c+1e-6;l+=d)w.push(l);w[w.length-1]<c&&w.push(c);const x=i.attitudes(w.map(l=>({t:l,...g(l),headingDeg:0,pitchDeg:0,rollDeg:0})),e,t),P=i.switchesOf(f,p,r,c),E=[...new Set([...w.map(l=>Math.round(l)),...P])].filter(l=>l>=r&&l<=c).sort((l,b)=>l-b);let v=0;const A=E.map((l,b)=>{for(;v<x.length-2&&x[v+1].t<=l;)v++;const z=i.between(x[v],x[Math.min(x.length-1,v+1)],l,g);return{t:l,eastM:i.round(z.eastM),northM:i.round(z.northM),altitudeM:i.round(z.upM-e.sizeM.heightM/2),...b===0?{sizeM:e.sizeM}:{},attitude:{headingDeg:i.round(z.headingDeg,10),pitchDeg:i.round(z.pitchDeg,10),rollDeg:i.round(z.rollDeg,10)},lights:i.luminancesAt(f,p,l,E[b+1]===l+1)}});return{id:s>1?`${t.id}-${o+1}`:t.id,...t.title?{title:t.title}:{},...t.explainsEach?t.explainsEach[o]!==void 0?{explains:[t.explainsEach[o]]}:{}:{...t.explains?{explains:t.explains}:{},...s>1?{ensemble:t.id}:{}},model:{id:e.modelId},modelParameters:y,lamps:i.lampsOf(f,p),...t.silent?{}:{sound:{kind:"unmanned",...t.quieterDb?{quieterDb:t.quieterDb}:{}}},track:A}})}static lampsOf(t,a){return Object.entries(t).flatMap(([e,n])=>n.leds.map((s,M)=>{const r=n.hz>0,c=r?1/n.hz:0;return{id:O.materialOf(e,M,n.leds.length),offsetM:{x:s.at[0],y:s.at[1],z:-s.at[2]},color:n.color,intensity:n.candela/T,pattern:r?{kind:"flash",perMinute:n.hz*60,dutyCycle:Math.min(1,(n.flashS??.5*c)/c),phase:((1-(a[e]??0))%1+1)%1}:{kind:"steady"}}}))}static luminancesAt(t,a,e,n=!1){const s={};for(const[M,r]of Object.entries(t)){const c=i.isOn(r,a[M]??0,n?e-1:e+.5);r.leds.forEach((d,u)=>{s[O.materialOf(M,u,r.leds.length)]=c?i.round(r.candela/(Math.PI*d.radiusM**2),1):0})}return s}static isOn(t,a,e){if(!(t.hz>0))return!0;const n=1e3/t.hz,s=Math.min(n,(t.flashS??.5/t.hz)*1e3);return((e/n-a)%1+1)%1*n<s}static switchesOf(t,a,e,n){const s=[];for(const[M,r]of Object.entries(t)){if(!(r.hz>0))continue;const c=1e3/r.hz,d=Math.min(c,(r.flashS??.5/r.hz)*1e3);if(d>=c)continue;const u=(a[M]??0)*c;for(let f=Math.floor((e-u)/c)*c+u;f<=n;f+=c)for(const y of[f,f+d]){const S=Math.round(y);S>=e&&S<n&&s.push(S,S+1)}}return s}static sampleMs(t,a){const e=t*(a/i.SAMPLE_MS+1);return e<=i.MAX_KEYFRAMES?i.SAMPLE_MS:Math.ceil(i.SAMPLE_MS*e/i.MAX_KEYFRAMES/50)*50}static pathOf(t){return[...t.path].sort((a,e)=>a.t-e.t).map(a=>{if("eastM"in a)return{t:a.t,eastM:a.eastM,northM:a.northM,upM:a.altitudeM};const e=a.azimuthDeg*Math.PI/180,n=a.altitudeDeg*Math.PI/180,s=a.distanceM*Math.cos(n);return{t:a.t,eastM:s*Math.sin(e),northM:s*Math.cos(e),upM:(a.eyeHeightM??1.6)+a.distanceM*Math.sin(n)}})}static offsetsOf(t,a,e){if(t.kind==="single"||a===1)return[{eastM:0,northM:0,upM:0,rightM:0}];if(t.kind==="line"){const c=t.spacingM??5;return Array.from({length:a},(d,u)=>({eastM:0,northM:0,upM:(e()-.5)*c*.2,rightM:(u-(a-1)/2)*c}))}const n=t.spacingM??10,s=Math.cbrt(a*n**3/(4/3*Math.PI*2*2*1)),M=[];let r=0;for(;M.length<a&&r<a*200;){r++;const c=2*e()-1,d=2*e()-1,u=2*e()-1;if(c*c+d*d+u*u>1)continue;const f={eastM:c*2*s,northM:d*2*s,upM:u*s,rightM:0};M.some(y=>(y.eastM-f.eastM)**2+(y.northM-f.northM)**2+(y.upM-f.upM)**2<(n/2)**2)||M.push(f)}for(;M.length<a;)M.push({eastM:(e()-.5)*4*s,northM:(e()-.5)*4*s,upM:0,rightM:0});return M}static swayFrom(t,a){const e=[a.horizontalM,a.horizontalM,a.verticalM].map(n=>[0,1].map(()=>({period:4+t()*10,phase:t()*2*Math.PI,amplitude:n*.5*(.5+.5*t())})));return n=>e.map(s=>s.reduce((M,r)=>M+r.amplitude*Math.sin(2*Math.PI*n/r.period+r.phase),0))}static attitudes(t,a,e){const n=t.length;if(n===0)return t;const s=O.G,M=(e.wind?.fromDeg??0)*Math.PI/180,r=-(e.wind?.speedMS??0)*Math.sin(M),c=-(e.wind?.speedMS??0)*Math.cos(M),d=o=>{const h=t[Math.max(0,o-1)],p=t[Math.min(n-1,o+1)],g=Math.max((p.t-h.t)/1e3,.001);return{e:(p.eastM-h.eastM)/g,n:(p.northM-h.northM)/g,u:(p.upM-h.upM)/g}},u=t.map((o,h)=>d(h)),f=o=>{const h=u[Math.max(0,o-1)],p=u[Math.min(n-1,o+1)],g=Math.max((t[Math.min(n-1,o+1)].t-t[Math.max(0,o-1)].t)/1e3,.001);return{e:(p.e-h.e)/g,n:(p.n-h.n)/g,u:(p.u-h.u)/g}};if(!a.hovers){for(let o=0;o<n;o++){const h=u[o],p=h.e-r,g=h.n-c,w=Math.hypot(h.e,h.n);t[o].headingDeg=Math.hypot(p,g)>.5?(Math.atan2(p,g)*180/Math.PI+360)%360:o>0?t[o-1].headingDeg:0,t[o].pitchDeg=Math.atan2(h.u,Math.max(w,1))*180/Math.PI+2;const x=f(o),P=w>.5?(x.e*h.n-x.n*h.e)/w:0;t[o].rollDeg=Math.max(-45,Math.min(45,Math.atan(P/s)*180/Math.PI))}return t}const y=s*Math.tan(a.maxTiltDeg*Math.PI/180)/a.maxSpeedMS**2,S=a.yawRateDegS*i.SAMPLE_MS/1e3;let m=e.headingDeg;if(m===void 0){const o=u.find(h=>Math.hypot(h.e,h.n)>1);m=o?(Math.atan2(o.e,o.n)*180/Math.PI+360)%360:0}for(let o=0;o<n;o++){const h=u[o];if(e.headingDeg===void 0&&Math.hypot(h.e,h.n)>1){const z=((Math.atan2(h.e,h.n)*180/Math.PI+360)%360-m+540)%360-180,I=o>0?(t[o].t-t[o-1].t)/i.SAMPLE_MS:1;m=(m+Math.max(-S*I,Math.min(S*I,z))+360)%360}const p=f(o),g=h.e-r,w=h.n-c,x=Math.hypot(g,w),P=p.e+y*x*g,E=p.n+y*x*w,v=Math.max(s+p.u,.2*s),A=m*Math.PI/180,L=P*Math.sin(A)+E*Math.cos(A),l=P*Math.cos(A)-E*Math.sin(A);t[o].headingDeg=m,t[o].pitchDeg=-Math.atan(L/v)*180/Math.PI,t[o].rollDeg=Math.atan(l/v)*180/Math.PI}return t}static between(t,a,e,n){if(e===t.t)return t;if(e===a.t)return a;const s=a.t===t.t?0:Math.min(1,Math.max(0,(e-t.t)/(a.t-t.t))),M=(a.headingDeg-t.headingDeg+540)%360-180;return{t:e,...n(e),headingDeg:(t.headingDeg+M*s+360)%360,pitchDeg:t.pitchDeg+(a.pitchDeg-t.pitchDeg)*s,rollDeg:t.rollDeg+(a.rollDeg-t.rollDeg)*s}}static randomFrom(t){let a=t>>>0;return()=>{a=a+1831565813>>>0;let e=a;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}}static round(t,a=100){return Math.round(t*a)/a}}class j{constructor(t,a){this.points=t,this.hovers=a;const e=t;this.speeds=e.map((n,s)=>{const M=e[s-1],r=e[s+1],c=(h,p)=>{const g=Math.max((p.t-h.t)/1e3,.001);return{e:(p.eastM-h.eastM)/g,n:(p.northM-h.northM)/g,u:(p.upM-h.upM)/g}};if(!M||!r)return a||e.length<2?{e:0,n:0,u:0}:M?c(M,n):c(n,r);const d=c(M,n),u=c(n,r),f=Math.hypot(d.e,d.n,d.u),y=Math.hypot(u.e,u.n,u.u);if(a&&(f<.05||y<.05||d.e*u.e+d.n*u.n+d.u*u.u<0))return{e:0,n:0,u:0};const S=n.t-M.t,m=r.t-n.t,o=S/Math.max(S+m,1);return{e:d.e*(1-o)+u.e*o,n:d.n*(1-o)+u.n*o,u:d.u*(1-o)+u.u*o}})}speeds;at(t){const a=this.points;if(a.length===1)return{...a[0],t};if(t<=a[0].t)return this.outside(t,0);if(t>=a[a.length-1].t)return this.outside(t,a.length-1);let e=0;for(;e<a.length-2&&t>a[e+1].t;)e++;const n=a[e],s=a[e+1],M=Math.max((s.t-n.t)/1e3,.001),r=(t-n.t)/(s.t-n.t),c=r*r,d=c*r,u=2*d-3*c+1,f=d-2*c+r,y=-2*d+3*c,S=d-c,m=this.speeds[e],o=this.speeds[e+1];return{t,eastM:u*n.eastM+f*m.e*M+y*s.eastM+S*o.e*M,northM:u*n.northM+f*m.n*M+y*s.northM+S*o.n*M,upM:u*n.upM+f*m.u*M+y*s.upM+S*o.u*M}}velocityAt(t){const a=this.at(t-50),e=this.at(t+50);return{east:(e.eastM-a.eastM)/.1,north:(e.northM-a.northM)/.1,up:(e.upM-a.upM)/.1}}headingAtRest(t){const a=this.points;for(let e=a.length-1;e>0;e--){if(a[e].t>t&&e>1)continue;const n=a[e].eastM-a[e-1].eastM,s=a[e].northM-a[e-1].northM;if(Math.hypot(n,s)>.1)return Math.atan2(n,s)}for(let e=1;e<a.length;e++){const n=a[e].eastM-a[e-1].eastM,s=a[e].northM-a[e-1].northM;if(Math.hypot(n,s)>.1)return Math.atan2(n,s)}return 0}outside(t,a){const e=this.points[a];if(this.hovers)return{...e,t};const n=this.speeds[a],s=(t-e.t)/1e3;return{t,eastM:e.eastM+n.e*s,northM:e.northM+n.n*s,upM:e.upM+n.u*s}}}const K=Object.freeze(Object.defineProperty({__proto__:null,DroneFlight:i,DronePath:j},Symbol.toStringTag,{value:"Module"}));export{O as D,i as a,j as b,K as c};
@@ -1 +1 @@
1
- import{b9 as o,b6 as f}from"./rr0-sighting-editor.mjs";import{D as c,a,b}from"./DroneFlight-BpnBgJ9K.js";class e{static DRONE="drone";static FLIGHT="flight";static LOOK="look";static LIGHT_NAMES=[...new Set(c.ALL.flatMap(t=>Object.keys(t.lights)))];static textKey(t){return t.replace(/-([a-z])/g,(l,s)=>s.toUpperCase())}static flightOf(t){return t}static ownLight(t,l){return a.airframeOf(e.flightOf(t)).lights[l]}static formationUnstated(t){return(o.read(t,"count")??1)>1?"cluster":"single"}static formationOf(t){const l=o.read(t,"formation.kind");return typeof l=="string"?l:e.formationUnstated(t)}static hovers(t){return a.airframeOf(e.flightOf(t)).hovers}static light(t){const l=e.textKey(t),s=i=>e.ownLight(i,t)!==void 0,h=i=>{const u=e.flightOf(i).lights?.[t];return u===!1?!0:typeof u?.off=="boolean"?u.off:e.ownLight(i,t)?.off===!0},n=i=>s(i)&&!h(i);return[{type:"boolean",key:`lights.${t}.off`,group:l,label:"switchedOff",visibleWhen:s,effective:i=>e.flightOf(i).lights?.[t]===!1||e.ownLight(i,t)?.off===!0},{type:"colour",key:`lights.${t}.color`,group:l,label:"colour",visibleWhen:n,effective:i=>e.ownLight(i,t)?.color},{type:"number",key:`lights.${t}.candela`,min:0,max:1e5,step:.1,unit:"cd",group:l,label:"intensity",hint:"eachLed",visibleWhen:n,effective:i=>e.ownLight(i,t)?.candela},{type:"number",key:`lights.${t}.hz`,min:0,max:50,step:.05,unit:"Hz",group:l,label:"flashesASecond",hint:"steadyAtNought",visibleWhen:n,effective:i=>e.ownLight(i,t)?.hz??0},{type:"number",key:`lights.${t}.flashS`,min:.001,max:60,step:.001,unit:"s",group:l,label:"eachFlashLasts",visibleWhen:i=>n(i)&&(o.read(i,`lights.${t}.hz`)??e.ownLight(i,t)?.hz??0)>0,effective:i=>{const u=e.ownLight(i,t),p=o.read(i,`lights.${t}.hz`)??u?.hz??0;return u?.flashS??(p>0?Math.round(500/p)/1e3:void 0)}}]}static SET={kind:"drones",title:"drones",parameters:[{type:"said",key:"title",label:"name",group:e.DRONE},{type:"choice",key:"airframe",required:!0,group:e.DRONE,label:"airframe",choices:c.ALL.map(t=>({value:t.id,label:e.textKey(t.id)}))},{type:"number",key:"count",min:1,max:2e3,step:1,group:e.DRONE,effective:()=>1,label:"howMany"},{type:"set",key:"explains",group:e.DRONE,label:"standForTheShapes",hint:"theWholeGroupTakenForOne",visibleWhen:t=>e.flightOf(t).explainsEach===void 0,options:(t,l)=>{const s=l?.shapes??[],h=(e.flightOf(t).explains??[]).filter(n=>!s.some(i=>i.value===n));return[...s,...h.map(n=>({value:n,label:n}))]},empty:"noShape"},{type:"number",key:"seed",min:0,max:4294967295,step:1,group:e.DRONE,effective:()=>1,label:"draw",hint:"whatTheDrawsStartFrom"},{type:"choice",key:"formation.kind",group:e.FLIGHT,label:"pattern",effective:t=>e.formationUnstated(t),choices:[{value:"single",label:"oneDrone"},{value:"cluster",label:"aLooseGroup"},{value:"line",label:"abreast"}],visibleWhen:t=>(o.read(t,"count")??1)>1},{type:"number",key:"formation.spacingM",min:.5,max:1e3,step:.5,unit:"m",group:e.FLIGHT,effective:t=>e.formationOf(t)==="line"?5:10,label:"spacing",hint:"betweenNeighbours",visibleWhen:t=>(o.read(t,"count")??1)>1&&e.formationOf(t)!=="single"},{type:"number",key:"headingDeg",min:0,max:360,step:1,unit:"°",group:e.FLIGHT,label:"noseTowards",hint:"emptyItFacesWhereItGoes",placeholder:"whereItGoes",visibleWhen:e.hovers},{type:"number",key:"wind.fromDeg",min:0,max:360,step:1,unit:"°",group:e.FLIGHT,label:"windFrom",effective:()=>0,hint:"whatItLeansInto"},{type:"number",key:"wind.speedMS",min:0,max:60,step:.1,unit:"m/s",group:e.FLIGHT,label:"windSpeed",effective:()=>0},{type:"boolean",key:"silent",group:e.FLIGHT,label:"silent",hint:"notEvenItsRotors"},{type:"number",key:"quieterDb",min:0,max:60,step:1,unit:"dB",group:e.FLIGHT,label:"quieter",hint:"thanItsClass",effective:()=>0,visibleWhen:t=>o.read(t,"silent")!==!0},{type:"colour",key:"bodyColor",group:e.LOOK,label:"hull",effective:t=>a.airframeOf(e.flightOf(t)).bodyColor},...e.LIGHT_NAMES.flatMap(t=>e.light(t))]};static angular(t){return typeof t.azimuthDeg=="number"}static WAYPOINT={kind:"drones-waypoint",title:"pointOfThePath",parameters:[{type:"number",key:"t",min:-36e3,max:36e3,step:.1,unit:"s",scale:.001,required:!0,label:"time",hint:"secondsOfTheRecording"},{type:"position",key:"eastM",secondKey:"northM",saidKey:"saidPosition",native:"local",step:1,rangeM:1e5,label:"position",visibleWhen:t=>!e.angular(t)},{type:"number",key:"altitudeM",min:-500,max:2e4,step:.1,unit:"m",required:!0,label:"height",hint:"aboveTheGroundOfThePlace",visibleWhen:t=>!e.angular(t)},{type:"number",key:"azimuthDeg",min:0,max:360,step:.1,unit:"°",required:!0,label:"azimuth",visibleWhen:t=>e.angular(t)},{type:"number",key:"altitudeDeg",min:-90,max:90,step:.1,unit:"°",required:!0,label:"elevation",visibleWhen:t=>e.angular(t)},{type:"number",key:"distanceM",min:0,max:1e5,step:1,unit:"m",required:!0,label:"distance",visibleWhen:t=>e.angular(t)},{type:"number",key:"eyeHeightM",min:0,max:1e4,step:.1,unit:"m",effective:()=>1.6,label:"eyeHeight",visibleWhen:t=>e.angular(t)}]};static waypointAt(t,l){const s=a.pathOf(t);if(s.length===0)return{t:Math.round(l),eastM:0,northM:0,altitudeM:0};const h=new b(s,a.airframeOf(t).hovers).at(l),n=i=>Math.round(i*10)/10;return{t:Math.round(l),eastM:n(h.eastM),northM:n(h.northM),altitudeM:n(h.upM)}}static publish(){f.publish(e.SET),f.publish(e.WAYPOINT)}}export{e as D};
1
+ import{bf as o,bc as f}from"./rr0-sighting-editor.mjs";import{D as c,a,b}from"./DroneFlight-CFztr-9j.js";class e{static DRONE="drone";static FLIGHT="flight";static LOOK="look";static LIGHT_NAMES=[...new Set(c.ALL.flatMap(t=>Object.keys(t.lights)))];static textKey(t){return t.replace(/-([a-z])/g,(l,s)=>s.toUpperCase())}static flightOf(t){return t}static ownLight(t,l){return a.airframeOf(e.flightOf(t)).lights[l]}static formationUnstated(t){return(o.read(t,"count")??1)>1?"cluster":"single"}static formationOf(t){const l=o.read(t,"formation.kind");return typeof l=="string"?l:e.formationUnstated(t)}static hovers(t){return a.airframeOf(e.flightOf(t)).hovers}static light(t){const l=e.textKey(t),s=i=>e.ownLight(i,t)!==void 0,h=i=>{const u=e.flightOf(i).lights?.[t];return u===!1?!0:typeof u?.off=="boolean"?u.off:e.ownLight(i,t)?.off===!0},n=i=>s(i)&&!h(i);return[{type:"boolean",key:`lights.${t}.off`,group:l,label:"switchedOff",visibleWhen:s,effective:i=>e.flightOf(i).lights?.[t]===!1||e.ownLight(i,t)?.off===!0},{type:"colour",key:`lights.${t}.color`,group:l,label:"colour",visibleWhen:n,effective:i=>e.ownLight(i,t)?.color},{type:"number",key:`lights.${t}.candela`,min:0,max:1e5,step:.1,unit:"cd",group:l,label:"intensity",hint:"eachLed",visibleWhen:n,effective:i=>e.ownLight(i,t)?.candela},{type:"number",key:`lights.${t}.hz`,min:0,max:50,step:.05,unit:"Hz",group:l,label:"flashesASecond",hint:"steadyAtNought",visibleWhen:n,effective:i=>e.ownLight(i,t)?.hz??0},{type:"number",key:`lights.${t}.flashS`,min:.001,max:60,step:.001,unit:"s",group:l,label:"eachFlashLasts",visibleWhen:i=>n(i)&&(o.read(i,`lights.${t}.hz`)??e.ownLight(i,t)?.hz??0)>0,effective:i=>{const u=e.ownLight(i,t),p=o.read(i,`lights.${t}.hz`)??u?.hz??0;return u?.flashS??(p>0?Math.round(500/p)/1e3:void 0)}}]}static SET={kind:"drones",title:"drones",parameters:[{type:"said",key:"title",label:"name",group:e.DRONE},{type:"choice",key:"airframe",required:!0,group:e.DRONE,label:"airframe",choices:c.ALL.map(t=>({value:t.id,label:e.textKey(t.id)}))},{type:"number",key:"count",min:1,max:2e3,step:1,group:e.DRONE,effective:()=>1,label:"howMany"},{type:"set",key:"explains",group:e.DRONE,label:"standForTheShapes",hint:"theWholeGroupTakenForOne",visibleWhen:t=>e.flightOf(t).explainsEach===void 0,options:(t,l)=>{const s=l?.shapes??[],h=(e.flightOf(t).explains??[]).filter(n=>!s.some(i=>i.value===n));return[...s,...h.map(n=>({value:n,label:n}))]},empty:"noShape"},{type:"number",key:"seed",min:0,max:4294967295,step:1,group:e.DRONE,effective:()=>1,label:"draw",hint:"whatTheDrawsStartFrom"},{type:"choice",key:"formation.kind",group:e.FLIGHT,label:"pattern",effective:t=>e.formationUnstated(t),choices:[{value:"single",label:"oneDrone"},{value:"cluster",label:"aLooseGroup"},{value:"line",label:"abreast"}],visibleWhen:t=>(o.read(t,"count")??1)>1},{type:"number",key:"formation.spacingM",min:.5,max:1e3,step:.5,unit:"m",group:e.FLIGHT,effective:t=>e.formationOf(t)==="line"?5:10,label:"spacing",hint:"betweenNeighbours",visibleWhen:t=>(o.read(t,"count")??1)>1&&e.formationOf(t)!=="single"},{type:"number",key:"headingDeg",min:0,max:360,step:1,unit:"°",group:e.FLIGHT,label:"noseTowards",hint:"emptyItFacesWhereItGoes",placeholder:"whereItGoes",visibleWhen:e.hovers},{type:"number",key:"wind.fromDeg",min:0,max:360,step:1,unit:"°",group:e.FLIGHT,label:"windFrom",effective:()=>0,hint:"whatItLeansInto"},{type:"number",key:"wind.speedMS",min:0,max:60,step:.1,unit:"m/s",group:e.FLIGHT,label:"windSpeed",effective:()=>0},{type:"boolean",key:"silent",group:e.FLIGHT,label:"silent",hint:"notEvenItsRotors"},{type:"number",key:"quieterDb",min:0,max:60,step:1,unit:"dB",group:e.FLIGHT,label:"quieter",hint:"thanItsClass",effective:()=>0,visibleWhen:t=>o.read(t,"silent")!==!0},{type:"colour",key:"bodyColor",group:e.LOOK,label:"hull",effective:t=>a.airframeOf(e.flightOf(t)).bodyColor},...e.LIGHT_NAMES.flatMap(t=>e.light(t))]};static angular(t){return typeof t.azimuthDeg=="number"}static WAYPOINT={kind:"drones-waypoint",title:"pointOfThePath",parameters:[{type:"number",key:"t",min:-36e3,max:36e3,step:.1,unit:"s",scale:.001,required:!0,label:"time",hint:"secondsOfTheRecording"},{type:"position",key:"eastM",secondKey:"northM",saidKey:"saidPosition",native:"local",step:1,rangeM:1e5,label:"position",visibleWhen:t=>!e.angular(t)},{type:"number",key:"altitudeM",min:-500,max:2e4,step:.1,unit:"m",required:!0,label:"height",hint:"aboveTheGroundOfThePlace",visibleWhen:t=>!e.angular(t)},{type:"number",key:"azimuthDeg",min:0,max:360,step:.1,unit:"°",required:!0,label:"azimuth",visibleWhen:t=>e.angular(t)},{type:"number",key:"altitudeDeg",min:-90,max:90,step:.1,unit:"°",required:!0,label:"elevation",visibleWhen:t=>e.angular(t)},{type:"number",key:"distanceM",min:0,max:1e5,step:1,unit:"m",required:!0,label:"distance",visibleWhen:t=>e.angular(t)},{type:"number",key:"eyeHeightM",min:0,max:1e4,step:.1,unit:"m",effective:()=>1.6,label:"eyeHeight",visibleWhen:t=>e.angular(t)}]};static waypointAt(t,l){const s=a.pathOf(t);if(s.length===0)return{t:Math.round(l),eastM:0,northM:0,altitudeM:0};const h=new b(s,a.airframeOf(t).hovers).at(l),n=i=>Math.round(i*10)/10;return{t:Math.round(l),eastM:n(h.eastM),northM:n(h.northM),altitudeM:n(h.upM)}}static publish(){f.publish(e.SET),f.publish(e.WAYPOINT)}}export{e as D};
@@ -1 +1 @@
1
- import{aT as R,aK as l,aI as I}from"./rr0-sighting-editor.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 c=await this.snapshotFor(u,t,n,i,o);if(!c)return{status:"failed"};const s=c.flights.slice(0,e.MAX_TRACED),h=await Promise.all(s.map(a=>this.trackOf(u,a))),f=[];return s.forEach((a,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(a),points:S})}),{status:"found",tracks:f,creditsSpent:this.creditsSpent,partial:{traced:s.length,seen:c.flights.length,moreSeen:c.flights.length>=e.SMALLEST_PLAN_RESULTS,withinKm:c.withinKm}}}catch(c){return{status:"failed",problem:c instanceof p?c.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),c=Math.cos(Math.max(Math.abs(o),Math.abs(u))*Math.PI/180),s=c<1e-6?180:n/(e.KM_PER_DEG*c),h=Math.max(-180,t.lng-s),f=Math.min(180,t.lng+s);return[o,u,h,f].map(a=>a.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 c=`${n.lat.toFixed(3)},${n.lng.toFixed(3)},${u}`;for(const f of this.snapshots){const a=await f.catch(()=>{});if(a&&a.place===c&&a.t>=i&&a.t<=o)return a}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,c);return this.snapshots.push(h),h.catch(()=>this.snapshots.splice(this.snapshots.indexOf(h),1)),h}async askSnapshot(t,n,i,o,u){const c=[...e.RINGS_KM.filter(a=>a<o),o];let s=[],h=o;for(const a of c)if(h=a,s=await this.flightsWithin(t,n,i,a),s.length>=e.MAX_TRACED)break;const f=a=>l.groundDistanceKm(n,{lat:a.lat,lng:a.lon});return{t:i,place:u,withinKm:h,flights:[...s].sort((a,r)=>f(a)-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 c=(Array.isArray(o)?o:o.data??[]).flatMap(s=>s.tracks??[]);return this.creditsSpent+=c.length>0?e.CREDITS_PER_TRACK:e.CREDITS_FOR_NOTHING,c.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{aZ as R,aQ as l,aO as I}from"./rr0-sighting-editor.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 c=await this.snapshotFor(u,t,n,i,o);if(!c)return{status:"failed"};const s=c.flights.slice(0,e.MAX_TRACED),h=await Promise.all(s.map(a=>this.trackOf(u,a))),f=[];return s.forEach((a,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(a),points:S})}),{status:"found",tracks:f,creditsSpent:this.creditsSpent,partial:{traced:s.length,seen:c.flights.length,moreSeen:c.flights.length>=e.SMALLEST_PLAN_RESULTS,withinKm:c.withinKm}}}catch(c){return{status:"failed",problem:c instanceof p?c.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),c=Math.cos(Math.max(Math.abs(o),Math.abs(u))*Math.PI/180),s=c<1e-6?180:n/(e.KM_PER_DEG*c),h=Math.max(-180,t.lng-s),f=Math.min(180,t.lng+s);return[o,u,h,f].map(a=>a.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 c=`${n.lat.toFixed(3)},${n.lng.toFixed(3)},${u}`;for(const f of this.snapshots){const a=await f.catch(()=>{});if(a&&a.place===c&&a.t>=i&&a.t<=o)return a}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,c);return this.snapshots.push(h),h.catch(()=>this.snapshots.splice(this.snapshots.indexOf(h),1)),h}async askSnapshot(t,n,i,o,u){const c=[...e.RINGS_KM.filter(a=>a<o),o];let s=[],h=o;for(const a of c)if(h=a,s=await this.flightsWithin(t,n,i,a),s.length>=e.MAX_TRACED)break;const f=a=>l.groundDistanceKm(n,{lat:a.lat,lng:a.lon});return{t:i,place:u,withinKm:h,flights:[...s].sort((a,r)=>f(a)-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 c=(Array.isArray(o)?o:o.data??[]).flatMap(s=>s.tracks??[]);return this.creditsSpent+=c.length>0?e.CREDITS_PER_TRACK:e.CREDITS_FOR_NOTHING,c.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 +1 @@
1
- import{ck as Le,cl as Q,cm as he,cn as Me,co as v,cp as de,bI as w,bL as pe,bv as F,cq as b,cf as U,c5 as Se,cr as ye,b3 as we,G as K,cs as be,V as C,Q as me,ct as Ne,D as ge,cu as Ie,cv as Oe,bf as V,cw as Ce,cx as Te,cy as Fe,cz as Pe,cA as He,bO as J,c8 as Re,cB as Z,cC as ke,cD as De,c1 as Ge,cE as X,cF as ve,a_ as Ee,bh as Ue,bg as G,cG as Ke,be as Be,cH as je,aY as Ve,cI as Xe,cJ as ze,cK as qe,bt as We,aV as z,b4 as Ye,b$ as Qe,cL as Je,cM as Ze,cN as $e,cO as en,cP as nn,cQ as tn,cR as xe,bU as sn,cg as ne,cS as te,cT as se,cU as ie,cV as re,cW as rn,cX as on,a$ as an,b0 as cn}from"./rr0-sighting-editor.mjs";function oe(f,n){if(n===Le)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),f;if(n===Q||n===he){let e=f.getIndex();if(e===null){const r=[],a=f.getAttribute("position");if(a!==void 0){for(let o=0;o<a.count;o++)r.push(o);f.setIndex(r),e=f.getIndex()}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),f}const s=e.count-2,t=[];if(n===Q)for(let r=1;r<=s;r++)t.push(e.getX(0)),t.push(e.getX(r)),t.push(e.getX(r+1));else for(let r=0;r<s;r++)r%2===0?(t.push(e.getX(r)),t.push(e.getX(r+1)),t.push(e.getX(r+2))):(t.push(e.getX(r+2)),t.push(e.getX(r+1)),t.push(e.getX(r)));t.length/3!==s&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const i=f.clone();return i.setIndex(t),i.clearGroups(),i}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",n),f}class jn extends Me{constructor(n){super(n),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register(function(e){return new dn(e)}),this.register(function(e){return new pn(e)}),this.register(function(e){return new Ln(e)}),this.register(function(e){return new Mn(e)}),this.register(function(e){return new Sn(e)}),this.register(function(e){return new gn(e)}),this.register(function(e){return new Tn(e)}),this.register(function(e){return new Rn(e)}),this.register(function(e){return new En(e)}),this.register(function(e){return new hn(e)}),this.register(function(e){return new xn(e)}),this.register(function(e){return new mn(e)}),this.register(function(e){return new _n(e)}),this.register(function(e){return new An(e)}),this.register(function(e){return new ln(e)}),this.register(function(e){return new ae(e,g.EXT_MESHOPT_COMPRESSION)}),this.register(function(e){return new ae(e,g.KHR_MESHOPT_COMPRESSION)}),this.register(function(e){return new yn(e)})}load(n,e,s,t){const i=this;let r;if(this.resourcePath!=="")r=this.resourcePath;else if(this.path!==""){const c=v.extractUrlBase(n);r=v.resolveURL(c,this.path)}else r=v.extractUrlBase(n);this.manager.itemStart(n);const a=function(c){t?t(c):console.error(c),i.manager.itemError(n),i.manager.itemEnd(n)},o=new de(this.manager);o.setPath(this.path),o.setResponseType("arraybuffer"),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(n,function(c){try{i.parse(c,r,function(u){e(u),i.manager.itemEnd(n)},a)}catch(u){a(u)}},s,a)}setDRACOLoader(n){return this.dracoLoader=n,this}setKTX2Loader(n){return this.ktx2Loader=n,this}setMeshoptDecoder(n){return this.meshoptDecoder=n,this}register(n){return this.pluginCallbacks.indexOf(n)===-1&&this.pluginCallbacks.push(n),this}unregister(n){return this.pluginCallbacks.indexOf(n)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(n),1),this}parse(n,e,s,t){let i;const r={},a={},o=new TextDecoder;if(typeof n=="string")i=JSON.parse(n);else if(n instanceof ArrayBuffer)if(o.decode(new Uint8Array(n,0,4))===Ae){try{r[g.KHR_BINARY_GLTF]=new wn(n)}catch(l){t&&t(l);return}i=JSON.parse(r[g.KHR_BINARY_GLTF].content)}else i=JSON.parse(o.decode(n));else i=n;if(i.asset===void 0||i.asset.version[0]<2){t&&t(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));return}const c=new Un(i,{path:e||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});c.fileLoader.setRequestHeader(this.requestHeader);for(let u=0;u<this.pluginCallbacks.length;u++){const l=this.pluginCallbacks[u](c);l.name||console.error("THREE.GLTFLoader: Invalid plugin found: missing name"),a[l.name]=l,r[l.name]=!0}if(i.extensionsUsed)for(let u=0;u<i.extensionsUsed.length;++u){const l=i.extensionsUsed[u],h=i.extensionsRequired||[];switch(l){case g.KHR_MATERIALS_UNLIT:r[l]=new fn;break;case g.KHR_DRACO_MESH_COMPRESSION:r[l]=new bn(i,this.dracoLoader);break;case g.KHR_TEXTURE_TRANSFORM:r[l]=new Nn;break;case g.KHR_MESH_QUANTIZATION:r[l]=new In;break;default:h.indexOf(l)>=0&&a[l]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+l+'".')}}c.setExtensions(r),c.setPlugins(a),c.parse(s,t)}parseAsync(n,e){const s=this;return new Promise(function(t,i){s.parse(n,e,t,i)})}}function un(){let f={};return{get:function(n){return f[n]},add:function(n,e){f[n]=e},remove:function(n){delete f[n]},removeAll:function(){f={}}}}function _(f,n,e){const s=f.json.materials[n];return s.extensions&&s.extensions[e]?s.extensions[e]:null}const g={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_DISPERSION:"KHR_materials_dispersion",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",KHR_MESHOPT_COMPRESSION:"KHR_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class ln{constructor(n){this.parser=n,this.name=g.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const n=this.parser,e=this.parser.json.nodes||[];for(let s=0,t=e.length;s<t;s++){const i=e[s];i.extensions&&i.extensions[this.name]&&i.extensions[this.name].light!==void 0&&n._addNodeRef(this.cache,i.extensions[this.name].light)}}_loadLight(n){const e=this.parser,s="light:"+n;let t=e.cache.get(s);if(t)return t;const i=e.json,o=((i.extensions&&i.extensions[this.name]||{}).lights||[])[n];let c;const u=new F(16777215);o.color!==void 0&&u.setRGB(o.color[0],o.color[1],o.color[2],b);const l=o.range!==void 0?o.range:0;switch(o.type){case"directional":c=new we(u),c.target.position.set(0,0,-1),c.add(c.target);break;case"point":c=new ye(u),c.distance=l;break;case"spot":c=new Se(u),c.distance=l,o.spot=o.spot||{},o.spot.innerConeAngle=o.spot.innerConeAngle!==void 0?o.spot.innerConeAngle:0,o.spot.outerConeAngle=o.spot.outerConeAngle!==void 0?o.spot.outerConeAngle:Math.PI/4,c.angle=o.spot.outerConeAngle,c.penumbra=1-o.spot.innerConeAngle/o.spot.outerConeAngle,c.target.position.set(0,0,-1),c.add(c.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+o.type)}return c.position.set(0,0,0),y(c,o),o.intensity!==void 0&&(c.intensity=o.intensity),c.name=e.createUniqueName(o.name||"light_"+n),t=Promise.resolve(c),e.cache.add(s,t),t}getDependency(n,e){if(n==="light")return this._loadLight(e)}createNodeAttachment(n){const e=this,s=this.parser,i=s.json.nodes[n],a=(i.extensions&&i.extensions[this.name]||{}).light;return a===void 0?null:this._loadLight(a).then(function(o){return s._getNodeRef(e.cache,a,o)})}}class fn{constructor(){this.name=g.KHR_MATERIALS_UNLIT}getMaterialType(){return G}extendParams(n,e,s){const t=[];n.color=new F(1,1,1),n.opacity=1;const i=e.pbrMetallicRoughness;if(i){if(Array.isArray(i.baseColorFactor)){const r=i.baseColorFactor;n.color.setRGB(r[0],r[1],r[2],b),n.opacity=r[3]}i.baseColorTexture!==void 0&&t.push(s.assignTexture(n,"map",i.baseColorTexture,U))}return Promise.all(t)}}class hn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);return s===null||s.emissiveStrength!==void 0&&(e.emissiveIntensity=s.emissiveStrength),Promise.resolve()}}class dn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_CLEARCOAT}getMaterialType(n){return _(this.parser,n,this.name)!==null?w:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];if(s.clearcoatFactor!==void 0&&(e.clearcoat=s.clearcoatFactor),s.clearcoatTexture!==void 0&&t.push(this.parser.assignTexture(e,"clearcoatMap",s.clearcoatTexture)),s.clearcoatRoughnessFactor!==void 0&&(e.clearcoatRoughness=s.clearcoatRoughnessFactor),s.clearcoatRoughnessTexture!==void 0&&t.push(this.parser.assignTexture(e,"clearcoatRoughnessMap",s.clearcoatRoughnessTexture)),s.clearcoatNormalTexture!==void 0&&(t.push(this.parser.assignTexture(e,"clearcoatNormalMap",s.clearcoatNormalTexture)),s.clearcoatNormalTexture.scale!==void 0)){const i=s.clearcoatNormalTexture.scale;e.clearcoatNormalScale=new pe(i,i)}return Promise.all(t)}}class pn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_DISPERSION}getMaterialType(n){return _(this.parser,n,this.name)!==null?w:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);return s===null||(e.dispersion=s.dispersion!==void 0?s.dispersion:0),Promise.resolve()}}class mn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_IRIDESCENCE}getMaterialType(n){return _(this.parser,n,this.name)!==null?w:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];return s.iridescenceFactor!==void 0&&(e.iridescence=s.iridescenceFactor),s.iridescenceTexture!==void 0&&t.push(this.parser.assignTexture(e,"iridescenceMap",s.iridescenceTexture)),s.iridescenceIor!==void 0&&(e.iridescenceIOR=s.iridescenceIor),e.iridescenceThicknessRange===void 0&&(e.iridescenceThicknessRange=[100,400]),s.iridescenceThicknessMinimum!==void 0&&(e.iridescenceThicknessRange[0]=s.iridescenceThicknessMinimum),s.iridescenceThicknessMaximum!==void 0&&(e.iridescenceThicknessRange[1]=s.iridescenceThicknessMaximum),s.iridescenceThicknessTexture!==void 0&&t.push(this.parser.assignTexture(e,"iridescenceThicknessMap",s.iridescenceThicknessTexture)),Promise.all(t)}}class gn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_SHEEN}getMaterialType(n){return _(this.parser,n,this.name)!==null?w:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];if(e.sheenColor=new F(0,0,0),e.sheenRoughness=0,e.sheen=1,s.sheenColorFactor!==void 0){const i=s.sheenColorFactor;e.sheenColor.setRGB(i[0],i[1],i[2],b)}return s.sheenRoughnessFactor!==void 0&&(e.sheenRoughness=s.sheenRoughnessFactor),s.sheenColorTexture!==void 0&&t.push(this.parser.assignTexture(e,"sheenColorMap",s.sheenColorTexture,U)),s.sheenRoughnessTexture!==void 0&&t.push(this.parser.assignTexture(e,"sheenRoughnessMap",s.sheenRoughnessTexture)),Promise.all(t)}}class Tn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_TRANSMISSION}getMaterialType(n){return _(this.parser,n,this.name)!==null?w:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];return s.transmissionFactor!==void 0&&(e.transmission=s.transmissionFactor),s.transmissionTexture!==void 0&&t.push(this.parser.assignTexture(e,"transmissionMap",s.transmissionTexture)),Promise.all(t)}}class Rn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_VOLUME}getMaterialType(n){return _(this.parser,n,this.name)!==null?w:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];e.thickness=s.thicknessFactor!==void 0?s.thicknessFactor:0,s.thicknessTexture!==void 0&&t.push(this.parser.assignTexture(e,"thicknessMap",s.thicknessTexture)),e.attenuationDistance=s.attenuationDistance||1/0;const i=s.attenuationColor||[1,1,1];return e.attenuationColor=new F().setRGB(i[0],i[1],i[2],b),Promise.all(t)}}class En{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_IOR}getMaterialType(n){return _(this.parser,n,this.name)!==null?w:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);return s===null||(e.ior=s.ior!==void 0?s.ior:1.5,e.ior===0&&(e.ior=1e3)),Promise.resolve()}}class xn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_SPECULAR}getMaterialType(n){return _(this.parser,n,this.name)!==null?w:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];e.specularIntensity=s.specularFactor!==void 0?s.specularFactor:1,s.specularTexture!==void 0&&t.push(this.parser.assignTexture(e,"specularIntensityMap",s.specularTexture));const i=s.specularColorFactor||[1,1,1];return e.specularColor=new F().setRGB(i[0],i[1],i[2],b),s.specularColorTexture!==void 0&&t.push(this.parser.assignTexture(e,"specularColorMap",s.specularColorTexture,U)),Promise.all(t)}}class An{constructor(n){this.parser=n,this.name=g.EXT_MATERIALS_BUMP}getMaterialType(n){return _(this.parser,n,this.name)!==null?w:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];return e.bumpScale=s.bumpFactor!==void 0?s.bumpFactor:1,s.bumpTexture!==void 0&&t.push(this.parser.assignTexture(e,"bumpMap",s.bumpTexture)),Promise.all(t)}}class _n{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_ANISOTROPY}getMaterialType(n){return _(this.parser,n,this.name)!==null?w:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];return s.anisotropyStrength!==void 0&&(e.anisotropy=s.anisotropyStrength),s.anisotropyRotation!==void 0&&(e.anisotropyRotation=s.anisotropyRotation),s.anisotropyTexture!==void 0&&t.push(this.parser.assignTexture(e,"anisotropyMap",s.anisotropyTexture)),Promise.all(t)}}class Ln{constructor(n){this.parser=n,this.name=g.KHR_TEXTURE_BASISU}loadTexture(n){const e=this.parser,s=e.json,t=s.textures[n];if(!t.extensions||!t.extensions[this.name])return null;const i=t.extensions[this.name],r=e.options.ktx2Loader;if(!r){if(s.extensionsRequired&&s.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return e.loadTextureImage(n,i.source,r)}}class Mn{constructor(n){this.parser=n,this.name=g.EXT_TEXTURE_WEBP}loadTexture(n){const e=this.name,s=this.parser,t=s.json,i=t.textures[n];if(!i.extensions||!i.extensions[e])return null;const r=i.extensions[e],a=t.images[r.source];let o=s.textureLoader;if(a.uri){const c=s.options.manager.getHandler(a.uri);c!==null&&(o=c)}return s.loadTextureImage(n,r.source,o)}}class Sn{constructor(n){this.parser=n,this.name=g.EXT_TEXTURE_AVIF}loadTexture(n){const e=this.name,s=this.parser,t=s.json,i=t.textures[n];if(!i.extensions||!i.extensions[e])return null;const r=i.extensions[e],a=t.images[r.source];let o=s.textureLoader;if(a.uri){const c=s.options.manager.getHandler(a.uri);c!==null&&(o=c)}return s.loadTextureImage(n,r.source,o)}}class ae{constructor(n,e){this.name=e,this.parser=n}loadBufferView(n){const e=this.parser.json,s=e.bufferViews[n];if(s.extensions&&s.extensions[this.name]){const t=s.extensions[this.name],i=this.parser.getDependency("buffer",t.buffer),r=this.parser.options.meshoptDecoder;if(!r||!r.supported){if(e.extensionsRequired&&e.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return i.then(function(a){const o=t.byteOffset||0,c=t.byteLength||0,u=t.count,l=t.byteStride,h=new Uint8Array(a,o,c);return r.decodeGltfBufferAsync?r.decodeGltfBufferAsync(u,l,h,t.mode,t.filter).then(function(d){return d.buffer}):r.ready.then(function(){const d=new ArrayBuffer(u*l);return r.decodeGltfBuffer(new Uint8Array(d),u,l,h,t.mode,t.filter),d})})}else return null}}class yn{constructor(n){this.name=g.EXT_MESH_GPU_INSTANCING,this.parser=n}createNodeMesh(n){const e=this.parser.json,s=e.nodes[n];if(!s.extensions||!s.extensions[this.name]||s.mesh===void 0)return null;const t=e.meshes[s.mesh];for(const c of t.primitives)if(c.mode!==M.TRIANGLES&&c.mode!==M.TRIANGLE_STRIP&&c.mode!==M.TRIANGLE_FAN&&c.mode!==void 0)return null;const r=s.extensions[this.name].attributes,a=[],o={};for(const c in r)a.push(this.parser.getDependency("accessor",r[c]).then(u=>(o[c]=u,o[c])));return a.length<1?null:(a.push(this.parser.createNodeMesh(n)),Promise.all(a).then(c=>{const u=c.pop(),l=u.isGroup?u.children:[u],h=c[0].count,d=[];for(const p of l){const R=new K,m=new C,T=new me,A=new C(1,1,1),x=new be(p.geometry,p.material,h);for(let E=0;E<h;E++)o.TRANSLATION&&m.fromBufferAttribute(o.TRANSLATION,E),o.ROTATION&&T.fromBufferAttribute(o.ROTATION,E),o.SCALE&&A.fromBufferAttribute(o.SCALE,E),x.setMatrixAt(E,R.compose(m,T,A));for(const E in o)if(E==="_COLOR_0"){const L=o[E];x.instanceColor=new Ne(L.array,L.itemSize,L.normalized)}else E!=="TRANSLATION"&&E!=="ROTATION"&&E!=="SCALE"&&p.geometry.setAttribute(E,o[E]);ge.prototype.copy.call(x,p),this.parser.assignFinalMaterial(x),d.push(x)}return u.isGroup?(u.clear(),u.add(...d),u):d[0]}))}}const Ae="glTF",D=12,ce={JSON:1313821514,BIN:5130562};class wn{constructor(n){this.name=g.KHR_BINARY_GLTF,this.content=null,this.body=null;const e=new DataView(n,0,D),s=new TextDecoder;if(this.header={magic:s.decode(new Uint8Array(n.slice(0,4))),version:e.getUint32(4,!0),length:e.getUint32(8,!0)},this.header.magic!==Ae)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");const t=this.header.length-D,i=new DataView(n,D);let r=0;for(;r<t;){const a=i.getUint32(r,!0);r+=4;const o=i.getUint32(r,!0);if(r+=4,o===ce.JSON){const c=new Uint8Array(n,D+r,a);this.content=s.decode(c)}else if(o===ce.BIN){const c=D+r;this.body=n.slice(c,c+a)}r+=a}if(this.content===null)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class bn{constructor(n,e){if(!e)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=g.KHR_DRACO_MESH_COMPRESSION,this.json=n,this.dracoLoader=e,this.dracoLoader.preload()}decodePrimitive(n,e){const s=this.json,t=this.dracoLoader,i=n.extensions[this.name].bufferView,r=n.extensions[this.name].attributes,a={},o={},c={};for(const u in r){const l=$[u]||u.toLowerCase();a[l]=r[u]}for(const u in n.attributes){const l=$[u]||u.toLowerCase();if(r[u]!==void 0){const h=s.accessors[n.attributes[u]],d=H[h.componentType];c[l]=d.name,o[l]=h.normalized===!0}}return e.getDependency("bufferView",i).then(function(u){return new Promise(function(l,h){t.decodeDracoFile(u,function(d){for(const p in d.attributes){const R=d.attributes[p],m=o[p];m!==void 0&&(R.normalized=m)}l(d)},a,c,b,h)})})}}class Nn{constructor(){this.name=g.KHR_TEXTURE_TRANSFORM}extendTexture(n,e){return(e.texCoord===void 0||e.texCoord===n.channel)&&e.offset===void 0&&e.rotation===void 0&&e.scale===void 0||(n=n.clone(),e.texCoord!==void 0&&(n.channel=e.texCoord),e.offset!==void 0&&n.offset.fromArray(e.offset),e.rotation!==void 0&&(n.rotation=e.rotation),e.scale!==void 0&&n.repeat.fromArray(e.scale),n.needsUpdate=!0),n}}class In{constructor(){this.name=g.KHR_MESH_QUANTIZATION}}class _e extends on{constructor(n,e,s,t){super(n,e,s,t)}copySampleValue_(n){const e=this.resultBuffer,s=this.sampleValues,t=this.valueSize,i=n*t*3+t;for(let r=0;r!==t;r++)e[r]=s[i+r];return e}interpolate_(n,e,s,t){const i=this.resultBuffer,r=this.sampleValues,a=this.valueSize,o=a*2,c=a*3,u=t-e,l=(s-e)/u,h=l*l,d=h*l,p=n*c,R=p-c,m=-2*d+3*h,T=d-h,A=1-m,x=T-h+l;for(let E=0;E!==a;E++){const L=r[R+E+a],N=r[R+E+o]*u,S=r[p+E+a],k=r[p+E]*u;i[E]=A*L+x*N+m*S+T*k}return i}}const On=new me;class Cn extends _e{interpolate_(n,e,s,t){const i=super.interpolate_(n,e,s,t);return On.fromArray(i).normalize().toArray(i),i}}const M={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},H={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},ue={9728:Re,9729:J,9984:He,9985:Pe,9986:Fe,9987:Te},le={33071:De,33648:ke,10497:Z},q={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},$={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv1",TEXCOORD_2:"uv2",TEXCOORD_3:"uv3",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},I={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},Fn={CUBICSPLINE:void 0,LINEAR:xe,STEP:tn},W={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function Pn(f){return f.DefaultMaterial===void 0&&(f.DefaultMaterial=new Ee({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:rn})),f.DefaultMaterial}function O(f,n,e){for(const s in e.extensions)f[s]===void 0&&(n.userData.gltfExtensions=n.userData.gltfExtensions||{},n.userData.gltfExtensions[s]=e.extensions[s])}function y(f,n){n.extras!==void 0&&(typeof n.extras=="object"?Object.assign(f.userData,n.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+n.extras))}function Hn(f,n,e){let s=!1,t=!1,i=!1;for(let c=0,u=n.length;c<u;c++){const l=n[c];if(l.POSITION!==void 0&&(s=!0),l.NORMAL!==void 0&&(t=!0),l.COLOR_0!==void 0&&(i=!0),s&&t&&i)break}if(!s&&!t&&!i)return Promise.resolve(f);const r=[],a=[],o=[];for(let c=0,u=n.length;c<u;c++){const l=n[c];if(s){const h=l.POSITION!==void 0?e.getDependency("accessor",l.POSITION):f.attributes.position;r.push(h)}if(t){const h=l.NORMAL!==void 0?e.getDependency("accessor",l.NORMAL):f.attributes.normal;a.push(h)}if(i){const h=l.COLOR_0!==void 0?e.getDependency("accessor",l.COLOR_0):f.attributes.color;o.push(h)}}return Promise.all([Promise.all(r),Promise.all(a),Promise.all(o)]).then(function(c){const u=c[0],l=c[1],h=c[2];return s&&(f.morphAttributes.position=u),t&&(f.morphAttributes.normal=l),i&&(f.morphAttributes.color=h),f.morphTargetsRelative=!0,f})}function kn(f,n){if(f.updateMorphTargets(),n.weights!==void 0)for(let e=0,s=n.weights.length;e<s;e++)f.morphTargetInfluences[e]=n.weights[e];if(n.extras&&Array.isArray(n.extras.targetNames)){const e=n.extras.targetNames;if(f.morphTargetInfluences.length===e.length){f.morphTargetDictionary={};for(let s=0,t=e.length;s<t;s++)f.morphTargetDictionary[e[s]]=s}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function Dn(f){let n;const e=f.extensions&&f.extensions[g.KHR_DRACO_MESH_COMPRESSION];if(e?n="draco:"+e.bufferView+":"+e.indices+":"+Y(e.attributes):n=f.indices+":"+Y(f.attributes)+":"+f.mode,f.targets!==void 0)for(let s=0,t=f.targets.length;s<t;s++)n+=":"+Y(f.targets[s]);return n}function Y(f){let n="";const e=Object.keys(f).sort();for(let s=0,t=e.length;s<t;s++)n+=e[s]+":"+f[e[s]]+";";return n}function ee(f){switch(f){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.")}}function Gn(f){return f.search(/\.jpe?g($|\?)/i)>0||f.search(/^data\:image\/jpeg/)===0?"image/jpeg":f.search(/\.webp($|\?)/i)>0||f.search(/^data\:image\/webp/)===0?"image/webp":f.search(/\.ktx2($|\?)/i)>0||f.search(/^data\:image\/ktx2/)===0?"image/ktx2":"image/png"}const vn=new K;class Un{constructor(n={},e={}){this.json=n,this.extensions={},this.plugins={},this.options=e,this.cache=new un,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let s=!1,t=-1,i=!1,r=-1;if(typeof navigator<"u"&&typeof navigator.userAgent<"u"){const a=navigator.userAgent;s=/^((?!chrome|android).)*safari/i.test(a)===!0;const o=a.match(/Version\/(\d+)/);t=s&&o?parseInt(o[1],10):-1,i=a.indexOf("Firefox")>-1,r=i?a.match(/Firefox\/([0-9]+)\./)[1]:-1}typeof createImageBitmap>"u"||s&&t<17||i&&r<98?this.textureLoader=new Ie(this.options.manager):this.textureLoader=new Oe(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new de(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(n){this.extensions=n}setPlugins(n){this.plugins=n}parse(n,e){const s=this,t=this.json,i=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(r){return r._markDefs&&r._markDefs()}),Promise.all(this._invokeAll(function(r){return r.beforeRoot&&r.beforeRoot()})).then(function(){return Promise.all([s.getDependencies("scene"),s.getDependencies("animation"),s.getDependencies("camera")])}).then(function(r){const a={scene:r[0][t.scene||0],scenes:r[0],animations:r[1],cameras:r[2],asset:t.asset,parser:s,userData:{}};return O(i,a,t),y(a,t),Promise.all(s._invokeAll(function(o){return o.afterRoot&&o.afterRoot(a)})).then(function(){for(const o of a.scenes)o.updateMatrixWorld();n(a)})}).catch(e)}_markDefs(){const n=this.json.nodes||[],e=this.json.skins||[],s=this.json.meshes||[];for(let t=0,i=e.length;t<i;t++){const r=e[t].joints;for(let a=0,o=r.length;a<o;a++)n[r[a]].isBone=!0}for(let t=0,i=n.length;t<i;t++){const r=n[t];r.mesh!==void 0&&(this._addNodeRef(this.meshCache,r.mesh),r.skin!==void 0&&(s[r.mesh].isSkinnedMesh=!0)),r.camera!==void 0&&this._addNodeRef(this.cameraCache,r.camera)}}_addNodeRef(n,e){e!==void 0&&(n.refs[e]===void 0&&(n.refs[e]=n.uses[e]=0),n.refs[e]++)}_getNodeRef(n,e,s){if(n.refs[e]<=1)return s;const t=s.clone(),i=(r,a)=>{const o=this.associations.get(r);o!=null&&this.associations.set(a,o);for(const[c,u]of r.children.entries())i(u,a.children[c])};return i(s,t),t.name+="_instance_"+n.uses[e]++,t}_invokeOne(n){const e=Object.values(this.plugins);e.push(this);for(let s=0;s<e.length;s++){const t=n(e[s]);if(t)return t}return null}_invokeAll(n){const e=Object.values(this.plugins);e.unshift(this);const s=[];for(let t=0;t<e.length;t++){const i=n(e[t]);i&&s.push(i)}return s}getDependency(n,e){const s=n+":"+e;let t=this.cache.get(s);if(!t){switch(n){case"scene":t=this.loadScene(e);break;case"node":t=this._invokeOne(function(i){return i.loadNode&&i.loadNode(e)});break;case"mesh":t=this._invokeOne(function(i){return i.loadMesh&&i.loadMesh(e)});break;case"accessor":t=this.loadAccessor(e);break;case"bufferView":t=this._invokeOne(function(i){return i.loadBufferView&&i.loadBufferView(e)});break;case"buffer":t=this.loadBuffer(e);break;case"material":t=this._invokeOne(function(i){return i.loadMaterial&&i.loadMaterial(e)});break;case"texture":t=this._invokeOne(function(i){return i.loadTexture&&i.loadTexture(e)});break;case"skin":t=this.loadSkin(e);break;case"animation":t=this._invokeOne(function(i){return i.loadAnimation&&i.loadAnimation(e)});break;case"camera":t=this.loadCamera(e);break;default:if(t=this._invokeOne(function(i){return i!=this&&i.getDependency&&i.getDependency(n,e)}),!t)throw new Error("Unknown type: "+n);break}this.cache.add(s,t)}return t}getDependencies(n){let e=this.cache.get(n);if(!e){const s=this,t=this.json[n+(n==="mesh"?"es":"s")]||[];e=Promise.all(t.map(function(i,r){return s.getDependency(n,r)})),this.cache.add(n,e)}return e}loadBuffer(n){const e=this.json.buffers[n],s=this.fileLoader;if(e.type&&e.type!=="arraybuffer")throw new Error("THREE.GLTFLoader: "+e.type+" buffer type is not supported.");if(e.uri===void 0&&n===0)return Promise.resolve(this.extensions[g.KHR_BINARY_GLTF].body);const t=this.options;return new Promise(function(i,r){s.load(v.resolveURL(e.uri,t.path),i,void 0,function(){r(new Error('THREE.GLTFLoader: Failed to load buffer "'+e.uri+'".'))})})}loadBufferView(n){const e=this.json.bufferViews[n];return this.getDependency("buffer",e.buffer).then(function(s){const t=e.byteLength||0,i=e.byteOffset||0;return s.slice(i,i+t)})}loadAccessor(n){const e=this,s=this.json,t=this.json.accessors[n];if(t.bufferView===void 0&&t.sparse===void 0){const r=q[t.type],a=H[t.componentType],o=t.normalized===!0,c=new a(t.count*r);return Promise.resolve(new V(c,r,o))}const i=[];return t.bufferView!==void 0?i.push(this.getDependency("bufferView",t.bufferView)):i.push(null),t.sparse!==void 0&&(i.push(this.getDependency("bufferView",t.sparse.indices.bufferView)),i.push(this.getDependency("bufferView",t.sparse.values.bufferView))),Promise.all(i).then(function(r){const a=r[0],o=q[t.type],c=H[t.componentType],u=c.BYTES_PER_ELEMENT,l=u*o,h=t.byteOffset||0,d=t.bufferView!==void 0?s.bufferViews[t.bufferView].byteStride:void 0,p=t.normalized===!0;let R,m;if(d&&d!==l){const T=Math.floor(h/d),A="InterleavedBuffer:"+t.bufferView+":"+t.componentType+":"+T+":"+t.count;let x=e.cache.get(A);x||(R=new c(a,T*d,t.count*d/u),x=new Ce(R,d/u),e.cache.add(A,x)),m=new sn(x,o,h%d/u,p)}else a===null?R=new c(t.count*o):R=new c(a,h,t.count*o),m=new V(R,o,p);if(t.sparse!==void 0){const T=q.SCALAR,A=H[t.sparse.indices.componentType],x=t.sparse.indices.byteOffset||0,E=t.sparse.values.byteOffset||0,L=new A(r[1],x,t.sparse.count*T),N=new c(r[2],E,t.sparse.count*o);a!==null&&(m=new V(m.array.slice(),m.itemSize,m.normalized)),m.normalized=!1;for(let S=0,k=L.length;S<k;S++){const P=L[S];if(m.setX(P,N[S*o]),o>=2&&m.setY(P,N[S*o+1]),o>=3&&m.setZ(P,N[S*o+2]),o>=4&&m.setW(P,N[S*o+3]),o>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}m.normalized=p}return m})}loadTexture(n){const e=this.json,s=this.options,i=e.textures[n].source,r=e.images[i];let a=this.textureLoader;if(r.uri){const o=s.manager.getHandler(r.uri);o!==null&&(a=o)}return this.loadTextureImage(n,i,a)}loadTextureImage(n,e,s){const t=this,i=this.json,r=i.textures[n],a=i.images[e],o=(a.uri||a.bufferView)+":"+r.sampler;if(this.textureCache[o])return this.textureCache[o];const c=this.loadImageSource(e,s).then(function(u){u.flipY=!1,u.name=r.name||a.name||"",u.name===""&&typeof a.uri=="string"&&a.uri.startsWith("data:image/")===!1&&(u.name=a.uri);const h=(i.samplers||{})[r.sampler]||{};return u.magFilter=ue[h.magFilter]||J,u.minFilter=ue[h.minFilter]||Te,u.wrapS=le[h.wrapS]||Z,u.wrapT=le[h.wrapT]||Z,u.generateMipmaps=!u.isCompressedTexture&&u.minFilter!==Re&&u.minFilter!==J,t.associations.set(u,{textures:n}),u}).catch(function(){return null});return this.textureCache[o]=c,c}loadImageSource(n,e){const s=this,t=this.json,i=this.options;if(this.sourceCache[n]!==void 0)return this.sourceCache[n].then(l=>l.clone());const r=t.images[n],a=self.URL||self.webkitURL;let o=r.uri||"",c=!1;if(r.bufferView!==void 0)o=s.getDependency("bufferView",r.bufferView).then(function(l){c=!0;const h=new Blob([l],{type:r.mimeType});return o=a.createObjectURL(h),o});else if(r.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+n+" is missing URI and bufferView");const u=Promise.resolve(o).then(function(l){return new Promise(function(h,d){let p=h;e.isImageBitmapLoader===!0&&(p=function(R){const m=new ne(R);m.needsUpdate=!0,h(m)}),e.load(v.resolveURL(l,i.path),p,void 0,d)})}).then(function(l){return c===!0&&a.revokeObjectURL(o),y(l,r),l.userData.mimeType=r.mimeType||Gn(r.uri),l}).catch(function(l){throw console.error("THREE.GLTFLoader: Couldn't load texture",o),l});return this.sourceCache[n]=u,u}assignTexture(n,e,s,t){const i=this;return this.getDependency("texture",s.index).then(function(r){if(!r)return null;if(s.texCoord!==void 0&&s.texCoord>0&&(r=r.clone(),r.channel=s.texCoord),i.extensions[g.KHR_TEXTURE_TRANSFORM]){const a=s.extensions!==void 0?s.extensions[g.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const o=i.associations.get(r);r=i.extensions[g.KHR_TEXTURE_TRANSFORM].extendTexture(r,a),i.associations.set(r,o)}}return t!==void 0&&(r.colorSpace=t),n[e]=r,r})}assignFinalMaterial(n){const e=n.geometry;let s=n.material;const t=e.attributes.tangent===void 0,i=e.attributes.color!==void 0,r=e.attributes.normal===void 0;if(n.isPoints){const a="PointsMaterial:"+s.uuid;let o=this.cache.get(a);o||(o=new Ge,X.prototype.copy.call(o,s),o.color.copy(s.color),o.map=s.map,o.sizeAttenuation=!1,this.cache.add(a,o)),s=o}else if(n.isLine){const a="LineBasicMaterial:"+s.uuid;let o=this.cache.get(a);o||(o=new ve,X.prototype.copy.call(o,s),o.color.copy(s.color),o.map=s.map,this.cache.add(a,o)),s=o}if(t||i||r){let a="ClonedMaterial:"+s.uuid+":";t&&(a+="derivative-tangents:"),i&&(a+="vertex-colors:"),r&&(a+="flat-shading:");let o=this.cache.get(a);o||(o=s.clone(),i&&(o.vertexColors=!0),r&&(o.flatShading=!0),t&&(o.normalScale&&(o.normalScale.y*=-1),o.clearcoatNormalScale&&(o.clearcoatNormalScale.y*=-1)),this.cache.add(a,o),this.associations.set(o,this.associations.get(s))),s=o}n.material=s}getMaterialType(){return Ee}loadMaterial(n){const e=this,s=this.json,t=this.extensions,i=s.materials[n];let r;const a={},o=i.extensions||{},c=[];if(o[g.KHR_MATERIALS_UNLIT]){const l=t[g.KHR_MATERIALS_UNLIT];r=l.getMaterialType(),c.push(l.extendParams(a,i,e))}else{const l=i.pbrMetallicRoughness||{};if(a.color=new F(1,1,1),a.opacity=1,Array.isArray(l.baseColorFactor)){const h=l.baseColorFactor;a.color.setRGB(h[0],h[1],h[2],b),a.opacity=h[3]}l.baseColorTexture!==void 0&&c.push(e.assignTexture(a,"map",l.baseColorTexture,U)),a.metalness=l.metallicFactor!==void 0?l.metallicFactor:1,a.roughness=l.roughnessFactor!==void 0?l.roughnessFactor:1,l.metallicRoughnessTexture!==void 0&&(c.push(e.assignTexture(a,"metalnessMap",l.metallicRoughnessTexture)),c.push(e.assignTexture(a,"roughnessMap",l.metallicRoughnessTexture))),r=this._invokeOne(function(h){return h.getMaterialType&&h.getMaterialType(n)}),c.push(Promise.all(this._invokeAll(function(h){return h.extendMaterialParams&&h.extendMaterialParams(n,a)})))}i.doubleSided===!0&&(a.side=Ue);const u=i.alphaMode||W.OPAQUE;if(u===W.BLEND?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,u===W.MASK&&(a.alphaTest=i.alphaCutoff!==void 0?i.alphaCutoff:.5)),i.normalTexture!==void 0&&r!==G&&(c.push(e.assignTexture(a,"normalMap",i.normalTexture)),a.normalScale=new pe(1,1),i.normalTexture.scale!==void 0)){const l=i.normalTexture.scale;a.normalScale.set(l,l)}if(i.occlusionTexture!==void 0&&r!==G&&(c.push(e.assignTexture(a,"aoMap",i.occlusionTexture)),i.occlusionTexture.strength!==void 0&&(a.aoMapIntensity=i.occlusionTexture.strength)),i.emissiveFactor!==void 0&&r!==G){const l=i.emissiveFactor;a.emissive=new F().setRGB(l[0],l[1],l[2],b)}return i.emissiveTexture!==void 0&&r!==G&&c.push(e.assignTexture(a,"emissiveMap",i.emissiveTexture,U)),Promise.all(c).then(function(){const l=new r(a);return i.name&&(l.name=i.name),y(l,i),e.associations.set(l,{materials:n}),i.extensions&&O(t,l,i),l})}createUniqueName(n){const e=Ke.sanitizeNodeName(n||"");return e in this.nodeNamesUsed?e+"_"+ ++this.nodeNamesUsed[e]:(this.nodeNamesUsed[e]=0,e)}loadGeometries(n){const e=this,s=this.extensions,t=this.primitiveCache;function i(a){return s[g.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,e).then(function(o){return fe(o,a,e)})}const r=[];for(let a=0,o=n.length;a<o;a++){const c=n[a],u=Dn(c),l=t[u];if(l)r.push(l.promise);else{let h;c.extensions&&c.extensions[g.KHR_DRACO_MESH_COMPRESSION]?h=i(c):h=fe(new Be,c,e),t[u]={primitive:c,promise:h},r.push(h)}}return Promise.all(r)}loadMesh(n){const e=this,s=this.json,t=this.extensions,i=s.meshes[n],r=i.primitives,a=[];for(let o=0,c=r.length;o<c;o++){const u=r[o].material===void 0?Pn(this.cache):this.getDependency("material",r[o].material);a.push(u)}return a.push(e.loadGeometries(r)),Promise.all(a).then(function(o){const c=o.slice(0,o.length-1),u=o[o.length-1],l=[];for(let d=0,p=u.length;d<p;d++){const R=u[d],m=r[d];let T;const A=c[d];if(m.mode===M.TRIANGLES||m.mode===M.TRIANGLE_STRIP||m.mode===M.TRIANGLE_FAN||m.mode===void 0)T=i.isSkinnedMesh===!0?new je(R,A):new Ve(R,A),T.isSkinnedMesh===!0&&T.normalizeSkinWeights(),m.mode===M.TRIANGLE_STRIP?T.geometry=oe(T.geometry,he):m.mode===M.TRIANGLE_FAN&&(T.geometry=oe(T.geometry,Q));else if(m.mode===M.LINES)T=new Xe(R,A);else if(m.mode===M.LINE_STRIP)T=new ze(R,A);else if(m.mode===M.LINE_LOOP)T=new qe(R,A);else if(m.mode===M.POINTS)T=new We(R,A);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+m.mode);Object.keys(T.geometry.morphAttributes).length>0&&kn(T,i),T.name=e.createUniqueName(i.name||"mesh_"+n),y(T,i),m.extensions&&O(t,T,m),e.assignFinalMaterial(T),l.push(T)}for(let d=0,p=l.length;d<p;d++)e.associations.set(l[d],{meshes:n,primitives:d});if(l.length===1)return i.extensions&&O(t,l[0],i),l[0];const h=new z;i.extensions&&O(t,h,i),e.associations.set(h,{meshes:n});for(let d=0,p=l.length;d<p;d++)h.add(l[d]);return h})}loadCamera(n){let e;const s=this.json.cameras[n],t=s[s.type];if(!t){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return s.type==="perspective"?e=new Ye(Qe.radToDeg(t.yfov),t.aspectRatio||1,t.znear||1,t.zfar||2e6):s.type==="orthographic"&&(e=new Je(-t.xmag,t.xmag,t.ymag,-t.ymag,t.znear,t.zfar)),s.name&&(e.name=this.createUniqueName(s.name)),y(e,s),Promise.resolve(e)}loadSkin(n){const e=this.json.skins[n],s=[];for(let t=0,i=e.joints.length;t<i;t++)s.push(this._loadNodeShallow(e.joints[t]));return e.inverseBindMatrices!==void 0?s.push(this.getDependency("accessor",e.inverseBindMatrices)):s.push(null),Promise.all(s).then(function(t){const i=t.pop(),r=t,a=[],o=[];for(let c=0,u=r.length;c<u;c++){const l=r[c];if(l){a.push(l);const h=new K;i!==null&&h.fromArray(i.array,c*16),o.push(h)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',e.joints[c])}return new Ze(a,o)})}loadAnimation(n){const e=this.json,s=this,t=e.animations[n],i=t.name?t.name:"animation_"+n,r=[],a=[],o=[],c=[],u=[];for(let l=0,h=t.channels.length;l<h;l++){const d=t.channels[l],p=t.samplers[d.sampler],R=d.target,m=R.node,T=t.parameters!==void 0?t.parameters[p.input]:p.input,A=t.parameters!==void 0?t.parameters[p.output]:p.output;R.node!==void 0&&(r.push(this.getDependency("node",m)),a.push(this.getDependency("accessor",T)),o.push(this.getDependency("accessor",A)),c.push(p),u.push(R))}return Promise.all([Promise.all(r),Promise.all(a),Promise.all(o),Promise.all(c),Promise.all(u)]).then(function(l){const h=l[0],d=l[1],p=l[2],R=l[3],m=l[4],T=[];for(let x=0,E=h.length;x<E;x++){const L=h[x],N=d[x],S=p[x],k=R[x],P=m[x];if(L===void 0)continue;L.updateMatrix&&L.updateMatrix();const B=s._createAnimationTracks(L,N,S,k,P);if(B)for(let j=0;j<B.length;j++)T.push(B[j])}const A=new $e(i,void 0,T);return y(A,t),A})}createNodeMesh(n){const e=this.json,s=this,t=e.nodes[n];return t.mesh===void 0?null:s.getDependency("mesh",t.mesh).then(function(i){const r=s._getNodeRef(s.meshCache,t.mesh,i);return t.weights!==void 0&&r.traverse(function(a){if(a.isMesh)for(let o=0,c=t.weights.length;o<c;o++)a.morphTargetInfluences[o]=t.weights[o]}),r})}loadNode(n){const e=this.json,s=this,t=e.nodes[n],i=s._loadNodeShallow(n),r=[],a=t.children||[];for(let c=0,u=a.length;c<u;c++)r.push(s.getDependency("node",a[c]));const o=t.skin===void 0?Promise.resolve(null):s.getDependency("skin",t.skin);return Promise.all([i,Promise.all(r),o]).then(function(c){const u=c[0],l=c[1],h=c[2];h!==null&&u.traverse(function(d){d.isSkinnedMesh&&d.bind(h,vn)});for(let d=0,p=l.length;d<p;d++)u.add(l[d]);if(u.userData.pivot!==void 0&&l.length>0){const d=u.userData.pivot,p=l[0];u.pivot=new C().fromArray(d),u.position.x-=d[0],u.position.y-=d[1],u.position.z-=d[2],p.position.set(0,0,0),delete u.userData.pivot}return u})}_loadNodeShallow(n){const e=this.json,s=this.extensions,t=this;if(this.nodeCache[n]!==void 0)return this.nodeCache[n];const i=e.nodes[n],r=i.name?t.createUniqueName(i.name):"",a=[],o=t._invokeOne(function(c){return c.createNodeMesh&&c.createNodeMesh(n)});return o&&a.push(o),i.camera!==void 0&&a.push(t.getDependency("camera",i.camera).then(function(c){return t._getNodeRef(t.cameraCache,i.camera,c)})),t._invokeAll(function(c){return c.createNodeAttachment&&c.createNodeAttachment(n)}).forEach(function(c){a.push(c)}),this.nodeCache[n]=Promise.all(a).then(function(c){let u;if(i.isBone===!0?u=new en:c.length>1?u=new z:c.length===1?u=c[0]:u=new ge,u!==c[0])for(let l=0,h=c.length;l<h;l++)u.add(c[l]);if(i.name&&(u.userData.name=i.name,u.name=r),y(u,i),i.extensions&&O(s,u,i),i.matrix!==void 0){const l=new K;l.fromArray(i.matrix),u.applyMatrix4(l)}else i.translation!==void 0&&u.position.fromArray(i.translation),i.rotation!==void 0&&u.quaternion.fromArray(i.rotation),i.scale!==void 0&&u.scale.fromArray(i.scale);if(!t.associations.has(u))t.associations.set(u,{});else if(i.mesh!==void 0&&t.meshCache.refs[i.mesh]>1){const l=t.associations.get(u);t.associations.set(u,{...l})}return t.associations.get(u).nodes=n,u}),this.nodeCache[n]}loadScene(n){const e=this.extensions,s=this.json.scenes[n],t=this,i=new z;s.name&&(i.name=t.createUniqueName(s.name)),y(i,s),s.extensions&&O(e,i,s);const r=s.nodes||[],a=[];for(let o=0,c=r.length;o<c;o++)a.push(t.getDependency("node",r[o]));return Promise.all(a).then(function(o){for(let u=0,l=o.length;u<l;u++){const h=o[u];h.parent!==null?i.add(nn(h)):i.add(h)}const c=u=>{const l=new Map;for(const[h,d]of t.associations)(h instanceof X||h instanceof ne)&&l.set(h,d);return u.traverse(h=>{const d=t.associations.get(h);d!=null&&l.set(h,d)}),l};return t.associations=c(i),i})}_createAnimationTracks(n,e,s,t,i){const r=[],a=n.name?n.name:n.uuid,o=[];function c(d){d.morphTargetInfluences&&o.push(d.name?d.name:d.uuid)}I[i.path]===I.weights?(c(n),n.isGroup&&n.children.forEach(c)):o.push(a);let u;switch(I[i.path]){case I.weights:u=se;break;case I.rotation:u=ie;break;case I.translation:case I.scale:u=te;break;default:switch(s.itemSize){case 1:u=se;break;case 2:case 3:default:u=te;break}break}const l=t.interpolation!==void 0?Fn[t.interpolation]:xe,h=this._getArrayFromAccessor(s);for(let d=0,p=o.length;d<p;d++){const R=new u(o[d]+"."+I[i.path],e.array,h,l);t.interpolation==="CUBICSPLINE"&&this._createCubicSplineTrackInterpolant(R),r.push(R)}return r}_getArrayFromAccessor(n){let e=n.array;if(n.normalized){const s=ee(e.constructor),t=new Float32Array(e.length);for(let i=0,r=e.length;i<r;i++)t[i]=e[i]*s;e=t}return e}_createCubicSplineTrackInterpolant(n){n.createInterpolant=function(s){const t=this instanceof ie?Cn:_e;return new t(this.times,this.values,this.getValueSize()/3,s)},n.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0}}function Kn(f,n,e){const s=n.attributes,t=new an;if(s.POSITION!==void 0){const a=e.json.accessors[s.POSITION],o=a.min,c=a.max;if(o!==void 0&&c!==void 0){if(t.set(new C(o[0],o[1],o[2]),new C(c[0],c[1],c[2])),a.normalized){const u=ee(H[a.componentType]);t.min.multiplyScalar(u),t.max.multiplyScalar(u)}}else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;const i=n.targets;if(i!==void 0){const a=new C,o=new C;for(let c=0,u=i.length;c<u;c++){const l=i[c];if(l.POSITION!==void 0){const h=e.json.accessors[l.POSITION],d=h.min,p=h.max;if(d!==void 0&&p!==void 0){if(o.setX(Math.max(Math.abs(d[0]),Math.abs(p[0]))),o.setY(Math.max(Math.abs(d[1]),Math.abs(p[1]))),o.setZ(Math.max(Math.abs(d[2]),Math.abs(p[2]))),h.normalized){const R=ee(H[h.componentType]);o.multiplyScalar(R)}a.max(o)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}t.expandByVector(a)}f.boundingBox=t;const r=new cn;t.getCenter(r.center),r.radius=t.min.distanceTo(t.max)/2,f.boundingSphere=r}function fe(f,n,e){const s=n.attributes,t=[];function i(r,a){return e.getDependency("accessor",r).then(function(o){f.setAttribute(a,o)})}for(const r in s){const a=$[r]||r.toLowerCase();a in f.attributes||t.push(i(s[r],a))}if(n.indices!==void 0&&!f.index){const r=e.getDependency("accessor",n.indices).then(function(a){f.setIndex(a)});t.push(r)}return re.workingColorSpace!==b&&"COLOR_0"in s&&console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${re.workingColorSpace}" not supported.`),y(f,n),Kn(f,n,e),Promise.all(t).then(function(){return n.targets!==void 0?Hn(f,n.targets,e):f})}export{jn as GLTFLoader};
1
+ import{cv as Le,cw as Q,cx as he,cy as Me,cz as v,cA as de,bX as w,bZ as pe,bB as F,cB as b,cs as U,ci as Se,cC as ye,b9 as we,$ as B,cD as be,V as C,Z as me,cE as Ne,X as ge,cF as Ie,cG as Oe,bl as V,cH as Ce,cI as Te,cJ as Fe,cK as Pe,cL as He,c0 as J,cl as Re,cM as Z,cN as ke,cO as De,ce as Ge,cP as X,cQ as ve,b4 as Ee,bn as Ue,bm as G,cR as Be,bk as Ke,cS as je,b2 as Ve,cT as Xe,cU as ze,cV as qe,bz as We,a$ as z,ba as Ye,cc as Qe,cW as Je,cX as Ze,cY as $e,cZ as en,c_ as nn,c$ as tn,d0 as xe,c6 as sn,ct as ne,d1 as te,d2 as se,d3 as ie,d4 as re,d5 as rn,d6 as on,b5 as an,b6 as cn}from"./rr0-sighting-editor.mjs";function oe(f,n){if(n===Le)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),f;if(n===Q||n===he){let e=f.getIndex();if(e===null){const r=[],a=f.getAttribute("position");if(a!==void 0){for(let o=0;o<a.count;o++)r.push(o);f.setIndex(r),e=f.getIndex()}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),f}const s=e.count-2,t=[];if(n===Q)for(let r=1;r<=s;r++)t.push(e.getX(0)),t.push(e.getX(r)),t.push(e.getX(r+1));else for(let r=0;r<s;r++)r%2===0?(t.push(e.getX(r)),t.push(e.getX(r+1)),t.push(e.getX(r+2))):(t.push(e.getX(r+2)),t.push(e.getX(r+1)),t.push(e.getX(r)));t.length/3!==s&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const i=f.clone();return i.setIndex(t),i.clearGroups(),i}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",n),f}class jn extends Me{constructor(n){super(n),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register(function(e){return new dn(e)}),this.register(function(e){return new pn(e)}),this.register(function(e){return new Ln(e)}),this.register(function(e){return new Mn(e)}),this.register(function(e){return new Sn(e)}),this.register(function(e){return new gn(e)}),this.register(function(e){return new Tn(e)}),this.register(function(e){return new Rn(e)}),this.register(function(e){return new En(e)}),this.register(function(e){return new hn(e)}),this.register(function(e){return new xn(e)}),this.register(function(e){return new mn(e)}),this.register(function(e){return new _n(e)}),this.register(function(e){return new An(e)}),this.register(function(e){return new ln(e)}),this.register(function(e){return new ae(e,g.EXT_MESHOPT_COMPRESSION)}),this.register(function(e){return new ae(e,g.KHR_MESHOPT_COMPRESSION)}),this.register(function(e){return new yn(e)})}load(n,e,s,t){const i=this;let r;if(this.resourcePath!=="")r=this.resourcePath;else if(this.path!==""){const c=v.extractUrlBase(n);r=v.resolveURL(c,this.path)}else r=v.extractUrlBase(n);this.manager.itemStart(n);const a=function(c){t?t(c):console.error(c),i.manager.itemError(n),i.manager.itemEnd(n)},o=new de(this.manager);o.setPath(this.path),o.setResponseType("arraybuffer"),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(n,function(c){try{i.parse(c,r,function(u){e(u),i.manager.itemEnd(n)},a)}catch(u){a(u)}},s,a)}setDRACOLoader(n){return this.dracoLoader=n,this}setKTX2Loader(n){return this.ktx2Loader=n,this}setMeshoptDecoder(n){return this.meshoptDecoder=n,this}register(n){return this.pluginCallbacks.indexOf(n)===-1&&this.pluginCallbacks.push(n),this}unregister(n){return this.pluginCallbacks.indexOf(n)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(n),1),this}parse(n,e,s,t){let i;const r={},a={},o=new TextDecoder;if(typeof n=="string")i=JSON.parse(n);else if(n instanceof ArrayBuffer)if(o.decode(new Uint8Array(n,0,4))===Ae){try{r[g.KHR_BINARY_GLTF]=new wn(n)}catch(l){t&&t(l);return}i=JSON.parse(r[g.KHR_BINARY_GLTF].content)}else i=JSON.parse(o.decode(n));else i=n;if(i.asset===void 0||i.asset.version[0]<2){t&&t(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));return}const c=new Un(i,{path:e||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});c.fileLoader.setRequestHeader(this.requestHeader);for(let u=0;u<this.pluginCallbacks.length;u++){const l=this.pluginCallbacks[u](c);l.name||console.error("THREE.GLTFLoader: Invalid plugin found: missing name"),a[l.name]=l,r[l.name]=!0}if(i.extensionsUsed)for(let u=0;u<i.extensionsUsed.length;++u){const l=i.extensionsUsed[u],h=i.extensionsRequired||[];switch(l){case g.KHR_MATERIALS_UNLIT:r[l]=new fn;break;case g.KHR_DRACO_MESH_COMPRESSION:r[l]=new bn(i,this.dracoLoader);break;case g.KHR_TEXTURE_TRANSFORM:r[l]=new Nn;break;case g.KHR_MESH_QUANTIZATION:r[l]=new In;break;default:h.indexOf(l)>=0&&a[l]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+l+'".')}}c.setExtensions(r),c.setPlugins(a),c.parse(s,t)}parseAsync(n,e){const s=this;return new Promise(function(t,i){s.parse(n,e,t,i)})}}function un(){let f={};return{get:function(n){return f[n]},add:function(n,e){f[n]=e},remove:function(n){delete f[n]},removeAll:function(){f={}}}}function _(f,n,e){const s=f.json.materials[n];return s.extensions&&s.extensions[e]?s.extensions[e]:null}const g={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_DISPERSION:"KHR_materials_dispersion",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",KHR_MESHOPT_COMPRESSION:"KHR_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class ln{constructor(n){this.parser=n,this.name=g.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const n=this.parser,e=this.parser.json.nodes||[];for(let s=0,t=e.length;s<t;s++){const i=e[s];i.extensions&&i.extensions[this.name]&&i.extensions[this.name].light!==void 0&&n._addNodeRef(this.cache,i.extensions[this.name].light)}}_loadLight(n){const e=this.parser,s="light:"+n;let t=e.cache.get(s);if(t)return t;const i=e.json,o=((i.extensions&&i.extensions[this.name]||{}).lights||[])[n];let c;const u=new F(16777215);o.color!==void 0&&u.setRGB(o.color[0],o.color[1],o.color[2],b);const l=o.range!==void 0?o.range:0;switch(o.type){case"directional":c=new we(u),c.target.position.set(0,0,-1),c.add(c.target);break;case"point":c=new ye(u),c.distance=l;break;case"spot":c=new Se(u),c.distance=l,o.spot=o.spot||{},o.spot.innerConeAngle=o.spot.innerConeAngle!==void 0?o.spot.innerConeAngle:0,o.spot.outerConeAngle=o.spot.outerConeAngle!==void 0?o.spot.outerConeAngle:Math.PI/4,c.angle=o.spot.outerConeAngle,c.penumbra=1-o.spot.innerConeAngle/o.spot.outerConeAngle,c.target.position.set(0,0,-1),c.add(c.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+o.type)}return c.position.set(0,0,0),y(c,o),o.intensity!==void 0&&(c.intensity=o.intensity),c.name=e.createUniqueName(o.name||"light_"+n),t=Promise.resolve(c),e.cache.add(s,t),t}getDependency(n,e){if(n==="light")return this._loadLight(e)}createNodeAttachment(n){const e=this,s=this.parser,i=s.json.nodes[n],a=(i.extensions&&i.extensions[this.name]||{}).light;return a===void 0?null:this._loadLight(a).then(function(o){return s._getNodeRef(e.cache,a,o)})}}class fn{constructor(){this.name=g.KHR_MATERIALS_UNLIT}getMaterialType(){return G}extendParams(n,e,s){const t=[];n.color=new F(1,1,1),n.opacity=1;const i=e.pbrMetallicRoughness;if(i){if(Array.isArray(i.baseColorFactor)){const r=i.baseColorFactor;n.color.setRGB(r[0],r[1],r[2],b),n.opacity=r[3]}i.baseColorTexture!==void 0&&t.push(s.assignTexture(n,"map",i.baseColorTexture,U))}return Promise.all(t)}}class hn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);return s===null||s.emissiveStrength!==void 0&&(e.emissiveIntensity=s.emissiveStrength),Promise.resolve()}}class dn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_CLEARCOAT}getMaterialType(n){return _(this.parser,n,this.name)!==null?w:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];if(s.clearcoatFactor!==void 0&&(e.clearcoat=s.clearcoatFactor),s.clearcoatTexture!==void 0&&t.push(this.parser.assignTexture(e,"clearcoatMap",s.clearcoatTexture)),s.clearcoatRoughnessFactor!==void 0&&(e.clearcoatRoughness=s.clearcoatRoughnessFactor),s.clearcoatRoughnessTexture!==void 0&&t.push(this.parser.assignTexture(e,"clearcoatRoughnessMap",s.clearcoatRoughnessTexture)),s.clearcoatNormalTexture!==void 0&&(t.push(this.parser.assignTexture(e,"clearcoatNormalMap",s.clearcoatNormalTexture)),s.clearcoatNormalTexture.scale!==void 0)){const i=s.clearcoatNormalTexture.scale;e.clearcoatNormalScale=new pe(i,i)}return Promise.all(t)}}class pn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_DISPERSION}getMaterialType(n){return _(this.parser,n,this.name)!==null?w:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);return s===null||(e.dispersion=s.dispersion!==void 0?s.dispersion:0),Promise.resolve()}}class mn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_IRIDESCENCE}getMaterialType(n){return _(this.parser,n,this.name)!==null?w:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];return s.iridescenceFactor!==void 0&&(e.iridescence=s.iridescenceFactor),s.iridescenceTexture!==void 0&&t.push(this.parser.assignTexture(e,"iridescenceMap",s.iridescenceTexture)),s.iridescenceIor!==void 0&&(e.iridescenceIOR=s.iridescenceIor),e.iridescenceThicknessRange===void 0&&(e.iridescenceThicknessRange=[100,400]),s.iridescenceThicknessMinimum!==void 0&&(e.iridescenceThicknessRange[0]=s.iridescenceThicknessMinimum),s.iridescenceThicknessMaximum!==void 0&&(e.iridescenceThicknessRange[1]=s.iridescenceThicknessMaximum),s.iridescenceThicknessTexture!==void 0&&t.push(this.parser.assignTexture(e,"iridescenceThicknessMap",s.iridescenceThicknessTexture)),Promise.all(t)}}class gn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_SHEEN}getMaterialType(n){return _(this.parser,n,this.name)!==null?w:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];if(e.sheenColor=new F(0,0,0),e.sheenRoughness=0,e.sheen=1,s.sheenColorFactor!==void 0){const i=s.sheenColorFactor;e.sheenColor.setRGB(i[0],i[1],i[2],b)}return s.sheenRoughnessFactor!==void 0&&(e.sheenRoughness=s.sheenRoughnessFactor),s.sheenColorTexture!==void 0&&t.push(this.parser.assignTexture(e,"sheenColorMap",s.sheenColorTexture,U)),s.sheenRoughnessTexture!==void 0&&t.push(this.parser.assignTexture(e,"sheenRoughnessMap",s.sheenRoughnessTexture)),Promise.all(t)}}class Tn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_TRANSMISSION}getMaterialType(n){return _(this.parser,n,this.name)!==null?w:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];return s.transmissionFactor!==void 0&&(e.transmission=s.transmissionFactor),s.transmissionTexture!==void 0&&t.push(this.parser.assignTexture(e,"transmissionMap",s.transmissionTexture)),Promise.all(t)}}class Rn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_VOLUME}getMaterialType(n){return _(this.parser,n,this.name)!==null?w:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];e.thickness=s.thicknessFactor!==void 0?s.thicknessFactor:0,s.thicknessTexture!==void 0&&t.push(this.parser.assignTexture(e,"thicknessMap",s.thicknessTexture)),e.attenuationDistance=s.attenuationDistance||1/0;const i=s.attenuationColor||[1,1,1];return e.attenuationColor=new F().setRGB(i[0],i[1],i[2],b),Promise.all(t)}}class En{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_IOR}getMaterialType(n){return _(this.parser,n,this.name)!==null?w:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);return s===null||(e.ior=s.ior!==void 0?s.ior:1.5,e.ior===0&&(e.ior=1e3)),Promise.resolve()}}class xn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_SPECULAR}getMaterialType(n){return _(this.parser,n,this.name)!==null?w:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];e.specularIntensity=s.specularFactor!==void 0?s.specularFactor:1,s.specularTexture!==void 0&&t.push(this.parser.assignTexture(e,"specularIntensityMap",s.specularTexture));const i=s.specularColorFactor||[1,1,1];return e.specularColor=new F().setRGB(i[0],i[1],i[2],b),s.specularColorTexture!==void 0&&t.push(this.parser.assignTexture(e,"specularColorMap",s.specularColorTexture,U)),Promise.all(t)}}class An{constructor(n){this.parser=n,this.name=g.EXT_MATERIALS_BUMP}getMaterialType(n){return _(this.parser,n,this.name)!==null?w:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];return e.bumpScale=s.bumpFactor!==void 0?s.bumpFactor:1,s.bumpTexture!==void 0&&t.push(this.parser.assignTexture(e,"bumpMap",s.bumpTexture)),Promise.all(t)}}class _n{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_ANISOTROPY}getMaterialType(n){return _(this.parser,n,this.name)!==null?w:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];return s.anisotropyStrength!==void 0&&(e.anisotropy=s.anisotropyStrength),s.anisotropyRotation!==void 0&&(e.anisotropyRotation=s.anisotropyRotation),s.anisotropyTexture!==void 0&&t.push(this.parser.assignTexture(e,"anisotropyMap",s.anisotropyTexture)),Promise.all(t)}}class Ln{constructor(n){this.parser=n,this.name=g.KHR_TEXTURE_BASISU}loadTexture(n){const e=this.parser,s=e.json,t=s.textures[n];if(!t.extensions||!t.extensions[this.name])return null;const i=t.extensions[this.name],r=e.options.ktx2Loader;if(!r){if(s.extensionsRequired&&s.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return e.loadTextureImage(n,i.source,r)}}class Mn{constructor(n){this.parser=n,this.name=g.EXT_TEXTURE_WEBP}loadTexture(n){const e=this.name,s=this.parser,t=s.json,i=t.textures[n];if(!i.extensions||!i.extensions[e])return null;const r=i.extensions[e],a=t.images[r.source];let o=s.textureLoader;if(a.uri){const c=s.options.manager.getHandler(a.uri);c!==null&&(o=c)}return s.loadTextureImage(n,r.source,o)}}class Sn{constructor(n){this.parser=n,this.name=g.EXT_TEXTURE_AVIF}loadTexture(n){const e=this.name,s=this.parser,t=s.json,i=t.textures[n];if(!i.extensions||!i.extensions[e])return null;const r=i.extensions[e],a=t.images[r.source];let o=s.textureLoader;if(a.uri){const c=s.options.manager.getHandler(a.uri);c!==null&&(o=c)}return s.loadTextureImage(n,r.source,o)}}class ae{constructor(n,e){this.name=e,this.parser=n}loadBufferView(n){const e=this.parser.json,s=e.bufferViews[n];if(s.extensions&&s.extensions[this.name]){const t=s.extensions[this.name],i=this.parser.getDependency("buffer",t.buffer),r=this.parser.options.meshoptDecoder;if(!r||!r.supported){if(e.extensionsRequired&&e.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return i.then(function(a){const o=t.byteOffset||0,c=t.byteLength||0,u=t.count,l=t.byteStride,h=new Uint8Array(a,o,c);return r.decodeGltfBufferAsync?r.decodeGltfBufferAsync(u,l,h,t.mode,t.filter).then(function(d){return d.buffer}):r.ready.then(function(){const d=new ArrayBuffer(u*l);return r.decodeGltfBuffer(new Uint8Array(d),u,l,h,t.mode,t.filter),d})})}else return null}}class yn{constructor(n){this.name=g.EXT_MESH_GPU_INSTANCING,this.parser=n}createNodeMesh(n){const e=this.parser.json,s=e.nodes[n];if(!s.extensions||!s.extensions[this.name]||s.mesh===void 0)return null;const t=e.meshes[s.mesh];for(const c of t.primitives)if(c.mode!==M.TRIANGLES&&c.mode!==M.TRIANGLE_STRIP&&c.mode!==M.TRIANGLE_FAN&&c.mode!==void 0)return null;const r=s.extensions[this.name].attributes,a=[],o={};for(const c in r)a.push(this.parser.getDependency("accessor",r[c]).then(u=>(o[c]=u,o[c])));return a.length<1?null:(a.push(this.parser.createNodeMesh(n)),Promise.all(a).then(c=>{const u=c.pop(),l=u.isGroup?u.children:[u],h=c[0].count,d=[];for(const p of l){const R=new B,m=new C,T=new me,A=new C(1,1,1),x=new be(p.geometry,p.material,h);for(let E=0;E<h;E++)o.TRANSLATION&&m.fromBufferAttribute(o.TRANSLATION,E),o.ROTATION&&T.fromBufferAttribute(o.ROTATION,E),o.SCALE&&A.fromBufferAttribute(o.SCALE,E),x.setMatrixAt(E,R.compose(m,T,A));for(const E in o)if(E==="_COLOR_0"){const L=o[E];x.instanceColor=new Ne(L.array,L.itemSize,L.normalized)}else E!=="TRANSLATION"&&E!=="ROTATION"&&E!=="SCALE"&&p.geometry.setAttribute(E,o[E]);ge.prototype.copy.call(x,p),this.parser.assignFinalMaterial(x),d.push(x)}return u.isGroup?(u.clear(),u.add(...d),u):d[0]}))}}const Ae="glTF",D=12,ce={JSON:1313821514,BIN:5130562};class wn{constructor(n){this.name=g.KHR_BINARY_GLTF,this.content=null,this.body=null;const e=new DataView(n,0,D),s=new TextDecoder;if(this.header={magic:s.decode(new Uint8Array(n.slice(0,4))),version:e.getUint32(4,!0),length:e.getUint32(8,!0)},this.header.magic!==Ae)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");const t=this.header.length-D,i=new DataView(n,D);let r=0;for(;r<t;){const a=i.getUint32(r,!0);r+=4;const o=i.getUint32(r,!0);if(r+=4,o===ce.JSON){const c=new Uint8Array(n,D+r,a);this.content=s.decode(c)}else if(o===ce.BIN){const c=D+r;this.body=n.slice(c,c+a)}r+=a}if(this.content===null)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class bn{constructor(n,e){if(!e)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=g.KHR_DRACO_MESH_COMPRESSION,this.json=n,this.dracoLoader=e,this.dracoLoader.preload()}decodePrimitive(n,e){const s=this.json,t=this.dracoLoader,i=n.extensions[this.name].bufferView,r=n.extensions[this.name].attributes,a={},o={},c={};for(const u in r){const l=$[u]||u.toLowerCase();a[l]=r[u]}for(const u in n.attributes){const l=$[u]||u.toLowerCase();if(r[u]!==void 0){const h=s.accessors[n.attributes[u]],d=H[h.componentType];c[l]=d.name,o[l]=h.normalized===!0}}return e.getDependency("bufferView",i).then(function(u){return new Promise(function(l,h){t.decodeDracoFile(u,function(d){for(const p in d.attributes){const R=d.attributes[p],m=o[p];m!==void 0&&(R.normalized=m)}l(d)},a,c,b,h)})})}}class Nn{constructor(){this.name=g.KHR_TEXTURE_TRANSFORM}extendTexture(n,e){return(e.texCoord===void 0||e.texCoord===n.channel)&&e.offset===void 0&&e.rotation===void 0&&e.scale===void 0||(n=n.clone(),e.texCoord!==void 0&&(n.channel=e.texCoord),e.offset!==void 0&&n.offset.fromArray(e.offset),e.rotation!==void 0&&(n.rotation=e.rotation),e.scale!==void 0&&n.repeat.fromArray(e.scale),n.needsUpdate=!0),n}}class In{constructor(){this.name=g.KHR_MESH_QUANTIZATION}}class _e extends on{constructor(n,e,s,t){super(n,e,s,t)}copySampleValue_(n){const e=this.resultBuffer,s=this.sampleValues,t=this.valueSize,i=n*t*3+t;for(let r=0;r!==t;r++)e[r]=s[i+r];return e}interpolate_(n,e,s,t){const i=this.resultBuffer,r=this.sampleValues,a=this.valueSize,o=a*2,c=a*3,u=t-e,l=(s-e)/u,h=l*l,d=h*l,p=n*c,R=p-c,m=-2*d+3*h,T=d-h,A=1-m,x=T-h+l;for(let E=0;E!==a;E++){const L=r[R+E+a],N=r[R+E+o]*u,S=r[p+E+a],k=r[p+E]*u;i[E]=A*L+x*N+m*S+T*k}return i}}const On=new me;class Cn extends _e{interpolate_(n,e,s,t){const i=super.interpolate_(n,e,s,t);return On.fromArray(i).normalize().toArray(i),i}}const M={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},H={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},ue={9728:Re,9729:J,9984:He,9985:Pe,9986:Fe,9987:Te},le={33071:De,33648:ke,10497:Z},q={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},$={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv1",TEXCOORD_2:"uv2",TEXCOORD_3:"uv3",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},I={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},Fn={CUBICSPLINE:void 0,LINEAR:xe,STEP:tn},W={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function Pn(f){return f.DefaultMaterial===void 0&&(f.DefaultMaterial=new Ee({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:rn})),f.DefaultMaterial}function O(f,n,e){for(const s in e.extensions)f[s]===void 0&&(n.userData.gltfExtensions=n.userData.gltfExtensions||{},n.userData.gltfExtensions[s]=e.extensions[s])}function y(f,n){n.extras!==void 0&&(typeof n.extras=="object"?Object.assign(f.userData,n.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+n.extras))}function Hn(f,n,e){let s=!1,t=!1,i=!1;for(let c=0,u=n.length;c<u;c++){const l=n[c];if(l.POSITION!==void 0&&(s=!0),l.NORMAL!==void 0&&(t=!0),l.COLOR_0!==void 0&&(i=!0),s&&t&&i)break}if(!s&&!t&&!i)return Promise.resolve(f);const r=[],a=[],o=[];for(let c=0,u=n.length;c<u;c++){const l=n[c];if(s){const h=l.POSITION!==void 0?e.getDependency("accessor",l.POSITION):f.attributes.position;r.push(h)}if(t){const h=l.NORMAL!==void 0?e.getDependency("accessor",l.NORMAL):f.attributes.normal;a.push(h)}if(i){const h=l.COLOR_0!==void 0?e.getDependency("accessor",l.COLOR_0):f.attributes.color;o.push(h)}}return Promise.all([Promise.all(r),Promise.all(a),Promise.all(o)]).then(function(c){const u=c[0],l=c[1],h=c[2];return s&&(f.morphAttributes.position=u),t&&(f.morphAttributes.normal=l),i&&(f.morphAttributes.color=h),f.morphTargetsRelative=!0,f})}function kn(f,n){if(f.updateMorphTargets(),n.weights!==void 0)for(let e=0,s=n.weights.length;e<s;e++)f.morphTargetInfluences[e]=n.weights[e];if(n.extras&&Array.isArray(n.extras.targetNames)){const e=n.extras.targetNames;if(f.morphTargetInfluences.length===e.length){f.morphTargetDictionary={};for(let s=0,t=e.length;s<t;s++)f.morphTargetDictionary[e[s]]=s}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function Dn(f){let n;const e=f.extensions&&f.extensions[g.KHR_DRACO_MESH_COMPRESSION];if(e?n="draco:"+e.bufferView+":"+e.indices+":"+Y(e.attributes):n=f.indices+":"+Y(f.attributes)+":"+f.mode,f.targets!==void 0)for(let s=0,t=f.targets.length;s<t;s++)n+=":"+Y(f.targets[s]);return n}function Y(f){let n="";const e=Object.keys(f).sort();for(let s=0,t=e.length;s<t;s++)n+=e[s]+":"+f[e[s]]+";";return n}function ee(f){switch(f){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.")}}function Gn(f){return f.search(/\.jpe?g($|\?)/i)>0||f.search(/^data\:image\/jpeg/)===0?"image/jpeg":f.search(/\.webp($|\?)/i)>0||f.search(/^data\:image\/webp/)===0?"image/webp":f.search(/\.ktx2($|\?)/i)>0||f.search(/^data\:image\/ktx2/)===0?"image/ktx2":"image/png"}const vn=new B;class Un{constructor(n={},e={}){this.json=n,this.extensions={},this.plugins={},this.options=e,this.cache=new un,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let s=!1,t=-1,i=!1,r=-1;if(typeof navigator<"u"&&typeof navigator.userAgent<"u"){const a=navigator.userAgent;s=/^((?!chrome|android).)*safari/i.test(a)===!0;const o=a.match(/Version\/(\d+)/);t=s&&o?parseInt(o[1],10):-1,i=a.indexOf("Firefox")>-1,r=i?a.match(/Firefox\/([0-9]+)\./)[1]:-1}typeof createImageBitmap>"u"||s&&t<17||i&&r<98?this.textureLoader=new Ie(this.options.manager):this.textureLoader=new Oe(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new de(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(n){this.extensions=n}setPlugins(n){this.plugins=n}parse(n,e){const s=this,t=this.json,i=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(r){return r._markDefs&&r._markDefs()}),Promise.all(this._invokeAll(function(r){return r.beforeRoot&&r.beforeRoot()})).then(function(){return Promise.all([s.getDependencies("scene"),s.getDependencies("animation"),s.getDependencies("camera")])}).then(function(r){const a={scene:r[0][t.scene||0],scenes:r[0],animations:r[1],cameras:r[2],asset:t.asset,parser:s,userData:{}};return O(i,a,t),y(a,t),Promise.all(s._invokeAll(function(o){return o.afterRoot&&o.afterRoot(a)})).then(function(){for(const o of a.scenes)o.updateMatrixWorld();n(a)})}).catch(e)}_markDefs(){const n=this.json.nodes||[],e=this.json.skins||[],s=this.json.meshes||[];for(let t=0,i=e.length;t<i;t++){const r=e[t].joints;for(let a=0,o=r.length;a<o;a++)n[r[a]].isBone=!0}for(let t=0,i=n.length;t<i;t++){const r=n[t];r.mesh!==void 0&&(this._addNodeRef(this.meshCache,r.mesh),r.skin!==void 0&&(s[r.mesh].isSkinnedMesh=!0)),r.camera!==void 0&&this._addNodeRef(this.cameraCache,r.camera)}}_addNodeRef(n,e){e!==void 0&&(n.refs[e]===void 0&&(n.refs[e]=n.uses[e]=0),n.refs[e]++)}_getNodeRef(n,e,s){if(n.refs[e]<=1)return s;const t=s.clone(),i=(r,a)=>{const o=this.associations.get(r);o!=null&&this.associations.set(a,o);for(const[c,u]of r.children.entries())i(u,a.children[c])};return i(s,t),t.name+="_instance_"+n.uses[e]++,t}_invokeOne(n){const e=Object.values(this.plugins);e.push(this);for(let s=0;s<e.length;s++){const t=n(e[s]);if(t)return t}return null}_invokeAll(n){const e=Object.values(this.plugins);e.unshift(this);const s=[];for(let t=0;t<e.length;t++){const i=n(e[t]);i&&s.push(i)}return s}getDependency(n,e){const s=n+":"+e;let t=this.cache.get(s);if(!t){switch(n){case"scene":t=this.loadScene(e);break;case"node":t=this._invokeOne(function(i){return i.loadNode&&i.loadNode(e)});break;case"mesh":t=this._invokeOne(function(i){return i.loadMesh&&i.loadMesh(e)});break;case"accessor":t=this.loadAccessor(e);break;case"bufferView":t=this._invokeOne(function(i){return i.loadBufferView&&i.loadBufferView(e)});break;case"buffer":t=this.loadBuffer(e);break;case"material":t=this._invokeOne(function(i){return i.loadMaterial&&i.loadMaterial(e)});break;case"texture":t=this._invokeOne(function(i){return i.loadTexture&&i.loadTexture(e)});break;case"skin":t=this.loadSkin(e);break;case"animation":t=this._invokeOne(function(i){return i.loadAnimation&&i.loadAnimation(e)});break;case"camera":t=this.loadCamera(e);break;default:if(t=this._invokeOne(function(i){return i!=this&&i.getDependency&&i.getDependency(n,e)}),!t)throw new Error("Unknown type: "+n);break}this.cache.add(s,t)}return t}getDependencies(n){let e=this.cache.get(n);if(!e){const s=this,t=this.json[n+(n==="mesh"?"es":"s")]||[];e=Promise.all(t.map(function(i,r){return s.getDependency(n,r)})),this.cache.add(n,e)}return e}loadBuffer(n){const e=this.json.buffers[n],s=this.fileLoader;if(e.type&&e.type!=="arraybuffer")throw new Error("THREE.GLTFLoader: "+e.type+" buffer type is not supported.");if(e.uri===void 0&&n===0)return Promise.resolve(this.extensions[g.KHR_BINARY_GLTF].body);const t=this.options;return new Promise(function(i,r){s.load(v.resolveURL(e.uri,t.path),i,void 0,function(){r(new Error('THREE.GLTFLoader: Failed to load buffer "'+e.uri+'".'))})})}loadBufferView(n){const e=this.json.bufferViews[n];return this.getDependency("buffer",e.buffer).then(function(s){const t=e.byteLength||0,i=e.byteOffset||0;return s.slice(i,i+t)})}loadAccessor(n){const e=this,s=this.json,t=this.json.accessors[n];if(t.bufferView===void 0&&t.sparse===void 0){const r=q[t.type],a=H[t.componentType],o=t.normalized===!0,c=new a(t.count*r);return Promise.resolve(new V(c,r,o))}const i=[];return t.bufferView!==void 0?i.push(this.getDependency("bufferView",t.bufferView)):i.push(null),t.sparse!==void 0&&(i.push(this.getDependency("bufferView",t.sparse.indices.bufferView)),i.push(this.getDependency("bufferView",t.sparse.values.bufferView))),Promise.all(i).then(function(r){const a=r[0],o=q[t.type],c=H[t.componentType],u=c.BYTES_PER_ELEMENT,l=u*o,h=t.byteOffset||0,d=t.bufferView!==void 0?s.bufferViews[t.bufferView].byteStride:void 0,p=t.normalized===!0;let R,m;if(d&&d!==l){const T=Math.floor(h/d),A="InterleavedBuffer:"+t.bufferView+":"+t.componentType+":"+T+":"+t.count;let x=e.cache.get(A);x||(R=new c(a,T*d,t.count*d/u),x=new Ce(R,d/u),e.cache.add(A,x)),m=new sn(x,o,h%d/u,p)}else a===null?R=new c(t.count*o):R=new c(a,h,t.count*o),m=new V(R,o,p);if(t.sparse!==void 0){const T=q.SCALAR,A=H[t.sparse.indices.componentType],x=t.sparse.indices.byteOffset||0,E=t.sparse.values.byteOffset||0,L=new A(r[1],x,t.sparse.count*T),N=new c(r[2],E,t.sparse.count*o);a!==null&&(m=new V(m.array.slice(),m.itemSize,m.normalized)),m.normalized=!1;for(let S=0,k=L.length;S<k;S++){const P=L[S];if(m.setX(P,N[S*o]),o>=2&&m.setY(P,N[S*o+1]),o>=3&&m.setZ(P,N[S*o+2]),o>=4&&m.setW(P,N[S*o+3]),o>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}m.normalized=p}return m})}loadTexture(n){const e=this.json,s=this.options,i=e.textures[n].source,r=e.images[i];let a=this.textureLoader;if(r.uri){const o=s.manager.getHandler(r.uri);o!==null&&(a=o)}return this.loadTextureImage(n,i,a)}loadTextureImage(n,e,s){const t=this,i=this.json,r=i.textures[n],a=i.images[e],o=(a.uri||a.bufferView)+":"+r.sampler;if(this.textureCache[o])return this.textureCache[o];const c=this.loadImageSource(e,s).then(function(u){u.flipY=!1,u.name=r.name||a.name||"",u.name===""&&typeof a.uri=="string"&&a.uri.startsWith("data:image/")===!1&&(u.name=a.uri);const h=(i.samplers||{})[r.sampler]||{};return u.magFilter=ue[h.magFilter]||J,u.minFilter=ue[h.minFilter]||Te,u.wrapS=le[h.wrapS]||Z,u.wrapT=le[h.wrapT]||Z,u.generateMipmaps=!u.isCompressedTexture&&u.minFilter!==Re&&u.minFilter!==J,t.associations.set(u,{textures:n}),u}).catch(function(){return null});return this.textureCache[o]=c,c}loadImageSource(n,e){const s=this,t=this.json,i=this.options;if(this.sourceCache[n]!==void 0)return this.sourceCache[n].then(l=>l.clone());const r=t.images[n],a=self.URL||self.webkitURL;let o=r.uri||"",c=!1;if(r.bufferView!==void 0)o=s.getDependency("bufferView",r.bufferView).then(function(l){c=!0;const h=new Blob([l],{type:r.mimeType});return o=a.createObjectURL(h),o});else if(r.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+n+" is missing URI and bufferView");const u=Promise.resolve(o).then(function(l){return new Promise(function(h,d){let p=h;e.isImageBitmapLoader===!0&&(p=function(R){const m=new ne(R);m.needsUpdate=!0,h(m)}),e.load(v.resolveURL(l,i.path),p,void 0,d)})}).then(function(l){return c===!0&&a.revokeObjectURL(o),y(l,r),l.userData.mimeType=r.mimeType||Gn(r.uri),l}).catch(function(l){throw console.error("THREE.GLTFLoader: Couldn't load texture",o),l});return this.sourceCache[n]=u,u}assignTexture(n,e,s,t){const i=this;return this.getDependency("texture",s.index).then(function(r){if(!r)return null;if(s.texCoord!==void 0&&s.texCoord>0&&(r=r.clone(),r.channel=s.texCoord),i.extensions[g.KHR_TEXTURE_TRANSFORM]){const a=s.extensions!==void 0?s.extensions[g.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const o=i.associations.get(r);r=i.extensions[g.KHR_TEXTURE_TRANSFORM].extendTexture(r,a),i.associations.set(r,o)}}return t!==void 0&&(r.colorSpace=t),n[e]=r,r})}assignFinalMaterial(n){const e=n.geometry;let s=n.material;const t=e.attributes.tangent===void 0,i=e.attributes.color!==void 0,r=e.attributes.normal===void 0;if(n.isPoints){const a="PointsMaterial:"+s.uuid;let o=this.cache.get(a);o||(o=new Ge,X.prototype.copy.call(o,s),o.color.copy(s.color),o.map=s.map,o.sizeAttenuation=!1,this.cache.add(a,o)),s=o}else if(n.isLine){const a="LineBasicMaterial:"+s.uuid;let o=this.cache.get(a);o||(o=new ve,X.prototype.copy.call(o,s),o.color.copy(s.color),o.map=s.map,this.cache.add(a,o)),s=o}if(t||i||r){let a="ClonedMaterial:"+s.uuid+":";t&&(a+="derivative-tangents:"),i&&(a+="vertex-colors:"),r&&(a+="flat-shading:");let o=this.cache.get(a);o||(o=s.clone(),i&&(o.vertexColors=!0),r&&(o.flatShading=!0),t&&(o.normalScale&&(o.normalScale.y*=-1),o.clearcoatNormalScale&&(o.clearcoatNormalScale.y*=-1)),this.cache.add(a,o),this.associations.set(o,this.associations.get(s))),s=o}n.material=s}getMaterialType(){return Ee}loadMaterial(n){const e=this,s=this.json,t=this.extensions,i=s.materials[n];let r;const a={},o=i.extensions||{},c=[];if(o[g.KHR_MATERIALS_UNLIT]){const l=t[g.KHR_MATERIALS_UNLIT];r=l.getMaterialType(),c.push(l.extendParams(a,i,e))}else{const l=i.pbrMetallicRoughness||{};if(a.color=new F(1,1,1),a.opacity=1,Array.isArray(l.baseColorFactor)){const h=l.baseColorFactor;a.color.setRGB(h[0],h[1],h[2],b),a.opacity=h[3]}l.baseColorTexture!==void 0&&c.push(e.assignTexture(a,"map",l.baseColorTexture,U)),a.metalness=l.metallicFactor!==void 0?l.metallicFactor:1,a.roughness=l.roughnessFactor!==void 0?l.roughnessFactor:1,l.metallicRoughnessTexture!==void 0&&(c.push(e.assignTexture(a,"metalnessMap",l.metallicRoughnessTexture)),c.push(e.assignTexture(a,"roughnessMap",l.metallicRoughnessTexture))),r=this._invokeOne(function(h){return h.getMaterialType&&h.getMaterialType(n)}),c.push(Promise.all(this._invokeAll(function(h){return h.extendMaterialParams&&h.extendMaterialParams(n,a)})))}i.doubleSided===!0&&(a.side=Ue);const u=i.alphaMode||W.OPAQUE;if(u===W.BLEND?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,u===W.MASK&&(a.alphaTest=i.alphaCutoff!==void 0?i.alphaCutoff:.5)),i.normalTexture!==void 0&&r!==G&&(c.push(e.assignTexture(a,"normalMap",i.normalTexture)),a.normalScale=new pe(1,1),i.normalTexture.scale!==void 0)){const l=i.normalTexture.scale;a.normalScale.set(l,l)}if(i.occlusionTexture!==void 0&&r!==G&&(c.push(e.assignTexture(a,"aoMap",i.occlusionTexture)),i.occlusionTexture.strength!==void 0&&(a.aoMapIntensity=i.occlusionTexture.strength)),i.emissiveFactor!==void 0&&r!==G){const l=i.emissiveFactor;a.emissive=new F().setRGB(l[0],l[1],l[2],b)}return i.emissiveTexture!==void 0&&r!==G&&c.push(e.assignTexture(a,"emissiveMap",i.emissiveTexture,U)),Promise.all(c).then(function(){const l=new r(a);return i.name&&(l.name=i.name),y(l,i),e.associations.set(l,{materials:n}),i.extensions&&O(t,l,i),l})}createUniqueName(n){const e=Be.sanitizeNodeName(n||"");return e in this.nodeNamesUsed?e+"_"+ ++this.nodeNamesUsed[e]:(this.nodeNamesUsed[e]=0,e)}loadGeometries(n){const e=this,s=this.extensions,t=this.primitiveCache;function i(a){return s[g.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,e).then(function(o){return fe(o,a,e)})}const r=[];for(let a=0,o=n.length;a<o;a++){const c=n[a],u=Dn(c),l=t[u];if(l)r.push(l.promise);else{let h;c.extensions&&c.extensions[g.KHR_DRACO_MESH_COMPRESSION]?h=i(c):h=fe(new Ke,c,e),t[u]={primitive:c,promise:h},r.push(h)}}return Promise.all(r)}loadMesh(n){const e=this,s=this.json,t=this.extensions,i=s.meshes[n],r=i.primitives,a=[];for(let o=0,c=r.length;o<c;o++){const u=r[o].material===void 0?Pn(this.cache):this.getDependency("material",r[o].material);a.push(u)}return a.push(e.loadGeometries(r)),Promise.all(a).then(function(o){const c=o.slice(0,o.length-1),u=o[o.length-1],l=[];for(let d=0,p=u.length;d<p;d++){const R=u[d],m=r[d];let T;const A=c[d];if(m.mode===M.TRIANGLES||m.mode===M.TRIANGLE_STRIP||m.mode===M.TRIANGLE_FAN||m.mode===void 0)T=i.isSkinnedMesh===!0?new je(R,A):new Ve(R,A),T.isSkinnedMesh===!0&&T.normalizeSkinWeights(),m.mode===M.TRIANGLE_STRIP?T.geometry=oe(T.geometry,he):m.mode===M.TRIANGLE_FAN&&(T.geometry=oe(T.geometry,Q));else if(m.mode===M.LINES)T=new Xe(R,A);else if(m.mode===M.LINE_STRIP)T=new ze(R,A);else if(m.mode===M.LINE_LOOP)T=new qe(R,A);else if(m.mode===M.POINTS)T=new We(R,A);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+m.mode);Object.keys(T.geometry.morphAttributes).length>0&&kn(T,i),T.name=e.createUniqueName(i.name||"mesh_"+n),y(T,i),m.extensions&&O(t,T,m),e.assignFinalMaterial(T),l.push(T)}for(let d=0,p=l.length;d<p;d++)e.associations.set(l[d],{meshes:n,primitives:d});if(l.length===1)return i.extensions&&O(t,l[0],i),l[0];const h=new z;i.extensions&&O(t,h,i),e.associations.set(h,{meshes:n});for(let d=0,p=l.length;d<p;d++)h.add(l[d]);return h})}loadCamera(n){let e;const s=this.json.cameras[n],t=s[s.type];if(!t){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return s.type==="perspective"?e=new Ye(Qe.radToDeg(t.yfov),t.aspectRatio||1,t.znear||1,t.zfar||2e6):s.type==="orthographic"&&(e=new Je(-t.xmag,t.xmag,t.ymag,-t.ymag,t.znear,t.zfar)),s.name&&(e.name=this.createUniqueName(s.name)),y(e,s),Promise.resolve(e)}loadSkin(n){const e=this.json.skins[n],s=[];for(let t=0,i=e.joints.length;t<i;t++)s.push(this._loadNodeShallow(e.joints[t]));return e.inverseBindMatrices!==void 0?s.push(this.getDependency("accessor",e.inverseBindMatrices)):s.push(null),Promise.all(s).then(function(t){const i=t.pop(),r=t,a=[],o=[];for(let c=0,u=r.length;c<u;c++){const l=r[c];if(l){a.push(l);const h=new B;i!==null&&h.fromArray(i.array,c*16),o.push(h)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',e.joints[c])}return new Ze(a,o)})}loadAnimation(n){const e=this.json,s=this,t=e.animations[n],i=t.name?t.name:"animation_"+n,r=[],a=[],o=[],c=[],u=[];for(let l=0,h=t.channels.length;l<h;l++){const d=t.channels[l],p=t.samplers[d.sampler],R=d.target,m=R.node,T=t.parameters!==void 0?t.parameters[p.input]:p.input,A=t.parameters!==void 0?t.parameters[p.output]:p.output;R.node!==void 0&&(r.push(this.getDependency("node",m)),a.push(this.getDependency("accessor",T)),o.push(this.getDependency("accessor",A)),c.push(p),u.push(R))}return Promise.all([Promise.all(r),Promise.all(a),Promise.all(o),Promise.all(c),Promise.all(u)]).then(function(l){const h=l[0],d=l[1],p=l[2],R=l[3],m=l[4],T=[];for(let x=0,E=h.length;x<E;x++){const L=h[x],N=d[x],S=p[x],k=R[x],P=m[x];if(L===void 0)continue;L.updateMatrix&&L.updateMatrix();const K=s._createAnimationTracks(L,N,S,k,P);if(K)for(let j=0;j<K.length;j++)T.push(K[j])}const A=new $e(i,void 0,T);return y(A,t),A})}createNodeMesh(n){const e=this.json,s=this,t=e.nodes[n];return t.mesh===void 0?null:s.getDependency("mesh",t.mesh).then(function(i){const r=s._getNodeRef(s.meshCache,t.mesh,i);return t.weights!==void 0&&r.traverse(function(a){if(a.isMesh)for(let o=0,c=t.weights.length;o<c;o++)a.morphTargetInfluences[o]=t.weights[o]}),r})}loadNode(n){const e=this.json,s=this,t=e.nodes[n],i=s._loadNodeShallow(n),r=[],a=t.children||[];for(let c=0,u=a.length;c<u;c++)r.push(s.getDependency("node",a[c]));const o=t.skin===void 0?Promise.resolve(null):s.getDependency("skin",t.skin);return Promise.all([i,Promise.all(r),o]).then(function(c){const u=c[0],l=c[1],h=c[2];h!==null&&u.traverse(function(d){d.isSkinnedMesh&&d.bind(h,vn)});for(let d=0,p=l.length;d<p;d++)u.add(l[d]);if(u.userData.pivot!==void 0&&l.length>0){const d=u.userData.pivot,p=l[0];u.pivot=new C().fromArray(d),u.position.x-=d[0],u.position.y-=d[1],u.position.z-=d[2],p.position.set(0,0,0),delete u.userData.pivot}return u})}_loadNodeShallow(n){const e=this.json,s=this.extensions,t=this;if(this.nodeCache[n]!==void 0)return this.nodeCache[n];const i=e.nodes[n],r=i.name?t.createUniqueName(i.name):"",a=[],o=t._invokeOne(function(c){return c.createNodeMesh&&c.createNodeMesh(n)});return o&&a.push(o),i.camera!==void 0&&a.push(t.getDependency("camera",i.camera).then(function(c){return t._getNodeRef(t.cameraCache,i.camera,c)})),t._invokeAll(function(c){return c.createNodeAttachment&&c.createNodeAttachment(n)}).forEach(function(c){a.push(c)}),this.nodeCache[n]=Promise.all(a).then(function(c){let u;if(i.isBone===!0?u=new en:c.length>1?u=new z:c.length===1?u=c[0]:u=new ge,u!==c[0])for(let l=0,h=c.length;l<h;l++)u.add(c[l]);if(i.name&&(u.userData.name=i.name,u.name=r),y(u,i),i.extensions&&O(s,u,i),i.matrix!==void 0){const l=new B;l.fromArray(i.matrix),u.applyMatrix4(l)}else i.translation!==void 0&&u.position.fromArray(i.translation),i.rotation!==void 0&&u.quaternion.fromArray(i.rotation),i.scale!==void 0&&u.scale.fromArray(i.scale);if(!t.associations.has(u))t.associations.set(u,{});else if(i.mesh!==void 0&&t.meshCache.refs[i.mesh]>1){const l=t.associations.get(u);t.associations.set(u,{...l})}return t.associations.get(u).nodes=n,u}),this.nodeCache[n]}loadScene(n){const e=this.extensions,s=this.json.scenes[n],t=this,i=new z;s.name&&(i.name=t.createUniqueName(s.name)),y(i,s),s.extensions&&O(e,i,s);const r=s.nodes||[],a=[];for(let o=0,c=r.length;o<c;o++)a.push(t.getDependency("node",r[o]));return Promise.all(a).then(function(o){for(let u=0,l=o.length;u<l;u++){const h=o[u];h.parent!==null?i.add(nn(h)):i.add(h)}const c=u=>{const l=new Map;for(const[h,d]of t.associations)(h instanceof X||h instanceof ne)&&l.set(h,d);return u.traverse(h=>{const d=t.associations.get(h);d!=null&&l.set(h,d)}),l};return t.associations=c(i),i})}_createAnimationTracks(n,e,s,t,i){const r=[],a=n.name?n.name:n.uuid,o=[];function c(d){d.morphTargetInfluences&&o.push(d.name?d.name:d.uuid)}I[i.path]===I.weights?(c(n),n.isGroup&&n.children.forEach(c)):o.push(a);let u;switch(I[i.path]){case I.weights:u=se;break;case I.rotation:u=ie;break;case I.translation:case I.scale:u=te;break;default:switch(s.itemSize){case 1:u=se;break;case 2:case 3:default:u=te;break}break}const l=t.interpolation!==void 0?Fn[t.interpolation]:xe,h=this._getArrayFromAccessor(s);for(let d=0,p=o.length;d<p;d++){const R=new u(o[d]+"."+I[i.path],e.array,h,l);t.interpolation==="CUBICSPLINE"&&this._createCubicSplineTrackInterpolant(R),r.push(R)}return r}_getArrayFromAccessor(n){let e=n.array;if(n.normalized){const s=ee(e.constructor),t=new Float32Array(e.length);for(let i=0,r=e.length;i<r;i++)t[i]=e[i]*s;e=t}return e}_createCubicSplineTrackInterpolant(n){n.createInterpolant=function(s){const t=this instanceof ie?Cn:_e;return new t(this.times,this.values,this.getValueSize()/3,s)},n.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0}}function Bn(f,n,e){const s=n.attributes,t=new an;if(s.POSITION!==void 0){const a=e.json.accessors[s.POSITION],o=a.min,c=a.max;if(o!==void 0&&c!==void 0){if(t.set(new C(o[0],o[1],o[2]),new C(c[0],c[1],c[2])),a.normalized){const u=ee(H[a.componentType]);t.min.multiplyScalar(u),t.max.multiplyScalar(u)}}else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;const i=n.targets;if(i!==void 0){const a=new C,o=new C;for(let c=0,u=i.length;c<u;c++){const l=i[c];if(l.POSITION!==void 0){const h=e.json.accessors[l.POSITION],d=h.min,p=h.max;if(d!==void 0&&p!==void 0){if(o.setX(Math.max(Math.abs(d[0]),Math.abs(p[0]))),o.setY(Math.max(Math.abs(d[1]),Math.abs(p[1]))),o.setZ(Math.max(Math.abs(d[2]),Math.abs(p[2]))),h.normalized){const R=ee(H[h.componentType]);o.multiplyScalar(R)}a.max(o)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}t.expandByVector(a)}f.boundingBox=t;const r=new cn;t.getCenter(r.center),r.radius=t.min.distanceTo(t.max)/2,f.boundingSphere=r}function fe(f,n,e){const s=n.attributes,t=[];function i(r,a){return e.getDependency("accessor",r).then(function(o){f.setAttribute(a,o)})}for(const r in s){const a=$[r]||r.toLowerCase();a in f.attributes||t.push(i(s[r],a))}if(n.indices!==void 0&&!f.index){const r=e.getDependency("accessor",n.indices).then(function(a){f.setIndex(a)});t.push(r)}return re.workingColorSpace!==b&&"COLOR_0"in s&&console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${re.workingColorSpace}" not supported.`),y(f,n),Bn(f,n,e),Promise.all(t).then(function(){return n.targets!==void 0?Hn(f,n.targets,e):f})}export{jn as GLTFLoader};
@@ -1 +1 @@
1
- import{n as r,_ as t}from"./rr0-sighting-editor.mjs";const i=r.catalog({en:()=>t(()=>import("./GenerativeKitMessages_en-BY4B6yas.js"),[],import.meta.url).then(e=>e.generativeKitMessages_en),fr:()=>t(()=>import("./GenerativeKitMessages_fr-BY5yUJwK.js"),[],import.meta.url).then(e=>e.generativeKitMessages_fr),es:()=>t(()=>import("./GenerativeKitMessages_es-_iYkoRhK.js"),[],import.meta.url).then(e=>e.generativeKitMessages_es),it:()=>t(()=>import("./GenerativeKitMessages_it-DAgB31P1.js"),[],import.meta.url).then(e=>e.generativeKitMessages_it)});export{i as generativeKitMessages};
1
+ import{v as r,_ as t}from"./rr0-sighting-editor.mjs";const i=r.catalog({en:()=>t(()=>import("./GenerativeKitMessages_en-BY4B6yas.js"),[],import.meta.url).then(e=>e.generativeKitMessages_en),fr:()=>t(()=>import("./GenerativeKitMessages_fr-BY5yUJwK.js"),[],import.meta.url).then(e=>e.generativeKitMessages_fr),es:()=>t(()=>import("./GenerativeKitMessages_es-_iYkoRhK.js"),[],import.meta.url).then(e=>e.generativeKitMessages_es),it:()=>t(()=>import("./GenerativeKitMessages_it-DAgB31P1.js"),[],import.meta.url).then(e=>e.generativeKitMessages_it)});export{i as generativeKitMessages};
@@ -1 +1 @@
1
- import{n as _,_ as e}from"./rr0-sighting-editor.mjs";const r=_.catalog({en:()=>e(()=>import("./GeoExportTexts_en-Dq0fSJQp.js"),[],import.meta.url).then(t=>t.geoExportTexts_en),fr:()=>e(()=>import("./GeoExportTexts_fr-DVAMpZIR.js"),[],import.meta.url).then(t=>t.geoExportTexts_fr),es:()=>e(()=>import("./GeoExportTexts_es-CoVHdOo0.js"),[],import.meta.url).then(t=>t.geoExportTexts_es),it:()=>e(()=>import("./GeoExportTexts_it-Bh1uJBQp.js"),[],import.meta.url).then(t=>t.geoExportTexts_it)});export{r as GEO_EXPORT_TEXTS};
1
+ import{v as _,_ as e}from"./rr0-sighting-editor.mjs";const r=_.catalog({en:()=>e(()=>import("./GeoExportTexts_en-Dq0fSJQp.js"),[],import.meta.url).then(t=>t.geoExportTexts_en),fr:()=>e(()=>import("./GeoExportTexts_fr-DVAMpZIR.js"),[],import.meta.url).then(t=>t.geoExportTexts_fr),es:()=>e(()=>import("./GeoExportTexts_es-CoVHdOo0.js"),[],import.meta.url).then(t=>t.geoExportTexts_es),it:()=>e(()=>import("./GeoExportTexts_it-Bh1uJBQp.js"),[],import.meta.url).then(t=>t.geoExportTexts_it)});export{r as GEO_EXPORT_TEXTS};
@@ -1,2 +1,2 @@
1
- import{G as n}from"./GeographicFigures-DqhWddS9.js";import"./rr0-sighting-editor.mjs";class r{static of(o,e,t,i){const c=n.of(o,t,i),a={type:"FeatureCollection",name:n.fill(t.document,{name:e}),description:`${t.documentNote} ${t.heightNote}`,features:c.map(s=>r.feature(s))};return`${JSON.stringify(a,void 0,2)}
1
+ import{G as n}from"./GeographicFigures-D_TfLkj9.js";import"./rr0-sighting-editor.mjs";class r{static of(o,e,t,i){const c=n.of(o,t,i),a={type:"FeatureCollection",name:n.fill(t.document,{name:e}),description:`${t.documentNote} ${t.heightNote}`,features:c.map(s=>r.feature(s))};return`${JSON.stringify(a,void 0,2)}
2
2
  `}static feature(o){return{type:"Feature",properties:{name:o.name,...o.note?{description:o.note}:{},group:o.group,folder:o.groupName,heights:o.heights,...o.color?{stroke:o.color,...o.kind==="polygon"?{fill:o.color}:{},...o.kind==="point"?{"marker-color":o.color}:{}}:{}},geometry:r.geometry(o)}}static geometry(o){const e=o.points.map(t=>r.position(t.lng,t.lat,t.altM));switch(o.kind){case"point":return{type:"Point",coordinates:e[0]};case"line":return{type:"LineString",coordinates:e};case"polygon":return{type:"Polygon",coordinates:[[...e,e[0]]]}}}static position(o,e,t){return[Number(n.round(o,7)),Number(n.round(e,7)),Number(n.round(t,2))]}}export{r as GeoJsonExport};
@@ -0,0 +1 @@
1
+ import{a1 as k,t as v,a2 as y}from"./rr0-sighting-editor.mjs";const b=Math.PI/180;class l{static SIGHT_LINE_M=5e3;static FLAT={heightAt:()=>0};static of(n,t,e){return[...l.observer(n,t),...l.sightLines(n,t,e),...l.bodies(n,t,e),...l.traces(n,t,e)]}static observer(n,t){const e=[];for(const r of n.observerTrack.allKeyframes){const s=k(n,r.t);if(s?.lat===void 0||s.lng===void 0)continue;const d=s.elevationM??0;e.push({t:r.t,at:{lat:s.lat,lng:s.lng,altM:d+v.EYE_HEIGHT_M},...s.headingDeg===void 0?{}:{headingDeg:s.headingDeg},elevationM:d})}if(e.length===0)return[];const o=e[0],a=[{group:"observer",groupName:t.folderObserver,name:l.fill(t.observerPoint,{s:l.seconds(o.t)}),note:l.fill(t.observerNote,{elevation:l.round(o.elevationM,1),heading:o.headingDeg===void 0?"—":l.round(o.headingDeg,0)}),kind:"point",points:[o.at],heights:"observer-ground"}];return e.some(r=>r.at.lat!==o.at.lat||r.at.lng!==o.at.lng)&&a.push({group:"observer",groupName:t.folderObserver,name:t.observerPath,kind:"line",points:e.map(r=>r.at),heights:"observer-ground"}),a}static sightLines(n,t,e){const o=[];for(const a of n.timeline.allKeyframes){const i=k(n,a.t);if(i?.lat===void 0||i.lng===void 0)continue;const r={lat:i.lat,lng:i.lng,altM:(i.elevationM??0)+v.EYE_HEIGHT_M};for(const s of a.shapes){const d=s.shape.aim;d&&o.push({group:"sight-line",groupName:t.folderSightLines,name:l.fill(t.sightLine,{what:l.nameOf(e.read(s.shape.title),s.sourceId,t),s:l.seconds(a.t)}),note:l.fill(t.sightLineNote,{azimuth:l.round(d.azimuthDeg,1),altitude:l.round(d.altitudeDeg,1),km:l.round(l.SIGHT_LINE_M/1e3,0)}),kind:"line",points:[r,l.along(r,d.azimuthDeg,d.altitudeDeg)],heights:"observer-ground"})}}return o}static along(n,t,e){const o=l.SIGHT_LINE_M*Math.cos(e*b),a=y.toGeo({eastM:Math.sin(t*b)*o,northM:Math.cos(t*b)*o},n);return{lat:a.lat,lng:a.lng,altM:n.altM+l.SIGHT_LINE_M*Math.sin(e*b)}}static bodies(n,t,e){const o=n.interpretation?.bodies??[],a=k(n,0);if(o.length===0||a?.lat===void 0||a.lng===void 0)return[];const i={lat:a.lat,lng:a.lng},r=[];for(const s of o){const d=new v(s,l.FLAT,h=>v.eyeOf(n,h,l.FLAT)),f=[];for(const h of[...s.track].sort((c,m)=>c.t-m.t)){const c=d.at(h.t);if(!c)continue;const m=y.toGeo({eastM:c.eastM,northM:c.northM},i),u={lat:m.lat,lng:m.lng,altM:c.upM},M=f[f.length-1];M&&M.lat===u.lat&&M.lng===u.lng&&M.altM===u.altM||f.push(u)}if(f.length===0)continue;const I=l.nameOf(e.read(s.title),s.id,t);r.push({group:"body",groupName:t.folderBodies,name:l.fill(f.length===1?t.bodyPoint:t.bodyPath,{what:I}),note:t.bodyNote,kind:f.length===1?"point":"line",points:f,heights:"observer-ground"})}return r}static traces(n,t,e){return n.traces.map(o=>({group:"trace",groupName:t.folderTraces,name:e.read(o.title)??o.id,...e.read(o.source)?{note:e.read(o.source)}:{},kind:o.kind,points:o.points.map(a=>({lat:a.lat,lng:a.lng,altM:a.altM??0})),heights:o.altitude??"ground",...o.color?{color:o.color}:{}}))}static nameOf(n,t,e){return n&&n.trim()?n.trim():l.fill(e.unnamed,{id:t})}static seconds(n){return l.round(n/1e3,1)}static round(n,t){const e=10**t;return String(Math.round(n*e)/e)}static fill(n,t){return Object.entries(t).reduce((e,[o,a])=>e.replaceAll(`{${o}}`,a),n)}}export{l as G};
@@ -1,4 +1,4 @@
1
- import{c5 as A,aY as g,V as P,c6 as m,be as C,bf as E,bW as L,bv as x,bh as R,bi as I}from"./rr0-sighting-editor.mjs";class i{constructor(e){this.scene=e}static REAL_BEAMS=4;static LAMPS=2;static DISTANCE_M=500;static AIR_LENGTH_M=90;static CLEAR_AIR_SCATTER_PER_M=2e-4;static SHADOW_MAP_PX=1024;beams=new Map;static airGeometry;has(e){return this.beams.has(e)}get size(){return this.beams.size}lamps(e){return this.beams.get(e)?.lamps??[]}airMeshes(e){return this.beams.get(e)?.air??[]}add(e){if(this.beams.has(e))return!0;if(this.beams.size>=i.REAL_BEAMS)return!1;const t=[],r=[];for(let n=0;n<i.LAMPS;n++){const a=new A(16777215,0,i.DISTANCE_M,Math.PI/8,.5,2);a.castShadow=e==="observer",a.shadow.mapSize.set(i.SHADOW_MAP_PX,i.SHADOW_MAP_PX),a.shadow.camera.near=.4,a.shadow.camera.far=110,a.shadow.bias=-4e-4,a.shadow.normalBias=.04,a.shadow.radius=2,this.scene.add(a),this.scene.add(a.target),t.push(a);const o=new g(i.airCone(),i.airMaterial());o.visible=!1,o.frustumCulled=!1,o.renderOrder=8,o.castShadow=!1,o.receiveShadow=!1,o.name="headlight air",this.scene.add(o),r.push(o)}return this.beams.set(e,{lamps:t,air:r}),!0}remove(e){const t=this.beams.get(e);if(t){for(const r of t.lamps)r.removeFromParent(),r.target.removeFromParent(),r.dispose();for(const r of t.air)r.removeFromParent(),r.material.dispose();this.beams.delete(e)}}clear(e){for(const t of[...this.beams.keys()])e&&t==="observer"||this.remove(t)}dispose(){this.clear(!1),i.airGeometry?.dispose(),i.airGeometry=void 0}aim(e,t,r,n,a,o,u){const c=this.beams.get(e),b=Math.max(u,i.CLEAR_AIR_SCATTER_PER_M);if(!c)return;const l=m.BEAMS[t],v=new P(-n.z,0,n.x),w=e==="observer"&&l!==void 0;c.lamps.forEach((s,d)=>{if(!l){s.intensity=0,c.air[d].visible=!1,s.shadow.autoUpdate=!1;return}const f=d===0?-1:1,h=l.pitchDeg*Math.PI/180,p=l.candela*m.DISPLAY_GAIN*o/c.lamps.length;s.color.set(l.color),s.intensity=p,s.angle=l.halfAngleDeg*Math.PI/180,s.penumbra=l.penumbra,w?(s.shadow.autoUpdate||(s.shadow.needsUpdate=!0),s.shadow.autoUpdate=!0):s.shadow.autoUpdate=!1,s.position.copy(r).addScaledVector(v,f*a);const M=n.clone().addScaledVector(v,-f*Math.tan(m.TOE_IN_DEG*Math.PI/180)).normalize();s.target.position.set(s.position.x+M.x*Math.cos(h)*50,s.position.y-Math.sin(h)*50,s.position.z+M.z*Math.cos(h)*50),s.target.updateMatrixWorld(),this.aimAir(c.air[d],s,l.color,p,b)})}aimAir(e,t,r,n,a){if(e.visible=a*n>1e-4,!e.visible)return;const o=i.AIR_LENGTH_M,u=o*Math.tan(t.angle);e.position.copy(t.position),e.scale.set(u,u,o),e.lookAt(t.target.position),e.updateMatrixWorld();const c=e.material.uniforms;c.uColor.value.set(r),c.uCandela.value=n,c.uScatter.value=a,c.uLength.value=o,c.uRadius.value=u}static airCone(){if(i.airGeometry)return i.airGeometry;const e=24,t=new Float32Array((e+1)*3);for(let a=0;a<e;a++){const o=a/e*Math.PI*2;t.set([Math.cos(o),Math.sin(o),1],(a+1)*3)}const r=[];for(let a=0;a<e;a++)r.push(0,1+a,1+(a+1)%e);const n=new C;return n.setAttribute("position",new E(t,3)),n.setIndex(r),i.airGeometry=n,n}static airMaterial(){return new L({transparent:!0,depthWrite:!1,depthTest:!0,blending:I,side:R,uniforms:{uColor:{value:new x(1,1,1)},uCandela:{value:0},uScatter:{value:0},uLength:{value:90},uRadius:{value:20}},vertexShader:`
1
+ import{ci as A,b2 as g,V as P,cj as m,bk as C,bl as E,bK as L,bB as x,bn as R,bo as I}from"./rr0-sighting-editor.mjs";class i{constructor(e){this.scene=e}static REAL_BEAMS=4;static LAMPS=2;static DISTANCE_M=500;static AIR_LENGTH_M=90;static CLEAR_AIR_SCATTER_PER_M=2e-4;static SHADOW_MAP_PX=1024;beams=new Map;static airGeometry;has(e){return this.beams.has(e)}get size(){return this.beams.size}lamps(e){return this.beams.get(e)?.lamps??[]}airMeshes(e){return this.beams.get(e)?.air??[]}add(e){if(this.beams.has(e))return!0;if(this.beams.size>=i.REAL_BEAMS)return!1;const t=[],r=[];for(let n=0;n<i.LAMPS;n++){const a=new A(16777215,0,i.DISTANCE_M,Math.PI/8,.5,2);a.castShadow=e==="observer",a.shadow.mapSize.set(i.SHADOW_MAP_PX,i.SHADOW_MAP_PX),a.shadow.camera.near=.4,a.shadow.camera.far=110,a.shadow.bias=-4e-4,a.shadow.normalBias=.04,a.shadow.radius=2,this.scene.add(a),this.scene.add(a.target),t.push(a);const o=new g(i.airCone(),i.airMaterial());o.visible=!1,o.frustumCulled=!1,o.renderOrder=8,o.castShadow=!1,o.receiveShadow=!1,o.name="headlight air",this.scene.add(o),r.push(o)}return this.beams.set(e,{lamps:t,air:r}),!0}remove(e){const t=this.beams.get(e);if(t){for(const r of t.lamps)r.removeFromParent(),r.target.removeFromParent(),r.dispose();for(const r of t.air)r.removeFromParent(),r.material.dispose();this.beams.delete(e)}}clear(e){for(const t of[...this.beams.keys()])e&&t==="observer"||this.remove(t)}dispose(){this.clear(!1),i.airGeometry?.dispose(),i.airGeometry=void 0}aim(e,t,r,n,a,o,u){const c=this.beams.get(e),b=Math.max(u,i.CLEAR_AIR_SCATTER_PER_M);if(!c)return;const l=m.BEAMS[t],v=new P(-n.z,0,n.x),w=e==="observer"&&l!==void 0;c.lamps.forEach((s,d)=>{if(!l){s.intensity=0,c.air[d].visible=!1,s.shadow.autoUpdate=!1;return}const f=d===0?-1:1,h=l.pitchDeg*Math.PI/180,p=l.candela*m.DISPLAY_GAIN*o/c.lamps.length;s.color.set(l.color),s.intensity=p,s.angle=l.halfAngleDeg*Math.PI/180,s.penumbra=l.penumbra,w?(s.shadow.autoUpdate||(s.shadow.needsUpdate=!0),s.shadow.autoUpdate=!0):s.shadow.autoUpdate=!1,s.position.copy(r).addScaledVector(v,f*a);const M=n.clone().addScaledVector(v,-f*Math.tan(m.TOE_IN_DEG*Math.PI/180)).normalize();s.target.position.set(s.position.x+M.x*Math.cos(h)*50,s.position.y-Math.sin(h)*50,s.position.z+M.z*Math.cos(h)*50),s.target.updateMatrixWorld(),this.aimAir(c.air[d],s,l.color,p,b)})}aimAir(e,t,r,n,a){if(e.visible=a*n>1e-4,!e.visible)return;const o=i.AIR_LENGTH_M,u=o*Math.tan(t.angle);e.position.copy(t.position),e.scale.set(u,u,o),e.lookAt(t.target.position),e.updateMatrixWorld();const c=e.material.uniforms;c.uColor.value.set(r),c.uCandela.value=n,c.uScatter.value=a,c.uLength.value=o,c.uRadius.value=u}static airCone(){if(i.airGeometry)return i.airGeometry;const e=24,t=new Float32Array((e+1)*3);for(let a=0;a<e;a++){const o=a/e*Math.PI*2;t.set([Math.cos(o),Math.sin(o),1],(a+1)*3)}const r=[];for(let a=0;a<e;a++)r.push(0,1+a,1+(a+1)%e);const n=new C;return n.setAttribute("position",new E(t,3)),n.setIndex(r),i.airGeometry=n,n}static airMaterial(){return new L({transparent:!0,depthWrite:!1,depthTest:!0,blending:I,side:R,uniforms:{uColor:{value:new x(1,1,1)},uCandela:{value:0},uScatter:{value:0},uLength:{value:90},uRadius:{value:20}},vertexShader:`
2
2
  varying vec3 vLocal;
3
3
  varying vec3 vNormalView;
4
4
  varying vec3 vViewDir;
@@ -1 +1 @@
1
- import{aC as n,bD as c}from"./rr0-sighting-editor.mjs";import{N as p}from"./NearestApproach-pefE2Svz.js";const l=-6,u=150;class o{about="temporal";async assess(e){const t=o.daylight(e),i=e.decor.map((s,r)=>({object:s,index:r})).filter(({object:s})=>s.kind==="entity"),a=p.of(e),d=a!==void 0&&a.m<=u;return{verdict:i.length>0?"ce3":d?"ce1":t===void 0?void 0:t?"dd":"nl",criteria:[{id:"entities",basis:i.length>0?"stated":void 0,paths:i.map(({index:s})=>`decor.${s}`)},{id:"traces",paths:[],unsupported:!0},{id:"proximity",basis:a?.basis,paths:a?.paths??[]},{id:"radar",paths:[],unsupported:!0},{id:"daylight",basis:t===void 0?void 0:"derived",paths:t===void 0?[]:["time","place"]}]}}static daylight(e){const t=e.event.place?.[0],i=e.event.time;if(!t||!i)return;const a=n(i,t.lng,e.event.utcOffsetHours);if(a)return c("Sun",a,{lat:t.lat,lng:t.lng,elevationM:0}).altitudeDeg>l}}export{o as HynekAssessor};
1
+ import{aI as n,bJ as c}from"./rr0-sighting-editor.mjs";import{N as p}from"./NearestApproach-C_8Uvp6i.js";const l=-6,u=150;class o{about="temporal";async assess(e){const t=o.daylight(e),i=e.decor.map((s,r)=>({object:s,index:r})).filter(({object:s})=>s.kind==="entity"),a=p.of(e),d=a!==void 0&&a.m<=u;return{verdict:i.length>0?"ce3":d?"ce1":t===void 0?void 0:t?"dd":"nl",criteria:[{id:"entities",basis:i.length>0?"stated":void 0,paths:i.map(({index:s})=>`decor.${s}`)},{id:"traces",paths:[],unsupported:!0},{id:"proximity",basis:a?.basis,paths:a?.paths??[]},{id:"radar",paths:[],unsupported:!0},{id:"daylight",basis:t===void 0?void 0:"derived",paths:t===void 0?[]:["time","place"]}]}}static daylight(e){const t=e.event.place?.[0],i=e.event.time;if(!t||!i)return;const a=n(i,t.lng,e.event.utcOffsetHours);if(a)return c("Sun",a,{lat:t.lat,lng:t.lng,elevationM:0}).altitudeDeg>l}}export{o as HynekAssessor};