@sentinel-nvr/web 0.16.11 → 0.17.1

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.
@@ -142,5 +142,32 @@
142
142
  "nvr.player.pipUnsupported": "Bild-in-Bild wird in diesem Browser nicht unterstützt.",
143
143
  "nvr.player.openInSafari": "In Safari öffnen",
144
144
  "nvr.player.dismiss": "Schließen",
145
- "nvr.events.running": "läuft"
145
+ "nvr.events.running": "läuft",
146
+ "nvr.clip.download": "Clip herunterladen",
147
+ "nvr.clip.event": "Ereignis als Clip",
148
+ "nvr.clip.from": "Von",
149
+ "nvr.clip.to": "Bis",
150
+ "nvr.clip.length": "Länge {d}",
151
+ "nvr.clip.edgeHint": "Zeitleiste verschieben – die Linie setzt die Kante",
152
+ "nvr.clip.create": "Clip erstellen",
153
+ "nvr.clip.preparing": "Wird vorbereitet … {pct} %",
154
+ "nvr.clip.loading": "Wird geladen …",
155
+ "nvr.clip.ready": "Clip fertig ({size})",
156
+ "nvr.clip.save": "Speichern",
157
+ "nvr.clip.share": "Teilen",
158
+ "nvr.clip.cancel": "Abbrechen",
159
+ "nvr.clip.close": "Schließen",
160
+ "nvr.clip.recreate": "Neu erstellen",
161
+ "nvr.clip.expired": "Der Clip ist abgelaufen",
162
+ "nvr.clip.tooLong": "Höchstens {max} min",
163
+ "nvr.clip.noRecording": "Keine Aufnahme im Zeitraum",
164
+ "nvr.clip.gaps": "Lücken in der Aufnahme werden übersprungen",
165
+ "nvr.clip.endsAt": "Endet um {time} (noch nicht aufgezeichnet)",
166
+ "nvr.clip.streamChange": "Die Kameraeinstellung wechselt um {time} – bitte kürzer wählen",
167
+ "nvr.clip.busy": "Es läuft schon ein Export – bitte gleich noch einmal",
168
+ "nvr.clip.noSpace": "Kein Platz für den Clip auf dem Server",
169
+ "nvr.clip.failed": "Clip konnte nicht erstellt werden",
170
+ "nvr.clip.oldServer": "Dieser Sentinel-Server kann noch keine Clips erstellen",
171
+ "nvr.clip.eventRunning": "Ereignis läuft noch – der Clip endet jetzt",
172
+ "nvr.clip.tooLarge": "Zu groß zum Teilen – in Safari speichern"
146
173
  }
@@ -142,5 +142,32 @@
142
142
  "nvr.player.pipUnsupported": "Picture-in-picture is not supported in this browser.",
143
143
  "nvr.player.openInSafari": "Open in Safari",
144
144
  "nvr.player.dismiss": "Close",
145
- "nvr.events.running": "running"
145
+ "nvr.events.running": "running",
146
+ "nvr.clip.download": "Download clip",
147
+ "nvr.clip.event": "Event as clip",
148
+ "nvr.clip.from": "From",
149
+ "nvr.clip.to": "To",
150
+ "nvr.clip.length": "Length {d}",
151
+ "nvr.clip.edgeHint": "Move the timeline – the line sets the edge",
152
+ "nvr.clip.create": "Create clip",
153
+ "nvr.clip.preparing": "Preparing … {pct} %",
154
+ "nvr.clip.loading": "Loading …",
155
+ "nvr.clip.ready": "Clip ready ({size})",
156
+ "nvr.clip.save": "Save",
157
+ "nvr.clip.share": "Share",
158
+ "nvr.clip.cancel": "Cancel",
159
+ "nvr.clip.close": "Close",
160
+ "nvr.clip.recreate": "Create again",
161
+ "nvr.clip.expired": "The clip has expired",
162
+ "nvr.clip.tooLong": "At most {max} min",
163
+ "nvr.clip.noRecording": "No recording in this range",
164
+ "nvr.clip.gaps": "Gaps in the recording are skipped",
165
+ "nvr.clip.endsAt": "Ends at {time} (not recorded yet)",
166
+ "nvr.clip.streamChange": "The camera settings change at {time} – choose a shorter range",
167
+ "nvr.clip.busy": "An export is already running – try again shortly",
168
+ "nvr.clip.noSpace": "Not enough space for the clip on the server",
169
+ "nvr.clip.failed": "The clip could not be created",
170
+ "nvr.clip.oldServer": "This Sentinel server cannot create clips yet",
171
+ "nvr.clip.eventRunning": "Event still running – the clip ends now",
172
+ "nvr.clip.tooLarge": "Too large to share here – save it in Safari"
146
173
  }
@@ -142,5 +142,32 @@
142
142
  "nvr.player.pipUnsupported": "Este navegador no admite imagen en imagen.",
143
143
  "nvr.player.openInSafari": "Abrir en Safari",
144
144
  "nvr.player.dismiss": "Cerrar",
145
- "nvr.events.running": "en curso"
145
+ "nvr.events.running": "en curso",
146
+ "nvr.clip.download": "Descargar clip",
147
+ "nvr.clip.event": "Evento como clip",
148
+ "nvr.clip.from": "Desde",
149
+ "nvr.clip.to": "Hasta",
150
+ "nvr.clip.length": "Duración {d}",
151
+ "nvr.clip.edgeHint": "Desplaza la línea de tiempo: la línea fija el límite",
152
+ "nvr.clip.create": "Crear clip",
153
+ "nvr.clip.preparing": "Preparando … {pct} %",
154
+ "nvr.clip.loading": "Cargando …",
155
+ "nvr.clip.ready": "Clip listo ({size})",
156
+ "nvr.clip.save": "Guardar",
157
+ "nvr.clip.share": "Compartir",
158
+ "nvr.clip.cancel": "Cancelar",
159
+ "nvr.clip.close": "Cerrar",
160
+ "nvr.clip.recreate": "Crear de nuevo",
161
+ "nvr.clip.expired": "El clip ha caducado",
162
+ "nvr.clip.tooLong": "Como máximo {max} min",
163
+ "nvr.clip.noRecording": "No hay grabación en este intervalo",
164
+ "nvr.clip.gaps": "Los huecos de la grabación se omiten",
165
+ "nvr.clip.endsAt": "Termina a las {time} (aún no grabado)",
166
+ "nvr.clip.streamChange": "La configuración de la cámara cambia a las {time}: elige un intervalo más corto",
167
+ "nvr.clip.busy": "Ya hay una exportación en curso; inténtalo de nuevo en un momento",
168
+ "nvr.clip.noSpace": "No hay espacio para el clip en el servidor",
169
+ "nvr.clip.failed": "No se pudo crear el clip",
170
+ "nvr.clip.oldServer": "Este servidor Sentinel aún no puede crear clips",
171
+ "nvr.clip.eventRunning": "El evento sigue en curso: el clip termina ahora",
172
+ "nvr.clip.tooLarge": "Demasiado grande para compartir aquí: guárdalo en Safari"
146
173
  }
@@ -142,5 +142,32 @@
142
142
  "nvr.player.pipUnsupported": "L’image dans l’image n’est pas prise en charge par ce navigateur.",
143
143
  "nvr.player.openInSafari": "Ouvrir dans Safari",
144
144
  "nvr.player.dismiss": "Fermer",
145
- "nvr.events.running": "en cours"
145
+ "nvr.events.running": "en cours",
146
+ "nvr.clip.download": "Télécharger le clip",
147
+ "nvr.clip.event": "Événement en clip",
148
+ "nvr.clip.from": "De",
149
+ "nvr.clip.to": "À",
150
+ "nvr.clip.length": "Durée {d}",
151
+ "nvr.clip.edgeHint": "Faites défiler la chronologie – la ligne fixe la limite",
152
+ "nvr.clip.create": "Créer le clip",
153
+ "nvr.clip.preparing": "Préparation … {pct} %",
154
+ "nvr.clip.loading": "Chargement …",
155
+ "nvr.clip.ready": "Clip prêt ({size})",
156
+ "nvr.clip.save": "Enregistrer",
157
+ "nvr.clip.share": "Partager",
158
+ "nvr.clip.cancel": "Annuler",
159
+ "nvr.clip.close": "Fermer",
160
+ "nvr.clip.recreate": "Recréer",
161
+ "nvr.clip.expired": "Le clip a expiré",
162
+ "nvr.clip.tooLong": "{max} min au maximum",
163
+ "nvr.clip.noRecording": "Aucun enregistrement sur cette période",
164
+ "nvr.clip.gaps": "Les interruptions de l’enregistrement sont ignorées",
165
+ "nvr.clip.endsAt": "Se termine à {time} (pas encore enregistré)",
166
+ "nvr.clip.streamChange": "Les réglages de la caméra changent à {time} – choisissez une période plus courte",
167
+ "nvr.clip.busy": "Une exportation est déjà en cours – réessayez dans un instant",
168
+ "nvr.clip.noSpace": "Pas assez d’espace pour le clip sur le serveur",
169
+ "nvr.clip.failed": "Impossible de créer le clip",
170
+ "nvr.clip.oldServer": "Ce serveur Sentinel ne peut pas encore créer de clips",
171
+ "nvr.clip.eventRunning": "Événement en cours – le clip se termine maintenant",
172
+ "nvr.clip.tooLarge": "Trop volumineux pour être partagé ici – enregistrez-le dans Safari"
146
173
  }
@@ -142,5 +142,32 @@
142
142
  "nvr.player.pipUnsupported": "Il picture-in-picture non è supportato in questo browser.",
143
143
  "nvr.player.openInSafari": "Apri in Safari",
144
144
  "nvr.player.dismiss": "Chiudi",
145
- "nvr.events.running": "in corso"
145
+ "nvr.events.running": "in corso",
146
+ "nvr.clip.download": "Scarica clip",
147
+ "nvr.clip.event": "Evento come clip",
148
+ "nvr.clip.from": "Da",
149
+ "nvr.clip.to": "A",
150
+ "nvr.clip.length": "Durata {d}",
151
+ "nvr.clip.edgeHint": "Scorri la timeline: la linea fissa il limite",
152
+ "nvr.clip.create": "Crea clip",
153
+ "nvr.clip.preparing": "Preparazione … {pct} %",
154
+ "nvr.clip.loading": "Caricamento …",
155
+ "nvr.clip.ready": "Clip pronto ({size})",
156
+ "nvr.clip.save": "Salva",
157
+ "nvr.clip.share": "Condividi",
158
+ "nvr.clip.cancel": "Annulla",
159
+ "nvr.clip.close": "Chiudi",
160
+ "nvr.clip.recreate": "Crea di nuovo",
161
+ "nvr.clip.expired": "Il clip è scaduto",
162
+ "nvr.clip.tooLong": "Al massimo {max} min",
163
+ "nvr.clip.noRecording": "Nessuna registrazione in questo intervallo",
164
+ "nvr.clip.gaps": "Le interruzioni della registrazione vengono saltate",
165
+ "nvr.clip.endsAt": "Termina alle {time} (non ancora registrato)",
166
+ "nvr.clip.streamChange": "Le impostazioni della telecamera cambiano alle {time}: scegli un intervallo più breve",
167
+ "nvr.clip.busy": "È già in corso un’esportazione, riprova tra poco",
168
+ "nvr.clip.noSpace": "Spazio insufficiente per il clip sul server",
169
+ "nvr.clip.failed": "Impossibile creare il clip",
170
+ "nvr.clip.oldServer": "Questo server Sentinel non può ancora creare clip",
171
+ "nvr.clip.eventRunning": "Evento ancora in corso: il clip termina ora",
172
+ "nvr.clip.tooLarge": "Troppo grande per condividerlo qui: salvalo in Safari"
146
173
  }
@@ -142,5 +142,32 @@
142
142
  "nvr.player.pipUnsupported": "Este navegador não suporta imagem em imagem.",
143
143
  "nvr.player.openInSafari": "Abrir no Safari",
144
144
  "nvr.player.dismiss": "Fechar",
145
- "nvr.events.running": "a decorrer"
145
+ "nvr.events.running": "a decorrer",
146
+ "nvr.clip.download": "Transferir clip",
147
+ "nvr.clip.event": "Evento como clip",
148
+ "nvr.clip.from": "De",
149
+ "nvr.clip.to": "Até",
150
+ "nvr.clip.length": "Duração {d}",
151
+ "nvr.clip.edgeHint": "Desloca a linha do tempo – a linha define o limite",
152
+ "nvr.clip.create": "Criar clip",
153
+ "nvr.clip.preparing": "A preparar … {pct} %",
154
+ "nvr.clip.loading": "A carregar …",
155
+ "nvr.clip.ready": "Clip pronto ({size})",
156
+ "nvr.clip.save": "Guardar",
157
+ "nvr.clip.share": "Partilhar",
158
+ "nvr.clip.cancel": "Cancelar",
159
+ "nvr.clip.close": "Fechar",
160
+ "nvr.clip.recreate": "Criar de novo",
161
+ "nvr.clip.expired": "O clip expirou",
162
+ "nvr.clip.tooLong": "No máximo {max} min",
163
+ "nvr.clip.noRecording": "Sem gravação neste intervalo",
164
+ "nvr.clip.gaps": "As falhas na gravação são ignoradas",
165
+ "nvr.clip.endsAt": "Termina às {time} (ainda não gravado)",
166
+ "nvr.clip.streamChange": "As definições da câmara mudam às {time} – escolhe um intervalo mais curto",
167
+ "nvr.clip.busy": "Já está a decorrer uma exportação – tenta de novo daqui a pouco",
168
+ "nvr.clip.noSpace": "Sem espaço para o clip no servidor",
169
+ "nvr.clip.failed": "Não foi possível criar o clip",
170
+ "nvr.clip.oldServer": "Este servidor Sentinel ainda não consegue criar clips",
171
+ "nvr.clip.eventRunning": "Evento ainda a decorrer – o clip termina agora",
172
+ "nvr.clip.tooLarge": "Demasiado grande para partilhar aqui – guarda-o no Safari"
146
173
  }
@@ -142,5 +142,32 @@
142
142
  "nvr.player.pipUnsupported": "Bild-i-bild stöds inte i den här webbläsaren.",
143
143
  "nvr.player.openInSafari": "Öppna i Safari",
144
144
  "nvr.player.dismiss": "Stäng",
145
- "nvr.events.running": "pågår"
145
+ "nvr.events.running": "pågår",
146
+ "nvr.clip.download": "Ladda ner klipp",
147
+ "nvr.clip.event": "Händelse som klipp",
148
+ "nvr.clip.from": "Från",
149
+ "nvr.clip.to": "Till",
150
+ "nvr.clip.length": "Längd {d}",
151
+ "nvr.clip.edgeHint": "Flytta tidslinjen – linjen sätter kanten",
152
+ "nvr.clip.create": "Skapa klipp",
153
+ "nvr.clip.preparing": "Förbereder … {pct} %",
154
+ "nvr.clip.loading": "Läser in …",
155
+ "nvr.clip.ready": "Klippet är klart ({size})",
156
+ "nvr.clip.save": "Spara",
157
+ "nvr.clip.share": "Dela",
158
+ "nvr.clip.cancel": "Avbryt",
159
+ "nvr.clip.close": "Stäng",
160
+ "nvr.clip.recreate": "Skapa igen",
161
+ "nvr.clip.expired": "Klippet har gått ut",
162
+ "nvr.clip.tooLong": "Högst {max} min",
163
+ "nvr.clip.noRecording": "Ingen inspelning i det här intervallet",
164
+ "nvr.clip.gaps": "Luckor i inspelningen hoppas över",
165
+ "nvr.clip.endsAt": "Slutar {time} (inte inspelat än)",
166
+ "nvr.clip.streamChange": "Kamerainställningarna ändras {time} – välj ett kortare intervall",
167
+ "nvr.clip.busy": "En export pågår redan – försök igen om en stund",
168
+ "nvr.clip.noSpace": "Inte tillräckligt med utrymme för klippet på servern",
169
+ "nvr.clip.failed": "Klippet kunde inte skapas",
170
+ "nvr.clip.oldServer": "Den här Sentinel-servern kan inte skapa klipp än",
171
+ "nvr.clip.eventRunning": "Händelsen pågår fortfarande – klippet slutar nu",
172
+ "nvr.clip.tooLarge": "För stort för att dela här – spara det i Safari"
146
173
  }
package/dist/ui/ui.css CHANGED
@@ -798,6 +798,28 @@
798
798
  animation: none;
799
799
  }
800
800
  }
801
+ .nvr-vtl .vclip {
802
+ /* clip mode: the range to download as a band right of the time column, its edges as accent lines (the active one,
803
+ which follows the playhead line, stronger); under the markers and thumbnails */
804
+ position: absolute;
805
+ left: 62px;
806
+ right: 0;
807
+ box-sizing: border-box;
808
+ background: color-mix(in srgb, var(--accent) 14%, transparent);
809
+ border-top: 2px solid var(--accent);
810
+ border-bottom: 2px solid var(--accent);
811
+ pointer-events: none;
812
+ }
813
+ .nvr-vtl .vclip--to {
814
+ border-top-width: 4px;
815
+ }
816
+ .nvr-vtl .vclip--from {
817
+ border-bottom-width: 4px;
818
+ }
819
+ .nvr-vtl .vclip--bad {
820
+ background: color-mix(in srgb, var(--danger) 12%, transparent);
821
+ border-color: var(--danger);
822
+ }
801
823
  .nvr-vtl .vev--minor {
802
824
  width: 6px;
803
825
  left: 82px;
@@ -995,6 +1017,9 @@
995
1017
  .nvr-vtl .vlive-line {
996
1018
  left: 62px;
997
1019
  }
1020
+ .nvr-vtl .vclip {
1021
+ left: 50px;
1022
+ }
998
1023
  .nvr-vtl .vlive-chip {
999
1024
  left: 60px;
1000
1025
  }
@@ -1143,6 +1168,11 @@
1143
1168
  background: var(--accent-soft);
1144
1169
  color: var(--accent);
1145
1170
  }
1171
+ .nvr-iconbtn--on,
1172
+ .nvr-iconbtn--on:hover {
1173
+ background: var(--accent-soft);
1174
+ color: var(--accent);
1175
+ }
1146
1176
  .nvr-iconbtn:active {
1147
1177
  transform: scale(0.96);
1148
1178
  }
@@ -1525,6 +1555,129 @@
1525
1555
  .nvr-evrow:hover {
1526
1556
  background: var(--bg-subtle);
1527
1557
  }
1558
+ /* a row with "Event as clip" next to it (two buttons side by side, not nested) */
1559
+ .nvr-evrow-wrap {
1560
+ display: flex;
1561
+ align-items: center;
1562
+ gap: 0.15rem;
1563
+ }
1564
+ .nvr-evrow-wrap > .nvr-evrow {
1565
+ flex: 1;
1566
+ min-width: 0;
1567
+ }
1568
+ .nvr-evrow__clip {
1569
+ width: 44px;
1570
+ height: 44px;
1571
+ min-width: 44px;
1572
+ }
1573
+ /* clip bar (clip mode): under the timeline in the same card — chips + length, a status/hint line, buttons ≥ 44 px.
1574
+ A row of its own, so it never covers the zoom buttons, the live pill or the timeline's LIVE chip */
1575
+ .nvr-clipbar {
1576
+ flex: none;
1577
+ display: flex;
1578
+ flex-direction: column;
1579
+ gap: 0.4rem;
1580
+ padding: 0.5rem 0.6rem 0.6rem;
1581
+ border-top: 1px solid var(--line);
1582
+ background: var(--bg-card);
1583
+ }
1584
+ .nvr-clipbar__row {
1585
+ display: flex;
1586
+ align-items: center;
1587
+ flex-wrap: wrap;
1588
+ gap: 0.4rem;
1589
+ min-width: 0;
1590
+ }
1591
+ .nvr-clipchip {
1592
+ display: inline-flex;
1593
+ align-items: center;
1594
+ gap: 0.35rem;
1595
+ min-height: 32px;
1596
+ padding: 0 0.65rem;
1597
+ border: 1px solid var(--border);
1598
+ border-radius: var(--radius-pill);
1599
+ background: var(--bg-subtle);
1600
+ color: var(--text);
1601
+ font: inherit;
1602
+ font-size: 0.8rem;
1603
+ white-space: nowrap;
1604
+ cursor: pointer;
1605
+ }
1606
+ .nvr-clipchip__k {
1607
+ color: var(--text-dim);
1608
+ font-size: 0.7rem;
1609
+ font-weight: 600;
1610
+ }
1611
+ .nvr-clipchip--active {
1612
+ border-color: var(--accent);
1613
+ background: var(--accent-soft);
1614
+ box-shadow: inset 0 0 0 1px var(--accent);
1615
+ }
1616
+ .nvr-clipchip--bad,
1617
+ .nvr-clipchip--bad .nvr-clipchip__k {
1618
+ border-color: var(--danger);
1619
+ color: var(--danger);
1620
+ }
1621
+ .nvr-clipchip:disabled {
1622
+ opacity: 0.55;
1623
+ cursor: default;
1624
+ }
1625
+ .nvr-clipchip:focus-visible {
1626
+ outline: 2px solid var(--accent);
1627
+ outline-offset: 2px;
1628
+ }
1629
+ .nvr-clipbar__len {
1630
+ white-space: nowrap;
1631
+ }
1632
+ .nvr-clipbar__close {
1633
+ margin-left: auto;
1634
+ }
1635
+ /* clip mode hides the date chip: the live pill moves down to its place (else it covers the LIVE chip / a marker) */
1636
+ .nvr-cam__right--clip .nvr-vtl .livejump {
1637
+ bottom: 10px;
1638
+ }
1639
+ .nvr-clipbar__note {
1640
+ font-size: 0.76rem;
1641
+ line-height: 1.35;
1642
+ color: var(--text-dim);
1643
+ padding: 0 0.15rem;
1644
+ }
1645
+ .nvr-clipbar__state {
1646
+ color: var(--text);
1647
+ font-weight: 600;
1648
+ }
1649
+ .nvr-clipbar__bad {
1650
+ color: var(--danger);
1651
+ font-weight: 600;
1652
+ }
1653
+ .nvr-clipbar__prog {
1654
+ height: 4px;
1655
+ border-radius: 2px;
1656
+ background: var(--bg-subtle);
1657
+ overflow: hidden;
1658
+ }
1659
+ .nvr-clipbar__prog > i {
1660
+ display: block;
1661
+ height: 100%;
1662
+ background: var(--accent);
1663
+ transition: width 300ms ease-out;
1664
+ }
1665
+ .nvr-clipbar__actions {
1666
+ flex-wrap: nowrap;
1667
+ }
1668
+ .nvr-clipbar__actions .nvr-btn {
1669
+ flex: 1 1 0;
1670
+ min-width: 0;
1671
+ padding: 0 0.75rem;
1672
+ text-decoration: none;
1673
+ white-space: nowrap;
1674
+ overflow: hidden;
1675
+ text-overflow: ellipsis;
1676
+ }
1677
+ .nvr-clipbar__actions .nvr-btn:disabled {
1678
+ opacity: 0.45;
1679
+ cursor: default;
1680
+ }
1528
1681
  .nvr-evrow__img {
1529
1682
  width: 84px;
1530
1683
  height: 56px;
@@ -1617,6 +1770,42 @@
1617
1770
  padding: 0.3rem 0.4rem;
1618
1771
  min-height: 30px;
1619
1772
  }
1773
+ /* clip mode on a phone: the timeline needs the room (the edges are set on it) — a smaller picture, no class filters */
1774
+ .nvr-cam__body.nvr-cam__body--clip {
1775
+ --stage-maxh: 28vh;
1776
+ }
1777
+ /* … and neither tabs, class filters nor the info bar (the clip bar has its own close button; a smaller picture
1778
+ would crush the info bar's title, the page header names the camera) */
1779
+ .nvr-cam__right--clip .nvr-filters,
1780
+ .nvr-cam__right--clip .nvr-tabs,
1781
+ .nvr-cam__body--clip .nvr-stage-bar {
1782
+ display: none;
1783
+ }
1784
+ .nvr-clipbar {
1785
+ gap: 0.25rem;
1786
+ padding: 0.375rem 0.5rem;
1787
+ }
1788
+ /* touch targets ≥ 44 px (the bar stays around 140 px: chips, two lines of hints, the button row) */
1789
+ .nvr-clipchip,
1790
+ .nvr-clipbar__close {
1791
+ min-height: 44px;
1792
+ }
1793
+ .nvr-clipbar__close {
1794
+ width: 44px;
1795
+ height: 44px;
1796
+ }
1797
+ .nvr-clipbar__note {
1798
+ font-size: 0.74rem;
1799
+ line-height: 1.3;
1800
+ }
1801
+ /* at most two lines (the full text is the title / read out); an error keeps all its lines */
1802
+ .nvr-clipbar__note:not(.nvr-clipbar__note--bad) {
1803
+ display: -webkit-box;
1804
+ -webkit-box-orient: vertical;
1805
+ -webkit-line-clamp: 2;
1806
+ line-clamp: 2;
1807
+ overflow: hidden;
1808
+ }
1620
1809
  }
1621
1810
 
1622
1811
  /* ---- Appearance settings section (HAPulse Settings.css metrics) ------------- */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentinel-nvr/web",
3
- "version": "0.16.11",
3
+ "version": "0.17.1",
4
4
  "description": "Shared browser code for the Sentinel NVR plugin for Scrypted: API model + client (/api), player (/player) and React UI with i18n + themes (/ui). Consumed by the plugin's own web UI and the HAPulse dashboard.",
5
5
  "license": "MIT",
6
6
  "author": "Muggedadscher",
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/api/model.ts","../src/api/client.ts","../src/api/format.ts"],"sourcesContent":["/**\n * Sentinel NVR — DOM-free data model + pure helpers.\n *\n * Mirrors the Sentinel NVR plugin's `docs/API.md` (the binding contract): types,\n * URL/setup parsing, event classification, the playback-start heuristic, the\n * storage forecast the status page computes, and the timeline clip-run merge.\n * No fetch/DOM here — the browser client lives in `client.ts`.\n */\n\n// ---------------------------------------------------------------------------\n// Types (docs/API.md §3)\n// ---------------------------------------------------------------------------\n\n/** UI classes of an event; anything unknown collapses to `motion`. */\nexport type SentinelEventClass = 'person' | 'car' | 'bike' | 'animal' | 'package' | 'motion';\n\nexport const SENTINEL_EVENT_CLASSES: readonly SentinelEventClass[] = [\n 'person',\n 'car',\n 'bike',\n 'animal',\n 'package',\n 'motion',\n];\n\nexport type SentinelBox = [number, number, number, number];\n\n/** `api/cameras` entry. */\nexport interface SentinelCamera {\n id: string;\n name: string;\n recording: boolean;\n online: boolean;\n /** plugin ≥ 2026-10-05: recording watchdog — ffmpeg ran ≥ 3 min without a new segment and is being restarted; stays set\n * (also while the restart is pending, `online` false) until a segment arrives again. */\n stalled?: boolean;\n /** plugin ≥ 2026-10-05: since when nothing was recorded (ms) */\n stalledSince?: number;\n lastSegmentAt?: number;\n eventsToday: number;\n lastEventTs?: number;\n latestThumbId?: string;\n latestTs?: number;\n /** RFC-6381 codec string of the recordings (MSE). */\n codecs?: string;\n}\n\n/**\n * Recording state of a camera tile: `off` = recording switched off, `stalled` = recording hangs (watchdog, outranks\n * `offline`: during the restart after a stall ffmpeg is briefly down), `offline` = ffmpeg not running (camera\n * unreachable), `ok` = recording.\n */\nexport type SentinelRecordingState = 'off' | 'stalled' | 'offline' | 'ok';\n\nexport function sentinelRecordingState(\n cam: Pick<SentinelCamera, 'recording' | 'online' | 'stalled'>,\n): SentinelRecordingState {\n if (!cam.recording) return 'off';\n if (cam.stalled) return 'stalled';\n return cam.online ? 'ok' : 'offline';\n}\n\n/** `api/stats`. */\nexport interface SentinelStats {\n cameras: number;\n /** cameras recording right now (plugin ≥ 2026-10-05; before: cameras with recording switched on) */\n recording: number;\n eventsToday: number;\n segments: number;\n bytes: number;\n earliest?: number;\n retentionDays: number;\n diskFree: number;\n diskTotal: number;\n minFreeBytes: number;\n /** plugin ≥ 2026-09-26: storage root usable (storage guard); false = not recording, nothing deleted. */\n storageOk?: boolean;\n /** why not: 'marker' (share not mounted), 'missing', 'error', 'timeout' */\n storageProblem?: string;\n}\n\n/** `api/recent-events` entry (short form). */\nexport interface SentinelRecentEvent {\n camera: string;\n cameraName: string;\n ts: number;\n startTs?: number;\n /** plugin ≥ 1.3.0: event as a time span — last movement of one of its objects */\n endTs?: number;\n /** plugin ≥ 1.3.0: the event is still running */\n open?: boolean;\n classes: string[];\n score: number;\n}\n\nexport interface SentinelEventBox {\n class: string;\n rawClass?: string;\n score: number;\n box: SentinelBox;\n nbox?: SentinelBox;\n /** plugin ≥ 1.3.0: picture time of this box (later than `timestamp` = the object joined the running event) */\n ts?: number;\n}\n\n/** Full event (`api/clips.events`). */\nexport interface SentinelEvent {\n id: string;\n timestamp: number;\n startTs?: number;\n classes: string[];\n score: number;\n source: 'object' | 'motion';\n boxes?: SentinelEventBox[];\n /** plugin ≥ 1.3.0: event as a time span — last movement of one of its objects */\n endTs?: number;\n /** plugin ≥ 1.3.0: the event is still running (its objects are still there) */\n open?: boolean;\n}\n\n/** Recording segment (`api/clips.clips`). */\nexport interface SentinelClip {\n id: string;\n videoId?: string;\n thumbnailId?: string;\n startTime: number;\n duration?: number;\n event?: string;\n detectionClasses?: string[];\n}\n\nexport interface SentinelClipsResponse {\n clips: SentinelClip[];\n events: SentinelEvent[];\n motion: [number, number][];\n codecs?: string;\n}\n\nexport const SENTINEL_DAY_MS = 24 * 60 * 60 * 1000;\n\n// ---------------------------------------------------------------------------\n// Setup / URLs (docs/API.md §1)\n// ---------------------------------------------------------------------------\n\n/** Where the plugin lives below a Scrypted origin. */\nexport const SENTINEL_ENDPOINT_PATH = '/endpoint/@local/sentinel-nvr';\n\nexport interface SentinelSetup {\n /** Scrypted origin, e.g. `https://192.0.2.10:10443` (no trailing slash). */\n origin: string;\n /** Access token found in the pasted URL (`?token=`), if any. */\n token: string | null;\n /**\n * Reverse-proxy path prefix in front of Scrypted's `/endpoint/…` (e.g. `/scrypted` for\n * `https://proxy/scrypted/endpoint/@local/sentinel-nvr/public/`), `''` without one.\n * Only derived when the pasted URL contains `/endpoint/`. Since 0.10.0.\n */\n prefix: string;\n}\n\n/**\n * Turn whatever the user pastes into a clean Scrypted origin (+ token, when the\n * pasted string was Sentinel's embed URL). Accepts a bare host (`https://` is\n * assumed), the Scrypted root, the plugin's login/public path, or the embed\n * URL with `?token=…&embed=1`. Returns null for unusable input.\n */\nexport function parseSentinelSetup(input: string | null | undefined): SentinelSetup | null {\n const raw = (input ?? '').trim();\n if (!raw) return null;\n const withScheme = /^https?:\\/\\//i.test(raw) ? raw : `https://${raw}`;\n let u: URL;\n try {\n u = new URL(withScheme);\n } catch {\n return null;\n }\n if (!u.hostname) return null;\n const token = u.searchParams.get('token');\n const at = u.pathname.indexOf('/endpoint/');\n const prefix = at > 0 ? u.pathname.slice(0, at).replace(/\\/+$/, '') : '';\n return { origin: u.origin, token: token && token.trim() ? token.trim() : null, prefix };\n}\n\n/** Token-guarded machine base (`…/public/`), always with a trailing slash; `prefix` = reverse-proxy path prefix. */\nexport function sentinelPublicBase(origin: string, prefix = ''): string {\n return `${origin.replace(/\\/+$/, '')}${prefix.replace(/\\/+$/, '')}${SENTINEL_ENDPOINT_PATH}/public/`;\n}\n\n/**\n * Human base behind the Scrypted login (`…/sentinel-nvr/`). NOT a link target:\n * without a session Scrypted answers \"Not Authorized\" here. Humans enter via\n * `sentinelEntryUrl` (the public base without a token shows Sentinel's sign-in\n * page, or redirects straight here when a session exists).\n */\nexport function sentinelLoginBase(origin: string): string {\n return `${origin.replace(/\\/+$/, '')}${SENTINEL_ENDPOINT_PATH}/`;\n}\n\n/** Where a human opens Sentinel's own UI: the public base WITHOUT a token (sign-in page / 302 into the session). */\nexport function sentinelEntryUrl(origin: string): string {\n return sentinelPublicBase(origin);\n}\n\n/**\n * Absolute URL for an API/media path below the public base, with the token as\n * a query parameter (a `GET` with a query token is a CORS \"simple request\" —\n * the `x-sentinel-token` header would force a preflight the plugin does not\n * answer; `<img>`/`<video>` sources need the query form anyway).\n */\nexport function sentinelUrl(base: string, token: string, path: string): string {\n const u = base + path;\n if (!token) return u;\n return `${u}${u.includes('?') ? '&' : '?'}token=${encodeURIComponent(token)}`;\n}\n\n/**\n * Deep link into Sentinel's own web UI for a camera timeline — via the entry\n * URL (sign-in or 302 into the session; browsers carry the `#` fragment across\n * the redirect).\n */\nexport function sentinelTimelineLink(origin: string, cameraId: string, atMs?: number): string {\n const q = atMs ? `?at=${Math.round(atMs)}` : '';\n return `${sentinelEntryUrl(origin)}#/timeline/${encodeURIComponent(cameraId)}${q}`;\n}\n\n// ---------------------------------------------------------------------------\n// Events\n// ---------------------------------------------------------------------------\n\nfunction isKnownClass(k: string): k is SentinelEventClass {\n return (SENTINEL_EVENT_CLASSES as readonly string[]).includes(k);\n}\n\n/** Which class of a multi-class event matters most (a cyclist is a person first). Servers from plugin 1.3.0 send\n * `classes` in this order; older ones sent them alphabetically — the helpers below sort themselves. */\nexport const SENTINEL_CLASS_PRIORITY: readonly SentinelEventClass[] = [\n 'person',\n 'animal',\n 'bike',\n 'car',\n 'package',\n 'motion',\n];\n\n/** Distinct known classes of an event by priority (unknown classes count as `motion`) — never empty. */\nexport function sentinelClassesOf(ev: { classes?: string[] | undefined }): SentinelEventClass[] {\n const out: SentinelEventClass[] = [];\n for (const k of ev.classes ?? []) {\n const c: SentinelEventClass = isKnownClass(k) ? k : 'motion';\n if (!out.includes(c)) out.push(c);\n }\n if (!out.length) out.push('motion');\n return out.sort((a, b) => SENTINEL_CLASS_PRIORITY.indexOf(a) - SENTINEL_CLASS_PRIORITY.indexOf(b));\n}\n\n/** Primary class of an event: its most important class (person > animal > bike > car > package), else `motion`. */\nexport function sentinelClassOf(ev: { classes?: string[] | undefined }): SentinelEventClass {\n return sentinelClassesOf(ev)[0];\n}\n\n/** A class filter hides an event only when ALL of its classes are switched off (a cyclist stays visible with\n * „Fahrzeug“ off, because it is also a person). */\nexport function sentinelEventHidden(\n ev: { classes?: string[] | undefined },\n off: Partial<Record<SentinelEventClass, boolean>>,\n): boolean {\n return sentinelClassesOf(ev).every((c) => off[c]);\n}\n\n/** Shorter spans are drawn as a plain marker. */\nexport const SENTINEL_MIN_SPAN_MS = 3000;\n\n/**\n * An event as a time span (plugin ≥ 1.3.0): from its first sighting to the last movement of its objects — a running\n * event reaches up to `now`. Undefined for short events and for servers without `endTs`.\n */\nexport function sentinelEventSpan(\n ev: { timestamp?: number; ts?: number; startTs?: number; endTs?: number; open?: boolean },\n now = Date.now(),\n): { start: number; end: number; open: boolean } | undefined {\n const t = ev.timestamp ?? ev.ts ?? 0;\n const start = Math.min(ev.startTs ?? t, t);\n const open = !!ev.open;\n const end = open ? Math.max(now, ev.endTs ?? t) : ev.endTs;\n if (end === undefined || end - start < SENTINEL_MIN_SPAN_MS)\n return open ? { start, end: end ?? now, open } : undefined;\n return { start, end, open };\n}\n\n/** A span's length as m:ss (h:mm:ss from one hour). */\nexport function sentinelDuration(ms: number): string {\n const s = Math.max(0, Math.round(ms / 1000));\n const h = Math.floor(s / 3600),\n m = Math.floor((s % 3600) / 60),\n sec = String(s % 60).padStart(2, '0');\n return h ? `${h}:${String(m).padStart(2, '0')}:${sec}` : `${m}:${sec}`;\n}\n\n/**\n * Where playback starts for an event: 2 s before the first sighting when the\n * detector recorded one, else 3 s before the trigger (docs/API.md §3.3).\n */\nexport function sentinelEventPlayTs(ev: { timestamp?: number; ts?: number; startTs?: number }): number {\n const ts = ev.startTs || ev.ts || ev.timestamp || 0;\n return ev.startTs ? ts - 2000 : ts - 3000;\n}\n\n// ---------------------------------------------------------------------------\n// Storage forecast (docs/API.md §3.2 — the same maths the Sentinel status page uses)\n// ---------------------------------------------------------------------------\n\nexport type SentinelStorageStatus = 'unknown' | 'unreachable' | 'reachable' | 'filling';\n\nexport interface SentinelStorageForecast {\n /** Days spanned by the archive (earliest segment → now). */\n spanDays: number;\n /** Bytes recorded per day (0 until at least an hour of footage exists). */\n ratePerDay: number;\n /** Free-space guard reserve, clamped to the disk size. */\n reserve: number;\n /** Free bytes above the reserve. */\n usableFree: number;\n /** Bytes available for recordings = archive + usable free. */\n capacity: number;\n /** Days the archive can grow to at the current rate (0 = unknown). */\n fitsDays: number;\n /** Days until the reserve is reached (0 = unknown). */\n fillsInDays: number;\n /** The disk is effectively full (free ≤ 2 % above the reserve) → steady-state eviction. */\n steady: boolean;\n /** Bytes used by something other than recordings. */\n other: number;\n /** Which forecast message applies. */\n status: SentinelStorageStatus;\n}\n\nexport function sentinelStorageForecast(st: SentinelStats, nowMs: number = Date.now()): SentinelStorageForecast {\n const spanDays = st.earliest ? Math.max(0, (nowMs - st.earliest) / SENTINEL_DAY_MS) : 0;\n const ratePerDay = spanDays >= 1 / 24 ? st.bytes / Math.max(spanDays, 1 / 24) : 0;\n const reserve = Math.min(st.minFreeBytes || 0, st.diskTotal);\n const usableFree = Math.max(0, st.diskFree - reserve);\n const capacity = st.bytes + usableFree;\n const fitsDays = ratePerDay ? capacity / ratePerDay : 0;\n const fillsInDays = ratePerDay ? usableFree / ratePerDay : 0;\n const steady = usableFree < 0.02 * st.diskTotal;\n const other = Math.max(0, st.diskTotal - st.diskFree - st.bytes);\n let status: SentinelStorageStatus = 'unknown';\n if (ratePerDay) {\n if (fitsDays < st.retentionDays * 0.95) status = 'unreachable';\n else if (steady || spanDays >= st.retentionDays) status = 'reachable';\n else status = 'filling';\n }\n return { spanDays, ratePerDay, reserve, usableFree, capacity, fitsDays, fillsInDays, steady, other, status };\n}\n\n// ---------------------------------------------------------------------------\n// Timeline helpers\n// ---------------------------------------------------------------------------\n\nexport interface SentinelRun {\n s: number;\n e: number;\n}\n\n/**\n * Contiguous recording runs: segments whose gap is ≤ `gapMs` (2 s) are drawn as\n * ONE band (otherwise every 60-s segment boundary shows a notch).\n */\nexport function sentinelClipRuns(clips: SentinelClip[], gapMs = 2000): SentinelRun[] {\n const out: SentinelRun[] = [];\n let cur: SentinelRun | null = null;\n for (const c of clips) {\n const e = c.startTime + (c.duration || 0);\n if (cur && c.startTime - cur.e <= gapMs) cur.e = Math.max(cur.e, e);\n else {\n cur = { s: c.startTime, e };\n out.push(cur);\n }\n }\n return out;\n}\n\n/** Index of the clip covering `ts` (60 s assumed when a duration is missing), −1 if none. */\nexport function sentinelClipIndexFor(clips: SentinelClip[], ts: number): number {\n for (let i = 0; i < clips.length; i++) {\n const c = clips[i]!;\n if (ts >= c.startTime && ts < c.startTime + (c.duration || 60000)) return i;\n }\n return -1;\n}\n\n/** Local-midnight start of the day containing `ts`. */\nexport function sentinelDayOf(ts: number): number {\n return new Date(ts).setHours(0, 0, 0, 0);\n}\n\n// Calendar-day arithmetic. A local day is 23 or 25 hours long on DST change days, so\n// \"day ± 24 h\" lands an hour off midnight there (a second key for the same day, requests\n// shifted by an hour, \"next day\" staying on the same date). Always step calendar days:\n\n/** Local midnight `n` calendar days from the day of `ts`. */\nexport function sentinelAddDays(ts: number, n: number): number {\n const d = new Date(ts);\n d.setHours(0, 0, 0, 0);\n d.setDate(d.getDate() + n);\n return d.getTime();\n}\n\n/** End of the local day of `ts` (= next local midnight). */\nexport function sentinelDayEnd(ts: number): number {\n return sentinelAddDays(ts, 1);\n}\n\n/** Wall-clock time h:m on the local day of `ts` (not `midnight + h·3600 s`, which is an hour off on DST days). */\nexport function sentinelAtTime(ts: number, h: number, m: number, s = 0): number {\n const d = new Date(ts);\n d.setHours(h, m, s, 0);\n return d.getTime();\n}\n\n/**\n * Timestamps of local wall-clock marks every `step` ms (a divisor of a day: 15 s … 6 h) within [from, to],\n * ascending: a 3-h step marks 00:00/03:00/06:00 local time in every time zone (UTC-aligned steps showed\n * 02:00/05:00/08:00 in CEST). On DST days a mark that does not exist is skipped, a repeated hour marked once.\n */\nexport function sentinelWallMarks(from: number, to: number, step: number, max = 8000): number[] {\n const stepSec = Math.max(1, Math.round(step / 1000));\n const out: number[] = [];\n for (let day = sentinelDayOf(from); day <= to && out.length < max; day = sentinelAddDays(day, 1)) {\n const end = sentinelDayEnd(day);\n const regular = end - day === SENTINEL_DAY_MS;\n // only the marks near the window (+1 h slack on DST days)\n const k0 = Math.max(0, Math.floor((from - day - 3600_000) / (stepSec * 1000)));\n const k1 = Math.min(Math.floor(86400 / stepSec), Math.ceil((to - day + 3600_000) / (stepSec * 1000)));\n for (let k = k0; k <= k1 && out.length < max; k++) {\n const sec = k * stepSec;\n if (sec >= 86400) break;\n let t: number;\n if (regular) t = day + sec * 1000;\n else {\n const d = new Date(day);\n d.setHours(Math.floor(sec / 3600), Math.floor((sec % 3600) / 60), sec % 60, 0);\n // a wall time that does not exist (spring gap) normalises to another hour: skip it\n if (d.getHours() * 3600 + d.getMinutes() * 60 + d.getSeconds() !== sec) continue;\n t = d.getTime();\n }\n if (t >= from && t <= to && (!out.length || t > out[out.length - 1]!)) out.push(t);\n }\n }\n return out;\n}\n\n/** Local wall-clock seconds since midnight (for \"is this mark on a label step?\"). */\nexport function sentinelWallSeconds(ts: number): number {\n const d = new Date(ts);\n return d.getHours() * 3600 + d.getMinutes() * 60 + d.getSeconds();\n}\n\n/**\n * Merge per-day clip responses into one sorted, continuous data set. A clip or motion span that\n * crosses midnight comes with both days — kept once (by id / by interval).\n */\nexport function sentinelMergeDays(days: Record<number, SentinelClipsResponse>): {\n clips: SentinelClip[];\n events: SentinelEvent[];\n motion: [number, number][];\n codecs: string | null;\n oldestDay: number | null;\n} {\n const keys = Object.keys(days)\n .map(Number)\n .sort((a, b) => a - b);\n const clips = new Map<string, SentinelClip>(),\n events = new Map<string, SentinelEvent>();\n const motionRaw: [number, number][] = [];\n let codecs: string | null = null;\n for (const k of keys) {\n const d = days[k]!;\n for (const c of d.clips) clips.set(c.id, c);\n for (const e of d.events) events.set(e.id || `${e.timestamp}`, e);\n motionRaw.push(...d.motion);\n if (d.codecs) codecs = d.codecs;\n }\n motionRaw.sort((a, b) => a[0] - b[0]);\n const motion: [number, number][] = [];\n for (const m of motionRaw) {\n const last = motion[motion.length - 1];\n if (last && m[0] <= last[1]) last[1] = Math.max(last[1], m[1]);\n else motion.push([m[0], m[1]]);\n }\n return {\n clips: [...clips.values()].sort((a, b) => a.startTime - b.startTime),\n events: [...events.values()].sort((a, b) => a.timestamp - b.timestamp),\n motion,\n codecs,\n oldestDay: keys.length ? keys[0]! : null,\n };\n}\n\nconst bytesFmt = new Map<string, Intl.NumberFormat | null>();\n/** Fixed-decimals number in a locale (\"7,7\" in German, \"7.7\" in English); an unknown tag falls back to toFixed. */\nfunction fixedIn(n: number, digits: number, locale: string): string {\n const key = `${locale}|${digits}`;\n let f = bytesFmt.get(key);\n if (f === undefined) {\n try {\n f = new Intl.NumberFormat(locale, { minimumFractionDigits: digits, maximumFractionDigits: digits });\n } catch {\n f = null;\n }\n bytesFmt.set(key, f);\n }\n return f ? f.format(n) : n.toFixed(digits);\n}\n\n/** Human-readable byte size split into value + unit (binary steps). With `locale` the value carries that language's\n * decimal separator (de \"7,7\", en \"7.7\"); without it, a plain decimal point as before. */\nexport function sentinelHumanBytes(b: number, locale?: string): { value: string; unit: string } {\n if (!b || b <= 0) return { value: '0', unit: 'B' };\n const u = ['B', 'KB', 'MB', 'GB', 'TB'];\n const i = Math.min(u.length - 1, Math.floor(Math.log(b) / Math.log(1024)));\n const n = b / Math.pow(1024, i),\n digits = i ? 1 : 0;\n return { value: locale ? fixedIn(n, digits, locale) : n.toFixed(digits), unit: u[i]! };\n}\n","/**\n * Browser client for the Sentinel NVR plugin's token-guarded `/public/` endpoint.\n *\n * The plugin sends permissive CORS on every answer (JSON, the 204 control replies,\n * api/segment incl. 206, api/livemse, images, errors) and answers OPTIONS, so a\n * cross-origin static SPA can talk to it directly with `?token=`. Media elements\n * may use crossOrigin=\"anonymous\". Older builds (JSON-only CORS) degrade: control()\n * treats an unreadable reply as delivered; media fetches fall into the next fallback.\n */\n\nimport { sentinelPublicBase, sentinelEntryUrl, sentinelUrl } from './model';\n\nexport class SentinelClient {\n readonly origin: string;\n readonly token: string;\n readonly base: string;\n /** \"Open Sentinel\" target: public base without token → sign-in / 302 into the session. */\n readonly entryUrl: string;\n /** fetch() can read media bodies (segments, live fMP4): the plugin sends CORS on media. */\n readonly corsMedia = true;\n\n /**\n * @param origin Scrypted origin, e.g. https://host:10443\n * @param token access token (empty behind a Scrypted login session)\n * @param opts.base override the request base: needed when the plugin is served\n * under a reverse-proxy prefix, or behind the Scrypted login path\n * (`…/endpoint/@local/sentinel-nvr/`, cookie session, no token). Defaults to\n * the token-guarded public base below `origin`.\n */\n constructor(origin: string, token: string, opts: { base?: string } = {}) {\n this.origin = origin;\n this.token = token;\n this.base = opts.base ? opts.base.replace(/\\/*$/, '/') : sentinelPublicBase(origin);\n this.entryUrl = sentinelEntryUrl(origin);\n }\n\n /** Cache key — a new client is built whenever origin/token change. */\n get key(): string {\n return `${this.origin} ${this.token}`;\n }\n\n url(path: string): string {\n return sentinelUrl(this.base, this.token, path);\n }\n\n /** JSON GET with a timeout (an unreachable host otherwise waits for the browser's TCP timeout). */\n async getJson<T>(path: string, signal?: AbortSignal, timeoutMs = 10_000): Promise<T> {\n const signals: AbortSignal[] = [AbortSignal.timeout(timeoutMs)];\n if (signal) signals.push(signal);\n // AbortSignal.any is Chrome 116 / Safari 17.4+; older engines get the timeout signal alone.\n const combined = typeof AbortSignal.any === 'function' ? AbortSignal.any(signals) : signals[0]!;\n const r = await fetch(this.url(path), { cache: 'no-store', signal: combined });\n if (!r.ok) throw new SentinelHttpError(r.status, path);\n return (await r.json()) as T;\n }\n\n /**\n * Fire a control GET (204 = ok, 404 = session gone). Resolves `r.ok`; a rejected\n * fetch (network error) resolves false so the player can recover instead of\n * believing a seek/rate change landed. (The plugin sends CORS on every reply.)\n */\n async control(path: string, timeoutMs = 8000): Promise<boolean> {\n try {\n // bounded: a hanging control request kept the player's \"one in flight\" gate closed for good\n const r = await fetch(this.url(path), { cache: 'no-store', signal: timeoutSignal(timeoutMs) });\n return r.ok;\n } catch {\n return false;\n }\n }\n\n /** Text POST (client telemetry). Best effort, never throws. */\n postText(path: string, body: string): void {\n try {\n void fetch(this.url(path), { method: 'POST', body, keepalive: true }).catch(() => {\n /* telemetry only */\n });\n } catch {\n /* ignore */\n }\n }\n\n /** WebSocket signaling URL (the plugin's Engine.IO handler). */\n signalingUrl(cameraId: string, params: Record<string, string> = {}): string {\n const u = new URL(this.url(''));\n u.protocol = u.protocol === 'https:' ? 'wss:' : 'ws:';\n u.hash = '';\n u.searchParams.set('camera', cameraId);\n u.searchParams.set('signaling', '1');\n for (const [k, v] of Object.entries(params)) u.searchParams.set(k, v);\n return u.href;\n }\n\n // ---- media URL helpers (all <img>/<video>-loadable) ----\n /** `width` = resized picture (plugin ≥ 2026-09-27, older ones ignore it and send the camera's original) */\n snapshotUrl(cameraId: string, bust?: number, width?: number): string {\n return (\n this.url(`api/snapshot?camera=${encodeURIComponent(cameraId)}`) +\n (width ? `&w=${Math.round(width)}` : '') +\n (bust != null ? `&_=${bust}` : '')\n );\n }\n eventThumbUrl(cameraId: string, ts: number): string {\n return this.url(`api/evthumb?camera=${encodeURIComponent(cameraId)}&ts=${Math.round(ts)}`);\n }\n eventFrameUrl(cameraId: string, ts: number): string {\n return this.url(`api/evframe?camera=${encodeURIComponent(cameraId)}&ts=${Math.round(ts)}`);\n }\n segmentThumbUrl(thumbId: string): string {\n return this.url(`api/thumb?id=${encodeURIComponent(thumbId)}`);\n }\n}\n\nexport class SentinelHttpError extends Error {\n readonly status: number;\n constructor(status: number, path: string) {\n super(`${status} ${path}`);\n this.name = 'SentinelHttpError';\n this.status = status;\n }\n}\n\n/**\n * Trade Scrypted credentials for the plugin's access token (`POST …/public/api/token-exchange`,\n * plugin ≥ 2026-09-22). Rejects with `SentinelHttpError`: 401 wrong credentials, 403 token access\n * switched off in the plugin or (plugin ≥ 2026-09-26) not a Scrypted admin, 404 plugin too old,\n * 429 too many attempts, 503 Scrypted login unavailable; 0 = unreachable. `prefix` = reverse-proxy\n * path prefix (SentinelSetup.prefix, since 0.10.0).\n */\nexport async function exchangeSentinelToken(\n origin: string,\n username: string,\n password: string,\n timeoutMs = 10_000,\n prefix = '',\n): Promise<string> {\n const path = 'api/token-exchange';\n let r: Response;\n try {\n r = await fetch(sentinelPublicBase(origin, prefix) + path, {\n method: 'POST',\n cache: 'no-store',\n signal: AbortSignal.timeout(timeoutMs),\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({ username, password }),\n });\n } catch {\n throw new SentinelHttpError(0, path);\n }\n if (!r.ok) throw new SentinelHttpError(r.status, path);\n const j = (await r.json()) as { token?: unknown };\n if (typeof j.token !== 'string' || !j.token) throw new SentinelHttpError(502, path);\n return j.token;\n}\n\n/** AbortSignal that fires after `ms` (undefined on engines without AbortSignal.timeout — Safari < 16). */\nexport function timeoutSignal(ms: number): AbortSignal | undefined {\n return typeof AbortSignal !== 'undefined' && typeof AbortSignal.timeout === 'function'\n ? AbortSignal.timeout(ms)\n : undefined;\n}\n","/**\n * Locale-aware, translation-free formatting (Intl only). Word-dependent helpers\n * (relative time, \"N days\") live in @sentinel-nvr/ui, which owns the i18n dictionary.\n */\n\nconst pad = (n: number) => String(n).padStart(2, '0');\n\n/** HH:MM in the viewer's locale (24 h where the locale uses it). */\nexport function fmtTime(ts: number, locale: string): string {\n return new Intl.DateTimeFormat(locale, { hour: '2-digit', minute: '2-digit' }).format(ts);\n}\n\n/**\n * Day in front of a time where \"HH:MM\" alone is ambiguous: '' on the viewer's today (and for a clock running a bit\n * ahead), the locale's word for yesterday (\"gestern\", \"yesterday\", \"i går\" — Intl, no dictionary key), else a short\n * numeric date (\"3.10.\", \"10/3\"). Calendar days of the viewer's time zone, so DST days (23/25 h) count as one day.\n */\nexport function fmtDayPrefix(ts: number, locale: string, now: number = Date.now()): string {\n const day = new Date(ts).setHours(0, 0, 0, 0);\n const today = new Date(now).setHours(0, 0, 0, 0);\n if (day >= today) return '';\n const y = new Date(today);\n y.setDate(y.getDate() - 1);\n if (day === y.getTime()) return new Intl.RelativeTimeFormat(locale, { numeric: 'auto' }).format(-1, 'day');\n return new Intl.DateTimeFormat(locale, { day: 'numeric', month: 'numeric' }).format(ts);\n}\n\n/** HH:MM:SS. */\nexport function fmtTimeSec(ts: number, locale: string): string {\n return new Intl.DateTimeFormat(locale, { hour: '2-digit', minute: '2-digit', second: '2-digit' }).format(ts);\n}\n\n/** \"Mon 8 Sep\" style day label. */\nexport function fmtDay(ts: number, locale: string): string {\n return new Intl.DateTimeFormat(locale, { weekday: 'short', day: 'numeric', month: 'short' }).format(ts);\n}\n\n/** Month + year for a date-picker header. */\nexport function fmtMonthYear(ts: number, locale: string): string {\n return new Intl.DateTimeFormat(locale, { month: 'long', year: 'numeric' }).format(ts);\n}\n\n/** Weekday short names (Monday first) for a date-picker grid. */\nexport function weekdayShorts(locale: string): string[] {\n const f = new Intl.DateTimeFormat(locale, { weekday: 'short' });\n // 2024-01-01 is a Monday.\n return Array.from({ length: 7 }, (_, i) => f.format(new Date(2024, 0, 1 + i)));\n}\n\n/** HH:MM string for a <input type=\"time\">. */\nexport function hhmmInput(ts: number): string {\n const d = new Date(ts);\n return `${pad(d.getHours())}:${pad(d.getMinutes())}`;\n}\n"],"mappings":";AAgBO,IAAM,yBAAwD;AAAA,EACnE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AA+BO,SAAS,uBACd,KACwB;AACxB,MAAI,CAAC,IAAI,UAAW,QAAO;AAC3B,MAAI,IAAI,QAAS,QAAO;AACxB,SAAO,IAAI,SAAS,OAAO;AAC7B;AA8EO,IAAM,kBAAkB,KAAK,KAAK,KAAK;AAOvC,IAAM,yBAAyB;AAqB/B,SAAS,mBAAmB,OAAwD;AACzF,QAAM,OAAO,SAAS,IAAI,KAAK;AAC/B,MAAI,CAAC,IAAK,QAAO;AACjB,QAAM,aAAa,gBAAgB,KAAK,GAAG,IAAI,MAAM,WAAW,GAAG;AACnE,MAAI;AACJ,MAAI;AACF,QAAI,IAAI,IAAI,UAAU;AAAA,EACxB,QAAQ;AACN,WAAO;AAAA,EACT;AACA,MAAI,CAAC,EAAE,SAAU,QAAO;AACxB,QAAM,QAAQ,EAAE,aAAa,IAAI,OAAO;AACxC,QAAM,KAAK,EAAE,SAAS,QAAQ,YAAY;AAC1C,QAAM,SAAS,KAAK,IAAI,EAAE,SAAS,MAAM,GAAG,EAAE,EAAE,QAAQ,QAAQ,EAAE,IAAI;AACtE,SAAO,EAAE,QAAQ,EAAE,QAAQ,OAAO,SAAS,MAAM,KAAK,IAAI,MAAM,KAAK,IAAI,MAAM,OAAO;AACxF;AAGO,SAAS,mBAAmB,QAAgB,SAAS,IAAY;AACtE,SAAO,GAAG,OAAO,QAAQ,QAAQ,EAAE,CAAC,GAAG,OAAO,QAAQ,QAAQ,EAAE,CAAC,GAAG,sBAAsB;AAC5F;AAQO,SAAS,kBAAkB,QAAwB;AACxD,SAAO,GAAG,OAAO,QAAQ,QA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