@rr0/ufoathome 0.194.0 → 0.196.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-scene/rr0-scene.mjs +4 -4
- package/dist-embed-sighting/CaseMessages_en-G5J5w1_d.js +1 -0
- package/dist-embed-sighting/CaseMessages_es-D7Rp1_1K.js +1 -0
- package/dist-embed-sighting/CaseMessages_fr-B8eZ1NIJ.js +1 -0
- package/dist-embed-sighting/CaseMessages_it-Cu02nVVo.js +1 -0
- package/dist-embed-sighting/{CaseReportExport-B9iaGKNP.js → CaseReportExport-CdRgJb5M.js} +1 -1
- package/dist-embed-sighting/rr0-sighting.mjs +343 -324
- package/dist-embed-sighting-editor/{AdsbLolArchiveProvider--KjPxNqw.js → AdsbLolArchiveProvider-BqEnqRP0.js} +1 -1
- package/dist-embed-sighting-editor/{BallesterGuaspAssessor-BTmq0r-G.js → BallesterGuaspAssessor-BL_yzudf.js} +1 -1
- package/dist-embed-sighting-editor/{BeamEditor-CI8-9VOc.js → BeamEditor-DA29mfqm.js} +1 -1
- package/dist-embed-sighting-editor/{BeamSystem-odg570aR.js → BeamSystem-DYohqXlF.js} +1 -1
- package/dist-embed-sighting-editor/{BirdEditor-DV3ndYff.js → BirdEditor-CAoRqqRV.js} +1 -1
- package/dist-embed-sighting-editor/{BirdFlock-O7K_g8y7.js → BirdFlock-TI63ZAKZ.js} +1 -1
- package/dist-embed-sighting-editor/{CaseEditorMessages_en-CoFukfwf.js → CaseEditorMessages_en-BPdxQsTX.js} +1 -1
- package/dist-embed-sighting-editor/{CaseEditorMessages_es-DZptbzB7.js → CaseEditorMessages_es-B48BAICC.js} +1 -1
- package/dist-embed-sighting-editor/{CaseEditorMessages_fr-DXl2GNmR.js → CaseEditorMessages_fr-DTWi9mIY.js} +1 -1
- package/dist-embed-sighting-editor/{CaseEditorMessages_it-ss10VmRM.js → CaseEditorMessages_it-CMLxgu8y.js} +1 -1
- package/dist-embed-sighting-editor/CaseElement-AXaERD8m.js +112 -0
- package/dist-embed-sighting-editor/CaseMessages_en-G5J5w1_d.js +1 -0
- package/dist-embed-sighting-editor/CaseMessages_es-D7Rp1_1K.js +1 -0
- package/dist-embed-sighting-editor/CaseMessages_fr-B8eZ1NIJ.js +1 -0
- package/dist-embed-sighting-editor/CaseMessages_it-Cu02nVVo.js +1 -0
- package/dist-embed-sighting-editor/{CaseReportExport-D0GXupCT.js → CaseReportExport-CDZp6xGk.js} +2 -2
- package/dist-embed-sighting-editor/{ContrailSystem-BddkU7fj.js → ContrailSystem-B0cQbaHc.js} +1 -1
- package/dist-embed-sighting-editor/{ControlPasses-CNlCUT1L.js → ControlPasses-BvS8haeS.js} +1 -1
- package/dist-embed-sighting-editor/{CoverageAssessor-DjY8iKp5.js → CoverageAssessor-DD1kSvun.js} +1 -1
- package/dist-embed-sighting-editor/{DroneEditor-DRsM2ash.js → DroneEditor-BRB2-dAw.js} +1 -1
- package/dist-embed-sighting-editor/{DroneFlight-Fr4Vgso3.js → DroneFlight-BpnBgJ9K.js} +1 -1
- package/dist-embed-sighting-editor/{Flightradar24Provider-BxeduRam.js → Flightradar24Provider-D5OdIL0L.js} +1 -1
- package/dist-embed-sighting-editor/{GLTFLoader-C6nlGTTi.js → GLTFLoader-DuqJVU4y.js} +1 -1
- package/dist-embed-sighting-editor/{HeadlightSystem-DI5wHYZu.js → HeadlightSystem-BejdfHqe.js} +1 -1
- package/dist-embed-sighting-editor/{HynekAssessor-DlXalbph.js → HynekAssessor-CwzpS7YP.js} +1 -1
- package/dist-embed-sighting-editor/{LanternEditor-M887ltwe.js → LanternEditor-BnXAwLuQ.js} +1 -1
- package/dist-embed-sighting-editor/{LaserBeam-Drpkr84G.js → LaserBeam-tqM2fwHf.js} +1 -1
- package/dist-embed-sighting-editor/{LaunchEditor-BjAk4XZR.js → LaunchEditor-vwecAGwH.js} +1 -1
- package/dist-embed-sighting-editor/{LaunchPlume-CrzPcqw7.js → LaunchPlume-DWyU0YyJ.js} +1 -1
- package/dist-embed-sighting-editor/{LaunchSimulation-C1ZWpKZT.js → LaunchSimulation-C_OJQoKC.js} +1 -1
- package/dist-embed-sighting-editor/{ModelSource-Bko_3OJt.js → ModelSource-D1Wt6VYS.js} +1 -1
- package/dist-embed-sighting-editor/{ModelThumbnails-DSshyLu2.js → ModelThumbnails-C_8KCF7H.js} +1 -1
- package/dist-embed-sighting-editor/{ModelViewer-_yhAYvNy.js → ModelViewer-Cy-6IZBY.js} +1 -1
- package/dist-embed-sighting-editor/{ModuleConformance-B6iFVb8X.js → ModuleConformance-DYi4XZdB.js} +2 -2
- package/dist-embed-sighting-editor/{ModuleSession-jKFl1FMo.js → ModuleSession-BDbaoiCf.js} +2 -2
- package/dist-embed-sighting-editor/ModuleThree-DRf9SEr_.js +1 -0
- package/dist-embed-sighting-editor/{ModulesPanelElement-VPRCdjmv.js → ModulesPanelElement-hDjGLhRa.js} +3 -3
- package/dist-embed-sighting-editor/{NearestApproach-O8k2n_qL.js → NearestApproach-D6tQo7dk.js} +1 -1
- package/dist-embed-sighting-editor/{PoherAssessor-sTJEnlmb.js → PoherAssessor-BTYpHucH.js} +1 -1
- package/dist-embed-sighting-editor/{RailwaySystem-BZqNSSFA.js → RailwaySystem-D_8D64Bu.js} +1 -1
- package/dist-embed-sighting-editor/{ReentryEditor-DfDGpL5C.js → ReentryEditor-D7HxkvKP.js} +2 -2
- package/dist-embed-sighting-editor/{ReentrySimulation-BuUK0niI.js → ReentrySimulation-Bom073AV.js} +1 -1
- package/dist-embed-sighting-editor/{ReferenceSystem-DvcQp167.js → ReferenceSystem-D_eueNAb.js} +1 -1
- package/dist-embed-sighting-editor/{SightingElement-BfxNhmfn.js → SightingElement-DukKlaH1.js} +4 -4
- package/dist-embed-sighting-editor/{SkyLantern-B7UlFgmB.js → SkyLantern-BDpxvmY3.js} +1 -1
- package/dist-embed-sighting-editor/{TraceSystem-vZF4B5EC.js → TraceSystem-B1mmypS3.js} +2 -2
- package/dist-embed-sighting-editor/{WaterSystem-DSWmZbiL.js → WaterSystem-mZ-f2CcD.js} +2 -2
- package/dist-embed-sighting-editor/rr0-sighting-editor.mjs +378 -366
- package/dist-embed-sighting-editor/{trafficRuntime-C5BXL-G6.js → trafficRuntime-CvK_m6bC.js} +1 -1
- package/dist-embed-ufoathome/{AdsbLolArchiveProvider-DXRO-h2K.js → AdsbLolArchiveProvider-BAZqWk1I.js} +1 -1
- package/dist-embed-ufoathome/{BallesterGuaspAssessor-ZSDHMhXN.js → BallesterGuaspAssessor-D5DnaJGn.js} +1 -1
- package/dist-embed-ufoathome/{BeamEditor-BvF4J204.js → BeamEditor-DmuKTRqU.js} +1 -1
- package/dist-embed-ufoathome/{BeamSystem-Yg5JRiCT.js → BeamSystem-KHzcEosy.js} +1 -1
- package/dist-embed-ufoathome/{BodyEditor-CRJFVGzZ.js → BodyEditor-Blkm_Xmd.js} +1 -1
- package/dist-embed-ufoathome/{CaseEditorElement-MwO-zwnP.js → CaseEditorElement-BTZu9wey.js} +41 -36
- package/dist-embed-ufoathome/{CaseEditorMessages_en-CoFukfwf.js → CaseEditorMessages_en-BPdxQsTX.js} +1 -1
- package/dist-embed-ufoathome/{CaseEditorMessages_es-DZptbzB7.js → CaseEditorMessages_es-B48BAICC.js} +1 -1
- package/dist-embed-ufoathome/{CaseEditorMessages_fr-DXl2GNmR.js → CaseEditorMessages_fr-DTWi9mIY.js} +1 -1
- package/dist-embed-ufoathome/{CaseEditorMessages_it-ss10VmRM.js → CaseEditorMessages_it-CMLxgu8y.js} +1 -1
- package/dist-embed-ufoathome/CaseElement-Cr3vTWdf.js +112 -0
- package/dist-embed-ufoathome/CaseMessages_en-G5J5w1_d.js +1 -0
- package/dist-embed-ufoathome/CaseMessages_es-D7Rp1_1K.js +1 -0
- package/dist-embed-ufoathome/CaseMessages_fr-B8eZ1NIJ.js +1 -0
- package/dist-embed-ufoathome/CaseMessages_it-Cu02nVVo.js +1 -0
- package/dist-embed-ufoathome/{CaseReportExport-D9YyGZHP.js → CaseReportExport-CyuSf3U_.js} +3 -3
- package/dist-embed-ufoathome/{CaseTimeline-CnP5rqaK.js → ColumnResize-DifCqMt1.js} +14 -7
- package/dist-embed-ufoathome/{ContrailSystem-O_yvjart.js → ContrailSystem-DqZ8PoEd.js} +1 -1
- package/dist-embed-ufoathome/{ControlPasses-BaglOE-7.js → ControlPasses-BtU_MVQU.js} +1 -1
- package/dist-embed-ufoathome/{CoverageAssessor-CBh0sDI1.js → CoverageAssessor-DkVligEj.js} +1 -1
- package/dist-embed-ufoathome/{Flightradar24Provider-C8Uj-qTs.js → Flightradar24Provider-GYjtvwah.js} +1 -1
- package/dist-embed-ufoathome/{GLTFLoader-B4SVqjkZ.js → GLTFLoader-DzEwUqtj.js} +1 -1
- package/dist-embed-ufoathome/{GeoJsonExport-C-daFhc2.js → GeoJsonExport-B1i0YjqN.js} +1 -1
- package/dist-embed-ufoathome/{GeographicFigures-N4WyX3J_.js → GeographicFigures-D5ZCRN0K.js} +1 -1
- package/dist-embed-ufoathome/{HeadlightSystem-7mtgTwud.js → HeadlightSystem-x2xYh-cs.js} +1 -1
- package/dist-embed-ufoathome/{HynekAssessor-DdoHR-Qt.js → HynekAssessor-DOUPfuRV.js} +1 -1
- package/dist-embed-ufoathome/{InterviewEditorElement-BSXLlt4e.js → InterviewEditorElement-Dt-KQiv0.js} +1 -1
- package/dist-embed-ufoathome/{InterviewElement-Dwk9iHNv.js → InterviewElement-BPsBLXlf.js} +1 -1
- package/dist-embed-ufoathome/{KmlExport-CX-tTjIv.js → KmlExport-JEXMAssj.js} +1 -1
- package/dist-embed-ufoathome/{LaserBeam-DUL1O57g.js → LaserBeam-Cy9lfcCE.js} +1 -1
- package/dist-embed-ufoathome/{LaunchEditor-X_zWEOTY.js → LaunchEditor-zWZhMyLf.js} +1 -1
- package/dist-embed-ufoathome/{LaunchPlume-CcfhClxb.js → LaunchPlume-CcUQvACB.js} +1 -1
- package/dist-embed-ufoathome/{LaunchSimulation-C9gbGzGM.js → LaunchSimulation-DRH0rTE7.js} +1 -1
- package/dist-embed-ufoathome/{ModelSource-BtuW2Ztg.js → ModelSource-Dljnl-RW.js} +1 -1
- package/dist-embed-ufoathome/{ModelThumbnails-CacTTCW4.js → ModelThumbnails-DeaPuKSb.js} +1 -1
- package/dist-embed-ufoathome/{ModelViewer-BlFPQJAr.js → ModelViewer-B-ZLBTmq.js} +1 -1
- package/dist-embed-ufoathome/{ModuleConformance-qYpBoQH9.js → ModuleConformance-Bd8yK7Ic.js} +2 -2
- package/dist-embed-ufoathome/{ModuleSession-D4LhYKvL.js → ModuleSession-DXdpVejH.js} +3 -3
- package/dist-embed-ufoathome/{ModuleThree-DLikU-uy.js → ModuleThree-BL59t48W.js} +1 -1
- package/dist-embed-ufoathome/{ModulesPanelElement-GY7cTQ5t.js → ModulesPanelElement-6KUAMJcl.js} +3 -3
- package/dist-embed-ufoathome/{NearestApproach-4ntSx6IQ.js → NearestApproach-wbFbwOAh.js} +1 -1
- package/dist-embed-ufoathome/{PictureRegistration-BLs4DkTI.js → PictureRegistration-CfSYGbeh.js} +1 -1
- package/dist-embed-ufoathome/{PoherAssessor-6t5qvmJy.js → PoherAssessor-CVIeQpd7.js} +1 -1
- package/dist-embed-ufoathome/{RailwaySystem-Dm-PbG_D.js → RailwaySystem-DTXetaSg.js} +1 -1
- package/dist-embed-ufoathome/{ReentryEditor-C7A3Kh3_.js → ReentryEditor-7Fxkxq-Q.js} +1 -1
- package/dist-embed-ufoathome/{ReentrySimulation-BlgfVSxb.js → ReentrySimulation-T3H0mJI3.js} +1 -1
- package/dist-embed-ufoathome/{ReferenceSystem-Bv62TprV.js → ReferenceSystem-CJaq2UzO.js} +1 -1
- package/dist-embed-ufoathome/{ShareDialogElement-DLr5u_tk.js → ShareDialogElement-ClhewPap.js} +11 -11
- package/dist-embed-ufoathome/{SightingElement-DuNE_Yt0.js → SightingElement-BtHQ5LDE.js} +4 -4
- package/dist-embed-ufoathome/{TraceSystem-Cl5kzaIr.js → TraceSystem-B42kzZXG.js} +1 -1
- package/dist-embed-ufoathome/{VideoButton-DXPI7_Vt.js → VideoButton-DhanY6AD.js} +1 -1
- package/dist-embed-ufoathome/{WaterSystem-CTGGh-Y-.js → WaterSystem-DyJivqCq.js} +1 -1
- package/dist-embed-ufoathome/rr0-ufoathome.mjs +3 -3
- package/dist-embed-ufoathome/{surroundingsSources-CVKKb8h6.js → surroundingsSources-DEMGw8rm.js} +1 -1
- package/dist-embed-ufoathome/{trafficRuntime-DvKPyJcx.js → trafficRuntime-BJFdLEcT.js} +1 -1
- package/package.json +1 -1
- package/dist-embed-sighting/CaseMessages_en-BbbbikHH.js +0 -1
- package/dist-embed-sighting/CaseMessages_es-AHBxl8Ka.js +0 -1
- package/dist-embed-sighting/CaseMessages_fr-CD33PQCH.js +0 -1
- package/dist-embed-sighting/CaseMessages_it-DyMACGSU.js +0 -1
- package/dist-embed-sighting-editor/CaseElement-DzwFIDZZ.js +0 -100
- package/dist-embed-sighting-editor/CaseMessages_en-BbbbikHH.js +0 -1
- package/dist-embed-sighting-editor/CaseMessages_es-AHBxl8Ka.js +0 -1
- package/dist-embed-sighting-editor/CaseMessages_fr-CD33PQCH.js +0 -1
- package/dist-embed-sighting-editor/CaseMessages_it-DyMACGSU.js +0 -1
- package/dist-embed-sighting-editor/ModuleThree-Fvr5G-Yh.js +0 -1
- package/dist-embed-ufoathome/CaseElement-Ch0QzF7-.js +0 -100
- package/dist-embed-ufoathome/CaseMessages_en-BbbbikHH.js +0 -1
- package/dist-embed-ufoathome/CaseMessages_es-AHBxl8Ka.js +0 -1
- package/dist-embed-ufoathome/CaseMessages_fr-CD33PQCH.js +0 -1
- package/dist-embed-ufoathome/CaseMessages_it-DyMACGSU.js +0 -1
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./InterviewElement-B3tm7y49.js","./rr0-sighting-editor.mjs","./interviewJson-CsMHIcZ-.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{a9 as u,a as T,aa as M,ab as R,f as v,i as _,ac as L,ad as U,a6 as $,ae as I,af as j,ag as H,ah as V,s as P,U as B,c as G,ai as q,aj as w,_ as D,I as F}from"./rr0-sighting-editor.mjs";import{SHOW_INFO_ATTRIBUTE as A,OBSERVER_ATTRIBUTE as y,registerSighting as K,HIDE_PICKERS_ATTRIBUTE as S,SIGHTING_ELEMENT_NAME as p,CASE_NAMED_ATTRIBUTE as W,INTERPRETATION_ATTRIBUTE as E,OBSERVER_CHANGE_EVENT as O,INTERPRETATION_CHANGE_EVENT as z}from"./SightingElement-BfxNhmfn.js";const Z=`
|
|
3
|
-
<header class="case-head">
|
|
4
|
-
<div class="case-bar">
|
|
5
|
-
<p id="case-kind" class="case-kind"></p>
|
|
6
|
-
<h2 id="case-title" class="case-title"></h2>
|
|
7
|
-
<!-- The same pair the observation carries, for the case: the way into the editor, and what the case says of itself. -->
|
|
8
|
-
<!-- The same three in the same order as an observation carries (see sightingTemplate): the way into the editor, this element's own
|
|
9
|
-
toggle, and what it says of itself. A reader moving between a case and an observation finds the buttons where they were. -->
|
|
10
|
-
<span class="case-actions">
|
|
11
|
-
<!-- Sharing the case: its address and the element that shows it whole (an observation of it is shared from its own player). -->
|
|
12
|
-
<button id="share" type="button" class="icon-btn" aria-haspopup="dialog"></button>
|
|
13
|
-
<rr0-case-export id="export" class="case-export"></rr0-case-export>
|
|
14
|
-
<button id="edit" type="button" class="icon-btn"><svg viewBox="0 0 16 16" width="14" height="14" aria-hidden="true"><path d="M11.3 1.3a1 1 0 0 1 1.4 0l2 2a1 1 0 0 1 0 1.4l-8.5 8.5-3.4.9.9-3.4 8.6-8.4Zm-7 9.2-.5 1.7 1.7-.5 6.9-6.9-1.2-1.2-6.9 6.9Z" fill="currentColor"/></svg></button>
|
|
15
|
-
<button id="timeline-button" type="button" class="icon-btn" aria-pressed="true"><svg viewBox="0 0 16 16" width="14" height="14" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><circle cx="8" cy="8" r="6"/><path d="M8 4.6V8l2.4 1.6"/></svg></button>
|
|
16
|
-
<button id="info" type="button" class="icon-btn" aria-expanded="false"><svg viewBox="0 0 16 16" width="14" height="14" aria-hidden="true"><circle cx="8" cy="3.6" r="1.4" fill="currentColor"/><path d="M6 6.5h3v6h1.5V14h-4.5v-1.5H7.5V8H6Z" fill="currentColor"/></svg></button>
|
|
17
|
-
</span>
|
|
18
|
-
</div>
|
|
19
|
-
<p id="case-summary" class="case-summary" hidden></p>
|
|
20
|
-
<rr0-share-dialog id="share-dialog"></rr0-share-dialog>
|
|
21
|
-
</header>
|
|
22
|
-
<!-- The chronology and what is open, one above the other; side by side when the case is given the width for both (see .case-layout). -->
|
|
23
|
-
<div class="case-layout">
|
|
24
|
-
<!-- The chronology, in the upper part: choosing an event opens it alone below; its mark on the rail shows it beside what is open, or puts
|
|
25
|
-
it away. Several can be open at once that way. -->
|
|
26
|
-
<section class="case-timeline">
|
|
27
|
-
<div class="events-bar">
|
|
28
|
-
<h3 class="events-heading"><span id="events-icon" class="events-icon" aria-hidden="true"></span><span id="events-heading"></span></h3>
|
|
29
|
-
<!-- Each reading under the observation it reads, or every event in the order of time: the reader's choice, remembered. -->
|
|
30
|
-
<button id="group-readings" type="button" class="icon-btn" aria-pressed="false"><svg viewBox="0 0 16 16" width="14" height="14" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><circle cx="4" cy="3.5" r="1.6"/><path d="M4 5.1v7.4M4 8.5h3.5M4 12.5h3.5"/><path d="M9.5 8.5h4M9.5 12.5h4"/></svg></button>
|
|
31
|
-
</div>
|
|
32
|
-
<ol id="case-events" class="event-list"></ol>
|
|
33
|
-
<rr0-readings-comparison id="readings-comparison" class="readings-comparison"></rr0-readings-comparison>
|
|
34
|
-
</section>
|
|
35
|
-
<!-- What is open, in the order of time whatever the order they were opened in. -->
|
|
36
|
-
<div id="open-events" class="open-events"></div>
|
|
37
|
-
</div>
|
|
38
|
-
`,J=`
|
|
39
|
-
:host { display: block; color: var(--rr0-ink, inherit); container-type: inline-size; }
|
|
40
|
-
/* The buttons' own colours, light and dark, the very ones an observation's popups are drawn with (see sightingTemplate's --pop-*): a page
|
|
41
|
-
that gives its own (--rr0-button-bg, -fg, -border, -hover, -on, -ring, inherited from anywhere, :root included) has them win. */
|
|
42
|
-
:host { --btn-bg: #f2f2f2; --btn-fg: #222; --btn-border: #ccc; --btn-hover: #e4e4e4; --btn-on: #dbe6f7; --btn-ring: #9bb6e0; }
|
|
43
|
-
@media (prefers-color-scheme: dark) {
|
|
44
|
-
:host { --btn-bg: #2c2e33; --btn-fg: #e6e6e6; --btn-border: #4a4c52; --btn-hover: #3a3d43; --btn-on: #274066; --btn-ring: #4f7bc4; }
|
|
45
|
-
}
|
|
46
|
-
.case-head { display: grid; gap: 6px; margin: 0 0 12px; }
|
|
47
|
-
.case-bar { display: flex; align-items: baseline; gap: 10px; }
|
|
48
|
-
.case-kind { margin: 0; font: 600 12px/1.4 var(--rr0-sans, system-ui, sans-serif); letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
|
|
49
|
-
.case-title { margin: 0; font: 600 24px/1.25 var(--rr0-serif, Georgia, serif); }
|
|
50
|
-
.case-actions { display: flex; gap: 4px; margin-left: auto; }
|
|
51
|
-
/* The very square the observation's own row wears (see sightingTemplate's .edit-link and .info-btn): same size, same border, same
|
|
52
|
-
background, so that the two rows are one set of buttons seen in two places. */
|
|
53
|
-
.icon-btn {
|
|
54
|
-
flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 1.8em; height: 1.8em; box-sizing: border-box;
|
|
55
|
-
padding: 0; border: 1px solid var(--rr0-button-border, var(--btn-border)); border-radius: 3px; background: var(--rr0-button-bg, var(--btn-bg));
|
|
56
|
-
color: var(--rr0-button-fg, var(--btn-fg)); cursor: pointer;
|
|
57
|
-
}
|
|
58
|
-
.icon-btn:hover, .icon-btn:focus-visible { background: var(--rr0-button-hover, var(--btn-hover)); }
|
|
59
|
-
/* The report's export wears the same square, its button being its own (see CaseExportElement). */
|
|
60
|
-
.case-export { display: inline-flex; }
|
|
61
|
-
.case-export::part(button) {
|
|
62
|
-
display: inline-flex; align-items: center; justify-content: center; width: 1.8em; height: 1.8em; box-sizing: border-box;
|
|
63
|
-
padding: 0; border: 1px solid var(--rr0-button-border, var(--btn-border)); border-radius: 3px; background: var(--rr0-button-bg, var(--btn-bg));
|
|
64
|
-
color: var(--rr0-button-fg, var(--btn-fg));
|
|
65
|
-
}
|
|
66
|
-
.case-export::part(button):hover { background: var(--rr0-button-hover, var(--btn-hover)); }
|
|
67
|
-
.icon-btn[aria-expanded="true"], .icon-btn[aria-pressed="false"] { background: var(--rr0-button-on, var(--btn-on)); }
|
|
68
|
-
.case-summary { margin: 0; font-size: 15px; line-height: 1.5; opacity: .85; }
|
|
69
|
-
.case-summary[hidden] { display: none; }
|
|
70
|
-
/* The chronology itself is common to the editor (see CaseTimeline): what cannot be done while reading is absent, not greyed out. */
|
|
71
|
-
.case-timeline { margin: 0 0 14px; }
|
|
72
|
-
.case-timeline[hidden] { display: none; }
|
|
73
|
-
.readings-comparison { margin-top: 12px; }
|
|
74
|
-
.events-bar { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; }
|
|
75
|
-
.events-bar .icon-btn { margin-left: auto; }
|
|
76
|
-
/* Lit when grouping, as a switch is: not the history's own button, which is lit when the history is put away. */
|
|
77
|
-
#group-readings[aria-pressed="false"] { background: var(--rr0-button-bg, var(--btn-bg)); }
|
|
78
|
-
#group-readings:is(:hover, :focus-visible) { background: var(--rr0-button-hover, var(--btn-hover)); }
|
|
79
|
-
#group-readings[aria-pressed="true"] { background: var(--rr0-button-on, var(--btn-on)); }
|
|
80
|
-
#group-readings[hidden], #share[hidden] { display: none; }
|
|
81
|
-
.events-heading { display: flex; align-items: center; gap: 6px; margin: 0; font: 600 12px/1.4 var(--rr0-sans, system-ui, sans-serif); letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
|
|
82
|
-
.events-icon { display: inline-flex; }
|
|
83
|
-
.events-icon svg { width: 14px; height: 14px; }
|
|
84
|
-
/* What is open: one block per event, each saying which it is, in the order of time. */
|
|
85
|
-
/* One column as wide as the case, never as wide as what is in it: an implicit "auto" column grew to the player's own widest content,
|
|
86
|
-
McMinnville's longest reading in its choice (228 letters), and the stage, 16:9 of that, put the photograph beyond the case's edge. */
|
|
87
|
-
.open-events { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
|
|
88
|
-
/* Given the width (the app on a computer), the chronology in a column of its own beside what is open, kept in view as that scrolls; the
|
|
89
|
-
whole width to what is open when the chronology is put away. The width the case is given, never the window's. */
|
|
90
|
-
@container (min-width: 760px) {
|
|
91
|
-
.case-layout { display: grid; grid-template-columns: minmax(16rem, 1fr) minmax(0, 2.6fr); gap: 20px; align-items: start; }
|
|
92
|
-
.case-layout:has(> .case-timeline[hidden]) { grid-template-columns: minmax(0, 1fr); }
|
|
93
|
-
.case-layout > .case-timeline { position: sticky; top: 0; max-height: 100dvh; overflow-y: auto; margin: 0; }
|
|
94
|
-
}
|
|
95
|
-
.open-event { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
|
|
96
|
-
.open-event > .open-title { margin: 0; font: 600 13px/1.4 var(--rr0-sans, system-ui, sans-serif); letter-spacing: .04em; text-transform: uppercase; opacity: .7; }
|
|
97
|
-
.open-event rr0-interview { padding: 10px 12px; border: 1px solid color-mix(in srgb, currentColor 18%, transparent); border-radius: 10px;
|
|
98
|
-
font-size: 14px; line-height: 1.5; max-height: 22em; overflow-y: auto; }
|
|
99
|
-
${u.CSS}
|
|
100
|
-
`,g="rr0-case",f="show-timeline",b="open-events",Q="openchange";class c extends HTMLElement{static get observedAttributes(){return["src","show-labels",A,f,b,y]}static PASSED_ON=["show-labels"];shadow;openEvents;timeline;shown=new Map;messages;said=new T(["en"]);json;url;shareMessages;entries=[];grouping=!1;folded=new Set;constructor(){super(),this.shadow=this.attachShadow({mode:"open"});const e=document.createElement("style");e.textContent=J;const i=document.createElement("div");i.innerHTML=Z,this.shadow.append(e,i),K(),this.timeline=new u(this.byId("case-events"),n=>void this.only(n),n=>void this.only(n),n=>void this.toggle(n),n=>{this.folded.delete(n)||this.folded.add(n),this.draw()}),this.grouping=u.groupingRemembered(),this.byId("group-readings").addEventListener("click",()=>{this.grouping=!this.grouping,u.rememberGrouping(this.grouping),this.order(),this.draw()}),M.register(),R.register(),this.byId("export").source=async()=>{const n=this.json,o=new Map;return await Promise.all(this.entries.filter(a=>a.kind!=="interview"&&a.url).map(async a=>{try{o.set(a.url,await v.recording(a.url))}catch{}})),{caseJson:n,caseUrl:this.url,recordings:o}},this.openEvents=this.byId("open-events"),this.openEvents.addEventListener(_,n=>{const{at:o,sighting:a}=n.detail;this.seekObservation(o,a)}),this.openEvents.addEventListener(L,n=>{const o=n.target?.closest?.(".open-event");this.followReplay(o??void 0)}),U.register();const t=this.byId("share");t.innerHTML=$.SHARE;const s=this.byId("share-dialog");s.subject=this.shareSubject,t.addEventListener("click",()=>{this.url&&(s.note=I.changed(this.url,...this.entries.map(n=>n.url))?this.shareMessages?.unsaved:void 0,s.open())}),this.byId("edit").addEventListener("click",()=>{if(this.url&&j.ask(this,H,{src:this.url}))return;const n=this.editorUrl();n&&window.open(n,"_blank","noopener")}),this.byId("info").addEventListener("click",()=>this.showSummary(this.byId("case-summary").hidden)),this.byId("timeline-button").addEventListener("click",()=>{this.showTimeline(this.byId("case-events").parentElement.hidden)})}shareSubject={module:"rr0-sighting",link:()=>{const e=this.openKeys();return`${V.home()}/play/?file=${encodeURIComponent(this.url??"")}${e?`&events=${encodeURIComponent(e)}`:""}`+(this.timelineShown()?"":"&timeline=0")},element:()=>{const e=this.openKeys();return`<${g} src="${this.url??""}"${e?` ${b}="${e}"`:""}${this.timelineShown()?"":` ${f}="false"`}></${g}>`}};timelineShown(){return!this.byId("case-events").parentElement.hidden}openKeys(){const e=[...this.shown.keys()].sort((i,t)=>i-t);return e.length===1&&e[0]===this.firstObservation()?"":e.map(i=>c.keyOf(this.entries[i])).join(",")}static keyOf(e){return e.event.id??c.fileNameOf(e)}static fileNameOf(e){return(e.url??"").split("/").pop().replace(/[.]json$/i,"")}asked(e){if(e===null)return[];if(e.trim()==="all")return this.entries.map((t,s)=>s);const i=e.split(",").map(t=>t.trim().replace(/[.]json$/i,"")).filter(t=>t!=="");return this.entries.map((t,s)=>({entry:t,at:s})).filter(({entry:t})=>i.some(s=>s===t.event.id||s===c.fileNameOf(t))).map(({at:t})=>t)}firstObservation(){return this.entries.findIndex(e=>e.kind!=="interview")}byId(e){return this.shadow.getElementById(e)}showSummary(e){this.byId("case-summary").hidden=!e,this.byId("info").setAttribute("aria-expanded",String(e))}showTimeline(e){this.byId("case-events").parentElement.hidden=!e,this.byId("timeline-button").setAttribute("aria-pressed",String(e));for(const i of this.players())i.toggleAttribute(S,e)}connectedCallback(){this.loadMessages(),this.showTimeline(this.getAttribute(f)!=="false"),this.showSummary(this.hasAttribute(A));const e=this.getAttribute("src");e&&this.load(e).catch(i=>console.warn(`<${g}> could not read ${e}:`,i))}attributeChangedCallback(e,i,t){if(!(!this.isConnected||t===i))if(e==="src"&&t)this.load(t);else if(e===f)this.showTimeline(t!=="false");else if(e===b)for(const s of this.asked(t))this.open(s);else for(const s of this.players())t===null?s.removeAttribute(e):s.setAttribute(e,t)}async loadMessages(){const e=P(G.preferencesFor(this),B);this.said=new T([e,"en"]),this.messages=await q(e),this.shareMessages=await this.byId("share-dialog").useLanguage(e),this.draw()}async load(e){this.url=new URL(e,location.href).href;const i=await v.recording(this.url);if(!w.isCase(i))throw new Error(`${e} is not a case: <${g}> reads a case.json`);this.json=i,this.byId("share").hidden=I.local(this.url),this.entries=c.inTime((i.events??[]).map(r=>this.entryOf(r)).filter(r=>r!==void 0)),this.shown.clear(),this.folded.clear(),this.openEvents.replaceChildren(),this.draw(),this.compareReadings();const t=this.asked(this.getAttribute(b));if(t.length>0){for(const r of t)await this.open(r);return}const s=this.firstObservation();s>=0&&this.open(s)}static inTime(e){const i=new Map(e.filter(t=>t.event.id!==void 0).map(t=>[t.event.id,t]));return u.inTime(e,{when:t=>t.when,kind:t=>t.kind,read:t=>[t.event.interpretationOf].flat().map(s=>s===void 0?void 0:i.get(s)).filter(s=>s!==void 0)}).map(({item:t})=>t)}entryOf(e){if(typeof e.url!="string"||e.url==="")return;const i=e.eventType===w.INTERVIEW_EVENT?"interview":e.eventType===w.SIGHTING_EVENT?e.interpretationOf===void 0?"observation":"reading":void 0;if(i)return{event:e,kind:i,url:new URL(e.url,this.url??location.href).href,title:this.said.read(e.title)??e.id??"",when:String(e.time??"")}}compareReadings(){const e=this.byId("readings-comparison"),i=new Map,t=r=>{let n=i.get(r);return n||(n=v.recording(r).then(o=>o,()=>{}),i.set(r,n)),n},s=async r=>Promise.all(this.entries.flatMap((n,o)=>{if(n.kind!=="reading")return[];const a=this.accountOf(n);return[(async()=>({title:n.title,witness:a?.title??"",...r&&a?.url&&n.url?{account:await t(a.url),reading:await t(n.url)}:{},open:()=>void this.only(o).then(()=>this.shown.get(o)?.scrollIntoView({block:"start",behavior:"smooth"}))}))()]}));s(!1).then(r=>e.show(r,()=>s(!0)))}accountOf(e){return this.accountsOf(e)[0]}accountsOf(e){const i=[e.event.interpretationOf].flat().filter(t=>t!==void 0);return this.entries.filter(t=>t.kind==="observation"&&i.includes(t.event.id??""))}editorUrl(){if(!this.url)return;const e=new URL("/edit/",location.href);return e.searchParams.set("file",this.url),e.href}async only(e){for(const i of[...this.shown.keys()])i!==e&&this.shut(i);await this.open(e)}async toggle(e){this.shown.has(e)?this.shut(e):await this.open(e)}async open(e){const i=this.entries[e];if(!i||!i.url||this.shown.has(e))return;const t=document.createElement("section");if(t.className="open-event",t.dataset.at=String(e),i.kind==="interview"){const s=document.createElement("p");s.className="open-title",s.textContent=i.title,t.append(s)}if(i.kind==="interview"){const{register:s}=await D(async()=>{const{register:n}=await import("./InterviewElement-B3tm7y49.js");return{register:n}},__vite__mapDeps([0,1,2]),import.meta.url);s();const r=document.createElement("rr0-interview");r.setAttribute("src",i.url),t.append(r),window.setTimeout(()=>{this.followReplay(),this.markCitedMoments()},300)}else{const s=document.createElement(p);s.setAttribute(W,""),s.toggleAttribute(S,!this.byId("case-events").parentElement.hidden),s.setAttribute("src",this.url??"");const r=i.kind==="reading"?this.accountOf(i):void 0;s.setAttribute(y,(r??i).url??""),i.kind==="reading"&&s.setAttribute(E,i.url),queueMicrotask(()=>{for(const n of c.PASSED_ON){const o=this.getAttribute(n);o!==null&&s.setAttribute(n,o)}}),s.addEventListener(O,n=>{this.dispatchEvent(new CustomEvent(O,{detail:n.detail})),this.follow(t,s)}),s.addEventListener(z,()=>this.follow(t,s)),t.append(s)}this.shown.set(e,t),this.order(),this.draw(),i.kind!=="interview"&&window.setTimeout(()=>this.markCitedMoments(),300),this.announceOpen()}follow(e,i){const t=Number(e.dataset.at),s=i.shownReadingUrl,r=i.shownRecordingUrl,n=(d,m)=>d!==void 0&&m!==void 0&&new URL(d,this.url??location.href).href===new URL(m,this.url??location.href).href,o=s?this.entries.findIndex(d=>d.kind==="reading"&&n(d.url,s)):this.entries.findIndex(d=>d.kind==="observation"&&n(d.url,r));if(o<0||o===t||this.shown.get(t)!==e||this.shown.has(o))return;this.shown.delete(t),this.shown.set(o,e),e.dataset.at=String(o);const a=this.entries[o];a.kind==="reading"?i.setAttribute(E,a.url):(i.removeAttribute(E),a.url&&i.setAttribute(y,a.url)),this.order(),this.draw(),this.announceOpen()}announceOpen(){this.dispatchEvent(new CustomEvent(Q,{detail:{events:this.openKeys()}}))}followReplay(e){const i=e??[...this.shown.values()].find(n=>n.querySelector(p)),t=i?Number(i.dataset.at):NaN,s=Number.isNaN(t)?void 0:this.entries[t],r=i?.querySelector(p);if(!(!s||!r)){for(const[n,o]of this.shown){if(this.entries[n]?.kind!=="interview")continue;o.querySelector("rr0-interview")?.revealAt?.(r.playedSeconds,s.event.id)}return i}}markCitedMoments(){for(const[e,i]of this.shown){const t=this.entries[e],s=i.querySelector(p);if(!t||!s)continue;const r=[];for(const[n,o]of this.shown){if(this.entries[n]?.kind!=="interview")continue;const a=o.querySelector("rr0-interview");r.push(...a?.momentsCited?.(t.event.id)??[])}s.citedMoments=r.sort((n,o)=>n.at-o.at)}}shut(e){this.shown.get(e)?.remove(),this.shown.delete(e),this.markCitedMoments(),this.draw(),this.announceOpen()}order(){const e=new Map(this.listed().map(({index:t},s)=>[t,s])),i=[...this.shown.entries()].sort(([t],[s])=>(e.get(t)??t)-(e.get(s)??s)).map(([,t])=>t);i.length===this.openEvents.children.length&&i.every((t,s)=>this.openEvents.children[s]===t)||this.openEvents.replaceChildren(...i)}listed(){const e=this.entries.map((i,t)=>({item:i,index:t}));return this.grouping?u.grouped(e,{kind:i=>i.kind,read:i=>this.accountsOf(i)}):e}async seekObservation(e,i){const t=this.entries.findIndex(n=>n.kind!=="interview"&&(n.event.id===i||i!==void 0&&n.url?.endsWith(`/${i}.json`))),s=t>=0?t:this.entries.findIndex(n=>n.kind!=="interview");if(s<0)return;this.shown.has(s)||await this.open(s),this.shown.get(s)?.querySelector(p)?.seekTo(e,i),this.shown.get(s)?.scrollIntoView({block:"nearest",behavior:"smooth"})}authors(e){const i=this.messages,t=(e??[]).map(s=>"people"in s?s.people:"org"in s?s.org:this.said.read(s.title)??"").filter(s=>s!=="");return t.length<2||!i?t.join(", "):`${t.slice(0,-1).join(", ")} ${i.linkAnd} ${t[t.length-1]}`}linkedTo(e){const i=this.messages;if(i){if(e.kind==="reading"){const t=[e.event.interpretationOf].flat().filter(r=>r!==void 0),s=this.entries.map((r,n)=>t.includes(r.event.id??"")?n:-1).filter(r=>r>=0);return s.length>0?{heading:i.interpretationOf,to:s}:void 0}if(e.kind==="observation"){const t=this.entries.map((s,r)=>s.kind==="interview"&&[s.event.interviewOf].flat().includes(e.event.id)?r:-1).filter(s=>s>=0);return t.length>0?{heading:i.passagesHeading,to:t}:void 0}}}draw(){const e=this.messages,i=this.json;if(!e||!i)return;this.byId("case-kind").textContent=e.caseHeading,this.byId("case-title").textContent=this.said.read(i.title)??i.id??"";const t=this.said.read(i.summary)??"",s=this.byId("case-summary");s.textContent=t;const r=this.byId("info");r.hidden=t==="",r.title=e.caseSummary,r.setAttribute("aria-label",e.caseSummary),t===""&&this.showSummary(!1),this.byId("events-heading").textContent=e.eventsHeading,this.byId("events-icon").innerHTML=F.CLOCK;const n=this.byId("share");n.title=e.shareCase,n.setAttribute("aria-label",e.shareCase);const o=this.byId("edit");o.title=e.editCase,o.setAttribute("aria-label",e.editCase);const a=this.byId("group-readings");a.title=e.groupReadings,a.setAttribute("aria-label",e.groupReadings),a.setAttribute("aria-pressed",String(this.grouping)),a.hidden=!this.entries.some(h=>h.kind==="reading");const d=this.listed(),m=h=>d.filter(({under:l})=>l===h).length,C=new Map(this.entries.map((h,l)=>[h,l]));this.timeline.render(d.filter(({index:h,under:l})=>l===void 0||!this.folded.has(C.get(l))||this.shown.has(h)).map(({item:h,index:l,under:N})=>{const k=this.card(h,l,N),x=this.grouping&&h.kind==="observation"?m(h):0;return x>0?{...k,readings:{count:x,folded:this.folded.has(l)}}:k}),e)}card(e,i,t){const s=this.linkedTo(e),r=(s?.to??[]).filter(o=>this.entries[o]!==t),n=t?this.messages.alsoAbout:s?.heading??"";return{at:i,kind:e.kind,title:e.title,meta:e.when.replace("T"," "),open:this.shown.has(i),...r.length>0?{links:{heading:n,to:r.map(o=>({at:o,title:this.entries[o].title}))}}:{},by:e.kind==="observation"?"":this.authors(e.event.by),...t?{nested:!0}:{}}}async loadFromSrc(e){await this.load(e),await this.player?.loaded}get scene(){return this.players()[0]?.scene}players(){return[...this.shown.entries()].sort(([e],[i])=>e-i).map(([,e])=>e.querySelector(p)).filter(e=>e!==null)}get sightingData(){return this.players()[0]?.sightingData}get player(){return this.players()[0]}}function ee(){customElements.get(g)||customElements.define(g,c)}export{g as CASE_ELEMENT_NAME,c as CaseElement,Q as OPEN_CHANGE_EVENT,b as OPEN_EVENTS_ATTRIBUTE,f as SHOW_TIMELINE_ATTRIBUTE,ee as register};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e={caseHeading:"Case",eventsHeading:"History",kindObservation:"Observation",kindReading:"Reading",kindInterview:"Interview",openEvent:"Open this event alone",toggleEvent:"Show beside the others, or put away",groupReadings:"Group the readings under their observation",alsoAbout:"Also about",foldReadings:"Fold its readings away",unfoldReadings:"Unfold its readings",interpretationOf:"Reading of",passagesHeading:"Told in",byAuthor:"by",linkAnd:"and",caseSummary:"What this case says of itself",editCase:"Edit this case",shareCase:"Share this case"};export{e as caseMessages_en};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e={caseHeading:"Caso",eventsHeading:"Historial",kindObservation:"Observación",kindReading:"Lectura",kindInterview:"Entrevista",openEvent:"Abrir solo este evento",toggleEvent:"Mostrar junto a los demás, o quitar",groupReadings:"Agrupar las lecturas por observación",alsoAbout:"También trata de",foldReadings:"Plegar sus lecturas",unfoldReadings:"Desplegar sus lecturas",interpretationOf:"Lectura de",passagesHeading:"Relatado en",byAuthor:"por",linkAnd:"y",caseSummary:"Lo que este caso dice de sí mismo",editCase:"Editar este caso",shareCase:"Compartir este caso"};export{e as caseMessages_es};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e={caseHeading:"Dossier",eventsHeading:"Historique",kindObservation:"Observation",kindReading:"Lecture",kindInterview:"Interview",openEvent:"Ouvrir cet événement seul",toggleEvent:"Afficher à côté des autres, ou retirer",groupReadings:"Regrouper les lectures par observation",alsoAbout:"Porte aussi sur",foldReadings:"Replier ses lectures",unfoldReadings:"Déplier ses lectures",interpretationOf:"Lecture de",passagesHeading:"Relaté dans",byAuthor:"par",linkAnd:"et",caseSummary:"Ce que ce dossier dit de lui-même",editCase:"Modifier ce dossier",shareCase:"Partager ce dossier"};export{e as caseMessages_fr};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e={caseHeading:"Caso",eventsHeading:"Cronologia",kindObservation:"Osservazione",kindReading:"Lettura",kindInterview:"Intervista",openEvent:"Apri solo questo evento",toggleEvent:"Mostra accanto agli altri, o togli",groupReadings:"Raggruppa le letture per osservazione",alsoAbout:"Riguarda anche",foldReadings:"Chiudi le sue letture",unfoldReadings:"Apri le sue letture",interpretationOf:"Lettura di",passagesHeading:"Raccontato in",byAuthor:"di",linkAnd:"e",caseSummary:"Ciò che questo caso dice di sé",editCase:"Modificare questo caso",shareCase:"Condividi questo caso"};export{e as caseMessages_it};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{V as a,bH as e,cT as s,b_ as t,c0 as r,cd as i,bS as o,Q as c,bZ as n,bp as b,cm as l,ce as d,D as m,cU as u,aZ as M,bc as S,aX as B,G,cD as y,cA as f,cE as p,aU as h,cR as D,bM as x,F as E,bd as L,cV as T,cW as g,cX as A,br as C,b$ as P,ba as V,bb as F,cY as U,cc as v,be as H}from"./rr0-sighting-editor.mjs";const Q={AdditiveBlending:H,BackSide:v,BoxGeometry:U,BufferAttribute:F,BufferGeometry:V,CanvasTexture:P,Color:C,ConeGeometry:A,CylinderGeometry:g,DataTexture:T,DoubleSide:L,Euler:E,Float32BufferAttribute:x,FrontSide:D,Group:h,Line:p,LineBasicMaterial:f,LineSegments:y,Matrix4:G,Mesh:B,MeshBasicMaterial:S,MeshStandardMaterial:M,NormalBlending:u,Object3D:m,PlaneGeometry:d,PointLight:l,Points:b,PointsMaterial:n,Quaternion:c,ShaderMaterial:o,SphereGeometry:i,Sprite:r,SpriteMaterial:t,TorusGeometry:s,Vector2:e,Vector3:a};export{Q as MODULE_THREE};
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./InterviewElement-Dwk9iHNv.js","./SaidPosition-CWiVNaNW.js","./rr0-ufoathome.mjs","./CaseTimeline-CnP5rqaK.js","./ShareDialogElement-DLr5u_tk.js","./Sighting-CBpJpdm9.js","./VisualAids-DI-hEL46.js","./Decor-Dn-cvniW.js","./RecordingIssue-BlWT8Xsu.js","./Obstacles-v9SkfBD7.js","./interviewJson-D-i14LTf.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{S as v,O as T,R,E as M,s as _,U as L,H as U,l as $,C as w,_ as H}from"./rr0-ufoathome.mjs";import{C as u,R as j,a as V,I as P}from"./CaseTimeline-CnP5rqaK.js";import{S as I,I as B}from"./SaidPosition-CWiVNaNW.js";import{T as G,S as q,P as D,A as F}from"./ShareDialogElement-DLr5u_tk.js";import{SHOW_INFO_ATTRIBUTE as A,OBSERVER_ATTRIBUTE as y,registerSighting as K,HIDE_PICKERS_ATTRIBUTE as S,SIGHTING_ELEMENT_NAME as p,CASE_NAMED_ATTRIBUTE as W,INTERPRETATION_ATTRIBUTE as E,OBSERVER_CHANGE_EVENT as C,INTERPRETATION_CHANGE_EVENT as z}from"./SightingElement-DuNE_Yt0.js";import"./Sighting-CBpJpdm9.js";import"./VisualAids-DI-hEL46.js";import"./Decor-Dn-cvniW.js";import"./RecordingIssue-BlWT8Xsu.js";import"./Obstacles-v9SkfBD7.js";const Z=`
|
|
3
|
-
<header class="case-head">
|
|
4
|
-
<div class="case-bar">
|
|
5
|
-
<p id="case-kind" class="case-kind"></p>
|
|
6
|
-
<h2 id="case-title" class="case-title"></h2>
|
|
7
|
-
<!-- The same pair the observation carries, for the case: the way into the editor, and what the case says of itself. -->
|
|
8
|
-
<!-- The same three in the same order as an observation carries (see sightingTemplate): the way into the editor, this element's own
|
|
9
|
-
toggle, and what it says of itself. A reader moving between a case and an observation finds the buttons where they were. -->
|
|
10
|
-
<span class="case-actions">
|
|
11
|
-
<!-- Sharing the case: its address and the element that shows it whole (an observation of it is shared from its own player). -->
|
|
12
|
-
<button id="share" type="button" class="icon-btn" aria-haspopup="dialog"></button>
|
|
13
|
-
<rr0-case-export id="export" class="case-export"></rr0-case-export>
|
|
14
|
-
<button id="edit" type="button" class="icon-btn"><svg viewBox="0 0 16 16" width="14" height="14" aria-hidden="true"><path d="M11.3 1.3a1 1 0 0 1 1.4 0l2 2a1 1 0 0 1 0 1.4l-8.5 8.5-3.4.9.9-3.4 8.6-8.4Zm-7 9.2-.5 1.7 1.7-.5 6.9-6.9-1.2-1.2-6.9 6.9Z" fill="currentColor"/></svg></button>
|
|
15
|
-
<button id="timeline-button" type="button" class="icon-btn" aria-pressed="true"><svg viewBox="0 0 16 16" width="14" height="14" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><circle cx="8" cy="8" r="6"/><path d="M8 4.6V8l2.4 1.6"/></svg></button>
|
|
16
|
-
<button id="info" type="button" class="icon-btn" aria-expanded="false"><svg viewBox="0 0 16 16" width="14" height="14" aria-hidden="true"><circle cx="8" cy="3.6" r="1.4" fill="currentColor"/><path d="M6 6.5h3v6h1.5V14h-4.5v-1.5H7.5V8H6Z" fill="currentColor"/></svg></button>
|
|
17
|
-
</span>
|
|
18
|
-
</div>
|
|
19
|
-
<p id="case-summary" class="case-summary" hidden></p>
|
|
20
|
-
<rr0-share-dialog id="share-dialog"></rr0-share-dialog>
|
|
21
|
-
</header>
|
|
22
|
-
<!-- The chronology and what is open, one above the other; side by side when the case is given the width for both (see .case-layout). -->
|
|
23
|
-
<div class="case-layout">
|
|
24
|
-
<!-- The chronology, in the upper part: choosing an event opens it alone below; its mark on the rail shows it beside what is open, or puts
|
|
25
|
-
it away. Several can be open at once that way. -->
|
|
26
|
-
<section class="case-timeline">
|
|
27
|
-
<div class="events-bar">
|
|
28
|
-
<h3 class="events-heading"><span id="events-icon" class="events-icon" aria-hidden="true"></span><span id="events-heading"></span></h3>
|
|
29
|
-
<!-- Each reading under the observation it reads, or every event in the order of time: the reader's choice, remembered. -->
|
|
30
|
-
<button id="group-readings" type="button" class="icon-btn" aria-pressed="false"><svg viewBox="0 0 16 16" width="14" height="14" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><circle cx="4" cy="3.5" r="1.6"/><path d="M4 5.1v7.4M4 8.5h3.5M4 12.5h3.5"/><path d="M9.5 8.5h4M9.5 12.5h4"/></svg></button>
|
|
31
|
-
</div>
|
|
32
|
-
<ol id="case-events" class="event-list"></ol>
|
|
33
|
-
<rr0-readings-comparison id="readings-comparison" class="readings-comparison"></rr0-readings-comparison>
|
|
34
|
-
</section>
|
|
35
|
-
<!-- What is open, in the order of time whatever the order they were opened in. -->
|
|
36
|
-
<div id="open-events" class="open-events"></div>
|
|
37
|
-
</div>
|
|
38
|
-
`,J=`
|
|
39
|
-
:host { display: block; color: var(--rr0-ink, inherit); container-type: inline-size; }
|
|
40
|
-
/* The buttons' own colours, light and dark, the very ones an observation's popups are drawn with (see sightingTemplate's --pop-*): a page
|
|
41
|
-
that gives its own (--rr0-button-bg, -fg, -border, -hover, -on, -ring, inherited from anywhere, :root included) has them win. */
|
|
42
|
-
:host { --btn-bg: #f2f2f2; --btn-fg: #222; --btn-border: #ccc; --btn-hover: #e4e4e4; --btn-on: #dbe6f7; --btn-ring: #9bb6e0; }
|
|
43
|
-
@media (prefers-color-scheme: dark) {
|
|
44
|
-
:host { --btn-bg: #2c2e33; --btn-fg: #e6e6e6; --btn-border: #4a4c52; --btn-hover: #3a3d43; --btn-on: #274066; --btn-ring: #4f7bc4; }
|
|
45
|
-
}
|
|
46
|
-
.case-head { display: grid; gap: 6px; margin: 0 0 12px; }
|
|
47
|
-
.case-bar { display: flex; align-items: baseline; gap: 10px; }
|
|
48
|
-
.case-kind { margin: 0; font: 600 12px/1.4 var(--rr0-sans, system-ui, sans-serif); letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
|
|
49
|
-
.case-title { margin: 0; font: 600 24px/1.25 var(--rr0-serif, Georgia, serif); }
|
|
50
|
-
.case-actions { display: flex; gap: 4px; margin-left: auto; }
|
|
51
|
-
/* The very square the observation's own row wears (see sightingTemplate's .edit-link and .info-btn): same size, same border, same
|
|
52
|
-
background, so that the two rows are one set of buttons seen in two places. */
|
|
53
|
-
.icon-btn {
|
|
54
|
-
flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 1.8em; height: 1.8em; box-sizing: border-box;
|
|
55
|
-
padding: 0; border: 1px solid var(--rr0-button-border, var(--btn-border)); border-radius: 3px; background: var(--rr0-button-bg, var(--btn-bg));
|
|
56
|
-
color: var(--rr0-button-fg, var(--btn-fg)); cursor: pointer;
|
|
57
|
-
}
|
|
58
|
-
.icon-btn:hover, .icon-btn:focus-visible { background: var(--rr0-button-hover, var(--btn-hover)); }
|
|
59
|
-
/* The report's export wears the same square, its button being its own (see CaseExportElement). */
|
|
60
|
-
.case-export { display: inline-flex; }
|
|
61
|
-
.case-export::part(button) {
|
|
62
|
-
display: inline-flex; align-items: center; justify-content: center; width: 1.8em; height: 1.8em; box-sizing: border-box;
|
|
63
|
-
padding: 0; border: 1px solid var(--rr0-button-border, var(--btn-border)); border-radius: 3px; background: var(--rr0-button-bg, var(--btn-bg));
|
|
64
|
-
color: var(--rr0-button-fg, var(--btn-fg));
|
|
65
|
-
}
|
|
66
|
-
.case-export::part(button):hover { background: var(--rr0-button-hover, var(--btn-hover)); }
|
|
67
|
-
.icon-btn[aria-expanded="true"], .icon-btn[aria-pressed="false"] { background: var(--rr0-button-on, var(--btn-on)); }
|
|
68
|
-
.case-summary { margin: 0; font-size: 15px; line-height: 1.5; opacity: .85; }
|
|
69
|
-
.case-summary[hidden] { display: none; }
|
|
70
|
-
/* The chronology itself is common to the editor (see CaseTimeline): what cannot be done while reading is absent, not greyed out. */
|
|
71
|
-
.case-timeline { margin: 0 0 14px; }
|
|
72
|
-
.case-timeline[hidden] { display: none; }
|
|
73
|
-
.readings-comparison { margin-top: 12px; }
|
|
74
|
-
.events-bar { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; }
|
|
75
|
-
.events-bar .icon-btn { margin-left: auto; }
|
|
76
|
-
/* Lit when grouping, as a switch is: not the history's own button, which is lit when the history is put away. */
|
|
77
|
-
#group-readings[aria-pressed="false"] { background: var(--rr0-button-bg, var(--btn-bg)); }
|
|
78
|
-
#group-readings:is(:hover, :focus-visible) { background: var(--rr0-button-hover, var(--btn-hover)); }
|
|
79
|
-
#group-readings[aria-pressed="true"] { background: var(--rr0-button-on, var(--btn-on)); }
|
|
80
|
-
#group-readings[hidden], #share[hidden] { display: none; }
|
|
81
|
-
.events-heading { display: flex; align-items: center; gap: 6px; margin: 0; font: 600 12px/1.4 var(--rr0-sans, system-ui, sans-serif); letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
|
|
82
|
-
.events-icon { display: inline-flex; }
|
|
83
|
-
.events-icon svg { width: 14px; height: 14px; }
|
|
84
|
-
/* What is open: one block per event, each saying which it is, in the order of time. */
|
|
85
|
-
/* One column as wide as the case, never as wide as what is in it: an implicit "auto" column grew to the player's own widest content,
|
|
86
|
-
McMinnville's longest reading in its choice (228 letters), and the stage, 16:9 of that, put the photograph beyond the case's edge. */
|
|
87
|
-
.open-events { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
|
|
88
|
-
/* Given the width (the app on a computer), the chronology in a column of its own beside what is open, kept in view as that scrolls; the
|
|
89
|
-
whole width to what is open when the chronology is put away. The width the case is given, never the window's. */
|
|
90
|
-
@container (min-width: 760px) {
|
|
91
|
-
.case-layout { display: grid; grid-template-columns: minmax(16rem, 1fr) minmax(0, 2.6fr); gap: 20px; align-items: start; }
|
|
92
|
-
.case-layout:has(> .case-timeline[hidden]) { grid-template-columns: minmax(0, 1fr); }
|
|
93
|
-
.case-layout > .case-timeline { position: sticky; top: 0; max-height: 100dvh; overflow-y: auto; margin: 0; }
|
|
94
|
-
}
|
|
95
|
-
.open-event { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
|
|
96
|
-
.open-event > .open-title { margin: 0; font: 600 13px/1.4 var(--rr0-sans, system-ui, sans-serif); letter-spacing: .04em; text-transform: uppercase; opacity: .7; }
|
|
97
|
-
.open-event rr0-interview { padding: 10px 12px; border: 1px solid color-mix(in srgb, currentColor 18%, transparent); border-radius: 10px;
|
|
98
|
-
font-size: 14px; line-height: 1.5; max-height: 22em; overflow-y: auto; }
|
|
99
|
-
${u.CSS}
|
|
100
|
-
`,g="rr0-case",f="show-timeline",b="open-events",Q="openchange";class c extends HTMLElement{static get observedAttributes(){return["src","show-labels",A,f,b,y]}static PASSED_ON=["show-labels"];shadow;openEvents;timeline;shown=new Map;messages;said=new I(["en"]);json;url;shareMessages;entries=[];grouping=!1;folded=new Set;constructor(){super(),this.shadow=this.attachShadow({mode:"open"});const e=document.createElement("style");e.textContent=J;const i=document.createElement("div");i.innerHTML=Z,this.shadow.append(e,i),K(),this.timeline=new u(this.byId("case-events"),n=>void this.only(n),n=>void this.only(n),n=>void this.toggle(n),n=>{this.folded.delete(n)||this.folded.add(n),this.draw()}),this.grouping=u.groupingRemembered(),this.byId("group-readings").addEventListener("click",()=>{this.grouping=!this.grouping,u.rememberGrouping(this.grouping),this.order(),this.draw()}),j.register(),V.register(),this.byId("export").source=async()=>{const n=this.json,o=new Map;return await Promise.all(this.entries.filter(a=>a.kind!=="interview"&&a.url).map(async a=>{try{o.set(a.url,await v.recording(a.url))}catch{}})),{caseJson:n,caseUrl:this.url,recordings:o}},this.openEvents=this.byId("open-events"),this.openEvents.addEventListener(P,n=>{const{at:o,sighting:a}=n.detail;this.seekObservation(o,a)}),this.openEvents.addEventListener(G,n=>{const o=n.target?.closest?.(".open-event");this.followReplay(o??void 0)}),q.register();const t=this.byId("share");t.innerHTML=D.SHARE;const s=this.byId("share-dialog");s.subject=this.shareSubject,t.addEventListener("click",()=>{this.url&&(s.note=T.changed(this.url,...this.entries.map(n=>n.url))?this.shareMessages?.unsaved:void 0,s.open())}),this.byId("edit").addEventListener("click",()=>{if(this.url&&R.ask(this,M,{src:this.url}))return;const n=this.editorUrl();n&&window.open(n,"_blank","noopener")}),this.byId("info").addEventListener("click",()=>this.showSummary(this.byId("case-summary").hidden)),this.byId("timeline-button").addEventListener("click",()=>{this.showTimeline(this.byId("case-events").parentElement.hidden)})}shareSubject={module:"rr0-sighting",link:()=>{const e=this.openKeys();return`${F.home()}/play/?file=${encodeURIComponent(this.url??"")}${e?`&events=${encodeURIComponent(e)}`:""}`+(this.timelineShown()?"":"&timeline=0")},element:()=>{const e=this.openKeys();return`<${g} src="${this.url??""}"${e?` ${b}="${e}"`:""}${this.timelineShown()?"":` ${f}="false"`}></${g}>`}};timelineShown(){return!this.byId("case-events").parentElement.hidden}openKeys(){const e=[...this.shown.keys()].sort((i,t)=>i-t);return e.length===1&&e[0]===this.firstObservation()?"":e.map(i=>c.keyOf(this.entries[i])).join(",")}static keyOf(e){return e.event.id??c.fileNameOf(e)}static fileNameOf(e){return(e.url??"").split("/").pop().replace(/[.]json$/i,"")}asked(e){if(e===null)return[];if(e.trim()==="all")return this.entries.map((t,s)=>s);const i=e.split(",").map(t=>t.trim().replace(/[.]json$/i,"")).filter(t=>t!=="");return this.entries.map((t,s)=>({entry:t,at:s})).filter(({entry:t})=>i.some(s=>s===t.event.id||s===c.fileNameOf(t))).map(({at:t})=>t)}firstObservation(){return this.entries.findIndex(e=>e.kind!=="interview")}byId(e){return this.shadow.getElementById(e)}showSummary(e){this.byId("case-summary").hidden=!e,this.byId("info").setAttribute("aria-expanded",String(e))}showTimeline(e){this.byId("case-events").parentElement.hidden=!e,this.byId("timeline-button").setAttribute("aria-pressed",String(e));for(const i of this.players())i.toggleAttribute(S,e)}connectedCallback(){this.loadMessages(),this.showTimeline(this.getAttribute(f)!=="false"),this.showSummary(this.hasAttribute(A));const e=this.getAttribute("src");e&&this.load(e).catch(i=>console.warn(`<${g}> could not read ${e}:`,i))}attributeChangedCallback(e,i,t){if(!(!this.isConnected||t===i))if(e==="src"&&t)this.load(t);else if(e===f)this.showTimeline(t!=="false");else if(e===b)for(const s of this.asked(t))this.open(s);else for(const s of this.players())t===null?s.removeAttribute(e):s.setAttribute(e,t)}async loadMessages(){const e=_(U.preferencesFor(this),L);this.said=new I([e,"en"]),this.messages=await $(e),this.shareMessages=await this.byId("share-dialog").useLanguage(e),this.draw()}async load(e){this.url=new URL(e,location.href).href;const i=await v.recording(this.url);if(!w.isCase(i))throw new Error(`${e} is not a case: <${g}> reads a case.json`);this.json=i,this.byId("share").hidden=T.local(this.url),this.entries=c.inTime((i.events??[]).map(r=>this.entryOf(r)).filter(r=>r!==void 0)),this.shown.clear(),this.folded.clear(),this.openEvents.replaceChildren(),this.draw(),this.compareReadings();const t=this.asked(this.getAttribute(b));if(t.length>0){for(const r of t)await this.open(r);return}const s=this.firstObservation();s>=0&&this.open(s)}static inTime(e){const i=new Map(e.filter(t=>t.event.id!==void 0).map(t=>[t.event.id,t]));return u.inTime(e,{when:t=>t.when,kind:t=>t.kind,read:t=>[t.event.interpretationOf].flat().map(s=>s===void 0?void 0:i.get(s)).filter(s=>s!==void 0)}).map(({item:t})=>t)}entryOf(e){if(typeof e.url!="string"||e.url==="")return;const i=e.eventType===w.INTERVIEW_EVENT?"interview":e.eventType===w.SIGHTING_EVENT?e.interpretationOf===void 0?"observation":"reading":void 0;if(i)return{event:e,kind:i,url:new URL(e.url,this.url??location.href).href,title:this.said.read(e.title)??e.id??"",when:String(e.time??"")}}compareReadings(){const e=this.byId("readings-comparison"),i=new Map,t=r=>{let n=i.get(r);return n||(n=v.recording(r).then(o=>o,()=>{}),i.set(r,n)),n},s=async r=>Promise.all(this.entries.flatMap((n,o)=>{if(n.kind!=="reading")return[];const a=this.accountOf(n);return[(async()=>({title:n.title,witness:a?.title??"",...r&&a?.url&&n.url?{account:await t(a.url),reading:await t(n.url)}:{},open:()=>void this.only(o).then(()=>this.shown.get(o)?.scrollIntoView({block:"start",behavior:"smooth"}))}))()]}));s(!1).then(r=>e.show(r,()=>s(!0)))}accountOf(e){return this.accountsOf(e)[0]}accountsOf(e){const i=[e.event.interpretationOf].flat().filter(t=>t!==void 0);return this.entries.filter(t=>t.kind==="observation"&&i.includes(t.event.id??""))}editorUrl(){if(!this.url)return;const e=new URL("/edit/",location.href);return e.searchParams.set("file",this.url),e.href}async only(e){for(const i of[...this.shown.keys()])i!==e&&this.shut(i);await this.open(e)}async toggle(e){this.shown.has(e)?this.shut(e):await this.open(e)}async open(e){const i=this.entries[e];if(!i||!i.url||this.shown.has(e))return;const t=document.createElement("section");if(t.className="open-event",t.dataset.at=String(e),i.kind==="interview"){const s=document.createElement("p");s.className="open-title",s.textContent=i.title,t.append(s)}if(i.kind==="interview"){const{register:s}=await H(async()=>{const{register:n}=await import("./InterviewElement-Dwk9iHNv.js");return{register:n}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]),import.meta.url);s();const r=document.createElement("rr0-interview");r.setAttribute("src",i.url),t.append(r),window.setTimeout(()=>{this.followReplay(),this.markCitedMoments()},300)}else{const s=document.createElement(p);s.setAttribute(W,""),s.toggleAttribute(S,!this.byId("case-events").parentElement.hidden),s.setAttribute("src",this.url??"");const r=i.kind==="reading"?this.accountOf(i):void 0;s.setAttribute(y,(r??i).url??""),i.kind==="reading"&&s.setAttribute(E,i.url),queueMicrotask(()=>{for(const n of c.PASSED_ON){const o=this.getAttribute(n);o!==null&&s.setAttribute(n,o)}}),s.addEventListener(C,n=>{this.dispatchEvent(new CustomEvent(C,{detail:n.detail})),this.follow(t,s)}),s.addEventListener(z,()=>this.follow(t,s)),t.append(s)}this.shown.set(e,t),this.order(),this.draw(),i.kind!=="interview"&&window.setTimeout(()=>this.markCitedMoments(),300),this.announceOpen()}follow(e,i){const t=Number(e.dataset.at),s=i.shownReadingUrl,r=i.shownRecordingUrl,n=(d,m)=>d!==void 0&&m!==void 0&&new URL(d,this.url??location.href).href===new URL(m,this.url??location.href).href,o=s?this.entries.findIndex(d=>d.kind==="reading"&&n(d.url,s)):this.entries.findIndex(d=>d.kind==="observation"&&n(d.url,r));if(o<0||o===t||this.shown.get(t)!==e||this.shown.has(o))return;this.shown.delete(t),this.shown.set(o,e),e.dataset.at=String(o);const a=this.entries[o];a.kind==="reading"?i.setAttribute(E,a.url):(i.removeAttribute(E),a.url&&i.setAttribute(y,a.url)),this.order(),this.draw(),this.announceOpen()}announceOpen(){this.dispatchEvent(new CustomEvent(Q,{detail:{events:this.openKeys()}}))}followReplay(e){const i=e??[...this.shown.values()].find(n=>n.querySelector(p)),t=i?Number(i.dataset.at):NaN,s=Number.isNaN(t)?void 0:this.entries[t],r=i?.querySelector(p);if(!(!s||!r)){for(const[n,o]of this.shown){if(this.entries[n]?.kind!=="interview")continue;o.querySelector("rr0-interview")?.revealAt?.(r.playedSeconds,s.event.id)}return i}}markCitedMoments(){for(const[e,i]of this.shown){const t=this.entries[e],s=i.querySelector(p);if(!t||!s)continue;const r=[];for(const[n,o]of this.shown){if(this.entries[n]?.kind!=="interview")continue;const a=o.querySelector("rr0-interview");r.push(...a?.momentsCited?.(t.event.id)??[])}s.citedMoments=r.sort((n,o)=>n.at-o.at)}}shut(e){this.shown.get(e)?.remove(),this.shown.delete(e),this.markCitedMoments(),this.draw(),this.announceOpen()}order(){const e=new Map(this.listed().map(({index:t},s)=>[t,s])),i=[...this.shown.entries()].sort(([t],[s])=>(e.get(t)??t)-(e.get(s)??s)).map(([,t])=>t);i.length===this.openEvents.children.length&&i.every((t,s)=>this.openEvents.children[s]===t)||this.openEvents.replaceChildren(...i)}listed(){const e=this.entries.map((i,t)=>({item:i,index:t}));return this.grouping?u.grouped(e,{kind:i=>i.kind,read:i=>this.accountsOf(i)}):e}async seekObservation(e,i){const t=this.entries.findIndex(n=>n.kind!=="interview"&&(n.event.id===i||i!==void 0&&n.url?.endsWith(`/${i}.json`))),s=t>=0?t:this.entries.findIndex(n=>n.kind!=="interview");if(s<0)return;this.shown.has(s)||await this.open(s),this.shown.get(s)?.querySelector(p)?.seekTo(e,i),this.shown.get(s)?.scrollIntoView({block:"nearest",behavior:"smooth"})}authors(e){const i=this.messages,t=(e??[]).map(s=>"people"in s?s.people:"org"in s?s.org:this.said.read(s.title)??"").filter(s=>s!=="");return t.length<2||!i?t.join(", "):`${t.slice(0,-1).join(", ")} ${i.linkAnd} ${t[t.length-1]}`}linkedTo(e){const i=this.messages;if(i){if(e.kind==="reading"){const t=[e.event.interpretationOf].flat().filter(r=>r!==void 0),s=this.entries.map((r,n)=>t.includes(r.event.id??"")?n:-1).filter(r=>r>=0);return s.length>0?{heading:i.interpretationOf,to:s}:void 0}if(e.kind==="observation"){const t=this.entries.map((s,r)=>s.kind==="interview"&&[s.event.interviewOf].flat().includes(e.event.id)?r:-1).filter(s=>s>=0);return t.length>0?{heading:i.passagesHeading,to:t}:void 0}}}draw(){const e=this.messages,i=this.json;if(!e||!i)return;this.byId("case-kind").textContent=e.caseHeading,this.byId("case-title").textContent=this.said.read(i.title)??i.id??"";const t=this.said.read(i.summary)??"",s=this.byId("case-summary");s.textContent=t;const r=this.byId("info");r.hidden=t==="",r.title=e.caseSummary,r.setAttribute("aria-label",e.caseSummary),t===""&&this.showSummary(!1),this.byId("events-heading").textContent=e.eventsHeading,this.byId("events-icon").innerHTML=B.CLOCK;const n=this.byId("share");n.title=e.shareCase,n.setAttribute("aria-label",e.shareCase);const o=this.byId("edit");o.title=e.editCase,o.setAttribute("aria-label",e.editCase);const a=this.byId("group-readings");a.title=e.groupReadings,a.setAttribute("aria-label",e.groupReadings),a.setAttribute("aria-pressed",String(this.grouping)),a.hidden=!this.entries.some(h=>h.kind==="reading");const d=this.listed(),m=h=>d.filter(({under:l})=>l===h).length,O=new Map(this.entries.map((h,l)=>[h,l]));this.timeline.render(d.filter(({index:h,under:l})=>l===void 0||!this.folded.has(O.get(l))||this.shown.has(h)).map(({item:h,index:l,under:N})=>{const k=this.card(h,l,N),x=this.grouping&&h.kind==="observation"?m(h):0;return x>0?{...k,readings:{count:x,folded:this.folded.has(l)}}:k}),e)}card(e,i,t){const s=this.linkedTo(e),r=(s?.to??[]).filter(o=>this.entries[o]!==t),n=t?this.messages.alsoAbout:s?.heading??"";return{at:i,kind:e.kind,title:e.title,meta:e.when.replace("T"," "),open:this.shown.has(i),...r.length>0?{links:{heading:n,to:r.map(o=>({at:o,title:this.entries[o].title}))}}:{},by:e.kind==="observation"?"":this.authors(e.event.by),...t?{nested:!0}:{}}}async loadFromSrc(e){await this.load(e),await this.player?.loaded}get scene(){return this.players()[0]?.scene}players(){return[...this.shown.entries()].sort(([e],[i])=>e-i).map(([,e])=>e.querySelector(p)).filter(e=>e!==null)}get sightingData(){return this.players()[0]?.sightingData}get player(){return this.players()[0]}}function de(){customElements.get(g)||customElements.define(g,c)}export{g as CASE_ELEMENT_NAME,c as CaseElement,Q as OPEN_CHANGE_EVENT,b as OPEN_EVENTS_ATTRIBUTE,f as SHOW_TIMELINE_ATTRIBUTE,de as register};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e={caseHeading:"Case",eventsHeading:"History",kindObservation:"Observation",kindReading:"Reading",kindInterview:"Interview",openEvent:"Open this event alone",toggleEvent:"Show beside the others, or put away",groupReadings:"Group the readings under their observation",alsoAbout:"Also about",foldReadings:"Fold its readings away",unfoldReadings:"Unfold its readings",interpretationOf:"Reading of",passagesHeading:"Told in",byAuthor:"by",linkAnd:"and",caseSummary:"What this case says of itself",editCase:"Edit this case",shareCase:"Share this case"};export{e as caseMessages_en};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e={caseHeading:"Caso",eventsHeading:"Historial",kindObservation:"Observación",kindReading:"Lectura",kindInterview:"Entrevista",openEvent:"Abrir solo este evento",toggleEvent:"Mostrar junto a los demás, o quitar",groupReadings:"Agrupar las lecturas por observación",alsoAbout:"También trata de",foldReadings:"Plegar sus lecturas",unfoldReadings:"Desplegar sus lecturas",interpretationOf:"Lectura de",passagesHeading:"Relatado en",byAuthor:"por",linkAnd:"y",caseSummary:"Lo que este caso dice de sí mismo",editCase:"Editar este caso",shareCase:"Compartir este caso"};export{e as caseMessages_es};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e={caseHeading:"Dossier",eventsHeading:"Historique",kindObservation:"Observation",kindReading:"Lecture",kindInterview:"Interview",openEvent:"Ouvrir cet événement seul",toggleEvent:"Afficher à côté des autres, ou retirer",groupReadings:"Regrouper les lectures par observation",alsoAbout:"Porte aussi sur",foldReadings:"Replier ses lectures",unfoldReadings:"Déplier ses lectures",interpretationOf:"Lecture de",passagesHeading:"Relaté dans",byAuthor:"par",linkAnd:"et",caseSummary:"Ce que ce dossier dit de lui-même",editCase:"Modifier ce dossier",shareCase:"Partager ce dossier"};export{e as caseMessages_fr};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e={caseHeading:"Caso",eventsHeading:"Cronologia",kindObservation:"Osservazione",kindReading:"Lettura",kindInterview:"Intervista",openEvent:"Apri solo questo evento",toggleEvent:"Mostra accanto agli altri, o togli",groupReadings:"Raggruppa le letture per osservazione",alsoAbout:"Riguarda anche",foldReadings:"Chiudi le sue letture",unfoldReadings:"Apri le sue letture",interpretationOf:"Lettura di",passagesHeading:"Raccontato in",byAuthor:"di",linkAnd:"e",caseSummary:"Ciò che questo caso dice di sé",editCase:"Modificare questo caso",shareCase:"Condividi questo caso"};export{e as caseMessages_it};
|