@rr0/ufoathome 0.192.1 → 0.194.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-B9iaGKNP.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-DzwFIDZZ.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-D0GXupCT.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-BfxNhmfn.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 +456 -393
- 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-DXRO-h2K.js +1 -0
- package/dist-embed-ufoathome/AssemblyAiTranscriptionProvider-o2kkPD5o.js +1 -0
- package/dist-embed-ufoathome/BallesterGuaspAssessor-ZSDHMhXN.js +1 -0
- package/dist-embed-ufoathome/BeamEditor-BvF4J204.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-Yg5JRiCT.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-CRJFVGzZ.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-MwO-zwnP.js +3049 -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-Ch0QzF7-.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-D9YyGZHP.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-CnP5rqaK.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-O_yvjart.js +1 -0
- package/dist-embed-ufoathome/ControlPasses-BaglOE-7.js +29 -0
- package/dist-embed-ufoathome/CoverageAssessor-CBh0sDI1.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-C8Uj-qTs.js +1 -0
- package/dist-embed-ufoathome/GLTFLoader-B4SVqjkZ.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-C-daFhc2.js +2 -0
- package/dist-embed-ufoathome/GeoJsonImport-CIftC0ws.js +1 -0
- package/dist-embed-ufoathome/GeographicFigures-N4WyX3J_.js +1 -0
- package/dist-embed-ufoathome/GhostSearchView-Dlhj3xWa.js +1 -0
- package/dist-embed-ufoathome/HeadlightSystem-7mtgTwud.js +34 -0
- package/dist-embed-ufoathome/HynekAssessor-DdoHR-Qt.js +1 -0
- package/dist-embed-ufoathome/InterviewEditorElement-BSXLlt4e.js +240 -0
- package/dist-embed-ufoathome/InterviewElement-Dwk9iHNv.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-CX-tTjIv.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-DUL1O57g.js +1 -0
- package/dist-embed-ufoathome/LaunchEditor-X_zWEOTY.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-CcfhClxb.js +1 -0
- package/dist-embed-ufoathome/LaunchSimulation-C9gbGzGM.js +1 -0
- package/dist-embed-ufoathome/ModelSource-BtuW2Ztg.js +1 -0
- package/dist-embed-ufoathome/ModelThumbnails-CacTTCW4.js +1 -0
- package/dist-embed-ufoathome/ModelViewer-BlFPQJAr.js +1 -0
- package/dist-embed-ufoathome/ModuleConformance-qYpBoQH9.js +2 -0
- package/dist-embed-ufoathome/ModuleSession-D4LhYKvL.js +3 -0
- package/dist-embed-ufoathome/ModuleThree-DLikU-uy.js +1 -0
- package/dist-embed-ufoathome/ModulesPanelElement-GY7cTQ5t.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-4ntSx6IQ.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-BLs4DkTI.js +1 -0
- package/dist-embed-ufoathome/PoherAssessor-6t5qvmJy.js +1 -0
- package/dist-embed-ufoathome/RailwaySystem-Dm-PbG_D.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-C7A3Kh3_.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-BlgfVSxb.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-Bv62TprV.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-DLr5u_tk.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-DuNE_Yt0.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-Cl5kzaIr.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-DXPI7_Vt.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-CTGGh-Y-.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-CVKKb8h6.js +1 -0
- package/dist-embed-ufoathome/thunder-DA48qs_v.wav +0 -0
- package/dist-embed-ufoathome/trafficRuntime-DvKPyJcx.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,6 @@
|
|
|
1
|
+
const c=`(function(){"use strict";class st{static S10_MAG_PER_ARCSEC2=10+2.5*Math.log10(3600*3600);static toMagPerArcsec2(t){return st.S10_MAG_PER_ARCSEC2-2.5*Math.log10(Math.max(t,1e-12))}static fromMagPerArcsec2(t){return 10**(.4*(st.S10_MAG_PER_ARCSEC2-t))}static latitudeOfRowCoord(t){const s=2*t-1;return 90*Math.sign(s)*s*s}static rowCoordOfLatitude(t){return(Math.sign(t)*Math.sqrt(Math.min(Math.abs(t),90)/90)+1)/2}static angleOfColumnCoord(t){return 180*t*t}static columnCoordOfAngle(t){return Math.sqrt(Math.min(Math.max(t,0),180)/180)}}class f{static LONGITUDE_STEPS=256;static LATITUDE_STEPS=128;static SUN_RADIUS_KPC=8.2;static SUN_HEIGHT_KPC=.02;static DISK_SCALE_LENGTH_KPC=2.6;static DISK_SCALE_HEIGHT_KPC=.3;static BULGE_SCALE_KPC=.5;static BULGE_FLATTENING=.6;static BULGE_TO_LOCAL_DISK=20;static DUST_SCALE_LENGTH_KPC=3.5;static DUST_SCALE_HEIGHT_KPC=.1;static EXTINCTION_MAG_PER_KPC=.8;static NEAR_LIMIT_KPC=.01;static FAR_LIMIT_KPC=40;static STEPS=192;static OPAQUE_MAG=15;static PEAK_MAG_PER_ARCSEC2=21;static PEAK_RADIANCE=6.278;static PEAK_LONGITUDE_DEG=0;static PEAK_LATITUDE_DEG=4.5;surfaceBrightnessS10(t,s){return this.radianceTowards(t,s)*f.anchor()}static anchor(){return st.fromMagPerArcsec2(f.PEAK_MAG_PER_ARCSEC2)/f.PEAK_RADIANCE}radianceTowards(t,s){return this.trace(t,s).light}extinctionTowards(t,s){return this.trace(t,s).extinctionMag}trace(t,s){const i=t*Math.PI/180,e=s*Math.PI/180,n=-Math.cos(e)*Math.cos(i),r=Math.cos(e)*Math.sin(i),c=Math.sin(e);let h=0,a=0,o=0;const l=Math.log(f.NEAR_LIMIT_KPC),M=Math.log(f.FAR_LIMIT_KPC)-l;for(let u=0;u<f.STEPS;u++){const x=Math.exp(l+M*u/(f.STEPS-1)),m=x-o;o=x;const d=x-m/2,y=f.SUN_RADIUS_KPC+d*n,_=d*r,w=f.SUN_HEIGHT_KPC+d*c,z=Math.hypot(y,_),E=Math.exp(-(z-f.SUN_RADIUS_KPC)/f.DISK_SCALE_LENGTH_KPC-Math.abs(w)/f.DISK_SCALE_HEIGHT_KPC),p=Math.hypot(z,w/f.BULGE_FLATTENING),T=f.BULGE_TO_LOCAL_DISK*Math.exp(-p/f.BULGE_SCALE_KPC);if(h+=(E+T)*m*10**(-.4*a),a+=f.EXTINCTION_MAG_PER_KPC*Math.exp(-(z-f.SUN_RADIUS_KPC)/f.DUST_SCALE_LENGTH_KPC-(Math.abs(w)-f.SUN_HEIGHT_KPC)/f.DUST_SCALE_HEIGHT_KPC)*m,a>f.OPAQUE_MAG)break}return{light:h,extinctionMag:a}}values=new Float32Array(f.LONGITUDE_STEPS*f.LATITUDE_STEPS);walked=0;get done(){return this.walked>=f.LATITUDE_STEPS}walk(t){const s=f.LONGITUDE_STEPS,i=Math.min(f.LATITUDE_STEPS,this.walked+t);for(;this.walked<i;this.walked++){const e=st.latitudeOfRowCoord((this.walked+.5)/f.LATITUDE_STEPS);for(let n=0;n<s;n++)this.values[this.walked*s+n]=this.radianceTowards(360*(n+.5)/s,e)}}harvest(){let t=Number.POSITIVE_INFINITY;for(const e of this.values)e<t&&(t=e);const s=f.anchor(),i=new Float32Array(this.values.length);for(let e=0;e<i.length;e++)i[e]=(this.values[e]-t)*s;return{width:f.LONGITUDE_STEPS,height:f.LATITUDE_STEPS,data:i}}}class L{static LONGITUDE_STEPS=128;static LATITUDE_STEPS=96;static RADIAL_FALLOFF=1.3;static FAN_EXPONENT=2.6;static SUBLIMATION_AU=.1;static NEAR_LIMIT_AU=.004;static FAR_LIMIT_AU=8;static STEPS=224;static LOBE_ASYMMETRY=[.7,-.2,-.81];static LOBE_WEIGHT=[.665,.33,.00541];static RIGHT_ANGLE_S10=200;static POLE_S10=77;surfaceBrightnessS10(t,s){return this.radianceTowards(t,s)*this.anchor()}anchored;anchor(){return this.anchored===void 0&&(this.anchored=L.RIGHT_ANGLE_S10/this.radianceTowards(90,0)),this.anchored}radianceTowards(t,s){const i=t*Math.PI/180,e=s*Math.PI/180,n=-Math.cos(e)*Math.cos(i),r=-Math.cos(e)*Math.sin(i),c=Math.sin(e),h=-n;let a=0,o=0;const l=Math.log(L.NEAR_LIMIT_AU),M=Math.log(L.FAR_LIMIT_AU)-l;for(let u=0;u<L.STEPS;u++){const x=Math.exp(l+M*u/(L.STEPS-1)),m=x-o;o=x;const d=x-m/2,y=1+d*n,_=d*r,w=d*c,z=Math.hypot(y,_,w);if(z<L.SUBLIMATION_AU)continue;const E=w/z,p=z**-1.3*Math.exp(-2.6*Math.abs(E)),T=(h-d)/z;a+=p*this.scattering(T)*m/(z*z)}return a}scattering(t){let s=0;for(let i=0;i<L.LOBE_ASYMMETRY.length;i++){const e=L.LOBE_ASYMMETRY[i],n=1+e*e-2*e*t;s+=L.LOBE_WEIGHT[i]*(1-e*e)/(4*Math.PI*n**1.5)}return s}values=new Float32Array(L.LONGITUDE_STEPS*L.LATITUDE_STEPS);walked=0;get done(){return this.walked>=L.LATITUDE_STEPS}walk(t){const s=L.LONGITUDE_STEPS,i=Math.min(L.LATITUDE_STEPS,this.walked+t);for(;this.walked<i;this.walked++){const e=st.latitudeOfRowCoord((this.walked+.5)/L.LATITUDE_STEPS);for(let n=0;n<s;n++){const r=st.angleOfColumnCoord((n+.5)/s);this.values[this.walked*s+n]=this.radianceTowards(r,e)}}}harvest(){const t=this.anchor();let s=Number.POSITIVE_INFINITY;for(const e of this.values)e<s&&(s=e);const i=new Float32Array(this.values.length);for(let e=0;e<i.length;e++)i[e]=(this.values[e]-s)*t;return{width:L.LONGITUDE_STEPS,height:L.LATITUDE_STEPS,data:i}}}const Rt=.05;class Et{static reflectance(t,s,i){const n=s/i*Math.sqrt(Math.max(0,1-t*t));if(n>=1)return 1;const r=Math.sqrt(Math.max(0,1-n*n)),c=(i*t-s*r)/(i*t+s*r),h=(s*t-i*r)/(s*t+i*r);return(c*c+h*h)/2}}class G{static RED_NM=656.3;static BLUE_NM=435.8;static ANCHOR_RED=1.3067;static ANCHOR_BLUE=1.317;static B=(G.ANCHOR_BLUE-G.ANCHOR_RED)/(1/(G.BLUE_NM*G.BLUE_NM)-1/(G.RED_NM*G.RED_NM));static A=G.ANCHOR_RED-G.B/(G.RED_NM*G.RED_NM);static indexAt(t){return G.A+G.B/(t*t)}}class B{static MAX_FACES=20;normals=new Float64Array(B.MAX_FACES*3);offsets=new Float64Array(B.MAX_FACES);faceCount=8;radius=1;set(t,s,i,e,n,r,c=0){let h=0,a=0,o=0;Math.abs(i)<.9?(h=-s,a=t,o=0):(h=0,a=-i,o=s);const l=Math.hypot(h,a,o)||1;h/=l,a/=l,o/=l;const M=s*o-i*a,u=i*h-t*o,x=t*a-s*h,m=n/2,d=r/2;for(let y=0;y<6;y++){const _=e+y*Math.PI/3,w=Math.cos(_),z=Math.sin(_);this.normals[y*3]=h*w+M*z,this.normals[y*3+1]=a*w+u*z,this.normals[y*3+2]=o*w+x*z,this.offsets[y]=m}if(this.normals[18]=t,this.normals[19]=s,this.normals[20]=i,this.offsets[6]=d,this.normals[21]=-t,this.normals[22]=-s,this.normals[23]=-i,this.offsets[7]=d,this.faceCount=8,c>0){const y=B.PYRAMID_TILT,_=Math.cos(y),w=Math.sin(y),z=Math.min(d,c*m*Math.tan(y)),E=d-z,p=_*E+w*m;for(let T=0;T<6;T++){const S=T*3,I=(8+T)*3,U=(14+T)*3;this.normals[I]=_*t+w*this.normals[S],this.normals[I+1]=_*s+w*this.normals[S+1],this.normals[I+2]=_*i+w*this.normals[S+2],this.normals[U]=-_*t+w*this.normals[S],this.normals[U+1]=-_*s+w*this.normals[S+1],this.normals[U+2]=-_*i+w*this.normals[S+2],this.offsets[8+T]=p,this.offsets[14+T]=p}this.faceCount=B.MAX_FACES}this.radius=Math.hypot(m*2/Math.sqrt(3),d)}static rollToward(t,s,i,e,n,r){let c,h,a;Math.abs(i)<.9?(c=-s,h=t,a=0):(c=0,h=-i,a=s);const o=Math.hypot(c,h,a)||1;c/=o,h/=o,a/=o;const l=s*a-i*h,M=i*c-t*a,u=t*h-s*c;return Math.atan2(e*l+n*M+r*u,e*c+n*h+r*a)}get aimRadius(){return this.radius}trace(t,s,i,e,n,r,c){let h=-s,a=t,o=0,l=Math.hypot(h,a,o);l<1e-6&&(h=1,a=0,o=0,l=1),h/=l,a/=l,o/=l;const M=s*o-i*a,u=i*h-t*o,x=t*a-s*h,m=h*e+M*n-t*this.radius*2,d=a*e+u*n-s*this.radius*2,y=o*e+x*n-i*this.radius*2;let _=-1,w=-1/0,z=1/0;for(let O=0;O<this.faceCount;O++){const H=this.normals[O*3],v=this.normals[O*3+1],rt=this.normals[O*3+2],tt=H*t+v*s+rt*i,et=this.offsets[O]-(H*m+v*d+rt*y);if(tt>1e-9){const V=et/tt;V<z&&(z=V)}else if(tt<-1e-9){const V=et/tt;V>w&&(w=V,_=O)}else if(et<0)return 0}if(_<0||w>=z)return 0;let E=0;const p=this.normals[_*3],T=this.normals[_*3+1],S=this.normals[_*3+2],I=-(p*t+T*s+S*i),U=Et.reflectance(I,1,r);c[E].x=t+2*I*p,c[E].y=s+2*I*T,c[E].z=i+2*I*S,c[E].weight=U,E++;const R=1/r,F=Math.sqrt(Math.max(0,1-R*R*(1-I*I)));let D=R*t+(R*I-F)*p,N=R*s+(R*I-F)*T,P=R*i+(R*I-F)*S,J=m+t*w,Y=d+s*w,K=y+i*w,W=1-U;for(let O=0;O<B.MAX_BOUNCES&&W>B.MIN_WEIGHT;O++){let H=-1,v=1/0;for(let Z=0;Z<this.faceCount;Z++){const at=this.normals[Z*3],It=this.normals[Z*3+1],Pt=this.normals[Z*3+2],Ct=at*D+It*N+Pt*P;if(Ct<=1e-9)continue;const zt=(this.offsets[Z]-(at*J+It*Y+Pt*K))/Ct;zt>1e-9&&zt<v&&(v=zt,H=Z)}if(H<0)break;const rt=this.normals[H*3],tt=this.normals[H*3+1],et=this.normals[H*3+2],V=rt*D+tt*N+et*P,_t=r*Math.sqrt(Math.max(0,1-V*V));if(J+=D*v,Y+=N*v,K+=P*v,_t<1){const Z=Math.sqrt(Math.max(0,1-_t*_t)),at=Et.reflectance(V,r,1);if(c[E].x=r*D-(r*V-Z)*rt,c[E].y=r*N-(r*V-Z)*tt,c[E].z=r*P-(r*V-Z)*et,c[E].weight=W*(1-at),E++,E>=c.length)return E;W*=at}const wt=2*V;D-=wt*rt,N-=wt*tt,P-=wt*et}return E}static MAX_BOUNCES=6;static PYRAMID_TILT=62*Math.PI/180;static MIN_WEIGHT=1e-4}class Q{static VIOLET_NM=400;static DEEP_RED_NM=700;static SAMPLES=Q.build(24);static build(t){const s=[];let i=0,e=0,n=0;for(let r=0;r<t;r++){const c=Q.VIOLET_NM+(r+.5)/t*(Q.DEEP_RED_NM-Q.VIOLET_NM),[h,a,o]=Q.colourMatching(c),l={wavelengthNm:c,r:Math.max(0,3.2406*h-1.5372*a-.4986*o),g:Math.max(0,-.9689*h+1.8758*a+.0415*o),b:Math.max(0,.0557*h-.204*a+1.057*o)};i+=l.r,e+=l.g,n+=l.b,s.push(l)}for(const r of s)r.r/=i,r.g/=e,r.b/=n;return s}static tristimulus(t,s,i){let e=0,n=0,r=0;for(let h=0;h<t.length;h++){const[a,o,l]=Q.colourMatching(t[h]);e+=a*s[h],n+=o*s[h],r+=l*s[h]}const c=683*i;return[e*c,n*c,r*c]}static scotopic(t){const s=t/1e3;return .992*Math.exp(-321.9*(s-.5)**2)}static linearSrgbOf([t,s,i]){return[3.2406*t-1.5372*s-.4986*i,-.9689*t+1.8758*s+.0415*i,.0557*t-.204*s+1.057*i]}static colourMatching(t){const s=(i,e,n)=>{const r=(t-i)/(t<i?e:n);return Math.exp(-.5*r*r)};return[1.056*s(599.8,37.9,31)+.362*s(442,16,26.7)-.065*s(501.1,20.4,26.2),.821*s(568.8,46.9,40.5)+.286*s(530.9,16.3,31.1),1.217*s(437,11.8,36)+.681*s(459,26,13.8)]}}class b{static AZIMUTH_BINS=512;static ALTITUDE_BINS=512;static DEFAULT_POPULATIONS=[{orientation:"tumbling",widthMicrons:50,lengthMicrons:50,share:.48},{orientation:"plate",widthMicrons:100,lengthMicrons:15,share:.27},{orientation:"column",widthMicrons:40,lengthMicrons:120,share:.18},{orientation:"parry",widthMicrons:40,lengthMicrons:120,share:.02},{orientation:"pyramidal",widthMicrons:40,lengthMicrons:120,share:.03,capFraction:.5},{orientation:"lowitz",widthMicrons:100,lengthMicrons:15,share:.02}];static DEFAULT_RARE_SHARE=Rt;static populationsFor(t){const s=Math.min(.9,Math.max(0,t));if(Math.abs(s-b.DEFAULT_RARE_SHARE)<1e-9)return b.DEFAULT_POPULATIONS;const i=(1-s)/(1-b.DEFAULT_RARE_SHARE);return b.DEFAULT_POPULATIONS.map(e=>e.orientation==="pyramidal"||e.orientation==="lowitz"?{...e,share:e.share/b.DEFAULT_RARE_SHARE*s}:{...e,share:e.share*i})}populations=b.DEFAULT_POPULATIONS;populationTotal=1;static WORST_TILT_DEG=180;static BEST_TILT_DEG=.5;static SOURCE_RADIUS_DEG=.265;static UNDEVIATED_DEG=.6;crystal=new B;emergent=Array.from({length:B.MAX_BOUNCES+2},()=>({x:0,y:0,z:0,weight:0}));tally=new Float32Array(b.AZIMUTH_BINS*b.ALTITUDE_BINS*3);radiance=new Float32Array(b.AZIMUTH_BINS*b.ALTITUDE_BINS*3);scratch=new Float32Array(b.AZIMUTH_BINS*b.ALTITUDE_BINS*3);seed=1;spare=0;hasSpare=!1;altitude=0;tilt=0;alignment=0;traced=0;begin(t,s,i=2654435769,e=b.DEFAULT_POPULATIONS){this.populations=e,this.populationTotal=e.reduce((r,c)=>r+c.share,0)||1,this.seed=i>>>0||1,this.hasSpare=!1,this.tally.fill(0),this.traced=0,this.altitude=t*Math.PI/180,this.alignment=Math.min(1,Math.max(0,s));const n=b.WORST_TILT_DEG*(b.BEST_TILT_DEG/b.WORST_TILT_DEG)**this.alignment;this.tilt=n*Math.PI/180}trace(t){const s=b.AZIMUTH_BINS,i=b.ALTITUDE_BINS,e=this.tally,n=b.SOURCE_RADIUS_DEG*Math.PI/180,r=Math.cos(b.UNDEVIATED_DEG*Math.PI/180),c=this.altitude;for(let h=0;h<t;h++){const a=this.pickPopulation();this.orient(a,this.tilt);const o=this.random()*2*Math.PI,l=n*Math.sqrt(this.random()),M=c+l*Math.sin(o),u=l*Math.cos(o)/Math.max(.05,Math.cos(c)),x=-Math.cos(M)*Math.cos(u),m=-Math.cos(M)*Math.sin(u),d=-Math.sin(M),y=this.crystal.aimRadius,_=(this.random()*2-1)*y,w=(this.random()*2-1)*y,z=4*y*y,E=Q.SAMPLES[this.random()*Q.SAMPLES.length|0],p=this.crystal.trace(x,m,d,_,w,G.indexAt(E.wavelengthNm),this.emergent);for(let T=0;T<p;T++){const S=this.emergent[T],I=Math.hypot(S.x,S.y,S.z);if(I<1e-9||S.weight<=0)continue;const U=S.x/I,R=S.y/I,F=S.z/I;if(U*x+R*m+F*d>r)continue;const D=Math.asin(Math.max(-1,Math.min(1,-F))),N=Math.abs(Math.atan2(-R,-U)),P=Math.min(s-1,N/Math.PI*s|0),Y=(Math.min(i-1,(D+Math.PI/2)/Math.PI*i|0)*s+P)*3,K=S.weight*z*Q.SAMPLES.length;e[Y]+=K*E.r,e[Y+1]+=K*E.g,e[Y+2]+=K*E.b}}this.traced+=t}get tracedRays(){return this.traced}harvest(){const t=b.AZIMUTH_BINS,s=b.ALTITUDE_BINS;return this.toRadiance(t,s),this.smooth(t,s),{width:t,height:s,data:this.radiance,sourceAltitudeDeg:this.altitude*180/Math.PI,alignment:this.alignment,rays:this.traced}}compute(t,s,i,e,n){return this.begin(t,s,e,n),this.trace(i),this.harvest()}toRadiance(t,s){const i=2*Math.PI/t,e=Math.max(1,this.traced),n=4*b.REFERENCE_MICRONS*b.REFERENCE_MICRONS;for(let r=0;r<s;r++){const c=Math.sin(r/s*Math.PI-Math.PI/2),h=Math.sin((r+1)/s*Math.PI-Math.PI/2),a=1/(i*(h-c)*e*n);for(let o=0;o<t;o++){const l=(r*t+o)*3;this.radiance[l]=this.tally[l]*a,this.radiance[l+1]=this.tally[l+1]*a,this.radiance[l+2]=this.tally[l+2]*a}}}static REFERENCE_MICRONS=50;smooth(t,s){const i=this.scratch,e=this.radiance;i.set(e);for(let r=0;r<s;r++){const c=r*t*3;for(let h=0;h<3;h++){let a=i[c+h];for(let o=0;o<t;o++){const l=c+o*3+h,M=o+1<t?i[l+3]:i[l];e[l]=(a+2*i[l]+M)/4,a=i[l]}}}i.set(e);const n=t*3;for(let r=0;r<s;r++){const c=r>0?-n:0,h=r+1<s?n:0,a=r*n;for(let o=a;o<a+n;o++)e[o]=(i[o+c]+2*i[o]+i[o+h])/4}}pickPopulation(){const t=this.random()*this.populationTotal;let s=0;for(const i of this.populations)if(s+=i.share,t<=s)return i;return this.populations[this.populations.length-1]}orient(t,s){const i=this.random()*2*Math.PI;let e=this.random()*2*Math.PI,n=0,r=0,c=1;switch(t.orientation){case"pyramidal":case"tumbling":{c=this.random()*2-1;const h=Math.sqrt(Math.max(0,1-c*c));n=h*Math.cos(i),r=h*Math.sin(i);break}case"plate":{c=this.spreadAboutAnAxis(s);const h=Math.sqrt(Math.max(0,1-c*c));n=h*Math.cos(i),r=h*Math.sin(i);break}case"column":case"parry":{c=this.spreadAboutAPlane(s);const h=Math.sqrt(Math.max(0,1-c*c));n=h*Math.cos(i),r=h*Math.sin(i),t.orientation==="parry"&&(e=Math.PI/2+this.gaussian()*s);break}}if(t.orientation==="lowitz"){const h=this.spreadAboutAPlane(s),a=Math.sqrt(Math.max(0,1-h*h)),o=a*Math.cos(i),l=a*Math.sin(i),M=h;let u=-M*o,x=-M*l,m=1-M*M;const d=Math.hypot(u,x,m)||1;u/=d,x/=d,m/=d;const y=l*m-M*x,_=M*u-o*m,w=o*x-l*u,z=this.random()*2*Math.PI;n=u*Math.cos(z)+y*Math.sin(z),r=x*Math.cos(z)+_*Math.sin(z),c=m*Math.cos(z)+w*Math.sin(z),e=B.rollToward(n,r,c,o,l,M)+Math.PI/6}this.crystal.set(n,r,c,e,t.widthMicrons,t.lengthMicrons,t.capFraction??0)}random(){this.seed=this.seed+1831565813>>>0;let t=this.seed;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}spreadAboutAnAxis(t){const s=1/Math.max(1e-6,t*t),i=Math.max(1e-12,this.random()),e=1+Math.log(i+(1-i)*Math.exp(-2*s))/s;return Math.max(-1,Math.min(1,e))}spreadAboutAPlane(t){for(let s=0;s<8;s++){const i=this.gaussian()*t;if(i>=-1&&i<=1)return i}return this.random()*2-1}gaussian(){if(this.hasSpare)return this.hasSpare=!1,this.spare;const t=Math.sqrt(-2*Math.log(Math.max(1e-12,this.random()))),s=2*Math.PI*this.random();return this.spare=t*Math.sin(s),this.hasSpare=!0,t*Math.cos(s)}}/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2010-2026 Three.js Authors
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
5
|
+
*/const At="185",ot=2e3,Tt=2001,pt={};function Lt(g){const t=g[0];if(typeof t=="string"&&t.startsWith("TSL:")){const s=g[1];s&&s.isStackTrace?g[0]+=" "+s.getLocation():g[1]='Stack trace not available. Enable "THREE.Node.captureStackTrace" to capture stack traces.'}return g}function ct(...g){g=Lt(g);const t="THREE."+g.shift();{const s=g[0];s&&s.isStackTrace?console.warn(s.getError(t)):console.warn(t,...g)}}function xt(...g){const t=g.join(" ");t in pt||(pt[t]=!0,ct(...g))}function C(g,t,s){return Math.max(t,Math.min(s,g))}class ft{static{ft.prototype.isVector2=!0}constructor(t=0,s=0){this.x=t,this.y=s}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}set(t,s){return this.x=t,this.y=s,this}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setComponent(t,s){switch(t){case 0:this.x=s;break;case 1:this.y=s;break;default:throw new Error("THREE.Vector2: index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("THREE.Vector2: index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y)}copy(t){return this.x=t.x,this.y=t.y,this}add(t){return this.x+=t.x,this.y+=t.y,this}addScalar(t){return this.x+=t,this.y+=t,this}addVectors(t,s){return this.x=t.x+s.x,this.y=t.y+s.y,this}addScaledVector(t,s){return this.x+=t.x*s,this.y+=t.y*s,this}sub(t){return this.x-=t.x,this.y-=t.y,this}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,s){return this.x=t.x-s.x,this.y=t.y-s.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t){return this.x*=t,this.y*=t,this}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}applyMatrix3(t){const s=this.x,i=this.y,e=t.elements;return this.x=e[0]*s+e[3]*i+e[6],this.y=e[1]*s+e[4]*i+e[7],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}clamp(t,s){return this.x=C(this.x,t.x,s.x),this.y=C(this.y,t.y,s.y),this}clampScalar(t,s){return this.x=C(this.x,t,s),this.y=C(this.y,t,s),this}clampLength(t,s){const i=this.length();return this.divideScalar(i||1).multiplyScalar(C(i,t,s))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(t){const s=Math.sqrt(this.lengthSq()*t.lengthSq());if(s===0)return Math.PI/2;const i=this.dot(t)/s;return Math.acos(C(i,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const s=this.x-t.x,i=this.y-t.y;return s*s+i*i}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,s){return this.x+=(t.x-this.x)*s,this.y+=(t.y-this.y)*s,this}lerpVectors(t,s,i){return this.x=t.x+(s.x-t.x)*i,this.y=t.y+(s.y-t.y)*i,this}equals(t){return t.x===this.x&&t.y===this.y}fromArray(t,s=0){return this.x=t[s],this.y=t[s+1],this}toArray(t=[],s=0){return t[s]=this.x,t[s+1]=this.y,t}fromBufferAttribute(t,s){return this.x=t.getX(s),this.y=t.getY(s),this}rotateAround(t,s){const i=Math.cos(s),e=Math.sin(s),n=this.x-t.x,r=this.y-t.y;return this.x=n*i-r*e+t.x,this.y=n*e+r*i+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Ut{constructor(t=0,s=0,i=0,e=1){this.isQuaternion=!0,this._x=t,this._y=s,this._z=i,this._w=e}static slerpFlat(t,s,i,e,n,r,c){let h=i[e+0],a=i[e+1],o=i[e+2],l=i[e+3],M=n[r+0],u=n[r+1],x=n[r+2],m=n[r+3];if(l!==m||h!==M||a!==u||o!==x){let d=h*M+a*u+o*x+l*m;d<0&&(M=-M,u=-u,x=-x,m=-m,d=-d);let y=1-c;if(d<.9995){const _=Math.acos(d),w=Math.sin(_);y=Math.sin(y*_)/w,c=Math.sin(c*_)/w,h=h*y+M*c,a=a*y+u*c,o=o*y+x*c,l=l*y+m*c}else{h=h*y+M*c,a=a*y+u*c,o=o*y+x*c,l=l*y+m*c;const _=1/Math.sqrt(h*h+a*a+o*o+l*l);h*=_,a*=_,o*=_,l*=_}}t[s]=h,t[s+1]=a,t[s+2]=o,t[s+3]=l}static multiplyQuaternionsFlat(t,s,i,e,n,r){const c=i[e],h=i[e+1],a=i[e+2],o=i[e+3],l=n[r],M=n[r+1],u=n[r+2],x=n[r+3];return t[s]=c*x+o*l+h*u-a*M,t[s+1]=h*x+o*M+a*l-c*u,t[s+2]=a*x+o*u+c*M-h*l,t[s+3]=o*x-c*l-h*M-a*u,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t,s,i,e){return this._x=t,this._y=s,this._z=i,this._w=e,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,s=!0){const i=t._x,e=t._y,n=t._z,r=t._order,c=Math.cos,h=Math.sin,a=c(i/2),o=c(e/2),l=c(n/2),M=h(i/2),u=h(e/2),x=h(n/2);switch(r){case"XYZ":this._x=M*o*l+a*u*x,this._y=a*u*l-M*o*x,this._z=a*o*x+M*u*l,this._w=a*o*l-M*u*x;break;case"YXZ":this._x=M*o*l+a*u*x,this._y=a*u*l-M*o*x,this._z=a*o*x-M*u*l,this._w=a*o*l+M*u*x;break;case"ZXY":this._x=M*o*l-a*u*x,this._y=a*u*l+M*o*x,this._z=a*o*x+M*u*l,this._w=a*o*l-M*u*x;break;case"ZYX":this._x=M*o*l-a*u*x,this._y=a*u*l+M*o*x,this._z=a*o*x-M*u*l,this._w=a*o*l+M*u*x;break;case"YZX":this._x=M*o*l+a*u*x,this._y=a*u*l+M*o*x,this._z=a*o*x-M*u*l,this._w=a*o*l-M*u*x;break;case"XZY":this._x=M*o*l-a*u*x,this._y=a*u*l-M*o*x,this._z=a*o*x+M*u*l,this._w=a*o*l+M*u*x;break;default:ct("Quaternion: .setFromEuler() encountered an unknown order: "+r)}return s===!0&&this._onChangeCallback(),this}setFromAxisAngle(t,s){const i=s/2,e=Math.sin(i);return this._x=t.x*e,this._y=t.y*e,this._z=t.z*e,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(t){const s=t.elements,i=s[0],e=s[4],n=s[8],r=s[1],c=s[5],h=s[9],a=s[2],o=s[6],l=s[10],M=i+c+l;if(M>0){const u=.5/Math.sqrt(M+1);this._w=.25/u,this._x=(o-h)*u,this._y=(n-a)*u,this._z=(r-e)*u}else if(i>c&&i>l){const u=2*Math.sqrt(1+i-c-l);this._w=(o-h)/u,this._x=.25*u,this._y=(e+r)/u,this._z=(n+a)/u}else if(c>l){const u=2*Math.sqrt(1+c-i-l);this._w=(n-a)/u,this._x=(e+r)/u,this._y=.25*u,this._z=(h+o)/u}else{const u=2*Math.sqrt(1+l-i-c);this._w=(r-e)/u,this._x=(n+a)/u,this._y=(h+o)/u,this._z=.25*u}return this._onChangeCallback(),this}setFromUnitVectors(t,s){let i=t.dot(s)+1;return i<1e-8?(i=0,Math.abs(t.x)>Math.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=i):(this._x=0,this._y=-t.z,this._z=t.y,this._w=i)):(this._x=t.y*s.z-t.z*s.y,this._y=t.z*s.x-t.x*s.z,this._z=t.x*s.y-t.y*s.x,this._w=i),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(C(this.dot(t),-1,1)))}rotateTowards(t,s){const i=this.angleTo(t);if(i===0)return this;const e=Math.min(1,s/i);return this.slerp(t,e),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let t=this.length();return t===0?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t){return this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,s){const i=t._x,e=t._y,n=t._z,r=t._w,c=s._x,h=s._y,a=s._z,o=s._w;return this._x=i*o+r*c+e*a-n*h,this._y=e*o+r*h+n*c-i*a,this._z=n*o+r*a+i*h-e*c,this._w=r*o-i*c-e*h-n*a,this._onChangeCallback(),this}slerp(t,s){let i=t._x,e=t._y,n=t._z,r=t._w,c=this.dot(t);c<0&&(i=-i,e=-e,n=-n,r=-r,c=-c);let h=1-s;if(c<.9995){const a=Math.acos(c),o=Math.sin(a);h=Math.sin(h*a)/o,s=Math.sin(s*a)/o,this._x=this._x*h+i*s,this._y=this._y*h+e*s,this._z=this._z*h+n*s,this._w=this._w*h+r*s,this._onChangeCallback()}else this._x=this._x*h+i*s,this._y=this._y*h+e*s,this._z=this._z*h+n*s,this._w=this._w*h+r*s,this.normalize();return this}slerpQuaternions(t,s,i){return this.copy(t).slerp(s,i)}random(){const t=2*Math.PI*Math.random(),s=2*Math.PI*Math.random(),i=Math.random(),e=Math.sqrt(1-i),n=Math.sqrt(i);return this.set(e*Math.sin(t),e*Math.cos(t),n*Math.sin(s),n*Math.cos(s))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,s=0){return this._x=t[s],this._y=t[s+1],this._z=t[s+2],this._w=t[s+3],this._onChangeCallback(),this}toArray(t=[],s=0){return t[s]=this._x,t[s+1]=this._y,t[s+2]=this._z,t[s+3]=this._w,t}fromBufferAttribute(t,s){return this._x=t.getX(s),this._y=t.getY(s),this._z=t.getZ(s),this._w=t.getW(s),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class k{static{k.prototype.isVector3=!0}constructor(t=0,s=0,i=0){this.x=t,this.y=s,this.z=i}set(t,s,i){return i===void 0&&(i=this.z),this.x=t,this.y=s,this.z=i,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,s){switch(t){case 0:this.x=s;break;case 1:this.y=s;break;case 2:this.z=s;break;default:throw new Error("THREE.Vector3: index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("THREE.Vector3: index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,s){return this.x=t.x+s.x,this.y=t.y+s.y,this.z=t.z+s.z,this}addScaledVector(t,s){return this.x+=t.x*s,this.y+=t.y*s,this.z+=t.z*s,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,s){return this.x=t.x-s.x,this.y=t.y-s.y,this.z=t.z-s.z,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,s){return this.x=t.x*s.x,this.y=t.y*s.y,this.z=t.z*s.z,this}applyEuler(t){return this.applyQuaternion(St.setFromEuler(t))}applyAxisAngle(t,s){return this.applyQuaternion(St.setFromAxisAngle(t,s))}applyMatrix3(t){const s=this.x,i=this.y,e=this.z,n=t.elements;return this.x=n[0]*s+n[3]*i+n[6]*e,this.y=n[1]*s+n[4]*i+n[7]*e,this.z=n[2]*s+n[5]*i+n[8]*e,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const s=this.x,i=this.y,e=this.z,n=t.elements,r=1/(n[3]*s+n[7]*i+n[11]*e+n[15]);return this.x=(n[0]*s+n[4]*i+n[8]*e+n[12])*r,this.y=(n[1]*s+n[5]*i+n[9]*e+n[13])*r,this.z=(n[2]*s+n[6]*i+n[10]*e+n[14])*r,this}applyQuaternion(t){const s=this.x,i=this.y,e=this.z,n=t.x,r=t.y,c=t.z,h=t.w,a=2*(r*e-c*i),o=2*(c*s-n*e),l=2*(n*i-r*s);return this.x=s+h*a+r*l-c*o,this.y=i+h*o+c*a-n*l,this.z=e+h*l+n*o-r*a,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){const s=this.x,i=this.y,e=this.z,n=t.elements;return this.x=n[0]*s+n[4]*i+n[8]*e,this.y=n[1]*s+n[5]*i+n[9]*e,this.z=n[2]*s+n[6]*i+n[10]*e,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,s){return this.x=C(this.x,t.x,s.x),this.y=C(this.y,t.y,s.y),this.z=C(this.z,t.z,s.z),this}clampScalar(t,s){return this.x=C(this.x,t,s),this.y=C(this.y,t,s),this.z=C(this.z,t,s),this}clampLength(t,s){const i=this.length();return this.divideScalar(i||1).multiplyScalar(C(i,t,s))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,s){return this.x+=(t.x-this.x)*s,this.y+=(t.y-this.y)*s,this.z+=(t.z-this.z)*s,this}lerpVectors(t,s,i){return this.x=t.x+(s.x-t.x)*i,this.y=t.y+(s.y-t.y)*i,this.z=t.z+(s.z-t.z)*i,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,s){const i=t.x,e=t.y,n=t.z,r=s.x,c=s.y,h=s.z;return this.x=e*h-n*c,this.y=n*r-i*h,this.z=i*c-e*r,this}projectOnVector(t){const s=t.lengthSq();if(s===0)return this.set(0,0,0);const i=t.dot(this)/s;return this.copy(t).multiplyScalar(i)}projectOnPlane(t){return mt.copy(this).projectOnVector(t),this.sub(mt)}reflect(t){return this.sub(mt.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){const s=Math.sqrt(this.lengthSq()*t.lengthSq());if(s===0)return Math.PI/2;const i=this.dot(t)/s;return Math.acos(C(i,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const s=this.x-t.x,i=this.y-t.y,e=this.z-t.z;return s*s+i*i+e*e}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromSpherical(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)}setFromSphericalCoords(t,s,i){const e=Math.sin(s)*t;return this.x=e*Math.sin(i),this.y=Math.cos(s)*t,this.z=e*Math.cos(i),this}setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}setFromCylindricalCoords(t,s,i){return this.x=t*Math.sin(s),this.y=i,this.z=t*Math.cos(s),this}setFromMatrixPosition(t){const s=t.elements;return this.x=s[12],this.y=s[13],this.z=s[14],this}setFromMatrixScale(t){const s=this.setFromMatrixColumn(t,0).length(),i=this.setFromMatrixColumn(t,1).length(),e=this.setFromMatrixColumn(t,2).length();return this.x=s,this.y=i,this.z=e,this}setFromMatrixColumn(t,s){return this.fromArray(t.elements,s*4)}setFromMatrix3Column(t,s){return this.fromArray(t.elements,s*3)}setFromEuler(t){return this.x=t._x,this.y=t._y,this.z=t._z,this}setFromColor(t){return this.x=t.r,this.y=t.g,this.z=t.b,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,s=0){return this.x=t[s],this.y=t[s+1],this.z=t[s+2],this}toArray(t=[],s=0){return t[s]=this.x,t[s+1]=this.y,t[s+2]=this.z,t}fromBufferAttribute(t,s){return this.x=t.getX(s),this.y=t.getY(s),this.z=t.getZ(s),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const t=Math.random()*Math.PI*2,s=Math.random()*2-1,i=Math.sqrt(1-s*s);return this.x=i*Math.cos(t),this.y=s,this.z=i*Math.sin(t),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const mt=new k,St=new Ut;class yt{static{yt.prototype.isMatrix3=!0}constructor(t,s,i,e,n,r,c,h,a){this.elements=[1,0,0,0,1,0,0,0,1],t!==void 0&&this.set(t,s,i,e,n,r,c,h,a)}set(t,s,i,e,n,r,c,h,a){const o=this.elements;return o[0]=t,o[1]=e,o[2]=c,o[3]=s,o[4]=n,o[5]=h,o[6]=i,o[7]=r,o[8]=a,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(t){const s=this.elements,i=t.elements;return s[0]=i[0],s[1]=i[1],s[2]=i[2],s[3]=i[3],s[4]=i[4],s[5]=i[5],s[6]=i[6],s[7]=i[7],s[8]=i[8],this}extractBasis(t,s,i){return t.setFromMatrix3Column(this,0),s.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(t){const s=t.elements;return this.set(s[0],s[4],s[8],s[1],s[5],s[9],s[2],s[6],s[10]),this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,s){const i=t.elements,e=s.elements,n=this.elements,r=i[0],c=i[3],h=i[6],a=i[1],o=i[4],l=i[7],M=i[2],u=i[5],x=i[8],m=e[0],d=e[3],y=e[6],_=e[1],w=e[4],z=e[7],E=e[2],p=e[5],T=e[8];return n[0]=r*m+c*_+h*E,n[3]=r*d+c*w+h*p,n[6]=r*y+c*z+h*T,n[1]=a*m+o*_+l*E,n[4]=a*d+o*w+l*p,n[7]=a*y+o*z+l*T,n[2]=M*m+u*_+x*E,n[5]=M*d+u*w+x*p,n[8]=M*y+u*z+x*T,this}multiplyScalar(t){const s=this.elements;return s[0]*=t,s[3]*=t,s[6]*=t,s[1]*=t,s[4]*=t,s[7]*=t,s[2]*=t,s[5]*=t,s[8]*=t,this}determinant(){const t=this.elements,s=t[0],i=t[1],e=t[2],n=t[3],r=t[4],c=t[5],h=t[6],a=t[7],o=t[8];return s*r*o-s*c*a-i*n*o+i*c*h+e*n*a-e*r*h}invert(){const t=this.elements,s=t[0],i=t[1],e=t[2],n=t[3],r=t[4],c=t[5],h=t[6],a=t[7],o=t[8],l=o*r-c*a,M=c*h-o*n,u=a*n-r*h,x=s*l+i*M+e*u;if(x===0)return this.set(0,0,0,0,0,0,0,0,0);const m=1/x;return t[0]=l*m,t[1]=(e*a-o*i)*m,t[2]=(c*i-e*r)*m,t[3]=M*m,t[4]=(o*s-e*h)*m,t[5]=(e*n-c*s)*m,t[6]=u*m,t[7]=(i*h-a*s)*m,t[8]=(r*s-i*n)*m,this}transpose(){let t;const s=this.elements;return t=s[1],s[1]=s[3],s[3]=t,t=s[2],s[2]=s[6],s[6]=t,t=s[5],s[5]=s[7],s[7]=t,this}getNormalMatrix(t){return this.setFromMatrix4(t).invert().transpose()}transposeIntoArray(t){const s=this.elements;return t[0]=s[0],t[1]=s[3],t[2]=s[6],t[3]=s[1],t[4]=s[4],t[5]=s[7],t[6]=s[2],t[7]=s[5],t[8]=s[8],this}setUvTransform(t,s,i,e,n,r,c){const h=Math.cos(n),a=Math.sin(n);return this.set(i*h,i*a,-i*(h*r+a*c)+r+t,-e*a,e*h,-e*(-a*r+h*c)+c+s,0,0,1),this}scale(t,s){return xt("Matrix3: .scale() is deprecated. Use .makeScale() instead."),this.premultiply(dt.makeScale(t,s)),this}rotate(t){return xt("Matrix3: .rotate() is deprecated. Use .makeRotation() instead."),this.premultiply(dt.makeRotation(-t)),this}translate(t,s){return xt("Matrix3: .translate() is deprecated. Use .makeTranslation() instead."),this.premultiply(dt.makeTranslation(t,s)),this}makeTranslation(t,s){return t.isVector2?this.set(1,0,t.x,0,1,t.y,0,0,1):this.set(1,0,t,0,1,s,0,0,1),this}makeRotation(t){const s=Math.cos(t),i=Math.sin(t);return this.set(s,-i,0,i,s,0,0,0,1),this}makeScale(t,s){return this.set(t,0,0,0,s,0,0,0,1),this}equals(t){const s=this.elements,i=t.elements;for(let e=0;e<9;e++)if(s[e]!==i[e])return!1;return!0}fromArray(t,s=0){for(let i=0;i<9;i++)this.elements[i]=t[i+s];return this}toArray(t=[],s=0){const i=this.elements;return t[s]=i[0],t[s+1]=i[1],t[s+2]=i[2],t[s+3]=i[3],t[s+4]=i[4],t[s+5]=i[5],t[s+6]=i[6],t[s+7]=i[7],t[s+8]=i[8],t}clone(){return new this.constructor().fromArray(this.elements)}}const dt=new yt;class gt{static{gt.prototype.isVector4=!0}constructor(t=0,s=0,i=0,e=1){this.x=t,this.y=s,this.z=i,this.w=e}get width(){return this.z}set width(t){this.z=t}get height(){return this.w}set height(t){this.w=t}set(t,s,i,e){return this.x=t,this.y=s,this.z=i,this.w=e,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this.w=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setW(t){return this.w=t,this}setComponent(t,s){switch(t){case 0:this.x=s;break;case 1:this.y=s;break;case 2:this.z=s;break;case 3:this.w=s;break;default:throw new Error("THREE.Vector4: index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("THREE.Vector4: index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w!==void 0?t.w:1,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this}addVectors(t,s){return this.x=t.x+s.x,this.y=t.y+s.y,this.z=t.z+s.z,this.w=t.w+s.w,this}addScaledVector(t,s){return this.x+=t.x*s,this.y+=t.y*s,this.z+=t.z*s,this.w+=t.w*s,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this}subVectors(t,s){return this.x=t.x-s.x,this.y=t.y-s.y,this.z=t.z-s.z,this.w=t.w-s.w,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this.w*=t.w,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}applyMatrix4(t){const s=this.x,i=this.y,e=this.z,n=this.w,r=t.elements;return this.x=r[0]*s+r[4]*i+r[8]*e+r[12]*n,this.y=r[1]*s+r[5]*i+r[9]*e+r[13]*n,this.z=r[2]*s+r[6]*i+r[10]*e+r[14]*n,this.w=r[3]*s+r[7]*i+r[11]*e+r[15]*n,this}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this.w/=t.w,this}divideScalar(t){return this.multiplyScalar(1/t)}setAxisAngleFromQuaternion(t){this.w=2*Math.acos(t.w);const s=Math.sqrt(1-t.w*t.w);return s<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/s,this.y=t.y/s,this.z=t.z/s),this}setAxisAngleFromRotationMatrix(t){let s,i,e,n;const h=t.elements,a=h[0],o=h[4],l=h[8],M=h[1],u=h[5],x=h[9],m=h[2],d=h[6],y=h[10];if(Math.abs(o-M)<.01&&Math.abs(l-m)<.01&&Math.abs(x-d)<.01){if(Math.abs(o+M)<.1&&Math.abs(l+m)<.1&&Math.abs(x+d)<.1&&Math.abs(a+u+y-3)<.1)return this.set(1,0,0,0),this;s=Math.PI;const w=(a+1)/2,z=(u+1)/2,E=(y+1)/2,p=(o+M)/4,T=(l+m)/4,S=(x+d)/4;return w>z&&w>E?w<.01?(i=0,e=.707106781,n=.707106781):(i=Math.sqrt(w),e=p/i,n=T/i):z>E?z<.01?(i=.707106781,e=0,n=.707106781):(e=Math.sqrt(z),i=p/e,n=S/e):E<.01?(i=.707106781,e=.707106781,n=0):(n=Math.sqrt(E),i=T/n,e=S/n),this.set(i,e,n,s),this}let _=Math.sqrt((d-x)*(d-x)+(l-m)*(l-m)+(M-o)*(M-o));return Math.abs(_)<.001&&(_=1),this.x=(d-x)/_,this.y=(l-m)/_,this.z=(M-o)/_,this.w=Math.acos((a+u+y-1)/2),this}setFromMatrixPosition(t){const s=t.elements;return this.x=s[12],this.y=s[13],this.z=s[14],this.w=s[15],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this}clamp(t,s){return this.x=C(this.x,t.x,s.x),this.y=C(this.y,t.y,s.y),this.z=C(this.z,t.z,s.z),this.w=C(this.w,t.w,s.w),this}clampScalar(t,s){return this.x=C(this.x,t,s),this.y=C(this.y,t,s),this.z=C(this.z,t,s),this.w=C(this.w,t,s),this}clampLength(t,s){const i=this.length();return this.divideScalar(i||1).multiplyScalar(C(i,t,s))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,s){return this.x+=(t.x-this.x)*s,this.y+=(t.y-this.y)*s,this.z+=(t.z-this.z)*s,this.w+=(t.w-this.w)*s,this}lerpVectors(t,s,i){return this.x=t.x+(s.x-t.x)*i,this.y=t.y+(s.y-t.y)*i,this.z=t.z+(s.z-t.z)*i,this.w=t.w+(s.w-t.w)*i,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w}fromArray(t,s=0){return this.x=t[s],this.y=t[s+1],this.z=t[s+2],this.w=t[s+3],this}toArray(t=[],s=0){return t[s]=this.x,t[s+1]=this.y,t[s+2]=this.z,t[s+3]=this.w,t}fromBufferAttribute(t,s){return this.x=t.getX(s),this.y=t.getY(s),this.z=t.getZ(s),this.w=t.getW(s),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class lt{static{lt.prototype.isMatrix4=!0}constructor(t,s,i,e,n,r,c,h,a,o,l,M,u,x,m,d){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],t!==void 0&&this.set(t,s,i,e,n,r,c,h,a,o,l,M,u,x,m,d)}set(t,s,i,e,n,r,c,h,a,o,l,M,u,x,m,d){const y=this.elements;return y[0]=t,y[4]=s,y[8]=i,y[12]=e,y[1]=n,y[5]=r,y[9]=c,y[13]=h,y[2]=a,y[6]=o,y[10]=l,y[14]=M,y[3]=u,y[7]=x,y[11]=m,y[15]=d,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new lt().fromArray(this.elements)}copy(t){const s=this.elements,i=t.elements;return s[0]=i[0],s[1]=i[1],s[2]=i[2],s[3]=i[3],s[4]=i[4],s[5]=i[5],s[6]=i[6],s[7]=i[7],s[8]=i[8],s[9]=i[9],s[10]=i[10],s[11]=i[11],s[12]=i[12],s[13]=i[13],s[14]=i[14],s[15]=i[15],this}copyPosition(t){const s=this.elements,i=t.elements;return s[12]=i[12],s[13]=i[13],s[14]=i[14],this}setFromMatrix3(t){const s=t.elements;return this.set(s[0],s[3],s[6],0,s[1],s[4],s[7],0,s[2],s[5],s[8],0,0,0,0,1),this}extractBasis(t,s,i){return this.determinantAffine()===0?(t.set(1,0,0),s.set(0,1,0),i.set(0,0,1),this):(t.setFromMatrixColumn(this,0),s.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this)}makeBasis(t,s,i){return this.set(t.x,s.x,i.x,0,t.y,s.y,i.y,0,t.z,s.z,i.z,0,0,0,0,1),this}extractRotation(t){if(t.determinantAffine()===0)return this.identity();const s=this.elements,i=t.elements,e=1/nt.setFromMatrixColumn(t,0).length(),n=1/nt.setFromMatrixColumn(t,1).length(),r=1/nt.setFromMatrixColumn(t,2).length();return s[0]=i[0]*e,s[1]=i[1]*e,s[2]=i[2]*e,s[3]=0,s[4]=i[4]*n,s[5]=i[5]*n,s[6]=i[6]*n,s[7]=0,s[8]=i[8]*r,s[9]=i[9]*r,s[10]=i[10]*r,s[11]=0,s[12]=0,s[13]=0,s[14]=0,s[15]=1,this}makeRotationFromEuler(t){const s=this.elements,i=t.x,e=t.y,n=t.z,r=Math.cos(i),c=Math.sin(i),h=Math.cos(e),a=Math.sin(e),o=Math.cos(n),l=Math.sin(n);if(t.order==="XYZ"){const M=r*o,u=r*l,x=c*o,m=c*l;s[0]=h*o,s[4]=-h*l,s[8]=a,s[1]=u+x*a,s[5]=M-m*a,s[9]=-c*h,s[2]=m-M*a,s[6]=x+u*a,s[10]=r*h}else if(t.order==="YXZ"){const M=h*o,u=h*l,x=a*o,m=a*l;s[0]=M+m*c,s[4]=x*c-u,s[8]=r*a,s[1]=r*l,s[5]=r*o,s[9]=-c,s[2]=u*c-x,s[6]=m+M*c,s[10]=r*h}else if(t.order==="ZXY"){const M=h*o,u=h*l,x=a*o,m=a*l;s[0]=M-m*c,s[4]=-r*l,s[8]=x+u*c,s[1]=u+x*c,s[5]=r*o,s[9]=m-M*c,s[2]=-r*a,s[6]=c,s[10]=r*h}else if(t.order==="ZYX"){const M=r*o,u=r*l,x=c*o,m=c*l;s[0]=h*o,s[4]=x*a-u,s[8]=M*a+m,s[1]=h*l,s[5]=m*a+M,s[9]=u*a-x,s[2]=-a,s[6]=c*h,s[10]=r*h}else if(t.order==="YZX"){const M=r*h,u=r*a,x=c*h,m=c*a;s[0]=h*o,s[4]=m-M*l,s[8]=x*l+u,s[1]=l,s[5]=r*o,s[9]=-c*o,s[2]=-a*o,s[6]=u*l+x,s[10]=M-m*l}else if(t.order==="XZY"){const M=r*h,u=r*a,x=c*h,m=c*a;s[0]=h*o,s[4]=-l,s[8]=a*o,s[1]=M*l+m,s[5]=r*o,s[9]=u*l-x,s[2]=x*l-u,s[6]=c*o,s[10]=m*l+M}return s[3]=0,s[7]=0,s[11]=0,s[12]=0,s[13]=0,s[14]=0,s[15]=1,this}makeRotationFromQuaternion(t){return this.compose(Dt,t,Ft)}lookAt(t,s,i){const e=this.elements;return q.subVectors(t,s),q.lengthSq()===0&&(q.z=1),q.normalize(),$.crossVectors(i,q),$.lengthSq()===0&&(Math.abs(i.z)===1?q.x+=1e-4:q.z+=1e-4,q.normalize(),$.crossVectors(i,q)),$.normalize(),ut.crossVectors(q,$),e[0]=$.x,e[4]=ut.x,e[8]=q.x,e[1]=$.y,e[5]=ut.y,e[9]=q.y,e[2]=$.z,e[6]=ut.z,e[10]=q.z,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,s){const i=t.elements,e=s.elements,n=this.elements,r=i[0],c=i[4],h=i[8],a=i[12],o=i[1],l=i[5],M=i[9],u=i[13],x=i[2],m=i[6],d=i[10],y=i[14],_=i[3],w=i[7],z=i[11],E=i[15],p=e[0],T=e[4],S=e[8],I=e[12],U=e[1],R=e[5],F=e[9],D=e[13],N=e[2],P=e[6],J=e[10],Y=e[14],K=e[3],W=e[7],O=e[11],H=e[15];return n[0]=r*p+c*U+h*N+a*K,n[4]=r*T+c*R+h*P+a*W,n[8]=r*S+c*F+h*J+a*O,n[12]=r*I+c*D+h*Y+a*H,n[1]=o*p+l*U+M*N+u*K,n[5]=o*T+l*R+M*P+u*W,n[9]=o*S+l*F+M*J+u*O,n[13]=o*I+l*D+M*Y+u*H,n[2]=x*p+m*U+d*N+y*K,n[6]=x*T+m*R+d*P+y*W,n[10]=x*S+m*F+d*J+y*O,n[14]=x*I+m*D+d*Y+y*H,n[3]=_*p+w*U+z*N+E*K,n[7]=_*T+w*R+z*P+E*W,n[11]=_*S+w*F+z*J+E*O,n[15]=_*I+w*D+z*Y+E*H,this}multiplyScalar(t){const s=this.elements;return s[0]*=t,s[4]*=t,s[8]*=t,s[12]*=t,s[1]*=t,s[5]*=t,s[9]*=t,s[13]*=t,s[2]*=t,s[6]*=t,s[10]*=t,s[14]*=t,s[3]*=t,s[7]*=t,s[11]*=t,s[15]*=t,this}determinant(){const t=this.elements,s=t[0],i=t[4],e=t[8],n=t[12],r=t[1],c=t[5],h=t[9],a=t[13],o=t[2],l=t[6],M=t[10],u=t[14],x=t[3],m=t[7],d=t[11],y=t[15],_=h*u-a*M,w=c*u-a*l,z=c*M-h*l,E=r*u-a*o,p=r*M-h*o,T=r*l-c*o;return s*(m*_-d*w+y*z)-i*(x*_-d*E+y*p)+e*(x*w-m*E+y*T)-n*(x*z-m*p+d*T)}determinantAffine(){const t=this.elements,s=t[0],i=t[4],e=t[8],n=t[1],r=t[5],c=t[9],h=t[2],a=t[6],o=t[10];return s*(r*o-c*a)-i*(n*o-c*h)+e*(n*a-r*h)}transpose(){const t=this.elements;let s;return s=t[1],t[1]=t[4],t[4]=s,s=t[2],t[2]=t[8],t[8]=s,s=t[6],t[6]=t[9],t[9]=s,s=t[3],t[3]=t[12],t[12]=s,s=t[7],t[7]=t[13],t[13]=s,s=t[11],t[11]=t[14],t[14]=s,this}setPosition(t,s,i){const e=this.elements;return t.isVector3?(e[12]=t.x,e[13]=t.y,e[14]=t.z):(e[12]=t,e[13]=s,e[14]=i),this}invert(){const t=this.elements,s=t[0],i=t[1],e=t[2],n=t[3],r=t[4],c=t[5],h=t[6],a=t[7],o=t[8],l=t[9],M=t[10],u=t[11],x=t[12],m=t[13],d=t[14],y=t[15],_=s*c-i*r,w=s*h-e*r,z=s*a-n*r,E=i*h-e*c,p=i*a-n*c,T=e*a-n*h,S=o*m-l*x,I=o*d-M*x,U=o*y-u*x,R=l*d-M*m,F=l*y-u*m,D=M*y-u*d,N=_*D-w*F+z*R+E*U-p*I+T*S;if(N===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const P=1/N;return t[0]=(c*D-h*F+a*R)*P,t[1]=(e*F-i*D-n*R)*P,t[2]=(m*T-d*p+y*E)*P,t[3]=(M*p-l*T-u*E)*P,t[4]=(h*U-r*D-a*I)*P,t[5]=(s*D-e*U+n*I)*P,t[6]=(d*z-x*T-y*w)*P,t[7]=(o*T-M*z+u*w)*P,t[8]=(r*F-c*U+a*S)*P,t[9]=(i*U-s*F-n*S)*P,t[10]=(x*p-m*z+y*_)*P,t[11]=(l*z-o*p-u*_)*P,t[12]=(c*I-r*R-h*S)*P,t[13]=(s*R-i*I+e*S)*P,t[14]=(m*w-x*E-d*_)*P,t[15]=(o*E-l*w+M*_)*P,this}scale(t){const s=this.elements,i=t.x,e=t.y,n=t.z;return s[0]*=i,s[4]*=e,s[8]*=n,s[1]*=i,s[5]*=e,s[9]*=n,s[2]*=i,s[6]*=e,s[10]*=n,s[3]*=i,s[7]*=e,s[11]*=n,this}getMaxScaleOnAxis(){const t=this.elements,s=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],i=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],e=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(s,i,e))}makeTranslation(t,s,i){return t.isVector3?this.set(1,0,0,t.x,0,1,0,t.y,0,0,1,t.z,0,0,0,1):this.set(1,0,0,t,0,1,0,s,0,0,1,i,0,0,0,1),this}makeRotationX(t){const s=Math.cos(t),i=Math.sin(t);return this.set(1,0,0,0,0,s,-i,0,0,i,s,0,0,0,0,1),this}makeRotationY(t){const s=Math.cos(t),i=Math.sin(t);return this.set(s,0,i,0,0,1,0,0,-i,0,s,0,0,0,0,1),this}makeRotationZ(t){const s=Math.cos(t),i=Math.sin(t);return this.set(s,-i,0,0,i,s,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,s){const i=Math.cos(s),e=Math.sin(s),n=1-i,r=t.x,c=t.y,h=t.z,a=n*r,o=n*c;return this.set(a*r+i,a*c-e*h,a*h+e*c,0,a*c+e*h,o*c+i,o*h-e*r,0,a*h-e*c,o*h+e*r,n*h*h+i,0,0,0,0,1),this}makeScale(t,s,i){return this.set(t,0,0,0,0,s,0,0,0,0,i,0,0,0,0,1),this}makeShear(t,s,i,e,n,r){return this.set(1,i,n,0,t,1,r,0,s,e,1,0,0,0,0,1),this}compose(t,s,i){const e=this.elements,n=s._x,r=s._y,c=s._z,h=s._w,a=n+n,o=r+r,l=c+c,M=n*a,u=n*o,x=n*l,m=r*o,d=r*l,y=c*l,_=h*a,w=h*o,z=h*l,E=i.x,p=i.y,T=i.z;return e[0]=(1-(m+y))*E,e[1]=(u+z)*E,e[2]=(x-w)*E,e[3]=0,e[4]=(u-z)*p,e[5]=(1-(M+y))*p,e[6]=(d+_)*p,e[7]=0,e[8]=(x+w)*T,e[9]=(d-_)*T,e[10]=(1-(M+m))*T,e[11]=0,e[12]=t.x,e[13]=t.y,e[14]=t.z,e[15]=1,this}decompose(t,s,i){const e=this.elements;t.x=e[12],t.y=e[13],t.z=e[14];const n=this.determinantAffine();if(n===0)return i.set(1,1,1),s.identity(),this;let r=nt.set(e[0],e[1],e[2]).length();const c=nt.set(e[4],e[5],e[6]).length(),h=nt.set(e[8],e[9],e[10]).length();n<0&&(r=-r),X.copy(this);const a=1/r,o=1/c,l=1/h;return X.elements[0]*=a,X.elements[1]*=a,X.elements[2]*=a,X.elements[4]*=o,X.elements[5]*=o,X.elements[6]*=o,X.elements[8]*=l,X.elements[9]*=l,X.elements[10]*=l,s.setFromRotationMatrix(X),i.x=r,i.y=c,i.z=h,this}makePerspective(t,s,i,e,n,r,c=ot,h=!1){const a=this.elements,o=2*n/(s-t),l=2*n/(i-e),M=(s+t)/(s-t),u=(i+e)/(i-e);let x,m;if(h)x=n/(r-n),m=r*n/(r-n);else if(c===ot)x=-(r+n)/(r-n),m=-2*r*n/(r-n);else if(c===Tt)x=-r/(r-n),m=-r*n/(r-n);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+c);return a[0]=o,a[4]=0,a[8]=M,a[12]=0,a[1]=0,a[5]=l,a[9]=u,a[13]=0,a[2]=0,a[6]=0,a[10]=x,a[14]=m,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this}makeOrthographic(t,s,i,e,n,r,c=ot,h=!1){const a=this.elements,o=2/(s-t),l=2/(i-e),M=-(s+t)/(s-t),u=-(i+e)/(i-e);let x,m;if(h)x=1/(r-n),m=r/(r-n);else if(c===ot)x=-2/(r-n),m=-(r+n)/(r-n);else if(c===Tt)x=-1/(r-n),m=-n/(r-n);else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+c);return a[0]=o,a[4]=0,a[8]=0,a[12]=M,a[1]=0,a[5]=l,a[9]=0,a[13]=u,a[2]=0,a[6]=0,a[10]=x,a[14]=m,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this}equals(t){const s=this.elements,i=t.elements;for(let e=0;e<16;e++)if(s[e]!==i[e])return!1;return!0}fromArray(t,s=0){for(let i=0;i<16;i++)this.elements[i]=t[i+s];return this}toArray(t=[],s=0){const i=this.elements;return t[s]=i[0],t[s+1]=i[1],t[s+2]=i[2],t[s+3]=i[3],t[s+4]=i[4],t[s+5]=i[5],t[s+6]=i[6],t[s+7]=i[7],t[s+8]=i[8],t[s+9]=i[9],t[s+10]=i[10],t[s+11]=i[11],t[s+12]=i[12],t[s+13]=i[13],t[s+14]=i[14],t[s+15]=i[15],t}}const nt=new k,X=new lt,Dt=new k(0,0,0),Ft=new k(1,1,1),$=new k,ut=new k,q=new k,j=Nt();function Nt(){const g=new ArrayBuffer(4),t=new Float32Array(g),s=new Uint32Array(g),i=new Uint32Array(512),e=new Uint32Array(512);for(let h=0;h<256;++h){const a=h-127;a<-27?(i[h]=0,i[h|256]=32768,e[h]=24,e[h|256]=24):a<-14?(i[h]=1024>>-a-14,i[h|256]=1024>>-a-14|32768,e[h]=-a-1,e[h|256]=-a-1):a<=15?(i[h]=a+15<<10,i[h|256]=a+15<<10|32768,e[h]=13,e[h|256]=13):a<128?(i[h]=31744,i[h|256]=64512,e[h]=24,e[h|256]=24):(i[h]=31744,i[h|256]=64512,e[h]=13,e[h|256]=13)}const n=new Uint32Array(2048),r=new Uint32Array(64),c=new Uint32Array(64);for(let h=1;h<1024;++h){let a=h<<13,o=0;for(;(a&8388608)===0;)a<<=1,o-=8388608;a&=-8388609,o+=947912704,n[h]=a|o}for(let h=1024;h<2048;++h)n[h]=939524096+(h-1024<<13);for(let h=1;h<31;++h)r[h]=h<<23;r[31]=1199570944,r[32]=2147483648;for(let h=33;h<63;++h)r[h]=2147483648+(h-32<<23);r[63]=3347054592;for(let h=1;h<64;++h)h!==32&&(c[h]=1024);return{floatView:t,uint32View:s,baseTable:i,shiftTable:e,mantissaTable:n,exponentTable:r,offsetTable:c}}function Ot(g){Math.abs(g)>65504&&ct("DataUtils.toHalfFloat(): Value out of range."),g=C(g,-65504,65504),j.floatView[0]=g;const t=j.uint32View[0],s=t>>23&511;return j.baseTable[s]+((t&8388607)>>j.shiftTable[s])}function Gt(g){const t=g>>10;return j.uint32View[0]=j.mantissaTable[j.offsetTable[t]+(g&1023)]+j.exponentTable[t],j.floatView[0]}class ht{static toHalfFloat(t){return Ot(t)}static fromHalfFloat(t){return Gt(t)}}class bt{static{bt.prototype.isMatrix2=!0}constructor(t,s,i,e){this.elements=[1,0,0,1],t!==void 0&&this.set(t,s,i,e)}identity(){return this.set(1,0,0,1),this}fromArray(t,s=0){for(let i=0;i<4;i++)this.elements[i]=t[i+s];return this}set(t,s,i,e){const n=this.elements;return n[0]=t,n[2]=s,n[1]=i,n[3]=e,this}}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:At}})),typeof window<"u"&&(window.__THREE__?ct("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=At);class A{static get NANOLAMBERTS_PER_S10(){return A.toNanolamberts(10+2.5*Math.log10(3600*3600))}static nanolambertsOfS10(t){return t*A.NANOLAMBERTS_PER_S10}static TWILIGHT=[{sunAltitudeDeg:90,magPerArcsec2:3.5},{sunAltitudeDeg:10,magPerArcsec2:4.2},{sunAltitudeDeg:0,magPerArcsec2:7.5},...Array.from({length:15},(t,s)=>{const i=-4-s;return{sunAltitudeDeg:i,magPerArcsec2:A.patatV(i)}}),{sunAltitudeDeg:-24,magPerArcsec2:22}];static patatV(t){const s=90-t-95;return 11.84+1.518*s-.057*s*s}static moonlessMagPerArcsec2(t){const s=A.TWILIGHT;for(let i=0;i<s.length-1;i++){const e=s[i],n=s[i+1];if(t<=e.sunAltitudeDeg&&t>=n.sunAltitudeDeg){const r=(e.sunAltitudeDeg-t)/(e.sunAltitudeDeg-n.sunAltitudeDeg);return e.magPerArcsec2+(n.magPerArcsec2-e.magPerArcsec2)*r}}return t>0?s[0].magPerArcsec2:s[s.length-1].magPerArcsec2}static toNanolamberts(t){return 34.08*Math.exp(A.NANOLAMBERT_OFFSET-A.PER_MAGNITUDE*t)}static fromNanolamberts(t){return(A.NANOLAMBERT_OFFSET-Math.log(Math.max(t,1e-6)/34.08))/A.PER_MAGNITUDE}static NANOLAMBERT_OFFSET=20.7233;static PER_MAGNITUDE=Math.LN10/2.5;static airMass(t){const s=Math.cos(Math.max(t,0)*Math.PI/180);return 1/Math.sqrt(Math.max(1-.96*s*s,.001))}static EXTINCTION_PER_AIR_MASS=.172;static scatteringAt(t){const s=Math.min(Math.max(t,0),180)*Math.PI/180;return 10**5.36*(1.06+Math.cos(s)**2)+10**(6.15-Math.min(t,180)/40)}static scatteredFraction(t){return 1-10**(-.4*A.EXTINCTION_PER_AIR_MASS*A.airMass(t))}static AIRGLOW_MAG_PER_ARCSEC2=22;static twilightExcessNanolamberts(t){return Math.max(0,A.toNanolamberts(A.moonlessMagPerArcsec2(t))-A.toNanolamberts(A.AIRGLOW_MAG_PER_ARCSEC2))}static twilightOutput(t){const s=A.scatteringAt(90-t)*A.scatteredFraction(90);return A.twilightExcessNanolamberts(t)/s}static moonNanolamberts(t,s,i,e){return A.scatteringAt(i)*A.moonOutput(t,s)*A.scatteredFraction(e)}static moonOutput(t,s){if(s<=0)return 0;const i=Math.min(Math.abs(t),180);return 10**(-.4*(3.84+.026*i+4e-9*i**4))*10**(-.4*A.EXTINCTION_PER_AIR_MASS*A.airMass(s))}static phaseAngleOf(t){return Math.acos(Math.min(Math.max(2*t-1,-1),1))*180/Math.PI}static magPerArcsec2(t,s,i,e){const n=A.scatteredFraction(i),r=A.scatteringAt(t.separationDeg)*A.twilightOutput(t.altitudeDeg)*n,c=A.scatteringAt(s.separationDeg)*A.moonOutput(s.phaseAngleDeg,s.altitudeDeg)*n;return A.fromNanolamberts(A.toNanolamberts(A.AIRGLOW_MAG_PER_ARCSEC2)+r+c+A.artificialNanolamberts(e,i))}static artificialZenithNanolamberts(t){return t===void 0||!Number.isFinite(t)?0:Math.max(0,A.toNanolamberts(t)-A.toNanolamberts(A.AIRGLOW_MAG_PER_ARCSEC2))}static artificialNanolamberts(t,s){const i=A.artificialZenithNanolamberts(t);return i>0?i*A.artificialShape(s):0}static artificialShape(t){return A.scatteredFraction(t)/A.scatteredFraction(90)}static nakedEyeLimit(t){return 7.93-5*Math.log10(10**(4.316-t/5)+1)}static starLossMagnitudes(t,s,i){const e=A.moonlessMagPerArcsec2(t),n=A.fromNanolamberts(A.toNanolamberts(e)+A.scatteringAt(90-s.altitudeDeg)*A.moonOutput(s.phaseAngleDeg,s.altitudeDeg)*A.scatteredFraction(90)+A.artificialZenithNanolamberts(i));return Math.max(0,A.nakedEyeLimit(e)-A.nakedEyeLimit(n))}}class Mt{static HALF_FLOAT_MAX=65504;static fromMap(t,s){const i=ht.toHalfFloat(1);for(let e=0;e<t.data.length;e++)s[e*4]=ht.toHalfFloat(Math.min(Mt.HALF_FLOAT_MAX,A.nanolambertsOfS10(t.data[e]))),s[e*4+3]=i}}class qt{static fromRadiance(t,s){const i=ht.toHalfFloat(1);for(let e=0,n=0;n<t.length;e+=4,n+=3)s[e]=ht.toHalfFloat(t[n]),s[e+1]=ht.toHalfFloat(t[n+1]),s[e+2]=ht.toHalfFloat(t[n+2]),s[e+3]=i}}class it{constructor(t){this.scope=t,t.onmessage=s=>this.receive(s.data)}static RAYS_PER_BATCH=6e4;static ROWS_PER_BATCH=4;sky=new b;cancelled=new Set;queue=[];working=!1;receive(t){if(t.type==="cancel"){this.cancelled.add(t.id);return}this.queue.push(t),this.working||this.work()}async work(){this.working=!0;try{for(let t=this.queue.shift();t;t=this.queue.shift())t.type==="halo"?await this.traceHalo(t):await this.walkGlow(t.id)}finally{this.working=!1}}static yield(){return new Promise(t=>setTimeout(t))}async traceHalo(t){for(this.sky.begin(t.altitudeDeg,t.alignment,void 0,b.populationsFor(t.rare));this.sky.tracedRays<t.rays&&!this.cancelled.has(t.id);)this.sky.trace(Math.min(it.RAYS_PER_BATCH,t.rays-this.sky.tracedRays)),await it.yield();if(this.cancelled.delete(t.id))return;const s=this.sky.harvest(),i=new Uint16Array(b.AZIMUTH_BINS*b.ALTITUDE_BINS*4);qt.fromRadiance(s.data,i);const e={id:t.id,texels:i};this.scope.postMessage(e,[i.buffer])}async walkGlow(t){const s=new f,i=new L;for(;!(s.done&&i.done)&&!this.cancelled.has(t);)s.walk(it.ROWS_PER_BATCH),i.walk(it.ROWS_PER_BATCH),await it.yield();if(this.cancelled.delete(t))return;const e=new Uint16Array(f.LONGITUDE_STEPS*f.LATITUDE_STEPS*4),n=new Uint16Array(L.LONGITUDE_STEPS*L.LATITUDE_STEPS*4);Mt.fromMap(s.harvest(),e),Mt.fromMap(i.harvest(),n);const r={id:t,milkyWay:e,zodiacal:n};this.scope.postMessage(r,[e.buffer,n.buffer])}}"WorkerGlobalScope"in globalThis&&new it(globalThis)})();
|
|
6
|
+
`,o=typeof self<"u"&&self.Blob&&new Blob([c],{type:"text/javascript;charset=utf-8"});function u(n){let t;try{if(t=o&&(self.URL||self.webkitURL).createObjectURL(o),!t)throw"";const s=new Worker(t,{name:n?.name});return s.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),s}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(c),{name:n?.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}class h{static MAX_WORKERS=3;static shared;static get(){if(h.shared!==void 0)return h.shared;try{h.shared=typeof Worker>"u"?null:new h}catch{h.shared=null}return h.shared}workers=[];waiting=[];jobs=new Map;nextId=1;constructor(){const t=typeof navigator>"u"?2:navigator.hardwareConcurrency||2,s=Math.max(1,Math.min(h.MAX_WORKERS,t-1));for(let i=0;i<s;i++){const e=new u,r={worker:e};e.onmessage=a=>this.finish(r,a.data),e.onerror=()=>this.fail(r),this.workers.push(r)}}trace(t,s,i,e,r,a){return this.submit({type:"halo",altitudeDeg:t,alignment:s,rare:i,rays:e},l=>r(l.texels),a)}glow(t,s){return this.submit({type:"glow"},i=>{const e=i;t(e.milkyWay,e.zodiacal)},s)}submit(t,s,i){const e={id:this.nextId++,request:t,done:s,failed:i};return this.jobs.set(e.id,e),this.workers.length===0?(queueMicrotask(()=>{this.jobs.delete(e.id)&&i()}),{cancel:()=>this.jobs.delete(e.id)&&void 0}):(this.waiting.push(e),this.dispatch(),{cancel:()=>this.cancel(e)})}dispatch(){for(const t of this.workers){if(t.running)continue;const s=this.waiting.shift();if(!s)return;t.running=s,s.worker=t;const i={...s.request,id:s.id};t.worker.postMessage(i)}}cancel(t){if(!this.jobs.delete(t.id))return;const s=this.waiting.indexOf(t);if(s>=0){this.waiting.splice(s,1);return}const i={type:"cancel",id:t.id};t.worker?.worker.postMessage(i),t.worker&&(t.worker.running=void 0),this.dispatch()}finish(t,s){const i=this.jobs.get(s.id);t.running?.id===s.id&&(t.running=void 0),i&&(this.jobs.delete(i.id),i.done(s)),this.dispatch()}fail(t){t.worker.terminate(),this.workers.splice(this.workers.indexOf(t),1);const s=t.running;if(t.running=void 0,s&&this.jobs.delete(s.id)&&s.failed(),this.workers.length===0){h.shared=null;for(const i of this.waiting.splice(0))this.jobs.delete(i.id)&&i.failed()}else this.dispatch()}}export{h as OffThreadTracer};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{TranscriptionAudio as i}from"./TranscriptionAudio-C_xvRUv2.js";import{TranscriptionError as a}from"./TranscriptionError-D_TCbYbt.js";class c{constructor(s){this.options=s,this.engine=s.model,this.fetchImpl=s.fetchImpl??fetch.bind(globalThis)}static BLOCK_SECONDS=600;sendsAudio=!0;engine;fetchImpl;async transcribe(s){const r=this.options.key();if(!r)throw new a("noKey");const o=s.samples.length/i.RATE,e=[];s.progress?.({stage:"transcribing",done:0,total:o});for(const t of i.blocks(s.samples,c.BLOCK_SECONDS)){if(s.signal?.aborted)throw s.signal.reason??new DOMException("Aborted","AbortError");const n=await this.send(t.samples,r,s),l=t.samples.length/i.RATE,h=n.segments??(n.text?[{start:0,end:l,text:n.text}]:[]);for(const p of h)e.push({start:t.start+p.start,end:t.start+p.end,text:p.text});s.progress?.({stage:"transcribing",done:Math.min(o,t.start+l),total:o})}return e}async send(s,r,o){const e=new FormData;e.append("file",i.wav(s),"interview.wav"),e.append("model",this.options.model),e.append("response_format","verbose_json"),e.append("timestamp_granularities[]","segment"),o.language&&e.append("language",o.language.split("-")[0]);let t;try{t=await this.fetchImpl(`${this.options.base}/audio/transcriptions`,{method:"POST",headers:{Authorization:`Bearer ${r}`},body:e,signal:o.signal})}catch(n){throw n?.name==="AbortError"?n:new a("failed",String(n?.message??n))}if(t.status===401||t.status===403)throw new a("key");if(t.status===413)throw new a("tooLarge");if(t.status===429)throw new a("rateLimited");if(!t.ok)throw new a("failed",`HTTP ${t.status}`);return await t.json()}}export{c as OpenAiTranscriptionProvider};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a=Math.PI/180;class h{constructor(t=i=>fetch(i).then(s=>{if(!s.ok)throw new Error(`${i}: HTTP ${s.status}`);return s.json()})){this.fetchJson=t}static API="https://api.panoramax.xyz/api";static CREDIT="Panoramax";static CREDIT_URL="https://panoramax.fr/";async nearby(t,i,s=300,c=50){const n=s/111320,o=s/(111320*Math.cos(t*a)),d=[i-o,t-n,i+o,t+n].map(e=>e.toFixed(6)).join(",");return((await this.fetchJson(`${h.API}/search?bbox=${d}&limit=${c}`)).features??[]).map(e=>this.picture(e,t,i)).filter(e=>e!==void 0&&e.distanceM<=s).sort((e,p)=>e.distanceM-p.distanceM)}picture(t,i,s){const[c,n]=t.geometry.coordinates,o=t.assets.sd?.href??t.assets.hd?.href;if(!o)return;const{distanceM:d,bearingDeg:A}=h.offset(i,s,n,c),r=t.properties,e=r["pers:interior_orientation"]?.field_of_view,p=(r.providers??[]).map(f=>f.name).filter(f=>!!f),$=r.license??"CC-BY-SA-4.0";return{id:t.id,lat:n,lng:c,distanceM:d,bearingDeg:A,azimuthDeg:r["view:azimuth"],panorama:e!==void 0&&e>=360,takenAt:r.datetime??"",src:o,srcFull:t.assets.hd?.href,credit:`${h.CREDIT}${p.length?` — ${p.join(", ")}`:""} (${$})`,creditUrl:`${h.API.replace(/\/api$/,"")}/#focus=pic&pic=${t.id}`}}static offset(t,i,s,c){const n=(s-t)*a*6371e3,o=(c-i)*a*6371e3*Math.cos((t+s)/2*a);return{distanceM:Math.hypot(o,n),bearingDeg:(Math.atan2(o,n)/a+360)%360}}}export{h as PanoramaxPictures};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import{I as q,S as M,a as f,b as g}from"./SaidPosition-CWiVNaNW.js";import{H as D,s as K,P as V,U as j}from"./rr0-ufoathome.mjs";class I{constructor(e,t,i,n){this.button=e,this.onPick=i,this.idOf=n;const s=this.panel=e.ownerDocument.createElement("div");s.id=t,s.className="add-menu",s.setAttribute("popover",""),s.setAttribute("role","menu");const o=`--add-menu-${t}`;e.style.setProperty("anchor-name",o),s.style.setProperty("position-anchor",o),e.setAttribute("popovertarget",t),e.setAttribute("aria-haspopup","menu"),e.after(s)}static CSS=`
|
|
2
|
+
.add-menu { padding: .3em 0; border: 1px solid color-mix(in srgb, CanvasText 30%, transparent); border-radius: 4px; background: Canvas; color: CanvasText;
|
|
3
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, .25); max-height: 60vh; overflow-y: auto; font-size: .9em; }
|
|
4
|
+
@supports (position-area: bottom span-left) {
|
|
5
|
+
.add-menu:popover-open { inset: auto; position-area: bottom span-left; margin: .2em 0 0 0; }
|
|
6
|
+
}
|
|
7
|
+
.add-menu-choice { display: block; width: 100%; padding: .25em .9em; border: 0; background: none; color: inherit; font: inherit; text-align: left;
|
|
8
|
+
cursor: pointer; white-space: nowrap; }
|
|
9
|
+
.add-menu-choice:hover, .add-menu-choice:focus-visible { background: color-mix(in srgb, CanvasText 12%, transparent); }
|
|
10
|
+
.add-menu-choice[aria-disabled="true"] { opacity: .45; cursor: not-allowed; background: none; }
|
|
11
|
+
.add-menu-choice[hidden] { display: none; }
|
|
12
|
+
`;panel;kinds=[];last;setKinds(e){this.kinds=e;const t=this.button.ownerDocument;this.panel.replaceChildren(...e.map(i=>{const n=t.createElement("button");return n.type="button",n.className="add-menu-choice",n.setAttribute("role","menuitem"),this.idOf&&(n.id=this.idOf(i.value)),n.dataset.value=i.value,n.textContent=i.label,n.hidden=i.hidden===!0,i.disabledReason&&(n.setAttribute("aria-disabled","true"),n.title=i.disabledReason),n.addEventListener("click",()=>{n.getAttribute("aria-disabled")!=="true"&&(this.close(),this.last=i.value,this.onPick(i.value))}),n}))}setDisabled(e,t){this.kinds=this.kinds.map(n=>n.value===e?{...n,disabledReason:t}:n);const i=[...this.panel.children].find(n=>n.dataset.value===e);i&&(t?(i.setAttribute("aria-disabled","true"),i.title=t):(i.removeAttribute("aria-disabled"),i.title=""))}labelOf(e){return this.kinds.find(t=>t.value===e)?.label??e}get lastPicked(){return this.last}close(){if(typeof this.panel.hidePopover=="function")try{this.panel.matches(":popover-open")&&this.panel.hidePopover()}catch{}}}class A{constructor(e){this.options=e,this.row=document.createElement("div"),this.row.className="element-list-row",this.pickerRow=document.createElement("label"),this.pickerRow.className="element-list-picker",this.select=document.createElement("select"),this.select.id=e.ids.list,this.select.addEventListener("change",()=>e.onSelect(this.select.value)),this.pickerRow.append(this.select),e.header.append(this.row),this.row.append(this.pickerRow);const t=e.navigation;t&&(this.previousButton=this.iconButton(`${e.ids.list}-previous`,"▲"),this.nextButton=this.iconButton(`${e.ids.list}-next`,"▼"),this.previousButton.addEventListener("click",()=>t.onStep(-1)),this.nextButton.addEventListener("click",()=>t.onStep(1)),this.row.append(this.previousButton,this.nextButton),t.scope.addEventListener("keydown",i=>{if(!i.altKey||i.ctrlKey||i.metaKey||i.shiftKey||i.key!=="ArrowUp"&&i.key!=="ArrowDown"||this.pickerRow.closest("[hidden]")||!this.pickerRow.isConnected)return;i.preventDefault(),i.stopPropagation();const n=i.key==="ArrowUp"?this.previousButton:this.nextButton;n&&!n.disabled&&t.onStep(i.key==="ArrowUp"?-1:1)}));for(const i of e.actions??[]){const n=this.iconButton(i.id,i.glyph);n.addEventListener("click",()=>i.onClick()),this.actionButtons.set(i.id,n),this.row.append(n)}this.removeButton=this.iconButton(e.ids.remove,"🗑"),this.removeButton.addEventListener("click",()=>e.onRemove()),this.emptyText=document.createElement("span"),this.emptyText.className="element-list-empty",this.addButton=this.iconButton(e.ids.add,"+"),this.addButton.classList.add("element-list-add"),this.row.append(this.removeButton,this.emptyText,this.addButton),e.ids.kinds?this.kindMenu=new I(this.addButton,e.ids.kinds,i=>e.onAdd(i),e.ids.kind):this.addButton.addEventListener("click",()=>e.onAdd(void 0)),e.body&&e.body.classList.add("element-list-body")}static CSS=`
|
|
13
|
+
.element-list-row { display: flex; align-items: flex-end; flex-wrap: wrap; gap: .4em; flex: 1 1 100%; min-width: 0; }
|
|
14
|
+
.element-list-picker { flex: 1 1 10em; min-width: 0; display: flex; }
|
|
15
|
+
.element-list-picker select { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; }
|
|
16
|
+
.element-list-empty { align-self: center; opacity: .75; font-style: italic; }
|
|
17
|
+
/* The fields of the picked element unroll from its picker: the frame starts where the picker ends, with no space between (the gap of the
|
|
18
|
+
container both stand in is taken back, see glue), its corner under the picker square. The row is aligned on its bottom so that the
|
|
19
|
+
picker's lower edge is the row's, whatever the height of the buttons beside it. */
|
|
20
|
+
.element-list-body { flex: 1 1 100%; min-width: 0; box-sizing: border-box; border: 1px solid color-mix(in srgb, currentColor 30%, transparent);
|
|
21
|
+
border-radius: 0 6px 6px 6px; padding: .5em .6em; margin: 0 0 .3em; display: flex; flex-wrap: wrap;
|
|
22
|
+
align-items: center; gap: .5em; }
|
|
23
|
+
.element-list-picker select { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
|
|
24
|
+
.element-list-row [hidden], .element-list-body[hidden] { display: none !important; }
|
|
25
|
+
${I.CSS}`;static showPresence(e,t,i,n=!1){for(const s of e.children)if(!s.matches(".element-list-add, .add-menu, .add-reason")){if(s.matches(".element-list-empty")){s.hidden=i||n;continue}if(s.matches(".element-list-picker")){s.hidden=!i&&!n;continue}s.hidden=!i&&!n,s instanceof HTMLButtonElement&&!i&&(s.disabled=!0)}t&&(t.hidden=!i,i&&!A.glued.has(t)&&A.glue(t))}static glued=new WeakSet;static glue(e){const t=e.parentElement,i=e.ownerDocument.defaultView;if(!t||!i)return;const n=i.getComputedStyle(t),s=/flex|grid/.test(n.display)&&parseFloat(n.rowGap)||0;e.style.marginTop=`${-s}px`,n.display!=="none"&&A.glued.add(e)}select;row;pickerRow;emptyText;removeButton;addButton;addReason;kindMenu;previousButton;nextButton;actionButtons=new Map;items=[];noneLabel="—";addLabel="";removeEnabled=!0;actionEnabled=new Map;iconButton(e,t){const i=document.createElement("button");return i.type="button",i.className="icon-btn",i.id=e,q.show(i,t),i}setLabels(e){if(this.previousButton&&this.nextButton)for(const[t,i,n]of[[this.previousButton,e.previous??"","Alt+↑"],[this.nextButton,e.next??"","Alt+↓"]]){const s=i===""?n:`${i} (${n})`;t.title=s,t.setAttribute("aria-label",i||s),t.setAttribute("aria-keyshortcuts",n.replace("↑","ArrowUp").replace("↓","ArrowDown"))}this.select.setAttribute("aria-label",e.list),this.emptyText.textContent=e.empty??"",this.noneLabel=e.none??this.noneLabel,this.addLabel=e.add,this.kindMenu?.panel.setAttribute("aria-label",e.add),this.options.optional&&this.listed(this.items,this.select.value);for(const[t,i]of[[this.removeButton,e.remove],[this.addButton,e.add],...[...this.actionButtons].map(([n,s])=>[s,e.actions?.[n]??""])])t.title=i,t.setAttribute("aria-label",i)}setKinds(e){this.kindMenu?.setKinds(e)}kindLabel(e){return this.kindMenu?.labelOf(e)??e}get pickedKind(){return this.kindMenu?.lastPicked}setItems(e,t){this.items=e,this.listed(e,t)}listed(e,t){this.select.replaceChildren(...this.options.optional?[new Option(this.noneLabel,"")]:[],...e.map(i=>new Option(i.label,i.id))),t!==void 0&&(this.select.value=t),this.select.selectedIndex<0&&(this.select.selectedIndex=0),this.setPresent(this.options.optional?this.select.value!=="":e.length>0)}setStepState(e,t){this.previousButton&&(this.previousButton.disabled=!e),this.nextButton&&(this.nextButton.disabled=!t)}setActionEnabled(e,t){const i=this.actionButtons.get(e);i&&(i.disabled=!t||this.select.disabled),this.actionEnabled.set(e,t)}setRemoveEnabled(e){this.removeEnabled=e,this.removeButton.disabled=!e||this.select.value===""&&this.options.optional===!0}get value(){return this.select.value}setAddState(e,t){this.addButton.disabled=!e;const i=t??this.addLabel;this.addButton.title=i,this.addButton.setAttribute("aria-label",i),this.addReason||(this.addReason=this.addButton.ownerDocument.createElement("span"),this.addReason.className="add-reason",this.addReason.style.cssText="font-size: .85em; opacity: .8; align-self: center;",this.row.append(this.addReason)),this.addReason.textContent=!e&&t?t:"",this.addReason.hidden=e||!t}rename(e,t){const i=[...this.select.options].find(n=>n.value===e);i&&(i.textContent=t)}show(e){this.select.value=e,this.options.optional&&this.setPresent(this.select.value!=="")}setPresent(e){const t=this.options.optional===!0;if(A.showPresence(this.row,this.options.body,e,t),this.select.disabled=!e&&!t,!!e){this.removeButton.disabled=!this.removeEnabled;for(const[i,n]of this.actionButtons)n.disabled=this.actionEnabled.get(i)===!1}}focus(){this.select.focus()}}class v{static CHROME="2.6em";static UNBOUNDED=9999;static fit(e){const t=[...e.querySelectorAll('input[type="number"]')];for(const i of t)i.style.width=`calc(${v.charsFor(i)}ch + ${v.CHROME})`,v.hold(i,!v.isFocused(i)),i.dataset.held!==""&&(i.dataset.held="",i.addEventListener("input",()=>v.hold(i)),i.addEventListener("change",()=>v.hold(i,!0)));return t.length}static hold(e,t=!1){const i=v.heldValue(e.value,e,t);i!==e.value&&(e.value=i,e.dispatchEvent(new Event("input",{bubbles:!0})))}static isFocused(e){return e.getRootNode().activeElement===e}static heldValue(e,t,i=!1){if(e===""||!/^-?\d+(\.\d+)?$/.test(e))return e;const n=v.wholeOnly(t.step)?0:v.decimalsOf(t.step),s=e.indexOf("."),o=s>=0&&e.length-s-1>n?n===0?e.slice(0,s):e.slice(0,s+n+1):e,a=Number(o),d=t.min===""?void 0:Number(t.min),r=t.max===""?void 0:Number(t.max);return r!==void 0&&a>r?String(r):i&&d!==void 0&&a<d?String(d):o}static charsFor(e){const t=a=>a===""?void 0:Math.abs(Number(a)),i=Math.max(t(e.max)??v.UNBOUNDED,t(e.min)??0),n=String(Math.floor(Number.isFinite(i)?i:v.UNBOUNDED)).length,s=e.min!==""&&Number(e.min)<0?1:0,o=v.wholeOnly(e.step)?0:v.decimalsOf(e.step);return n+s+(o>0?o+1:0)}static decimalsOf(e){if(e===""||e==="any")return 2;const t=e.indexOf(".");return Math.max(2,t<0?0:e.length-t-1)}static wholeOnly(e){return e!==""&&e!=="any"&&!e.includes(".")}}class E{static CSS=`
|
|
26
|
+
.window-close {
|
|
27
|
+
position: absolute; top: 8px; right: 8px; z-index: 1;
|
|
28
|
+
display: inline-flex; align-items: center; justify-content: center;
|
|
29
|
+
width: 32px; height: 32px; min-width: 32px; min-height: 32px; padding: 0;
|
|
30
|
+
border: 0; border-radius: 8px; background: none; color: inherit; opacity: .7; cursor: pointer;
|
|
31
|
+
}
|
|
32
|
+
.window-close:hover, .window-close:focus-visible { opacity: 1; background: color-mix(in srgb, currentColor 12%, transparent); }
|
|
33
|
+
:is(dialog, [popover], .context-menu):has(> .window-close) { position: relative; padding-right: 44px; }
|
|
34
|
+
.context-menu:has(> .window-close) { position: fixed; }
|
|
35
|
+
`;static button(e,t,i){const n=e.querySelector(":scope > .window-close");if(n)return E.label(n,t),n;const s=document.createElement("button");return s.type="button",s.className="window-close",s.innerHTML=q.CLOSE,E.label(s,t),s.addEventListener("click",o=>{o.stopPropagation(),i()}),e.prepend(s),s}static popover(e,t){return E.button(e,t,()=>{typeof e.hidePopover=="function"&&e.matches(":popover-open")&&e.hidePopover()})}static dialog(e,t,i){if(!e.dataset.closesBeside){e.dataset.closesBeside="true";let n=!1;e.addEventListener("pointerdown",s=>n=s.target===e),e.addEventListener("click",s=>{s.target===e&&n&&E.outside(e,s)&&i()})}return E.button(e,t,i)}static outside(e,t){const i=e.getBoundingClientRect();return t.clientX<i.left||t.clientX>i.right||t.clientY<i.top||t.clientY>i.bottom}static label(e,t){e.title=t,e.setAttribute("aria-label",t)}}class w extends HTMLElement{static TAG="rr0-input-basis";static CSS=`
|
|
36
|
+
rr0-input-basis { display: inline-block; }
|
|
37
|
+
rr0-input-basis[hidden] { display: none; }
|
|
38
|
+
.basis-mark {
|
|
39
|
+
display: inline-block; margin-left: 8px; padding: 0 8px; border: 1px solid var(--glow-dim); border-radius: 999px;
|
|
40
|
+
font: 600 11px/1.6 var(--sans); color: var(--glow); cursor: pointer; vertical-align: .05em; user-select: none;
|
|
41
|
+
}
|
|
42
|
+
/* Always there, so that nothing moves when it shows: "stated", the default, said quietly, and fully on the hover of its field. */
|
|
43
|
+
.basis-mark[data-basis="stated"] { border-style: dashed; opacity: .55; }
|
|
44
|
+
:is(label, .field, .event-param-label):is(:hover, :focus-within) .basis-mark, .basis-mark:is(:hover, :focus-visible) { opacity: 1; }
|
|
45
|
+
.basis-mark[data-basis="assumed"], .basis-mark[data-basis="derived"] { font-style: italic; }
|
|
46
|
+
/* Turned to make a hypothesis fit: nothing is judged against it (see Basis), and it does not read as one of the account's own. */
|
|
47
|
+
.basis-mark[data-basis="fitted"] { font-style: italic; border-style: dotted; }
|
|
48
|
+
.basis-window { width: min(26em, 92vw); padding: 18px 20px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--ground-raised); color: var(--ink); box-shadow: 0 12px 32px rgba(0, 0, 0, .3); }
|
|
49
|
+
.basis-window h3 { margin: 0 0 12px; font: 600 19px/1.3 var(--serif); }
|
|
50
|
+
.basis-window label { display: flex; flex-direction: column; gap: 5px; margin: 0 0 12px; font: 600 13px/1.3 var(--sans); color: var(--ink-dim); }
|
|
51
|
+
.basis-window :is(select, textarea) { box-sizing: border-box; width: 100%; font-weight: 400; }
|
|
52
|
+
/* Beside its pill, under it or above it where there is room (anchored, see open); centred where anchors are not known. Fixed, against a
|
|
53
|
+
window's own rule (WindowClose), which makes a popover with a ✕ relative, and so drawn at the top of the page. */
|
|
54
|
+
.basis-window.basis-window:popover-open { position: fixed; inset: auto; margin: 6px 0; max-height: calc(100vh - 24px); overflow: auto;
|
|
55
|
+
position-area: bottom span-right; position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline; }
|
|
56
|
+
@supports not (position-area: bottom) { .basis-window.basis-window:popover-open { inset: 0; margin: auto; height: fit-content; } }
|
|
57
|
+
.basis-window textarea { min-height: 8em; font: 400 14px/1.45 var(--sans, sans-serif); resize: vertical; }
|
|
58
|
+
/* A value that names what it rests on (see ValueSource): said on the pill itself, so that a reader sees which values can be gone and
|
|
59
|
+
looked at without opening anything. */
|
|
60
|
+
.basis-mark[data-sourced] { text-decoration: underline dotted; text-underline-offset: 2px; }
|
|
61
|
+
.basis-source { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
|
|
62
|
+
.basis-source h4 { margin: 0 0 10px; font: 600 13px/1.3 var(--sans); color: var(--ink-dim); }
|
|
63
|
+
.basis-source-free { margin: 0; font: 400 13px/1.45 var(--sans); color: var(--ink-dim); }
|
|
64
|
+
.basis-window input { box-sizing: border-box; width: 100%; font-weight: 400; }
|
|
65
|
+
`;hows=[];rationaleKept=!0;sourceKept=!0;choices={};wording;sourceWording;shown;mark;window;static count=0;anchor=`--rr0-basis-${++w.count}`;set anchorKey(e){this.anchor=`--rr0-basis-${e.replace(/[^a-zA-Z0-9_-]/g,"-")}`,this.mark?.style.setProperty("anchor-name",this.anchor)}build(){if(this.mark)return;const e=document.createElement("span");e.className="basis-mark",e.setAttribute("role","button"),e.tabIndex=0,e.style.setProperty("anchor-name",this.anchor);const t=i=>{i.preventDefault(),i.stopPropagation(),this.open()};e.addEventListener("click",t),e.addEventListener("keydown",i=>{(i.key==="Enter"||i.key===" ")&&t(i)}),this.append(e),this.mark=e,this.say()}connectedCallback(){this.build()}set messages(e){this.wording=e,this.say()}set sourceMessages(e){this.sourceWording=e}get entry(){return this.shown}set entry(e){this.shown=e&&(e.basis!=="stated"||e.how!==void 0||e.rationale!==void 0||e.source!==void 0)?{...e}:void 0,this.say()}get pill(){return this.build(),this.mark}say(){const e=this.mark,t=this.wording;if(!e||!t)return;const i=this.shown?.basis??"stated";e.dataset.basis=i,this.dataset.basis=i,e.textContent!==t.basis[i]&&(e.textContent=t.basis[i]),this.shown?.source?e.dataset.sourced="yes":delete e.dataset.sourced;const n=this.rationaleRead();e.title=n?`${t.title} : ${n}`:t.title,e.setAttribute("aria-label",`${t.title} : ${t.basis[i]}`)}rationaleRead(){return new M(D.preferencesFor(this)).read(this.shown?.rationale)}rationaleLanguage(){return K(D.preferencesFor(this),j)}static rationaleWritten(e,t,i){if(e===void 0||typeof e=="string")return t?{rationale:t}:{};const n=Object.fromEntries(Object.entries(e).filter(([o])=>o!==i)),s=t?{...n,[i]:t}:n;return Object.keys(s).length>0?{rationale:s}:{}}open(){const e=this.wording;if(!e)return;const t=Object.assign(document.createElement("h3"),{textContent:e.title}),i=document.createElement("select");for(const u of["established","measured","stated","derived","assumed","fitted"])i.append(new Option(e.basis[u],u));i.value=this.shown?.basis??"stated";const n=document.createElement("select");n.append(new Option("—",""));for(const u of this.hows)n.append(new Option(u.label,u.value));n.value=this.shown?.how??"";const s=document.createElement("textarea");s.value=this.rationaleRead()??"";const o=(u,p)=>{const m=document.createElement("label");return m.append(Object.assign(document.createElement("span"),{textContent:u}),p),m};let a=()=>this.shown?.source;const d=()=>{const u=i.value,p=a();this.entry={basis:u,...n.value?{how:n.value}:{},...w.rationaleWritten(this.shown?.rationale,s.value.trim(),this.rationaleLanguage()),...p?{source:p}:{}},this.dispatchEvent(new CustomEvent("basischange",{detail:{entry:this.shown},bubbles:!0,composed:!0}))};n.addEventListener("change",d),s.addEventListener("change",d);const r=document.createElement("div");r.className="basis-source";const c=()=>{a=this.drawSource(r,i.value,o,()=>d())};i.addEventListener("change",()=>{c(),d()});const l=this.windowElement(),h=this.sourceKept&&this.sourceWording!==void 0;h&&c(),l.replaceChildren(t,o(e.basisField,i),...this.hows.length>0?[o(e.howField,n)]:[],...this.rationaleKept?[o(e.rationaleField,s)]:[],...h?[r]:[]),E.popover(l,e.title),typeof l.showPopover=="function"&&l.isConnected?l.showPopover():l.hidden=!1}static kindOf(e){return e?.said?"said":e?.picture?"picture":e?.document!==void 0||e?.at||e?.url?"document":e?.tool?"tool":"none"}drawSource(e,t,i,n){const s=this.sourceWording;if(!s)return e.replaceChildren(),()=>{};if(V.free({basis:t}))return e.replaceChildren(Object.assign(document.createElement("p"),{className:"basis-source-free",textContent:s.free})),()=>{};const o=this.choices.interviews??[],a=this.choices.pictures??[],d=["none",...o.length>0?["said"]:[],"document",...a.length>0?["picture"]:[],"tool"],r=document.createElement("select");for(const m of d)r.append(new Option(s.kinds[m],m));const c=this.shown?.source,l=w.kindOf(c);r.value=d.includes(l)?l:"none";const h=document.createElement("div");let u=()=>{};const p=()=>{u=this.drawSourceFields(h,r.value,c,i,n)};return r.addEventListener("change",()=>{p(),n()}),p(),e.replaceChildren(i(s.field,r),h),()=>u()}drawSourceFields(e,t,i,n,s){const o=this.sourceWording,a=(t===w.kindOf(i)?i:void 0)??{},d=c=>{const l=document.createElement("input");return l.type="text",l.value=c??"",l.addEventListener("change",s),l},r=c=>c.value.trim()||void 0;if(t==="said"){const c=this.choices.interviews??[],l=document.createElement("select");for(const p of c)l.append(new Option(p.id===void 0?o.interviewOnly:p.label,p.id??""));l.value=a.said?.interview??c[0]?.id??"",l.selectedIndex<0&&c.length===1&&(l.selectedIndex=0);const h=document.createElement("select"),u=()=>{const p=c.find(m=>(m.id??"")===l.value)??c[0];h.replaceChildren(...(p?.segments??[]).map(m=>new Option(m.label||o.segmentUnnamed.replace("{n}",String(m.index+1)),String(m.index)))),a.said&&h.querySelector(`option[value="${a.said.segment}"]`)&&(h.value=String(a.said.segment))};return u(),l.addEventListener("change",()=>{u(),s()}),h.addEventListener("change",s),e.replaceChildren(n(o.interviewField,l),n(o.segmentField,h)),()=>{if(h.value==="")return;const p=c.find(m=>(m.id??"")===l.value);return{said:{...p?.id!==void 0?{interview:p.id}:{},segment:Number(h.value),...a.said?.range?{range:a.said.range}:{}}}}}if(t==="picture"){const c=this.choices.pictures??[],l=document.createElement("select");l.append(new Option("—",""));for(const h of c)l.append(new Option(h.label,h.id));return l.value=a.picture??"",l.addEventListener("change",s),e.replaceChildren(n(o.pictureField,l)),()=>l.value?{picture:l.value}:void 0}if(t==="tool"){const c=d(a.tool);return e.replaceChildren(n(o.toolField,c)),()=>r(c)?{tool:r(c)}:void 0}if(t==="document"){const c=d(typeof a.document=="string"?a.document:void 0),l=d(a.at),h=d(a.url);return e.replaceChildren(n(o.documentField,c),n(o.atField,l),n(o.urlField,h)),()=>{const u={...r(c)?{document:r(c)}:{},...r(l)?{at:r(l)}:{},...r(h)?{url:r(h)}:{}};return typeof a.document=="object"&&a.document!==null&&r(c)===void 0?Object.keys(u).length>0||a.document?{...u,document:a.document}:void 0:Object.keys(u).length>0?u:void 0}}return e.replaceChildren(),()=>{}}windowElement(){if(this.window)return this.window;const e=document.createElement("div");e.className="basis-window",e.setAttribute("popover",""),e.setAttribute("role","dialog"),e.style.setProperty("position-anchor",this.anchor),e.addEventListener("toggle",i=>{i.newState==="closed"&&(e.remove(),this.window=void 0)});const t=this.getRootNode();return t instanceof ShadowRoot?t.append(e):(t instanceof Document?t.body:this).append(e),this.window=e,e}get openWindow(){return this.window}}function U(){customElements.get(w.TAG)||customElements.define(w.TAG,w)}const G="rr0-input-position",W={positionRelative:"relative",positionAbsolute:"absolute",positionModeHint:"Click to say it the other way: from something else, or as a latitude and a longitude",positionNoPlace:"The recording has no place yet: give the observer a latitude and a longitude first",positionFrom:"from",positionObserver:"the observer",positionEast:"East",positionNorth:"North",positionLatitude:"Latitude",positionLongitude:"Longitude",positionLabel:"Position",positionBasisHint:"Where this position comes from",positionBasisStated:"stated",positionBasisEstablished:"established",positionBasisMeasured:"measured",positionBasisDerived:"derived",positionBasisAssumed:"assumed",positionBasisFitted:"fitted",positionBasisField:"Basis"},H=`${w.CSS}
|
|
66
|
+
rr0-input-position { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .3em .5em; }
|
|
67
|
+
/* As the date's own switch (see DateInputElement): it reads as part of the label, before the fields. */
|
|
68
|
+
rr0-input-position .position-mode { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-decoration: underline; text-underline-offset: .15em; }
|
|
69
|
+
rr0-input-position .position-mode:hover:not(:disabled) { text-decoration-thickness: 2px; }
|
|
70
|
+
rr0-input-position .position-mode:disabled { cursor: default; text-decoration: none; opacity: .75; }
|
|
71
|
+
rr0-input-position .position-mode:focus-visible { outline: 2px solid #4af; outline-offset: 2px; border-radius: 2px; }
|
|
72
|
+
rr0-input-position .position-axis { display: inline-flex; align-items: center; gap: .3em; white-space: nowrap; }
|
|
73
|
+
/* East and North are two fields, each with its unit: room between the unit of one and the name of the next. */
|
|
74
|
+
rr0-input-position :is(.position-local, .position-geo) { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .3em 1em; }
|
|
75
|
+
rr0-input-position .position-from { display: inline-flex; align-items: center; gap: .3em; white-space: nowrap; }
|
|
76
|
+
rr0-input-position .position-from select { width: auto; max-width: 14em; }
|
|
77
|
+
rr0-input-position input[type="number"] { width: 7em; }
|
|
78
|
+
rr0-input-position .position-geo input[type="number"] { width: 9.5em; }
|
|
79
|
+
/* What it stands on (see BasisInputElement): before the switch, as a date's. */
|
|
80
|
+
rr0-input-position .position-basis { order: -2; }
|
|
81
|
+
rr0-input-position .position-mode { order: -1; }
|
|
82
|
+
rr0-input-position [hidden] { display: none !important; }
|
|
83
|
+
`;class x extends HTMLElement{modeButton;fromRow;fromSelect;localRow;geoRow;eastField;northField;latField;lngField;basisSelect;eastLabel;northLabel;latLabel;lngLabel;wording=W;shownFrame={references:[]};shownValue;shownBasis;relativeShown=!0;referenceId;build(){if(this.modeButton)return;const e=this.getAttribute("name")??"position",t=this.ownerDocument,i=t.createElement("style");i.textContent=H;const n=t.createElement("button");n.type="button",n.className="position-mode",n.addEventListener("click",()=>this.setRelative(!this.relativeShown));const s=t.createElement("span");s.className="position-from";const o=t.createElement("span");o.className="position-from-text";const a=t.createElement("select");a.id=`${e}-from`,a.addEventListener("input",()=>this.pickReference(a.value)),s.append(o,a);const d=this.getAttribute("step")??"0.1",r=(b,S,B,F)=>{const k=t.createElement("input");return k.type="number",k.id=b,k.min=String(S),k.max=String(B),k.step=F,k.autocomplete="off",k},c=(b,S)=>{const B=t.createElement("label");B.className="position-axis";const F=t.createElement("span");return B.append(F,b,S),{row:B,label:F}},l=Number(this.getAttribute("range")??3e4),h=r(this.getAttribute("east-id")??`${e}-east`,-l,l,d),u=r(this.getAttribute("north-id")??`${e}-north`,-l,l,d),p=r(this.getAttribute("lat-id")??`${e}-lat`,-90,90,"0.000001"),m=r(this.getAttribute("lng-id")??`${e}-lng`,-180,180,"0.000001"),O=t.createElement("span");O.className="position-local";const N=c(h,"m"),$=c(u,"m");O.append(N.row,$.row);const C=t.createElement("span");C.className="position-geo";const P=c(p,"°"),T=c(m,"°");C.append(P.row,T.row);for(const b of[h,u])b.addEventListener("input",()=>this.typedLocal());for(const b of[p,m])b.addEventListener("input",()=>this.typedGeo());U();const y=t.createElement(w.TAG);y.id=`${e}-basis`,y.className="position-basis",y.rationaleKept=!1,y.sourceKept=!1,y.anchorKey=`${e}-basis`,y.addEventListener("basischange",b=>{b.stopPropagation();const S=b.detail.entry;this.shownBasis=S?.basis==="stated"?void 0:S?.basis,this.dispatchEvent(new CustomEvent("basischange",{detail:{basis:this.shownBasis},bubbles:!0,composed:!0}))}),this.append(i,n,s,O,C,y),this.modeButton=n,this.fromRow=s,this.fromSelect=a,this.localRow=O,this.geoRow=C,this.eastField=h,this.northField=u,this.latField=p,this.lngField=m,this.basisSelect=y,this.eastLabel=N.label,this.northLabel=$.label,this.latLabel=P.label,this.lngLabel=T.label,this.relativeShown=!this.isGeo,this.word(),this.show()}connectedCallback(){this.build()}get isGeo(){return this.getAttribute("native")==="geo"}get eastInput(){return this.build(),this.eastField}get northInput(){return this.build(),this.northField}get latInput(){return this.build(),this.latField}get lngInput(){return this.build(),this.lngField}get frame(){return this.shownFrame}set frame(e){this.shownFrame=e,this.build(),this.pullDegrees(),this.show()}get value(){return this.shownValue}set value(e){if(this.shownValue=e,this.build(),this.isGeo){const t=e;this.latField.value=t?String(f.degrees(t.lat)):"",this.lngField.value=t?String(f.degrees(t.lng)):""}this.show()}set said(e){this.build(),this.pullDegrees(),f.isRelative(e)?(this.relativeShown=!0,this.referenceId=e.relativeTo):f.isAbsolute(e)?this.relativeShown=!1:(this.relativeShown=!this.isGeo,this.referenceId=void 0),this.show()}get said(){const e=this.localValue();if(e)return f.restated(this.relativeShown?f.relative(0,0,this.referenceId):{lat:0,lng:0},e,this.shownFrame)}get relative(){return this.relativeShown}get basis(){return this.shownBasis}set basis(e){this.shownBasis=e==="stated"?void 0:e,this.build(),this.markBasis()}set basisShown(e){this.build(),this.basisSelect.hidden=!e}set messages(e){this.wording=e,this.modeButton&&(this.word(),this.show())}setRelative(e){!this.shownFrame.origin||this.references().length===0||(this.pullDegrees(),this.relativeShown=e,this.show())}pullDegrees(){if(!this.isGeo||!this.latField)return;const e=x.typed(this.latField),t=x.typed(this.lngField);this.shownValue=e!==void 0&&t!==void 0?{lat:e,lng:t}:this.latField.value===""&&this.lngField.value===""?void 0:this.shownValue}word(){const e=this.wording;this.eastLabel.textContent=e.positionEast,this.northLabel.textContent=e.positionNorth,this.latLabel.textContent=e.positionLatitude,this.lngLabel.textContent=e.positionLongitude,this.fromRow.querySelector(".position-from-text").textContent=e.positionFrom,this.basisSelect.messages={title:e.positionBasisHint,basisField:e.positionBasisField,howField:"",rationaleField:"",basis:{established:e.positionBasisEstablished,stated:e.positionBasisStated,measured:e.positionBasisMeasured,derived:e.positionBasisDerived,assumed:e.positionBasisAssumed,fitted:e.positionBasisFitted}},this.markBasis()}markBasis(){this.basisSelect&&(this.basisSelect.entry=this.shownBasis?{basis:this.shownBasis}:void 0)}references(){const e=this.shownFrame.references;return e.length>0||this.isGeo?e:[{label:this.wording.positionObserver,eastM:0,northM:0}]}reference(){const e=this.references();return e.find(t=>t.id===this.referenceId)??e[0]??{label:"",eastM:0,northM:0}}localValue(){const e=this.shownValue;if(!e)return;if(!this.isGeo)return e;const t=this.shownFrame.origin;return t?f.toLocal(e,t):void 0}geoValue(){const e=this.shownValue;if(!e)return;if(this.isGeo)return e;const t=this.shownFrame.origin;return t?f.toGeo(e,t):void 0}show(){if(!this.modeButton)return;const e=this.wording,t=this.shownFrame.origin!==void 0&&this.references().length>0;t||(this.relativeShown=!this.isGeo);const i=this.modeButton;i.textContent=this.relativeShown?e.positionRelative:e.positionAbsolute,i.disabled=!t,i.title=t?e.positionModeHint:e.positionNoPlace;const n=this.references(),s=this.fromSelect,o=n.map(h=>h.id??"");([...s.options].map(h=>h.value).join(`
|
|
84
|
+
`)!==o.join(`
|
|
85
|
+
`)||[...s.options].map(h=>h.text).join(`
|
|
86
|
+
`)!==n.map(h=>h.label).join(`
|
|
87
|
+
`))&&s.replaceChildren(...n.map(h=>new Option(h.label,h.id??""))),this.referenceId!==void 0&&!n.some(h=>h.id===this.referenceId)&&(this.referenceId=void 0),s.value=this.referenceId??o[0]??"",this.fromRow.hidden=!this.relativeShown,this.localRow.hidden=!this.relativeShown,this.geoRow.hidden=this.relativeShown;const a=this.getRootNode().activeElement,d=(h,u)=>{h!==a&&(h.value=u===void 0?"":String(u))},r=this.localValue(),c=this.reference();if(d(this.eastField,r?f.metres(r.eastM-c.eastM):void 0),d(this.northField,r?f.metres(r.northM-c.northM):void 0),this.isGeo&&!this.relativeShown)return;const l=this.geoValue();d(this.latField,l?f.degrees(l.lat):void 0),d(this.lngField,l?f.degrees(l.lng):void 0)}pickReference(e){this.pullDegrees(),this.referenceId=e===""?void 0:e,this.show();const t=this.said;t&&this.shownValue&&this.tell(this.shownValue,t)}static typed(e){const t=e.value.trim(),i=t===""?NaN:Number(t);return Number.isFinite(i)?i:void 0}typedLocal(){const e=x.typed(this.eastField),t=x.typed(this.northField);if(e===void 0||t===void 0)return;const i=this.reference(),n={eastM:i.eastM+e,northM:i.northM+t};let s=n;if(this.isGeo){const o=this.shownFrame.origin;if(!o)return;s=f.toGeo(n,o)}this.shownValue=s,this.tell(s,f.relative(e,t,this.referenceId))}typedGeo(){const e=x.typed(this.latField),t=x.typed(this.lngField);if(e===void 0||t===void 0)return;let i={lat:e,lng:t};if(!this.isGeo){const n=this.shownFrame.origin;if(!n)return;i=f.toLocal({lat:e,lng:t},n)}this.shownValue=i,this.tell(i,{lat:e,lng:t})}tell(e,t){this.show();const i=this.isGeo?f.isAbsolute(t):f.isRelative(t)&&t.relativeTo===void 0;this.dispatchEvent(new CustomEvent("positionchange",{detail:{value:e,said:i?void 0:t},bubbles:!0,composed:!0}))}}function z(){customElements.get(G)||customElements.define(G,x)}class R{constructor(e,t,i=()=>{},n){this.read=e,this.edit=t,this.context=i,this.place=n}static inPlace(e){return new R(()=>e,t=>t(e))}}class L{constructor(e,t,i="",n,s){this.container=e,this.idPrefix=i,this.values=n,this.enhance=s,this.said=new M([t,"en"])}set;target;changed=()=>{};said;setLanguage(e){this.said=new M([e,"en"]),this.set&&this.target&&this.show(this.set,this.target,this.changed)}show(e,t,i){this.set=e,this.target=t instanceof R?t:R.inPlace(t),this.changed=i,this.container.replaceChildren();const n=new Map;for(const s of e.parameters){const o=this.read(s.group)??"";let a=n.get(o);if(!a){if(a=document.createElement("fieldset"),a.className="parameter-group",o!==""){const d=document.createElement("legend");d.textContent=o,a.append(d)}else a.classList.add("parameter-group-untitled"),a.style.border="0",a.style.padding="0",a.style.marginInline="0";n.set(o,a),this.container.append(a)}a.append(this.fieldOf(s))}v.fit(this.container),this.sync()}clear(){this.set=void 0,this.target=void 0,this.container.replaceChildren()}field(e){return this.container.querySelector(`[data-key="${e}"]`)??void 0}sync(e=!1){const t=this.target?.read();if(!this.set||!t)return;const i=this.target.context(),n=e?null:this.container.getRootNode().activeElement;for(const s of this.set.parameters){const o=s.type==="position"?this.positionOf(s):this.field(s.key);if(!o)continue;const a=o.closest("label, .parameter-row")??o;a.hidden=s.visibleWhen!==void 0&&!s.visibleWhen(t,i);const d=g.read(t,s.key);if(s.type==="number"){const r=o;r!==n&&(r.value=typeof d=="number"?L.shown(d,s):"");const c=L.boundsOf(s,t,i);r.min=String(c.min),r.max=String(c.max);const l=s.effective?.(t,i);r.placeholder=l!==void 0?L.shown(l,s):this.read(s.placeholder)??"",r.classList.toggle("parameter-derived",d===void 0)}else if(s.type==="choice"){const r=o,c=s.optionsOf?.(t,i)??s.choices;if([...r.options].filter(l=>l.value!=="").map(l=>l.value).join(`
|
|
88
|
+
`)!==c.map(l=>l.value).join(`
|
|
89
|
+
`)&&r.replaceChildren(...s.required?[]:[new Option("—","")],...c.map(l=>new Option(this.read(l.label)??l.value,l.value))),r!==n&&(r.value=typeof d=="string"&&c.some(l=>l.value===d)?d:s.required?r.options[0]?.value??"":""),!s.required){const l=s.effective?.(t,i),h=c.find(u=>u.value===l);r.options[0].textContent=h?this.read(h.label)??h.value:this.read(s.empty)??"—"}}else if(s.type==="boolean"){const r=o;r.checked=typeof d=="boolean"?d:s.effective?.(t,i)===!0}else if(s.type==="colour"){const r=o;r!==n&&(r.value=L.swatchOf(d,s.effective?.(t,i)??s.fallback??"#808080"))}else if(s.type==="set")this.syncSet(s,o,t,i);else if(s.type==="position")this.syncPosition(s,o,t);else if(s.type==="said"){const r=o;r!==n&&(r.value=this.values?.said().read(g.read(t,s.key))??""),this.markMissing(s,r)}else{const r=o;r!==n&&(r.value=typeof d=="string"?d:"",r.classList.remove("invalid"),r.removeAttribute("aria-invalid"))}}for(const s of this.container.querySelectorAll("fieldset.parameter-group"))s.hidden=[...s.querySelectorAll("label, .parameter-row")].filter(o=>o.parentElement===s).every(o=>o.hidden)}fieldOf(e){const t=document.createElement("label"),i=this.read(e.hint);i&&(t.title=i);const n=document.createElement("span");n.textContent=this.read(e.label)??e.key,t.append(n," ");let s;if(e.type==="choice"){const o=document.createElement("select");this.identify(o,e),e.required||o.append(new Option("—","")),o.append(...e.choices.map(a=>new Option(this.read(a.label)??a.value,a.value))),o.addEventListener("input",()=>this.write(e,o.value===""?void 0:o.value)),t.append(o),this.enhance?.(e,o)}else{if(e.type==="position")return this.setRow(e,this.positionFieldOf(e));if(e.type==="set"){const o=document.createElement("div");return this.identify(o,e),o.className="parameter-set",o.addEventListener("input",()=>{const a=[...o.querySelectorAll("input:checked")].map(d=>d.value);this.write(e,a.length>0?a:void 0)}),this.setRow(e,o)}else if(e.type==="boolean"){const o=document.createElement("input");o.type="checkbox",this.identify(o,e),o.addEventListener("input",()=>{if(e.effective){const a=this.target?.read(),d=a?e.effective(a,this.target?.context())===!0:!1;this.write(e,o.checked===d?void 0:o.checked)}else this.write(e,o.checked?!0:e.required?!1:void 0)}),t.prepend(o),t.append(" ")}else{const o=document.createElement("input");this.identify(o,e),o.autocomplete="off",e.type==="number"?(o.type="number",o.min=String(e.min),o.max=String(e.max),o.step=String(e.step),s=e.unit,o.addEventListener("input",()=>{const a=o.value.trim();if(a==="")return e.required?void 0:this.write(e,void 0);const d=Number(a);Number.isFinite(d)&&this.write(e,d)})):e.type==="colour"?(o.type="color",o.addEventListener("input",()=>this.write(e,o.value))):e.type==="said"?(o.type="text",o.placeholder=this.read(e.placeholder)??"",o.style.setProperty("field-sizing","content"),o.style.minWidth="10em",o.style.maxWidth="100%",o.addEventListener("input",()=>{const a=this.target?.read(),d=this.values;!a||!d||(this.write(e,d.said().write(g.read(a,e.key),o.value,d.writingLanguage())),this.markMissing(e,o))})):(o.type="text",o.placeholder=this.read(e.placeholder)??"",o.addEventListener("input",()=>{const a=e.required||e.validate?o.value.trim():o.value,d=this.target?.read(),r=d!==void 0&&(e.required===!0&&a===""||a!==""&&e.validate?.(a,d,this.target.context())===!1);o.classList.toggle("invalid",r),r?o.setAttribute("aria-invalid","true"):o.removeAttribute("aria-invalid"),!r&&this.write(e,a===""?void 0:a)}),o.addEventListener("change",()=>{if(!o.classList.contains("invalid"))return;o.classList.remove("invalid"),o.removeAttribute("aria-invalid");const a=this.target?.read(),d=a===void 0?void 0:g.read(a,e.key);o.value=typeof d=="string"?d:""})),t.append(o)}}return s&&t.append(` ${s}`),t}markMissing(e,t){e.type!=="said"||!e.required||(t.classList.toggle("invalid",t.value===""),t.setAttribute("aria-invalid",String(t.value==="")))}positionFieldOf(e){z();const t=document.createElement("rr0-input-position"),i=`${this.idPrefix}${e.key}`;t.setAttribute("name",i),e.native==="geo"&&t.setAttribute("native","geo"),e.step!==void 0&&t.setAttribute("step",String(e.step)),e.rangeM!==void 0&&t.setAttribute("range",String(e.rangeM));const n=e.native==="geo"?["lat-id","lng-id"]:["east-id","north-id"];this.idPrefix!==""&&(t.setAttribute(n[0],`${this.idPrefix}${e.key}`),t.setAttribute(n[1],`${this.idPrefix}${e.secondKey}`)),t.dataset.position=e.key,t.build();const[s,o]=e.native==="geo"?[t.latInput,t.lngInput]:[t.eastInput,t.northInput];s.dataset.key=e.key,o.dataset.key=e.secondKey;const a=this.target?.place;return a&&(t.messages=a.messages()),t.basisShown=a?.basis!==void 0,t.addEventListener("positionchange",d=>{const{value:r,said:c}=d.detail;this.writePosition(e,r,c)}),t.addEventListener("basischange",d=>this.target?.place?.basis?.write(e,d.detail.basis)),t}positionOf(e){return this.container.querySelector(`rr0-input-position[data-position="${e.key}"]`)??void 0}syncPosition(e,t,i){const n=this.target?.place;n&&(t.messages=n.messages(),t.frame=n.frame());const s=g.read(i,e.key),o=g.read(i,e.secondKey),a=typeof s=="number"&&typeof o=="number";t.value=a?e.native==="geo"?{lat:s,lng:o}:{eastM:s,northM:o}:void 0;const d=g.read(i,e.saidKey),r=JSON.stringify(d??null);t.dataset.said!==r&&(t.dataset.said=r,t.said=d),t.basis=n?.basis?.read(e)}writePosition(e,t,i){const n=this.target;if(!n)return;const[s,o]="lat"in t?[t.lat,t.lng]:[t.eastM,t.northM],a=e.native==="geo"?d=>Math.round(d*1e7)/1e7:d=>Math.round(d*1e3)/1e3;this.positionOf(e)?.setAttribute("data-said",JSON.stringify(i??null)),n.edit(d=>{g.write(d,e.key,a(s)),g.write(d,e.secondKey,a(o)),g.write(d,e.saidKey,i)},e),this.changed(),this.sync()}setRow(e,t){const i=document.createElement("div");i.className="parameter-row";const n=this.read(e.hint);n&&(i.title=n);const s=document.createElement("span");return s.textContent=this.read(e.label)??e.key,i.append(s," ",t),i}syncSet(e,t,i,n){if(e.type!=="set")return;const s=g.read(i,e.key),o=new Set(Array.isArray(s)?s:[]),a=e.options(i,n);if(a.length===0){t.textContent=this.read(e.empty)??"";return}[...t.querySelectorAll("input")].map(r=>r.value).join(`
|
|
90
|
+
`)===a.map(r=>r.value).join(`
|
|
91
|
+
`)||t.replaceChildren(...a.map(r=>{const c=document.createElement("label"),l=document.createElement("input");return l.type="checkbox",l.value=r.value,c.append(l," ",r.label),c}));for(const r of t.querySelectorAll("input"))r.checked=o.has(r.value)}identify(e,t){e.dataset.key=t.key,this.idPrefix!==""&&(e.id=`${this.idPrefix}${t.key}`)}write(e,t){const i=this.target;if(!i)return;let n=t;if(e.type==="number"&&typeof t=="number"){const s=i.read();if(s){const o=L.boundsOf(e,s,i.context());n=Math.max(o.min,Math.min(o.max,t))/(e.scale??1)}}i.edit(s=>g.write(s,e.key,n),e),this.changed(),this.sync()}read(e){return this.said.read(e)}static boundsOf(e,t,i){const n=e.bounds?.(t,i);return{min:n?.min??e.min,max:n?.max??e.max}}static swatchOf(e,t){if(typeof e!="string")return t;const i=/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i.exec(e);return i?`#${i[1]}${i[1]}${i[2]}${i[2]}${i[3]}${i[3]}`.toLowerCase():/^#[0-9a-f]{6}$/i.test(e)?e.toLowerCase():t}static shown(e,t){const i=Math.max(2,Math.min(6,(String(t.step).split(".")[1]??"").length));return String(Number((e*(t.scale??1)).toFixed(i)))}static choicesOf(e){return e.choices.map(t=>t.value)}}export{I as A,w as B,A as E,v as N,L as P,E as W,R as a,z as b,G as c,U as r};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const o={"color-vision":"Colour vision","color-vision.hint":"How colours look to someone whose cones differ, from Machado et al. 2009. Only recolours: it does not change brightness or what the eye can resolve.","color-vision.type":"Type","color-vision.type.normal":"Typical","color-vision.type.protan":"Protan (red-weak or red-blind)","color-vision.type.deutan":"Deutan (green-weak or green-blind)","color-vision.type.tritan":"Tritan (blue-weak or blue-blind)","color-vision.severity":"Severity",intoxication:"Alcohol","intoxication.hint":"Lowers contrast sensitivity by about 0.9 dB at 0.08 % blood alcohol (one controlled study, results vary), drawn up to 0.1 % at most: a higher level is recorded but shown as 0.1 %, since nothing was measured past it. Double vision, narrowed field and other drugs are not modelled: no source quantifies them.","intoxication.bloodAlcohol":"Blood alcohol",fatigue:"Fatigue","fatigue.hint":"Stated only: sleep loss has not been shown to change what a healthy eye receives, so the picture is unchanged. It bears on attention and memory, not on vision.","fatigue.hoursAwake":"Awake for"};export{o as perceptionMessages_en};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const o={"color-vision":"Visión del color","color-vision.hint":"Cómo se ven los colores con conos distintos (Machado et al. 2009). Solo recolorea: brillo y resolución no cambian.","color-vision.type":"Tipo","color-vision.type.normal":"Típica","color-vision.type.protan":"Protán (rojo débil o ciego)","color-vision.type.deutan":"Deután (verde débil o ciego)","color-vision.type.tritan":"Tritán (azul débil o ciego)","color-vision.severity":"Gravedad",intoxication:"Alcohol","intoxication.hint":"Reduce la sensibilidad al contraste unos 0,9 dB con 0,08 % de alcohol en sangre (un estudio controlado; los resultados varían), mostrado hasta 0,1 % como máximo: un nivel mayor se registra pero se muestra como 0,1 %, ya que nada se midió por encima. La visión doble, el campo reducido y otras drogas no se modelan: ninguna fuente los cuantifica.","intoxication.bloodAlcohol":"Alcoholemia",fatigue:"Fatiga","fatigue.hint":"Solo declarada: no se ha demostrado que la falta de sueño cambie lo que recibe un ojo sano, así que la imagen no cambia. Afecta a la atención y la memoria, no a la vista.","fatigue.hoursAwake":"Despierto desde hace"};export{o as perceptionMessages_es};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={"color-vision":"Vision des couleurs","color-vision.hint":"Comment les couleurs apparaissent à qui a des cônes différents (Machado et al. 2009). Ne fait que recolorer : luminosité et résolution inchangées.","color-vision.type":"Type","color-vision.type.normal":"Typique","color-vision.type.protan":"Protan (rouge faible ou aveugle)","color-vision.type.deutan":"Deutan (vert faible ou aveugle)","color-vision.type.tritan":"Tritan (bleu faible ou aveugle)","color-vision.severity":"Sévérité",intoxication:"Alcool","intoxication.hint":"Abaisse la sensibilité au contraste d'environ 0,9 dB à 0,08 % d'alcool dans le sang (une étude contrôlée ; les résultats varient), montré jusqu'à 0,1 % au plus : un taux supérieur est consigné mais montré comme 0,1 %, rien n'ayant été mesuré au-delà. Vision double, champ rétréci et autres drogues ne sont pas modélisés : aucune source ne les chiffre.","intoxication.bloodAlcohol":"Alcoolémie",fatigue:"Fatigue","fatigue.hint":"Énoncée seulement : le manque de sommeil n'a pas été montré comme changeant ce que reçoit un œil sain, l'image est donc inchangée. Il touche l'attention et la mémoire, pas la vue.","fatigue.hoursAwake":"Éveillé depuis"};export{e as perceptionMessages_fr};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const o={"color-vision":"Visione dei colori","color-vision.hint":"Come appaiono i colori a chi ha coni diversi (Machado et al. 2009). Ricolora soltanto: luminosità e risoluzione restano uguali.","color-vision.type":"Tipo","color-vision.type.normal":"Tipica","color-vision.type.protan":"Protan (rosso debole o cieco)","color-vision.type.deutan":"Deutan (verde debole o cieco)","color-vision.type.tritan":"Tritan (blu debole o cieco)","color-vision.severity":"Gravità",intoxication:"Alcol","intoxication.hint":"Riduce la sensibilità al contrasto di circa 0,9 dB a 0,08 % di alcol nel sangue (uno studio controllato; i risultati variano), mostrato fino a 0,1 % al massimo: un livello più alto viene registrato ma mostrato come 0,1 %, poiché oltre non è stato misurato nulla. Visione doppia, campo ristretto e altre droghe non sono modellati: nessuna fonte li quantifica.","intoxication.bloodAlcohol":"Alcolemia",fatigue:"Stanchezza","fatigue.hint":"Solo dichiarata: non è dimostrato che la mancanza di sonno cambi ciò che riceve un occhio sano, quindi l'immagine non cambia. Riguarda attenzione e memoria, non la vista.","fatigue.hoursAwake":"Sveglio da"};export{o as perceptionMessages_it};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
class n extends Error{constructor(t,a){super(`${t}: ${a.kind==="status"?a.status:a.kind}`),this.src=t,this.failure=a}}class s{static async blob(t){let a;try{a=await fetch(t)}catch{throw new n(t,await s.whyUnread(t))}if(!a.ok)throw new n(t,{kind:"status",status:a.status});const e=await a.blob();if(e.type&&!e.type.startsWith("image/"))throw new n(t,{kind:"notPicture"});return e}static failureOf(t){return t instanceof n?t.failure:{kind:"notPicture"}}static async whyVideoUnread(t){if(t.startsWith("data:")||t.startsWith("blob:"))return{kind:"notVideo"};let a;try{a=await fetch(t,{method:"HEAD"})}catch{return s.whyUnread(t)}return a.ok?{kind:"notVideo"}:{kind:"status",status:a.status}}static async whyUnread(t){try{return await fetch(t,{mode:"no-cors"}),{kind:"notShared"}}catch{return{kind:"unreachable"}}}}export{s as P,n as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b7 as m,bT as b,cU as A,bM as x,b5 as O,cV as w}from"./ShareDialogElement-DLr5u_tk.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 D=Math.PI/180,z=180/Math.PI;class C{static localDirection(t,e,i,o=new m){const n=Math.tan(e/2*D);return o.set((t.u*2-1)*n*i,(1-t.v*2)*n,-1).normalize()}static picturePoint(t,e,i){if(t.z>=0)return;const o=Math.tan(e/2*D),n=t.x/-t.z/(o*i),r=t.y/-t.z/o;return{u:(n+1)/2,v:(1-r)/2}}static worldDirection(t,e=new m){const i=t.azimuthDeg*D,o=t.altitudeDeg*D;return e.set(Math.sin(i)*Math.cos(o),Math.sin(o),-Math.cos(i)*Math.cos(o))}static aimOf(t){const e=Math.hypot(t.x,t.z);return{azimuthDeg:(Math.atan2(t.x,-t.z)*z+360)%360,altitudeDeg:Math.atan2(t.y,e)*z}}static rotationOf(t){const e=new b;return e.rotation.set(t.pitchDeg*D,-t.headingDeg*D,-(t.rollDeg??0)*D,"YXZ"),e.quaternion.clone()}static anglesOf(t){const e=new A().setFromQuaternion(t,"YXZ"),i=(-e.y*z%360+360)%360,o=-e.z*z;return{headingDeg:i,pitchDeg:e.x*z,rollDeg:Math.abs(o)<1e-9?0:o}}static worldDirectionOf(t,e,i,o=new m){return this.localDirection(t,e.fovDeg,i,o).applyQuaternion(this.rotationOf(e))}static picturePointOf(t,e,i){const o=t.clone().applyQuaternion(this.rotationOf(e).invert()),n=this.picturePoint(o,e.fovDeg,i);if(!(!n||n.u<0||n.u>1||n.v<0||n.v>1))return n}static solve(t,e,i,o=t.length>=3){if(t.length<2)return;if(!o)return this.solveAtField(t,e,i);let n=1,r=179;const h=(Math.sqrt(5)-1)/2;let f=r-h*(r-n),c=n+h*(r-n),s=this.solveAtField(t,e,f),a=this.solveAtField(t,e,c);for(let l=0;l<60&&r-n>1e-4;l++){if(!s||!a)return;s.residualDeg<a.residualDeg?(r=c,c=f,a=s,f=r-h*(r-n),s=this.solveAtField(t,e,f)):(n=f,f=c,s=a,c=n+h*(r-n),a=this.solveAtField(t,e,c))}return s&&a?s.residualDeg<a.residualDeg?s:a:s??a}static solveAtField(t,e,i){const o=t.map(c=>this.localDirection(c.picture,i,e)),n=t.map(c=>this.worldDirection(c.scene)),r=this.triad(o,n);if(!r)return;const h=this.refine(r,o,n);return{registration:{...this.anglesOf(h),fovDeg:i},residualDeg:this.residualDeg(h,o,n)}}static triad(t,e){let i=0,o=1,n=-1;for(let s=0;s<t.length;s++)for(let a=s+1;a<t.length;a++){const g=t[s].clone().cross(t[a]).lengthSq();g>n&&(n=g,i=s,o=a)}if(n<1e-12)return;const r=(s,a)=>{const g=s.clone().normalize(),l=s.clone().cross(a).normalize(),u=l.clone().cross(g);return new w().set(g.x,u.x,l.x,g.y,u.y,l.y,g.z,u.z,l.z)},h=r(t[i],t[o]),c=r(e[i],e[o]).multiply(h.transpose());return new x().setFromRotationMatrix(new O().setFromMatrix3(c))}static refine(t,e,i){const o=t.clone(),n=new m;for(let r=0;r<20;r++){const h=new w().set(0,0,0,0,0,0,0,0,0),f=h.elements,c=new m;for(let l=0;l<e.length;l++){n.copy(e[l]).applyQuaternion(o);const u=n,y=[[0,u.z,-u.y],[-u.z,0,u.x],[u.y,-u.x,0]],v=[i[l].x-u.x,i[l].y-u.y,i[l].z-u.z];for(let p=0;p<3;p++){for(let d=0;d<3;d++)for(let M=0;M<3;M++)f[d*3+p]+=y[M][p]*y[M][d];c.setComponent(p,c.getComponent(p)+y[0][p]*v[0]+y[1][p]*v[1]+y[2][p]*v[2])}}for(let l=0;l<3;l++)f[l*3+l]+=1e-9;const s=c.applyMatrix3(h.invert()),a=s.length();if(a<1e-12)break;const g=new x().setFromAxisAngle(s.normalize(),a);if(o.premultiply(g).normalize(),a<1e-10)break}return o}static residualDeg(t,e,i){let o=0;const n=new m;for(let r=0;r<e.length;r++){n.copy(e[r]).applyQuaternion(t);const h=n.angleTo(i[r])*z;o+=h*h}return Math.sqrt(o/e.length)}}export{C as PictureRegistration};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{w as u}from"./ShareDialogElement-DLr5u_tk.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 o{about="shape";static STEP_DEG=2;static TURN_DEG=60;static ERRATIC_TURNS=3;static OSCILLATIONS=["vibrate","spiral","roll"];async assess(n){const t=this.trajectory(n),s=this.vanish(n),e=this.oscillation(n),i=this.landing(n),c=this.judged(n,"traces"),r=this.occupants(n),h=i.shown&&r.shown?5:i.shown&&c.shown?4:i.shown||t.value==="erratic"||s.shown||e.shown?3:t.value==="abnormal"?2:t.value==="straight"?1:0,a=[{id:"poher-trajectory",basis:t.basis,paths:t.paths,value:o.TRAJECTORIES.indexOf(t.value)},this.criterion("poher-vanish",s),this.criterion("poher-oscillation",e),{...this.criterion("poher-landing",i),unsupported:i.basis===void 0},this.criterion("poher-traces",c),this.criterion("poher-occupants",r)];return{verdict:String(h),criteria:a}}static TRAJECTORIES=["unknown","still","straight","abnormal","erratic"];criterion(n,t){return{id:n,value:t.shown?1:0,basis:t.basis,paths:t.basis===void 0?[]:t.paths}}trajectory(n){let t="unknown";for(const s of n.timeline.sourceIds){const e=this.seen(n,s).filter(a=>a.aim!==void 0).map(a=>a.aim);if(e.length<2)continue;const i=[o.unit(e[0])];for(const a of e.slice(1)){const l=o.unit(a);o.angleDeg(i[i.length-1],l)>=o.STEP_DEG&&i.push(l)}const c=i.length-1;let r=0;for(let a=1;a<i.length-1;a++){const l=o.cross(i[a-1],i[a]),d=o.cross(i[a],i[a+1]);o.angleDeg(l,d)>=o.TURN_DEG&&r++}const h=c===0?"still":r>=o.ERRATIC_TURNS?"erratic":r>0?"abnormal":"straight";o.TRAJECTORIES.indexOf(h)>o.TRAJECTORIES.indexOf(t)&&(t=h)}return t==="unknown"?{value:t,paths:[]}:{value:t,basis:"derived",paths:["timeline"]}}vanish(n){const t=(n.events??[]).findIndex(s=>s.eventType==="vanish"&&u.isPhenomenon(n,s));return t>=0?{shown:!0,basis:"stated",paths:[`events.${t}`]}:{shown:!1,paths:[]}}oscillation(n){const t=new Set((n.interpretation?.bodies??[]).map(e=>e.id)),s=(n.events??[]).findIndex(e=>o.OSCILLATIONS.includes(e.eventType)&&(u.isPhenomenon(n,e)||t.has(e.who?.split("/")[0]??"")));return s>=0?{shown:!0,basis:"stated",paths:[`events.${s}`]}:{shown:!1,paths:[]}}landing(n){const t=e=>!e.onGround&&((e.altitudeAboveGroundM??0)>0||(e.altitudeM??0)>0),s=(n.interpretation?.bodies??[]).findIndex(e=>Array.isArray(e.track)&&e.track.some(i=>i.onGround)&&e.track.some(t));return s>=0?{shown:!0,basis:"assumed",paths:[`interpretation.bodies.${s}`]}:{shown:!1,paths:[]}}occupants(n){const t=n.decor.findIndex(s=>s.kind==="entity");return t>=0?{shown:!0,basis:"stated",paths:[`decor.${t}`]}:this.judged(n,"beings")}judged(n,t){const s=n.account?.strangeness?.[t];return s===void 0?{shown:!1,paths:[]}:{shown:s,basis:"stated",paths:[`account.strangeness.${t}`]}}instants(n,t){return n.timeline.allKeyframes.map(s=>({t:s.t,shape:s.shapes.find(e=>e.sourceId===t)?.shape})).filter(({shape:s})=>s!==void 0).map(({t:s,shape:e})=>({t:s,aim:e.aim,visible:e.transparency<1})).sort((s,e)=>s.t-e.t)}seen(n,t){return this.instants(n,t).filter(s=>s.visible)}static unit(n){const[t,s]=[n.azimuthDeg*Math.PI/180,n.altitudeDeg*Math.PI/180];return[Math.cos(s)*Math.sin(t),Math.cos(s)*Math.cos(t),Math.sin(s)]}static cross(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}static angleDeg(n,t){const s=Math.hypot(...n)*Math.hypot(...t);if(s===0)return 0;const e=(n[0]*t[0]+n[1]*t[1]+n[2]*t[2])/s;return Math.acos(Math.max(-1,Math.min(1,e)))*180/Math.PI}}export{o as PoherAssessor};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import{b2 as F,bi as P,b4 as H,bg as K,bj as N,bb as w,bk as k}from"./ShareDialogElement-DLr5u_tk.js";import{g as U}from"./SaidPosition-CWiVNaNW.js";import"./rr0-ufoathome.mjs";import"./Sighting-CBpJpdm9.js";import"./VisualAids-DI-hEL46.js";import"./Decor-Dn-cvniW.js";import"./RecordingIssue-BlWT8Xsu.js";import"./Obstacles-v9SkfBD7.js";class D{static HOLLOW_M=1;static COVERED_M=3;static WINDOW_M=30;static SAMPLE_M=4;static MAX_GRADE={rail:.025,highSpeed:.035,subway:.04,light_rail:.06,tram:.08,funicular:1/0};static heights(t,s,e){const n=t.map(a=>a.level===0),o=t.map((a,i)=>n[i]?D.targets(a,s,e):[]),c=t.map((a,i)=>n[i]?D.samples(a,o[i]):[]),r=new Map;t.forEach((a,i)=>{if(n[i])for(const h of D.ends(a)){const p=D.key(h),M=r.get(p);M?M.push(i):r.set(p,[i])}});const u=a=>{const i=r.get(D.key(a));if(i)return D.median(i.flatMap(h=>c[h]),a)};return t.map((a,i)=>{if(n[i]){const h=[...new Set([i,...D.ends(a).flatMap(d=>r.get(D.key(d))??[])])].flatMap(d=>c[d]),p=a.centre.map((d,O)=>D.median(h,d)??o[i][O]),[M,A]=D.ends(a);return p[0]=u(M)??p[0],p[p.length-1]=u(A)??p[p.length-1],D.graded(p,a.along,a.highSpeed?D.MAX_GRADE.highSpeed:D.MAX_GRADE[a.kind])}return D.carried(a,s,e,u)})}static targets(t,s,e){return t.centre.map(n=>{const o=s(n.x,n.z);if(e===void 0||n.altitudeM===void 0)return o;const c=n.altitudeM+e;return c-o>D.HOLLOW_M||o-c>D.COVERED_M?c:o})}static samples(t,s){const e=[];let n=0;return t.centre.forEach((o,c)=>{t.along[c]+1e-6<n&&c<t.centre.length-1||(e.push({x:o.x,z:o.z,y:s[c]}),n=t.along[c]+D.SAMPLE_M)}),e}static median(t,s){const e=[];for(const o of t)Math.hypot(o.x-s.x,o.z-s.z)<=D.WINDOW_M&&e.push(o.y);if(e.length===0)return;e.sort((o,c)=>o-c);const n=e.length>>1;return e.length%2===1?e[n]:(e[n-1]+e[n])/2}static graded(t,s,e){if(!Number.isFinite(e)||t.length<3)return t;const n=[...t],o=n.length-1,c=s[o];if(Math.abs(n[o]-n[0])>e*c)return s.map(r=>n[0]+(n[o]-n[0])*r/c);for(let r=1;r<o;r++){const u=e*(s[r]-s[r-1]);n[r]=Math.min(n[r-1]+u,Math.max(n[r-1]-u,n[r]))}for(let r=o-1;r>0;r--){const u=e*(s[r+1]-s[r]);n[r]=Math.min(n[r+1]+u,Math.max(n[r+1]-u,n[r]))}return n}static carried(t,s,e,n){const[o,c]=D.ends(t),r=t.along[t.along.length-1],u=n(o),a=n(c);if(e!==void 0&&t.centre.every(p=>p.altitudeM!==void 0)){const p=t.centre.map(d=>d.altitudeM+e),M=u!==void 0?u-p[0]:0,A=a!==void 0?a-p[p.length-1]:0;return p.map((d,O)=>d+M+(A-M)*t.along[O]/r)}const i=u??s(o.x,o.z),h=a??s(c.x,c.z);return t.along.map(p=>i+(h-i)*p/r)}static ends(t){return[t.centre[0],t.centre[t.centre.length-1]]}static key(t){return`${Math.round(t.x*2)},${Math.round(t.z*2)}`}}class B{positions=[];indices=[];along=[];get vertexCount(){return this.positions.length/3}strip(t,s,e){const n=this.vertexCount;for(let o=0;o<t.length;o++)this.positions.push(t[o].x,t[o].y,t[o].z,s[o].x,s[o].y,s[o].z),e&&this.along.push(e[o],e[o]);for(let o=0;o<t.length-1;o++){const c=n+o*2;this.indices.push(c,c+2,c+1,c+1,c+2,c+3)}}beam(t,s,e,n=!0){const o=s.x-t.x,c=s.y-t.y,r=s.z-t.z,u=Math.hypot(o,c,r);if(u<1e-6)return;const a={x:o/u,y:c/u,z:r/u},i=Math.abs(a.y)>.9?{x:1,y:0,z:0}:{x:0,y:1,z:0},h=a.y*i.z-a.z*i.y,p=a.z*i.x-a.x*i.z,M=a.x*i.y-a.y*i.x,A=Math.hypot(h,p,M),d={x:h/A*e/2,y:p/A*e/2,z:M/A*e/2},O={x:a.y*d.z-a.z*d.y,y:a.z*d.x-a.x*d.z,z:a.x*d.y-a.y*d.x},g=(f,x,E)=>({x:f.x+d.x*x+O.x*E,y:f.y+d.y*x+O.y*E,z:f.z+d.z*x+O.z*E}),_=[[1,1],[-1,1],[-1,-1],[1,-1]];for(let f=0;f<4;f++){const[x,E]=_[f],[z,v]=_[(f+1)%4];this.quad(g(t,x,E),g(t,z,v),g(s,z,v),g(s,x,E))}n&&(this.quad(...[..._].reverse().map(([f,x])=>g(t,f,x))),this.quad(..._.map(([f,x])=>g(s,f,x))))}quad(t,s,e,n){const o=this.vertexCount;this.positions.push(t.x,t.y,t.z,s.x,s.y,s.z,e.x,e.y,e.z,n.x,n.y,n.z),this.indices.push(o,o+1,o+2,o,o+2,o+3)}}class l{static STEP_M=6;static BALLAST_HEIGHT_M=.5;static BALLAST_SLOPE=1.5;static BALLAST_SHOULDER_M=.45;static DECK_DEPTH_M=.8;static BANK_SLOPE=1.5;static SLEEPER_LENGTH_M=2.4;static SLEEPER_WIDTH_M=.29;static SLEEPER_SPACING_M=.6;static RAIL_HEAD_M=.072;static RAIL_HEIGHT_M=.18;static TRAM_RAIL_HEIGHT_M=.03;static LIFT_M=.06;static CATENARY={rail:{contactM:5.5,systemM:1.4,spanM:54,staggerM:.2},highSpeed:{contactM:5.08,systemM:1.4,spanM:63,staggerM:.2},service:{contactM:5.5,systemM:1.2,spanM:45,staggerM:.2},tram:{contactM:6,systemM:0,spanM:30,staggerM:.2}};static MESSENGER_SAG_M=.55;static MAST_SIDE_M=.26;static MAST_OFFSET_M=3.1;static MAST_ABOVE_M=.6;static CONTACT_DIAMETER_M=.012;static MESSENGER_DIAMETER_M=.011;static ARM_SIDE_M=.06;static TRACK_SPACING_M={rail:3.7,highSpeed:4.5,tram:3.1,subway:3.4,light_rail:3.4,funicular:3.2};static BALLAST_ALBEDO=[.17,.16,.15];static BANK_ALBEDO=[.085,.09,.05];static DECK_ALBEDO=[.26,.255,.24];static CONCRETE_ALBEDO=[.36,.35,.33];static WOOD_ALBEDO=[.07,.055,.045];static RUST_ALBEDO=[.085,.068,.058];static STEEL_ALBEDO=[.3,.31,.32];static COPPER_ALBEDO=[.09,.085,.07];static LINE_REACH_M=20;group=new F;stepM=l.STEP_M;drawn=0;laid=[];ballastMaterial=l.pebbled(l.lambert(l.BALLAST_ALBEDO,!0));earthMaterial=l.lambert(l.BANK_ALBEDO,!0);deckMaterial=l.lambert(l.DECK_ALBEDO,!1);concreteSleepers=l.sleeperMaterial(l.CONCRETE_ALBEDO);woodSleepers=l.sleeperMaterial(l.WOOD_ALBEDO);rustMaterial=l.lambert(l.RUST_ALBEDO,!0);headMaterial=new P({color:new H(.62,.62,.62),metalness:1,roughness:.28,polygonOffset:!0,polygonOffsetFactor:-2,polygonOffsetUnits:-2});steelMaterial=l.lambert(l.STEEL_ALBEDO,!1);wireMaterial=l.lambert(l.COPPER_ALBEDO,!1);constructor(){this.group.name="railways"}get count(){return this.drawn}setGroundSpacing(t){this.stepM=Number.isFinite(t)&&t>0?Math.min(l.STEP_M,Math.max(1.5,t/2)):l.STEP_M}set(t,s,e,n,o=1/0){this.clear();const r=t.map(M=>({line:M,path:M.points.map(A=>({...U(A.lat,A.lng,s,e),altitudeM:A.altitudeM}))})).filter(({line:M,path:A})=>M.level>=0&&l.within(A,o)),u=l.altitudeOffset(r,n),a=r.flatMap(({line:M,path:A})=>{const d=this.layoutOf(M,A);return d?[{line:M,layout:d}]:[]}),i=D.heights(a.map(({layout:M})=>M),n,u),h={ballast:new B,earth:new B,deck:new B,concrete:new B,wood:new B,rust:new B,head:new B,steel:new B,wire:new B};a.forEach(({line:M,layout:A},d)=>{this.lay(M,{...A,y:i[d]},n,h),this.laid.push({line:M,centre:A.centre}),this.drawn++});const p=[[h.ballast,this.ballastMaterial,"ballast",!1],[h.earth,this.earthMaterial,"embankments",!1],[h.deck,this.deckMaterial,"decks",!0],[h.concrete,this.concreteSleepers,"sleepers",!1],[h.wood,this.woodSleepers,"sleepers wood",!1],[h.rust,this.rustMaterial,"rails",!1],[h.head,this.headMaterial,"rail heads",!1],[h.steel,this.steelMaterial,"catenary masts",!0],[h.wire,this.wireMaterial,"catenary wires",!1]];for(const[M,A,d,O]of p){const g=l.meshOf(M,A);g&&(g.name=`railways ${d}`,g.castShadow=O,g.receiveShadow=!0,this.group.add(g))}}clear(){for(const t of[...this.group.children])this.group.remove(t),t.geometry?.dispose();this.drawn=0,this.laid=[]}lineAt(t,s){let e;for(const{line:n,centre:o}of this.laid)for(let c=0;c<o.length-1;c++){const r=o[c],u=o[c+1],a=u.x-r.x,i=u.z-r.z,h=a*a+i*i,p=h===0?0:Math.max(0,Math.min(1,((t-r.x)*a+(s-r.z)*i)/h)),M=Math.hypot(t-(r.x+a*p),s-(r.z+i*p));M<=l.LINE_REACH_M&&(!e||M<e.distance)&&(e={line:n,distance:M})}return e?.line}mayMeet(t,s,e,n){const o=Math.hypot(s.x,s.z);if(o<1e-6)return this.lineAt(t.x,t.z)!==void 0;const c=s.x/o,r=s.z/o,u=l.LINE_REACH_M;for(const{centre:a}of this.laid)for(let i=0;i<a.length-1;i++){const h=a[i],p=a[i+1];for(const M of[0,.5,1]){const A=h.x+(p.x-h.x)*M,d=h.z+(p.z-h.z)*M,O=(A-t.x)*c+(d-t.z)*r;if(O<0)continue;const g=Math.abs((A-t.x)*r-(d-t.z)*c),_=Math.hypot(p.x-h.x,p.z-h.z)/2;if(g>u+_)continue;if(t.y+s.y*(O/o)<=e(A,d)+n)return!0}}return!1}contactHeightM(t){if(!(t.electrification!=="overhead"||t.kind==="subway"||t.kind==="funicular"))return l.catenaryOf(t).contactM}static catenaryOf(t){return t.kind==="tram"?l.CATENARY.tram:t.highSpeed?l.CATENARY.highSpeed:t.service?l.CATENARY.service:l.CATENARY.rail}dispose(){this.clear();for(const t of[this.ballastMaterial,this.earthMaterial,this.deckMaterial,this.concreteSleepers,this.woodSleepers,this.rustMaterial,this.headMaterial,this.steelMaterial,this.wireMaterial])t.dispose()}static within(t,s){if(!Number.isFinite(s))return!0;const e=s*1.1+100;return t.some((n,o)=>Math.hypot(n.x,n.z)<=e||o>0&&Math.hypot((n.x+t[o-1].x)/2,(n.z+t[o-1].z)/2)<=e)}static altitudeOffset(t,s){const e=[];for(const{line:n,path:o}of t)if(n.level===0)for(const c of o)c.altitudeM!==void 0&&e.push(s(c.x,c.z)-c.altitudeM);if(!(e.length<5))return e.sort((n,o)=>n-o),e[Math.floor(e.length/2)]}layoutOf(t,s){const e=[];for(let c=0;c<s.length-1;c++){const r=s[c],u=s[c+1],a=Math.max(1,Math.ceil(Math.hypot(u.x-r.x,u.z-r.z)/this.stepM));for(let i=0;i<a;i++){const h=i/a,p=r.altitudeM!==void 0&&u.altitudeM!==void 0?r.altitudeM+(u.altitudeM-r.altitudeM)*h:void 0;e.push({x:r.x+(u.x-r.x)*h,z:r.z+(u.z-r.z)*h,altitudeM:p})}}if(e.push(s[s.length-1]),e.length<2)return;const n=[0];for(let c=1;c<e.length;c++)n.push(n[c-1]+Math.hypot(e[c].x-e[c-1].x,e[c].z-e[c-1].z));if(n[n.length-1]<.5)return;const o=e.map((c,r)=>{const u=e[Math.max(0,r-1)],a=e[Math.min(e.length-1,r+1)],i=a.x-u.x,h=a.z-u.z,p=Math.hypot(i,h);return p<1e-6?{x:1,z:0}:{x:i/p,z:h/p}});return{kind:t.kind,...t.highSpeed?{highSpeed:!0}:{},level:t.level,centre:e,along:n,dir:o}}lay(t,s,e,n){const o=t.highSpeed?l.TRACK_SPACING_M.highSpeed:l.TRACK_SPACING_M[t.kind],c=Math.min(8,Math.max(1,t.tracks)),r=Array.from({length:c},(g,_)=>(_-(c-1)/2)*o),u=t.kind==="tram",a=u?0:l.BALLAST_HEIGHT_M,i=l.LIFT_M,h=(g,_,f)=>({x:s.centre[g].x-s.dir[g].z*_,y:s.y[g]+f,z:s.centre[g].z+s.dir[g].x*_}),p=s.centre.map((g,_)=>_);if(!u){const g=l.SLEEPER_LENGTH_M/2+l.BALLAST_SHOULDER_M+(r[r.length-1]??0),_=p.map(x=>h(x,g,a+i)),f=p.map(x=>h(x,-g,a+i));if(n.ballast.strip(_,f),t.level===0){const x=g+a*l.BALLAST_SLOPE;for(const E of[1,-1]){const z=[],v=[];let m=!1;for(const L of p){const C=h(L,E*x,i),S=e(C.x,C.z)+i,T=C.y-S;T<0&&(C.y=Math.min(S,s.y[L]+a-.05+i)),z.push(C);const I=h(L,E*(x+Math.max(0,T)*l.BANK_SLOPE),i);I.y=Math.min(e(I.x,I.z)+i,C.y),C.y-I.y>.02&&(m=!0),v.push(I)}const b=E>0?_:f;E>0?n.ballast.strip(z,b):n.ballast.strip(b,z),m&&(E>0?n.earth.strip(v,z):n.earth.strip(z,v))}}else{const x=-l.DECK_DEPTH_M,E=g+.15,z=p.map(L=>h(L,E,a+i+.1)),v=p.map(L=>h(L,-E,a+i+.1)),m=p.map(L=>h(L,E,x)),b=p.map(L=>h(L,-E,x));n.deck.strip(m,z),n.deck.strip(v,b),n.deck.strip(b,m),n.deck.strip(z,p.map(L=>h(L,g,a+i+.1))),n.deck.strip(p.map(L=>h(L,-g,a+i+.1)),v)}}const M=t.service?n.wood:n.concrete,A=t.gaugeMm/2e3+l.RAIL_HEAD_M/2,d=u?l.TRAM_RAIL_HEIGHT_M:l.RAIL_HEIGHT_M,O=a+i;for(const g of r){if(!u){const _=l.SLEEPER_LENGTH_M/2;M.strip(p.map(f=>h(f,g+_,O+.004)),p.map(f=>h(f,g-_,O+.004)),s.along)}for(const _ of[1,-1]){const f=g+_*A,x=l.RAIL_HEAD_M/2,E=p.map(v=>h(v,f+x,O+d)),z=p.map(v=>h(v,f-x,O+d));n.head.strip(E,z),n.rust.strip(p.map(v=>h(v,f+x,O)),E),n.rust.strip(z,p.map(v=>h(v,f-x,O)))}}t.electrification==="overhead"&&t.kind!=="subway"&&t.kind!=="funicular"&&this.catenary(t,s,r,O+d,h,e,n)}catenary(t,s,e,n,o,c,r){const u=l.catenaryOf(t),a=s.along[s.along.length-1],i=Math.max(1,Math.round(a/u.spanM)),h=a/i,p=Array.from({length:i},(E,z)=>(z+.5)*h),M=n+u.contactM,A=M+u.systemM,d=(u.systemM>0?A:M)+l.MAST_ABOVE_M,O=e[e.length-1],g=e.length>2,_=e.length===1?[1]:[1,-1],f=(E,z,v)=>{let m=0,b=s.along.length-2;for(;m<b;){const T=m+b+1>>1;s.along[T]<=E?m=T:b=T-1}const L=Math.min(1,Math.max(0,(E-s.along[m])/Math.max(1e-6,s.along[m+1]-s.along[m]))),C=o(m,z,v),S=o(m+1,z,v);return{x:C.x+(S.x-C.x)*L,y:C.y+(S.y-C.y)*L,z:C.z+(S.z-C.z)*L}};for(const E of p){const z=f(E,0,M);if(!(t.level===0&&c(z.x,z.z)>z.y)){for(const v of _){const m=v*(O+l.MAST_OFFSET_M),b=f(E,m,0);t.level===0&&(b.y=Math.min(b.y,c(b.x,b.z)));const L=f(E,m,d);if(r.steel.beam(b,L,l.MAST_SIDE_M),g)continue;const S=(_.length===1?e[0]:v*O)-v*.6,T=u.systemM>0?A:M+.3;r.steel.beam(f(E,m,T),f(E,S,T),l.ARM_SIDE_M),r.steel.beam(f(E,m,M-.4),f(E,S,T),l.ARM_SIDE_M)}if(g){const v=O+l.MAST_OFFSET_M;r.steel.beam(f(E,v,d-.2),f(E,-v,d-.2),l.MAST_SIDE_M*.8)}}}const x=[0,...p,a];for(const[E,z]of e.entries()){const v=m=>m===0||m===x.length-1?0:((m+E)%2===0?1:-1)*u.staggerM;for(let m=0;m<x.length-1;m++){const b=x[m],L=x[m+1];if(L-b<.1||(r.wire.beam(f(b,z+v(m),M),f(L,z+v(m+1),M),l.CONTACT_DIAMETER_M,!1),u.systemM<=0))continue;const C=4,S=T=>{const I=m===0?.5+T/2:m===x.length-2?T/2:T;return A-l.MESSENGER_SAG_M*4*I*(1-I)};for(let T=0;T<C;T++){const I=T/C,G=(T+1)/C;r.wire.beam(f(b+(L-b)*I,z,S(I)),f(b+(L-b)*G,z,S(G)),l.MESSENGER_DIAMETER_M,!1)}}}}static meshOf(t,s){if(t.indices.length===0)return;const e=new K;return e.setAttribute("position",new N(new Float32Array(t.positions),3)),t.along.length>0&&e.setAttribute("aAlong",new N(new Float32Array(t.along),1)),e.setIndex(new N(new Uint32Array(t.indices),1)),e.computeVertexNormals(),new w(e,s)}static lambert(t,s){return new k({color:new H(...t),...s?{polygonOffset:!0,polygonOffsetFactor:-2,polygonOffsetUnits:-2}:{}})}static pebbled(t){return t.onBeforeCompile=s=>{s.vertexShader=s.vertexShader.replace("#include <common>",`#include <common>
|
|
2
|
+
varying vec3 vBallast;`).replace("#include <begin_vertex>",`#include <begin_vertex>
|
|
3
|
+
vBallast = position;`),s.fragmentShader=s.fragmentShader.replace("#include <common>",`#include <common>
|
|
4
|
+
varying vec3 vBallast;
|
|
5
|
+
float ballastHash(vec2 p) {
|
|
6
|
+
p = fract(p * vec2(127.1, 311.7));
|
|
7
|
+
p += dot(p, p + 34.5);
|
|
8
|
+
return fract(p.x * p.y);
|
|
9
|
+
}
|
|
10
|
+
float ballastNoise(vec2 p) {
|
|
11
|
+
vec2 i = floor(p);
|
|
12
|
+
vec2 f = fract(p);
|
|
13
|
+
f = f * f * (3.0 - 2.0 * f);
|
|
14
|
+
return mix(mix(ballastHash(i), ballastHash(i + vec2(1.0, 0.0)), f.x), mix(ballastHash(i + vec2(0.0, 1.0)), ballastHash(i + vec2(1.0, 1.0)), f.x), f.y);
|
|
15
|
+
}`).replace("#include <map_fragment>",`#include <map_fragment>
|
|
16
|
+
{
|
|
17
|
+
float eye = length(vViewPosition);
|
|
18
|
+
vec2 at = vBallast.xz + vec2(0.0, vBallast.y);
|
|
19
|
+
float stones = (ballastHash(floor(at * 22.0)) - 0.5) * 0.9 * (1.0 - smoothstep(4.0, 18.0, eye))
|
|
20
|
+
+ (ballastNoise(at * 6.0) - 0.5) * 0.5 * (1.0 - smoothstep(15.0, 60.0, eye))
|
|
21
|
+
+ (ballastNoise(at * 0.7) - 0.5) * 0.35 * (1.0 - smoothstep(80.0, 300.0, eye));
|
|
22
|
+
diffuseColor.rgb *= 1.0 + stones;
|
|
23
|
+
}`)},t.customProgramCacheKey=()=>"rr0-railway-ballast",t}static sleeperMaterial(t){const s=new k({color:new H(1,1,1),polygonOffset:!0,polygonOffsetFactor:-3,polygonOffsetUnits:-3}),e=new H(...t),n=new H(...l.BALLAST_ALBEDO);return s.onBeforeCompile=o=>{o.uniforms.uSleeper={value:e},o.uniforms.uCrib={value:n},o.uniforms.uSpacing={value:l.SLEEPER_SPACING_M},o.uniforms.uDuty={value:l.SLEEPER_WIDTH_M/l.SLEEPER_SPACING_M},o.vertexShader=o.vertexShader.replace("#include <common>",`#include <common>
|
|
24
|
+
attribute float aAlong;
|
|
25
|
+
varying float vAlong;`).replace("#include <begin_vertex>",`#include <begin_vertex>
|
|
26
|
+
vAlong = aAlong;`),o.fragmentShader=o.fragmentShader.replace("#include <common>",`#include <common>
|
|
27
|
+
varying float vAlong;
|
|
28
|
+
uniform vec3 uSleeper;
|
|
29
|
+
uniform vec3 uCrib;
|
|
30
|
+
uniform float uSpacing;
|
|
31
|
+
uniform float uDuty;
|
|
32
|
+
// How much of [0, x] periods is sleeper: the integral of a pulse of width uDuty at the start of each period.
|
|
33
|
+
float sleeperIntegral(float x) {
|
|
34
|
+
return floor(x) * uDuty + min(fract(x), uDuty);
|
|
35
|
+
}`).replace("#include <map_fragment>",`#include <map_fragment>
|
|
36
|
+
{
|
|
37
|
+
float u = vAlong / uSpacing;
|
|
38
|
+
float w = max(fwidth(u), 1e-4);
|
|
39
|
+
float cover = (sleeperIntegral(u + 0.5 * w) - sleeperIntegral(u - 0.5 * w)) / w;
|
|
40
|
+
diffuseColor.rgb *= mix(uCrib, uSleeper, clamp(cover, 0.0, 1.0));
|
|
41
|
+
}`)},s.customProgramCacheKey=()=>"rr0-railway-sleepers",s}}export{l as RailwaySystem};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const t={timeWithin:"Its time, {time}, is within what is known of it ({range}).",timeOutside:"Its time, {time}, is outside what is known of it ({range}).",timeChanged:"It moves the time from {from} to {time}, which the observation states.",valueWithin:"Its {what}, {value}, is within what is known of it ({min} to {max}).",valueOutside:"Its {what}, {value}, is outside what is known of it ({min} to {max}).",valueChanged:"It moves the {what} from {from} to {value}, which the observation states.",lightingHolds:"The Sun it puts together ({bearing}° from where the camera looks, {altitude}° high) lights the scene as the picture shows it ({from}° to {to}° from where it looks{altitudes}).",lightingFails:"The Sun it puts together ({bearing}° from where the camera looks, {altitude}° high) does not light the scene as the picture shows it ({from}° to {to}° from where it looks{altitudes}).",altitudes:", {min}° to {max}° high",latitude:"latitude",longitude:"longitude",bestFixed:"Most favourable configuration, computed: standing still in the frame and placed nearest the phenomenon all along: it stays {median}° from it at the median, {max}° at most, for a phenomenon of {size}° that travels {travel}°.",bestOneWay:"Most favourable configuration, computed: driven one way (towards {direction}° from the top of the frame, clockwise) and nearest the phenomenon: it stays {median}° from it at the median, {max}° at most, for a phenomenon of {size}° that travels {travel}°.",bestGhost:"Most favourable configuration, computed: a ghost of the lens (factor {k}) with the Sun where the account allows it ({bearing}° from where the camera looks, {altitude}° high): it stays {median}° from the phenomenon at the median, {max}° at most, for a phenomenon of {size}° that travels {travel}°.",bestGhostNeeds:"Leaving the picture's light aside, the most favourable Sun would be {bearing}° from where the camera looks and {altitude}° high (factor {k}): the ghost would stay {median}° from the phenomenon at the median, {max}° at most.",bestStatedGhost:"Most favourable configuration, computed: a ghost of an optic set before the lens, at the factor ({k}) and offset ({offset}°) that lay it best, the Sun {bearing}° from where the camera looks and {altitude}° high: it stays {median}° from the phenomenon at the median, {max}° at most, for a phenomenon of {size}° that travels {travel}°.",bestNoGhost:"Most favourable configuration, computed: no Sun the account allows is within the lens's reach all along, so it throws no ghost of it.",bestGhostOf:"Most favourable configuration, computed: a ghost through the lens (factor {k}) of the light the reading places, where it places it: it stays {median}° from the phenomenon at the median, {max}° at most, and travels {ghostTravel}° where the phenomenon of {size}° travels {travel}°.",bestRealObject:"Most favourable configuration, computed: on its line of sight, it is where the phenomenon is at every instant, at any distance. At {distance} m, where the reading places it, it would be {width} m across and move at {speed} m/s at least across the line of sight from the camera; both in proportion to the distance.",decimal:"."};export{t as readingCheckTexts_en};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={timeWithin:"Su hora, {time}, está dentro de lo que se sabe de ella ({range}).",timeOutside:"Su hora, {time}, está fuera de lo que se sabe de ella ({range}).",timeChanged:"Desplaza la hora de {from} a {time}, que la observación indica.",valueWithin:"Su {what}, {value}, está dentro de lo que se sabe ({min} a {max}).",valueOutside:"Su {what}, {value}, está fuera de lo que se sabe ({min} a {max}).",valueChanged:"Desplaza la {what} de {from} a {value}, que la observación indica.",lightingHolds:"El Sol que compone ({bearing}° de la dirección de mira, {altitude}° de altura) ilumina la escena como la muestra la imagen ({from}° a {to}° de la mira{altitudes}).",lightingFails:"El Sol que compone ({bearing}° de la dirección de mira, {altitude}° de altura) no ilumina la escena como la muestra la imagen ({from}° a {to}° de la mira{altitudes}).",altitudes:", {min}° a {max}° de altura",latitude:"latitud",longitude:"longitud",bestFixed:"Configuración más favorable, calculada: fijo en el encuadre y colocado lo más cerca del fenómeno todo el tiempo, queda a {median}° de él en la mediana, {max}° como mucho, para un fenómeno de {size}° que recorre {travel}°.",bestOneWay:"Configuración más favorable, calculada: empujado en un solo sentido (hacia {direction}° desde lo alto del encuadre, en el sentido horario) y lo más cerca del fenómeno, queda a {median}° de él en la mediana, {max}° como mucho, para un fenómeno de {size}° que recorre {travel}°.",bestGhost:"Configuración más favorable, calculada: un reflejo del objetivo (factor {k}) con el Sol donde el relato lo permite ({bearing}° de la visual, {altitude}° de altura), queda a {median}° del fenómeno en la mediana, {max}° como mucho, para un fenómeno de {size}° que recorre {travel}°.",bestGhostNeeds:"Sin atenerse a la iluminación de la imagen, el Sol más favorable estaría a {bearing}° de la visual y {altitude}° de altura (factor {k}): el reflejo quedaría a {median}° del fenómeno en la mediana, {max}° como mucho.",bestStatedGhost:"Configuración más favorable, calculada: un reflejo de una óptica colocada delante del objetivo, con el factor ({k}) y el desplazamiento ({offset}°) que mejor lo sitúan, el Sol a {bearing}° de la visual y {altitude}° de altura, queda a {median}° del fenómeno en la mediana, {max}° como mucho, para un fenómeno de {size}° que recorre {travel}°.",bestNoGhost:"Configuración más favorable, calculada: ningún Sol que el relato permita está al alcance del objetivo todo el tiempo, que no recibe por tanto ningún reflejo de él.",bestGhostOf:"Configuración más favorable, calculada: un reflejo por el objetivo (factor {k}) de la luz que la lectura coloca, donde la coloca, queda a {median}° del fenómeno en la mediana, {max}° como mucho, y recorre {ghostTravel}° cuando el fenómeno de {size}° recorre {travel}°.",bestRealObject:"Configuración más favorable, calculada: en su línea de visión, está donde está el fenómeno en cada instante, a cualquier distancia. A {distance} m, donde la lectura lo coloca, mediría {width} m e iría al menos a {speed} m/s de través respecto a la línea de visión de la cámara; ambos en proporción a la distancia.",decimal:","};export{e as readingCheckTexts_es};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={timeWithin:"Son heure, {time}, est dans ce qu'on en sait ({range}).",timeOutside:"Son heure, {time}, est hors de ce qu'on en sait ({range}).",timeChanged:"Elle déplace l'heure de {from} à {time}, que l'observation indique.",valueWithin:"Sa {what}, {value}, est dans ce qu'on en sait ({min} à {max}).",valueOutside:"Sa {what}, {value}, est hors de ce qu'on en sait ({min} à {max}).",valueChanged:"Elle déplace la {what} de {from} à {value}, que l'observation indique.",lightingHolds:"Le Soleil qu'elle compose ({bearing}° de la direction de visée, {altitude}° de haut) éclaire la scène comme l'image la montre ({from}° à {to}° de la visée{altitudes}).",lightingFails:"Le Soleil qu'elle compose ({bearing}° de la direction de visée, {altitude}° de haut) n'éclaire pas la scène comme l'image la montre ({from}° à {to}° de la visée{altitudes}).",altitudes:", {min}° à {max}° de haut",latitude:"latitude",longitude:"longitude",bestFixed:"Configuration la plus favorable, calculée : fixe dans le cadre et placé au plus près du phénomène tout au long, il en reste à {median}° en médiane, {max}° au plus, pour un phénomène de {size}° qui parcourt {travel}°.",bestOneWay:"Configuration la plus favorable, calculée : poussé dans un seul sens (vers {direction}° depuis le haut du cadre, dans le sens horaire) et au plus près du phénomène, il en reste à {median}° en médiane, {max}° au plus, pour un phénomène de {size}° qui parcourt {travel}°.",bestGhost:"Configuration la plus favorable, calculée : un reflet de l'objectif (facteur {k}) avec le Soleil où le compte rendu le permet ({bearing}° de la visée, {altitude}° de haut), il reste à {median}° du phénomène en médiane, {max}° au plus, pour un phénomène de {size}° qui parcourt {travel}°.",bestGhostNeeds:"Sans s'en tenir à l'éclairage de l'image, le Soleil le plus favorable serait à {bearing}° de la visée et {altitude}° de haut (facteur {k}) : le reflet resterait à {median}° du phénomène en médiane, {max}° au plus.",bestStatedGhost:"Configuration la plus favorable, calculée : un reflet d'une optique placée devant l'objectif, au facteur ({k}) et au décalage ({offset}°) qui le posent au mieux, le Soleil à {bearing}° de la visée et {altitude}° de haut, il reste à {median}° du phénomène en médiane, {max}° au plus, pour un phénomène de {size}° qui parcourt {travel}°.",bestNoGhost:"Configuration la plus favorable, calculée : aucun Soleil que le compte rendu permet n'est à portée de l'objectif tout au long, qui n'en reçoit donc aucun reflet.",bestGhostOf:"Configuration la plus favorable, calculée : un reflet par l'objectif (facteur {k}) de la lumière que la lecture place, là où elle la place, il reste à {median}° du phénomène en médiane, {max}° au plus, et parcourt {ghostTravel}° quand le phénomène de {size}° en parcourt {travel}°.",bestRealObject:"Configuration la plus favorable, calculée : sur sa ligne de visée, il est là où est le phénomène à chaque instant, à n'importe quelle distance. À {distance} m, où la lecture le place, il mesurerait {width} m et irait au moins à {speed} m/s en travers de la ligne de visée de la caméra ; les deux en proportion de la distance.",decimal:","};export{e as readingCheckTexts_fr};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a={timeWithin:"La sua ora, {time}, è entro ciò che se ne sa ({range}).",timeOutside:"La sua ora, {time}, è fuori da ciò che se ne sa ({range}).",timeChanged:"Sposta l'ora da {from} a {time}, che l'osservazione indica.",valueWithin:"La sua {what}, {value}, è entro ciò che se ne sa (da {min} a {max}).",valueOutside:"La sua {what}, {value}, è fuori da ciò che se ne sa (da {min} a {max}).",valueChanged:"Sposta la {what} da {from} a {value}, che l'osservazione indica.",lightingHolds:"Il Sole che compone ({bearing}° dalla direzione di mira, {altitude}° di altezza) illumina la scena come la mostra l'immagine (da {from}° a {to}° dalla mira{altitudes}).",lightingFails:"Il Sole che compone ({bearing}° dalla direzione di mira, {altitude}° di altezza) non illumina la scena come la mostra l'immagine (da {from}° a {to}° dalla mira{altitudes}).",altitudes:", da {min}° a {max}° di altezza",latitude:"latitudine",longitude:"longitudine",bestFixed:"Configurazione più favorevole, calcolata: fermo nell'inquadratura e posto il più vicino al fenomeno per tutto il tempo, ne resta a {median}° in mediana, {max}° al massimo, per un fenomeno di {size}° che percorre {travel}°.",bestOneWay:"Configurazione più favorevole, calcolata: spinto in un solo senso (verso {direction}° dall'alto dell'inquadratura, in senso orario) e il più vicino al fenomeno, ne resta a {median}° in mediana, {max}° al massimo, per un fenomeno di {size}° che percorre {travel}°.",bestGhost:"Configurazione più favorevole, calcolata: un riflesso dell'obiettivo (fattore {k}) con il Sole dove il resoconto lo consente ({bearing}° dalla visuale, {altitude}° di altezza), resta a {median}° dal fenomeno in mediana, {max}° al massimo, per un fenomeno di {size}° che percorre {travel}°.",bestGhostNeeds:"Lasciando da parte l'illuminazione dell'immagine, il Sole più favorevole sarebbe a {bearing}° dalla visuale e {altitude}° di altezza (fattore {k}): il riflesso resterebbe a {median}° dal fenomeno in mediana, {max}° al massimo.",bestStatedGhost:"Configurazione più favorevole, calcolata: un riflesso di un'ottica posta davanti all'obiettivo, al fattore ({k}) e allo scostamento ({offset}°) che meglio lo collocano, il Sole a {bearing}° dalla visuale e {altitude}° di altezza, resta a {median}° dal fenomeno in mediana, {max}° al massimo, per un fenomeno di {size}° che percorre {travel}°.",bestNoGhost:"Configurazione più favorevole, calcolata: nessun Sole che il resoconto consenta è alla portata dell'obiettivo per tutto il tempo, che quindi non ne riceve alcun riflesso.",bestGhostOf:"Configurazione più favorevole, calcolata: un riflesso attraverso l'obiettivo (fattore {k}) della luce che la lettura colloca, dove la colloca, resta a {median}° dal fenomeno in mediana, {max}° al massimo, e percorre {ghostTravel}° quando il fenomeno di {size}° ne percorre {travel}°.",bestRealObject:"Configurazione più favorevole, calcolata: sulla sua linea di vista, è dove si trova il fenomeno in ogni istante, a qualsiasi distanza. A {distance} m, dove la lettura lo colloca, misurerebbe {width} m e andrebbe almeno a {speed} m/s di traverso rispetto alla linea di vista della telecamera; entrambi in proporzione alla distanza.",decimal:","};export{a as readingCheckTexts_it};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={heading:"Sensitivity:",hint:"What is compared: each direction or size the recording traces to the witness, with what it rests on, against what the body the reading places would look like from where the witness stood, at the same instant. A gap is a contradiction only beyond what a witness's estimate of that kind may be off. The margins say how far each value the reading supposed can be moved before it reproduces less: a narrow margin is a fine-tuning, a wide one a robust reading. A margin is sufficient when it covers at least half of the value's uncertainty each way, as the witness error laws give it (a factor of 10 for a supposed distance): not all of it, since agreement is already judged with that uncertainty.",nothingToConfront:"nothing to set against the account: no body of the reading says which phenomenon it is",noneSaid:"nothing to set against the account: it traces no direction and no size to the witness",noneAgrees:"reproduces none of the witness's {compared} indications",lightSizedContested:"its lights sized as Tycho saw the stars, carried past them: a contested law",agreementOne:"reproduces 1 of the witness's {compared} indications",agreement:"reproduces {agreed} of the witness's {compared} indications",allAgree:"reproduces all the witness's {compared} indications",tooFew:"too few to measure how robust it is",noFreeValue:"nothing supposed: no value to move",tightest:"tightest: {knob}, from {lower} to {upper}",margin:"{knob}: holds from {lower} to {upper}; no law says how uncertain it is",marginJudged:"{knob}: holds from {lower} to {upper}, for an uncertainty of {refLower} to {refUpper} ({coverage} % covered)",sufficient:"sufficient margin",fineTuned:"fine-tuned: {knob} covers only {coverage} % of its uncertainty",atLeast:"{value} and beyond",better:"Another setting reproduces more: {knob} {amount}, {agreed} of {compared}",knobs:{azimuth:"direction",altitude:"height",distance:"distance",size:"size",time:"time"},comparison:{heading:"Readings compared ({n})",hint:"One row per reading of the case, set against the account it reads, as each reading's own sensitivity says it: how many of the witness's indications it reproduces, the median gap between what the witness said and what the reading shows (directions only), whether its margins are sufficient, and how many values it supposed. The more values a reading supposes, the easier a likeness is to make.",reading:"Reading",witness:"Reads",reproduced:"Reproduced",gap:"Median gap",robustness:"Robustness",supposed:"Supposed values",sortBy:"Sort by “{column}”; again to reverse",loading:"…",nothing:"nothing to compare",sufficient:"sufficient",fineTuned:"fine-tuned ({knob})",tooFew:"too little reproduced",unjudged:"no law to judge it"}};export{e as readingSensitivityMessages_en};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={heading:"Sensibilidad:",hint:"Lo que se compara: cada dirección o tamaño que la grabación atribuye al testigo diciendo en qué se basa, frente a lo que daría, visto desde su posición y en el mismo instante, el cuerpo que coloca la lectura. Una diferencia solo es contradicción más allá de la incertidumbre de un testigo para ese tipo de estimación. Los márgenes dicen cuánto se puede desplazar cada valor supuesto por la lectura antes de que reproduzca menos: un margen estrecho indica un ajuste fino, uno amplio una lectura robusta. Un margen es suficiente si cubre al menos la mitad de la incertidumbre del valor a cada lado, según las leyes de error de los testigos (un factor 10 para una distancia supuesta): no toda, pues el acuerdo ya se juzga con esa incertidumbre.",nothingToConfront:"nada que confrontar con el relato: ningún cuerpo de la lectura dice qué fenómeno es",noneSaid:"nada que confrontar: el relato no atribuye al testigo, diciendo en qué se basan, ninguna dirección ni tamaño",noneAgrees:"no reproduce ninguna de las {compared} indicaciones del testigo",lightSizedContested:"sus luces medidas como Tycho veía las estrellas, prolongado más allá: una ley discutida",agreementOne:"reproduce 1 de las {compared} indicaciones del testigo",agreement:"reproduce {agreed} de las {compared} indicaciones del testigo",allAgree:"reproduce las {compared} indicaciones del testigo",tooFew:"demasiado pocas para medir su robustez",noFreeValue:"nada supuesto: ningún valor que desplazar",tightest:"lo más ajustado: {knob}, de {lower} a {upper}",margin:"{knob}: se sostiene de {lower} a {upper}; ninguna ley dice su incertidumbre",marginJudged:"{knob}: se sostiene de {lower} a {upper}, para una incertidumbre de {refLower} a {refUpper} ({coverage} % cubierto)",sufficient:"margen suficiente",fineTuned:"ajuste fino: {knob} solo cubre el {coverage} % de su incertidumbre",atLeast:"{value} y más allá",better:"Otro ajuste reproduce más: {knob} {amount}, {agreed} de {compared}",knobs:{azimuth:"dirección",altitude:"altura",distance:"distancia",size:"tamaño",time:"instante"},comparison:{heading:"Lecturas comparadas ({n})",hint:"Una fila por lectura del caso, confrontada con el relato que lee, como lo dice la sensibilidad de cada lectura: cuántas indicaciones del testigo reproduce, la diferencia mediana entre lo que dijo el testigo y lo que muestra la lectura (solo direcciones), si sus márgenes son suficientes y cuántos valores supuso. Cuantos más valores supone una lectura, más fácil es obtener un parecido.",reading:"Lectura",witness:"Lee",reproduced:"Reproduce",gap:"Diferencia mediana",robustness:"Robustez",supposed:"Valores supuestos",sortBy:"Ordenar por «{column}»; otra vez para invertir",loading:"…",nothing:"nada que confrontar",sufficient:"suficiente",fineTuned:"ajuste fino ({knob})",tooFew:"demasiado poco reproducido",unjudged:"ninguna ley para juzgarla"}};export{e as readingSensitivityMessages_es};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={heading:"Sensibilité :",hint:"Ce qui est comparé : chaque direction ou taille que l'enregistrement attribue au témoin en disant sur quoi elle repose, et ce que donnerait, vu de sa position et au même instant, le corps que place la lecture. Un écart n'est une contradiction qu'au-delà de l'incertitude d'un témoin pour ce type d'estimation. Les marges disent de combien on peut décaler chaque valeur supposée par la lecture avant qu'elle reproduise moins : une marge étroite signale un réglage fin, une marge large une lecture robuste. Une marge est suffisante si elle couvre au moins la moitié de l'incertitude de la valeur de chaque côté, d'après les lois d'erreur des témoins (un facteur 10 pour une distance supposée) : pas la totalité, puisque l'accord est déjà jugé avec cette incertitude.",nothingToConfront:"rien à confronter au compte rendu : aucun corps de la lecture ne dit quel phénomène il est",noneSaid:"rien à confronter : le compte rendu n'attribue au témoin, en disant sur quoi elles reposent, aucune direction ni taille",noneAgrees:"ne reproduit aucune des {compared} indications du témoin",lightSizedContested:"ses feux mesurés comme Tycho voyait les étoiles, prolongé au-delà : une loi contestée",agreementOne:"reproduit 1 des {compared} indications du témoin",agreement:"reproduit {agreed} des {compared} indications du témoin",allAgree:"reproduit les {compared} indications du témoin",tooFew:"trop peu pour mesurer sa robustesse",noFreeValue:"rien de supposé : aucune valeur à décaler",tightest:"le plus serré : {knob}, de {lower} à {upper}",margin:"{knob} : tient de {lower} à {upper} ; aucune loi ne dit son incertitude",marginJudged:"{knob} : tient de {lower} à {upper}, pour une incertitude de {refLower} à {refUpper} ({coverage} % couverts)",sufficient:"marge suffisante",fineTuned:"réglage fin : {knob} ne couvre que {coverage} % de son incertitude",atLeast:"{value} et au-delà",better:"Un autre réglage en reproduit davantage : {knob} {amount}, {agreed} sur {compared}",knobs:{azimuth:"direction",altitude:"hauteur",distance:"distance",size:"taille",time:"instant"},comparison:{heading:"Lectures comparées ({n})",hint:"Une ligne par lecture du dossier, confrontée au compte rendu qu'elle lit, comme le dit la sensibilité de chaque lecture : combien des indications du témoin elle reproduit, l'écart médian entre ce qu'a dit le témoin et ce que montre la lecture (directions seulement), si ses marges sont suffisantes, et combien de valeurs elle a supposées. Plus une lecture suppose de valeurs, plus une ressemblance est facile à obtenir.",reading:"Lecture",witness:"Lit",reproduced:"Reproduit",gap:"Écart médian",robustness:"Robustesse",supposed:"Valeurs supposées",sortBy:"Trier par « {column} » ; à nouveau pour inverser",loading:"…",nothing:"rien à confronter",sufficient:"suffisante",fineTuned:"réglage fin ({knob})",tooFew:"trop peu reproduit",unjudged:"aucune loi pour en juger"}};export{e as readingSensitivityMessages_fr};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={heading:"Sensibilità:",hint:"Ciò che si confronta: ogni direzione o dimensione che la registrazione attribuisce al testimone dicendo su cosa si basa, con ciò che darebbe, visto dalla sua posizione e nello stesso istante, il corpo che la lettura colloca. Uno scarto è una contraddizione solo oltre l'incertezza di un testimone per quel tipo di stima. I margini dicono di quanto si può spostare ciascun valore supposto dalla lettura prima che riproduca meno: un margine stretto segnala una regolazione fine, uno ampio una lettura robusta. Un margine è sufficiente se copre almeno metà dell'incertezza del valore da ciascun lato, secondo le leggi di errore dei testimoni (un fattore 10 per una distanza supposta): non tutta, poiché l'accordo è già giudicato con quell'incertezza.",nothingToConfront:"niente da confrontare con il resoconto: nessun corpo della lettura dice quale fenomeno sia",noneSaid:"niente da confrontare: il resoconto non attribuisce al testimone, dicendo su cosa si basano, nessuna direzione né dimensione",noneAgrees:"non riproduce nessuna delle {compared} indicazioni del testimone",lightSizedContested:"le sue luci misurate come Tycho vedeva le stelle, prolungato oltre: una legge contestata",agreementOne:"riproduce 1 delle {compared} indicazioni del testimone",agreement:"riproduce {agreed} delle {compared} indicazioni del testimone",allAgree:"riproduce tutte le {compared} indicazioni del testimone",tooFew:"troppo poche per misurarne la robustezza",noFreeValue:"niente di supposto: nessun valore da spostare",tightest:"il più stretto: {knob}, da {lower} a {upper}",margin:"{knob}: regge da {lower} a {upper}; nessuna legge ne dice l'incertezza",marginJudged:"{knob}: regge da {lower} a {upper}, per un'incertezza da {refLower} a {refUpper} ({coverage} % coperto)",sufficient:"margine sufficiente",fineTuned:"regolazione fine: {knob} copre solo il {coverage} % della sua incertezza",atLeast:"{value} e oltre",better:"Un'altra regolazione ne riproduce di più: {knob} {amount}, {agreed} su {compared}",knobs:{azimuth:"direzione",altitude:"altezza",distance:"distanza",size:"dimensione",time:"istante"},comparison:{heading:"Letture a confronto ({n})",hint:"Una riga per lettura del caso, confrontata con il resoconto che legge, come dice la sensibilità di ciascuna lettura: quante indicazioni del testimone riproduce, lo scarto mediano tra ciò che ha detto il testimone e ciò che mostra la lettura (solo direzioni), se i suoi margini sono sufficienti e quanti valori ha supposto. Più valori una lettura suppone, più è facile ottenere una somiglianza.",reading:"Lettura",witness:"Legge",reproduced:"Riproduce",gap:"Scarto mediano",robustness:"Robustezza",supposed:"Valori supposti",sortBy:"Ordina per «{column}»; di nuovo per invertire",loading:"…",nothing:"niente da confrontare",sufficient:"sufficiente",fineTuned:"regolazione fine ({knob})",tooFew:"troppo poco riprodotto",unjudged:"nessuna legge per giudicarla"}};export{e as readingSensitivityMessages_it};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
class t{static EN={"unknown-key":"{path}: unknown key, ignored","wrong-type":"{path}: expected {expected}, found {found}","not-in-list":"{path}: {found} is not one of {expected}","out-of-range":"{path}: {found} is outside {expected}",defaulted:"{path}: missing, {expected} used",unplaced:"{path}: no aim (and no bounds), drawn at the middle of the view",unsized:"{path}: no angular size (and no bounds), drawn one pixel wide","pixels-over-angles":"{path}: bounds restated without aim or angular, so the shape follows the pixels"};static text(e,n=t.EN){return n[e.kind].replace("{path}",e.path).replace("{expected}",e.expected??"").replace("{found}",e.found??"")}static warn(e,n){if(e.length===0)return;const o=e.map(a=>` ${t.text(a)}`);console.warn(`UFO@home: ${e.length} problem(s) in ${n??"this recording"}:
|
|
2
|
+
${o.join(`
|
|
3
|
+
`)}`)}}export{t as R};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const u="https://ufoathome.org/reentries/index.json";class e{static MINUTE_SLACK_MS=60*6e4;static WINDOW_SLACK_MS=60*6e4;static VISIBLE_KM=1500;static VISIBLE_DEG=e.VISIBLE_KM/111.2;static EARTH_RADIUS_KM=6371;fetchImpl;indexUrls;index;years=new Map;constructor(s={}){this.fetchImpl=s.fetchImpl??fetch.bind(globalThis),this.indexUrls=s.indexUrls??e.defaultIndexUrls()}static defaultIndexUrls(){const s=[];return typeof location<"u"&&/^https?:$/.test(location.protocol)&&s.push(new URL("/reentries/index.json",location.href).href),s.includes(u)||s.push(u),s}async credit(){return(await this.loadIndex())?.index.credit}async candidates(s,n,i){const o=await this.loadIndex();if(!o)return;const a=new Set;for(const t of[s-e.DAY_MS,n+e.DAY_MS])a.add(String(new Date(t).getUTCFullYear()));const d=(await Promise.all([...a].filter(t=>o.index.years.includes(t)).map(t=>this.yearOf(t,o.base)))).flat();return e.match(d,s,n,i)}static DAY_MS=864e5;static match(s,n,i,o){const a=[];for(const t of s){if(t.inclinationDeg!==void 0&&Math.abs(o.lat)>t.inclinationDeg+e.VISIBLE_DEG)continue;const c=Date.parse(t.precision==="day"?`${t.time}T00:00Z`:t.time);if(Number.isFinite(c))if(t.precision==="minute"){const f=c<n?n-c:c>i?c-i:0;if(f>e.MINUTE_SLACK_MS)continue;let r;if(t.seenLat!==void 0&&t.seenLng!==void 0&&(r=e.distanceKm(o.lat,o.lng,t.seenLat,t.seenLng),r>e.VISIBLE_KM))continue;a.push({record:t,timeMs:c,offsetMinutes:Math.round(f/6e4),seenKm:r})}else{const f=t.precision==="day"?e.DAY_MS/2:(t.uncertaintyHours??0)*36e5,r=t.precision==="day"?c+f:c,l=e.WINDOW_SLACK_MS;if(r+f+l<n||r-f-l>i)continue;a.push({record:t,timeMs:r})}}const d={minute:0,hours:1,day:2};return a.sort((t,c)=>d[t.record.precision]-d[c.record.precision]||(t.record.uncertaintyHours??0)-(c.record.uncertaintyHours??0)||t.timeMs-c.timeMs)}static distanceKm(s,n,i,o){const a=Math.PI/180,d=Math.sin(s*a)*Math.sin(i*a)+Math.cos(s*a)*Math.cos(i*a)*Math.cos((o-n)*a);return e.EARTH_RADIUS_KM*Math.acos(Math.max(-1,Math.min(1,d)))}loadIndex(){return this.index??=(async()=>{for(const s of this.indexUrls)try{const n=await this.fetchImpl(s);if(n.ok)return{index:await n.json(),base:s}}catch{}})(),this.index}yearOf(s,n){let i=this.years.get(s);return i||(i=this.fetchImpl(new URL(`${s}.json`,n).href).then(o=>o.ok?o.json():[]).catch(()=>[]),this.years.set(s,i)),i}}export{e as R};
|