@rr0/ufoathome 0.192.1 → 0.193.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.
- package/dist-embed-interview/rr0-interview.mjs +3 -3
- package/dist-embed-scene/rr0-scene.mjs +306 -306
- package/dist-embed-sighting/{CaseReportExport-BW8-bkTQ.js → CaseReportExport-CYeoYzU0.js} +1 -1
- package/dist-embed-sighting/rr0-sighting.mjs +344 -329
- package/dist-embed-sighting-editor/{AdsbLolArchiveProvider-BrZzIuec.js → AdsbLolArchiveProvider--KjPxNqw.js} +1 -1
- package/dist-embed-sighting-editor/{BallesterGuaspAssessor-CXvIvYxV.js → BallesterGuaspAssessor-BTmq0r-G.js} +1 -1
- package/dist-embed-sighting-editor/{BeamEditor-5-OlhNfL.js → BeamEditor-CI8-9VOc.js} +1 -1
- package/dist-embed-sighting-editor/{BeamSystem-BGdR-Xez.js → BeamSystem-odg570aR.js} +1 -1
- package/dist-embed-sighting-editor/BirdEditor-DV3ndYff.js +16 -0
- package/dist-embed-sighting-editor/{BirdFlock-DtshFXGT.js → BirdFlock-O7K_g8y7.js} +1 -1
- package/dist-embed-sighting-editor/{BodyEditor-Dn5HrH2t.js → BodyEditor-COLTBHzX.js} +1 -1
- package/dist-embed-sighting-editor/{CaseEditorMessages_en-DrJY0M8h.js → CaseEditorMessages_en-CoFukfwf.js} +1 -1
- package/dist-embed-sighting-editor/{CaseEditorMessages_es-j8EeOBq6.js → CaseEditorMessages_es-DZptbzB7.js} +1 -1
- package/dist-embed-sighting-editor/{CaseEditorMessages_fr-BkwEF9mu.js → CaseEditorMessages_fr-DXl2GNmR.js} +1 -1
- package/dist-embed-sighting-editor/{CaseEditorMessages_it-d3Z0PBEw.js → CaseEditorMessages_it-ss10VmRM.js} +1 -1
- package/dist-embed-sighting-editor/CaseElement-Bo31UxpS.js +100 -0
- package/dist-embed-sighting-editor/CaseMessages_en-BbbbikHH.js +1 -0
- package/dist-embed-sighting-editor/CaseMessages_es-AHBxl8Ka.js +1 -0
- package/dist-embed-sighting-editor/CaseMessages_fr-CD33PQCH.js +1 -0
- package/dist-embed-sighting-editor/CaseMessages_it-DyMACGSU.js +1 -0
- package/dist-embed-sighting-editor/{CaseReportExport-BfQWru8L.js → CaseReportExport-DpsJ5_r9.js} +2 -2
- package/dist-embed-sighting-editor/{ContrailSystem-BTVyJpmn.js → ContrailSystem-BddkU7fj.js} +1 -1
- package/dist-embed-sighting-editor/{ControlPasses-DiQAXMzD.js → ControlPasses-CNlCUT1L.js} +1 -1
- package/dist-embed-sighting-editor/{CoverageAssessor-CJQzNdyr.js → CoverageAssessor-DjY8iKp5.js} +1 -1
- package/dist-embed-sighting-editor/DroneEditor-DRsM2ash.js +16 -0
- package/dist-embed-sighting-editor/{DroneFlight-tXCk1Tg1.js → DroneFlight-Fr4Vgso3.js} +1 -1
- package/dist-embed-sighting-editor/{Flightradar24Provider-DUVcPAF2.js → Flightradar24Provider-BxeduRam.js} +1 -1
- package/dist-embed-sighting-editor/GLTFLoader-C6nlGTTi.js +1 -0
- package/dist-embed-sighting-editor/{GenerativeKitMessages-I8xH2ec9.js → GenerativeKitMessages-B8L7U7gD.js} +1 -1
- package/dist-embed-sighting-editor/{GeoExportTexts-DAllttgw.js → GeoExportTexts-DrGdI2OF.js} +1 -1
- package/dist-embed-sighting-editor/{GeoJsonExport-_yjIEd4F.js → GeoJsonExport-BZ-0v8fM.js} +1 -1
- package/dist-embed-sighting-editor/GeographicFigures-DqhWddS9.js +1 -0
- package/dist-embed-sighting-editor/{HeadlightSystem-DRq40K7R.js → HeadlightSystem-DI5wHYZu.js} +1 -1
- package/dist-embed-sighting-editor/{HynekAssessor-PxE7JR1h.js → HynekAssessor-DlXalbph.js} +1 -1
- package/dist-embed-sighting-editor/InterviewEditorElement-Bbkze5KE.js +240 -0
- package/dist-embed-sighting-editor/InterviewElement-B3tm7y49.js +31 -0
- package/dist-embed-sighting-editor/{KmlExport-dpml2tIJ.js → KmlExport-Bh4eTycx.js} +1 -1
- package/dist-embed-sighting-editor/LanternEditor-M887ltwe.js +24 -0
- package/dist-embed-sighting-editor/{LaserBeam-CadJcSMd.js → LaserBeam-Drpkr84G.js} +1 -1
- package/dist-embed-sighting-editor/LaunchEditor-BjAk4XZR.js +22 -0
- package/dist-embed-sighting-editor/{LaunchPlume-C7My5ccR.js → LaunchPlume-CrzPcqw7.js} +1 -1
- package/dist-embed-sighting-editor/{LaunchSimulation-45Z9GUBF.js → LaunchSimulation-C1ZWpKZT.js} +1 -1
- package/dist-embed-sighting-editor/{ModelSource-CzGHu4XS.js → ModelSource-Bko_3OJt.js} +1 -1
- package/dist-embed-sighting-editor/{ModelThumbnails-CNO_j-KM.js → ModelThumbnails-DSshyLu2.js} +1 -1
- package/dist-embed-sighting-editor/{ModelViewer-yfIxofpG.js → ModelViewer-_yhAYvNy.js} +1 -1
- package/dist-embed-sighting-editor/{ModuleConformance-C9DED8Lk.js → ModuleConformance-B6iFVb8X.js} +2 -2
- package/dist-embed-sighting-editor/{ModuleSession-Cxe0BJue.js → ModuleSession-jKFl1FMo.js} +3 -3
- package/dist-embed-sighting-editor/ModuleThree-Fvr5G-Yh.js +1 -0
- package/dist-embed-sighting-editor/{ModulesPanelElement-DgbOYqaS.js → ModulesPanelElement-VPRCdjmv.js} +3 -3
- package/dist-embed-sighting-editor/{NearestApproach-EbQIYGTt.js → NearestApproach-O8k2n_qL.js} +1 -1
- package/dist-embed-sighting-editor/PictureRegistration-DBBH_E6I.js +1 -0
- package/dist-embed-sighting-editor/{PoherAssessor-BisQ5ybV.js → PoherAssessor-sTJEnlmb.js} +1 -1
- package/dist-embed-sighting-editor/{RailwaySystem-CIAIBvLT.js → RailwaySystem-BZqNSSFA.js} +1 -1
- package/dist-embed-sighting-editor/ReentryEditor-DfDGpL5C.js +28 -0
- package/dist-embed-sighting-editor/{ReentrySimulation-Crd-CW_o.js → ReentrySimulation-BuUK0niI.js} +1 -1
- package/dist-embed-sighting-editor/{ReferenceSystem-DUIJceGg.js → ReferenceSystem-DvcQp167.js} +1 -1
- package/dist-embed-sighting-editor/{RoadMarkings-D9-6Cy9S.js → RoadMarkings-BGK7ToZP.js} +1 -1
- package/dist-embed-sighting-editor/SightingEditorMessages_en-CTQYcybj.js +12 -0
- package/dist-embed-sighting-editor/SightingEditorMessages_es-D-ASD5a3.js +12 -0
- package/dist-embed-sighting-editor/SightingEditorMessages_fr-DjUByAq4.js +12 -0
- package/dist-embed-sighting-editor/SightingEditorMessages_it-Eat0U-4p.js +12 -0
- package/dist-embed-sighting-editor/SightingElement-FJvhqoCj.js +693 -0
- package/dist-embed-sighting-editor/SightingLabels_en-oIpytoq_.js +1 -0
- package/dist-embed-sighting-editor/SightingLabels_es-DUh1CTXl.js +1 -0
- package/dist-embed-sighting-editor/SightingLabels_fr-D69zENbW.js +1 -0
- package/dist-embed-sighting-editor/SightingLabels_it-COLZ2Qth.js +1 -0
- package/dist-embed-sighting-editor/SightingMessages_en-CYzanHjT.js +1 -0
- package/dist-embed-sighting-editor/SightingMessages_es-hjvESK6f.js +1 -0
- package/dist-embed-sighting-editor/SightingMessages_fr-BtfWbIP7.js +1 -0
- package/dist-embed-sighting-editor/SightingMessages_it-Bqm4pewZ.js +1 -0
- package/dist-embed-sighting-editor/{SkyLantern-De_MXfQz.js → SkyLantern-B7UlFgmB.js} +1 -1
- package/dist-embed-sighting-editor/{TraceSystem-Ba5H90GB.js → TraceSystem-vZF4B5EC.js} +2 -2
- package/dist-embed-sighting-editor/{UfoMessages_en-FAvzKxmR.js → UfoMessages_en-JeMK-39o.js} +1 -1
- package/dist-embed-sighting-editor/VideoButton-Kxg7pF1Y.js +1 -0
- package/dist-embed-sighting-editor/{WaterSystem-Dpdw46hF.js → WaterSystem-DSWmZbiL.js} +2 -2
- package/dist-embed-sighting-editor/{interviewImport-CgWyTdKb.js → interviewImport-BlSMFEw_.js} +1 -1
- package/dist-embed-sighting-editor/interviewJson-CsMHIcZ-.js +8 -0
- package/dist-embed-sighting-editor/rr0-sighting-editor.mjs +439 -392
- package/dist-embed-sighting-editor/{surroundingsSources-YIawBCws.js → surroundingsSources-z7680fTA.js} +1 -1
- package/dist-embed-sighting-editor/{trafficRuntime-DwnTE9-7.js → trafficRuntime-C5BXL-G6.js} +1 -1
- package/dist-embed-ufoathome/Account-C4jhsVtN.js +1 -0
- package/dist-embed-ufoathome/AdsbLolArchiveProvider-886uuL_s.js +1 -0
- package/dist-embed-ufoathome/AssemblyAiTranscriptionProvider-o2kkPD5o.js +1 -0
- package/dist-embed-ufoathome/BallesterGuaspAssessor-BSKybYn0.js +1 -0
- package/dist-embed-ufoathome/BeamEditor-U2XQEG_6.js +30 -0
- package/dist-embed-ufoathome/BeamEditorMessages_en-DDvPWAdd.js +1 -0
- package/dist-embed-ufoathome/BeamEditorMessages_es-BhCkhUkN.js +1 -0
- package/dist-embed-ufoathome/BeamEditorMessages_fr-CtX6uP-x.js +1 -0
- package/dist-embed-ufoathome/BeamEditorMessages_it-DVweRQFi.js +1 -0
- package/dist-embed-ufoathome/BeamKindMessages_en-5RezNkyz.js +1 -0
- package/dist-embed-ufoathome/BeamKindMessages_es-B5vSWVjK.js +1 -0
- package/dist-embed-ufoathome/BeamKindMessages_fr--28-36OI.js +1 -0
- package/dist-embed-ufoathome/BeamKindMessages_it-X53Fuf2U.js +1 -0
- package/dist-embed-ufoathome/BeamParameterTexts_en-DZB75ouZ.js +1 -0
- package/dist-embed-ufoathome/BeamParameterTexts_es-AeZmsufG.js +1 -0
- package/dist-embed-ufoathome/BeamParameterTexts_fr-BHG3fW40.js +1 -0
- package/dist-embed-ufoathome/BeamParameterTexts_it-CPwmQX-g.js +1 -0
- package/dist-embed-ufoathome/BeamSystem-eYdKPRQZ.js +1 -0
- package/dist-embed-ufoathome/BirdEditor-6vr7bLHy.js +16 -0
- package/dist-embed-ufoathome/BirdEditorMessages_en-CN1OJud9.js +1 -0
- package/dist-embed-ufoathome/BirdEditorMessages_es-DDEnjRrz.js +1 -0
- package/dist-embed-ufoathome/BirdEditorMessages_fr-hL72V8wm.js +1 -0
- package/dist-embed-ufoathome/BirdEditorMessages_it-BmLyiPYp.js +1 -0
- package/dist-embed-ufoathome/BirdFlock-ByBkJV35.js +1 -0
- package/dist-embed-ufoathome/BirdKindMessages_en-c_-L7frF.js +1 -0
- package/dist-embed-ufoathome/BirdKindMessages_es-8Zo2t0o4.js +1 -0
- package/dist-embed-ufoathome/BirdKindMessages_fr-C1TuqqEj.js +1 -0
- package/dist-embed-ufoathome/BirdKindMessages_it-DQZcrCkf.js +1 -0
- package/dist-embed-ufoathome/BirdParameterTexts_en-C6FkYUww.js +1 -0
- package/dist-embed-ufoathome/BirdParameterTexts_es-T8JyeNlI.js +1 -0
- package/dist-embed-ufoathome/BirdParameterTexts_fr-BiTR-olu.js +1 -0
- package/dist-embed-ufoathome/BirdParameterTexts_it-oQY4DX6B.js +1 -0
- package/dist-embed-ufoathome/BodyEditor-CRlKW7yl.js +28 -0
- package/dist-embed-ufoathome/BodyEditorMessages_en-CckxSS1L.js +1 -0
- package/dist-embed-ufoathome/BodyEditorMessages_es-B8GlFFBo.js +1 -0
- package/dist-embed-ufoathome/BodyEditorMessages_fr-638ypdqf.js +1 -0
- package/dist-embed-ufoathome/BodyEditorMessages_it-SKpMkHFI.js +1 -0
- package/dist-embed-ufoathome/BodyParameterTexts_en-CKiFdpaz.js +1 -0
- package/dist-embed-ufoathome/BodyParameterTexts_es-DT9XO1Hc.js +1 -0
- package/dist-embed-ufoathome/BodyParameterTexts_fr-B5jLsE0g.js +1 -0
- package/dist-embed-ufoathome/BodyParameterTexts_it-iyJGx4Ta.js +1 -0
- package/dist-embed-ufoathome/BrowserWhisperProvider-Dn44ZE45.js +1 -0
- package/dist-embed-ufoathome/CaseEditorElement-Ds4yB5UC.js +3033 -0
- package/dist-embed-ufoathome/CaseEditorMessages_en-CoFukfwf.js +1 -0
- package/dist-embed-ufoathome/CaseEditorMessages_es-DZptbzB7.js +1 -0
- package/dist-embed-ufoathome/CaseEditorMessages_fr-DXl2GNmR.js +1 -0
- package/dist-embed-ufoathome/CaseEditorMessages_it-ss10VmRM.js +1 -0
- package/dist-embed-ufoathome/CaseElement-fKdvuMAp.js +100 -0
- package/dist-embed-ufoathome/CaseExportMessages_en-jHlu58Y7.js +1 -0
- package/dist-embed-ufoathome/CaseExportMessages_es-dCQQFgjq.js +1 -0
- package/dist-embed-ufoathome/CaseExportMessages_fr-sDfEgjWg.js +1 -0
- package/dist-embed-ufoathome/CaseExportMessages_it-BJaglZtP.js +1 -0
- package/dist-embed-ufoathome/CaseMessages_en-BbbbikHH.js +1 -0
- package/dist-embed-ufoathome/CaseMessages_es-AHBxl8Ka.js +1 -0
- package/dist-embed-ufoathome/CaseMessages_fr-CD33PQCH.js +1 -0
- package/dist-embed-ufoathome/CaseMessages_it-DyMACGSU.js +1 -0
- package/dist-embed-ufoathome/CaseReportExport-Dy1xmhTI.js +66 -0
- package/dist-embed-ufoathome/CaseReportTexts_en-DlN7p1pC.js +1 -0
- package/dist-embed-ufoathome/CaseReportTexts_es-CncAEaey.js +1 -0
- package/dist-embed-ufoathome/CaseReportTexts_fr-B5nP6RlP.js +1 -0
- package/dist-embed-ufoathome/CaseReportTexts_it-Dc-oPmXB.js +1 -0
- package/dist-embed-ufoathome/CaseTimeline-Dq1H2Ucy.js +142 -0
- package/dist-embed-ufoathome/ClaudeNarrativeTexts_en-CBLJZ7b6.js +1 -0
- package/dist-embed-ufoathome/ClaudeNarrativeTexts_es-BDV0GimU.js +1 -0
- package/dist-embed-ufoathome/ClaudeNarrativeTexts_fr-DiKzTF9T.js +1 -0
- package/dist-embed-ufoathome/ClaudeNarrativeTexts_it-DwxjRDVG.js +1 -0
- package/dist-embed-ufoathome/CloudEditorMessages_en-SmcRKW1O.js +1 -0
- package/dist-embed-ufoathome/CloudEditorMessages_es-DFCuS9Qg.js +1 -0
- package/dist-embed-ufoathome/CloudEditorMessages_fr-SvL-CR04.js +1 -0
- package/dist-embed-ufoathome/CloudEditorMessages_it-BvfiHWV9.js +1 -0
- package/dist-embed-ufoathome/CloudParameterTexts_en-NIa0gfgA.js +1 -0
- package/dist-embed-ufoathome/CloudParameterTexts_es-DXu4T30p.js +1 -0
- package/dist-embed-ufoathome/CloudParameterTexts_fr-Bv-jc2dq.js +1 -0
- package/dist-embed-ufoathome/CloudParameterTexts_it-C3RrkRwI.js +1 -0
- package/dist-embed-ufoathome/ContrailGrowth-DwHS8If9.js +1 -0
- package/dist-embed-ufoathome/ContrailSystem-pwF1XPex.js +1 -0
- package/dist-embed-ufoathome/ControlPasses-ApTdQK9r.js +29 -0
- package/dist-embed-ufoathome/CoverageAssessor-DFMo5umu.js +1 -0
- package/dist-embed-ufoathome/Decor-Dn-cvniW.js +1 -0
- package/dist-embed-ufoathome/DecorParameterTexts_en-idbdHsFG.js +1 -0
- package/dist-embed-ufoathome/DecorParameterTexts_es-CIkkLQc2.js +1 -0
- package/dist-embed-ufoathome/DecorParameterTexts_fr-D9GeuW_Y.js +1 -0
- package/dist-embed-ufoathome/DecorParameterTexts_it-v7TBrnsr.js +1 -0
- package/dist-embed-ufoathome/DecoyFlare-DUt1_LcW.js +1 -0
- package/dist-embed-ufoathome/DroneEditor-C3SH8yYq.js +16 -0
- package/dist-embed-ufoathome/DroneEditorMessages_en-BViHK30c.js +1 -0
- package/dist-embed-ufoathome/DroneEditorMessages_es-D6bhIOAa.js +1 -0
- package/dist-embed-ufoathome/DroneEditorMessages_fr-CvV0RyOT.js +1 -0
- package/dist-embed-ufoathome/DroneEditorMessages_it-CYi-jmVN.js +1 -0
- package/dist-embed-ufoathome/DroneFlight-CGNIh9XS.js +1 -0
- package/dist-embed-ufoathome/DroneKindMessages_en-CLygXcsv.js +1 -0
- package/dist-embed-ufoathome/DroneKindMessages_es-B9XFRYnQ.js +1 -0
- package/dist-embed-ufoathome/DroneKindMessages_fr-CAX15_pk.js +1 -0
- package/dist-embed-ufoathome/DroneKindMessages_it-CSGsCaJQ.js +1 -0
- package/dist-embed-ufoathome/DroneParameterTexts_en-sL1dR2RG.js +1 -0
- package/dist-embed-ufoathome/DroneParameterTexts_es-Bg8_8XVE.js +1 -0
- package/dist-embed-ufoathome/DroneParameterTexts_fr-B8Ym7Yz6.js +1 -0
- package/dist-embed-ufoathome/DroneParameterTexts_it-DfvWjvoc.js +1 -0
- package/dist-embed-ufoathome/FilmChrome-DYiyzoB_.js +1 -0
- package/dist-embed-ufoathome/FlareKindMessages_en-j3CY_TxX.js +1 -0
- package/dist-embed-ufoathome/FlareKindMessages_es-CZgrFIOO.js +1 -0
- package/dist-embed-ufoathome/FlareKindMessages_fr-B2MezoN2.js +1 -0
- package/dist-embed-ufoathome/FlareKindMessages_it-CmZmb3RP.js +1 -0
- package/dist-embed-ufoathome/Flightradar24Provider-BT0RC4qJ.js +1 -0
- package/dist-embed-ufoathome/GLTFLoader-DpXgTKpb.js +1 -0
- package/dist-embed-ufoathome/GenerativeKit-BmhvjjzB.js +9 -0
- package/dist-embed-ufoathome/GenerativeKitMessages-BwG7cWZX.js +1 -0
- package/dist-embed-ufoathome/GenerativeKitMessages_en-BY4B6yas.js +34 -0
- package/dist-embed-ufoathome/GenerativeKitMessages_es-_iYkoRhK.js +34 -0
- package/dist-embed-ufoathome/GenerativeKitMessages_fr-BY5yUJwK.js +34 -0
- package/dist-embed-ufoathome/GenerativeKitMessages_it-DAgB31P1.js +34 -0
- package/dist-embed-ufoathome/GeoExportTexts-3a51cuxQ.js +1 -0
- package/dist-embed-ufoathome/GeoExportTexts_en-Dq0fSJQp.js +1 -0
- package/dist-embed-ufoathome/GeoExportTexts_es-CoVHdOo0.js +1 -0
- package/dist-embed-ufoathome/GeoExportTexts_fr-DVAMpZIR.js +1 -0
- package/dist-embed-ufoathome/GeoExportTexts_it-Bh1uJBQp.js +1 -0
- package/dist-embed-ufoathome/GeoJsonExport-bpBmwqb7.js +2 -0
- package/dist-embed-ufoathome/GeoJsonImport-CIftC0ws.js +1 -0
- package/dist-embed-ufoathome/GeographicFigures-B0Bqeh10.js +1 -0
- package/dist-embed-ufoathome/GhostSearchView-Dlhj3xWa.js +1 -0
- package/dist-embed-ufoathome/HeadlightSystem-CMT7XiIH.js +34 -0
- package/dist-embed-ufoathome/HynekAssessor-qlHGyZnD.js +1 -0
- package/dist-embed-ufoathome/InterviewEditorElement-B33-sGHI.js +240 -0
- package/dist-embed-ufoathome/InterviewElement-CiZNhb70.js +31 -0
- package/dist-embed-ufoathome/InterviewMedia-CvAxC62V.js +1 -0
- package/dist-embed-ufoathome/InterviewMessages_en-ru7GkZlQ.js +1 -0
- package/dist-embed-ufoathome/InterviewMessages_es-DkJurNrG.js +1 -0
- package/dist-embed-ufoathome/InterviewMessages_fr-DAYgf8Ms.js +1 -0
- package/dist-embed-ufoathome/InterviewMessages_it-6lenkmSg.js +1 -0
- package/dist-embed-ufoathome/KmlExport-gFuPcL9A.js +19 -0
- package/dist-embed-ufoathome/KmlImport-BMAfiqoV.js +1 -0
- package/dist-embed-ufoathome/LanternEditor-BaRDgTw-.js +24 -0
- package/dist-embed-ufoathome/LanternEditorMessages_en-DaT3UNfD.js +1 -0
- package/dist-embed-ufoathome/LanternEditorMessages_es-TDV5lKeJ.js +1 -0
- package/dist-embed-ufoathome/LanternEditorMessages_fr-9mByTFMG.js +1 -0
- package/dist-embed-ufoathome/LanternEditorMessages_it-MRkJnDQp.js +1 -0
- package/dist-embed-ufoathome/LanternKindMessages_en-CQXdJ-k6.js +1 -0
- package/dist-embed-ufoathome/LanternKindMessages_es-BOO6kPjs.js +1 -0
- package/dist-embed-ufoathome/LanternKindMessages_fr-D7tQa_tQ.js +1 -0
- package/dist-embed-ufoathome/LanternKindMessages_it-B8J-29Mj.js +1 -0
- package/dist-embed-ufoathome/LanternParameterTexts_en-CcnGd8UH.js +1 -0
- package/dist-embed-ufoathome/LanternParameterTexts_es-CUTgNutZ.js +1 -0
- package/dist-embed-ufoathome/LanternParameterTexts_fr-P2JwYOUy.js +1 -0
- package/dist-embed-ufoathome/LanternParameterTexts_it-CzNnIUrX.js +1 -0
- package/dist-embed-ufoathome/LaserBeam-BKuiBaAN.js +1 -0
- package/dist-embed-ufoathome/LaunchEditor-CFsq327k.js +22 -0
- package/dist-embed-ufoathome/LaunchEditorMessages_en-BnzNAYW9.js +1 -0
- package/dist-embed-ufoathome/LaunchEditorMessages_es-BE0dEl7I.js +1 -0
- package/dist-embed-ufoathome/LaunchEditorMessages_fr-Ds_VOB8c.js +1 -0
- package/dist-embed-ufoathome/LaunchEditorMessages_it-DPQaR8HY.js +1 -0
- package/dist-embed-ufoathome/LaunchKindMessages_en-Batvnyw3.js +1 -0
- package/dist-embed-ufoathome/LaunchKindMessages_es-KYyQ9gbu.js +1 -0
- package/dist-embed-ufoathome/LaunchKindMessages_fr-CoojboIk.js +1 -0
- package/dist-embed-ufoathome/LaunchKindMessages_it-9HA3cjgP.js +1 -0
- package/dist-embed-ufoathome/LaunchParameterTexts_en-DvrCwbDM.js +1 -0
- package/dist-embed-ufoathome/LaunchParameterTexts_es--RUAegVp.js +1 -0
- package/dist-embed-ufoathome/LaunchParameterTexts_fr-Bh_1zVzy.js +1 -0
- package/dist-embed-ufoathome/LaunchParameterTexts_it-CWDx9nJy.js +1 -0
- package/dist-embed-ufoathome/LaunchPlume-p7V7Yg6y.js +1 -0
- package/dist-embed-ufoathome/LaunchSimulation-3vTsM_A7.js +1 -0
- package/dist-embed-ufoathome/ModelSource-Cd7ByLN1.js +1 -0
- package/dist-embed-ufoathome/ModelThumbnails-CASGbavJ.js +1 -0
- package/dist-embed-ufoathome/ModelViewer-DEaj6_6R.js +1 -0
- package/dist-embed-ufoathome/ModuleConformance-CSg3Ac74.js +2 -0
- package/dist-embed-ufoathome/ModuleSession-BaaLmhnz.js +3 -0
- package/dist-embed-ufoathome/ModuleThree-DF_JfVBK.js +1 -0
- package/dist-embed-ufoathome/ModulesPanelElement-BqF6eK1X.js +15 -0
- package/dist-embed-ufoathome/ModulesPanelMessages_en-DuwrY3Pm.js +1 -0
- package/dist-embed-ufoathome/ModulesPanelMessages_es-Bq5X-XuT.js +1 -0
- package/dist-embed-ufoathome/ModulesPanelMessages_fr-B8cSDc6o.js +1 -0
- package/dist-embed-ufoathome/ModulesPanelMessages_it-BdC626aJ.js +1 -0
- package/dist-embed-ufoathome/NearestApproach-DnGPayAo.js +1 -0
- package/dist-embed-ufoathome/Obstacles-v9SkfBD7.js +1 -0
- package/dist-embed-ufoathome/OffThreadTracer-ByPLWaYU.js +6 -0
- package/dist-embed-ufoathome/OpenAiTranscriptionProvider-DDW446tK.js +1 -0
- package/dist-embed-ufoathome/PanoramaxPictures-CELY3Ecc.js +1 -0
- package/dist-embed-ufoathome/ParameterForm-DfpJQGku.js +91 -0
- package/dist-embed-ufoathome/PerceptionMessages_en-B2O6DR64.js +1 -0
- package/dist-embed-ufoathome/PerceptionMessages_es-BmkP6OqD.js +1 -0
- package/dist-embed-ufoathome/PerceptionMessages_fr-B59TnGBC.js +1 -0
- package/dist-embed-ufoathome/PerceptionMessages_it-DPlxRmxu.js +1 -0
- package/dist-embed-ufoathome/PictureFetch-C3wgf1ZV.js +1 -0
- package/dist-embed-ufoathome/PictureRegistration-BFn75haQ.js +1 -0
- package/dist-embed-ufoathome/PoherAssessor-DRTvhhZp.js +1 -0
- package/dist-embed-ufoathome/RailwaySystem-CUJHpW5y.js +41 -0
- package/dist-embed-ufoathome/ReadingCheckTexts_en-eq6teExJ.js +1 -0
- package/dist-embed-ufoathome/ReadingCheckTexts_es-CR_JJZMV.js +1 -0
- package/dist-embed-ufoathome/ReadingCheckTexts_fr-pcDleIvY.js +1 -0
- package/dist-embed-ufoathome/ReadingCheckTexts_it-MFKeoXnq.js +1 -0
- package/dist-embed-ufoathome/ReadingSensitivityMessages_en-ChQHFyxb.js +1 -0
- package/dist-embed-ufoathome/ReadingSensitivityMessages_es-BbFqHsvR.js +1 -0
- package/dist-embed-ufoathome/ReadingSensitivityMessages_fr-Dl4a8udu.js +1 -0
- package/dist-embed-ufoathome/ReadingSensitivityMessages_it-CwiJfUo_.js +1 -0
- package/dist-embed-ufoathome/RecordingIssue-BlWT8Xsu.js +3 -0
- package/dist-embed-ufoathome/ReentryArchive-CeXHrU7L.js +1 -0
- package/dist-embed-ufoathome/ReentryEditor-DynYe51Y.js +28 -0
- package/dist-embed-ufoathome/ReentryEditorMessages_en-BmTZMr-m.js +1 -0
- package/dist-embed-ufoathome/ReentryEditorMessages_es-edid__Jo.js +1 -0
- package/dist-embed-ufoathome/ReentryEditorMessages_fr-DHbcY0tN.js +1 -0
- package/dist-embed-ufoathome/ReentryEditorMessages_it-CIzkIU4G.js +1 -0
- package/dist-embed-ufoathome/ReentryKindMessages_en-BGZgya17.js +1 -0
- package/dist-embed-ufoathome/ReentryKindMessages_es--UxzPNfj.js +1 -0
- package/dist-embed-ufoathome/ReentryKindMessages_fr-7mer-cdj.js +1 -0
- package/dist-embed-ufoathome/ReentryKindMessages_it-BBVQXE1M.js +1 -0
- package/dist-embed-ufoathome/ReentryParameterTexts_en-5BOfwCsS.js +1 -0
- package/dist-embed-ufoathome/ReentryParameterTexts_es-ze1-U4jB.js +1 -0
- package/dist-embed-ufoathome/ReentryParameterTexts_fr-BgUJROXF.js +1 -0
- package/dist-embed-ufoathome/ReentryParameterTexts_it-MTb9Vuq0.js +1 -0
- package/dist-embed-ufoathome/ReentrySimulation-BTcyhCCG.js +1 -0
- package/dist-embed-ufoathome/ReentryTypeNames_en-CBu890Bd.js +1 -0
- package/dist-embed-ufoathome/ReentryTypeNames_es-_LnketjJ.js +1 -0
- package/dist-embed-ufoathome/ReentryTypeNames_fr-BXq89mrz.js +1 -0
- package/dist-embed-ufoathome/ReentryTypeNames_it-Yfq-TDip.js +1 -0
- package/dist-embed-ufoathome/ReferenceSystem-WdAT5UCN.js +1 -0
- package/dist-embed-ufoathome/ReferenceTimeline-2kBldQeG.js +1 -0
- package/dist-embed-ufoathome/RoadMarkings-BsN3rh0W.js +1 -0
- package/dist-embed-ufoathome/SaidPosition-CWiVNaNW.js +4 -0
- package/dist-embed-ufoathome/SatellitePasses-Pfro2-0Z.js +1 -0
- package/dist-embed-ufoathome/SceneNames_en-7OZ7peGc.js +1 -0
- package/dist-embed-ufoathome/SceneNames_es-P5-Mavdi.js +1 -0
- package/dist-embed-ufoathome/SceneNames_fr-qzw0QzD0.js +1 -0
- package/dist-embed-ufoathome/SceneNames_it-Sqf8JFOd.js +1 -0
- package/dist-embed-ufoathome/ShareCodeEditor-DyEYu_9d.js +13 -0
- package/dist-embed-ufoathome/ShareDialogElement-C3HL-Smq.js +9222 -0
- package/dist-embed-ufoathome/ShareMessages_en-B43x8LgJ.js +1 -0
- package/dist-embed-ufoathome/ShareMessages_es-DZCJojSc.js +1 -0
- package/dist-embed-ufoathome/ShareMessages_fr-CzZyVbbX.js +1 -0
- package/dist-embed-ufoathome/ShareMessages_it-C_Z6eDQK.js +1 -0
- package/dist-embed-ufoathome/Sighting-CBpJpdm9.js +1 -0
- package/dist-embed-ufoathome/SightingEditorMessages_en-CTQYcybj.js +12 -0
- package/dist-embed-ufoathome/SightingEditorMessages_es-D-ASD5a3.js +12 -0
- package/dist-embed-ufoathome/SightingEditorMessages_fr-DjUByAq4.js +12 -0
- package/dist-embed-ufoathome/SightingEditorMessages_it-Eat0U-4p.js +12 -0
- package/dist-embed-ufoathome/SightingElement-CexCUTjH.js +693 -0
- package/dist-embed-ufoathome/SightingFileEditor-Cllslp2u.js +8 -0
- package/dist-embed-ufoathome/SightingLabels_en-oIpytoq_.js +1 -0
- package/dist-embed-ufoathome/SightingLabels_es-DUh1CTXl.js +1 -0
- package/dist-embed-ufoathome/SightingLabels_fr-D69zENbW.js +1 -0
- package/dist-embed-ufoathome/SightingLabels_it-COLZ2Qth.js +1 -0
- package/dist-embed-ufoathome/SightingMessages_en-CYzanHjT.js +1 -0
- package/dist-embed-ufoathome/SightingMessages_es-hjvESK6f.js +1 -0
- package/dist-embed-ufoathome/SightingMessages_fr-BtfWbIP7.js +1 -0
- package/dist-embed-ufoathome/SightingMessages_it-Bqm4pewZ.js +1 -0
- package/dist-embed-ufoathome/SkyEventEditorStyle-CvY_AhbI.js +1 -0
- package/dist-embed-ufoathome/SkyLantern-DJT_Ibzh.js +1 -0
- package/dist-embed-ufoathome/TagNames_es-BfnMpc3D.js +1 -0
- package/dist-embed-ufoathome/TagNames_fr-Dnqq6HQ5.js +1 -0
- package/dist-embed-ufoathome/TagNames_it-n6E4EGYO.js +1 -0
- package/dist-embed-ufoathome/TimelineTracks-X_GEZi12.js +35 -0
- package/dist-embed-ufoathome/TraceImport-CntRHXoJ.js +2 -0
- package/dist-embed-ufoathome/TraceSystem-Bm9JDfkW.js +393 -0
- package/dist-embed-ufoathome/TranscriptionAudio-C_xvRUv2.js +5 -0
- package/dist-embed-ufoathome/TranscriptionError-D_TCbYbt.js +1 -0
- package/dist-embed-ufoathome/UfoAtHomeMessages_en-dlx_C679.js +1 -0
- package/dist-embed-ufoathome/UfoAtHomeMessages_es-uLOvtAD0.js +1 -0
- package/dist-embed-ufoathome/UfoAtHomeMessages_fr-LR76-eHS.js +1 -0
- package/dist-embed-ufoathome/UfoAtHomeMessages_it-CQl4uTnG.js +1 -0
- package/dist-embed-ufoathome/UfoMessages_en-D5OYWJ3K.js +1 -0
- package/dist-embed-ufoathome/UfoMessages_es-CO-v8Jl6.js +1 -0
- package/dist-embed-ufoathome/UfoMessages_fr-CGkQBn5r.js +1 -0
- package/dist-embed-ufoathome/UfoMessages_it-BScqxIaH.js +1 -0
- package/dist-embed-ufoathome/VideoButton-CH3rw9kX.js +1 -0
- package/dist-embed-ufoathome/VideoExport-B8ZhHNnd.js +169 -0
- package/dist-embed-ufoathome/VisualAids-DI-hEL46.js +1 -0
- package/dist-embed-ufoathome/WaterSystem-CraSRAgB.js +19 -0
- package/dist-embed-ufoathome/browser-CltifEM0.js +1 -0
- package/dist-embed-ufoathome/caseSchema-ChUB1-9j.js +1 -0
- package/dist-embed-ufoathome/index-C8cdeM8E.js +11 -0
- package/dist-embed-ufoathome/index-DqGmxMZD.js +42 -0
- package/dist-embed-ufoathome/interviewImport-ym5iXO4Z.js +4 -0
- package/{dist-embed-sighting-editor/interviewJson-iURHP4Zk.js → dist-embed-ufoathome/interviewJson-D-i14LTf.js} +1 -1
- package/dist-embed-ufoathome/interviewSchema-Dk0AWHwc.js +1 -0
- package/dist-embed-ufoathome/logo-h2-w4Mwu.png +0 -0
- package/dist-embed-ufoathome/lunar-relief.bin-ByThqxUn.gz +0 -0
- package/dist-embed-ufoathome/node.browser-AK49Qif5.js +1 -0
- package/dist-embed-ufoathome/node.browser-HEqoqodz.js +1 -0
- package/dist-embed-ufoathome/rain-BvWZrB9h.ogg +0 -0
- package/dist-embed-ufoathome/rr0-ufoathome.mjs +159 -0
- package/dist-embed-ufoathome/sightingSchema-CgwoRMl-.js +1 -0
- package/dist-embed-ufoathome/stars-mag7.5-9-BLV2tFmZ.bin +0 -0
- package/dist-embed-ufoathome/stars-mag7.5-B43R6Wvg.bin +0 -0
- package/dist-embed-ufoathome/surroundingsSources-kPwp7ewe.js +1 -0
- package/dist-embed-ufoathome/thunder-DA48qs_v.wav +0 -0
- package/dist-embed-ufoathome/trafficRuntime-DM6gQGDZ.js +2 -0
- package/dist-embed-ufoathome/upperAirSources-BGuLpdwu.js +1 -0
- package/dist-embed-ufoathome/wind-BjklexY7.ogg +0 -0
- package/package.json +9 -6
- package/dist-embed-sighting-editor/BirdEditor-ESUliJEN.js +0 -16
- package/dist-embed-sighting-editor/DroneEditor-DDaJO8FS.js +0 -16
- package/dist-embed-sighting-editor/GLTFLoader-DdijxzcI.js +0 -1
- package/dist-embed-sighting-editor/GeographicFigures-DC6Tw3ja.js +0 -1
- package/dist-embed-sighting-editor/InterviewEditorElement-D-UDHU0L.js +0 -270
- package/dist-embed-sighting-editor/LanternEditor-DDcI5Kv1.js +0 -24
- package/dist-embed-sighting-editor/LaunchEditor-Pkk0K648.js +0 -22
- package/dist-embed-sighting-editor/ModuleThree-DSghL4fp.js +0 -1
- package/dist-embed-sighting-editor/PictureRegistration-CbfytwCX.js +0 -1
- package/dist-embed-sighting-editor/ReentryEditor-NE8z5aZT.js +0 -28
- package/dist-embed-sighting-editor/SightingEditorMessages_en-DSPvgYFi.js +0 -12
- package/dist-embed-sighting-editor/SightingEditorMessages_es-Bl3DipHr.js +0 -12
- package/dist-embed-sighting-editor/SightingEditorMessages_fr-BTmWQX0n.js +0 -12
- package/dist-embed-sighting-editor/SightingEditorMessages_it-lzbDsHjx.js +0 -12
- package/dist-embed-sighting-editor/VideoButton-CqCZ65oK.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{bW as R,aX as l,aW as I}from"./ShareDialogElement-C3HL-Smq.js";import"./rr0-ufoathome.mjs";import"./SaidPosition-CWiVNaNW.js";import"./Sighting-CBpJpdm9.js";import"./VisualAids-DI-hEL46.js";import"./Decor-Dn-cvniW.js";import"./RecordingIssue-BlWT8Xsu.js";import"./Obstacles-v9SkfBD7.js";class T 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 r=this.token();if(!r)return{status:"failed",problem:"credential"};r!==this.tokenOfMemory&&this.forgetAnswers(r);try{const a=await this.snapshotFor(r,t,n,i,o);if(!a)return{status:"failed"};const s=a.flights.slice(0,e.MAX_TRACED),h=await Promise.all(s.map(c=>this.trackOf(r,c))),u=[];return s.forEach((c,f)=>{const S=h[f].filter(p=>p.t>=n&&p.t<=i&&l.groundDistanceKm(t,p)<=o);S.length>0&&u.push({...e.addressOf(c),points:S})}),{status:"found",tracks:u,creditsSpent:this.creditsSpent,partial:{traced:s.length,seen:a.flights.length,moreSeen:a.flights.length>=e.SMALLEST_PLAN_RESULTS,withinKm:a.withinKm}}}catch(a){return{status:"failed",problem:a instanceof T?a.problem:"network",creditsSpent:this.creditsSpent}}}async describe(t){return this.descriptions.get(I.keyOf(t))}static addressOf(t){const n=t.hex?Number.parseInt(t.hex,16):Number.NaN;return Number.isFinite(n)?{icao:n,nonIcao:!1}:{icao:Number.parseInt(t.fr24_id,16),nonIcao:!0}}static boundsAround(t,n){const i=n/e.KM_PER_DEG,o=Math.min(90,t.lat+i),r=Math.max(-90,t.lat-i),a=Math.cos(Math.max(Math.abs(o),Math.abs(r))*Math.PI/180),s=a<1e-6?180:n/(e.KM_PER_DEG*a),h=Math.max(-180,t.lng-s),u=Math.min(180,t.lng+s);return[o,r,h,u].map(c=>c.toFixed(3)).join(",")}forgetAnswers(t){this.tokenOfMemory=t,this.snapshots.length=0,this.tracks.clear(),this.descriptions.clear()}async snapshotFor(t,n,i,o,r){const a=`${n.lat.toFixed(3)},${n.lng.toFixed(3)},${r}`;for(const u of this.snapshots){const c=await u.catch(()=>{});if(c&&c.place===a&&c.t>=i&&c.t<=o)return c}const s=++this.latestQuestion;if(this.settleMs>0&&await new Promise(u=>setTimeout(u,this.settleMs)),s!==this.latestQuestion)return;if(this.creditsSpent+e.WORST_CASE_CREDITS>e.MAX_CREDITS_PER_PAGE)throw new T("budget");const h=this.askSnapshot(t,n,Math.round((i+o)/2),r,a);return this.snapshots.push(h),h.catch(()=>this.snapshots.splice(this.snapshots.indexOf(h),1)),h}async askSnapshot(t,n,i,o,r){const a=[...e.RINGS_KM.filter(c=>c<o),o];let s=[],h=o;for(const c of a)if(h=c,s=await this.flightsWithin(t,n,i,c),s.length>=e.MAX_TRACED)break;const u=c=>l.groundDistanceKm(n,{lat:c.lat,lng:c.lon});return{t:i,place:r,withinKm:h,flights:[...s].sort((c,f)=>u(c)-u(f))}}async flightsWithin(t,n,i,o){const r=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?${r}`)).data??[];this.creditsSpent+=s.length>0?s.length*e.CREDITS_PER_SNAPSHOT_FLIGHT:e.CREDITS_FOR_NOTHING;for(const h of s){const u={type:h.type||void 0,registration:h.reg||void 0};(u.type||u.registration)&&this.descriptions.set(I.keyOf(e.addressOf(h)),u)}return s}trackOf(t,n){let i=this.tracks.get(n.fr24_id);return i||(i=this.get(t,`/flight-tracks?flight_id=${encodeURIComponent(n.fr24_id)}`).then(o=>{const a=(Array.isArray(o)?o:o.data??[]).flatMap(s=>s.tracks??[]);return this.creditsSpent+=a.length>0?e.CREDITS_PER_TRACK:e.CREDITS_FOR_NOTHING,a.filter(s=>s.source?.toUpperCase()!=="ESTIMATED"&&s.alt>0).map(s=>({t:Date.parse(s.timestamp),lat:s.lat,lng:s.lon,altitudeFt:s.alt,groundSpeedKt:s.gspeed,trackDeg:s.track})).sort((s,h)=>s.t-h.t)}),i.catch(()=>this.tracks.delete(n.fr24_id)),this.tracks.set(n.fr24_id,i)),i}async get(t,n){await this.paced();const i=await this.fetchImpl(`${e.API}${n}`,{headers:{Accept:"application/json","Accept-Version":"v1",Authorization:`Bearer ${t}`}});if(!i.ok)throw new T(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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{bX as Le,bY as Q,bZ as he,b_ as Me,b$ as v,c0 as de,b3 as y,ba as pe,b4 as F,c1 as w,bO as U,bF as be,c2 as Se,c3 as ye,b5 as K,c4 as we,b7 as C,bM as me,c5 as Ne,bT as ge,c6 as Ie,c7 as Oe,bj as V,c8 as Ce,c9 as Te,ca as Fe,cb as Pe,cc as He,be as J,bI as Re,cd as Z,ce as ke,cf as De,by as Ge,cg as X,ch as ve,bi as Ee,bE as Ue,bD as G,ci as Ke,bg as Be,cj as je,bb as Ve,ck as Xe,cl as ze,cm as qe,bz as We,b2 as z,b6 as Ye,bw as Qe,cn as Je,co as Ze,cp as $e,cq as en,cr as nn,cs as tn,ct as xe,bn as sn,bP as ne,cu as te,cv as se,cw as ie,cx as re,cy as rn,cz as on,bp as an,bq as cn}from"./ShareDialogElement-C3HL-Smq.js";import"./rr0-ufoathome.mjs";import"./SaidPosition-CWiVNaNW.js";import"./Sighting-CBpJpdm9.js";import"./VisualAids-DI-hEL46.js";import"./Decor-Dn-cvniW.js";import"./RecordingIssue-BlWT8Xsu.js";import"./Obstacles-v9SkfBD7.js";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 Qn 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 bn(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 An(e)}),this.register(function(e){return new _n(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 Sn(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))===_e){try{r[g.KHR_BINARY_GLTF]=new yn(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 wn(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 A(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],w);const l=o.range!==void 0?o.range:0;switch(o.type){case"directional":c=new ye(u),c.target.position.set(0,0,-1),c.add(c.target);break;case"point":c=new Se(u),c.distance=l;break;case"spot":c=new be(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),S(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],w),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=A(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 A(this.parser,n,this.name)!==null?y:null}extendMaterialParams(n,e){const s=A(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 A(this.parser,n,this.name)!==null?y:null}extendMaterialParams(n,e){const s=A(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 A(this.parser,n,this.name)!==null?y:null}extendMaterialParams(n,e){const s=A(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 A(this.parser,n,this.name)!==null?y:null}extendMaterialParams(n,e){const s=A(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],w)}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 A(this.parser,n,this.name)!==null?y:null}extendMaterialParams(n,e){const s=A(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 A(this.parser,n,this.name)!==null?y:null}extendMaterialParams(n,e){const s=A(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],w),Promise.all(t)}}class En{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_IOR}getMaterialType(n){return A(this.parser,n,this.name)!==null?y:null}extendMaterialParams(n,e){const s=A(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 A(this.parser,n,this.name)!==null?y:null}extendMaterialParams(n,e){const s=A(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],w),s.specularColorTexture!==void 0&&t.push(this.parser.assignTexture(e,"specularColorMap",s.specularColorTexture,U)),Promise.all(t)}}class _n{constructor(n){this.parser=n,this.name=g.EXT_MATERIALS_BUMP}getMaterialType(n){return A(this.parser,n,this.name)!==null?y:null}extendMaterialParams(n,e){const s=A(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 An{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_ANISOTROPY}getMaterialType(n){return A(this.parser,n,this.name)!==null?y:null}extendMaterialParams(n,e){const s=A(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 bn{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 Sn{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,_=new C(1,1,1),x=new we(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&&_.fromBufferAttribute(o.SCALE,E),x.setMatrixAt(E,R.compose(m,T,_));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 _e="glTF",D=12,ce={JSON:1313821514,BIN:5130562};class yn{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!==_e)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 wn{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,w,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 Ae 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,_=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,b=r[p+E+a],k=r[p+E]*u;i[E]=_*L+x*N+m*b+T*k}return i}}const On=new me;class Cn extends Ae{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 S(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),S(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),_="InterleavedBuffer:"+t.bufferView+":"+t.componentType+":"+T+":"+t.count;let x=e.cache.get(_);x||(R=new c(a,T*d,t.count*d/u),x=new Ce(R,d/u),e.cache.add(_,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,_=H[t.sparse.indices.componentType],x=t.sparse.indices.byteOffset||0,E=t.sparse.values.byteOffset||0,L=new _(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 b=0,k=L.length;b<k;b++){const P=L[b];if(m.setX(P,N[b*o]),o>=2&&m.setY(P,N[b*o+1]),o>=3&&m.setZ(P,N[b*o+2]),o>=4&&m.setW(P,N[b*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),S(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],w),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],w)}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),S(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 _=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,_):new Ve(R,_),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,_);else if(m.mode===M.LINE_STRIP)T=new ze(R,_);else if(m.mode===M.LINE_LOOP)T=new qe(R,_);else if(m.mode===M.POINTS)T=new We(R,_);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),S(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)),S(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,_=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",_)),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],b=p[x],k=R[x],P=m[x];if(L===void 0)continue;L.updateMatrix&&L.updateMatrix();const B=s._createAnimationTracks(L,N,b,k,P);if(B)for(let j=0;j<B.length;j++)T.push(B[j])}const _=new $e(i,void 0,T);return S(_,t),_})}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),S(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)),S(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:Ae;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!==w&&"COLOR_0"in s&&console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${re.workingColorSpace}" not supported.`),S(f,n),Kn(f,n,e),Promise.all(t).then(function(){return n.targets!==void 0?Hn(f,n.targets,e):f})}export{Qn as GLTFLoader};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{zip as T}from"./browser-CltifEM0.js";import{g as x,V as A,O as $,B as _,M as D,C as H,Q as I}from"./VideoExport-B8ZhHNnd.js";class p{static DEPTH_NEAR_M=1;static DEPTH_FAR_M=2e4;static MASK_MARGIN_PX=4;static depthLevel(e){if(!(e>0))return 0;const t=1-Math.log(e/p.DEPTH_NEAR_M)/Math.log(p.DEPTH_FAR_M/p.DEPTH_NEAR_M);return Math.min(1,Math.max(0,t))}static dilate(e,t,a,c,n=p.MASK_MARGIN_PX){const i=new Uint8Array(e.length);for(let o=0;o<c;o++)for(let r=0;r<a;r++){let s=0;for(let d=-n;d<=n&&!s;d++){const u=r+d;u>=0&&u<a&&e[o*a+u]&&(s=255)}i[o*a+r]=s}for(let o=0;o<c;o++)for(let r=0;r<a;r++){let s=0;for(let d=-n;d<=n&&!s;d++){const u=o+d;u>=0&&u<c&&i[u*a+r]&&(s=255)}t[o*a+r]=s}}}class l{static MAX_CHARS=2500;static NEGATIVE=`added objects, windows, portholes, lights or beams not in the reference, smoke, people, animals, camera shake beyond the reference, lens flares not in the reference, any change of the phenomenon's shape, size, colour, brightness, position or motion, text, logos.
|
|
2
|
+
`;static of(e,t){const a=e,c=t.rate&&t.rate>0?t.rate:1,n=s=>Math.max(0,(s-t.fromSeconds)/c),i=[s=>s,s=>l.firstSentence(s),s=>l.firstWords(l.firstSentence(s),l.SHORT_NOTE_CHARS)];let o="";for(const s of i)if(o=[`Realistic, steady first-person view, as seen by a pedestrian's own eyes, ${a.place?.name??"place not stated"}, local time ${a.time??"not stated"}. Keep exactly the geometry, horizon, framing, lighting and motion of the reference video: only make the textures (vegetation, ground, buildings, clouds, rain) photographic. Render the phenomenon as realistically as the rest (same grain, blur, haze and light), but keep its shape, size, colour, brightness, position and motion exactly those of the reference video.`,"","Phenomenon, as drawn by the reconstruction from the testimony:",...l.shapes(a,t.fromSeconds),...l.section("What happens:",l.milestones(a,t,n,s)),...l.section("Weather and light (follow this, not the reference's own colours):",l.weather(a,t,n))].join(`
|
|
3
|
+
`)+`
|
|
4
|
+
`,o.length<=l.MAX_CHARS)return o;const r=[];for(const s of o.split(`
|
|
5
|
+
`)){if([...r,s].join(`
|
|
6
|
+
`).length+1>l.MAX_CHARS)break;r.push(s)}return r.join(`
|
|
7
|
+
`)+`
|
|
8
|
+
`}static SHORT_NOTE_CHARS=80;static firstSentence(e){const t=e.search(/[.;!?](\s|$)/);return t>=0?e.slice(0,t+1):e}static firstWords(e,t){if(e.length<=t)return e;const a=e.lastIndexOf(" ",t-1);return e.slice(0,a>0?a:t-1)+"…"}static section(e,t){return t.length>0?["",e,...t]:[]}static text(e,t="en"){if(e!==void 0)return typeof e=="string"?e:e[t]??e.en??Object.values(e)[0]}static shapes(e,t){const a=new Map;for(const c of e.timeline?.keyframes??[])for(const n of c.shapes??[])(c.t<=t*1e3||!a.has(n.sourceId))&&a.set(n.sourceId,n.shape);return a.size===0?["- none drawn."]:[...a.entries()].map(([c,n])=>{const i=n.angular?`${n.angular.widthDeg}° wide and ${n.angular.heightDeg}° tall as seen`:"size not stated",o=n.aim?`, at azimuth ${Math.round(n.aim.azimuthDeg)}°, ${n.aim.altitudeDeg.toFixed(1)}° above the horizon`:"";return`- ${l.text(n.title)??c}: colour ${n.color??"not stated"}, ${i}${o}.`})}static milestones(e,t,a,c){return(e.milestones??[]).filter(n=>n.t/1e3>=t.fromSeconds&&n.t/1e3<=t.toSeconds).map(n=>`- ${a(n.t/1e3).toFixed(1)} s into the video: ${c(l.text(n.note)??"")}`)}static weather(e,t,a){const c=(e.tags??[]).length>0?[`- ${(e.tags??[]).join(", ")}.`]:[];let n="";for(const i of e.weatherTrack?.keyframes??[]){const o=i.t/1e3;if(o>t.toSeconds)break;const r=l.describe(i.weather);r!==n&&(n=r,c.push(`- ${o<=t.fromSeconds?"from the start":`from ${a(o).toFixed(1)} s into the video`}: ${r}.`))}return c}static describe(e){const t=[];return typeof e.cloudCover=="number"&&t.push(e.cloudCover>=.95?"overcast":`cloud cover ${Math.round(e.cloudCover*100)} %`),typeof e.cloudBaseM=="number"&&t.push(`cloud base ${Math.round(e.cloudBaseM)} m`),t.push(e.precipitationType&&e.precipitationType!=="none"?`${e.precipitationType}, intensity ${e.precipitationIntensity??"not stated"}`:"no precipitation"),t.join(", ")}}class S{static async make(e,t,a,c){const n=Math.max(2,Math.floor(e.film.width/2)*2),i=Math.max(2,Math.floor(e.film.height/2)*2),o=await x(["avc","vp9","av1"],{width:n,height:i});if(!o)throw new Error(`No video codec for ${n}×${i}`);const r=await Promise.all(["depth","phenomenon-mask","sky-mask"].map(y=>S.passFilm(y,n,i,o))),[s,d,u]=r;let m,M,E=0;try{const y=await A.film({...e.film,frameAt:(f,h,w)=>e.film.frameAt(f,h,w)?(m=e.drawControlPasses(),!0):!1,hearInto:f=>e.film.hearInto(f),afterFrame:async(f,h)=>{if(f===0&&(M=await h.canvas.convertToBlob({type:"image/png"})),!m)throw new Error(`No control passes for frame ${f}`);S.paint(m,s.context,d.context,u.context),m=void 0;for(const w of r)await w.source.add(f/A.FRAME_RATE,1/A.FRAME_RATE);E=f+1}},a,c),g=await Promise.all(r.map(async f=>{await f.output.finalize();const h=f.output.target.buffer;if(!h)throw new Error(`Empty ${f.name} film`);return[f.name,new Uint8Array(h)]}));return await S.zipped(e,t,new Uint8Array(await y.arrayBuffer()),g,M,E)}catch(y){throw await Promise.all(r.map(g=>g.output.cancel().catch(()=>{}))),y}}static async passFilm(e,t,a,c){const n=new OffscreenCanvas(t,a),i=n.getContext("2d");if(!i)throw new Error("No 2D context");i.imageSmoothingEnabled=!1;const o=new $({format:new D({fastStart:"in-memory"}),target:new _}),r=new H(n,{codec:c,quality:I});return o.addVideoTrack(r,{frameRate:A.FRAME_RATE}),await o.start(),{name:e,output:o,source:r,context:i}}static paint(e,t,a,c){const{width:n,height:i}=e,o=n*i,r=new Uint8Array(o);p.dilate(e.phenomenon,r,n,i);const s={depth:new ImageData(n,i),phenomenon:new ImageData(n,i),sky:new ImageData(n,i)};for(let m=0;m<o;m++){const M=e.distanceM[m],E=Math.round(p.depthLevel(M)*255),y=M>0?0:255,g=m*4;for(const[f,h]of[[s.depth.data,E],[s.phenomenon.data,r[m]],[s.sky.data,y]])f[g]=h,f[g+1]=h,f[g+2]=h,f[g+3]=255}const d=new OffscreenCanvas(n,i),u=d.getContext("2d");for(const[m,M]of[[t,s.depth],[a,s.phenomenon],[c,s.sky]])u.putImageData(M,0,0),m.drawImage(d,0,0,m.canvas.width,m.canvas.height)}static zipped(e,t,a,c,n,i){const o=new TextEncoder,r=e.film.fromMs/1e3,s=e.film.toMs/1e3,d=e.film.rate>0?e.film.rate:1,u=Math.round(i/A.FRAME_RATE*10)/10,m=new Date().toISOString().slice(0,10),M={title:e.title,source:e.source??"",date:m,fps:String(A.FRAME_RATE),duration:String(u),near:String(p.DEPTH_NEAR_M),far:String(p.DEPTH_FAR_M),margin:String(p.MASK_MARGIN_PX),maxChars:l.MAX_CHARS.toLocaleString(e.language),label:t.label},E=t.readme.replace(/\{(\w+)\}/g,(h,w)=>M[w]??h),y={title:e.title,source:e.source,madeBy:A.MADE_BY,date:m,clip:{fromSeconds:r/d,toSeconds:s/d,fps:A.FRAME_RATE,frames:i,width:e.film.width,height:e.film.height},depth:{encoding:"1 - ln(d / near) / ln(far / near), clamped to 0..1; 0 for the sky",nearM:p.DEPTH_NEAR_M,farM:p.DEPTH_FAR_M},phenomenonMaskMarginPx:p.MASK_MARGIN_PX,promptMaxChars:l.MAX_CHARS,label:t.label},g={level:0},f={"reference.mp4":[a,g],...Object.fromEntries(c.map(([h,w])=>[`${h}.mp4`,[w,g]])),"prompt.txt":o.encode(l.of(e.recording,{fromSeconds:r,toSeconds:s,rate:d})),"negative-prompt.txt":o.encode(l.NEGATIVE),[t.readmeFile]:o.encode(E),"manifest.json":o.encode(JSON.stringify(y,null,2)+`
|
|
9
|
+
`)};return(async()=>(n&&(f["first-frame.png"]=[new Uint8Array(await n.arrayBuffer()),g]),new Promise((h,w)=>T(f,(R,b)=>R?w(R):h(new Blob([b],{type:"application/zip"}))))))()}}export{S as GenerativeKit};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{M as r,_ as t}from"./rr0-ufoathome.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};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
const e={readmeFile:"README.md",label:"Generated reconstruction, not real footage",readme:`# Generative AI kit: {title}
|
|
2
|
+
|
|
3
|
+
This kit is for making, with a video generator (Runway, Kling, Luma, Veo…), a realistic version of the UFO@home reconstruction of this observation, without letting the generator invent the testimony.
|
|
4
|
+
|
|
5
|
+
Source: {source}
|
|
6
|
+
Made with UFO@home (https://ufoathome.org) on {date}.
|
|
7
|
+
|
|
8
|
+
## Contents
|
|
9
|
+
|
|
10
|
+
- **reference.mp4**: the reconstruction as the player shows it, with its sound, without caption or logo ({fps} frames/s, {duration} s).
|
|
11
|
+
- **first-frame.png**: its first frame, for generators that start from an image.
|
|
12
|
+
- **depth.mp4**: how far each pixel is, white near, black far and for the sky, on a logarithmic scale from {near} m to {far} m, the same for the whole video.
|
|
13
|
+
- **phenomenon-mask.mp4**: in white, where the phenomenon the witness described stands, grown by {margin} pixels: what the generated phenomenon must not leave.
|
|
14
|
+
- **sky-mask.mp4**: in white, the sky.
|
|
15
|
+
- **prompt.txt**: the prompt, written from the recording's own statements only, {maxChars} characters at most.
|
|
16
|
+
- **negative-prompt.txt**: the negative prompt, what the generator must not do.
|
|
17
|
+
- **manifest.json**: the provenance and the same information, for a program.
|
|
18
|
+
|
|
19
|
+
## How to use it
|
|
20
|
+
|
|
21
|
+
1. In the generator, choose a mode that starts from a video ("video to video", "restyle", "modify video"…) and give it reference.mp4. If the video is too long for it, cut it around the moment you want.
|
|
22
|
+
2. Paste prompt.txt into the prompt field, and negative-prompt.txt into the negative prompt's, if there is one. Set the transformation to the lowest that makes the picture realistic: the geometry, the horizon, the framing and the motion must stay those of the reference.
|
|
23
|
+
3. If the generator takes a depth control video, give it depth.mp4.
|
|
24
|
+
4. The generator renders the phenomenon too, so that it has the same grain, blur and light as the rest. Then check the result by laying phenomenon-mask.mp4 over the generated video: if the phenomenon leaves it, changes shape, size, colour or motion, or gains details (portholes, lights, reflections), reject the video and start again with a weaker transformation.
|
|
25
|
+
5. Burn into the whole picture, not into a corner: "{label}".
|
|
26
|
+
6. Cite the source above wherever the video is published.
|
|
27
|
+
|
|
28
|
+
## Do not
|
|
29
|
+
|
|
30
|
+
- Show the generated video to a witness before interviewing them: a realistic picture can change what they remember.
|
|
31
|
+
- Give the generator the witness's account as its prompt: it would draw every word of it, what the witness did not say included.
|
|
32
|
+
- Paste the phenomenon of reference.mp4 back over the generated video: less realistic than the rest, it would look stuck on and draw the eye more than anything else.
|
|
33
|
+
- Present the result as evidence: it shows a reconstruction, not what was seen.
|
|
34
|
+
`};export{e as generativeKitMessages_en};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
const e={readmeFile:"LEEME.md",label:"Reconstrucción generada, no una imagen real",readme:`# Kit para IA generativa: {title}
|
|
2
|
+
|
|
3
|
+
Este kit sirve para producir, con un generador de vídeo (Runway, Kling, Luma, Veo…), una versión realista de la reconstrucción UFO@home de esta observación, sin dejar que el generador invente el testimonio.
|
|
4
|
+
|
|
5
|
+
Fuente: {source}
|
|
6
|
+
Hecho con UFO@home (https://ufoathome.org) el {date}.
|
|
7
|
+
|
|
8
|
+
## Contenido
|
|
9
|
+
|
|
10
|
+
- **reference.mp4**: la reconstrucción tal como la muestra el reproductor, con su sonido, sin leyenda ni logotipo ({fps} imágenes/s, {duration} s).
|
|
11
|
+
- **first-frame.png**: su primera imagen, para los generadores que parten de una imagen.
|
|
12
|
+
- **depth.mp4**: la distancia de cada píxel, blanco cerca, negro lejos y para el cielo, en una escala logarítmica de {near} m a {far} m, la misma para todo el vídeo.
|
|
13
|
+
- **phenomenon-mask.mp4**: en blanco, el lugar del fenómeno descrito por el testigo, ampliado {margin} píxeles: de donde el fenómeno generado no debe salir.
|
|
14
|
+
- **sky-mask.mp4**: en blanco, el cielo.
|
|
15
|
+
- **prompt.txt**: el prompt, en inglés, escrito solo a partir de lo que afirma el registro, de {maxChars} caracteres como máximo.
|
|
16
|
+
- **negative-prompt.txt**: el prompt negativo, lo que el generador no debe hacer.
|
|
17
|
+
- **manifest.json**: la procedencia y la misma información, para un programa.
|
|
18
|
+
|
|
19
|
+
## Modo de empleo
|
|
20
|
+
|
|
21
|
+
1. En el generador, elegir un modo que parta de un vídeo («video to video», «restyle», «modify video»…) y darle reference.mp4. Si el vídeo es demasiado largo para él, cortarlo en torno al momento deseado.
|
|
22
|
+
2. Pegar prompt.txt en el campo del prompt, y negative-prompt.txt en el del prompt negativo si lo hay. Ajustar la transformación al mínimo que haga la imagen realista: la geometría, el horizonte, el encuadre y el movimiento deben seguir siendo los de la referencia.
|
|
23
|
+
3. Si el generador acepta un vídeo de control de profundidad («depth»), darle depth.mp4.
|
|
24
|
+
4. El generador también reproduce el fenómeno, para que tenga el mismo grano, el mismo desenfoque y la misma luz que el resto. Después, controlar el resultado superponiendo phenomenon-mask.mp4 al vídeo generado: si el fenómeno se sale, cambia de forma, tamaño, color o movimiento, o gana detalles (ojos de buey, luces, reflejos), descartar el vídeo y volver a empezar con una transformación más débil.
|
|
25
|
+
5. Incrustar en toda la imagen, y no en una esquina: «{label}».
|
|
26
|
+
6. Citar la fuente anterior allí donde se publique el vídeo.
|
|
27
|
+
|
|
28
|
+
## No hacer
|
|
29
|
+
|
|
30
|
+
- Mostrar el vídeo generado a un testigo antes de haberlo entrevistado: una imagen realista puede modificar su recuerdo.
|
|
31
|
+
- Dar al generador el texto del testimonio como prompt: dibujaría cada palabra, incluido lo que el testigo no dijo.
|
|
32
|
+
- Volver a pegar el fenómeno de reference.mp4 sobre el vídeo generado: menos realista que el resto, parecería añadido y atraería la mirada más que todo lo demás.
|
|
33
|
+
- Presentar el resultado como una prueba: muestra una reconstrucción, no lo que se vio.
|
|
34
|
+
`};export{e as generativeKitMessages_es};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
const e={readmeFile:"LISEZ-MOI.md",label:"Reconstitution générée, pas une image réelle",readme:`# Kit pour IA générative : {title}
|
|
2
|
+
|
|
3
|
+
Ce kit sert à produire, avec un générateur vidéo (Runway, Kling, Luma, Veo…), une version réaliste de la reconstitution UFO@home de cette observation, sans laisser le générateur inventer le témoignage.
|
|
4
|
+
|
|
5
|
+
Source : {source}
|
|
6
|
+
Fait avec UFO@home (https://ufoathome.org) le {date}.
|
|
7
|
+
|
|
8
|
+
## Contenu
|
|
9
|
+
|
|
10
|
+
- **reference.mp4** : la reconstitution telle que le lecteur la montre, avec son son, sans légende ni logo ({fps} images/s, {duration} s).
|
|
11
|
+
- **first-frame.png** : sa première image, pour les générateurs qui partent d'une image.
|
|
12
|
+
- **depth.mp4** : la distance de chaque pixel, blanc près, noir loin et pour le ciel, sur une échelle logarithmique de {near} m à {far} m, la même pour toute la vidéo.
|
|
13
|
+
- **phenomenon-mask.mp4** : en blanc, la place du phénomène décrit par le témoin, élargie de {margin} pixels : ce dont le phénomène généré ne doit pas sortir.
|
|
14
|
+
- **sky-mask.mp4** : en blanc, le ciel.
|
|
15
|
+
- **prompt.txt** : le prompt, en anglais, écrit à partir des seuls énoncés de l'enregistrement, en {maxChars} caractères au plus.
|
|
16
|
+
- **negative-prompt.txt** : le prompt négatif, ce que le générateur ne doit pas faire.
|
|
17
|
+
- **manifest.json** : la provenance et ces mêmes informations, pour un programme.
|
|
18
|
+
|
|
19
|
+
## Mode d'emploi
|
|
20
|
+
|
|
21
|
+
1. Dans le générateur, choisir un mode qui part d'une vidéo (« video to video », « restyle », « modify video »…) et y déposer reference.mp4. Si la vidéo est trop longue pour lui, la couper autour du moment voulu.
|
|
22
|
+
2. Coller prompt.txt dans le champ du prompt, et negative-prompt.txt dans celui du prompt négatif s'il y en a un. Régler la transformation au plus bas qui rende l'image réaliste : la géométrie, l'horizon, le cadrage et le mouvement doivent rester ceux de la référence.
|
|
23
|
+
3. Si le générateur accepte une vidéo de contrôle de profondeur (« depth »), lui donner depth.mp4.
|
|
24
|
+
4. Le générateur rend aussi le phénomène, pour qu'il ait le même grain, le même flou et la même lumière que le reste. Contrôler ensuite le résultat en superposant phenomenon-mask.mp4 à la vidéo générée : si le phénomène en sort, change de forme, de taille, de couleur ou de mouvement, ou gagne des détails (hublots, lumières, reflets), rejeter la vidéo et recommencer avec une transformation plus faible.
|
|
25
|
+
5. Incruster sur toute l'image, et pas dans un coin : « {label} ».
|
|
26
|
+
6. Citer la source ci-dessus partout où la vidéo est publiée.
|
|
27
|
+
|
|
28
|
+
## À ne pas faire
|
|
29
|
+
|
|
30
|
+
- Montrer la vidéo générée à un témoin avant de l'avoir interrogé : une image réaliste peut modifier son souvenir.
|
|
31
|
+
- Donner au générateur le texte du témoignage comme prompt : il en dessinerait chaque mot, y compris ce que le témoin n'a pas dit.
|
|
32
|
+
- Recoller le phénomène de reference.mp4 sur la vidéo générée : moins réaliste que le reste, il aurait l'air rapporté et attirerait l'œil plus que tout le reste.
|
|
33
|
+
- Présenter le résultat comme une preuve : il montre une reconstitution, pas ce qui a été vu.
|
|
34
|
+
`};export{e as generativeKitMessages_fr};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
const e={readmeFile:"LEGGIMI.md",label:"Ricostruzione generata, non un'immagine reale",readme:`# Kit per IA generativa: {title}
|
|
2
|
+
|
|
3
|
+
Questo kit serve a produrre, con un generatore video (Runway, Kling, Luma, Veo…), una versione realistica della ricostruzione UFO@home di questa osservazione, senza lasciare che il generatore inventi la testimonianza.
|
|
4
|
+
|
|
5
|
+
Fonte: {source}
|
|
6
|
+
Fatto con UFO@home (https://ufoathome.org) il {date}.
|
|
7
|
+
|
|
8
|
+
## Contenuto
|
|
9
|
+
|
|
10
|
+
- **reference.mp4**: la ricostruzione come la mostra il lettore, con il suo sonoro, senza didascalia né logo ({fps} immagini/s, {duration} s).
|
|
11
|
+
- **first-frame.png**: la sua prima immagine, per i generatori che partono da un'immagine.
|
|
12
|
+
- **depth.mp4**: la distanza di ogni pixel, bianco vicino, nero lontano e per il cielo, su una scala logaritmica da {near} m a {far} m, la stessa per tutto il video.
|
|
13
|
+
- **phenomenon-mask.mp4**: in bianco, il posto del fenomeno descritto dal testimone, allargato di {margin} pixel: ciò da cui il fenomeno generato non deve uscire.
|
|
14
|
+
- **sky-mask.mp4**: in bianco, il cielo.
|
|
15
|
+
- **prompt.txt**: il prompt, in inglese, scritto solo a partire da ciò che afferma la registrazione, di {maxChars} caratteri al massimo.
|
|
16
|
+
- **negative-prompt.txt**: il prompt negativo, ciò che il generatore non deve fare.
|
|
17
|
+
- **manifest.json**: la provenienza e le stesse informazioni, per un programma.
|
|
18
|
+
|
|
19
|
+
## Istruzioni
|
|
20
|
+
|
|
21
|
+
1. Nel generatore, scegliere una modalità che parta da un video («video to video», «restyle», «modify video»…) e dargli reference.mp4. Se il video è troppo lungo per esso, tagliarlo attorno al momento voluto.
|
|
22
|
+
2. Incollare prompt.txt nel campo del prompt, e negative-prompt.txt in quello del prompt negativo se c'è. Regolare la trasformazione al minimo che renda l'immagine realistica: la geometria, l'orizzonte, l'inquadratura e il movimento devono restare quelli del riferimento.
|
|
23
|
+
3. Se il generatore accetta un video di controllo della profondità («depth»), dargli depth.mp4.
|
|
24
|
+
4. Il generatore rende anche il fenomeno, perché abbia la stessa grana, la stessa sfocatura e la stessa luce del resto. Poi controllare il risultato sovrapponendo phenomenon-mask.mp4 al video generato: se il fenomeno ne esce, cambia forma, dimensione, colore o movimento, o acquista dettagli (oblò, luci, riflessi), scartare il video e ricominciare con una trasformazione più debole.
|
|
25
|
+
5. Sovrimprimere su tutta l'immagine, e non in un angolo: «{label}».
|
|
26
|
+
6. Citare la fonte qui sopra ovunque il video sia pubblicato.
|
|
27
|
+
|
|
28
|
+
## Da non fare
|
|
29
|
+
|
|
30
|
+
- Mostrare il video generato a un testimone prima di averlo intervistato: un'immagine realistica può modificarne il ricordo.
|
|
31
|
+
- Dare al generatore il testo della testimonianza come prompt: ne disegnerebbe ogni parola, compreso ciò che il testimone non ha detto.
|
|
32
|
+
- Reincollare il fenomeno di reference.mp4 sul video generato: meno realistico del resto, sembrerebbe aggiunto e attirerebbe lo sguardo più di tutto il resto.
|
|
33
|
+
- Presentare il risultato come una prova: mostra una ricostruzione, non ciò che è stato visto.
|
|
34
|
+
`};export{e as generativeKitMessages_it};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{M as _,_ as e}from"./rr0-ufoathome.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={document:"{name} — UFO@home",documentNote:"What this reconstruction holds geographically: where the observer stood, the directions the account states, and where a reading places what would have been seen. Nothing here is a measurement of the phenomenon.",folderObserver:"Observer",folderSightLines:"Lines of sight",folderBodies:"What a reading places",folderTraces:"Investigator's traces",observerPoint:"Observer, {s} s",observerPath:"Observer's path",observerNote:"{elevation} m above the ground, looking {heading}° from north.",sightLine:"Line of sight — {what}, {s} s",sightLineNote:"The direction the account states: {azimuth}° from north, {altitude}° above the horizon. The {km} km drawn is conventional — the account gives a direction, not a distance.",bodyPoint:"{what}",bodyPath:"{what} — path",bodyNote:"Where a reading of the account places it. Somebody's interpretation, not the account.",heightNote:"Heights are counted from the ground where the observer set off.",unnamed:"Phenomenon {id}"};export{e as geoExportTexts_en};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={document:"{name} — UFO@home",documentNote:"Lo que esta reconstrucción tiene de geográfico: dónde estaba el testigo, las direcciones que declara el testimonio, y dónde una lectura sitúa lo que se habría visto. Nada de esto es una medida del fenómeno.",folderObserver:"Testigo",folderSightLines:"Líneas de visión",folderBodies:"Lo que sitúa una lectura",folderTraces:"Trazados del investigador",observerPoint:"Testigo, {s} s",observerPath:"Recorrido del testigo",observerNote:"{elevation} m sobre el suelo, mirando a {heading}° del norte.",sightLine:"Línea de visión — {what}, {s} s",sightLineNote:"La dirección que declara el testimonio: {azimuth}° del norte, {altitude}° sobre el horizonte. Los {km} km trazados son convencionales: el testimonio da una dirección, no una distancia.",bodyPoint:"{what}",bodyPath:"{what} — recorrido",bodyNote:"Donde lo sitúa una lectura del testimonio. La interpretación de alguien, no el testimonio.",heightNote:"Las alturas se cuentan desde el suelo del que partió el testigo.",unnamed:"Fenómeno {id}"};export{e as geoExportTexts_es};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={document:"{name} — UFO@home",documentNote:"Ce que cette reconstitution a de géographique : où se tenait le témoin, les directions qu'énonce le témoignage, et où une lecture place ce qui aurait été vu. Rien ici n'est une mesure du phénomène.",folderObserver:"Témoin",folderSightLines:"Lignes de visée",folderBodies:"Ce qu'une lecture place",folderTraces:"Tracés de l'enquêteur",observerPoint:"Témoin, {s} s",observerPath:"Trajet du témoin",observerNote:"{elevation} m au-dessus du sol, regard à {heading}° du nord.",sightLine:"Ligne de visée — {what}, {s} s",sightLineNote:"La direction qu'énonce le témoignage : {azimuth}° du nord, {altitude}° au-dessus de l'horizon. Les {km} km tracés sont conventionnels : le témoignage donne une direction, pas une distance.",bodyPoint:"{what}",bodyPath:"{what} — trajet",bodyNote:"Où une lecture du témoignage le place. L'interprétation de quelqu'un, pas le témoignage.",heightNote:"Les hauteurs sont comptées depuis le sol d'où le témoin est parti.",unnamed:"Phénomène {id}"};export{e as geoExportTexts_fr};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={document:"{name} — UFO@home",documentNote:"Ciò che questa ricostruzione ha di geografico: dove stava il testimone, le direzioni che la testimonianza dichiara, e dove una lettura colloca ciò che si sarebbe visto. Nulla di qui è una misura del fenomeno.",folderObserver:"Testimone",folderSightLines:"Linee di vista",folderBodies:"Ciò che una lettura colloca",folderTraces:"Tracciati dell'inquirente",observerPoint:"Testimone, {s} s",observerPath:"Percorso del testimone",observerNote:"{elevation} m sopra il suolo, sguardo a {heading}° dal nord.",sightLine:"Linea di vista — {what}, {s} s",sightLineNote:"La direzione che la testimonianza dichiara: {azimuth}° dal nord, {altitude}° sopra l'orizzonte. I {km} km tracciati sono convenzionali: la testimonianza dà una direzione, non una distanza.",bodyPoint:"{what}",bodyPath:"{what} — percorso",bodyNote:"Dove lo colloca una lettura della testimonianza. L'interpretazione di qualcuno, non la testimonianza.",heightNote:"Le altezze sono contate dal suolo da cui il testimone è partito.",unnamed:"Fenomeno {id}"};export{e as geoExportTexts_it};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{G as r}from"./GeographicFigures-B0Bqeh10.js";import"./Sighting-CBpJpdm9.js";import"./VisualAids-DI-hEL46.js";import"./rr0-ufoathome.mjs";import"./SaidPosition-CWiVNaNW.js";import"./ShareDialogElement-C3HL-Smq.js";import"./Decor-Dn-cvniW.js";import"./RecordingIssue-BlWT8Xsu.js";import"./Obstacles-v9SkfBD7.js";class n{static of(o,e,t,i){const p=r.of(o,t,i),c={type:"FeatureCollection",name:r.fill(t.document,{name:e}),description:`${t.documentNote} ${t.heightNote}`,features:p.map(a=>n.feature(a))};return`${JSON.stringify(c,void 0,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:n.geometry(o)}}static geometry(o){const e=o.points.map(t=>n.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(r.round(o,7)),Number(r.round(e,7)),Number(r.round(t,2))]}}export{n as GeoJsonExport};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
class a{static TITLE_KEYS=["name","title","label","Name","NAME","nom","libelle","libellé"];static COLOR_KEYS=["stroke","marker-color","fill","color","colour","couleur"];static HEIGHTS={ground:"ground",relative:"relative",absolute:"absolute","observer-ground":"relative"};static fromText(t){let e;try{e=JSON.parse(t)}catch{throw new Error("This is not a readable GeoJSON file.")}if(typeof e!="object"||e===null)throw new Error("This is not a readable GeoJSON file.");const r=e;a.checkCrs(r);const i=[],n=new Set;if(a.read(r,void 0,void 0,i,n),i.length===0&&n.size===0&&typeof r.type!="string")throw new Error("This is not a readable GeoJSON file.");const s=typeof r.name=="string"&&r.name.trim()?r.name.trim():void 0;return{traces:i,skipped:[...n],...s?{documentName:s}:{}}}static checkCrs(t){const e=t.crs?.properties?.name;if(typeof e=="string"&&!/CRS84|CRS:84|4326/i.test(e))throw new Error(`This GeoJSON is in ${e}, not WGS 84: reproject it to EPSG:4326 before importing it.`)}static read(t,e,r,i,n,s){const c=typeof t.type=="string"?t.type:void 0;switch(c){case"FeatureCollection":for(const o of a.array(t.features))a.read(o,e,r,i,n,s);return;case"Feature":{const o=a.titleOf(t.properties)??e,l=a.colorOf(t.properties)??r,f=a.heightsOf(t.properties)??s;if(typeof t.geometry!="object"||t.geometry===null){n.add("Feature without geometry");return}a.read(t.geometry,o,l,i,n,f);return}case"GeometryCollection":for(const o of a.array(t.geometries))a.read(o,e,r,i,n,s);return;case"Point":a.push("point",[t.coordinates],e,r,i,s);return;case"MultiPoint":for(const o of a.array(t.coordinates))a.push("point",[o],e,r,i,s);return;case"LineString":a.push("line",t.coordinates,e,r,i,s);return;case"MultiLineString":for(const o of a.array(t.coordinates))a.push("line",o,e,r,i,s);return;case"Polygon":a.polygon(t.coordinates,e,r,i,n,s);return;case"MultiPolygon":for(const o of a.array(t.coordinates))a.polygon(o,e,r,i,n,s);return;default:c&&n.add(c)}}static polygon(t,e,r,i,n,s){const c=a.array(t);c.length!==0&&(c.length>1&&n.add("Polygon holes"),a.push("polygon",c[0],e,r,i,s))}static push(t,e,r,i,n,s){const c=a.points(e);if(t==="polygon"&&c.length>1){const l=c[0],f=c[c.length-1];l.lat===f.lat&&l.lng===f.lng&&l.altM===f.altM&&c.pop()}if(c.length===0||t==="line"&&c.length<2||t==="polygon"&&c.length<3)return;const o=s??(c.some(l=>l.altM!==void 0)?"absolute":"ground");n.push({kind:t,points:c,...r?{title:r}:{},...o!=="ground"?{altitude:o}:{},...i?{color:i}:{}})}static points(t){const e=[];for(const r of a.array(t)){if(!Array.isArray(r))continue;const[i,n,s]=r.map(Number);!Number.isFinite(i)||!Number.isFinite(n)||Math.abs(n)>90||Math.abs(i)>180||e.push(Number.isFinite(s)&&s!==0?{lat:n,lng:i,altM:s}:{lat:n,lng:i})}return e}static heightsOf(t){const e=t?.heights;return typeof e=="string"?a.HEIGHTS[e]:void 0}static titleOf(t){for(const e of a.TITLE_KEYS){const r=t?.[e];if(typeof r=="string"&&r.trim())return r.trim();if(typeof r=="number")return String(r)}}static colorOf(t){for(const e of a.COLOR_KEYS){const r=t?.[e];if(typeof r!="string")continue;const i=/^#?([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(r.trim());if(!i)continue;const n=i[1].toLowerCase();return`#${n.length===3?[...n].map(s=>s+s).join(""):n}`}}static array(t){return Array.isArray(t)?t:[]}}export{a as GeoJsonImport};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as p}from"./Sighting-CBpJpdm9.js";import{a as k}from"./SaidPosition-CWiVNaNW.js";import{aS as v}from"./ShareDialogElement-C3HL-Smq.js";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=p(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=p(n,a.t);if(i?.lat===void 0||i.lng===void 0)continue;const r={lat:i.lat,lng:i.lng,altM:(i.elevationM??0)+v.EYE_HEIGHT_M};for(const s of a.shapes){const d=s.shape.aim;d&&o.push({group:"sight-line",groupName:t.folderSightLines,name:l.fill(t.sightLine,{what:l.nameOf(e.read(s.shape.title),s.sourceId,t),s:l.seconds(a.t)}),note:l.fill(t.sightLineNote,{azimuth:l.round(d.azimuthDeg,1),altitude:l.round(d.altitudeDeg,1),km:l.round(l.SIGHT_LINE_M/1e3,0)}),kind:"line",points:[r,l.along(r,d.azimuthDeg,d.altitudeDeg)],heights:"observer-ground"})}}return o}static along(n,t,e){const o=l.SIGHT_LINE_M*Math.cos(e*b),a=k.toGeo({eastM:Math.sin(t*b)*o,northM:Math.cos(t*b)*o},n);return{lat:a.lat,lng:a.lng,altM:n.altM+l.SIGHT_LINE_M*Math.sin(e*b)}}static bodies(n,t,e){const o=n.interpretation?.bodies??[],a=p(n,0);if(o.length===0||a?.lat===void 0||a.lng===void 0)return[];const i={lat:a.lat,lng:a.lng},r=[];for(const s of o){const d=new v(s,l.FLAT,h=>v.eyeOf(n,h,l.FLAT)),f=[];for(const h of[...s.track].sort((c,m)=>c.t-m.t)){const c=d.at(h.t);if(!c)continue;const m=k.toGeo({eastM:c.eastM,northM:c.northM},i),u={lat:m.lat,lng:m.lng,altM:c.upM},M=f[f.length-1];M&&M.lat===u.lat&&M.lng===u.lng&&M.altM===u.altM||f.push(u)}if(f.length===0)continue;const y=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:y}),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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{P as K,a as W}from"./PictureFetch-C3wgf1ZV.js";class I{static SIZE=360;static LIGHT=230;static DARK=80;static STANDS_OUT=12;static GROUND=.025;static WHOLE_GROUND=.08;static GROWN_DRIFT=.02;static INSIDE_WEIGHT=.4;static LINE_LENGTH=12;static LINE_FILL=.2;static STANDING_FULLY=60;static NEAREST=.08;static REACH=.08;static RING=[.04,.08];static SHARE_OF_PEAK=.15;static MAX_PAIRS=6e6;static find(a,s){const e=Math.min(1,I.SIZE/Math.max(a.width,a.height)),o=Math.max(1,Math.round(a.width*e)),i=Math.max(1,Math.round(a.height*e)),r=I.luminanceOf(a,o,i),n=I.blurred(r,o,i,Math.max(4,Math.round(Math.hypot(o,i)*I.GROUND))),c=[],l=[];for(let R=0;R<i;R++)for(let m=0;m<o;m++){const L=R*o+m,M=r[L];M>=I.LIGHT?c.push({x:m,y:R,weight:(M-I.LIGHT+5)/30}):n[L]<I.DARK&&M-n[L]>I.STANDS_OUT&&l.push({x:m,y:R,weight:Math.min(1,(M-n[L])/I.STANDING_FULLY)})}if(l.splice(0,l.length,...I.withoutLines(l,o,i)),c.splice(0,c.length,...I.withoutLines(c,o,i)),l.push(...I.insides(l,c,o,i)),c.length===0||l.length===0)return;const t=I.NEAREST*Math.hypot(o,i),f=I.peak(I.vote(c,l,o,i,t),o,i);if(f.value<=0||f.sharpness<s)return;const u={x:f.x/2,y:f.y/2},{pairs:y,matched:x}=I.pairsAt(u,c,l,r,n,o,i,t);if(y.length===0)return;const p=1/e,A=R=>({...R,x:(R.x+.5)*p-.5,y:(R.y+.5)*p-.5,radius:R.radius*p});return{centre:{x:(u.x+.5)*p-.5,y:(u.y+.5)*p-.5},pairs:y.map(R=>({ghost:A(R.ghost),light:A(R.light),residualPx:R.residualPx*p})),sharpness:f.sharpness,matched:x}}static vote(a,s,e,o,i){const r=new Float32Array(2*e*2*o),n=Math.max(1,Math.ceil(Math.sqrt(a.length*s.length/I.MAX_PAIRS))),c=i*i;for(let l=0;l<a.length;l+=n){const t=a[l];for(let f=0;f<s.length;f+=n){const u=s[f],y=u.x-t.x,x=u.y-t.y;y*y+x*x<c||(r[(t.y+u.y)*2*e+t.x+u.x]+=t.weight*u.weight)}}return r}static peak(a,s,e){const o=2*s,i=2*e,r=I.blurred(a,o,i,3);let n={x:0,y:0,value:0,sharpness:0};const c=I.REACH*Math.hypot(o,i);for(let y=Math.max(0,Math.round(i/2-c));y<Math.min(i,Math.round(i/2+c));y++)for(let x=Math.max(0,Math.round(o/2-c));x<Math.min(o,Math.round(o/2+c));x++){if(Math.hypot(x-o/2,y-i/2)>c)continue;const p=r[y*o+x];p>n.value&&(n={x,y,value:p,sharpness:0})}const l=Math.hypot(o,i),t=I.RING[0]*l,f=I.RING[1]*l;let u=0;for(let y=Math.max(0,Math.floor(n.y-f));y<Math.min(i,Math.ceil(n.y+f));y++)for(let x=Math.max(0,Math.floor(n.x-f));x<Math.min(o,Math.ceil(n.x+f));x++){const p=Math.hypot(x-n.x,y-n.y);p>t&&p<f&&(u=Math.max(u,r[y*o+x]))}return n.sharpness=u>0?n.value/u:1/0,n}static pairsAt(a,s,e,o,i,r,n,c){const l=new Float32Array(r*n);for(const M of s)l[M.y*r+M.x]=M.weight;const t=M=>{const E=Math.round(2*a.x-M.x),O=Math.round(2*a.y-M.y);let P=0;for(let N=-2;N<=2;N++)for(let C=-2;C<=2;C++){const T=E+C,h=O+N;T>=0&&h>=0&&T<r&&h<n&&(P+=l[h*r+T])}return M.weight*P},f=new Float32Array(r*n),u=new Uint8Array(r*n);for(const M of e){if(Math.hypot(M.x-(2*a.x-M.x),M.y-(2*a.y-M.y))<c)continue;const E=t(M);E<=0||(u[M.y*r+M.x]=1,f[M.y*r+M.x]=E)}let y;const x=()=>y??=I.blurred(o,r,n,Math.max(4,Math.round(Math.hypot(r,n)*I.WHOLE_GROUND))),p=new Uint8Array(r*n),A=[];for(let M=0;M<u.length;M++){if(!u[M]||p[M])continue;const E=[],O=[M];for(p[M]=1;O.length>0;){const h=O.pop();E.push(h);const d=h%r,S=(h-d)/r;for(let k=-2;k<=2;k++)for(let D=-2;D<=2;D++){const H=d+D,v=S+k;if(H<0||v<0||H>=r||v>=n)continue;const b=v*r+H;u[b]&&!p[b]&&(p[b]=1,O.push(b))}}if(E.length<3)continue;const P=E.reduce((h,d)=>h+f[d],0),N=I.spotOf(I.whole(E,o,x(),r,n),o,x(),r),C=s.filter(h=>Math.hypot(h.x-(2*a.x-N.x),h.y-(2*a.y-N.y))<=N.radius+2);if(C.length===0)continue;const T=I.spotOf(C.map(h=>h.y*r+h.x),o,i,r);A.push({pair:{ghost:N,light:T,residualPx:Math.hypot(N.x+T.x-2*a.x,N.y+T.y-2*a.y)},vote:P,size:E.length})}const R=A.reduce((M,E)=>Math.max(M,E.vote),0),m=[];let L=0;for(const{pair:M,size:E}of A.filter(O=>O.vote>=I.SHARE_OF_PEAK*R).sort((O,P)=>P.vote-O.vote))L+=E,!m.some(O=>Math.hypot(O.ghost.x-M.ghost.x,O.ghost.y-M.ghost.y)<Math.max(O.ghost.radius,M.ghost.radius))&&m.push(M);return{pairs:m.slice(0,12),matched:L}}static withoutLines(a,s,e){const o=new Int32Array(s*e).fill(-1);a.forEach((n,c)=>o[n.y*s+n.x]=c);const i=new Uint8Array(a.length),r=[];for(let n=0;n<a.length;n++){if(i[n])continue;const c=[n];i[n]=1;let l=1/0,t=-1/0,f=1/0,u=-1/0;for(let x=0;x<c.length;x++){const{x:p,y:A}=a[c[x]];l=Math.min(l,p),t=Math.max(t,p),f=Math.min(f,A),u=Math.max(u,A);for(let R=-1;R<=1;R++)for(let m=-1;m<=1;m++){const L=p+m,M=A+R;if(L<0||M<0||L>=s||M>=e)continue;const E=o[M*s+L];E>=0&&!i[E]&&(i[E]=1,c.push(E))}}const y=c.length/((t-l+1)*(u-f+1));if(!(c.length>=I.LINE_LENGTH&&y<I.LINE_FILL))for(const x of c)r.push(a[x])}return r}static insides(a,s,e,o){const i=new Uint8Array(e*o);for(const t of a)i[t.y*e+t.x]=1;for(const t of s)i[t.y*e+t.x]=2;const r=new Uint8Array(e*o),n=[],c=t=>{i[t]||r[t]||(r[t]=1,n.push(t))};for(let t=0;t<e;t++)c(t),c((o-1)*e+t);for(let t=0;t<o;t++)c(t*e),c(t*e+e-1);for(;n.length>0;){const t=n.pop(),f=t%e,u=(t-f)/e;f>0&&c(t-1),f<e-1&&c(t+1),u>0&&c(t-e),u<o-1&&c(t+e)}const l=[];for(let t=0;t<i.length;t++)!i[t]&&!r[t]&&l.push({x:t%e,y:Math.floor(t/e),weight:I.INSIDE_WEIGHT});return l}static whole(a,s,e,o,i){const r=4*Math.sqrt(a.length/Math.PI)+.06*Math.hypot(o,i);let n=0,c=0;for(const A of a)n+=A%o,c+=Math.floor(A/o);n/=a.length,c/=a.length;const l=A=>s[A]<I.LIGHT&&s[A]-e[A]>I.STANDS_OUT/2,t=new Uint8Array(o*i),f=a.filter(l);for(const A of f)t[A]=1;const u=[...f];for(;f.length>0;){const A=f.pop(),R=A%o,m=(A-R)/o;for(const[L,M]of[[1,0],[-1,0],[0,1],[0,-1]]){const E=R+L,O=m+M;if(E<0||O<0||E>=o||O>=i)continue;const P=O*o+E;t[P]||!l(P)||Math.hypot(E-n,O-c)>r||(t[P]=1,u.push(P),f.push(P))}}if(u.length<a.length)return a;let y=0,x=0;for(const A of u)y+=A%o,x+=Math.floor(A/o);return Math.hypot(y/u.length-n,x/u.length-c)<=Math.sqrt(a.length/Math.PI)+I.GROWN_DRIFT*Math.hypot(o,i)?u:a}static spotOf(a,s,e,o){let i=0,r=0,n=0,c=0,l=0;for(const f of a){const u=Math.max(1,s[f]-e[f]);i+=u,r+=u*(f%o),n+=u*Math.floor(f/o),c=Math.max(c,s[f]),l+=e[f]}const t=l/a.length;return{x:r/i,y:n/i,peak:c,contrast:c-t,background:t,radius:Math.sqrt(a.length/Math.PI),color:[c,c,c]}}static luminanceOf(a,s,e){const o=new Float32Array(s*e),i=new Float32Array(s*e),r=s/a.width,n=e/a.height;for(let c=0;c<a.height;c++){const l=Math.min(e-1,Math.floor(c*n));for(let t=0;t<a.width;t++){const f=(c*a.width+t)*4,u=l*s+Math.min(s-1,Math.floor(t*r));o[u]+=.2126*a.data[f]+.7152*a.data[f+1]+.0722*a.data[f+2],i[u]++}}for(let c=0;c<o.length;c++)o[c]/=Math.max(1,i[c]);return o}static blurred(a,s,e,o){const i=new Float64Array((s+1)*(e+1));for(let n=0;n<e;n++){let c=0;for(let l=0;l<s;l++)c+=a[n*s+l],i[(n+1)*(s+1)+l+1]=i[n*(s+1)+l+1]+c}const r=new Float32Array(s*e);for(let n=0;n<e;n++){const c=Math.max(0,n-o),l=Math.min(e,n+o+1);for(let t=0;t<s;t++){const f=Math.max(0,t-o),u=Math.min(s,t+o+1),y=i[l*(s+1)+u]-i[c*(s+1)+u]-i[l*(s+1)+f]+i[c*(s+1)+f];r[n*s+t]=y/((u-f)*(l-c))}}return r}}class g{static OTHER_SCALES=[-2,-1.8,-1.6,-1.4,-1.3,-1.2,-1.1,-.9,-.8,-.7,-.6,-.5,-.4,-.3,.3,.4,.5,.6,.7,.8];static DARK=80;static LARGE_LIGHT_CONTRAST=80;static DOMINATED=.4;static GRID_STEP=2;static GRID_REACH=.12;static ABOVE_CHANCE=1.5;static GREAT_LIGHTS=3;static LONE_REACH=.15;static GROUND_ALIKE=40;static EVEN_ALIKE=20;static CHANCE_ALONE=.5;static CROPPED=.04;static GLARE_SIZE=2;static GLARE_REACH=2.5;static SATURATED=250;static LOST_IN_GLARE=40;static OUT_OF_GLARE=2.5;static SPOT_GHOST_CONTRAST=40;static SHARP_MIRROR=1.5;static SHAPE_MATCHED=25;static MAX_SPOTS=2e3;static find(a){const s=g.searched(a);return{...s,pairs:s.pairs.map(e=>({...e,light:g.glaringOver(e.light,s.lights)}))}}static searched(a){const{width:s,height:e}=a,o=Math.hypot(s,e),i=g.spotsOf(a),r=i.reduce((h,d)=>Math.max(h,d.peak),0),n=Math.min(235,.9*r),c=g.linesOfLight(a,n),l=i.filter(h=>!c[Math.round(h.y)*s+Math.round(h.x)]),t=l.filter(h=>h.peak>=n&&(h.radius<=.025*o?h.contrast>=40:h.contrast>=g.LARGE_LIGHT_CONTRAST)),f=t.reduce((h,d)=>Math.max(h,d.radius),0),u=l.filter(h=>t.includes(h)?h.radius<=g.DOMINATED*f&&h.contrast>=g.LARGE_LIGHT_CONTRAST:h.background<g.DARK&&h.peak>=2*h.background),y={width:s,height:e,lights:t,spots:l,pairs:[],confidence:"none"},x=()=>g.mirrored(a,t,l);if(t.length===0||u.length===0)return x()??y;const p=.006*o,A=h=>h.reduce((d,S)=>d+Math.max(0,1-S.residualPx/p)**2,0),R=g.GRID_STEP*p,m=g.GRID_REACH*o,L=[];for(let h=e/2-m;h<=e/2+m;h+=R)for(let d=s/2-m;d<=s/2+m;d+=R)L.push({x:d,y:h});const M=(h,d=u)=>{let S;for(const k of[...g.voted(d,t,h,s,e),...h===-1?L:[]]){const D=g.fit(d,t,k,h,p);if(!D)continue;const H=A(D.pairs);(!S||H>S.score)&&(S={...D,scale:h,score:H})}return S};let E=M(-1);for(const h of g.OTHER_SCALES){const d=M(h),S=E?.pairs.length??0;d&&d.pairs.length>=Math.max(3,1.5*S,S+2)&&d.score>(E?.score??0)&&(E=d)}let O;if(E&&E.pairs.length>=2){const h=E.scale,d=[[-1,1],[1,-1],[-1,-1]].map(([k,D])=>M(h,u.map(H=>({...H,x:k<0?s-H.x:H.x,y:D<0?e-H.y:H.y})))?.score??0),S=d.reduce((k,D)=>k+D,0)/d.length;if(E.score>g.ABOVE_CHANCE*S){const k=Math.hypot(E.centre.x-s/2,E.centre.y-e/2)/o;if(O={width:s,height:e,lights:t,spots:l,pairs:E.pairs,centre:E.centre,scale:E.scale,cropped:k>g.CROPPED,confidence:E.pairs.length>=3?"high":"low"},O.confidence==="high")return O}}const P=l.filter(h=>u.includes(h)||h.contrast>=g.LARGE_LIGHT_CONTRAST&&h.peak>=Math.min(g.SATURATED,1.5*h.background)),N=x(),C=[...t,...l.filter(h=>h.peak>=g.SATURATED&&!t.includes(h))],T=()=>g.loneGhost(l,C,P,s,e,p,t);if(N&&N.pairs.length===1){const h=T(),d=S=>Math.hypot(S.centre.x-s/2,S.centre.y-e/2);return h&&d(h)<d(N)?h:N}return N??O??T()??y}static mirrored(a,s,e){const o=I.find(a,g.SHARP_MIRROR);if(!o)return;const{width:i,height:r}=a,n=Math.hypot(i,r),c=g.atAxis(e,s,o.centre,.006*n),l=c.length>=2?[...c,...o.pairs.filter(u=>!c.some(y=>Math.hypot(y.ghost.x-u.ghost.x,y.ghost.y-u.ghost.y)<=u.ghost.radius))]:o.pairs,t=o.centre,f=Math.hypot(t.x-i/2,t.y-r/2)/n;return{width:i,height:r,lights:s,spots:e,pairs:l,centre:t,scale:-1,cropped:f>g.CROPPED,confidence:l.length>=2||o.matched>=g.SHAPE_MATCHED?"high":"low"}}static glaringOver(a,s){let e=a;for(const o of s)o.radius>=g.GLARE_SIZE*a.radius&&o.radius>e.radius&&Math.hypot(o.x-a.x,o.y-a.y)<=g.GLARE_REACH*o.radius&&(e=o);return e}static atAxis(a,s,e,o){const i=[];for(const r of a.filter(n=>n.contrast>=g.SPOT_GHOST_CONTRAST)){const n={x:2*e.x-r.x,y:2*e.y-r.y};let c;for(const l of s){if(!g.canBeGhostOf(r,l))continue;const t=Math.max(0,Math.hypot(l.x-n.x,l.y-n.y)-l.radius);t<=o&&(!c||t<c.beyond)&&(c={light:l,beyond:t})}!c||!g.apart(r,c.light)||i.some(l=>Math.hypot(l.ghost.x-r.x,l.ghost.y-r.y)<Math.max(2,l.ghost.radius,r.radius))||i.push({ghost:r,light:{...c.light,...n},residualPx:c.beyond})}return i.filter(r=>!i.some(n=>n!==r&&n.ghost.radius<r.ghost.radius&&Math.hypot(n.ghost.x-r.ghost.x,n.ghost.y-r.ghost.y)<r.ghost.radius))}static loneGhost(a,s,e,o,i,r,n){const c=Math.hypot(o,i),l=[...s].sort((p,A)=>A.contrast*A.radius**2-p.contrast*p.radius**2).slice(0,g.GREAT_LIGHTS);let t;for(const p of l){const A={x:o-p.x,y:i-p.y},R=e.filter(m=>m!==p&&g.canBeGhostOf(m,p)&&Math.hypot(m.x-A.x,m.y-A.y)<=g.LONE_REACH*c&&g.apart(m,p));for(const m of R){const L=e.filter(O=>O.contrast>=m.contrast&&g.canBeGhostOf(O,p)&&g.groundsAlike(O,m)).length,M=Math.hypot(m.x-A.x,m.y-A.y)+r,E=L*Math.PI*M**2/(o*i);(!t||E<t.chance)&&(t={pair:{ghost:m,light:p,residualPx:0},chance:E})}}if(!t||t.chance>=g.CHANCE_ALONE)return;const{ghost:f,light:u}=t.pair,y={x:(f.x+u.x)/2,y:(f.y+u.y)/2},x=Math.hypot(y.x-o/2,y.y-i/2)/c;return{width:o,height:i,lights:n,spots:a,pairs:[t.pair],centre:y,scale:-1,cropped:x>g.CROPPED,confidence:"low"}}static groundsAlike(a,s){const e=Math.max(g.EVEN_ALIKE,a.spread??0,s.spread??0);return Math.abs(a.background-s.background)<=g.GROUND_ALIKE&&Math.abs((a.spread??0)-(s.spread??0))<=e/2}static lightCells=new WeakMap;static lightsNear(a,s){let e=g.lightCells.get(a);if(!e||e.cell!==s){const i=new Map;for(const r of a){const n=g.cellKey(Math.floor(r.x/s),Math.floor(r.y/s)),c=i.get(n);c?c.push(r):i.set(n,[r])}e={cell:s,cells:i},g.lightCells.set(a,e)}const{cells:o}=e;return(i,r)=>{const n=Math.floor(i/s),c=Math.floor(r/s),l=[];for(let t=-1;t<=1;t++)for(let f=-1;f<=1;f++){const u=o.get(g.cellKey(n+t,c+f));u&&l.push(...u)}return l}}static cellKey(a,s){return(a+5e4)*1e5+s+5e4}static linesOfLight(a,s){const{width:e,height:o,data:i}=a,r=[];for(let c=0;c<o;c++)for(let l=0;l<e;l++){const t=(c*e+l)*4;.2126*i[t]+.7152*i[t+1]+.0722*i[t+2]>=s&&r.push({x:l,y:c})}const n=new Uint8Array(e*o);for(const c of r)n[c.y*e+c.x]=1;for(const c of I.withoutLines(r,e,o))n[c.y*e+c.x]=0;return n}static apart(a,s){return Math.hypot(a.x-s.x,a.y-s.y)>=Math.max(4*a.radius,g.OUT_OF_GLARE*s.radius)}static canBeGhostOf(a,s){return a!==s&&(a.peak<s.peak-5||a.radius<=g.DOMINATED*s.radius)}static voted(a,s,e,o,i){const r=.01*Math.hypot(o,i),n=new Map;for(const l of a)for(const t of s){if(!g.canBeGhostOf(l,t))continue;const f=(l.x-e*t.x)/(1-e),u=(l.y-e*t.y)/(1-e);if(f<-.25*o||f>1.25*o||u<-.25*i||u>1.25*i||!g.apart(l,t))continue;const y=`${Math.floor(f/r)},${Math.floor(u/r)}`,x=n.get(y)??{count:0,x:0,y:0};x.count++,x.x+=f,x.y+=u,n.set(y,x)}const c=[...n.entries()].map(([l,t])=>{const[f,u]=l.split(",").map(Number);let y=0,x=0,p=0;for(let A=-1;A<=1;A++)for(let R=-1;R<=1;R++){const m=n.get(`${f+A},${u+R}`);m&&(y+=m.count,x+=m.x,p+=m.y)}return{count:y,centre:{x:x/y,y:p/y},own:t.count}});return c.sort((l,t)=>t.count-l.count||t.own-l.own),c.filter(l=>l.count>=1).slice(0,60).map(l=>l.centre)}static fit(a,s,e,o,i){let r=e,n=[];const c=g.lightsNear(s,3*i);for(const t of[3,2,1,1]){const f=[];for(const y of a){const x=r.x+(y.x-r.x)/o,p=r.y+(y.y-r.y)/o;let A,R=1/0;for(const m of c(x,p)){if(!g.canBeGhostOf(y,m))continue;const L=Math.hypot(m.x-x,m.y-p);L<R&&(R=L,A=m)}A&&R<=t*i&&g.apart(y,A)&&f.push({ghost:y,light:A,residualPx:R*Math.abs(o)})}const u=new Map;for(const y of f){const x=u.get(y.light);(!x||y.residualPx<x.residualPx)&&u.set(y.light,y)}if(n=[...u.values()],n.length===0)return;r={x:n.reduce((y,x)=>y+(x.ghost.x-o*x.light.x)/(1-o),0)/n.length,y:n.reduce((y,x)=>y+(x.ghost.y-o*x.light.y)/(1-o),0)/n.length}}for(const t of n)t.residualPx=Math.hypot(t.ghost.x-(r.x+o*(t.light.x-r.x)),t.ghost.y-(r.y+o*(t.light.y-r.y)));const l=Math.sqrt(n.reduce((t,f)=>t+f.residualPx**2,0)/n.length);return{pairs:n,centre:r,error:l}}static spotsOf(a){const{width:s,height:e,data:o}=a,i=new Float32Array(s*e);for(let t=0;t<s*e;t++)i[t]=.2126*o[t*4]+.7152*o[t*4+1]+.0722*o[t*4+2];const r=Math.max(2,Math.round(Math.hypot(s,e)/500)),n=3*r,c=[];for(let t=n;t<e-n;t++)for(let f=n;f<s-n;f++){const u=i[t*s+f];if(u<40)continue;let y=!0;for(let T=-r;T<=r&&y;T++)for(let h=-r;h<=r;h++){const d=i[(t+T)*s+f+h];if(d>u||d===u&&(T<0||T===0&&h<0)){y=!1;break}}if(!y)continue;let x=-1/0,p=0,A=n,R=0;for(const T of[n,2*n,4*n,8*n,16*n]){if(f<T||t<T||f>=s-T||t>=e-T||T>4*n&&(u<g.SATURATED||x>=g.LOST_IN_GLARE))break;const h=[];for(let S=0;S<32;S++){const k=S/32*2*Math.PI;h.push(i[Math.round(t+T*Math.sin(k))*s+Math.round(f+T*Math.cos(k))])}h.sort((S,k)=>S-k);const d=h[16];u-d>x+5&&(x=u-d,p=d,A=T,R=h[24]-h[8])}if(x<20)continue;const m=p+x/2;let L=0,M=0,E=0,O=0,P=0,N=0,C=0;for(let T=-A+1;T<A;T++)for(let h=-A+1;h<A;h++){const d=(t+T)*s+f+h;if(i[d]<m)continue;L++,M+=o[d*4],E+=o[d*4+1],O+=o[d*4+2];const S=i[d]-m+1;P+=S,N+=S*h,C+=S*T}c.push({x:f+N/P,y:t+C/P,peak:u,contrast:x,background:p,radius:Math.sqrt(L/Math.PI),color:[M/L,E/L,O/L],spread:R})}c.sort((t,f)=>f.contrast-t.contrast);const l=[];for(const t of c){if(l.length>=g.MAX_SPOTS)break;l.some(f=>f.peak>=t.peak&&Math.hypot(f.x-t.x,f.y-t.y)<Math.max(f.radius,r))||l.push(t)}return l}}class U{constructor(a,s){this.status=a,this.texts=s}static ANALYSIS_SIZE=1600;async search(a){this.status.textContent=this.texts.searching;let s;try{s=await U.load(a)}catch{this.status.textContent="";return}const e=Math.min(1,U.ANALYSIS_SIZE/Math.max(s.naturalWidth,s.naturalHeight)),o=Math.round(s.naturalWidth*e),i=Math.round(s.naturalHeight*e),r=document.createElement("canvas");r.width=o,r.height=i;const n=r.getContext("2d",{willReadFrequently:!0});n.drawImage(s,0,0,o,i);const c=n.getImageData(0,0,o,i);await new Promise(t=>setTimeout(t,0));const l=g.find(c);return this.status.textContent=this.sentence(l),l}sentence(a){const s=String(a.pairs.length);if(a.confidence==="none")return this.texts.none;const e=a.confidence==="low"?this.texts.low.replace("{count}",s):a.scale===-1?this.texts.found.replace("{count}",s):this.texts.foundScaled.replace("{count}",s).replace("{scale}",(a.scale??0).toLocaleString(void 0,{maximumFractionDigits:2}));return a.cropped?`${e} ${this.texts.cropped}`:e}static async load(a){const s=URL.createObjectURL(await K.blob(a));try{const e=new Image;return e.src=s,await e.decode().catch(()=>{throw new W(a,{kind:"notPicture"})}),e}finally{URL.revokeObjectURL(s)}}}export{U as GhostSearchView};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import{bF as A,bb as g,b7 as P,bg as C,bj as E,br as L,b4 as x,bE as R,bG as I}from"./ShareDialogElement-C3HL-Smq.js";import{H as h}from"./Decor-Dn-cvniW.js";import"./rr0-ufoathome.mjs";import"./SaidPosition-CWiVNaNW.js";import"./Sighting-CBpJpdm9.js";import"./VisualAids-DI-hEL46.js";import"./RecordingIssue-BlWT8Xsu.js";import"./Obstacles-v9SkfBD7.js";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),M=Math.max(u,i.CLEAR_AIR_SCATTER_PER_M);if(!c)return;const l=h.BEAMS[t],f=new P(-n.z,0,n.x),w=e==="observer"&&l!==void 0;c.lamps.forEach((s,m)=>{if(!l){s.intensity=0,c.air[m].visible=!1,s.shadow.autoUpdate=!1;return}const v=m===0?-1:1,d=l.pitchDeg*Math.PI/180,p=l.candela*h.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(f,v*a);const b=n.clone().addScaledVector(f,-v*Math.tan(h.TOE_IN_DEG*Math.PI/180)).normalize();s.target.position.set(s.position.x+b.x*Math.cos(d)*50,s.position.y-Math.sin(d)*50,s.position.z+b.z*Math.cos(d)*50),s.target.updateMatrixWorld(),this.aimAir(c.air[m],s,l.color,p,M)})}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
|
+
varying vec3 vLocal;
|
|
3
|
+
varying vec3 vNormalView;
|
|
4
|
+
varying vec3 vViewDir;
|
|
5
|
+
void main() {
|
|
6
|
+
vLocal = position;
|
|
7
|
+
vec4 viewPosition = modelViewMatrix * vec4(position, 1.0);
|
|
8
|
+
// The side's normal, out of the axis: the apex has none (its length is nought), and a normal of nought there would spread NaN over the whole cone.
|
|
9
|
+
float ring = length(position.xy);
|
|
10
|
+
vec3 outward = ring > 1e-5 ? vec3(position.xy / ring, 0.0) : vec3(0.0, 0.0, 1.0);
|
|
11
|
+
vNormalView = normalize(normalMatrix * outward);
|
|
12
|
+
vViewDir = -viewPosition.xyz;
|
|
13
|
+
gl_Position = projectionMatrix * viewPosition;
|
|
14
|
+
}`,fragmentShader:`
|
|
15
|
+
uniform vec3 uColor;
|
|
16
|
+
uniform float uCandela;
|
|
17
|
+
uniform float uScatter;
|
|
18
|
+
uniform float uLength;
|
|
19
|
+
uniform float uRadius;
|
|
20
|
+
varying vec3 vLocal;
|
|
21
|
+
varying vec3 vNormalView;
|
|
22
|
+
varying vec3 vViewDir;
|
|
23
|
+
void main() {
|
|
24
|
+
float t = clamp(vLocal.z, 0.0, 1.0);
|
|
25
|
+
float distanceM = max(t * uLength, 1.5);
|
|
26
|
+
// The chord a ray makes through a cone of this thickness: long going along the beam, short going across its edge.
|
|
27
|
+
float facing = abs(dot(normalize(vNormalView), normalize(vViewDir + vec3(0.0, 0.0, 1e-4))));
|
|
28
|
+
float chord = 2.0 * uRadius * t * (0.25 + 0.75 * facing);
|
|
29
|
+
// The beam's own profile averaged over the chord: strongest on the axis, none at the edge of the cone.
|
|
30
|
+
float profile = 0.55;
|
|
31
|
+
float radiance = uScatter * uCandela * chord * profile / (distanceM * distanceM + 9.0);
|
|
32
|
+
float ends = (1.0 - smoothstep(0.75, 1.0, t)) * smoothstep(0.0, 0.04, t);
|
|
33
|
+
gl_FragColor = vec4(uColor * radiance * ends, 1.0);
|
|
34
|
+
}`})}}export{i as HeadlightSystem};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as p,m as n}from"./ShareDialogElement-C3HL-Smq.js";import{N as c}from"./NearestApproach-DnGPayAo.js";import"./rr0-ufoathome.mjs";import"./SaidPosition-CWiVNaNW.js";import"./Sighting-CBpJpdm9.js";import"./VisualAids-DI-hEL46.js";import"./Decor-Dn-cvniW.js";import"./RecordingIssue-BlWT8Xsu.js";import"./Obstacles-v9SkfBD7.js";const m=-6,l=150;class s{about="temporal";async assess(e){const t=s.daylight(e),o=e.decor.map((a,d)=>({object:a,index:d})).filter(({object:a})=>a.kind==="entity"),i=c.of(e),r=i!==void 0&&i.m<=l;return{verdict:o.length>0?"ce3":r?"ce1":t===void 0?void 0:t?"dd":"nl",criteria:[{id:"entities",basis:o.length>0?"stated":void 0,paths:o.map(({index:a})=>`decor.${a}`)},{id:"traces",paths:[],unsupported:!0},{id:"proximity",basis:i?.basis,paths:i?.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],o=e.event.time;if(!t||!o)return;const i=p(o,t.lng,e.event.utcOffsetHours);if(i)return n("Sun",i,{lat:t.lat,lng:t.lng,elevationM:0}).altitudeDeg>m}}export{s as HynekAssessor};
|